Skip to content

Missing salt rounds with BCrypt #10

@i0xHeX

Description

@i0xHeX

When using BCrypt with iterations less than 10 (if not 2 chars):
Hash.password(pass).factor(9).algorithm(Type.BCRYPT).create();
However BCrypt supports 4+ rounds. I think we must add 0 before rounds if it's less then 10 when appending to hash string.

Exception in thread "main" java.lang.IllegalArgumentException: Missing salt rounds
	at com.amdelamar.jhash.algorithms.BCrypt.create(BCrypt.java:508)
	at com.amdelamar.jhash.Hash.create(Hash.java:196)
	at ua.i0xhex.discr.Main.main(Main.java:16)

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions