6 releases (1 stable)

1.0.0 Mar 31, 2020
1.0.0-rc.3 Mar 25, 2020
1.0.0-rc.2 Mar 13, 2020
1.0.0-rc.1 Feb 7, 2020
0.13.0-rc.2 Dec 4, 2019

#18 in #exonum

Download history 66/week @ 2023-01-31 15/week @ 2023-02-07 57/week @ 2023-02-14 86/week @ 2023-02-21 32/week @ 2023-02-28 50/week @ 2023-03-07 37/week @ 2023-03-14 30/week @ 2023-03-21 27/week @ 2023-03-28 31/week @ 2023-04-04 31/week @ 2023-04-11 4/week @ 2023-04-18 50/week @ 2023-04-25 53/week @ 2023-05-02 40/week @ 2023-05-09 27/week @ 2023-05-16

171 downloads per month
Used in 12 crates (via exonum)

Apache-2.0

67KB
952 lines

Exonum Key Management

Travis Build Status License: Apache-2.0 rust 1.42.0+ required

exonum-keys provides tools for storing and loading encrypted keys for Exonum nodes.

This is a simple utility crate specialized for the Exonum needs.

Consult the crate docs for more details.

Usage

Include exonum-keys as a dependency in your Cargo.toml:

[dependencies]
exonum-keys = "1.0.0"

License

exonum-keys is licensed under the Apache License (Version 2.0). See LICENSE for details.


lib.rs:

Key management for Exonum nodes.

This crate provides tools for storing and loading encrypted keys for a node.

Examples

use exonum_keys::{generate_keys, read_keys_from_file};
use tempdir::TempDir;

# fn main() -> anyhow::Result<()> {
let dir = TempDir::new("test_keys")?;
let file_path = dir.path().join("private_key.toml");
let pass_phrase = b"super_secret_passphrase";
let keys = generate_keys(file_path.as_path(), pass_phrase)?;
let restored_keys = read_keys_from_file(file_path.as_path(), pass_phrase)?;
assert_eq!(keys, restored_keys);
# Ok(())
# }

Dependencies

~5–7MB
~99K SLoC