1
Answer

how do you decode?

cakewalkr7

cakewalkr7

21y
2k
1
I have found many examples of how to encode a string with different hash algorithms... but I can't find anything on getting the original string out once I've encoded it. Here's the code I've got so far. private string CreateHashValue(string val) { UnicodeEncoding ue = new UnicodeEncoding(); byte[] valBytes = ue.GetBytes(val); MD5 m = new MD5CryptoServiceProvider(); m.Initialize(); byte[] bytes = m.ComputeHash(valBytes); m = null; return ue.GetString(bytes); } I'd like to create another method like DecodeHashValue that returns the original string. Can anyone explain how I could do this? Thanks.
Answers (1)