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 Sep 9, 2024
1 parent fe10019 commit f75e20d
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 @@ -945,6 +945,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 f75e20d

Please sign in to comment.