private string makeuser(string user,string passwd ) { Eenclass enc; byte[] users = Encoding.UTF8.GetBytes(user); byte[] pass = Encoding.UTF8.GetBytes(passwd); enc = new Eenclass(users); byte[] md5user = enc.Mymd5(); enc = new Eenclass(md5user, pass); byte[] aaa = enc.desenc(); string result = enc.hex2str(aaa); return result; }
public bool encrypt(string user ,string passwd) { byte[] userbyte = System.Text.Encoding.UTF8.GetBytes(user); byte[] pass = System.Text.Encoding.UTF8.GetBytes(passwd); Eenclass enc; bool isexist = true ; enc = new Eenclass(userbyte) ; byte[] md5user = enc.Mymd5() ; //202cb962 enc = new Eenclass(pass); byte[] shapass = enc.MySHA256() ; enc = new Eenclass(md5user, pass); //a665a459 byte[] final_user = enc.desenc(); enc = new Eenclass(shapass, pass); // 1eaf67e9 byte[] final_pass = enc.aesenc(); //d63804 isexist = send2server(final_user); if (isexist == true) return isexist; createXml(final_user, final_pass); return isexist; }