0.5.6 cosmetics and versions upgrade, JVM target to 11 for better android compatibility

This commit is contained in:
Sergey Chernov 2024-08-30 11:08:41 +02:00
parent 14a63a05c2
commit b975df9a13
3 changed files with 11 additions and 5 deletions

View File

@ -19,7 +19,7 @@ repositories {
maven("https://gitea.sergeych.net/api/packages/SergeychWorks/maven")
}
dependencies {
import("net.sergeych:crypto2:0.5.5")
import("net.sergeych:crypto2:0.5.6")
}
```

View File

@ -1,3 +1,5 @@
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
plugins {
kotlin("multiplatform") version "2.0.20"
id("org.jetbrains.kotlin.plugin.serialization") version "2.0.20"
@ -6,7 +8,7 @@ plugins {
}
group = "net.sergeych"
version = "0.5.6-SNAPSHOT"
version = "0.5.6"
repositories {
mavenCentral()
@ -16,7 +18,11 @@ repositories {
}
kotlin {
jvm()
jvm {
compilerOptions {
jvmTarget = JvmTarget.JVM_11
}
}
js {
browser()
nodejs()

View File

@ -91,9 +91,9 @@ object PBKD {
/**
* Binary id is a binary hash-capable key, we use it. byte array can't be a hash key in kotlin: its value
* does not depend on the byte content.
* does not depend on the byte content. It is unsafe to use it outside the generator!
*/
fun key(kdf: KDF, password: String): BinaryId =
private fun key(kdf: KDF, password: String): BinaryId =
BinaryId.createFromBytes(
0,
BipackEncoder.encode(kdf) + blake2b3l(password.encodeToUByteArray()).asByteArray()