@Override
    public String getShareKey() {

        // Produce storage space for required share key length
        char[] key = new char[KEY_LENGTH];

        // Fill key with random digits
        for (int i = 0; i < KEY_LENGTH; i++)
            key[i] = URL_SAFE_BASE64_DIGITS[next(6)];

        return new String(key);

    }
The character representations of each possible base64 digit. This class
uses the URL-safe variant of base64 (also known as "base64url"), which
uses '-' and '_' instead of '+' and '/' for digits 62 and 63
respectively. See RFC 4648, Section 5: "Base 64 Encoding with URL and
Filename Safe Alphabet" (https://tools.ietf.org/html/rfc4648#section-5).
extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/java/org/apache/guacamole/auth/jdbc/sharing/SecureRandomShareKeyGenerator.java