Skip to content

Commit

Permalink
Initial import.
Browse files Browse the repository at this point in the history
  • Loading branch information
bmeurer committed Jul 3, 2011
1 parent 51bcec0 commit 3e79a3f
Show file tree
Hide file tree
Showing 10 changed files with 642 additions and 8 deletions.
1 change: 1 addition & 0 deletions .gitattributes
@@ -0,0 +1 @@
*.pbxproj -crlf -diff -merge
7 changes: 7 additions & 0 deletions .gitignore
@@ -0,0 +1,7 @@
*xcodeproj/*mode*
*xcodeproj/*pbxuser
*xcodeproj/*per*
*xcodeproj/project.xcworkspace
*xcodeproj/xcuserdata
.DS_Store
*.pbxuser
37 changes: 33 additions & 4 deletions BMKit.xcodeproj/project.pbxproj
Expand Up @@ -8,12 +8,22 @@

/* Begin PBXBuildFile section */
C7F1F36413C05D0D00F1DED1 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C7F1F36313C05D0D00F1DED1 /* Foundation.framework */; };
C7F1F36F13C05E0200F1DED1 /* NSObject+BMKitAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = C7F1F36D13C05E0200F1DED1 /* NSObject+BMKitAdditions.h */; settings = {ATTRIBUTES = (Public, ); }; };
C7F1F37013C05E0200F1DED1 /* NSObject+BMKitAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = C7F1F36E13C05E0200F1DED1 /* NSObject+BMKitAdditions.m */; };
C7F1F37313C06D2500F1DED1 /* BMKit.h in Headers */ = {isa = PBXBuildFile; fileRef = C7F1F37213C06D2500F1DED1 /* BMKit.h */; settings = {ATTRIBUTES = (Public, ); }; };
C7F1F37613C06D8000F1DED1 /* NSData+BMKitAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = C7F1F37413C06D8000F1DED1 /* NSData+BMKitAdditions.h */; settings = {ATTRIBUTES = (Public, ); }; };
C7F1F37713C06D8000F1DED1 /* NSData+BMKitAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = C7F1F37513C06D8000F1DED1 /* NSData+BMKitAdditions.m */; };
/* End PBXBuildFile section */

/* Begin PBXFileReference section */
C7F1F36013C05D0D00F1DED1 /* libBMKit.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libBMKit.a; sourceTree = BUILT_PRODUCTS_DIR; };
C7F1F36313C05D0D00F1DED1 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
C7F1F36713C05D0D00F1DED1 /* BMKit-Prefix.pch */ = {isa = PBXFileReference; path = "BMKit-Prefix.pch"; sourceTree = "<group>"; };
C7F1F36713C05D0D00F1DED1 /* BMKit-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "BMKit-Prefix.pch"; sourceTree = "<group>"; };
C7F1F36D13C05E0200F1DED1 /* NSObject+BMKitAdditions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSObject+BMKitAdditions.h"; sourceTree = "<group>"; };
C7F1F36E13C05E0200F1DED1 /* NSObject+BMKitAdditions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSObject+BMKitAdditions.m"; sourceTree = "<group>"; };
C7F1F37213C06D2500F1DED1 /* BMKit.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BMKit.h; sourceTree = "<group>"; };
C7F1F37413C06D8000F1DED1 /* NSData+BMKitAdditions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSData+BMKitAdditions.h"; sourceTree = "<group>"; };
C7F1F37513C06D8000F1DED1 /* NSData+BMKitAdditions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSData+BMKitAdditions.m"; sourceTree = "<group>"; };
/* End PBXFileReference section */

/* Begin PBXFrameworksBuildPhase section */
Expand Down Expand Up @@ -56,7 +66,9 @@
C7F1F36513C05D0D00F1DED1 /* BMKit */ = {
isa = PBXGroup;
children = (
C7F1F37113C05E0700F1DED1 /* Additions */,
C7F1F36613C05D0D00F1DED1 /* Supporting Files */,
C7F1F37213C06D2500F1DED1 /* BMKit.h */,
);
path = BMKit;
sourceTree = "<group>";
Expand All @@ -69,13 +81,27 @@
name = "Supporting Files";
sourceTree = "<group>";
};
C7F1F37113C05E0700F1DED1 /* Additions */ = {
isa = PBXGroup;
children = (
C7F1F37413C06D8000F1DED1 /* NSData+BMKitAdditions.h */,
C7F1F37513C06D8000F1DED1 /* NSData+BMKitAdditions.m */,
C7F1F36D13C05E0200F1DED1 /* NSObject+BMKitAdditions.h */,
C7F1F36E13C05E0200F1DED1 /* NSObject+BMKitAdditions.m */,
);
name = Additions;
sourceTree = "<group>";
};
/* End PBXGroup section */

/* Begin PBXHeadersBuildPhase section */
C7F1F35E13C05D0D00F1DED1 /* Headers */ = {
isa = PBXHeadersBuildPhase;
buildActionMask = 2147483647;
files = (
C7F1F36F13C05E0200F1DED1 /* NSObject+BMKitAdditions.h in Headers */,
C7F1F37313C06D2500F1DED1 /* BMKit.h in Headers */,
C7F1F37613C06D8000F1DED1 /* NSData+BMKitAdditions.h in Headers */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down Expand Up @@ -105,7 +131,7 @@
C7F1F35713C05D0D00F1DED1 /* Project object */ = {
isa = PBXProject;
attributes = {
ORGANIZATIONNAME = "Universität Siegen";
ORGANIZATIONNAME = "Benedikt Meurer";
};
buildConfigurationList = C7F1F35A13C05D0D00F1DED1 /* Build configuration list for PBXProject "BMKit" */;
compatibilityVersion = "Xcode 3.2";
Expand All @@ -129,6 +155,8 @@
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
C7F1F37013C05E0200F1DED1 /* NSObject+BMKitAdditions.m in Sources */,
C7F1F37713C06D8000F1DED1 /* NSData+BMKitAdditions.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand All @@ -146,7 +174,7 @@
GCC_VERSION = com.apple.compilers.llvmgcc42;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 4.3;
IPHONEOS_DEPLOYMENT_TARGET = 4.0;
SDKROOT = iphoneos;
};
name = Debug;
Expand All @@ -156,10 +184,11 @@
buildSettings = {
ARCHS = "$(ARCHS_STANDARD_32_BIT)";
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_PREPROCESSOR_DEFINITIONS = NS_BLOCK_ASSERTIONS;
GCC_VERSION = com.apple.compilers.llvmgcc42;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 4.3;
IPHONEOS_DEPLOYMENT_TARGET = 4.0;
SDKROOT = iphoneos;
};
name = Release;
Expand Down
41 changes: 37 additions & 4 deletions BMKit/BMKit-Prefix.pch
@@ -1,7 +1,40 @@
//
// Prefix header for all source files of the 'BMKit' target in the 'BMKit' project
//
/*-
* Copyright (c) 2011, Benedikt Meurer <benedikt.meurer@googlemail.com>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/

#include <Availability.h>

#ifndef __IPHONE_3_0
# warning "This project uses features only available in iPhone SDK 3.0 and later."
#endif

#include <objc/runtime.h>

#include <CommonCrypto/CommonDigest.h>

#ifdef __OBJC__
#import <Foundation/Foundation.h>
# import <Foundation/Foundation.h>
#endif
29 changes: 29 additions & 0 deletions BMKit/BMKit.h
@@ -0,0 +1,29 @@
/*-
* Copyright (c) 2011, Benedikt Meurer <benedikt.meurer@googlemail.com>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/

#import "NSData+BMKitAdditions.h"
#import "NSObject+BMKitAdditions.h"
48 changes: 48 additions & 0 deletions BMKit/NSData+BMKitAdditions.h
@@ -0,0 +1,48 @@
/*-
* Copyright (c) 2004-2011, Benedikt Meurer <benedikt.meurer@googlemail.com>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/

#import <Foundation/Foundation.h>


@interface NSData (BMKitAdditions)

///----------------------
/// @name Base64 Encoding
///----------------------

+ (NSData *)dataWithBase64EncodedString:(NSString *)aString;
- (id)initWithBase64EncodedString:(NSString *)aString;
- (NSString *)base64EncodedString;

///----------------------
/// @name Message Digests
///----------------------

- (NSData *)MD5;
- (NSString *)MD5String;

@end

0 comments on commit 3e79a3f

Please sign in to comment.