public function getLegacyEncryptor(int $cipher, string $password): LegacyEncryptor {
        if (PHP_VERSION_ID >= 702000) {
            throw new \Exception('Mcrypt extension not available');
        }
        if (false === extension_loaded('mcrypt')) {
            throw new \Exception('Mcrypt extension not loaded');
        }
        return new LegacyEncryptor($cipher, $password);
    }