Commit 30a61812 authored by Dapperstout's avatar Dapperstout

Added Base32 library.

parent ee8b52de
......@@ -5,3 +5,4 @@ link_with 'pulse', 'pulseTests'
pod 'CocoaAsyncSocket', '~> 7.3', :inhibit_warnings => true
pod 'lz4', '~> 123'
pod 'Base32', '~> 1.0.2'
\ No newline at end of file
PODS:
- Base32 (1.0.2)
- CocoaAsyncSocket (7.3.5)
- lz4 (123)
DEPENDENCIES:
- Base32 (~> 1.0.2)
- CocoaAsyncSocket (~> 7.3)
- lz4 (~> 123)
SPEC CHECKSUMS:
Base32: a0ef6e90e721130c474cc970a4d98a6cbf16ce85
CocoaAsyncSocket: 45bdbbc1c0a5ed0640ff4c42af325ba43a2f099a
lz4: 316468bb1b748b046e7d4452e46ffc5c7fddccf0
......
//
// MF_Base32Additions.h
// Base32 -- RFC 4648 compatible implementation
// see http://www.ietf.org/rfc/rfc4648.txt for more details
//
// Designed to be compiled with Automatic Reference Counting
//
// Created by Dave Poirier on 12-06-14.
// Public Domain
//
#import <Foundation/Foundation.h>
#define NSBase32StringEncoding 0x4D467E32
@interface NSString (Base32Addition)
+(NSString *)stringFromBase32String:(NSString *)base32String;
-(NSString *)base32String;
@end
@interface NSData (Base32Addition)
+(NSData *)dataWithBase32String:(NSString *)base32String;
-(NSString *)base32String;
@end
@interface MF_Base32Codec : NSObject
+(NSData *)dataFromBase32String:(NSString *)base32String;
+(NSString *)base32StringFromData:(NSData *)data;
@end
This diff is collapsed.
Base32 Additions for Objective-C on Mac OS X and iOS
====
Usage
----
Open the XCode project file, and drag MF_Base32Additions.m/.h into your project.
In files where you want to use Base32 encoding/decoding, simply include the header file and use one of the provided NSData or NSString additions.
Example use:
#import "MF_Base32Additions.h"
NSString *helloWorld = @"Hello World";
NSString *helloInBase32 = [helloWorld base32String];
NSString *helloDecoded = [NSString stringFromBase32String:helloInBase32];
Performance
----
* Encoding: Approximately 4 to 5 times faster than using the equivalent SecTransform.
* Decoding: Slightly faster but almost identical decoding time as equivalent SecTransform.
Requirements
-----
* Compile with Automatic Reference Counting
* Compatible with Mac OSX 10.6+ and iOS 4.0+
Implementation
----
* Implemented as per RFC 4648, see http://www.ietf.org/rfc/rfc4648.txt for more details.
Licensing
----
* Public Domain
../../../Base32/Base32/MF_Base32Additions.h
\ No newline at end of file
../../../Base32/Base32/MF_Base32Additions.h
\ No newline at end of file
PODS:
- Base32 (1.0.2)
- CocoaAsyncSocket (7.3.5)
- lz4 (123)
DEPENDENCIES:
- Base32 (~> 1.0.2)
- CocoaAsyncSocket (~> 7.3)
- lz4 (~> 123)
SPEC CHECKSUMS:
Base32: a0ef6e90e721130c474cc970a4d98a6cbf16ce85
CocoaAsyncSocket: 45bdbbc1c0a5ed0640ff4c42af325ba43a2f099a
lz4: 316468bb1b748b046e7d4452e46ffc5c7fddccf0
......
This diff is collapsed.
#include "Pods-Base32.xcconfig"
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Build" "${PODS_ROOT}/Headers/Build/Base32" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/Base32" "${PODS_ROOT}/Headers/Public/CocoaAsyncSocket" "${PODS_ROOT}/Headers/Public/lz4"
OTHER_LDFLAGS = -ObjC
PODS_ROOT = ${SRCROOT}
\ No newline at end of file
#import <Foundation/Foundation.h>
@interface PodsDummy_Pods_Base32 : NSObject
@end
@implementation PodsDummy_Pods_Base32
@end
#ifdef __OBJC__
#import <UIKit/UIKit.h>
#endif
#import "Pods-environment.h"
#include "Pods-CocoaAsyncSocket.xcconfig"
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Build" "${PODS_ROOT}/Headers/Build/CocoaAsyncSocket" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/CocoaAsyncSocket" "${PODS_ROOT}/Headers/Public/lz4"
HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Build" "${PODS_ROOT}/Headers/Build/CocoaAsyncSocket" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/Base32" "${PODS_ROOT}/Headers/Public/CocoaAsyncSocket" "${PODS_ROOT}/Headers/Public/lz4"
OTHER_LDFLAGS = ${PODS_COCOAASYNCSOCKET_OTHER_LDFLAGS} -ObjC
PODS_ROOT = ${SRCROOT}
\ No newline at end of file
#include "Pods-lz4.xcconfig"
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Build" "${PODS_ROOT}/Headers/Build/lz4" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/CocoaAsyncSocket" "${PODS_ROOT}/Headers/Public/lz4"
HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Build" "${PODS_ROOT}/Headers/Build/lz4" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/Base32" "${PODS_ROOT}/Headers/Public/CocoaAsyncSocket" "${PODS_ROOT}/Headers/Public/lz4"
OTHER_LDFLAGS = -ObjC
PODS_ROOT = ${SRCROOT}
\ No newline at end of file
......@@ -6,6 +6,12 @@
// project.
// Base32
#define COCOAPODS_POD_AVAILABLE_Base32
#define COCOAPODS_VERSION_MAJOR_Base32 1
#define COCOAPODS_VERSION_MINOR_Base32 0
#define COCOAPODS_VERSION_PATCH_Base32 2
// CocoaAsyncSocket
#define COCOAPODS_POD_AVAILABLE_CocoaAsyncSocket
#define COCOAPODS_VERSION_MAJOR_CocoaAsyncSocket 7
......
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/CocoaAsyncSocket" "${PODS_ROOT}/Headers/Public/lz4"
OTHER_CFLAGS = $(inherited) -isystem "${PODS_ROOT}/Headers/Public" -isystem "${PODS_ROOT}/Headers/Public/CocoaAsyncSocket" -isystem "${PODS_ROOT}/Headers/Public/lz4"
OTHER_LDFLAGS = -ObjC -l"Pods-CocoaAsyncSocket" -l"Pods-lz4" -framework "CFNetwork" -framework "Security"
HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/Base32" "${PODS_ROOT}/Headers/Public/CocoaAsyncSocket" "${PODS_ROOT}/Headers/Public/lz4"
OTHER_CFLAGS = $(inherited) -isystem "${PODS_ROOT}/Headers/Public" -isystem "${PODS_ROOT}/Headers/Public/Base32" -isystem "${PODS_ROOT}/Headers/Public/CocoaAsyncSocket" -isystem "${PODS_ROOT}/Headers/Public/lz4"
OTHER_LDFLAGS = -ObjC -l"Pods-Base32" -l"Pods-CocoaAsyncSocket" -l"Pods-lz4" -framework "CFNetwork" -framework "Security"
OTHER_LIBTOOLFLAGS = $(OTHER_LDFLAGS)
PODS_ROOT = ${SRCROOT}/Pods
\ No newline at end of file
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/CocoaAsyncSocket" "${PODS_ROOT}/Headers/Public/lz4"
OTHER_CFLAGS = $(inherited) -isystem "${PODS_ROOT}/Headers/Public" -isystem "${PODS_ROOT}/Headers/Public/CocoaAsyncSocket" -isystem "${PODS_ROOT}/Headers/Public/lz4"
OTHER_LDFLAGS = -ObjC -l"Pods-CocoaAsyncSocket" -l"Pods-lz4" -framework "CFNetwork" -framework "Security"
HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/Base32" "${PODS_ROOT}/Headers/Public/CocoaAsyncSocket" "${PODS_ROOT}/Headers/Public/lz4"
OTHER_CFLAGS = $(inherited) -isystem "${PODS_ROOT}/Headers/Public" -isystem "${PODS_ROOT}/Headers/Public/Base32" -isystem "${PODS_ROOT}/Headers/Public/CocoaAsyncSocket" -isystem "${PODS_ROOT}/Headers/Public/lz4"
OTHER_LDFLAGS = -ObjC -l"Pods-Base32" -l"Pods-CocoaAsyncSocket" -l"Pods-lz4" -framework "CFNetwork" -framework "Security"
OTHER_LIBTOOLFLAGS = $(OTHER_LDFLAGS)
PODS_ROOT = ${SRCROOT}/Pods
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment