Lines Matching +full:device +full:- +full:handle
5 #include <phosphor-logging/lg2.hpp>
6 #include <stdplus/handle/managed.hpp>
18 * @brief Interface to the cryptsetup functions used to manage a LUKS device.
35 * @param[in] cd - crypt device handle.
36 * @param[in] type - type of device (optional params struct must be of
38 * @param[in] cipher - (e.g. "aes").
39 * @params[in cipher_mode - including IV specification (e.g. "xts-plain").
40 * @params[in] uuid - requested UUID or NULL if it should be generated.
41 * @params[in] volume_key - pre-generated volume key or NULL if it should
43 * @params[in] volume_key_size - size of volume key in bytes.
44 * @params[in] params - crypt type specific parameters.
56 * @param[in] cd - crypt device handle.
57 * @param[in] keyslotOld - old keyslot or CRYPT_ANY_SLOT.
58 * @param[in] keyslotNew - new keyslot or CRYPT_ANY_SLOT.
59 * @param[in] passphrase - passphrase for new keyslot.
60 * @param[in] passphraseSize - size of passphrase.
61 * @param[in] newPassphrase - new passphrase for the specified keyslot
62 * @param[in] newPassphraseSize - size of newPassphrase (in bytes).
74 * @param[in] cd - crypt device handle.
75 * @param[in] keyslot - requested keyslot or CRYPT_ANY_SLOT.
76 * @param[in] volume_key - provided volume key or NULL if used after
78 * @param[in] volume_key_size - size of volume_key.
79 * @param[in] passphrase - passphrase for new keyslot.
80 * @param[in] passphrase_size - size of passphrase.
92 * @param[in] cd - crypt device handle.
93 * @param[in] requested_type - crypt-type or NULL for all known.
94 * @param[in] params - crypt type specific parameters (see crypt-type).
104 * @param[in] cd - crypt device handle.
105 * @param[in] name - name of device to create, if NULL only check
107 * @param[in] keyslot - requested keyslot to check or CRYPT_ANY_SLOT.
108 * @param[in] passphrase - passphrase used to unlock volume key.
109 * @param[in] passphrase_size - size of passphrase.
110 * @param[in] flags - activation flags.
121 * @param[in] cd - crypt device handle, can be NULL.
122 * @param[in] name - name of device to deactivate.
131 * @param[in] cd - crypt device handle, can not be NULL.
141 * @param type crypt device type
143 * @return slot count or negative errno otherwise if device
152 * @param cd crypt device handle
253 * this handle exits the current scope.
260 * @param[in] device - path to device file
262 explicit CryptHandle(const std::string_view& device) : handle(init(device)) in CryptHandle() argument
268 if (*handle == nullptr) in get()
270 lg2::error("Failed to get crypt device handle", in get()
276 return *handle; in get()
282 * @param[in] device - path to device file
284 struct crypt_device* init(const std::string_view& device) in init() argument
287 int retval = crypt_init(&cryptDev, device.data()); in init()
300 * @param[in] cd - pointer to crypt_device*, to be freed
307 /** @brief Managed handle to crypt_device struct */
308 stdplus::Managed<struct crypt_device*>::Handle<cryptFree> handle; member in estoraged::CryptHandle