Please note that the contents of this offline web site may be out of date. To access the most recent documentation visit the online version .
Note that links that point to online resources are green in color and will open in a new window.
We would love it if you could give us feedback about this material by filling this form (You have to be online to fill it)
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".