Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 16 matching lines...) Expand all Loading... | |
| 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 29 */ | 29 */ |
| 30 | 30 |
| 31 // http://www.w3.org/TR/WebCryptoAPI/#subtlecrypto-interface | 31 // http://www.w3.org/TR/WebCryptoAPI/#subtlecrypto-interface |
| 32 | 32 |
| 33 typedef DOMString KeyFormat; | 33 typedef DOMString KeyFormat; |
| 34 typedef DOMString KeyUsage; // from CryptoKey interface | 34 typedef DOMString KeyUsage; // from CryptoKey interface |
| 35 | 35 |
| 36 // FIXME: use below; needs support for union types http://crbug.com/240176 | 36 // FIXME: use below; needs support for union types http://crbug.com/240176 |
| 37 typedef (ArrayBuffer or ArrayBufferView) CryptoOperationData; | 37 //typedef (ArrayBuffer or ArrayBufferView) CryptoOperationData; |
|
bashi
2014/11/19 11:06:35
Commented out so that we don't generate unused Arr
haraken
2014/11/21 02:10:58
Nit: One space after //.
bashi
2014/11/21 03:13:44
Done.
| |
| 38 | 38 |
| 39 [ | 39 [ |
| 40 GarbageCollected, | 40 GarbageCollected, |
| 41 NoInterfaceObject, | 41 NoInterfaceObject, |
| 42 ] interface SubtleCrypto { | 42 ] interface SubtleCrypto { |
| 43 [CallWith=ScriptState] Promise encrypt(Dictionary algorithm, CryptoKey key, ArrayBuffer data); | 43 [CallWith=ScriptState] Promise encrypt(Dictionary algorithm, CryptoKey key, ArrayBuffer data); |
| 44 [CallWith=ScriptState] Promise encrypt(Dictionary algorithm, CryptoKey key, ArrayBufferView data); | 44 [CallWith=ScriptState] Promise encrypt(Dictionary algorithm, CryptoKey key, ArrayBufferView data); |
| 45 | 45 |
| 46 [CallWith=ScriptState] Promise decrypt(Dictionary algorithm, CryptoKey key, ArrayBuffer data); | 46 [CallWith=ScriptState] Promise decrypt(Dictionary algorithm, CryptoKey key, ArrayBuffer data); |
| 47 [CallWith=ScriptState] Promise decrypt(Dictionary algorithm, CryptoKey key, ArrayBufferView data); | 47 [CallWith=ScriptState] Promise decrypt(Dictionary algorithm, CryptoKey key, ArrayBufferView data); |
| (...skipping 13 matching lines...) Expand all Loading... | |
| 61 [CallWith=ScriptState] Promise importKey(KeyFormat format, ArrayBufferView k eyData, Dictionary algorithm, boolean extractable, sequence<KeyUsage> keyUsages) ; | 61 [CallWith=ScriptState] Promise importKey(KeyFormat format, ArrayBufferView k eyData, Dictionary algorithm, boolean extractable, sequence<KeyUsage> keyUsages) ; |
| 62 [CallWith=ScriptState] Promise importKey(KeyFormat format, Dictionary keyDat a, Dictionary algorithm, boolean extractable, sequence<KeyUsage> keyUsages); | 62 [CallWith=ScriptState] Promise importKey(KeyFormat format, Dictionary keyDat a, Dictionary algorithm, boolean extractable, sequence<KeyUsage> keyUsages); |
| 63 | 63 |
| 64 [CallWith=ScriptState] Promise exportKey(KeyFormat format, CryptoKey key); | 64 [CallWith=ScriptState] Promise exportKey(KeyFormat format, CryptoKey key); |
| 65 | 65 |
| 66 [CallWith=ScriptState] Promise wrapKey(KeyFormat format, CryptoKey key, Cryp toKey wrappingKey, Dictionary wrapAlgorithm); | 66 [CallWith=ScriptState] Promise wrapKey(KeyFormat format, CryptoKey key, Cryp toKey wrappingKey, Dictionary wrapAlgorithm); |
| 67 | 67 |
| 68 [CallWith=ScriptState] Promise unwrapKey(KeyFormat format, ArrayBuffer wrapp edKey, CryptoKey unwrappingKey, Dictionary unwrapAlgorithm, Dictionary unwrapped KeyAlgorithm, boolean extractable, sequence<KeyUsage> keyUsages); | 68 [CallWith=ScriptState] Promise unwrapKey(KeyFormat format, ArrayBuffer wrapp edKey, CryptoKey unwrappingKey, Dictionary unwrapAlgorithm, Dictionary unwrapped KeyAlgorithm, boolean extractable, sequence<KeyUsage> keyUsages); |
| 69 [CallWith=ScriptState] Promise unwrapKey(KeyFormat format, ArrayBufferView w rappedKey, CryptoKey unwrappingKey, Dictionary unwrapAlgorithm, Dictionary unwra ppedKeyAlgorithm, boolean extractable, sequence<KeyUsage> keyUsages); | 69 [CallWith=ScriptState] Promise unwrapKey(KeyFormat format, ArrayBufferView w rappedKey, CryptoKey unwrappingKey, Dictionary unwrapAlgorithm, Dictionary unwra ppedKeyAlgorithm, boolean extractable, sequence<KeyUsage> keyUsages); |
| 70 }; | 70 }; |
| OLD | NEW |