Generates an SHA-256 hash of the file.
file
a File.
optional Cancellable object, null to ignore.
Checksum of the file. If file read fails, returns null. Free with g_free.