Hash

Hash module

class fips.FIPS204.hash.H[source]

Bases: object

Shake 256 class

Absorb(input_bytestring)[source]

Injects data to be used in the absorbing phase of SHAKE256 and updates context ctx.

Parameters:

input_bytestring (bytes)

Squeeze(output_bytestring_length)[source]

Extracts ‘output_bytestring_length’ output bytes produced during the squeezing phase of SHAKE256 and updates context ctx.

Return type:

bytes

Parameters:

output_bytestring_length (int)

class fips.FIPS204.hash.G[source]

Bases: object

Shake 128 class

Absorb(input_bytestring)[source]

Injects data to be used in the absorbing phase of SHAKE256 and updates context ctx.

Parameters:

input_bytestring (bytes)

Squeeze(output_bytestring_length)[source]

Extracts ‘output_bytestring_length’ output bytes produced during the squeezing phase of SHAKE256 and updates context ctx.

Return type:

bytes

Parameters:

output_bytestring_length (int)