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

Unified Diff: net/der/input.h

Issue 1218753002: Add DER parsing of AlgorithmId for signatures. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove clang-format off and just accept its formatting Created 5 years, 6 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/der/input.h
diff --git a/net/der/input.h b/net/der/input.h
index f8eb467a482dc765788c720da9e4ec6b9102522d..c8ab5def0a89e8dc37b05ccbb110947ebf152e38 100644
--- a/net/der/input.h
+++ b/net/der/input.h
@@ -55,6 +55,12 @@ class NET_EXPORT_PRIVATE Input {
// Return true if the Input's data and |other|'s data are byte-wise equal.
bool Equals(const Input& other) const;
+ // Return true if the Input's data and |data| are byte-wise equal.
+ template <size_t N>
+ bool Equals(const uint8_t(&data)[N]) const {
+ return Equals(Input(data));
Ryan Sleevi 2015/06/29 14:45:24 So, this isn't ideal because it double-instantiate
eroman 2015/06/29 15:19:00 Removed.
+ }
+
// Returns a pointer to the Input's data. This method is marked as "unsafe"
// because access to the Input's data should be done through ByteReader
// instead. This method should only be used where using a ByteReader truly

Powered by Google App Engine
This is Rietveld 408576698