| Crates.io | signed_note |
| lib.rs | signed_note |
| version | 0.2.0 |
| created_at | 2025-04-01 20:00:02.731609+00 |
| updated_at | 2025-04-18 15:38:46.772481+00 |
| description | An implementation of c2sp.org/signed-note |
| homepage | https://github.com/cloudflare/azul |
| repository | https://github.com/cloudflare/azul |
| max_upload_size | |
| id | 1615440 |
| size | 76,549 |
A Rust implementation of the C2SP signed-note specification.
Here is a well-formed signed note:
If you think cryptography is the answer to your problem,
then you don't know what your problem is
— PeterNeumann x08go/ZJkuBS9UG/SffcvIAQxVBtiFupLLr8pAcElZInNIuGUgYN1FFYC2pZSNXgKvqfqdngotpRZb6KE6RyyBwJnAM=
It can be constructed and displayed using:
use note::{Note, StandardSigner};
let skey = "PRIVATE+KEY+PeterNeumann+c74f20a3+AYEKFALVFGyNhPJEMzD1QIDr+Y7hfZx09iUvxdXHKDFz";
let text = "If you think cryptography is the answer to your problem,\n\
then you don't know what your problem is.\n";
let signer = StandardSigner::new(skey).unwrap();
let mut n = Note::new(text, &[]).unwrap();
n.add_sigs(&[&signer]).unwrap();
let want = "If you think cryptography is the answer to your problem,\n\
then you don't know what your problem is.\n\
\n\
— PeterNeumann x08go/ZJkuBS9UG/SffcvIAQxVBtiFupLLr8pAcElZInNIuGUgYN1FFYC2pZSNXgKvqfqdngotpRZb6KE6RyyBwJnAM=\n";
assert_eq!(&n.to_string(), want);
See documentation for more complete examples.
cargo doc --open
cargo test
cargo bench
The project ports code from note.
The project is licensed under the BSD-3-Clause License.