Infendro 3603583d94
All checks were successful
/ test (push) Successful in 4m30s
/ publish (push) Has been skipped
improve ci
2026-01-13 18:14:19 +01:00
2026-01-13 18:14:19 +01:00
2025-12-13 01:16:24 +01:00
2026-01-13 18:14:19 +01:00
2025-07-12 19:42:23 +02:00
2026-01-13 18:14:19 +01:00
2025-10-03 13:21:19 +02:00
2025-10-03 13:21:19 +02:00
2025-07-12 19:42:23 +02:00
2025-12-14 14:34:00 +01:00
2025-12-13 01:16:24 +01:00

mac-kt

mac-kt is a Kotlin Multiplatform library that provides common Message Authentication Code algorithms.

Supported algorithms:

  • HMAC

Targets

Target Status
JVM Supported
JavaScript Supported
Native (Linux) Supported
Native (Windows) Not Supported

Installation

Add the following to your build.gradle.kts.

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

dependencies {
    implementation("com.infendro:mac:1.2.0")
}

Usage

import com.infendro.hash.sha1.SHA1
import com.infendro.mac.HMAC

fun main() {
    // create an HMAC instance using SHA1
    val hmac = HMAC(SHA1)

    // generate MAC
    val key = "secret"
        .encodeToByteArray().asUByteArray()
    val value = "Hello World!"
        .encodeToByteArray().asUByteArray()
    val mac = hmac.hash(key, value)
}
Description
No description provided
Readme 181 KiB
Languages
Kotlin 100%