Skip to content

Repository files navigation

KotNexLib

KotNexLib Logo

Kotlin Version JDK Version CI Status

Overview

KotNexLib is a professional collection of Kotlin extensions and utilities designed to simplify JVM development. From high-performance cryptography to advanced terminal UI components, it provides the building blocks for modern Kotlin applications.

Important

This library targets Java 11 or higher. For Android-specific extensions, see Kotlin-Extensions-Android.

Note

Building this repository requires a JDK the Gradle 8.10 wrapper can actually run on — JDK 21 is known-good. A newer default JDK (e.g. JDK 25) can crash the Gradle daemon on ./gradlew build/test; if that happens, point Gradle at a supported JDK, e.g. JAVA_HOME=/path/to/jdk-21 ./gradlew build. This only affects building/testing the library itself, not the Java 11+ runtime compatibility of the published artifact.

Warning

Migration to 4.0.0:

  • The project is moving to a new Maven repository: https://maven.kickner.bayern/releases.
  • Version 4.0.0 introduces breaking changes in the crypto module.
  • Note: String.hash has been moved to the kotnexlib.crypto package and may require updated imports.

Documentation

Detailed documentation for each module can be found below:

  • AES Helper: Secure GCM/CBC encryption, password-based key derivation.
  • Argon2: Modern password hashing (Argon2id).
  • Blowfish: Legacy support for Blowfish encryption.
  • HMAC: Request signing and constant-time signature verification (SHA256/512/1).
  • ChaCha20-Poly1305: Authenticated encryption, a fast alternative to AES-GCM on platforms without AES-NI.
  • TOTP: Dependency-free time-based one-time passwords (RFC 6238), compatible with standard authenticator apps.
  • Strings: Hashing, Base64, mask/cover, validation, and manipulation.
  • ByteArrays: Compression and encoding.
  • Collections: Advanced Iterable, Map, and Set operations.
  • Misc: Helper for Boolean, Numbers, and Generic types.
  • Structured working directories, JSON configuration management, and automated logging with rotation.
  • FileWatcher: Reactive directory watching as a Coroutine Flow (requires kotlinx-coroutines-core).
  • ANSI colors, styles, progress bars, spinners, and structured tables for professional CLI tools.
  • Respects the NO_COLOR standard.
  • Prompts: Interactive stdin prompts (text input, yes/no confirmation, numbered selection).
  • Math: Vector operations and similarity checks.
  • IBAN: International bank account validation.
  • Args: Command-line argument parsing.
  • Common: ResultOf patterns, permutations, and time measurement.
  • Cache: Thread-safe in-memory caching with optional TTL, plus a global type-based LocalCache.
  • Date & Time: Idiomatic java.time extensions (LocalDate, Instant).
  • SshStorage: Upload, download, list, and delete files on a remote host via ssh/ scp, with optional client-side AES encryption.
  • Extensions for ObjectBox, Ktor, and QR Code generation.
  • KPubClient: Client for the KPub service to send emails and SMS.
  • Design rationale behind the java.time extensions, the ObjectBox key-derivation cache, HMAC/ChaCha20-Poly1305, NO_COLOR/Prompts, and FileWatcher features above (all implemented) — plus a discussion-stage roadmap for a future multi-module (Kotlin Multiplatform) architecture.

Installation

Gradle (Kotlin DSL)

repositories {
    maven {
        name = "nexus421MavenReleases"
        url = uri("https://maven.kickner.bayern/releases")
    }
}

dependencies {
  implementation("bayern.kickner:KotNexLib:4.4.1")
}

Developed with ❤️ for the Kotlin Community.

About

A curated collection of Kotlin extensions and utilities to simplify daily development.

Topics

Resources

Stars

2 stars

Watchers

2 watching

Forks

Releases

Packages

Contributors

Languages