pub struct EncryptionAtRest { /* private fields */ }Expand description
Encryption at rest
Implementations§
Source§impl EncryptionAtRest
impl EncryptionAtRest
pub fn new() -> Self
pub fn initialize(&mut self) -> Result<(), CryptographicError>
Sourcepub fn encrypt_key_data(
&self,
plaintext: &[u8],
) -> Result<Vec<u8>, CryptographicError>
pub fn encrypt_key_data( &self, plaintext: &[u8], ) -> Result<Vec<u8>, CryptographicError>
Encrypt key data using the master KEK via AES-256-GCM. Returns (ciphertext, nonce, tag) tuple flattened into a single Vec with layout: [12-byte nonce | 16-byte tag | ciphertext].
Sourcepub fn decrypt_key_data(
&self,
packed: &[u8],
) -> Result<Vec<u8>, CryptographicError>
pub fn decrypt_key_data( &self, packed: &[u8], ) -> Result<Vec<u8>, CryptographicError>
Decrypt key data previously encrypted with encrypt_key_data.
Sourcepub fn is_enabled(&self) -> bool
pub fn is_enabled(&self) -> bool
Check if encryption at rest is enabled (KEK exists).
Sourcepub fn encryption_algorithm(&self) -> &EncryptionAlgorithm
pub fn encryption_algorithm(&self) -> &EncryptionAlgorithm
Get the encryption algorithm used at rest.
Sourcepub fn set_encryption_algorithm(&mut self, algorithm: EncryptionAlgorithm)
pub fn set_encryption_algorithm(&mut self, algorithm: EncryptionAlgorithm)
Set the encryption algorithm used at rest.
Sourcepub fn encryption_policy(&self) -> &EncryptionPolicy
pub fn encryption_policy(&self) -> &EncryptionPolicy
Get the encryption policy governing encryption at rest.
Sourcepub fn set_encryption_policy(&mut self, policy: EncryptionPolicy)
pub fn set_encryption_policy(&mut self, policy: EncryptionPolicy)
Set the encryption policy governing encryption at rest.
Auto Trait Implementations§
impl Freeze for EncryptionAtRest
impl RefUnwindSafe for EncryptionAtRest
impl Send for EncryptionAtRest
impl Sync for EncryptionAtRest
impl Unpin for EncryptionAtRest
impl UnsafeUnpin for EncryptionAtRest
impl UnwindSafe for EncryptionAtRest
Blanket Implementations§
§impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
Aggregate shares in an MPC protocol.
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
Mutably borrows from an owned value. Read more
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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>
Converts
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>
Converts
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