internal static extern unsafe int DigestFinal(SafeDigestCtxHandle ctx, byte* pbOutput, int cbOutput);
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; }
internal static extern unsafe int DigestUpdate(SafeDigestCtxHandle ctx, byte* pbData, int cbData);