MCPcopy Create free account
hub / github.com/F-Stack/f-stack / tcp_fastopen_make_psk_cookie

Function tcp_fastopen_make_psk_cookie

freebsd/netinet/tcp_fastopen.c:561–573  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

559}
560
561static uint64_t
562tcp_fastopen_make_psk_cookie(uint8_t *psk, uint8_t *cookie, uint8_t cookie_len)
563{
564 SIPHASH_CTX ctx;
565 uint64_t psk_cookie;
566
567 SipHash24_Init(&ctx);
568 SipHash_SetKey(&ctx, psk);
569 SipHash_Update(&ctx, cookie, cookie_len);
570 SipHash_Final((u_int8_t *)&psk_cookie, &ctx);
571
572 return (psk_cookie);
573}
574
575static int
576tcp_fastopen_find_cookie_match_locked(uint8_t *wire_cookie, uint64_t *cur_cookie)

Callers 2

tcp_fastopen_connectFunction · 0.85

Calls 3

SipHash_SetKeyFunction · 0.85
SipHash_UpdateFunction · 0.85
SipHash_FinalFunction · 0.85

Tested by

no test coverage detected