Important alert: (current site time 5/22/2015 11:34:18 AM EDT)

Third Party Product Review:
Reviews are a new feature of Planet Source Code that allow site visitors to share their experiences on commercial third party products in real life situations.


Oracle Password Decrypt

Submitted on: 1/26/2004 6:47:54 AM
By: quasi_nut_royce  
Level: Beginner
User Rating: Unrated
Compatibility: Oracle
Views: 41290
author picture
(About the author)
     You can use this algo to manually create the encrypted password generated by the Oracle Mapping Work Bench. This can also be used of course with a little work to Decrypt the password stored in the xml file.

Terms of Agreement:   
By using this review, you agree to the following terms...   
  1. You may use any of the code in this review in your own programs (and may compile it into a program and distribute it in compiled format for languages that allow it) freely and with no charge.
  2. You MAY NOT redistribute this review (for example to a web site) without written permission from the original author. Failure to do so is a violation of copyright laws.   
  3. You may link to this review from another website, but ONLY if it is not wrapped in a frame. 
  4. You will abide by any additional copyright restrictions which the author may have placed in the review or review's description.


even indexed characters = 4

odd indexed characters = 112

append string=A7FCAA504BA7E4FC


Even rule:

ascii value of the current character (plus) + 4, (minus) - "position of the current character".


Odd rule

ascii value of the current character (plus) + 112, we then add the result of the expression : "position of the current character " - 1. divide the result by 2.

                                                                                                                                        then multiply the result by 6.



for each character of the password string say for example "password", apply the rule depending on whether the index of the character of the password string is odd or even.



first character is "p" which has the even index so we apply the "even rule."

ascii value of "p" is 112. we add 4 minus 0, we get 116.  Then we convert this into HEX which is equivalent to "74"


 second character is "a" and it has an odd index.

ascii value is 97. 97 plus the 112 = 224. postion of the current character is 1. so we subtract 1 we get 0. we divide 0 by 2 and we still get 0. then we multiply the result by 6 and still get 0 there fore nothing is added to  224.  Then we convert this into HEX which is equivalent to "E0".  Then we append this to our

previous result for the previous character which is "74" to get "74E0".

do this process for the rest of the characters of the password. then append the string "A7FCAA504BA7E4FC"

there we have the encryption process used by Oracle Toplink Mapping WorkBench.


Sample Code:

private String encodePassword(String password) {
String retVal="";
char c;
int num=0;

for (int i=0;i<password.length();i++) {
num = (int)c;
System.out.println ("char="+c+" num="+num);
if (i%2==0) {
retVal = retVal+Integer.toHexString(num + 4 - i) + "";
} else {
retVal = retVal+Integer.toHexString(num + 112 - (((i - 1) / 2) * 6)) + "";
retVal = retVal.toUpperCase();
retVal = retVal+"A7FCAA504BA7E4FC";
return retVal;

Report Bad Submission
Use this form to tell us if this entry should be deleted (i.e contains no code, is a virus, etc.).
This submission should be removed because:

Your Vote

What do you think of this review (in the Beginner category)?
(The review with your highest vote will win this month's coding contest!)
Excellent  Good  Average  Below Average  Poor (See voting log ...)

Other User Comments

2/28/2004 4:15:32 PM

ho! ho!
second character is "a" and it has an odd index.
ascii value is 97.
97 plus the 112 = 224.
EREUR 97 + 112 = 209

(If this comment was disrespectful, please report it.)

2/28/2004 4:17:32 PM

--code in vb--
Function encodePassword(password As String) As String
' ? encodePassword("password") >> 74D175DD77D370C2 A7FCAA504BA7E4FC
Dim retVal As String
Dim c As String
Dim num As integer, i As integer
retVal = ""
c = ""
num = 0
i = 0
For i = 1 To Len(password)
c = Mid(password, i, 1)
num = Asc(c)
Debug.Print "char= "; c, " num= "; num
If Int(i / 2) = i / 2 Then ' Even rule Pair
'règle pour les rangs PAIR à compter de 0 (i-1)
retVal = retVal & Hex(num + 112 - (((i - 2) / 2) * 6)) & ""
Else ' Odd rule Impair
'règle pour les rangs IMPAIR à compter de 0 (i-1)
retVal = retVal & Hex(num + 4 - (i - 1)) & ""
End If
Next i
retVal = UCase(retVal)
retVal = retVal + "A7FCAA504BA7E4FC"
encodePassword = retVal
End Function
(If this comment was disrespectful, please report it.)


Add Your Feedback
Your feedback will be posted below and an email sent to the author. Please remember that the author was kind enough to share this with you, so any criticisms must be stated politely, or they will be deleted. (For feedback not related to this particular review, please click here instead.)

To post feedback, first please login.