pub struct KeyPair<S, V>{
pub signer: SigningKey<S>,
pub verifier: VerifyKey<V>,
}Fields§
§signer: SigningKey<S>§verifier: VerifyKey<V>Implementations§
Source§impl<S, V> KeyPair<S, V>
impl<S, V> KeyPair<S, V>
pub fn new(signer: S, verifier: V) -> KeyPair<S, V>
pub fn sign(&self, msg: &[u8]) -> Signature
pub fn verify(&self, msg: &[u8], sig: &Signature) -> Result<(), Error>
pub fn public_key(&self) -> Result<PublicKey, Error>
Sourcepub fn sign_decorated(&self, message: &[u8]) -> DecoratedSignature
pub fn sign_decorated(&self, message: &[u8]) -> DecoratedSignature
Sign the message together with the signature hint.
Sourcepub fn signature_hint(&self) -> SignatureHint
pub fn signature_hint(&self) -> SignatureHint
Return the signature hint, that is the last 4 bytes of the public key.
Trait Implementations§
Source§impl AsRef<KeyPair<SecretKey, VerifyingKey>> for DalekKeyPair
impl AsRef<KeyPair<SecretKey, VerifyingKey>> for DalekKeyPair
Source§impl<S, V> PartialEq for KeyPair<S, V>where
S: Ed25519Signer<Signature> + PartialEq,
V: Ed25519Verifier<Signature> + AsRef<[u8]> + PartialEq,
impl<S, V> PartialEq for KeyPair<S, V>where
S: Ed25519Signer<Signature> + PartialEq,
V: Ed25519Verifier<Signature> + AsRef<[u8]> + PartialEq,
impl<S, V> StructuralPartialEq for KeyPair<S, V>
Auto Trait Implementations§
impl<S, V> Freeze for KeyPair<S, V>
impl<S, V> RefUnwindSafe for KeyPair<S, V>where
S: RefUnwindSafe,
V: RefUnwindSafe,
impl<S, V> Send for KeyPair<S, V>
impl<S, V> Sync for KeyPair<S, V>
impl<S, V> Unpin for KeyPair<S, V>
impl<S, V> UnwindSafe for KeyPair<S, V>where
S: UnwindSafe,
V: UnwindSafe,
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