< prev index next > test/jdk/sun/security/ec/xec/TestXECOps.java
Print this page
XECParameters.get(RuntimeException::new, paramSpec);
XECOperations ops = new XECOperations(settings);
byte[] basePoint = Convert.byteToByteArray(settings.getBasePoint(),
settings.getBytes());
- byte[] a = Convert.hexStringToByteArray(a_str);
- byte[] b = Convert.hexStringToByteArray(b_str);
- byte[] expectedResult = Convert.hexStringToByteArray(result_str);
+ byte[] a = Hex.decoder().decode(a_str);
+ byte[] b = Hex.decoder().decode(b_str);
+ byte[] expectedResult = Hex.decoder().decode(result_str);
byte[] a_copy = Arrays.copyOf(a, a.length);
byte[] b_copy = Arrays.copyOf(b, b.length);
byte[] basePoint_copy = Arrays.copyOf(basePoint, basePoint.length);
}
private void runTest(String opName, String k_in_str,
String u_in_str, String u_out_str) {
- byte[] k_in = Convert.hexStringToByteArray(k_in_str);
- byte[] u_in = Convert.hexStringToByteArray(u_in_str);
- byte[] u_out_expected = Convert.hexStringToByteArray(u_out_str);
+ byte[] k_in = Hex.decoder().decode(k_in_str);
+ byte[] u_in = Hex.decoder().decode(u_in_str);
+ byte[] u_out_expected = Hex.decoder().decode(u_out_str);
NamedParameterSpec paramSpec = new NamedParameterSpec(opName);
XECParameters settings =
XECParameters.get(RuntimeException::new, paramSpec);
XECOperations ops = new XECOperations(settings);
< prev index next >