Struct openmls::ciphersuite::signature::OpenMlsSignaturePublicKey
source · pub struct OpenMlsSignaturePublicKey { /* private fields */ }
Expand description
A public signature key.
Implementations§
source§impl OpenMlsSignaturePublicKey
impl OpenMlsSignaturePublicKey
sourcepub fn new(
value: VLBytes,
signature_scheme: SignatureScheme
) -> Result<Self, CryptoError>
pub fn new( value: VLBytes, signature_scheme: SignatureScheme ) -> Result<Self, CryptoError>
Create a new signature public key from raw key bytes.
sourcepub fn from_signature_key(
key: SignaturePublicKey,
signature_scheme: SignatureScheme
) -> Self
pub fn from_signature_key( key: SignaturePublicKey, signature_scheme: SignatureScheme ) -> Self
Create a new signature public key from raw key.
sourcepub fn verify_with_label(
&self,
crypto: &impl OpenMlsCrypto,
signature: &Signature,
sign_content: &SignContent
) -> Result<(), CryptoError>
pub fn verify_with_label( &self, crypto: &impl OpenMlsCrypto, signature: &Signature, sign_content: &SignContent ) -> Result<(), CryptoError>
Verify a Signature
on the SignContent
with this public key
public key.
sourcepub fn verify(
&self,
crypto: &impl OpenMlsCrypto,
signature: &Signature,
payload: &[u8]
) -> Result<(), CryptoError>
pub fn verify( &self, crypto: &impl OpenMlsCrypto, signature: &Signature, payload: &[u8] ) -> Result<(), CryptoError>
Verify a Signature
on the payload
byte slice with the keypair’s
public key.
sourcepub fn signature_scheme(&self) -> SignatureScheme
pub fn signature_scheme(&self) -> SignatureScheme
Get the signature scheme of the public key.
Trait Implementations§
source§impl Clone for OpenMlsSignaturePublicKey
impl Clone for OpenMlsSignaturePublicKey
source§fn clone(&self) -> OpenMlsSignaturePublicKey
fn clone(&self) -> OpenMlsSignaturePublicKey
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for OpenMlsSignaturePublicKey
impl Debug for OpenMlsSignaturePublicKey
source§impl<'de> Deserialize<'de> for OpenMlsSignaturePublicKey
impl<'de> Deserialize<'de> for OpenMlsSignaturePublicKey
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl From<OpenMlsSignaturePublicKey> for SignaturePublicKey
impl From<OpenMlsSignaturePublicKey> for SignaturePublicKey
source§fn from(signature_public_key_enriched: OpenMlsSignaturePublicKey) -> Self
fn from(signature_public_key_enriched: OpenMlsSignaturePublicKey) -> Self
Converts to this type from the input type.
source§impl Hash for OpenMlsSignaturePublicKey
impl Hash for OpenMlsSignaturePublicKey
source§impl PartialEq for OpenMlsSignaturePublicKey
impl PartialEq for OpenMlsSignaturePublicKey
source§fn eq(&self, other: &OpenMlsSignaturePublicKey) -> bool
fn eq(&self, other: &OpenMlsSignaturePublicKey) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Eq for OpenMlsSignaturePublicKey
impl StructuralPartialEq for OpenMlsSignaturePublicKey
Auto Trait Implementations§
impl Freeze for OpenMlsSignaturePublicKey
impl RefUnwindSafe for OpenMlsSignaturePublicKey
impl Send for OpenMlsSignaturePublicKey
impl Sync for OpenMlsSignaturePublicKey
impl Unpin for OpenMlsSignaturePublicKey
impl UnwindSafe for OpenMlsSignaturePublicKey
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more