diff --git a/README.md b/README.md new file mode 100644 index 0000000..eff9099 --- /dev/null +++ b/README.md @@ -0,0 +1,43 @@ +# Kotlin Hash + +This library provides various [Cryptographic Hash Function](https://en.wikipedia.org/wiki/Cryptographic_hash_function) +implementations in Kotlin Multiplatform. + +## Features + +* [MD5](https://en.wikipedia.org/wiki/MD5) +* [SHA1](https://en.wikipedia.org/wiki/SHA-1) +* [SHA224](https://en.wikipedia.org/wiki/SHA-2) +* [SHA256](https://en.wikipedia.org/wiki/SHA-2) +* [SHA384](https://en.wikipedia.org/wiki/SHA-2) +* [SHA512](https://en.wikipedia.org/wiki/SHA-2) +* Multiplatform support + * JVM + * JavaScript + * Native (Linux) + +## Installation + +Add the following to your `build.gradle.kts`. + +```kotlin +repositories { + maven("https://git.infendro.com/api/packages/Infendro/maven") +} + +dependencies { + implementation("com.infendro:hash:1.2.2") +} +``` + +## Usage + +```kotlin +import com.infendro.hash.SHA256 + +fun main() { + // hash some value using SHA256 + val value = "...".encodeToByteArray() + val hash = SHA256.hash(value) +} +```