'--verify-update', shasum support, OpenPGP signatures verification

This commit is contained in:
xiphon
2020-04-06 16:57:32 +00:00
parent 042400b83f
commit 5f27a45910
18 changed files with 1298 additions and 6 deletions

View File

@@ -37,6 +37,24 @@ bool fileExists(QString path) {
return check_file.exists() && check_file.isFile();
}
QByteArray fileGetContents(QString path)
{
QFile file(path);
if (!file.open(QFile::ReadOnly))
{
throw std::runtime_error(QString("failed to open %1").arg(path).toStdString());
}
QByteArray data;
data.resize(file.size());
if (file.read(data.data(), data.size()) != data.size())
{
throw std::runtime_error(QString("failed to read %1").arg(path).toStdString());
}
return data;
}
QByteArray fileOpen(QString path) {
QFile file(path);
if(!file.open(QFile::ReadOnly | QFile::Text))