mirror of
https://github.com/shadps4-emu/ext-cryptopp.git
synced 2025-02-17 03:48:38 +00:00
Cleared "auto_ptr is deprecated" warning. Switch to unique_ptr when C++11 is in effect
This commit is contained in:
parent
f017391174
commit
9de95b4400
7
oaep.cpp
7
oaep.cpp
@ -20,6 +20,12 @@ void OAEP_Base::Pad(RandomNumberGenerator &rng, const byte *input, size_t inputL
|
||||
{
|
||||
CRYPTOPP_ASSERT (inputLength <= MaxUnpaddedLength(oaepBlockLen));
|
||||
|
||||
#if defined(CRYPTOPP_CXX11)
|
||||
std::unique_ptr<HashTransformation> pHash(NewHash());
|
||||
#else
|
||||
std::auto_ptr<HashTransformation> pHash(NewHash());
|
||||
#endif
|
||||
|
||||
// convert from bit length to byte length
|
||||
if (oaepBlockLen % 8 != 0)
|
||||
{
|
||||
@ -28,7 +34,6 @@ void OAEP_Base::Pad(RandomNumberGenerator &rng, const byte *input, size_t inputL
|
||||
}
|
||||
oaepBlockLen /= 8;
|
||||
|
||||
std::auto_ptr<HashTransformation> pHash(NewHash());
|
||||
const size_t hLen = pHash->DigestSize();
|
||||
const size_t seedLen = hLen, dbLen = oaepBlockLen-seedLen;
|
||||
byte *const maskedSeed = oaepBlock;
|
||||
|
Loading…
x
Reference in New Issue
Block a user