@@ -18,10 +18,11 @@ #include #include #include #import "OFData.h" +#import "OFBase64.h" #import "OFDictionary.h" #ifdef OF_HAVE_FILES # import "OFFile.h" # import "OFFileManager.h" #endif @@ -38,12 +39,10 @@ #import "OFOutOfMemoryException.h" #import "OFOutOfRangeException.h" #import "OFTruncatedDataException.h" #import "OFUnsupportedProtocolException.h" -#import "base64.h" - /* References for static linking */ void _references_to_categories_of_OFData(void) { _OFData_CryptographicHashing_reference = 1; @@ -332,11 +331,11 @@ } self = [(OFMutableData *)self initWithCapacity: string.length / 3]; @try { - if (!of_base64_decode((OFMutableData *)self, + if (!OFBase64Decode((OFMutableData *)self, [string cStringWithEncoding: OFStringEncodingASCII], [string cStringLengthWithEncoding: OFStringEncodingASCII])) @throw [OFInvalidFormatException exception]; } @catch (id e) { [self release]; @@ -539,11 +538,11 @@ return ret; } - (OFString *)stringByBase64Encoding { - return of_base64_encode(_items, _count * _itemSize); + return OFBase64Encode(_items, _count * _itemSize); } - (OFRange)rangeOfData: (OFData *)data options: (OFDataSearchOptions)options range: (OFRange)range @@ -622,11 +621,11 @@ pool = objc_autoreleasePoolPush(); element = [OFXMLElement elementWithName: self.className namespace: OF_SERIALIZATION_NS - stringValue: of_base64_encode(_items, _count * _itemSize)]; + stringValue: OFBase64Encode(_items, _count * _itemSize)]; [element retain]; objc_autoreleasePoolPop(pool);