@ldclabs/cose-ts
Version:
Implemented Keys, Algorithms (RFC9053), COSE (RFC9052) and CWT (RFC8392) in TypeScript.
11 lines (10 loc) • 420 B
TypeScript
import { RawMap } from './map';
import { Key, type MACer } from './key';
export declare class HMACKey extends Key implements MACer {
static fromBytes(data: Uint8Array): HMACKey;
static generate<T>(alg: number, kid?: T): HMACKey;
static fromSecret<T>(secret: Uint8Array, alg: number, kid?: T): HMACKey;
constructor(kv?: RawMap);
getSecretKey(): Uint8Array;
mac(message: Uint8Array): Uint8Array;
}