Strange behavior with Security Crypt Feature after Linux update

After i updated my Ubuntu 14.04 LTS server with apt-get update and apt-get upgrade values already stored in mysql with the crypt feature gets these wird symbols when decrypting.

Example: e~R���M(RԬ0�3pzFgǦ��qu~/�餼�WNJ�w�P$�u&7�ғ�

i am using this code to decrypt:

$this->crypt->decryptBase64($device->private_key);

i have also tried using trim() and rtrim() but it still show weird symbols.

However if i encrypt and decrypt a string after the upgrade it works perfect, but my already stored values with crypt feature cant be retreived now??? Somebody please help...

edited Oct '16

What exactly did you upgrade with apt-get? I would guess openssl/libssl at first place and the database server itself. Or did you perhaps did dist-upgrade, so you're now running 16.04 Ubuntu? Have you restarted both app server (PHP) and DB server?

Try with safe flag on decrypt here:

`public function decryptBase64(string! text, key = null, boolean! safe = false) -> string`

thanks for reply.

Cant excactly remember what was upgraded. i only upgraded the webserver (nginx) not the DB server. i am running 14.04. i did not do dist-upgrade. i will try safe option :)

What exactly did you upgrade with apt-get? I would guess openssl/libssl at first place and the database server itself. Or did you perhaps did dist-upgrade, so you're now running 16.04 Ubuntu? Have you restarted both app server (PHP) and DB server?

Try with safe flag on decrypt here:

public function decryptBase64(string! text, key = null, boolean! safe = false) -> string

Hi. i tried with the safe option set to true, but same result :( any suggestions?

used this code:

$this->crypt->decryptBase64($device->private_key, null, true);

What exactly did you upgrade with apt-get? I would guess openssl/libssl at first place and the database server itself. Or did you perhaps did dist-upgrade, so you're now running 16.04 Ubuntu? Have you restarted both app server (PHP) and DB server?

Try with safe flag on decrypt here:

public function decryptBase64(string! text, key = null, boolean! safe = false) -> string

How come you null your key? First argument should be the data itself, and second is your private key used to encrypt data at first place.

Hi. Sorry. just exchanged with the key here on the forum, bit i did put my key in there, but the same result :(

How come you null your key? First argument should be the data itself, and second is your private key used to encrypt data at first place.