Back | Reverse | Quick Reply | Post Reply |

About encrypting and decrypting in VB6
Link | by Black Rock Shooter! on 2006-10-27 00:37:17
I'm currently doing a school project on creating an encryption system using VB6. it goes somewhat like this: After you create a new user and its password, the system should automatically encrypt the password when it is saved to Access.
I've already done the saving of the new user and password to Access, just that the password is not encrypted. I've fished around the net for simple VB encryption codes but i don't really understand most of them, since the codes doesn't explain where the password was encrypted and how it was decrypted.

yea, i really need help on this one...



Find me at Twitter and Google+

Re: About encrypting and decrypting in VB6
Link | by gendou on 2006-10-27 09:43:52
when you say encrypt, do you mean hash? usually, you want to hash passwords, because you never need to print them but you do need to check for authenticity. MD5 is a good hash algorithm.


Re: About encrypting and decrypting in VB6
Link | by Black Rock Shooter! on 2006-10-27 10:11:17
hmm..what i meant to say when i said encrypt was ciphering the password. for example, the password Gendou became 93\]0v or Jcqgrx or something similar.



Find me at Twitter and Google+

Re: About encrypting and decrypting in VB6
Link | by psoplayer on 2006-10-28 17:16:59
Well, after you've stored these passwords, will you need to retrieve them again to tell back to a user? If not, just use a hash, as was suggested. That way comparing two hashes will be the same as comparing two passwords, only you can reconstruct the original password from the hash.


Re: About encrypting and decrypting in VB6
Link | by Black Rock Shooter! on 2006-10-29 02:51:05
hmm...so how do we construct the coding for the method you mentioned?(i'm really bad at doing encryption T_T)



Find me at Twitter and Google+

Re: About encrypting and decrypting in VB6
Link | by ruyvlopez on 2006-11-05 11:28:03 (edited 2006-11-05 11:39:20)
The problem to your program is there is no encryption and decryption procedure that you made. The first thing to do in your project is this...

Saving Password to an Account:
Input True Text in Textbox -> Encrypt the True Text -> Save to Database the Encrypted True Text


But the Decryption process is like this...


Opening Account using a password.
Input Password -> Encrypt the Inputed Password Data -> Match it to the Saved Data Password in the Database (Done at Saving Password to an Account).


I love creating some encryption and decryption program, but I don't know where I can put it in the WEB (I made 21 Encrypt/Decrypt Procedures). So if you want to create your own encryption, just make a patterns in rumbling characters. After that try to find the Decryption process by computing it Mathematically (using arithmetic and logic).

Don't think encryption is too easy like changing one character into a different character or characters. Try to change their positions, appearance, and quantities (that's a hint to make a good encryption and decryption procedures).

May be I'll upload my works soon.

Re: About encrypting and decrypting in VB6
Link | by Black Rock Shooter! on 2007-03-07 07:00:28 (edited 2007-03-07 07:27:15)
ok, i wanted to make a new thread, but i'd rather not since i can still post here. anyways, i've decided to use a scrambling procedure to encrypt my password. the program works and all but i need help in understanding this little piece of coding i got after googling the internet for weeks.

Private Function ScrambleString(ByVal txtPassword As String, Optional SeekInit As Long = 0) As String

Dim K As Long, Sk As Long, Tmp As String, RndPos As Long


Sk = SeekInit
For K = 1 To Len(txtPassword)
Sk = Sk + Asc(Mid$(txtPassword, K, 1))
Next K

Rnd -1
Randomize Sk

For K = 1 To Len(txtPassword)
RndPos = 1 + Fix(Len(txtPassword) * Rnd)

' SWAP Chars
Tmp = Mid$(txtPassword, K, 1)
Mid$(txtPassword, K, 1) = Mid$(txtPassword, RndPos, 1)
Mid$(txtPassword, RndPos, 1) = Tmp
Next K

ScrambleString = txtPassword
End Function

from the codes above, i was wondering if someone could teach me how to decode a password that was scrambled using the above piece of codes using either logic or maths(decoding the password manually). for example:

before scrambling: password
after scrambling: osswprda

before scrambling: michelle
after scrambling: emcllieh



Find me at Twitter and Google+

Re: About encrypting and decrypting in VB6
Link | by EmptyMind on 2007-03-07 13:00:27
Well do you know what this function does?

Given a combination of letters, it will scramble them in the same way. Since the seed for the random number generator is based on the total ascii values of the characters in the string, given the same combination of characters it will perform the same sequence of character switches.

If I'm right, if you pass this function the encrypted string, it will spit out the unencrypted string.

And besides, if you just need to check the password, you don't need to decrypt it anyway, just encrypt the attempted password and compare it to the encrypted password, as repeatedly stated above :P

>,>; Did I just say that...?

Re: About encrypting and decrypting in VB6
Link | by Black Rock Shooter! on 2007-03-07 14:44:53
i did that. my program is working without much problem. i just want to learn how to decrypt the password manually without using any programs



Find me at Twitter and Google+

Re: About encrypting and decrypting in VB6
Link | by EmptyMind on 2007-03-07 16:51:14
Unless you know off hand the ascii codes for all the characters in the password, and the random number generator the program uses, you can't.

You know that random number generators in a computer take a seed and use it to generate a sequence of random numbers, right? Well unless you know what the seed and random number function is, you're going to have a hard time predicting where each letter is going to be swapped.

>,>; Did I just say that...?

Re: About encrypting and decrypting in VB6
Link | by Black Rock Shooter! on 2007-03-08 20:49:21
thanks anyways...i found out how to decode it manually yesterday (and getting a huge headache at the same time)



Find me at Twitter and Google+

Back | Reverse | Quick Reply | Post Reply |

Copyright 2000-2024 Gendou | Terms of Use | Page loaded in 0.0028 seconds at 2024-04-28 10:03:57