mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-03 19:28:53 +00:00
Add res_http_websocket module which implements the WebSocket protocol according to RFC 6455.
Review: https://reviewboard.asterisk.org/r/1952/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@368359 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
12
main/utils.c
12
main/utils.c
@@ -270,6 +270,18 @@ void ast_sha1_hash(char *output, const char *input)
|
||||
ptr += sprintf(ptr, "%2.2x", Message_Digest[x]);
|
||||
}
|
||||
|
||||
/*! \brief Produce a 20 byte SHA1 hash of value. */
|
||||
void ast_sha1_hash_uint(uint8_t *digest, const char *input)
|
||||
{
|
||||
struct SHA1Context sha;
|
||||
|
||||
SHA1Reset(&sha);
|
||||
|
||||
SHA1Input(&sha, (const unsigned char *) input, strlen(input));
|
||||
|
||||
SHA1Result(&sha, digest);
|
||||
}
|
||||
|
||||
/*! \brief decode BASE64 encoded text */
|
||||
int ast_base64decode(unsigned char *dst, const char *src, int max)
|
||||
{
|
||||
|
Reference in New Issue
Block a user