FILE_CHECKSUM compute hash of file

read in chunks to avoid excessive RAM use

Contents

Inputs

Outputs

Ref: https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/security/MessageDigest.html#getInstance(java.lang.String)

function [hash, b] = file_checksum(file, hash_method, backend)
arguments
  file
  hash_method
  backend (1,:) string = ["java", "dotnet", "sys"]
end

o = stdlib.Backend(mfilename(), backend);
hash = o.func(file, hash_method);
b = o.backend;

end