| Modifier and Type | Field and Description |
|---|---|
| private static final String | |
| private static final int | |
| private static final Logger |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| private static String | Returns: the hex-encoded stringthe byte array bytes)Converts a byte array to a hexadecimal string. |
| public static Optional | Returns: Optional containing the hex-encoded hash of the file, or empty if an error occurredthe path to the file path)Computes the SHA-256 hash of a file. |
| ALGORITHM | back to summary |
|---|---|
| private static final String ALGORITHM | |
| BUFFER_SIZE | back to summary |
|---|---|
| private static final int BUFFER_SIZE | |
| LOGGER | back to summary |
|---|---|
| private static final Logger LOGGER | |
| FileHasher | back to summary |
|---|---|
| private FileHasher() | |
| bytesToHex | back to summary |
|---|---|
| private static String bytesToHex(byte[] bytes) Converts a byte array to a hexadecimal string.
| |
| computeHash | back to summary |
|---|---|
| public static Optional Computes the SHA-256 hash of a file. | |