ابدأ بالتواصل مع الأشخاص وتبادل معارفك المهنية

أنشئ حسابًا أو سجّل الدخول للانضمام إلى مجتمعك المهني.

متابعة

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

user-image
تم إضافة السؤال من قبل Feras Abualrub , Web Solutions Manager , Qistas for Information Technology
تاريخ النشر: 2013/09/09
Nidhin EswaranKomath
من قبل Nidhin EswaranKomath , Developer

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

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
من قبل 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
من قبل 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

المزيد من الأسئلة المماثلة

هل تحتاج لمساعدة في كتابة سيرة ذاتية تحتوي على الكلمات الدلالية التي يبحث عنها أصحاب العمل؟