diff options
author | Peter Dettman <peter.dettman@bouncycastle.org> | 2022-08-23 14:08:56 +0700 |
---|---|---|
committer | Peter Dettman <peter.dettman@bouncycastle.org> | 2022-08-23 14:08:56 +0700 |
commit | 5bae538777cfabc024f318c9d192a062d68d98b3 (patch) | |
tree | da3da3f8c2ed19179f814cdd7716e214464ee141 /crypto/src/pqc | |
parent | Fix namespaces, refactoring (diff) | |
download | BouncyCastle.NET-ed25519-5bae538777cfabc024f318c9d192a062d68d98b3.tar.xz |
Span-based variants for IDigest, IXof
Diffstat (limited to 'crypto/src/pqc')
-rw-r--r-- | crypto/src/pqc/crypto/lms/LMSContext.cs | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/crypto/src/pqc/crypto/lms/LMSContext.cs b/crypto/src/pqc/crypto/lms/LMSContext.cs index 35c33093b..2113184fe 100644 --- a/crypto/src/pqc/crypto/lms/LMSContext.cs +++ b/crypto/src/pqc/crypto/lms/LMSContext.cs @@ -124,5 +124,17 @@ namespace Org.BouncyCastle.Pqc.Crypto.Lms { digest.Reset(); } + +#if NETCOREAPP2_1_OR_GREATER || NETSTANDARD2_1_OR_GREATER + public void BlockUpdate(ReadOnlySpan<byte> input) + { + digest.BlockUpdate(input); + } + + public int DoFinal(Span<byte> output) + { + return digest.DoFinal(output); + } +#endif } -} \ No newline at end of file +} |