Skip to content

Commit

Permalink
added ArgonContext and ArgonFlag, removed Argon2Impl, changed the int…
Browse files Browse the repository at this point in the history
…erface into record.

Changed some method, argon variant and version will be tied to the object that has been built with.
Moved and added some method in Argon2 into static
  • Loading branch information
Zylquinal committed Feb 5, 2023
1 parent bfe5316 commit 53c5bb8
Show file tree
Hide file tree
Showing 39 changed files with 513 additions and 135 deletions.
Empty file modified .github/workflows/gradle.yml
100644 → 100755
Empty file.
Empty file modified .gitignore
100644 → 100755
Empty file.
Empty file modified LICENSE
100644 → 100755
Empty file.
13 changes: 12 additions & 1 deletion README.md
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ An [argon2](https://github.com/P-H-C/phc-winner-argon2) binding using Java Forei

```java

import com.zylquinal.argon2.Argon2;
import com.zylquinal.argon2.*;

public class Example {

Expand All @@ -18,6 +18,17 @@ public class Example {

byte[] rawHash = argon2.hashRaw("password".getBytes(), "randomsalt".getBytes());
String encodedHash = argon2.hashEncoded("password".getBytes(), "randomsalt".getBytes());

rawHash = ArgonContext.builder()
.password("password".getBytes())
.salt("randomsalt")
.memoryCost(65536)
.iterations(2)
.parallelism(1)
.hashLength(32)
.flag(ArgonFlag.CLEAR_ALL)
.version(ArgonVersion.VERSION_13)
.hash(ArgonVariant.ARGON_2ID);
}

}
Expand Down
3 changes: 2 additions & 1 deletion build.gradle
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,14 @@ plugins {
}

group 'com.zylquinal.argon2'
version '1.0-SNAPSHOT'
version '1.1-SNAPSHOT'

repositories {
mavenCentral()
}

dependencies {
implementation 'org.jetbrains:annotations:23.0.0'
compileOnly 'org.projectlombok:lombok:1.18.24'
annotationProcessor 'org.projectlombok:lombok:1.18.24'
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.8.1'
Expand Down
Empty file modified gradle/wrapper/gradle-wrapper.jar
100644 → 100755
Empty file.
Empty file modified gradle/wrapper/gradle-wrapper.properties
100644 → 100755
Empty file.
Empty file modified gradlew.bat
100644 → 100755
Empty file.
Empty file modified jitpack.yml
100644 → 100755
Empty file.
Empty file modified settings.gradle
100644 → 100755
Empty file.
Loading

0 comments on commit 53c5bb8

Please sign in to comment.