What is the best practice for securely storing passwords in Java

前端 未结 3 1360
感情败类
感情败类 2020-12-03 04:46

What would be the recommended way for storing passwords in a Java desktop application?

I want the user to have the ability to enter the credencials only once and not

3条回答
  •  旧时难觅i
    2020-12-03 05:35

    You can use a local keystore where you could put passwords instead of secret keys.

    Answer to edit:

    Keystores are a perfect fit for your need. If you want extra protection, you could ask the user for one password to access all passwords when the user starts the application. Then, you could protect stored database password with a simple salt-and-stretch method (to generate an encryption key) using the one password that was used when starting the application.

提交回复
热议问题