Skip to content

Instantly share code, notes, and snippets.

@Gordonei
Created January 24, 2020 11:09
Show Gist options
  • Save Gordonei/1832404090b4b87de5d1de8c46c79687 to your computer and use it in GitHub Desktop.
Save Gordonei/1832404090b4b87de5d1de8c46c79687 to your computer and use it in GitHub Desktop.
Example of code used to hash invoice numbers for CCT -> EPRU data sharing.
import hashlib
# Input parameters
invoice_number = "<invoice number of bill goes here"
epru_uct_salt = "<salt value goes here>"
invoice_number_hash_string = str.encode(invoice_number + epru_uct_salt)
invoice_number_hashed = hashlib.sha256(invoice_number_hash_string).hexdigest()
print(f"{invoice_number} -> {invoice_number_hashed}")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment