Click here to Skip to main content
16,012,316 members
Home / Discussions / C#
   

C#

 
GeneralRe: deserializing in c#.net Pin
Heath Stewart22-Jun-04 4:07
protectorHeath Stewart22-Jun-04 4:07 
GeneralRe: deserializing in c#.net Pin
fatidarya22-Jun-04 19:12
fatidarya22-Jun-04 19:12 
GeneralRe: deserializing in c#.net Pin
Heath Stewart22-Jun-04 19:19
protectorHeath Stewart22-Jun-04 19:19 
GeneralRe: serializing in c#.net Pin
Stefan Troschuetz21-Jun-04 20:44
Stefan Troschuetz21-Jun-04 20:44 
GeneralJava script in c# Pin
_Searcher_21-Jun-04 5:53
_Searcher_21-Jun-04 5:53 
GeneralRe: Java script in c# Pin
Dave Kreskowiak21-Jun-04 6:10
mveDave Kreskowiak21-Jun-04 6:10 
GeneralAttempting to implement Keyed MD-5 Hash Pin
selil21-Jun-04 5:29
selil21-Jun-04 5:29 
GeneralRe: Attempting to implement Keyed MD-5 Hash Pin
Heath Stewart21-Jun-04 5:42
protectorHeath Stewart21-Jun-04 5:42 
The bug is in your code. If MD5 didn't work once, it wouldn't work for any plain text.

Use Console.Write("{0:X2}", arr[i]) instead of just using "{0:X}" for the format specifier. This makes sure that 2 chars are used per bit.

Also, it's faster to use arr[i].ToString("X2") in this case, and this is typically true when you need to format only one value. Why? Because using Console.Write (or any of the formatting methods) instantiates a StringBuilder and does some having parsing to eventually call Byte.ToString(string, IFormatProvider), which you could just do directly here (though you don't need to pass an IFormatProvider in this case).

It's best you don't claim bugs, especially when you've only been programming C# for 1 week. Check out the documentation, search the 'net for similar findings, and ask someone to verify (like on this forum), then declare you've found a bug and report it to the proper channels.

 

Microsoft MVP, Visual C#
My Articles
GeneralRe: Attempting to implement Keyed MD-5 Hash Pin
selil21-Jun-04 6:00
selil21-Jun-04 6:00 
GeneralRe: Attempting to implement Keyed MD-5 Hash Pin
Heath Stewart21-Jun-04 6:34
protectorHeath Stewart21-Jun-04 6:34 
GeneralRe: Attempting to implement Keyed MD-5 Hash Pin
Dave Kreskowiak21-Jun-04 5:52
mveDave Kreskowiak21-Jun-04 5:52 
GeneralRe: Attempting to implement Keyed MD-5 Hash Pin
selil21-Jun-04 6:10
selil21-Jun-04 6:10 
QuestionHow to use proertyGrid to show html componet's property? Pin
nakey_yang21-Jun-04 5:28
nakey_yang21-Jun-04 5:28 
AnswerRe: How to use proertyGrid to show html componet's property? Pin
Heath Stewart21-Jun-04 5:35
protectorHeath Stewart21-Jun-04 5:35 
Generalusing xmodem protocol for file transfer in dotnet(c#) Pin
son_sant21-Jun-04 5:20
son_sant21-Jun-04 5:20 
GeneralRe: using xmodem protocol for file transfer in dotnet(c#) Pin
Heath Stewart21-Jun-04 5:33
protectorHeath Stewart21-Jun-04 5:33 
QuestionExplorer DragImage? Pin
TylerBrinks21-Jun-04 4:47
TylerBrinks21-Jun-04 4:47 
AnswerRe: Explorer DragImage? Pin
Heath Stewart21-Jun-04 5:05
protectorHeath Stewart21-Jun-04 5:05 
GeneralRe: Explorer DragImage? Pin
TylerBrinks21-Jun-04 11:35
TylerBrinks21-Jun-04 11:35 
GeneralRe: Explorer DragImage? Pin
Heath Stewart21-Jun-04 11:42
protectorHeath Stewart21-Jun-04 11:42 
GeneralRe: Explorer DragImage? Pin
TylerBrinks21-Jun-04 11:52
TylerBrinks21-Jun-04 11:52 
GeneralRe: Explorer DragImage? Pin
Heath Stewart21-Jun-04 11:58
protectorHeath Stewart21-Jun-04 11:58 
GeneralRe: Explorer DragImage? Pin
TylerBrinks22-Jun-04 5:32
TylerBrinks22-Jun-04 5:32 
GeneralRe: Explorer DragImage? Pin
Heath Stewart22-Jun-04 5:43
protectorHeath Stewart22-Jun-04 5:43 
GeneralRe: Explorer DragImage? Pin
TylerBrinks22-Jun-04 6:10
TylerBrinks22-Jun-04 6:10 

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.