Skip to content

Commit 2ab8f83

Browse files
committed
rename macro
1 parent dbe1a32 commit 2ab8f83

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

Modules/hmacmodule.c

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1135,7 +1135,7 @@ hmac_get_buffer_views(PyObject *key, Py_buffer *keyview,
11351135
/*
11361136
* One-shot HMAC-HASH using the given HACL_HID.
11371137
*/
1138-
#define Py_HMAC_HACL_ONESHOT(HACL_HID, KEY, MSG) \
1138+
#define HACL_HMAC_COMPUTE_NAMED_DIGEST(HACL_HID, KEY, MSG) \
11391139
do { \
11401140
Py_buffer keyview, msgview; \
11411141
if (hmac_get_buffer_views(key, &keyview, msg, &msgview) < 0) { \
@@ -1168,7 +1168,7 @@ static PyObject *
11681168
_hmac_compute_md5_impl(PyObject *module, PyObject *key, PyObject *msg)
11691169
/*[clinic end generated code: output=7837a4ceccbbf636 input=77a4b774c7d61218]*/
11701170
{
1171-
Py_HMAC_HACL_ONESHOT(md5, key, msg);
1171+
HACL_HMAC_COMPUTE_NAMED_DIGEST(md5, key, msg);
11721172
}
11731173

11741174
/*[clinic input]
@@ -1184,7 +1184,7 @@ static PyObject *
11841184
_hmac_compute_sha1_impl(PyObject *module, PyObject *key, PyObject *msg)
11851185
/*[clinic end generated code: output=79fd7689c83691d8 input=3b64dccc6bdbe4ba]*/
11861186
{
1187-
Py_HMAC_HACL_ONESHOT(sha1, key, msg);
1187+
HACL_HMAC_COMPUTE_NAMED_DIGEST(sha1, key, msg);
11881188
}
11891189

11901190
/*[clinic input]
@@ -1200,7 +1200,7 @@ static PyObject *
12001200
_hmac_compute_sha2_224_impl(PyObject *module, PyObject *key, PyObject *msg)
12011201
/*[clinic end generated code: output=7f21f1613e53979e input=a1a75f25f23449af]*/
12021202
{
1203-
Py_HMAC_HACL_ONESHOT(sha2_224, key, msg);
1203+
HACL_HMAC_COMPUTE_NAMED_DIGEST(sha2_224, key, msg);
12041204
}
12051205

12061206
/*[clinic input]
@@ -1216,7 +1216,7 @@ static PyObject *
12161216
_hmac_compute_sha2_256_impl(PyObject *module, PyObject *key, PyObject *msg)
12171217
/*[clinic end generated code: output=d4a291f7d9a82459 input=5c9ccf2df048ace3]*/
12181218
{
1219-
Py_HMAC_HACL_ONESHOT(sha2_256, key, msg);
1219+
HACL_HMAC_COMPUTE_NAMED_DIGEST(sha2_256, key, msg);
12201220
}
12211221

12221222
/*[clinic input]
@@ -1232,7 +1232,7 @@ static PyObject *
12321232
_hmac_compute_sha2_384_impl(PyObject *module, PyObject *key, PyObject *msg)
12331233
/*[clinic end generated code: output=f211fa26e3700c27 input=2fee2c14766af231]*/
12341234
{
1235-
Py_HMAC_HACL_ONESHOT(sha2_384, key, msg);
1235+
HACL_HMAC_COMPUTE_NAMED_DIGEST(sha2_384, key, msg);
12361236
}
12371237

12381238
/*[clinic input]
@@ -1248,7 +1248,7 @@ static PyObject *
12481248
_hmac_compute_sha2_512_impl(PyObject *module, PyObject *key, PyObject *msg)
12491249
/*[clinic end generated code: output=d5c20373762cecca input=3371eaac315c7864]*/
12501250
{
1251-
Py_HMAC_HACL_ONESHOT(sha2_512, key, msg);
1251+
HACL_HMAC_COMPUTE_NAMED_DIGEST(sha2_512, key, msg);
12521252
}
12531253

12541254
/*[clinic input]
@@ -1264,7 +1264,7 @@ static PyObject *
12641264
_hmac_compute_sha3_224_impl(PyObject *module, PyObject *key, PyObject *msg)
12651265
/*[clinic end generated code: output=a242ccac9ad9c22b input=d0ab0c7d189c3d87]*/
12661266
{
1267-
Py_HMAC_HACL_ONESHOT(sha3_224, key, msg);
1267+
HACL_HMAC_COMPUTE_NAMED_DIGEST(sha3_224, key, msg);
12681268
}
12691269

12701270
/*[clinic input]
@@ -1280,7 +1280,7 @@ static PyObject *
12801280
_hmac_compute_sha3_256_impl(PyObject *module, PyObject *key, PyObject *msg)
12811281
/*[clinic end generated code: output=b539dbb61af2fe0b input=f05d7b6364b35d02]*/
12821282
{
1283-
Py_HMAC_HACL_ONESHOT(sha3_256, key, msg);
1283+
HACL_HMAC_COMPUTE_NAMED_DIGEST(sha3_256, key, msg);
12841284
}
12851285

12861286
/*[clinic input]
@@ -1296,7 +1296,7 @@ static PyObject *
12961296
_hmac_compute_sha3_384_impl(PyObject *module, PyObject *key, PyObject *msg)
12971297
/*[clinic end generated code: output=5eb372fb5c4ffd3a input=d842d393e7aa05ae]*/
12981298
{
1299-
Py_HMAC_HACL_ONESHOT(sha3_384, key, msg);
1299+
HACL_HMAC_COMPUTE_NAMED_DIGEST(sha3_384, key, msg);
13001300
}
13011301

13021302
/*[clinic input]
@@ -1312,7 +1312,7 @@ static PyObject *
13121312
_hmac_compute_sha3_512_impl(PyObject *module, PyObject *key, PyObject *msg)
13131313
/*[clinic end generated code: output=154bcbf8c2eacac1 input=166fe5baaeaabfde]*/
13141314
{
1315-
Py_HMAC_HACL_ONESHOT(sha3_512, key, msg);
1315+
HACL_HMAC_COMPUTE_NAMED_DIGEST(sha3_512, key, msg);
13161316
}
13171317

13181318
/*[clinic input]
@@ -1328,7 +1328,7 @@ static PyObject *
13281328
_hmac_compute_blake2s_32_impl(PyObject *module, PyObject *key, PyObject *msg)
13291329
/*[clinic end generated code: output=cfc730791bc62361 input=d22c36e7fe31a985]*/
13301330
{
1331-
Py_HMAC_HACL_ONESHOT(blake2s_32, key, msg);
1331+
HACL_HMAC_COMPUTE_NAMED_DIGEST(blake2s_32, key, msg);
13321332
}
13331333

13341334
/*[clinic input]
@@ -1344,10 +1344,10 @@ static PyObject *
13441344
_hmac_compute_blake2b_32_impl(PyObject *module, PyObject *key, PyObject *msg)
13451345
/*[clinic end generated code: output=765c5c4fb9124636 input=4a35ee058d172f4b]*/
13461346
{
1347-
Py_HMAC_HACL_ONESHOT(blake2b_32, key, msg);
1347+
HACL_HMAC_COMPUTE_NAMED_DIGEST(blake2b_32, key, msg);
13481348
}
13491349

1350-
#undef Py_HMAC_HACL_ONESHOT
1350+
#undef HACL_HMAC_COMPUTE_NAMED_DIGEST
13511351

13521352
// --- HMAC module methods ----------------------------------------------------
13531353

0 commit comments

Comments
 (0)