Click here to Skip to main content
15,913,685 members
Home / Discussions / C#
   

C#

 
GeneralRe: Using enumeration with a public variable Pin
Henry Minute6-Jan-09 1:21
Henry Minute6-Jan-09 1:21 
GeneralRe: Using enumeration with a public variable Pin
kanchoette6-Jan-09 1:31
kanchoette6-Jan-09 1:31 
GeneralRe: Using enumeration with a public variable Pin
Henry Minute6-Jan-09 1:36
Henry Minute6-Jan-09 1:36 
QuestionRetrieving Image from database... Pin
sandhya146-Jan-09 0:24
sandhya146-Jan-09 0:24 
QuestionHow to convert PPT files to JPEG files. Pin
NarVish6-Jan-09 0:10
NarVish6-Jan-09 0:10 
AnswerRe: How to convert PPT files to JPEG files. Pin
«_Superman_»6-Jan-09 0:21
professional«_Superman_»6-Jan-09 0:21 
QuestionMs access database Pin
raj2313625-Jan-09 23:52
raj2313625-Jan-09 23:52 
QuestionMD5 algorithm issue Pin
George_George5-Jan-09 23:10
George_George5-Jan-09 23:10 
Hello everyone,

I am using the following code to generate result of MD5 to a string, my question is how to convert it to an int? The string is 16 bytes, too big for an int. Smile | :)

My purpose is to get the hash code for an input string, but result in the form of an int.

string a = "Input String";

 MD5CryptoServiceProvider md5 = new MD5CryptoServiceProvider();
 System.Text.Encoding enc = System.Text.Encoding.UTF8;
 StringBuilder resultBuffer = new StringBuilder();
 byte[] result = md5.ComputeHash(UTF8Encoding.Default.GetBytes(a));
 for (int i = 0; i < result.Length; i++)
 {
     resultBuffer.Append(result[i].ToString("X"));
 }

 string resultStr = resultBuffer.ToString();


regards,
George
AnswerRe: MD5 algorithm issue Pin
Tom Deketelaere6-Jan-09 0:15
professionalTom Deketelaere6-Jan-09 0:15 
GeneralRe: MD5 algorithm issue Pin
George_George6-Jan-09 0:28
George_George6-Jan-09 0:28 
GeneralRe: MD5 algorithm issue Pin
Tom Deketelaere6-Jan-09 1:36
professionalTom Deketelaere6-Jan-09 1:36 
GeneralRe: MD5 algorithm issue Pin
George_George10-Jan-09 2:29
George_George10-Jan-09 2:29 
GeneralRe: MD5 algorithm issue Pin
Tom Deketelaere11-Jan-09 21:28
professionalTom Deketelaere11-Jan-09 21:28 
AnswerRe: MD5 algorithm issue Pin
Abhijit Jana6-Jan-09 1:28
professionalAbhijit Jana6-Jan-09 1:28 
GeneralRe: MD5 algorithm issue Pin
George_George10-Jan-09 2:23
George_George10-Jan-09 2:23 
AnswerRe: MD5 algorithm issue Pin
DaveyM696-Jan-09 10:55
professionalDaveyM696-Jan-09 10:55 
GeneralRe: MD5 algorithm issue Pin
George_George10-Jan-09 2:21
George_George10-Jan-09 2:21 
GeneralRe: MD5 algorithm issue Pin
DaveyM6910-Jan-09 8:36
professionalDaveyM6910-Jan-09 8:36 
AnswerRe: MD5 algorithm issue Pin
Jon Rista6-Jan-09 14:40
Jon Rista6-Jan-09 14:40 
GeneralRe: MD5 algorithm issue Pin
George_George10-Jan-09 2:25
George_George10-Jan-09 2:25 
GeneralRe: MD5 algorithm issue Pin
Jon Rista10-Jan-09 13:24
Jon Rista10-Jan-09 13:24 
AnswerRe: MD5 algorithm issue Pin
Hamid_RT15-Jan-09 2:24
Hamid_RT15-Jan-09 2:24 
QuestionSQL Merge Pin
ellllllllie5-Jan-09 23:03
ellllllllie5-Jan-09 23:03 
AnswerRe: SQL Merge Pin
Wendelius5-Jan-09 23:42
mentorWendelius5-Jan-09 23:42 
AnswerRe: SQL Merge Pin
SeMartens5-Jan-09 23:44
SeMartens5-Jan-09 23:44 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.