This whole block
```php
$const_crypt_mode = 'CRYPT_' . $this->const_namespace . '_MODE';

// Determining the availibility of mcrypt support for the cipher
if (!defined($const_crypt_mode)) {
    switch (true) {
        case extension_loaded('mcrypt') && in_array($this->cipher_name_mcrypt, mcrypt_list_algorithms()):
            define($const_crypt_mode, CRYPT_MODE_MCRYPT);
            break;
        default:
            define($const_crypt_mode, CRYPT_MODE_INTERNAL);
    }
}

// Determining which internal $engine should be used.
// The fastes possible first.
switch (true) {
    case empty($this->cipher_name_mcrypt): // The cipher module has no mcrypt-engine support at all so we force CRYPT_MODE_INTERNAL
        $this->engine = CRYPT_MODE_INTERNAL;
        break;
    case constant($const_crypt_mode) == CRYPT_MODE_MCRYPT:
        $this->engine = CRYPT_MODE_MCRYPT;
        break;
    default:
        $this->engine = CRYPT_MODE_INTERNAL;
}
```
boils down to
```php
if (!empty($this->cipher_name_mcrypt) && extension_loaded('mcrypt') &&
    in_array($this->cipher_name_mcrypt, mcrypt_list_algorithms())) {
    $this->engine = CRYPT_MODE_MCRYPT;
} else {
    $this->engine = CRYPT_MODE_INTERNAL;
}
```
or
```php
switch (true) {
    case !empty($this->cipher_name_mcrypt) && extension_loaded('mcrypt') && in_array($this->cipher_name_mcrypt, mcrypt_list_algorithms()):
        $this->engine = CRYPT_MODE_MCRYPT;
        break;
    default:
        $this->engine = CRYPT_MODE_INTERNAL;
}
```