Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Readme documentation gives invalid PHC string as example? #9

Open
dkushner opened this issue Oct 31, 2018 · 0 comments
Open

Readme documentation gives invalid PHC string as example? #9

dkushner opened this issue Oct 31, 2018 · 0 comments

Comments

@dkushner
Copy link

Phrased as a question as I am potentially just misreading the spec, but in the README I see reference to this string as a valid output of the bcrypt call:

$bcrypt$v=98$r=10$Fu+++1sHIGTodjyG4pF4Sw$QlOihTVOARhpV0EiWv4k10i5Pw5Hm0E

Would this not be invalid according to the PHC string format specifications? According to this document, the expected layout of a string is:

$<id>[$<param>=<value>(,<param>=<value>)*][$<salt>[$<hash>]]

Meaning the example would be interpreted as:

function => bcrypt
parameters => { v => 98 }
salt => r=10
hash => Fu+++1sHIGTodjyG4pF4Sw$QlOihTVOARhpV0EiWv4k10i5Pw5Hm0E

The salt here would be invalid since the base64 encoding prescribed by the standard excludes the use of the equal character as padding, but I think this is more a mistake of using the $ separator for a parameters list rather than a comma.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant