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

Unified Diff: components/safe_browsing_db/safe_browsing_db_util.cc

Issue 1399843003: Move prefix_set and parts of s_b_util into a new component safe_browsing_db. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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
Index: components/safe_browsing_db/safe_browsing_db_util.cc
diff --git a/components/safe_browsing_db/safe_browsing_db_util.cc b/components/safe_browsing_db/safe_browsing_db_util.cc
new file mode 100644
index 0000000000000000000000000000000000000000..623bfb3c8386d19a8f9c04d0242d27fbc2d12e3c
--- /dev/null
+++ b/components/safe_browsing_db/safe_browsing_db_util.cc
@@ -0,0 +1,13 @@
+// Copyright (c) 2015 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 "components/safe_browsing_db/safe_browsing_db_util.h"
+
+#include "crypto/sha2.h"
+
+SBFullHash SBFullHashForString(const base::StringPiece& str) {
+ SBFullHash h;
+ crypto::SHA256HashString(str, &h.full_hash, sizeof(h.full_hash));
+ return h;
+}

Powered by Google App Engine
This is Rietveld 408576698