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

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

Issue 379383002: Refactor WebCrypto code (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 5 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
Index: content/child/webcrypto/platform_crypto.h
diff --git a/content/child/webcrypto/platform_crypto.h b/content/child/webcrypto/platform_crypto.h
index 9e957301c01a03d7f8feecac67350a9a8c4cc758..0ed16dc56b821c6f8313f3a4f8c0799db99eabe2 100644
--- a/content/child/webcrypto/platform_crypto.h
+++ b/content/child/webcrypto/platform_crypto.h
@@ -224,7 +224,9 @@ Status ImportRsaPrivateKey(const blink::WebCryptoAlgorithm& algorithm,
// Note that this may be called from target Blink thread.
// Preconditions:
+// * algorithm is for an asymmetric algorithm
// * usage_mask makes sense for the algorithm.
+// * key_data is not zero-length.
Status ImportKeySpki(const blink::WebCryptoAlgorithm& algorithm,
const CryptoData& key_data,
bool extractable,
@@ -233,7 +235,9 @@ Status ImportKeySpki(const blink::WebCryptoAlgorithm& algorithm,
// Note that this may be called from target Blink thread.
// Preconditions:
+// * algorithm is for an asymmetric algorithm
// * usage_mask makes sense for the algorithm.
+// * key_data is not zero-length.
Status ImportKeyPkcs8(const blink::WebCryptoAlgorithm& algorithm,
const CryptoData& key_data,
bool extractable,

Powered by Google App Engine
This is Rietveld 408576698