469,081 Members | 1,814 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,081 developers. It's quick & easy.

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

Pat
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
Jul 19 '05 #1
2 3270
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
Jul 19 '05 #2
"Guido Konsolke" <GK@oblivion.com> wrote in message news:<10***************@news.thyssen.com>...
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 --
Jul 19 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by Azhar Bilgrami | last post: by
2 posts views Thread by Ian DeRock | last post: by
1 post views Thread by jens Jensen | last post: by
5 posts views Thread by oasis | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.