ObjXMPP  Diff

Differences From Artifact [f708ffe294]:

To Artifact [40cdae8631]:


94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
- (OFString *)capsHash
{
	OFEnumerator *enumerator;
	XMPPDiscoIdentity *identity;
	OFString *feature;
	OFMutableString *caps = [OFMutableString string];
	OFSHA1Hash *hash = [OFSHA1Hash cryptoHash];
	OFDataArray *digest = [OFDataArray dataArray];

	enumerator = [_identities objectEnumerator];
	while ((identity = [enumerator nextObject]) != nil)
		[caps appendFormat: @"%@/%@//%@<", [identity category],
		    [identity type], [identity name]];

	enumerator = [_features objectEnumerator];
	while ((feature = [enumerator nextObject]) != nil)
		[caps appendFormat: @"%@<", feature];

	[hash updateWithBuffer: [caps UTF8String]
			length: [caps UTF8StringLength]];

	[digest addItems: [hash digest]
		   count: [OFSHA1Hash digestSize]];

	return [digest stringByBase64Encoding];
}

- (void)connection: (XMPPConnection *)connection
     wasBoundToJID: (XMPPJID *)JID
{







|













|
|







94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
- (OFString *)capsHash
{
	OFEnumerator *enumerator;
	XMPPDiscoIdentity *identity;
	OFString *feature;
	OFMutableString *caps = [OFMutableString string];
	OFSHA1Hash *hash = [OFSHA1Hash cryptoHash];
	OFData *digest;

	enumerator = [_identities objectEnumerator];
	while ((identity = [enumerator nextObject]) != nil)
		[caps appendFormat: @"%@/%@//%@<", [identity category],
		    [identity type], [identity name]];

	enumerator = [_features objectEnumerator];
	while ((feature = [enumerator nextObject]) != nil)
		[caps appendFormat: @"%@<", feature];

	[hash updateWithBuffer: [caps UTF8String]
			length: [caps UTF8StringLength]];

	digest = [OFData dataWithItems: [hash digest]
				 count: [[hash class] digestSize]];

	return [digest stringByBase64Encoding];
}

- (void)connection: (XMPPConnection *)connection
     wasBoundToJID: (XMPPJID *)JID
{