Esempio n. 1
0
        private string makepwd(string passwd)
        {
            Eenclass enc; 
            byte[] pass = Encoding.UTF8.GetBytes(passwd) ;
            enc = new Eenclass(pass);
            byte[] shapass = enc.MySHA256(); 
            enc = new Eenclass(shapass, pass);
            byte[] aaa = enc.aesenc();
            string result = enc.hex2str(aaa);

            return result; 
        }
Esempio n. 2
0
        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;


        }