Index: src/OFMD5Hash.h ================================================================== --- src/OFMD5Hash.h +++ src/OFMD5Hash.h @@ -24,7 +24,7 @@ } /** * \return A new autoreleased MD5 Hash */ -+ md5Hash; ++ MD5Hash; @end Index: src/OFMD5Hash.m ================================================================== --- src/OFMD5Hash.m +++ src/OFMD5Hash.m @@ -110,11 +110,11 @@ buf[2] += c; buf[3] += d; } @implementation OFMD5Hash -+ md5Hash ++ MD5Hash { return [[[self alloc] init] autorelease]; } - init Index: src/OFSHA1Hash.h ================================================================== --- src/OFSHA1Hash.h +++ src/OFSHA1Hash.h @@ -25,7 +25,7 @@ } /** * \return A new autoreleased SHA1 Hash */ -+ sha1Hash; ++ SHA1Hash; @end Index: src/OFSHA1Hash.m ================================================================== --- src/OFSHA1Hash.m +++ src/OFSHA1Hash.m @@ -124,11 +124,11 @@ memcpy(&buffer[j], &buf[i], size - i); } @implementation OFSHA1Hash -+ sha1Hash ++ SHA1Hash { return [[[self alloc] init] autorelease]; } - init Index: src/OFString+Hashing.h ================================================================== --- src/OFString+Hashing.h +++ src/OFString+Hashing.h @@ -19,12 +19,12 @@ */ @interface OFString (Hashing) /** * \return The MD5 hash of the string as an autoreleased OFString */ -- (OFString*)md5Hash; +- (OFString*)MD5Hash; /** * \return The SHA1 hash of the string as an autoreleased OFString */ -- (OFString*)sha1Hash; +- (OFString*)SHA1Hash; @end Index: src/OFString+Hashing.m ================================================================== --- src/OFString+Hashing.m +++ src/OFString+Hashing.m @@ -19,14 +19,14 @@ #import "OFAutoreleasePool.h" int _OFString_Hashing_reference; @implementation OFString (Hashing) -- (OFString*)md5Hash +- (OFString*)MD5Hash { OFAutoreleasePool *pool = [[OFAutoreleasePool alloc] init]; - OFMD5Hash *hash = [OFMD5Hash md5Hash]; + OFMD5Hash *hash = [OFMD5Hash MD5Hash]; uint8_t *digest; char ret_c[32]; size_t i; [hash updateWithBuffer: string @@ -47,14 +47,14 @@ return [OFString stringWithCString: ret_c length: 32]; } -- (OFString*)sha1Hash +- (OFString*)SHA1Hash { OFAutoreleasePool *pool = [[OFAutoreleasePool alloc] init]; - OFMD5Hash *hash = [OFSHA1Hash sha1Hash]; + OFMD5Hash *hash = [OFSHA1Hash SHA1Hash]; uint8_t *digest; char ret_c[40]; size_t i; [hash updateWithBuffer: string Index: tests/OFMD5HashTests.m ================================================================== --- tests/OFMD5HashTests.m +++ tests/OFMD5HashTests.m @@ -32,11 +32,11 @@ OFAutoreleasePool *pool = [[OFAutoreleasePool alloc] init]; OFMD5Hash *md5; OFFile *f = [OFFile fileWithPath: @"testfile.bin" mode: @"rb"]; - TEST(@"+[md5Hash]", (md5 = [OFMD5Hash md5Hash])) + TEST(@"+[md5Hash]", (md5 = [OFMD5Hash MD5Hash])) while (![f isAtEndOfStream]) { char buf[64]; size_t len = [f readNBytes: 64 intoBuffer: buf]; Index: tests/OFSHA1HashTests.m ================================================================== --- tests/OFSHA1HashTests.m +++ tests/OFSHA1HashTests.m @@ -33,11 +33,11 @@ OFAutoreleasePool *pool = [[OFAutoreleasePool alloc] init]; OFSHA1Hash *sha1; OFFile *f = [OFFile fileWithPath: @"testfile.bin" mode: @"rb"]; - TEST(@"+[sha1Hash]", (sha1 = [OFSHA1Hash sha1Hash])) + TEST(@"+[sha1Hash]", (sha1 = [OFSHA1Hash SHA1Hash])) while (![f isAtEndOfStream]) { char buf[64]; size_t len = [f readNBytes: 64 intoBuffer: buf]; Index: tests/OFStringTests.m ================================================================== --- tests/OFStringTests.m +++ tests/OFStringTests.m @@ -261,14 +261,14 @@ hexadecimalValueAsInteger]) TEST(@"-[unicodeString]", (ua = [@"fööbär" unicodeString]) && !memcmp(ua, ucstr, 7 * sizeof(of_unichar_t)) && R(free(ua))) - TEST(@"-[md5Hash]", [[@"asdfoobar" md5Hash] + TEST(@"-[MD5Hash]", [[@"asdfoobar" MD5Hash] isEqual: @"184dce2ec49b5422c7cfd8728864db4c"]) - TEST(@"-[sha1Hash]", [[@"asdfoobar" sha1Hash] + TEST(@"-[SHA1Hash]", [[@"asdfoobar" SHA1Hash] isEqual: @"f5f81ac0a8b5cbfdc4585ec1ad32e7b3a12b9b49"]) TEST(@"-[stringByURLEncoding]", [[@"foo\"ba'_~$" stringByURLEncoding] isEqual: @"foo%22ba%27_~%24"])