|
14 | 14 | #define Py_hmac_md5_block_size 64 |
15 | 15 | #define Py_hmac_md5_digest_size 16 |
16 | 16 | #define Py_hmac_md5_update_func NULL |
17 | | -#define Py_hmac_md5_digest_func Hacl_HMAC_compute_md5 |
| 17 | +#define Py_hmac_md5_digest_func NULL |
| 18 | +#define Py_hmac_md5_compute_func Hacl_HMAC_compute_md5 |
18 | 19 |
|
19 | 20 | /* SHA-1 family */ |
20 | 21 | // HACL_HID = sha1 |
21 | 22 | #define Py_hmac_sha1_block_size 64 |
22 | 23 | #define Py_hmac_sha1_digest_size 20 |
23 | 24 | #define Py_hmac_sha1_update_func NULL |
24 | | -#define Py_hmac_sha1_digest_func Hacl_HMAC_compute_sha1 |
| 25 | +#define Py_hmac_sha1_digest_func NULL |
| 26 | +#define Py_hmac_sha1_compute_func Hacl_HMAC_compute_sha1 |
25 | 27 |
|
26 | 28 | /* SHA-2 family */ |
27 | 29 | // HACL_HID = sha2_224 |
28 | 30 | #define Py_hmac_sha2_224_block_size 64 |
29 | 31 | #define Py_hmac_sha2_224_digest_size 28 |
30 | 32 | #define Py_hmac_sha2_224_update_func NULL |
31 | | -#define Py_hmac_sha2_224_digest_func Hacl_HMAC_compute_sha2_224 |
| 33 | +#define Py_hmac_sha2_224_digest_func NULL |
| 34 | +#define Py_hmac_sha2_224_compute_func Hacl_HMAC_compute_sha2_224 |
32 | 35 |
|
33 | 36 | // HACL_HID = sha2_256 |
34 | 37 | #define Py_hmac_sha2_256_block_size 64 |
35 | 38 | #define Py_hmac_sha2_256_digest_size 32 |
36 | 39 | #define Py_hmac_sha2_256_update_func NULL |
37 | | -#define Py_hmac_sha2_256_digest_func Hacl_HMAC_compute_sha2_256 |
| 40 | +#define Py_hmac_sha2_256_digest_func NULL |
| 41 | +#define Py_hmac_sha2_256_compute_func Hacl_HMAC_compute_sha2_256 |
38 | 42 |
|
39 | 43 | // HACL_HID = sha2_384 |
40 | 44 | #define Py_hmac_sha2_384_block_size 128 |
41 | 45 | #define Py_hmac_sha2_384_digest_size 48 |
42 | 46 | #define Py_hmac_sha2_384_update_func NULL |
43 | | -#define Py_hmac_sha2_384_digest_func Hacl_HMAC_compute_sha2_384 |
| 47 | +#define Py_hmac_sha2_384_digest_func NULL |
| 48 | +#define Py_hmac_sha2_384_compute_func Hacl_HMAC_compute_sha2_384 |
44 | 49 |
|
45 | 50 | // HACL_HID = sha2_512 |
46 | 51 | #define Py_hmac_sha2_512_block_size 128 |
47 | 52 | #define Py_hmac_sha2_512_digest_size 64 |
48 | 53 | #define Py_hmac_sha2_512_update_func NULL |
49 | | -#define Py_hmac_sha2_512_digest_func Hacl_HMAC_compute_sha2_512 |
| 54 | +#define Py_hmac_sha2_512_digest_func NULL |
| 55 | +#define Py_hmac_sha2_512_compute_func Hacl_HMAC_compute_sha2_512 |
50 | 56 |
|
51 | 57 | /* SHA-3 family */ |
52 | 58 | // HACL_HID = sha3_224 |
53 | 59 | #define Py_hmac_sha3_224_block_size 144 |
54 | 60 | #define Py_hmac_sha3_224_digest_size 28 |
55 | 61 | #define Py_hmac_sha3_224_update_func NULL |
56 | | -#define Py_hmac_sha3_224_digest_func Hacl_HMAC_compute_sha3_224 |
| 62 | +#define Py_hmac_sha3_224_digest_func NULL |
| 63 | +#define Py_hmac_sha3_224_compute_func Hacl_HMAC_compute_sha3_224 |
57 | 64 |
|
58 | 65 | // HACL_HID = sha3_256 |
59 | 66 | #define Py_hmac_sha3_256_block_size 136 |
60 | 67 | #define Py_hmac_sha3_256_digest_size 32 |
61 | 68 | #define Py_hmac_sha3_256_update_func NULL |
62 | | -#define Py_hmac_sha3_256_digest_func Hacl_HMAC_compute_sha3_256 |
| 69 | +#define Py_hmac_sha3_256_digest_func NULL |
| 70 | +#define Py_hmac_sha3_256_compute_func Hacl_HMAC_compute_sha3_256 |
63 | 71 |
|
64 | 72 | // HACL_HID = sha3_384 |
65 | 73 | #define Py_hmac_sha3_384_block_size 104 |
66 | 74 | #define Py_hmac_sha3_384_digest_size 48 |
67 | 75 | #define Py_hmac_sha3_384_update_func NULL |
68 | | -#define Py_hmac_sha3_384_digest_func Hacl_HMAC_compute_sha3_384 |
| 76 | +#define Py_hmac_sha3_384_digest_func NULL |
| 77 | +#define Py_hmac_sha3_384_compute_func Hacl_HMAC_compute_sha3_384 |
69 | 78 |
|
70 | 79 | // HACL_HID = sha3_512 |
71 | 80 | #define Py_hmac_sha3_512_block_size 72 |
72 | 81 | #define Py_hmac_sha3_512_digest_size 64 |
73 | 82 | #define Py_hmac_sha3_512_update_func NULL |
74 | | -#define Py_hmac_sha3_512_digest_func Hacl_HMAC_compute_sha3_512 |
| 83 | +#define Py_hmac_sha3_512_digest_func NULL |
| 84 | +#define Py_hmac_sha3_512_compute_func Hacl_HMAC_compute_sha3_512 |
75 | 85 |
|
76 | 86 | /* Blake family */ |
77 | 87 | // HACL_HID = blake2s_32 |
78 | 88 | #define Py_hmac_blake2s_32_block_size 64 |
79 | 89 | #define Py_hmac_blake2s_32_digest_size 32 |
80 | 90 | #define Py_hmac_blake2s_32_update_func NULL |
81 | | -#define Py_hmac_blake2s_32_digest_func Hacl_HMAC_compute_blake2s_32 |
| 91 | +#define Py_hmac_blake2s_32_digest_func NULL |
| 92 | +#define Py_hmac_blake2s_32_compute_func Hacl_HMAC_compute_blake2s_32 |
82 | 93 |
|
83 | 94 | // HACL_HID = blake2b_32 |
84 | 95 | #define Py_hmac_blake2b_32_block_size 128 |
85 | 96 | #define Py_hmac_blake2b_32_digest_size 64 |
86 | 97 | #define Py_hmac_blake2b_32_update_func NULL |
87 | | -#define Py_hmac_blake2b_32_digest_func Hacl_HMAC_compute_blake2b_32 |
| 98 | +#define Py_hmac_blake2b_32_digest_func NULL |
| 99 | +#define Py_hmac_blake2b_32_compute_func Hacl_HMAC_compute_blake2b_32 |
88 | 100 |
|
89 | 101 | #define Py_hmac_hash_max_digest_size 64 |
90 | 102 |
|
@@ -126,7 +138,7 @@ has_uint32_t_buffer_length(const Py_buffer *buffer) |
126 | 138 | return NULL; \ |
127 | 139 | } \ |
128 | 140 | uint8_t out[Py_hmac_## HACL_HID ##_digest_size]; \ |
129 | | - Py_hmac_## HACL_HID ##_digest_func( \ |
| 141 | + Py_hmac_## HACL_HID ##_compute_func( \ |
130 | 142 | out, \ |
131 | 143 | (uint8_t *)keyview.buf, (uint32_t)keyview.len, \ |
132 | 144 | (uint8_t *)msgview.buf, (uint32_t)msgview.len \ |
|
0 commit comments