I'm in the process of completing a login GUI and have been using BCrypt
to encrypt a String
password. After reading about deprecation warnings, where the getText()
method is not recommended for security reasons, I decided to to use getPassword()
instead. However, as you are probably aware, it returns the password as a char[]
array. How would I pass a char[]
array into BCrypt
without compromising security by converting the password into a String
, which is accessible in memory?
Here is the BCrypt
class: org.mindrot.jbcrypt.BCrypt