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.

21 lines (20 loc) 678 B
/** * @license * Copyright 2020 Google LLC * SPDX-License-Identifier: Apache-2.0 */ import { Aead } from '../aead/internal/aead'; /** * Implementation of AES-GCM, wrapped around InsecureIvAesGcm. * * @final */ export declare class AesGcm extends Aead { readonly key: CryptoKey; private readonly insecureIvAesGcm; constructor(key: CryptoKey); encrypt(plaintext: Uint8Array, associatedData?: Uint8Array): Promise<Uint8Array>; decrypt(ciphertext: Uint8Array, associatedData?: Uint8Array): Promise<Uint8Array>; } /** Returns an AEAD instantiation genererated from a given raw `key` */ export declare function fromRawKey(key: Uint8Array): Promise<Aead>;