Class X509EncodedKeySpec

  • All Implemented Interfaces:
    KeySpec

    public class X509EncodedKeySpec
    extends EncodedKeySpec
    The key specification of an X.509 encoded key in ASN.1 format.
    • Constructor Detail

      • X509EncodedKeySpec

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

      • getEncoded

        public byte[] getEncoded()
        Returns the encoded key bytes.
        Overrides:
        getEncoded in class EncodedKeySpec
        Returns:
        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 "X.509".