to top
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.
No examples for this method.
Frequently called with: [Clear]
Portions of this page are reproduced from work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License. The original page is available here.