Cleared compile errors under Visual Studio .Net compilers
parent
c11d334665
commit
1ce593357f
|
|
@ -71,10 +71,10 @@ struct CRYPTOPP_NO_VTABLE BLAKE2_IV<true>
|
||||||
};
|
};
|
||||||
|
|
||||||
const word64 BLAKE2_IV<true>::iv[8] = {
|
const word64 BLAKE2_IV<true>::iv[8] = {
|
||||||
0x6a09e667f3bcc908ULL, 0xbb67ae8584caa73bULL,
|
W64LIT(0x6a09e667f3bcc908), W64LIT(0xbb67ae8584caa73b),
|
||||||
0x3c6ef372fe94f82bULL, 0xa54ff53a5f1d36f1ULL,
|
W64LIT(0x3c6ef372fe94f82b), W64LIT(0xa54ff53a5f1d36f1),
|
||||||
0x510e527fade682d1ULL, 0x9b05688c2b3e6c1fULL,
|
W64LIT(0x510e527fade682d1), W64LIT(0x9b05688c2b3e6c1f),
|
||||||
0x1f83d9abfb41bd6bULL, 0x5be0cd19137e2179ULL
|
W64LIT(0x1f83d9abfb41bd6b), W64LIT(0x5be0cd19137e2179)
|
||||||
};
|
};
|
||||||
|
|
||||||
// IV and Sigma are a better fit as part of BLAKE2_Base, but that
|
// IV and Sigma are a better fit as part of BLAKE2_Base, but that
|
||||||
|
|
|
||||||
2
ida.cpp
2
ida.cpp
|
|
@ -402,7 +402,7 @@ size_t PaddingRemover::Put2(const byte *begin, size_t length, int messageEnd, bo
|
||||||
#else
|
#else
|
||||||
typedef std::reverse_iterator<const byte *> RevIt;
|
typedef std::reverse_iterator<const byte *> RevIt;
|
||||||
#endif
|
#endif
|
||||||
const byte *x = std::find_if(RevIt(end), RevIt(begin), bind2nd(std::not_equal_to<byte>(), byte(0))).base();
|
const byte *x = std::find_if(RevIt(end), RevIt(begin), std::bind2nd(std::not_equal_to<byte>(), byte(0))).base();
|
||||||
if (x != begin && *(x-1) == 1)
|
if (x != begin && *(x-1) == 1)
|
||||||
{
|
{
|
||||||
AttachedTransformation()->Put(begin, x-begin-1);
|
AttachedTransformation()->Put(begin, x-begin-1);
|
||||||
|
|
|
||||||
|
|
@ -4468,7 +4468,7 @@ std::string IntToString<Integer>(Integer value, unsigned int base)
|
||||||
|
|
||||||
// Specialization declared in misc.h to avoid Coverity findings.
|
// Specialization declared in misc.h to avoid Coverity findings.
|
||||||
template <> CRYPTOPP_DLL
|
template <> CRYPTOPP_DLL
|
||||||
std::string IntToString<unsigned long long>(unsigned long long value, unsigned int base)
|
std::string IntToString<word64>(word64 value, unsigned int base)
|
||||||
{
|
{
|
||||||
// Hack... set the high bit for uppercase.
|
// Hack... set the high bit for uppercase.
|
||||||
static const unsigned int HIGH_BIT = (1U << 31);
|
static const unsigned int HIGH_BIT = (1U << 31);
|
||||||
|
|
@ -4482,7 +4482,7 @@ std::string IntToString<unsigned long long>(unsigned long long value, unsigned i
|
||||||
std::string result;
|
std::string result;
|
||||||
while (value > 0)
|
while (value > 0)
|
||||||
{
|
{
|
||||||
unsigned long long digit = value % base;
|
word64 digit = value % base;
|
||||||
result = char((digit < 10 ? '0' : (CH - 10)) + digit) + result;
|
result = char((digit < 10 ? '0' : (CH - 10)) + digit) + result;
|
||||||
value /= base;
|
value /= base;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
2
misc.h
2
misc.h
|
|
@ -497,7 +497,7 @@ std::string IntToString(T value, unsigned int base = 10)
|
||||||
//! \details this template function specialization was added to suppress
|
//! \details this template function specialization was added to suppress
|
||||||
//! Coverity findings on IntToString() with unsigned types.
|
//! Coverity findings on IntToString() with unsigned types.
|
||||||
template <> CRYPTOPP_DLL
|
template <> CRYPTOPP_DLL
|
||||||
std::string IntToString<unsigned long long>(unsigned long long value, unsigned int base);
|
std::string IntToString<word64>(word64 value, unsigned int base);
|
||||||
|
|
||||||
//! \brief Converts an Integer to a string
|
//! \brief Converts an Integer to a string
|
||||||
//! \param value the Integer to convert
|
//! \param value the Integer to convert
|
||||||
|
|
|
||||||
|
|
@ -663,9 +663,9 @@ void Deflator::EncodeBlock(bool eof, unsigned int blockType)
|
||||||
{
|
{
|
||||||
#if defined(_MSC_VER) && !defined(__MWERKS__) && (_MSC_VER <= 1300)
|
#if defined(_MSC_VER) && !defined(__MWERKS__) && (_MSC_VER <= 1300)
|
||||||
// VC60 and VC7 workaround: built-in std::reverse_iterator has two template parameters, Dinkumware only has one
|
// VC60 and VC7 workaround: built-in std::reverse_iterator has two template parameters, Dinkumware only has one
|
||||||
typedef reverse_bidirectional_iterator<unsigned int *, unsigned int> RevIt;
|
typedef std::reverse_bidirectional_iterator<unsigned int *, unsigned int> RevIt;
|
||||||
#elif defined(_RWSTD_NO_CLASS_PARTIAL_SPEC)
|
#elif defined(_RWSTD_NO_CLASS_PARTIAL_SPEC)
|
||||||
typedef std::reverse_iterator<unsigned int *, random_access_iterator_tag, unsigned int> RevIt;
|
typedef std::reverse_iterator<unsigned int *, random_access_iterator_tag, unsigned int> RevIt;
|
||||||
#else
|
#else
|
||||||
typedef std::reverse_iterator<unsigned int *> RevIt;
|
typedef std::reverse_iterator<unsigned int *> RevIt;
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue