Cleared compile errors under Visual Studio .Net compilers
parent
1ce593357f
commit
8db0e7da6d
|
|
@ -1150,7 +1150,7 @@ public:
|
|||
//! \details Internally, Pump() calls Pump2().
|
||||
//! \note pumpMax is a \p lword, which is a 64-bit value that typically uses \p LWORD_MAX. The default
|
||||
//! argument is a \p size_t that uses \p SIZE_MAX, and it can be 32-bits or 64-bits.
|
||||
lword Pump(lword pumpMax=size_t(SIZE_MAX))
|
||||
lword Pump(lword pumpMax=(size_t)SIZE_MAX)
|
||||
{Pump2(pumpMax); return pumpMax;}
|
||||
|
||||
//! \brief Pump messages to attached transformation
|
||||
|
|
|
|||
4
hkdf.h
4
hkdf.h
|
|
@ -29,6 +29,8 @@ template <class T>
|
|||
class HKDF : public KeyDerivationFunction
|
||||
{
|
||||
public:
|
||||
CRYPTOPP_CONSTANT(DIGESTSIZE = T::DIGESTSIZE);
|
||||
CRYPTOPP_CONSTANT(SALTSIZE = T::DIGESTSIZE);
|
||||
static const char* StaticAlgorithmName () {
|
||||
static const std::string name(std::string("HKDF(") + std::string(T::StaticAlgorithmName()) + std::string(")"));
|
||||
return name.c_str();
|
||||
|
|
@ -40,7 +42,7 @@ public:
|
|||
protected:
|
||||
// If salt is missing (NULL), then use the NULL vector. Missing is different than EMPTY (0 length). The length
|
||||
// of s_NullVector used depends on the Hash function. SHA-256 will use 32 bytes of s_NullVector.
|
||||
typedef byte NullVectorType[T::DIGESTSIZE];
|
||||
typedef byte NullVectorType[SALTSIZE];
|
||||
static const NullVectorType& GetNullVector() {
|
||||
static const NullVectorType s_NullVector = {0};
|
||||
return s_NullVector;
|
||||
|
|
|
|||
|
|
@ -114,7 +114,7 @@ void HuffmanDecoder::Initialize(const unsigned int *codeBits, unsigned int nCode
|
|||
}
|
||||
|
||||
// MAX_CODE_BITS is 32, m_maxCodeBits may be smaller.
|
||||
const unsigned long long shiftedMaxCode = (1ULL << m_maxCodeBits);
|
||||
const word64 shiftedMaxCode = ((word64)1 << m_maxCodeBits);
|
||||
if (code > shiftedMaxCode - blCount[m_maxCodeBits])
|
||||
throw Err("codes oversubscribed");
|
||||
else if (m_maxCodeBits != 1 && code < shiftedMaxCode - blCount[m_maxCodeBits])
|
||||
|
|
@ -143,7 +143,7 @@ void HuffmanDecoder::Initialize(const unsigned int *codeBits, unsigned int nCode
|
|||
m_normalizedCacheMask = NormalizeCode(m_cacheMask, m_cacheBits);
|
||||
assert(m_normalizedCacheMask == BitReverse(m_cacheMask));
|
||||
|
||||
const unsigned long long shiftedCache = (1ULL << m_cacheBits);
|
||||
const word64 shiftedCache = ((word64)1 << m_cacheBits);
|
||||
assert(shiftedCache <= SIZE_MAX);
|
||||
if (m_cache.size() != shiftedCache)
|
||||
m_cache.resize((size_t)shiftedCache);
|
||||
|
|
|
|||
Loading…
Reference in New Issue