#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

#88 in Cryptography

Download history 1274/week @ 2024-08-15 1366/week @ 2024-08-22 1494/week @ 2024-08-29 1331/week @ 2024-09-05 1468/week @ 2024-09-12 1791/week @ 2024-09-19 1254/week @ 2024-09-26 1304/week @ 2024-10-03 965/week @ 2024-10-10 1082/week @ 2024-10-17 1360/week @ 2024-10-24 1375/week @ 2024-10-31 1287/week @ 2024-11-07 1128/week @ 2024-11-14 1238/week @ 2024-11-21 1079/week @ 2024-11-28

4,997 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
~89K SLoC