crypto_key_master

Crates.iocrypto_key_master
lib.rscrypto_key_master
version0.1.2
sourcesrc
created_at2021-11-04 13:24:00.71923
updated_at2021-11-04 13:42:43.066976
descriptionrust library for crypto key management
homepagehttps://github.com/aaronisme/crypto_key_master
repositoryhttps://github.com/aaronisme/crypto_key_master
max_upload_size
id476640
size24,368
Aaron Chen (aaronisme)

documentation

https://docs.rs/crypto_key_master

README

Crypto key master

crypto_key_master is the rust library for helping manage crypto keys

Crates.io

Documentation

Usage

To use crypto_key_master, first add this to your Cargo.toml:

[dependencies]
crypto_key_master = "0.1.2"

Next, add this to your crate:

use crypto_key_master::{KeyMaster, SignRequest, Curve};
let mut key_master = KeyMaster {};
let entropy = key_master.generate_entropy(32).unwrap();
let key_id = key_master.write_seed("123", "5eb00bbddcf069084889a8ab9155568165f5c453ccb85e70811aaed6f6da5fc19a5ac40b389cd370d086206dec8aa6c43daea6690f20ad3d8d48b2d2ce9e38e4".to_string()).unwrap();
let request = SignRequest { path: "m/44'/0'/0'/0/0", unsigend_data: "hello".as_bytes().to_vec(), key_id: "123456", curve: Curve::Secp256k1};
let sig = key_master.sign(request, "123").unwrap();

License

This project is licensed under the MIT license.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in crypto_key_master by you, shall be licensed as MIT, without any additional terms or conditions.

Commit count: 22

cargo fmt