Mercurial > jhg
diff src/com/tmate/hgkit/ll/DigestHelper.java @ 17:571e1b2cc3f7
Query file for its parents. Demo of recently added ignore and digest support from within cat cmd
author | Artem Tikhomirov <tikhomirov.artem@gmail.com> |
---|---|
date | Mon, 27 Dec 2010 01:43:08 +0100 |
parents | d6d2a630f4a6 |
children | 346b66add79d |
line wrap: on
line diff
--- a/src/com/tmate/hgkit/ll/DigestHelper.java Mon Dec 27 01:00:53 2010 +0100 +++ b/src/com/tmate/hgkit/ll/DigestHelper.java Mon Dec 27 01:43:08 2010 +0100 @@ -31,8 +31,10 @@ } // XXX perhaps, digest functions should throw an exception, as it's caller responsibility to deal with eof, etc - public String sha1(byte[] data) { + public String sha1(byte[] nodeidParent1, byte[] nodeidParent2, byte[] data) { MessageDigest alg = getSHA1(); + alg.update(nodeidParent1); + alg.update(nodeidParent2); byte[] digest = alg.digest(data); assert digest.length == 20; return toHexString(digest, 0, 20);