new Argon2S2K(configopt)
+ + + + + + + + + + + + + + +Parameters:
+ + +Name | + + +Type | + + +Attributes | + + + + +Description | +
---|---|---|---|
config |
+
+
+ + + +Object + + + + | + + +
+
+ <optional> + + + + + + |
+
+
+
+
+ Full configuration, defaults to openpgp.config |
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
- Source: +
- + + + + + + + +
Members
+ + + +encodedM :Integer
+ + + + +exponent indicating memory size
+Type:
+-
+
- + +Integer + + + +
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
- Source: +
- + + + + + + + +
p :Integer
+ + + + +degree of parallelism (lanes)
+Type:
+-
+
- + +Integer + + + +
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
- Source: +
- + + + + + + + +
salt :Uint8Array
+ + + + +16 bytes of salt
+Type:
+-
+
- + +Uint8Array + + + +
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
- Source: +
- + + + + + + + +
t :Integer
+ + + + +number of passes
+Type:
+-
+
- + +Integer + + + +
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
- Source: +
- + + + + + + + +
Methods
+ + + + + + + +(async) produceKey(passphrase) → {Promise.<Uint8Array>}
+ + + + + + +Produces a key using the specified passphrase and the defined +hashAlgorithm
+Parameters:
+ + +Name | + + +Type | + + + + + +Description | +
---|---|---|
passphrase |
+
+
+ + + +String + + + + | + + + + + +Passphrase containing user input |
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
- Source: +
- + + + + + + + +
Throws:
+ + + +Returns:
+ + +Produced key with a length corresponding to keySize
-
+
- + Type + +
- + +Promise.<Uint8Array> + + + +
read(bytes) → {Integer}
+ + + + + + +Parsing function for argon2 string-to-key specifier.
+Parameters:
+ + +Name | + + +Type | + + + + + +Description | +
---|---|---|
bytes |
+
+
+ + + +Uint8Array + + + + | + + + + + +Payload of argon2 string-to-key specifier |
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
- Source: +
- + + + + + + + +
Returns:
+ + +Actual length of the object.
+-
+
- + Type + +
- + +Integer + + + +
write() → {Uint8Array}
+ + + + + + +Serializes s2k information
+-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
- Source: +
- + + + + + + + +
Returns:
+ + +Binary representation of s2k.
+-
+
- + Type + +
- + +Uint8Array + + + +