Files
cpython/Modules/_hashlib/hashlib_fetch.h
Bénédikt Tran 45138d3584 gh-131876: extract _hashlib helpers into a separate directory (#136995)
The `Modules/hashlib.h` helper file is now removed and split into multiple files:

* `Modules/_hashlib/hashlib_buffer.[ch]` -- Utilities for getting a buffer view and handling buffer inputs.
* `Modules/_hashlib/hashlib_fetch.h` -- Utilities used when fetching a message digest from a digest-like identifier.
  Currently, this file only contains common error messages as the fetching API is not yet implemented.
* `Modules/_hashlib/hashlib_mutex.h` -- Utilities for managing the lock on cryptographic hash objects.
2025-07-28 11:28:48 +02:00

20 lines
649 B
C

/*
* Utilities used when fetching a message digest from a digest-like identifier.
*/
#ifndef _HASHLIB_HASHLIB_FETCH_H
#define _HASHLIB_HASHLIB_FETCH_H
#include "Python.h"
/*
* Internal error messages used for reporting an unsupported hash algorithm.
* The algorithm can be given by its name, a callable or a PEP-247 module.
* The same message is raised by Lib/hashlib.py::__get_builtin_constructor()
* and _hmacmodule.c::find_hash_info().
*/
#define _Py_HASHLIB_UNSUPPORTED_ALGORITHM "unsupported hash algorithm %S"
#define _Py_HASHLIB_UNSUPPORTED_STR_ALGORITHM "unsupported hash algorithm %s"
#endif // !_HASHLIB_HASHLIB_FETCH_H