wolfv opened a new pull request, #7829:
URL: https://github.com/apache/opendal/pull/7829

   # Which issue does this PR close?
   
   Closes #.
   
   # Rationale for this change
   
   S3 supports several checksum algorithms for verifying upload integrity (e.g. 
for buckets with Object Lock). OpenDAL's S3 service already supports `crc32c` 
and `md5`, but not `sha256`, which is one of the most commonly used and is 
accepted by S3 for both single and multipart uploads.
   
   # What changes are included in this PR?
   
   - Add a `Sha256` variant to the internal `ChecksumAlgorithm` enum, mapping 
to the `x-amz-checksum-sha256` header.
   - Compute the base64-encoded SHA256 digest of the body via a new 
`format_sha256_iter` helper (using the `sha2` crate) in `calculate_checksum`.
   - Accept `"sha256"` for the `checksum_algorithm` config / builder option.
   - Send the per-part `ChecksumSHA256` element when completing multipart 
uploads.
   - Add a unit test guarding the SHA256 digest output and update docs.
   
   # Are there any user-facing changes?
   
   Yes. `"sha256"` is now a valid value for the S3 `checksum_algorithm` option. 
Builder and config docs are updated. No breaking changes.
   
   # AI Usage Statement
   
   This PR was prepared with the assistance of Claude Code (Claude Opus 4.8). 
All changes were reviewed by the author.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to