Expand description

Rust bindings to libcryptsetup - working with encrypted disks on Linux

Example

See api module documentation for more.

use cryptsetup_rs::*;
let device = open("/dev/loop0")?.luks1()?;
println!("Device UUID: {}", device.uuid());
println!("Device cipher: {}", device.cipher());

Re-exports

pub use api::format;
pub use api::luks1_uuid;
Deprecated
pub use api::luks_uuid;
pub use api::luks_version;
pub use api::open;
pub use api::CryptDevice;
pub use api::CryptDeviceType;
pub use api::Error;
pub use api::Keyslot;
pub use api::Luks1CryptDevice;
pub use api::Luks2CryptDevice;
pub use api::Luks2TokenHandler;
pub use api::Luks2TokenHandlerRaw;
pub use api::Luks2TokenId;
pub use api::LuksCryptDevice;
pub use api::Result;

Modules

High-level API to work with libcryptsetup supported devices (disks) The main focus is on LUKS1 and LUKS2 devices

Low-level cryptsetup binding that sits directly on top of the libcryptsetup C API

Structs

Enums

Functions

Enable internal libcryptsetup debugging