Tizen Native API
Password policy group

Password policy group provides APIs to control password policies.

Required Header

#include <dpm/password.h>

Overview

Password policy group provides APIs to control password policies such as password type, password quality and expiration date. Any API which requires privileges is only available for the registered device admin client which is enrolled to the device by enrollment process.

Functions

int dpm_password_set_quality (device_policy_manager_h handle, int quality)
 Sets password quality.
int dpm_password_get_quality (device_policy_manager_h handle, int *quality)
 Gets password quality.
int dpm_password_set_minimum_length (device_policy_manager_h handle, int value)
 Sets password minimum length.
int dpm_password_get_minimum_length (device_policy_manager_h handle, int *value)
 Gets password minimum length.
int dpm_password_set_min_complex_chars (device_policy_manager_h handle, int value)
 Sets minimum complex char in password.
int dpm_password_get_min_complex_chars (device_policy_manager_h handle, int *value)
 Gets minimum complex char in password.
int dpm_password_set_maximum_failed_attempts_for_wipe (device_policy_manager_h handle, int value)
 Sets maximum number of failed attempts before device is wiped.
int dpm_password_get_maximum_failed_attempts_for_wipe (device_policy_manager_h handle, int *value)
 Gets maximum number of failed attempts before device is wiped.
int dpm_password_set_expires (device_policy_manager_h handle, int value)
 Sets the number of days password expires.
int dpm_password_get_expires (device_policy_manager_h handle, int *value)
 Gets the number of days password expires.
int dpm_password_set_history (device_policy_manager_h handle, int value)
 Sets the number of min password history to avoid previous password.
int dpm_password_get_history (device_policy_manager_h handle, int *value)
 Gets the number of min password history to avoid previous password.
int dpm_password_set_pattern (device_policy_manager_h handle, const char *pattern)
 Sets the required password pattern.
int dpm_password_reset (device_policy_manager_h handle, const char *password)
 Resets password.
int dpm_password_enforce_change (device_policy_manager_h handle)
 Enforces password change.
int dpm_password_set_max_inactivity_time_device_lock (device_policy_manager_h handle, int value)
 Sets the maximum number of seconds of inactivity time before the screen timeout occurs.
int dpm_password_get_max_inactivity_time_device_lock (device_policy_manager_h handle, int *value)
 Gets the maximum number of seconds of inactivity time before the screen timeout occurs.
int dpm_password_set_status (device_policy_manager_h handle, dpm_password_status_e status)
 Sets password status.
int dpm_password_get_status (device_policy_manager_h handle, dpm_password_status_e *status)
 Gets password status.
int dpm_password_delete_pattern (device_policy_manager_h handle)
 Removes all password patterns.
int dpm_password_get_pattern (device_policy_manager_h handle, char **pattern)
 Gets password pattern.
int dpm_password_set_maximum_character_occurrences (device_policy_manager_h handle, int value)
 Sets the maximum number of times a character can occur in the device password.
int dpm_password_get_maximum_character_occurrences (device_policy_manager_h handle, int *value)
 Gets the maximum number of times a character can occur in the device password.
int dpm_password_set_maximum_numeric_sequence_length (device_policy_manager_h handle, int value)
 Sets the maximum length of the numeric sequence which is allowed in the device password.
int dpm_password_get_maximum_numeric_sequence_length (device_policy_manager_h handle, int *value)
 Gets the maximum numeric sequence length allowed in the device password.
dpm_password_iterator_h dpm_password_create_iterator (device_policy_manager_h handle)
 Creates a password forbidden string list iterator.
int dpm_password_iterator_next (dpm_password_iterator_h iter, const char **forbidden_string)
 Fetches a password forbidden string and forwards the iterator.
int dpm_password_destroy_iterator (dpm_password_iterator_h iter)
 Frees the password forbidden string iterator.
int dpm_password_set_forbidden_strings (device_policy_manager_h handle, const char *strings[], int length)
 Sets strings which are forbidden in the device password.

Typedefs

typedef void * dpm_password_iterator_h
 The password forbidden string list iterator handle.

Typedef Documentation

typedef void* dpm_password_iterator_h

The password forbidden string list iterator handle.

Since :
3.0
See also:
dpm_password_create_iterator()
dpm_password_iterator_next()
dpm_password_destroy_iterator()

Enumeration Type Documentation

Enumeration for dpm password quality type.

Since :
3.0
Enumerator:
DPM_PASSWORD_QUALITY_UNSPECIFIED 

No requirements for password.

DPM_PASSWORD_QUALITY_SIMPLE_PASSWORD 

EAS(Exchange ActiveSync) requirement for simple password

DPM_PASSWORD_QUALITY_SOMETHING 

Some kind password is required, but doesn't care what it is

DPM_PASSWORD_QUALITY_NUMERIC 

Containing at least numeric characters

DPM_PASSWORD_QUALITY_ALPHABETIC 

Containing at least alphabetic (or other symbol) characters

DPM_PASSWORD_QUALITY_ALPHANUMERIC 

Containing at least numeric and alphabetic characters

Enumeration for dpm password status type.

Since :
3.0
Enumerator:
DPM_PASSWORD_STATUS_NORMAL 

Password normal status

DPM_PASSWORD_STATUS_CHANGED 

Password successfully changed

DPM_PASSWORD_STATUS_NOT_CHANGED 

Password not changed

DPM_PASSWORD_STATUS_CHANGE_REQUIRED 

Password change required

DPM_PASSWORD_STATUS_MAX_ATTEMPTS_EXCEEDED 

Password Max Attempts Exceeded

DPM_PASSWORD_STATUS_EXPIRED 

Password expired

DPM_PASSWORD_STATUS_RECOVERY_PASSWORD_FAILED 

Device unlock failed by Password Recovery

DPM_PASSWORD_STATUS_RECOVERY_PASSWORD_SUCCEEDED 

Device unlock succeeded by Password Recovery

DPM_PASSWORD_STATUS_QUALITY_CHANGED 

Password quality successfully changed

DPM_PASSWORD_STATUS_MIN_LENGTH_CHANGED 

Password min_length successfully changed

DPM_PASSWORD_STATUS_COMPLEX_CHAR_CHANGED 

Password complex_char successfully changed

DPM_PASSWORD_STATUS_PATTERN_CHANGED 

Password pattern successfully changed


Function Documentation

Creates a password forbidden string list iterator.

Warning:
This is not for use by third-party applications.

The password forbidden string list iterator can be used to get all forbidden strings.

Since :
3.0
Privilege Level:
partner
Privilege:
http://tizen.org/privilege/dpm.password
Parameters:
[in]handleDevice policy manager handle
Returns:
A password forbidden string list iterator on success, otherwise null value
Remarks:
The specific error code can be obtained by using the get_last_result() method. Error codes are described in exception section. The returned iterator should be released using dpm_password_destroy_iterator().
Exceptions:
DPM_ERROR_NONENo error
DPM_ERROR_OUT_OF_MEMORYOut of memory
DPM_ERROR_INVALID_PARAMETERInvalid parameter
DPM_ERROR_TIMED_OUTTime out
DPM_ERROR_PERMISSION_DENIEDThe application does not have the privilege to call this API
Precondition:
The handle must be created by dpm_manager_create().
See also:
dpm_manager_create()
dpm_password_iterator_next()
dpm_password_destroy_iterator()
get_last_result()

Removes all password patterns.

Warning:
This is not for use by third-party applications.

An administrator can remove all password patterns.

Since :
3.0
Privilege Level:
partner
Privilege:
http://tizen.org/privilege/dpm.password
Parameters:
[in]handleDevice policy manager handle
Returns:
DPM_ERROR_NONE on success, otherwise a negative value
Return values:
DPM_ERROR_NONESuccessful
DPM_ERROR_INVALID_PARAMETERInvalid parameter
DPM_ERROR_TIMED_OUTTime out
DPM_ERROR_PERMISSION_DENIEDThe application does not have the privilege to call this API
Precondition:
The handle must be created by dpm_manager_create().
See also:
dpm_manager_create()

Frees the password forbidden string iterator.

Warning:
This is not for use by third-party applications.

This API frees the password forbidden string iterator. This API must be called if the iterator no longer used.

Since :
3.0
Privilege Level:
partner
Privilege:
http://tizen.org/privilege/dpm.password
Parameters:
[in]iterThe iterator to be removed
Returns:
DPM_ERROR_NONE on success, otherwise a negative value
Return values:
DPM_ERROR_NONESuccessful
DPM_ERROR_INVALID_PARAMETERInvalid parameter
DPM_ERROR_TIMED_OUTTime out
DPM_ERROR_PERMISSION_DENIEDThe application does not have the privilege to call this API
Precondition:
The iter must be created by dpm_password_create_iterator()
See also:
dpm_password_create_iterator()
dpm_password_iterator_next()

Enforces password change.

Warning:
This is not for use by third-party applications.

An administrator can enforce password change. PasswordPolicy change setting is launched.

Since :
3.0
Privilege Level:
partner
Privilege:
http://tizen.org/privilege/dpm.password
Parameters:
[in]handleDevice policy manager handle
Returns:
DPM_ERROR_NONE on success, otherwise a negative value
Return values:
DPM_ERROR_NONESuccessful
DPM_ERROR_INVALID_PARAMETERInvalid parameter
DPM_ERROR_TIMED_OUTTime out
DPM_ERROR_PERMISSION_DENIEDThe application does not have the privilege to call this API
Precondition:
The handle must be created by dpm_manager_create().
See also:
dpm_manager_create()
int dpm_password_get_expires ( device_policy_manager_h  handle,
int *  value 
)

Gets the number of days password expires.

Warning:
This is not for use by third-party applications.

An administrator can get the password age to force the user to enter a new password after every expiration period.

Since :
3.0
Privilege Level:
partner
Privilege:
http://tizen.org/privilege/dpm.password
Parameters:
[in]handleDevice policy manager handle
[out]valueNumber of days after which the password expires.
Returns:
DPM_ERROR_NONE on success, otherwise a negative value
Return values:
DPM_ERROR_NONESuccessful
DPM_ERROR_INVALID_PARAMETERInvalid parameter
DPM_ERROR_TIMED_OUTTime out
DPM_ERROR_PERMISSION_DENIEDThe application does not have the privilege to call this API
Precondition:
The handle must be created by dpm_manager_create().
See also:
dpm_manager_create()
int dpm_password_get_history ( device_policy_manager_h  handle,
int *  value 
)

Gets the number of min password history to avoid previous password.

Warning:
This is not for use by third-party applications.

An administrator can get the number of previous passwords which cannot be used when entering a new password.

Since :
3.0
Privilege Level:
partner
Privilege:
http://tizen.org/privilege/dpm.password
Parameters:
[in]handleDevice policy manager handle
[out]valueNumber of previous passwords which cannot be used when settings a new password.
Returns:
DPM_ERROR_NONE on success, otherwise a negative value
Return values:
DPM_ERROR_NONESuccessful
DPM_ERROR_INVALID_PARAMETERInvalid parameter
DPM_ERROR_TIMED_OUTTime out
DPM_ERROR_PERMISSION_DENIEDThe application does not have the privilege to call this API
Precondition:
The handle must be created by dpm_manager_create().
See also:
dpm_manager_create()

Gets the maximum number of seconds of inactivity time before the screen timeout occurs.

Warning:
This is not for use by third-party applications.

Called by an application that is managing the device to get the value of timeout period.

Since :
3.0
Privilege Level:
partner
Privilege:
http://tizen.org/privilege/dpm.password
Parameters:
[in]handleDevice policy manager handle
[out]valuePointer of Maximum inactivity time for device lock.
Returns:
DPM_ERROR_NONE on success, otherwise a negative value
Return values:
DPM_ERROR_NONESuccessful
DPM_ERROR_INVALID_PARAMETERInvalid parameter
DPM_ERROR_TIMED_OUTTime out
DPM_ERROR_PERMISSION_DENIEDThe application does not have the privilege to call this API
Precondition:
The handle must be created by dpm_manager_create().
See also:
dpm_manager_create()

Gets the maximum number of times a character can occur in the device password.

Warning:
This is not for use by third-party applications.

An administrator can retrieve the maximum number of times a character can occur in the device password. If more than one admin has set this value then the least value will take preference.

Since :
3.0
Privilege Level:
partner
Privilege:
http://tizen.org/privilege/dpm.password
Parameters:
[in]handleDevice policy manager handle
[out]valuePointer of Maximum Character Occurrences
Returns:
DPM_ERROR_NONE on success, otherwise a negative value
Return values:
DPM_ERROR_NONESuccessful
DPM_ERROR_INVALID_PARAMETERInvalid parameter
DPM_ERROR_TIMED_OUTTime out
DPM_ERROR_PERMISSION_DENIEDThe application does not have the privilege to call this API
Precondition:
The handle must be created by dpm_manager_create().
See also:
dpm_manager_create()

Gets maximum number of failed attempts before device is wiped.

Warning:
This is not for use by third-party applications.

If user fails the last attempt, device will be wiped.

Since :
3.0
Privilege Level:
partner
Privilege:
http://tizen.org/privilege/dpm.password
Parameters:
[in]handleDevice policy manager handle
[out]valueMaximum count for failed passwords.
Returns:
DPM_ERROR_NONE on success, otherwise a negative value
Return values:
DPM_ERROR_NONESuccessful
DPM_ERROR_INVALID_PARAMETERInvalid parameter
DPM_ERROR_TIMED_OUTTime out
DPM_ERROR_PERMISSION_DENIEDThe application does not have the privilege to call this API
Precondition:
The handle must be created by dpm_manager_create().
See also:
dpm_manager_create()

Gets the maximum numeric sequence length allowed in the device password.

Warning:
This is not for use by third-party applications.

An administrator can retrieve the length of numeric sequences which are allowed in the device password. For instance, if the return value is '3' then "123", "987", "555" would all be numeric sequences of length '3' and will be allowed in the device password. If more than one admin has set this value then the least value will take preference.

Since :
3.0
Privilege Level:
partner
Privilege:
http://tizen.org/privilege/dpm.password
Parameters:
[in]handleDevice policy manager handle
[out]valuePointer of maximum numeric sequence length
Returns:
DPM_ERROR_NONE on success, otherwise a negative value
Return values:
DPM_ERROR_NONESuccessful
DPM_ERROR_INVALID_PARAMETERInvalid parameter
DPM_ERROR_TIMED_OUTTime out
DPM_ERROR_PERMISSION_DENIEDThe application does not have the privilege to call this API
Precondition:
The handle must be created by dpm_manager_create().
See also:
dpm_manager_create()

Gets minimum complex char in password.

Warning:
This is not for use by third-party applications.

Complex characters are all non-alphabetic characters; that is, numbers and symbols.

Since :
3.0
Privilege Level:
partner
Privilege:
http://tizen.org/privilege/dpm.password
Parameters:
[in]handleDevice policy manager handle
[out]valueNumber of minimum complex char in password.
Returns:
DPM_ERROR_NONE on success, otherwise a negative value
Return values:
DPM_ERROR_NONESuccessful
DPM_ERROR_INVALID_PARAMETERInvalid parameter
DPM_ERROR_TIMED_OUTTime out
DPM_ERROR_PERMISSION_DENIEDThe application does not have the privilege to call this API
Precondition:
The handle must be created by dpm_manager_create().
See also:
dpm_manager_create()
int dpm_password_get_minimum_length ( device_policy_manager_h  handle,
int *  value 
)

Gets password minimum length.

Warning:
This is not for use by third-party applications.

Gets the minimum allowed password length.

Since :
3.0
Privilege Level:
partner
Privilege:
http://tizen.org/privilege/dpm.password
Parameters:
[in]handleDevice policy manager handle
[out]valueAllowed minimum password length
Returns:
DPM_ERROR_NONE on success, otherwise a negative value
Return values:
DPM_ERROR_NONESuccessful
DPM_ERROR_INVALID_PARAMETERInvalid parameter
DPM_ERROR_TIMED_OUTTime out
DPM_ERROR_PERMISSION_DENIEDThe application does not have the privilege to call this API
Precondition:
The handle must be created by dpm_manager_create().
See also:
dpm_manager_create()
int dpm_password_get_pattern ( device_policy_manager_h  handle,
char **  pattern 
)

Gets password pattern.

Warning:
This is not for use by third-party applications.

This API can be used for applying complexity on new password value.

Since :
3.0
Privilege Level:
partner
Privilege:
http://tizen.org/privilege/dpm.password
Remarks:
The pattern should be freed using free().
Parameters:
[in]handleDevice policy manager handle
[out]patternPassword pattern
Returns:
DPM_ERROR_NONE on success, otherwise a negative value
Return values:
DPM_ERROR_NONESuccessful
DPM_ERROR_INVALID_PARAMETERInvalid parameter
DPM_ERROR_TIMED_OUTTime out
DPM_ERROR_OUT_OF_MEMORYOut of memory
DPM_ERROR_PERMISSION_DENIEDThe application does not have the privilege to call this API
Precondition:
The handle must be created by dpm_manager_create().
See also:
dpm_manager_create()
int dpm_password_get_quality ( device_policy_manager_h  handle,
int *  quality 
)

Gets password quality.

Warning:
This is not for use by third-party applications.

An administrator can get the password restrictions it is imposing.

Since :
3.0
Privilege Level:
partner
Privilege:
http://tizen.org/privilege/dpm.password
Parameters:
[in]handleDevice policy manager handle
[out]qualityPassword quality type, values of dpm_password_quality_e combined with bitwise 'or'
Returns:
DPM_ERROR_NONE on success, otherwise a negative value
Return values:
DPM_ERROR_NONESuccessful
DPM_ERROR_INVALID_PARAMETERInvalid parameter
DPM_ERROR_TIMED_OUTTime out
DPM_ERROR_PERMISSION_DENIEDThe application does not have the privilege to call this API
Precondition:
The handle must be created by dpm_manager_create().
See also:
dpm_manager_create()

Gets password status.

Warning:
This is not for use by third-party applications.

An administrator can know password status for this API.

Since :
3.0
Parameters:
[in]handleDevice policy manager handle
[out]statusPassword status
Returns:
DPM_ERROR_NONE on success, otherwise a negative value
Return values:
DPM_ERROR_NONESuccessful
DPM_ERROR_INVALID_PARAMETERInvalid parameter
DPM_ERROR_TIMED_OUTTime out
Precondition:
The handle must be created by dpm_manager_create().
See also:
dpm_manager_create()
int dpm_password_iterator_next ( dpm_password_iterator_h  iter,
const char **  forbidden_string 
)

Fetches a password forbidden string and forwards the iterator.

Warning:
This is not for use by third-party applications.

This API returns a password forbidden string indicated by the iterator, and then the iterator is moved to the next position. If the iterator reaches the end of the list, null value will be returned.

Since :
3.0
Parameters:
[in]iterThe iterator to be controlled
[out]forbidden_stringThe forbidden string got from the iterator
Returns:
DPM_ERROR_NONE on success, otherwise a negative value
Remarks:
The forbidden_string should not be freed using free().
Return values:
DPM_ERROR_NONESuccessful
DPM_ERROR_INVALID_PARAMETERInvalid parameter
DPM_ERROR_TIMED_OUTTime out
Precondition:
The iter must be created by dpm_password_create_iterator().
See also:
dpm_passsword_create_iterator()
dpm_password_destroy_iterator()
int dpm_password_reset ( device_policy_manager_h  handle,
const char *  password 
)

Resets password.

Warning:
This is not for use by third-party applications.

This takes effect immediately to the device password.

Since :
3.0
Privilege Level:
partner
Privilege:
http://tizen.org/privilege/dpm.password
Parameters:
[in]handleDevice policy manager handle
[in]passwordNew password
Returns:
DPM_ERROR_NONE on success, otherwise a negative value
Return values:
DPM_ERROR_NONESuccessful
DPM_ERROR_INVALID_PARAMETERInvalid parameter
DPM_ERROR_TIMED_OUTTime out
DPM_ERROR_PERMISSION_DENIEDThe application does not have the privilege to call this API
Precondition:
The handle must be created by dpm_manager_create().
See also:
dpm_manager_create()
int dpm_password_set_expires ( device_policy_manager_h  handle,
int  value 
)

Sets the number of days password expires.

Warning:
This is not for use by third-party applications.

An administrator can configure the password age to force the user to enter a new password after every expiration period.

Since :
3.0
Privilege Level:
partner
Privilege:
http://tizen.org/privilege/dpm.password
Parameters:
[in]handleDevice policy manager handle
[in]valueNumber of days after which the password expires.
Returns:
DPM_ERROR_NONE on success, otherwise a negative value
Return values:
DPM_ERROR_NONESuccessful
DPM_ERROR_INVALID_PARAMETERInvalid parameter
DPM_ERROR_TIMED_OUTTime out
DPM_ERROR_PERMISSION_DENIEDThe application does not have the privilege to call this API
Precondition:
The handle must be created by dpm_manager_create().
See also:
dpm_manager_create()
int dpm_password_set_forbidden_strings ( device_policy_manager_h  handle,
const char *  strings[],
int  length 
)

Sets strings which are forbidden in the device password.

Warning:
This is not for use by third-party applications.

Called by an admin that is managing the device to set strings that are forbidden to be used in the device password. This specifies any strings which must not be present in the device password such as personal data (variations on the user's name, email address or X400 address), or any other strings. If the parameter list has only one blank string(""), then the stored strings are cleared.

Since :
3.0
Privilege Level:
partner
Privilege:
http://tizen.org/privilege/dpm.password
Parameters:
[in]handleDevice policy manager handle
[in]stringsThe forbidden strings
[in]lengthThe length of the strings
Returns:
DPM_ERROR_NONE on success, otherwise a negative value
Return values:
DPM_ERROR_NONESuccessful
DPM_ERROR_INVALID_PARAMETERInvalid parameter
DPM_ERROR_TIMED_OUTTime out
DPM_ERROR_PERMISSION_DENIEDThe application does not have the privilege to call this API
Precondition:
The handle must be created by dpm_manager_create().
See also:
dpm_manager_create()
int dpm_password_set_history ( device_policy_manager_h  handle,
int  value 
)

Sets the number of min password history to avoid previous password.

Warning:
This is not for use by third-party applications.

An administrator can configure the number of previous passwords which cannot be used when entering a new password.

Since :
3.0
Privilege Level:
partner
Privilege:
http://tizen.org/privilege/dpm.password
Parameters:
[in]handleDevice policy manager handle
[in]valueNumber of previous passwords which cannot be used when settings a new password.
Returns:
DPM_ERROR_NONE on success, otherwise a negative value
Return values:
DPM_ERROR_NONESuccessful
DPM_ERROR_INVALID_PARAMETERInvalid parameter
DPM_ERROR_TIMED_OUTTime out
DPM_ERROR_PERMISSION_DENIEDThe application does not have the privilege to call this API
Precondition:
The handle must be created by dpm_manager_create().
See also:
dpm_manager_create()

Sets the maximum number of seconds of inactivity time before the screen timeout occurs.

Warning:
This is not for use by third-party applications.

An administrator sets the maximum number of seconds of inactivity time before the screen timeout occurs and a device user must type the password to unlock the device.

Since :
3.0
Privilege Level:
partner
Privilege:
http://tizen.org/privilege/dpm.password
Parameters:
[in]handleDevice policy manager handle
[in]valueMaximum inactivity time for device lock. Specifies how soon the device can be unlocked again after use, without reprompting for the passcode.
Returns:
DPM_ERROR_NONE on success, otherwise a negative value
Return values:
DPM_ERROR_NONESuccessful
DPM_ERROR_INVALID_PARAMETERInvalid parameter
DPM_ERROR_TIMED_OUTTime out
DPM_ERROR_PERMISSION_DENIEDThe application does not have the privilege to call this API
Precondition:
The handle must be created by dpm_manager_create().
See also:
dpm_manager_create()

Sets the maximum number of times a character can occur in the device password.

Warning:
This is not for use by third-party applications.

Called by an admin that is managing the device to specify that any character in the device password cannot occur more than the specified maximum number of times. Characters can be numeric or alphabetic or symbolic. "aaabcde" has 'a' which occurs 3 times, "1b1c1de" has '1' which occurs 3 times and "a@b@c@" has '@' which occurs 3 times. A value of '0' specifies that no restrictions are applied.

Since :
3.0
Privilege Level:
partner
Privilege:
http://tizen.org/privilege/dpm.password
Parameters:
[in]handleDevice policy manager handle
[in]valueMaximum character occurrences
Returns:
DPM_ERROR_NONE on success, otherwise a negative value
Return values:
DPM_ERROR_NONESuccessful
DPM_ERROR_INVALID_PARAMETERInvalid parameter
DPM_ERROR_TIMED_OUTTime out
DPM_ERROR_PERMISSION_DENIEDThe application does not have the privilege to call this API
Precondition:
The handle must be created by dpm_manager_create().
See also:
dpm_manager_create()

Sets maximum number of failed attempts before device is wiped.

Warning:
This is not for use by third-party applications.

If user fails the last attempt, device will be wiped.

Since :
3.0
Privilege Level:
partner
Privilege:
http://tizen.org/privilege/dpm.password
Parameters:
[in]handleDevice policy manager handle
[in]valueMaximum count for failed passwords.
Returns:
DPM_ERROR_NONE on success, otherwise a negative value
Return values:
DPM_ERROR_NONESuccessful
DPM_ERROR_INVALID_PARAMETERInvalid parameter
DPM_ERROR_TIMED_OUTTime out
DPM_ERROR_PERMISSION_DENIEDThe application does not have the privilege to call this API
Precondition:
The handle must be created by dpm_manager_create().
See also:
dpm_manager_create()

Sets the maximum length of the numeric sequence which is allowed in the device password.

Warning:
This is not for use by third-party applications.

Called by an administrator that is managing the device to set the maximum numeric sequence length. This specifies that the device password must not contain numeric sequences greater than the given length. Numeric sequences can be increasing successively by one like "12345", or decreasing successively by one like "98765", or repeating like "55555". These are all numeric sequences of length '5'. If maximum value is set to '5' then "123456" or "987654" or "555555" are not allowed. A value of '0' specifies that no such numeric sequence restrictions are applied.

Since :
3.0
Privilege Level:
partner
Privilege:
http://tizen.org/privilege/dpm.password
Parameters:
[in]handleDevice policy manager handle
[in]valueMaximum numeric sequence length
Returns:
DPM_ERROR_NONE on success, otherwise a negative value
Return values:
DPM_ERROR_NONESuccessful
DPM_ERROR_INVALID_PARAMETERInvalid parameter
DPM_ERROR_TIMED_OUTTime out
DPM_ERROR_PERMISSION_DENIEDThe application does not have the privilege to call this API
Precondition:
The handle must be created by dpm_manager_create().
See also:
dpm_manager_create()

Sets minimum complex char in password.

Warning:
This is not for use by third-party applications.

Complex characters are all non-alphabetic characters; that is, numbers and symbols. Admin can configure this setting and make the password more secure.

Since :
3.0
Privilege Level:
partner
Privilege:
http://tizen.org/privilege/dpm.password
Parameters:
[in]handleDevice policy manager handle
[in]valueNumber of minimum complex char in password.
Returns:
DPM_ERROR_NONE on success, otherwise a negative value
Return values:
DPM_ERROR_NONESuccessful
DPM_ERROR_INVALID_PARAMETERInvalid parameter
DPM_ERROR_TIMED_OUTTime out
DPM_ERROR_PERMISSION_DENIEDThe application does not have the privilege to call this API
Precondition:
The handle must be created by dpm_manager_create().
See also:
dpm_manager_create()

Sets password minimum length.

Warning:
This is not for use by third-party applications.

Sets the minimum allowed password length. After setting this, the user will not be able to enter a new password that is shorter than the setting length.

Since :
3.0
Privilege Level:
partner
Privilege:
http://tizen.org/privilege/dpm.password
Parameters:
[in]handleDevice policy manager handle
[in]valueAllowed minimum password length
Returns:
DPM_ERROR_NONE on success, otherwise a negative value
Return values:
DPM_ERROR_NONESuccessful
DPM_ERROR_INVALID_PARAMETERInvalid parameter
DPM_ERROR_TIMED_OUTTime out
DPM_ERROR_PERMISSION_DENIEDThe application does not have the privilege to call this API
Precondition:
The handle must be created by dpm_manager_create().
See also:
dpm_manager_create()
int dpm_password_set_pattern ( device_policy_manager_h  handle,
const char *  pattern 
)

Sets the required password pattern.

Warning:
This is not for use by third-party applications.

An administrator can force User to enter password based on a regular expression.

Since :
3.0
Privilege Level:
partner
Privilege:
http://tizen.org/privilege/dpm.password
Parameters:
[in]handleDevice policy manager handle
[in]patternPassword pattern. If regular expression is [a-zA-Z]{4}[0-9]{4}, we can force user to enter a 8 character password with first 4 alphabetic characters and next 4 numeric characters. An administrator must take care when setting this pattern.
Returns:
DPM_ERROR_NONE on success, otherwise a negative value
Return values:
DPM_ERROR_NONESuccessful
DPM_ERROR_INVALID_PARAMETERInvalid parameter
DPM_ERROR_TIMED_OUTTime out
DPM_ERROR_PERMISSION_DENIEDThe application does not have the privilege to call this API
Precondition:
The handle must be created by dpm_manager_create().
See also:
dpm_manager_create()
int dpm_password_set_quality ( device_policy_manager_h  handle,
int  quality 
)

Sets password quality.

Warning:
This is not for use by third-party applications.

An administrator can set the password restrictions it is imposing. After setting this, the user will not be able to enter a new password that is not at least as restrictive as what has been set.

Since :
3.0
Privilege Level:
partner
Privilege:
http://tizen.org/privilege/dpm.password
Parameters:
[in]handleDevice policy manager handle
[in]qualityPassword quality type, values of dpm_password_quality_e combined with bitwise 'or'
Returns:
DPM_ERROR_NONE on success, otherwise a negative value
Return values:
DPM_ERROR_NONESuccessful
DPM_ERROR_INVALID_PARAMETERInvalid parameter
DPM_ERROR_TIMED_OUTTime out
DPM_ERROR_PERMISSION_DENIEDThe application does not have the privilege to call this API
Precondition:
The handle must be created by dpm_manager_create().
See also:
dpm_manager_create()

Sets password status.

Warning:
This is not for use by third-party applications.

An administrator can know password status for this API.

Since :
3.0
Privilege Level:
partner
Privilege:
http://tizen.org/privilege/dpm.password
Parameters:
[in]handleDevice policy manager handle
[in]statusPassword status
Returns:
DPM_ERROR_NONE on success, otherwise a negative value
Return values:
DPM_ERROR_NONESuccessful
DPM_ERROR_INVALID_PARAMETERInvalid parameter
DPM_ERROR_TIMED_OUTTime out
DPM_ERROR_PERMISSION_DENIEDThe application does not have the privilege to call this API
Precondition:
The handle must be created by dpm_manager_create().
See also:
dpm_manager_create()