public function getOpenSslEncryptor(int $cipher, string $password): OpenSslEncryptor {
        if (false === extension_loaded('openssl')) {
            throw new \Exception('OpenSSL Extension not available');
        }
        $encryptor = new OpenSslEncryptor($cipher, $password);
        if (false === $encryptor->isEncryptionCipherSupported($cipher)) {
            throw new \Exception('Trying to use unsupported encryption cipher');
        }
        return $encryptor;
    }