Top

Name

decrypt — Encrypt content in base64 encoding

Synopsis

varchar decrypt ( in base64_string_session any ,
  in key_name varchar );
 

Description

Returns decrypted content as a string_session. The algorithm to encrypt depends of the key, so if the key is AES the AES will be used, if it is 3DES it is 3DES etc. The AES key can be created with xenc_key_AES_rand_create (key_name, 256). Alternatively 3DES key can be generated with xenc_key_3DES_rand_create ().

Parameters

base64_string_session

A base64 string content to be decrypted.

key_name

The key name keeping secret.

Return Types

On success the function will return decrypted content as a string_session.

Examples

Example 24.460. Simple Use

-- The 'ses' is a function which print the string into a string session:
xenc_key_AES_rand_create ('kaes', 256).
decrypt (encrypt (ses ('data to encrypt'), 'kaes'), 'kaes');