php - Laravel 6:使用 virgil/crypto 加密错误:调用未定义函数 vscf_ctr_drbg_new_php
问题描述
我正在尝试使用https://github.com/VirgilSecurity/virgil-crypto-php像这样在 Laravel 宅基地中使用公钥/私钥加密/解密数据
composer require virgil/crypto
use Virgil\Crypto\VirgilCrypto;
// inside the function:
$crypto = new VirgilCrypto();
$receiverKeyPair = $crypto->generateKeyPair();
然后安装SDK https://github.com/VirgilSecurity/virgil-sdk-php
composer require virgil/sdk
./vendor/virgil/crypto-wrapper/_extensions/setup.sh -all -vendor
我可以vsce_phe_php, vscf_foundation_php, vscp_pythia_php
在运行php -m
命令后看到这些扩展,但我得到了
Call to undefined function Virgil\CryptoWrapper\Foundation\vscf_ctr_drbg_new_php() {"exception":"[object]
(Symfony\\Component\\Debug\\Exception\\FatalThrowableError(code: 0): Call to undefined function
Virgil\\CryptoWrapper\\Foundation\\vscf_ctr_drbg_new_php() at
/home/vagrant/code/my-project/vendor/virgil/crypto-wrapper/src/Foundation/CtrDrbg.php:63)
在包中的任何地方都找不到此中的所有功能,我该如何解决?
解决方案
推荐阅读
- c - return 从指针目标类型中丢弃“const”限定符
- selenium - 尝试导入 Cucumber 时 Cucumber + Selenium 出错
- r - 绘制逻辑值的密度
- machine-learning - 我可以使用什么机器学习方法来识别颜色?
- python - 站点地图生成:手动更新页面的 lastmod/last_published_at
- c# - xamarin Essentials:没有重载>'OnMainDisplayInfoChanged'匹配委托>'EventHandler
' - c# - 如何在 rad 向导步骤更改上触发 ajax 请求
- r - R scale() 打印 .Rmd 文件输出中的所有数据集
- excel - Python中的数据对齐
- angular - 自动刷新角度分量