W3C home > Mailing lists > Public > public-webcrypto@w3.org > July 2012

Re: Low-Level API naming (was: Strawman proposal for the low-level API)

From: Wan-Teh Chang <wtc@google.com>
Date: Mon, 16 Jul 2012 11:02:32 -0700
Message-ID: <CALTJjxFiU966mOOa96hwjDOShdjd-Me78DBSfLQkw1snZMfpqg@mail.gmail.com>
To: Ryan Sleevi <sleevi@google.com>
Cc: Lu HongQian Karen <karen.lu@gemalto.com>, "public-webcrypto@w3.org" <public-webcrypto@w3.org>, David Dahl <ddahl@mozilla.com>
On Mon, Jul 2, 2012 at 6:39 PM, Ryan Sleevi <sleevi@google.com> wrote:
> The choice between object-with-Constructor and object-as-method was largely
> arbitrary, and primarily motivated by the fact that I didn't want to have a
> bunch of objects (Encryptor, Decryptor, Signer, Verifier) that were all
> identical in interface, and their only distinction being the semantic
> meaning given their names. However, this may be something to explore as a WG
> - which form is more preferable:
> a. var foo =
> window[.crypto?].createEncryptor()/createDecryptor/createSigner/createKeyQueryList/etc
> b. var foo = new Encryptor/Decryptor/Signer/Verifier/KeyDeriver/KeyQueryList
> c. var foo = new CryptoOperation("encrypt"/"decrypt"/"sign"/"verify")
> d. var foo = window.crypto.encrypt/decrypt/deriveKey/queryKey/etc

I don't have a preference.  If I had to choose, I'd choose a or b.

> For naming, I wonder which is better:
> a. CryptoOperation
> b. CryptoOperator
> c. CryptoOp

We could also name it CryptoContext.  Both you and Karen used the term
"context" in your email.

Received on Monday, 16 July 2012 18:03:03 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 19:01:11 UTC