core: add verify traits
This commit is contained in:
parent
86a8b6f181
commit
ec1bf8640f
|
@ -13,3 +13,15 @@ pub trait SignFactory {
|
|||
fn key_id(&self) -> Self::KeyId;
|
||||
fn signer(&self) -> Self::Signer;
|
||||
}
|
||||
|
||||
pub trait Verify {
|
||||
type Error: std::error::Error + Send;
|
||||
|
||||
fn verify(&self, signing_string: &str, signature: &str) -> Result<bool, Self::Error>;
|
||||
}
|
||||
|
||||
pub trait VerifyFactory {
|
||||
type Verifier: Verify + Send + 'static;
|
||||
|
||||
fn verifier(&self, public_key_pem: String) -> Self::Verifier;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue