summary refs log tree commit diff
diff options
context:
space:
mode:
authorPeter Dettman <peter.dettman@bouncycastle.org>2022-08-05 11:50:44 +0700
committerPeter Dettman <peter.dettman@bouncycastle.org>2022-08-05 11:50:44 +0700
commite83da5b4289390bbf559b57078c0cccac941a8e2 (patch)
tree3a51576d18754764f5574fac08c960e8b57cd4b3
parentPerf. opts. in custom binary curves (diff)
downloadBouncyCastle.NET-ed25519-e83da5b4289390bbf559b57078c0cccac941a8e2.tar.xz
Remove unnecessary AsSpan
-rw-r--r--crypto/src/crmf/PKMacBuilder.cs2
-rw-r--r--crypto/src/crypto/SimpleBlockResult.cs2
-rw-r--r--crypto/src/crypto/operators/DefaultSignatureResult.cs2
3 files changed, 3 insertions, 3 deletions
diff --git a/crypto/src/crmf/PKMacBuilder.cs b/crypto/src/crmf/PKMacBuilder.cs
index 8093eab44..9b483fbfb 100644
--- a/crypto/src/crmf/PKMacBuilder.cs
+++ b/crypto/src/crmf/PKMacBuilder.cs
@@ -88,7 +88,7 @@ namespace Org.BouncyCastle.Crmf
         public int Collect(Span<byte> destination)
         {
             byte[] result = Collect();
-            result.AsSpan().CopyTo(destination);
+            result.CopyTo(destination);
             return result.Length;
         }
 #endif
diff --git a/crypto/src/crypto/SimpleBlockResult.cs b/crypto/src/crypto/SimpleBlockResult.cs
index a653b0a91..35432c2b3 100644
--- a/crypto/src/crypto/SimpleBlockResult.cs
+++ b/crypto/src/crypto/SimpleBlockResult.cs
@@ -53,7 +53,7 @@ namespace Org.BouncyCastle.Crypto
 #if NETCOREAPP2_1_OR_GREATER || NETSTANDARD2_1_OR_GREATER
         public int Collect(Span<byte> destination)
         {
-            result.AsSpan().CopyTo(destination);
+            result.CopyTo(destination);
 
             return result.Length;
         }
diff --git a/crypto/src/crypto/operators/DefaultSignatureResult.cs b/crypto/src/crypto/operators/DefaultSignatureResult.cs
index fe47d792b..a236838d6 100644
--- a/crypto/src/crypto/operators/DefaultSignatureResult.cs
+++ b/crypto/src/crypto/operators/DefaultSignatureResult.cs
@@ -28,7 +28,7 @@ namespace Org.BouncyCastle.Crypto.Operators
         public int Collect(Span<byte> destination)
         {
             byte[] result = Collect();
-            result.AsSpan().CopyTo(destination);
+            result.CopyTo(destination);
             return result.Length;
         }
 #endif