...

# Anyone can help me Decrypt ?

will2kready
12-13-2004, 08:55 AM
i was getting problem to decrypt an encryption for password.
the function was in ASP, below:

Function PHash( pValue )
Dim dValue
Dim dAccumulator
Dim lTemp
Dim sValue
sValue = UCase(Trim("" & pValue))
dAccumulator = 0
For lTemp = 1 to Len(sValue)
dValue = Asc(Mid(sValue, lTemp, 1))
If (lTemp AND 1) = 1 Then
dAccumulator = Sin( dAccumulator + dValue )
Else
dAccumulator = Cos( dAccumulator + dValue )
End If
Next
dAccumulator = dAccumulator * CLng(10 ^ 9)
PHash = CLng(dAccumulator)
End Function

note:
- pValue is the password entered
- PHash is a function to encrypt the password

anyone can help me decrypt this formula ?i really appreciate !

ghell
12-13-2004, 04:35 PM
Function PHash( pValue )
Dim dValue
Dim dAccumulator
Dim lTemp
Dim sValue
sValue = UCase(Trim("" & pValue)) 'no idea what the .."" & .. is for.. seems useless
dAccumulator = 0
For lTemp = 1 to Len(sValue)
dValue = Asc(Mid(sValue, lTemp, 1)) 'use chr() to take asc() out.. i think
If (lTemp AND 1) = 1 Then
dAccumulator = Sin( dAccumulator + dValue ) 'this will need an arcsin, i dont know if this function is there
Else
dAccumulator = Cos( dAccumulator + dValue ) '..arccos...
End If
Next
dAccumulator = dAccumulator * CLng(10 ^ 9) 'devide by 1,000,000,000
PHash = CLng(dAccumulator)
End Function

basically you want to loop though each character backwards going up the process instead of down it.. im way too lazy for this and im not sure if it even works but someone else will prob help ya :p

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum