Shape Anisotropy and Magnetization Modulation in Hexagonal Cobalt Nanowires