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 Freeze for KeyPair
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