Skip to content

Commit

Permalink
Dependency updates.
Browse files Browse the repository at this point in the history
  • Loading branch information
sciguyryan committed Aug 12, 2024
1 parent 0a143c4 commit d418bf8
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 33 deletions.
2 changes: 0 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
cargo-features = ["strip"]

[workspace]
members = ["psistega3-core", "psistega3-cli"]
resolver = "2"
Expand Down
4 changes: 2 additions & 2 deletions psistega3-cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@ publish = false
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
log = "0.4.21"
log = "0.4.22"
psistega3-core = { path = "../psistega3-core" }
rand = "0.8.5"
rand_core = { version = "0.6.4", features = ["std"] }
rand_chacha = "0.3.1"
rpassword = "7.3.1"
simple_logger = "4.3.3"
simple_logger = "5.0.0"

[target.'cfg(windows)'.build-dependencies]
winres = "0.1.12"
16 changes: 8 additions & 8 deletions psistega3-core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,20 +15,20 @@ publish = false
aes-gcm = "0.10.3"
argon2 = "0.5.3"
byteorder = "1.5.0"
base64 = "0.22.0"
crc32fast = "1.4.0"
base64 = "0.22.1"
crc32fast = "1.4.2"
dirs = "5.0.1"
filetime = "0.2.23"
hashbrown = "0.14.3"
filetime = "0.2.24"
hashbrown = "0.14.5"
hex-literal = "0.4.1"
image = { version = "0.25.0-preview.0", features = ["png"] }
log = "0.4.21"
image = { version = "0.25.2", features = ["png", "rayon"] }
log = "0.4.22"
memmap2 = "0.9.4"
rand = "0.8.5"
rand_core = { version = "0.6.4", features = ["std"] }
rand_xoshiro = "0.6.0"
sha3 = "0.11.0-pre.3"
simple_logger = "4.3.3"
sha3 = "0.10.8"
simple_logger = "5.0.0"

[dev-dependencies]
path-absolutize = "3.1.1"
32 changes: 11 additions & 21 deletions psistega3-core/src/codecs/v1.rs
Original file line number Diff line number Diff line change
Expand Up @@ -610,47 +610,37 @@ impl StegaV1 {
unsafe {
let state = misc_utils::is_bit_set(&data[0], 0) as u8;
flags |= state & BIT_MASKS.get_unchecked(0);
}

// The 2nd to 4th bits will be stored in bytes 2 to 4 respectively.
// Bit 2 stores the read-once flag.
// Bits 3 and 4 are reserved fo future use.
unsafe {
// The 2nd to 4th bits will be stored in bytes 2 to 4 respectively.
// Bit 2 stores the read-once flag.
// Bits 3 and 4 are reserved fo future use.
let state = misc_utils::is_bit_set(&data[1], 0) as u8;
flags |= (state << 1) & BIT_MASKS.get_unchecked(1);
}
unsafe {

let mask = BIT_MASKS.get_unchecked(2);
let state = misc_utils::is_bit_set(&data[2], 0) as u8;
flags |= (state << 2) & mask;
}
unsafe {

let mask = BIT_MASKS.get_unchecked(3);
let state = misc_utils::is_bit_set(&data[3], 0) as u8;
flags |= (state << 3) & mask;
}

// 5th and 6th bits will be stored in byte 5.
// These are currently reserved for future use.
unsafe {
// 5th and 6th bits will be stored in byte 5.
// These are currently reserved for future use.
let mask = BIT_MASKS.get_unchecked(4);
let state = misc_utils::is_bit_set(&data[4], 0) as u8;
flags |= (state << 4) & mask;
}
unsafe {

let mask = BIT_MASKS.get_unchecked(5);
let state = misc_utils::is_bit_set(&data[4], 1) as u8;
flags |= (state << 5) & mask;
}

// 7th and 8th bits will be stored in byte 6.
// These are currently reserved for future use.
unsafe {
// 7th and 8th bits will be stored in byte 6.
// These are currently reserved for future use.
let mask = BIT_MASKS.get_unchecked(6);
let state = misc_utils::is_bit_set(&data[5], 0) as u8;
flags |= (state << 6) & mask;
}
unsafe {

let mask = BIT_MASKS.get_unchecked(7);
let state = misc_utils::is_bit_set(&data[5], 1) as u8;
flags |= (state << 7) & mask;
Expand Down

0 comments on commit d418bf8

Please sign in to comment.