Python A word check software hash value

Source: Internet
Author: User

Reproduced:

How do I Python a sentence checksum software hash valueoriginal 2017-05-21 cosine lazy people in thinking

MD5

Python-c "Import Hashlib,sys;print hashlib.md5 (open (sys.argv[1], ' RB ')." Read ()). Hexdigest () "Shadowsocks.exe

Verify that the download software is "in the hands of a middleman"

Example: Verifying shadowsocks

SHA-1

Python-c "Import Hashlib,sys;print hashlib.sha1 (open (sys.argv[1], ' RB ')." Read ()). Hexdigest () "Shadowsocks.exe

SHA-256

Python-c "Import Hashlib,sys;print hashlib.sha256 (open (sys.argv[1], ' RB ')." Read ()). Hexdigest () "Shadowsocks.exe

SHA-512

Python-c "Import Hashlib,sys;print hashlib.sha512 (open (sys.argv[1], ' RB ')." Read ()). Hexdigest () "Shadowsocks.exe

Python A word check software hash value

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.