use alloc::vec::Vec;
use crate::{CryptoError, KeyPair, SecretVec};
pub trait Signer: Send + Sync {
#[must_use]
fn name(&self) -> &'static str;
#[must_use]
fn signature_len(&self) -> usize;
#[must_use = "result must be checked"]
fn sign(&self, sk: &[u8], msg: &[u8], sig_out: &mut [u8]) -> Result<usize, CryptoError>;
}
pub trait Verifier: Send + Sync {
#[must_use]
fn name(&self) -> &'static str;
#[must_use = "result must be checked"]
fn verify(&self, pk: &[u8], msg: &[u8], sig: &[u8]) -> Result<(), CryptoError>;
}
pub trait KeyGenerator: Send + Sync {
#[must_use]
fn name(&self) -> &'static str;
#[must_use = "result must be checked"]
fn generate_keypair(&self) -> Result<KeyPair<SecretVec, Vec<u8>>, CryptoError>;
}