public static class KeyProviderCryptoExtension.EncryptedKeyVersion extends Object
| Modifier | Constructor and Description | 
|---|---|
| protected  | KeyProviderCryptoExtension.EncryptedKeyVersion(String keyName,
                                                                                            String encryptionKeyVersionName,
                                                                                            byte[] encryptedKeyIv,
                                                                                            KeyProvider.KeyVersion encryptedKeyVersion)Create a new EncryptedKeyVersion. | 
| Modifier and Type | Method and Description | 
|---|---|
| static KeyProviderCryptoExtension.EncryptedKeyVersion | createForDecryption(String keyName,
                                      String encryptionKeyVersionName,
                                      byte[] encryptedKeyIv,
                                      byte[] encryptedKeyMaterial)Factory method to create a new EncryptedKeyVersion that can then be
 passed into  KeyProviderCryptoExtension.decryptEncryptedKey(org.apache.hadoop.crypto.key.KeyProviderCryptoExtension.EncryptedKeyVersion). | 
| protected static byte[] | deriveIV(byte[] encryptedKeyIV)Derive the initialization vector (IV) for the encryption key from the IV
 of the encrypted key. | 
| byte[] | getEncryptedKeyIv() | 
| KeyProvider.KeyVersion | getEncryptedKeyVersion() | 
| String | getEncryptionKeyName() | 
| String | getEncryptionKeyVersionName() | 
protected KeyProviderCryptoExtension.EncryptedKeyVersion(String keyName, String encryptionKeyVersionName, byte[] encryptedKeyIv, KeyProvider.KeyVersion encryptedKeyVersion)
keyName - Name of the encryption key used to
                                 encrypt the encrypted key.encryptionKeyVersionName - Version name of the encryption key used
                                 to encrypt the encrypted key.encryptedKeyIv - Initialization vector of the encrypted
                                 key. The IV of the encryption key used to
                                 encrypt the encrypted key is derived from
                                 this IV.encryptedKeyVersion - The encrypted encryption key version.public static KeyProviderCryptoExtension.EncryptedKeyVersion createForDecryption(String keyName, String encryptionKeyVersionName, byte[] encryptedKeyIv, byte[] encryptedKeyMaterial)
KeyProviderCryptoExtension.decryptEncryptedKey(org.apache.hadoop.crypto.key.KeyProviderCryptoExtension.EncryptedKeyVersion). Note that the fields of the
 returned EncryptedKeyVersion will only partially be populated; it is not
 necessarily suitable for operations besides decryption.keyName - Key name of the encryption key use to encrypt the
                encrypted key.encryptionKeyVersionName - Version name of the encryption key used
                                 to encrypt the encrypted key.encryptedKeyIv - Initialization vector of the encrypted
                                 key. The IV of the encryption key used to
                                 encrypt the encrypted key is derived from
                                 this IV.encryptedKeyMaterial - Key material of the encrypted key.public String getEncryptionKeyName()
public String getEncryptionKeyVersionName()
public byte[] getEncryptedKeyIv()
public KeyProvider.KeyVersion getEncryptedKeyVersion()
protected static byte[] deriveIV(byte[] encryptedKeyIV)
encryptedKeyIV - of the encrypted key (i.e. getEncryptedKeyIv())Copyright © 2017 Apache Software Foundation. All Rights Reserved.