package com.github.cfogrady.vbnfc // ConverToPages converts the byte array into the paged structure used in NFC communication // If data for the header isn't included, the first 8 pages will be 0 filled. fun ConvertToPages(data: ByteArray, header: ByteArray? = null) : List { val pages = ArrayList() // setup blank header pages for (i in 0..7) { if (header != null) { val index = i*4 pages.add(header.sliceArray(index..