OpenSSL is a command-line tool. Linux can use OpenSSL for some command-line related work. How do Linux use the OpenSSL command line? The following small series will give you a detailed introduction to the use of the OpenSSL command line.
1. base64 encoding /decoding
Speaking at the command line how to send e-mail attachments, many people think of uuencode. You can also use base64 encoding. The following is the use of openssl base64 encoding/decoding:
$ openssl base64 " filename.bin " filename.txt
$ openssl base64 -d " filename.txt " filename.bin
2. Verify file consistency
There are many ways to verify file consistency under UNIX, such as sum, cksum, md5sum, sha1sum, etc. Sum and cksum are suitable for simple verification, and the generated check code is easy to repeat. Md5sum has a security vulnerability. The current recommendation is sha1sum. However, sha1sum is somewhat different in different platforms. Considering cross-platformity, it is recommended to use openssl.
$ openssl sha1 filename
SHA1(filename)= e83a42b9bc8431a6645099be50b6341a35d3dceb
$ openssl md5 filename
MD5(filename)= 26e9855f8ad6a5906fea121283c729c4
3. File Encryption/Decryption
OpenSSL supports many encryption algorithms, but some algorithms are only for backward compatibility and are not recommended now, such as DES and RC4-40. The recommended encryption algorithms are bf (Blowfish) and -aes-128-cbc (128-bit key AES encryption algorithm running in CBC mode), and the encryption strength is guaranteed.
Encryption example:
$ openssl enc -aes-128-cbc " filename " filename.aes-128-cbc
enter aes-128-cbc encryption password:< Br>
Verifying - enter aes-128-cbc encryption password:
Decryption example:
$ openssl enc -d -aes-128-cbc -in filename.aes-128- Cbc ” filename
enter aes-128-cbc decryption password:
Previous12Next page Total 2 pages
Linux input method switching is the same as Windows, you can also use shortcut swit
Raid is divided into software Raid and hardware Raid. Because the hardware Raid is
openSUSE Linux is a kernel-based Linux operating system, has been upgraded to version 13.2, how many
The chkconfig command under Linux is mainly used to query the system services execu
How to use the Linux system top command
Ubuntu 14.04 install java method
What should I do if the Linux server is attacked by a rootkit?
Linux shutdown selinux security subsystem skills
Linux How to use userdel to delete users
Modify the IP address under Linux
How to make Red Flag Linux use wireless network card to be more secure
The process of reading MBR information from Linux system
How Linux uses the command line to clean up the disk to increase the space
What should I do if I want to enter a password every time git is submitted in Ubuntu?
Ubuntu 64-bit installation WPS office software error how to do?
Lenovo bypasses Microsoft to add a start menu for Windows 8 computers
Wonderful integration of the taskbar in win xp
The latest version of Win10 Mobile is 1051x (x stands for a certain number). It is expected to push
Windows7 playing Flash video has no sound?
What does cdkey mean, how to get CDKEY?
Use the registry, Office2013 account login you are the master
How to eliminate the contents of Win8.1 dynamic tile?