use crate::Result;
pub trait PublicKey {
fn as_bytes(&self) -> &[u8];
fn from_bytes(bytes: &[u8]) -> Result<Self>
where
Self: Sized + Clone;
}
pub trait SecretKey {
fn as_bytes(&self) -> &[u8];
fn from_bytes(bytes: &[u8]) -> Result<Self>
where
Self: Sized + Clone;
}
pub trait Ciphertext {
fn as_bytes(&self) -> &[u8];
fn from_bytes(bytes: &[u8]) -> Result<Self>
where
Self: Sized + Clone + Copy;
}
pub trait SharedSecret {
fn as_bytes(&self) -> &[u8];
fn from_bytes(bytes: &[u8]) -> Result<Self>
where
Self: Sized + Clone + Copy;
}