;
encryptRequest
.withGeneralProgressListener(req.getGeneralProgressListener())
.withRequestMetricCollector(req.getRequestMetricCollector())
;
EncryptResult encryptResult = kms.encrypt(encryptRequest);
byte[] keyBlob = copyAllBytesFrom(encryptResult.getCiphertextBlob());
return new KMSSecuredCEK(keyBlob);
}
Key kek;
if (materials.getKeyPair() != null) {
// Do envelope encryption with public key from key pair