Simple usage of Linux OpenSSL

Source: Internet
Author: User
Tags base64 openssl file permissions

use OpenSSL to encrypt user data

OpenSSL paswd can encrypt user's password

-1 means encryption using MD5

-SALT specifies a random number, although this random number is statically specified.

Generate random numbers

Two equals signs in output content are Base64 encoded fixed format

-base64 indicates that the generated random number is displayed using the Base64 encoded format

-hex indicates that the generated random number is displayed in hexadecimal format

10 indicates a 10-byte random number is generated

Encrypt user passwords with random numbers generated automatically by the system

Computes the hash value of a file

OpenSSL DGST-SHA1 =sha1sum

Encrypting files

-in files that need to be processed

-out Output Files

-pass Encryption Password

-e Encryption command Purpose

-D Decryption

-a encoded format The default output file content is displayed by the BASE64 encoded format

adding random numbers when-salt encryption

Now, decrypt it.

Look at the decrypted file contents.

Note: The decrypted file permissions may not be consistent with the original file.



Simple usage of Linux OpenSSL

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.