help needed to write a oracle function that can do this...
From: Pat <patm_at_worktechnology.com>
Date: 10 Dec 2003 12:13:17 -0800
Message-ID: <2cacd6c6.0312101213.1e48db0_at_posting.google.com>
Date: 10 Dec 2003 12:13:17 -0800
Message-ID: <2cacd6c6.0312101213.1e48db0_at_posting.google.com>
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 Received on Wed Dec 10 2003 - 21:13:17 CET