This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 23833 - Remove sequence IDL keyword from parameters that take CryptoOperationData
Summary: Remove sequence IDL keyword from parameters that take CryptoOperationData
Status: RESOLVED FIXED
Alias: None
Product: Web Cryptography
Classification: Unclassified
Component: Web Cryptography API Document (show other bugs)
Version: unspecified
Hardware: PC Windows NT
: P2 normal
Target Milestone: ---
Assignee: Mark Watson
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-11-15 01:59 UTC by Israel Hilerio [MSFT]
Modified: 2014-03-03 21:10 UTC (History)
2 users (show)

See Also:


Attachments

Description Israel Hilerio [MSFT] 2013-11-15 01:59:31 UTC
We would like to simplify the APIs by removing the sequence requirement on methods that take CryptoOperationData:

typedef (ArrayBuffer or ArrayBufferView) CryptoOperationData;

interface SubtleCrypto {
  Promise<any> encrypt(AlgorithmIdentifier algorithm,
                       Key key,
                       sequence<CryptoOperationData> data);
  Promise<any> decrypt(AlgorithmIdentifier algorithm,
                       Key key,
                       sequence<CryptoOperationData> data);
  Promise<any> sign(AlgorithmIdentifier algorithm,
                    Key key,
                    sequence<CryptoOperationData> data);
  Promise<any> verify(AlgorithmIdentifier algorithm,
                      Key key,
                      CryptoOperationData signature,
                      sequence<CryptoOperationData> data);
  Promise<any> digest(AlgorithmIdentifier algorithm,
                      sequence<CryptoOperationData> data);

Doing this will simplify the API implementation and testing.  It will also help us bound the amount of data that can be supplied by developers when using only one ArrayBuffer or ArrayBufferView.

The new methods should look something like this:

interface SubtleCrypto {
  Promise<any> encrypt(AlgorithmIdentifier algorithm,
                       Key key,
                       CryptoOperationData data);
  Promise<any> decrypt(AlgorithmIdentifier algorithm,
                       Key key,
                       CryptoOperationData data);
  Promise<any> sign(AlgorithmIdentifier algorithm,
                    Key key,
                    CryptoOperationData data);
  Promise<any> verify(AlgorithmIdentifier algorithm,
                      Key key,
                      CryptoOperationData signature,
                      CryptoOperationData data);
  Promise<any> digest(AlgorithmIdentifier algorithm,
                      CryptoOperationData data);

This was discussed and agreed on during the TPAC F2F.
Comment 1 Mark Watson 2014-02-28 01:13:40 UTC
What is the status of this ? If this was agreed at the F2F I guess it is overdue for implementation.
Comment 2 Mark Watson 2014-03-03 21:10:29 UTC
General support on the mailing list.

Changeset ddfa59fb4f9f