Click here to Skip to main content
15,923,083 members
Home / Discussions / C#
   

C#

 
GeneralRe: Soapsuds.exe and Remoting Pin
James T. Johnson4-Oct-03 8:10
James T. Johnson4-Oct-03 8:10 
GeneralRe: Soapsuds.exe and Remoting Pin
devvvy4-Oct-03 17:43
devvvy4-Oct-03 17:43 
GeneralPrinting picturebox Pin
Meysam Mahfouzi3-Oct-03 17:10
Meysam Mahfouzi3-Oct-03 17:10 
QuestionEquivilent to GetWindowPlacement? Pin
Joe Woodbury3-Oct-03 12:27
professionalJoe Woodbury3-Oct-03 12:27 
AnswerRe: Equivilent to GetWindowPlacement? Pin
Tomas Petricek3-Oct-03 14:36
Tomas Petricek3-Oct-03 14:36 
GeneralRe: Equivilent to GetWindowPlacement? Pin
Joe Woodbury3-Oct-03 15:21
professionalJoe Woodbury3-Oct-03 15:21 
GeneralStruct Question Pin
J. Dunlap3-Oct-03 12:04
J. Dunlap3-Oct-03 12:04 
GeneralRe: Struct Question Pin
James T. Johnson3-Oct-03 19:57
James T. Johnson3-Oct-03 19:57 
GeneralRe: Struct Question Pin
J. Dunlap3-Oct-03 21:24
J. Dunlap3-Oct-03 21:24 
GeneralDirect3D Fullscreen problem Pin
Mikkel Skovby3-Oct-03 10:41
Mikkel Skovby3-Oct-03 10:41 
GeneralCan't delete a registry value! Pin
Alvaro Mendez3-Oct-03 10:26
Alvaro Mendez3-Oct-03 10:26 
GeneralRe: Can't delete a registry value! Pin
Daniel Turini3-Oct-03 10:29
Daniel Turini3-Oct-03 10:29 
GeneralRe: Can't delete a registry value! Pin
Alvaro Mendez3-Oct-03 10:40
Alvaro Mendez3-Oct-03 10:40 
GeneralNow I can. Pin
Alvaro Mendez3-Oct-03 11:08
Alvaro Mendez3-Oct-03 11:08 
GeneralRe: Can't delete a registry value! Pin
Alex Korchemniy4-Oct-03 11:03
Alex Korchemniy4-Oct-03 11:03 
GeneralMD5 HashCode Pin
pahluwalia3-Oct-03 8:07
pahluwalia3-Oct-03 8:07 
Hi,

I am trying to get the Hash Code for a string through MD5 classes in C# but the value that it is printing is not the same as being given by another developer who has used md5 algorithm written in javascript.

Here's the code:
string str = val[1];
// First we need to convert the string into bytes, which means using a text encoder.
System.Text.Encoder enc = System.Text.Encoding.UTF8.GetEncoder();

// Create a buffer large enough to hold the string
byte[] unicodeText = new byte[str.Length * 2];
enc.GetBytes(str.ToCharArray(), 0, str.Length, unicodeText, 0, true);

//Now that we have a byte array we can ask the CSP to hash it
MD5 md5 = new MD5CryptoServiceProvider();
byte[] result = md5.ComputeHash(unicodeText);

//Build the final string by converting each byte into hex and appending it to a StringBuilder
System.Text.StringBuilder sb = new System.Text.StringBuilder();
for (int i=0;i
GeneralRe: MD5 HashCode Pin
Daniel M. Edwards3-Oct-03 9:50
Daniel M. Edwards3-Oct-03 9:50 
QuestionEvents not firing from collections? Pin
FruitBatInShades3-Oct-03 4:26
FruitBatInShades3-Oct-03 4:26 
GeneralByte Arrays Pin
MrEyes3-Oct-03 0:49
MrEyes3-Oct-03 0:49 
GeneralRe: Byte Arrays Pin
Mattias Olgerfelt3-Oct-03 1:04
Mattias Olgerfelt3-Oct-03 1:04 
GeneralRe: Byte Arrays Pin
MrEyes3-Oct-03 2:24
MrEyes3-Oct-03 2:24 
GeneralRe: Byte Arrays Pin
Daniel Turini3-Oct-03 5:45
Daniel Turini3-Oct-03 5:45 
GeneralAxBrowser/mshtml annoyances Pin
mephist2-Oct-03 16:07
mephist2-Oct-03 16:07 
GeneralCreating a virtual drive Pin
jij@esenet.dk2-Oct-03 10:32
jij@esenet.dk2-Oct-03 10:32 
GeneralRe: Creating a virtual drive Pin
Blake Coverett2-Oct-03 20:18
Blake Coverett2-Oct-03 20:18 

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.