lpilp / phpsm2sm3sm4

php版本,支持国密SM2的签名算法,非对称加解密,SM3的hash, SM4的对称加解密
314 stars 72 forks source link

composer安装不了 使用的框架是laravel #21

Closed lijiangit closed 2 years ago

lijiangit commented 2 years ago

Problem 1

To enable extensions, verify that they are enabled in your .ini files:

lijiangit commented 2 years ago

使用的php版本是8.0.3

lpilp commented 2 years ago

PHP 8 好像缺省没有gmp组件, 你php -m 看下有没有这个组件,没有的放在,安装下就可以了, 我用php8.1试过

lijiangit commented 2 years ago

@lpilp 谢谢 明白了

lijiangit commented 2 years ago

在对接招行的时候 私钥格式是NBtl7WnuUtA2v5FaebEkU0/Jj1IodLGT6lQqwkzmd2E= 和 调用生成明文密钥生成的私钥格式"27a89f351cfc52351d416615785f2e2f4cd35ff2f96d04e291a661645bc4c2f0" 不是一样的 用招行的用户私钥签名时,报gmp的一个错误gmp_init(): Argument #1 ($num) is not an integer string, 请问这种格式的私钥怎么签名呢

lpilp commented 2 years ago

bin2hex(base64_decode("NBtlxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx")) base64解一下就好了,

lijiangit commented 2 years ago

万分感谢