import hashlib


def checkio(hashed_string, algorithm):
    h = hashlib.new(algorithm)
    h.update(hashed_string.encode('utf-8'))
    return h.hexdigest()


if __name__ == '__main__':
    #These "asserts" using only for self-checking and not necessary for auto-testing
    assert checkio(u'welcome', 'md5') == '40be4e59b9a2a2b5dffb918c0e86b3d7'
    assert checkio(u'happy spam', 'sha224') == '6e9dc3e01d57f1598c2b40ce59fc3527e698c77b15d0840ae96a8b5e'

63dcfd508f0336c3033f165a1c94b743dca6e3c0
<mask token>

<mask token>


def checkio(hashed_string, algorithm):
    h = hashlib.new(algorithm)
    h.update(hashed_string.encode('utf-8'))
    return h.hexdigest()


<mask token>

<mask token>


def checkio(hashed_string, algorithm):
    h = hashlib.new(algorithm)
    h.update(hashed_string.encode('utf-8'))
    return h.hexdigest()


if __name__ == '__main__':
    assert checkio(u'welcome', 'md5') == '40be4e59b9a2a2b5dffb918c0e86b3d7'
    assert checkio(u'happy spam', 'sha224'
        ) == '6e9dc3e01d57f1598c2b40ce59fc3527e698c77b15d0840ae96a8b5e'

import hashlib


def checkio(hashed_string, algorithm):
    h = hashlib.new(algorithm)
    h.update(hashed_string.encode('utf-8'))
    return h.hexdigest()


if __name__ == '__main__':
    assert checkio(u'welcome', 'md5') == '40be4e59b9a2a2b5dffb918c0e86b3d7'
    assert checkio(u'happy spam', 'sha224'
        ) == '6e9dc3e01d57f1598c2b40ce59fc3527e698c77b15d0840ae96a8b5e'

import hashlib


def checkio(hashed_string, algorithm):
    h = hashlib.new(algorithm)
    h.update(hashed_string.encode('utf-8'))
    return h.hexdigest()


if __name__ == '__main__':
    #These "asserts" using only for self-checking and not necessary for auto-testing
    assert checkio(u'welcome', 'md5') == '40be4e59b9a2a2b5dffb918c0e86b3d7'
    assert checkio(u'happy spam', 'sha224') == '6e9dc3e01d57f1598c2b40ce59fc3527e698c77b15d0840ae96a8b5e'
