webauthn-0.1.0.0: Relying party (server) implementation of the WebAuthn 2 specification
Stabilityinternal
Safe HaskellNone
LanguageHaskell2010

Crypto.WebAuthn.Model.WebIDL.Internal.Binary.Encoding

Description

Certain parts of the specification require that data is encoded to a binary form. This module holds such functions.

Synopsis

Encoding raw fields

encodeRawCredential :: forall c raw. SingI c => Credential c raw -> Credential c 'True Source #

Encodes all raw fields of a Credential. This function is mainly useful for testing that the encoding/decoding functions are correct. The counterpart to this function is stripRawCredential

encodeRawAuthenticatorData :: forall c raw. SingI c => AuthenticatorData c raw -> AuthenticatorData c 'True Source #

Encodes all raw fields of a AuthenticatorData. This function is needed for an authenticator implementation

encodeRawCollectedClientData :: forall c raw. SingI c => CollectedClientData c raw -> CollectedClientData c 'True Source #

Encodes all raw fields of a CollectedClientData. This function is needed for a client implementation

Encoding structures to bytes

encodeAttestationObject :: AttestationObject 'True -> ByteString Source #

Encodes an AttestationObject as a ByteString. This is needed by the client side to generate a valid JSON response

encodeCollectedClientData :: forall c. SingI c => CollectedClientData c 'True -> ByteString Source #

Encodes an CollectedClientData as a ByteString. This is needed by the client side to generate a valid JSON response