mirror of
https://gitlab.com/famedly/fluffychat.git
synced 2024-11-14 16:09:31 +01:00
8 lines
274 B
Dart
8 lines
274 B
Dart
|
import 'dart:math';
|
||
|
|
||
|
const _chars = 'AaBbCcDdEeFfGgHhIiJjKkLlMmNnOoPpQqRrSsTtUuVvWwXxYyZz1234567890';
|
||
|
Random _rnd = Random();
|
||
|
|
||
|
String getClientSecret(int length) => String.fromCharCodes(Iterable.generate(
|
||
|
length, (_) => _chars.codeUnitAt(_rnd.nextInt(_chars.length))));
|