Results 1 to 7 of 7

Thread: VB6 - 31 Bit Encryption - To the Next Level

  1. #1

    Thread Starter
    PowerPoster
    Join Date
    Feb 2002
    Location
    Canada, Toronto
    Posts
    5,803

    VB6 - 31 Bit Encryption - To the Next Level

    This is an improved version of my VB - 31 Bit Encryption function

    I had to put the code in a Class because there is some Initializing to do.

    This version is much better than the old one. The Seed value is calculated better, it is calculated from the password (as before) but this time through more passes, and the algorithm resembles a HASH output.
    The data is encrypted better because it is using the seed value to encrypt, and not only to initialyze the random number generator as before.

    Also, you can choose the strength of the encryption by changing two values: the seed passes and data passes. Changing these values to a greater number will result into a better encryption (with the expense of time taken to encrypt)

    You can also choose to output/input the data into Hex or Base64

    Here is an example how to use it:
    vb Code:
    1. Dim cRndEnc As New clsRndCrypt
    2. Dim EncStr As String
    3. Dim DecStr As String
    4.  
    5. EncStr = cRndEnc.RndCryptLevel2("Hello World !", "some password", 5, 10, eBinaryString, eBase64)
    6.  
    7. Debug.Print "Encrypted String to Base64: " & EncStr
    8.  
    9. DecStr = cRndEnc.RndCryptLevel2(EncStr, "some password", 5, 10, eBase64, eBinaryString)
    10.  
    11. Debug.Print "Decrypted String: " & DecStr
    In the above example, I chose to have 5 passes for the seed (the password), and 10 passes through the data (to encrypt 10 times), and to output the encrypted data as Base64, and therefore the input for the decryption is also Base64.

    I also added in the Class the old encryption "RndCrypt", and also "RndCryptB" (faster version of RndCrypt improved by frozen)

    If you find any problems with the code, please let me know so I can fix them.
    Attached Files Attached Files
    Last edited by CVMichael; Dec 31st, 2010 at 06:03 PM.

  2. #2
    Frenzied Member
    Join Date
    Apr 2003
    Location
    The Future - Skynet
    Posts
    1,157

    Re: VB6 - 31 Bit Encryption - To the Next Level

    CVMichael, I am a big fan of yours when it comes to encryption. Learn so much from you already buddy!

    Thanks

    I'll Be Back!

    T-1000

    Microsoft .Net 2005
    Microsoft Visual Basic 6
    Prefer using API

  3. #3
    Hyperactive Member
    Join Date
    Oct 2005
    Posts
    294

    Re: VB6 - 31 Bit Encryption - To the Next Level

    Very nice. I'm with you there Liquid Metal, CVMichael's code is the reason I know what I do about encryption.

  4. #4
    Junior Member
    Join Date
    Dec 2010
    Posts
    30

    Re: VB6 - 31 Bit Encryption - To the Next Level

    Hi there.

    I am completly new to the whole encryption game. Although i had read your older topic that you posted back in 2003 about your older encryption method and I read all the comments yet I am still a bit confused. I downloaded the class module encryption.

    The program I am doing involves me encrypting a set of usernames that the program has randomly generated for the user - based on their input.

    So lets say I just created a new project and wanted to encrypt and decrypt some data using your encryption method. What screen objects would I require: I am thinking two text boxes and two command buttons but I am unsure. Also how would I code the command buttons; i know one would be to encrypt the data, and the other to decrypt the data, but I do not know which code I should put in each button. Also I noticed the following code in your class module:

    Code:
    ublic Property Get DataSource() As DataSource
    
    End Property
    
    Public Property Set DataSource(ByVal objDataSource As DataSource)
    
    End Property
    
    Public Property Get DataMember() As DataMember
    
    End Property
    
    Public Property Let DataMember(ByVal DataMember As DataMember)
    
    End Property
    What exactly is to be inputted in these procedures?

    Many thanks,
    Bainy

  5. #5

    Thread Starter
    PowerPoster
    Join Date
    Feb 2002
    Location
    Canada, Toronto
    Posts
    5,803

    Re: VB6 - 31 Bit Encryption - To the Next Level

    I'm pretty sure I did not put those properties in there... so I have no idea how they got there. I removed them, and re-uploaded the class file.

    I don't really understand your question, but you should make a thread in the General VB6 forum: http://www.vbforums.com/forumdisplay.php?f=1 where you explain better what you want, and also more people will see your question.

  6. #6
    Former Admin/Moderator MartinLiss's Avatar
    Join Date
    Sep 1999
    Location
    San Jose, CA
    Posts
    33,431

    Re: VB6 - 31 Bit Encryption - To the Next Level

    I've never used encryption and I'm having difficulty understanding how I could use it internally in a program. Let's say I to develop an app the requires a password before it can be opened. How would I go about doing that?

  7. #7

Tags for this Thread

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