Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: dbms_obfuscation_toolkit input length -- example added
create or replace function encUTF (a varchar2, k varchar2 default
'AAAAAAAA')
return varchar2
is
i varchar2(100) := a;
b varchar2(100);
g number;
begin
select vsize(i) into g from dual;
dbms_output.put_line(g);
while g mod 8 <> 0 loop
i := i || ' '; select vsize(i) into g from dual; dbms_output.put_line(g); dbms_output.put_line(a);
declare a varchar2(100);
begin
a := encUTF('Dieter Bücherl');
a := encUTF('');
end;
"Dieter Buecherl" <Dieter.Buecherl_at_t-online.de> schrieb im Newsbeitrag
news:a4te8n$h7g$07$1_at_news.t-online.com...
> Hello, Hanne
>
> I've attempted the same on a database with UTF-8 charset.
> I thnik that dbms_obfuscation_toolkit.desencrypt does not check the length
> of the string but the number of bytes.
> You can verify the bytelength of your input_string with vsize,
> e.g. select vsize('äöüÄÖÜß') from dual
> If you can pad the input_string to a vsize of 8, 16, ..., then
> dbms_obfuscation_toolkit.desencrypt will handle it accordingly.
>
> HTH Dieter
>
>
> "Hanne Hagedorn" <hanne.hagedorn_at_wwl.de> schrieb im Newsbeitrag
> news:f356d7a3.0202180742.664e0ad5_at_posting.google.com...
> > Hi,
> >
> > I'm trying to encrypt columns in 8.1.7 using the
> > dbms_obfuscation_toolkit.desencrypt function, which requires a
> > multiple of 8 bytes as input. If the input contains only characters in
> > the US7ASCII charset, I can pad it to the correct length, so there is
> > no problem. But whenever I try to encrypt something containing special
> > characters like the german 'ä,ö,ü', the package complains about
> > invalid input length. This happens with a database charset of
> > iso8859p1 or utf-8. Is there any chance to handle this?
> >
> > Thanks,
> > Hanne
>
>
Received on Tue Feb 19 2002 - 06:07:45 CST