Options
All
  • Public
  • Public/Protected
  • All
Menu

Parse between JSON Web Key (JWK), CBOR Object Signing and Encryption (COSE) and PEM.

Hierarchy

  • default

Index

Constructors

Properties

BUFFER_TYPE_COSE_KEY_PARAMETER_NAME: string[] = ...

Methods

  • attestationObject2jwk(attObj: Buffer): jwk
  • Parse attestation object in webauthn to JWK.

    Parameters

    • attObj: Buffer

      Attestation object

    Returns jwk

    JWK

  • cose2jwk(coseMap: coseMap): jwk
  • Parse COSE key to JWK format.

    Parameters

    • coseMap: coseMap

      COSE key

    Returns jwk

    JWK

  • cose2pem(coseMap: coseMap): Promise<string>
  • Parse COSE key to PEM.

    Parameters

    • coseMap: coseMap

      COSE key

    Returns Promise<string>

    PEM

  • der2pem(type: pemType, der: Buffer): string
  • Parse DER format key to PEM format.

    Parameters

    • type: pemType

      Key type

    • der: Buffer

      DER format key

    Returns string

    PEM format key

  • jwk2cose(jwk: jwk): coseMap
  • Parse JWK to COSE key.

    Parameters

    • jwk: jwk

      JWK

    Returns coseMap

    COSE key

  • jwk2pem(jwk: jwk): Promise<string>
  • Parse JWK to PEM.

    Parameters

    • jwk: jwk

      JWK

    Returns Promise<string>

    PEM

  • pem2cose(pem: string, alg?: string): Promise<coseMap>
  • Parse PEM to COSE key.

    This method's parameter alg is specified in JWK's "alg" parameter (here is registry).

    Parameters

    • pem: string

      PEM

    • Optional alg: string

      Key algorithm, specified with JWK's "alg" parameter

    Returns Promise<coseMap>

    COSE key

  • pem2der(pem: string): Buffer
  • Parse PEM format key to DER format.

    Parameters

    • pem: string

      PEM format key

    Returns Buffer

    DER format key

  • pem2jwk(pem: string, alg?: string): Promise<jwk>
  • Parse PEM to JWK.

    This method's parameter alg is specified in JWK's "alg" parameter (here is registry).

    Parameters

    • pem: string

      PEM

    • Optional alg: string

      JWK's "alg" parameter

    Returns Promise<jwk>

    JWK

Generated using TypeDoc