aboutsummaryrefslogtreecommitdiff
path: root/android/olm-sdk/src/main/java/org
diff options
context:
space:
mode:
authorValere <valeref@matrix.org>2019-04-04 09:00:08 +0200
committerValere <valeref@matrix.org>2019-04-10 12:24:00 +0200
commit16a28f297c8d8f782131575c02854904b424eb82 (patch)
treecf041fe114b908245717939609f7016236f8d6ff /android/olm-sdk/src/main/java/org
parentc9369a4383714c8656fc0ee72965e46476a56691 (diff)
Added macLongKdf support
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()}.