MCPcopy Create free account
hub / github.com/USBGuard/usbguard / updateHash

Method updateHash

src/Library/DevicePrivate.cpp:154–163  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

152 }
153
154 void DevicePrivate::updateHash(std::istream& descriptor_stream, const size_t expected_size)
155 {
156 Hash hash(_hash);
157
158 if (hash.update(descriptor_stream) != expected_size) {
159 throw Exception("Device hash update", numberToString(getID()), "descriptor stream returned less data than expected");
160 }
161
162 _hash = std::move(hash);
163 }
164
165 void DevicePrivate::updateHash(const void* const ptr, size_t size)
166 {

Callers

nothing calls this directly

Calls 3

ExceptionFunction · 0.85
numberToStringFunction · 0.50
updateMethod · 0.45

Tested by

no test coverage detected