mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-27 04:26:58 +08:00
@@ -556,5 +556,36 @@ class MsgHttp {
|
||||
|
||||
static String getDevId() {
|
||||
return Uuid().v4();
|
||||
// final List<String> b = [
|
||||
// '0',
|
||||
// '1',
|
||||
// '2',
|
||||
// '3',
|
||||
// '4',
|
||||
// '5',
|
||||
// '6',
|
||||
// '7',
|
||||
// '8',
|
||||
// '9',
|
||||
// 'A',
|
||||
// 'B',
|
||||
// 'C',
|
||||
// 'D',
|
||||
// 'E',
|
||||
// 'F'
|
||||
// ];
|
||||
// final List<String> s = "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".split('');
|
||||
// for (int i = 0; i < s.length; i++) {
|
||||
// if ('-' == s[i] || '4' == s[i]) {
|
||||
// continue;
|
||||
// }
|
||||
// final int randomInt = Random().nextInt(16);
|
||||
// if ('x' == s[i]) {
|
||||
// s[i] = b[randomInt];
|
||||
// } else {
|
||||
// s[i] = b[3 & randomInt | 8];
|
||||
// }
|
||||
// }
|
||||
// return s.join();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user