The APIs declared in Password.h
and documented in this chapter are provided for compatibility with previous versions of Palm OS. Applications written specifically for Palm OS Cobalt should make use of the Authentication Manager instead.
The contents of this chapter are organized into the following sections:
Password Constants
Password Functions and Macros
The header file Password.h
declares the API that this chapter describes.
Password Constants
Miscellaneous Password Constants
Purpose
The following constants are declared in Password.h
.
Declared In
Password.h
Constants
-
#define pwdLength 32
- The maximum length of the password string passed to
PwdVerify()
.
Password Functions and Macros
PwdExists Function
Purpose
Determine if the system password is set.
Declared In
Password.h
Prototype
Boolean PwdExists ( void )
Parameters
Returns
Returns true
if the system password is set, false
otherwise.
Compatibility
This function is provided for compatibility with previous versions of Palm OS only. Palm OS Cobalt applications should make use of the APIs provided by the Authentication Manager instead.
PwdRemove Function
Purpose
Remove the encrypted password string and recover data hidden in databases.
Declared In
Password.h
Prototype
void PwdRemove ( void )
Parameters
Returns
Comments
IMPORTANT: When called from the main application thread, this function may block. While blocked, the application will not receive events and won't redraw its windows. As well, deferred sublaunches and notifications won't execute while the main application thread is blocked.
Compatibility
This function is provided for compatibility with previous versions of Palm OS only. Palm OS Cobalt applications should make use of the APIs provided by the Authentication Manager instead.
PwdSet Function
Purpose
Use a passed string as the new password.
Declared In
Password.h
Prototype
void PwdSet ( char*oldPassword
, char*newPassword
)
Parameters
-
→ oldPassword
- The old password. It must be successfully verified or the new password isn't accepted
-
→ newPassword
- A string to use as the password.
NULL
means no password.
Returns
Comments
The password is stored in an encrypted form.
IMPORTANT: When called from the main application thread, this function may block. While blocked, the application will not receive events and won't redraw its windows. As well, deferred sublaunches and notifications won't execute while the main application thread is blocked.
Compatibility
This function is provided for compatibility with previous versions of Palm OS only. Palm OS Cobalt applications should make use of the APIs provided by the Authentication Manager instead.
PwdVerify Function
Purpose
Verify that a passed string matches the system password.
Declared In
Password.h
Prototype
Boolean PwdVerify (
char *string
)
Parameters
Returns
Returns true
if the string matches the system password.
Comments
IMPORTANT: When called from the main application thread, this function may block. While blocked, the application will not receive events and won't redraw its windows. As well, deferred sublaunches and notifications won't execute while the main application thread is blocked.
Compatibility
This function is provided for compatibility with previous versions of Palm OS only. Palm OS Cobalt applications should make use of the APIs provided by the Authentication Manager instead.