Use DIGESTBYTES to set the size of the output ByteArray

Signed-off-by: Graham <gpe@openrs2.dev>
bzip2
Graham 4 years ago
parent 380cc95d31
commit 9aaa095b02
  1. 2
      crypto/src/main/java/dev/openrs2/crypto/Whirlpool.kt

@ -263,7 +263,7 @@ public class Whirlpool {
whirlpool.NESSIEinit() whirlpool.NESSIEinit()
whirlpool.NESSIEadd(source, (len * 8).toLong()) whirlpool.NESSIEadd(source, (len * 8).toLong())
val digest = ByteArray(64) val digest = ByteArray(DIGESTBYTES)
whirlpool.NESSIEfinalize(digest) whirlpool.NESSIEfinalize(digest)
return digest return digest
} }

Loading…
Cancel
Save