-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of https://github.com/lucee/extension-argon2
# Conflicts: # source/java/libs/org.lucee.argon2-2.11.0.jar # source/java/libs/org.lucee.argon2-jvm-nolibs-2.11.0.jar
- Loading branch information
Showing
7 changed files
with
214 additions
and
13 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 |
---|---|---|
@@ -0,0 +1,81 @@ | ||
# This workflow will build a Java project with Ant | ||
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-ant | ||
|
||
name: Build with custom Java and Lucee | ||
|
||
on: # Allows you to run this workflow manually from the Actions tab | ||
workflow_dispatch: | ||
inputs: | ||
lucee_version_query: | ||
required: true | ||
type: string | ||
default: '0/all/light' | ||
java_version: | ||
required: true | ||
type: string | ||
default: "11" | ||
# Triggers the workflow on push or pull request events but only for the master branch | ||
workflow_call: | ||
inputs: | ||
lucee_version_query: | ||
required: true | ||
type: string | ||
default: '0/all/light' | ||
java_version: | ||
required: true | ||
type: string | ||
default: "11" | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
env: | ||
luceeVersion: ${{ inputs.lucee_version_query }} | ||
luceeVersionQuery: ${{ inputs.lucee_version_query }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Cache Maven packages | ||
uses: actions/cache@v4 | ||
with: | ||
path: ~/.m2 | ||
key: lucee-script-runner-maven-cache | ||
enableCrossOsArchive: true | ||
- name: Cache Lucee files | ||
uses: actions/cache@v4 | ||
with: | ||
path: ~/work/_actions/lucee/script-runner/main/lucee-download-cache | ||
key: lucee-downloads | ||
enableCrossOsArchive: true | ||
- name: Set up JDK 11 | ||
uses: actions/setup-java@v4 | ||
with: | ||
java-version: '11' | ||
distribution: 'adopt' | ||
- name: Build with Ant | ||
run: ant -noinput -verbose -buildfile build.xml | ||
- name: Upload Artifact | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: argon2-lex | ||
path: dist/*.lex | ||
- name: Checkout Lucee | ||
uses: actions/checkout@v4 | ||
with: | ||
repository: lucee/lucee | ||
path: lucee | ||
- name: Set up JDK ${{ inputs.java_version }} | ||
uses: actions/setup-java@v4 | ||
with: | ||
java-version: ${{ inputs.java_version }} | ||
distribution: 'adopt' | ||
- name: Run Lucee Test Suite (testFilter="argon2") | ||
uses: lucee/script-runner@main | ||
with: | ||
webroot: ${{ github.workspace }}/lucee/test | ||
execute: /bootstrap-tests.cfm | ||
luceeVersion: ${{ env.luceeVersion }} | ||
luceeVersionQuery: ${{ env.luceeVersionQuery }} | ||
extensionDir: ${{ github.workspace }}/dist | ||
env: | ||
testLabels: argon2 | ||
testAdditional: ${{ github.workspace }}/tests |
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 |
---|---|---|
@@ -0,0 +1,56 @@ | ||
# This workflow will build a Java project with Ant | ||
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-ant | ||
|
||
name: Java CI | ||
|
||
on: [push, pull_request,workflow_dispatch] | ||
|
||
jobs: | ||
build: | ||
|
||
runs-on: ubuntu-latest | ||
env: | ||
luceeVersion: light-6.0.0.451-BETA | ||
luceeVersionQuery: 0/all/light | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Set up JDK 11 | ||
uses: actions/setup-java@v4 | ||
with: | ||
java-version: '11' | ||
distribution: 'adopt' | ||
- name: Cache Maven packages | ||
uses: actions/cache@v4 | ||
with: | ||
path: ~/.m2 | ||
key: lucee-script-runner-maven-cache | ||
enableCrossOsArchive: true | ||
- name: Cache Lucee files | ||
uses: actions/cache@v4 | ||
with: | ||
path: ~/work/_actions/lucee/script-runner/main/lucee-download-cache | ||
key: lucee-downloads | ||
enableCrossOsArchive: true | ||
- name: Build with Ant | ||
run: ant -noinput -verbose -buildfile build.xml | ||
- name: Upload Artifact | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: argon2-lex | ||
path: dist/*.lex | ||
- name: Checkout Lucee | ||
uses: actions/checkout@v4 | ||
with: | ||
repository: lucee/lucee | ||
path: lucee | ||
- name: Run Lucee Test Suite (testFilter="argon2") | ||
uses: lucee/script-runner@main | ||
with: | ||
webroot: ${{ github.workspace }}/lucee/test | ||
execute: /bootstrap-tests.cfm | ||
luceeVersion: ${{ env.luceeVersion }} | ||
luceeVersionQuery: ${{ env.luceeVersionQuery }} | ||
extensionDir: ${{ github.workspace }}/dist | ||
env: | ||
testLabels: argon2 | ||
testAdditional: ${{ github.workspace }}/tests |
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,6 +1,4 @@ | ||
Manifest-Version: 1.0 | ||
Export-Package: org.lucee.extension.argon2 | ||
Bundle-ManifestVersion: 2 | ||
Require-Bundle: org.lucee.argon2;bundle-version=2.11.0, | ||
org.lucee.argon2-jvm-nolibs;bundle-version=2.11.0, | ||
com.sun.jna;bundle-version=5.8.0 | ||
Require-Bundle: org.lucee.argon2;bundle-version=2.7.0 |
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,11 +1,33 @@ | ||
component extends="org.lucee.cfml.test.LuceeTestCase" labels="s3" { | ||
component extends="org.lucee.cfml.test.LuceeTestCase" labels="argon2" { | ||
function run( testResults , testBox ) { | ||
describe( title="Test suite for Argon2CheckHash()", body=function() { | ||
it(title="check Argon2CheckHash", body = function( currentSpec ) { | ||
it(title="check Argon2CheckHash (default)", body = function( currentSpec ) { | ||
var hashedValue = GenerateArgon2Hash("CFDocs.org"); | ||
expect(Argon2CheckHash( "CFDocs.org", hashedValue)).ToBeTrue(); | ||
}); | ||
}); | ||
|
||
it(title="check Argon2CheckHash (argon2i)", body = function( currentSpec ) { | ||
var hashedValue = GenerateArgon2Hash("CFDocs.org", "argon2i"); | ||
expect(Argon2CheckHash( "CFDocs.org", hashedValue)).ToBeTrue(); | ||
}); | ||
|
||
it(title="check Argon2CheckHash (argon2d)", body = function( currentSpec ) { | ||
var hashedValue = GenerateArgon2Hash("CFDocs.org", "argon2d"); | ||
expect(Argon2CheckHash( "CFDocs.org", hashedValue)).ToBeTrue(); | ||
}); | ||
|
||
it(title="check Argon2CheckHash (argon2id)", body = function( currentSpec ) { | ||
var hashedValue = GenerateArgon2Hash("CFDocs.org", "argon2id"); | ||
expect(Argon2CheckHash( "CFDocs.org", hashedValue)).ToBeTrue(); | ||
}); | ||
|
||
it(title="check Argon2CheckHash", body = function( currentSpec ) { | ||
var hashedValue = GenerateArgon2Hash("lucee","ARGON2i"); | ||
var hashedValue = "$argon2i$v=19$m=8,t=1,p=1$ccCBeNYDdvv5FYAAjNYaoA$+sfZnhMn1IA1VIslUFqd6dk2+LX1But4mhC8Wx4Q+Dg"; | ||
expect(Argon2CheckHash( "lucee", hashedValue)).ToBeTrue(); | ||
}); | ||
}); | ||
} | ||
|
||
} | ||
} | ||
|
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 |
---|---|---|
@@ -0,0 +1,32 @@ | ||
component extends="org.lucee.cfml.test.LuceeTestCase" labels="argon2" { | ||
|
||
function run( testResults , testBox ) { | ||
describe( title="Test suite for Argon2CheckHash()", body=function() { | ||
it(title="check Argon2CheckHash (default)", body = function( currentSpec ) { | ||
var hashedValue = GenerateArgon2Hash("CFDocs.org"); | ||
expect( hashedValue ).toInclude( "$argon2i$" ); | ||
expect(Argon2CheckHash( "CFDocs.org", hashedValue)).ToBeTrue(); | ||
}); | ||
|
||
it(title="check Argon2CheckHash (argon2i)", body = function( currentSpec ) { | ||
var hashedValue = GenerateArgon2Hash("CFDocs.org", "argon2i"); | ||
expect( hashedValue ).toInclude( "$argon2i$" ); | ||
expect(Argon2CheckHash( "CFDocs.org", hashedValue)).ToBeTrue(); | ||
}); | ||
|
||
it(title="check Argon2CheckHash (argon2d)", body = function( currentSpec ) { | ||
var hashedValue = GenerateArgon2Hash("CFDocs.org", "argon2d"); | ||
expect( hashedValue ).toInclude( "$argon2d$" ); | ||
expect(Argon2CheckHash( "CFDocs.org", hashedValue)).ToBeTrue(); | ||
}); | ||
|
||
it(title="check Argon2CheckHash (argon2id)", body = function( currentSpec ) { | ||
var hashedValue = GenerateArgon2Hash("CFDocs.org", "argon2id"); | ||
expect( hashedValue ).toInclude( "$argon2id$" ); | ||
expect(Argon2CheckHash( "CFDocs.org", hashedValue)).ToBeTrue(); | ||
}); | ||
}); | ||
} | ||
|
||
} | ||
|