mirror of
https://github.com/AsamK/signal-cli
synced 2025-08-29 18:40:39 +00:00
Update libsignal-service-java
- Use new ProfileKey class instead of byte array - Add capabilities (for future support of uuid and groups v2)
This commit is contained in:
parent
31434ac5ec
commit
0dc6b1327e
5 changed files with 57 additions and 23 deletions
|
@ -1,6 +1,8 @@
|
|||
package org.asamk.signal.manager;
|
||||
|
||||
import org.asamk.signal.util.RandomUtils;
|
||||
import org.signal.zkgroup.InvalidInputException;
|
||||
import org.signal.zkgroup.profiles.ProfileKey;
|
||||
import org.whispersystems.util.Base64;
|
||||
|
||||
class KeyUtils {
|
||||
|
@ -12,8 +14,12 @@ class KeyUtils {
|
|||
return getSecret(52);
|
||||
}
|
||||
|
||||
static byte[] createProfileKey() {
|
||||
return getSecretBytes(32);
|
||||
static ProfileKey createProfileKey() {
|
||||
try {
|
||||
return new ProfileKey(getSecretBytes(32));
|
||||
} catch (InvalidInputException e) {
|
||||
throw new AssertionError("Profile key is guaranteed to be 32 bytes here");
|
||||
}
|
||||
}
|
||||
|
||||
static String createPassword() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue