A simple wp_update_user(array('ID' => $userid, 'user_pass' => 'myNeWpaSSword'))
will do everything for you - wp_update_user()
(Codex).
On a sidenote: are you aware of the 'Theme My Login' pluginTheme My Login (Wordpress Plugin)? It can provide you with a front-end side profile page.