Searched refs:iv (Results 1 - 15 of 15) sorted by relevance

/libcore/ojluni/src/main/java/javax/crypto/spec/
H A DIvParameterSpec.java42 private byte[] iv; field in class:IvParameterSpec
45 * Creates an IvParameterSpec object using the bytes in <code>iv</code>
48 * @param iv the buffer with the IV. The contents of the
50 * @throws NullPointerException if <code>iv</code> is <code>null</code>
52 public IvParameterSpec(byte[] iv) { argument
53 this(iv, 0, iv.length);
58 * bytes in <code>iv</code>, beginning at <code>offset</code>
62 * <code>iv[offset]</code> and <code>iv[offse
75 IvParameterSpec(byte[] iv, int offset, int len) argument
[all...]
H A DRC2ParameterSpec.java47 private byte[] iv = null; field in class:RC2ParameterSpec
65 * <code>iv[0]</code> and <code>iv[7]</code> inclusive.
68 * @param iv the buffer with the 8-byte IV. The first 8 bytes of
70 * @exception IllegalArgumentException if <code>iv</code> is null.
72 public RC2ParameterSpec(int effectiveKeyBits, byte[] iv) { argument
73 this(effectiveKeyBits, iv, 0);
80 * <p> The IV is taken from <code>iv</code>, starting at
83 * <code>iv[offset]</code> and <code>iv[offse
93 RC2ParameterSpec(int effectiveKeyBits, byte[] iv, int offset) argument
[all...]
H A DRC5ParameterSpec.java49 private byte[] iv = null; field in class:RC5ParameterSpec
74 * <code>iv[0]</code> and <code>iv[2*(wordSize/8)-1]</code> inclusive.
79 * @param iv the buffer with the IV. The first <code>2*(wordSize/8)
82 * @exception IllegalArgumentException if <code>iv</code> is
83 * <code>null</code> or <code>(iv.length < 2 * (wordSize / 8))</code>
85 public RC5ParameterSpec(int version, int rounds, int wordSize, byte[] iv) { argument
86 this(version, rounds, wordSize, iv, 0);
93 * <p> The IV is taken from <code>iv</code>, starting at
98 * <code>iv[offse
112 RC5ParameterSpec(int version, int rounds, int wordSize, byte[] iv, int offset) argument
[all...]
H A DGCMParameterSpec.java67 private byte[] iv; field in class:GCMParameterSpec
127 iv = new byte[len];
128 System.arraycopy(src, offset, iv, 0, len);
147 return iv.clone();
/libcore/luni/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/spec/
H A DIvParameterSpecTest.java40 * 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 DRC2ParameterSpecTest.java39 * 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 DRC5ParameterSpecTest.java38 * 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 DCipherSymmetricKeyThread.java39 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 DCipherInputStreamTest.java60 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 DCipherTest.java755 final byte[] iv = new byte[12];
756 new SecureRandom().nextBytes(iv);
757 return new GCMParameterSpec(GCM_TAG_SIZE_BITS, iv);
766 final byte[] iv = new byte[16];
767 new SecureRandom().nextBytes(iv);
768 return new IvParameterSpec(iv);
777 final byte[] iv = new byte[8];
778 new SecureRandom().nextBytes(iv);
779 return new IvParameterSpec(iv);
793 byte[] iv
2935 public final byte[] iv; field in class:CipherTest.CipherTestParam
2945 CipherTestParam(String transformation, byte[] key, byte[] iv, byte[] aad, byte[] plaintext, byte[] plaintextPadded, byte[] ciphertext) argument
[all...]
/libcore/ojluni/src/main/java/sun/security/ssl/
H A DCipherBox.java146 SecretKey key, IvParameterSpec iv, SecureRandom random,
165 * later, so if the "iv" parameter is null, we use the default
169 if (iv == null && bulkCipher.ivSize != 0 &&
172 iv = getFixedMask(bulkCipher.ivSize);
175 cipher.init(mode, key, iv, random);
199 SecretKey key, IvParameterSpec iv, SecureRandom random,
208 return new CipherBox(version, cipher, key, iv, random, encrypt);
220 IvParameterSpec iv = masks.get(ivSize);
221 if (iv == null) {
222 iv
145 CipherBox(ProtocolVersion protocolVersion, BulkCipher bulkCipher, SecretKey key, IvParameterSpec iv, SecureRandom random, boolean encrypt) argument
198 newCipherBox(ProtocolVersion version, BulkCipher cipher, SecretKey key, IvParameterSpec iv, SecureRandom random, boolean encrypt) argument
[all...]
H A DCipherSuite.java465 IvParameterSpec iv, SecureRandom random,
468 key, iv, random, encrypt);
505 IvParameterSpec iv =
508 key, iv, null, true);
464 newCipher(ProtocolVersion version, SecretKey key, IvParameterSpec iv, SecureRandom random, boolean encrypt) argument
/libcore/ojluni/src/main/java/sun/misc/
H A DFDBigInt.java196 mult( int iv ) {
197 long v = iv;
223 multaddMe( int iv, int addend ) { argument
224 long v = iv;
/libcore/luni/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/
H A DKeyGeneratorTest.java508 byte[] iv = null;
509 iv = new byte[8];
510 sr.nextBytes(iv);
511 aps = new IvParameterSpec(iv);
H A DCipherTest.java333 + ".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);

Completed in 873 milliseconds