Package com.amazonaws.services.kms.model

Examples of com.amazonaws.services.kms.model.EncryptRequest


    private static SecuredCEK secureCEK(SecretKey cek,
            EncryptionMaterials materials, S3KeyWrapScheme kwScheme,
            SecureRandom srand, Provider p, AWSKMSClient kms,
            AmazonWebServiceRequest req) {
        if (materials.isKMSEnabled()) {
            EncryptRequest encryptRequest = new EncryptRequest()
                .withEncryptionContext(materials.getMaterialsDescription())
                .withKeyId(materials.getCustomerMasterKeyId())
                .withPlaintext(ByteBuffer.wrap(cek.getEncoded()))
                ;
            encryptRequest
                .withGeneralProgressListener(req.getGeneralProgressListener())
                .withRequestMetricCollector(req.getRequestMetricCollector())
                ;
            EncryptResult encryptResult = kms.encrypt(encryptRequest);
            byte[] keyBlob = copyAllBytesFrom(encryptResult.getCiphertextBlob());
View Full Code Here

TOP

Related Classes of com.amazonaws.services.kms.model.EncryptRequest

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.