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
All Methods Instance Methods Abstract Methods Concrete Methods 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.
-
-
-
Method Detail
-
getEncoded
public byte[] getEncoded()
Returns the encoded key bytes.- Returns:
- the encoded key bytes.
-
getFormat
public abstract String 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.
-
-