Hey I'm having a bit of trouble reading a set of numbers from the registry and decoding it, origionally it read the number set from a text file and decoded it, and it worked fine, but here I am trying to read it from the registry anyways. =p

Here is the code if anyone can help me out it would be appreciated.

Orig reading from text file.
-------------------------------------------------

Private Function Decrypt()
Dim tj As String
Let tj = "c:\program files\tj.txt"
Open tj For Random As #1 Len = 50
Dim varReturn As String * 50
Dim varConvert As Double
Dim varFinalPass As String
Dim varKey As Integer


For i = 1 To LOF(1) / 50


Get #1, i, varReturn
Print varRetrun
varConvert = Val(Trim(varReturn))
varConvert = ((((varConvert / 1.5) * 2.1113) / 1.111119) / i)
varFinalPass = varFinalPass & Chr(varConvert)


Next i
Decrypt = varFinalPass
Close #1
End Function

-------------------------------------------------
Here is the stuff my buddy and I worked on, I'm not sure if this is right at all, perhaps it will make the touchups easier.
-------------------------------------------
Private Function Decrypt() ' As String
Dim varReturn As String * 50
Dim varConvert As Double
Dim varFinalPass As String
Dim varKey As Integer
varReturn = GetSetting("GoodNight", "sd", "pw")
For i = 1 To Len(varReturn) / 50 'LOF(1) / 50
varConvert = Val(Trim(varReturn))
varConvert = ((((varConvert / 1.5) * 2.1113) / 1.111119) / i)
varFinalPass = varFinalPass & Chr(varConvert)
Next i
Decrypt = varFinalPass
Close #1
End Function

-------------------------------------------

Thanks Thanks, Hope someone can help me out.
T.J. Stone
[email protected]