From 45d78fede4dbb51afcc9cf0827534b8d286848e2 Mon Sep 17 00:00:00 2001 From: Infendro Date: Sat, 13 Dec 2025 20:09:48 +0000 Subject: [PATCH] Add Home --- Home.md | 47 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 Home.md diff --git a/Home.md b/Home.md new file mode 100644 index 0000000..9791947 --- /dev/null +++ b/Home.md @@ -0,0 +1,47 @@ +# kdf-kt + +`kdf-kt` is a Kotlin Multiplatform library that provides common key derivation functions. + +Supported functions: +- PBKDF2 + +## Targets + +| Target | Status | +|------------------|---------------| +| JVM | Supported | +| JavaScript | Supported | +| Native (Linux) | Supported | +| Native (Windows) | Not Supported | + +## Installation + +Add the following to your `build.gradle.kts`. + +```kotlin +repositories { + maven("https://git.infendro.com/api/packages/Infendro/maven") +} + +dependencies { + implementation("com.infendro:kdf:1.1.0") +} +``` + +## Usage + +```kotlin +import com.infendro.hash.`SHA-256` +import com.infendro.kdf.PBKDF2 + +fun main() { + // create a PBKDF2 instance using HMAC SHA256 + // this example uses 32 bytes of length and 100_000 iterations + val kdf = PBKDF2(32, 100_000, `SHA-256`) + + // securely hash value with some salt + val value = "password".encodeToByteArray().asUByteArray() + val salt = "salt".encodeToByteArray().asUByteArray() + val hash = kdf.hash(value, salt) +} +``` \ No newline at end of file