8 int main(int ac, char **av){
15 if (ac == 1 || (ac == 2 && !strcmp(av[1], "-"))) {
16 struct sha256_state md;
17 unsigned char buf[4096];
19 unsigned char tmp[32];
24 bytes = fread(buf, 1, sizeof buf, stdin);
25 sha256_process(&md, buf, bytes);
26 } while (bytes && !feof(stdin));
30 sha256_done(&md, tmp);
32 sprintf(hash+j*2, "%02x", (unsigned)tmp[j]);
40 fprintf(stderr, "usage: path\n");
43 rv = zpm_hash(av[1], hash, 0);