Class ChecksumProvider


  • @SdkInternalApi
    public final class ChecksumProvider
    extends Object
    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 Detail

      • crc32cImplementation

        public static SdkChecksum 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

        public static SdkChecksum xxHash64CrtImplementation()
        Creates an instance of the CRT-based XXHASH64 checksum using AWS's CRT library.
        Returns:
        An SdkChecksum instance for XXHASH64.
        Throws:
        RuntimeException - if the CRT implementation is not available.
      • xxHash3CrtImplementation

        public static SdkChecksum xxHash3CrtImplementation()
        Creates an instance of the CRT-based XXHASH3 checksum using AWS's CRT library.
        Returns:
        An SdkChecksum instance for XXHASH3.
        Throws:
        RuntimeException - if the CRT implementation is not available.
      • xxHash128CrtImplementation

        public static SdkChecksum xxHash128CrtImplementation()
        Creates an instance of the CRT-based XXHASH128 checksum using AWS's CRT library.
        Returns:
        An SdkChecksum instance for XXHASH128.
        Throws:
        RuntimeException - if the CRT implementation is not available.