use mgf1_hash_supported to simplify some logic
change to UnsupportedAlgorithm from UnsupportedHash for MGF1 errors