work on hash/mgf function