static_http::sha1 class

This code is based on the sha1 implementation which is part of rfc3174. It is not very fast, but we only use it when doing the WebSocket handshake.

Constructors, destructors, conversion operators

sha1()

Public functions

void reset()
void append(const uint8_t* src, size_t len)
void append(const char* src)
void compute(uint8_t* dst)

Function documentation

static_http::sha1::sha1()

Construct a initialized sha1 state. It is ready to append data to it.

void static_http::sha1::reset()

Reset the sha1 state.

void static_http::sha1::append(const uint8_t* src, size_t len)

Hash additional bytes and update the internal state.

void static_http::sha1::append(const char* src)

Append a null-terminated string.

void static_http::sha1::compute(uint8_t* dst)

Compute the sha1 hash. This method writes 20 bytes to the destination buffer. You need to make sure that enough space is available.