przekonwertuj String na MD5

Ok próbuję napisać podstawowy konwerter ciągu namd5 kod skrótu, ale kiedy uruchamiam mój program, ciągle otrzymuję błąd, który mówi:

Traceback (most recent call last):
  File "C:\Users\Shane\Documents\Amer CISC\lab4.py", line 30, in <module>
    assertEqual (computeMD5hash("The quick brown fox jumps over the lazy dog"),("9e107d9d372bb6826bd81d3542a419d6"))
  File "C:\Users\Shane\Documents\Amer CISC\lab4.py", line 27, in computeMD5hash
    m.update(string)
TypeError: Unicode-objects must be encoded before hashing

Mój kod wygląda tak:

def computeMD5hash(string):
    import hashlib
    from hashlib import md5
    m = hashlib.md5()
    m.update((string))
    md5string=m.digest()
    return md5string

questionAnswers(4)

yourAnswerToTheQuestion