hash_1_11.py 303 B

123456789
  1. def sha224_generic_passwd(password, uppercase=False):
  2. """
  3. >>> sha224_generic_passwd(password='testpass', uppercase=False)
  4. '648db6019764b598f75ab6b7616d2e82563a00eb1531680e19ac4c6f'
  5. """
  6. retVal = sha224(password).hexdigest()
  7. return retVal.upper() if uppercase else retVal.lower()