- From: Richard Barnes <rbarnes@bbn.com>
- Date: Mon, 18 Mar 2013 19:14:29 -0400
- To: "public-webcrypto@w3.org Group" <public-webcrypto@w3.org>
(Brought this up earlier, but I don't think it made it into the tracker...) The current spec requires that algorithm parameters be encapsulated in a "params" field within an algorithm identifier. For example: OLD: { name: "AES-GCM", params: { iv: [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], tlen: 128 } } NEW: { name: "AES-GCM", iv: [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], tlen: 128 } The only reason this extra complexity would be necessary is if we expected an algorithm to need a parameter called "name". This does not seem very likely; I see no problem making "name" a reserved word for the purpose of algorithm parameters. This requires the useless interface "dictionary AlgorithmParameters {};" from which individual algorithms specialize. Proposed revisions to WebIDL: -- Remove the AlgorithmParameters definition -- Remove the "AlgorithmParameters params;" from the Algorithm interface -- Change all descendants of AlgorithmParameters to instead inherit from Algorithm Whatever the opposite of "syntactic sugar" is, this is it. "Syntactic vinegar"? --Richard
Received on Monday, 18 March 2013 23:14:56 UTC