Class PKCS8EncodedKeySpec

  • All Implemented Interfaces:
    KeySpec

    public class PKCS8EncodedKeySpec
    extends EncodedKeySpec
    The key specification for an encoded private key in ASN.1 format as defined in the PKCS#8 standard.
    • Constructor Detail

      • PKCS8EncodedKeySpec

        public PKCS8EncodedKeySpec​(byte[] encodedKey)
        Creates a new PKCS8EncodedKeySpec with the specified encoded key bytes.
        Parameters:
        encodedKey - the encoded key bytes.
    • Method Detail

      • getEncoded

        public byte[] getEncoded()
        Returns a copy of the encoded key bytes.
        Overrides:
        getEncoded in class EncodedKeySpec
        Returns:
        a copy of the encoded key bytes.
      • getFormat

        public final String getFormat()
        Returns the name of the encoding format of this encoded key specification.
        Specified by:
        getFormat in class EncodedKeySpec
        Returns:
        the string "PKCS#8".