Crate cryptsetup_rs

Source
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::enable_debug;
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::Luks1CryptDeviceHandle;
pub use api::Luks2CryptDevice;
pub use api::Luks2CryptDeviceHandle;
pub use api::Luks2Metadata;
pub use api::Luks2TokenHandler;
pub use api::Luks2TokenHandlerRaw;
pub use api::Luks2TokenId;
pub use api::LuksCryptDevice;
pub use api::Result;

Modules§

api
High-level API to work with libcryptsetup supported devices (disks) The main focus is on LUKS1 and LUKS2 devices
device
Low-level cryptsetup binding that sits directly on top of the libcryptsetup C API

Structs§

Luks2Config
Luks2Digest
Luks2Keyslot
Luks2KeyslotAf
Luks2KeyslotArea
Luks2Metadata
Luks2Segment
Luks2SegmentIntegrity
Luks2Token

Enums§

Luks2ConfigFlag
Luks2DigestType
Luks2KeyslotAfType
Luks2KeyslotAreaType
Luks2KeyslotKdf
Luks2KeyslotPriority
Luks2KeyslotType
Luks2SegmentType
crypt_device_type
crypt_keyslot_info
crypt_rng_type