python 代码:
import hashlib
h = hashlib.md5('helloworld')
print h.hexdigest()
---
输出:fc5e038d38a57032085441e7fe7010b0
shell 代码:
$> echo helloworld | md5
---
输出:d73b04b0e696b0945283defa3eee4538
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
echo默认会在字符串后面加上"\n",可以用-n选项,如下: