From 16a28f297c8d8f782131575c02854904b424eb82 Mon Sep 17 00:00:00 2001 From: Valere Date: Thu, 4 Apr 2019 09:00:08 +0200 Subject: Added macLongKdf support --- android/olm-sdk/src/main/java/org/matrix/olm/OlmSAS.java | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'android/olm-sdk/src/main/java/org') 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.
* 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.
* Public API for {@link #releaseSASJni()}. -- cgit v1.2.3