标签:加密 open pki margin nss ant 内容 aes salt
用openssl加密的时候,如果加密后的内容过长,超过64字符就会自动换成两行
echo ‘LVku2fpWSFFHHHctRdmkByLaj6BQeXzpMrcEYiv3KgGyVLbF2m43VGf-OWAKZ5pYiW6‘ | openssl enc -e -aes-128-cbc -a -salt -pass pass:qaz123wsx U2FsdGVkX19LbK7c46KtFxDK4BqWVSCdjpKiazwMFs1gIdL7IIEm1TvWoBE66Ebx /h++G2V2TbdwKb03zObFNFOmu4Ru6pxbFu0i0b/P9rRl6yzmF3ZPv8sbH5o4tbXm
用这种方式可以讲加密后的内容输出成一行
echo ‘LVku2fpWSFFHHHctRdmkByLaj6BQeXzpMrcEYiv3KgGyVLbF2m43VGf-OWAKZ5pYiW6‘ | openssl enc -A -aes-128-cbc -a -salt -pass pass:123456 U2FsdGVkX1+dxdrWnmCQj5TLlRD4rGS90SHuuVYl968hloq/tXesRg13B8e76Qrb+N6CqfZRS8knsDeRhe8MpYNB6WWtbM/QVu3GzL86GU1ZaXrRHtcRfy9hpSRgXNT
加密:
$TOKEN=$(echo ‘LVku2fptRdmkByLWDSNKFDFgGyVLbF2mM23236GJf-OWAKZ5pYiW6hDNOSD‘ | openssl enc -e -A -aes-128-cbc -a -salt -pass pass:123456) $echo $TOKEN U2FsdGVkX1+8bog/Cndn5WpCI0vH5wtb0f+Ou/0GHm4Kpsg+0/32Ht+M7yvuKGL8Zk4C01m9uhn0ylo+upoOJ0AvhidkyGWao71Ppufr/uQ=
解密:
$ echo $TOKEN | openssl enc -A -aes-128-cbc -a -d -salt -pass pass:123456 LVku2fptRdmkByLWDSNKFDFgGyVLbF2mM23236GJf-OWAKZ5pYiW6hDNOSD
标签:加密 open pki margin nss ant 内容 aes salt
原文地址:https://www.cnblogs.com/iwangzheng/p/11790164.html