jdk/src/jdk.crypto.ucrypto/solaris/classes/com/oracle/security/ucrypto/NativeCipher.java
changeset 31270 e6470b24700d
parent 27182 4525d13b8af1
child 32275 17eeb583a331
--- a/jdk/src/jdk.crypto.ucrypto/solaris/classes/com/oracle/security/ucrypto/NativeCipher.java	Thu Jun 25 11:59:40 2015 -0700
+++ b/jdk/src/jdk.crypto.ucrypto/solaris/classes/com/oracle/security/ucrypto/NativeCipher.java	Fri Jun 26 21:34:34 2015 +0000
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -55,11 +55,17 @@
         public AesEcbNoPadding() throws NoSuchAlgorithmException {
             super(UcryptoMech.CRYPTO_AES_ECB);
         }
+        public AesEcbNoPadding(int keySize) throws NoSuchAlgorithmException {
+            super(UcryptoMech.CRYPTO_AES_ECB, keySize);
+        }
     }
     public static final class AesCbcNoPadding extends NativeCipher {
         public AesCbcNoPadding() throws NoSuchAlgorithmException {
             super(UcryptoMech.CRYPTO_AES_CBC);
         }
+        public AesCbcNoPadding(int keySize) throws NoSuchAlgorithmException {
+            super(UcryptoMech.CRYPTO_AES_CBC, keySize);
+        }
     }
     public static final class AesCtrNoPadding extends NativeCipher {
         public AesCtrNoPadding() throws NoSuchAlgorithmException {
@@ -72,38 +78,6 @@
         }
     }
 
-    // public implementation classes with fixed key sizes
-    public static final class Aes128EcbNoPadding extends NativeCipher {
-        public Aes128EcbNoPadding() throws NoSuchAlgorithmException {
-            super(UcryptoMech.CRYPTO_AES_ECB, 16);
-        }
-    }
-    public static final class Aes128CbcNoPadding extends NativeCipher {
-        public Aes128CbcNoPadding() throws NoSuchAlgorithmException {
-            super(UcryptoMech.CRYPTO_AES_CBC, 16);
-        }
-    }
-    public static final class Aes192EcbNoPadding extends NativeCipher {
-        public Aes192EcbNoPadding() throws NoSuchAlgorithmException {
-            super(UcryptoMech.CRYPTO_AES_ECB, 24);
-        }
-    }
-    public static final class Aes192CbcNoPadding extends NativeCipher {
-        public Aes192CbcNoPadding() throws NoSuchAlgorithmException {
-            super(UcryptoMech.CRYPTO_AES_CBC, 24);
-        }
-    }
-    public static final class Aes256EcbNoPadding extends NativeCipher {
-        public Aes256EcbNoPadding() throws NoSuchAlgorithmException {
-            super(UcryptoMech.CRYPTO_AES_ECB, 32);
-        }
-    }
-    public static final class Aes256CbcNoPadding extends NativeCipher {
-        public Aes256CbcNoPadding() throws NoSuchAlgorithmException {
-            super(UcryptoMech.CRYPTO_AES_CBC, 32);
-        }
-    }
-
     // ok as constants since AES is all we support
     public static final int AES_BLOCK_SIZE = 16;
     public static final String AES_KEY_ALGO = "AES";