password authentication, IllegalArgumentException Invalid salt version

445 views
Skip to first unread message

Jeff Bowman

unread,
Dec 18, 2014, 11:18:21 PM12/18/14
to play-si...@googlegroups.com
I'm trying to use Password Authentication, and starting from the typesafe example seed, I have things (sort-of) working. However, I can't login. So, for 'trying it out' purposses, I added my own identity to the PasswordInfoDAO object but I keep getting an IllegalArgumentException: Invalid salt version, regardless of how I try to set things up. See this gist for the code I'm using. I am basically just adding a single element to the hashmap, so that it can be found by find, but not working. 

Thanks for your assistance.

Jeff

Christian Kaps

unread,
Dec 19, 2014, 2:27:10 AM12/19/14
to play-si...@googlegroups.com
Hi Jeff,

a password hashed with BCrypt contains the salt in the password. So your code PasswordInfo("bcrypt", "secure") doesn't work because "secure" isn't a password hashed with BCrypt. You can call the hash function on the BCryptPasswordHasher to get a hashed password.

Best regards,
Christian
Reply all
Reply to author
Forward
0 new messages