128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
|
value = OFAllocMemory(1, size);
@try {
[self getValue: value size: size];
OFHashInit(&hash);
for (size_t i = 0; i < size; i++)
OFHashAdd(&hash, value[i]);
OFHashFinalize(&hash);
} @finally {
OFFreeMemory(value);
}
return hash;
|
|
|
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
|
value = OFAllocMemory(1, size);
@try {
[self getValue: value size: size];
OFHashInit(&hash);
for (size_t i = 0; i < size; i++)
OFHashAddByte(&hash, value[i]);
OFHashFinalize(&hash);
} @finally {
OFFreeMemory(value);
}
return hash;
|