def hash_digest(text):
 text_encoded = text.encode('utf8')
 hash_result = hashlib.md5(text_encoded)
 return hash_result.hexdigest()

def hash_digest ( text ) : text_encoded = text . encode ( 'utf8' ) hash_result = hashlib . md5 ( text_encoded ) return hash_result . hexdigest ( )
create the hash digest for a text .