示例#1
0
 /// <summary>
 /// 將串流使用指定的雜湊演算法轉換為雜湊
 /// </summary>
 /// <typeparam name="Algorithm">雜湊演算法型別</typeparam>
 /// <param name="stream">串流實例</param>
 /// <returns>雜湊Binary</returns>
 public static byte[] ToHash <Algorithm>(this Stream stream) where Algorithm : HashAlgorithm
 {
     return(HashHelper.ToHash <Algorithm>(stream));
 }
示例#2
0
 /// <summary>
 /// 將字串使用指定的雜湊演算法轉換為雜湊
 /// </summary>
 /// <typeparam name="Algorithm">雜湊演算法型別</typeparam>
 /// <param name="str">值</param>
 /// <returns>雜湊Binary</returns>
 public static byte[] ToHash <Algorithm>(this string str) where Algorithm : HashAlgorithm
 {
     return(HashHelper.ToHash <Algorithm>(str));
 }