encrypt_fpe_smallint()
Description
Given a cleartext string in the SMALLINT datatype and a profile name, returns its encrypted equivalent.
function encrypt_fpe_smallint (inputString smallint, 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 smallint 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_smallint(21690,'tokenize_CC');
#select encrypt_fpe_smallint(21690,'tokenize_CC');
*** Query completed. One row found. One column returned.
*** Total elapsed time was 2 seconds.
thales.encrypt_fpe_smallint('21690','tokenize_CC')
-------------------------------------------------------------------
13490