问题
SigningCredentials on .NET Core is different from .NET 4.0
回答1:
The equivalent code in .NET Core would be:
var key = Encoding.UTF8.GetBytes(accessKey);
var signingKey = new SymmetricSecurityKey(key);
var signingCredentials = new SigningCredentials(signingKey, SecurityAlgorithms.HmacSha256);
The class names have changed a little, but everything should work the same. Make sure you are using the latest package versions.
来源:https://stackoverflow.com/questions/38089523/signingcredentials-on-net-core-1-0