protected function getEncryptor(int $cipher, string $password): EncryptorInterface {
		try {
			if ($cipher === Ciphers::ENCRYPT_NONE) {
				return null;
			}
			if ($cipher === Ciphers::ENCRYPT_XOR) {
				return $this->getXorEncryptor($cipher, $password);
			}
            $encryptor = $this->getOpenSslEncryptor($cipher, $password);
        } catch (\Exception $exc) {
            trigger_error('Falling back to legacy encryption, openssl failed: ' . $exc->getMessage(), \E_DEPRECATED);
            $encryptor = $this->getLegacyEncryptor($cipher, $password);
        }
        return $encryptor;
    }