verifyCookie
fn
bool verifyCookie(const(ubyte)[] cookie, const(ubyte)[] serverSecret,
DatagramEndpoint clientAddr, const(ubyte)[] clientRandom)Verifies a cookie received from a client.
Regenerates the expected cookie from the client's address and random, then performs a constant-time comparison to prevent timing attacks.
Parameters
cookie | The cookie received from the client. |
serverSecret | The server's secret key. |
clientAddr | The client's network address. |
clientRandom | The 32-byte ClientHello random value. |
Returns
true if the cookie is valid, false otherwise.