You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by Wilson MacGyver <wm...@gmail.com> on 2017/06/20 04:12:58 UTC
[text] RandomStringGenerator as replacement for RandomStringUtils
Hi,
After upgrading to commons-lang 3.6 I noticed RandomStringUtils has been
deprecated in favor of RandomStringGenerator in commons-text
currently I'm using it by passing a character array that has a mix of
characters and symbols. I'm also using SecureRandom as the random source
I'm not at all clear on how to do this in RandomStringGenerator.
I notice in the builder you can pass a range, but this implies characters
you want to use must be continuous within unicode. The only thing I can
think of is to then
use filteredBy to filter out characters that I don't want?
At first glance, it also looks like usingRandom() only works with the
apache common RNG?
Thanks
--
Omnem crede diem tibi diluxisse supremum.