md5sum算法 —— linux或Unix上,md5sum是用来计算和校验文件报文摘要的工具程序

本文详细介绍了Linux或Unix系统中使用md5sum进行文件和字符串校验的方法,包括手动输入、管道命令、脚本加密以及文件路径的校验。通过md5sum命令,可以生成并验证文件的MD5校验和,确保文件内容的完整性。同时,文章提到了MD5sum与其他更安全的校验算法如SHA*系列的比较。
摘要由CSDN通过智能技术生成

md5sum帮助命令:

[root@jie openssl]# md5sum --help

Usage: md5sum [OPTION]... [FILE]...
Print or check MD5 (128-bit) checksums.
With no FILE, or when FILE is -, read standard input.

  -b, --binary         read in binary mode
  -c, --check          read MD5 sums from the FILEs and check them
      --tag            create a BSD-style checksum
  -t, --text           read in text mode (default)
  Note: There is no difference between binary and text mode option on GNU system.

The following four options are useful only when verifying checksums:
      --quiet          don't print OK for each successfully verified file
      --status         don't output anything, status code shows success
      --strict         exit non-zero for improperly formatted checksum lines
  -w, --warn           warn about improperly formatted checksum lines

      --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 input mode ('*' for binary,
space for text), and name for each FILE.

GNU coreutils online help: <http://www.gnu.org/software/coreutils/>
For complete documentation, run: info coreutils 'md5sum invocation'

md5sum 加密字符串的方法:

利用md5sum加密字符串的方法
   # md5sum //然后回车
   123456 //输入123456.然后按两次ctrl+d.
  显示:
   123456e10adc3949ba59abbe56e057f20f883e 红色代表加密后的值
  还可以用管道命令:
   #echo -n '123123' | md5sum

1、手动按照顺序输入的过程如下图所示:

第一步:在终端输入md5sum后回车:
[root@jie md5sum]# md5sum 
第二步:输入要加密的字符串admin:
admin
此时的输入界面显示如下:

第三步:输入两次ctrl+d结束此次加密:

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值