WP stores passwords as MD5 hashes, yes you can use https://codex.wordpress.org/Function_Reference/wp_hash_password and the explanation of how it works on in the codex.
To validate a field you would use an acf/validate_value filter https://www.advancedcustomfields.com/resources/acf-validate_value/
If you want to know how WP generates a password I would start by searching the core files for function wp_generate_password
https://codex.wordpress.org/Function_Reference/wp_generate_password