/// <summary>
 /// 验证密码是否正确
 /// </summary>
 /// <param name="password"></param>
 /// <returns></returns>
 public Boolean VerificationPassword(String password)
 {
     if (String.IsNullOrEmpty(Password))
     {
         return(false);
     }
     return(Password.Equals(MD5CryptoHelper.Encrypto(password)));
 }
예제 #2
0
        private static void ReadRegistryKeys()
        {
            string conectionStringEncrypted = GepaRegistryKeyManager.GetStringValueOfKey(_CONNECTION_STRING_KEY_VALUE_NAME);
            string providerNameEncrypted    = GepaRegistryKeyManager.GetStringValueOfKey(_PROVAIDER_KEY_VALUE_NAME);
            string identityStringEncrypted  = GepaRegistryKeyManager.GetStringValueOfKey(_IDENTITY_CONNECTION_STRING_KEY_VALUE_NAME);
            string googleClientEncrypted    = GepaRegistryKeyManager.GetStringValueOfKey(_GOOLGE_CLIENT_KEY_NAME);

            IEncryptionHelper encryptor = new MD5CryptoHelper();

            _CONNECTION_STRING          = encryptor.DescryptString(conectionStringEncrypted);
            _PROVIDER_NAME              = encryptor.DescryptString(providerNameEncrypted);
            _IDENTITY_CONNECTION_STRING = encryptor.DescryptString(identityStringEncrypted);
            _GOOGLE_CLIENT              = encryptor.DescryptString(googleClientEncrypted);
        }
 public static String CreateSignKey(String password)
 {
     return(MD5CryptoHelper.Encrypto(password));
 }
 /// <summary>
 /// 修改密码
 /// </summary>
 /// <param name="password"></param>
 public void UpdatePassword(String password)
 {
     Password = MD5CryptoHelper.Encrypto(password);
 }