|
curl-fuzzer C++ reference
|
Minimal standalone SHA-1 + base64 for the WebSocket Sec-WebSocket-Accept computation (RFC 6455 §4.2.2). More...
Go to the source code of this file.
Functions | |
| std::array< uint8_t, 20 > | proto_fuzzer::detail::Sha1 (const uint8_t *data, std::size_t len) |
| Minimal SHA-1 (FIPS 180-4) — not for security use; only for the WS accept key. | |
| std::string | proto_fuzzer::detail::Base64Encode (const uint8_t *data, std::size_t len) |
| Minimal base64 encoder. | |
| std::string | proto_fuzzer::ComputeWebSocketAcceptKey (const std::string &key) |
| Compute the RFC 6455 Sec-WebSocket-Accept value for a given client key. | |
Minimal standalone SHA-1 + base64 for the WebSocket Sec-WebSocket-Accept computation (RFC 6455 §4.2.2).
This removes the hard OpenSSL dependency from the proto fuzzer — the only crypto it needs is a single SHA-1 hash of a handshake nonce which has no security implications inside a fuzzer.
Definition in file ws_accept_key.h.
|
inline |
Minimal base64 encoder.
| data | Pointer to the input bytes to encode. |
| len | Number of input bytes. |
Definition at line 119 of file ws_accept_key.h.
|
inline |
Compute the RFC 6455 Sec-WebSocket-Accept value for a given client key.
| key | The client-supplied Sec-WebSocket-Key header value. |
Definition at line 140 of file ws_accept_key.h.
|
inline |
Minimal SHA-1 (FIPS 180-4) — not for security use; only for the WS accept key.
| data | Pointer to the input bytes to hash. |
| len | Number of input bytes. |
Definition at line 29 of file ws_accept_key.h.