digests_2.py 183 B

1234
  1. def _calc_checksum(self, secret):
  2. if isinstance(secret, unicode):
  3. secret = secret.encode("utf-8")
  4. return str_to_uascii(self._hash_func(secret).hexdigest())