@simbachain/cose-ts-secp256k1
Version:
Implemented Keys, Algorithms (RFC9053), COSE (RFC9052) and CWT (RFC8392) in TypeScript.
13 lines (12 loc) • 595 B
TypeScript
import { RawMap } from './map';
import { Key, type Encryptor } from './key';
export declare class AesGcmKey extends Key implements Encryptor {
static fromBytes(data: Uint8Array): AesGcmKey;
static generate<T>(alg: number, kid?: T): AesGcmKey;
static fromSecret<T>(secret: Uint8Array, kid?: T): AesGcmKey;
constructor(kv?: RawMap);
nonceSize(): number;
getSecretKey(): Uint8Array;
encrypt(plaintext: Uint8Array, nonce: Uint8Array, aad?: Uint8Array): Promise<Uint8Array>;
decrypt(ciphertext: Uint8Array, nonce: Uint8Array, aad?: Uint8Array): Promise<Uint8Array>;
}