Struct efficient_sm2::KeyPair
source · pub struct KeyPair { /* private fields */ }Implementations§
source§impl KeyPair
impl KeyPair
pub fn new(private_key: &[u8]) -> Result<Self, KeyRejectedError>
pub fn public_key(&self) -> PublicKey
pub fn sign(&self, message: &[u8]) -> Result<Signature, KeyRejectedError>
pub fn sign_with_seed( &self, rng: &mut dyn SecureRandom, message: &[u8] ) -> Result<Signature, KeyRejectedError>
pub fn sign_digest( &self, rng: &mut dyn SecureRandom, digest: &[u8] ) -> Result<Signature, KeyRejectedError>
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for KeyPair
impl Send for KeyPair
impl Sync for KeyPair
impl Unpin for KeyPair
impl UnwindSafe for KeyPair
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