1 package org.bouncycastle.crypto.params; 2 3 import org.bouncycastle.crypto.CipherParameters; 4 5 public class ParametersWithIV 6 implements CipherParameters 7 { 8 private byte[] iv; 9 private CipherParameters parameters; 10 ParametersWithIV( CipherParameters parameters, byte[] iv)11 public ParametersWithIV( 12 CipherParameters parameters, 13 byte[] iv) 14 { 15 this(parameters, iv, 0, iv.length); 16 } 17 ParametersWithIV( CipherParameters parameters, byte[] iv, int ivOff, int ivLen)18 public ParametersWithIV( 19 CipherParameters parameters, 20 byte[] iv, 21 int ivOff, 22 int ivLen) 23 { 24 this.iv = new byte[ivLen]; 25 this.parameters = parameters; 26 27 System.arraycopy(iv, ivOff, this.iv, 0, ivLen); 28 } 29 getIV()30 public byte[] getIV() 31 { 32 return iv; 33 } 34 getParameters()35 public CipherParameters getParameters() 36 { 37 return parameters; 38 } 39 } 40