<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _encrypt_password(self, password):
 """encrypt the password for given mode """

        if self.encryption_mode.lower() == 'crypt':
            return self._crypt_password(password)
        elif self.encryption_mode.lower() == 'md5':
            return self._md5_password(password)
        elif self.encryption_mode.lower() == 'md5-base':
            return self._md5_base_password(password)
        else:
            raise UnknownEncryptionMode(self.encryption_mode)