Add verify() to the Signer trait
And implement it for Blog and User
This commit is contained in:
@@ -20,6 +20,8 @@ pub trait Signer {
|
||||
|
||||
/// Sign some data with the signer keypair
|
||||
fn sign(&self, to_sign: String) -> Vec<u8>;
|
||||
/// Verify if the signature is valid
|
||||
fn verify(&self, data: String, signature: Vec<u8>) -> bool;
|
||||
}
|
||||
|
||||
pub trait Signable {
|
||||
|
||||
Reference in New Issue
Block a user