diff options
author | pedroGitt <pedro.contreiras@amdocs.com> | 2016-11-23 01:20:47 +0100 |
---|---|---|
committer | pedroGitt <pedro.contreiras@amdocs.com> | 2016-11-23 01:20:47 +0100 |
commit | e63be9777453d6bc18fe70c68839bb91406ffcd0 (patch) | |
tree | c2f850e833a695c09f7cc8d0c19c7d75e4131aff /java/android/OlmLibSdk/olm-sdk/src/main/java | |
parent | 7a6897642baa8fc5d9d9f14c80fc4f201cfe2173 (diff) |
Update with master branch => OLM V2.0.0
Diffstat (limited to 'java/android/OlmLibSdk/olm-sdk/src/main/java')
-rw-r--r-- | java/android/OlmLibSdk/olm-sdk/src/main/java/org/matrix/olm/OlmInboundGroupSession.java | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/java/android/OlmLibSdk/olm-sdk/src/main/java/org/matrix/olm/OlmInboundGroupSession.java b/java/android/OlmLibSdk/olm-sdk/src/main/java/org/matrix/olm/OlmInboundGroupSession.java index fa4ca1d..664b22e 100644 --- a/java/android/OlmLibSdk/olm-sdk/src/main/java/org/matrix/olm/OlmInboundGroupSession.java +++ b/java/android/OlmLibSdk/olm-sdk/src/main/java/org/matrix/olm/OlmInboundGroupSession.java @@ -45,6 +45,14 @@ public class OlmInboundGroupSession extends CommonSerializeUtils implements Seri private transient long mNativeId; /** + * Wrapper class to be used in {@link #decryptMessage(String, DecryptIndex)} + */ + static public class DecryptIndex { + /** decrypt index **/ + public long mIndex; + } + + /** * Constructor.<br> * Create and save a new native session instance ID and start a new inbound group session. * The session key parameter is retrieved from an outbound group session @@ -136,13 +144,14 @@ public class OlmInboundGroupSession extends CommonSerializeUtils implements Seri /** * Decrypt the message passed in parameter. * @param aEncryptedMsg the message to be decrypted + * @param aDecryptIndex_out decrypted message index * @return the decrypted message if operation succeed, null otherwise. */ - public String decryptMessage(String aEncryptedMsg) { - String decryptedMessage = decryptMessageJni(aEncryptedMsg, OlmManager.ENABLE_STRING_UTF8_SPECIFIC_CONVERSION); + public String decryptMessage(String aEncryptedMsg, DecryptIndex aDecryptIndex_out) { + String decryptedMessage = decryptMessageJni(aEncryptedMsg, aDecryptIndex_out, OlmManager.ENABLE_STRING_UTF8_SPECIFIC_CONVERSION); return decryptedMessage; } - private native String decryptMessageJni(String aEncryptedMsg, boolean aIsUtf8ConversionRequired); + private native String decryptMessageJni(String aEncryptedMsg, DecryptIndex aDecryptIndex_out, boolean aIsUtf8ConversionRequired); /** |