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

Unified Diff: content/browser/experiments/api_key_signature_verifier.h

Issue 1563903002: Add public key and signature verification to browser-side API keys Base URL: https://chromium.googlesource.com/chromium/src.git@keys
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 | « content/browser/BUILD.gn ('k') | content/browser/experiments/api_key_signature_verifier.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/experiments/api_key_signature_verifier.h
diff --git a/content/browser/experiments/api_key_signature_verifier.h b/content/browser/experiments/api_key_signature_verifier.h
new file mode 100644
index 0000000000000000000000000000000000000000..671a05e5f1924c2f4d9654ead71bf01cc953776b
--- /dev/null
+++ b/content/browser/experiments/api_key_signature_verifier.h
@@ -0,0 +1,27 @@
+// Copyright 2016 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.
+
+#ifndef CONTENT_BROWSER_EXPERIMENTS_API_KEY_SIGNATURE_VERIFIER_H_
+#define CONTENT_BROWSER_EXPERIMENTS_API_KEY_SIGNATURE_VERIFIER_H_
+
+#include <stdint.h>
+#include <string>
+
+#include "content/common/content_export.h"
+
+namespace content {
+
+class CONTENT_EXPORT ApiKeySignatureVerifier {
+ public:
+ static bool VerifySignature(const std::string& signature_text,
+ const std::string& data);
+ static bool VerifySignature(const std::string& signature_text,
+ const std::string& data,
+ const uint8_t* public_key,
+ size_t public_key_length);
+};
+
+} // namespace content
+
+#endif // CONTENT_BROWSER_EXPERIMENTS_API_KEY_SIGNATURE_VERIFIER_H_
« no previous file with comments | « content/browser/BUILD.gn ('k') | content/browser/experiments/api_key_signature_verifier.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698