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
4,953 downloads per month
Used in 52 crates
(9 directly)
225KB
5K
SLoC
sodoken
lib SOdium + haDOKEN = SODOKEN!
Thin wrapper around libsodium-sys-stable.
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