MCPcopy Create free account
hub / github.com/Kitware/VTK / digest

Function digest

Web/Python/vtkmodules/web/render_window_serializer.py:304–317  ·  view source on GitHub ↗
(array)

Source from the content-addressed store, hash-verified

302
303
304def digest(array):
305 objId = getReferenceId(array)
306
307 record = None
308 if objId in dataArrayShaMapping:
309 record = dataArrayShaMapping[objId]
310
311 if record and record["mtime"] == array.GetMTime():
312 return record["sha"]
313
314 record = {"sha": hashDataArray(array), "mtime": array.GetMTime()}
315
316 dataArrayShaMapping[objId] = record
317 return record["sha"]
318
319
320# -----------------------------------------------------------------------------

Callers 1

getArrayDescriptionFunction · 0.85

Calls 3

getReferenceIdFunction · 0.90
hashDataArrayFunction · 0.90
GetMTimeMethod · 0.45

Tested by

no test coverage detected