mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-02-25 04:06:14 +00:00
Show a megaphone when a device is about to unlink.
This commit is contained in:
committed by
Nicholas Tinsley
parent
d7ee9639fd
commit
50149a3803
@@ -4,7 +4,6 @@ import org.hamcrest.MatcherAssert.assertThat
|
||||
import org.hamcrest.Matchers.`is`
|
||||
import org.junit.Test
|
||||
import org.thoughtcrime.securesms.crypto.IdentityKeyUtil
|
||||
import org.thoughtcrime.securesms.database.loaders.DeviceListLoader
|
||||
import org.thoughtcrime.securesms.devicelist.protos.DeviceName
|
||||
import java.nio.charset.Charset
|
||||
|
||||
@@ -17,7 +16,7 @@ class DeviceNameCipherTest {
|
||||
|
||||
val encryptedDeviceName = DeviceNameCipher.encryptDeviceName(deviceName.toByteArray(Charset.forName("UTF-8")), identityKeyPair)
|
||||
|
||||
val plaintext = DeviceListLoader.decryptName(DeviceName.ADAPTER.decode(encryptedDeviceName), identityKeyPair)
|
||||
val plaintext = DeviceNameCipher.decryptDeviceName(DeviceName.ADAPTER.decode(encryptedDeviceName), identityKeyPair)!!
|
||||
|
||||
assertThat(String(plaintext, Charset.forName("UTF-8")), `is`(deviceName))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user