Results 1 to 2 of 2

Thread: saving encrypted text in registry..

  1. #1

    Thread Starter
    Hyperactive Member jeba's Avatar
    Join Date
    Feb 2000
    Posts
    265

    Question

    Hi there!

    Is there a method to save the password just like that(encrypetd form) in registry.
    Please help me.
    Jeba.

  2. #2
    transcendental analytic kedaman's Avatar
    Join Date
    Mar 2000
    Location
    0x002F2EA8
    Posts
    7,221
    Of course there is!
    I'm posting up the registry part later on my homepage but here's the encrypting part:
    Code:
    Function Simplecrypt(text As String) As String
    Dim ab() As Byte
        ab = StrConv(text, vbFromUnicode)
        For n = 0 To UBound(ab)
            ab(n) = 256 - ab(n)
        Next n
        Simplecrypt = StrConv(ab, vbUnicode)
    End Function
    
    Function Cryptkey(text As String, key As String) As String
    Dim ab1() As Byte, ab2() As Byte, keylen%
        ab1 = StrConv(text, vbFromUnicode)
        ab2 = StrConv(key, vbFromUnicode)
        For n = 0 To UBound(ab1)
            ab1(n) = ab1(n) Xor ab2(n Mod Len(key))
        Next n
        Cryptkey = StrConv(ab1, vbUnicode)
    End Function
    Simplecrypt is about 5 times faster but keycrypt's safer as you can encrypt against a key

    [Edited by kedaman on 05-22-2000 at 02:15 PM]
    Use
    writing software in C++ is like driving rivets into steel beam with a toothpick.
    writing haskell makes your life easier:
    reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
    To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.

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