kULID icon indicating copy to clipboard operation
kULID copied to clipboard

Entropy encoding is broken

Open tom-mi opened this issue 2 years ago • 0 comments

Hello,

the entropy encoding to Base32 is broken. Consider the following example:

val testUlid = "01EA9F3000ZZZZZZZZZZZZZZZZ"
println(testUlid)
println(ULID.generate(ULID.getTimestamp(testUlid), ULID.getEntropy(testUlid)))

The output is:

01EA9F3000ZZZZZZZZZZZZZZZZ
01EA9F3000ZZZZ1ZZZZZZZ1ZZZ

It seems https://github.com/JonasSchubert/kULID/pull/8 aims to fix that. I did not try out the fix from the PR, but a short comparison with the python implementation looks promising.

Please fix :)

tom-mi avatar Nov 28 '22 14:11 tom-mi