How to access user password hash from wordpress plugin?

I am trying to write a plugin that writes a users password hash to an external database. While debugging I have found that the following code causes user registration to not load once they have entered their email address and username.

// if i add this line the registartion doesn’t load after entering the details
// if I remove it, the $password varible doesn’t get written to a file due to it being an array
$password = implode(”, $password);

When removing the line containing the implode function the pluging works but the password field is blank but when i include it the user registation form doesn’t load after clicking submit and the sign up email is never sent.