+static const char *
+program_of_csum (const char *csumtype)
+{
+ if (STRCASEEQ (csumtype, "crc"))
+ return "cksum";
+ else if (STRCASEEQ (csumtype, "md5"))
+ return "md5sum";
+ else if (STRCASEEQ (csumtype, "sha1"))
+ return "sha1sum";
+ else if (STRCASEEQ (csumtype, "sha224"))
+ return "sha224sum";
+ else if (STRCASEEQ (csumtype, "sha256"))
+ return "sha256sum";
+ else if (STRCASEEQ (csumtype, "sha384"))
+ return "sha384sum";
+ else if (STRCASEEQ (csumtype, "sha512"))
+ return "sha512sum";
+ else {
+ reply_with_error ("unknown checksum type, expecting crc|md5|sha1|sha224|sha256|sha384|sha512");
+ return NULL;
+ }
+}
+