uuid6 / uuid6-ietf-draft

Next Generation UUID Formats
https://datatracker.ietf.org/doc/draft-peabody-dispatch-new-uuid-format/
187 stars 11 forks source link

Reference implementations and test vectors? #43

Closed oittaa closed 2 years ago

oittaa commented 2 years ago

I was wondering if it would make sense to provide some kind reference implementations and test vectors like every hash function specification does?

For example for UUIDv6 every timestamp, clock_seq, and node input -> some exact output

Then in Python a reference implementation could be something like this making it easy to test with the provided test vectors:

def uuid6(timestamp: int = None, clock_seq: int = None, node: int = None) -> UUID:
    ...

And then of course you could use timestamp, clock_seq, and node values from the test vectors to check against your own implementations.

kyzer-davis commented 2 years ago

@oittaa we should discuss over on https://github.com/uuid6/prototypes/issues/11

I am open to PRs for test vectors and suites on the python implementation.