Graham
b37e4d0d0b
Use alternatives for most methods deprecated in Kotlin 1.5
...
Signed-off-by: Graham <gpe@openrs2.org>
3 years ago
Graham
3d09c4d90a
Make XteaKey a data class
...
It needs a hashCode/equals implementation as it's used in sets.
Signed-off-by: Graham <gpe@openrs2.org>
3 years ago
Graham
31db959a46
Add XteaKeyDeserializer
...
Signed-off-by: Graham <gpe@openrs2.org>
3 years ago
Graham
5e6afb88f6
Improve RSA method naming
...
Signed-off-by: Graham <gpe@openrs2.org>
3 years ago
Graham
98d25539b9
Combine RSA encrypt and decrypt methods into a single crypt method
...
This allows us to speed up master index signing with the CRT.
Signed-off-by: Graham <gpe@openrs2.org>
3 years ago
Graham
ed7eb10411
Relax isPrivate checks in the encrypt/decrypt methods
...
The master index uses RSA signatures in some builds. As such, we need to
be able to encrypt with a private key and decrypt with a public key.
Signed-off-by: Graham <gpe@openrs2.org>
3 years ago
Graham
e9e7b7848d
Add constant for the RSA magic byte
...
Signed-off-by: Graham <gpe@openrs2.org>
3 years ago
Graham
46b311c5ad
Add XteaKey Jackson serializer
...
Signed-off-by: Graham <gpe@openrs2.org>
3 years ago
Graham
f1c3c65811
Use upper case hex digits in golden ratio constant
...
Signed-off-by: Graham <gpe@openrs2.org>
3 years ago
Graham
1e3257acf7
Use consistent case for Unicode escapes in the Whirlpool S-box
...
Signed-off-by: Graham <gpe@openrs2.org>
3 years ago
Graham
f90b9df505
Replace Paths.get() with Path.of()
...
Paths.get() may be deprecated in a future release.
Signed-off-by: Graham <gpe@openrs2.org>
3 years ago
Graham
c70cfcfb30
Add ByteBuf.whirlpool() extension method
...
Signed-off-by: Graham <gpe@openrs2.org>
3 years ago
Graham
6f815b6334
Move return outside try block
...
Signed-off-by: Graham <gpe@openrs2.org>
3 years ago
Graham
a86f000f88
Add StreamCipher interface and a NopStreamCipher implementation
...
This will allow us to replace IsaacRandom in the future Netty
encoders/decoders with an implementation suitable for use in a unit
test.
Signed-off-by: Graham <gpe@openrs2.org>
4 years ago
Graham
f143eef142
Move Kotlin files from src/{main,test}/java to src/{main,test}/kotlin
...
Signed-off-by: Graham <gpe@openrs2.org>
4 years ago