Skip to content
forked from luzhuqun/php-sm3

a php extension for sm3(实现sm3算法的php扩展)

Notifications You must be signed in to change notification settings

hlinfocc/php-sm3

 
 

Repository files navigation

php-sm3

a php extension for sm3(实现sm3算法的php扩展)

安装步骤

  1. git clone该项目到你的linux php源码ext目录下.
  2. 进入sm3扩展目录,执行/usr/local/php/bin/phpize
  3. ./configure --with-php-config=/usr/local/php/bin/php-config --enable-sm3
  4. make && make install
  5. 添加扩展到你的php.ini文件 extension=sm3.so
  6. 测试/usr/local/php/bin/php -r "var_dump(sm3('abc'));" 输出string(64) "66c7f0f462eeedd9d1f2d46bdc10e4e24167c4875cf2f7a2297da02b8f4ba8e0"

备注

  1. forked from luzhuqun/php-sm3

生成 php-sm3_arginfo.h的方法(仅作记录备忘):

先编写好php-sm3.stub.php,再执行以下命令

php /opt/php-8.1.8/build/gen_stub.php php-sm3.stub.php

About

a php extension for sm3(实现sm3算法的php扩展)

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C 85.6%
  • M4 8.1%
  • PHP 5.0%
  • JavaScript 1.3%