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

Function sphinx_write_frame

common/sphinx.c:483–491  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

481}
482
483static void sphinx_write_frame(u8 *dest,
484 const struct sphinx_hop *hop,
485 const struct hmac *hmac)
486{
487 BUILD_ASSERT(sizeof(hmac->bytes) == HMAC_SIZE);
488 memcpy(dest, hop->raw_payload, tal_bytelen(hop->raw_payload));
489 memcpy(dest + tal_bytelen(hop->raw_payload),
490 hmac->bytes, HMAC_SIZE);
491}
492
493static void sphinx_prefill_stream_xor(u8 *dst, size_t dstlen,
494 const struct secret *shared_secret)

Callers 1

create_onionpacketFunction · 0.85

Calls 1

tal_bytelenFunction · 0.85

Tested by

no test coverage detected