main_1.py 292 B

12345678910
  1. def pseudonymize(colname):
  2. if colname not in key:
  3. sha3 = hashlib.sha3_512()
  4. data = salt + colname
  5. sha3.update(data.encode('utf-8'))
  6. hexdigest = sha3.hexdigest()
  7. key[colname] = hexdigest
  8. return hexdigest
  9. else:
  10. return key[colname]