i'd strongly avoid using any code from pi, it probably uses an md5 hash.
look into bcrypt
|
|
So the vencillio source that i have downloaden dont has a password encryption.
I like to add it, found some pi shit to add it but it dont strokes with anything on vencillio.
So does someone has a snippit for this, or can help me out?
Huge tnx!

i'd strongly avoid using any code from pi, it probably uses an md5 hash.
look into bcrypt





Use this depedency
And when you do your login do thisCode:<groupId>org.springframework.security</groupId> <artifactId>spring-security-crypto</artifactId>
The 12 stands for how strong you want the hashing to be, the higher the number, the longer it will take for this to finish. 10 is the normal number of rounds, I did 12 just to make it a tad stronger. Even going up +1 takes a considerable longer amount of time from the previous.Code:BCrypt.hashpw(password, BCrypt.gensalt(12))
And to check if your password is correct do this
Obviously change what you need to fit your server but yeah super easyCode:BCrypt.checkpw(password, player.getPassword())![]()

| « java.lang.reflect.InvocationTargetException HELP please | Ethos | Eek - Too many npcs » |
| Thread Information |
Users Browsing this ThreadThere are currently 1 users browsing this thread. (0 members and 1 guests) |