pub struct EncryptedKeyStore { /* private fields */ }Expand description
Encrypted private key storage
Implementations§
Source§impl EncryptedKeyStore
impl EncryptedKeyStore
Sourcepub fn encrypt(private_key_pem: &str, passphrase: &str) -> Result<Self>
pub fn encrypt(private_key_pem: &str, passphrase: &str) -> Result<Self>
Encrypt a private key PEM with a passphrase
Uses Argon2id for key derivation and AES-256-GCM for encryption.
Sourcepub fn decrypt(&self, passphrase: &str) -> Result<String>
pub fn decrypt(&self, passphrase: &str) -> Result<String>
Decrypt the private key using the passphrase
Trait Implementations§
Source§impl Clone for EncryptedKeyStore
impl Clone for EncryptedKeyStore
Source§fn clone(&self) -> EncryptedKeyStore
fn clone(&self) -> EncryptedKeyStore
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for EncryptedKeyStore
impl Debug for EncryptedKeyStore
Source§impl<'de> Deserialize<'de> for EncryptedKeyStore
impl<'de> Deserialize<'de> for EncryptedKeyStore
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for EncryptedKeyStore
impl RefUnwindSafe for EncryptedKeyStore
impl Send for EncryptedKeyStore
impl Sync for EncryptedKeyStore
impl Unpin for EncryptedKeyStore
impl UnsafeUnpin for EncryptedKeyStore
impl UnwindSafe for EncryptedKeyStore
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