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;
- }
}
}
|