Results 1 to 4 of 4

Thread: (Resolved) - Good String Encryption Script ?

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Dec 2005
    Location
    UK
    Posts
    127

    (Resolved) - Good String Encryption Script ?

    anybody know to one ?

    would be most handy .... will carry on searching in the meantime
    Last edited by illskills; Jan 4th, 2006 at 03:00 PM.

  2. #2

    Thread Starter
    Lively Member
    Join Date
    Dec 2005
    Location
    UK
    Posts
    127

    Re: Good String Encryption Script ?

    31bit encryption ... niiiiiiiice

    VB Code:
    1. Public Function RndCrypt(ByVal Str As String, ByVal Password As String) As String
    2.     '
    3.     '  Made by Michael Ciurescu (CVMichael from vbforums.com)
    4.     '  Original thread: [url]http://www.vbforums.com/showthread.php?t=231798[/url]
    5.     '
    6.     Dim SK As Long, K As Long
    7.         ' init randomizer for password
    8.     Rnd -1
    9.     Randomize Len(Password)
    10.     ' (((K Mod 256) Xor Asc(Mid$(Password, K, 1))) Xor Fix(256 * Rnd)) -> makes sure that a
    11.     ' password like "pass12" does NOT give the same result as the password "sspa12" or "12pass"
    12.     ' or "1pass2" etc. (or any combination of the same letters)
    13.         For K = 1 To Len(Password)
    14.         SK = SK + (((K Mod 256) Xor Asc(Mid$(Password, K, 1))) Xor Fix(256 * Rnd))
    15.     Next K
    16.    
    17.     ' init randomizer for encryption/decryption
    18.     Rnd -1
    19.     Randomize SK
    20.    
    21.     ' encrypt/decrypt every character using the randomizer
    22.     For K = 1 To Len(Str)
    23.         Mid$(Str, K, 1) = Chr(Fix(256 * Rnd) Xor Asc(Mid$(Str, K, 1)))
    24.     Next K
    25.    
    26.     RndCrypt = Str
    27. End Function
    Last edited by illskills; Jan 4th, 2006 at 02:58 PM. Reason: typo

  3. #3
    KrisSiegel.com Kasracer's Avatar
    Join Date
    Jul 2003
    Location
    USA, Maryland
    Posts
    4,985

    Re: (Resolved) - Good String Encryption Script ?

    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
    KrisSiegel.com - My Personal Website with my blog and portfolio
    Don't Forget to Rate Posts!

    Free Icons: FamFamFam, VBCorner, VBAccelerator
    Useful Links: System.Security.SecureString Managed DPAPI Overview Part 1 Managed DPAPI Overview Part 2 MSDN, MSDN2, Comparing the Timer Classes

  4. #4

    Thread Starter
    Lively Member
    Join Date
    Dec 2005
    Location
    UK
    Posts
    127

    Re: (Resolved) - Good String Encryption Script ?

    nice thank you mate

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