< prev index next >
test/jdk/javax/crypto/Cipher/ExampleVectors/CheckExampleVectors.java
Print this page
*** 1,7 ****
/*
! * Copyright (c) 2017, 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
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
--- 1,7 ----
/*
! * Copyright (c) 2017, 2018, 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
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*** 23,41 ****
/*
* @test
* @bug 8006259
* @summary Test several modes of operation using vectors from SP 800-38A
- * @modules java.xml.bind
* @run main CheckExampleVectors
*/
import java.io.*;
import java.security.*;
import java.util.*;
import java.util.function.*;
- import javax.xml.bind.DatatypeConverter;
import javax.crypto.*;
import javax.crypto.spec.*;
public class CheckExampleVectors {
--- 23,39 ----
*** 122,132 ****
private static byte[] stringToBytes(String v) {
if (v.equals("")) {
return null;
}
! return DatatypeConverter.parseBase64Binary(v);
}
private static String toModeString(Mode mode) {
return mode.toString();
}
--- 120,130 ----
private static byte[] stringToBytes(String v) {
if (v.equals("")) {
return null;
}
! return Base64.getDecoder().decode(v);
}
private static String toModeString(Mode mode) {
return mode.toString();
}
< prev index next >