Generates a random token. Useful for temporary one-use URLs, such as in
email confirmations.
The strength is the number of bytes of randomness in the token.
Note this is NOT the length of the token string returned, since this token is
base64-encoded (using an entirely URI-safe version that doesn't need escaping)
from the raw random bytes.
The strength must be a multiple of 4, or this will throw an Exception
WARNING! Mt19937 (the default here) is not a "Cryptographically secure
pseudorandom number generator"
Generates a random token. Useful for temporary one-use URLs, such as in email confirmations.
The strength is the number of bytes of randomness in the token. Note this is NOT the length of the token string returned, since this token is base64-encoded (using an entirely URI-safe version that doesn't need escaping) from the raw random bytes.
The strength must be a multiple of 4, or this will throw an Exception
WARNING! Mt19937 (the default here) is not a "Cryptographically secure pseudorandom number generator"