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);
    }
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);
    }
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 ) ; }
Factory Method for LegacyEncryptor
@param int $cipher
@param string $password
@return LegacyEncryptor
@throws \Exception
Factory Method for LegacyEncryptor