public HashAlgGost2001Win() { this.HashSizeValue = Gost3411Consts.HashSizeValue; SafeHashHandleCP invalidHandle = SafeHashHandleCP.InvalidHandle; Win32ExtUtil.CreateHash(Win32ExtUtil.StaticGost2001ProvHandle, Gost3411Consts.HashAlgId, ref invalidHandle); this.safeHashHandle = invalidHandle; }
public override void Initialize() { if (this.safeHashHandle != null && !this.safeHashHandle.IsClosed) { this.safeHashHandle.Dispose(); } SafeHashHandleCP invalidHandle = SafeHashHandleCP.InvalidHandle; Win32ExtUtil.CreateHash(Win32ExtUtil.StaticGost2001ProvHandle, Gost3411Consts.HashAlgId, ref invalidHandle); this.safeHashHandle = invalidHandle; }