Struct crypt_guard::sign::Sign
source · pub struct Sign { /* private fields */ }Implementations§
source§impl Sign
impl Sign
pub fn new() -> Result<Self, SigningErr>
pub fn set_public_key(&mut self, public_key: PublicKey)
pub fn set_secret_key(&mut self, secret_key: SecretKey)
pub fn set_signed_msg(&mut self, signed_msg: SignedMessage)
pub fn set_signature(&mut self, signature: DetachedSignature)
pub async fn save_signed_msg( &self, base_path: &str, title: &str ) -> Result<(), SigningErr>
pub async fn save_keys( &self, base_path: &str, title: &str ) -> Result<(), CryptError>
pub fn public_key(&self) -> Option<&PublicKey>
pub fn secret_key(&self) -> Option<&SecretKey>
pub fn signed_msg(&self) -> Option<&SignedMessage>
pub fn signature(&self) -> Option<&DetachedSignature>
pub async fn sign_msg(&mut self, message: &[u8]) -> Result<&[u8], SigningErr>
pub async fn sign_file( &mut self, file_path: PathBuf ) -> Result<Vec<u8>, SigningErr>
pub async fn signing_detached( &mut self, message: &[u8] ) -> Result<DetachedSignature, SigningErr>
pub async fn verify_msg(&self, message: &[u8]) -> Result<Vec<u8>, SigningErr>
pub async fn verify_detached(&self, message: &[u8]) -> Result<bool, SigningErr>
Auto Trait Implementations§
impl RefUnwindSafe for Sign
impl Send for Sign
impl Sync for Sign
impl Unpin for Sign
impl UnwindSafe for Sign
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