X-Git-Url: https://git.nmode.ca/signal-cli/blobdiff_plain/a6562b3b7baf7ba5621d00318e9fc52fb0b3e739..9e6a3534275d5bac8454792e05280f13fa5ef13c:/src/main/java/org/asamk/signal/manager/KeyUtils.java diff --git a/src/main/java/org/asamk/signal/manager/KeyUtils.java b/src/main/java/org/asamk/signal/manager/KeyUtils.java index 364f1eab..6ac093db 100644 --- a/src/main/java/org/asamk/signal/manager/KeyUtils.java +++ b/src/main/java/org/asamk/signal/manager/KeyUtils.java @@ -5,7 +5,7 @@ import org.signal.zkgroup.InvalidInputException; import org.signal.zkgroup.profiles.ProfileKey; import org.whispersystems.util.Base64; -class KeyUtils { +public class KeyUtils { private KeyUtils() { } @@ -26,12 +26,8 @@ class KeyUtils { return getSecret(18); } - static byte[] createGroupId() { - return getSecretBytes(16); - } - - static byte[] createUnrestrictedUnidentifiedAccess() { - return getSecretBytes(16); + static byte[] createStickerUploadKey() { + return getSecretBytes(32); } private static String getSecret(int size) { @@ -39,7 +35,7 @@ class KeyUtils { return Base64.encodeBytes(secret); } - private static byte[] getSecretBytes(int size) { + public static byte[] getSecretBytes(int size) { byte[] secret = new byte[size]; RandomUtils.getSecureRandom().nextBytes(secret); return secret;