Crates.io | pbp |
lib.rs | pbp |
version | 0.4.0 |
source | src |
created_at | 2017-11-24 03:35:49.310258 |
updated_at | 2018-07-20 14:38:08.751821 |
description | bridge non-PGP system to PGP data format |
homepage | |
repository | https://github.com/withoutboats/pbp |
max_upload_size | |
id | 40362 |
size | 50,069 |
This crate lets you generate OpenPGP datagrams from ed25519 keys and signatures; it is intended to bridge from a non-PGP system to a transport medium that expects PGP data.
fn print_key(keypair: KeyPair) {
let pgp_key = PgpKey::new(&keypair.public[..], "user id string", |data| {
keypair.sign(data).to_bytes()
});
println!("{}", pgp_key);
}
It's agnostic about what library you use to implement ed25519, but it has a feature which integrates with ed25519-dalek
Thanks to isis lovecruft and Henry de Valence for assistance with the dalek API and understanding the OpenPGP specification.
The "print" example prints an ASCII armored OpenPGP public key to stdout; you can check that using:
$ cargo run --features dalek --example print