There’s no API for it; you would need to save it to the database directly.
If any of the passwords are known to you, you should probably start by manually pasting that hashed password into your account’s password column, and verify that it’s actually going to work. Even if the old site was also using mcrypt, it’s still pretty unlikely that they get hashed the exact same way (different salts, etc.).
If it doesn’t work out, and you really don’t want to require everyone to reset their passwords, you could save all of your hashed passwords in a separate table, and write your own "login" controller action using a plugin. That controller action could:
grab the user by their given username/email
$loginName = craft()->request->getPost('loginName');
$user = craft()->users->getUserByUsernameOrEmail($loginName);
see if that user has a row in your old hashed passwords table
if so, fetch their password from post...
$password = craft()->request->getPost('password');
hash that password using the old site’s exact hashing method
- if the hashed password matches the one in the table...
save the posted password on the user account
$user->newPassword = $password;
delete the user’s row in the old hashed passwords table (so we're only doing this once per user)
log the user in
(See craft/app/controllers/UsersController.php - actionLogin() for a full code example of