Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:103323 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 2739 invoked from network); 16 Oct 2018 19:22:37 -0000 Received: from unknown (HELO mail-qt1-f176.google.com) (209.85.160.176) by pb1.pair.com with SMTP; 16 Oct 2018 19:22:37 -0000 Received: by mail-qt1-f176.google.com with SMTP id l41-v6so26177019qtl.8 for ; Tue, 16 Oct 2018 08:35:46 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=+gzl59Pk7E3ynNTBijGFKqhj1NrfzaRKPIhcEEJ+tFU=; b=rPvVfNhP0h45jyEhL5aRI+S5r+tbkgYHnRM3aAWKoE20fdMhLcoQqUBtcen4l/7NLu tGkiyUT12CkD/DBHBCPwWcOxF0p+MUmK+Cgg5+pG6iVaonwrD5udjP8kCJOO5ITmhm/g CMSW3x8sAxSXEfhb1YGUXyu2vbvY+yjWsKAulj/Vc3xRWOYrI+DhEokyvcHzH2nIua/D 1HKPxYwpBToelTvoVxDmAXq66lsp/L+Lx9F0Y4RfcsxdptWn0wurbFdzp/jWvmgzQ73x ZxOBDdgupdGuxDOmp71YD2zAWvD95WqRgsUw1a/ATmi3kIfnZV64duSWINXhhhWuZv6u shrA== X-Gm-Message-State: ABuFfogOmvSu+7wrXLGMY6jVZDrvcpZnI1DQOZv5sRgvzhugDiyGBfXm AOH9PdFd0SvAzzrzvRiXM9FfuXzia4ELZFgWiXjkMQ== X-Google-Smtp-Source: ACcGV61Qyt28wg3iE86Rs/0DLirptjcrz9oy9eRm8fVAO00Cm8sA2//wk/oVEHmFsBAghTWID11X1ibVGvpt93gkRbg= X-Received: by 2002:ac8:265b:: with SMTP id v27-v6mr20471083qtv.159.1539704146101; Tue, 16 Oct 2018 08:35:46 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: Date: Tue, 16 Oct 2018 10:35:35 -0500 Message-ID: To: Rowan Collins Cc: PHP internals Content-Type: text/plain; charset="UTF-8" Subject: Re: [PHP-DEV] Password Digest Registry From: pollita@php.net (Sara Golemon) On Tue, Oct 16, 2018 at 8:43 AM Rowan Collins 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