go-crypt / crypt

Convenient Password Hashing Library in Go
MIT License
14 stars 3 forks source link

Allos changing the `bcrypt` identifier when Encoding the digest. #70

Closed shamil closed 1 month ago

shamil commented 2 months ago

Unless I misunderstood something, there is no way to change the Algorithm identifier. I see it's hardocded to AlgIdentifier (2b).

https://github.com/go-crypt/crypt/blob/c160fb3a13cbf8bc0ee5e3ad383897d55734eacc/algorithm/bcrypt/digest.go#L55-L58

james-d-elliott commented 2 months ago

There isn't. The identifiers are anchored to the algorithm and variant. For decoding purposes it accepts multiple for compatibility.