php mcrypt_decrypt,PHP: mcrypt_decrypt - Manual
When i using this function i find some problem, with adding additional binary symbols in decode message.
$sDecrypt – ?2433091?
$sDecrypt strlen – 16 (before trim)
$sDecrypt – ?2433091?
$sDecrypt strlen – 7 (after trim)
At local PC this problem solved by using trim/trim, but if I send my encrypt message to sever, and try encrypt them, I see that my message is not 16 symbols, as it was in my local pc, it is 32 sybmols, after encode. And trim function not working. I look at symbols code and what I see
50
52
51
51
48
57
49
0
0
0
0
0
0
0
0
0
10
158
112
183
154
27
95
85
42
35
95
54
227
41
179
77
After “tabulation symbols” I get some junk symbols, and? I solve this problems like this.
After mcrypt_decrypt I use this code
$plaintext_dec = substr($plaintext_dec, 0, strpos($plaintext_dec, "\0"));
I think it is not best resolution for this problem, but I solve my problem :)
總結(jié)
以上是生活随笔為你收集整理的php mcrypt_decrypt,PHP: mcrypt_decrypt - Manual的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。
- 上一篇: 阿里云实现发送短信(Java实例教程)
- 下一篇: Mobile GMaps - Googl