function · Browser and Node
webCryptoSigner
A signer from a WebCrypto key pair: Ed25519, or ECDSA P-256. The private key may be non-extractable; only the public key is exported. WebCrypto's ECDSA output is already the raw r || s that COSE wants.
@toip-tools/coseView sourceimport { webCryptoSigner } from "@toip-tools/cose";
Declaration
webCryptoSigner(key: CryptoKeyPair, kid: Uint8Array, alg?: CoseAlg): Promise<AsyncSigner>;
Parameters
keyrequiredCryptoKeyPairkidrequiredUint8Array<ArrayBufferLike>algoptionalCoseAlg | undefined
Returns
Promise<AsyncSigner>