Add cryptography module with hashing function
All checks were successful
Deploy datapack to dev / Build (push) Successful in 9s

This commit is contained in:
themodrnhakr 2025-03-21 15:40:08 -05:00
parent a4e515ed80
commit 7be40debe7

View File

@ -0,0 +1,17 @@
class database.crypt {
function hashString() {}
function hashInteger() {
$cryptMultiplyer = 49;
$cryptConstant = 7;
$cryptPrime = 15331;
$$input = $(integer);
$hash = $input;
$hash *= $cryptMultiplyer;
$hash += $cryptConstant;
$hash %= $cryptPrime;
tellraw @a $hash.toString();
}
}