1.环境配置
使用php 7.3 编译协议加密扩展
php 版本 7.3 api版本 20180731
需要 swig 4.0.1
Autoconf 2.68 及以上版本
编译 Swig
./configure --prefix=/usr/local/swig --without-pcre
make & make install
编译autoconf
./configure --prefix=/usr/local/autoconf
make & make install
编译php
./configure --prefix=/usr/local/php
make & make install
源码php接口
头文件:demo.h
#ifdef _WIN32
#define IJMKEYBORAD_CSHARP_API
//#define JMENCRYPTBOX_CSHARP_API __declspec(dllexport)
#else
#define IJMKEYBORAD_CSHARP_API
//#define JMENCRYPTBOX_CSHARP_API __attribute__ ((visibility("default")))
#endif
//__declspec(dllexport) int __cdecl
IJMKEYBORAD_CSHARP_API int fun(char* keybuf);
IJMKEYBORAD_CSHARP_API int fun1(char* pSrc, char* pOutData, int is_random, char* random_str, int fillAlgo);
IJMKEYBORAD_CSHARP_API int fun2(char* pSrcData