randchars
randchars is a cli app that generates random characters. By default, it generates them from the base64 set and outputs the resulting characters to stdout; one line per group of generated character. A PRNG is used unless the -c flag is passed, which will result in a CSPRNG being used.
Usage
$ randchars 12
BtpzuxNAcgCN
1 sets totalling 12 random characters were generated and written to stdout
Multiple groups of random characters can be generated by providing a space separated list of numbers.
$ randchars 12 12 12
Yqh/Hc/1e7iF
0qpUX+cgi7no
ttDN5dIIUalq
3 sets totalling 36 random characters were generated and written to stdout
Use a CSPRNG:
$ randchars -c 16
AG2KBlizOPm+DTZf
1 sets totalling 16 random characters were generated and written to stdout
Flags
| flag |
default |
description |
| c |
false |
use a CSPRNG |
| o |
stdout |
output destination |
| chars |
base64 |
charset to use for generation |
| h |
false |
help |
| help |
false |
help |
Supported Charsets
| value |
chars |
| alphanum |
a-zA-Z0-9 |
| lalphanum |
a-z0-9 |
| ulaphanum |
A-Z0-9 |
| alpha |
a-zA-Z |
| lalpha |
a-z |
| ualpha |
A-Z |
| base64 |
a-zA-Z0-9+/ |
License
Copyright © 2016, All rights reserved
Joel Scoble, https://github.com/mohae/randchars
This is licensed under The MIT License. Please refer to the included
LICENSE file for more information. If the LICENSE file has not been
included, please refer to the url above.
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License