Closed equivalent closed 5 years ago
currently the string generator is custom built solution https://github.com/equivalent/public_uid/blob/master/lib/public_uid/generators/range_string.rb`
For consistency let's keep that generator as it is.
But it would be nice if we create standardize SecureRandom generator that will be the default one, e.g.:
require 'securerandom SecureRandom.hex(4) => "9204aa6c"
so maybe copy the existing generator to new file that uses SecureRandom#hex(range) and write tests
SecureRandom#hex(range)
ok thank you @ReneIvanov for implementing this in #14
PublicUid::Generators::HexStringSecureRandom will be used as default generator in version 1.3 (https://rubygems.org/gems/public_uid/versions/1.3.0)
currently the string generator is custom built solution https://github.com/equivalent/public_uid/blob/master/lib/public_uid/generators/range_string.rb`
For consistency let's keep that generator as it is.
But it would be nice if we create standardize SecureRandom generator that will be the default one, e.g.:
so maybe copy the existing generator to new file that uses
SecureRandom#hex(range)
and write tests