7 * published by the Free Software Foundation.
8 *
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 5008159 5008156
27 * @run main XMLEncKAT
28 * @summary Verify that the two key wrap ciphers, i.e. "DESedeWrap"
29 * and "AESWrap", work as expected.
30 * @author Valerie Peng
31 */
32 import java.security.Key;
33 import java.security.AlgorithmParameters;
34 import javax.crypto.*;
35 import javax.crypto.spec.*;
36 import sun.misc.BASE64Decoder;
37 import sun.misc.BASE64Encoder;
38 import java.io.UnsupportedEncodingException;
39 import java.io.IOException;
40
41 public class XMLEncKAT {
42
43 private static byte[] desEdeKey_1;
44 private static byte[] aes128Key_1;
45 private static byte[] aes192Key_1;
46 private static byte[] aes256Key_1;
47 private static byte[] desEdeKey_2;
48 private static byte[] aes128Key_2;
49 private static byte[] aes192Key_2;
|
7 * published by the Free Software Foundation.
8 *
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 5008159 5008156
27 * @summary Verify that the two key wrap ciphers, i.e. "DESedeWrap"
28 * and "AESWrap", work as expected.
29 * @modules java.base/sun.misc
30 * @run main XMLEncKAT
31 * @author Valerie Peng
32 */
33 import java.security.Key;
34 import java.security.AlgorithmParameters;
35 import javax.crypto.*;
36 import javax.crypto.spec.*;
37 import sun.misc.BASE64Decoder;
38 import sun.misc.BASE64Encoder;
39 import java.io.UnsupportedEncodingException;
40 import java.io.IOException;
41
42 public class XMLEncKAT {
43
44 private static byte[] desEdeKey_1;
45 private static byte[] aes128Key_1;
46 private static byte[] aes192Key_1;
47 private static byte[] aes256Key_1;
48 private static byte[] desEdeKey_2;
49 private static byte[] aes128Key_2;
50 private static byte[] aes192Key_2;
|