Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> encrypt Chinese or Japanese
hi all:
I use dbms_obfuscation_toolkit.desencrypt to encrypt Chinese or Japanese
vbstring
but when I decrypt it ,I can not get the right string
who can tell me how to resolve it?
keystr varchar2(8) := 'angoukey'; encstr varchar2(40); v_text varchar2(40);
if orgstr is null then
return null;
end if;
dbms_obfuscation_toolkit.desencrypt(
input_string => v_text,
key_string => keystr,
encrypted_string => encstr
);
return encstr;
end;
create or replace function get_decrypted_string(encstr varchar2)
return varchar2 as
keystr varchar2(8) := 'angoukey';
orgstr varchar2(40);
begin
if encstr is null then
return null;
end if;
dbms_obfuscation_toolkit.desdecrypt(
input_string => encstr,
key_string => keystr,
decrypted_string => orgstr
);
return rtrim(orgstr,chr(0));
end;
Received on Thu Dec 28 2006 - 01:18:39 CST