Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
721 changes: 444 additions & 277 deletions Cargo.lock

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion packages/test-helpers/src/random.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//! Random data generators for testing.
use rand::distr::Alphanumeric;
use rand::{rng, Rng};
use rand::{rng, RngExt};

/// Returns a random alphanumeric string of a certain size.
///
Expand Down
2 changes: 1 addition & 1 deletion packages/tracker-core/src/authentication/key/peer_key.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ use std::time::Duration;

use derive_more::Display;
use rand::distr::Alphanumeric;
use rand::{rng, Rng};
use rand::{rng, RngExt};
use serde::{Deserialize, Serialize};
use thiserror::Error;
use torrust_tracker_clock::conv::convert_from_timestamp_to_datetime_utc;
Expand Down
2 changes: 1 addition & 1 deletion packages/tracker-core/src/test_helpers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ pub(crate) mod tests {

use aquatic_udp_protocol::{AnnounceEvent, NumberOfBytes, PeerId};
use bittorrent_primitives::info_hash::InfoHash;
use rand::Rng;
use rand::RngExt;
use torrust_tracker_configuration::Configuration;
#[cfg(test)]
use torrust_tracker_configuration::Core;
Expand Down
3 changes: 2 additions & 1 deletion packages/udp-tracker-core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,10 @@ bittorrent-tracker-core = { version = "3.0.0-develop", path = "../tracker-core"
bittorrent-udp-tracker-protocol = { version = "3.0.0-develop", path = "../udp-protocol" }
bloom = "0.3.2"
blowfish = "0"
cipher = "0"
cipher = "0.4"
criterion = { version = "0.5.1", features = ["async_tokio"] }
futures = "0"
generic-array = "0"
lazy_static = "1"
rand = "0"
serde = "1.0.219"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
//! application starts and are not persisted anywhere.

use blowfish::BlowfishLE;
use cipher::generic_array::GenericArray;
use cipher::{BlockSizeUser, KeyInit};
use generic_array::GenericArray;
use rand::rngs::ThreadRng;
use rand::Rng;
use rand::RngExt;

pub type Seed = [u8; 32];
pub type CipherBlowfish = BlowfishLE;
Expand Down
4 changes: 3 additions & 1 deletion packages/udp-tracker-core/src/crypto/keys.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
//!
//! It also provides the logic for the cipher for encryption and decryption.

use cipher::{BlockDecrypt, BlockEncrypt};

use self::detail_cipher::CURRENT_CIPHER;
use self::detail_seed::CURRENT_SEED;
pub use crate::crypto::ephemeral_instance_keys::CipherArrayBlowfish;
Expand All @@ -13,7 +15,7 @@ use crate::crypto::ephemeral_instance_keys::{CipherBlowfish, Seed, RANDOM_CIPHER
/// This trait is for structures that can keep and provide a seed.
pub trait Keeper {
type Seed: Sized + Default + AsMut<[u8]>;
type Cipher: cipher::BlockCipher;
type Cipher: BlockEncrypt + BlockDecrypt;

/// It returns a reference to the seed that is keeping.
fn get_seed() -> &'static Self::Seed;
Expand Down
2 changes: 1 addition & 1 deletion src/console/ci/e2e/tracker_container.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use std::time::Duration;

use rand::distr::Alphanumeric;
use rand::Rng;
use rand::RngExt;

use super::docker::{RunOptions, RunningContainer};
use super::logs_parser::RunningServices;
Expand Down