main_39.py 365 B

1234567891011
  1. def hashPseudonym(self, i, key, tile):
  2. digest = hashes.Hash(hashes.SHA256(), default_backend())
  3. # for i in range (0,len(plainTail)): # {
  4. _digest = digest.copy()
  5. # key = secrets.token_bytes(32)
  6. _digest.update(bytes(i))
  7. _digest.update(key)
  8. _digest.update(bytes(tile))
  9. p = _digest.finalize() # }
  10. # digest.finalize()
  11. return p