MCPcopy Create free account
hub / github.com/Gegam/redpill / grease_cipher_suite

Function grease_cipher_suite

crates/redpill-quic/src/browser_profile.rs:139–144  ·  view source on GitHub ↗

Generate a GREASE cipher suite value (RFC 8701).

()

Source from the content-addressed store, hash-verified

137
138/// Generate a GREASE cipher suite value (RFC 8701).
139pub fn grease_cipher_suite() -> u16 {
140 const GREASE_VALUES: [u16; 8] = [
141 0x0A0A, 0x1A1A, 0x2A2A, 0x3A3A, 0x4A4A, 0x5A5A, 0x6A6A, 0x7A7A,
142 ];
143 GREASE_VALUES[rand::random::<usize>() % GREASE_VALUES.len()]
144}

Callers

nothing calls this directly

Calls 1

lenMethod · 0.45

Tested by

no test coverage detected