@@ -22,10 +22,13 @@ #import "OFMD5Hash.h" #import "OFSecureData.h" #import "OFHashAlreadyCalculatedException.h" #import "OFOutOfRangeException.h" + +#define DIGEST_SIZE 16 +#define BLOCK_SIZE 64 @interface OFMD5Hash () - (void)of_resetState; @end @@ -122,16 +125,16 @@ @implementation OFMD5Hash @synthesize calculated = _calculated; + (size_t)digestSize { - return 16; + return DIGEST_SIZE; } + (size_t)blockSize { - return 64; + return BLOCK_SIZE; } + (instancetype)cryptoHash { return [[[self alloc] init] autorelease]; @@ -164,10 +167,20 @@ { [_iVarsData release]; [super dealloc]; } + +- (size_t)digestSize +{ + return DIGEST_SIZE; +} + +- (size_t)blockSize +{ + return BLOCK_SIZE; +} - (id)copy { OFMD5Hash *copy = [[OFMD5Hash alloc] of_init];