Last post Feb 29, 2012 05:39 PM by MARUTIpatel960143
Jun 27, 2006 08:23 AM|goh6613|LINK
i have a problem here.......i am using vb.net and i want to encrypt my password by using MD5 hash , and then store it in database.........but i have no idea regarding MD5 hash.....
so can anyone tell me how can i encrypt it using MD5 hash.
Jun 27, 2006 09:47 AM|goh6613|LINK
and another problem is i also want to encode the encrypted string to hex.
So does anyone can help me regarding this problem ?
Jun 27, 2006 02:02 PM|mjhoagland|LINK
Well, I don't know what .Net version of the framework you're using but here's a quickie in 1.1
Dim security As Web.Security.FormsAuthentication
You can replace "password" with a variable or whatever text you want to encrypt. You can also changed "md5" to "sha1" for an alternative encryption.
Hope this helps!
Jun 28, 2006 02:31 AM|zhuhua1006|LINK
You can use MD5 class
Jun 28, 2006 10:41 AM|goh6613|LINK
thanks for ur replies ......
ur solution really helped me a lot.........but i still stuck with the problem.....
i want to generate an encrypted password, first two random characters (the 'salt' - in the range a..z, A..Z) are added to the beginning of the clear-text password. This is then hashed using MD5 and the resulting hash is hex-encoded. The result of this is
written as plain-text starting with the 2 salt characters followed by the hex-encoded hash.
the example of the encrypted and hex-encoded password is
where cb is the salt.......and others is the MD5 hashed data.....
i tried to encrypt my password using md5 hash , encode it to hex and generate 2 random characters in front of this encrypted data....but this does not seem to work for me.....
so anyone who know the solution, please kindly post here.
Jun 29, 2006 06:58 AM|goh6613|LINK
i am now able to encrypt my password using md5 hash method and also encode it to hex.......
but i am still pending with how to randomly generate salt characters (the 'salt' - in the range a..z, A..Z),
does anyone have an idea in solving this problem....
Apr 29, 2009 07:28 AM|Deeno20|LINK
hi hope this will help u
go through this artical
Mar 26, 2010 05:21 PM|ashish-1983|LINK
why to go for MD5
why dont you try something more concerete and killer option
protected string MySHA512( )
SHA512 sha512 = new System.Security.Cryptography.SHA512Managed();
byte sha512Bytes = System.Text.Encoding.Default.GetBytes("PasswordToBeEncrypted");
byte cryString = sha512.ComputeHash(sha512Bytes);
string sha512Str = string.Empty;
for (int i = 0; i < cryString.Length; i++)
sha512Str += cryString[i].ToString("X");
No one dares to crack this one..
Feb 29, 2012 05:39 PM|MARUTIpatel960143|LINK
encrypt my password using md5 hash method and also encode it to hex
Please give me the code.
i have a project in security reasion.
please help me....