I'd like to be able to generate a simple hash value (on an ordered set of strings, so I'm fine if it's just a hash of the concatenation of the strings) on the client side in Javascript, and generate an identical hash value on the same strings on the server side in C# for an exact comparison. The security is not overwhelmingly critical, so I don't know if it needs to be a fullblown encryption protocol (although if that's the easiest path, I'm open to it). Any suggestions would be appreciated. Thanks!
2 Answers
If you are after an identical hashing function, why not implement something well-documented, such as this in both javascript and C#, thereby guaranteeing you are hashing the same way on both the client and the server?
Murmur hash is a fast algorithm (albeit not for crypto applications).