HashSHA3

class dsviper.HashSHA3(bits='256')

Bases: object

Hashes data with SHA3.

bits is ‘224’, ‘256’, ‘384’ or ‘512’, as a string; another value raises.

block_size() → int

Return the internal block size of the hash algorithm in bytes.

digest() → ValueBlob

Return the hash of everything fed so far, as raw bytes.

digest_size() → int

Return the size of the resulting hash in bytes.

static hash(blob: ValueBlob, bits: str = '256') → str

Return the hex digest of blob, using the SHA3 variant bits names - ‘224’, ‘256’, ‘384’ or ‘512’.

hashing() → Hashing

Return the Hashing interface.

hexdigest() → str

Return the hexa digest.

name() → str

Return the name of the algorithm, as it appears in a codec header.

reset() → None

Reset the hasher.

update(blob: ValueBlob) → None

Feed blob into the hash.