Export Argon2S2K to reuse the WASM module outside of the OpenPGP.js context (#12)

This commit is contained in:
larabr 2024-02-14 09:59:55 +01:00 committed by larabr
parent 9cf7a384aa
commit bec09a16fa
2 changed files with 8 additions and 0 deletions

7
openpgp.d.ts vendored
View File

@ -941,6 +941,13 @@ export namespace enums {
}
}
export declare class Argon2S2K {
constructor(config: Config);
salt: Uint8Array;
/** @throws Argon2OutOfMemoryError */
produceKey(passphrase: string, keySize: number): Promise<Uint8Array>;
}
interface KDFParamsData {
version: number;
hash: enums.hash;

View File

@ -22,6 +22,7 @@ export { CleartextMessage, readCleartextMessage, createCleartextMessage } from '
export * from './packet';
export { default as KDFParams } from './type/kdf_params';
export { default as Argon2S2K, Argon2OutOfMemoryError } from './type/s2k/argon2';
export * from './encoding/armor';