pub trait PublicKey<'a, const KEY_LEN: usize, const SIGNATURE_LEN: usize> {
// Required methods
fn verify(
&self,
data: &[u8],
signature: CryptoSensitiveRef<'_, SIGNATURE_LEN>,
) -> Result<bool, Error>;
fn write_canon(
&self,
key: &mut CryptoSensitive<KEY_LEN>,
) -> Result<(), Error>;
}Expand description
Trait representing a public key.
Required Methods§
Sourcefn verify(
&self,
data: &[u8],
signature: CryptoSensitiveRef<'_, SIGNATURE_LEN>,
) -> Result<bool, Error>
fn verify( &self, data: &[u8], signature: CryptoSensitiveRef<'_, SIGNATURE_LEN>, ) -> Result<bool, Error>
Sourcefn write_canon(&self, key: &mut CryptoSensitive<KEY_LEN>) -> Result<(), Error>
fn write_canon(&self, key: &mut CryptoSensitive<KEY_LEN>) -> Result<(), Error>
Write the canonical representation of this public key into the given buffer.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".