generateUniqueRandom static method
Implementation
static BuBytes generateUniqueRandom({
int length = 32,
List<List<int>> existingKeys = const [],
}) {
BuBytes rand = generateRandom(length: length);
if (existingKeys.isEmpty) return rand;
while (BytesUtils.isContains(existingKeys, rand)) {
rand = QuickCrypto.generateRandom(length: length);
}
return rand;
}