diff --git a/Cargo.lock b/Cargo.lock index 3449dc4..a945c50 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4,7 +4,7 @@ version = 3 [[package]] name = "acr" -version = "0.3.1" +version = "0.3.2" dependencies = [ "chrono", "crc32fast", diff --git a/Cargo.toml b/Cargo.toml index caae462..d47efb9 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -3,7 +3,7 @@ name = "acr" description = "All shared code across the whole Acridotheres project" license = "MIT" repository = "https://github.com/acridotheres/acr" -version = "0.3.1" +version = "0.3.2" edition = "2021" [dependencies] diff --git a/src/encryption.rs b/src/encryption.rs index 002d965..b4dfc33 100644 --- a/src/encryption.rs +++ b/src/encryption.rs @@ -1 +1 @@ -pub mod sha256cbc; +pub mod aes256cbc; diff --git a/src/encryption/sha256cbc.rs b/src/encryption/aes256cbc.rs similarity index 100% rename from src/encryption/sha256cbc.rs rename to src/encryption/aes256cbc.rs diff --git a/src/hash/murmur3.rs b/src/hash/murmur3.rs index 8c953e7..076dd14 100644 --- a/src/hash/murmur3.rs +++ b/src/hash/murmur3.rs @@ -2,12 +2,12 @@ use dh::Readable; use murmur3::murmur3_32; use std::io::Result; -pub fn hash<'a>(file: &'a mut dyn Readable<'a>, offset: u64, size: u64) -> Result { +pub fn hash<'a>(file: &'a mut dyn Readable<'a>, offset: u64, size: u64, seed: u32) -> Result { let pos_before = file.pos()?; let mut limited = file.limit(offset, size)?; - let result = murmur3_32(&mut limited, 0x31082007)?; + let result = murmur3_32(&mut limited, seed)?; let file = limited.unlimit(); file.to(pos_before)?;