use unique_ptr instead of auto_ptr - note that this modifies boost, which isn't a big deal since it is part of the repo, but we should really decouple the open source libs sometime

This commit is contained in:
CodeCodon
2015-07-28 15:48:32 -05:00
parent b7e8d249bb
commit beb1eecd5f
54 changed files with 153 additions and 153 deletions
@@ -471,14 +471,14 @@ unsigned int PK_FixedLengthDecryptor::Decrypt(const byte *cipherText, unsigned i
void PK_Signer::SignMessage(RandomNumberGenerator &rng, const byte *message, unsigned int messageLen, byte *signature) const
{
std::auto_ptr<HashModule> accumulator(NewMessageAccumulator());
std::unique_ptr<HashModule> accumulator(NewMessageAccumulator());
accumulator->Update(message, messageLen);
Sign(rng, accumulator.release(), signature);
}
bool PK_Verifier::VerifyMessage(const byte *message, unsigned int messageLen, const byte *sig) const
{
std::auto_ptr<HashModule> accumulator(NewMessageAccumulator());
std::unique_ptr<HashModule> accumulator(NewMessageAccumulator());
accumulator->Update(message, messageLen);
return Verify(accumulator.release(), sig);
}