# Class: Argon2S2K

## Argon2S2K(configopt)

#### new Argon2S2K(configopt)

##### Parameters:

Name | Type | Attributes | Description
--- | --- | --- | ---
`config` | Object | <optional> | Full configuration, defaults to openpgp.config

Source:
  - type/s2k/argon2.js, line 32

### Members

#### encodedM :Integer

exponent indicating memory size

##### Type:

- Integer

Source:
  - type/s2k/argon2.js, line 43

#### p :Integer

degree of parallelism (lanes)

##### Type:

- Integer

Source:
  - type/s2k/argon2.js, line 41

#### salt :Uint8Array

16 bytes of salt

##### Type:

- Uint8Array

Source:
  - type/s2k/argon2.js, line 37

#### t :Integer

number of passes

##### Type:

- Integer

Source:
  - type/s2k/argon2.js, line 39

### 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:
  - type/s2k/argon2.js, line 90

##### Throws:

Argon2OutOfMemoryError | Errors

##### 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:
  - type/s2k/argon2.js, line 55

##### Returns:

Actual length of the object.

Type
  Integer

#### write() → {Uint8Array}

Serializes s2k information

Source:
  - type/s2k/argon2.js, line 72

##### Returns:

Binary representation of s2k.

Type
  Uint8Array