发布时间: 2020-3-5 文章作者: myluzh 分类名称: NOTE 朗读文章
[root@kali ~]# openssl OpenSSL> md5 123456 (stdin)= f447b20a7fcbf53a5d5be013ea0b15af OpenSSL> md5 123456(stdin)= e10adc3949ba59abbe56e057f20f883e #MD5计算时包含了回车符 OpenSSL> [root@kali ~]# [root@kali ~]# openssl OpenSSL> md5 123456(stdin)= e10adc3949ba59abbe56e057f20f883e #输入完后按Crtl+D三次管道标准输入处理
[root@kali ~]# echo 123456 |openssl md5 #MD5计算时包含了回车符 (stdin)= f447b20a7fcbf53a5d5be013ea0b15af [root@kali ~]# echo -n 123456 |openssl md5 #-n 不带回车符,才是正确的 (stdin)= e10adc3949ba59abbe56e057f20f883e对文件处理
[root@kali ~]# openssl md5 install.log MD5(install.log)= f03cd6d4ef3a5a112ae827dc29dc0564md5sum
[root@kali ~]# md5sum install.log f03cd6d4ef3a5a112ae827dc29dc0564 install.log [root@kali ~]# echo -n 123456 | md5sum e10adc3949ba59abbe56e057f20f883e - [root@kali ~]# echo 123456 | md5sum f447b20a7fcbf53a5d5be013ea0b15af -
[root@kali ~]# echo abc |openssl base64 #加密 YWJjCg== [root@kali ~]# echo YWJjCg== |openssl base64 -d # 解密 abc针对文件
[root@kali ~]# openssl base64 -in test.log #加密 MTIzNDU2Cg== [root@kali ~]# openssl base64 -in test.log >>test.log2 [root@kali ~]# openssl base64 -d -in test.log2 #解密 123456md5/sha1摘要
[root@kali ~]# echo 'abc' |openssl md5 (stdin)= 0bee89b07a248e27c83fc3d5951213c1 [root@kali ~]# echo 'abc' |openssl sha1 (stdin)= 03cfd743661f07975fa2f1220c5194cbaff48451 [root@kali ~]# openssl sha1 test.log SHA1(test.log)= c4f9375f9834b4e7f0a528cc65c055702bf5f24a [root@kali ~]# openssl md5 test.log MD5(test.log)= f447b20a7fcbf53a5d5be013ea0b15af [root@kali ~]# cat test.log 123456
[root@kali ~]# echo 'abc' |openssl aes-128-cbc -k 123 -base64 U2FsdGVkX1/hVjxSVVQYBKYJ3VYttcoKT6dwX7z35Xk= [root@kali ~]# echo 'U2FsdGVkX1/hVjxSVVQYBKYJ3VYttcoKT6dwX7z35Xk=' |openssl aes-128-cbc -d -k 123 -base64 abc对字符串‘abc’进行des3加密,使用密钥123,输出结果以base64编码格式给出:
[root@kali ~]# echo 'abc' |openssl des3 -k 123 -base64 U2FsdGVkX1/BXgALF5w75s3TaqaWUQI/ [root@kali ~]# echo 'U2FsdGVkX1/BXgALF5w75s3TaqaWUQI/' |openssl des3 -d -k 123 -base64 abc
发表评论