9 * This code is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 */
23
24 /*
25 * @test
26 * @bug 4921443
27 * @summary Ensure ISO10126Padding works correctly.
28 * @author Valerie Peng
29 */
30 import java.util.Arrays;
31 import java.security.*;
32 import java.security.spec.*;
33
34 import javax.crypto.*;
35 import javax.crypto.spec.*;
36 import java.security.Provider;
37 import com.sun.crypto.provider.*;
38
39 public class TestISO10126Padding {
40 private static final String ALGO = "AES";
41 private static final String TRANS = "AES/ECB";
42 private static final int KEYSIZE = 16; // in bytes
43
44 private SecretKey key;
45
46 private TestISO10126Padding() throws Exception {
47 // setup
48 KeyGenerator kg = KeyGenerator.getInstance(ALGO, "SunJCE");
|
9 * This code is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 */
23
24 /*
25 * @test
26 * @bug 4921443
27 * @summary Ensure ISO10126Padding works correctly.
28 * @author Valerie Peng
29 * @key randomness
30 */
31 import java.util.Arrays;
32 import java.security.*;
33 import java.security.spec.*;
34
35 import javax.crypto.*;
36 import javax.crypto.spec.*;
37 import java.security.Provider;
38 import com.sun.crypto.provider.*;
39
40 public class TestISO10126Padding {
41 private static final String ALGO = "AES";
42 private static final String TRANS = "AES/ECB";
43 private static final int KEYSIZE = 16; // in bytes
44
45 private SecretKey key;
46
47 private TestISO10126Padding() throws Exception {
48 // setup
49 KeyGenerator kg = KeyGenerator.getInstance(ALGO, "SunJCE");
|