#-- # Script to test the JavaScript hash algorithms # This produces an HTML file, that you load in a browser to run the tests #-- from __future__ import absolute_import from __future__ import print_function # pylint: disable=W0640, E1601 import hashlib import hmac all_algs = ['md5', 'sha1', 'ripemd160', 'sha256', 'sha512'] short = {'ripemd160': 'rmd160'} test_string_3 = u'fred\u1234'.encode('utf-8') if not isinstance(test_string_3, str): test_string_3 = test_string_3.decode("utf-8") test_strings = ['hello', 'world', test_string_3, 'this is a longer test message to confirm that multiple blocks are handled correctly by the hashing algorithm'] print("""
""") for alg in all_algs: algs = short.get(alg, alg) print(""" """) print("")