encrypt_fpe_int()
Description
Given a cleartext string in the INTEGER datatype and a profile name, returns its encrypted equivalent.
function encrypt_fpe_int (inputString integer, inputKeyname varchar(256)) returns varchar(8192) CHARACTER SET LATIN
If there are characters in the plaintext input that are not specified in the character set, they are left in their current positions unchanged in the tokenized output. If the plaintext input is less than 2 characters (not counting characters that are not specified in the character set), the output of the UDF is the same as the plaintext input. FPE can tokenize only strings with 2 or more characters.
Example
The following example encrypts a negative number. It is assumed that a profile has been set up in profiles.conf
with the name tokenize_CC
and the encryption method fpe
.
#select encrypt_fpe_int(-90000,'tokenize_CC');
#select encrypt_fpe_int(-90000,'tokenize_CC');
*** Query completed. One row found. One column returned.
*** Total elapsed time was 2 seconds.
thales.encrypt_fpe_int(-90000,'tokenize_CC')
-------------------------------------------------------------------
-65048