libwebsockets
Lightweight C library for HTML5 websockets
Generic Hash

Macros

#define LWS_GENHASH_LARGEST   64
 

Enumerations

enum  lws_genhash_types {
  LWS_GENHASH_TYPE_UNKNOWN , LWS_GENHASH_TYPE_MD5 , LWS_GENHASH_TYPE_SHA1 , LWS_GENHASH_TYPE_SHA256 ,
  LWS_GENHASH_TYPE_SHA384 , LWS_GENHASH_TYPE_SHA512
}
 
enum  lws_genhmac_types { LWS_GENHMAC_TYPE_UNKNOWN , LWS_GENHMAC_TYPE_SHA256 , LWS_GENHMAC_TYPE_SHA384 , LWS_GENHMAC_TYPE_SHA512 }
 

Detailed Description

Generic Hash related functions

Lws provides generic hash / digest accessors that abstract the ones provided by whatever tls library you are linking against.

It lets you use the same code if you build against mbedtls or OpenSSL for example.

Macro Definition Documentation

◆ LWS_GENHASH_LARGEST

#define LWS_GENHASH_LARGEST   64

#include <include/libwebsockets/lws-genhash.h>

Definition at line 52 of file lws-genhash.h.

Enumeration Type Documentation

◆ lws_genhash_types

#include <include/libwebsockets/lws-genhash.h>

Enumerator
LWS_GENHASH_TYPE_UNKNOWN 
LWS_GENHASH_TYPE_MD5 
LWS_GENHASH_TYPE_SHA1 
LWS_GENHASH_TYPE_SHA256 
LWS_GENHASH_TYPE_SHA384 
LWS_GENHASH_TYPE_SHA512 

Definition at line 36 of file lws-genhash.h.

36  {
43 };
@ LWS_GENHASH_TYPE_SHA384
Definition: lws-genhash.h:41
@ LWS_GENHASH_TYPE_UNKNOWN
Definition: lws-genhash.h:37
@ LWS_GENHASH_TYPE_MD5
Definition: lws-genhash.h:38
@ LWS_GENHASH_TYPE_SHA1
Definition: lws-genhash.h:39
@ LWS_GENHASH_TYPE_SHA512
Definition: lws-genhash.h:42
@ LWS_GENHASH_TYPE_SHA256
Definition: lws-genhash.h:40

◆ lws_genhmac_types

#include <include/libwebsockets/lws-genhash.h>

Enumerator
LWS_GENHMAC_TYPE_UNKNOWN 
LWS_GENHMAC_TYPE_SHA256 
LWS_GENHMAC_TYPE_SHA384 
LWS_GENHMAC_TYPE_SHA512 

Definition at line 45 of file lws-genhash.h.

45  {
50 };
@ LWS_GENHMAC_TYPE_SHA384
Definition: lws-genhash.h:48
@ LWS_GENHMAC_TYPE_SHA512
Definition: lws-genhash.h:49
@ LWS_GENHMAC_TYPE_UNKNOWN
Definition: lws-genhash.h:46
@ LWS_GENHMAC_TYPE_SHA256
Definition: lws-genhash.h:47