All Downloads are FREE. Search and download functionalities are using the official Maven repository.

linuxMain.io.github.andreypfau.curve25519.internal.sha512.kt Maven / Gradle / Ivy

package io.github.andreypfau.curve25519.internal

internal actual fun sha512(
    rawData: ByteArray,
    offset: Int,
    length: Int,
    output: ByteArray,
    outputOffset: Int,
    outputLength: Int
): ByteArray {
    // TODO: Use the native Linux API to calculate SHA512
    val sha512 = Sha512Pure()
    sha512.update(rawData.copyOfRange(offset, offset + length).toUByteArray())
    sha512.digest().toByteArray().copyInto(output, outputOffset, 0, outputLength)
    return output
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy