X-Git-Url: https://git.nmode.ca/signal-cli/blobdiff_plain/bbdd6a89102f200f284a01a41ac2809c0759ae50..425626ef9475cbc90ef8ada95dee172389baf521:/src/main/java/org/asamk/signal/manager/util/KeyUtils.java diff --git a/src/main/java/org/asamk/signal/manager/util/KeyUtils.java b/src/main/java/org/asamk/signal/manager/util/KeyUtils.java index 2b4bc371..3f9ec08f 100644 --- a/src/main/java/org/asamk/signal/manager/util/KeyUtils.java +++ b/src/main/java/org/asamk/signal/manager/util/KeyUtils.java @@ -3,6 +3,7 @@ package org.asamk.signal.manager.util; import org.asamk.signal.util.RandomUtils; import org.signal.zkgroup.InvalidInputException; import org.signal.zkgroup.profiles.ProfileKey; +import org.whispersystems.signalservice.api.kbs.MasterKey; import org.whispersystems.util.Base64; public class KeyUtils { @@ -30,6 +31,10 @@ public class KeyUtils { return getSecretBytes(32); } + public static MasterKey createMasterKey() { + return MasterKey.createNew(RandomUtils.getSecureRandom()); + } + private static String getSecret(int size) { byte[] secret = getSecretBytes(size); return Base64.encodeBytes(secret);