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
4 回答4.4k 阅读✓ 已解决
4 回答3.8k 阅读✓ 已解决
7 回答2k 阅读
1 回答3k 阅读✓ 已解决
3 回答2.1k 阅读✓ 已解决
1 回答4.5k 阅读✓ 已解决
1 回答3.8k 阅读✓ 已解决
echo默认会在字符串后面加上"\n",可以用-n选项,如下: