Commit Graph

15 Commits

Author SHA1 Message Date
Tatsuhiro Tsujikawa
74d6d64271 Use std::unique_ptr for MessageDigest 2013-07-03 01:13:13 +09:00
Tatsuhiro Tsujikawa
07d270c87e Require -std=c++11 and use std::shared_ptr instead of SharedHandle 2013-06-22 01:10:38 +09:00
Tatsuhiro Tsujikawa
310e58bc62 Stored hash value as raw byte string, instead of hex digest. 2011-10-13 21:40:07 +09:00
Tatsuhiro Tsujikawa
2666bc8170 Renamed MessageDigestHelper as message_digest_helper
Static member variables in MessageDigestHelper class are now functions
under message_digest namespace.
2011-02-05 23:38:51 +09:00
Tatsuhiro Tsujikawa
3ee6784b76 Made `make distcheck' pass.
We added 2 macros A2_TEST_DIR and A2_TEST_OUT_DIR to pass tests in
`make distcheck`.  A2_TEST_DIR refers to test directory.  All output
files by unit tests are now created under A2_TEST_OUT_DIR directory.
2010-12-02 22:52:35 +09:00
Tatsuhiro Tsujikawa
89f997ec0d 2010-11-11 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Replaced MessageDigestContext with MessageDigest.  Cleaned up
	unnecessary functions in MessageDigestHelper.
	* src/BtPieceMessage.cc
	* src/Checksum.h
	* src/DHTTokenTracker.cc
	* src/DownloadCommand.cc
	* src/DownloadCommand.h
	* src/HashFuncEntry.h
	* src/IteratableChecksumValidator.cc
	* src/IteratableChecksumValidator.h
	* src/IteratableChunkChecksumValidator.cc
	* src/IteratableChunkChecksumValidator.h
	* src/LibgcryptMessageDigestImpl.cc
	* src/LibgcryptMessageDigestImpl.h
	* src/LibsslMessageDigestImpl.cc
	* src/LibsslMessageDigestImpl.h
	* src/MSEHandshake.cc
	* src/MSEHandshake.h
	* src/Makefile.am
	* src/MessageDigest.cc
	* src/MessageDigest.h
	* src/MessageDigestHelper.cc
	* src/MessageDigestHelper.h
	* src/MessageDigestImpl.h
	* src/MetalinkParserController.cc
	* src/Piece.cc
	* src/Piece.h
	* src/UTMetadataDataExtensionMessage.cc
	* src/bittorrent_helper.cc
	* src/messageDigest.cc: Removed
	* src/messageDigest.h: Removed
	* src/util.cc
	* src/version_usage.cc
	* test/BittorrentHelperTest.cc
	* test/GZipDecoderTest.cc
	* test/GZipDecodingStreamFilterTest.cc
	* test/IteratableChecksumValidatorTest.cc
	* test/IteratableChunkChecksumValidatorTest.cc
	* test/Makefile.am
	* test/MessageDigestHelperTest.cc
	* test/MessageDigestTest.cc
	* test/Metalink2RequestGroupTest.cc
	* test/MetalinkProcessorTest.cc
	* test/PieceTest.cc
	* test/TestUtil.cc
	* test/TestUtil.h
	* test/UTMetadataDataExtensionMessageTest.cc
	* test/UTMetadataPostDownloadHandlerTest.cc
2010-11-11 02:56:24 +00:00
Tatsuhiro Tsujikawa
b305edd7c5 2010-05-14 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Left only IANA hash function textual name in messageDigest.cc.
	Assign only IANA hash function textual name to Checksum and
	ChunkChecksum. Fixed the value of MessageDigestContext::MD5.
	* src/Checksum.h
	* src/MetalinkParserController.cc
	* src/messageDigest.cc
	* src/messageDigest.h
	* test/IteratableChecksumValidatorTest.cc
	* test/IteratableChunkChecksumValidatorTest.cc
	* test/MessageDigestHelperTest.cc
	* test/Metalink2RequestGroupTest.cc
	* test/MetalinkProcessorTest.cc
2010-05-14 14:11:56 +00:00
Tatsuhiro Tsujikawa
4db349c1f3 2010-01-06 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Untabify. Fixed one line in copyright which is longer than 80
	columns.
	* src
	* test
2010-01-05 16:01:46 +00:00
Tatsuhiro Tsujikawa
e976b23728 2009-10-23 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Renamed Util.{cc,h} as util.{cc,h}
	* src/Util.cc
	* src/Util.h
	* src/util.cc
	* src/util.h
2009-10-22 15:35:33 +00:00
Tatsuhiro Tsujikawa
c1aef8e2d1 2009-05-04 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Now the constructor of AbstractDiskWriter takes filename as an
	argument and filename argument is removed from openFile(),
	initAndOpenFile(), openExistingFile() interface.  storeDir
	member and its accessor functions are removed from DiskAdaptor
	because it is not used anymore.  size() member function of
	DefaultDiskWriter, DirectDiskAdaptor and MultiDiskAdaptor now
	can be called without opening file.
	* src/AbstractDiskWriter.cc
	* src/AbstractDiskWriter.h
	* src/AbstractSingleDiskAdaptor.cc
	* src/AbstractSingleDiskAdaptor.h
	* src/ByteArrayDiskWriter.cc
	* src/ByteArrayDiskWriter.h
	* src/ByteArrayDiskWriterFactory.cc
	* src/ByteArrayDiskWriterFactory.h
	* src/DefaultDiskWriter.cc
	* src/DefaultDiskWriter.h
	* src/DefaultDiskWriterFactory.cc
	* src/DefaultDiskWriterFactory.h
	* src/DefaultPieceStorage.cc
	* src/DirectDiskAdaptor.cc
	* src/DirectDiskAdaptor.h
	* src/DiskAdaptor.h
	* src/DiskWriter.h
	* src/DiskWriterFactory.h
	* src/MessageDigestHelper.cc
	* src/MultiDiskAdaptor.cc
	* src/RequestGroup.cc
	* src/UnknownLengthPieceStorage.cc
	* src/Util.cc
	* test/DefaultDiskWriterTest.cc
	* test/DirectDiskAdaptorTest.cc
	* test/FallocFileAllocationIteratorTest.cc
	* test/MessageDigestHelperTest.cc
	* test/MetalinkProcessorTest.cc
	* test/MultiDiskAdaptorTest.cc
	* test/MultiFileAllocationIteratorTest.cc
	* test/SingleFileAllocationIteratorTest.cc
	* test/UtilTest.cc
2009-05-04 07:50:38 +00:00
Tatsuhiro Tsujikawa
30e183ef54 2009-02-01 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Fixed compiler warning
	* test/IteratableChecksumValidatorTest.cc
2009-02-01 02:50:38 +00:00
Tatsuhiro Tsujikawa
3505201f33 2008-04-20 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Rewritten SharedHandle. Now copy constructor taking raw pointer 
has
	keyword explicit and SharedHandle's default constructor 
initializes
	its internal obj to null, old implementation initializes it 
using
	obj's default constructor.
	To assign null, write SharedHandle<T> x(...); x.reset();
	TODO: test/SharedHandleTest.cc needs more tests.
	* src/SharedHandle.h
2008-04-20 00:50:22 +00:00
Tatsuhiro Tsujikawa
1b7c198289 2008-02-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Removed "using namespace std;" from all sources. Appended std:: 
prefix to c++
	standard classes.
	Included string.h where mem* function are used.
2008-02-08 15:53:45 +00:00
Tatsuhiro Tsujikawa
048a2cf597 2007-10-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Implemented BitTorrent/http/ftp integrated download.
	I've rewritten lots of files and now some headers have forward
	class declarations to reduce compile time.
	The implementation is extremely alpha stage, I recommend to use this
	for testing purpose only.
2007-10-11 16:58:24 +00:00
Tatsuhiro Tsujikawa
958faeac06 Added unit test 2007-08-08 14:40:28 +00:00