interface · Browser and Node
AsyncSigner
A key that may not give up its secret: WebCrypto, WebAuthn, a secure element, or a seed.
@toip-tools/coseView sourceimport { type AsyncSigner } from "@toip-tools/cose";
Declaration
interface AsyncSigner {
alg: CoseAlg;
kid: Uint8Array;
publicKey: PublicKey;
/** Signs the Sig_structure bytes. For -65600 it returns CBOR `[authenticatorData, clientDataJSON, signature]`. */
sign(toBeSigned: Uint8Array): Promise<Uint8Array>;
}
Properties
Methods
sign
Signs the Sig_structure bytes. For -65600 it returns CBOR [authenticatorData, clientDataJSON, signature].
sign(toBeSigned: Uint8Array): Promise<Uint8Array>;
Parameters
toBeSignedrequiredUint8Array<ArrayBufferLike>
Returns
Promise<Uint8Array<ArrayBufferLike>>