Class FileEncryptionInfo

java.lang.Object
org.apache.hadoop.fs.FileEncryptionInfo
All Implemented Interfaces:
Serializable

@Private public class FileEncryptionInfo extends Object implements Serializable
FileEncryptionInfo encapsulates all the encryption-related information for an encrypted file.
See Also:
  • 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 file
      edek - encrypted data encryption key (EDEK) of the file
      iv - initialization vector (IV) used to encrypt the file
      keyName - name of the key used for the encryption zone
      ezKeyVersionName - name of the KeyVersion used to encrypt the encrypted data encryption key.
      version - version.
  • Method Details

    • getCipherSuite

      public CipherSuite getCipherSuite()
      Returns:
      CipherSuite used to encrypt the file.
    • getCryptoProtocolVersion

      public CryptoProtocolVersion getCryptoProtocolVersion()
      Returns:
      CryptoProtocolVersion to 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

      public String getKeyName()
      Returns:
      name of the encryption zone key.
    • getEzKeyVersionName

      public String getEzKeyVersionName()
      Returns:
      name of the encryption zone KeyVersion used to encrypt the encrypted data encryption key (EDEK).
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • toStringStable

      public String toStringStable()
      A frozen version of toString() to be backward compatible. When backward compatibility is not needed, use toString(), 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.