Xof class

class cryptosyspki.Xof

Extendable-output function (XOF).

class Alg

Extendable-output function (XOF) algorithm.

MGF1_SHA1 = 528

MGF1-SHA-1 as per PKCS#1

MGF1_SHA256 = 531

MGF1-SHA-256

MGF1_SHA512 = 533

MGF1-SHA-512

SHAKE128 = 515

SHAKE128 as per FIPS PUB 202

SHAKE256 = 516

SHAKE256 as per FIPS PUB 202

static bytes(numbytes, msg, xofalg)

Generate bytes using an extendable-output function (XOF).

Parameters:
  • numbytes (int) -- Required number of output bytes.

  • msg (bytes) -- Input message data.

  • xofalg (Xof.Alg) -- PRF algorithm

Returns:

Output data.

Return type:

bytes