libcryfs/src/cpp-utils/crypto/cryptopp_byte.h
Mouse 7abed14d63 Make compatible with the current Crypto++ master (#163)
* Make compatible with the current Crypto++ master

* Add auto-config and build script. Not important, just a time-saver.

* Address compatibility with Crypto++ 6.0 release, while maintaining compatibility
with the older Crypto++ releases.

* Polish comments in cryptopp_byte.h. Forgot to include it to RandomGeneratorThread - fixed.

* Late at night - forgot to fix the .cpp files that used ::byte...

* Renamed auto-config-and-run script

* Added comments/description, and commented out "make check" that fails anyway

* Changed the include guard to match the rest of the .h files

* Delete build script

* Update ChangeLog.txt

* Update ChangeLog.txt
2017-08-16 03:00:46 +01:00

19 lines
631 B
C++

#pragma once
#ifndef _CPPUTILS_CRYPTO_CRYPTOPP_BYTE_H
#define _CPPUTILS_CRYPTO_CRYPTOPP_BYTE_H
#include <cryptopp/cryptlib.h>
// If we're running an older CryptoPP version, CryptoPP::byte isn't defined yet.
// Define it. Refer to "byte" type in the global namespace (placed by CryptoPP).
// Could also use CRYPTOPP_NO_GLOBAL_BYTE - but don't want to track when it was
// introduced. This way seems more reliable, as it is compatible with more of
// the Crypto++ versions.
#if CRYPTOPP_VERSION < 600
namespace CryptoPP {
using byte = ::byte;
}
#endif /* CRYPTOPP_VERSION < 600 */
#endif /* _CPPUTILS_CRYPTO_CRYPTOPP_BYTE_H */