// SPDX-FileCopyrightText: 2021 Carl Schwan // // SPDX-License-Identifier: LGPL-2.1-or-later #include "e2ee/qolmutils.h" #include using namespace Quotient; QByteArray Quotient::toKey(const Quotient::PicklingMode &mode) { if (std::holds_alternative(mode)) { return {}; } return std::get(mode).key; } RandomBuffer::RandomBuffer(size_t size) : QByteArray(static_cast(size), '\0') { QRandomGenerator::system()->generate(begin(), end()); }