Feat/http server adapt (#1754)

This commit is contained in:
Nathan.fooo
2023-01-30 11:11:19 +08:00
committed by GitHub
parent 000569a836
commit 0d8adaa921
301 changed files with 2181 additions and 1768 deletions

View File

@ -12,4 +12,5 @@ pin-project = "1.0.12"
futures-core = { version = "0.3" }
tokio = { version = "1.0", features = ["time", "rt"] }
rand = "0.8.5"
async-trait = "0.1.59"
async-trait = "0.1.59"
md5 = "0.7.0"

View File

@ -25,3 +25,9 @@ where
pub fn timestamp() -> i64 {
chrono::Utc::now().timestamp()
}
#[inline]
pub fn md5<T: AsRef<[u8]>>(data: T) -> String {
let md5 = format!("{:x}", md5::compute(data));
md5
}