File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed
app/src/main/kotlin/com/wire/android/ui/settings/devices Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -177,14 +177,25 @@ class DeviceDetailsViewModel @Inject constructor(
177177 canBeRemoved = ! result.isCurrentClient && isSelfClient && result.client.type != ClientType .LegalHold ,
178178 mlsCipherSuiteSignature = MLSPublicKeyType .from(
179179 result.client.mlsPublicKeys?.keys?.firstOrNull().orEmpty()
180- ).value.toString()
180+ ).let { mapCipherSuiteSignatureToShortName(it) }
181181 )
182182 }
183183 }
184184 }
185185 }
186186 }
187187
188+ private fun mapCipherSuiteSignatureToShortName (signature : MLSPublicKeyType ): String {
189+ return when (signature) {
190+ MLSPublicKeyType .ECDSA_SECP256R1_SHA256 -> " P256"
191+ MLSPublicKeyType .ECDSA_SECP384R1_SHA384 -> " P384"
192+ MLSPublicKeyType .ECDSA_SECP521R1_SHA512 -> " P521"
193+ MLSPublicKeyType .ED25519 -> " ED25519"
194+ MLSPublicKeyType .ED448 -> " ED448"
195+ is MLSPublicKeyType .Unknown -> " Unknown"
196+ }
197+ }
198+
188199 fun removeDevice (onSuccess : () -> Unit ) {
189200 viewModelScope.launch {
190201 val isPasswordRequired: Boolean = when (val passwordRequiredResult = isPasswordRequired()) {
You can’t perform that action at this time.
0 commit comments