/** Parameters shared by every interoperable Argon2id implementation. */ export interface Argon2idOptions { password: Uint8Array; salt: Uint8Array; iterations: number; parallelism: number; memorySize: number; hashLength: number; } /** * Optional asynchronous Argon2id implementation supplied by a host runtime. * * A selected backend is authoritative: derivation failures are propagated and * never retried with another implementation. Hosts should report readiness only * after proving that their native implementation is available and interoperable. * Make preload and isReady reentrant, including calls made by the host itself. * Concurrent cold calls share one preload attempt. Later calls may retry after * settlement; hosts should cache permanent failures or apply retry backoff. */ export interface AsyncArgon2idBackend { preload: () => Promise; isReady: () => boolean; deriveKey: (options: Readonly) => Promise; } /** Installs a process/page-wide optional Argon2id backend. */ export declare function registerArgon2idBackend(backend: AsyncArgon2idBackend): void; /** Removes `backend` if it is still the active optional implementation. */ export declare function unregisterArgon2idBackend(backend: AsyncArgon2idBackend): void; /** * Returns a proven-ready backend. A cold backend is prepared in the background * while the current derivation retains the portable implementation path. */ export declare function readyArgon2idBackend(): AsyncArgon2idBackend | undefined; /** Rejects malformed alternative-backend output before it can become wallet key material. */ export declare function validateArgon2idResult(value: Uint8Array, expectedLength: number): Uint8Array; //# sourceMappingURL=Argon2idBackend.d.ts.map