Creates or changes a public/private key pair for a specified object. Supports international and extended characters in passwords.
#include <nwnet.h> or #include <nwdsasa.h> N_EXTERN_LIBRARY (NWDSCCODE) NWDSGenerateKeyPairEx ( NWDSContextHandle context, pnstr8 objectName, nuint32 pwdFormat, nptr pwd, nuint32 pwdOption);
uses netwin32 Function NWDSGenerateKeyPairEx (context : NWDSContextHandle; objectName : pnstr8; pwdFormat : nuint32; pwd : nptr; pwdOption : nuint32 ) : NWDSCCODE;
(IN) Specifies the NDS context for the request.
(IN) Points to the name of the object to update.
(IN) Specifies the format of the password data. Select from the following:
(IN) Points to the object password in the format specified by pwdFormat.
(IN) Specifies which password to operate on. Select from the following:
0x0000 0000 |
SUCCESSFUL |
nonzero value |
Nonzero values indicate errors. See |
If no password is desired, objectPassword should point to a zero-length string ("").
If an application has a local copy of any password value, the value should be erased as soon as possible to prevent compromising the security of the password.
An object must have rights to modify an object's password attributes before the NWDSGenerateObjectKeyPair function will succeed.
The NT_PASSWORD option only works if the eDirectory for NT product has been installed. If this option is set and the eDirectory for NT product has not been installed, an error is returned.
If the ALL_PASSWORDS option is set, the NDS_PASSWORD operation is performed first. If successful, other password operations are attempted, but error conditions are not returned for the other operations.
NOTE:The PWD_RAW_C_STRING password format allows any arbitrary NULL-terminiated data to be used as a password. Passwords specified with this format are not interoperable with unicode and UTF8 passwords.