Skip to content

Commit

Permalink
added log about getting a hash for a file
Browse files Browse the repository at this point in the history
  • Loading branch information
smiklosovic committed May 26, 2023
1 parent 1949fae commit b82e27e
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,17 @@

import javax.inject.Inject;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import com.instaclustr.esop.impl.ManifestEntry;

import static java.lang.String.format;

public class HashServiceImpl implements HashService {

private static final Logger logger = LoggerFactory.getLogger(HashServiceImpl.class);

private final HashSpec hashSpec;

@Inject
Expand Down Expand Up @@ -79,7 +84,7 @@ public void verify(final Path path, final String expectedHash) throws HashVerifi

private String getHash(final File file) throws IOException, NoSuchAlgorithmException {
try (final FileInputStream fis = new FileInputStream(file)) {

logger.info("Getting {} hash of {} ", hashSpec.algorithm.toString(), file.getAbsolutePath());
final MessageDigest digest = MessageDigest.getInstance(hashSpec.algorithm.toString());

// Create byte array to read data in chunks
Expand Down

0 comments on commit b82e27e

Please sign in to comment.