Simple Random String Generation

Oct 20, 2016 07:51 · 222 words · 2 minutes read

Update 2019: this service is no longer live, online password generators use SSL now.

https://r.ger.lv/25 - bookmark this page and it will give you a 25 character random string.

Or run curl -L r.ger.lv from the command line. It will show a 301 redirect page if you don’t use -L.

Special characters

By default, it doesn’t add any special characters. If you want special characters, use following format: https://r.ger.lv/s-25.

Options

  • r.ger.lv - (default) - length: 20, characters: [a-zA-Z0-9]
  • r.ger.lv/<len> - length: <len> (min 5, max 128), characters: [a-zA-Z0-9]
  • r.ger.lv/s-<len> - length: <len> (min 5, max 128), characters: [a-zA-Z0-9_+-.,!@#$%^&*();\/|“‘]

Why?

To create something simple to use. 1Password and other password managers have password generation, but the UX is 💩. There are websites for custom password generation, but most of them don’t use SSL, so big -1 to them.

This simple tool isn’t only for passwords, but also for generating random strings that can be used anywhere.

How it works.

The script itself is really simple. sha512 hash of 128 /dev/urandom characters, but then go through it and capitalise some letters randomly.

For s option it’s slightly more complicated. We generate a sha512, and after every 2-4 characters, we insert a special character. Then we repeat the process: generate the new hash and insert a special character. And then we do the random capitalisation.