pub struct KeyRotationManager { /* private fields */ }Expand description
Key rotation manager
Implementations§
Source§impl KeyRotationManager
impl KeyRotationManager
Sourcepub fn new(provider: EncryptionProvider) -> Self
pub fn new(provider: EncryptionProvider) -> Self
Create a new key rotation manager
Sourcepub fn rotate_key(
&self,
new_key_id: String,
new_key: Vec<u8>,
) -> Result<(), EncryptionError>
pub fn rotate_key( &self, new_key_id: String, new_key: Vec<u8>, ) -> Result<(), EncryptionError>
Rotate to a new key
Sourcepub fn reencrypt_data(
&self,
old_encrypted: &EncryptedData,
) -> Result<EncryptedData, EncryptionError>
pub fn reencrypt_data( &self, old_encrypted: &EncryptedData, ) -> Result<EncryptedData, EncryptionError>
Re-encrypt data with the current active key
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for KeyRotationManager
impl RefUnwindSafe for KeyRotationManager
impl Send for KeyRotationManager
impl Sync for KeyRotationManager
impl Unpin for KeyRotationManager
impl UnwindSafe for KeyRotationManager
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
Mutably borrows from an owned value. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§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