MCPcopy
hub / github.com/dgraph-io/dgraph / getHash

Function getHash

edgraph/server.go:2033–2037  ·  view source on GitHub ↗
(ns, startTs uint64)

Source from the content-addressed store, hash-verified

2031}
2032
2033func getHash(ns, startTs uint64) string {
2034 h := sha256.New()
2035 h.Write([]byte(fmt.Sprintf("%#x%#x%#x", ns, startTs, []byte(worker.Config.AclSecretKeyBytes))))
2036 return hex.EncodeToString(h.Sum(nil))
2037}
2038
2039func validateNamespace(ctx context.Context, tc *api.TxnContext) error {
2040 if !x.WorkerConfig.AclEnabled {

Callers 4

QueryNoGrpcMethod · 0.70
doQueryMethod · 0.70
validateNamespaceFunction · 0.70
TestGetHashFunction · 0.70

Calls 1

WriteMethod · 0.65

Tested by 1

TestGetHashFunction · 0.56