Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
phxql committed Dec 12, 2020
2 parents 31b2760 + c377a04 commit 88da9ee
Show file tree
Hide file tree
Showing 64 changed files with 1,249 additions and 200 deletions.
92 changes: 92 additions & 0 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
# This workflow will build a Java project with Gradle
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle

name: Build & test

on:
push:
branches: [ master, develop ]
pull_request:
branches: [ master, develop ]


jobs:
buildon-linux:
strategy:
matrix:
os: [ ubuntu-latest ]
# New gradle doesn't run on <= 8
# Java >= 12 doesn't support source/target level 6 anymore
java: [ 8, 9, 10, 11 ]
architecture: [ x86, x64 ]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- name: Set up JDK ${{ matrix.java }}
uses: actions/setup-java@v1
with:
java-version: ${{ matrix.java }}
architecture: ${{ matrix.architecture }}
- name: Cache Gradle packages
uses: actions/cache@v2
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
restore-keys: ${{ runner.os }}-gradle
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Build with Gradle
run: ./gradlew clean build
build-on-macos:
strategy:
matrix:
os: [ macos-latest ]
# New gradle doesn't run on <= 8
# Java >= 12 doesn't support source/target level 6 anymore
java: [ 8, 9, 10, 11 ]
# MacOS has no support for x86 ("Error: No valid download found for version 11.x and package jdk.")
architecture: [ x64 ]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- name: Set up JDK ${{ matrix.java }}
uses: actions/setup-java@v1
with:
java-version: ${{ matrix.java }}
architecture: ${{ matrix.architecture }}
- name: Cache Gradle packages
uses: actions/cache@v2
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
restore-keys: ${{ runner.os }}-gradle
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Build with Gradle
run: ./gradlew clean build
build-on-windows:
strategy:
matrix:
os: [ windows-latest ]
# New gradle doesn't run on <= 8
# Java >= 12 doesn't support source/target level 6 anymore
java: [ 8, 9, 10, 11 ]
architecture: [ x86, x64 ]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- name: Set up JDK ${{ matrix.java }}
uses: actions/setup-java@v1
with:
java-version: ${{ matrix.java }}
architecture: ${{ matrix.architecture }}
- name: Cache Gradle packages
uses: actions/cache@v2
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
restore-keys: ${{ runner.os }}-gradle
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Build with Gradle
run: ./gradlew clean build
71 changes: 71 additions & 0 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
# For most projects, this workflow file will not need changing; you simply need
# to commit it to your repository.
#
# You may wish to alter this file to override the set of languages analyzed,
# or to provide custom queries or build logic.
name: "CodeQL"

on:
push:
branches: [ master, develop ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ master, develop ]
schedule:
- cron: '0 1 * * 4'

jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
# Override automatic language detection by changing the below list
# Supported options are ['csharp', 'cpp', 'go', 'java', 'javascript', 'python']
language: [ 'java' ]
# Learn more...
# https://docs.github.com/en/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#overriding-automatic-language-detection

steps:
- name: Checkout repository
uses: actions/checkout@v2
with:
# We must fetch at least the immediate parents so that if this is
# a pull request then we can checkout the head.
fetch-depth: 2

# If this run was triggered by a pull request event, then checkout
# the head of the pull request instead of the merge commit.
- run: git checkout HEAD^2
if: ${{ github.event_name == 'pull_request' }}

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# queries: ./path/to/local/query, your-org/your-repo/queries@main

# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v1

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl

# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
# and modify them (or add more) to build your code if your project
# uses a compiled language

#- run: |
# make bootstrap
# make release

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
34 changes: 0 additions & 34 deletions .github/workflows/gradle.yml

This file was deleted.

1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
.idea/
*.iml
classes/
out/

# Gradle
build/
Expand Down
23 changes: 21 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,31 @@
# Change Log
All notable changes to this project will be documented in this file.
This project adheres to [Semantic Versioning](http://semver.org/).

All notable changes to this project will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org/).

## Unreleased

No changes yet.

## [2.8] - 2020-12-12

### Added

- Added method `hashAdvanced` to `Argon2Advanced` which lets the caller specify the argon2 version
- Added methods `generateSalt` to `Argon2Advanced` which generates salt with either the default or the given length
- Added OSGi entries to the JAR manifest

### Changed

- Improved the [compatibility list](compatibility-tests/README.md)
- Updated JNA to 5.6.0

## [2.7] - 2020-04-15

### Added
- Added method `needsRehash` to check if a hash needs to be upgraded
- Updated JNA to 5.5.0

### Changed
- Recompiled Argon2 for Linux x86 / x64 / ARM / ARM 64 on Ubuntu 16.04

## [2.6] - 2019-10-06
Expand Down
13 changes: 8 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ With pre-compiled Argon2 libraries:
<dependency>
<groupId>de.mkammerer</groupId>
<artifactId>argon2-jvm</artifactId>
<version>2.7</version>
<version>2.8</version>
</dependency>
```

Expand All @@ -19,21 +19,21 @@ Without pre-compiled Argon2 libraries:
<dependency>
<groupId>de.mkammerer</groupId>
<artifactId>argon2-jvm-nolibs</artifactId>
<version>2.7</version>
<version>2.8</version>
</dependency>
```

## Gradle
With pre-compiled Argon2 libraries:

```groovy
compile 'de.mkammerer:argon2-jvm:2.7'
implementation 'de.mkammerer:argon2-jvm:2.8'
```

Without pre-compiled Argon2 libraries:

```groovy
compile 'de.mkammerer:argon2-jvm-nolibs:2.7'
implementation 'de.mkammerer:argon2-jvm-nolibs:2.8'
```

## Usage
Expand All @@ -46,13 +46,16 @@ This binding needs the Argon2 C library. Libraries for the following operation s
* Windows x86-64
* Darwin (OSX)

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

If you'd prefer to install/compile argon2 on your own you can use argon2-jvm-nolibs instead of argon2-jvm.

If you need help to build argon2, have a look at [this documentation](docs/compile-argon2.md).

```java
import de.mkammerer.argon2.Argon2;
import de.mkammerer.argon2.Argon2Factory;

// Create instance
Argon2 argon2 = Argon2Factory.create();

Expand Down

0 comments on commit 88da9ee

Please sign in to comment.