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

Unified Diff: content/renderer/webcrypto_impl.cc

Issue 19355002: Add chromium side implementation of WebKit::WebCrypto. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase onto master Created 7 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
« no previous file with comments | « content/renderer/webcrypto_impl.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/webcrypto_impl.cc
diff --git a/content/renderer/webcrypto_impl.cc b/content/renderer/webcrypto_impl.cc
new file mode 100644
index 0000000000000000000000000000000000000000..80c551240eeb141a4c5b305f9485e5df2c241b6e
--- /dev/null
+++ b/content/renderer/webcrypto_impl.cc
@@ -0,0 +1,27 @@
+// Copyright (c) 2013 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "content/renderer/webcrypto_impl.h"
+
+#include "third_party/WebKit/public/platform/WebCryptoAlgorithm.h"
+
+namespace content {
+
+WebKit::WebCryptoOperation* WebCryptoImpl::digest(
+ const WebKit::WebCryptoAlgorithm& algorithm) {
+ switch (algorithm.id()) {
+ case WebKit::WebCryptoAlgorithmIdSha1:
+ case WebKit::WebCryptoAlgorithmIdSha224:
+ case WebKit::WebCryptoAlgorithmIdSha256:
+ case WebKit::WebCryptoAlgorithmIdSha384:
+ case WebKit::WebCryptoAlgorithmIdSha512:
+ // TODO(eroman): Implement.
+ return NULL;
+ default:
+ // Not a digest algorithm.
+ return NULL;
+ }
+}
+
+} // namespace content
« no previous file with comments | « content/renderer/webcrypto_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698