@ldclabs/cose-ts
Version:
Implemented Keys, Algorithms (RFC9053), COSE (RFC9052) and CWT (RFC8392) in TypeScript.
13 lines (12 loc) • 579 B
TypeScript
import { Header } from './header';
import { Key, type Encryptor } from './key';
export declare class Encrypt0Message {
payload: Uint8Array;
protected: Header | null;
unprotected: Header | null;
private static encBytes;
static fromBytes(key: Key & Encryptor, coseData: Uint8Array, externalData?: Uint8Array): Promise<Encrypt0Message>;
static withTag(coseData: Uint8Array): Uint8Array;
constructor(payload: Uint8Array, protectedHeader?: Header, unprotected?: Header);
toBytes(key: Key & Encryptor, externalData?: Uint8Array): Promise<Uint8Array>;
}