public int CompareTo(
BigInteger value)
{
return sign < value.sign ? -1
: sign > value.sign ? 1
: sign == 0 ? 0
: sign * CompareNoLeadingZeroes(0, magnitude, 0, value.magnitude);
}
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; }