【发布时间】:2019-08-24 00:38:33
【问题描述】:
当我提交注册表时出现此错误:
System.ArgumentNullException: '字符串引用未设置为字符串的实例。 参数名称:s'
它来自散列密码类
public static class Crypto
{
public static string Hash(string value)
{
return Convert.ToBase64String(
SHA256.Create()
.ComputeHash(Encoding.UTF8.GetBytes(value)));
}
}
【问题讨论】:
-
value的值是多少?
标签: c# .net cryptography