I have a device and for each device I wish to generate a string of the following format: XXXXXXXX
. Each X
is either B
, G
, or R
. An example is GRBRRBRB
. This gives me roughly 7000 keys to work with which is enough as I doubt I'll have more devices.
I was thinking I could generate them all before hand, and dump them in a file or something, and just get the next key available from that, but I wonder if there is a better way to do this.
I know there are better ways to do it if I don't need guaranteed uniqueness but I definitely need that so I'm not sure what the best way to do it is.