aboutsummaryrefslogtreecommitdiff
path: root/android/olm-sdk/src/androidTest/java/org/matrix
diff options
context:
space:
mode:
Diffstat (limited to 'android/olm-sdk/src/androidTest/java/org/matrix')
-rw-r--r--android/olm-sdk/src/androidTest/java/org/matrix/olm/OlmSasTest.java11
1 files changed, 11 insertions, 0 deletions
diff --git a/android/olm-sdk/src/androidTest/java/org/matrix/olm/OlmSasTest.java b/android/olm-sdk/src/androidTest/java/org/matrix/olm/OlmSasTest.java
index a757050..39127cd 100644
--- a/android/olm-sdk/src/androidTest/java/org/matrix/olm/OlmSasTest.java
+++ b/android/olm-sdk/src/androidTest/java/org/matrix/olm/OlmSasTest.java
@@ -83,6 +83,17 @@ public class OlmSasTest {
Log.e(OlmSasTest.class.getSimpleName(), "#### Bob Mac is " + new String(bobMac, "UTF-8"));
+ byte[] aliceLongKdfMac = aliceSas.calculateMacLongKdf("Hello world!", "SAS");
+ byte[] bobLongKdfMac = bobSas.calculateMacLongKdf("Hello world!", "SAS");
+
+ assertTrue(aliceLongKdfMac.length > 0 && bobLongKdfMac.length > 0);
+ assertEquals(aliceLongKdfMac.length, bobLongKdfMac.length);
+ assertArrayEquals(aliceLongKdfMac, bobLongKdfMac);
+
+ Log.e(OlmSasTest.class.getSimpleName(), "#### Alice lkdf Mac is " + new String(aliceLongKdfMac, "UTF-8"));
+ Log.e(OlmSasTest.class.getSimpleName(), "#### Bob lkdf Mac is " + new String(bobLongKdfMac, "UTF-8"));
+
+
} catch (Exception e) {
assertTrue("OlmSas init failed " + e.getMessage(), false);
e.printStackTrace();