/** * @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 * as digestTypes from "./digesttypes.js"; import * as hmacTypes from "./hmactypes.js"; import * as keysTypes from "./keystypes.js"; import * as randomTypes from "./randomtypes.js"; /** * Interface that a cryptographic provider must implement. * * @public */ export interface CryptoProvider { /** Major version of `@keeex/crypto` supported by the provider. */ majorVersion: number; digestProvider: digestTypes.DigestProvider; randomProvider: randomTypes.RandomProvider; cipherProvider: cipherTypes.CipherProvider; keysProvider: keysTypes.KeysProvider; hmacProvider: hmacTypes.HmacProvider; } /** * Options that can be passed to cryptographic providers to fine-tune some behavior. * * @public */ export interface ProviderOptions { /** * Do not use "immediate" functions as fallback. This prevent using large amount of memory for * large input but might be slower. * * It also prevents using chunk-based interfaces if they are not provided by the current * cryptographic provider. */ noImmediateFallback: boolean; } /** * Change options for the cryptographic provider. * * @public */ export declare const setProviderOptions: (options: Partial) => void; /** * Function used by providers to register themselves on loading. * * This is expected to be called automatically when importing a cryptographic provider, and should * not be called manually be projects that uses the library directly. * * @public */ export declare const registerProvider: (cryptoProvider?: CryptoProvider) => void; /** * Change the provider to use * * @deprecated Providers are automatically registered on import, this function is not needed anymore * Setting provider options is done using `setProviderOptions()`. * * @public */ export declare const setProvider: (cryptoProvider?: CryptoProvider, options?: Partial) => void; /** * Return the current provider. * * Used internally by other cryptographic functions; you should not need to * call this when using the library. * * @internal */ export declare const getProvider: () => CryptoProvider; /** * Return the current provider options. * * This is usually called by cryptographic providers and not by the project using the crypto * library. * * @public */ export declare const getProviderOptions: () => ProviderOptions;