From 0e7e8f2d7dbec105d59b5d84e4e88a5ff26f3870 Mon Sep 17 00:00:00 2001 From: Graham Date: Sun, 13 Sep 2020 09:33:46 +0100 Subject: [PATCH] Make the individual components of an XteaKey public This is useful in the archiving service code, as it can extract them for insertion into the database without the overhead of creating and then throwing away an IntArray. Signed-off-by: Graham --- crypto/src/main/java/dev/openrs2/crypto/Xtea.kt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/crypto/src/main/java/dev/openrs2/crypto/Xtea.kt b/crypto/src/main/java/dev/openrs2/crypto/Xtea.kt index ccb881aa..3dd77b98 100644 --- a/crypto/src/main/java/dev/openrs2/crypto/Xtea.kt +++ b/crypto/src/main/java/dev/openrs2/crypto/Xtea.kt @@ -8,10 +8,10 @@ private const val BLOCK_SIZE = 8 private const val BLOCK_SIZE_MASK = BLOCK_SIZE - 1 public class XteaKey( - private val k0: Int, - private val k1: Int, - private val k2: Int, - private val k3: Int + public val k0: Int, + public val k1: Int, + public val k2: Int, + public val k3: Int ) { public val isZero: Boolean get() = k0 == 0 && k1 == 0 && k2 == 0 && k3 == 0