- From: Wan-Teh Chang <wtc@google.com>
- Date: Mon, 16 Jul 2012 11:02:32 -0700
- 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. Wan-Teh
Received on Monday, 16 July 2012 18:03:03 UTC