W3C home > Mailing lists > Public > public-webcrypto@w3.org > September 2012

Re: JS code examples for ACTION 43

From: Arun Ranganathan <arun@mozilla.com>
Date: Thu, 6 Sep 2012 13:29:20 -0400
Cc: Ryan Sleevi <sleevi@google.com>, David Dahl <ddahl@mozilla.com>, "public-webcrypto@w3.org Working Group" <public-webcrypto@w3.org>
Message-Id: <632A5814-BB36-4301-B3E4-3280E09972AB@mozilla.com>
To: Wan-Teh Chang <wtc@google.com>

On Sep 6, 2012, at 1:12 PM, Wan-Teh Chang wrote:

> On Thu, Sep 6, 2012 at 7:38 AM, Arun Ranganathan <arun@mozilla.com> wrote:
>> 
>> 1. The general unwieldiness of ArrayBufferViews.  I shouldn't have used a Uint16Array,
>> so no cookie for me.  But this raises an interesting point: should we just use an
>> ArrayBuffer, or should we use an ArrayBufferView?  Using an ArrayBufferView obliges
>> users to go through one additional step: figuring out what the data format *is*.  UTF-16?
>> UTF-8?
> 
> Did you mean UTF-16 & UTF-8, or Uint16 and Uint8? I don't see "UTF"
> mentioned on this Mozilla page:
> https://developer.mozilla.org/en-US/docs/JavaScript_typed_arrays/ArrayBufferView#Typed_array_subclasses
> 

What I meant here is that in order to use the right kind of view, we need to know *what kind* of data we're working with. 

For instance, is it string data encoded as UTF-16?  Or something else?  If working only with ASCII, we might be able to simply use a different ArrayBufferView (or modify our utility).

-- A*


> Wan-Teh
> 
Received on Thursday, 6 September 2012 17:29:48 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Thursday, 6 September 2012 17:29:48 GMT