python 代码:
import hashlib
h = hashlib.md5('helloworld')
print h.hexdigest()
---
输出:fc5e038d38a57032085441e7fe7010b0
shell 代码:
$> echo helloworld | md5
---
输出:d73b04b0e696b0945283defa3eee4538
python 代码:
import hashlib
h = hashlib.md5('helloworld')
print h.hexdigest()
---
输出:fc5e038d38a57032085441e7fe7010b0
shell 代码:
$> echo helloworld | md5
---
输出:d73b04b0e696b0945283defa3eee4538
2 回答4.3k 阅读✓ 已解决
2 回答850 阅读✓ 已解决
7 回答2k 阅读
1 回答4.1k 阅读✓ 已解决
3 回答838 阅读✓ 已解决
2 回答2.1k 阅读✓ 已解决
4 回答2.5k 阅读
echo默认会在字符串后面加上"\n",可以用-n选项,如下: