wasSharpNET – Blame information for rev 2

Subversion Repositories:
Rev:
Rev Author Line No. Line
2 office 1 ///////////////////////////////////////////////////////////////////////////
2 // Copyright (C) Wizardry and Steamworks 2016 - License: GNU GPLv3 //
3 // Please see: http://www.gnu.org/licenses/gpl.html for legal details, //
4 // rights of fair usage, the disclaimer and warranty conditions. //
5 ///////////////////////////////////////////////////////////////////////////
6  
7 using System;
8  
9 namespace wasSharpNET.Cryptography
10 {
11 public static class SHA1
12 {
13 /// <summary>
14 /// Return a 40 character hex representation of a SHA1 hash.
15 /// </summary>
16 /// <param name="sha1">the SHA1 hash object</param>
17 public static string ToHex(this System.Security.Cryptography.SHA1 sha1, byte[] data)
18 {
19 return BitConverter.ToString(sha1.ComputeHash(data)).Replace("-", "");
20 }
21 }
22 }