Results 1 to 3 of 3

Thread: [RESOLVED] [VB6] - Passwords and their names

  1. #1

    Thread Starter
    PowerPoster joaquim's Avatar
    Join Date
    Apr 2007
    Posts
    3,966

    Resolved [RESOLVED] [VB6] - Passwords and their names

    i know build a text file for put names and passwords(counts), but the problem is that everyone can change that easy using an text editor program. my question is: then how can i protect my counts?
    i read somthing about decript and undecript files, but i don't know
    i need some advices
    VB6 2D Sprite control

    To live is difficult, but we do it.

  2. #2
    New Member
    Join Date
    Jul 2010
    Posts
    11

    Re: [VB6] - Passwords and their names

    well I remember one of my 1st programs was a text editor that saves everything but encrpyted.
    how I did that was using a loop to go through each character and convert it to the ascii code, then I used the Xor statement and other mathematical operations to play with the numbers. Just make sure it's reversible.
    In my program I also made sure that one of the mathematical operators was a number in an inputbox which they will require to decrypt it.
    to decrypt it, just reverse the order and the statements.
    for example. someone types a letter.
    make the letter "letter$", and make the code that the user typed in "code". for larger statements, just make a loop going through each letter and do something like this.
    Code:
    Print #1, ((Asc(letter$) Xor code) * 5 - 15)
    and to decrypt.

    Input #1, Number
    Code:
    DecryptedLetter = ((Chr$(Number Xor code) + 15) / 5)
    and for the sentance
    Code:
    decrpytedsentance = decryptedsentance & decryptedletter
    And there you go, simple Encryption and Decryption
    just add to the equation to make it stronger if you want.
    When someone opens it in Notepad or something, it will just be a whole bunch of numbers.
    my program it even makes those numbers 2 decimal places and 4 digits at least, which makes it disorientating.

    Also just a suggestion. When making the file, don't call it .txt
    make a different extension so it will look like a random file which could be anything.
    give it a .enc or anything, doesn't matter at all.
    another tip would be to make every 2nd or 3rd character a false character which will be checked, so if people randomly deletes numbers, it will make sure to corrupt the file and will stop any tampering.
    Create like 3 or 4 of these files, with different extensions and hide them all over windows as backups as well. so the actual user can still get in.

  3. #3

    Thread Starter
    PowerPoster joaquim's Avatar
    Join Date
    Apr 2007
    Posts
    3,966

    Re: [VB6] - Passwords and their names

    Quote Originally Posted by mixtah View Post
    well I remember one of my 1st programs was a text editor that saves everything but encrpyted.
    how I did that was using a loop to go through each character and convert it to the ascii code, then I used the Xor statement and other mathematical operations to play with the numbers. Just make sure it's reversible.
    In my program I also made sure that one of the mathematical operators was a number in an inputbox which they will require to decrypt it.
    to decrypt it, just reverse the order and the statements.
    for example. someone types a letter.
    make the letter "letter$", and make the code that the user typed in "code". for larger statements, just make a loop going through each letter and do something like this.
    Code:
    Print #1, ((Asc(letter$) Xor code) * 5 - 15)
    and to decrypt.

    Input #1, Number
    Code:
    DecryptedLetter = ((Chr$(Number Xor code) + 15) / 5)
    and for the sentance
    Code:
    decrpytedsentance = decryptedsentance & decryptedletter
    And there you go, simple Encryption and Decryption
    just add to the equation to make it stronger if you want.
    When someone opens it in Notepad or something, it will just be a whole bunch of numbers.
    my program it even makes those numbers 2 decimal places and 4 digits at least, which makes it disorientating.

    Also just a suggestion. When making the file, don't call it .txt
    make a different extension so it will look like a random file which could be anything.
    give it a .enc or anything, doesn't matter at all.
    another tip would be to make every 2nd or 3rd character a false character which will be checked, so if people randomly deletes numbers, it will make sure to corrupt the file and will stop any tampering.
    Create like 3 or 4 of these files, with different extensions and hide them all over windows as backups as well. so the actual user can still get in.
    ok... until here i understand
    thanks for that advice
    VB6 2D Sprite control

    To live is difficult, but we do 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
  •  



Click Here to Expand Forum to Full Width