Jump to content

php/mysql: How to encode the data


hoangthi

Recommended Posts

Hello friends

I have some secret informations need to be saved in Mysql Database and I need to show them in some cases. So how should I encode and decode them safely ?

I think I can use Md5 to encode the password and noone can see the password anymore. But here, I need to show in browser the information which encoded. So who can help me ?

 

Thanks in advance!

Edited by hoangthi
Link to comment
Share on other sites

Why? and How secure does this need to be?

 

Why would you need to encrypt the data in the database? Just have the application NOT display it.

 

If you have users with direct access to the database you can GRANT or REVOKE access to specific TABLES and COLUMNS to prevent the users from seeing data.

 

If you are talking about storing credit card data, and you don't know anything about encryption, I would suggest you stop RIGHT NOW. Security is a serious, complex thing. You will need to learn about various encryption algorithyms and salts and I don't know what all. Personally, I would not attempt it without hiring an expert in the field (and buying a big fat Liability Insurance policy).

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.