sha256Hash static method
Computes the SHA-256 hash of a file's contents.
Implementation
static Future<String> sha256Hash(File file) async {
final stream = file.openRead();
final hash = await stream.transform(sha256).first;
return hash.toString();
}