#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

#78 in Cryptography

Download history 857/week @ 2024-07-21 1545/week @ 2024-07-28 1434/week @ 2024-08-04 1151/week @ 2024-08-11 1473/week @ 2024-08-18 1381/week @ 2024-08-25 1247/week @ 2024-09-01 1390/week @ 2024-09-08 1672/week @ 2024-09-15 1769/week @ 2024-09-22 1091/week @ 2024-09-29 1085/week @ 2024-10-06 1046/week @ 2024-10-13 1176/week @ 2024-10-20 1545/week @ 2024-10-27 1170/week @ 2024-11-03

4,953 downloads per month
Used in 52 crates (9 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
~90K SLoC