此文版权属于作者所有,任何人、媒体或者网站转载、借用都必须征得作者本人同意!
-
linux shell command
echo -n 'hello world' | md5sum #如果 echo 不支持 -n 参数,用这个: printf '%s' 'hello world' | md5sum
-
python
import hashlib m = hashlib.md5() m.update("hello world") print m.hexdigest()
-
?
?
此文版权属于作者所有,任何人、媒体或者网站转载、借用都必须征得作者本人同意!
echo -n 'hello world' | md5sum
#如果 echo 不支持 -n 参数,用这个:
printf '%s' 'hello world' | md5sum
import hashlib
m = hashlib.md5()
m.update("hello world")
print m.hexdigest()