Code example for RC2ParameterSpec

Methods: equals

0
 
        assertTrue("Objects built on the same parameters should be equal.",
                                                        ps1.equals(ps2));
        // checking for symmetric law: 
        assertTrue("The equivalence relation should be symmetric.",
                                                        ps2.equals(ps1));
 
        assertTrue("Objects built on the equal parameters should be equal.",
                                                        ps2.equals(ps3));
 
        // checking for transitive law: 
        assertTrue("The equivalence relation should be transitive.",
                                                        ps1.equals(ps3));
 
        assertFalse("Should return not be equal to null object.",
                                                        ps1.equals(null));
 
        ps2 = new RC2ParameterSpec(11, iv);
        assertFalse("Objects should not be equal.", ps1.equals(ps2));
 
        ps2 = new RC2ParameterSpec(11, new byte[] {9, 8, 7, 6, 5, 4, 3, 2, 1});