Struct crypt_guard::SignDilithium
source · pub struct SignDilithium {
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 SignDilithium
impl SignDilithium
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<(), CryptError>
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 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 SignDilithium
impl Send for SignDilithium
impl Sync for SignDilithium
impl Unpin for SignDilithium
impl UnwindSafe for SignDilithium
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