Files
amethyst/quartz/src/commonTest
Claude fa7e8dba7d fix(quartz): hash empty input on Apple without crashing
sha256() and sha256Into() in Sha256.apple.kt pinned the input and took
addressOf(0), which throws ArrayIndexOutOfBoundsException on Kotlin/Native
when the array is empty. So sha256(ByteArray(0)) crashed on iOS/macOS, and
test-quartz-ios failed 7 OversizedTransferTest cases that hash "" (red on main
too). CommonCrypto's CC_SHA256 accepts a null data pointer for a zero-length
input, so pass null when the array is empty.

Adds Sha256Test with FIPS 180-2 vectors (empty, "abc", prefix hashing through
sha256Into) so every platform's actual is checked, not only through CEP-22.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015VvJ8XpeYqBe8bYT3bJ7UD
2026-09-26 23:54:56 +00:00
..