note 118924 added to function.mcrypt-decrypt

From: Date: Mon, 29 Feb 2016 11:44:52 +0000
Subject: note 118924 added to function.mcrypt-decrypt
Groups: php.notes 
Request: Send a blank email to php-notes+get-205067@lists.php.net to get a copy of this message
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 :) ---- Server IP: 216.235.13.26 Probable Submitter: 80.95.36.147 ---- Manual Page -- http://php.net/manual/en/function.mcrypt-decrypt.php Edit -- https://master.php.net/note/edit/118924 Del: integrated -- https://master.php.net/note/delete/118924/integrated Del: useless -- https://master.php.net/note/delete/118924/useless Del: bad code -- https://master.php.net/note/delete/118924/bad+code Del: spam -- https://master.php.net/note/delete/118924/spam Del: non-english -- https://master.php.net/note/delete/118924/non-english Del: in docs -- https://master.php.net/note/delete/118924/in+docs Del: other reasons-- https://master.php.net/note/delete/118924 Reject -- https://master.php.net/note/reject/118924 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#205067) next »