mysql replaces php openssl encrypted text with question marks
NickName:macbeth Ask DateTime:2016-12-01T09:30:04

mysql replaces php openssl encrypted text with question marks

I am developing a messaging app, the only 2 way encryption php method I found is openssl_encrypt(), I successfully encrypt it, but when I insert it into the database, all characters are replaced with question marks, I have changed the collation of the table and the column, I have tried half the collations with no luck, I did some research, and I found out that there were slovak, vietnamese, and characters from another language along with copyright and trademark icons in the openssl_encrypt() encrypted text. what character encoding am I supposed to use ?

Copyright Notice:Content Author:「macbeth」,Reproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/40901178/mysql-replaces-php-openssl-encrypted-text-with-question-marks

More about “mysql replaces php openssl encrypted text with question marks” related questions

mysql replaces php openssl encrypted text with question marks

I am developing a messaging app, the only 2 way encryption php method I found is openssl_encrypt(), I successfully encrypt it, but when I insert it into the database, all characters are replaced with

Show Detail

Using openssl-encrypted field to filter on a MySQL table

I have a MySQL table where I store data encrypted with openssl. Lets say I have a MySQL table called friends with fields id, name, surname. I just want to encrypt the field name. So I encrypt it ...

Show Detail

Openssl encrypted in PHP needs to be decrypted in Ruby

In our application we are getting encrypted text from external server. This text have been encrypted using openssl in php. When I am trying to decrypt the text in my Ruby code, I am getting follow...

Show Detail

Print to text file - encrypted text shows as question marks

I have the following encrypted text in cell A1: ԓԗՃխՓ՛Րե՘Ր՞՚ըՖՑ՟խՑՙՔը՟՗՝ՇխՑ &#x

Show Detail

How to get a unique encrypted string with openssl_encrypt function from PHP OpenSSL Library

There are various encryption options available for PHP where some of them are explained nicely in the following question: How do you Encrypt and Decrypt a PHP String? The updated and accepted ans...

Show Detail

Data corruption mysql with openssl

I use openssl to encrypt a text, then put this into a mysql database. This works fine, however with long texts, the decrypted text becomes corrupted. Personally I think this is due to the way mysql

Show Detail

PHP MySQL OpenSSL Warning

I am running PHP 7.2.9 on localhost (Windows) with MySQL. Whenever I try and connect to my local MySQL, I get the following warning: "PHP Warning: mysqli_connect(): PHP was built without OpenSSL

Show Detail

What is the openssl command line to decrypt text encrypted by this php snippet?

What is the openssl command line for decrypting text encrypted using the following php code? function encrypt($text, $key) { return trim(base64_encode(mcrypt_encrypt(MCRYPT_RIJNDAEL_256, $key,...

Show Detail

Why does my encrypted string looks like consisting of only question marks?

I'm encrypting a string in Java, and when I'm printing the encrypted data, I see only question marks. As an example: Plain text: jjkkjlkljkj Encrypted text: ??????????? After decrypting this text...

Show Detail

PHP and MySQL Delivering Worlds Langs as Question Marks

I have to store the text that can be in any language. So I set my mysql table to be ucs2_unicode_ci, it is succesuflly holding russian and chineese: However my php page when fetching it, is delive...

Show Detail