Package com.pkgrove.pkgrovekit.storage
Class Checksum
-
- All Implemented Interfaces:
public final class ChecksumA content checksum. valueBase64 is the base64 of the raw digest bytes — the same encoding S3's
x-amz-checksum-*headers use, so provider-side verification and client-side verification compare the identical value.
-
-
Field Summary
Fields Modifier and Type Field Description private final ChecksumAlgorithmalgorithmprivate final StringvalueBase64
-
Constructor Summary
Constructors Constructor Description Checksum(ChecksumAlgorithm algorithm, String valueBase64)
-
Method Summary
Modifier and Type Method Description final ChecksumAlgorithmgetAlgorithm()final StringgetValueBase64()final static Checksumsha256(ByteArray bytes)SHA-256 of in-memory bytes. final static Checksumsha256Of(ContentSource source)SHA-256 computed by STREAMING source once (bounded buffer). -
-
Constructor Detail
-
Checksum
Checksum(ChecksumAlgorithm algorithm, String valueBase64)
-
-
Method Detail
-
getAlgorithm
final ChecksumAlgorithm getAlgorithm()
-
getValueBase64
final String getValueBase64()
-
sha256Of
final static Checksum sha256Of(ContentSource source)
SHA-256 computed by STREAMING source once (bounded buffer).
-
-
-
-