mirror of
https://github.com/vector-im/element-android.git
synced 2024-11-15 01:35:07 +08:00
Move method to interface step 3
This commit is contained in:
parent
1b29c7bf91
commit
36c52d24a7
@ -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 New Issue
Block a user