Package org.apache.iceberg.encryption
Class StandardEncryptionManager
java.lang.Object
org.apache.iceberg.encryption.StandardEncryptionManager
- All Implemented Interfaces:
- Serializable,- EncryptionManager
- See Also:
- 
Constructor SummaryConstructorsConstructorDescriptionStandardEncryptionManager(String tableKeyId, int dataKeyLength, KeyManagementClient kmsClient) 
- 
Method SummaryModifier and TypeMethodDescriptiondecrypt(Iterable<EncryptedInputFile> encrypted) Variant ofEncryptionManager.decrypt(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 anInputFilethat returns decrypted input streams.encrypt(OutputFile plainOutput) Given a handle on anOutputFilethat 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.unwrapKey(ByteBuffer wrappedSecretKey) wrapKey(ByteBuffer secretKey) Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.iceberg.encryption.EncryptionManagerencrypt
- 
Constructor Details- 
StandardEncryptionManagerpublic StandardEncryptionManager(String tableKeyId, int dataKeyLength, KeyManagementClient kmsClient) - Parameters:
- tableKeyId- table encryption key id
- dataKeyLength- length of data encryption key (16/24/32 bytes)
- kmsClient- Client of KMS used to wrap/unwrap keys in envelope encryption
 
 
- 
- 
Method Details- 
encryptDescription copied from interface:EncryptionManagerGiven a handle on anOutputFilethat 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.- Specified by:
- encryptin interface- EncryptionManager
 
- 
decryptDescription copied from interface:EncryptionManagerGiven anEncryptedInputFile.encryptedInputFile()representing the raw encrypted bytes from the underlying file system, and given metadata about how the file was encrypted viaEncryptedInputFile.keyMetadata(), return anInputFilethat returns decrypted input streams.- Specified by:
- decryptin interface- EncryptionManager
 
- 
decryptDescription copied from interface:EncryptionManagerVariant ofEncryptionManager.decrypt(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. - Specified by:
- decryptin interface- EncryptionManager
 
- 
wrapKey
- 
unwrapKey
 
-