Magnetic characterization of cobalt nanowires and square nanorings fabricated by focused electron beam induced deposition