Java 26 (JEP 524) previews an updated PEM encoding/decoding API that simplifies working with cryptographic objects like keys and certificates. A PEMEncoder can encode any DEREncodable (such as AsymmetricKey or X509Certificate) to a byte array or string, while a PEMDecoder can decode from a string or input stream with optional type-safe decoding. The JDK 26 iteration adds support for KeyPair and PKCS8EncodedKeySpec. The API also supports encrypting objects and configuring alternative cryptographic providers.
•1m watch time
Sort: