I am looking codes for encrypting the password field in my database. I am using SQL Yog in creating the database.
This is what i did..
1. I already type my password in the db.
2. Now in my log in form submit button
I use this code in so that as i click the button it will encrypt the password field::
this is my code::
I import..........
Imports System.Security.Cryptography
Imports System.Text
then in my code ...
Dim strText As String = TextBox1.Text
Dim bytHashedData As Byte()
Dim encoder As New utf8encoding()
Dim md5Hasher As New MD5CryptoServiceProvider
bytHashedData = md5Hasher.ComputeHash(encoder.GetBytes(strText))
bytHashedData = md5Hasher.ComputeHash(encoder.GetBytes(strText & txtUserName.Text))...
I got this in a tutorial of dreamincode.com.
but I don't know how to make it work..
it makes no effect in my database.
what i did to make it wrong.
no errors displays it runs properly but takes no effect..
Data Encryption Error
Page 1 of 11 Replies - 178 Views - Last Post: 23 August 2012 - 07:59 AM
Replies To: Data Encryption Error
#2
Re: Data Encryption Error
Posted 23 August 2012 - 07:59 AM
Look at your second ComputeHash - your using the username and you just overwrote the variable from the previous line??? PLease use code tags. We also can't see where your saving the data either.
Here is my encryption that looks like what your using. I would use the CipherMode.CBC on both encryption and decryption.
Here is my encryption that looks like what your using. I would use the CipherMode.CBC on both encryption and decryption.
This post has been edited by _HAWK_: 23 August 2012 - 10:30 AM
Page 1 of 1
|
|

New Topic/Question
Reply



MultiQuote




|