mirror of
https://github.com/oxen-io/session-android.git
synced 2024-12-23 00:17:34 +00:00
7b589c4300
// FREEBIE
25 lines
698 B
Java
25 lines
698 B
Java
package org.thoughtcrime.securesms.crypto;
|
|
|
|
import org.junit.Before;
|
|
import org.junit.Test;
|
|
import org.powermock.core.classloader.annotations.PowerMockIgnore;
|
|
import org.thoughtcrime.securesms.BaseUnitTest;
|
|
import org.whispersystems.libsignal.InvalidMessageException;
|
|
|
|
@PowerMockIgnore("javax.crypto.*")
|
|
public class MasterCipherTest extends BaseUnitTest {
|
|
private MasterCipher masterCipher;
|
|
|
|
@Before
|
|
@Override
|
|
public void setUp() throws Exception {
|
|
super.setUp();
|
|
masterCipher = new MasterCipher(masterSecret);
|
|
}
|
|
|
|
@Test(expected = InvalidMessageException.class)
|
|
public void testEncryptBytesWithZeroBody() throws Exception {
|
|
masterCipher.decryptBytes(new byte[]{});
|
|
}
|
|
}
|