23 #ifndef STORAGE_ENCRYPTION_H 24 #define STORAGE_ENCRYPTION_H 27 #include "storage/Devices/BlkDevice.h" 33 enum class EncryptionType {
34 NONE, TWOFISH, TWOFISH_OLD, TWOFISH256_OLD, LUKS, UNKNOWN
52 EncryptionType get_type()
const;
54 const std::string& get_password()
const;
56 void set_password(
const std::string& password);
104 static std::vector<Encryption*> get_all(
Devicegraph* devicegraph);
105 static std::vector<const Encryption*> get_all(
const Devicegraph* devicegraph);
112 const Impl& get_impl()
const;
123 bool is_encryption(
const Device* device);
const std::vector< std::string > & get_crypt_options() const
Get options (fourth field) in /etc/crypttab.
bool is_in_etc_crypttab() const
Query whether the LUKS device is present (probed devicegraph) or will be present (staging devicegraph...
Encryption * to_encryption(Device *device)
Converts pointer to Device to pointer to Encryption.
void set_default_mount_by()
Set the mount-by method to the global default, see Storage::get_default_mount_by().
void set_in_etc_crypttab(bool in_etc_crypttab)
Set whether the LUKS device will be present in /etc/crypttab.
void set_crypt_options(const std::vector< std::string > &crypt_options)
Set options (fourth field) in /etc/crypttab.
void set_mount_by(MountByType mount_by)
Set the mount-by method.
An encryption layer on a blk device.
Definition: Encryption.h:45
The master container of the libstorage.
Definition: Devicegraph.h:153
An abstract Block Device.
Definition: BlkDevice.h:41
An abstract base class of storage devices, and a vertex in the Devicegraph.
Definition: Device.h:75
MountByType get_mount_by() const
Get the mount-by method.
The storage namespace.
Definition: Actiongraph.h:37
const BlkDevice * get_blk_device() const
Return underlying blk device.
MountByType
The key by which the mount program identifies a mountable.
Definition: Mountable.h:54