Hi, does anyone have any example code that will perform this task?
thx
Hi, does anyone have any example code that will perform this task?
thx
Itās not node.js but hereās a PHP version of the unlock key generator:
This is almost as ancient as Windows XP so not sure if it still works ![]()
Shouldnāt be too tricky to rewrite that using https://www.npmjs.com/package/big-integer
And really what is the āusefulā part is
function applyToValue ($message, $key_part1, $key_part2)
{
$result = new Math_BigInteger();
$zero = new Math_BigInteger();
$value = new Math_BigInteger (strrev ($message), 256);
$part1 = new Math_BigInteger ($key_part1, 16);
$part2 = new Math_BigInteger ($key_part2, 16);
while (! $value->equals ($zero))
{
$result = $result->multiply ($part2);
list ($value, $remainder) = $value->divide ($part2);
$result = $result->add ($remainder->modPow ($part1, $part2));
}
return $result->toHex();
}
Hey,
Iām also trying this using the big-Integer package but the modpow calc differs from the juce: remainder.exponentModulo (part1, part2); code, any idea?
This is how I do the calc in node.js: ```var modded = bigInt(remainder).modPow(part1, part2);````