anybody know to one ?
would be most handy .... will carry on searching in the meantime
Printable View
anybody know to one ?
would be most handy .... will carry on searching in the meantime
31bit encryption ... niiiiiiiice :D
VB Code:
Public Function RndCrypt(ByVal Str As String, ByVal Password As String) As String ' ' Made by Michael Ciurescu (CVMichael from vbforums.com) ' Original thread: [url]http://www.vbforums.com/showthread.php?t=231798[/url] ' Dim SK As Long, K As Long ' init randomizer for password Rnd -1 Randomize Len(Password) ' (((K Mod 256) Xor Asc(Mid$(Password, K, 1))) Xor Fix(256 * Rnd)) -> makes sure that a ' password like "pass12" does NOT give the same result as the password "sspa12" or "12pass" ' or "1pass2" etc. (or any combination of the same letters) For K = 1 To Len(Password) SK = SK + (((K Mod 256) Xor Asc(Mid$(Password, K, 1))) Xor Fix(256 * Rnd)) Next K ' init randomizer for encryption/decryption Rnd -1 Randomize SK ' encrypt/decrypt every character using the randomizer For K = 1 To Len(Str) Mid$(Str, K, 1) = Chr(Fix(256 * Rnd) Xor Asc(Mid$(Str, K, 1))) Next K RndCrypt = Str End Function
That's not really good encryption but does a basic job.
I would check out RSA encryption. This article seems to cover it well: http://www.devx.com/security/Article/17455/0/page/3
nice thank you mate ;)