Proprify PE resources handling

This commit is contained in:
Romain Thomas
2022-02-16 05:32:25 +01:00
parent d4d66c5189
commit 8fcff6e8e3
27 changed files with 1560 additions and 1046 deletions
+12
View File
@@ -21,4 +21,16 @@
void init_hash_functions(py::module& m) {
m.def("hash", static_cast<size_t(*)(const LIEF::Object&)>(&LIEF::hash));
m.def("hash", static_cast<size_t(*)(const std::vector<uint8_t>&)>(&LIEF::hash));
m.def("hash",
[] (py::bytes bytes) {
std::string x = bytes;
std::vector<uint8_t> data = {std::begin(x), std::end(x)};
return LIEF::hash(data);
});
m.def("hash",
[] (const std::string& bytes) {
std::vector<uint8_t> data = {std::begin(bytes), std::end(bytes)};
return LIEF::hash(data);
});
}