summary refs log tree commit diff
path: root/crypto/src/pqc
diff options
context:
space:
mode:
authorPeter Dettman <peter.dettman@bouncycastle.org>2022-08-23 14:08:56 +0700
committerPeter Dettman <peter.dettman@bouncycastle.org>2022-08-23 14:08:56 +0700
commit5bae538777cfabc024f318c9d192a062d68d98b3 (patch)
treeda3da3f8c2ed19179f814cdd7716e214464ee141 /crypto/src/pqc
parentFix namespaces, refactoring (diff)
downloadBouncyCastle.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.cs14
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
+}