#[cfg(not(feature = "std"))]
use alloc::boxed::Box;
use crate::error::Error;
use super::convert::{FromBytes, ToVec};
pub trait Signature: FromBytes + ToVec + Copy + Clone + PartialEq {}
pub trait Sign {
type SIG: Signature;
fn sign(&self, data: &[u8]) -> Self::SIG
where
Self: Sized;
}
pub trait Verify {
type E: Error;
type SIG: Signature;
fn verify(&self, data: &[u8], signature: &Self::SIG) -> Result<(), Self::E>;
}