This already caught some cases of public members that should have been
private and one case where the inferred type was too specific.
Signed-off-by: Graham <gpe@openrs2.dev>
Unit tests to follow - I've been working on these classes for a few days
now, so I wanted to make sure they get backed up in the repository.
Signed-off-by: Graham <gpe@openrs2.dev>
This allows us to make them private (rather than internal) and the type
as a whole is immutable.
It does mean we need to convert the key to an IntArray every time we use
it now. However, I hope that the JVM will be smart enough to inline the
toIntArray() method and also smart enough to realise it doesn't escape,
allowing it to allocate it on the stack rather than the heap.
This commit also adds methods for converting XteaKeys to hex, and
converting from hex/integer arrays to an XteaKey object.
Signed-off-by: Graham <gpe@openrs2.dev>