@@ -134,17 +134,17 @@ buf[3] = 0x10325476; return self; } -- updateWithBuffer: (const char*)buffer - ofSize: (size_t)size +- (void)updateWithBuffer: (const char*)buffer + ofSize: (size_t)size { uint32_t t; if (size == 0) - return self; + return; if (calculated) @throw [OFHashAlreadyCalculatedException newWithClass: isa]; /* Update bitcount */ @@ -163,11 +163,11 @@ t = 64 - t; if (size < t) { memcpy(p, buffer, size); - return self; + return; } memcpy(p, buffer, t); OF_BSWAP32_V_IF_BE((uint32_t*)in, 16); md5_transform(buf, (uint32_t*)in); @@ -186,12 +186,10 @@ size -= 64; } /* Handle any remaining bytes of data. */ memcpy(in, buffer, size); - - return self; } - (uint8_t*)digest { uint8_t *p; @@ -376,22 +374,20 @@ state[4] = 0xC3D2E1F0; return self; } -- updateWithBuffer: (const char*)buf - ofSize: (size_t)size +- (void)updateWithBuffer: (const char*)buf + ofSize: (size_t)size { if (size == 0) - return self; + return; if (calculated) @throw [OFHashAlreadyCalculatedException newWithClass: isa]; sha1_update(state, &count, buffer, buf, size); - - return self; } - (uint8_t*)digest { size_t i;