|
-
Apr 26th, 2005, 05:18 AM
#1
Thread Starter
New Member
Hashing a string value using SHA1 algorithm
Hi guys...
Very very urgent!!
I am trying to Hash the string 'Test' and then converting it to base64string, but some how I am having a doubt that if this is running correct.
Please copy the code below and run the code, tell me the return param or value of 'Output' variable. I have written down the result on my system kindly compare the same on ur system and update me if the result is the same or not. Kindly update me at the earliest
string Input;
string Output;
Input = "Test";
System.Security.Cryptography.SHA1 sha1 = System.Security.Cryptography.SHA1.Create();
byte[] hash = sha1.ComputeHash(System.Text.Encoding.UTF8.GetBytes(Input ));
Output = Convert.ToBase64String(hash);
MessageBox.Show(Output);
//Output: ZAqyuuB77cTBY/Z5p0b3q3+10fo=
Thankyou,
Praveen
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|