Skip to content

Latest commit

 

History

15 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

librsodium

A safe, simple, and consistent Rust wrapper around the libsodium-rs crate.
librsodium exposes a clean, JSON‑ready API for all cryptographic primitives provided by libsodium, making them easier to use and harder to misuse.

Why a wrapper?

libsodium-rs already provides excellent bindings to the C libsodium library.
However, its API is low‑level and requires manual error handling, memory management, and type juggling.

librsodium adds:

  • Uniform response type – every function returns LibrsodiumResponse<T> with success, data, and error fields. Call .to_json() for instant JSON serialization.
  • Strict input validation – invalid sizes, empty buffers, or out‑of‑range values are rejected immediately with machine‑readable error codes.
  • Consistent naming – all functions follow a predictable naming scheme.
  • Full test coverage – every function is tested for both success and error paths.
  • Zero unsafe in user code – the wrapper uses libsodium-rs internally, so you never touch unsafe.

License

This project is licensed under the MIT License.

Acknowledgments

librsodium is built on top of the excellent libsodium-rs bindings by Frank Denis and contributors.

Status

This project is still under development

About

Rust wrapper for libsodium-rs with uniform JSON‑ready responses.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages