How to synchronize Server Database and Local SQLite?

What would be the safest way to store passwords in a database?

  • What would be the best way to store passwords in a MySQL database? The system I'm developing is for webmail. In an organization, each user has his own email address, but he can also access other accounts. For example, if a user is named Mark Markson, his personal mail would be . Lets say he works in the human resources department with 5 other people. Each of those people would also have access to . All users should be able to log in with their username/password and have access to different email accounts (without having to know specific imap/smtp passwords/setups). To do this, i have to store the email account passwords somewhere so that the server can periodically connect to the mail server and synchronize the mails with the database. Other option would be for users to enter mail passwords every time they access mail accounts which is explicitly forbidden by the specification.

  • Answer:

    The best way is to store password with the PBKDF2 algorithm.

Michal Hořejšek at Quora Visit the source

Was this solution helpful to you?

Other answers

Instead of storing plain text passwords, you could encrypt the passwords using their login password/hash as a key.

Yi Ding

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.