wasSharpNET

Subversion Repositories:
Compare Path: Rev
With Path: Rev
?path1? @ 12  →  ?path2? @ 13
/Cryptography/SHA1.cs
@@ -17,16 +17,32 @@
/// Return a 40 character hex representation of a SHA1 hash.
/// </summary>
/// <param name="sha1">the SHA1 hash object</param>
/// <param name="data">the byte data to compute the hash from</param>
public static string ToHex(this System.Security.Cryptography.SHA1 sha1, byte[] data)
{
return BitConverter.ToString(sha1.ComputeHash(data)).Replace("-", "");
}
 
/// <summary>
/// Return a 40 character hex representation of a SHA1 hash.
/// </summary>
/// <param name="sha1">the SHA1 hash object</param>
/// <param name="data">the string data to compute the hash from</param>
public static string ToHex(this System.Security.Cryptography.SHA1 sha1, string data)
{
return BitConverter.ToString(sha1.ComputeHash(Encoding.UTF8.GetBytes(data))).Replace("-", "");
}
 
/// <summary>
/// Return a 40 character hex representation of a SHA1 hash.
/// </summary>
/// <param name="sha1">the SHA1 hash object</param>
/// <param name="data">the memorystream to compute the hash from</param>
public static string ToHex(this System.Security.Cryptography.SHA1 sha1, MemoryStream data)
{
return BitConverter.ToString(sha1.ComputeHash(data)).Replace("-", "");
}
 
///////////////////////////////////////////////////////////////////////////
// Copyright (C) Wizardry and Steamworks 2014 - License: GNU GPLv3 //
///////////////////////////////////////////////////////////////////////////
/Properties/AssemblyInfo.cs
@@ -37,4 +37,4 @@
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
 
[assembly: AssemblyVersion("1.8.*")]
[assembly: AssemblyVersion("1.9.*")]