Add verify() to the Signer trait

And implement it for Blog and User
This commit is contained in:
Trinity Pointard
2018-09-28 23:18:01 +02:00
parent eafe1ed490
commit d610ed1641
3 changed files with 17 additions and 1 deletions
+2
View File
@@ -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 {