24 lines
509 B
Java
24 lines
509 B
Java
package com.stktrk.app.utils;
|
|
|
|
import com.arcadedb.database.RID;
|
|
import org.junit.jupiter.api.Assertions;
|
|
import org.junit.jupiter.api.Test;
|
|
|
|
import java.security.InvalidKeyException;
|
|
|
|
import static org.junit.Assert.assertEquals;
|
|
|
|
class EncryptIdTest {
|
|
|
|
|
|
@Test
|
|
void encrypt() {
|
|
Assertions.assertEquals("nOua", EncryptId.encrypt(new RID(1,2L)));
|
|
|
|
}
|
|
|
|
@Test
|
|
void decrypt() throws InvalidKeyException {
|
|
Assertions.assertEquals(new RID(1,2L), EncryptId.decrypt("nOua"));
|
|
}
|
|
} |