RFR 8252055: Use java.util.Hex encoder and decoder in java.security

Roger Riggs Roger.Riggs at oracle.com
Thu Aug 20 15:14:05 UTC 2020


Please review using the java.util.Hex api in security related classes.
(The review of the API is being done on the core-libs-dev at openjdk.java.net).

Within the JDK and JDK tests there are multiple implementations to 
encode and decode
hexadecimal strings to byte arrays. Hex encoders and decoders support
upper or lower case hexadecimal characters, delimiters, prefix, and suffix.
The API is modeled after the java.util.Base64 API providing static 
factories,
immutable threadsafe instances with methods to encode to and decode from
string and StringBuilder.

Webrev for applying to java.security:
    http://cr.openjdk.java.net/~rriggs/webrev-hex-security-8252055

Issue for Use in java.security and tests:
    https://bugs.openjdk.java.net/browse/JDK-8252055

Thanks, Roger

p.s.

JavaDoc for java.util.Hex:
http://cr.openjdk.java.net/~rriggs/hex-javadoc/java.base/java/util/Hex.html

Webrev for Hex encoder and decoder:
    http://cr.openjdk.java.net/~rriggs/webrev-hex-encoder-8251989

CSR:
    https://bugs.openjdk.java.net/browse/JDK-8251991

Issue for API and a few uses:
    https://bugs.openjdk.java.net/browse/JDK-8251989






More information about the security-dev mailing list