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 <gpe@openrs2.dev>
Graham 4 years ago
parent 2c7abdc7ff
commit 0e7e8f2d7d
  1. 8
      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 private const val BLOCK_SIZE_MASK = BLOCK_SIZE - 1
public class XteaKey( public class XteaKey(
private val k0: Int, public val k0: Int,
private val k1: Int, public val k1: Int,
private val k2: Int, public val k2: Int,
private val k3: Int public val k3: Int
) { ) {
public val isZero: Boolean public val isZero: Boolean
get() = k0 == 0 && k1 == 0 && k2 == 0 && k3 == 0 get() = k0 == 0 && k1 == 0 && k2 == 0 && k3 == 0

Loading…
Cancel
Save