Create wordpress password for your theme function or plugins.
[php]
function generate_wp_pass($text_password) {
require_once( ABSPATH . ‘wp-includes/class-phpass.php’);
//IN 3.6 OR OLDER VERSION CANNOT AUTO LOAD PASSWORD CLASS SO YOU WILL NEED TO LOAD IT MANNUALLY
$wp_hasher = new PasswordHash(8, true);
return $hasher->HashPassword($text_password);
}
[/php]