import { Header } from './header'; import { type Label } from './map'; import { Key, type MACer } from './key'; /** * Mac0Message represents a COSE_Mac0 object. * * Use this structure when the MAC key is known implicitly. The tag covers the * protected header bytes, optional externalData, and payload through the RFC * 9052 MAC_structure. * * @example * ```ts * const key = HMACKey.generate(iana.AlgorithmHMAC_256_256) * const aad = utf8ToBytes('profile:v1') * const cose = new Mac0Message(payload).toBytes(key, aad) * const verified = Mac0Message.fromBytes(key, cose, aad) * ``` * * Reference https://datatracker.ietf.org/doc/html/rfc9052#name-maced-messages-with-implici. */ export declare class Mac0Message { payload: Uint8Array; protected: Header | null; unprotected: Header | null; private static macBytes; static fromBytes(key: Key & MACer, coseData: Uint8Array, externalData?: Uint8Array, understoodCriticalLabels?: Iterable