Re: Password Digest Registry
| From: | Sara Golemon | Date: | Tue, 16 Oct 2018 15:35:35 +0000 |
| Subject: | Re: Password Digest Registry | ||
| References: | 1 2 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-103323@lists.php.net to get a copy of this message | ||
On Tue, Oct 16, 2018 at 8:43 AM Rowan Collins <rowan.collins@gmail.com> wrote:
> As I understand it, the purpose of the $foo$ syntax is to uniquely identify
> each algorithm, so would it make sense to pass the prefix string to the
> register call, and maintain a lookup table internally of prefix => handler?
>
If that's an assumption we can definitely make, then absolutely, that
simplifies a lot of the design. When preparing this I wasn't 100%
confident that this would hold true (maybe
$foo${hashspecificstuff},v=1 is different from
$foo${hashspecificstuff},v=2), and I didn't want to create a problem
for future us. But I suppose we can always extend the protocol if it
comes to that.
> You mention ext/sodium checking if ext/standard has already registered some
> or all of its algorithms, but don't specify a method to do so; if the
> registry was prefix-oriented, there could be a standard API such as:
>
Yeah, I realize I left out a means to actually enumerate the
registered method internally, that certainly needs to be added, even
if we use deterministic identifiers.
-Sara