-
Hi
Does anyone know of a real beefy encryption function that I can use to store gibberish in the registry, but can be read by my program. I've got one that replaces one character with another, but that seems shockingly easy to figure out (look at enough examples and what has been replaced by what is easy to work out!)
Thanks in advance,
------------------
- Chris
[email protected]
If it ain't broke - don't fix it :)
-
Use an XOr function, like the following, unless you know the lngKey value you won't deciper it. You could make it more cryptic if you use groups of characters and a bigger lngKey value.
Private Function Crypt(MyString as String) as String
Dim n As Long, lngKey As Long, tmpString As String
lngKey = 255
For n = 1 To Len(strInput)
tmpString = tmpString + Chr(lngKey Xor Asc(Mid(MyString, n, 1)))
Next n
Crypt = tmpString
End Sub
Usage:
EncryptedString = Crypt(NormalString)
NormalString = Crypt(EncryptedString)
Just an idea,
Steve.
-
Thanks steve, i'll give it a shot later.
cheers
regards,
------------------
- Chris
[email protected]
If it ain't broke - don't fix it :)
-
Steve - it just returns nothing, I don't know if it's a zero=length string, null or what, but Msgbox shows up as nothing and so does putting encrypted string in a textbox
I used...
Text2.Text = Crypt(Text1.Text)
Any ideas?
Thanks for your time
Kind regards,
------------------
- Chris
[email protected]
If it ain't broke - don't fix it :)