forked from xerial/sqlite-jdbc
-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
21 changed files
with
198 additions
and
185 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
version=3.48.0 | ||
artifactVersion=3.48.0.0-SNAPSHOT | ||
sqliteMCVersion=2.0.2 | ||
artifactVersion=3.48.0.0 | ||
sqliteMCVersion=2.0.2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,15 @@ | ||
package org.sqlite.mc; | ||
|
||
import org.junit.jupiter.api.Test; | ||
|
||
import static org.assertj.core.api.AssertionsForClassTypes.assertThat; | ||
import static org.junit.jupiter.api.Assertions.*; | ||
|
||
import org.junit.jupiter.api.Test; | ||
|
||
class AegisAlgorithmTest { | ||
|
||
@Test | ||
void getValue() { | ||
assertThat(AegisAlgorithm.AEGIS_256X4.getStringValue()).isEqualTo("aegis-256x4"); | ||
assertThat(AegisAlgorithm.AEGIS_256X4.getInValue()).isEqualTo(6); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,14 @@ | ||
package org.sqlite.mc; | ||
|
||
import org.junit.jupiter.api.Test; | ||
|
||
import static org.assertj.core.api.AssertionsForClassTypes.assertThat; | ||
import static org.junit.jupiter.api.Assertions.*; | ||
|
||
import org.junit.jupiter.api.Test; | ||
|
||
class CipherAlgorithmTest { | ||
|
||
@Test | ||
void getValue() { | ||
assertThat(CipherAlgorithm.AEGIS.getValue()).isEqualTo("aegis"); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,14 @@ | ||
package org.sqlite.mc; | ||
|
||
import org.junit.jupiter.api.Test; | ||
|
||
import static org.assertj.core.api.AssertionsForClassTypes.assertThat; | ||
import static org.junit.jupiter.api.Assertions.*; | ||
|
||
import org.junit.jupiter.api.Test; | ||
|
||
class HmacAlgorithmTest { | ||
|
||
@Test | ||
void getValue() { | ||
assertThat(HmacAlgorithm.SHA256.getValue()).isEqualTo(1); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,14 @@ | ||
package org.sqlite.mc; | ||
|
||
import org.junit.jupiter.api.Test; | ||
|
||
import static org.assertj.core.api.AssertionsForClassTypes.assertThat; | ||
import static org.junit.jupiter.api.Assertions.*; | ||
|
||
import org.junit.jupiter.api.Test; | ||
|
||
class HmacPgnoTest { | ||
|
||
@Test | ||
void getValue() { | ||
assertThat(HmacPgno.LITTLE_ENDIAN.getValue()).isEqualTo(1); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,14 @@ | ||
package org.sqlite.mc; | ||
|
||
import org.junit.jupiter.api.Test; | ||
|
||
import static org.assertj.core.api.AssertionsForClassTypes.assertThat; | ||
import static org.junit.jupiter.api.Assertions.*; | ||
|
||
import org.junit.jupiter.api.Test; | ||
|
||
class KdfAlgorithmTest { | ||
|
||
@Test | ||
void getValue() { | ||
assertThat(KdfAlgorithm.SHA256.getValue()).isEqualTo(1); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 9 additions & 10 deletions
19
src/test/java/org/sqlite/mc/SQLiteMCAscon128ConfigTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,31 @@ | ||
package org.sqlite.mc; | ||
|
||
import org.junit.jupiter.api.Test; | ||
import org.sqlite.SQLiteConfig; | ||
|
||
import java.util.Properties; | ||
|
||
import static org.assertj.core.api.AssertionsForClassTypes.assertThat; | ||
import static org.assertj.core.api.AssertionsForClassTypes.assertThatThrownBy; | ||
import static org.junit.jupiter.api.Assertions.*; | ||
|
||
import java.util.Properties; | ||
import org.junit.jupiter.api.Test; | ||
import org.sqlite.SQLiteConfig; | ||
|
||
class SQLiteMCAscon128ConfigTest { | ||
|
||
@Test | ||
void setKdfIter() { | ||
SQLiteMCAscon128Config config = new SQLiteMCAscon128Config(); | ||
assertThatThrownBy( () -> config.setKdfIter(0)).isInstanceOf(IllegalArgumentException.class); | ||
assertThatThrownBy(() -> config.setKdfIter(0)).isInstanceOf(IllegalArgumentException.class); | ||
|
||
config.setKdfIter(2); | ||
|
||
Properties props = config.build().toProperties(); | ||
assertThat(props.get(SQLiteConfig.Pragma.KDF_ITER.pragmaName)).isEqualTo( "2"); | ||
assertThat(props.get(SQLiteConfig.Pragma.KDF_ITER.pragmaName)).isEqualTo("2"); | ||
} | ||
|
||
@Test | ||
void getDefault() { | ||
SQLiteMCAscon128Config config = SQLiteMCAscon128Config.getDefault(); | ||
Properties props = config.build().toProperties(); | ||
assertThat(props.get(SQLiteConfig.Pragma.KDF_ITER.pragmaName)).isEqualTo( "64007"); | ||
assertThat(props.get(SQLiteConfig.Pragma.CIPHER.pragmaName)).isEqualTo( "ascon128"); | ||
assertThat(props.get(SQLiteConfig.Pragma.KDF_ITER.pragmaName)).isEqualTo("64007"); | ||
assertThat(props.get(SQLiteConfig.Pragma.CIPHER.pragmaName)).isEqualTo("ascon128"); | ||
} | ||
} | ||
} |
Oops, something went wrong.