Skip to content

Releases: nrednav/cuid2

v1.1.0

07 Jul 03:29
b766580

Choose a tag to compare

What's changed

Added

  • Added deterministic tests to verify the correctness of the ID generation algorithm
  • Added an aggregate progress reporter to the collision test suite for better feedback during long test runs

Changed

  • Security
    • The default RNG has been updated to use the cryptographically secure crypto/rand, instead of the insecure math/rand
    • The library is now secure by default
  • Performance
    • Optimized entropy generation by replacing inefficient string concatenation with usage of strings.Builder. This reduces memory allocations.
    • Refactored collision test suite to use less memory.
  • Other
    • The Generate() function is now initialized lazily and safely on first use via sync.Once
    • The long-running collision test has been separated from the default test suite via a build tag, to speed up testing during development

Fixed

  • The default fingerprint generation is now fully deterministic, as it sorts environment variable keys, ensuring the generated fingerprint is stable across different platforms

v1.0.1

26 Oct 03:52
dc4c4e8

Choose a tag to compare

What's Changed

  • Updated validation regex for IsCuid() to include new criteria (must start with a letter)
  • Updated crypto package to v0.17.0 via Dependabot

Full Changelog: v1.0.0...v1.0.1

v1.0.0

17 Sep 16:02

Choose a tag to compare

docs: update README