Compare commits
No commits in common. "ac52c20e3bce8813ae0d64892e4c592efcb232fc" and "a5b105f4869bef0ae9c5c85f9bdd6ef434f3e4ea" have entirely different histories.
ac52c20e3b
...
a5b105f486
2 changed files with 3 additions and 3 deletions
2
build.sh
2
build.sh
|
@ -24,5 +24,5 @@ strip target/release/omegaupload-server
|
|||
cp target/release/omegaupload-server dist/omegaupload-server
|
||||
|
||||
tar -cvf dist.tar dist
|
||||
rm -rf dist.tar.zst
|
||||
rm -r dist.tar.zst
|
||||
zstd -T0 --ultra --rm -22 dist.tar
|
|
@ -92,7 +92,7 @@ pub fn open_in_place(data: &mut Vec<u8>, key: &Key, password: Option<&str>) -> R
|
|||
None
|
||||
};
|
||||
|
||||
let nonce = Nonce::from_slice(&data.split_off(buffer_len - Nonce::SIZE));
|
||||
let nonce = Nonce::from_slice(&data.split_off(Nonce::SIZE));
|
||||
|
||||
// At this point we should have a buffer that's only the ciphertext.
|
||||
|
||||
|
@ -111,7 +111,7 @@ pub fn open_in_place(data: &mut Vec<u8>, key: &Key, password: Option<&str>) -> R
|
|||
#[must_use]
|
||||
fn gen_key_nonce() -> (Key, Nonce) {
|
||||
let mut rng = thread_rng();
|
||||
let mut key = GenericArray::default();
|
||||
let mut key: Key = GenericArray::default();
|
||||
rng.fill(key.as_mut_slice());
|
||||
let mut nonce = Nonce::default();
|
||||
rng.fill(nonce.as_mut_slice());
|
||||
|
|
Loading…
Reference in a new issue