Skip to content
This repository has been archived by the owner on Feb 2, 2022. It is now read-only.

v1.2.0 - Add *WithTweak methods

Compare
Choose a tag to compare
@anitgandhi anitgandhi released this 25 Oct 16:17
· 8 commits to master since this release

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.