mirror of
https://github.com/apple/swift-crypto
synced 2026-11-23 04:34:21 +00:00
Add SHA-512/256 digest implementation via BoringSSL ### Checklist - [x] I've run tests to see all new and existing tests pass - [x] I've followed the code style of the rest of the project - [x] I've read the [Contribution Guidelines](CONTRIBUTING.md) - [x] I've updated the documentation if necessary #### If you've made changes to `gyb` files - [N/A] I've run `.script/generate_boilerplate_files_with_gyb` and included updated generated files in a commit of this pull request ### Motivation: Neither CryptoKit nor swift-crypto currently explore the SHA-512/256 hashing function. SHA-512/256 provides the same 256-bit security level as SHA-256 but can be significantly faster on 64-bit platforms because it uses the SHA-512 internal structure, which operates on 64-bit words. ### Modifications: We modified CryptoExtras to include support using the BoringSSL implementation. ### Result: Swift ecosystem supports SHA-512/256. --------- Co-authored-by: Cory Benfield <lukasa@apple.com>