public class KmsEncryptionMaterials extends Object implements EncryptionMaterials
Constructor and Description |
---|
KmsEncryptionMaterials(String region,
String cmk) |
KmsEncryptionMaterials(String region,
String cmk,
Map<String,String> desc) |
Modifier and Type | Method and Description |
---|---|
void |
addKmsDescMaterial(String region,
CredentialsProvider credentialsProvider,
Map<String,String> description)
Add other kms region credentialsProvider and descrption materials used for decryption.
|
void |
addKmsDescMaterial(String region,
Map<String,String> description)
Add other kms region and descrption materials used for decryption.
|
void |
decryptCEK(ContentCryptoMaterialRW contentMaterialRW)
Decrypt the encrypted content encryption key(cek) and encrypted iv and put
the result into
ContentCryptoMaterialRW . |
void |
encryptCEK(ContentCryptoMaterialRW contentMaterialRW)
Encrypt the content encryption key(cek) and iv, and put the result into
ContentCryptoMaterialRW . |
void |
setKmsCredentialsProvider(CredentialsProvider credentialsProvider)
Sets the credentials provider.
|
public void setKmsCredentialsProvider(CredentialsProvider credentialsProvider)
public void addKmsDescMaterial(String region, Map<String,String> description)
region
- region.description
- The descripton of encryption materails.public void addKmsDescMaterial(String region, CredentialsProvider credentialsProvider, Map<String,String> description)
region
- region.credentialsProvider
- The credential provider.description
- The descripton of encryption materails.public void encryptCEK(ContentCryptoMaterialRW contentMaterialRW)
ContentCryptoMaterialRW
.encryptCEK
in interface EncryptionMaterials
contentMaterialRW
- The materials that contans all content crypto info,
it must be constructed on outside and filled with the iv and cek.
Then it will be builded with the encrypted cek ,encrypted iv, key wrap algorithm
and encryption materials description by this method.public void decryptCEK(ContentCryptoMaterialRW contentMaterialRW)
ContentCryptoMaterialRW
.decryptCEK
in interface EncryptionMaterials
contentMaterialRW
- The materials that contans all content crypto info,
it must be constructed on outside and filled with the encrypted cek ,encrypted iv,
key wrap algorithm, encryption materials description and cek generator
algothrim. Then it will be builded with the cek iv parameters by this method.Copyright © 2021. All Rights Reserved.