Package java.security.spec
Class EncodedKeySpec
java.lang.Object
java.security.spec.EncodedKeySpec
- All Implemented Interfaces:
KeySpec
- Direct Known Subclasses:
PKCS8EncodedKeySpec,X509EncodedKeySpec
public abstract class EncodedKeySpec extends Object implements KeySpec
The abstract key specification for a public or a private key in encoded
format.
-
Constructor Summary
Constructors Constructor Description EncodedKeySpec(byte[] encodedKey)Creates a newEncodedKeySpecwith the specified encoded key bytes. -
Method Summary
Modifier and Type Method Description byte[]getEncoded()Returns the encoded key bytes.abstract StringgetFormat()Returns the name of the encoding format of this encoded key specification.
-
Constructor Details
-
EncodedKeySpec
public EncodedKeySpec(byte[] encodedKey)Creates a newEncodedKeySpecwith the specified encoded key bytes.- Parameters:
encodedKey- the encoded key bytes.
-
-
Method Details
-
getEncoded
public byte[] getEncoded()Returns the encoded key bytes.- Returns:
- the encoded key bytes.
-
getFormat
Returns the name of the encoding format of this encoded key specification.- Returns:
- the name of the encoding format of this encoded key specification.
-