Class MessageBackupKey
-
- All Implemented Interfaces:
-
org.signal.libsignal.internal.NativeHandleGuard.Owner
public class MessageBackupKey extends NativeHandleGuard.SimpleOwner
Key used to encrypt and decrypt a message backup bundle.
-
-
Constructor Summary
Constructors Constructor Description MessageBackupKey(String accountEntropy, ServiceId.Aci aci)Derives a MessageBackupKey from the given account entropy pool. MessageBackupKey(String accountEntropy, ServiceId.Aci aci, BackupForwardSecrecyToken token)Derives a MessageBackupKey from the given account entropy pool. MessageBackupKey(BackupKey backupKey, Array<byte> backupId)Derives a MessageBackupKey from a backup key and ID. MessageBackupKey(BackupKey backupKey, Array<byte> backupId, BackupForwardSecrecyToken token)Derives a MessageBackupKey from a backup key and ID.
-
Method Summary
Modifier and Type Method Description static MessageBackupKeyfromParts(Array<byte> hmacKey, Array<byte> aesKey)Constructs a MessageBackupKey from the individual keys that make it up. Array<byte>getHmacKey()An HMAC key used to sign a backup file. Array<byte>getAesKey()An AES-256-CBC key used to encrypt a backup file. -
Methods inherited from class org.signal.libsignal.internal.NativeHandleGuard.SimpleOwner
unsafeNativeHandleWithoutGuard -
Methods inherited from class org.signal.libsignal.internal.NativeHandleGuard.Owner
guard, guardedMap, guardedMapChecked, guardedRun, guardedRunChecked -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Constructor Detail
-
MessageBackupKey
MessageBackupKey(String accountEntropy, ServiceId.Aci aci)
Derives a MessageBackupKey from the given account entropy pool.
-
MessageBackupKey
MessageBackupKey(String accountEntropy, ServiceId.Aci aci, BackupForwardSecrecyToken token)
Derives a MessageBackupKey from the given account entropy pool.
-
MessageBackupKey
MessageBackupKey(BackupKey backupKey, Array<byte> backupId)
Derives a MessageBackupKey from a backup key and ID.
-
MessageBackupKey
MessageBackupKey(BackupKey backupKey, Array<byte> backupId, BackupForwardSecrecyToken token)
Derives a MessageBackupKey from a backup key and ID.
-
-
Method Detail
-
fromParts
static MessageBackupKey fromParts(Array<byte> hmacKey, Array<byte> aesKey)
Constructs a MessageBackupKey from the individual keys that make it up.
Will throw an unchecked exception if the keys are the wrong length; you're expected to only use this with keys previously derived by this class (or its equivalent in another language).
-
getHmacKey
Array<byte> getHmacKey()
An HMAC key used to sign a backup file.
-
-
-
-