r/coolgithubprojects • u/firajaa • Mar 23 '20
JAVA 🔒 Password4j - Hash passwords with different algorithms, salt, pepper, SecureStrings and configurable hashing functions with respect to system computational requirements
https://github.com/Password4j/password4j0
Mar 23 '20
[deleted]
2
u/firajaa Mar 23 '20
Thank you :)
Strings are immutable objects and their values are stored in the heap (java7+). This memory location cannot be destroyed until garbage collection...so you don't have any control on how much time this information is stored in the memory.Passwords should be treated as
char[]in your application.
SecureStringis a wrapper for char arrays that allows you to destroy safely the allocation of the array. This security measure cannot be used in web applications because in most cases passwords are already stored asStrings inside theHttpServletRequestMore info:
https://github.com/Password4j/password4j#security-of-strings
1
u/firajaa Mar 23 '20
I'm also looking for contributors!