Results 1 to 2 of 2

Thread: Reading and decoding from the registry

  1. #1

    Thread Starter
    New Member
    Join Date
    Oct 2000
    Posts
    2
    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]

  2. #2

    Thread Starter
    New Member
    Join Date
    Oct 2000
    Posts
    2
    PS: its already written in the registry, it comes back something like 302.235235235245345345345____________________ (the underscores symbolize spaces...)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width