Code example for IvParameterSpec

Methods: getIV

0
            new IvParameterSpec(new byte[] {1, 2, 3}, -1, 1);
            fail("Should raise an ArrayIndexOutOfBoundsException "
                    + "if offset index bytes outside the iv."); 
        } catch(ArrayIndexOutOfBoundsException e) {
        } catch(IllegalArgumentException e) {
            fail("Unexpected IllegalArgumentException was thrown");
        } catch(NullPointerException e) {
            fail("Unexpected NullPointerException was thrown");
        } 
 
        /* TODO: DRL fail with java.lang.NegativeArraySizeException 
        try { 
            new IvParameterSpec(new byte[] {1, 2, 3}, 1, -2); 
            fail("Should raise an ArrayIndexOutOfBoundsException " 
                    + "if len index bytes outside the iv."); 
        } catch(ArrayIndexOutOfBoundsException e) { 
        } catch(IllegalArgumentException e) { 
            fail("Unexpected IllegalArgumentException was thrown"); 
        } catch(NullPointerException e) { 
            fail("Unexpected NullPointerException was thrown"); 
        }