Using datetime encryption and handshakes to prevent Man-In-The-Middle attack, incorporated with a downloading system for softwares. Codes need to be adjusted for personal use.
encrypted_get_returnstring
string s = WebUtils.encrypted_get_returnstring($"{WebUtils.siteaddress}/test", "abcdefghijklmnop");
RespondString("asd","abcdefghijklmnop",res)
encrypted_get_returnobject
testclass s = WebUtils.encrypted_get_returnobject<testclass>($"{WebUtils.siteaddress}/test", "abcdefghijklmnop");
ConfigManager.config = WebUtils.encrypted_get_returnobject<RecoilConfig>($"{WebUtils.siteaddress}/test", "abcdefghijklmnop");
let j1 = JSONtoObject("asd.json")
let j2 = JSONtoObject("sad.json")
let a = [j1,j2]
let j = {
configs: a
}
RespondObject(j,"abcdefghijklmnop",res)
encrypted_post_returnstring
testclass tc = new testclass();
tc.a = "a";
tc.b = "b";
string s = WebUtils.encrypted_post_returnstring<testclass>($"{WebUtils.siteaddress}/test2", "abcdefghijklmnop", tc, "abcdefghijklmnop", "abcdefghijklmnop");
let decrytped = DecryptPostObject(req.body,"abcdefghijklmnop","abcdefghijklmnop","abcdefghijklmnop")
console.log(decrytped)
RespondString("asd",decrytped.time, res)
encrypted_post_returnobject
testclass ts = WebUtils.encrypted_post_returnobject($"{WebUtils.siteaddress}/test2", "abcdefghijklmnop", tc, "abcdefghijklmnop", "abcdefghijklmnop");
let decrytped = DecryptPostObject(req.body,"abcdefghijklmnop","abcdefghijklmnop","abcdefghijklmnop")
console.log(decrytped)
RespondObject({a:"asd",b:"sss"},decrytped.time,res)