<commit_before>package info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.ltk

import info.nightscout.androidaps.logging.AAPSLogger
import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.message.Address
import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.message.MessageIO
import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.message.MessagePacket
import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.message.MessageType
import info.nightscout.androidaps.utils.extensions.hexStringToByteArray

internal class LTKExchanger(private val aapsLogger: AAPSLogger,private val msgIO: MessageIO) {

    fun negociateLTKAndNonce(): LTK? {
        val msg = MessagePacket(
            destination = Address(byteArrayOf(1,2,3,4)),
            source = Address(byteArrayOf(5,6,7,8)),
            payload = "545710030100038002420000fffffffe5350313d0004024200032c5350323d000bffc32dbd20030e01000016".hexStringToByteArray(),
            sequenceNumber = 1,
            type = MessageType.PAIRING,
        )
        msgIO.sendMesssage(msg)

        return null
    }

}<commit_msg>add comments with the LTK steps<commit_after>package info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.ltk

import info.nightscout.androidaps.logging.AAPSLogger
import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.message.Address
import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.message.MessageIO
import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.message.MessagePacket
import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.message.MessageType
import info.nightscout.androidaps.utils.extensions.hexStringToByteArray

internal class LTKExchanger(private val aapsLogger: AAPSLogger,private val msgIO: MessageIO) {

    fun negociateLTKAndNonce(): LTK? {
        // send SP1, SP2
        // send SPS1
        // read SPS1

        // send SPS2
        // read SPS2

        // send SP0GP0
        // read P0

        val msg = MessagePacket(
            destination = Address(byteArrayOf(1,2,3,4)),
            source = Address(byteArrayOf(5,6,7,8)),
            payload = "545710030100038002420000fffffffe5350313d0004024200032c5350323d000bffc32dbd20030e01000016".hexStringToByteArray(),
            sequenceNumber = 1,
            type = MessageType.PAIRING,
        )
        msgIO.sendMesssage(msg)

        return null
    }

}
{'fraction_non_alphanumeric': 0.09491114701130857, 'fraction_numerical': 0.06663974151857835, 'mean_word_length': 3.612662942271881, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 2, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3529468', 'n_tokens_mistral': 920, 'n_tokens_neox': 802, 'n_words': 104}