I want to create an API point where the admin user can update their password, but I don't know what encrypt method used to encrypt the admin password and save it in the database, roughly what I want is like this:
$data = array(
'user_id' => '1',
'password' => 'magento2',
'firstname' => 'Jane'
);
$user = Mage::getModel('admin/user')->load($id);
if(isset($data['password')) $data['password'] = $this->encryptPassword($data['password']);
$user->addData($data);
$user->save();