Code example for BigInteger

Methods: compareTo

0
        assertEquals("failure for 'params.getP().compareTo(publicP)'", 0,
                params.getP().compareTo(publicP));
        assertEquals("failure for 'params.getQ().compareTo(publicQ)'", 0,
                params.getQ().compareTo(publicQ));
        assertEquals("failure for 'params.getG().compareTo(publicG)'", 0,
                params.getG().compareTo(publicG));
    } 
 
 
    private void checkPublicKeys(DSAPublicKey pk) {
 
        checkPublicIntegers(pk);
 
        assertEquals(
                "failure for 'pk.getAlgorithm().compareTo(publicAlgorithm)'", 
                0, pk.getAlgorithm().compareTo(publicAlgorithm));
        assertEquals("failure for 'pk.getFormat().compareTo(publicFormat)'", 0,
                pk.getFormat().compareTo(publicFormat));
 
        if ( publicEncoding != null) {
            assertTrue("failure: encodings are not equal",