Changeset 5112 for trunk/libtransmission/utils.c
- Timestamp:
- Feb 25, 2008, 8:21:22 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/libtransmission/utils.c
r5065 r5112 884 884 return ratio; 885 885 } 886 887 void 888 tr_sha1_to_hex( char * out, const uint8_t * sha1 ) 889 { 890 static const char hex[] = "0123456789abcdef"; 891 int i; 892 for (i = 0; i < 20; i++) { 893 unsigned int val = *sha1++; 894 *out++ = hex[val >> 4]; 895 *out++ = hex[val & 0xf]; 896 } 897 *out = '\0'; 898 }
Note: See TracChangeset
for help on using the changeset viewer.