|
-
Hi Ally
here is my quick (& off course dirty code ;-)
create table mytable
as select * from test
where 1=2;
CREATE OR REPLACE PROCEDURE
mod-column-name test.password%type
as
l-key Constant Number =8;
cursor c1 is select * from test;
for c1rec in c1 loop
BEGIN
--- the key and the input data must have a length
-- divisible by eight (the key must be exactly 8 bytes long).
mod-column-name := RPAD(l_string,(TRUNC(LENGTH(c1rec.password)/8)+1)*8,CHR(0));
DBMS_OBFUSCATION_TOOLKIT.DESENCRYPT
(input_string => mod-column-name
key_string => l-key,
encrypted_string => l-encrypted-column-name);
--
--DBMS_OUTPUT.PUT_LINE('l_string ENCRYPTED: ' || l_encrypted_string);
--
--
insert into mytable values
(c1rec.user,l-encrypted-column-name);
commit;
-- Dbms_output.put_line('Encrypted data inserted');
end loop
END;
i gotta run ally as my ass is on fire today.well u can put the proceedure in a after row trigger to meet your requirements.well thanks sam i have reused the example from your site.**** ...........my boss he seems to on me i really gotta go now i am off.
regards
hrishy
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|