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

Unified Diff: syzygy/experimental/protect/protect_lib/protect_util.h

Issue 2535563002: Added all code for integrity check transform (Closed)
Patch Set: Created 4 years, 1 month 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: syzygy/experimental/protect/protect_lib/protect_util.h
diff --git a/syzygy/minidump/unittest_util.h b/syzygy/experimental/protect/protect_lib/protect_util.h
similarity index 50%
copy from syzygy/minidump/unittest_util.h
copy to syzygy/experimental/protect/protect_lib/protect_util.h
index bd3556b7b89aa6adef98286a0a1269e0a12c43ec..d1f953ce1bc55f076cccfee197f31c08c6d4efc0 100644
--- a/syzygy/minidump/unittest_util.h
+++ b/syzygy/experimental/protect/protect_lib/protect_util.h
@@ -1,32 +1,33 @@
-// Copyright 2015 Google Inc. All Rights Reserved.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-#ifndef SYZYGY_MINIDUMP_UNITTEST_UTIL_H_
-#define SYZYGY_MINIDUMP_UNITTEST_UTIL_H_
-
-#include "base/files/file_path.h"
-
-namespace testing {
-
-class TestMinidumps {
- public:
- // @returns the path to a 32 bit notepad dump file.
- static const base::FilePath GetNotepad32Dump();
- // @returns the path to a 64 bit notepad dump file.
- static const base::FilePath GetNotepad64Dump();
-};
-
-} // namespace testing
-
-#endif // SYZYGY_MINIDUMP_UNITTEST_UTIL_H_
+// Copyright 2015 Google Inc. All Rights Reserved.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+#ifndef SYZYGY_PROTECT_PROTECT_LIB_PROTECT_UTIL_H_
+#define SYZYGY_PROTECT_PROTECT_LIB_PROTECT_UTIL_H_
+
+#include "base\basictypes.h"
+#include <vector>
+
+class VectGenerator {
+ public:
+ // Generates an array of random numbers such that they sum up to -x mod _kSum
+ // @param x - an unsigned integer value
+ // @param len - the length of the array of random numbers
+ // @return a vector with random numbers which sum up to -x mod _kSum
+ static std::vector<uint8>* Generate(uint8 x, int len);
+
+ private:
+ static unsigned int _kSum;
+};
+
+#endif // SYZYGY_PROTECT_PROTECT_LIB_PROTECT_UTIL_H_
« no previous file with comments | « syzygy/experimental/protect/protect_lib/protect_flummox.cc ('k') | syzygy/experimental/protect/protect_lib/protect_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698