Handle small input value
Format-preserving algorithms, FPE and Random2 require a character set during cryptographic operations. When the input data length is shorter than the minimum length specified by the algorithm's requirements, ciphertext or tokens cannot be generated according to the algorithm's specifications. In such cases, the admin can either choose to return the same value as the input or return an error, depending on the Allow Small Input field of the protection policy.
-
Effective length is of the size of the input data that is actually processed by the algorithm.
-
FPE requires minimum two characters from the character set to perform crypto operations.
-
Random2 requires minimum one character form the character set to perform crypto operations.
If the Allow Small Input check box is not selected and user attempts to protect a small input value, clients don't process it and returns error as shown below.
For FPE, the Input buffer is too short (len=1), it has to be at least 2 bytes long.
If the Allow Small Input check box is selected, clients will process small input value. Refer to the respective client documents for details.
Note
-
Null or "" (empty) characters are always by passed, that is, the output is same as the input irrespective of any protection policy configurations.
-
To protect Luhn-compliant data, ensure the following minimum character requirements:
-
For FPE, at least 3 characters from the character set are required.
-
For Random2, at least 2 characters from the character set are required.
-