Connecting Tech Pros Worldwide Forums | Help | Site Map

help needed to write a oracle function that can do this...

Pat
Guest
 
Posts: n/a
#1: Jun 27 '08
Encrypt function:

- One parameter is passed to it, defined as a string, and its called
strCryptThis
- set the encryption key (g_key) = "ISSUETRK"
- for each character in strCryptThis, have a counter ( =1 ) going and
do the following:
- take the ASCII value of the letter that the counter equals to in
g_key. assign this to the variable iKeyChar
ex: if counter=1 then take the ascii value of "I", if
counter=2, then take the ascii value of "S" and so on
- do the same as above except now do it for strCryptThis. assign it to
iStringChar
- take iKeyChar and XOR it with iStringChar and assign it to
iCryptChar
- take the charactorCode equivalent of iCryptChar and reassign it back
to iCryptChar
- take the ASCII equivalent of iCryptChar and reassign it back to
iCryptChar
here you should now have a number (still in a string format though).
- if iCryptChar is less than 10 then pad two zeros to the beginning of
it
ex: if iCryptChar is 6 then iCryptChar = "006"
- if iCryptChar is less than 100, then pad one zero to the beginning
of it
ex: if iCryptChar is 74 then iCryptChar = "074"
- concatenate this value to a variable strEncrypted
- increment the counter and repeat above steps for each charactor of
strCryptThis

- return strEncrypted

thanks Pat

Guido Konsolke
Guest
 
Posts: n/a
#2: Jun 27 '08

re: help needed to write a oracle function that can do this...


Hi Pat,

would you mind telling us how far you got?
What have you tried?
Have you read about the provided functions in your manuals?

Show us that you've put in some effort. Then ask about
the errors you get or the parts that still are unsolved.

Sorry, no help right now.

Guido


Mark D Powell
Guest
 
Posts: n/a
#3: Jun 27 '08

re: help needed to write a oracle function that can do this...


"Guido Konsolke" <GK@oblivion.comwrote in message news:<1071128476.118654@news.thyssen.com>...
Quote:
Hi Pat,
>
would you mind telling us how far you got?
What have you tried?
Have you read about the provided functions in your manuals?
>
Show us that you've put in some effort. Then ask about
the errors you get or the parts that still are unsolved.
>
Sorry, no help right now.
>
Guido
Would the Oracle provided package: DBMS_OBFUSCATION_TOOLKIT that
performs encryption and decryption meet the underlying need here. See
the Oracle Supplied Packages manual.

HTH -- Mark D Powell --
Closed Thread