mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2026-08-15 23:11:37 +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.
wolfSSL Rust Wrapper
The wolfSSL Rust wrapper currently consists of a single Rust crate named
wolfssl-wolfcrypt.
The wolfssl-wolfcrypt crate is a Rust wrapper for the wolfCrypt cryptographic
algorithms portion of the wolfSSL C library.
Locally building and testing the wolfSSL Rust Wrapper
First, configure and build wolfssl C library.
Then build the wolfssl Rust wrapper with:
make -C wrapper/rust
Run tests with:
make -C wrapper/rust test
Repository Directory Structure
| Repository Directory | Description |
|---|---|
/wrapper/rust |
Top level container for all Rust wrapper functionality. |
/wrapper/rust/wolfssl-wolfcrypt |
Top level for the wolfssl-wolfcrypt library crate. |
/wrapper/rust/wolfssl-wolfcrypt/src |
Source directory for wolfssl-wolfcrypt crate top-level modules. |