### Eclipse Workspace Patch 1.0 #P jackrabbit-data Index: src/main/java/org/apache/jackrabbit/core/data/FileDataStore.java =================================================================== --- src/main/java/org/apache/jackrabbit/core/data/FileDataStore.java (revision 1784247) +++ src/main/java/org/apache/jackrabbit/core/data/FileDataStore.java (working copy) @@ -71,7 +71,7 @@ /** * The digest algorithm used to uniquely identify records. */ - private static final String DIGEST = "SHA-1"; + private static final String DIGEST = "SHA-256"; /** * The default value for the minimum object size. @@ -163,8 +163,8 @@ /** * Creates a new data record. * The stream is first consumed and the contents are saved in a temporary file - * and the SHA-1 message digest of the stream is calculated. If a - * record with the same SHA-1 digest (and length) is found then it is + * and the SHA-256 message digest of the stream is calculated. If a + * record with the same SHA-256 digest (and length) is found then it is * returned. Otherwise the temporary file is moved in place to become * the new data record that gets returned. * Index: src/main/java/org/apache/jackrabbit/core/data/CachingDataStore.java =================================================================== --- src/main/java/org/apache/jackrabbit/core/data/CachingDataStore.java (revision 1784247) +++ src/main/java/org/apache/jackrabbit/core/data/CachingDataStore.java (working copy) @@ -93,7 +93,7 @@ /** * The digest algorithm used to uniquely identify records. */ - private static final String DIGEST = "SHA-1"; + private static final String DIGEST = "SHA-256"; private static final String DS_STORE = ".DS_Store"; @@ -389,9 +389,9 @@ /** * Creates a new data record in {@link Backend}. The stream is first - * consumed and the contents are saved in a temporary file and the SHA-1 + * consumed and the contents are saved in a temporary file and the SHA-256 * message digest of the stream is calculated. If a record with the same - * SHA-1 digest (and length) is found then it is returned. Otherwise new + * SHA-256 digest (and length) is found then it is returned. Otherwise new * record is created in {@link Backend} and the temporary file is moved in * place to {@link LocalCache}. * @@ -423,7 +423,7 @@ long currTime = System.currentTimeMillis(); DataIdentifier identifier = new DataIdentifier( encodeHexString(digest.digest())); - LOG.debug("SHA1 of [{}], length =[{}] took [{}]ms ", + LOG.debug("SHA-256 of [{}], length =[{}] took [{}]ms ", new Object[] { identifier, length, (currTime - startTime) }); String fileName = getFileName(identifier); AsyncUploadCacheResult result = null; Index: src/main/java/org/apache/jackrabbit/core/data/db/DbDataStore.java =================================================================== --- src/main/java/org/apache/jackrabbit/core/data/db/DbDataStore.java (revision 1784247) +++ src/main/java/org/apache/jackrabbit/core/data/db/DbDataStore.java (working copy) @@ -128,7 +128,7 @@ /** * The digest algorithm used to uniquely identify records. */ - protected static final String DIGEST = "SHA-1"; + protected static final String DIGEST = "SHA-256"; /** * The prefix used for temporary objects.