Update To 11.40.268.0
[platform/framework/web/crosswalk.git] / src / content / child / webcrypto / algorithm_dispatch.h
index a6d22bc..3eefb46 100644 (file)
@@ -18,6 +18,7 @@ namespace webcrypto {
 
 class AlgorithmImplementation;
 class CryptoData;
+class GenerateKeyResult;
 class Status;
 
 // These functions provide an entry point for synchronous webcrypto operations.
@@ -42,24 +43,16 @@ CONTENT_EXPORT Status Digest(const blink::WebCryptoAlgorithm& algorithm,
                              const CryptoData& data,
                              std::vector<uint8_t>* buffer);
 
-CONTENT_EXPORT Status
-    GenerateSecretKey(const blink::WebCryptoAlgorithm& algorithm,
-                      bool extractable,
-                      blink::WebCryptoKeyUsageMask usage_mask,
-                      blink::WebCryptoKey* key);
-
-CONTENT_EXPORT Status
-    GenerateKeyPair(const blink::WebCryptoAlgorithm& algorithm,
-                    bool extractable,
-                    blink::WebCryptoKeyUsageMask usage_mask,
-                    blink::WebCryptoKey* public_key,
-                    blink::WebCryptoKey* private_key);
+CONTENT_EXPORT Status GenerateKey(const blink::WebCryptoAlgorithm& algorithm,
+                                  bool extractable,
+                                  blink::WebCryptoKeyUsageMask usages,
+                                  GenerateKeyResult* result);
 
 CONTENT_EXPORT Status ImportKey(blink::WebCryptoKeyFormat format,
                                 const CryptoData& key_data,
                                 const blink::WebCryptoAlgorithm& algorithm,
                                 bool extractable,
-                                blink::WebCryptoKeyUsageMask usage_mask,
+                                blink::WebCryptoKeyUsageMask usages,
                                 blink::WebCryptoKey* key);
 
 CONTENT_EXPORT Status ExportKey(blink::WebCryptoKeyFormat format,
@@ -91,7 +84,7 @@ CONTENT_EXPORT Status
               const blink::WebCryptoAlgorithm& wrapping_algorithm,
               const blink::WebCryptoAlgorithm& algorithm,
               bool extractable,
-              blink::WebCryptoKeyUsageMask usage_mask,
+              blink::WebCryptoKeyUsageMask usages,
               blink::WebCryptoKey* key);
 
 CONTENT_EXPORT scoped_ptr<blink::WebCryptoDigestor> CreateDigestor(