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

Re: importKey doesn't seem to define handling of the keyData argument in some cases

From: Boris Zbarsky <bzbarsky@MIT.EDU>
Date: Tue, 15 Jul 2014 22:05:20 -0400
Message-ID: <53C5DDE0.7080902@mit.edu>
To: Ryan Sleevi <sleevi@google.com>
CC: "public-webcrypto@w3.org" <public-webcrypto@w3.org>
On 7/15/14, 8:43 PM, Ryan Sleevi wrote:
> Because you endorsed it ;)
> http://lists.w3.org/Archives/Public/public-webcrypto/2014Mar/0156.html
>
> ("You'll probably want to do "object" and manual coercion to dictionary
> types)
>
> Rather than a litany of subtypes, they were folded all into JsonWebKey,
> since all dictionary fields are optional anyway, the type distinction
> didn't make sense. Perhaps your "object" comment was predicated upon
> that design approach, but the union and choice of object (versus
> dictionary) was a result of that thread.

Wait, wait.

That mail was about a union that had multiple different dictionary types 
in it, no?  In that situation you have to use "object" and convert to 
the different dictionary types depending on whatever out-of-band 
information you have.  That was the context for my suggestion to use 
"object".

But the actual spec as written folds all the dictionaries into one, as 
you say.  So then you can just use that dictionary type; you don't need 
the "object" games.

-Boris
Received on Wednesday, 16 July 2014 02:05:49 UTC

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