public final class AwsKmsMrkAwareMasterKey extends MasterKey<AwsKmsMrkAwareMasterKey> implements KmsMethods
AwsCrypto. This
 key may be a multi region key, in which case this component is able to recognize different
 regional replicas of this multi region key as the same.| Modifier and Type | Method and Description | 
|---|---|
void | 
addGrantToken(String grantToken)
Adds  
grantToken to the list of grantTokens sent to KMS when this class calls it. | 
DataKey<AwsKmsMrkAwareMasterKey> | 
decryptDataKey(CryptoAlgorithm algorithm,
              Collection<? extends EncryptedDataKey> encryptedDataKeys,
              Map<String,String> encryptionContext)
Will attempt to decrypt if awsKmsArnMatchForDecrypt returns true in  
AwsKmsMrkAwareMasterKey#filterEncryptedDataKeys(String, AwsKmsCmkArnInfo, EncryptedDataKey). | 
DataKey<AwsKmsMrkAwareMasterKey> | 
encryptDataKey(CryptoAlgorithm algorithm,
              Map<String,String> encryptionContext,
              DataKey<?> dataKey)
Returns a new copy of the provided  
dataKey which is protected by this MasterKey
 for use with algorithm and associated with the provided encryptionContext. | 
DataKey<AwsKmsMrkAwareMasterKey> | 
generateDataKey(CryptoAlgorithm algorithm,
               Map<String,String> encryptionContext)
This is identical behavior to 
 | 
List<String> | 
getGrantTokens()
Returns the grantTokens which this object sends to KMS when calling it. 
 | 
String | 
getKeyId()  | 
String | 
getProviderId()  | 
void | 
setGrantTokens(List<String> grantTokens)
Clears and sets all grant tokens on this instance. 
 | 
canProvide, equals, getDefaultProviderId, getMasterKey, getMasterKeysForEncryption, hashCode, toStringbuildCannotDecryptDksException, buildCannotDecryptDksException, buildCannotDecryptDksException, getMasterKeypublic String getProviderId()
getProviderId in class MasterKey<AwsKmsMrkAwareMasterKey>public String getKeyId()
getKeyId in class MasterKey<AwsKmsMrkAwareMasterKey>public void setGrantTokens(List<String> grantTokens)
setGrantTokens in interface KmsMethodspublic List<String> getGrantTokens()
KmsMethodsgetGrantTokens in interface KmsMethodspublic void addGrantToken(String grantToken)
KmsMethodsgrantToken to the list of grantTokens sent to KMS when this class calls it.addGrantToken in interface KmsMethodspublic DataKey<AwsKmsMrkAwareMasterKey> generateDataKey(CryptoAlgorithm algorithm, Map<String,String> encryptionContext)
generateDataKey in class MasterKey<AwsKmsMrkAwareMasterKey>KmsMasterKey.generateDataKey(CryptoAlgorithm, Map)public DataKey<AwsKmsMrkAwareMasterKey> encryptDataKey(CryptoAlgorithm algorithm, Map<String,String> encryptionContext, DataKey<?> dataKey)
MasterKeydataKey which is protected by this MasterKey
 for use with algorithm and associated with the provided encryptionContext.encryptDataKey in class MasterKey<AwsKmsMrkAwareMasterKey>KmsMasterKey.encryptDataKey(CryptoAlgorithm, Map, DataKey)public DataKey<AwsKmsMrkAwareMasterKey> decryptDataKey(CryptoAlgorithm algorithm, Collection<? extends EncryptedDataKey> encryptedDataKeys, Map<String,String> encryptionContext) throws AwsCryptoException
AwsKmsMrkAwareMasterKey#filterEncryptedDataKeys(String, AwsKmsCmkArnInfo, EncryptedDataKey).
 An extension of KmsMasterKey.decryptDataKey(CryptoAlgorithm, Collection, Map) but with
 an awareness of the properties of multi-Region keys.decryptDataKey in class MasterKeyProvider<AwsKmsMrkAwareMasterKey>nullUnsupportedProviderException - if the encryptedDataKey is associated with an
     unsupported providerCannotUnwrapDataKeyException - if the encryptedDataKey cannot be decryptedAwsCryptoExceptionCopyright © 2023. All rights reserved.