Skip to content

Readme documentation gives invalid PHC string as example? #9

Description

@dkushner

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions