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