Removed multiplayer_auth::server_id_hash
This commit is contained in:
parent
03be1055d5
commit
08848a0a95
|
@ -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"
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue