Lines Matching defs:alg
106 private final String alg;
111 CipherTest(String alg, byte[] plaintext, byte[] ciphertext, byte[] key, byte[] iv) {
112 this.alg = alg;
119 Cipher cipher = Cipher.getInstance(alg, p);
120 SecretKey keySpec = new SecretKeySpec(key, alg.split("/")[0]);
130 System.out.println("Cipher test encryption for " + alg + " failed:");
138 throw new Exception("Cipher test encryption for " + alg + " failed");
147 System.out.println("Cipher test decryption for " + alg + " failed:");
155 throw new Exception("Cipher test decryption for " + alg + " failed");
157 System.out.println("passed: " + alg);
169 private static Test t(String alg, String plaintext, String ciphertext, String key) {
170 return new CipherTest(alg, b(plaintext), b(ciphertext), b(key), null);