]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
changed hash output
authoranwleung <anwleung@29311d96-e01e-0410-9327-a35deaab8ce9>
Fri, 9 Mar 2007 19:49:44 +0000 (19:49 +0000)
committeranwleung <anwleung@29311d96-e01e-0410-9327-a35deaab8ce9>
Fri, 9 Mar 2007 19:49:44 +0000 (19:49 +0000)
git-svn-id: https://ceph.svn.sf.net/svnroot/ceph@1190 29311d96-e01e-0410-9327-a35deaab8ce9

branches/aleung/security1/ceph/crypto/MerkleTree.h

index 06d4c1e455bdd988ad51faba97bb5a910691dcc7..a011e93db4dc44e02bf36e2a01a0aaa68197b6bd 100644 (file)
@@ -40,9 +40,9 @@ inline bool operator<(const hash_t& a, const hash_t& b)
 // ostream
 inline std::ostream& operator<<(std::ostream& out, const hash_t& c)
 {
-  byte hexArray[SHA1DIGESTSIZE];
+  byte hexArray[2*SHA1DIGESTSIZE];
   memset(hexArray, 0x00, sizeof(hexArray));
-  toHex(c.val, hexArray, SHA1DIGESTSIZE, SHA1DIGESTSIZE);
+  toHex(c.val, hexArray, SHA1DIGESTSIZE, 2*SHA1DIGESTSIZE);
   out << string((const char*)hexArray);
   return out;
 }