2025-12-13 01:30:59 +01:00
2025-12-13 01:30:59 +01:00
2025-12-13 01:23:24 +01:00
2025-12-12 16:11:08 +01:00
2025-07-19 18:50:48 +02:00
2025-12-13 01:23:24 +01:00
2025-08-17 15:15:27 +02:00
2025-08-17 15:15:27 +02:00
2025-07-19 18:50:48 +02:00
2025-10-04 11:58:28 +02:00
2025-12-13 01:23:24 +01:00

Kotlin KDF

This library provides various Key Derivation Function implementations in Kotlin Multiplatform.

Features

  • PBKDF2
  • Multiplatform support
    • JVM
    • JavaScript
    • Native (Linux)

Installation

Add the following to your build.gradle.kts.

repositories {
    maven("https://git.infendro.com/api/packages/Infendro/maven")
}

dependencies {
    implementation("com.infendro:kdf:1.0.3")
}

Usage

import com.infendro.hash.SHA256
import com.infendro.kdf.PBKDF2

fun main() {
    // create a PBKDF2 instance using HMAC SHA256
    val kdf = PBKDF2(SHA256)

    // securely hash value with some salt
    //   this example uses 100_000 iterations and 32 bytes of length
    val value = "password".encodeToByteArray()
    val salt = "...".encodeToByteArray()
    val hash = kdf.hash(value, salt, 100_000, 32)
}
Description
No description provided
Readme 183 KiB
Languages
Kotlin 100%