sha256

fun File.sha256(bufferSize: Int = 8*1024*1024): String

Computes the SHA-256 hash of the file and returns the result as a hexadecimal string.

Return

The SHA-256 hash of the file represented as a hexadecimal string prefixed with "0x".

Parameters

bufferSize

The size of the buffer to be used while reading the file, in bytes. Default is 8 MB (8 * 1024 * 1024).