| 5643 | } |
| 5644 | |
| 5645 | static uint64_t query_graph_params_hash(const char *project, const char *query, const char *graph) { |
| 5646 | static const char domain[] = "cbm.query_graph.params.v1"; |
| 5647 | cbm_sha256_ctx sha; |
| 5648 | cbm_sha256_init(&sha); |
| 5649 | cbm_sha256_update(&sha, domain, sizeof(domain)); |
| 5650 | query_graph_sha_field(&sha, project); |
| 5651 | query_graph_sha_field(&sha, query); |
| 5652 | query_graph_sha_field(&sha, graph); |
| 5653 | uint8_t digest[CBM_SHA256_DIGEST_LEN]; |
| 5654 | cbm_sha256_final(&sha, digest); |
| 5655 | uint64_t hash = 0; |
| 5656 | for (int index = 0; index < 8; index++) { |
| 5657 | hash = (hash << 8U) | digest[index]; |
| 5658 | } |
| 5659 | return hash; |
| 5660 | } |
| 5661 | |
| 5662 | static void query_graph_result_digest(const cbm_cypher_result_t *result, |
| 5663 | char out[CBM_SHA256_HEX_LEN + 1]) { |
no test coverage detected