I'm using the Key component of defuse/php-encryption to generate a secure key used as voucher codes. Key has a function to print the generated key as a ascii-safe string. The only issue in my use case is that it's quite long.
Is there any secure way to reduce the length of the key, avoiding possible collisions and making sure there's still randomness to the key so valid keys can't be guessed?
I'm looking at ending up with something like a 16 char key.