[Bug 25269] Add a container-independent initialization data type for providing a list of key IDs to createSession()

https://www.w3.org/Bugs/Public/show_bug.cgi?id=25269

--- Comment #15 from David Dorwin <ddorwin@google.com> ---
I believe there are three basic options:

#1: Allow createSession() to accept a JavaScript object in addition to the
Uint8Array option. Then, a JSON definition could be used and passed directly.
(There are similar advantages to allowing an object for update() and the
message event.)

#2 Use a JSON definition and serialize it into a Uint8Array using the Encoding
API: http://encoding.spec.whatwg.org/#interface-textencoder

#3: Use a binary format.
For this option, I propose the following format:
 * 1-byte key ID length in bytes.
 * N key IDs, each that many bytes long.

If zero-based, this supports key ID lengths from 8 to 2048 in 8-bit steps.
zero-based lengths might be confusing, in which case we might use one-based
lengths. However, we'd lose support for 2048. Given the current dominant length
of 128-bits, this is probably okay.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.

Received on Tuesday, 29 April 2014 01:09:56 UTC