Constructor and Description |
---|
KmsMasterKey(BasicAuthenticationDetailsProvider authenticationDetailsProvider,
String region,
String vaultId,
String kmsMasterKeyId)
Initialize KmsMasterKey for encryption.
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Close the OCI clients.
|
String |
decryptDataKey(String encryptedDataKey,
String kmsMasterKeyId)
Decrypt Data key.
|
DataKey |
generateDataEncryptionKey(CryptoAlgorithm cryptoAlgorithm)
Generate Data encryption key.
|
String |
getKmsMasterKeyId() |
BasicAuthenticationDetailsProvider |
getProvider() |
String |
getRegion() |
String |
getVaultId() |
public KmsMasterKey(BasicAuthenticationDetailsProvider authenticationDetailsProvider, String region, String vaultId, String kmsMasterKeyId)
Initialize KmsMasterKey for encryption. It creates the clients needed to get Keys from OCI KMS service.
authenticationDetailsProvider
- Authentication Provider for OCI.region
- OCI RegionvaultId
- The OCID of the vault.kmsMasterKeyId
- The OCID of the KMS master key.public DataKey generateDataEncryptionKey(CryptoAlgorithm cryptoAlgorithm)
Generate Data encryption key.
generateDataEncryptionKey
in interface MasterKey
cryptoAlgorithm
- Crypto Algorithm.public String decryptDataKey(String encryptedDataKey, String kmsMasterKeyId)
Decrypt Data key.
decryptDataKey
in interface MasterKey
encryptedDataKey
- encryptedDataKey.kmsMasterKeyId
- masterKeyId.public void close()
Close the OCI clients.
public BasicAuthenticationDetailsProvider getProvider()
public String getVaultId()
public String getKmsMasterKeyId()
public String getRegion()
Copyright © 2016–2024. All rights reserved.