Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

23 lines
1.3 KiB

  1. /////////////////////////////////////////////////////////////////////////////////////////////////////////
  2. // Generate a password from the rules provided.
  3. // Returns ERROR_SUCCESS if successful, else ERROR_INVALID_PARAMETER.
  4. // If successful, the new password is returned in the supplied buffer.
  5. // The buffer must be long enough to hold the minimum length password
  6. // that is required by the rules, plus a terminating NULL.
  7. // Password generation service
  8. #define PWGEN_MIN_LENGTH 8 // enforced minimum password length
  9. #define PWGEN_MAX_LENGTH 14 // enforced maximum password length
  10. DWORD __stdcall // ret-EA/OS return code
  11. EaPasswordGenerate(
  12. DWORD dwMinUC, // in -minimum upper case chars
  13. DWORD dwMinLC, // in -minimum lower case chars
  14. DWORD dwMinDigits, // in -minimum numeric digits
  15. DWORD dwMinSpecial, // in -minimum special chars
  16. DWORD dwMaxConsecutiveAlpha,// in -maximum consecutive alpha chars
  17. DWORD dwMinLength, // in -minimum length
  18. WCHAR * newPassword, // out-returned password
  19. DWORD dwBufferLength // in -returned area buffer length
  20. );