MCPcopy Create free account
hub / github.com/chain/txvm / VMHash

Function VMHash

protocol/txvm/crypto.go:86–89  ·  view source on GitHub ↗

VMHash computes the hash of the "function" f applied to the byte string x.

(f string, x []byte)

Source from the content-addressed store, hash-verified

84
85// VMHash computes the hash of the "function" f applied to the byte string x.
86func VMHash(f string, x []byte) (hash [32]byte) {
87 sha3.CShakeSum128(hash[:], x, nil, []byte("ChainVM."+f))
88 return hash
89}

Callers 14

entryHookMethod · 0.92
writeWitnessHashToMethod · 0.92
HashMethod · 0.92
splitFunction · 0.92
mergeFunction · 0.92
mainFunction · 0.92
contractSnapshotFunction · 0.85
ContractSeedFunction · 0.85
NonceHashFunction · 0.85
opVMHashFunction · 0.85
AssetIDFunction · 0.85
opSplitFunction · 0.85

Calls 1

CShakeSum128Function · 0.92

Tested by 1

TestVMHashFunction · 0.68