Interface DecryptionKeyRetriever

All Known Implementing Classes:
FileKeyUnwrapper

public interface DecryptionKeyRetriever
Interface for classes retrieving encryption keys using the key metadata. Implementations must be thread-safe, if same KeyRetriever object is passed to multiple file readers.
  • Method Summary

    Modifier and Type
    Method
    Description
    byte[]
    getKey(byte[] keyMetaData)
    Returns encryption key using the key metadata.
  • Method Details

    • getKey

      byte[] getKey(byte[] keyMetaData) throws KeyAccessDeniedException, ParquetCryptoRuntimeException
      Returns encryption key using the key metadata. If your key retrieval code throws runtime exceptions related to access control (permission) problems (such as Hadoop AccessControlException), catch them and throw the KeyAccessDeniedException.
      Parameters:
      keyMetaData - arbitrary byte array with encryption key metadata
      Returns:
      encryption key. Key length can be either 16, 24 or 32 bytes.
      Throws:
      KeyAccessDeniedException - thrown upon access control problems (authentication or authorization)
      ParquetCryptoRuntimeException - thrown upon key retrieval problems unrelated to access control