@@ -28,11 +28,11 @@ - (OFString*)MD5Hash { OFAutoreleasePool *pool = [[OFAutoreleasePool alloc] init]; OFMD5Hash *hash = [OFMD5Hash MD5Hash]; uint8_t *digest; - char ret_c[OF_MD5_DIGEST_SIZE * 2]; + char cRet[OF_MD5_DIGEST_SIZE * 2]; size_t i; [hash updateWithBuffer: data ofSize: count * itemSize]; digest = [hash digest]; @@ -41,26 +41,26 @@ uint8_t high, low; high = digest[i] >> 4; low = digest[i] & 0x0F; - ret_c[i * 2] = (high > 9 ? high - 10 + 'a' : high + '0'); - ret_c[i * 2 + 1] = (low > 9 ? low - 10 + 'a' : low + '0'); + cRet[i * 2] = (high > 9 ? high - 10 + 'a' : high + '0'); + cRet[i * 2 + 1] = (low > 9 ? low - 10 + 'a' : low + '0'); } [pool release]; - return [OFString stringWithCString: ret_c + return [OFString stringWithCString: cRet length: 32]; } - (OFString*)SHA1Hash { OFAutoreleasePool *pool = [[OFAutoreleasePool alloc] init]; OFMD5Hash *hash = [OFSHA1Hash SHA1Hash]; uint8_t *digest; - char ret_c[OF_SHA1_DIGEST_SIZE * 2]; + char cRet[OF_SHA1_DIGEST_SIZE * 2]; size_t i; [hash updateWithBuffer: data ofSize: count * itemSize]; digest = [hash digest]; @@ -69,15 +69,15 @@ uint8_t high, low; high = digest[i] >> 4; low = digest[i] & 0x0F; - ret_c[i * 2] = (high > 9 ? high - 10 + 'a' : high + '0'); - ret_c[i * 2 + 1] = (low > 9 ? low - 10 + 'a' : low + '0'); + cRet[i * 2] = (high > 9 ? high - 10 + 'a' : high + '0'); + cRet[i * 2 + 1] = (low > 9 ? low - 10 + 'a' : low + '0'); } [pool release]; - return [OFString stringWithCString: ret_c + return [OFString stringWithCString: cRet length: 40]; } @end