mumble/src/FFDHE.cpp
Davide Beatrici 15831dbca8 Add missing includes for "no-pch" build
This commit adds all the missing includes when the PCH header is not used.

Also, some includes are reordered and/or made consistent (e.g. "#include <QtEndian>" -> "#include <QtCore/QtEndian>").
2019-09-12 22:08:39 +02:00

38 lines
1.2 KiB
C++

// Copyright 2005-2019 The Mumble Developers. All rights reserved.
// Use of this source code is governed by a BSD-style license
// that can be found in the LICENSE file at the root of the
// Mumble source tree or at <https://www.mumble.info/LICENSE>.
#include "FFDHE.h"
#include "FFDHETable.h"
#include <QtCore/QStringList>
QStringList FFDHE::NamedGroups() {
QStringList ng;
ng << QLatin1String("ffdhe2048");
ng << QLatin1String("ffdhe3072");
ng << QLatin1String("ffdhe4096");
ng << QLatin1String("ffdhe6144");
ng << QLatin1String("ffdhe8192");
return ng;
}
QByteArray FFDHE::PEMForNamedGroup(QString name) {
name = name.toLower();
if (name == QLatin1String("ffdhe2048")) {
return QByteArray::fromRawData(ffdhe2048_pem, sizeof(ffdhe2048_pem));
} else if (name == QLatin1String("ffdhe3072")) {
return QByteArray::fromRawData(ffdhe3072_pem, sizeof(ffdhe3072_pem));
} else if (name == QLatin1String("ffdhe4096")) {
return QByteArray::fromRawData(ffdhe4096_pem, sizeof(ffdhe4096_pem));
} else if (name == QLatin1String("ffdhe6144")) {
return QByteArray::fromRawData(ffdhe6144_pem, sizeof(ffdhe6144_pem));
} else if (name == QLatin1String("ffdhe8192")) {
return QByteArray::fromRawData(ffdhe8192_pem, sizeof(ffdhe8192_pem));
}
return QByteArray();
}