From 483a8a0f16d512d1926c5c9fbe5e1a59a260b12a Mon Sep 17 00:00:00 2001 From: Graham Date: Sat, 29 Jul 2023 10:24:12 +0100 Subject: [PATCH] Support arrays larger than 2**29 in Whirlpool implementation Signed-off-by: Graham --- crypto/src/main/kotlin/org/openrs2/crypto/Whirlpool.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crypto/src/main/kotlin/org/openrs2/crypto/Whirlpool.kt b/crypto/src/main/kotlin/org/openrs2/crypto/Whirlpool.kt index 0fbd0335..54a98cb3 100644 --- a/crypto/src/main/kotlin/org/openrs2/crypto/Whirlpool.kt +++ b/crypto/src/main/kotlin/org/openrs2/crypto/Whirlpool.kt @@ -281,7 +281,7 @@ public class Whirlpool { val whirlpool = Whirlpool() whirlpool.NESSIEinit() - whirlpool.NESSIEadd(source, (len * 8).toLong()) + whirlpool.NESSIEadd(source, len.toLong() * 8) val digest = ByteArray(DIGESTBYTES) whirlpool.NESSIEfinalize(digest)