public class Hsk extends Object implements Serializable
This class holds information about a key managed in an HSM (Hardware Security Module).
| Constructor and Description |
|---|
Hsk() |
| Modifier and Type | Method and Description |
|---|---|
String |
getAlg()
Get the algorithm of the key on the HSM.
|
String |
getHandle()
Get the handle for the key on the HSM.
|
String |
getHsmName()
Get the name of the HSM.
|
String |
getKid()
Get the key ID for the key on the HSM.
|
String |
getKty()
Get the key type of the key on the HSM.
|
String |
getPublicKey()
Get the public key that corresponds to the key on the HSM.
|
String |
getUse()
Get the use of the key on the HSM.
|
Hsk |
setAlg(String alg)
Set the algorithm of the key on the HSM.
|
Hsk |
setHandle(String handle)
Set the handle for the key on the HSM.
|
Hsk |
setHsmName(String hsmName)
Set the name of the HSM.
|
Hsk |
setKid(String kid)
Set the key ID for the key on the HSM.
|
Hsk |
setKty(String kty)
Set the key type of the key on the HSM.
|
Hsk |
setPublicKey(String publicKey)
Set the public key that corresponds to the key on the HSM.
|
Hsk |
setUse(String use)
Set the use of the key on the HSM.
|
public String getKty()
"EC" or "RSA".public Hsk setKty(String kty)
kty - The key type. "EC" or "RSA".this object.public String getUse()
When the key use is "sig" (signature), the private key on the
HSM is used to sign data and the corresponding public key is used to
verify the signature.
When the key use is "enc" (encryption), the private key on the
HSM is used to decrypt encrypted data which have been encrypted with the
corresponding public key.
"sig" (signature) or "enc"
(encryption).public Hsk setUse(String use)
When the key use is "sig" (signature), the private key on the
HSM is used to sign data and the corresponding public key is used to
verify the signature.
When the key use is "enc" (encryption), the private key on the
HSM is used to decrypt encrypted data which have been encrypted with the
corresponding public key.
use - The key use. "sig" (signature) or "enc"
(encryption).this object.public String getAlg()
When the key use is "sig", the algorithm represents a signing
algorithm such as "ES256".
When the key use is "enc", the algorithm represents an
encryption algorithm such as "RSA-OAEP-256".
public Hsk setAlg(String alg)
When the key use is "sig", the algorithm represents a signing
algorithm such as "ES256".
When the key use is "enc", the algorithm represents an
encryption algorithm such as "RSA-OAEP-256".
alg - The algorithm.this object.public String getKid()
public Hsk setKid(String kid)
kid - The key ID.this object.public String getHsmName()
The identifier for the HSM that sits behind the Authlete server.
For example, "google".
public Hsk setHsmName(String hsmName)
The identifier for the HSM that sits behind the Authlete server.
For example, "google".
hsmName - The name of the HSM.this object.public String getHandle()
A handle is a base64url-encoded 256-bit random value (43 letters)
which is assigned by Authlete on the call of the /api/hsk/create
API.
A handle is needed to call the /api/hsk/get/{handle} API
and the /api/hsk/delete/{handle} API.
public Hsk setHandle(String handle)
A handle is a base64url-encoded 256-bit random value (43 letters)
which is assigned by Authlete on the call of the /api/hsk/create
API.
A handle is needed to call the /api/hsk/get/{handle} API
and the /api/hsk/delete/{handle} API.
handle - The handle.this object.public String getPublicKey()
Copyright © 2022. All rights reserved.