
32
"C" Programming Guide For Optimus S/R
3.1.5 Security
To provide the System Menu with password protection so that unauthorized users cannot
gain access to it, you may either directly enable the password protection mechanism from
the System Menu, or through programming.
In addition, a number of security-related functions are available for using the same
password to protect your own application.
CheckPasswordActive
Purpose
To check if the system password is enabled.
Syntax
int CheckPasswordActive (void);
Example
if (CheckPasswordActive())
printf ("Please input password:");
Description
This routine detects whether the system password is enabled or not.
By default, the System Menu is not password-protected.
Return
If enabled, it returns 1.
Otherwise, it returns 0 (i.e. no password required).
See Also
CheckSysPassword, InputPassword, SaveSysPassword
CheckSysPassword
Purpose
To check if the input string matches the system password.
Syntax
int CheckSysPassword (const char *psw);
Example
if (!CheckSysPassword (szInput))
printf ("Password incorrect!!!");
Description
If the system password is enabled and you want to use the same password to
protect your application, then this routine can be used to check if the input
string matches the system password.
Return
If matching, it returns 1.
Otherwise, it returns 0.
See Also
CheckPasswordActive, InputPassword, SaveSysPassword
InputPassword
Purpose
To let the user input the password.
Summary of Contents for Optimus R
Page 1: ...Printed on 20 March 2006 C Programming Guide Version 3 04 02 Optimus S Optimus R...
Page 6: ......
Page 8: ...2 C Programming Guide For Optimus S R...
Page 12: ...6 C Programming Guide For Optimus S R The flow is illustrated as shown below...
Page 23: ...Chapter 2 Development Environment 17 Different types signed unsigned Different types same size...
Page 24: ...18 C Programming Guide For Optimus S R...
Page 220: ...214 C Programming Guide For Optimus S R See Also FlashSize free_memory...