BraintreeEncryption.Library.BouncyCastle.Math.BigInteger.CompareTo C# (CSharp) Метод

CompareTo() публичный Метод

public CompareTo ( BigInteger value ) : int
value BigInteger
Результат int
		public int CompareTo(
			BigInteger value)
		{
			return sign < value.sign ? -1
				: sign > value.sign ? 1
				: sign == 0 ? 0
				: sign * CompareNoLeadingZeroes(0, magnitude, 0, value.magnitude);
		}

Same methods

BigInteger::CompareTo ( int xIndx, int x, int yIndx, int y ) : int
BigInteger::CompareTo ( object obj ) : int

Usage Example

        public BigInteger ConvertInput(
			byte[]	inBuf,
			int		inOff,
			int		inLen)
        {
            int maxLength = (bitSize + 7) / 8;

            if (inLen > maxLength)
                throw new DataLengthException("input too large for RSA cipher.");

            BigInteger input = new BigInteger(1, inBuf, inOff, inLen);

            if (input.CompareTo(key.Modulus) >= 0)
                throw new DataLengthException("input too large for RSA cipher.");

            return input;
        }
All Usage Examples Of BraintreeEncryption.Library.BouncyCastle.Math.BigInteger::CompareTo