W3C home > Mailing lists > Public > public-webcrypto@w3.org > January 2013

Get rid of "params"?

From: Richard Barnes <rbarnes@bbn.com>
Date: Fri, 18 Jan 2013 18:03:00 -0500
Message-Id: <48A2B005-7593-4D36-BD57-4706A98C0236@bbn.com>
To: "public-webcrypto@w3.org Group" <public-webcrypto@w3.org>
While we're on the topic of algorithm identifiers:  Could we please get rid of "params"?  Is there a reason to have the parameters in a separate dictionary, as opposed to within the main algorithm dictionary?

OLD: { name: "HMAC", params: { hash: "SHA-256" } }
NEW: { name: "HMAC", hash: "SHA-256" }

It seems like the only reason to isolate params is if there's a risk of collision.  But the only other thing that ever shows up at the top level is "name", so unless you want to have params.name as well, flattening should be OK.  And that seems like an easy enough problem to avoid.

I know it's just syntactic sugar, but sometimes it's nice to have some sugar :)

Received on Friday, 18 January 2013 23:03:27 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:17:15 UTC