Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: i have resolved it

Re: i have resolved it

From: DA Morgan <damorgan_at_psoug.org>
Date: Fri, 29 Dec 2006 08:51:03 -0800
Message-ID: <1167411056.833579@bubbleator.drizzle.com>


Frank van Bortel wrote:
> DA Morgan schreef:

>> Steve Howard wrote:
>>> yongjia wrote:
>>>> i have resolved it
>>>>
>>>> lenghtb
>>> Good job!  Wait, what were you working on again?...
>>>
>> A problem working with Japanese and Chinese and the Obfuscation toolkit.
>>
>> Yongjia ... what was the solution?

>
> Other post, basically, this (because of the encryption only
> working on byte boundaries):
> v_text := rpad( orgstr, (trunc(length(orgstr)/8)+1)*8, chr(0));
>
> if orgstr is null then
> return null;
> end if;
>
> dbms_obfuscation_toolkit.desencrypt(
> input_string => v_text,
> key_string => keystr,
> encrypted_string => encstr
> );
>
> Should be this:
> v_text := rpad( orgstr, (trunc(lengthb(orgstr)/8)+1)*8, chr(0)); <<<<<
>
> if orgstr is null then
> return null;
> end if;
>
> dbms_obfuscation_toolkit.desencrypt(
> input_string => v_text,
> key_string => keystr,
> encrypted_string => encstr
> );
>
> The original post was called "encrypt Chinese or Japanese"

Thank you.

I would still encourage you to consider the implications of declaring your variables as BYTEs rather than CHARs: Both Chinese and Japanese using multi-byte character sets (well except Romaji).

-- 
Daniel A. Morgan
University of Washington
damorgan_at_x.washington.edu
(replace x with u to respond)
Puget Sound Oracle Users Group
www.psoug.org
Received on Fri Dec 29 2006 - 10:51:03 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US