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

#11 in #node-key

Download history 31/week @ 2024-04-07 36/week @ 2024-04-14 45/week @ 2024-04-21 34/week @ 2024-04-28 45/week @ 2024-05-05 41/week @ 2024-05-12 43/week @ 2024-05-19 32/week @ 2024-05-26 29/week @ 2024-06-02 24/week @ 2024-06-09 40/week @ 2024-06-16 31/week @ 2024-06-23 9/week @ 2024-06-30 17/week @ 2024-07-07 42/week @ 2024-07-14 32/week @ 2024-07-21

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

Apache-2.0

68KB
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;

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

Dependencies

~5.5–8.5MB
~106K SLoC