Class ChecksumProvider
java.lang.Object
software.amazon.awssdk.checksums.internal.ChecksumProvider
Utility class providing implementations of checksums.
Supports the following implementations for CRC32C:
- Java-based CRC32C (Java 9+)
- CRT-based CRC32C (using AWS CRT library)
- SDK-based CRC32C (fallback)
Supports CRT-based implementations for CRC64NVME and XXHASH algorithms (using AWS CRT library).
For internal use only (SdkInternalApi).
-
Method Summary
Modifier and TypeMethodDescriptionstatic SdkChecksumTries to create a Java 9-based CRC32C checksum.static SdkChecksumCreates an instance of the CRT-based XXHASH128 checksum using AWS's CRT library.static SdkChecksumCreates an instance of the CRT-based XXHASH3 checksum using AWS's CRT library.static SdkChecksumCreates an instance of the CRT-based XXHASH64 checksum using AWS's CRT library.
-
Method Details
-
crc32cImplementation
Tries to create a Java 9-based CRC32C checksum. If it's not available, it tries to create a CRT-based checksum. If both are not available, it falls back to an SDK-based CRC32C checksum.- Returns:
- An instance of
SdkChecksum, based on the first available option.
-
xxHash64CrtImplementation
Creates an instance of the CRT-based XXHASH64 checksum using AWS's CRT library.- Returns:
- An
SdkChecksuminstance for XXHASH64. - Throws:
RuntimeException- if the CRT implementation is not available.
-
xxHash3CrtImplementation
Creates an instance of the CRT-based XXHASH3 checksum using AWS's CRT library.- Returns:
- An
SdkChecksuminstance for XXHASH3. - Throws:
RuntimeException- if the CRT implementation is not available.
-
xxHash128CrtImplementation
Creates an instance of the CRT-based XXHASH128 checksum using AWS's CRT library.- Returns:
- An
SdkChecksuminstance for XXHASH128. - Throws:
RuntimeException- if the CRT implementation is not available.
-