Moved from CommonCrypto to IDZSwiftCommonCrypto
This commit is contained in:
parent
02eaa09ff7
commit
edfea5931b
|
|
@ -7,8 +7,9 @@ Pod::Spec.new do |s|
|
|||
s.author = "Touch Instinct"
|
||||
s.platform = :ios, "9.0"
|
||||
s.source = { :git => "https://github.com/NikAshanin/LeadKitAdditions.git", :tag => s.version }
|
||||
s.source_files = "LeadKitAdditions/**/*.{swift, h}"
|
||||
s.source_files = "LeadKitAdditions/LeadKitAdditions/**/*.swift"
|
||||
|
||||
s.dependency "LeadKit", '~> 0.4.6'
|
||||
s.dependency "KeychainAccess"
|
||||
s.dependency "KeychainAccess", '3.0.2'
|
||||
s.dependency "IDZSwiftCommonCrypto", '0.9.1'
|
||||
end
|
||||
|
|
|
|||
|
|
@ -1,33 +0,0 @@
|
|||
//
|
||||
// Copyright (c) 2017 Touch Instinct
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the Software), to deal
|
||||
// in the Software without restriction, including without limitation the rights
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
// copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in
|
||||
// all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED AS IS, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
// THE SOFTWARE.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
//! Project version number for CommonCrypto.
|
||||
FOUNDATION_EXPORT double CommonCryptoVersionNumber;
|
||||
|
||||
//! Project version string for CommonCrypto.
|
||||
FOUNDATION_EXPORT const unsigned char CommonCryptoVersionString[];
|
||||
|
||||
// In this header, you should import all the public headers of your framework using statements like #import <CommonCrypto/PublicHeader.h>
|
||||
|
||||
|
||||
|
|
@ -1,24 +0,0 @@
|
|||
//
|
||||
// Copyright (c) 2017 Touch Instinct
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the Software), to deal
|
||||
// in the Software without restriction, including without limitation the rights
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
// copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in
|
||||
// all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED AS IS, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
// THE SOFTWARE.
|
||||
//
|
||||
|
||||
MODULEMAP_FILE[sdk=iphoneos*] = $(SRCROOT)/CommonCrypto/iphoneos.modulemap
|
||||
MODULEMAP_FILE[sdk=iphonesimulator*] = $(SRCROOT)/CommonCrypto/iphonesimulator.modulemap
|
||||
|
|
@ -1,24 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>en</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>$(EXECUTABLE_NAME)</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>$(PRODUCT_NAME)</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>FMWK</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.0</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>$(CURRENT_PROJECT_VERSION)</string>
|
||||
<key>NSPrincipalClass</key>
|
||||
<string></string>
|
||||
</dict>
|
||||
</plist>
|
||||
|
|
@ -1,4 +0,0 @@
|
|||
module CommonCrypto [system] {
|
||||
header "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/usr/include/CommonCrypto/CommonCrypto.h"
|
||||
export *
|
||||
}
|
||||
|
|
@ -1,4 +0,0 @@
|
|||
module CommonCrypto [system] {
|
||||
header "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/usr/include/CommonCrypto/CommonCrypto.h"
|
||||
export *
|
||||
}
|
||||
|
|
@ -18,8 +18,6 @@
|
|||
EF05EDC11EAF706200CAE7B6 /* BaseDateFormatter.swift in Sources */ = {isa = PBXBuildFile; fileRef = EF05EDBE1EAF706200CAE7B6 /* BaseDateFormatter.swift */; };
|
||||
EF05EDC61EAF70EB00CAE7B6 /* TouchIDService.swift in Sources */ = {isa = PBXBuildFile; fileRef = EF05EDC51EAF70EB00CAE7B6 /* TouchIDService.swift */; };
|
||||
EF05EDC81EAF91D500CAE7B6 /* BasePassCodeService.swift in Sources */ = {isa = PBXBuildFile; fileRef = EF05EDC71EAF91D500CAE7B6 /* BasePassCodeService.swift */; };
|
||||
EF05EDD21EAF9CF100CAE7B6 /* CommonCrypto.h in Headers */ = {isa = PBXBuildFile; fileRef = EF05EDD01EAF9CF100CAE7B6 /* CommonCrypto.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
EF05EDDA1EAF9D4A00CAE7B6 /* CommonCrypto.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = EF05EDCE1EAF9CF100CAE7B6 /* CommonCrypto.framework */; settings = {ATTRIBUTES = (Weak, ); }; };
|
||||
EF05EDE11EAFA74200CAE7B6 /* BasePassCodeViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = EF05EDE01EAFA74200CAE7B6 /* BasePassCodeViewController.swift */; };
|
||||
EF05EDE31EAFA7A600CAE7B6 /* BasePassCodeViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = EF05EDE21EAFA7A600CAE7B6 /* BasePassCodeViewModel.swift */; };
|
||||
EF05EDE51EAFA80D00CAE7B6 /* PassCodeConfiguration.swift in Sources */ = {isa = PBXBuildFile; fileRef = EF05EDE41EAFA80D00CAE7B6 /* PassCodeConfiguration.swift */; };
|
||||
|
|
@ -49,12 +47,6 @@
|
|||
EF05EDBE1EAF706200CAE7B6 /* BaseDateFormatter.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BaseDateFormatter.swift; sourceTree = "<group>"; };
|
||||
EF05EDC51EAF70EB00CAE7B6 /* TouchIDService.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TouchIDService.swift; sourceTree = "<group>"; };
|
||||
EF05EDC71EAF91D500CAE7B6 /* BasePassCodeService.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BasePassCodeService.swift; sourceTree = "<group>"; };
|
||||
EF05EDCE1EAF9CF100CAE7B6 /* CommonCrypto.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = CommonCrypto.framework; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
EF05EDD01EAF9CF100CAE7B6 /* CommonCrypto.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CommonCrypto.h; sourceTree = "<group>"; };
|
||||
EF05EDD11EAF9CF100CAE7B6 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
|
||||
EF05EDD61EAF9D2900CAE7B6 /* CommonCrypto.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = CommonCrypto.xcconfig; sourceTree = "<group>"; };
|
||||
EF05EDD71EAF9D2900CAE7B6 /* iphoneos.modulemap */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = "sourcecode.module-map"; path = iphoneos.modulemap; sourceTree = "<group>"; };
|
||||
EF05EDD81EAF9D2900CAE7B6 /* iphonesimulator.modulemap */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = "sourcecode.module-map"; path = iphonesimulator.modulemap; sourceTree = "<group>"; };
|
||||
EF05EDE01EAFA74200CAE7B6 /* BasePassCodeViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BasePassCodeViewController.swift; sourceTree = "<group>"; };
|
||||
EF05EDE21EAFA7A600CAE7B6 /* BasePassCodeViewModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BasePassCodeViewModel.swift; sourceTree = "<group>"; };
|
||||
EF05EDE41EAFA80D00CAE7B6 /* PassCodeConfiguration.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PassCodeConfiguration.swift; sourceTree = "<group>"; };
|
||||
|
|
@ -73,18 +65,10 @@
|
|||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
EF05EDDA1EAF9D4A00CAE7B6 /* CommonCrypto.framework in Frameworks */,
|
||||
7A94B4A5956B82BE1CEBA873 /* Pods_LeadKitAdditions.framework in Frameworks */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
EF05EDCA1EAF9CF100CAE7B6 /* Frameworks */ = {
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXFrameworksBuildPhase section */
|
||||
|
||||
/* Begin PBXGroup section */
|
||||
|
|
@ -100,7 +84,6 @@
|
|||
isa = PBXGroup;
|
||||
children = (
|
||||
CAE698E51E968820000394B0 /* LeadKitAdditions */,
|
||||
EF05EDCF1EAF9CF100CAE7B6 /* CommonCrypto */,
|
||||
CAE698E41E968820000394B0 /* Products */,
|
||||
F8A65FEC7C0EB4B93746E50F /* Pods */,
|
||||
A3117951840B8B7D2E7A8A80 /* Frameworks */,
|
||||
|
|
@ -111,7 +94,6 @@
|
|||
isa = PBXGroup;
|
||||
children = (
|
||||
CAE698E31E968820000394B0 /* LeadKitAdditions.framework */,
|
||||
EF05EDCE1EAF9CF100CAE7B6 /* CommonCrypto.framework */,
|
||||
);
|
||||
name = Products;
|
||||
sourceTree = "<group>";
|
||||
|
|
@ -170,18 +152,6 @@
|
|||
path = Enums;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
EF05EDCF1EAF9CF100CAE7B6 /* CommonCrypto */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
EF05EDD01EAF9CF100CAE7B6 /* CommonCrypto.h */,
|
||||
EF05EDD61EAF9D2900CAE7B6 /* CommonCrypto.xcconfig */,
|
||||
EF05EDD11EAF9CF100CAE7B6 /* Info.plist */,
|
||||
EF05EDD71EAF9D2900CAE7B6 /* iphoneos.modulemap */,
|
||||
EF05EDD81EAF9D2900CAE7B6 /* iphonesimulator.modulemap */,
|
||||
);
|
||||
path = CommonCrypto;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
EF05EDDB1EAFA6FA00CAE7B6 /* Controllers */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
|
|
@ -257,14 +227,6 @@
|
|||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
EF05EDCB1EAF9CF100CAE7B6 /* Headers */ = {
|
||||
isa = PBXHeadersBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
EF05EDD21EAF9CF100CAE7B6 /* CommonCrypto.h in Headers */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXHeadersBuildPhase section */
|
||||
|
||||
/* Begin PBXNativeTarget section */
|
||||
|
|
@ -290,24 +252,6 @@
|
|||
productReference = CAE698E31E968820000394B0 /* LeadKitAdditions.framework */;
|
||||
productType = "com.apple.product-type.framework";
|
||||
};
|
||||
EF05EDCD1EAF9CF100CAE7B6 /* CommonCrypto */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = EF05EDD31EAF9CF100CAE7B6 /* Build configuration list for PBXNativeTarget "CommonCrypto" */;
|
||||
buildPhases = (
|
||||
EF05EDC91EAF9CF100CAE7B6 /* Sources */,
|
||||
EF05EDCA1EAF9CF100CAE7B6 /* Frameworks */,
|
||||
EF05EDCB1EAF9CF100CAE7B6 /* Headers */,
|
||||
EF05EDCC1EAF9CF100CAE7B6 /* Resources */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
);
|
||||
name = CommonCrypto;
|
||||
productName = CommonCrypto;
|
||||
productReference = EF05EDCE1EAF9CF100CAE7B6 /* CommonCrypto.framework */;
|
||||
productType = "com.apple.product-type.framework";
|
||||
};
|
||||
/* End PBXNativeTarget section */
|
||||
|
||||
/* Begin PBXProject section */
|
||||
|
|
@ -322,10 +266,6 @@
|
|||
LastSwiftMigration = 0830;
|
||||
ProvisioningStyle = Manual;
|
||||
};
|
||||
EF05EDCD1EAF9CF100CAE7B6 = {
|
||||
CreatedOnToolsVersion = 8.3.1;
|
||||
ProvisioningStyle = Manual;
|
||||
};
|
||||
};
|
||||
};
|
||||
buildConfigurationList = CAE698DD1E968820000394B0 /* Build configuration list for PBXProject "LeadKitAdditions" */;
|
||||
|
|
@ -341,7 +281,6 @@
|
|||
projectRoot = "";
|
||||
targets = (
|
||||
CAE698E21E968820000394B0 /* LeadKitAdditions */,
|
||||
EF05EDCD1EAF9CF100CAE7B6 /* CommonCrypto */,
|
||||
);
|
||||
};
|
||||
/* End PBXProject section */
|
||||
|
|
@ -354,13 +293,6 @@
|
|||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
EF05EDCC1EAF9CF100CAE7B6 /* Resources */ = {
|
||||
isa = PBXResourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXResourcesBuildPhase section */
|
||||
|
||||
/* Begin PBXShellScriptBuildPhase section */
|
||||
|
|
@ -452,13 +384,6 @@
|
|||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
EF05EDC91EAF9CF100CAE7B6 /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXSourcesBuildPhase section */
|
||||
|
||||
/* Begin XCBuildConfiguration section */
|
||||
|
|
@ -612,52 +537,6 @@
|
|||
};
|
||||
name = Release;
|
||||
};
|
||||
EF05EDD41EAF9CF100CAE7B6 /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
CODE_SIGN_IDENTITY = "";
|
||||
DEFINES_MODULE = YES;
|
||||
DEVELOPMENT_TEAM = "";
|
||||
DYLIB_COMPATIBILITY_VERSION = 1;
|
||||
DYLIB_CURRENT_VERSION = 1;
|
||||
DYLIB_INSTALL_NAME_BASE = "@rpath";
|
||||
INFOPLIST_FILE = CommonCrypto/Info.plist;
|
||||
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
|
||||
"MODULEMAP_FILE[sdk=iphoneos*]" = /Users/alexeygerasimov/Documents/dev/LeadKitAdditions/LeadKitAdditions/CommonCrypto/iphoneos.modulemap;
|
||||
"MODULEMAP_FILE[sdk=iphonesimulator*]" = /Users/alexeygerasimov/Documents/dev/LeadKitAdditions/LeadKitAdditions/CommonCrypto/iphonesimulator.modulemap;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.touchin.CommonCrypto;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||
SKIP_INSTALL = YES;
|
||||
SWIFT_VERSION = 3.0;
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
EF05EDD51EAF9CF100CAE7B6 /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
CODE_SIGN_IDENTITY = "";
|
||||
DEFINES_MODULE = YES;
|
||||
DEVELOPMENT_TEAM = "";
|
||||
DYLIB_COMPATIBILITY_VERSION = 1;
|
||||
DYLIB_CURRENT_VERSION = 1;
|
||||
DYLIB_INSTALL_NAME_BASE = "@rpath";
|
||||
INFOPLIST_FILE = CommonCrypto/Info.plist;
|
||||
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
|
||||
"MODULEMAP_FILE[sdk=iphoneos*]" = /Users/alexeygerasimov/Documents/dev/LeadKitAdditions/LeadKitAdditions/CommonCrypto/iphoneos.modulemap;
|
||||
"MODULEMAP_FILE[sdk=iphonesimulator*]" = /Users/alexeygerasimov/Documents/dev/LeadKitAdditions/LeadKitAdditions/CommonCrypto/iphonesimulator.modulemap;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.touchin.CommonCrypto;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||
SKIP_INSTALL = YES;
|
||||
SWIFT_VERSION = 3.0;
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
/* End XCBuildConfiguration section */
|
||||
|
||||
/* Begin XCConfigurationList section */
|
||||
|
|
@ -679,14 +558,6 @@
|
|||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
EF05EDD31EAF9CF100CAE7B6 /* Build configuration list for PBXNativeTarget "CommonCrypto" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
EF05EDD41EAF9CF100CAE7B6 /* Debug */,
|
||||
EF05EDD51EAF9CF100CAE7B6 /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
};
|
||||
/* End XCConfigurationList section */
|
||||
};
|
||||
rootObject = CAE698DA1E968820000394B0 /* Project object */;
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@
|
|||
|
||||
import KeychainAccess
|
||||
import CocoaLumberjack
|
||||
import CommonCrypto
|
||||
import IDZSwiftCommonCrypto
|
||||
|
||||
open class BasePassCodeService {
|
||||
|
||||
|
|
@ -98,21 +98,10 @@ extension BasePassCodeService {
|
|||
private extension BasePassCodeService {
|
||||
|
||||
func sha256(_ str: String) -> String? {
|
||||
guard let data = str.data(using: String.Encoding.utf8), let shaData = sha256(data) else {
|
||||
guard let digests = Digest(algorithm: .sha256).update(string: str)?.final() else {
|
||||
return nil
|
||||
}
|
||||
|
||||
let rc = shaData.base64EncodedString(options: [])
|
||||
return rc
|
||||
}
|
||||
|
||||
func sha256(_ data: Data) -> Data? {
|
||||
guard let res = NSMutableData(length: Int(CC_SHA256_DIGEST_LENGTH)) else {
|
||||
return nil
|
||||
}
|
||||
|
||||
CC_SHA256((data as NSData).bytes, CC_LONG(data.count), res.mutableBytes.assumingMemoryBound(to: UInt8.self))
|
||||
return res as Data
|
||||
return hexString(fromArray: digests)
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,9 +7,8 @@ target 'LeadKitAdditions' do
|
|||
use_frameworks!
|
||||
|
||||
pod 'LeadKit', :git => 'https://github.com/TouchInstinct/LeadKit.git', :branch => 'fix/sharedApplication', :commit => 'fd0eb18b8a6680ff16bbb1668d1ae0d29f29fad7'
|
||||
pod 'TableKit'
|
||||
pod 'KeychainAccess'
|
||||
|
||||
pod 'IDZSwiftCommonCrypto'
|
||||
end
|
||||
|
||||
# If you have slow HDD
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@ PODS:
|
|||
- CocoaLumberjack/Default (3.1.0)
|
||||
- CocoaLumberjack/Swift (3.1.0):
|
||||
- CocoaLumberjack/Default
|
||||
- IDZSwiftCommonCrypto (0.9.1)
|
||||
- KeychainAccess (3.0.2)
|
||||
- LeadKit (0.4.6):
|
||||
- CocoaLumberjack/Swift (~> 3.1.0)
|
||||
|
|
@ -20,13 +21,12 @@ PODS:
|
|||
- RxCocoa (3.2.0):
|
||||
- RxSwift (~> 3.1)
|
||||
- RxSwift (3.2.0)
|
||||
- TableKit (2.3.1)
|
||||
- Toast-Swift (2.0.0)
|
||||
|
||||
DEPENDENCIES:
|
||||
- IDZSwiftCommonCrypto
|
||||
- KeychainAccess
|
||||
- LeadKit (from `https://github.com/TouchInstinct/LeadKit.git`, commit `fd0eb18b8a6680ff16bbb1668d1ae0d29f29fad7`, branch `fix/sharedApplication`)
|
||||
- TableKit
|
||||
|
||||
EXTERNAL SOURCES:
|
||||
LeadKit:
|
||||
|
|
@ -42,15 +42,15 @@ CHECKOUT OPTIONS:
|
|||
SPEC CHECKSUMS:
|
||||
Alamofire: dc44b1600b800eb63da6a19039a0083d62a6a62d
|
||||
CocoaLumberjack: 8311463ddf9ee86a06ef92a071dd656c89244500
|
||||
IDZSwiftCommonCrypto: c44fe5c0219a219846b56b4c148615dd06e58591
|
||||
KeychainAccess: a986406022dfc7c634c691ad3bec670cc6a32002
|
||||
LeadKit: d688a8bef79de7bbd83d553da3cb6c5292d48f2d
|
||||
ObjectMapper: fb30f71e08470d1e5a20b199fafe1246281db898
|
||||
RxAlamofire: 0b1fa48f545fffe7f7a28af2086bcaa3b5946cc9
|
||||
RxCocoa: ccdf43101a70407097a29082f648ba1676075b30
|
||||
RxSwift: 46574f70d416b7923c237195939cc488a7fbf3a0
|
||||
TableKit: 02e041b443f75fa3e9f1ee6024d4b256305bd904
|
||||
Toast-Swift: 5b2f8f720f7e78e48511f693df1f9c9a6e38a25a
|
||||
|
||||
PODFILE CHECKSUM: f6bfca600b479c264f39b85593af2629edff3515
|
||||
PODFILE CHECKSUM: 8e8ba1566ac9d3fe5b93325ab2faa9c76da42cd5
|
||||
|
||||
COCOAPODS: 1.2.1
|
||||
|
|
|
|||
Loading…
Reference in New Issue