[FEATURE REQ] Support transactional CRC64 checksums
Is your feature request related to a problem? Please describe:
The current Azure Java SDK (v12) appears to lack built-in support for transactional CRC64 validation during blob transfers.
While the .NET SDK provides a UseTransactionalCRC64 property (in ChecksumOptions) and StorageChecksumAlgorithm.StorageCrc64 (in v12) to automatically calculate and validate CRC64 hashes for individual REST operations, the Java SDK primarily relies on MD5 (setComputeMd5).
For scenarios where CRC64 is preferred (e.g., performance considerations on certain hardware or specific compliance requirements), or when migrating legacy systems that rely on CRC64 validation, the lack of a direct configuration in ParallelTransferOptions or BlobUploadOptions forces developers to manually implement complex custom logic or fallback to MD5.
Describe the solution you'd like: I would like to request first-class support for transactional CRC64 validation in the Java SDK, similar to the .NET implementation.
Ideally, this would look like:
- Adding a method like
setComputeCrc64(boolean)toParallelTransferOptions. - Or introducing a
setChecksumAlgorithm(StorageChecksumAlgorithm)method where one can choose betweenMD5andCRC64. - The SDK should handle the calculation of the CRC64 hash for the block/blob and set the
x-ms-content-crc64header automatically during upload/download.
Describe alternatives you've considered:
- Using MD5 (
setComputeMd5(true)), which is currently supported but may not meet specific requirements. - Relying solely on HTTPS/TLS for transport layer security, which doesn't protect against application-level data corruption.
- Manually calculating CRC64 and setting headers, which is error-prone and difficult to integrate with the high-level
BlobClientconvenience methods.
Additional context:
- .NET SDK Reference:
ChecksumOptions.UseTransactionalCRC64 - REST API Reference:
x-ms-content-crc64header support. - Parity with other language SDKs (like .NET and Go) would improve the cross-platform developer experience.
@ibrandes Could you look at supporting the x-ms-content-crc64 header in Java?
Hi @Gezi-lzq,
This feature is currently being implemented. We are targeting its release towards the end of Q1 next year.
Will there be support in the future, similar to AWS CRT, to introduce a C-language implementation libs of the crc32c algorithm and leverage hardware acceleration? @ibrandes
@Gezi-lzq
We don't have any official plans for it yet, but it has been something on our radar. After CRC64 checksum support is fully implemented, we will be able to give it more consideration.