Convert core.Sha1 to a more compact storage