diff options
author | Peter Dettman <peter.dettman@bouncycastle.org> | 2022-07-19 00:42:58 +0700 |
---|---|---|
committer | Peter Dettman <peter.dettman@bouncycastle.org> | 2022-07-19 00:42:58 +0700 |
commit | b966a4c7e871e8a1bdf50c29626ce40450c3db0c (patch) | |
tree | ec7ebe55384a5f92233977dc01e0c541a04af581 /crypto/src/asn1/DerBitString.cs | |
parent | Factor out Unshuffle methods (diff) | |
download | BouncyCastle.NET-ed25519-b966a4c7e871e8a1bdf50c29626ce40450c3db0c.tar.xz |
Use intrinsics in several places
Diffstat (limited to 'crypto/src/asn1/DerBitString.cs')
-rw-r--r-- | crypto/src/asn1/DerBitString.cs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/crypto/src/asn1/DerBitString.cs b/crypto/src/asn1/DerBitString.cs index 2b1ff3354..8aab88353 100644 --- a/crypto/src/asn1/DerBitString.cs +++ b/crypto/src/asn1/DerBitString.cs @@ -125,7 +125,7 @@ namespace Org.BouncyCastle.Asn1 return; } - int bits = BigInteger.BitLen(namedBits); + int bits = 32 - Integers.NumberOfLeadingZeros(namedBits); int bytes = (bits + 7) / 8; Debug.Assert(0 < bytes && bytes <= 4); |