From b7e841e885721a13f843891cf79235e7d14d6eb2 Mon Sep 17 00:00:00 2001 From: Tatsuhiro Tsujikawa Date: Sun, 17 Feb 2008 16:12:47 +0000 Subject: [PATCH] 2008-02-18 Tatsuhiro Tsujikawa Updated doc. * src/MessageDigestHelper.h: --- ChangeLog | 5 +++++ src/MessageDigestHelper.h | 14 ++++++++------ 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index 1bd32f5a..2c4dd31c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2008-02-18 Tatsuhiro Tsujikawa + + Updated doc. + * src/MessageDigestHelper.h: + 2008-02-18 Tatsuhiro Tsujikawa Use raw message digest as a token instead of its hexadecimal diff --git a/src/MessageDigestHelper.h b/src/MessageDigestHelper.h index 3300eca5..d8c30ffd 100644 --- a/src/MessageDigestHelper.h +++ b/src/MessageDigestHelper.h @@ -46,16 +46,11 @@ class BinaryStream; class MessageDigestHelper { public: /** - * Returns message digest in hexadecimal notation. + * Returns message digest in hexadecimal representation. * Digest algorithm is specified by algo. */ static std::string digest(const std::string& algo, const SharedHandle& bs, int64_t offset, int64_t length); - /** - * Calculates message digest of file denoted by filename. - */ - static std::string digest(const std::string& algo, const std::string& filename); - static std::string digest(const std::string& algo, const void* data, int32_t length); static std::string digestString(const std::string& algo, const std::string& data) @@ -63,6 +58,13 @@ public: return digest(algo, data.c_str(), data.size()); } + /** + * Calculates message digest of file denoted by filename. + * Returns message digest in hexadecimal representation. + * Digest algorithm is specified by algo. + */ + static std::string digest(const std::string& algo, const std::string& filename); + /** * Stores *raw* message digest into md. * Throws exception when mdLength is less than the size of message digest.