| Index: chrome/common/extensions/api/platform_keys_internal.idl
|
| diff --git a/chrome/common/extensions/api/platform_keys_internal.idl b/chrome/common/extensions/api/platform_keys_internal.idl
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..afd68e51a818282fed0699dbae7e3351ffa11d44
|
| --- /dev/null
|
| +++ b/chrome/common/extensions/api/platform_keys_internal.idl
|
| @@ -0,0 +1,34 @@
|
| +// Copyright 2015 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +// Internal API for to implement the platformKeys and enterprise.platformKeys
|
| +// APIs.
|
| +[ implemented_in = "chrome/browser/extensions/api/platform_keys/platform_keys_api.h" ]
|
| +namespace platformKeysInternal {
|
| + // Invoked by <code>sign</code>.
|
| + // |signature| The signature, a octet string.
|
| + callback SignCallback = void(ArrayBuffer signature);
|
| +
|
| + interface Functions {
|
| + // Internal version of platformKeys.subtleCrypto.sign and
|
| + // enterprise.platformKeys.Token.subtleCrypto.sign.
|
| + // |tokenId| The id of a Token returned by |getTokens|.
|
| + // |publicKey| The Subject Public Key Info of a key previously generated by
|
| + // |generateKey| in DER encoding.
|
| + // |hashAlgorithmName| The recognized algorithm name as specified by
|
| + // WebCrypto of the hash algorithm that will be used to digest |data|
|
| + // before signing. Currently supported are: SHA-{1,256,384,512}.
|
| + // TODO(pneubeck): use an enum once supported:
|
| + // http://www.crbug.com/385539 .
|
| + // |data| The data to sign.
|
| + // |callback| Called back with the signature of |data|.
|
| + // TODO: Instead of ArrayBuffer should be (ArrayBuffer or ArrayBufferView),
|
| + // or at least (ArrayBuffer or Uint8Array).
|
| + static void sign(DOMString tokenId,
|
| + ArrayBuffer publicKey,
|
| + DOMString hashAlgorithmName,
|
| + ArrayBuffer data,
|
| + SignCallback callback);
|
| + };
|
| +};
|
|
|