Skip to content

holochain/sodoken

Repository files navigation

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));

About

Libsodium wrapper providing tokio safe memory secure api access.

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT

Stars

Watchers

Forks

Packages

No packages published