Sha256

class Sha256

Incremental SHA-256 (FIPS 180-4). Pure-Kotlin port of libtorrent's bundled SHA-256 (src/sha256.cpp), used for BitTorrent v2 piece hashing and merkle trees.

Verified against the FIPS test vectors in the test suite.

Constructors

Link copied to clipboard
constructor()

Types

Link copied to clipboard
object Companion

Functions

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