[UB1-1336] Partial Encryption
Adds support for prefix/suffix partial encryption rules.
➜ ubiq-python git:(master) ✗ pyenv exec python examples/ubiq_fpe_sample.py -P "local" -e "1234 1234 1234 1234" -n "Credit Card"
ENCRYPTED cipher= aaaa aaI& )^w! 1234
➜ ubiq-python git:(master) ✗ pyenv exec python examples/ubiq_fpe_sample.py -P "local" -d "aaaa aaI& )^w! 1234" -n "Credit Card"
DECRYPTED plainText= 1234 1234 1234 1234
It's just a matter of modifying the fpe formatting in/out. This reduces the string down to the "encryptable" portion. I store the removed portions for prefix/suffix in each rule as a buffer to be put back after encryption.
Update 5/1:
- Validate input characters AFTER rules applied
- Merge master (fpe => structured, monorepo)
Edited by Ian Freshwater