mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2026-08-15 13:31:29 +02:00
Add copy(&mut self) methods backed by wc_Sha256Copy/wc_Sha384Copy for transcript snapshotting (e.g. TLS handshake hashing). Uses &mut self (not Clone trait) because wc_ShaCopy may mutate src on some platforms. Initializes dst before calling Copy to avoid passing uninitialized memory to wc_ShaFree inside the C function. Includes unit tests verifying independent copy semantics with externally computed SHA-256/SHA-384 test vectors.