Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  * Copyright 2014-2015, Inc. or its affiliates. All Rights Reserved.
  * Portions copyright 2006-2009 James Murty. Please see LICENSE.txt
  * for applicable license terms and NOTICE.txt for applicable notices.
  * Licensed under the Apache License, Version 2.0 (the "License").
  * You may not use this file except in compliance with the License.
  * A copy of the License is located at
 * or in the "license" file accompanying this file. This file is distributed
 * express or implied. See the License for the specific language governing
 * permissions and limitations under the License.

Internal class used to carry both the secured CEK and the key wrapping algorithm, if any. Byte array cloning is intentionally skipped for performance reasons.
class SecuredCEK {
The encrypted CEK either via key wrapping or simple encryption.
    private final byte[] encrypted;
The key wrapping algorithm used, or null if the CEK is not secured via key wrapping.
    private final String keyWrapAlgorithm;
    SecuredCEK(byte[] encryptedKeyString keyWrapAlgorithm) {
        this. = encryptedKey;
        this. = keyWrapAlgorithm;
    byte[] getEncrypted() {
        return ;
        return ;
New to GrepCode? Check out our FAQ X