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

Unified Diff: content/child/webcrypto/algorithm_dispatch.h

Issue 512023002: Refactor the interface for generating keys. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Run git-cl format Created 6 years, 2 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 | « no previous file | content/child/webcrypto/algorithm_dispatch.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/child/webcrypto/algorithm_dispatch.h
diff --git a/content/child/webcrypto/algorithm_dispatch.h b/content/child/webcrypto/algorithm_dispatch.h
index a6d22bca4f73d713d19f17fb3d372e8eca5efcf5..d13845b07656c3d748a42553c53823b6f451919a 100644
--- a/content/child/webcrypto/algorithm_dispatch.h
+++ b/content/child/webcrypto/algorithm_dispatch.h
@@ -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,18 +43,10 @@ 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 usage_mask,
+ GenerateKeyResult* result);
CONTENT_EXPORT Status ImportKey(blink::WebCryptoKeyFormat format,
const CryptoData& key_data,
« no previous file with comments | « no previous file | content/child/webcrypto/algorithm_dispatch.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698