Documentation  |   Table of Contents   |  < Previous   |  Next >   |  Index

13    Password

Security and Cryptography

Exploring Palm OS

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 ^TOP^

Miscellaneous Password Constants ^TOP^

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 ^TOP^

PwdExists Function ^TOP^

Purpose

Determine if the system password is set.

Declared In

Password.h

Prototype

Boolean PwdExists (
   void
)

Parameters

None.

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 ^TOP^

Purpose

Remove the encrypted password string and recover data hidden in databases.

Declared In

Password.h

Prototype

void PwdRemove (
   void
)

Parameters

None.

Returns

Nothing.

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 ^TOP^

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

Nothing.

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 ^TOP^

Purpose

Verify that a passed string matches the system password.

Declared In

Password.h

Prototype

Boolean PwdVerify (
   char *string
)

Parameters

string
String to compare to the system password. NULL means no current password.

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.