public static string GeneratorKey() { return(HMAC.GeneratorKey("HMAC-MD5")); }
/// <summary> /// 生成签名 /// </summary> public static byte[] GeneratorKey() { return(HMAC.GeneratorKey(Algorithms.HMacSHA256)); }
public static string GeneratorKey() { return(HMAC.GeneratorKey("HMac/SHA1")); }
/// <summary> /// 哈希计算(使用BouncyCastle) /// </summary> public static byte[] Compute(string data, byte[] key) { return(HMAC.Compute(data, key, Algorithms.HMacMD5)); //or //return HMAC.Compute(data, key, new MD5Digest()); }