版权声明:欢迎传播,请标明出处。 https://cloud.tencent.com/developer/article/1352504
网上找了下openssl 加解密 aes-128-cbc相关命令, 发现都比较含糊, 这里是摸索出的一个aes-12b-cbc加解密的实例.
echo "1234567890abc" > plain.txt
openssl enc -aes-128-cbc -in plain.txt -out encrypt.txt -iv f123 -K 1223 -p
salt=E0DEB1EAFE7F0000
key=12230000000000000000000000000000
iv =F1230000000000000000000000000000xxd plain.txt
00000000: 3132 3334 3536 3738 3930 6162 630a 1234567890abc.
xxd encrypt.txt
00000000: c5af 18cb ddee 9923 0374 6a21 9bb6 3f99 …#.tj!..?.openssl aes-128-cbc -d -in encrypt.txt -out encrypt_decrypt.txt -S E0DEB1EAFE7F0000 -iv F1230000000000000000000000000000 -K 12230000000000000000000000000000
-S salt Salt to use, specified as a hexidecimal string
-salt Use a salt in the key derivation routines (default)xxd encrypt_decrypt.txt
00000000: 3132 3334 3536 3738 3930 6162 630a 1234567890abc.扫码关注腾讯云开发者
领取腾讯云代金券
Copyright © 2013 - 2025 Tencent Cloud. All Rights Reserved. 腾讯云 版权所有
深圳市腾讯计算机系统有限公司 ICP备案/许可证号:粤B2-20090059 深公网安备号 44030502008569
腾讯云计算(北京)有限责任公司 京ICP证150476号 | 京ICP备11018762号 | 京公网安备号11010802020287
Copyright © 2013 - 2025 Tencent Cloud.
All Rights Reserved. 腾讯云 版权所有