Package com.adobe.testing.s3mock.s3.util
Object ChecksumUtil
-
- All Implemented Interfaces:
public class ChecksumUtilUtility class for AWS SDK checksum operations. Handles checksum verification and calculation using AWS SDK algorithms. For MD5/ETag digest operations, see DigestUtil.
-
-
Field Summary
Fields Modifier and Type Field Description public final static ChecksumUtilINSTANCE
-
Method Summary
Modifier and Type Method Description final UnitverifyChecksum(String expected, String actual, ChecksumAlgorithm checksumAlgorithm)final StringchecksumFor(Path path, ChecksumAlgorithm algorithm)Calculate a checksum for the given path and algorithm. final StringchecksumMultipart(List<Path> paths, ChecksumAlgorithm algorithm)Calculates the checksum for a list of paths. -
-
Method Detail
-
verifyChecksum
final Unit verifyChecksum(String expected, String actual, ChecksumAlgorithm checksumAlgorithm)
-
checksumFor
final String checksumFor(Path path, ChecksumAlgorithm algorithm)
Calculate a checksum for the given path and algorithm.
- Parameters:
path- Path containing the bytes to generate the checksum foralgorithm- algorithm to use- Returns:
the checksum
-
checksumMultipart
final String checksumMultipart(List<Path> paths, ChecksumAlgorithm algorithm)
Calculates the checksum for a list of paths. For multipart uploads, AWS takes the checksum of all parts, concatenates them, and then takes the checksum again. Then, they add a hyphen and the number of parts used to calculate the checksum. API
-
-
-
-