Communiquez avec les autres et partagez vos connaissances professionnelles

Inscrivez-vous ou connectez-vous pour rejoindre votre communauté professionnelle.

Suivre

How can I encrypt and decrypt a data present in Mysql table using Mysql?

user-image
Question ajoutée par Feras Abualrub , Web Solutions Manager , Qistas for Information Technology
Date de publication: 2013/09/09
Nidhin EswaranKomath
par Nidhin EswaranKomath , Senior Software Engineer , Robosoft Technologies Pvt Ltd

Use AES_ENCRYPT (),AES_DECRYPT() functions in mysql for encryption and decryption.

example:

insert into landb.login (id, username, password )values(123, '12',AES_ENCRYPT ('nidhinek','nixpass'))

select AES_DECRYPT(landb.login.password, 'nixpass') from login where id=123

Output:nidhinek

Utilisateur supprimé
par Utilisateur supprimé

There's a library from php for encryption which is php5_mcrypt. Try to read it in PHP documentation and it's very easy.

mohammed al shareif
par mohammed al shareif , Team Leader , Beecell

check the php library for encoding and decoding , all what you need to install the library on server and just call a php function ....i think you can add salt for the encribtion 

Marouen Sayari
par Marouen Sayari , Senior PHP Programmer and Full-time Freelancer, Zend Certified Engineer , Self-employed

Generally, reversible encryption functions (like AES_ENCRYPT and ENCODE) are deprecated since their attack as much easier than irreversible functions.

 

Try using irreversible function instead.Example

 

SHA1, MD5

More Questions Like This