Пример #1
0
 /// <summary>
 /// Get RSA encrypted password.
 /// </summary>
 /// <param name="password"></param>
 /// <returns></returns>
 private string get_pwa_rsa(string password)
 {
     RSAHelper rsa = new RSAHelper ();
     rsa.SetPublic (weibo_rsa_n, "10001");
     string data = servertime + "\t" + nonce + "\n" + password;
     return rsa.Encrypt (data).ToLower ();
 }
Пример #2
0
        /// <summary>
        /// 获取RSA加密后的密码密文
        /// </summary>
        /// <param name="password"></param>
        /// <returns></returns>
        private string get_pwa_rsa(string password)
        {
            RSAHelper rsaHelper = new RSAHelper();
            rsaHelper.SetPublic(rsa_pub_baidu.Substring(0, rsa_pub_baidu.LastIndexOf('-') + 1));

            return rsaHelper.Encrypt(password);
        }