Fixes bug on saving Encrypted files on DMs.
Fixes bug when using partial downloads to display videos on DMs.
This commit is contained in:
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)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user