1 files changed, 21 insertions, 0 deletions
diff --git a/crypto/src/crypto/BufferedAeadCipher.cs b/crypto/src/crypto/BufferedAeadCipher.cs
index c689c1eab..aba64f0f4 100644
--- a/crypto/src/crypto/BufferedAeadCipher.cs
+++ b/crypto/src/crypto/BufferedAeadCipher.cs
@@ -171,6 +171,13 @@ namespace Org.BouncyCastle.Crypto
return cipher.ProcessBytes(input, inOff, length, output, outOff);
}
+#if NETCOREAPP2_1_OR_GREATER || NETSTANDARD2_1_OR_GREATER
+ public override int ProcessBytes(ReadOnlySpan<byte> input, Span<byte> output)
+ {
+ return cipher.ProcessBytes(input, output);
+ }
+#endif
+
public override byte[] DoFinal()
{
byte[] outBytes = new byte[GetOutputSize(0)];
@@ -234,6 +241,20 @@ namespace Org.BouncyCastle.Crypto
return cipher.DoFinal(output, outOff);
}
+#if NETCOREAPP2_1_OR_GREATER || NETSTANDARD2_1_OR_GREATER
+ public override int DoFinal(Span<byte> output)
+ {
+ return cipher.DoFinal(output);
+ }
+
+ public override int DoFinal(ReadOnlySpan<byte> input, Span<byte> output)
+ {
+ int len = cipher.ProcessBytes(input, output);
+ len += cipher.DoFinal(output[len..]);
+ return len;
+ }
+#endif
+
/**
* Reset the buffer and cipher. After resetting the object is in the same
* state as it was after the last init (if there was one).
|