pub trait VerifyingKey<T>: Sizedwhere
T: Algorithm<VerifyingKey = Self>,{
// Required methods
fn from_slice(raw: &[u8]) -> Result<Self>;
fn as_bytes(&self) -> Cow<'_, [u8]>;
}Expand description
Verifying key for a specific signature cryptosystem. In the case of public-key cryptosystems, this is a public key.
This trait provides a uniform interface for different backends / implementations of the same cryptosystem.
Required Methods§
Sourcefn from_slice(raw: &[u8]) -> Result<Self>
fn from_slice(raw: &[u8]) -> Result<Self>
Creates a key from raw bytes. Returns an error if the bytes do not represent
a valid key.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.
Implementations on Foreign Types§
Source§impl VerifyingKey<Ed25519> for PublicKey
Available on crate feature exonum-crypto only.
impl VerifyingKey<Ed25519> for PublicKey
Available on crate feature
exonum-crypto only.Source§impl VerifyingKey<Es256> for VerifyingKey
Available on crate feature p256 only.
impl VerifyingKey<Es256> for VerifyingKey
Available on crate feature
p256 only.Source§impl VerifyingKey<Es256k> for PublicKey
Available on crate feature secp256k1 only.
impl VerifyingKey<Es256k> for PublicKey
Available on crate feature
secp256k1 only.