Package java.security.spec
Class X509EncodedKeySpec
- java.lang.Object
-
- java.security.spec.EncodedKeySpec
-
- java.security.spec.X509EncodedKeySpec
-
- All Implemented Interfaces:
KeySpec
public class X509EncodedKeySpec extends EncodedKeySpec
The key specification of an X.509 encoded key in ASN.1 format.
-
-
Constructor Summary
Constructors Constructor Description X509EncodedKeySpec(byte[] encodedKey)Creates a newX509EncodedKeySpecwith the specified encoded key bytes.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description byte[]getEncoded()Returns the encoded key bytes.StringgetFormat()Returns the name of the encoding format of this encoded key specification.
-
-
-
Method Detail
-
getEncoded
public byte[] getEncoded()
Returns the encoded key bytes.- Overrides:
getEncodedin classEncodedKeySpec- Returns:
- 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 "X.509".
-
-