|
-
Dec 1st, 1999, 09:38 AM
#1
Thread Starter
PowerPoster
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 
-
Dec 1st, 1999, 02:04 PM
#2
Lively Member
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.
-
Dec 1st, 1999, 06:43 PM
#3
Thread Starter
PowerPoster
Thanks steve, i'll give it a shot later.
cheers
regards,
------------------
- Chris
[email protected]
If it ain't broke - don't fix it 
-
Dec 1st, 1999, 08:56 PM
#4
Thread Starter
PowerPoster
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 
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|