Fixes bug on saving Encrypted files on DMs.

Fixes bug when using partial downloads to display videos on DMs.
This commit is contained in:
Vitor Pamplona
2025-02-25 16:43:15 -05:00
parent d5d289a834
commit e6cd3a99c5
12 changed files with 194 additions and 36 deletions
Binary file not shown.
@@ -54,4 +54,22 @@ class AESGCMTest {
assertEquals(44201, decrypted.size)
}
@Test
fun videoTest2() {
val myCipher =
AESGCM(
"373d19850ebc8ed5b0fefcca5cd6f27fde9cb6ac54fd32f6b4fad9d68ebe8ee0".hexToByteArray(),
"95e67b6874784a54299b58b8990499bd".hexToByteArray(),
)
val encrypted =
getInstrumentation().context.assets.open("trouble_video").use {
it.readAllBytes()
}
val decrypted = myCipher.decrypt(encrypted)
assertEquals(1277122, decrypted.size)
}
}