MCPcopy Create free account
hub / github.com/defold/defold / UpdateReversHashState

Method UpdateReversHashState

engine/dlib/src/dlib/hash.cpp:154–164  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

152 }
153
154 inline void UpdateReversHashState(uint32_t state_index, uint32_t len, const void* buffer, uint32_t buffer_len)
155 {
156 assert(state_index != 0);
157 ReverseHashEntry& entry = m_HashStates[state_index];
158 size_t length = entry.m_Length + buffer_len;
159 entry.m_Value = realloc(entry.m_Value, DM_ALIGN(length + 1, 16) + 16);
160 uint8_t* p = (uint8_t*) entry.m_Value;
161 memcpy(&p[entry.m_Length], buffer, buffer_len);
162 p[length] = '\0';
163 entry.m_Length = length;
164 }
165
166};
167

Callers 2

dmHashUpdateBuffer32Function · 0.80
dmHashUpdateBuffer64Function · 0.80

Calls 2

reallocFunction · 0.85
assertFunction · 0.50

Tested by

no test coverage detected