13 lines
316 B
Python
13 lines
316 B
Python
import hashlib
|
|
|
|
|
|
def get_str_md5(param_str):
|
|
if isinstance(param_str, str):
|
|
param_str = param_str.encode("utf-8")
|
|
m = hashlib.md5()
|
|
m.update(param_str)
|
|
return m.hexdigest()
|
|
|
|
|
|
if __name__ == '__main__':
|
|
print(get_str_md5('http://www.acewings.com/cobrachen/forum/topic.asp?TOPIC_ID=11821')) |