feat: Add managing our own keys

This commit is contained in:
2022-08-04 13:19:27 +02:00
parent 27b1931629
commit e34e0cc7fb
3 changed files with 118 additions and 1 deletions

View File

@@ -34,3 +34,8 @@ List<int> generateRandomBytes(int length) {
return bytes;
}
/// Generate a random number between 0 inclusive and 2**32 exclusive (2**32 - 1 inclusive).
int generateRandom32BitNumber() {
return Random.secure().nextInt(4294967295 /*pow(2, 32) - 1*/);
}