Skip to content

Commit 32d440b

Browse files
committed
Move tests to argon2 project and restructure Readmes
1 parent b0e6eb1 commit 32d440b

File tree

11 files changed

+47
-18
lines changed

11 files changed

+47
-18
lines changed

README.md

Lines changed: 30 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -3,41 +3,47 @@
33
This is a JVM binding for [Argon2](https://github.com/P-H-C/phc-winner-argon2).
44

55
## Maven
6-
With pre-compiled Argon2 libraries:
6+
7+
Without pre-compiled Argon2 libraries (recommended, install argon2 via your package manager):
78

89
```xml
10+
911
<dependency>
1012
<groupId>de.mkammerer</groupId>
11-
<artifactId>argon2-jvm</artifactId>
13+
<artifactId>argon2-jvm-nolibs</artifactId>
1214
<version>2.10-SNAPSHOT</version>
1315
</dependency>
1416
```
1517

16-
Without pre-compiled Argon2 libraries:
18+
With pre-compiled Argon2 libraries:
1719

1820
```xml
21+
1922
<dependency>
2023
<groupId>de.mkammerer</groupId>
21-
<artifactId>argon2-jvm-nolibs</artifactId>
24+
<artifactId>argon2-jvm</artifactId>
2225
<version>2.10-SNAPSHOT</version>
2326
</dependency>
2427
```
2528

2629
## Gradle
27-
With pre-compiled Argon2 libraries:
30+
31+
Without pre-compiled Argon2 libraries (recommended, install argon2 via your package manager):
2832

2933
```groovy
30-
implementation 'de.mkammerer:argon2-jvm:2.10-SNAPSHOT'
34+
implementation 'de.mkammerer:argon2-jvm-nolibs:2.10-SNAPSHOT'
3135
```
3236

33-
Without pre-compiled Argon2 libraries:
37+
With pre-compiled Argon2 libraries:
3438

3539
```groovy
36-
implementation 'de.mkammerer:argon2-jvm-nolibs:2.10-SNAPSHOT'
40+
implementation 'de.mkammerer:argon2-jvm:2.10-SNAPSHOT'
3741
```
3842

3943
## Usage
40-
This binding needs the Argon2 C library. Libraries for the following operation systems are included in argon2-jvm library:
44+
45+
This binding needs a compiled Argon2 library. It is recommended to install argon2 via your package manager. If you can't do that, use `argon2-jvm` with the included argon2 binary libraries or compile argon2 yourself. The following operating systems and architectures are supported in `argon2-jvm`:
46+
4147
* Linux x86
4248
* Linux x86-64
4349
* Linux ARM
@@ -48,10 +54,6 @@ This binding needs the Argon2 C library. Libraries for the following operation s
4854

4955
See [tested distributions](compatibility-tests/README.md) for details on which distributions this has been tested.
5056

51-
If you'd prefer to install/compile argon2 on your own you can use argon2-jvm-nolibs instead of argon2-jvm.
52-
53-
If you need help to build argon2, have a look at [this documentation](docs/compile-argon2.md).
54-
5557
```java
5658
import de.mkammerer.argon2.Argon2;
5759
import de.mkammerer.argon2.Argon2Factory;
@@ -85,29 +87,41 @@ The recommended parameters for the `hash` call above can be found in the [whitep
8587
You can use the method `Argon2Helper.findIterations` to find the optimal number of iterations on your system:
8688

8789
```java
88-
Argon2 argon2 = Argon2Factory.create();
90+
Argon2 argon2=Argon2Factory.create();
8991
// 1000 = The hash call must take at most 1000 ms
9092
// 65536 = Memory cost
9193
// 1 = parallelism
92-
int iterations = Argon2Helper.findIterations(argon2, 1000, 65536, 1);
94+
int iterations=Argon2Helper.findIterations(argon2,1000,65536,1);
9395

94-
System.out.println("Optimal number of iterations: " + iterations);
96+
System.out.println("Optimal number of iterations: "+iterations);
9597
```
9698

99+
## Compile Argon2 yourself
100+
101+
If you prefer to install/compile argon2 on your own you should `argon2-jvm-nolibs` instead of `argon2-jvm` and compile argon2 yourself. It's not that hard :)
102+
103+
If you need help to build argon2, have a look at [this documentation](docs/compile-argon2.md).
104+
97105
## Technical details
106+
98107
This library uses [JNA](https://github.com/java-native-access/jna) to communicate with the Argon2 C library.
99108

100109
## Building it yourself
110+
101111
Run `./gradlew clean build` to build and test the software.
102112

103113
## License
114+
104115
Licensed under [LGPL v3](https://www.gnu.org/licenses/lgpl.html).
105116

106117
## Maintainer
118+
107119
Moritz Kammerer ([@phXql](https://github.com/phxql))
108120

109121
## Contributing
122+
110123
See [contributing guidelines](CONTRIBUTING.md).
111124

112125
## Contributors
126+
113127
See [contributors page](https://github.com/phxql/argon2-jvm/graphs/contributors).

argon2-jvm-nolibs/README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Argon2-JVM (no libs)
2+
3+
This project contains the Java code for communicating with the binart Argon2 library.

argon2-jvm-nolibs/build.gradle

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
11
plugins {
22
id 'org.sonarqube' version '3.0'
3-
id 'jacoco'
43
}
54

65
dependencies {
76
implementation 'net.java.dev.jna:jna:5.6.0'
8-
testImplementation group: 'junit', name: 'junit', version: '4.13.1'
97
}
108

119
sonarqube {

argon2-jvm/README.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Argon2-JVM
2+
3+
This project only contains the binary Argon2 libraries. It contains the tests for the argon2-jvm API, too.
4+
5+
It depends on the `argon2-jvm-nolibs` project.
6+
7+
The whole dependency tree looks like this:
8+
9+
```
10+
\--- de.mkammerer:argon2-jvm
11+
\--- de.mkammerer:argon2-jvm-nolibs
12+
\--- net.java.dev.jna:jna
13+
```

argon2-jvm/build.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
dependencies {
22
api project(':argon2-jvm-nolibs')
3+
testImplementation group: 'junit', name: 'junit', version: '4.13.1'
34
}

0 commit comments

Comments
 (0)