pub struct AttestedCredentialData {
pub aaguid: Aaguid,
pub key: CoseKey,
/* private fields */
}Expand description
Attested credential data is a variable-length byte array added to the authenticator data when generating an attestation object for a credential
Fields§
§aaguid: AaguidThe AAGUID of the authenticator.
key: CoseKeyThe credential public key encoded in COSE_Key format, as defined in Section 7 of RFC9052, using the CTAP2 canonical CBOR encoding form. The COSE_Key-encoded credential public key MUST contain the “alg” parameter and MUST NOT contain any other OPTIONAL parameters. The “alg” parameter MUST contain a coset::iana::Algorithm value. The encoded credential public key MUST also contain any additional REQUIRED parameters stipulated by the relevant key type specification, i.e. REQUIRED for the key type “kty” and algorithm “alg” (see Section 2 of RFC9053).
Implementations§
Source§impl AttestedCredentialData
impl AttestedCredentialData
Sourcepub fn new(
aaguid: Aaguid,
credential_id: Vec<u8>,
key: CoseKey,
) -> Result<Self, TryFromIntError>
pub fn new( aaguid: Aaguid, credential_id: Vec<u8>, key: CoseKey, ) -> Result<Self, TryFromIntError>
Create a new AttestedCredentialData
§Error
Returns an error if the length of credential_id cannot be represented by a u16.
Sourcepub fn credential_id(&self) -> &[u8] ⓘ
pub fn credential_id(&self) -> &[u8] ⓘ
Get read access to the credential ID,
Trait Implementations§
Source§impl Clone for AttestedCredentialData
impl Clone for AttestedCredentialData
Source§fn clone(&self) -> AttestedCredentialData
fn clone(&self) -> AttestedCredentialData
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more