/** * Interface for configuring the WebCrypto module */ export type CryptoModuleConfig = { /** * Custom crypto implementation to use instead of the global crypto * Must conform to the W3C Web Cryptography API */ cryptoImpl?: Crypto; }; /** * Creates a complete WebCrypto module implementation for the sandbox * * This module provides an implementation of the W3C Web Cryptography API * (https://w3c.github.io/webcrypto/) including the Crypto and SubtleCrypto * interfaces with methods like getRandomValues, randomUUID, and the subtle * crypto operations (encrypt, decrypt, sign, verify, digest, etc.) * * @param config - Optional configuration object for customizing the crypto implementation * @returns A CageModule that implements the WebCrypto API in the sandbox * * @example * ```typescript * const cage = await FaradayCage.createFromQJSWasmLocation(wasmUrl); * * // Use default (global) crypto * await cage.runCode(code, [crypto()]); * * // Use custom crypto implementation * await cage.runCode(code, [ * crypto({ * cryptoImpl: customCryptoImplementation * }) * ]); * ``` */ declare const _default: (config?: CryptoModuleConfig) => import("./_mod_authoring").CageModule; export default _default;