Skip to main content

get_digest_algorithm

Convert string to hash object of cryptography library.

def get_digest_algorithm(
digest: string = sha256
) - > object

Convert string to hash object of cryptography library.

Parameters

NameTypeDescription
digeststring = sha256The name of the hashing algorithm to retrieve, such as 'sha256' or 'md5', which is case-insensitive and must not be None

Returns

TypeDescription
objectAn instance of a cryptographic hash algorithm from the cryptography.hazmat.primitives.hashes module, initialized for use in digest operations