OpenVAS Scanner  22.7.9
nasl_crypto_helper.h
Go to the documentation of this file.
1 /* SPDX-FileCopyrightText: 2023 Greenbone AG
2  * SPDX-FileCopyrightText: 2002-2003 Michel Arboi
3  * SPDX-FileCopyrightText: 2002-2003 Renaud Deraison
4  *
5  * SPDX-License-Identifier: GPL-2.0-only
6  */
7 
8 #ifndef NASL_NASL_CRYPTO_HELPER_H
9 #define NASL_NASL_CRYPTO_HELPER_H
10 
11 #include "nasl_lex_ctxt.h"
12 
13 #include <gpg-error.h>
14 void *
15 hmac_md5_for_prf (const void *key, int keylen, const void *buf, int buflen);
16 
17 void *
18 hmac_sha1 (const void *key, int keylen, const void *buf, int buflen);
19 
20 void *
21 hmac_sha256 (const void *key, int keylen, const void *buf, int buflen);
22 
23 void *
24 hmac_sha384 (const void *key, int keylen, const void *buf, int buflen);
25 
26 tree_cell *
27 nasl_smb_sign (const int algo, lex_ctxt *lexic);
28 
29 gpg_err_code_t
30 mac (const char *key, const size_t key_len, const char *data,
31  const size_t data_len, const char *iv, const size_t iv_len, int algo,
32  int flags, char **out, size_t *out_len);
33 #endif
hmac_md5_for_prf
void * hmac_md5_for_prf(const void *key, int keylen, const void *buf, int buflen)
Definition: nasl_crypt_helper.c:20
nasl_smb_sign
tree_cell * nasl_smb_sign(const int algo, lex_ctxt *lexic)
Definition: nasl_crypt_helper.c:179
nasl_lex_ctxt.h
TC
Definition: nasl_tree.h:94
struct_lex_ctxt
Definition: nasl_lex_ctxt.h:23
mac
gpg_err_code_t mac(const char *key, const size_t key_len, const char *data, const size_t data_len, const char *iv, const size_t iv_len, int algo, int flags, char **out, size_t *out_len)
Definition: nasl_crypt_helper.c:97
hmac_sha256
void * hmac_sha256(const void *key, int keylen, const void *buf, int buflen)
Definition: nasl_crypt_helper.c:48
hmac_sha384
void * hmac_sha384(const void *key, int keylen, const void *buf, int buflen)
Definition: nasl_crypt_helper.c:62
hmac_sha1
void * hmac_sha1(const void *key, int keylen, const void *buf, int buflen)
Definition: nasl_crypt_helper.c:34