summary refs log tree commit diff
path: root/crypto/src/math/raw
diff options
context:
space:
mode:
authorPeter Dettman <peter.dettman@bouncycastle.org>2023-04-20 15:32:18 +0700
committerPeter Dettman <peter.dettman@bouncycastle.org>2023-04-20 15:32:18 +0700
commitcaa2a7dfcc4038b83d7ff19d90c491912827f448 (patch)
tree9ee395339edd6b0a8a51f14a1a25813ccb980080 /crypto/src/math/raw
parentRefactoring in BigInteger (diff)
downloadBouncyCastle.NET-ed25519-caa2a7dfcc4038b83d7ff19d90c491912827f448.tar.xz
BigInteger construction from little-endian
Diffstat (limited to 'crypto/src/math/raw')
-rw-r--r--crypto/src/math/raw/Nat.cs11
1 files changed, 3 insertions, 8 deletions
diff --git a/crypto/src/math/raw/Nat.cs b/crypto/src/math/raw/Nat.cs

index 61d060b4e..f4d91b180 100644 --- a/crypto/src/math/raw/Nat.cs +++ b/crypto/src/math/raw/Nat.cs
@@ -2747,14 +2747,9 @@ namespace Org.BouncyCastle.Math.Raw ? stackalloc byte[bsLen] : new byte[bsLen]; - int xPos = len; - Span<byte> t = bs; - while (--xPos >= 0) - { - Pack.UInt32_To_BE(x[xPos], t); - t = t[4..]; - } - return new BigInteger(1, bs); + Pack.UInt32_To_LE(x, bs); + + return new BigInteger(1, bs, bigEndian: false); } #endif