public class AzureKeyVault extends HSM
| Constructor and Description |
|---|
AzureKeyVault(String clientId,
String clientCredentials,
String tenantId,
String keyVaultId)
Constructor to initialise an HSM object.
|
| Modifier and Type | Method and Description |
|---|---|
byte[] |
decrypt(String algorithm,
byte[] cipherText)
Decrypts an array of bytes with a particular algorithm using the Azure Key Vault.
|
byte[] |
encrypt(String algorithm,
byte[] plainText)
Encrypts an array of bytes with a particular algorithm using the Azure Key Vault.
|
void |
setClient()
Sets the client to connect to the Azure Key Vault.
|
byte[] |
unwrapKey(String algorithmUrl,
byte[] wrappedKey)
Unwraps a key with a particular algorithm using the Azure Key Vault.
|
byte[] |
wrapKey(String algorithm,
byte[] key)
Wraps a key with a particular algorithm using the Azure Key Vault.
|
public AzureKeyVault(String clientId, String clientCredentials, String tenantId, String keyVaultId)
clientId - The Azure Key Vault client ID.clientCredentials - The Azure Key Vault client credentials.tenantId - The Azure Key Vault tenant ID.keyVaultId - The Azure Key Vault ID.public void setClient()
public byte[] wrapKey(String algorithm, byte[] key)
public byte[] unwrapKey(String algorithmUrl, byte[] wrappedKey)
public byte[] encrypt(String algorithm, byte[] plainText)
public byte[] decrypt(String algorithm, byte[] cipherText)
Copyright © 2021. All rights reserved.