require 'digest/sha1' sha1 = Digest::SHA1.hexdigest('passwordHerePlease')Easier than opening Visual Studio, creating a project, inserting this in some function, importing the namespace System.Security.Cryptography, compiling, and running... :)
SHA1CryptoServiceProvider cryptoTransformSHA1 = new SHA1CryptoServiceProvider(); string hash = BitConverter.ToString( cryptoTransformSHA1.ComputeHash(buffer)).Replace("-", "");
P.S. I was wondering how to turn the bytes into a Sha1 like what Ruby outputs. The code above for C# was from here
No comments:
Post a Comment