Skip to content

Commit

Permalink
Add hint if key for decryption might be wrong
Browse files Browse the repository at this point in the history
  • Loading branch information
valaphee committed Dec 16, 2023
1 parent 5344c2f commit a38ac6a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ fn decrypt(input: impl AsRef<Path>, output: impl AsRef<Path>, key: &[u8]) {
Aes256Cfb8Dec::new_from_slices(&key, &key[0..16])
.unwrap()
.decrypt(&mut buffer);
serde_json::from_slice::<Content>(&buffer).unwrap()
serde_json::from_slice::<Content>(&buffer).expect("Failed to parse contents.json, the key might be wrong")
};

// ignore all entries but the first
Expand Down

0 comments on commit a38ac6a

Please sign in to comment.