What you’ll build
This guide configures:- A client-side FF3-1 profile with a retrievable AES key
- A CryptoHub-backed FF1 profile with a non-retrievable, HSM-trusted AES key
- Tokenize and detokenize calls that preserve the first four characters
Before you begin
Complete Install and authenticate FXCL. For client-side tokenization, the application endpoint must be approved to receive a retrievable key. For CryptoHub-backed tokenization, the Anchor HSM must have the required tokenization capability and license. The identity must also be able to manage token profiles and executeTOKA and TOKG. Confirm both token operations with a bounded synthetic round trip. Successful key-store or profile management does not prove token-operation access.
Server-side FF1 requires the Format-Preserving Encryption and Format-Preserving Encryption FF1 features on the Anchor HSM.
Create a client-side tokenization profile
Create a retrievable AES-256 data-encryption key store:setClientSide(true) identifies a local profile. The profile’s key store must be retrievable.
Tokenize and detokenize locally
Create a CryptoHub-backed profile
Create a non-retrievable key store:Set the profile’s key store and active key with
setKeyStore() and setKey(). A profile that sets only the key store can fail at runtime with FAILED TO RETRIEVE ENCRYPTION KEY because it has no valid active encryption key binding.Tokenize and detokenize on CryptoHub
RemoteTokenizeParams object for detokenization. Do not reuse the object that completed tokenization or pass its getKey() value to the detokenization constructor. In FXCL 1.9.5, parameter reuse can return an empty detokenization response. The operation must return a same-length token and recover the original value.
Delete test profiles and stores
Delete profiles before their key stores:Verify it works
For client-side tokenization, require all of these results:- The profile can be created and retrieved.
- The token differs from the clear value.
- The token length matches the clear-value length.
- Preserved characters remain unchanged.
- Detokenization recovers the original value.

