diff options
author | Peter Dettman <peter.dettman@bouncycastle.org> | 2022-11-01 14:39:54 +0700 |
---|---|---|
committer | Peter Dettman <peter.dettman@bouncycastle.org> | 2022-11-01 14:39:54 +0700 |
commit | 716a491e3ed312da6c80a74e327d62dd4388b11e (patch) | |
tree | 0adabea28431857f372256233ddd4b2e0982190b /crypto/src/tls/CombinedHash.cs | |
parent | Package with LICENSE.md file (diff) | |
download | BouncyCastle.NET-ed25519-716a491e3ed312da6c80a74e327d62dd4388b11e.tar.xz |
More Span-based Stream methods
Diffstat (limited to 'crypto/src/tls/CombinedHash.cs')
-rw-r--r-- | crypto/src/tls/CombinedHash.cs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/crypto/src/tls/CombinedHash.cs b/crypto/src/tls/CombinedHash.cs index 71151d2a5..360b9d426 100644 --- a/crypto/src/tls/CombinedHash.cs +++ b/crypto/src/tls/CombinedHash.cs @@ -43,6 +43,14 @@ namespace Org.BouncyCastle.Tls m_sha1.Update(input, inOff, len); } +#if NETCOREAPP2_1_OR_GREATER || NETSTANDARD2_1_OR_GREATER + public void Update(ReadOnlySpan<byte> input) + { + m_md5.Update(input); + m_sha1.Update(input); + } +#endif + public virtual byte[] CalculateHash() { if (null != m_context && TlsUtilities.IsSsl(m_context)) |