pub trait KeylessCryptoPrimitive: Send + Sync {
type Input;
type Output;
type Challenge;
type Proof;
// Required methods
fn compute<'life0, 'async_trait>(
&'life0 self,
input: Self::Input,
) -> Pin<Box<dyn Future<Output = Result<Self::Output>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn create_proof<'life0, 'async_trait>(
&'life0 self,
challenge: Self::Challenge,
) -> Pin<Box<dyn Future<Output = Result<Self::Proof>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn verify_proof<'life0, 'async_trait>(
&'life0 self,
challenge: Self::Challenge,
proof: Self::Proof,
) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}
Expand description
Trait for keyless cryptographic primitives (hashing, proof of work, etc.)