@@ -21,12 +21,12 @@ #import "OFSecureData.h" #import "OFHashAlreadyCalculatedException.h" #import "OFOutOfRangeException.h" -#define DIGEST_SIZE 16 -#define BLOCK_SIZE 64 +static const size_t digestSize = 16; +static const size_t blockSize = 64; OF_DIRECT_MEMBERS @interface OFMD5Hash () - (void)of_resetState; @end @@ -126,16 +126,16 @@ @synthesize calculated = _calculated; @synthesize allowsSwappableMemory = _allowsSwappableMemory; + (size_t)digestSize { - return DIGEST_SIZE; + return digestSize; } + (size_t)blockSize { - return BLOCK_SIZE; + return blockSize; } + (instancetype)hashWithAllowsSwappableMemory: (bool)allowsSwappableMemory { return [[[self alloc] initWithAllowsSwappableMemory: @@ -179,16 +179,16 @@ [super dealloc]; } - (size_t)digestSize { - return DIGEST_SIZE; + return digestSize; } - (size_t)blockSize { - return BLOCK_SIZE; + return blockSize; } - (id)copy { OFMD5Hash *copy = [[OFMD5Hash alloc] of_init];