Re: [W3C Web Crypto WG] - Comments on Draft API v22

On Mon, Aug 27, 2012 at 1:14 PM, Lu HongQian Karen <karen.lu@gemalto.com> wrote:
> Thanks to the editors for the web crypto API draft! I have two additional comments/questions.
>
> 1. Should CryptoOperation states include an error state? Currently, the "complete" state covers the error state. However, completing a successful operation is different from entering into an error state, unless an operator can only be used once regardless how it gets into the "complete" state.

This was intentional. It's rare to see a distinct "error" state in any
web API. Many transition to "complete", which, depending on whether or
not objects can be re-used, allow them to either be (re-)initialized,
or that is the terminal state for the object.

>
> 2. In section 11.5, every methods end with "Terminate this algorithm". What does it mean? For example, the last step of the init() method is "Terminate this algorithm". Do you mean "return"?

"Terminate this algorithm" is almost universally used in W3C specs,
but I see it's actual addition to terminology is rare.

In this case, cribbing from FileAPI (thanks Arun), the following
definition will be added to terminology:

When this specification says to "terminate an algorithm", the user
agent must terminate the algorithm after finishing the step it is on.
Asynchronous methods defined in this specification may return before
the algorithm in question is terminated. For objects which support
asynchronous cancellation, the algorithm may be terminated by an
abort() call.

Received on Tuesday, 28 August 2012 18:23:19 UTC