Trait recrypt::api::Ed25519Signing [−]
pub trait Ed25519Signing { fn sign<T: Hashable>(
&self,
t: &T,
private_key: &PrivateSigningKey
) -> Signature; fn verify<T: Hashable>(
&self,
t: &T,
signature: &Signature,
public_key: &PublicSigningKey
) -> bool; }
Required Methods
fn sign<T: Hashable>(&self, t: &T, private_key: &PrivateSigningKey) -> Signature
Create a signature by signing over the bytes produced by the hashable instance of t
.
fn verify<T: Hashable>(
&self,
t: &T,
signature: &Signature,
public_key: &PublicSigningKey
) -> bool
&self,
t: &T,
signature: &Signature,
public_key: &PublicSigningKey
) -> bool
Use the public_key to verify that the signature was signed by its private key over the hashable bytes of t. Returns true if all the values are valid and the signature can be verified.
Implementors
impl Ed25519Signing for Ed25519