Logo
Explore Help
Sign In
fluencelabs/rust-libp2p
1
0
Fork 0
You've already forked rust-libp2p
mirror of https://github.com/fluencelabs/rust-libp2p synced 2025-05-08 17:12:16 +00:00
Code Issues Projects Releases Wiki Activity
rust-libp2p/identity/tests/keypair_api.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

15 lines
322 B
Rust
Raw Normal View History

feat: introduce `libp2p-identity` crate This patch combines the `libp2p_core::identity` and `libp2p_core::peer_id` modules into a new crate: `libp2p-identity`. Resolves https://github.com/libp2p/rust-libp2p/issues/3349. Pull-Request: #3350.
2023-03-13 01:46:58 +11:00
use libp2p_identity::Keypair;
#[test]
fn calling_keypair_api() {
let _ = Keypair::from_protobuf_encoding(&[]);
}
#[allow(dead_code)]
fn using_keypair(kp: Keypair) {
let _ = kp.to_protobuf_encoding();
let _ = kp.sign(&[]);
let _ = kp.public();
fix(identity): correctly follow extract-expand for HKDF As @mxinden pointed out in https://github.com/libp2p/rust-libp2p/pull/4554#discussion_r1344747938, we were not correctly following the HKDF steps of extract and expand. Pull-Request: #4589.
2023-10-09 12:31:10 +11:00
let _: Option<[u8; 32]> = kp.derive_secret(b"foobar");
feat: introduce `libp2p-identity` crate This patch combines the `libp2p_core::identity` and `libp2p_core::peer_id` modules into a new crate: `libp2p-identity`. Resolves https://github.com/libp2p/rust-libp2p/issues/3349. Pull-Request: #3350.
2023-03-13 01:46:58 +11:00
}
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.23.7 Page: 315ms Template: 7ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API