浏览代码

2008-02-18 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>

	Updated doc.
	* src/MessageDigestHelper.h:
Tatsuhiro Tsujikawa 17 年之前
父节点
当前提交
b7e841e885
共有 2 个文件被更改,包括 13 次插入6 次删除
  1. 5 0
      ChangeLog
  2. 8 6
      src/MessageDigestHelper.h

+ 5 - 0
ChangeLog

@@ -1,3 +1,8 @@
+2008-02-18  Tatsuhiro Tsujikawa  <tujikawa at rednoah dot com>
+
+	Updated doc.
+	* src/MessageDigestHelper.h: 
+
 2008-02-18  Tatsuhiro Tsujikawa  <tujikawa at rednoah dot com>
 
 	Use raw message digest as a token instead of its hexadecimal

+ 8 - 6
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<BinaryStream>& 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.