| Crates.io | librash |
| lib.rs | librash |
| version | 0.1.0 |
| created_at | 2025-06-09 15:41:21.149703+00 |
| updated_at | 2025-06-09 15:41:21.149703+00 |
| description | Rust system library for cryptographic hashes |
| homepage | |
| repository | https://github.com/kpcyrd/librash |
| max_upload_size | |
| id | 1706081 |
| size | 39,749 |
Rust system library for cryptographic hashes.
This library provides two interfaces into the C dynamic linking ecosystem:
EVP_* function callsDue to this design, it's possible to select this as an OpenSSL drop-in at
compile-time, but the compiled binary can still co-exist with other programs
that depend on an actual OpenSSL libcrypto.so to be present. You could even
load both into the same process without having conflicting symbols.
cargo cbuild --release
## optional
#cargo ctest
cargo cinstall --release --frozen --prefix /usr --destdir /tmp/some-place
# Compile the library and generate headers
cargo cinstall --release --frozen --prefix /usr --destdir pkgdir/
# Using librash function names
gcc -o mdtest contrib/example-librash.c -I pkgdir/usr/include -L pkgdir/usr/lib/ -lrash
# Using OpenSSL function names and compat header
#gcc -o mdtest contrib/example-openssl3.c -I . -I pkgdir/usr/include -L pkgdir/usr/lib/ -lrash
# Test the binary
LD_LIBRARY_PATH=pkgdir/usr/lib ./mdtest sha256
MIT OR Apache-2.0