"text" not used in hash function
thibaultmeyer opened this issue · 2 comments
thibaultmeyer commented
It appears that the variable "text" is not used. The problem is probably in the call to sha3 function.
Line 23 in 31138ac
const hash = (input = "", length = bigLength) => {
const salt = createEntropy(length);
const text = input + salt;
return BigInt(
sha3(input)
.map((x) => x.toString(16))
.join("")
)
.toString(36)
.substring(2);
};
ericelliott commented
Good catch! Thank you.
Please review #6
ericelliott commented
Released in @paralleldrive/cuid2@1.0.1