mirror of https://github.com/aria2/aria2
Add some md5 tests
parent
7cb69c4d9e
commit
08e2e412dc
|
@ -42,10 +42,18 @@ void MessageDigestTest::testDigest()
|
|||
md5_->update("aria2", 5);
|
||||
CPPUNIT_ASSERT_EQUAL(std::string("2c90cadbef42945f0dcff2b959977ff8"),
|
||||
util::toHex(md5_->digest()));
|
||||
md5_->reset();
|
||||
md5_->update("abc", 3);
|
||||
CPPUNIT_ASSERT_EQUAL(std::string("900150983cd24fb0d6963f7d28e17f72"),
|
||||
util::toHex(md5_->digest()));
|
||||
|
||||
sha1_->update("aria2", 5);
|
||||
CPPUNIT_ASSERT_EQUAL(std::string("f36003f22b462ffa184390533c500d8989e9f681"),
|
||||
util::toHex(sha1_->digest()));
|
||||
sha1_->reset();
|
||||
sha1_->update("abc", 3);
|
||||
CPPUNIT_ASSERT_EQUAL(std::string("a9993e364706816aba3e25717850c26c9cd0d89d"),
|
||||
util::toHex(sha1_->digest()));
|
||||
}
|
||||
|
||||
void MessageDigestTest::testSupports()
|
||||
|
|
Loading…
Reference in New Issue