mirror of
https://github.com/shadps4-emu/ext-cryptopp.git
synced 2024-11-26 19:30:21 +00:00
fix C++Builder 2009 compile, update Readme and License
This commit is contained in:
parent
3961b41d8f
commit
eeb9ff5e0b
@ -1,4 +1,4 @@
|
||||
Compilation Copyright (c) 1995-2006 by Wei Dai. All rights reserved.
|
||||
Compilation Copyright (c) 1995-2009 by Wei Dai. All rights reserved.
|
||||
This copyright applies only to this software distribution package
|
||||
as a compilation, and does not imply a copyright on any particular
|
||||
file in the package.
|
||||
@ -18,9 +18,8 @@ Joan Daemen - 3way.cpp
|
||||
Leonard Janke - cast.cpp, seal.cpp
|
||||
Steve Reid - cast.cpp
|
||||
Phil Karn - des.cpp
|
||||
Michael Paul Johnson - diamond.cpp
|
||||
Andrew M. Kuchling - md2.cpp, md4.cpp
|
||||
Colin Plumb - md5.cpp, md5mac.cpp
|
||||
Colin Plumb - md5.cpp
|
||||
Seal Woods - rc6.cpp
|
||||
Chris Morgan - rijndael.cpp
|
||||
Paulo Baretto - rijndael.cpp, skipjack.cpp, square.cpp
|
||||
|
29
Readme.txt
29
Readme.txt
@ -1,24 +1,26 @@
|
||||
Crypto++: a C++ Class Library of Cryptographic Schemes
|
||||
Version 5.6 (in progress)
|
||||
Version 5.6.0 (3/15/2009)
|
||||
|
||||
Crypto++ Library is a free C++ class library of cryptographic schemes.
|
||||
Currently the library contains the following algorithms:
|
||||
|
||||
algorithm type name
|
||||
|
||||
high speed stream ciphers Panama, Salsa20, Sosemanuk
|
||||
authenticated encryption schemes GCM, CCM, EAX
|
||||
|
||||
high speed stream ciphers Panama, Sosemanuk, Salsa20, XSalsa20
|
||||
|
||||
AES and AES candidates AES (Rijndael), RC6, MARS, Twofish, Serpent,
|
||||
CAST-256
|
||||
|
||||
IDEA, Triple-DES (DES-EDE2 and DES-EDE3),
|
||||
other block ciphers Camellia, RC5, Blowfish, TEA, XTEA,
|
||||
Skipjack, SHACAL-2, SEED
|
||||
other block ciphers Camellia, SEED, RC5, Blowfish, TEA, XTEA,
|
||||
Skipjack, SHACAL-2
|
||||
|
||||
block cipher modes of operation ECB, CBC, CBC ciphertext stealing (CTS),
|
||||
CFB, OFB, counter mode (CTR), GCM, CCM
|
||||
CFB, OFB, counter mode (CTR)
|
||||
|
||||
message authentication codes VMAC, HMAC, GMAC, CBC-MAC, CMAC, DMAC,
|
||||
message authentication codes VMAC, HMAC, CMAC, CBC-MAC, DMAC,
|
||||
Two-Track-MAC
|
||||
|
||||
SHA-1, SHA-2 (SHA-224, SHA-256, SHA-384, and
|
||||
@ -79,6 +81,7 @@ http://www.cryptopp.com the most up to date build instructions and porting notes
|
||||
|
||||
* MSVC 6.0 - 2008
|
||||
* GCC 3.3 - 4.3
|
||||
* C++Builder 2009
|
||||
* Intel C++ Compiler 9 - 11
|
||||
* Sun Studio 12 (CC 5.9)
|
||||
|
||||
@ -408,19 +411,19 @@ the mailing list.
|
||||
- fixed link error with MSVC 2003 when using "debug DLL" form of runtime library
|
||||
- fixed crash in SSE2_Add on P4 machines when compiled with
|
||||
MSVC 6.0 SP5 with Processor Pack
|
||||
- added support for newly released compilers: MSVC 2008, GCC 4.2, Sun CC 5.9,
|
||||
Intel C++ Compiler 10.0, and Borland C++Builder 2007
|
||||
- ported to MSVC 2008, GCC 4.2, Sun CC 5.9, Intel C++ Compiler 10.0,
|
||||
and Borland C++Builder 2007
|
||||
|
||||
5.6 - added AuthenticatedSymmetricCipher interface class and Filter wrappers
|
||||
- added CCM, GCM (with SSE2 assembly), EAX, CMAC, XSalsa20, and SEED
|
||||
- added support for variable length IVs
|
||||
- improved AES and SHA-256 speed on x86 and x64
|
||||
- fixed run-time validation error on x86-64 with GCC 4.3.2 -O2
|
||||
- fixed HashFilter bug when putMessage=true
|
||||
- fixed warnings with GCC 4.3
|
||||
- fixed compiler error in vmac.cpp on x86 with GCC -fPIC
|
||||
- fixed incorrect VMAC computation on message lengths
|
||||
that are >64 mod 128 (x86 assembly version is not affected)
|
||||
- removed WORD64_AVAILABLE; compiler 64-bit int support is now required
|
||||
- fixed compiler error in vmac.cpp on x86 with GCC -fPIC
|
||||
- fixed run-time validation error on x86-64 with GCC 4.3.2 -O2
|
||||
- fixed HashFilter bug when putMessage=true
|
||||
- removed WORD64_AVAILABLE; compiler support for 64-bit int is now required
|
||||
- ported to GCC 4.3, C++Builder 2009, Sun CC 5.10, Intel C++ Compiler 11
|
||||
|
||||
Written by Wei Dai
|
||||
|
29
algparam.h
29
algparam.h
@ -335,12 +335,21 @@ class CRYPTOPP_DLL AlgorithmParameters : public NameValuePairs
|
||||
public:
|
||||
AlgorithmParameters();
|
||||
|
||||
AlgorithmParameters(const AlgorithmParameters &x);
|
||||
#ifdef __BORLANDC__
|
||||
template <class T>
|
||||
AlgorithmParameters(const char *name, const T &value, bool throwIfNotUsed=true)
|
||||
: m_next(new AlgorithmParametersTemplate<T>(name, value, throwIfNotUsed))
|
||||
, m_defaultThrowIfNotUsed(throwIfNotUsed)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
AlgorithmParameters & operator=(const AlgorithmParameters &x);
|
||||
AlgorithmParameters(const AlgorithmParameters &x);
|
||||
|
||||
template <class T>
|
||||
AlgorithmParameters & operator()(const char *name, const T &value, bool throwIfNotUsed)
|
||||
AlgorithmParameters & operator=(const AlgorithmParameters &x);
|
||||
|
||||
template <class T>
|
||||
AlgorithmParameters & operator()(const char *name, const T &value, bool throwIfNotUsed)
|
||||
{
|
||||
member_ptr<AlgorithmParametersBase> p(new AlgorithmParametersTemplate<T>(name, value, throwIfNotUsed));
|
||||
p->m_next.reset(m_next.release());
|
||||
@ -349,14 +358,14 @@ public:
|
||||
return *this;
|
||||
}
|
||||
|
||||
template <class T>
|
||||
AlgorithmParameters & operator()(const char *name, const T &value)
|
||||
template <class T>
|
||||
AlgorithmParameters & operator()(const char *name, const T &value)
|
||||
{
|
||||
return operator()(name, value, m_defaultThrowIfNotUsed);
|
||||
}
|
||||
|
||||
bool GetVoidValue(const char *name, const std::type_info &valueType, void *pValue) const;
|
||||
|
||||
bool GetVoidValue(const char *name, const std::type_info &valueType, void *pValue) const;
|
||||
|
||||
protected:
|
||||
member_ptr<AlgorithmParametersBase> m_next;
|
||||
bool m_defaultThrowIfNotUsed;
|
||||
@ -370,11 +379,15 @@ protected:
|
||||
repeatedly using operator() on the object returned by MakeParameters, for example:
|
||||
AlgorithmParameters parameters = MakeParameters(name1, value1)(name2, value2)(name3, value3);
|
||||
*/
|
||||
#ifdef __BORLANDC__
|
||||
typedef AlgorithmParameters MakeParameters;
|
||||
#else
|
||||
template <class T>
|
||||
AlgorithmParameters MakeParameters(const char *name, const T &value, bool throwIfNotUsed = true)
|
||||
{
|
||||
return AlgorithmParameters()(name, value, throwIfNotUsed);
|
||||
}
|
||||
#endif
|
||||
|
||||
#define CRYPTOPP_GET_FUNCTION_ENTRY(name) (Name::name(), &ThisClass::Get##name)
|
||||
#define CRYPTOPP_SET_FUNCTION_ENTRY(name) (Name::name(), &ThisClass::Set##name)
|
||||
|
@ -235,7 +235,7 @@
|
||||
<Debugging Name="DebugSourceDirs"></Debugging>
|
||||
</Debugging>
|
||||
<Parameters>
|
||||
<Parameters Name="RunParams">v 66</Parameters>
|
||||
<Parameters Name="RunParams">v</Parameters>
|
||||
<Parameters Name="Launcher"></Parameters>
|
||||
<Parameters Name="UseLauncher">True</Parameters>
|
||||
<Parameters Name="DebugCWD">.</Parameters>
|
||||
|
@ -195,7 +195,6 @@
|
||||
</project>
|
||||
<FILELIST>
|
||||
<FILE FILENAME="cryptlib_bds.cpp" CONTAINERID="CCompiler" LOCALCOMMAND="" UNITNAME="cryptlib_bds" FORMNAME="" DESIGNCLASS=""/>
|
||||
<FILE FILENAME="zlib.cpp" CONTAINERID="CCompiler" LOCALCOMMAND="" UNITNAME="zlib" FORMNAME="" DESIGNCLASS=""/>
|
||||
<FILE FILENAME="3way.cpp" CONTAINERID="CCompiler" LOCALCOMMAND="" UNITNAME="3way" FORMNAME="" DESIGNCLASS=""/>
|
||||
<FILE FILENAME="adhoc.cpp" CONTAINERID="CCompiler" LOCALCOMMAND="" UNITNAME="adhoc" FORMNAME="" DESIGNCLASS=""/>
|
||||
<FILE FILENAME="adler32.cpp" CONTAINERID="CCompiler" LOCALCOMMAND="" UNITNAME="adler32" FORMNAME="" DESIGNCLASS=""/>
|
||||
@ -203,6 +202,7 @@
|
||||
<FILE FILENAME="algparam.cpp" CONTAINERID="CCompiler" LOCALCOMMAND="" UNITNAME="algparam" FORMNAME="" DESIGNCLASS=""/>
|
||||
<FILE FILENAME="arc4.cpp" CONTAINERID="CCompiler" LOCALCOMMAND="" UNITNAME="arc4" FORMNAME="" DESIGNCLASS=""/>
|
||||
<FILE FILENAME="asn.cpp" CONTAINERID="CCompiler" LOCALCOMMAND="" UNITNAME="asn" FORMNAME="" DESIGNCLASS=""/>
|
||||
<FILE FILENAME="authenc.cpp" CONTAINERID="CCompiler" LOCALCOMMAND="" UNITNAME="authenc" FORMNAME="" DESIGNCLASS=""/>
|
||||
<FILE FILENAME="base32.cpp" CONTAINERID="CCompiler" LOCALCOMMAND="" UNITNAME="base32" FORMNAME="" DESIGNCLASS=""/>
|
||||
<FILE FILENAME="base64.cpp" CONTAINERID="CCompiler" LOCALCOMMAND="" UNITNAME="base64" FORMNAME="" DESIGNCLASS=""/>
|
||||
<FILE FILENAME="basecode.cpp" CONTAINERID="CCompiler" LOCALCOMMAND="" UNITNAME="basecode" FORMNAME="" DESIGNCLASS=""/>
|
||||
@ -213,7 +213,9 @@
|
||||
<FILE FILENAME="cast.cpp" CONTAINERID="CCompiler" LOCALCOMMAND="" UNITNAME="cast" FORMNAME="" DESIGNCLASS=""/>
|
||||
<FILE FILENAME="casts.cpp" CONTAINERID="CCompiler" LOCALCOMMAND="" UNITNAME="casts" FORMNAME="" DESIGNCLASS=""/>
|
||||
<FILE FILENAME="cbcmac.cpp" CONTAINERID="CCompiler" LOCALCOMMAND="" UNITNAME="cbcmac" FORMNAME="" DESIGNCLASS=""/>
|
||||
<FILE FILENAME="ccm.cpp" CONTAINERID="CCompiler" LOCALCOMMAND="" UNITNAME="ccm" FORMNAME="" DESIGNCLASS=""/>
|
||||
<FILE FILENAME="channels.cpp" CONTAINERID="CCompiler" LOCALCOMMAND="" UNITNAME="channels" FORMNAME="" DESIGNCLASS=""/>
|
||||
<FILE FILENAME="cmac.cpp" CONTAINERID="CCompiler" LOCALCOMMAND="" UNITNAME="cmac" FORMNAME="" DESIGNCLASS=""/>
|
||||
<FILE FILENAME="crc.cpp" CONTAINERID="CCompiler" LOCALCOMMAND="" UNITNAME="crc" FORMNAME="" DESIGNCLASS=""/>
|
||||
<FILE FILENAME="cryptlib.cpp" CONTAINERID="CCompiler" LOCALCOMMAND="" UNITNAME="cryptlib" FORMNAME="" DESIGNCLASS=""/>
|
||||
<FILE FILENAME="default.cpp" CONTAINERID="CCompiler" LOCALCOMMAND="" UNITNAME="default" FORMNAME="" DESIGNCLASS=""/>
|
||||
@ -223,6 +225,7 @@
|
||||
<FILE FILENAME="dh.cpp" CONTAINERID="CCompiler" LOCALCOMMAND="" UNITNAME="dh" FORMNAME="" DESIGNCLASS=""/>
|
||||
<FILE FILENAME="dll.cpp" CONTAINERID="CCompiler" LOCALCOMMAND="" UNITNAME="dll" FORMNAME="" DESIGNCLASS=""/>
|
||||
<FILE FILENAME="dsa.cpp" CONTAINERID="CCompiler" LOCALCOMMAND="" UNITNAME="dsa" FORMNAME="" DESIGNCLASS=""/>
|
||||
<FILE FILENAME="eax.cpp" CONTAINERID="CCompiler" LOCALCOMMAND="" UNITNAME="eax" FORMNAME="" DESIGNCLASS=""/>
|
||||
<FILE FILENAME="ec2n.cpp" CONTAINERID="CCompiler" LOCALCOMMAND="" UNITNAME="ec2n" FORMNAME="" DESIGNCLASS=""/>
|
||||
<FILE FILENAME="eccrypto.cpp" CONTAINERID="CCompiler" LOCALCOMMAND="" UNITNAME="eccrypto" FORMNAME="" DESIGNCLASS=""/>
|
||||
<FILE FILENAME="ecp.cpp" CONTAINERID="CCompiler" LOCALCOMMAND="" UNITNAME="ecp" FORMNAME="" DESIGNCLASS=""/>
|
||||
@ -234,6 +237,7 @@
|
||||
<FILE FILENAME="filters.cpp" CONTAINERID="CCompiler" LOCALCOMMAND="" UNITNAME="filters" FORMNAME="" DESIGNCLASS=""/>
|
||||
<FILE FILENAME="fips140.cpp" CONTAINERID="CCompiler" LOCALCOMMAND="" UNITNAME="fips140" FORMNAME="" DESIGNCLASS=""/>
|
||||
<FILE FILENAME="fipstest.cpp" CONTAINERID="CCompiler" LOCALCOMMAND="" UNITNAME="fipstest" FORMNAME="" DESIGNCLASS=""/>
|
||||
<FILE FILENAME="gcm.cpp" CONTAINERID="CCompiler" LOCALCOMMAND="" UNITNAME="gcm" FORMNAME="" DESIGNCLASS=""/>
|
||||
<FILE FILENAME="gf2_32.cpp" CONTAINERID="CCompiler" LOCALCOMMAND="" UNITNAME="gf2_32" FORMNAME="" DESIGNCLASS=""/>
|
||||
<FILE FILENAME="gf2n.cpp" CONTAINERID="CCompiler" LOCALCOMMAND="" UNITNAME="gf2n" FORMNAME="" DESIGNCLASS=""/>
|
||||
<FILE FILENAME="gf256.cpp" CONTAINERID="CCompiler" LOCALCOMMAND="" UNITNAME="gf256" FORMNAME="" DESIGNCLASS=""/>
|
||||
@ -279,6 +283,7 @@
|
||||
<FILE FILENAME="rw.cpp" CONTAINERID="CCompiler" LOCALCOMMAND="" UNITNAME="rw" FORMNAME="" DESIGNCLASS=""/>
|
||||
<FILE FILENAME="safer.cpp" CONTAINERID="CCompiler" LOCALCOMMAND="" UNITNAME="safer" FORMNAME="" DESIGNCLASS=""/>
|
||||
<FILE FILENAME="seal.cpp" CONTAINERID="CCompiler" LOCALCOMMAND="" UNITNAME="seal" FORMNAME="" DESIGNCLASS=""/>
|
||||
<FILE FILENAME="seed.cpp" CONTAINERID="CCompiler" LOCALCOMMAND="" UNITNAME="seed" FORMNAME="" DESIGNCLASS=""/>
|
||||
<FILE FILENAME="serpent.cpp" CONTAINERID="CCompiler" LOCALCOMMAND="" UNITNAME="serpent" FORMNAME="" DESIGNCLASS=""/>
|
||||
<FILE FILENAME="sha.cpp" CONTAINERID="CCompiler" LOCALCOMMAND="" UNITNAME="sha" FORMNAME="" DESIGNCLASS=""/>
|
||||
<FILE FILENAME="shacal2.cpp" CONTAINERID="CCompiler" LOCALCOMMAND="" UNITNAME="shacal2" FORMNAME="" DESIGNCLASS=""/>
|
||||
@ -310,6 +315,7 @@
|
||||
<FILE FILENAME="salsa.cpp" CONTAINERID="CCompiler" LOCALCOMMAND="" UNITNAME="salsa" FORMNAME="" DESIGNCLASS=""/>
|
||||
<FILE FILENAME="sosemanuk.cpp" CONTAINERID="CCompiler" LOCALCOMMAND="" UNITNAME="sosemanuk" FORMNAME="" DESIGNCLASS=""/>
|
||||
<FILE FILENAME="vmac.cpp" CONTAINERID="CCompiler" LOCALCOMMAND="" UNITNAME="vmac" FORMNAME="" DESIGNCLASS=""/>
|
||||
<FILE FILENAME="zlib.cpp" CONTAINERID="CCompiler" LOCALCOMMAND="" UNITNAME="zlib" FORMNAME="" DESIGNCLASS=""/>
|
||||
</FILELIST>
|
||||
<IDEOPTIONS>
|
||||
<VersionInfo>
|
||||
|
2
gf2n.h
2
gf2n.h
@ -357,11 +357,13 @@ CRYPTOPP_DLL GF2NP * CRYPTOPP_API BERDecodeGF2NP(BufferedTransformation &bt);
|
||||
|
||||
NAMESPACE_END
|
||||
|
||||
#ifndef __BORLANDC__
|
||||
NAMESPACE_BEGIN(std)
|
||||
template<> inline void swap(CryptoPP::PolynomialMod2 &a, CryptoPP::PolynomialMod2 &b)
|
||||
{
|
||||
a.swap(b);
|
||||
}
|
||||
NAMESPACE_END
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
@ -408,11 +408,13 @@ inline CryptoPP::word operator%(const CryptoPP::Integer &a, CryptoPP::word b)
|
||||
|
||||
NAMESPACE_END
|
||||
|
||||
#ifndef __BORLANDC__
|
||||
NAMESPACE_BEGIN(std)
|
||||
template<> inline void swap(CryptoPP::Integer &a, CryptoPP::Integer &b)
|
||||
inline void swap(CryptoPP::Integer &a, CryptoPP::Integer &b)
|
||||
{
|
||||
a.swap(b);
|
||||
}
|
||||
NAMESPACE_END
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
2
mqueue.h
2
mqueue.h
@ -88,11 +88,13 @@ private:
|
||||
|
||||
NAMESPACE_END
|
||||
|
||||
#ifndef __BORLANDC__
|
||||
NAMESPACE_BEGIN(std)
|
||||
template<> inline void swap(CryptoPP::MessageQueue &a, CryptoPP::MessageQueue &b)
|
||||
{
|
||||
a.swap(b);
|
||||
}
|
||||
NAMESPACE_END
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user