| 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 19 matching lines...) Expand all Loading... |
| 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; | 34 typedef DOMString KeyUsage; |
| 35 typedef (Dictionary or DOMString) AlgorithmIdentifier; | 35 typedef (Dictionary or DOMString) AlgorithmIdentifier; |
| 36 typedef (ArrayBuffer or ArrayBufferView) BufferSource; | 36 typedef (ArrayBuffer or ArrayBufferView) BufferSource; |
| 37 | 37 |
| 38 [ | 38 [ |
| 39 GarbageCollected, | 39 GarbageCollected, |
| 40 NoInterfaceObject, | 40 Exposed=(Window,Worker) |
| 41 ] interface SubtleCrypto { | 41 ] interface SubtleCrypto { |
| 42 [CallWith=ScriptState] Promise encrypt(AlgorithmIdentifier algorithm, Crypto
Key key, BufferSource data); | 42 [CallWith=ScriptState] Promise encrypt(AlgorithmIdentifier algorithm, Crypto
Key key, BufferSource data); |
| 43 [CallWith=ScriptState] Promise decrypt(AlgorithmIdentifier algorithm, Crypto
Key key, BufferSource data); | 43 [CallWith=ScriptState] Promise decrypt(AlgorithmIdentifier algorithm, Crypto
Key key, BufferSource data); |
| 44 [CallWith=ScriptState] Promise sign(AlgorithmIdentifier algorithm, CryptoKey
key, BufferSource data); | 44 [CallWith=ScriptState] Promise sign(AlgorithmIdentifier algorithm, CryptoKey
key, BufferSource data); |
| 45 [CallWith=ScriptState, ImplementedAs=verifySignature] Promise verify(Algorit
hmIdentifier algorithm, CryptoKey key, BufferSource signature, BufferSource data
); | 45 [CallWith=ScriptState, ImplementedAs=verifySignature] Promise verify(Algorit
hmIdentifier algorithm, CryptoKey key, BufferSource signature, BufferSource data
); |
| 46 [CallWith=ScriptState] Promise digest(AlgorithmIdentifier algorithm, BufferS
ource data); | 46 [CallWith=ScriptState] Promise digest(AlgorithmIdentifier algorithm, BufferS
ource data); |
| 47 [CallWith=ScriptState] Promise generateKey(AlgorithmIdentifier algorithm, bo
olean extractable, sequence<KeyUsage> keyUsages); | 47 [CallWith=ScriptState] Promise generateKey(AlgorithmIdentifier algorithm, bo
olean extractable, sequence<KeyUsage> keyUsages); |
| 48 [CallWith=ScriptState] Promise importKey(KeyFormat format, (ArrayBuffer or A
rrayBufferView or Dictionary) keyData, AlgorithmIdentifier algorithm, boolean ex
tractable, sequence<KeyUsage> keyUsages); | 48 [CallWith=ScriptState] Promise importKey(KeyFormat format, (ArrayBuffer or A
rrayBufferView or Dictionary) keyData, AlgorithmIdentifier algorithm, boolean ex
tractable, sequence<KeyUsage> keyUsages); |
| 49 [CallWith=ScriptState] Promise exportKey(KeyFormat format, CryptoKey key); | 49 [CallWith=ScriptState] Promise exportKey(KeyFormat format, CryptoKey key); |
| 50 [CallWith=ScriptState] Promise deriveBits(AlgorithmIdentifier algorithm, Cry
ptoKey baseKey, unsigned long length); | 50 [CallWith=ScriptState] Promise deriveBits(AlgorithmIdentifier algorithm, Cry
ptoKey baseKey, unsigned long length); |
| 51 [CallWith=ScriptState] Promise deriveKey(AlgorithmIdentifier algorithm, Cryp
toKey baseKey, AlgorithmIdentifier derivedKeyType, boolean extractable, sequence
<KeyUsage> keyUsages); | 51 [CallWith=ScriptState] Promise deriveKey(AlgorithmIdentifier algorithm, Cryp
toKey baseKey, AlgorithmIdentifier derivedKeyType, boolean extractable, sequence
<KeyUsage> keyUsages); |
| 52 [CallWith=ScriptState] Promise wrapKey(KeyFormat format, CryptoKey key, Cryp
toKey wrappingKey, AlgorithmIdentifier wrapAlgorithm); | 52 [CallWith=ScriptState] Promise wrapKey(KeyFormat format, CryptoKey key, Cryp
toKey wrappingKey, AlgorithmIdentifier wrapAlgorithm); |
| 53 [CallWith=ScriptState] Promise unwrapKey(KeyFormat format, BufferSource wrap
pedKey, CryptoKey unwrappingKey, AlgorithmIdentifier unwrapAlgorithm, AlgorithmI
dentifier unwrappedKeyAlgorithm, boolean extractable, sequence<KeyUsage> keyUsag
es); | 53 [CallWith=ScriptState] Promise unwrapKey(KeyFormat format, BufferSource wrap
pedKey, CryptoKey unwrappingKey, AlgorithmIdentifier unwrapAlgorithm, AlgorithmI
dentifier unwrappedKeyAlgorithm, boolean extractable, sequence<KeyUsage> keyUsag
es); |
| 54 }; | 54 }; |
| OLD | NEW |