Package com.pkgrove.pkgrovekit.storage
Class ChecksumVerifyingInputStream
-
- All Implemented Interfaces:
-
java.io.Closeable,java.lang.AutoCloseable
public final class ChecksumVerifyingInputStream extends InputStream
Verifies a SHA-256 checksum WHILE streaming: on the read that reaches EOF the computed digest is compared and a mismatch throws ChecksumMismatchException (HEL-236: corruption fails visibly, exactly at the earliest point it is provable). Closing before EOF performs NO verification — a partial read proves nothing either way.