[−][src]Trait keybear_core::crypto::StaticSecretExt
Add functions to the crypto secret key to make it easier to use.
Required methods
pub fn verify_file<P>(file: P) -> bool where
P: AsRef<Path>, [src]
P: AsRef<Path>,
Check whether there is a file containing the crypto keys.
pub fn new_with_os_rand() -> StaticSecret[src]
Generate a new secret key with the OS random number generator.
pub fn from_file<P>(file: P) -> Result<StaticSecret> where
P: AsRef<Path>, [src]
P: AsRef<Path>,
Try to load the crypto keys from our file on the disk.
pub fn save<P>(&self, file: P) -> Result<()> where
P: AsRef<Path>, [src]
P: AsRef<Path>,
Save the crypto keys to the file on the disk.
Provided methods
pub fn from_file_or_generate<P>(file: P) -> Result<StaticSecret> where
P: AsRef<Path>, [src]
P: AsRef<Path>,
Try to load the crypto key or generate a new one.
Implementations on Foreign Types
impl StaticSecretExt for StaticSecret[src]
pub fn verify_file<P>(file: P) -> bool where
P: AsRef<Path>, [src]
P: AsRef<Path>,
pub fn new_with_os_rand() -> StaticSecret[src]
pub fn from_file<P>(file: P) -> Result<StaticSecret> where
P: AsRef<Path>, [src]
P: AsRef<Path>,
pub fn save<P>(&self, file: P) -> Result<()> where
P: AsRef<Path>, [src]
P: AsRef<Path>,