设为首页 加入收藏

TOP

单向散列函数的价值和具体实现的详细使用
2017-04-07 10:26:47 】 浏览:241
Tags:单向 函数 价值 具体 实现 详细 使用

不同的参考书使用的术语有所不同:


场景:


 


-----工具使用举例--------(MD5,SHA-1,SHA-256,SHA-512等等使用方法相同)


MD5SUM(1)                        User Commands                       MD5SUM(1)


Usage: md5sum [OPTION]... [FILE]...


compute and check MD5 (128-bit) message digest


1.打印(计算)MD5(128位)校验和


2.检查MD5(128位)校验和


With no FILE, or when FILE is -, read standard input. 如果没有FILE或者FILE为‘-’,将从标准输入读入


-b, --binary            read in binary mode  以二进制模式读入


-c, --check             read MD5 sums from the FILEs and check them  从FILES读取MD5 sums,然后校验他们


-t, --text              read in text mode (default) 以文本模式读入(默认)


Note: There is no difference between binary and text mode option on GNU system.


提示: 如果在GUN 系统上,binary和text模式无任何区别。


---------------------------------------


The following three options are useful only when verifying checksums: 仅仅当查证校验和的时候,下面3个选项非常有用!


--quiet             don't print OK for each successfully verified file 被查证的文件如果成功,不打印OK(即仅仅显示错误信息,屏蔽验证正确的文件


--status            don't output anything, status code shows success 不输入任何东西,状态码显示success (即无论正确与否,都不输出任何信息,echo $?看最后结果


-w, --warn        warn about improperly formatted checksum lines 关于非合法的格式的checksum行,抛出warning,如此之外,不予显示


--help     display this help and exit


--version  output version information and exit


The sums are computed as described in RFC 1321.  When checking, the input


should be a former output of this program.  当检查时,输入的应该是之前程序的输出。


The default mode is to print a line with checksum, a character indicating type a character indi-cating type (‘*’ for binary, ‘ ’ for text), and name for each FILE.


默认的mode和checksum合并为一行打印,一个字符指出mode的类型(* 为二进制,空为text),每个FILE为name


Report md5sum bugs to bug-coreutils@gnu.org


GNU coreutils home page: <http://www.gnu.org/software/coreutils/>


General help using GNU software: <http://www.gnu.org/gethelp/>


For complete documentation, run: info coreutils 'md5sum invocation'


 


PS:


$ openssl dgst -md5  test.enc


MD5(test.enc)= 9a8ca202880547463da5796c6d29f611


$ md5sum test.enc


9a8ca202880547463da5796c6d29f611  test.enc


】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论】 【关闭】 【返回顶部
上一篇简单封装MySQLdb模块操作MySQL数.. 下一篇Python在PyCharm中利用Django开发..

最新文章

热门文章

Hot 文章

Python

C 语言

C++基础

大数据基础

linux编程基础

C/C++面试题目