aboutsummaryrefslogtreecommitdiff
path: root/android/olm-sdk/src/main/java/org
diff options
context:
space:
mode:
Diffstat (limited to 'android/olm-sdk/src/main/java/org')
-rw-r--r--android/olm-sdk/src/main/java/org/matrix/olm/OlmSAS.java10
1 files changed, 10 insertions, 0 deletions
diff --git a/android/olm-sdk/src/main/java/org/matrix/olm/OlmSAS.java b/android/olm-sdk/src/main/java/org/matrix/olm/OlmSAS.java
index 2869aa4..70cfb8c 100644
--- a/android/olm-sdk/src/main/java/org/matrix/olm/OlmSAS.java
+++ b/android/olm-sdk/src/main/java/org/matrix/olm/OlmSAS.java
@@ -103,6 +103,14 @@ public class OlmSAS {
}
}
+ public byte[] calculateMacLongKdf(String message, String info) throws OlmException {
+ try {
+ return calculateMacLongKdfJni(message.getBytes("UTF-8"), info.getBytes("UTF-8"));
+ } catch (UnsupportedEncodingException e) {
+ throw new OlmException(OlmException.EXCEPTION_CODE_SAS_ERROR, e.getMessage());
+ }
+ }
+
/**
* Create an OLM session in native side.<br>
* Do not forget to call {@link #releaseSASJni()} when JAVA side is done.
@@ -127,6 +135,8 @@ public class OlmSAS {
private native byte[] calculateMacJni(byte[] message, byte[] info);
+ private native byte[] calculateMacLongKdfJni(byte[] message, byte[] info);
+
/**
* Release native session and invalid its JAVA reference counter part.<br>
* Public API for {@link #releaseSASJni()}.