Removed multiplayer_auth::server_id_hash

This commit is contained in:
Kyler 2024-06-02 21:32:52 -06:00
parent 03be1055d5
commit 08848a0a95
2 changed files with 0 additions and 17 deletions

View File

@ -11,6 +11,3 @@ tokio = { version = "1", features = ["full"] }
serde = { version = "1", features = ["derive"] } serde = { version = "1", features = ["derive"] }
serde_json = "1" serde_json = "1"
base64 = "0.21.5" base64 = "0.21.5"
crypto = { version = "0.5.1", features = ["digest"] }
sha1 = "0.10.6"
num-bigint = "0.4.5"

View File

@ -5,9 +5,6 @@
use std::fmt; use std::fmt;
use reqwest; use reqwest;
use serde::{Serialize, Deserialize}; use serde::{Serialize, Deserialize};
use crypto::digest::Digest;
use sha1::Sha1;
use num_bigint::BigInt;
use crate::accounts::{ use crate::accounts::{
ProfileProperty, ProfileProperty,
@ -29,17 +26,6 @@ impl fmt::Display for AuthError {
} }
impl std::error::Error 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)] #[derive(Serialize, Deserialize)]
struct PlayerJoining { struct PlayerJoining {
pub accessToken: String, pub accessToken: String,