2020-09-28 00:45:21 +01:00
|
|
|
/*
|
|
|
|
SPDX-FileCopyrightText: 2017 Andrius Štikonas <andrius@stikonas.eu>
|
|
|
|
SPDX-FileCopyrightText: 2020 Arnaud Ferraris <arnaud.ferraris@collabora.com>
|
|
|
|
SPDX-FileCopyrightText: 2020 Gaël PORTAY <gael.portay@collabora.com>
|
2019-06-12 17:41:11 +01:00
|
|
|
|
2020-09-28 00:45:21 +01:00
|
|
|
SPDX-License-Identifier: GPL-3.0-or-later
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef KPMCORE_LUKS2_H
|
2017-12-15 19:34:39 +00:00
|
|
|
#define KPMCORE_LUKS2_H
|
|
|
|
|
|
|
|
#include "util/libpartitionmanagerexport.h"
|
|
|
|
|
|
|
|
#include "fs/luks.h"
|
|
|
|
|
2019-06-12 17:41:11 +01:00
|
|
|
#include <QtGlobal>
|
|
|
|
|
|
|
|
class QString;
|
|
|
|
|
2017-12-15 19:34:39 +00:00
|
|
|
namespace FS
|
|
|
|
{
|
|
|
|
/** A LUKS2 crypto file system.
|
|
|
|
@author Andrius Štikonas <andrius@stikonas.eu>
|
|
|
|
*/
|
|
|
|
class LIBKPMCORE_EXPORT luks2 : public luks
|
|
|
|
{
|
|
|
|
public:
|
2020-03-21 13:18:13 +00:00
|
|
|
luks2(qint64 firstsector, qint64 lastsector, qint64 sectorsused, const QString& label, const QVariantMap& features = {});
|
2017-12-15 19:34:39 +00:00
|
|
|
~luks2() override;
|
|
|
|
|
2017-12-29 20:38:36 +00:00
|
|
|
bool create(Report& report, const QString& deviceNode) override;
|
2017-12-29 20:01:06 +00:00
|
|
|
bool resize(Report& report, const QString& deviceNode, qint64 length) const override;
|
|
|
|
|
2017-12-15 19:34:39 +00:00
|
|
|
FileSystem::Type type() const override;
|
2017-12-29 20:01:06 +00:00
|
|
|
|
2017-12-29 22:53:02 +00:00
|
|
|
luks::KeyLocation keyLocation();
|
2017-12-15 19:34:39 +00:00
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|