diff options
author | Valere <valeref@matrix.org> | 2019-04-04 09:00:08 +0200 |
---|---|---|
committer | Valere <valeref@matrix.org> | 2019-04-10 12:24:00 +0200 |
commit | 16a28f297c8d8f782131575c02854904b424eb82 (patch) | |
tree | cf041fe114b908245717939609f7016236f8d6ff /android/olm-sdk/src/androidTest/java/org/matrix/olm | |
parent | c9369a4383714c8656fc0ee72965e46476a56691 (diff) |
Added macLongKdf support
Diffstat (limited to 'android/olm-sdk/src/androidTest/java/org/matrix/olm')
-rw-r--r-- | android/olm-sdk/src/androidTest/java/org/matrix/olm/OlmSasTest.java | 11 |
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(); |