Switch message cipher consumers to shared media API
This commit is contained in:
1 parent
9c22b04cb0
commit
b4ef4ec919
4 files changed
+25
-25
No files matched your search
@@ -45,11 +45,11 @@ static void work(void* arg) {
|
||||
rewind(source); rewind(cipher);
|
||||
/* Каждый новый шифротекст получает отдельный media_id. */
|
||||
memcpy(id, &t->encryptions, sizeof(t->encryptions));
|
||||
if (dm_media_encrypt_stream(key, 42, id, source, cipher, &size, hash)) goto done;
|
||||
if (media_encrypt_stream(key, 42, id, source, cipher, &size, hash)) goto done;
|
||||
t->encryptions++;
|
||||
} while (get_time_tb() < until);
|
||||
rewind(cipher);
|
||||
if (size != 8 * 1024 * 1024 || dm_media_decrypt_stream(key, 42, id, size, hash, cipher, plain)) goto done;
|
||||
if (size != 8 * 1024 * 1024 || media_decrypt_stream(key, 42, id, size, hash, cipher, plain)) goto done;
|
||||
rewind(plain);
|
||||
SHA256_Init(&digest);
|
||||
size_t n;
|
||||
|
||||
Reference in new issue
Block a user