ini extension=sodium 保存文件并重启你的Web服务器。 5. 验证sodium扩展是否已成功安装并启用 再次运行以下命令来验证sodium扩展是否已成功安装并启用: bash php -m | grep sodium 如果输出中包含sodium,则说明扩展已成功安装并启用。 现在,你的PHP环境应该已经配置好了sodium扩展,可以开始使用它来加密数据了。
php8:sodium extension is missing#18997 Closed Livy-Inverseopened this issueJul 21, 2022· 8 comments Copy link Livy-InversecommentedJul 21, 2022• edited Maintainer:@mhei@flyn-org Environment: arm_cortex-a7_neon-vfpv4, MobiPromo CM520-79F, 22.03.0-rc5 ...
$decryptedMessage=sodium_crypto_secretbox_open($encryptedMessage,$nonce,$secretKey); How it works: $secret_keyis a secret key. Not a password. It's binary data, not something designed to be human readable, but rather to have a key space as large as possible for a given length. Thekeygen...
After installing both the library and the PHP extension, make a quick test script to verify that you have the correct version of libsodium installed.<?php var_dump([ \Sodium\library_version_major(), \Sodium\library_version_minor() ]); ...
git clone https://github.com/alethia7/php-sodium.git phpize&&./configure&&make&&sudo make install;maketest Enable sodium extenion in PHP. Add "extension = sodium.so" to php.ini. On Debian systems execute: #As rootecho"extension = sodium.so">/etc/php5/mods-available/sodium.ini php5en...