pub struct FileEncryptionProperties { /* private fields */ }
Expand description
Defines how data in a Parquet file should be encrypted
The FileEncryptionProperties
should be included in the WriterProperties
used to write a file by using WriterPropertiesBuilder::with_file_encryption_properties
.
§Examples
Create FileEncryptionProperties
for a file encrypted with uniform encryption,
where all metadata and data are encrypted with the footer key:
let file_encryption_properties = FileEncryptionProperties::builder(b"0123456789012345".into())
.build()?;
Create properties for a file where columns are encrypted with different keys. Any columns without a key specified will be unencrypted:
let file_encryption_properties = FileEncryptionProperties::builder(b"0123456789012345".into())
.with_column_key("x", b"1234567890123450".into())
.with_column_key("y", b"1234567890123451".into())
.build()?;
Specify additional authenticated data, used to protect against data replacement. This should represent the file identity:
let file_encryption_properties = FileEncryptionProperties::builder(b"0123456789012345".into())
.with_aad_prefix("example_file".into())
.build()?;
Implementations§
Source§impl FileEncryptionProperties
impl FileEncryptionProperties
Sourcepub fn builder(footer_key: Vec<u8>) -> EncryptionPropertiesBuilder
pub fn builder(footer_key: Vec<u8>) -> EncryptionPropertiesBuilder
Create a new builder for encryption properties with the given footer encryption key
Should the footer be encrypted
Retrieval metadata of key used for encryption of footer and (possibly) columns
Retrieval of key used for encryption of footer and (possibly) columns
Sourcepub fn column_keys(&self) -> (Vec<String>, Vec<Vec<u8>>, Vec<Vec<u8>>)
pub fn column_keys(&self) -> (Vec<String>, Vec<Vec<u8>>, Vec<Vec<u8>>)
Get the column names, keys, and metadata for columns to be encrypted
Sourcepub fn aad_prefix(&self) -> Option<&Vec<u8>>
pub fn aad_prefix(&self) -> Option<&Vec<u8>>
AAD prefix string uniquely identifies the file and prevents file swapping
Sourcepub fn store_aad_prefix(&self) -> bool
pub fn store_aad_prefix(&self) -> bool
Should the AAD prefix be stored in the file
Trait Implementations§
Source§impl Clone for FileEncryptionProperties
impl Clone for FileEncryptionProperties
Source§fn clone(&self) -> FileEncryptionProperties
fn clone(&self) -> FileEncryptionProperties
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for FileEncryptionProperties
impl Debug for FileEncryptionProperties
Source§impl From<&FileEncryptionProperties> for ConfigFileEncryptionProperties
impl From<&FileEncryptionProperties> for ConfigFileEncryptionProperties
Source§fn from(f: &FileEncryptionProperties) -> ConfigFileEncryptionProperties
fn from(f: &FileEncryptionProperties) -> ConfigFileEncryptionProperties
Source§impl From<ConfigFileEncryptionProperties> for FileEncryptionProperties
impl From<ConfigFileEncryptionProperties> for FileEncryptionProperties
Source§fn from(val: ConfigFileEncryptionProperties) -> FileEncryptionProperties
fn from(val: ConfigFileEncryptionProperties) -> FileEncryptionProperties
Source§impl PartialEq for FileEncryptionProperties
impl PartialEq for FileEncryptionProperties
impl StructuralPartialEq for FileEncryptionProperties
Auto Trait Implementations§
impl Freeze for FileEncryptionProperties
impl RefUnwindSafe for FileEncryptionProperties
impl Send for FileEncryptionProperties
impl Sync for FileEncryptionProperties
impl Unpin for FileEncryptionProperties
impl UnwindSafe for FileEncryptionProperties
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more