mirror of
https://github.com/aria2/aria2.git
synced 2026-04-13 16:23:03 +00:00
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
52 lines
1.1 KiB
C++
52 lines
1.1 KiB
C++
#include "common.h"
|
|
|
|
#include <string>
|
|
|
|
#include "SharedHandle.h"
|
|
#include "Cookie.h"
|
|
|
|
namespace aria2 {
|
|
|
|
class MessageDigest;
|
|
|
|
void createFile(const std::string& filename, size_t length);
|
|
|
|
std::string readFile(const std::string& path);
|
|
|
|
class CookieSorter {
|
|
public:
|
|
bool operator()(const Cookie& lhs, const Cookie& rhs) const
|
|
{
|
|
if(lhs.getDomain() == rhs.getDomain()) {
|
|
return lhs.getName() < rhs.getName();
|
|
} else {
|
|
return lhs.getDomain() < rhs.getDomain();
|
|
}
|
|
}
|
|
};
|
|
|
|
Cookie createCookie
|
|
(const std::string& name,
|
|
const std::string& value,
|
|
const std::string& domain,
|
|
bool hostOnly,
|
|
const std::string& path,
|
|
bool secure);
|
|
|
|
Cookie createCookie
|
|
(const std::string& name,
|
|
const std::string& value,
|
|
time_t expiryTime,
|
|
const std::string& domain,
|
|
bool hostOnly,
|
|
const std::string& path,
|
|
bool secure);
|
|
|
|
#ifdef ENABLE_MESSAGE_DIGEST
|
|
// Returns hex digest of contents of file denoted by filename.
|
|
std::string fileHexDigest
|
|
(const SharedHandle<MessageDigest>& ctx, const std::string& filename);
|
|
#endif // ENABLE_MESSAGE_DIGEST
|
|
|
|
} // namespace aria2
|