Sha512

class Sha512

Incremental SHA-512 (FIPS 180-4), pure Kotlin on 64-bit Long arithmetic. libtorrent pulls SHA-512 in for ed25519 (DHT mutable items, BEP 44); KiteTorrent needs it for the same reason. Validated against the FIPS test vectors.

Works on every KMP target, because Kotlin's Long is 64-bit everywhere (emulated on JS, but semantically identical).

Constructors

Link copied to clipboard
constructor()

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard
Link copied to clipboard
fun update(data: ByteArray, offset: Int = 0, length: Int = data.size - offset): Sha512