joining server works but...
durian is POS
This commit is contained in:
@@ -5,3 +5,5 @@ edition = "2021"
|
||||
|
||||
[dependencies]
|
||||
serde = { version = "1.0.203", features = ["derive"] }
|
||||
sha3 = "0.10.8"
|
||||
hex = "0.4.3"
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
@@ -23,4 +23,5 @@ pub enum ErrorCode {
|
||||
MalformedDBResponse,
|
||||
|
||||
RPCError,
|
||||
UnableToConnectToServer,
|
||||
}
|
||||
Reference in New Issue
Block a user