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

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.

Wan-Teh

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