phxql / argon2-jvm

Argon2 Binding for the JVM
GNU Lesser General Public License v3.0
330 stars 32 forks source link

salt_default_charset: add method for string salt with default charset #59

Closed acidelk closed 5 years ago

acidelk commented 5 years ago

I want calculate hash with default charset for salt.

phxql commented 5 years ago

Hi,

thanks for the PR. I plan to deprecate the methods accepting a String in the future, as they are not as secure as the char[] methods. Therefore I won't add any new methods accepting a password as a String.

phxql commented 5 years ago

But i see that there is a method with the signature

String hash(int iterations, int memory, int parallelism, char[] password, byte[] salt);

which uses the default UTF-8 encoding.

missing in Argon2Advanced.