mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-02-27 05:03:28 +00:00
Introduce Wire for proto codegen.
This commit is contained in:
committed by
Nicholas Tinsley
parent
72449fd73e
commit
a91a13cead
@@ -5,7 +5,7 @@ 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.DeviceNameProtos
|
||||
import org.thoughtcrime.securesms.devicelist.protos.DeviceName
|
||||
import java.nio.charset.Charset
|
||||
|
||||
class DeviceNameCipherTest {
|
||||
@@ -17,7 +17,7 @@ class DeviceNameCipherTest {
|
||||
|
||||
val encryptedDeviceName = DeviceNameCipher.encryptDeviceName(deviceName.toByteArray(Charset.forName("UTF-8")), identityKeyPair)
|
||||
|
||||
val plaintext = DeviceListLoader.decryptName(DeviceNameProtos.DeviceName.parseFrom(encryptedDeviceName), identityKeyPair)
|
||||
val plaintext = DeviceListLoader.decryptName(DeviceName.ADAPTER.decode(encryptedDeviceName), identityKeyPair)
|
||||
|
||||
assertThat(String(plaintext, Charset.forName("UTF-8")), `is`(deviceName))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user