/libcore/luni/src/main/java/javax/crypto/spec/ |
H A D | IvParameterSpec.java | 32 private final byte[] iv; field in class:IvParameterSpec 36 * the specified buffer <i>iv</i> used as <i>initialization vector</i>. 38 * @param iv 43 public IvParameterSpec(byte[] iv) { argument 44 if (iv == null) { 45 throw new NullPointerException("iv == null"); 47 this.iv = new byte[iv.length]; 48 System.arraycopy(iv, 0, this.iv, 63 IvParameterSpec(byte[] iv, int offset, int byteCount) argument [all...] |
H A D | RC2ParameterSpec.java | 30 private final byte[] iv; field in class:RC2ParameterSpec 41 iv = null; 53 * @param iv 58 public RC2ParameterSpec(int effectiveKeyBits, byte[] iv) { argument 59 if (iv == null) { 60 throw new IllegalArgumentException("iv == null"); 62 if (iv.length < 8) { 63 throw new IllegalArgumentException("iv.length < 8"); 66 this.iv = new byte[8]; 67 System.arraycopy(iv, 88 RC2ParameterSpec(int effectiveKeyBits, byte[] iv, int offset) argument [all...] |
H A D | GCMParameterSpec.java | 35 private final byte[] iv; field in class:GCMParameterSpec 39 * Initial Vector (IV) from buffer {@code iv} and a tag length of 42 * @throws IllegalArgumentException if the specified {@code iv} is null or 46 public GCMParameterSpec(int tagLen, byte[] iv) { argument 50 if (iv == null) { 51 throw new IllegalArgumentException("iv == null"); 54 this.iv = iv.clone(); 59 * (IV) of {@code byteCount} bytes from the specified buffer {@code iv} 62 * @throws IllegalArgumentException if the specified {@code iv} i 68 GCMParameterSpec(int tagLen, byte[] iv, int offset, int byteCount) argument [all...] |
H A D | RC5ParameterSpec.java | 32 private final byte[] iv; field in class:RC5ParameterSpec 49 this.iv = null; 67 * @param iv 73 public RC5ParameterSpec(int version, int rounds, int wordSize, byte[] iv) { argument 74 if (iv == null) { 75 throw new IllegalArgumentException("iv == null"); 77 if (iv.length < 2 * (wordSize / 8)) { 78 throw new IllegalArgumentException("iv.length < 2 * (wordSize / 8)"); 83 this.iv = new byte[2*(wordSize/8)]; 84 System.arraycopy(iv, 112 RC5ParameterSpec(int version, int rounds, int wordSize, byte[] iv, int offset) argument [all...] |
/libcore/luni/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/spec/ |
H A D | IvParameterSpecTest.java | 40 * IvParameterSpec(byte[] iv) constructor testing. Checks that 52 byte[] iv = new byte[] {1, 2, 3, 4, 5}; 53 IvParameterSpec ivps = new IvParameterSpec(iv); 54 iv[0] ++; 56 + "the change of internal array", iv[0] == ivps.getIV()[0]); 60 * IvParameterSpec(byte[] iv) constructor testing. Checks that 79 + "if (iv.length - offset < len)."); 90 + "if offset index bytes outside the iv."); 102 + "if len index bytes outside the iv."); 111 byte[] iv [all...] |
H A D | RC2ParameterSpecTest.java | 39 * RC2ParameterSpec(int effectiveKeyBits, byte[] iv) method testing. 41 * inappropriate constructor parameters and that input iv array is 46 byte[] iv = {1, 2, 3, 4, 5, 6, 7, 8}; 51 + "in the case of null iv."); 58 + "in the case of short iv."); 62 RC2ParameterSpec ps = new RC2ParameterSpec(effectiveKeyBits, iv); 63 iv[0] ++; 64 assertFalse("The change of iv specified in the constructor " 66 iv[0] == ps.getIV()[0]); 70 * RC2ParameterSpec(int effectiveKeyBits, byte[] iv, in [all...] |
H A D | RC5ParameterSpecTest.java | 38 * RC5ParameterSpec(int version, int rounds, int wordSize, byte[] iv) method 40 * inappropriate constructor parameters and that input iv array is 47 byte[] iv = {1, 2, 3, 4}; 52 + "in the case of null iv."); 57 new RC5ParameterSpec(version, rounds, wordSize+8, iv); 59 + "in the case of short iv."); 66 + "in the case of short iv."); 71 wordSize, iv); 72 iv[0] ++; 73 assertFalse("The change of iv specifie [all...] |
/libcore/luni/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/func/ |
H A D | CipherSymmetricKeyThread.java | 39 byte[] iv = null;//new byte[16]; 49 iv = new byte[8]; 51 iv = new byte[16]; 53 sr.nextBytes(iv); 54 IvParameterSpec ivspec = new IvParameterSpec(iv); 59 iv = cip.getIV(); 60 ivspec = new IvParameterSpec(iv);
|
/libcore/luni/src/test/java/libcore/javax/crypto/ |
H A D | CipherInputStreamTest.java | 60 private AlgorithmParameterSpec iv; field in class:CipherInputStreamTest 65 iv = new IvParameterSpec(aesIvBytes); 98 cipher.init(Cipher.DECRYPT_MODE, key, iv); 107 cipher.init(Cipher.DECRYPT_MODE, key, iv); 120 cipher.init(Cipher.ENCRYPT_MODE, key, iv); 144 cipher.init(Cipher.DECRYPT_MODE, key, iv); 160 cipher.init(Cipher.DECRYPT_MODE, key, iv); 177 cipher.init(Cipher.DECRYPT_MODE, key, iv); 185 cipher.init(Cipher.DECRYPT_MODE, key, iv);
|
H A D | CipherTest.java | 754 final byte[] iv = new byte[12]; 755 new SecureRandom().nextBytes(iv); 756 return new GCMParameterSpec(GCM_TAG_SIZE_BITS, iv); 765 final byte[] iv = new byte[16]; 766 new SecureRandom().nextBytes(iv); 767 return new IvParameterSpec(iv); 776 final byte[] iv = new byte[8]; 777 new SecureRandom().nextBytes(iv); 778 return new IvParameterSpec(iv); 792 byte[] iv 2773 public final byte[] iv; field in class:CipherTest.CipherTestParam 2783 CipherTestParam(String transformation, byte[] key, byte[] iv, byte[] aad, byte[] plaintext, byte[] plaintextPadded, byte[] ciphertext) argument [all...] |
/libcore/luni/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/ |
H A D | KeyGeneratorTest.java | 508 byte[] iv = null; 509 iv = new byte[8]; 510 sr.nextBytes(iv); 511 aps = new IvParameterSpec(iv);
|
H A D | CipherTest.java | 333 + ".iv"); 334 IvParameterSpec iv = new IvParameterSpec(ivMaterial); 336 c.init(Cipher.DECRYPT_MODE, k, iv); 391 + ".iv"); 392 IvParameterSpec iv = new IvParameterSpec(ivMaterial); 394 c.init(Cipher.ENCRYPT_MODE, k, iv);
|