36 enum lws_genhash_types {
37 LWS_GENHASH_TYPE_UNKNOWN,
39 LWS_GENHASH_TYPE_SHA1,
40 LWS_GENHASH_TYPE_SHA256,
41 LWS_GENHASH_TYPE_SHA384,
42 LWS_GENHASH_TYPE_SHA512,
45 enum lws_genhmac_types {
46 LWS_GENHMAC_TYPE_UNKNOWN,
47 LWS_GENHMAC_TYPE_SHA256,
48 LWS_GENHMAC_TYPE_SHA384,
49 LWS_GENHMAC_TYPE_SHA512,
52 #define LWS_GENHASH_LARGEST 64
56 #if defined(LWS_WITH_MBEDTLS)
58 mbedtls_md5_context md5;
59 mbedtls_sha1_context sha1;
60 mbedtls_sha256_context sha256;
61 mbedtls_sha512_context sha512;
62 const mbedtls_md_info_t *hmac;
65 const EVP_MD *evp_type;
72 #if defined(LWS_WITH_MBEDTLS)
73 const mbedtls_md_info_t *hmac;
74 mbedtls_md_context_t ctx;
76 const EVP_MD *evp_type;
78 #if defined(LWS_HAVE_EVP_PKEY_new_raw_private_key)
82 #if defined(LWS_HAVE_HMAC_CTX_new)
98 LWS_VISIBLE LWS_EXTERN
size_t LWS_WARN_UNUSED_RESULT
107 LWS_VISIBLE LWS_EXTERN
size_t LWS_WARN_UNUSED_RESULT
117 LWS_VISIBLE LWS_EXTERN
int LWS_WARN_UNUSED_RESULT
128 LWS_VISIBLE LWS_EXTERN
int LWS_WARN_UNUSED_RESULT
142 LWS_VISIBLE LWS_EXTERN
int
157 LWS_VISIBLE LWS_EXTERN
int LWS_WARN_UNUSED_RESULT
159 const uint8_t *key,
size_t key_len);
171 LWS_VISIBLE LWS_EXTERN
int LWS_WARN_UNUSED_RESULT
185 LWS_VISIBLE LWS_EXTERN
int
LWS_VISIBLE LWS_EXTERN size_t LWS_WARN_UNUSED_RESULT lws_genhash_size(enum lws_genhash_types type)
LWS_VISIBLE LWS_EXTERN int lws_genhmac_destroy(struct lws_genhmac_ctx *ctx, void *result)
LWS_VISIBLE LWS_EXTERN int LWS_WARN_UNUSED_RESULT lws_genhash_update(struct lws_genhash_ctx *ctx, const void *in, size_t len)
LWS_VISIBLE LWS_EXTERN int LWS_WARN_UNUSED_RESULT lws_genhash_init(struct lws_genhash_ctx *ctx, enum lws_genhash_types type)
LWS_VISIBLE LWS_EXTERN int lws_genhash_destroy(struct lws_genhash_ctx *ctx, void *result)
LWS_VISIBLE LWS_EXTERN size_t LWS_WARN_UNUSED_RESULT lws_genhmac_size(enum lws_genhmac_types type)
LWS_VISIBLE LWS_EXTERN int LWS_WARN_UNUSED_RESULT lws_genhmac_init(struct lws_genhmac_ctx *ctx, enum lws_genhmac_types type, const uint8_t *key, size_t key_len)
LWS_VISIBLE LWS_EXTERN int LWS_WARN_UNUSED_RESULT lws_genhmac_update(struct lws_genhmac_ctx *ctx, const void *in, size_t len)
Definition: lws-genhash.h:54
Definition: lws-genhash.h:70