2个不稳定版本
使用旧的Rust 2015
| 0.2.0 | 2016年9月2日 | 
|---|---|
| 0.1.0 | 2016年8月30日 | 
在 密码学 中排名 2301
每月下载量 24
在 ykcryptsetup 中使用
39KB
919 代码行
对于名为 /dev/sdc1 的块设备,以下是格式化和添加密码的方法。
fn format() {
    let mut dev = CryptDevice::init(&TEST_DEVICE).unwrap();
    println!("device initialized {:?}", dev.get_device_name());
    dev.format(
        Parameters::Luks1 { hash: Hash::Sha1, data_alignment: 0, data_device: None },
        Cipher::AesXts { iv: Iv::Plain, bits: 128 },
        None,
        None
    ).unwrap();
    println!("formatted");
    dev.keyslot_add_by_volume_key(None, None, b"foo").unwrap();
    dev.keyslot_add_by_passphrase(None, b"foo", b"blabla").unwrap();
}
依赖关系
~1.5MB
~36K SLoC