summary refs log tree commit diff
path: root/crypto/src/pqc
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/src/pqc')
-rw-r--r--crypto/src/pqc/crypto/hqc/GF2PolynomialCalculator.cs2
1 files changed, 1 insertions, 1 deletions
diff --git a/crypto/src/pqc/crypto/hqc/GF2PolynomialCalculator.cs b/crypto/src/pqc/crypto/hqc/GF2PolynomialCalculator.cs
index 8a460932e..0c01ade96 100644
--- a/crypto/src/pqc/crypto/hqc/GF2PolynomialCalculator.cs
+++ b/crypto/src/pqc/crypto/hqc/GF2PolynomialCalculator.cs
@@ -79,7 +79,7 @@ namespace Org.BouncyCastle.Pqc.Crypto.Hqc
             }
 
 #if NETCOREAPP2_1_OR_GREATER || NETSTANDARD2_1_OR_GREATER
-            Span<byte> resBytes = MemoryMarshal.Cast<ulong, byte>(res);
+            Span<byte> resBytes = MemoryMarshal.AsBytes(res.AsSpan());
             for (int i = 0; i < weight; i++)
             {
                 int dec = a[permutedSparseVect[i]] & 0xf;