|
cwist
Modern C web framework with libttak runtime
|
Internal cryptographic helpers used during the WebSocket handshake. More...
#include <stddef.h>#include <stdint.h>

Go to the source code of this file.
Functions | |
| void | sha1 (const uint8_t *data, size_t len, uint8_t *hash) |
| Compute the SHA-1 digest for a byte range. | |
| char * | base64_encode (const uint8_t *data, size_t input_length, size_t *output_length) |
| Base64-encode a byte buffer for handshake header generation. | |
Internal cryptographic helpers used during the WebSocket handshake.
Definition in file ws_utils.h.
Base64-encode a byte buffer for handshake header generation.
| data | Input buffer to encode. |
| input_length | Number of bytes in data. |
| output_length | Optional output parameter for the encoded length. |
Base64-encode a byte buffer for handshake header generation.
| data | Input bytes to encode. |
| input_length | Number of input bytes. |
| output_length | Output parameter that receives the encoded length. |
Definition at line 258 of file ws_utils.c.
References cap, and cwist_alloc().
Referenced by cwist_websocket_upgrade_response().
Compute the SHA-1 digest for a byte range.
| data | Input buffer to hash. |
| len | Number of bytes in data. |
| hash | Output buffer that receives the 20-byte SHA-1 digest. |
Compute the SHA-1 digest for a byte range.
| data | Input bytes to hash. |
| len | Number of bytes in data. |
| hash | Output buffer that receives the 20-byte digest. |
Definition at line 235 of file ws_utils.c.
References cap.
Referenced by cwist_websocket_upgrade_response().