mirror of https://github.com/aria2/aria2
2008-01-06 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Fixed: hash algorithm 'sha1' is always used. * src/DownloadCommand.cc (validatePieceHash)pull/1/head
parent
eb718cfda0
commit
6ab2962655
|
@ -1,3 +1,8 @@
|
||||||
|
2008-01-06 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
|
||||||
|
|
||||||
|
Fixed: hash algorithm 'sha1' is always used.
|
||||||
|
* src/DownloadCommand.cc (validatePieceHash)
|
||||||
|
|
||||||
2008-01-06 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
|
2008-01-06 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
|
||||||
|
|
||||||
Added --enable-peer-exchange command-line option.
|
Added --enable-peer-exchange command-line option.
|
||||||
|
|
|
@ -179,7 +179,7 @@ void DownloadCommand::validatePieceHash(const SegmentHandle& segment)
|
||||||
if(e->option->get(PREF_REALTIME_CHUNK_CHECKSUM) == V_TRUE &&
|
if(e->option->get(PREF_REALTIME_CHUNK_CHECKSUM) == V_TRUE &&
|
||||||
!expectedPieceHash.empty()) {
|
!expectedPieceHash.empty()) {
|
||||||
string actualPieceHash =
|
string actualPieceHash =
|
||||||
MessageDigestHelper::digest("sha1",
|
MessageDigestHelper::digest(_requestGroup->getDownloadContext()->getPieceHashAlgo(),
|
||||||
_requestGroup->getPieceStorage()->getDiskAdaptor(),
|
_requestGroup->getPieceStorage()->getDiskAdaptor(),
|
||||||
segment->getPosition(),
|
segment->getPosition(),
|
||||||
segment->getLength());
|
segment->getLength());
|
||||||
|
|
Loading…
Reference in New Issue