Skip to content

Commit 89c5f89

Browse files
committed
cleanup
1 parent 755d6c0 commit 89c5f89

File tree

1 file changed

+8
-12
lines changed

1 file changed

+8
-12
lines changed

Modules/hmacmodule.c

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,10 @@
33
#endif
44

55
#include "Python.h"
6-
#include "hashlib.h"
76

7+
#include "hashlib.h"
88
#include "_hacl/Hacl_HMAC.h"
99

10-
#include "clinic/hmacmodule.c.h"
11-
12-
typedef void (*HACL_HMAC_digest_func_t)(uint8_t *out,
13-
uint8_t *key, uint32_t keylen,
14-
uint8_t *msg, uint32_t msglen);
15-
1610
// HMAC underlying hash function static information.
1711

1812
/* MD-5 */
@@ -94,6 +88,13 @@ typedef void (*HACL_HMAC_digest_func_t)(uint8_t *out,
9488

9589
#define Py_hmac_hash_max_digest_size 64
9690

91+
/*[clinic input]
92+
module _hmac
93+
[clinic start generated code]*/
94+
/*[clinic end generated code: output=da39a3ee5e6b4b0d input=799f0f10157d561f]*/
95+
96+
#include "clinic/hmacmodule.c.h"
97+
9798
/* Check that the buffer length fits on a uint32_t. */
9899
static inline int
99100
has_uint32_t_buffer_length(const Py_buffer *buffer)
@@ -138,11 +139,6 @@ has_uint32_t_buffer_length(const Py_buffer *buffer)
138139
); \
139140
} while (0)
140141

141-
/*[clinic input]
142-
module _hmac
143-
[clinic start generated code]*/
144-
/*[clinic end generated code: output=da39a3ee5e6b4b0d input=799f0f10157d561f]*/
145-
146142
/*[clinic input]
147143
_hmac.compute_md5
148144

0 commit comments

Comments
 (0)