コード例 #1
0
        protected override bool TryHashData(ReadOnlySpan <byte> source, Span <byte> destination, HashAlgorithmName hashAlgorithm, out int bytesWritten)
        {
            if (hashAlgorithm != HashAlgorithmName.SHA1)
            {
                throw new CryptographicException(SR.Cryptography_UnknownHashAlgorithm, hashAlgorithm.Name);
            }

            return(AsymmetricAlgorithmHelpers.TryHashData(source, destination, hashAlgorithm, out bytesWritten));
        }
コード例 #2
0
ファイル: DSAOpenSsl.cs プロジェクト: wilfriedb/runtime
 protected override bool TryHashData(ReadOnlySpan <byte> data, Span <byte> destination, HashAlgorithmName hashAlgorithm, out int bytesWritten) =>
 AsymmetricAlgorithmHelpers.TryHashData(data, destination, hashAlgorithm, out bytesWritten);