c# - SHA1 hash different in Vista and XP -


In a WinForm application using C # .NET 2.0 (on Vista), I am using SHA1 hash to create a hash with a string

and store hash in a text file (with UTF-8 encoding) I want to use the hash stored in a text file in a condition. When I run the project in Vista, it works properly (i.e. the condition results are true), but when I run on XP the project does not start.

Is the hash created from XP differently in Vista?

Remove the code

  byte [] hash value; Byte [] MessageBoights = Encoding. UTF8.GetBytes (strPlain); SHA1 Managed SHhash = New SHA1 Managed (); Stringbuilder strokes = new stringbilder (""); Hashvalu = Shush Compact hash (messageback); Foreign (hash value in byte b) {strHex.AppendFormat ("{0: x2}", b); } // UTF-8 encoding  

test condition

  string newHash = Program.GetHash ("This hash will be done."); // GetHash () has the same code as above but instead of having a hash in the file // hash bool valid hash = new hash instead. Ecloss (oldhash); // old is stored in that file {valid hash} {// some code}  

[edit]

< P> The main problem works well in the same code Vista, but breaks down in XP. If there is a logical problem, then he should not work in any OS.

Thanks

How are you passing binary between machines Are you When I was preparing a clickon package on my machine, once had to face a hash verification problem, when the binary was zipped with the maximum bilateral mode offering 7zip and on the other hand it was open with winzip Was there.


Comments

Popular posts from this blog

MySql variables and php -

url rewriting - How to implement the returnurl like SO in PHP? -

Which Python client library should I use for CouchdB? -