Sha256 hash/check for sftp backend

Hi,
I see that it is only possible to specify sha1 or md5 commands for the sftp backend. Is there any limitation on the protocol for this? Could be possible to add a sha256 (or generic) command option?

The question came to me because my remote host, heztner storage box, provides also a sha256 command and restic backup creates files with the sha256 encoded in the file name, so I could easy create a sha256 SUM file from the file names and ask rclone to verify them remotely, without the need to download them.

Thanks in advance!

It would be perfectly possible to add sha256 support. There needs to be a command at the remote end that rclone can run to make the hashes and if sha256sum or similar is available then there would be no problem.

This would need to be added to the sftp backend though - maybe you'd like to have a go at that?