MCPcopy Create free account
hub / github.com/Vector35/binaryninja-api / HashBytes

Function HashBytes

rapidjsonwrapper.h:55–66  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

53
54
55inline size_t HashBytes(const void* const ptr, const size_t len)
56{
57 // Taken from https://stackoverflow.com/questions/34597260/stdhash-value-on-char-value-and-not-on-memory-address
58 const char* cdata = static_cast<const char *>(ptr);
59 uint64_t acc = 0;
60 for (rapidjson::SizeType i = 0; i < len; ++i)
61 {
62 const size_t next = cdata[i];
63 acc = (acc ^ next) * 1099511628211;
64 }
65 return acc;
66}
67
68
69static inline uint64_t HashRapidValue(const rapidjson::Value& val)

Callers 1

HashRapidValueFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected