15 #ifndef __WSGCRYPT_H__ 16 #define __WSGCRYPT_H__ 18 #include <ws_diag_control.h> 19 #include "ws_symbol_export.h" 22 DIAG_OFF(deprecated-declarations)
26 DIAG_ON(deprecated-declarations)
28 #define HASH_MD5_LENGTH 16 29 #define HASH_SHA1_LENGTH 20 30 #define HASH_SHA2_224_LENGTH 28 31 #define HASH_SHA2_256_LENGTH 32 32 #define HASH_SHA2_384_LENGTH 48 33 #define HASH_SHA2_512_LENGTH 64 40 WS_DLL_PUBLIC gcry_error_t ws_hmac_buffer(
int algo,
void *digest,
const void *
buffer,
size_t length,
const void *key,
size_t keylen);
44 WS_DLL_PUBLIC
void crypt_des_ecb(guint8 *output,
const guint8 *
buffer,
const guint8 *key56);
47 WS_DLL_PUBLIC
size_t rsa_decrypt_inplace(
const guint len, guchar* data, gcry_sexp_t pk, gboolean pkcs1_padding,
char **err);
62 WS_DLL_PUBLIC gcry_error_t
63 hkdf_expand(
int hashalgo,
const guint8 *prk, guint prk_len,
const guint8 *
info, guint info_len,
64 guint8 *out, guint out_len);
71 static inline gcry_error_t
72 hkdf_extract(
int hashalgo,
const guint8 *salt,
size_t salt_len,
const guint8 *ikm,
size_t ikm_len, guint8 *prk)
75 return ws_hmac_buffer(hashalgo, prk, ikm, ikm_len, salt, salt_len);
Definition: file-pcapng.c:177
Definition: mcast_stream.h:30