new S2K(config)
Parameters:
Name | Type | Description |
---|---|---|
config |
Object | (optional) full configuration, defaults to openpgp.config |
- Source:
Members
algorithm :module:enums.hash
Type:
- Source:
c :Integer
Type:
- Integer
- Source:
salt :String
Eight bytes of salt in a binary string.
Type:
- String
- Source:
type :module:enums.s2k
Type:
- Source:
Methods
(async) produce_key(passphrase) → {Uint8Array}
Produces a key using the specified passphrase and the defined hashAlgorithm
Parameters:
Name | Type | Description |
---|---|---|
passphrase |
String | Passphrase containing user input |
- Source:
Returns:
Produced key with a length corresponding to hashAlgorithm hash length
- Type
- Uint8Array
read(bytes) → {Integer}
Parsing function for a string-to-key specifier (RFC 4880 3.7).
Parameters:
Name | Type | Description |
---|---|---|
bytes |
String | Payload of 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