Add documentation to Argon2idOptions
This commit is contained in:
parent
4a8bbf014f
commit
8798e7046f
@ -6,12 +6,21 @@
|
||||
import sodium from "libsodium-wrappers";
|
||||
|
||||
export interface Argon2idOptions {
|
||||
// in bytes
|
||||
/** Output length in bytes */
|
||||
readonly outputLength: number;
|
||||
// integer between 1 and 4294967295
|
||||
/**
|
||||
* An integer between 1 and 4294967295 representing the computational difficulty.
|
||||
*
|
||||
* @see https://libsodium.gitbook.io/doc/password_hashing/default_phf#key-derivation
|
||||
*/
|
||||
readonly opsLimit: number;
|
||||
// memory limit measured in KiB (like argon2 command line tool)
|
||||
// Note: only ~ 16 MiB of memory are available using the non-sumo version of libsodium
|
||||
/**
|
||||
* Memory limit measured in KiB (like argon2 command line tool)
|
||||
*
|
||||
* Note: only approximately 16 MiB of memory are available using the non-sumo version of libsodium.js
|
||||
*
|
||||
* @see https://libsodium.gitbook.io/doc/password_hashing/default_phf#key-derivation
|
||||
*/
|
||||
readonly memLimitKib: number;
|
||||
}
|
||||
|
||||
|
||||
13
packages/crypto/types/libsodium.d.ts
vendored
13
packages/crypto/types/libsodium.d.ts
vendored
@ -1,6 +1,19 @@
|
||||
export interface Argon2idOptions {
|
||||
/** Output length in bytes */
|
||||
readonly outputLength: number;
|
||||
/**
|
||||
* An integer between 1 and 4294967295 representing the computational difficulty.
|
||||
*
|
||||
* @see https://libsodium.gitbook.io/doc/password_hashing/default_phf#key-derivation
|
||||
*/
|
||||
readonly opsLimit: number;
|
||||
/**
|
||||
* Memory limit measured in KiB (like argon2 command line tool)
|
||||
*
|
||||
* Note: only approximately 16 MiB of memory are available using the non-sumo version of libsodium.js
|
||||
*
|
||||
* @see https://libsodium.gitbook.io/doc/password_hashing/default_phf#key-derivation
|
||||
*/
|
||||
readonly memLimitKib: number;
|
||||
}
|
||||
export declare class Argon2id {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user