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

Function sha_mix_in

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

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

Source from the content-addressed store, hash-verified

199
200/* h = SHA-256(h || data) */
201static void sha_mix_in(struct sha256 *h, const void *data, size_t len)
202{
203 struct sha256_ctx shactx;
204
205 sha256_init(&shactx);
206 sha256_update(&shactx, h, sizeof(*h));
207 sha256_update(&shactx, data, len);
208 sha256_done(&shactx, h);
209}
210
211/* h = SHA-256(h || pub.serializeCompressed()) */
212static 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