< prev index next >
test/jdk/javax/crypto/Cipher/ExampleVectors/CheckExampleVectors.java
Print this page
@@ -1,7 +1,7 @@
/*
- * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * 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,19 +23,17 @@
/*
* @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 {
@@ -122,11 +120,11 @@
private static byte[] stringToBytes(String v) {
if (v.equals("")) {
return null;
}
- return DatatypeConverter.parseBase64Binary(v);
+ return Base64.getDecoder().decode(v);
}
private static String toModeString(Mode mode) {
return mode.toString();
}
< prev index next >