- Home /
using System.Security.Cryptography;
Hi there,
I try to use this namespace System.Security.Cryptography. It should be in Mono as well as in .NET
All I do is hash a Password with a Salt. using the following class: MD5CryptoServiceProvider
When I test it in Unity it works, but when I build it it doesn't work.
How would I best hash a password with unity?
Answer by DaveA · May 12, 2011 at 07:23 AM
I've used the MD5 class without problem
Right, according to the mono compatibility page, it should be available in Unity (even on all platforms). http://unity3d.com/support/documentation/ScriptReference/$$anonymous$$onoCompatibility.html
Thank you the problem was somewhere else! I used: System.Text.Encoding.Default.GetString(Hash); Somehow this Encoding wasn't the same in LinqPad and in Unity. I set it to: System.Text.Encoding.ASCII.GetString(Hash); and now it works fine