Struct webauthn_rs::prelude::COSEKey
source · pub struct COSEKey {
pub type_: COSEAlgorithm,
pub key: COSEKeyType,
}
Expand description
A COSE Key as provided by the Authenticator. You should never need to alter or change these values.
Fields§
§type_: COSEAlgorithm
The type of key that this contains
key: COSEKeyType
The public key
Implementations§
source§impl COSEKey
impl COSEKey
sourcepub fn get_openssl_pkey(&self) -> Result<PKey<Public>, WebauthnError>
pub fn get_openssl_pkey(&self) -> Result<PKey<Public>, WebauthnError>
Retrieve the public key of this COSEKey as an OpenSSL structure
sourcepub fn verify_signature(
&self,
signature: &[u8],
verification_data: &[u8]
) -> Result<bool, WebauthnError>
pub fn verify_signature( &self, signature: &[u8], verification_data: &[u8] ) -> Result<bool, WebauthnError>
Verifies data was signed with this COSEKey.
Trait Implementations§
source§impl<'de> Deserialize<'de> for COSEKey
impl<'de> Deserialize<'de> for COSEKey
source§fn deserialize<__D>(
__deserializer: __D
) -> Result<COSEKey, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D
) -> Result<COSEKey, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl PartialEq for COSEKey
impl PartialEq for COSEKey
source§impl Serialize for COSEKey
impl Serialize for COSEKey
source§fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
source§impl TryFrom<(COSEAlgorithm, &X509)> for COSEKey
impl TryFrom<(COSEAlgorithm, &X509)> for COSEKey
§type Error = WebauthnError
type Error = WebauthnError
The type returned in the event of a conversion error.
impl Eq for COSEKey
impl StructuralEq for COSEKey
impl StructuralPartialEq for COSEKey
Auto Trait Implementations§
impl RefUnwindSafe for COSEKey
impl Send for COSEKey
impl Sync for COSEKey
impl Unpin for COSEKey
impl UnwindSafe for COSEKey
Blanket Implementations§
§impl<'a, T> AsTaggedExplicit<'a> for Twhere
T: 'a,
impl<'a, T> AsTaggedExplicit<'a> for Twhere
T: 'a,
§impl<'a, T> AsTaggedImplicit<'a> for Twhere
T: 'a,
impl<'a, T> AsTaggedImplicit<'a> for Twhere
T: 'a,
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