On one side I have:
http://forums.enterprisedb.com/posts/list/2481.page
Here we declare field as BYTEA and we can decrypt it and encryption is on db level.
On the other side:
https://www.owasp.org/index.php/Hashing_Java
Here as varchar and we only compare hashes to authorize.
Finally Spring gives http://static.springsource.org/spring-security/site/docs/3.1.x/apidocs/org/springframework/security/crypto/password/StandardPasswordEncoder.html + char secret value applied is the same for every password?
Which is the best approach? (I lean towards Spring since as I understand it encapsulates similar logic as OWASP in few lines of code?)
PostgreSQL encoding:
OWASP vs Spring:
StandardPasswordEncoderwithout secret.encode()returns only one string which contains the salt too (as usual in unix/linux) while Owasp requires an additional database attribute for the salt value.I’d use
StandardPasswordEncoder. It’s more simple and does the same as Owasp.