16 lines
337 B
Rust
16 lines
337 B
Rust
use std::fmt::Display;
|
|
|
|
pub trait Sign {
|
|
type Error: std::error::Error + Send;
|
|
|
|
fn sign(&self, signing_string: &str) -> Result<String, Self::Error>;
|
|
}
|
|
|
|
pub trait SignFactory {
|
|
type Signer: Sign + Send + 'static;
|
|
type KeyId: Display + 'static;
|
|
|
|
fn key_id(&self) -> Self::KeyId;
|
|
fn signer(&self) -> Self::Signer;
|
|
}
|