You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was looking through your examples for capturing a password and I saw this code in one of your examples
String line = reader.readLine("Enter password> ", mask);
However, it is suggested by the Java API as well as many people on the internet to use a char[] instead of a String so that you can write random bytes to the char[] to avoid having the password in sitting in memory in an immutable object.
Security note: If an application needs to read a password or other secure data, it should use readPassword() or readPassword(String, Object...) and manually zero the returned character array after processing to minimize the lifetime of sensitive data in memory.
I was looking through your examples for capturing a password and I saw this code in one of your examples
However, it is suggested by the Java API as well as many people on the internet to use a
char[]
instead of aString
so that you can write random bytes to thechar[]
to avoid having the password in sitting in memory in an immutable object.I was wondering if this is addressed in your code base or how do you handle security after the user has entered a password?
The text was updated successfully, but these errors were encountered: