diff options
author | Andy Green <andy@warmcat.com> | 2011-03-07 20:47:41 +0000 |
---|---|---|
committer | Andy Green <andy@warmcat.com> | 2011-03-07 20:47:41 +0000 |
commit | 2836c641cf6b46f9ef1ab119e0b8c8f653a2cde8 (patch) | |
tree | d37d7abb21d08c758945664f6cfca8ce8d418585 | |
parent | 8acc194dc2db00f93b41a49f1b398f0ad59e0848 (diff) |
expose SHA1 api
Signed-off-by: Andy Green <andy@warmcat.com>
-rw-r--r-- | lib/libwebsockets.c | 6 | ||||
-rw-r--r-- | lib/libwebsockets.h | 3 |
2 files changed, 9 insertions, 0 deletions
diff --git a/lib/libwebsockets.c b/lib/libwebsockets.c index 2ce43fb..0775fad 100644 --- a/lib/libwebsockets.c +++ b/lib/libwebsockets.c @@ -427,6 +427,12 @@ int libwebsockets_get_random(struct libwebsocket_context *context, return n; } +unsigned char * +libwebsockets_SHA1(const unsigned char *d, size_t n, unsigned char *md) +{ + return SHA1(d, n, md); +} + void libwebsockets_00_spaceout(char *key, int spaces, int seed) { char *p; diff --git a/lib/libwebsockets.h b/lib/libwebsockets.h index b9eca98..ec55ec8 100644 --- a/lib/libwebsockets.h +++ b/lib/libwebsockets.h @@ -640,6 +640,9 @@ extern int libwebsockets_get_random(struct libwebsocket_context *context, void *buf, int len); +extern unsigned char * +libwebsockets_SHA1(const unsigned char *d, size_t n, unsigned char *md); + extern struct libwebsocket_extension libwebsocket_internal_extensions[]; #ifdef WIN32 |