public class KeySpec extends Object
Constructor and Description |
---|
KeySpec(byte[] key,
String format)
Constructor for the KeySpec.
|
Modifier and Type | Method and Description |
---|---|
String |
getAlgorithm()
Gets the algorithm associated to that key." should be "Gets the algorithm associated with that key.
|
String |
getFormat()
Key's format of encoding.
|
byte[] |
getKeyEncoded()
The encoded key material.
|
String |
getLabel()
Returns this key label.
|
String |
getUsage()
Returns the usage for that key.
|
void |
setAlgorithm(String algorithm)
Sets the algorithm associated to that key." should be "Sets the algorithm associated with that key.
|
void |
setLabel(String label)
Sets this key label.
|
void |
setUsage(String usage)
Sets a usage for that key.
|
public KeySpec(byte[] key, String format)
key
- the encoded key material.format
- key's format of encoding. Format of the supported key is 'jwk' where the key is returned as JSON Key (as in Key.getFormat()
). Only secret key types are supported.public void setAlgorithm(String algorithm)
algorithm
- algorithm namepublic void setLabel(String label)
label
- label of key in storepublic void setUsage(String usage)
usage
- usage for that keypublic String getAlgorithm()
public String getLabel()
public String getUsage()
public byte[] getKeyEncoded()
public String getFormat()
Copyright © 2005-2020 HID Global Corporation/ASSA ABLOY AB.