Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(212)

Unified Diff: modules/crypto/SubtleCrypto.idl

Issue 1660113002: Updated to Chrome 45 (2454) moved from SVN to git. Base URL: https://github.com/dart-lang/webcore.git@roll_45
Patch Set: Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « modules/crypto/CryptoKey.idl ('k') | modules/crypto/WorkerGlobalScopeCrypto.idl » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: modules/crypto/SubtleCrypto.idl
diff --git a/modules/crypto/SubtleCrypto.idl b/modules/crypto/SubtleCrypto.idl
index e76cac44531be142c2492f0c00a22cbfb6ac9e54..007f3684e88727507cc9f687a6954caeca82eea2 100644
--- a/modules/crypto/SubtleCrypto.idl
+++ b/modules/crypto/SubtleCrypto.idl
@@ -31,40 +31,24 @@
// http://www.w3.org/TR/WebCryptoAPI/#subtlecrypto-interface
typedef DOMString KeyFormat;
-typedef DOMString KeyUsage; // from CryptoKey interface
-
-// FIXME: use below; needs support for union types http://crbug.com/240176
-typedef (ArrayBuffer or ArrayBufferView) CryptoOperationData;
+typedef DOMString KeyUsage;
+typedef (Dictionary or DOMString) AlgorithmIdentifier;
[
GarbageCollected,
- NoInterfaceObject,
+ Exposed=(Window,Worker),
+ TypeChecking=Interface,
] interface SubtleCrypto {
- [CallWith=ScriptState] Promise encrypt(Dictionary algorithm, CryptoKey key, ArrayBuffer data);
- [CallWith=ScriptState] Promise encrypt(Dictionary algorithm, CryptoKey key, ArrayBufferView data);
-
- [CallWith=ScriptState] Promise decrypt(Dictionary algorithm, CryptoKey key, ArrayBuffer data);
- [CallWith=ScriptState] Promise decrypt(Dictionary algorithm, CryptoKey key, ArrayBufferView data);
-
- [CallWith=ScriptState] Promise sign(Dictionary algorithm, CryptoKey key, ArrayBuffer data);
- [CallWith=ScriptState] Promise sign(Dictionary algorithm, CryptoKey key, ArrayBufferView data);
-
- // FIXME: should be: Promise verify(Dictionary algorithm, CryptoKey key, CryptoOperationData signature, CryptoOperationData data);
- [CallWith=ScriptState, Custom, ImplementedAs=verifySignature] Promise verify(Dictionary algorithm, CryptoKey key, object signature, object data);
-
- [CallWith=ScriptState] Promise digest(Dictionary algorithm, ArrayBuffer data);
- [CallWith=ScriptState] Promise digest(Dictionary algorithm, ArrayBufferView data);
-
- [CallWith=ScriptState] Promise generateKey(Dictionary algorithm, boolean extractable, DOMString[] keyUsages);
-
- [CallWith=ScriptState] Promise importKey(KeyFormat format, ArrayBuffer keyData, Dictionary algorithm, boolean extractable, KeyUsage[] keyUsages);
- [CallWith=ScriptState] Promise importKey(KeyFormat format, ArrayBufferView keyData, Dictionary algorithm, boolean extractable, KeyUsage[] keyUsages);
- [CallWith=ScriptState] Promise importKey(KeyFormat format, Dictionary keyData, Dictionary algorithm, boolean extractable, KeyUsage[] keyUsages);
-
- [CallWith=ScriptState] Promise exportKey(KeyFormat format, CryptoKey key);
-
- [CallWith=ScriptState] Promise wrapKey(KeyFormat format, CryptoKey key, CryptoKey wrappingKey, Dictionary wrapAlgorithm);
-
- [CallWith=ScriptState] Promise unwrapKey(KeyFormat format, ArrayBuffer wrappedKey, CryptoKey unwrappingKey, Dictionary unwrapAlgorithm, Dictionary unwrappedKeyAlgorithm, boolean extractable, KeyUsage[] keyUsages);
- [CallWith=ScriptState] Promise unwrapKey(KeyFormat format, ArrayBufferView wrappedKey, CryptoKey unwrappingKey, Dictionary unwrapAlgorithm, Dictionary unwrappedKeyAlgorithm, boolean extractable, KeyUsage[] keyUsages);
+ [CallWith=ScriptState, MeasureAs=SubtleCryptoEncrypt] Promise encrypt(AlgorithmIdentifier algorithm, CryptoKey key, BufferSource data);
+ [CallWith=ScriptState, MeasureAs=SubtleCryptoDecrypt] Promise decrypt(AlgorithmIdentifier algorithm, CryptoKey key, BufferSource data);
+ [CallWith=ScriptState, MeasureAs=SubtleCryptoSign] Promise sign(AlgorithmIdentifier algorithm, CryptoKey key, BufferSource data);
+ [CallWith=ScriptState, ImplementedAs=verifySignature, MeasureAs=SubtleCryptoVerify] Promise verify(AlgorithmIdentifier algorithm, CryptoKey key, BufferSource signature, BufferSource data);
+ [CallWith=ScriptState, MeasureAs=SubtleCryptoDigest] Promise digest(AlgorithmIdentifier algorithm, BufferSource data);
+ [CallWith=ScriptState, MeasureAs=SubtleCryptoGenerateKey] Promise generateKey(AlgorithmIdentifier algorithm, boolean extractable, sequence<KeyUsage> keyUsages);
+ [CallWith=ScriptState, MeasureAs=SubtleCryptoImportKey] Promise importKey(KeyFormat format, (ArrayBuffer or ArrayBufferView or Dictionary) keyData, AlgorithmIdentifier algorithm, boolean extractable, sequence<KeyUsage> keyUsages);
+ [CallWith=ScriptState, MeasureAs=SubtleCryptoExportKey] Promise exportKey(KeyFormat format, CryptoKey key);
+ [CallWith=ScriptState, MeasureAs=SubtleCryptoDeriveBits] Promise deriveBits(AlgorithmIdentifier algorithm, CryptoKey baseKey, unsigned long length);
+ [CallWith=ScriptState, MeasureAs=SubtleCryptoDeriveKey] Promise deriveKey(AlgorithmIdentifier algorithm, CryptoKey baseKey, AlgorithmIdentifier derivedKeyType, boolean extractable, sequence<KeyUsage> keyUsages);
+ [CallWith=ScriptState, MeasureAs=SubtleCryptoWrapKey] Promise wrapKey(KeyFormat format, CryptoKey key, CryptoKey wrappingKey, AlgorithmIdentifier wrapAlgorithm);
+ [CallWith=ScriptState, MeasureAs=SubtleCryptoUnwrapKey] Promise unwrapKey(KeyFormat format, BufferSource wrappedKey, CryptoKey unwrappingKey, AlgorithmIdentifier unwrapAlgorithm, AlgorithmIdentifier unwrappedKeyAlgorithm, boolean extractable, sequence<KeyUsage> keyUsages);
};
« no previous file with comments | « modules/crypto/CryptoKey.idl ('k') | modules/crypto/WorkerGlobalScopeCrypto.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698