Hydrogenation of nanostructured alloys and composites based on magnesium