/** * @license * @preserve * * KeeeX SAS Public code * https://keeex.me * Copyright 2013-2023 KeeeX All Rights Reserved. * * These computer program listings and specifications, herein, * are and remain the property of KeeeX SAS. The intellectual * and technical concepts herein are proprietary to KeeeX SAS * and may be covered by EU and foreign patents, * patents in process, trade secrets and copyright law. * * These listings are published as a way to provide third party * with the ability to process KeeeX data. * As such, support for public inquiries is limited. * They are provided "as-is", without warrany of any kind. * * They shall not be reproduced or copied or used in whole or * in part as the basis for manufacture or sale of items unless * prior written permission is obtained from KeeeX SAS. * * For a license agreement, please contact: * * */ import * as cipherTypes from "./ciphertypes.js"; import type { CryptoKey } from "./keys.js"; /** * Return the expected IV size for a given algorithm. * * @public */ export declare const getIVSize: (algorithm: cipherTypes.Algorithms) => Promise; /** * Generate a random IV of suitable size. * * @public */ export declare const generateIV: (algorithm: cipherTypes.Algorithms) => Promise; /** * Encrypt a buffer in one call, returning the encrypted content only. * * This is usually not called directly but through `encryptImmediate()`. * * @public */ export declare const encryptRawImmediate: (data: Uint8Array, iv: Uint8Array, key: CryptoKey) => Promise; /** * Create the header for encryptImmediate(). * * As a special case, the ciphertext length can be 0, in which case the whole input is expected to * be the ciphertext. * * This is usually used by providers. * * @public */ export declare const encryptImmediateEncoding: (key: CryptoKey, iv: Uint8Array, cipherText?: Uint8Array) => Uint8Array; /** * Encrypt a buffer in one call, returning a consolidated Uint8Array. * * The result can be deciphered using decryptImmediate(). * * This takes care of creating and storing the IV. * * @public */ export declare const encryptImmediate: (data: Uint8Array, key: CryptoKey) => Promise; /** * Decipher a buffer in one call. * * This is usually used through `decryptImmediate()` to take care of handling the IV. * * @public */ export declare const decryptRawImmediate: (data: Uint8Array, iv: Uint8Array, key: CryptoKey) => Promise; /** * Decrypt data from a buffer ciphered using encryptImmediate(). * * @public */ export declare const decryptImmediate: (data: Uint8Array, key: CryptoKey) => Promise; /** * Create an encryption context, to encrypt data in chunks. * * @public */ export declare const createEncryptionContext: (key: CryptoKey, iv: Uint8Array) => Promise; /** * Create a decryption context, to decrypt data in chunks. * * @public */ export declare const createDecryptionContext: (key: CryptoKey, iv: Uint8Array) => Promise; export { Algorithms, CipherProvider } from "./ciphertypes.js";