Argon2Parameters

The parameters for Argon2 hashing algorithm.

JSON representation
{
  "hashLengthBytes": integer,
  "hashType": enum (HashType),
  "parallelism": integer,
  "iterations": integer,
  "memoryCostKib": integer,
  "version": enum (Version),
  "associatedData": string
}
Fields
hashLengthBytes

integer

Required. The desired hash length in bytes. Minimum is 4 and maximum is 1024.

hashType

enum (HashType)

Required. Must not be HASH_TYPE_UNSPECIFIED.

parallelism

integer

Required. The degree of parallelism, also called threads or lanes. Minimum is 1, maximum is 16.

iterations

integer

Required. The number of iterations to perform. Minimum is 1, maximum is 16.

memoryCostKib

integer

Required. The memory cost in kibibytes. Maximum is 32768.

version

enum (Version)

The version of the Argon2 algorithm. This defaults to VERSION_13 if not specified.

associatedData

string (bytes format)

The additional associated data, if provided, is appended to the hash value to provide an additional layer of security. A base64-encoded string if specified via JSON.

A base64-encoded string.

HashType

The types of the algorithm.

Enums
HASH_TYPE_UNSPECIFIED The hash type is not specified.
ARGON2_D An Argon2 variant, Argon2d.
ARGON2_ID An Argon2 variant, Argonid. Recommended.
ARGON2_I An Argon2 variant, Argon2i.

Version

The verion of the algorithm.

Enums
VERSION_UNSPECIFIED The version is not specified.
VERSION_10 The previous version, 0x10.
VERSION_13 The current version, 0x13. The default value for version.