Code example for BigInteger

Methods: compareTo

0
            System.arraycopy(in, inOff, block, 0, inLen);
        } else { 
            block = in;
        } 
 
        BigInteger res = new BigInteger(1, block);
        if (res.compareTo(key.getModulus()) >= 0) {
            throw new DataLengthException("input too large for RSA cipher."); 
        } 
 
        return res;
    } 
 
    public byte[] convertOutput(BigInteger result) {
        byte[] output = result.toByteArray();
 
        if (forEncryption) {
            if (output[0] == 0 && output.length > getOutputBlockSize()) // have
            // ended 
            // up 
            // with