API

class sha3bit.sha3_224(m=None, *, bitlen=None, verbose=False)
digest()

Return the digest of the bytes passed to the update() method so far as a bytes object.

export_state()

Export current state to a dict

hexdigest()

Like digest() except the digest is returned as a string of double length, containing only hexadecimal digits.

classmethod import_state(state)

Initialize an instance from an exported state

update(m, *, bitlen=None)

Update the hash object with the bytes in m. Repeated calls are equivalent to a single call with the concatenation of all the arguments.

class sha3bit.sha3_256(m=None, *, bitlen=None, verbose=False)
digest()

Return the digest of the bytes passed to the update() method so far as a bytes object.

export_state()

Export current state to a dict

hexdigest()

Like digest() except the digest is returned as a string of double length, containing only hexadecimal digits.

classmethod import_state(state)

Initialize an instance from an exported state

update(m, *, bitlen=None)

Update the hash object with the bytes in m. Repeated calls are equivalent to a single call with the concatenation of all the arguments.

class sha3bit.sha3_384(m=None, *, bitlen=None, verbose=False)
digest()

Return the digest of the bytes passed to the update() method so far as a bytes object.

export_state()

Export current state to a dict

hexdigest()

Like digest() except the digest is returned as a string of double length, containing only hexadecimal digits.

classmethod import_state(state)

Initialize an instance from an exported state

update(m, *, bitlen=None)

Update the hash object with the bytes in m. Repeated calls are equivalent to a single call with the concatenation of all the arguments.

class sha3bit.sha3_512(m=None, *, bitlen=None, verbose=False)
digest()

Return the digest of the bytes passed to the update() method so far as a bytes object.

export_state()

Export current state to a dict

hexdigest()

Like digest() except the digest is returned as a string of double length, containing only hexadecimal digits.

classmethod import_state(state)

Initialize an instance from an exported state

update(m, *, bitlen=None)

Update the hash object with the bytes in m. Repeated calls are equivalent to a single call with the concatenation of all the arguments.

class sha3bit.shake_128(m=None, *, bitlen=None, verbose=False)
digest(length)

Return the digest of the bytes passed to the update() method so far as a bytes object.

export_state()

Export current state to a dict

hexdigest(length)

Like digest() except the digest is returned as a string of double length, containing only hexadecimal digits.

hexsqueez(length)

Like squeez() except the bytes are returned as a string of double length, containing only hexadecimal digits.

classmethod import_state(state)

Initialize an instance from an exported state

squeez(length)

Squeez the sponge. Unlike digest(), consecutive calls do not return same values.

update(m, *, bitlen=None)

Update the hash object with the bytes in m. Repeated calls are equivalent to a single call with the concatenation of all the arguments.

class sha3bit.shake_256(m=None, *, bitlen=None, verbose=False)
digest(length)

Return the digest of the bytes passed to the update() method so far as a bytes object.

export_state()

Export current state to a dict

hexdigest(length)

Like digest() except the digest is returned as a string of double length, containing only hexadecimal digits.

hexsqueez(length)

Like squeez() except the bytes are returned as a string of double length, containing only hexadecimal digits.

classmethod import_state(state)

Initialize an instance from an exported state

squeez(length)

Squeez the sponge. Unlike digest(), consecutive calls do not return same values.

update(m, *, bitlen=None)

Update the hash object with the bytes in m. Repeated calls are equivalent to a single call with the concatenation of all the arguments.

class sha3bit.turboshake_128(m=None, *, bitlen=None, domain=31, verbose=False)
digest(length)

Return the digest of the bytes passed to the update() method so far as a bytes object.

export_state()

Export current state to a dict

hexdigest(length)

Like digest() except the digest is returned as a string of double length, containing only hexadecimal digits.

hexsqueez(length)

Like squeez() except the bytes are returned as a string of double length, containing only hexadecimal digits.

classmethod import_state(state)

Initialize an instance from an exported state

squeez(length)

Squeez the sponge. Unlike digest(), consecutive calls do not return same values.

update(m, *, bitlen=None)

Update the hash object with the bytes in m. Repeated calls are equivalent to a single call with the concatenation of all the arguments.

class sha3bit.turboshake_256(m=None, *, bitlen=None, domain=31, verbose=False)
digest(length)

Return the digest of the bytes passed to the update() method so far as a bytes object.

export_state()

Export current state to a dict

hexdigest(length)

Like digest() except the digest is returned as a string of double length, containing only hexadecimal digits.

hexsqueez(length)

Like squeez() except the bytes are returned as a string of double length, containing only hexadecimal digits.

classmethod import_state(state)

Initialize an instance from an exported state

squeez(length)

Squeez the sponge. Unlike digest(), consecutive calls do not return same values.

update(m, *, bitlen=None)

Update the hash object with the bytes in m. Repeated calls are equivalent to a single call with the concatenation of all the arguments.

class sha3bit.kangaroo12_128(m=None, *, custom=b'', verbose=False)
digest(length)

Return the digest of the bytes passed to the update() method so far as a bytes object.

export_state()

Export current state to a dict

hexdigest(length)

Like digest() except the digest is returned as a string of double length, containing only hexadecimal digits.

hexsqueez(length)

Like squeez() except the bytes are returned as a string of double length, containing only hexadecimal digits.

classmethod import_state(state)

Initialize an instance from an exported state

squeez(length)

Squeez the sponge. Unlike digest(), consecutive calls do not return same values.

update(m)

Update the hash object with the bytes in m. Repeated calls are equivalent to a single call with the concatenation of all the arguments.

class sha3bit.kangaroo12_256(m=None, *, custom=b'', verbose=False)
digest(length)

Return the digest of the bytes passed to the update() method so far as a bytes object.

export_state()

Export current state to a dict

hexdigest(length)

Like digest() except the digest is returned as a string of double length, containing only hexadecimal digits.

hexsqueez(length)

Like squeez() except the bytes are returned as a string of double length, containing only hexadecimal digits.

classmethod import_state(state)

Initialize an instance from an exported state

squeez(length)

Squeez the sponge. Unlike digest(), consecutive calls do not return same values.

update(m)

Update the hash object with the bytes in m. Repeated calls are equivalent to a single call with the concatenation of all the arguments.

class sha3bit.Keccak(capacity, suffix, *, verbose=False, nrounds=24)
absorb(data, bitlen=None)

Update the sponge object with the bytes in data. Repeated calls are equivalent to a single call with the concatenation of all the arguments.

export_state()

Export current state to a dict

static f1600(lanes, *, verbose=False, nrounds=24)

SHA3 f function. lanes must be a list of 5 list of 5 int. nrounds < 24 gives the reduced round permutation Keccak-p[1600, nrounds] defined in FIPS 202: only the last nrounds rounds are applied (round indexes 24 - nrounds to 23).

Return type:

list[list[int]]

static import_state(state)

Initialize an instance from an exported state

squeez(bytelen)

Squeez the sponge.