Home | History | Annotate | Download | only in spec

Lines Matching refs:iv

36  * size, and optionally an initialization vector (IV) (only in feedback mode).
49 private byte[] iv = null;
70 * rounds, word size (in bits), and IV.
72 * <p> Note that the size of the IV (block size) must be twice the word
73 * size. The bytes that constitute the IV are those between
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))}
85 public RC5ParameterSpec(int version, int rounds, int wordSize, byte[] iv) {
86 this(version, rounds, wordSize, iv, 0);
91 * rounds, word size (in bits), and IV.
93 * <p> The IV is taken from <code>iv</code>, starting at
95 * Note that the size of the IV (block size), starting at
97 * The bytes that constitute the IV are those between
98 * <code>iv[offset]</code> and <code>iv[offset+2*(wordSize/8)-1]</code>
104 * @param iv the buffer with the IV. The first <code>2*(wordSize/8)
107 * @param offset the offset in <code>iv</code> where the IV starts.
108 * @exception IllegalArgumentException if <code>iv</code> is
110 * {@code (iv.length - offset < 2 * (wordSize / 8))}
113 byte[] iv, int offset) {
117 if (iv == null) throw new IllegalArgumentException("IV missing");
119 if (iv.length - offset < blockSize) {
120 throw new IllegalArgumentException("IV too short");
122 this.iv = new byte[blockSize];
123 System.arraycopy(iv, offset, this.iv, 0, blockSize);
154 * Returns the IV or null if this parameter set does not contain an IV.
156 * @return the IV or null if this parameter set does not contain an IV.
160 return (iv == null? null:iv.clone());
167 * (Two IV references are considered equal if both are <tt>null</tt>.)
186 java.util.Arrays.equals(iv, other.iv));
195 if (iv != null) {
196 for (int i = 1; i < iv.length; i++) {
197 retval += iv[i] * i;