SHA1Managed.Initialize()
实际上做了什么?什么时候打电话呢? The documentation非常稀疏。
答案 0 :(得分:0)
来自CoreCLR:
[System.Security.SecuritySafeCritical] // auto-generated
public override void Initialize() {
if (_safeHashHandle != null && !_safeHashHandle.IsClosed)
_safeHashHandle.Dispose();
// _CreateHash will check for failures and throw the appropriate exception
_safeHashHandle = Utils.CreateHash(Utils.StaticProvHandle, Constants.CALG_SHA1);
}
它看起来被称为HashAlgorihthm方法的标准实现的一部分,并且看起来在正常使用期间不需要直接调用它。