MCPcopy Create free account
hub / github.com/ElementsProject/lightning / sha_mix_in

Function sha_mix_in

connectd/handshake.c:209–217  ·  view source on GitHub ↗

h = SHA-256(h || data) */

Source from the content-addressed store, hash-verified

207
208/* h = SHA-256(h || data) */
209static void sha_mix_in(struct sha256 *h, const void *data, size_t len)
210{
211 struct sha256_ctx shactx;
212
213 sha256_init(&shactx);
214 sha256_update(&shactx, h, sizeof(*h));
215 sha256_update(&shactx, data, len);
216 sha256_done(&shactx, h);
217}
218
219/* h = SHA-256(h || pub.serializeCompressed()) */
220static void sha_mix_in_key(struct sha256 *h, const struct pubkey *key)

Callers 8

sha_mix_in_keyFunction · 0.85
new_handshakeFunction · 0.85
act_three_initiatorFunction · 0.85
act_two_initiator2Function · 0.85
act_one_initiatorFunction · 0.85
act_three_responder2Function · 0.85
act_two_responderFunction · 0.85
act_one_responder2Function · 0.85

Calls 3

sha256_initFunction · 0.85
sha256_updateFunction · 0.85
sha256_doneFunction · 0.85

Tested by

no test coverage detected