diff --git a/src/pycryptopp/cipher/aesmodule.cpp b/src/pycryptopp/cipher/aesmodule.cpp index 360827d..3d0b95a 100644 --- a/src/pycryptopp/cipher/aesmodule.cpp +++ b/src/pycryptopp/cipher/aesmodule.cpp @@ -20,6 +20,9 @@ typedef int Py_ssize_t; #include #endif +// https://github.com/weidai11/cryptopp/issues/442 +typedef unsigned char byte; + static const char*const aes___doc__ = "_aes counter mode cipher\n\ You are advised to run aes.start_up_self_test() after importing this module."; diff --git a/src/pycryptopp/cipher/xsalsa20module.cpp b/src/pycryptopp/cipher/xsalsa20module.cpp index ab29787..a0b7c71 100644 --- a/src/pycryptopp/cipher/xsalsa20module.cpp +++ b/src/pycryptopp/cipher/xsalsa20module.cpp @@ -16,6 +16,9 @@ typedef int Py_ssize_t; #include #endif +// https://github.com/weidai11/cryptopp/issues/442 +typedef unsigned char byte; + static const char* const xsalsa20__doc__ = "_xsalsa20 cipher"; static PyObject *xsalsa20_error; diff --git a/src/pycryptopp/hash/sha256module.cpp b/src/pycryptopp/hash/sha256module.cpp index bf9d8e3..8272e6c 100644 --- a/src/pycryptopp/hash/sha256module.cpp +++ b/src/pycryptopp/hash/sha256module.cpp @@ -21,6 +21,9 @@ typedef int Py_ssize_t; #include #endif +// https://github.com/weidai11/cryptopp/issues/442 +typedef unsigned char byte; + static const char*const sha256___doc__ = "_sha256 hash function"; static PyObject *sha256_error;