to top
Android APIs
public class

PKCS8EncodedKeySpec

extends EncodedKeySpec
java.lang.Object
   ↳ java.security.spec.EncodedKeySpec
     ↳ java.security.spec.PKCS8EncodedKeySpec

Class Overview

The key specification for an encoded private key in ASN.1 format as defined in the PKCS#8 standard.

Summary

Public Constructors
PKCS8EncodedKeySpec(byte[] encodedKey)
Creates a new PKCS8EncodedKeySpec with the specified encoded key bytes.
Public Methods
byte[] getEncoded()
Returns a copy of the encoded key bytes.
final String getFormat()
Returns the name of the encoding format of this encoded key specification.
[Expand]
Inherited Methods
From class java.security.spec.EncodedKeySpec
From class java.lang.Object

Public Constructors

public PKCS8EncodedKeySpec (byte[] encodedKey)

Added in API level 1

Creates a new PKCS8EncodedKeySpec with the specified encoded key bytes.

Parameters
encodedKey the encoded key bytes.

Public Methods

public byte[] getEncoded ()

Added in API level 1

Returns a copy of the encoded key bytes.

Returns
  • a copy of the encoded key bytes.

public final String getFormat ()

Added in API level 1

Returns the name of the encoding format of this encoded key specification.

Returns
  • the string "PKCS#8".