c# - MD5 Hash different on local machines -


i have md5 hash method so:

md5 md5 = system.security.cryptography.md5.create();         stringbuilder sb = new stringbuilder();         lock (md5)         {             byte[] inputbytes = system.text.encoding.ascii.getbytes(input);             byte[] hash = md5.computehash(inputbytes);              (int = 0; < hash.length; i++)             {                 sb.append(hash[i].tostring("x2").tostring(cultureinfo.invariantculture));             }         }         return sb.tostring(); 

on several local dev machines using same input, returns same hash. on staging , live servers too, returnging expected value.

however, on few local development machines values differ. , cannot figure out why?

i added lock , cultureinfo in response other answers on here.. alas. nothing.

any , appreciated in matter!

update:

i have gotten point compared inputbytes array on 'good' vs. 'bad' machine , arrays identical.

so what, if anything, computehash method doing differently between machines? feel isn't underlying issue.. @ point hash comes different. @ loss.

as said @bartdude input different on either machine due datetime variable pulling different system time formats.

hopefully helps in future.


Comments

Popular posts from this blog

jquery - How can I dynamically add a browser tab? -

node.js - Getting the socket id,user id pair of a logged in user(s) -

keyboard - C++ GetAsyncKeyState alternative -