MCPcopy Create free account
hub / github.com/compiler-explorer/compiler-explorer / getHash

Function getHash

lib/utils.ts:403–405  ·  view source on GitHub ↗
(object: CacheableValue, HashVersion = DefaultHash)

Source from the content-addressed store, hash-verified

401 * @returns {string} - Hash of object
402 */
403export function getHash(object: CacheableValue, HashVersion = DefaultHash): string {
404 return crypto.createHmac('sha256', HashVersion).update(objectToHashableString(object)).digest('hex');
405}
406
407interface glEditorMainContent {
408 // Editor content

Callers 5

_updateOptionsHashMethod · 0.85
makeSafeFunction · 0.85
hashFunction · 0.85
sendMsgMethod · 0.85
stats-test.tsFile · 0.85

Calls 2

objectToHashableStringFunction · 0.85
updateMethod · 0.45

Tested by

no test coverage detected