From 08848a0a95b338bdaead303ac646cb3347cf1af6 Mon Sep 17 00:00:00 2001 From: Kyler <59854022+KylerOlsen@users.noreply.github.com> Date: Sun, 2 Jun 2024 21:32:52 -0600 Subject: [PATCH] Removed multiplayer_auth::server_id_hash --- Cargo.toml | 3 --- src/multiplayer_auth.rs | 14 -------------- 2 files changed, 17 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 74b126a..60128d1 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -11,6 +11,3 @@ tokio = { version = "1", features = ["full"] } serde = { version = "1", features = ["derive"] } serde_json = "1" base64 = "0.21.5" -crypto = { version = "0.5.1", features = ["digest"] } -sha1 = "0.10.6" -num-bigint = "0.4.5" diff --git a/src/multiplayer_auth.rs b/src/multiplayer_auth.rs index d34f3b2..fb3ef16 100644 --- a/src/multiplayer_auth.rs +++ b/src/multiplayer_auth.rs @@ -5,9 +5,6 @@ use std::fmt; use reqwest; use serde::{Serialize, Deserialize}; -use crypto::digest::Digest; -use sha1::Sha1; -use num_bigint::BigInt; use crate::accounts::{ ProfileProperty, @@ -29,17 +26,6 @@ impl fmt::Display for AuthError { } impl std::error::Error for AuthError {} -pub async fn server_id_hash( - server_id: &[u8], - shared_secret: &[u8], - public_key: &[u8], -) -> String { - let hash_data = [server_id,shared_secret,public_key].concat(); - let hash = BigInt::from_signed_bytes_be( - &Sha1::digest(hash_data)).to_str_radix(16); - hash -} - #[derive(Serialize, Deserialize)] struct PlayerJoining { pub accessToken: String,