virgil_crypto.hashes.hash_algorithm module

class virgil_crypto.hashes.hash_algorithm.HashAlgorithm[source]

Bases: object

Enumeration containing supported Algorithms

SHA224 = 0
SHA256 = 1
SHA384 = 2
SHA512 = 3
exception UnknownAlgorithmException(algorithm)[source]

Bases: Exception

Exception raised when Unknown Algorithm passed to convertion method

classmethod convert_to_native(algorithm)[source]

Converts algorithm enum value to native value

Parameters

algorithm – algorithm for conversion.

Returns

Native library algorithm id.

Raises

UnknownAlgorithmException – if algorithm is not supported.