Companion
object Companion
Functions
Link copied to clipboard
Reads a P-256 key from PKCS #8 DER (PrivateKeyInfo, RFC 5958), as encodePkcs8 or OpenSSL writes it. Throws IllegalArgumentException when the bytes are not such a key, including when the public key it carries does not belong to its private key.
Link copied to clipboard
A fresh key pair from the platform provider's own key generator. Throws IllegalStateException if the process has replaced the platform CSPRNG (the JDK provider draws key generation from it, and this is the key encodePkcs8 persists) or the provider fails its self-test.