newToken static method

String newToken([
  1. Random? random
])

32 bytes from a secure source, base64url.

Implementation

static String newToken([Random? random]) {
  final Random source = random ?? Random.secure();
  return dvWebPushBase64Encode(<int>[
    for (int i = 0; i < 32; i++) source.nextInt(256),
  ]);
}