|
-- Initialize session
exec xp_crypt_init_session
-- Set timeout to 1 minute
exec xp_crypt_set_option 'timeout','1'
exec xp_crypt_set_option 'use_crlf','no'
....
-- Encrypt string and get the result without new line feeds
exec xp_rsa_priv_dec @CryptedText, '<privatekey.pem', @name OUTPUT, @dateofbirth
OUTPUT , @department OUTPUT, 'PassForThePrivateKey'
-- Close session
exec xp_crypt_close_session
|