BLAKE2b

constructor(bitStrength: Int)(source)

Creates a new BLAKE2b instance.

Parameters

bitStrength

The number of bits returned when digest is invoked.

Throws

when:

  • bitStrength is less than 8

  • bitStrength is greater than 512

  • bitStrength is not a factor of 8


constructor(bitStrength: Int, personalization: ByteArray?)(source)

Creates a new BLAKE2b instance.

Parameters

bitStrength

The number of bits returned when digest is invoked.

personalization

A user selected customization bit string to define a variant of the function. When no customization is desired, personalization must be set to a null value. Must be 16 bytes in length, or null.

Throws

when:

  • bitStrength is less than 8

  • bitStrength is greater than 512

  • bitStrength is not a factor of 8

  • personalization is non-null and not exactly 16 bytes in length