SigningCredentials on .NET Core 1.0

我与影子孤独终老i 提交于 2020-02-07 05:30:07

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!