Make AuthenticatedSymmetricCipher::AlgorithmName non-pure

Also see https://stackoverflow.com/q/49658309/608639
pull/640/head
Jeffrey Walton 2018-04-05 20:34:08 -04:00
parent 5aec2a4ab0
commit 62a9574f3f
No known key found for this signature in database
GPG Key ID: B36AB348921B1838
3 changed files with 9 additions and 3 deletions

View File

@ -60,8 +60,8 @@ LD = link.exe
AR = lib.exe AR = lib.exe
RM = del.exe RM = del.exe
# C4231 and C4505 are needed for VS2008 and below. Lots of noise... # C4231 is needed for VS2008 and below. Lots of noise...
CXXFLAGS = /nologo /W4 /wd4231 /wd4505 /wd4511 /wd4156 /D_MBCS /Zi /TP /GR /EHsc CXXFLAGS = /nologo /W4 /wd4231 /wd4511 /wd4156 /D_MBCS /Zi /TP /GR /EHsc
LDFLAGS = /nologo /SUBSYSTEM:CONSOLE LDFLAGS = /nologo /SUBSYSTEM:CONSOLE
ARFLAGS = /nologo ARFLAGS = /nologo
LDLIBS = LDLIBS =

View File

@ -268,6 +268,12 @@ bool AuthenticatedSymmetricCipher::DecryptAndVerify(byte *message, const byte *m
return TruncatedVerify(mac, macLength); return TruncatedVerify(mac, macLength);
} }
std::string AuthenticatedSymmetricCipher::AlgorithmName() const
{
// Squash C4505 on Visual Studio 2008 and friends
return "Unknown";
}
unsigned int RandomNumberGenerator::GenerateBit() unsigned int RandomNumberGenerator::GenerateBit()
{ {
return GenerateByte() & 1; return GenerateByte() & 1;

View File

@ -1313,7 +1313,7 @@ public:
/// \details The standard algorithm name can be a name like \a AES or \a AES/GCM. Some algorithms /// \details The standard algorithm name can be a name like \a AES or \a AES/GCM. Some algorithms
/// do not have standard names yet. For example, there is no standard algorithm name for /// do not have standard names yet. For example, there is no standard algorithm name for
/// Shoup's ECIES. /// Shoup's ECIES.
virtual std::string AlgorithmName() const =0; virtual std::string AlgorithmName() const;
protected: protected:
const Algorithm & GetAlgorithm() const const Algorithm & GetAlgorithm() const