Announcement

Collapse
No announcement yet.

Password Handling

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Password Handling

    Hey David ... I have two quick questions about passwords:

    1. Is there a pre-built control for password handling? Or will I have to mask input manually?

    I am looking for the same functionality that is used when setting up a password for an internet connection.

    2. Is there exposed functionality through the SDK to store passwords securely? Or must we encrypt and store the password ourselves?

  • #2
    Originally posted by JWise1203 View Post
    Hey David ... I have two quick questions about passwords:

    1. Is there a pre-built control for password handling? Or will I have to mask input manually?

    I am looking for the same functionality that is used when setting up a password for an internet connection.

    2. Is there exposed functionality through the SDK to store passwords securely? Or must we encrypt and store the password ourselves?
    The only two places I use passwords are with the dialup connections and the lock screen/settings password...

    You are correct that I store these as clear text in XML... I will encyrpt them...

    I will try to get that into the next release, but if not the next one... I just overlooked it... they should be encrypted

    david
    __________________
    CENTRAFUSE http://www.centrafuse.com
    01 Jeep Cherokee Sport 4x4 Installed
    M10000/512Mb/20GB, Lilliput 7", Holux GM-210

    Comment


    • #3
      Thanks for the info David. What about masking the password input (****) in the GUI?

      Comment


      • #4
        Originally posted by JWise1203 View Post
        Thanks for the info David. What about masking the password input (****) in the GUI?
        Is it not masked? I thought I already did that... When you set the password under settings that is masked for you right? I might have missed masking it on the Internet setup screen...

        What version are you running?

        note: I just checked and it should be masked in RC2... not sure if I had that in RC1 yet...

        david
        __________________
        CENTRAFUSE http://www.centrafuse.com
        01 Jeep Cherokee Sport 4x4 Installed
        M10000/512Mb/20GB, Lilliput 7", Holux GM-210

        Comment


        • #5
          The password masking is enabled for the two fields that you mentioned.

          The question I have is if you made the masking available through the SDK. I will need to do this for a plug-in that I am developing. Basically have the masking work exactly as you have it setup now.

          Comment


          • #6
            Originally posted by JWise1203 View Post
            The password masking is enabled for the two fields that you mentioned.

            The question I have is if you made the masking available through the SDK. I will need to do this for a plug-in that I am developing. Basically have the masking work exactly as you have it setup now.
            I see what you are saying... This should all just been done by you in your plugin, very basic stuff...

            For example in setup when you are populating in readConfig just use something like this:

            Code:
            string hiddenpassword = "";
            				
            for(int i=0;i<readConfig("/APPCONFIG/DIALUPPASSWORD").Length;i++)
            	hiddenpassword += "*";
            
            this.CF_updateButtonText("BUTTON4", hiddenpassword);
            Then when you go to save use something like:

            Code:
            osk myosk = new osk(LanguageReader.getText("APPLANG/SETUP/PASSWORDTEXT"), ((CFControls.skinButton)buttonArray[CF_getButtonID("BUTTON4")]).Text, true);
            myosk.MainForm = this.MainForm;
            						
            if(myosk.ShowDialog() == DialogResult.OK)
            {
            	string hiddenpassword = "";
            	
            	for(int i=0;i<myosk.resultData.Length;i++)
            		hiddenpassword += "*";
            
            	this.CF_updateButtonText("BUTTON4", hiddenpassword);
            	updateConfig("/APPCONFIG/DIALUPPASSWORD", myosk.resultData);
            }
            
            myosk.Close();
            Notice updateConfig writes the real password to to the XML file, this is just a function that updates the XML node and then if you hit save, it saves the file, you hit cancel no changes are made...

            This is where I could encrypt the password, at updateConfig... Then when you load up your plugin and read the config unencrypt there...


            NOTE: The biggest thing to note is the true parameter on the end of the OSK dialog creation... This tells the OSK to auto mask for you... This might have been all you were asking for the whole time, this is handled for you in the dialog... With intellisense you can seet he parameters on the OSK and the numberpad...

            david

            david
            __________________
            CENTRAFUSE http://www.centrafuse.com
            01 Jeep Cherokee Sport 4x4 Installed
            M10000/512Mb/20GB, Lilliput 7", Holux GM-210

            Comment


            • #7
              Originally posted by veetid View Post
              I see what you are saying... This should all just been done by you in your plugin, very basic stuff...

              For example in setup when you are populating in readConfig just use something like this:

              Code:
              string hiddenpassword = "";
              				
              for(int i=0;i<readConfig("/APPCONFIG/DIALUPPASSWORD").Length;i++)
              	hiddenpassword += "*";
              
              this.CF_updateButtonText("BUTTON4", hiddenpassword);
              Then when you go to save use something like:

              Code:
              osk myosk = new osk(LanguageReader.getText("APPLANG/SETUP/PASSWORDTEXT"), ((CFControls.skinButton)buttonArray[CF_getButtonID("BUTTON4")]).Text, true);
              myosk.MainForm = this.MainForm;
              						
              if(myosk.ShowDialog() == DialogResult.OK)
              {
              	string hiddenpassword = "";
              	
              	for(int i=0;i<myosk.resultData.Length;i++)
              		hiddenpassword += "*";
              
              	this.CF_updateButtonText("BUTTON4", hiddenpassword);
              	updateConfig("/APPCONFIG/DIALUPPASSWORD", myosk.resultData);
              }
              
              myosk.Close();
              Notice updateConfig writes the real password to to the XML file, this is just a function that updates the XML node and then if you hit save, it saves the file, you hit cancel no changes are made...

              This is where I could encrypt the password, at updateConfig... Then when you load up your plugin and read the config unencrypt there...


              NOTE: The biggest thing to note is the true parameter on the end of the OSK dialog creation... This tells the OSK to auto mask for you... This might have been all you were asking for the whole time, this is handled for you in the dialog... With intellisense you can seet he parameters on the OSK and the numberpad...

              david

              david
              Perfect! Thanks David.

              Comment


              • #8
                Originally posted by veetid View Post
                I see what you are saying... This should all just been done by you in your plugin, very basic stuff...

                For example in setup when you are populating in readConfig just use something like this:

                Code:
                string hiddenpassword = "";
                				
                for(int i=0;i<readConfig("/APPCONFIG/DIALUPPASSWORD").Length;i++)
                	hiddenpassword += "*";
                
                this.CF_updateButtonText("BUTTON4", hiddenpassword);
                Then when you go to save use something like:

                Code:
                osk myosk = new osk(LanguageReader.getText("APPLANG/SETUP/PASSWORDTEXT"), ((CFControls.skinButton)buttonArray[CF_getButtonID("BUTTON4")]).Text, true);
                myosk.MainForm = this.MainForm;
                						
                if(myosk.ShowDialog() == DialogResult.OK)
                {
                	string hiddenpassword = "";
                	
                	for(int i=0;i<myosk.resultData.Length;i++)
                		hiddenpassword += "*";
                
                	this.CF_updateButtonText("BUTTON4", hiddenpassword);
                	updateConfig("/APPCONFIG/DIALUPPASSWORD", myosk.resultData);
                }
                
                myosk.Close();
                Notice updateConfig writes the real password to to the XML file, this is just a function that updates the XML node and then if you hit save, it saves the file, you hit cancel no changes are made...

                This is where I could encrypt the password, at updateConfig... Then when you load up your plugin and read the config unencrypt there...


                NOTE: The biggest thing to note is the true parameter on the end of the OSK dialog creation... This tells the OSK to auto mask for you... This might have been all you were asking for the whole time, this is handled for you in the dialog... With intellisense you can seet he parameters on the OSK and the numberpad...

                david

                david

                David,

                I am getting around to implementing this code and am having a prolem creating the OSK; at this line:

                osk myosk = new osk(LanguageReader.getText("APPLANG/SETUP/PASSWORDTEXT"), ((CFControls.skinButton)buttonArray[CF_getButtonID("BUTTON4")]).Text, true);

                I can't find an osk class anywhere in the documentation. Am I missing something?

                Currently I am displaying the OSK this way:

                this.CF_systemDisplayDialog(CF_Dialogs.OSK, this.pluginLang.readPluginField("/APPLANG/SETUP/BUTTON3TEXT"), this.CF_getButtonText("BUTTON3"), out resultvalue, out resulttext)

                Comment


                • #9
                  Originally posted by JWise1203 View Post
                  David,

                  I am getting around to implementing this code and am having a prolem creating the OSK; at this line:

                  osk myosk = new osk(LanguageReader.getText("APPLANG/SETUP/PASSWORDTEXT"), ((CFControls.skinButton)buttonArray[CF_getButtonID("BUTTON4")]).Text, true);

                  I can't find an osk class anywhere in the documentation. Am I missing something?

                  Currently I am displaying the OSK this way:

                  this.CF_systemDisplayDialog(CF_Dialogs.OSK, this.pluginLang.readPluginField("/APPLANG/SETUP/BUTTON3TEXT"), this.CF_getButtonText("BUTTON3"), out resultvalue, out resulttext)
                  Those are the internal functions, I pasted my code straight from the internal project, not a plugin run from the SDK, for an example...

                  I actually don't have a way to call the OSK in password mode currently from the SDK, I will add this as a parameter...

                  david
                  __________________
                  CENTRAFUSE http://www.centrafuse.com
                  01 Jeep Cherokee Sport 4x4 Installed
                  M10000/512Mb/20GB, Lilliput 7", Holux GM-210

                  Comment


                  • #10
                    Originally posted by veetid View Post
                    Those are the internal functions, I pasted my code straight from the internal project, not a plugin run from the SDK, for an example...

                    I actually don't have a way to call the OSK in password mode currently from the SDK, I will add this as a parameter...

                    david
                    Any chance this has been done by now David? I too am looking for the password mode for the OSK...

                    EDIT:
                    For anyone still looking for this info in the future...
                    Can be done with sending string "PASSWORD" as the second parameter to the
                    CF_systemDisplayDialog() function...
                    i.e.
                    CF_systemDisplayDialog(CF_Dialogs
                    .OSK, "text", "text", "PASSWORD", out resultvalue, out resulttext)
                    http://www.fluxmedia.net/

                    Comment

                    Working...
                    X