public final class OmemoConfiguration
extends java.lang.Object
Constructor and Description |
---|
OmemoConfiguration() |
Modifier and Type | Method and Description |
---|---|
static boolean |
getAddOmemoHintBody()
Determine, whether an OMEMO message should carry a plaintext hint about OMEMO encryption.
|
static boolean |
getCompleteSessionWithEmptyMessage()
Determine, whether incoming preKeyMessages should automatically be answered by an empty message in order to
complete the session.
|
static boolean |
getDeleteStaleDevices() |
static int |
getDeleteStaleDevicesAfterHours() |
static boolean |
getIgnoreReadOnlyDevices()
Return true, if the client should stop encrypting messages to a read-only device.
|
static int |
getMaxNumberOfStoredSignedPreKeys()
Return the maximum number of signed preKeys that are cached until the oldest one gets deleted.
|
static int |
getMaxReadOnlyMessageCount()
Get the maximum amount of messages that the client is allowed to send to a read-only device without getting a
response.
|
static boolean |
getRenewOldSignedPreKeys()
Determine, whether signed preKeys are automatically rotated or not.
|
static int |
getRenewOldSignedPreKeysAfterHours()
Get the interval in hours, after which the published signed preKey should be renewed.
|
static boolean |
getRepairBrokenSessionsWithPreKeyMessages()
Determine, whether incoming messages, which have broken sessions should automatically be answered by an empty
preKeyMessage in order to establish a new session.
|
static void |
setAddOmemoHintBody(boolean addHint)
Decide, whether an OMEMO message should carry a plaintext hint about OMEMO encryption.
|
static void |
setCompleteSessionWithEmptyMessage(boolean complete)
Decide, whether incoming preKeyMessages should automatically be answered by an empty message in order to
complete the session.
|
static void |
setDeleteStaleDevices(boolean delete) |
static void |
setDeleteStaleDevicesAfterHours(int hours) |
static void |
setIgnoreReadOnlyDevices(boolean ignore)
Set to true, in order to ignore read-only devices.
|
static void |
setMaxNumberOfStoredSignedPreKeys(int number)
Set the maximum number of signed preKeys that are cached until the oldest one gets deleted.
|
static void |
setMaxReadOnlyMessageCount(int maxReadOnlyMessageCount)
Set the maximum amount of messages that the client is allowed to send to a read-only device without getting a
response.
|
static void |
setRenewOldSignedPreKeys(boolean renew)
Decide, whether signed preKeys are automatically rotated or not.
|
static void |
setRenewOldSignedPreKeysAfterHours(int hours)
Set the interval in hours, after which the published signed preKey should be renewed.
|
static void |
setRepairBrokenSessionsWithPrekeyMessages(boolean repair)
Decide, whether incoming messages, which have broken sessions should automatically be answered by an empty
preKeyMessage in order to establish a new session.
|
public static void setIgnoreReadOnlyDevices(boolean ignore)
ignore
- ignore read-only devicespublic static boolean getIgnoreReadOnlyDevices()
public static void setMaxReadOnlyMessageCount(int maxReadOnlyMessageCount)
getIgnoreReadOnlyDevices()
is true).
This threshold is used to prevent read-only devices from weakening forward secrecy.maxReadOnlyMessageCount
- maximum number of allowed messages to a read-only device.public static int getMaxReadOnlyMessageCount()
getIgnoreReadOnlyDevices()
is true).
This threshold is used to prevent read-only devices from weakening forward secrecy.public static void setDeleteStaleDevices(boolean delete)
public static boolean getDeleteStaleDevices()
public static void setDeleteStaleDevicesAfterHours(int hours)
public static int getDeleteStaleDevicesAfterHours()
public static void setRenewOldSignedPreKeys(boolean renew)
renew
- automatically rotate signed preKeys?public static boolean getRenewOldSignedPreKeys()
public static void setRenewOldSignedPreKeysAfterHours(int hours)
hours
- hours after which signed preKeys should be rotated.public static int getRenewOldSignedPreKeysAfterHours()
public static void setMaxNumberOfStoredSignedPreKeys(int number)
number
- number of cached signed preKeys.public static int getMaxNumberOfStoredSignedPreKeys()
public static void setAddOmemoHintBody(boolean addHint)
addHint
- shall we add a hint?public static boolean getAddOmemoHintBody()
public static boolean getRepairBrokenSessionsWithPreKeyMessages()
public static void setRepairBrokenSessionsWithPrekeyMessages(boolean repair)
repair
- repair sessions?public static boolean getCompleteSessionWithEmptyMessage()
public static void setCompleteSessionWithEmptyMessage(boolean complete)
complete
- complete the session or not