Update seckey.h

See
https://github.com/weidai11/cryptopp/issues/252
This commit is contained in:
Flo 2016-09-04 13:47:39 +02:00 committed by GitHub
parent f23314f731
commit a11985e6e4

View File

@ -194,12 +194,9 @@ public:
//! \details keylength is provided in bytes, not bits.
static size_t CRYPTOPP_API StaticGetValidKeyLength(size_t keylength)
{
#if MIN_KEYLENGTH > 0
if (keylength < (size_t)MIN_KEYLENGTH)
return MIN_KEYLENGTH;
else
#endif
if (keylength > (size_t)MAX_KEYLENGTH)
else if (keylength > (size_t)MAX_KEYLENGTH)
return (size_t)MAX_KEYLENGTH;
else
{