新手在这里,
我试图测试一些我编写的代码,并且我得到了一个No重载方法'ComputeHash'需要2个参数错误。谁能告诉我这段代码的问题是什么?
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text.RegularExpressions;
using System.Security.Cryptography;
namespace Test
{
public class MyHmac
{
public static void Main(string[] args)
{
var ImageBase64 = "123xxx=";
var phoneApiSecret = "8da6be19-89fc-41a4-b449-62d2c0353be8";
var Artifact = "08 239 14 05:40:51";
var ClsDisclosureId = "123xxx";
var UserId = "testmw";
string x1 = HMAC.ComputeHash(phoneApiSecret,ImageBase);
string x2 = HMACSHA1.ComputeHash(x1, Artifact);
string calculatedHmac = HMACSHA1.ComputeHash(UserId, ClsDisclosureId + UserId);
Console.WriteLine(calculatedHmac);
//return Convert.ToBase64String(hashmessage);
//Your code goes here
}
}
}