Crate libcryptsetup_rs
source · [−]Expand description
This is a wrapper library for libcryptsetup. The intension is to provide as much safety as possible when crossing FFI boundaries to the crypsetup C library.
Macros
Create a C-compatible callback to determine user confirmation which wraps safe Rust code
Create a C-compatible logging callback which wraps safe Rust code
Create a C-compatible progress callback for wiping a device which wraps safe Rust code
Create a C-compatible static string with a null byte
Create a C-compatible callback for compatible with CryptTokenHandler
Create a C-compatible callback for free compatible with CryptTokenHandler
Create a C-compatible open callback compatible with CryptTokenHandler
Create a C-compatible callback for validate compatible with CryptTokenHandler
Convert a *const c_char
into a &str
type
Structs
Record containing data on the given active device
Enum wrapping CRYPT_ACTIVATE_*
flags
Handle for activation options
Handle for backup operations on a device
Cryptographic context for device
Set of flags for crypt deactivate operations
Handle for backup operations on a device
Data type that is a handle for a crypt device
Handle for crypt device status operations
Handle for format operations on a device
Initialization handle for devices
Handle for keyfile operations
Contents of a keyfile that have been read
Set of flags for reading keyfiles
Handle for keyslot operations
Handle for logging operations
Handle for LUKS2 persistent flag operations
Handle for reencryption operations
Handle for LUKS2 token operations
Parameters for integrity checking
A struct representing a reference with a lifetime to a CryptParamsIntegrity
struct
Parameters for formatting a loop AES device
C-compatible reference to a CryptParamsLoopaes
struct
A struct representing LUKS1 specific parameters.
A struct with a lifetime representing a reference to CryptParamsLuks1
.
LUKS2-specific parameters
A struct representing a reference with a lifetime to a CryptParamsLuks2
struct
Struct representing plain cryptsetup format parameters
Represents a reference to a CryptParamsPlain
struct
Parameters for reencryption operations
A struct representing a reference with a lifetime to a CryptParamsReencrypt
struct
Parameters for tcrypt operations
Reference to a CryptParamsTcrypt
struct
Parameters specific to Verity
Reference to parameters specific to Verity
Wrapper for a set of CryptPbkdfFlag
Rust representation of crypt_pbkdf_type
A type wrapping a PBKDF type with pointers derived from Rust data types and lifetimes to ensure pointer validity
Wrapper for a set of CryptReencryptFlag
Set of CryptRequirementFlag
s
Handle for runtime attribute options
Handle to operate on cryptsetup device settings
Set of flags for tcrypt format
Set of flags for Verity format
Handle for volume key operations
Set of volume key flags
Handle for volume key operations
Size in bytes for the keyslots.
Handle to allocated memory from libcryptsetup
Enums
Boolean specifying yes or no
Enum wrapping CRYPT_ACTIVATE_*
flags
Flags for crypt deactivate operations
Debug log level
Rust representation of key generator enum
Flags for reading keyfiles
Logging levels
Enum wrapping CRYPT_PBKDF_*
flags
Reencryption direction flags
Enum for CRYPT_REENCRYPT_*
flags
Encryption mode flags
Encryption mode flags
Wrapper enum for CRYPT_REQUIREMENT_*
flags
Rust representation of random number generator enum
Status of a crypt device
tcrypt format flags
Type representing the token status. This type wraps the CRYPT_TOKEN_*
values and the optional corresponding token type as a string.
Verity format flags
Flags for tunable options when operating with volume keys
Pattern for disk wipe
The enum Either
with variants Left
and Right
is a general purpose
sum type with two cases.
Device formatting type options
Boolean specifying yes or no
Value indicating the status of a keyslot
Value indicating the priority of a keyslot
Error returned from any libcryptsetup-rs function
State of memory lock
LUKS type (1 or 2)
Size allocated for metadata
Token input for CryptLuks2Token::json_set
Functions
Get size of encryption sectors in bytes
Get status info from device name