dbms_tde_toolkit.datapump_decrypt(
instring IN RAW,
outstring OUT RAW,
keyid OUT RAW);
conn / as sysdba
set serveroutput on
DECLARE
l_credit_card_no VARCHAR2(19) := '1612-1791-1809-2605';
l_ccn_raw RAW(128) := utl_raw.cast_to_raw(l_credit_card_no);
RetKey RAW(128);
RetStr RAW(128);
BEGIN
dbms_tde_toolkit_ffi.datapump_encrypt(l_ccn_raw, RetStr, RetKey);
dbms_output.put_line(RetStr);
dbms_output.put_line(RetKey);
END;
/
-- the following exception is generated if a wallet does not exist or is not open
*
ORA-28365: wallet is not open
-- for instructions on creating a wallet follow the link at page bottom
ALTER SYSTEM SET ENCRYPTION WALLET OPEN IDENTIFIED BY "N0way!";