digestIntoProtected

protected expect open fun digestIntoProtected(dest: ByteArray, destOffset: Int, buf: ByteArray, bufPos: Int)(source)

Called to complete the computation, providing any input that may be buffered and awaiting processing.

Implementations should override this addition to the API for performance reasons. If overridden, super.digestIntoProtected should not be called.

NOTE: The buffer from bufPos to the end will always be zeroed out to clear any potentially stale input left over from a previous state.

NOTE: The public digestInto function always checks dest for capacity of digestLength, starting at destOffset, before calling this function.

Parameters

dest

The array to place resultant bytes

destOffset

The index to begin placing bytes into dest

buf

Unprocessed input

bufPos

The index at which the next input would be placed into buf

protected actual open fun digestIntoProtected(dest: ByteArray, destOffset: Int, buf: ByteArray, bufPos: Int)(source)

Called to complete the computation, providing any input that may be buffered and awaiting processing.

Implementations should override this addition to the API for performance reasons. If overridden, super.digestIntoProtected should not be called.

NOTE: The buffer from bufPos to the end will always be zeroed out to clear any potentially stale input left over from a previous state.

NOTE: The public digestInto function always checks dest for capacity of digestLength, starting at destOffset, before calling this function.

Parameters

dest

The array to place resultant bytes

destOffset

The index to begin placing bytes into dest

buf

Unprocessed input

bufPos

The index at which the next input would be placed into buf

protected actual open fun digestIntoProtected(dest: ByteArray, destOffset: Int, buf: ByteArray, bufPos: Int)(source)

Called to complete the computation, providing any input that may be buffered and awaiting processing.

Implementations should override this addition to the API for performance reasons. If overridden, super.digestIntoProtected should not be called.

NOTE: The buffer from bufPos to the end will always be zeroed out to clear any potentially stale input left over from a previous state.

NOTE: The public digestInto function always checks dest for capacity of digestLength, starting at destOffset, before calling this function.

Parameters

dest

The array to place resultant bytes

destOffset

The index to begin placing bytes into dest

buf

Unprocessed input

bufPos

The index at which the next input would be placed into buf