in sdk1/src/main/java/com/amazonaws/services/dynamodbv2/datamodeling/encryption/providers/DirectKmsMaterialProvider.java [83:109]
public DirectKmsMaterialProvider(
AWSKMS kms, String encryptionKeyId, Map<String, String> materialDescription) {
this.kms = kms;
this.encryptionKeyId = encryptionKeyId;
this.description =
materialDescription != null
? Collections.unmodifiableMap(new HashMap<>(materialDescription))
: Collections.<String, String>emptyMap();
dataKeyDesc =
description.containsKey(WrappedRawMaterials.CONTENT_KEY_ALGORITHM)
? description.get(WrappedRawMaterials.CONTENT_KEY_ALGORITHM)
: DEFAULT_ENC_ALG;
String[] parts = dataKeyDesc.split("/", 2);
this.dataKeyAlg = parts[0];
this.dataKeyLength = parts.length == 2 ? Integer.parseInt(parts[1]) : 256;
sigKeyDesc =
description.containsKey(SIGNING_KEY_ALGORITHM)
? description.get(SIGNING_KEY_ALGORITHM)
: DEFAULT_SIG_ALG;
parts = sigKeyDesc.split("/", 2);
this.sigKeyAlg = parts[0];
this.sigKeyLength = parts.length == 2 ? Integer.parseInt(parts[1]) : 256;
}