Encrypt a string using openssl command line

后端 未结 4 1882
迷失自我
迷失自我 2020-12-07 22:36

I have a 16 byte character that I would like to encrypt using openssl into a 16 byte encrypted string.

This encrypted string ( in human readable format ) then nee

4条回答
  •  青春惊慌失措
    2020-12-07 23:39

    Try this:

    echo 'foo' | openssl aes-256-cbc -a -salt
    echo 'U2FsdGVkX1/QGdl4syQE8bLFSr2HzoAlcG299U/T/Xk=' | openssl aes-256-cbc -a -d -salt
    

    Run

    openssl list-cipher-commands 
    

    to list all available ciphers.

提交回复
热议问题