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>
Trait Implementations§
Source§impl MasterKeyProvider for StaticMasterKeyProvider
impl MasterKeyProvider for StaticMasterKeyProvider
fn current_key(&self) -> [u8; 32]
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