diff --git a/src/XMPPSCRAMAuth.h b/src/XMPPSCRAMAuth.h index de6888a..215399c 100644 --- a/src/XMPPSCRAMAuth.h +++ b/src/XMPPSCRAMAuth.h @@ -112,7 +112,7 @@ /// \cond internal - (OFString*)XMPP_genNonce; -- (uint8_t*)XMPP_HMACWithKey: (OFDataArray*)key +- (const uint8_t*)XMPP_HMACWithKey: (OFDataArray*)key data: (OFDataArray*)data; - (OFDataArray*)XMPP_hiWithData: (OFDataArray*)str salt: (OFDataArray*)salt diff --git a/src/XMPPSCRAMAuth.m b/src/XMPPSCRAMAuth.m index 6ffe49f..a711c7e 100644 --- a/src/XMPPSCRAMAuth.m +++ b/src/XMPPSCRAMAuth.m @@ -199,7 +199,7 @@ - (OFDataArray*)XMPP_parseServerFirstMessage: (OFDataArray*)data { size_t i; - uint8_t *clientKey, *serverKey, *clientSignature; + const uint8_t *clientKey, *serverKey, *clientSignature; intmax_t iterCount = 0; id hash; OFDataArray *ret, *authMessage, *tmpArray, *salt = nil, *saltedPassword; @@ -419,7 +419,7 @@ length: 64]; } -- (uint8_t*)XMPP_HMACWithKey: (OFDataArray*)key +- (const uint8_t*)XMPP_HMACWithKey: (OFDataArray*)key data: (OFDataArray*)data { OFAutoreleasePool *pool = [[OFAutoreleasePool alloc] init]; @@ -480,7 +480,8 @@ { OFAutoreleasePool *pool = [[OFAutoreleasePool alloc] init]; size_t digestSize = [_hashType digestSize]; - uint8_t *result = NULL, *u, *uOld; + uint8_t *result = NULL; + const uint8_t *u, *uOld; intmax_t j, k; OFDataArray *salty, *tmp, *ret; diff --git a/src/XMPPSRVLookup.m b/src/XMPPSRVLookup.m index a38b75f..59bdd0d 100644 --- a/src/XMPPSRVLookup.m +++ b/src/XMPPSRVLookup.m @@ -108,7 +108,7 @@ _target = [[OFString alloc] initWithCString: buffer - encoding: OF_STRING_ENCODING_NATIVE]; + encoding: [OFString nativeOSEncoding]]; } @catch (id e) { [self release]; @throw e; @@ -218,7 +218,7 @@ answer = [self allocMemoryWithSize: pageSize]; answerLen = res_nsearch(&_resState, - [request cStringWithEncoding: OF_STRING_ENCODING_NATIVE], + [request cStringWithEncoding: [OFString nativeOSEncoding]], ns_c_in, ns_t_srv, answer, (int)pageSize); if ((answerLen == -1) && ((h_errno == HOST_NOT_FOUND) ||