Struct crypt_guard::keychain::Keychain
source · pub struct Keychain {
pub public_key: Option<PublicKey>,
pub secret_key: Option<SecretKey>,
pub shared_secret: Option<SharedSecret>,
pub ciphertext: Option<Ciphertext>,
}Fields§
§public_key: Option<PublicKey>§secret_key: Option<SecretKey>§ciphertext: Option<Ciphertext>Implementations§
source§impl Keychain
impl Keychain
pub fn new() -> Result<Self, CryptError>
pub fn new_keys(path: &str, name: &str) -> Result<Self, CryptError>
pub fn find_highest_numbered_file( dir_path: &Path, base_filename: &str, extension: &str ) -> Option<PathBuf>
pub fn show(&self) -> Result<(), CryptError>
pub async fn save(&self, base_path: &str, title: &str) -> Result<(), CryptError>
pub async fn save_keys( &self, base_path: &str, title: &str ) -> Result<(), CryptError>
pub async fn save_public_key( &self, base_path: &str, title: &str ) -> Result<(), CryptError>
pub async fn save_secret_key( &self, base_path: &str, title: &str ) -> Result<(), CryptError>
pub async fn save_ciphertext( &self, base_path: &str, title: &str ) -> Result<(), CryptError>
pub async fn load_public_key( &mut self, path: PathBuf ) -> Result<PublicKey, CryptError>
pub async fn load_secret_key( &mut self, path: PathBuf ) -> Result<SecretKey, CryptError>
pub async fn load_ciphertext( &mut self, path: PathBuf ) -> Result<Ciphertext, CryptError>
pub async fn get_public_key(&self) -> Result<PublicKey, CryptError>
pub async fn get_secret_key(&self) -> Result<SecretKey, CryptError>
pub async fn get_ciphertext(&self) -> Result<Ciphertext, CryptError>
pub fn generate_unique_filename(base_path: &str, extension: &str) -> String
Auto Trait Implementations§
impl RefUnwindSafe for Keychain
impl Send for Keychain
impl Sync for Keychain
impl Unpin for Keychain
impl UnwindSafe for Keychain
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