public override void Dispose(bool disposing) { if (disposing) { _ctx?.Dispose(); } }
internal AppleDigestProvider(Interop.AppleCrypto.PAL_HashAlgorithm algorithm) { int hashSizeInBytes; _ctx = Interop.AppleCrypto.DigestCreate(algorithm, out hashSizeInBytes); if (hashSizeInBytes < 0) { _ctx.Dispose(); throw new PlatformNotSupportedException( SR.Format( SR.Cryptography_UnknownHashAlgorithm, Enum.GetName(typeof(Interop.AppleCrypto.PAL_HashAlgorithm), algorithm))); } if (_ctx.IsInvalid) { _ctx.Dispose(); throw new CryptographicException(); } HashSizeInBytes = hashSizeInBytes; }
public void Dispose() { _ctx.Dispose(); }