44个发布版本

0.5.0 2024年8月22日
0.4.5 2024年6月6日
0.4.4 2024年3月1日
0.4.0 2023年12月15日
0.0.1-alpha.82020年11月16日

#81 in 加密学

Download history • Rust 包仓库 851/week @ 2024-05-02 • Rust 包仓库 674/week @ 2024-05-09 • Rust 包仓库 983/week @ 2024-05-16 • Rust 包仓库 977/week @ 2024-05-23 • Rust 包仓库 1282/week @ 2024-05-30 • Rust 包仓库 1177/week @ 2024-06-06 • Rust 包仓库 892/week @ 2024-06-13 • Rust 包仓库 923/week @ 2024-06-20 • Rust 包仓库 673/week @ 2024-06-27 • Rust 包仓库 876/week @ 2024-07-04 • Rust 包仓库 726/week @ 2024-07-11 • Rust 包仓库 1114/week @ 2024-07-18 • Rust 包仓库 1303/week @ 2024-07-25 • Rust 包仓库 1009/week @ 2024-08-01 • Rust 包仓库 695/week @ 2024-08-08 • Rust 包仓库 657/week @ 2024-08-15 • Rust 包仓库

3,851 每月下载量
用于 41 个crate (7 直接)

MIT/Apache

310KB
6.5K SLoC

lair_keystore_api

秘密的lair私钥存储API库。

Project Forum Chat

License: MIT License: Apache-2.0

这个库包含处理lair的大部分逻辑。

  • 如果您希望运行进程内/内存中的keystore,或作为客户端连接到外部lair keystore,这个库就是您需要的。
  • 如果您想运行标准的lair-keystore,请查看lair_keystore crate。
  • 如果您想在进程内运行标准的lair-keystore,使用标准的sqlcipher数据库,请查看lair_keystore crate。
  • 有关lair_keystore_api协议的信息,请参阅[lair_api]模块。
  • 有关客户端结构API的详细信息,请参阅[LairClient]。
建立与标准ipc keystore二进制文件的客户端连接
use lair_keystore_api::prelude::*;
use lair_keystore_api::ipc_keystore::*;

// create a client connection
let client =
    ipc_keystore_connect(connection_url, passphrase)
        .await
        .unwrap();

// create a new seed
let seed_info = client.new_seed(
    "test-seed".into(),
    None,
    false,
).await.unwrap();

// sign some data
let sig = client.sign_by_pub_key(
    seed_info.ed25519_pub_key.clone(),
    None,
    b"test-data".to_vec().into(),
).await.unwrap();

// verify the signature
assert!(seed_info.ed25519_pub_key.verify_detached(
    sig,
    b"test-data".to_vec(),
).await.unwrap());

许可证:MIT OR Apache-2.0

依赖项

~18–28MB
~504K SLoC