├── ChromaHash.podspec
├── ChromaHash.xcworkspace
├── contents.xcworkspacedata
└── xcshareddata
│ └── IDEWorkspaceChecks.plist
├── ChromaHash
├── CHChromaHashView.h
├── CHChromaHashView.m
└── ChromaHash.h
├── Example
├── iOS Example.xcodeproj
│ ├── project.pbxproj
│ └── project.xcworkspace
│ │ └── contents.xcworkspacedata
└── iOS Example
│ ├── AppDelegate.h
│ ├── AppDelegate.m
│ ├── Images.xcassets
│ ├── AppIcon.appiconset
│ │ └── Contents.json
│ └── LaunchImage.launchimage
│ │ └── Contents.json
│ ├── Info.plist
│ ├── Prefix.pch
│ ├── ViewController.h
│ ├── ViewController.m
│ ├── ViewController.xib
│ ├── en.lproj
│ └── InfoPlist.strings
│ └── main.m
├── LICENSE.md
└── README.md
/ChromaHash.podspec:
--------------------------------------------------------------------------------
1 | Pod::Spec.new do |s|
2 | s.name = 'ChromaHash'
3 | s.version = '0.1.0'
4 | s.license = 'MIT'
5 | s.summary = 'A concept for visualizing secure text input using ambient color bars.'
6 | s.homepage = 'https://github.com/mattt/CHChromaHashView'
7 | s.social_media_url = 'https://twitter.com/mattt'
8 | s.screenshot = 'https://raw.github.com/mattt/CHChromaHashView/screenshots/chchromahashview.gif'
9 | s.authors = { 'Mattt' => 'mattt@me.com' }
10 | s.source = { git: 'https://github.com/mattt/CHChromaHashView.git', tag: s.version }
11 | s.source_files = 'ChromaHash'
12 | s.requires_arc = true
13 |
14 | s.frameworks = 'Security'
15 |
16 | s.ios.deployment_target = '6.0'
17 | end
18 |
--------------------------------------------------------------------------------
/ChromaHash.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
7 |
9 |
10 |
12 |
13 |
15 |
16 |
17 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/ChromaHash.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/ChromaHash/CHChromaHashView.h:
--------------------------------------------------------------------------------
1 | // CHChromaHashView.h
2 | //
3 | // Copyright (c) 2014 Mattt (https://mat.tt/)
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
13 | // all 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
21 | // THE SOFTWARE.
22 |
23 | #import
24 |
25 | /**
26 |
27 | */
28 | @interface CHChromaHashView : UIView
29 |
30 | /**
31 |
32 | */
33 | @property(nonatomic, assign) NSUInteger numberOfValues;
34 |
35 | /**
36 |
37 | */
38 | @property(nonatomic, assign) NSTimeInterval animationDuration;
39 |
40 | /**
41 |
42 | */
43 | @property(nonatomic, strong) IBOutlet UIControl *textInput;
44 |
45 | @end
46 |
--------------------------------------------------------------------------------
/ChromaHash/CHChromaHashView.m:
--------------------------------------------------------------------------------
1 | // CHChromaHashView.m
2 | //
3 | // Copyright (c) 2014 Mattt (https://mat.tt/)
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
13 | // all 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
21 | // THE SOFTWARE.
22 |
23 | #import "CHChromaHashView.h"
24 |
25 | #import
26 |
27 | #ifndef _CHROMA_HASH_SALT_
28 | #define _CHROMA_HASH_SALT_ (__DATE__ " " __TIME__)
29 | #endif
30 |
31 | static NSUInteger const CHDefaultNumberOfValues = 3;
32 | static NSUInteger const CHMinimumCharacterThreshold = 6;
33 |
34 | static NSArray *CHColorsFromDigestOfString(NSString *string) {
35 | if (!string || [string isEqualToString:@""]) {
36 | return @[];
37 | }
38 |
39 | uint8_t output[CC_SHA256_DIGEST_LENGTH];
40 | NSData *data = [[string
41 | stringByAppendingString:[NSString
42 | stringWithCString:(_CHROMA_HASH_SALT_)
43 | encoding:NSASCIIStringEncoding]]
44 | dataUsingEncoding:NSUTF8StringEncoding];
45 | CC_SHA256(data.bytes, (CC_LONG)data.length, output);
46 |
47 | NSMutableArray *mutableArray = [NSMutableArray array];
48 | NSUInteger offset = 0;
49 | while (offset + 3 < CC_SHA256_DIGEST_LENGTH) {
50 | unsigned char r = output[offset++];
51 | unsigned char g = output[offset++];
52 | unsigned char b = output[offset++];
53 |
54 | UIColor *color = nil;
55 | if ([string length] < CHMinimumCharacterThreshold) {
56 | color = [UIColor colorWithWhite:(r / 255.0f) alpha:1.0f];
57 | } else {
58 | color = [UIColor colorWithRed:(r / 255.0f)
59 | green:(g / 255.0f)
60 | blue:(b / 255.0f)
61 | alpha:1.0];
62 | }
63 |
64 | [mutableArray addObject:color];
65 | }
66 |
67 | return [NSArray arrayWithArray:mutableArray];
68 | }
69 |
70 | @interface CHChromaHashView ()
71 | @property(readonly) CAGradientLayer *gradientLayer;
72 | @end
73 |
74 | @implementation CHChromaHashView
75 |
76 | + (Class)layerClass {
77 | return [CAGradientLayer class];
78 | }
79 |
80 | - (CAGradientLayer *)gradientLayer {
81 | return (CAGradientLayer *)self.layer;
82 | }
83 |
84 | - (void)commonInit {
85 | self.backgroundColor = [UIColor clearColor];
86 |
87 | self.numberOfValues = CHDefaultNumberOfValues;
88 |
89 | [self.gradientLayer setStartPoint:CGPointMake(0.0f, 0.0f)];
90 | [self.gradientLayer setEndPoint:CGPointMake(1.0f, 0.0f)];
91 | }
92 |
93 | - (void)awakeFromNib {
94 | [super awakeFromNib];
95 | [self commonInit];
96 | }
97 |
98 | - (instancetype)initWithFrame:(CGRect)frame {
99 | self = [super initWithFrame:frame];
100 | if (!self) {
101 | return nil;
102 | }
103 |
104 | [self commonInit];
105 |
106 | return self;
107 | }
108 |
109 | - (void)setNumberOfValues:(NSUInteger)numberOfValues {
110 | _numberOfValues = numberOfValues;
111 |
112 | CGFloat step = 1.0f / numberOfValues;
113 | CGFloat const epsilon = 0.01f;
114 | NSMutableArray *mutableLocations =
115 | [NSMutableArray arrayWithCapacity:numberOfValues * 2];
116 | [mutableLocations addObject:@(0.0f)];
117 | for (CGFloat location = step; location < 1.0f; location += (step + epsilon)) {
118 | [mutableLocations addObject:@(location)];
119 | [mutableLocations addObject:@(location + epsilon)];
120 | }
121 | [mutableLocations addObject:@(1.0f)];
122 |
123 | [self.gradientLayer setLocations:mutableLocations];
124 | }
125 |
126 | - (void)setTextInput:(UIControl *)textInput {
127 | _textInput = textInput;
128 |
129 | [self.textInput addTarget:self
130 | action:@selector(update:)
131 | forControlEvents:UIControlEventEditingChanged];
132 | }
133 |
134 | #pragma mark - IBAction
135 |
136 | - (IBAction)update:(id)sender {
137 | if (sender != self.textInput) {
138 | return;
139 | }
140 |
141 | NSString *text = [self.textInput
142 | textInRange:[self.textInput
143 | textRangeFromPosition:[self.textInput beginningOfDocument]
144 | toPosition:[self.textInput endOfDocument]]];
145 |
146 | NSArray *colors = CHColorsFromDigestOfString(text);
147 | NSMutableArray *mutableColors =
148 | [NSMutableArray arrayWithCapacity:[colors count] * 2];
149 | for (UIColor *color in colors) {
150 | [mutableColors
151 | addObjectsFromArray:@[ (id)[color CGColor], (id)[color CGColor] ]];
152 | }
153 |
154 | CABasicAnimation *animation =
155 | [CABasicAnimation animationWithKeyPath:@"colors"];
156 | animation.duration = self.animationDuration;
157 | animation.removedOnCompletion = YES;
158 | animation.fillMode = kCAFillModeForwards;
159 | [self.gradientLayer addAnimation:animation forKey:nil];
160 |
161 | [self.gradientLayer setColors:mutableColors];
162 | }
163 |
164 | @end
165 |
--------------------------------------------------------------------------------
/ChromaHash/ChromaHash.h:
--------------------------------------------------------------------------------
1 | // ChromaHash.h
2 | //
3 | // Copyright (c) 2014 Mattt (https://mat.tt/)
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
13 | // all 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
21 | // THE SOFTWARE.
22 |
23 | #ifndef _CHROMA_HASH_
24 | #define _CHROMA_HASH_
25 | #import "CHChromaHashView.h"
26 | #endif
27 |
--------------------------------------------------------------------------------
/Example/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 | F884C7EA18EE53B5007ABD74 /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = F884C7E818EE53B5007ABD74 /* ViewController.m */; };
11 | F884C7EB18EE53B5007ABD74 /* ViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = F884C7E918EE53B5007ABD74 /* ViewController.xib */; };
12 | F884C7F018EE6898007ABD74 /* CHChromaHashView.m in Sources */ = {isa = PBXBuildFile; fileRef = F884C7EE18EE6898007ABD74 /* CHChromaHashView.m */; };
13 | F89E1B9518E1161F00C73D14 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F89E1B9418E1161F00C73D14 /* Foundation.framework */; };
14 | F89E1B9718E1161F00C73D14 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F89E1B9618E1161F00C73D14 /* CoreGraphics.framework */; };
15 | F89E1B9918E1161F00C73D14 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F89E1B9818E1161F00C73D14 /* UIKit.framework */; };
16 | F89E1B9F18E1161F00C73D14 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = F89E1B9D18E1161F00C73D14 /* InfoPlist.strings */; };
17 | F89E1BA118E1161F00C73D14 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = F89E1BA018E1161F00C73D14 /* main.m */; };
18 | F89E1BA518E1161F00C73D14 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = F89E1BA418E1161F00C73D14 /* AppDelegate.m */; };
19 | /* End PBXBuildFile section */
20 |
21 | /* Begin PBXFileReference section */
22 | F884C7E718EE53B5007ABD74 /* ViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = ""; };
23 | F884C7E818EE53B5007ABD74 /* ViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = ""; };
24 | F884C7E918EE53B5007ABD74 /* ViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = ViewController.xib; sourceTree = ""; };
25 | F884C7ED18EE6898007ABD74 /* CHChromaHashView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CHChromaHashView.h; sourceTree = ""; };
26 | F884C7EE18EE6898007ABD74 /* CHChromaHashView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CHChromaHashView.m; sourceTree = ""; };
27 | F884C7EF18EE6898007ABD74 /* ChromaHash.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ChromaHash.h; sourceTree = ""; };
28 | F89E1B9118E1161F00C73D14 /* ChromaHash.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = ChromaHash.app; sourceTree = BUILT_PRODUCTS_DIR; };
29 | F89E1B9418E1161F00C73D14 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
30 | F89E1B9618E1161F00C73D14 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; };
31 | F89E1B9818E1161F00C73D14 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; };
32 | F89E1B9C18E1161F00C73D14 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
33 | F89E1B9E18E1161F00C73D14 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; };
34 | F89E1BA018E1161F00C73D14 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; };
35 | F89E1BA218E1161F00C73D14 /* Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = Prefix.pch; sourceTree = ""; };
36 | F89E1BA318E1161F00C73D14 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; };
37 | F89E1BA418E1161F00C73D14 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; };
38 | F89E1BAD18E1161F00C73D14 /* XCTest.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = XCTest.framework; path = Library/Frameworks/XCTest.framework; sourceTree = DEVELOPER_DIR; };
39 | /* End PBXFileReference section */
40 |
41 | /* Begin PBXFrameworksBuildPhase section */
42 | F89E1B8E18E1161F00C73D14 /* Frameworks */ = {
43 | isa = PBXFrameworksBuildPhase;
44 | buildActionMask = 2147483647;
45 | files = (
46 | F89E1B9718E1161F00C73D14 /* CoreGraphics.framework in Frameworks */,
47 | F89E1B9918E1161F00C73D14 /* UIKit.framework in Frameworks */,
48 | F89E1B9518E1161F00C73D14 /* Foundation.framework in Frameworks */,
49 | );
50 | runOnlyForDeploymentPostprocessing = 0;
51 | };
52 | /* End PBXFrameworksBuildPhase section */
53 |
54 | /* Begin PBXGroup section */
55 | F884C7EC18EE6898007ABD74 /* ChromaHash */ = {
56 | isa = PBXGroup;
57 | children = (
58 | F884C7ED18EE6898007ABD74 /* CHChromaHashView.h */,
59 | F884C7EE18EE6898007ABD74 /* CHChromaHashView.m */,
60 | F884C7EF18EE6898007ABD74 /* ChromaHash.h */,
61 | );
62 | name = ChromaHash;
63 | path = ../ChromaHash;
64 | sourceTree = "";
65 | };
66 | F89E1B8818E1161F00C73D14 = {
67 | isa = PBXGroup;
68 | children = (
69 | F89E1B9A18E1161F00C73D14 /* ChromaHash */,
70 | F89E1B9318E1161F00C73D14 /* Frameworks */,
71 | F89E1B9218E1161F00C73D14 /* Products */,
72 | F89E1BC318E1162600C73D14 /* Vendor */,
73 | );
74 | sourceTree = "";
75 | };
76 | F89E1B9218E1161F00C73D14 /* Products */ = {
77 | isa = PBXGroup;
78 | children = (
79 | F89E1B9118E1161F00C73D14 /* ChromaHash.app */,
80 | );
81 | name = Products;
82 | sourceTree = "";
83 | };
84 | F89E1B9318E1161F00C73D14 /* Frameworks */ = {
85 | isa = PBXGroup;
86 | children = (
87 | F89E1B9418E1161F00C73D14 /* Foundation.framework */,
88 | F89E1B9618E1161F00C73D14 /* CoreGraphics.framework */,
89 | F89E1B9818E1161F00C73D14 /* UIKit.framework */,
90 | F89E1BAD18E1161F00C73D14 /* XCTest.framework */,
91 | );
92 | name = Frameworks;
93 | sourceTree = "";
94 | };
95 | F89E1B9A18E1161F00C73D14 /* ChromaHash */ = {
96 | isa = PBXGroup;
97 | children = (
98 | F89E1BA318E1161F00C73D14 /* AppDelegate.h */,
99 | F89E1BA418E1161F00C73D14 /* AppDelegate.m */,
100 | F884C7E718EE53B5007ABD74 /* ViewController.h */,
101 | F884C7E818EE53B5007ABD74 /* ViewController.m */,
102 | F884C7E918EE53B5007ABD74 /* ViewController.xib */,
103 | F89E1B9B18E1161F00C73D14 /* Supporting Files */,
104 | );
105 | name = ChromaHash;
106 | path = "iOS Example";
107 | sourceTree = "";
108 | };
109 | F89E1B9B18E1161F00C73D14 /* Supporting Files */ = {
110 | isa = PBXGroup;
111 | children = (
112 | F89E1B9C18E1161F00C73D14 /* Info.plist */,
113 | F89E1B9D18E1161F00C73D14 /* InfoPlist.strings */,
114 | F89E1BA018E1161F00C73D14 /* main.m */,
115 | F89E1BA218E1161F00C73D14 /* Prefix.pch */,
116 | );
117 | name = "Supporting Files";
118 | sourceTree = "";
119 | };
120 | F89E1BC318E1162600C73D14 /* Vendor */ = {
121 | isa = PBXGroup;
122 | children = (
123 | F884C7EC18EE6898007ABD74 /* ChromaHash */,
124 | );
125 | name = Vendor;
126 | sourceTree = "";
127 | };
128 | /* End PBXGroup section */
129 |
130 | /* Begin PBXNativeTarget section */
131 | F89E1B9018E1161F00C73D14 /* ChromaHash */ = {
132 | isa = PBXNativeTarget;
133 | buildConfigurationList = F89E1BBD18E1161F00C73D14 /* Build configuration list for PBXNativeTarget "ChromaHash" */;
134 | buildPhases = (
135 | F89E1B8D18E1161F00C73D14 /* Sources */,
136 | F89E1B8E18E1161F00C73D14 /* Frameworks */,
137 | F89E1B8F18E1161F00C73D14 /* Resources */,
138 | );
139 | buildRules = (
140 | );
141 | dependencies = (
142 | );
143 | name = ChromaHash;
144 | productName = ChromaHash;
145 | productReference = F89E1B9118E1161F00C73D14 /* ChromaHash.app */;
146 | productType = "com.apple.product-type.application";
147 | };
148 | /* End PBXNativeTarget section */
149 |
150 | /* Begin PBXProject section */
151 | F89E1B8918E1161F00C73D14 /* Project object */ = {
152 | isa = PBXProject;
153 | attributes = {
154 | LastUpgradeCheck = 1020;
155 | ORGANIZATIONNAME = Mattt;
156 | };
157 | buildConfigurationList = F89E1B8C18E1161F00C73D14 /* Build configuration list for PBXProject "iOS Example" */;
158 | compatibilityVersion = "Xcode 3.2";
159 | developmentRegion = en;
160 | hasScannedForEncodings = 0;
161 | knownRegions = (
162 | en,
163 | Base,
164 | );
165 | mainGroup = F89E1B8818E1161F00C73D14;
166 | productRefGroup = F89E1B9218E1161F00C73D14 /* Products */;
167 | projectDirPath = "";
168 | projectRoot = "";
169 | targets = (
170 | F89E1B9018E1161F00C73D14 /* ChromaHash */,
171 | );
172 | };
173 | /* End PBXProject section */
174 |
175 | /* Begin PBXResourcesBuildPhase section */
176 | F89E1B8F18E1161F00C73D14 /* Resources */ = {
177 | isa = PBXResourcesBuildPhase;
178 | buildActionMask = 2147483647;
179 | files = (
180 | F884C7EB18EE53B5007ABD74 /* ViewController.xib in Resources */,
181 | F89E1B9F18E1161F00C73D14 /* InfoPlist.strings in Resources */,
182 | );
183 | runOnlyForDeploymentPostprocessing = 0;
184 | };
185 | /* End PBXResourcesBuildPhase section */
186 |
187 | /* Begin PBXSourcesBuildPhase section */
188 | F89E1B8D18E1161F00C73D14 /* Sources */ = {
189 | isa = PBXSourcesBuildPhase;
190 | buildActionMask = 2147483647;
191 | files = (
192 | F89E1BA518E1161F00C73D14 /* AppDelegate.m in Sources */,
193 | F884C7F018EE6898007ABD74 /* CHChromaHashView.m in Sources */,
194 | F89E1BA118E1161F00C73D14 /* main.m in Sources */,
195 | F884C7EA18EE53B5007ABD74 /* ViewController.m in Sources */,
196 | );
197 | runOnlyForDeploymentPostprocessing = 0;
198 | };
199 | /* End PBXSourcesBuildPhase section */
200 |
201 | /* Begin PBXVariantGroup section */
202 | F89E1B9D18E1161F00C73D14 /* InfoPlist.strings */ = {
203 | isa = PBXVariantGroup;
204 | children = (
205 | F89E1B9E18E1161F00C73D14 /* en */,
206 | );
207 | name = InfoPlist.strings;
208 | sourceTree = "";
209 | };
210 | /* End PBXVariantGroup section */
211 |
212 | /* Begin XCBuildConfiguration section */
213 | F89E1BBB18E1161F00C73D14 /* Debug */ = {
214 | isa = XCBuildConfiguration;
215 | buildSettings = {
216 | ALWAYS_SEARCH_USER_PATHS = NO;
217 | CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
218 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
219 | CLANG_CXX_LIBRARY = "libc++";
220 | CLANG_ENABLE_MODULES = YES;
221 | CLANG_ENABLE_OBJC_ARC = YES;
222 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
223 | CLANG_WARN_BOOL_CONVERSION = YES;
224 | CLANG_WARN_COMMA = YES;
225 | CLANG_WARN_CONSTANT_CONVERSION = YES;
226 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
227 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
228 | CLANG_WARN_EMPTY_BODY = YES;
229 | CLANG_WARN_ENUM_CONVERSION = YES;
230 | CLANG_WARN_INFINITE_RECURSION = YES;
231 | CLANG_WARN_INT_CONVERSION = YES;
232 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
233 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
234 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
235 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
236 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
237 | CLANG_WARN_STRICT_PROTOTYPES = YES;
238 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
239 | CLANG_WARN_UNREACHABLE_CODE = YES;
240 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
241 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
242 | COPY_PHASE_STRIP = NO;
243 | ENABLE_STRICT_OBJC_MSGSEND = YES;
244 | ENABLE_TESTABILITY = YES;
245 | GCC_C_LANGUAGE_STANDARD = gnu99;
246 | GCC_DYNAMIC_NO_PIC = NO;
247 | GCC_NO_COMMON_BLOCKS = YES;
248 | GCC_OPTIMIZATION_LEVEL = 0;
249 | GCC_PREPROCESSOR_DEFINITIONS = (
250 | "DEBUG=1",
251 | "$(inherited)",
252 | );
253 | GCC_SYMBOLS_PRIVATE_EXTERN = NO;
254 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
255 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
256 | GCC_WARN_UNDECLARED_SELECTOR = YES;
257 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
258 | GCC_WARN_UNUSED_FUNCTION = YES;
259 | GCC_WARN_UNUSED_VARIABLE = YES;
260 | IPHONEOS_DEPLOYMENT_TARGET = 8.0;
261 | ONLY_ACTIVE_ARCH = YES;
262 | SDKROOT = iphoneos;
263 | };
264 | name = Debug;
265 | };
266 | F89E1BBC18E1161F00C73D14 /* Release */ = {
267 | isa = XCBuildConfiguration;
268 | buildSettings = {
269 | ALWAYS_SEARCH_USER_PATHS = NO;
270 | CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
271 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
272 | CLANG_CXX_LIBRARY = "libc++";
273 | CLANG_ENABLE_MODULES = YES;
274 | CLANG_ENABLE_OBJC_ARC = YES;
275 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
276 | CLANG_WARN_BOOL_CONVERSION = YES;
277 | CLANG_WARN_COMMA = YES;
278 | CLANG_WARN_CONSTANT_CONVERSION = YES;
279 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
280 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
281 | CLANG_WARN_EMPTY_BODY = YES;
282 | CLANG_WARN_ENUM_CONVERSION = YES;
283 | CLANG_WARN_INFINITE_RECURSION = YES;
284 | CLANG_WARN_INT_CONVERSION = YES;
285 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
286 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
287 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
288 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
289 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
290 | CLANG_WARN_STRICT_PROTOTYPES = YES;
291 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
292 | CLANG_WARN_UNREACHABLE_CODE = YES;
293 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
294 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
295 | COPY_PHASE_STRIP = YES;
296 | ENABLE_NS_ASSERTIONS = NO;
297 | ENABLE_STRICT_OBJC_MSGSEND = YES;
298 | GCC_C_LANGUAGE_STANDARD = gnu99;
299 | GCC_NO_COMMON_BLOCKS = YES;
300 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
301 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
302 | GCC_WARN_UNDECLARED_SELECTOR = YES;
303 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
304 | GCC_WARN_UNUSED_FUNCTION = YES;
305 | GCC_WARN_UNUSED_VARIABLE = YES;
306 | IPHONEOS_DEPLOYMENT_TARGET = 8.0;
307 | SDKROOT = iphoneos;
308 | VALIDATE_PRODUCT = YES;
309 | };
310 | name = Release;
311 | };
312 | F89E1BBE18E1161F00C73D14 /* Debug */ = {
313 | isa = XCBuildConfiguration;
314 | buildSettings = {
315 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
316 | ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
317 | GCC_PRECOMPILE_PREFIX_HEADER = YES;
318 | GCC_PREFIX_HEADER = "iOS Example/Prefix.pch";
319 | INFOPLIST_FILE = "$(SRCROOT)/iOS Example/Info.plist";
320 | PRODUCT_BUNDLE_IDENTIFIER = "com.mattt.${PRODUCT_NAME:rfc1034identifier}";
321 | PRODUCT_NAME = "$(TARGET_NAME)";
322 | WRAPPER_EXTENSION = app;
323 | };
324 | name = Debug;
325 | };
326 | F89E1BBF18E1161F00C73D14 /* Release */ = {
327 | isa = XCBuildConfiguration;
328 | buildSettings = {
329 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
330 | ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
331 | GCC_PRECOMPILE_PREFIX_HEADER = YES;
332 | GCC_PREFIX_HEADER = "iOS Example/Prefix.pch";
333 | INFOPLIST_FILE = "$(SRCROOT)/iOS Example/Info.plist";
334 | PRODUCT_BUNDLE_IDENTIFIER = "com.mattt.${PRODUCT_NAME:rfc1034identifier}";
335 | PRODUCT_NAME = "$(TARGET_NAME)";
336 | WRAPPER_EXTENSION = app;
337 | };
338 | name = Release;
339 | };
340 | /* End XCBuildConfiguration section */
341 |
342 | /* Begin XCConfigurationList section */
343 | F89E1B8C18E1161F00C73D14 /* Build configuration list for PBXProject "iOS Example" */ = {
344 | isa = XCConfigurationList;
345 | buildConfigurations = (
346 | F89E1BBB18E1161F00C73D14 /* Debug */,
347 | F89E1BBC18E1161F00C73D14 /* Release */,
348 | );
349 | defaultConfigurationIsVisible = 0;
350 | defaultConfigurationName = Release;
351 | };
352 | F89E1BBD18E1161F00C73D14 /* Build configuration list for PBXNativeTarget "ChromaHash" */ = {
353 | isa = XCConfigurationList;
354 | buildConfigurations = (
355 | F89E1BBE18E1161F00C73D14 /* Debug */,
356 | F89E1BBF18E1161F00C73D14 /* Release */,
357 | );
358 | defaultConfigurationIsVisible = 0;
359 | defaultConfigurationName = Release;
360 | };
361 | /* End XCConfigurationList section */
362 | };
363 | rootObject = F89E1B8918E1161F00C73D14 /* Project object */;
364 | }
365 |
--------------------------------------------------------------------------------
/Example/iOS Example.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/Example/iOS Example/AppDelegate.h:
--------------------------------------------------------------------------------
1 | // AppDelegate.h
2 | //
3 | // Copyright (c) 2014 Mattt (https://mat.tt/)
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
13 | // all 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
21 | // THE SOFTWARE.
22 |
23 | #import
24 |
25 | @interface AppDelegate : UIResponder
26 |
27 | @property(strong, nonatomic) UIWindow *window;
28 |
29 | @end
30 |
--------------------------------------------------------------------------------
/Example/iOS Example/AppDelegate.m:
--------------------------------------------------------------------------------
1 | // AppDelegate.m
2 | //
3 | // Copyright (c) 2014 Mattt (https://mat.tt/)
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
13 | // all 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
21 | // THE SOFTWARE.
22 |
23 | #import "AppDelegate.h"
24 |
25 | #import "ViewController.h"
26 |
27 | @implementation AppDelegate
28 |
29 | - (BOOL)application:(UIApplication *)application
30 | didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
31 | self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
32 | self.window.backgroundColor = [UIColor whiteColor];
33 |
34 | UIViewController *viewController =
35 | [[ViewController alloc] initWithNibName:nil bundle:nil];
36 | UINavigationController *navigationController = [[UINavigationController alloc]
37 | initWithRootViewController:viewController];
38 | self.window.rootViewController = navigationController;
39 |
40 | [self.window makeKeyAndVisible];
41 |
42 | return YES;
43 | }
44 |
45 | @end
46 |
--------------------------------------------------------------------------------
/Example/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" : "40x40",
11 | "scale" : "2x"
12 | },
13 | {
14 | "idiom" : "iphone",
15 | "size" : "60x60",
16 | "scale" : "2x"
17 | }
18 | ],
19 | "info" : {
20 | "version" : 1,
21 | "author" : "xcode"
22 | }
23 | }
--------------------------------------------------------------------------------
/Example/iOS Example/Images.xcassets/LaunchImage.launchimage/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "orientation" : "portrait",
5 | "idiom" : "iphone",
6 | "extent" : "full-screen",
7 | "minimum-system-version" : "7.0",
8 | "scale" : "2x"
9 | },
10 | {
11 | "orientation" : "portrait",
12 | "idiom" : "iphone",
13 | "subtype" : "retina4",
14 | "extent" : "full-screen",
15 | "minimum-system-version" : "7.0",
16 | "scale" : "2x"
17 | }
18 | ],
19 | "info" : {
20 | "version" : 1,
21 | "author" : "xcode"
22 | }
23 | }
--------------------------------------------------------------------------------
/Example/iOS Example/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleDisplayName
8 | ${PRODUCT_NAME}
9 | CFBundleExecutable
10 | ${EXECUTABLE_NAME}
11 | CFBundleIdentifier
12 | $(PRODUCT_BUNDLE_IDENTIFIER)
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.0
25 | LSRequiresIPhoneOS
26 |
27 | UIRequiredDeviceCapabilities
28 |
29 | armv7
30 |
31 | UISupportedInterfaceOrientations
32 |
33 | UIInterfaceOrientationPortrait
34 | UIInterfaceOrientationLandscapeLeft
35 | UIInterfaceOrientationLandscapeRight
36 |
37 |
38 |
39 |
--------------------------------------------------------------------------------
/Example/iOS Example/Prefix.pch:
--------------------------------------------------------------------------------
1 | //
2 | // Prefix header
3 | //
4 | // The contents of this file are implicitly included at the beginning of every source file.
5 | //
6 |
7 | #import
8 |
9 | #ifndef __IPHONE_3_0
10 | #warning "This project uses features only available in iOS SDK 3.0 and later."
11 | #endif
12 |
13 | #ifdef __OBJC__
14 | #import
15 | #import
16 | #endif
17 |
--------------------------------------------------------------------------------
/Example/iOS Example/ViewController.h:
--------------------------------------------------------------------------------
1 | // ViewController.h
2 | //
3 | // Copyright (c) 2014 Mattt (https://mat.tt/)
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
13 | // all 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
21 | // THE SOFTWARE.
22 | #import
23 |
24 | @interface ViewController : UIViewController
25 |
26 | @end
27 |
--------------------------------------------------------------------------------
/Example/iOS Example/ViewController.m:
--------------------------------------------------------------------------------
1 | // ViewController.m
2 | //
3 | // Copyright (c) 2014 Mattt (https://mat.tt/)
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
13 | // all 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
21 | // THE SOFTWARE.
22 |
23 | #import "ViewController.h"
24 |
25 | @interface ViewController ()
26 | @property(weak, nonatomic) IBOutlet UITextField *passwordTextField;
27 | @property(weak, nonatomic) IBOutlet UITextField *passwordConfirmationTextField;
28 | @end
29 |
30 | @implementation ViewController
31 |
32 | #pragma mark - UIViewController
33 |
34 | - (void)viewDidLoad {
35 | [super viewDidLoad];
36 |
37 | self.title = NSLocalizedString(@"Chroma-Hash", nil);
38 | }
39 |
40 | #pragma mark - IBAction
41 |
42 | - (IBAction)findOutMore:(id)sender {
43 | [[UIApplication sharedApplication]
44 | openURL:[NSURL URLWithString:@"https://github.com/mattt/Chroma-Hash"]];
45 | }
46 |
47 | #pragma mark - UIGestureRecognizerDelegate
48 |
49 | - (BOOL)gestureRecognizerShouldBegin:(UIGestureRecognizer *)gestureRecognizer {
50 | [self.passwordTextField resignFirstResponder];
51 | [self.passwordConfirmationTextField resignFirstResponder];
52 |
53 | return YES;
54 | }
55 |
56 | @end
57 |
--------------------------------------------------------------------------------
/Example/iOS Example/ViewController.xib:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
--------------------------------------------------------------------------------
/Example/iOS Example/en.lproj/InfoPlist.strings:
--------------------------------------------------------------------------------
1 | /* Localized versions of Info.plist keys */
2 |
3 |
--------------------------------------------------------------------------------
/Example/iOS Example/main.m:
--------------------------------------------------------------------------------
1 | // main.m
2 | //
3 | // Copyright (c) 2014 Mattt (https://mat.tt/)
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
13 | // all 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
21 | // THE SOFTWARE.
22 |
23 | #import
24 |
25 | #import "AppDelegate.h"
26 |
27 | int main(int argc, char *argv[]) {
28 | @autoreleasepool {
29 | return UIApplicationMain(argc, argv, nil,
30 | NSStringFromClass([AppDelegate class]));
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/LICENSE.md:
--------------------------------------------------------------------------------
1 | Copyright (c) 2014 Mattt (https://mat.tt/)
2 |
3 | Permission is hereby granted, free of charge, to any person obtaining a copy
4 | of this software and associated documentation files (the "Software"), to deal
5 | in the Software without restriction, including without limitation the rights
6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7 | copies of the Software, and to permit persons to whom the Software is
8 | furnished to do so, subject to the following conditions:
9 |
10 | The above copyright notice and this permission notice shall be included in
11 | all copies or substantial portions of the Software.
12 |
13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19 | THE SOFTWARE.
20 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # CHChromaHashView
2 |
3 | **A classic password visualization concept, ported to iOS**
4 |
5 | > This project is no longer maintained.
6 |
7 | ---
8 |
9 | 
10 |
11 | > Chroma-Hash is a concept for visualizing secure text input using ambient color bars
12 | >
13 | > Password entry can be frustrating, especially with long or difficult passwords. Secure fields obscure your input with •'s, so others can't read it. Unfortunately, neither can you—you can't tell if you got your password right until you tap "Log In".
14 | >
15 | > Chroma-Hash displays a series of colored bars at the end of field inputs so you can instantly see if your password is right. Chroma-Hash takes an MD5 hash of your input and uses that to compute the colors in the visualization. The resulting color pattern is non-reversible, so no one could know what your password just from the colors.
16 | >
17 | > See the [original web version](http://mattt.github.io/Chroma-Hash/) for a live demonstration, and a bit more explanation.
18 |
19 | ### Contact
20 |
21 | [Mattt](https://twitter.com/mattt)
22 |
23 | ## License
24 |
25 | CHChromaHashView is available under the MIT license.
26 | See the LICENSE file for more info.
27 |
--------------------------------------------------------------------------------