mirror of
https://github.com/element-hq/element-android
synced 2024-11-24 18:35:40 +03:00
Move method to interface step 3
This commit is contained in:
parent
1b29c7bf91
commit
36c52d24a7
1 changed files with 10 additions and 6 deletions
|
@ -76,13 +76,17 @@ internal interface VerificationInfoStart : VerificationInfo {
|
|||
}
|
||||
|
||||
private fun isValidSas(): Boolean {
|
||||
val myHashes = hashes
|
||||
val myMessageAuthenticationCodes = messageAuthenticationCodes
|
||||
val myShortAuthenticationStrings = shortAuthenticationStrings
|
||||
|
||||
if (keyAgreementProtocols.isNullOrEmpty()
|
||||
|| hashes.isNullOrEmpty()
|
||||
|| !hashes.contains("sha256") || messageAuthenticationCodes.isNullOrEmpty()
|
||||
|| (!messageAuthenticationCodes.contains(SASDefaultVerificationTransaction.SAS_MAC_SHA256)
|
||||
&& !messageAuthenticationCodes.contains(SASDefaultVerificationTransaction.SAS_MAC_SHA256_LONGKDF))
|
||||
|| shortAuthenticationStrings.isNullOrEmpty()
|
||||
|| !shortAuthenticationStrings.contains(SasMode.DECIMAL)) {
|
||||
|| myHashes.isNullOrEmpty()
|
||||
|| !myHashes.contains("sha256") || myMessageAuthenticationCodes.isNullOrEmpty()
|
||||
|| (!myMessageAuthenticationCodes.contains(SASDefaultVerificationTransaction.SAS_MAC_SHA256)
|
||||
&& !myMessageAuthenticationCodes.contains(SASDefaultVerificationTransaction.SAS_MAC_SHA256_LONGKDF))
|
||||
|| myShortAuthenticationStrings.isNullOrEmpty()
|
||||
|| !myShortAuthenticationStrings.contains(SasMode.DECIMAL)) {
|
||||
return false
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue