From 5e4ffd78e073bf15b255c1465fa211a13105b65c Mon Sep 17 00:00:00 2001 From: Peter Dettman Date: Fri, 11 Sep 2020 11:54:39 +0700 Subject: Fixed loop count for BigInteger conversion - remove length-specific variants of FromBigInteger --- crypto/src/math/raw/Nat224.cs | 15 --------------- 1 file changed, 15 deletions(-) (limited to 'crypto/src/math/raw/Nat224.cs') diff --git a/crypto/src/math/raw/Nat224.cs b/crypto/src/math/raw/Nat224.cs index 565abcb9c..1aabd3f17 100644 --- a/crypto/src/math/raw/Nat224.cs +++ b/crypto/src/math/raw/Nat224.cs @@ -261,21 +261,6 @@ namespace Org.BouncyCastle.Math.Raw return true; } - public static uint[] FromBigInteger(BigInteger x) - { - if (x.SignValue < 0 || x.BitLength > 224) - throw new ArgumentException(); - - uint[] z = Create(); - int i = 0; - while (x.SignValue != 0) - { - z[i++] = (uint)x.IntValue; - x = x.ShiftRight(32); - } - return z; - } - public static uint GetBit(uint[] x, int bit) { if (bit == 0) -- cgit 1.4.1