function multikeyBinaryToJWK
multikeyBinaryToJWK(
curve: CryptoCurves,
xb: Uint8Array,
db?: Uint8Array,
): JWKKeyPair

Convert the multikey values to their JWK equivalents. The final x and d values are encoded in base64 and then the relevant JWK structure are created

For EDDSA, this is a very straightforward operation by just encoding the values and plugging them into a constant JWK structure. The interface is there to be reused by the ECDSA equivalent, which must do some extra processing.

Parameters

  • choice between P-256 and P-384
xb: Uint8Array
  • binary version of the x value for the elliptical curve
optional
db: Uint8Array
  • binary version of the d value for the elliptical curve

Return Type

Usage

import { multikeyBinaryToJWK } from "lib/ecdsa.ts";