[英]What is a good/safe way to dynamically save a username and password information in Java?
Ideally I would do this with environment variables however that is not an option for me right now. 理想情况下,我将使用环境变量来执行此操作,但是现在这不是我的选择。 Is there some other way that I can dynamically save information such as the username and password?
还有其他方法可以动态保存用户名和密码等信息吗? For the time being I am doing this
目前我正在这样做
private final static String USER = "*****";
private final static String PASSWORD = "*******";
If you are going to persist it. 如果您要坚持下去。 Hash it with a salt
撒上盐
this is a good reference to start: 这是开始的良好参考:
https://crackstation.net/hashing-security.htm#javasourcecode https://crackstation.net/hashing-security.htm#javasourcecode
you can choose to save it in a database or just plain file. 您可以选择将其保存在数据库中或仅保存为纯文件。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.