This repository has been archived by the owner on Feb 2, 2022. It is now read-only.
v1.2.0 - Add *WithTweak methods
Both ff1
and ff3
packages now have two new (optional) functions, EncryptWithTweak
and DecryptWithTweak
, which allow you to pass in a tweak
to override the current Cipher
's tweak
for a given piece of data to operate on.
This aids in realistic FPE scenarios like tokenizing multiple credit card numbers which will have different tweaks for each number, but you want to use the same key (and therefore re-use a single Cipher
instance).
The existing Encrypt
and Decrypt
functions for both packages remain the same, so this API changes is non-breaking.