Adding sample project

This commit is contained in:
Ugljesa Jovanovic authored and Ugljesa Jovanovic committed 2020-05-24 09:46:35 +02:00
1 parent 7ce350825e
commit aecad37e64
18 files changed
+494 -150

No files matched your search

+6 -6
View File
@@ -105,7 +105,7 @@ kotlin {
linuxX64("linux") {
binaries {
staticLib {
optimized = true
}
}
}
@@ -130,14 +130,14 @@ kotlin {
iosX64("ios") {
binaries {
framework {
optimized = true
}
}
}
iosArm64("ios64Arm") {
binaries {
framework {
optimized = true
}
}
}
@@ -145,14 +145,14 @@ kotlin {
iosArm32("ios32Arm") {
binaries {
framework {
optimized = true
}
}
}
macosX64() {
binaries {
framework {
optimized = true
}
}
}
@@ -162,7 +162,7 @@ kotlin {
mingwX64() {
binaries {
staticLib {
optimized = true
}
}
}
@@ -1,21 +0,0 @@
#
# Copyright 2019 Ugljesa Jovanovic
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.7-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
@@ -25,6 +25,9 @@ import com.ionspin.kotlin.crypto.util.xor
* or a UByteArray block
*/
interface ArgonBlockPointer {
companion object {
private val _emitLongArray : LongArray = longArrayOf(1L,2L)
}
val blockStartPosition: Int
fun pointerArithmetic(block : (Int, Int) -> Int) : ArgonBlockPointer
@@ -47,6 +50,8 @@ interface ArgonBlockPointer {
fun getAsUByteArray() : UByteArray
}
fun ArgonBlockPointer._emitLongArray() : LongArray = longArrayOf(0,1)
fun ArgonBlockPointer.getRowOfULongsForMixing(rowIndex: Int) : ULongArray {
// Each row has 16 unsigned longs (16 ulongs * 8 bytes = 128 bytes) -- Argon2 considers this as 2 word unsigned
// numbers, so strictly speaking argon representation is 8 * 8 matrix of 2 word unsigned numbers (registers
@@ -138,7 +138,7 @@ class ReadmeTest {
salt = "RandomSalt",
parallelism = 1,
tagLength = 64U,
requestedMemorySize = 4096U, //Travis build on mac fails with higher values
requestedMemorySize = 4096U,
numberOfIterations = 100,
key = "",
associatedData = "",