pub struct Sign {
pub public_key: Option<PublicKey>,
pub secret_key: Option<SecretKey>,
pub signed_msg: Option<SignedMessage>,
pub signature: Option<DetachedSignature>,
}Fields§
§public_key: Option<PublicKey>§secret_key: Option<SecretKey>§signed_msg: Option<SignedMessage>§signature: Option<DetachedSignature>Implementations§
Source§impl Sign
impl Sign
pub fn new() -> Result<Self, SigningErr>
pub async fn set_public_key(&mut self, public_key: PublicKey)
pub async fn set_secret_key(&mut self, secret_key: SecretKey)
pub async fn set_signed_msg(&mut self, signed_msg: SignedMessage)
pub async 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<(), SigningErr>
pub async fn public_key(&self) -> Option<&PublicKey>
pub async fn secret_key(&self) -> Option<&SecretKey>
pub async fn signed_msg(&self) -> Option<&SignedMessage>
pub async fn signature(&self) -> Option<&DetachedSignature>
pub async fn load_secret_key( &mut self, path: PathBuf, ) -> Result<&SecretKey, SigningErr>
pub async fn load_public_key( &mut self, path: PathBuf, ) -> Result<&PublicKey, SigningErr>
pub async fn load_signed_msg( &mut self, path: PathBuf, ) -> Result<&SignedMessage, SigningErr>
pub async fn load_signature( &mut self, path: PathBuf, ) -> Result<&DetachedSignature, SigningErr>
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 Freeze for Sign
impl RefUnwindSafe for Sign
impl Send for Sign
impl Sync for Sign
impl Unpin for Sign
impl UnsafeUnpin 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