Hi,
As far as encryption goes, I am a newbie. Right now when I login, it will compare the user and password stored in my database. If both match, I will be able to login, otherwise I will be refused. The user and password are now stored in plaintext. How do I encrypt the password and stored it into the database and when I login, it will decrypt the password again. Would appreciate if anyone of you can tell me how to do the coding in order to achieve this.
Please take a look at my attached file. Thanking you all in advance.
laifa
0
Newbie Poster
Recommended Answers
Jump to PostI don't personally suggest the method you are inquiring about.... most password systems as of late, have been using an MD5 (or some other algorithm) to "Hash" the password. Just a little defination here, a Hash is a string that can NOT be decrypted. It's gone through some crazy algorithms …
Jump to PostOk, This code was taken from http://www.frez.co.uk/freecode.htm#md5. You can use the class module to instantiate an instance and use the md5 call of it. Like so:
Dim oMD5 As CMD5 Set oMD5 = New CMD5 Hash = oMD5.MD5("Your Password Here")
Attached is the test …
Jump to PostHi Iafia,
If all you want to do is shift the letters three steps you can easily do that by taking the ASCII value of each letter add three to it and then convert it back to a character, i.e.
Dim Password As String Dim i …
Jump to PostYou never clear the results variable. The results variable always gets added to, because results = results & Chr(Asc(Mid(Password, i, 1)) + 3), which means, results is equal to results and the return of these nested functions, every time it's called (I'm not going to go into variable scope here). …
Jump to PostIafa,
The answer to your problem is quite simple, even if not obvious. You declared all your variables in the beginning of the module. This means that they will retain their value for the whole run of the program, therefore, when you encrypt a new password the variable Result …
All 18 Replies
Comatose
290
Taboo Programmer
Team Colleague
laifa
0
Newbie Poster
Comatose
290
Taboo Programmer
Team Colleague
laifa
0
Newbie Poster
Yomet
1
Junior Poster
laifa
0
Newbie Poster
Comatose
290
Taboo Programmer
Team Colleague
Yomet
1
Junior Poster
Comatose
290
Taboo Programmer
Team Colleague
Yomet
1
Junior Poster
laifa
0
Newbie Poster
laifa
0
Newbie Poster
laifa
0
Newbie Poster
Yomet
1
Junior Poster
laifa
0
Newbie Poster
Yomet
1
Junior Poster
laifa
0
Newbie Poster
laifa
0
Newbie Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.