Пример #1
0
 /// <summary>
 /// Calculate a SHA1 hash from a string
 /// </summary>
 /// <param name="stringToConvert">The string to calculate</param>
 /// <returns></returns>
 public static SHA1Hash SHA1(this String stringToConvert)
 {
     return(SHA1Hash.FromMemory(stringToConvert.ToByteArray()));
 }
Пример #2
0
 /// <summary>
 /// Calculate an SHA1 hash from a byte array
 /// </summary>
 /// <param name="b">Byte array to calculate</param>
 /// <returns></returns>
 public static SHA1Hash SHA1(this byte[] b)
 {
     return(SHA1Hash.FromMemory(b));
 }