generate

fun generate(permission: Permission): String

Generates a token, composed of 3 parts:

  • A clearly identifiable prefix, that also conveys the token scope (read/eval).

  • A random string, to avoid collisions.

  • A checksum, to reduce false positives when identifying leaked tokens.

Entropy is log2(36/log2(2)) * 48 = ~248 bits. For reference, GitHub tokens have ~178 bits.

Sources

Link copied to clipboard