#api-access #libsodium #holochain #memory-access #nacl #holo

sodoken

libsodium wrapper providing tokio safe memory secure api access

34 releases

0.0.901-alpha Apr 26, 2024
0.0.11 Mar 1, 2024
0.0.10 Jan 29, 2024
0.0.9 Apr 24, 2023
0.0.1-alpha.2 Dec 18, 2020

#81 in Cryptography

Download history 1746/week @ 2024-09-18 1422/week @ 2024-09-25 1201/week @ 2024-10-02 988/week @ 2024-10-09 1025/week @ 2024-10-16 1389/week @ 2024-10-23 1446/week @ 2024-10-30 1196/week @ 2024-11-06 1321/week @ 2024-11-13 1133/week @ 2024-11-20 1399/week @ 2024-11-27 820/week @ 2024-12-04 1336/week @ 2024-12-11 881/week @ 2024-12-18 226/week @ 2024-12-25 866/week @ 2025-01-01

3,441 downloads per month
Used in 53 crates (10 directly)

MIT/Apache

225KB
5K SLoC

sodoken

lib SOdium + haDOKEN = SODOKEN!

Thin wrapper around libsodium-sys-stable.

Project Forum Chat

License: MIT License: Apache-2.0

use sodoken::*;

let mut pub_key = [0; sign::PUBLICKEYBYTES];
let mut sec_key = LockedArray::new().unwrap();

sign::keypair(&mut pub_key, &mut sec_key.lock()).unwrap();

let mut sig = [0; sign::SIGNATUREBYTES];

sign::sign_detached(&mut sig, b"hello", &sec_key.lock()).unwrap();
assert!(sign::verify_detached(&sig, b"hello", &pub_key));
assert!(!sign::verify_detached(&sig, b"world", &pub_key));

Dependencies

~3–11MB
~88K SLoC