Skip to content

Commit

Permalink
Move method to interface step 3
Browse files Browse the repository at this point in the history
  • Loading branch information
bmarty committed Mar 5, 2020
1 parent 1b29c7b commit 36c52d2
Showing 1 changed file with 10 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down

0 comments on commit 36c52d2

Please sign in to comment.