java.security.spec

Class PKCS8EncodedKeySpec

public class PKCS8EncodedKeySpec extends EncodedKeySpec

PKCS8 Encoded Key Specification class which is used to store "PKCS#8" byte encoded keys.

Since: JDK 1.2

Constructor Summary
PKCS8EncodedKeySpec(byte[] encodedKey)
Constructs a new PKCS8EncodedKeySpec with the specified encoded key.
Method Summary
byte[]getEncoded()
Gets the encoded key in byte format.
StringgetFormat()
Returns the name of the key format used which is "PKCS#8"

Constructor Detail

PKCS8EncodedKeySpec

public PKCS8EncodedKeySpec(byte[] encodedKey)
Constructs a new PKCS8EncodedKeySpec with the specified encoded key.

Parameters: encodedKey A key to store, assumed to be "PKCS#8"

Method Detail

getEncoded

public byte[] getEncoded()
Gets the encoded key in byte format.

UNKNOWN: the encoded key

getFormat

public final String getFormat()
Returns the name of the key format used which is "PKCS#8"

Returns: a string representing the name