wasSharpNET

Subversion Repositories:
Compare Path: Rev
With Path: Rev
?path1? @ 4  →  ?path2? @ 5
/Cryptography/SHA1.cs
@@ -5,6 +5,7 @@
///////////////////////////////////////////////////////////////////////////
 
using System;
using System.Text;
 
namespace wasSharpNET.Cryptography
{
@@ -18,5 +19,10 @@
{
return BitConverter.ToString(sha1.ComputeHash(data)).Replace("-", "");
}
 
public static string ToHex(this System.Security.Cryptography.SHA1 sha1, string data)
{
return BitConverter.ToString(sha1.ComputeHash(Encoding.UTF8.GetBytes(data))).Replace("-", "");
}
}
}