def get_text_fingerprint(text, hash_meth, encoding="<STR_LIT:utf-8>"):  
m = hash_meth()<EOL>m.update(text.encode(encoding))<EOL>return m.hexdigest()<EOL>
Use default hash method to return hash value of a piece of string
default setting use 'utf-8' encoding.