Digest

interface Digest

Stateful digest class specified to calculate digest.

Functions

build

abstract suspend fun build(): ByteArray

Calculate digest bytes.

plusAssign

abstract operator fun plusAssign(bytes: ByteArray): Unit

Add bytes to digest value.

reset

abstract fun reset(): Unit

Reset Digest state.

Extension Functions

build

suspend fun Digest.build(bytes: ByteArray): ByteArray

Calculate digest from current state and specified bytes.

suspend fun Digest.build(
    string: String,
    charset: Charset = Charsets.UTF_8
): ByteArray

Calculate digest from current state and specified string.