security - Converting plain text into the mysql database using php and getting it back when required as plain text -


i designing web app require take credentials users access few websites (equfax etc.. )

i know saving these credentials in plain text bad idea. need end team password business process.

how can retrieve hashed password , display plain text ?

if doesn't work, guess can use pdf form details , save file blob in mysql , download when required. but, still know risk if database stolen.

let me know, if have solution this.

thank reading this.

yes indeed need encrypt these passwords if store them anywhere on server (database, text file, ram... anywhere). now, tricky part if app can decrypt these passwords itself, breaks server able same reverse-engineering code.

the way prevent use encryption key made of 2 separate components: - server key, stored in app's code - , user key back-end team input in app (upon login example).

eg: $encryption_key = $server_key . $user_key;

$encrypted_password = your_encryption_function($key, $value_to_encrypt); $decrypted_password = your_decryption_function($key, $value_to_decrypt); 

the $user_key input back-end staff member before being able decrypt/encrypt passwords. key have shared across back-end staff members.

potentially, salt each password add third component encryption key.

$encryption_key = $server_key . $user_key . $password_salt; 

Comments

Popular posts from this blog

gridview - Yii2 DataPorivider $totalSum for a column -

java - Suppress Jboss version details from HTTP error response -

Sass watch command compiles .scss files before full sftp upload -