jongpie/ApexUUID

Add version and variant

codingjoe opened this issue ยท 5 comments

The implementation is not really conform with RFC 4122.
It doesn't not define a version nor a variant.

I guess it would be best do make it a version 4 variant 1 uuid. This will allow 122 or even 123 random bits.

If you are interested how it's done. Python has "ok readable" implementation of UUID version 4, see https://github.com/python/cpython/blob/master/Lib/uuid.py

Hey @codingjoe - sorry for the very late response! I think adding logic for version 4 variant is a great idea - I'm hoping to have some time soon to work on it. I'll keep this issue updated with my progress.

@codingjoe this issue is now closed - I've just released v2.0 of the project. It's a complete rewrite that now conforms to the v4 UUID standard. Check out the updated README for code samples on how to use the new methods, etc since there are some changes from the previous version.

Wow, that's really cool. I never imagined you putting that much effort into the issue. I really appreciate it. Finally a good UUID implementation for salesforce. That's amazing! ๐Ÿฅ‡

Hey, no problem! This was a lot of fun to rework and to learn in depth about the UUID standard, so it's been great working on this.

If you find any bugs (or think of any new features that would be useful), let me know!

will do, thx ๐Ÿ‘