UNPKG

tink-crypto

Version:

A multi-language, cross-platform library that provides cryptographic APIs that are secure, easy to use correctly, and hard(er) to misuse.

30 lines (29 loc) 852 B
/** * @license * Copyright 2022 Google LLC * SPDX-License-Identifier: Apache-2.0 */ import { HpkeAead } from './hpke_aead'; /** * AES-GCM HPKE AEAD variant. * @see https://www.rfc-editor.org/rfc/rfc9180.html#section-5.2 */ export declare class AesGcmHpkeAead implements HpkeAead { private readonly keyLength; constructor(keyLength: 16 | 32); seal({ key, nonce, plaintext, associatedData }: { key: Uint8Array; nonce: Uint8Array; plaintext: Uint8Array; associatedData: Uint8Array; }): Promise<Uint8Array>; open({ key, nonce, ciphertext, associatedData }: { key: Uint8Array; nonce: Uint8Array; ciphertext: Uint8Array; associatedData: Uint8Array; }): Promise<Uint8Array>; getAeadId(): Uint8Array; getKeyLength(): number; getNonceLength(): number; }