Package org.apache.iceberg.encryption
Interface EncryptionManager
- All Superinterfaces:
Serializable
- All Known Implementing Classes:
PlaintextEncryptionManager
,StandardEncryptionManager
Module for encrypting and decrypting table data files.
This must be serializable because an instance may be instantiated in one place and sent across the wire in some Iceberg integrations, notably Spark.
-
Method Summary
Modifier and TypeMethodDescriptiondecrypt
(Iterable<EncryptedInputFile> encrypted) Variant ofdecrypt(EncryptedInputFile)
that provides a sequence of files that all need to be decrypted in a single context.decrypt
(EncryptedInputFile encrypted) Given anEncryptedInputFile.encryptedInputFile()
representing the raw encrypted bytes from the underlying file system, and given metadata about how the file was encrypted viaEncryptedInputFile.keyMetadata()
, return anInputFile
that returns decrypted input streams.default Iterable<EncryptedOutputFile>
encrypt
(Iterable<OutputFile> rawOutput) Variant ofencrypt(OutputFile)
that provides a sequence of files that all need to be encrypted in a single context.encrypt
(OutputFile rawOutput) Given a handle on anOutputFile
that writes raw bytes to the underlying file system, return a bundle of anEncryptedOutputFile.encryptingOutputFile()
that writes encrypted bytes to the underlying file system, and theEncryptedOutputFile.keyMetadata()
that points to the encryption key that is being used to encrypt this file.
-
Method Details
-
decrypt
Given anEncryptedInputFile.encryptedInputFile()
representing the raw encrypted bytes from the underlying file system, and given metadata about how the file was encrypted viaEncryptedInputFile.keyMetadata()
, return anInputFile
that returns decrypted input streams. -
decrypt
Variant ofdecrypt(EncryptedInputFile)
that provides a sequence of files that all need to be decrypted in a single context.By default this calls the single-file decryption method for each element in the iterator. Implementations can override this for a variety of optimizations. For example, an implementation can perform lookahead on the input iterator and fetch encryption keys in batch.
-
encrypt
Given a handle on anOutputFile
that writes raw bytes to the underlying file system, return a bundle of anEncryptedOutputFile.encryptingOutputFile()
that writes encrypted bytes to the underlying file system, and theEncryptedOutputFile.keyMetadata()
that points to the encryption key that is being used to encrypt this file. -
encrypt
Variant ofencrypt(OutputFile)
that provides a sequence of files that all need to be encrypted in a single context.By default this calls the single-file encryption method for each element in the iterator. Implementations can override this for a variety of optimizations. For example, an implementation can perform lookahead on the input iterator and fetch encryption keys in batch.
-