mirror of
https://github.com/ckolivas/lrzip.git
synced 2026-04-05 06:15:28 +00:00
Use separate lrz_encrypt and lrz_decrypt wrappers to lrz_crypt.
This commit is contained in:
parent
0b1db75a44
commit
ff5a5ed054
5 changed files with 20 additions and 7 deletions
4
stream.c
4
stream.c
|
|
@ -1195,7 +1195,7 @@ retry:
|
|||
get_rand(cti->salt, 8);
|
||||
memcpy(cti->salt + 8, &cti->c_len, 8);
|
||||
memcpy(cti->salt + 16, &cti->s_len, 8);
|
||||
lrz_crypt(control, cti->s_buf, padded_len, cti->salt, 1);
|
||||
lrz_encrypt(control, cti->s_buf, padded_len, cti->salt);
|
||||
}
|
||||
|
||||
/* If compression fails for whatever reason multithreaded, then wait
|
||||
|
|
@ -1465,7 +1465,7 @@ fill_another:
|
|||
return -1;
|
||||
|
||||
if (ENCRYPT)
|
||||
lrz_crypt(control, s_buf, padded_len, salt, 0);
|
||||
lrz_decrypt(control, s_buf, padded_len, salt);
|
||||
|
||||
ucthread[s->uthread_no].s_buf = s_buf;
|
||||
ucthread[s->uthread_no].c_len = c_len;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue