Completed cutover to unscoped auto_ptr (which will use Crypto++'s namespace version)
parent
09b5d2f5dd
commit
d96e0a3a19
7
oaep.cpp
7
oaep.cpp
|
|
@ -5,8 +5,9 @@
|
||||||
#ifndef CRYPTOPP_IMPORTS
|
#ifndef CRYPTOPP_IMPORTS
|
||||||
|
|
||||||
#include "cryptlib.h"
|
#include "cryptlib.h"
|
||||||
|
#include "stdcpp.h"
|
||||||
|
#include "smartptr.h"
|
||||||
#include "oaep.h"
|
#include "oaep.h"
|
||||||
#include <functional>
|
|
||||||
|
|
||||||
NAMESPACE_BEGIN(CryptoPP)
|
NAMESPACE_BEGIN(CryptoPP)
|
||||||
|
|
||||||
|
|
@ -57,7 +58,7 @@ DecodingResult OAEP_Base::Unpad(const byte *oaepBlock, size_t oaepBlockLen, byte
|
||||||
bool invalid = false;
|
bool invalid = false;
|
||||||
|
|
||||||
using CryptoPP::auto_ptr;
|
using CryptoPP::auto_ptr;
|
||||||
std::auto_ptr<HashTransformation> pHash(NewHash());
|
auto_ptr<HashTransformation> pHash(NewHash());
|
||||||
|
|
||||||
// convert from bit length to byte length
|
// convert from bit length to byte length
|
||||||
if (oaepBlockLen % 8 != 0)
|
if (oaepBlockLen % 8 != 0)
|
||||||
|
|
@ -77,7 +78,7 @@ DecodingResult OAEP_Base::Unpad(const byte *oaepBlock, size_t oaepBlockLen, byte
|
||||||
byte *const maskedDB = t+seedLen;
|
byte *const maskedDB = t+seedLen;
|
||||||
|
|
||||||
|
|
||||||
std::auto_ptr<MaskGeneratingFunction> pMGF(NewMGF());
|
auto_ptr<MaskGeneratingFunction> pMGF(NewMGF());
|
||||||
pMGF->GenerateAndMask(*pHash, maskedSeed, seedLen, maskedDB, dbLen);
|
pMGF->GenerateAndMask(*pHash, maskedSeed, seedLen, maskedDB, dbLen);
|
||||||
pMGF->GenerateAndMask(*pHash, maskedDB, dbLen, maskedSeed, seedLen);
|
pMGF->GenerateAndMask(*pHash, maskedDB, dbLen, maskedSeed, seedLen);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue