#libsodium #api-access #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 1476/week @ 2024-06-09 1330/week @ 2024-06-16 1551/week @ 2024-06-23 1027/week @ 2024-06-30 1276/week @ 2024-07-07 1786/week @ 2024-07-14 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 1940/week @ 2024-09-22

6,308 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

~2.2–9.5MB
~58K SLoC