Assets Bundler for bevy, with content encryption support. Current archive format is tar and encryption algorithm is AES
```toml
[dependencies] bevy = "0.5" bevyassetsbundler = "0.1"
[build-dependencies]
bevyassetsbundler = "0.1"
<!--
toml
[dependencies] bevy = "0.5" bevyassetsbundler = {git = "https://github.com/hanabi1224/bevyassetsbundler"}
[build-dependencies] bevyassetsbundler = {git = "https://github.com/hanabi1224/bevyassetsbundler"} ``` -->
You can generate a random key with this playground
rust
// build.rs
// encryption key: [u8; 16] array
// make sure the key is consistent between build.rs and main.rs
// or follow the example code to share code between build.rs and main.rs
let key = [30, 168, 132, 180, 250, 203, 124, 96, 221, 206, 64, 239, 102, 20, 139, 79];
let mut options = AssetBundlingOptions::default();
options.set_encryption_key(key);
options.encode_file_names = true;
options.enabled_on_debug_build = true;
AssetBundler::from(options).build().unwrap();
```rust use bevyassetsbundler::*; use bevy::asset::AssetPlugin;
fn main() { // encryption key: [u8; 16] array // make sure the key is consistent between build.rs and main.rs // or follow the example code to share code between build.rs and main.rs let key = [30, 168, 132, 180, 250, 203, 124, 96, 221, 206, 64, 239, 102, 20, 139, 79]; let mut options = AssetBundlingOptions::default(); options.setencryptionkey(key); options.encodefilenames = true; options.enabledondebug_build = true;
App::build()
.add_plugins_with(DefaultPlugins, |group| {
group.add_before::<AssetPlugin, _>(BundledAssetIoPlugin::from(
options.clone(),
))
})
.add_startup_system(setup.system())
.run();
} ```
```rust
pub struct AssetBundlingOptions { #[cfg(feature = "encryption")] pub encryptionon: bool, #[cfg(feature = "encryption")] pub encryptionkey: Option<[u8; 16]>, #[cfg(feature = "compression")] pub enablecompression: bool, pub enabledondebugbuild: bool, pub encodefilenames: bool, pub assetbundlename: String, } ```
MIT