KeySpec
PKCS8EncodedKeySpec
, X509EncodedKeySpec
This class represents a public or private key in encoded format.
Constructors
Creates a new EncodedKeySpec
with the given encoded key.
protected
Creates a new EncodedKeySpec
with the given encoded key.
Returns the name of the algorithm of the encoded key.
byte[]
Returns the name of the encoding format associated with this key specification.
Methods declared in class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public EncodedKeySpec(byte[] encodedKey)
Creates a new EncodedKeySpec
with the given encoded key.
encodedKey
- the encoded key. The contents of the array are copied to protect against subsequent modification.
NullPointerException
- if encodedKey
is null.
Creates a new EncodedKeySpec
with the given encoded key. This constructor is useful when subsequent callers of the EncodedKeySpec
object might not know the algorithm of the key.
encodedKey
- the encoded key. The contents of the array are copied to protect against subsequent modification.
algorithm
- the algorithm name of the encoded key See the KeyFactory section in the Java Security Standard Algorithm Names Specification for information about standard algorithm names.
NullPointerException
- if encodedKey
or algorithm
is null.
IllegalArgumentException
- if algorithm
is the empty string ""
Returns the name of the algorithm of the encoded key.
public byte[] getEncoded()
Returns the encoded key.
()
If the opaque representation of a key (see Key
) can be transformed (see KeyFactory
) into this key specification (or a subclass of it), getFormat
called on the opaque key returns the same value as the getFormat
method of this key specification.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4