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)

Creates a new EncodedKeySpec with the specified encoded key bytes.

Parameters
encodedKey the encoded key bytes.

Public Methods

public byte[] getEncoded ()

Returns the encoded key bytes.

Returns
  • the encoded key bytes.

public abstract String getFormat ()

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

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