Skip to content

Commit

Permalink
refactor how filenames are chosen
Browse files Browse the repository at this point in the history
  • Loading branch information
artoonie committed Oct 8, 2024
1 parent 3b4eaca commit 8e3da5e
Show file tree
Hide file tree
Showing 3 changed files with 220 additions and 158 deletions.
5 changes: 5 additions & 0 deletions src/main/java/network/brightspots/rcv/AuditableFile.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,17 @@
import java.io.File;
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Path;

final class AuditableFile extends File {
public AuditableFile(String pathname) {
super(pathname);
}

public AuditableFile(Path pathname) {
super(pathname.toAbsolutePath().toString());
}

public void finalizeAndHash() {
String hash = Utils.bytesToHex(FileUtils.getHashBytes(this, "SHA-512"));

Expand Down
Loading

0 comments on commit 8e3da5e

Please sign in to comment.