This section describes 2 JDK classes: PKCS8EncodedKeySpec representing the PKCS#8 encoding standard and the X.509 encoding standard.
java.security.spec.PKCS8EncodedKeySpec - A sub class of the EncodedKeySpec class represents the ASN.1
encoding of a private key based on the PKCS#8 encoding standard.
It has three methods:
PKCS8EncodedKeySpec() - Constructs a PKCS8EncodedKeySpec object from the specified byte array that
contains the PKCS#8 encoded private key.
getEncoded() - Returns the encoded key in a byte array of this object.
getFormat() - Returns the name of encoding used in this object.
java.security.spec.X509EncodedKeySpec - A sub class of EncodedKeySpec represents the ASN.1
encoding of a private key based on the X.509 encoding standard.
It has three methods:
X509EncodedKeySpec() - Constructs a X509EncodedKeySpec object from the specified byte array
that contains the X509 encoded public key.
getEncoded() - Returns the encoded key in a byte array of this object.
getFormat() - Returns the name of encoding used in this object.