Expand description
§minisign-rs
A Rust implementation lib of the Minisign.
Low-level library for the minisign system, designed to be used in CI/CD pipelines, or embedded into other processes (rather than manual command line).
§!!! This library not support legacy signature format !!!
§Example
let KeyPairBox {
public_key_box,
secret_key_box,
} = KeyPairBox::generate(
Some(b"password"),
Some("pk untrusted comment"),
Some("sk untrusted comment"),
)
.unwrap();
let msg = "test";
let sig_box = sign(
Some(&public_key_box),
&secret_key_box,
Some(b"password"),
msg.as_bytes(),
Some("trusted comment"),
Some("untrusted comment"),
)
.unwrap();
let v = verify(&public_key_box, &sig_box, msg.as_bytes()).unwrap();
assert_eq!(v, true);Structs§
- KeyPair
Box - A
KeyPairBoxrepresents a minisign key pair. - Public
KeyBox - A
PublicKeyBoxrepresents a minisign public key. - SError
- Error type for minisign-rs
- Secret
KeyBox - A
SecretKeyBoxrepresents a minisign secret key. - Signature
Box - A
SignatureBoxrepresents a minisign signature.
Enums§
- Error
Kind - Error kind for minisign-rs
Functions§
- pub_
key_ from_ sec_ key - Create a new public key from a secret key
- pub_
key_ from_ str - Create a new public key from a string in the minisign format pub key file
- sec_
key_ from_ str - Create a new secret key from a string in the minisign format key file
- sign
- minisign some data
- verify
- Verify a minisign signature