| CODENOTIFIER | HelpYou are not signed inSign in |
Project: jEdit
Revision: 13520
Author: kpouer
Date: 03 Sep 2008 17:48:49
Changes:fixed little javadoc and coding style
Files:| ... | ...@@ -1877,15 +1877,18 @@ | |
| 1877 | 1877 | return true; |
| 1878 | 1878 | } //}}} |
| 1879 | 1879 | |
| 1880 | /** @returns an MD5 hash of the contents of the buffer */ | |
| 1881 | private byte[] calculateHash() { | |
| 1880 | /** @return an MD5 hash of the contents of the buffer */ | |
| 1881 | private byte[] calculateHash() | |
| 1882 | { | |
| 1882 | 1883 | // Log.log(Log.DEBUG, this, "calculateHash()"); |
| 1883 | try { | |
| 1884 | try | |
| 1885 | { | |
| 1884 | 1886 | MessageDigest digest = java.security.MessageDigest.getInstance("MD5"); |
| 1885 | 1887 | digest.update(getText(0, getLength()).getBytes()); |
| 1886 | 1888 | return digest.digest(); |
| 1887 | 1889 | } |
| 1888 | catch (NoSuchAlgorithmException nsae) { | |
| 1890 | catch (NoSuchAlgorithmException nsae) | |
| 1891 | { | |
| 1889 | 1892 | Log.log(Log.ERROR, this, "Can't Calculate MD5 hash!", nsae); |
| 1890 | 1893 | return null; |
| 1891 | 1894 | } |