package oiccli;
import java.util.Arrays;
import java.util.List;
import oiccli.exceptions.AESError;
import org.bouncycastle.util.encoders.Base64;
import org.junit.Assert;
public class AES {
private static final int BLOCK_SIZE = 16;
private static final String AES_ALGORITHM = "aes_128_cbc";
private static final String PADDING_7 = "PKCS#7";
private static final String PADDING_5 = "PKCS#5";
private byte[] key;
private int mode;
private byte[] iv;
private AES kernel;
public AES(byte[] key, byte[] iv, int mode) {
assert key instanceof byte[];
assert iv instanceof byte[];
this.key = key;
this.mode = mode;
this.iv = iv;
this.kernel = new AES(this.key, this.mode, this.iv);
}
public static List