diff options
-rw-r--r-- | crypto/src/crypto/modes/OCBBlockCipher.cs | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/crypto/src/crypto/modes/OCBBlockCipher.cs b/crypto/src/crypto/modes/OCBBlockCipher.cs index 604a7d205..a7facaa04 100644 --- a/crypto/src/crypto/modes/OCBBlockCipher.cs +++ b/crypto/src/crypto/modes/OCBBlockCipher.cs @@ -732,19 +732,7 @@ namespace Org.BouncyCastle.Crypto.Modes protected static int OCB_ntz(long x) { - if (x == 0) - { - return 64; - } - - int n = 0; - ulong ux = (ulong)x; - while ((ux & 1UL) == 0UL) - { - ++n; - ux >>= 1; - } - return n; + return Longs.NumberOfTrailingZeros(x); } protected static int ShiftLeft(byte[] block, byte[] output) |