joining server works but...

durian is POS
This commit is contained in:
2024-10-13 11:56:01 -04:00
Unverified
parent 87b3125f8e
commit 3d2445c94c
12 changed files with 243 additions and 82 deletions

View File

@@ -5,3 +5,5 @@ edition = "2021"
[dependencies]
serde = { version = "1.0.203", features = ["derive"] }
sha3 = "0.10.8"
hex = "0.4.3"

View File

@@ -1 +1,9 @@
pub mod types;
use sha3::digest::Update;
use sha3::{Digest, Sha3_256};
pub mod types;
pub fn stoken(token: &str, serverid: &str, domain: &str, port: u16) -> String {
let hash = Sha3_256::new().chain(format!("{}{}{}{}", token, serverid, domain, port)).finalize();
hex::encode(hash)
}

View File

@@ -23,4 +23,5 @@ pub enum ErrorCode {
MalformedDBResponse,
RPCError,
UnableToConnectToServer,
}