StringUtils randomString methods could be more random

Description

Smacks StringUtils methods to create random strings often use the UNAMBIGUOUS_NUMBERS_AND_LETTER alphabet, which lacks lower case characters.

Also there might be the demand for further XML safe character entropy, eg. XEP-0373 states that a message should be padded with random length random content padding which contains more than just numbers and letters, but also special characters.

A method for such use cases would be nice.

Lastly the javadoc of insecureRandomString(len) states that it would generate a random string of lower and upper case characters, while infact it delegates to randomString(len, random), which internally uses UNAMBIGUOUS_NUMBERS_AND_LETTER, which does not contain lower case chars at all.

Environment

None
Your pinned fields
Click on the next to a field label to start pinning.

Assignee

Unassigned

Reporter

vanitasvitae

Labels

Expected Effort

Minimal