Package org.apache.hadoop.fs
Class FileEncryptionInfo
java.lang.Object
org.apache.hadoop.fs.FileEncryptionInfo
- All Implemented Interfaces:
Serializable
FileEncryptionInfo encapsulates all the encryption-related information for
an encrypted file.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionFileEncryptionInfo(CipherSuite suite, CryptoProtocolVersion version, byte[] edek, byte[] iv, String keyName, String ezKeyVersionName) Create a FileEncryptionInfo. -
Method Summary
Modifier and TypeMethodDescriptionbyte[]byte[]getIV()toString()A frozen version oftoString()to be backward compatible.
-
Constructor Details
-
FileEncryptionInfo
public FileEncryptionInfo(CipherSuite suite, CryptoProtocolVersion version, byte[] edek, byte[] iv, String keyName, String ezKeyVersionName) Create a FileEncryptionInfo.- Parameters:
suite- CipherSuite used to encrypt the fileedek- encrypted data encryption key (EDEK) of the fileiv- initialization vector (IV) used to encrypt the filekeyName- name of the key used for the encryption zoneezKeyVersionName- name of the KeyVersion used to encrypt the encrypted data encryption key.version- version.
-
-
Method Details
-
getCipherSuite
- Returns:
CipherSuiteused to encrypt the file.
-
getCryptoProtocolVersion
- Returns:
CryptoProtocolVersionto use to access the file.
-
getEncryptedDataEncryptionKey
public byte[] getEncryptedDataEncryptionKey()- Returns:
- encrypted data encryption key (EDEK) for the file
-
getIV
public byte[] getIV()- Returns:
- initialization vector (IV) for the cipher used to encrypt the file
-
getKeyName
- Returns:
- name of the encryption zone key.
-
getEzKeyVersionName
- Returns:
- name of the encryption zone KeyVersion used to encrypt the encrypted data encryption key (EDEK).
-
toString
-
toStringStable
A frozen version oftoString()to be backward compatible. When backward compatibility is not needed, usetoString(), which provides more info and is supposed to evolve. Don't change this method except for major revisions. NOTE: Currently this method is used by CLI for backward compatibility.- Returns:
- stable string.
-