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 abstract class

EncodedKeySpec

extends Object
implements KeySpec
java.lang.Object
   ↳ java.security.spec.EncodedKeySpec
Known Direct Subclasses

Class Overview

The abstract key specification for a public or a private key in encoded format.

Summary

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

Public Constructors

public EncodedKeySpec (byte[] encodedKey)

Added in API level 1

Creates a new EncodedKeySpec with the specified encoded key bytes.

Parameters
encodedKey the encoded key bytes.

Public Methods

public byte[] getEncoded ()

Added in API level 1

Returns the encoded key bytes.

Returns
  • the encoded key bytes.

public abstract String getFormat ()

Added in API level 1

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

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