bk / Data-ULID

Perl implementation of ULID (Universally Unique Lexicographically Sortable Identifier)
7 stars 6 forks source link

Replace CryptX with Bytes::Random::Secure::Tiny #13

Closed bbrtj closed 5 months ago

bbrtj commented 5 months ago

I'd like to suggest replacing CryptX with a pure-perl solution. Currently, CryptX is only needed for fast and secure random bytes generator. It's great for that, but it contains a bunch of other stuff we don't need. It also requires a compiler, which may be a deal breaker in some cases.

By replacing it with Bytes::Random::Secure::Tiny we:

I think performance is no longer a concern since I wrote Data::ULID::XS and it's much faster for ULID generation anyway, so would be a primary choice in high-speed scenarios.

Historically, Data::ULID always required a compiler - it used Encode::Base32::GMP before it used CryptX. Bytes::Random::Secure::Tiny seems to be a solid choice, has no dependencies and is used by Crypt::Perl.

bk commented 5 months ago

I agree. Thanks!