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 cryptsetup C library.

Modules

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

Handle for activation options

Handle for backup operations on a device

Cryptographic context for 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

Contents of a keyfile that have been read

Handle for keyfile operations

Handle for keyslot 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

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

Handle for runtime attribute options

Handle to operate on cryptsetup device settings

Handle for volume key operations

Handle for volume key operations

Handle to allocated memory from libcryptsetup

Enums

Type representing the token status. This type wraps the CRYPT_TOKEN_* values and the optional corresponding token type as a string.

The enum Either with variants Left and Right is a general purpose sum type with two cases.

Error returned from any libcryptsetup-rs function

Token input for CryptLuks2Token::json_set

Functions

Get size of encryption sectors in bytes

Generate a log entry

Set library debug level

Set the callback to be executed on logging events

Get status info from device name

Type Definitions

Result type to be used with libcryptsetup-rs

Re-exports libc types in API

Re-exports libc types in API

Re-exports libc types in API