| |
 |
|
Oracle Tips by Burleson |
Chapter 6 Oracle Encryption
v_enc_proc_code varchar2(2);
begin
if INSERTING then
v_key := get_key;
:new.procedure_code := get_encrypted_value (
:new.procedure_code, v_key);
insert into claim_line_keys
values
(:new.claim_id, :new.line_id, v_key);
end if;
if UPDATING then
select key_value
into v_key
from claim_line_keys
SEE CODE DEPOT FOR FULL SCRIPT
and line_id = :new.line_id;
:new.procedure_code := get_encrypted_value (
:new.procedure_code, v_key);
end if;
end;
/
This will update the value with an encrypted
value, if it already exists, or will insert the value with
encryption, even if the user inserts the value in clear text.
SQL> select
get_procedure_code (1,2) from dual;
The above text is
an excerpt from:
Oracle Privacy Security Auditing
The
Final Word on Oracle Security
This is the only authoritative
book on Oracle Security, Oracle Privacy, and Oracle Auditing written
by two of the world’s leading Oracle Security experts.
This indispensable book is only
$39.95
and has an
immediate download of working security scripts:
|