]> nmode's Git Repositories - signal-cli/blobdiff - src/main/java/org/asamk/signal/manager/KeyUtils.java
Refactor to use GroupId class to wrap the byte array
[signal-cli] / src / main / java / org / asamk / signal / manager / KeyUtils.java
index bd093e797d793f010c335b642c80ed45d936dce3..21f6037fe240fa8d960f66191f551e3d91b03736 100644 (file)
@@ -26,16 +26,8 @@ class KeyUtils {
         return getSecret(18);
     }
 
-    static byte[] createGroupId() {
-        return getSecretBytes(16);
-    }
-
-    static byte[] createUnrestrictedUnidentifiedAccess() {
-        return getSecretBytes(16);
-    }
-
     static byte[] createStickerUploadKey() {
-        return getSecretBytes(64);
+        return getSecretBytes(32);
     }
 
     private static String getSecret(int size) {
@@ -43,7 +35,7 @@ class KeyUtils {
         return Base64.encodeBytes(secret);
     }
 
-    private static byte[] getSecretBytes(int size) {
+    static byte[] getSecretBytes(int size) {
         byte[] secret = new byte[size];
         RandomUtils.getSecureRandom().nextBytes(secret);
         return secret;