java.security.Key , java.security.KeyFactory , KeySpec, X509EncodedKeySpec, PKCS8EncodedKeySpec
| Modifier and Type | Field and Description |
|---|---|
| private String | |
| private final byte[] |
| Access | Constructor and Description |
|---|---|
| public | EncodedKeySpec(byte[]
the encoded key. The contents of the
array are copied to protect against subsequent modification. encodedKey)Creates a new |
| protected | EncodedKeySpec(byte[]
the encoded key. The contents of the
array are copied to protect against subsequent modification. encodedKey, String the algorithm name of the encoded key.
See the AsymmetricKey Algorithms section in the
Java Security Standard Algorithm Names Specification
for information about standard asymmetric key algorithm names. algorithm)Creates a new |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv void | |
| public String | Returns: the name of the algorithm, or null if not specifiedReturns the name of the algorithm of the encoded key. |
| public byte[] | Returns: the encoded key. Returns a new array each time this method is called.Returns the encoded key. |
| public abstract String | Returns: a string representation of the encoding format.Returns the name of the encoding format associated with this key specification. |
| algorithmName | back to summary |
|---|---|
| private String algorithmName | |
| encodedKey | back to summary |
|---|---|
| private final byte[] encodedKey | |
| EncodedKeySpec | back to summary |
|---|---|
| public EncodedKeySpec(byte[] encodedKey) Creates a new
| |
| EncodedKeySpec | back to summary |
|---|---|
| protected EncodedKeySpec(byte[] encodedKey, String algorithm) Creates a new
| |
| clear | back to summary |
|---|---|
| pack-priv void clear() Clear the encoding inside. | |
| getAlgorithm | back to summary |
|---|---|
| public String getAlgorithm() Returns the name of the algorithm of the encoded key.
| |
| getEncoded | back to summary |
|---|---|
| public byte[] getEncoded() Returns the encoded key.
| |
| getFormat | back to summary |
|---|---|
| public abstract String getFormat() Returns the name of the encoding format associated with this key specification. If the opaque representation of a key
(see
| |