Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

小程序解密$encryptedData数据 #687

Closed
123Daoxyz opened this issue May 9, 2017 · 9 comments
Closed

小程序解密$encryptedData数据 #687

123Daoxyz opened this issue May 9, 2017 · 9 comments

Comments

@123Daoxyz
Copy link

我用的环境

centos7.x

PHP 版本:PHP 5.6.21 (cli)
overtrue/wechat 版本:3.1

问题及现象

MiniProgram怎么使用解密api来解密用户的数据?木有看到类似的api调用方法。

@mingyoung
Copy link
Collaborator

mingyoung commented May 9, 2017

$miniProgram->encryptor->decryptData($sessionKey, $iv, $encryptedData);

@123Daoxyz 123Daoxyz changed the title 小程序解密$iv数据 小程序解密$encryptedData数据 May 9, 2017
@hareluya
Copy link

hareluya commented Jun 4, 2017

不太明白现在这个方法到底是怎么用的?
看到MiniProgram下面有一个Encryptor类,然后从service provider看到却是用了overtrue自带的encryptor,到底应该怎么使用呢?

@hareluya
Copy link

hareluya commented Jun 4, 2017

另外如果用原生的Encryptor类,里面的解密方法似乎和官方说法不一致?

@mingyoung
Copy link
Collaborator

@hareluya
已修复:af7ba6a

@hareluya
Copy link

hareluya commented Jun 4, 2017

@mingyoung
神速。。但构造函数参数个数似乎不对哟- -~

@mingyoung
Copy link
Collaborator

@hareluya 好,我明天看看再处理一下

@mingyoung
Copy link
Collaborator

@hareluya
67dcd98
实例化后:$miniProgram->encryptor->decryptData($sessionKey, $iv, $encryptedData);

@hareluya
Copy link

hareluya commented Jun 5, 2017

收到~ 已通过~ 感谢~

@mingyoung
Copy link
Collaborator

mingyoung commented Jun 5, 2017 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants