Package java.security.spec
Class PKCS8EncodedKeySpec
- java.lang.Object
-
- java.security.spec.EncodedKeySpec
-
- java.security.spec.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 Summary
Constructors Constructor Description PKCS8EncodedKeySpec(byte[] encodedKey)Creates a newPKCS8EncodedKeySpecwith the specified encoded key bytes.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description byte[]getEncoded()Returns a copy of the encoded key bytes.StringgetFormat()Returns the name of the encoding format of this encoded key specification.
-
-
-
Method Detail
-
getEncoded
public byte[] getEncoded()
Returns a copy of the encoded key bytes.- Overrides:
getEncodedin classEncodedKeySpec- 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:
getFormatin classEncodedKeySpec- Returns:
- the string "PKCS#8".
-
-