Options
All
  • Public
  • Public/Protected
  • All
Menu

@dfinity/identity

Index

Type Aliases

CryptoKeyOptions: { extractable?: boolean; keyUsages?: KeyUsage[]; subtleCrypto?: SubtleCrypto }

Options used in a ECDSAKeyIdentity

Type declaration

  • Optional extractable?: boolean
  • Optional keyUsages?: KeyUsage[]
  • Optional subtleCrypto?: SubtleCrypto

Variables

DER_COSE_OID: Uint8Array

A DER encoded SEQUENCE(OID) for DER-encoded-COSE

ED25519_OID: Uint8Array

A DER encoded SEQUENCE(OID) for the Ed25519 algorithm

Functions

  • unwrapDER(derEncoded: ArrayBuffer, oid: Uint8Array): Uint8Array
  • Extracts a payload from the given derEncoded data, and checks that it was tagged with the given oid.

    derEncoded = SEQUENCE(oid, BITSTRING(payload))

    Parameters

    • derEncoded: ArrayBuffer

      The DER encoded and tagged data

    • oid: Uint8Array

      The DER encoded (and SEQUENCE wrapped!) expected OID

    Returns Uint8Array

    The unwrapped payload

  • wrapDER(payload: ArrayBuffer, oid: Uint8Array): Uint8Array
  • Wraps the given payload in a DER encoding tagged with the given encoded oid like so: SEQUENCE(oid, BITSTRING(payload))

    Parameters

    • payload: ArrayBuffer

      The payload to encode as the bit string

    • oid: Uint8Array

      The DER encoded (and SEQUENCE wrapped!) OID to tag the payload with

    Returns Uint8Array

Generated using TypeDoc