Skip to content

Commit

Permalink
Export Argon2S2K to reuse the WASM module outside of the OpenPGP.js c…
Browse files Browse the repository at this point in the history
…ontext (#12)
  • Loading branch information
larabr committed Apr 10, 2024
1 parent 601a2b9 commit ad4d580
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
7 changes: 7 additions & 0 deletions openpgp.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -924,6 +924,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;
Expand Down
1 change: 1 addition & 0 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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';

Expand Down

0 comments on commit ad4d580

Please sign in to comment.