# php_and_openssl_another **Repository Path**: xxfaxy-open/php_and_openssl_another ## Basic Information - **Project Name**: php_and_openssl_another - **Description**: php利用openssl函数加密解密和openssl命令行对应起来的代码例子 - **Primary Language**: PHP - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 1 - **Forks**: 0 - **Created**: 2017-10-08 - **Last Updated**: 2022-08-28 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README ### php encode.php a1加密为a2 decode.php b2解密为a1 raw.php.txt(a1) result.php.txt(a2) ### openssl encode.sh b1加密为b2 decode.sh a2解密为b1 raw.sh.txt(b1) result.sh.txt(b2) ### 脚本运行方式 ``` php ./encode.php php ./decode.php ./encode.sh ./decode.sh ``` 需要注意的是如果加密的字符串过长,bash脚本会将base64切断为多行保存,但是不影响解密 校验文件时注意最后是否有换行符,直接以文件内容为主 openssl下载地址 https://www.openssl.org/source/ 对应的加密代码应该在`crypto/aes`目录下