blake2
Module for BLAKE-2 algorithms.
- class Blake2b
Bases:
object
BLAKE2b class. It computes digests using BLAKE2b algorithm.
- static QuickDigest(data: Union[bytes, str], digest_size: int, key: Union[bytes, str] = b'', salt: Union[bytes, str] = b'') bytes
Compute the digest (quick version).
- Parameters:
data (str or bytes) – Data
digest_size (int) – Digest size
key ((str or bytes, optional) – Key (default: empty)
salt ((str or bytes, optional) – Salt (default: empty)
- Returns:
Computed digest
- Return type:
bytes
- class Blake2b32
Bases:
_Blake2bWithSpecificSize
BLAKE2b-32 class. It computes digests using BLAKE2b-32 algorithm.
- static DigestSize() int
Get the digest size in bytes.
- Returns:
Digest size in bytes
- Return type:
int
- class Blake2b40
Bases:
_Blake2bWithSpecificSize
BLAKE2b-40 class. It computes digests using BLAKE2b-40 algorithm.
- static DigestSize() int
Get the digest size in bytes.
- Returns:
Digest size in bytes
- Return type:
int
- class Blake2b160
Bases:
_Blake2bWithSpecificSize
BLAKE2b-160 class. It computes digests using BLAKE2b-160 algorithm.
- static DigestSize() int
Get the digest size in bytes.
- Returns:
Digest size in bytes
- Return type:
int
- class Blake2b224
Bases:
_Blake2bWithSpecificSize
BLAKE2b-224 class. It computes digests using BLAKE2b-224 algorithm.
- static DigestSize() int
Get the digest size in bytes.
- Returns:
Digest size in bytes
- Return type:
int