From 6983aedddc1565b1101976f5a821acfd25db7527 Mon Sep 17 00:00:00 2001 From: Daniel Gultsch Date: Thu, 19 Jan 2023 15:29:54 +0100 Subject: [PATCH] add IDs.seed() method for random account seed --- src/main/java/im/conversations/android/IDs.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/main/java/im/conversations/android/IDs.java b/src/main/java/im/conversations/android/IDs.java index 5e555dac6..7f50d8040 100644 --- a/src/main/java/im/conversations/android/IDs.java +++ b/src/main/java/im/conversations/android/IDs.java @@ -65,4 +65,10 @@ public class IDs { lsb = (lsb & 0x3fffffffffffffffL) | 0x8000000000000000L; // set variant return new UUID(msb, lsb); } + + public static byte[] seed() { + final var random = new byte[32]; + Conversations.SECURE_RANDOM.nextBytes(random); + return random; + } }