├── .gitignore ├── Examples ├── ISStego OS X Example │ ├── ISStego OS X Example.xcodeproj │ │ ├── project.pbxproj │ │ └── project.xcworkspace │ │ │ └── contents.xcworkspacedata │ ├── ISStego OS X Example │ │ ├── AppDelegate.h │ │ ├── AppDelegate.m │ │ ├── Base.lproj │ │ │ └── Main.storyboard │ │ ├── Images.xcassets │ │ │ └── AppIcon.appiconset │ │ │ │ └── Contents.json │ │ ├── Info.plist │ │ ├── ViewController.h │ │ ├── ViewController.m │ │ └── main.m │ └── ISStego OS X ExampleTests │ │ ├── ISStego_OS_X_ExampleTests.m │ │ └── Info.plist ├── ISStego iOS Example │ ├── ISStego iOS Example.xcodeproj │ │ └── project.pbxproj │ ├── ISStego iOS Example │ │ ├── AppDelegate.h │ │ ├── AppDelegate.m │ │ ├── Base.lproj │ │ │ ├── LaunchScreen.xib │ │ │ └── Main.storyboard │ │ ├── ISUtils.h │ │ ├── ISUtils.m │ │ ├── Images.xcassets │ │ │ └── AppIcon.appiconset │ │ │ │ └── Contents.json │ │ ├── Info.plist │ │ ├── ViewControllers │ │ │ ├── ExtractViewController.h │ │ │ ├── ExtractViewController.m │ │ │ ├── InsertViewController.h │ │ │ ├── InsertViewController.m │ │ │ ├── ViewController.h │ │ │ └── ViewController.m │ │ └── main.m │ └── ISStego iOS ExampleTests │ │ ├── ISStego_iOS_ExampleTests.m │ │ └── Info.plist ├── ISStego_OS_X_Example.gif ├── ISStego_iOS_Example.gif ├── ORIGINAL_IMAGE.png └── STEGO_IMAGE.png ├── ISStego.podspec ├── ISStego.xcworkspace └── contents.xcworkspacedata ├── ISStego ├── ISSteganographer.h ├── ISSteganographer.m ├── ISStegoDecoder.h ├── ISStegoDecoder.m ├── ISStegoEncoder.h ├── ISStegoEncoder.m └── Utilities │ ├── ISPixelUtilities.h │ ├── ISPixelUtilities.m │ ├── ISStegoDefaults.h │ ├── ISStegoDefaults.m │ ├── ISStegoUtilities.h │ └── ISStegoUtilities.m ├── LICENSE.md ├── README.md └── Tests ├── ISStego Tests.xcodeproj └── project.pbxproj ├── OS X Tests └── Info.plist ├── Podfile ├── Podfile.lock ├── Tests ├── ISSteganographerTest.m ├── ISStegoDecoderTest.m ├── ISStegoEncoderTest.m ├── ISTestUtilities.h ├── ISTestUtilities.m └── images │ ├── image.png │ ├── image_100x100.png │ ├── image_8x8.png │ └── stegoImage.png └── iOS Tests └── Info.plist /.gitignore: -------------------------------------------------------------------------------- 1 | # Xcode 2 | # 3 | # gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore 4 | 5 | ## Build generated 6 | build/ 7 | DerivedData 8 | 9 | ## Various settings 10 | *.pbxuser 11 | !default.pbxuser 12 | *.mode1v3 13 | !default.mode1v3 14 | *.mode2v3 15 | !default.mode2v3 16 | *.perspectivev3 17 | !default.perspectivev3 18 | xcuserdata 19 | 20 | ## Other 21 | *.xccheckout 22 | *.moved-aside 23 | *.xcuserstate 24 | *.xcscmblueprint 25 | 26 | ## Obj-C/Swift specific 27 | *.hmap 28 | *.ipa 29 | 30 | # CocoaPods 31 | # 32 | # We recommend against adding the Pods directory to your .gitignore. However 33 | # you should judge for yourself, the pros and cons are mentioned at: 34 | # http://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control 35 | # 36 | Pods/ 37 | 38 | # Carthage 39 | # 40 | # Add this line if you want to avoid checking in source code from Carthage dependencies. 41 | # Carthage/Checkouts 42 | 43 | Carthage/Build 44 | -------------------------------------------------------------------------------- /Examples/ISStego OS X Example/ISStego OS X Example.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | DC3E20DC1B811C820072CDE8 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = DC3E20DB1B811C820072CDE8 /* AppDelegate.m */; }; 11 | DC3E20DE1B811C820072CDE8 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = DC3E20DD1B811C820072CDE8 /* main.m */; }; 12 | DC3E20E11B811C820072CDE8 /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = DC3E20E01B811C820072CDE8 /* ViewController.m */; }; 13 | DC3E20E31B811C820072CDE8 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = DC3E20E21B811C820072CDE8 /* Images.xcassets */; }; 14 | DC3E20E61B811C820072CDE8 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = DC3E20E41B811C820072CDE8 /* Main.storyboard */; }; 15 | DC3E20F21B811C820072CDE8 /* ISStego_OS_X_ExampleTests.m in Sources */ = {isa = PBXBuildFile; fileRef = DC3E20F11B811C820072CDE8 /* ISStego_OS_X_ExampleTests.m */; }; 16 | DC3E21091B811E4E0072CDE8 /* ISSteganographer.m in Sources */ = {isa = PBXBuildFile; fileRef = DC3E20FD1B811E4E0072CDE8 /* ISSteganographer.m */; }; 17 | DC3E210A1B811E4E0072CDE8 /* ISStegoDecoder.m in Sources */ = {isa = PBXBuildFile; fileRef = DC3E20FF1B811E4E0072CDE8 /* ISStegoDecoder.m */; }; 18 | DC3E210B1B811E4E0072CDE8 /* ISStegoEncoder.m in Sources */ = {isa = PBXBuildFile; fileRef = DC3E21011B811E4E0072CDE8 /* ISStegoEncoder.m */; }; 19 | DC3E210C1B811E4E0072CDE8 /* ISPixelUtilities.m in Sources */ = {isa = PBXBuildFile; fileRef = DC3E21041B811E4E0072CDE8 /* ISPixelUtilities.m */; }; 20 | DC3E210D1B811E4E0072CDE8 /* ISStegoDefaults.m in Sources */ = {isa = PBXBuildFile; fileRef = DC3E21061B811E4E0072CDE8 /* ISStegoDefaults.m */; }; 21 | DC3E210E1B811E4E0072CDE8 /* ISStegoUtilities.m in Sources */ = {isa = PBXBuildFile; fileRef = DC3E21081B811E4E0072CDE8 /* ISStegoUtilities.m */; }; 22 | /* End PBXBuildFile section */ 23 | 24 | /* Begin PBXContainerItemProxy section */ 25 | DC3E20EC1B811C820072CDE8 /* PBXContainerItemProxy */ = { 26 | isa = PBXContainerItemProxy; 27 | containerPortal = DC3E20CD1B811C820072CDE8 /* Project object */; 28 | proxyType = 1; 29 | remoteGlobalIDString = DC3E20D41B811C820072CDE8; 30 | remoteInfo = "ISStego OS X Example"; 31 | }; 32 | /* End PBXContainerItemProxy section */ 33 | 34 | /* Begin PBXFileReference section */ 35 | DC3E20D51B811C820072CDE8 /* ISStego OS X Example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "ISStego OS X Example.app"; sourceTree = BUILT_PRODUCTS_DIR; }; 36 | DC3E20D91B811C820072CDE8 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 37 | DC3E20DA1B811C820072CDE8 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; 38 | DC3E20DB1B811C820072CDE8 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; 39 | DC3E20DD1B811C820072CDE8 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 40 | DC3E20DF1B811C820072CDE8 /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = ""; }; 41 | DC3E20E01B811C820072CDE8 /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = ""; }; 42 | DC3E20E21B811C820072CDE8 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; }; 43 | DC3E20E51B811C820072CDE8 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 44 | DC3E20EB1B811C820072CDE8 /* ISStego OS X ExampleTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "ISStego OS X ExampleTests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; }; 45 | DC3E20F01B811C820072CDE8 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 46 | DC3E20F11B811C820072CDE8 /* ISStego_OS_X_ExampleTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ISStego_OS_X_ExampleTests.m; sourceTree = ""; }; 47 | DC3E20FC1B811E4E0072CDE8 /* ISSteganographer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ISSteganographer.h; sourceTree = ""; }; 48 | DC3E20FD1B811E4E0072CDE8 /* ISSteganographer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ISSteganographer.m; sourceTree = ""; }; 49 | DC3E20FE1B811E4E0072CDE8 /* ISStegoDecoder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ISStegoDecoder.h; sourceTree = ""; }; 50 | DC3E20FF1B811E4E0072CDE8 /* ISStegoDecoder.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ISStegoDecoder.m; sourceTree = ""; }; 51 | DC3E21001B811E4E0072CDE8 /* ISStegoEncoder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ISStegoEncoder.h; sourceTree = ""; }; 52 | DC3E21011B811E4E0072CDE8 /* ISStegoEncoder.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ISStegoEncoder.m; sourceTree = ""; }; 53 | DC3E21031B811E4E0072CDE8 /* ISPixelUtilities.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ISPixelUtilities.h; sourceTree = ""; }; 54 | DC3E21041B811E4E0072CDE8 /* ISPixelUtilities.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ISPixelUtilities.m; sourceTree = ""; }; 55 | DC3E21051B811E4E0072CDE8 /* ISStegoDefaults.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ISStegoDefaults.h; sourceTree = ""; }; 56 | DC3E21061B811E4E0072CDE8 /* ISStegoDefaults.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ISStegoDefaults.m; sourceTree = ""; }; 57 | DC3E21071B811E4E0072CDE8 /* ISStegoUtilities.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ISStegoUtilities.h; sourceTree = ""; }; 58 | DC3E21081B811E4E0072CDE8 /* ISStegoUtilities.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ISStegoUtilities.m; sourceTree = ""; }; 59 | /* End PBXFileReference section */ 60 | 61 | /* Begin PBXFrameworksBuildPhase section */ 62 | DC3E20D21B811C820072CDE8 /* Frameworks */ = { 63 | isa = PBXFrameworksBuildPhase; 64 | buildActionMask = 2147483647; 65 | files = ( 66 | ); 67 | runOnlyForDeploymentPostprocessing = 0; 68 | }; 69 | DC3E20E81B811C820072CDE8 /* Frameworks */ = { 70 | isa = PBXFrameworksBuildPhase; 71 | buildActionMask = 2147483647; 72 | files = ( 73 | ); 74 | runOnlyForDeploymentPostprocessing = 0; 75 | }; 76 | /* End PBXFrameworksBuildPhase section */ 77 | 78 | /* Begin PBXGroup section */ 79 | DC3E20CC1B811C820072CDE8 = { 80 | isa = PBXGroup; 81 | children = ( 82 | DC3E20D71B811C820072CDE8 /* ISStego OS X Example */, 83 | DC3E20EE1B811C820072CDE8 /* ISStego OS X ExampleTests */, 84 | DC3E20D61B811C820072CDE8 /* Products */, 85 | ); 86 | sourceTree = ""; 87 | }; 88 | DC3E20D61B811C820072CDE8 /* Products */ = { 89 | isa = PBXGroup; 90 | children = ( 91 | DC3E20D51B811C820072CDE8 /* ISStego OS X Example.app */, 92 | DC3E20EB1B811C820072CDE8 /* ISStego OS X ExampleTests.xctest */, 93 | ); 94 | name = Products; 95 | sourceTree = ""; 96 | }; 97 | DC3E20D71B811C820072CDE8 /* ISStego OS X Example */ = { 98 | isa = PBXGroup; 99 | children = ( 100 | DC3E20DA1B811C820072CDE8 /* AppDelegate.h */, 101 | DC3E20DB1B811C820072CDE8 /* AppDelegate.m */, 102 | DC3E20DF1B811C820072CDE8 /* ViewController.h */, 103 | DC3E20E01B811C820072CDE8 /* ViewController.m */, 104 | DC3E20E21B811C820072CDE8 /* Images.xcassets */, 105 | DC3E20E41B811C820072CDE8 /* Main.storyboard */, 106 | DC3E20FB1B811E4E0072CDE8 /* ISStego */, 107 | DC3E20D81B811C820072CDE8 /* Supporting Files */, 108 | ); 109 | path = "ISStego OS X Example"; 110 | sourceTree = ""; 111 | }; 112 | DC3E20D81B811C820072CDE8 /* Supporting Files */ = { 113 | isa = PBXGroup; 114 | children = ( 115 | DC3E20D91B811C820072CDE8 /* Info.plist */, 116 | DC3E20DD1B811C820072CDE8 /* main.m */, 117 | ); 118 | name = "Supporting Files"; 119 | sourceTree = ""; 120 | }; 121 | DC3E20EE1B811C820072CDE8 /* ISStego OS X ExampleTests */ = { 122 | isa = PBXGroup; 123 | children = ( 124 | DC3E20F11B811C820072CDE8 /* ISStego_OS_X_ExampleTests.m */, 125 | DC3E20EF1B811C820072CDE8 /* Supporting Files */, 126 | ); 127 | path = "ISStego OS X ExampleTests"; 128 | sourceTree = ""; 129 | }; 130 | DC3E20EF1B811C820072CDE8 /* Supporting Files */ = { 131 | isa = PBXGroup; 132 | children = ( 133 | DC3E20F01B811C820072CDE8 /* Info.plist */, 134 | ); 135 | name = "Supporting Files"; 136 | sourceTree = ""; 137 | }; 138 | DC3E20FB1B811E4E0072CDE8 /* ISStego */ = { 139 | isa = PBXGroup; 140 | children = ( 141 | DC3E20FC1B811E4E0072CDE8 /* ISSteganographer.h */, 142 | DC3E20FD1B811E4E0072CDE8 /* ISSteganographer.m */, 143 | DC3E20FE1B811E4E0072CDE8 /* ISStegoDecoder.h */, 144 | DC3E20FF1B811E4E0072CDE8 /* ISStegoDecoder.m */, 145 | DC3E21001B811E4E0072CDE8 /* ISStegoEncoder.h */, 146 | DC3E21011B811E4E0072CDE8 /* ISStegoEncoder.m */, 147 | DC3E21021B811E4E0072CDE8 /* Utilities */, 148 | ); 149 | name = ISStego; 150 | path = ../../../ISStego; 151 | sourceTree = ""; 152 | }; 153 | DC3E21021B811E4E0072CDE8 /* Utilities */ = { 154 | isa = PBXGroup; 155 | children = ( 156 | DC3E21031B811E4E0072CDE8 /* ISPixelUtilities.h */, 157 | DC3E21041B811E4E0072CDE8 /* ISPixelUtilities.m */, 158 | DC3E21051B811E4E0072CDE8 /* ISStegoDefaults.h */, 159 | DC3E21061B811E4E0072CDE8 /* ISStegoDefaults.m */, 160 | DC3E21071B811E4E0072CDE8 /* ISStegoUtilities.h */, 161 | DC3E21081B811E4E0072CDE8 /* ISStegoUtilities.m */, 162 | ); 163 | path = Utilities; 164 | sourceTree = ""; 165 | }; 166 | /* End PBXGroup section */ 167 | 168 | /* Begin PBXNativeTarget section */ 169 | DC3E20D41B811C820072CDE8 /* ISStego OS X Example */ = { 170 | isa = PBXNativeTarget; 171 | buildConfigurationList = DC3E20F51B811C820072CDE8 /* Build configuration list for PBXNativeTarget "ISStego OS X Example" */; 172 | buildPhases = ( 173 | DC3E20D11B811C820072CDE8 /* Sources */, 174 | DC3E20D21B811C820072CDE8 /* Frameworks */, 175 | DC3E20D31B811C820072CDE8 /* Resources */, 176 | ); 177 | buildRules = ( 178 | ); 179 | dependencies = ( 180 | ); 181 | name = "ISStego OS X Example"; 182 | productName = "ISStego OS X Example"; 183 | productReference = DC3E20D51B811C820072CDE8 /* ISStego OS X Example.app */; 184 | productType = "com.apple.product-type.application"; 185 | }; 186 | DC3E20EA1B811C820072CDE8 /* ISStego OS X ExampleTests */ = { 187 | isa = PBXNativeTarget; 188 | buildConfigurationList = DC3E20F81B811C820072CDE8 /* Build configuration list for PBXNativeTarget "ISStego OS X ExampleTests" */; 189 | buildPhases = ( 190 | DC3E20E71B811C820072CDE8 /* Sources */, 191 | DC3E20E81B811C820072CDE8 /* Frameworks */, 192 | DC3E20E91B811C820072CDE8 /* Resources */, 193 | ); 194 | buildRules = ( 195 | ); 196 | dependencies = ( 197 | DC3E20ED1B811C820072CDE8 /* PBXTargetDependency */, 198 | ); 199 | name = "ISStego OS X ExampleTests"; 200 | productName = "ISStego OS X ExampleTests"; 201 | productReference = DC3E20EB1B811C820072CDE8 /* ISStego OS X ExampleTests.xctest */; 202 | productType = "com.apple.product-type.bundle.unit-test"; 203 | }; 204 | /* End PBXNativeTarget section */ 205 | 206 | /* Begin PBXProject section */ 207 | DC3E20CD1B811C820072CDE8 /* Project object */ = { 208 | isa = PBXProject; 209 | attributes = { 210 | LastUpgradeCheck = 0640; 211 | ORGANIZATIONNAME = iSena; 212 | TargetAttributes = { 213 | DC3E20D41B811C820072CDE8 = { 214 | CreatedOnToolsVersion = 6.4; 215 | }; 216 | DC3E20EA1B811C820072CDE8 = { 217 | CreatedOnToolsVersion = 6.4; 218 | TestTargetID = DC3E20D41B811C820072CDE8; 219 | }; 220 | }; 221 | }; 222 | buildConfigurationList = DC3E20D01B811C820072CDE8 /* Build configuration list for PBXProject "ISStego OS X Example" */; 223 | compatibilityVersion = "Xcode 3.2"; 224 | developmentRegion = English; 225 | hasScannedForEncodings = 0; 226 | knownRegions = ( 227 | en, 228 | Base, 229 | ); 230 | mainGroup = DC3E20CC1B811C820072CDE8; 231 | productRefGroup = DC3E20D61B811C820072CDE8 /* Products */; 232 | projectDirPath = ""; 233 | projectRoot = ""; 234 | targets = ( 235 | DC3E20D41B811C820072CDE8 /* ISStego OS X Example */, 236 | DC3E20EA1B811C820072CDE8 /* ISStego OS X ExampleTests */, 237 | ); 238 | }; 239 | /* End PBXProject section */ 240 | 241 | /* Begin PBXResourcesBuildPhase section */ 242 | DC3E20D31B811C820072CDE8 /* Resources */ = { 243 | isa = PBXResourcesBuildPhase; 244 | buildActionMask = 2147483647; 245 | files = ( 246 | DC3E20E31B811C820072CDE8 /* Images.xcassets in Resources */, 247 | DC3E20E61B811C820072CDE8 /* Main.storyboard in Resources */, 248 | ); 249 | runOnlyForDeploymentPostprocessing = 0; 250 | }; 251 | DC3E20E91B811C820072CDE8 /* Resources */ = { 252 | isa = PBXResourcesBuildPhase; 253 | buildActionMask = 2147483647; 254 | files = ( 255 | ); 256 | runOnlyForDeploymentPostprocessing = 0; 257 | }; 258 | /* End PBXResourcesBuildPhase section */ 259 | 260 | /* Begin PBXSourcesBuildPhase section */ 261 | DC3E20D11B811C820072CDE8 /* Sources */ = { 262 | isa = PBXSourcesBuildPhase; 263 | buildActionMask = 2147483647; 264 | files = ( 265 | DC3E20E11B811C820072CDE8 /* ViewController.m in Sources */, 266 | DC3E210C1B811E4E0072CDE8 /* ISPixelUtilities.m in Sources */, 267 | DC3E210D1B811E4E0072CDE8 /* ISStegoDefaults.m in Sources */, 268 | DC3E210B1B811E4E0072CDE8 /* ISStegoEncoder.m in Sources */, 269 | DC3E210A1B811E4E0072CDE8 /* ISStegoDecoder.m in Sources */, 270 | DC3E20DE1B811C820072CDE8 /* main.m in Sources */, 271 | DC3E210E1B811E4E0072CDE8 /* ISStegoUtilities.m in Sources */, 272 | DC3E20DC1B811C820072CDE8 /* AppDelegate.m in Sources */, 273 | DC3E21091B811E4E0072CDE8 /* ISSteganographer.m in Sources */, 274 | ); 275 | runOnlyForDeploymentPostprocessing = 0; 276 | }; 277 | DC3E20E71B811C820072CDE8 /* Sources */ = { 278 | isa = PBXSourcesBuildPhase; 279 | buildActionMask = 2147483647; 280 | files = ( 281 | DC3E20F21B811C820072CDE8 /* ISStego_OS_X_ExampleTests.m in Sources */, 282 | ); 283 | runOnlyForDeploymentPostprocessing = 0; 284 | }; 285 | /* End PBXSourcesBuildPhase section */ 286 | 287 | /* Begin PBXTargetDependency section */ 288 | DC3E20ED1B811C820072CDE8 /* PBXTargetDependency */ = { 289 | isa = PBXTargetDependency; 290 | target = DC3E20D41B811C820072CDE8 /* ISStego OS X Example */; 291 | targetProxy = DC3E20EC1B811C820072CDE8 /* PBXContainerItemProxy */; 292 | }; 293 | /* End PBXTargetDependency section */ 294 | 295 | /* Begin PBXVariantGroup section */ 296 | DC3E20E41B811C820072CDE8 /* Main.storyboard */ = { 297 | isa = PBXVariantGroup; 298 | children = ( 299 | DC3E20E51B811C820072CDE8 /* Base */, 300 | ); 301 | name = Main.storyboard; 302 | sourceTree = ""; 303 | }; 304 | /* End PBXVariantGroup section */ 305 | 306 | /* Begin XCBuildConfiguration section */ 307 | DC3E20F31B811C820072CDE8 /* Debug */ = { 308 | isa = XCBuildConfiguration; 309 | buildSettings = { 310 | ALWAYS_SEARCH_USER_PATHS = NO; 311 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 312 | CLANG_CXX_LIBRARY = "libc++"; 313 | CLANG_ENABLE_MODULES = YES; 314 | CLANG_ENABLE_OBJC_ARC = YES; 315 | CLANG_WARN_BOOL_CONVERSION = YES; 316 | CLANG_WARN_CONSTANT_CONVERSION = YES; 317 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 318 | CLANG_WARN_EMPTY_BODY = YES; 319 | CLANG_WARN_ENUM_CONVERSION = YES; 320 | CLANG_WARN_INT_CONVERSION = YES; 321 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 322 | CLANG_WARN_UNREACHABLE_CODE = YES; 323 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 324 | CODE_SIGN_IDENTITY = "-"; 325 | COPY_PHASE_STRIP = NO; 326 | DEBUG_INFORMATION_FORMAT = dwarf; 327 | ENABLE_STRICT_OBJC_MSGSEND = YES; 328 | GCC_C_LANGUAGE_STANDARD = gnu99; 329 | GCC_DYNAMIC_NO_PIC = NO; 330 | GCC_NO_COMMON_BLOCKS = YES; 331 | GCC_OPTIMIZATION_LEVEL = 0; 332 | GCC_PREPROCESSOR_DEFINITIONS = ( 333 | "DEBUG=1", 334 | "$(inherited)", 335 | ); 336 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 337 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 338 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 339 | GCC_WARN_UNDECLARED_SELECTOR = YES; 340 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 341 | GCC_WARN_UNUSED_FUNCTION = YES; 342 | GCC_WARN_UNUSED_VARIABLE = YES; 343 | MACOSX_DEPLOYMENT_TARGET = 10.7; 344 | MTL_ENABLE_DEBUG_INFO = YES; 345 | ONLY_ACTIVE_ARCH = YES; 346 | SDKROOT = macosx; 347 | }; 348 | name = Debug; 349 | }; 350 | DC3E20F41B811C820072CDE8 /* Release */ = { 351 | isa = XCBuildConfiguration; 352 | buildSettings = { 353 | ALWAYS_SEARCH_USER_PATHS = NO; 354 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 355 | CLANG_CXX_LIBRARY = "libc++"; 356 | CLANG_ENABLE_MODULES = YES; 357 | CLANG_ENABLE_OBJC_ARC = YES; 358 | CLANG_WARN_BOOL_CONVERSION = YES; 359 | CLANG_WARN_CONSTANT_CONVERSION = YES; 360 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 361 | CLANG_WARN_EMPTY_BODY = YES; 362 | CLANG_WARN_ENUM_CONVERSION = YES; 363 | CLANG_WARN_INT_CONVERSION = YES; 364 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 365 | CLANG_WARN_UNREACHABLE_CODE = YES; 366 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 367 | CODE_SIGN_IDENTITY = "-"; 368 | COPY_PHASE_STRIP = NO; 369 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 370 | ENABLE_NS_ASSERTIONS = NO; 371 | ENABLE_STRICT_OBJC_MSGSEND = YES; 372 | GCC_C_LANGUAGE_STANDARD = gnu99; 373 | GCC_NO_COMMON_BLOCKS = YES; 374 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 375 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 376 | GCC_WARN_UNDECLARED_SELECTOR = YES; 377 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 378 | GCC_WARN_UNUSED_FUNCTION = YES; 379 | GCC_WARN_UNUSED_VARIABLE = YES; 380 | MACOSX_DEPLOYMENT_TARGET = 10.7; 381 | MTL_ENABLE_DEBUG_INFO = NO; 382 | SDKROOT = macosx; 383 | }; 384 | name = Release; 385 | }; 386 | DC3E20F61B811C820072CDE8 /* Debug */ = { 387 | isa = XCBuildConfiguration; 388 | buildSettings = { 389 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 390 | COMBINE_HIDPI_IMAGES = YES; 391 | INFOPLIST_FILE = "ISStego OS X Example/Info.plist"; 392 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks"; 393 | MACOSX_DEPLOYMENT_TARGET = 10.8; 394 | PRODUCT_NAME = "$(TARGET_NAME)"; 395 | SDKROOT = macosx; 396 | }; 397 | name = Debug; 398 | }; 399 | DC3E20F71B811C820072CDE8 /* Release */ = { 400 | isa = XCBuildConfiguration; 401 | buildSettings = { 402 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 403 | COMBINE_HIDPI_IMAGES = YES; 404 | INFOPLIST_FILE = "ISStego OS X Example/Info.plist"; 405 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks"; 406 | MACOSX_DEPLOYMENT_TARGET = 10.8; 407 | PRODUCT_NAME = "$(TARGET_NAME)"; 408 | SDKROOT = macosx; 409 | }; 410 | name = Release; 411 | }; 412 | DC3E20F91B811C820072CDE8 /* Debug */ = { 413 | isa = XCBuildConfiguration; 414 | buildSettings = { 415 | BUNDLE_LOADER = "$(TEST_HOST)"; 416 | COMBINE_HIDPI_IMAGES = YES; 417 | FRAMEWORK_SEARCH_PATHS = ( 418 | "$(DEVELOPER_FRAMEWORKS_DIR)", 419 | "$(inherited)", 420 | ); 421 | GCC_PREPROCESSOR_DEFINITIONS = ( 422 | "DEBUG=1", 423 | "$(inherited)", 424 | ); 425 | INFOPLIST_FILE = "ISStego OS X ExampleTests/Info.plist"; 426 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks"; 427 | PRODUCT_NAME = "$(TARGET_NAME)"; 428 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/ISStego OS X Example.app/Contents/MacOS/ISStego OS X Example"; 429 | }; 430 | name = Debug; 431 | }; 432 | DC3E20FA1B811C820072CDE8 /* Release */ = { 433 | isa = XCBuildConfiguration; 434 | buildSettings = { 435 | BUNDLE_LOADER = "$(TEST_HOST)"; 436 | COMBINE_HIDPI_IMAGES = YES; 437 | FRAMEWORK_SEARCH_PATHS = ( 438 | "$(DEVELOPER_FRAMEWORKS_DIR)", 439 | "$(inherited)", 440 | ); 441 | INFOPLIST_FILE = "ISStego OS X ExampleTests/Info.plist"; 442 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks"; 443 | PRODUCT_NAME = "$(TARGET_NAME)"; 444 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/ISStego OS X Example.app/Contents/MacOS/ISStego OS X Example"; 445 | }; 446 | name = Release; 447 | }; 448 | /* End XCBuildConfiguration section */ 449 | 450 | /* Begin XCConfigurationList section */ 451 | DC3E20D01B811C820072CDE8 /* Build configuration list for PBXProject "ISStego OS X Example" */ = { 452 | isa = XCConfigurationList; 453 | buildConfigurations = ( 454 | DC3E20F31B811C820072CDE8 /* Debug */, 455 | DC3E20F41B811C820072CDE8 /* Release */, 456 | ); 457 | defaultConfigurationIsVisible = 0; 458 | defaultConfigurationName = Release; 459 | }; 460 | DC3E20F51B811C820072CDE8 /* Build configuration list for PBXNativeTarget "ISStego OS X Example" */ = { 461 | isa = XCConfigurationList; 462 | buildConfigurations = ( 463 | DC3E20F61B811C820072CDE8 /* Debug */, 464 | DC3E20F71B811C820072CDE8 /* Release */, 465 | ); 466 | defaultConfigurationIsVisible = 0; 467 | defaultConfigurationName = Release; 468 | }; 469 | DC3E20F81B811C820072CDE8 /* Build configuration list for PBXNativeTarget "ISStego OS X ExampleTests" */ = { 470 | isa = XCConfigurationList; 471 | buildConfigurations = ( 472 | DC3E20F91B811C820072CDE8 /* Debug */, 473 | DC3E20FA1B811C820072CDE8 /* Release */, 474 | ); 475 | defaultConfigurationIsVisible = 0; 476 | defaultConfigurationName = Release; 477 | }; 478 | /* End XCConfigurationList section */ 479 | }; 480 | rootObject = DC3E20CD1B811C820072CDE8 /* Project object */; 481 | } 482 | -------------------------------------------------------------------------------- /Examples/ISStego OS X Example/ISStego OS X Example.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Examples/ISStego OS X Example/ISStego OS X Example/AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.h 3 | // ISStego OS X Example 4 | // 5 | // Created by Isaac Stevao Sena on 16/08/15. 6 | // Copyright (c) 2015 iSena. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface AppDelegate : NSObject 12 | 13 | 14 | @end 15 | 16 | -------------------------------------------------------------------------------- /Examples/ISStego OS X Example/ISStego OS X Example/AppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.m 3 | // ISStego OS X Example 4 | // 5 | // Created by Isaac Stevao Sena on 16/08/15. 6 | // Copyright (c) 2015 iSena. All rights reserved. 7 | // 8 | 9 | #import "AppDelegate.h" 10 | 11 | @interface AppDelegate () 12 | 13 | @end 14 | 15 | @implementation AppDelegate 16 | 17 | - (void)applicationDidFinishLaunching:(NSNotification *)aNotification { 18 | // Insert code here to initialize your application 19 | } 20 | 21 | - (void)applicationWillTerminate:(NSNotification *)aNotification { 22 | // Insert code here to tear down your application 23 | } 24 | 25 | @end 26 | -------------------------------------------------------------------------------- /Examples/ISStego OS X Example/ISStego OS X Example/Images.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "mac", 5 | "size" : "16x16", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "mac", 10 | "size" : "16x16", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "mac", 15 | "size" : "32x32", 16 | "scale" : "1x" 17 | }, 18 | { 19 | "idiom" : "mac", 20 | "size" : "32x32", 21 | "scale" : "2x" 22 | }, 23 | { 24 | "idiom" : "mac", 25 | "size" : "128x128", 26 | "scale" : "1x" 27 | }, 28 | { 29 | "idiom" : "mac", 30 | "size" : "128x128", 31 | "scale" : "2x" 32 | }, 33 | { 34 | "idiom" : "mac", 35 | "size" : "256x256", 36 | "scale" : "1x" 37 | }, 38 | { 39 | "idiom" : "mac", 40 | "size" : "256x256", 41 | "scale" : "2x" 42 | }, 43 | { 44 | "idiom" : "mac", 45 | "size" : "512x512", 46 | "scale" : "1x" 47 | }, 48 | { 49 | "idiom" : "mac", 50 | "size" : "512x512", 51 | "scale" : "2x" 52 | } 53 | ], 54 | "info" : { 55 | "version" : 1, 56 | "author" : "xcode" 57 | } 58 | } -------------------------------------------------------------------------------- /Examples/ISStego OS X Example/ISStego OS X Example/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIconFile 10 | 11 | CFBundleIdentifier 12 | com.isena.$(PRODUCT_NAME:rfc1034identifier) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | $(PRODUCT_NAME) 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | 1.0 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | 1 25 | LSMinimumSystemVersion 26 | $(MACOSX_DEPLOYMENT_TARGET) 27 | NSHumanReadableCopyright 28 | Copyright © 2015 iSena. All rights reserved. 29 | NSMainStoryboardFile 30 | Main 31 | NSPrincipalClass 32 | NSApplication 33 | 34 | 35 | -------------------------------------------------------------------------------- /Examples/ISStego OS X Example/ISStego OS X Example/ViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.h 3 | // ISStego OS X Example 4 | // 5 | // Created by Isaac Stevao Sena on 16/08/15. 6 | // Copyright (c) 2015 iSena. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface ViewController : NSViewController 12 | 13 | 14 | @end 15 | 16 | -------------------------------------------------------------------------------- /Examples/ISStego OS X Example/ISStego OS X Example/ViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.m 3 | // TestStego 4 | // 5 | // Created by Isaac Stevao Sena on 08/08/15. 6 | // Copyright (c) 2015 Black Bean. All rights reserved. 7 | // 8 | 9 | #import "ViewController.h" 10 | #import "ISSteganographer.h" 11 | 12 | @interface ViewController () 13 | 14 | @property (weak) IBOutlet NSImageView *imageView; 15 | @property (weak) IBOutlet NSButton *buttonEncode; 16 | @property (weak) IBOutlet NSButton *buttonDecode; 17 | @property (weak) IBOutlet NSButton *buttonImage; 18 | @property (unsafe_unretained) IBOutlet NSTextView *textView; 19 | 20 | @end 21 | 22 | @implementation ViewController 23 | 24 | - (void)viewDidLoad { 25 | [super viewDidLoad]; 26 | } 27 | 28 | - (void)setRepresentedObject:(id)representedObject { 29 | [super setRepresentedObject:representedObject]; 30 | } 31 | 32 | #pragma mark - TextView delegate 33 | 34 | - (BOOL)textView:(NSTextView *)textView shouldChangeTextInRanges:(NSArray *)affectedRanges replacementStrings:(NSArray *)replacementStrings { 35 | self.buttonEncode.enabled = (self.buttonImage.transparent) ? YES : NO; 36 | return YES; 37 | } 38 | 39 | #pragma mark - IBActions 40 | 41 | - (IBAction)loadImage:(id)sender { 42 | NSOpenPanel *panel = [NSOpenPanel openPanel]; 43 | [panel setAllowedFileTypes:@[@"jpg", @"png", @"bmp"]]; 44 | 45 | [panel beginWithCompletionHandler:^(NSInteger result){ 46 | if (result == NSFileHandlingPanelOKButton) { 47 | self.imageView.image = [[NSImage alloc] initWithContentsOfURL:panel.URL]; 48 | self.buttonImage.transparent = YES; 49 | 50 | if (self.textView.string.length > 0) { 51 | self.buttonEncode.enabled = YES; 52 | } 53 | 54 | self.buttonDecode.enabled = YES; 55 | } 56 | }]; 57 | } 58 | 59 | - (IBAction)encode:(id)sender { 60 | NSImage *image = self.imageView.image; 61 | 62 | [ISSteganographer hideData:self.textView.string 63 | withImage:image 64 | completionBlock:^(id image, NSError *error) { 65 | dispatch_async(dispatch_get_main_queue(), ^{ 66 | [self saveImage:image]; 67 | }); 68 | }]; 69 | } 70 | 71 | - (IBAction)decode:(id)sender { 72 | NSImage *image = self.imageView.image; 73 | 74 | [ISSteganographer dataFromImage:image 75 | completionBlock:^(NSData *data, NSError *error) { 76 | NSString *string = [[NSString alloc] initWithData:data 77 | encoding:NSUTF8StringEncoding]; 78 | dispatch_async(dispatch_get_main_queue(), ^{ 79 | self.textView.string = string; 80 | }); 81 | }]; 82 | } 83 | 84 | #pragma mark - Saving image 85 | 86 | - (void)saveImage:(NSImage *)image { 87 | NSSavePanel *panel = [NSSavePanel savePanel]; 88 | 89 | [panel setNameFieldStringValue:@"STEGO_IMAGE.png"]; 90 | 91 | [panel beginWithCompletionHandler:^(NSInteger result) { 92 | if (result == NSFileHandlingPanelOKButton) { 93 | [self saveImage:image 94 | file:panel.URL.path]; 95 | self.imageView.image = nil; 96 | self.buttonImage.transparent = NO; 97 | self.buttonEncode.enabled = NO; 98 | self.buttonDecode.enabled = NO; 99 | [self.textView setString:@""]; 100 | } 101 | }]; 102 | } 103 | 104 | - (BOOL)saveImage:(id)image 105 | file:(NSString *)path { 106 | CGImageRef cgRef = [image CGImageForProposedRect:NULL 107 | context:nil 108 | hints:nil]; 109 | 110 | NSBitmapImageRep *newRep = [[NSBitmapImageRep alloc] initWithCGImage:cgRef]; 111 | 112 | [newRep setSize:[image size]]; 113 | 114 | NSData *pngData = [newRep representationUsingType:NSPNGFileType 115 | properties:nil]; 116 | 117 | return [pngData writeToFile:path atomically:YES]; 118 | } 119 | 120 | @end 121 | -------------------------------------------------------------------------------- /Examples/ISStego OS X Example/ISStego OS X Example/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // ISStego OS X Example 4 | // 5 | // Created by Isaac Stevao Sena on 16/08/15. 6 | // Copyright (c) 2015 iSena. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | int main(int argc, const char * argv[]) { 12 | return NSApplicationMain(argc, argv); 13 | } 14 | -------------------------------------------------------------------------------- /Examples/ISStego OS X Example/ISStego OS X ExampleTests/ISStego_OS_X_ExampleTests.m: -------------------------------------------------------------------------------- 1 | // 2 | // ISStego_OS_X_ExampleTests.m 3 | // ISStego OS X ExampleTests 4 | // 5 | // Created by Isaac Stevao Sena on 16/08/15. 6 | // Copyright (c) 2015 iSena. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | 12 | @interface ISStego_OS_X_ExampleTests : XCTestCase 13 | 14 | @end 15 | 16 | @implementation ISStego_OS_X_ExampleTests 17 | 18 | - (void)setUp { 19 | [super setUp]; 20 | // Put setup code here. This method is called before the invocation of each test method in the class. 21 | } 22 | 23 | - (void)tearDown { 24 | // Put teardown code here. This method is called after the invocation of each test method in the class. 25 | [super tearDown]; 26 | } 27 | 28 | - (void)testExample { 29 | // This is an example of a functional test case. 30 | XCTAssert(YES, @"Pass"); 31 | } 32 | 33 | - (void)testPerformanceExample { 34 | // This is an example of a performance test case. 35 | [self measureBlock:^{ 36 | // Put the code you want to measure the time of here. 37 | }]; 38 | } 39 | 40 | @end 41 | -------------------------------------------------------------------------------- /Examples/ISStego OS X Example/ISStego OS X ExampleTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | com.isena.$(PRODUCT_NAME:rfc1034identifier) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /Examples/ISStego iOS Example/ISStego iOS Example.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | DC6668CE1B801F9400EFFB43 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = DC6668CD1B801F9400EFFB43 /* main.m */; }; 11 | DC6668D11B801F9400EFFB43 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = DC6668D01B801F9400EFFB43 /* AppDelegate.m */; }; 12 | DC6668D71B801F9400EFFB43 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = DC6668D51B801F9400EFFB43 /* Main.storyboard */; }; 13 | DC6668D91B801F9400EFFB43 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = DC6668D81B801F9400EFFB43 /* Images.xcassets */; }; 14 | DC6668DC1B801F9400EFFB43 /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = DC6668DA1B801F9400EFFB43 /* LaunchScreen.xib */; }; 15 | DC6668E81B801F9400EFFB43 /* ISStego_iOS_ExampleTests.m in Sources */ = {isa = PBXBuildFile; fileRef = DC6668E71B801F9400EFFB43 /* ISStego_iOS_ExampleTests.m */; }; 16 | DC6668FF1B8020C100EFFB43 /* ISSteganographer.m in Sources */ = {isa = PBXBuildFile; fileRef = DC6668F31B8020C100EFFB43 /* ISSteganographer.m */; }; 17 | DC6669001B8020C100EFFB43 /* ISStegoDecoder.m in Sources */ = {isa = PBXBuildFile; fileRef = DC6668F51B8020C100EFFB43 /* ISStegoDecoder.m */; }; 18 | DC6669011B8020C100EFFB43 /* ISStegoEncoder.m in Sources */ = {isa = PBXBuildFile; fileRef = DC6668F71B8020C100EFFB43 /* ISStegoEncoder.m */; }; 19 | DC6669021B8020C100EFFB43 /* ISPixelUtilities.m in Sources */ = {isa = PBXBuildFile; fileRef = DC6668FA1B8020C100EFFB43 /* ISPixelUtilities.m */; }; 20 | DC6669031B8020C100EFFB43 /* ISStegoDefaults.m in Sources */ = {isa = PBXBuildFile; fileRef = DC6668FC1B8020C100EFFB43 /* ISStegoDefaults.m */; }; 21 | DC6669041B8020C100EFFB43 /* ISStegoUtilities.m in Sources */ = {isa = PBXBuildFile; fileRef = DC6668FE1B8020C100EFFB43 /* ISStegoUtilities.m */; }; 22 | DC66690C1B80210B00EFFB43 /* ExtractViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = DC6669071B80210B00EFFB43 /* ExtractViewController.m */; }; 23 | DC66690D1B80210B00EFFB43 /* InsertViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = DC6669091B80210B00EFFB43 /* InsertViewController.m */; }; 24 | DC66690E1B80210B00EFFB43 /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = DC66690B1B80210B00EFFB43 /* ViewController.m */; }; 25 | DC6669111B80212B00EFFB43 /* ISUtils.m in Sources */ = {isa = PBXBuildFile; fileRef = DC6669101B80212B00EFFB43 /* ISUtils.m */; }; 26 | /* End PBXBuildFile section */ 27 | 28 | /* Begin PBXContainerItemProxy section */ 29 | DC6668E21B801F9400EFFB43 /* PBXContainerItemProxy */ = { 30 | isa = PBXContainerItemProxy; 31 | containerPortal = DC6668C01B801F9400EFFB43 /* Project object */; 32 | proxyType = 1; 33 | remoteGlobalIDString = DC6668C71B801F9400EFFB43; 34 | remoteInfo = "ISStego iOS Example"; 35 | }; 36 | /* End PBXContainerItemProxy section */ 37 | 38 | /* Begin PBXFileReference section */ 39 | DC6668C81B801F9400EFFB43 /* ISStego iOS Example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "ISStego iOS Example.app"; sourceTree = BUILT_PRODUCTS_DIR; }; 40 | DC6668CC1B801F9400EFFB43 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 41 | DC6668CD1B801F9400EFFB43 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 42 | DC6668CF1B801F9400EFFB43 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; 43 | DC6668D01B801F9400EFFB43 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; 44 | DC6668D61B801F9400EFFB43 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 45 | DC6668D81B801F9400EFFB43 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; }; 46 | DC6668DB1B801F9400EFFB43 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/LaunchScreen.xib; sourceTree = ""; }; 47 | DC6668E11B801F9400EFFB43 /* ISStego iOS ExampleTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "ISStego iOS ExampleTests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; }; 48 | DC6668E61B801F9400EFFB43 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 49 | DC6668E71B801F9400EFFB43 /* ISStego_iOS_ExampleTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ISStego_iOS_ExampleTests.m; sourceTree = ""; }; 50 | DC6668F21B8020C100EFFB43 /* ISSteganographer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ISSteganographer.h; sourceTree = ""; }; 51 | DC6668F31B8020C100EFFB43 /* ISSteganographer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ISSteganographer.m; sourceTree = ""; }; 52 | DC6668F41B8020C100EFFB43 /* ISStegoDecoder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ISStegoDecoder.h; sourceTree = ""; }; 53 | DC6668F51B8020C100EFFB43 /* ISStegoDecoder.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ISStegoDecoder.m; sourceTree = ""; }; 54 | DC6668F61B8020C100EFFB43 /* ISStegoEncoder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ISStegoEncoder.h; sourceTree = ""; }; 55 | DC6668F71B8020C100EFFB43 /* ISStegoEncoder.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ISStegoEncoder.m; sourceTree = ""; }; 56 | DC6668F91B8020C100EFFB43 /* ISPixelUtilities.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ISPixelUtilities.h; sourceTree = ""; }; 57 | DC6668FA1B8020C100EFFB43 /* ISPixelUtilities.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ISPixelUtilities.m; sourceTree = ""; }; 58 | DC6668FB1B8020C100EFFB43 /* ISStegoDefaults.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ISStegoDefaults.h; sourceTree = ""; }; 59 | DC6668FC1B8020C100EFFB43 /* ISStegoDefaults.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ISStegoDefaults.m; sourceTree = ""; }; 60 | DC6668FD1B8020C100EFFB43 /* ISStegoUtilities.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ISStegoUtilities.h; sourceTree = ""; }; 61 | DC6668FE1B8020C100EFFB43 /* ISStegoUtilities.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ISStegoUtilities.m; sourceTree = ""; }; 62 | DC6669061B80210B00EFFB43 /* ExtractViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ExtractViewController.h; sourceTree = ""; }; 63 | DC6669071B80210B00EFFB43 /* ExtractViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ExtractViewController.m; sourceTree = ""; }; 64 | DC6669081B80210B00EFFB43 /* InsertViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InsertViewController.h; sourceTree = ""; }; 65 | DC6669091B80210B00EFFB43 /* InsertViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = InsertViewController.m; sourceTree = ""; }; 66 | DC66690A1B80210B00EFFB43 /* ViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = ""; }; 67 | DC66690B1B80210B00EFFB43 /* ViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = ""; }; 68 | DC66690F1B80212B00EFFB43 /* ISUtils.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ISUtils.h; sourceTree = ""; }; 69 | DC6669101B80212B00EFFB43 /* ISUtils.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ISUtils.m; sourceTree = ""; }; 70 | /* End PBXFileReference section */ 71 | 72 | /* Begin PBXFrameworksBuildPhase section */ 73 | DC6668C51B801F9400EFFB43 /* Frameworks */ = { 74 | isa = PBXFrameworksBuildPhase; 75 | buildActionMask = 2147483647; 76 | files = ( 77 | ); 78 | runOnlyForDeploymentPostprocessing = 0; 79 | }; 80 | DC6668DE1B801F9400EFFB43 /* Frameworks */ = { 81 | isa = PBXFrameworksBuildPhase; 82 | buildActionMask = 2147483647; 83 | files = ( 84 | ); 85 | runOnlyForDeploymentPostprocessing = 0; 86 | }; 87 | /* End PBXFrameworksBuildPhase section */ 88 | 89 | /* Begin PBXGroup section */ 90 | DC6668BF1B801F9400EFFB43 = { 91 | isa = PBXGroup; 92 | children = ( 93 | DC6668CA1B801F9400EFFB43 /* ISStego iOS Example */, 94 | DC6668E41B801F9400EFFB43 /* ISStego iOS ExampleTests */, 95 | DC6668C91B801F9400EFFB43 /* Products */, 96 | ); 97 | sourceTree = ""; 98 | }; 99 | DC6668C91B801F9400EFFB43 /* Products */ = { 100 | isa = PBXGroup; 101 | children = ( 102 | DC6668C81B801F9400EFFB43 /* ISStego iOS Example.app */, 103 | DC6668E11B801F9400EFFB43 /* ISStego iOS ExampleTests.xctest */, 104 | ); 105 | name = Products; 106 | sourceTree = ""; 107 | }; 108 | DC6668CA1B801F9400EFFB43 /* ISStego iOS Example */ = { 109 | isa = PBXGroup; 110 | children = ( 111 | DC6668CF1B801F9400EFFB43 /* AppDelegate.h */, 112 | DC6668D01B801F9400EFFB43 /* AppDelegate.m */, 113 | DC66690F1B80212B00EFFB43 /* ISUtils.h */, 114 | DC6669101B80212B00EFFB43 /* ISUtils.m */, 115 | DC6669051B80210B00EFFB43 /* ViewControllers */, 116 | DC6668D51B801F9400EFFB43 /* Main.storyboard */, 117 | DC6668D81B801F9400EFFB43 /* Images.xcassets */, 118 | DC6668DA1B801F9400EFFB43 /* LaunchScreen.xib */, 119 | DC6668F11B8020C100EFFB43 /* ISStego */, 120 | DC6668CB1B801F9400EFFB43 /* Supporting Files */, 121 | ); 122 | path = "ISStego iOS Example"; 123 | sourceTree = ""; 124 | }; 125 | DC6668CB1B801F9400EFFB43 /* Supporting Files */ = { 126 | isa = PBXGroup; 127 | children = ( 128 | DC6668CC1B801F9400EFFB43 /* Info.plist */, 129 | DC6668CD1B801F9400EFFB43 /* main.m */, 130 | ); 131 | name = "Supporting Files"; 132 | sourceTree = ""; 133 | }; 134 | DC6668E41B801F9400EFFB43 /* ISStego iOS ExampleTests */ = { 135 | isa = PBXGroup; 136 | children = ( 137 | DC6668E71B801F9400EFFB43 /* ISStego_iOS_ExampleTests.m */, 138 | DC6668E51B801F9400EFFB43 /* Supporting Files */, 139 | ); 140 | path = "ISStego iOS ExampleTests"; 141 | sourceTree = ""; 142 | }; 143 | DC6668E51B801F9400EFFB43 /* Supporting Files */ = { 144 | isa = PBXGroup; 145 | children = ( 146 | DC6668E61B801F9400EFFB43 /* Info.plist */, 147 | ); 148 | name = "Supporting Files"; 149 | sourceTree = ""; 150 | }; 151 | DC6668F11B8020C100EFFB43 /* ISStego */ = { 152 | isa = PBXGroup; 153 | children = ( 154 | DC6668F21B8020C100EFFB43 /* ISSteganographer.h */, 155 | DC6668F31B8020C100EFFB43 /* ISSteganographer.m */, 156 | DC6668F41B8020C100EFFB43 /* ISStegoDecoder.h */, 157 | DC6668F51B8020C100EFFB43 /* ISStegoDecoder.m */, 158 | DC6668F61B8020C100EFFB43 /* ISStegoEncoder.h */, 159 | DC6668F71B8020C100EFFB43 /* ISStegoEncoder.m */, 160 | DC6668F81B8020C100EFFB43 /* Utilities */, 161 | ); 162 | name = ISStego; 163 | path = ../../../ISStego; 164 | sourceTree = ""; 165 | }; 166 | DC6668F81B8020C100EFFB43 /* Utilities */ = { 167 | isa = PBXGroup; 168 | children = ( 169 | DC6668F91B8020C100EFFB43 /* ISPixelUtilities.h */, 170 | DC6668FA1B8020C100EFFB43 /* ISPixelUtilities.m */, 171 | DC6668FB1B8020C100EFFB43 /* ISStegoDefaults.h */, 172 | DC6668FC1B8020C100EFFB43 /* ISStegoDefaults.m */, 173 | DC6668FD1B8020C100EFFB43 /* ISStegoUtilities.h */, 174 | DC6668FE1B8020C100EFFB43 /* ISStegoUtilities.m */, 175 | ); 176 | path = Utilities; 177 | sourceTree = ""; 178 | }; 179 | DC6669051B80210B00EFFB43 /* ViewControllers */ = { 180 | isa = PBXGroup; 181 | children = ( 182 | DC66690A1B80210B00EFFB43 /* ViewController.h */, 183 | DC66690B1B80210B00EFFB43 /* ViewController.m */, 184 | DC6669081B80210B00EFFB43 /* InsertViewController.h */, 185 | DC6669091B80210B00EFFB43 /* InsertViewController.m */, 186 | DC6669061B80210B00EFFB43 /* ExtractViewController.h */, 187 | DC6669071B80210B00EFFB43 /* ExtractViewController.m */, 188 | ); 189 | path = ViewControllers; 190 | sourceTree = ""; 191 | }; 192 | /* End PBXGroup section */ 193 | 194 | /* Begin PBXNativeTarget section */ 195 | DC6668C71B801F9400EFFB43 /* ISStego iOS Example */ = { 196 | isa = PBXNativeTarget; 197 | buildConfigurationList = DC6668EB1B801F9400EFFB43 /* Build configuration list for PBXNativeTarget "ISStego iOS Example" */; 198 | buildPhases = ( 199 | DC6668C41B801F9400EFFB43 /* Sources */, 200 | DC6668C51B801F9400EFFB43 /* Frameworks */, 201 | DC6668C61B801F9400EFFB43 /* Resources */, 202 | ); 203 | buildRules = ( 204 | ); 205 | dependencies = ( 206 | ); 207 | name = "ISStego iOS Example"; 208 | productName = "ISStego iOS Example"; 209 | productReference = DC6668C81B801F9400EFFB43 /* ISStego iOS Example.app */; 210 | productType = "com.apple.product-type.application"; 211 | }; 212 | DC6668E01B801F9400EFFB43 /* ISStego iOS ExampleTests */ = { 213 | isa = PBXNativeTarget; 214 | buildConfigurationList = DC6668EE1B801F9400EFFB43 /* Build configuration list for PBXNativeTarget "ISStego iOS ExampleTests" */; 215 | buildPhases = ( 216 | DC6668DD1B801F9400EFFB43 /* Sources */, 217 | DC6668DE1B801F9400EFFB43 /* Frameworks */, 218 | DC6668DF1B801F9400EFFB43 /* Resources */, 219 | ); 220 | buildRules = ( 221 | ); 222 | dependencies = ( 223 | DC6668E31B801F9400EFFB43 /* PBXTargetDependency */, 224 | ); 225 | name = "ISStego iOS ExampleTests"; 226 | productName = "ISStego iOS ExampleTests"; 227 | productReference = DC6668E11B801F9400EFFB43 /* ISStego iOS ExampleTests.xctest */; 228 | productType = "com.apple.product-type.bundle.unit-test"; 229 | }; 230 | /* End PBXNativeTarget section */ 231 | 232 | /* Begin PBXProject section */ 233 | DC6668C01B801F9400EFFB43 /* Project object */ = { 234 | isa = PBXProject; 235 | attributes = { 236 | LastUpgradeCheck = 0640; 237 | ORGANIZATIONNAME = iSena; 238 | TargetAttributes = { 239 | DC6668C71B801F9400EFFB43 = { 240 | CreatedOnToolsVersion = 6.4; 241 | }; 242 | DC6668E01B801F9400EFFB43 = { 243 | CreatedOnToolsVersion = 6.4; 244 | TestTargetID = DC6668C71B801F9400EFFB43; 245 | }; 246 | }; 247 | }; 248 | buildConfigurationList = DC6668C31B801F9400EFFB43 /* Build configuration list for PBXProject "ISStego iOS Example" */; 249 | compatibilityVersion = "Xcode 3.2"; 250 | developmentRegion = English; 251 | hasScannedForEncodings = 0; 252 | knownRegions = ( 253 | en, 254 | Base, 255 | ); 256 | mainGroup = DC6668BF1B801F9400EFFB43; 257 | productRefGroup = DC6668C91B801F9400EFFB43 /* Products */; 258 | projectDirPath = ""; 259 | projectRoot = ""; 260 | targets = ( 261 | DC6668C71B801F9400EFFB43 /* ISStego iOS Example */, 262 | DC6668E01B801F9400EFFB43 /* ISStego iOS ExampleTests */, 263 | ); 264 | }; 265 | /* End PBXProject section */ 266 | 267 | /* Begin PBXResourcesBuildPhase section */ 268 | DC6668C61B801F9400EFFB43 /* Resources */ = { 269 | isa = PBXResourcesBuildPhase; 270 | buildActionMask = 2147483647; 271 | files = ( 272 | DC6668D71B801F9400EFFB43 /* Main.storyboard in Resources */, 273 | DC6668DC1B801F9400EFFB43 /* LaunchScreen.xib in Resources */, 274 | DC6668D91B801F9400EFFB43 /* Images.xcassets in Resources */, 275 | ); 276 | runOnlyForDeploymentPostprocessing = 0; 277 | }; 278 | DC6668DF1B801F9400EFFB43 /* Resources */ = { 279 | isa = PBXResourcesBuildPhase; 280 | buildActionMask = 2147483647; 281 | files = ( 282 | ); 283 | runOnlyForDeploymentPostprocessing = 0; 284 | }; 285 | /* End PBXResourcesBuildPhase section */ 286 | 287 | /* Begin PBXSourcesBuildPhase section */ 288 | DC6668C41B801F9400EFFB43 /* Sources */ = { 289 | isa = PBXSourcesBuildPhase; 290 | buildActionMask = 2147483647; 291 | files = ( 292 | DC6669021B8020C100EFFB43 /* ISPixelUtilities.m in Sources */, 293 | DC6669111B80212B00EFFB43 /* ISUtils.m in Sources */, 294 | DC6669031B8020C100EFFB43 /* ISStegoDefaults.m in Sources */, 295 | DC6669011B8020C100EFFB43 /* ISStegoEncoder.m in Sources */, 296 | DC6669001B8020C100EFFB43 /* ISStegoDecoder.m in Sources */, 297 | DC6668D11B801F9400EFFB43 /* AppDelegate.m in Sources */, 298 | DC66690E1B80210B00EFFB43 /* ViewController.m in Sources */, 299 | DC6669041B8020C100EFFB43 /* ISStegoUtilities.m in Sources */, 300 | DC6668CE1B801F9400EFFB43 /* main.m in Sources */, 301 | DC66690D1B80210B00EFFB43 /* InsertViewController.m in Sources */, 302 | DC6668FF1B8020C100EFFB43 /* ISSteganographer.m in Sources */, 303 | DC66690C1B80210B00EFFB43 /* ExtractViewController.m in Sources */, 304 | ); 305 | runOnlyForDeploymentPostprocessing = 0; 306 | }; 307 | DC6668DD1B801F9400EFFB43 /* Sources */ = { 308 | isa = PBXSourcesBuildPhase; 309 | buildActionMask = 2147483647; 310 | files = ( 311 | DC6668E81B801F9400EFFB43 /* ISStego_iOS_ExampleTests.m in Sources */, 312 | ); 313 | runOnlyForDeploymentPostprocessing = 0; 314 | }; 315 | /* End PBXSourcesBuildPhase section */ 316 | 317 | /* Begin PBXTargetDependency section */ 318 | DC6668E31B801F9400EFFB43 /* PBXTargetDependency */ = { 319 | isa = PBXTargetDependency; 320 | target = DC6668C71B801F9400EFFB43 /* ISStego iOS Example */; 321 | targetProxy = DC6668E21B801F9400EFFB43 /* PBXContainerItemProxy */; 322 | }; 323 | /* End PBXTargetDependency section */ 324 | 325 | /* Begin PBXVariantGroup section */ 326 | DC6668D51B801F9400EFFB43 /* Main.storyboard */ = { 327 | isa = PBXVariantGroup; 328 | children = ( 329 | DC6668D61B801F9400EFFB43 /* Base */, 330 | ); 331 | name = Main.storyboard; 332 | sourceTree = ""; 333 | }; 334 | DC6668DA1B801F9400EFFB43 /* LaunchScreen.xib */ = { 335 | isa = PBXVariantGroup; 336 | children = ( 337 | DC6668DB1B801F9400EFFB43 /* Base */, 338 | ); 339 | name = LaunchScreen.xib; 340 | sourceTree = ""; 341 | }; 342 | /* End PBXVariantGroup section */ 343 | 344 | /* Begin XCBuildConfiguration section */ 345 | DC6668E91B801F9400EFFB43 /* Debug */ = { 346 | isa = XCBuildConfiguration; 347 | buildSettings = { 348 | ALWAYS_SEARCH_USER_PATHS = NO; 349 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 350 | CLANG_CXX_LIBRARY = "libc++"; 351 | CLANG_ENABLE_MODULES = YES; 352 | CLANG_ENABLE_OBJC_ARC = YES; 353 | CLANG_WARN_BOOL_CONVERSION = YES; 354 | CLANG_WARN_CONSTANT_CONVERSION = YES; 355 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 356 | CLANG_WARN_EMPTY_BODY = YES; 357 | CLANG_WARN_ENUM_CONVERSION = YES; 358 | CLANG_WARN_INT_CONVERSION = YES; 359 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 360 | CLANG_WARN_UNREACHABLE_CODE = YES; 361 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 362 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 363 | COPY_PHASE_STRIP = NO; 364 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 365 | ENABLE_STRICT_OBJC_MSGSEND = YES; 366 | GCC_C_LANGUAGE_STANDARD = gnu99; 367 | GCC_DYNAMIC_NO_PIC = NO; 368 | GCC_NO_COMMON_BLOCKS = YES; 369 | GCC_OPTIMIZATION_LEVEL = 0; 370 | GCC_PREPROCESSOR_DEFINITIONS = ( 371 | "DEBUG=1", 372 | "$(inherited)", 373 | ); 374 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 375 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 376 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 377 | GCC_WARN_UNDECLARED_SELECTOR = YES; 378 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 379 | GCC_WARN_UNUSED_FUNCTION = YES; 380 | GCC_WARN_UNUSED_VARIABLE = YES; 381 | IPHONEOS_DEPLOYMENT_TARGET = 8.4; 382 | MTL_ENABLE_DEBUG_INFO = YES; 383 | ONLY_ACTIVE_ARCH = YES; 384 | SDKROOT = iphoneos; 385 | }; 386 | name = Debug; 387 | }; 388 | DC6668EA1B801F9400EFFB43 /* Release */ = { 389 | isa = XCBuildConfiguration; 390 | buildSettings = { 391 | ALWAYS_SEARCH_USER_PATHS = NO; 392 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 393 | CLANG_CXX_LIBRARY = "libc++"; 394 | CLANG_ENABLE_MODULES = YES; 395 | CLANG_ENABLE_OBJC_ARC = YES; 396 | CLANG_WARN_BOOL_CONVERSION = YES; 397 | CLANG_WARN_CONSTANT_CONVERSION = YES; 398 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 399 | CLANG_WARN_EMPTY_BODY = YES; 400 | CLANG_WARN_ENUM_CONVERSION = YES; 401 | CLANG_WARN_INT_CONVERSION = YES; 402 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 403 | CLANG_WARN_UNREACHABLE_CODE = YES; 404 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 405 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 406 | COPY_PHASE_STRIP = NO; 407 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 408 | ENABLE_NS_ASSERTIONS = NO; 409 | ENABLE_STRICT_OBJC_MSGSEND = YES; 410 | GCC_C_LANGUAGE_STANDARD = gnu99; 411 | GCC_NO_COMMON_BLOCKS = YES; 412 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 413 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 414 | GCC_WARN_UNDECLARED_SELECTOR = YES; 415 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 416 | GCC_WARN_UNUSED_FUNCTION = YES; 417 | GCC_WARN_UNUSED_VARIABLE = YES; 418 | IPHONEOS_DEPLOYMENT_TARGET = 8.4; 419 | MTL_ENABLE_DEBUG_INFO = NO; 420 | SDKROOT = iphoneos; 421 | VALIDATE_PRODUCT = YES; 422 | }; 423 | name = Release; 424 | }; 425 | DC6668EC1B801F9400EFFB43 /* Debug */ = { 426 | isa = XCBuildConfiguration; 427 | buildSettings = { 428 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 429 | INFOPLIST_FILE = "ISStego iOS Example/Info.plist"; 430 | IPHONEOS_DEPLOYMENT_TARGET = 7.0; 431 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 432 | PRODUCT_NAME = "$(TARGET_NAME)"; 433 | }; 434 | name = Debug; 435 | }; 436 | DC6668ED1B801F9400EFFB43 /* Release */ = { 437 | isa = XCBuildConfiguration; 438 | buildSettings = { 439 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 440 | INFOPLIST_FILE = "ISStego iOS Example/Info.plist"; 441 | IPHONEOS_DEPLOYMENT_TARGET = 7.0; 442 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 443 | PRODUCT_NAME = "$(TARGET_NAME)"; 444 | }; 445 | name = Release; 446 | }; 447 | DC6668EF1B801F9400EFFB43 /* Debug */ = { 448 | isa = XCBuildConfiguration; 449 | buildSettings = { 450 | BUNDLE_LOADER = "$(TEST_HOST)"; 451 | FRAMEWORK_SEARCH_PATHS = ( 452 | "$(SDKROOT)/Developer/Library/Frameworks", 453 | "$(inherited)", 454 | ); 455 | GCC_PREPROCESSOR_DEFINITIONS = ( 456 | "DEBUG=1", 457 | "$(inherited)", 458 | ); 459 | INFOPLIST_FILE = "ISStego iOS ExampleTests/Info.plist"; 460 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 461 | PRODUCT_NAME = "$(TARGET_NAME)"; 462 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/ISStego iOS Example.app/ISStego iOS Example"; 463 | }; 464 | name = Debug; 465 | }; 466 | DC6668F01B801F9400EFFB43 /* Release */ = { 467 | isa = XCBuildConfiguration; 468 | buildSettings = { 469 | BUNDLE_LOADER = "$(TEST_HOST)"; 470 | FRAMEWORK_SEARCH_PATHS = ( 471 | "$(SDKROOT)/Developer/Library/Frameworks", 472 | "$(inherited)", 473 | ); 474 | INFOPLIST_FILE = "ISStego iOS ExampleTests/Info.plist"; 475 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 476 | PRODUCT_NAME = "$(TARGET_NAME)"; 477 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/ISStego iOS Example.app/ISStego iOS Example"; 478 | }; 479 | name = Release; 480 | }; 481 | /* End XCBuildConfiguration section */ 482 | 483 | /* Begin XCConfigurationList section */ 484 | DC6668C31B801F9400EFFB43 /* Build configuration list for PBXProject "ISStego iOS Example" */ = { 485 | isa = XCConfigurationList; 486 | buildConfigurations = ( 487 | DC6668E91B801F9400EFFB43 /* Debug */, 488 | DC6668EA1B801F9400EFFB43 /* Release */, 489 | ); 490 | defaultConfigurationIsVisible = 0; 491 | defaultConfigurationName = Release; 492 | }; 493 | DC6668EB1B801F9400EFFB43 /* Build configuration list for PBXNativeTarget "ISStego iOS Example" */ = { 494 | isa = XCConfigurationList; 495 | buildConfigurations = ( 496 | DC6668EC1B801F9400EFFB43 /* Debug */, 497 | DC6668ED1B801F9400EFFB43 /* Release */, 498 | ); 499 | defaultConfigurationIsVisible = 0; 500 | defaultConfigurationName = Release; 501 | }; 502 | DC6668EE1B801F9400EFFB43 /* Build configuration list for PBXNativeTarget "ISStego iOS ExampleTests" */ = { 503 | isa = XCConfigurationList; 504 | buildConfigurations = ( 505 | DC6668EF1B801F9400EFFB43 /* Debug */, 506 | DC6668F01B801F9400EFFB43 /* Release */, 507 | ); 508 | defaultConfigurationIsVisible = 0; 509 | defaultConfigurationName = Release; 510 | }; 511 | /* End XCConfigurationList section */ 512 | }; 513 | rootObject = DC6668C01B801F9400EFFB43 /* Project object */; 514 | } 515 | -------------------------------------------------------------------------------- /Examples/ISStego iOS Example/ISStego iOS Example/AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.h 3 | // ISStego iOS Example 4 | // 5 | // Created by Isaac Stevao Sena on 15/08/15. 6 | // Copyright (c) 2015 iSena. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface AppDelegate : UIResponder 12 | 13 | @property (strong, nonatomic) UIWindow *window; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /Examples/ISStego iOS Example/ISStego iOS Example/AppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.m 3 | // ISStego iOS Example 4 | // 5 | // Created by Isaac Stevao Sena on 15/08/15. 6 | // Copyright (c) 2015 iSena. All rights reserved. 7 | // 8 | 9 | #import "AppDelegate.h" 10 | 11 | @interface AppDelegate () 12 | 13 | @end 14 | 15 | @implementation AppDelegate 16 | 17 | 18 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { 19 | // Override point for customization after application launch. 20 | return YES; 21 | } 22 | 23 | - (void)applicationWillResignActive:(UIApplication *)application { 24 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. 25 | // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game. 26 | } 27 | 28 | - (void)applicationDidEnterBackground:(UIApplication *)application { 29 | // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. 30 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 31 | } 32 | 33 | - (void)applicationWillEnterForeground:(UIApplication *)application { 34 | // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background. 35 | } 36 | 37 | - (void)applicationDidBecomeActive:(UIApplication *)application { 38 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. 39 | } 40 | 41 | - (void)applicationWillTerminate:(UIApplication *)application { 42 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 43 | } 44 | 45 | @end 46 | -------------------------------------------------------------------------------- /Examples/ISStego iOS Example/ISStego iOS Example/Base.lproj/LaunchScreen.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 20 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /Examples/ISStego iOS Example/ISStego iOS Example/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 33 | 39 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 163 | 164 | 165 | 166 | 167 | 168 | 169 | 170 | 171 | 172 | 173 | 174 | 175 | 176 | 177 | 178 | 179 | 180 | 181 | 182 | 183 | 184 | 185 | 186 | 187 | 188 | 189 | 190 | 191 | 192 | 193 | 194 | 195 | 196 | 197 | 198 | 199 | 200 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 209 | 210 | 211 | 212 | 213 | 214 | 215 | 216 | -------------------------------------------------------------------------------- /Examples/ISStego iOS Example/ISStego iOS Example/ISUtils.h: -------------------------------------------------------------------------------- 1 | // 2 | // ISUtils.h 3 | // Example-ISStego 4 | // 5 | // Created by Isaac Stevao Sena on 26/01/15. 6 | // Copyright (c) 2015 iSena. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | 12 | extern NSString *const STEGO_IMAGE_NAME; 13 | 14 | @interface ISUtils : NSObject 15 | 16 | + (void)showMessage:(NSString*)message; 17 | 18 | @end 19 | -------------------------------------------------------------------------------- /Examples/ISStego iOS Example/ISStego iOS Example/ISUtils.m: -------------------------------------------------------------------------------- 1 | // 2 | // ISUtils.m 3 | // Example-ISStego 4 | // 5 | // Created by Isaac Stevao Sena on 26/01/15. 6 | // Copyright (c) 2015 iSena. All rights reserved. 7 | // 8 | 9 | #import "ISUtils.h" 10 | 11 | NSString *const STEGO_IMAGE_NAME = @"STEGO_IMAGE.png"; 12 | 13 | @implementation ISUtils 14 | 15 | + (void)showMessage:(NSString*)message { 16 | if (![NSThread isMainThread]) { 17 | [self performSelectorOnMainThread:@selector(showMessage:) 18 | withObject:message 19 | waitUntilDone:NO]; 20 | return; 21 | } 22 | 23 | UIAlertView *alertView = [[UIAlertView alloc] initWithTitle:nil 24 | message:message 25 | delegate:nil 26 | cancelButtonTitle:@"ok" 27 | otherButtonTitles:nil]; 28 | [alertView show]; 29 | alertView = nil; 30 | } 31 | 32 | @end 33 | -------------------------------------------------------------------------------- /Examples/ISStego iOS Example/ISStego iOS Example/Images.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "29x29", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "29x29", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "40x40", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "40x40", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "60x60", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "60x60", 31 | "scale" : "3x" 32 | } 33 | ], 34 | "info" : { 35 | "version" : 1, 36 | "author" : "xcode" 37 | } 38 | } -------------------------------------------------------------------------------- /Examples/ISStego iOS Example/ISStego iOS Example/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | com.isena.$(PRODUCT_NAME:rfc1034identifier) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | LSRequiresIPhoneOS 24 | 25 | UILaunchStoryboardName 26 | LaunchScreen 27 | UIMainStoryboardFile 28 | Main 29 | UIRequiredDeviceCapabilities 30 | 31 | armv7 32 | 33 | UISupportedInterfaceOrientations 34 | 35 | UIInterfaceOrientationPortrait 36 | UIInterfaceOrientationLandscapeLeft 37 | UIInterfaceOrientationLandscapeRight 38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /Examples/ISStego iOS Example/ISStego iOS Example/ViewControllers/ExtractViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // ExtractViewController.h 3 | // Example-ISStego 4 | // 5 | // Created by Isaac Stevao Sena on 26/01/15. 6 | // Copyright (c) 2015 iSena. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface ExtractViewController : UIViewController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /Examples/ISStego iOS Example/ISStego iOS Example/ViewControllers/ExtractViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // ExtractViewController.m 3 | // Example-ISStego 4 | // 5 | // Created by Isaac Stevao Sena on 26/01/15. 6 | // Copyright (c) 2015 iSena. All rights reserved. 7 | // 8 | 9 | #import "ExtractViewController.h" 10 | #import "ISUtils.h" 11 | #import "ISSteganographer.h" 12 | 13 | @interface ExtractViewController () 14 | 15 | @property (weak, nonatomic) IBOutlet UIImageView *imageView; 16 | @property (weak, nonatomic) IBOutlet UITextField *textField; 17 | 18 | @end 19 | 20 | @implementation ExtractViewController 21 | 22 | - (void)viewDidLoad { 23 | [super viewDidLoad]; 24 | 25 | [self configureStegoObject]; 26 | } 27 | 28 | - (void)configureStegoObject { 29 | NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); 30 | NSString *filePath = [[paths objectAtIndex:0] stringByAppendingPathComponent:STEGO_IMAGE_NAME]; 31 | 32 | UIImage *image = [UIImage imageWithContentsOfFile:filePath]; 33 | 34 | if (image) { 35 | self.imageView.image = image; 36 | } else { 37 | [ISUtils showMessage:@"No Stego-object!"]; 38 | [self.navigationController popViewControllerAnimated:YES]; 39 | } 40 | } 41 | 42 | - (void)didReceiveMemoryWarning { 43 | [super didReceiveMemoryWarning]; 44 | } 45 | 46 | - (IBAction)extract { 47 | [ISSteganographer dataFromImage:self.imageView.image 48 | completionBlock:^(NSData *data, NSError *error) { 49 | if (error) { 50 | [ISUtils showMessage:[NSString stringWithFormat:@"%@", error]]; 51 | } else { 52 | [self showData:data]; 53 | } 54 | }]; 55 | } 56 | 57 | - (void)showData:(NSData *)data { 58 | NSString *string = [[NSString alloc] initWithData:data 59 | encoding:NSUTF8StringEncoding]; 60 | 61 | [ISUtils showMessage:string]; 62 | } 63 | 64 | @end 65 | -------------------------------------------------------------------------------- /Examples/ISStego iOS Example/ISStego iOS Example/ViewControllers/InsertViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // InsertViewController.h 3 | // Example-ISStego 4 | // 5 | // Created by Isaac Stevao Sena on 26/01/15. 6 | // Copyright (c) 2015 iSena. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface InsertViewController : UIViewController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /Examples/ISStego iOS Example/ISStego iOS Example/ViewControllers/InsertViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // InsertViewController.m 3 | // Example-ISStego 4 | // 5 | // Created by Isaac Stevao Sena on 26/01/15. 6 | // Copyright (c) 2015 iSena. All rights reserved. 7 | // 8 | 9 | #import "InsertViewController.h" 10 | #import "ISUtils.h" 11 | #import "ISSteganographer.h" 12 | 13 | @interface InsertViewController () 14 | 15 | @property (weak, nonatomic) IBOutlet UITextField *textField; 16 | @property (weak, nonatomic) IBOutlet UIImageView *imageView; 17 | 18 | @end 19 | 20 | @implementation InsertViewController 21 | 22 | - (void)viewDidLoad { 23 | [super viewDidLoad]; 24 | 25 | [self showImagePickerViewController]; 26 | } 27 | 28 | - (void)didReceiveMemoryWarning { 29 | [super didReceiveMemoryWarning]; 30 | } 31 | 32 | - (IBAction)insert { 33 | [self.textField resignFirstResponder]; 34 | if (self.imageView.image && [self.textField.text length] > 0) { 35 | [ISSteganographer hideData:self.textField.text 36 | withImage:self.imageView.image 37 | completionBlock:^(UIImage *image, NSError *error) { 38 | if (error) { 39 | [ISUtils showMessage:[NSString stringWithFormat:@"%@", error]]; 40 | } else { 41 | [self saveImage:image]; 42 | } 43 | }]; 44 | } else { 45 | [ISUtils showMessage:@"No image/text..."]; 46 | } 47 | } 48 | 49 | - (void)saveImage:(UIImage *)image { 50 | NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); 51 | NSString *filePath = [[paths objectAtIndex:0] stringByAppendingPathComponent:STEGO_IMAGE_NAME]; 52 | if ([UIImagePNGRepresentation(image) writeToFile:filePath atomically:YES]) { 53 | [ISUtils showMessage:@"your secret have been hidden with success!"]; 54 | 55 | dispatch_async(dispatch_get_main_queue(), ^{ 56 | [self.navigationController popToRootViewControllerAnimated:YES]; 57 | }); 58 | } else { 59 | [ISUtils showMessage:@"Error on saving Stego-object"]; 60 | } 61 | } 62 | 63 | #pragma mark - ImagePickerViewController 64 | 65 | - (void)showImagePickerViewController { 66 | UIImagePickerController *viewController = [[UIImagePickerController alloc] init]; 67 | viewController.delegate = self; 68 | [self presentViewController:viewController animated:YES completion:nil]; 69 | } 70 | 71 | - (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info { 72 | UIImage *image = [info objectForKey:UIImagePickerControllerEditedImage]; 73 | if(!image) image = [info objectForKey:UIImagePickerControllerOriginalImage]; 74 | 75 | if (image) { 76 | self.imageView.image = image; 77 | } 78 | 79 | [self dismissViewControllerAnimated:YES completion:nil]; 80 | } 81 | 82 | - (void)imagePickerControllerDidCancel:(UIImagePickerController *)picker { 83 | [self dismissViewControllerAnimated:YES completion:nil]; 84 | } 85 | 86 | @end 87 | -------------------------------------------------------------------------------- /Examples/ISStego iOS Example/ISStego iOS Example/ViewControllers/ViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.h 3 | // Example-ISStego 4 | // 5 | // Created by Isaac Stevao Sena on 1/18/15. 6 | // Copyright (c) 2015 iSena. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface ViewController : UIViewController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /Examples/ISStego iOS Example/ISStego iOS Example/ViewControllers/ViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.m 3 | // Example-ISStego 4 | // 5 | // Created by Isaac Stevao Sena on 1/18/15. 6 | // Copyright (c) 2015 iSena. All rights reserved. 7 | // 8 | 9 | #import "ViewController.h" 10 | #import "ISUtils.h" 11 | 12 | @interface ViewController () 13 | 14 | @property (weak, nonatomic) IBOutlet UIButton *buttonExtract; 15 | 16 | @end 17 | 18 | @implementation ViewController 19 | 20 | - (void)viewDidLoad { 21 | [super viewDidLoad]; 22 | } 23 | 24 | - (void)viewWillAppear:(BOOL)animated { 25 | [super viewWillAppear:animated]; 26 | 27 | [self.buttonExtract setEnabled:[self hasStegoObject]]; 28 | } 29 | 30 | - (BOOL)hasStegoObject { 31 | NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); 32 | NSString *filePath = [[paths objectAtIndex:0] stringByAppendingPathComponent:STEGO_IMAGE_NAME]; 33 | 34 | UIImage *image = [UIImage imageWithContentsOfFile:filePath]; 35 | 36 | return image ? YES : NO; 37 | } 38 | 39 | - (void)didReceiveMemoryWarning { 40 | [super didReceiveMemoryWarning]; 41 | } 42 | 43 | @end 44 | -------------------------------------------------------------------------------- /Examples/ISStego iOS Example/ISStego iOS Example/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // ISStego iOS Example 4 | // 5 | // Created by Isaac Stevao Sena on 15/08/15. 6 | // Copyright (c) 2015 iSena. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "AppDelegate.h" 11 | 12 | int main(int argc, char * argv[]) { 13 | @autoreleasepool { 14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /Examples/ISStego iOS Example/ISStego iOS ExampleTests/ISStego_iOS_ExampleTests.m: -------------------------------------------------------------------------------- 1 | // 2 | // ISStego_iOS_ExampleTests.m 3 | // ISStego iOS ExampleTests 4 | // 5 | // Created by Isaac Stevao Sena on 15/08/15. 6 | // Copyright (c) 2015 iSena. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | 12 | @interface ISStego_iOS_ExampleTests : XCTestCase 13 | 14 | @end 15 | 16 | @implementation ISStego_iOS_ExampleTests 17 | 18 | - (void)setUp { 19 | [super setUp]; 20 | // Put setup code here. This method is called before the invocation of each test method in the class. 21 | } 22 | 23 | - (void)tearDown { 24 | // Put teardown code here. This method is called after the invocation of each test method in the class. 25 | [super tearDown]; 26 | } 27 | 28 | - (void)testExample { 29 | // This is an example of a functional test case. 30 | XCTAssert(YES, @"Pass"); 31 | } 32 | 33 | - (void)testPerformanceExample { 34 | // This is an example of a performance test case. 35 | [self measureBlock:^{ 36 | // Put the code you want to measure the time of here. 37 | }]; 38 | } 39 | 40 | @end 41 | -------------------------------------------------------------------------------- /Examples/ISStego iOS Example/ISStego iOS ExampleTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | com.isena.$(PRODUCT_NAME:rfc1034identifier) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /Examples/ISStego_OS_X_Example.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isena/ISStego/1dc5f33482578c483c22758a43b22778cda44807/Examples/ISStego_OS_X_Example.gif -------------------------------------------------------------------------------- /Examples/ISStego_iOS_Example.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isena/ISStego/1dc5f33482578c483c22758a43b22778cda44807/Examples/ISStego_iOS_Example.gif -------------------------------------------------------------------------------- /Examples/ORIGINAL_IMAGE.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isena/ISStego/1dc5f33482578c483c22758a43b22778cda44807/Examples/ORIGINAL_IMAGE.png -------------------------------------------------------------------------------- /Examples/STEGO_IMAGE.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isena/ISStego/1dc5f33482578c483c22758a43b22778cda44807/Examples/STEGO_IMAGE.png -------------------------------------------------------------------------------- /ISStego.podspec: -------------------------------------------------------------------------------- 1 | # 2 | # Be sure to run `pod spec lint ISStego.podspec' to ensure this is a 3 | # valid spec and to remove all comments including this before submitting the spec. 4 | # 5 | # To learn more about Podspec attributes see http://docs.cocoapods.org/specification.html 6 | # To see working Podspecs in the CocoaPods repo see https://github.com/CocoaPods/Specs/ 7 | # 8 | 9 | Pod::Spec.new do |s| 10 | 11 | # ――― Spec Metadata ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # 12 | # 13 | # These will help people to find your library, and whilst it 14 | # can feel like a chore to fill in it's definitely to your advantage. The 15 | # summary should be tweet-length, and the description more in depth. 16 | # 17 | 18 | s.name = "ISStego" 19 | s.version = "0.0.2" 20 | s.summary = "Objective-C wrapper for Steganography." 21 | 22 | s.description = <<-DESC 23 | 24 | # ISStego 25 | ISStego is an Objective-C wrapper that can be used to encode and decode secret data with images using digital techniques of steganography, a form of security through obscurity. 26 | 27 | ## What is Steganography? 28 | 29 | Steganography comes from the Greek word and means "covered or protected". Basically it is the practice of hiding important information within a unimportant object. For instance we can hide a message within some image. 30 | 31 | DESC 32 | 33 | s.homepage = "https://github.com/isena/ISStego" 34 | # s.screenshots = "www.example.com/screenshots_1.gif", "www.example.com/screenshots_2.gif" 35 | 36 | 37 | # ――― Spec License ――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # 38 | # 39 | # Licensing your code is important. See http://choosealicense.com for more info. 40 | # CocoaPods will detect a license file if there is a named LICENSE* 41 | # Popular ones are 'MIT', 'BSD' and 'Apache License, Version 2.0'. 42 | # 43 | 44 | # s.license = "MIT" 45 | s.license = { :type => "MIT", :file => "LICENSE.md" } 46 | 47 | 48 | # ――― Author Metadata ――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # 49 | # 50 | # Specify the authors of the library, with email addresses. Email addresses 51 | # of the authors are extracted from the SCM log. E.g. $ git log. CocoaPods also 52 | # accepts just a name if you'd rather not provide an email address. 53 | # 54 | # Specify a social_media_url where others can refer to, for example a twitter 55 | # profile URL. 56 | # 57 | 58 | s.author = { "Isaac Stevao Sena" => "isaac.sena@gmail.com" } 59 | # Or just: s.author = "Isaac Stevao Sena" 60 | # s.authors = { "Isaac Stevao Sena" => "isaac.sena@gmail.com" } 61 | s.social_media_url = "https://twitter.com/isaacstevaosena" 62 | 63 | # ――― Platform Specifics ――――――――――――――――――――――――――――――――――――――――――――――――――――――― # 64 | # 65 | # If this Pod runs only on iOS or OS X, then specify the platform and 66 | # the deployment target. You can optionally include the target after the platform. 67 | # 68 | 69 | # s.platform = :ios 70 | # s.platform = :osx 71 | # s.platform = :ios, "5.0" 72 | 73 | # When using multiple platforms 74 | s.ios.deployment_target = "7.0" 75 | s.osx.deployment_target = "10.7" 76 | 77 | 78 | # ――― Source Location ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # 79 | # 80 | # Specify the location from where the source should be retrieved. 81 | # Supports git, hg, bzr, svn and HTTP. 82 | # 83 | 84 | s.source = { :git => "https://github.com/isena/ISStego.git", :tag => "0.0.2" } 85 | 86 | 87 | # ――― Source Code ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # 88 | # 89 | # CocoaPods is smart about how it includes source code. For source files 90 | # giving a folder will include any swift, h, m, mm, c & cpp files. 91 | # For header files it will include any header in the folder. 92 | # Not including the public_header_files will make all headers public. 93 | # 94 | 95 | s.source_files = "ISStego/**/*.{h,m}" 96 | # s.exclude_files = "ISStegoTests" 97 | 98 | # s.public_header_files = "Classes/**/*.h" 99 | 100 | 101 | # ――― Resources ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # 102 | # 103 | # A list of resources included with the Pod. These are copied into the 104 | # target bundle with a build phase script. Anything else will be cleaned. 105 | # You can preserve files from being cleaned, please don't preserve 106 | # non-essential files like tests, examples and documentation. 107 | # 108 | 109 | # s.resource = "icon.png" 110 | # s.resources = "Resources/*.png" 111 | 112 | # s.preserve_paths = "FilesToSave", "MoreFilesToSave" 113 | 114 | 115 | # ――― Project Linking ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # 116 | # 117 | # Link your library with frameworks, or libraries. Libraries do not include 118 | # the lib prefix of their name. 119 | # 120 | 121 | # s.framework = "SomeFramework" 122 | # s.frameworks = "SomeFramework", "AnotherFramework" 123 | 124 | # s.library = "iconv" 125 | # s.libraries = "iconv", "xml2" 126 | 127 | 128 | # ――― Project Settings ――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # 129 | # 130 | # If your library depends on compiler flags you can set them in the xcconfig hash 131 | # where they will only apply to your library. If you depend on other Podspecs 132 | # you can include multiple dependencies to ensure it works. 133 | 134 | # s.requires_arc = true 135 | 136 | # s.xcconfig = { "HEADER_SEARCH_PATHS" => "$(SDKROOT)/usr/include/libxml2" } 137 | # s.dependency "JSONKit", "~> 1.4" 138 | 139 | end 140 | -------------------------------------------------------------------------------- /ISStego.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 7 | 9 | 10 | 12 | 13 | 15 | 16 | 18 | 19 | 21 | 22 | 24 | 25 | 28 | 30 | 31 | 33 | 34 | 36 | 37 | 39 | 40 | 42 | 43 | 45 | 46 | 47 | 48 | 50 | 51 | 53 | 54 | 56 | 57 | 59 | 60 | 61 | -------------------------------------------------------------------------------- /ISStego/ISSteganographer.h: -------------------------------------------------------------------------------- 1 | // 2 | // ISSteganographer.h 3 | // ISStego 4 | // 5 | // Created by Isaac Stevao Sena on 7/26/15. 6 | // Copyright (c) 2015 iSena. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | /** Objective-C library for Steganography 12 | * 13 | */ 14 | @interface ISSteganographer : NSObject 15 | 16 | typedef void(^ISStegoEncoderCompletionBlock)(id image, NSError *error); 17 | 18 | typedef void(^ISStegoDecoderCompletionBlock)(NSData *data, NSError *error); 19 | 20 | /** 21 | * Encode data into an image. 22 | * 23 | * @param data The data to be encoded/hidden. 24 | * @param image The image used to hide the data. 25 | * @param completionBlock A block object to be executed when operation finishes. This block has no return value and takes two arguments: 26 | * If successful, it will return an stego-object (an image with the hidden data) and the error object returned will be nil. 27 | * If failed, the error object will be populated with the error that caused the encode to fail. 28 | */ 29 | + (void)hideData:(id)data 30 | withImage:(id)image 31 | completionBlock:(ISStegoEncoderCompletionBlock)completionBlock; 32 | 33 | /** 34 | * Decode data from an image. 35 | * 36 | * @param image The image with the data encoded. 37 | * @param completionBlock A block object to be executed when operation finishes. This block has no return value and takes two arguments: 38 | * If successful, it will return the hidden data and the error object returned will be nil. 39 | * If failed, the error object will be populated with the error that caused the decode to fail. 40 | */ 41 | + (void)dataFromImage:(id)image 42 | completionBlock:(ISStegoDecoderCompletionBlock)completionBlock; 43 | 44 | @end 45 | -------------------------------------------------------------------------------- /ISStego/ISSteganographer.m: -------------------------------------------------------------------------------- 1 | // 2 | // ISSteganographer.m 3 | // ISStego 4 | // 5 | // Created by Isaac Stevao Sena on 7/26/15. 6 | // Copyright (c) 2015 iSena. All rights reserved. 7 | // 8 | 9 | #import "ISSteganographer.h" 10 | #import "ISStegoEncoder.h" 11 | #import "ISStegoDecoder.h" 12 | 13 | @implementation ISSteganographer 14 | 15 | + (void)hideData:(id)data 16 | withImage:(id)image 17 | completionBlock:(ISStegoEncoderCompletionBlock)completionBlock { 18 | dispatch_queue_t queue = dispatch_queue_create("steganography.encode.queue", DISPATCH_QUEUE_CONCURRENT); 19 | 20 | dispatch_async(queue, ^{ 21 | @autoreleasepool { 22 | ISStegoEncoder *encoder = [[ISStegoEncoder alloc] init]; 23 | 24 | NSError *error = nil; 25 | 26 | id stegoImage = [encoder stegoImageForImage:image 27 | data:data 28 | error:&error]; 29 | 30 | completionBlock(stegoImage, error); 31 | 32 | encoder = nil; 33 | } 34 | }); 35 | } 36 | 37 | + (void)dataFromImage:(id)image 38 | completionBlock:(ISStegoDecoderCompletionBlock)completionBlock { 39 | dispatch_queue_t queue = dispatch_queue_create("steganography.decode.queue", DISPATCH_QUEUE_CONCURRENT); 40 | 41 | dispatch_async(queue, ^{ 42 | @autoreleasepool { 43 | NSError *error = nil; 44 | 45 | ISStegoDecoder *decoder = [[ISStegoDecoder alloc] init]; 46 | 47 | NSData *data = [decoder decodeStegoImage:image 48 | error:&error]; 49 | 50 | completionBlock(data, error); 51 | 52 | decoder = nil; 53 | } 54 | }); 55 | } 56 | 57 | @end 58 | -------------------------------------------------------------------------------- /ISStego/ISStegoDecoder.h: -------------------------------------------------------------------------------- 1 | // 2 | // ISStegoDecoder.h 3 | // ISStego 4 | // 5 | // Created by Isaac Stevao Sena on 7/25/15. 6 | // Copyright (c) 2015 iSena. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface ISStegoDecoder : NSObject 12 | 13 | - (NSData *)decodeStegoImage:(id)image 14 | error:(NSError **)error; 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /ISStego/ISStegoDecoder.m: -------------------------------------------------------------------------------- 1 | // 2 | // ISStegoDecoder.m 3 | // ISStego 4 | // 5 | // Created by Isaac Stevao Sena on 7/25/15. 6 | // Copyright (c) 2015 iSena. All rights reserved. 7 | // 8 | 9 | #import "ISStegoDecoder.h" 10 | #import "ISStegoUtilities.h" 11 | #import "ISPixelUtilities.h" 12 | #import "ISStegoDefaults.h" 13 | #import 14 | 15 | @interface ISStegoDecoder () 16 | 17 | @property (nonatomic, assign) int currentShift; 18 | @property (nonatomic, assign) int bitsCharacter; 19 | @property (nonatomic, strong) NSString *data; 20 | @property (nonatomic, assign) UInt32 step; 21 | @property (nonatomic, assign) UInt32 length; 22 | 23 | @end 24 | 25 | @implementation ISStegoDecoder 26 | 27 | - (NSData *)decodeStegoImage:(id)image 28 | error:(NSError **)error { 29 | NSParameterAssert(image); 30 | 31 | NSData *data = nil; 32 | 33 | if ([self hasDataInImage:image]) { 34 | NSString *base64 = Substring(self.data, DATA_PREFIX, DATA_SUFFIX); 35 | 36 | data = [[NSData alloc] initWithBase64EncodedString:base64 37 | options:0]; 38 | 39 | } else { 40 | if (error != NULL) { 41 | *error = ErrorForDomainCode(ISStegoErrorDomainCodeNoDataInImage); 42 | } 43 | } 44 | 45 | return data; 46 | } 47 | 48 | - (BOOL)hasDataInImage:(id)image { 49 | CGImageRef inputCGImage = CGImageCreateWithImage(image); 50 | NSUInteger width = CGImageGetWidth(inputCGImage); 51 | NSUInteger height = CGImageGetHeight(inputCGImage); 52 | 53 | NSUInteger size = height * width; 54 | UInt32 *pixels; 55 | pixels = (UInt32 *) calloc(size, sizeof(UInt32)); 56 | 57 | CGColorSpaceRef colorSpace = CGColorSpaceCreateDeviceRGB(); 58 | 59 | CGContextRef context = CGBitmapContextCreate(pixels, 60 | width, 61 | height, 62 | BITS_PER_COMPONENT, 63 | BYTES_PER_PIXEL * width, 64 | colorSpace, 65 | kCGImageAlphaPremultipliedLast | kCGBitmapByteOrder32Big); 66 | 67 | CGContextDrawImage(context, CGRectMake(0, 0, width, height), inputCGImage); 68 | 69 | [self searchDatainPixels:pixels 70 | withSize:size]; 71 | 72 | free(pixels); 73 | CGColorSpaceRelease(colorSpace); 74 | CGContextRelease(context); 75 | CGImageRelease(inputCGImage); 76 | 77 | return [self hasData]; 78 | } 79 | 80 | #pragma mark - Pixel operations 81 | 82 | - (void)searchDatainPixels:(UInt32 *)pixels 83 | withSize:(NSUInteger)size { 84 | [self reset]; 85 | 86 | UInt32 pixelPosition = 0; 87 | 88 | while (pixelPosition < SizeOfInfoLength()) { 89 | [self getDataWithPixel:pixels[pixelPosition]]; 90 | pixelPosition++; 91 | } 92 | 93 | [self reset]; 94 | 95 | int pixelsToHide = self.length * BITS_PER_COMPONENT; 96 | 97 | double ratio = (size - pixelPosition) / pixelsToHide; 98 | 99 | int salt = ratio; 100 | 101 | while (pixelPosition <= size) { 102 | [self getDataWithPixel:pixels[pixelPosition]]; 103 | pixelPosition += salt; 104 | 105 | if (Contains(self.data, DATA_SUFFIX)) { 106 | break; 107 | } 108 | } 109 | } 110 | 111 | - (void)reset { 112 | self.currentShift = INITIAL_SHIFT; 113 | self.bitsCharacter = 0; 114 | } 115 | 116 | - (void)getDataWithPixel:(UInt32)pixel { 117 | [self getDataWithColor:Color(pixel, ColorToStep(self.step))]; 118 | } 119 | 120 | - (void)getDataWithColor:(UInt32)color { 121 | if (self.currentShift == 0) { 122 | UInt32 bit = color & 1; 123 | self.bitsCharacter = (bit << self.currentShift) | self.bitsCharacter; 124 | 125 | if (self.step < SizeOfInfoLength()) { 126 | [self getLength]; 127 | } else { 128 | [self getCharacter]; 129 | } 130 | 131 | self.currentShift = INITIAL_SHIFT; 132 | } else { 133 | UInt32 bit = color & 1; 134 | self.bitsCharacter = (bit << self.currentShift) | self.bitsCharacter; 135 | self.currentShift--; 136 | } 137 | self.step++; 138 | } 139 | 140 | - (void)getLength { 141 | self.length = AddBits(self.length , self.bitsCharacter, self.step % (BITS_PER_COMPONENT - 1)); 142 | 143 | self.bitsCharacter = 0; 144 | } 145 | 146 | - (void)getCharacter { 147 | NSString *character = [NSString stringWithFormat:@"%c", (unsigned int)self.bitsCharacter]; 148 | 149 | self.bitsCharacter = 0; 150 | 151 | if (self.data) { 152 | self.data = [NSString stringWithFormat:@"%@%@", self.data, character]; 153 | } else { 154 | self.data = character; 155 | } 156 | } 157 | 158 | #pragma mark - Validation 159 | 160 | - (BOOL)hasData { 161 | return ([self.data length] > 0 162 | && Contains(self.data, DATA_PREFIX) 163 | && Contains(self.data, DATA_SUFFIX)) ? YES : NO; 164 | } 165 | 166 | @end 167 | -------------------------------------------------------------------------------- /ISStego/ISStegoEncoder.h: -------------------------------------------------------------------------------- 1 | // 2 | // ISStegoEncoder.h 3 | // ISSteganography 4 | // 5 | // Created by Isaac Stevao Sena on 7/25/15. 6 | // Copyright (c) 2015 iSena. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface ISStegoEncoder : NSObject 12 | 13 | - (id)stegoImageForImage:(id)image 14 | data:(id)data 15 | error:(NSError **)error; 16 | 17 | @end 18 | -------------------------------------------------------------------------------- /ISStego/ISStegoEncoder.m: -------------------------------------------------------------------------------- 1 | // 2 | // ISStegoEncoder.m 3 | // ISSteganography 4 | // 5 | // Created by Isaac Stevao Sena on 7/25/15. 6 | // Copyright (c) 2015 iSena. All rights reserved. 7 | // 8 | 9 | #import "ISStegoEncoder.h" 10 | #import "ISStegoUtilities.h" 11 | #import "ISPixelUtilities.h" 12 | #import "ISStegoDefaults.h" 13 | #import 14 | 15 | @interface ISStegoEncoder () 16 | 17 | @property (nonatomic, assign) int currentShift; 18 | @property (nonatomic, assign) int currentCharacter; 19 | @property (nonatomic, assign) UInt32 step; 20 | @property (nonatomic, strong) NSString *currentDataToHide; 21 | 22 | @end 23 | 24 | @implementation ISStegoEncoder 25 | 26 | - (id)stegoImageForImage:(id)image 27 | data:(id)data 28 | error:(NSError **)error { 29 | NSParameterAssert([data isKindOfClass:NSData.class] || [data isKindOfClass:NSString.class]); 30 | NSParameterAssert(image); 31 | 32 | CGImageRef inputCGImage = CGImageCreateWithImage(image); 33 | NSUInteger width = CGImageGetWidth(inputCGImage); 34 | NSUInteger height = CGImageGetHeight(inputCGImage); 35 | 36 | NSUInteger size = height * width; 37 | 38 | UInt32 *pixels; 39 | pixels = (UInt32 *) calloc(size, sizeof(UInt32)); 40 | 41 | id processedImage = nil; 42 | 43 | if (size >= MinPixels()) { 44 | CGColorSpaceRef colorSpace = CGColorSpaceCreateDeviceRGB(); 45 | 46 | CGContextRef context = CGBitmapContextCreate(pixels, 47 | width, 48 | height, 49 | BITS_PER_COMPONENT, 50 | BYTES_PER_PIXEL * width, 51 | colorSpace, 52 | kCGImageAlphaPremultipliedLast | kCGBitmapByteOrder32Big); 53 | 54 | CGContextDrawImage(context, CGRectMake(0, 0, width, height), inputCGImage); 55 | 56 | BOOL success = [self hideData:data 57 | inPixels:pixels 58 | withSize:size 59 | error:error]; 60 | 61 | if (success) { 62 | CGImageRef newCGImage = CGBitmapContextCreateImage(context); 63 | processedImage = Image(newCGImage); 64 | CGImageRelease(newCGImage); 65 | } 66 | 67 | CGColorSpaceRelease(colorSpace); 68 | CGContextRelease(context); 69 | } else { 70 | if (error != NULL) { 71 | *error = ErrorForDomainCode(ISStegoErrorDomainCodeImageTooSmall); 72 | } 73 | } 74 | 75 | CGImageRelease(inputCGImage); 76 | 77 | free(pixels); 78 | 79 | return processedImage; 80 | } 81 | 82 | #pragma mark - Pixel operations 83 | 84 | - (BOOL)hideData:(id)data 85 | inPixels:(UInt32 *)pixels 86 | withSize:(NSUInteger)size 87 | error:(NSError **)error { 88 | BOOL success = NO; 89 | 90 | NSString *messageToHide = [self messageToHide:data]; 91 | 92 | UInt32 dataLength = (UInt32)[messageToHide length]; 93 | 94 | if (dataLength <= INT_MAX 95 | && dataLength * BITS_PER_COMPONENT < size - SizeOfInfoLength()) { 96 | [self reset]; 97 | 98 | NSData *data = [[NSData alloc] initWithBytes:&dataLength 99 | length:BYTES_OF_LENGTH]; 100 | 101 | NSString *lengthDataInfo = [[NSString alloc] initWithData:data 102 | encoding:NSASCIIStringEncoding]; 103 | 104 | UInt32 pixelPosition = 0; 105 | 106 | self.currentDataToHide = lengthDataInfo; 107 | 108 | while (pixelPosition < SizeOfInfoLength()) { 109 | pixels[pixelPosition] = [self newPixel:pixels[pixelPosition]]; 110 | pixelPosition++; 111 | } 112 | 113 | [self reset]; 114 | 115 | NSUInteger pixelsToHide = [messageToHide length] * BITS_PER_COMPONENT; 116 | 117 | self.currentDataToHide = messageToHide; 118 | 119 | double ratio = (size - pixelPosition)/pixelsToHide; 120 | 121 | int salt = ratio; 122 | 123 | while (pixelPosition <= size) { 124 | pixels[pixelPosition] = [self newPixel:pixels[pixelPosition]]; 125 | pixelPosition += salt; 126 | } 127 | 128 | success = YES; 129 | } else { 130 | if (error != NULL) { 131 | *error = ErrorForDomainCode(ISStegoErrorDomainCodeDataTooBig); 132 | } 133 | } 134 | 135 | return success; 136 | } 137 | 138 | - (UInt32)newPixel:(UInt32)pixel { 139 | UInt32 color = [self newColor:pixel]; 140 | self.step++; 141 | return color; 142 | } 143 | 144 | - (UInt32)newColor:(UInt32)color { 145 | if ([self.currentDataToHide length] > self.currentCharacter) { 146 | UInt32 asciiCode = [self.currentDataToHide 147 | characterAtIndex:self.currentCharacter]; 148 | 149 | UInt32 shiftedBits = asciiCode >> self.currentShift; 150 | 151 | if (self.currentShift == 0) { 152 | self.currentShift = INITIAL_SHIFT; 153 | self.currentCharacter++; 154 | 155 | } else { 156 | self.currentShift--; 157 | } 158 | 159 | return NewPixel(color, shiftedBits, ColorToStep(self.step)); 160 | } 161 | 162 | return color; 163 | } 164 | 165 | - (void)reset { 166 | self.currentShift = INITIAL_SHIFT; 167 | 168 | self.currentCharacter = 0; 169 | } 170 | 171 | #pragma mark - Formatting data to hide 172 | 173 | - (NSString *)messageToHide:(id)data { 174 | NSString *base64 = [self base64FromData:data]; 175 | return [NSString stringWithFormat:@"%@%@%@", DATA_PREFIX, base64, DATA_SUFFIX]; 176 | } 177 | 178 | - (NSString *)base64FromData:(id)data { 179 | NSString *base64 = nil; 180 | 181 | if ([data isKindOfClass:NSString.class]) { 182 | NSData *dataOfString = [data dataUsingEncoding:NSUTF8StringEncoding]; 183 | base64 = [dataOfString base64EncodedStringWithOptions:0]; 184 | } else { 185 | base64 = [data base64EncodedStringWithOptions:0]; 186 | } 187 | 188 | return base64; 189 | } 190 | 191 | @end 192 | -------------------------------------------------------------------------------- /ISStego/Utilities/ISPixelUtilities.h: -------------------------------------------------------------------------------- 1 | // 2 | // ISPixelUtilities.h 3 | // ISStego 4 | // 5 | // Created by Isaac Stevao Sena on 8/2/15. 6 | // Copyright (c) 2015 iSena. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | typedef NS_ENUM(NSInteger, ISPixelColor) { 12 | ISPixelColorRed, 13 | ISPixelColorGreen, 14 | ISPixelColorBlue 15 | }; 16 | 17 | UInt32 Color(UInt32 x, int shift); 18 | 19 | UInt32 NewPixel(UInt32 pixel, UInt32 shiftedBits, int shift); 20 | 21 | UInt32 AddBits(UInt32 number1, UInt32 number2, int shift); 22 | 23 | ISPixelColor ColorToStep(UInt32 pixel); 24 | -------------------------------------------------------------------------------- /ISStego/Utilities/ISPixelUtilities.m: -------------------------------------------------------------------------------- 1 | // 2 | // ISPixelUtilities.m 3 | // ISStego 4 | // 5 | // Created by Isaac Stevao Sena on 8/2/15. 6 | // Copyright (c) 2015 iSena. All rights reserved. 7 | // 8 | 9 | #import "ISPixelUtilities.h" 10 | 11 | UInt32 Mask8(UInt32 x) { 12 | return x & 0xFF; 13 | } 14 | 15 | UInt32 Color(UInt32 x, int shift) { 16 | return Mask8(x >> 8 * shift); 17 | } 18 | 19 | UInt32 AddBits(UInt32 number1, UInt32 number2, int shift) { 20 | return (number1 | Mask8(number2) << 8 * shift); 21 | } 22 | 23 | UInt32 NewPixel(UInt32 pixel, UInt32 shiftedBits, int shift) { 24 | UInt32 bit = (shiftedBits & 1) << 8 * shift; 25 | UInt32 colorAndNot = (pixel & ~(1 << 8 * shift)); 26 | return colorAndNot | bit; 27 | } 28 | 29 | ISPixelColor ColorToStep(UInt32 step) { 30 | if (step % 3 == 0) { 31 | return ISPixelColorBlue; 32 | } else if (step % 2 == 0) { 33 | return ISPixelColorGreen; 34 | } else { 35 | return ISPixelColorRed; 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /ISStego/Utilities/ISStegoDefaults.h: -------------------------------------------------------------------------------- 1 | // 2 | // ISStegoDefaults.h 3 | // ISSteganography 4 | // 5 | // Created by Isaac Stevao Sena on 8/2/15. 6 | // Copyright (c) 2015 iSena. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | extern int const INITIAL_SHIFT; 12 | 13 | extern int const BYTES_PER_PIXEL; 14 | extern int const BITS_PER_COMPONENT; 15 | 16 | extern int const BYTES_OF_LENGTH; 17 | 18 | extern NSString *const DATA_PREFIX; 19 | extern NSString *const DATA_SUFFIX; 20 | 21 | int SizeOfInfoLength(); 22 | 23 | int MinPixels(); 24 | -------------------------------------------------------------------------------- /ISStego/Utilities/ISStegoDefaults.m: -------------------------------------------------------------------------------- 1 | // 2 | // ISStegoDefaults.m 3 | // ISSteganography 4 | // 5 | // Created by Isaac Stevao Sena on 8/2/15. 6 | // Copyright (c) 2015 iSena. All rights reserved. 7 | // 8 | 9 | #import "ISStegoDefaults.h" 10 | 11 | int const INITIAL_SHIFT = 7; 12 | 13 | int const BYTES_PER_PIXEL = 4; 14 | int const BITS_PER_COMPONENT = 8; 15 | 16 | int const BYTES_OF_LENGTH = 4; 17 | 18 | NSString *const DATA_PREFIX = @""; 19 | NSString *const DATA_SUFFIX = @""; 20 | 21 | int SizeOfInfoLength() { 22 | return BYTES_OF_LENGTH * BITS_PER_COMPONENT; 23 | } 24 | 25 | int MinPixelsToMessage() { 26 | return (int)([DATA_PREFIX length] + [DATA_SUFFIX length]) * BITS_PER_COMPONENT; 27 | } 28 | 29 | int MinPixels() { 30 | return SizeOfInfoLength() + MinPixelsToMessage(); 31 | } 32 | -------------------------------------------------------------------------------- /ISStego/Utilities/ISStegoUtilities.h: -------------------------------------------------------------------------------- 1 | // 2 | // ISStegoUtilities.h 3 | // ISStego 4 | // 5 | // Created by Isaac Stevao Sena on 26/01/15. 6 | // Copyright (c) 2015 iSena. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | 12 | typedef NS_ENUM(NSInteger, ISStegoErrorDomainCode) { 13 | ISStegoErrorDomainCodeNotDefined, 14 | ISStegoErrorDomainCodeDataTooBig, 15 | ISStegoErrorDomainCodeImageTooSmall, 16 | ISStegoErrorDomainCodeNoDataInImage 17 | }; 18 | 19 | extern NSString *const ISStegoErrorDomain; 20 | 21 | NSError *ErrorForDomainCode(ISStegoErrorDomainCode code); 22 | 23 | BOOL Contains(NSString *string, NSString *substring); 24 | 25 | NSString *Substring(NSString *string, NSString *prefix, NSString *suffix); 26 | 27 | CGImageRef CGImageCreateWithImage(id image); 28 | 29 | id Image(CGImageRef imageRef); 30 | -------------------------------------------------------------------------------- /ISStego/Utilities/ISStegoUtilities.m: -------------------------------------------------------------------------------- 1 | // 2 | // ISStegoUtilities.m 3 | // ISStego 4 | // 5 | // Created by Isaac Stevao Sena on 26/01/15. 6 | // Copyright (c) 2015 iSena. All rights reserved. 7 | // 8 | 9 | #import "ISStegoUtilities.h" 10 | #import "ISStegoDefaults.h" 11 | #import 12 | 13 | #if TARGET_OS_IPHONE 14 | #import 15 | #else 16 | #import 17 | #endif 18 | 19 | NSString *const ISStegoErrorDomain = @"ISStegoErrorDomain"; 20 | 21 | BOOL Contains(NSString *string, NSString *substring) { 22 | if(string 23 | && substring 24 | && !([string rangeOfString:substring 25 | options:NSCaseInsensitiveSearch].length == 0)) { 26 | return YES; 27 | } 28 | 29 | return NO; 30 | } 31 | 32 | NSString *Substring(NSString *string, NSString *prefix, NSString *suffix) { 33 | NSString *substring = nil; 34 | 35 | if (string) { 36 | NSRange prefixRange = [string rangeOfString:prefix]; 37 | 38 | if (prefixRange.location != NSNotFound) { 39 | NSRange suffixRange = [string rangeOfString:suffix]; 40 | 41 | if (suffixRange.location != NSNotFound) { 42 | NSRange range = NSMakeRange(prefixRange.location + prefixRange.length, suffixRange.location - prefixRange.location - prefixRange.length); 43 | if (range.location != NSNotFound) { 44 | substring = [string substringWithRange:range]; 45 | } 46 | } 47 | } 48 | } 49 | 50 | return substring; 51 | } 52 | 53 | NSError *ErrorForDomainCode(ISStegoErrorDomainCode code) { 54 | NSString *description = @"not defined"; 55 | 56 | switch (code) { 57 | case ISStegoErrorDomainCodeDataTooBig: 58 | description = [NSString stringWithFormat:@"The data is too big"]; 59 | break; 60 | 61 | case ISStegoErrorDomainCodeImageTooSmall: 62 | description = [NSString stringWithFormat:@"Image is too small: must have at least %d pixels", MinPixels()]; 63 | break; 64 | 65 | case ISStegoErrorDomainCodeNoDataInImage: 66 | description = @"There is no data in image"; 67 | 68 | default: 69 | break; 70 | } 71 | 72 | NSError *error = [NSError errorWithDomain:ISStegoErrorDomain 73 | code:code 74 | userInfo:@{NSLocalizedDescriptionKey : description}]; 75 | 76 | return error; 77 | } 78 | 79 | CGImageRef CGImageCreateWithImage(id image) { 80 | CGImageRef imageRef = nil; 81 | 82 | #if TARGET_OS_IPHONE 83 | NSCAssert([image isKindOfClass:UIImage.class], @"image must be kind of UIImage"); 84 | imageRef = (CGImageRef)CFRetain([image CGImage]); 85 | #else 86 | NSCAssert([image isKindOfClass:NSImage.class], @"image must be kind of NSImage"); 87 | NSData *data = [image TIFFRepresentation]; 88 | CFDataRef dataRef = (CFDataRef)CFBridgingRetain(data); 89 | CGImageSourceRef source = CGImageSourceCreateWithData(dataRef, NULL); 90 | imageRef = CGImageSourceCreateImageAtIndex(source, 0, NULL); 91 | CFRelease(dataRef); 92 | CFRelease(source); 93 | #endif 94 | 95 | return imageRef; 96 | } 97 | 98 | id Image(CGImageRef imageRef) { 99 | id image = nil; 100 | #if TARGET_OS_IPHONE 101 | image = [UIImage imageWithCGImage:imageRef]; 102 | #else 103 | image = [[NSImage alloc] initWithCGImage:imageRef 104 | size:NSZeroSize]; 105 | #endif 106 | return image; 107 | } 108 | 109 | -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2015 Isaac Stevao Sena (https://github.com/isena) 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # ISStego 2 | 3 | ISStego is an Objective-C library for Mac OS X & iOS that can be used to encode and decode secret data with images using digital techniques of steganography, a form of security through obscurity. 4 | 5 | ## What is Steganography? 6 | 7 | Steganography comes from the Greek words *steganos*, meaning **covered or protected**, and *graphein*, meaning **writing**. Basically it is the practice of hiding important information within a unimportant object. For instance we can hide a message within another message, image, audio or video. 8 | 9 | See example: 10 | 11 | | original Image | Stego image | 12 | | :---: | :---: | 13 | | | | 14 | | Pure image (without hidden information) | Image with a steganographically hidden text (2198 characters). | 15 | 16 | ### [Steganography isEqualTo:Encryption]? 17 | 18 | FALSE. They are completely different. 19 | 20 | The main propose of encryption is to **hide the meaning** of the message by converting ordinary information (*plaintext*) into unintelligible text (*ciphertext*). You can detect if something has been encrypted. 21 | 22 | On the other hand, steganography **hides the information itself** and most people would not detect its presence. 23 | 24 | ### Should we use only steganography? 25 | 26 | Steganography is a form of security but it is not unique. We can (and we recommend using) use other forms of security, such as encryption, in addition to steganography. 27 | 28 | [See also](https://en.wikipedia.org/wiki/Steganography). 29 | 30 | ## How does ISStego work? 31 | 32 | ISStego uses three steganography techniques: 33 | 34 | - **Least Significant Bit (LSB)**: ISStego takes the binary representation of each pixel of image and overwrites the LSB of some bytes with the bits of information using CoreGraphics framework; 35 | - **Sequential Colour Cycle (SCC)**: Each pixel has four bytes of information regarding the colors red, green and blue (RGB) and the channel alpha (transparency). With SCC, ISStego embeds the bits of information, rotating the colour bytes. 36 | - **Uniform Distribution**: The bits of information are distributed uniformly throughout the image. 37 | 38 | ## Installation 39 | 40 | ### Manual 41 | 42 | Drag the [ISStego](ISStego/) folder into your project. 43 | 44 | ###CocoaPods 45 | 46 | Or you can use [CocoaPods](http://cocoapods.org/?q=ISStego). 47 | 48 | ```ruby 49 | pod 'ISStego' 50 | ``` 51 | 52 | 53 | ## Examples 54 | ### OS X 55 | [ISStego OS X Example](Examples/ISStego\ OS\ X\ Example) 56 | 57 | ![exampleOSX](Examples/ISStego_OS_X_Example.gif) 58 | ### iOS 59 | [ISStego iOS Example](Examples/ISStego\ iOS\ Example) 60 | 61 | ![exampleiOS](Examples/ISStego_iOS_Example.gif) 62 | 63 | ## Usage 64 | 65 | Import ISSteganographer 66 | ```objective-c 67 | #import "ISSteganographer.h" 68 | ``` 69 | 70 | ### iOS 71 | 72 | #### Encode 73 | 74 | ```objective-c 75 | NSString *encryptedPassword = @"47151d0e56f8dc"; 76 | 77 | UIImage *image = [UIImage imageNamed:@"imageName"]; 78 | 79 | [ISSteganographer hideData:encryptedPassword 80 | withImage:image 81 | completionBlock:^(id image, NSError *error) { 82 | if (error) { 83 | NSLog(@"error: %@", error); 84 | } else { 85 | [UIImagePNGRepresentation(image) writeToFile:@"PATH_OF_FILE" 86 | atomically:YES]; 87 | } 88 | }]; 89 | ``` 90 | 91 | 92 | #### Decode 93 | 94 | ```objective-c 95 | UIImage *image = [UIImage imageNamed:@"stegoImageName"]; 96 | 97 | [ISSteganographer dataFromImage:image 98 | completionBlock:^(NSData *data, NSError *error) { 99 | if (error) { 100 | NSLog(@"error: %@", error); 101 | } else { 102 | NSString *hiddenData = [[NSString alloc] initWithData:data 103 | encoding:NSUTF8StringEncoding]; 104 | NSLog(@"string: %@", hiddenData); 105 | } 106 | }]; 107 | ``` 108 | ### Mac OS X 109 | 110 | #### Encode 111 | 112 | ```objective-c 113 | NSString *encryptedPassword = @"47151d0e56f8dc"; 114 | 115 | NSImage *image = [NSImage imageNamed:@"imageName"]; 116 | 117 | [ISSteganographer hideData:encryptedPassword 118 | withImage:image 119 | completionBlock:^(id image, NSError *error) { 120 | if (error) { 121 | NSLog(@"error: %@", error); 122 | } else { 123 | CGImageRef cgRef = [image CGImageForProposedRect:NULL 124 | context:nil 125 | hints:nil]; 126 | 127 | NSBitmapImageRep *bitmapImage = [[NSBitmapImageRep alloc] initWithCGImage:cgRef]; 128 | 129 | [bitmapImage setSize:[image size]]; 130 | 131 | NSData *pngData = [bitmapImage representationUsingType:NSPNGFileType 132 | properties:nil]; 133 | 134 | [pngData writeToFile:@"PATH_OF_FILE" 135 | atomically:YES]; 136 | 137 | bitmapImage = nil; 138 | } 139 | }]; 140 | ``` 141 | 142 | #### Decode 143 | 144 | ```objective-c 145 | NSImage *image = [NSImage imageNamed:@"stegoImageName"]; 146 | 147 | [ISSteganographer dataFromImage:image 148 | completionBlock:^(NSData *data, NSError *error) { 149 | if (error) { 150 | NSLog(@"error: %@", error); 151 | } else { 152 | NSString *hiddenData = [[NSString alloc] initWithData:data 153 | encoding:NSUTF8StringEncoding]; 154 | NSLog(@"string: %@", hiddenData); 155 | } 156 | }]; 157 | ``` 158 | 159 | 160 | ## Author 161 | 162 | Isaac Stevao Sena, [@IsaacStevaoSena](https://twitter.com/isaacstevaosena) 163 | 164 | ## License 165 | 166 | ISStego is released under the MIT license. See 167 | [LICENSE.md](https://github.com/isena/ISStego/blob/master/LICENSE.md). 168 | -------------------------------------------------------------------------------- /Tests/ISStego Tests.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 47300C9CA8BE654929ECC90D /* libPods-osx.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 65D5B26287A6868F1618BF06 /* libPods-osx.a */; }; 11 | DC11C2521B80000400851280 /* image.png in Resources */ = {isa = PBXBuildFile; fileRef = DC11C2481B80000400851280 /* image.png */; }; 12 | DC11C2531B80000400851280 /* image_100x100.png in Resources */ = {isa = PBXBuildFile; fileRef = DC11C2491B80000400851280 /* image_100x100.png */; }; 13 | DC11C2541B80000400851280 /* image_8x8.png in Resources */ = {isa = PBXBuildFile; fileRef = DC11C24A1B80000400851280 /* image_8x8.png */; }; 14 | DC11C2551B80000400851280 /* stegoImage.png in Resources */ = {isa = PBXBuildFile; fileRef = DC11C24B1B80000400851280 /* stegoImage.png */; }; 15 | DC11C25A1B80000400851280 /* ISTestUtilities.m in Sources */ = {isa = PBXBuildFile; fileRef = DC11C2511B80000400851280 /* ISTestUtilities.m */; }; 16 | DC11C26F1B80081E00851280 /* ISTestUtilities.m in Sources */ = {isa = PBXBuildFile; fileRef = DC11C2511B80000400851280 /* ISTestUtilities.m */; }; 17 | DC11C2701B800A9C00851280 /* image.png in Resources */ = {isa = PBXBuildFile; fileRef = DC11C2481B80000400851280 /* image.png */; }; 18 | DC11C2711B800A9C00851280 /* image_100x100.png in Resources */ = {isa = PBXBuildFile; fileRef = DC11C2491B80000400851280 /* image_100x100.png */; }; 19 | DC11C2721B800A9C00851280 /* image_8x8.png in Resources */ = {isa = PBXBuildFile; fileRef = DC11C24A1B80000400851280 /* image_8x8.png */; }; 20 | DC11C2731B800A9C00851280 /* stegoImage.png in Resources */ = {isa = PBXBuildFile; fileRef = DC11C24B1B80000400851280 /* stegoImage.png */; }; 21 | DC11C27B1B80197300851280 /* ISSteganographerTest.m in Sources */ = {isa = PBXBuildFile; fileRef = DC11C2781B80197300851280 /* ISSteganographerTest.m */; }; 22 | DC11C27C1B80197300851280 /* ISSteganographerTest.m in Sources */ = {isa = PBXBuildFile; fileRef = DC11C2781B80197300851280 /* ISSteganographerTest.m */; }; 23 | DC11C27D1B80197300851280 /* ISStegoDecoderTest.m in Sources */ = {isa = PBXBuildFile; fileRef = DC11C2791B80197300851280 /* ISStegoDecoderTest.m */; }; 24 | DC11C27E1B80197300851280 /* ISStegoDecoderTest.m in Sources */ = {isa = PBXBuildFile; fileRef = DC11C2791B80197300851280 /* ISStegoDecoderTest.m */; }; 25 | DC11C27F1B80197300851280 /* ISStegoEncoderTest.m in Sources */ = {isa = PBXBuildFile; fileRef = DC11C27A1B80197300851280 /* ISStegoEncoderTest.m */; }; 26 | DC11C2801B80197300851280 /* ISStegoEncoderTest.m in Sources */ = {isa = PBXBuildFile; fileRef = DC11C27A1B80197300851280 /* ISStegoEncoderTest.m */; }; 27 | F4E5EA49BDAADBEC1A374549 /* libPods-ios.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 447BD43FF31173F97684F36B /* libPods-ios.a */; }; 28 | /* End PBXBuildFile section */ 29 | 30 | /* Begin PBXFileReference section */ 31 | 1BD0CD029744EF7DB8241431 /* Pods-osx.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-osx.debug.xcconfig"; path = "Pods/Target Support Files/Pods-osx/Pods-osx.debug.xcconfig"; sourceTree = ""; }; 32 | 28E24689E17A540F7AA11CD6 /* Pods-osx.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-osx.release.xcconfig"; path = "Pods/Target Support Files/Pods-osx/Pods-osx.release.xcconfig"; sourceTree = ""; }; 33 | 447BD43FF31173F97684F36B /* libPods-ios.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-ios.a"; sourceTree = BUILT_PRODUCTS_DIR; }; 34 | 65D5B26287A6868F1618BF06 /* libPods-osx.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-osx.a"; sourceTree = BUILT_PRODUCTS_DIR; }; 35 | 6FD7775ED3FE46637E573BEB /* Pods-ios.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ios.debug.xcconfig"; path = "Pods/Target Support Files/Pods-ios/Pods-ios.debug.xcconfig"; sourceTree = ""; }; 36 | 85D21D806500EE979FE63E4D /* Pods-ios.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ios.release.xcconfig"; path = "Pods/Target Support Files/Pods-ios/Pods-ios.release.xcconfig"; sourceTree = ""; }; 37 | DC11C23C1B7FFEB000851280 /* iOS Tests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "iOS Tests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; }; 38 | DC11C2401B7FFEB000851280 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 39 | DC11C2481B80000400851280 /* image.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = image.png; sourceTree = ""; }; 40 | DC11C2491B80000400851280 /* image_100x100.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = image_100x100.png; sourceTree = ""; }; 41 | DC11C24A1B80000400851280 /* image_8x8.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = image_8x8.png; sourceTree = ""; }; 42 | DC11C24B1B80000400851280 /* stegoImage.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = stegoImage.png; sourceTree = ""; }; 43 | DC11C2501B80000400851280 /* ISTestUtilities.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ISTestUtilities.h; sourceTree = ""; }; 44 | DC11C2511B80000400851280 /* ISTestUtilities.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ISTestUtilities.m; sourceTree = ""; }; 45 | DC11C2651B80030100851280 /* OS X Tests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "OS X Tests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; }; 46 | DC11C2681B80030100851280 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 47 | DC11C2741B800AB700851280 /* libPods-ios.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = "libPods-ios.a"; path = "Pods/../build/Debug-iphoneos/libPods-ios.a"; sourceTree = ""; }; 48 | DC11C2781B80197300851280 /* ISSteganographerTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ISSteganographerTest.m; sourceTree = ""; }; 49 | DC11C2791B80197300851280 /* ISStegoDecoderTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ISStegoDecoderTest.m; sourceTree = ""; }; 50 | DC11C27A1B80197300851280 /* ISStegoEncoderTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ISStegoEncoderTest.m; sourceTree = ""; }; 51 | /* End PBXFileReference section */ 52 | 53 | /* Begin PBXFrameworksBuildPhase section */ 54 | DC11C2391B7FFEB000851280 /* Frameworks */ = { 55 | isa = PBXFrameworksBuildPhase; 56 | buildActionMask = 2147483647; 57 | files = ( 58 | F4E5EA49BDAADBEC1A374549 /* libPods-ios.a in Frameworks */, 59 | ); 60 | runOnlyForDeploymentPostprocessing = 0; 61 | }; 62 | DC11C2621B80030100851280 /* Frameworks */ = { 63 | isa = PBXFrameworksBuildPhase; 64 | buildActionMask = 2147483647; 65 | files = ( 66 | 47300C9CA8BE654929ECC90D /* libPods-osx.a in Frameworks */, 67 | ); 68 | runOnlyForDeploymentPostprocessing = 0; 69 | }; 70 | /* End PBXFrameworksBuildPhase section */ 71 | 72 | /* Begin PBXGroup section */ 73 | DC11C2311B7FFE4900851280 = { 74 | isa = PBXGroup; 75 | children = ( 76 | DC11C2461B80000400851280 /* Tests */, 77 | DC11C23E1B7FFEB000851280 /* iOS Tests */, 78 | DC11C2661B80030100851280 /* OS X Tests */, 79 | DC11C23D1B7FFEB000851280 /* Products */, 80 | FD4441D888C892EEA0B11A0A /* Pods */, 81 | FCC7962576324E692095D222 /* Frameworks */, 82 | ); 83 | sourceTree = ""; 84 | }; 85 | DC11C23D1B7FFEB000851280 /* Products */ = { 86 | isa = PBXGroup; 87 | children = ( 88 | DC11C23C1B7FFEB000851280 /* iOS Tests.xctest */, 89 | DC11C2651B80030100851280 /* OS X Tests.xctest */, 90 | ); 91 | name = Products; 92 | sourceTree = ""; 93 | }; 94 | DC11C23E1B7FFEB000851280 /* iOS Tests */ = { 95 | isa = PBXGroup; 96 | children = ( 97 | DC11C23F1B7FFEB000851280 /* Supporting Files */, 98 | ); 99 | path = "iOS Tests"; 100 | sourceTree = ""; 101 | }; 102 | DC11C23F1B7FFEB000851280 /* Supporting Files */ = { 103 | isa = PBXGroup; 104 | children = ( 105 | DC11C2401B7FFEB000851280 /* Info.plist */, 106 | ); 107 | name = "Supporting Files"; 108 | sourceTree = ""; 109 | }; 110 | DC11C2461B80000400851280 /* Tests */ = { 111 | isa = PBXGroup; 112 | children = ( 113 | DC11C2781B80197300851280 /* ISSteganographerTest.m */, 114 | DC11C2791B80197300851280 /* ISStegoDecoderTest.m */, 115 | DC11C27A1B80197300851280 /* ISStegoEncoderTest.m */, 116 | DC11C2501B80000400851280 /* ISTestUtilities.h */, 117 | DC11C2511B80000400851280 /* ISTestUtilities.m */, 118 | DC11C2471B80000400851280 /* images */, 119 | ); 120 | path = Tests; 121 | sourceTree = ""; 122 | }; 123 | DC11C2471B80000400851280 /* images */ = { 124 | isa = PBXGroup; 125 | children = ( 126 | DC11C2481B80000400851280 /* image.png */, 127 | DC11C2491B80000400851280 /* image_100x100.png */, 128 | DC11C24A1B80000400851280 /* image_8x8.png */, 129 | DC11C24B1B80000400851280 /* stegoImage.png */, 130 | ); 131 | path = images; 132 | sourceTree = ""; 133 | }; 134 | DC11C2661B80030100851280 /* OS X Tests */ = { 135 | isa = PBXGroup; 136 | children = ( 137 | DC11C2671B80030100851280 /* Supporting Files */, 138 | ); 139 | path = "OS X Tests"; 140 | sourceTree = ""; 141 | }; 142 | DC11C2671B80030100851280 /* Supporting Files */ = { 143 | isa = PBXGroup; 144 | children = ( 145 | DC11C2681B80030100851280 /* Info.plist */, 146 | ); 147 | name = "Supporting Files"; 148 | sourceTree = ""; 149 | }; 150 | FCC7962576324E692095D222 /* Frameworks */ = { 151 | isa = PBXGroup; 152 | children = ( 153 | DC11C2741B800AB700851280 /* libPods-ios.a */, 154 | 447BD43FF31173F97684F36B /* libPods-ios.a */, 155 | 65D5B26287A6868F1618BF06 /* libPods-osx.a */, 156 | ); 157 | name = Frameworks; 158 | sourceTree = ""; 159 | }; 160 | FD4441D888C892EEA0B11A0A /* Pods */ = { 161 | isa = PBXGroup; 162 | children = ( 163 | 6FD7775ED3FE46637E573BEB /* Pods-ios.debug.xcconfig */, 164 | 85D21D806500EE979FE63E4D /* Pods-ios.release.xcconfig */, 165 | 1BD0CD029744EF7DB8241431 /* Pods-osx.debug.xcconfig */, 166 | 28E24689E17A540F7AA11CD6 /* Pods-osx.release.xcconfig */, 167 | ); 168 | name = Pods; 169 | sourceTree = ""; 170 | }; 171 | /* End PBXGroup section */ 172 | 173 | /* Begin PBXNativeTarget section */ 174 | DC11C23B1B7FFEB000851280 /* iOS Tests */ = { 175 | isa = PBXNativeTarget; 176 | buildConfigurationList = DC11C2451B7FFEB000851280 /* Build configuration list for PBXNativeTarget "iOS Tests" */; 177 | buildPhases = ( 178 | 78037FC7642D97C3C78666FB /* Check Pods Manifest.lock */, 179 | DC11C2381B7FFEB000851280 /* Sources */, 180 | DC11C2391B7FFEB000851280 /* Frameworks */, 181 | DC11C23A1B7FFEB000851280 /* Resources */, 182 | C6747B90ED30184980E7CB20 /* Copy Pods Resources */, 183 | ); 184 | buildRules = ( 185 | ); 186 | dependencies = ( 187 | ); 188 | name = "iOS Tests"; 189 | productName = "iOS Tests"; 190 | productReference = DC11C23C1B7FFEB000851280 /* iOS Tests.xctest */; 191 | productType = "com.apple.product-type.bundle.unit-test"; 192 | }; 193 | DC11C2641B80030100851280 /* OS X Tests */ = { 194 | isa = PBXNativeTarget; 195 | buildConfigurationList = DC11C26B1B80030100851280 /* Build configuration list for PBXNativeTarget "OS X Tests" */; 196 | buildPhases = ( 197 | 682FAB0E57DD3BF1298096A7 /* Check Pods Manifest.lock */, 198 | DC11C2611B80030100851280 /* Sources */, 199 | DC11C2621B80030100851280 /* Frameworks */, 200 | DC11C2631B80030100851280 /* Resources */, 201 | 6A4FBE44C9C0EA0881372B06 /* Copy Pods Resources */, 202 | ); 203 | buildRules = ( 204 | ); 205 | dependencies = ( 206 | ); 207 | name = "OS X Tests"; 208 | productName = "OS X Tests"; 209 | productReference = DC11C2651B80030100851280 /* OS X Tests.xctest */; 210 | productType = "com.apple.product-type.bundle.unit-test"; 211 | }; 212 | /* End PBXNativeTarget section */ 213 | 214 | /* Begin PBXProject section */ 215 | DC11C2321B7FFE4900851280 /* Project object */ = { 216 | isa = PBXProject; 217 | attributes = { 218 | LastUpgradeCheck = 0640; 219 | TargetAttributes = { 220 | DC11C23B1B7FFEB000851280 = { 221 | CreatedOnToolsVersion = 6.4; 222 | }; 223 | DC11C2641B80030100851280 = { 224 | CreatedOnToolsVersion = 6.4; 225 | }; 226 | }; 227 | }; 228 | buildConfigurationList = DC11C2351B7FFE4900851280 /* Build configuration list for PBXProject "ISStego Tests" */; 229 | compatibilityVersion = "Xcode 3.2"; 230 | developmentRegion = English; 231 | hasScannedForEncodings = 0; 232 | knownRegions = ( 233 | en, 234 | ); 235 | mainGroup = DC11C2311B7FFE4900851280; 236 | productRefGroup = DC11C23D1B7FFEB000851280 /* Products */; 237 | projectDirPath = ""; 238 | projectRoot = ""; 239 | targets = ( 240 | DC11C23B1B7FFEB000851280 /* iOS Tests */, 241 | DC11C2641B80030100851280 /* OS X Tests */, 242 | ); 243 | }; 244 | /* End PBXProject section */ 245 | 246 | /* Begin PBXResourcesBuildPhase section */ 247 | DC11C23A1B7FFEB000851280 /* Resources */ = { 248 | isa = PBXResourcesBuildPhase; 249 | buildActionMask = 2147483647; 250 | files = ( 251 | DC11C2531B80000400851280 /* image_100x100.png in Resources */, 252 | DC11C2521B80000400851280 /* image.png in Resources */, 253 | DC11C2551B80000400851280 /* stegoImage.png in Resources */, 254 | DC11C2541B80000400851280 /* image_8x8.png in Resources */, 255 | ); 256 | runOnlyForDeploymentPostprocessing = 0; 257 | }; 258 | DC11C2631B80030100851280 /* Resources */ = { 259 | isa = PBXResourcesBuildPhase; 260 | buildActionMask = 2147483647; 261 | files = ( 262 | DC11C2711B800A9C00851280 /* image_100x100.png in Resources */, 263 | DC11C2701B800A9C00851280 /* image.png in Resources */, 264 | DC11C2731B800A9C00851280 /* stegoImage.png in Resources */, 265 | DC11C2721B800A9C00851280 /* image_8x8.png in Resources */, 266 | ); 267 | runOnlyForDeploymentPostprocessing = 0; 268 | }; 269 | /* End PBXResourcesBuildPhase section */ 270 | 271 | /* Begin PBXShellScriptBuildPhase section */ 272 | 682FAB0E57DD3BF1298096A7 /* Check Pods Manifest.lock */ = { 273 | isa = PBXShellScriptBuildPhase; 274 | buildActionMask = 2147483647; 275 | files = ( 276 | ); 277 | inputPaths = ( 278 | ); 279 | name = "Check Pods Manifest.lock"; 280 | outputPaths = ( 281 | ); 282 | runOnlyForDeploymentPostprocessing = 0; 283 | shellPath = /bin/sh; 284 | shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [[ $? != 0 ]] ; then\n cat << EOM\nerror: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\nEOM\n exit 1\nfi\n"; 285 | showEnvVarsInLog = 0; 286 | }; 287 | 6A4FBE44C9C0EA0881372B06 /* Copy Pods Resources */ = { 288 | isa = PBXShellScriptBuildPhase; 289 | buildActionMask = 2147483647; 290 | files = ( 291 | ); 292 | inputPaths = ( 293 | ); 294 | name = "Copy Pods Resources"; 295 | outputPaths = ( 296 | ); 297 | runOnlyForDeploymentPostprocessing = 0; 298 | shellPath = /bin/sh; 299 | shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-osx/Pods-osx-resources.sh\"\n"; 300 | showEnvVarsInLog = 0; 301 | }; 302 | 78037FC7642D97C3C78666FB /* Check Pods Manifest.lock */ = { 303 | isa = PBXShellScriptBuildPhase; 304 | buildActionMask = 2147483647; 305 | files = ( 306 | ); 307 | inputPaths = ( 308 | ); 309 | name = "Check Pods Manifest.lock"; 310 | outputPaths = ( 311 | ); 312 | runOnlyForDeploymentPostprocessing = 0; 313 | shellPath = /bin/sh; 314 | shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [[ $? != 0 ]] ; then\n cat << EOM\nerror: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\nEOM\n exit 1\nfi\n"; 315 | showEnvVarsInLog = 0; 316 | }; 317 | C6747B90ED30184980E7CB20 /* Copy Pods Resources */ = { 318 | isa = PBXShellScriptBuildPhase; 319 | buildActionMask = 2147483647; 320 | files = ( 321 | ); 322 | inputPaths = ( 323 | ); 324 | name = "Copy Pods Resources"; 325 | outputPaths = ( 326 | ); 327 | runOnlyForDeploymentPostprocessing = 0; 328 | shellPath = /bin/sh; 329 | shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-ios/Pods-ios-resources.sh\"\n"; 330 | showEnvVarsInLog = 0; 331 | }; 332 | /* End PBXShellScriptBuildPhase section */ 333 | 334 | /* Begin PBXSourcesBuildPhase section */ 335 | DC11C2381B7FFEB000851280 /* Sources */ = { 336 | isa = PBXSourcesBuildPhase; 337 | buildActionMask = 2147483647; 338 | files = ( 339 | DC11C25A1B80000400851280 /* ISTestUtilities.m in Sources */, 340 | DC11C27F1B80197300851280 /* ISStegoEncoderTest.m in Sources */, 341 | DC11C27B1B80197300851280 /* ISSteganographerTest.m in Sources */, 342 | DC11C27D1B80197300851280 /* ISStegoDecoderTest.m in Sources */, 343 | ); 344 | runOnlyForDeploymentPostprocessing = 0; 345 | }; 346 | DC11C2611B80030100851280 /* Sources */ = { 347 | isa = PBXSourcesBuildPhase; 348 | buildActionMask = 2147483647; 349 | files = ( 350 | DC11C2801B80197300851280 /* ISStegoEncoderTest.m in Sources */, 351 | DC11C27C1B80197300851280 /* ISSteganographerTest.m in Sources */, 352 | DC11C26F1B80081E00851280 /* ISTestUtilities.m in Sources */, 353 | DC11C27E1B80197300851280 /* ISStegoDecoderTest.m in Sources */, 354 | ); 355 | runOnlyForDeploymentPostprocessing = 0; 356 | }; 357 | /* End PBXSourcesBuildPhase section */ 358 | 359 | /* Begin XCBuildConfiguration section */ 360 | DC11C2361B7FFE4900851280 /* Debug */ = { 361 | isa = XCBuildConfiguration; 362 | buildSettings = { 363 | IPHONEOS_DEPLOYMENT_TARGET = 7.0; 364 | MACOSX_DEPLOYMENT_TARGET = 10.7; 365 | }; 366 | name = Debug; 367 | }; 368 | DC11C2371B7FFE4900851280 /* Release */ = { 369 | isa = XCBuildConfiguration; 370 | buildSettings = { 371 | IPHONEOS_DEPLOYMENT_TARGET = 7.0; 372 | MACOSX_DEPLOYMENT_TARGET = 10.7; 373 | }; 374 | name = Release; 375 | }; 376 | DC11C2431B7FFEB000851280 /* Debug */ = { 377 | isa = XCBuildConfiguration; 378 | baseConfigurationReference = 6FD7775ED3FE46637E573BEB /* Pods-ios.debug.xcconfig */; 379 | buildSettings = { 380 | ALWAYS_SEARCH_USER_PATHS = NO; 381 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 382 | CLANG_CXX_LIBRARY = "libc++"; 383 | CLANG_ENABLE_MODULES = YES; 384 | CLANG_ENABLE_OBJC_ARC = YES; 385 | CLANG_WARN_BOOL_CONVERSION = YES; 386 | CLANG_WARN_CONSTANT_CONVERSION = YES; 387 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 388 | CLANG_WARN_EMPTY_BODY = YES; 389 | CLANG_WARN_ENUM_CONVERSION = YES; 390 | CLANG_WARN_INT_CONVERSION = YES; 391 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 392 | CLANG_WARN_UNREACHABLE_CODE = YES; 393 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 394 | COPY_PHASE_STRIP = NO; 395 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 396 | ENABLE_STRICT_OBJC_MSGSEND = YES; 397 | FRAMEWORK_SEARCH_PATHS = ( 398 | "$(SDKROOT)/Developer/Library/Frameworks", 399 | "$(inherited)", 400 | ); 401 | GCC_C_LANGUAGE_STANDARD = gnu99; 402 | GCC_DYNAMIC_NO_PIC = NO; 403 | GCC_NO_COMMON_BLOCKS = YES; 404 | GCC_OPTIMIZATION_LEVEL = 0; 405 | GCC_PREPROCESSOR_DEFINITIONS = ( 406 | "DEBUG=1", 407 | "$(inherited)", 408 | ); 409 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 410 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 411 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 412 | GCC_WARN_UNDECLARED_SELECTOR = YES; 413 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 414 | GCC_WARN_UNUSED_FUNCTION = YES; 415 | GCC_WARN_UNUSED_VARIABLE = YES; 416 | INFOPLIST_FILE = "iOS Tests/Info.plist"; 417 | IPHONEOS_DEPLOYMENT_TARGET = 8.4; 418 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 419 | MTL_ENABLE_DEBUG_INFO = YES; 420 | ONLY_ACTIVE_ARCH = YES; 421 | PRODUCT_NAME = "$(TARGET_NAME)"; 422 | SDKROOT = iphoneos; 423 | }; 424 | name = Debug; 425 | }; 426 | DC11C2441B7FFEB000851280 /* Release */ = { 427 | isa = XCBuildConfiguration; 428 | baseConfigurationReference = 85D21D806500EE979FE63E4D /* Pods-ios.release.xcconfig */; 429 | buildSettings = { 430 | ALWAYS_SEARCH_USER_PATHS = NO; 431 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 432 | CLANG_CXX_LIBRARY = "libc++"; 433 | CLANG_ENABLE_MODULES = YES; 434 | CLANG_ENABLE_OBJC_ARC = YES; 435 | CLANG_WARN_BOOL_CONVERSION = YES; 436 | CLANG_WARN_CONSTANT_CONVERSION = YES; 437 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 438 | CLANG_WARN_EMPTY_BODY = YES; 439 | CLANG_WARN_ENUM_CONVERSION = YES; 440 | CLANG_WARN_INT_CONVERSION = YES; 441 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 442 | CLANG_WARN_UNREACHABLE_CODE = YES; 443 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 444 | COPY_PHASE_STRIP = NO; 445 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 446 | ENABLE_NS_ASSERTIONS = NO; 447 | ENABLE_STRICT_OBJC_MSGSEND = YES; 448 | FRAMEWORK_SEARCH_PATHS = ( 449 | "$(SDKROOT)/Developer/Library/Frameworks", 450 | "$(inherited)", 451 | ); 452 | GCC_C_LANGUAGE_STANDARD = gnu99; 453 | GCC_NO_COMMON_BLOCKS = YES; 454 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 455 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 456 | GCC_WARN_UNDECLARED_SELECTOR = YES; 457 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 458 | GCC_WARN_UNUSED_FUNCTION = YES; 459 | GCC_WARN_UNUSED_VARIABLE = YES; 460 | INFOPLIST_FILE = "iOS Tests/Info.plist"; 461 | IPHONEOS_DEPLOYMENT_TARGET = 8.4; 462 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 463 | MTL_ENABLE_DEBUG_INFO = NO; 464 | PRODUCT_NAME = "$(TARGET_NAME)"; 465 | SDKROOT = iphoneos; 466 | VALIDATE_PRODUCT = YES; 467 | }; 468 | name = Release; 469 | }; 470 | DC11C26C1B80030100851280 /* Debug */ = { 471 | isa = XCBuildConfiguration; 472 | baseConfigurationReference = 1BD0CD029744EF7DB8241431 /* Pods-osx.debug.xcconfig */; 473 | buildSettings = { 474 | ALWAYS_SEARCH_USER_PATHS = NO; 475 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 476 | CLANG_CXX_LIBRARY = "libc++"; 477 | CLANG_ENABLE_MODULES = YES; 478 | CLANG_ENABLE_OBJC_ARC = YES; 479 | CLANG_WARN_BOOL_CONVERSION = YES; 480 | CLANG_WARN_CONSTANT_CONVERSION = YES; 481 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 482 | CLANG_WARN_EMPTY_BODY = YES; 483 | CLANG_WARN_ENUM_CONVERSION = YES; 484 | CLANG_WARN_INT_CONVERSION = YES; 485 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 486 | CLANG_WARN_UNREACHABLE_CODE = YES; 487 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 488 | COMBINE_HIDPI_IMAGES = YES; 489 | COPY_PHASE_STRIP = NO; 490 | DEBUG_INFORMATION_FORMAT = dwarf; 491 | ENABLE_STRICT_OBJC_MSGSEND = YES; 492 | FRAMEWORK_SEARCH_PATHS = ( 493 | "$(DEVELOPER_FRAMEWORKS_DIR)", 494 | "$(inherited)", 495 | ); 496 | GCC_C_LANGUAGE_STANDARD = gnu99; 497 | GCC_DYNAMIC_NO_PIC = NO; 498 | GCC_NO_COMMON_BLOCKS = YES; 499 | GCC_OPTIMIZATION_LEVEL = 0; 500 | GCC_PREPROCESSOR_DEFINITIONS = ( 501 | "DEBUG=1", 502 | "$(inherited)", 503 | ); 504 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 505 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 506 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 507 | GCC_WARN_UNDECLARED_SELECTOR = YES; 508 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 509 | GCC_WARN_UNUSED_FUNCTION = YES; 510 | GCC_WARN_UNUSED_VARIABLE = YES; 511 | INFOPLIST_FILE = "OS X Tests/Info.plist"; 512 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks"; 513 | LIBRARY_SEARCH_PATHS = "$(inherited)"; 514 | MACOSX_DEPLOYMENT_TARGET = 10.10; 515 | MTL_ENABLE_DEBUG_INFO = YES; 516 | ONLY_ACTIVE_ARCH = YES; 517 | PRODUCT_NAME = "$(TARGET_NAME)"; 518 | SDKROOT = macosx; 519 | }; 520 | name = Debug; 521 | }; 522 | DC11C26D1B80030100851280 /* Release */ = { 523 | isa = XCBuildConfiguration; 524 | baseConfigurationReference = 28E24689E17A540F7AA11CD6 /* Pods-osx.release.xcconfig */; 525 | buildSettings = { 526 | ALWAYS_SEARCH_USER_PATHS = NO; 527 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 528 | CLANG_CXX_LIBRARY = "libc++"; 529 | CLANG_ENABLE_MODULES = YES; 530 | CLANG_ENABLE_OBJC_ARC = YES; 531 | CLANG_WARN_BOOL_CONVERSION = YES; 532 | CLANG_WARN_CONSTANT_CONVERSION = YES; 533 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 534 | CLANG_WARN_EMPTY_BODY = YES; 535 | CLANG_WARN_ENUM_CONVERSION = YES; 536 | CLANG_WARN_INT_CONVERSION = YES; 537 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 538 | CLANG_WARN_UNREACHABLE_CODE = YES; 539 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 540 | COMBINE_HIDPI_IMAGES = YES; 541 | COPY_PHASE_STRIP = NO; 542 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 543 | ENABLE_NS_ASSERTIONS = NO; 544 | ENABLE_STRICT_OBJC_MSGSEND = YES; 545 | FRAMEWORK_SEARCH_PATHS = ( 546 | "$(DEVELOPER_FRAMEWORKS_DIR)", 547 | "$(inherited)", 548 | ); 549 | GCC_C_LANGUAGE_STANDARD = gnu99; 550 | GCC_NO_COMMON_BLOCKS = YES; 551 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 552 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 553 | GCC_WARN_UNDECLARED_SELECTOR = YES; 554 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 555 | GCC_WARN_UNUSED_FUNCTION = YES; 556 | GCC_WARN_UNUSED_VARIABLE = YES; 557 | INFOPLIST_FILE = "OS X Tests/Info.plist"; 558 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks"; 559 | LIBRARY_SEARCH_PATHS = "$(inherited)"; 560 | MACOSX_DEPLOYMENT_TARGET = 10.10; 561 | MTL_ENABLE_DEBUG_INFO = NO; 562 | PRODUCT_NAME = "$(TARGET_NAME)"; 563 | SDKROOT = macosx; 564 | }; 565 | name = Release; 566 | }; 567 | /* End XCBuildConfiguration section */ 568 | 569 | /* Begin XCConfigurationList section */ 570 | DC11C2351B7FFE4900851280 /* Build configuration list for PBXProject "ISStego Tests" */ = { 571 | isa = XCConfigurationList; 572 | buildConfigurations = ( 573 | DC11C2361B7FFE4900851280 /* Debug */, 574 | DC11C2371B7FFE4900851280 /* Release */, 575 | ); 576 | defaultConfigurationIsVisible = 0; 577 | defaultConfigurationName = Release; 578 | }; 579 | DC11C2451B7FFEB000851280 /* Build configuration list for PBXNativeTarget "iOS Tests" */ = { 580 | isa = XCConfigurationList; 581 | buildConfigurations = ( 582 | DC11C2431B7FFEB000851280 /* Debug */, 583 | DC11C2441B7FFEB000851280 /* Release */, 584 | ); 585 | defaultConfigurationIsVisible = 0; 586 | defaultConfigurationName = Release; 587 | }; 588 | DC11C26B1B80030100851280 /* Build configuration list for PBXNativeTarget "OS X Tests" */ = { 589 | isa = XCConfigurationList; 590 | buildConfigurations = ( 591 | DC11C26C1B80030100851280 /* Debug */, 592 | DC11C26D1B80030100851280 /* Release */, 593 | ); 594 | defaultConfigurationIsVisible = 0; 595 | defaultConfigurationName = Release; 596 | }; 597 | /* End XCConfigurationList section */ 598 | }; 599 | rootObject = DC11C2321B7FFE4900851280 /* Project object */; 600 | } 601 | -------------------------------------------------------------------------------- /Tests/OS X Tests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | com.isena.$(PRODUCT_NAME:rfc1034identifier) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /Tests/Podfile: -------------------------------------------------------------------------------- 1 | source 'https://github.com/CocoaPods/Specs' 2 | 3 | xcodeproj 'ISStego Tests' 4 | workspace '../ISStego' 5 | inhibit_all_warnings! 6 | 7 | def import_pods 8 | pod 'ISStego', :path => '../' 9 | end 10 | 11 | target :ios do 12 | platform :ios, '7.0' 13 | link_with 'iOS Tests' 14 | import_pods 15 | end 16 | 17 | target :osx do 18 | platform :osx, '10.9' 19 | link_with 'OS X Tests' 20 | import_pods 21 | end 22 | -------------------------------------------------------------------------------- /Tests/Podfile.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - ISStego (0.0.1) 3 | 4 | DEPENDENCIES: 5 | - ISStego (from `../`) 6 | 7 | EXTERNAL SOURCES: 8 | ISStego: 9 | :path: "../" 10 | 11 | SPEC CHECKSUMS: 12 | ISStego: dcd1129b553e430547d91b4bafa94770f65dc9a9 13 | 14 | COCOAPODS: 0.38.2 15 | -------------------------------------------------------------------------------- /Tests/Tests/ISSteganographerTest.m: -------------------------------------------------------------------------------- 1 | // 2 | // ISSteganographer.m 3 | // ISStego 4 | // 5 | // Created by Isaac Stevao Sena on 7/27/15. 6 | // Copyright (c) 2015 Black Bean. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "ISTestUtilities.h" 11 | #import "ISSteganographer.h" 12 | #import "ISStegoDecoder.h" 13 | 14 | @interface ISSteganographerTest : XCTestCase 15 | 16 | @end 17 | 18 | @implementation ISSteganographerTest 19 | 20 | #pragma mark - Decode 21 | 22 | - (void)testDecodeImage { 23 | id image = [ISTestUtilities imageNamed:STEGO_IMAGE_NAME]; 24 | 25 | XCTAssertNotNil(image); 26 | 27 | XCTestExpectation *expectation = [self expectationWithDescription:@"testDecodeImage Expectation"]; 28 | 29 | [ISSteganographer dataFromImage:image 30 | completionBlock:^(NSData *data, NSError *error) { 31 | XCTAssertNil(error); 32 | 33 | XCTAssertNotNil(data); 34 | 35 | NSString *string = [[NSString alloc] initWithData:data 36 | encoding:NSUTF8StringEncoding]; 37 | 38 | XCTAssertTrue([string isEqual:TEXT_TO_HIDE], @"%@ is not equal to %@", string, TEXT_TO_HIDE); 39 | 40 | [expectation fulfill]; 41 | }]; 42 | 43 | [self waitForExpectationsWithTimeout:TIME_EXPECTATION 44 | handler:^(NSError *error) { 45 | if (error) { 46 | NSLog(@"Timeout Error: %@", error); 47 | } 48 | }]; 49 | } 50 | 51 | #pragma mark - Encode 52 | 53 | - (void)testEncode { 54 | id image = [ISTestUtilities imageNamed:ORIGINAL_IMAGE_NAME]; 55 | 56 | XCTAssertNotNil(image); 57 | 58 | XCTestExpectation *expectation = [self expectationWithDescription:@"testEncode Expectation"]; 59 | 60 | [ISSteganographer hideData:TEXT_TO_HIDE 61 | withImage:image 62 | completionBlock:^(id image, NSError *error) { 63 | XCTAssertNil(error); 64 | 65 | XCTAssertNotNil(image); 66 | 67 | [expectation fulfill]; 68 | }]; 69 | 70 | [self waitForExpectationsWithTimeout:TIME_EXPECTATION 71 | handler:^(NSError *error) { 72 | if (error) { 73 | NSLog(@"Timeout Error: %@", error); 74 | } 75 | }]; 76 | } 77 | 78 | - (void)testEncodeError { 79 | id image = [ISTestUtilities imageNamed:ORIGINAL_IMAGE_NAME]; 80 | 81 | XCTAssertNotNil(image); 82 | 83 | XCTestExpectation *expectation = [self expectationWithDescription:@"EncodeData Expectation"]; 84 | 85 | [ISSteganographer hideData:BIG_TEXT_TO_HIDE 86 | withImage:image 87 | completionBlock:^(id image, NSError *error) { 88 | XCTAssertNotNil(error); 89 | 90 | XCTAssertNil(image); 91 | 92 | [expectation fulfill]; 93 | }]; 94 | 95 | [self waitForExpectationsWithTimeout:TIME_EXPECTATION 96 | handler:^(NSError *error) { 97 | if (error) { 98 | NSLog(@"Timeout Error: %@", error); 99 | } 100 | }]; 101 | } 102 | 103 | #pragma mark - Encode/Decode 104 | 105 | - (void)testEncodeDecode { 106 | id originalImage = [ISTestUtilities imageNamed:ORIGINAL_IMAGE_NAME]; 107 | 108 | XCTAssertNotNil(originalImage); 109 | 110 | XCTestExpectation *expectation = [self expectationWithDescription:@"testEncodeDecode Expectation"]; 111 | 112 | [ISSteganographer hideData:TEXT_TO_HIDE 113 | withImage:originalImage 114 | completionBlock:^(id image, NSError *error) { 115 | XCTAssertNil(error); 116 | 117 | XCTAssertNotNil(image); 118 | 119 | [ISSteganographer dataFromImage:image 120 | completionBlock:^(NSData *data, NSError *error) { 121 | XCTAssertNil(error); 122 | 123 | XCTAssertNotNil(data); 124 | 125 | NSString *string = [[NSString alloc] initWithData:data 126 | encoding:NSUTF8StringEncoding]; 127 | 128 | XCTAssertTrue([string isEqual:TEXT_TO_HIDE], @"%@ is not equal to %@", string, TEXT_TO_HIDE); 129 | 130 | [expectation fulfill]; 131 | }]; 132 | }]; 133 | 134 | [self waitForExpectationsWithTimeout:TIME_EXPECTATION 135 | handler:^(NSError *error) { 136 | if (error) { 137 | NSLog(@"Timeout Error: %@", error); 138 | } 139 | }]; 140 | } 141 | 142 | - (void)testAEncodeSaveDecode { 143 | id originalImage = [ISTestUtilities imageNamed:ORIGINAL_IMAGE_NAME]; 144 | 145 | XCTAssertNotNil(originalImage); 146 | 147 | XCTestExpectation *expectation = [self expectationWithDescription:@"testEncodeDecode Expectation"]; 148 | 149 | [ISSteganographer hideData:TEXT_TO_HIDE 150 | withImage:originalImage 151 | completionBlock:^(id image, NSError *error) { 152 | XCTAssertNil(error); 153 | 154 | XCTAssertNotNil(image); 155 | 156 | // saving image 157 | NSString *filePath = [ISTestUtilities filePathToFilename:STEGO_IMAGE_TO_SAVE_NAME 158 | type:type()]; 159 | 160 | XCTAssertTrue([ISTestUtilities saveImage:image 161 | file:filePath]); 162 | 163 | // getting same image from disk 164 | id stegoImage = [ISTestUtilities imageToFilepath:filePath]; 165 | 166 | XCTAssertNotNil(stegoImage); 167 | 168 | [ISSteganographer dataFromImage:stegoImage 169 | completionBlock:^(NSData *data, NSError *error) { 170 | XCTAssertNil(error); 171 | 172 | XCTAssertNotNil(data); 173 | 174 | NSString *string = [[NSString alloc] initWithData:data 175 | encoding:NSUTF8StringEncoding]; 176 | 177 | XCTAssertTrue([string isEqual:TEXT_TO_HIDE], @"%@ is not equal to %@", string, TEXT_TO_HIDE); 178 | 179 | [expectation fulfill]; 180 | }]; 181 | }]; 182 | 183 | [self waitForExpectationsWithTimeout:TIME_EXPECTATION 184 | handler:^(NSError *error) { 185 | if (error) { 186 | NSLog(@"Timeout Error: %@", error); 187 | } 188 | }]; 189 | } 190 | 191 | @end 192 | -------------------------------------------------------------------------------- /Tests/Tests/ISStegoDecoderTest.m: -------------------------------------------------------------------------------- 1 | // 2 | // ISStegoDecoderTest.m 3 | // ISSteganography 4 | // 5 | // Created by Isaac Stevao Sena on 7/25/15. 6 | // Copyright (c) 2015 Black Bean. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "ISStegoDecoder.h" 11 | #import "ISTestUtilities.h" 12 | 13 | @interface ISStegoDecoderTest : XCTestCase 14 | 15 | @end 16 | 17 | @implementation ISStegoDecoderTest 18 | 19 | - (void)testDecodeStegoImage { 20 | id image = [ISTestUtilities imageNamed:STEGO_IMAGE_NAME]; 21 | 22 | XCTAssertNotNil(image, @"image is nil"); 23 | 24 | ISStegoDecoder *decoder = [[ISStegoDecoder alloc] init]; 25 | 26 | NSError *error = nil; 27 | 28 | NSData *data = [decoder decodeStegoImage:image 29 | error:&error]; 30 | 31 | NSString *string = [[NSString alloc] initWithData:data 32 | encoding:NSUTF8StringEncoding]; 33 | 34 | XCTAssertTrue([string isEqual:TEXT_TO_HIDE], @"%@ is not equal to %@", string, TEXT_TO_HIDE); 35 | 36 | decoder = nil; 37 | } 38 | 39 | #pragma mark - Exception 40 | 41 | - (void)testNilImage { 42 | ISStegoDecoder *decoder = [[ISStegoDecoder alloc] init]; 43 | 44 | NSError *error = nil; 45 | 46 | XCTAssertThrows([decoder decodeStegoImage:nil 47 | error:&error]); 48 | } 49 | 50 | @end 51 | -------------------------------------------------------------------------------- /Tests/Tests/ISStegoEncoderTest.m: -------------------------------------------------------------------------------- 1 | // 2 | // ISStegoEncoderTest.m 3 | // ISSteganography 4 | // 5 | // Created by Isaac Stevao Sena on 7/25/15. 6 | // Copyright (c) 2015 Black Bean. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "ISStegoEncoder.h" 11 | #import "ISTestUtilities.h" 12 | 13 | @interface ISStegoEncoderTest : XCTestCase 14 | 15 | @end 16 | 17 | @implementation ISStegoEncoderTest 18 | 19 | - (void)testStegoImageEncode { 20 | id image = [ISTestUtilities imageNamed:ORIGINAL_IMAGE_NAME]; 21 | 22 | XCTAssertNotNil(image, @"image is nil"); 23 | 24 | ISStegoEncoder *encoder = [[ISStegoEncoder alloc] init]; 25 | 26 | NSError *error = nil; 27 | 28 | id stegoImage = [encoder stegoImageForImage:image 29 | data:TEXT_TO_HIDE 30 | error:&error]; 31 | 32 | XCTAssertNotNil(stegoImage, @"stegoImage is nil"); 33 | 34 | XCTAssertNil(error, @"error isn't nil"); 35 | 36 | encoder = nil; 37 | } 38 | 39 | - (void)testStegoBigImageEncode { 40 | id image = [ISTestUtilities imageNamed:BIG_IMAGE_NAME]; 41 | 42 | XCTAssertNotNil(image, @"image is nil"); 43 | 44 | ISStegoEncoder *encoder = [[ISStegoEncoder alloc] init]; 45 | 46 | NSError *error = nil; 47 | 48 | id stegoImage = [encoder stegoImageForImage:image 49 | data:BIG_TEXT_TO_HIDE 50 | error:&error]; 51 | 52 | XCTAssertNotNil(stegoImage, @"stegoImage is nil"); 53 | 54 | XCTAssertNil(error, @"error isn't nil"); 55 | 56 | encoder = nil; 57 | } 58 | 59 | - (void)testStegoImageEncodeError { 60 | id image = [ISTestUtilities imageNamed:ORIGINAL_IMAGE_NAME]; 61 | 62 | XCTAssertNotNil(image, @"image is nil"); 63 | 64 | ISStegoEncoder *encoder = [[ISStegoEncoder alloc] init]; 65 | 66 | NSError *error = nil; 67 | 68 | id stegoImage = [encoder stegoImageForImage:image 69 | data:BIG_TEXT_TO_HIDE 70 | error:&error]; 71 | 72 | XCTAssertNil(stegoImage, @"stegoImage is nil"); 73 | 74 | XCTAssertNotNil(error, @"error isn't nil"); 75 | 76 | encoder = nil; 77 | } 78 | 79 | #pragma mark - Exception 80 | 81 | - (void)testNilImage { 82 | ISStegoEncoder *encoder = [[ISStegoEncoder alloc] init]; 83 | 84 | NSError *error = nil; 85 | 86 | XCTAssertThrows([encoder stegoImageForImage:nil 87 | data:TEXT_TO_HIDE 88 | error:&error]); 89 | 90 | encoder = nil; 91 | } 92 | 93 | - (void)testImageTooSmall { 94 | id image = [ISTestUtilities imageNamed:SMALL_IMAGE_NAME]; 95 | 96 | XCTAssertNotNil(image, @"image is nil"); 97 | 98 | ISStegoEncoder *encoder = [[ISStegoEncoder alloc] init]; 99 | 100 | NSError *error = nil; 101 | 102 | [encoder stegoImageForImage:image 103 | data:TEXT_TO_HIDE 104 | error:&error]; 105 | 106 | XCTAssertNotNil(error); 107 | 108 | encoder = nil; 109 | } 110 | 111 | - (void)testNilData { 112 | id image = [ISTestUtilities imageNamed:ORIGINAL_IMAGE_NAME]; 113 | 114 | XCTAssertNotNil(image, @"image is nil"); 115 | 116 | ISStegoEncoder *encoder = [[ISStegoEncoder alloc] init]; 117 | 118 | NSError *error = nil; 119 | 120 | XCTAssertThrows([encoder stegoImageForImage:image 121 | data:nil 122 | error:&error]); 123 | 124 | encoder = nil; 125 | } 126 | 127 | @end 128 | -------------------------------------------------------------------------------- /Tests/Tests/ISTestUtilities.h: -------------------------------------------------------------------------------- 1 | // 2 | // ISTestUtilities.h 3 | // ISSteganography 4 | // 5 | // Created by Isaac Stevao Sena on 7/25/15. 6 | // Copyright (c) 2015 Black Bean. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | extern double const TIME_EXPECTATION; 12 | extern NSString *const ORIGINAL_IMAGE_NAME; 13 | extern NSString *const SMALL_IMAGE_NAME; 14 | extern NSString *const BIG_IMAGE_NAME; 15 | extern NSString *const STEGO_IMAGE_NAME; 16 | extern NSString *const STEGO_IMAGE_TO_SAVE_NAME; 17 | extern NSString *const TYPE_PNG; 18 | extern NSString *const TYPE_JPG; 19 | extern NSString *const TEXT_TO_HIDE; 20 | extern NSString *const BIG_TEXT_TO_HIDE; 21 | 22 | NSString *type(); 23 | 24 | @interface ISTestUtilities : NSObject 25 | 26 | + (id)imageNamed:(NSString *)name; 27 | 28 | + (id)imageToFilepath:(NSString *)filepath; 29 | 30 | + (NSString *)filePathToFilename:(NSString *)filename 31 | type:(NSString *)type; 32 | 33 | + (BOOL)saveImage:(id)image 34 | file:(NSString *)path; 35 | 36 | @end 37 | -------------------------------------------------------------------------------- /Tests/Tests/ISTestUtilities.m: -------------------------------------------------------------------------------- 1 | // 2 | // ISTestUtilities.m 3 | // ISSteganography 4 | // 5 | // Created by Isaac Stevao Sena on 7/25/15. 6 | // Copyright (c) 2015 Black Bean. All rights reserved. 7 | // 8 | 9 | #import "ISTestUtilities.h" 10 | 11 | #if TARGET_OS_IPHONE 12 | #import 13 | #else 14 | #import 15 | #endif 16 | 17 | double const TIME_EXPECTATION = 100.0; 18 | NSString *const ORIGINAL_IMAGE_NAME = @"image"; 19 | NSString *const SMALL_IMAGE_NAME = @"image_8x8"; 20 | NSString *const BIG_IMAGE_NAME = @"image_100x100"; 21 | NSString *const STEGO_IMAGE_NAME = @"stegoImage"; 22 | NSString *const STEGO_IMAGE_TO_SAVE_NAME = @"imageToSave"; 23 | NSString *const TYPE_PNG = @"png"; 24 | NSString *const TYPE_JPG = @"jpg"; 25 | NSString *const TEXT_TO_HIDE = @"text to hide"; 26 | 27 | NSString *type() { 28 | return TYPE_PNG; 29 | } 30 | 31 | @implementation ISTestUtilities 32 | 33 | + (id)imageNamed:(NSString *)name { 34 | return [self imageNamed:name 35 | ofType:type()]; 36 | } 37 | 38 | + (id)imageNamed:(NSString *)name 39 | ofType:(NSString *)type { 40 | NSBundle *bundle = [NSBundle bundleForClass:[self class]]; 41 | 42 | NSString *filepath = [bundle pathForResource:name 43 | ofType:type]; 44 | 45 | return [self imageToFilepath:filepath]; 46 | } 47 | 48 | + (id)imageToFilepath:(NSString *)filepath { 49 | #if TARGET_OS_IPHONE 50 | return [UIImage imageWithContentsOfFile:filepath]; 51 | #else 52 | return [[NSImage alloc] initWithContentsOfFile:filepath]; 53 | #endif 54 | } 55 | 56 | + (BOOL)saveImage:(id)image 57 | file:(NSString *)path { 58 | #if TARGET_OS_IPHONE 59 | return [UIImagePNGRepresentation(image) writeToFile:path 60 | atomically:YES]; 61 | #else 62 | CGImageRef cgRef = [image CGImageForProposedRect:NULL 63 | context:nil 64 | hints:nil]; 65 | 66 | NSBitmapImageRep *bitmapImage = [[NSBitmapImageRep alloc] initWithCGImage:cgRef]; 67 | 68 | [bitmapImage setSize:[image size]]; 69 | 70 | NSData *pngData = [bitmapImage representationUsingType:NSPNGFileType 71 | properties:nil]; 72 | 73 | return [pngData writeToFile:path atomically:YES]; 74 | #endif 75 | } 76 | 77 | + (NSString *)filePathToFilename:(NSString *)filename 78 | type:(NSString *)type { 79 | NSString *file = [NSString stringWithFormat:@"%@.%@", filename, type]; 80 | 81 | NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); 82 | 83 | return [[paths objectAtIndex:0] stringByAppendingPathComponent:file]; 84 | } 85 | 86 | @end 87 | 88 | NSString *const BIG_TEXT_TO_HIDE = @"biiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiig text to hide"; 89 | -------------------------------------------------------------------------------- /Tests/Tests/images/image.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isena/ISStego/1dc5f33482578c483c22758a43b22778cda44807/Tests/Tests/images/image.png -------------------------------------------------------------------------------- /Tests/Tests/images/image_100x100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isena/ISStego/1dc5f33482578c483c22758a43b22778cda44807/Tests/Tests/images/image_100x100.png -------------------------------------------------------------------------------- /Tests/Tests/images/image_8x8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isena/ISStego/1dc5f33482578c483c22758a43b22778cda44807/Tests/Tests/images/image_8x8.png -------------------------------------------------------------------------------- /Tests/Tests/images/stegoImage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isena/ISStego/1dc5f33482578c483c22758a43b22778cda44807/Tests/Tests/images/stegoImage.png -------------------------------------------------------------------------------- /Tests/iOS Tests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | com.isena.$(PRODUCT_NAME:rfc1034identifier) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | --------------------------------------------------------------------------------