format: ktlint

This commit is contained in:
Andrei Vereha 2021-03-06 11:10:19 +01:00
parent c71433ad1a
commit 4046828567
15 changed files with 37 additions and 37 deletions

View file

@ -22,7 +22,8 @@ class EnDecrypt(private val aapsLogger: AAPSLogger, private val nonce: Nonce, pr
aapsLogger.debug(LTag.PUMPBTCOMM, "Decrypt header ${header.toHex()} payload: ${payload.toHex()}")
aapsLogger.debug(LTag.PUMPBTCOMM, "Decrypt NONCE ${n.toHex()}")
cipher.init(
false, AEADParameters(
false,
AEADParameters(
KeyParameter(ck),
MAC_SIZE * 8, // in bits
n,
@ -44,7 +45,8 @@ class EnDecrypt(private val aapsLogger: AAPSLogger, private val nonce: Nonce, pr
val encryptedPayload = ByteArray(payload.size + MAC_SIZE)
cipher.init(
true, AEADParameters(
true,
AEADParameters(
KeyParameter(ck),
MAC_SIZE * 8, // in bits
n,

View file

@ -93,6 +93,5 @@ class Session(
private const val COMMAND_PREFIX = "S0.0="
private const val COMMAND_SUFFIX = ",G0.0"
private const val RESPONSE_PREFIX = "0.0="
}
}

View file

@ -54,6 +54,5 @@ class EnDecryptTest {
val encrypted = enDecrypt.encrypt(msg)
Assert.assertEquals(encryptedMessage.toHex(), encrypted.asByteArray().toHex())
}
}