mirror of
https://github.com/shadps4-emu/ext-cryptopp.git
synced 2025-02-15 10:58:09 +00:00
Merge branch 'master' into hmqv
This commit is contained in:
commit
7637e613d9
16
config.h
16
config.h
@ -779,7 +779,7 @@ NAMESPACE_END
|
||||
// atomics: MS at VS2012 (17.00); GCC at 4.4; Clang at 3.1/3.2; Intel 13.0; SunCC 12.5.
|
||||
#if (CRYPTOPP_MSC_VERSION >= 1700)
|
||||
# define CRYPTOPP_CXX11_ATOMICS 1
|
||||
#elif defined(__INTEL_COMPILER) && (__INTEL_COMPILER >= 1300)
|
||||
#elif (__INTEL_COMPILER >= 1300)
|
||||
# define CRYPTOPP_CXX11_ATOMICS 1
|
||||
#elif defined(__clang__)
|
||||
# if __has_feature(cxx_atomic)
|
||||
@ -795,7 +795,7 @@ NAMESPACE_END
|
||||
// TODO: verify Clang and Intel versions; find __has_feature(x) extension for Clang
|
||||
#if (CRYPTOPP_MSC_VERSION >= 1700)
|
||||
# define CRYPTOPP_CXX11_SYNCHRONIZATION 1
|
||||
#elif defined(__INTEL_COMPILER) && (__INTEL_COMPILER >= 1200)
|
||||
#elif (__INTEL_COMPILER >= 1200)
|
||||
# define CRYPTOPP_CXX11_SYNCHRONIZATION 1
|
||||
#elif (CRYPTOPP_LLVM_CLANG_VERSION >= 30300) || (CRYPTOPP_APPLE_CLANG_VERSION >= 50000)
|
||||
# define CRYPTOPP_CXX11_SYNCHRONIZATION 1
|
||||
@ -809,7 +809,7 @@ NAMESPACE_END
|
||||
#if (CRYPTOPP_MSC_VERSION >= 1900)
|
||||
# define CRYPTOPP_CXX11_ALIGNAS 1
|
||||
# define CRYPTOPP_CXX11_ALIGNOF 1
|
||||
#elif defined(__INTEL_COMPILER) && (__INTEL_COMPILER >= 1500)
|
||||
#elif (__INTEL_COMPILER >= 1500)
|
||||
# define CRYPTOPP_CXX11_ALIGNAS 1
|
||||
# define CRYPTOPP_CXX11_ALIGNOF 1
|
||||
#elif defined(__clang__)
|
||||
@ -830,7 +830,7 @@ NAMESPACE_END
|
||||
// noexcept: MS at VS2015 (19.00); GCC at 4.6; Clang at 3.0; Intel 14.0; SunCC 12.4.
|
||||
#if (CRYPTOPP_MSC_VERSION >= 1900)
|
||||
# define CRYPTOPP_CXX11_NOEXCEPT 1
|
||||
#elif defined(__INTEL_COMPILER) && (__INTEL_COMPILER >= 1400)
|
||||
#elif (__INTEL_COMPILER >= 1400)
|
||||
# define CRYPTOPP_CXX11_NOEXCEPT 1
|
||||
#elif defined(__clang__)
|
||||
# if __has_feature(cxx_noexcept)
|
||||
@ -845,7 +845,7 @@ NAMESPACE_END
|
||||
// variadic templates: MS at VS2013 (18.00); GCC at 4.3; Clang at 2.9; Intel 12.1; SunCC 12.4.
|
||||
#if (CRYPTOPP_MSC_VERSION >= 1800)
|
||||
# define CRYPTOPP_CXX11_VARIADIC_TEMPLATES 1
|
||||
#elif defined(__INTEL_COMPILER) && (__INTEL_COMPILER >= 1210)
|
||||
#elif (__INTEL_COMPILER >= 1210)
|
||||
# define CRYPTOPP_CXX11_VARIADIC_TEMPLATES 1
|
||||
#elif defined(__clang__)
|
||||
# if __has_feature(cxx_variadic_templates)
|
||||
@ -862,12 +862,6 @@ NAMESPACE_END
|
||||
|
||||
#endif // CRYPTOPP_CXX11
|
||||
|
||||
// Hack... CRYPTOPP_ALIGN_DATA is defined earlier, before C++11 alignas available
|
||||
#if defined(CRYPTOPP_CXX11_ALIGNAS)
|
||||
# undef CRYPTOPP_ALIGN_DATA
|
||||
# define CRYPTOPP_ALIGN_DATA(x) alignas(x)
|
||||
#endif // CRYPTOPP_CXX11_ALIGNAS
|
||||
|
||||
#if defined(CRYPTOPP_CXX11_NOEXCEPT)
|
||||
# define CRYPTOPP_THROW noexcept(false)
|
||||
# define CRYPTOPP_NO_THROW noexcept(true)
|
||||
|
@ -405,6 +405,8 @@ NAMESPACE_END
|
||||
# pragma GCC diagnostic ignored "-Wunused-function"
|
||||
#endif
|
||||
|
||||
// You may need to force include a C++ header on Android when using STLPort to ensure
|
||||
// _STLPORT_VERSION is defined: CXXFLAGS="-DNDEBUG -g2 -O2 -std=c++11 -include iosfwd"
|
||||
// TODO: Figure out C++17 and lack of std::uncaught_exception
|
||||
#if (defined(_MSC_VER) && _MSC_VER <= 1300) || defined(__MWERKS__) || (defined(_STLPORT_VERSION) && ((_STLPORT_VERSION < 0x450) || defined(_STLP_NO_UNCAUGHT_EXCEPT_SUPPORT)))
|
||||
#define CRYPTOPP_DISABLE_UNCAUGHT_EXCEPTION
|
||||
@ -777,7 +779,7 @@ NAMESPACE_END
|
||||
// atomics: MS at VS2012 (17.00); GCC at 4.4; Clang at 3.1/3.2; Intel 13.0; SunCC 12.5.
|
||||
#if (CRYPTOPP_MSC_VERSION >= 1700)
|
||||
# define CRYPTOPP_CXX11_ATOMICS 1
|
||||
#elif defined(__INTEL_COMPILER) && (__INTEL_COMPILER >= 1300)
|
||||
#elif (__INTEL_COMPILER >= 1300)
|
||||
# define CRYPTOPP_CXX11_ATOMICS 1
|
||||
#elif defined(__clang__)
|
||||
# if __has_feature(cxx_atomic)
|
||||
@ -793,7 +795,7 @@ NAMESPACE_END
|
||||
// TODO: verify Clang and Intel versions; find __has_feature(x) extension for Clang
|
||||
#if (CRYPTOPP_MSC_VERSION >= 1700)
|
||||
# define CRYPTOPP_CXX11_SYNCHRONIZATION 1
|
||||
#elif defined(__INTEL_COMPILER) && (__INTEL_COMPILER >= 1200)
|
||||
#elif (__INTEL_COMPILER >= 1200)
|
||||
# define CRYPTOPP_CXX11_SYNCHRONIZATION 1
|
||||
#elif (CRYPTOPP_LLVM_CLANG_VERSION >= 30300) || (CRYPTOPP_APPLE_CLANG_VERSION >= 50000)
|
||||
# define CRYPTOPP_CXX11_SYNCHRONIZATION 1
|
||||
@ -807,7 +809,7 @@ NAMESPACE_END
|
||||
#if (CRYPTOPP_MSC_VERSION >= 1900)
|
||||
# define CRYPTOPP_CXX11_ALIGNAS 1
|
||||
# define CRYPTOPP_CXX11_ALIGNOF 1
|
||||
#elif defined(__INTEL_COMPILER) && (__INTEL_COMPILER >= 1500)
|
||||
#elif (__INTEL_COMPILER >= 1500)
|
||||
# define CRYPTOPP_CXX11_ALIGNAS 1
|
||||
# define CRYPTOPP_CXX11_ALIGNOF 1
|
||||
#elif defined(__clang__)
|
||||
@ -828,7 +830,7 @@ NAMESPACE_END
|
||||
// noexcept: MS at VS2015 (19.00); GCC at 4.6; Clang at 3.0; Intel 14.0; SunCC 12.4.
|
||||
#if (CRYPTOPP_MSC_VERSION >= 1900)
|
||||
# define CRYPTOPP_CXX11_NOEXCEPT 1
|
||||
#elif defined(__INTEL_COMPILER) && (__INTEL_COMPILER >= 1400)
|
||||
#elif (__INTEL_COMPILER >= 1400)
|
||||
# define CRYPTOPP_CXX11_NOEXCEPT 1
|
||||
#elif defined(__clang__)
|
||||
# if __has_feature(cxx_noexcept)
|
||||
@ -843,7 +845,7 @@ NAMESPACE_END
|
||||
// variadic templates: MS at VS2013 (18.00); GCC at 4.3; Clang at 2.9; Intel 12.1; SunCC 12.4.
|
||||
#if (CRYPTOPP_MSC_VERSION >= 1800)
|
||||
# define CRYPTOPP_CXX11_VARIADIC_TEMPLATES 1
|
||||
#elif defined(__INTEL_COMPILER) && (__INTEL_COMPILER >= 1210)
|
||||
#elif (__INTEL_COMPILER >= 1210)
|
||||
# define CRYPTOPP_CXX11_VARIADIC_TEMPLATES 1
|
||||
#elif defined(__clang__)
|
||||
# if __has_feature(cxx_variadic_templates)
|
||||
@ -860,12 +862,6 @@ NAMESPACE_END
|
||||
|
||||
#endif // CRYPTOPP_CXX11
|
||||
|
||||
// Hack... CRYPTOPP_ALIGN_DATA is defined earlier, before C++11 alignas available
|
||||
#if defined(CRYPTOPP_CXX11_ALIGNAS)
|
||||
# undef CRYPTOPP_ALIGN_DATA
|
||||
# define CRYPTOPP_ALIGN_DATA(x) alignas(x)
|
||||
#endif // CRYPTOPP_CXX11_ALIGNAS
|
||||
|
||||
#if defined(CRYPTOPP_CXX11_NOEXCEPT)
|
||||
# define CRYPTOPP_THROW noexcept(false)
|
||||
# define CRYPTOPP_NO_THROW noexcept(true)
|
||||
|
36
default.h
36
default.h
@ -48,13 +48,7 @@ private:
|
||||
SecByteBlock m_passphrase;
|
||||
CBC_Mode<DefaultBlockCipher>::Encryption m_cipher;
|
||||
|
||||
#if (CRYPTOPP_GCC_VERSION >= 40500) || (CRYPTOPP_LLVM_CLANG_VERSION >= 20800)
|
||||
} __attribute__((deprecated ("DefaultEncryptor will be changing in the near future because the algorithms are no longer secure")));
|
||||
#elif (CRYPTOPP_GCC_VERSION)
|
||||
} __attribute__((deprecated));
|
||||
#else
|
||||
};
|
||||
#endif
|
||||
} CRYPTOPP_DEPRECATED ("DefaultEncryptor will be changing in the near future because the algorithms are no longer secure");
|
||||
|
||||
//! \class DefaultDecryptor
|
||||
//! \brief Password-Based Decryptor using TripleDES
|
||||
@ -101,13 +95,7 @@ private:
|
||||
member_ptr<FilterWithBufferedInput> m_decryptor;
|
||||
bool m_throwException;
|
||||
|
||||
#if (CRYPTOPP_GCC_VERSION >= 40500) || (CRYPTOPP_LLVM_CLANG_VERSION >= 20800)
|
||||
} __attribute__((deprecated ("DefaultDecryptor will be changing in the near future because the algorithms are no longer secure")));
|
||||
#elif (CRYPTOPP_GCC_VERSION)
|
||||
} __attribute__((deprecated));
|
||||
#else
|
||||
};
|
||||
#endif
|
||||
} CRYPTOPP_DEPRECATED ("DefaultDecryptor will be changing in the near future because the algorithms are no longer secure");
|
||||
|
||||
//! \class DefaultEncryptorWithMAC
|
||||
//! \brief Password-Based encryptor using TripleDES and HMAC/SHA-1
|
||||
@ -115,7 +103,7 @@ private:
|
||||
//! bits from the password. The class also uses 2-key TripleDES (DES_EDE2) for encryption, which only
|
||||
//! provides about 80-bits of security.
|
||||
//! \details The purpose of the function Mash() is to take an arbitrary length input string and
|
||||
//! *deterministicly* produce an arbitrary length output string such that (1) it looks random,
|
||||
//! *deterministically* produce an arbitrary length output string such that (1) it looks random,
|
||||
//! (2) no information about the input is deducible from it, and (3) it contains as much entropy
|
||||
//! as it can hold, or the amount of entropy in the input string, whichever is smaller.
|
||||
class DefaultEncryptorWithMAC : public ProxyFilter
|
||||
@ -139,13 +127,7 @@ protected:
|
||||
private:
|
||||
member_ptr<DefaultMAC> m_mac;
|
||||
|
||||
#if (CRYPTOPP_GCC_VERSION >= 40500) || (CRYPTOPP_LLVM_CLANG_VERSION >= 20800)
|
||||
} __attribute__((deprecated ("DefaultEncryptorWithMAC will be changing in the near future because the algorithms are no longer secure")));
|
||||
#elif (CRYPTOPP_GCC_VERSION)
|
||||
} __attribute__((deprecated));
|
||||
#else
|
||||
};
|
||||
#endif
|
||||
} CRYPTOPP_DEPRECATED ("DefaultEncryptorWithMAC will be changing in the near future because the algorithms are no longer secure");
|
||||
|
||||
//! \class DefaultDecryptorWithMAC
|
||||
//! \brief Password-Based decryptor using TripleDES and HMAC/SHA-1
|
||||
@ -153,7 +135,7 @@ private:
|
||||
//! bits from the password. The class also uses 2-key TripleDES (DES_EDE2) for encryption, which only
|
||||
//! provides about 80-bits of security.
|
||||
//! \details The purpose of the function Mash() is to take an arbitrary length input string and
|
||||
//! *deterministicly* produce an arbitrary length output string such that (1) it looks random,
|
||||
//! *deterministically* produce an arbitrary length output string such that (1) it looks random,
|
||||
//! (2) no information about the input is deducible from it, and (3) it contains as much entropy
|
||||
//! as it can hold, or the amount of entropy in the input string, whichever is smaller.
|
||||
class DefaultDecryptorWithMAC : public ProxyFilter
|
||||
@ -188,13 +170,7 @@ private:
|
||||
HashVerifier *m_hashVerifier;
|
||||
bool m_throwException;
|
||||
|
||||
#if (CRYPTOPP_GCC_VERSION >= 40500) || (CRYPTOPP_LLVM_CLANG_VERSION >= 20800)
|
||||
} __attribute__((deprecated ("DefaultDecryptorWithMAC will be changing in the near future because the algorithms are no longer secure")));
|
||||
#elif (CRYPTOPP_GCC_VERSION)
|
||||
} __attribute__((deprecated));
|
||||
#else
|
||||
};
|
||||
#endif
|
||||
} CRYPTOPP_DEPRECATED ("DefaultDecryptorWithMAC will be changing in the near future because the algorithms are no longer secure");
|
||||
|
||||
NAMESPACE_END
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user