core-lightning/connectd/sha1.h
Rusty Russell 80a47f1111 lightning_websocketd: simple proxy for websockets.
WebSocket is a bit weird:
1. It starts like an HTTP connection, but they send special headers.
2. We reply with special headers, one of which involves SHA1 of one of theirs.
3. We are then in WebSocket mode, where each frame starts with a 2-20 byte
   header.

We relay data in a simplistic way: if either side sends something, we
read it and relay it synchronously.  That avoids any gratuitous
buffering.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2021-10-22 11:56:30 +02:00

10 lines
248 B
C

#ifndef LIGHTNING_CONNECTD_SHA1_H
#define LIGHTNING_CONNECTD_SHA1_H
#include "config.h"
#include <stdint.h>
#include <stdlib.h>
extern int sha1digest(uint8_t *digest, const uint8_t *data, size_t databytes);
#endif /* LIGHTNING_CONNECTD_SHA1_H */