diff options
author | hozan23 <hozan23@proton.me> | 2023-11-29 11:44:53 +0300 |
---|---|---|
committer | hozan23 <hozan23@proton.me> | 2023-11-29 11:44:53 +0300 |
commit | 63e8b2fa6b5d4d9bf1ba9234bff0be8a255e612e (patch) | |
tree | d8291050228c7e23bdc9a7195df4505db0df1f93 /p2p/src | |
parent | 57ac163a06b7f4b00d9cfd56d0ab6ee6a49adb56 (diff) |
core: Move `key_pair` to the `crypto` module and make it a Cargo feature.
Diffstat (limited to 'p2p/src')
-rw-r--r-- | p2p/src/backend.rs | 2 | ||||
-rw-r--r-- | p2p/src/connector.rs | 2 | ||||
-rw-r--r-- | p2p/src/discovery/lookup.rs | 2 | ||||
-rw-r--r-- | p2p/src/discovery/mod.rs | 2 | ||||
-rw-r--r-- | p2p/src/lib.rs | 2 | ||||
-rw-r--r-- | p2p/src/listener.rs | 2 | ||||
-rw-r--r-- | p2p/src/monitor.rs | 2 | ||||
-rw-r--r-- | p2p/src/peer/peer_id.rs | 2 | ||||
-rw-r--r-- | p2p/src/protocol.rs | 2 | ||||
-rw-r--r-- | p2p/src/tls_config.rs | 2 |
10 files changed, 10 insertions, 10 deletions
diff --git a/p2p/src/backend.rs b/p2p/src/backend.rs index 56d79f7..f0740b1 100644 --- a/p2p/src/backend.rs +++ b/p2p/src/backend.rs @@ -2,7 +2,7 @@ use std::sync::Arc; use log::info; -use karyons_core::{key_pair::KeyPair, pubsub::Subscription, GlobalExecutor}; +use karyons_core::{crypto::KeyPair, pubsub::Subscription, GlobalExecutor}; use crate::{ config::Config, diff --git a/p2p/src/connector.rs b/p2p/src/connector.rs index 6fc5734..835b1c9 100644 --- a/p2p/src/connector.rs +++ b/p2p/src/connector.rs @@ -4,7 +4,7 @@ use log::{error, trace, warn}; use karyons_core::{ async_util::{Backoff, TaskGroup, TaskResult}, - key_pair::KeyPair, + crypto::KeyPair, GlobalExecutor, }; use karyons_net::{dial, tls, Conn, Endpoint, NetError}; diff --git a/p2p/src/discovery/lookup.rs b/p2p/src/discovery/lookup.rs index 60d8635..aefc3a0 100644 --- a/p2p/src/discovery/lookup.rs +++ b/p2p/src/discovery/lookup.rs @@ -5,7 +5,7 @@ use log::{error, trace}; use rand::{rngs::OsRng, seq::SliceRandom, RngCore}; use smol::lock::{Mutex, RwLock}; -use karyons_core::{async_util::timeout, key_pair::KeyPair, util::decode, GlobalExecutor}; +use karyons_core::{async_util::timeout, crypto::KeyPair, util::decode, GlobalExecutor}; use karyons_net::{Conn, Endpoint}; diff --git a/p2p/src/discovery/mod.rs b/p2p/src/discovery/mod.rs index 2c1bcd8..8091991 100644 --- a/p2p/src/discovery/mod.rs +++ b/p2p/src/discovery/mod.rs @@ -9,7 +9,7 @@ use smol::lock::Mutex; use karyons_core::{ async_util::{Backoff, TaskGroup, TaskResult}, - key_pair::KeyPair, + crypto::KeyPair, GlobalExecutor, }; diff --git a/p2p/src/lib.rs b/p2p/src/lib.rs index 6585287..39f4bc1 100644 --- a/p2p/src/lib.rs +++ b/p2p/src/lib.rs @@ -7,7 +7,7 @@ //! use easy_parallel::Parallel; //! use smol::{channel as smol_channel, future, Executor}; //! -//! use karyons_core::key_pair::{KeyPair, KeyPairType}; +//! use karyons_core::crypto::{KeyPair, KeyPairType}; //! use karyons_p2p::{Backend, Config, PeerID}; //! //! let key_pair = KeyPair::generate(&KeyPairType::Ed25519); diff --git a/p2p/src/listener.rs b/p2p/src/listener.rs index 58a0931..879f046 100644 --- a/p2p/src/listener.rs +++ b/p2p/src/listener.rs @@ -4,7 +4,7 @@ use log::{debug, error, info}; use karyons_core::{ async_util::{TaskGroup, TaskResult}, - key_pair::KeyPair, + crypto::KeyPair, GlobalExecutor, }; diff --git a/p2p/src/monitor.rs b/p2p/src/monitor.rs index 1f74503..1ea6a0b 100644 --- a/p2p/src/monitor.rs +++ b/p2p/src/monitor.rs @@ -17,7 +17,7 @@ use karyons_net::Endpoint; /// /// use smol::Executor; /// -/// use karyons_core::key_pair::{KeyPair, KeyPairType}; +/// use karyons_core::crypto::{KeyPair, KeyPairType}; /// use karyons_p2p::{Config, Backend, PeerID}; /// /// async { diff --git a/p2p/src/peer/peer_id.rs b/p2p/src/peer/peer_id.rs index 903d827..0208e05 100644 --- a/p2p/src/peer/peer_id.rs +++ b/p2p/src/peer/peer_id.rs @@ -2,7 +2,7 @@ use bincode::{Decode, Encode}; use rand::{rngs::OsRng, RngCore}; use sha2::{Digest, Sha256}; -use karyons_core::key_pair::PublicKey; +use karyons_core::crypto::PublicKey; use crate::Error; diff --git a/p2p/src/protocol.rs b/p2p/src/protocol.rs index 582502e..7261f19 100644 --- a/p2p/src/protocol.rs +++ b/p2p/src/protocol.rs @@ -37,7 +37,7 @@ impl EventValue for ProtocolEvent { /// use async_trait::async_trait; /// use smol::Executor; /// -/// use karyons_core::key_pair::{KeyPair, KeyPairType}; +/// use karyons_core::crypto::{KeyPair, KeyPairType}; /// use karyons_p2p::{ /// protocol::{ArcProtocol, Protocol, ProtocolID, ProtocolEvent}, /// Backend, PeerID, Config, Version, P2pError, ArcPeer}; diff --git a/p2p/src/tls_config.rs b/p2p/src/tls_config.rs index f3b231a..2994bcf 100644 --- a/p2p/src/tls_config.rs +++ b/p2p/src/tls_config.rs @@ -8,7 +8,7 @@ use async_rustls::rustls::{ use log::error; use x509_parser::{certificate::X509Certificate, parse_x509_certificate}; -use karyons_core::key_pair::{KeyPair, KeyPairType, PublicKey}; +use karyons_core::crypto::{KeyPair, KeyPairType, PublicKey}; use crate::{PeerID, Result}; |