add IDs.seed() method for random account seed

This commit is contained in:
Daniel Gultsch 2023-01-19 15:29:54 +01:00
parent 27952c00ed
commit 6983aedddc
No known key found for this signature in database
GPG key ID: F43D18AD2A0982C2

View file

@ -65,4 +65,10 @@ public class IDs {
lsb = (lsb & 0x3fffffffffffffffL) | 0x8000000000000000L; // set variant lsb = (lsb & 0x3fffffffffffffffL) | 0x8000000000000000L; // set variant
return new UUID(msb, lsb); return new UUID(msb, lsb);
} }
public static byte[] seed() {
final var random = new byte[32];
Conversations.SECURE_RANDOM.nextBytes(random);
return random;
}
} }