top of page

How to handle password entry and storage

When a program requires password entry, along with the ability to change and save a new password, these operations can be handled by adding an edit field to a graphical page for password entry and creating a separate graphical page where the password can be modified and the new password saved.

A set of functions is also used to manage these operations.

The following example demonstrates how password entry and modification are handled in a project.

Further down, you will also find the relevant code sections written in the .c files associated with the pages.

In common.h (or in any .h files included in common):

In start.c.:

On the page_reqPassword.c page, where the user is prompted to enter a password, the my_password variable is associated with an edit field that allows the user to enter the password. A confirmation button is also provided, along with a label (label1) that displays whether the password is correct or incorrect.

On the page_modPassword.c page, where passwords can be changed, superadmin_password and manutentore_password are associated with two input fields in the graphical interface, allowing users to enter new passwords.

There is also a reset button that restores the default password characters, as well as a bitmap that can be clicked to save the newly entered passwords.

Finally, two labels display either the message "Save successful" or "Save failed".

banda 1_#rect222.png

SYEL SRL Industrial Automation Electronic Systems

PI/CF 01140840503     Via Liguria, 1     56030 Pontedera Gello (PI), Italy

Phone: ++39 0587 294096      e-mail: syel@syel.it     PEC: syel@pec.it

unique recipient code 5RUO82D

banda 2_#rect222.png

SYEL SRL Industrial Automation Electronic Systems

PI/CF 01140840503     Via Liguria, 1     56030 Pontedera Gello (PI), Italy

Phone: ++39 0587 294096      e-mail: syel@syel.it     PEC: syel@pec.it

unique recipient code 5RUO82D

bottom of page