Pages

Jan 26, 2010

Oracle Utility to encrypt and decrypted data

Thanks to Robet for sharing the Oracle Utility to encrypt and decrypted.
Below is example to encrypt and decrypted.

declare
l_encrypted VARCHAR2(1000);
l_decrypted VARCHAR2(1000);
l_key VARCHAR2(20):='7777888855551111';
BEGIN
DBMS_OBFUSCATION_TOOLKIT.desencrypt(input => UTL_RAW.cast_to_raw('4505111111111331'),
KEY => l_key,
encrypted_data => l_encrypted);
dbms_output.put_line('l_encrypted = '||l_encrypted);
DBMS_OBFUSCATION_TOOLKIT.desdecrypt
(input=> l_encrypted,
KEY => l_key,
decrypted_data => l_decrypted);
dbms_output.put_line('l_decrypted = '||l_decrypted);
END;

that's for Now ( I am really busy, to do something with ADF Mobile)