diff options
author | Peter Dettman <peter.dettman@bouncycastle.org> | 2023-04-20 15:32:18 +0700 |
---|---|---|
committer | Peter Dettman <peter.dettman@bouncycastle.org> | 2023-04-20 15:32:18 +0700 |
commit | caa2a7dfcc4038b83d7ff19d90c491912827f448 (patch) | |
tree | 9ee395339edd6b0a8a51f14a1a25813ccb980080 /crypto/src/security/PublicKeyFactory.cs | |
parent | Refactoring in BigInteger (diff) | |
download | BouncyCastle.NET-ed25519-caa2a7dfcc4038b83d7ff19d90c491912827f448.tar.xz |
BigInteger construction from little-endian
Diffstat (limited to 'crypto/src/security/PublicKeyFactory.cs')
-rw-r--r-- | crypto/src/security/PublicKeyFactory.cs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/crypto/src/security/PublicKeyFactory.cs b/crypto/src/security/PublicKeyFactory.cs index 03cabbb13..d3ecef5c7 100644 --- a/crypto/src/security/PublicKeyFactory.cs +++ b/crypto/src/security/PublicKeyFactory.cs @@ -203,9 +203,9 @@ namespace Org.BouncyCastle.Security throw new ArgumentException("error recovering GOST3410_94 public key", e); } - byte[] keyBytes = Arrays.Reverse(key.GetOctets()); // was little endian + byte[] keyBytes = key.GetOctets(); - BigInteger y = new BigInteger(1, keyBytes); + BigInteger y = new BigInteger(1, keyBytes, bigEndian: false); return new Gost3410PublicKeyParameters(y, algParams.PublicKeyParamSet); } |