Skip to content

Commit

Permalink
Remove dependency on commons-codec
Browse files Browse the repository at this point in the history
  • Loading branch information
gaul committed Jan 21, 2025
1 parent f82ac9c commit 86aceaf
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
5 changes: 0 additions & 5 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -475,11 +475,6 @@
<artifactId>commons-fileupload2-javax</artifactId>
<version>2.0.0-M2</version>
</dependency>
<dependency>
<groupId>commons-codec</groupId>
<artifactId>commons-codec</artifactId>
<version>1.15</version>
</dependency>
<dependency>
<groupId>org.apache.jclouds</groupId>
<artifactId>jclouds-allblobstore</artifactId>
Expand Down
5 changes: 3 additions & 2 deletions src/main/java/org/gaul/s3proxy/EncryptedBlobStore.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@

import java.io.IOException;
import java.io.InputStream;
import java.nio.charset.StandardCharsets;
import java.security.spec.KeySpec;
import java.util.ArrayList;
import java.util.List;
Expand All @@ -35,8 +36,8 @@
import com.google.common.base.Strings;
import com.google.common.collect.ImmutableSet;
import com.google.common.hash.HashCode;
import com.google.common.hash.Hashing;

import org.apache.commons.codec.digest.DigestUtils;
import org.gaul.s3proxy.crypto.Constants;
import org.gaul.s3proxy.crypto.Decryption;
import org.gaul.s3proxy.crypto.Encryption;
Expand Down Expand Up @@ -348,7 +349,7 @@ private String getBlobStoreType() {

private String generateUploadId(String container, String blobName) {
String path = container + "/" + blobName;
return DigestUtils.sha256Hex(path);
return Hashing.md5().hashBytes(path.getBytes(StandardCharsets.UTF_8)).toString();
}

@Override
Expand Down

0 comments on commit 86aceaf

Please sign in to comment.