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
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.
-
Constructor Details
-
X509EncodedKeySpec
public X509EncodedKeySpec(byte[] encodedKey)Creates a newX509EncodedKeySpecwith the specified encoded key bytes.- Parameters:
encodedKey- the encoded key bytes.
-
-
Method Details
-
getEncoded
public byte[] getEncoded()Returns the encoded key bytes.- Overrides:
getEncodedin classEncodedKeySpec- Returns:
- the encoded key bytes.
-
getFormat
Returns the name of the encoding format of this encoded key specification.- Specified by:
getFormatin classEncodedKeySpec- Returns:
- the string "X.509".
-