ksuid
ksuid copied to clipboard
Java implementation of K-Sortable Globally Unique IDs
IOException could be hidden in a RuntimeException rather than having to IOException , i added the error message [Link to the issue](https://github.com/akhawaja/ksuid/issues/6)
Thanks for open sourcing this! I am surprised that the [main method](https://github.com/akhawaja/ksuid/blob/b517183c60fcb354551194112cedd4f7eefa68ed/src/main/java/com/amirkhawaja/Ksuid.java#L32) throws an `IOException`: ``` public String generate() throws IOException { Ksuid.KsuidGenerator uid = new Ksuid.KsuidGenerator(random); return uid.nextId(); }...
Hi, I just used the original Go implementation to create a KSUID and I got: 1GZvgyPvVmuiQMTuzkEtKSogs2V The Java implementation gave me: COH2CXgKpgJ9Bvn8SF1xUa9CeTt The timestamp part is clearly not similar even...
The current code: ```java private long decodeTimestamp(final byte[] decodedKsuid) { final byte[] timestamp = new byte[TIMESTAMP_LENGTH]; System.arraycopy(decodedKsuid, 0, timestamp, 0, TIMESTAMP_LENGTH); return ByteBuffer.wrap(timestamp).getInt() + EPOCH; } ``` The timestamp is...
Hi, I just found this library searching for a way to generate time based sortable UUIDs that don't give up sensitive information. I'm using the Ksuid to generate file names...