Skip to content

Commit

Permalink
Use MD5 for hashing URLs. Fixes #4
Browse files Browse the repository at this point in the history
  • Loading branch information
JanGorman committed May 1, 2015
1 parent ba57c14 commit 1a292d8
Show file tree
Hide file tree
Showing 17 changed files with 302 additions and 36 deletions.
19 changes: 19 additions & 0 deletions Library/MapleBacon/CommonCrypto/CommonCrypto.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
//
// CommonCrypto.h
// CommonCrypto
//
// Created by Jan Gorman on 01/05/15.
// Copyright (c) 2015 Zalando SE. All rights reserved.
//

#import <UIKit/UIKit.h>

//! Project version number for CommonCrypto.
FOUNDATION_EXPORT double CommonCryptoVersionNumber;

//! Project version string for CommonCrypto.
FOUNDATION_EXPORT const unsigned char CommonCryptoVersionString[];

// In this header, you should import all the public headers of your framework using statements like #import <CommonCrypto/PublicHeader.h>


6 changes: 6 additions & 0 deletions Library/MapleBacon/CommonCrypto/CommonCrypto.xcconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
//
// Copyright (c) 2015 Zalando SE. All rights reserved.
//

MODULEMAP_FILE[sdk=iphoneos*] = $(SRCROOT)/CommonCrypto/iphoneos.modulemap
MODULEMAP_FILE[sdk=iphonesimulator*] = $(SRCROOT)/CommonCrypto/iphonesimulator.modulemap
26 changes: 26 additions & 0 deletions Library/MapleBacon/CommonCrypto/Info.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>de.zalando.$(PRODUCT_NAME:rfc1034identifier)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>$(PRODUCT_NAME)</string>
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>$(CURRENT_PROJECT_VERSION)</string>
<key>NSPrincipalClass</key>
<string></string>
</dict>
</plist>
4 changes: 4 additions & 0 deletions Library/MapleBacon/CommonCrypto/iphoneos.modulemap
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
module CommonCrypto [system] {
header "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/usr/include/CommonCrypto/CommonCrypto.h"
export *
}
4 changes: 4 additions & 0 deletions Library/MapleBacon/CommonCrypto/iphonesimulator.modulemap
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
module CommonCrypto [system] {
header "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/usr/include/CommonCrypto/CommonCrypto.h"
export *
}
155 changes: 155 additions & 0 deletions Library/MapleBacon/MapleBacon.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,22 @@
31AA39C553B3B420836A8E79 /* Storage.swift in Sources */ = {isa = PBXBuildFile; fileRef = 31AA3AAEAAD81D412F89FA50 /* Storage.swift */; };
31AA3B249325F7F047E1C8B4 /* DiskStorage.swift in Sources */ = {isa = PBXBuildFile; fileRef = 31AA308AA32664DC7B0FF346 /* DiskStorage.swift */; };
449BD8751A417A76007AC1BD /* Resizer.swift in Sources */ = {isa = PBXBuildFile; fileRef = F2CA5CE91A3F2709008175BA /* Resizer.swift */; };
F236998F1AF3825000DF80F6 /* iphoneos.modulemap in Sources */ = {isa = PBXBuildFile; fileRef = F236998E1AF3825000DF80F6 /* iphoneos.modulemap */; };
F23699911AF3825900DF80F6 /* iphonesimulator.modulemap in Sources */ = {isa = PBXBuildFile; fileRef = F23699901AF3825900DF80F6 /* iphonesimulator.modulemap */; };
F2520C541A3EDAFF0061BB33 /* MapleBacon.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F2520C481A3EDAFE0061BB33 /* MapleBacon.framework */; };
F2520C6D1A3F06FD0061BB33 /* cupcakes.jpg in Resources */ = {isa = PBXBuildFile; fileRef = F2520C6C1A3F06FD0061BB33 /* cupcakes.jpg */; };
F2CA5CEA1A3F2709008175BA /* Resizer.swift in Sources */ = {isa = PBXBuildFile; fileRef = F2CA5CE91A3F2709008175BA /* Resizer.swift */; };
F2CA5CEC1A3F2710008175BA /* StorageTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = F2CA5CEB1A3F2710008175BA /* StorageTests.swift */; };
/* End PBXBuildFile section */

/* Begin PBXContainerItemProxy section */
F23699D01AF38ADD00DF80F6 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = F2520C3F1A3EDAFE0061BB33 /* Project object */;
proxyType = 1;
remoteGlobalIDString = F23699731AF381D500DF80F6;
remoteInfo = CommonCrypto;
};
F2520C551A3EDAFF0061BB33 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = F2520C3F1A3EDAFE0061BB33 /* Project object */;
Expand All @@ -47,16 +56,29 @@
31AA33CBF1DD27291C9E1DCB /* InMemoryStorage.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = InMemoryStorage.swift; sourceTree = "<group>"; };
31AA3AAEAAD81D412F89FA50 /* Storage.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Storage.swift; sourceTree = "<group>"; };
31AA3B2762299015563F040F /* ImageDownloadOperation.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ImageDownloadOperation.swift; sourceTree = "<group>"; };
F23699741AF381D500DF80F6 /* CommonCrypto.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = CommonCrypto.framework; sourceTree = BUILT_PRODUCTS_DIR; };
F23699771AF381D500DF80F6 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
F236998D1AF381F400DF80F6 /* CommonCrypto.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = CommonCrypto.xcconfig; sourceTree = "<group>"; };
F236998E1AF3825000DF80F6 /* iphoneos.modulemap */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = "sourcecode.module-map"; path = iphoneos.modulemap; sourceTree = "<group>"; };
F23699901AF3825900DF80F6 /* iphonesimulator.modulemap */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = "sourcecode.module-map"; path = iphonesimulator.modulemap; sourceTree = "<group>"; };
F2520C481A3EDAFE0061BB33 /* MapleBacon.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = MapleBacon.framework; sourceTree = BUILT_PRODUCTS_DIR; };
F2520C4C1A3EDAFE0061BB33 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
F2520C531A3EDAFF0061BB33 /* MapleBaconTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = MapleBaconTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
F2520C591A3EDAFF0061BB33 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
F2520C6C1A3F06FD0061BB33 /* cupcakes.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = cupcakes.jpg; sourceTree = "<group>"; };
F2A8EF181AF3726D00305E16 /* libcommonCrypto.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libcommonCrypto.dylib; path = usr/lib/system/libcommonCrypto.dylib; sourceTree = SDKROOT; };
F2CA5CE91A3F2709008175BA /* Resizer.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = Resizer.swift; path = ../MapleBacon/Resizer.swift; sourceTree = "<group>"; };
F2CA5CEB1A3F2710008175BA /* StorageTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = StorageTests.swift; path = MapleBaconTests/StorageTests.swift; sourceTree = SOURCE_ROOT; };
/* End PBXFileReference section */

/* Begin PBXFrameworksBuildPhase section */
F23699701AF381D500DF80F6 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
F2520C441A3EDAFE0061BB33 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
Expand Down Expand Up @@ -123,11 +145,32 @@
path = Storage;
sourceTree = "<group>";
};
F23699751AF381D500DF80F6 /* CommonCrypto */ = {
isa = PBXGroup;
children = (
F23699761AF381D500DF80F6 /* Supporting Files */,
F236998D1AF381F400DF80F6 /* CommonCrypto.xcconfig */,
F236998E1AF3825000DF80F6 /* iphoneos.modulemap */,
F23699901AF3825900DF80F6 /* iphonesimulator.modulemap */,
);
path = CommonCrypto;
sourceTree = "<group>";
};
F23699761AF381D500DF80F6 /* Supporting Files */ = {
isa = PBXGroup;
children = (
F23699771AF381D500DF80F6 /* Info.plist */,
);
name = "Supporting Files";
sourceTree = "<group>";
};
F2520C3E1A3EDAFE0061BB33 = {
isa = PBXGroup;
children = (
F2A8EF181AF3726D00305E16 /* libcommonCrypto.dylib */,
F2520C4A1A3EDAFE0061BB33 /* MapleBacon */,
F2520C571A3EDAFF0061BB33 /* MapleBaconTests */,
F23699751AF381D500DF80F6 /* CommonCrypto */,
F2520C491A3EDAFE0061BB33 /* Products */,
);
sourceTree = "<group>";
Expand All @@ -137,6 +180,7 @@
children = (
F2520C481A3EDAFE0061BB33 /* MapleBacon.framework */,
F2520C531A3EDAFF0061BB33 /* MapleBaconTests.xctest */,
F23699741AF381D500DF80F6 /* CommonCrypto.framework */,
);
name = Products;
sourceTree = "<group>";
Expand Down Expand Up @@ -182,6 +226,13 @@
/* End PBXGroup section */

/* Begin PBXHeadersBuildPhase section */
F23699711AF381D500DF80F6 /* Headers */ = {
isa = PBXHeadersBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
F2520C451A3EDAFE0061BB33 /* Headers */ = {
isa = PBXHeadersBuildPhase;
buildActionMask = 2147483647;
Expand All @@ -194,6 +245,24 @@
/* End PBXHeadersBuildPhase section */

/* Begin PBXNativeTarget section */
F23699731AF381D500DF80F6 /* CommonCrypto */ = {
isa = PBXNativeTarget;
buildConfigurationList = F236998B1AF381D600DF80F6 /* Build configuration list for PBXNativeTarget "CommonCrypto" */;
buildPhases = (
F236996F1AF381D500DF80F6 /* Sources */,
F23699701AF381D500DF80F6 /* Frameworks */,
F23699711AF381D500DF80F6 /* Headers */,
F23699721AF381D500DF80F6 /* Resources */,
);
buildRules = (
);
dependencies = (
);
name = CommonCrypto;
productName = CommonCrypto;
productReference = F23699741AF381D500DF80F6 /* CommonCrypto.framework */;
productType = "com.apple.product-type.framework";
};
F2520C471A3EDAFE0061BB33 /* MapleBacon */ = {
isa = PBXNativeTarget;
buildConfigurationList = F2520C5E1A3EDAFF0061BB33 /* Build configuration list for PBXNativeTarget "MapleBacon" */;
Expand All @@ -206,6 +275,7 @@
buildRules = (
);
dependencies = (
F23699D11AF38ADD00DF80F6 /* PBXTargetDependency */,
);
name = MapleBacon;
productName = MapleBacon;
Expand Down Expand Up @@ -239,6 +309,9 @@
LastUpgradeCheck = 0610;
ORGANIZATIONNAME = "Zalando SE";
TargetAttributes = {
F23699731AF381D500DF80F6 = {
CreatedOnToolsVersion = 6.3.1;
};
F2520C471A3EDAFE0061BB33 = {
CreatedOnToolsVersion = 6.1.1;
};
Expand All @@ -261,11 +334,19 @@
targets = (
F2520C471A3EDAFE0061BB33 /* MapleBacon */,
F2520C521A3EDAFF0061BB33 /* MapleBaconTests */,
F23699731AF381D500DF80F6 /* CommonCrypto */,
);
};
/* End PBXProject section */

/* Begin PBXResourcesBuildPhase section */
F23699721AF381D500DF80F6 /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
F2520C461A3EDAFE0061BB33 /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
Expand All @@ -284,6 +365,15 @@
/* End PBXResourcesBuildPhase section */

/* Begin PBXSourcesBuildPhase section */
F236996F1AF381D500DF80F6 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
F23699911AF3825900DF80F6 /* iphonesimulator.modulemap in Sources */,
F236998F1AF3825000DF80F6 /* iphoneos.modulemap in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
F2520C431A3EDAFE0061BB33 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
Expand Down Expand Up @@ -314,6 +404,11 @@
/* End PBXSourcesBuildPhase section */

/* Begin PBXTargetDependency section */
F23699D11AF38ADD00DF80F6 /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
target = F23699731AF381D500DF80F6 /* CommonCrypto */;
targetProxy = F23699D01AF38ADD00DF80F6 /* PBXContainerItemProxy */;
};
F2520C561A3EDAFF0061BB33 /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
target = F2520C471A3EDAFE0061BB33 /* MapleBacon */;
Expand All @@ -322,6 +417,49 @@
/* End PBXTargetDependency section */

/* Begin XCBuildConfiguration section */
F23699871AF381D600DF80F6 /* Debug */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = F236998D1AF381F400DF80F6 /* CommonCrypto.xcconfig */;
buildSettings = {
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
DEFINES_MODULE = YES;
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
GCC_NO_COMMON_BLOCKS = YES;
GCC_PREPROCESSOR_DEFINITIONS = (
"DEBUG=1",
"$(inherited)",
);
INFOPLIST_FILE = CommonCrypto/Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 8.3;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_NAME = "$(TARGET_NAME)";
SKIP_INSTALL = YES;
};
name = Debug;
};
F23699881AF381D600DF80F6 /* Release */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = F236998D1AF381F400DF80F6 /* CommonCrypto.xcconfig */;
buildSettings = {
COPY_PHASE_STRIP = NO;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
DEFINES_MODULE = YES;
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
GCC_NO_COMMON_BLOCKS = YES;
INFOPLIST_FILE = CommonCrypto/Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 8.3;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_NAME = "$(TARGET_NAME)";
SKIP_INSTALL = YES;
};
name = Release;
};
F2520C5C1A3EDAFF0061BB33 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
Expand Down Expand Up @@ -418,6 +556,10 @@
INFOPLIST_FILE = MapleBacon/Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
LIBRARY_SEARCH_PATHS = (
"$(inherited)",
"$(SDKROOT)/usr/lib/system",
);
PRODUCT_NAME = "$(TARGET_NAME)";
SKIP_INSTALL = YES;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
Expand All @@ -435,6 +577,10 @@
INFOPLIST_FILE = MapleBacon/Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
LIBRARY_SEARCH_PATHS = (
"$(inherited)",
"$(SDKROOT)/usr/lib/system",
);
PRODUCT_NAME = "$(TARGET_NAME)";
SKIP_INSTALL = YES;
};
Expand Down Expand Up @@ -473,6 +619,15 @@
/* End XCBuildConfiguration section */

/* Begin XCConfigurationList section */
F236998B1AF381D600DF80F6 /* Build configuration list for PBXNativeTarget "CommonCrypto" */ = {
isa = XCConfigurationList;
buildConfigurations = (
F23699871AF381D600DF80F6 /* Debug */,
F23699881AF381D600DF80F6 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
F2520C421A3EDAFE0061BB33 /* Build configuration list for PBXProject "MapleBacon" */ = {
isa = XCConfigurationList;
buildConfigurations = (
Expand Down
Loading

0 comments on commit 1a292d8

Please sign in to comment.