pub struct StaticMasterKeyProvider { /* private fields */ }Expand description
v1 master key source: a hex-encoded 32-byte key from an env var, or (if
the env var holds a path instead) read from a file. Swappable later for
a KMS-backed provider without touching Barrier or its callers.
Implementations§
Source§impl StaticMasterKeyProvider
impl StaticMasterKeyProvider
pub fn from_hex(hex_key: &str) -> Result<Self, CryptoError>
pub fn from_env(var: &str) -> Result<Self, CryptoError>
Sourcepub fn with_retired_from_env(self, var: &str) -> Result<Self, CryptoError>
pub fn with_retired_from_env(self, var: &str) -> Result<Self, CryptoError>
Adds decrypt-only keys from a comma-separated env var. Absent or empty is normal — it means no rotation is in flight.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for StaticMasterKeyProvider
impl RefUnwindSafe for StaticMasterKeyProvider
impl Send for StaticMasterKeyProvider
impl Sync for StaticMasterKeyProvider
impl Unpin for StaticMasterKeyProvider
impl UnsafeUnpin for StaticMasterKeyProvider
impl UnwindSafe for StaticMasterKeyProvider
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