Skip to content

Files

Latest commit

 

History

History
25 lines (18 loc) · 553 Bytes

README.md

File metadata and controls

25 lines (18 loc) · 553 Bytes

Module blake2

Mac implementations for BLAKE2 Keyed Hashing

Implementations for:

  • BLAKE2b
  • BLAKE2s

See HERE for basic usage example of Mac.

// Using CryptoRand from KotlinCrypto/random repo as an example
import org.kotlincrypto.random.CryptoRand
// ...

fun main() {
    val key64 = CryptoRand.Default.nextBytes(ByteArray(64))
    val key32 = CryptoRand.Default.nextBytes(ByteArray(32))

    BLAKE2b(key64, 512)
    BLAKE2s(key32, 256)
}