summary refs log tree commit diff
path: root/crypto/src/math/raw
diff options
context:
space:
mode:
authorPeter Dettman <peter.dettman@bouncycastle.org>2020-07-30 15:33:18 +0700
committerPeter Dettman <peter.dettman@bouncycastle.org>2020-07-30 15:33:18 +0700
commit5e0b449eae68f6adf1f988f9601a299f3aa6c468 (patch)
treecc622c2de05cd5bd27f1044b6bb614c520d2cd7e /crypto/src/math/raw
parentEdDSA updates (diff)
downloadBouncyCastle.NET-ed25519-5e0b449eae68f6adf1f988f9601a299f3aa6c468.tar.xz
Misc. updates from bc-java
Diffstat (limited to 'crypto/src/math/raw')
-rw-r--r--crypto/src/math/raw/Mod.cs14
1 files changed, 1 insertions, 13 deletions
diff --git a/crypto/src/math/raw/Mod.cs b/crypto/src/math/raw/Mod.cs

index 8d9e8fd21..197b5c82b 100644 --- a/crypto/src/math/raw/Mod.cs +++ b/crypto/src/math/raw/Mod.cs
@@ -144,7 +144,7 @@ namespace Org.BouncyCastle.Math.Raw } { - int zeroes = GetTrailingZeroes(u[0]); + int zeroes = Integers.NumberOfTrailingZeros((int)u[0]); if (zeroes > 0) { Nat.ShiftDownBits(uLen, u, zeroes, 0); @@ -170,17 +170,5 @@ namespace Org.BouncyCastle.Math.Raw Nat.ShiftDownBit(len, x, (uint)xc); } } - - private static int GetTrailingZeroes(uint x) - { - Debug.Assert(x != 0); - int count = 0; - while ((x & 1) == 0) - { - x >>= 1; - ++count; - } - return count; - } } }