Trait recrypt::api_480::Ed25519Signing [−]
pub trait Ed25519Signing {
fn sign<T: Hashable>(
&self,
t: &T,
signing_key: &SigningKeypair
) -> Ed25519Signature;
fn verify<T: Hashable>(
&self,
t: &T,
signature: &Ed25519Signature,
public_key: &PublicSigningKey
) -> bool;
}
Required methods
fn sign<T: Hashable>(
&self,
t: &T,
signing_key: &SigningKeypair
) -> Ed25519Signature
fn sign<T: Hashable>(
&self,
t: &T,
signing_key: &SigningKeypair
) -> Ed25519Signature
Create a signature by signing over the bytes produced by the hashable instance of t
.
fn verify<T: Hashable>(
&self,
t: &T,
signature: &Ed25519Signature,
public_key: &PublicSigningKey
) -> bool
fn verify<T: Hashable>(
&self,
t: &T,
signature: &Ed25519Signature,
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.