From a7b325d6de9e7ddbf458c3ecd3a2bfaad4afd3e7 Mon Sep 17 00:00:00 2001 From: iosdevzone Date: Mon, 14 Sep 2015 14:57:35 -0700 Subject: [PATCH 01/66] Convert to swift 2.0 --- IDZSwiftCommonCrypto/1 | 0 IDZSwiftCommonCrypto/CommonCrypto/module.map | 4 +- .../contents.xcplayground | 2 +- .../contents.xcworkspacedata | 7 + .../DemoPlayground.playground/section-1.swift | 58 ++++---- .../project.pbxproj | 2 + .../contents.xcworkspacedata | 13 ++ .../IDZSwiftCommonCrypto/Cryptor.swift | 33 +++-- .../IDZSwiftCommonCrypto/Digest.swift | 22 +-- .../IDZSwiftCommonCrypto/KeyDerivation.swift | 8 +- .../IDZSwiftCommonCrypto/Random.swift | 4 +- .../IDZSwiftCommonCrypto/Status.swift | 2 +- .../IDZSwiftCommonCrypto/StreamCryptor.swift | 132 +++++++++--------- .../IDZSwiftCommonCrypto/Utilities.swift | 4 +- .../README.playground/contents.xcplayground | 2 +- .../README.playground/section-16.swift | 29 ++-- 16 files changed, 174 insertions(+), 148 deletions(-) delete mode 100644 IDZSwiftCommonCrypto/1 create mode 100644 IDZSwiftCommonCrypto/DemoPlayground.playground/playground.xcworkspace/contents.xcworkspacedata create mode 100644 IDZSwiftCommonCrypto/IDZSwiftCommonCrypto.xcworkspace/contents.xcworkspacedata diff --git a/IDZSwiftCommonCrypto/1 b/IDZSwiftCommonCrypto/1 deleted file mode 100644 index e69de29..0000000 diff --git a/IDZSwiftCommonCrypto/CommonCrypto/module.map b/IDZSwiftCommonCrypto/CommonCrypto/module.map index 16ac586..2f35f96 100644 --- a/IDZSwiftCommonCrypto/CommonCrypto/module.map +++ b/IDZSwiftCommonCrypto/CommonCrypto/module.map @@ -1,5 +1,5 @@ module CommonCrypto [system] { - header "/Applications/Xcode-6.0.1-6A317.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.0.sdk/usr/include/CommonCrypto/CommonCrypto.h" - header "/Applications/Xcode-6.0.1-6A317.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.0.sdk/usr/include/CommonCrypto/CommonRandom.h" + header "/Applications/Xcode-7.0-7A218.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.0.sdk/usr/include/CommonCrypto/CommonCrypto.h" + header "/Applications/Xcode-7.0-7A218.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.0.sdk/usr/include/CommonCrypto/CommonRandom.h" export * } diff --git a/IDZSwiftCommonCrypto/DemoPlayground.playground/contents.xcplayground b/IDZSwiftCommonCrypto/DemoPlayground.playground/contents.xcplayground index 8e39341..f06e216 100644 --- a/IDZSwiftCommonCrypto/DemoPlayground.playground/contents.xcplayground +++ b/IDZSwiftCommonCrypto/DemoPlayground.playground/contents.xcplayground @@ -1,5 +1,5 @@ - + diff --git a/IDZSwiftCommonCrypto/DemoPlayground.playground/playground.xcworkspace/contents.xcworkspacedata b/IDZSwiftCommonCrypto/DemoPlayground.playground/playground.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..919434a --- /dev/null +++ b/IDZSwiftCommonCrypto/DemoPlayground.playground/playground.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/IDZSwiftCommonCrypto/DemoPlayground.playground/section-1.swift b/IDZSwiftCommonCrypto/DemoPlayground.playground/section-1.swift index 07c3a96..06bf173 100644 --- a/IDZSwiftCommonCrypto/DemoPlayground.playground/section-1.swift +++ b/IDZSwiftCommonCrypto/DemoPlayground.playground/section-1.swift @@ -3,7 +3,7 @@ import UIKit import CommonCrypto import IDZSwiftCommonCrypto -var ss = "" +var ss = "" as NSString ss.stringByAppendingPathComponent("hello") @@ -38,22 +38,18 @@ var randomBytes = hexStringFromArray(Random.generateBytes(16)) // MARK: - Crypto Demo func test_StreamCryptor_AES_ECB() { - var key = arrayFromHexString("2b7e151628aed2a6abf7158809cf4f3c") - var plainText = arrayFromHexString("6bc1bee22e409f96e93d7e117393172a") - var expectedCipherText = arrayFromHexString("3ad77bb40d7a3660a89ecaf32466ef97") + let key = arrayFromHexString("2b7e151628aed2a6abf7158809cf4f3c") + let plainText = arrayFromHexString("6bc1bee22e409f96e93d7e117393172a") + let expectedCipherText = arrayFromHexString("3ad77bb40d7a3660a89ecaf32466ef97") - var aesEncrypt = StreamCryptor(operation:.Encrypt, algorithm:.AES, options:.ECBMode, key:key, iv:Array()) + let aesEncrypt = StreamCryptor(operation:.Encrypt, algorithm:.AES, options:.ECBMode, key:key, iv:Array()) var cipherText : [UInt8] = [] var dataOut = Array(count:plainText.count, repeatedValue:UInt8(0)) - var (byteCount, status) = aesEncrypt.update(plainText, byteArrayOut: &dataOut) + let (byteCount, status) = aesEncrypt.update(plainText, byteArrayOut: &dataOut) dataOut "\(status)" status - - var c = UIColor.redColor() - - cipherText += dataOut[0..()).update(plainText)?.final() + let cipherText = Cryptor(operation:.Encrypt, algorithm:.AES, options:.ECBMode, key:key, iv:Array()).update(plainText)?.final() assert(expectedCipherText.count == cipherText!.count , "Counts are as expected") assert(expectedCipherText == cipherText!, "Obtained expected cipher text") @@ -79,14 +75,14 @@ test_Cryptor_AES_ECB_1() // Double repeated block ECB mode // Shows weakness of ECB mode -- same plaintext block gets same ciphertext func test_Cryptor_AES_ECB_2() { - var key = arrayFromHexString("2b7e151628aed2a6abf7158809cf4f3c") + let key = arrayFromHexString("2b7e151628aed2a6abf7158809cf4f3c") var plainText = arrayFromHexString("6bc1bee22e409f96e93d7e117393172a") var expectedCipherText = arrayFromHexString("3ad77bb40d7a3660a89ecaf32466ef97") plainText += plainText expectedCipherText += expectedCipherText - var cipherText = Cryptor(operation:.Encrypt, algorithm:.AES, options:.ECBMode, key:key, iv:Array()).update(plainText)?.final() + let cipherText = Cryptor(operation:.Encrypt, algorithm:.AES, options:.ECBMode, key:key, iv:Array()).update(plainText)?.final() assert(expectedCipherText.count == cipherText!.count , "Counts are as expected") assert(expectedCipherText == cipherText!, "Obtained expected cipher text") @@ -99,27 +95,29 @@ test_Cryptor_AES_ECB_2() // Single block ECB mode func test_Cryptor_AES_ECB_Short() { - var key = arrayFromHexString("2b7e151628aed2a6abf7158809cf4f3c") - var plainText = arrayFromHexString("6bc1bee22e409f96e93d7e11739317") - var expectedCipherText = arrayFromHexString("3ad77bb40d7a3660a89ecaf32466ef97") + let key = arrayFromHexString("2b7e151628aed2a6abf7158809cf4f3c") + let plainText = arrayFromHexString("6bc1bee22e409f96e93d7e11739317") + let expectedCipherText = arrayFromHexString("3ad77bb40d7a3660a89ecaf32466ef97") - var cryptor = Cryptor(operation:.Encrypt, algorithm:.AES, options:.ECBMode, key:key, iv:Array()) - var cipherText = cryptor.update(plainText)?.final() + let cryptor = Cryptor(operation:.Encrypt, algorithm:.AES, options:.ECBMode, key:key, iv:Array()) + let cipherText = cryptor.update(plainText)?.final() if(cipherText == nil) { - println("Encryption failed (as expected) with status \(cryptor.status)") + print("Encryption failed (as expected) with status \(cryptor.status)") } } test_Cryptor_AES_ECB_Short() func test_Cryptor_AES_ECB_Short_Padding() { - var key = arrayFromHexString("2b7e151628aed2a6abf7158809cf4f3c") - var plainText = arrayFromHexString("6bc1bee22e409f96e93d7e11739317") - var expectedCipherText = arrayFromHexString("21ea2ba3e445a0ef710a7c26618d1975") + let key = arrayFromHexString("2b7e151628aed2a6abf7158809cf4f3c") + let plainText = arrayFromHexString("6bc1bee22e409f96e93d7e11739317") + let expectedCipherText = arrayFromHexString("21ea2ba3e445a0ef710a7c26618d1975") - var cryptor = Cryptor(operation:.Encrypt, algorithm:.AES, options:.ECBMode | .PKCS7Padding, key:key, iv:Array()) - var cipherText = cryptor.update(plainText)?.final() + let cryptor = Cryptor(operation:.Encrypt, + algorithm:.AES, + options:[.ECBMode,.PKCS7Padding], key:key, iv:Array()) + let cipherText = cryptor.update(plainText)?.final() assert(cipherText != nil) assert(cipherText! == expectedCipherText) } @@ -130,13 +128,13 @@ func test_Cryptor_AES_ECB_Short_Padding() { //test_Cryptor_AES_CBC_1() func test_Cryptor_AES_CBC_2() { - var key = arrayFromHexString("2b7e151628aed2a6abf7158809cf4f3c") + let key = arrayFromHexString("2b7e151628aed2a6abf7158809cf4f3c") var plainText = arrayFromHexString("6bc1bee22e409f96e93d7e117393172a") - var expectedCipherText = arrayFromHexString("3ad77bb40d7a3660a89ecaf32466ef97025c61efee87e604cd1b12ce9dde5c51") + let expectedCipherText = arrayFromHexString("3ad77bb40d7a3660a89ecaf32466ef97025c61efee87e604cd1b12ce9dde5c51") plainText += plainText - var optionalCipherText = Cryptor(operation:.Encrypt, algorithm:.AES, options:.None, key:key, iv:Array()).update(plainText)?.final() + let optionalCipherText = Cryptor(operation:.Encrypt, algorithm:.AES, options:.None, key:key, iv:Array()).update(plainText)?.final() if let cipherText = optionalCipherText { diff --git a/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto.xcodeproj/project.pbxproj b/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto.xcodeproj/project.pbxproj index 2de27f3..954572d 100644 --- a/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto.xcodeproj/project.pbxproj +++ b/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto.xcodeproj/project.pbxproj @@ -189,6 +189,8 @@ 0CCB89A219CE05F800068ED6 /* Project object */ = { isa = PBXProject; attributes = { + LastSwiftMigration = 0700; + LastSwiftUpdateCheck = 0700; LastUpgradeCheck = 0600; ORGANIZATIONNAME = iOSDeveloperZone.com; TargetAttributes = { diff --git a/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto.xcworkspace/contents.xcworkspacedata b/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..2757628 --- /dev/null +++ b/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,13 @@ + + + + + + + + + diff --git a/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/Cryptor.swift b/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/Cryptor.swift index a89dfab..7a97527 100644 --- a/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/Cryptor.swift +++ b/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/Cryptor.swift @@ -22,24 +22,24 @@ public class Cryptor : StreamCryptor Upates the accumulated encrypted/decrypted data with the contents of a Objective-C NSData buffer. - :param: data the data buffer - :returns: this Cryptor object or nil if an error occurs (for optional chaining) + - parameter data: the data buffer + - returns: this Cryptor object or nil if an error occurs (for optional chaining) */ public func update(data: NSData) -> Cryptor? { - update(data.bytes, byteCount: UInt(data.length)) + update(data.bytes, byteCount: data.length) return self.status == Status.Success ? self : nil } /** Upates the accumulated encrypted/decrypted data with the contents of a Swift byte array. - :param: byteArray the Swift byte array - :returns: this Cryptor object or nil if an error occurs (for optional chaining) + - parameter byteArray: the Swift byte array + - returns: this Cryptor object or nil if an error occurs (for optional chaining) */ public func update(byteArray: [UInt8]) -> Cryptor? { - update(byteArray, byteCount: UInt(byteArray.count)) + update(byteArray, byteCount: byteArray.count) return self.status == Status.Success ? self : nil } /** @@ -48,24 +48,23 @@ public class Cryptor : StreamCryptor This is really only useful for encryption. - :returns: this Cryptor object or nil if an error occurs (for optional chaining) + - returns: this Cryptor object or nil if an error occurs (for optional chaining) */ public func update(string: String) -> Cryptor? { - update(string, byteCount: UInt(string.lengthOfBytesUsingEncoding(NSUTF8StringEncoding))) + update(string, byteCount: string.lengthOfBytesUsingEncoding(NSUTF8StringEncoding)) return self.status == Status.Success ? self : nil } /** Retrieves the encrypted or decrypted data. - :returns: the encrypted or decrypted data or nil if an error occured. + - returns: the encrypted or decrypted data or nil if an error occured. */ public func final() -> [UInt8]? { - var byteCount = Int(self.getOutputLength(0, isFinal: true)) + let byteCount = Int(self.getOutputLength(0, isFinal: true)) var dataOut = Array(count:byteCount, repeatedValue:0) - var dataOutAvailable = UInt(dataOut.count) - var dataOutMoved = UInt(0) + var dataOutMoved = 0 (dataOutMoved, self.status) = final(&dataOut) if(self.status != Status.Success) { return nil @@ -81,14 +80,14 @@ public class Cryptor : StreamCryptor It is not envisaged the users of the framework will need to call this directly. - :returns: this Cryptor object or nil if an error occurs (for optional chaining) + - returns: this Cryptor object or nil if an error occurs (for optional chaining) */ - public func update(buffer: UnsafePointer, byteCount: UInt) -> Cryptor? + public func update(buffer: UnsafePointer, byteCount: Int) -> Cryptor? { - var outputLength = Int(self.getOutputLength(byteCount, isFinal: false)) + let outputLength = self.getOutputLength(byteCount, isFinal: false) var dataOut = Array(count:outputLength, repeatedValue:0) - var dataOutMoved = UInt(0) - update(buffer, byteCountIn: byteCount, bufferOut: &dataOut, byteCapacityOut: UInt(dataOut.count), byteCountOut: &dataOutMoved) + var dataOutMoved = 0 + update(buffer, byteCountIn: byteCount, bufferOut: &dataOut, byteCapacityOut: dataOut.count, byteCountOut: &dataOutMoved) if(self.status != Status.Success) { return nil } diff --git a/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/Digest.swift b/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/Digest.swift index 8eacf7a..ce8a728 100644 --- a/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/Digest.swift +++ b/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/Digest.swift @@ -39,7 +39,7 @@ public class Digest var engine: DigestEngine /** Create an algorithm-specific digest calculator - :param: alrgorithm the desired message digest algorithm + - parameter alrgorithm: the desired message digest algorithm */ public init(algorithm: Algorithm) { @@ -66,9 +66,9 @@ public class Digest Low-level update routine. Updates the message digest calculation with the contents of a byte buffer. - :param: buffer the buffer - :param: the number of bytes in buffer - :returns: this Digest object (for optional chaining) + - parameter buffer: the buffer + - parameter the: number of bytes in buffer + - returns: this Digest object (for optional chaining) */ public func update(buffer: UnsafePointer, _ byteCount: CC_LONG) -> Digest? { @@ -78,8 +78,8 @@ public class Digest /** Updates the message digest with an NSData buffer. - :param: data the data buffer - :returns: this Digest object (for optional chaining) + - parameter data: the data buffer + - returns: this Digest object (for optional chaining) */ public func update(data : NSData) -> Digest? { @@ -89,8 +89,8 @@ public class Digest /** Updates the message digest with the contents of a Swift byte array - :param: byteArray the byteArray - :returns: this Digest object (for optional chaining) + - parameter byteArray: the byteArray + - returns: this Digest object (for optional chaining) */ public func update(byteArray : [UInt8]) -> Digest? { @@ -102,8 +102,8 @@ public class Digest Updates the message digest being calculated with the contents of a string interpreted as UTF8. - :param: s the string - :returns: this Digest object (for optional chaining) + - parameter s: the string + - returns: this Digest object (for optional chaining) */ public func update(string : String) -> Digest? { @@ -113,7 +113,7 @@ public class Digest /** Completes the calculate of the messge digest - :returns: the message digest + - returns: the message digest */ public func final() -> [UInt8] { diff --git a/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/KeyDerivation.swift b/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/KeyDerivation.swift index 439599c..7050d6a 100644 --- a/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/KeyDerivation.swift +++ b/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/KeyDerivation.swift @@ -27,14 +27,14 @@ public class PBKDF } } } - public class func calibrate(passwordLength: UInt, saltLength: UInt, algorithm: PseudoRandomAlgorithm, derivedKeyLength: UInt, msec : UInt32) -> UInt + public class func calibrate(passwordLength: Int, saltLength: Int, algorithm: PseudoRandomAlgorithm, derivedKeyLength: Int, msec : UInt32) -> UInt { return UInt(CCCalibratePBKDF(CCPBKDFAlgorithm(kCCPBKDF2), passwordLength, saltLength, algorithm.nativeValue(), derivedKeyLength, msec)) } - public class func deriveKey(password: UnsafePointer, passwordLen: UInt, salt: UnsafePointer, saltLen: UInt, prf: PseudoRandomAlgorithm, rounds: uint, derivedKey: UnsafeMutablePointer, derivedKeyLen: UInt) + public class func deriveKey(password: UnsafePointer, passwordLen: Int, salt: UnsafePointer, saltLen: Int, prf: PseudoRandomAlgorithm, rounds: uint, derivedKey: UnsafeMutablePointer, derivedKeyLen: Int) { - var status : Int32 = CCKeyDerivationPBKDF(CCPBKDFAlgorithm(kCCPBKDF2), password, passwordLen, salt, saltLen, prf.nativeValue(), rounds, derivedKey, derivedKeyLen) + let status : Int32 = CCKeyDerivationPBKDF(CCPBKDFAlgorithm(kCCPBKDF2), password, passwordLen, salt, saltLen, prf.nativeValue(), rounds, derivedKey, derivedKeyLen) if(status != Int32(kCCSuccess)) { NSLog("ERROR: CCKeyDerivationPBDK failed with stats \(status).") @@ -45,7 +45,7 @@ public class PBKDF public class func deriveKey(password : String, salt : String, prf: PseudoRandomAlgorithm, rounds: uint, derivedKeyLength: UInt) -> [UInt8] { var derivedKey = Array(count:Int(derivedKeyLength), repeatedValue: 0) - var status : Int32 = CCKeyDerivationPBKDF(CCPBKDFAlgorithm(kCCPBKDF2), password, UInt(password.lengthOfBytesUsingEncoding(NSUTF8StringEncoding)), salt, UInt(salt.lengthOfBytesUsingEncoding(NSUTF8StringEncoding)), prf.nativeValue(), rounds, &derivedKey, UInt(derivedKey.count)) + let status : Int32 = CCKeyDerivationPBKDF(CCPBKDFAlgorithm(kCCPBKDF2), password, password.lengthOfBytesUsingEncoding(NSUTF8StringEncoding), salt, salt.lengthOfBytesUsingEncoding(NSUTF8StringEncoding), prf.nativeValue(), rounds, &derivedKey, derivedKey.count) if(status != Int32(kCCSuccess)) { NSLog("ERROR: CCKeyDerivationPBDK failed with stats \(status).") diff --git a/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/Random.swift b/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/Random.swift index efc67c0..e51b14e 100644 --- a/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/Random.swift +++ b/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/Random.swift @@ -11,7 +11,7 @@ import CommonCrypto public class Random { - public class func generateBytes(bytes : UnsafeMutablePointer, byteCount : UInt ) + public class func generateBytes(bytes : UnsafeMutablePointer, byteCount : Int ) { CCRandomGenerateBytes(bytes, byteCount) } @@ -23,7 +23,7 @@ public class Random fatalError("generateBytes: byteCount must be positve and non-zero") } var bytes : [UInt8] = Array(count:byteCount, repeatedValue:UInt8(0)) - CCRandomGenerateBytes(&bytes, UInt(byteCount)) + CCRandomGenerateBytes(&bytes, byteCount) return bytes } } \ No newline at end of file diff --git a/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/Status.swift b/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/Status.swift index 66d794b..dd1d063 100644 --- a/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/Status.swift +++ b/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/Status.swift @@ -9,7 +9,7 @@ import Foundation import CommonCrypto -public enum Status : CCCryptorStatus, Printable +public enum Status : CCCryptorStatus, CustomStringConvertible { case Success, ParamError, diff --git a/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/StreamCryptor.swift b/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/StreamCryptor.swift index 98db580..72fe56d 100644 --- a/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/StreamCryptor.swift +++ b/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/StreamCryptor.swift @@ -68,9 +68,9 @@ public class StreamCryptor * NSHipster * From: http://nshipster.com/rawoptionsettype/ */ - public struct Options : RawOptionSetType, BooleanType { + public struct Options : OptionSetType, BooleanType { private var value: UInt = 0 - typealias RawValue = UInt + public typealias RawValue = UInt public var rawValue : UInt { return self.value } public init(_ rawValue: UInt) { @@ -91,11 +91,11 @@ public class StreamCryptor // Needed for 1.0 _RawOptionSet public static func fromMask(raw: UInt) -> Options { - return self(raw) + return self.init(raw) } public static func fromRaw(raw: UInt) -> Options? { - return self(raw) + return self.init(raw) } public func toRaw() -> UInt { @@ -107,16 +107,16 @@ public class StreamCryptor } public static var allZeros: Options { - return self(0) + return self.init(0) } public static func convertFromNilLiteral() -> Options { - return self(0) + return self.init(0) } - public static var None: Options { return self(0) } - public static var PKCS7Padding: Options { return self(UInt(kCCOptionPKCS7Padding)) } - public static var ECBMode: Options { return self(UInt(kCCOptionECBMode)) } + public static var None: Options { return self.init(0) } + public static var PKCS7Padding: Options { return self.init(UInt(kCCOptionPKCS7Padding)) } + public static var ECBMode: Options { return self.init(UInt(kCCOptionECBMode)) } } @@ -131,69 +131,69 @@ public class StreamCryptor /** Creates a new StreamCryptor - :param: operation the operation to perform see Operation (Encrypt, Decrypt) - :param: algorithm the algorithm to use see Algorithm (AES, DES, TripleDES, CAST, RC2, Blowfish) - :param: key a byte array containing key data - :param: iv a byte array containing initialization vector + - parameter operation: the operation to perform see Operation (Encrypt, Decrypt) + - parameter algorithm: the algorithm to use see Algorithm (AES, DES, TripleDES, CAST, RC2, Blowfish) + - parameter key: a byte array containing key data + - parameter iv: a byte array containing initialization vector */ public convenience init(operation: Operation, algorithm: Algorithm, options: Options, key: [UInt8], iv : [UInt8]) { - self.init(operation:operation, algorithm:algorithm, options:options, keyBuffer:key, keyByteCount:UInt(key.count), ivBuffer:iv) + self.init(operation:operation, algorithm:algorithm, options:options, keyBuffer:key, keyByteCount:key.count, ivBuffer:iv) } /** Creates a new StreamCryptor - :param: operation the operation to perform see Operation (Encrypt, Decrypt) - :param: algorithm the algorithm to use see Algorithm (AES, DES, TripleDES, CAST, RC2, Blowfish) - :param: key a string containing key data (will be interpreted as UTF8) - :param: iv a string containing initialization vector data (will be interpreted as UTF8) + - parameter operation: the operation to perform see Operation (Encrypt, Decrypt) + - parameter algorithm: the algorithm to use see Algorithm (AES, DES, TripleDES, CAST, RC2, Blowfish) + - parameter key: a string containing key data (will be interpreted as UTF8) + - parameter iv: a string containing initialization vector data (will be interpreted as UTF8) */ public convenience init(operation: Operation, algorithm: Algorithm, options: Options, key: String, iv : String) { - self.init(operation:operation, algorithm:algorithm, options:options, keyBuffer:key, keyByteCount:UInt(key.lengthOfBytesUsingEncoding(NSUTF8StringEncoding)), ivBuffer:iv) + self.init(operation:operation, algorithm:algorithm, options:options, keyBuffer:key, keyByteCount:key.lengthOfBytesUsingEncoding(NSUTF8StringEncoding), ivBuffer:iv) } /** Add the contents of an Objective-C NSData buffer to the current encryption/decryption operation. - :param: dataIn the input data - :param: byteArrayOut output data - :returns: a tuple containing the number of output bytes produced and the status (see Status) + - parameter dataIn: the input data + - parameter byteArrayOut: output data + - returns: a tuple containing the number of output bytes produced and the status (see Status) */ - public func update(dataIn: NSData, inout byteArrayOut: [UInt8]) -> (UInt, Status) + public func update(dataIn: NSData, inout byteArrayOut: [UInt8]) -> (Int, Status) { - var dataOutAvailable = UInt(byteArrayOut.count) - var dataOutMoved = UInt(0) - update(dataIn.bytes, byteCountIn: UInt(dataIn.length), bufferOut: &byteArrayOut, byteCapacityOut: UInt(byteArrayOut.count), byteCountOut: &dataOutMoved) + let dataOutAvailable = byteArrayOut.count + var dataOutMoved = 0 + update(dataIn.bytes, byteCountIn: dataIn.length, bufferOut: &byteArrayOut, byteCapacityOut: dataOutAvailable, byteCountOut: &dataOutMoved) return (dataOutMoved, self.status) } /** Add the contents of a Swift byte array to the current encryption/decryption operation. - :param: byteArrayIn the input data - :param: byteArrayOut output data - :returns: a tuple containing the number of output bytes produced and the status (see Status) + - parameter byteArrayIn: the input data + - parameter byteArrayOut: output data + - returns: a tuple containing the number of output bytes produced and the status (see Status) */ - public func update(byteArrayIn: [UInt8], inout byteArrayOut: [UInt8]) -> (UInt, Status) + public func update(byteArrayIn: [UInt8], inout byteArrayOut: [UInt8]) -> (Int, Status) { - var dataOutAvailable = UInt(byteArrayOut.count) - var dataOutMoved = UInt(0) - update(byteArrayIn, byteCountIn: UInt(byteArrayIn.count), bufferOut: &byteArrayOut, byteCapacityOut: UInt(byteArrayOut.count), byteCountOut: &dataOutMoved) + let dataOutAvailable = byteArrayOut.count + var dataOutMoved = 0 + update(byteArrayIn, byteCountIn: byteArrayIn.count, bufferOut: &byteArrayOut, byteCapacityOut: dataOutAvailable, byteCountOut: &dataOutMoved) return (dataOutMoved, self.status) } /** Add the contents of a string (interpreted as UTF8) to the current encryption/decryption operation. - :param: byteArrayIn the input data - :param: byteArrayOut output data - :returns: a tuple containing the number of output bytes produced and the status (see Status) + - parameter byteArrayIn: the input data + - parameter byteArrayOut: output data + - returns: a tuple containing the number of output bytes produced and the status (see Status) */ - public func update(stringIn: String, inout byteArrayOut: [UInt8]) -> (UInt, Status) + public func update(stringIn: String, inout byteArrayOut: [UInt8]) -> (Int, Status) { - var dataOutAvailable = UInt(byteArrayOut.count) - var dataOutMoved = UInt(0) - update(stringIn, byteCountIn: UInt(stringIn.lengthOfBytesUsingEncoding(NSUTF8StringEncoding)), bufferOut: &byteArrayOut, byteCapacityOut: UInt(byteArrayOut.count), byteCountOut: &dataOutMoved) + let dataOutAvailable = byteArrayOut.count + var dataOutMoved = 0 + update(stringIn, byteCountIn: stringIn.lengthOfBytesUsingEncoding(NSUTF8StringEncoding), bufferOut: &byteArrayOut, byteCapacityOut: dataOutAvailable, byteCountOut: &dataOutMoved) return (dataOutMoved, self.status) } /** @@ -205,27 +205,27 @@ public class StreamCryptor :note: This method updates the status property - :param: byteArrayOut the output bffer - :returns: a tuple containing the number of output bytes produced and the status (see Status) + - parameter byteArrayOut: the output bffer + - returns: a tuple containing the number of output bytes produced and the status (see Status) */ - public func final(inout byteArrayOut: [UInt8]) -> (UInt, Status) + public func final(inout byteArrayOut: [UInt8]) -> (Int, Status) { - var dataOutAvailable = UInt(byteArrayOut.count) - var dataOutMoved = UInt(0) - final(&byteArrayOut, byteCapacityOut: UInt(byteArrayOut.count), byteCountOut: &dataOutMoved) + let dataOutAvailable = byteArrayOut.count + var dataOutMoved = 0 + final(&byteArrayOut, byteCapacityOut: dataOutAvailable, byteCountOut: &dataOutMoved) return (dataOutMoved, self.status) } // MARK: - Low-level interface /** - :param: operation the operation to perform see Operation (Encrypt, Decrypt) - :param: algorithm the algorithm to use see Algorithm (AES, DES, TripleDES, CAST, RC2, Blowfish) - :param: keyBuffer pointer to key buffer - :param: keyByteCount number of bytes in the key - :param: ivBuffer initialization vector buffer + - parameter operation: the operation to perform see Operation (Encrypt, Decrypt) + - parameter algorithm: the algorithm to use see Algorithm (AES, DES, TripleDES, CAST, RC2, Blowfish) + - parameter keyBuffer: pointer to key buffer + - parameter keyByteCount: number of bytes in the key + - parameter ivBuffer: initialization vector buffer */ public init(operation: Operation, algorithm: Algorithm, options: Options, keyBuffer: UnsafePointer, - keyByteCount: UInt, ivBuffer: UnsafePointer) + keyByteCount: Int, ivBuffer: UnsafePointer) { let rawStatus = CCCryptorCreate(operation.nativeValue(), algorithm.nativeValue(), CCOptions(options.toRaw()), keyBuffer, keyByteCount, ivBuffer, context) if let status = Status.fromRaw(rawStatus) @@ -239,14 +239,14 @@ public class StreamCryptor } } /** - :param: bufferIn pointer to input buffer - :param: inByteCount number of bytes contained in input buffer - :param: bufferOut pointer to output buffer - :param: outByteCapacity capacity of the output buffer in bytes - :param: outByteCount on successful completion, the number of bytes written to the output buffer - :returns: + - parameter bufferIn: pointer to input buffer + - parameter inByteCount: number of bytes contained in input buffer + - parameter bufferOut: pointer to output buffer + - parameter outByteCapacity: capacity of the output buffer in bytes + - parameter outByteCount: on successful completion, the number of bytes written to the output buffer + - returns: */ - public func update(bufferIn: UnsafePointer, byteCountIn: UInt, bufferOut: UnsafeMutablePointer, byteCapacityOut : UInt, inout byteCountOut : UInt) -> Status + public func update(bufferIn: UnsafePointer, byteCountIn: Int, bufferOut: UnsafeMutablePointer, byteCapacityOut : Int, inout byteCountOut : Int) -> Status { if(self.status == Status.Success) { @@ -273,11 +273,11 @@ public class StreamCryptor :note: This method updates the status property - :param: bufferOut pointer to output buffer - :param: outByteCapacity capacity of the output buffer in bytes - :param: outByteCount on successful completion, the number of bytes written to the output buffer + - parameter bufferOut: pointer to output buffer + - parameter outByteCapacity: capacity of the output buffer in bytes + - parameter outByteCount: on successful completion, the number of bytes written to the output buffer */ - public func final(bufferOut: UnsafeMutablePointer, byteCapacityOut : UInt, inout byteCountOut : UInt) -> Status + public func final(bufferOut: UnsafeMutablePointer, byteCapacityOut : Int, inout byteCountOut : Int) -> Status { if(self.status == Status.Success) { @@ -298,10 +298,10 @@ public class StreamCryptor Determines the number of bytes that wil be output by this Cryptor if inputBytes of additional data is input. - :param: inputByteCount number of bytes that will be input. - :param: isFinal true if buffer to be input will be the last input buffer, false otherwise. + - parameter inputByteCount: number of bytes that will be input. + - parameter isFinal: true if buffer to be input will be the last input buffer, false otherwise. */ - public func getOutputLength(inputByteCount : UInt, isFinal : Bool = false) -> UInt + public func getOutputLength(inputByteCount : Int, isFinal : Bool = false) -> Int { return CCCryptorGetOutputLength(context.memory, inputByteCount, isFinal) } diff --git a/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/Utilities.swift b/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/Utilities.swift index ff5b249..19d664e 100644 --- a/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/Utilities.swift +++ b/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/Utilities.swift @@ -50,10 +50,10 @@ public func dataFromByteArray(a : [UInt8]) -> NSData public func hexStringFromArray(a : [UInt8], uppercase : Bool = false) -> String { - return a.map() { String(format:uppercase ? "%02X" : "%02x", $0) }.reduce("", +) + return a.map() { String(format:uppercase ? "%02X" : "%02x", $0) }.reduce("", combine: +) } public func hexNSStringFromArray(a : [UInt8], uppercase : Bool = false) -> NSString { - return a.map() { String(format:uppercase ? "%02X" : "%02x", $0) }.reduce("", +) + return a.map() { String(format:uppercase ? "%02X" : "%02x", $0) }.reduce("", combine: +) } \ No newline at end of file diff --git a/IDZSwiftCommonCrypto/README.playground/contents.xcplayground b/IDZSwiftCommonCrypto/README.playground/contents.xcplayground index 178d9e6..4f78035 100644 --- a/IDZSwiftCommonCrypto/README.playground/contents.xcplayground +++ b/IDZSwiftCommonCrypto/README.playground/contents.xcplayground @@ -1,5 +1,5 @@ - + diff --git a/IDZSwiftCommonCrypto/README.playground/section-16.swift b/IDZSwiftCommonCrypto/README.playground/section-16.swift index 3b2f33d..06e307d 100644 --- a/IDZSwiftCommonCrypto/README.playground/section-16.swift +++ b/IDZSwiftCommonCrypto/README.playground/section-16.swift @@ -5,11 +5,11 @@ func crypt(sc : StreamCryptor, inputStream: NSInputStream, outputStream: NSOutp inputStream.open() outputStream.open() - var cryptedBytes : UInt = 0 + var cryptedBytes = 0 while inputStream.hasBytesAvailable { let bytesRead = inputStream.read(&inputBuffer, maxLength: inputBuffer.count) - let status = sc.update(inputBuffer, byteCountIn: UInt(bytesRead), bufferOut: &outputBuffer, byteCapacityOut: UInt(outputBuffer.count), byteCountOut: &cryptedBytes) + let status = sc.update(inputBuffer, byteCountIn: bytesRead, bufferOut: &outputBuffer, byteCapacityOut: outputBuffer.count, byteCountOut: &cryptedBytes) assert(status == Status.Success) if(cryptedBytes > 0) { @@ -17,7 +17,7 @@ func crypt(sc : StreamCryptor, inputStream: NSInputStream, outputStream: NSOutp assert(bytesWritten == Int(cryptedBytes)) } } - let status = sc.final(&outputBuffer, byteCapacityOut: UInt(outputBuffer.count), byteCountOut: &cryptedBytes) + let status = sc.final(&outputBuffer, byteCapacityOut: outputBuffer.count, byteCountOut: &cryptedBytes) assert(status == Status.Success) if(cryptedBytes > 0) { @@ -29,7 +29,7 @@ func crypt(sc : StreamCryptor, inputStream: NSInputStream, outputStream: NSOutp } let imagePath = NSBundle.mainBundle().pathForResource("Riscal", ofType:"jpg")! -let tmp = NSTemporaryDirectory() +let tmp = NSTemporaryDirectory() as NSString let encryptedFilePath = tmp.stringByAppendingPathComponent("Riscal.xjpgx") var decryptedFilePath = tmp.stringByAppendingPathComponent("RiscalDecrypted.jpg") @@ -39,13 +39,20 @@ var encryptedFileInputStream = NSInputStream(fileAtPath: encryptedFilePath) var decryptedFileOutputStream = NSOutputStream(toFileAtPath: decryptedFilePath, append:false) var sc = StreamCryptor(operation:.Encrypt, algorithm:.AES, options:.PKCS7Padding, key:key, iv:Array()) -crypt(sc, imageInputStream, encryptedFileOutputStream, 1024) -// Uncomment this line to verify that the file is encrypted -//var encryptedImage = UIImage(contentsOfFile:encryptedFile) +if let imageInputStream = imageInputStream, + let encryptedFileInputStream = encryptedFileInputStream, + let encryptedFileOutputStream = encryptedFileOutputStream, + let decryptedFileOutputStream = decryptedFileOutputStream +{ + crypt(sc, inputStream:imageInputStream, outputStream:encryptedFileOutputStream, bufferSize:1024) + + // Uncomment this line to verify that the file is encrypted + //var encryptedImage = UIImage(contentsOfFile:encryptedFile) -sc = StreamCryptor(operation:.Decrypt, algorithm:.AES, options:.PKCS7Padding, key:key, iv:Array()) -crypt(sc, encryptedFileInputStream, decryptedFileOutputStream, 1024) + sc = StreamCryptor(operation:.Decrypt, algorithm:.AES, options:.PKCS7Padding, key:key, iv:Array()) + crypt(sc, inputStream:encryptedFileInputStream, outputStream:decryptedFileOutputStream, bufferSize:1024) -var image = UIImage(named:"Riscal.jpg") -var decryptedImage = UIImage(contentsOfFile:decryptedFilePath) + var image = UIImage(named:"Riscal.jpg") + var decryptedImage = UIImage(contentsOfFile:decryptedFilePath) +} From d81667613bfa1a725d86075b8c98aaa7e97d7ff0 Mon Sep 17 00:00:00 2001 From: iosdevzone Date: Mon, 14 Sep 2015 15:37:59 -0700 Subject: [PATCH 02/66] Add app target to verify on device. Travis to Xcode7 --- .travis.yml | 1 + .../project.pbxproj | 389 ++++++++++++++++++ .../AppDelegate.swift | 68 +++ .../AppIcon.appiconset/Contents.json | 68 +++ .../Base.lproj/LaunchScreen.storyboard | 27 ++ .../Base.lproj/Main.storyboard | 25 ++ .../IDZSwiftCommonCryptoTestApp/Info.plist | 47 +++ .../ViewController.swift | 25 ++ .../IDZSwiftCommonCryptoTestAppTests.swift | 56 +++ .../Info.plist | 24 ++ .../IDZSwiftCommonCryptoTestAppUITests.swift | 36 ++ .../Info.plist | 24 ++ 12 files changed, 790 insertions(+) create mode 100644 IDZSwiftCommonCrypto/IDZSwiftCommonCryptoTestApp/AppDelegate.swift create mode 100644 IDZSwiftCommonCrypto/IDZSwiftCommonCryptoTestApp/Assets.xcassets/AppIcon.appiconset/Contents.json create mode 100644 IDZSwiftCommonCrypto/IDZSwiftCommonCryptoTestApp/Base.lproj/LaunchScreen.storyboard create mode 100644 IDZSwiftCommonCrypto/IDZSwiftCommonCryptoTestApp/Base.lproj/Main.storyboard create mode 100644 IDZSwiftCommonCrypto/IDZSwiftCommonCryptoTestApp/Info.plist create mode 100644 IDZSwiftCommonCrypto/IDZSwiftCommonCryptoTestApp/ViewController.swift create mode 100644 IDZSwiftCommonCrypto/IDZSwiftCommonCryptoTestAppTests/IDZSwiftCommonCryptoTestAppTests.swift create mode 100644 IDZSwiftCommonCrypto/IDZSwiftCommonCryptoTestAppTests/Info.plist create mode 100644 IDZSwiftCommonCrypto/IDZSwiftCommonCryptoTestAppUITests/IDZSwiftCommonCryptoTestAppUITests.swift create mode 100644 IDZSwiftCommonCrypto/IDZSwiftCommonCryptoTestAppUITests/Info.plist diff --git a/.travis.yml b/.travis.yml index d62dfd6..3784c0b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,4 +1,5 @@ language: objective-c +osx_image: xcode7 install: - npm install -g swift-playground-builder diff --git a/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto.xcodeproj/project.pbxproj b/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto.xcodeproj/project.pbxproj index 954572d..73262e8 100644 --- a/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto.xcodeproj/project.pbxproj +++ b/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto.xcodeproj/project.pbxproj @@ -18,6 +18,15 @@ 0CCB89CC19CE071D00068ED6 /* KeyDerivation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0CCB89C719CE071D00068ED6 /* KeyDerivation.swift */; }; 0CCB89CD19CE071D00068ED6 /* Random.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0CCB89C819CE071D00068ED6 /* Random.swift */; }; 0CCB89D219CF416B00068ED6 /* Utilities.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0CCB89D119CF416B00068ED6 /* Utilities.swift */; }; + 308499AA1BA77BC20025B41D /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 308499A91BA77BC20025B41D /* AppDelegate.swift */; }; + 308499AC1BA77BC20025B41D /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 308499AB1BA77BC20025B41D /* ViewController.swift */; }; + 308499AF1BA77BC20025B41D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 308499AD1BA77BC20025B41D /* Main.storyboard */; }; + 308499B11BA77BC20025B41D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 308499B01BA77BC20025B41D /* Assets.xcassets */; }; + 308499B41BA77BC20025B41D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 308499B21BA77BC20025B41D /* LaunchScreen.storyboard */; }; + 308499BF1BA77BC20025B41D /* IDZSwiftCommonCryptoTestAppTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 308499BE1BA77BC20025B41D /* IDZSwiftCommonCryptoTestAppTests.swift */; }; + 308499CA1BA77BC20025B41D /* IDZSwiftCommonCryptoTestAppUITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 308499C91BA77BC20025B41D /* IDZSwiftCommonCryptoTestAppUITests.swift */; }; + 308499D51BA77F2B0025B41D /* IDZSwiftCommonCrypto.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0CCB89AB19CE05F800068ED6 /* IDZSwiftCommonCrypto.framework */; }; + 308499D61BA77F2B0025B41D /* IDZSwiftCommonCrypto.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 0CCB89AB19CE05F800068ED6 /* IDZSwiftCommonCrypto.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -28,8 +37,43 @@ remoteGlobalIDString = 0CCB89AA19CE05F800068ED6; remoteInfo = IDZSwiftCommonCrypto; }; + 308499BB1BA77BC20025B41D /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 0CCB89A219CE05F800068ED6 /* Project object */; + proxyType = 1; + remoteGlobalIDString = 308499A61BA77BC20025B41D; + remoteInfo = IDZSwiftCommonCryptoTestApp; + }; + 308499C61BA77BC20025B41D /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 0CCB89A219CE05F800068ED6 /* Project object */; + proxyType = 1; + remoteGlobalIDString = 308499A61BA77BC20025B41D; + remoteInfo = IDZSwiftCommonCryptoTestApp; + }; + 308499D71BA77F2B0025B41D /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 0CCB89A219CE05F800068ED6 /* Project object */; + proxyType = 1; + remoteGlobalIDString = 0CCB89AA19CE05F800068ED6; + remoteInfo = IDZSwiftCommonCrypto; + }; /* End PBXContainerItemProxy section */ +/* Begin PBXCopyFilesBuildPhase section */ + 308499D91BA77F2B0025B41D /* Embed Frameworks */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 10; + files = ( + 308499D61BA77F2B0025B41D /* IDZSwiftCommonCrypto.framework in Embed Frameworks */, + ); + name = "Embed Frameworks"; + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXCopyFilesBuildPhase section */ + /* Begin PBXFileReference section */ 0C09D79919E0CFB500A93684 /* README.playground */ = {isa = PBXFileReference; lastKnownFileType = file.playground; path = README.playground; sourceTree = ""; }; 0C09D79A19E0D4C900A93684 /* README.md */ = {isa = PBXFileReference; explicitFileType = net.daringfireball.markdown; fileEncoding = 4; name = README.md; path = ../README.md; sourceTree = ""; }; @@ -49,6 +93,19 @@ 0CCB89C719CE071D00068ED6 /* KeyDerivation.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = KeyDerivation.swift; sourceTree = ""; }; 0CCB89C819CE071D00068ED6 /* Random.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Random.swift; sourceTree = ""; }; 0CCB89D119CF416B00068ED6 /* Utilities.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Utilities.swift; sourceTree = ""; }; + 308499A71BA77BC20025B41D /* IDZSwiftCommonCryptoTestApp.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = IDZSwiftCommonCryptoTestApp.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 308499A91BA77BC20025B41D /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + 308499AB1BA77BC20025B41D /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; + 308499AE1BA77BC20025B41D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; + 308499B01BA77BC20025B41D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 308499B31BA77BC20025B41D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; + 308499B51BA77BC20025B41D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 308499BA1BA77BC20025B41D /* IDZSwiftCommonCryptoTestAppTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = IDZSwiftCommonCryptoTestAppTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + 308499BE1BA77BC20025B41D /* IDZSwiftCommonCryptoTestAppTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = IDZSwiftCommonCryptoTestAppTests.swift; sourceTree = ""; }; + 308499C01BA77BC20025B41D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 308499C51BA77BC20025B41D /* IDZSwiftCommonCryptoTestAppUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = IDZSwiftCommonCryptoTestAppUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + 308499C91BA77BC20025B41D /* IDZSwiftCommonCryptoTestAppUITests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = IDZSwiftCommonCryptoTestAppUITests.swift; sourceTree = ""; }; + 308499CB1BA77BC20025B41D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -66,6 +123,28 @@ ); runOnlyForDeploymentPostprocessing = 0; }; + 308499A41BA77BC20025B41D /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 308499D51BA77F2B0025B41D /* IDZSwiftCommonCrypto.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 308499B71BA77BC20025B41D /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 308499C21BA77BC20025B41D /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ @@ -78,6 +157,9 @@ 0C8D2B7419D2832B00552664 /* DemoPlayground.playground */, 0CCB89AD19CE05F800068ED6 /* IDZSwiftCommonCrypto */, 0CCB89B719CE05F800068ED6 /* IDZSwiftCommonCryptoTests */, + 308499A81BA77BC20025B41D /* IDZSwiftCommonCryptoTestApp */, + 308499BD1BA77BC20025B41D /* IDZSwiftCommonCryptoTestAppTests */, + 308499C81BA77BC20025B41D /* IDZSwiftCommonCryptoTestAppUITests */, 0CCB89AC19CE05F800068ED6 /* Products */, ); sourceTree = ""; @@ -87,6 +169,9 @@ children = ( 0CCB89AB19CE05F800068ED6 /* IDZSwiftCommonCrypto.framework */, 0CCB89B619CE05F800068ED6 /* IDZSwiftCommonCryptoTests.xctest */, + 308499A71BA77BC20025B41D /* IDZSwiftCommonCryptoTestApp.app */, + 308499BA1BA77BC20025B41D /* IDZSwiftCommonCryptoTestAppTests.xctest */, + 308499C51BA77BC20025B41D /* IDZSwiftCommonCryptoTestAppUITests.xctest */, ); name = Products; sourceTree = ""; @@ -133,6 +218,37 @@ name = "Supporting Files"; sourceTree = ""; }; + 308499A81BA77BC20025B41D /* IDZSwiftCommonCryptoTestApp */ = { + isa = PBXGroup; + children = ( + 308499A91BA77BC20025B41D /* AppDelegate.swift */, + 308499AB1BA77BC20025B41D /* ViewController.swift */, + 308499AD1BA77BC20025B41D /* Main.storyboard */, + 308499B01BA77BC20025B41D /* Assets.xcassets */, + 308499B21BA77BC20025B41D /* LaunchScreen.storyboard */, + 308499B51BA77BC20025B41D /* Info.plist */, + ); + path = IDZSwiftCommonCryptoTestApp; + sourceTree = ""; + }; + 308499BD1BA77BC20025B41D /* IDZSwiftCommonCryptoTestAppTests */ = { + isa = PBXGroup; + children = ( + 308499BE1BA77BC20025B41D /* IDZSwiftCommonCryptoTestAppTests.swift */, + 308499C01BA77BC20025B41D /* Info.plist */, + ); + path = IDZSwiftCommonCryptoTestAppTests; + sourceTree = ""; + }; + 308499C81BA77BC20025B41D /* IDZSwiftCommonCryptoTestAppUITests */ = { + isa = PBXGroup; + children = ( + 308499C91BA77BC20025B41D /* IDZSwiftCommonCryptoTestAppUITests.swift */, + 308499CB1BA77BC20025B41D /* Info.plist */, + ); + path = IDZSwiftCommonCryptoTestAppUITests; + sourceTree = ""; + }; /* End PBXGroup section */ /* Begin PBXHeadersBuildPhase section */ @@ -183,6 +299,61 @@ productReference = 0CCB89B619CE05F800068ED6 /* IDZSwiftCommonCryptoTests.xctest */; productType = "com.apple.product-type.bundle.unit-test"; }; + 308499A61BA77BC20025B41D /* IDZSwiftCommonCryptoTestApp */ = { + isa = PBXNativeTarget; + buildConfigurationList = 308499D21BA77BC20025B41D /* Build configuration list for PBXNativeTarget "IDZSwiftCommonCryptoTestApp" */; + buildPhases = ( + 308499A31BA77BC20025B41D /* Sources */, + 308499A41BA77BC20025B41D /* Frameworks */, + 308499A51BA77BC20025B41D /* Resources */, + 308499D91BA77F2B0025B41D /* Embed Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + 308499D81BA77F2B0025B41D /* PBXTargetDependency */, + ); + name = IDZSwiftCommonCryptoTestApp; + productName = IDZSwiftCommonCryptoTestApp; + productReference = 308499A71BA77BC20025B41D /* IDZSwiftCommonCryptoTestApp.app */; + productType = "com.apple.product-type.application"; + }; + 308499B91BA77BC20025B41D /* IDZSwiftCommonCryptoTestAppTests */ = { + isa = PBXNativeTarget; + buildConfigurationList = 308499D31BA77BC20025B41D /* Build configuration list for PBXNativeTarget "IDZSwiftCommonCryptoTestAppTests" */; + buildPhases = ( + 308499B61BA77BC20025B41D /* Sources */, + 308499B71BA77BC20025B41D /* Frameworks */, + 308499B81BA77BC20025B41D /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + 308499BC1BA77BC20025B41D /* PBXTargetDependency */, + ); + name = IDZSwiftCommonCryptoTestAppTests; + productName = IDZSwiftCommonCryptoTestAppTests; + productReference = 308499BA1BA77BC20025B41D /* IDZSwiftCommonCryptoTestAppTests.xctest */; + productType = "com.apple.product-type.bundle.unit-test"; + }; + 308499C41BA77BC20025B41D /* IDZSwiftCommonCryptoTestAppUITests */ = { + isa = PBXNativeTarget; + buildConfigurationList = 308499D41BA77BC20025B41D /* Build configuration list for PBXNativeTarget "IDZSwiftCommonCryptoTestAppUITests" */; + buildPhases = ( + 308499C11BA77BC20025B41D /* Sources */, + 308499C21BA77BC20025B41D /* Frameworks */, + 308499C31BA77BC20025B41D /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + 308499C71BA77BC20025B41D /* PBXTargetDependency */, + ); + name = IDZSwiftCommonCryptoTestAppUITests; + productName = IDZSwiftCommonCryptoTestAppUITests; + productReference = 308499C51BA77BC20025B41D /* IDZSwiftCommonCryptoTestAppUITests.xctest */; + productType = "com.apple.product-type.bundle.ui-testing"; + }; /* End PBXNativeTarget section */ /* Begin PBXProject section */ @@ -200,6 +371,17 @@ 0CCB89B519CE05F800068ED6 = { CreatedOnToolsVersion = 6.0.1; }; + 308499A61BA77BC20025B41D = { + CreatedOnToolsVersion = 7.0; + }; + 308499B91BA77BC20025B41D = { + CreatedOnToolsVersion = 7.0; + TestTargetID = 308499A61BA77BC20025B41D; + }; + 308499C41BA77BC20025B41D = { + CreatedOnToolsVersion = 7.0; + TestTargetID = 308499A61BA77BC20025B41D; + }; }; }; buildConfigurationList = 0CCB89A519CE05F800068ED6 /* Build configuration list for PBXProject "IDZSwiftCommonCrypto" */; @@ -208,6 +390,7 @@ hasScannedForEncodings = 0; knownRegions = ( en, + Base, ); mainGroup = 0CCB89A119CE05F800068ED6; productRefGroup = 0CCB89AC19CE05F800068ED6 /* Products */; @@ -216,6 +399,9 @@ targets = ( 0CCB89AA19CE05F800068ED6 /* IDZSwiftCommonCrypto */, 0CCB89B519CE05F800068ED6 /* IDZSwiftCommonCryptoTests */, + 308499A61BA77BC20025B41D /* IDZSwiftCommonCryptoTestApp */, + 308499B91BA77BC20025B41D /* IDZSwiftCommonCryptoTestAppTests */, + 308499C41BA77BC20025B41D /* IDZSwiftCommonCryptoTestAppUITests */, ); }; /* End PBXProject section */ @@ -235,6 +421,30 @@ ); runOnlyForDeploymentPostprocessing = 0; }; + 308499A51BA77BC20025B41D /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 308499B41BA77BC20025B41D /* LaunchScreen.storyboard in Resources */, + 308499B11BA77BC20025B41D /* Assets.xcassets in Resources */, + 308499AF1BA77BC20025B41D /* Main.storyboard in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 308499B81BA77BC20025B41D /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 308499C31BA77BC20025B41D /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; /* End PBXResourcesBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ @@ -262,6 +472,31 @@ ); runOnlyForDeploymentPostprocessing = 0; }; + 308499A31BA77BC20025B41D /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 308499AC1BA77BC20025B41D /* ViewController.swift in Sources */, + 308499AA1BA77BC20025B41D /* AppDelegate.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 308499B61BA77BC20025B41D /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 308499BF1BA77BC20025B41D /* IDZSwiftCommonCryptoTestAppTests.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 308499C11BA77BC20025B41D /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 308499CA1BA77BC20025B41D /* IDZSwiftCommonCryptoTestAppUITests.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; /* End PBXSourcesBuildPhase section */ /* Begin PBXTargetDependency section */ @@ -270,8 +505,42 @@ target = 0CCB89AA19CE05F800068ED6 /* IDZSwiftCommonCrypto */; targetProxy = 0CCB89CE19CE0EDF00068ED6 /* PBXContainerItemProxy */; }; + 308499BC1BA77BC20025B41D /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 308499A61BA77BC20025B41D /* IDZSwiftCommonCryptoTestApp */; + targetProxy = 308499BB1BA77BC20025B41D /* PBXContainerItemProxy */; + }; + 308499C71BA77BC20025B41D /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 308499A61BA77BC20025B41D /* IDZSwiftCommonCryptoTestApp */; + targetProxy = 308499C61BA77BC20025B41D /* PBXContainerItemProxy */; + }; + 308499D81BA77F2B0025B41D /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 0CCB89AA19CE05F800068ED6 /* IDZSwiftCommonCrypto */; + targetProxy = 308499D71BA77F2B0025B41D /* PBXContainerItemProxy */; + }; /* End PBXTargetDependency section */ +/* Begin PBXVariantGroup section */ + 308499AD1BA77BC20025B41D /* Main.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 308499AE1BA77BC20025B41D /* Base */, + ); + name = Main.storyboard; + sourceTree = ""; + }; + 308499B21BA77BC20025B41D /* LaunchScreen.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 308499B31BA77BC20025B41D /* Base */, + ); + name = LaunchScreen.storyboard; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + /* Begin XCBuildConfiguration section */ 0CCB89BC19CE05F800068ED6 /* Debug */ = { isa = XCBuildConfiguration; @@ -433,6 +702,102 @@ }; name = Release; }; + 308499CC1BA77BC20025B41D /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + DEBUG_INFORMATION_FORMAT = dwarf; + EMBEDDED_CONTENT_CONTAINS_SWIFT = YES; + ENABLE_TESTABILITY = YES; + GCC_NO_COMMON_BLOCKS = YES; + INFOPLIST_FILE = IDZSwiftCommonCryptoTestApp/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 9.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = com.iosdeveloperzone.IDZSwiftCommonCryptoTestApp; + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = Debug; + }; + 308499CD1BA77BC20025B41D /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + EMBEDDED_CONTENT_CONTAINS_SWIFT = YES; + GCC_NO_COMMON_BLOCKS = YES; + INFOPLIST_FILE = IDZSwiftCommonCryptoTestApp/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 9.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = com.iosdeveloperzone.IDZSwiftCommonCryptoTestApp; + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = Release; + }; + 308499CE1BA77BC20025B41D /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_TESTABILITY = YES; + GCC_NO_COMMON_BLOCKS = YES; + INFOPLIST_FILE = IDZSwiftCommonCryptoTestAppTests/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 9.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = com.iosdeveloperzone.IDZSwiftCommonCryptoTestAppTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/IDZSwiftCommonCryptoTestApp.app/IDZSwiftCommonCryptoTestApp"; + }; + name = Debug; + }; + 308499CF1BA77BC20025B41D /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + GCC_NO_COMMON_BLOCKS = YES; + INFOPLIST_FILE = IDZSwiftCommonCryptoTestAppTests/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 9.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = com.iosdeveloperzone.IDZSwiftCommonCryptoTestAppTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/IDZSwiftCommonCryptoTestApp.app/IDZSwiftCommonCryptoTestApp"; + }; + name = Release; + }; + 308499D01BA77BC20025B41D /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_TESTABILITY = YES; + GCC_NO_COMMON_BLOCKS = YES; + INFOPLIST_FILE = IDZSwiftCommonCryptoTestAppUITests/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 9.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = com.iosdeveloperzone.IDZSwiftCommonCryptoTestAppUITests; + PRODUCT_NAME = "$(TARGET_NAME)"; + TEST_TARGET_NAME = IDZSwiftCommonCryptoTestApp; + USES_XCTRUNNER = YES; + }; + name = Debug; + }; + 308499D11BA77BC20025B41D /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + GCC_NO_COMMON_BLOCKS = YES; + INFOPLIST_FILE = IDZSwiftCommonCryptoTestAppUITests/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 9.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = com.iosdeveloperzone.IDZSwiftCommonCryptoTestAppUITests; + PRODUCT_NAME = "$(TARGET_NAME)"; + TEST_TARGET_NAME = IDZSwiftCommonCryptoTestApp; + USES_XCTRUNNER = YES; + }; + name = Release; + }; /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ @@ -463,6 +828,30 @@ defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; + 308499D21BA77BC20025B41D /* Build configuration list for PBXNativeTarget "IDZSwiftCommonCryptoTestApp" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 308499CC1BA77BC20025B41D /* Debug */, + 308499CD1BA77BC20025B41D /* Release */, + ); + defaultConfigurationIsVisible = 0; + }; + 308499D31BA77BC20025B41D /* Build configuration list for PBXNativeTarget "IDZSwiftCommonCryptoTestAppTests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 308499CE1BA77BC20025B41D /* Debug */, + 308499CF1BA77BC20025B41D /* Release */, + ); + defaultConfigurationIsVisible = 0; + }; + 308499D41BA77BC20025B41D /* Build configuration list for PBXNativeTarget "IDZSwiftCommonCryptoTestAppUITests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 308499D01BA77BC20025B41D /* Debug */, + 308499D11BA77BC20025B41D /* Release */, + ); + defaultConfigurationIsVisible = 0; + }; /* End XCConfigurationList section */ }; rootObject = 0CCB89A219CE05F800068ED6 /* Project object */; diff --git a/IDZSwiftCommonCrypto/IDZSwiftCommonCryptoTestApp/AppDelegate.swift b/IDZSwiftCommonCrypto/IDZSwiftCommonCryptoTestApp/AppDelegate.swift new file mode 100644 index 0000000..93c97d5 --- /dev/null +++ b/IDZSwiftCommonCrypto/IDZSwiftCommonCryptoTestApp/AppDelegate.swift @@ -0,0 +1,68 @@ +// +// AppDelegate.swift +// IDZSwiftCommonCryptoTestApp +// +// Created by Danny Keogan on 9/14/15. +// Copyright © 2015 iOSDeveloperZone.com. All rights reserved. +// + +import UIKit +import IDZSwiftCommonCrypto + +// MARK: - Crypto Demo +func test_StreamCryptor_AES_ECB() { + let key = arrayFromHexString("2b7e151628aed2a6abf7158809cf4f3c") + let plainText = arrayFromHexString("6bc1bee22e409f96e93d7e117393172a") + let expectedCipherText = arrayFromHexString("3ad77bb40d7a3660a89ecaf32466ef97") + + let aesEncrypt = StreamCryptor(operation:.Encrypt, algorithm:.AES, options:.ECBMode, key:key, iv:Array()) + var cipherText : [UInt8] = [] + var dataOut = Array(count:plainText.count, repeatedValue:UInt8(0)) + let (byteCount, status) = aesEncrypt.update(plainText, byteArrayOut: &dataOut) + + + cipherText += dataOut[0.. Bool { + // Override point for customization after application launch. + test_StreamCryptor_AES_ECB() + + return true + } + + func applicationWillResignActive(application: UIApplication) { + // 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. + // 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. + } + + func applicationDidEnterBackground(application: UIApplication) { + // 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. + // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. + } + + func applicationWillEnterForeground(application: UIApplication) { + // 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. + } + + func applicationDidBecomeActive(application: UIApplication) { + // 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. + } + + func applicationWillTerminate(application: UIApplication) { + // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. + } + + +} + diff --git a/IDZSwiftCommonCrypto/IDZSwiftCommonCryptoTestApp/Assets.xcassets/AppIcon.appiconset/Contents.json b/IDZSwiftCommonCrypto/IDZSwiftCommonCryptoTestApp/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..36d2c80 --- /dev/null +++ b/IDZSwiftCommonCrypto/IDZSwiftCommonCryptoTestApp/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,68 @@ +{ + "images" : [ + { + "idiom" : "iphone", + "size" : "29x29", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "29x29", + "scale" : "3x" + }, + { + "idiom" : "iphone", + "size" : "40x40", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "40x40", + "scale" : "3x" + }, + { + "idiom" : "iphone", + "size" : "60x60", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "60x60", + "scale" : "3x" + }, + { + "idiom" : "ipad", + "size" : "29x29", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "29x29", + "scale" : "2x" + }, + { + "idiom" : "ipad", + "size" : "40x40", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "40x40", + "scale" : "2x" + }, + { + "idiom" : "ipad", + "size" : "76x76", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "76x76", + "scale" : "2x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/IDZSwiftCommonCrypto/IDZSwiftCommonCryptoTestApp/Base.lproj/LaunchScreen.storyboard b/IDZSwiftCommonCrypto/IDZSwiftCommonCryptoTestApp/Base.lproj/LaunchScreen.storyboard new file mode 100644 index 0000000..2e721e1 --- /dev/null +++ b/IDZSwiftCommonCrypto/IDZSwiftCommonCryptoTestApp/Base.lproj/LaunchScreen.storyboard @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/IDZSwiftCommonCrypto/IDZSwiftCommonCryptoTestApp/Base.lproj/Main.storyboard b/IDZSwiftCommonCrypto/IDZSwiftCommonCryptoTestApp/Base.lproj/Main.storyboard new file mode 100644 index 0000000..3a2a49b --- /dev/null +++ b/IDZSwiftCommonCrypto/IDZSwiftCommonCryptoTestApp/Base.lproj/Main.storyboard @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/IDZSwiftCommonCrypto/IDZSwiftCommonCryptoTestApp/Info.plist b/IDZSwiftCommonCrypto/IDZSwiftCommonCryptoTestApp/Info.plist new file mode 100644 index 0000000..40c6215 --- /dev/null +++ b/IDZSwiftCommonCrypto/IDZSwiftCommonCryptoTestApp/Info.plist @@ -0,0 +1,47 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + APPL + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1 + LSRequiresIPhoneOS + + UILaunchStoryboardName + LaunchScreen + UIMainStoryboardFile + Main + UIRequiredDeviceCapabilities + + armv7 + + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UISupportedInterfaceOrientations~ipad + + UIInterfaceOrientationPortrait + UIInterfaceOrientationPortraitUpsideDown + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + + diff --git a/IDZSwiftCommonCrypto/IDZSwiftCommonCryptoTestApp/ViewController.swift b/IDZSwiftCommonCrypto/IDZSwiftCommonCryptoTestApp/ViewController.swift new file mode 100644 index 0000000..cbb213f --- /dev/null +++ b/IDZSwiftCommonCrypto/IDZSwiftCommonCryptoTestApp/ViewController.swift @@ -0,0 +1,25 @@ +// +// ViewController.swift +// IDZSwiftCommonCryptoTestApp +// +// Created by Danny Keogan on 9/14/15. +// Copyright © 2015 iOSDeveloperZone.com. All rights reserved. +// + +import UIKit + +class ViewController: UIViewController { + + override func viewDidLoad() { + super.viewDidLoad() + // Do any additional setup after loading the view, typically from a nib. + } + + override func didReceiveMemoryWarning() { + super.didReceiveMemoryWarning() + // Dispose of any resources that can be recreated. + } + + +} + diff --git a/IDZSwiftCommonCrypto/IDZSwiftCommonCryptoTestAppTests/IDZSwiftCommonCryptoTestAppTests.swift b/IDZSwiftCommonCrypto/IDZSwiftCommonCryptoTestAppTests/IDZSwiftCommonCryptoTestAppTests.swift new file mode 100644 index 0000000..9294076 --- /dev/null +++ b/IDZSwiftCommonCrypto/IDZSwiftCommonCryptoTestAppTests/IDZSwiftCommonCryptoTestAppTests.swift @@ -0,0 +1,56 @@ +// +// IDZSwiftCommonCryptoTestAppTests.swift +// IDZSwiftCommonCryptoTestAppTests +// +// Created by Danny Keogan on 9/14/15. +// Copyright © 2015 iOSDeveloperZone.com. All rights reserved. +// + +import XCTest +import IDZSwiftCommonCrypto +@testable import IDZSwiftCommonCryptoTestApp + +class IDZSwiftCommonCryptoTestAppTests: XCTestCase { + + override func setUp() { + super.setUp() + // Put setup code here. This method is called before the invocation of each test method in the class. + } + + override func tearDown() { + // Put teardown code here. This method is called after the invocation of each test method in the class. + super.tearDown() + } + + func testExample() { + // This is an example of a functional test case. + // Use XCTAssert and related functions to verify your tests produce the correct results. + } + + func testPerformanceExample() { + // This is an example of a performance test case. + self.measureBlock { + // Put the code you want to measure the time of here. + } + } + + // MARK: - Crypto Demo + func test_StreamCryptor_AES_ECB() { + let key = arrayFromHexString("2b7e151628aed2a6abf7158809cf4f3c") + let plainText = arrayFromHexString("6bc1bee22e409f96e93d7e117393172a") + let expectedCipherText = arrayFromHexString("3ad77bb40d7a3660a89ecaf32466ef97") + + let aesEncrypt = StreamCryptor(operation:.Encrypt, algorithm:.AES, options:.ECBMode, key:key, iv:Array()) + var cipherText : [UInt8] = [] + var dataOut = Array(count:plainText.count, repeatedValue:UInt8(0)) + let (byteCount, status) = aesEncrypt.update(plainText, byteArrayOut: &dataOut) + + + cipherText += dataOut[0.. + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + BNDL + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1 + + diff --git a/IDZSwiftCommonCrypto/IDZSwiftCommonCryptoTestAppUITests/IDZSwiftCommonCryptoTestAppUITests.swift b/IDZSwiftCommonCrypto/IDZSwiftCommonCryptoTestAppUITests/IDZSwiftCommonCryptoTestAppUITests.swift new file mode 100644 index 0000000..c7b0fa0 --- /dev/null +++ b/IDZSwiftCommonCrypto/IDZSwiftCommonCryptoTestAppUITests/IDZSwiftCommonCryptoTestAppUITests.swift @@ -0,0 +1,36 @@ +// +// IDZSwiftCommonCryptoTestAppUITests.swift +// IDZSwiftCommonCryptoTestAppUITests +// +// Created by Danny Keogan on 9/14/15. +// Copyright © 2015 iOSDeveloperZone.com. All rights reserved. +// + +import XCTest + +class IDZSwiftCommonCryptoTestAppUITests: XCTestCase { + + override func setUp() { + super.setUp() + + // Put setup code here. This method is called before the invocation of each test method in the class. + + // In UI tests it is usually best to stop immediately when a failure occurs. + continueAfterFailure = false + // UI tests must launch the application that they test. Doing this in setup will make sure it happens for each test method. + XCUIApplication().launch() + + // In UI tests it’s important to set the initial state - such as interface orientation - required for your tests before they run. The setUp method is a good place to do this. + } + + override func tearDown() { + // Put teardown code here. This method is called after the invocation of each test method in the class. + super.tearDown() + } + + func testExample() { + // Use recording to get started writing UI tests. + // Use XCTAssert and related functions to verify your tests produce the correct results. + } + +} diff --git a/IDZSwiftCommonCrypto/IDZSwiftCommonCryptoTestAppUITests/Info.plist b/IDZSwiftCommonCrypto/IDZSwiftCommonCryptoTestAppUITests/Info.plist new file mode 100644 index 0000000..ba72822 --- /dev/null +++ b/IDZSwiftCommonCrypto/IDZSwiftCommonCryptoTestAppUITests/Info.plist @@ -0,0 +1,24 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + BNDL + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1 + + From 2a01b99bf48f6786bddf330787db70a22db9cfe3 Mon Sep 17 00:00:00 2001 From: iosdevzone Date: Mon, 14 Sep 2015 15:46:12 -0700 Subject: [PATCH 03/66] Update travis from ios 8 -> 9. Fix username in some comments. --- .travis.yml | 6 +++--- .../IDZSwiftCommonCryptoTestApp/AppDelegate.swift | 2 +- .../IDZSwiftCommonCryptoTestApp/ViewController.swift | 2 +- .../IDZSwiftCommonCryptoTestAppTests.swift | 2 +- .../IDZSwiftCommonCryptoTestAppUITests.swift | 2 +- IDZSwiftCommonCrypto/test.bash | 2 +- 6 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.travis.yml b/.travis.yml index 3784c0b..1ed0f97 100644 --- a/.travis.yml +++ b/.travis.yml @@ -11,10 +11,10 @@ script: - git diff-files --exit-code; if [[ "$?" == "1" ]]; then git commit -a -m "Playground update from Travis [ci skip]"; git push; fi - pushd IDZSwiftCommonCrypto - rm -rf CommonCrypto -- ./GenerateCommonCryptoModule iphonesimulator8.0 . +- ./GenerateCommonCryptoModule iphonesimulator9.0 . - cat CommonCrypto/module.map - pwd -- xcodebuild build -scheme IDZSwiftCommonCrypto -destination 'platform=iOS Simulator,name=iPhone 6,OS=8.0' +- xcodebuild build -scheme IDZSwiftCommonCrypto -destination 'platform=iOS Simulator,name=iPhone 6,OS=9.0' # Remove testing pending solution to https://github.com/travis-ci/travis-ci/issues/2829 -- xcodebuild test -scheme IDZSwiftCommonCrypto -destination 'platform=iOS Simulator,name=iPhone 6,OS=8.0' +- xcodebuild test -scheme IDZSwiftCommonCrypto -destination 'platform=iOS Simulator,name=iPhone 6,OS=9.0' - popd diff --git a/IDZSwiftCommonCrypto/IDZSwiftCommonCryptoTestApp/AppDelegate.swift b/IDZSwiftCommonCrypto/IDZSwiftCommonCryptoTestApp/AppDelegate.swift index 93c97d5..f923d57 100644 --- a/IDZSwiftCommonCrypto/IDZSwiftCommonCryptoTestApp/AppDelegate.swift +++ b/IDZSwiftCommonCrypto/IDZSwiftCommonCryptoTestApp/AppDelegate.swift @@ -2,7 +2,7 @@ // AppDelegate.swift // IDZSwiftCommonCryptoTestApp // -// Created by Danny Keogan on 9/14/15. +// Created by idz on 9/14/15. // Copyright © 2015 iOSDeveloperZone.com. All rights reserved. // diff --git a/IDZSwiftCommonCrypto/IDZSwiftCommonCryptoTestApp/ViewController.swift b/IDZSwiftCommonCrypto/IDZSwiftCommonCryptoTestApp/ViewController.swift index cbb213f..daecd13 100644 --- a/IDZSwiftCommonCrypto/IDZSwiftCommonCryptoTestApp/ViewController.swift +++ b/IDZSwiftCommonCrypto/IDZSwiftCommonCryptoTestApp/ViewController.swift @@ -2,7 +2,7 @@ // ViewController.swift // IDZSwiftCommonCryptoTestApp // -// Created by Danny Keogan on 9/14/15. +// Created by idz on 9/14/15. // Copyright © 2015 iOSDeveloperZone.com. All rights reserved. // diff --git a/IDZSwiftCommonCrypto/IDZSwiftCommonCryptoTestAppTests/IDZSwiftCommonCryptoTestAppTests.swift b/IDZSwiftCommonCrypto/IDZSwiftCommonCryptoTestAppTests/IDZSwiftCommonCryptoTestAppTests.swift index 9294076..19f02bd 100644 --- a/IDZSwiftCommonCrypto/IDZSwiftCommonCryptoTestAppTests/IDZSwiftCommonCryptoTestAppTests.swift +++ b/IDZSwiftCommonCrypto/IDZSwiftCommonCryptoTestAppTests/IDZSwiftCommonCryptoTestAppTests.swift @@ -2,7 +2,7 @@ // IDZSwiftCommonCryptoTestAppTests.swift // IDZSwiftCommonCryptoTestAppTests // -// Created by Danny Keogan on 9/14/15. +// Created by idz on 9/14/15. // Copyright © 2015 iOSDeveloperZone.com. All rights reserved. // diff --git a/IDZSwiftCommonCrypto/IDZSwiftCommonCryptoTestAppUITests/IDZSwiftCommonCryptoTestAppUITests.swift b/IDZSwiftCommonCrypto/IDZSwiftCommonCryptoTestAppUITests/IDZSwiftCommonCryptoTestAppUITests.swift index c7b0fa0..fe4bba1 100644 --- a/IDZSwiftCommonCrypto/IDZSwiftCommonCryptoTestAppUITests/IDZSwiftCommonCryptoTestAppUITests.swift +++ b/IDZSwiftCommonCrypto/IDZSwiftCommonCryptoTestAppUITests/IDZSwiftCommonCryptoTestAppUITests.swift @@ -2,7 +2,7 @@ // IDZSwiftCommonCryptoTestAppUITests.swift // IDZSwiftCommonCryptoTestAppUITests // -// Created by Danny Keogan on 9/14/15. +// Created by idz on 9/14/15. // Copyright © 2015 iOSDeveloperZone.com. All rights reserved. // diff --git a/IDZSwiftCommonCrypto/test.bash b/IDZSwiftCommonCrypto/test.bash index e823ed2..dd35c4a 100755 --- a/IDZSwiftCommonCrypto/test.bash +++ b/IDZSwiftCommonCrypto/test.bash @@ -1,4 +1,4 @@ #!/bin/bash pushd /Users/idz/Documents/src/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto -xcodebuild test -scheme IDZSwiftCommonCrypto -destination 'platform=iOS Simulator,name=iPhone 6,OS=8.1' > log.out 2>&1 +xcodebuild test -scheme IDZSwiftCommonCrypto -destination 'platform=iOS Simulator,name=iPhone 6,OS=9.0' > log.out 2>&1 popd From e2c790eae90cf0fe345209875181a7afb53e117b Mon Sep 17 00:00:00 2001 From: iosdevzone Date: Mon, 14 Sep 2015 17:31:47 -0700 Subject: [PATCH 04/66] Clean up warnings. Fix AES CBC 1 test. --- .../project.pbxproj | 6 +- .../IDZSwiftCommonCrypto/Utilities.swift | 5 + .../CommonCryptoAPITests.m | 71 +++ .../IDZSwiftCommonCryptoTests.swift | 87 ++-- IDZSwiftCommonCrypto/log.out | 413 +++++++++++++++--- 5 files changed, 488 insertions(+), 94 deletions(-) create mode 100644 IDZSwiftCommonCrypto/IDZSwiftCommonCryptoTests/CommonCryptoAPITests.m diff --git a/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto.xcodeproj/project.pbxproj b/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto.xcodeproj/project.pbxproj index 73262e8..21ecf85 100644 --- a/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto.xcodeproj/project.pbxproj +++ b/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto.xcodeproj/project.pbxproj @@ -7,7 +7,6 @@ objects = { /* Begin PBXBuildFile section */ - 0C09D79B19E0D4C900A93684 /* README.md in Sources */ = {isa = PBXBuildFile; fileRef = 0C09D79A19E0D4C900A93684 /* README.md */; }; 0C67310219D1EB80009828B8 /* Status.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0C67310119D1EB80009828B8 /* Status.swift */; }; 0C9F5B2E19D2948F00E0B5FF /* Cryptor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0C9F5B2D19D2948F00E0B5FF /* Cryptor.swift */; }; 0CCB89B119CE05F800068ED6 /* IDZSwiftCommonCrypto.h in Headers */ = {isa = PBXBuildFile; fileRef = 0CCB89B019CE05F800068ED6 /* IDZSwiftCommonCrypto.h */; settings = {ATTRIBUTES = (Public, ); }; }; @@ -27,6 +26,7 @@ 308499CA1BA77BC20025B41D /* IDZSwiftCommonCryptoTestAppUITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 308499C91BA77BC20025B41D /* IDZSwiftCommonCryptoTestAppUITests.swift */; }; 308499D51BA77F2B0025B41D /* IDZSwiftCommonCrypto.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0CCB89AB19CE05F800068ED6 /* IDZSwiftCommonCrypto.framework */; }; 308499D61BA77F2B0025B41D /* IDZSwiftCommonCrypto.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 0CCB89AB19CE05F800068ED6 /* IDZSwiftCommonCrypto.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; + 308499DB1BA78C600025B41D /* CommonCryptoAPITests.m in Sources */ = {isa = PBXBuildFile; fileRef = 308499DA1BA78C600025B41D /* CommonCryptoAPITests.m */; settings = {ASSET_TAGS = (); }; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -106,6 +106,7 @@ 308499C51BA77BC20025B41D /* IDZSwiftCommonCryptoTestAppUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = IDZSwiftCommonCryptoTestAppUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 308499C91BA77BC20025B41D /* IDZSwiftCommonCryptoTestAppUITests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = IDZSwiftCommonCryptoTestAppUITests.swift; sourceTree = ""; }; 308499CB1BA77BC20025B41D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 308499DA1BA78C600025B41D /* CommonCryptoAPITests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CommonCryptoAPITests.m; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -205,6 +206,7 @@ isa = PBXGroup; children = ( 0CCB89BA19CE05F800068ED6 /* IDZSwiftCommonCryptoTests.swift */, + 308499DA1BA78C600025B41D /* CommonCryptoAPITests.m */, 0CCB89B819CE05F800068ED6 /* Supporting Files */, ); path = IDZSwiftCommonCryptoTests; @@ -458,7 +460,6 @@ 0C9F5B2E19D2948F00E0B5FF /* Cryptor.swift in Sources */, 0CCB89C919CE071D00068ED6 /* StreamCryptor.swift in Sources */, 0CCB89CD19CE071D00068ED6 /* Random.swift in Sources */, - 0C09D79B19E0D4C900A93684 /* README.md in Sources */, 0CCB89CA19CE071D00068ED6 /* Digest.swift in Sources */, 0CCB89CB19CE071D00068ED6 /* HMAC.swift in Sources */, ); @@ -468,6 +469,7 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( + 308499DB1BA78C600025B41D /* CommonCryptoAPITests.m in Sources */, 0CCB89BB19CE05F800068ED6 /* IDZSwiftCommonCryptoTests.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; diff --git a/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/Utilities.swift b/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/Utilities.swift index 19d664e..1d3bd85 100644 --- a/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/Utilities.swift +++ b/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/Utilities.swift @@ -56,4 +56,9 @@ public func hexStringFromArray(a : [UInt8], uppercase : Bool = false) -> String public func hexNSStringFromArray(a : [UInt8], uppercase : Bool = false) -> NSString { return a.map() { String(format:uppercase ? "%02X" : "%02x", $0) }.reduce("", combine: +) +} + +public func hexListFromArray(a : [UInt8]) -> String +{ + return a.map() { String(format:"0x%02x, ", $0) }.reduce("", combine: +) } \ No newline at end of file diff --git a/IDZSwiftCommonCrypto/IDZSwiftCommonCryptoTests/CommonCryptoAPITests.m b/IDZSwiftCommonCrypto/IDZSwiftCommonCryptoTests/CommonCryptoAPITests.m new file mode 100644 index 0000000..b0e52d5 --- /dev/null +++ b/IDZSwiftCommonCrypto/IDZSwiftCommonCryptoTests/CommonCryptoAPITests.m @@ -0,0 +1,71 @@ +// +// CommonCryptoAPITests.m +// IDZSwiftCommonCrypto +// +// Created by Danny Keogan on 9/14/15. +// Copyright © 2015 iOSDeveloperZone.com. All rights reserved. +// + +#import +#import + +@interface CommonCryptoAPITests : XCTestCase + +@end + +void LogHexArray(const char* pMessage, uint8_t* pBuffer, size_t nBytesInBuffer) +{ + NSMutableString *s = [NSMutableString stringWithFormat:@"%s: ", pMessage]; + for(size_t i = 0; i < nBytesInBuffer; ++i) + { + [s appendFormat:@"%02x ", pBuffer[i]]; + } + NSLog(@"%@", s); +} + +@implementation CommonCryptoAPITests + +- (void)setUp { + [super setUp]; + // Put setup code here. This method is called before the invocation of each test method in the class. +} + +- (void)tearDown { + // Put teardown code here. This method is called after the invocation of each test method in the class. + [super tearDown]; +} + +#define LENGTH(_a) sizeof((_a))/sizeof((_a)[0]) + +/** + * Here to track down differences between iOS 8 and iOS 9 + */ +- (void)testExample { + uint8_t key[] = { 0x2b, 0x7e, 0x15, 0x16, 0x28, 0xae, 0xd2, 0xa6, 0xab, 0xf7, 0x15, 0x88, 0x09, 0xcf, 0x4f, 0x3c }; + uint8_t plainText[] = { 0x6b, 0xc1, 0xbe, 0xe2, 0x2e, 0x40, 0x9f, 0x96, 0xe9, 0x3d, 0x7e, 0x11, 0x73, 0x93, 0x17, 0x2a }; + uint8_t expectedCipherText[] = {0x3a, 0xd7, 0x7b, 0xb4, 0x0d, 0x7a, 0x36, 0x60, 0xa8, 0x9e, 0xca, 0xf3, 0x24, 0x66, 0xef, 0x97 }; + uint8_t cipherText[LENGTH(expectedCipherText)]; + CCCryptorRef cryptor; + + CCCryptorStatus status = CCCryptorCreate(kCCEncrypt, kCCAlgorithmAES, 0, key, LENGTH(key), nil, &cryptor); + XCTAssert(status == kCCSuccess); + size_t bytesOut = 0; + status = CCCryptorUpdate(cryptor, plainText, LENGTH(plainText), cipherText, LENGTH(cipherText), &bytesOut); + LogHexArray("cipherText", cipherText, bytesOut); + XCTAssert(status == kCCSuccess); + XCTAssert(bytesOut == LENGTH(expectedCipherText)); + XCTAssert(memcmp(cipherText, expectedCipherText, LENGTH(expectedCipherText)) == 0); + // This should produce no output + status = CCCryptorFinal(cryptor, cipherText, LENGTH(cipherText), &bytesOut); + XCTAssert(status == kCCSuccess); + if(bytesOut != 0) { + LogHexArray("cipherText", cipherText, bytesOut); + } + XCTAssert(bytesOut == 0); + + + +} + + +@end diff --git a/IDZSwiftCommonCrypto/IDZSwiftCommonCryptoTests/IDZSwiftCommonCryptoTests.swift b/IDZSwiftCommonCrypto/IDZSwiftCommonCryptoTests/IDZSwiftCommonCryptoTests.swift index 8af946a..2b31af5 100644 --- a/IDZSwiftCommonCrypto/IDZSwiftCommonCryptoTests/IDZSwiftCommonCryptoTests.swift +++ b/IDZSwiftCommonCrypto/IDZSwiftCommonCryptoTests/IDZSwiftCommonCryptoTests.swift @@ -28,13 +28,11 @@ class IDZSwiftCommonCryptoTests: XCTestCase { var aesCipherText1Bytes = arrayFromHexString("3ad77bb40d7a3660a89ecaf32466ef97") func test_Cryptor_AES_ECB() { - var key = arrayFromHexString("2b7e151628aed2a6abf7158809cf4f3c") - var plainText = arrayFromHexString("6bc1bee22e409f96e93d7e117393172a") - - var aesEncrypt = Cryptor(operation:.Encrypt, algorithm:.AES, options:.ECBMode, + let aesEncrypt = Cryptor(operation:.Encrypt, algorithm:.AES, options:.ECBMode, key:aesKey1Bytes, iv:Array()) var dataOut = Array(count:aesCipherText1Bytes.count, repeatedValue:UInt8(0)) let (c, status) = aesEncrypt.update(aesPlaintext1Bytes, byteArrayOut: &dataOut) + XCTAssert(status == .Success); XCTAssert(aesCipherText1Bytes.count == Int(c) , "Counts are as expected") XCTAssertEqual(dataOut, aesCipherText1Bytes, "Obtained expected cipher text") } @@ -43,11 +41,11 @@ class IDZSwiftCommonCryptoTests: XCTestCase { results in repeated ciphertext block. */ func test_Cryptor_AES_ECB_2() { - var key = aesKey1Bytes //arrayFromHexString("2b7e151628aed2a6abf7158809cf4f3c") - var plainText = aesPlaintext1Bytes + aesPlaintext1Bytes - var expectedCipherText = aesCipherText1Bytes + aesCipherText1Bytes + let key = aesKey1Bytes + let plainText = aesPlaintext1Bytes + aesPlaintext1Bytes + let expectedCipherText = aesCipherText1Bytes + aesCipherText1Bytes - var cipherText = Cryptor(operation:.Encrypt, algorithm:.AES, options:.ECBMode, key:key, iv:Array()).update(plainText)?.final() + let cipherText = Cryptor(operation:.Encrypt, algorithm:.AES, options:.ECBMode, key:key, iv:Array()).update(plainText)?.final() assert(expectedCipherText.count == cipherText!.count , "Counts are as expected") assert(expectedCipherText == cipherText!, "Obtained expected cipher text") @@ -57,12 +55,10 @@ class IDZSwiftCommonCryptoTests: XCTestCase { of blocks long. */ func test_Cryptor_AES_ECB_Short() { - var key = arrayFromHexString("2b7e151628aed2a6abf7158809cf4f3c") - var plainText = arrayFromHexString("6bc1bee22e409f96e93d7e11739317") - var expectedCipherText = arrayFromHexString("3ad77bb40d7a3660a89ecaf32466ef97") - - var cryptor = Cryptor(operation:.Encrypt, algorithm:.AES, options:.ECBMode, key:key, iv:Array()) - var cipherText = cryptor.update(plainText)?.final() + let key = arrayFromHexString("2b7e151628aed2a6abf7158809cf4f3c") + let plainText = arrayFromHexString("6bc1bee22e409f96e93d7e11739317") + let cryptor = Cryptor(operation:.Encrypt, algorithm:.AES, options:.ECBMode, key:key, iv:Array()) + let cipherText = cryptor.update(plainText)?.final() XCTAssert(cipherText == nil, "Expected nil cipherText") XCTAssertEqual(cryptor.status, Status.AlignmentError, "Expected AlignmentError") } @@ -70,16 +66,20 @@ class IDZSwiftCommonCryptoTests: XCTestCase { Single block CBC mode. Results should be identical to ECB mode. */ func test_Cryptor_AES_CBC_1() { - var key = arrayFromHexString("2b7e151628aed2a6abf7158809cf4f3c") - var plainText = arrayFromHexString("6bc1bee22e409f96e93d7e117393172a") - var expectedCipherText = arrayFromHexString("3ad77bb40d7a3660a89ecaf32466ef97") + let key = arrayFromHexString("2b7e151628aed2a6abf7158809cf4f3c") + let iv = arrayFromHexString("00000000000000000000000000000000") + let plainText = arrayFromHexString("6bc1bee22e409f96e93d7e117393172a") + let expectedCipherText = arrayFromHexString("3ad77bb40d7a3660a89ecaf32466ef97") - var cipherText = Cryptor(operation:.Encrypt, algorithm:.AES, options:.None, key:key, iv:Array()).update(plainText)?.final() + //var cipherText = Cryptor(operation:.Encrypt, algorithm:.AES, options:.None, key:key, iv:Array()).update(plainText)?.final() + let cipherText = Cryptor(operation:.Encrypt, algorithm:.AES, options:.None, key:key, iv:iv).update(plainText)?.final() - assert(expectedCipherText.count == cipherText!.count , "Counts are as expected") - assert(expectedCipherText == cipherText!, "Obtained expected cipher text") + XCTAssert(expectedCipherText.count == cipherText!.count , "Counts are as expected") + XCTAssert(expectedCipherText == cipherText!, "Obtained expected cipher text") + + print(hexStringFromArray(cipherText!)) - var decryptedText = Cryptor(operation:.Decrypt, algorithm:.AES, options:.None, key:key, iv:Array()).update(cipherText!)?.final() + let decryptedText = Cryptor(operation:.Decrypt, algorithm:.AES, options:.None, key:key, iv:iv).update(cipherText!)?.final() XCTAssertEqual(decryptedText!, plainText, "Recovered plaintext.") } @@ -100,7 +100,7 @@ class IDZSwiftCommonCryptoTests: XCTestCase { // MARK: - Digest tests func testMD5_1() { - var md5 : Digest = Digest(algorithm:.MD5) + let md5 : Digest = Digest(algorithm:.MD5) md5.update(qbfString) let digest = md5.final() @@ -110,7 +110,7 @@ class IDZSwiftCommonCryptoTests: XCTestCase { func test_Digest_MD5_NSData() { let qbfData : NSData = dataFromByteArray(self.qbfBytes) - var digest = Digest(algorithm: .MD5).update(qbfData)?.final() + let digest = Digest(algorithm: .MD5).update(qbfData)?.final() XCTAssertEqual(digest!, qbfMD5, "PASS") } @@ -119,7 +119,7 @@ class IDZSwiftCommonCryptoTests: XCTestCase { */ func test_Digest_MD5_Composition_String() { - var digest = Digest(algorithm: .MD5).update(qbfString)?.final() + let digest = Digest(algorithm: .MD5).update(qbfString)?.final() XCTAssertEqual(digest!, qbfMD5, "PASS") } /** @@ -129,7 +129,7 @@ class IDZSwiftCommonCryptoTests: XCTestCase { { let s1 = "The quick brown fox" let s2 = " jumps over the lazy dog." - var digest = Digest(algorithm: .MD5).update(s1)?.update(s2)?.final() + let digest = Digest(algorithm: .MD5).update(s1)?.update(s2)?.final() XCTAssertEqual(digest!, qbfMD5, "PASS") } @@ -138,31 +138,34 @@ class IDZSwiftCommonCryptoTests: XCTestCase { */ func test_Digest_MD5_Composition_Bytes() { - var digest = Digest(algorithm: .MD5).update(qbfBytes)?.final() + let digest = Digest(algorithm: .MD5).update(qbfBytes)?.final() XCTAssertEqual(digest!, qbfMD5, "PASS") } // MARK: - HMAC tests + let hmacDefaultKeySHA1 = arrayFromHexString("0102030405060708090a0b0c0d0e0f10111213141516171819") + let hmacDefaultResultSHA1 = arrayFromHexString("4c9007f4026250c6bc8414f9bf50c86c2d7235da") + // See: https://www.ietf.org/rfc/rfc2202.txt func test_HMAC_SHA1() { - var key = arrayFromHexString("0102030405060708090a0b0c0d0e0f10111213141516171819") - var data : [UInt8] = Array(count:50, repeatedValue:0xcd) - var expected = arrayFromHexString("4c9007f4026250c6bc8414f9bf50c86c2d7235da") + let key = self.hmacDefaultKeySHA1 + let data : [UInt8] = Array(count:50, repeatedValue:0xcd) + let expected = self.hmacDefaultResultSHA1 - var hmac = HMAC(algorithm:.SHA1, key:key).update(data)?.final() + let hmac = HMAC(algorithm:.SHA1, key:key).update(data)?.final() XCTAssertEqual(hmac!, expected, "PASS") } func test_HMAC_SHA1_NSData() { - var key = dataFromHexString("0102030405060708090a0b0c0d0e0f10111213141516171819") - var data = dataFromByteArray(Array(count:50, repeatedValue:0xcd)) - var expected = arrayFromHexString("4c9007f4026250c6bc8414f9bf50c86c2d7235da") + let key = self.hmacDefaultKeySHA1 + let data = dataFromByteArray(Array(count:50, repeatedValue:0xcd)) + let expected = self.hmacDefaultKeySHA1 - var hmac = HMAC(algorithm:.SHA1, key:key).update(data)?.final() + let hmac = HMAC(algorithm:.SHA1, key:key).update(data)?.final() XCTAssertEqual(hmac!, expected, "PASS") } @@ -193,7 +196,7 @@ class IDZSwiftCommonCryptoTests: XCTestCase { func test_Random_generateBytes() { let count = 256*256 - var bytes = Random.generateBytes(count) + let bytes = Random.generateBytes(count) XCTAssert(bytes.count == count, "Count has expected value") } @@ -201,23 +204,23 @@ class IDZSwiftCommonCryptoTests: XCTestCase { // MARK: - Utilities tests func test_Utilities_arrayFromHexString_lowerCase() { - var s = "deadface" - var expected : [UInt8] = [ 0xde, 0xad, 0xfa, 0xce ] - var result = arrayFromHexString(s) + let s = "deadface" + let expected : [UInt8] = [ 0xde, 0xad, 0xfa, 0xce ] + let result = arrayFromHexString(s) XCTAssertEqual(result, expected, "PASS") } func test_Utilities_arrayFromHexString_upperCase() { - var s = "DEADFACE" - var expected : [UInt8] = [ 0xde, 0xad, 0xfa, 0xce ] - var result = arrayFromHexString(s) + let s = "DEADFACE" + let expected : [UInt8] = [ 0xde, 0xad, 0xfa, 0xce ] + let result = arrayFromHexString(s) XCTAssertEqual(result, expected, "PASS") } func testHexStringFromArray() { - var v : [UInt8] = [ 0xde, 0xad, 0xfa, 0xce ] + let v : [UInt8] = [ 0xde, 0xad, 0xfa, 0xce ] XCTAssertEqual(hexStringFromArray(v), "deadface", "PASS (lowercase)") XCTAssertEqual(hexStringFromArray(v, uppercase: true), "DEADFACE", "PASS (lowercase)") } diff --git a/IDZSwiftCommonCrypto/log.out b/IDZSwiftCommonCrypto/log.out index 6643f36..82465e9 100644 --- a/IDZSwiftCommonCrypto/log.out +++ b/IDZSwiftCommonCrypto/log.out @@ -1,58 +1,371 @@ -2014-10-06 11:15:23.917 xcodebuild[34659:1007] [MT] DVTAssertions: Warning in /SourceCache/IDEFrameworks/IDEFrameworks-6539/IDEFoundation/SourceControl/Model/IDESourceControlManager.m:423 -Details: Error Domain=com.apple.dt.IDESourceControlErrorDomain Code=-1 "Missing extension: public.vcs.subversion" UserInfo=0x7ff244bd5f70 {NSLocalizedDescription=Missing extension: public.vcs.subversion} -Object: -Method: -loadRepositories -Thread: {name = (null), num = 1} -Please file a bug at http://bugreport.apple.com with this warning message and any useful information you can provide. +2015-09-14 15:51:58.598 xcodebuild[7867:241372] [MT] IDETestOperationsObserverDebug: (2B97282C-A6A1-4093-A3D6-E82C8A370E18) Beginning test session with Xcode 7A218 on target { + SimDevice: SimDevice : iPhone 6 (06B8C3FC-C72F-464F-B274-E7D341DB8598) : state={ Booted } deviceType={ SimDeviceType : com.apple.CoreSimulator.SimDeviceType.iPhone-6 } runtime={ SimRuntime : 9.0 (13A340) - com.apple.CoreSimulator.SimRuntime.iOS-9-0 } +} (9.0 (13A340)) === BUILD TARGET IDZSwiftCommonCrypto OF PROJECT IDZSwiftCommonCrypto WITH CONFIGURATION Debug === Check dependencies -warning: no rule to process file '/Users/idz/Documents/src/IDZSwiftCommonCrypto/README.md' of type net.daringfireball.markdown for architecture x86_64 +warning: no rule to process file '/Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/README.md' of type net.daringfireball.markdown for architecture x86_64 + +Write auxiliary files +write-file /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/all-product-headers.yaml + +ProcessInfoPlistFile /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Products/Debug-iphonesimulator/IDZSwiftCommonCrypto.framework/Info.plist IDZSwiftCommonCrypto/Info.plist + cd /Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto + export PATH="/Applications/Xcode-7.0-7A218.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode-7.0-7A218.app/Contents/Developer/usr/bin:/Users/danny/pebble-dev/PebbleSDK-current/bin:/Users/danny/Qt/5.4/clang_64/bin:/Users/danny/.cabal/bin:/Applications/ghc-7.8.3.app/Contents/bin:/Users/danny/Builds/libjingle-read-only/swtoolkit:/Users/danny/.rvm/gems/ruby-1.9.2-p180/bin:/Users/danny/.rvm/gems/ruby-1.9.2-p180@global/bin:/Users/danny/.rvm/rubies/ruby-1.9.2-p180/bin:/Users/danny/.rvm/bin:/Users/danny/Documents/github/IDZBuild:/usr/local/bin:/Users/danny/.local/bin:/Users/danny/q/m32:/opt/local/bin:/opt/local/sbin:/Users/danny/fft/apps/rel/scripts:/Users/danny/Documents/github/IDZBuild:/opt/local/bin:/opt/local/sbin:/XCode4.2/usr/bin:/usr/local/graphviz-2.14/bin:/usr/local/mysql/bin:/usr/local/Trolltech/Qt-4.7.0/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/usr/texbin:/Users/danny/bin" + builtin-infoPlistUtility /Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/Info.plist -expandbuildsettings -format binary -platform iphonesimulator -o /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Products/Debug-iphonesimulator/IDZSwiftCommonCrypto.framework/Info.plist + +CompileSwiftSources normal x86_64 com.apple.xcode.tools.swift.compiler + cd /Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto + export PATH="/Applications/Xcode-7.0-7A218.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode-7.0-7A218.app/Contents/Developer/usr/bin:/Users/danny/pebble-dev/PebbleSDK-current/bin:/Users/danny/Qt/5.4/clang_64/bin:/Users/danny/.cabal/bin:/Applications/ghc-7.8.3.app/Contents/bin:/Users/danny/Builds/libjingle-read-only/swtoolkit:/Users/danny/.rvm/gems/ruby-1.9.2-p180/bin:/Users/danny/.rvm/gems/ruby-1.9.2-p180@global/bin:/Users/danny/.rvm/rubies/ruby-1.9.2-p180/bin:/Users/danny/.rvm/bin:/Users/danny/Documents/github/IDZBuild:/usr/local/bin:/Users/danny/.local/bin:/Users/danny/q/m32:/opt/local/bin:/opt/local/sbin:/Users/danny/fft/apps/rel/scripts:/Users/danny/Documents/github/IDZBuild:/opt/local/bin:/opt/local/sbin:/XCode4.2/usr/bin:/usr/local/graphviz-2.14/bin:/usr/local/mysql/bin:/usr/local/Trolltech/Qt-4.7.0/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/usr/texbin:/Users/danny/bin" + /Applications/Xcode-7.0-7A218.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swiftc -incremental -module-name IDZSwiftCommonCrypto -Onone -sdk /Applications/Xcode-7.0-7A218.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.0.sdk -target x86_64-apple-ios8.0 -g -module-cache-path /Users/danny/Library/Developer/Xcode/DerivedData/ModuleCache -Xfrontend -serialize-debugging-options -I /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Products/Debug-iphonesimulator -I /Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto -F /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Products/Debug-iphonesimulator -F /Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto -c -j4 /Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/Utilities.swift /Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/KeyDerivation.swift /Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/Status.swift /Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/Cryptor.swift /Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/StreamCryptor.swift /Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/Random.swift /Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/Digest.swift /Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/HMAC.swift -output-file-map /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/Objects-normal/x86_64/IDZSwiftCommonCrypto-OutputFileMap.json -parseable-output -serialize-diagnostics -emit-dependencies -emit-module -emit-module-path /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/Objects-normal/x86_64/IDZSwiftCommonCrypto.swiftmodule -Xcc -I/Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/swift-overrides.hmap -Xcc -iquote -Xcc /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/IDZSwiftCommonCrypto-generated-files.hmap -Xcc -I/Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/IDZSwiftCommonCrypto-own-target-headers.hmap -Xcc -I/Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/IDZSwiftCommonCrypto-all-non-framework-target-headers.hmap -Xcc -ivfsoverlay -Xcc /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/all-product-headers.yaml -Xcc -iquote -Xcc /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/IDZSwiftCommonCrypto-project-headers.hmap -Xcc -I/Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Products/Debug-iphonesimulator/include -Xcc -I/Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/DerivedSources/x86_64 -Xcc -I/Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/DerivedSources -Xcc -DDEBUG=1 -emit-objc-header -emit-objc-header-path /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/Objects-normal/x86_64/IDZSwiftCommonCrypto-Swift.h -import-underlying-module -Xcc -ivfsoverlay -Xcc /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/unextended-module-overlay.yaml -Xcc -working-directory/Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto + +CompileSwift normal x86_64 /Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/Utilities.swift + cd /Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto + /Applications/Xcode-7.0-7A218.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift -frontend -c -primary-file /Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/Utilities.swift /Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/KeyDerivation.swift /Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/Status.swift /Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/Cryptor.swift /Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/StreamCryptor.swift /Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/Random.swift /Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/Digest.swift /Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/HMAC.swift -target x86_64-apple-ios8.0 -enable-objc-interop -sdk /Applications/Xcode-7.0-7A218.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.0.sdk -I /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Products/Debug-iphonesimulator -I /Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto -F /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Products/Debug-iphonesimulator -F /Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto -g -import-underlying-module -module-cache-path /Users/danny/Library/Developer/Xcode/DerivedData/ModuleCache -serialize-debugging-options -Xcc -I/Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/swift-overrides.hmap -Xcc -iquote -Xcc /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/IDZSwiftCommonCrypto-generated-files.hmap -Xcc -I/Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/IDZSwiftCommonCrypto-own-target-headers.hmap -Xcc -I/Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/IDZSwiftCommonCrypto-all-non-framework-target-headers.hmap -Xcc -ivfsoverlay -Xcc /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/all-product-headers.yaml -Xcc -iquote -Xcc /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/IDZSwiftCommonCrypto-project-headers.hmap -Xcc -I/Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Products/Debug-iphonesimulator/include -Xcc -I/Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/DerivedSources/x86_64 -Xcc -I/Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/DerivedSources -Xcc -DDEBUG=1 -Xcc -ivfsoverlay -Xcc /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/unextended-module-overlay.yaml -Xcc -working-directory/Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto -emit-module-doc-path /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/Objects-normal/x86_64/Utilities~partial.swiftdoc -Onone -module-name IDZSwiftCommonCrypto -emit-module-path /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/Objects-normal/x86_64/Utilities~partial.swiftmodule -serialize-diagnostics-path /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/Objects-normal/x86_64/Utilities.dia -emit-dependencies-path /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/Objects-normal/x86_64/Utilities.d -emit-reference-dependencies-path /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/Objects-normal/x86_64/Utilities.swiftdeps -o /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/Objects-normal/x86_64/Utilities.o + +CompileSwift normal x86_64 /Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/KeyDerivation.swift + cd /Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto + /Applications/Xcode-7.0-7A218.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift -frontend -c /Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/Utilities.swift -primary-file /Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/KeyDerivation.swift /Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/Status.swift /Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/Cryptor.swift /Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/StreamCryptor.swift /Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/Random.swift /Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/Digest.swift /Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/HMAC.swift -target x86_64-apple-ios8.0 -enable-objc-interop -sdk /Applications/Xcode-7.0-7A218.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.0.sdk -I /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Products/Debug-iphonesimulator -I /Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto -F /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Products/Debug-iphonesimulator -F /Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto -g -import-underlying-module -module-cache-path /Users/danny/Library/Developer/Xcode/DerivedData/ModuleCache -serialize-debugging-options -Xcc -I/Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/swift-overrides.hmap -Xcc -iquote -Xcc /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/IDZSwiftCommonCrypto-generated-files.hmap -Xcc -I/Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/IDZSwiftCommonCrypto-own-target-headers.hmap -Xcc -I/Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/IDZSwiftCommonCrypto-all-non-framework-target-headers.hmap -Xcc -ivfsoverlay -Xcc /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/all-product-headers.yaml -Xcc -iquote -Xcc /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/IDZSwiftCommonCrypto-project-headers.hmap -Xcc -I/Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Products/Debug-iphonesimulator/include -Xcc -I/Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/DerivedSources/x86_64 -Xcc -I/Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/DerivedSources -Xcc -DDEBUG=1 -Xcc -ivfsoverlay -Xcc /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/unextended-module-overlay.yaml -Xcc -working-directory/Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto -emit-module-doc-path /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/Objects-normal/x86_64/KeyDerivation~partial.swiftdoc -Onone -module-name IDZSwiftCommonCrypto -emit-module-path /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/Objects-normal/x86_64/KeyDerivation~partial.swiftmodule -serialize-diagnostics-path /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/Objects-normal/x86_64/KeyDerivation.dia -emit-dependencies-path /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/Objects-normal/x86_64/KeyDerivation.d -emit-reference-dependencies-path /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/Objects-normal/x86_64/KeyDerivation.swiftdeps -o /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/Objects-normal/x86_64/KeyDerivation.o + +CompileSwift normal x86_64 /Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/Status.swift + cd /Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto + /Applications/Xcode-7.0-7A218.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift -frontend -c /Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/Utilities.swift /Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/KeyDerivation.swift -primary-file /Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/Status.swift /Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/Cryptor.swift /Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/StreamCryptor.swift /Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/Random.swift /Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/Digest.swift /Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/HMAC.swift -target x86_64-apple-ios8.0 -enable-objc-interop -sdk /Applications/Xcode-7.0-7A218.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.0.sdk -I /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Products/Debug-iphonesimulator -I /Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto -F /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Products/Debug-iphonesimulator -F /Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto -g -import-underlying-module -module-cache-path /Users/danny/Library/Developer/Xcode/DerivedData/ModuleCache -serialize-debugging-options -Xcc -I/Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/swift-overrides.hmap -Xcc -iquote -Xcc /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/IDZSwiftCommonCrypto-generated-files.hmap -Xcc -I/Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/IDZSwiftCommonCrypto-own-target-headers.hmap -Xcc -I/Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/IDZSwiftCommonCrypto-all-non-framework-target-headers.hmap -Xcc -ivfsoverlay -Xcc /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/all-product-headers.yaml -Xcc -iquote -Xcc /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/IDZSwiftCommonCrypto-project-headers.hmap -Xcc -I/Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Products/Debug-iphonesimulator/include -Xcc -I/Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/DerivedSources/x86_64 -Xcc -I/Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/DerivedSources -Xcc -DDEBUG=1 -Xcc -ivfsoverlay -Xcc /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/unextended-module-overlay.yaml -Xcc -working-directory/Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto -emit-module-doc-path /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/Objects-normal/x86_64/Status~partial.swiftdoc -Onone -module-name IDZSwiftCommonCrypto -emit-module-path /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/Objects-normal/x86_64/Status~partial.swiftmodule -serialize-diagnostics-path /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/Objects-normal/x86_64/Status.dia -emit-dependencies-path /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/Objects-normal/x86_64/Status.d -emit-reference-dependencies-path /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/Objects-normal/x86_64/Status.swiftdeps -o /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/Objects-normal/x86_64/Status.o + +CompileSwift normal x86_64 /Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/Cryptor.swift + cd /Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto + /Applications/Xcode-7.0-7A218.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift -frontend -c /Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/Utilities.swift /Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/KeyDerivation.swift /Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/Status.swift -primary-file /Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/Cryptor.swift /Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/StreamCryptor.swift /Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/Random.swift /Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/Digest.swift /Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/HMAC.swift -target x86_64-apple-ios8.0 -enable-objc-interop -sdk /Applications/Xcode-7.0-7A218.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.0.sdk -I /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Products/Debug-iphonesimulator -I /Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto -F /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Products/Debug-iphonesimulator -F /Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto -g -import-underlying-module -module-cache-path /Users/danny/Library/Developer/Xcode/DerivedData/ModuleCache -serialize-debugging-options -Xcc -I/Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/swift-overrides.hmap -Xcc -iquote -Xcc /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/IDZSwiftCommonCrypto-generated-files.hmap -Xcc -I/Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/IDZSwiftCommonCrypto-own-target-headers.hmap -Xcc -I/Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/IDZSwiftCommonCrypto-all-non-framework-target-headers.hmap -Xcc -ivfsoverlay -Xcc /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/all-product-headers.yaml -Xcc -iquote -Xcc /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/IDZSwiftCommonCrypto-project-headers.hmap -Xcc -I/Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Products/Debug-iphonesimulator/include -Xcc -I/Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/DerivedSources/x86_64 -Xcc -I/Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/DerivedSources -Xcc -DDEBUG=1 -Xcc -ivfsoverlay -Xcc /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/unextended-module-overlay.yaml -Xcc -working-directory/Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto -emit-module-doc-path /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/Objects-normal/x86_64/Cryptor~partial.swiftdoc -Onone -module-name IDZSwiftCommonCrypto -emit-module-path /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/Objects-normal/x86_64/Cryptor~partial.swiftmodule -serialize-diagnostics-path /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/Objects-normal/x86_64/Cryptor.dia -emit-dependencies-path /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/Objects-normal/x86_64/Cryptor.d -emit-reference-dependencies-path /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/Objects-normal/x86_64/Cryptor.swiftdeps -o /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/Objects-normal/x86_64/Cryptor.o + +CompileSwift normal x86_64 /Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/StreamCryptor.swift + cd /Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto + /Applications/Xcode-7.0-7A218.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift -frontend -c /Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/Utilities.swift /Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/KeyDerivation.swift /Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/Status.swift /Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/Cryptor.swift -primary-file /Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/StreamCryptor.swift /Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/Random.swift /Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/Digest.swift /Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/HMAC.swift -target x86_64-apple-ios8.0 -enable-objc-interop -sdk /Applications/Xcode-7.0-7A218.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.0.sdk -I /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Products/Debug-iphonesimulator -I /Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto -F /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Products/Debug-iphonesimulator -F /Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto -g -import-underlying-module -module-cache-path /Users/danny/Library/Developer/Xcode/DerivedData/ModuleCache -serialize-debugging-options -Xcc -I/Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/swift-overrides.hmap -Xcc -iquote -Xcc /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/IDZSwiftCommonCrypto-generated-files.hmap -Xcc -I/Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/IDZSwiftCommonCrypto-own-target-headers.hmap -Xcc -I/Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/IDZSwiftCommonCrypto-all-non-framework-target-headers.hmap -Xcc -ivfsoverlay -Xcc /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/all-product-headers.yaml -Xcc -iquote -Xcc /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/IDZSwiftCommonCrypto-project-headers.hmap -Xcc -I/Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Products/Debug-iphonesimulator/include -Xcc -I/Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/DerivedSources/x86_64 -Xcc -I/Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/DerivedSources -Xcc -DDEBUG=1 -Xcc -ivfsoverlay -Xcc /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/unextended-module-overlay.yaml -Xcc -working-directory/Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto -emit-module-doc-path /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/Objects-normal/x86_64/StreamCryptor~partial.swiftdoc -Onone -module-name IDZSwiftCommonCrypto -emit-module-path /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/Objects-normal/x86_64/StreamCryptor~partial.swiftmodule -serialize-diagnostics-path /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/Objects-normal/x86_64/StreamCryptor.dia -emit-dependencies-path /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/Objects-normal/x86_64/StreamCryptor.d -emit-reference-dependencies-path /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/Objects-normal/x86_64/StreamCryptor.swiftdeps -o /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/Objects-normal/x86_64/StreamCryptor.o + +CompileSwift normal x86_64 /Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/Random.swift + cd /Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto + /Applications/Xcode-7.0-7A218.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift -frontend -c /Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/Utilities.swift /Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/KeyDerivation.swift /Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/Status.swift /Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/Cryptor.swift /Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/StreamCryptor.swift -primary-file /Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/Random.swift /Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/Digest.swift /Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/HMAC.swift -target x86_64-apple-ios8.0 -enable-objc-interop -sdk /Applications/Xcode-7.0-7A218.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.0.sdk -I /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Products/Debug-iphonesimulator -I /Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto -F /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Products/Debug-iphonesimulator -F /Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto -g -import-underlying-module -module-cache-path /Users/danny/Library/Developer/Xcode/DerivedData/ModuleCache -serialize-debugging-options -Xcc -I/Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/swift-overrides.hmap -Xcc -iquote -Xcc /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/IDZSwiftCommonCrypto-generated-files.hmap -Xcc -I/Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/IDZSwiftCommonCrypto-own-target-headers.hmap -Xcc -I/Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/IDZSwiftCommonCrypto-all-non-framework-target-headers.hmap -Xcc -ivfsoverlay -Xcc /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/all-product-headers.yaml -Xcc -iquote -Xcc /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/IDZSwiftCommonCrypto-project-headers.hmap -Xcc -I/Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Products/Debug-iphonesimulator/include -Xcc -I/Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/DerivedSources/x86_64 -Xcc -I/Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/DerivedSources -Xcc -DDEBUG=1 -Xcc -ivfsoverlay -Xcc /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/unextended-module-overlay.yaml -Xcc -working-directory/Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto -emit-module-doc-path /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/Objects-normal/x86_64/Random~partial.swiftdoc -Onone -module-name IDZSwiftCommonCrypto -emit-module-path /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/Objects-normal/x86_64/Random~partial.swiftmodule -serialize-diagnostics-path /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/Objects-normal/x86_64/Random.dia -emit-dependencies-path /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/Objects-normal/x86_64/Random.d -emit-reference-dependencies-path /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/Objects-normal/x86_64/Random.swiftdeps -o /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/Objects-normal/x86_64/Random.o + +CompileSwift normal x86_64 /Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/Digest.swift + cd /Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto + /Applications/Xcode-7.0-7A218.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift -frontend -c /Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/Utilities.swift /Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/KeyDerivation.swift /Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/Status.swift /Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/Cryptor.swift /Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/StreamCryptor.swift /Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/Random.swift -primary-file /Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/Digest.swift /Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/HMAC.swift -target x86_64-apple-ios8.0 -enable-objc-interop -sdk /Applications/Xcode-7.0-7A218.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.0.sdk -I /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Products/Debug-iphonesimulator -I /Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto -F /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Products/Debug-iphonesimulator -F /Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto -g -import-underlying-module -module-cache-path /Users/danny/Library/Developer/Xcode/DerivedData/ModuleCache -serialize-debugging-options -Xcc -I/Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/swift-overrides.hmap -Xcc -iquote -Xcc /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/IDZSwiftCommonCrypto-generated-files.hmap -Xcc -I/Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/IDZSwiftCommonCrypto-own-target-headers.hmap -Xcc -I/Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/IDZSwiftCommonCrypto-all-non-framework-target-headers.hmap -Xcc -ivfsoverlay -Xcc /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/all-product-headers.yaml -Xcc -iquote -Xcc /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/IDZSwiftCommonCrypto-project-headers.hmap -Xcc -I/Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Products/Debug-iphonesimulator/include -Xcc -I/Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/DerivedSources/x86_64 -Xcc -I/Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/DerivedSources -Xcc -DDEBUG=1 -Xcc -ivfsoverlay -Xcc /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/unextended-module-overlay.yaml -Xcc -working-directory/Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto -emit-module-doc-path /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/Objects-normal/x86_64/Digest~partial.swiftdoc -Onone -module-name IDZSwiftCommonCrypto -emit-module-path /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/Objects-normal/x86_64/Digest~partial.swiftmodule -serialize-diagnostics-path /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/Objects-normal/x86_64/Digest.dia -emit-dependencies-path /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/Objects-normal/x86_64/Digest.d -emit-reference-dependencies-path /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/Objects-normal/x86_64/Digest.swiftdeps -o /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/Objects-normal/x86_64/Digest.o + +CompileSwift normal x86_64 /Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/HMAC.swift + cd /Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto + /Applications/Xcode-7.0-7A218.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift -frontend -c /Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/Utilities.swift /Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/KeyDerivation.swift /Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/Status.swift /Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/Cryptor.swift /Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/StreamCryptor.swift /Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/Random.swift /Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/Digest.swift -primary-file /Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/HMAC.swift -target x86_64-apple-ios8.0 -enable-objc-interop -sdk /Applications/Xcode-7.0-7A218.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.0.sdk -I /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Products/Debug-iphonesimulator -I /Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto -F /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Products/Debug-iphonesimulator -F /Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto -g -import-underlying-module -module-cache-path /Users/danny/Library/Developer/Xcode/DerivedData/ModuleCache -serialize-debugging-options -Xcc -I/Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/swift-overrides.hmap -Xcc -iquote -Xcc /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/IDZSwiftCommonCrypto-generated-files.hmap -Xcc -I/Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/IDZSwiftCommonCrypto-own-target-headers.hmap -Xcc -I/Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/IDZSwiftCommonCrypto-all-non-framework-target-headers.hmap -Xcc -ivfsoverlay -Xcc /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/all-product-headers.yaml -Xcc -iquote -Xcc /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/IDZSwiftCommonCrypto-project-headers.hmap -Xcc -I/Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Products/Debug-iphonesimulator/include -Xcc -I/Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/DerivedSources/x86_64 -Xcc -I/Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/DerivedSources -Xcc -DDEBUG=1 -Xcc -ivfsoverlay -Xcc /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/unextended-module-overlay.yaml -Xcc -working-directory/Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto -emit-module-doc-path /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/Objects-normal/x86_64/HMAC~partial.swiftdoc -Onone -module-name IDZSwiftCommonCrypto -emit-module-path /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/Objects-normal/x86_64/HMAC~partial.swiftmodule -serialize-diagnostics-path /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/Objects-normal/x86_64/HMAC.dia -emit-dependencies-path /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/Objects-normal/x86_64/HMAC.d -emit-reference-dependencies-path /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/Objects-normal/x86_64/HMAC.swiftdeps -o /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/Objects-normal/x86_64/HMAC.o + +MergeSwiftModule normal x86_64 /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/Objects-normal/x86_64/IDZSwiftCommonCrypto.swiftmodule + cd /Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto + /Applications/Xcode-7.0-7A218.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift -frontend -emit-module /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/Objects-normal/x86_64/Utilities~partial.swiftmodule /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/Objects-normal/x86_64/KeyDerivation~partial.swiftmodule /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/Objects-normal/x86_64/Status~partial.swiftmodule /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/Objects-normal/x86_64/Cryptor~partial.swiftmodule /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/Objects-normal/x86_64/StreamCryptor~partial.swiftmodule /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/Objects-normal/x86_64/Random~partial.swiftmodule /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/Objects-normal/x86_64/Digest~partial.swiftmodule /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/Objects-normal/x86_64/HMAC~partial.swiftmodule -parse-as-library -target x86_64-apple-ios8.0 -enable-objc-interop -sdk /Applications/Xcode-7.0-7A218.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.0.sdk -I /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Products/Debug-iphonesimulator -I /Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto -F /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Products/Debug-iphonesimulator -F /Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto -g -import-underlying-module -module-cache-path /Users/danny/Library/Developer/Xcode/DerivedData/ModuleCache -serialize-debugging-options -Xcc -I/Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/swift-overrides.hmap -Xcc -iquote -Xcc /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/IDZSwiftCommonCrypto-generated-files.hmap -Xcc -I/Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/IDZSwiftCommonCrypto-own-target-headers.hmap -Xcc -I/Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/IDZSwiftCommonCrypto-all-non-framework-target-headers.hmap -Xcc -ivfsoverlay -Xcc /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/all-product-headers.yaml -Xcc -iquote -Xcc /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/IDZSwiftCommonCrypto-project-headers.hmap -Xcc -I/Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Products/Debug-iphonesimulator/include -Xcc -I/Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/DerivedSources/x86_64 -Xcc -I/Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/DerivedSources -Xcc -DDEBUG=1 -Xcc -ivfsoverlay -Xcc /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/unextended-module-overlay.yaml -Xcc -working-directory/Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto -emit-module-doc-path /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/Objects-normal/x86_64/IDZSwiftCommonCrypto.swiftdoc -module-name IDZSwiftCommonCrypto -emit-objc-header-path /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/Objects-normal/x86_64/IDZSwiftCommonCrypto-Swift.h -o /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/Objects-normal/x86_64/IDZSwiftCommonCrypto.swiftmodule + +CompileSwift normal x86_64 /Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/Utilities.swift + cd /Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto + /Applications/Xcode-7.0-7A218.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift -frontend -c -primary-file /Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/Utilities.swift /Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/KeyDerivation.swift /Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/Status.swift /Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/Cryptor.swift /Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/StreamCryptor.swift /Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/Random.swift /Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/Digest.swift /Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/HMAC.swift -target x86_64-apple-ios8.0 -enable-objc-interop -sdk /Applications/Xcode-7.0-7A218.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.0.sdk -I /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Products/Debug-iphonesimulator -I /Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto -F /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Products/Debug-iphonesimulator -F /Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto -g -import-underlying-module -module-cache-path /Users/danny/Library/Developer/Xcode/DerivedData/ModuleCache -serialize-debugging-options -Xcc -I/Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/swift-overrides.hmap -Xcc -iquote -Xcc /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/IDZSwiftCommonCrypto-generated-files.hmap -Xcc -I/Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/IDZSwiftCommonCrypto-own-target-headers.hmap -Xcc -I/Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/IDZSwiftCommonCrypto-all-non-framework-target-headers.hmap -Xcc -ivfsoverlay -Xcc /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/all-product-headers.yaml -Xcc -iquote -Xcc /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/IDZSwiftCommonCrypto-project-headers.hmap -Xcc -I/Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Products/Debug-iphonesimulator/include -Xcc -I/Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/DerivedSources/x86_64 -Xcc -I/Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/DerivedSources -Xcc -DDEBUG=1 -Xcc -ivfsoverlay -Xcc /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/unextended-module-overlay.yaml -Xcc -working-directory/Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto -emit-module-doc-path /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/Objects-normal/x86_64/Utilities~partial.swiftdoc -Onone -module-name IDZSwiftCommonCrypto -emit-module-path /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/Objects-normal/x86_64/Utilities~partial.swiftmodule -serialize-diagnostics-path /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/Objects-normal/x86_64/Utilities.dia -emit-dependencies-path /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/Objects-normal/x86_64/Utilities.d -emit-reference-dependencies-path /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/Objects-normal/x86_64/Utilities.swiftdeps -o /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/Objects-normal/x86_64/Utilities.o + +CompileSwift normal x86_64 /Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/KeyDerivation.swift + cd /Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto + /Applications/Xcode-7.0-7A218.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift -frontend -c /Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/Utilities.swift -primary-file /Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/KeyDerivation.swift /Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/Status.swift /Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/Cryptor.swift /Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/StreamCryptor.swift /Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/Random.swift /Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/Digest.swift /Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/HMAC.swift -target x86_64-apple-ios8.0 -enable-objc-interop -sdk /Applications/Xcode-7.0-7A218.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.0.sdk -I /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Products/Debug-iphonesimulator -I /Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto -F /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Products/Debug-iphonesimulator -F /Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto -g -import-underlying-module -module-cache-path /Users/danny/Library/Developer/Xcode/DerivedData/ModuleCache -serialize-debugging-options -Xcc -I/Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/swift-overrides.hmap -Xcc -iquote -Xcc /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/IDZSwiftCommonCrypto-generated-files.hmap -Xcc -I/Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/IDZSwiftCommonCrypto-own-target-headers.hmap -Xcc -I/Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/IDZSwiftCommonCrypto-all-non-framework-target-headers.hmap -Xcc -ivfsoverlay -Xcc /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/all-product-headers.yaml -Xcc -iquote -Xcc /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/IDZSwiftCommonCrypto-project-headers.hmap -Xcc -I/Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Products/Debug-iphonesimulator/include -Xcc -I/Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/DerivedSources/x86_64 -Xcc -I/Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/DerivedSources -Xcc -DDEBUG=1 -Xcc -ivfsoverlay -Xcc /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/unextended-module-overlay.yaml -Xcc -working-directory/Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto -emit-module-doc-path /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/Objects-normal/x86_64/KeyDerivation~partial.swiftdoc -Onone -module-name IDZSwiftCommonCrypto -emit-module-path /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/Objects-normal/x86_64/KeyDerivation~partial.swiftmodule -serialize-diagnostics-path /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/Objects-normal/x86_64/KeyDerivation.dia -emit-dependencies-path /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/Objects-normal/x86_64/KeyDerivation.d -emit-reference-dependencies-path /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/Objects-normal/x86_64/KeyDerivation.swiftdeps -o /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/Objects-normal/x86_64/KeyDerivation.o + +CompileSwift normal x86_64 /Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/Status.swift + cd /Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto + /Applications/Xcode-7.0-7A218.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift -frontend -c /Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/Utilities.swift /Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/KeyDerivation.swift -primary-file /Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/Status.swift /Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/Cryptor.swift /Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/StreamCryptor.swift /Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/Random.swift /Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/Digest.swift /Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/HMAC.swift -target x86_64-apple-ios8.0 -enable-objc-interop -sdk /Applications/Xcode-7.0-7A218.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.0.sdk -I /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Products/Debug-iphonesimulator -I /Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto -F /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Products/Debug-iphonesimulator -F /Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto -g -import-underlying-module -module-cache-path /Users/danny/Library/Developer/Xcode/DerivedData/ModuleCache -serialize-debugging-options -Xcc -I/Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/swift-overrides.hmap -Xcc -iquote -Xcc /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/IDZSwiftCommonCrypto-generated-files.hmap -Xcc -I/Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/IDZSwiftCommonCrypto-own-target-headers.hmap -Xcc -I/Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/IDZSwiftCommonCrypto-all-non-framework-target-headers.hmap -Xcc -ivfsoverlay -Xcc /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/all-product-headers.yaml -Xcc -iquote -Xcc /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/IDZSwiftCommonCrypto-project-headers.hmap -Xcc -I/Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Products/Debug-iphonesimulator/include -Xcc -I/Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/DerivedSources/x86_64 -Xcc -I/Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/DerivedSources -Xcc -DDEBUG=1 -Xcc -ivfsoverlay -Xcc /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/unextended-module-overlay.yaml -Xcc -working-directory/Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto -emit-module-doc-path /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/Objects-normal/x86_64/Status~partial.swiftdoc -Onone -module-name IDZSwiftCommonCrypto -emit-module-path /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/Objects-normal/x86_64/Status~partial.swiftmodule -serialize-diagnostics-path /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/Objects-normal/x86_64/Status.dia -emit-dependencies-path /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/Objects-normal/x86_64/Status.d -emit-reference-dependencies-path /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/Objects-normal/x86_64/Status.swiftdeps -o /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/Objects-normal/x86_64/Status.o + +CompileSwift normal x86_64 /Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/Cryptor.swift + cd /Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto + /Applications/Xcode-7.0-7A218.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift -frontend -c /Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/Utilities.swift /Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/KeyDerivation.swift /Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/Status.swift -primary-file /Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/Cryptor.swift /Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/StreamCryptor.swift /Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/Random.swift /Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/Digest.swift /Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/HMAC.swift -target x86_64-apple-ios8.0 -enable-objc-interop -sdk /Applications/Xcode-7.0-7A218.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.0.sdk -I /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Products/Debug-iphonesimulator -I /Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto -F /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Products/Debug-iphonesimulator -F /Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto -g -import-underlying-module -module-cache-path /Users/danny/Library/Developer/Xcode/DerivedData/ModuleCache -serialize-debugging-options -Xcc -I/Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/swift-overrides.hmap -Xcc -iquote -Xcc /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/IDZSwiftCommonCrypto-generated-files.hmap -Xcc -I/Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/IDZSwiftCommonCrypto-own-target-headers.hmap -Xcc -I/Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/IDZSwiftCommonCrypto-all-non-framework-target-headers.hmap -Xcc -ivfsoverlay -Xcc /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/all-product-headers.yaml -Xcc -iquote -Xcc /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/IDZSwiftCommonCrypto-project-headers.hmap -Xcc -I/Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Products/Debug-iphonesimulator/include -Xcc -I/Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/DerivedSources/x86_64 -Xcc -I/Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/DerivedSources -Xcc -DDEBUG=1 -Xcc -ivfsoverlay -Xcc /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/unextended-module-overlay.yaml -Xcc -working-directory/Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto -emit-module-doc-path /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/Objects-normal/x86_64/Cryptor~partial.swiftdoc -Onone -module-name IDZSwiftCommonCrypto -emit-module-path /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/Objects-normal/x86_64/Cryptor~partial.swiftmodule -serialize-diagnostics-path /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/Objects-normal/x86_64/Cryptor.dia -emit-dependencies-path /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/Objects-normal/x86_64/Cryptor.d -emit-reference-dependencies-path /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/Objects-normal/x86_64/Cryptor.swiftdeps -o /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/Objects-normal/x86_64/Cryptor.o + +CompileSwift normal x86_64 /Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/StreamCryptor.swift + cd /Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto + /Applications/Xcode-7.0-7A218.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift -frontend -c /Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/Utilities.swift /Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/KeyDerivation.swift /Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/Status.swift /Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/Cryptor.swift -primary-file /Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/StreamCryptor.swift /Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/Random.swift /Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/Digest.swift /Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/HMAC.swift -target x86_64-apple-ios8.0 -enable-objc-interop -sdk /Applications/Xcode-7.0-7A218.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.0.sdk -I /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Products/Debug-iphonesimulator -I /Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto -F /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Products/Debug-iphonesimulator -F /Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto -g -import-underlying-module -module-cache-path /Users/danny/Library/Developer/Xcode/DerivedData/ModuleCache -serialize-debugging-options -Xcc -I/Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/swift-overrides.hmap -Xcc -iquote -Xcc /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/IDZSwiftCommonCrypto-generated-files.hmap -Xcc -I/Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/IDZSwiftCommonCrypto-own-target-headers.hmap -Xcc -I/Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/IDZSwiftCommonCrypto-all-non-framework-target-headers.hmap -Xcc -ivfsoverlay -Xcc /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/all-product-headers.yaml -Xcc -iquote -Xcc /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/IDZSwiftCommonCrypto-project-headers.hmap -Xcc -I/Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Products/Debug-iphonesimulator/include -Xcc -I/Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/DerivedSources/x86_64 -Xcc -I/Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/DerivedSources -Xcc -DDEBUG=1 -Xcc -ivfsoverlay -Xcc /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/unextended-module-overlay.yaml -Xcc -working-directory/Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto -emit-module-doc-path /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/Objects-normal/x86_64/StreamCryptor~partial.swiftdoc -Onone -module-name IDZSwiftCommonCrypto -emit-module-path /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/Objects-normal/x86_64/StreamCryptor~partial.swiftmodule -serialize-diagnostics-path /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/Objects-normal/x86_64/StreamCryptor.dia -emit-dependencies-path /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/Objects-normal/x86_64/StreamCryptor.d -emit-reference-dependencies-path /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/Objects-normal/x86_64/StreamCryptor.swiftdeps -o /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/Objects-normal/x86_64/StreamCryptor.o + +CompileSwift normal x86_64 /Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/Random.swift + cd /Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto + /Applications/Xcode-7.0-7A218.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift -frontend -c /Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/Utilities.swift /Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/KeyDerivation.swift /Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/Status.swift /Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/Cryptor.swift /Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/StreamCryptor.swift -primary-file /Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/Random.swift /Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/Digest.swift /Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/HMAC.swift -target x86_64-apple-ios8.0 -enable-objc-interop -sdk /Applications/Xcode-7.0-7A218.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.0.sdk -I /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Products/Debug-iphonesimulator -I /Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto -F /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Products/Debug-iphonesimulator -F /Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto -g -import-underlying-module -module-cache-path /Users/danny/Library/Developer/Xcode/DerivedData/ModuleCache -serialize-debugging-options -Xcc -I/Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/swift-overrides.hmap -Xcc -iquote -Xcc /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/IDZSwiftCommonCrypto-generated-files.hmap -Xcc -I/Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/IDZSwiftCommonCrypto-own-target-headers.hmap -Xcc -I/Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/IDZSwiftCommonCrypto-all-non-framework-target-headers.hmap -Xcc -ivfsoverlay -Xcc /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/all-product-headers.yaml -Xcc -iquote -Xcc /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/IDZSwiftCommonCrypto-project-headers.hmap -Xcc -I/Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Products/Debug-iphonesimulator/include -Xcc -I/Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/DerivedSources/x86_64 -Xcc -I/Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/DerivedSources -Xcc -DDEBUG=1 -Xcc -ivfsoverlay -Xcc /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/unextended-module-overlay.yaml -Xcc -working-directory/Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto -emit-module-doc-path /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/Objects-normal/x86_64/Random~partial.swiftdoc -Onone -module-name IDZSwiftCommonCrypto -emit-module-path /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/Objects-normal/x86_64/Random~partial.swiftmodule -serialize-diagnostics-path /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/Objects-normal/x86_64/Random.dia -emit-dependencies-path /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/Objects-normal/x86_64/Random.d -emit-reference-dependencies-path /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/Objects-normal/x86_64/Random.swiftdeps -o /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/Objects-normal/x86_64/Random.o + +CompileSwift normal x86_64 /Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/Digest.swift + cd /Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto + /Applications/Xcode-7.0-7A218.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift -frontend -c /Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/Utilities.swift /Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/KeyDerivation.swift /Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/Status.swift /Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/Cryptor.swift /Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/StreamCryptor.swift /Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/Random.swift -primary-file /Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/Digest.swift /Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/HMAC.swift -target x86_64-apple-ios8.0 -enable-objc-interop -sdk /Applications/Xcode-7.0-7A218.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.0.sdk -I /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Products/Debug-iphonesimulator -I /Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto -F /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Products/Debug-iphonesimulator -F /Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto -g -import-underlying-module -module-cache-path /Users/danny/Library/Developer/Xcode/DerivedData/ModuleCache -serialize-debugging-options -Xcc -I/Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/swift-overrides.hmap -Xcc -iquote -Xcc /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/IDZSwiftCommonCrypto-generated-files.hmap -Xcc -I/Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/IDZSwiftCommonCrypto-own-target-headers.hmap -Xcc -I/Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/IDZSwiftCommonCrypto-all-non-framework-target-headers.hmap -Xcc -ivfsoverlay -Xcc /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/all-product-headers.yaml -Xcc -iquote -Xcc /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/IDZSwiftCommonCrypto-project-headers.hmap -Xcc -I/Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Products/Debug-iphonesimulator/include -Xcc -I/Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/DerivedSources/x86_64 -Xcc -I/Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/DerivedSources -Xcc -DDEBUG=1 -Xcc -ivfsoverlay -Xcc /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/unextended-module-overlay.yaml -Xcc -working-directory/Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto -emit-module-doc-path /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/Objects-normal/x86_64/Digest~partial.swiftdoc -Onone -module-name IDZSwiftCommonCrypto -emit-module-path /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/Objects-normal/x86_64/Digest~partial.swiftmodule -serialize-diagnostics-path /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/Objects-normal/x86_64/Digest.dia -emit-dependencies-path /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/Objects-normal/x86_64/Digest.d -emit-reference-dependencies-path /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/Objects-normal/x86_64/Digest.swiftdeps -o /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/Objects-normal/x86_64/Digest.o + +CompileSwift normal x86_64 /Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/HMAC.swift + cd /Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto + /Applications/Xcode-7.0-7A218.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift -frontend -c /Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/Utilities.swift /Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/KeyDerivation.swift /Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/Status.swift /Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/Cryptor.swift /Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/StreamCryptor.swift /Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/Random.swift /Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/Digest.swift -primary-file /Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/HMAC.swift -target x86_64-apple-ios8.0 -enable-objc-interop -sdk /Applications/Xcode-7.0-7A218.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.0.sdk -I /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Products/Debug-iphonesimulator -I /Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto -F /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Products/Debug-iphonesimulator -F /Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto -g -import-underlying-module -module-cache-path /Users/danny/Library/Developer/Xcode/DerivedData/ModuleCache -serialize-debugging-options -Xcc -I/Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/swift-overrides.hmap -Xcc -iquote -Xcc /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/IDZSwiftCommonCrypto-generated-files.hmap -Xcc -I/Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/IDZSwiftCommonCrypto-own-target-headers.hmap -Xcc -I/Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/IDZSwiftCommonCrypto-all-non-framework-target-headers.hmap -Xcc -ivfsoverlay -Xcc /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/all-product-headers.yaml -Xcc -iquote -Xcc /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/IDZSwiftCommonCrypto-project-headers.hmap -Xcc -I/Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Products/Debug-iphonesimulator/include -Xcc -I/Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/DerivedSources/x86_64 -Xcc -I/Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/DerivedSources -Xcc -DDEBUG=1 -Xcc -ivfsoverlay -Xcc /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/unextended-module-overlay.yaml -Xcc -working-directory/Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto -emit-module-doc-path /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/Objects-normal/x86_64/HMAC~partial.swiftdoc -Onone -module-name IDZSwiftCommonCrypto -emit-module-path /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/Objects-normal/x86_64/HMAC~partial.swiftmodule -serialize-diagnostics-path /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/Objects-normal/x86_64/HMAC.dia -emit-dependencies-path /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/Objects-normal/x86_64/HMAC.d -emit-reference-dependencies-path /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/Objects-normal/x86_64/HMAC.swiftdeps -o /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/Objects-normal/x86_64/HMAC.o + +Ditto /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Products/Debug-iphonesimulator/IDZSwiftCommonCrypto.framework/Headers/IDZSwiftCommonCrypto-Swift.h /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/Objects-normal/x86_64/IDZSwiftCommonCrypto-Swift.h + cd /Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto + export PATH="/Applications/Xcode-7.0-7A218.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode-7.0-7A218.app/Contents/Developer/usr/bin:/Users/danny/pebble-dev/PebbleSDK-current/bin:/Users/danny/Qt/5.4/clang_64/bin:/Users/danny/.cabal/bin:/Applications/ghc-7.8.3.app/Contents/bin:/Users/danny/Builds/libjingle-read-only/swtoolkit:/Users/danny/.rvm/gems/ruby-1.9.2-p180/bin:/Users/danny/.rvm/gems/ruby-1.9.2-p180@global/bin:/Users/danny/.rvm/rubies/ruby-1.9.2-p180/bin:/Users/danny/.rvm/bin:/Users/danny/Documents/github/IDZBuild:/usr/local/bin:/Users/danny/.local/bin:/Users/danny/q/m32:/opt/local/bin:/opt/local/sbin:/Users/danny/fft/apps/rel/scripts:/Users/danny/Documents/github/IDZBuild:/opt/local/bin:/opt/local/sbin:/XCode4.2/usr/bin:/usr/local/graphviz-2.14/bin:/usr/local/mysql/bin:/usr/local/Trolltech/Qt-4.7.0/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/usr/texbin:/Users/danny/bin" + /usr/bin/ditto -rsrc /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/Objects-normal/x86_64/IDZSwiftCommonCrypto-Swift.h /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Products/Debug-iphonesimulator/IDZSwiftCommonCrypto.framework/Headers/IDZSwiftCommonCrypto-Swift.h + +Ditto /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Products/Debug-iphonesimulator/IDZSwiftCommonCrypto.framework/Modules/IDZSwiftCommonCrypto.swiftmodule/x86_64.swiftmodule /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/Objects-normal/x86_64/IDZSwiftCommonCrypto.swiftmodule + cd /Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto + export PATH="/Applications/Xcode-7.0-7A218.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode-7.0-7A218.app/Contents/Developer/usr/bin:/Users/danny/pebble-dev/PebbleSDK-current/bin:/Users/danny/Qt/5.4/clang_64/bin:/Users/danny/.cabal/bin:/Applications/ghc-7.8.3.app/Contents/bin:/Users/danny/Builds/libjingle-read-only/swtoolkit:/Users/danny/.rvm/gems/ruby-1.9.2-p180/bin:/Users/danny/.rvm/gems/ruby-1.9.2-p180@global/bin:/Users/danny/.rvm/rubies/ruby-1.9.2-p180/bin:/Users/danny/.rvm/bin:/Users/danny/Documents/github/IDZBuild:/usr/local/bin:/Users/danny/.local/bin:/Users/danny/q/m32:/opt/local/bin:/opt/local/sbin:/Users/danny/fft/apps/rel/scripts:/Users/danny/Documents/github/IDZBuild:/opt/local/bin:/opt/local/sbin:/XCode4.2/usr/bin:/usr/local/graphviz-2.14/bin:/usr/local/mysql/bin:/usr/local/Trolltech/Qt-4.7.0/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/usr/texbin:/Users/danny/bin" + /usr/bin/ditto -rsrc /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/Objects-normal/x86_64/IDZSwiftCommonCrypto.swiftmodule /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Products/Debug-iphonesimulator/IDZSwiftCommonCrypto.framework/Modules/IDZSwiftCommonCrypto.swiftmodule/x86_64.swiftmodule + +Ditto /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Products/Debug-iphonesimulator/IDZSwiftCommonCrypto.framework/Modules/IDZSwiftCommonCrypto.swiftmodule/x86_64.swiftdoc /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/Objects-normal/x86_64/IDZSwiftCommonCrypto.swiftdoc + cd /Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto + export PATH="/Applications/Xcode-7.0-7A218.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode-7.0-7A218.app/Contents/Developer/usr/bin:/Users/danny/pebble-dev/PebbleSDK-current/bin:/Users/danny/Qt/5.4/clang_64/bin:/Users/danny/.cabal/bin:/Applications/ghc-7.8.3.app/Contents/bin:/Users/danny/Builds/libjingle-read-only/swtoolkit:/Users/danny/.rvm/gems/ruby-1.9.2-p180/bin:/Users/danny/.rvm/gems/ruby-1.9.2-p180@global/bin:/Users/danny/.rvm/rubies/ruby-1.9.2-p180/bin:/Users/danny/.rvm/bin:/Users/danny/Documents/github/IDZBuild:/usr/local/bin:/Users/danny/.local/bin:/Users/danny/q/m32:/opt/local/bin:/opt/local/sbin:/Users/danny/fft/apps/rel/scripts:/Users/danny/Documents/github/IDZBuild:/opt/local/bin:/opt/local/sbin:/XCode4.2/usr/bin:/usr/local/graphviz-2.14/bin:/usr/local/mysql/bin:/usr/local/Trolltech/Qt-4.7.0/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/usr/texbin:/Users/danny/bin" + /usr/bin/ditto -rsrc /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/Objects-normal/x86_64/IDZSwiftCommonCrypto.swiftdoc /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Products/Debug-iphonesimulator/IDZSwiftCommonCrypto.framework/Modules/IDZSwiftCommonCrypto.swiftmodule/x86_64.swiftdoc + +Ld /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Products/Debug-iphonesimulator/IDZSwiftCommonCrypto.framework/IDZSwiftCommonCrypto normal x86_64 + cd /Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto + export IPHONEOS_DEPLOYMENT_TARGET=8.0 + export PATH="/Applications/Xcode-7.0-7A218.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode-7.0-7A218.app/Contents/Developer/usr/bin:/Users/danny/pebble-dev/PebbleSDK-current/bin:/Users/danny/Qt/5.4/clang_64/bin:/Users/danny/.cabal/bin:/Applications/ghc-7.8.3.app/Contents/bin:/Users/danny/Builds/libjingle-read-only/swtoolkit:/Users/danny/.rvm/gems/ruby-1.9.2-p180/bin:/Users/danny/.rvm/gems/ruby-1.9.2-p180@global/bin:/Users/danny/.rvm/rubies/ruby-1.9.2-p180/bin:/Users/danny/.rvm/bin:/Users/danny/Documents/github/IDZBuild:/usr/local/bin:/Users/danny/.local/bin:/Users/danny/q/m32:/opt/local/bin:/opt/local/sbin:/Users/danny/fft/apps/rel/scripts:/Users/danny/Documents/github/IDZBuild:/opt/local/bin:/opt/local/sbin:/XCode4.2/usr/bin:/usr/local/graphviz-2.14/bin:/usr/local/mysql/bin:/usr/local/Trolltech/Qt-4.7.0/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/usr/texbin:/Users/danny/bin" + /Applications/Xcode-7.0-7A218.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch x86_64 -dynamiclib -isysroot /Applications/Xcode-7.0-7A218.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.0.sdk -L/Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Products/Debug-iphonesimulator -F/Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Products/Debug-iphonesimulator -F/Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto -filelist /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/Objects-normal/x86_64/IDZSwiftCommonCrypto.LinkFileList -install_name @rpath/IDZSwiftCommonCrypto.framework/IDZSwiftCommonCrypto -Xlinker -rpath -Xlinker @executable_path/Frameworks -Xlinker -rpath -Xlinker @loader_path/Frameworks -mios-simulator-version-min=8.0 -Xlinker -objc_abi_version -Xlinker 2 -L/Applications/Xcode-7.0-7A218.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator -Xlinker -add_ast_path -Xlinker /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/Objects-normal/x86_64/IDZSwiftCommonCrypto.swiftmodule -single_module -compatibility_version 1 -current_version 1 -Xlinker -dependency_info -Xlinker /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/Objects-normal/x86_64/IDZSwiftCommonCrypto_dependency_info.dat -o /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Products/Debug-iphonesimulator/IDZSwiftCommonCrypto.framework/IDZSwiftCommonCrypto + +GenerateDSYMFile /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Products/Debug-iphonesimulator/IDZSwiftCommonCrypto.framework.dSYM /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Products/Debug-iphonesimulator/IDZSwiftCommonCrypto.framework/IDZSwiftCommonCrypto + cd /Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto + export PATH="/Applications/Xcode-7.0-7A218.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode-7.0-7A218.app/Contents/Developer/usr/bin:/Users/danny/pebble-dev/PebbleSDK-current/bin:/Users/danny/Qt/5.4/clang_64/bin:/Users/danny/.cabal/bin:/Applications/ghc-7.8.3.app/Contents/bin:/Users/danny/Builds/libjingle-read-only/swtoolkit:/Users/danny/.rvm/gems/ruby-1.9.2-p180/bin:/Users/danny/.rvm/gems/ruby-1.9.2-p180@global/bin:/Users/danny/.rvm/rubies/ruby-1.9.2-p180/bin:/Users/danny/.rvm/bin:/Users/danny/Documents/github/IDZBuild:/usr/local/bin:/Users/danny/.local/bin:/Users/danny/q/m32:/opt/local/bin:/opt/local/sbin:/Users/danny/fft/apps/rel/scripts:/Users/danny/Documents/github/IDZBuild:/opt/local/bin:/opt/local/sbin:/XCode4.2/usr/bin:/usr/local/graphviz-2.14/bin:/usr/local/mysql/bin:/usr/local/Trolltech/Qt-4.7.0/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/usr/texbin:/Users/danny/bin" + /Applications/Xcode-7.0-7A218.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/dsymutil /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Products/Debug-iphonesimulator/IDZSwiftCommonCrypto.framework/IDZSwiftCommonCrypto -o /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Products/Debug-iphonesimulator/IDZSwiftCommonCrypto.framework.dSYM + +CpHeader IDZSwiftCommonCrypto/IDZSwiftCommonCrypto.h /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Products/Debug-iphonesimulator/IDZSwiftCommonCrypto.framework/Headers/IDZSwiftCommonCrypto.h + cd /Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto + export PATH="/Applications/Xcode-7.0-7A218.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode-7.0-7A218.app/Contents/Developer/usr/bin:/Users/danny/pebble-dev/PebbleSDK-current/bin:/Users/danny/Qt/5.4/clang_64/bin:/Users/danny/.cabal/bin:/Applications/ghc-7.8.3.app/Contents/bin:/Users/danny/Builds/libjingle-read-only/swtoolkit:/Users/danny/.rvm/gems/ruby-1.9.2-p180/bin:/Users/danny/.rvm/gems/ruby-1.9.2-p180@global/bin:/Users/danny/.rvm/rubies/ruby-1.9.2-p180/bin:/Users/danny/.rvm/bin:/Users/danny/Documents/github/IDZBuild:/usr/local/bin:/Users/danny/.local/bin:/Users/danny/q/m32:/opt/local/bin:/opt/local/sbin:/Users/danny/fft/apps/rel/scripts:/Users/danny/Documents/github/IDZBuild:/opt/local/bin:/opt/local/sbin:/XCode4.2/usr/bin:/usr/local/graphviz-2.14/bin:/usr/local/mysql/bin:/usr/local/Trolltech/Qt-4.7.0/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/usr/texbin:/Users/danny/bin" + builtin-copy -exclude .DS_Store -exclude CVS -exclude .svn -exclude .git -exclude .hg -resolve-src-symlinks /Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto.h /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Products/Debug-iphonesimulator/IDZSwiftCommonCrypto.framework/Headers + +Ditto /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/module.modulemap /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Products/Debug-iphonesimulator/IDZSwiftCommonCrypto.framework/Modules/module.modulemap + cd /Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto + export PATH="/Applications/Xcode-7.0-7A218.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode-7.0-7A218.app/Contents/Developer/usr/bin:/Users/danny/pebble-dev/PebbleSDK-current/bin:/Users/danny/Qt/5.4/clang_64/bin:/Users/danny/.cabal/bin:/Applications/ghc-7.8.3.app/Contents/bin:/Users/danny/Builds/libjingle-read-only/swtoolkit:/Users/danny/.rvm/gems/ruby-1.9.2-p180/bin:/Users/danny/.rvm/gems/ruby-1.9.2-p180@global/bin:/Users/danny/.rvm/rubies/ruby-1.9.2-p180/bin:/Users/danny/.rvm/bin:/Users/danny/Documents/github/IDZBuild:/usr/local/bin:/Users/danny/.local/bin:/Users/danny/q/m32:/opt/local/bin:/opt/local/sbin:/Users/danny/fft/apps/rel/scripts:/Users/danny/Documents/github/IDZBuild:/opt/local/bin:/opt/local/sbin:/XCode4.2/usr/bin:/usr/local/graphviz-2.14/bin:/usr/local/mysql/bin:/usr/local/Trolltech/Qt-4.7.0/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/usr/texbin:/Users/danny/bin" + builtin-copy -exclude .DS_Store -exclude CVS -exclude .svn -exclude .git -exclude .hg -resolve-src-symlinks /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCrypto.build/module.modulemap /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Products/Debug-iphonesimulator/IDZSwiftCommonCrypto.framework/Modules + +Touch /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Products/Debug-iphonesimulator/IDZSwiftCommonCrypto.framework + cd /Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto + export PATH="/Applications/Xcode-7.0-7A218.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode-7.0-7A218.app/Contents/Developer/usr/bin:/Users/danny/pebble-dev/PebbleSDK-current/bin:/Users/danny/Qt/5.4/clang_64/bin:/Users/danny/.cabal/bin:/Applications/ghc-7.8.3.app/Contents/bin:/Users/danny/Builds/libjingle-read-only/swtoolkit:/Users/danny/.rvm/gems/ruby-1.9.2-p180/bin:/Users/danny/.rvm/gems/ruby-1.9.2-p180@global/bin:/Users/danny/.rvm/rubies/ruby-1.9.2-p180/bin:/Users/danny/.rvm/bin:/Users/danny/Documents/github/IDZBuild:/usr/local/bin:/Users/danny/.local/bin:/Users/danny/q/m32:/opt/local/bin:/opt/local/sbin:/Users/danny/fft/apps/rel/scripts:/Users/danny/Documents/github/IDZBuild:/opt/local/bin:/opt/local/sbin:/XCode4.2/usr/bin:/usr/local/graphviz-2.14/bin:/usr/local/mysql/bin:/usr/local/Trolltech/Qt-4.7.0/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/usr/texbin:/Users/danny/bin" + /usr/bin/touch -c /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Products/Debug-iphonesimulator/IDZSwiftCommonCrypto.framework === BUILD TARGET IDZSwiftCommonCryptoTests OF PROJECT IDZSwiftCommonCrypto WITH CONFIGURATION Debug === Check dependencies -Test Suite 'All tests' started at 2014-10-06 18:15:47 +0000 -Test Suite 'IDZSwiftCommonCryptoTests.xctest' started at 2014-10-06 18:15:47 +0000 -Test Suite 'IDZSwiftCommonCryptoTests' started at 2014-10-06 18:15:47 +0000 -Test Case '-[IDZSwiftCommonCryptoTests.IDZSwiftCommonCryptoTests test_Cryptor_AES_CBC_1]' started. -Test Case '-[IDZSwiftCommonCryptoTests.IDZSwiftCommonCryptoTests test_Cryptor_AES_CBC_1]' passed (0.149 seconds). -Test Case '-[IDZSwiftCommonCryptoTests.IDZSwiftCommonCryptoTests test_Cryptor_AES_ECB]' started. -Test Case '-[IDZSwiftCommonCryptoTests.IDZSwiftCommonCryptoTests test_Cryptor_AES_ECB]' passed (0.032 seconds). -Test Case '-[IDZSwiftCommonCryptoTests.IDZSwiftCommonCryptoTests test_Cryptor_AES_ECB_2]' started. -Test Case '-[IDZSwiftCommonCryptoTests.IDZSwiftCommonCryptoTests test_Cryptor_AES_ECB_2]' passed (0.033 seconds). -Test Case '-[IDZSwiftCommonCryptoTests.IDZSwiftCommonCryptoTests test_Cryptor_AES_ECB_Short]' started. -Test Case '-[IDZSwiftCommonCryptoTests.IDZSwiftCommonCryptoTests test_Cryptor_AES_ECB_Short]' passed (0.008 seconds). -Test Case '-[IDZSwiftCommonCryptoTests.IDZSwiftCommonCryptoTests test_Digest_MD5_Composition_Bytes]' started. -Test Case '-[IDZSwiftCommonCryptoTests.IDZSwiftCommonCryptoTests test_Digest_MD5_Composition_Bytes]' passed (0.001 seconds). -Test Case '-[IDZSwiftCommonCryptoTests.IDZSwiftCommonCryptoTests test_Digest_MD5_Composition_String]' started. -Test Case '-[IDZSwiftCommonCryptoTests.IDZSwiftCommonCryptoTests test_Digest_MD5_Composition_String]' passed (0.085 seconds). -Test Case '-[IDZSwiftCommonCryptoTests.IDZSwiftCommonCryptoTests test_Digest_MD5_Composition_String_2]' started. -Test Case '-[IDZSwiftCommonCryptoTests.IDZSwiftCommonCryptoTests test_Digest_MD5_Composition_String_2]' passed (0.003 seconds). -Test Case '-[IDZSwiftCommonCryptoTests.IDZSwiftCommonCryptoTests test_Digest_MD5_NSData]' started. -Test Case '-[IDZSwiftCommonCryptoTests.IDZSwiftCommonCryptoTests test_Digest_MD5_NSData]' passed (0.008 seconds). -Test Case '-[IDZSwiftCommonCryptoTests.IDZSwiftCommonCryptoTests test_HMAC_SHA1]' started. -Test Case '-[IDZSwiftCommonCryptoTests.IDZSwiftCommonCryptoTests test_HMAC_SHA1]' passed (0.068 seconds). -Test Case '-[IDZSwiftCommonCryptoTests.IDZSwiftCommonCryptoTests test_HMAC_SHA1_NSData]' started. -Test Case '-[IDZSwiftCommonCryptoTests.IDZSwiftCommonCryptoTests test_HMAC_SHA1_NSData]' passed (0.006 seconds). -Test Case '-[IDZSwiftCommonCryptoTests.IDZSwiftCommonCryptoTests test_KeyDerivation_deriveKey]' started. -Test Case '-[IDZSwiftCommonCryptoTests.IDZSwiftCommonCryptoTests test_KeyDerivation_deriveKey]' passed (0.088 seconds). -Test Case '-[IDZSwiftCommonCryptoTests.IDZSwiftCommonCryptoTests test_Random_generateBytes]' started. -Test Case '-[IDZSwiftCommonCryptoTests.IDZSwiftCommonCryptoTests test_Random_generateBytes]' passed (0.014 seconds). -Test Case '-[IDZSwiftCommonCryptoTests.IDZSwiftCommonCryptoTests test_Utilities_arrayFromHexString_lowerCase]' started. -Test Case '-[IDZSwiftCommonCryptoTests.IDZSwiftCommonCryptoTests test_Utilities_arrayFromHexString_lowerCase]' passed (0.004 seconds). -Test Case '-[IDZSwiftCommonCryptoTests.IDZSwiftCommonCryptoTests test_Utilities_arrayFromHexString_upperCase]' started. -Test Case '-[IDZSwiftCommonCryptoTests.IDZSwiftCommonCryptoTests test_Utilities_arrayFromHexString_upperCase]' passed (0.006 seconds). -Test Case '-[IDZSwiftCommonCryptoTests.IDZSwiftCommonCryptoTests testHexStringFromArray]' started. -Test Case '-[IDZSwiftCommonCryptoTests.IDZSwiftCommonCryptoTests testHexStringFromArray]' passed (0.002 seconds). -Test Case '-[IDZSwiftCommonCryptoTests.IDZSwiftCommonCryptoTests testMD5_1]' started. -Test Case '-[IDZSwiftCommonCryptoTests.IDZSwiftCommonCryptoTests testMD5_1]' passed (0.002 seconds). -Test Suite 'IDZSwiftCommonCryptoTests' passed at 2014-10-06 18:15:47 +0000. - Executed 16 tests, with 0 failures (0 unexpected) in 0.510 (0.538) seconds -Test Suite 'IDZSwiftCommonCryptoTests.xctest' passed at 2014-10-06 18:15:47 +0000. - Executed 16 tests, with 0 failures (0 unexpected) in 0.510 (0.540) seconds -Test Suite 'All test** TEST SUCCEEDED ** - -s' passed at 2014-10-06 18:15:47 +0000. - Executed 16 tests, with 0 failures (0 unexpected) in 0.510 (0.544) seconds +Write auxiliary files +write-file /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCryptoTests.build/IDZSwiftCommonCryptoTests-all-non-framework-target-headers.hmap + +Create product structure +/bin/mkdir -p /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Products/Debug-iphonesimulator/IDZSwiftCommonCryptoTests.xctest + +ProcessInfoPlistFile /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Products/Debug-iphonesimulator/IDZSwiftCommonCryptoTests.xctest/Info.plist IDZSwiftCommonCryptoTests/Info.plist + cd /Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto + export PATH="/Applications/Xcode-7.0-7A218.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode-7.0-7A218.app/Contents/Developer/usr/bin:/Users/danny/pebble-dev/PebbleSDK-current/bin:/Users/danny/Qt/5.4/clang_64/bin:/Users/danny/.cabal/bin:/Applications/ghc-7.8.3.app/Contents/bin:/Users/danny/Builds/libjingle-read-only/swtoolkit:/Users/danny/.rvm/gems/ruby-1.9.2-p180/bin:/Users/danny/.rvm/gems/ruby-1.9.2-p180@global/bin:/Users/danny/.rvm/rubies/ruby-1.9.2-p180/bin:/Users/danny/.rvm/bin:/Users/danny/Documents/github/IDZBuild:/usr/local/bin:/Users/danny/.local/bin:/Users/danny/q/m32:/opt/local/bin:/opt/local/sbin:/Users/danny/fft/apps/rel/scripts:/Users/danny/Documents/github/IDZBuild:/opt/local/bin:/opt/local/sbin:/XCode4.2/usr/bin:/usr/local/graphviz-2.14/bin:/usr/local/mysql/bin:/usr/local/Trolltech/Qt-4.7.0/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/usr/texbin:/Users/danny/bin" + builtin-infoPlistUtility /Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/IDZSwiftCommonCryptoTests/Info.plist -expandbuildsettings -format binary -platform iphonesimulator -o /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Products/Debug-iphonesimulator/IDZSwiftCommonCryptoTests.xctest/Info.plist + +CompileSwiftSources normal x86_64 com.apple.xcode.tools.swift.compiler + cd /Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto + export PATH="/Applications/Xcode-7.0-7A218.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode-7.0-7A218.app/Contents/Developer/usr/bin:/Users/danny/pebble-dev/PebbleSDK-current/bin:/Users/danny/Qt/5.4/clang_64/bin:/Users/danny/.cabal/bin:/Applications/ghc-7.8.3.app/Contents/bin:/Users/danny/Builds/libjingle-read-only/swtoolkit:/Users/danny/.rvm/gems/ruby-1.9.2-p180/bin:/Users/danny/.rvm/gems/ruby-1.9.2-p180@global/bin:/Users/danny/.rvm/rubies/ruby-1.9.2-p180/bin:/Users/danny/.rvm/bin:/Users/danny/Documents/github/IDZBuild:/usr/local/bin:/Users/danny/.local/bin:/Users/danny/q/m32:/opt/local/bin:/opt/local/sbin:/Users/danny/fft/apps/rel/scripts:/Users/danny/Documents/github/IDZBuild:/opt/local/bin:/opt/local/sbin:/XCode4.2/usr/bin:/usr/local/graphviz-2.14/bin:/usr/local/mysql/bin:/usr/local/Trolltech/Qt-4.7.0/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/usr/texbin:/Users/danny/bin" + /Applications/Xcode-7.0-7A218.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swiftc -incremental -module-name IDZSwiftCommonCryptoTests -Onone -sdk /Applications/Xcode-7.0-7A218.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.0.sdk -target x86_64-apple-ios8.0 -g -module-cache-path /Users/danny/Library/Developer/Xcode/DerivedData/ModuleCache -Xfrontend -serialize-debugging-options -I /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Products/Debug-iphonesimulator -I /Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/CommonCrypto -F /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Products/Debug-iphonesimulator -F /Applications/Xcode-7.0-7A218.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.0.sdk/Developer/Library/Frameworks -F /Applications/Xcode-7.0-7A218.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Library/Frameworks -parse-as-library -c -j4 /Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/IDZSwiftCommonCryptoTests/IDZSwiftCommonCryptoTests.swift -output-file-map /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCryptoTests.build/Objects-normal/x86_64/IDZSwiftCommonCryptoTests-OutputFileMap.json -parseable-output -serialize-diagnostics -emit-dependencies -emit-module -emit-module-path /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCryptoTests.build/Objects-normal/x86_64/IDZSwiftCommonCryptoTests.swiftmodule -Xcc -I/Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCryptoTests.build/swift-overrides.hmap -Xcc -iquote -Xcc /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCryptoTests.build/IDZSwiftCommonCryptoTests-generated-files.hmap -Xcc -I/Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCryptoTests.build/IDZSwiftCommonCryptoTests-own-target-headers.hmap -Xcc -I/Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCryptoTests.build/IDZSwiftCommonCryptoTests-all-non-framework-target-headers.hmap -Xcc -ivfsoverlay -Xcc /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/all-product-headers.yaml -Xcc -iquote -Xcc /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCryptoTests.build/IDZSwiftCommonCryptoTests-project-headers.hmap -Xcc -I/Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Products/Debug-iphonesimulator/include -Xcc -I/Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCryptoTests.build/DerivedSources/x86_64 -Xcc -I/Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCryptoTests.build/DerivedSources -Xcc -DDEBUG=1 -Xcc -DDEBUG=1 -emit-objc-header -emit-objc-header-path /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCryptoTests.build/Objects-normal/x86_64/IDZSwiftCommonCryptoTests-Swift.h -Xcc -working-directory/Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto -Xfrontend -serialize-debugging-options + +CompileSwift normal x86_64 /Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/IDZSwiftCommonCryptoTests/IDZSwiftCommonCryptoTests.swift + cd /Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto + /Applications/Xcode-7.0-7A218.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift -frontend -c -primary-file /Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/IDZSwiftCommonCryptoTests/IDZSwiftCommonCryptoTests.swift -target x86_64-apple-ios8.0 -enable-objc-interop -sdk /Applications/Xcode-7.0-7A218.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.0.sdk -I /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Products/Debug-iphonesimulator -I /Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/CommonCrypto -F /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Products/Debug-iphonesimulator -F /Applications/Xcode-7.0-7A218.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.0.sdk/Developer/Library/Frameworks -F /Applications/Xcode-7.0-7A218.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Library/Frameworks -g -module-cache-path /Users/danny/Library/Developer/Xcode/DerivedData/ModuleCache -serialize-debugging-options -serialize-debugging-options -Xcc -I/Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCryptoTests.build/swift-overrides.hmap -Xcc -iquote -Xcc /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCryptoTests.build/IDZSwiftCommonCryptoTests-generated-files.hmap -Xcc -I/Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCryptoTests.build/IDZSwiftCommonCryptoTests-own-target-headers.hmap -Xcc -I/Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCryptoTests.build/IDZSwiftCommonCryptoTests-all-non-framework-target-headers.hmap -Xcc -ivfsoverlay -Xcc /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/all-product-headers.yaml -Xcc -iquote -Xcc /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCryptoTests.build/IDZSwiftCommonCryptoTests-project-headers.hmap -Xcc -I/Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Products/Debug-iphonesimulator/include -Xcc -I/Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCryptoTests.build/DerivedSources/x86_64 -Xcc -I/Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCryptoTests.build/DerivedSources -Xcc -DDEBUG=1 -Xcc -DDEBUG=1 -Xcc -working-directory/Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto -emit-module-doc-path /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCryptoTests.build/Objects-normal/x86_64/IDZSwiftCommonCryptoTests~partial.swiftdoc -Onone -parse-as-library -module-name IDZSwiftCommonCryptoTests -emit-module-path /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCryptoTests.build/Objects-normal/x86_64/IDZSwiftCommonCryptoTests~partial.swiftmodule -serialize-diagnostics-path /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCryptoTests.build/Objects-normal/x86_64/IDZSwiftCommonCryptoTests.dia -emit-dependencies-path /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCryptoTests.build/Objects-normal/x86_64/IDZSwiftCommonCryptoTests.d -emit-reference-dependencies-path /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCryptoTests.build/Objects-normal/x86_64/IDZSwiftCommonCryptoTests.swiftdeps -o /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCryptoTests.build/Objects-normal/x86_64/IDZSwiftCommonCryptoTests.o +/Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/IDZSwiftCommonCryptoTests/IDZSwiftCommonCryptoTests.swift:31:13: warning: initialization of variable 'key' was never used; consider replacing with assignment to '_' or removing it + var key = arrayFromHexString("2b7e151628aed2a6abf7158809cf4f3c") + ~~~~^~~ + _ +/Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/IDZSwiftCommonCryptoTests/IDZSwiftCommonCryptoTests.swift:32:13: warning: initialization of variable 'plainText' was never used; consider replacing with assignment to '_' or removing it + var plainText = arrayFromHexString("6bc1bee22e409f96e93d7e117393172a") + ~~~~^~~~~~~~~ + _ +/Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/IDZSwiftCommonCryptoTests/IDZSwiftCommonCryptoTests.swift:34:13: warning: variable 'aesEncrypt' was never mutated; consider changing to 'let' constant + var aesEncrypt = Cryptor(operation:.Encrypt, algorithm:.AES, options:.ECBMode, + ~~~ ^ + let +/Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/IDZSwiftCommonCryptoTests/IDZSwiftCommonCryptoTests.swift:37:17: warning: immutable value 'status' was never used; consider replacing with '_' or removing it + let (c, status) = aesEncrypt.update(aesPlaintext1Bytes, byteArrayOut: &dataOut) + ^~~~~~ + _ +/Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/IDZSwiftCommonCryptoTests/IDZSwiftCommonCryptoTests.swift:46:13: warning: variable 'key' was never mutated; consider changing to 'let' constant + var key = aesKey1Bytes //arrayFromHexString("2b7e151628aed2a6abf7158809cf4f3c") + ~~~ ^ + let +/Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/IDZSwiftCommonCryptoTests/IDZSwiftCommonCryptoTests.swift:47:13: warning: variable 'plainText' was never mutated; consider changing to 'let' constant + var plainText = aesPlaintext1Bytes + aesPlaintext1Bytes + ~~~ ^ + let +/Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/IDZSwiftCommonCryptoTests/IDZSwiftCommonCryptoTests.swift:48:13: warning: variable 'expectedCipherText' was never mutated; consider changing to 'let' constant + var expectedCipherText = aesCipherText1Bytes + aesCipherText1Bytes + ~~~ ^ + let +/Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/IDZSwiftCommonCryptoTests/IDZSwiftCommonCryptoTests.swift:50:13: warning: variable 'cipherText' was never mutated; consider changing to 'let' constant + var cipherText = Cryptor(operation:.Encrypt, algorithm:.AES, options:.ECBMode, key:key, iv:Array()).update(plainText)?.final() + ~~~ ^ + let +/Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/IDZSwiftCommonCryptoTests/IDZSwiftCommonCryptoTests.swift:60:13: warning: variable 'key' was never mutated; consider changing to 'let' constant + var key = arrayFromHexString("2b7e151628aed2a6abf7158809cf4f3c") + ~~~ ^ + let +/Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/IDZSwiftCommonCryptoTests/IDZSwiftCommonCryptoTests.swift:61:13: warning: variable 'plainText' was never mutated; consider changing to 'let' constant + var plainText = arrayFromHexString("6bc1bee22e409f96e93d7e11739317") + ~~~ ^ + let +/Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/IDZSwiftCommonCryptoTests/IDZSwiftCommonCryptoTests.swift:62:13: warning: initialization of variable 'expectedCipherText' was never used; consider replacing with assignment to '_' or removing it + var expectedCipherText = arrayFromHexString("3ad77bb40d7a3660a89ecaf32466ef97") + ~~~~^~~~~~~~~~~~~~~~~~ + _ +/Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/IDZSwiftCommonCryptoTests/IDZSwiftCommonCryptoTests.swift:64:13: warning: variable 'cryptor' was never mutated; consider changing to 'let' constant + var cryptor = Cryptor(operation:.Encrypt, algorithm:.AES, options:.ECBMode, key:key, iv:Array()) + ~~~ ^ + let +/Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/IDZSwiftCommonCryptoTests/IDZSwiftCommonCryptoTests.swift:65:13: warning: variable 'cipherText' was never mutated; consider changing to 'let' constant + var cipherText = cryptor.update(plainText)?.final() + ~~~ ^ + let +/Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/IDZSwiftCommonCryptoTests/IDZSwiftCommonCryptoTests.swift:73:13: warning: variable 'key' was never mutated; consider changing to 'let' constant + var key = arrayFromHexString("2b7e151628aed2a6abf7158809cf4f3c") + ~~~ ^ + let +/Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/IDZSwiftCommonCryptoTests/IDZSwiftCommonCryptoTests.swift:74:13: warning: variable 'plainText' was never mutated; consider changing to 'let' constant + var plainText = arrayFromHexString("6bc1bee22e409f96e93d7e117393172a") + ~~~ ^ + let +/Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/IDZSwiftCommonCryptoTests/IDZSwiftCommonCryptoTests.swift:75:13: warning: variable 'expectedCipherText' was never mutated; consider changing to 'let' constant + var expectedCipherText = arrayFromHexString("3ad77bb40d7a3660a89ecaf32466ef97") + ~~~ ^ + let +/Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/IDZSwiftCommonCryptoTests/IDZSwiftCommonCryptoTests.swift:77:13: warning: variable 'cipherText' was never mutated; consider changing to 'let' constant + var cipherText = Cryptor(operation:.Encrypt, algorithm:.AES, options:.None, key:key, iv:Array()).update(plainText)?.final() + ~~~ ^ + let +/Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/IDZSwiftCommonCryptoTests/IDZSwiftCommonCryptoTests.swift:82:13: warning: variable 'decryptedText' was never mutated; consider changing to 'let' constant + var decryptedText = Cryptor(operation:.Decrypt, algorithm:.AES, options:.None, key:key, iv:Array()).update(cipherText!)?.final() + ~~~ ^ + let +/Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/IDZSwiftCommonCryptoTests/IDZSwiftCommonCryptoTests.swift:103:13: warning: variable 'md5' was never mutated; consider changing to 'let' constant + var md5 : Digest = Digest(algorithm:.MD5) + ~~~ ^ + let +/Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/IDZSwiftCommonCryptoTests/IDZSwiftCommonCryptoTests.swift:113:13: warning: variable 'digest' was never mutated; consider changing to 'let' constant + var digest = Digest(algorithm: .MD5).update(qbfData)?.final() + ~~~ ^ + let +/Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/IDZSwiftCommonCryptoTests/IDZSwiftCommonCryptoTests.swift:122:13: warning: variable 'digest' was never mutated; consider changing to 'let' constant + var digest = Digest(algorithm: .MD5).update(qbfString)?.final() + ~~~ ^ + let +/Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/IDZSwiftCommonCryptoTests/IDZSwiftCommonCryptoTests.swift:132:13: warning: variable 'digest' was never mutated; consider changing to 'let' constant + var digest = Digest(algorithm: .MD5).update(s1)?.update(s2)?.final() + ~~~ ^ + let +/Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/IDZSwiftCommonCryptoTests/IDZSwiftCommonCryptoTests.swift:141:13: warning: variable 'digest' was never mutated; consider changing to 'let' constant + var digest = Digest(algorithm: .MD5).update(qbfBytes)?.final() + ~~~ ^ + let +/Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/IDZSwiftCommonCryptoTests/IDZSwiftCommonCryptoTests.swift:150:13: warning: variable 'key' was never mutated; consider changing to 'let' constant + var key = arrayFromHexString("0102030405060708090a0b0c0d0e0f10111213141516171819") + ~~~ ^ + let +/Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/IDZSwiftCommonCryptoTests/IDZSwiftCommonCryptoTests.swift:151:13: warning: variable 'data' was never mutated; consider changing to 'let' constant + var data : [UInt8] = Array(count:50, repeatedValue:0xcd) + ~~~ ^ + let +/Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/IDZSwiftCommonCryptoTests/IDZSwiftCommonCryptoTests.swift:152:13: warning: variable 'expected' was never mutated; consider changing to 'let' constant + var expected = arrayFromHexString("4c9007f4026250c6bc8414f9bf50c86c2d7235da") + ~~~ ^ + let +/Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/IDZSwiftCommonCryptoTests/IDZSwiftCommonCryptoTests.swift:154:13: warning: variable 'hmac' was never mutated; consider changing to 'let' constant + var hmac = HMAC(algorithm:.SHA1, key:key).update(data)?.final() + ~~~ ^ + let +/Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/IDZSwiftCommonCryptoTests/IDZSwiftCommonCryptoTests.swift:161:13: warning: variable 'key' was never mutated; consider changing to 'let' constant + var key = dataFromHexString("0102030405060708090a0b0c0d0e0f10111213141516171819") + ~~~ ^ + let +/Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/IDZSwiftCommonCryptoTests/IDZSwiftCommonCryptoTests.swift:162:13: warning: variable 'data' was never mutated; consider changing to 'let' constant + var data = dataFromByteArray(Array(count:50, repeatedValue:0xcd)) + ~~~ ^ + let +/Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/IDZSwiftCommonCryptoTests/IDZSwiftCommonCryptoTests.swift:163:13: warning: variable 'expected' was never mutated; consider changing to 'let' constant + var expected = arrayFromHexString("4c9007f4026250c6bc8414f9bf50c86c2d7235da") + ~~~ ^ + let +/Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/IDZSwiftCommonCryptoTests/IDZSwiftCommonCryptoTests.swift:165:13: warning: variable 'hmac' was never mutated; consider changing to 'let' constant + var hmac = HMAC(algorithm:.SHA1, key:key).update(data)?.final() + ~~~ ^ + let +/Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/IDZSwiftCommonCryptoTests/IDZSwiftCommonCryptoTests.swift:196:13: warning: variable 'bytes' was never mutated; consider changing to 'let' constant + var bytes = Random.generateBytes(count) + ~~~ ^ + let +/Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/IDZSwiftCommonCryptoTests/IDZSwiftCommonCryptoTests.swift:204:13: warning: variable 's' was never mutated; consider changing to 'let' constant + var s = "deadface" + ~~~ ^ + let +/Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/IDZSwiftCommonCryptoTests/IDZSwiftCommonCryptoTests.swift:205:13: warning: variable 'expected' was never mutated; consider changing to 'let' constant + var expected : [UInt8] = [ 0xde, 0xad, 0xfa, 0xce ] + ~~~ ^ + let +/Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/IDZSwiftCommonCryptoTests/IDZSwiftCommonCryptoTests.swift:206:13: warning: variable 'result' was never mutated; consider changing to 'let' constant + var result = arrayFromHexString(s) + ~~~ ^ + let +/Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/IDZSwiftCommonCryptoTests/IDZSwiftCommonCryptoTests.swift:212:13: warning: variable 's' was never mutated; consider changing to 'let' constant + var s = "DEADFACE" + ~~~ ^ + let +/Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/IDZSwiftCommonCryptoTests/IDZSwiftCommonCryptoTests.swift:213:13: warning: variable 'expected' was never mutated; consider changing to 'let' constant + var expected : [UInt8] = [ 0xde, 0xad, 0xfa, 0xce ] + ~~~ ^ + let +/Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/IDZSwiftCommonCryptoTests/IDZSwiftCommonCryptoTests.swift:214:13: warning: variable 'result' was never mutated; consider changing to 'let' constant + var result = arrayFromHexString(s) + ~~~ ^ + let +/Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/IDZSwiftCommonCryptoTests/IDZSwiftCommonCryptoTests.swift:220:13: warning: variable 'v' was never mutated; consider changing to 'let' constant + var v : [UInt8] = [ 0xde, 0xad, 0xfa, 0xce ] + ~~~ ^ + let + +MergeSwiftModule normal x86_64 /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCryptoTests.build/Objects-normal/x86_64/IDZSwiftCommonCryptoTests.swiftmodule + cd /Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto + /Applications/Xcode-7.0-7A218.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift -frontend -emit-module /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCryptoTests.build/Objects-normal/x86_64/IDZSwiftCommonCryptoTests~partial.swiftmodule -parse-as-library -target x86_64-apple-ios8.0 -enable-objc-interop -sdk /Applications/Xcode-7.0-7A218.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.0.sdk -I /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Products/Debug-iphonesimulator -I /Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/CommonCrypto -F /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Products/Debug-iphonesimulator -F /Applications/Xcode-7.0-7A218.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.0.sdk/Developer/Library/Frameworks -F /Applications/Xcode-7.0-7A218.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Library/Frameworks -g -module-cache-path /Users/danny/Library/Developer/Xcode/DerivedData/ModuleCache -serialize-debugging-options -serialize-debugging-options -Xcc -I/Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCryptoTests.build/swift-overrides.hmap -Xcc -iquote -Xcc /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCryptoTests.build/IDZSwiftCommonCryptoTests-generated-files.hmap -Xcc -I/Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCryptoTests.build/IDZSwiftCommonCryptoTests-own-target-headers.hmap -Xcc -I/Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCryptoTests.build/IDZSwiftCommonCryptoTests-all-non-framework-target-headers.hmap -Xcc -ivfsoverlay -Xcc /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/all-product-headers.yaml -Xcc -iquote -Xcc /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCryptoTests.build/IDZSwiftCommonCryptoTests-project-headers.hmap -Xcc -I/Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Products/Debug-iphonesimulator/include -Xcc -I/Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCryptoTests.build/DerivedSources/x86_64 -Xcc -I/Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCryptoTests.build/DerivedSources -Xcc -DDEBUG=1 -Xcc -DDEBUG=1 -Xcc -working-directory/Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto -emit-module-doc-path /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCryptoTests.build/Objects-normal/x86_64/IDZSwiftCommonCryptoTests.swiftdoc -module-name IDZSwiftCommonCryptoTests -emit-objc-header-path /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCryptoTests.build/Objects-normal/x86_64/IDZSwiftCommonCryptoTests-Swift.h -o /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCryptoTests.build/Objects-normal/x86_64/IDZSwiftCommonCryptoTests.swiftmodule + +Ditto /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCryptoTests.build/DerivedSources/IDZSwiftCommonCryptoTests-Swift.h /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCryptoTests.build/Objects-normal/x86_64/IDZSwiftCommonCryptoTests-Swift.h + cd /Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto + export PATH="/Applications/Xcode-7.0-7A218.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode-7.0-7A218.app/Contents/Developer/usr/bin:/Users/danny/pebble-dev/PebbleSDK-current/bin:/Users/danny/Qt/5.4/clang_64/bin:/Users/danny/.cabal/bin:/Applications/ghc-7.8.3.app/Contents/bin:/Users/danny/Builds/libjingle-read-only/swtoolkit:/Users/danny/.rvm/gems/ruby-1.9.2-p180/bin:/Users/danny/.rvm/gems/ruby-1.9.2-p180@global/bin:/Users/danny/.rvm/rubies/ruby-1.9.2-p180/bin:/Users/danny/.rvm/bin:/Users/danny/Documents/github/IDZBuild:/usr/local/bin:/Users/danny/.local/bin:/Users/danny/q/m32:/opt/local/bin:/opt/local/sbin:/Users/danny/fft/apps/rel/scripts:/Users/danny/Documents/github/IDZBuild:/opt/local/bin:/opt/local/sbin:/XCode4.2/usr/bin:/usr/local/graphviz-2.14/bin:/usr/local/mysql/bin:/usr/local/Trolltech/Qt-4.7.0/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/usr/texbin:/Users/danny/bin" + /usr/bin/ditto -rsrc /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCryptoTests.build/Objects-normal/x86_64/IDZSwiftCommonCryptoTests-Swift.h /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCryptoTests.build/DerivedSources/IDZSwiftCommonCryptoTests-Swift.h + +CompileC /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCryptoTests.build/Objects-normal/x86_64/IDZSwiftCommonCryptoTests_vers.o /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCryptoTests.build/DerivedSources/IDZSwiftCommonCryptoTests_vers.c normal x86_64 c com.apple.compilers.llvm.clang.1_0.compiler + cd /Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto + export LANG=en_US.US-ASCII + export PATH="/Applications/Xcode-7.0-7A218.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode-7.0-7A218.app/Contents/Developer/usr/bin:/Users/danny/pebble-dev/PebbleSDK-current/bin:/Users/danny/Qt/5.4/clang_64/bin:/Users/danny/.cabal/bin:/Applications/ghc-7.8.3.app/Contents/bin:/Users/danny/Builds/libjingle-read-only/swtoolkit:/Users/danny/.rvm/gems/ruby-1.9.2-p180/bin:/Users/danny/.rvm/gems/ruby-1.9.2-p180@global/bin:/Users/danny/.rvm/rubies/ruby-1.9.2-p180/bin:/Users/danny/.rvm/bin:/Users/danny/Documents/github/IDZBuild:/usr/local/bin:/Users/danny/.local/bin:/Users/danny/q/m32:/opt/local/bin:/opt/local/sbin:/Users/danny/fft/apps/rel/scripts:/Users/danny/Documents/github/IDZBuild:/opt/local/bin:/opt/local/sbin:/XCode4.2/usr/bin:/usr/local/graphviz-2.14/bin:/usr/local/mysql/bin:/usr/local/Trolltech/Qt-4.7.0/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/usr/texbin:/Users/danny/bin" + /Applications/Xcode-7.0-7A218.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -x c -arch x86_64 -fmessage-length=0 -fdiagnostics-show-note-include-stack -fmacro-backtrace-limit=0 -std=gnu99 -fmodules -gmodules -fmodules-cache-path=/Users/danny/Library/Developer/Xcode/DerivedData/ModuleCache -fmodules-prune-interval=86400 -fmodules-prune-after=345600 -fbuild-session-file=/Users/danny/Library/Developer/Xcode/DerivedData/ModuleCache/Session.modulevalidation -fmodules-validate-once-per-build-session -Wnon-modular-include-in-framework-module -Werror=non-modular-include-in-framework-module -Wno-trigraphs -fpascal-strings -O0 -Wno-missing-field-initializers -Wno-missing-prototypes -Werror=return-type -Wunreachable-code -Werror=deprecated-objc-isa-usage -Werror=objc-root-class -Wno-missing-braces -Wparentheses -Wswitch -Wunused-function -Wno-unused-label -Wno-unused-parameter -Wunused-variable -Wunused-value -Wempty-body -Wconditional-uninitialized -Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants -Wno-conversion -Wconstant-conversion -Wint-conversion -Wbool-conversion -Wenum-conversion -Wshorten-64-to-32 -Wpointer-sign -Wno-newline-eof -DDEBUG=1 -DDEBUG=1 -isysroot /Applications/Xcode-7.0-7A218.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.0.sdk -fasm-blocks -fstrict-aliasing -Wdeprecated-declarations -mios-simulator-version-min=8.0 -g -Wno-sign-conversion -iquote /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCryptoTests.build/IDZSwiftCommonCryptoTests-generated-files.hmap -I/Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCryptoTests.build/IDZSwiftCommonCryptoTests-own-target-headers.hmap -I/Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCryptoTests.build/IDZSwiftCommonCryptoTests-all-non-framework-target-headers.hmap -ivfsoverlay /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/all-product-headers.yaml -iquote /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCryptoTests.build/IDZSwiftCommonCryptoTests-project-headers.hmap -I/Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Products/Debug-iphonesimulator/include -I/Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCryptoTests.build/DerivedSources/x86_64 -I/Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCryptoTests.build/DerivedSources -F/Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Products/Debug-iphonesimulator -F/Applications/Xcode-7.0-7A218.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.0.sdk/Developer/Library/Frameworks -F/Applications/Xcode-7.0-7A218.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Library/Frameworks -MMD -MT dependencies -MF /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCryptoTests.build/Objects-normal/x86_64/IDZSwiftCommonCryptoTests_vers.d --serialize-diagnostics /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCryptoTests.build/Objects-normal/x86_64/IDZSwiftCommonCryptoTests_vers.dia -c /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCryptoTests.build/DerivedSources/IDZSwiftCommonCryptoTests_vers.c -o /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCryptoTests.build/Objects-normal/x86_64/IDZSwiftCommonCryptoTests_vers.o + +Ditto /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Products/Debug-iphonesimulator/IDZSwiftCommonCryptoTests.swiftmodule/x86_64.swiftmodule /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCryptoTests.build/Objects-normal/x86_64/IDZSwiftCommonCryptoTests.swiftmodule + cd /Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto + export PATH="/Applications/Xcode-7.0-7A218.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode-7.0-7A218.app/Contents/Developer/usr/bin:/Users/danny/pebble-dev/PebbleSDK-current/bin:/Users/danny/Qt/5.4/clang_64/bin:/Users/danny/.cabal/bin:/Applications/ghc-7.8.3.app/Contents/bin:/Users/danny/Builds/libjingle-read-only/swtoolkit:/Users/danny/.rvm/gems/ruby-1.9.2-p180/bin:/Users/danny/.rvm/gems/ruby-1.9.2-p180@global/bin:/Users/danny/.rvm/rubies/ruby-1.9.2-p180/bin:/Users/danny/.rvm/bin:/Users/danny/Documents/github/IDZBuild:/usr/local/bin:/Users/danny/.local/bin:/Users/danny/q/m32:/opt/local/bin:/opt/local/sbin:/Users/danny/fft/apps/rel/scripts:/Users/danny/Documents/github/IDZBuild:/opt/local/bin:/opt/local/sbin:/XCode4.2/usr/bin:/usr/local/graphviz-2.14/bin:/usr/local/mysql/bin:/usr/local/Trolltech/Qt-4.7.0/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/usr/texbin:/Users/danny/bin" + /usr/bin/ditto -rsrc /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCryptoTests.build/Objects-normal/x86_64/IDZSwiftCommonCryptoTests.swiftmodule /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Products/Debug-iphonesimulator/IDZSwiftCommonCryptoTests.swiftmodule/x86_64.swiftmodule + +Ditto /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Products/Debug-iphonesimulator/IDZSwiftCommonCryptoTests.swiftmodule/x86_64.swiftdoc /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCryptoTests.build/Objects-normal/x86_64/IDZSwiftCommonCryptoTests.swiftdoc + cd /Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto + export PATH="/Applications/Xcode-7.0-7A218.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode-7.0-7A218.app/Contents/Developer/usr/bin:/Users/danny/pebble-dev/PebbleSDK-current/bin:/Users/danny/Qt/5.4/clang_64/bin:/Users/danny/.cabal/bin:/Applications/ghc-7.8.3.app/Contents/bin:/Users/danny/Builds/libjingle-read-only/swtoolkit:/Users/danny/.rvm/gems/ruby-1.9.2-p180/bin:/Users/danny/.rvm/gems/ruby-1.9.2-p180@global/bin:/Users/danny/.rvm/rubies/ruby-1.9.2-p180/bin:/Users/danny/.rvm/bin:/Users/danny/Documents/github/IDZBuild:/usr/local/bin:/Users/danny/.local/bin:/Users/danny/q/m32:/opt/local/bin:/opt/local/sbin:/Users/danny/fft/apps/rel/scripts:/Users/danny/Documents/github/IDZBuild:/opt/local/bin:/opt/local/sbin:/XCode4.2/usr/bin:/usr/local/graphviz-2.14/bin:/usr/local/mysql/bin:/usr/local/Trolltech/Qt-4.7.0/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/usr/texbin:/Users/danny/bin" + /usr/bin/ditto -rsrc /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCryptoTests.build/Objects-normal/x86_64/IDZSwiftCommonCryptoTests.swiftdoc /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Products/Debug-iphonesimulator/IDZSwiftCommonCryptoTests.swiftmodule/x86_64.swiftdoc + +Ld /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Products/Debug-iphonesimulator/IDZSwiftCommonCryptoTests.xctest/IDZSwiftCommonCryptoTests normal x86_64 + cd /Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto + export IPHONEOS_DEPLOYMENT_TARGET=8.0 + export PATH="/Applications/Xcode-7.0-7A218.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode-7.0-7A218.app/Contents/Developer/usr/bin:/Users/danny/pebble-dev/PebbleSDK-current/bin:/Users/danny/Qt/5.4/clang_64/bin:/Users/danny/.cabal/bin:/Applications/ghc-7.8.3.app/Contents/bin:/Users/danny/Builds/libjingle-read-only/swtoolkit:/Users/danny/.rvm/gems/ruby-1.9.2-p180/bin:/Users/danny/.rvm/gems/ruby-1.9.2-p180@global/bin:/Users/danny/.rvm/rubies/ruby-1.9.2-p180/bin:/Users/danny/.rvm/bin:/Users/danny/Documents/github/IDZBuild:/usr/local/bin:/Users/danny/.local/bin:/Users/danny/q/m32:/opt/local/bin:/opt/local/sbin:/Users/danny/fft/apps/rel/scripts:/Users/danny/Documents/github/IDZBuild:/opt/local/bin:/opt/local/sbin:/XCode4.2/usr/bin:/usr/local/graphviz-2.14/bin:/usr/local/mysql/bin:/usr/local/Trolltech/Qt-4.7.0/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/usr/texbin:/Users/danny/bin" + /Applications/Xcode-7.0-7A218.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch x86_64 -bundle -isysroot /Applications/Xcode-7.0-7A218.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.0.sdk -L/Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Products/Debug-iphonesimulator -F/Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Products/Debug-iphonesimulator -F/Applications/Xcode-7.0-7A218.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.0.sdk/Developer/Library/Frameworks -F/Applications/Xcode-7.0-7A218.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Library/Frameworks -filelist /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCryptoTests.build/Objects-normal/x86_64/IDZSwiftCommonCryptoTests.LinkFileList -Xlinker -rpath -Xlinker @executable_path/Frameworks -Xlinker -rpath -Xlinker @loader_path/Frameworks -mios-simulator-version-min=8.0 -Xlinker -objc_abi_version -Xlinker 2 -framework XCTest -L/Applications/Xcode-7.0-7A218.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator -Xlinker -add_ast_path -Xlinker /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCryptoTests.build/Objects-normal/x86_64/IDZSwiftCommonCryptoTests.swiftmodule -Xlinker -dependency_info -Xlinker /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Intermediates/IDZSwiftCommonCrypto.build/Debug-iphonesimulator/IDZSwiftCommonCryptoTests.build/Objects-normal/x86_64/IDZSwiftCommonCryptoTests_dependency_info.dat -o /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Products/Debug-iphonesimulator/IDZSwiftCommonCryptoTests.xctest/IDZSwiftCommonCryptoTests +ld: warning: directory not found for option '-F/Applications/Xcode-7.0-7A218.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.0.sdk/Developer/Library/Frameworks' + +GenerateDSYMFile /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Products/Debug-iphonesimulator/IDZSwiftCommonCryptoTests.xctest.dSYM /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Products/Debug-iphonesimulator/IDZSwiftCommonCryptoTests.xctest/IDZSwiftCommonCryptoTests + cd /Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto + export PATH="/Applications/Xcode-7.0-7A218.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode-7.0-7A218.app/Contents/Developer/usr/bin:/Users/danny/pebble-dev/PebbleSDK-current/bin:/Users/danny/Qt/5.4/clang_64/bin:/Users/danny/.cabal/bin:/Applications/ghc-7.8.3.app/Contents/bin:/Users/danny/Builds/libjingle-read-only/swtoolkit:/Users/danny/.rvm/gems/ruby-1.9.2-p180/bin:/Users/danny/.rvm/gems/ruby-1.9.2-p180@global/bin:/Users/danny/.rvm/rubies/ruby-1.9.2-p180/bin:/Users/danny/.rvm/bin:/Users/danny/Documents/github/IDZBuild:/usr/local/bin:/Users/danny/.local/bin:/Users/danny/q/m32:/opt/local/bin:/opt/local/sbin:/Users/danny/fft/apps/rel/scripts:/Users/danny/Documents/github/IDZBuild:/opt/local/bin:/opt/local/sbin:/XCode4.2/usr/bin:/usr/local/graphviz-2.14/bin:/usr/local/mysql/bin:/usr/local/Trolltech/Qt-4.7.0/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/usr/texbin:/Users/danny/bin" + /Applications/Xcode-7.0-7A218.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/dsymutil /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Products/Debug-iphonesimulator/IDZSwiftCommonCryptoTests.xctest/IDZSwiftCommonCryptoTests -o /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Products/Debug-iphonesimulator/IDZSwiftCommonCryptoTests.xctest.dSYM + +CopySwiftLibs /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Products/Debug-iphonesimulator/IDZSwiftCommonCryptoTests.xctest + cd /Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto + export CODESIGN_ALLOCATE=/Applications/Xcode-7.0-7A218.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/codesign_allocate + export PATH="/Applications/Xcode-7.0-7A218.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode-7.0-7A218.app/Contents/Developer/usr/bin:/Users/danny/pebble-dev/PebbleSDK-current/bin:/Users/danny/Qt/5.4/clang_64/bin:/Users/danny/.cabal/bin:/Applications/ghc-7.8.3.app/Contents/bin:/Users/danny/Builds/libjingle-read-only/swtoolkit:/Users/danny/.rvm/gems/ruby-1.9.2-p180/bin:/Users/danny/.rvm/gems/ruby-1.9.2-p180@global/bin:/Users/danny/.rvm/rubies/ruby-1.9.2-p180/bin:/Users/danny/.rvm/bin:/Users/danny/Documents/github/IDZBuild:/usr/local/bin:/Users/danny/.local/bin:/Users/danny/q/m32:/opt/local/bin:/opt/local/sbin:/Users/danny/fft/apps/rel/scripts:/Users/danny/Documents/github/IDZBuild:/opt/local/bin:/opt/local/sbin:/XCode4.2/usr/bin:/usr/local/graphviz-2.14/bin:/usr/local/mysql/bin:/usr/local/Trolltech/Qt-4.7.0/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/usr/texbin:/Users/danny/bin" + /Applications/Xcode-7.0-7A218.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift-stdlib-tool --copy --verbose --scan-executable /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Products/Debug-iphonesimulator/IDZSwiftCommonCryptoTests.xctest/IDZSwiftCommonCryptoTests --scan-folder /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Products/Debug-iphonesimulator/IDZSwiftCommonCryptoTests.xctest/Frameworks --scan-folder /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Products/Debug-iphonesimulator/IDZSwiftCommonCryptoTests.xctest/PlugIns --platform iphonesimulator --destination /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Products/Debug-iphonesimulator/IDZSwiftCommonCryptoTests.xctest/Frameworks --strip-bitcode +Copying libswiftCore.dylib from /Applications/Xcode-7.0-7A218.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator to /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Products/Debug-iphonesimulator/IDZSwiftCommonCryptoTests.xctest/Frameworks +Copying libswiftCoreGraphics.dylib from /Applications/Xcode-7.0-7A218.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator to /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Products/Debug-iphonesimulator/IDZSwiftCommonCryptoTests.xctest/Frameworks +Copying libswiftFoundation.dylib from /Applications/Xcode-7.0-7A218.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator to /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Products/Debug-iphonesimulator/IDZSwiftCommonCryptoTests.xctest/Frameworks +Copying libswiftUIKit.dylib from /Applications/Xcode-7.0-7A218.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator to /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Products/Debug-iphonesimulator/IDZSwiftCommonCryptoTests.xctest/Frameworks +Copying libswiftXCTest.dylib from /Applications/Xcode-7.0-7A218.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator to /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Products/Debug-iphonesimulator/IDZSwiftCommonCryptoTests.xctest/Frameworks +Copying libswiftDispatch.dylib from /Applications/Xcode-7.0-7A218.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator to /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Products/Debug-iphonesimulator/IDZSwiftCommonCryptoTests.xctest/Frameworks +Copying libswiftObjectiveC.dylib from /Applications/Xcode-7.0-7A218.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator to /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Products/Debug-iphonesimulator/IDZSwiftCommonCryptoTests.xctest/Frameworks +Copying libswiftCoreImage.dylib from /Applications/Xcode-7.0-7A218.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator to /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Products/Debug-iphonesimulator/IDZSwiftCommonCryptoTests.xctest/Frameworks +Copying libswiftDarwin.dylib from /Applications/Xcode-7.0-7A218.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator to /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Products/Debug-iphonesimulator/IDZSwiftCommonCryptoTests.xctest/Frameworks + +Touch /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Products/Debug-iphonesimulator/IDZSwiftCommonCryptoTests.xctest + cd /Users/danny/Documents/GitHub/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto + export PATH="/Applications/Xcode-7.0-7A218.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode-7.0-7A218.app/Contents/Developer/usr/bin:/Users/danny/pebble-dev/PebbleSDK-current/bin:/Users/danny/Qt/5.4/clang_64/bin:/Users/danny/.cabal/bin:/Applications/ghc-7.8.3.app/Contents/bin:/Users/danny/Builds/libjingle-read-only/swtoolkit:/Users/danny/.rvm/gems/ruby-1.9.2-p180/bin:/Users/danny/.rvm/gems/ruby-1.9.2-p180@global/bin:/Users/danny/.rvm/rubies/ruby-1.9.2-p180/bin:/Users/danny/.rvm/bin:/Users/danny/Documents/github/IDZBuild:/usr/local/bin:/Users/danny/.local/bin:/Users/danny/q/m32:/opt/local/bin:/opt/local/sbin:/Users/danny/fft/apps/rel/scripts:/Users/danny/Documents/github/IDZBuild:/opt/local/bin:/opt/local/sbin:/XCode4.2/usr/bin:/usr/local/graphviz-2.14/bin:/usr/local/mysql/bin:/usr/local/Trolltech/Qt-4.7.0/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/usr/texbin:/Users/danny/bin" + /usr/bin/touch -c /Users/danny/Library/Developer/Xcode/DerivedData/IDZSwiftCommonCrypto-dosumanxqecghwgocoyltgtdqdfh/Build/Products/Debug-iphonesimulator/IDZSwiftCommonCryptoTests.xctest + +2015-09-14 15:52:06.905 xcodebuild[7867:241372] [MT] IDETestOperationsObserverDebug: (EB20CD2B-A6BF-4596-BAE3-564FB9C58A85) Beginning test session with Xcode 7A218 on target { + SimDevice: SimDevice : iPhone 6 (06B8C3FC-C72F-464F-B274-E7D341DB8598) : state={ Booted } deviceType={ SimDeviceType : com.apple.CoreSimulator.SimDeviceType.iPhone-6 } runtime={ SimRuntime : 9.0 (13A340) - com.apple.CoreSimulator.SimRuntime.iOS-9-0 } +} (9.0 (13A340)) +** BUILD INTERRUPTED ** From b5f9e5be2c6c0dbbe25707a90b0fe2dded7a4761 Mon Sep 17 00:00:00 2001 From: iosdevzone Date: Mon, 14 Sep 2015 17:39:24 -0700 Subject: [PATCH 05/66] Update to recommended build settings. --- .../IDZSwiftCommonCrypto.xcodeproj/project.pbxproj | 7 ++++++- .../IDZSwiftCommonCrypto (Release).xcscheme | 13 ++++++++----- .../xcschemes/IDZSwiftCommonCrypto.xcscheme | 13 ++++++++----- .../xcschemes/IDZSwiftCommonCryptoTests.xcscheme | 13 ++++++++----- .../IDZSwiftCommonCrypto/Info.plist | 2 +- .../IDZSwiftCommonCryptoTests.swift | 2 +- .../IDZSwiftCommonCryptoTests/Info.plist | 2 +- 7 files changed, 33 insertions(+), 19 deletions(-) diff --git a/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto.xcodeproj/project.pbxproj b/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto.xcodeproj/project.pbxproj index 21ecf85..286a8a8 100644 --- a/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto.xcodeproj/project.pbxproj +++ b/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto.xcodeproj/project.pbxproj @@ -364,7 +364,7 @@ attributes = { LastSwiftMigration = 0700; LastSwiftUpdateCheck = 0700; - LastUpgradeCheck = 0600; + LastUpgradeCheck = 0700; ORGANIZATIONNAME = iOSDeveloperZone.com; TargetAttributes = { 0CCB89AA19CE05F800068ED6 = { @@ -565,6 +565,7 @@ COPY_PHASE_STRIP = NO; CURRENT_PROJECT_VERSION = 1; ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_DYNAMIC_NO_PIC = NO; GCC_OPTIMIZATION_LEVEL = 0; @@ -643,6 +644,7 @@ INFOPLIST_FILE = IDZSwiftCommonCrypto/Info.plist; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = "com.iosdeveloperzone.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = "$(TARGET_NAME)"; SKIP_INSTALL = YES; SWIFT_INCLUDE_PATHS = "${SRCROOT}"; @@ -663,6 +665,7 @@ INFOPLIST_FILE = IDZSwiftCommonCrypto/Info.plist; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = "com.iosdeveloperzone.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = "$(TARGET_NAME)"; SKIP_INSTALL = YES; SWIFT_INCLUDE_PATHS = "${SRCROOT}"; @@ -683,6 +686,7 @@ ); INFOPLIST_FILE = IDZSwiftCommonCryptoTests/Info.plist; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = "com.iosdeveloperzone.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_INCLUDE_PATHS = "${SRCROOT}/CommonCrypto"; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; @@ -699,6 +703,7 @@ ); INFOPLIST_FILE = IDZSwiftCommonCryptoTests/Info.plist; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = "com.iosdeveloperzone.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_INCLUDE_PATHS = "${SRCROOT}/CommonCrypto"; }; diff --git a/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto.xcodeproj/xcshareddata/xcschemes/IDZSwiftCommonCrypto (Release).xcscheme b/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto.xcodeproj/xcshareddata/xcschemes/IDZSwiftCommonCrypto (Release).xcscheme index 728342e..312b8c3 100644 --- a/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto.xcodeproj/xcshareddata/xcschemes/IDZSwiftCommonCrypto (Release).xcscheme +++ b/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto.xcodeproj/xcshareddata/xcschemes/IDZSwiftCommonCrypto (Release).xcscheme @@ -1,6 +1,6 @@ + shouldUseLaunchSchemeArgsEnv = "YES"> @@ -48,15 +48,18 @@ ReferencedContainer = "container:IDZSwiftCommonCrypto.xcodeproj"> + + + shouldUseLaunchSchemeArgsEnv = "YES"> @@ -48,15 +48,18 @@ ReferencedContainer = "container:IDZSwiftCommonCrypto.xcodeproj"> + + + shouldUseLaunchSchemeArgsEnv = "YES"> @@ -48,15 +48,18 @@ ReferencedContainer = "container:IDZSwiftCommonCrypto.xcodeproj"> + + CFBundleExecutable $(EXECUTABLE_NAME) CFBundleIdentifier - com.iosdeveloperzone.$(PRODUCT_NAME:rfc1034identifier) + $(PRODUCT_BUNDLE_IDENTIFIER) CFBundleInfoDictionaryVersion 6.0 CFBundleName diff --git a/IDZSwiftCommonCrypto/IDZSwiftCommonCryptoTests/IDZSwiftCommonCryptoTests.swift b/IDZSwiftCommonCrypto/IDZSwiftCommonCryptoTests/IDZSwiftCommonCryptoTests.swift index 2b31af5..bcb5e74 100644 --- a/IDZSwiftCommonCrypto/IDZSwiftCommonCryptoTests/IDZSwiftCommonCryptoTests.swift +++ b/IDZSwiftCommonCrypto/IDZSwiftCommonCryptoTests/IDZSwiftCommonCryptoTests.swift @@ -163,7 +163,7 @@ class IDZSwiftCommonCryptoTests: XCTestCase { { let key = self.hmacDefaultKeySHA1 let data = dataFromByteArray(Array(count:50, repeatedValue:0xcd)) - let expected = self.hmacDefaultKeySHA1 + let expected = self.hmacDefaultResultSHA1 let hmac = HMAC(algorithm:.SHA1, key:key).update(data)?.final() diff --git a/IDZSwiftCommonCrypto/IDZSwiftCommonCryptoTests/Info.plist b/IDZSwiftCommonCrypto/IDZSwiftCommonCryptoTests/Info.plist index 925c76e..ba72822 100644 --- a/IDZSwiftCommonCrypto/IDZSwiftCommonCryptoTests/Info.plist +++ b/IDZSwiftCommonCrypto/IDZSwiftCommonCryptoTests/Info.plist @@ -7,7 +7,7 @@ CFBundleExecutable $(EXECUTABLE_NAME) CFBundleIdentifier - com.iosdeveloperzone.$(PRODUCT_NAME:rfc1034identifier) + $(PRODUCT_BUNDLE_IDENTIFIER) CFBundleInfoDictionaryVersion 6.0 CFBundleName From cffdecbbd5b488825fb7863e8b2bb2c549f7988e Mon Sep 17 00:00:00 2001 From: iosdevzone Date: Wed, 16 Sep 2015 15:16:14 -0700 Subject: [PATCH 06/66] Update Random to use Swift 2.0 throw. --- .../IDZSwiftCommonCrypto/Random.swift | 48 +++++++++++++++++-- .../IDZSwiftCommonCrypto/Status.swift | 2 +- 2 files changed, 46 insertions(+), 4 deletions(-) diff --git a/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/Random.swift b/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/Random.swift index e51b14e..da60aa1 100644 --- a/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/Random.swift +++ b/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/Random.swift @@ -5,18 +5,40 @@ // Created by idz on 9/19/14. // Copyright (c) 2014 iOS Developer Zone. All rights reserved. // +// https://opensource.apple.com/source/CommonCrypto/CommonCrypto-60061/lib/CommonRandom.c import Foundation import CommonCrypto +public typealias RNGStatus = Status + public class Random { - public class func generateBytes(bytes : UnsafeMutablePointer, byteCount : Int ) + /** + Wraps native CCRandomeGenerateBytes call. + + :note: CCRNGStatus is typealiased to CCStatus but this routine can only return kCCSuccess or kCCRNGFailure + + - parameter bytes: a pointer to the buffer that will receive the bytes + - return: .Success or .RNGFailure as appropriate. + + */ + public class func generateBytes(bytes : UnsafeMutablePointer, byteCount : Int ) -> RNGStatus { - CCRandomGenerateBytes(bytes, byteCount) + let status = Status(rawValue: CCRandomGenerateBytes(bytes, byteCount)) + if(status == nil) + { + fatalError("") + } + return status! } + /** + Generates an array of random bytes. - public class func generateBytes(byteCount : Int ) -> [UInt8] + - parameter bytesCount: number of random bytes to generate + - return: an array of random bytes + */ + public class func generateBytes(byteCount : Int ) throws -> [UInt8] { if(byteCount <= 0) { @@ -26,4 +48,24 @@ public class Random CCRandomGenerateBytes(&bytes, byteCount) return bytes } + + /** + A version of generateBytes that always throws an error. + + Use it to test that code handles this. + + - parameter bytesCount: number of random bytes to generate + - return: an array of random bytes + */ + public class func generateBytesThrow(byteCount : Int ) throws -> [UInt8] + { + if(byteCount <= 0) + { + fatalError("generateBytes: byteCount must be positve and non-zero") + } + var bytes : [UInt8] = Array(count:byteCount, repeatedValue:UInt8(0)) + let status = generateBytes(&bytes, byteCount: byteCount) + throw status + return bytes + } } \ No newline at end of file diff --git a/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/Status.swift b/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/Status.swift index dd1d063..4c880da 100644 --- a/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/Status.swift +++ b/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/Status.swift @@ -9,7 +9,7 @@ import Foundation import CommonCrypto -public enum Status : CCCryptorStatus, CustomStringConvertible +public enum Status : CCCryptorStatus, CustomStringConvertible, ErrorType { case Success, ParamError, From 79a891c5362602ef4c66d38cf3f26dc4ef9eade4 Mon Sep 17 00:00:00 2001 From: iosdevzone Date: Wed, 16 Sep 2015 15:23:33 -0700 Subject: [PATCH 07/66] Make API compatible with https://github.com/soffes/Crypto --- .../DemoPlayground.playground/section-1.swift | 24 +++++++++- .../project.pbxproj | 11 ++++- .../IDZSwiftCommonCrypto/Crypto.swift | 46 +++++++++++++++++++ .../IDZSwiftCommonCrypto/Updateable.swift | 9 ++++ 4 files changed, 87 insertions(+), 3 deletions(-) create mode 100644 IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/Crypto.swift create mode 100644 IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/Updateable.swift diff --git a/IDZSwiftCommonCrypto/DemoPlayground.playground/section-1.swift b/IDZSwiftCommonCrypto/DemoPlayground.playground/section-1.swift index 06bf173..bc4c8c6 100644 --- a/IDZSwiftCommonCrypto/DemoPlayground.playground/section-1.swift +++ b/IDZSwiftCommonCrypto/DemoPlayground.playground/section-1.swift @@ -6,7 +6,6 @@ import IDZSwiftCommonCrypto var ss = "" as NSString ss.stringByAppendingPathComponent("hello") - // MARK: - Message Digest Demo let s = "The quick brown fox jumps over the lazy dog." var md5 = Digest(algorithm: .MD5) @@ -14,6 +13,8 @@ md5.update(s) var digest = md5.final() var md5String = hexStringFromArray(digest) +s.MD5 + // MARK: - HMAC Demo // Data from RFC 2202 var key = arrayFromHexString("0102030405060708090a0b0c0d0e0f10111213141516171819") @@ -34,9 +35,28 @@ for (password, salt, rounds, dkLen, expected) in tests } // MARK: - Random Demo -var randomBytes = hexStringFromArray(Random.generateBytes(16)) +var randomBytes = hexStringFromArray(try Random.generateBytes(16)) + +do { + try Random.generateBytesThrow(16) +} +catch let e { + print("generateBytesThrow threw \(e)") +} + + +do { + try Random.generateBytesThrow(16) +} +catch { + print("generateBytesThrow threw an error (expected).") +} + // MARK: - Crypto Demo +// Test data from NIST Special Publication +// F.1.1 p24 +// http://csrc.nist.gov/publications/nistpubs/800-38a/sp800-38a.pdf func test_StreamCryptor_AES_ECB() { let key = arrayFromHexString("2b7e151628aed2a6abf7158809cf4f3c") let plainText = arrayFromHexString("6bc1bee22e409f96e93d7e117393172a") diff --git a/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto.xcodeproj/project.pbxproj b/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto.xcodeproj/project.pbxproj index 286a8a8..b71a0dd 100644 --- a/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto.xcodeproj/project.pbxproj +++ b/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto.xcodeproj/project.pbxproj @@ -17,6 +17,7 @@ 0CCB89CC19CE071D00068ED6 /* KeyDerivation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0CCB89C719CE071D00068ED6 /* KeyDerivation.swift */; }; 0CCB89CD19CE071D00068ED6 /* Random.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0CCB89C819CE071D00068ED6 /* Random.swift */; }; 0CCB89D219CF416B00068ED6 /* Utilities.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0CCB89D119CF416B00068ED6 /* Utilities.swift */; }; + 3050B9B41BA9F7C700177A38 /* Crypto.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3050B9B31BA9F7C700177A38 /* Crypto.swift */; settings = {ASSET_TAGS = (); }; }; 308499AA1BA77BC20025B41D /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 308499A91BA77BC20025B41D /* AppDelegate.swift */; }; 308499AC1BA77BC20025B41D /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 308499AB1BA77BC20025B41D /* ViewController.swift */; }; 308499AF1BA77BC20025B41D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 308499AD1BA77BC20025B41D /* Main.storyboard */; }; @@ -27,6 +28,7 @@ 308499D51BA77F2B0025B41D /* IDZSwiftCommonCrypto.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0CCB89AB19CE05F800068ED6 /* IDZSwiftCommonCrypto.framework */; }; 308499D61BA77F2B0025B41D /* IDZSwiftCommonCrypto.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 0CCB89AB19CE05F800068ED6 /* IDZSwiftCommonCrypto.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 308499DB1BA78C600025B41D /* CommonCryptoAPITests.m in Sources */ = {isa = PBXBuildFile; fileRef = 308499DA1BA78C600025B41D /* CommonCryptoAPITests.m */; settings = {ASSET_TAGS = (); }; }; + 308499DC1BA7A4920025B41D /* IDZSwiftCommonCryptoTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0CCB89BA19CE05F800068ED6 /* IDZSwiftCommonCryptoTests.swift */; settings = {ASSET_TAGS = (); }; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -93,6 +95,7 @@ 0CCB89C719CE071D00068ED6 /* KeyDerivation.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = KeyDerivation.swift; sourceTree = ""; }; 0CCB89C819CE071D00068ED6 /* Random.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Random.swift; sourceTree = ""; }; 0CCB89D119CF416B00068ED6 /* Utilities.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Utilities.swift; sourceTree = ""; }; + 3050B9B31BA9F7C700177A38 /* Crypto.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Crypto.swift; sourceTree = ""; }; 308499A71BA77BC20025B41D /* IDZSwiftCommonCryptoTestApp.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = IDZSwiftCommonCryptoTestApp.app; sourceTree = BUILT_PRODUCTS_DIR; }; 308499A91BA77BC20025B41D /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 308499AB1BA77BC20025B41D /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; @@ -180,9 +183,9 @@ 0CCB89AD19CE05F800068ED6 /* IDZSwiftCommonCrypto */ = { isa = PBXGroup; children = ( + 0CCB89C519CE071D00068ED6 /* Digest.swift */, 0C9F5B2D19D2948F00E0B5FF /* Cryptor.swift */, 0CCB89C419CE071D00068ED6 /* StreamCryptor.swift */, - 0CCB89C519CE071D00068ED6 /* Digest.swift */, 0CCB89C619CE071D00068ED6 /* HMAC.swift */, 0CCB89C719CE071D00068ED6 /* KeyDerivation.swift */, 0CCB89C819CE071D00068ED6 /* Random.swift */, @@ -190,6 +193,7 @@ 0CCB89D119CF416B00068ED6 /* Utilities.swift */, 0CCB89B019CE05F800068ED6 /* IDZSwiftCommonCrypto.h */, 0CCB89AE19CE05F800068ED6 /* Supporting Files */, + 3050B9B31BA9F7C700177A38 /* Crypto.swift */, ); path = IDZSwiftCommonCrypto; sourceTree = ""; @@ -457,6 +461,7 @@ 0CCB89D219CF416B00068ED6 /* Utilities.swift in Sources */, 0CCB89CC19CE071D00068ED6 /* KeyDerivation.swift in Sources */, 0C67310219D1EB80009828B8 /* Status.swift in Sources */, + 3050B9B41BA9F7C700177A38 /* Crypto.swift in Sources */, 0C9F5B2E19D2948F00E0B5FF /* Cryptor.swift in Sources */, 0CCB89C919CE071D00068ED6 /* StreamCryptor.swift in Sources */, 0CCB89CD19CE071D00068ED6 /* Random.swift in Sources */, @@ -488,6 +493,7 @@ buildActionMask = 2147483647; files = ( 308499BF1BA77BC20025B41D /* IDZSwiftCommonCryptoTestAppTests.swift in Sources */, + 308499DC1BA7A4920025B41D /* IDZSwiftCommonCryptoTests.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -842,6 +848,7 @@ 308499CD1BA77BC20025B41D /* Release */, ); defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; }; 308499D31BA77BC20025B41D /* Build configuration list for PBXNativeTarget "IDZSwiftCommonCryptoTestAppTests" */ = { isa = XCConfigurationList; @@ -850,6 +857,7 @@ 308499CF1BA77BC20025B41D /* Release */, ); defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; }; 308499D41BA77BC20025B41D /* Build configuration list for PBXNativeTarget "IDZSwiftCommonCryptoTestAppUITests" */ = { isa = XCConfigurationList; @@ -858,6 +866,7 @@ 308499D11BA77BC20025B41D /* Release */, ); defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; }; /* End XCConfigurationList section */ }; diff --git a/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/Crypto.swift b/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/Crypto.swift new file mode 100644 index 0000000..8865e24 --- /dev/null +++ b/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/Crypto.swift @@ -0,0 +1,46 @@ +// +// Crypto.swift +// IDZSwiftCommonCrypto +// +// This implements the API of https://github.com/soffes/Crypto +// +// Created by idz on 9/16/15. +// Copyright © 2015 iOSDeveloperZone.com. All rights reserved. +// + +import Foundation + +public protocol CryptoDigest { + func digest(algorithm : Digest.Algorithm) -> Self +} + +extension CryptoDigest { + public var MD2: Self { return self.digest(.MD2) } + public var MD4: Self { return self.digest(.MD4) } + public var MD5: Self { return self.digest(.MD5) } + public var SHA1: Self { return self.digest(.SHA1) } + public var SHA224: Self { return self.digest(.SHA224) } + public var SHA256: Self { return self.digest(.SHA256) } + public var SHA384: Self { return self.digest(.SHA384) } + public var SHA512: Self { return self.digest(.SHA512) } +} + +extension NSData : CryptoDigest { + public func digest(algorithm : Digest.Algorithm) -> Self { + // This force unwrap may look scary but for CommonCrypto this cannot fail. + // The API allows for optionals to support the OpenSSL implementation which can. + let result = (Digest(algorithm: algorithm).update(self)?.final())! + let data = self.dynamicType.init(bytes: result, length: result.count) + return data + } +} + +extension String : CryptoDigest { + public func digest(algorithm : Digest.Algorithm) -> String { + // This force unwrap may look scary but for CommonCrypto this cannot fail. + // The API allows for optionals to support the OpenSSL implementation which can. + let result = (Digest(algorithm: algorithm).update(self as String)?.final())! + return hexStringFromArray(result) + + } +} diff --git a/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/Updateable.swift b/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/Updateable.swift new file mode 100644 index 0000000..90083ab --- /dev/null +++ b/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/Updateable.swift @@ -0,0 +1,9 @@ +// +// Updateable.swift +// IDZSwiftCommonCrypto +// +// Created by Danny Keogan on 9/16/15. +// Copyright © 2015 iOSDeveloperZone.com. All rights reserved. +// + +import Foundation From ada1b6757e86fbe262d8de68d3d4f9040dd528a0 Mon Sep 17 00:00:00 2001 From: iosdevzone Date: Wed, 16 Sep 2015 15:44:45 -0700 Subject: [PATCH 08/66] Use Updateable to simplify Digest, HMAC and Cryptor. Use Swift 2.0 default protocol method implementation to remove boring, repetitive code from Digest, HMAC and Cryptor. --- .../project.pbxproj | 4 ++ .../IDZSwiftCommonCrypto/Cryptor.swift | 41 +---------------- .../IDZSwiftCommonCrypto/Digest.swift | 45 +++---------------- .../IDZSwiftCommonCrypto/HMAC.swift | 25 ++--------- .../IDZSwiftCommonCrypto/Random.swift | 2 +- .../IDZSwiftCommonCrypto/Updateable.swift | 28 ++++++++++++ .../IDZSwiftCommonCryptoTests.swift | 9 +++- 7 files changed, 52 insertions(+), 102 deletions(-) diff --git a/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto.xcodeproj/project.pbxproj b/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto.xcodeproj/project.pbxproj index b71a0dd..4e20cad 100644 --- a/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto.xcodeproj/project.pbxproj +++ b/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto.xcodeproj/project.pbxproj @@ -17,6 +17,7 @@ 0CCB89CC19CE071D00068ED6 /* KeyDerivation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0CCB89C719CE071D00068ED6 /* KeyDerivation.swift */; }; 0CCB89CD19CE071D00068ED6 /* Random.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0CCB89C819CE071D00068ED6 /* Random.swift */; }; 0CCB89D219CF416B00068ED6 /* Utilities.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0CCB89D119CF416B00068ED6 /* Utilities.swift */; }; + 3012B11B1BAA237C008504EB /* Updateable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3012B11A1BAA237C008504EB /* Updateable.swift */; settings = {ASSET_TAGS = (); }; }; 3050B9B41BA9F7C700177A38 /* Crypto.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3050B9B31BA9F7C700177A38 /* Crypto.swift */; settings = {ASSET_TAGS = (); }; }; 308499AA1BA77BC20025B41D /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 308499A91BA77BC20025B41D /* AppDelegate.swift */; }; 308499AC1BA77BC20025B41D /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 308499AB1BA77BC20025B41D /* ViewController.swift */; }; @@ -95,6 +96,7 @@ 0CCB89C719CE071D00068ED6 /* KeyDerivation.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = KeyDerivation.swift; sourceTree = ""; }; 0CCB89C819CE071D00068ED6 /* Random.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Random.swift; sourceTree = ""; }; 0CCB89D119CF416B00068ED6 /* Utilities.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Utilities.swift; sourceTree = ""; }; + 3012B11A1BAA237C008504EB /* Updateable.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Updateable.swift; sourceTree = ""; }; 3050B9B31BA9F7C700177A38 /* Crypto.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Crypto.swift; sourceTree = ""; }; 308499A71BA77BC20025B41D /* IDZSwiftCommonCryptoTestApp.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = IDZSwiftCommonCryptoTestApp.app; sourceTree = BUILT_PRODUCTS_DIR; }; 308499A91BA77BC20025B41D /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; @@ -183,6 +185,7 @@ 0CCB89AD19CE05F800068ED6 /* IDZSwiftCommonCrypto */ = { isa = PBXGroup; children = ( + 3012B11A1BAA237C008504EB /* Updateable.swift */, 0CCB89C519CE071D00068ED6 /* Digest.swift */, 0C9F5B2D19D2948F00E0B5FF /* Cryptor.swift */, 0CCB89C419CE071D00068ED6 /* StreamCryptor.swift */, @@ -464,6 +467,7 @@ 3050B9B41BA9F7C700177A38 /* Crypto.swift in Sources */, 0C9F5B2E19D2948F00E0B5FF /* Cryptor.swift in Sources */, 0CCB89C919CE071D00068ED6 /* StreamCryptor.swift in Sources */, + 3012B11B1BAA237C008504EB /* Updateable.swift in Sources */, 0CCB89CD19CE071D00068ED6 /* Random.swift in Sources */, 0CCB89CA19CE071D00068ED6 /* Digest.swift in Sources */, 0CCB89CB19CE071D00068ED6 /* HMAC.swift in Sources */, diff --git a/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/Cryptor.swift b/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/Cryptor.swift index 7a97527..6ba261f 100644 --- a/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/Cryptor.swift +++ b/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/Cryptor.swift @@ -15,46 +15,9 @@ import Foundation For large files or network streams use StreamCryptor. */ -public class Cryptor : StreamCryptor +public class Cryptor : StreamCryptor, Updateable { var accumulator : [UInt8] = [] - /** - Upates the accumulated encrypted/decrypted data with the contents - of a Objective-C NSData buffer. - - - parameter data: the data buffer - - returns: this Cryptor object or nil if an error occurs (for optional chaining) - */ - public func update(data: NSData) -> Cryptor? - { - update(data.bytes, byteCount: data.length) - return self.status == Status.Success ? self : nil - } - /** - Upates the accumulated encrypted/decrypted data with the contents - of a Swift byte array. - - - parameter byteArray: the Swift byte array - - returns: this Cryptor object or nil if an error occurs (for optional chaining) - */ - public func update(byteArray: [UInt8]) -> Cryptor? - { - update(byteArray, byteCount: byteArray.count) - return self.status == Status.Success ? self : nil - } - /** - Upates the accumulated encrypted/decrypted data with the contents - of a string (interpreted as UTF8). - - This is really only useful for encryption. - - - returns: this Cryptor object or nil if an error occurs (for optional chaining) - */ - public func update(string: String) -> Cryptor? - { - update(string, byteCount: string.lengthOfBytesUsingEncoding(NSUTF8StringEncoding)) - return self.status == Status.Success ? self : nil - } /** Retrieves the encrypted or decrypted data. @@ -82,7 +45,7 @@ public class Cryptor : StreamCryptor - returns: this Cryptor object or nil if an error occurs (for optional chaining) */ - public func update(buffer: UnsafePointer, byteCount: Int) -> Cryptor? + public func update(buffer: UnsafePointer, _ byteCount: Int) -> Self? { let outputLength = self.getOutputLength(byteCount, isFinal: false) var dataOut = Array(count:outputLength, repeatedValue:0) diff --git a/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/Digest.swift b/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/Digest.swift index ce8a728..e51758c 100644 --- a/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/Digest.swift +++ b/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/Digest.swift @@ -20,8 +20,10 @@ import CommonCrypto md5.update(s) let digest = md5.final() */ -public class Digest -{ /** +public class Digest : Updateable +{ + public var status = Status.Success + /** - MD2: Message Digest 2 See: http://en.wikipedia.org/wiki/MD2_(cryptography) - MD4 - MD5 @@ -70,44 +72,9 @@ public class Digest - parameter the: number of bytes in buffer - returns: this Digest object (for optional chaining) */ - public func update(buffer: UnsafePointer, _ byteCount: CC_LONG) -> Digest? - { - engine.update(buffer, byteCount) - return self - } - /** - Updates the message digest with an NSData buffer. - - - parameter data: the data buffer - - returns: this Digest object (for optional chaining) - */ - public func update(data : NSData) -> Digest? - { - engine.update(data.bytes, CC_LONG(data.length)) - return self - } - /** - Updates the message digest with the contents of a Swift byte array - - - parameter byteArray: the byteArray - - returns: this Digest object (for optional chaining) - */ - public func update(byteArray : [UInt8]) -> Digest? - { - engine.update(byteArray, CC_LONG(byteArray.count)) - return self - } - - /** - Updates the message digest being calculated with the contents - of a string interpreted as UTF8. - - - parameter s: the string - - returns: this Digest object (for optional chaining) - */ - public func update(string : String) -> Digest? + public func update(buffer: UnsafePointer, _ byteCount: size_t) -> Self? { - engine.update(string, CC_LONG(string.lengthOfBytesUsingEncoding(NSUTF8StringEncoding))) + engine.update(buffer, CC_LONG(byteCount)) return self } diff --git a/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/HMAC.swift b/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/HMAC.swift index 01737f2..138ecb6 100644 --- a/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/HMAC.swift +++ b/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/HMAC.swift @@ -9,7 +9,7 @@ import Foundation import CommonCrypto -public class HMAC +public class HMAC : Updateable { public enum Algorithm { @@ -99,29 +99,12 @@ public class HMAC context.dealloc(1) } - public func update(buffer : UnsafePointer, _ byteCount : size_t) + public func update(buffer : UnsafePointer, _ byteCount : size_t) -> Self? { CCHmacUpdate(context, buffer, byteCount) + return self } - - public func update(data: NSData) -> HMAC? - { - update(data.bytes, size_t(data.length)) - return self - } - - public func update(byteArray : [UInt8]) -> HMAC? - { - update(byteArray, size_t(byteArray.count)) - return self - } - - public func update(string: String) -> HMAC? - { - update(string, size_t(string.lengthOfBytesUsingEncoding(NSUTF8StringEncoding))) - return self - } - + public func final() -> [UInt8] { var hmac = Array(count:algorithm.digestLength(), repeatedValue:0) diff --git a/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/Random.swift b/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/Random.swift index da60aa1..3e8932b 100644 --- a/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/Random.swift +++ b/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/Random.swift @@ -66,6 +66,6 @@ public class Random var bytes : [UInt8] = Array(count:byteCount, repeatedValue:UInt8(0)) let status = generateBytes(&bytes, byteCount: byteCount) throw status - return bytes + //return bytes } } \ No newline at end of file diff --git a/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/Updateable.swift b/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/Updateable.swift index 90083ab..265ab85 100644 --- a/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/Updateable.swift +++ b/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/Updateable.swift @@ -7,3 +7,31 @@ // import Foundation + +public protocol Updateable { + var status : Status { get } + func update(buffer : UnsafePointer, _ byteCount : size_t) -> Self? +} + +/** + Factors out update code from Digest, HMAC and Cryptor +*/ +extension Updateable { + public func update(data: NSData) -> Self? + { + update(data.bytes, size_t(data.length)) + return self.status == Status.Success ? self : nil + } + + public func update(byteArray : [UInt8]) -> Self? + { + update(byteArray, size_t(byteArray.count)) + return self.status == Status.Success ? self : nil + } + + public func update(string: String) -> Self? + { + update(string, size_t(string.lengthOfBytesUsingEncoding(NSUTF8StringEncoding))) + return self.status == Status.Success ? self : nil + } +} \ No newline at end of file diff --git a/IDZSwiftCommonCrypto/IDZSwiftCommonCryptoTests/IDZSwiftCommonCryptoTests.swift b/IDZSwiftCommonCrypto/IDZSwiftCommonCryptoTests/IDZSwiftCommonCryptoTests.swift index bcb5e74..4ca2c8b 100644 --- a/IDZSwiftCommonCrypto/IDZSwiftCommonCryptoTests/IDZSwiftCommonCryptoTests.swift +++ b/IDZSwiftCommonCrypto/IDZSwiftCommonCryptoTests/IDZSwiftCommonCryptoTests.swift @@ -196,8 +196,13 @@ class IDZSwiftCommonCryptoTests: XCTestCase { func test_Random_generateBytes() { let count = 256*256 - let bytes = Random.generateBytes(count) - XCTAssert(bytes.count == count, "Count has expected value") + do { + let bytes = try Random.generateBytes(count) + XCTAssert(bytes.count == count, "Count has expected value") + } + catch { + XCTAssert(false, "Should never happen.") + } } From b9aaf5b36f99d30a1238612e7c57b393addb11b7 Mon Sep 17 00:00:00 2001 From: iosdevzone Date: Wed, 16 Sep 2015 15:47:28 -0700 Subject: [PATCH 09/66] Fix username in comments. --- IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/Updateable.swift | 2 +- .../IDZSwiftCommonCryptoTests/CommonCryptoAPITests.m | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/Updateable.swift b/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/Updateable.swift index 265ab85..e692796 100644 --- a/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/Updateable.swift +++ b/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/Updateable.swift @@ -2,7 +2,7 @@ // Updateable.swift // IDZSwiftCommonCrypto // -// Created by Danny Keogan on 9/16/15. +// Created by idz on 9/16/15. // Copyright © 2015 iOSDeveloperZone.com. All rights reserved. // diff --git a/IDZSwiftCommonCrypto/IDZSwiftCommonCryptoTests/CommonCryptoAPITests.m b/IDZSwiftCommonCrypto/IDZSwiftCommonCryptoTests/CommonCryptoAPITests.m index b0e52d5..3b47590 100644 --- a/IDZSwiftCommonCrypto/IDZSwiftCommonCryptoTests/CommonCryptoAPITests.m +++ b/IDZSwiftCommonCrypto/IDZSwiftCommonCryptoTests/CommonCryptoAPITests.m @@ -2,7 +2,7 @@ // CommonCryptoAPITests.m // IDZSwiftCommonCrypto // -// Created by Danny Keogan on 9/14/15. +// Created by idz on 9/14/15. // Copyright © 2015 iOSDeveloperZone.com. All rights reserved. // From a70d0082eb78471ce487b69d1170b105d0783a6c Mon Sep 17 00:00:00 2001 From: idz Date: Wed, 16 Sep 2015 18:11:22 -0700 Subject: [PATCH 10/66] Added Carthage label --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 261bb75..e8b8a34 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# IDZSwiftCommonCrypto [![Build Status](https://travis-ci.org/iosdevzone/IDZSwiftCommonCrypto.svg?branch=master)](https://travis-ci.org/iosdevzone/IDZSwiftCommonCrypto) +# IDZSwiftCommonCrypto [![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage)[![Build Status](https://travis-ci.org/iosdevzone/IDZSwiftCommonCrypto.svg?branch=master)](https://travis-ci.org/iosdevzone/IDZSwiftCommonCrypto) A Swift wrapper for Apple's `CommonCrypto` library. From ffbae2e2b244d81c4d843e04dfbed972254c6f7f Mon Sep 17 00:00:00 2001 From: idz Date: Wed, 16 Sep 2015 18:11:52 -0700 Subject: [PATCH 11/66] Added space README --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index e8b8a34..2c6188a 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# IDZSwiftCommonCrypto [![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage)[![Build Status](https://travis-ci.org/iosdevzone/IDZSwiftCommonCrypto.svg?branch=master)](https://travis-ci.org/iosdevzone/IDZSwiftCommonCrypto) +# IDZSwiftCommonCrypto [![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage) [![Build Status](https://travis-ci.org/iosdevzone/IDZSwiftCommonCrypto.svg?branch=master)](https://travis-ci.org/iosdevzone/IDZSwiftCommonCrypto) A Swift wrapper for Apple's `CommonCrypto` library. From 7ae73362f483d83960ef20775e267647d04bb833 Mon Sep 17 00:00:00 2001 From: iosdevzone Date: Wed, 16 Sep 2015 21:31:44 -0700 Subject: [PATCH 12/66] Remove CommonCrypto module. Now done by run script --- IDZSwiftCommonCrypto/CommonCrypto/module.map | 5 ----- 1 file changed, 5 deletions(-) delete mode 100644 IDZSwiftCommonCrypto/CommonCrypto/module.map diff --git a/IDZSwiftCommonCrypto/CommonCrypto/module.map b/IDZSwiftCommonCrypto/CommonCrypto/module.map deleted file mode 100644 index 2f35f96..0000000 --- a/IDZSwiftCommonCrypto/CommonCrypto/module.map +++ /dev/null @@ -1,5 +0,0 @@ -module CommonCrypto [system] { - header "/Applications/Xcode-7.0-7A218.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.0.sdk/usr/include/CommonCrypto/CommonCrypto.h" - header "/Applications/Xcode-7.0-7A218.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.0.sdk/usr/include/CommonCrypto/CommonRandom.h" - export * -} From 87ca79081123f3c60a0aa246f7bb59aaca086d19 Mon Sep 17 00:00:00 2001 From: iosdevzone Date: Wed, 16 Sep 2015 21:52:33 -0700 Subject: [PATCH 13/66] Add run script phase to generate CommonCrypto module map. --- .gitignore | 1 + .../project.pbxproj | 17 +++++++++++++++++ 2 files changed, 18 insertions(+) diff --git a/.gitignore b/.gitignore index a3cd143..fabef85 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ +CommonCrypto # Xcode # build/ diff --git a/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto.xcodeproj/project.pbxproj b/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto.xcodeproj/project.pbxproj index 4e20cad..c8dad14 100644 --- a/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto.xcodeproj/project.pbxproj +++ b/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto.xcodeproj/project.pbxproj @@ -280,6 +280,7 @@ 0CCB89A719CE05F800068ED6 /* Frameworks */, 0CCB89A819CE05F800068ED6 /* Headers */, 0CCB89A919CE05F800068ED6 /* Resources */, + 303E19651BAA7E1E00044959 /* ShellScript */, ); buildRules = ( ); @@ -456,6 +457,22 @@ }; /* End PBXResourcesBuildPhase section */ +/* Begin PBXShellScriptBuildPhase section */ + 303E19651BAA7E1E00044959 /* ShellScript */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/bash; + shellScript = "echo Checking for $PROJECT_DIR/CommonCrypto\nif [ ! -e $PROJECT_DIR/CommonCrypto ] ; then\necho Generating $PROJECT_DIR/CommonCrypto\n./GenerateCommonCryptoModule iphonesimulator9.0 $PROJECT_DIR\nelse\necho Directory exists, skipping generation of $PROJECT_DIR/CommonCrypto\nfi"; + }; +/* End PBXShellScriptBuildPhase section */ + /* Begin PBXSourcesBuildPhase section */ 0CCB89A619CE05F800068ED6 /* Sources */ = { isa = PBXSourcesBuildPhase; From a1bf40dc29a04b4bcb588de1ebfc3946aa7498f5 Mon Sep 17 00:00:00 2001 From: iosdevzone Date: Wed, 16 Sep 2015 22:03:27 -0700 Subject: [PATCH 14/66] Reorder build phases. --- .../IDZSwiftCommonCrypto.xcodeproj/project.pbxproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto.xcodeproj/project.pbxproj b/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto.xcodeproj/project.pbxproj index c8dad14..ad17e31 100644 --- a/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto.xcodeproj/project.pbxproj +++ b/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto.xcodeproj/project.pbxproj @@ -276,11 +276,11 @@ isa = PBXNativeTarget; buildConfigurationList = 0CCB89BE19CE05F800068ED6 /* Build configuration list for PBXNativeTarget "IDZSwiftCommonCrypto" */; buildPhases = ( + 303E19651BAA7E1E00044959 /* ShellScript */, 0CCB89A619CE05F800068ED6 /* Sources */, 0CCB89A719CE05F800068ED6 /* Frameworks */, 0CCB89A819CE05F800068ED6 /* Headers */, 0CCB89A919CE05F800068ED6 /* Resources */, - 303E19651BAA7E1E00044959 /* ShellScript */, ); buildRules = ( ); From 5a320008cb7d43b6281f4e3c6adfff3a88dab535 Mon Sep 17 00:00:00 2001 From: iosdevzone Date: Thu, 17 Sep 2015 15:48:40 -0700 Subject: [PATCH 15/66] [CocoaPods] Fix typo and tags in podspec. --- .../IDZSwiftCommonCrypto.podspec | 124 ++++++++++++++++++ 1 file changed, 124 insertions(+) create mode 100644 IDZSwiftCommonCrypto/IDZSwiftCommonCrypto.podspec diff --git a/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto.podspec b/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto.podspec new file mode 100644 index 0000000..8de952e --- /dev/null +++ b/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto.podspec @@ -0,0 +1,124 @@ +# +# Be sure to run `pod spec lint IDZSwiftCommonCrypto.podspec' to ensure this is a +# valid spec and to remove all comments including this before submitting the spec. +# +# To learn more about Podspec attributes see http://docs.cocoapods.org/specification.html +# To see working Podspecs in the CocoaPods repo see https://github.com/CocoaPods/Specs/ +# + +Pod::Spec.new do |s| + + # ――― Spec Metadata ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # + # + # These will help people to find your library, and whilst it + # can feel like a chore to fill in it's definitely to your advantage. The + # summary should be tweet-length, and the description more in depth. + # + + s.name = "IDZSwiftCommonCrypto" + s.version = "0.5.1" + s.summary = "A wrapper for Apple's Common Crypto library written in Swift." + + s.homepage = "https://github.com/iosdevzone/IDZSwiftCommonCrypto" + + + # ――― Spec License ――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # + # + # Licensing your code is important. See http://choosealicense.com for more info. + # CocoaPods will detect a license file if there is a named LICENSE* + # Popular ones are 'MIT', 'BSD' and 'Apache License, Version 2.0'. + # + + s.license = "MIT" + # s.license = { :type => "MIT", :file => "FILE_LICENSE" } + + + # ――― Author Metadata ――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # + # + # Specify the authors of the library, with email addresses. Email addresses + # of the authors are extracted from the SCM log. E.g. $ git log. CocoaPods also + # accepts just a name if you'd rather not provide an email address. + # + # Specify a social_media_url where others can refer to, for example a twitter + # profile URL. + # + + s.author = { "iOSDevZone" => "idz@iosdeveloperzone.com" } + s.social_media_url = "http://twitter.com/iOSDevZone" + + # ――― Platform Specifics ――――――――――――――――――――――――――――――――――――――――――――――――――――――― # + # + # If this Pod runs only on iOS or OS X, then specify the platform and + # the deployment target. You can optionally include the target after the platform. + # + + # s.platform = :ios + # s.platform = :ios, "5.0" + + # When using multiple platforms + s.ios.deployment_target = "9.0" + s.osx.deployment_target = "10.7" + # s.watchos.deployment_target = "2.0" + + + # ――― Source Location ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # + # + # Specify the location from where the source should be retrieved. + # Supports git, hg, bzr, svn and HTTP. + # + + s.source = { :git => "https://github.com/iosdevzone/IDZSwiftCommonCrypto.git", s.version.to_s } + + + # ――― Source Code ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # + # + # CocoaPods is smart about how it includes source code. For source files + # giving a folder will include any swift, h, m, mm, c & cpp files. + # For header files it will include any header in the folder. + # Not including the public_header_files will make all headers public. + # + + s.source_files = "IDZSwiftCommonCrypto" + + # s.public_header_files = "Classes/**/*.h" + + + # ――― Resources ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # + # + # A list of resources included with the Pod. These are copied into the + # target bundle with a build phase script. Anything else will be cleaned. + # You can preserve files from being cleaned, please don't preserve + # non-essential files like tests, examples and documentation. + # + + # s.resource = "icon.png" + # s.resources = "Resources/*.png" + + # s.preserve_paths = "FilesToSave", "MoreFilesToSave" + + + # ――― Project Linking ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # + # + # Link your library with frameworks, or libraries. Libraries do not include + # the lib prefix of their name. + # + + # s.framework = "SomeFramework" + # s.frameworks = "SomeFramework", "AnotherFramework" + + # s.library = "iconv" + # s.libraries = "iconv", "xml2" + + + # ――― Project Settings ――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # + # + # If your library depends on compiler flags you can set them in the xcconfig hash + # where they will only apply to your library. If you depend on other Podspecs + # you can include multiple dependencies to ensure it works. + + # s.requires_arc = true + + # s.xcconfig = { "HEADER_SEARCH_PATHS" => "$(SDKROOT)/usr/include/libxml2" } + # s.dependency "JSONKit", "~> 1.4" + +end From 4847793edc7c234cfd869be6208bd7d2ac5ec516 Mon Sep 17 00:00:00 2001 From: iosdevzone Date: Thu, 17 Sep 2015 15:51:00 -0700 Subject: [PATCH 16/66] [CocoaPods] Typo in podspec. --- IDZSwiftCommonCrypto/IDZSwiftCommonCrypto.podspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto.podspec b/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto.podspec index 8de952e..8613d39 100644 --- a/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto.podspec +++ b/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto.podspec @@ -67,7 +67,7 @@ Pod::Spec.new do |s| # Supports git, hg, bzr, svn and HTTP. # - s.source = { :git => "https://github.com/iosdevzone/IDZSwiftCommonCrypto.git", s.version.to_s } + s.source = { :git => "https://github.com/iosdevzone/IDZSwiftCommonCrypto.git", :tag => s.version.to_s } # ――― Source Code ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # From 274d00cd6521bee3a5f76abceaa68d45f4b418f7 Mon Sep 17 00:00:00 2001 From: iosdevzone Date: Thu, 17 Sep 2015 15:57:38 -0700 Subject: [PATCH 17/66] [CocoaPods] Another attempts to get podspec to lint --- IDZSwiftCommonCrypto/IDZSwiftCommonCrypto.podspec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto.podspec b/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto.podspec index 8613d39..a4cbf09 100644 --- a/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto.podspec +++ b/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto.podspec @@ -16,7 +16,7 @@ Pod::Spec.new do |s| # s.name = "IDZSwiftCommonCrypto" - s.version = "0.5.1" + s.version = "0.5.2" s.summary = "A wrapper for Apple's Common Crypto library written in Swift." s.homepage = "https://github.com/iosdevzone/IDZSwiftCommonCrypto" @@ -67,7 +67,7 @@ Pod::Spec.new do |s| # Supports git, hg, bzr, svn and HTTP. # - s.source = { :git => "https://github.com/iosdevzone/IDZSwiftCommonCrypto.git", :tag => s.version.to_s } + s.source = { :git => "https://github.com/iosdevzone/IDZSwiftCommonCrypto.git", :branch => "swift2.0", :tag => s.version.to_s } # ――― Source Code ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # From ac43ab6f8d446eb098617699dee0b31a0c79960f Mon Sep 17 00:00:00 2001 From: iosdevzone Date: Thu, 17 Sep 2015 16:00:07 -0700 Subject: [PATCH 18/66] [CocoaPods] Be more explicit about source file. --- IDZSwiftCommonCrypto/IDZSwiftCommonCrypto.podspec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto.podspec b/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto.podspec index a4cbf09..1ffb218 100644 --- a/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto.podspec +++ b/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto.podspec @@ -16,7 +16,7 @@ Pod::Spec.new do |s| # s.name = "IDZSwiftCommonCrypto" - s.version = "0.5.2" + s.version = "0.5.3" s.summary = "A wrapper for Apple's Common Crypto library written in Swift." s.homepage = "https://github.com/iosdevzone/IDZSwiftCommonCrypto" @@ -78,7 +78,7 @@ Pod::Spec.new do |s| # Not including the public_header_files will make all headers public. # - s.source_files = "IDZSwiftCommonCrypto" + s.source_files = "IDZSwiftCommonCrypto/*.swift" # s.public_header_files = "Classes/**/*.h" From 4f4d00882d900e73767fe569e9ae0339f56045ca Mon Sep 17 00:00:00 2001 From: iosdevzone Date: Thu, 17 Sep 2015 16:10:55 -0700 Subject: [PATCH 19/66] [CocoaPods] Another try. --- IDZSwiftCommonCrypto/IDZSwiftCommonCrypto.podspec | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto.podspec b/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto.podspec index 1ffb218..17f2285 100644 --- a/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto.podspec +++ b/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto.podspec @@ -16,7 +16,7 @@ Pod::Spec.new do |s| # s.name = "IDZSwiftCommonCrypto" - s.version = "0.5.3" + s.version = "0.5.4" s.summary = "A wrapper for Apple's Common Crypto library written in Swift." s.homepage = "https://github.com/iosdevzone/IDZSwiftCommonCrypto" @@ -77,8 +77,7 @@ Pod::Spec.new do |s| # For header files it will include any header in the folder. # Not including the public_header_files will make all headers public. # - - s.source_files = "IDZSwiftCommonCrypto/*.swift" + s.source_files = "IDZSwiftCommonCrypto" # s.public_header_files = "Classes/**/*.h" From 1722e7ff323fc5581b42881a2212e3746ea6511b Mon Sep 17 00:00:00 2001 From: iosdevzone Date: Thu, 17 Sep 2015 16:14:00 -0700 Subject: [PATCH 20/66] [CocoaPods] Try just iOS. --- IDZSwiftCommonCrypto/IDZSwiftCommonCrypto.podspec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto.podspec b/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto.podspec index 17f2285..c2e9e7e 100644 --- a/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto.podspec +++ b/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto.podspec @@ -16,7 +16,7 @@ Pod::Spec.new do |s| # s.name = "IDZSwiftCommonCrypto" - s.version = "0.5.4" + s.version = "0.5.5" s.summary = "A wrapper for Apple's Common Crypto library written in Swift." s.homepage = "https://github.com/iosdevzone/IDZSwiftCommonCrypto" @@ -52,7 +52,7 @@ Pod::Spec.new do |s| # the deployment target. You can optionally include the target after the platform. # - # s.platform = :ios + s.platform = :ios # s.platform = :ios, "5.0" # When using multiple platforms From 9e308b791e0b9f57a4bd52fd501ac30c2280d216 Mon Sep 17 00:00:00 2001 From: iosdevzone Date: Thu, 17 Sep 2015 16:18:59 -0700 Subject: [PATCH 21/66] [CocoaPods] Remove osx platform. --- IDZSwiftCommonCrypto/IDZSwiftCommonCrypto.podspec | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto.podspec b/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto.podspec index c2e9e7e..3e206be 100644 --- a/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto.podspec +++ b/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto.podspec @@ -16,7 +16,7 @@ Pod::Spec.new do |s| # s.name = "IDZSwiftCommonCrypto" - s.version = "0.5.5" + s.version = "0.5.6" s.summary = "A wrapper for Apple's Common Crypto library written in Swift." s.homepage = "https://github.com/iosdevzone/IDZSwiftCommonCrypto" @@ -56,8 +56,8 @@ Pod::Spec.new do |s| # s.platform = :ios, "5.0" # When using multiple platforms - s.ios.deployment_target = "9.0" - s.osx.deployment_target = "10.7" + # s.ios.deployment_target = "9.0" + # s.osx.deployment_target = "10.7" # s.watchos.deployment_target = "2.0" From a03bd3100e6fc349409b8a03420038fec5f2aa90 Mon Sep 17 00:00:00 2001 From: iosdevzone Date: Thu, 17 Sep 2015 16:26:20 -0700 Subject: [PATCH 22/66] [CocoaPods] Specify iOS 9 deployment target. --- IDZSwiftCommonCrypto/IDZSwiftCommonCrypto.podspec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto.podspec b/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto.podspec index 3e206be..778f293 100644 --- a/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto.podspec +++ b/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto.podspec @@ -16,7 +16,7 @@ Pod::Spec.new do |s| # s.name = "IDZSwiftCommonCrypto" - s.version = "0.5.6" + s.version = "0.5.7" s.summary = "A wrapper for Apple's Common Crypto library written in Swift." s.homepage = "https://github.com/iosdevzone/IDZSwiftCommonCrypto" @@ -52,7 +52,7 @@ Pod::Spec.new do |s| # the deployment target. You can optionally include the target after the platform. # - s.platform = :ios + s.platform = :ios, "9.0" # s.platform = :ios, "5.0" # When using multiple platforms From d42e0ff63fdf6c9412f5f78237a883af5af757af Mon Sep 17 00:00:00 2001 From: iosdevzone Date: Thu, 17 Sep 2015 16:33:36 -0700 Subject: [PATCH 23/66] Remove uneeded layer of directories --- .../contents.xcplayground | 0 .../playground.xcworkspace/contents.xcworkspacedata | 0 .../section-1.swift | 0 .../timeline.xctimeline | 0 ...CommonCryptoModule => GenerateCommonCryptoModule | 0 ...onCrypto.podspec => IDZSwiftCommonCrypto.podspec | 0 .../project.pbxproj | 0 .../project.xcworkspace/contents.xcworkspacedata | 0 .../IDZSwiftCommonCrypto (Release).xcscheme | 0 .../xcschemes/IDZSwiftCommonCrypto.xcscheme | 0 .../xcschemes/IDZSwiftCommonCryptoTests.xcscheme | 0 .../contents.xcworkspacedata | 0 .../{IDZSwiftCommonCrypto => }/Crypto.swift | 0 .../{IDZSwiftCommonCrypto => }/Cryptor.swift | 0 .../{IDZSwiftCommonCrypto => }/Digest.swift | 0 .../{IDZSwiftCommonCrypto => }/HMAC.swift | 0 .../IDZSwiftCommonCrypto.h | 0 .../{IDZSwiftCommonCrypto => }/Info.plist | 0 .../{IDZSwiftCommonCrypto => }/KeyDerivation.swift | 0 .../{IDZSwiftCommonCrypto => }/Random.swift | 0 .../{IDZSwiftCommonCrypto => }/Status.swift | 0 .../{IDZSwiftCommonCrypto => }/StreamCryptor.swift | 0 .../{IDZSwiftCommonCrypto => }/Updateable.swift | 0 .../{IDZSwiftCommonCrypto => }/Utilities.swift | 0 .../AppDelegate.swift | 0 .../AppIcon.appiconset/Contents.json | 0 .../Base.lproj/LaunchScreen.storyboard | 0 .../Base.lproj/Main.storyboard | 0 .../Info.plist | 0 .../ViewController.swift | 0 .../IDZSwiftCommonCryptoTestAppTests.swift | 0 .../Info.plist | 0 .../IDZSwiftCommonCryptoTestAppUITests.swift | 0 .../Info.plist | 0 .../CommonCryptoAPITests.m | 0 .../Dummy.m | 0 .../IDZSwiftCommonCryptoObjCTest.m | 0 .../IDZSwiftCommonCryptoTests.swift | 0 .../Info.plist | 0 .../Documentation/section-0.html | 0 .../Documentation/section-10.html | 0 .../Documentation/section-12.html | 0 .../Documentation/section-14.html | 0 .../Documentation/section-16.html | 0 .../Documentation/section-18.html | 0 .../Documentation/section-2.html | 0 .../Documentation/section-4.html | 0 .../Documentation/section-6.html | 0 .../Documentation/section-8.html | 0 .../Documentation/stylesheet.css | 0 .../Resources/Riscal.jpg | Bin .../contents.xcplayground | 0 .../section-10-original.swift | 0 .../section-10.swift | 0 .../section-12-original.swift | 0 .../section-12.swift | 0 .../section-14-original.swift | 0 .../section-14.swift | 0 .../section-16-original.swift | 0 .../section-16.swift | 0 .../section-18-original.swift | 0 .../section-18.swift | 0 .../section-2-original.swift | 0 .../section-2.swift | 0 .../section-4-original.swift | 0 .../section-4.swift | 0 .../section-6-original.swift | 0 .../section-6.swift | 0 .../section-8-original.swift | 0 .../section-8.swift | 0 .../timeline.xctimeline | 0 IDZSwiftCommonCrypto/Riscal.jpg => Riscal.jpg | Bin IDZSwiftCommonCrypto/log.out => log.out | 0 IDZSwiftCommonCrypto/test.bash => test.bash | 0 74 files changed, 0 insertions(+), 0 deletions(-) rename {IDZSwiftCommonCrypto/DemoPlayground.playground => DemoPlayground.playground}/contents.xcplayground (100%) rename {IDZSwiftCommonCrypto/DemoPlayground.playground => DemoPlayground.playground}/playground.xcworkspace/contents.xcworkspacedata (100%) rename {IDZSwiftCommonCrypto/DemoPlayground.playground => DemoPlayground.playground}/section-1.swift (100%) rename {IDZSwiftCommonCrypto/DemoPlayground.playground => DemoPlayground.playground}/timeline.xctimeline (100%) rename IDZSwiftCommonCrypto/GenerateCommonCryptoModule => GenerateCommonCryptoModule (100%) rename IDZSwiftCommonCrypto/IDZSwiftCommonCrypto.podspec => IDZSwiftCommonCrypto.podspec (100%) rename {IDZSwiftCommonCrypto/IDZSwiftCommonCrypto.xcodeproj => IDZSwiftCommonCrypto.xcodeproj}/project.pbxproj (100%) rename {IDZSwiftCommonCrypto/IDZSwiftCommonCrypto.xcodeproj => IDZSwiftCommonCrypto.xcodeproj}/project.xcworkspace/contents.xcworkspacedata (100%) rename {IDZSwiftCommonCrypto/IDZSwiftCommonCrypto.xcodeproj => IDZSwiftCommonCrypto.xcodeproj}/xcshareddata/xcschemes/IDZSwiftCommonCrypto (Release).xcscheme (100%) rename {IDZSwiftCommonCrypto/IDZSwiftCommonCrypto.xcodeproj => IDZSwiftCommonCrypto.xcodeproj}/xcshareddata/xcschemes/IDZSwiftCommonCrypto.xcscheme (100%) rename {IDZSwiftCommonCrypto/IDZSwiftCommonCrypto.xcodeproj => IDZSwiftCommonCrypto.xcodeproj}/xcshareddata/xcschemes/IDZSwiftCommonCryptoTests.xcscheme (100%) rename {IDZSwiftCommonCrypto/IDZSwiftCommonCrypto.xcworkspace => IDZSwiftCommonCrypto.xcworkspace}/contents.xcworkspacedata (100%) rename IDZSwiftCommonCrypto/{IDZSwiftCommonCrypto => }/Crypto.swift (100%) rename IDZSwiftCommonCrypto/{IDZSwiftCommonCrypto => }/Cryptor.swift (100%) rename IDZSwiftCommonCrypto/{IDZSwiftCommonCrypto => }/Digest.swift (100%) rename IDZSwiftCommonCrypto/{IDZSwiftCommonCrypto => }/HMAC.swift (100%) rename IDZSwiftCommonCrypto/{IDZSwiftCommonCrypto => }/IDZSwiftCommonCrypto.h (100%) rename IDZSwiftCommonCrypto/{IDZSwiftCommonCrypto => }/Info.plist (100%) rename IDZSwiftCommonCrypto/{IDZSwiftCommonCrypto => }/KeyDerivation.swift (100%) rename IDZSwiftCommonCrypto/{IDZSwiftCommonCrypto => }/Random.swift (100%) rename IDZSwiftCommonCrypto/{IDZSwiftCommonCrypto => }/Status.swift (100%) rename IDZSwiftCommonCrypto/{IDZSwiftCommonCrypto => }/StreamCryptor.swift (100%) rename IDZSwiftCommonCrypto/{IDZSwiftCommonCrypto => }/Updateable.swift (100%) rename IDZSwiftCommonCrypto/{IDZSwiftCommonCrypto => }/Utilities.swift (100%) rename {IDZSwiftCommonCrypto/IDZSwiftCommonCryptoTestApp => IDZSwiftCommonCryptoTestApp}/AppDelegate.swift (100%) rename {IDZSwiftCommonCrypto/IDZSwiftCommonCryptoTestApp => IDZSwiftCommonCryptoTestApp}/Assets.xcassets/AppIcon.appiconset/Contents.json (100%) rename {IDZSwiftCommonCrypto/IDZSwiftCommonCryptoTestApp => IDZSwiftCommonCryptoTestApp}/Base.lproj/LaunchScreen.storyboard (100%) rename {IDZSwiftCommonCrypto/IDZSwiftCommonCryptoTestApp => IDZSwiftCommonCryptoTestApp}/Base.lproj/Main.storyboard (100%) rename {IDZSwiftCommonCrypto/IDZSwiftCommonCryptoTestApp => IDZSwiftCommonCryptoTestApp}/Info.plist (100%) rename {IDZSwiftCommonCrypto/IDZSwiftCommonCryptoTestApp => IDZSwiftCommonCryptoTestApp}/ViewController.swift (100%) rename {IDZSwiftCommonCrypto/IDZSwiftCommonCryptoTestAppTests => IDZSwiftCommonCryptoTestAppTests}/IDZSwiftCommonCryptoTestAppTests.swift (100%) rename {IDZSwiftCommonCrypto/IDZSwiftCommonCryptoTestAppTests => IDZSwiftCommonCryptoTestAppTests}/Info.plist (100%) rename {IDZSwiftCommonCrypto/IDZSwiftCommonCryptoTestAppUITests => IDZSwiftCommonCryptoTestAppUITests}/IDZSwiftCommonCryptoTestAppUITests.swift (100%) rename {IDZSwiftCommonCrypto/IDZSwiftCommonCryptoTestAppUITests => IDZSwiftCommonCryptoTestAppUITests}/Info.plist (100%) rename {IDZSwiftCommonCrypto/IDZSwiftCommonCryptoTests => IDZSwiftCommonCryptoTests}/CommonCryptoAPITests.m (100%) rename {IDZSwiftCommonCrypto/IDZSwiftCommonCryptoTests => IDZSwiftCommonCryptoTests}/Dummy.m (100%) rename {IDZSwiftCommonCrypto/IDZSwiftCommonCryptoTests => IDZSwiftCommonCryptoTests}/IDZSwiftCommonCryptoObjCTest.m (100%) rename {IDZSwiftCommonCrypto/IDZSwiftCommonCryptoTests => IDZSwiftCommonCryptoTests}/IDZSwiftCommonCryptoTests.swift (100%) rename {IDZSwiftCommonCrypto/IDZSwiftCommonCryptoTests => IDZSwiftCommonCryptoTests}/Info.plist (100%) rename {IDZSwiftCommonCrypto/README.playground => README.playground}/Documentation/section-0.html (100%) rename {IDZSwiftCommonCrypto/README.playground => README.playground}/Documentation/section-10.html (100%) rename {IDZSwiftCommonCrypto/README.playground => README.playground}/Documentation/section-12.html (100%) rename {IDZSwiftCommonCrypto/README.playground => README.playground}/Documentation/section-14.html (100%) rename {IDZSwiftCommonCrypto/README.playground => README.playground}/Documentation/section-16.html (100%) rename {IDZSwiftCommonCrypto/README.playground => README.playground}/Documentation/section-18.html (100%) rename {IDZSwiftCommonCrypto/README.playground => README.playground}/Documentation/section-2.html (100%) rename {IDZSwiftCommonCrypto/README.playground => README.playground}/Documentation/section-4.html (100%) rename {IDZSwiftCommonCrypto/README.playground => README.playground}/Documentation/section-6.html (100%) rename {IDZSwiftCommonCrypto/README.playground => README.playground}/Documentation/section-8.html (100%) rename {IDZSwiftCommonCrypto/README.playground => README.playground}/Documentation/stylesheet.css (100%) rename {IDZSwiftCommonCrypto/README.playground => README.playground}/Resources/Riscal.jpg (100%) rename {IDZSwiftCommonCrypto/README.playground => README.playground}/contents.xcplayground (100%) rename {IDZSwiftCommonCrypto/README.playground => README.playground}/section-10-original.swift (100%) rename {IDZSwiftCommonCrypto/README.playground => README.playground}/section-10.swift (100%) rename {IDZSwiftCommonCrypto/README.playground => README.playground}/section-12-original.swift (100%) rename {IDZSwiftCommonCrypto/README.playground => README.playground}/section-12.swift (100%) rename {IDZSwiftCommonCrypto/README.playground => README.playground}/section-14-original.swift (100%) rename {IDZSwiftCommonCrypto/README.playground => README.playground}/section-14.swift (100%) rename {IDZSwiftCommonCrypto/README.playground => README.playground}/section-16-original.swift (100%) rename {IDZSwiftCommonCrypto/README.playground => README.playground}/section-16.swift (100%) rename {IDZSwiftCommonCrypto/README.playground => README.playground}/section-18-original.swift (100%) rename {IDZSwiftCommonCrypto/README.playground => README.playground}/section-18.swift (100%) rename {IDZSwiftCommonCrypto/README.playground => README.playground}/section-2-original.swift (100%) rename {IDZSwiftCommonCrypto/README.playground => README.playground}/section-2.swift (100%) rename {IDZSwiftCommonCrypto/README.playground => README.playground}/section-4-original.swift (100%) rename {IDZSwiftCommonCrypto/README.playground => README.playground}/section-4.swift (100%) rename {IDZSwiftCommonCrypto/README.playground => README.playground}/section-6-original.swift (100%) rename {IDZSwiftCommonCrypto/README.playground => README.playground}/section-6.swift (100%) rename {IDZSwiftCommonCrypto/README.playground => README.playground}/section-8-original.swift (100%) rename {IDZSwiftCommonCrypto/README.playground => README.playground}/section-8.swift (100%) rename {IDZSwiftCommonCrypto/README.playground => README.playground}/timeline.xctimeline (100%) rename IDZSwiftCommonCrypto/Riscal.jpg => Riscal.jpg (100%) rename IDZSwiftCommonCrypto/log.out => log.out (100%) rename IDZSwiftCommonCrypto/test.bash => test.bash (100%) diff --git a/IDZSwiftCommonCrypto/DemoPlayground.playground/contents.xcplayground b/DemoPlayground.playground/contents.xcplayground similarity index 100% rename from IDZSwiftCommonCrypto/DemoPlayground.playground/contents.xcplayground rename to DemoPlayground.playground/contents.xcplayground diff --git a/IDZSwiftCommonCrypto/DemoPlayground.playground/playground.xcworkspace/contents.xcworkspacedata b/DemoPlayground.playground/playground.xcworkspace/contents.xcworkspacedata similarity index 100% rename from IDZSwiftCommonCrypto/DemoPlayground.playground/playground.xcworkspace/contents.xcworkspacedata rename to DemoPlayground.playground/playground.xcworkspace/contents.xcworkspacedata diff --git a/IDZSwiftCommonCrypto/DemoPlayground.playground/section-1.swift b/DemoPlayground.playground/section-1.swift similarity index 100% rename from IDZSwiftCommonCrypto/DemoPlayground.playground/section-1.swift rename to DemoPlayground.playground/section-1.swift diff --git a/IDZSwiftCommonCrypto/DemoPlayground.playground/timeline.xctimeline b/DemoPlayground.playground/timeline.xctimeline similarity index 100% rename from IDZSwiftCommonCrypto/DemoPlayground.playground/timeline.xctimeline rename to DemoPlayground.playground/timeline.xctimeline diff --git a/IDZSwiftCommonCrypto/GenerateCommonCryptoModule b/GenerateCommonCryptoModule similarity index 100% rename from IDZSwiftCommonCrypto/GenerateCommonCryptoModule rename to GenerateCommonCryptoModule diff --git a/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto.podspec b/IDZSwiftCommonCrypto.podspec similarity index 100% rename from IDZSwiftCommonCrypto/IDZSwiftCommonCrypto.podspec rename to IDZSwiftCommonCrypto.podspec diff --git a/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto.xcodeproj/project.pbxproj b/IDZSwiftCommonCrypto.xcodeproj/project.pbxproj similarity index 100% rename from IDZSwiftCommonCrypto/IDZSwiftCommonCrypto.xcodeproj/project.pbxproj rename to IDZSwiftCommonCrypto.xcodeproj/project.pbxproj diff --git a/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/IDZSwiftCommonCrypto.xcodeproj/project.xcworkspace/contents.xcworkspacedata similarity index 100% rename from IDZSwiftCommonCrypto/IDZSwiftCommonCrypto.xcodeproj/project.xcworkspace/contents.xcworkspacedata rename to IDZSwiftCommonCrypto.xcodeproj/project.xcworkspace/contents.xcworkspacedata diff --git a/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto.xcodeproj/xcshareddata/xcschemes/IDZSwiftCommonCrypto (Release).xcscheme b/IDZSwiftCommonCrypto.xcodeproj/xcshareddata/xcschemes/IDZSwiftCommonCrypto (Release).xcscheme similarity index 100% rename from IDZSwiftCommonCrypto/IDZSwiftCommonCrypto.xcodeproj/xcshareddata/xcschemes/IDZSwiftCommonCrypto (Release).xcscheme rename to IDZSwiftCommonCrypto.xcodeproj/xcshareddata/xcschemes/IDZSwiftCommonCrypto (Release).xcscheme diff --git a/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto.xcodeproj/xcshareddata/xcschemes/IDZSwiftCommonCrypto.xcscheme b/IDZSwiftCommonCrypto.xcodeproj/xcshareddata/xcschemes/IDZSwiftCommonCrypto.xcscheme similarity index 100% rename from IDZSwiftCommonCrypto/IDZSwiftCommonCrypto.xcodeproj/xcshareddata/xcschemes/IDZSwiftCommonCrypto.xcscheme rename to IDZSwiftCommonCrypto.xcodeproj/xcshareddata/xcschemes/IDZSwiftCommonCrypto.xcscheme diff --git a/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto.xcodeproj/xcshareddata/xcschemes/IDZSwiftCommonCryptoTests.xcscheme b/IDZSwiftCommonCrypto.xcodeproj/xcshareddata/xcschemes/IDZSwiftCommonCryptoTests.xcscheme similarity index 100% rename from IDZSwiftCommonCrypto/IDZSwiftCommonCrypto.xcodeproj/xcshareddata/xcschemes/IDZSwiftCommonCryptoTests.xcscheme rename to IDZSwiftCommonCrypto.xcodeproj/xcshareddata/xcschemes/IDZSwiftCommonCryptoTests.xcscheme diff --git a/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto.xcworkspace/contents.xcworkspacedata b/IDZSwiftCommonCrypto.xcworkspace/contents.xcworkspacedata similarity index 100% rename from IDZSwiftCommonCrypto/IDZSwiftCommonCrypto.xcworkspace/contents.xcworkspacedata rename to IDZSwiftCommonCrypto.xcworkspace/contents.xcworkspacedata diff --git a/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/Crypto.swift b/IDZSwiftCommonCrypto/Crypto.swift similarity index 100% rename from IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/Crypto.swift rename to IDZSwiftCommonCrypto/Crypto.swift diff --git a/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/Cryptor.swift b/IDZSwiftCommonCrypto/Cryptor.swift similarity index 100% rename from IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/Cryptor.swift rename to IDZSwiftCommonCrypto/Cryptor.swift diff --git a/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/Digest.swift b/IDZSwiftCommonCrypto/Digest.swift similarity index 100% rename from IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/Digest.swift rename to IDZSwiftCommonCrypto/Digest.swift diff --git a/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/HMAC.swift b/IDZSwiftCommonCrypto/HMAC.swift similarity index 100% rename from IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/HMAC.swift rename to IDZSwiftCommonCrypto/HMAC.swift diff --git a/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto.h b/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto.h similarity index 100% rename from IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto.h rename to IDZSwiftCommonCrypto/IDZSwiftCommonCrypto.h diff --git a/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/Info.plist b/IDZSwiftCommonCrypto/Info.plist similarity index 100% rename from IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/Info.plist rename to IDZSwiftCommonCrypto/Info.plist diff --git a/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/KeyDerivation.swift b/IDZSwiftCommonCrypto/KeyDerivation.swift similarity index 100% rename from IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/KeyDerivation.swift rename to IDZSwiftCommonCrypto/KeyDerivation.swift diff --git a/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/Random.swift b/IDZSwiftCommonCrypto/Random.swift similarity index 100% rename from IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/Random.swift rename to IDZSwiftCommonCrypto/Random.swift diff --git a/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/Status.swift b/IDZSwiftCommonCrypto/Status.swift similarity index 100% rename from IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/Status.swift rename to IDZSwiftCommonCrypto/Status.swift diff --git a/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/StreamCryptor.swift b/IDZSwiftCommonCrypto/StreamCryptor.swift similarity index 100% rename from IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/StreamCryptor.swift rename to IDZSwiftCommonCrypto/StreamCryptor.swift diff --git a/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/Updateable.swift b/IDZSwiftCommonCrypto/Updateable.swift similarity index 100% rename from IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/Updateable.swift rename to IDZSwiftCommonCrypto/Updateable.swift diff --git a/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/Utilities.swift b/IDZSwiftCommonCrypto/Utilities.swift similarity index 100% rename from IDZSwiftCommonCrypto/IDZSwiftCommonCrypto/Utilities.swift rename to IDZSwiftCommonCrypto/Utilities.swift diff --git a/IDZSwiftCommonCrypto/IDZSwiftCommonCryptoTestApp/AppDelegate.swift b/IDZSwiftCommonCryptoTestApp/AppDelegate.swift similarity index 100% rename from IDZSwiftCommonCrypto/IDZSwiftCommonCryptoTestApp/AppDelegate.swift rename to IDZSwiftCommonCryptoTestApp/AppDelegate.swift diff --git a/IDZSwiftCommonCrypto/IDZSwiftCommonCryptoTestApp/Assets.xcassets/AppIcon.appiconset/Contents.json b/IDZSwiftCommonCryptoTestApp/Assets.xcassets/AppIcon.appiconset/Contents.json similarity index 100% rename from IDZSwiftCommonCrypto/IDZSwiftCommonCryptoTestApp/Assets.xcassets/AppIcon.appiconset/Contents.json rename to IDZSwiftCommonCryptoTestApp/Assets.xcassets/AppIcon.appiconset/Contents.json diff --git a/IDZSwiftCommonCrypto/IDZSwiftCommonCryptoTestApp/Base.lproj/LaunchScreen.storyboard b/IDZSwiftCommonCryptoTestApp/Base.lproj/LaunchScreen.storyboard similarity index 100% rename from IDZSwiftCommonCrypto/IDZSwiftCommonCryptoTestApp/Base.lproj/LaunchScreen.storyboard rename to IDZSwiftCommonCryptoTestApp/Base.lproj/LaunchScreen.storyboard diff --git a/IDZSwiftCommonCrypto/IDZSwiftCommonCryptoTestApp/Base.lproj/Main.storyboard b/IDZSwiftCommonCryptoTestApp/Base.lproj/Main.storyboard similarity index 100% rename from IDZSwiftCommonCrypto/IDZSwiftCommonCryptoTestApp/Base.lproj/Main.storyboard rename to IDZSwiftCommonCryptoTestApp/Base.lproj/Main.storyboard diff --git a/IDZSwiftCommonCrypto/IDZSwiftCommonCryptoTestApp/Info.plist b/IDZSwiftCommonCryptoTestApp/Info.plist similarity index 100% rename from IDZSwiftCommonCrypto/IDZSwiftCommonCryptoTestApp/Info.plist rename to IDZSwiftCommonCryptoTestApp/Info.plist diff --git a/IDZSwiftCommonCrypto/IDZSwiftCommonCryptoTestApp/ViewController.swift b/IDZSwiftCommonCryptoTestApp/ViewController.swift similarity index 100% rename from IDZSwiftCommonCrypto/IDZSwiftCommonCryptoTestApp/ViewController.swift rename to IDZSwiftCommonCryptoTestApp/ViewController.swift diff --git a/IDZSwiftCommonCrypto/IDZSwiftCommonCryptoTestAppTests/IDZSwiftCommonCryptoTestAppTests.swift b/IDZSwiftCommonCryptoTestAppTests/IDZSwiftCommonCryptoTestAppTests.swift similarity index 100% rename from IDZSwiftCommonCrypto/IDZSwiftCommonCryptoTestAppTests/IDZSwiftCommonCryptoTestAppTests.swift rename to IDZSwiftCommonCryptoTestAppTests/IDZSwiftCommonCryptoTestAppTests.swift diff --git a/IDZSwiftCommonCrypto/IDZSwiftCommonCryptoTestAppTests/Info.plist b/IDZSwiftCommonCryptoTestAppTests/Info.plist similarity index 100% rename from IDZSwiftCommonCrypto/IDZSwiftCommonCryptoTestAppTests/Info.plist rename to IDZSwiftCommonCryptoTestAppTests/Info.plist diff --git a/IDZSwiftCommonCrypto/IDZSwiftCommonCryptoTestAppUITests/IDZSwiftCommonCryptoTestAppUITests.swift b/IDZSwiftCommonCryptoTestAppUITests/IDZSwiftCommonCryptoTestAppUITests.swift similarity index 100% rename from IDZSwiftCommonCrypto/IDZSwiftCommonCryptoTestAppUITests/IDZSwiftCommonCryptoTestAppUITests.swift rename to IDZSwiftCommonCryptoTestAppUITests/IDZSwiftCommonCryptoTestAppUITests.swift diff --git a/IDZSwiftCommonCrypto/IDZSwiftCommonCryptoTestAppUITests/Info.plist b/IDZSwiftCommonCryptoTestAppUITests/Info.plist similarity index 100% rename from IDZSwiftCommonCrypto/IDZSwiftCommonCryptoTestAppUITests/Info.plist rename to IDZSwiftCommonCryptoTestAppUITests/Info.plist diff --git a/IDZSwiftCommonCrypto/IDZSwiftCommonCryptoTests/CommonCryptoAPITests.m b/IDZSwiftCommonCryptoTests/CommonCryptoAPITests.m similarity index 100% rename from IDZSwiftCommonCrypto/IDZSwiftCommonCryptoTests/CommonCryptoAPITests.m rename to IDZSwiftCommonCryptoTests/CommonCryptoAPITests.m diff --git a/IDZSwiftCommonCrypto/IDZSwiftCommonCryptoTests/Dummy.m b/IDZSwiftCommonCryptoTests/Dummy.m similarity index 100% rename from IDZSwiftCommonCrypto/IDZSwiftCommonCryptoTests/Dummy.m rename to IDZSwiftCommonCryptoTests/Dummy.m diff --git a/IDZSwiftCommonCrypto/IDZSwiftCommonCryptoTests/IDZSwiftCommonCryptoObjCTest.m b/IDZSwiftCommonCryptoTests/IDZSwiftCommonCryptoObjCTest.m similarity index 100% rename from IDZSwiftCommonCrypto/IDZSwiftCommonCryptoTests/IDZSwiftCommonCryptoObjCTest.m rename to IDZSwiftCommonCryptoTests/IDZSwiftCommonCryptoObjCTest.m diff --git a/IDZSwiftCommonCrypto/IDZSwiftCommonCryptoTests/IDZSwiftCommonCryptoTests.swift b/IDZSwiftCommonCryptoTests/IDZSwiftCommonCryptoTests.swift similarity index 100% rename from IDZSwiftCommonCrypto/IDZSwiftCommonCryptoTests/IDZSwiftCommonCryptoTests.swift rename to IDZSwiftCommonCryptoTests/IDZSwiftCommonCryptoTests.swift diff --git a/IDZSwiftCommonCrypto/IDZSwiftCommonCryptoTests/Info.plist b/IDZSwiftCommonCryptoTests/Info.plist similarity index 100% rename from IDZSwiftCommonCrypto/IDZSwiftCommonCryptoTests/Info.plist rename to IDZSwiftCommonCryptoTests/Info.plist diff --git a/IDZSwiftCommonCrypto/README.playground/Documentation/section-0.html b/README.playground/Documentation/section-0.html similarity index 100% rename from IDZSwiftCommonCrypto/README.playground/Documentation/section-0.html rename to README.playground/Documentation/section-0.html diff --git a/IDZSwiftCommonCrypto/README.playground/Documentation/section-10.html b/README.playground/Documentation/section-10.html similarity index 100% rename from IDZSwiftCommonCrypto/README.playground/Documentation/section-10.html rename to README.playground/Documentation/section-10.html diff --git a/IDZSwiftCommonCrypto/README.playground/Documentation/section-12.html b/README.playground/Documentation/section-12.html similarity index 100% rename from IDZSwiftCommonCrypto/README.playground/Documentation/section-12.html rename to README.playground/Documentation/section-12.html diff --git a/IDZSwiftCommonCrypto/README.playground/Documentation/section-14.html b/README.playground/Documentation/section-14.html similarity index 100% rename from IDZSwiftCommonCrypto/README.playground/Documentation/section-14.html rename to README.playground/Documentation/section-14.html diff --git a/IDZSwiftCommonCrypto/README.playground/Documentation/section-16.html b/README.playground/Documentation/section-16.html similarity index 100% rename from IDZSwiftCommonCrypto/README.playground/Documentation/section-16.html rename to README.playground/Documentation/section-16.html diff --git a/IDZSwiftCommonCrypto/README.playground/Documentation/section-18.html b/README.playground/Documentation/section-18.html similarity index 100% rename from IDZSwiftCommonCrypto/README.playground/Documentation/section-18.html rename to README.playground/Documentation/section-18.html diff --git a/IDZSwiftCommonCrypto/README.playground/Documentation/section-2.html b/README.playground/Documentation/section-2.html similarity index 100% rename from IDZSwiftCommonCrypto/README.playground/Documentation/section-2.html rename to README.playground/Documentation/section-2.html diff --git a/IDZSwiftCommonCrypto/README.playground/Documentation/section-4.html b/README.playground/Documentation/section-4.html similarity index 100% rename from IDZSwiftCommonCrypto/README.playground/Documentation/section-4.html rename to README.playground/Documentation/section-4.html diff --git a/IDZSwiftCommonCrypto/README.playground/Documentation/section-6.html b/README.playground/Documentation/section-6.html similarity index 100% rename from IDZSwiftCommonCrypto/README.playground/Documentation/section-6.html rename to README.playground/Documentation/section-6.html diff --git a/IDZSwiftCommonCrypto/README.playground/Documentation/section-8.html b/README.playground/Documentation/section-8.html similarity index 100% rename from IDZSwiftCommonCrypto/README.playground/Documentation/section-8.html rename to README.playground/Documentation/section-8.html diff --git a/IDZSwiftCommonCrypto/README.playground/Documentation/stylesheet.css b/README.playground/Documentation/stylesheet.css similarity index 100% rename from IDZSwiftCommonCrypto/README.playground/Documentation/stylesheet.css rename to README.playground/Documentation/stylesheet.css diff --git a/IDZSwiftCommonCrypto/README.playground/Resources/Riscal.jpg b/README.playground/Resources/Riscal.jpg similarity index 100% rename from IDZSwiftCommonCrypto/README.playground/Resources/Riscal.jpg rename to README.playground/Resources/Riscal.jpg diff --git a/IDZSwiftCommonCrypto/README.playground/contents.xcplayground b/README.playground/contents.xcplayground similarity index 100% rename from IDZSwiftCommonCrypto/README.playground/contents.xcplayground rename to README.playground/contents.xcplayground diff --git a/IDZSwiftCommonCrypto/README.playground/section-10-original.swift b/README.playground/section-10-original.swift similarity index 100% rename from IDZSwiftCommonCrypto/README.playground/section-10-original.swift rename to README.playground/section-10-original.swift diff --git a/IDZSwiftCommonCrypto/README.playground/section-10.swift b/README.playground/section-10.swift similarity index 100% rename from IDZSwiftCommonCrypto/README.playground/section-10.swift rename to README.playground/section-10.swift diff --git a/IDZSwiftCommonCrypto/README.playground/section-12-original.swift b/README.playground/section-12-original.swift similarity index 100% rename from IDZSwiftCommonCrypto/README.playground/section-12-original.swift rename to README.playground/section-12-original.swift diff --git a/IDZSwiftCommonCrypto/README.playground/section-12.swift b/README.playground/section-12.swift similarity index 100% rename from IDZSwiftCommonCrypto/README.playground/section-12.swift rename to README.playground/section-12.swift diff --git a/IDZSwiftCommonCrypto/README.playground/section-14-original.swift b/README.playground/section-14-original.swift similarity index 100% rename from IDZSwiftCommonCrypto/README.playground/section-14-original.swift rename to README.playground/section-14-original.swift diff --git a/IDZSwiftCommonCrypto/README.playground/section-14.swift b/README.playground/section-14.swift similarity index 100% rename from IDZSwiftCommonCrypto/README.playground/section-14.swift rename to README.playground/section-14.swift diff --git a/IDZSwiftCommonCrypto/README.playground/section-16-original.swift b/README.playground/section-16-original.swift similarity index 100% rename from IDZSwiftCommonCrypto/README.playground/section-16-original.swift rename to README.playground/section-16-original.swift diff --git a/IDZSwiftCommonCrypto/README.playground/section-16.swift b/README.playground/section-16.swift similarity index 100% rename from IDZSwiftCommonCrypto/README.playground/section-16.swift rename to README.playground/section-16.swift diff --git a/IDZSwiftCommonCrypto/README.playground/section-18-original.swift b/README.playground/section-18-original.swift similarity index 100% rename from IDZSwiftCommonCrypto/README.playground/section-18-original.swift rename to README.playground/section-18-original.swift diff --git a/IDZSwiftCommonCrypto/README.playground/section-18.swift b/README.playground/section-18.swift similarity index 100% rename from IDZSwiftCommonCrypto/README.playground/section-18.swift rename to README.playground/section-18.swift diff --git a/IDZSwiftCommonCrypto/README.playground/section-2-original.swift b/README.playground/section-2-original.swift similarity index 100% rename from IDZSwiftCommonCrypto/README.playground/section-2-original.swift rename to README.playground/section-2-original.swift diff --git a/IDZSwiftCommonCrypto/README.playground/section-2.swift b/README.playground/section-2.swift similarity index 100% rename from IDZSwiftCommonCrypto/README.playground/section-2.swift rename to README.playground/section-2.swift diff --git a/IDZSwiftCommonCrypto/README.playground/section-4-original.swift b/README.playground/section-4-original.swift similarity index 100% rename from IDZSwiftCommonCrypto/README.playground/section-4-original.swift rename to README.playground/section-4-original.swift diff --git a/IDZSwiftCommonCrypto/README.playground/section-4.swift b/README.playground/section-4.swift similarity index 100% rename from IDZSwiftCommonCrypto/README.playground/section-4.swift rename to README.playground/section-4.swift diff --git a/IDZSwiftCommonCrypto/README.playground/section-6-original.swift b/README.playground/section-6-original.swift similarity index 100% rename from IDZSwiftCommonCrypto/README.playground/section-6-original.swift rename to README.playground/section-6-original.swift diff --git a/IDZSwiftCommonCrypto/README.playground/section-6.swift b/README.playground/section-6.swift similarity index 100% rename from IDZSwiftCommonCrypto/README.playground/section-6.swift rename to README.playground/section-6.swift diff --git a/IDZSwiftCommonCrypto/README.playground/section-8-original.swift b/README.playground/section-8-original.swift similarity index 100% rename from IDZSwiftCommonCrypto/README.playground/section-8-original.swift rename to README.playground/section-8-original.swift diff --git a/IDZSwiftCommonCrypto/README.playground/section-8.swift b/README.playground/section-8.swift similarity index 100% rename from IDZSwiftCommonCrypto/README.playground/section-8.swift rename to README.playground/section-8.swift diff --git a/IDZSwiftCommonCrypto/README.playground/timeline.xctimeline b/README.playground/timeline.xctimeline similarity index 100% rename from IDZSwiftCommonCrypto/README.playground/timeline.xctimeline rename to README.playground/timeline.xctimeline diff --git a/IDZSwiftCommonCrypto/Riscal.jpg b/Riscal.jpg similarity index 100% rename from IDZSwiftCommonCrypto/Riscal.jpg rename to Riscal.jpg diff --git a/IDZSwiftCommonCrypto/log.out b/log.out similarity index 100% rename from IDZSwiftCommonCrypto/log.out rename to log.out diff --git a/IDZSwiftCommonCrypto/test.bash b/test.bash similarity index 100% rename from IDZSwiftCommonCrypto/test.bash rename to test.bash From 47390c2a6f3b10eaf98d0f0ff62a36c310fe4639 Mon Sep 17 00:00:00 2001 From: iosdevzone Date: Thu, 17 Sep 2015 17:42:34 -0700 Subject: [PATCH 24/66] [CocoaPods] Add prepare_command to create CommonCrypto fake module. --- IDZSwiftCommonCrypto.podspec | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/IDZSwiftCommonCrypto.podspec b/IDZSwiftCommonCrypto.podspec index 778f293..8a825c0 100644 --- a/IDZSwiftCommonCrypto.podspec +++ b/IDZSwiftCommonCrypto.podspec @@ -16,7 +16,7 @@ Pod::Spec.new do |s| # s.name = "IDZSwiftCommonCrypto" - s.version = "0.5.7" + s.version = "0.5.9" s.summary = "A wrapper for Apple's Common Crypto library written in Swift." s.homepage = "https://github.com/iosdevzone/IDZSwiftCommonCrypto" @@ -77,6 +77,7 @@ Pod::Spec.new do |s| # For header files it will include any header in the folder. # Not including the public_header_files will make all headers public. # + s.prepare_command = "if [ ! -e CommonCrypto ]; then ./GenerateCommonCryptoModule iphonesimulator9.0 . ; fi" s.source_files = "IDZSwiftCommonCrypto" # s.public_header_files = "Classes/**/*.h" From e82f7504a4944dc323035ef3c51755d886c5d5c7 Mon Sep 17 00:00:00 2001 From: iosdevzone Date: Thu, 17 Sep 2015 17:45:55 -0700 Subject: [PATCH 25/66] Add Makefile --- Makefile | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/Makefile b/Makefile index ce4039c..a2047e6 100644 --- a/Makefile +++ b/Makefile @@ -1,11 +1,14 @@ -PG=IDZSwiftCommonCrypto/README.playground -RSRC_DIR=$(PG)/Resources +REPO=IDZPodspecs +NAME=IDZSwiftCommonCrypto -$(PG): README.md - playground README.md -p ios -d IDZSwiftCommonCrypto - mkdir -p ${RSRC_DIR} - cp IDZSwiftCommonCrypto/Riscal.jpg ${RSRC_DIR} +# push tags to GitHub +push_tags: + git push origin --tags +# Lint the podspec +lint_pod: + pod spec lint --verbose ${NAME}.podspec --sources=https://github.com/iosdevzone/IDZPodspecs.git -clean: - rm -rf $(PG) +# Push pod to private spec repository +push_pod: + pod repo push ${REPO} ${NAME}.podspec From 06e95d363aff785d5b25e0b9ec16f60a2f2b92f9 Mon Sep 17 00:00:00 2001 From: iosdevzone Date: Thu, 17 Sep 2015 18:01:42 -0700 Subject: [PATCH 26/66] [CocoaPods] Add prints to prepare_command --- IDZSwiftCommonCrypto.podspec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/IDZSwiftCommonCrypto.podspec b/IDZSwiftCommonCrypto.podspec index 8a825c0..c477850 100644 --- a/IDZSwiftCommonCrypto.podspec +++ b/IDZSwiftCommonCrypto.podspec @@ -16,7 +16,7 @@ Pod::Spec.new do |s| # s.name = "IDZSwiftCommonCrypto" - s.version = "0.5.9" + s.version = "0.5.10" s.summary = "A wrapper for Apple's Common Crypto library written in Swift." s.homepage = "https://github.com/iosdevzone/IDZSwiftCommonCrypto" @@ -77,7 +77,7 @@ Pod::Spec.new do |s| # For header files it will include any header in the folder. # Not including the public_header_files will make all headers public. # - s.prepare_command = "if [ ! -e CommonCrypto ]; then ./GenerateCommonCryptoModule iphonesimulator9.0 . ; fi" + s.prepare_command = "echo 'Running prepare_command'; if [ ! -e CommonCrypto ]; then ./GenerateCommonCryptoModule iphonesimulator9.0 . ; else echo 'Skipped GenerateCommonCryptoModule'; fi" s.source_files = "IDZSwiftCommonCrypto" # s.public_header_files = "Classes/**/*.h" From 799e8644daddf1218215de79b95871637d9f1b8e Mon Sep 17 00:00:00 2001 From: iosdevzone Date: Thu, 17 Sep 2015 18:19:07 -0700 Subject: [PATCH 27/66] [CocoaPods] Use document here for prepare_command --- IDZSwiftCommonCrypto.podspec | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/IDZSwiftCommonCrypto.podspec b/IDZSwiftCommonCrypto.podspec index c477850..103c8f9 100644 --- a/IDZSwiftCommonCrypto.podspec +++ b/IDZSwiftCommonCrypto.podspec @@ -16,7 +16,7 @@ Pod::Spec.new do |s| # s.name = "IDZSwiftCommonCrypto" - s.version = "0.5.10" + s.version = "0.5.11" s.summary = "A wrapper for Apple's Common Crypto library written in Swift." s.homepage = "https://github.com/iosdevzone/IDZSwiftCommonCrypto" @@ -77,7 +77,18 @@ Pod::Spec.new do |s| # For header files it will include any header in the folder. # Not including the public_header_files will make all headers public. # - s.prepare_command = "echo 'Running prepare_command'; if [ ! -e CommonCrypto ]; then ./GenerateCommonCryptoModule iphonesimulator9.0 . ; else echo 'Skipped GenerateCommonCryptoModule'; fi" + s.prepare_command = <<-CMD + + echo 'Running prepare_command' + if [ ! -e CommonCrypto ]; then + pwd + echo Running GenerateCommonCryptoModule + ./GenerateCommonCryptoModule iphonesimulator9.0 . + else + echo Skipped GenerateCommonCryptoModule + fi + +CMD s.source_files = "IDZSwiftCommonCrypto" # s.public_header_files = "Classes/**/*.h" From b169946bceedb6cba0d6e1f2876a6dec91f599cd Mon Sep 17 00:00:00 2001 From: iosdevzone Date: Thu, 17 Sep 2015 18:55:46 -0700 Subject: [PATCH 28/66] Add SWIFT_INCLUDE_PATH flag. --- IDZSwiftCommonCrypto.podspec | 5 +++-- prepare_command.txt | 0 2 files changed, 3 insertions(+), 2 deletions(-) create mode 100644 prepare_command.txt diff --git a/IDZSwiftCommonCrypto.podspec b/IDZSwiftCommonCrypto.podspec index 103c8f9..779e113 100644 --- a/IDZSwiftCommonCrypto.podspec +++ b/IDZSwiftCommonCrypto.podspec @@ -16,7 +16,7 @@ Pod::Spec.new do |s| # s.name = "IDZSwiftCommonCrypto" - s.version = "0.5.11" + s.version = "0.5.13" s.summary = "A wrapper for Apple's Common Crypto library written in Swift." s.homepage = "https://github.com/iosdevzone/IDZSwiftCommonCrypto" @@ -79,6 +79,7 @@ Pod::Spec.new do |s| # s.prepare_command = <<-CMD + touch prepare_command.txt echo 'Running prepare_command' if [ ! -e CommonCrypto ]; then pwd @@ -129,7 +130,7 @@ CMD # s.requires_arc = true - # s.xcconfig = { "HEADER_SEARCH_PATHS" => "$(SDKROOT)/usr/include/libxml2" } + s.xcconfig = { "SWIFT_INCLUDE_PATHS" => "$(PROJECT_DIR)/IDZSwiftCommonCrypto" } # s.dependency "JSONKit", "~> 1.4" end diff --git a/prepare_command.txt b/prepare_command.txt new file mode 100644 index 0000000..e69de29 From 9d48859043ae427d490f8382292a8f961ed6955e Mon Sep 17 00:00:00 2001 From: iosdevzone Date: Thu, 17 Sep 2015 18:56:35 -0700 Subject: [PATCH 29/66] Ignore prepare_command.txt --- .gitignore | 1 + prepare_command.txt | 0 2 files changed, 1 insertion(+) delete mode 100644 prepare_command.txt diff --git a/.gitignore b/.gitignore index fabef85..5a3d528 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ +prepate_command.txt CommonCrypto # Xcode # diff --git a/prepare_command.txt b/prepare_command.txt deleted file mode 100644 index e69de29..0000000 From ac4da19ba54ec0efcf5be4c810cd92b6482f4a1a Mon Sep 17 00:00:00 2001 From: iosdevzone Date: Thu, 17 Sep 2015 19:20:20 -0700 Subject: [PATCH 30/66] [CocoaPods] Correct SWIFT_INCLUDE_PATHS (hopefully). --- IDZSwiftCommonCrypto.podspec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/IDZSwiftCommonCrypto.podspec b/IDZSwiftCommonCrypto.podspec index 779e113..acad330 100644 --- a/IDZSwiftCommonCrypto.podspec +++ b/IDZSwiftCommonCrypto.podspec @@ -16,7 +16,7 @@ Pod::Spec.new do |s| # s.name = "IDZSwiftCommonCrypto" - s.version = "0.5.13" + s.version = "0.5.14" s.summary = "A wrapper for Apple's Common Crypto library written in Swift." s.homepage = "https://github.com/iosdevzone/IDZSwiftCommonCrypto" @@ -130,7 +130,7 @@ CMD # s.requires_arc = true - s.xcconfig = { "SWIFT_INCLUDE_PATHS" => "$(PROJECT_DIR)/IDZSwiftCommonCrypto" } + s.xcconfig = { "SWIFT_INCLUDE_PATHS" => "$(PROJECT_DIR)/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto" } # s.dependency "JSONKit", "~> 1.4" end From 1073bd8f0ee7e45c5254d8cd91d7ee24bbae2c21 Mon Sep 17 00:00:00 2001 From: iosdevzone Date: Thu, 17 Sep 2015 20:03:19 -0700 Subject: [PATCH 31/66] [CocoaPods] Try preserve_paths --- IDZSwiftCommonCrypto.podspec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/IDZSwiftCommonCrypto.podspec b/IDZSwiftCommonCrypto.podspec index acad330..28e4043 100644 --- a/IDZSwiftCommonCrypto.podspec +++ b/IDZSwiftCommonCrypto.podspec @@ -16,7 +16,7 @@ Pod::Spec.new do |s| # s.name = "IDZSwiftCommonCrypto" - s.version = "0.5.14" + s.version = "0.5.15" s.summary = "A wrapper for Apple's Common Crypto library written in Swift." s.homepage = "https://github.com/iosdevzone/IDZSwiftCommonCrypto" @@ -106,7 +106,7 @@ CMD # s.resource = "icon.png" # s.resources = "Resources/*.png" - # s.preserve_paths = "FilesToSave", "MoreFilesToSave" + s.preserve_paths = "CommonCrypto" # ――― Project Linking ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # From 57aa2ef6bf2e5ee16751083157d7900501e574ce Mon Sep 17 00:00:00 2001 From: iosdevzone Date: Thu, 17 Sep 2015 20:08:39 -0700 Subject: [PATCH 32/66] [CocoaPods] Correct (hopefully) SWIFT_INCLUDE_PATHS --- IDZSwiftCommonCrypto.podspec | 4 ++-- prepare_command.txt | 0 2 files changed, 2 insertions(+), 2 deletions(-) create mode 100644 prepare_command.txt diff --git a/IDZSwiftCommonCrypto.podspec b/IDZSwiftCommonCrypto.podspec index 28e4043..0383c5c 100644 --- a/IDZSwiftCommonCrypto.podspec +++ b/IDZSwiftCommonCrypto.podspec @@ -16,7 +16,7 @@ Pod::Spec.new do |s| # s.name = "IDZSwiftCommonCrypto" - s.version = "0.5.15" + s.version = "0.5.16" s.summary = "A wrapper for Apple's Common Crypto library written in Swift." s.homepage = "https://github.com/iosdevzone/IDZSwiftCommonCrypto" @@ -130,7 +130,7 @@ CMD # s.requires_arc = true - s.xcconfig = { "SWIFT_INCLUDE_PATHS" => "$(PROJECT_DIR)/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto" } + s.xcconfig = { "SWIFT_INCLUDE_PATHS" => "$(PROJECT_DIR)/IDZSwiftCommonCrypto" } # s.dependency "JSONKit", "~> 1.4" end diff --git a/prepare_command.txt b/prepare_command.txt new file mode 100644 index 0000000..e69de29 From 2ea1d256149a35ca93c5507a86c8c9623e1ab9a0 Mon Sep 17 00:00:00 2001 From: iosdevzone Date: Fri, 18 Sep 2015 03:07:41 -0700 Subject: [PATCH 33/66] [Tavis] Add dummy all target to makefile. --- Makefile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Makefile b/Makefile index a2047e6..428a9a9 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,9 @@ REPO=IDZPodspecs NAME=IDZSwiftCommonCrypto +all: + + # push tags to GitHub push_tags: git push origin --tags From 67593297b92f9185ef5ff012d5f8138e42a48ffd Mon Sep 17 00:00:00 2001 From: iosdevzone Date: Fri, 18 Sep 2015 03:21:35 -0700 Subject: [PATCH 34/66] Fix Makefile. --- Makefile | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 428a9a9..a8bc296 100644 --- a/Makefile +++ b/Makefile @@ -1,8 +1,16 @@ REPO=IDZPodspecs NAME=IDZSwiftCommonCrypto +PG=IDZSwiftCommonCrypto/README.playground +RSRC_DIR=$(PG)/Resources -all: - +$(PG): README.md + playground README.md -p ios -d IDZSwiftCommonCrypto + mkdir -p ${RSRC_DIR} + cp IDZSwiftCommonCrypto/Riscal.jpg ${RSRC_DIR} + + +clean: + rm -rf $(PG) # push tags to GitHub push_tags: From b9e2b4b34da1f624ec911208b9999431171bcddf Mon Sep 17 00:00:00 2001 From: iosdevzone Date: Fri, 18 Sep 2015 03:50:48 -0700 Subject: [PATCH 35/66] [playground] Update from swift-playground-builder --- .travis.yml | 2 +- .../Documentation/section-0.html | 30 ++++++++++ .../Documentation/section-10.html | 32 ++++++++++ .../Documentation/section-12.html | 28 +++++++++ .../Documentation/section-14.html | 30 ++++++++++ .../Documentation/section-16.html | 21 +++++++ .../Documentation/section-18.html | 26 ++++++++ .../Documentation/section-2.html | 21 +++++++ .../Documentation/section-4.html | 19 ++++++ .../Documentation/section-6.html | 19 ++++++ .../Documentation/section-8.html | 19 ++++++ .../Documentation/stylesheet.css | 16 +++++ .../README.playground/contents.xcplayground | 43 +++++++++++++ .../README.playground/section-1.swift | 0 .../README.playground/section-11.swift | 0 .../README.playground/section-13.swift | 0 .../README.playground/section-15.swift | 0 .../README.playground/section-17.swift | 0 .../README.playground/section-3.swift | 0 .../README.playground/section-5.swift | 0 .../README.playground/section-7.swift | 0 .../README.playground/section-9.swift | 0 Makefile | 6 +- .../Documentation/section-0.html | 8 +-- README.playground/contents.xcplayground | 60 ++++++++++++------- .../contents.xcworkspacedata | 7 +++ README.playground/section-1.swift | 1 + .../{section-12.swift => section-11.swift} | 2 +- .../{section-14.swift => section-13.swift} | 2 +- .../{section-16.swift => section-15.swift} | 29 ++++----- .../{section-18.swift => section-17.swift} | 2 +- README.playground/section-2.swift | 1 - .../{section-4.swift => section-3.swift} | 2 +- .../{section-6.swift => section-5.swift} | 2 +- .../{section-8.swift => section-7.swift} | 2 +- .../{section-10.swift => section-9.swift} | 2 +- README.playground/timeline.xctimeline | 6 -- npm-debug.log | 30 ++++++++++ 38 files changed, 407 insertions(+), 61 deletions(-) create mode 100644 IDZSwiftCommonCrypto/README.playground/Documentation/section-0.html create mode 100644 IDZSwiftCommonCrypto/README.playground/Documentation/section-10.html create mode 100644 IDZSwiftCommonCrypto/README.playground/Documentation/section-12.html create mode 100644 IDZSwiftCommonCrypto/README.playground/Documentation/section-14.html create mode 100644 IDZSwiftCommonCrypto/README.playground/Documentation/section-16.html create mode 100644 IDZSwiftCommonCrypto/README.playground/Documentation/section-18.html create mode 100644 IDZSwiftCommonCrypto/README.playground/Documentation/section-2.html create mode 100644 IDZSwiftCommonCrypto/README.playground/Documentation/section-4.html create mode 100644 IDZSwiftCommonCrypto/README.playground/Documentation/section-6.html create mode 100644 IDZSwiftCommonCrypto/README.playground/Documentation/section-8.html create mode 100644 IDZSwiftCommonCrypto/README.playground/Documentation/stylesheet.css create mode 100644 IDZSwiftCommonCrypto/README.playground/contents.xcplayground rename README.playground/section-2-original.swift => IDZSwiftCommonCrypto/README.playground/section-1.swift (100%) rename README.playground/section-12-original.swift => IDZSwiftCommonCrypto/README.playground/section-11.swift (100%) rename README.playground/section-14-original.swift => IDZSwiftCommonCrypto/README.playground/section-13.swift (100%) rename README.playground/section-16-original.swift => IDZSwiftCommonCrypto/README.playground/section-15.swift (100%) rename README.playground/section-18-original.swift => IDZSwiftCommonCrypto/README.playground/section-17.swift (100%) rename README.playground/section-4-original.swift => IDZSwiftCommonCrypto/README.playground/section-3.swift (100%) rename README.playground/section-6-original.swift => IDZSwiftCommonCrypto/README.playground/section-5.swift (100%) rename README.playground/section-8-original.swift => IDZSwiftCommonCrypto/README.playground/section-7.swift (100%) rename README.playground/section-10-original.swift => IDZSwiftCommonCrypto/README.playground/section-9.swift (100%) create mode 100644 README.playground/playground.xcworkspace/contents.xcworkspacedata create mode 100644 README.playground/section-1.swift rename README.playground/{section-12.swift => section-11.swift} (92%) rename README.playground/{section-14.swift => section-13.swift} (94%) rename README.playground/{section-16.swift => section-15.swift} (58%) rename README.playground/{section-18.swift => section-17.swift} (88%) delete mode 100644 README.playground/section-2.swift rename README.playground/{section-4.swift => section-3.swift} (96%) rename README.playground/{section-6.swift => section-5.swift} (86%) rename README.playground/{section-8.swift => section-7.swift} (71%) rename README.playground/{section-10.swift => section-9.swift} (71%) delete mode 100644 README.playground/timeline.xctimeline create mode 100644 npm-debug.log diff --git a/.travis.yml b/.travis.yml index 1ed0f97..d4937e7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,7 +2,7 @@ language: objective-c osx_image: xcode7 install: -- npm install -g swift-playground-builder +- npm install -g playground script: # Generate README.playground from README.md diff --git a/IDZSwiftCommonCrypto/README.playground/Documentation/section-0.html b/IDZSwiftCommonCrypto/README.playground/Documentation/section-0.html new file mode 100644 index 0000000..1551d33 --- /dev/null +++ b/IDZSwiftCommonCrypto/README.playground/Documentation/section-0.html @@ -0,0 +1,30 @@ + + + + + Section 1 + + + + + + +
+
+

IDZSwiftCommonCrypto Carthage compatible Build Status

+

A Swift wrapper for Apple's CommonCrypto library.

+

Using IDZSwiftCommonCrypto

+

Since CommonCrypto is not a standalone module, you need to generate a fake module map to convince Xcode into allowing you to import CommonCrypto. The GenerateCommonCryptoModule script provides two methods for doing this. Which method you choose depends on whether you want to able to use CommonCrypto and, by extension, IDZSwiftCommonCrypto in playgrounds.

+

To make CommonCrypto available to frameworks and playground use the command:

+
    ./GenerateCommonCryptoModule iphonesimulator8.0
+
+

This command creates a CommonCrypto.framework in the SDK system library directory. You should now be able to use either CommonCrypto or IDZSwiftCommonCrypto in a playground simply importing them or in your own app project by dragging the IDZSwiftCommonCrypto.xcodeproj into your project.

+

If you do not want to add any files to your SDK you can use the command

+
    ./GenerateCommonCryptoModule iphonesimulator8.0 .
+
+

This method creates a CommonCrypto directory within the IDZSwiftCommonCrypto source tree, so the SDK directories are not altered, but the module is not available in playgrounds. To use the framework in your own project drag the IDZSwiftCommonCrypto.xcodeproj into your project and set the Module Import Path to the directory containing the CommonCrypto directory created by the script. For more about this, see my blog post Using CommonCrypto in Swift

+ +
+
+ + diff --git a/IDZSwiftCommonCrypto/README.playground/Documentation/section-10.html b/IDZSwiftCommonCrypto/README.playground/Documentation/section-10.html new file mode 100644 index 0000000..e0aa509 --- /dev/null +++ b/IDZSwiftCommonCrypto/README.playground/Documentation/section-10.html @@ -0,0 +1,32 @@ + + + + + Section 11 + + + + + + +
+
+

Supported Algorithms

+

The Digest class supports the following algorithms:

+
    +
  • .MD2
  • +
  • .MD4
  • +
  • .MD5
  • +
  • .SHA1
  • +
  • .SHA224
  • +
  • .SHA256
  • +
  • .SHA384
  • +
  • .SHA512
  • +
+

Using HMAC

+

Calculating a keyed-Hash Message Authentication Code (HMAC) is very similar to calculating a message digest, except that the initialization routine now takes a key as well as an algorithm parameter.

+ +
+
+ + diff --git a/IDZSwiftCommonCrypto/README.playground/Documentation/section-12.html b/IDZSwiftCommonCrypto/README.playground/Documentation/section-12.html new file mode 100644 index 0000000..e928d20 --- /dev/null +++ b/IDZSwiftCommonCrypto/README.playground/Documentation/section-12.html @@ -0,0 +1,28 @@ + + + + + Section 13 + + + + + + +
+
+

Supported Algorithms

+
    +
  • SHA1
  • +
  • MD5
  • +
  • SHA224
  • +
  • SHA256
  • +
  • SHA384
  • +
  • SHA512
  • +
+

Using Cryptor

+ +
+
+ + diff --git a/IDZSwiftCommonCrypto/README.playground/Documentation/section-14.html b/IDZSwiftCommonCrypto/README.playground/Documentation/section-14.html new file mode 100644 index 0000000..2ef210e --- /dev/null +++ b/IDZSwiftCommonCrypto/README.playground/Documentation/section-14.html @@ -0,0 +1,30 @@ + + + + + Section 15 + + + + + + +
+
+

Supported Algorithms

+
    +
  • .AES
  • +
  • .DES
  • +
  • .TripleDES
  • +
  • .CAST
  • +
  • .RC2
  • +
  • .Blowfish
  • +
+

Using StreamCryptor

+

To encrypt a large file or a network stream use StreamCryptor. The StreamCryptor class does not accumulate the encrypted or decrypted data, instead each call to update produces an output buffer.

+

The example below shows how to use StreamCryptor to encrypt and decrypt an image file.

+ +
+
+ + diff --git a/IDZSwiftCommonCrypto/README.playground/Documentation/section-16.html b/IDZSwiftCommonCrypto/README.playground/Documentation/section-16.html new file mode 100644 index 0000000..00ac741 --- /dev/null +++ b/IDZSwiftCommonCrypto/README.playground/Documentation/section-16.html @@ -0,0 +1,21 @@ + + + + + Section 17 + + + + + + +
+
+

Using PBKDF

+

The PBKDF class provides a method of deriving keys from a user password. +The following example derives a 20-byte key:

+ +
+
+ + diff --git a/IDZSwiftCommonCrypto/README.playground/Documentation/section-18.html b/IDZSwiftCommonCrypto/README.playground/Documentation/section-18.html new file mode 100644 index 0000000..f8da5e2 --- /dev/null +++ b/IDZSwiftCommonCrypto/README.playground/Documentation/section-18.html @@ -0,0 +1,26 @@ + + + + + Section 19 + + + + + + +
+
+

Supported Pseudo-Random Functions

+
    +
  • .SHA1
  • +
  • .SHA224
  • +
  • .SHA256
  • +
  • .SHA384
  • +
  • .SHA512
  • +
+ +
+
+ + diff --git a/IDZSwiftCommonCrypto/README.playground/Documentation/section-2.html b/IDZSwiftCommonCrypto/README.playground/Documentation/section-2.html new file mode 100644 index 0000000..cf6e89a --- /dev/null +++ b/IDZSwiftCommonCrypto/README.playground/Documentation/section-2.html @@ -0,0 +1,21 @@ + + + + + Section 3 + + + + + + +
+
+

Using Digest

+

To calculate a message digest you create an instance of Digest, call update one or more times with the data over which the digest is being calculated and finally call final to obtain the digest itself.

+

The update method can take a String

+ +
+
+ + diff --git a/IDZSwiftCommonCrypto/README.playground/Documentation/section-4.html b/IDZSwiftCommonCrypto/README.playground/Documentation/section-4.html new file mode 100644 index 0000000..0a9ae5f --- /dev/null +++ b/IDZSwiftCommonCrypto/README.playground/Documentation/section-4.html @@ -0,0 +1,19 @@ + + + + + Section 5 + + + + + + +
+
+

or an array of UInt8 elements:

+ +
+
+ + diff --git a/IDZSwiftCommonCrypto/README.playground/Documentation/section-6.html b/IDZSwiftCommonCrypto/README.playground/Documentation/section-6.html new file mode 100644 index 0000000..0aa6ef9 --- /dev/null +++ b/IDZSwiftCommonCrypto/README.playground/Documentation/section-6.html @@ -0,0 +1,19 @@ + + + + + Section 7 + + + + + + +
+
+

If you only have a single buffer you can simply write

+ +
+
+ + diff --git a/IDZSwiftCommonCrypto/README.playground/Documentation/section-8.html b/IDZSwiftCommonCrypto/README.playground/Documentation/section-8.html new file mode 100644 index 0000000..210bc7f --- /dev/null +++ b/IDZSwiftCommonCrypto/README.playground/Documentation/section-8.html @@ -0,0 +1,19 @@ + + + + + Section 9 + + + + + + +
+
+

or

+ +
+
+ + diff --git a/IDZSwiftCommonCrypto/README.playground/Documentation/stylesheet.css b/IDZSwiftCommonCrypto/README.playground/Documentation/stylesheet.css new file mode 100644 index 0000000..c2d5bce --- /dev/null +++ b/IDZSwiftCommonCrypto/README.playground/Documentation/stylesheet.css @@ -0,0 +1,16 @@ +html { + font-size: 62.5%; +} + +body { + background-color: #fff; + font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; + font-size: 1.3rem; + padding-left: 20px; +} + +section { + padding-top: 10px; + padding-bottom: 20px; + -webkit-overflow-scrolling: touch; +} diff --git a/IDZSwiftCommonCrypto/README.playground/contents.xcplayground b/IDZSwiftCommonCrypto/README.playground/contents.xcplayground new file mode 100644 index 0000000..26af4d1 --- /dev/null +++ b/IDZSwiftCommonCrypto/README.playground/contents.xcplayground @@ -0,0 +1,43 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/README.playground/section-2-original.swift b/IDZSwiftCommonCrypto/README.playground/section-1.swift similarity index 100% rename from README.playground/section-2-original.swift rename to IDZSwiftCommonCrypto/README.playground/section-1.swift diff --git a/README.playground/section-12-original.swift b/IDZSwiftCommonCrypto/README.playground/section-11.swift similarity index 100% rename from README.playground/section-12-original.swift rename to IDZSwiftCommonCrypto/README.playground/section-11.swift diff --git a/README.playground/section-14-original.swift b/IDZSwiftCommonCrypto/README.playground/section-13.swift similarity index 100% rename from README.playground/section-14-original.swift rename to IDZSwiftCommonCrypto/README.playground/section-13.swift diff --git a/README.playground/section-16-original.swift b/IDZSwiftCommonCrypto/README.playground/section-15.swift similarity index 100% rename from README.playground/section-16-original.swift rename to IDZSwiftCommonCrypto/README.playground/section-15.swift diff --git a/README.playground/section-18-original.swift b/IDZSwiftCommonCrypto/README.playground/section-17.swift similarity index 100% rename from README.playground/section-18-original.swift rename to IDZSwiftCommonCrypto/README.playground/section-17.swift diff --git a/README.playground/section-4-original.swift b/IDZSwiftCommonCrypto/README.playground/section-3.swift similarity index 100% rename from README.playground/section-4-original.swift rename to IDZSwiftCommonCrypto/README.playground/section-3.swift diff --git a/README.playground/section-6-original.swift b/IDZSwiftCommonCrypto/README.playground/section-5.swift similarity index 100% rename from README.playground/section-6-original.swift rename to IDZSwiftCommonCrypto/README.playground/section-5.swift diff --git a/README.playground/section-8-original.swift b/IDZSwiftCommonCrypto/README.playground/section-7.swift similarity index 100% rename from README.playground/section-8-original.swift rename to IDZSwiftCommonCrypto/README.playground/section-7.swift diff --git a/README.playground/section-10-original.swift b/IDZSwiftCommonCrypto/README.playground/section-9.swift similarity index 100% rename from README.playground/section-10-original.swift rename to IDZSwiftCommonCrypto/README.playground/section-9.swift diff --git a/Makefile b/Makefile index a8bc296..080713d 100644 --- a/Makefile +++ b/Makefile @@ -1,12 +1,12 @@ REPO=IDZPodspecs NAME=IDZSwiftCommonCrypto -PG=IDZSwiftCommonCrypto/README.playground +PG=README.playground RSRC_DIR=$(PG)/Resources $(PG): README.md - playground README.md -p ios -d IDZSwiftCommonCrypto + playground README.md -p ios mkdir -p ${RSRC_DIR} - cp IDZSwiftCommonCrypto/Riscal.jpg ${RSRC_DIR} + cp Riscal.jpg ${RSRC_DIR} clean: diff --git a/README.playground/Documentation/section-0.html b/README.playground/Documentation/section-0.html index 40b9223..1551d33 100644 --- a/README.playground/Documentation/section-0.html +++ b/README.playground/Documentation/section-0.html @@ -11,18 +11,18 @@
-

IDZSwiftCommonCrypto Build Status

+

IDZSwiftCommonCrypto Carthage compatible Build Status

A Swift wrapper for Apple's CommonCrypto library.

Using IDZSwiftCommonCrypto

-

Since CommonCrypto is not a standalone module, you need to generate a fake module map to convince Xcode into allowing you to import CommonCrypto. The GenerateCommonCryptoModule script provides two methods for doing this. Which method you choosed depends on whether you want to able to use CommonCrypto and, by extension, IDZSwiftCommonCrypto in playgrounds.

+

Since CommonCrypto is not a standalone module, you need to generate a fake module map to convince Xcode into allowing you to import CommonCrypto. The GenerateCommonCryptoModule script provides two methods for doing this. Which method you choose depends on whether you want to able to use CommonCrypto and, by extension, IDZSwiftCommonCrypto in playgrounds.

To make CommonCrypto available to frameworks and playground use the command:

    ./GenerateCommonCryptoModule iphonesimulator8.0
 
-

This command creates a CommonCrypto.framework in the SDK system library directory.

+

This command creates a CommonCrypto.framework in the SDK system library directory. You should now be able to use either CommonCrypto or IDZSwiftCommonCrypto in a playground simply importing them or in your own app project by dragging the IDZSwiftCommonCrypto.xcodeproj into your project.

If you do not want to add any files to your SDK you can use the command

    ./GenerateCommonCryptoModule iphonesimulator8.0 .
 
-

This method creates a CommonCrypto directory within the IDZSwiftCommonCrypto source tree, so the SDK directories are not altered, but the module is not available in playgrounds. Also, the Module Import Path in any project that uses the framework will have to be set to point to this directory. For more about this, see my blog post Using CommonCrypto in Swift

+

This method creates a CommonCrypto directory within the IDZSwiftCommonCrypto source tree, so the SDK directories are not altered, but the module is not available in playgrounds. To use the framework in your own project drag the IDZSwiftCommonCrypto.xcodeproj into your project and set the Module Import Path to the directory containing the CommonCrypto directory created by the script. For more about this, see my blog post Using CommonCrypto in Swift

diff --git a/README.playground/contents.xcplayground b/README.playground/contents.xcplayground index 4f78035..26af4d1 100644 --- a/README.playground/contents.xcplayground +++ b/README.playground/contents.xcplayground @@ -1,25 +1,43 @@ - + - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - \ No newline at end of file diff --git a/README.playground/playground.xcworkspace/contents.xcworkspacedata b/README.playground/playground.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..919434a --- /dev/null +++ b/README.playground/playground.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/README.playground/section-1.swift b/README.playground/section-1.swift new file mode 100644 index 0000000..2f80be0 --- /dev/null +++ b/README.playground/section-1.swift @@ -0,0 +1 @@ +import IDZSwiftCommonCrypto \ No newline at end of file diff --git a/README.playground/section-12.swift b/README.playground/section-11.swift similarity index 92% rename from README.playground/section-12.swift rename to README.playground/section-11.swift index 3adfedc..34df412 100644 --- a/README.playground/section-12.swift +++ b/README.playground/section-11.swift @@ -5,4 +5,4 @@ var hmacs5 = HMAC(algorithm:.SHA1, key:keys5).update(datas5)?.final() // RFC2202 says this should be 4c9007f4026250c6bc8414f9bf50c86c2d7235da let expectedRFC2202 = arrayFromHexString("4c9007f4026250c6bc8414f9bf50c86c2d7235da") -assert(hmacs5! == expectedRFC2202) +assert(hmacs5! == expectedRFC2202) \ No newline at end of file diff --git a/README.playground/section-14.swift b/README.playground/section-13.swift similarity index 94% rename from README.playground/section-14.swift rename to README.playground/section-13.swift index 262f79e..ddef305 100644 --- a/README.playground/section-14.swift +++ b/README.playground/section-13.swift @@ -8,4 +8,4 @@ cryptor = Cryptor(operation:.Decrypt, algorithm:.AES, options:.PKCS7Padding, key var decryptedPlainText = cryptor.update(cipherText!)?.final() var decryptedString = decryptedPlainText!.reduce("") { $0 + String(UnicodeScalar($1)) } decryptedString -assert(decryptedString == plainText) +assert(decryptedString == plainText) \ No newline at end of file diff --git a/README.playground/section-16.swift b/README.playground/section-15.swift similarity index 58% rename from README.playground/section-16.swift rename to README.playground/section-15.swift index 06e307d..3d902aa 100644 --- a/README.playground/section-16.swift +++ b/README.playground/section-15.swift @@ -5,11 +5,11 @@ func crypt(sc : StreamCryptor, inputStream: NSInputStream, outputStream: NSOutp inputStream.open() outputStream.open() - var cryptedBytes = 0 + var cryptedBytes : UInt = 0 while inputStream.hasBytesAvailable { let bytesRead = inputStream.read(&inputBuffer, maxLength: inputBuffer.count) - let status = sc.update(inputBuffer, byteCountIn: bytesRead, bufferOut: &outputBuffer, byteCapacityOut: outputBuffer.count, byteCountOut: &cryptedBytes) + let status = sc.update(inputBuffer, byteCountIn: UInt(bytesRead), bufferOut: &outputBuffer, byteCapacityOut: UInt(outputBuffer.count), byteCountOut: &cryptedBytes) assert(status == Status.Success) if(cryptedBytes > 0) { @@ -17,7 +17,7 @@ func crypt(sc : StreamCryptor, inputStream: NSInputStream, outputStream: NSOutp assert(bytesWritten == Int(cryptedBytes)) } } - let status = sc.final(&outputBuffer, byteCapacityOut: outputBuffer.count, byteCountOut: &cryptedBytes) + let status = sc.final(&outputBuffer, byteCapacityOut: UInt(outputBuffer.count), byteCountOut: &cryptedBytes) assert(status == Status.Success) if(cryptedBytes > 0) { @@ -29,7 +29,7 @@ func crypt(sc : StreamCryptor, inputStream: NSInputStream, outputStream: NSOutp } let imagePath = NSBundle.mainBundle().pathForResource("Riscal", ofType:"jpg")! -let tmp = NSTemporaryDirectory() as NSString +let tmp = NSTemporaryDirectory() let encryptedFilePath = tmp.stringByAppendingPathComponent("Riscal.xjpgx") var decryptedFilePath = tmp.stringByAppendingPathComponent("RiscalDecrypted.jpg") @@ -39,20 +39,13 @@ var encryptedFileInputStream = NSInputStream(fileAtPath: encryptedFilePath) var decryptedFileOutputStream = NSOutputStream(toFileAtPath: decryptedFilePath, append:false) var sc = StreamCryptor(operation:.Encrypt, algorithm:.AES, options:.PKCS7Padding, key:key, iv:Array()) +crypt(sc, imageInputStream, encryptedFileOutputStream, 1024) -if let imageInputStream = imageInputStream, - let encryptedFileInputStream = encryptedFileInputStream, - let encryptedFileOutputStream = encryptedFileOutputStream, - let decryptedFileOutputStream = decryptedFileOutputStream -{ - crypt(sc, inputStream:imageInputStream, outputStream:encryptedFileOutputStream, bufferSize:1024) - - // Uncomment this line to verify that the file is encrypted - //var encryptedImage = UIImage(contentsOfFile:encryptedFile) +// Uncomment this line to verify that the file is encrypted +//var encryptedImage = UIImage(contentsOfFile:encryptedFile) - sc = StreamCryptor(operation:.Decrypt, algorithm:.AES, options:.PKCS7Padding, key:key, iv:Array()) - crypt(sc, inputStream:encryptedFileInputStream, outputStream:decryptedFileOutputStream, bufferSize:1024) +sc = StreamCryptor(operation:.Decrypt, algorithm:.AES, options:.PKCS7Padding, key:key, iv:Array()) +crypt(sc, encryptedFileInputStream, decryptedFileOutputStream, 1024) - var image = UIImage(named:"Riscal.jpg") - var decryptedImage = UIImage(contentsOfFile:decryptedFilePath) -} +var image = UIImage(named:"Riscal.jpg") +var decryptedImage = UIImage(contentsOfFile:decryptedFilePath) \ No newline at end of file diff --git a/README.playground/section-18.swift b/README.playground/section-17.swift similarity index 88% rename from README.playground/section-18.swift rename to README.playground/section-17.swift index b3fd482..f4b9508 100644 --- a/README.playground/section-18.swift +++ b/README.playground/section-17.swift @@ -1,4 +1,4 @@ let keys6 = PBKDF.deriveKey("password", salt: "salt", prf: .SHA1, rounds: 1, derivedKeyLength: 20) // RFC 6070 - Should derive 0c60c80f961f0e71f3a9b524af6012062fe037a6 let expectedRFC6070 = arrayFromHexString("0c60c80f961f0e71f3a9b524af6012062fe037a6") -assert(keys6 == expectedRFC6070) +assert(keys6 == expectedRFC6070) \ No newline at end of file diff --git a/README.playground/section-2.swift b/README.playground/section-2.swift deleted file mode 100644 index fa22d5d..0000000 --- a/README.playground/section-2.swift +++ /dev/null @@ -1 +0,0 @@ -import IDZSwiftCommonCrypto diff --git a/README.playground/section-4.swift b/README.playground/section-3.swift similarity index 96% rename from README.playground/section-4.swift rename to README.playground/section-3.swift index fd7ea9c..4173357 100644 --- a/README.playground/section-4.swift +++ b/README.playground/section-3.swift @@ -6,4 +6,4 @@ let digests2 = md5s2.final() // According to Wikipedia this should be // e4d909c290d0fb1ca068ffaddf22cbd0 hexStringFromArray(digests2) -assert(digests2 == arrayFromHexString("e4d909c290d0fb1ca068ffaddf22cbd0")) +assert(digests2 == arrayFromHexString("e4d909c290d0fb1ca068ffaddf22cbd0")) \ No newline at end of file diff --git a/README.playground/section-6.swift b/README.playground/section-5.swift similarity index 86% rename from README.playground/section-6.swift rename to README.playground/section-5.swift index 71e1911..bd1ccc2 100644 --- a/README.playground/section-6.swift +++ b/README.playground/section-5.swift @@ -4,4 +4,4 @@ let b : [UInt8] = 0x66,0x6f,0x78,0x2e] var md5s1 : Digest = Digest(algorithm:.MD5) md5s1.update(b) -let digests1 = md5s1.final() +let digests1 = md5s1.final() \ No newline at end of file diff --git a/README.playground/section-8.swift b/README.playground/section-7.swift similarity index 71% rename from README.playground/section-8.swift rename to README.playground/section-7.swift index 095b039..b86f095 100644 --- a/README.playground/section-8.swift +++ b/README.playground/section-7.swift @@ -1 +1 @@ - var digests3 = Digest(algorithm: .MD5).update(b)?.final() // digest is of type [UInt8]? + var digests3 = Digest(algorithm: .MD5).update(b)?.final() // digest is of type [UInt8]? \ No newline at end of file diff --git a/README.playground/section-10.swift b/README.playground/section-9.swift similarity index 71% rename from README.playground/section-10.swift rename to README.playground/section-9.swift index 80987e3..4ce6b9b 100644 --- a/README.playground/section-10.swift +++ b/README.playground/section-9.swift @@ -1 +1 @@ - var digests4 = Digest(algorithm: .MD5).update(s)?.final() // digest is of type [UInt8]? + var digests4 = Digest(algorithm: .MD5).update(s)?.final() // digest is of type [UInt8]? \ No newline at end of file diff --git a/README.playground/timeline.xctimeline b/README.playground/timeline.xctimeline deleted file mode 100644 index bf468af..0000000 --- a/README.playground/timeline.xctimeline +++ /dev/null @@ -1,6 +0,0 @@ - - - - - diff --git a/npm-debug.log b/npm-debug.log new file mode 100644 index 0000000..87c550c --- /dev/null +++ b/npm-debug.log @@ -0,0 +1,30 @@ +0 info it worked if it ends with ok +1 verbose cli [ 'node', +1 verbose cli '/usr/local/bin/npm', +1 verbose cli 'uninstall', +1 verbose cli '-g', +1 verbose cli 'swift-playground-builder' ] +2 info using npm@1.4.28 +3 info using node@v0.10.32 +4 verbose lib/node_modules/swift-playground-builder unbuild +5 info preuninstall swift-playground-builder@1.0.0 +6 info uninstall swift-playground-builder@1.0.0 +7 verbose true,/usr/local/lib/node_modules,/usr/local/lib/node_modules unbuild swift-playground-builder@1.0.0 +8 verbose /usr/local/bin,[object Object] binRoot +9 info postuninstall swift-playground-builder@1.0.0 +10 error Error: EACCES, unlink '/usr/local/lib/node_modules/swift-playground-builder' +10 error { [Error: EACCES, unlink '/usr/local/lib/node_modules/swift-playground-builder'] +10 error errno: 3, +10 error code: 'EACCES', +10 error path: '/usr/local/lib/node_modules/swift-playground-builder' } +11 error Please try running this command again as root/Administrator. +12 error System Darwin 14.4.0 +13 error command "node" "/usr/local/bin/npm" "uninstall" "-g" "swift-playground-builder" +14 error cwd /Users/danny/Documents/github/IDZSwiftCommonCrypto +15 error node -v v0.10.32 +16 error npm -v 1.4.28 +17 error path /usr/local/lib/node_modules/swift-playground-builder +18 error code EACCES +19 error errno 3 +20 error stack Error: EACCES, unlink '/usr/local/lib/node_modules/swift-playground-builder' +21 verbose exit [ 3, true ] From a771088ddf71b018c36f70401bbe0cd6781edabe Mon Sep 17 00:00:00 2001 From: iosdevzone Date: Fri, 18 Sep 2015 03:55:46 -0700 Subject: [PATCH 36/66] [Travis] Updated YAML for new dir structure --- .travis.yml | 2 -- .travis.yml.swp | Bin 12288 -> 0 bytes 2 files changed, 2 deletions(-) delete mode 100644 .travis.yml.swp diff --git a/.travis.yml b/.travis.yml index d4937e7..8be0f50 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,7 +9,6 @@ script: - make - git config --global push.default simple - git diff-files --exit-code; if [[ "$?" == "1" ]]; then git commit -a -m "Playground update from Travis [ci skip]"; git push; fi -- pushd IDZSwiftCommonCrypto - rm -rf CommonCrypto - ./GenerateCommonCryptoModule iphonesimulator9.0 . - cat CommonCrypto/module.map @@ -17,4 +16,3 @@ script: - xcodebuild build -scheme IDZSwiftCommonCrypto -destination 'platform=iOS Simulator,name=iPhone 6,OS=9.0' # Remove testing pending solution to https://github.com/travis-ci/travis-ci/issues/2829 - xcodebuild test -scheme IDZSwiftCommonCrypto -destination 'platform=iOS Simulator,name=iPhone 6,OS=9.0' -- popd diff --git a/.travis.yml.swp b/.travis.yml.swp deleted file mode 100644 index da175976f695c2f7aeb45fbbfc3ce3aa4e6f89cd..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 12288 zcmeI2yKWRQ6owsY5)cvnVS|(=p2a_Nq|(v^ANw+iw>F-1k5m@ct=878mnSaRI0~g0 zC?B2ZNf9R`q-i2R1jYzVvz6tg#d=__bqi*1JQ|y$MbHLQN*xg(0z`la5CI}U1c(3;AOb{y2oM1x@DCCYDPwQ1GBz`f zi^u=}qwoK3*BJYX`hxm^dXG9oy+)m)c2S>Z7<-3$gUV4`sCCq5jP(k26II8ZMo}XI zM1Tko0U|&IhyW2F0z`la{9Ob%IO|e2$Kg1!sq9s%NFhicfcvB`wS>zqECWx`L>Up3 zH8AfA5i(oqj@s!$SLq7hZMk5CmL0X*w?@L9g`I9^HCmi!bFe419mpn&GC4SD(z^Gy zsG4}eLO%rO*Wx%=pN9i^Bs5dkjT z Date: Fri, 18 Sep 2015 04:26:21 -0700 Subject: [PATCH 37/66] [Carthage/Xcode] First try at cerificates --- .travis.yml | 18 +++++++++++------- apple_wwdr.cer | Bin 0 -> 1063 bytes delete_keychain.bash | 7 +++++++ developer.p12 | Bin 0 -> 3254 bytes import_certs.bash | 26 ++++++++++++++++++++++++++ 5 files changed, 44 insertions(+), 7 deletions(-) create mode 100644 apple_wwdr.cer create mode 100644 delete_keychain.bash create mode 100644 developer.p12 create mode 100644 import_certs.bash diff --git a/.travis.yml b/.travis.yml index 8be0f50..86a6a91 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,18 +1,22 @@ language: objective-c osx_image: xcode7 - install: +- import_certs.bash - npm install -g playground - script: -# Generate README.playground from README.md - make - git config --global push.default simple -- git diff-files --exit-code; if [[ "$?" == "1" ]]; then git commit -a -m "Playground update from Travis [ci skip]"; git push; fi +- git diff-files --exit-code; if [[ "$?" == "1" ]]; then git commit -a -m "Playground + update from Travis [ci skip]"; git push; fi - rm -rf CommonCrypto - ./GenerateCommonCryptoModule iphonesimulator9.0 . - cat CommonCrypto/module.map - pwd -- xcodebuild build -scheme IDZSwiftCommonCrypto -destination 'platform=iOS Simulator,name=iPhone 6,OS=9.0' -# Remove testing pending solution to https://github.com/travis-ci/travis-ci/issues/2829 -- xcodebuild test -scheme IDZSwiftCommonCrypto -destination 'platform=iOS Simulator,name=iPhone 6,OS=9.0' +- xcodebuild build -scheme IDZSwiftCommonCrypto -destination 'platform=iOS Simulator,name=iPhone + 6,OS=9.0' +- xcodebuild test -scheme IDZSwiftCommonCrypto -destination 'platform=iOS Simulator,name=iPhone + 6,OS=9.0' +- delete_keychain +env: + matrix: + secure: a2fi02GPkxw27jVjW47EkvB/BW/SOIxlmLQJaiZ3xqbKe4udUxKE0ZigD0nVJDmxpiVHv5/Uc9ZQDPtKvvmU9kakusxjBVqMy+IxCYsH4+aDaATdaY9WHvVbARXJGjE/KmKnTfos/P8G8XqXahNKznql/gF2wZNoQIQD49JNk8s= diff --git a/apple_wwdr.cer b/apple_wwdr.cer new file mode 100644 index 0000000000000000000000000000000000000000..0de099b869bad748c60bbe8016a206cc2025b57d GIT binary patch literal 1063 zcmXqLVo^3|V&-1J%*4pV#3*UN%f_kI=F#?@mywZ`mBAp%klTQhjX9KsO_(V(*ihI& z5X9jU=5j13$VpZ3%uCiYR5MTk333a|LIj;ti%K%nGLsWaGV}8k97{_w@{2M{Dh#CZ+Pkhlho)37^&2iXxi23lZ8 z@F+tJ56>^kNh!}vNmX!3ElbVGFGwv?2ujTXyQ$dF#lQ*d6dr3LR4d@{kUIV9Jtx~*mOc3N^qkf?1> z*PH#>5>p>AuVJj6&YFIXuXU<<)?3bP>(b8#rp!MUb8%02Ub<;Rnc0%|#ypGu8``3N z)v7n5_WLy-?7cMks#M|DggJAK{X%~VMewxk5aT`gwA{5fz+;!T?vp944__Radn{w= zhQ)u<>k4);MS7PzO|;zk_3T5R_Xn&!dX_y^jQyLHwR^dkX~LyvYd^bbo_uk*`(@>U zti*KDO&|U~&DfI^pLc%d-S^VT|0bobW@2V!U|ig|&Y*F%0Ut2DW%(Hy|Ff_FlUkbr zKZq|3;h`Ux;W>`Z4wFHZ(i^E<{o)8C}i<=19_0NGK++PSc8c6 zg-rJ;Wt{)MWcTVhEc@>6Th9?^UVJ@=m5ZPQlM_jVT^MR;3$ zd0QGKA5$P3W-0XaA+O+*PF1$OSGS1v#a)P;KH;Tzf$>s?CZBo|n@pP49Y^;$XV z-%{P_->Y|DYj<;MeH~=0wkdhVmW`+Sznpor`Gos}{j(yQf8Cl9tkv|jCRK0hP2Acw*r@b6HQk_fhp0-j|J~}V_hu*nMD<{Pj>*=eOiUI)R Cp^hm4 literal 0 HcmV?d00001 diff --git a/delete_keychain.bash b/delete_keychain.bash new file mode 100644 index 0000000..9e0231b --- /dev/null +++ b/delete_keychain.bash @@ -0,0 +1,7 @@ + # If this environment variable is missing, we must not be running on Travis. + if [ -z "$KEY_PASSWORD" ] + then + return 0 + fi + + security delete-keychain "$KEYCHAIN" diff --git a/developer.p12 b/developer.p12 new file mode 100644 index 0000000000000000000000000000000000000000..3e04fd64f52cc9edcf7d43b5ed0eb3fe30ac0abc GIT binary patch literal 3254 zcmZ{mXE+<|{>KxE6(O}LF>9|V>OmE?YOB3xY>%kgGh$Tj+A-QtrKpmsRkXFYXsJ!3 z_B>XpQI6+-{m*&Md2wF+uJ3hyzV~={e{KW@`i=w$LSUdFWR$}358_X#f#g6O2I>jM zKwYn~69Pk4^LIst!;s;wQ6UKsa2?ryH$VhC8RY*@fC9-7G+>IWfd0#bJA}I=BoqKN zhRpqeGR5TH)M)}4%4Ab0qwDS0LEkYqasv$-Wh)D#oOa?VG9Nm{EaCiVaNv*13L7I~ zTUOAHk?h2a1z9Kp{Uj^=8CvBs%N>d4i{5RFe^8abad4YU^u0byB^tS~uUKT;jPqFo(tjwg%k#{F* z;|fv2K@4pIinJyB-W&;c$nvL4B{ zQHzGtl+N;+;Y{RTtaa0<_$16wJDqVfk^HlwS))~VXG1Q9pDHdY^aWUr7PA&#k}ci* zhjdg3)^X-}*w=)Jrz&!jeSvq!QecY$M?P>J}v2kmVoF4kFaQ#+f zZzmWMsjI7$joyViOVJYwbf9T;SLvZM+<`4xmrZw1qmB(vWVIyRe1`{k%eTza#6J4Q z54bTw(ODz4Pzaei3lpBgpd`M{Vr?6Y%(Xzl-CuLTX7pcNGTe?6fcR*Y9q@1SM>(N# zdFc^2jVg2Y1zs7t4x~!$Jd%Ecsvu2H85KqO<_olst}F=X#CVo$#d>Q<_rv$)aEIv! z*pt0PSZ&y>U;$x^{E%tyg~zk~xu-F}FQK<_Jp5Cipwp>Nx_tAdf&TcT#-Ag44L-AF zMe&fLQ4<4h)X!|#6Zc~?cv!dD3H9?mR_^b(6bC!V>7=Zn>H;!sonmPHQZF15YKbS*CKyH9`m?XfDT2n243Wo()7yboeo2owK+ zw$UAJ7M4z~g+(O5_F_anT7+5>9Lux?L*cAV>)q9+0G`j!#31GykLpCnUnST{J;XqL zW;(vQ{7AbqyeNLCz+05D}!&{9tQV%2-(*5&(qG6S-om>Jo z)20s{t;V^{DJIM*%?@W=k^fvp^ZM-Wh>%c7xZoAHAzRgt!kUZ}rXSUWn@=@)Zq6^2 z4q6BtS>i%Mdg_fdEh_|N46%lj{0?xp#o(5Yq^TkSk}t74)@9ozy=P_QD>wQ!&<(1h z8YR+g)DU+J(VH&whBlkDs+KnY=6TbF>*>=-6s%fYWPE~hP75bF+`>{#+E<^M7I`=qRqz;;4lg!^^+{4{utjDeq=Glusb zFbgN}uI4Hlo)Pb7_lF|*4l394_ZgzFrj@BIN#YzM^1bDk-1wq*g(*0xkIGC?^^FgA zf*M&l=bIz4$Cjr39dD@%PEe=DF9-U`{n~X^*#(SrY(v5f?)8{;D8d+4W!H`U_N68K zhCF(h>*n(;JPUZ0*+10c3jN5t*zbAz{_;YFN~2<5CDSr(ulrq`hnR2}(n2tXH18T`T~9h0)xR_a z0g~V_;9Ud;y!l`D0{vyLP1BJkfxbwazw8CZfcx5M^KTSvIwM&(mpqb9~lNJds=-LY%#bZQ5-k_{Waz zjOrZPI0Ph5`>}(A+&RH_RZ_`rMwYP(Hrj%c(xQz5<2pvG=-a+Qh-tF94tpUZ@)3U^ z8?e#wQ-m1@5{CHk=5YwMAb}b_6rXMA7uFJCayXH$HY6n>N?+;5FP_)jQhx- z8%Yzo*47n3bX1n!N#J7?d9lLzuIIuny@c{~IahVMz~+&0W02OoU7RJYPl9|vs(T78 zl8e(9kj-}5PMH?96Bwo;S<(J#KK={C^{2oamp8Fuo>(3<1#-O1U`+(?yvXZN;3?F6 z*C(*ir5w4mBw` zB02ZzddUavWY97*5yTtIVM3+Pe1_G8cWM-1#NL}#wdJh>X@7JkzkAsMBxmaLu$302 z;7{YjhjuMt(pn{z=LBaaAJa3p*>fc&U}FO%fI7<~E+u`b!7tXlu)&8~PSitakQcC> zigXBfNDmK`5zkzzsni*R=%ac)ia~dx75HLu9^>uNvHWk^hxL39zk;3yi0IxT?&A}E zhai%AMbP(x(c}lqEE~$jmXE`ZWXcO+7TKDSXAPfTi*#?TILX%-%;y@AuWlMM_w^%S0(Qqc(cZjH?5h8KV?So9t&~qYaBcZls;yVUioS*4dd@ zc!T_kf*72RBPSJJ)%W&i7nmN*!BHQ7ppM)-gwd(vu6~> zA{XYT1Cr6H2)BPfkCY6ORvZ=p4}bx{7{CQk1GoSJug4pJ0{C91A3*;9s3XAVdd**) z3!rnID1aN_FUAEByx#M_S|J4Q-xo1TGJzS~s}c)UYmNQeTuYPgWhD{76V(q82n08R xl8jV@21Ig`6aZ%M%%*PxJ1^0XyoQPD$j9oK-*7GfQ;a0_42O2n7Lfpf{{&;A?K}Vg literal 0 HcmV?d00001 diff --git a/import_certs.bash b/import_certs.bash new file mode 100644 index 0000000..af88144 --- /dev/null +++ b/import_certs.bash @@ -0,0 +1,26 @@ + SCRIPT_DIR=. + + # If this environment variable is missing, we must not be running on Travis. + if [ -z "$KEY_PASSWORD" ] + then + return 0 + fi + + echo "*** Setting up code signing $KEYCHAIN ..." + password=cibuild + + # Create a temporary keychain for code signing. + security create-keychain -p "$password" "$KEYCHAIN" + security default-keychain -s "$KEYCHAIN" + security unlock-keychain -p "$password" "$KEYCHAIN" + security set-keychain-settings -t 3600 -l "$KEYCHAIN" + + # Download the certificate for the Apple Worldwide Developer Relations + # Certificate Authority. + certpath="$SCRIPT_DIR/apple_wwdr.cer" + curl 'https://developer.apple.com/certificationauthority/AppleWWDRCA.cer' > "$certpath" + security import "$certpath" -k "$KEYCHAIN" -T /usr/bin/codesign + + # Import our development certificate. + security import "./developer.p12" -k "$KEYCHAIN" -P "$KEY_PASSWORD" -T /usr/bin/codesign + From 38fecedd831cc7b5f64c61e346853d3787e8760e Mon Sep 17 00:00:00 2001 From: iosdevzone Date: Fri, 18 Sep 2015 04:32:33 -0700 Subject: [PATCH 38/66] [Travis] Fix cert script permissions. --- delete_keychain.bash | 2 ++ import_certs.bash | 2 ++ 2 files changed, 4 insertions(+) mode change 100644 => 100755 delete_keychain.bash mode change 100644 => 100755 import_certs.bash diff --git a/delete_keychain.bash b/delete_keychain.bash old mode 100644 new mode 100755 index 9e0231b..0e39562 --- a/delete_keychain.bash +++ b/delete_keychain.bash @@ -1,3 +1,5 @@ +#!/bin/bash + # If this environment variable is missing, we must not be running on Travis. if [ -z "$KEY_PASSWORD" ] then diff --git a/import_certs.bash b/import_certs.bash old mode 100644 new mode 100755 index af88144..ec479ac --- a/import_certs.bash +++ b/import_certs.bash @@ -1,3 +1,5 @@ +#!/bin/bash + SCRIPT_DIR=. # If this environment variable is missing, we must not be running on Travis. From 0fb69da58d1d80ef658e7dd6339754dd7e2045d7 Mon Sep 17 00:00:00 2001 From: iosdevzone Date: Fri, 18 Sep 2015 04:46:36 -0700 Subject: [PATCH 39/66] [Travis] Fix paths. --- .travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 86a6a91..1917627 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,7 +1,7 @@ language: objective-c osx_image: xcode7 install: -- import_certs.bash +- ./import_certs.bash - npm install -g playground script: - make @@ -16,7 +16,7 @@ script: 6,OS=9.0' - xcodebuild test -scheme IDZSwiftCommonCrypto -destination 'platform=iOS Simulator,name=iPhone 6,OS=9.0' -- delete_keychain +- ./delete_keychain.bash env: matrix: secure: a2fi02GPkxw27jVjW47EkvB/BW/SOIxlmLQJaiZ3xqbKe4udUxKE0ZigD0nVJDmxpiVHv5/Uc9ZQDPtKvvmU9kakusxjBVqMy+IxCYsH4+aDaATdaY9WHvVbARXJGjE/KmKnTfos/P8G8XqXahNKznql/gF2wZNoQIQD49JNk8s= From 4f0173cffc7b430f808d084418f6be3ccae5eab4 Mon Sep 17 00:00:00 2001 From: iosdevzone Date: Fri, 18 Sep 2015 04:50:48 -0700 Subject: [PATCH 40/66] [Travis] Add missing KEYCHAIN var. --- delete_keychain.bash | 1 + import_certs.bash | 1 + 2 files changed, 2 insertions(+) diff --git a/delete_keychain.bash b/delete_keychain.bash index 0e39562..07f3029 100755 --- a/delete_keychain.bash +++ b/delete_keychain.bash @@ -1,4 +1,5 @@ #!/bin/bash +KEYCHAIN=IDZSwiftCommonCrypto.keychain # If this environment variable is missing, we must not be running on Travis. if [ -z "$KEY_PASSWORD" ] diff --git a/import_certs.bash b/import_certs.bash index ec479ac..a1342b1 100755 --- a/import_certs.bash +++ b/import_certs.bash @@ -1,5 +1,6 @@ #!/bin/bash + KEYCHAIN=IDZSwiftCommonCrypto.keychain SCRIPT_DIR=. # If this environment variable is missing, we must not be running on Travis. From f0a847a8aa43708a93ec82b1046baffc3b3ebb84 Mon Sep 17 00:00:00 2001 From: iosdevzone Date: Fri, 18 Sep 2015 04:59:28 -0700 Subject: [PATCH 41/66] [Travis] Probe issue with incorrect failures --- delete_keychain.bash | 1 + 1 file changed, 1 insertion(+) diff --git a/delete_keychain.bash b/delete_keychain.bash index 07f3029..d1a8315 100755 --- a/delete_keychain.bash +++ b/delete_keychain.bash @@ -8,3 +8,4 @@ KEYCHAIN=IDZSwiftCommonCrypto.keychain fi security delete-keychain "$KEYCHAIN" + echo "Deleted keycain." From 10259910537ca73df2bcc9a86215a61093879dc6 Mon Sep 17 00:00:00 2001 From: iosdevzone Date: Fri, 18 Sep 2015 05:04:07 -0700 Subject: [PATCH 42/66] [Travis] Move env section. --- .travis.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 1917627..c597a38 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,6 +3,11 @@ osx_image: xcode7 install: - ./import_certs.bash - npm install -g playground + +env: + matrix: + secure: a2fi02GPkxw27jVjW47EkvB/BW/SOIxlmLQJaiZ3xqbKe4udUxKE0ZigD0nVJDmxpiVHv5/Uc9ZQDPtKvvmU9kakusxjBVqMy+IxCYsH4+aDaATdaY9WHvVbARXJGjE/KmKnTfos/P8G8XqXahNKznql/gF2wZNoQIQD49JNk8s= + script: - make - git config --global push.default simple @@ -17,6 +22,3 @@ script: - xcodebuild test -scheme IDZSwiftCommonCrypto -destination 'platform=iOS Simulator,name=iPhone 6,OS=9.0' - ./delete_keychain.bash -env: - matrix: - secure: a2fi02GPkxw27jVjW47EkvB/BW/SOIxlmLQJaiZ3xqbKe4udUxKE0ZigD0nVJDmxpiVHv5/Uc9ZQDPtKvvmU9kakusxjBVqMy+IxCYsH4+aDaATdaY9WHvVbARXJGjE/KmKnTfos/P8G8XqXahNKznql/gF2wZNoQIQD49JNk8s= From 9fbf16be02fb59733d6aa988492295e5604c8c3d Mon Sep 17 00:00:00 2001 From: iosdevzone Date: Fri, 18 Sep 2015 05:10:34 -0700 Subject: [PATCH 43/66] Trying to find reason for travis failure. --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index c597a38..028e445 100644 --- a/.travis.yml +++ b/.travis.yml @@ -22,3 +22,4 @@ script: - xcodebuild test -scheme IDZSwiftCommonCrypto -destination 'platform=iOS Simulator,name=iPhone 6,OS=9.0' - ./delete_keychain.bash +- echo TRAVIS_TEST_RESULT=$TRAVIS_TEST_RESULT From 75dc22b7d0f4c87bb2cb57770fb6c8c11d983826 Mon Sep 17 00:00:00 2001 From: iosdevzone Date: Fri, 18 Sep 2015 05:13:28 -0700 Subject: [PATCH 44/66] [Travis] Remove newlines. --- .travis.yml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index 028e445..eb009f9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -17,9 +17,7 @@ script: - ./GenerateCommonCryptoModule iphonesimulator9.0 . - cat CommonCrypto/module.map - pwd -- xcodebuild build -scheme IDZSwiftCommonCrypto -destination 'platform=iOS Simulator,name=iPhone - 6,OS=9.0' -- xcodebuild test -scheme IDZSwiftCommonCrypto -destination 'platform=iOS Simulator,name=iPhone - 6,OS=9.0' +- xcodebuild build -scheme IDZSwiftCommonCrypto -destination 'platform=iOS Simulator,name=iPhone 6,OS=9.0' +- xcodebuild test -scheme IDZSwiftCommonCrypto -destination 'platform=iOS Simulator,name=iPhone 6,OS=9.0' - ./delete_keychain.bash - echo TRAVIS_TEST_RESULT=$TRAVIS_TEST_RESULT From 196fa5b7fc34720ae0b9622b18f8e382cf5967fc Mon Sep 17 00:00:00 2001 From: iosdevzone Date: Fri, 18 Sep 2015 05:16:55 -0700 Subject: [PATCH 45/66] [Travis] comment out some YAML. --- .travis.yml | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/.travis.yml b/.travis.yml index eb009f9..6ad7952 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,15 +9,14 @@ env: secure: a2fi02GPkxw27jVjW47EkvB/BW/SOIxlmLQJaiZ3xqbKe4udUxKE0ZigD0nVJDmxpiVHv5/Uc9ZQDPtKvvmU9kakusxjBVqMy+IxCYsH4+aDaATdaY9WHvVbARXJGjE/KmKnTfos/P8G8XqXahNKznql/gF2wZNoQIQD49JNk8s= script: -- make -- git config --global push.default simple -- git diff-files --exit-code; if [[ "$?" == "1" ]]; then git commit -a -m "Playground - update from Travis [ci skip]"; git push; fi +#- make +#- git config --global push.default simple +#- git diff-files --exit-code; if [[ "$?" == "1" ]]; then git commit -a -m "Playground update from Travis [ci skip]"; git push; fi - rm -rf CommonCrypto - ./GenerateCommonCryptoModule iphonesimulator9.0 . - cat CommonCrypto/module.map - pwd - xcodebuild build -scheme IDZSwiftCommonCrypto -destination 'platform=iOS Simulator,name=iPhone 6,OS=9.0' - xcodebuild test -scheme IDZSwiftCommonCrypto -destination 'platform=iOS Simulator,name=iPhone 6,OS=9.0' -- ./delete_keychain.bash -- echo TRAVIS_TEST_RESULT=$TRAVIS_TEST_RESULT +##- ./delete_keychain.bash +##- echo TRAVIS_TEST_RESULT=$TRAVIS_TEST_RESULT From 4b7c2546b42cca6f79580c0c73ad81f2c4615b94 Mon Sep 17 00:00:00 2001 From: iosdevzone Date: Fri, 18 Sep 2015 05:23:57 -0700 Subject: [PATCH 46/66] [Travis] Remove cert stuff. --- .travis.yml | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/.travis.yml b/.travis.yml index 6ad7952..15e3b38 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,7 +1,6 @@ language: objective-c osx_image: xcode7 install: -- ./import_certs.bash - npm install -g playground env: @@ -9,14 +8,12 @@ env: secure: a2fi02GPkxw27jVjW47EkvB/BW/SOIxlmLQJaiZ3xqbKe4udUxKE0ZigD0nVJDmxpiVHv5/Uc9ZQDPtKvvmU9kakusxjBVqMy+IxCYsH4+aDaATdaY9WHvVbARXJGjE/KmKnTfos/P8G8XqXahNKznql/gF2wZNoQIQD49JNk8s= script: -#- make -#- git config --global push.default simple -#- git diff-files --exit-code; if [[ "$?" == "1" ]]; then git commit -a -m "Playground update from Travis [ci skip]"; git push; fi +- make +- git config --global push.default simple +- git diff-files --exit-code; if [[ "$?" == "1" ]]; then git commit -a -m "Playground update from Travis [ci skip]"; git push; fi - rm -rf CommonCrypto - ./GenerateCommonCryptoModule iphonesimulator9.0 . - cat CommonCrypto/module.map - pwd - xcodebuild build -scheme IDZSwiftCommonCrypto -destination 'platform=iOS Simulator,name=iPhone 6,OS=9.0' - xcodebuild test -scheme IDZSwiftCommonCrypto -destination 'platform=iOS Simulator,name=iPhone 6,OS=9.0' -##- ./delete_keychain.bash -##- echo TRAVIS_TEST_RESULT=$TRAVIS_TEST_RESULT From e469529b52fe90570affae8fbabb29261ceb36e3 Mon Sep 17 00:00:00 2001 From: iosdevzone Date: Fri, 18 Sep 2015 05:32:45 -0700 Subject: [PATCH 47/66] [Travis] Move more stuff to Makefile. --- .travis.yml | 2 -- Makefile | 5 ++++- .../playground.xcworkspace/contents.xcworkspacedata | 7 ------- 3 files changed, 4 insertions(+), 10 deletions(-) delete mode 100644 README.playground/playground.xcworkspace/contents.xcworkspacedata diff --git a/.travis.yml b/.travis.yml index 15e3b38..fe2b688 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,8 +9,6 @@ env: script: - make -- git config --global push.default simple -- git diff-files --exit-code; if [[ "$?" == "1" ]]; then git commit -a -m "Playground update from Travis [ci skip]"; git push; fi - rm -rf CommonCrypto - ./GenerateCommonCryptoModule iphonesimulator9.0 . - cat CommonCrypto/module.map diff --git a/Makefile b/Makefile index 080713d..e68d097 100644 --- a/Makefile +++ b/Makefile @@ -7,8 +7,11 @@ $(PG): README.md playground README.md -p ios mkdir -p ${RSRC_DIR} cp Riscal.jpg ${RSRC_DIR} + git config --global push.default simple + git diff-files --exit-code; if [[ "$?" == "1" ]]; then git commit -a -m "Playground update from Travis [ci skip]"; git push; fi - +test: + xcodebuild test -scheme IDZSwiftCommonCrypto -destination 'platform=iOS Simulator,name=iPhone 6,OS=9.0' clean: rm -rf $(PG) diff --git a/README.playground/playground.xcworkspace/contents.xcworkspacedata b/README.playground/playground.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index 919434a..0000000 --- a/README.playground/playground.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,7 +0,0 @@ - - - - - From 9b3ed186ee1c6afb0ef694655b40d8315bf382b0 Mon Sep 17 00:00:00 2001 From: iosdevzone Date: Fri, 18 Sep 2015 05:38:51 -0700 Subject: [PATCH 48/66] [Travis] More Makefile. --- .travis.yml | 2 +- Makefile | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index fe2b688..3b181d2 100644 --- a/.travis.yml +++ b/.travis.yml @@ -14,4 +14,4 @@ script: - cat CommonCrypto/module.map - pwd - xcodebuild build -scheme IDZSwiftCommonCrypto -destination 'platform=iOS Simulator,name=iPhone 6,OS=9.0' -- xcodebuild test -scheme IDZSwiftCommonCrypto -destination 'platform=iOS Simulator,name=iPhone 6,OS=9.0' +- make test diff --git a/Makefile b/Makefile index e68d097..d90c595 100644 --- a/Makefile +++ b/Makefile @@ -9,7 +9,8 @@ $(PG): README.md cp Riscal.jpg ${RSRC_DIR} git config --global push.default simple git diff-files --exit-code; if [[ "$?" == "1" ]]; then git commit -a -m "Playground update from Travis [ci skip]"; git push; fi - +build: + xcodebuild build -scheme IDZSwiftCommonCrypto -destination 'platform=iOS Simulator,name=iPhone 6,OS=9.0' test: xcodebuild test -scheme IDZSwiftCommonCrypto -destination 'platform=iOS Simulator,name=iPhone 6,OS=9.0' clean: From 30cb96f7e44ecfcc7a1db11a10547766a62f184f Mon Sep 17 00:00:00 2001 From: idz Date: Fri, 18 Sep 2015 05:42:05 -0700 Subject: [PATCH 49/66] [Travis] Fix branch in travis label in README. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 2c6188a..9f70875 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# IDZSwiftCommonCrypto [![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage) [![Build Status](https://travis-ci.org/iosdevzone/IDZSwiftCommonCrypto.svg?branch=master)](https://travis-ci.org/iosdevzone/IDZSwiftCommonCrypto) +# IDZSwiftCommonCrypto [![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage) [![Build Status](https://travis-ci.org/iosdevzone/IDZSwiftCommonCrypto.svg?branch=swift2.0)](https://travis-ci.org/iosdevzone/IDZSwiftCommonCrypto) A Swift wrapper for Apple's `CommonCrypto` library. From a2e41e5b3e79b46c076ed8617489e234a3070f8b Mon Sep 17 00:00:00 2001 From: iosdevzone Date: Wed, 28 Oct 2015 20:53:29 -0700 Subject: [PATCH 50/66] Fix for issue #4. Also import instead of --- IDZSwiftCommonCrypto/Digest.swift | 2 +- IDZSwiftCommonCrypto/IDZSwiftCommonCrypto.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/IDZSwiftCommonCrypto/Digest.swift b/IDZSwiftCommonCrypto/Digest.swift index e51758c..42b7f80 100644 --- a/IDZSwiftCommonCrypto/Digest.swift +++ b/IDZSwiftCommonCrypto/Digest.swift @@ -138,7 +138,7 @@ class DigestEngineCC : DigestEngine { func final() -> [UInt8] { - let digestLength = Int(CC_MD5_DIGEST_LENGTH) + let digestLength = Int(self.length) var digest = Array(count:digestLength, repeatedValue: 0) finalizer(&digest, context) return digest diff --git a/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto.h b/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto.h index 2562868..26554bb 100644 --- a/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto.h +++ b/IDZSwiftCommonCrypto/IDZSwiftCommonCrypto.h @@ -6,7 +6,7 @@ // Copyright (c) 2014 iOSDeveloperZone.com. All rights reserved. // -#import +#import //! Project version number for IDZSwiftCommonCrypto. FOUNDATION_EXPORT double IDZSwiftCommonCryptoVersionNumber; From f07b16ca516367115bdb6a70c2532d55ca292020 Mon Sep 17 00:00:00 2001 From: iosdevzone Date: Wed, 28 Oct 2015 23:34:20 -0700 Subject: [PATCH 51/66] Update for iOS 9.1 --- Makefile | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index d90c595..fc4d485 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,8 @@ REPO=IDZPodspecs NAME=IDZSwiftCommonCrypto + +OS=9.1 + PG=README.playground RSRC_DIR=$(PG)/Resources @@ -9,10 +12,13 @@ $(PG): README.md cp Riscal.jpg ${RSRC_DIR} git config --global push.default simple git diff-files --exit-code; if [[ "$?" == "1" ]]; then git commit -a -m "Playground update from Travis [ci skip]"; git push; fi +# +# Build +# build: - xcodebuild build -scheme IDZSwiftCommonCrypto -destination 'platform=iOS Simulator,name=iPhone 6,OS=9.0' + xcodebuild build -scheme IDZSwiftCommonCrypto -destination 'platform=iOS Simulator,name=iPhone 6,OS=${OS}' test: - xcodebuild test -scheme IDZSwiftCommonCrypto -destination 'platform=iOS Simulator,name=iPhone 6,OS=9.0' + xcodebuild test -scheme IDZSwiftCommonCrypto -destination 'platform=iOS Simulator,name=iPhone 6,OS=${OS}' clean: rm -rf $(PG) From 48eb46f9cb16235e07094b43b516f08c7d12354b Mon Sep 17 00:00:00 2001 From: iosdevzone Date: Wed, 28 Oct 2015 23:42:54 -0700 Subject: [PATCH 52/66] Update podspec for 0.6.1 --- IDZSwiftCommonCrypto.podspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/IDZSwiftCommonCrypto.podspec b/IDZSwiftCommonCrypto.podspec index 0383c5c..370f956 100644 --- a/IDZSwiftCommonCrypto.podspec +++ b/IDZSwiftCommonCrypto.podspec @@ -16,7 +16,7 @@ Pod::Spec.new do |s| # s.name = "IDZSwiftCommonCrypto" - s.version = "0.5.16" + s.version = "0.6.1" s.summary = "A wrapper for Apple's Common Crypto library written in Swift." s.homepage = "https://github.com/iosdevzone/IDZSwiftCommonCrypto" From 86fa5d42b40614bc5f94a4876541b9b45c817bd5 Mon Sep 17 00:00:00 2001 From: iosdevzone Date: Wed, 28 Oct 2015 23:47:33 -0700 Subject: [PATCH 53/66] Fix some missing 9.0 references. Pod spec 0.6.2 --- IDZSwiftCommonCrypto.podspec | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/IDZSwiftCommonCrypto.podspec b/IDZSwiftCommonCrypto.podspec index 370f956..1249e1e 100644 --- a/IDZSwiftCommonCrypto.podspec +++ b/IDZSwiftCommonCrypto.podspec @@ -16,7 +16,7 @@ Pod::Spec.new do |s| # s.name = "IDZSwiftCommonCrypto" - s.version = "0.6.1" + s.version = "0.6.2" s.summary = "A wrapper for Apple's Common Crypto library written in Swift." s.homepage = "https://github.com/iosdevzone/IDZSwiftCommonCrypto" @@ -52,7 +52,7 @@ Pod::Spec.new do |s| # the deployment target. You can optionally include the target after the platform. # - s.platform = :ios, "9.0" + s.platform = :ios, "9.1" # s.platform = :ios, "5.0" # When using multiple platforms @@ -84,7 +84,7 @@ Pod::Spec.new do |s| if [ ! -e CommonCrypto ]; then pwd echo Running GenerateCommonCryptoModule - ./GenerateCommonCryptoModule iphonesimulator9.0 . + ./GenerateCommonCryptoModule iphonesimulator9.1 . else echo Skipped GenerateCommonCryptoModule fi From 23139e495b4a373d9d0abdbf37a81b2b19830289 Mon Sep 17 00:00:00 2001 From: iosdevzone Date: Thu, 29 Oct 2015 02:33:45 -0700 Subject: [PATCH 54/66] Get to 100% documenation --- IDZSwiftCommonCrypto/Crypto.swift | 25 + IDZSwiftCommonCrypto/Digest.swift | 39 +- IDZSwiftCommonCrypto/HMAC.swift | 58 +- IDZSwiftCommonCrypto/KeyDerivation.swift | 64 +- IDZSwiftCommonCrypto/Random.swift | 3 + IDZSwiftCommonCrypto/Status.swift | 43 +- IDZSwiftCommonCrypto/StreamCryptor.swift | 50 +- IDZSwiftCommonCrypto/Updateable.swift | 33 +- IDZSwiftCommonCrypto/Utilities.swift | 46 +- docs/Classes.html | 345 ++++++ docs/Classes/Cryptor.html | 223 ++++ docs/Classes/Digest.html | 353 ++++++ docs/Classes/Digest/Algorithm.html | 357 ++++++ docs/Classes/HMAC.html | 380 ++++++ docs/Classes/HMAC/Algorithm.html | 334 ++++++ docs/Classes/PBKDF.html | 461 ++++++++ docs/Classes/PBKDF/PseudoRandomAlgorithm.html | 292 +++++ docs/Classes/Random.html | 298 +++++ docs/Classes/StreamCryptor.html | 1047 +++++++++++++++++ docs/Classes/StreamCryptor/Algorithm.html | 334 ++++++ docs/Classes/StreamCryptor/Operation.html | 195 +++ docs/Classes/StreamCryptor/Options.html | 492 ++++++++ docs/Enums.html | 162 +++ docs/Enums/Status.html | 469 ++++++++ docs/Extensions.html | 249 ++++ docs/Extensions/CryptoDigest.html | 357 ++++++ docs/Extensions/NSData.html | 193 +++ docs/Extensions/String.html | 193 +++ docs/Extensions/Updateable.html | 235 ++++ docs/Functions.html | 473 ++++++++ docs/Protocols.html | 194 +++ docs/Protocols/CryptoDigest.html | 168 +++ docs/Protocols/Updateable.html | 237 ++++ docs/css/highlight.css | 202 ++++ docs/css/jazzy.css | 302 +++++ docs/docsets/.docset/Contents/Info.plist | 20 + .../Contents/Resources/Documents/Classes.html | 345 ++++++ .../Resources/Documents/Classes/Cryptor.html | 223 ++++ .../Resources/Documents/Classes/Digest.html | 353 ++++++ .../Documents/Classes/Digest/Algorithm.html | 357 ++++++ .../Resources/Documents/Classes/HMAC.html | 380 ++++++ .../Documents/Classes/HMAC/Algorithm.html | 334 ++++++ .../Resources/Documents/Classes/PBKDF.html | 461 ++++++++ .../Classes/PBKDF/PseudoRandomAlgorithm.html | 292 +++++ .../Resources/Documents/Classes/Random.html | 298 +++++ .../Documents/Classes/StreamCryptor.html | 1047 +++++++++++++++++ .../Classes/StreamCryptor/Algorithm.html | 334 ++++++ .../Classes/StreamCryptor/Operation.html | 195 +++ .../Classes/StreamCryptor/Options.html | 492 ++++++++ .../Contents/Resources/Documents/Enums.html | 162 +++ .../Resources/Documents/Enums/Status.html | 469 ++++++++ .../Resources/Documents/Extensions.html | 249 ++++ .../Documents/Extensions/CryptoDigest.html | 357 ++++++ .../Documents/Extensions/NSData.html | 193 +++ .../Documents/Extensions/String.html | 193 +++ .../Documents/Extensions/Updateable.html | 235 ++++ .../Resources/Documents/Functions.html | 473 ++++++++ .../Resources/Documents/Protocols.html | 194 +++ .../Documents/Protocols/CryptoDigest.html | 168 +++ .../Documents/Protocols/Updateable.html | 237 ++++ .../Resources/Documents/css/highlight.css | 202 ++++ .../Resources/Documents/css/jazzy.css | 302 +++++ .../Resources/Documents/img/carat.png | Bin 0 -> 274 bytes .../Contents/Resources/Documents/img/dash.png | Bin 0 -> 1338 bytes .../Contents/Resources/Documents/img/gh.png | Bin 0 -> 1571 bytes .../Contents/Resources/Documents/index.html | 319 +++++ .../Contents/Resources/Documents/js/jazzy.js | 31 + .../Resources/Documents/js/jquery.min.js | 4 + .../Resources/Documents/undocumented.txt | 0 .../.docset/Contents/Resources/docSet.dsidx | Bin 0 -> 49152 bytes docs/docsets/.tgz | Bin 0 -> 69751 bytes docs/img/carat.png | Bin 0 -> 274 bytes docs/img/dash.png | Bin 0 -> 1338 bytes docs/img/gh.png | Bin 0 -> 1571 bytes docs/index.html | 319 +++++ docs/js/jazzy.js | 31 + docs/js/jquery.min.js | 4 + docs/undocumented.txt | 0 78 files changed, 18129 insertions(+), 50 deletions(-) create mode 100644 docs/Classes.html create mode 100644 docs/Classes/Cryptor.html create mode 100644 docs/Classes/Digest.html create mode 100644 docs/Classes/Digest/Algorithm.html create mode 100644 docs/Classes/HMAC.html create mode 100644 docs/Classes/HMAC/Algorithm.html create mode 100644 docs/Classes/PBKDF.html create mode 100644 docs/Classes/PBKDF/PseudoRandomAlgorithm.html create mode 100644 docs/Classes/Random.html create mode 100644 docs/Classes/StreamCryptor.html create mode 100644 docs/Classes/StreamCryptor/Algorithm.html create mode 100644 docs/Classes/StreamCryptor/Operation.html create mode 100644 docs/Classes/StreamCryptor/Options.html create mode 100644 docs/Enums.html create mode 100644 docs/Enums/Status.html create mode 100644 docs/Extensions.html create mode 100644 docs/Extensions/CryptoDigest.html create mode 100644 docs/Extensions/NSData.html create mode 100644 docs/Extensions/String.html create mode 100644 docs/Extensions/Updateable.html create mode 100644 docs/Functions.html create mode 100644 docs/Protocols.html create mode 100644 docs/Protocols/CryptoDigest.html create mode 100644 docs/Protocols/Updateable.html create mode 100644 docs/css/highlight.css create mode 100644 docs/css/jazzy.css create mode 100644 docs/docsets/.docset/Contents/Info.plist create mode 100644 docs/docsets/.docset/Contents/Resources/Documents/Classes.html create mode 100644 docs/docsets/.docset/Contents/Resources/Documents/Classes/Cryptor.html create mode 100644 docs/docsets/.docset/Contents/Resources/Documents/Classes/Digest.html create mode 100644 docs/docsets/.docset/Contents/Resources/Documents/Classes/Digest/Algorithm.html create mode 100644 docs/docsets/.docset/Contents/Resources/Documents/Classes/HMAC.html create mode 100644 docs/docsets/.docset/Contents/Resources/Documents/Classes/HMAC/Algorithm.html create mode 100644 docs/docsets/.docset/Contents/Resources/Documents/Classes/PBKDF.html create mode 100644 docs/docsets/.docset/Contents/Resources/Documents/Classes/PBKDF/PseudoRandomAlgorithm.html create mode 100644 docs/docsets/.docset/Contents/Resources/Documents/Classes/Random.html create mode 100644 docs/docsets/.docset/Contents/Resources/Documents/Classes/StreamCryptor.html create mode 100644 docs/docsets/.docset/Contents/Resources/Documents/Classes/StreamCryptor/Algorithm.html create mode 100644 docs/docsets/.docset/Contents/Resources/Documents/Classes/StreamCryptor/Operation.html create mode 100644 docs/docsets/.docset/Contents/Resources/Documents/Classes/StreamCryptor/Options.html create mode 100644 docs/docsets/.docset/Contents/Resources/Documents/Enums.html create mode 100644 docs/docsets/.docset/Contents/Resources/Documents/Enums/Status.html create mode 100644 docs/docsets/.docset/Contents/Resources/Documents/Extensions.html create mode 100644 docs/docsets/.docset/Contents/Resources/Documents/Extensions/CryptoDigest.html create mode 100644 docs/docsets/.docset/Contents/Resources/Documents/Extensions/NSData.html create mode 100644 docs/docsets/.docset/Contents/Resources/Documents/Extensions/String.html create mode 100644 docs/docsets/.docset/Contents/Resources/Documents/Extensions/Updateable.html create mode 100644 docs/docsets/.docset/Contents/Resources/Documents/Functions.html create mode 100644 docs/docsets/.docset/Contents/Resources/Documents/Protocols.html create mode 100644 docs/docsets/.docset/Contents/Resources/Documents/Protocols/CryptoDigest.html create mode 100644 docs/docsets/.docset/Contents/Resources/Documents/Protocols/Updateable.html create mode 100644 docs/docsets/.docset/Contents/Resources/Documents/css/highlight.css create mode 100644 docs/docsets/.docset/Contents/Resources/Documents/css/jazzy.css create mode 100755 docs/docsets/.docset/Contents/Resources/Documents/img/carat.png create mode 100755 docs/docsets/.docset/Contents/Resources/Documents/img/dash.png create mode 100755 docs/docsets/.docset/Contents/Resources/Documents/img/gh.png create mode 100644 docs/docsets/.docset/Contents/Resources/Documents/index.html create mode 100755 docs/docsets/.docset/Contents/Resources/Documents/js/jazzy.js create mode 100755 docs/docsets/.docset/Contents/Resources/Documents/js/jquery.min.js create mode 100644 docs/docsets/.docset/Contents/Resources/Documents/undocumented.txt create mode 100644 docs/docsets/.docset/Contents/Resources/docSet.dsidx create mode 100644 docs/docsets/.tgz create mode 100755 docs/img/carat.png create mode 100755 docs/img/dash.png create mode 100755 docs/img/gh.png create mode 100644 docs/index.html create mode 100755 docs/js/jazzy.js create mode 100755 docs/js/jquery.min.js create mode 100644 docs/undocumented.txt diff --git a/IDZSwiftCommonCrypto/Crypto.swift b/IDZSwiftCommonCrypto/Crypto.swift index 8865e24..361c4c2 100644 --- a/IDZSwiftCommonCrypto/Crypto.swift +++ b/IDZSwiftCommonCrypto/Crypto.swift @@ -10,22 +10,40 @@ import Foundation +/// +/// Implements a simplified API for calculating digests over single buffers +/// public protocol CryptoDigest { + /// Calculates a message digest func digest(algorithm : Digest.Algorithm) -> Self } extension CryptoDigest { + /// An MD2 digest of this object public var MD2: Self { return self.digest(.MD2) } + /// An MD4 digest of this object public var MD4: Self { return self.digest(.MD4) } + /// An MD5 digest of this object public var MD5: Self { return self.digest(.MD5) } + /// An SHA1 digest of this object public var SHA1: Self { return self.digest(.SHA1) } + /// An SHA224 digest of this object public var SHA224: Self { return self.digest(.SHA224) } + /// An SHA256 digest of this object public var SHA256: Self { return self.digest(.SHA256) } + /// An SHA384 digest of this object public var SHA384: Self { return self.digest(.SHA384) } + /// An SHA512 digest of this object public var SHA512: Self { return self.digest(.SHA512) } } extension NSData : CryptoDigest { + /// + /// Calculates the Message Digest for this data. + /// + /// - parameter algorithm: the digest algorithm to use + /// - returns: an `NSData` object containing the message digest + /// public func digest(algorithm : Digest.Algorithm) -> Self { // This force unwrap may look scary but for CommonCrypto this cannot fail. // The API allows for optionals to support the OpenSSL implementation which can. @@ -36,6 +54,13 @@ extension NSData : CryptoDigest { } extension String : CryptoDigest { + /// + /// Calculates the Message Digest for this string. + /// The string is converted to raw data using UTF8. + /// + /// - parameter algorithm: the digest algorithm to use + /// - returns: a hex string of the calculated digest + /// public func digest(algorithm : Digest.Algorithm) -> String { // This force unwrap may look scary but for CommonCrypto this cannot fail. // The API allows for optionals to support the OpenSSL implementation which can. diff --git a/IDZSwiftCommonCrypto/Digest.swift b/IDZSwiftCommonCrypto/Digest.swift index 42b7f80..c3371bb 100644 --- a/IDZSwiftCommonCrypto/Digest.swift +++ b/IDZSwiftCommonCrypto/Digest.swift @@ -14,28 +14,43 @@ import CommonCrypto Public API for message digests. Usage is straightforward - :: + ```` let s = "The quick brown fox jumps over the lazy dog." var md5 : Digest = Digest(algorithm:.MD5) md5.update(s) let digest = md5.final() + ```` */ public class Digest : Updateable { + /// + /// The status of the Digest. + /// For CommonCrypto this will always be `.Success`. + /// It is here to provide for engines which can fail. + /// public var status = Status.Success - /** - - MD2: Message Digest 2 See: http://en.wikipedia.org/wiki/MD2_(cryptography) - - MD4 - - MD5 - - SHA1: Secure Hash Algorithm 1 - - SHA224: Secure Hash Algorithm 2 224-bit - - SHA256: Secure Hash Algorithm 2 256-bit - - SHA384: Secure Hash Algorithm 2 384-bit - - SHA512: Secure Hash Algorithm 2 512-bit - */ + + /// + /// Enumerates available Digest algorithms + /// public enum Algorithm { - case MD2, MD4, MD5, SHA1, SHA224, SHA256, SHA384, SHA512 + /// Message Digest 2 See: http://en.wikipedia.org/wiki/MD2_(cryptography) + case MD2, + /// Message Digest 4 + MD4, + /// Message Digest 5 + MD5, + /// Secure Hash Algorithm 1 + SHA1, + /// Secure Hash Algorithm 2 224-bit + SHA224, + /// Secure Hash Algorithm 2 256-bit + SHA256, + /// Secure Hash Algorithm 2 384-bit + SHA384, + /// Secure Hash Algorithm 2 512-bit + SHA512 } var engine: DigestEngine diff --git a/IDZSwiftCommonCrypto/HMAC.swift b/IDZSwiftCommonCrypto/HMAC.swift index 138ecb6..0e816c1 100644 --- a/IDZSwiftCommonCrypto/HMAC.swift +++ b/IDZSwiftCommonCrypto/HMAC.swift @@ -9,11 +9,28 @@ import Foundation import CommonCrypto +/// +/// Calculates a cryptographic Hash-Based Message Authentication Code (HMAC). +/// public class HMAC : Updateable { + /// + /// Enumerates available algorithms. + /// public enum Algorithm { - case SHA1, MD5, SHA224, SHA256, SHA384, SHA512 + /// Message Digest 5 + case MD5, + /// Secure Hash Algorithm 1 + SHA1, + /// Secure Hash Algorithm 2 224-bit + SHA224, + /// Secure Hash Algorithm 2 256-bit + SHA256, + /// Secure Hash Algorithm 2 384-bit + SHA384, + /// Secure Hash Algorithm 2 512-bit + SHA512 static let fromNative : [CCHmacAlgorithm: Algorithm] = [ CCHmacAlgorithm(kCCHmacAlgSHA1):.SHA1, @@ -46,6 +63,9 @@ public class HMAC : Updateable return fromNative[nativeAlg] } + /// + /// Obtains the digest length produced by this algorithm (in bytes). + /// public func digestLength() -> Int { switch self { case .SHA1: @@ -65,6 +85,8 @@ public class HMAC : Updateable } typealias Context = UnsafeMutablePointer + + /// Status of the calculation public var status : Status = .Success let context = Context.alloc(1) @@ -76,19 +98,37 @@ public class HMAC : Updateable CCHmacInit(context, algorithm.nativeValue(), keyBuffer, size_t(keyByteCount)) } + /// + /// Creates a new HMAC instance with the specified algorithm and key. + /// + /// - parameter algorithm: selects the algorithm + /// - parameter key: specifies the key + /// public init(algorithm : Algorithm, key : NSData) { self.algorithm = algorithm CCHmacInit(context, algorithm.nativeValue(), key.bytes, size_t(key.length)) } - + /// + /// Creates a new HMAC instance with the specified algorithm and key. + /// + /// - parameter algorithm: selects the algorithm + /// - parameter key: specifies the key + /// public init(algorithm : Algorithm, key : [UInt8]) { self.algorithm = algorithm CCHmacInit(context, algorithm.nativeValue(), key, size_t(key.count)) } + /// + /// Creates a new HMAC instance with the specified algorithm and key string. + /// The key string is converted to bytes using UTF8 encoding. + /// + /// - parameter algorithm: selects the algorithm + /// - parameter key: specifies the key + /// init(algorithm : Algorithm, key : String) { self.algorithm = algorithm @@ -98,13 +138,23 @@ public class HMAC : Updateable deinit { context.dealloc(1) } - + + /// + /// Updates the calculation of the HMAC with the contents of a buffer. + /// + /// - returns: the calculated HMAC + /// public func update(buffer : UnsafePointer, _ byteCount : size_t) -> Self? { CCHmacUpdate(context, buffer, byteCount) return self } - + + /// + /// Finalizes the HMAC calculation + /// + /// - returns: the calculated HMAC + /// public func final() -> [UInt8] { var hmac = Array(count:algorithm.digestLength(), repeatedValue:0) diff --git a/IDZSwiftCommonCrypto/KeyDerivation.swift b/IDZSwiftCommonCrypto/KeyDerivation.swift index 7050d6a..f1be908 100644 --- a/IDZSwiftCommonCrypto/KeyDerivation.swift +++ b/IDZSwiftCommonCrypto/KeyDerivation.swift @@ -9,11 +9,24 @@ import Foundation import CommonCrypto +/// +/// Derives key material from a password or passphrase. +/// public class PBKDF { + /// Enumerates available pseudo random algorithms public enum PseudoRandomAlgorithm { - case SHA1, SHA224, SHA256, SHA384, SHA512 + /// Secure Hash Algorithm 1 + case SHA1 + /// Secure Hash Algorithm 2 224-bit + case SHA224 + /// Secure Hash Algorithm 2 256-bit + case SHA256 + /// Secure Hash Algorithm 2 384-bit + case SHA384 + /// Secure Hash Algorithm 2 512-bit + case SHA512 func nativeValue() -> CCPseudoRandomAlgorithm { @@ -27,30 +40,67 @@ public class PBKDF } } } + + /// + /// Determines the (approximate) number of iterations of the key derivation algorithm that need + /// to be run to achieve a particular delay (or calculation time). + /// + /// - parameter passwordLength: password length in bytes + /// - parameter saltLength: salt length in bytes + /// - parameter algorithm: the PseudoRandomAlgorithm to use + /// - parameter derivedKeyLength: the desired key length + /// - parameter msec: the desired calculation time + /// - returns: the number of times the algorithm should be run + /// public class func calibrate(passwordLength: Int, saltLength: Int, algorithm: PseudoRandomAlgorithm, derivedKeyLength: Int, msec : UInt32) -> UInt { return UInt(CCCalibratePBKDF(CCPBKDFAlgorithm(kCCPBKDF2), passwordLength, saltLength, algorithm.nativeValue(), derivedKeyLength, msec)) } - public class func deriveKey(password: UnsafePointer, passwordLen: Int, salt: UnsafePointer, saltLen: Int, prf: PseudoRandomAlgorithm, rounds: uint, derivedKey: UnsafeMutablePointer, derivedKeyLen: Int) + + /// + /// Derives key material from a password and salt. + /// + /// -parameter password: the password string, will be converted using UTF8 + /// -parameter salt: the salt string will be converted using UTF8 + /// -parameter prf: the pseudo random function + /// -parameter round: the number of rounds + /// -parameter derivedKeyLength: the length of the desired derived key, in bytes. + /// -returns: the derived key + /// + public class func deriveKey(password : String, salt : String, prf: PseudoRandomAlgorithm, rounds: uint, derivedKeyLength: UInt) -> [UInt8] { - let status : Int32 = CCKeyDerivationPBKDF(CCPBKDFAlgorithm(kCCPBKDF2), password, passwordLen, salt, saltLen, prf.nativeValue(), rounds, derivedKey, derivedKeyLen) + var derivedKey = Array(count:Int(derivedKeyLength), repeatedValue: 0) + let status : Int32 = CCKeyDerivationPBKDF(CCPBKDFAlgorithm(kCCPBKDF2), password, password.lengthOfBytesUsingEncoding(NSUTF8StringEncoding), salt, salt.lengthOfBytesUsingEncoding(NSUTF8StringEncoding), prf.nativeValue(), rounds, &derivedKey, derivedKey.count) if(status != Int32(kCCSuccess)) { NSLog("ERROR: CCKeyDerivationPBDK failed with stats \(status).") fatalError("ERROR: CCKeyDerivationPBDK failed.") } + return derivedKey } - public class func deriveKey(password : String, salt : String, prf: PseudoRandomAlgorithm, rounds: uint, derivedKeyLength: UInt) -> [UInt8] + //MARK: - Low-level Routines + /// + /// Derives key material from a password buffer. + /// + /// - parameter password: pointer to the password buffer + /// - parameter passwordLength: password length in bytes + /// - parameter salt: pointer to the salt buffer + /// - parameter saltLength: salt length in bytes + /// - parameter prf: the PseudoRandomAlgorithm to use + /// - parameter rounds: the number of rounds of the algorithm to use + /// - parameter derivedKey: pointer to the derived key buffer. + /// - parameter derivedKeyLength: the desired key length + /// - return: the number of times the algorithm should be run + /// + public class func deriveKey(password: UnsafePointer, passwordLen: Int, salt: UnsafePointer, saltLen: Int, prf: PseudoRandomAlgorithm, rounds: uint, derivedKey: UnsafeMutablePointer, derivedKeyLen: Int) { - var derivedKey = Array(count:Int(derivedKeyLength), repeatedValue: 0) - let status : Int32 = CCKeyDerivationPBKDF(CCPBKDFAlgorithm(kCCPBKDF2), password, password.lengthOfBytesUsingEncoding(NSUTF8StringEncoding), salt, salt.lengthOfBytesUsingEncoding(NSUTF8StringEncoding), prf.nativeValue(), rounds, &derivedKey, derivedKey.count) + let status : Int32 = CCKeyDerivationPBKDF(CCPBKDFAlgorithm(kCCPBKDF2), password, passwordLen, salt, saltLen, prf.nativeValue(), rounds, derivedKey, derivedKeyLen) if(status != Int32(kCCSuccess)) { NSLog("ERROR: CCKeyDerivationPBDK failed with stats \(status).") fatalError("ERROR: CCKeyDerivationPBDK failed.") } - return derivedKey } } \ No newline at end of file diff --git a/IDZSwiftCommonCrypto/Random.swift b/IDZSwiftCommonCrypto/Random.swift index 3e8932b..f279c43 100644 --- a/IDZSwiftCommonCrypto/Random.swift +++ b/IDZSwiftCommonCrypto/Random.swift @@ -12,6 +12,9 @@ import CommonCrypto public typealias RNGStatus = Status +/// +/// Generates buffers of random bytes. +/// public class Random { /** diff --git a/IDZSwiftCommonCrypto/Status.swift b/IDZSwiftCommonCrypto/Status.swift index 4c880da..2c0d189 100644 --- a/IDZSwiftCommonCrypto/Status.swift +++ b/IDZSwiftCommonCrypto/Status.swift @@ -9,18 +9,33 @@ import Foundation import CommonCrypto +/// +/// Links the native CommonCryptoStatus enumeration to Swiftier versions. +/// public enum Status : CCCryptorStatus, CustomStringConvertible, ErrorType { + /// Successful case Success, + /// Parameter Error ParamError, + /// Buffer too Small BufferTooSmall, + /// Memory Failure MemoryFailure, + /// Alignment Error AlignmentError, + /// Decode Error DecodeError, + /// Unimplemented Unimplemented, + /// Overflow Overflow, + /// Random Number Generator Err RNGFailure + /// + /// Converts this value to a native `CCCryptorStatus` value. + /// public func toRaw() -> CCCryptorStatus { switch self { @@ -36,19 +51,25 @@ public enum Status : CCCryptorStatus, CustomStringConvertible, ErrorType } } + /// + /// Human readable descriptions of the values. (Not needed in Swift 2.0?) + /// static let descriptions = [ Success: "Success", ParamError: "ParamError", BufferTooSmall: "BufferTooSmall", MemoryFailure: "MemoryFailure", AlignmentError: "AlignmentError", DecodeError: "DecodeError", Unimplemented: "Unimplemented", Overflow: "Overflow", RNGFailure: "RNGFailure"] + + /// + /// Obtain human-readable string from enum value. + /// public var description : String { return (Status.descriptions[self] != nil) ? Status.descriptions[self]! : "" } - - - - + /// + /// Create enum value from raw `CCCryptorStatus` value. + /// public static func fromRaw(status : CCCryptorStatus) -> Status? { var from = [ kCCSuccess: Success, kCCParamError: ParamError, @@ -56,18 +77,6 @@ public enum Status : CCCryptorStatus, CustomStringConvertible, ErrorType kCCAlignmentError: AlignmentError, kCCDecodeError: DecodeError, kCCUnimplemented: Unimplemented, kCCOverflow: Overflow, kCCRNGFailure: RNGFailure] return from[Int(status)] - - -// switch status { -// case kCCSuccess: return Success -// case kCCParamError: return ParamError -// case kCCBufferTooSmall: return BufferTooSmall -// case kCCMemoryFailure: return MemoryFailure -// case kCCAlignmentError: return AlignmentError -// case kCCDecodeError: return DecodeError -// case kCCUnimplemented: return Unimplemented -// case kCCOverflow: return Overflow -// case kCCRNGFailure: return RNGFailure -// } + } } diff --git a/IDZSwiftCommonCrypto/StreamCryptor.swift b/IDZSwiftCommonCrypto/StreamCryptor.swift index 72fe56d..cc036b0 100644 --- a/IDZSwiftCommonCrypto/StreamCryptor.swift +++ b/IDZSwiftCommonCrypto/StreamCryptor.swift @@ -12,7 +12,7 @@ import CommonCrypto /** Encrypts or decrypts return results as they become available. - :note: The underlying cipher may be a block or a stream cipher. + - note: The underlying cipher may be a block or a stream cipher. Use for large files or network streams. @@ -20,10 +20,17 @@ import CommonCrypto */ public class StreamCryptor { + /// + /// Enumerates Cryptor operations + /// public enum Operation { - case Encrypt, Decrypt + /// Encrypting + case Encrypt, + /// Decrypting + Decrypt + /// Convert to native `CCOperation` func nativeValue() -> CCOperation { switch self { case Encrypt : return CCOperation(kCCEncrypt) @@ -32,10 +39,25 @@ public class StreamCryptor } } + /// + /// Enumerates available algorithms + /// public enum Algorithm { - case AES, DES, TripleDES, CAST, RC2, Blowfish + /// Advanced Encryption Standard + case AES, + /// Data Encryption Standard + DES, + /// Triple DES + TripleDES, + /// CAST + CAST, + /// RC2 + RC2, + /// Blowfish + Blowfish + /// Blocksize, in bytes, of algorithm. public func blockSize() -> Int { switch self { case AES : return kCCBlockSizeAES128 @@ -46,7 +68,7 @@ public class StreamCryptor case Blowfish : return kCCBlockSizeBlowfish } } - + /// Native, CommonCrypto constant for algorithm. func nativeValue() -> CCAlgorithm { switch self { @@ -68,54 +90,74 @@ public class StreamCryptor * NSHipster * From: http://nshipster.com/rawoptionsettype/ */ + /// + /// Maps CommonCryptoOptions onto a Swift struct. + /// public struct Options : OptionSetType, BooleanType { private var value: UInt = 0 public typealias RawValue = UInt + + // Needed by 2.0 RawRepresentable + /// Convert to native raw value public var rawValue : UInt { return self.value } + + /// Initialize from a raw value public init(_ rawValue: UInt) { self.value = rawValue } // Needed for 1.1 RawRepresentable + // Needed for 2.0 OptionSetType + /// Convert from a native value (i.e. `0`, `kCCOptionPKCS7Padding`, `kCCOptionECBMode`) public init(rawValue: UInt) { self.value = rawValue } // Needed for 1.1 NilLiteralConverable + /// Initialize from a nil literal public init(nilLiteral: ()) { } // Needed for 1.0 _RawOptionSet + /// Create from a mask public static func fromMask(raw: UInt) -> Options { return self.init(raw) } + /// Convert from native raw value. public static func fromRaw(raw: UInt) -> Options? { return self.init(raw) } + /// Convert to native raw value. public func toRaw() -> UInt { return value } + /// Convert to boolean value. public var boolValue: Bool { return value != 0 } + /// Initialize to value appropriate for "all zeros" of a mask. public static var allZeros: Options { return self.init(0) } + /// nil is consider the same a zero or None. public static func convertFromNilLiteral() -> Options { return self.init(0) } + /// No options public static var None: Options { return self.init(0) } + /// Use padding. Needed unless the input is a integral number of blocks long. public static var PKCS7Padding: Options { return self.init(UInt(kCCOptionPKCS7Padding)) } + /// Electronic Code Book Mode. Don't use this. public static var ECBMode: Options { return self.init(UInt(kCCOptionECBMode)) } } diff --git a/IDZSwiftCommonCrypto/Updateable.swift b/IDZSwiftCommonCrypto/Updateable.swift index e692796..521cf22 100644 --- a/IDZSwiftCommonCrypto/Updateable.swift +++ b/IDZSwiftCommonCrypto/Updateable.swift @@ -8,27 +8,50 @@ import Foundation +/// +/// A protocol for calculations that can be updated with incremental data buffers. +/// public protocol Updateable { + /// Status of the calculation. var status : Status { get } + /// Low-level update routine. + /// Updates the calculation with the contents of a data buffer. + /// - parameter buffer: pointer to the data buffer + /// - parameter byteCount: length of the buffer in bytes + /// - returns: self if no error for optional chaining, null otherwise func update(buffer : UnsafePointer, _ byteCount : size_t) -> Self? } -/** - Factors out update code from Digest, HMAC and Cryptor -*/ +/// +/// Factors out common update code from Digest, HMAC and Cryptor. +/// extension Updateable { + /// + /// Updates the current calculation with data contained in an `NSData` object. + /// + /// - parameters data: the data buffer + /// public func update(data: NSData) -> Self? { update(data.bytes, size_t(data.length)) return self.status == Status.Success ? self : nil } - + /// + /// Updates the current calculation with data contained in a Swift array. + /// + /// - parameters byteArray: the Swift array + /// public func update(byteArray : [UInt8]) -> Self? { update(byteArray, size_t(byteArray.count)) return self.status == Status.Success ? self : nil } - + /// + /// Updates the current calculation with data contained in a Swift string. + /// The corresponding data will be generated using UTF8 encoding. + /// + /// - parameters string: the Swift string + /// public func update(string: String) -> Self? { update(string, size_t(string.lengthOfBytesUsingEncoding(NSUTF8StringEncoding))) diff --git a/IDZSwiftCommonCrypto/Utilities.swift b/IDZSwiftCommonCrypto/Utilities.swift index 1d3bd85..804234d 100644 --- a/IDZSwiftCommonCrypto/Utilities.swift +++ b/IDZSwiftCommonCrypto/Utilities.swift @@ -8,6 +8,12 @@ import Foundation +/// +/// Converts a single hexadecimal digit encoded as a Unicode Scalar to it's corresponding value. +/// +/// - parameter c: A Unicode scalar in the set 0..9a..fA..F +/// - returns: the hexadecimal value of the digit +/// func convertHexDigit(c : UnicodeScalar) -> UInt8 { switch c { @@ -18,7 +24,12 @@ func convertHexDigit(c : UnicodeScalar) -> UInt8 } } - +/// +/// Converts a string of hexadecimal digits to a Swift array. +/// +/// - parameter s: the hex string (must contain an even number of digits) +/// - returns: a Swift array +/// public func arrayFromHexString(s : String) -> [UInt8] { var g = s.unicodeScalars.generate() @@ -37,27 +48,60 @@ public func arrayFromHexString(s : String) -> [UInt8] return a } +/// +/// Converts a string of hexadecimal digits to an `NSData` object. +/// +/// - parameter s: the hex string (must contain an even number of digits) +/// - returns: an NSData object +/// public func dataFromHexString(s : String) -> NSData { let a = arrayFromHexString(s) return NSData(bytes:a, length:a.count) } +/// +/// Converts a Swift array to an `NSData` object. +/// +/// - parameter a: the Swift array +/// - returns: an NSData object +/// public func dataFromByteArray(a : [UInt8]) -> NSData { return NSData(bytes:a, length:a.count) } +/// +/// Converts a Swift array to a string of hexadecimal digits. +/// +/// - parameter a: the Swift array +/// - parameter uppercase: if true use uppercase for letter digits, lowercase otherwise +/// - returns: a Swift string +/// public func hexStringFromArray(a : [UInt8], uppercase : Bool = false) -> String { return a.map() { String(format:uppercase ? "%02X" : "%02x", $0) }.reduce("", combine: +) } +/// +/// Converts a Swift array to an `NSString` object. +/// +/// - parameter a: the Swift array +/// - parameter uppercase: if true use uppercase for letter digits, lowercase otherwise +/// - returns: an `NSString` object +/// public func hexNSStringFromArray(a : [UInt8], uppercase : Bool = false) -> NSString { return a.map() { String(format:uppercase ? "%02X" : "%02x", $0) }.reduce("", combine: +) } +/// +/// Converts a Swift array to a Swift `String` containing a comma separated list of bytes. +/// This is used to generate test data programmatically. +/// +/// - parameter a: the Swift array +/// - returns: a Swift string +/// public func hexListFromArray(a : [UInt8]) -> String { return a.map() { String(format:"0x%02x, ", $0) }.reduce("", combine: +) diff --git a/docs/Classes.html b/docs/Classes.html new file mode 100644 index 0000000..59f58c6 --- /dev/null +++ b/docs/Classes.html @@ -0,0 +1,345 @@ + + + + Classes Reference + + + + + + + + +
+
+

Docs (100% documented)

+
+
+
+ +
+
+ +
+
+
+

Classes

+

The following classes are available globally.

+ +
+
+
+
    +
  • +
    + + + + PBKDF + +
    +
    +
    +
    +
    +
    +

    Derives key material from a password or passphrase.

    + + See more +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public class PBKDF
    + +
    +
    +
    +
    +
  • +
+
+
+
    +
  • +
    + + + + Cryptor + +
    +
    +
    +
    +
    +
    +

    Encrypts or decrypts, accumulating result.

    + +

    Useful for small in-memory buffers.

    + +

    For large files or network streams use StreamCryptor.

    + + See more +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public class Cryptor : StreamCryptor, Updateable
    + +
    +
    +
    +
    +
  • +
+
+
+
    +
  • +
    + + + + StreamCryptor + +
    +
    +
    +
    +
    +
    +

    Encrypts or decrypts return results as they become available.

    + +

    Use for large files or network streams.

    + +

    For small, in-memory buffers Cryptor may be easier to use.

    + + See more +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public class StreamCryptor
    + +
    +
    +
    +
    +
  • +
+
+
+
    +
  • +
    + + + + Random + +
    +
    +
    +
    +
    +
    +

    Generates buffers of random bytes.

    + + See more +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public class Random
    + +
    +
    +
    +
    +
  • +
+
+
+ +
    +
  • +
    + + + + Digest + +
    +
    +
    +
    +
    +
    +

    Public API for message digests.

    + +

    Usage is straightforward + + let s = "The quick brown fox jumps over the lazy dog." + var md5 : Digest = Digest(algorithm:.MD5) + md5.update(s) + let digest = md5.final() +

    + + See more +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public class Digest : Updateable
    + +
    +
    +
    +
    +
  • +
+
+
+
    +
  • +
    + + + + HMAC + +
    +
    +
    +
    +
    +
    +

    Calculates a cryptographic Hash-Based Message Authentication Code (HMAC).

    + + See more +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public class HMAC : Updateable
    + +
    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + + diff --git a/docs/Classes/Cryptor.html b/docs/Classes/Cryptor.html new file mode 100644 index 0000000..cddcda3 --- /dev/null +++ b/docs/Classes/Cryptor.html @@ -0,0 +1,223 @@ + + + + Cryptor Class Reference + + + + + + + + + +
+
+

Docs (100% documented)

+
+
+
+ +
+
+ +
+
+
+

Cryptor

+
+
+
public class Cryptor : StreamCryptor, Updateable
+ +
+
+

Encrypts or decrypts, accumulating result.

+ +

Useful for small in-memory buffers.

+ +

For large files or network streams use StreamCryptor.

+ +
+
+
+
    +
  • +
    + + + + final() + +
    +
    +
    +
    +
    +
    +

    Retrieves the encrypted or decrypted data.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func final() -> [UInt8]?
    + +
    +
    +
    +

    Return Value

    +

    the encrypted or decrypted data or nil if an error occured.

    + +
    +
    +
    +
  • +
+
+
+ +
    +
  • +
    + + + + update(_:_:) + +
    +
    +
    +
    +
    +
    +

    Upates the accumulated encrypted/decrypted data with the contents +of a raw byte buffer.

    + +

    It is not envisaged the users of the framework will need to call this directly.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func update(buffer: UnsafePointer<Void>, _ byteCount: Int) -> Self?
    + +
    +
    +
    +

    Return Value

    +

    this Cryptor object or nil if an error occurs (for optional chaining)

    + +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + + diff --git a/docs/Classes/Digest.html b/docs/Classes/Digest.html new file mode 100644 index 0000000..1f39019 --- /dev/null +++ b/docs/Classes/Digest.html @@ -0,0 +1,353 @@ + + + + Digest Class Reference + + + + + + + + + +
+
+

Docs (100% documented)

+
+
+
+ +
+
+ +
+
+
+

Digest

+
+
+
public class Digest : Updateable
+ +
+
+

Public API for message digests.

+ +

Usage is straightforward + + let s = "The quick brown fox jumps over the lazy dog." + var md5 : Digest = Digest(algorithm:.MD5) + md5.update(s) + let digest = md5.final() +

+ +
+
+
+
    +
  • +
    + + + + status + +
    +
    +
    +
    +
    +
    +

    The status of the Digest. +For CommonCrypto this will always be .Success. +It is here to provide for engines which can fail.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var status = Status.Success
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + Algorithm + +
    +
    +
    +
    +
    +
    +

    Enumerates available Digest algorithms

    + + See more +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public enum Algorithm
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + init(algorithm:) + +
    +
    +
    +
    +
    +
    +

    Create an algorithm-specific digest calculator +- parameter alrgorithm: the desired message digest algorithm

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init(algorithm: Algorithm)
    + +
    +
    +
    +

    Parameters

    + + + + + + + +
    + + alrgorithm + + +
    +

    the desired message digest algorithm

    + +
    +
    +
    +
    +
    +
  • +
  • +
    + + + + update(_:_:) + +
    +
    +
    +
    +
    +
    +

    Low-level update routine. Updates the message digest calculation with +the contents of a byte buffer.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func update(buffer: UnsafePointer<Void>, _ byteCount: size_t) -> Self?
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + +
    + + buffer + + +
    +

    the buffer

    + +
    +
    + + the + + +
    +

    number of bytes in buffer

    + +
    +
    +
    +
    +

    Return Value

    +

    this Digest object (for optional chaining)

    + +
    +
    +
    +
  • +
  • +
    + + + + final() + +
    +
    +
    +
    +
    +
    +

    Completes the calculate of the messge digest +- returns: the message digest

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func final() -> [UInt8]
    + +
    +
    +
    +

    Return Value

    +

    the message digest

    + +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + + diff --git a/docs/Classes/Digest/Algorithm.html b/docs/Classes/Digest/Algorithm.html new file mode 100644 index 0000000..da42599 --- /dev/null +++ b/docs/Classes/Digest/Algorithm.html @@ -0,0 +1,357 @@ + + + + Algorithm Enum Reference + + + + + + + + + +
+
+

Docs (100% documented)

+
+
+
+ +
+
+ +
+
+
+

Algorithm

+
+
+
public enum Algorithm
+ +
+
+

Enumerates available Digest algorithms

+ +
+
+
+
    +
  • +
    + + + + MD2 + +
    +
    +
    +
    +
    + +
    +

    Declaration

    +
    +

    Swift

    +
    case MD2,
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + MD4 + +
    +
    +
    +
    +
    +
    +

    Message Digest 4

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    MD4,
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + MD5 + +
    +
    +
    +
    +
    +
    +

    Message Digest 5

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    MD5,
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + SHA1 + +
    +
    +
    +
    +
    +
    +

    Secure Hash Algorithm 1

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    SHA1,
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + SHA224 + +
    +
    +
    +
    +
    +
    +

    Secure Hash Algorithm 2 224-bit

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    SHA224,
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + SHA256 + +
    +
    +
    +
    +
    +
    +

    Secure Hash Algorithm 2 256-bit

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    SHA256,
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + SHA384 + +
    +
    +
    +
    +
    +
    +

    Secure Hash Algorithm 2 384-bit

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    SHA384,
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + SHA512 + +
    +
    +
    +
    +
    +
    +

    Secure Hash Algorithm 2 512-bit

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    SHA512
    + +
    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + + diff --git a/docs/Classes/HMAC.html b/docs/Classes/HMAC.html new file mode 100644 index 0000000..2ab9ad4 --- /dev/null +++ b/docs/Classes/HMAC.html @@ -0,0 +1,380 @@ + + + + HMAC Class Reference + + + + + + + + + +
+
+

Docs (100% documented)

+
+
+
+ +
+
+ +
+
+
+

HMAC

+
+
+
public class HMAC : Updateable
+ +
+
+

Calculates a cryptographic Hash-Based Message Authentication Code (HMAC).

+ +
+
+
+
    +
  • +
    + + + + Algorithm + +
    +
    +
    +
    +
    +
    +

    Enumerates available algorithms.

    + + See more +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public enum Algorithm
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + status + +
    +
    +
    +
    +
    +
    +

    Status of the calculation

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var status : Status = .Success
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + init(algorithm:key:) + +
    +
    +
    +
    +
    +
    +

    Creates a new HMAC instance with the specified algorithm and key.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init(algorithm : Algorithm, key : NSData)
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + +
    + + algorithm + + +
    +

    selects the algorithm

    + +
    +
    + + key + + +
    +

    specifies the key

    + +
    +
    +
    +
    +
    +
  • +
  • +
    + + + + init(algorithm:key:) + +
    +
    +
    +
    +
    +
    +

    Creates a new HMAC instance with the specified algorithm and key.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init(algorithm : Algorithm, key : [UInt8])
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + +
    + + algorithm + + +
    +

    selects the algorithm

    + +
    +
    + + key + + +
    +

    specifies the key

    + +
    +
    +
    +
    +
    +
  • +
  • +
    + + + + update(_:_:) + +
    +
    +
    +
    +
    +
    +

    Updates the calculation of the HMAC with the contents of a buffer.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func update(buffer : UnsafePointer<Void>, _ byteCount : size_t) -> Self?
    + +
    +
    +
    +

    Return Value

    +

    the calculated HMAC

    + +
    +
    +
    +
  • +
  • +
    + + + + final() + +
    +
    +
    +
    +
    +
    +

    Finalizes the HMAC calculation

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func final() -> [UInt8]
    + +
    +
    +
    +

    Return Value

    +

    the calculated HMAC

    + +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + + diff --git a/docs/Classes/HMAC/Algorithm.html b/docs/Classes/HMAC/Algorithm.html new file mode 100644 index 0000000..1aed3fd --- /dev/null +++ b/docs/Classes/HMAC/Algorithm.html @@ -0,0 +1,334 @@ + + + + Algorithm Enum Reference + + + + + + + + + +
+
+

Docs (100% documented)

+
+
+
+ +
+
+ +
+
+
+

Algorithm

+
+
+
public enum Algorithm
+ +
+
+

Enumerates available algorithms.

+ +
+
+
+
    +
  • +
    + + + + MD5 + +
    +
    +
    +
    +
    +
    +

    Message Digest 5

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    case MD5,
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + SHA1 + +
    +
    +
    +
    +
    +
    +

    Secure Hash Algorithm 1

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    SHA1,
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + SHA224 + +
    +
    +
    +
    +
    +
    +

    Secure Hash Algorithm 2 224-bit

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    SHA224,
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + SHA256 + +
    +
    +
    +
    +
    +
    +

    Secure Hash Algorithm 2 256-bit

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    SHA256,
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + SHA384 + +
    +
    +
    +
    +
    +
    +

    Secure Hash Algorithm 2 384-bit

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    SHA384,
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + SHA512 + +
    +
    +
    +
    +
    +
    +

    Secure Hash Algorithm 2 512-bit

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    SHA512
    + +
    +
    +
    +
    +
  • +
+
+
+
    +
  • +
    + + + + digestLength() + +
    +
    +
    +
    +
    +
    +

    Obtains the digest length produced by this algorithm (in bytes).

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func digestLength() -> Int
    + +
    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + + diff --git a/docs/Classes/PBKDF.html b/docs/Classes/PBKDF.html new file mode 100644 index 0000000..bd8f14e --- /dev/null +++ b/docs/Classes/PBKDF.html @@ -0,0 +1,461 @@ + + + + PBKDF Class Reference + + + + + + + + + +
+
+

Docs (100% documented)

+
+
+
+ +
+
+ +
+
+
+

PBKDF

+
+
+
public class PBKDF
+ +
+
+

Derives key material from a password or passphrase.

+ +
+
+
+
    +
  • +
    + + + + PseudoRandomAlgorithm + +
    +
    +
    +
    +
    +
    +

    Enumerates available pseudo random algorithms

    + + See more +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public enum PseudoRandomAlgorithm
    + +
    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Determines the (approximate) number of iterations of the key derivation algorithm that need +to be run to achieve a particular delay (or calculation time).

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public class func calibrate(passwordLength: Int, saltLength: Int, algorithm: PseudoRandomAlgorithm, derivedKeyLength: Int, msec : UInt32) -> UInt
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + + + + + + + + + + + + + +
    + + passwordLength + + +
    +

    password length in bytes

    + +
    +
    + + saltLength + + +
    +

    salt length in bytes

    + +
    +
    + + algorithm + + +
    +

    the PseudoRandomAlgorithm to use

    + +
    +
    + + derivedKeyLength + + +
    +

    the desired key length

    + +
    +
    + + msec + + +
    +

    the desired calculation time

    + +
    +
    +
    +
    +

    Return Value

    +

    the number of times the algorithm should be run

    + +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Derives key material from a password and salt.

    + +

    -parameter password: the password string, will be converted using UTF8 +-parameter salt: the salt string will be converted using UTF8 +-parameter prf: the pseudo random function +-parameter round: the number of rounds +-parameter derivedKeyLength: the length of the desired derived key, in bytes. +-returns: the derived key

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public class func deriveKey(password : String, salt : String, prf: PseudoRandomAlgorithm, rounds: uint, derivedKeyLength: UInt) -> [UInt8]
    + +
    +
    +
    +
    +
  • +
+
+
+ +
    +
  • + +
    +
    +
    +
    +
    +

    Derives key material from a password buffer.

    + +
      +
    • return: the number of times the algorithm should be run
    • +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public class func deriveKey(password: UnsafePointer<Int8>, passwordLen: Int, salt: UnsafePointer<UInt8>, saltLen: Int, prf: PseudoRandomAlgorithm, rounds: uint, derivedKey: UnsafeMutablePointer<UInt8>, derivedKeyLen: Int)
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + password + + +
    +

    pointer to the password buffer

    + +
    +
    + + passwordLength + + +
    +

    password length in bytes

    + +
    +
    + + salt + + +
    +

    pointer to the salt buffer

    + +
    +
    + + saltLength + + +
    +

    salt length in bytes

    + +
    +
    + + prf + + +
    +

    the PseudoRandomAlgorithm to use

    + +
    +
    + + rounds + + +
    +

    the number of rounds of the algorithm to use

    + +
    +
    + + derivedKey + + +
    +

    pointer to the derived key buffer.

    + +
    +
    + + derivedKeyLength + + +
    +

    the desired key length

    + +
    +
    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + + diff --git a/docs/Classes/PBKDF/PseudoRandomAlgorithm.html b/docs/Classes/PBKDF/PseudoRandomAlgorithm.html new file mode 100644 index 0000000..a928c14 --- /dev/null +++ b/docs/Classes/PBKDF/PseudoRandomAlgorithm.html @@ -0,0 +1,292 @@ + + + + PseudoRandomAlgorithm Enum Reference + + + + + + + + + +
+
+

Docs (100% documented)

+
+
+
+ +
+
+ +
+
+
+

PseudoRandomAlgorithm

+
+
+
public enum PseudoRandomAlgorithm
+ +
+
+

Enumerates available pseudo random algorithms

+ +
+
+
+
    +
  • +
    + + + + SHA1 + +
    +
    +
    +
    +
    +
    +

    Secure Hash Algorithm 1

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    case SHA1
    + +
    +
    +
    +
    +
  • +
+
+
+
    +
  • +
    + + + + SHA224 + +
    +
    +
    +
    +
    +
    +

    Secure Hash Algorithm 2 224-bit

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    case SHA224
    + +
    +
    +
    +
    +
  • +
+
+
+
    +
  • +
    + + + + SHA256 + +
    +
    +
    +
    +
    +
    +

    Secure Hash Algorithm 2 256-bit

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    case SHA256
    + +
    +
    +
    +
    +
  • +
+
+
+
    +
  • +
    + + + + SHA384 + +
    +
    +
    +
    +
    +
    +

    Secure Hash Algorithm 2 384-bit

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    case SHA384
    + +
    +
    +
    +
    +
  • +
+
+
+
    +
  • +
    + + + + SHA512 + +
    +
    +
    +
    +
    +
    +

    Secure Hash Algorithm 2 512-bit

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    case SHA512
    + +
    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + + diff --git a/docs/Classes/Random.html b/docs/Classes/Random.html new file mode 100644 index 0000000..50920c1 --- /dev/null +++ b/docs/Classes/Random.html @@ -0,0 +1,298 @@ + + + + Random Class Reference + + + + + + + + + +
+
+

Docs (100% documented)

+
+
+
+ +
+
+ +
+
+
+

Random

+
+
+
public class Random
+ +
+
+

Generates buffers of random bytes.

+ +
+
+
+
    +
  • + +
    +
    +
    +
    +
    +

    Wraps native CCRandomeGenerateBytes call.

    + +

    :note: CCRNGStatus is typealiased to CCStatus but this routine can only return kCCSuccess or kCCRNGFailure

    + +
      +
    • return: .Success or .RNGFailure as appropriate.
    • +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public class func generateBytes(bytes : UnsafeMutablePointer<Void>, byteCount : Int ) -> RNGStatus
    + +
    +
    +
    +

    Parameters

    + + + + + + + +
    + + bytes + + +
    +

    a pointer to the buffer that will receive the bytes

    + +
    +
    +
    +
    +
    +
  • +
  • +
    + + + + generateBytes(_:) + +
    +
    +
    +
    +
    +
    +

    Generates an array of random bytes.

    + +
      +
    • return: an array of random bytes
    • +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public class func generateBytes(byteCount : Int ) throws -> [UInt8]
    + +
    +
    +
    +

    Parameters

    + + + + + + + +
    + + bytesCount + + +
    +

    number of random bytes to generate

    + +
    +
    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    A version of generateBytes that always throws an error.

    + +

    Use it to test that code handles this.

    + +
      +
    • return: an array of random bytes
    • +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public class func generateBytesThrow(byteCount : Int ) throws -> [UInt8]
    + +
    +
    +
    +

    Parameters

    + + + + + + + +
    + + bytesCount + + +
    +

    number of random bytes to generate

    + +
    +
    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + + diff --git a/docs/Classes/StreamCryptor.html b/docs/Classes/StreamCryptor.html new file mode 100644 index 0000000..8a36c0a --- /dev/null +++ b/docs/Classes/StreamCryptor.html @@ -0,0 +1,1047 @@ + + + + StreamCryptor Class Reference + + + + + + + + + +
+
+

Docs (100% documented)

+
+
+
+ +
+
+ +
+
+
+

StreamCryptor

+
+
+
public class StreamCryptor
+ +
+
+

Encrypts or decrypts return results as they become available.

+ +

Use for large files or network streams.

+ +

For small, in-memory buffers Cryptor may be easier to use.

+ +
+
+
+
    +
  • +
    + + + + Operation + +
    +
    +
    +
    +
    +
    +

    Enumerates Cryptor operations

    + + See more +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public enum Operation
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + Algorithm + +
    +
    +
    +
    +
    +
    +

    Enumerates available algorithms

    + + See more +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public enum Algorithm
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + Options + +
    +
    +
    +
    +
    +
    +

    Maps CommonCryptoOptions onto a Swift struct.

    + + See more +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public struct Options : OptionSetType, BooleanType
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + status + +
    +
    +
    +
    +
    +
    +

    The status code resulting from the last method call to this Cryptor. +Used to get additional information when optional chaining collapes.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var status : Status = .Success
    + +
    +
    +
    +
    +
  • +
+
+
+ +
    +
  • + +
    +
    +
    +
    +
    +

    Creates a new StreamCryptor

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public convenience init(operation: Operation, algorithm: Algorithm, options: Options, key: [UInt8],
    +        iv : [UInt8])
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + + + + + + + + + +
    + + operation + + +
    +

    the operation to perform see Operation (Encrypt, Decrypt)

    + +
    +
    + + algorithm + + +
    +

    the algorithm to use see Algorithm (AES, DES, TripleDES, CAST, RC2, Blowfish)

    + +
    +
    + + key + + +
    +

    a byte array containing key data

    + +
    +
    + + iv + + +
    +

    a byte array containing initialization vector

    + +
    +
    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Creates a new StreamCryptor

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public convenience init(operation: Operation, algorithm: Algorithm, options: Options, key: String,
    +        iv : String)
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + + + + + + + + + +
    + + operation + + +
    +

    the operation to perform see Operation (Encrypt, Decrypt)

    + +
    +
    + + algorithm + + +
    +

    the algorithm to use see Algorithm (AES, DES, TripleDES, CAST, RC2, Blowfish)

    + +
    +
    + + key + + +
    +

    a string containing key data (will be interpreted as UTF8)

    + +
    +
    + + iv + + +
    +

    a string containing initialization vector data (will be interpreted as UTF8)

    + +
    +
    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Add the contents of an Objective-C NSData buffer to the current encryption/decryption operation.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func update(dataIn: NSData, inout byteArrayOut: [UInt8]) -> (Int, Status)
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + +
    + + dataIn + + +
    +

    the input data

    + +
    +
    + + byteArrayOut + + +
    +

    output data

    + +
    +
    +
    +
    +

    Return Value

    +

    a tuple containing the number of output bytes produced and the status (see Status)

    + +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Add the contents of a Swift byte array to the current encryption/decryption operation.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func update(byteArrayIn: [UInt8], inout byteArrayOut: [UInt8]) -> (Int, Status)
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + +
    + + byteArrayIn + + +
    +

    the input data

    + +
    +
    + + byteArrayOut + + +
    +

    output data

    + +
    +
    +
    +
    +

    Return Value

    +

    a tuple containing the number of output bytes produced and the status (see Status)

    + +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Add the contents of a string (interpreted as UTF8) to the current encryption/decryption operation.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func update(stringIn: String, inout byteArrayOut: [UInt8]) -> (Int, Status)
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + +
    + + byteArrayIn + + +
    +

    the input data

    + +
    +
    + + byteArrayOut + + +
    +

    output data

    + +
    +
    +
    +
    +

    Return Value

    +

    a tuple containing the number of output bytes produced and the status (see Status)

    + +
    +
    +
    +
  • +
  • +
    + + + + final(_:) + +
    +
    +
    +
    +
    +
    +

    Retrieves all remaining encrypted or decrypted data from this cryptor.

    + +

    :note: If the underlying algorithm is an block cipher and the padding option has +not been specified and the cumulative input to the cryptor has not been an integral +multiple of the block length this will fail with an alignment error.

    + +

    :note: This method updates the status property

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func final(inout byteArrayOut: [UInt8]) -> (Int, Status)
    + +
    +
    +
    +

    Parameters

    + + + + + + + +
    + + byteArrayOut + + +
    +

    the output bffer

    + +
    +
    +
    +
    +

    Return Value

    +

    a tuple containing the number of output bytes produced and the status (see Status)

    + +
    +
    +
    +
  • +
+
+
+ +
    +
  • + +
    +
    +
    +
    +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init(operation: Operation, algorithm: Algorithm, options: Options, keyBuffer: UnsafePointer<Void>,
    +        keyByteCount: Int, ivBuffer: UnsafePointer<Void>)
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + + + + + + + + + + + + + +
    + + operation + + +
    +

    the operation to perform see Operation (Encrypt, Decrypt)

    + +
    +
    + + algorithm + + +
    +

    the algorithm to use see Algorithm (AES, DES, TripleDES, CAST, RC2, Blowfish)

    + +
    +
    + + keyBuffer + + +
    +

    pointer to key buffer

    + +
    +
    + + keyByteCount + + +
    +

    number of bytes in the key

    + +
    +
    + + ivBuffer + + +
    +

    initialization vector buffer

    + +
    +
    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func update(bufferIn: UnsafePointer<Void>, byteCountIn: Int, bufferOut: UnsafeMutablePointer<Void>, byteCapacityOut : Int, inout byteCountOut : Int) -> Status
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + + + + + + + + + + + + + +
    + + bufferIn + + +
    +

    pointer to input buffer

    + +
    +
    + + inByteCount + + +
    +

    number of bytes contained in input buffer

    + +
    +
    + + bufferOut + + +
    +

    pointer to output buffer

    + +
    +
    + + outByteCapacity + + +
    +

    capacity of the output buffer in bytes

    + +
    +
    + + outByteCount + + +
    +

    on successful completion, the number of bytes written to the output buffer

    + +
    +
    +
    +
    +

    Return Value

    + +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Retrieves all remaining encrypted or decrypted data from this cryptor.

    + +

    :note: If the underlying algorithm is an block cipher and the padding option has +not been specified and the cumulative input to the cryptor has not been an integral +multiple of the block length this will fail with an alignment error.

    + +

    :note: This method updates the status property

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func final(bufferOut: UnsafeMutablePointer<Void>, byteCapacityOut : Int, inout byteCountOut : Int) -> Status
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + + + + + +
    + + bufferOut + + +
    +

    pointer to output buffer

    + +
    +
    + + outByteCapacity + + +
    +

    capacity of the output buffer in bytes

    + +
    +
    + + outByteCount + + +
    +

    on successful completion, the number of bytes written to the output buffer

    + +
    +
    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Determines the number of bytes that wil be output by this Cryptor if inputBytes of additional +data is input.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func getOutputLength(inputByteCount : Int, isFinal : Bool = false) -> Int
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + +
    + + inputByteCount + + +
    +

    number of bytes that will be input.

    + +
    +
    + + isFinal + + +
    +

    true if buffer to be input will be the last input buffer, false otherwise.

    + +
    +
    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + + diff --git a/docs/Classes/StreamCryptor/Algorithm.html b/docs/Classes/StreamCryptor/Algorithm.html new file mode 100644 index 0000000..97b9cdb --- /dev/null +++ b/docs/Classes/StreamCryptor/Algorithm.html @@ -0,0 +1,334 @@ + + + + Algorithm Enum Reference + + + + + + + + + +
+
+

Docs (100% documented)

+
+
+
+ +
+
+ +
+
+
+

Algorithm

+
+
+
public enum Algorithm
+ +
+
+

Enumerates available algorithms

+ +
+
+
+
    +
  • +
    + + + + AES + +
    +
    +
    +
    +
    +
    +

    Advanced Encryption Standard

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    case AES,
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + DES + +
    +
    +
    +
    +
    +
    +

    Data Encryption Standard

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    DES,
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + TripleDES + +
    +
    +
    +
    +
    +
    +

    Triple DES

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    TripleDES,
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + CAST + +
    +
    +
    +
    +
    +
    +

    CAST

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    CAST,
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + RC2 + +
    +
    +
    +
    +
    +
    +

    RC2

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    RC2,
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + Blowfish + +
    +
    +
    +
    +
    +
    +

    Blowfish

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    Blowfish
    + +
    +
    +
    +
    +
  • +
+
+
+
    +
  • +
    + + + + blockSize() + +
    +
    +
    +
    +
    +
    +

    Blocksize, in bytes, of algorithm.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func blockSize() -> Int
    + +
    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + + diff --git a/docs/Classes/StreamCryptor/Operation.html b/docs/Classes/StreamCryptor/Operation.html new file mode 100644 index 0000000..9e5a071 --- /dev/null +++ b/docs/Classes/StreamCryptor/Operation.html @@ -0,0 +1,195 @@ + + + + Operation Enum Reference + + + + + + + + + +
+
+

Docs (100% documented)

+
+
+
+ +
+
+ +
+
+
+

Operation

+
+
+
public enum Operation
+ +
+
+

Enumerates Cryptor operations

+ +
+
+
+
    +
  • +
    + + + + Encrypt + +
    +
    +
    +
    +
    +
    +

    Encrypting

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    case Encrypt,
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + Decrypt + +
    +
    +
    +
    +
    +
    +

    Decrypting

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    Decrypt
    + +
    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + + diff --git a/docs/Classes/StreamCryptor/Options.html b/docs/Classes/StreamCryptor/Options.html new file mode 100644 index 0000000..ff11677 --- /dev/null +++ b/docs/Classes/StreamCryptor/Options.html @@ -0,0 +1,492 @@ + + + + Options Struct Reference + + + + + + + + + +
+
+

Docs (100% documented)

+
+
+
+ +
+
+ +
+
+
+

Options

+
+
+
public struct Options : OptionSetType, BooleanType
+ +
+
+

Maps CommonCryptoOptions onto a Swift struct.

+ +
+
+
+
    +
  • +
    + + + + rawValue + +
    +
    +
    +
    +
    +
    +

    Convert to native raw value

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var rawValue : UInt { return self.value }
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + init(_:) + +
    +
    +
    +
    +
    +
    +

    Initialize from a raw value

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init(_ rawValue: UInt)
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + init(rawValue:) + +
    +
    +
    +
    +
    +
    +

    Convert from a native value (i.e. 0, kCCOptionPKCS7Padding, kCCOptionECBMode)

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init(rawValue: UInt)
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + init(nilLiteral:) + +
    +
    +
    +
    +
    +
    +

    Initialize from a nil literal

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init(nilLiteral: ())
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + fromMask(_:) + +
    +
    +
    +
    +
    +
    +

    Create from a mask

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public static func fromMask(raw: UInt) -> Options
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + fromRaw(_:) + +
    +
    +
    +
    +
    +
    +

    Convert from native raw value.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public static func fromRaw(raw: UInt) -> Options?
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + toRaw() + +
    +
    +
    +
    +
    +
    +

    Convert to native raw value.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func toRaw() -> UInt
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + boolValue + +
    +
    +
    +
    +
    +
    +

    Convert to boolean value.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var boolValue: Bool
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + allZeros + +
    +
    +
    +
    +
    +
    +

    Initialize to value appropriate for all zeros of a mask.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public static var allZeros: Options
    + +
    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    nil is consider the same a zero or None.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public static func convertFromNilLiteral() -> Options
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + None + +
    +
    +
    +
    +
    +
    +

    No options

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public static var None: Options           { return self.init(0) }
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + PKCS7Padding + +
    +
    +
    +
    +
    +
    +

    Use padding. Needed unless the input is a integral number of blocks long.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public static var PKCS7Padding: Options    { return self.init(UInt(kCCOptionPKCS7Padding)) }
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + ECBMode + +
    +
    +
    +
    +
    +
    +

    Electronic Code Book Mode. Don’t use this.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public static var ECBMode: Options      { return self.init(UInt(kCCOptionECBMode)) }
    + +
    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + + diff --git a/docs/Enums.html b/docs/Enums.html new file mode 100644 index 0000000..fdb43a6 --- /dev/null +++ b/docs/Enums.html @@ -0,0 +1,162 @@ + + + + Enums Reference + + + + + + + + +
+
+

Docs (100% documented)

+
+
+
+ +
+
+ +
+
+
+

Enums

+

The following enums are available globally.

+ +
+
+
+
    +
  • +
    + + + + Status + +
    +
    +
    +
    +
    +
    +

    Links the native CommonCryptoStatus enumeration to Swiftier versions.

    + + See more +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public enum Status : CCCryptorStatus, CustomStringConvertible, ErrorType
    + +
    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + + diff --git a/docs/Enums/Status.html b/docs/Enums/Status.html new file mode 100644 index 0000000..eff99bf --- /dev/null +++ b/docs/Enums/Status.html @@ -0,0 +1,469 @@ + + + + Status Enum Reference + + + + + + + + + +
+
+

Docs (100% documented)

+
+
+
+ +
+
+ +
+
+
+

Status

+
+
+
public enum Status : CCCryptorStatus, CustomStringConvertible, ErrorType
+ +
+
+

Links the native CommonCryptoStatus enumeration to Swiftier versions.

+ +
+
+
+
    +
  • +
    + + + + Success + +
    +
    +
    +
    +
    +
    +

    Successful

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    case Success,
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + ParamError + +
    +
    +
    +
    +
    +
    +

    Parameter Error

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    ParamError,
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + BufferTooSmall + +
    +
    +
    +
    +
    +
    +

    Buffer too Small

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    BufferTooSmall,
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + MemoryFailure + +
    +
    +
    +
    +
    +
    +

    Memory Failure

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    MemoryFailure,
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + AlignmentError + +
    +
    +
    +
    +
    +
    +

    Alignment Error

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    AlignmentError,
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + DecodeError + +
    +
    +
    +
    +
    +
    +

    Decode Error

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    DecodeError,
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + Unimplemented + +
    +
    +
    +
    +
    +
    +

    Unimplemented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    Unimplemented,
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + Overflow + +
    +
    +
    +
    +
    +
    +

    Overflow

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    Overflow,
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + RNGFailure + +
    +
    +
    +
    +
    +
    +

    Random Number Generator Err

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    RNGFailure
    + +
    +
    +
    +
    +
  • +
+
+
+
    +
  • +
    + + + + toRaw() + +
    +
    +
    +
    +
    +
    +

    Converts this value to a native CCCryptorStatus value.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func toRaw() -> CCCryptorStatus
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + description + +
    +
    +
    +
    +
    +
    +

    Obtain human-readable string from enum value.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var description : String
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + fromRaw(_:) + +
    +
    +
    +
    +
    +
    +

    Create enum value from raw CCCryptorStatus value.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public static func fromRaw(status : CCCryptorStatus) -> Status?
    + +
    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + + diff --git a/docs/Extensions.html b/docs/Extensions.html new file mode 100644 index 0000000..8ece998 --- /dev/null +++ b/docs/Extensions.html @@ -0,0 +1,249 @@ + + + + Extensions Reference + + + + + + + + +
+
+

Docs (100% documented)

+
+
+
+ +
+
+ +
+
+
+

Extensions

+

The following extensions are available globally.

+ +
+
+
+
    +
  • +
    + + + + CryptoDigest + +
    +
    +
    +
    +
    +
    +

    Implements a simplified API for calculating digests over single buffers

    + + See more +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public protocol CryptoDigest
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + NSData + +
    +
    +
    +
    +
    +
    + + See more +
    +
    +

    Declaration

    +
    +

    Swift

    +
    @interface NSData : NSObject <NSCopying, NSMutableCopying, NSSecureCoding>
    +@end
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + String + +
    +
    +
    +
    +
    +
    + + See more +
    +
    +

    Declaration

    +
    +

    Swift

    +
    struct String
    + +
    +
    +
    +
    +
  • +
+
+
+
    +
  • +
    + + + + Updateable + +
    +
    +
    +
    +
    +
    +

    A protocol for calculations that can be updated with incremental data buffers.

    + + See more +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public protocol Updateable
    + +
    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + + diff --git a/docs/Extensions/CryptoDigest.html b/docs/Extensions/CryptoDigest.html new file mode 100644 index 0000000..37a0c79 --- /dev/null +++ b/docs/Extensions/CryptoDigest.html @@ -0,0 +1,357 @@ + + + + CryptoDigest Extension Reference + + + + + + + + + +
+
+

Docs (100% documented)

+
+
+
+ +
+
+ +
+
+
+

CryptoDigest

+
+
+
public protocol CryptoDigest
+ +
+
+

Implements a simplified API for calculating digests over single buffers

+ +
+
+
+
    +
  • +
    + + + + MD2 + +
    +
    +
    +
    +
    +
    +

    An MD2 digest of this object

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var MD2: Self { return self.digest(.MD2) }
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + MD4 + +
    +
    +
    +
    +
    +
    +

    An MD4 digest of this object

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var MD4: Self { return self.digest(.MD4) }
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + MD5 + +
    +
    +
    +
    +
    +
    +

    An MD5 digest of this object

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var MD5: Self { return self.digest(.MD5) }
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + SHA1 + +
    +
    +
    +
    +
    +
    +

    An SHA1 digest of this object

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var SHA1: Self { return self.digest(.SHA1) }
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + SHA224 + +
    +
    +
    +
    +
    +
    +

    An SHA224 digest of this object

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var SHA224: Self { return self.digest(.SHA224) }
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + SHA256 + +
    +
    +
    +
    +
    +
    +

    An SHA256 digest of this object

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var SHA256: Self { return self.digest(.SHA256) }
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + SHA384 + +
    +
    +
    +
    +
    +
    +

    An SHA384 digest of this object

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var SHA384: Self { return self.digest(.SHA384) }
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + SHA512 + +
    +
    +
    +
    +
    +
    +

    An SHA512 digest of this object

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var SHA512: Self { return self.digest(.SHA512) }
    + +
    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + + diff --git a/docs/Extensions/NSData.html b/docs/Extensions/NSData.html new file mode 100644 index 0000000..60d887d --- /dev/null +++ b/docs/Extensions/NSData.html @@ -0,0 +1,193 @@ + + + + NSData Extension Reference + + + + + + + + + +
+
+

Docs (100% documented)

+
+
+
+ +
+
+ +
+
+
+

NSData

+
+
+
@interface NSData : NSObject <NSCopying, NSMutableCopying, NSSecureCoding>
+@end
+ +
+
+ +
+
+
+
    +
  • +
    + + + + digest(_:) + +
    +
    +
    +
    +
    +
    +

    Calculates the Message Digest for this data.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func digest(algorithm : Digest.Algorithm) -> Self
    + +
    +
    +
    +

    Parameters

    + + + + + + + +
    + + algorithm + + +
    +

    the digest algorithm to use

    + +
    +
    +
    +
    +

    Return Value

    +

    an NSData object containing the message digest

    + +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + + diff --git a/docs/Extensions/String.html b/docs/Extensions/String.html new file mode 100644 index 0000000..458f2fb --- /dev/null +++ b/docs/Extensions/String.html @@ -0,0 +1,193 @@ + + + + String Extension Reference + + + + + + + + + +
+
+

Docs (100% documented)

+
+
+
+ +
+
+ +
+
+
+

String

+
+
+
struct String
+ +
+
+ +
+
+
+
    +
  • +
    + + + + digest(_:) + +
    +
    +
    +
    +
    +
    +

    Calculates the Message Digest for this string. +The string is converted to raw data using UTF8.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func digest(algorithm : Digest.Algorithm) -> String
    + +
    +
    +
    +

    Parameters

    + + + + + + + +
    + + algorithm + + +
    +

    the digest algorithm to use

    + +
    +
    +
    +
    +

    Return Value

    +

    a hex string of the calculated digest

    + +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + + diff --git a/docs/Extensions/Updateable.html b/docs/Extensions/Updateable.html new file mode 100644 index 0000000..547433e --- /dev/null +++ b/docs/Extensions/Updateable.html @@ -0,0 +1,235 @@ + + + + Updateable Extension Reference + + + + + + + + + +
+
+

Docs (100% documented)

+
+
+
+ +
+
+ +
+
+
+

Updateable

+
+
+
public protocol Updateable
+ +
+
+

A protocol for calculations that can be updated with incremental data buffers.

+ +
+
+
+
    +
  • +
    + + + + update(_:) + +
    +
    +
    +
    +
    +
    +

    Updates the current calculation with data contained in an NSData object.

    + +
      +
    • parameters data: the data buffer
    • +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func update(data: NSData) -> Self?
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + update(_:) + +
    +
    +
    +
    +
    +
    +

    Updates the current calculation with data contained in a Swift array.

    + +
      +
    • parameters byteArray: the Swift array
    • +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func update(byteArray : [UInt8]) -> Self?
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + update(_:) + +
    +
    +
    +
    +
    +
    +

    Updates the current calculation with data contained in a Swift string. +The corresponding data will be generated using UTF8 encoding.

    + +
      +
    • parameters string: the Swift string
    • +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func update(string: String) -> Self?
    + +
    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + + diff --git a/docs/Functions.html b/docs/Functions.html new file mode 100644 index 0000000..b806b6e --- /dev/null +++ b/docs/Functions.html @@ -0,0 +1,473 @@ + + + + Functions Reference + + + + + + + + +
+
+

Docs (100% documented)

+
+
+
+ +
+
+ +
+
+
+

Functions

+

The following functions are available globally.

+ +
+
+
+
    +
  • + +
    +
    +
    +
    +
    +

    Converts a string of hexadecimal digits to a Swift array.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func arrayFromHexString(s : String) -> [UInt8]
    + +
    +
    +
    +

    Parameters

    + + + + + + + +
    + + s + + +
    +

    the hex string (must contain an even number of digits)

    + +
    +
    +
    +
    +

    Return Value

    +

    a Swift array

    + +
    +
    +
    +
  • +
  • +
    + + + + dataFromHexString(_:) + +
    +
    +
    +
    +
    +
    +

    Converts a string of hexadecimal digits to an NSData object.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func dataFromHexString(s : String) -> NSData
    + +
    +
    +
    +

    Parameters

    + + + + + + + +
    + + s + + +
    +

    the hex string (must contain an even number of digits)

    + +
    +
    +
    +
    +

    Return Value

    +

    an NSData object

    + +
    +
    +
    +
  • +
  • +
    + + + + dataFromByteArray(_:) + +
    +
    +
    +
    +
    +
    +

    Converts a Swift array to an NSData object.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func dataFromByteArray(a : [UInt8]) -> NSData
    + +
    +
    +
    +

    Parameters

    + + + + + + + +
    + + a + + +
    +

    the Swift array

    + +
    +
    +
    +
    +

    Return Value

    +

    an NSData object

    + +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Converts a Swift array to a string of hexadecimal digits.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func hexStringFromArray(a : [UInt8], uppercase : Bool = false) -> String
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + +
    + + a + + +
    +

    the Swift array

    + +
    +
    + + uppercase + + +
    +

    if true use uppercase for letter digits, lowercase otherwise

    + +
    +
    +
    +
    +

    Return Value

    +

    a Swift string

    + +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Converts a Swift array to an NSString object.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func hexNSStringFromArray(a : [UInt8], uppercase : Bool = false) -> NSString
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + +
    + + a + + +
    +

    the Swift array

    + +
    +
    + + uppercase + + +
    +

    if true use uppercase for letter digits, lowercase otherwise

    + +
    +
    +
    +
    +

    Return Value

    +

    an NSString object

    + +
    +
    +
    +
  • +
  • +
    + + + + hexListFromArray(_:) + +
    +
    +
    +
    +
    +
    +

    Converts a Swift array to a Swift String containing a comma separated list of bytes. +This is used to generate test data programmatically.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func hexListFromArray(a : [UInt8]) -> String
    + +
    +
    +
    +

    Parameters

    + + + + + + + +
    + + a + + +
    +

    the Swift array

    + +
    +
    +
    +
    +

    Return Value

    +

    a Swift string

    + +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + + diff --git a/docs/Protocols.html b/docs/Protocols.html new file mode 100644 index 0000000..5af568c --- /dev/null +++ b/docs/Protocols.html @@ -0,0 +1,194 @@ + + + + Protocols Reference + + + + + + + + +
+
+

Docs (100% documented)

+
+
+
+ +
+
+ +
+
+
+

Protocols

+

The following protocols are available globally.

+ +
+
+
+
    +
  • +
    + + + + CryptoDigest + +
    +
    +
    +
    +
    +
    +

    Implements a simplified API for calculating digests over single buffers

    + + See more +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public protocol CryptoDigest
    + +
    +
    +
    +
    +
  • +
+
+
+
    +
  • +
    + + + + Updateable + +
    +
    +
    +
    +
    +
    +

    A protocol for calculations that can be updated with incremental data buffers.

    + + See more +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public protocol Updateable
    + +
    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + + diff --git a/docs/Protocols/CryptoDigest.html b/docs/Protocols/CryptoDigest.html new file mode 100644 index 0000000..7932894 --- /dev/null +++ b/docs/Protocols/CryptoDigest.html @@ -0,0 +1,168 @@ + + + + CryptoDigest Protocol Reference + + + + + + + + + +
+
+

Docs (100% documented)

+
+
+
+ +
+
+ +
+
+
+

CryptoDigest

+
+
+
public protocol CryptoDigest
+ +
+
+

Implements a simplified API for calculating digests over single buffers

+ +
+
+
+
    +
  • +
    + + + + digest(_:) + +
    +
    +
    +
    +
    +
    +

    Calculates a message digest

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    func digest(algorithm : Digest.Algorithm) -> Self
    + +
    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + + diff --git a/docs/Protocols/Updateable.html b/docs/Protocols/Updateable.html new file mode 100644 index 0000000..41ab0e9 --- /dev/null +++ b/docs/Protocols/Updateable.html @@ -0,0 +1,237 @@ + + + + Updateable Protocol Reference + + + + + + + + + +
+
+

Docs (100% documented)

+
+
+
+ +
+
+ +
+
+
+

Updateable

+
+
+
public protocol Updateable
+ +
+
+

A protocol for calculations that can be updated with incremental data buffers.

+ +
+
+
+
    +
  • +
    + + + + status + +
    +
    +
    +
    +
    +
    +

    Status of the calculation.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    var status : Status { get }
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + update(_:_:) + +
    +
    +
    +
    +
    +
    +

    Low-level update routine. +Updates the calculation with the contents of a data buffer. +- parameter buffer: pointer to the data buffer +- parameter byteCount: length of the buffer in bytes +- returns: self if no error for optional chaining, null otherwise

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    func update(buffer : UnsafePointer<Void>, _ byteCount : size_t) -> Self?
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + +
    + + buffer + + +
    +

    pointer to the data buffer

    + +
    +
    + + byteCount + + +
    +

    length of the buffer in bytes

    + +
    +
    +
    +
    +

    Return Value

    +

    self if no error for optional chaining, null otherwise

    + +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + + diff --git a/docs/css/highlight.css b/docs/css/highlight.css new file mode 100644 index 0000000..18c292e --- /dev/null +++ b/docs/css/highlight.css @@ -0,0 +1,202 @@ +/* Credit to https://gist.github.com/wataru420/2048287 */ +.highlight { + /* Comment */ + /* Error */ + /* Keyword */ + /* Operator */ + /* Comment.Multiline */ + /* Comment.Preproc */ + /* Comment.Single */ + /* Comment.Special */ + /* Generic.Deleted */ + /* Generic.Deleted.Specific */ + /* Generic.Emph */ + /* Generic.Error */ + /* Generic.Heading */ + /* Generic.Inserted */ + /* Generic.Inserted.Specific */ + /* Generic.Output */ + /* Generic.Prompt */ + /* Generic.Strong */ + /* Generic.Subheading */ + /* Generic.Traceback */ + /* Keyword.Constant */ + /* Keyword.Declaration */ + /* Keyword.Pseudo */ + /* Keyword.Reserved */ + /* Keyword.Type */ + /* Literal.Number */ + /* Literal.String */ + /* Name.Attribute */ + /* Name.Builtin */ + /* Name.Class */ + /* Name.Constant */ + /* Name.Entity */ + /* Name.Exception */ + /* Name.Function */ + /* Name.Namespace */ + /* Name.Tag */ + /* Name.Variable */ + /* Operator.Word */ + /* Text.Whitespace */ + /* Literal.Number.Float */ + /* Literal.Number.Hex */ + /* Literal.Number.Integer */ + /* Literal.Number.Oct */ + /* Literal.String.Backtick */ + /* Literal.String.Char */ + /* Literal.String.Doc */ + /* Literal.String.Double */ + /* Literal.String.Escape */ + /* Literal.String.Heredoc */ + /* Literal.String.Interpol */ + /* Literal.String.Other */ + /* Literal.String.Regex */ + /* Literal.String.Single */ + /* Literal.String.Symbol */ + /* Name.Builtin.Pseudo */ + /* Name.Variable.Class */ + /* Name.Variable.Global */ + /* Name.Variable.Instance */ + /* Literal.Number.Integer.Long */ } + .highlight .c { + color: #999988; + font-style: italic; } + .highlight .err { + color: #a61717; + background-color: #e3d2d2; } + .highlight .k { + color: #000000; + font-weight: bold; } + .highlight .o { + color: #000000; + font-weight: bold; } + .highlight .cm { + color: #999988; + font-style: italic; } + .highlight .cp { + color: #999999; + font-weight: bold; } + .highlight .c1 { + color: #999988; + font-style: italic; } + .highlight .cs { + color: #999999; + font-weight: bold; + font-style: italic; } + .highlight .gd { + color: #000000; + background-color: #ffdddd; } + .highlight .gd .x { + color: #000000; + background-color: #ffaaaa; } + .highlight .ge { + color: #000000; + font-style: italic; } + .highlight .gr { + color: #aa0000; } + .highlight .gh { + color: #999999; } + .highlight .gi { + color: #000000; + background-color: #ddffdd; } + .highlight .gi .x { + color: #000000; + background-color: #aaffaa; } + .highlight .go { + color: #888888; } + .highlight .gp { + color: #555555; } + .highlight .gs { + font-weight: bold; } + .highlight .gu { + color: #aaaaaa; } + .highlight .gt { + color: #aa0000; } + .highlight .kc { + color: #000000; + font-weight: bold; } + .highlight .kd { + color: #000000; + font-weight: bold; } + .highlight .kp { + color: #000000; + font-weight: bold; } + .highlight .kr { + color: #000000; + font-weight: bold; } + .highlight .kt { + color: #445588; + font-weight: bold; } + .highlight .m { + color: #009999; } + .highlight .s { + color: #d14; } + .highlight .na { + color: #008080; } + .highlight .nb { + color: #0086B3; } + .highlight .nc { + color: #445588; + font-weight: bold; } + .highlight .no { + color: #008080; } + .highlight .ni { + color: #800080; } + .highlight .ne { + color: #990000; + font-weight: bold; } + .highlight .nf { + color: #990000; + font-weight: bold; } + .highlight .nn { + color: #555555; } + .highlight .nt { + color: #000080; } + .highlight .nv { + color: #008080; } + .highlight .ow { + color: #000000; + font-weight: bold; } + .highlight .w { + color: #bbbbbb; } + .highlight .mf { + color: #009999; } + .highlight .mh { + color: #009999; } + .highlight .mi { + color: #009999; } + .highlight .mo { + color: #009999; } + .highlight .sb { + color: #d14; } + .highlight .sc { + color: #d14; } + .highlight .sd { + color: #d14; } + .highlight .s2 { + color: #d14; } + .highlight .se { + color: #d14; } + .highlight .sh { + color: #d14; } + .highlight .si { + color: #d14; } + .highlight .sx { + color: #d14; } + .highlight .sr { + color: #009926; } + .highlight .s1 { + color: #d14; } + .highlight .ss { + color: #990073; } + .highlight .bp { + color: #999999; } + .highlight .vc { + color: #008080; } + .highlight .vg { + color: #008080; } + .highlight .vi { + color: #008080; } + .highlight .il { + color: #009999; } diff --git a/docs/css/jazzy.css b/docs/css/jazzy.css new file mode 100644 index 0000000..a42da72 --- /dev/null +++ b/docs/css/jazzy.css @@ -0,0 +1,302 @@ +html, body, div, span, h1, h3, h4, p, a, code, em, img, ul, li, table, tbody, tr, td { + background: transparent; + border: 0; + margin: 0; + outline: 0; + padding: 0; + vertical-align: baseline; } + +body { + background-color: #f2f2f2; + font-family: Helvetica, freesans, Arial, sans-serif; + font-size: 14px; + -webkit-font-smoothing: subpixel-antialiased; + word-wrap: break-word; } + +h1, h2, h3, h4, h5, h6 { + margin-top: 0.8em; + margin-bottom: 0.3em; + font-weight: 100; + color: black; } + +h1 { + font-size: 2.5em; } + +h2 { + font-size: 2em; + border-bottom: 1px solid #e2e2e2; } + +h3 { + font-size: 1.5em; } + +h4 { + font-size: 1.25em; } + +h5 { + font-size: 1.1em; } + +h6 { + font-size: 1.1em; + color: #777; } + +pre, code { + font: 0.95em Menlo, monospace; + color: #777; + word-wrap: normal; } + +p code, li code { + background-color: #eee; + padding: 2px 4px; + border-radius: 4px; } + +a { + color: #0088cc; + text-decoration: none; } + +ul { + padding-left: 15px; } + +li { + line-height: 1.8em; } + +img { + max-width: 100%; } + +blockquote { + margin-left: 0; + padding: 0 10px; + border-left: 4px solid #ccc; } + +.content-wrapper { + margin: 0 auto; + width: 980px; } + +header { + font-size: 0.85em; + line-height: 26px; + background-color: #414141; + position: fixed; + width: 100%; + z-index: 1; } + header img { + padding-right: 6px; + vertical-align: -4px; + height: 16px; } + header a { + color: #fff; } + header p { + float: left; + color: #999; } + header .header-right { + float: right; + margin-left: 16px; } + +#breadcrumbs { + background-color: #f2f2f2; + height: 27px; + padding-top: 17px; + position: fixed; + width: 100%; + z-index: 1; + margin-top: 26px; } + #breadcrumbs #carat { + height: 10px; + margin: 0 5px; } + +.sidebar { + background-color: #f9f9f9; + border: 1px solid #e2e2e2; + overflow-y: auto; + overflow-x: hidden; + position: fixed; + top: 70px; + bottom: 0; + width: 230px; + word-wrap: normal; } + +.nav-groups { + list-style-type: none; + background: #fff; + padding-left: 0; } + +.nav-group-name { + border-bottom: 1px solid #e2e2e2; + font-size: 1.1em; + font-weight: 100; + padding: 15px 0 15px 20px; } + .nav-group-name > a { + color: #333; } + +.nav-group-tasks { + margin-top: 5px; } + +.nav-group-task { + font-size: 0.9em; + list-style-type: none; } + .nav-group-task a { + color: #888; } + +.main-content { + background-color: #fff; + border: 1px solid #e2e2e2; + margin-left: 246px; + position: absolute; + overflow: hidden; + padding-bottom: 60px; + top: 70px; + width: 734px; } + .main-content p, .main-content a, .main-content code, .main-content em, .main-content ul, .main-content table, .main-content blockquote { + margin-bottom: 1em; } + .main-content p { + line-height: 1.8em; } + .main-content section .section:first-child { + margin-top: 0; + padding-top: 0; } + .main-content section .task-group-section .task-group:first-of-type { + padding-top: 10px; } + .main-content section .task-group-section .task-group:first-of-type .section-name { + padding-top: 15px; } + +.section { + padding: 0 25px; } + +.highlight { + background-color: #eee; + padding: 10px 12px; + border: 1px solid #e2e2e2; + border-radius: 4px; + overflow-x: auto; } + +.aside-title { + font-size: 9px; + letter-spacing: 2px; + text-transform: uppercase; + padding-bottom: 0; } + +.declaration .highlight { + overflow-x: initial; + padding: 0 40px 40px 0; + margin-bottom: -25px; + background-color: transparent; + border: none; } + +.section-name { + margin: 0; + margin-left: 18px; } + +.task-group-section { + padding-left: 6px; + border-top: 1px solid #e2e2e2; } + +.task-group { + padding-top: 0px; } + +.item { + padding-top: 8px; + width: 100%; + list-style-type: none; } + .item a[name]:before { + content: ""; + display: block; + padding-top: 70px; + margin: -70px 0 0; } + .item code { + background-color: transparent; + padding: 0; } + .item .token { + padding-left: 3px; + margin-left: 15px; } + +.pointer-container { + border-bottom: 1px solid #e2e2e2; + left: -23px; + padding-bottom: 13px; + position: relative; + width: 110%; } + +.pointer { + background: #f9f9f9; + border-left: 1px solid #e2e2e2; + border-top: 1px solid #e2e2e2; + height: 12px; + left: 21px; + top: -7px; + -webkit-transform: rotate(45deg); + -moz-transform: rotate(45deg); + -o-transform: rotate(45deg); + transform: rotate(45deg); + position: absolute; + width: 12px; } + +.height-container { + display: none; + left: -25px; + padding: 0 25px; + position: relative; + width: 100%; + overflow: hidden; } + .height-container .section { + background: #f9f9f9; + border-bottom: 1px solid #e2e2e2; + left: -25px; + position: relative; + width: 100%; + padding-top: 10px; + padding-bottom: 5px; } + +div.Swift { + padding: 4px 0 2px 10px; + margin-bottom: 1em; + border-left: 5px solid #cde9f4; + overflow-y: hidden; } + div.Swift .aside-title { + color: #4b8afb; + -webkit-user-select: none; } + +.graybox { + border-collapse: collapse; + width: 100%; } + .graybox p { + margin: 0; + word-break: break-word; + min-width: 50px; } + .graybox td { + border: 1px solid #e2e2e2; + padding: 5px 25px 5px 10px; + vertical-align: middle; } + .graybox tr td:first-of-type { + text-align: right; + padding: 7px; + vertical-align: top; + word-break: normal; + width: 40px; } + +.slightly-smaller { + font-size: 0.9em; } + +#footer { + position: absolute; + bottom: 10px; + margin-left: 25px; } + #footer p { + margin: 0; + color: #aaa; + font-size: 0.8em; } + +html.dash header, html.dash #breadcrumbs, html.dash .sidebar { + display: none; } +html.dash .main-content { + width: 980px; + margin-left: 0; + border: none; + width: 100%; + top: 0; + padding-bottom: 0; } +html.dash .height-container { + display: block; } +html.dash .item .token { + margin-left: 0; } +html.dash .content-wrapper { + width: auto; } +html.dash #footer { + position: static; } diff --git a/docs/docsets/.docset/Contents/Info.plist b/docs/docsets/.docset/Contents/Info.plist new file mode 100644 index 0000000..4fcbfbd --- /dev/null +++ b/docs/docsets/.docset/Contents/Info.plist @@ -0,0 +1,20 @@ + + + + + CFBundleIdentifier + com.jazzy. + CFBundleName + + DocSetPlatformFamily + jazzy + isDashDocset + + dashIndexFilePath + index.html + isJavaScriptEnabled + + DashDocSetFamily + dashtoc + + diff --git a/docs/docsets/.docset/Contents/Resources/Documents/Classes.html b/docs/docsets/.docset/Contents/Resources/Documents/Classes.html new file mode 100644 index 0000000..59f58c6 --- /dev/null +++ b/docs/docsets/.docset/Contents/Resources/Documents/Classes.html @@ -0,0 +1,345 @@ + + + + Classes Reference + + + + + + + + +
+
+

Docs (100% documented)

+
+
+
+ +
+
+ +
+
+
+

Classes

+

The following classes are available globally.

+ +
+
+
+
    +
  • +
    + + + + PBKDF + +
    +
    +
    +
    +
    +
    +

    Derives key material from a password or passphrase.

    + + See more +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public class PBKDF
    + +
    +
    +
    +
    +
  • +
+
+
+
    +
  • +
    + + + + Cryptor + +
    +
    +
    +
    +
    +
    +

    Encrypts or decrypts, accumulating result.

    + +

    Useful for small in-memory buffers.

    + +

    For large files or network streams use StreamCryptor.

    + + See more +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public class Cryptor : StreamCryptor, Updateable
    + +
    +
    +
    +
    +
  • +
+
+
+
    +
  • +
    + + + + StreamCryptor + +
    +
    +
    +
    +
    +
    +

    Encrypts or decrypts return results as they become available.

    + +

    Use for large files or network streams.

    + +

    For small, in-memory buffers Cryptor may be easier to use.

    + + See more +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public class StreamCryptor
    + +
    +
    +
    +
    +
  • +
+
+
+
    +
  • +
    + + + + Random + +
    +
    +
    +
    +
    +
    +

    Generates buffers of random bytes.

    + + See more +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public class Random
    + +
    +
    +
    +
    +
  • +
+
+
+ +
    +
  • +
    + + + + Digest + +
    +
    +
    +
    +
    +
    +

    Public API for message digests.

    + +

    Usage is straightforward + + let s = "The quick brown fox jumps over the lazy dog." + var md5 : Digest = Digest(algorithm:.MD5) + md5.update(s) + let digest = md5.final() +

    + + See more +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public class Digest : Updateable
    + +
    +
    +
    +
    +
  • +
+
+
+
    +
  • +
    + + + + HMAC + +
    +
    +
    +
    +
    +
    +

    Calculates a cryptographic Hash-Based Message Authentication Code (HMAC).

    + + See more +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public class HMAC : Updateable
    + +
    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + + diff --git a/docs/docsets/.docset/Contents/Resources/Documents/Classes/Cryptor.html b/docs/docsets/.docset/Contents/Resources/Documents/Classes/Cryptor.html new file mode 100644 index 0000000..cddcda3 --- /dev/null +++ b/docs/docsets/.docset/Contents/Resources/Documents/Classes/Cryptor.html @@ -0,0 +1,223 @@ + + + + Cryptor Class Reference + + + + + + + + + +
+
+

Docs (100% documented)

+
+
+
+ +
+
+ +
+
+
+

Cryptor

+
+
+
public class Cryptor : StreamCryptor, Updateable
+ +
+
+

Encrypts or decrypts, accumulating result.

+ +

Useful for small in-memory buffers.

+ +

For large files or network streams use StreamCryptor.

+ +
+
+
+
    +
  • +
    + + + + final() + +
    +
    +
    +
    +
    +
    +

    Retrieves the encrypted or decrypted data.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func final() -> [UInt8]?
    + +
    +
    +
    +

    Return Value

    +

    the encrypted or decrypted data or nil if an error occured.

    + +
    +
    +
    +
  • +
+
+
+ +
    +
  • +
    + + + + update(_:_:) + +
    +
    +
    +
    +
    +
    +

    Upates the accumulated encrypted/decrypted data with the contents +of a raw byte buffer.

    + +

    It is not envisaged the users of the framework will need to call this directly.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func update(buffer: UnsafePointer<Void>, _ byteCount: Int) -> Self?
    + +
    +
    +
    +

    Return Value

    +

    this Cryptor object or nil if an error occurs (for optional chaining)

    + +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + + diff --git a/docs/docsets/.docset/Contents/Resources/Documents/Classes/Digest.html b/docs/docsets/.docset/Contents/Resources/Documents/Classes/Digest.html new file mode 100644 index 0000000..1f39019 --- /dev/null +++ b/docs/docsets/.docset/Contents/Resources/Documents/Classes/Digest.html @@ -0,0 +1,353 @@ + + + + Digest Class Reference + + + + + + + + + +
+
+

Docs (100% documented)

+
+
+
+ +
+
+ +
+
+
+

Digest

+
+
+
public class Digest : Updateable
+ +
+
+

Public API for message digests.

+ +

Usage is straightforward + + let s = "The quick brown fox jumps over the lazy dog." + var md5 : Digest = Digest(algorithm:.MD5) + md5.update(s) + let digest = md5.final() +

+ +
+
+
+
    +
  • +
    + + + + status + +
    +
    +
    +
    +
    +
    +

    The status of the Digest. +For CommonCrypto this will always be .Success. +It is here to provide for engines which can fail.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var status = Status.Success
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + Algorithm + +
    +
    +
    +
    +
    +
    +

    Enumerates available Digest algorithms

    + + See more +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public enum Algorithm
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + init(algorithm:) + +
    +
    +
    +
    +
    +
    +

    Create an algorithm-specific digest calculator +- parameter alrgorithm: the desired message digest algorithm

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init(algorithm: Algorithm)
    + +
    +
    +
    +

    Parameters

    + + + + + + + +
    + + alrgorithm + + +
    +

    the desired message digest algorithm

    + +
    +
    +
    +
    +
    +
  • +
  • +
    + + + + update(_:_:) + +
    +
    +
    +
    +
    +
    +

    Low-level update routine. Updates the message digest calculation with +the contents of a byte buffer.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func update(buffer: UnsafePointer<Void>, _ byteCount: size_t) -> Self?
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + +
    + + buffer + + +
    +

    the buffer

    + +
    +
    + + the + + +
    +

    number of bytes in buffer

    + +
    +
    +
    +
    +

    Return Value

    +

    this Digest object (for optional chaining)

    + +
    +
    +
    +
  • +
  • +
    + + + + final() + +
    +
    +
    +
    +
    +
    +

    Completes the calculate of the messge digest +- returns: the message digest

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func final() -> [UInt8]
    + +
    +
    +
    +

    Return Value

    +

    the message digest

    + +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + + diff --git a/docs/docsets/.docset/Contents/Resources/Documents/Classes/Digest/Algorithm.html b/docs/docsets/.docset/Contents/Resources/Documents/Classes/Digest/Algorithm.html new file mode 100644 index 0000000..da42599 --- /dev/null +++ b/docs/docsets/.docset/Contents/Resources/Documents/Classes/Digest/Algorithm.html @@ -0,0 +1,357 @@ + + + + Algorithm Enum Reference + + + + + + + + + +
+
+

Docs (100% documented)

+
+
+
+ +
+
+ +
+
+
+

Algorithm

+
+
+
public enum Algorithm
+ +
+
+

Enumerates available Digest algorithms

+ +
+
+
+
    +
  • +
    + + + + MD2 + +
    +
    +
    +
    +
    + +
    +

    Declaration

    +
    +

    Swift

    +
    case MD2,
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + MD4 + +
    +
    +
    +
    +
    +
    +

    Message Digest 4

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    MD4,
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + MD5 + +
    +
    +
    +
    +
    +
    +

    Message Digest 5

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    MD5,
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + SHA1 + +
    +
    +
    +
    +
    +
    +

    Secure Hash Algorithm 1

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    SHA1,
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + SHA224 + +
    +
    +
    +
    +
    +
    +

    Secure Hash Algorithm 2 224-bit

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    SHA224,
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + SHA256 + +
    +
    +
    +
    +
    +
    +

    Secure Hash Algorithm 2 256-bit

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    SHA256,
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + SHA384 + +
    +
    +
    +
    +
    +
    +

    Secure Hash Algorithm 2 384-bit

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    SHA384,
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + SHA512 + +
    +
    +
    +
    +
    +
    +

    Secure Hash Algorithm 2 512-bit

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    SHA512
    + +
    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + + diff --git a/docs/docsets/.docset/Contents/Resources/Documents/Classes/HMAC.html b/docs/docsets/.docset/Contents/Resources/Documents/Classes/HMAC.html new file mode 100644 index 0000000..2ab9ad4 --- /dev/null +++ b/docs/docsets/.docset/Contents/Resources/Documents/Classes/HMAC.html @@ -0,0 +1,380 @@ + + + + HMAC Class Reference + + + + + + + + + +
+
+

Docs (100% documented)

+
+
+
+ +
+
+ +
+
+
+

HMAC

+
+
+
public class HMAC : Updateable
+ +
+
+

Calculates a cryptographic Hash-Based Message Authentication Code (HMAC).

+ +
+
+
+
    +
  • +
    + + + + Algorithm + +
    +
    +
    +
    +
    +
    +

    Enumerates available algorithms.

    + + See more +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public enum Algorithm
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + status + +
    +
    +
    +
    +
    +
    +

    Status of the calculation

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var status : Status = .Success
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + init(algorithm:key:) + +
    +
    +
    +
    +
    +
    +

    Creates a new HMAC instance with the specified algorithm and key.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init(algorithm : Algorithm, key : NSData)
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + +
    + + algorithm + + +
    +

    selects the algorithm

    + +
    +
    + + key + + +
    +

    specifies the key

    + +
    +
    +
    +
    +
    +
  • +
  • +
    + + + + init(algorithm:key:) + +
    +
    +
    +
    +
    +
    +

    Creates a new HMAC instance with the specified algorithm and key.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init(algorithm : Algorithm, key : [UInt8])
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + +
    + + algorithm + + +
    +

    selects the algorithm

    + +
    +
    + + key + + +
    +

    specifies the key

    + +
    +
    +
    +
    +
    +
  • +
  • +
    + + + + update(_:_:) + +
    +
    +
    +
    +
    +
    +

    Updates the calculation of the HMAC with the contents of a buffer.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func update(buffer : UnsafePointer<Void>, _ byteCount : size_t) -> Self?
    + +
    +
    +
    +

    Return Value

    +

    the calculated HMAC

    + +
    +
    +
    +
  • +
  • +
    + + + + final() + +
    +
    +
    +
    +
    +
    +

    Finalizes the HMAC calculation

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func final() -> [UInt8]
    + +
    +
    +
    +

    Return Value

    +

    the calculated HMAC

    + +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + + diff --git a/docs/docsets/.docset/Contents/Resources/Documents/Classes/HMAC/Algorithm.html b/docs/docsets/.docset/Contents/Resources/Documents/Classes/HMAC/Algorithm.html new file mode 100644 index 0000000..1aed3fd --- /dev/null +++ b/docs/docsets/.docset/Contents/Resources/Documents/Classes/HMAC/Algorithm.html @@ -0,0 +1,334 @@ + + + + Algorithm Enum Reference + + + + + + + + + +
+
+

Docs (100% documented)

+
+
+
+ +
+
+ +
+
+
+

Algorithm

+
+
+
public enum Algorithm
+ +
+
+

Enumerates available algorithms.

+ +
+
+
+
    +
  • +
    + + + + MD5 + +
    +
    +
    +
    +
    +
    +

    Message Digest 5

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    case MD5,
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + SHA1 + +
    +
    +
    +
    +
    +
    +

    Secure Hash Algorithm 1

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    SHA1,
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + SHA224 + +
    +
    +
    +
    +
    +
    +

    Secure Hash Algorithm 2 224-bit

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    SHA224,
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + SHA256 + +
    +
    +
    +
    +
    +
    +

    Secure Hash Algorithm 2 256-bit

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    SHA256,
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + SHA384 + +
    +
    +
    +
    +
    +
    +

    Secure Hash Algorithm 2 384-bit

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    SHA384,
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + SHA512 + +
    +
    +
    +
    +
    +
    +

    Secure Hash Algorithm 2 512-bit

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    SHA512
    + +
    +
    +
    +
    +
  • +
+
+
+
    +
  • +
    + + + + digestLength() + +
    +
    +
    +
    +
    +
    +

    Obtains the digest length produced by this algorithm (in bytes).

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func digestLength() -> Int
    + +
    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + + diff --git a/docs/docsets/.docset/Contents/Resources/Documents/Classes/PBKDF.html b/docs/docsets/.docset/Contents/Resources/Documents/Classes/PBKDF.html new file mode 100644 index 0000000..bd8f14e --- /dev/null +++ b/docs/docsets/.docset/Contents/Resources/Documents/Classes/PBKDF.html @@ -0,0 +1,461 @@ + + + + PBKDF Class Reference + + + + + + + + + +
+
+

Docs (100% documented)

+
+
+
+ +
+
+ +
+
+
+

PBKDF

+
+
+
public class PBKDF
+ +
+
+

Derives key material from a password or passphrase.

+ +
+
+
+
    +
  • +
    + + + + PseudoRandomAlgorithm + +
    +
    +
    +
    +
    +
    +

    Enumerates available pseudo random algorithms

    + + See more +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public enum PseudoRandomAlgorithm
    + +
    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Determines the (approximate) number of iterations of the key derivation algorithm that need +to be run to achieve a particular delay (or calculation time).

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public class func calibrate(passwordLength: Int, saltLength: Int, algorithm: PseudoRandomAlgorithm, derivedKeyLength: Int, msec : UInt32) -> UInt
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + + + + + + + + + + + + + +
    + + passwordLength + + +
    +

    password length in bytes

    + +
    +
    + + saltLength + + +
    +

    salt length in bytes

    + +
    +
    + + algorithm + + +
    +

    the PseudoRandomAlgorithm to use

    + +
    +
    + + derivedKeyLength + + +
    +

    the desired key length

    + +
    +
    + + msec + + +
    +

    the desired calculation time

    + +
    +
    +
    +
    +

    Return Value

    +

    the number of times the algorithm should be run

    + +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Derives key material from a password and salt.

    + +

    -parameter password: the password string, will be converted using UTF8 +-parameter salt: the salt string will be converted using UTF8 +-parameter prf: the pseudo random function +-parameter round: the number of rounds +-parameter derivedKeyLength: the length of the desired derived key, in bytes. +-returns: the derived key

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public class func deriveKey(password : String, salt : String, prf: PseudoRandomAlgorithm, rounds: uint, derivedKeyLength: UInt) -> [UInt8]
    + +
    +
    +
    +
    +
  • +
+
+
+ +
    +
  • + +
    +
    +
    +
    +
    +

    Derives key material from a password buffer.

    + +
      +
    • return: the number of times the algorithm should be run
    • +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public class func deriveKey(password: UnsafePointer<Int8>, passwordLen: Int, salt: UnsafePointer<UInt8>, saltLen: Int, prf: PseudoRandomAlgorithm, rounds: uint, derivedKey: UnsafeMutablePointer<UInt8>, derivedKeyLen: Int)
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + password + + +
    +

    pointer to the password buffer

    + +
    +
    + + passwordLength + + +
    +

    password length in bytes

    + +
    +
    + + salt + + +
    +

    pointer to the salt buffer

    + +
    +
    + + saltLength + + +
    +

    salt length in bytes

    + +
    +
    + + prf + + +
    +

    the PseudoRandomAlgorithm to use

    + +
    +
    + + rounds + + +
    +

    the number of rounds of the algorithm to use

    + +
    +
    + + derivedKey + + +
    +

    pointer to the derived key buffer.

    + +
    +
    + + derivedKeyLength + + +
    +

    the desired key length

    + +
    +
    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + + diff --git a/docs/docsets/.docset/Contents/Resources/Documents/Classes/PBKDF/PseudoRandomAlgorithm.html b/docs/docsets/.docset/Contents/Resources/Documents/Classes/PBKDF/PseudoRandomAlgorithm.html new file mode 100644 index 0000000..a928c14 --- /dev/null +++ b/docs/docsets/.docset/Contents/Resources/Documents/Classes/PBKDF/PseudoRandomAlgorithm.html @@ -0,0 +1,292 @@ + + + + PseudoRandomAlgorithm Enum Reference + + + + + + + + + +
+
+

Docs (100% documented)

+
+
+
+ +
+
+ +
+
+
+

PseudoRandomAlgorithm

+
+
+
public enum PseudoRandomAlgorithm
+ +
+
+

Enumerates available pseudo random algorithms

+ +
+
+
+
    +
  • +
    + + + + SHA1 + +
    +
    +
    +
    +
    +
    +

    Secure Hash Algorithm 1

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    case SHA1
    + +
    +
    +
    +
    +
  • +
+
+
+
    +
  • +
    + + + + SHA224 + +
    +
    +
    +
    +
    +
    +

    Secure Hash Algorithm 2 224-bit

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    case SHA224
    + +
    +
    +
    +
    +
  • +
+
+
+
    +
  • +
    + + + + SHA256 + +
    +
    +
    +
    +
    +
    +

    Secure Hash Algorithm 2 256-bit

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    case SHA256
    + +
    +
    +
    +
    +
  • +
+
+
+
    +
  • +
    + + + + SHA384 + +
    +
    +
    +
    +
    +
    +

    Secure Hash Algorithm 2 384-bit

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    case SHA384
    + +
    +
    +
    +
    +
  • +
+
+
+
    +
  • +
    + + + + SHA512 + +
    +
    +
    +
    +
    +
    +

    Secure Hash Algorithm 2 512-bit

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    case SHA512
    + +
    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + + diff --git a/docs/docsets/.docset/Contents/Resources/Documents/Classes/Random.html b/docs/docsets/.docset/Contents/Resources/Documents/Classes/Random.html new file mode 100644 index 0000000..50920c1 --- /dev/null +++ b/docs/docsets/.docset/Contents/Resources/Documents/Classes/Random.html @@ -0,0 +1,298 @@ + + + + Random Class Reference + + + + + + + + + +
+
+

Docs (100% documented)

+
+
+
+ +
+
+ +
+
+
+

Random

+
+
+
public class Random
+ +
+
+

Generates buffers of random bytes.

+ +
+
+
+
    +
  • + +
    +
    +
    +
    +
    +

    Wraps native CCRandomeGenerateBytes call.

    + +

    :note: CCRNGStatus is typealiased to CCStatus but this routine can only return kCCSuccess or kCCRNGFailure

    + +
      +
    • return: .Success or .RNGFailure as appropriate.
    • +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public class func generateBytes(bytes : UnsafeMutablePointer<Void>, byteCount : Int ) -> RNGStatus
    + +
    +
    +
    +

    Parameters

    + + + + + + + +
    + + bytes + + +
    +

    a pointer to the buffer that will receive the bytes

    + +
    +
    +
    +
    +
    +
  • +
  • +
    + + + + generateBytes(_:) + +
    +
    +
    +
    +
    +
    +

    Generates an array of random bytes.

    + +
      +
    • return: an array of random bytes
    • +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public class func generateBytes(byteCount : Int ) throws -> [UInt8]
    + +
    +
    +
    +

    Parameters

    + + + + + + + +
    + + bytesCount + + +
    +

    number of random bytes to generate

    + +
    +
    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    A version of generateBytes that always throws an error.

    + +

    Use it to test that code handles this.

    + +
      +
    • return: an array of random bytes
    • +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public class func generateBytesThrow(byteCount : Int ) throws -> [UInt8]
    + +
    +
    +
    +

    Parameters

    + + + + + + + +
    + + bytesCount + + +
    +

    number of random bytes to generate

    + +
    +
    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + + diff --git a/docs/docsets/.docset/Contents/Resources/Documents/Classes/StreamCryptor.html b/docs/docsets/.docset/Contents/Resources/Documents/Classes/StreamCryptor.html new file mode 100644 index 0000000..8a36c0a --- /dev/null +++ b/docs/docsets/.docset/Contents/Resources/Documents/Classes/StreamCryptor.html @@ -0,0 +1,1047 @@ + + + + StreamCryptor Class Reference + + + + + + + + + +
+
+

Docs (100% documented)

+
+
+
+ +
+
+ +
+
+
+

StreamCryptor

+
+
+
public class StreamCryptor
+ +
+
+

Encrypts or decrypts return results as they become available.

+ +

Use for large files or network streams.

+ +

For small, in-memory buffers Cryptor may be easier to use.

+ +
+
+
+
    +
  • +
    + + + + Operation + +
    +
    +
    +
    +
    +
    +

    Enumerates Cryptor operations

    + + See more +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public enum Operation
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + Algorithm + +
    +
    +
    +
    +
    +
    +

    Enumerates available algorithms

    + + See more +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public enum Algorithm
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + Options + +
    +
    +
    +
    +
    +
    +

    Maps CommonCryptoOptions onto a Swift struct.

    + + See more +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public struct Options : OptionSetType, BooleanType
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + status + +
    +
    +
    +
    +
    +
    +

    The status code resulting from the last method call to this Cryptor. +Used to get additional information when optional chaining collapes.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var status : Status = .Success
    + +
    +
    +
    +
    +
  • +
+
+
+ +
    +
  • + +
    +
    +
    +
    +
    +

    Creates a new StreamCryptor

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public convenience init(operation: Operation, algorithm: Algorithm, options: Options, key: [UInt8],
    +        iv : [UInt8])
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + + + + + + + + + +
    + + operation + + +
    +

    the operation to perform see Operation (Encrypt, Decrypt)

    + +
    +
    + + algorithm + + +
    +

    the algorithm to use see Algorithm (AES, DES, TripleDES, CAST, RC2, Blowfish)

    + +
    +
    + + key + + +
    +

    a byte array containing key data

    + +
    +
    + + iv + + +
    +

    a byte array containing initialization vector

    + +
    +
    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Creates a new StreamCryptor

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public convenience init(operation: Operation, algorithm: Algorithm, options: Options, key: String,
    +        iv : String)
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + + + + + + + + + +
    + + operation + + +
    +

    the operation to perform see Operation (Encrypt, Decrypt)

    + +
    +
    + + algorithm + + +
    +

    the algorithm to use see Algorithm (AES, DES, TripleDES, CAST, RC2, Blowfish)

    + +
    +
    + + key + + +
    +

    a string containing key data (will be interpreted as UTF8)

    + +
    +
    + + iv + + +
    +

    a string containing initialization vector data (will be interpreted as UTF8)

    + +
    +
    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Add the contents of an Objective-C NSData buffer to the current encryption/decryption operation.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func update(dataIn: NSData, inout byteArrayOut: [UInt8]) -> (Int, Status)
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + +
    + + dataIn + + +
    +

    the input data

    + +
    +
    + + byteArrayOut + + +
    +

    output data

    + +
    +
    +
    +
    +

    Return Value

    +

    a tuple containing the number of output bytes produced and the status (see Status)

    + +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Add the contents of a Swift byte array to the current encryption/decryption operation.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func update(byteArrayIn: [UInt8], inout byteArrayOut: [UInt8]) -> (Int, Status)
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + +
    + + byteArrayIn + + +
    +

    the input data

    + +
    +
    + + byteArrayOut + + +
    +

    output data

    + +
    +
    +
    +
    +

    Return Value

    +

    a tuple containing the number of output bytes produced and the status (see Status)

    + +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Add the contents of a string (interpreted as UTF8) to the current encryption/decryption operation.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func update(stringIn: String, inout byteArrayOut: [UInt8]) -> (Int, Status)
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + +
    + + byteArrayIn + + +
    +

    the input data

    + +
    +
    + + byteArrayOut + + +
    +

    output data

    + +
    +
    +
    +
    +

    Return Value

    +

    a tuple containing the number of output bytes produced and the status (see Status)

    + +
    +
    +
    +
  • +
  • +
    + + + + final(_:) + +
    +
    +
    +
    +
    +
    +

    Retrieves all remaining encrypted or decrypted data from this cryptor.

    + +

    :note: If the underlying algorithm is an block cipher and the padding option has +not been specified and the cumulative input to the cryptor has not been an integral +multiple of the block length this will fail with an alignment error.

    + +

    :note: This method updates the status property

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func final(inout byteArrayOut: [UInt8]) -> (Int, Status)
    + +
    +
    +
    +

    Parameters

    + + + + + + + +
    + + byteArrayOut + + +
    +

    the output bffer

    + +
    +
    +
    +
    +

    Return Value

    +

    a tuple containing the number of output bytes produced and the status (see Status)

    + +
    +
    +
    +
  • +
+
+
+ +
    +
  • + +
    +
    +
    +
    +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init(operation: Operation, algorithm: Algorithm, options: Options, keyBuffer: UnsafePointer<Void>,
    +        keyByteCount: Int, ivBuffer: UnsafePointer<Void>)
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + + + + + + + + + + + + + +
    + + operation + + +
    +

    the operation to perform see Operation (Encrypt, Decrypt)

    + +
    +
    + + algorithm + + +
    +

    the algorithm to use see Algorithm (AES, DES, TripleDES, CAST, RC2, Blowfish)

    + +
    +
    + + keyBuffer + + +
    +

    pointer to key buffer

    + +
    +
    + + keyByteCount + + +
    +

    number of bytes in the key

    + +
    +
    + + ivBuffer + + +
    +

    initialization vector buffer

    + +
    +
    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func update(bufferIn: UnsafePointer<Void>, byteCountIn: Int, bufferOut: UnsafeMutablePointer<Void>, byteCapacityOut : Int, inout byteCountOut : Int) -> Status
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + + + + + + + + + + + + + +
    + + bufferIn + + +
    +

    pointer to input buffer

    + +
    +
    + + inByteCount + + +
    +

    number of bytes contained in input buffer

    + +
    +
    + + bufferOut + + +
    +

    pointer to output buffer

    + +
    +
    + + outByteCapacity + + +
    +

    capacity of the output buffer in bytes

    + +
    +
    + + outByteCount + + +
    +

    on successful completion, the number of bytes written to the output buffer

    + +
    +
    +
    +
    +

    Return Value

    + +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Retrieves all remaining encrypted or decrypted data from this cryptor.

    + +

    :note: If the underlying algorithm is an block cipher and the padding option has +not been specified and the cumulative input to the cryptor has not been an integral +multiple of the block length this will fail with an alignment error.

    + +

    :note: This method updates the status property

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func final(bufferOut: UnsafeMutablePointer<Void>, byteCapacityOut : Int, inout byteCountOut : Int) -> Status
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + + + + + +
    + + bufferOut + + +
    +

    pointer to output buffer

    + +
    +
    + + outByteCapacity + + +
    +

    capacity of the output buffer in bytes

    + +
    +
    + + outByteCount + + +
    +

    on successful completion, the number of bytes written to the output buffer

    + +
    +
    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Determines the number of bytes that wil be output by this Cryptor if inputBytes of additional +data is input.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func getOutputLength(inputByteCount : Int, isFinal : Bool = false) -> Int
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + +
    + + inputByteCount + + +
    +

    number of bytes that will be input.

    + +
    +
    + + isFinal + + +
    +

    true if buffer to be input will be the last input buffer, false otherwise.

    + +
    +
    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + + diff --git a/docs/docsets/.docset/Contents/Resources/Documents/Classes/StreamCryptor/Algorithm.html b/docs/docsets/.docset/Contents/Resources/Documents/Classes/StreamCryptor/Algorithm.html new file mode 100644 index 0000000..97b9cdb --- /dev/null +++ b/docs/docsets/.docset/Contents/Resources/Documents/Classes/StreamCryptor/Algorithm.html @@ -0,0 +1,334 @@ + + + + Algorithm Enum Reference + + + + + + + + + +
+
+

Docs (100% documented)

+
+
+
+ +
+
+ +
+
+
+

Algorithm

+
+
+
public enum Algorithm
+ +
+
+

Enumerates available algorithms

+ +
+
+
+
    +
  • +
    + + + + AES + +
    +
    +
    +
    +
    +
    +

    Advanced Encryption Standard

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    case AES,
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + DES + +
    +
    +
    +
    +
    +
    +

    Data Encryption Standard

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    DES,
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + TripleDES + +
    +
    +
    +
    +
    +
    +

    Triple DES

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    TripleDES,
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + CAST + +
    +
    +
    +
    +
    +
    +

    CAST

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    CAST,
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + RC2 + +
    +
    +
    +
    +
    +
    +

    RC2

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    RC2,
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + Blowfish + +
    +
    +
    +
    +
    +
    +

    Blowfish

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    Blowfish
    + +
    +
    +
    +
    +
  • +
+
+
+
    +
  • +
    + + + + blockSize() + +
    +
    +
    +
    +
    +
    +

    Blocksize, in bytes, of algorithm.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func blockSize() -> Int
    + +
    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + + diff --git a/docs/docsets/.docset/Contents/Resources/Documents/Classes/StreamCryptor/Operation.html b/docs/docsets/.docset/Contents/Resources/Documents/Classes/StreamCryptor/Operation.html new file mode 100644 index 0000000..9e5a071 --- /dev/null +++ b/docs/docsets/.docset/Contents/Resources/Documents/Classes/StreamCryptor/Operation.html @@ -0,0 +1,195 @@ + + + + Operation Enum Reference + + + + + + + + + +
+
+

Docs (100% documented)

+
+
+
+ +
+
+ +
+
+
+

Operation

+
+
+
public enum Operation
+ +
+
+

Enumerates Cryptor operations

+ +
+
+
+
    +
  • +
    + + + + Encrypt + +
    +
    +
    +
    +
    +
    +

    Encrypting

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    case Encrypt,
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + Decrypt + +
    +
    +
    +
    +
    +
    +

    Decrypting

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    Decrypt
    + +
    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + + diff --git a/docs/docsets/.docset/Contents/Resources/Documents/Classes/StreamCryptor/Options.html b/docs/docsets/.docset/Contents/Resources/Documents/Classes/StreamCryptor/Options.html new file mode 100644 index 0000000..ff11677 --- /dev/null +++ b/docs/docsets/.docset/Contents/Resources/Documents/Classes/StreamCryptor/Options.html @@ -0,0 +1,492 @@ + + + + Options Struct Reference + + + + + + + + + +
+
+

Docs (100% documented)

+
+
+
+ +
+
+ +
+
+
+

Options

+
+
+
public struct Options : OptionSetType, BooleanType
+ +
+
+

Maps CommonCryptoOptions onto a Swift struct.

+ +
+
+
+
    +
  • +
    + + + + rawValue + +
    +
    +
    +
    +
    +
    +

    Convert to native raw value

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var rawValue : UInt { return self.value }
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + init(_:) + +
    +
    +
    +
    +
    +
    +

    Initialize from a raw value

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init(_ rawValue: UInt)
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + init(rawValue:) + +
    +
    +
    +
    +
    +
    +

    Convert from a native value (i.e. 0, kCCOptionPKCS7Padding, kCCOptionECBMode)

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init(rawValue: UInt)
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + init(nilLiteral:) + +
    +
    +
    +
    +
    +
    +

    Initialize from a nil literal

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init(nilLiteral: ())
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + fromMask(_:) + +
    +
    +
    +
    +
    +
    +

    Create from a mask

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public static func fromMask(raw: UInt) -> Options
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + fromRaw(_:) + +
    +
    +
    +
    +
    +
    +

    Convert from native raw value.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public static func fromRaw(raw: UInt) -> Options?
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + toRaw() + +
    +
    +
    +
    +
    +
    +

    Convert to native raw value.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func toRaw() -> UInt
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + boolValue + +
    +
    +
    +
    +
    +
    +

    Convert to boolean value.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var boolValue: Bool
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + allZeros + +
    +
    +
    +
    +
    +
    +

    Initialize to value appropriate for all zeros of a mask.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public static var allZeros: Options
    + +
    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    nil is consider the same a zero or None.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public static func convertFromNilLiteral() -> Options
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + None + +
    +
    +
    +
    +
    +
    +

    No options

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public static var None: Options           { return self.init(0) }
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + PKCS7Padding + +
    +
    +
    +
    +
    +
    +

    Use padding. Needed unless the input is a integral number of blocks long.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public static var PKCS7Padding: Options    { return self.init(UInt(kCCOptionPKCS7Padding)) }
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + ECBMode + +
    +
    +
    +
    +
    +
    +

    Electronic Code Book Mode. Don’t use this.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public static var ECBMode: Options      { return self.init(UInt(kCCOptionECBMode)) }
    + +
    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + + diff --git a/docs/docsets/.docset/Contents/Resources/Documents/Enums.html b/docs/docsets/.docset/Contents/Resources/Documents/Enums.html new file mode 100644 index 0000000..fdb43a6 --- /dev/null +++ b/docs/docsets/.docset/Contents/Resources/Documents/Enums.html @@ -0,0 +1,162 @@ + + + + Enums Reference + + + + + + + + +
+
+

Docs (100% documented)

+
+
+
+ +
+
+ +
+
+
+

Enums

+

The following enums are available globally.

+ +
+
+
+
    +
  • +
    + + + + Status + +
    +
    +
    +
    +
    +
    +

    Links the native CommonCryptoStatus enumeration to Swiftier versions.

    + + See more +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public enum Status : CCCryptorStatus, CustomStringConvertible, ErrorType
    + +
    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + + diff --git a/docs/docsets/.docset/Contents/Resources/Documents/Enums/Status.html b/docs/docsets/.docset/Contents/Resources/Documents/Enums/Status.html new file mode 100644 index 0000000..eff99bf --- /dev/null +++ b/docs/docsets/.docset/Contents/Resources/Documents/Enums/Status.html @@ -0,0 +1,469 @@ + + + + Status Enum Reference + + + + + + + + + +
+
+

Docs (100% documented)

+
+
+
+ +
+
+ +
+
+
+

Status

+
+
+
public enum Status : CCCryptorStatus, CustomStringConvertible, ErrorType
+ +
+
+

Links the native CommonCryptoStatus enumeration to Swiftier versions.

+ +
+
+
+
    +
  • +
    + + + + Success + +
    +
    +
    +
    +
    +
    +

    Successful

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    case Success,
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + ParamError + +
    +
    +
    +
    +
    +
    +

    Parameter Error

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    ParamError,
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + BufferTooSmall + +
    +
    +
    +
    +
    +
    +

    Buffer too Small

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    BufferTooSmall,
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + MemoryFailure + +
    +
    +
    +
    +
    +
    +

    Memory Failure

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    MemoryFailure,
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + AlignmentError + +
    +
    +
    +
    +
    +
    +

    Alignment Error

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    AlignmentError,
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + DecodeError + +
    +
    +
    +
    +
    +
    +

    Decode Error

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    DecodeError,
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + Unimplemented + +
    +
    +
    +
    +
    +
    +

    Unimplemented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    Unimplemented,
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + Overflow + +
    +
    +
    +
    +
    +
    +

    Overflow

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    Overflow,
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + RNGFailure + +
    +
    +
    +
    +
    +
    +

    Random Number Generator Err

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    RNGFailure
    + +
    +
    +
    +
    +
  • +
+
+
+
    +
  • +
    + + + + toRaw() + +
    +
    +
    +
    +
    +
    +

    Converts this value to a native CCCryptorStatus value.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func toRaw() -> CCCryptorStatus
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + description + +
    +
    +
    +
    +
    +
    +

    Obtain human-readable string from enum value.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var description : String
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + fromRaw(_:) + +
    +
    +
    +
    +
    +
    +

    Create enum value from raw CCCryptorStatus value.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public static func fromRaw(status : CCCryptorStatus) -> Status?
    + +
    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + + diff --git a/docs/docsets/.docset/Contents/Resources/Documents/Extensions.html b/docs/docsets/.docset/Contents/Resources/Documents/Extensions.html new file mode 100644 index 0000000..8ece998 --- /dev/null +++ b/docs/docsets/.docset/Contents/Resources/Documents/Extensions.html @@ -0,0 +1,249 @@ + + + + Extensions Reference + + + + + + + + +
+
+

Docs (100% documented)

+
+
+
+ +
+
+ +
+
+
+

Extensions

+

The following extensions are available globally.

+ +
+
+
+
    +
  • +
    + + + + CryptoDigest + +
    +
    +
    +
    +
    +
    +

    Implements a simplified API for calculating digests over single buffers

    + + See more +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public protocol CryptoDigest
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + NSData + +
    +
    +
    +
    +
    +
    + + See more +
    +
    +

    Declaration

    +
    +

    Swift

    +
    @interface NSData : NSObject <NSCopying, NSMutableCopying, NSSecureCoding>
    +@end
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + String + +
    +
    +
    +
    +
    +
    + + See more +
    +
    +

    Declaration

    +
    +

    Swift

    +
    struct String
    + +
    +
    +
    +
    +
  • +
+
+
+
    +
  • +
    + + + + Updateable + +
    +
    +
    +
    +
    +
    +

    A protocol for calculations that can be updated with incremental data buffers.

    + + See more +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public protocol Updateable
    + +
    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + + diff --git a/docs/docsets/.docset/Contents/Resources/Documents/Extensions/CryptoDigest.html b/docs/docsets/.docset/Contents/Resources/Documents/Extensions/CryptoDigest.html new file mode 100644 index 0000000..37a0c79 --- /dev/null +++ b/docs/docsets/.docset/Contents/Resources/Documents/Extensions/CryptoDigest.html @@ -0,0 +1,357 @@ + + + + CryptoDigest Extension Reference + + + + + + + + + +
+
+

Docs (100% documented)

+
+
+
+ +
+
+ +
+
+
+

CryptoDigest

+
+
+
public protocol CryptoDigest
+ +
+
+

Implements a simplified API for calculating digests over single buffers

+ +
+
+
+
    +
  • +
    + + + + MD2 + +
    +
    +
    +
    +
    +
    +

    An MD2 digest of this object

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var MD2: Self { return self.digest(.MD2) }
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + MD4 + +
    +
    +
    +
    +
    +
    +

    An MD4 digest of this object

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var MD4: Self { return self.digest(.MD4) }
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + MD5 + +
    +
    +
    +
    +
    +
    +

    An MD5 digest of this object

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var MD5: Self { return self.digest(.MD5) }
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + SHA1 + +
    +
    +
    +
    +
    +
    +

    An SHA1 digest of this object

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var SHA1: Self { return self.digest(.SHA1) }
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + SHA224 + +
    +
    +
    +
    +
    +
    +

    An SHA224 digest of this object

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var SHA224: Self { return self.digest(.SHA224) }
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + SHA256 + +
    +
    +
    +
    +
    +
    +

    An SHA256 digest of this object

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var SHA256: Self { return self.digest(.SHA256) }
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + SHA384 + +
    +
    +
    +
    +
    +
    +

    An SHA384 digest of this object

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var SHA384: Self { return self.digest(.SHA384) }
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + SHA512 + +
    +
    +
    +
    +
    +
    +

    An SHA512 digest of this object

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var SHA512: Self { return self.digest(.SHA512) }
    + +
    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + + diff --git a/docs/docsets/.docset/Contents/Resources/Documents/Extensions/NSData.html b/docs/docsets/.docset/Contents/Resources/Documents/Extensions/NSData.html new file mode 100644 index 0000000..60d887d --- /dev/null +++ b/docs/docsets/.docset/Contents/Resources/Documents/Extensions/NSData.html @@ -0,0 +1,193 @@ + + + + NSData Extension Reference + + + + + + + + + +
+
+

Docs (100% documented)

+
+
+
+ +
+
+ +
+
+
+

NSData

+
+
+
@interface NSData : NSObject <NSCopying, NSMutableCopying, NSSecureCoding>
+@end
+ +
+
+ +
+
+
+
    +
  • +
    + + + + digest(_:) + +
    +
    +
    +
    +
    +
    +

    Calculates the Message Digest for this data.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func digest(algorithm : Digest.Algorithm) -> Self
    + +
    +
    +
    +

    Parameters

    + + + + + + + +
    + + algorithm + + +
    +

    the digest algorithm to use

    + +
    +
    +
    +
    +

    Return Value

    +

    an NSData object containing the message digest

    + +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + + diff --git a/docs/docsets/.docset/Contents/Resources/Documents/Extensions/String.html b/docs/docsets/.docset/Contents/Resources/Documents/Extensions/String.html new file mode 100644 index 0000000..458f2fb --- /dev/null +++ b/docs/docsets/.docset/Contents/Resources/Documents/Extensions/String.html @@ -0,0 +1,193 @@ + + + + String Extension Reference + + + + + + + + + +
+
+

Docs (100% documented)

+
+
+
+ +
+
+ +
+
+
+

String

+
+
+
struct String
+ +
+
+ +
+
+
+
    +
  • +
    + + + + digest(_:) + +
    +
    +
    +
    +
    +
    +

    Calculates the Message Digest for this string. +The string is converted to raw data using UTF8.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func digest(algorithm : Digest.Algorithm) -> String
    + +
    +
    +
    +

    Parameters

    + + + + + + + +
    + + algorithm + + +
    +

    the digest algorithm to use

    + +
    +
    +
    +
    +

    Return Value

    +

    a hex string of the calculated digest

    + +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + + diff --git a/docs/docsets/.docset/Contents/Resources/Documents/Extensions/Updateable.html b/docs/docsets/.docset/Contents/Resources/Documents/Extensions/Updateable.html new file mode 100644 index 0000000..547433e --- /dev/null +++ b/docs/docsets/.docset/Contents/Resources/Documents/Extensions/Updateable.html @@ -0,0 +1,235 @@ + + + + Updateable Extension Reference + + + + + + + + + +
+
+

Docs (100% documented)

+
+
+
+ +
+
+ +
+
+
+

Updateable

+
+
+
public protocol Updateable
+ +
+
+

A protocol for calculations that can be updated with incremental data buffers.

+ +
+
+
+
    +
  • +
    + + + + update(_:) + +
    +
    +
    +
    +
    +
    +

    Updates the current calculation with data contained in an NSData object.

    + +
      +
    • parameters data: the data buffer
    • +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func update(data: NSData) -> Self?
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + update(_:) + +
    +
    +
    +
    +
    +
    +

    Updates the current calculation with data contained in a Swift array.

    + +
      +
    • parameters byteArray: the Swift array
    • +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func update(byteArray : [UInt8]) -> Self?
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + update(_:) + +
    +
    +
    +
    +
    +
    +

    Updates the current calculation with data contained in a Swift string. +The corresponding data will be generated using UTF8 encoding.

    + +
      +
    • parameters string: the Swift string
    • +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func update(string: String) -> Self?
    + +
    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + + diff --git a/docs/docsets/.docset/Contents/Resources/Documents/Functions.html b/docs/docsets/.docset/Contents/Resources/Documents/Functions.html new file mode 100644 index 0000000..b806b6e --- /dev/null +++ b/docs/docsets/.docset/Contents/Resources/Documents/Functions.html @@ -0,0 +1,473 @@ + + + + Functions Reference + + + + + + + + +
+
+

Docs (100% documented)

+
+
+
+ +
+
+ +
+
+
+

Functions

+

The following functions are available globally.

+ +
+
+
+
    +
  • + +
    +
    +
    +
    +
    +

    Converts a string of hexadecimal digits to a Swift array.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func arrayFromHexString(s : String) -> [UInt8]
    + +
    +
    +
    +

    Parameters

    + + + + + + + +
    + + s + + +
    +

    the hex string (must contain an even number of digits)

    + +
    +
    +
    +
    +

    Return Value

    +

    a Swift array

    + +
    +
    +
    +
  • +
  • +
    + + + + dataFromHexString(_:) + +
    +
    +
    +
    +
    +
    +

    Converts a string of hexadecimal digits to an NSData object.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func dataFromHexString(s : String) -> NSData
    + +
    +
    +
    +

    Parameters

    + + + + + + + +
    + + s + + +
    +

    the hex string (must contain an even number of digits)

    + +
    +
    +
    +
    +

    Return Value

    +

    an NSData object

    + +
    +
    +
    +
  • +
  • +
    + + + + dataFromByteArray(_:) + +
    +
    +
    +
    +
    +
    +

    Converts a Swift array to an NSData object.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func dataFromByteArray(a : [UInt8]) -> NSData
    + +
    +
    +
    +

    Parameters

    + + + + + + + +
    + + a + + +
    +

    the Swift array

    + +
    +
    +
    +
    +

    Return Value

    +

    an NSData object

    + +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Converts a Swift array to a string of hexadecimal digits.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func hexStringFromArray(a : [UInt8], uppercase : Bool = false) -> String
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + +
    + + a + + +
    +

    the Swift array

    + +
    +
    + + uppercase + + +
    +

    if true use uppercase for letter digits, lowercase otherwise

    + +
    +
    +
    +
    +

    Return Value

    +

    a Swift string

    + +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Converts a Swift array to an NSString object.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func hexNSStringFromArray(a : [UInt8], uppercase : Bool = false) -> NSString
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + +
    + + a + + +
    +

    the Swift array

    + +
    +
    + + uppercase + + +
    +

    if true use uppercase for letter digits, lowercase otherwise

    + +
    +
    +
    +
    +

    Return Value

    +

    an NSString object

    + +
    +
    +
    +
  • +
  • +
    + + + + hexListFromArray(_:) + +
    +
    +
    +
    +
    +
    +

    Converts a Swift array to a Swift String containing a comma separated list of bytes. +This is used to generate test data programmatically.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func hexListFromArray(a : [UInt8]) -> String
    + +
    +
    +
    +

    Parameters

    + + + + + + + +
    + + a + + +
    +

    the Swift array

    + +
    +
    +
    +
    +

    Return Value

    +

    a Swift string

    + +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + + diff --git a/docs/docsets/.docset/Contents/Resources/Documents/Protocols.html b/docs/docsets/.docset/Contents/Resources/Documents/Protocols.html new file mode 100644 index 0000000..5af568c --- /dev/null +++ b/docs/docsets/.docset/Contents/Resources/Documents/Protocols.html @@ -0,0 +1,194 @@ + + + + Protocols Reference + + + + + + + + +
+
+

Docs (100% documented)

+
+
+
+ +
+
+ +
+
+
+

Protocols

+

The following protocols are available globally.

+ +
+
+
+
    +
  • +
    + + + + CryptoDigest + +
    +
    +
    +
    +
    +
    +

    Implements a simplified API for calculating digests over single buffers

    + + See more +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public protocol CryptoDigest
    + +
    +
    +
    +
    +
  • +
+
+
+
    +
  • +
    + + + + Updateable + +
    +
    +
    +
    +
    +
    +

    A protocol for calculations that can be updated with incremental data buffers.

    + + See more +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public protocol Updateable
    + +
    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + + diff --git a/docs/docsets/.docset/Contents/Resources/Documents/Protocols/CryptoDigest.html b/docs/docsets/.docset/Contents/Resources/Documents/Protocols/CryptoDigest.html new file mode 100644 index 0000000..7932894 --- /dev/null +++ b/docs/docsets/.docset/Contents/Resources/Documents/Protocols/CryptoDigest.html @@ -0,0 +1,168 @@ + + + + CryptoDigest Protocol Reference + + + + + + + + + +
+
+

Docs (100% documented)

+
+
+
+ +
+
+ +
+
+
+

CryptoDigest

+
+
+
public protocol CryptoDigest
+ +
+
+

Implements a simplified API for calculating digests over single buffers

+ +
+
+
+
    +
  • +
    + + + + digest(_:) + +
    +
    +
    +
    +
    +
    +

    Calculates a message digest

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    func digest(algorithm : Digest.Algorithm) -> Self
    + +
    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + + diff --git a/docs/docsets/.docset/Contents/Resources/Documents/Protocols/Updateable.html b/docs/docsets/.docset/Contents/Resources/Documents/Protocols/Updateable.html new file mode 100644 index 0000000..41ab0e9 --- /dev/null +++ b/docs/docsets/.docset/Contents/Resources/Documents/Protocols/Updateable.html @@ -0,0 +1,237 @@ + + + + Updateable Protocol Reference + + + + + + + + + +
+
+

Docs (100% documented)

+
+
+
+ +
+
+ +
+
+
+

Updateable

+
+
+
public protocol Updateable
+ +
+
+

A protocol for calculations that can be updated with incremental data buffers.

+ +
+
+
+
    +
  • +
    + + + + status + +
    +
    +
    +
    +
    +
    +

    Status of the calculation.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    var status : Status { get }
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + update(_:_:) + +
    +
    +
    +
    +
    +
    +

    Low-level update routine. +Updates the calculation with the contents of a data buffer. +- parameter buffer: pointer to the data buffer +- parameter byteCount: length of the buffer in bytes +- returns: self if no error for optional chaining, null otherwise

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    func update(buffer : UnsafePointer<Void>, _ byteCount : size_t) -> Self?
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + +
    + + buffer + + +
    +

    pointer to the data buffer

    + +
    +
    + + byteCount + + +
    +

    length of the buffer in bytes

    + +
    +
    +
    +
    +

    Return Value

    +

    self if no error for optional chaining, null otherwise

    + +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + + diff --git a/docs/docsets/.docset/Contents/Resources/Documents/css/highlight.css b/docs/docsets/.docset/Contents/Resources/Documents/css/highlight.css new file mode 100644 index 0000000..18c292e --- /dev/null +++ b/docs/docsets/.docset/Contents/Resources/Documents/css/highlight.css @@ -0,0 +1,202 @@ +/* Credit to https://gist.github.com/wataru420/2048287 */ +.highlight { + /* Comment */ + /* Error */ + /* Keyword */ + /* Operator */ + /* Comment.Multiline */ + /* Comment.Preproc */ + /* Comment.Single */ + /* Comment.Special */ + /* Generic.Deleted */ + /* Generic.Deleted.Specific */ + /* Generic.Emph */ + /* Generic.Error */ + /* Generic.Heading */ + /* Generic.Inserted */ + /* Generic.Inserted.Specific */ + /* Generic.Output */ + /* Generic.Prompt */ + /* Generic.Strong */ + /* Generic.Subheading */ + /* Generic.Traceback */ + /* Keyword.Constant */ + /* Keyword.Declaration */ + /* Keyword.Pseudo */ + /* Keyword.Reserved */ + /* Keyword.Type */ + /* Literal.Number */ + /* Literal.String */ + /* Name.Attribute */ + /* Name.Builtin */ + /* Name.Class */ + /* Name.Constant */ + /* Name.Entity */ + /* Name.Exception */ + /* Name.Function */ + /* Name.Namespace */ + /* Name.Tag */ + /* Name.Variable */ + /* Operator.Word */ + /* Text.Whitespace */ + /* Literal.Number.Float */ + /* Literal.Number.Hex */ + /* Literal.Number.Integer */ + /* Literal.Number.Oct */ + /* Literal.String.Backtick */ + /* Literal.String.Char */ + /* Literal.String.Doc */ + /* Literal.String.Double */ + /* Literal.String.Escape */ + /* Literal.String.Heredoc */ + /* Literal.String.Interpol */ + /* Literal.String.Other */ + /* Literal.String.Regex */ + /* Literal.String.Single */ + /* Literal.String.Symbol */ + /* Name.Builtin.Pseudo */ + /* Name.Variable.Class */ + /* Name.Variable.Global */ + /* Name.Variable.Instance */ + /* Literal.Number.Integer.Long */ } + .highlight .c { + color: #999988; + font-style: italic; } + .highlight .err { + color: #a61717; + background-color: #e3d2d2; } + .highlight .k { + color: #000000; + font-weight: bold; } + .highlight .o { + color: #000000; + font-weight: bold; } + .highlight .cm { + color: #999988; + font-style: italic; } + .highlight .cp { + color: #999999; + font-weight: bold; } + .highlight .c1 { + color: #999988; + font-style: italic; } + .highlight .cs { + color: #999999; + font-weight: bold; + font-style: italic; } + .highlight .gd { + color: #000000; + background-color: #ffdddd; } + .highlight .gd .x { + color: #000000; + background-color: #ffaaaa; } + .highlight .ge { + color: #000000; + font-style: italic; } + .highlight .gr { + color: #aa0000; } + .highlight .gh { + color: #999999; } + .highlight .gi { + color: #000000; + background-color: #ddffdd; } + .highlight .gi .x { + color: #000000; + background-color: #aaffaa; } + .highlight .go { + color: #888888; } + .highlight .gp { + color: #555555; } + .highlight .gs { + font-weight: bold; } + .highlight .gu { + color: #aaaaaa; } + .highlight .gt { + color: #aa0000; } + .highlight .kc { + color: #000000; + font-weight: bold; } + .highlight .kd { + color: #000000; + font-weight: bold; } + .highlight .kp { + color: #000000; + font-weight: bold; } + .highlight .kr { + color: #000000; + font-weight: bold; } + .highlight .kt { + color: #445588; + font-weight: bold; } + .highlight .m { + color: #009999; } + .highlight .s { + color: #d14; } + .highlight .na { + color: #008080; } + .highlight .nb { + color: #0086B3; } + .highlight .nc { + color: #445588; + font-weight: bold; } + .highlight .no { + color: #008080; } + .highlight .ni { + color: #800080; } + .highlight .ne { + color: #990000; + font-weight: bold; } + .highlight .nf { + color: #990000; + font-weight: bold; } + .highlight .nn { + color: #555555; } + .highlight .nt { + color: #000080; } + .highlight .nv { + color: #008080; } + .highlight .ow { + color: #000000; + font-weight: bold; } + .highlight .w { + color: #bbbbbb; } + .highlight .mf { + color: #009999; } + .highlight .mh { + color: #009999; } + .highlight .mi { + color: #009999; } + .highlight .mo { + color: #009999; } + .highlight .sb { + color: #d14; } + .highlight .sc { + color: #d14; } + .highlight .sd { + color: #d14; } + .highlight .s2 { + color: #d14; } + .highlight .se { + color: #d14; } + .highlight .sh { + color: #d14; } + .highlight .si { + color: #d14; } + .highlight .sx { + color: #d14; } + .highlight .sr { + color: #009926; } + .highlight .s1 { + color: #d14; } + .highlight .ss { + color: #990073; } + .highlight .bp { + color: #999999; } + .highlight .vc { + color: #008080; } + .highlight .vg { + color: #008080; } + .highlight .vi { + color: #008080; } + .highlight .il { + color: #009999; } diff --git a/docs/docsets/.docset/Contents/Resources/Documents/css/jazzy.css b/docs/docsets/.docset/Contents/Resources/Documents/css/jazzy.css new file mode 100644 index 0000000..a42da72 --- /dev/null +++ b/docs/docsets/.docset/Contents/Resources/Documents/css/jazzy.css @@ -0,0 +1,302 @@ +html, body, div, span, h1, h3, h4, p, a, code, em, img, ul, li, table, tbody, tr, td { + background: transparent; + border: 0; + margin: 0; + outline: 0; + padding: 0; + vertical-align: baseline; } + +body { + background-color: #f2f2f2; + font-family: Helvetica, freesans, Arial, sans-serif; + font-size: 14px; + -webkit-font-smoothing: subpixel-antialiased; + word-wrap: break-word; } + +h1, h2, h3, h4, h5, h6 { + margin-top: 0.8em; + margin-bottom: 0.3em; + font-weight: 100; + color: black; } + +h1 { + font-size: 2.5em; } + +h2 { + font-size: 2em; + border-bottom: 1px solid #e2e2e2; } + +h3 { + font-size: 1.5em; } + +h4 { + font-size: 1.25em; } + +h5 { + font-size: 1.1em; } + +h6 { + font-size: 1.1em; + color: #777; } + +pre, code { + font: 0.95em Menlo, monospace; + color: #777; + word-wrap: normal; } + +p code, li code { + background-color: #eee; + padding: 2px 4px; + border-radius: 4px; } + +a { + color: #0088cc; + text-decoration: none; } + +ul { + padding-left: 15px; } + +li { + line-height: 1.8em; } + +img { + max-width: 100%; } + +blockquote { + margin-left: 0; + padding: 0 10px; + border-left: 4px solid #ccc; } + +.content-wrapper { + margin: 0 auto; + width: 980px; } + +header { + font-size: 0.85em; + line-height: 26px; + background-color: #414141; + position: fixed; + width: 100%; + z-index: 1; } + header img { + padding-right: 6px; + vertical-align: -4px; + height: 16px; } + header a { + color: #fff; } + header p { + float: left; + color: #999; } + header .header-right { + float: right; + margin-left: 16px; } + +#breadcrumbs { + background-color: #f2f2f2; + height: 27px; + padding-top: 17px; + position: fixed; + width: 100%; + z-index: 1; + margin-top: 26px; } + #breadcrumbs #carat { + height: 10px; + margin: 0 5px; } + +.sidebar { + background-color: #f9f9f9; + border: 1px solid #e2e2e2; + overflow-y: auto; + overflow-x: hidden; + position: fixed; + top: 70px; + bottom: 0; + width: 230px; + word-wrap: normal; } + +.nav-groups { + list-style-type: none; + background: #fff; + padding-left: 0; } + +.nav-group-name { + border-bottom: 1px solid #e2e2e2; + font-size: 1.1em; + font-weight: 100; + padding: 15px 0 15px 20px; } + .nav-group-name > a { + color: #333; } + +.nav-group-tasks { + margin-top: 5px; } + +.nav-group-task { + font-size: 0.9em; + list-style-type: none; } + .nav-group-task a { + color: #888; } + +.main-content { + background-color: #fff; + border: 1px solid #e2e2e2; + margin-left: 246px; + position: absolute; + overflow: hidden; + padding-bottom: 60px; + top: 70px; + width: 734px; } + .main-content p, .main-content a, .main-content code, .main-content em, .main-content ul, .main-content table, .main-content blockquote { + margin-bottom: 1em; } + .main-content p { + line-height: 1.8em; } + .main-content section .section:first-child { + margin-top: 0; + padding-top: 0; } + .main-content section .task-group-section .task-group:first-of-type { + padding-top: 10px; } + .main-content section .task-group-section .task-group:first-of-type .section-name { + padding-top: 15px; } + +.section { + padding: 0 25px; } + +.highlight { + background-color: #eee; + padding: 10px 12px; + border: 1px solid #e2e2e2; + border-radius: 4px; + overflow-x: auto; } + +.aside-title { + font-size: 9px; + letter-spacing: 2px; + text-transform: uppercase; + padding-bottom: 0; } + +.declaration .highlight { + overflow-x: initial; + padding: 0 40px 40px 0; + margin-bottom: -25px; + background-color: transparent; + border: none; } + +.section-name { + margin: 0; + margin-left: 18px; } + +.task-group-section { + padding-left: 6px; + border-top: 1px solid #e2e2e2; } + +.task-group { + padding-top: 0px; } + +.item { + padding-top: 8px; + width: 100%; + list-style-type: none; } + .item a[name]:before { + content: ""; + display: block; + padding-top: 70px; + margin: -70px 0 0; } + .item code { + background-color: transparent; + padding: 0; } + .item .token { + padding-left: 3px; + margin-left: 15px; } + +.pointer-container { + border-bottom: 1px solid #e2e2e2; + left: -23px; + padding-bottom: 13px; + position: relative; + width: 110%; } + +.pointer { + background: #f9f9f9; + border-left: 1px solid #e2e2e2; + border-top: 1px solid #e2e2e2; + height: 12px; + left: 21px; + top: -7px; + -webkit-transform: rotate(45deg); + -moz-transform: rotate(45deg); + -o-transform: rotate(45deg); + transform: rotate(45deg); + position: absolute; + width: 12px; } + +.height-container { + display: none; + left: -25px; + padding: 0 25px; + position: relative; + width: 100%; + overflow: hidden; } + .height-container .section { + background: #f9f9f9; + border-bottom: 1px solid #e2e2e2; + left: -25px; + position: relative; + width: 100%; + padding-top: 10px; + padding-bottom: 5px; } + +div.Swift { + padding: 4px 0 2px 10px; + margin-bottom: 1em; + border-left: 5px solid #cde9f4; + overflow-y: hidden; } + div.Swift .aside-title { + color: #4b8afb; + -webkit-user-select: none; } + +.graybox { + border-collapse: collapse; + width: 100%; } + .graybox p { + margin: 0; + word-break: break-word; + min-width: 50px; } + .graybox td { + border: 1px solid #e2e2e2; + padding: 5px 25px 5px 10px; + vertical-align: middle; } + .graybox tr td:first-of-type { + text-align: right; + padding: 7px; + vertical-align: top; + word-break: normal; + width: 40px; } + +.slightly-smaller { + font-size: 0.9em; } + +#footer { + position: absolute; + bottom: 10px; + margin-left: 25px; } + #footer p { + margin: 0; + color: #aaa; + font-size: 0.8em; } + +html.dash header, html.dash #breadcrumbs, html.dash .sidebar { + display: none; } +html.dash .main-content { + width: 980px; + margin-left: 0; + border: none; + width: 100%; + top: 0; + padding-bottom: 0; } +html.dash .height-container { + display: block; } +html.dash .item .token { + margin-left: 0; } +html.dash .content-wrapper { + width: auto; } +html.dash #footer { + position: static; } diff --git a/docs/docsets/.docset/Contents/Resources/Documents/img/carat.png b/docs/docsets/.docset/Contents/Resources/Documents/img/carat.png new file mode 100755 index 0000000000000000000000000000000000000000..29d2f7fd4955fca6bc6fb740e0373a2c358c398e GIT binary patch literal 274 zcmeAS@N?(olHy`uVBq!ia0vp^0zfRo!3HEV4DF?Wlw^r(L`iUdT1k0gQ7VIDN`6wR zf@f}GdTLN=VoGJ<$y6JlqAi{-jv*Ddl5#RKJQ5NTUZgiPI4RUKGIKU?u8L&ndhX1t za+0CMVUnT(Gnb}ei=c~x==tMH^F1_tBocXwcoSWoO-SZY-o>!8%^=Bms)(~h;m_U( zXNixk28L}0LS5-jKyq@#2gyS|J&f#pGCLkTc<@2s1dqeyqJ*Rc0tSIETAgmODY;(s z2y|Mcp&2}7rpBprBBB~1qM1`N+}4SoxYVPqsXi&l`rxZp{(w0iSy$Nv5*Vy!RapG^ S^0y4=eg;ohKbLh*2~7a!Pg}VF literal 0 HcmV?d00001 diff --git a/docs/docsets/.docset/Contents/Resources/Documents/img/dash.png b/docs/docsets/.docset/Contents/Resources/Documents/img/dash.png new file mode 100755 index 0000000000000000000000000000000000000000..6f694c7a012b417908da3687a0a39aa182e91c74 GIT binary patch literal 1338 zcmaJ>U2NM_6t){^r>#wcfL0VSTvuX@)$vd4#5N6WVkc|1rR}naMb)(7I5(};#!el# zbtCASsp?W-qE8zSJoFVdA%-T$WL8RI_B? zd+t5o`T5Q{p6=<|U$?VqCxRe#u}(PwSIl{LRKstfSbPYV7pzFiI$~t4QN;vEC}X4n z7RxDpAOV!j*w8ni4MAK3S~6v&;)g`l$axh<$7|>E5RD*h?RH*K2Y`j8L7%1v@%vZi za7@bt@uOUvisvQJuXPqpaHQCkREqd6M>0WG?6AwXR*T65ziuw$&~q$MS$o zfPyh>s<0l}mI@eh_hd(oB8*1tHZ@ojWl%QM;T+Jdm>k66jW?rZ#Atx!qns4-g&E4v z(=;FQ%W^avW?3J{L@2IeV>_(Ca)Lk1vm70uX*$9Rewm8!AxRF0BcZTNSFka?U@5u^ zDtpMY2lVtCmQm<8@|YxHuf`Qs(;a!QQ=g4=WngL}AQLr> z9JWrdsBIHKHXF!fSydodRsaOc@jgNkSU^x9kY&;UP<}3pZ{joC5f_Tevd>4eG~;)Y z=eZ~qp=5#aaUn*E3OES^BApKTU&mCAU>iEyt^S9?)&v0^j*SWDqjRZr20>6rTPSJ& zlzz0f);`}+^~w}lP1PK7Ew3f7ot#*uJ@>1Yo3J0TdsRKpA+*n9JnDXDrM~YvF`;uS|vAh|-QdmRf4AqG=`U z#v1n_Lxg8;&z#YCU2K`_W{-A zUf_|V)B9U(WZ~PP>)O(JZ|Vc-*qP&Q{c~BE~6izDPQq)#Nu*KOf(n^(VHY9;fiINM65``pc+9*v(mL$bwfCjbc%v9V{8r9iX|O%>Nr%pLD2qT{mty}c=LVleeamv znz3SOSm@kP8jThvOOq(56Yzh*fz(booe!uZij=BJC6+_lbvQ~B8nA2>kXdv_RDtRY z`5QXWWEySCe6vbTs^#f?J!WC*{1~RgVx!nJTJjQyO{dRANgx|FnymtGbD9%JmCh9^y)##j7{Dcqfn*1ta$rG89pJF6w-S7Z037$rr|y0;1Onp_ zGFJdT6Q!1C0AdVB0WOmpuV=AgAQ550Tn+-mivTtYPJmz*#75#_n9oV%!#rSOfmAfy zki%C~=fTp1{O#BLpJ|0jj#m6#|LRWit-vq3PE1z9ZqyvET4sX$-Icqy7t z<=aq5ff86AuBZBu6EjJsYWM0uejufWFTwPA7Su}0Bm$7KFb!q{Um_8~A{LUG#1l(l zSehUda@kU8LIRg9fkk2tZ;~ss5~R+mM<==F7hLHpxqLB>>PQS%Vc7b~?q!%T5+h8Q z4G=4Nzyi5WZ?^gkasJ{?Xhm`JC#WG6$1K2jb@=9&D3EgD#3UhGh#*21rJjulVXjCF zvp76q62jt0zzMG5C7DlfMgPl%C^3+~wf|}Lq=}jz|MmIcQjh1Ok6NjD$Em^Iv26D> z8tt_TnM9~^Tt8mflRGPOrrX|HtT3gG4LEuuk{g2Rn}QgJIa?gZo))!!=o_l9bvD%A zZ`aHajl8#~u?!4f7F#*b*->A=R2L)6!>saz?h>#wTXT-I(XmQ zx{84skS>k=i~i`(6k4C7;Zpfx%dCPVjPayMf8pugtGM=~s=Id1l#8MZJ1-73wV#Q3 zR3>v3%}jbQs1f_Z0xo;%=LILlA+nTpKI4ha%xWW}uqHrNao~&T4AY6m`P$_n-6h*g zhoX+e4n%~gl_lhe#s+AMb7d{5WzvYTa%6Q~si@@4{;s(0zU|H&P3fE+t{7X`S#Cj@ zC#vd}^4pcBD*77Ny5=j$h8EL2_t$O38$SQiJ6fPjJMimypr~MB2(&P0aI|h}$64<0 z>_~duqNjaT=DM^6+N{&B_lED;F2wrl?!4Lk*2((x!fmrcsw+=cI^qttuZ9C}-m~5E z-ryYVpL%^xR#&(0YI5hz<(}F7-p)?FPcyJO-zVO>%9ZDXJH8pnY;GJYFDQ>vd#j_* zRrd}L(r=!g+1#nQwsO?kpS`Qq8`NxE+Zy{gf7*_7J*U2V_|NpLo{iasj7VCg_V9&| ShohtYzipXxh2)4xTk + + + Reference + + + + + + + + +
+
+

Docs (100% documented)

+
+
+
+ +
+
+ +
+
+
+ +

IDZSwiftCommonCrypto Carthage compatible Build Status

+ +

A Swift wrapper for Apple’s CommonCrypto library.

+

Using IDZSwiftCommonCrypto

+ +

Since CommonCrypto is not a standalone module, you need to generate a fake module map to convince Xcode into allowing you to import CommonCrypto. The GenerateCommonCryptoModule script provides two methods for doing this. Which method you choose depends on whether you want to able to use CommonCrypto and, by extension, IDZSwiftCommonCrypto in playgrounds.

+ +

To make CommonCrypto available to frameworks and playground use the command: +bash + ./GenerateCommonCryptoModule iphonesimulator8.0 +

+ +

This command creates a CommonCrypto.framework in the SDK system library directory. You should now be able to use either CommonCrypto or IDZSwiftCommonCrypto in a playground simply importing them or in your own app project by dragging the IDZSwiftCommonCrypto.xcodeproj into your project.

+ +

If you do not want to add any files to your SDK you can use the command +bash + ./GenerateCommonCryptoModule iphonesimulator8.0 . + +This method creates a CommonCrypto directory within the IDZSwiftCommonCrypto source tree, so the SDK directories are not altered, but the module is not available in playgrounds. To use the framework in your own project drag the IDZSwiftCommonCrypto.xcodeproj into your project and set the Module Import Path to the directory containing the CommonCrypto directory created by the script. For more about this, see my blog post Using CommonCrypto in Swift

+
import IDZSwiftCommonCrypto
+
+

Using Digest

+ +

To calculate a message digest you create an instance of Digest, call update one or more times with the data over which the digest is being calculated and finally call final to obtain the digest itself.

+ +

The update method can take a String +“`swift +let s = The quick brown fox jumps over the lazy dog. +var md5s2 : Digest = Digest(algorithm:.MD5) +md5s2.update(s) +let digests2 = md5s2.final()

+ +

// According to Wikipedia this should be +// e4d909c290d0fb1ca068ffaddf22cbd0 +hexStringFromArray(digests2) +assert(digests2 == arrayFromHexString(e4d909c290d0fb1ca068ffaddf22cbd0)) + +or an array of `UInt8` elements: +swift +let b : [UInt8] = +[0x54,0x68,0x65,0x20,0x71,0x75,0x69,0x63, +0x6b,0x20,0x62,0x72,0x6f,0x77,0x6e,0x20, +0x66,0x6f,0x78,0x2e] +var md5s1 : Digest = Digest(algorithm:.MD5) +md5s1.update(b) +let digests1 = md5s1.final() +”`

+ +

If you only have a single buffer you can simply write +swift + var digests3 = Digest(algorithm: .MD5).update(b)?.final() // digest is of type [UInt8]? + +or +swift + var digests4 = Digest(algorithm: .MD5).update(s)?.final() // digest is of type [UInt8]? +

+

Supported Algorithms

+ +

The Digest class supports the following algorithms:

+ +
    +
  • .MD2
  • +
  • .MD4
  • +
  • .MD5
  • +
  • .SHA1
  • +
  • .SHA224
  • +
  • .SHA256
  • +
  • .SHA384
  • +
  • .SHA512
  • +
+

Using HMAC

+ +

Calculating a keyed-Hash Message Authentication Code (HMAC) is very similar to calculating a message digest, except that the initialization routine now takes a key as well as an algorithm parameter.

+
var keys5 = arrayFromHexString("0102030405060708090a0b0c0d0e0f10111213141516171819")
+var datas5 : [UInt8] = Array(count:50, repeatedValue:0xcd)
+var expecteds5 = arrayFromHexString("4c9007f4026250c6bc8414f9bf50c86c2d7235da")
+var hmacs5 = HMAC(algorithm:.SHA1, key:keys5).update(datas5)?.final()
+
+// RFC2202 says this should be 4c9007f4026250c6bc8414f9bf50c86c2d7235da
+let expectedRFC2202 = arrayFromHexString("4c9007f4026250c6bc8414f9bf50c86c2d7235da")
+assert(hmacs5! == expectedRFC2202)
+
+

Supported Algorithms

+ +
    +
  • SHA1
  • +
  • MD5
  • +
  • SHA224
  • +
  • SHA256
  • +
  • SHA384
  • +
  • SHA512
  • +
+

Using Cryptor

+
var key = arrayFromHexString("2b7e151628aed2a6abf7158809cf4f3c")
+var plainText = "The quick brown fox jumps over the lazy dog. The fox has more or less had it at this point."
+
+var cryptor = Cryptor(operation:.Encrypt, algorithm:.AES, options:.PKCS7Padding, key:key, iv:Array<UInt8>())
+var cipherText = cryptor.update(plainText)?.final()
+
+cryptor = Cryptor(operation:.Decrypt, algorithm:.AES, options:.PKCS7Padding, key:key, iv:Array<UInt8>())
+var decryptedPlainText = cryptor.update(cipherText!)?.final()
+var decryptedString = decryptedPlainText!.reduce("") { $0 + String(UnicodeScalar($1)) }
+decryptedString
+assert(decryptedString == plainText)
+
+

Supported Algorithms

+ +
    +
  • .AES
  • +
  • .DES
  • +
  • .TripleDES
  • +
  • .CAST
  • +
  • .RC2
  • +
  • .Blowfish
  • +
+

Using StreamCryptor

+ +

To encrypt a large file or a network stream use StreamCryptor. The StreamCryptor class does not accumulate the encrypted or decrypted data, instead each call to update produces an output buffer.

+ +

The example below shows how to use StreamCryptor to encrypt and decrypt an image file. +“`swift +func crypt(sc : StreamCryptor, inputStream: NSInputStream, outputStream: NSOutputStream, bufferSize: Int) +{ + var inputBuffer = Array(count:1024, repeatedValue:0) + var outputBuffer = Array(count:1024, repeatedValue:0) + inputStream.open() + outputStream.open()

+
var cryptedBytes : UInt = 0    
+while inputStream.hasBytesAvailable
+{
+    let bytesRead = inputStream.read(&inputBuffer, maxLength: inputBuffer.count)
+    let status = sc.update(inputBuffer, byteCountIn: UInt(bytesRead), bufferOut: &outputBuffer, byteCapacityOut: UInt(outputBuffer.count), byteCountOut: &cryptedBytes)
+    assert(status == Status.Success)
+    if(cryptedBytes > 0)
+    {
+        let bytesWritten = outputStream.write(outputBuffer, maxLength: Int(cryptedBytes))
+        assert(bytesWritten == Int(cryptedBytes))
+    }
+}
+let status = sc.final(&outputBuffer, byteCapacityOut: UInt(outputBuffer.count), byteCountOut: &cryptedBytes)    
+assert(status == Status.Success)
+if(cryptedBytes > 0)
+{
+    let bytesWritten = outputStream.write(outputBuffer, maxLength: Int(cryptedBytes))
+    assert(bytesWritten == Int(cryptedBytes))
+}
+inputStream.close()
+outputStream.close()
+
+ +

}

+ +

let imagePath = NSBundle.mainBundle().pathForResource(Riscal, ofType:jpg)! +let tmp = NSTemporaryDirectory() +let encryptedFilePath = tmp.stringByAppendingPathComponent(Riscal.xjpgx) +var decryptedFilePath = tmp.stringByAppendingPathComponent(RiscalDecrypted.jpg)

+ +

var imageInputStream = NSInputStream(fileAtPath: imagePath) +var encryptedFileOutputStream = NSOutputStream(toFileAtPath: encryptedFilePath, append:false) +var encryptedFileInputStream = NSInputStream(fileAtPath: encryptedFilePath) +var decryptedFileOutputStream = NSOutputStream(toFileAtPath: decryptedFilePath, append:false)

+ +

var sc = StreamCryptor(operation:.Encrypt, algorithm:.AES, options:.PKCS7Padding, key:key, iv:Array()) +crypt(sc, imageInputStream, encryptedFileOutputStream, 1024)

+ +

// Uncomment this line to verify that the file is encrypted +//var encryptedImage = UIImage(contentsOfFile:encryptedFile)

+ +

sc = StreamCryptor(operation:.Decrypt, algorithm:.AES, options:.PKCS7Padding, key:key, iv:Array()) +crypt(sc, encryptedFileInputStream, decryptedFileOutputStream, 1024)

+ +

var image = UIImage(named:Riscal.jpg) +var decryptedImage = UIImage(contentsOfFile:decryptedFilePath) +”`

+

Using PBKDF

+ +

The PBKDF class provides a method of deriving keys from a user password. +The following example derives a 20-byte key:

+
let keys6 = PBKDF.deriveKey("password", salt: "salt", prf: .SHA1, rounds: 1, derivedKeyLength: 20)
+// RFC 6070 - Should derive 0c60c80f961f0e71f3a9b524af6012062fe037a6
+let expectedRFC6070 = arrayFromHexString("0c60c80f961f0e71f3a9b524af6012062fe037a6")
+assert(keys6 == expectedRFC6070)
+
+

Supported Pseudo-Random Functions

+ +
    +
  • .SHA1
  • +
  • .SHA224
  • +
  • .SHA256
  • +
  • .SHA384
  • +
  • .SHA512
  • +
+ +
+
+ +
+
+ + + diff --git a/docs/docsets/.docset/Contents/Resources/Documents/js/jazzy.js b/docs/docsets/.docset/Contents/Resources/Documents/js/jazzy.js new file mode 100755 index 0000000..a32d400 --- /dev/null +++ b/docs/docsets/.docset/Contents/Resources/Documents/js/jazzy.js @@ -0,0 +1,31 @@ +window.jazzy = {'docset': false} +if (typeof window.dash != 'undefined') { + document.documentElement.className += ' dash' + window.jazzy.docset = true +} +if (navigator.userAgent.match(/xcode/i)) { + document.documentElement.className += ' xcode' + window.jazzy.docset = true +} + +// On doc load, toggle the URL hash discussion if present +$(document).ready(function() { + if (!window.jazzy.docset) { + var linkToHash = $('a[href="' + window.location.hash +'"]'); + linkToHash.trigger("click"); + } +}); + +// On token click, toggle its discussion and animate token.marginLeft +$(".token").click(function() { + if (window.jazzy.docset) { + return; + } + var link = $(this); + var animationDuration = 300; + var tokenOffset = "15px"; + var original = link.css('marginLeft') == tokenOffset; + link.animate({'margin-left':original ? "0px" : tokenOffset}, animationDuration); + $content = link.parent().parent().next(); + $content.slideToggle(animationDuration); +}); diff --git a/docs/docsets/.docset/Contents/Resources/Documents/js/jquery.min.js b/docs/docsets/.docset/Contents/Resources/Documents/js/jquery.min.js new file mode 100755 index 0000000..ab28a24 --- /dev/null +++ b/docs/docsets/.docset/Contents/Resources/Documents/js/jquery.min.js @@ -0,0 +1,4 @@ +/*! jQuery v1.11.1 | (c) 2005, 2014 jQuery Foundation, Inc. | jquery.org/license */ +!function(a,b){"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){var c=[],d=c.slice,e=c.concat,f=c.push,g=c.indexOf,h={},i=h.toString,j=h.hasOwnProperty,k={},l="1.11.1",m=function(a,b){return new m.fn.init(a,b)},n=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,o=/^-ms-/,p=/-([\da-z])/gi,q=function(a,b){return b.toUpperCase()};m.fn=m.prototype={jquery:l,constructor:m,selector:"",length:0,toArray:function(){return d.call(this)},get:function(a){return null!=a?0>a?this[a+this.length]:this[a]:d.call(this)},pushStack:function(a){var b=m.merge(this.constructor(),a);return b.prevObject=this,b.context=this.context,b},each:function(a,b){return m.each(this,a,b)},map:function(a){return this.pushStack(m.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(d.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(0>a?b:0);return this.pushStack(c>=0&&b>c?[this[c]]:[])},end:function(){return this.prevObject||this.constructor(null)},push:f,sort:c.sort,splice:c.splice},m.extend=m.fn.extend=function(){var a,b,c,d,e,f,g=arguments[0]||{},h=1,i=arguments.length,j=!1;for("boolean"==typeof g&&(j=g,g=arguments[h]||{},h++),"object"==typeof g||m.isFunction(g)||(g={}),h===i&&(g=this,h--);i>h;h++)if(null!=(e=arguments[h]))for(d in e)a=g[d],c=e[d],g!==c&&(j&&c&&(m.isPlainObject(c)||(b=m.isArray(c)))?(b?(b=!1,f=a&&m.isArray(a)?a:[]):f=a&&m.isPlainObject(a)?a:{},g[d]=m.extend(j,f,c)):void 0!==c&&(g[d]=c));return g},m.extend({expando:"jQuery"+(l+Math.random()).replace(/\D/g,""),isReady:!0,error:function(a){throw new Error(a)},noop:function(){},isFunction:function(a){return"function"===m.type(a)},isArray:Array.isArray||function(a){return"array"===m.type(a)},isWindow:function(a){return null!=a&&a==a.window},isNumeric:function(a){return!m.isArray(a)&&a-parseFloat(a)>=0},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},isPlainObject:function(a){var b;if(!a||"object"!==m.type(a)||a.nodeType||m.isWindow(a))return!1;try{if(a.constructor&&!j.call(a,"constructor")&&!j.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}if(k.ownLast)for(b in a)return j.call(a,b);for(b in a);return void 0===b||j.call(a,b)},type:function(a){return null==a?a+"":"object"==typeof a||"function"==typeof a?h[i.call(a)]||"object":typeof a},globalEval:function(b){b&&m.trim(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(o,"ms-").replace(p,q)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,b,c){var d,e=0,f=a.length,g=r(a);if(c){if(g){for(;f>e;e++)if(d=b.apply(a[e],c),d===!1)break}else for(e in a)if(d=b.apply(a[e],c),d===!1)break}else if(g){for(;f>e;e++)if(d=b.call(a[e],e,a[e]),d===!1)break}else for(e in a)if(d=b.call(a[e],e,a[e]),d===!1)break;return a},trim:function(a){return null==a?"":(a+"").replace(n,"")},makeArray:function(a,b){var c=b||[];return null!=a&&(r(Object(a))?m.merge(c,"string"==typeof a?[a]:a):f.call(c,a)),c},inArray:function(a,b,c){var d;if(b){if(g)return g.call(b,a,c);for(d=b.length,c=c?0>c?Math.max(0,d+c):c:0;d>c;c++)if(c in b&&b[c]===a)return c}return-1},merge:function(a,b){var c=+b.length,d=0,e=a.length;while(c>d)a[e++]=b[d++];if(c!==c)while(void 0!==b[d])a[e++]=b[d++];return a.length=e,a},grep:function(a,b,c){for(var d,e=[],f=0,g=a.length,h=!c;g>f;f++)d=!b(a[f],f),d!==h&&e.push(a[f]);return e},map:function(a,b,c){var d,f=0,g=a.length,h=r(a),i=[];if(h)for(;g>f;f++)d=b(a[f],f,c),null!=d&&i.push(d);else for(f in a)d=b(a[f],f,c),null!=d&&i.push(d);return e.apply([],i)},guid:1,proxy:function(a,b){var c,e,f;return"string"==typeof b&&(f=a[b],b=a,a=f),m.isFunction(a)?(c=d.call(arguments,2),e=function(){return a.apply(b||this,c.concat(d.call(arguments)))},e.guid=a.guid=a.guid||m.guid++,e):void 0},now:function(){return+new Date},support:k}),m.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(a,b){h["[object "+b+"]"]=b.toLowerCase()});function r(a){var b=a.length,c=m.type(a);return"function"===c||m.isWindow(a)?!1:1===a.nodeType&&b?!0:"array"===c||0===b||"number"==typeof b&&b>0&&b-1 in a}var s=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u="sizzle"+-new Date,v=a.document,w=0,x=0,y=gb(),z=gb(),A=gb(),B=function(a,b){return a===b&&(l=!0),0},C="undefined",D=1<<31,E={}.hasOwnProperty,F=[],G=F.pop,H=F.push,I=F.push,J=F.slice,K=F.indexOf||function(a){for(var b=0,c=this.length;c>b;b++)if(this[b]===a)return b;return-1},L="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",M="[\\x20\\t\\r\\n\\f]",N="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",O=N.replace("w","w#"),P="\\["+M+"*("+N+")(?:"+M+"*([*^$|!~]?=)"+M+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+O+"))|)"+M+"*\\]",Q=":("+N+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+P+")*)|.*)\\)|)",R=new RegExp("^"+M+"+|((?:^|[^\\\\])(?:\\\\.)*)"+M+"+$","g"),S=new RegExp("^"+M+"*,"+M+"*"),T=new RegExp("^"+M+"*([>+~]|"+M+")"+M+"*"),U=new RegExp("="+M+"*([^\\]'\"]*?)"+M+"*\\]","g"),V=new RegExp(Q),W=new RegExp("^"+O+"$"),X={ID:new RegExp("^#("+N+")"),CLASS:new RegExp("^\\.("+N+")"),TAG:new RegExp("^("+N.replace("w","w*")+")"),ATTR:new RegExp("^"+P),PSEUDO:new RegExp("^"+Q),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+M+"*(even|odd|(([+-]|)(\\d*)n|)"+M+"*(?:([+-]|)"+M+"*(\\d+)|))"+M+"*\\)|)","i"),bool:new RegExp("^(?:"+L+")$","i"),needsContext:new RegExp("^"+M+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+M+"*((?:-\\d)?\\d*)"+M+"*\\)|)(?=[^-]|$)","i")},Y=/^(?:input|select|textarea|button)$/i,Z=/^h\d$/i,$=/^[^{]+\{\s*\[native \w/,_=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ab=/[+~]/,bb=/'|\\/g,cb=new RegExp("\\\\([\\da-f]{1,6}"+M+"?|("+M+")|.)","ig"),db=function(a,b,c){var d="0x"+b-65536;return d!==d||c?b:0>d?String.fromCharCode(d+65536):String.fromCharCode(d>>10|55296,1023&d|56320)};try{I.apply(F=J.call(v.childNodes),v.childNodes),F[v.childNodes.length].nodeType}catch(eb){I={apply:F.length?function(a,b){H.apply(a,J.call(b))}:function(a,b){var c=a.length,d=0;while(a[c++]=b[d++]);a.length=c-1}}}function fb(a,b,d,e){var f,h,j,k,l,o,r,s,w,x;if((b?b.ownerDocument||b:v)!==n&&m(b),b=b||n,d=d||[],!a||"string"!=typeof a)return d;if(1!==(k=b.nodeType)&&9!==k)return[];if(p&&!e){if(f=_.exec(a))if(j=f[1]){if(9===k){if(h=b.getElementById(j),!h||!h.parentNode)return d;if(h.id===j)return d.push(h),d}else if(b.ownerDocument&&(h=b.ownerDocument.getElementById(j))&&t(b,h)&&h.id===j)return d.push(h),d}else{if(f[2])return I.apply(d,b.getElementsByTagName(a)),d;if((j=f[3])&&c.getElementsByClassName&&b.getElementsByClassName)return I.apply(d,b.getElementsByClassName(j)),d}if(c.qsa&&(!q||!q.test(a))){if(s=r=u,w=b,x=9===k&&a,1===k&&"object"!==b.nodeName.toLowerCase()){o=g(a),(r=b.getAttribute("id"))?s=r.replace(bb,"\\$&"):b.setAttribute("id",s),s="[id='"+s+"'] ",l=o.length;while(l--)o[l]=s+qb(o[l]);w=ab.test(a)&&ob(b.parentNode)||b,x=o.join(",")}if(x)try{return I.apply(d,w.querySelectorAll(x)),d}catch(y){}finally{r||b.removeAttribute("id")}}}return i(a.replace(R,"$1"),b,d,e)}function gb(){var a=[];function b(c,e){return a.push(c+" ")>d.cacheLength&&delete b[a.shift()],b[c+" "]=e}return b}function hb(a){return a[u]=!0,a}function ib(a){var b=n.createElement("div");try{return!!a(b)}catch(c){return!1}finally{b.parentNode&&b.parentNode.removeChild(b),b=null}}function jb(a,b){var c=a.split("|"),e=a.length;while(e--)d.attrHandle[c[e]]=b}function kb(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&(~b.sourceIndex||D)-(~a.sourceIndex||D);if(d)return d;if(c)while(c=c.nextSibling)if(c===b)return-1;return a?1:-1}function lb(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function mb(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function nb(a){return hb(function(b){return b=+b,hb(function(c,d){var e,f=a([],c.length,b),g=f.length;while(g--)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function ob(a){return a&&typeof a.getElementsByTagName!==C&&a}c=fb.support={},f=fb.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return b?"HTML"!==b.nodeName:!1},m=fb.setDocument=function(a){var b,e=a?a.ownerDocument||a:v,g=e.defaultView;return e!==n&&9===e.nodeType&&e.documentElement?(n=e,o=e.documentElement,p=!f(e),g&&g!==g.top&&(g.addEventListener?g.addEventListener("unload",function(){m()},!1):g.attachEvent&&g.attachEvent("onunload",function(){m()})),c.attributes=ib(function(a){return a.className="i",!a.getAttribute("className")}),c.getElementsByTagName=ib(function(a){return a.appendChild(e.createComment("")),!a.getElementsByTagName("*").length}),c.getElementsByClassName=$.test(e.getElementsByClassName)&&ib(function(a){return a.innerHTML="
",a.firstChild.className="i",2===a.getElementsByClassName("i").length}),c.getById=ib(function(a){return o.appendChild(a).id=u,!e.getElementsByName||!e.getElementsByName(u).length}),c.getById?(d.find.ID=function(a,b){if(typeof b.getElementById!==C&&p){var c=b.getElementById(a);return c&&c.parentNode?[c]:[]}},d.filter.ID=function(a){var b=a.replace(cb,db);return function(a){return a.getAttribute("id")===b}}):(delete d.find.ID,d.filter.ID=function(a){var b=a.replace(cb,db);return function(a){var c=typeof a.getAttributeNode!==C&&a.getAttributeNode("id");return c&&c.value===b}}),d.find.TAG=c.getElementsByTagName?function(a,b){return typeof b.getElementsByTagName!==C?b.getElementsByTagName(a):void 0}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);if("*"===a){while(c=f[e++])1===c.nodeType&&d.push(c);return d}return f},d.find.CLASS=c.getElementsByClassName&&function(a,b){return typeof b.getElementsByClassName!==C&&p?b.getElementsByClassName(a):void 0},r=[],q=[],(c.qsa=$.test(e.querySelectorAll))&&(ib(function(a){a.innerHTML="",a.querySelectorAll("[msallowclip^='']").length&&q.push("[*^$]="+M+"*(?:''|\"\")"),a.querySelectorAll("[selected]").length||q.push("\\["+M+"*(?:value|"+L+")"),a.querySelectorAll(":checked").length||q.push(":checked")}),ib(function(a){var b=e.createElement("input");b.setAttribute("type","hidden"),a.appendChild(b).setAttribute("name","D"),a.querySelectorAll("[name=d]").length&&q.push("name"+M+"*[*^$|!~]?="),a.querySelectorAll(":enabled").length||q.push(":enabled",":disabled"),a.querySelectorAll("*,:x"),q.push(",.*:")})),(c.matchesSelector=$.test(s=o.matches||o.webkitMatchesSelector||o.mozMatchesSelector||o.oMatchesSelector||o.msMatchesSelector))&&ib(function(a){c.disconnectedMatch=s.call(a,"div"),s.call(a,"[s!='']:x"),r.push("!=",Q)}),q=q.length&&new RegExp(q.join("|")),r=r.length&&new RegExp(r.join("|")),b=$.test(o.compareDocumentPosition),t=b||$.test(o.contains)?function(a,b){var c=9===a.nodeType?a.documentElement:a,d=b&&b.parentNode;return a===d||!(!d||1!==d.nodeType||!(c.contains?c.contains(d):a.compareDocumentPosition&&16&a.compareDocumentPosition(d)))}:function(a,b){if(b)while(b=b.parentNode)if(b===a)return!0;return!1},B=b?function(a,b){if(a===b)return l=!0,0;var d=!a.compareDocumentPosition-!b.compareDocumentPosition;return d?d:(d=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1,1&d||!c.sortDetached&&b.compareDocumentPosition(a)===d?a===e||a.ownerDocument===v&&t(v,a)?-1:b===e||b.ownerDocument===v&&t(v,b)?1:k?K.call(k,a)-K.call(k,b):0:4&d?-1:1)}:function(a,b){if(a===b)return l=!0,0;var c,d=0,f=a.parentNode,g=b.parentNode,h=[a],i=[b];if(!f||!g)return a===e?-1:b===e?1:f?-1:g?1:k?K.call(k,a)-K.call(k,b):0;if(f===g)return kb(a,b);c=a;while(c=c.parentNode)h.unshift(c);c=b;while(c=c.parentNode)i.unshift(c);while(h[d]===i[d])d++;return d?kb(h[d],i[d]):h[d]===v?-1:i[d]===v?1:0},e):n},fb.matches=function(a,b){return fb(a,null,null,b)},fb.matchesSelector=function(a,b){if((a.ownerDocument||a)!==n&&m(a),b=b.replace(U,"='$1']"),!(!c.matchesSelector||!p||r&&r.test(b)||q&&q.test(b)))try{var d=s.call(a,b);if(d||c.disconnectedMatch||a.document&&11!==a.document.nodeType)return d}catch(e){}return fb(b,n,null,[a]).length>0},fb.contains=function(a,b){return(a.ownerDocument||a)!==n&&m(a),t(a,b)},fb.attr=function(a,b){(a.ownerDocument||a)!==n&&m(a);var e=d.attrHandle[b.toLowerCase()],f=e&&E.call(d.attrHandle,b.toLowerCase())?e(a,b,!p):void 0;return void 0!==f?f:c.attributes||!p?a.getAttribute(b):(f=a.getAttributeNode(b))&&f.specified?f.value:null},fb.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},fb.uniqueSort=function(a){var b,d=[],e=0,f=0;if(l=!c.detectDuplicates,k=!c.sortStable&&a.slice(0),a.sort(B),l){while(b=a[f++])b===a[f]&&(e=d.push(f));while(e--)a.splice(d[e],1)}return k=null,a},e=fb.getText=function(a){var b,c="",d=0,f=a.nodeType;if(f){if(1===f||9===f||11===f){if("string"==typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=e(a)}else if(3===f||4===f)return a.nodeValue}else while(b=a[d++])c+=e(b);return c},d=fb.selectors={cacheLength:50,createPseudo:hb,match:X,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(cb,db),a[3]=(a[3]||a[4]||a[5]||"").replace(cb,db),"~="===a[2]&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),"nth"===a[1].slice(0,3)?(a[3]||fb.error(a[0]),a[4]=+(a[4]?a[5]+(a[6]||1):2*("even"===a[3]||"odd"===a[3])),a[5]=+(a[7]+a[8]||"odd"===a[3])):a[3]&&fb.error(a[0]),a},PSEUDO:function(a){var b,c=!a[6]&&a[2];return X.CHILD.test(a[0])?null:(a[3]?a[2]=a[4]||a[5]||"":c&&V.test(c)&&(b=g(c,!0))&&(b=c.indexOf(")",c.length-b)-c.length)&&(a[0]=a[0].slice(0,b),a[2]=c.slice(0,b)),a.slice(0,3))}},filter:{TAG:function(a){var b=a.replace(cb,db).toLowerCase();return"*"===a?function(){return!0}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=y[a+" "];return b||(b=new RegExp("(^|"+M+")"+a+"("+M+"|$)"))&&y(a,function(a){return b.test("string"==typeof a.className&&a.className||typeof a.getAttribute!==C&&a.getAttribute("class")||"")})},ATTR:function(a,b,c){return function(d){var e=fb.attr(d,a);return null==e?"!="===b:b?(e+="","="===b?e===c:"!="===b?e!==c:"^="===b?c&&0===e.indexOf(c):"*="===b?c&&e.indexOf(c)>-1:"$="===b?c&&e.slice(-c.length)===c:"~="===b?(" "+e+" ").indexOf(c)>-1:"|="===b?e===c||e.slice(0,c.length+1)===c+"-":!1):!0}},CHILD:function(a,b,c,d,e){var f="nth"!==a.slice(0,3),g="last"!==a.slice(-4),h="of-type"===b;return 1===d&&0===e?function(a){return!!a.parentNode}:function(b,c,i){var j,k,l,m,n,o,p=f!==g?"nextSibling":"previousSibling",q=b.parentNode,r=h&&b.nodeName.toLowerCase(),s=!i&&!h;if(q){if(f){while(p){l=b;while(l=l[p])if(h?l.nodeName.toLowerCase()===r:1===l.nodeType)return!1;o=p="only"===a&&!o&&"nextSibling"}return!0}if(o=[g?q.firstChild:q.lastChild],g&&s){k=q[u]||(q[u]={}),j=k[a]||[],n=j[0]===w&&j[1],m=j[0]===w&&j[2],l=n&&q.childNodes[n];while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if(1===l.nodeType&&++m&&l===b){k[a]=[w,n,m];break}}else if(s&&(j=(b[u]||(b[u]={}))[a])&&j[0]===w)m=j[1];else while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if((h?l.nodeName.toLowerCase()===r:1===l.nodeType)&&++m&&(s&&((l[u]||(l[u]={}))[a]=[w,m]),l===b))break;return m-=e,m===d||m%d===0&&m/d>=0}}},PSEUDO:function(a,b){var c,e=d.pseudos[a]||d.setFilters[a.toLowerCase()]||fb.error("unsupported pseudo: "+a);return e[u]?e(b):e.length>1?(c=[a,a,"",b],d.setFilters.hasOwnProperty(a.toLowerCase())?hb(function(a,c){var d,f=e(a,b),g=f.length;while(g--)d=K.call(a,f[g]),a[d]=!(c[d]=f[g])}):function(a){return e(a,0,c)}):e}},pseudos:{not:hb(function(a){var b=[],c=[],d=h(a.replace(R,"$1"));return d[u]?hb(function(a,b,c,e){var f,g=d(a,null,e,[]),h=a.length;while(h--)(f=g[h])&&(a[h]=!(b[h]=f))}):function(a,e,f){return b[0]=a,d(b,null,f,c),!c.pop()}}),has:hb(function(a){return function(b){return fb(a,b).length>0}}),contains:hb(function(a){return function(b){return(b.textContent||b.innerText||e(b)).indexOf(a)>-1}}),lang:hb(function(a){return W.test(a||"")||fb.error("unsupported lang: "+a),a=a.replace(cb,db).toLowerCase(),function(b){var c;do if(c=p?b.lang:b.getAttribute("xml:lang")||b.getAttribute("lang"))return c=c.toLowerCase(),c===a||0===c.indexOf(a+"-");while((b=b.parentNode)&&1===b.nodeType);return!1}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===o},focus:function(a){return a===n.activeElement&&(!n.hasFocus||n.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:function(a){return a.disabled===!1},disabled:function(a){return a.disabled===!0},checked:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&!!a.checked||"option"===b&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeType<6)return!1;return!0},parent:function(a){return!d.pseudos.empty(a)},header:function(a){return Z.test(a.nodeName)},input:function(a){return Y.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&"button"===a.type||"button"===b},text:function(a){var b;return"input"===a.nodeName.toLowerCase()&&"text"===a.type&&(null==(b=a.getAttribute("type"))||"text"===b.toLowerCase())},first:nb(function(){return[0]}),last:nb(function(a,b){return[b-1]}),eq:nb(function(a,b,c){return[0>c?c+b:c]}),even:nb(function(a,b){for(var c=0;b>c;c+=2)a.push(c);return a}),odd:nb(function(a,b){for(var c=1;b>c;c+=2)a.push(c);return a}),lt:nb(function(a,b,c){for(var d=0>c?c+b:c;--d>=0;)a.push(d);return a}),gt:nb(function(a,b,c){for(var d=0>c?c+b:c;++db;b++)d+=a[b].value;return d}function rb(a,b,c){var d=b.dir,e=c&&"parentNode"===d,f=x++;return b.first?function(b,c,f){while(b=b[d])if(1===b.nodeType||e)return a(b,c,f)}:function(b,c,g){var h,i,j=[w,f];if(g){while(b=b[d])if((1===b.nodeType||e)&&a(b,c,g))return!0}else while(b=b[d])if(1===b.nodeType||e){if(i=b[u]||(b[u]={}),(h=i[d])&&h[0]===w&&h[1]===f)return j[2]=h[2];if(i[d]=j,j[2]=a(b,c,g))return!0}}}function sb(a){return a.length>1?function(b,c,d){var e=a.length;while(e--)if(!a[e](b,c,d))return!1;return!0}:a[0]}function tb(a,b,c){for(var d=0,e=b.length;e>d;d++)fb(a,b[d],c);return c}function ub(a,b,c,d,e){for(var f,g=[],h=0,i=a.length,j=null!=b;i>h;h++)(f=a[h])&&(!c||c(f,d,e))&&(g.push(f),j&&b.push(h));return g}function vb(a,b,c,d,e,f){return d&&!d[u]&&(d=vb(d)),e&&!e[u]&&(e=vb(e,f)),hb(function(f,g,h,i){var j,k,l,m=[],n=[],o=g.length,p=f||tb(b||"*",h.nodeType?[h]:h,[]),q=!a||!f&&b?p:ub(p,m,a,h,i),r=c?e||(f?a:o||d)?[]:g:q;if(c&&c(q,r,h,i),d){j=ub(r,n),d(j,[],h,i),k=j.length;while(k--)(l=j[k])&&(r[n[k]]=!(q[n[k]]=l))}if(f){if(e||a){if(e){j=[],k=r.length;while(k--)(l=r[k])&&j.push(q[k]=l);e(null,r=[],j,i)}k=r.length;while(k--)(l=r[k])&&(j=e?K.call(f,l):m[k])>-1&&(f[j]=!(g[j]=l))}}else r=ub(r===g?r.splice(o,r.length):r),e?e(null,g,r,i):I.apply(g,r)})}function wb(a){for(var b,c,e,f=a.length,g=d.relative[a[0].type],h=g||d.relative[" "],i=g?1:0,k=rb(function(a){return a===b},h,!0),l=rb(function(a){return K.call(b,a)>-1},h,!0),m=[function(a,c,d){return!g&&(d||c!==j)||((b=c).nodeType?k(a,c,d):l(a,c,d))}];f>i;i++)if(c=d.relative[a[i].type])m=[rb(sb(m),c)];else{if(c=d.filter[a[i].type].apply(null,a[i].matches),c[u]){for(e=++i;f>e;e++)if(d.relative[a[e].type])break;return vb(i>1&&sb(m),i>1&&qb(a.slice(0,i-1).concat({value:" "===a[i-2].type?"*":""})).replace(R,"$1"),c,e>i&&wb(a.slice(i,e)),f>e&&wb(a=a.slice(e)),f>e&&qb(a))}m.push(c)}return sb(m)}function xb(a,b){var c=b.length>0,e=a.length>0,f=function(f,g,h,i,k){var l,m,o,p=0,q="0",r=f&&[],s=[],t=j,u=f||e&&d.find.TAG("*",k),v=w+=null==t?1:Math.random()||.1,x=u.length;for(k&&(j=g!==n&&g);q!==x&&null!=(l=u[q]);q++){if(e&&l){m=0;while(o=a[m++])if(o(l,g,h)){i.push(l);break}k&&(w=v)}c&&((l=!o&&l)&&p--,f&&r.push(l))}if(p+=q,c&&q!==p){m=0;while(o=b[m++])o(r,s,g,h);if(f){if(p>0)while(q--)r[q]||s[q]||(s[q]=G.call(i));s=ub(s)}I.apply(i,s),k&&!f&&s.length>0&&p+b.length>1&&fb.uniqueSort(i)}return k&&(w=v,j=t),r};return c?hb(f):f}return h=fb.compile=function(a,b){var c,d=[],e=[],f=A[a+" "];if(!f){b||(b=g(a)),c=b.length;while(c--)f=wb(b[c]),f[u]?d.push(f):e.push(f);f=A(a,xb(e,d)),f.selector=a}return f},i=fb.select=function(a,b,e,f){var i,j,k,l,m,n="function"==typeof a&&a,o=!f&&g(a=n.selector||a);if(e=e||[],1===o.length){if(j=o[0]=o[0].slice(0),j.length>2&&"ID"===(k=j[0]).type&&c.getById&&9===b.nodeType&&p&&d.relative[j[1].type]){if(b=(d.find.ID(k.matches[0].replace(cb,db),b)||[])[0],!b)return e;n&&(b=b.parentNode),a=a.slice(j.shift().value.length)}i=X.needsContext.test(a)?0:j.length;while(i--){if(k=j[i],d.relative[l=k.type])break;if((m=d.find[l])&&(f=m(k.matches[0].replace(cb,db),ab.test(j[0].type)&&ob(b.parentNode)||b))){if(j.splice(i,1),a=f.length&&qb(j),!a)return I.apply(e,f),e;break}}}return(n||h(a,o))(f,b,!p,e,ab.test(a)&&ob(b.parentNode)||b),e},c.sortStable=u.split("").sort(B).join("")===u,c.detectDuplicates=!!l,m(),c.sortDetached=ib(function(a){return 1&a.compareDocumentPosition(n.createElement("div"))}),ib(function(a){return a.innerHTML="","#"===a.firstChild.getAttribute("href")})||jb("type|href|height|width",function(a,b,c){return c?void 0:a.getAttribute(b,"type"===b.toLowerCase()?1:2)}),c.attributes&&ib(function(a){return a.innerHTML="",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")})||jb("value",function(a,b,c){return c||"input"!==a.nodeName.toLowerCase()?void 0:a.defaultValue}),ib(function(a){return null==a.getAttribute("disabled")})||jb(L,function(a,b,c){var d;return c?void 0:a[b]===!0?b.toLowerCase():(d=a.getAttributeNode(b))&&d.specified?d.value:null}),fb}(a);m.find=s,m.expr=s.selectors,m.expr[":"]=m.expr.pseudos,m.unique=s.uniqueSort,m.text=s.getText,m.isXMLDoc=s.isXML,m.contains=s.contains;var t=m.expr.match.needsContext,u=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,v=/^.[^:#\[\.,]*$/;function w(a,b,c){if(m.isFunction(b))return m.grep(a,function(a,d){return!!b.call(a,d,a)!==c});if(b.nodeType)return m.grep(a,function(a){return a===b!==c});if("string"==typeof b){if(v.test(b))return m.filter(b,a,c);b=m.filter(b,a)}return m.grep(a,function(a){return m.inArray(a,b)>=0!==c})}m.filter=function(a,b,c){var d=b[0];return c&&(a=":not("+a+")"),1===b.length&&1===d.nodeType?m.find.matchesSelector(d,a)?[d]:[]:m.find.matches(a,m.grep(b,function(a){return 1===a.nodeType}))},m.fn.extend({find:function(a){var b,c=[],d=this,e=d.length;if("string"!=typeof a)return this.pushStack(m(a).filter(function(){for(b=0;e>b;b++)if(m.contains(d[b],this))return!0}));for(b=0;e>b;b++)m.find(a,d[b],c);return c=this.pushStack(e>1?m.unique(c):c),c.selector=this.selector?this.selector+" "+a:a,c},filter:function(a){return this.pushStack(w(this,a||[],!1))},not:function(a){return this.pushStack(w(this,a||[],!0))},is:function(a){return!!w(this,"string"==typeof a&&t.test(a)?m(a):a||[],!1).length}});var x,y=a.document,z=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,A=m.fn.init=function(a,b){var c,d;if(!a)return this;if("string"==typeof a){if(c="<"===a.charAt(0)&&">"===a.charAt(a.length-1)&&a.length>=3?[null,a,null]:z.exec(a),!c||!c[1]&&b)return!b||b.jquery?(b||x).find(a):this.constructor(b).find(a);if(c[1]){if(b=b instanceof m?b[0]:b,m.merge(this,m.parseHTML(c[1],b&&b.nodeType?b.ownerDocument||b:y,!0)),u.test(c[1])&&m.isPlainObject(b))for(c in b)m.isFunction(this[c])?this[c](b[c]):this.attr(c,b[c]);return this}if(d=y.getElementById(c[2]),d&&d.parentNode){if(d.id!==c[2])return x.find(a);this.length=1,this[0]=d}return this.context=y,this.selector=a,this}return a.nodeType?(this.context=this[0]=a,this.length=1,this):m.isFunction(a)?"undefined"!=typeof x.ready?x.ready(a):a(m):(void 0!==a.selector&&(this.selector=a.selector,this.context=a.context),m.makeArray(a,this))};A.prototype=m.fn,x=m(y);var B=/^(?:parents|prev(?:Until|All))/,C={children:!0,contents:!0,next:!0,prev:!0};m.extend({dir:function(a,b,c){var d=[],e=a[b];while(e&&9!==e.nodeType&&(void 0===c||1!==e.nodeType||!m(e).is(c)))1===e.nodeType&&d.push(e),e=e[b];return d},sibling:function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c}}),m.fn.extend({has:function(a){var b,c=m(a,this),d=c.length;return this.filter(function(){for(b=0;d>b;b++)if(m.contains(this,c[b]))return!0})},closest:function(a,b){for(var c,d=0,e=this.length,f=[],g=t.test(a)||"string"!=typeof a?m(a,b||this.context):0;e>d;d++)for(c=this[d];c&&c!==b;c=c.parentNode)if(c.nodeType<11&&(g?g.index(c)>-1:1===c.nodeType&&m.find.matchesSelector(c,a))){f.push(c);break}return this.pushStack(f.length>1?m.unique(f):f)},index:function(a){return a?"string"==typeof a?m.inArray(this[0],m(a)):m.inArray(a.jquery?a[0]:a,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){return this.pushStack(m.unique(m.merge(this.get(),m(a,b))))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}});function D(a,b){do a=a[b];while(a&&1!==a.nodeType);return a}m.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return m.dir(a,"parentNode")},parentsUntil:function(a,b,c){return m.dir(a,"parentNode",c)},next:function(a){return D(a,"nextSibling")},prev:function(a){return D(a,"previousSibling")},nextAll:function(a){return m.dir(a,"nextSibling")},prevAll:function(a){return m.dir(a,"previousSibling")},nextUntil:function(a,b,c){return m.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return m.dir(a,"previousSibling",c)},siblings:function(a){return m.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return m.sibling(a.firstChild)},contents:function(a){return m.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:m.merge([],a.childNodes)}},function(a,b){m.fn[a]=function(c,d){var e=m.map(this,b,c);return"Until"!==a.slice(-5)&&(d=c),d&&"string"==typeof d&&(e=m.filter(d,e)),this.length>1&&(C[a]||(e=m.unique(e)),B.test(a)&&(e=e.reverse())),this.pushStack(e)}});var E=/\S+/g,F={};function G(a){var b=F[a]={};return m.each(a.match(E)||[],function(a,c){b[c]=!0}),b}m.Callbacks=function(a){a="string"==typeof a?F[a]||G(a):m.extend({},a);var b,c,d,e,f,g,h=[],i=!a.once&&[],j=function(l){for(c=a.memory&&l,d=!0,f=g||0,g=0,e=h.length,b=!0;h&&e>f;f++)if(h[f].apply(l[0],l[1])===!1&&a.stopOnFalse){c=!1;break}b=!1,h&&(i?i.length&&j(i.shift()):c?h=[]:k.disable())},k={add:function(){if(h){var d=h.length;!function f(b){m.each(b,function(b,c){var d=m.type(c);"function"===d?a.unique&&k.has(c)||h.push(c):c&&c.length&&"string"!==d&&f(c)})}(arguments),b?e=h.length:c&&(g=d,j(c))}return this},remove:function(){return h&&m.each(arguments,function(a,c){var d;while((d=m.inArray(c,h,d))>-1)h.splice(d,1),b&&(e>=d&&e--,f>=d&&f--)}),this},has:function(a){return a?m.inArray(a,h)>-1:!(!h||!h.length)},empty:function(){return h=[],e=0,this},disable:function(){return h=i=c=void 0,this},disabled:function(){return!h},lock:function(){return i=void 0,c||k.disable(),this},locked:function(){return!i},fireWith:function(a,c){return!h||d&&!i||(c=c||[],c=[a,c.slice?c.slice():c],b?i.push(c):j(c)),this},fire:function(){return k.fireWith(this,arguments),this},fired:function(){return!!d}};return k},m.extend({Deferred:function(a){var b=[["resolve","done",m.Callbacks("once memory"),"resolved"],["reject","fail",m.Callbacks("once memory"),"rejected"],["notify","progress",m.Callbacks("memory")]],c="pending",d={state:function(){return c},always:function(){return e.done(arguments).fail(arguments),this},then:function(){var a=arguments;return m.Deferred(function(c){m.each(b,function(b,f){var g=m.isFunction(a[b])&&a[b];e[f[1]](function(){var a=g&&g.apply(this,arguments);a&&m.isFunction(a.promise)?a.promise().done(c.resolve).fail(c.reject).progress(c.notify):c[f[0]+"With"](this===d?c.promise():this,g?[a]:arguments)})}),a=null}).promise()},promise:function(a){return null!=a?m.extend(a,d):d}},e={};return d.pipe=d.then,m.each(b,function(a,f){var g=f[2],h=f[3];d[f[1]]=g.add,h&&g.add(function(){c=h},b[1^a][2].disable,b[2][2].lock),e[f[0]]=function(){return e[f[0]+"With"](this===e?d:this,arguments),this},e[f[0]+"With"]=g.fireWith}),d.promise(e),a&&a.call(e,e),e},when:function(a){var b=0,c=d.call(arguments),e=c.length,f=1!==e||a&&m.isFunction(a.promise)?e:0,g=1===f?a:m.Deferred(),h=function(a,b,c){return function(e){b[a]=this,c[a]=arguments.length>1?d.call(arguments):e,c===i?g.notifyWith(b,c):--f||g.resolveWith(b,c)}},i,j,k;if(e>1)for(i=new Array(e),j=new Array(e),k=new Array(e);e>b;b++)c[b]&&m.isFunction(c[b].promise)?c[b].promise().done(h(b,k,c)).fail(g.reject).progress(h(b,j,i)):--f;return f||g.resolveWith(k,c),g.promise()}});var H;m.fn.ready=function(a){return m.ready.promise().done(a),this},m.extend({isReady:!1,readyWait:1,holdReady:function(a){a?m.readyWait++:m.ready(!0)},ready:function(a){if(a===!0?!--m.readyWait:!m.isReady){if(!y.body)return setTimeout(m.ready);m.isReady=!0,a!==!0&&--m.readyWait>0||(H.resolveWith(y,[m]),m.fn.triggerHandler&&(m(y).triggerHandler("ready"),m(y).off("ready")))}}});function I(){y.addEventListener?(y.removeEventListener("DOMContentLoaded",J,!1),a.removeEventListener("load",J,!1)):(y.detachEvent("onreadystatechange",J),a.detachEvent("onload",J))}function J(){(y.addEventListener||"load"===event.type||"complete"===y.readyState)&&(I(),m.ready())}m.ready.promise=function(b){if(!H)if(H=m.Deferred(),"complete"===y.readyState)setTimeout(m.ready);else if(y.addEventListener)y.addEventListener("DOMContentLoaded",J,!1),a.addEventListener("load",J,!1);else{y.attachEvent("onreadystatechange",J),a.attachEvent("onload",J);var c=!1;try{c=null==a.frameElement&&y.documentElement}catch(d){}c&&c.doScroll&&!function e(){if(!m.isReady){try{c.doScroll("left")}catch(a){return setTimeout(e,50)}I(),m.ready()}}()}return H.promise(b)};var K="undefined",L;for(L in m(k))break;k.ownLast="0"!==L,k.inlineBlockNeedsLayout=!1,m(function(){var a,b,c,d;c=y.getElementsByTagName("body")[0],c&&c.style&&(b=y.createElement("div"),d=y.createElement("div"),d.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",c.appendChild(d).appendChild(b),typeof b.style.zoom!==K&&(b.style.cssText="display:inline;margin:0;border:0;padding:1px;width:1px;zoom:1",k.inlineBlockNeedsLayout=a=3===b.offsetWidth,a&&(c.style.zoom=1)),c.removeChild(d))}),function(){var a=y.createElement("div");if(null==k.deleteExpando){k.deleteExpando=!0;try{delete a.test}catch(b){k.deleteExpando=!1}}a=null}(),m.acceptData=function(a){var b=m.noData[(a.nodeName+" ").toLowerCase()],c=+a.nodeType||1;return 1!==c&&9!==c?!1:!b||b!==!0&&a.getAttribute("classid")===b};var M=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,N=/([A-Z])/g;function O(a,b,c){if(void 0===c&&1===a.nodeType){var d="data-"+b.replace(N,"-$1").toLowerCase();if(c=a.getAttribute(d),"string"==typeof c){try{c="true"===c?!0:"false"===c?!1:"null"===c?null:+c+""===c?+c:M.test(c)?m.parseJSON(c):c}catch(e){}m.data(a,b,c)}else c=void 0}return c}function P(a){var b;for(b in a)if(("data"!==b||!m.isEmptyObject(a[b]))&&"toJSON"!==b)return!1;return!0}function Q(a,b,d,e){if(m.acceptData(a)){var f,g,h=m.expando,i=a.nodeType,j=i?m.cache:a,k=i?a[h]:a[h]&&h; +if(k&&j[k]&&(e||j[k].data)||void 0!==d||"string"!=typeof b)return k||(k=i?a[h]=c.pop()||m.guid++:h),j[k]||(j[k]=i?{}:{toJSON:m.noop}),("object"==typeof b||"function"==typeof b)&&(e?j[k]=m.extend(j[k],b):j[k].data=m.extend(j[k].data,b)),g=j[k],e||(g.data||(g.data={}),g=g.data),void 0!==d&&(g[m.camelCase(b)]=d),"string"==typeof b?(f=g[b],null==f&&(f=g[m.camelCase(b)])):f=g,f}}function R(a,b,c){if(m.acceptData(a)){var d,e,f=a.nodeType,g=f?m.cache:a,h=f?a[m.expando]:m.expando;if(g[h]){if(b&&(d=c?g[h]:g[h].data)){m.isArray(b)?b=b.concat(m.map(b,m.camelCase)):b in d?b=[b]:(b=m.camelCase(b),b=b in d?[b]:b.split(" ")),e=b.length;while(e--)delete d[b[e]];if(c?!P(d):!m.isEmptyObject(d))return}(c||(delete g[h].data,P(g[h])))&&(f?m.cleanData([a],!0):k.deleteExpando||g!=g.window?delete g[h]:g[h]=null)}}}m.extend({cache:{},noData:{"applet ":!0,"embed ":!0,"object ":"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"},hasData:function(a){return a=a.nodeType?m.cache[a[m.expando]]:a[m.expando],!!a&&!P(a)},data:function(a,b,c){return Q(a,b,c)},removeData:function(a,b){return R(a,b)},_data:function(a,b,c){return Q(a,b,c,!0)},_removeData:function(a,b){return R(a,b,!0)}}),m.fn.extend({data:function(a,b){var c,d,e,f=this[0],g=f&&f.attributes;if(void 0===a){if(this.length&&(e=m.data(f),1===f.nodeType&&!m._data(f,"parsedAttrs"))){c=g.length;while(c--)g[c]&&(d=g[c].name,0===d.indexOf("data-")&&(d=m.camelCase(d.slice(5)),O(f,d,e[d])));m._data(f,"parsedAttrs",!0)}return e}return"object"==typeof a?this.each(function(){m.data(this,a)}):arguments.length>1?this.each(function(){m.data(this,a,b)}):f?O(f,a,m.data(f,a)):void 0},removeData:function(a){return this.each(function(){m.removeData(this,a)})}}),m.extend({queue:function(a,b,c){var d;return a?(b=(b||"fx")+"queue",d=m._data(a,b),c&&(!d||m.isArray(c)?d=m._data(a,b,m.makeArray(c)):d.push(c)),d||[]):void 0},dequeue:function(a,b){b=b||"fx";var c=m.queue(a,b),d=c.length,e=c.shift(),f=m._queueHooks(a,b),g=function(){m.dequeue(a,b)};"inprogress"===e&&(e=c.shift(),d--),e&&("fx"===b&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return m._data(a,c)||m._data(a,c,{empty:m.Callbacks("once memory").add(function(){m._removeData(a,b+"queue"),m._removeData(a,c)})})}}),m.fn.extend({queue:function(a,b){var c=2;return"string"!=typeof a&&(b=a,a="fx",c--),arguments.lengthh;h++)b(a[h],c,g?d:d.call(a[h],h,b(a[h],c)));return e?a:j?b.call(a):i?b(a[0],c):f},W=/^(?:checkbox|radio)$/i;!function(){var a=y.createElement("input"),b=y.createElement("div"),c=y.createDocumentFragment();if(b.innerHTML="
a",k.leadingWhitespace=3===b.firstChild.nodeType,k.tbody=!b.getElementsByTagName("tbody").length,k.htmlSerialize=!!b.getElementsByTagName("link").length,k.html5Clone="<:nav>"!==y.createElement("nav").cloneNode(!0).outerHTML,a.type="checkbox",a.checked=!0,c.appendChild(a),k.appendChecked=a.checked,b.innerHTML="",k.noCloneChecked=!!b.cloneNode(!0).lastChild.defaultValue,c.appendChild(b),b.innerHTML="",k.checkClone=b.cloneNode(!0).cloneNode(!0).lastChild.checked,k.noCloneEvent=!0,b.attachEvent&&(b.attachEvent("onclick",function(){k.noCloneEvent=!1}),b.cloneNode(!0).click()),null==k.deleteExpando){k.deleteExpando=!0;try{delete b.test}catch(d){k.deleteExpando=!1}}}(),function(){var b,c,d=y.createElement("div");for(b in{submit:!0,change:!0,focusin:!0})c="on"+b,(k[b+"Bubbles"]=c in a)||(d.setAttribute(c,"t"),k[b+"Bubbles"]=d.attributes[c].expando===!1);d=null}();var X=/^(?:input|select|textarea)$/i,Y=/^key/,Z=/^(?:mouse|pointer|contextmenu)|click/,$=/^(?:focusinfocus|focusoutblur)$/,_=/^([^.]*)(?:\.(.+)|)$/;function ab(){return!0}function bb(){return!1}function cb(){try{return y.activeElement}catch(a){}}m.event={global:{},add:function(a,b,c,d,e){var f,g,h,i,j,k,l,n,o,p,q,r=m._data(a);if(r){c.handler&&(i=c,c=i.handler,e=i.selector),c.guid||(c.guid=m.guid++),(g=r.events)||(g=r.events={}),(k=r.handle)||(k=r.handle=function(a){return typeof m===K||a&&m.event.triggered===a.type?void 0:m.event.dispatch.apply(k.elem,arguments)},k.elem=a),b=(b||"").match(E)||[""],h=b.length;while(h--)f=_.exec(b[h])||[],o=q=f[1],p=(f[2]||"").split(".").sort(),o&&(j=m.event.special[o]||{},o=(e?j.delegateType:j.bindType)||o,j=m.event.special[o]||{},l=m.extend({type:o,origType:q,data:d,handler:c,guid:c.guid,selector:e,needsContext:e&&m.expr.match.needsContext.test(e),namespace:p.join(".")},i),(n=g[o])||(n=g[o]=[],n.delegateCount=0,j.setup&&j.setup.call(a,d,p,k)!==!1||(a.addEventListener?a.addEventListener(o,k,!1):a.attachEvent&&a.attachEvent("on"+o,k))),j.add&&(j.add.call(a,l),l.handler.guid||(l.handler.guid=c.guid)),e?n.splice(n.delegateCount++,0,l):n.push(l),m.event.global[o]=!0);a=null}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,n,o,p,q,r=m.hasData(a)&&m._data(a);if(r&&(k=r.events)){b=(b||"").match(E)||[""],j=b.length;while(j--)if(h=_.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o){l=m.event.special[o]||{},o=(d?l.delegateType:l.bindType)||o,n=k[o]||[],h=h[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),i=f=n.length;while(f--)g=n[f],!e&&q!==g.origType||c&&c.guid!==g.guid||h&&!h.test(g.namespace)||d&&d!==g.selector&&("**"!==d||!g.selector)||(n.splice(f,1),g.selector&&n.delegateCount--,l.remove&&l.remove.call(a,g));i&&!n.length&&(l.teardown&&l.teardown.call(a,p,r.handle)!==!1||m.removeEvent(a,o,r.handle),delete k[o])}else for(o in k)m.event.remove(a,o+b[j],c,d,!0);m.isEmptyObject(k)&&(delete r.handle,m._removeData(a,"events"))}},trigger:function(b,c,d,e){var f,g,h,i,k,l,n,o=[d||y],p=j.call(b,"type")?b.type:b,q=j.call(b,"namespace")?b.namespace.split("."):[];if(h=l=d=d||y,3!==d.nodeType&&8!==d.nodeType&&!$.test(p+m.event.triggered)&&(p.indexOf(".")>=0&&(q=p.split("."),p=q.shift(),q.sort()),g=p.indexOf(":")<0&&"on"+p,b=b[m.expando]?b:new m.Event(p,"object"==typeof b&&b),b.isTrigger=e?2:3,b.namespace=q.join("."),b.namespace_re=b.namespace?new RegExp("(^|\\.)"+q.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,b.result=void 0,b.target||(b.target=d),c=null==c?[b]:m.makeArray(c,[b]),k=m.event.special[p]||{},e||!k.trigger||k.trigger.apply(d,c)!==!1)){if(!e&&!k.noBubble&&!m.isWindow(d)){for(i=k.delegateType||p,$.test(i+p)||(h=h.parentNode);h;h=h.parentNode)o.push(h),l=h;l===(d.ownerDocument||y)&&o.push(l.defaultView||l.parentWindow||a)}n=0;while((h=o[n++])&&!b.isPropagationStopped())b.type=n>1?i:k.bindType||p,f=(m._data(h,"events")||{})[b.type]&&m._data(h,"handle"),f&&f.apply(h,c),f=g&&h[g],f&&f.apply&&m.acceptData(h)&&(b.result=f.apply(h,c),b.result===!1&&b.preventDefault());if(b.type=p,!e&&!b.isDefaultPrevented()&&(!k._default||k._default.apply(o.pop(),c)===!1)&&m.acceptData(d)&&g&&d[p]&&!m.isWindow(d)){l=d[g],l&&(d[g]=null),m.event.triggered=p;try{d[p]()}catch(r){}m.event.triggered=void 0,l&&(d[g]=l)}return b.result}},dispatch:function(a){a=m.event.fix(a);var b,c,e,f,g,h=[],i=d.call(arguments),j=(m._data(this,"events")||{})[a.type]||[],k=m.event.special[a.type]||{};if(i[0]=a,a.delegateTarget=this,!k.preDispatch||k.preDispatch.call(this,a)!==!1){h=m.event.handlers.call(this,a,j),b=0;while((f=h[b++])&&!a.isPropagationStopped()){a.currentTarget=f.elem,g=0;while((e=f.handlers[g++])&&!a.isImmediatePropagationStopped())(!a.namespace_re||a.namespace_re.test(e.namespace))&&(a.handleObj=e,a.data=e.data,c=((m.event.special[e.origType]||{}).handle||e.handler).apply(f.elem,i),void 0!==c&&(a.result=c)===!1&&(a.preventDefault(),a.stopPropagation()))}return k.postDispatch&&k.postDispatch.call(this,a),a.result}},handlers:function(a,b){var c,d,e,f,g=[],h=b.delegateCount,i=a.target;if(h&&i.nodeType&&(!a.button||"click"!==a.type))for(;i!=this;i=i.parentNode||this)if(1===i.nodeType&&(i.disabled!==!0||"click"!==a.type)){for(e=[],f=0;h>f;f++)d=b[f],c=d.selector+" ",void 0===e[c]&&(e[c]=d.needsContext?m(c,this).index(i)>=0:m.find(c,this,null,[i]).length),e[c]&&e.push(d);e.length&&g.push({elem:i,handlers:e})}return h]","i"),hb=/^\s+/,ib=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,jb=/<([\w:]+)/,kb=/\s*$/g,rb={option:[1,""],legend:[1,"
","
"],area:[1,"",""],param:[1,"",""],thead:[1,"","
"],tr:[2,"","
"],col:[2,"","
"],td:[3,"","
"],_default:k.htmlSerialize?[0,"",""]:[1,"X
","
"]},sb=db(y),tb=sb.appendChild(y.createElement("div"));rb.optgroup=rb.option,rb.tbody=rb.tfoot=rb.colgroup=rb.caption=rb.thead,rb.th=rb.td;function ub(a,b){var c,d,e=0,f=typeof a.getElementsByTagName!==K?a.getElementsByTagName(b||"*"):typeof a.querySelectorAll!==K?a.querySelectorAll(b||"*"):void 0;if(!f)for(f=[],c=a.childNodes||a;null!=(d=c[e]);e++)!b||m.nodeName(d,b)?f.push(d):m.merge(f,ub(d,b));return void 0===b||b&&m.nodeName(a,b)?m.merge([a],f):f}function vb(a){W.test(a.type)&&(a.defaultChecked=a.checked)}function wb(a,b){return m.nodeName(a,"table")&&m.nodeName(11!==b.nodeType?b:b.firstChild,"tr")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function xb(a){return a.type=(null!==m.find.attr(a,"type"))+"/"+a.type,a}function yb(a){var b=pb.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function zb(a,b){for(var c,d=0;null!=(c=a[d]);d++)m._data(c,"globalEval",!b||m._data(b[d],"globalEval"))}function Ab(a,b){if(1===b.nodeType&&m.hasData(a)){var c,d,e,f=m._data(a),g=m._data(b,f),h=f.events;if(h){delete g.handle,g.events={};for(c in h)for(d=0,e=h[c].length;e>d;d++)m.event.add(b,c,h[c][d])}g.data&&(g.data=m.extend({},g.data))}}function Bb(a,b){var c,d,e;if(1===b.nodeType){if(c=b.nodeName.toLowerCase(),!k.noCloneEvent&&b[m.expando]){e=m._data(b);for(d in e.events)m.removeEvent(b,d,e.handle);b.removeAttribute(m.expando)}"script"===c&&b.text!==a.text?(xb(b).text=a.text,yb(b)):"object"===c?(b.parentNode&&(b.outerHTML=a.outerHTML),k.html5Clone&&a.innerHTML&&!m.trim(b.innerHTML)&&(b.innerHTML=a.innerHTML)):"input"===c&&W.test(a.type)?(b.defaultChecked=b.checked=a.checked,b.value!==a.value&&(b.value=a.value)):"option"===c?b.defaultSelected=b.selected=a.defaultSelected:("input"===c||"textarea"===c)&&(b.defaultValue=a.defaultValue)}}m.extend({clone:function(a,b,c){var d,e,f,g,h,i=m.contains(a.ownerDocument,a);if(k.html5Clone||m.isXMLDoc(a)||!gb.test("<"+a.nodeName+">")?f=a.cloneNode(!0):(tb.innerHTML=a.outerHTML,tb.removeChild(f=tb.firstChild)),!(k.noCloneEvent&&k.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||m.isXMLDoc(a)))for(d=ub(f),h=ub(a),g=0;null!=(e=h[g]);++g)d[g]&&Bb(e,d[g]);if(b)if(c)for(h=h||ub(a),d=d||ub(f),g=0;null!=(e=h[g]);g++)Ab(e,d[g]);else Ab(a,f);return d=ub(f,"script"),d.length>0&&zb(d,!i&&ub(a,"script")),d=h=e=null,f},buildFragment:function(a,b,c,d){for(var e,f,g,h,i,j,l,n=a.length,o=db(b),p=[],q=0;n>q;q++)if(f=a[q],f||0===f)if("object"===m.type(f))m.merge(p,f.nodeType?[f]:f);else if(lb.test(f)){h=h||o.appendChild(b.createElement("div")),i=(jb.exec(f)||["",""])[1].toLowerCase(),l=rb[i]||rb._default,h.innerHTML=l[1]+f.replace(ib,"<$1>")+l[2],e=l[0];while(e--)h=h.lastChild;if(!k.leadingWhitespace&&hb.test(f)&&p.push(b.createTextNode(hb.exec(f)[0])),!k.tbody){f="table"!==i||kb.test(f)?""!==l[1]||kb.test(f)?0:h:h.firstChild,e=f&&f.childNodes.length;while(e--)m.nodeName(j=f.childNodes[e],"tbody")&&!j.childNodes.length&&f.removeChild(j)}m.merge(p,h.childNodes),h.textContent="";while(h.firstChild)h.removeChild(h.firstChild);h=o.lastChild}else p.push(b.createTextNode(f));h&&o.removeChild(h),k.appendChecked||m.grep(ub(p,"input"),vb),q=0;while(f=p[q++])if((!d||-1===m.inArray(f,d))&&(g=m.contains(f.ownerDocument,f),h=ub(o.appendChild(f),"script"),g&&zb(h),c)){e=0;while(f=h[e++])ob.test(f.type||"")&&c.push(f)}return h=null,o},cleanData:function(a,b){for(var d,e,f,g,h=0,i=m.expando,j=m.cache,l=k.deleteExpando,n=m.event.special;null!=(d=a[h]);h++)if((b||m.acceptData(d))&&(f=d[i],g=f&&j[f])){if(g.events)for(e in g.events)n[e]?m.event.remove(d,e):m.removeEvent(d,e,g.handle);j[f]&&(delete j[f],l?delete d[i]:typeof d.removeAttribute!==K?d.removeAttribute(i):d[i]=null,c.push(f))}}}),m.fn.extend({text:function(a){return V(this,function(a){return void 0===a?m.text(this):this.empty().append((this[0]&&this[0].ownerDocument||y).createTextNode(a))},null,a,arguments.length)},append:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=wb(this,a);b.appendChild(a)}})},prepend:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=wb(this,a);b.insertBefore(a,b.firstChild)}})},before:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling)})},remove:function(a,b){for(var c,d=a?m.filter(a,this):this,e=0;null!=(c=d[e]);e++)b||1!==c.nodeType||m.cleanData(ub(c)),c.parentNode&&(b&&m.contains(c.ownerDocument,c)&&zb(ub(c,"script")),c.parentNode.removeChild(c));return this},empty:function(){for(var a,b=0;null!=(a=this[b]);b++){1===a.nodeType&&m.cleanData(ub(a,!1));while(a.firstChild)a.removeChild(a.firstChild);a.options&&m.nodeName(a,"select")&&(a.options.length=0)}return this},clone:function(a,b){return a=null==a?!1:a,b=null==b?a:b,this.map(function(){return m.clone(this,a,b)})},html:function(a){return V(this,function(a){var b=this[0]||{},c=0,d=this.length;if(void 0===a)return 1===b.nodeType?b.innerHTML.replace(fb,""):void 0;if(!("string"!=typeof a||mb.test(a)||!k.htmlSerialize&&gb.test(a)||!k.leadingWhitespace&&hb.test(a)||rb[(jb.exec(a)||["",""])[1].toLowerCase()])){a=a.replace(ib,"<$1>");try{for(;d>c;c++)b=this[c]||{},1===b.nodeType&&(m.cleanData(ub(b,!1)),b.innerHTML=a);b=0}catch(e){}}b&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(){var a=arguments[0];return this.domManip(arguments,function(b){a=this.parentNode,m.cleanData(ub(this)),a&&a.replaceChild(b,this)}),a&&(a.length||a.nodeType)?this:this.remove()},detach:function(a){return this.remove(a,!0)},domManip:function(a,b){a=e.apply([],a);var c,d,f,g,h,i,j=0,l=this.length,n=this,o=l-1,p=a[0],q=m.isFunction(p);if(q||l>1&&"string"==typeof p&&!k.checkClone&&nb.test(p))return this.each(function(c){var d=n.eq(c);q&&(a[0]=p.call(this,c,d.html())),d.domManip(a,b)});if(l&&(i=m.buildFragment(a,this[0].ownerDocument,!1,this),c=i.firstChild,1===i.childNodes.length&&(i=c),c)){for(g=m.map(ub(i,"script"),xb),f=g.length;l>j;j++)d=i,j!==o&&(d=m.clone(d,!0,!0),f&&m.merge(g,ub(d,"script"))),b.call(this[j],d,j);if(f)for(h=g[g.length-1].ownerDocument,m.map(g,yb),j=0;f>j;j++)d=g[j],ob.test(d.type||"")&&!m._data(d,"globalEval")&&m.contains(h,d)&&(d.src?m._evalUrl&&m._evalUrl(d.src):m.globalEval((d.text||d.textContent||d.innerHTML||"").replace(qb,"")));i=c=null}return this}}),m.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){m.fn[a]=function(a){for(var c,d=0,e=[],g=m(a),h=g.length-1;h>=d;d++)c=d===h?this:this.clone(!0),m(g[d])[b](c),f.apply(e,c.get());return this.pushStack(e)}});var Cb,Db={};function Eb(b,c){var d,e=m(c.createElement(b)).appendTo(c.body),f=a.getDefaultComputedStyle&&(d=a.getDefaultComputedStyle(e[0]))?d.display:m.css(e[0],"display");return e.detach(),f}function Fb(a){var b=y,c=Db[a];return c||(c=Eb(a,b),"none"!==c&&c||(Cb=(Cb||m("