Index: src/OFSHA224Hash.m ================================================================== --- src/OFSHA224Hash.m +++ src/OFSHA224Hash.m @@ -22,19 +22,10 @@ + (size_t)digestSize { return 28; } -- init -{ - self = [super init]; - - [self OF_resetState]; - - return self; -} - - (void)OF_resetState { _state[0] = 0xC1059ED8; _state[1] = 0x367CD507; _state[2] = 0x3070DD17; Index: src/OFSHA224Or256Hash.m ================================================================== --- src/OFSHA224Or256Hash.m +++ src/OFSHA224Or256Hash.m @@ -14,11 +14,10 @@ * file. */ #include "config.h" -#include #include #import "OFSHA224Or256Hash.h" #import "OFHashAlreadyCalculatedException.h" @@ -126,22 +125,15 @@ return [[[self alloc] init] autorelease]; } - init { - if (object_getClass(self) == [OFSHA224Or256Hash class]) { - @try { - [self doesNotRecognizeSelector: _cmd]; - } @catch (id e) { - [self release]; - @throw e; - } - - abort(); - } - - return [super init]; + self = [super init]; + + [self OF_resetState]; + + return self; } - (void)updateWithBuffer: (const void*)buffer_ length: (size_t)length { Index: src/OFSHA256Hash.m ================================================================== --- src/OFSHA256Hash.m +++ src/OFSHA256Hash.m @@ -22,19 +22,10 @@ + (size_t)digestSize { return 32; } -- init -{ - self = [super init]; - - [self OF_resetState]; - - return self; -} - - (void)OF_resetState { _state[0] = 0x6A09E667; _state[1] = 0xBB67AE85; _state[2] = 0x3C6EF372; Index: src/OFSHA384Hash.m ================================================================== --- src/OFSHA384Hash.m +++ src/OFSHA384Hash.m @@ -22,19 +22,10 @@ + (size_t)digestSize { return 48; } -- init -{ - self = [super init]; - - [self OF_resetState]; - - return self; -} - - (void)OF_resetState { _state[0] = 0xCBBB9D5DC1059ED8; _state[1] = 0x629A292A367CD507; _state[2] = 0x9159015A3070DD17; Index: src/OFSHA384Or512Hash.m ================================================================== --- src/OFSHA384Or512Hash.m +++ src/OFSHA384Or512Hash.m @@ -14,11 +14,10 @@ * file. */ #include "config.h" -#include #include #import "OFSHA384Or512Hash.h" #import "OFHashAlreadyCalculatedException.h" @@ -137,22 +136,15 @@ return [[[self alloc] init] autorelease]; } - init { - if (object_getClass(self) == [OFSHA384Or512Hash class]) { - @try { - [self doesNotRecognizeSelector: _cmd]; - } @catch (id e) { - [self release]; - @throw e; - } - - abort(); - } - - return [super init]; + self = [super init]; + + [self OF_resetState]; + + return self; } - (void)updateWithBuffer: (const void*)buffer_ length: (size_t)length { Index: src/OFSHA512Hash.m ================================================================== --- src/OFSHA512Hash.m +++ src/OFSHA512Hash.m @@ -22,19 +22,10 @@ + (size_t)digestSize { return 64; } -- init -{ - self = [super init]; - - [self OF_resetState]; - - return self; -} - - (void)OF_resetState { _state[0] = 0x6A09E667F3BCC908; _state[1] = 0xBB67AE8584CAA73B; _state[2] = 0x3C6EF372FE94F82B;