Overview
Comment: | Make OFHash a protocol. |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA3-256: |
9b2d255a3d69282e63da1eb7afa22606 |
User & Date: | js on 2013-02-18 23:05:20 |
Other Links: | manifest | tags |
Context
2013-02-19
| ||
11:57 | OFCountedSet: More thorough range check. check-in: bf8a579f38 user: js tags: trunk | |
2013-02-18
| ||
23:05 | Make OFHash a protocol. check-in: 9b2d255a3d user: js tags: trunk | |
22:00 | Rename OFXMLParser's _cache to _buffer. check-in: 265a0928ca user: js tags: trunk | |
Changes
Modified ObjFW.xcodeproj/project.pbxproj from [58c2011970] to [c7bbe66b12].
︙ | |||
150 151 152 153 154 155 156 | 150 151 152 153 154 155 156 157 158 159 160 161 162 163 | - | 4B3D238F1337FC0D00DD29B8 /* OFConstantString.m in Sources */ = {isa = PBXBuildFile; fileRef = 4BE5F0D812DF4225005C7A0C /* OFConstantString.m */; }; 4B3D23901337FC0D00DD29B8 /* OFDataArray.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B6799611099E7C50041064A /* OFDataArray.m */; }; 4B3D23911337FC0D00DD29B8 /* OFDataArray+Hashing.m in Sources */ = {isa = PBXBuildFile; fileRef = 4BE17ADA12FD746D002CEB0B /* OFDataArray+Hashing.m */; }; 4B3D23921337FC0D00DD29B8 /* OFDate.m in Sources */ = {isa = PBXBuildFile; fileRef = 4BE5F0DA12DF4225005C7A0C /* OFDate.m */; }; 4B3D23931337FC0D00DD29B8 /* OFDictionary.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B6799631099E7C50041064A /* OFDictionary.m */; }; 4B3D23941337FC0D00DD29B8 /* OFEnumerator.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B0108CA10EB8C9300631877 /* OFEnumerator.m */; }; 4B3D23961337FC0D00DD29B8 /* OFFile.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B6799671099E7C50041064A /* OFFile.m */; }; |
︙ | |||
793 794 795 796 797 798 799 | 792 793 794 795 796 797 798 799 800 801 802 803 804 805 | - | 4BE5F0D912DF4225005C7A0C /* OFDate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OFDate.h; path = src/OFDate.h; sourceTree = SOURCE_ROOT; }; 4BE5F0DA12DF4225005C7A0C /* OFDate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = OFDate.m; path = src/OFDate.m; sourceTree = SOURCE_ROOT; }; 4BE5F0E412DF4259005C7A0C /* OFBlockTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = OFBlockTests.m; path = tests/OFBlockTests.m; sourceTree = SOURCE_ROOT; }; 4BE5F0E512DF4259005C7A0C /* OFDateTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = OFDateTests.m; path = tests/OFDateTests.m; sourceTree = SOURCE_ROOT; }; 4BF0749512DFAFCA00A4ADD1 /* OFURLTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = OFURLTests.m; path = tests/OFURLTests.m; sourceTree = SOURCE_ROOT; }; 4BF1BCBF11C9663F0025511F /* objfw-defs.h.in */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = "objfw-defs.h.in"; path = "src/objfw-defs.h.in"; sourceTree = "<group>"; }; 4BF1BCC011C9663F0025511F /* OFHash.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OFHash.h; path = src/OFHash.h; sourceTree = "<group>"; }; |
︙ | |||
1093 1094 1095 1096 1097 1098 1099 | 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 | - | 4B2B3E75140D430500EC2F7C /* OFDictionary_hashtable.h */, 4B2B3E76140D430500EC2F7C /* OFDictionary_hashtable.m */, 4B0108C910EB8C9300631877 /* OFEnumerator.h */, 4B0108CA10EB8C9300631877 /* OFEnumerator.m */, 4B6799661099E7C50041064A /* OFFile.h */, 4B6799671099E7C50041064A /* OFFile.m */, 4BF1BCC011C9663F0025511F /* OFHash.h */, |
︙ | |||
1596 1597 1598 1599 1600 1601 1602 | 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 | - + | }; /* End PBXNativeTarget section */ /* Begin PBXProject section */ 08FB7793FE84155DC02AAC07 /* Project object */ = { isa = PBXProject; attributes = { |
︙ | |||
1720 1721 1722 1723 1724 1725 1726 | 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 | - | 4B3D23901337FC0D00DD29B8 /* OFDataArray.m in Sources */, 4B3D23911337FC0D00DD29B8 /* OFDataArray+Hashing.m in Sources */, 4B3D23921337FC0D00DD29B8 /* OFDate.m in Sources */, 4B3D23931337FC0D00DD29B8 /* OFDictionary.m in Sources */, 4B2B3E80140D430500EC2F7C /* OFDictionary_hashtable.m in Sources */, 4B3D23941337FC0D00DD29B8 /* OFEnumerator.m in Sources */, 4B3D23961337FC0D00DD29B8 /* OFFile.m in Sources */, |
︙ |
Modified src/Makefile from [8c24021c12] to [12f61571f7].
︙ | |||
16 17 18 19 20 21 22 | 16 17 18 19 20 21 22 23 24 25 26 27 28 29 | - | OFCountedSet.m \ OFDataArray.m \ OFDataArray+Hashing.m \ OFDate.m \ OFDictionary.m \ OFEnumerator.m \ OFFile.m \ |
︙ | |||
80 81 82 83 84 85 86 87 88 89 90 91 92 93 | 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 | + | OFThread.m \ OFThreadPool.m \ OFTLSKey.m INCLUDES_THREADS = threading.h INCLUDES := ${SRCS:.m=.h} \ OFCollection.h \ OFHash.h \ OFJSONRepresentation.h \ OFLocking.h \ OFSerialization.h \ OFTLSSocket.h \ ObjFW.h \ asprintf.h \ autorelease.h \ |
︙ |
Modified src/OFHash.h from [9f5b79c75d] to [f3fad14a9f].
︙ | |||
13 14 15 16 17 18 19 | 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 | - + - - - - - + | * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this * file. */ #import "OFObject.h" /*! |
︙ |
Deleted src/OFHash.m version [f22a074494].
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
|
Modified src/OFMD5Hash.h from [efbff1e954] to [833fa196ed].
︙ | |||
17 18 19 20 21 22 23 | 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 | - + + | #import "OFHash.h" #define OF_MD5_DIGEST_SIZE 16 /*! * @brief A class which provides functions to create an MD5 hash. */ |
Modified src/OFMD5Hash.m from [969e062cb6] to [83d7c707b9].
︙ | |||
137 138 139 140 141 142 143 144 145 146 147 148 149 150 | 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 | + + + + + | return 16; } + (size_t)blockSize { return 64; } + (instancetype)hash { return [[[self alloc] init] autorelease]; } - init { self = [super init]; _buffer[0] = 0x67452301; _buffer[1] = 0xEFCDAB89; |
︙ | |||
254 255 256 257 258 259 260 261 | 259 260 261 262 263 264 265 266 267 268 269 270 271 | + + + + + | md5_transform(_buffer, _in.u32); BSWAP32_VEC_IF_BE(_buffer, 4); _calculated = YES; return (uint8_t*)_buffer; } - (BOOL)isCalculated { return _calculated; } @end |
Modified src/OFSHA1Hash.h from [0a2f6efcc5] to [6e69faf3b5].
︙ | |||
17 18 19 20 21 22 23 | 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 | - + + | #import "OFHash.h" #define OF_SHA1_DIGEST_SIZE 20 /*! * @brief A class which provides functions to create an SHA1 hash. */ |
Modified src/OFSHA1Hash.m from [25afa6488f] to [264141bf82].
︙ | |||
134 135 136 137 138 139 140 141 142 143 144 145 146 147 | 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 | + + + + + | return 20; } + (size_t)blockSize { return 64; } + (instancetype)hash { return [[[self alloc] init] autorelease]; } - init { self = [super init]; _state[0] = 0x67452301; _state[1] = 0xEFCDAB89; |
︙ | |||
188 189 190 191 192 193 194 195 | 193 194 195 196 197 198 199 200 201 202 203 204 205 | + + + + + | _digest[i] = (char)((_state[i >> 2] >> ((3 - (i & 3)) * 8)) & 255); _calculated = YES; return _digest; } - (BOOL)isCalculated { return _calculated; } @end |
Modified src/exceptions/OFHashAlreadyCalculatedException.h from [3c8cb83bb8] to [475c359189].
︙ | |||
11 12 13 14 15 16 17 | 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 | - - + - + - + - + - + - + | * Alternatively, it may be distributed under the terms of the GNU General * Public License, either version 2 or 3, which can be found in the file * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this * file. */ #import "OFException.h" |
Modified src/exceptions/OFHashAlreadyCalculatedException.m from [6c880cfe21] to [c96d938c3c].
︙ | |||
16 17 18 19 20 21 22 | 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 | - - + - + | #include "config.h" #include <stdlib.h> #import "OFHashAlreadyCalculatedException.h" #import "OFString.h" |
︙ | |||
64 65 66 67 68 69 70 | 63 64 65 66 67 68 69 70 71 72 73 74 | - + | - (OFString*)description { return [OFString stringWithFormat: @"The hash has already been calculated in class %@ and thus no new " @"data can be added", _inClass]; } |