[Python] Unsupported hash type ripemd160 with hashlib in Python

Discussão em 'Python' iniciado por Stack, Maio 19, 2025.

  1. Stack

    Stack Membro Participativo

    After a thorough search, I have not found a complete explanation and solution to this very common problem on the entire web. All scripts that need to encode with hashlib give me error:

    Python 3.10

    import hashlib
    h = hashlib.new('ripemd160')


    return:

    Traceback (most recent call last):
    File "<stdin>", line 1, in <module>
    File "/usr/lib/python3.10/hashlib.py", line 166, in __hash_new
    return __get_builtin_constructor(name)(data)
    File "/usr/lib/python3.10/hashlib.py", line 123, in __get_builtin_constructor
    raise ValueError('unsupported hash type ' + name)
    ValueError: unsupported hash type ripemd160


    I already tried to check if that hash exists in the library, and if I have it:

    print(hashlib.algorithms_available): {'md5', 'sm3', 'sha3_512', 'sha384', 'sha256', 'sha1', 'shake_128', 'sha224', 'sha512_224', 'sha512_256', 'blake2b', 'ripemd160', 'md5-sha1', 'sha512', 'sha3_256', 'shake_256', 'sha3_384', 'whirlpool', 'md4', 'blake2s', 'sha3_224'}

    I am having this problem in a vps with linux, but in my pc I use Windows and I don't have this problem.

    I sincerely appreciate any help or suggestion.

    Continue reading...

Compartilhe esta Página