15 p = va_arg(f->args, uchar*);
17 "%.2x%.2x%.2x%.2x%.2x%.2x",
18 p[0], p[1], p[2], p[3], p[4], p[5]);
22 fhash(int fd, uchar p1[], uchar p2[], uchar h[])
30 if(memcmp(p1, p2, HASHSZ) > 0){
31 ds = sha1(p2, HASHSZ, nil, ds);
32 sha1(p1, HASHSZ, nil, ds);
34 ds = sha1(p1, HASHSZ, nil, ds);
35 sha1(p2, HASHSZ, nil, ds);
37 while((n = read(fd, buf, BUFSZ)) > 0)
38 sha1(buf, n, nil, ds);
45 strhash(char *s, uchar *h)
54 if(*s >= '0' && *s <= '9')
56 else if(*s >= 'a' && *s <= 'f')
58 else if(*s >= 'A' && *s <= 'F')