WordPress at a glance
function is not described

wp_ajax_generate_password() WP 4.4.0

Ajax handler for generating a password.

No Hooks.

Return

Nothing (null).

Usage

wp_ajax_generate_password();

Code of wp ajax generate password: wp-admin/includes/ajax-actions.php WP 5.2.1

<?php
function wp_ajax_generate_password() {
	wp_send_json_success( wp_generate_password( 24 ) );
}