1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673
|
/*[clinic input]
preserve
[clinic start generated code]*/
#if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE)
# include "pycore_gc.h" // PyGC_Head
# include "pycore_runtime.h" // _Py_ID()
#endif
#include "pycore_modsupport.h" // _PyArg_UnpackKeywords()
PyDoc_STRVAR(_hmac_new__doc__,
"new($module, /, key, msg=None, digestmod=None)\n"
"--\n"
"\n"
"Return a new HMAC object.");
#define _HMAC_NEW_METHODDEF \
{"new", _PyCFunction_CAST(_hmac_new), METH_FASTCALL|METH_KEYWORDS, _hmac_new__doc__},
static PyObject *
_hmac_new_impl(PyObject *module, PyObject *keyobj, PyObject *msgobj,
PyObject *hash_info_ref);
static PyObject *
_hmac_new(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames)
{
PyObject *return_value = NULL;
#if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE)
#define NUM_KEYWORDS 3
static struct {
PyGC_Head _this_is_not_used;
PyObject_VAR_HEAD
Py_hash_t ob_hash;
PyObject *ob_item[NUM_KEYWORDS];
} _kwtuple = {
.ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS)
.ob_hash = -1,
.ob_item = { &_Py_ID(key), &_Py_ID(msg), &_Py_ID(digestmod), },
};
#undef NUM_KEYWORDS
#define KWTUPLE (&_kwtuple.ob_base.ob_base)
#else // !Py_BUILD_CORE
# define KWTUPLE NULL
#endif // !Py_BUILD_CORE
static const char * const _keywords[] = {"key", "msg", "digestmod", NULL};
static _PyArg_Parser _parser = {
.keywords = _keywords,
.fname = "new",
.kwtuple = KWTUPLE,
};
#undef KWTUPLE
PyObject *argsbuf[3];
Py_ssize_t noptargs = nargs + (kwnames ? PyTuple_GET_SIZE(kwnames) : 0) - 1;
PyObject *keyobj;
PyObject *msgobj = NULL;
PyObject *hash_info_ref = NULL;
args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser,
/*minpos*/ 1, /*maxpos*/ 3, /*minkw*/ 0, /*varpos*/ 0, argsbuf);
if (!args) {
goto exit;
}
keyobj = args[0];
if (!noptargs) {
goto skip_optional_pos;
}
if (args[1]) {
msgobj = args[1];
if (!--noptargs) {
goto skip_optional_pos;
}
}
hash_info_ref = args[2];
skip_optional_pos:
return_value = _hmac_new_impl(module, keyobj, msgobj, hash_info_ref);
exit:
return return_value;
}
PyDoc_STRVAR(_hmac_HMAC_copy__doc__,
"copy($self, /)\n"
"--\n"
"\n"
"Return a copy (\"clone\") of the HMAC object.");
#define _HMAC_HMAC_COPY_METHODDEF \
{"copy", _PyCFunction_CAST(_hmac_HMAC_copy), METH_METHOD|METH_FASTCALL|METH_KEYWORDS, _hmac_HMAC_copy__doc__},
static PyObject *
_hmac_HMAC_copy_impl(HMACObject *self, PyTypeObject *cls);
static PyObject *
_hmac_HMAC_copy(PyObject *self, PyTypeObject *cls, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames)
{
if (nargs || (kwnames && PyTuple_GET_SIZE(kwnames))) {
PyErr_SetString(PyExc_TypeError, "copy() takes no arguments");
return NULL;
}
return _hmac_HMAC_copy_impl((HMACObject *)self, cls);
}
PyDoc_STRVAR(_hmac_HMAC_update__doc__,
"update($self, /, msg)\n"
"--\n"
"\n"
"Update the HMAC object with the given message.");
#define _HMAC_HMAC_UPDATE_METHODDEF \
{"update", _PyCFunction_CAST(_hmac_HMAC_update), METH_FASTCALL|METH_KEYWORDS, _hmac_HMAC_update__doc__},
static PyObject *
_hmac_HMAC_update_impl(HMACObject *self, PyObject *msgobj);
static PyObject *
_hmac_HMAC_update(PyObject *self, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames)
{
PyObject *return_value = NULL;
#if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE)
#define NUM_KEYWORDS 1
static struct {
PyGC_Head _this_is_not_used;
PyObject_VAR_HEAD
Py_hash_t ob_hash;
PyObject *ob_item[NUM_KEYWORDS];
} _kwtuple = {
.ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS)
.ob_hash = -1,
.ob_item = { &_Py_ID(msg), },
};
#undef NUM_KEYWORDS
#define KWTUPLE (&_kwtuple.ob_base.ob_base)
#else // !Py_BUILD_CORE
# define KWTUPLE NULL
#endif // !Py_BUILD_CORE
static const char * const _keywords[] = {"msg", NULL};
static _PyArg_Parser _parser = {
.keywords = _keywords,
.fname = "update",
.kwtuple = KWTUPLE,
};
#undef KWTUPLE
PyObject *argsbuf[1];
PyObject *msgobj;
args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser,
/*minpos*/ 1, /*maxpos*/ 1, /*minkw*/ 0, /*varpos*/ 0, argsbuf);
if (!args) {
goto exit;
}
msgobj = args[0];
return_value = _hmac_HMAC_update_impl((HMACObject *)self, msgobj);
exit:
return return_value;
}
PyDoc_STRVAR(_hmac_HMAC_digest__doc__,
"digest($self, /)\n"
"--\n"
"\n"
"Return the digest of the bytes passed to the update() method so far.\n"
"\n"
"This method may raise a MemoryError.");
#define _HMAC_HMAC_DIGEST_METHODDEF \
{"digest", (PyCFunction)_hmac_HMAC_digest, METH_NOARGS, _hmac_HMAC_digest__doc__},
static PyObject *
_hmac_HMAC_digest_impl(HMACObject *self);
static PyObject *
_hmac_HMAC_digest(PyObject *self, PyObject *Py_UNUSED(ignored))
{
return _hmac_HMAC_digest_impl((HMACObject *)self);
}
PyDoc_STRVAR(_hmac_HMAC_hexdigest__doc__,
"hexdigest($self, /)\n"
"--\n"
"\n"
"Return hexadecimal digest of the bytes passed to the update() method so far.\n"
"\n"
"This may be used to exchange the value safely in email or other non-binary\n"
"environments.\n"
"\n"
"This method may raise a MemoryError.");
#define _HMAC_HMAC_HEXDIGEST_METHODDEF \
{"hexdigest", (PyCFunction)_hmac_HMAC_hexdigest, METH_NOARGS, _hmac_HMAC_hexdigest__doc__},
static PyObject *
_hmac_HMAC_hexdigest_impl(HMACObject *self);
static PyObject *
_hmac_HMAC_hexdigest(PyObject *self, PyObject *Py_UNUSED(ignored))
{
return _hmac_HMAC_hexdigest_impl((HMACObject *)self);
}
#if !defined(_hmac_HMAC_name_DOCSTR)
# define _hmac_HMAC_name_DOCSTR NULL
#endif
#if defined(_HMAC_HMAC_NAME_GETSETDEF)
# undef _HMAC_HMAC_NAME_GETSETDEF
# define _HMAC_HMAC_NAME_GETSETDEF {"name", (getter)_hmac_HMAC_name_get, (setter)_hmac_HMAC_name_set, _hmac_HMAC_name_DOCSTR},
#else
# define _HMAC_HMAC_NAME_GETSETDEF {"name", (getter)_hmac_HMAC_name_get, NULL, _hmac_HMAC_name_DOCSTR},
#endif
static PyObject *
_hmac_HMAC_name_get_impl(HMACObject *self);
static PyObject *
_hmac_HMAC_name_get(PyObject *self, void *Py_UNUSED(context))
{
return _hmac_HMAC_name_get_impl((HMACObject *)self);
}
#if !defined(_hmac_HMAC_block_size_DOCSTR)
# define _hmac_HMAC_block_size_DOCSTR NULL
#endif
#if defined(_HMAC_HMAC_BLOCK_SIZE_GETSETDEF)
# undef _HMAC_HMAC_BLOCK_SIZE_GETSETDEF
# define _HMAC_HMAC_BLOCK_SIZE_GETSETDEF {"block_size", (getter)_hmac_HMAC_block_size_get, (setter)_hmac_HMAC_block_size_set, _hmac_HMAC_block_size_DOCSTR},
#else
# define _HMAC_HMAC_BLOCK_SIZE_GETSETDEF {"block_size", (getter)_hmac_HMAC_block_size_get, NULL, _hmac_HMAC_block_size_DOCSTR},
#endif
static PyObject *
_hmac_HMAC_block_size_get_impl(HMACObject *self);
static PyObject *
_hmac_HMAC_block_size_get(PyObject *self, void *Py_UNUSED(context))
{
return _hmac_HMAC_block_size_get_impl((HMACObject *)self);
}
#if !defined(_hmac_HMAC_digest_size_DOCSTR)
# define _hmac_HMAC_digest_size_DOCSTR NULL
#endif
#if defined(_HMAC_HMAC_DIGEST_SIZE_GETSETDEF)
# undef _HMAC_HMAC_DIGEST_SIZE_GETSETDEF
# define _HMAC_HMAC_DIGEST_SIZE_GETSETDEF {"digest_size", (getter)_hmac_HMAC_digest_size_get, (setter)_hmac_HMAC_digest_size_set, _hmac_HMAC_digest_size_DOCSTR},
#else
# define _HMAC_HMAC_DIGEST_SIZE_GETSETDEF {"digest_size", (getter)_hmac_HMAC_digest_size_get, NULL, _hmac_HMAC_digest_size_DOCSTR},
#endif
static PyObject *
_hmac_HMAC_digest_size_get_impl(HMACObject *self);
static PyObject *
_hmac_HMAC_digest_size_get(PyObject *self, void *Py_UNUSED(context))
{
return _hmac_HMAC_digest_size_get_impl((HMACObject *)self);
}
PyDoc_STRVAR(_hmac_compute_digest__doc__,
"compute_digest($module, /, key, msg, digest)\n"
"--\n"
"\n");
#define _HMAC_COMPUTE_DIGEST_METHODDEF \
{"compute_digest", _PyCFunction_CAST(_hmac_compute_digest), METH_FASTCALL|METH_KEYWORDS, _hmac_compute_digest__doc__},
static PyObject *
_hmac_compute_digest_impl(PyObject *module, PyObject *key, PyObject *msg,
PyObject *digest);
static PyObject *
_hmac_compute_digest(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames)
{
PyObject *return_value = NULL;
#if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE)
#define NUM_KEYWORDS 3
static struct {
PyGC_Head _this_is_not_used;
PyObject_VAR_HEAD
Py_hash_t ob_hash;
PyObject *ob_item[NUM_KEYWORDS];
} _kwtuple = {
.ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS)
.ob_hash = -1,
.ob_item = { &_Py_ID(key), &_Py_ID(msg), &_Py_ID(digest), },
};
#undef NUM_KEYWORDS
#define KWTUPLE (&_kwtuple.ob_base.ob_base)
#else // !Py_BUILD_CORE
# define KWTUPLE NULL
#endif // !Py_BUILD_CORE
static const char * const _keywords[] = {"key", "msg", "digest", NULL};
static _PyArg_Parser _parser = {
.keywords = _keywords,
.fname = "compute_digest",
.kwtuple = KWTUPLE,
};
#undef KWTUPLE
PyObject *argsbuf[3];
PyObject *key;
PyObject *msg;
PyObject *digest;
args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser,
/*minpos*/ 3, /*maxpos*/ 3, /*minkw*/ 0, /*varpos*/ 0, argsbuf);
if (!args) {
goto exit;
}
key = args[0];
msg = args[1];
digest = args[2];
return_value = _hmac_compute_digest_impl(module, key, msg, digest);
exit:
return return_value;
}
PyDoc_STRVAR(_hmac_compute_md5__doc__,
"compute_md5($module, key, msg, /)\n"
"--\n"
"\n");
#define _HMAC_COMPUTE_MD5_METHODDEF \
{"compute_md5", _PyCFunction_CAST(_hmac_compute_md5), METH_FASTCALL, _hmac_compute_md5__doc__},
static PyObject *
_hmac_compute_md5_impl(PyObject *module, PyObject *key, PyObject *msg);
static PyObject *
_hmac_compute_md5(PyObject *module, PyObject *const *args, Py_ssize_t nargs)
{
PyObject *return_value = NULL;
PyObject *key;
PyObject *msg;
if (!_PyArg_CheckPositional("compute_md5", nargs, 2, 2)) {
goto exit;
}
key = args[0];
msg = args[1];
return_value = _hmac_compute_md5_impl(module, key, msg);
exit:
return return_value;
}
PyDoc_STRVAR(_hmac_compute_sha1__doc__,
"compute_sha1($module, key, msg, /)\n"
"--\n"
"\n");
#define _HMAC_COMPUTE_SHA1_METHODDEF \
{"compute_sha1", _PyCFunction_CAST(_hmac_compute_sha1), METH_FASTCALL, _hmac_compute_sha1__doc__},
static PyObject *
_hmac_compute_sha1_impl(PyObject *module, PyObject *key, PyObject *msg);
static PyObject *
_hmac_compute_sha1(PyObject *module, PyObject *const *args, Py_ssize_t nargs)
{
PyObject *return_value = NULL;
PyObject *key;
PyObject *msg;
if (!_PyArg_CheckPositional("compute_sha1", nargs, 2, 2)) {
goto exit;
}
key = args[0];
msg = args[1];
return_value = _hmac_compute_sha1_impl(module, key, msg);
exit:
return return_value;
}
PyDoc_STRVAR(_hmac_compute_sha2_224__doc__,
"compute_sha224($module, key, msg, /)\n"
"--\n"
"\n");
#define _HMAC_COMPUTE_SHA2_224_METHODDEF \
{"compute_sha224", _PyCFunction_CAST(_hmac_compute_sha2_224), METH_FASTCALL, _hmac_compute_sha2_224__doc__},
static PyObject *
_hmac_compute_sha2_224_impl(PyObject *module, PyObject *key, PyObject *msg);
static PyObject *
_hmac_compute_sha2_224(PyObject *module, PyObject *const *args, Py_ssize_t nargs)
{
PyObject *return_value = NULL;
PyObject *key;
PyObject *msg;
if (!_PyArg_CheckPositional("compute_sha224", nargs, 2, 2)) {
goto exit;
}
key = args[0];
msg = args[1];
return_value = _hmac_compute_sha2_224_impl(module, key, msg);
exit:
return return_value;
}
PyDoc_STRVAR(_hmac_compute_sha2_256__doc__,
"compute_sha256($module, key, msg, /)\n"
"--\n"
"\n");
#define _HMAC_COMPUTE_SHA2_256_METHODDEF \
{"compute_sha256", _PyCFunction_CAST(_hmac_compute_sha2_256), METH_FASTCALL, _hmac_compute_sha2_256__doc__},
static PyObject *
_hmac_compute_sha2_256_impl(PyObject *module, PyObject *key, PyObject *msg);
static PyObject *
_hmac_compute_sha2_256(PyObject *module, PyObject *const *args, Py_ssize_t nargs)
{
PyObject *return_value = NULL;
PyObject *key;
PyObject *msg;
if (!_PyArg_CheckPositional("compute_sha256", nargs, 2, 2)) {
goto exit;
}
key = args[0];
msg = args[1];
return_value = _hmac_compute_sha2_256_impl(module, key, msg);
exit:
return return_value;
}
PyDoc_STRVAR(_hmac_compute_sha2_384__doc__,
"compute_sha384($module, key, msg, /)\n"
"--\n"
"\n");
#define _HMAC_COMPUTE_SHA2_384_METHODDEF \
{"compute_sha384", _PyCFunction_CAST(_hmac_compute_sha2_384), METH_FASTCALL, _hmac_compute_sha2_384__doc__},
static PyObject *
_hmac_compute_sha2_384_impl(PyObject *module, PyObject *key, PyObject *msg);
static PyObject *
_hmac_compute_sha2_384(PyObject *module, PyObject *const *args, Py_ssize_t nargs)
{
PyObject *return_value = NULL;
PyObject *key;
PyObject *msg;
if (!_PyArg_CheckPositional("compute_sha384", nargs, 2, 2)) {
goto exit;
}
key = args[0];
msg = args[1];
return_value = _hmac_compute_sha2_384_impl(module, key, msg);
exit:
return return_value;
}
PyDoc_STRVAR(_hmac_compute_sha2_512__doc__,
"compute_sha512($module, key, msg, /)\n"
"--\n"
"\n");
#define _HMAC_COMPUTE_SHA2_512_METHODDEF \
{"compute_sha512", _PyCFunction_CAST(_hmac_compute_sha2_512), METH_FASTCALL, _hmac_compute_sha2_512__doc__},
static PyObject *
_hmac_compute_sha2_512_impl(PyObject *module, PyObject *key, PyObject *msg);
static PyObject *
_hmac_compute_sha2_512(PyObject *module, PyObject *const *args, Py_ssize_t nargs)
{
PyObject *return_value = NULL;
PyObject *key;
PyObject *msg;
if (!_PyArg_CheckPositional("compute_sha512", nargs, 2, 2)) {
goto exit;
}
key = args[0];
msg = args[1];
return_value = _hmac_compute_sha2_512_impl(module, key, msg);
exit:
return return_value;
}
PyDoc_STRVAR(_hmac_compute_sha3_224__doc__,
"compute_sha3_224($module, key, msg, /)\n"
"--\n"
"\n");
#define _HMAC_COMPUTE_SHA3_224_METHODDEF \
{"compute_sha3_224", _PyCFunction_CAST(_hmac_compute_sha3_224), METH_FASTCALL, _hmac_compute_sha3_224__doc__},
static PyObject *
_hmac_compute_sha3_224_impl(PyObject *module, PyObject *key, PyObject *msg);
static PyObject *
_hmac_compute_sha3_224(PyObject *module, PyObject *const *args, Py_ssize_t nargs)
{
PyObject *return_value = NULL;
PyObject *key;
PyObject *msg;
if (!_PyArg_CheckPositional("compute_sha3_224", nargs, 2, 2)) {
goto exit;
}
key = args[0];
msg = args[1];
return_value = _hmac_compute_sha3_224_impl(module, key, msg);
exit:
return return_value;
}
PyDoc_STRVAR(_hmac_compute_sha3_256__doc__,
"compute_sha3_256($module, key, msg, /)\n"
"--\n"
"\n");
#define _HMAC_COMPUTE_SHA3_256_METHODDEF \
{"compute_sha3_256", _PyCFunction_CAST(_hmac_compute_sha3_256), METH_FASTCALL, _hmac_compute_sha3_256__doc__},
static PyObject *
_hmac_compute_sha3_256_impl(PyObject *module, PyObject *key, PyObject *msg);
static PyObject *
_hmac_compute_sha3_256(PyObject *module, PyObject *const *args, Py_ssize_t nargs)
{
PyObject *return_value = NULL;
PyObject *key;
PyObject *msg;
if (!_PyArg_CheckPositional("compute_sha3_256", nargs, 2, 2)) {
goto exit;
}
key = args[0];
msg = args[1];
return_value = _hmac_compute_sha3_256_impl(module, key, msg);
exit:
return return_value;
}
PyDoc_STRVAR(_hmac_compute_sha3_384__doc__,
"compute_sha3_384($module, key, msg, /)\n"
"--\n"
"\n");
#define _HMAC_COMPUTE_SHA3_384_METHODDEF \
{"compute_sha3_384", _PyCFunction_CAST(_hmac_compute_sha3_384), METH_FASTCALL, _hmac_compute_sha3_384__doc__},
static PyObject *
_hmac_compute_sha3_384_impl(PyObject *module, PyObject *key, PyObject *msg);
static PyObject *
_hmac_compute_sha3_384(PyObject *module, PyObject *const *args, Py_ssize_t nargs)
{
PyObject *return_value = NULL;
PyObject *key;
PyObject *msg;
if (!_PyArg_CheckPositional("compute_sha3_384", nargs, 2, 2)) {
goto exit;
}
key = args[0];
msg = args[1];
return_value = _hmac_compute_sha3_384_impl(module, key, msg);
exit:
return return_value;
}
PyDoc_STRVAR(_hmac_compute_sha3_512__doc__,
"compute_sha3_512($module, key, msg, /)\n"
"--\n"
"\n");
#define _HMAC_COMPUTE_SHA3_512_METHODDEF \
{"compute_sha3_512", _PyCFunction_CAST(_hmac_compute_sha3_512), METH_FASTCALL, _hmac_compute_sha3_512__doc__},
static PyObject *
_hmac_compute_sha3_512_impl(PyObject *module, PyObject *key, PyObject *msg);
static PyObject *
_hmac_compute_sha3_512(PyObject *module, PyObject *const *args, Py_ssize_t nargs)
{
PyObject *return_value = NULL;
PyObject *key;
PyObject *msg;
if (!_PyArg_CheckPositional("compute_sha3_512", nargs, 2, 2)) {
goto exit;
}
key = args[0];
msg = args[1];
return_value = _hmac_compute_sha3_512_impl(module, key, msg);
exit:
return return_value;
}
PyDoc_STRVAR(_hmac_compute_blake2s_32__doc__,
"compute_blake2s_32($module, key, msg, /)\n"
"--\n"
"\n");
#define _HMAC_COMPUTE_BLAKE2S_32_METHODDEF \
{"compute_blake2s_32", _PyCFunction_CAST(_hmac_compute_blake2s_32), METH_FASTCALL, _hmac_compute_blake2s_32__doc__},
static PyObject *
_hmac_compute_blake2s_32_impl(PyObject *module, PyObject *key, PyObject *msg);
static PyObject *
_hmac_compute_blake2s_32(PyObject *module, PyObject *const *args, Py_ssize_t nargs)
{
PyObject *return_value = NULL;
PyObject *key;
PyObject *msg;
if (!_PyArg_CheckPositional("compute_blake2s_32", nargs, 2, 2)) {
goto exit;
}
key = args[0];
msg = args[1];
return_value = _hmac_compute_blake2s_32_impl(module, key, msg);
exit:
return return_value;
}
PyDoc_STRVAR(_hmac_compute_blake2b_32__doc__,
"compute_blake2b_32($module, key, msg, /)\n"
"--\n"
"\n");
#define _HMAC_COMPUTE_BLAKE2B_32_METHODDEF \
{"compute_blake2b_32", _PyCFunction_CAST(_hmac_compute_blake2b_32), METH_FASTCALL, _hmac_compute_blake2b_32__doc__},
static PyObject *
_hmac_compute_blake2b_32_impl(PyObject *module, PyObject *key, PyObject *msg);
static PyObject *
_hmac_compute_blake2b_32(PyObject *module, PyObject *const *args, Py_ssize_t nargs)
{
PyObject *return_value = NULL;
PyObject *key;
PyObject *msg;
if (!_PyArg_CheckPositional("compute_blake2b_32", nargs, 2, 2)) {
goto exit;
}
key = args[0];
msg = args[1];
return_value = _hmac_compute_blake2b_32_impl(module, key, msg);
exit:
return return_value;
}
/*[clinic end generated code: output=30c0614482d963f5 input=a9049054013a1b77]*/
|