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

Unified Diff: net/tools/domain_security_preload_generator/spki_hash.h

Issue 2632073002: Rename domain_security_preload_generator. (Closed)
Patch Set: rebase & comment rsleevi Created 3 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
Index: net/tools/domain_security_preload_generator/spki_hash.h
diff --git a/net/tools/domain_security_preload_generator/spki_hash.h b/net/tools/domain_security_preload_generator/spki_hash.h
deleted file mode 100644
index ca07d0a5c832cd174947d89f133a319aa9f37211..0000000000000000000000000000000000000000
--- a/net/tools/domain_security_preload_generator/spki_hash.h
+++ /dev/null
@@ -1,49 +0,0 @@
-// Copyright (c) 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 NET_TOOLS_DOMAIN_SECURITY_PRELOAD_GENERATOR_SPKI_HASH_H_
-#define NET_TOOLS_DOMAIN_SECURITY_PRELOAD_GENERATOR_SPKI_HASH_H_
-
-#include <stdint.h>
-#include <string>
-#include <vector>
-
-namespace net {
-
-namespace transport_security_state {
-
-class SPKIHash {
- public:
- enum : size_t { kLength = 32 };
-
- SPKIHash();
- ~SPKIHash();
-
- // Initalizes a hash from the form sha256/<base64-hash-value>. The preloaded
- // SPKI hashes are SHA256. Other algorithms are not supported. Returns true
- // on success and copies the decoded bytes to |data_|. Returns false on
- // failure.
- bool FromString(const std::string& hash_string);
-
- // Calculates the SHA256 digest over |*input| and copies the result to
- // |data_|.
- void CalculateFromBytes(const uint8_t* input, size_t input_length);
-
- // Returns the size of the hash in bytes. Harcoded to 32 which is the length
- // of a SHA256 hash.
- size_t size() const { return kLength; }
-
- uint8_t* data() { return data_; }
- const uint8_t* data() const { return data_; };
-
- private:
- // The bytes of the hash. Current hashes are SHA256 and thus 32 bytes long.
- uint8_t data_[kLength];
-};
-
-} // namespace transport_security_state
-
-} // namespace net
-
-#endif // NET_TOOLS_DOMAIN_SECURITY_PRELOAD_GENERATOR_SPKI_HASH_H_

Powered by Google App Engine
This is Rietveld 408576698