[
  {
    "path": ".gitignore",
    "content": "# Xcode\n#\nbuild/\n*.pbxuser\n!default.pbxuser\n*.mode1v3\n!default.mode1v3\n*.mode2v3\n!default.mode2v3\n*.perspectivev3\n!default.perspectivev3\nxcuserdata\n*.xccheckout\n*.moved-aside\nDerivedData\n*.hmap\n*.ipa\n*.xcuserstate\n.DS_Store\n# CocoaPods\n#\n# We recommend against adding the Pods directory to your .gitignore. However\n# you should judge for yourself, the pros and cons are mentioned at:\n# http://guides.cocoapods.org/using/using-cocoapods.html#should-i-ignore-the-pods-directory-in-source-control\n#\n# Pods/\n\n# Carthage\n#\n# Add this line if you want to avoid checking in source code from Carthage dependencies.\n# Carthage/Checkouts\n\nCarthage/Build\n\nArcBit.xcworkspace/xcshareddata/"
  },
  {
    "path": "ArcBit/APIs/TLBitcoinListener.swift",
    "content": "//\n//  TLBitcoinListener.swift\n//  ArcBit\n//\n//  Created by Timothy Lee on 3/14/15.\n//  Copyright (c) 2015 Timothy Lee <stequald01@gmail.com>\n//\n//   This library is free software; you can redistribute it and/or\n//   modify it under the terms of the GNU Lesser General Public\n//   License as published by the Free Software Foundation; either\n//   version 2.1 of the License, or (at your option) any later version.\n//\n//   This library is distributed in the hope that it will be useful,\n//   but WITHOUT ANY WARRANTY; without even the implied warranty of\n//   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n//   Lesser General Public License for more details.\n//\n//   You should have received a copy of the GNU Lesser General Public\n//   License along with this library; if not, write to the Free Software\n//   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,\n//   MA 02110-1301  USA\n\nimport Foundation\n\n@objc class TLTransactionListener: NSObject, SRWebSocketDelegate {\n    let MAX_CONSECUTIVE_FAILED_CONNECTIONS = 5\n    let SEND_EMPTY_PACKET_TIME_INTERVAL = 60.0\n    fileprivate var blockExplorerAPI: TLBlockExplorer?\n    fileprivate var keepAliveTimer: Timer?\n    fileprivate var socket: SocketIOClient?\n    fileprivate var socketIsConnected: Bool = false\n    fileprivate var webSocket: SRWebSocket?\n    var consecutiveFailedConnections = 0\n    \n    struct STATIC_MEMBERS {\n        static var instance: TLTransactionListener?\n    }\n    \n    class func instance() -> (TLTransactionListener) {\n        if (STATIC_MEMBERS.instance == nil) {\n            STATIC_MEMBERS.instance = TLTransactionListener()\n        }\n        return STATIC_MEMBERS.instance!\n    }\n    \n    override init() {\n        super.init()\n        blockExplorerAPI = TLPreferences.getBlockExplorerAPI()\n    }\n    \n    func reconnect() -> () {\n        if (blockExplorerAPI == TLBlockExplorer.blockchain) {\n            DLog(\"websocket reconnect blockchain.info\")\n            self.webSocket?.delegate = nil\n            self.webSocket?.close()\n            \n            self.webSocket = SRWebSocket(urlRequest: URLRequest(url: URL(string: \"wss://ws.blockchain.info/inv\")!))\n\n            self.webSocket?.delegate = self\n            \n            self.webSocket?.open()\n        } else {\n            DLog(\"websocket reconnect insight\")\n            let url = String(format: \"%@\", TLPreferences.getBlockExplorerURL(TLBlockExplorer.insight)!)\n            self.socket = SocketIOClient(socketURL: URL(string: url)!, config: [.log(false), .forcePolling(true)])\n            weak var weakSelf = self\n            self.socket?.on(\"connect\") {data, ack in\n                DLog(\"socketio onConnect\")\n                self.consecutiveFailedConnections = 0\n                weakSelf!.socketIsConnected = true\n                NotificationCenter.default.post(name: Notification.Name(rawValue: TLNotificationEvents.EVENT_TRANSACTION_LISTENER_OPEN()), object: nil, userInfo: nil)\n                weakSelf!.socket!.emit(\"subscribe\", \"inv\")\n            }\n            self.socket?.on(\"disconnect\") {data, ack in\n                DLog(\"socketio onDisconnect\")\n                NotificationCenter.default.post(name: Notification.Name(rawValue: TLNotificationEvents.EVENT_TRANSACTION_LISTENER_CLOSE()), object: nil, userInfo: nil)\n                if self.consecutiveFailedConnections < self.MAX_CONSECUTIVE_FAILED_CONNECTIONS {\n                    self.reconnect()\n                }\n                self.consecutiveFailedConnections += 1\n            }\n            self.socket?.on(\"error\") {data, ack in\n                DLog(\"socketio error: \\(data as AnyObject)\")\n            }\n            self.socket?.on(\"block\") {data, ack in\n                let dataArray = data as NSArray\n                let firstObject: AnyObject? = dataArray.firstObject as AnyObject?\n                // data!.debugDescription is lastest block hash\n                // can't use this to update confirmations on transactions because insight tx does not contain blockheight field\n                DLog(\"socketio received lastest block hash: \\(firstObject!.debugDescription)\")\n                \n            }\n//            self.socket?.on(\"tx\") {data, ack in\n//                DLog(\"socketio__ tx \\(data)\")\n//            }\n            self.socket?.connect()\n        }\n    }\n    \n    func isWebSocketOpen() -> Bool {\n        if (blockExplorerAPI == TLBlockExplorer.blockchain) {\n            guard let webSocket = self.webSocket else { return false }\n            return webSocket.readyState.rawValue == SR_OPEN.rawValue\n        } else {\n            return self.socketIsConnected\n        }\n    }\n    \n    fileprivate func sendWebSocketMessage(_ msg: String) -> Bool {\n        DLog(\"sendWebSocketMessage msg: \\(msg)\")\n        if self.isWebSocketOpen() {\n            self.webSocket?.send(msg)\n            return true\n        } else {\n            DLog(\"Websocket Error: not connect to websocket server\")\n            return false\n        }\n    }\n    \n    @discardableResult func listenToIncomingTransactionForAddress(_ address: String) -> Bool {\n        //DLog(\"listen address: %@\", address)\n        if (blockExplorerAPI == TLBlockExplorer.blockchain) {\n            if self.isWebSocketOpen() {\n                let msg = String(format: \"{\\\"op\\\":\\\"addr_sub\\\", \\\"addr\\\":\\\"%@\\\"}\", address)\n                self.sendWebSocketMessage(msg)\n                return true\n            } else {\n                DLog(\"Websocket Error: not connect to websocket server\")\n                return false\n            }\n        } else {\n            if (self.socketIsConnected) {\n                guard let socket = self.socket else { return false }\n\n                //DLog(\"socketio emit address: \\(address)\")\n                socket.emit(\"unsubscribe\", \"bitcoind/addresstxid\", [address])\n                socket.emit(\"subscribe\", \"bitcoind/addresstxid\", [address])\n                \n                socket.on(\"bitcoind/addresstxid\") {data, ack in\n                    DispatchQueue.global(priority: DispatchQueue.GlobalQueuePriority.high).async {\n                        DLog(\"socketio on data: \\(data)\")\n                        let dataArray = data as NSArray\n                        let dataDictionary = dataArray.firstObject as! NSDictionary\n                        let addr = dataDictionary[\"address\"] as! String\n                        //bad api design, this on is not address specific, will call for every subscribe address\n                        if (addr == address) {\n                            let txHash = dataDictionary[\"txid\"] as! String\n                            //DLog(\"socketio on address: \\(addr)\")\n                            //DLog(\"socketio transaction: \\(txHash)\")\n                            TLBlockExplorerAPI.instance().getTx(txHash, success: {\n                                (txDict: AnyObject?) in\n                                if let txDict = txDict {\n                                    NotificationCenter.default.post(name: Notification.Name(rawValue: TLNotificationEvents.EVENT_NEW_UNCONFIRMED_TRANSACTION()), object: txDict, userInfo: nil)\n                                }\n                                }, failure: {\n                                    (code, status) in\n                            })\n                        }\n                    }\n                }\n                return true\n            } else {\n                return false\n            }\n        }\n    }\n    \n    func close() -> () {\n        if (blockExplorerAPI == TLBlockExplorer.blockchain) {\n            DLog(\"closing blockchain.info websocket\")\n            self.webSocket?.close()\n        } else {\n            DLog(\"closing socketio\")\n            self.socket?.disconnect()\n        }\n    }\n    \n    fileprivate func keepAlive() -> () {\n        keepAliveTimer?.invalidate()\n        keepAliveTimer = nil\n        keepAliveTimer = Timer.scheduledTimer(timeInterval: SEND_EMPTY_PACKET_TIME_INTERVAL,\n            target: self,\n            selector: #selector(TLTransactionListener.sendEmptyPacket),\n            userInfo: nil,\n            repeats: true)\n    }\n    \n    func sendEmptyPacket() -> () {\n        DLog(\"blockchain.info Websocket sendEmptyPacket\")\n        if self.isWebSocketOpen() {\n            self.sendWebSocketMessage(\"\")\n        }\n    }\n \n    func webSocketDidOpen(_ webSocket: SRWebSocket) -> () {\n        DLog(\"blockchain.info webSocketDidOpen\")\n        consecutiveFailedConnections = 0\n        self.sendWebSocketMessage(\"{\\\"op\\\":\\\"blocks_sub\\\"}\")\n\n        self.keepAlive()\n        \n        NotificationCenter.default.post(name: Notification.Name(rawValue: TLNotificationEvents.EVENT_TRANSACTION_LISTENER_OPEN()), object: nil, userInfo: nil)\n    }\n    \n    func webSocket(_ webSocket:SRWebSocket, didFailWithError error:NSError) -> () {\n        DLog(\"blockchain.info Websocket didFailWithError \\(error.description)\")\n        \n        self.webSocket?.delegate = nil\n        self.webSocket?.close()\n        self.webSocket = nil\n        if consecutiveFailedConnections < MAX_CONSECUTIVE_FAILED_CONNECTIONS {\n            self.reconnect()\n        }\n        consecutiveFailedConnections += 1\n    }\n    \n    public func webSocket(_ webSocket: SRWebSocket!, didReceiveMessage message: Any!) {\n        DispatchQueue.global(priority: DispatchQueue.GlobalQueuePriority.high).async {\n            let data = (message as AnyObject).data(using: String.Encoding.utf8.rawValue)\n            \n            let jsonDict = (try! JSONSerialization.jsonObject(with: data!, options: JSONSerialization.ReadingOptions(rawValue: 0))) as! NSDictionary\n            DLog(\"blockchain.info didReceiveMessage \\(jsonDict.description)\")\n\n            if (jsonDict.object(forKey: \"op\") as! String == \"utx\") {\n                NotificationCenter.default.post(name: Notification.Name(rawValue: TLNotificationEvents.EVENT_NEW_UNCONFIRMED_TRANSACTION()), object: jsonDict.object(forKey: \"x\"), userInfo: nil)\n            } else if (jsonDict.object(forKey: \"op\") as! String == \"block\") {\n                NotificationCenter.default.post(name: Notification.Name(rawValue: TLNotificationEvents.EVENT_NEW_BLOCK()), object: jsonDict.object(forKey: \"x\"), userInfo: nil)\n            }\n        }\n    }\n    \n    func webSocket(_ webSocket: SRWebSocket, didCloseWithCode code: Int, reason: String, wasClean: Bool) -> () {\n        if wasClean {\n            DLog(\"blockchain.info Websocket didCloseWithCode With No Error \\(code) \\(reason)\")\n        } else {\n            DLog(\"blockchain.info Websocket didCloseWithCode With Error \\(code) \\(reason)\")\n        }\n        \n        self.webSocket?.delegate = nil\n        self.webSocket?.close()\n        self.webSocket = nil\n        if consecutiveFailedConnections < MAX_CONSECUTIVE_FAILED_CONNECTIONS {\n            self.reconnect()\n        }\n        consecutiveFailedConnections += 1\n        NotificationCenter.default.post(name: Notification.Name(rawValue: TLNotificationEvents.EVENT_TRANSACTION_LISTENER_CLOSE()), object: nil, userInfo: nil)\n    }\n}\n"
  },
  {
    "path": "ArcBit/APIs/TLBlockExplorerAPI.swift",
    "content": "//\n//  TLBlockExplorerAPI.swift\n//  ArcBit\n//\n//  Created by Timothy Lee on 3/14/15.\n//  Copyright (c) 2015 Timothy Lee <stequald01@gmail.com>\n//\n//   This library is free software; you can redistribute it and/or\n//   modify it under the terms of the GNU Lesser General Public\n//   License as published by the Free Software Foundation; either\n//   version 2.1 of the License, or (at your option) any later version.\n//\n//   This library is distributed in the hope that it will be useful,\n//   but WITHOUT ANY WARRANTY; without even the implied warranty of\n//   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n//   Lesser General Public License for more details.\n//\n//   You should have received a copy of the GNU Lesser General Public\n//   License along with this library; if not, write to the Free Software\n//   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,\n//   MA 02110-1301  USA\n\nimport Foundation\n\nenum TLBlockExplorer:Int {\n    case blockchain  = 0\n    case insight     = 1\n    case toshi     = 2\n    case blockr     = 3\n}\n\nclass TLBlockExplorerAPI {\n    \n    struct STATIC_MEMBERS {\n        static var blockExplorerAPI:TLBlockExplorer = .blockchain\n        static var BLOCKEXPLORER_BASE_URL:String? = \"https://blockchain.info/\"\n        static var _instance:TLBlockExplorerAPI? = nil\n    }\n    \n    var blockchainAPI:TLBlockchainAPI? = nil\n    var insightAPI:TLInsightAPI? = nil\n\n    class func instance() -> (TLBlockExplorerAPI) {\n        if(STATIC_MEMBERS._instance == nil) {\n            var blockExplorerURL = TLPreferences.getBlockExplorerURL(TLPreferences.getBlockExplorerAPI())\n            if (blockExplorerURL == nil) {\n                TLPreferences.resetBlockExplorerAPIURL()\n                blockExplorerURL = TLPreferences.getBlockExplorerURL(TLPreferences.getBlockExplorerAPI())\n            }\n            \n            STATIC_MEMBERS.BLOCKEXPLORER_BASE_URL = blockExplorerURL\n            STATIC_MEMBERS.blockExplorerAPI = TLPreferences.getBlockExplorerAPI()\n            STATIC_MEMBERS._instance = TLBlockExplorerAPI()\n        }\n        \n        return STATIC_MEMBERS._instance!\n    }\n    \n    init() {\n        if (STATIC_MEMBERS.blockExplorerAPI == .blockchain) {\n            self.blockchainAPI = TLBlockchainAPI(baseURL: STATIC_MEMBERS.BLOCKEXPLORER_BASE_URL!)\n            //needed for push tx api for stealth addresses\n            self.insightAPI = TLInsightAPI(baseURL: \"https://insight.bitpay.com/\")\n        } else if (STATIC_MEMBERS.blockExplorerAPI == .insight) {\n            self.insightAPI = TLInsightAPI(baseURL: STATIC_MEMBERS.BLOCKEXPLORER_BASE_URL!)\n        }\n    }\n    \n    \n    func getBlockHeight(_ success: @escaping TLNetworking.SuccessHandler, failure:@escaping TLNetworking.FailureHandler) -> (){\n        if (STATIC_MEMBERS.blockExplorerAPI == .blockchain) {\n            self.blockchainAPI!.getBlockHeight({(height:AnyObject!) in\n                let blockHeight = [\"height\": NSNumber(value: (height as! NSString).longLongValue as Int64)]\n                success(blockHeight as AnyObject!)\n                }, failure:failure)\n        }\n        else {\n            //Insight does not have a good way to get block height\n            /*\n            self.insightAPI!.getBlockHeight({(jsonData:AnyObject!) in\n                let blockHeight = [\"height\": ((jsonData as! NSDictionary).objectForKey(\"txoutsetinfo\") as! NSDictionary).objectForKey(\"height\")!]\n                success(blockHeight)\n                }, failure:{(code:NSInteger, status:String!) in })\n            */\n        }\n    }\n    \n    func getAddressesInfoSynchronous(_ addressArray:Array<String>) -> NSDictionary {\n        if (STATIC_MEMBERS.blockExplorerAPI == .blockchain) {\n            return self.blockchainAPI!.getAddressesInfoSynchronous(addressArray)\n        } else {\n            return self.insightAPI!.getAddressesInfoSynchronous(addressArray)\n        }\n    }\n    \n    func getAddressesInfo(_ addressArray:Array<String>, success:@escaping TLNetworking.SuccessHandler, failure:@escaping TLNetworking.FailureHandler)-> () {\n        if (STATIC_MEMBERS.blockExplorerAPI == .blockchain) {\n            self.blockchainAPI!.getAddressesInfo(addressArray, success:success, failure:failure)\n        } else {\n            self.insightAPI!.getAddressesInfo(addressArray, success:success, failure:failure)\n        }\n    }\n    \n    func getUnspentOutputs(_ addressArray:Array<String>, success:@escaping TLNetworking.SuccessHandler, failure:@escaping TLNetworking.FailureHandler) -> () {\n        if (STATIC_MEMBERS.blockExplorerAPI == .blockchain) {\n            self.blockchainAPI!.getUnspentOutputs(addressArray, success:success, failure:failure)\n        } else {\n            self.insightAPI!.getUnspentOutputs(addressArray, success:success, failure:failure)\n        }\n    }\n    \n    func getUnspentOutputsSynchronous(_ addressArray:NSArray) -> NSDictionary {\n        if (STATIC_MEMBERS.blockExplorerAPI == .blockchain) {\n            return self.blockchainAPI!.getUnspentOutputsSynchronous(addressArray)\n        } else {\n            return self.insightAPI!.getUnspentOutputsSynchronous(addressArray)\n        }\n    }\n    \n    func getAddressDataSynchronous(_ address:String) -> NSDictionary {\n        if (STATIC_MEMBERS.blockExplorerAPI == .blockchain) {\n            return self.blockchainAPI!.getAddressDataSynchronous(address)\n        } else {\n            return self.insightAPI!.getAddressDataSynchronous(address)               \n        }\n    }\n    \n    func getAddressData(_ address:String, success:@escaping TLNetworking.SuccessHandler, failure:@escaping TLNetworking.FailureHandler) -> () {\n        if (STATIC_MEMBERS.blockExplorerAPI == .blockchain) {\n            self.blockchainAPI!.getAddressData(address, success:success, failure:failure)\n        } else {\n            self.insightAPI!.getAddressData(address, success: success, failure: failure)\n        }\n    }\n    \n    func getTx(_ txHash:String, success:@escaping TLNetworking.SuccessHandler, failure:@escaping TLNetworking.FailureHandler) -> () {\n        if (STATIC_MEMBERS.blockExplorerAPI == .blockchain) {\n            self.blockchainAPI!.getTx(txHash, success:success, failure:failure)\n        } else {\n            self.insightAPI!.getTx(txHash, success:{(jsonData:AnyObject!) in\n                let transformedTx = TLInsightAPI.insightTxToBlockchainTx(jsonData as! NSDictionary)\n                success(transformedTx)\n                }, failure:{(code, status) in\n                    failure(code, status)\n            })\n        }\n    }\n    \n    func getTxBackground(_ txHash:String, success:@escaping TLNetworking.SuccessHandler, failure:@escaping TLNetworking.FailureHandler) -> () {\n        if (STATIC_MEMBERS.blockExplorerAPI == .blockchain) {\n            self.blockchainAPI!.getTxBackground(txHash, success:success, failure:failure)\n        } else {\n            self.insightAPI!.getTxBackground(txHash, success:{(jsonData:AnyObject!) in\n                let transformedTx = TLInsightAPI.insightTxToBlockchainTx(jsonData as! NSDictionary)\n                success(transformedTx)\n                }, failure:{(code, status) in\n                    failure(code, status)\n            })\n        }\n    }\n    \n    func pushTx(_ txHex:String, txHash:String, success:@escaping TLNetworking.SuccessHandler, failure:@escaping TLNetworking.FailureHandler)-> () {\n        if (STATIC_MEMBERS.blockExplorerAPI == .blockchain) {\n            self.blockchainAPI!.pushTx(txHex, txHash:txHash, success:success, failure:failure)\n        } else {\n            self.insightAPI!.pushTx(txHex, success:success, failure:failure)\n        }\n    }\n    \n    func openWebViewForAddress(_ address:String) -> () {\n        if (STATIC_MEMBERS.blockExplorerAPI == .blockchain) {\n            let endPoint = \"address/\"\n            let url = String(format: \"%@%@%@\", STATIC_MEMBERS.BLOCKEXPLORER_BASE_URL!, endPoint, address)\n            UIApplication.shared.openURL(URL(string: url)!)\n        } else {\n            let endPoint = \"address/\"\n            let url = String(format: \"%@%@%@\",STATIC_MEMBERS.BLOCKEXPLORER_BASE_URL!, endPoint, address)\n            UIApplication.shared.openURL(URL(string:url)!)\n        }\n    }\n    \n    func openWebViewForTransaction(_ txid:String) -> () {\n        if (STATIC_MEMBERS.blockExplorerAPI == .blockchain) {\n            let endPoint = \"tx/\"\n            let url = String(format: \"%@%@%@\",STATIC_MEMBERS.BLOCKEXPLORER_BASE_URL!, endPoint, txid)\n            UIApplication.shared.openURL(URL(string: url)!)\n        } else {\n            let endPoint = \"tx/\"\n            let url = String(format: \"%@%@%@\",STATIC_MEMBERS.BLOCKEXPLORER_BASE_URL!, endPoint, txid)\n            UIApplication.shared.openURL(URL(string: url)!)\n        }\n    }\n}\n"
  },
  {
    "path": "ArcBit/APIs/TLBlockchainAPI.swift",
    "content": "//\n//  TLBlockchainAPI.swift\n//  ArcBit\n//\n//  Created by Timothy Lee on 3/14/15.\n//  Copyright (c) 2015 Timothy Lee <stequald01@gmail.com>\n//\n//   This library is free software; you can redistribute it and/or\n//   modify it under the terms of the GNU Lesser General Public\n//   License as published by the Free Software Foundation; either\n//   version 2.1 of the License, or (at your option) any later version.\n//\n//   This library is distributed in the hope that it will be useful,\n//   but WITHOUT ANY WARRANTY; without even the implied warranty of\n//   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n//   Lesser General Public License for more details.\n//\n//   You should have received a copy of the GNU Lesser General Public\n//   License along with this library; if not, write to the Free Software\n//   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,\n//   MA 02110-1301  USA\n\nimport Foundation\nclass TLBlockchainAPI {\n    \n    struct STATIC_MEMBERS {\n        static let BLOCKCHAIN_ENDPOINT_ADDRESS = \"address/\"\n        static let BLOCKCHAIN_ENDPOINT_TX = \"tx/\"\n        static let BC_REQ_FORMAT  = \"format\"\n        static let BC_REQ_ACTIVE  = \"active\"\n    }\n    \n    var networking:TLNetworking\n    var baseURL:String\n    \n    init(baseURL: String) {\n        self.networking = TLNetworking()\n        self.baseURL = baseURL\n    }\n    \n    func getBlockHeight(_ success: @escaping TLNetworking.SuccessHandler, failure:@escaping TLNetworking.FailureHandler) -> (){\n        let endPoint = \"q/getblockcount\"\n        let url = URL(string: endPoint, relativeTo:URL(string:self.baseURL))\n        \n        self.networking.httpGET(url!, parameters:nil,\n            success: {(jsonData:AnyObject!) in\n                success(jsonData!)\n            }, failure:{(code, status) in\n                if (code == 200) {\n                    success(status as AnyObject!)\n                } else {\n                    failure(code, status)\n                }\n        })\n    }\n    \n    func getAddressData(_ address:String, success:@escaping TLNetworking.SuccessHandler, failure:@escaping TLNetworking.FailureHandler) -> () {\n        let endPoint = String(format:\"%@%@\", STATIC_MEMBERS.BLOCKCHAIN_ENDPOINT_ADDRESS, address)\n        let parameters = [\n            STATIC_MEMBERS.BC_REQ_FORMAT: \"json\"\n        ]\n        let url = URL(string:endPoint, relativeTo:URL(string:self.baseURL))\n        self.networking.httpGET(url!, parameters:parameters as NSDictionary,\n            success:success, failure:failure)\n    }\n    \n    func getAddressDataSynchronous(_ address:String) -> NSDictionary {\n        let endPoint = String(format:\"%@%@\", STATIC_MEMBERS.BLOCKCHAIN_ENDPOINT_ADDRESS, address)\n        let parameters = [\n            STATIC_MEMBERS.BC_REQ_FORMAT: \"json\"\n        ]\n        let url = URL(string:endPoint, relativeTo:URL(string:self.baseURL))\n        return self.networking.httpGETSynchronous(url!, parameters:parameters as NSDictionary) as! NSDictionary\n    }\n    \n    func getTx(_ txHash:String, success:@escaping TLNetworking.SuccessHandler, failure:@escaping TLNetworking.FailureHandler) -> () {\n        let endPoint = String(format:\"%@%@\", STATIC_MEMBERS.BLOCKCHAIN_ENDPOINT_TX, txHash)\n        let parameters = [\n            STATIC_MEMBERS.BC_REQ_FORMAT: \"json\"\n        ]\n        \n        let url = URL(string:endPoint, relativeTo:URL(string:self.baseURL))\n        self.networking.httpGET(url!, parameters:parameters as NSDictionary,\n            success:success, failure:failure)\n    }\n    \n    func getTxBackground(_ txHash:String, success:@escaping TLNetworking.SuccessHandler, failure:@escaping TLNetworking.FailureHandler) -> () {\n        let endPoint = String(format:\"%@%@\", STATIC_MEMBERS.BLOCKCHAIN_ENDPOINT_TX, txHash)\n        let parameters = [\n            STATIC_MEMBERS.BC_REQ_FORMAT: \"json\"\n        ]\n        \n        let url = URL(string:endPoint, relativeTo:URL(string:self.baseURL))\n        self.networking.httpGETBackground(url!, parameters:parameters as NSDictionary,\n            success:success, failure:failure)\n    }\n    \n    func pushTx(_ txHex:String, txHash:String, success:@escaping TLNetworking.SuccessHandler, failure:@escaping TLNetworking.FailureHandler) -> () {\n        let endPoint = \"pushtx\"\n        let parameters = [\n            STATIC_MEMBERS.BC_REQ_FORMAT: \"plain\",\n            \"tx\":txHex\n        ]\n        \n        let url = URL(string:endPoint, relativeTo:URL(string:self.baseURL))\n        self.networking.httpPOST(url!, parameters:parameters as NSDictionary,\n            success:success, failure:failure)\n    }\n    \n    func getUnspentOutputsSynchronous(_ addressArray:NSArray) -> NSDictionary {\n        let endPoint = \"unspent\"\n        let parameters = [\n            STATIC_MEMBERS.BC_REQ_ACTIVE:addressArray.componentsJoined(by: \"|\")\n        ]\n        let url = URL(string:endPoint, relativeTo:URL(string:self.baseURL))\n        return self.networking.httpGETSynchronous(url!, parameters:parameters as NSDictionary) as! NSDictionary\n    }\n    \n    func getUnspentOutputs(_ addressArray:Array<String>, success:@escaping TLNetworking.SuccessHandler, failure:@escaping TLNetworking.FailureHandler) -> () {\n        let endPoint = \"unspent\"\n        let parameters = [\n            STATIC_MEMBERS.BC_REQ_ACTIVE:addressArray.joined(separator: \"|\")\n        ]\n        let url = URL(string:endPoint, relativeTo:URL(string:self.baseURL))\n        self.networking.httpGET(url!, parameters:parameters as NSDictionary,\n            success:success, failure:failure)\n    }\n    \n    func getAddressesInfoSynchronous(_ addressArray:Array<String>) -> NSDictionary{\n        let endPoint = \"multiaddr\"\n        let parameters = [\n            STATIC_MEMBERS.BC_REQ_ACTIVE:addressArray.joined(separator: \"|\"),\n            \"no_buttons\":\"true\"]\n        let url = URL(string:endPoint, relativeTo:URL(string:self.baseURL))\n        return self.networking.httpGETSynchronous(url!, parameters:parameters as NSDictionary) as! NSDictionary\n    }\n    \n    func getAddressesInfo(_ addressArray:Array<String>, success:@escaping TLNetworking.SuccessHandler, failure:@escaping TLNetworking.FailureHandler) -> () {\n        let endPoint = \"multiaddr\"\n        let parameters = [\n            STATIC_MEMBERS.BC_REQ_ACTIVE:addressArray.joined(separator: \"|\"),\n            \"no_buttons\":\"true\"]\n        let url = URL(string:endPoint, relativeTo:URL(string:self.baseURL))\n        self.networking.httpGET(url!, parameters:parameters as NSDictionary,\n            success:success, failure:failure)\n    }\n}\n"
  },
  {
    "path": "ArcBit/APIs/TLBlockrAPI.swift",
    "content": "//\n//  TLBlockrAPI.swift\n//  ArcBit\n//\n//  Created by Timothy Lee on 3/14/15.\n//  Copyright (c) 2015 Timothy Lee <stequald01@gmail.com>\n//\n//   This library is free software; you can redistribute it and/or\n//   modify it under the terms of the GNU Lesser General Public\n//   License as published by the Free Software Foundation; either\n//   version 2.1 of the License, or (at your option) any later version.\n//\n//   This library is distributed in the hope that it will be useful,\n//   but WITHOUT ANY WARRANTY; without even the implied warranty of\n//   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n//   Lesser General Public License for more details.\n//\n//   You should have received a copy of the GNU Lesser General Public\n//   License along with this library; if not, write to the Free Software\n//   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,\n//   MA 02110-1301  USA\n\nimport Foundation\n\nclass TLBlockrAPI {\n    var networking:TLNetworking\n    let baseURL:String = \"https://btc.blockr.io/\"\n    \n    init() {\n        self.networking = TLNetworking()\n    }\n    \n    // https://btc.blockr.io/documentation/api\n    /*\n    //success response from pushTx\n    {\n        code = 200\n        data = txid\n        message = \"\"\n        status = success\n    }\n    */\n    func pushTx(_ txHex: String, success: @escaping TLNetworking.SuccessHandler, failure: @escaping TLNetworking.FailureHandler) {\n        let endPoint = \"api/v1/tx/push\"\n        let parameters = [\n            \"hex\": txHex\n        ]\n        \n        let url = URL(string: endPoint, relativeTo: URL(string: self.baseURL))!\n        self.networking.httpPOST(url, parameters: parameters as NSDictionary,\n            success: success, failure: failure)\n    }\n}\n"
  },
  {
    "path": "ArcBit/APIs/TLExchangeRate.swift",
    "content": "//\n//  TLExchangeRate.swift\n//  ArcBit\n//\n//  Created by Timothy Lee on 3/14/15.\n//  Copyright (c) 2015 Timothy Lee <stequald01@gmail.com>\n//\n//   This library is free software; you can redistribute it and/or\n//   modify it under the terms of the GNU Lesser General Public\n//   License as published by the Free Software Foundation; either\n//   version 2.1 of the License, or (at your option) any later version.\n//\n//   This library is distributed in the hope that it will be useful,\n//   but WITHOUT ANY WARRANTY; without even the implied warranty of\n//   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n//   Lesser General Public License for more details.\n//\n//   You should have received a copy of the GNU Lesser General Public\n//   License along with this library; if not, write to the Free Software\n//   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,\n//   MA 02110-1301  USA\n\nimport Foundation\n\nclass TLExchangeRate {\n    struct STATIC_MEMBERS {\n        static var instance:TLExchangeRate?\n    }\n    \n    fileprivate var exchangeRateDict:NSMutableDictionary? = nil\n    var networking:TLNetworking\n\n    class func instance() -> (TLExchangeRate) {\n        if(STATIC_MEMBERS.instance == nil) {\n            STATIC_MEMBERS.instance = TLExchangeRate()\n        }\n        return STATIC_MEMBERS.instance!\n    }\n    \n    init() {\n        self.networking = TLNetworking()\n        self.exchangeRateDict = NSMutableDictionary()\n        updateExchangeRate()\n    }\n    \n    func updateExchangeRate() {\n        let queue = DispatchQueue.global(priority: DispatchQueue.GlobalQueuePriority.background)\n        queue.async {\n            self.getExchangeRates({ (jsonData:AnyObject!) in\n                let array = jsonData as! NSArray\n                \n                for i in stride(from: 0, to: array.count, by: 1) {\n                    let dict = array[i] as! NSDictionary\n                    (self.exchangeRateDict!)[dict[\"code\"] as! String] = dict\n                }\n                NotificationCenter.default.post(name: Notification.Name(rawValue: TLNotificationEvents.EVENT_EXCHANGE_RATE_UPDATED()),\n                                                object: nil)\n            }, failure: {(code, status) in\n                DLog(\"getExchangeRates failure: code:\\(code) status:\\(status)\")\n            })\n        }    }\n    \n    fileprivate func getExchangeRate(_ currency:String) -> (Double) {\n        if (self.exchangeRateDict == nil || self.exchangeRateDict![currency] == nil) {\n            return 0\n        } else {\n            return ((self.exchangeRateDict![currency] as! NSDictionary)[\"rate\"] as! Double)\n        }\n    }\n    \n    fileprivate func getExchangeRates(_ success: @escaping TLNetworking.SuccessHandler, failure:@escaping TLNetworking.FailureHandler) -> () {\n        self.networking.httpGET(URL(string: \"https://bitpay.com/api/rates\")!,\n            parameters:[:], success:success, failure:failure)\n    }\n    \n    fileprivate func fiatAmountFromBitcoin(_ currency:String, bitcoinAmount:TLCoin) -> (Double) {\n        let exchangeRate = getExchangeRate(currency)\n        return bitcoinAmount.bigIntegerToBitcoin() * exchangeRate\n    }\n\n    func bitcoinAmountFromFiat(_ currency:String, fiatAmount:Double) -> (TLCoin) {\n        let exchangeRate = getExchangeRate(currency)\n        let bitcoinAmount = TLCoin(doubleValue: fiatAmount/exchangeRate)\n        return bitcoinAmount\n    }\n    \n    func fiatAmountStringFromBitcoin(_ currency:String, bitcoinAmount:TLCoin) -> (String){\n        //TODO move bitcoinFormatter to property\n        let bitcoinFormatter = NumberFormatter()\n        bitcoinFormatter.numberStyle = .decimal\n        bitcoinFormatter.maximumFractionDigits = 2\n        return bitcoinFormatter.string(from: NSNumber(value: fiatAmountFromBitcoin(currency, bitcoinAmount:bitcoinAmount) as Double))!\n    }\n}\n"
  },
  {
    "path": "ArcBit/APIs/TLInsightAPI.swift",
    "content": "//\n//  TLInsightAPI.swift\n//  ArcBit\n//\n//  Created by Timothy Lee on 3/14/15.\n//  Copyright (c) 2015 Timothy Lee <stequald01@gmail.com>\n//\n//   This library is free software; you can redistribute it and/or\n//   modify it under the terms of the GNU Lesser General Public\n//   License as published by the Free Software Foundation; either\n//   version 2.1 of the License, or (at your option) any later version.\n//\n//   This library is distributed in the hope that it will be useful,\n//   but WITHOUT ANY WARRANTY; without even the implied warranty of\n//   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n//   Lesser General Public License for more details.\n//\n//   You should have received a copy of the GNU Lesser General Public\n//   License along with this library; if not, write to the Free Software\n//   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,\n//   MA 02110-1301  USA\n\nimport Foundation\n\n\nclass TLInsightAPI {\n    var networking:TLNetworking\n    var baseURL:String\n\n    init(baseURL: String) {\n        self.networking = TLNetworking()\n        self.baseURL = baseURL\n    }\n    \n    func getBlockHeight(_ success: @escaping (TLNetworking.SuccessHandler), failure: @escaping (TLNetworking.FailureHandler)) {\n        let endPoint = \"api/status/\"\n        let parameters = [\n            \"q\": \"getTxOutSetInfo\"\n        ]\n        let url = URL(string: endPoint, relativeTo: URL(string: self.baseURL))!\n        self.networking.httpGET(url, parameters: parameters as NSDictionary,\n            success: {\n                (jsonData) in\n                success(jsonData)\n            }, failure: {\n                (code, status) in\n                failure(code, status)\n        })\n    }\n    \n    func getUnspentOutputsSynchronous(_ addressArray: NSArray) -> NSDictionary {\n        let endPoint = String(format: \"%@%@%@\", \"api/addrs/\", addressArray.componentsJoined(by: \",\"), \"/utxo\")\n        \n        let url = URL(string: endPoint, relativeTo: URL(string: self.baseURL))!\n        \n        let jsonData: AnyObject? = self.networking.httpGETSynchronous(url, parameters: nil)\n        \n        if jsonData is NSDictionary { // if don't get dict http error, will get array\n            return jsonData as! NSDictionary\n        }\n        \n        let transansformedJsonData = TLInsightAPI.insightUnspentOutputsToBlockchainUnspentOutputs(jsonData as! NSArray)\n        \n        return transansformedJsonData\n    }\n    \n    func getUnspentOutputs(_ addressArray: Array<String>, success: @escaping TLNetworking.SuccessHandler, failure: @escaping TLNetworking.FailureHandler) {\n        let endPoint = String(format: \"%@%@%@\", \"api/addrs/\", addressArray.joined(separator: \",\"), \"/utxo\")\n        \n        let url = URL(string: endPoint, relativeTo: URL(string: self.baseURL))!\n        self.networking.httpGET(url, parameters: nil,\n            success: {\n                (jsonData) in\n                \n                let transansformedJsonData = TLInsightAPI.insightUnspentOutputsToBlockchainUnspentOutputs(jsonData as! NSArray) as NSDictionary\n                \n                success(transansformedJsonData)\n            }, failure: {\n                (code, status) in\n                failure(code, status)\n        })\n    }\n    \n    func getAddressesInfoSynchronous(_ addressArray: Array<String>, txCountFrom: Int=0, allTxs: NSMutableArray=[]) -> NSDictionary {\n        let endPoint = String(format: \"%@%@%@\", \"api/addrs/\", addressArray.joined(separator: \",\"), \"/txs\")\n        \n        let parameters = [\"from\":txCountFrom, \"to\":txCountFrom+50]\n\n        let url = URL(string: endPoint, relativeTo: URL(string: self.baseURL))!\n        \n        let jsonData: AnyObject? = self.networking.httpGETSynchronous(url, parameters: parameters as NSDictionary)\n\n        if ((jsonData as! NSDictionary).object(forKey: TLNetworking.STATIC_MEMBERS.HTTP_ERROR_CODE) != nil) {\n            return jsonData as! NSDictionary\n        }\n        \n        let txs = (jsonData as! NSDictionary).object(forKey: \"items\") as! NSArray\n        let to = ((jsonData as! NSDictionary).object(forKey: \"to\") as! NSNumber)\n        let totalItems = ((jsonData as! NSDictionary).object(forKey: \"totalItems\") as! NSNumber).uint64Value\n        \n        if to.uint64Value >= totalItems {\n            if allTxs.count == 0 {\n                let transansformedJsonData = TLInsightAPI.insightAddressesTxsToBlockchainMultiaddr(addressArray as NSArray, txs: txs)\n                return transansformedJsonData\n            } else {\n                allTxs.addObjects(from: txs as [AnyObject])\n                let transansformedJsonData = TLInsightAPI.insightAddressesTxsToBlockchainMultiaddr(addressArray as NSArray, txs: allTxs)\n                return transansformedJsonData\n            }\n        } else {\n            allTxs.addObjects(from: txs as [AnyObject])\n            return self.getAddressesInfoSynchronous(addressArray, txCountFrom: to.intValue, allTxs: allTxs)\n        }\n    }\n    \n    func getAddressesInfo(_ addressArray: Array<String>, txCountFrom: Int=0, allTxs: NSMutableArray=[], success: @escaping TLNetworking.SuccessHandler, failure: @escaping TLNetworking.FailureHandler) {\n        let endPoint = String(format: \"%@%@%@\", \"api/addrs/\", addressArray.joined(separator: \",\"), \"/txs\")\n        let parameters = [\"from\":txCountFrom, \"to\":txCountFrom+50]\n\n        let url = URL(string: endPoint, relativeTo: URL(string: self.baseURL))!\n        \n        self.networking.httpGET(url, parameters: parameters as NSDictionary,\n            success: {\n                (jsonData) in\n \n                let txs = (jsonData as! NSDictionary).object(forKey: \"items\") as! NSArray\n                let to = ((jsonData as! NSDictionary).object(forKey: \"to\") as! NSNumber)\n                let totalItems = ((jsonData as! NSDictionary).object(forKey: \"totalItems\") as! NSNumber).uint64Value\n                if to.uint64Value >= totalItems {\n                    if allTxs.count == 0 {\n                        let transformedJsonData = TLInsightAPI.insightAddressesTxsToBlockchainMultiaddr(addressArray as NSArray, txs: txs)\n                        success(transformedJsonData)\n                    } else {\n                        allTxs.addObjects(from: txs as [AnyObject])\n                        let transformedJsonData = TLInsightAPI.insightAddressesTxsToBlockchainMultiaddr(addressArray as NSArray, txs: allTxs)\n                        success(transformedJsonData)\n                    }\n                } else {\n                    allTxs.addObjects(from: txs as [AnyObject])\n                    self.getAddressesInfo(addressArray, txCountFrom: to.intValue, allTxs: allTxs, success: success, failure: failure)\n                }\n            }, failure: failure)\n    }\n    \n    func getAddressData(_ address: String, success: @escaping TLNetworking.SuccessHandler, failure: @escaping TLNetworking.FailureHandler) {\n        let endPoint = String(format: \"%@%@\", \"api/txs/?address=\", address)\n        \n        let url = URL(string: endPoint, relativeTo: URL(string: self.baseURL))!\n        self.networking.httpGET(url, parameters: nil,\n            success: {\n                (jsonData) in\n                \n                let txs = (jsonData as! NSDictionary!).object(forKey: \"txs\") as! NSArray\n                let transformedTxs = NSMutableArray(capacity:txs.count)\n                \n                for tx in txs as! [NSDictionary] {\n                    if let transformedTx = TLInsightAPI.insightTxToBlockchainTx(tx) {\n                        transformedTxs.add(transformedTx)\n                    }\n                }\n                \n                let transansformedJsonData = NSMutableDictionary()\n                transansformedJsonData.setObject(transformedTxs, forKey:\"txs\" as NSCopying)\n                \n                success(transansformedJsonData)\n            }, failure: failure)\n    }\n    \n    func getAddressDataSynchronous(_ address: String) -> NSDictionary {\n        let endPoint = String(format: \"%@%@\", \"api/txs/?address=\", address)\n        \n        let url = URL(string: endPoint, relativeTo: URL(string: self.baseURL))!\n        let jsonData: AnyObject? = self.networking.httpGETSynchronous(url, parameters: nil)\n        \n        let txs = (jsonData as! NSDictionary!).object(forKey: \"txs\") as! NSArray\n        let transformedTxs = NSMutableArray(capacity:txs.count)\n        \n        for tx in txs as! [NSDictionary] {\n            if let transformedTx = TLInsightAPI.insightTxToBlockchainTx(tx) {\n                transformedTxs.add(transformedTx)\n            }\n        }\n        \n        let transansformedJsonData = NSMutableDictionary()\n        transansformedJsonData.setObject(transformedTxs, forKey:\"txs\" as NSCopying)\n        \n        return transansformedJsonData\n    }\n    \n    func getTx(_ txHash: String, success: @escaping TLNetworking.SuccessHandler, failure: @escaping TLNetworking.FailureHandler) {\n        let endPoint = String(format: \"%@%@\", \"api/tx/\", txHash)\n        \n        let url = URL(string: endPoint, relativeTo: URL(string: self.baseURL))!\n        self.networking.httpGET(url, parameters: nil, success: success, failure: failure)\n    }\n\n    func getTxBackground(_ txHash: String, success: @escaping TLNetworking.SuccessHandler, failure: @escaping TLNetworking.FailureHandler) {\n        let endPoint = String(format: \"%@%@\", \"api/tx/\", txHash)\n        \n        let url = URL(string: endPoint, relativeTo: URL(string: self.baseURL))!\n        self.networking.httpGETBackground(url, parameters: nil, success: success, failure: failure)\n    }\n\n    \n    class func insightToBlockchainUnspentOutput(_ unspentOutputDict: NSDictionary) -> NSDictionary? {\n        // bug in insight, see https://insight.bitpay.com/api/addrs/1GjuCPLhmrdrAdifz1XLdpVVeQjsvZYGou/utxo\n        if unspentOutputDict.object(forKey: \"scriptPubKey\") == nil {\n            // got following so far\n            // insight bug for txid 1cf031f8ac2896994e57c299e23b4ed35e2d218a7c6877302da0e3292337f530 when tried to do f5b0e820f23a6724f669463a6bf2e03806169b3d7fee7b6d27a642840109823d\n            DLog(\"no scriptPubKey, insight bug? txid \\(unspentOutputDict.object(forKey: \"txid\") as! String)\")\n            return nil\n        }\n        \n        let blockchainUnspentOutputDict = NSMutableDictionary()\n        let txid = unspentOutputDict.object(forKey: \"txid\") as! String\n        let txHash = TLWalletUtils.reverseHexString(txid)\n        blockchainUnspentOutputDict.setObject(txHash, forKey: \"tx_hash\" as NSCopying)\n        blockchainUnspentOutputDict.setObject(txid, forKey: \"tx_hash_big_endian\" as NSCopying)\n        blockchainUnspentOutputDict.setObject(unspentOutputDict.object(forKey: \"vout\")!, forKey: \"tx_output_n\" as NSCopying)\n        blockchainUnspentOutputDict.setObject(unspentOutputDict.object(forKey: \"scriptPubKey\")!, forKey: \"script\" as NSCopying)\n        let value = (unspentOutputDict.object(forKey: \"satoshis\") as! NSNumber).uint64Value\n        blockchainUnspentOutputDict.setObject(value, forKey: \"value\" as NSCopying)\n\n        let confirmations: AnyObject? = unspentOutputDict.object(forKey: \"confirmations\") as AnyObject?\n        if (confirmations != nil) {\n            blockchainUnspentOutputDict.setObject(confirmations!, forKey: \"confirmations\" as NSCopying)\n        } else {\n            blockchainUnspentOutputDict.setObject(0, forKey: \"confirmations\" as NSCopying)\n        }\n        \n        return blockchainUnspentOutputDict\n    }\n    \n    func pushTx(_ txHex: String, success: @escaping TLNetworking.SuccessHandler, failure: @escaping TLNetworking.FailureHandler) {\n        let endPoint = \"api/tx/send\"\n        let parameters = [\n            \"rawtx\": txHex\n        ]\n        \n        let url = URL(string: endPoint, relativeTo: URL(string: self.baseURL))!\n        self.networking.httpPOST(url, parameters: parameters as NSDictionary,\n            success: success, failure: failure)\n    }\n    \n    \n    class func insightUnspentOutputsToBlockchainUnspentOutputs(_ unspentOutputs: NSArray) -> NSDictionary {\n        let transansformedUnspentOutputs = NSMutableArray(capacity: unspentOutputs.count)\n        \n        for _unspentOutput in unspentOutputs {\n            let unspentOutput = _unspentOutput as! NSDictionary\n            if let dict = TLInsightAPI.insightToBlockchainUnspentOutput(unspentOutput) {\n                transansformedUnspentOutputs.add(dict)\n            }\n        }\n        \n        let transansformedJsonData = NSMutableDictionary()\n        transansformedJsonData.setObject(transansformedUnspentOutputs, forKey: \"unspent_outputs\" as NSCopying)\n        \n        return transansformedJsonData\n    }\n    \n    class func insightAddressesTxsToBlockchainMultiaddr(_ addressArray: NSArray, txs: NSArray) -> NSDictionary {\n        let addressExistDict = NSMutableDictionary(capacity: addressArray.count)\n        \n        let transansformedAddressesDict = NSMutableDictionary(capacity: addressArray.count)\n        \n        for _address in addressArray {\n            let address = _address as! String\n            addressExistDict.setObject(\"\", forKey: address as NSCopying)\n            \n            let transformedAddress = NSMutableDictionary()\n            transformedAddress.setObject(0, forKey: \"n_tx\" as NSCopying)\n            transformedAddress.setObject(address, forKey: \"address\" as NSCopying)\n            transformedAddress.setObject(TLCoin.zero(), forKey: \"final_balance\" as NSCopying)\n            transansformedAddressesDict.setObject(transformedAddress, forKey: address as NSCopying)\n        }\n        \n        let transformedTxs = NSMutableArray(capacity: txs.count)\n        \n        let transansformedAddresses = NSMutableArray(capacity: addressArray.count)\n        var i = txs.count - 1\n        while i >= 0 {\n            if txs.object(at: i) as! NSObject == NSNull() {\n                i -= 1\n                continue\n            }\n            let tx = txs.object(at: i) as! NSDictionary\n            let transformedTx = TLInsightAPI.insightTxToBlockchainTx(tx)\n            if (transformedTx == nil) {\n                i -= 1\n                continue;\n            }\n            transformedTxs.add(transformedTx!)\n        \n            let inputsArray = transformedTx!.object(forKey: \"inputs\") as? NSArray\n            \n            if (inputsArray != nil) {\n                for _input in inputsArray! {\n                    let input = _input as! NSDictionary\n                    let prevOut = input.object(forKey: \"prev_out\") as? NSDictionary\n                    if (prevOut != nil) {\n                        let addr = prevOut!.object(forKey: \"addr\") as? String\n                        \n                        if (addr != nil && addressExistDict.object(forKey: addr!) != nil) {\n                            let transformedAddress = transansformedAddressesDict.object(forKey: addr!) as! NSMutableDictionary\n                            var addressBalance = transformedAddress.object(forKey: \"final_balance\") as! TLCoin\n\n                            let value = (prevOut!.object(forKey: \"value\") as! NSNumber).uint64Value\n                            addressBalance = addressBalance.subtract(TLCoin(uint64: value))\n                            transformedAddress.setObject(addressBalance, forKey: \"final_balance\" as NSCopying)\n                            \n                            let nTxs = transformedAddress.object(forKey: \"n_tx\") as! Int\n                            transformedAddress.setObject(nTxs + 1, forKey: \"n_tx\" as NSCopying)\n                        }\n                    }\n                    \n                }\n            }\n            \n            let outsArray = transformedTx!.object(forKey: \"out\") as? NSArray\n            \n            if (outsArray != nil) {\n                for _output in outsArray! {\n                    let output = _output as! NSDictionary\n                    let addr = output.object(forKey: \"addr\") as? String\n                    if (addr != nil && addressExistDict.object(forKey: addr!) != nil) {\n                        let transformedAddress = transansformedAddressesDict.object(forKey: addr!) as! NSMutableDictionary\n                        var addressBalance = transformedAddress.object(forKey: \"final_balance\") as! TLCoin\n                        \n                        let value = (output.object(forKey: \"value\") as! NSNumber).uint64Value\n                        addressBalance = addressBalance.add(TLCoin(uint64: value))\n                        transformedAddress.setObject(addressBalance, forKey: \"final_balance\" as NSCopying)\n                        \n                        let nTxs = transformedAddress.object(forKey: \"n_tx\") as! Int\n                        transformedAddress.setObject(nTxs + 1, forKey: \"n_tx\" as NSCopying)\n                    }\n                }\n            }\n            i -= 1\n        }\n        \n        //TODO: need to sort txs because insight does not sort it for you, ask devs to sort array\n        let sortedtransformedTxs = transformedTxs.sortedArray(comparator: {\n            (a, b) -> ComparisonResult in\n            \n            let first = (a as! NSDictionary).object(forKey: \"time\") as! Int\n            if (first == 0) {\n                return ComparisonResult.orderedAscending\n            }\n            \n            let second = (b as! NSDictionary).object(forKey: \"time\") as! Int\n            if (second == 0) {\n                return ComparisonResult.orderedDescending\n            }\n            \n            if(second > first) {\n                return ComparisonResult.orderedDescending\n            }\n            else if (second == first) {\n                return ComparisonResult.orderedSame\n            }\n            return ComparisonResult.orderedAscending\n        })\n        \n        for _key in transansformedAddressesDict {\n            let key = _key.key as! String\n            let transformedAddress = transansformedAddressesDict.object(forKey: key) as! NSMutableDictionary\n            let addressBalance = transformedAddress.object(forKey: \"final_balance\") as! TLCoin\n            transformedAddress.setObject(NSNumber(value: addressBalance.toUInt64() as UInt64), forKey: \"final_balance\" as NSCopying)\n            transansformedAddresses.add(transformedAddress)\n        }\n        \n        let transansformedJsonData = NSMutableDictionary()\n        transansformedJsonData.setObject(sortedtransformedTxs, forKey: \"txs\" as NSCopying)\n        transansformedJsonData.setObject(transansformedAddresses, forKey: \"addresses\" as NSCopying)\n        \n        return transansformedJsonData\n    }\n    \n    class func insightTxToBlockchainTx(_ txDict: NSDictionary) -> NSDictionary? {\n        let blockchainTxDict = NSMutableDictionary()\n        \n        let vins = txDict.object(forKey: \"vin\") as? NSArray\n        let vouts = txDict.object(forKey: \"vout\") as? NSArray\n        //if (vins == nil && vouts == nil && txDict.objectForKey(\"possibleDoubleSpend\") != nil) {\n        if (vins == nil && vouts == nil) {\n            return nil;\n        }\n        \n        if let txid = txDict.object(forKey: \"txid\") {\n            blockchainTxDict.setObject(txid, forKey: \"hash\" as NSCopying)\n        }\n        if let version = txDict.object(forKey: \"version\") {\n            blockchainTxDict.setObject(version, forKey: \"ver\" as NSCopying)\n        }\n        if let size = txDict.object(forKey: \"size\") {\n            blockchainTxDict.setObject(size, forKey: \"size\" as NSCopying)\n        }\n        //WARNING: time dont match on different blockexplorers, and field does not exist if unconfirmed\n        let time: AnyObject? = txDict.object(forKey: \"time\") as AnyObject?\n        if (time != nil) {\n            blockchainTxDict.setObject(time!, forKey: \"time\" as NSCopying)\n        } else {\n            blockchainTxDict.setObject(0, forKey: \"time\" as NSCopying)\n        }\n        //TODO: get current block and compute block_height\n        let confirmations: AnyObject? = txDict.object(forKey: \"confirmations\") as AnyObject?\n        if (confirmations != nil) {\n            blockchainTxDict.setObject(confirmations!, forKey:\"block_height\" as NSCopying)\n            blockchainTxDict.setObject(confirmations!, forKey:\"confirmations\" as NSCopying)\n        } else {\n            blockchainTxDict.setObject(0, forKey: \"block_height\" as NSCopying)\n            blockchainTxDict.setObject(0, forKey: \"confirmations\" as NSCopying)\n        }\n        \n        if vins != nil {\n            let inputs = NSMutableArray()\n            for _vin in vins! {\n                let vin = _vin as! NSDictionary\n                let input = NSMutableDictionary()\n                if let sequence = vin.object(forKey: \"sequence\") {\n                    input.setObject(sequence, forKey: \"sequence\" as NSCopying)\n                }\n                \n                let prev_out = NSMutableDictionary()\n                \n                let addr = vin.object(forKey: \"addr\") as? String\n                if (addr != nil) {\n                    prev_out.setObject(addr!, forKey: \"addr\" as NSCopying)\n                } else {\n                    //can be nil, for example, mined coins on tx 32ee55597c590bb104c524298b14fd1c0ac96a230810bd1e68d109df532a46a0\n                }\n                if let valueSat = vin.object(forKey: \"valueSat\") {\n                    prev_out.setObject(valueSat, forKey: \"value\" as NSCopying)\n                }\n                if let n = vin.object(forKey: \"n\") {\n                    prev_out.setObject(n, forKey: \"n\" as NSCopying)\n                }\n                input.setObject(prev_out, forKey: \"prev_out\" as NSCopying)\n                \n                inputs.add(input)\n            }\n            blockchainTxDict.setObject(inputs, forKey: \"inputs\" as NSCopying)\n        }\n    \n        if vouts != nil {\n            let outs = NSMutableArray()\n            for _vout in vouts! {\n                let vout = _vout as! NSDictionary\n                let aOut = NSMutableDictionary()\n                if let n = vout.object(forKey: \"n\") {\n                    aOut.setObject(n, forKey: \"n\" as NSCopying)\n                }\n                \n                if let scriptPubKey = (vout.object(forKey: \"scriptPubKey\") as? NSDictionary) {\n                    let addresses = scriptPubKey.object(forKey: \"addresses\") as? NSArray\n                    if (addresses != nil) {\n                        if (addresses!.count == 1) {\n                            aOut.setObject(addresses!.object(at: 0), forKey: \"addr\" as NSCopying)\n                        }\n                    }\n                    if let hex = scriptPubKey.object(forKey: \"hex\") {\n                        aOut.setObject(hex, forKey: \"script\" as NSCopying)\n                    }\n                }\n\n                if let value = vout.object(forKey: \"value\") as? String {\n                    let coinValue = TLCoin(bitcoinAmount: value, bitcoinDenomination: .bitcoin, locale: Locale(identifier: \"en_US\"))\n                    aOut.setObject(Int(coinValue.toUInt64()), forKey: \"value\" as NSCopying)\n\n                }\n                outs.add(aOut)\n            }\n            blockchainTxDict.setObject(outs, forKey: \"out\" as NSCopying)\n        }\n        \n        return blockchainTxDict\n    }\n}\n"
  },
  {
    "path": "ArcBit/APIs/TLNetworking.swift",
    "content": "//\n//  TLNetworking.swift\n//  ArcBit\n//\n//  Created by Timothy Lee on 3/14/15.\n//  Copyright (c) 2015 Timothy Lee <stequald01@gmail.com>\n//\n//   This library is free software; you can redistribute it and/or\n//   modify it under the terms of the GNU Lesser General Public\n//   License as published by the Free Software Foundation; either\n//   version 2.1 of the License, or (at your option) any later version.\n//\n//   This library is distributed in the hope that it will be useful,\n//   but WITHOUT ANY WARRANTY; without even the implied warranty of\n//   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n//   Lesser General Public License for more details.\n//\n//   You should have received a copy of the GNU Lesser General Public\n//   License along with this library; if not, write to the Free Software\n//   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,\n//   MA 02110-1301  USA\n\nimport Foundation\n\nenum TLDOMAINREACHABLE:Int {\n    case wwan           = 0\n    case wifi           = 1\n    case notreachable   = 2\n}\n\nclass TLNetworking {\n    \n    typealias ReachableHandler = (TLDOMAINREACHABLE) -> ()\n    typealias SuccessHandler = (AnyObject!) -> ()\n    typealias FailureHandler = (Int, String?) -> ()\n    \n    struct STATIC_MEMBERS {\n        static var _instance:TLNetworking? = nil\n        static let HTTP_ERROR_CODE = \"HTTPErrorCode\"\n        static let HTTP_ERROR_MSG = \"HTTPErrorMsg\"\n    }\n    \n    let getManager:AFHTTPRequestOperationManager\n    let postManager:AFHTTPRequestOperationManager\n    let getSynchronousManager:AFHTTPRequestOperationManager\n    let postSynchronousManager:AFHTTPRequestOperationManager\n    let getManagerBackground:AFHTTPRequestOperationManager\n    \n    init(certificateData: Data? = nil) {\n        let ua = \"Mozilla/5.0 (Macintosh Intel Mac OS X 10_9_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/31.0.1650.57 Safari/537.36\"\n\n        self.getManager = AFHTTPRequestOperationManager()\n        var requestSerializer = AFHTTPRequestSerializer()\n        requestSerializer.setValue(ua, forHTTPHeaderField:\"User-Agent\")\n        requestSerializer.setValue(\"utf-8\", forHTTPHeaderField:\"charset\")\n        self.getManager.requestSerializer = requestSerializer\n        \n        self.getManagerBackground = AFHTTPRequestOperationManager()\n        requestSerializer = AFHTTPRequestSerializer()\n        requestSerializer.setValue(ua, forHTTPHeaderField:\"User-Agent\")\n        requestSerializer.setValue(\"utf-8\", forHTTPHeaderField:\"charset\")\n        self.getManagerBackground.requestSerializer = requestSerializer\n        self.getManagerBackground.completionQueue  = DispatchQueue.global(priority: DispatchQueue.GlobalQueuePriority.default)\n        \n\n        self.getSynchronousManager = AFHTTPRequestOperationManager()\n        requestSerializer = AFHTTPRequestSerializer()\n        requestSerializer.setValue(ua, forHTTPHeaderField:\"User-Agent\")\n        requestSerializer.setValue(\"utf-8\", forHTTPHeaderField:\"charset\")\n        self.getSynchronousManager.requestSerializer = requestSerializer\n        self.getSynchronousManager.completionQueue  = DispatchQueue.global(priority: DispatchQueue.GlobalQueuePriority.default)\n        \n        \n        self.postManager = AFHTTPRequestOperationManager()\n        var postRequestSerializer = AFHTTPRequestSerializer()\n        postRequestSerializer.setValue(ua, forHTTPHeaderField:\"User-Agent\")\n        postRequestSerializer.setValue(\"utf-8\", forHTTPHeaderField:\"charset\")\n        self.postManager.requestSerializer = postRequestSerializer\n\n        \n        self.postSynchronousManager = AFHTTPRequestOperationManager()\n        postRequestSerializer = AFHTTPRequestSerializer()\n        postRequestSerializer.setValue(ua, forHTTPHeaderField:\"User-Agent\")\n        postRequestSerializer.setValue(\"utf-8\", forHTTPHeaderField:\"charset\")\n        self.postSynchronousManager.requestSerializer = postRequestSerializer\n        self.postSynchronousManager.completionQueue  = DispatchQueue.global(priority: DispatchQueue.GlobalQueuePriority.default)\n        \n        if certificateData != nil {\n            let securityPolicy = AFSecurityPolicy(pinningMode: AFSSLPinningMode.certificate)\n            securityPolicy?.allowInvalidCertificates = true\n            securityPolicy?.validatesCertificateChain = false\n            securityPolicy?.validatesDomainName = false\n            securityPolicy?.pinnedCertificates = [certificateData!]\n\n            self.getManager.securityPolicy = securityPolicy\n            self.getManagerBackground.securityPolicy = securityPolicy\n            self.getSynchronousManager.securityPolicy = securityPolicy\n            self.postManager.securityPolicy = securityPolicy\n            self.postSynchronousManager.securityPolicy = securityPolicy\n        }\n    }\n    \n    class func isReachable(_ url: URL, reachable: @escaping ReachableHandler) -> () {\n        let manager = AFHTTPRequestOperationManager(baseURL:url)\n        \n        let operationQueue = manager?.operationQueue\n        manager?.reachabilityManager.setReachabilityStatusChange({(status: AFNetworkReachabilityStatus) in\n            switch (status) {\n            case AFNetworkReachabilityStatus.reachableViaWWAN:\n                DLog(\"AFNetworkReachabilityStatusReachableViaWWAN\")\n                operationQueue?.isSuspended = false\n                reachable(TLDOMAINREACHABLE.wwan)\n                break\n            case AFNetworkReachabilityStatus.reachableViaWiFi:\n                DLog(\"AFNetworkReachabilityStatusReachableViaWiFi\")\n                operationQueue?.isSuspended = false\n                \n                reachable(TLDOMAINREACHABLE.wifi)\n                break\n            case AFNetworkReachabilityStatus.notReachable:\n                reachable(TLDOMAINREACHABLE.notreachable)\n                DLog(\"AFNetworkReachabilityStatusNotReachable\")\n            default:\n                operationQueue?.isSuspended = true\n                break\n            }\n        })\n        \n        manager?.reachabilityManager.startMonitoring()\n    }\n    \n    func httpGETSynchronous(_ url: URL, parameters: NSDictionary?) -> AnyObject? {\n        var response:AnyObject? = nil\n        let semaphore = DispatchSemaphore(value: 0)\n\n        DLog(\"httpGETSynchronous: url \\(url.absoluteString)\")\n        _ = self.getSynchronousManager.get(url.absoluteString,\n            parameters: parameters,\n            success:{(operation, responseObject) in\n                response = responseObject as AnyObject?\n                semaphore.signal()\n            },\n            failure:{(operation, error) in\n                DLog(\"httpGETSynchronous: requestFailed url \\(url.absoluteString)\")\n                if operation?.response != nil {\n                    response = [STATIC_MEMBERS.HTTP_ERROR_CODE: operation?.response.statusCode, STATIC_MEMBERS.HTTP_ERROR_MSG:operation?.responseString] as AnyObject\n                } else {\n                    response = [STATIC_MEMBERS.HTTP_ERROR_CODE: \"499\", STATIC_MEMBERS.HTTP_ERROR_MSG:\"No Response\"] as AnyObject\n                }\n                semaphore.signal()\n        })\n        \n        \n        semaphore.wait(timeout: DispatchTime.distantFuture)\n        return response\n    }\n    \n    func httpGET(_ url: URL, parameters: NSDictionary?,\n        success: SuccessHandler?, failure: FailureHandler?) -> () {\n            \n            DLog(\"httpGET: url \\(url.absoluteString)\")\n            self.getManager.get(url.absoluteString,\n                parameters:parameters,\n                success:{(operation, responseObject) in\n                    if success != nil {\n                        success!(responseObject as AnyObject!)\n                    }\n                } ,\n                failure:{(operation, error) in\n                    DLog(\"httpGET: requestFailed url \\(url.absoluteString)\")\n                    if (failure != nil) {\n                        failure!(operation?.response == nil ? 0 : (operation?.response.statusCode)!, operation?.response == nil ? \"\" : operation?.responseString)\n                    }\n            })\n    }\n    \n    func httpGETBackground(_ url: URL, parameters: NSDictionary?,\n        success: SuccessHandler?, failure: FailureHandler?) -> () {\n            \n            DLog(\"httpGETBackground: url \\(url.absoluteString)\")\n            self.getManagerBackground.get(url.absoluteString,\n                parameters:parameters,\n                success:{(operation, responseObject) in\n                    if success != nil {\n                        success!(responseObject as AnyObject!)\n                    }\n                } ,\n                failure:{(operation, error) in\n                    DLog(\"httpGETBackground: requestFailed url \\(url.absoluteString)\")\n                    if (failure != nil) {\n                        failure!(operation?.response == nil ? 0 : (operation?.response.statusCode)!, operation?.response == nil ? \"\" : operation?.responseString)\n                    }\n            })\n    }\n    \n    func httpPOST(_ url: URL, parameters: NSDictionary?,\n        success: SuccessHandler?, failure: FailureHandler?) -> () {\n            \n            DLog(\"httpPOST:function:  url \\(url.absoluteString)\")\n            self.postManager.post(url.absoluteString,\n                parameters:parameters,\n                success:{(operation, responseObject) in\n                    if success != nil {\n                        success!(responseObject as AnyObject!)\n                    }\n                },\n                failure:{(operation, error) in\n                    DLog(\"httpPOST: requestFailed url \\(url.absoluteString)\")\n                    if (failure != nil) {\n                        failure!(operation?.response == nil ? 0 : (operation?.response.statusCode)!, operation?.response == nil ? \"\" : operation?.responseString)\n                    }\n            })\n    }\n    \n    func httpPOSTSynchronous(_ url: URL, parameters: NSDictionary?) -> AnyObject? {\n        var response:AnyObject?\n        \n        let semaphore = DispatchSemaphore(value: 0)\n        \n        DLog(\"httpPOSTSynchronous: url \\(url.absoluteString)\")\n        _ = self.postSynchronousManager.post(url.absoluteString,\n            parameters: parameters,\n            success:{(operation, responseObject) in\n                response = responseObject as AnyObject?\n                semaphore.signal()\n            },\n            failure:{(operation, error) in\n                DLog(\"httpPOSTSynchronous: requestFailed url \\(url.absoluteString)\")\n                if operation?.response != nil {\n                    response = [STATIC_MEMBERS.HTTP_ERROR_CODE: operation?.response.statusCode, STATIC_MEMBERS.HTTP_ERROR_MSG:operation?.responseString] as AnyObject\n                } else {\n                    response = [STATIC_MEMBERS.HTTP_ERROR_CODE: \"499\", STATIC_MEMBERS.HTTP_ERROR_MSG:\"No Response\"] as AnyObject\n                }\n                semaphore.signal()\n        })\n        \n        \n        semaphore.wait(timeout: DispatchTime.distantFuture)\n        return response\n    }\n}\n"
  },
  {
    "path": "ArcBit/APIs/TLPushTxAPI.swift",
    "content": "//\n//  TLPushTxAPI.swift\n//  ArcBit\n//\n//  Created by Timothy Lee on 3/14/15.\n//  Copyright (c) 2015 Timothy Lee <stequald01@gmail.com>\n//\n//   This library is free software; you can redistribute it and/or\n//   modify it under the terms of the GNU Lesser General Public\n//   License as published by the Free Software Foundation; either\n//   version 2.1 of the License, or (at your option) any later version.\n//\n//   This library is distributed in the hope that it will be useful,\n//   but WITHOUT ANY WARRANTY; without even the implied warranty of\n//   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n//   Lesser General Public License for more details.\n//\n//   You should have received a copy of the GNU Lesser General Public\n//   License along with this library; if not, write to the Free Software\n//   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,\n//   MA 02110-1301  USA\n\nimport Foundation\n\nclass TLPushTxAPI {\n    \n    struct STATIC_MEMBERS {\n        static var _instance:TLPushTxAPI? = nil\n    }\n    \n    class func instance() -> (TLPushTxAPI) {\n        if(STATIC_MEMBERS._instance == nil) {\n            STATIC_MEMBERS._instance = TLPushTxAPI()\n        }\n        \n        return STATIC_MEMBERS._instance!\n    }\n    \n    func sendTx(_ txHex:String, txHash:String, toAddress:String, success:@escaping TLNetworking.SuccessHandler, failure:@escaping TLNetworking.FailureHandler)-> () {\n        DLog(\"TLPushTxAPI pushTx txHex \\(txHex)\")\n        DLog(\"TLPushTxAPI pushTx txHash \\(txHash)\")\n        DLog(\"TLPushTxAPI pushTx toAddress \\(toAddress)\")\n\n        if TLStealthAddress.isStealthAddress(toAddress, isTestnet:false) == false {\n            DLog(\"TLPushTxAPI TLBlockExplorerAPI\")\n            TLBlockExplorerAPI.instance().pushTx(txHex, txHash: txHash, success:success, failure:failure)\n        } else {\n            var pushTxMethod = TLBlockExplorerAPI.instance().insightAPI!.pushTx\n            //pushTxMethod = TLBlockrAPI().pushTx\n\n            pushTxMethod(txHex, { (jsonData) -> () in\n                DLog(\"TLPushTxAPI pushTxMethod \\(jsonData)\")\n\n                func getTxidFromInsightPushTx(_ jsonData:NSDictionary) -> String {\n                    return jsonData.object(forKey: \"txid\") as! String\n                }\n                \n                func getTxidFromBlockrPushTx(_ jsonData:NSDictionary) -> String? {\n                    if jsonData.object(forKey: \"status\") as! String != \"success\" {\n                        let code = jsonData.object(forKey: \"code\") as! Int\n                        let message = jsonData.object(forKey: \"message\") as! String\n                        failure(code, message)\n                        return nil\n                    }\n                    return jsonData.object(forKey: \"data\") as? String\n                }\n                \n                let txid = getTxidFromInsightPushTx(jsonData as! NSDictionary)\n                //let txid = getTxidFromBlockrPushTx(jsonData as! NSDictionary)\n                //if txid == nil { return }\n                \n                TLStealthExplorerAPI.instance().lookupTx(toAddress, txid: txid, success: { (jsonData) -> () in\n                    DLog(\"TLPushTxAPI TLStealthExplorerAPI success \\(jsonData.description)\")\n                    if let errorCode = (jsonData as! NSDictionary).object(forKey: TLStealthExplorerAPI.STATIC_MEMBERS.SERVER_ERROR_CODE) as? Int {\n                        let errorMsg = (jsonData as! NSDictionary).object(forKey: TLStealthExplorerAPI.STATIC_MEMBERS.SERVER_ERROR_MSG) as! String\n                        DLog(String(format: \"TLPushTxAPI TLStealthExplorerAPI success failure \\(errorCode) \\(errorMsg)\"))\n                        if errorCode == TLStealthExplorerAPI.STATIC_MEMBERS.SEND_TX_ERROR {\n                            DLog(\"TLPushTxAPI TLStealthExplorerAPI SEND_TX_ERROR \\(errorMsg)\")\n                        }\n                        failure(errorCode, errorMsg)\n                    } else {\n                        DLog(\"TLPushTxAPI TLStealthExplorerAPI success success\")\n                        success([\"txid\":txid] as AnyObject)\n                    }\n                    \n                    }) { (code, status) -> () in\n                        DLog(\"TLPushTxAPI TLStealthExplorerAPI failure\")\n                        DLog(\"TLPushTxAPI TLStealthExplorerAPI failure code: \\(code)\")\n                        DLog(\"TLPushTxAPI TLStealthExplorerAPI failure status: \\(status)\")\n                        if status != nil {\n                            failure(code, \"No status\")\n                        } else {\n                            failure(code, status)\n                        }\n                }\n            }) { (code, status) -> () in\n                    failure(code, status)\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "ArcBit/APIs/TLStealthServerAPI.swift",
    "content": "//\n//  TLStealthServerAPI.swift\n//  ArcBit\n//\n//  Created by Timothy Lee on 3/14/15.\n//  Copyright (c) 2015 Timothy Lee <stequald01@gmail.com>\n//\n//   This library is free software; you can redistribute it and/or\n//   modify it under the terms of the GNU Lesser General Public\n//   License as published by the Free Software Foundation; either\n//   version 2.1 of the License, or (at your option) any later version.\n//\n//   This library is distributed in the hope that it will be useful,\n//   but WITHOUT ANY WARRANTY; without even the implied warranty of\n//   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n//   Lesser General Public License for more details.\n//\n//   You should have received a copy of the GNU Lesser General Public\n//   License along with this library; if not, write to the Free Software\n//   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,\n//   MA 02110-1301  USA\n\nimport Foundation\n\nclass TLStealthExplorerAPI {\n    \n    struct STATIC_MEMBERS {\n        static let STEALTH_PAYMENTS_FETCH_COUNT = 50\n\n        static let UNEXPECTED_ERROR = -1000\n        static let DATABASE_ERROR = -1001\n        static let INVALID_STEALTH_ADDRESS_ERROR = -1002\n        static let INVALID_SIGNATURE_ERROR = -1003\n        static let INVALID_SCAN_KEY_ERROR = -1004\n        static let TX_DECODE_FAILED_ERROR = -1005\n        static let INVALID_PARAMETER_ERROR = -1006\n        static let SEND_TX_ERROR = -1007\n\n        static let SERVER_ERROR_CODE = \"error_code\"\n        static let SERVER_ERROR_MSG = \"error_msg\"\n        \n        static var instance:TLStealthExplorerAPI? = nil\n    }\n    \n    var networking:TLNetworking\n    var baseURL:String\n    class func instance() -> (TLStealthExplorerAPI) {\n        if(STATIC_MEMBERS.instance == nil) {\n            TLPreferences.resetStealthExplorerAPIURL()\n            TLPreferences.resetStealthServerPort()\n            let baseURL = TLStealthServerConfig.instance().getWebServerProtocol()+\"://\"+TLPreferences.getStealthExplorerURL()!+\":\"+String(TLPreferences.getStealthServerPort()!)\n            STATIC_MEMBERS.instance = TLStealthExplorerAPI(baseURL: baseURL)\n        }\n        return STATIC_MEMBERS.instance!\n    }\n    \n    init(baseURL: String) {\n        //let certificateData = TLStealthServerConfig.instance().getSSLCertificate()\n        //self.networking = TLNetworking(certificateData: certificateData)\n        self.networking = TLNetworking()\n        self.baseURL = baseURL\n    }\n    \n    func ping(_ success: @escaping TLNetworking.SuccessHandler, failure: @escaping TLNetworking.FailureHandler) -> () {\n        let endPoint = \"ping\"\n        let url = URL(string:endPoint, relativeTo:URL(string:self.baseURL))\n\n        self.networking.httpGET(url!, parameters:nil,\n            success:success, failure:failure)\n    }\n\n    func getChallenge() -> NSDictionary {\n        let endPoint = \"challenge\"\n        let url = URL(string:endPoint, relativeTo:URL(string:self.baseURL))\n        let jsonDict = self.networking.httpGETSynchronous(url!, parameters: nil) as! NSDictionary\n        return jsonDict\n    }\n    \n    func getStealthPaymentsSynchronous(_ stealthAddress:String, signature:String, offset:Int) -> NSDictionary {\n        let endPoint = \"payments\"\n        let parameters = [\n            \"addr\": stealthAddress,\n            \"sig\":signature,\n            \"offset\":offset\n        ] as [String : Any]\n        let url = URL(string:endPoint, relativeTo:URL(string:self.baseURL))\n        let jsonDict = self.networking.httpGETSynchronous(url!, parameters: parameters as NSDictionary?) as! NSDictionary\n        return jsonDict\n    }\n    \n    func watchStealthAddressSynchronous(_ stealthAddress:String, scanPriv:String, signature:String) -> NSDictionary {\n        let endPoint = \"watch\"\n        let parameters = [\n            \"addr\": stealthAddress,\n            \"scan_key\":scanPriv,\n            \"sig\":signature\n        ]\n        let url = URL(string:endPoint, relativeTo:URL(string:self.baseURL))\n        let jsonDict = self.networking.httpGETSynchronous(url!, parameters: parameters as NSDictionary?) as! NSDictionary\n        return jsonDict\n    }\n    \n    func lookupTx(_ stealthAddress:String, txid:String, success: @escaping TLNetworking.SuccessHandler, failure: @escaping TLNetworking.FailureHandler) -> () {\n        let endPoint = \"lookuptx\"\n        let parameters = [\n            \"addr\": stealthAddress,\n            \"txid\":txid,\n        ]\n        let url = URL(string:endPoint, relativeTo:URL(string:self.baseURL))\n        \n        self.networking.httpGET(url!, parameters:parameters as NSDictionary!, success:success, failure:failure)\n    }\n}\n"
  },
  {
    "path": "ArcBit/APIs/TLStealthServerConfig.swift",
    "content": "//\n//  TLStealthServerConfig.swift\n//  ArcBit\n//\n//  Created by Timothy Lee on 3/14/15.\n//  Copyright (c) 2015 Timothy Lee <stequald01@gmail.com>\n//\n//   This library is free software; you can redistribute it and/or\n//   modify it under the terms of the GNU Lesser General Public\n//   License as published by the Free Software Foundation; either\n//   version 2.1 of the License, or (at your option) any later version.\n//\n//   This library is distributed in the hope that it will be useful,\n//   but WITHOUT ANY WARRANTY; without even the implied warranty of\n//   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n//   Lesser General Public License for more details.\n//\n//   You should have received a copy of the GNU Lesser General Public\n//   License along with this library; if not, write to the Free Software\n//   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,\n//   MA 02110-1301  USA\n\nimport Foundation\n\nclass TLStealthServerConfig {\n    struct STATIC_MEMBERS {\n        static var instance:TLStealthServerConfig?\n    }\n    \n    fileprivate var stealthServerUrl = \"www.arcbit.net\"\n    fileprivate var stealthServerPort = 443\n    fileprivate var webSocketServerPort = 443\n    fileprivate var webServerProtocol = \"https\"\n    fileprivate var webSocketProtocol = \"wss\"\n    fileprivate var webSocketEndpoint = \"/inv\"\n\n    class func instance() -> (TLStealthServerConfig) {\n        if(STATIC_MEMBERS.instance == nil) {\n            STATIC_MEMBERS.instance = TLStealthServerConfig()\n        }\n        return STATIC_MEMBERS.instance!\n    }\n    \n    func getSSLCertificate() -> Data {\n        let certificatePath = Bundle.main.path(forResource: \"live\", ofType: \"cer\")!\n        let certificateData = try! Data(contentsOf: URL(fileURLWithPath: certificatePath))\n        return certificateData\n    }\n    \n    func getWebServerProtocol() -> String {\n        return self.webServerProtocol\n    }\n\n    func getWebSocketProtocol() -> String {\n        return self.webSocketProtocol\n    }\n    \n    func getWebSocketEndpoint() -> String {\n        return self.webSocketEndpoint\n    }\n    \n    func getStealthServerUrl() -> String {\n        return self.stealthServerUrl\n    }\n\n    func getStealthServerPort() -> Int {\n        return self.stealthServerPort\n    }\n    \n    func getWebSocketServerPort() -> Int {\n        return self.webSocketServerPort\n    }\n}\n"
  },
  {
    "path": "ArcBit/APIs/TLStealthWebSocket.swift",
    "content": "//\n//  TLStealthWebSocket.swift\n//  ArcBit\n//\n//  Created by Timothy Lee on 3/14/15.\n//  Copyright (c) 2015 Timothy Lee <stequald01@gmail.com>\n//\n//   This library is free software; you can redistribute it and/or\n//   modify it under the terms of the GNU Lesser General Public\n//   License as published by the Free Software Foundation; either\n//   version 2.1 of the License, or (at your option) any later version.\n//\n//   This library is distributed in the hope that it will be useful,\n//   but WITHOUT ANY WARRANTY; without even the implied warranty of\n//   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n//   Lesser General Public License for more details.\n//\n//   You should have received a copy of the GNU Lesser General Public\n//   License along with this library; if not, write to the Free Software\n//   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,\n//   MA 02110-1301  USA\n\nimport Foundation\n\n\n@objc class TLStealthWebSocket: NSObject, SRWebSocketDelegate {\n    fileprivate var webSocket: SRWebSocket?\n    fileprivate var consecutiveFailedConnections = 0\n    var challenge = \"0\"\n    fileprivate let MAX_CONSECUTIVE_FAILED_CONNECTIONS = 5\n\n    struct STATIC_MEMBERS {\n        static var instance: TLStealthWebSocket?\n    }\n    \n    class func instance() -> (TLStealthWebSocket) {\n        if (STATIC_MEMBERS.instance == nil) {\n            STATIC_MEMBERS.instance = TLStealthWebSocket()\n            TLPreferences.resetStealthExplorerAPIURL()\n            TLPreferences.resetStealthWebSocketPort()\n        }\n        return STATIC_MEMBERS.instance!\n    }\n    \n    func reconnect() -> () {\n        if (self.webSocket != nil) {\n            self.webSocket!.delegate = nil\n            self.webSocket!.close()\n        }\n        \n        let urlString = String(format: \"%@://%@:%d%@\", TLStealthServerConfig.instance().getWebSocketProtocol(), TLPreferences.getStealthExplorerURL()!, TLPreferences.getStealthWebSocketPort()!, TLStealthServerConfig.instance().getWebSocketEndpoint())\n        DLog(\"StealthWebSocket reconnect url: \\(urlString)\")\n        \n        //let certificateData = TLStealthServerConfig.instance().getSSLCertificate()\n        //let urlRequest = SRWebSocket.createURLRequest(urlString, withPinnedCert: certificateData)\n        //self.webSocket = SRWebSocket(URLRequest: urlRequest)\n        self.webSocket = SRWebSocket(urlRequest: URLRequest(url: URL(string: urlString)!))\n        \n        self.webSocket!.delegate = self\n        self.webSocket!.open()\n    }\n\n    func isWebSocketOpen() -> Bool {\n        return self.webSocket != nil && self.webSocket!.readyState.rawValue == SR_OPEN.rawValue\n    }\n    \n    func close() -> () {\n        self.webSocket!.close()\n    }\n\n    func sendMessagePing() -> Bool {\n        let msg = TLUtils.dictionaryToJSONString(false, dict: [\"op\":\"ping\"])\n        return self.sendMessage(msg)\n    }\n    func sendMessageGetChallenge() -> Bool {\n        let msg = TLUtils.dictionaryToJSONString(false, dict: [\"op\":\"challenge\"])\n        return self.sendMessage(msg)\n    }\n    \n    @discardableResult func sendMessageSubscribeToStealthAddress(_ stealthAddress: String, signature: String) -> Bool {\n        let msgDict = [\"op\":\"addr_sub\", \"x\":[\"addr\":stealthAddress,\"sig\":signature]] as [String : Any]\n        let msg = TLUtils.dictionaryToJSONString(false, dict: msgDict as NSDictionary)\n        return self.sendMessage(msg)\n    }\n    \n    func sendMessage(_ msg: String) -> Bool {\n        DLog(\"StealthWebSocket sendMessage: \\(msg)\")\n        if self.isWebSocketOpen() {\n            self.webSocket!.send(msg)\n            return true\n        } else {\n            DLog(\"StealthWebSocket Error: not connect to websocket server\")\n            return false\n        }\n    }\n    \n    func periodicPing() {\n        let PERIODIC_PING_INTERVAL = 55.0\n        DispatchQueue.main.async {\n        NSObject.cancelPreviousPerformRequests(withTarget: self, selector:#selector(TLStealthWebSocket.sendMessagePing), object:nil)\n        Timer.scheduledTimer(timeInterval: PERIODIC_PING_INTERVAL, target: self,\n            selector: #selector(TLStealthWebSocket.sendMessagePing), userInfo: nil, repeats: true)\n        }\n    }\n    \n    \n    func webSocketDidOpen(_ webSocket: SRWebSocket) -> () {\n        DLog(\"StealthWebSocket webSocketDidOpen\")\n        self.sendMessageGetChallenge()\n        NotificationCenter.default.post(name: Notification.Name(rawValue: TLNotificationEvents.EVENT_STEALTH_PAYMENT_LISTENER_OPEN()), object: nil, userInfo: nil)\n        self.periodicPing()\n    }\n    \n    func webSocket(_ webSocket:SRWebSocket, didFailWithError error:NSError) -> () {\n        DLog(\"StealthWebSocket didFailWithError \\(error.description)\")\n\n        self.webSocket!.delegate = nil\n        self.webSocket!.close()\n        self.webSocket = nil\n        NotificationCenter.default.post(name: Notification.Name(rawValue: TLNotificationEvents.EVENT_STEALTH_PAYMENT_LISTENER_CLOSE()), object: nil)\n        if consecutiveFailedConnections < MAX_CONSECUTIVE_FAILED_CONNECTIONS {\n            self.reconnect()\n        } else {\n            DispatchQueue.main.async {\n                NSObject.cancelPreviousPerformRequests(withTarget: self, selector:#selector(TLStealthWebSocket.sendMessagePing), object:nil)\n            }\n        }\n        consecutiveFailedConnections += 1\n    }\n    \n    public func webSocket(_ webSocket: SRWebSocket!, didReceiveMessage message: Any!) {\n        DispatchQueue.global(priority: DispatchQueue.GlobalQueuePriority.high).async {\n            self.consecutiveFailedConnections = 0\n            let data = (message as AnyObject).data(using: String.Encoding.utf8.rawValue)\n\n            let jsonDict = (try! JSONSerialization.jsonObject(with: data!, options: JSONSerialization.ReadingOptions(rawValue: 0))) as! NSDictionary\n            DLog(\"StealthWebSocket didReceiveMessage \\(jsonDict.description)\")\n\n            if (jsonDict.object(forKey: \"op\") as! String == \"challenge\") {\n                NotificationCenter.default.post(name: Notification.Name(rawValue: TLNotificationEvents.EVENT_RECEIVED_STEALTH_CHALLENGE()), object: jsonDict.object(forKey: \"x\"), userInfo: nil)\n            } else if (jsonDict.object(forKey: \"op\") as! String == \"addr_sub\") {\n                NotificationCenter.default.post(name: Notification.Name(rawValue: TLNotificationEvents.EVENT_RECEIVED_STEALTH_ADDRESS_SUBSCRIPTION()), object: jsonDict.object(forKey: \"x\"), userInfo: nil)\n            } else if (jsonDict.object(forKey: \"op\") as! String == \"tx\") {\n                NotificationCenter.default.post(name: Notification.Name(rawValue: TLNotificationEvents.EVENT_RECEIVED_STEALTH_PAYMENT()), object: jsonDict.object(forKey: \"x\"), userInfo: nil)\n            }\n        }\n    }\n    \n    func webSocket(_ webSocket: SRWebSocket, didCloseWithCode code: Int, reason: String, wasClean: Bool) -> () {\n        if wasClean {\n            DLog(\"StealthWebSocket didCloseWithCode With No Error \\(code) \\(reason)\")\n        } else {\n            DLog(\"StealthWebSocket didCloseWithCode With Error \\(code) \\(reason)\")\n        }\n        \n        self.webSocket!.delegate = nil\n        self.webSocket!.close()\n        self.webSocket = nil\n        NotificationCenter.default.post(name: Notification.Name(rawValue: TLNotificationEvents.EVENT_STEALTH_PAYMENT_LISTENER_CLOSE()), object: nil)\n        if consecutiveFailedConnections < MAX_CONSECUTIVE_FAILED_CONNECTIONS {\n            self.reconnect()\n        } else {\n            DispatchQueue.main.async {\n                NSObject.cancelPreviousPerformRequests(withTarget: self, selector:#selector(TLStealthWebSocket.sendMessagePing), object:nil)\n            }\n        }\n        consecutiveFailedConnections += 1\n    }\n}\n"
  },
  {
    "path": "ArcBit/APIs/TLTxFeeAPI.swift",
    "content": "//\n//  TLTxFeeAPI.swift\n//  ArcBit\n//\n//  Created by Timothy Lee on 3/14/15.\n//  Copyright (c) 2015 Timothy Lee <stequald01@gmail.com>\n//\n//   This library is free software; you can redistribute it and/or\n//   modify it under the terms of the GNU Lesser General Public\n//   License as published by the Free Software Foundation; either\n//   version 2.1 of the License, or (at your option) any later version.\n//\n//   This library is distributed in the hope that it will be useful,\n//   but WITHOUT ANY WARRANTY; without even the implied warranty of\n//   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n//   Lesser General Public License for more details.\n//\n//   You should have received a copy of the GNU Lesser General Public\n//   License along with this library; if not, write to the Free Software\n//   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,\n//   MA 02110-1301  USA\n\nimport Foundation\n\nenum TLDynamicFeeSetting:String {\n    case FastestFee  = \"0\"\n    case HalfHourFee = \"1\"\n    case HourFee     = \"2\"\n\n    static func getAPIValue(_ dynamicFeeSetting: TLDynamicFeeSetting) -> String {\n        if dynamicFeeSetting == FastestFee {\n            return \"fastestFee\"\n        } else if dynamicFeeSetting == HalfHourFee {\n            return \"halfHourFee\"\n        } else if dynamicFeeSetting == HourFee {\n            return \"hourFee\"\n        }\n        \n        return \"\"\n    }\n}\n\nclass TLTxFeeAPI {\n    \n    var networking:TLNetworking\n    fileprivate var cachedDynamicFees: NSDictionary?\n    var cachedDynamicFeesTime: TimeInterval?\n\n\n    init() {\n        self.networking = TLNetworking()\n    }\n    \n    func getCachedDynamicFee() -> NSNumber? {\n        var dynamicFee:NSNumber? = nil\n        if self.cachedDynamicFees != nil {\n            let dynamicFeeSetting = TLPreferences.getInAppSettingsKitDynamicFeeSetting()\n            if dynamicFeeSetting == TLDynamicFeeSetting.FastestFee {\n                dynamicFee = self.cachedDynamicFees!.object(forKey: TLDynamicFeeSetting.getAPIValue(TLDynamicFeeSetting.FastestFee)) as? NSNumber\n            } else if dynamicFeeSetting == TLDynamicFeeSetting.HalfHourFee {\n                dynamicFee = self.cachedDynamicFees!.object(forKey: TLDynamicFeeSetting.getAPIValue(TLDynamicFeeSetting.HalfHourFee)) as? NSNumber\n            } else if dynamicFeeSetting == TLDynamicFeeSetting.HourFee {\n                dynamicFee = self.cachedDynamicFees!.object(forKey: TLDynamicFeeSetting.getAPIValue(TLDynamicFeeSetting.HourFee)) as? NSNumber\n            }\n        }\n        return dynamicFee\n    }\n    \n    func haveUpdatedCachedDynamicFees() -> Bool {\n        let nowUnixTime = Date().timeIntervalSince1970\n        let tenMinutesInSeconds = 600.0\n        if self.cachedDynamicFeesTime == nil || nowUnixTime - self.cachedDynamicFeesTime! > tenMinutesInSeconds {\n            return false\n        }\n        return true\n    }\n\n    func getDynamicTxFee(_ success:@escaping TLNetworking.SuccessHandler, failure:@escaping TLNetworking.FailureHandler)-> () {\n        self.networking.httpGET(URL(string: \"https://bitcoinfees.21.co/api/v1/fees/recommended\")!,\n                                parameters:[:], success:{\n                                    (_jsonData) in\n                                    if let jsonData = _jsonData as? NSDictionary {\n                                        self.cachedDynamicFeesTime = Date().timeIntervalSince1970\n                                        self.cachedDynamicFees = jsonData\n                                        DLog(\"TLTxFeeAPI getDynamicTxFee success \\(jsonData.description)\")\n                                    } else {\n                                        self.cachedDynamicFees = nil\n                                    }\n                                    success(_jsonData)\n            }, failure: {\n                (code, status) in\n                self.cachedDynamicFees = nil\n                DLog(\"TLTxFeeAPI getDynamicTxFee failure\")\n                failure(code, status)\n        })\n    }\n}\n"
  },
  {
    "path": "ArcBit/AppDelegate.swift",
    "content": "//\n//  AppDelegate.swift\n//  ArcBit\n//\n//  Created by Timothy Lee on 3/14/15.\n//  Copyright (c) 2015 Timothy Lee <stequald01@gmail.com>\n//\n//   This library is free software; you can redistribute it and/or\n//   modify it under the terms of the GNU Lesser General Public\n//   License as published by the Free Software Foundation; either\n//   version 2.1 of the License, or (at your option) any later version.\n//\n//   This library is distributed in the hope that it will be useful,\n//   but WITHOUT ANY WARRANTY; without even the implied warranty of\n//   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n//   Lesser General Public License for more details.\n//\n//   You should have received a copy of the GNU Lesser General Public\n//   License along with this library; if not, write to the Free Software\n//   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,\n//   MA 02110-1301  USA\n\nimport Foundation\nimport UIKit\nimport AVFoundation\nimport Fabric\nimport Crashlytics\n\n@UIApplicationMain\n@objc(AppDelegate) class AppDelegate: UIResponder, UIApplicationDelegate, LTHPasscodeViewControllerDelegate {\n    \n    let MAX_CONSECUTIVE_FAILED_STEALTH_CHALLENGE_COUNT = 8\n    let SAVE_WALLET_PAYLOAD_DELAY = 2.0\n    let DEFAULT_BLOCKEXPLORER_API = TLBlockExplorer.blockchain\n    let RESPOND_TO_STEALTH_PAYMENT_GET_TX_TRIES_MAX_TRIES = 3\n\n    var window:UIWindow?\n    fileprivate var storyboard:UIStoryboard?\n    fileprivate var modalDelegate:AnyObject?\n    var appWallet = TLWallet(walletName: \"App Wallet\", walletConfig: TLWalletConfig(isTestnet: false))\n    var accounts:TLAccounts?\n    var coldWalletAccounts:TLAccounts?\n    var importedAccounts:TLAccounts?\n    var importedWatchAccounts:TLAccounts?\n    var importedAddresses:TLImportedAddresses?\n    var importedWatchAddresses:TLImportedAddresses?\n    var godSend:TLSpaghettiGodSend?\n    var receiveSelectedObject:TLSelectedObject?\n    var historySelectedObject:TLSelectedObject?\n    var bitcoinURIOptionsDict:NSDictionary?\n    var justSetupHDWallet = false\n    var giveExitAppNoticeForBlockExplorerAPIToTakeEffect = false\n    fileprivate var isAccountsAndImportsLoaded = false\n    var saveWalletJSONEnabled = true\n    var consecutiveFailedStealthChallengeCount = 0\n    fileprivate var savedPasscodeViewDefaultBackgroundColor: UIColor?\n    fileprivate var savedPasscodeViewDefaultLabelTextColor: UIColor?\n    fileprivate var savedPasscodeViewDefaultPasscodeTextColor: UIColor?\n    fileprivate var hasFinishLaunching = false\n    fileprivate var respondToStealthPaymentGetTxTries = 0\n    var scannedEncryptedPrivateKey:String? = nil\n    var scannedAddressBookAddress:String? = nil\n    let pendingOperations = PendingOperations()\n    lazy var webSocketNotifiedTxHashSet:NSMutableSet = NSMutableSet()\n    var pendingSelfStealthPaymentTxid: String? = nil\n    lazy var txFeeAPI = TLTxFeeAPI();\n\n    class func instance() -> AppDelegate {\n        return UIApplication.shared.delegate as! (AppDelegate)\n    }\n    \n    func aAccountNeedsRecovering() -> Bool {\n        guard let accounts = AppDelegate.instance().accounts else { return false }\n        for i in stride(from: 0, to: accounts.getNumberOfAccounts(), by: 1) {\n            let accountObject = accounts.getAccountObjectForIdx(i)\n            if (accountObject.needsRecovering()) {\n                return true\n            }\n        }\n        \n        guard let coldWalletAccounts = AppDelegate.instance().coldWalletAccounts else { return false }\n        \n        for i in stride(from: 0, to: coldWalletAccounts.getNumberOfAccounts(), by: 1) {\n            let accountObject = coldWalletAccounts.getAccountObjectForIdx(i)\n            if (accountObject.needsRecovering()) {\n                return true\n            }\n        }\n        \n        guard let importedAccounts = AppDelegate.instance().importedAccounts else { return false }\n        for i in stride(from: 0, to: importedAccounts.getNumberOfAccounts(), by: 1) {\n            let accountObject = importedAccounts.getAccountObjectForIdx(i)\n            if (accountObject.needsRecovering()) {\n                return true\n            }\n        }\n        \n        guard let importedWatchAccounts = AppDelegate.instance().importedWatchAccounts else { return false }\n        \n        for i in stride(from: 0, to: importedWatchAccounts.getNumberOfAccounts(), by: 1) {\n            let accountObject = importedWatchAccounts.getAccountObjectForIdx(i)\n            if (accountObject.needsRecovering()) {\n                return true\n            }\n        }\n        return false\n    }\n    \n    func checkToRecoverAccounts() {\n        guard let accounts = AppDelegate.instance().accounts else { return }\n        for i in stride(from: 0, to: accounts.getNumberOfAccounts(), by: 1) {\n            let accountObject = accounts.getAccountObjectForIdx(i)\n            if (accountObject.needsRecovering()) {\n                accountObject.clearAllAddresses()\n                accountObject.recoverAccount(false, recoverStealthPayments: true)\n            }\n        }\n        \n        guard let coldWalletsAccounts = AppDelegate.instance().coldWalletAccounts else { return }\n        for i in stride(from: 0, to: coldWalletsAccounts.getNumberOfAccounts(), by: 1) {\n            let accountObject = coldWalletAccounts?.getAccountObjectForIdx(i)\n            if let accountObject = accountObject, accountObject.needsRecovering() {\n                accountObject.clearAllAddresses()\n                accountObject.recoverAccount(false, recoverStealthPayments: true)\n            }\n        }\n        \n        guard let importedAccounts = AppDelegate.instance().importedAccounts else { return }\n        for i in stride(from: 0, to: importedAccounts.getNumberOfAccounts(), by: 1) {\n            let accountObject = importedAccounts.getAccountObjectForIdx(i)\n            if (accountObject.needsRecovering()) {\n                accountObject.clearAllAddresses()\n                accountObject.recoverAccount(false, recoverStealthPayments: true)\n            }\n        }\n        \n        guard let importedWatchAccounts = AppDelegate.instance().importedWatchAccounts else { return }\n        for i in stride(from: 0, to: importedWatchAccounts.getNumberOfAccounts(), by: 1) {\n            let accountObject = importedWatchAccounts.getAccountObjectForIdx(i)\n            if (accountObject.needsRecovering()) {\n                accountObject.clearAllAddresses()\n                accountObject.recoverAccount(false, recoverStealthPayments: true)\n            }\n        }\n    }\n    \n    func updateGodSend() {\n        var sendFromType = TLPreferences.getSendFromType()\n        var sendFromIndex = Int(TLPreferences.getSendFromIndex())\n        \n        if (sendFromType == .hdWallet) {\n            if let accounts = accounts, sendFromIndex > accounts.getNumberOfAccounts() - 1 {\n                sendFromType = TLSendFromType.hdWallet\n                sendFromIndex = 0\n            }\n        } else if (sendFromType == .coldWalletAccount) {\n            if let coldWalletAccounts = coldWalletAccounts, sendFromIndex > coldWalletAccounts.getNumberOfAccounts() - 1 {\n                sendFromType = TLSendFromType.hdWallet\n                sendFromIndex = 0\n            }\n        } else if (sendFromType == .importedAccount) {\n            if let importedAccounts = importedAccounts, sendFromIndex > importedAccounts.getNumberOfAccounts() - 1 {\n                sendFromType = TLSendFromType.hdWallet\n                sendFromIndex = 0\n            }\n        } else if (sendFromType == .importedWatchAccount) {\n            if let importedWatchAccounts = importedWatchAccounts, sendFromIndex > importedWatchAccounts.getNumberOfAccounts() - 1 {\n                sendFromType = TLSendFromType.hdWallet\n                sendFromIndex = 0\n            }\n        } else if (sendFromType == .importedAddress) {\n            if let importedAddresses = importedAddresses, sendFromIndex > importedAddresses.getCount() - 1 {\n                sendFromType = TLSendFromType.hdWallet\n                sendFromIndex = 0\n            }\n        } else if (sendFromType == .importedWatchAddress) {\n            if let importedWatchAddresses = importedWatchAddresses, sendFromIndex > importedWatchAddresses.getCount() - 1 {\n                sendFromType = TLSendFromType.hdWallet\n                sendFromIndex = 0\n            }\n        }\n        \n        updateGodSend(sendFromType, sendFromIndex:sendFromIndex)\n    }\n    \n    func updateGodSend(_ sendFromType: TLSendFromType, sendFromIndex: Int) {\n        TLPreferences.setSendFromType(sendFromType)\n        TLPreferences.setSendFromIndex(UInt(sendFromIndex))\n        \n        if let accounts = accounts, sendFromType == .hdWallet {\n            let accountObject = accounts.getAccountObjectForIdx(sendFromIndex)\n            godSend?.setOnlyFromAccount(accountObject)\n        } else if let coldWalletAccounts = coldWalletAccounts, sendFromType == .coldWalletAccount {\n            let accountObject = coldWalletAccounts.getAccountObjectForIdx(sendFromIndex)\n            godSend?.setOnlyFromAccount(accountObject)\n        } else if let importedAccounts = importedAccounts, sendFromType == .importedAccount {\n            let accountObject = importedAccounts.getAccountObjectForIdx(sendFromIndex)\n            godSend?.setOnlyFromAccount(accountObject)\n        } else if let importedWatchAccounts = importedWatchAccounts, sendFromType == .importedWatchAccount {\n            let accountObject = importedWatchAccounts.getAccountObjectForIdx(sendFromIndex)\n            godSend?.setOnlyFromAccount(accountObject)\n        } else if let importedAddresses = importedAddresses, sendFromType == .importedAddress {\n            let importedAddress = importedAddresses.getAddressObjectAtIdx(sendFromIndex)\n            godSend?.setOnlyFromAddress(importedAddress)\n        } else if let importedWatchAddresses = importedWatchAddresses, sendFromType == .importedWatchAddress {\n            let importedAddress = importedWatchAddresses.getAddressObjectAtIdx(sendFromIndex)\n            godSend?.setOnlyFromAddress(importedAddress)\n        }\n    }\n    \n    func updateReceiveSelectedObject(_ sendFromType: TLSendFromType, sendFromIndex: Int) {\n        switch sendFromType {\n        case .hdWallet:\n            guard let accounts = accounts, let receiveSelectedObject = receiveSelectedObject else { return }\n            let accountObject = accounts.getAccountObjectForIdx(sendFromIndex)\n            receiveSelectedObject.setSelectedAccount(accountObject)\n        case .coldWalletAccount:\n            guard let coldWalletAccounts = coldWalletAccounts, let receiveSelectedObject = receiveSelectedObject else { return }\n            let accountObject = coldWalletAccounts.getAccountObjectForIdx(sendFromIndex)\n            receiveSelectedObject.setSelectedAccount(accountObject)\n        case .importedAccount:\n            guard let importedAccounts = importedAccounts, let receiveSelectedObject = receiveSelectedObject else { return }\n            let accountObject = importedAccounts.getAccountObjectForIdx(sendFromIndex)\n            receiveSelectedObject.setSelectedAccount(accountObject)\n        case .importedWatchAccount:\n            guard let importedWatchAccounts = importedWatchAccounts, let receiveSelectedObject = receiveSelectedObject else { return }\n            let accountObject = importedWatchAccounts.getAccountObjectForIdx(sendFromIndex)\n            receiveSelectedObject.setSelectedAccount(accountObject)\n        case .importedAddress:\n            guard let importedAddresses = importedAddresses,\n                let receiveSelectedObject = receiveSelectedObject else { return }\n            let importedAddress = importedAddresses.getAddressObjectAtIdx(sendFromIndex)\n            receiveSelectedObject.setSelectedAddress(importedAddress)\n        case .importedWatchAddress:\n            guard let importedWatchAddresses = importedWatchAddresses,\n                let receiveSelectedObject = receiveSelectedObject else { return }\n            let importedAddress = importedWatchAddresses.getAddressObjectAtIdx(sendFromIndex)\n            receiveSelectedObject.setSelectedAddress(importedAddress)\n        }\n    }\n    \n    func updateHistorySelectedObject(_ sendFromType: TLSendFromType, sendFromIndex: Int) {\n        if let accounts = accounts, let historySelectedObject = historySelectedObject, sendFromType == .hdWallet {\n            let accountObject = accounts.getAccountObjectForIdx(sendFromIndex)\n            historySelectedObject.setSelectedAccount(accountObject)\n        } else if let coldWalletAccounts = coldWalletAccounts, let historySelectedObject = historySelectedObject, sendFromType == .coldWalletAccount {\n            let accountObject = coldWalletAccounts.getAccountObjectForIdx(sendFromIndex)\n            historySelectedObject.setSelectedAccount(accountObject)\n        } else if let importedAccounts = importedAccounts, let historySelectedObject = historySelectedObject, sendFromType == .importedAccount {\n            let accountObject = importedAccounts.getAccountObjectForIdx(sendFromIndex)\n            historySelectedObject.setSelectedAccount(accountObject)\n        } else if let importedWatchAccounts = importedWatchAccounts, let historySelectedObject = historySelectedObject, sendFromType == .importedWatchAccount {\n            let accountObject = importedWatchAccounts.getAccountObjectForIdx(sendFromIndex)\n            historySelectedObject.setSelectedAccount(accountObject)\n        } else if let importedAddresses = importedAddresses, let historySelectedObject = historySelectedObject, sendFromType == .importedAddress {\n            let importedAddress = importedAddresses.getAddressObjectAtIdx(sendFromIndex)\n            historySelectedObject.setSelectedAddress(importedAddress)\n        } else if let importedWatchAddresses = importedWatchAddresses, let historySelectedObject = historySelectedObject, sendFromType == .importedWatchAddress {\n            let importedAddress = importedWatchAddresses.getAddressObjectAtIdx(sendFromIndex)\n            historySelectedObject.setSelectedAddress(importedAddress)\n        }\n    }\n    \n    \n    func showLockViewForEnteringPasscode(_ notification: Notification) {\n        if !hasFinishLaunching && LTHPasscodeViewController.doesPasscodeExist() {\n            //LTHPasscodeViewController.sharedUser().maxNumberOfAllowedFailedAttempts = 0\n            UIApplication.shared.isStatusBarHidden = true\n            LTHPasscodeViewController.sharedUser().delegate = self\n            LTHPasscodeViewController.sharedUser().showLockScreen(withAnimation: false,\n                withLogout:false                                                         ,\n                andLogoutTitle:nil)\n        }\n        \n        hasFinishLaunching = true\n    }\n    \n    func recoverHDWallet(_ mnemonic: String, shouldRefreshApp: Bool = true) {\n        if shouldRefreshApp {\n            refreshApp(mnemonic)\n        } else {\n            let masterHex = TLHDWalletWrapper.getMasterHex(mnemonic)\n            appWallet.createInitialWalletPayload(mnemonic, masterHex:masterHex)\n            \n            accounts = TLAccounts(appWallet: appWallet, accountsArray:appWallet.getAccountObjectArray(), accountType:.hdWallet)\n            coldWalletAccounts = TLAccounts(appWallet: appWallet, accountsArray:appWallet.getColdWalletAccountArray(), accountType:.coldWallet)\n            importedAccounts = TLAccounts(appWallet: appWallet, accountsArray:appWallet.getImportedAccountArray(), accountType:.imported)\n            importedWatchAccounts = TLAccounts(appWallet: appWallet, accountsArray: appWallet.getWatchOnlyAccountArray(), accountType:.importedWatch)\n            importedAddresses = TLImportedAddresses(appWallet: appWallet, importedAddresses: appWallet.getImportedPrivateKeyArray(), accountAddressType:.imported)\n            importedWatchAddresses = TLImportedAddresses(appWallet: appWallet, importedAddresses: appWallet.getWatchOnlyAddressArray(), accountAddressType:.importedWatch)\n        }\n        \n        var accountIdx = 0\n        var consecutiveUnusedAccountCount = 0\n        let MAX_CONSECUTIVE_UNUSED_ACCOUNT_LOOK_AHEAD_COUNT = 4\n        \n        guard let accounts = accounts else { return }\n        \n        while true {\n            let accountName = String(format:TLDisplayStrings.ACCOUNT_X_STRING(), (accountIdx + 1))\n            let accountObject = accounts.createNewAccount(accountName, accountType:.normal, preloadStartingAddresses:false)\n            guard let stealthWallet = accountObject.stealthWallet else { return }\n            \n            DLog(\"recoverHDWalletaccountName \\(accountName)\")\n            \n            let sumMainAndChangeAddressMaxIdx = accountObject.recoverAccount(false)\n            DLog(String(format: \"accountName \\(accountName) sumMainAndChangeAddressMaxIdx: \\(sumMainAndChangeAddressMaxIdx)\"))\n            if sumMainAndChangeAddressMaxIdx > -2 || TLWalletUtils.ENABLE_STEALTH_ADDRESS() && stealthWallet.checkIfHaveStealthPayments() {\n                consecutiveUnusedAccountCount = 0\n            } else {\n                consecutiveUnusedAccountCount += 1\n                if consecutiveUnusedAccountCount == MAX_CONSECUTIVE_UNUSED_ACCOUNT_LOOK_AHEAD_COUNT {\n                    break\n                }\n            }\n            \n            accountIdx += 1\n        }\n        \n        DLog(\"recoverHDWallet getNumberOfAccounts: \\(accounts.getNumberOfAccounts())\")\n        if accounts.getNumberOfAccounts() == 0 {\n            accounts.createNewAccount(TLDisplayStrings.ACCOUNT_1_STRING(), accountType:.normal)\n        } else if accounts.getNumberOfAccounts() > 1 {\n            while accounts.getNumberOfAccounts() > 1 && consecutiveUnusedAccountCount > 0 {\n                accounts.popTopAccount()\n                consecutiveUnusedAccountCount -= 1\n            }\n        }\n    }\n    \n    // work around to show SendView\n    func checkToShowSendViewWithURL(_ notification: Notification) {\n        if bitcoinURIOptionsDict != nil {\n            assert(window?.rootViewController is ECSlidingViewController, \"rootViewController != ECSlidingViewController\")\n            let vc = window?.rootViewController as! ECSlidingViewController\n            vc.topViewController.showSendView()\n        }\n    }\n    \n    func setSettingsPasscodeViewColors() {\n        LTHPasscodeViewController.sharedUser().view.backgroundColor = savedPasscodeViewDefaultBackgroundColor\n        \n        LTHPasscodeViewController.sharedUser().failedAttemptLabel.textColor = savedPasscodeViewDefaultLabelTextColor\n        LTHPasscodeViewController.sharedUser().enterPasscodeLabel.textColor = savedPasscodeViewDefaultLabelTextColor\n        LTHPasscodeViewController.sharedUser().okButton.setTitleColor(savedPasscodeViewDefaultLabelTextColor, for:UIControlState())\n        \n        LTHPasscodeViewController.sharedUser().firstDigitTextField.textColor = savedPasscodeViewDefaultPasscodeTextColor\n        LTHPasscodeViewController.sharedUser().secondDigitTextField.textColor = savedPasscodeViewDefaultPasscodeTextColor\n        LTHPasscodeViewController.sharedUser().thirdDigitTextField.textColor = savedPasscodeViewDefaultPasscodeTextColor\n        LTHPasscodeViewController.sharedUser().fourthDigitTextField.textColor = savedPasscodeViewDefaultPasscodeTextColor\n    }\n    \n    fileprivate func setupPasscodeViewColors() {\n        savedPasscodeViewDefaultBackgroundColor = LTHPasscodeViewController.sharedUser().backgroundColor\n        savedPasscodeViewDefaultLabelTextColor = LTHPasscodeViewController.sharedUser().labelTextColor\n        savedPasscodeViewDefaultPasscodeTextColor = LTHPasscodeViewController.sharedUser().passcodeTextColor\n        \n        LTHPasscodeViewController.sharedUser().backgroundColor = TLColors.mainAppColor()\n        LTHPasscodeViewController.sharedUser().labelTextColor = TLColors.mainAppOppositeColor()\n        LTHPasscodeViewController.sharedUser().passcodeTextColor = TLColors.mainAppOppositeColor()\n        \n        LTHPasscodeViewController.sharedUser().navigationBarTintColor = TLColors.mainAppColor()\n        LTHPasscodeViewController.sharedUser().navigationTintColor = TLColors.mainAppOppositeColor()\n        LTHPasscodeViewController.sharedUser().navigationTitleColor = TLColors.mainAppOppositeColor()\n    }\n\n    func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {\n        Fabric.with([Crashlytics.self])\n        \n        AFNetworkActivityIndicatorManager.shared().isEnabled = true\n\n        window?.backgroundColor = TLColors.mainAppColor()\n        application.statusBarStyle = UIStatusBarStyle.lightContent\n        \n        justSetupHDWallet = false\n        let appVersion = Bundle.main.infoDictionary?[\"CFBundleShortVersionString\"] as! String\n        if TLPreferences.getInstallDate() == nil {\n            \n            // before version 1.4.0, install date was not getting set properly, this fixes things\n            if TLPreferences.getAppVersion() == \"0\" {\n                TLPreferences.setHasSetupHDWallet(false)\n                TLPreferences.setInstallDate()\n                DLog(\"set InstallDate \\(TLPreferences.getInstallDate())\")\n                TLPreferences.setAppVersion(appVersion)\n            } else {\n                TLPreferences.setInstallDate()\n                DLog(\"set fake InstallDate \\(TLPreferences.getInstallDate())\")\n                if appVersion != TLPreferences.getAppVersion() {\n                    TLUpdateAppData.instance().beforeUpdatedAppVersion = TLPreferences.getAppVersion()\n                    DLog(\"set new appVersion \\(appVersion)\")\n                    TLPreferences.setAppVersion(appVersion)\n                    TLPreferences.setDisabledPromptRateApp(false)\n                }\n            }\n            \n        } else if appVersion != TLPreferences.getAppVersion() {\n            TLUpdateAppData.instance().beforeUpdatedAppVersion = TLPreferences.getAppVersion()\n            DLog(\"set new appVersion \\(appVersion)\")\n            TLPreferences.setAppVersion(appVersion)\n            TLPreferences.setDisabledPromptRateApp(false)\n        }\n        \n        self.setupPasscodeViewColors()\n        \n        self.isAccountsAndImportsLoaded = false\n        \n        if (TLPreferences.hasSetupHDWallet() && UIApplication.instancesRespond(to: \"registerUserNotificationSettings\"))\n        {\n            application.registerUserNotificationSettings(UIUserNotificationSettings(types: [.alert, .badge, .sound], categories:nil))\n        }\n        \n        NotificationCenter.default.addObserver(self, selector:#selector(AppDelegate.checkToShowSendViewWithURL(_:)), name:NSNotification.Name.UIApplicationDidBecomeActive, object:nil)\n        \n        // condition is used so that I dont prompt user to setup notifactions when just installed app\n        if (TLPreferences.hasSetupHDWallet()) {\n            //setUpLocalNotification()\n        }\n        \n        hasFinishLaunching = false\n        \n        NotificationCenter.default.addObserver(self, selector:#selector(AppDelegate.showLockViewForEnteringPasscode(_:)), name:NSNotification.Name(rawValue: TLNotificationEvents.EVENT_SEND_SCREEN_LOADING()), object:nil)\n        \n        return true\n    }\n    \n    func refreshApp(_ passphrase: String, clearWalletInMemory: Bool = true) {\n        if (TLPreferences.getCloudBackupWalletFileName() == nil) {\n            TLPreferences.setCloudBackupWalletFileName()\n        }\n\n        TLPreferences.deleteWalletPassphrase()\n        TLPreferences.deleteEncryptedWalletJSONPassphrase()\n        \n        TLPreferences.setWalletPassphrase(passphrase, useKeychain: true)\n        TLPreferences.setEncryptedWalletJSONPassphrase(passphrase, useKeychain: true)\n        TLPreferences.clearEncryptedWalletPassphraseKey()\n\n        TLPreferences.setCanRestoreDeletedApp(true)\n        TLPreferences.setInAppSettingsCanRestoreDeletedApp(true)\n        \n        TLPreferences.setEnableBackupWithiCloud(false)\n        TLPreferences.setInAppSettingsKitEnableBackupWithiCloud(false)\n        \n        TLPreferences.setInAppSettingsKitEnabledDynamicFee(true)\n        TLPreferences.setInAppSettingsKitDynamicFeeSettingIdx(TLDynamicFeeSetting.FastestFee);\n        TLPreferences.setInAppSettingsKitTransactionFee(TLWalletUtils.DEFAULT_FEE_AMOUNT_IN_BITCOINS())\n        TLPreferences.setEnablePINCode(false)\n        TLSuggestions.instance().enabledAllSuggestions()\n        TLPreferences.resetBlockExplorerAPIURL()\n        \n        TLPreferences.setBlockExplorerAPI(String(format:\"%ld\", DEFAULT_BLOCKEXPLORER_API.rawValue))\n        TLPreferences.setInAppSettingsKitBlockExplorerAPI(String(format:\"%ld\", DEFAULT_BLOCKEXPLORER_API.rawValue))\n        \n        TLPreferences.resetStealthExplorerAPIURL()\n        TLPreferences.resetStealthServerPort()\n        TLPreferences.resetStealthWebSocketPort()\n\n        LTHPasscodeViewController.deletePasscode()\n        \n        let DEFAULT_CURRENCY_IDX = \"20\"\n        TLPreferences.setCurrency(DEFAULT_CURRENCY_IDX)\n        TLPreferences.setInAppSettingsKitCurrency(DEFAULT_CURRENCY_IDX)\n        \n        TLPreferences.setSendFromType(.hdWallet)\n        TLPreferences.setSendFromIndex(0)\n        \n        if clearWalletInMemory {\n            let masterHex = TLHDWalletWrapper.getMasterHex(passphrase)\n            self.appWallet.createInitialWalletPayload(passphrase, masterHex:masterHex)\n            \n            self.accounts = TLAccounts(appWallet: self.appWallet, accountsArray:self.appWallet.getAccountObjectArray(), accountType:.hdWallet)\n            self.coldWalletAccounts = TLAccounts(appWallet: self.appWallet, accountsArray:self.appWallet.getColdWalletAccountArray(), accountType:.coldWallet)\n            self.importedAccounts = TLAccounts(appWallet:self.appWallet, accountsArray:self.appWallet.getImportedAccountArray(), accountType:.imported)\n            self.importedWatchAccounts = TLAccounts(appWallet: self.appWallet, accountsArray:self.appWallet.getWatchOnlyAccountArray(), accountType:.importedWatch)\n            self.importedAddresses = TLImportedAddresses(appWallet: self.appWallet, importedAddresses:self.appWallet.getImportedPrivateKeyArray(), accountAddressType:.imported)\n            self.importedWatchAddresses = TLImportedAddresses(appWallet: self.appWallet, importedAddresses:self.appWallet.getWatchOnlyAddressArray(), accountAddressType:.importedWatch)\n        }\n        \n        self.receiveSelectedObject = TLSelectedObject()\n        self.historySelectedObject = TLSelectedObject()\n        \n        //self.appWallet.addAddressBookEntry(\"vJmwhHhMNevDQh188gSeHd2xxxYGBQmnVuMY2yG2MmVTC31UWN5s3vaM3xsM2Q1bUremdK1W7eNVgPg1BnvbTyQuDtMKAYJanahvse\", label: \"ArcBit Donation\")\n    }\n    \n    func setAccountsListeningToStealthPaymentsToFalse() {\n        guard let accounts = accounts else { return }\n        for i in stride(from: 0, to: accounts.getNumberOfAccounts(), by: 1) {\n            let accountObject = accounts.getAccountObjectForIdx(i)\n            if accountObject.stealthWallet != nil {\n                accountObject.stealthWallet?.isListeningToStealthPayment = false\n            }\n        }\n        \n        guard let importedAccounts = importedAccounts else { return }\n        for i in stride(from: 0, to: importedAccounts.getNumberOfAccounts(), by: 1) {\n            let accountObject = importedAccounts.getAccountObjectForIdx(i)\n            if let stealthWallet = accountObject.stealthWallet {\n                stealthWallet.isListeningToStealthPayment = false\n            }\n        }\n    }\n    \n    func respondToStealthChallegeNotification(_ note: Notification) {\n        let responseDict = note.object as! NSDictionary\n        let challenge = responseDict.object(forKey: \"challenge\") as! String\n        let lock = NSLock()\n        lock.lock()\n        TLStealthWebSocket.instance().challenge = challenge\n        lock.unlock()\n        respondToStealthChallege(challenge)\n    }\n    \n    func respondToStealthChallege(_ challenge: String) {\n        if (!isAccountsAndImportsLoaded || !TLStealthWebSocket.instance().isWebSocketOpen()) {\n            return\n        }\n        guard let accounts = accounts else { return }\n        for i in stride(from: 0, to: accounts.getNumberOfAccounts(), by: 1) {\n            let accountObject = accounts.getAccountObjectForIdx(i)\n            if accountObject.hasFetchedAccountData() &&\n                accountObject.stealthWallet != nil && accountObject.stealthWallet?.isListeningToStealthPayment == false {\n                if let addrAndSignature = accountObject.stealthWallet?.getStealthAddressAndSignatureFromChallenge(challenge){\n                    TLStealthWebSocket.instance().sendMessageSubscribeToStealthAddress(addrAndSignature.0, signature: addrAndSignature.1)\n                }\n            }\n        }\n        guard let importedAccounts = importedAccounts else { return }\n        for i in stride(from: 0, to: importedAccounts.getNumberOfAccounts(), by: 1) {\n            let accountObject = importedAccounts.getAccountObjectForIdx(i)\n            if let stealthWallet = accountObject.stealthWallet, accountObject.hasFetchedAccountData() &&\n                stealthWallet.isListeningToStealthPayment == false {\n                    let addrAndSignature = stealthWallet.getStealthAddressAndSignatureFromChallenge(challenge)\n                    TLStealthWebSocket.instance().sendMessageSubscribeToStealthAddress(addrAndSignature.0, signature: addrAndSignature.1)\n            }\n        }\n    }\n    \n    func respondToStealthAddressSubscription(_ note: Notification) {\n        let responseDict = note.object as! NSDictionary\n        let stealthAddress = responseDict.object(forKey: \"addr\") as! String\n        let subscriptionSuccess = responseDict.object(forKey: \"success\") as! String\n        if subscriptionSuccess == \"False\" && consecutiveFailedStealthChallengeCount < MAX_CONSECUTIVE_FAILED_STEALTH_CHALLENGE_COUNT {\n            consecutiveFailedStealthChallengeCount += 1\n            TLStealthWebSocket.instance().sendMessageGetChallenge()\n            return\n        }\n        consecutiveFailedStealthChallengeCount = 0\n        guard let accounts = accounts else { return }\n        for i in stride(from: 0, to: accounts.getNumberOfAccounts(), by: 1) {\n            let accountObject = accounts.getAccountObjectForIdx(i)\n            if let stealthWallet = accountObject.stealthWallet, stealthWallet.getStealthAddress() == stealthAddress {\n                stealthWallet.isListeningToStealthPayment = true\n            }\n        }\n        guard let importedAccounts = importedAccounts else { return }\n        for i in stride(from: 0, to: importedAccounts.getNumberOfAccounts(), by: 1) {\n            let accountObject = importedAccounts.getAccountObjectForIdx(i)\n            if let stealthWallet = accountObject.stealthWallet, stealthWallet.getStealthAddress() == stealthAddress {\n                stealthWallet.isListeningToStealthPayment = true\n            }\n        }\n    }\n\n    func handleGetTxSuccessForRespondToStealthPayment(_ stealthAddress: String, paymentAddress: String,\n        txid: String, txTime: UInt64, txObject: TLTxObject) {\n            let inputAddresses = txObject.getInputAddressArray()\n            let outputAddresses = txObject.getOutputAddressArray()\n            \n            if outputAddresses.index(of: paymentAddress) == nil {\n                return\n            }\n\n            let possibleStealthDataScripts = txObject.getPossibleStealthDataScripts()\n            \n            func processStealthPayment(_ accountObject: TLAccountObject) {\n                if let stealthWallet = accountObject.stealthWallet, stealthWallet.getStealthAddress() == stealthAddress {\n                    if accountObject.hasFetchedAccountData() {\n                        for stealthDataScript in possibleStealthDataScripts {\n                            let privateKey = stealthWallet.generateAndAddStealthAddressPaymentKey(stealthDataScript, expectedAddress: paymentAddress,\n                                txid: txid, txTime: txTime, stealthPaymentStatus: TLStealthPaymentStatus.unspent)\n                            if privateKey != nil {\n                                handleNewTxForAccount(accountObject, txObject: txObject)\n                                break\n                            }\n                        }\n                    }\n                } else {\n                    // must refresh account balance if a input address belongs to account\n                    // this is needed because websocket api does not notify of addresses being used as inputs\n                    for address in inputAddresses {\n                        if accountObject.hasFetchedAccountData() && accountObject.isAddressPartOfAccount(address) {\n                            handleNewTxForAccount(accountObject, txObject: txObject)\n                        }\n                    }\n                }\n            }\n\n            guard let accounts = accounts else { return }\n        \n            for i in stride(from: 0, to: accounts.getNumberOfAccounts(), by: 1) {\n                let accountObject = accounts.getAccountObjectForIdx(i)\n                processStealthPayment(accountObject)\n            }\n        \n            guard let coldWalletAccounts = coldWalletAccounts else { return }\n        \n            for i in stride(from: 0, to: coldWalletAccounts.getNumberOfAccounts(), by: 1) {\n                let accountObject = coldWalletAccounts.getAccountObjectForIdx(i)\n                for address in inputAddresses {\n                    if accountObject.isAddressPartOfAccount(address) {\n                        handleNewTxForAccount(accountObject, txObject: txObject)\n                    }\n                }\n        }\n        \n        guard let importedAccounts = importedAccounts else { return }\n        for i in stride(from: 0, to: importedAccounts.getNumberOfAccounts(), by: 1) {\n            let accountObject = importedAccounts.getAccountObjectForIdx(i)\n            processStealthPayment(accountObject)\n        }\n        guard let importedWatchAccounts = importedWatchAccounts else { return }\n        for i in stride(from: 0, to: importedWatchAccounts.getNumberOfAccounts(), by: 1) {\n            let accountObject = importedWatchAccounts.getAccountObjectForIdx(i)\n            for address in inputAddresses {\n                if accountObject.isAddressPartOfAccount(address) {\n                    handleNewTxForAccount(accountObject, txObject: txObject)\n                }\n            }\n        }\n        \n        guard let importedAddresses = importedAddresses else { return }\n        for i in stride(from: 0, to: importedAddresses.getCount(), by: 1) {\n            let importedAddress = importedAddresses.getAddressObjectAtIdx(i)\n            for addr in inputAddresses {\n                if (addr == importedAddress.getAddress()) {\n                    handleNewTxForImportedAddress(importedAddress, txObject: txObject)\n                }\n            }\n        }\n        \n        guard let importedWatchAddresses = importedWatchAddresses else { return }\n            for i in stride(from: 0, to: importedWatchAddresses.getCount(), by: 1) {\n                let importedAddress = importedWatchAddresses.getAddressObjectAtIdx(i)\n                for addr in inputAddresses {\n                    if (addr == importedAddress.getAddress()) {\n                        handleNewTxForImportedAddress(importedAddress, txObject: txObject)\n                    }\n                }\n            }\n    }\n    \n    func respondToStealthPayment(_ note: Notification) {\n        let responseDict = note.object as! NSDictionary\n        let stealthAddress = responseDict.object(forKey: \"stealth_addr\") as! String\n        let txid = responseDict.object(forKey: \"txid\") as! String\n        let paymentAddress = responseDict.object(forKey: \"addr\") as! String\n        let txTime = UInt64((responseDict.object(forKey: \"time\") as! NSNumber).uint64Value)\n        DLog(\"respondToStealthPayment stealthAddress: \\(stealthAddress)\")\n        DLog(\"respondToStealthPayment respondToStealthPaymentGetTxTries: \\(self.respondToStealthPaymentGetTxTries)\")\n\n        if self.respondToStealthPaymentGetTxTries < self.RESPOND_TO_STEALTH_PAYMENT_GET_TX_TRIES_MAX_TRIES {\n            TLBlockExplorerAPI.instance().getTx(txid, success: { (jsonData:AnyObject?) -> () in\n                if jsonData == nil {\n                    return;\n                }\n                let txObject = TLTxObject(dict:jsonData as! NSDictionary)\n                self.handleGetTxSuccessForRespondToStealthPayment(stealthAddress,\n                    paymentAddress: paymentAddress, txid: txid, txTime: txTime, txObject: txObject)\n                \n                    self.respondToStealthPaymentGetTxTries = 0\n                }, failure: { (code, status) -> () in\n                    DLog(\"respondToStealthPayment getTx fail \\(txid)\")\n                    self.respondToStealthPayment(note)\n                    self.respondToStealthPaymentGetTxTries += 1\n            })\n        }\n    }\n    \n    func setWalletTransactionListenerClosed() {\n        DLog(\"setWalletTransactionListenerClosed\")\n        guard let accounts = accounts else { return }\n        for i in stride(from: 0, to: accounts.getNumberOfAccounts(), by: 1) {\n            let accountObject = accounts.getAccountObjectForIdx(i)\n            accountObject.listeningToIncomingTransactions = false\n        }\n        \n        guard let coldWalletAccounts = coldWalletAccounts else { return }\n        for i in stride(from: 0, to: coldWalletAccounts.getNumberOfAccounts(), by: 1) {\n            let accountObject = coldWalletAccounts.getAccountObjectForIdx(i)\n            accountObject.listeningToIncomingTransactions = false\n        }\n        \n        guard let importedAccounts = importedAccounts else { return }\n        for i in stride(from: 0, to: importedAccounts.getNumberOfAccounts(), by: 1) {\n            let accountObject = importedAccounts.getAccountObjectForIdx(i)\n            accountObject.listeningToIncomingTransactions = false\n        }\n        \n        guard let importedWatchAccounts = importedWatchAccounts else { return }\n        \n        for i in stride(from: 0, to: importedWatchAccounts.getNumberOfAccounts(), by: 1) {\n            let accountObject = importedWatchAccounts.getAccountObjectForIdx(i)\n            accountObject.listeningToIncomingTransactions = false\n        }\n        \n        guard let importedAddresses = importedAddresses else { return }\n        \n        for i in stride(from: 0, to: importedAddresses.getCount(), by: 1) {\n            let importedAddress = importedAddresses.getAddressObjectAtIdx(i)\n            importedAddress.listeningToIncomingTransactions = false\n        }\n        \n        guard let importedWatchAddresses = importedWatchAddresses else { return }\n        for i in stride(from: 0, to: importedWatchAddresses.getCount(), by: 1) {\n            let importedAddress = importedWatchAddresses.getAddressObjectAtIdx(i)\n            importedAddress.listeningToIncomingTransactions = false\n        }\n    }\n    \n    func listenToIncomingTransactionForGeneratedAddress(_ note: Notification) {\n        let address: AnyObject? = note.object as AnyObject?\n        \n        TLTransactionListener.instance().listenToIncomingTransactionForAddress(address as! String)\n    }\n    \n    func updateModelWithNewTransaction(_ note: Notification) {\n        let txDict = note.object as! NSDictionary\n        DLog(\"updateModelWithNewTransaction txDict: \\(txDict.debugDescription)\")\n        \n        DispatchQueue.global(priority: DispatchQueue.GlobalQueuePriority.background).async {\n            let txObject = TLTxObject(dict:txDict)\n            if self.pendingSelfStealthPaymentTxid != nil {\n                // Special case where receiving stealth payment from same sending account. \n                // Let stealth websocket handle it\n                // Need this cause, must generate private key and add address to account so that the bitcoins can be accounted for.\n                if txObject.getHash() as? String == self.pendingSelfStealthPaymentTxid {\n                    //self.pendingSelfStealthPaymentTxid = nil\n                    return\n                }\n            }\n            \n            let addressesInTx = txObject.getAddresses()\n            \n            guard let accounts = self.accounts else { return }\n            \n            for i in stride(from: 0, to: accounts.getNumberOfAccounts(), by: 1) {\n                let accountObject = accounts.getAccountObjectForIdx(i)\n                if !accountObject.hasFetchedAccountData() {\n                    continue\n                }\n                for address in addressesInTx {\n                    if (accountObject.isAddressPartOfAccount(address )) {\n                        DLog(\"updateModelWithNewTransaction accounts \\(accountObject.getAccountID())\")\n                        self.handleNewTxForAccount(accountObject, txObject: txObject)\n                    }\n                }\n            }\n            \n            guard let coldWalletAccounts = self.coldWalletAccounts else { return }\n            for i in stride(from: 0, to: coldWalletAccounts.getNumberOfAccounts(), by: 1) {\n                let accountObject = coldWalletAccounts.getAccountObjectForIdx(i)\n                if !accountObject.hasFetchedAccountData() {\n                    continue\n                }\n                for address in addressesInTx {\n                    if (accountObject.isAddressPartOfAccount(address)) {\n                        DLog(\"updateModelWithNewTransaction coldWalletAccounts \\(accountObject.getAccountID())\")\n                        self.handleNewTxForAccount(accountObject, txObject: txObject)\n                    }\n                }\n            }\n            \n            guard let importedAccounts = self.importedAccounts else { return }\n            for i in stride(from: 0, to: importedAccounts.getNumberOfAccounts(), by: 1) {\n                let accountObject = importedAccounts.getAccountObjectForIdx(i)\n                if !accountObject.hasFetchedAccountData() {\n                    continue\n                }\n                for address in addressesInTx {\n                    if (accountObject.isAddressPartOfAccount(address)) {\n                        DLog(\"updateModelWithNewTransaction importedAccounts \\(accountObject.getAccountID())\")\n                        self.handleNewTxForAccount(accountObject, txObject: txObject)\n                    }\n                }\n            }\n            \n            guard let importedWatchAccounts = self.importedWatchAccounts else { return }\n            \n            for i in stride(from: 0, to: importedWatchAccounts.getNumberOfAccounts(), by: 1) {\n                let accountObject = importedWatchAccounts.getAccountObjectForIdx(i)\n                if !accountObject.hasFetchedAccountData() {\n                    continue\n                }\n                for address in addressesInTx {\n                    if (accountObject.isAddressPartOfAccount(address)) {\n                        DLog(\"updateModelWithNewTransaction importedWatchAccounts \\(accountObject.getAccountID())\")\n                        self.handleNewTxForAccount(accountObject, txObject: txObject)\n                    }\n                }\n            }\n            \n            guard let importedAddresses = self.importedAddresses else { return }\n            for i in stride(from: 0, to: importedAddresses.getCount(), by: 1) {\n                let importedAddress = importedAddresses.getAddressObjectAtIdx(i)\n                if !importedAddress.hasFetchedAccountData() {\n                    continue\n                }\n                let address = importedAddress.getAddress()\n                for addr in addressesInTx {\n                    if (addr == address) {\n                        DLog(\"updateModelWithNewTransaction importedAddresses \\(address)\")\n                        self.handleNewTxForImportedAddress(importedAddress, txObject: txObject)\n                    }\n                }\n            }\n            \n            guard let importedWatchAddresses = self.importedWatchAddresses else { return }\n            for i in stride(from: 0, to: importedWatchAddresses.getCount(), by: 1) {\n                let importedAddress = importedWatchAddresses.getAddressObjectAtIdx(i)\n                if !importedAddress.hasFetchedAccountData() {\n                    continue\n                }\n                let address = importedAddress.getAddress()\n                for addr in addressesInTx {\n                    if (addr == address) {\n                        DLog(\"updateModelWithNewTransaction importedWatchAddresses \\(address)\")\n                        self.handleNewTxForImportedAddress(importedAddress, txObject: txObject)\n                    }\n                }\n            }\n        }\n    }\n\n    func handleNewTxForAccount(_ accountObject: TLAccountObject, txObject: TLTxObject) {\n        let receivedAmount = accountObject.processNewTx(txObject)\n        let receivedTo = accountObject.getAccountNameOrAccountPublicKey()\n        //AppDelegate.instance().pendingOperations.addSetUpAccountOperation(accountObject, fetchDataAgain: true, success: {\n            updateUIForNewTx(txObject.getHash() as! String, receivedAmount: receivedAmount, receivedTo: receivedTo)\n        //})\n    }\n    \n    func handleNewTxForImportedAddress(_ importedAddress: TLImportedAddress, txObject: TLTxObject) {\n        let receivedAmount = importedAddress.processNewTx(txObject)\n        let receivedTo = importedAddress.getLabel()\n        //AppDelegate.instance().pendingOperations.addSetUpImportedAddressOperation(importedAddress, fetchDataAgain: true, success: {\n            updateUIForNewTx(txObject.getHash() as! String, receivedAmount: receivedAmount, receivedTo: receivedTo)\n        //})\n    }\n    \n    func updateUIForNewTx(_ txHash: String, receivedAmount: TLCoin?, receivedTo: String) {\n        DispatchQueue.main.async {\n            DLog(\"updateUIForNewTx txHash \\(txHash)\")\n            self.webSocketNotifiedTxHashSet.add(txHash)\n            NotificationCenter.default.post(name: Notification.Name(rawValue: TLNotificationEvents.EVENT_MODEL_UPDATED_NEW_UNCONFIRMED_TRANSACTION()), object: txHash, userInfo:nil)\n            if let receivedAmount = receivedAmount {\n                NotificationCenter.default.post(name: Notification.Name(rawValue: TLNotificationEvents.EVENT_RECEIVE_PAYMENT()), object:nil, userInfo:nil)\n                self.promptReceivedPayment(receivedTo, receivedAmount: receivedAmount)\n            }\n        }\n    }\n    \n    func promptReceivedPayment(_ receivedTo:String, receivedAmount:TLCoin) {\n        let delayTime = DispatchTime.now() + Double(Int64(1 * Double(NSEC_PER_SEC))) / Double(NSEC_PER_SEC)\n        DispatchQueue.main.asyncAfter(deadline: delayTime) {\n            let msg = \"\\(receivedTo) received \\(TLCurrencyFormat.getProperAmount(receivedAmount))\"\n            TLPrompts.promptSuccessMessage(msg, message: \"\")\n            AudioServicesPlaySystemSound(SystemSoundID(kSystemSoundID_Vibrate))\n        }\n    }\n    \n    func updateModelWithNewBlock(_ note: Notification) {\n        let jsonData = note.object as! NSDictionary\n        let blockHeight = jsonData.object(forKey: \"height\") as! NSNumber\n        DLog(\"updateModelWithNewBlock: \\(blockHeight)\")\n        TLBlockchainStatus.instance().blockHeight = blockHeight.uint64Value\n        \n        NotificationCenter.default.post(name: Notification.Name(rawValue: TLNotificationEvents.EVENT_MODEL_UPDATED_NEW_BLOCK()), object:nil, userInfo:nil)\n        \n    }\n    \n    func initializeWalletAppAndShowInitialScreen(_ recoverHDWalletIfNewlyInstalledApp:(Bool), walletPayload:(NSDictionary?)) {\n        TLAnalytics.instance()\n        \n        NotificationCenter.default.addObserver(self\n            ,selector:#selector(AppDelegate.saveWalletPayloadDelay(_:)),\n            name:NSNotification.Name(rawValue: TLNotificationEvents.EVENT_WALLET_PAYLOAD_UPDATED()), object:nil)\n        NotificationCenter.default.addObserver(self\n            ,selector:#selector(AppDelegate.updateModelWithNewTransaction(_:)),\n            name:NSNotification.Name(rawValue: TLNotificationEvents.EVENT_NEW_UNCONFIRMED_TRANSACTION()), object:nil)\n        NotificationCenter.default.addObserver(self\n            ,selector:#selector(AppDelegate.updateModelWithNewBlock(_:)),\n            name:NSNotification.Name(rawValue: TLNotificationEvents.EVENT_NEW_BLOCK()), object:nil)\n        NotificationCenter.default.addObserver(self\n            ,selector:#selector(AppDelegate.listenToIncomingTransactionForGeneratedAddress(_:)),\n            name:NSNotification.Name(rawValue: TLNotificationEvents.EVENT_NEW_ADDRESS_GENERATED()), object:nil)\n        NotificationCenter.default.addObserver(self\n            ,selector:#selector(AppDelegate.setWalletTransactionListenerClosed),\n            name:NSNotification.Name(rawValue: TLNotificationEvents.EVENT_TRANSACTION_LISTENER_CLOSE()), object:nil)\n        NotificationCenter.default.addObserver(self\n            ,selector:#selector(AppDelegate.listenToIncomingTransactionForWallet),\n            name:NSNotification.Name(rawValue: TLNotificationEvents.EVENT_TRANSACTION_LISTENER_OPEN()), object:nil)\n        \n        NotificationCenter.default.addObserver(self\n            ,selector:#selector(AppDelegate.setAccountsListeningToStealthPaymentsToFalse),\n            name:NSNotification.Name(rawValue: TLNotificationEvents.EVENT_STEALTH_PAYMENT_LISTENER_CLOSE()), object:nil)\n        NotificationCenter.default.addObserver(self\n            ,selector:#selector(AppDelegate.respondToStealthChallegeNotification(_:)),\n            name:NSNotification.Name(rawValue: TLNotificationEvents.EVENT_RECEIVED_STEALTH_CHALLENGE()), object:nil)\n        NotificationCenter.default.addObserver(self\n            ,selector:#selector(AppDelegate.respondToStealthAddressSubscription(_:)),\n            name:NSNotification.Name(rawValue: TLNotificationEvents.EVENT_RECEIVED_STEALTH_ADDRESS_SUBSCRIPTION()), object:nil)\n        NotificationCenter.default.addObserver(self\n            ,selector:#selector(AppDelegate.respondToStealthPayment(_:)),\n            name:NSNotification.Name(rawValue: TLNotificationEvents.EVENT_RECEIVED_STEALTH_PAYMENT()), object:nil)\n    \n        var passphrase = TLWalletPassphrase.getDecryptedWalletPassphrase()\n\n        if !TLPreferences.hasSetupHDWallet() {\n            if (recoverHDWalletIfNewlyInstalledApp) {\n                self.recoverHDWallet(passphrase!)\n            } else {\n                passphrase = TLHDWalletWrapper.generateMnemonicPassphrase()\n                self.refreshApp(passphrase!)\n                let accountObject = self.accounts!.createNewAccount(TLDisplayStrings.ACCOUNT_1_STRING(), accountType:.normal, preloadStartingAddresses:true)\n                accountObject.updateAccountNeedsRecovering(false)\n                AppDelegate.instance().updateGodSend(TLSendFromType.hdWallet, sendFromIndex:0)\n                AppDelegate.instance().updateReceiveSelectedObject(TLSendFromType.hdWallet, sendFromIndex:0)\n                AppDelegate.instance().updateHistorySelectedObject(TLSendFromType.hdWallet, sendFromIndex:0)\n            }\n            justSetupHDWallet = true\n            guard let password = TLWalletJson.getDecryptedEncryptedWalletJSONPassphrase(),\n                let walletsJson = appWallet.getWalletsJson() else { return }\n            let encryptedWalletJson = TLWalletJson.getEncryptedWalletJsonContainer(walletsJson,\n                password: password)\n            let success = saveWalletJson(encryptedWalletJson as NSString, date:Date())\n            if success {\n                TLPreferences.setHasSetupHDWallet(true)\n            } else {\n                NSException(name: NSExceptionName(rawValue: \"Error\"), reason: \"Error saving wallet JSON file\", userInfo: nil).raise()\n            }\n        } else {\n            let masterHex = TLHDWalletWrapper.getMasterHex(passphrase ?? \"\")\n\n            if let walletPayload = walletPayload {\n                appWallet.loadWalletPayload(walletPayload, masterHex:masterHex)\n            } else {\n                TLPrompts.promptErrorMessage(TLDisplayStrings.ERROR_STRING(), message:TLDisplayStrings.ERROR_LOADING_WALLET_JSON_FILE_STRING())\n                NSException(name: NSExceptionName(rawValue: \"Error\"), reason: \"Error loading wallet JSON file\", userInfo: nil).raise()\n            }\n        }\n        \n        accounts = TLAccounts(appWallet: appWallet, accountsArray: appWallet.getAccountObjectArray(), accountType:.hdWallet)\n        coldWalletAccounts = TLAccounts(appWallet: appWallet, accountsArray: appWallet.getColdWalletAccountArray(), accountType: .coldWallet)\n        importedAccounts = TLAccounts(appWallet: appWallet, accountsArray: appWallet.getImportedAccountArray(), accountType: .imported)\n        importedWatchAccounts = TLAccounts(appWallet: appWallet, accountsArray: appWallet.getWatchOnlyAccountArray(), accountType:.importedWatch)\n        importedAddresses = TLImportedAddresses(appWallet: appWallet, importedAddresses: appWallet.getImportedPrivateKeyArray(), accountAddressType:TLAccountAddressType.imported)\n        importedWatchAddresses = TLImportedAddresses(appWallet: appWallet, importedAddresses: appWallet.getWatchOnlyAddressArray(), accountAddressType:TLAccountAddressType.importedWatch)\n        \n        isAccountsAndImportsLoaded = true\n        \n        godSend = TLSpaghettiGodSend(appWallet: appWallet)\n        receiveSelectedObject = TLSelectedObject()\n        historySelectedObject = TLSelectedObject()\n        updateGodSend()\n        let selectObjected: AnyObject? = self.godSend?.getSelectedSendObject()\n        if let receiveSelectedObject = receiveSelectedObject,\n            let historySelectedObject = historySelectedObject {\n            if selectObjected is TLAccountObject {\n                receiveSelectedObject.setSelectedAccount(selectObjected as! TLAccountObject)\n                historySelectedObject.setSelectedAccount(selectObjected as! TLAccountObject)\n            } else if (selectObjected is TLImportedAddress) {\n                receiveSelectedObject.setSelectedAddress(selectObjected as! TLImportedAddress)\n                historySelectedObject.setSelectedAddress(selectObjected as! TLImportedAddress)\n            }\n        }\n        guard let accounts = accounts else { return }\n        assert(accounts.getNumberOfAccounts() > 0, \"\")\n        \n        TLBlockExplorerAPI.instance()\n        TLExchangeRate.instance()\n        TLAchievements.instance()\n        \n        guard let blockExplorerURL = TLPreferences.getBlockExplorerURL(TLPreferences.getBlockExplorerAPI()),\n            let baseURL = URL(string: blockExplorerURL) else { return }\n        \n        TLNetworking.isReachable(baseURL, reachable:{(reachable: TLDOMAINREACHABLE) in\n            if reachable == TLDOMAINREACHABLE.notreachable {\n                TLPrompts.promptErrorMessage(TLDisplayStrings.NETWORK_ERROR_STRING(),\n                    message:String(format:TLDisplayStrings.X_SERVERS_NOT_REACHABLE_STRING(), blockExplorerURL))\n            }\n        })\n        \n        TLBlockExplorerAPI.instance().getBlockHeight({(jsonData: AnyObject!) in\n            let blockHeight = (jsonData.object(forKey: \"height\") as! NSNumber).uint64Value\n            DLog(\"setBlockHeight: \\((jsonData.object(forKey: \"height\") as! NSNumber))\")\n            TLBlockchainStatus.instance().blockHeight = blockHeight\n            }, failure:{(code, status) in\n                DLog(\"Error getting block height.\")\n//                TLPrompts.promptErrorMessage(TLDisplayStrings.NETWORK_ERROR_STRING(),\n//                    message:String(format:TLDisplayStrings.ERROR_GETTING_BLOCK_HEIGHT_STRING()))\n        })\n    }\n    \n    func refreshHDWalletAccounts(_ isRestoringWallet: Bool) {\n        let group = DispatchGroup()\n        guard let accounts = accounts else { return }\n        for i in stride(from: 0, to: accounts.getNumberOfAccounts(), by: 1) {\n            let accountObject = accounts.getAccountObjectForIdx(i)\n            group.enter()\n            \n            // if account needs recovering dont fetch account data\n            if (accountObject.needsRecovering()) {\n                return\n            }\n            \n            guard var activeAddresses = accountObject.getActiveMainAddresses() as? [String] else { return }\n            activeAddresses += accountObject.getActiveChangeAddresses() as! [String]\n\n            if TLWalletUtils.ENABLE_STEALTH_ADDRESS() {\n                if let stealthWallet = accountObject.stealthWallet {\n                    activeAddresses += stealthWallet.getPaymentAddresses()\n                    group.enter()\n                    DispatchQueue.global(priority: DispatchQueue.GlobalQueuePriority.default).async {\n                        accountObject.fetchNewStealthPayments(isRestoringWallet)\n                        group.leave()\n                    }\n                }\n            }\n            \n            accountObject.getAccountData(activeAddresses, shouldResetAccountBalance: true, success: {\n                () in\n                group.leave()\n                \n                }, failure: {\n                    () in\n                    group.leave()\n            })\n        }\n        group.wait(timeout: DispatchTime.distantFuture)\n    }\n    \n    fileprivate func setUpLocalNotification() {\n        if (TLUtils.getiOSVersion() >= 8) {\n            let types: UIUserNotificationType = [UIUserNotificationType.badge, UIUserNotificationType.sound, UIUserNotificationType.alert]\n            let mySettings =\n            UIUserNotificationSettings(types: types, categories:nil)\n            UIApplication.shared.registerUserNotificationSettings(mySettings)\n        }\n    }\n    \n    func application(_ applcation: UIApplication, didReceive notification: UILocalNotification) {\n        if let alertBody = notification.alertBody {\n            DLog(\"didReceiveLocalNotification: \\(alertBody)\")\n            let av = UIAlertView(title: alertBody,\n                             message:\"\",\n                delegate:nil,\n                cancelButtonTitle:nil,\n                otherButtonTitles:TLDisplayStrings.OK_STRING())\n        \n            av.show()\n            AudioServicesPlaySystemSound(SystemSoundID(kSystemSoundID_Vibrate))\n        }\n        \n    }\n    \n    fileprivate func showLocalNotification(_ message: String) {\n        DLog(\"showLocalNotification: \\(message)\")\n        let localNotification = UILocalNotification()\n        localNotification.soundName = UILocalNotificationDefaultSoundName\n        localNotification.fireDate = Date(timeIntervalSinceNow:1)\n        localNotification.alertBody = message\n        localNotification.timeZone = TimeZone.current\n        UIApplication.shared.scheduleLocalNotification(localNotification)\n    }\n    \n    fileprivate func isCameraAllowed() -> Bool {\n        return AVCaptureDevice.authorizationStatus(forMediaType: AVMediaTypeVideo) != AVAuthorizationStatus.denied\n    }\n    \n    fileprivate func promptAppNotAllowedCamera() {\n        let displayName = TLUtils.defaultAppName()\n        \n        let av = UIAlertView(title: String(format:TLDisplayStrings.X_NOT_ALLOWED_TO_ACCESS_THE_CAMERA_STRING(), displayName),\n            message: String(format:TLDisplayStrings.ALLOW_CAMERA_ACCESS_IN_STRING(), displayName),\n            delegate:nil      ,\n            cancelButtonTitle:TLDisplayStrings.OK_STRING())\n        \n        av.show()\n    }\n    \n    \n    func showPrivateKeyReaderController(_ viewController: UIViewController, success: @escaping TLWalletUtils.SuccessWithDictionary, error: @escaping TLWalletUtils.ErrorWithString) {\n        if !isCameraAllowed() {\n            self.promptAppNotAllowedCamera()\n            return\n        }\n        \n        let reader = TLQRCodeScannerViewController(success:{(data: String?) in\n            \n            if let data = data, TLCoreBitcoinWrapper.isBIP38EncryptedKey(data, isTestnet: self.appWallet.walletConfig.isTestnet) {\n                self.scannedEncryptedPrivateKey = data\n            }\n            else {\n                guard let data = data else {\n                    error(\"No Data\")\n                    return\n                }\n                success([\"privateKey\": data])\n            }\n            \n            }, error:{(e: String?) in\n                error(e)\n        })\n        \n        viewController.present(reader, animated:true, completion:nil)\n    }\n    \n    func showAddressReaderControllerFromViewController(_ viewController: (UIViewController), success: @escaping (TLWalletUtils.SuccessWithString), error: @escaping (TLWalletUtils.ErrorWithString)) {\n        if (!isCameraAllowed()) {\n            promptAppNotAllowedCamera()\n            return\n        }\n        \n        let reader = TLQRCodeScannerViewController(success:{(data: String?) in\n            success(data)\n            }, error:{(e: String?) in\n                error(e)\n        })\n        \n        viewController.present(reader, animated:true, completion:nil)\n    }\n    \n    func showExtendedPrivateKeyReaderController(_ viewController: (UIViewController), success: @escaping (TLWalletUtils.SuccessWithString), error: @escaping (TLWalletUtils.ErrorWithString)) {\n        if (!isCameraAllowed()) {\n            promptAppNotAllowedCamera()\n            return\n        }\n        \n        let reader = TLQRCodeScannerViewController(success:{(data: String?) in\n            success(data)\n            }, error:{(e: String?) in\n                error(e)\n        })\n        \n        viewController.present(reader, animated:true, completion:nil)\n    }\n    \n    func showExtendedPublicKeyReaderController(_ viewController: (UIViewController), success: @escaping (TLWalletUtils.SuccessWithString), error: @escaping (TLWalletUtils.ErrorWithString)) {\n        if (!isCameraAllowed()) {\n            promptAppNotAllowedCamera()\n            return\n        }\n        \n        let reader = TLQRCodeScannerViewController(success:{(data: String?) in\n            success(data)\n            }, error:{(e: String?) in\n                error(e)\n        })\n        \n        viewController.present(reader, animated:true, completion:nil)\n    }\n    \n    func showColdWalletSpendReaderControllerFromViewController(_ viewController: (UIViewController), success: @escaping (TLWalletUtils.SuccessWithString), error: @escaping (TLWalletUtils.ErrorWithString)) {\n        if (!isCameraAllowed()) {\n            promptAppNotAllowedCamera()\n            return\n        }\n        \n        let reader = TLQRCodeScannerViewController(success:{(data: String?) in\n            success(data)\n            }, error:{(e: String?) in\n                error(e)\n        })\n        \n        viewController.present(reader, animated:true, completion:nil)\n    }\n    \n    func listenToIncomingTransactionForWallet() {\n        if (!isAccountsAndImportsLoaded || !TLTransactionListener.instance().isWebSocketOpen()) {\n            return\n        }\n        guard let accounts = accounts else { return }\n        for i in stride(from: 0, to: accounts.getNumberOfAccounts(), by: 1) {\n            let accountObject = accounts.getAccountObjectForIdx(i)\n            if accountObject.downloadState != .downloaded {\n                continue\n            }\n            guard let activeMainAddresses = accountObject.getActiveMainAddresses() else { return }\n            for address in activeMainAddresses {\n                TLTransactionListener.instance().listenToIncomingTransactionForAddress(address as! String)\n            }\n            guard let activeChangeAddresses = accountObject.getActiveChangeAddresses() else { return }\n            for address in activeChangeAddresses {\n                TLTransactionListener.instance().listenToIncomingTransactionForAddress(address as! String)\n            }\n            \n            if let stealthWallet = accountObject.stealthWallet {\n                let stealthPaymentAddresses = stealthWallet.getUnspentPaymentAddresses()\n                for address in stealthPaymentAddresses {\n                    TLTransactionListener.instance().listenToIncomingTransactionForAddress(address)\n                }\n            }\n            accountObject.listeningToIncomingTransactions = true\n        }\n        \n        guard let coldWalletAccounts = coldWalletAccounts else { return }\n        \n        for i in stride(from: 0, to: coldWalletAccounts.getNumberOfAccounts(), by: 1) {\n            let accountObject = coldWalletAccounts.getAccountObjectForIdx(i)\n            if accountObject.downloadState != .downloaded {\n                continue\n            }\n            guard let activeMainAddresses = accountObject.getActiveMainAddresses() else { return }\n            for address in activeMainAddresses {\n                TLTransactionListener.instance().listenToIncomingTransactionForAddress(address as! String)\n            }\n            guard let activeChangeAddresses = accountObject.getActiveChangeAddresses() else { return }\n            for address in activeChangeAddresses {\n                TLTransactionListener.instance().listenToIncomingTransactionForAddress(address as! String)\n            }\n            accountObject.listeningToIncomingTransactions = true\n        }\n        guard let importedAccounts =  importedAccounts else { return }\n        for i in stride(from: 0, to: importedAccounts.getNumberOfAccounts(), by: 1) {\n            let accountObject = importedAccounts.getAccountObjectForIdx(i)\n            if accountObject.downloadState != .downloaded {\n                continue\n            }\n            guard let activeMainAddresses = accountObject.getActiveMainAddresses() else { return }\n            for address in activeMainAddresses {\n                TLTransactionListener.instance().listenToIncomingTransactionForAddress(address as! String)\n            }\n            guard let activeChangeAddresses = accountObject.getActiveChangeAddresses() else { return }\n            for address in activeChangeAddresses {\n                TLTransactionListener.instance().listenToIncomingTransactionForAddress(address as! String)\n            }\n            \n            if let stealthWallet = accountObject.stealthWallet {\n                let stealthPaymentAddresses = stealthWallet.getUnspentPaymentAddresses()\n                for address in stealthPaymentAddresses {\n                    TLTransactionListener.instance().listenToIncomingTransactionForAddress(address)\n                }\n            }\n            accountObject.listeningToIncomingTransactions = true\n        }\n        \n        guard let importedWatchAccounts = importedWatchAccounts else { return }\n        for i in stride(from: 0, to: importedWatchAccounts.getNumberOfAccounts(), by: 1) {\n            let accountObject = importedWatchAccounts.getAccountObjectForIdx(i)\n            if accountObject.downloadState != .downloaded {\n                continue\n            }\n            guard let activeMainAddresses = accountObject.getActiveMainAddresses() else { return }\n            for address in activeMainAddresses {\n                TLTransactionListener.instance().listenToIncomingTransactionForAddress(address as! String)\n            }\n            guard let activeChangeAddresses = accountObject.getActiveChangeAddresses() else { return }\n            for address in activeChangeAddresses {\n                TLTransactionListener.instance().listenToIncomingTransactionForAddress(address as! String)\n            }\n            accountObject.listeningToIncomingTransactions = true\n        }\n        \n        guard let importedAddresses = importedAddresses else { return }\n        for i in stride(from: 0, to: importedAddresses.getCount(), by: 1) {\n            let importedAddress = importedAddresses.getAddressObjectAtIdx(i)\n            if importedAddress.downloadState != .downloaded {\n                continue\n            }\n            let address = importedAddress.getAddress()\n            TLTransactionListener.instance().listenToIncomingTransactionForAddress(address)\n            importedAddress.listeningToIncomingTransactions = true\n        }\n        \n        guard let importedWatchAddresses = importedWatchAddresses else { return }\n        for i in stride(from: 0, to: importedWatchAddresses.getCount(), by: 1) {\n            let importedAddress = importedWatchAddresses.getAddressObjectAtIdx(i)\n            if importedAddress.downloadState != .downloaded {\n                continue\n            }\n            let address = importedAddress.getAddress()\n            TLTransactionListener.instance().listenToIncomingTransactionForAddress(address)\n            importedAddress.listeningToIncomingTransactions = true\n        }\n        \n    }\n    \n    func application(_ application: (UIApplication), open url: URL, sourceApplication: (String)?, annotation:Any) -> Bool {\n        self.bitcoinURIOptionsDict = TLWalletUtils.parseBitcoinURI(url.absoluteString)        \n        return true\n    }\n    \n    func applicationWillResignActive(_ application: UIApplication) {\n    }\n    \n    func applicationDidEnterBackground(_ application: UIApplication) {\n    }\n    \n    func applicationWillEnterForeground(_ application: UIApplication) {\n        TLExchangeRate.instance().updateExchangeRate()\n    }   \n    \n    func applicationDidBecomeActive(_ application: UIApplication) {\n    }\n    \n    func applicationWillTerminate(_ application: UIApplication) {\n        saveWalletJsonCloud()\n    }\n    \n    func saveWalletPayloadDelay(_ notification: Notification) {\n        DispatchQueue.main.async {\n            if self.saveWalletJSONEnabled == false {\n                return\n            }\n            NSObject.cancelPreviousPerformRequests(withTarget: self, selector:#selector(AppDelegate.saveWalletJsonCloudBackground), object:nil)\n            Timer.scheduledTimer(timeInterval: self.SAVE_WALLET_PAYLOAD_DELAY, target: self,\n                selector: #selector(AppDelegate.saveWalletJsonCloudBackground), userInfo: nil, repeats: false)\n        }\n    }\n    \n    func saveWalletJsonCloudBackground() {\n        DLog(\"saveWalletJsonCloudBackground starting...\")\n        let queue = DispatchQueue.global(priority: DispatchQueue.GlobalQueuePriority.background)\n        queue.async {\n            self.saveWalletJsonCloud()\n        }\n    }\n    \n    func printOutWalletJSON() {\n        guard let walletJson = appWallet.getWalletsJson() else { return }\n        DLog(\"printOutWalletJSON:\\n\\(walletJson)\")\n    }\n    \n    func saveWalletJsonCloud() -> Bool {\n        if saveWalletJSONEnabled == false {\n            DLog(\"saveWalletJSONEnabled disabled\")\n            return false\n        }\n        DLog(\"saveFileToCloud starting...\")\n        guard let walletJson = appWallet.getWalletsJson(),\n            let password = TLWalletJson.getDecryptedEncryptedWalletJSONPassphrase() else { return false }\n        let encryptedWalletJson = TLWalletJson.getEncryptedWalletJsonContainer(walletJson,\n            password: password)\n        saveWalletJson(encryptedWalletJson as (NSString), date:Date())\n        DLog(\"saveFileToCloud local done\")\n        return true\n    }\n    \n    fileprivate func saveWalletJson(_ encryptedWalletJson: (NSString), date: (Date)) -> Bool {\n        let success = TLWalletJson.saveWalletJson(encryptedWalletJson as String, date:date)\n        \n        if (!success) {\n            DispatchQueue.main.async {\n                TLPrompts.promptErrorMessage(TLDisplayStrings.LOCAL_BACK_UP_TO_WALLET_FAILED_STRING(), message:TLDisplayStrings.LOCAL_BACK_UP_TO_WALLET_FAILED_STRING())\n            }\n        }\n        \n        return success\n    }\n    \n    func getLocalWalletJsonDict() -> NSDictionary? {\n        return TLWalletJson.getWalletJsonDict(TLWalletJson.getLocalWalletJSONFile(),\n            password:TLWalletJson.getDecryptedEncryptedWalletJSONPassphrase())\n    }\n    \n    fileprivate func menuShownHideStatusBar() {\n        UIApplication.shared.isStatusBarHidden = true\n    }\n    \n    fileprivate func menuHiddenShowStatusBar() {\n        UIApplication.shared.isStatusBarHidden = false\n    }\n    \n    \n    func passcodeViewControllerWillClose() {\n        UIApplication.shared.isStatusBarHidden = false\n    }\n    \n    func maxNumberOfFailedAttemptsReached() {\n    }\n    \n    func passcodeWasEnteredSuccessfully() {\n        UIApplication.shared.isStatusBarHidden = false\n    }\n    \n    func logoutButtonWasPressed() {\n        UIApplication.shared.isStatusBarHidden = false\n    }\n}\n"
  },
  {
    "path": "ArcBit/ArcBit-Bridging-Header.h",
    "content": "//\n//  Use this file to import your target's public headers that you would like to expose to Swift.\n//\n\n#import <CoreBitcoin/BTCAddress.h>\n#import <CoreBitcoin/BTCBase58.h>\n#import <CoreBitcoin/BTCBigNumber.h>\n#import <CoreBitcoin/BTCBlock.h>\n#import <CoreBitcoin/BTCBlockchainInfo.h>\n#import <CoreBitcoin/BTCBlockHeader.h>\n#import <CoreBitcoin/BTCCurvePoint.h>\n#import <CoreBitcoin/BTCData.h>\n#import <CoreBitcoin/BTCErrors.h>\n#import <CoreBitcoin/BTCKey.h>\n#import <CoreBitcoin/BTCKeychain.h>\n#import <CoreBitcoin/BTCMnemonic.h>\n#import <CoreBitcoin/BTCBlindSignature.h>\n#import <CoreBitcoin/BTCOpcode.h>\n#import <CoreBitcoin/BTCProtocolSerialization.h>\n#import <CoreBitcoin/BTCScript.h>\n#import <CoreBitcoin/BTCScriptMachine.h>\n#import <CoreBitcoin/BTCSignatureHashType.h>\n#import <CoreBitcoin/BTCTransaction.h>\n#import <CoreBitcoin/BTCTransactionInput.h>\n#import <CoreBitcoin/BTCTransactionOutput.h>\n#import <CoreBitcoin/BTCOutpoint.h>\n#import <CoreBitcoin/BTCUnitsAndLimits.h>\n#import <CoreBitcoin/NSData+BTCData.h>\n#import <CoreBitcoin/BTCKeychain.h>\n#import <CoreBitcoin/BTCData.h>\n#import <CoreBitcoin/BTCBase58.h>\n#import <CoreBitcoin/BTCKey.h>\n#import <CoreBitcoin/BTCAddress.h>\n#import <SwiftTryCatch.h>\n#import \"UIAlertController+Blocks.h\"\n#import \"NSMutableData+Bitcoin.h\"\n#import \"UIViewController+ECSlidingViewController.h\"\n#import \"UINavigationBar+FixedHeightWhenStatusBarHidden.h\"\n#import <BTCBigNumber.h>\n#import \"JNKeyChain.h\"\n#import \"MBProgressHUD.h\"\n#import <iCloud.h>\n#import \"RNCryptor/RNCryptor.h\"\n#import \"BRKey.h\"\n#import \"BRKey+BIP38.h\"\n#import \"NSString+Base58.h\"\n#import <CoreBitcoin/BTCBitcoinURL.h>\n#import \"BRTransaction.h\"\n#import \"NSData+Hash.h\"\n#import \"QREncoder.h\"\n#import \"RNEncryptor.h\"\n#import \"RNDecryptor.h\"\n#import \"NSDate-Utilities.h\"\n#import \"RNCryptor.h\"\n#import \"iToast.h\"\n#import \"AFNetworking.h\"\n#import \"SRWebSocket.h\"\n#import \"SRWebSocket+Helpers.h\"\n#import \"AFNetworkActivityIndicatorManager.h\"\n#import \"CustomIOS7AlertView.h\"\n#import \"ECSlidingConstants.h\"\n#import \"IASKAppSettingsViewController.h\"\n#import \"IASKSettingsReader.h\"\n#import \"LTHPasscodeViewController.h\"\n#import \"TLCloudDocumentSyncWrapper.h\"\n"
  },
  {
    "path": "ArcBit/ArcBit.entitlements",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\n<plist version=\"1.0\">\n<dict/>\n</plist>\n"
  },
  {
    "path": "ArcBit/Base.lproj/LaunchScreen.xib",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n<document type=\"com.apple.InterfaceBuilder3.CocoaTouch.XIB\" version=\"3.0\" toolsVersion=\"7702\" systemVersion=\"14D136\" targetRuntime=\"iOS.CocoaTouch\" propertyAccessControl=\"none\" useAutolayout=\"YES\" launchScreen=\"YES\" useTraitCollections=\"YES\">\n    <dependencies>\n        <plugIn identifier=\"com.apple.InterfaceBuilder.IBCocoaTouchPlugin\" version=\"7701\"/>\n        <capability name=\"Aspect ratio constraints\" minToolsVersion=\"5.1\"/>\n    </dependencies>\n    <objects>\n        <placeholder placeholderIdentifier=\"IBFilesOwner\" id=\"-1\" userLabel=\"File's Owner\"/>\n        <placeholder placeholderIdentifier=\"IBFirstResponder\" id=\"-2\" customClass=\"UIResponder\"/>\n        <view contentMode=\"scaleToFill\" id=\"iN0-l3-epB\">\n            <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"480\" height=\"480\"/>\n            <autoresizingMask key=\"autoresizingMask\" widthSizable=\"YES\" heightSizable=\"YES\"/>\n            <subviews>\n                <imageView userInteractionEnabled=\"NO\" contentMode=\"scaleAspectFit\" horizontalHuggingPriority=\"251\" verticalHuggingPriority=\"251\" image=\"1200X1200logo.png\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"YKD-be-5DR\">\n                    <rect key=\"frame\" x=\"40\" y=\"40\" width=\"400\" height=\"400\"/>\n                    <constraints>\n                        <constraint firstAttribute=\"width\" secondItem=\"YKD-be-5DR\" secondAttribute=\"height\" multiplier=\"1:1\" id=\"AUq-a9-IEW\"/>\n                    </constraints>\n                </imageView>\n            </subviews>\n            <color key=\"backgroundColor\" white=\"1\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"calibratedWhite\"/>\n            <constraints>\n                <constraint firstItem=\"YKD-be-5DR\" firstAttribute=\"top\" secondItem=\"iN0-l3-epB\" secondAttribute=\"top\" constant=\"40\" id=\"C3m-bh-TIM\"/>\n                <constraint firstItem=\"YKD-be-5DR\" firstAttribute=\"leading\" secondItem=\"iN0-l3-epB\" secondAttribute=\"leading\" constant=\"40\" id=\"Ikz-gw-lXS\"/>\n                <constraint firstItem=\"YKD-be-5DR\" firstAttribute=\"centerY\" secondItem=\"iN0-l3-epB\" secondAttribute=\"centerY\" id=\"nPV-mb-s3z\"/>\n                <constraint firstAttribute=\"trailing\" secondItem=\"YKD-be-5DR\" secondAttribute=\"trailing\" constant=\"40\" id=\"toO-Kd-C6w\"/>\n            </constraints>\n            <nil key=\"simulatedStatusBarMetrics\"/>\n            <freeformSimulatedSizeMetrics key=\"simulatedDestinationMetrics\"/>\n            <point key=\"canvasLocation\" x=\"548\" y=\"455\"/>\n        </view>\n    </objects>\n    <resources>\n        <image name=\"1200X1200logo.png\" width=\"1200\" height=\"1200\"/>\n    </resources>\n</document>\n"
  },
  {
    "path": "ArcBit/Base.lproj/Localizable.strings",
    "content": "\"\" = \"\";\n\n\"%@ is not allowed to access the camera\" = \"%@ is not allowed to access the camera\";\n\n\"%@ servers not reachable.\" = \"%@ servers not reachable.\";\n\n\"%d/%d parts scanned.\" = \"%d/%d parts scanned.\";\n\n\"%llu confirmations\" = \"%llu confirmations\";\n\n\"1 Confirmation\" = \"1 Confirmation\";\n\n\"A bitcoin address typically begins with a '1' or '3'. You can see the transactions and track the balance of an address, but you cannot spend from an imported address.\\nYou can temporarily import this watch addresses private key to spend its bitcoins. Simply go the Send screen and select a watch address to spend from and you will be prompted to temporarily import your addresses' private key when you click 'Review Payment' in the Send screen. The private key will stay in memory until the app exits or until you remove it manually in the Accounts screen.\" = \"A bitcoin address typically begins with a '1' or '3'. You can see the transactions and track the balance of an address, but you cannot spend from an imported address.\\nYou can however temporarily import this watch addresses' private key to spend its bitcoins. Simply go to the Send screen and select a watch address to spend from and you will be prompted to temporarily import your addresses' private key when you click 'Review Payment' on the Send screen. The private key will stay in memory until the app exits or until you remove it manually on the Accounts screen.\";\n\n\"A bitcoin wallet is a software application that allows people to send, receive and manage their bitcoins.\\nBe aware of how other bitcoin applications store your bitcoins' private keys, which are needed to spend your bitcoins.\\nThere are generally three different ways applications can your store your bitcoins.\\n1.\\nThe banking model, where your bitcoin private keys are held for you by someone else.\\n2.\\nThe security box model, where your bitcoin private keys are stored encrypted on someone else’s servers.\\n3.\\nThe wallet model, where your bitcoin private keys are stored only on your device.\" = \"A bitcoin wallet is a software application that allows people to send, receive and manage their bitcoins.\\nBe aware of how other bitcoin applications store your bitcoins' private keys, which are needed to spend your bitcoins.\\nThere are generally three different ways applications can your store your bitcoins.\\n1.\\nThe banking model, where your bitcoin private keys are held for you by someone else.\\n2.\\nThe security box model, where your bitcoin private keys are stored encrypted on someone else’s servers.\\n3.\\nThe wallet model, where your bitcoin private keys are stored only on your device.\";\n\n\"A private key begins with an 'L', 'K', or '5'.\\nBIP 38 encrypted private keys can also be imported. They can either be imported encrypted or unencrypted. If you choose to import it encrypted, you will need to input the password each time you spend from your encrypted private key.\" = \"A private key begins with an 'L', 'K', or '5'.\\nBIP 38 encrypted private keys can also be imported. They can either be imported encrypted or unencrypted. If you choose to import it encrypted, you will need to input the password each time you spend from your encrypted private key.\";\n\n\"Account %@ imported\" = \"Account %@ imported\";\n\n\"Account %lu\" = \"Account %lu\";\n\n\"Account 1\" = \"Account 1\";\n\n\"Account ID\" = \"Account ID\";\n\n\"Account ID: %u\" = \"Account ID: %u\";\n\n\"Account Private Key\" = \"Account Private Key\";\n\n\"Account Public Key\" = \"Account Public Key\";\n\n\"Account private key does not match imported account public key\" = \"Account private key does not match imported account public key\";\n\n\"Account private key missing\" = \"Account private key missing\";\n\n\"Accounts\" = \"Accounts\";\n\n\"Achievement List\" = \"Achievement List\";\n\n\"Achievements\" = \"Achievements\";\n\n\"Actions\" = \"Actions\";\n\n\"Active Change Addresses\" = \"Active Change Addresses\";\n\n\"Active Main Addresses\" = \"Active Main Addresses\";\n\n\"Add Contacts Entry\" = \"Add Contacts Entry\";\n\n\"Address\" = \"Address\";\n\n\"Address ID \" = \"Address ID \";\n\n\"Address ID: %lu\" = \"Address ID: %lu\";\n\n\"Addresses\" = \"Addresses\";\n\n\"Advanced Achievement List\" = \"Advanced Achievement List\";\n\n\"Advanced FAQ\" = \"Advanced FAQ\";\n\n\"Advanced how To:\" = \"Advanced how To:\";\n\n\"After a transaction is broadcast to the Bitcoin network, it may be included in a block that is published to the network. When that happens, it is said that the transaction has been mined at a depth of 1 block. With each subsequent block that is found, the number of blocks deep is increased by one. To be secure against double spending, a transaction should not be considered as confirmed until it is a certain number of blocks deep.\\nA good rule of thumb is that 1 confirmation is good for small value amounts of bitcoins and a user should wait for more confirmations for larger value amounts.\\nArcBit will display the confirmation number up until the 6th confirmation.\" = \"After a transaction is broadcast to the Bitcoin network, it may be included in a block that is published to the network. When that happens, it is said that the transaction has been mined at a depth of 1 block. With each subsequent block that is found, the number of blocks deep is increased by one. To be secure against double spending, a transaction should not be considered as confirmed until it is a certain number of blocks deep.\\nA good rule of thumb is that 1 confirmation is good for small value amounts of bitcoins and a user should wait for more confirmations for larger value amounts.\\nArcBit will display the confirmation number up until the 6th confirmation.\";\n\n\"Amount:\" = \"Amount:\";\n\n\"An account is a collection of bitcoin addresses. With accounts, you will no longer have to manage bitcoin addresses directly anymore. Since address reuse results in a loss of privacy for people using Bitcoin, ArcBit’s HD wallet account system will automatically handle the cycling of bitcoin addresses for you. This ensures you don’t use the same bitcoin address more then once.\\nEach account also has a reusable address. You can find it in your Receive screen. Swipe all the way to right on the QRCode in your Receive screen and you will find a reusable address.\\nYou can create an unlimited amount of accounts with ArcBit. See the help section on how to create a new account in ArcBit.\" = \"An account is a collection of bitcoin addresses. With accounts, you will no longer have to manage bitcoin addresses directly anymore. Since address reuse results in a loss of privacy for people using Bitcoin, ArcBit’s HD wallet account system will automatically handle the cycling of bitcoin addresses for you. This ensures you don’t use the same bitcoin address more then once.\\nEach account also has a reusable address. You can find it in your Receive screen. Swipe all the way to right on the QRCode in your Receive screen and you will find a reusable address.\\nYou can create an unlimited amount of accounts with ArcBit. See the help section on how to create a new account in ArcBit.\";\n\n\"An account private key begins with the letters 'xprv'. You can see, spend and recover the transactions and bitcoins of an entire account from an account private key.\" = \"An account private key begins with the letters 'xprv'. You can see, spend and recover the transactions and bitcoins of an entire account from an account private key.\";\n\n\"An account public key begins with the letters 'xpub'. You can see the transactions and bitcoins of an entire account from an account private key, with the exception of reusable address payments. Future releases will address this issue.\\nYou can temporarily import the corresponding account private key for this accounts' account public key to spend your watch accounts' bitcoins. Simply go to the Send screen and select a watch account to spend from and you will be prompted to temporarily import your account's private key when you click 'Review Payment' on the Send screen. The private key will stay in memory until the app exits or until you remove it manually on the Accounts screen.\" = \"An account public key begins with the letters 'xpub'. You can see the transactions and bitcoins of an entire account from an account private key, with the exception of reusable address payments. Future releases will address this issue.\\nYou can temporarily import the corresponding account private key for this accounts' account public key to spend your watch accounts' bitcoins. Simply go to the Send screen and select a watch account to spend from and you will be prompted to temporarily import your account's private key when you click 'Review Payment' on the Send screen. The private key will stay in memory until the app exits or until you remove it manually on the Accounts screen.\";\n\n\"ArcBit Brain Wallet\" = \"ArcBit Brain Wallet\";\n\n\"ArcBit Web Wallet\" = \"ArcBit Web Wallet\";\n\n\"ArcBit uses the the bitcoin wallet model (See the section ’What is a bitcoin wallet?’ to understand the 3 different security models of bitcoin software). However, if you use iCloud to backup your wallet, you will be using the security box model. It is recommended that you do not use iCloud and be responsible for your bitcoins yourself. For those who don’t want to remember a simple backup passphrase, iCloud backup is a good alternative.\" = \"ArcBit uses the the bitcoin wallet model (See the section ’What is a bitcoin wallet?’ to understand the 3 different security models of bitcoin software). However, if you use iCloud to backup your wallet, you will be using the security box model. It is recommended that you do not use iCloud and be responsible for your bitcoins yourself. For those who don’t want to remember a simple backup passphrase, iCloud backup is a good alternative.\";\n\n\"Archive Account\" = \"Archive Account\";\n\n\"Archive address\" = \"Archive address\";\n\n\"Archived Accounts\" = \"Archived Accounts\";\n\n\"Archived Change Addresses\" = \"Archived Change Addresses\";\n\n\"Archived Cold Wallet Accounts\" = \"Archived Cold Wallet Accounts\";\n\n\"Archived Imported Accounts\" = \"Archived Imported Accounts\";\n\n\"Archived Imported Addresses\" = \"Archived Imported Addresses\";\n\n\"Archived Imported Watch Accounts\" = \"Archived Imported Watch Accounts\";\n\n\"Archived Imported Watch Addresses\" = \"Archived Imported Watch Addresses\";\n\n\"Archived Main Addresses\" = \"Archived Main Addresses\";\n\n\"Are you sure you want to archive account %@?\" = \"Are you sure you want to archive account %@?\";\n\n\"Are you sure you want to archive address %@?\" = \"Are you sure you want to archive address %@?\";\n\n\"Are you sure you want to delete this account?\" = \"Are you sure you want to delete this account?\";\n\n\"Are you sure you want to unarchive account %@\" = \"Are you sure you want to unarchive account %@\";\n\n\"Are you sure you want to unarchive address %@?\" = \"Are you sure you want to unarchive address %@?\";\n\n\"Authorize Cold Wallet Account Payment\" = \"Authorize Cold Wallet Account Payment\";\n\n\"Authorize Payment\" = \"Authorize Payment\";\n\n\"Backup Passphrase\" = \"Backup Passphrase\";\n\n\"Backup wallet\" = \"Backup wallet\";\n\n\"Backup local wallet\" = \"Backup local wallet\";\n\n\"Backup passphrase found in keychain\" = \"Backup passphrase found in keychain\";\n\n\"Bitcoin cuts out the middleman and allows you to send money anywhere in the world with an internet connection with minimum to zero fees.\" = \"Bitcoin cuts out the middleman and allows you to send money anywhere in the world with an internet connection with minimum to zero fees.\";\n\n\"Bitcoin, uppercase 'B', is an online payment system invented in 2008 and released as open-source software in 2009 by a programmer named Satoshi Nakamoto. The system is decentralized and peer-to-peer allowing users to transact directly without needing an intermediary.\\nBitcoin is also a platform of which other decentralized applications can be built upon. Bitcoin, lowercase 'b' is the currency unit that Bitcoin uses.\" = \"Bitcoin, uppercase 'B', is an online payment system invented in 2008 and released as open-source software in 2009 by a programmer named Satoshi Nakamoto. The system is decentralized and peer-to-peer allowing users to transact directly without needing an intermediary.\\nBitcoin is also a platform of which other decentralized applications can be built upon. Bitcoin, lowercase 'b' is the currency unit that Bitcoin uses.\";\n\n\"Bitcoins can be purchased from various bitcoin exchanges. ArcBit is not a bitcoin exchange. ArcBit is a bitcoin wallet. After you purchase some bitcoins from an exchange, you can move it to a bitcoin wallet.\" = \"Bitcoins can be purchased from various bitcoin exchanges. ArcBit is not a bitcoin exchange. ArcBit is a bitcoin wallet. After you purchase some bitcoins from an exchange, you can move it to a bitcoin wallet.\";\n\n\"Cancel\" = \"Cancel\";\n\n\"Cannot archive your default account\" = \"Cannot archive your default account\";\n\n\"Cannot archive your one and only account\" = \"Cannot archive your one and only account\";\n\n\"Cannot create transactions with outputs less then %@\" = \"Cannot create transactions with outputs less then %@\";\n\n\"Cannot decrypt iCloud backup wallet.\" = \"Cannot decrypt iCloud backup wallet.\";\n\n\"Cannot import reusable address\" = \"Cannot import reusable address\";\n\n\"Change Address ID \" = \"Change Address ID \";\n\n\"Change Automatic Transaction Fee\" = \"Change Automatic Transaction Fee\";\n\n\"Change Block Explorer URL\" = \"Change Block Explorer URL\";\n\n\"Change Blockexplorer Type\" = \"Change Blockexplorer Type\";\n\n\"Check out the ArcBit Brain Wallet\" = \"Check out the ArcBit Brain Wallet\";\n\n\"Check out the ArcBit Web Wallet\" = \"Check out the ArcBit Web Wallet\";\n\n\"Check out the ArcBit Web Wallet!\" = \"Check out the ArcBit Web Wallet!\";\n\n\"Checking Transaction\" = \"Checking Transaction\";\n\n\"Clear account private key from memory\" = \"Clear account private key from memory\";\n\n\"Clear private key from memory\" = \"Clear private key from memory\";\n\n\"Cleared from memory\" = \"Cleared from memory\";\n\n\"Click an address\" = \"Click an address\";\n\n\"Click the button with the arrow\" = \"Click the button with the arrow\";\n\n\"Click the plus button at the top right\" = \"Click the plus button at the top right\";\n\n\"Click the ‘Contacts’ button\" = \"Click the ‘Contacts’ button\";\n\n\"Click ‘Accounts’\" = \"Click ‘Accounts’\";\n\n\"Click ‘Advanced settings’\" = \"Click ‘Advanced settings’\";\n\n\"Click ‘Archive Account’\" = \"Click ‘Archive Account’\";\n\n\"Click ‘Create New Account’\" = \"Click ‘Create New Account’\";\n\n\"Click ‘Delete’\" = \"Click ‘Delete’\";\n\n\"Click ‘Done’\" = \"Click ‘Done’\";\n\n\"Click ‘Edit Account Name’\" = \"Click ‘Edit Account Name’\";\n\n\"Click ‘Edit’\" = \"Click ‘Edit’\";\n\n\"Click ‘Enable PIN Code’\" = \"Click ‘Enable PIN Code’\";\n\n\"Click ‘History’\" = \"Click ‘History’\";\n\n\"Click ‘Import Account’\" = \"Click ‘Import Account’\";\n\n\"Click ‘Import Private Key’\" = \"Click ‘Import Private Key’\";\n\n\"Click ‘Import Watch Only Account’\" = \"Click ‘Import Watch Only Account’\";\n\n\"Click ‘Import Watch Only Address’\" = \"Click ‘Import Watch Only Address’\";\n\n\"Click ‘Label transaction’\" = \"Click ‘Label transaction’\";\n\n\"Click ‘Restore Wallet’\" = \"Click ‘Restore Wallet’\";\n\n\"Click ‘Restore’\" = \"Click ‘Restore’\";\n\n\"Click ‘Review Payment’\" = \"Click ‘Review Payment’\";\n\n\"Click ‘Send’\" = \"Click ‘Send’\";\n\n\"Click ‘Set Transaction Fee’\" = \"Click ‘Set Transaction Fee’\";\n\n\"Click ‘Settings’\" = \"Click ‘Settings’\";\n\n\"Click ‘Show Backup Passphrase’\" = \"Click ‘Show Backup Passphrase’\";\n\n\"Click ‘View Addresses’\" = \"Click ‘View Addresses’\";\n\n\"Click ‘View account private key QR code’\" = \"Click ‘View account private key QR code’\";\n\n\"Click ‘View account public key QR code’\" = \"Click ‘View account public key QR code’\";\n\n\"Click ‘View address QR code’\" = \"Click ‘View address QR code’\";\n\n\"Click ‘View in web’\" = \"Click ‘View in web’\";\n\n\"Click ‘View private key QR code’\" = \"Click ‘View private key QR code’\";\n\n\"Click ‘blockexplorer API type’\" = \"Click ‘blockexplorer API type’\";\n\n\"Click ’Receive’\" = \"Click ’Receive’\";\n\n\"Close\" = \"Close\";\n\n\"Cold Wallet\" = \"Cold Wallet\";\n\n\"Cold Wallet Accounts\" = \"Cold Wallet Accounts\";\n\n\"Cold Wallet Accounts can't see reusable address payments, thus this accounts' reusable address is not available.\" = \"Cold Wallet Accounts can't see reusable address payments, thus this accounts' reusable address is not available.\";\n\n\"Cold Wallet Overview\" = \"Cold Wallet Overview\";\n\n\"Cold wallet private keys are not stored here and cannot be viewed\" = \"Cold wallet private keys are not stored here and cannot be viewed\";\n\n\"Complete\" = \"Complete\";\n\n\"Complete step 1\" = \"Complete step 1\";\n\n\"Confirm Payment\" = \"Confirm Payment\";\n\n\"Confirm Pin Code\" = \"Confirm Pin Code\";\n\n\"Contacts\" = \"Contacts\";\n\n\"Continue\" = \"Continue\";\n\n\"Copied To clipboard\" = \"Copied To clipboard\";\n\n\"Copy\" = \"Copy\";\n\n\"Copy Transaction ID to Clipboard\" = \"Copy Transaction ID to Clipboard\";\n\n\"Create Cold Wallet\" = \"Create Cold Wallet\";\n\n\"Create New Account\" = \"Create New Account\";\n\n\"Create new contact\" = \"Create new contact\";\n\n\"Customize Fee\" = \"Customize Fee\";\n\n\"Decrypting\" = \"Decrypting\";\n\n\"Delete\" = \"Delete\";\n\n\"Delete %@\" = \"Delete %@\";\n\n\"Delete Account\" = \"Delete Account\";\n\n\"Delete Contact\" = \"Delete Contact\";\n\n\"Delete address\" = \"Delete address\";\n\n\"Do not use the QR code from here to receive bitcoins. Go to the Receive screen to get a QR code to receive bitcoins.\" = \"Do not use the QR code from here to receive bitcoins. Go to the Receive screen to get a QR code to receive bitcoins.\";\n\n\"Do you like using ArcBit?\" = \"Do you like using ArcBit?\";\n\n\"Do you want to load and backup your current local wallet file?\" = \"Do you want to load and backup your current local wallet file?\";\n\n\"Do you want to load local wallet file?\" = \"Do you want to load local wallet file?\";\n\n\"Do you want to restore from your backup passphrase or start a new wallet?\" = \"Do you want to restore from your backup passphrase or start a new wallet?\";\n\n\"Do you want to temporary import your account private key?\" = \"Do you want to temporary import your account private key?\";\n\n\"Do you want to temporary import your private key?\" = \"Do you want to temporary import your private key?\";\n\n\"Don't remind me\" = \"Don't remind me\";\n\n\"Done\" = \"Done\";\n\n\"Each account has a public and private account key. Account keys should be kept secret as they are used to view the account's transactions and spend the account's bitcoins.\" = \"Each account has a public and private account key. Account keys should be kept secret as they are used to view the account's transactions and spend the account's bitcoins.\";\n\n\"Edit\" = \"Edit\";\n\n\"Edit Account Name\" = \"Edit Account Name\";\n\n\"Edit Contact Name\" = \"Edit Contact Name\";\n\n\"Edit Label\" = \"Edit Label\";\n\n\"Edit Transaction label\" = \"Edit Transaction label\";\n\n\"Email Support\" = \"Email Support\";\n\n\"Enable PIN code in settings to better secure your wallet.\" = \"Enable PIN code in settings to better secure your wallet.\";\n\n\"Enable Pin Code\" = \"Enable Pin Code\";\n\n\"Enable Transaction Fee\" = \"Enable Transaction Fee\";\n\n\"Enable advanced mode\" = \"Enable advanced mode\";\n\n\"Encountered error creating transaction. Please try again.\" = \"Encountered error creating transaction. Please try again.\";\n\n\"Encrypted\" = \"Encrypted\";\n\n\"Enter Label\" = \"Enter Label\";\n\n\"Enter PIN\" = \"Enter PIN\";\n\n\"Enter a wallet backup passphrase to wipe the current wallet and start/restore another.\" = \"Enter a wallet backup passphrase to wipe the current wallet and start/restore another.\";\n\n\"Enter account private key\" = \"Enter account private key\";\n\n\"Enter account public key\" = \"Enter account public key\";\n\n\"Enter address\" = \"Enter address\";\n\n\"Enter an account ID and click 'QR Code'. Then on your primary online device, enable Cold Wallet in settings. Then go to the Accounts screen and click 'Import Cold Wallet Account' and scan the Account Public Key QR Code. Afterwards use this cold wallet account as you would a normal account and deposit bitcoins into it. When you want to make a payment from a cold wallet account, go to the next section on the previous screen and follow the step by step instructions there.\" = \"Enter an account ID and click 'QR Code'. Then on your primary online device, enable Cold Wallet in settings. Then go to the Accounts screen and click 'Import Cold Wallet Account' and scan the Account Public Key QR Code. Afterwards use this cold wallet account as you would a normal account and deposit bitcoins into it. When you want to make a payment from a cold wallet account, go to the next section on the previous screen and follow the step by step instructions there.\";\n\n\"Enter backup passphrase\" = \"Enter backup passphrase\";\n\n\"Enter passphrase for your iCloud backup wallet.\" = \"Enter passphrase for your iCloud backup wallet.\";\n\n\"Enter password for encrypted private key\" = \"Enter password for encrypted private key\";\n\n\"Enter the 12 word passphrase that belongs to the cold wallet account that you want to make a payment from. This is the passphrase that was used to generate your account public key that was generated on the 'Create Cold Wallet' section found on the previous screen.\" = \"Enter the 12 word passphrase that belongs to the cold wallet account that you want to make a payment from. This is the passphrase that was used to generate your account public key that was generated on the 'Create Cold Wallet' section found on the previous screen.\";\n\n\"Error\" = \"Error\";\n\n\"Error fetching Transaction.\" = \"Error fetching Transaction.\";\n\n\"Error fetching unspent outputs. Try again later.\" = \"Error fetching unspent outputs. Try again later.\";\n\n\"Error fetching unspent outputs. Try again.\" = \"Error fetching unspent outputs. Try again.\";\n\n\"Error getting block height.\" = \"Error getting block height.\";\n\n\"Error importing account\" = \"Error importing account\";\n\n\"Error loading wallet JSON file\" = \"Error loading wallet JSON file\";\n\n\"Explanation\" = \"Explanation\";\n\n\"FAQ\" = \"FAQ\";\n\n\"Fee:\" = \"Fee:\";\n\n\"Fill address field\" = \"Fill address field\";\n\n\"Finished Passing Transaction Data\" = \"Finished Passing Transaction Data\";\n\n\"First make sure you are using your secondary offline device for this screen (as mentioned in the overview on the previous screen). Click 'New Wallet' and write down or memorize the generated 12 word passphrase. This passphrase can recover and generate all your accounts and the bitcoins associated with it, so keep it safe and to yourself. Also instead of creating a new wallet, you can also input an existing 12 word passphrase that was generated here to create additional accounts.\" = \"First make sure you are using your secondary offline device for this screen (as mentioned in the overview on the previous screen). Click 'New Wallet' and write down or memorize the generated 12 word passphrase. This passphrase can recover and generate all your accounts and the bitcoins associated with it, so keep it safe and to yourself. Also instead of creating a new wallet, you can also input an existing 12 word passphrase that was generated here to create additional accounts.\";\n\n\"Follow us on Twitter\" = \"Follow us on Twitter\";\n\n\"From:\" = \"From:\";\n\n\"Funds have been claimed already.\" = \"Funds have been claimed already.\";\n\n\"Funds imported\" = \"Funds imported\";\n\n\"Go\" = \"Go\";\n\n\"Go to the side menu\" = \"Go to the side menu\";\n\n\"Have sender scan QR code\" = \"Have sender scan QR code\";\n\n\"Have sender send you payment\" = \"Have sender send you payment\";\n\n\"Help\" = \"Help\";\n\n\"Here are some features that no other mobile bitcoin wallet supports.\\n- Reusable address support\\n- Ability to import individual account (extended) keys\\n- iCloud backup support\\n- Over 150 local currencies supported\" = \"Here are some features that no other mobile bitcoin wallet supports.\\n- Reusable address support\\n- Ability to import individual account (extended) keys\\n- iCloud backup support\\n- Over 150 local currencies supported\";\n\n\"Hierarchical Deterministic Wallet\" = \"Hierarchical Deterministic Wallet\";\n\n\"History\" = \"History\";\n\n\"How To:\" = \"How To:\";\n\n\"How do I get bitcoins?\" = \"How do I get bitcoins?\";\n\n\"How does ArcBit Wallet work?\" = \"How does ArcBit Wallet work?\";\n\n\"Import Account\" = \"Import Account\";\n\n\"Import Cold Wallet Account\" = \"Import Cold Wallet Account\";\n\n\"Import Feature\" = \"Import Feature\";\n\n\"Import Private Key\" = \"Import Private Key\";\n\n\"Import Private/Encrypted Key\" = \"Import Private/Encrypted Key\";\n\n\"Import Watch Account\" = \"Import Watch Account\";\n\n\"Import Watch Address\" = \"Import Watch Address\";\n\n\"Import private key encrypted or unencrypted?\" = \"Import private key encrypted or unencrypted?\";\n\n\"Import with QR code\" = \"Import with QR code\";\n\n\"Import with text input\" = \"Import with text input\";\n\n\"Imported Account %@\" = \"Imported Account %@\";\n\n\"Imported Accounts\" = \"Imported Accounts\";\n\n\"Imported Address\" = \"Imported Address\";\n\n\"Imported Addresses\" = \"Imported Addresses\";\n\n\"Imported Cold Wallet Account %@\" = \"Imported Cold Wallet Account %@\";\n\n\"Imported Watch Account %@\" = \"Imported Watch Account %@\";\n\n\"Imported Watch Accounts\" = \"Imported Watch Accounts\";\n\n\"Imported Watch Addresses\" = \"Imported Watch Addresses\";\n\n\"Imported Watch Only Accounts can't see reusable address payments, thus this accounts' reusable address is not available. If you want see the reusable address for this account, import the account private key that corresponds to this accounts public key.\" = \"Imported Watch Only Accounts can't see reusable address payments, thus this accounts' reusable address is not available. If you want see the reusable address for this account, import the account private key that corresponds to this accounts public key.\";\n\n\"Importing Account\" = \"Importing Account\";\n\n\"Importing Cold Wallet Account\" = \"Importing Cold Wallet Account\";\n\n\"Importing a Private Key\" = \"Importing a Private Key\";\n\n\"Importing a Watch Only Account\" = \"Importing a Watch Only Account\";\n\n\"Importing a Watch Only Address\" = \"Importing a Watch Only Address\";\n\n\"Importing an Account\" = \"Importing an Account\";\n\n\"Importing an encrypted key will require you to input the password every time you want to send bitcoins from it.\" = \"Importing an encrypted key will require you to input the password every time you want to send bitcoins from it.\";\n\n\"In advanced mode, you can import bitcoin keys and addresses from other sources. You can import account private keys, account public keys, private keys, and addresses.\\nPlease note that your 12 word passphrase cannot recover your bitcoins, so it is recommended that you backup imported keys and addresses separately.\" = \"In advanced mode, you can import bitcoin keys and addresses from other sources. You can import account private keys, account public keys, private keys, and addresses.\\nPlease note that your 12 word passphrase cannot recover your bitcoins, so it is recommended that you backup imported keys and addresses separately.\";\n\n\"Incomplete\" = \"Incomplete\";\n\n\"Incorrect passphrase, could not decrypt iCloud wallet backup.\" = \"Incorrect passphrase, could not decrypt iCloud wallet backup.\";\n\n\"Input a bitcoin address\" = \"Input a bitcoin address\";\n\n\"Input a label\" = \"Input a label\";\n\n\"Input a new label\" = \"Input a new label\";\n\n\"Input a recommended amount. Somewhere between %@ and %@ BTC\" = \"Input a recommended amount. Somewhere between %@ and %@ BTC\";\n\n\"Input amount\" = \"Input amount\";\n\n\"Input label\" = \"Input label\";\n\n\"Input new account name\" = \"Input new account name\";\n\n\"Input transaction fee in bitcoins\" = \"Input transaction fee in bitcoins\";\n\n\"Instructions\" = \"Instructions\";\n\n\"Insufficient Funds\" = \"Insufficient Funds\";\n\n\"Insufficient Funds. Account balance is %@ when %@ is required.\" = \"Insufficient Funds. Account balance is %@ when %@ is required.\";\n\n\"Insufficient Funds. Account contains bitcoin dust. You can only send up to %@ for now.\" = \"Insufficient Funds. Account contains bitcoin dust. You can only send up to %@ for now.\";\n\n\"Internal Wallet Data\" = \"Internal Wallet Data\";\n\n\"Internal account transfer\" = \"Internal account transfer\";\n\n\"Invalid Address\" = \"Invalid Address\";\n\n\"Invalid Passphrase\" = \"Invalid Passphrase\";\n\n\"Invalid URL\" = \"Invalid URL\";\n\n\"Invalid account private key\" = \"Invalid account private key\";\n\n\"Invalid account public Key\" = \"Invalid account public Key\";\n\n\"Invalid amount\" = \"Invalid amount\";\n\n\"Invalid backup passphrase\" = \"Invalid backup passphrase\";\n\n\"Invalid private key\" = \"Invalid private key\";\n\n\"Invalid scanned data\" = \"Invalid scanned data\";\n\n\"Invalid transaction ID\" = \"Invalid transaction ID\";\n\n\"It is not recommended that you manually manage private keys yourself. A leak of a private key can lead to the compromise of your accounts.\" = \"It is not recommended that you manually manage private keys yourself. A leak of a private key can lead to the compromise of your accounts.\";\n\n\"It is not recommended that you use a regular bitcoin address for multiple payments, but instead you should import a reusable address. Add address anyways?\" = \"It is not recommended that you use a regular bitcoin address for multiple payments, but instead you should import a reusable address. Add address anyways?\";\n\n\"Label\" = \"Label\";\n\n\"Label Transaction\" = \"Label Transaction\";\n\n\"Local backup to wallet failed!\" = \"Local backup to wallet failed!\";\n\n\"Local wallet will be lost. Are you sure you want to restore wallet from iCloud?\" = \"Local wallet will be lost. Are you sure you want to restore wallet from iCloud?\";\n\n\"Maximum accounts reached\" = \"Maximum accounts reached\";\n\n\"More\" = \"More\";\n\n\"Name\" = \"Name\";\n\n\"Network Error\" = \"Network Error\";\n\n\"New Wallet\" = \"New Wallet\";\n\n\"New addresses will be automatically generated and cycled for you as you use your current available addresses.\" = \"New addresses will be automatically generated and cycled for you as you use your current available addresses.\";\n\n\"Next\" = \"Next\";\n\n\"No\" = \"No\";\n\n\"None currently\" = \"None currently\";\n\n\"Not now\" = \"Not now\";\n\n\"Now authorize the transaction on your air gap device. When you have done so, click continue on this device to scan the authorized transaction data and make your payment.\" = \"Now authorize the transaction on your air gap device. When you have done so, click continue on this device to scan the authorized transaction data and make your payment.\";\n\n\"OK\" = \"OK\";\n\n\"On your primary online device, when you want to make a payment from a cold wallet account, simply do it as you normally would on a normal account. When you click 'Send' on the Review Payment screen, instead of the payment going out immediately, you will be prompted to pass the unauthorized transaction data. Then on your secondary offline device, within this screen click 'Scan' to import the transaction so it can be authorized.\" = \"On your primary online device, when you want to make a payment from a cold wallet account, simply do it as you normally would on a normal account. When you click 'Send' on the Review Payment screen, instead of the payment going out immediately, you will be prompted to pass the unauthorized transaction data. Then on your secondary offline device, within this screen click 'Scan' to import the transaction so it can be authorized.\";\n\n\"Once the transaction has been authorized by completing the above two steps, pass the authorized transaction back to your primary online device to finalize your payment.\" = \"Once the transaction has been authorized by completing the above two steps, pass the authorized transaction back to your primary online device to finalize your payment.\";\n\n\"Other Links\" = \"Other Links\";\n\n\"Pass\" = \"Pass\";\n\n\"Passphrase\" = \"Passphrase\";\n\n\"Passphrase does not match the transaction\" = \"Passphrase does not match the transaction\";\n\n\"Password\" = \"Password\";\n\n\"Payment Index: %lu\" = \"Payment Index: %lu\";\n\n\"Private key does not match address\" = \"Private key does not match address\";\n\n\"Private key missing\" = \"Private key missing\";\n\n\"QR code\" = \"QR code\";\n\n\"Quit and re-enter app\" = \"Quit and re-enter app\";\n\n\"Rate\" = \"Rate\";\n\n\"Rate us in the App Store!\" = \"Rate us in the App Store!\";\n\n\"Receive\" = \"Receive\";\n\n\"Receive Payment\" = \"Receive Payment\";\n\n\"Receive Payment From Reusable Address\" = \"Receive Payment From Reusable Address\";\n\n\"Remind me Later\" = \"Remind me Later\";\n\n\"Restore\" = \"Restore\";\n\n\"Restore Wallet\" = \"Restore Wallet\";\n\n\"Restore from iCloud\" = \"Restore from iCloud\";\n\n\"Restoring Wallet\" = \"Restoring Wallet\";\n\n\"Retry\" = \"Retry\";\n\n\"Reusable Address Payment Addresses\" = \"Reusable Address Payment Addresses\";\n\n\"Reusable Address:\" = \"Reusable Address:\";\n\n\"Reusable Addresses\" = \"Reusable Addresses\";\n\n\"Review Payment\" = \"Review Payment\";\n\n\"Save\" = \"Save\";\n\n\"Scan\" = \"Scan\";\n\n\"Scan For Reusable Address Payment\" = \"Scan For Reusable Address Payment\";\n\n\"Scan For Reusable Address Payment\" = \"Scan For Reusable Address Payment\";\n\n\"Scan QR Code\" = \"Scan QR Code\";\n\n\"Scan for reusable address transaction\" = \"Scan for reusable address transaction\";\n\n\"Scan next part\" = \"Scan next part\";\n\n\"Scroll down to the section ‘Account Actions’\" = \"Scroll down to the section ‘Account Actions’\";\n\n\"Select Account\" = \"Select Account\";\n\n\"Select and click a blockexplorer API\" = \"Select and click a blockexplorer API\";\n\n\"Select and click a transaction\" = \"Select and click a transaction\";\n\n\"Select and click an account\" = \"Select and click an account\";\n\n\"Select and click an account to receive from\" = \"Select and click an account to receive from\";\n\n\"Select and click an account to view it’s transaction history\" = \"Select and click an account to view it’s transaction history\";\n\n\"Select and click an address\" = \"Select and click an address\";\n\n\"Send\" = \"Send\";\n\n\"Send Payment\" = \"Send Payment\";\n\n\"Send To Address In Contacts\" = \"Send To Address In Contacts\";\n\n\"Send authorized payment?\" = \"Send authorized payment?\";\n\n\"Sending\" = \"Sending\";\n\n\"Sending payment to a reusable address might take longer to show up then a normal transaction with the blockchain.info API. You might have to wait until at least 1 confirmation for the transaction to show up. This is due to the limitations of the blockchain.info API. For reusable address payments to show up faster, configure your app to use the Insight API in advance settings.\" = \"Sending payment to a reusable address might take longer to show up then a normal transaction with the blockchain.info API. You might have to wait until at least 1 confirmation for the transaction to show up. This is due to the limitations of the blockchain.info API. For reusable address payments to show up faster, configure your app to use the Insight API in advance settings.\";\n\n\"Sent %@ to %@\" = \"Sent %@ to %@\";\n\n\"Set Transaction Fee in %@\" = \"Set Transaction Fee in %@\";\n\n\"Settings\" = \"Settings\";\n\n\"Some funds may be pending confirmation and cannot be spent yet. (Check your account history) Account only has a spendable balance of %@\" = \"Some funds may be pending confirmation and cannot be spent yet. (Check your account history) Account only has a spendable balance of %@\";\n\n\"Some people have compared bitcoin addresses to a bank routing number. It is a good analogy, however bitcoin addresses are public. So if you reuse the same bitcoin address for multiple payments like you would a routing number, people will be able to figure out how much bitcoin you have. Thus it is recommended that you only use one address per payment.\\nThis causes usability issues making the user use a new address whenever receiving a payment is cumbersome.\\nStealth/reusable addresses provides a better solution. When you give a sender a reusable address, the sender will derive a one time regular bitcoin address from the reusable address. Then the sender will send a payment to that regular bitcoin address. Now you can give many people just one reusable address and have them all send you payments without letting other people know how much bitcoin you have.\\nA reusable address looks like this vJmxthatTBXibYe9aZavx18iAT9gyiJETGkhwPX2WbHQGuzX83YvQXynD2t8yHU4Xjfonu5x9m6B4yxquytFP1c2CRbVR9mecxesvE. A reusable address is a lot longer then a regular bitcoin address, it is 102 characters in length.\\nReusable addresses are great, however there are no other mobile bitcoin wallets but ArcBit that supports reusable addresses for now. Which is why ArcBit supports receiving payments from both regular bitcoin addresses and reusable addresses.\\nFor each account, you have one reusable address. You can find it on your Receive screen. Swipe all the way to right on the QRCode on your Receive screen and you will find a reusable address.\" = \"Some people have compared bitcoin addresses to a bank routing number. It is a good analogy, however bitcoin addresses are public. So if you reuse the same bitcoin address for multiple payments like you would a routing number, people will be able to figure out how much bitcoin you have. Thus it is recommended that you only use one address per payment.\\nThis causes usability issues making the user use a new address whenever receiving a payment is cumbersome.\\nStealth/reusable addresses provides a better solution. When you give a sender a reusable address, the sender will derive a one time regular bitcoin address from the reusable address. Then the sender will send a payment to that regular bitcoin address. Now you can give many people just one reusable address and have them all send you payments without letting other people know how much bitcoin you have.\\nA reusable address looks like this vJmxthatTBXibYe9aZavx18iAT9gyiJETGkhwPX2WbHQGuzX83YvQXynD2t8yHU4Xjfonu5x9m6B4yxquytFP1c2CRbVR9mecxesvE. A reusable address is a lot longer then a regular bitcoin address, it is 102 characters in length.\\nReusable addresses are great, however there are no other mobile bitcoin wallets but ArcBit that supports reusable addresses for now. Which is why ArcBit supports receiving payments from both regular bitcoin addresses and reusable addresses.\\nFor each account, you have one reusable address. You can find it on your Receive screen. Swipe all the way to right on the QRCode on your Receive screen and you will find a reusable address.\";\n\n\"Spending from a cold wallet account\" = \"Spending from a cold wallet account\";\n\n\"Start fresh\" = \"Start fresh\";\n\n\"Start/Restore Another Wallet\" = \"Start/Restore Another Wallet\";\n\n\"Starting Change address ID:\" = \"Starting Change address ID:\";\n\n\"Starting Receiving Address ID:\" = \"Starting Receiving Address ID:\";\n\n\"Step 1: Scan transaction to authorize\" = \"Step 1: Scan transaction to authorize\";\n\n\"Step 2: Input 12 word backup passphrase\" = \"Step 2: Input 12 word backup passphrase\";\n\n\"Step 3: Pass authorized transaction data\" = \"Step 3: Pass authorized transaction data\";\n\n\"Steps\" = \"Steps\";\n\n\"Success\" = \"Success\";\n\n\"Swipe right on an address\" = \"Swipe right on an address\";\n\n\"Swipe to the right on the QR Code Image until you see the reusable address\" = \"Swipe to the right on the QR Code Image until you see the reusable address\";\n\n\"Temporarily import account private key\" = \"Temporarily import account private key\";\n\n\"Temporarily import private key\" = \"Temporarily import private key\";\n\n\"The cold wallet feature will allow you to create accounts which offer better security compared to normal online wallets. You will need 2 devices to use this feature. Your normal day to day device that is connected to the internet and a secondary device that is not connected to the internet (Your secondary device would need to be online once to download the ArcBit app. Afterwards keep the secondary device offline for maximum security). This feature allows you to authorize bitcoin payments from an offline device so that the keys to your bitcoins will never need to be stored on your online device. Follow the step by step instructions by clicking the info buttons within the below sections.\" = \"The cold wallet feature will allow you to create accounts which offer better security compared to normal online wallets. You will need 2 devices to use this feature. Your normal day to day device that is connected to the internet and a secondary device that is not connected to the internet (Your secondary device would need to be online once to download the ArcBit app. Afterwards keep the secondary device offline for maximal security). This feature allows you to authorize bitcoin payments from an offline device so that the keys to your bitcoins will never need to be stored on your online device. Follow the step by step instructions by clicking the info buttons within the below sections.\";\n\n\"The cold wallet feature will allow you to create accounts which offer better security compared to normal online wallets. You will need 2 devices to use this feature. Your normal day to day device that is connected to the internet and a secondary device that is not connected to the internet (Your secondary device would need to be online once to download the ArcBit app. Afterwards keep the secondary device offline for maximum security). This feature allows you to authorize bitcoin payments from an offline device so that the keys to your bitcoins will never need to be stored on your online device. You can enable the cold wallet feature by going into advanced settings.\" = \"The cold wallet feature will allow you to create accounts which offer better security compared to normal online wallets. You will need 2 devices to use this feature. Your normal day to day device that is connected to the internet and a secondary device that is not connected to the internet (Your secondary device would need to be online once to download the ArcBit app. Afterwards keep the secondary device offline for maximum security). This feature allows you to authorize bitcoin payments from an offline device so that the keys to your bitcoins will never need to be stored on your online device. You can enable the cold wallet feature by going into advanced settings.\";\n\n\"This account type can't see reusable address payments\" = \"This account type can't see reusable address payments\";\n\n\"This feature allows you to manually input a transaction ID and see if the corresponding transaction contains a reusable address payment to your reusable address. If so, then the funds will be added to your wallet. Normally the app will discover reusable address payments automatically for you, but if you believe a payment is missing you can use this feature.\" = \"This feature allows you to manually input a transaction ID and see if the corresponding transaction contains a reusable address payment to your reusable address. If so, then the funds will be added to your wallet. Normally the app will discover reusable address payments automatically for you, but if you believe a payment is missing you can use this feature.\";\n\n\"To:\" = \"To:\";\n\n\"Today\" = \"Today\";\n\n\"Toggle Automatic Transaction Fee\" = \"Toggle Automatic Transaction Fee\";\n\n\"Toggle ‘Enable Transaction Fee’\" = \"Toggle ‘Enable Transaction Fee’\";\n\n\"Toggle ’Enable advanced mode’\" = \"Toggle ’Enable advanced mode’\";\n\n\"Total:\" = \"Total:\";\n\n\"Transaction %@ already accounted for.\" = \"Transaction %@ already accounted for.\";\n\n\"Transaction %@ does not belong to this account.\" = \"Transaction %@ does not belong to this account.\";\n\n\"Transaction Fee\" = \"Transaction Fee\";\n\n\"Transaction ID\" = \"Transaction ID\";\n\n\"Transaction ID: %@\" = \"Transaction ID: %@\";\n\n\"Transaction authorized\" = \"Transaction authorized\";\n\n\"Transaction confirmations\" = \"Transaction confirmations\";\n\n\"Transaction fees impact how quickly the Bitcoin network will confirm your transactions. Higher fees means faster confirmation times. Default fee behavior can be configured in settings.\" = \"Transaction fees impact how quickly the Bitcoin network will confirm your transactions. Higher fees means faster confirmation times. Default fee behavior can be configured in settings.\";\n\n\"Transaction is not a reusable address transaction.\" = \"Transaction is not a reusable address transaction.\";\n\n\"Transaction needs to be authorized by an offline and air gap device. Send transaction to an offline device for authorization?\" = \"Transaction needs to be authorized by an offline and air gap device. Send transaction to an offline device for authorization?\";\n\n\"Transaction needs to be passed back to your online device in order for the payment to be sent\" = \"Transaction needs to be passed back to your online device in order for the payment to be sent\";\n\n\"Try Again\" = \"Try Again\";\n\n\"Try our new cold wallet feature!\" = \"Try our new cold wallet feature!\";\n\n\"URL does not contain an address.\" = \"URL does not contain an address.\";\n\n\"Unable to get dynamic fees. Falling back on fixed transaction fee. (fee can be configured on review payment)\" = \"Unable to get dynamic fees. Falling back on fixed transaction fee. (fee can be configured on review payment)\";\n\n\"Unarchive Account\" = \"Unarchive Account\";\n\n\"Unarchive address\" = \"Unarchive address\";\n\n\"Unarchived address\" = \"Unarchived address\";\n\n\"Unconfirmed\" = \"Unconfirmed\";\n\n\"Unencrypted\" = \"Unencrypted\";\n\n\"Use ArcBit on your browser to complement the mobile app. The web wallet has all the features that the mobile wallet has plus more!\" = \"Use ArcBit on your browser to complement the mobile app. The web wallet has all the features that the mobile wallet has plus more!\";\n\n\"Use all funds\" = \"Use all funds\";\n\n\"View Account Address\" = \"View Account Address\";\n\n\"View Account Address In Web\" = \"View Account Address In Web\";\n\n\"View Account Addresses\" = \"View Account Addresses\";\n\n\"View Account Private Key\" = \"View Account Private Key\";\n\n\"View Account Public Key\" = \"View Account Public Key\";\n\n\"View Achievements\" = \"View Achievements\";\n\n\"View Addresses\" = \"View Addresses\";\n\n\"View ArcBit Brain Wallet Details\" = \"View ArcBit Brain Wallet Details\";\n\n\"View ArcBit Web Wallet Details\" = \"View ArcBit Web Wallet Details\";\n\n\"View History\" = \"View History\";\n\n\"View Private Key\" = \"View Private Key\";\n\n\"View Transaction In Web\" = \"View Transaction In Web\";\n\n\"View account private key QR code\" = \"View account private key QR code\";\n\n\"View account public key QR code\" = \"View account public key QR code\";\n\n\"View address QR code\" = \"View address QR code\";\n\n\"View address in web\" = \"View address in web\";\n\n\"View in web\" = \"View in web\";\n\n\"View private key QR code\" = \"View private key QR code\";\n\n\"Visit our home page\" = \"Visit our home page\";\n\n\"Wallet backup passphrase\" = \"Wallet backup passphrase\";\n\n\"Warning\" = \"Warning\";\n\n\"Welcome to ArcBit, a user only controlled Bitcoin wallet. Start using the app now by depositing your Bitcoins here.\" = \"Welcome to ArcBit, a user only controlled Bitcoin wallet. Start using the app now by depositing your Bitcoins here.\";\n\n\"Welcome!\" = \"Welcome!\";\n\n\"What are Account/Extended Keys?\" = \"What are Account/Extended Keys?\";\n\n\"What are accounts?\" = \"What are accounts?\";\n\n\"What are reusable addresses?\" = \"What are reusable addresses?\";\n\n\"What are the benefits and advantages of Bitcoin?\" = \"What are the benefits and advantages of Bitcoin?\";\n\n\"What are transaction confirmations?\" = \"What are transaction confirmations?\";\n\n\"What is ArcBit's cold wallet feature?\" = \"What is ArcBit's cold wallet feature?\";\n\n\"What is Bitcoin?\" = \"What is Bitcoin?\";\n\n\"What is a bitcoin wallet?\" = \"What is a bitcoin wallet?\";\n\n\"What makes ArcBit different from other bitcoin wallets?\" = \"What makes ArcBit different from other bitcoin wallets?\";\n\n\"With an ArcBit cold wallet feature, you can create wallets and make payments offline without exposing your private keys to an internet connected device. This feature is great for storing large amounts of bitcoin or for the security conscious minded. Check out this feature in the cold wallet section in the side menu.\" = \"With an ArcBit cold wallet feature, you can create wallets and make payments offline without exposing your private keys to an internet connected device. This feature is great for storing large amounts of bitcoin or for the security conscious minded. Check out this feature in the cold wallet section in the side menu.\";\n\n\"Write down backup passphrase\" = \"Write down backup passphrase\";\n\n\"Write down or memorize your 12 word wallet backup passphrase. You can view it by clicking \\\"Show backup passphrase\\\" in Settings. Your wallet backup passphrase is needed to recover your bitcoins.\" = \"Write down or memorize your 12 word wallet backup passphrase. You can view it by clicking \\\"Show backup passphrase\\\" in Settings. Your wallet backup passphrase is needed to recover your bitcoins.\";\n\n\"Write down the 12 word passphrase below and keep it safe. This passphrase alone can restore your entire wallets\\' bitcoins (excluding imports).\" = \"Write down the 12 word passphrase below and keep it safe. This passphrase alone can restore your entire wallets\\' bitcoins (excluding imports).\";\n\n\"Write down the 12 word passphrase below and keep it safe. This passphrase alone can restore your entire wallets\\' bitcoins.\" = \"Write down the 12 word passphrase below and keep it safe. This passphrase alone can restore your entire wallets\\' bitcoins.\";\n\n\"Yes\" = \"Yes\";\n\n\"You are making a payment to a reusable address. Make sure that the receiver can see the payment made to them. (All ArcBit reusable addresses are compatible with other ArcBit wallets)\" = \"You are making a payment to a reusable address. Make sure that the receiver can see the payment made to them. (All ArcBit reusable addresses are compatible with other ArcBit wallets)\";\n\n\"You have %@, but %@ is needed. (This includes the transactions fee)\" = \"You have %@, but %@ is needed. (This includes the transactions fee)\";\n\n\"You must exit and kill this app in order for this to take effect.\" = \"You must exit and kill this app in order for this to take effect.\";\n\n\"Your current wallet will be deleted. Your can restore your current wallet later with the wallet passphrase, but any imported accounts or addresses created in advanced mode cannot be recovered. Do you wish to continue?\" = \"Your current wallet will be deleted. Your can restore your current wallet later with the wallet passphrase, but any imported accounts or addresses created in advanced mode cannot be recovered. Do you wish to continue?\";\n\n\"Your iCloud backup was last saved on %@. Do you want to restore your wallet from iCloud or backup your local wallet to iCloud?\" = \"Your iCloud backup was last saved on %@. Do you want to restore your wallet from iCloud or backup your local wallet to iCloud?\";\n\n\"Your new transaction fee is too high\" = \"Your new transaction fee is too high\";\n\n\"Your wallet is now restored\" = \"Your wallet is now restored\";\n\n\"\\nAllow camera access in\\n Settings->Privacy->Camera->%@\" = \"\\nAllow camera access in\\n Settings->Privacy->Camera->%@\";\n\n\"\\tArcBit Web Wallet is a Chrome extension. It has all the features of the mobile wallet plus more. Highlights include the ability to create multiple wallets instead of just one, and a new non-cumbersome way to generate wallets, store and spend bitcoins all from cold storage! ArcBit's new way to manage your cold storage bitcoins also offers a more compelling reason to use ArcBit's watch account feature. Now you can safely watch the balance of your cold storage bitcoins by enabling advance mode in ArcBit and importing your cold storage account public keys.\\n\\tUse ArcBit Web Wallet in whatever way you wish. You can create a new wallet, or you can input your current 12 word backup passphrase to manage the same bitcoins across different devices. Check out the ArcBit Web Wallet in the Chrome Web Store for more details!\\n\" = \"\\tArcBit Web Wallet is a Chrome extension. It has all the features of the mobile wallet plus more. Highlights include the ability to create multiple wallets instead of just one, and a new non-cumbersome way to generate wallets, store and spend bitcoins all from cold storage! ArcBit's new way to manage your cold storage bitcoins also offers a more compelling reason to use ArcBit's watch account feature. Now you can safely watch the balance of your cold storage bitcoins by enabling advance mode in ArcBit and importing your cold storage account public keys.\\n\\tUse ArcBit Web Wallet in whatever way you wish. You can create a new wallet, or you can input your current 12 word backup passphrase to manage the same bitcoins across different devices. Check out the ArcBit Web Wallet in the Chrome Web Store for more details!\\n\";\n\n\"\\tWith the Arcbit Brain Wallet you can safely spend your bitcoins without ever having your private keys be exposed to the internet. It can be use in conjunction with your Arcbit Wallet or as a stand alone wallet.\\n\" = \"\\tWith the Arcbit Brain Wallet you can safely spend your bitcoins without ever having your private keys be exposed to the internet. It can be use in conjunction with your Arcbit Wallet or as a stand alone wallet.\\n\";\n\n\"iCloud Error: %@\" = \"iCloud Error: %@\";\n\n\"iCloud backup found\" = \"iCloud backup found\";\n\n\"iCloud backup not found\" = \"iCloud backup not found\";\n\n\"iCloud backup will be lost. Are you sure you want to backup your local wallet to iCloud?\" = \"iCloud backup will be lost. Are you sure you want to backup your local wallet to iCloud?\";\n\n\"Wallet backup passphrase will be shown\" = \"Wallet backup passphrase will be shown\";\n\n\"Write down or memorize your wallet backup passphrase. If you lose your backup passphrase, your wallet cannot be recovered.\" = \"Write down or memorize your wallet backup passphrase. If you lose your backup passphrase, your wallet cannot be recovered.\";\n\n\"I understand\" = \"I understand\";\n\n\"iCloud support for ArcBit discontinued\" = \"iCloud support for ArcBit discontinued\";\n\n\"iCloud support for ArcBit is being discontinued. If your backup passphrase has not been backed up already, please do so.\" = \"iCloud support for ArcBit is being discontinued. If your backup passphrase has not been backed up already, please do so.\";\n\n\"Reusable address payments are disabled until further notice.\" = \"Reusable address payments are disabled until further notice.\";\n"
  },
  {
    "path": "ArcBit/Base.lproj/Main.storyboard",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<document type=\"com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB\" version=\"3.0\" toolsVersion=\"13196\" targetRuntime=\"iOS.CocoaTouch\" propertyAccessControl=\"none\" useAutolayout=\"YES\" useTraitCollections=\"YES\" useSafeAreas=\"YES\" colorMatched=\"YES\" initialViewController=\"UtC-4S-ThX\">\n    <device id=\"retina4_7\" orientation=\"portrait\">\n        <adaptation id=\"fullscreen\"/>\n    </device>\n    <dependencies>\n        <deployment identifier=\"iOS\"/>\n        <plugIn identifier=\"com.apple.InterfaceBuilder.IBCocoaTouchPlugin\" version=\"13173\"/>\n        <capability name=\"Alignment constraints to the first baseline\" minToolsVersion=\"6.0\"/>\n        <capability name=\"Alignment constraints with different attributes\" minToolsVersion=\"5.1\"/>\n        <capability name=\"Aspect ratio constraints\" minToolsVersion=\"5.1\"/>\n        <capability name=\"Constraints to layout margins\" minToolsVersion=\"6.0\"/>\n        <capability name=\"Safe area layout guides\" minToolsVersion=\"9.0\"/>\n        <capability name=\"documents saved in the Xcode 8 format\" minToolsVersion=\"8.0\"/>\n    </dependencies>\n    <scenes>\n        <!--Send-->\n        <scene sceneID=\"tne-QT-ifu\">\n            <objects>\n                <viewController storyboardIdentifier=\"Send\" id=\"BYZ-38-t0r\" customClass=\"TLSendViewController\" sceneMemberID=\"viewController\">\n                    <view key=\"view\" contentMode=\"scaleToFill\" id=\"8bC-Xf-vdC\">\n                        <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"375\" height=\"667\"/>\n                        <autoresizingMask key=\"autoresizingMask\" widthSizable=\"YES\" heightSizable=\"YES\"/>\n                        <subviews>\n                            <view contentMode=\"scaleToFill\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"z1R-zT-Rrk\">\n                                <rect key=\"frame\" x=\"0.0\" y=\"64\" width=\"375\" height=\"493\"/>\n                                <color key=\"backgroundColor\" red=\"0.063608649258044173\" green=\"0.32397158914341539\" blue=\"0.78039215689999997\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n                            </view>\n                            <view contentMode=\"scaleToFill\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"eHT-LR-cZK\">\n                                <rect key=\"frame\" x=\"0.0\" y=\"64\" width=\"375\" height=\"536\"/>\n                                <subviews>\n                                    <view contentMode=\"scaleToFill\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"vBw-Yr-A7Z\">\n                                        <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"375\" height=\"84.5\"/>\n                                        <color key=\"backgroundColor\" red=\"1\" green=\"1\" blue=\"1\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n                                    </view>\n                                    <view contentMode=\"scaleToFill\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"txp-es-uQv\">\n                                        <rect key=\"frame\" x=\"0.0\" y=\"83.5\" width=\"375\" height=\"130.5\"/>\n                                        <color key=\"backgroundColor\" red=\"1\" green=\"1\" blue=\"1\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n                                    </view>\n                                    <view contentMode=\"scaleToFill\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"Lwy-sE-opG\">\n                                        <rect key=\"frame\" x=\"0.0\" y=\"214\" width=\"375\" height=\"279\"/>\n                                        <color key=\"backgroundColor\" red=\"1\" green=\"1\" blue=\"1\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n                                    </view>\n                                    <label opaque=\"NO\" userInteractionEnabled=\"NO\" contentMode=\"left\" horizontalHuggingPriority=\"251\" verticalHuggingPriority=\"251\" text=\"To:\" lineBreakMode=\"tailTruncation\" baselineAdjustment=\"alignBaselines\" adjustsFontSizeToFit=\"NO\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"xuQ-JE-0IT\">\n                                        <rect key=\"frame\" x=\"8\" y=\"83.5\" width=\"44\" height=\"20.5\"/>\n                                        <fontDescription key=\"fontDescription\" type=\"system\" pointSize=\"17\"/>\n                                        <color key=\"textColor\" red=\"0.0\" green=\"0.0\" blue=\"0.0\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n                                        <nil key=\"highlightedColor\"/>\n                                    </label>\n                                    <label opaque=\"NO\" userInteractionEnabled=\"NO\" contentMode=\"left\" horizontalHuggingPriority=\"251\" verticalHuggingPriority=\"251\" text=\"Amount:\" lineBreakMode=\"tailTruncation\" baselineAdjustment=\"alignBaselines\" adjustsFontSizeToFit=\"NO\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"59b-yN-GFc\">\n                                        <rect key=\"frame\" x=\"8\" y=\"214\" width=\"65\" height=\"20.5\"/>\n                                        <fontDescription key=\"fontDescription\" type=\"system\" pointSize=\"17\"/>\n                                        <color key=\"textColor\" red=\"0.0\" green=\"0.0\" blue=\"0.0\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n                                        <nil key=\"highlightedColor\"/>\n                                    </label>\n                                    <textField opaque=\"NO\" clipsSubviews=\"YES\" contentMode=\"scaleToFill\" enabled=\"NO\" contentHorizontalAlignment=\"left\" contentVerticalAlignment=\"center\" borderStyle=\"line\" minimumFontSize=\"17\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"bcD-S7-0tb\">\n                                        <rect key=\"frame\" x=\"8\" y=\"241.5\" width=\"359\" height=\"42.5\"/>\n                                        <fontDescription key=\"fontDescription\" type=\"system\" pointSize=\"14\"/>\n                                        <textInputTraits key=\"textInputTraits\"/>\n                                    </textField>\n                                    <textField opaque=\"NO\" clipsSubviews=\"YES\" contentMode=\"scaleToFill\" enabled=\"NO\" contentHorizontalAlignment=\"left\" contentVerticalAlignment=\"center\" borderStyle=\"line\" minimumFontSize=\"17\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"AZd-Jv-XEh\">\n                                        <rect key=\"frame\" x=\"8\" y=\"292\" width=\"359\" height=\"40\"/>\n                                        <fontDescription key=\"fontDescription\" type=\"system\" pointSize=\"14\"/>\n                                        <textInputTraits key=\"textInputTraits\"/>\n                                    </textField>\n                                    <button opaque=\"NO\" contentMode=\"scaleToFill\" contentHorizontalAlignment=\"center\" contentVerticalAlignment=\"center\" buttonType=\"roundedRect\" lineBreakMode=\"middleTruncation\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"i9k-eB-RT8\">\n                                        <rect key=\"frame\" x=\"8\" y=\"166\" width=\"175.5\" height=\"40\"/>\n                                        <color key=\"backgroundColor\" red=\"0.062279825470000001\" green=\"1\" blue=\"0.22195490649999999\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n                                        <state key=\"normal\" title=\"Scan QR\">\n                                            <color key=\"titleShadowColor\" red=\"0.5\" green=\"0.5\" blue=\"0.5\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n                                        </state>\n                                        <userDefinedRuntimeAttributes>\n                                            <userDefinedRuntimeAttribute type=\"string\" keyPath=\"layer.cornerRadius\" value=\"5\"/>\n                                        </userDefinedRuntimeAttributes>\n                                        <connections>\n                                            <action selector=\"scanQRCodeClicked:\" destination=\"BYZ-38-t0r\" eventType=\"touchUpInside\" id=\"Rx2-zx-kDa\"/>\n                                        </connections>\n                                    </button>\n                                    <button opaque=\"NO\" contentMode=\"scaleToFill\" contentHorizontalAlignment=\"center\" contentVerticalAlignment=\"center\" buttonType=\"roundedRect\" lineBreakMode=\"middleTruncation\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"JvL-Cg-kNK\">\n                                        <rect key=\"frame\" x=\"191.5\" y=\"166\" width=\"175.5\" height=\"40\"/>\n                                        <color key=\"backgroundColor\" red=\"0.062279825470000001\" green=\"1\" blue=\"0.22195490649999999\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n                                        <constraints>\n                                            <constraint firstAttribute=\"height\" constant=\"40\" id=\"Yec-6L-aGz\"/>\n                                        </constraints>\n                                        <state key=\"normal\" title=\"Contacts\">\n                                            <color key=\"titleShadowColor\" red=\"0.5\" green=\"0.5\" blue=\"0.5\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n                                        </state>\n                                        <userDefinedRuntimeAttributes>\n                                            <userDefinedRuntimeAttribute type=\"string\" keyPath=\"layer.cornerRadius\" value=\"5\"/>\n                                        </userDefinedRuntimeAttributes>\n                                        <connections>\n                                            <action selector=\"addressBookClicked:\" destination=\"BYZ-38-t0r\" eventType=\"touchUpInside\" id=\"sMs-gv-ZXK\"/>\n                                        </connections>\n                                    </button>\n                                    <label opaque=\"NO\" userInteractionEnabled=\"NO\" contentMode=\"left\" horizontalHuggingPriority=\"251\" verticalHuggingPriority=\"251\" text=\"From:\" lineBreakMode=\"tailTruncation\" baselineAdjustment=\"alignBaselines\" adjustsFontSizeToFit=\"NO\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"VQ0-4Z-YAo\">\n                                        <rect key=\"frame\" x=\"8\" y=\"8\" width=\"44\" height=\"20.5\"/>\n                                        <fontDescription key=\"fontDescription\" type=\"system\" pointSize=\"17\"/>\n                                        <color key=\"textColor\" red=\"0.0\" green=\"0.0\" blue=\"0.0\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n                                        <nil key=\"highlightedColor\"/>\n                                    </label>\n                                    <label opaque=\"NO\" userInteractionEnabled=\"NO\" contentMode=\"left\" horizontalHuggingPriority=\"251\" verticalHuggingPriority=\"251\" text=\"BTC\" textAlignment=\"right\" lineBreakMode=\"tailTruncation\" baselineAdjustment=\"alignBaselines\" adjustsFontSizeToFit=\"NO\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"3XA-yE-mb3\">\n                                        <rect key=\"frame\" x=\"301\" y=\"244\" width=\"50\" height=\"40\"/>\n                                        <constraints>\n                                            <constraint firstAttribute=\"height\" constant=\"40\" id=\"WtB-If-udE\"/>\n                                            <constraint firstAttribute=\"width\" constant=\"50\" id=\"X0F-U1-7bk\"/>\n                                        </constraints>\n                                        <fontDescription key=\"fontDescription\" type=\"system\" pointSize=\"17\"/>\n                                        <color key=\"textColor\" red=\"0.0\" green=\"0.0\" blue=\"0.0\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n                                        <nil key=\"highlightedColor\"/>\n                                    </label>\n                                    <label opaque=\"NO\" userInteractionEnabled=\"NO\" contentMode=\"left\" horizontalHuggingPriority=\"251\" verticalHuggingPriority=\"251\" text=\"USD\" textAlignment=\"right\" lineBreakMode=\"tailTruncation\" baselineAdjustment=\"alignBaselines\" adjustsFontSizeToFit=\"NO\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"DlS-FL-u3H\">\n                                        <rect key=\"frame\" x=\"301\" y=\"292\" width=\"50\" height=\"41\"/>\n                                        <fontDescription key=\"fontDescription\" type=\"system\" pointSize=\"17\"/>\n                                        <color key=\"textColor\" red=\"0.0\" green=\"0.0\" blue=\"0.0\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n                                        <nil key=\"highlightedColor\"/>\n                                    </label>\n                                    <textField opaque=\"NO\" clipsSubviews=\"YES\" contentMode=\"scaleToFill\" contentHorizontalAlignment=\"left\" contentVerticalAlignment=\"center\" placeholder=\"0\" minimumFontSize=\"17\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"ixE-Ze-q3A\">\n                                        <rect key=\"frame\" x=\"18\" y=\"243\" width=\"275\" height=\"41\"/>\n                                        <fontDescription key=\"fontDescription\" type=\"system\" pointSize=\"14\"/>\n                                        <textInputTraits key=\"textInputTraits\"/>\n                                        <connections>\n                                            <action selector=\"updateFiatAmountTextFieldExchangeRate:\" destination=\"BYZ-38-t0r\" eventType=\"editingChanged\" id=\"3QE-sp-xAu\"/>\n                                        </connections>\n                                    </textField>\n                                    <textField opaque=\"NO\" clipsSubviews=\"YES\" contentMode=\"scaleToFill\" contentHorizontalAlignment=\"left\" contentVerticalAlignment=\"center\" placeholder=\"0\" minimumFontSize=\"17\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"1SA-Gl-EbR\">\n                                        <rect key=\"frame\" x=\"18\" y=\"292\" width=\"275\" height=\"40\"/>\n                                        <constraints>\n                                            <constraint firstAttribute=\"height\" constant=\"40\" id=\"gLv-jH-cj6\"/>\n                                        </constraints>\n                                        <fontDescription key=\"fontDescription\" type=\"system\" pointSize=\"14\"/>\n                                        <textInputTraits key=\"textInputTraits\"/>\n                                        <connections>\n                                            <action selector=\"updateAmountTextFieldExchangeRate:\" destination=\"BYZ-38-t0r\" eventType=\"editingChanged\" id=\"sgH-dz-djf\"/>\n                                        </connections>\n                                    </textField>\n                                    <textField opaque=\"NO\" clipsSubviews=\"YES\" contentMode=\"scaleToFill\" contentHorizontalAlignment=\"left\" contentVerticalAlignment=\"center\" borderStyle=\"line\" placeholder=\"address\" minimumFontSize=\"17\" clearButtonMode=\"always\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"6V1-g4-Kqz\">\n                                        <rect key=\"frame\" x=\"8\" y=\"112\" width=\"359\" height=\"46\"/>\n                                        <fontDescription key=\"fontDescription\" type=\"system\" pointSize=\"14\"/>\n                                        <textInputTraits key=\"textInputTraits\" autocorrectionType=\"no\"/>\n                                    </textField>\n                                    <button opaque=\"NO\" contentMode=\"scaleToFill\" contentHorizontalAlignment=\"center\" contentVerticalAlignment=\"center\" buttonType=\"roundedRect\" lineBreakMode=\"middleTruncation\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"b97-9w-wKT\">\n                                        <rect key=\"frame\" x=\"8\" y=\"340\" width=\"359\" height=\"40\"/>\n                                        <color key=\"backgroundColor\" red=\"0.062279825470000001\" green=\"1\" blue=\"0.22195490649999999\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n                                        <constraints>\n                                            <constraint firstAttribute=\"height\" constant=\"40\" id=\"xRl-Cx-62u\"/>\n                                        </constraints>\n                                        <state key=\"normal\" title=\"Review Payment\">\n                                            <color key=\"titleShadowColor\" red=\"0.5\" green=\"0.5\" blue=\"0.5\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n                                        </state>\n                                        <userDefinedRuntimeAttributes>\n                                            <userDefinedRuntimeAttribute type=\"string\" keyPath=\"layer.cornerRadius\" value=\"5\"/>\n                                        </userDefinedRuntimeAttributes>\n                                        <connections>\n                                            <action selector=\"reviewPaymentClicked:\" destination=\"BYZ-38-t0r\" eventType=\"touchUpInside\" id=\"RlX-XT-05O\"/>\n                                        </connections>\n                                    </button>\n                                    <view contentMode=\"scaleToFill\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"40t-Px-2ct\" customClass=\"UIButton\">\n                                        <rect key=\"frame\" x=\"8\" y=\"35.5\" width=\"359\" height=\"40\"/>\n                                        <subviews>\n                                            <label opaque=\"NO\" userInteractionEnabled=\"NO\" contentMode=\"left\" horizontalHuggingPriority=\"251\" verticalHuggingPriority=\"251\" text=\"Label\" textAlignment=\"right\" lineBreakMode=\"tailTruncation\" baselineAdjustment=\"alignBaselines\" adjustsFontSizeToFit=\"NO\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"P8X-aW-lhi\">\n                                                <rect key=\"frame\" x=\"256.5\" y=\"0.0\" width=\"44.5\" height=\"40\"/>\n                                                <constraints>\n                                                    <constraint firstAttribute=\"width\" relation=\"greaterThanOrEqual\" priority=\"750\" constant=\"42\" id=\"u6T-xU-nps\"/>\n                                                </constraints>\n                                                <fontDescription key=\"fontDescription\" type=\"boldSystem\" pointSize=\"17\"/>\n                                                <color key=\"textColor\" red=\"0.0\" green=\"0.0\" blue=\"0.0\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n                                                <nil key=\"highlightedColor\"/>\n                                            </label>\n                                            <activityIndicatorView opaque=\"NO\" contentMode=\"scaleToFill\" horizontalHuggingPriority=\"750\" verticalHuggingPriority=\"750\" hidesWhenStopped=\"YES\" style=\"gray\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"nEo-6J-cjj\">\n                                                <rect key=\"frame\" x=\"228.5\" y=\"8\" width=\"20\" height=\"20\"/>\n                                            </activityIndicatorView>\n                                            <imageView userInteractionEnabled=\"NO\" contentMode=\"scaleToFill\" horizontalHuggingPriority=\"251\" verticalHuggingPriority=\"251\" image=\"arrow-right7.png\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"N7W-9G-LiG\">\n                                                <rect key=\"frame\" x=\"314\" y=\"0.0\" width=\"45\" height=\"40\"/>\n                                            </imageView>\n                                            <label opaque=\"NO\" userInteractionEnabled=\"NO\" contentMode=\"left\" horizontalHuggingPriority=\"251\" verticalHuggingPriority=\"251\" text=\"Account Name\" lineBreakMode=\"tailTruncation\" baselineAdjustment=\"alignBaselines\" adjustsFontSizeToFit=\"NO\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"cmA-Xp-Fwi\">\n                                                <rect key=\"frame\" x=\"8\" y=\"0.0\" width=\"83\" height=\"40\"/>\n                                                <constraints>\n                                                    <constraint firstAttribute=\"width\" relation=\"lessThanOrEqual\" priority=\"250\" constant=\"440\" id=\"5z0-4t-PoO\"/>\n                                                    <constraint firstAttribute=\"width\" constant=\"240\" id=\"O8m-Kf-UG2\"/>\n                                                </constraints>\n                                                <fontDescription key=\"fontDescription\" type=\"system\" pointSize=\"12\"/>\n                                                <color key=\"textColor\" red=\"0.0\" green=\"0.0\" blue=\"0.0\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n                                                <nil key=\"highlightedColor\"/>\n                                                <variation key=\"default\">\n                                                    <mask key=\"constraints\">\n                                                        <exclude reference=\"O8m-Kf-UG2\"/>\n                                                    </mask>\n                                                </variation>\n                                            </label>\n                                        </subviews>\n                                        <color key=\"backgroundColor\" red=\"0.99146699277732853\" green=\"1\" blue=\"0.21020077373923596\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n                                        <gestureRecognizers/>\n                                        <constraints>\n                                            <constraint firstItem=\"nEo-6J-cjj\" firstAttribute=\"leading\" relation=\"greaterThanOrEqual\" secondItem=\"cmA-Xp-Fwi\" secondAttribute=\"trailing\" constant=\"8\" id=\"30O-F7-XLu\"/>\n                                            <constraint firstItem=\"N7W-9G-LiG\" firstAttribute=\"leading\" secondItem=\"P8X-aW-lhi\" secondAttribute=\"trailing\" constant=\"13\" id=\"8aQ-K0-fhG\"/>\n                                            <constraint firstAttribute=\"trailing\" secondItem=\"P8X-aW-lhi\" secondAttribute=\"trailing\" constant=\"58\" id=\"92e-NG-pIg\"/>\n                                            <constraint firstItem=\"P8X-aW-lhi\" firstAttribute=\"leading\" secondItem=\"nEo-6J-cjj\" secondAttribute=\"trailing\" constant=\"8\" id=\"EAQ-l5-0OI\"/>\n                                            <constraint firstItem=\"N7W-9G-LiG\" firstAttribute=\"top\" secondItem=\"P8X-aW-lhi\" secondAttribute=\"top\" id=\"Ez9-qy-Agg\"/>\n                                            <constraint firstItem=\"N7W-9G-LiG\" firstAttribute=\"bottom\" secondItem=\"P8X-aW-lhi\" secondAttribute=\"bottom\" id=\"IJg-xP-hZf\"/>\n                                            <constraint firstAttribute=\"trailing\" secondItem=\"N7W-9G-LiG\" secondAttribute=\"trailing\" id=\"Iii-lR-91T\"/>\n                                            <constraint firstItem=\"nEo-6J-cjj\" firstAttribute=\"top\" secondItem=\"40t-Px-2ct\" secondAttribute=\"top\" constant=\"8\" id=\"K7A-Ip-XKs\"/>\n                                            <constraint firstItem=\"cmA-Xp-Fwi\" firstAttribute=\"top\" secondItem=\"40t-Px-2ct\" secondAttribute=\"top\" id=\"SvV-Tj-mna\"/>\n                                            <constraint firstAttribute=\"bottom\" secondItem=\"cmA-Xp-Fwi\" secondAttribute=\"bottom\" id=\"bSW-xu-Bp7\"/>\n                                            <constraint firstItem=\"cmA-Xp-Fwi\" firstAttribute=\"leading\" secondItem=\"40t-Px-2ct\" secondAttribute=\"leading\" constant=\"8\" id=\"c3c-ao-rX1\"/>\n                                            <constraint firstAttribute=\"bottom\" secondItem=\"P8X-aW-lhi\" secondAttribute=\"bottom\" id=\"h3o-Rk-sHX\"/>\n                                            <constraint firstItem=\"P8X-aW-lhi\" firstAttribute=\"top\" secondItem=\"40t-Px-2ct\" secondAttribute=\"top\" id=\"mq7-w9-qgk\"/>\n                                            <constraint firstAttribute=\"bottom\" secondItem=\"nEo-6J-cjj\" secondAttribute=\"bottom\" constant=\"12\" id=\"qve-mJ-SC8\"/>\n                                        </constraints>\n                                        <userDefinedRuntimeAttributes>\n                                            <userDefinedRuntimeAttribute type=\"string\" keyPath=\"layer.cornerRadius\" value=\"5\"/>\n                                        </userDefinedRuntimeAttributes>\n                                        <connections>\n                                            <outletCollection property=\"gestureRecognizers\" destination=\"tbQ-pU-gpy\" appends=\"YES\" id=\"49x-pW-oVX\"/>\n                                        </connections>\n                                    </view>\n                                </subviews>\n                                <color key=\"backgroundColor\" red=\"1\" green=\"1\" blue=\"1\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n                                <constraints>\n                                    <constraint firstItem=\"b97-9w-wKT\" firstAttribute=\"top\" secondItem=\"DlS-FL-u3H\" secondAttribute=\"bottom\" constant=\"7\" id=\"1Ib-qj-nKf\"/>\n                                    <constraint firstItem=\"DlS-FL-u3H\" firstAttribute=\"leading\" secondItem=\"1SA-Gl-EbR\" secondAttribute=\"trailing\" constant=\"8\" symbolic=\"YES\" id=\"1jR-Rs-Yrh\"/>\n                                    <constraint firstItem=\"VQ0-4Z-YAo\" firstAttribute=\"trailing\" secondItem=\"xuQ-JE-0IT\" secondAttribute=\"trailing\" id=\"21q-XC-gfg\"/>\n                                    <constraint firstItem=\"b97-9w-wKT\" firstAttribute=\"top\" secondItem=\"AZd-Jv-XEh\" secondAttribute=\"bottom\" constant=\"8\" id=\"26K-VX-yLa\"/>\n                                    <constraint firstItem=\"Lwy-sE-opG\" firstAttribute=\"top\" secondItem=\"59b-yN-GFc\" secondAttribute=\"top\" id=\"8A0-1Z-mD9\"/>\n                                    <constraint firstItem=\"JvL-Cg-kNK\" firstAttribute=\"top\" secondItem=\"eHT-LR-cZK\" secondAttribute=\"top\" constant=\"166\" id=\"8CG-MJ-b83\"/>\n                                    <constraint firstItem=\"1SA-Gl-EbR\" firstAttribute=\"leading\" secondItem=\"eHT-LR-cZK\" secondAttribute=\"leading\" constant=\"18\" id=\"8f3-ih-mhI\"/>\n                                    <constraint firstAttribute=\"trailing\" secondItem=\"Lwy-sE-opG\" secondAttribute=\"trailing\" id=\"9Cf-4F-qGm\"/>\n                                    <constraint firstAttribute=\"bottom\" secondItem=\"b97-9w-wKT\" secondAttribute=\"bottom\" constant=\"156\" id=\"BLA-sk-u6m\"/>\n                                    <constraint firstItem=\"ixE-Ze-q3A\" firstAttribute=\"top\" secondItem=\"JvL-Cg-kNK\" secondAttribute=\"bottom\" constant=\"37\" id=\"C0o-Df-4Ld\"/>\n                                    <constraint firstItem=\"1SA-Gl-EbR\" firstAttribute=\"top\" secondItem=\"bcD-S7-0tb\" secondAttribute=\"bottom\" constant=\"8\" symbolic=\"YES\" id=\"D4O-GX-6cf\"/>\n                                    <constraint firstAttribute=\"bottom\" secondItem=\"Lwy-sE-opG\" secondAttribute=\"bottom\" constant=\"43\" id=\"DSE-xH-PTR\"/>\n                                    <constraint firstAttribute=\"trailing\" secondItem=\"vBw-Yr-A7Z\" secondAttribute=\"trailing\" id=\"DVL-gZ-Qpf\"/>\n                                    <constraint firstItem=\"xuQ-JE-0IT\" firstAttribute=\"top\" secondItem=\"40t-Px-2ct\" secondAttribute=\"bottom\" constant=\"8\" symbolic=\"YES\" id=\"Ds2-0D-J8S\"/>\n                                    <constraint firstItem=\"JvL-Cg-kNK\" firstAttribute=\"leading\" secondItem=\"i9k-eB-RT8\" secondAttribute=\"trailing\" constant=\"8\" id=\"E35-ag-UPS\"/>\n                                    <constraint firstItem=\"Lwy-sE-opG\" firstAttribute=\"leading\" secondItem=\"eHT-LR-cZK\" secondAttribute=\"leading\" id=\"Eha-KK-ckq\"/>\n                                    <constraint firstItem=\"txp-es-uQv\" firstAttribute=\"top\" secondItem=\"xuQ-JE-0IT\" secondAttribute=\"top\" id=\"Fab-Py-GOQ\"/>\n                                    <constraint firstItem=\"6V1-g4-Kqz\" firstAttribute=\"leading\" secondItem=\"eHT-LR-cZK\" secondAttribute=\"leading\" constant=\"8\" id=\"GoF-mg-2BI\"/>\n                                    <constraint firstItem=\"1SA-Gl-EbR\" firstAttribute=\"top\" secondItem=\"ixE-Ze-q3A\" secondAttribute=\"bottom\" constant=\"8\" symbolic=\"YES\" id=\"Gx9-cC-hQD\"/>\n                                    <constraint firstItem=\"b97-9w-wKT\" firstAttribute=\"top\" secondItem=\"AZd-Jv-XEh\" secondAttribute=\"bottom\" constant=\"8\" symbolic=\"YES\" id=\"L8u-ek-axE\"/>\n                                    <constraint firstItem=\"VQ0-4Z-YAo\" firstAttribute=\"leading\" secondItem=\"eHT-LR-cZK\" secondAttribute=\"leading\" constant=\"8\" id=\"M5I-NY-aDh\"/>\n                                    <constraint firstItem=\"vBw-Yr-A7Z\" firstAttribute=\"top\" secondItem=\"eHT-LR-cZK\" secondAttribute=\"top\" id=\"M9T-UZ-X72\"/>\n                                    <constraint firstAttribute=\"trailing\" secondItem=\"JvL-Cg-kNK\" secondAttribute=\"trailing\" constant=\"8\" id=\"N8Y-IN-hds\"/>\n                                    <constraint firstItem=\"JvL-Cg-kNK\" firstAttribute=\"top\" secondItem=\"6V1-g4-Kqz\" secondAttribute=\"bottom\" constant=\"8\" symbolic=\"YES\" id=\"O09-yf-9FJ\"/>\n                                    <constraint firstItem=\"JvL-Cg-kNK\" firstAttribute=\"width\" secondItem=\"i9k-eB-RT8\" secondAttribute=\"width\" id=\"O1g-lj-vwm\"/>\n                                    <constraint firstItem=\"40t-Px-2ct\" firstAttribute=\"top\" secondItem=\"VQ0-4Z-YAo\" secondAttribute=\"bottom\" constant=\"7\" id=\"O3v-jz-z5A\"/>\n                                    <constraint firstItem=\"txp-es-uQv\" firstAttribute=\"top\" secondItem=\"vBw-Yr-A7Z\" secondAttribute=\"bottom\" id=\"Oo1-8F-QSD\"/>\n                                    <constraint firstItem=\"b97-9w-wKT\" firstAttribute=\"leading\" secondItem=\"eHT-LR-cZK\" secondAttribute=\"leading\" constant=\"8\" id=\"OwV-Ek-JQw\"/>\n                                    <constraint firstItem=\"JvL-Cg-kNK\" firstAttribute=\"baseline\" secondItem=\"i9k-eB-RT8\" secondAttribute=\"firstBaseline\" id=\"P2i-6b-ScH\"/>\n                                    <constraint firstItem=\"JvL-Cg-kNK\" firstAttribute=\"firstBaseline\" secondItem=\"i9k-eB-RT8\" secondAttribute=\"baseline\" id=\"PHs-fE-m5B\"/>\n                                    <constraint firstAttribute=\"trailing\" secondItem=\"6V1-g4-Kqz\" secondAttribute=\"trailing\" constant=\"8\" id=\"QaO-E8-dk8\"/>\n                                    <constraint firstAttribute=\"trailing\" secondItem=\"b97-9w-wKT\" secondAttribute=\"trailing\" constant=\"8\" id=\"Rpv-1r-Bhi\"/>\n                                    <constraint firstItem=\"59b-yN-GFc\" firstAttribute=\"top\" secondItem=\"txp-es-uQv\" secondAttribute=\"bottom\" id=\"TLP-SE-xqN\"/>\n                                    <constraint firstAttribute=\"trailing\" secondItem=\"DlS-FL-u3H\" secondAttribute=\"trailing\" constant=\"24\" id=\"UWB-Np-uRa\"/>\n                                    <constraint firstItem=\"i9k-eB-RT8\" firstAttribute=\"leading\" secondItem=\"eHT-LR-cZK\" secondAttribute=\"leading\" constant=\"8\" id=\"Wum-gI-GNR\"/>\n                                    <constraint firstItem=\"3XA-yE-mb3\" firstAttribute=\"leading\" secondItem=\"ixE-Ze-q3A\" secondAttribute=\"trailing\" constant=\"8\" symbolic=\"YES\" id=\"Y9Y-Lk-ATq\"/>\n                                    <constraint firstItem=\"vBw-Yr-A7Z\" firstAttribute=\"leading\" secondItem=\"eHT-LR-cZK\" secondAttribute=\"leading\" id=\"a4b-H8-GVf\"/>\n                                    <constraint firstItem=\"59b-yN-GFc\" firstAttribute=\"top\" secondItem=\"i9k-eB-RT8\" secondAttribute=\"bottom\" constant=\"8\" symbolic=\"YES\" id=\"aBh-Jy-wTJ\"/>\n                                    <constraint firstAttribute=\"trailing\" secondItem=\"bcD-S7-0tb\" secondAttribute=\"trailing\" constant=\"8\" id=\"ayJ-XE-NTY\"/>\n                                    <constraint firstItem=\"DlS-FL-u3H\" firstAttribute=\"top\" secondItem=\"3XA-yE-mb3\" secondAttribute=\"bottom\" constant=\"8\" symbolic=\"YES\" id=\"bpH-zo-xYo\"/>\n                                    <constraint firstAttribute=\"trailing\" secondItem=\"AZd-Jv-XEh\" secondAttribute=\"trailing\" constant=\"8\" id=\"d2O-Lc-YmO\"/>\n                                    <constraint firstItem=\"AZd-Jv-XEh\" firstAttribute=\"leading\" secondItem=\"eHT-LR-cZK\" secondAttribute=\"leading\" constant=\"8\" id=\"d4k-aj-fpx\"/>\n                                    <constraint firstItem=\"1SA-Gl-EbR\" firstAttribute=\"top\" secondItem=\"eHT-LR-cZK\" secondAttribute=\"top\" constant=\"292\" id=\"d8N-LP-VOz\"/>\n                                    <constraint firstItem=\"3XA-yE-mb3\" firstAttribute=\"top\" secondItem=\"JvL-Cg-kNK\" secondAttribute=\"bottom\" constant=\"38\" id=\"eUu-wH-U7m\"/>\n                                    <constraint firstItem=\"txp-es-uQv\" firstAttribute=\"leading\" secondItem=\"eHT-LR-cZK\" secondAttribute=\"leading\" id=\"f43-nE-heC\"/>\n                                    <constraint firstItem=\"1SA-Gl-EbR\" firstAttribute=\"leading\" secondItem=\"ixE-Ze-q3A\" secondAttribute=\"leading\" id=\"gSA-Nn-gHk\"/>\n                                    <constraint firstItem=\"bcD-S7-0tb\" firstAttribute=\"top\" secondItem=\"59b-yN-GFc\" secondAttribute=\"bottom\" constant=\"7\" id=\"h0f-Xr-CaU\"/>\n                                    <constraint firstItem=\"40t-Px-2ct\" firstAttribute=\"leading\" secondItem=\"eHT-LR-cZK\" secondAttribute=\"leading\" constant=\"8\" id=\"hMV-eD-SRr\"/>\n                                    <constraint firstItem=\"VQ0-4Z-YAo\" firstAttribute=\"top\" secondItem=\"eHT-LR-cZK\" secondAttribute=\"topMargin\" id=\"iJ6-oO-b8e\"/>\n                                    <constraint firstAttribute=\"trailing\" secondItem=\"txp-es-uQv\" secondAttribute=\"trailing\" id=\"iSq-BB-xso\"/>\n                                    <constraint firstItem=\"bcD-S7-0tb\" firstAttribute=\"leading\" secondItem=\"eHT-LR-cZK\" secondAttribute=\"leading\" constant=\"8\" id=\"jg9-Tk-ojj\"/>\n                                    <constraint firstItem=\"59b-yN-GFc\" firstAttribute=\"leading\" secondItem=\"eHT-LR-cZK\" secondAttribute=\"leading\" constant=\"8\" id=\"lfI-BH-zmx\"/>\n                                    <constraint firstItem=\"JvL-Cg-kNK\" firstAttribute=\"top\" secondItem=\"i9k-eB-RT8\" secondAttribute=\"top\" id=\"m0j-nz-xhI\"/>\n                                    <constraint firstItem=\"6V1-g4-Kqz\" firstAttribute=\"top\" secondItem=\"xuQ-JE-0IT\" secondAttribute=\"bottom\" constant=\"8\" symbolic=\"YES\" id=\"m4N-FA-r7g\"/>\n                                    <constraint firstAttribute=\"trailing\" secondItem=\"AZd-Jv-XEh\" secondAttribute=\"trailing\" constant=\"8\" id=\"rIE-rO-GzY\"/>\n                                    <constraint firstItem=\"AZd-Jv-XEh\" firstAttribute=\"top\" secondItem=\"3XA-yE-mb3\" secondAttribute=\"bottom\" constant=\"8\" id=\"sVK-2l-uRr\"/>\n                                    <constraint firstItem=\"1SA-Gl-EbR\" firstAttribute=\"baseline\" secondItem=\"AZd-Jv-XEh\" secondAttribute=\"baseline\" id=\"t87-SO-XbM\"/>\n                                    <constraint firstAttribute=\"trailing\" secondItem=\"3XA-yE-mb3\" secondAttribute=\"trailing\" constant=\"24\" id=\"u76-Wl-hQ6\"/>\n                                    <constraint firstItem=\"40t-Px-2ct\" firstAttribute=\"leading\" secondItem=\"eHT-LR-cZK\" secondAttribute=\"leading\" constant=\"8\" id=\"wLx-6m-tWC\"/>\n                                    <constraint firstAttribute=\"trailing\" secondItem=\"40t-Px-2ct\" secondAttribute=\"trailing\" constant=\"8\" id=\"whb-Ww-TjA\"/>\n                                    <constraint firstItem=\"xuQ-JE-0IT\" firstAttribute=\"top\" secondItem=\"vBw-Yr-A7Z\" secondAttribute=\"bottom\" constant=\"-1\" id=\"wtk-68-T38\"/>\n                                    <constraint firstItem=\"b97-9w-wKT\" firstAttribute=\"top\" secondItem=\"1SA-Gl-EbR\" secondAttribute=\"bottom\" constant=\"8\" symbolic=\"YES\" id=\"x0x-6s-HyZ\"/>\n                                    <constraint firstItem=\"AZd-Jv-XEh\" firstAttribute=\"leading\" secondItem=\"eHT-LR-cZK\" secondAttribute=\"leading\" constant=\"8\" id=\"ynw-HD-nk7\"/>\n                                    <constraint firstItem=\"3XA-yE-mb3\" firstAttribute=\"leading\" secondItem=\"DlS-FL-u3H\" secondAttribute=\"leading\" id=\"zEu-jm-GLY\"/>\n                                    <constraint firstItem=\"xuQ-JE-0IT\" firstAttribute=\"leading\" secondItem=\"eHT-LR-cZK\" secondAttribute=\"leading\" constant=\"8\" id=\"zcJ-Wz-qhr\"/>\n                                </constraints>\n                                <variation key=\"default\">\n                                    <mask key=\"constraints\">\n                                        <exclude reference=\"wLx-6m-tWC\"/>\n                                        <exclude reference=\"Oo1-8F-QSD\"/>\n                                        <exclude reference=\"d4k-aj-fpx\"/>\n                                        <exclude reference=\"rIE-rO-GzY\"/>\n                                        <exclude reference=\"t87-SO-XbM\"/>\n                                        <exclude reference=\"L8u-ek-axE\"/>\n                                    </mask>\n                                </variation>\n                            </view>\n                            <tabBar contentMode=\"scaleToFill\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"PhA-zc-Um6\">\n                                <rect key=\"frame\" x=\"0.0\" y=\"617\" width=\"375\" height=\"49\"/>\n                                <color key=\"backgroundColor\" red=\"0.0\" green=\"0.0\" blue=\"0.0\" alpha=\"0.0\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n                                <items>\n                                    <tabBarItem title=\"Send\" image=\"upload.png\" id=\"4mb-2o-3A1\"/>\n                                    <tabBarItem tag=\"1\" title=\"Receive\" image=\"download.png\" id=\"hWO-u0-HoS\"/>\n                                </items>\n                                <connections>\n                                    <outlet property=\"delegate\" destination=\"BYZ-38-t0r\" id=\"H4w-cs-0Z3\"/>\n                                </connections>\n                            </tabBar>\n                        </subviews>\n                        <color key=\"backgroundColor\" red=\"1\" green=\"1\" blue=\"1\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n                        <constraints>\n                            <constraint firstItem=\"eHT-LR-cZK\" firstAttribute=\"top\" secondItem=\"s8n-dJ-Ket\" secondAttribute=\"top\" id=\"4by-cl-TeJ\"/>\n                            <constraint firstItem=\"s8n-dJ-Ket\" firstAttribute=\"bottom\" secondItem=\"PhA-zc-Um6\" secondAttribute=\"bottom\" constant=\"1\" id=\"9em-MP-4i1\"/>\n                            <constraint firstItem=\"z1R-zT-Rrk\" firstAttribute=\"leading\" secondItem=\"8bC-Xf-vdC\" secondAttribute=\"leadingMargin\" constant=\"-16\" id=\"BNS-Ke-99k\"/>\n                            <constraint firstItem=\"z1R-zT-Rrk\" firstAttribute=\"top\" secondItem=\"s8n-dJ-Ket\" secondAttribute=\"top\" id=\"CKY-UR-VWw\"/>\n                            <constraint firstItem=\"eHT-LR-cZK\" firstAttribute=\"leading\" secondItem=\"8bC-Xf-vdC\" secondAttribute=\"leadingMargin\" constant=\"-16\" id=\"Mez-Vu-Iik\"/>\n                            <constraint firstItem=\"z1R-zT-Rrk\" firstAttribute=\"bottom\" secondItem=\"eHT-LR-cZK\" secondAttribute=\"bottom\" constant=\"-43\" id=\"SFT-xv-Rfe\"/>\n                            <constraint firstAttribute=\"trailingMargin\" secondItem=\"PhA-zc-Um6\" secondAttribute=\"trailing\" constant=\"-16\" id=\"dR6-lF-Vtb\"/>\n                            <constraint firstAttribute=\"trailingMargin\" secondItem=\"eHT-LR-cZK\" secondAttribute=\"trailing\" constant=\"-16\" id=\"l63-DN-8Kh\"/>\n                            <constraint firstItem=\"PhA-zc-Um6\" firstAttribute=\"leading\" secondItem=\"8bC-Xf-vdC\" secondAttribute=\"leadingMargin\" constant=\"-16\" id=\"onN-ow-2cz\"/>\n                            <constraint firstAttribute=\"trailingMargin\" secondItem=\"z1R-zT-Rrk\" secondAttribute=\"trailing\" constant=\"-16\" id=\"yka-sw-axN\"/>\n                        </constraints>\n                        <viewLayoutGuide key=\"safeArea\" id=\"s8n-dJ-Ket\"/>\n                    </view>\n                    <navigationItem key=\"navigationItem\" title=\"Send\" id=\"bCV-xP-8V6\">\n                        <barButtonItem key=\"leftBarButtonItem\" image=\"list.png\" id=\"TAh-zr-A5h\">\n                            <connections>\n                                <action selector=\"menuButtonClicked:\" destination=\"BYZ-38-t0r\" id=\"Byw-AO-zoe\"/>\n                            </connections>\n                        </barButtonItem>\n                    </navigationItem>\n                    <nil key=\"simulatedBottomBarMetrics\"/>\n                    <connections>\n                        <outlet property=\"accountBalanceLabel\" destination=\"P8X-aW-lhi\" id=\"FCz-7r-LQc\"/>\n                        <outlet property=\"accountNameLabel\" destination=\"cmA-Xp-Fwi\" id=\"agx-lY-qnQ\"/>\n                        <outlet property=\"addressBookButton\" destination=\"JvL-Cg-kNK\" id=\"qDU-Wz-sYH\"/>\n                        <outlet property=\"amountLabel\" destination=\"59b-yN-GFc\" id=\"sLV-3e-96u\"/>\n                        <outlet property=\"amountTextField\" destination=\"ixE-Ze-q3A\" id=\"kqw-dU-zCh\"/>\n                        <outlet property=\"balanceActivityIndicatorView\" destination=\"nEo-6J-cjj\" id=\"vN7-AR-ohA\"/>\n                        <outlet property=\"bitcoinDisplayLabel\" destination=\"3XA-yE-mb3\" id=\"dKi-1J-dxE\"/>\n                        <outlet property=\"bottomView\" destination=\"z1R-zT-Rrk\" id=\"XHo-7w-EWd\"/>\n                        <outlet property=\"fiatAmountTextField\" destination=\"1SA-Gl-EbR\" id=\"QlR-4u-VaE\"/>\n                        <outlet property=\"fiatCurrencyDisplayLabel\" destination=\"DlS-FL-u3H\" id=\"7fX-ca-xKR\"/>\n                        <outlet property=\"fromLabel\" destination=\"VQ0-4Z-YAo\" id=\"bvy-Fd-TKD\"/>\n                        <outlet property=\"fromViewContainer\" destination=\"40t-Px-2ct\" id=\"ArD-19-kfl\"/>\n                        <outlet property=\"reviewPaymentButton\" destination=\"b97-9w-wKT\" id=\"GQj-GT-B4Q\"/>\n                        <outlet property=\"scanQRButton\" destination=\"i9k-eB-RT8\" id=\"dyb-de-hQb\"/>\n                        <outlet property=\"selectAccountImageView\" destination=\"N7W-9G-LiG\" id=\"oHL-CV-T80\"/>\n                        <outlet property=\"tabBar\" destination=\"PhA-zc-Um6\" id=\"31R-vC-gTU\"/>\n                        <outlet property=\"toAddressTextField\" destination=\"6V1-g4-Kqz\" id=\"e8l-Vx-D2f\"/>\n                        <outlet property=\"toLabel\" destination=\"xuQ-JE-0IT\" id=\"nha-2X-mV9\"/>\n                        <outlet property=\"topView\" destination=\"eHT-LR-cZK\" id=\"9Ln-pI-Plz\"/>\n                        <segue destination=\"uB4-dR-EYT\" kind=\"show\" id=\"PXA-zW-z0y\"/>\n                    </connections>\n                </viewController>\n                <placeholder placeholderIdentifier=\"IBFirstResponder\" id=\"dkx-z0-nzr\" sceneMemberID=\"firstResponder\"/>\n                <tapGestureRecognizer id=\"tbQ-pU-gpy\">\n                    <connections>\n                        <segue destination=\"mbh-2x-bRM\" kind=\"show\" identifier=\"selectAccount\" id=\"ywA-pj-yl1\"/>\n                    </connections>\n                </tapGestureRecognizer>\n            </objects>\n            <point key=\"canvasLocation\" x=\"463\" y=\"167\"/>\n        </scene>\n        <!--Root View Controller-->\n        <scene sceneID=\"4eb-EW-eQV\">\n            <objects>\n                <tableViewController id=\"tx3-tA-9kw\" customClass=\"TLSettingsViewController\" sceneMemberID=\"viewController\">\n                    <tableView key=\"view\" clipsSubviews=\"YES\" contentMode=\"scaleToFill\" alwaysBounceVertical=\"YES\" dataMode=\"prototypes\" style=\"grouped\" separatorStyle=\"default\" rowHeight=\"44\" sectionHeaderHeight=\"10\" sectionFooterHeight=\"10\" id=\"mhL-hS-W4z\">\n                        <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"375\" height=\"667\"/>\n                        <autoresizingMask key=\"autoresizingMask\" widthSizable=\"YES\" heightSizable=\"YES\"/>\n                        <color key=\"backgroundColor\" red=\"0.93725490196078431\" green=\"0.93725490196078431\" blue=\"0.95686274509803926\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n                        <prototypes>\n                            <tableViewCell contentMode=\"scaleToFill\" selectionStyle=\"default\" indentationWidth=\"10\" id=\"dVx-U1-lNi\">\n                                <rect key=\"frame\" x=\"0.0\" y=\"55.5\" width=\"375\" height=\"44\"/>\n                                <autoresizingMask key=\"autoresizingMask\"/>\n                                <tableViewCellContentView key=\"contentView\" opaque=\"NO\" clipsSubviews=\"YES\" multipleTouchEnabled=\"YES\" contentMode=\"center\" tableViewCell=\"dVx-U1-lNi\" id=\"IPQ-FO-cJx\">\n                                    <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"375\" height=\"43.5\"/>\n                                    <autoresizingMask key=\"autoresizingMask\"/>\n                                </tableViewCellContentView>\n                            </tableViewCell>\n                        </prototypes>\n                        <connections>\n                            <outlet property=\"dataSource\" destination=\"tx3-tA-9kw\" id=\"JuO-8p-zXI\"/>\n                            <outlet property=\"delegate\" destination=\"tx3-tA-9kw\" id=\"ESI-db-NeZ\"/>\n                        </connections>\n                    </tableView>\n                    <navigationItem key=\"navigationItem\" title=\"Root View Controller\" id=\"AUN-mh-2Qy\">\n                        <barButtonItem key=\"leftBarButtonItem\" image=\"list.png\" id=\"LNv-I6-xdu\">\n                            <connections>\n                                <action selector=\"menuButtonClicked:\" destination=\"tx3-tA-9kw\" id=\"R4T-J6-Utr\"/>\n                            </connections>\n                        </barButtonItem>\n                    </navigationItem>\n                </tableViewController>\n                <placeholder placeholderIdentifier=\"IBFirstResponder\" id=\"Iw8-GL-hIL\" userLabel=\"First Responder\" sceneMemberID=\"firstResponder\"/>\n            </objects>\n            <point key=\"canvasLocation\" x=\"1973\" y=\"1465\"/>\n        </scene>\n        <!--Navigation Controller-->\n        <scene sceneID=\"Gt5-TC-AXO\">\n            <objects>\n                <navigationController storyboardIdentifier=\"SettingsNav\" id=\"VL3-RC-hcZ\" sceneMemberID=\"viewController\">\n                    <navigationBar key=\"navigationBar\" contentMode=\"scaleToFill\" id=\"y47-aT-EDA\">\n                        <rect key=\"frame\" x=\"0.0\" y=\"20\" width=\"375\" height=\"44\"/>\n                        <autoresizingMask key=\"autoresizingMask\"/>\n                    </navigationBar>\n                    <connections>\n                        <segue destination=\"tx3-tA-9kw\" kind=\"relationship\" relationship=\"rootViewController\" id=\"0iI-ZN-J2S\"/>\n                    </connections>\n                </navigationController>\n                <placeholder placeholderIdentifier=\"IBFirstResponder\" id=\"mxO-po-yvr\" userLabel=\"First Responder\" sceneMemberID=\"firstResponder\"/>\n            </objects>\n            <point key=\"canvasLocation\" x=\"1153\" y=\"1465\"/>\n        </scene>\n        <!--Pass Phrase View Controller-->\n        <scene sceneID=\"TCe-gT-kFA\">\n            <objects>\n                <viewController storyboardIdentifier=\"Passphrase\" id=\"Cya-vx-OE4\" customClass=\"TLPassPhraseViewController\" sceneMemberID=\"viewController\">\n                    <view key=\"view\" contentMode=\"scaleToFill\" id=\"vHd-RN-LkG\">\n                        <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"375\" height=\"667\"/>\n                        <autoresizingMask key=\"autoresizingMask\" widthSizable=\"YES\" heightSizable=\"YES\"/>\n                        <subviews>\n                            <navigationBar contentMode=\"scaleToFill\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"R5o-dM-wOC\">\n                                <rect key=\"frame\" x=\"-4\" y=\"20\" width=\"383\" height=\"44\"/>\n                                <color key=\"barTintColor\" red=\"1\" green=\"1\" blue=\"1\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n                                <items>\n                                    <navigationItem title=\"Passphrase\" id=\"zdP-16-weC\">\n                                        <barButtonItem key=\"leftBarButtonItem\" systemItem=\"done\" id=\"jDg-lF-xYm\">\n                                            <connections>\n                                                <action selector=\"cancel:\" destination=\"Cya-vx-OE4\" id=\"wFe-cf-vTl\"/>\n                                            </connections>\n                                        </barButtonItem>\n                                    </navigationItem>\n                                </items>\n                            </navigationBar>\n                            <view contentMode=\"scaleToFill\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"KBe-Ve-SYa\">\n                                <rect key=\"frame\" x=\"-4\" y=\"65\" width=\"383\" height=\"602\"/>\n                                <subviews>\n                                    <label opaque=\"NO\" userInteractionEnabled=\"NO\" contentMode=\"left\" horizontalHuggingPriority=\"251\" verticalHuggingPriority=\"251\" text=\"Wallet backup passphrase\" textAlignment=\"center\" lineBreakMode=\"tailTruncation\" baselineAdjustment=\"alignBaselines\" adjustsFontSizeToFit=\"NO\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"C32-6S-BC5\">\n                                        <rect key=\"frame\" x=\"8\" y=\"8\" width=\"367\" height=\"20.5\"/>\n                                        <fontDescription key=\"fontDescription\" type=\"boldSystem\" pointSize=\"17\"/>\n                                        <color key=\"textColor\" red=\"0.0\" green=\"0.0\" blue=\"0.0\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n                                        <nil key=\"highlightedColor\"/>\n                                    </label>\n                                    <label opaque=\"NO\" userInteractionEnabled=\"NO\" contentMode=\"left\" horizontalHuggingPriority=\"251\" verticalHuggingPriority=\"251\" text=\"Master Seed Hex\" textAlignment=\"center\" lineBreakMode=\"tailTruncation\" baselineAdjustment=\"alignBaselines\" adjustsFontSizeToFit=\"NO\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"6BY-dx-fLW\">\n                                        <rect key=\"frame\" x=\"8\" y=\"162\" width=\"367\" height=\"20.5\"/>\n                                        <fontDescription key=\"fontDescription\" type=\"boldSystem\" pointSize=\"17\"/>\n                                        <color key=\"textColor\" red=\"0.0\" green=\"0.0\" blue=\"0.0\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n                                        <nil key=\"highlightedColor\"/>\n                                    </label>\n                                    <label opaque=\"NO\" userInteractionEnabled=\"NO\" contentMode=\"left\" horizontalHuggingPriority=\"251\" verticalHuggingPriority=\"251\" text=\"Write down the 12 word passphrase below and keep it safe. You can restore your wallet with this single passphrase.\" textAlignment=\"center\" lineBreakMode=\"tailTruncation\" numberOfLines=\"4\" baselineAdjustment=\"alignBaselines\" adjustsFontSizeToFit=\"NO\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"evC-L0-0Dc\">\n                                        <rect key=\"frame\" x=\"8\" y=\"36.5\" width=\"367\" height=\"29\"/>\n                                        <fontDescription key=\"fontDescription\" type=\"system\" pointSize=\"12\"/>\n                                        <color key=\"textColor\" red=\"0.0\" green=\"0.0\" blue=\"0.0\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n                                        <nil key=\"highlightedColor\"/>\n                                    </label>\n                                    <label opaque=\"NO\" userInteractionEnabled=\"NO\" contentMode=\"left\" horizontalHuggingPriority=\"251\" verticalHuggingPriority=\"251\" textAlignment=\"center\" lineBreakMode=\"tailTruncation\" numberOfLines=\"8\" baselineAdjustment=\"alignBaselines\" adjustsFontSizeToFit=\"NO\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"wjz-SH-FCO\">\n                                        <rect key=\"frame\" x=\"16\" y=\"190.5\" width=\"351\" height=\"72\"/>\n                                        <string key=\"text\">The master seed hex is derived from the passphrase. If you want to import Bitcoins into another wallet, and if that other wallets don't use BIP39, then it's possible to import the Bitcoins using the master seed hex as long as they support BIP44.</string>\n                                        <fontDescription key=\"fontDescription\" type=\"system\" pointSize=\"12\"/>\n                                        <color key=\"textColor\" red=\"0.0\" green=\"0.0\" blue=\"0.0\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n                                        <nil key=\"highlightedColor\"/>\n                                    </label>\n                                    <textView clipsSubviews=\"YES\" multipleTouchEnabled=\"YES\" contentMode=\"scaleToFill\" bounces=\"NO\" scrollEnabled=\"NO\" editable=\"NO\" text=\"nice muse brush descend pattern focus bleed college sneak calm leap flight\" textAlignment=\"center\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"p18-DP-CtY\">\n                                        <rect key=\"frame\" x=\"16\" y=\"73.5\" width=\"351\" height=\"80.5\"/>\n                                        <color key=\"backgroundColor\" red=\"0.062279825470000001\" green=\"1\" blue=\"0.22195490649999999\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n                                        <fontDescription key=\"fontDescription\" type=\"boldSystem\" pointSize=\"18\"/>\n                                        <textInputTraits key=\"textInputTraits\" autocapitalizationType=\"sentences\"/>\n                                        <userDefinedRuntimeAttributes>\n                                            <userDefinedRuntimeAttribute type=\"string\" keyPath=\"layer.cornerRadius\" value=\"5\"/>\n                                        </userDefinedRuntimeAttributes>\n                                    </textView>\n                                    <textView clipsSubviews=\"YES\" multipleTouchEnabled=\"YES\" contentMode=\"scaleToFill\" bounces=\"NO\" scrollEnabled=\"NO\" editable=\"NO\" textAlignment=\"center\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"N96-Pu-vSQ\">\n                                        <rect key=\"frame\" x=\"16\" y=\"270.5\" width=\"351\" height=\"92.5\"/>\n                                        <color key=\"backgroundColor\" red=\"0.062279825470000001\" green=\"1\" blue=\"0.22195490649999999\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n                                        <string key=\"text\">f23324e18c237876f96d2064abbc26399cc3cd34d503cc6f2b00a9403b003dcad2cf7642e4e3311cf2e5de32307d88b116ac743f0b02fc4c2afe0e30dcd843f6</string>\n                                        <fontDescription key=\"fontDescription\" type=\"boldSystem\" pointSize=\"16\"/>\n                                        <textInputTraits key=\"textInputTraits\" autocapitalizationType=\"sentences\"/>\n                                        <userDefinedRuntimeAttributes>\n                                            <userDefinedRuntimeAttribute type=\"string\" keyPath=\"layer.cornerRadius\" value=\"5\"/>\n                                        </userDefinedRuntimeAttributes>\n                                    </textView>\n                                </subviews>\n                                <color key=\"backgroundColor\" red=\"1\" green=\"1\" blue=\"1\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n                                <constraints>\n                                    <constraint firstItem=\"6BY-dx-fLW\" firstAttribute=\"leading\" secondItem=\"KBe-Ve-SYa\" secondAttribute=\"leading\" constant=\"8\" id=\"2ak-H8-N1d\"/>\n                                    <constraint firstAttribute=\"trailing\" secondItem=\"evC-L0-0Dc\" secondAttribute=\"trailing\" constant=\"8\" id=\"5Rv-QP-sRF\"/>\n                                    <constraint firstAttribute=\"trailing\" secondItem=\"6BY-dx-fLW\" secondAttribute=\"trailing\" constant=\"8\" id=\"BEK-Jk-vJw\"/>\n                                    <constraint firstAttribute=\"trailing\" secondItem=\"N96-Pu-vSQ\" secondAttribute=\"trailing\" constant=\"16\" id=\"EbX-F6-Avb\"/>\n                                    <constraint firstItem=\"N96-Pu-vSQ\" firstAttribute=\"top\" secondItem=\"wjz-SH-FCO\" secondAttribute=\"bottom\" constant=\"8\" symbolic=\"YES\" id=\"IAn-Be-dOv\"/>\n                                    <constraint firstItem=\"N96-Pu-vSQ\" firstAttribute=\"leading\" secondItem=\"KBe-Ve-SYa\" secondAttribute=\"leading\" constant=\"16\" id=\"N0e-AI-2pr\"/>\n                                    <constraint firstItem=\"p18-DP-CtY\" firstAttribute=\"leading\" secondItem=\"KBe-Ve-SYa\" secondAttribute=\"leading\" constant=\"16\" id=\"OrN-up-FVk\"/>\n                                    <constraint firstItem=\"6BY-dx-fLW\" firstAttribute=\"top\" secondItem=\"p18-DP-CtY\" secondAttribute=\"bottom\" constant=\"8\" id=\"T5D-r3-2B1\"/>\n                                    <constraint firstItem=\"p18-DP-CtY\" firstAttribute=\"top\" secondItem=\"evC-L0-0Dc\" secondAttribute=\"bottom\" constant=\"8\" id=\"UCe-ir-lYo\"/>\n                                    <constraint firstItem=\"wjz-SH-FCO\" firstAttribute=\"leading\" secondItem=\"KBe-Ve-SYa\" secondAttribute=\"leading\" constant=\"16\" id=\"Y3A-Jb-t64\"/>\n                                    <constraint firstAttribute=\"trailing\" secondItem=\"C32-6S-BC5\" secondAttribute=\"trailing\" constant=\"8\" id=\"ZMv-pv-N3a\"/>\n                                    <constraint firstAttribute=\"trailing\" secondItem=\"wjz-SH-FCO\" secondAttribute=\"trailing\" constant=\"16\" id=\"ci9-XE-xBD\"/>\n                                    <constraint firstItem=\"evC-L0-0Dc\" firstAttribute=\"leading\" secondItem=\"KBe-Ve-SYa\" secondAttribute=\"leading\" constant=\"8\" id=\"gmd-vu-ogn\"/>\n                                    <constraint firstItem=\"evC-L0-0Dc\" firstAttribute=\"top\" secondItem=\"C32-6S-BC5\" secondAttribute=\"bottom\" constant=\"8\" id=\"iYE-bK-cqQ\"/>\n                                    <constraint firstAttribute=\"trailing\" secondItem=\"p18-DP-CtY\" secondAttribute=\"trailing\" constant=\"16\" id=\"p20-Ay-vi0\"/>\n                                    <constraint firstItem=\"C32-6S-BC5\" firstAttribute=\"top\" secondItem=\"KBe-Ve-SYa\" secondAttribute=\"top\" constant=\"8\" id=\"p9p-Le-8zj\"/>\n                                    <constraint firstItem=\"C32-6S-BC5\" firstAttribute=\"leading\" secondItem=\"KBe-Ve-SYa\" secondAttribute=\"leading\" constant=\"8\" id=\"vSC-7g-LXP\"/>\n                                    <constraint firstItem=\"wjz-SH-FCO\" firstAttribute=\"top\" secondItem=\"6BY-dx-fLW\" secondAttribute=\"bottom\" constant=\"8\" symbolic=\"YES\" id=\"z4D-v8-piO\"/>\n                                </constraints>\n                            </view>\n                        </subviews>\n                        <color key=\"backgroundColor\" red=\"1\" green=\"1\" blue=\"1\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n                        <constraints>\n                            <constraint firstAttribute=\"trailingMargin\" secondItem=\"R5o-dM-wOC\" secondAttribute=\"trailing\" constant=\"-16\" id=\"Aa3-OA-yql\"/>\n                            <constraint firstAttribute=\"trailingMargin\" secondItem=\"KBe-Ve-SYa\" secondAttribute=\"trailing\" constant=\"-20\" id=\"CEv-1S-4yJ\"/>\n                            <constraint firstItem=\"KBe-Ve-SYa\" firstAttribute=\"bottom\" secondItem=\"hKp-iB-EXr\" secondAttribute=\"bottom\" id=\"CLZ-vC-0P2\"/>\n                            <constraint firstItem=\"KBe-Ve-SYa\" firstAttribute=\"leading\" secondItem=\"R5o-dM-wOC\" secondAttribute=\"leading\" id=\"Dex-r7-TJF\"/>\n                            <constraint firstItem=\"KBe-Ve-SYa\" firstAttribute=\"leading\" secondItem=\"vHd-RN-LkG\" secondAttribute=\"leadingMargin\" constant=\"-20\" id=\"PQi-QQ-L86\"/>\n                            <constraint firstItem=\"R5o-dM-wOC\" firstAttribute=\"leading\" secondItem=\"vHd-RN-LkG\" secondAttribute=\"leadingMargin\" constant=\"-16\" id=\"TlE-6e-OIm\"/>\n                            <constraint firstItem=\"KBe-Ve-SYa\" firstAttribute=\"top\" secondItem=\"R5o-dM-wOC\" secondAttribute=\"bottom\" constant=\"1\" id=\"Zg7-QN-u97\"/>\n                            <constraint firstItem=\"R5o-dM-wOC\" firstAttribute=\"top\" secondItem=\"hKp-iB-EXr\" secondAttribute=\"top\" id=\"cis-4S-Ox4\"/>\n                            <constraint firstItem=\"hKp-iB-EXr\" firstAttribute=\"bottom\" secondItem=\"KBe-Ve-SYa\" secondAttribute=\"bottom\" id=\"k6K-rN-bBG\"/>\n                            <constraint firstItem=\"KBe-Ve-SYa\" firstAttribute=\"trailing\" secondItem=\"R5o-dM-wOC\" secondAttribute=\"trailing\" id=\"mxQ-mI-ENd\"/>\n                            <constraint firstItem=\"R5o-dM-wOC\" firstAttribute=\"top\" secondItem=\"hKp-iB-EXr\" secondAttribute=\"top\" id=\"qNF-Wm-tQp\"/>\n                            <constraint firstItem=\"KBe-Ve-SYa\" firstAttribute=\"top\" secondItem=\"R5o-dM-wOC\" secondAttribute=\"bottom\" constant=\"1\" id=\"qal-Zq-60V\"/>\n                        </constraints>\n                        <viewLayoutGuide key=\"safeArea\" id=\"hKp-iB-EXr\"/>\n                        <variation key=\"default\">\n                            <mask key=\"constraints\">\n                                <exclude reference=\"Aa3-OA-yql\"/>\n                                <exclude reference=\"TlE-6e-OIm\"/>\n                            </mask>\n                        </variation>\n                    </view>\n                    <connections>\n                        <outlet property=\"backupPassphraseExplanation\" destination=\"evC-L0-0Dc\" id=\"4Mu-7j-XYB\"/>\n                        <outlet property=\"masterSeedHexTextView\" destination=\"N96-Pu-vSQ\" id=\"kGy-yd-qdI\"/>\n                        <outlet property=\"masterSeedHexTitleExplanation\" destination=\"wjz-SH-FCO\" id=\"O5i-RA-IlU\"/>\n                        <outlet property=\"masterSeedHexTitleLabel\" destination=\"6BY-dx-fLW\" id=\"JNN-PK-EzT\"/>\n                        <outlet property=\"navigationBar\" destination=\"R5o-dM-wOC\" id=\"bnO-vn-qBc\"/>\n                        <outlet property=\"passPhraseTextView\" destination=\"p18-DP-CtY\" id=\"gX5-Bq-bpb\"/>\n                        <outlet property=\"walletBackupPassphraseLabel\" destination=\"C32-6S-BC5\" id=\"Gpu-FV-JQC\"/>\n                    </connections>\n                </viewController>\n                <placeholder placeholderIdentifier=\"IBFirstResponder\" id=\"mfJ-qD-End\" userLabel=\"First Responder\" sceneMemberID=\"firstResponder\"/>\n            </objects>\n            <point key=\"canvasLocation\" x=\"1973\" y=\"807\"/>\n        </scene>\n        <!--Accounts View Controller-->\n        <scene sceneID=\"hQQ-jg-LEj\">\n            <objects>\n                <viewController storyboardIdentifier=\"Accounts\" id=\"mbh-2x-bRM\" customClass=\"TLAccountsViewController\" sceneMemberID=\"viewController\">\n                    <view key=\"view\" contentMode=\"scaleToFill\" id=\"dtW-87-FoU\">\n                        <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"375\" height=\"667\"/>\n                        <autoresizingMask key=\"autoresizingMask\" widthSizable=\"YES\" heightSizable=\"YES\"/>\n                        <subviews>\n                            <tableView clipsSubviews=\"YES\" contentMode=\"scaleToFill\" alwaysBounceVertical=\"YES\" dataMode=\"prototypes\" style=\"grouped\" separatorStyle=\"default\" rowHeight=\"74\" sectionHeaderHeight=\"10\" sectionFooterHeight=\"10\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"rFs-vj-XnZ\">\n                                <rect key=\"frame\" x=\"-4\" y=\"64\" width=\"383\" height=\"603\"/>\n                                <color key=\"backgroundColor\" red=\"0.93725490196078431\" green=\"0.93725490196078431\" blue=\"0.95686274509803926\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n                                <prototypes>\n                                    <tableViewCell contentMode=\"scaleToFill\" selectionStyle=\"default\" indentationWidth=\"10\" reuseIdentifier=\"AccountCellIdentifier\" rowHeight=\"74\" id=\"4fe-7w-ZA5\" customClass=\"TLAccountTableViewCell\">\n                                        <rect key=\"frame\" x=\"0.0\" y=\"55.5\" width=\"383\" height=\"74\"/>\n                                        <autoresizingMask key=\"autoresizingMask\"/>\n                                        <tableViewCellContentView key=\"contentView\" opaque=\"NO\" clipsSubviews=\"YES\" multipleTouchEnabled=\"YES\" contentMode=\"center\" tableViewCell=\"4fe-7w-ZA5\" id=\"FMb-eo-NCl\">\n                                            <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"383\" height=\"73.5\"/>\n                                            <autoresizingMask key=\"autoresizingMask\"/>\n                                            <subviews>\n                                                <button opaque=\"NO\" contentMode=\"scaleToFill\" contentHorizontalAlignment=\"center\" contentVerticalAlignment=\"center\" buttonType=\"roundedRect\" lineBreakMode=\"middleTruncation\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"dar-hs-w7H\">\n                                                    <rect key=\"frame\" x=\"124\" y=\"10\" width=\"251\" height=\"30\"/>\n                                                    <color key=\"backgroundColor\" red=\"0.062279825470000001\" green=\"1\" blue=\"0.22195490649999999\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n                                                    <fontDescription key=\"fontDescription\" type=\"boldSystem\" pointSize=\"15\"/>\n                                                    <state key=\"normal\">\n                                                        <color key=\"titleShadowColor\" red=\"0.5\" green=\"0.5\" blue=\"0.5\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n                                                    </state>\n                                                    <userDefinedRuntimeAttributes>\n                                                        <userDefinedRuntimeAttribute type=\"string\" keyPath=\"layer.cornerRadius\" value=\"5\"/>\n                                                    </userDefinedRuntimeAttributes>\n                                                    <connections>\n                                                        <action selector=\"accountBalanceButtonClicked:\" destination=\"4fe-7w-ZA5\" eventType=\"touchUpInside\" id=\"2tj-dX-T5c\"/>\n                                                    </connections>\n                                                </button>\n                                                <label opaque=\"NO\" userInteractionEnabled=\"NO\" contentMode=\"left\" horizontalHuggingPriority=\"251\" verticalHuggingPriority=\"251\" text=\"Account Name\" lineBreakMode=\"tailTruncation\" baselineAdjustment=\"alignBaselines\" adjustsFontSizeToFit=\"NO\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"5EJ-8r-ive\">\n                                                    <rect key=\"frame\" x=\"8\" y=\"48\" width=\"367\" height=\"17\"/>\n                                                    <constraints>\n                                                        <constraint firstAttribute=\"height\" constant=\"17\" id=\"XVs-Ef-WF8\"/>\n                                                    </constraints>\n                                                    <fontDescription key=\"fontDescription\" type=\"system\" pointSize=\"17\"/>\n                                                    <color key=\"textColor\" red=\"0.0\" green=\"0.0\" blue=\"0.0\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n                                                    <nil key=\"highlightedColor\"/>\n                                                </label>\n                                            </subviews>\n                                            <constraints>\n                                                <constraint firstItem=\"5EJ-8r-ive\" firstAttribute=\"top\" secondItem=\"dar-hs-w7H\" secondAttribute=\"bottom\" constant=\"8\" id=\"8DK-Cv-h05\"/>\n                                                <constraint firstItem=\"5EJ-8r-ive\" firstAttribute=\"leading\" secondItem=\"FMb-eo-NCl\" secondAttribute=\"leadingMargin\" id=\"Ihw-O4-uwC\"/>\n                                                <constraint firstItem=\"dar-hs-w7H\" firstAttribute=\"trailing\" secondItem=\"FMb-eo-NCl\" secondAttribute=\"trailingMargin\" id=\"Wwn-6g-k1o\"/>\n                                                <constraint firstItem=\"dar-hs-w7H\" firstAttribute=\"leading\" secondItem=\"FMb-eo-NCl\" secondAttribute=\"leadingMargin\" constant=\"116\" id=\"bCo-7R-nza\"/>\n                                                <constraint firstItem=\"dar-hs-w7H\" firstAttribute=\"top\" secondItem=\"FMb-eo-NCl\" secondAttribute=\"topMargin\" constant=\"2\" id=\"jdV-u1-jpJ\"/>\n                                                <constraint firstItem=\"5EJ-8r-ive\" firstAttribute=\"trailing\" secondItem=\"dar-hs-w7H\" secondAttribute=\"trailing\" id=\"pPC-Sq-VTN\"/>\n                                            </constraints>\n                                        </tableViewCellContentView>\n                                        <connections>\n                                            <outlet property=\"accountBalanceButton\" destination=\"dar-hs-w7H\" id=\"hwE-dY-XTN\"/>\n                                            <outlet property=\"accountNameLabel\" destination=\"5EJ-8r-ive\" id=\"bzt-4l-BUg\"/>\n                                        </connections>\n                                    </tableViewCell>\n                                </prototypes>\n                            </tableView>\n                        </subviews>\n                        <color key=\"backgroundColor\" red=\"1\" green=\"1\" blue=\"1\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n                        <constraints>\n                            <constraint firstAttribute=\"trailingMargin\" secondItem=\"rFs-vj-XnZ\" secondAttribute=\"trailing\" constant=\"-20\" id=\"9v0-FY-jPc\"/>\n                            <constraint firstItem=\"U1N-m2-zfP\" firstAttribute=\"bottom\" secondItem=\"rFs-vj-XnZ\" secondAttribute=\"bottom\" id=\"Axw-H7-En5\"/>\n                            <constraint firstItem=\"rFs-vj-XnZ\" firstAttribute=\"top\" secondItem=\"dtW-87-FoU\" secondAttribute=\"topMargin\" id=\"B9W-me-BUL\"/>\n                            <constraint firstItem=\"rFs-vj-XnZ\" firstAttribute=\"leading\" secondItem=\"dtW-87-FoU\" secondAttribute=\"leadingMargin\" constant=\"-20\" id=\"Cix-g3-m4G\"/>\n                        </constraints>\n                        <viewLayoutGuide key=\"safeArea\" id=\"U1N-m2-zfP\"/>\n                    </view>\n                    <connections>\n                        <outlet property=\"accountsTableView\" destination=\"rFs-vj-XnZ\" id=\"d1J-pX-IGy\"/>\n                    </connections>\n                </viewController>\n                <placeholder placeholderIdentifier=\"IBFirstResponder\" id=\"9c5-mM-jaQ\" userLabel=\"First Responder\" sceneMemberID=\"firstResponder\"/>\n            </objects>\n            <point key=\"canvasLocation\" x=\"1138\" y=\"163\"/>\n        </scene>\n        <!--Address List View Controller-->\n        <scene sceneID=\"jXs-0n-N3w\">\n            <objects>\n                <viewController storyboardIdentifier=\"AddressList\" id=\"hnW-d4-U0e\" customClass=\"TLAddressListViewController\" sceneMemberID=\"viewController\">\n                    <view key=\"view\" contentMode=\"scaleToFill\" id=\"Tb2-2M-YJm\">\n                        <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"375\" height=\"667\"/>\n                        <autoresizingMask key=\"autoresizingMask\" widthSizable=\"YES\" heightSizable=\"YES\"/>\n                        <subviews>\n                            <tableView clipsSubviews=\"YES\" contentMode=\"scaleToFill\" alwaysBounceVertical=\"YES\" dataMode=\"prototypes\" style=\"grouped\" separatorStyle=\"default\" rowHeight=\"74\" sectionHeaderHeight=\"10\" sectionFooterHeight=\"10\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"dbC-iF-8QI\">\n                                <rect key=\"frame\" x=\"-4\" y=\"64\" width=\"383\" height=\"603\"/>\n                                <color key=\"backgroundColor\" red=\"0.93725490196078431\" green=\"0.93725490196078431\" blue=\"0.95686274509803926\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n                                <prototypes>\n                                    <tableViewCell contentMode=\"scaleToFill\" selectionStyle=\"default\" indentationWidth=\"10\" reuseIdentifier=\"AddressCellIdentifier\" rowHeight=\"74\" id=\"U73-UR-amK\" customClass=\"TLAddressTableViewCell\">\n                                        <rect key=\"frame\" x=\"0.0\" y=\"55.5\" width=\"383\" height=\"74\"/>\n                                        <autoresizingMask key=\"autoresizingMask\"/>\n                                        <tableViewCellContentView key=\"contentView\" opaque=\"NO\" clipsSubviews=\"YES\" multipleTouchEnabled=\"YES\" contentMode=\"center\" tableViewCell=\"U73-UR-amK\" id=\"bch-iq-M6a\">\n                                            <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"383\" height=\"73.5\"/>\n                                            <autoresizingMask key=\"autoresizingMask\"/>\n                                            <subviews>\n                                                <button opaque=\"NO\" contentMode=\"scaleToFill\" contentHorizontalAlignment=\"center\" contentVerticalAlignment=\"center\" buttonType=\"roundedRect\" lineBreakMode=\"middleTruncation\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"Koj-wy-VOb\">\n                                                    <rect key=\"frame\" x=\"124\" y=\"10\" width=\"243\" height=\"30\"/>\n                                                    <color key=\"backgroundColor\" red=\"0.062279825470000001\" green=\"1\" blue=\"0.22195490649999999\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n                                                    <fontDescription key=\"fontDescription\" type=\"boldSystem\" pointSize=\"15\"/>\n                                                    <state key=\"normal\" title=\"Button\">\n                                                        <color key=\"titleShadowColor\" red=\"0.5\" green=\"0.5\" blue=\"0.5\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n                                                    </state>\n                                                    <userDefinedRuntimeAttributes>\n                                                        <userDefinedRuntimeAttribute type=\"string\" keyPath=\"layer.cornerRadius\" value=\"5\"/>\n                                                    </userDefinedRuntimeAttributes>\n                                                    <connections>\n                                                        <action selector=\"amountButtonClicked:\" destination=\"U73-UR-amK\" eventType=\"touchUpInside\" id=\"RMO-SW-Tn1\"/>\n                                                    </connections>\n                                                </button>\n                                                <label opaque=\"NO\" userInteractionEnabled=\"NO\" contentMode=\"left\" horizontalHuggingPriority=\"251\" verticalHuggingPriority=\"251\" text=\"Label\" lineBreakMode=\"tailTruncation\" baselineAdjustment=\"alignBaselines\" adjustsFontSizeToFit=\"NO\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"JHD-rx-W8M\">\n                                                    <rect key=\"frame\" x=\"8\" y=\"48\" width=\"359\" height=\"17\"/>\n                                                    <constraints>\n                                                        <constraint firstAttribute=\"height\" constant=\"17\" id=\"kcB-Qj-WKu\"/>\n                                                    </constraints>\n                                                    <fontDescription key=\"fontDescription\" type=\"system\" pointSize=\"17\"/>\n                                                    <color key=\"textColor\" red=\"0.0\" green=\"0.0\" blue=\"0.0\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n                                                    <nil key=\"highlightedColor\"/>\n                                                </label>\n                                            </subviews>\n                                            <constraints>\n                                                <constraint firstItem=\"Koj-wy-VOb\" firstAttribute=\"trailing\" secondItem=\"bch-iq-M6a\" secondAttribute=\"trailingMargin\" constant=\"-8\" id=\"Io0-bI-SxY\"/>\n                                                <constraint firstItem=\"Koj-wy-VOb\" firstAttribute=\"leading\" secondItem=\"bch-iq-M6a\" secondAttribute=\"leadingMargin\" constant=\"116\" id=\"M1f-L4-2xn\"/>\n                                                <constraint firstItem=\"JHD-rx-W8M\" firstAttribute=\"leading\" secondItem=\"bch-iq-M6a\" secondAttribute=\"leadingMargin\" id=\"TK4-VT-5Hq\"/>\n                                                <constraint firstItem=\"Koj-wy-VOb\" firstAttribute=\"top\" secondItem=\"bch-iq-M6a\" secondAttribute=\"topMargin\" constant=\"2\" id=\"Ywy-3h-2TB\"/>\n                                                <constraint firstItem=\"JHD-rx-W8M\" firstAttribute=\"top\" secondItem=\"Koj-wy-VOb\" secondAttribute=\"bottom\" constant=\"8\" id=\"dMc-JS-rdH\"/>\n                                                <constraint firstItem=\"JHD-rx-W8M\" firstAttribute=\"trailing\" secondItem=\"Koj-wy-VOb\" secondAttribute=\"trailing\" id=\"kZc-VL-WNK\"/>\n                                            </constraints>\n                                        </tableViewCellContentView>\n                                        <connections>\n                                            <outlet property=\"addressLabel\" destination=\"JHD-rx-W8M\" id=\"Mf3-Yp-L7m\"/>\n                                            <outlet property=\"amountButton\" destination=\"Koj-wy-VOb\" id=\"ZXI-zr-0W6\"/>\n                                        </connections>\n                                    </tableViewCell>\n                                </prototypes>\n                            </tableView>\n                        </subviews>\n                        <color key=\"backgroundColor\" red=\"1\" green=\"1\" blue=\"1\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n                        <constraints>\n                            <constraint firstAttribute=\"trailingMargin\" secondItem=\"dbC-iF-8QI\" secondAttribute=\"trailing\" constant=\"-20\" id=\"9kr-fc-ubj\"/>\n                            <constraint firstItem=\"y0i-eb-0Ax\" firstAttribute=\"bottom\" secondItem=\"dbC-iF-8QI\" secondAttribute=\"bottom\" id=\"CBw-SZ-cqI\"/>\n                            <constraint firstItem=\"dbC-iF-8QI\" firstAttribute=\"top\" secondItem=\"Tb2-2M-YJm\" secondAttribute=\"topMargin\" id=\"Sdp-2d-neb\"/>\n                            <constraint firstItem=\"dbC-iF-8QI\" firstAttribute=\"leading\" secondItem=\"Tb2-2M-YJm\" secondAttribute=\"leadingMargin\" constant=\"-20\" id=\"rTv-72-zNV\"/>\n                        </constraints>\n                        <viewLayoutGuide key=\"safeArea\" id=\"y0i-eb-0Ax\"/>\n                    </view>\n                    <connections>\n                        <outlet property=\"addressListTableView\" destination=\"dbC-iF-8QI\" id=\"3Fj-2R-hbm\"/>\n                    </connections>\n                </viewController>\n                <placeholder placeholderIdentifier=\"IBFirstResponder\" id=\"IS4-sY-X0d\" userLabel=\"First Responder\" sceneMemberID=\"firstResponder\"/>\n            </objects>\n            <point key=\"canvasLocation\" x=\"1116\" y=\"2168\"/>\n        </scene>\n        <!--Navigation Controller-->\n        <scene sceneID=\"pPf-GT-C08\">\n            <objects>\n                <navigationController storyboardIdentifier=\"HelpNav\" id=\"Cbt-zr-0sQ\" sceneMemberID=\"viewController\">\n                    <navigationBar key=\"navigationBar\" contentMode=\"scaleToFill\" id=\"Oqf-nS-x9e\">\n                        <rect key=\"frame\" x=\"0.0\" y=\"20\" width=\"375\" height=\"44\"/>\n                        <autoresizingMask key=\"autoresizingMask\"/>\n                    </navigationBar>\n                    <connections>\n                        <segue destination=\"EMB-ss-dIf\" kind=\"relationship\" relationship=\"rootViewController\" id=\"5vQ-Nh-zqg\"/>\n                    </connections>\n                </navigationController>\n                <placeholder placeholderIdentifier=\"IBFirstResponder\" id=\"ktb-Xs-kKb\" userLabel=\"First Responder\" sceneMemberID=\"firstResponder\"/>\n            </objects>\n            <point key=\"canvasLocation\" x=\"-300\" y=\"2850\"/>\n        </scene>\n        <!--Navigation Controller-->\n        <scene sceneID=\"k7j-yJ-U9c\">\n            <objects>\n                <navigationController storyboardIdentifier=\"PreloadNav\" id=\"oXd-TO-3p4\" sceneMemberID=\"viewController\">\n                    <navigationBar key=\"navigationBar\" contentMode=\"scaleToFill\" id=\"FFg-oT-KDP\">\n                        <rect key=\"frame\" x=\"0.0\" y=\"20\" width=\"375\" height=\"44\"/>\n                        <autoresizingMask key=\"autoresizingMask\"/>\n                    </navigationBar>\n                    <connections>\n                        <segue destination=\"C8L-lL-MXR\" kind=\"relationship\" relationship=\"rootViewController\" id=\"Jqt-9J-zNO\"/>\n                    </connections>\n                </navigationController>\n                <placeholder placeholderIdentifier=\"IBFirstResponder\" id=\"eip-II-gT4\" userLabel=\"First Responder\" sceneMemberID=\"firstResponder\"/>\n            </objects>\n            <point key=\"canvasLocation\" x=\"-1701\" y=\"231\"/>\n        </scene>\n        <!--Preload View Controller-->\n        <scene sceneID=\"wUQ-2W-3bL\">\n            <objects>\n                <viewController id=\"C8L-lL-MXR\" customClass=\"TLPreloadViewController\" sceneMemberID=\"viewController\">\n                    <view key=\"view\" contentMode=\"scaleToFill\" id=\"UTz-R7-M7K\">\n                        <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"375\" height=\"667\"/>\n                        <autoresizingMask key=\"autoresizingMask\" widthSizable=\"YES\" heightSizable=\"YES\"/>\n                        <subviews>\n                            <view contentMode=\"scaleToFill\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"Fw4-PF-tr4\">\n                                <rect key=\"frame\" x=\"0.0\" y=\"64\" width=\"375\" height=\"603\"/>\n                                <subviews>\n                                    <activityIndicatorView opaque=\"NO\" contentMode=\"scaleToFill\" horizontalHuggingPriority=\"750\" verticalHuggingPriority=\"750\" style=\"whiteLarge\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"yTc-Vg-3qg\">\n                                        <rect key=\"frame\" x=\"169\" y=\"558\" width=\"37\" height=\"37\"/>\n                                    </activityIndicatorView>\n                                    <imageView userInteractionEnabled=\"NO\" contentMode=\"scaleAspectFit\" horizontalHuggingPriority=\"251\" verticalHuggingPriority=\"251\" image=\"1200X1200logo.png\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"J6D-zi-kKD\">\n                                        <rect key=\"frame\" x=\"40\" y=\"154\" width=\"295\" height=\"295\"/>\n                                        <constraints>\n                                            <constraint firstAttribute=\"width\" secondItem=\"J6D-zi-kKD\" secondAttribute=\"height\" multiplier=\"1:1\" id=\"q7o-iX-qSQ\"/>\n                                        </constraints>\n                                    </imageView>\n                                </subviews>\n                                <color key=\"backgroundColor\" red=\"1\" green=\"1\" blue=\"1\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n                                <constraints>\n                                    <constraint firstItem=\"J6D-zi-kKD\" firstAttribute=\"leading\" secondItem=\"Fw4-PF-tr4\" secondAttribute=\"leading\" id=\"0YJ-XA-tuK\"/>\n                                    <constraint firstItem=\"yTc-Vg-3qg\" firstAttribute=\"centerX\" secondItem=\"J6D-zi-kKD\" secondAttribute=\"centerX\" id=\"6vN-f8-OUl\"/>\n                                    <constraint firstItem=\"J6D-zi-kKD\" firstAttribute=\"top\" secondItem=\"Fw4-PF-tr4\" secondAttribute=\"top\" id=\"ETR-Eg-lkM\"/>\n                                    <constraint firstAttribute=\"bottom\" secondItem=\"J6D-zi-kKD\" secondAttribute=\"bottom\" id=\"Iez-kg-KA8\"/>\n                                    <constraint firstItem=\"yTc-Vg-3qg\" firstAttribute=\"bottom\" secondItem=\"Fw4-PF-tr4\" secondAttribute=\"bottomMargin\" id=\"Tqk-Dj-YAj\"/>\n                                    <constraint firstItem=\"J6D-zi-kKD\" firstAttribute=\"centerY\" secondItem=\"Fw4-PF-tr4\" secondAttribute=\"centerY\" id=\"UKx-U6-Ydb\"/>\n                                    <constraint firstItem=\"J6D-zi-kKD\" firstAttribute=\"centerX\" secondItem=\"yTc-Vg-3qg\" secondAttribute=\"centerX\" id=\"fTy-Fn-lmD\"/>\n                                    <constraint firstAttribute=\"trailing\" secondItem=\"J6D-zi-kKD\" secondAttribute=\"trailing\" id=\"hvc-fe-KFc\"/>\n                                    <constraint firstAttribute=\"trailing\" secondItem=\"J6D-zi-kKD\" secondAttribute=\"trailing\" constant=\"40\" id=\"jQt-Af-4cW\"/>\n                                    <constraint firstItem=\"J6D-zi-kKD\" firstAttribute=\"leading\" secondItem=\"Fw4-PF-tr4\" secondAttribute=\"leading\" constant=\"40\" id=\"rpS-mn-O0k\"/>\n                                </constraints>\n                                <variation key=\"default\">\n                                    <mask key=\"constraints\">\n                                        <exclude reference=\"0YJ-XA-tuK\"/>\n                                        <exclude reference=\"ETR-Eg-lkM\"/>\n                                        <exclude reference=\"Iez-kg-KA8\"/>\n                                        <exclude reference=\"hvc-fe-KFc\"/>\n                                        <exclude reference=\"6vN-f8-OUl\"/>\n                                    </mask>\n                                </variation>\n                            </view>\n                        </subviews>\n                        <color key=\"backgroundColor\" red=\"1\" green=\"1\" blue=\"1\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n                        <constraints>\n                            <constraint firstItem=\"poj-ul-LtC\" firstAttribute=\"bottom\" secondItem=\"Fw4-PF-tr4\" secondAttribute=\"bottom\" id=\"3va-ne-eRH\"/>\n                            <constraint firstItem=\"Fw4-PF-tr4\" firstAttribute=\"leading\" secondItem=\"UTz-R7-M7K\" secondAttribute=\"leadingMargin\" constant=\"-16\" id=\"8Eo-cb-HjR\"/>\n                            <constraint firstItem=\"Fw4-PF-tr4\" firstAttribute=\"top\" secondItem=\"UTz-R7-M7K\" secondAttribute=\"topMargin\" id=\"9w6-EC-GT2\"/>\n                            <constraint firstAttribute=\"trailingMargin\" secondItem=\"Fw4-PF-tr4\" secondAttribute=\"trailing\" constant=\"-16\" id=\"dEC-N4-buS\"/>\n                        </constraints>\n                        <viewLayoutGuide key=\"safeArea\" id=\"poj-ul-LtC\"/>\n                    </view>\n                    <navigationItem key=\"navigationItem\" id=\"2Xh-Uh-TIK\"/>\n                    <connections>\n                        <outlet property=\"backgroundImageView\" destination=\"J6D-zi-kKD\" id=\"oWD-Tl-m9x\"/>\n                        <outlet property=\"backgroundView\" destination=\"Fw4-PF-tr4\" id=\"C2L-Ey-0MJ\"/>\n                        <outlet property=\"walletLoadingActivityIndicatorView\" destination=\"yTc-Vg-3qg\" id=\"HVr-6z-te4\"/>\n                    </connections>\n                </viewController>\n                <placeholder placeholderIdentifier=\"IBFirstResponder\" id=\"OT8-o1-faJ\" userLabel=\"First Responder\" sceneMemberID=\"firstResponder\"/>\n            </objects>\n            <point key=\"canvasLocation\" x=\"-1006\" y=\"215\"/>\n        </scene>\n        <!--Help-->\n        <scene sceneID=\"wlN-qB-9Nx\">\n            <objects>\n                <viewController storyboardIdentifier=\"Help\" id=\"EMB-ss-dIf\" customClass=\"TLHelpViewController\" sceneMemberID=\"viewController\">\n                    <view key=\"view\" contentMode=\"scaleToFill\" id=\"ix1-Zv-355\">\n                        <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"375\" height=\"667\"/>\n                        <autoresizingMask key=\"autoresizingMask\" widthSizable=\"YES\" heightSizable=\"YES\"/>\n                        <subviews>\n                            <tableView clipsSubviews=\"YES\" contentMode=\"scaleToFill\" alwaysBounceVertical=\"YES\" dataMode=\"prototypes\" style=\"grouped\" separatorStyle=\"default\" rowHeight=\"44\" sectionHeaderHeight=\"10\" sectionFooterHeight=\"10\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"KAB-6n-WOj\">\n                                <rect key=\"frame\" x=\"-4\" y=\"64\" width=\"383\" height=\"603\"/>\n                                <color key=\"backgroundColor\" red=\"0.93725490196078431\" green=\"0.93725490196078431\" blue=\"0.95686274509803926\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n                                <prototypes>\n                                    <tableViewCell contentMode=\"scaleToFill\" selectionStyle=\"default\" accessoryType=\"disclosureIndicator\" indentationWidth=\"10\" reuseIdentifier=\"HowToCellIdentifier\" id=\"Am4-8X-AGA\">\n                                        <rect key=\"frame\" x=\"0.0\" y=\"55.5\" width=\"383\" height=\"44\"/>\n                                        <autoresizingMask key=\"autoresizingMask\"/>\n                                        <tableViewCellContentView key=\"contentView\" opaque=\"NO\" clipsSubviews=\"YES\" multipleTouchEnabled=\"YES\" contentMode=\"center\" tableViewCell=\"Am4-8X-AGA\" id=\"xS9-eV-erc\">\n                                            <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"350\" height=\"43.5\"/>\n                                            <autoresizingMask key=\"autoresizingMask\"/>\n                                        </tableViewCellContentView>\n                                    </tableViewCell>\n                                </prototypes>\n                            </tableView>\n                        </subviews>\n                        <color key=\"backgroundColor\" red=\"1\" green=\"1\" blue=\"1\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n                        <constraints>\n                            <constraint firstAttribute=\"trailingMargin\" secondItem=\"KAB-6n-WOj\" secondAttribute=\"trailing\" constant=\"-20\" id=\"ggL-Yt-38S\"/>\n                            <constraint firstItem=\"KAB-6n-WOj\" firstAttribute=\"leading\" secondItem=\"ix1-Zv-355\" secondAttribute=\"leadingMargin\" constant=\"-20\" id=\"t5Y-UK-YVE\"/>\n                            <constraint firstItem=\"JMR-1u-hWv\" firstAttribute=\"bottom\" secondItem=\"KAB-6n-WOj\" secondAttribute=\"bottom\" id=\"uWc-Ds-Lgy\"/>\n                            <constraint firstItem=\"KAB-6n-WOj\" firstAttribute=\"top\" secondItem=\"ix1-Zv-355\" secondAttribute=\"topMargin\" id=\"vgl-Vr-UTW\"/>\n                        </constraints>\n                        <viewLayoutGuide key=\"safeArea\" id=\"JMR-1u-hWv\"/>\n                    </view>\n                    <navigationItem key=\"navigationItem\" title=\"Help\" id=\"m13-Co-pa3\">\n                        <barButtonItem key=\"leftBarButtonItem\" image=\"list.png\" id=\"uDe-E1-dfF\">\n                            <connections>\n                                <action selector=\"menuButtonClicked:\" destination=\"EMB-ss-dIf\" id=\"9SL-Bg-yEw\"/>\n                            </connections>\n                        </barButtonItem>\n                    </navigationItem>\n                    <connections>\n                        <outlet property=\"howToInstructionsTableView\" destination=\"KAB-6n-WOj\" id=\"Zs1-0p-wbO\"/>\n                        <segue destination=\"tVq-GB-YI6\" kind=\"show\" identifier=\"SegueAchievements\" id=\"cK5-dk-PDP\"/>\n                        <segue destination=\"gO0-zP-PAR\" kind=\"show\" identifier=\"SegueInstructions\" id=\"qIt-ON-i2p\"/>\n                        <segue destination=\"2ys-DS-bOJ\" kind=\"show\" identifier=\"SegueText\" id=\"0LY-M5-xbe\"/>\n                    </connections>\n                </viewController>\n                <placeholder placeholderIdentifier=\"IBFirstResponder\" id=\"PDo-Ol-pkX\" userLabel=\"First Responder\" sceneMemberID=\"firstResponder\"/>\n            </objects>\n            <point key=\"canvasLocation\" x=\"456\" y=\"2850\"/>\n        </scene>\n        <!--Achievements View Controller-->\n        <scene sceneID=\"yMB-0I-kxY\">\n            <objects>\n                <viewController storyboardIdentifier=\"Achievements\" id=\"tVq-GB-YI6\" customClass=\"TLAchievementsViewController\" sceneMemberID=\"viewController\">\n                    <view key=\"view\" contentMode=\"scaleToFill\" id=\"nXC-cy-Dm2\">\n                        <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"375\" height=\"667\"/>\n                        <autoresizingMask key=\"autoresizingMask\" widthSizable=\"YES\" heightSizable=\"YES\"/>\n                        <subviews>\n                            <tableView clipsSubviews=\"YES\" contentMode=\"scaleToFill\" alwaysBounceVertical=\"YES\" dataMode=\"prototypes\" style=\"grouped\" separatorStyle=\"default\" allowsSelection=\"NO\" rowHeight=\"44\" sectionHeaderHeight=\"10\" sectionFooterHeight=\"10\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"Ni8-ZB-yBY\">\n                                <rect key=\"frame\" x=\"-4\" y=\"64\" width=\"383\" height=\"603\"/>\n                                <color key=\"backgroundColor\" red=\"0.93725490196078431\" green=\"0.93725490196078431\" blue=\"0.95686274509803926\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n                            </tableView>\n                        </subviews>\n                        <color key=\"backgroundColor\" red=\"1\" green=\"1\" blue=\"1\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n                        <constraints>\n                            <constraint firstItem=\"Ni8-ZB-yBY\" firstAttribute=\"top\" secondItem=\"nXC-cy-Dm2\" secondAttribute=\"topMargin\" id=\"Fdj-CV-618\"/>\n                            <constraint firstItem=\"7Xs-o1-96c\" firstAttribute=\"bottom\" secondItem=\"Ni8-ZB-yBY\" secondAttribute=\"bottom\" id=\"Flf-Hw-zqS\"/>\n                            <constraint firstAttribute=\"trailingMargin\" secondItem=\"Ni8-ZB-yBY\" secondAttribute=\"trailing\" constant=\"-20\" id=\"H6q-t5-Xsh\"/>\n                            <constraint firstItem=\"Ni8-ZB-yBY\" firstAttribute=\"leading\" secondItem=\"nXC-cy-Dm2\" secondAttribute=\"leadingMargin\" constant=\"-20\" id=\"UoN-2i-vyP\"/>\n                        </constraints>\n                        <viewLayoutGuide key=\"safeArea\" id=\"7Xs-o1-96c\"/>\n                    </view>\n                    <connections>\n                        <outlet property=\"howToInstructionsTableView\" destination=\"Ni8-ZB-yBY\" id=\"Zch-WK-eF1\"/>\n                    </connections>\n                </viewController>\n                <placeholder placeholderIdentifier=\"IBFirstResponder\" id=\"H7I-Jv-oQk\" userLabel=\"First Responder\" sceneMemberID=\"firstResponder\"/>\n            </objects>\n            <point key=\"canvasLocation\" x=\"1116\" y=\"2850\"/>\n        </scene>\n        <!--Restore Wallet View Controller-->\n        <scene sceneID=\"FF9-zK-YcY\">\n            <objects>\n                <viewController storyboardIdentifier=\"EnterMnemonic\" id=\"AIZ-GL-gsh\" customClass=\"TLRestoreWalletViewController\" sceneMemberID=\"viewController\">\n                    <view key=\"view\" contentMode=\"scaleToFill\" id=\"WzD-8J-vGc\">\n                        <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"375\" height=\"667\"/>\n                        <autoresizingMask key=\"autoresizingMask\" widthSizable=\"YES\" heightSizable=\"YES\"/>\n                        <subviews>\n                            <view contentMode=\"scaleToFill\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"TKr-WK-HrH\">\n                                <rect key=\"frame\" x=\"-4\" y=\"64\" width=\"383\" height=\"603\"/>\n                                <color key=\"backgroundColor\" red=\"1\" green=\"1\" blue=\"1\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n                            </view>\n                            <label opaque=\"NO\" userInteractionEnabled=\"NO\" contentMode=\"left\" horizontalHuggingPriority=\"251\" verticalHuggingPriority=\"251\" text=\"Enter a wallet backup passphrase to wipe the current wallet and start/restore another.\" lineBreakMode=\"tailTruncation\" numberOfLines=\"5\" baselineAdjustment=\"alignBaselines\" adjustsFontSizeToFit=\"NO\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"End-6K-7BJ\">\n                                <rect key=\"frame\" x=\"16\" y=\"64\" width=\"343\" height=\"64\"/>\n                                <constraints>\n                                    <constraint firstAttribute=\"height\" constant=\"64\" id=\"wm8-qJ-sUy\"/>\n                                </constraints>\n                                <fontDescription key=\"fontDescription\" type=\"system\" pointSize=\"17\"/>\n                                <color key=\"textColor\" red=\"0.0\" green=\"0.0\" blue=\"0.0\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n                                <nil key=\"highlightedColor\"/>\n                            </label>\n                            <navigationBar contentMode=\"scaleToFill\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"C86-HO-o7D\">\n                                <rect key=\"frame\" x=\"0.0\" y=\"20\" width=\"375\" height=\"44\"/>\n                                <color key=\"barTintColor\" red=\"1\" green=\"1\" blue=\"1\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n                                <items>\n                                    <navigationItem title=\"Restore Wallet\" id=\"4al-pX-1Gn\">\n                                        <barButtonItem key=\"leftBarButtonItem\" systemItem=\"cancel\" id=\"vpN-uZ-rfd\">\n                                            <connections>\n                                                <action selector=\"cancel:\" destination=\"AIZ-GL-gsh\" id=\"H5j-W5-xrc\"/>\n                                            </connections>\n                                        </barButtonItem>\n                                    </navigationItem>\n                                </items>\n                            </navigationBar>\n                            <textView clipsSubviews=\"YES\" multipleTouchEnabled=\"YES\" contentMode=\"scaleToFill\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"3gz-BW-2FW\">\n                                <rect key=\"frame\" x=\"16\" y=\"136\" width=\"343\" height=\"511\"/>\n                                <color key=\"backgroundColor\" red=\"0.062279825470000001\" green=\"1\" blue=\"0.22195490649999999\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n                                <fontDescription key=\"fontDescription\" type=\"system\" pointSize=\"22\"/>\n                                <textInputTraits key=\"textInputTraits\" secureTextEntry=\"YES\"/>\n                                <userDefinedRuntimeAttributes>\n                                    <userDefinedRuntimeAttribute type=\"string\" keyPath=\"layer.cornerRadius\" value=\"5\"/>\n                                </userDefinedRuntimeAttributes>\n                            </textView>\n                        </subviews>\n                        <color key=\"backgroundColor\" red=\"1\" green=\"1\" blue=\"1\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n                        <constraints>\n                            <constraint firstItem=\"3gz-BW-2FW\" firstAttribute=\"top\" secondItem=\"End-6K-7BJ\" secondAttribute=\"bottom\" constant=\"8\" id=\"4S4-ad-IOs\"/>\n                            <constraint firstItem=\"End-6K-7BJ\" firstAttribute=\"top\" secondItem=\"C86-HO-o7D\" secondAttribute=\"bottom\" id=\"8QH-Sg-2VS\"/>\n                            <constraint firstItem=\"End-6K-7BJ\" firstAttribute=\"leading\" secondItem=\"WzD-8J-vGc\" secondAttribute=\"leadingMargin\" id=\"BJ2-XD-hHQ\"/>\n                            <constraint firstItem=\"End-6K-7BJ\" firstAttribute=\"leading\" secondItem=\"WzD-8J-vGc\" secondAttribute=\"leadingMargin\" id=\"Ldy-T4-NZ3\"/>\n                            <constraint firstItem=\"lTX-43-mDu\" firstAttribute=\"bottom\" secondItem=\"TKr-WK-HrH\" secondAttribute=\"bottom\" id=\"OHH-D9-NXU\"/>\n                            <constraint firstItem=\"C86-HO-o7D\" firstAttribute=\"top\" secondItem=\"lTX-43-mDu\" secondAttribute=\"top\" id=\"Ozf-FN-Qad\"/>\n                            <constraint firstItem=\"End-6K-7BJ\" firstAttribute=\"trailing\" secondItem=\"WzD-8J-vGc\" secondAttribute=\"trailingMargin\" id=\"Q8m-cW-JlS\"/>\n                            <constraint firstAttribute=\"trailingMargin\" secondItem=\"C86-HO-o7D\" secondAttribute=\"trailing\" constant=\"-16\" id=\"QJ7-Sq-SQR\"/>\n                            <constraint firstAttribute=\"trailingMargin\" secondItem=\"TKr-WK-HrH\" secondAttribute=\"trailing\" constant=\"-20\" id=\"cU3-fT-hrl\"/>\n                            <constraint firstItem=\"End-6K-7BJ\" firstAttribute=\"centerX\" secondItem=\"C86-HO-o7D\" secondAttribute=\"centerX\" id=\"fOa-ab-t4S\"/>\n                            <constraint firstItem=\"TKr-WK-HrH\" firstAttribute=\"leading\" secondItem=\"WzD-8J-vGc\" secondAttribute=\"leadingMargin\" constant=\"-20\" id=\"hMC-LZ-hRd\"/>\n                            <constraint firstItem=\"lTX-43-mDu\" firstAttribute=\"bottom\" secondItem=\"3gz-BW-2FW\" secondAttribute=\"bottom\" constant=\"20\" id=\"nF4-cD-x28\"/>\n                            <constraint firstItem=\"TKr-WK-HrH\" firstAttribute=\"top\" secondItem=\"C86-HO-o7D\" secondAttribute=\"bottom\" id=\"nva-76-N9I\"/>\n                            <constraint firstItem=\"3gz-BW-2FW\" firstAttribute=\"trailing\" secondItem=\"WzD-8J-vGc\" secondAttribute=\"trailingMargin\" id=\"taE-Kb-UEa\"/>\n                            <constraint firstItem=\"3gz-BW-2FW\" firstAttribute=\"leading\" secondItem=\"WzD-8J-vGc\" secondAttribute=\"leadingMargin\" id=\"xEw-hJ-qu8\"/>\n                            <constraint firstItem=\"C86-HO-o7D\" firstAttribute=\"leading\" secondItem=\"WzD-8J-vGc\" secondAttribute=\"leadingMargin\" constant=\"-16\" id=\"z6o-aW-aKJ\"/>\n                        </constraints>\n                        <viewLayoutGuide key=\"safeArea\" id=\"lTX-43-mDu\"/>\n                    </view>\n                    <connections>\n                        <outlet property=\"inputMnemonicTextView\" destination=\"3gz-BW-2FW\" id=\"0SP-JC-DeI\"/>\n                        <outlet property=\"navigationBar\" destination=\"C86-HO-o7D\" id=\"58b-D5-Gxs\"/>\n                        <outlet property=\"restoreWalletDescriptionLabel\" destination=\"End-6K-7BJ\" id=\"AYS-9Z-ObQ\"/>\n                    </connections>\n                </viewController>\n                <placeholder placeholderIdentifier=\"IBFirstResponder\" id=\"MI3-xB-tmk\" userLabel=\"First Responder\" sceneMemberID=\"firstResponder\"/>\n            </objects>\n            <point key=\"canvasLocation\" x=\"1153\" y=\"807\"/>\n        </scene>\n        <!--Navigation Controller-->\n        <scene sceneID=\"oCF-cD-nt3\">\n            <objects>\n                <navigationController storyboardIdentifier=\"HistoryNav\" id=\"HN9-RH-tnr\" sceneMemberID=\"viewController\">\n                    <navigationBar key=\"navigationBar\" contentMode=\"scaleToFill\" id=\"1N8-Ta-AXz\">\n                        <rect key=\"frame\" x=\"0.0\" y=\"20\" width=\"375\" height=\"44\"/>\n                        <autoresizingMask key=\"autoresizingMask\"/>\n                    </navigationBar>\n                    <connections>\n                        <segue destination=\"KFU-CX-7uI\" kind=\"relationship\" relationship=\"rootViewController\" id=\"MGh-kO-IES\"/>\n                    </connections>\n                </navigationController>\n                <placeholder placeholderIdentifier=\"IBFirstResponder\" id=\"7Y7-1f-7cD\" userLabel=\"First Responder\" sceneMemberID=\"firstResponder\"/>\n            </objects>\n            <point key=\"canvasLocation\" x=\"-300\" y=\"1519\"/>\n        </scene>\n        <!--History-->\n        <scene sceneID=\"4ZL-hC-fPk\">\n            <objects>\n                <viewController storyboardIdentifier=\"History\" id=\"KFU-CX-7uI\" customClass=\"TLHistoryViewController\" sceneMemberID=\"viewController\">\n                    <view key=\"view\" contentMode=\"scaleToFill\" id=\"hN2-a6-SWn\">\n                        <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"375\" height=\"667\"/>\n                        <autoresizingMask key=\"autoresizingMask\" widthSizable=\"YES\" heightSizable=\"YES\"/>\n                        <subviews>\n                            <view contentMode=\"scaleToFill\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"PSv-oQ-2fb\">\n                                <rect key=\"frame\" x=\"-4\" y=\"64\" width=\"383\" height=\"76\"/>\n                                <color key=\"backgroundColor\" red=\"0.93725490196078431\" green=\"0.93725490196078431\" blue=\"0.95686274509803926\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n                            </view>\n                            <label opaque=\"NO\" userInteractionEnabled=\"NO\" contentMode=\"left\" horizontalHuggingPriority=\"251\" verticalHuggingPriority=\"251\" text=\"From:\" lineBreakMode=\"tailTruncation\" baselineAdjustment=\"alignBaselines\" adjustsFontSizeToFit=\"NO\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"yUe-8I-uLU\">\n                                <rect key=\"frame\" x=\"8\" y=\"64\" width=\"44\" height=\"20.5\"/>\n                                <fontDescription key=\"fontDescription\" type=\"system\" pointSize=\"17\"/>\n                                <color key=\"textColor\" red=\"0.0\" green=\"0.0\" blue=\"0.0\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n                                <nil key=\"highlightedColor\"/>\n                            </label>\n                            <view contentMode=\"scaleToFill\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"CHZ-nO-cIl\" customClass=\"UIButton\">\n                                <rect key=\"frame\" x=\"8\" y=\"92\" width=\"359\" height=\"40\"/>\n                                <subviews>\n                                    <label opaque=\"NO\" userInteractionEnabled=\"NO\" contentMode=\"left\" horizontalHuggingPriority=\"251\" verticalHuggingPriority=\"251\" text=\"Label\" textAlignment=\"right\" lineBreakMode=\"tailTruncation\" baselineAdjustment=\"alignBaselines\" adjustsFontSizeToFit=\"NO\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"i0i-6T-FsV\">\n                                        <rect key=\"frame\" x=\"256.5\" y=\"0.0\" width=\"44.5\" height=\"40\"/>\n                                        <constraints>\n                                            <constraint firstAttribute=\"width\" relation=\"greaterThanOrEqual\" priority=\"750\" constant=\"42\" id=\"Hd4-dF-BzA\"/>\n                                        </constraints>\n                                        <fontDescription key=\"fontDescription\" type=\"boldSystem\" pointSize=\"17\"/>\n                                        <color key=\"textColor\" red=\"0.0\" green=\"0.0\" blue=\"0.0\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n                                        <nil key=\"highlightedColor\"/>\n                                    </label>\n                                    <activityIndicatorView opaque=\"NO\" contentMode=\"scaleToFill\" horizontalHuggingPriority=\"750\" verticalHuggingPriority=\"750\" style=\"gray\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"RKH-ZO-wU1\">\n                                        <rect key=\"frame\" x=\"228.5\" y=\"8\" width=\"20\" height=\"20\"/>\n                                    </activityIndicatorView>\n                                    <imageView userInteractionEnabled=\"NO\" contentMode=\"scaleToFill\" horizontalHuggingPriority=\"251\" verticalHuggingPriority=\"251\" image=\"arrow-right7.png\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"SFw-tL-fqg\">\n                                        <rect key=\"frame\" x=\"314\" y=\"0.0\" width=\"45\" height=\"40\"/>\n                                    </imageView>\n                                    <label opaque=\"NO\" userInteractionEnabled=\"NO\" contentMode=\"left\" horizontalHuggingPriority=\"251\" verticalHuggingPriority=\"251\" text=\"Account Name\" lineBreakMode=\"tailTruncation\" baselineAdjustment=\"alignBaselines\" adjustsFontSizeToFit=\"NO\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"GKZ-gr-jad\">\n                                        <rect key=\"frame\" x=\"8\" y=\"0.0\" width=\"83\" height=\"40\"/>\n                                        <constraints>\n                                            <constraint firstAttribute=\"width\" relation=\"lessThanOrEqual\" priority=\"250\" constant=\"440\" id=\"M6f-Lz-mrk\"/>\n                                            <constraint firstAttribute=\"width\" constant=\"240\" id=\"cgw-FX-yr5\"/>\n                                        </constraints>\n                                        <fontDescription key=\"fontDescription\" type=\"system\" pointSize=\"12\"/>\n                                        <color key=\"textColor\" red=\"0.0\" green=\"0.0\" blue=\"0.0\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n                                        <nil key=\"highlightedColor\"/>\n                                        <variation key=\"default\">\n                                            <mask key=\"constraints\">\n                                                <exclude reference=\"cgw-FX-yr5\"/>\n                                            </mask>\n                                        </variation>\n                                    </label>\n                                </subviews>\n                                <color key=\"backgroundColor\" red=\"0.99146699279999995\" green=\"1\" blue=\"0.21020077370000001\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n                                <gestureRecognizers/>\n                                <constraints>\n                                    <constraint firstItem=\"GKZ-gr-jad\" firstAttribute=\"baseline\" secondItem=\"i0i-6T-FsV\" secondAttribute=\"baseline\" id=\"0zZ-LX-8Nc\"/>\n                                    <constraint firstItem=\"GKZ-gr-jad\" firstAttribute=\"top\" secondItem=\"CHZ-nO-cIl\" secondAttribute=\"top\" id=\"1OH-M2-UVN\"/>\n                                    <constraint firstItem=\"SFw-tL-fqg\" firstAttribute=\"top\" secondItem=\"i0i-6T-FsV\" secondAttribute=\"top\" id=\"4hI-6J-O1S\"/>\n                                    <constraint firstItem=\"GKZ-gr-jad\" firstAttribute=\"leading\" secondItem=\"CHZ-nO-cIl\" secondAttribute=\"leading\" constant=\"8\" id=\"6bn-30-R6H\"/>\n                                    <constraint firstItem=\"GKZ-gr-jad\" firstAttribute=\"top\" secondItem=\"CHZ-nO-cIl\" secondAttribute=\"top\" id=\"6rh-Me-w9K\"/>\n                                    <constraint firstItem=\"SFw-tL-fqg\" firstAttribute=\"leading\" secondItem=\"i0i-6T-FsV\" secondAttribute=\"trailing\" constant=\"13\" id=\"75v-wc-Vkp\"/>\n                                    <constraint firstItem=\"GKZ-gr-jad\" firstAttribute=\"centerY\" secondItem=\"RKH-ZO-wU1\" secondAttribute=\"centerY\" id=\"8Is-bC-0dJ\"/>\n                                    <constraint firstItem=\"GKZ-gr-jad\" firstAttribute=\"top\" secondItem=\"SFw-tL-fqg\" secondAttribute=\"top\" id=\"9kj-Ty-occ\"/>\n                                    <constraint firstItem=\"GKZ-gr-jad\" firstAttribute=\"centerY\" secondItem=\"SFw-tL-fqg\" secondAttribute=\"centerY\" id=\"FOx-Dd-ma9\"/>\n                                    <constraint firstAttribute=\"bottom\" secondItem=\"i0i-6T-FsV\" secondAttribute=\"bottom\" id=\"GFb-LB-m34\"/>\n                                    <constraint firstItem=\"GKZ-gr-jad\" firstAttribute=\"leading\" secondItem=\"CHZ-nO-cIl\" secondAttribute=\"leading\" id=\"GOK-sQ-0nT\"/>\n                                    <constraint firstItem=\"RKH-ZO-wU1\" firstAttribute=\"leading\" secondItem=\"i0i-6T-FsV\" secondAttribute=\"trailing\" constant=\"8\" id=\"IBz-NV-wEp\"/>\n                                    <constraint firstAttribute=\"trailing\" secondItem=\"i0i-6T-FsV\" secondAttribute=\"trailing\" constant=\"98\" id=\"Ib6-Gm-r2R\"/>\n                                    <constraint firstItem=\"SFw-tL-fqg\" firstAttribute=\"leading\" secondItem=\"RKH-ZO-wU1\" secondAttribute=\"trailing\" constant=\"8\" id=\"LH5-vY-c88\"/>\n                                    <constraint firstAttribute=\"bottom\" secondItem=\"RKH-ZO-wU1\" secondAttribute=\"bottom\" constant=\"12\" id=\"Ll9-6o-Wc6\"/>\n                                    <constraint firstItem=\"RKH-ZO-wU1\" firstAttribute=\"leading\" relation=\"greaterThanOrEqual\" secondItem=\"GKZ-gr-jad\" secondAttribute=\"trailing\" constant=\"8\" id=\"Lmt-KH-TUL\"/>\n                                    <constraint firstItem=\"GKZ-gr-jad\" firstAttribute=\"top\" secondItem=\"CHZ-nO-cIl\" secondAttribute=\"top\" id=\"PBx-iR-2aE\"/>\n                                    <constraint firstItem=\"GKZ-gr-jad\" firstAttribute=\"firstBaseline\" secondItem=\"i0i-6T-FsV\" secondAttribute=\"firstBaseline\" id=\"Q5U-l2-HMQ\"/>\n                                    <constraint firstItem=\"SFw-tL-fqg\" firstAttribute=\"bottom\" secondItem=\"i0i-6T-FsV\" secondAttribute=\"bottom\" id=\"Udz-9S-2mA\"/>\n                                    <constraint firstItem=\"i0i-6T-FsV\" firstAttribute=\"leading\" secondItem=\"GKZ-gr-jad\" secondAttribute=\"trailing\" constant=\"8\" id=\"Wpf-Sn-Hqt\"/>\n                                    <constraint firstItem=\"i0i-6T-FsV\" firstAttribute=\"leading\" secondItem=\"RKH-ZO-wU1\" secondAttribute=\"trailing\" constant=\"8\" id=\"Z4S-L3-a9L\"/>\n                                    <constraint firstItem=\"GKZ-gr-jad\" firstAttribute=\"bottom\" secondItem=\"SFw-tL-fqg\" secondAttribute=\"bottom\" id=\"c7K-RU-NDd\"/>\n                                    <constraint firstItem=\"SFw-tL-fqg\" firstAttribute=\"centerY\" secondItem=\"RKH-ZO-wU1\" secondAttribute=\"centerY\" id=\"eDG-jU-te8\"/>\n                                    <constraint firstItem=\"i0i-6T-FsV\" firstAttribute=\"top\" secondItem=\"CHZ-nO-cIl\" secondAttribute=\"top\" id=\"eeY-FF-1n5\"/>\n                                    <constraint firstAttribute=\"trailing\" secondItem=\"SFw-tL-fqg\" secondAttribute=\"trailing\" id=\"epp-HR-RHs\"/>\n                                    <constraint firstItem=\"RKH-ZO-wU1\" firstAttribute=\"top\" secondItem=\"CHZ-nO-cIl\" secondAttribute=\"top\" constant=\"8\" id=\"g9w-NQ-PWj\"/>\n                                    <constraint firstAttribute=\"bottom\" secondItem=\"GKZ-gr-jad\" secondAttribute=\"bottom\" id=\"k5R-hu-gcv\"/>\n                                    <constraint firstItem=\"GKZ-gr-jad\" firstAttribute=\"top\" secondItem=\"CHZ-nO-cIl\" secondAttribute=\"top\" id=\"kLL-GU-LGb\"/>\n                                    <constraint firstItem=\"GKZ-gr-jad\" firstAttribute=\"leading\" secondItem=\"CHZ-nO-cIl\" secondAttribute=\"leading\" id=\"kdh-sk-6PX\"/>\n                                    <constraint firstItem=\"GKZ-gr-jad\" firstAttribute=\"leading\" secondItem=\"CHZ-nO-cIl\" secondAttribute=\"leading\" id=\"khw-sP-x40\"/>\n                                    <constraint firstItem=\"GKZ-gr-jad\" firstAttribute=\"bottom\" secondItem=\"i0i-6T-FsV\" secondAttribute=\"bottom\" id=\"l0g-dS-GTq\"/>\n                                    <constraint firstAttribute=\"trailing\" secondItem=\"i0i-6T-FsV\" secondAttribute=\"trailing\" constant=\"58\" id=\"ojh-Ig-chH\"/>\n                                    <constraint firstItem=\"GKZ-gr-jad\" firstAttribute=\"top\" secondItem=\"i0i-6T-FsV\" secondAttribute=\"top\" id=\"tFw-yQ-9xx\"/>\n                                    <constraint firstAttribute=\"trailing\" secondItem=\"RKH-ZO-wU1\" secondAttribute=\"trailing\" constant=\"70\" id=\"urQ-em-u2Y\"/>\n                                    <constraint firstAttribute=\"trailing\" secondItem=\"i0i-6T-FsV\" secondAttribute=\"trailing\" constant=\"98\" id=\"vPd-Es-fHh\"/>\n                                    <constraint firstAttribute=\"bottom\" secondItem=\"GKZ-gr-jad\" secondAttribute=\"bottom\" id=\"vwJ-Ub-0A5\"/>\n                                </constraints>\n                                <userDefinedRuntimeAttributes>\n                                    <userDefinedRuntimeAttribute type=\"string\" keyPath=\"layer.cornerRadius\" value=\"5\"/>\n                                </userDefinedRuntimeAttributes>\n                                <variation key=\"default\">\n                                    <mask key=\"constraints\">\n                                        <exclude reference=\"0zZ-LX-8Nc\"/>\n                                        <exclude reference=\"1OH-M2-UVN\"/>\n                                        <exclude reference=\"6rh-Me-w9K\"/>\n                                        <exclude reference=\"8Is-bC-0dJ\"/>\n                                        <exclude reference=\"9kj-Ty-occ\"/>\n                                        <exclude reference=\"FOx-Dd-ma9\"/>\n                                        <exclude reference=\"GOK-sQ-0nT\"/>\n                                        <exclude reference=\"Q5U-l2-HMQ\"/>\n                                        <exclude reference=\"c7K-RU-NDd\"/>\n                                        <exclude reference=\"kLL-GU-LGb\"/>\n                                        <exclude reference=\"kdh-sk-6PX\"/>\n                                        <exclude reference=\"khw-sP-x40\"/>\n                                        <exclude reference=\"l0g-dS-GTq\"/>\n                                        <exclude reference=\"tFw-yQ-9xx\"/>\n                                        <exclude reference=\"vwJ-Ub-0A5\"/>\n                                        <exclude reference=\"IBz-NV-wEp\"/>\n                                        <exclude reference=\"urQ-em-u2Y\"/>\n                                        <exclude reference=\"Ib6-Gm-r2R\"/>\n                                        <exclude reference=\"Wpf-Sn-Hqt\"/>\n                                        <exclude reference=\"vPd-Es-fHh\"/>\n                                        <exclude reference=\"LH5-vY-c88\"/>\n                                        <exclude reference=\"eDG-jU-te8\"/>\n                                    </mask>\n                                </variation>\n                                <connections>\n                                    <outletCollection property=\"gestureRecognizers\" destination=\"2x7-5L-qhZ\" appends=\"YES\" id=\"OVJ-js-SHV\"/>\n                                </connections>\n                            </view>\n                            <view contentMode=\"scaleToFill\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"r7j-US-yi8\">\n                                <rect key=\"frame\" x=\"0.0\" y=\"140\" width=\"375\" height=\"527\"/>\n                                <color key=\"backgroundColor\" red=\"1\" green=\"1\" blue=\"1\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n                            </view>\n                            <tableView clipsSubviews=\"YES\" contentMode=\"scaleToFill\" alwaysBounceVertical=\"YES\" dataMode=\"prototypes\" style=\"plain\" separatorStyle=\"default\" rowHeight=\"105\" sectionHeaderHeight=\"22\" sectionFooterHeight=\"22\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"Dcx-1i-gkH\">\n                                <rect key=\"frame\" x=\"-4\" y=\"140\" width=\"383\" height=\"527\"/>\n                                <color key=\"backgroundColor\" red=\"1\" green=\"1\" blue=\"1\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n                                <prototypes>\n                                    <tableViewCell contentMode=\"scaleToFill\" selectionStyle=\"default\" indentationWidth=\"10\" reuseIdentifier=\"TransactionCellIdentifier\" rowHeight=\"105\" id=\"jqH-vD-QNO\" customClass=\"TLTransactionTableViewCell\">\n                                        <rect key=\"frame\" x=\"0.0\" y=\"22\" width=\"383\" height=\"105\"/>\n                                        <autoresizingMask key=\"autoresizingMask\"/>\n                                        <tableViewCellContentView key=\"contentView\" opaque=\"NO\" clipsSubviews=\"YES\" multipleTouchEnabled=\"YES\" contentMode=\"center\" tableViewCell=\"jqH-vD-QNO\" id=\"YAA-Lk-eXe\">\n                                            <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"383\" height=\"104.5\"/>\n                                            <autoresizingMask key=\"autoresizingMask\"/>\n                                            <subviews>\n                                                <label opaque=\"NO\" userInteractionEnabled=\"NO\" contentMode=\"left\" horizontalHuggingPriority=\"251\" verticalHuggingPriority=\"251\" text=\"date\" lineBreakMode=\"tailTruncation\" baselineAdjustment=\"alignBaselines\" adjustsFontSizeToFit=\"NO\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"RAj-d0-yzE\">\n                                                    <rect key=\"frame\" x=\"8\" y=\"8\" width=\"359\" height=\"21\"/>\n                                                    <fontDescription key=\"fontDescription\" type=\"system\" pointSize=\"17\"/>\n                                                    <color key=\"textColor\" red=\"0.0\" green=\"0.0\" blue=\"0.0\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n                                                    <nil key=\"highlightedColor\"/>\n                                                </label>\n                                                <label opaque=\"NO\" userInteractionEnabled=\"NO\" contentMode=\"left\" horizontalHuggingPriority=\"251\" verticalHuggingPriority=\"249\" text=\"description\" lineBreakMode=\"tailTruncation\" baselineAdjustment=\"alignBaselines\" adjustsFontSizeToFit=\"NO\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"HDn-9v-o1a\">\n                                                    <rect key=\"frame\" x=\"8\" y=\"75\" width=\"359\" height=\"22\"/>\n                                                    <fontDescription key=\"fontDescription\" type=\"system\" pointSize=\"17\"/>\n                                                    <color key=\"textColor\" red=\"0.0\" green=\"0.0\" blue=\"0.0\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n                                                    <nil key=\"highlightedColor\"/>\n                                                </label>\n                                                <label opaque=\"NO\" userInteractionEnabled=\"NO\" contentMode=\"left\" horizontalHuggingPriority=\"251\" verticalHuggingPriority=\"251\" text=\"100 Confimations\" textAlignment=\"center\" lineBreakMode=\"tailTruncation\" baselineAdjustment=\"alignBaselines\" adjustsFontSizeToFit=\"NO\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"Lf7-5m-ufO\">\n                                                    <rect key=\"frame\" x=\"8\" y=\"37\" width=\"175.5\" height=\"30\"/>\n                                                    <color key=\"backgroundColor\" red=\"0.062279825470000001\" green=\"1\" blue=\"0.22195490649999999\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n                                                    <fontDescription key=\"fontDescription\" type=\"boldSystem\" pointSize=\"17\"/>\n                                                    <color key=\"textColor\" red=\"1\" green=\"1\" blue=\"1\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n                                                    <nil key=\"highlightedColor\"/>\n                                                    <userDefinedRuntimeAttributes>\n                                                        <userDefinedRuntimeAttribute type=\"string\" keyPath=\"layer.cornerRadius\" value=\"5\"/>\n                                                        <userDefinedRuntimeAttribute type=\"boolean\" keyPath=\"layer.masksToBounds\" value=\"YES\"/>\n                                                    </userDefinedRuntimeAttributes>\n                                                </label>\n                                                <button opaque=\"NO\" contentMode=\"scaleToFill\" contentHorizontalAlignment=\"center\" contentVerticalAlignment=\"center\" buttonType=\"roundedRect\" lineBreakMode=\"middleTruncation\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"q2V-qX-91M\">\n                                                    <rect key=\"frame\" x=\"191.5\" y=\"37\" width=\"175.5\" height=\"30\"/>\n                                                    <color key=\"backgroundColor\" red=\"0.062279825470000001\" green=\"1\" blue=\"0.22195490649999999\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n                                                    <fontDescription key=\"fontDescription\" type=\"boldSystem\" pointSize=\"15\"/>\n                                                    <state key=\"normal\" title=\"Button\">\n                                                        <color key=\"titleShadowColor\" red=\"0.5\" green=\"0.5\" blue=\"0.5\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n                                                    </state>\n                                                    <userDefinedRuntimeAttributes>\n                                                        <userDefinedRuntimeAttribute type=\"string\" keyPath=\"layer.cornerRadius\" value=\"5\"/>\n                                                    </userDefinedRuntimeAttributes>\n                                                    <connections>\n                                                        <action selector=\"amountButtonClicked:\" destination=\"jqH-vD-QNO\" eventType=\"touchUpInside\" id=\"Ywq-0E-29K\"/>\n                                                    </connections>\n                                                </button>\n                                            </subviews>\n                                            <constraints>\n                                                <constraint firstItem=\"RAj-d0-yzE\" firstAttribute=\"top\" secondItem=\"YAA-Lk-eXe\" secondAttribute=\"topMargin\" id=\"1CR-NE-aLj\"/>\n                                                <constraint firstItem=\"Lf7-5m-ufO\" firstAttribute=\"width\" secondItem=\"q2V-qX-91M\" secondAttribute=\"width\" id=\"1R1-MY-qSU\"/>\n                                                <constraint firstItem=\"Lf7-5m-ufO\" firstAttribute=\"top\" secondItem=\"RAj-d0-yzE\" secondAttribute=\"bottom\" constant=\"8\" id=\"615-aj-vfR\"/>\n                                                <constraint firstItem=\"q2V-qX-91M\" firstAttribute=\"top\" secondItem=\"RAj-d0-yzE\" secondAttribute=\"bottom\" constant=\"8\" id=\"I0X-E6-Ag4\"/>\n                                                <constraint firstItem=\"HDn-9v-o1a\" firstAttribute=\"top\" secondItem=\"Lf7-5m-ufO\" secondAttribute=\"bottom\" constant=\"8\" id=\"Ir1-VA-HTl\"/>\n                                                <constraint firstItem=\"HDn-9v-o1a\" firstAttribute=\"bottom\" secondItem=\"YAA-Lk-eXe\" secondAttribute=\"bottomMargin\" id=\"Tws-Nv-gQC\"/>\n                                                <constraint firstItem=\"HDn-9v-o1a\" firstAttribute=\"leading\" secondItem=\"YAA-Lk-eXe\" secondAttribute=\"leadingMargin\" id=\"UKU-hf-EYw\"/>\n                                                <constraint firstItem=\"RAj-d0-yzE\" firstAttribute=\"leading\" secondItem=\"YAA-Lk-eXe\" secondAttribute=\"leadingMargin\" id=\"YMr-D5-iWy\"/>\n                                                <constraint firstItem=\"q2V-qX-91M\" firstAttribute=\"leading\" secondItem=\"Lf7-5m-ufO\" secondAttribute=\"trailing\" constant=\"8\" id=\"bUa-Nt-Fao\"/>\n                                                <constraint firstItem=\"q2V-qX-91M\" firstAttribute=\"trailing\" secondItem=\"YAA-Lk-eXe\" secondAttribute=\"trailingMargin\" constant=\"-8\" id=\"hJ9-N8-RF2\"/>\n                                                <constraint firstItem=\"Lf7-5m-ufO\" firstAttribute=\"leading\" secondItem=\"YAA-Lk-eXe\" secondAttribute=\"leadingMargin\" id=\"l1t-mT-8pt\"/>\n                                                <constraint firstItem=\"HDn-9v-o1a\" firstAttribute=\"top\" secondItem=\"q2V-qX-91M\" secondAttribute=\"bottom\" constant=\"8\" id=\"oli-lk-zQH\"/>\n                                                <constraint firstItem=\"RAj-d0-yzE\" firstAttribute=\"trailing\" secondItem=\"YAA-Lk-eXe\" secondAttribute=\"trailingMargin\" constant=\"-8\" id=\"uvg-NA-rxK\"/>\n                                                <constraint firstItem=\"HDn-9v-o1a\" firstAttribute=\"trailing\" secondItem=\"YAA-Lk-eXe\" secondAttribute=\"trailingMargin\" constant=\"-8\" id=\"vXq-Nd-Uxz\"/>\n                                            </constraints>\n                                        </tableViewCellContentView>\n                                        <connections>\n                                            <outlet property=\"amountButton\" destination=\"q2V-qX-91M\" id=\"PX3-yE-7YA\"/>\n                                            <outlet property=\"confirmationsLabel\" destination=\"Lf7-5m-ufO\" id=\"gZo-nj-0c9\"/>\n                                            <outlet property=\"dateLabel\" destination=\"RAj-d0-yzE\" id=\"934-Hj-bOn\"/>\n                                            <outlet property=\"descriptionLabel\" destination=\"HDn-9v-o1a\" id=\"4EM-dO-PKE\"/>\n                                        </connections>\n                                    </tableViewCell>\n                                </prototypes>\n                            </tableView>\n                        </subviews>\n                        <color key=\"backgroundColor\" red=\"1\" green=\"1\" blue=\"1\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n                        <constraints>\n                            <constraint firstItem=\"Dcx-1i-gkH\" firstAttribute=\"leading\" secondItem=\"hN2-a6-SWn\" secondAttribute=\"leadingMargin\" constant=\"-20\" id=\"1bN-LS-tJE\"/>\n                            <constraint firstAttribute=\"trailingMargin\" secondItem=\"Dcx-1i-gkH\" secondAttribute=\"trailing\" constant=\"-20\" id=\"2E7-oI-Cc1\"/>\n                            <constraint firstAttribute=\"trailingMargin\" secondItem=\"PSv-oQ-2fb\" secondAttribute=\"trailing\" constant=\"-20\" id=\"30n-Db-hG5\"/>\n                            <constraint firstAttribute=\"trailingMargin\" secondItem=\"r7j-US-yi8\" secondAttribute=\"trailing\" constant=\"-16\" id=\"8Kr-pz-WIM\"/>\n                            <constraint firstItem=\"r7j-US-yi8\" firstAttribute=\"top\" secondItem=\"PSv-oQ-2fb\" secondAttribute=\"bottom\" id=\"FiW-Kl-Pi9\"/>\n                            <constraint firstItem=\"yUe-8I-uLU\" firstAttribute=\"leading\" secondItem=\"hN2-a6-SWn\" secondAttribute=\"leadingMargin\" constant=\"-8\" id=\"JI3-lz-OWN\"/>\n                            <constraint firstItem=\"CHZ-nO-cIl\" firstAttribute=\"leading\" secondItem=\"hN2-a6-SWn\" secondAttribute=\"leadingMargin\" constant=\"-8\" id=\"LHq-to-8vH\"/>\n                            <constraint firstItem=\"r7j-US-yi8\" firstAttribute=\"leading\" secondItem=\"hN2-a6-SWn\" secondAttribute=\"leadingMargin\" constant=\"-16\" id=\"Lfo-8B-QWC\"/>\n                            <constraint firstItem=\"CHZ-nO-cIl\" firstAttribute=\"leading\" secondItem=\"hN2-a6-SWn\" secondAttribute=\"leadingMargin\" constant=\"-8\" id=\"SAG-Od-NWL\"/>\n                            <constraint firstItem=\"PSv-oQ-2fb\" firstAttribute=\"top\" secondItem=\"JSo-W1-6H7\" secondAttribute=\"top\" id=\"U7d-NI-EF5\"/>\n                            <constraint firstItem=\"PSv-oQ-2fb\" firstAttribute=\"leading\" secondItem=\"hN2-a6-SWn\" secondAttribute=\"leadingMargin\" constant=\"-20\" id=\"fGb-o8-t6M\"/>\n                            <constraint firstItem=\"yUe-8I-uLU\" firstAttribute=\"top\" secondItem=\"JSo-W1-6H7\" secondAttribute=\"top\" constant=\"8\" symbolic=\"YES\" id=\"hNz-MA-TtA\"/>\n                            <constraint firstItem=\"Dcx-1i-gkH\" firstAttribute=\"top\" secondItem=\"CHZ-nO-cIl\" secondAttribute=\"bottom\" constant=\"8\" id=\"iUn-qs-Det\"/>\n                            <constraint firstItem=\"Dcx-1i-gkH\" firstAttribute=\"top\" secondItem=\"PSv-oQ-2fb\" secondAttribute=\"bottom\" id=\"ijS-gQ-J0M\"/>\n                            <constraint firstItem=\"CHZ-nO-cIl\" firstAttribute=\"top\" secondItem=\"yUe-8I-uLU\" secondAttribute=\"bottom\" constant=\"7.5\" id=\"kqz-HI-GZV\"/>\n                            <constraint firstItem=\"JSo-W1-6H7\" firstAttribute=\"bottom\" secondItem=\"Dcx-1i-gkH\" secondAttribute=\"bottom\" id=\"nub-S7-Tql\"/>\n                            <constraint firstAttribute=\"trailingMargin\" secondItem=\"CHZ-nO-cIl\" secondAttribute=\"trailing\" constant=\"-8\" id=\"w1c-3V-lWp\"/>\n                            <constraint firstAttribute=\"trailingMargin\" secondItem=\"CHZ-nO-cIl\" secondAttribute=\"trailing\" constant=\"-8\" id=\"xR2-aD-EPu\"/>\n                            <constraint firstItem=\"JSo-W1-6H7\" firstAttribute=\"bottom\" secondItem=\"r7j-US-yi8\" secondAttribute=\"bottom\" id=\"zl7-Ge-JYM\"/>\n                        </constraints>\n                        <viewLayoutGuide key=\"safeArea\" id=\"JSo-W1-6H7\"/>\n                    </view>\n                    <navigationItem key=\"navigationItem\" title=\"History\" id=\"kF7-DP-jfw\">\n                        <barButtonItem key=\"leftBarButtonItem\" image=\"list.png\" id=\"fbY-Ai-l0d\">\n                            <connections>\n                                <action selector=\"menuButtonClicked:\" destination=\"KFU-CX-7uI\" id=\"fPM-sq-XOE\"/>\n                            </connections>\n                        </barButtonItem>\n                    </navigationItem>\n                    <connections>\n                        <outlet property=\"accountBalanceLabel\" destination=\"i0i-6T-FsV\" id=\"wEQ-9x-7et\"/>\n                        <outlet property=\"accountNameLabel\" destination=\"GKZ-gr-jad\" id=\"kZe-v9-2Vm\"/>\n                        <outlet property=\"balanceActivityIndicatorView\" destination=\"RKH-ZO-wU1\" id=\"kPw-nE-5u3\"/>\n                        <outlet property=\"fromBackgroundView\" destination=\"PSv-oQ-2fb\" id=\"5u6-2X-cf6\"/>\n                        <outlet property=\"fromLabel\" destination=\"yUe-8I-uLU\" id=\"Qal-84-gek\"/>\n                        <outlet property=\"fromViewContainer\" destination=\"CHZ-nO-cIl\" id=\"hZA-wJ-9F9\"/>\n                        <outlet property=\"selectAccountImageView\" destination=\"SFw-tL-fqg\" id=\"Cch-mu-T7D\"/>\n                        <outlet property=\"tableviewBackgroundView\" destination=\"r7j-US-yi8\" id=\"EnH-E7-Jeh\"/>\n                        <outlet property=\"transactionsTableView\" destination=\"Dcx-1i-gkH\" id=\"e4s-Z2-hns\"/>\n                    </connections>\n                </viewController>\n                <placeholder placeholderIdentifier=\"IBFirstResponder\" id=\"Vyo-w3-ZY5\" userLabel=\"First Responder\" sceneMemberID=\"firstResponder\"/>\n                <tapGestureRecognizer id=\"2x7-5L-qhZ\">\n                    <connections>\n                        <segue destination=\"mbh-2x-bRM\" kind=\"show\" identifier=\"selectAccount\" id=\"LPu-4e-rku\"/>\n                    </connections>\n                </tapGestureRecognizer>\n            </objects>\n            <point key=\"canvasLocation\" x=\"463\" y=\"1486\"/>\n        </scene>\n        <!--Menu View Controller-->\n        <scene sceneID=\"UZq-tS-whr\">\n            <objects>\n                <viewController storyboardIdentifier=\"menu\" id=\"jIt-jK-JgH\" customClass=\"TLMenuViewController\" sceneMemberID=\"viewController\">\n                    <view key=\"view\" contentMode=\"scaleToFill\" id=\"YBq-O5-UEq\">\n                        <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"375\" height=\"667\"/>\n                        <autoresizingMask key=\"autoresizingMask\" widthSizable=\"YES\" heightSizable=\"YES\"/>\n                        <subviews>\n                            <view contentMode=\"scaleToFill\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"ZNg-op-29C\">\n                                <rect key=\"frame\" x=\"-4\" y=\"0.0\" width=\"379\" height=\"40\"/>\n                                <color key=\"backgroundColor\" red=\"0.1649834104\" green=\"1\" blue=\"0.99004048529999999\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n                                <constraints>\n                                    <constraint firstAttribute=\"height\" constant=\"40\" id=\"Fh0-Nt-bbC\"/>\n                                </constraints>\n                            </view>\n                            <tableView clipsSubviews=\"YES\" contentMode=\"scaleToFill\" bounces=\"NO\" dataMode=\"prototypes\" style=\"grouped\" separatorStyle=\"default\" rowHeight=\"60\" sectionHeaderHeight=\"10\" sectionFooterHeight=\"10\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"QyY-kf-rkr\">\n                                <rect key=\"frame\" x=\"-8\" y=\"40\" width=\"383\" height=\"627\"/>\n                                <color key=\"backgroundColor\" red=\"0.93725490196078431\" green=\"0.93725490196078431\" blue=\"0.95686274509803926\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n                                <constraints>\n                                    <constraint firstAttribute=\"height\" constant=\"536\" id=\"3Av-4T-YZb\"/>\n                                </constraints>\n                                <prototypes>\n                                    <tableViewCell contentMode=\"scaleToFill\" selectionStyle=\"default\" indentationWidth=\"10\" rowHeight=\"60\" id=\"LH8-Ai-giv\">\n                                        <rect key=\"frame\" x=\"0.0\" y=\"55.5\" width=\"383\" height=\"60\"/>\n                                        <autoresizingMask key=\"autoresizingMask\"/>\n                                        <tableViewCellContentView key=\"contentView\" opaque=\"NO\" clipsSubviews=\"YES\" multipleTouchEnabled=\"YES\" contentMode=\"center\" tableViewCell=\"LH8-Ai-giv\" id=\"n5j-aa-ndl\">\n                                            <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"383\" height=\"59.5\"/>\n                                            <autoresizingMask key=\"autoresizingMask\"/>\n                                        </tableViewCellContentView>\n                                    </tableViewCell>\n                                </prototypes>\n                                <variation key=\"default\">\n                                    <mask key=\"constraints\">\n                                        <exclude reference=\"3Av-4T-YZb\"/>\n                                    </mask>\n                                </variation>\n                                <connections>\n                                    <outlet property=\"dataSource\" destination=\"jIt-jK-JgH\" id=\"hRd-QL-ekn\"/>\n                                    <outlet property=\"delegate\" destination=\"jIt-jK-JgH\" id=\"YLG-HO-vNa\"/>\n                                </connections>\n                            </tableView>\n                        </subviews>\n                        <color key=\"backgroundColor\" red=\"1\" green=\"1\" blue=\"1\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n                        <constraints>\n                            <constraint firstItem=\"ZNg-op-29C\" firstAttribute=\"leading\" secondItem=\"YBq-O5-UEq\" secondAttribute=\"leadingMargin\" constant=\"-20\" id=\"5WR-5G-1rd\"/>\n                            <constraint firstItem=\"ZNg-op-29C\" firstAttribute=\"trailing\" secondItem=\"QyY-kf-rkr\" secondAttribute=\"trailing\" id=\"AHg-6X-s8R\"/>\n                            <constraint firstItem=\"QyY-kf-rkr\" firstAttribute=\"leading\" secondItem=\"Bnc-gn-bQv\" secondAttribute=\"leading\" id=\"BKo-CS-Shd\"/>\n                            <constraint firstItem=\"QyY-kf-rkr\" firstAttribute=\"bottom\" secondItem=\"Bnc-gn-bQv\" secondAttribute=\"bottom\" id=\"C26-vq-IKD\"/>\n                            <constraint firstItem=\"Bnc-gn-bQv\" firstAttribute=\"trailing\" secondItem=\"QyY-kf-rkr\" secondAttribute=\"trailing\" id=\"K7V-Yt-CHL\"/>\n                            <constraint firstItem=\"QyY-kf-rkr\" firstAttribute=\"bottom\" secondItem=\"Bnc-gn-bQv\" secondAttribute=\"bottom\" id=\"PTE-vP-Xde\"/>\n                            <constraint firstItem=\"QyY-kf-rkr\" firstAttribute=\"top\" secondItem=\"ZNg-op-29C\" secondAttribute=\"bottom\" id=\"Qed-O0-YQh\"/>\n                            <constraint firstItem=\"ZNg-op-29C\" firstAttribute=\"top\" secondItem=\"YBq-O5-UEq\" secondAttribute=\"topMargin\" id=\"Vm7-4h-rsx\"/>\n                            <constraint firstItem=\"QyY-kf-rkr\" firstAttribute=\"leading\" secondItem=\"ZNg-op-29C\" secondAttribute=\"leading\" constant=\"-4\" id=\"XY7-c6-bup\"/>\n                            <constraint firstItem=\"ZNg-op-29C\" firstAttribute=\"top\" secondItem=\"YBq-O5-UEq\" secondAttribute=\"top\" id=\"jt2-0w-cCx\"/>\n                            <constraint firstItem=\"QyY-kf-rkr\" firstAttribute=\"trailing\" secondItem=\"ZNg-op-29C\" secondAttribute=\"trailing\" id=\"nbn-XH-pJf\"/>\n                            <constraint firstItem=\"QyY-kf-rkr\" firstAttribute=\"top\" secondItem=\"ZNg-op-29C\" secondAttribute=\"bottom\" id=\"soh-2D-brc\"/>\n                            <constraint firstItem=\"ZNg-op-29C\" firstAttribute=\"leading\" secondItem=\"QyY-kf-rkr\" secondAttribute=\"leading\" id=\"x52-p3-V1b\"/>\n                            <constraint firstAttribute=\"trailingMargin\" secondItem=\"ZNg-op-29C\" secondAttribute=\"trailing\" constant=\"-16\" id=\"x7o-Qz-AQ5\"/>\n                        </constraints>\n                        <viewLayoutGuide key=\"safeArea\" id=\"Bnc-gn-bQv\"/>\n                        <variation key=\"default\">\n                            <mask key=\"constraints\">\n                                <exclude reference=\"AHg-6X-s8R\"/>\n                                <exclude reference=\"x52-p3-V1b\"/>\n                                <exclude reference=\"BKo-CS-Shd\"/>\n                                <exclude reference=\"K7V-Yt-CHL\"/>\n                                <exclude reference=\"PTE-vP-Xde\"/>\n                                <exclude reference=\"Qed-O0-YQh\"/>\n                            </mask>\n                        </variation>\n                    </view>\n                    <connections>\n                        <outlet property=\"menuTopView\" destination=\"ZNg-op-29C\" id=\"gdr-WY-O2S\"/>\n                        <outlet property=\"tableView\" destination=\"QyY-kf-rkr\" id=\"QHO-1F-CHz\"/>\n                    </connections>\n                </viewController>\n                <placeholder placeholderIdentifier=\"IBFirstResponder\" id=\"OwR-iY-Fkh\" userLabel=\"First Responder\" sceneMemberID=\"firstResponder\"/>\n            </objects>\n            <point key=\"canvasLocation\" x=\"-741\" y=\"-595\"/>\n        </scene>\n        <!--Sliding View Controller-->\n        <scene sceneID=\"0UY-kI-FRz\">\n            <objects>\n                <viewController storyboardIdentifier=\"SlidingViewControllerID\" id=\"UtC-4S-ThX\" customClass=\"ECSlidingViewController\" sceneMemberID=\"viewController\">\n                    <view key=\"view\" contentMode=\"scaleToFill\" id=\"bPc-f8-s2b\">\n                        <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"375\" height=\"667\"/>\n                        <autoresizingMask key=\"autoresizingMask\" widthSizable=\"YES\" heightSizable=\"YES\"/>\n                        <color key=\"backgroundColor\" red=\"1\" green=\"1\" blue=\"1\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n                        <viewLayoutGuide key=\"safeArea\" id=\"Wip-xe-1OL\"/>\n                    </view>\n                    <userDefinedRuntimeAttributes>\n                        <userDefinedRuntimeAttribute type=\"string\" keyPath=\"topViewControllerStoryboardId\" value=\"PreloadNav\"/>\n                        <userDefinedRuntimeAttribute type=\"string\" keyPath=\"underLeftViewControllerStoryboardId\" value=\"menu\"/>\n                    </userDefinedRuntimeAttributes>\n                </viewController>\n                <placeholder placeholderIdentifier=\"IBFirstResponder\" id=\"zDc-Kb-4QM\" userLabel=\"First Responder\" sceneMemberID=\"firstResponder\"/>\n            </objects>\n            <point key=\"canvasLocation\" x=\"-1701\" y=\"-441\"/>\n        </scene>\n        <!--Navigation Controller-->\n        <scene sceneID=\"vCm-AE-HA6\">\n            <objects>\n                <navigationController storyboardIdentifier=\"SendNav\" id=\"SeI-dQ-YEn\" sceneMemberID=\"viewController\">\n                    <navigationBar key=\"navigationBar\" contentMode=\"scaleToFill\" id=\"Utg-i7-WbR\">\n                        <rect key=\"frame\" x=\"0.0\" y=\"20\" width=\"375\" height=\"44\"/>\n                        <autoresizingMask key=\"autoresizingMask\"/>\n                    </navigationBar>\n                    <connections>\n                        <segue destination=\"BYZ-38-t0r\" kind=\"relationship\" relationship=\"rootViewController\" id=\"fCi-77-cNB\"/>\n                    </connections>\n                </navigationController>\n                <placeholder placeholderIdentifier=\"IBFirstResponder\" id=\"bNB-W7-whF\" userLabel=\"First Responder\" sceneMemberID=\"firstResponder\"/>\n            </objects>\n            <point key=\"canvasLocation\" x=\"-300\" y=\"167\"/>\n        </scene>\n        <!--Navigation Controller-->\n        <scene sceneID=\"oIi-nj-UyX\">\n            <objects>\n                <navigationController storyboardIdentifier=\"ReceiveNav\" id=\"4MW-oQ-AYs\" sceneMemberID=\"viewController\">\n                    <navigationBar key=\"navigationBar\" contentMode=\"scaleToFill\" id=\"LKj-Zi-eRe\">\n                        <rect key=\"frame\" x=\"0.0\" y=\"20\" width=\"375\" height=\"44\"/>\n                        <autoresizingMask key=\"autoresizingMask\"/>\n                    </navigationBar>\n                    <connections>\n                        <segue destination=\"zWN-ve-V1H\" kind=\"relationship\" relationship=\"rootViewController\" id=\"fZS-9D-vkZ\"/>\n                    </connections>\n                </navigationController>\n                <placeholder placeholderIdentifier=\"IBFirstResponder\" id=\"vF0-i9-soY\" userLabel=\"First Responder\" sceneMemberID=\"firstResponder\"/>\n            </objects>\n            <point key=\"canvasLocation\" x=\"-300\" y=\"849\"/>\n        </scene>\n        <!--Navigation Controller-->\n        <scene sceneID=\"3nT-m4-PMp\">\n            <objects>\n                <navigationController storyboardIdentifier=\"ManageAccountNav\" id=\"V9T-wC-aCU\" sceneMemberID=\"viewController\">\n                    <navigationBar key=\"navigationBar\" contentMode=\"scaleToFill\" id=\"zu2-Dq-Bqg\">\n                        <rect key=\"frame\" x=\"0.0\" y=\"20\" width=\"375\" height=\"44\"/>\n                        <autoresizingMask key=\"autoresizingMask\"/>\n                    </navigationBar>\n                    <connections>\n                        <segue destination=\"8PD-ML-0E8\" kind=\"relationship\" relationship=\"rootViewController\" id=\"xqh-aF-ZrB\"/>\n                    </connections>\n                </navigationController>\n                <placeholder placeholderIdentifier=\"IBFirstResponder\" id=\"ICN-BG-LGM\" userLabel=\"First Responder\" sceneMemberID=\"firstResponder\"/>\n            </objects>\n            <point key=\"canvasLocation\" x=\"-300\" y=\"2177\"/>\n        </scene>\n        <!--Manage Accounts-->\n        <scene sceneID=\"zVp-th-l0I\">\n            <objects>\n                <viewController storyboardIdentifier=\"ManageAccounts\" id=\"8PD-ML-0E8\" customClass=\"TLManageAccountsViewController\" sceneMemberID=\"viewController\">\n                    <view key=\"view\" contentMode=\"scaleToFill\" id=\"HXv-XT-ldk\">\n                        <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"375\" height=\"667\"/>\n                        <autoresizingMask key=\"autoresizingMask\" widthSizable=\"YES\" heightSizable=\"YES\"/>\n                        <subviews>\n                            <tableView clipsSubviews=\"YES\" contentMode=\"scaleToFill\" alwaysBounceVertical=\"YES\" dataMode=\"prototypes\" style=\"grouped\" separatorStyle=\"default\" rowHeight=\"74\" sectionHeaderHeight=\"10\" sectionFooterHeight=\"10\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"s5R-e7-WcB\">\n                                <rect key=\"frame\" x=\"-4\" y=\"64\" width=\"383\" height=\"603\"/>\n                                <color key=\"backgroundColor\" red=\"0.93725490196078431\" green=\"0.93725490196078431\" blue=\"0.95686274509803926\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n                                <prototypes>\n                                    <tableViewCell contentMode=\"scaleToFill\" selectionStyle=\"default\" indentationWidth=\"10\" reuseIdentifier=\"AccountCellIdentifier\" rowHeight=\"74\" id=\"54o-mf-3YT\" customClass=\"TLAccountTableViewCell\">\n                                        <rect key=\"frame\" x=\"0.0\" y=\"55.5\" width=\"383\" height=\"74\"/>\n                                        <autoresizingMask key=\"autoresizingMask\"/>\n                                        <tableViewCellContentView key=\"contentView\" opaque=\"NO\" clipsSubviews=\"YES\" multipleTouchEnabled=\"YES\" contentMode=\"center\" tableViewCell=\"54o-mf-3YT\" id=\"jjK-9K-Lnr\">\n                                            <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"383\" height=\"73.5\"/>\n                                            <autoresizingMask key=\"autoresizingMask\"/>\n                                            <subviews>\n                                                <label opaque=\"NO\" userInteractionEnabled=\"NO\" contentMode=\"left\" horizontalHuggingPriority=\"251\" verticalCompressionResistancePriority=\"749\" text=\"Label\" lineBreakMode=\"tailTruncation\" baselineAdjustment=\"alignBaselines\" adjustsFontSizeToFit=\"NO\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"P5j-13-Jpg\">\n                                                    <rect key=\"frame\" x=\"8\" y=\"48\" width=\"359\" height=\"18\"/>\n                                                    <fontDescription key=\"fontDescription\" type=\"system\" pointSize=\"17\"/>\n                                                    <color key=\"textColor\" red=\"0.0\" green=\"0.0\" blue=\"0.0\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n                                                    <nil key=\"highlightedColor\"/>\n                                                </label>\n                                                <button opaque=\"NO\" contentMode=\"scaleToFill\" contentHorizontalAlignment=\"center\" contentVerticalAlignment=\"center\" buttonType=\"roundedRect\" lineBreakMode=\"middleTruncation\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"y35-UP-Kcg\">\n                                                    <rect key=\"frame\" x=\"124\" y=\"10\" width=\"243\" height=\"30\"/>\n                                                    <color key=\"backgroundColor\" red=\"0.062279825470000001\" green=\"1\" blue=\"0.22195490649999999\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n                                                    <fontDescription key=\"fontDescription\" type=\"boldSystem\" pointSize=\"15\"/>\n                                                    <state key=\"normal\">\n                                                        <color key=\"titleShadowColor\" red=\"0.5\" green=\"0.5\" blue=\"0.5\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n                                                    </state>\n                                                    <userDefinedRuntimeAttributes>\n                                                        <userDefinedRuntimeAttribute type=\"string\" keyPath=\"layer.cornerRadius\" value=\"5\"/>\n                                                    </userDefinedRuntimeAttributes>\n                                                    <connections>\n                                                        <action selector=\"accountBalanceButtonClicked:\" destination=\"54o-mf-3YT\" eventType=\"touchUpInside\" id=\"zNp-q6-yvR\"/>\n                                                    </connections>\n                                                </button>\n                                            </subviews>\n                                            <constraints>\n                                                <constraint firstItem=\"y35-UP-Kcg\" firstAttribute=\"trailing\" secondItem=\"jjK-9K-Lnr\" secondAttribute=\"trailingMargin\" constant=\"-8\" id=\"0vC-ed-dkF\"/>\n                                                <constraint firstItem=\"y35-UP-Kcg\" firstAttribute=\"top\" secondItem=\"jjK-9K-Lnr\" secondAttribute=\"topMargin\" constant=\"2\" id=\"Bp4-AN-mQg\"/>\n                                                <constraint firstItem=\"P5j-13-Jpg\" firstAttribute=\"bottom\" secondItem=\"jjK-9K-Lnr\" secondAttribute=\"bottomMargin\" id=\"HOv-W2-9rX\"/>\n                                                <constraint firstItem=\"y35-UP-Kcg\" firstAttribute=\"leading\" secondItem=\"jjK-9K-Lnr\" secondAttribute=\"leadingMargin\" constant=\"116\" id=\"OQ3-Vw-CXI\"/>\n                                                <constraint firstItem=\"P5j-13-Jpg\" firstAttribute=\"trailing\" secondItem=\"jjK-9K-Lnr\" secondAttribute=\"trailingMargin\" constant=\"-8\" id=\"W7T-1l-Bke\"/>\n                                                <constraint firstItem=\"P5j-13-Jpg\" firstAttribute=\"top\" secondItem=\"y35-UP-Kcg\" secondAttribute=\"bottom\" constant=\"8\" id=\"amB-3c-PDi\"/>\n                                                <constraint firstItem=\"P5j-13-Jpg\" firstAttribute=\"leading\" secondItem=\"jjK-9K-Lnr\" secondAttribute=\"leadingMargin\" id=\"zgi-98-VFz\"/>\n                                            </constraints>\n                                        </tableViewCellContentView>\n                                        <connections>\n                                            <outlet property=\"accountBalanceButton\" destination=\"y35-UP-Kcg\" id=\"T0r-E8-B76\"/>\n                                            <outlet property=\"accountNameLabel\" destination=\"P5j-13-Jpg\" id=\"u3e-MW-WnB\"/>\n                                        </connections>\n                                    </tableViewCell>\n                                </prototypes>\n                            </tableView>\n                        </subviews>\n                        <color key=\"backgroundColor\" red=\"1\" green=\"1\" blue=\"1\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n                        <constraints>\n                            <constraint firstItem=\"vsY-KH-B9q\" firstAttribute=\"bottom\" secondItem=\"s5R-e7-WcB\" secondAttribute=\"bottom\" id=\"30D-1W-Zbi\"/>\n                            <constraint firstAttribute=\"trailingMargin\" secondItem=\"s5R-e7-WcB\" secondAttribute=\"trailing\" constant=\"-20\" id=\"G5m-WM-t8x\"/>\n                            <constraint firstItem=\"s5R-e7-WcB\" firstAttribute=\"leading\" secondItem=\"HXv-XT-ldk\" secondAttribute=\"leadingMargin\" constant=\"-20\" id=\"bZN-y9-qtg\"/>\n                            <constraint firstItem=\"s5R-e7-WcB\" firstAttribute=\"top\" secondItem=\"HXv-XT-ldk\" secondAttribute=\"topMargin\" id=\"fhv-px-9ds\"/>\n                        </constraints>\n                        <viewLayoutGuide key=\"safeArea\" id=\"vsY-KH-B9q\"/>\n                    </view>\n                    <navigationItem key=\"navigationItem\" title=\"Manage Accounts\" id=\"WPt-OD-Zry\">\n                        <barButtonItem key=\"leftBarButtonItem\" image=\"list.png\" id=\"VDR-YX-Y64\">\n                            <connections>\n                                <action selector=\"menuButtonClicked:\" destination=\"8PD-ML-0E8\" id=\"CNM-cD-Vzt\"/>\n                            </connections>\n                        </barButtonItem>\n                    </navigationItem>\n                    <connections>\n                        <outlet property=\"accountsTableView\" destination=\"s5R-e7-WcB\" id=\"bPP-bq-Yr5\"/>\n                        <segue destination=\"hnW-d4-U0e\" kind=\"show\" identifier=\"SegueAddressList\" id=\"5Zz-vA-Rzy\"/>\n                    </connections>\n                </viewController>\n                <placeholder placeholderIdentifier=\"IBFirstResponder\" id=\"RLG-Sc-3Ul\" userLabel=\"First Responder\" sceneMemberID=\"firstResponder\"/>\n            </objects>\n            <point key=\"canvasLocation\" x=\"456\" y=\"2166\"/>\n        </scene>\n        <!--Instructions View Controller-->\n        <scene sceneID=\"goz-pj-GZC\">\n            <objects>\n                <viewController storyboardIdentifier=\"Instructions\" id=\"gO0-zP-PAR\" customClass=\"TLInstructionsViewController\" sceneMemberID=\"viewController\">\n                    <view key=\"view\" contentMode=\"scaleToFill\" id=\"jJ1-CX-3i5\">\n                        <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"375\" height=\"667\"/>\n                        <autoresizingMask key=\"autoresizingMask\" widthSizable=\"YES\" heightSizable=\"YES\"/>\n                        <subviews>\n                            <tableView clipsSubviews=\"YES\" contentMode=\"scaleToFill\" alwaysBounceVertical=\"YES\" dataMode=\"prototypes\" style=\"grouped\" separatorStyle=\"default\" allowsSelection=\"NO\" rowHeight=\"44\" sectionHeaderHeight=\"10\" sectionFooterHeight=\"10\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"I8j-N2-zwg\">\n                                <rect key=\"frame\" x=\"-4\" y=\"64\" width=\"383\" height=\"603\"/>\n                                <color key=\"backgroundColor\" red=\"0.93725490196078431\" green=\"0.93725490196078431\" blue=\"0.95686274509803926\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n                            </tableView>\n                        </subviews>\n                        <color key=\"backgroundColor\" red=\"1\" green=\"1\" blue=\"1\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n                        <constraints>\n                            <constraint firstAttribute=\"trailingMargin\" secondItem=\"I8j-N2-zwg\" secondAttribute=\"trailing\" constant=\"-20\" id=\"2Nu-tl-WeC\"/>\n                            <constraint firstItem=\"I8j-N2-zwg\" firstAttribute=\"leading\" secondItem=\"jJ1-CX-3i5\" secondAttribute=\"leadingMargin\" constant=\"-20\" id=\"4d0-Th-uKo\"/>\n                            <constraint firstItem=\"I8j-N2-zwg\" firstAttribute=\"top\" secondItem=\"jJ1-CX-3i5\" secondAttribute=\"topMargin\" id=\"bnZ-d8-Max\"/>\n                            <constraint firstItem=\"mpQ-ff-kFU\" firstAttribute=\"bottom\" secondItem=\"I8j-N2-zwg\" secondAttribute=\"bottom\" id=\"gn8-u3-XnY\"/>\n                        </constraints>\n                        <viewLayoutGuide key=\"safeArea\" id=\"mpQ-ff-kFU\"/>\n                    </view>\n                    <connections>\n                        <outlet property=\"instructionsTableView\" destination=\"I8j-N2-zwg\" id=\"kng-za-l8e\"/>\n                    </connections>\n                </viewController>\n                <placeholder placeholderIdentifier=\"IBFirstResponder\" id=\"1gs-Vg-623\" userLabel=\"First Responder\" sceneMemberID=\"firstResponder\"/>\n            </objects>\n            <point key=\"canvasLocation\" x=\"1960\" y=\"2850\"/>\n        </scene>\n        <!--Transparent View Controller-->\n        <scene sceneID=\"KA1-Zb-ExV\">\n            <objects>\n                <viewController storyboardIdentifier=\"TransparentViewController\" id=\"uB4-dR-EYT\" customClass=\"TransparentViewController\" sceneMemberID=\"viewController\">\n                    <view key=\"view\" contentMode=\"scaleToFill\" id=\"S8g-90-fGo\">\n                        <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"375\" height=\"667\"/>\n                        <autoresizingMask key=\"autoresizingMask\" widthSizable=\"YES\" heightSizable=\"YES\"/>\n                        <color key=\"backgroundColor\" red=\"1\" green=\"1\" blue=\"1\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n                        <viewLayoutGuide key=\"safeArea\" id=\"aep-oL-fAn\"/>\n                    </view>\n                </viewController>\n                <placeholder placeholderIdentifier=\"IBFirstResponder\" id=\"Jmj-t6-IdZ\" userLabel=\"First Responder\" sceneMemberID=\"firstResponder\"/>\n            </objects>\n            <point key=\"canvasLocation\" x=\"-125\" y=\"-595\"/>\n        </scene>\n        <!--Address Book View Controller-->\n        <scene sceneID=\"U1L-ck-7BV\">\n            <objects>\n                <viewController storyboardIdentifier=\"AddressBook\" id=\"uYm-sU-f6O\" customClass=\"TLAddressBookViewController\" sceneMemberID=\"viewController\">\n                    <view key=\"view\" contentMode=\"scaleToFill\" id=\"zYB-eN-IRt\">\n                        <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"375\" height=\"667\"/>\n                        <autoresizingMask key=\"autoresizingMask\" widthSizable=\"YES\" heightSizable=\"YES\"/>\n                        <subviews>\n                            <tableView clipsSubviews=\"YES\" contentMode=\"scaleToFill\" alwaysBounceVertical=\"YES\" dataMode=\"prototypes\" style=\"grouped\" separatorStyle=\"default\" rowHeight=\"95\" sectionHeaderHeight=\"10\" sectionFooterHeight=\"10\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"gu7-kb-fZh\">\n                                <rect key=\"frame\" x=\"-4\" y=\"64\" width=\"383\" height=\"603\"/>\n                                <color key=\"backgroundColor\" red=\"0.93725490196078431\" green=\"0.93725490196078431\" blue=\"0.95686274509803926\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n                            </tableView>\n                            <navigationBar contentMode=\"scaleToFill\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"M3H-i2-eeH\">\n                                <rect key=\"frame\" x=\"0.0\" y=\"20\" width=\"375\" height=\"44\"/>\n                                <color key=\"barTintColor\" red=\"1\" green=\"1\" blue=\"1\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n                                <items>\n                                    <navigationItem title=\"Contacts\" id=\"ob3-Xc-rR5\">\n                                        <barButtonItem key=\"leftBarButtonItem\" systemItem=\"done\" id=\"wKA-96-ZKH\">\n                                            <connections>\n                                                <action selector=\"cancelButtonClicked:\" destination=\"uYm-sU-f6O\" id=\"5EM-z9-D0M\"/>\n                                            </connections>\n                                        </barButtonItem>\n                                        <barButtonItem key=\"rightBarButtonItem\" systemItem=\"add\" id=\"sTl-FX-jZ1\">\n                                            <connections>\n                                                <action selector=\"addAddressBookEntryButtonClicked:\" destination=\"uYm-sU-f6O\" id=\"ZE0-l1-yad\"/>\n                                            </connections>\n                                        </barButtonItem>\n                                    </navigationItem>\n                                </items>\n                            </navigationBar>\n                        </subviews>\n                        <color key=\"backgroundColor\" red=\"1\" green=\"1\" blue=\"1\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n                        <constraints>\n                            <constraint firstItem=\"kWM-Od-Ngu\" firstAttribute=\"bottom\" secondItem=\"gu7-kb-fZh\" secondAttribute=\"bottom\" id=\"DA5-gX-Pyy\"/>\n                            <constraint firstAttribute=\"trailingMargin\" secondItem=\"M3H-i2-eeH\" secondAttribute=\"trailing\" constant=\"-16\" id=\"EvO-d2-mFZ\"/>\n                            <constraint firstItem=\"M3H-i2-eeH\" firstAttribute=\"top\" secondItem=\"kWM-Od-Ngu\" secondAttribute=\"top\" id=\"GvH-fc-tC5\"/>\n                            <constraint firstAttribute=\"trailingMargin\" secondItem=\"gu7-kb-fZh\" secondAttribute=\"trailing\" constant=\"-20\" id=\"Jul-bv-NWY\"/>\n                            <constraint firstItem=\"gu7-kb-fZh\" firstAttribute=\"top\" secondItem=\"M3H-i2-eeH\" secondAttribute=\"bottom\" id=\"QKf-ma-Ia8\"/>\n                            <constraint firstItem=\"M3H-i2-eeH\" firstAttribute=\"leading\" secondItem=\"zYB-eN-IRt\" secondAttribute=\"leadingMargin\" constant=\"-16\" id=\"bhO-Nu-Ace\"/>\n                            <constraint firstItem=\"gu7-kb-fZh\" firstAttribute=\"leading\" secondItem=\"zYB-eN-IRt\" secondAttribute=\"leadingMargin\" constant=\"-20\" id=\"m79-qA-UPn\"/>\n                        </constraints>\n                        <viewLayoutGuide key=\"safeArea\" id=\"kWM-Od-Ngu\"/>\n                    </view>\n                    <connections>\n                        <outlet property=\"addressBookTableView\" destination=\"gu7-kb-fZh\" id=\"ADP-5f-RiA\"/>\n                        <outlet property=\"navigationBar\" destination=\"M3H-i2-eeH\" id=\"gZC-fZ-LTe\"/>\n                    </connections>\n                </viewController>\n                <placeholder placeholderIdentifier=\"IBFirstResponder\" id=\"cmN-1P-YC6\" userLabel=\"First Responder\" sceneMemberID=\"firstResponder\"/>\n            </objects>\n            <point key=\"canvasLocation\" x=\"497\" y=\"-561\"/>\n        </scene>\n        <!--Text View View Controller-->\n        <scene sceneID=\"6bB-Ot-rnW\">\n            <objects>\n                <viewController storyboardIdentifier=\"TextView\" id=\"2ys-DS-bOJ\" customClass=\"TLTextViewViewController\" sceneMemberID=\"viewController\">\n                    <view key=\"view\" contentMode=\"scaleToFill\" id=\"avv-gL-cZN\">\n                        <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"375\" height=\"667\"/>\n                        <autoresizingMask key=\"autoresizingMask\" widthSizable=\"YES\" heightSizable=\"YES\"/>\n                        <subviews>\n                            <view contentMode=\"scaleToFill\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"Smt-SB-fPR\">\n                                <rect key=\"frame\" x=\"8\" y=\"144\" width=\"359\" height=\"423\"/>\n                                <subviews>\n                                    <textView clipsSubviews=\"YES\" multipleTouchEnabled=\"YES\" contentMode=\"scaleToFill\" editable=\"NO\" text=\"Loading...\" selectable=\"NO\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"YlR-nU-l4e\">\n                                        <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"359\" height=\"423\"/>\n                                        <color key=\"backgroundColor\" red=\"0.062279825470000001\" green=\"1\" blue=\"0.22195490649999999\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n                                        <fontDescription key=\"fontDescription\" type=\"system\" pointSize=\"22\"/>\n                                        <textInputTraits key=\"textInputTraits\" autocapitalizationType=\"sentences\"/>\n                                        <userDefinedRuntimeAttributes>\n                                            <userDefinedRuntimeAttribute type=\"string\" keyPath=\"layer.cornerRadius\" value=\"5\"/>\n                                        </userDefinedRuntimeAttributes>\n                                    </textView>\n                                </subviews>\n                                <color key=\"backgroundColor\" red=\"1\" green=\"1\" blue=\"1\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n                                <constraints>\n                                    <constraint firstItem=\"YlR-nU-l4e\" firstAttribute=\"top\" secondItem=\"Smt-SB-fPR\" secondAttribute=\"top\" id=\"Klh-Id-C8M\"/>\n                                    <constraint firstAttribute=\"trailing\" secondItem=\"YlR-nU-l4e\" secondAttribute=\"trailing\" id=\"NQW-Q7-jzW\"/>\n                                    <constraint firstAttribute=\"bottom\" secondItem=\"YlR-nU-l4e\" secondAttribute=\"bottom\" id=\"gtL-Mq-h1t\"/>\n                                    <constraint firstItem=\"YlR-nU-l4e\" firstAttribute=\"leading\" secondItem=\"Smt-SB-fPR\" secondAttribute=\"leading\" id=\"ree-ek-qnH\"/>\n                                </constraints>\n                            </view>\n                        </subviews>\n                        <color key=\"backgroundColor\" red=\"1\" green=\"1\" blue=\"1\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n                        <constraints>\n                            <constraint firstAttribute=\"trailingMargin\" secondItem=\"Smt-SB-fPR\" secondAttribute=\"trailing\" constant=\"-8\" id=\"UZN-sP-FLb\"/>\n                            <constraint firstItem=\"Smt-SB-fPR\" firstAttribute=\"leading\" secondItem=\"avv-gL-cZN\" secondAttribute=\"leadingMargin\" constant=\"-8\" id=\"b1U-G1-Z85\"/>\n                            <constraint firstItem=\"Smt-SB-fPR\" firstAttribute=\"top\" secondItem=\"VGy-yS-UUG\" secondAttribute=\"top\" constant=\"80\" id=\"m9f-Hc-sR9\"/>\n                            <constraint firstItem=\"VGy-yS-UUG\" firstAttribute=\"bottom\" secondItem=\"Smt-SB-fPR\" secondAttribute=\"bottom\" constant=\"100\" id=\"zxz-aO-I01\"/>\n                        </constraints>\n                        <viewLayoutGuide key=\"safeArea\" id=\"VGy-yS-UUG\"/>\n                    </view>\n                    <connections>\n                        <outlet property=\"textView\" destination=\"YlR-nU-l4e\" id=\"RFp-NB-3jB\"/>\n                    </connections>\n                </viewController>\n                <placeholder placeholderIdentifier=\"IBFirstResponder\" id=\"4bV-mQ-nPu\" userLabel=\"First Responder\" sceneMemberID=\"firstResponder\"/>\n            </objects>\n            <point key=\"canvasLocation\" x=\"456\" y=\"3617\"/>\n        </scene>\n        <!--Receive-->\n        <scene sceneID=\"S9d-DQ-STL\">\n            <objects>\n                <viewController storyboardIdentifier=\"Receive\" id=\"zWN-ve-V1H\" customClass=\"TLReceiveViewController\" sceneMemberID=\"viewController\">\n                    <view key=\"view\" contentMode=\"scaleToFill\" id=\"s0k-Wg-a4k\">\n                        <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"375\" height=\"667\"/>\n                        <autoresizingMask key=\"autoresizingMask\" widthSizable=\"YES\" heightSizable=\"YES\"/>\n                        <subviews>\n                            <label opaque=\"NO\" userInteractionEnabled=\"NO\" contentMode=\"left\" horizontalHuggingPriority=\"251\" verticalHuggingPriority=\"251\" text=\"From:\" lineBreakMode=\"tailTruncation\" baselineAdjustment=\"alignBaselines\" adjustsFontSizeToFit=\"NO\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"OX8-v3-aou\">\n                                <rect key=\"frame\" x=\"8\" y=\"72\" width=\"44\" height=\"21\"/>\n                                <fontDescription key=\"fontDescription\" type=\"system\" pointSize=\"17\"/>\n                                <color key=\"textColor\" red=\"0.0\" green=\"0.0\" blue=\"0.0\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n                                <nil key=\"highlightedColor\"/>\n                            </label>\n                            <view contentMode=\"scaleToFill\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"88g-Hh-q2e\">\n                                <rect key=\"frame\" x=\"8\" y=\"149\" width=\"359\" height=\"452\"/>\n                                <subviews>\n                                    <view contentMode=\"scaleToFill\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"8I8-UD-RQi\">\n                                        <rect key=\"frame\" x=\"0.0\" y=\"412\" width=\"359\" height=\"40\"/>\n                                        <subviews>\n                                            <pageControl opaque=\"NO\" contentMode=\"scaleToFill\" contentHorizontalAlignment=\"center\" contentVerticalAlignment=\"center\" numberOfPages=\"3\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"UtA-WC-DYv\">\n                                                <rect key=\"frame\" x=\"0.0\" y=\"1\" width=\"359\" height=\"37\"/>\n                                                <color key=\"backgroundColor\" red=\"0.062279825470000001\" green=\"1\" blue=\"0.22195490649999999\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n                                                <userDefinedRuntimeAttributes>\n                                                    <userDefinedRuntimeAttribute type=\"string\" keyPath=\"layer.cornerRadius\" value=\"5\"/>\n                                                </userDefinedRuntimeAttributes>\n                                                <connections>\n                                                    <action selector=\"changePage:\" destination=\"zWN-ve-V1H\" eventType=\"valueChanged\" id=\"9sY-1b-WG5\"/>\n                                                </connections>\n                                            </pageControl>\n                                        </subviews>\n                                        <color key=\"backgroundColor\" red=\"0.1649834104\" green=\"1\" blue=\"0.99004048529999999\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n                                        <constraints>\n                                            <constraint firstItem=\"UtA-WC-DYv\" firstAttribute=\"leading\" secondItem=\"8I8-UD-RQi\" secondAttribute=\"leading\" id=\"REV-8B-ehj\"/>\n                                            <constraint firstAttribute=\"bottom\" secondItem=\"UtA-WC-DYv\" secondAttribute=\"bottom\" constant=\"2\" id=\"Ut0-q6-IIF\"/>\n                                            <constraint firstItem=\"UtA-WC-DYv\" firstAttribute=\"top\" secondItem=\"8I8-UD-RQi\" secondAttribute=\"top\" constant=\"1\" id=\"Z4a-ay-s83\"/>\n                                            <constraint firstAttribute=\"trailing\" secondItem=\"UtA-WC-DYv\" secondAttribute=\"trailing\" id=\"icw-yb-LW0\"/>\n                                        </constraints>\n                                        <userDefinedRuntimeAttributes>\n                                            <userDefinedRuntimeAttribute type=\"string\" keyPath=\"layer.cornerRadius\" value=\"5\"/>\n                                        </userDefinedRuntimeAttributes>\n                                    </view>\n                                    <scrollView clipsSubviews=\"YES\" multipleTouchEnabled=\"YES\" contentMode=\"scaleToFill\" ambiguous=\"YES\" bounces=\"NO\" alwaysBounceHorizontal=\"YES\" pagingEnabled=\"YES\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"rBN-J3-oWa\">\n                                        <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"584\" height=\"337\"/>\n                                        <subviews>\n                                            <view contentMode=\"scaleToFill\" fixedFrame=\"YES\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"sIs-U3-euc\">\n                                                <autoresizingMask key=\"autoresizingMask\" flexibleMaxX=\"YES\" flexibleMaxY=\"YES\"/>\n                                                <color key=\"backgroundColor\" red=\"1\" green=\"1\" blue=\"1\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n                                            </view>\n                                        </subviews>\n                                        <color key=\"backgroundColor\" red=\"0.062279825470000001\" green=\"1\" blue=\"0.22195490649999999\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n                                        <userDefinedRuntimeAttributes>\n                                            <userDefinedRuntimeAttribute type=\"string\" keyPath=\"layer.cornerRadius\" value=\"5\"/>\n                                        </userDefinedRuntimeAttributes>\n                                    </scrollView>\n                                </subviews>\n                                <color key=\"backgroundColor\" red=\"1\" green=\"1\" blue=\"1\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n                                <constraints>\n                                    <constraint firstAttribute=\"trailing\" secondItem=\"8I8-UD-RQi\" secondAttribute=\"trailing\" id=\"3xd-uc-BIn\"/>\n                                    <constraint firstItem=\"8I8-UD-RQi\" firstAttribute=\"leading\" secondItem=\"88g-Hh-q2e\" secondAttribute=\"leading\" id=\"A7a-by-mxq\"/>\n                                    <constraint firstItem=\"8I8-UD-RQi\" firstAttribute=\"top\" secondItem=\"rBN-J3-oWa\" secondAttribute=\"bottom\" constant=\"8\" id=\"JY4-Oi-NJE\"/>\n                                    <constraint firstAttribute=\"trailing\" secondItem=\"rBN-J3-oWa\" secondAttribute=\"trailing\" id=\"Jf0-bd-VhI\"/>\n                                    <constraint firstItem=\"rBN-J3-oWa\" firstAttribute=\"top\" secondItem=\"88g-Hh-q2e\" secondAttribute=\"top\" id=\"WwQ-SG-7CG\"/>\n                                    <constraint firstAttribute=\"bottom\" secondItem=\"8I8-UD-RQi\" secondAttribute=\"bottom\" id=\"l5T-EC-f6o\"/>\n                                    <constraint firstItem=\"rBN-J3-oWa\" firstAttribute=\"leading\" secondItem=\"88g-Hh-q2e\" secondAttribute=\"leading\" id=\"n7m-39-bdT\"/>\n                                    <constraint firstAttribute=\"trailing\" secondItem=\"8I8-UD-RQi\" secondAttribute=\"trailing\" id=\"sOS-Nr-AOX\"/>\n                                    <constraint firstItem=\"8I8-UD-RQi\" firstAttribute=\"leading\" secondItem=\"88g-Hh-q2e\" secondAttribute=\"leading\" id=\"vGM-v2-4jf\"/>\n                                </constraints>\n                            </view>\n                            <tabBar contentMode=\"scaleToFill\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"GD9-CA-2hf\">\n                                <rect key=\"frame\" x=\"0.0\" y=\"617\" width=\"375\" height=\"49\"/>\n                                <color key=\"backgroundColor\" red=\"0.0\" green=\"0.0\" blue=\"0.0\" alpha=\"0.0\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n                                <items>\n                                    <tabBarItem title=\"Send\" image=\"upload.png\" id=\"KIz-U8-UaX\"/>\n                                    <tabBarItem tag=\"1\" title=\"Receive\" image=\"download.png\" id=\"4vC-pM-f1o\"/>\n                                </items>\n                                <connections>\n                                    <outlet property=\"delegate\" destination=\"zWN-ve-V1H\" id=\"8PL-iG-AI3\"/>\n                                </connections>\n                            </tabBar>\n                            <view contentMode=\"scaleToFill\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"nfd-UK-9Ze\" customClass=\"UIButton\">\n                                <rect key=\"frame\" x=\"8\" y=\"101\" width=\"359\" height=\"40\"/>\n                                <subviews>\n                                    <label opaque=\"NO\" userInteractionEnabled=\"NO\" contentMode=\"left\" horizontalHuggingPriority=\"251\" verticalHuggingPriority=\"251\" text=\"Label\" textAlignment=\"right\" lineBreakMode=\"tailTruncation\" baselineAdjustment=\"alignBaselines\" adjustsFontSizeToFit=\"NO\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"AHj-6Y-pf6\">\n                                        <rect key=\"frame\" x=\"257\" y=\"0.0\" width=\"44\" height=\"40\"/>\n                                        <constraints>\n                                            <constraint firstAttribute=\"width\" relation=\"greaterThanOrEqual\" priority=\"750\" constant=\"42\" id=\"58x-gv-RfW\"/>\n                                        </constraints>\n                                        <fontDescription key=\"fontDescription\" type=\"boldSystem\" pointSize=\"17\"/>\n                                        <color key=\"textColor\" red=\"0.0\" green=\"0.0\" blue=\"0.0\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n                                        <nil key=\"highlightedColor\"/>\n                                    </label>\n                                    <activityIndicatorView opaque=\"NO\" contentMode=\"scaleToFill\" horizontalHuggingPriority=\"750\" verticalHuggingPriority=\"750\" style=\"gray\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"YBK-C9-woO\">\n                                        <rect key=\"frame\" x=\"229\" y=\"8\" width=\"20\" height=\"20\"/>\n                                    </activityIndicatorView>\n                                    <imageView userInteractionEnabled=\"NO\" contentMode=\"scaleToFill\" horizontalHuggingPriority=\"251\" verticalHuggingPriority=\"251\" image=\"arrow-right7.png\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"lPd-y7-C0X\">\n                                        <rect key=\"frame\" x=\"314\" y=\"0.0\" width=\"45\" height=\"40\"/>\n                                    </imageView>\n                                    <label opaque=\"NO\" userInteractionEnabled=\"NO\" contentMode=\"left\" horizontalHuggingPriority=\"251\" verticalHuggingPriority=\"251\" text=\"Account Name\" lineBreakMode=\"tailTruncation\" baselineAdjustment=\"alignBaselines\" adjustsFontSizeToFit=\"NO\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"qKO-FH-M15\">\n                                        <rect key=\"frame\" x=\"8\" y=\"0.0\" width=\"83\" height=\"40\"/>\n                                        <constraints>\n                                            <constraint firstAttribute=\"width\" relation=\"lessThanOrEqual\" priority=\"250\" constant=\"440\" id=\"i7f-ss-Nlp\"/>\n                                            <constraint firstAttribute=\"width\" constant=\"240\" id=\"t2q-lx-NOw\"/>\n                                        </constraints>\n                                        <fontDescription key=\"fontDescription\" type=\"system\" pointSize=\"12\"/>\n                                        <color key=\"textColor\" red=\"0.0\" green=\"0.0\" blue=\"0.0\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n                                        <nil key=\"highlightedColor\"/>\n                                        <variation key=\"default\">\n                                            <mask key=\"constraints\">\n                                                <exclude reference=\"t2q-lx-NOw\"/>\n                                            </mask>\n                                        </variation>\n                                    </label>\n                                </subviews>\n                                <color key=\"backgroundColor\" red=\"0.99146699279999995\" green=\"1\" blue=\"0.21020077370000001\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n                                <gestureRecognizers/>\n                                <constraints>\n                                    <constraint firstAttribute=\"trailing\" secondItem=\"AHj-6Y-pf6\" secondAttribute=\"trailing\" constant=\"98\" id=\"0ZO-xV-CRR\"/>\n                                    <constraint firstItem=\"qKO-FH-M15\" firstAttribute=\"top\" secondItem=\"lPd-y7-C0X\" secondAttribute=\"top\" id=\"0jt-dO-Q8R\"/>\n                                    <constraint firstAttribute=\"trailing\" secondItem=\"AHj-6Y-pf6\" secondAttribute=\"trailing\" constant=\"98\" id=\"1EG-Ft-khU\"/>\n                                    <constraint firstItem=\"lPd-y7-C0X\" firstAttribute=\"centerY\" secondItem=\"YBK-C9-woO\" secondAttribute=\"centerY\" id=\"1wW-vF-sZu\"/>\n                                    <constraint firstItem=\"qKO-FH-M15\" firstAttribute=\"baseline\" secondItem=\"AHj-6Y-pf6\" secondAttribute=\"baseline\" id=\"2WO-nb-2Al\"/>\n                                    <constraint firstItem=\"qKO-FH-M15\" firstAttribute=\"leading\" secondItem=\"nfd-UK-9Ze\" secondAttribute=\"leading\" id=\"2n8-JN-HYY\"/>\n                                    <constraint firstItem=\"qKO-FH-M15\" firstAttribute=\"bottom\" secondItem=\"lPd-y7-C0X\" secondAttribute=\"bottom\" id=\"57u-ao-lf3\"/>\n                                    <constraint firstAttribute=\"trailing\" secondItem=\"lPd-y7-C0X\" secondAttribute=\"trailing\" id=\"64t-wv-PeX\"/>\n                                    <constraint firstItem=\"qKO-FH-M15\" firstAttribute=\"firstBaseline\" secondItem=\"AHj-6Y-pf6\" secondAttribute=\"firstBaseline\" id=\"6mR-DM-7IK\"/>\n                                    <constraint firstItem=\"YBK-C9-woO\" firstAttribute=\"leading\" secondItem=\"AHj-6Y-pf6\" secondAttribute=\"trailing\" constant=\"8\" id=\"9So-ht-63f\"/>\n                                    <constraint firstItem=\"qKO-FH-M15\" firstAttribute=\"top\" secondItem=\"nfd-UK-9Ze\" secondAttribute=\"top\" id=\"Bu1-JE-ZJ2\"/>\n                                    <constraint firstAttribute=\"bottom\" secondItem=\"YBK-C9-woO\" secondAttribute=\"bottom\" constant=\"12\" id=\"CpQ-eJ-VoN\"/>\n                                    <constraint firstAttribute=\"trailing\" secondItem=\"YBK-C9-woO\" secondAttribute=\"trailing\" constant=\"70\" id=\"DIr-Gc-cng\"/>\n                                    <constraint firstAttribute=\"bottom\" secondItem=\"qKO-FH-M15\" secondAttribute=\"bottom\" id=\"Fby-5Q-aAN\"/>\n                                    <constraint firstItem=\"AHj-6Y-pf6\" firstAttribute=\"leading\" secondItem=\"qKO-FH-M15\" secondAttribute=\"trailing\" constant=\"8\" id=\"GUd-LY-VGN\"/>\n                                    <constraint firstItem=\"AHj-6Y-pf6\" firstAttribute=\"top\" secondItem=\"nfd-UK-9Ze\" secondAttribute=\"top\" id=\"JKm-OV-F0V\"/>\n                                    <constraint firstAttribute=\"bottom\" secondItem=\"AHj-6Y-pf6\" secondAttribute=\"bottom\" id=\"LT5-1Z-Lpw\"/>\n                                    <constraint firstAttribute=\"bottom\" secondItem=\"qKO-FH-M15\" secondAttribute=\"bottom\" id=\"MMA-Zx-vUs\"/>\n                                    <constraint firstItem=\"lPd-y7-C0X\" firstAttribute=\"top\" secondItem=\"AHj-6Y-pf6\" secondAttribute=\"top\" id=\"P3N-Nq-wZz\"/>\n                                    <constraint firstItem=\"lPd-y7-C0X\" firstAttribute=\"leading\" secondItem=\"AHj-6Y-pf6\" secondAttribute=\"trailing\" constant=\"13\" id=\"P6m-eA-e7H\"/>\n                                    <constraint firstItem=\"YBK-C9-woO\" firstAttribute=\"top\" secondItem=\"nfd-UK-9Ze\" secondAttribute=\"top\" constant=\"8\" id=\"Pmm-oR-C5K\"/>\n                                    <constraint firstItem=\"qKO-FH-M15\" firstAttribute=\"bottom\" secondItem=\"AHj-6Y-pf6\" secondAttribute=\"bottom\" id=\"TzQ-j8-HQz\"/>\n                                    <constraint firstAttribute=\"trailing\" secondItem=\"AHj-6Y-pf6\" secondAttribute=\"trailing\" constant=\"58\" id=\"VP9-mp-sl6\"/>\n                                    <constraint firstItem=\"qKO-FH-M15\" firstAttribute=\"centerY\" secondItem=\"lPd-y7-C0X\" secondAttribute=\"centerY\" id=\"XGW-tE-DTf\"/>\n                                    <constraint firstItem=\"qKO-FH-M15\" firstAttribute=\"centerY\" secondItem=\"YBK-C9-woO\" secondAttribute=\"centerY\" id=\"YQm-CC-Vrr\"/>\n                                    <constraint firstItem=\"lPd-y7-C0X\" firstAttribute=\"leading\" secondItem=\"YBK-C9-woO\" secondAttribute=\"trailing\" constant=\"8\" id=\"YtP-DN-GWc\"/>\n                                    <constraint firstItem=\"qKO-FH-M15\" firstAttribute=\"top\" secondItem=\"nfd-UK-9Ze\" secondAttribute=\"top\" id=\"YzW-Sh-Xb8\"/>\n                                    <constraint firstItem=\"qKO-FH-M15\" firstAttribute=\"leading\" secondItem=\"nfd-UK-9Ze\" secondAttribute=\"leading\" constant=\"8\" id=\"beZ-0B-9bH\"/>\n                                    <constraint firstItem=\"qKO-FH-M15\" firstAttribute=\"leading\" secondItem=\"nfd-UK-9Ze\" secondAttribute=\"leading\" id=\"caJ-BT-ysV\"/>\n                                    <constraint firstItem=\"AHj-6Y-pf6\" firstAttribute=\"leading\" secondItem=\"YBK-C9-woO\" secondAttribute=\"trailing\" constant=\"8\" id=\"hDT-fM-OSN\"/>\n                                    <constraint firstItem=\"YBK-C9-woO\" firstAttribute=\"leading\" relation=\"greaterThanOrEqual\" secondItem=\"qKO-FH-M15\" secondAttribute=\"trailing\" constant=\"8\" id=\"hXC-M5-cpu\"/>\n                                    <constraint firstItem=\"qKO-FH-M15\" firstAttribute=\"leading\" secondItem=\"nfd-UK-9Ze\" secondAttribute=\"leading\" id=\"juj-yJ-tAF\"/>\n                                    <constraint firstItem=\"qKO-FH-M15\" firstAttribute=\"top\" secondItem=\"nfd-UK-9Ze\" secondAttribute=\"top\" id=\"npn-jX-BlU\"/>\n                                    <constraint firstItem=\"qKO-FH-M15\" firstAttribute=\"top\" secondItem=\"AHj-6Y-pf6\" secondAttribute=\"top\" id=\"nvC-Zn-jUy\"/>\n                                    <constraint firstItem=\"qKO-FH-M15\" firstAttribute=\"top\" secondItem=\"nfd-UK-9Ze\" secondAttribute=\"top\" id=\"oeT-Gl-ST0\"/>\n                                    <constraint firstItem=\"lPd-y7-C0X\" firstAttribute=\"bottom\" secondItem=\"AHj-6Y-pf6\" secondAttribute=\"bottom\" id=\"q9U-eW-WiX\"/>\n                                </constraints>\n                                <userDefinedRuntimeAttributes>\n                                    <userDefinedRuntimeAttribute type=\"string\" keyPath=\"layer.cornerRadius\" value=\"5\"/>\n                                </userDefinedRuntimeAttributes>\n                                <variation key=\"default\">\n                                    <mask key=\"constraints\">\n                                        <exclude reference=\"0jt-dO-Q8R\"/>\n                                        <exclude reference=\"2WO-nb-2Al\"/>\n                                        <exclude reference=\"2n8-JN-HYY\"/>\n                                        <exclude reference=\"57u-ao-lf3\"/>\n                                        <exclude reference=\"6mR-DM-7IK\"/>\n                                        <exclude reference=\"Bu1-JE-ZJ2\"/>\n                                        <exclude reference=\"MMA-Zx-vUs\"/>\n                                        <exclude reference=\"TzQ-j8-HQz\"/>\n                                        <exclude reference=\"XGW-tE-DTf\"/>\n                                        <exclude reference=\"YQm-CC-Vrr\"/>\n                                        <exclude reference=\"YzW-Sh-Xb8\"/>\n                                        <exclude reference=\"caJ-BT-ysV\"/>\n                                        <exclude reference=\"juj-yJ-tAF\"/>\n                                        <exclude reference=\"nvC-Zn-jUy\"/>\n                                        <exclude reference=\"oeT-Gl-ST0\"/>\n                                        <exclude reference=\"9So-ht-63f\"/>\n                                        <exclude reference=\"DIr-Gc-cng\"/>\n                                        <exclude reference=\"0ZO-xV-CRR\"/>\n                                        <exclude reference=\"1EG-Ft-khU\"/>\n                                        <exclude reference=\"GUd-LY-VGN\"/>\n                                        <exclude reference=\"1wW-vF-sZu\"/>\n                                        <exclude reference=\"YtP-DN-GWc\"/>\n                                    </mask>\n                                </variation>\n                                <connections>\n                                    <outletCollection property=\"gestureRecognizers\" destination=\"43E-6F-s2E\" appends=\"YES\" id=\"N4G-ux-oYe\"/>\n                                </connections>\n                            </view>\n                        </subviews>\n                        <color key=\"backgroundColor\" red=\"1\" green=\"1\" blue=\"1\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n                        <constraints>\n                            <constraint firstAttribute=\"trailingMargin\" secondItem=\"nfd-UK-9Ze\" secondAttribute=\"trailing\" constant=\"-8\" id=\"1LC-QJ-epj\"/>\n                            <constraint firstItem=\"nfd-UK-9Ze\" firstAttribute=\"top\" secondItem=\"OX8-v3-aou\" secondAttribute=\"bottom\" constant=\"8\" id=\"5xa-MC-kd4\"/>\n                            <constraint firstItem=\"f7i-Wg-kxT\" firstAttribute=\"bottom\" secondItem=\"88g-Hh-q2e\" secondAttribute=\"bottom\" constant=\"66\" id=\"6gw-y6-pLf\"/>\n                            <constraint firstItem=\"f7i-Wg-kxT\" firstAttribute=\"bottom\" secondItem=\"GD9-CA-2hf\" secondAttribute=\"bottom\" constant=\"1\" id=\"8Sh-QF-xgb\"/>\n                            <constraint firstItem=\"nfd-UK-9Ze\" firstAttribute=\"leading\" secondItem=\"s0k-Wg-a4k\" secondAttribute=\"leadingMargin\" constant=\"-8\" id=\"CMQ-Kh-UfU\"/>\n                            <constraint firstItem=\"88g-Hh-q2e\" firstAttribute=\"top\" secondItem=\"nfd-UK-9Ze\" secondAttribute=\"bottom\" constant=\"8\" id=\"Fg2-B2-SOF\"/>\n                            <constraint firstItem=\"OX8-v3-aou\" firstAttribute=\"top\" secondItem=\"f7i-Wg-kxT\" secondAttribute=\"top\" constant=\"8\" id=\"MTT-B2-pT0\"/>\n                            <constraint firstAttribute=\"trailingMargin\" secondItem=\"88g-Hh-q2e\" secondAttribute=\"trailing\" constant=\"-8\" id=\"Pwf-NR-tib\"/>\n                            <constraint firstItem=\"88g-Hh-q2e\" firstAttribute=\"leading\" secondItem=\"s0k-Wg-a4k\" secondAttribute=\"leadingMargin\" constant=\"-8\" id=\"TFX-QM-U0b\"/>\n                            <constraint firstItem=\"OX8-v3-aou\" firstAttribute=\"leading\" secondItem=\"s0k-Wg-a4k\" secondAttribute=\"leadingMargin\" constant=\"-8\" id=\"l0z-dQ-EKI\"/>\n                            <constraint firstAttribute=\"trailingMargin\" secondItem=\"GD9-CA-2hf\" secondAttribute=\"trailing\" constant=\"-16\" id=\"qnh-NA-nUg\"/>\n                            <constraint firstItem=\"GD9-CA-2hf\" firstAttribute=\"leading\" secondItem=\"s0k-Wg-a4k\" secondAttribute=\"leadingMargin\" constant=\"-16\" id=\"zeJ-Xu-fDB\"/>\n                        </constraints>\n                        <viewLayoutGuide key=\"safeArea\" id=\"f7i-Wg-kxT\"/>\n                    </view>\n                    <navigationItem key=\"navigationItem\" title=\"Receive\" id=\"wZG-Zf-k4F\">\n                        <barButtonItem key=\"leftBarButtonItem\" image=\"list.png\" id=\"o35-om-lj0\">\n                            <connections>\n                                <action selector=\"menuButtonClicked:\" destination=\"zWN-ve-V1H\" id=\"tCK-H1-jsu\"/>\n                            </connections>\n                        </barButtonItem>\n                    </navigationItem>\n                    <connections>\n                        <outlet property=\"accountBalanceLabel\" destination=\"AHj-6Y-pf6\" id=\"ajI-uP-cCS\"/>\n                        <outlet property=\"accountNameLabel\" destination=\"qKO-FH-M15\" id=\"cud-Er-cCR\"/>\n                        <outlet property=\"balanceActivityIndicatorView\" destination=\"YBK-C9-woO\" id=\"etN-RI-2t0\"/>\n                        <outlet property=\"fromViewContainer\" destination=\"nfd-UK-9Ze\" id=\"wsx-uy-Bhq\"/>\n                        <outlet property=\"pageControlViewContainer\" destination=\"8I8-UD-RQi\" id=\"LOv-Ql-tfy\"/>\n                        <outlet property=\"receiveAddressesPageControl\" destination=\"UtA-WC-DYv\" id=\"CVG-QY-xcp\"/>\n                        <outlet property=\"receiveAddressesScrollView\" destination=\"rBN-J3-oWa\" id=\"KoT-5p-G4T\"/>\n                        <outlet property=\"receiveLabel\" destination=\"OX8-v3-aou\" id=\"XI5-DR-qMn\"/>\n                        <outlet property=\"receivingAddressPageControl\" destination=\"UtA-WC-DYv\" id=\"6ch-bW-aRF\"/>\n                        <outlet property=\"scrollContentView\" destination=\"sIs-U3-euc\" id=\"ZOL-1T-Zf0\"/>\n                        <outlet property=\"selectAccountImageView\" destination=\"lPd-y7-C0X\" id=\"pWK-ln-9Fs\"/>\n                        <outlet property=\"tabBar\" destination=\"GD9-CA-2hf\" id=\"hKP-IU-Nvq\"/>\n                    </connections>\n                </viewController>\n                <placeholder placeholderIdentifier=\"IBFirstResponder\" id=\"i2t-Pf-2T5\" userLabel=\"First Responder\" sceneMemberID=\"firstResponder\"/>\n                <tapGestureRecognizer id=\"43E-6F-s2E\">\n                    <connections>\n                        <segue destination=\"mbh-2x-bRM\" kind=\"show\" identifier=\"selectAccount\" id=\"jbc-qB-Ba2\"/>\n                    </connections>\n                </tapGestureRecognizer>\n            </objects>\n            <point key=\"canvasLocation\" x=\"413.60000000000002\" y=\"848.72563718140941\"/>\n        </scene>\n        <!--Navigation Controller-->\n        <scene sceneID=\"WDW-rz-yl0\">\n            <objects>\n                <navigationController storyboardIdentifier=\"LinksNav\" id=\"sNT-lv-wee\" sceneMemberID=\"viewController\">\n                    <navigationBar key=\"navigationBar\" contentMode=\"scaleToFill\" id=\"lDd-kh-JbU\">\n                        <rect key=\"frame\" x=\"0.0\" y=\"20\" width=\"375\" height=\"44\"/>\n                        <autoresizingMask key=\"autoresizingMask\"/>\n                    </navigationBar>\n                    <connections>\n                        <segue destination=\"t5N-dq-DrK\" kind=\"relationship\" relationship=\"rootViewController\" id=\"aKs-IH-KrB\"/>\n                    </connections>\n                </navigationController>\n                <placeholder placeholderIdentifier=\"IBFirstResponder\" id=\"JxO-5c-2ce\" userLabel=\"First Responder\" sceneMemberID=\"firstResponder\"/>\n            </objects>\n            <point key=\"canvasLocation\" x=\"-300\" y=\"4281\"/>\n        </scene>\n        <!--Links-->\n        <scene sceneID=\"W8O-8i-HwF\">\n            <objects>\n                <viewController storyboardIdentifier=\"Links\" id=\"t5N-dq-DrK\" customClass=\"TLLinksViewController\" sceneMemberID=\"viewController\">\n                    <view key=\"view\" contentMode=\"scaleToFill\" id=\"fy8-UP-bbX\">\n                        <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"375\" height=\"667\"/>\n                        <autoresizingMask key=\"autoresizingMask\" widthSizable=\"YES\" heightSizable=\"YES\"/>\n                        <subviews>\n                            <tableView clipsSubviews=\"YES\" contentMode=\"scaleToFill\" alwaysBounceVertical=\"YES\" dataMode=\"prototypes\" style=\"grouped\" separatorStyle=\"default\" rowHeight=\"44\" sectionHeaderHeight=\"10\" sectionFooterHeight=\"10\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"bXB-co-Rhc\">\n                                <rect key=\"frame\" x=\"-4\" y=\"64\" width=\"383\" height=\"603\"/>\n                                <color key=\"backgroundColor\" red=\"0.93725490199999995\" green=\"0.93725490199999995\" blue=\"0.95686274510000002\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n                                <prototypes>\n                                    <tableViewCell contentMode=\"scaleToFill\" selectionStyle=\"default\" accessoryType=\"disclosureIndicator\" indentationWidth=\"10\" reuseIdentifier=\"LinksCellIdentifier\" textLabel=\"2WH-yM-ULb\" style=\"IBUITableViewCellStyleDefault\" id=\"Ba1-Hr-xBU\">\n                                        <rect key=\"frame\" x=\"0.0\" y=\"55.5\" width=\"383\" height=\"44\"/>\n                                        <autoresizingMask key=\"autoresizingMask\"/>\n                                        <tableViewCellContentView key=\"contentView\" opaque=\"NO\" clipsSubviews=\"YES\" multipleTouchEnabled=\"YES\" contentMode=\"center\" tableViewCell=\"Ba1-Hr-xBU\" id=\"zfZ-aF-zTE\">\n                                            <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"350\" height=\"43.5\"/>\n                                            <autoresizingMask key=\"autoresizingMask\"/>\n                                            <subviews>\n                                                <label opaque=\"NO\" multipleTouchEnabled=\"YES\" contentMode=\"left\" text=\"Title\" textAlignment=\"natural\" lineBreakMode=\"tailTruncation\" baselineAdjustment=\"alignBaselines\" adjustsFontSizeToFit=\"NO\" id=\"2WH-yM-ULb\">\n                                                    <rect key=\"frame\" x=\"15\" y=\"0.0\" width=\"333\" height=\"43.5\"/>\n                                                    <autoresizingMask key=\"autoresizingMask\" flexibleMaxX=\"YES\" flexibleMaxY=\"YES\"/>\n                                                    <fontDescription key=\"fontDescription\" type=\"system\" pointSize=\"16\"/>\n                                                    <color key=\"textColor\" red=\"0.0\" green=\"0.0\" blue=\"0.0\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n                                                    <nil key=\"highlightedColor\"/>\n                                                </label>\n                                            </subviews>\n                                        </tableViewCellContentView>\n                                    </tableViewCell>\n                                </prototypes>\n                            </tableView>\n                        </subviews>\n                        <color key=\"backgroundColor\" red=\"1\" green=\"1\" blue=\"1\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n                        <constraints>\n                            <constraint firstAttribute=\"trailingMargin\" secondItem=\"bXB-co-Rhc\" secondAttribute=\"trailing\" constant=\"-20\" id=\"B27-i4-iSb\"/>\n                            <constraint firstItem=\"qMf-76-jBs\" firstAttribute=\"bottom\" secondItem=\"bXB-co-Rhc\" secondAttribute=\"bottom\" id=\"HOQ-J3-RYe\"/>\n                            <constraint firstItem=\"bXB-co-Rhc\" firstAttribute=\"top\" secondItem=\"fy8-UP-bbX\" secondAttribute=\"topMargin\" id=\"Jab-gO-ubP\"/>\n                            <constraint firstItem=\"bXB-co-Rhc\" firstAttribute=\"leading\" secondItem=\"fy8-UP-bbX\" secondAttribute=\"leadingMargin\" constant=\"-20\" id=\"omC-SX-LXe\"/>\n                        </constraints>\n                        <viewLayoutGuide key=\"safeArea\" id=\"qMf-76-jBs\"/>\n                    </view>\n                    <navigationItem key=\"navigationItem\" title=\"Links\" id=\"4vj-uf-BUZ\">\n                        <barButtonItem key=\"leftBarButtonItem\" image=\"list.png\" id=\"Cnu-yj-zw1\">\n                            <connections>\n                                <action selector=\"menuButtonClicked:\" destination=\"t5N-dq-DrK\" id=\"r6j-nS-kxE\"/>\n                            </connections>\n                        </barButtonItem>\n                    </navigationItem>\n                    <connections>\n                        <outlet property=\"linksTableView\" destination=\"bXB-co-Rhc\" id=\"f9m-q4-iOd\"/>\n                        <segue destination=\"2ys-DS-bOJ\" kind=\"show\" identifier=\"SegueText2\" id=\"s7I-Xo-HUH\"/>\n                    </connections>\n                </viewController>\n                <placeholder placeholderIdentifier=\"IBFirstResponder\" id=\"1N4-9f-aYi\" userLabel=\"First Responder\" sceneMemberID=\"firstResponder\"/>\n            </objects>\n            <point key=\"canvasLocation\" x=\"463\" y=\"4269\"/>\n        </scene>\n        <!--Review Payment View Controller-->\n        <scene sceneID=\"OjR-Fo-fnK\">\n            <objects>\n                <viewController storyboardIdentifier=\"ReviewPayment\" id=\"BoH-fs-Zva\" customClass=\"TLReviewPaymentViewController\" sceneMemberID=\"viewController\">\n                    <view key=\"view\" contentMode=\"scaleToFill\" id=\"fFb-o3-9od\">\n                        <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"375\" height=\"667\"/>\n                        <autoresizingMask key=\"autoresizingMask\" widthSizable=\"YES\" heightSizable=\"YES\"/>\n                        <subviews>\n                            <navigationBar contentMode=\"scaleToFill\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"U2m-ef-UaP\">\n                                <rect key=\"frame\" x=\"-8\" y=\"20\" width=\"391\" height=\"44\"/>\n                                <color key=\"barTintColor\" red=\"1\" green=\"1\" blue=\"1\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n                                <items>\n                                    <navigationItem title=\"Confirm Payment\" id=\"or3-6l-X5f\">\n                                        <barButtonItem key=\"leftBarButtonItem\" systemItem=\"cancel\" id=\"eyr-Og-UY6\">\n                                            <connections>\n                                                <action selector=\"cancel:\" destination=\"BoH-fs-Zva\" id=\"8m9-Ph-40R\"/>\n                                            </connections>\n                                        </barButtonItem>\n                                    </navigationItem>\n                                </items>\n                            </navigationBar>\n                            <view contentMode=\"scaleToFill\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"H5t-HQ-sZs\">\n                                <rect key=\"frame\" x=\"-8\" y=\"65\" width=\"391\" height=\"602\"/>\n                                <subviews>\n                                    <label opaque=\"NO\" userInteractionEnabled=\"NO\" contentMode=\"left\" horizontalHuggingPriority=\"251\" verticalHuggingPriority=\"251\" text=\"From:\" lineBreakMode=\"tailTruncation\" baselineAdjustment=\"alignBaselines\" adjustsFontSizeToFit=\"NO\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"u6a-ff-Ab7\">\n                                        <rect key=\"frame\" x=\"16\" y=\"8\" width=\"359\" height=\"20.5\"/>\n                                        <fontDescription key=\"fontDescription\" type=\"boldSystem\" pointSize=\"17\"/>\n                                        <color key=\"textColor\" red=\"0.0\" green=\"0.0\" blue=\"0.0\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n                                        <nil key=\"highlightedColor\"/>\n                                    </label>\n                                    <label opaque=\"NO\" userInteractionEnabled=\"NO\" contentMode=\"left\" horizontalHuggingPriority=\"251\" verticalHuggingPriority=\"251\" text=\"To:\" lineBreakMode=\"tailTruncation\" baselineAdjustment=\"alignBaselines\" adjustsFontSizeToFit=\"NO\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"dLL-tj-JB2\">\n                                        <rect key=\"frame\" x=\"16\" y=\"73.5\" width=\"359\" height=\"20.5\"/>\n                                        <fontDescription key=\"fontDescription\" type=\"boldSystem\" pointSize=\"17\"/>\n                                        <color key=\"textColor\" red=\"0.0\" green=\"0.0\" blue=\"0.0\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n                                        <nil key=\"highlightedColor\"/>\n                                    </label>\n                                    <label opaque=\"NO\" userInteractionEnabled=\"NO\" contentMode=\"left\" horizontalHuggingPriority=\"251\" verticalHuggingPriority=\"251\" text=\"vJmwhHhMNevDQh188gSeHd2xxxYGBQmnVuMY2yG2MmVTC31UWN5s3vaM3xsM2Q1bUremdK1W7eNVgPg1BnvbTyQuDtMKAYJanahvse\" lineBreakMode=\"wordWrap\" numberOfLines=\"2\" baselineAdjustment=\"alignBaselines\" adjustsFontSizeToFit=\"NO\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"Wyl-JC-mUk\">\n                                        <rect key=\"frame\" x=\"16\" y=\"102\" width=\"359\" height=\"32\"/>\n                                        <constraints>\n                                            <constraint firstAttribute=\"height\" constant=\"32\" id=\"ear-aF-NFN\"/>\n                                        </constraints>\n                                        <fontDescription key=\"fontDescription\" type=\"system\" pointSize=\"12\"/>\n                                        <color key=\"textColor\" red=\"0.0\" green=\"0.0\" blue=\"0.0\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n                                        <nil key=\"highlightedColor\"/>\n                                    </label>\n                                    <label opaque=\"NO\" userInteractionEnabled=\"NO\" contentMode=\"left\" horizontalHuggingPriority=\"251\" verticalHuggingPriority=\"251\" text=\"12c6DSiU4Rq3P4ZxziKxzrL5LmMBrzjrJX \" lineBreakMode=\"tailTruncation\" baselineAdjustment=\"alignBaselines\" adjustsFontSizeToFit=\"NO\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"PqG-LI-SgL\">\n                                        <rect key=\"frame\" x=\"16\" y=\"36.5\" width=\"359\" height=\"29\"/>\n                                        <constraints>\n                                            <constraint firstAttribute=\"height\" constant=\"29\" id=\"xEi-QW-6ad\"/>\n                                        </constraints>\n                                        <fontDescription key=\"fontDescription\" type=\"system\" pointSize=\"12\"/>\n                                        <color key=\"textColor\" red=\"0.0\" green=\"0.0\" blue=\"0.0\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n                                        <nil key=\"highlightedColor\"/>\n                                    </label>\n                                    <view contentMode=\"scaleToFill\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"oZR-cM-be2\">\n                                        <rect key=\"frame\" x=\"16\" y=\"142\" width=\"359\" height=\"380\"/>\n                                        <subviews>\n                                            <label opaque=\"NO\" userInteractionEnabled=\"NO\" contentMode=\"left\" horizontalHuggingPriority=\"251\" verticalHuggingPriority=\"251\" text=\"1000000.00\" textAlignment=\"natural\" lineBreakMode=\"tailTruncation\" baselineAdjustment=\"alignBaselines\" minimumFontSize=\"9\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"NfN-kQ-zfd\">\n                                                <rect key=\"frame\" x=\"251\" y=\"37\" width=\"100\" height=\"21\"/>\n                                                <constraints>\n                                                    <constraint firstAttribute=\"height\" constant=\"21\" id=\"5UG-hF-Sfy\"/>\n                                                    <constraint firstAttribute=\"width\" constant=\"148\" id=\"YIC-hU-rk5\"/>\n                                                    <constraint firstAttribute=\"width\" relation=\"greaterThanOrEqual\" constant=\"100\" id=\"jwf-ar-Si2\"/>\n                                                </constraints>\n                                                <fontDescription key=\"fontDescription\" type=\"system\" pointSize=\"17\"/>\n                                                <color key=\"textColor\" red=\"0.0\" green=\"0.0\" blue=\"0.0\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n                                                <nil key=\"highlightedColor\"/>\n                                                <variation key=\"default\">\n                                                    <mask key=\"constraints\">\n                                                        <exclude reference=\"YIC-hU-rk5\"/>\n                                                    </mask>\n                                                </variation>\n                                            </label>\n                                            <label opaque=\"NO\" userInteractionEnabled=\"NO\" contentMode=\"left\" horizontalHuggingPriority=\"251\" verticalHuggingPriority=\"251\" text=\"1000000.00\" textAlignment=\"natural\" lineBreakMode=\"tailTruncation\" baselineAdjustment=\"alignBaselines\" minimumFontSize=\"9\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"ict-FH-day\">\n                                                <rect key=\"frame\" x=\"251\" y=\"66\" width=\"100\" height=\"21\"/>\n                                                <constraints>\n                                                    <constraint firstAttribute=\"width\" constant=\"148\" id=\"05G-bN-nGl\"/>\n                                                    <constraint firstAttribute=\"height\" constant=\"21\" id=\"Epe-FR-zli\"/>\n                                                </constraints>\n                                                <fontDescription key=\"fontDescription\" type=\"system\" pointSize=\"17\"/>\n                                                <color key=\"textColor\" red=\"0.0\" green=\"0.0\" blue=\"0.0\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n                                                <nil key=\"highlightedColor\"/>\n                                                <variation key=\"default\">\n                                                    <mask key=\"constraints\">\n                                                        <exclude reference=\"05G-bN-nGl\"/>\n                                                    </mask>\n                                                </variation>\n                                            </label>\n                                            <label opaque=\"NO\" userInteractionEnabled=\"NO\" contentMode=\"left\" horizontalHuggingPriority=\"251\" verticalHuggingPriority=\"251\" text=\"1000000.00 USD\" textAlignment=\"natural\" lineBreakMode=\"tailTruncation\" baselineAdjustment=\"alignBaselines\" minimumFontSize=\"9\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"NGS-uf-qMF\">\n                                                <rect key=\"frame\" x=\"251\" y=\"143\" width=\"100\" height=\"20.5\"/>\n                                                <fontDescription key=\"fontDescription\" type=\"system\" pointSize=\"17\"/>\n                                                <color key=\"textColor\" red=\"0.0\" green=\"0.0\" blue=\"0.0\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n                                                <nil key=\"highlightedColor\"/>\n                                            </label>\n                                            <label opaque=\"NO\" userInteractionEnabled=\"NO\" contentMode=\"left\" horizontalHuggingPriority=\"251\" verticalHuggingPriority=\"251\" text=\"1,000,000.12345678\" textAlignment=\"natural\" lineBreakMode=\"tailTruncation\" baselineAdjustment=\"alignBaselines\" minimumFontSize=\"9\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"jQ2-VE-bsm\">\n                                                <rect key=\"frame\" x=\"84\" y=\"66\" width=\"151\" height=\"21\"/>\n                                                <constraints>\n                                                    <constraint firstAttribute=\"width\" constant=\"195\" id=\"VeI-1I-4q1\"/>\n                                                    <constraint firstAttribute=\"height\" constant=\"21\" id=\"mKZ-LK-ofM\"/>\n                                                </constraints>\n                                                <fontDescription key=\"fontDescription\" type=\"system\" pointSize=\"17\"/>\n                                                <color key=\"textColor\" red=\"0.0\" green=\"0.0\" blue=\"0.0\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n                                                <nil key=\"highlightedColor\"/>\n                                                <variation key=\"default\">\n                                                    <mask key=\"constraints\">\n                                                        <exclude reference=\"VeI-1I-4q1\"/>\n                                                    </mask>\n                                                </variation>\n                                            </label>\n                                            <button opaque=\"NO\" contentMode=\"scaleToFill\" contentHorizontalAlignment=\"center\" contentVerticalAlignment=\"center\" buttonType=\"infoLight\" showsTouchWhenHighlighted=\"YES\" lineBreakMode=\"middleTruncation\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"QVc-hR-SLY\">\n                                                <rect key=\"frame\" x=\"194\" y=\"99\" width=\"22\" height=\"22\"/>\n                                                <constraints>\n                                                    <constraint firstAttribute=\"height\" constant=\"22\" id=\"Kau-mH-Zvj\"/>\n                                                    <constraint firstAttribute=\"width\" constant=\"22\" id=\"XvI-wm-0xK\"/>\n                                                </constraints>\n                                                <connections>\n                                                    <action selector=\"feeInfoButtonClicked:\" destination=\"BoH-fs-Zva\" eventType=\"touchUpInside\" id=\"UXP-A5-evY\"/>\n                                                </connections>\n                                            </button>\n                                            <view contentMode=\"scaleToFill\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"cpe-kI-VzV\">\n                                                <rect key=\"frame\" x=\"0.0\" y=\"133\" width=\"359\" height=\"2\"/>\n                                                <color key=\"backgroundColor\" red=\"0.66666666666666663\" green=\"0.66666666666666663\" blue=\"0.66666666666666663\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n                                                <constraints>\n                                                    <constraint firstAttribute=\"height\" constant=\"2\" id=\"MkG-rt-UrA\"/>\n                                                </constraints>\n                                            </view>\n                                            <label opaque=\"NO\" userInteractionEnabled=\"NO\" contentMode=\"left\" horizontalHuggingPriority=\"251\" verticalHuggingPriority=\"251\" text=\"Total:\" lineBreakMode=\"tailTruncation\" baselineAdjustment=\"alignBaselines\" adjustsFontSizeToFit=\"NO\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"cV8-uv-FpY\">\n                                                <rect key=\"frame\" x=\"0.0\" y=\"143\" width=\"76\" height=\"21\"/>\n                                                <constraints>\n                                                    <constraint firstAttribute=\"width\" constant=\"76\" id=\"k8N-pD-mVK\"/>\n                                                    <constraint firstAttribute=\"height\" constant=\"21\" id=\"lf5-zd-PlI\"/>\n                                                </constraints>\n                                                <fontDescription key=\"fontDescription\" type=\"boldSystem\" pointSize=\"17\"/>\n                                                <color key=\"textColor\" red=\"0.0\" green=\"0.0\" blue=\"0.0\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n                                                <nil key=\"highlightedColor\"/>\n                                            </label>\n                                            <label opaque=\"NO\" userInteractionEnabled=\"NO\" contentMode=\"left\" horizontalHuggingPriority=\"251\" verticalHuggingPriority=\"251\" text=\"Amount:\" lineBreakMode=\"tailTruncation\" baselineAdjustment=\"alignBaselines\" adjustsFontSizeToFit=\"NO\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"yRL-oX-vHz\">\n                                                <rect key=\"frame\" x=\"0.0\" y=\"37\" width=\"76\" height=\"21\"/>\n                                                <constraints>\n                                                    <constraint firstAttribute=\"width\" constant=\"76\" id=\"250-Xv-GkK\"/>\n                                                    <constraint firstAttribute=\"height\" constant=\"21\" id=\"PUN-Mi-MIG\"/>\n                                                </constraints>\n                                                <fontDescription key=\"fontDescription\" type=\"boldSystem\" pointSize=\"17\"/>\n                                                <color key=\"textColor\" red=\"0.0\" green=\"0.0\" blue=\"0.0\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n                                                <nil key=\"highlightedColor\"/>\n                                            </label>\n                                            <button opaque=\"NO\" contentMode=\"scaleToFill\" contentHorizontalAlignment=\"center\" contentVerticalAlignment=\"center\" buttonType=\"roundedRect\" lineBreakMode=\"middleTruncation\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"bta-AA-vWW\">\n                                                <rect key=\"frame\" x=\"84\" y=\"95\" width=\"102\" height=\"30\"/>\n                                                <constraints>\n                                                    <constraint firstAttribute=\"height\" constant=\"30\" id=\"AU2-vC-Ko3\"/>\n                                                    <constraint firstAttribute=\"width\" constant=\"102\" id=\"JLg-aS-nMN\"/>\n                                                </constraints>\n                                                <state key=\"normal\" title=\"Customize Fee\"/>\n                                                <connections>\n                                                    <action selector=\"customizeFeeButtonClicked:\" destination=\"BoH-fs-Zva\" eventType=\"touchUpInside\" id=\"sC6-1y-JtX\"/>\n                                                </connections>\n                                            </button>\n                                            <label opaque=\"NO\" userInteractionEnabled=\"NO\" contentMode=\"left\" horizontalHuggingPriority=\"251\" verticalHuggingPriority=\"251\" text=\"Fee:\" lineBreakMode=\"tailTruncation\" baselineAdjustment=\"alignBaselines\" adjustsFontSizeToFit=\"NO\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"6dK-Su-wIf\">\n                                                <rect key=\"frame\" x=\"0.0\" y=\"66\" width=\"76\" height=\"21\"/>\n                                                <constraints>\n                                                    <constraint firstAttribute=\"height\" constant=\"21\" id=\"RAA-Ce-qR1\"/>\n                                                    <constraint firstAttribute=\"width\" constant=\"76\" id=\"SPw-Ci-90V\"/>\n                                                </constraints>\n                                                <fontDescription key=\"fontDescription\" type=\"boldSystem\" pointSize=\"17\"/>\n                                                <color key=\"textColor\" red=\"0.0\" green=\"0.0\" blue=\"0.0\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n                                                <nil key=\"highlightedColor\"/>\n                                            </label>\n                                            <label opaque=\"NO\" userInteractionEnabled=\"NO\" contentMode=\"left\" horizontalHuggingPriority=\"251\" verticalHuggingPriority=\"251\" text=\"100000.12345678 BTC\" textAlignment=\"natural\" lineBreakMode=\"tailTruncation\" baselineAdjustment=\"alignBaselines\" minimumFontSize=\"9\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"bc0-yo-6Ao\">\n                                                <rect key=\"frame\" x=\"84\" y=\"143\" width=\"151\" height=\"20.5\"/>\n                                                <fontDescription key=\"fontDescription\" type=\"system\" pointSize=\"17\"/>\n                                                <color key=\"textColor\" red=\"0.0\" green=\"0.0\" blue=\"0.0\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n                                                <nil key=\"highlightedColor\"/>\n                                            </label>\n                                            <label opaque=\"NO\" userInteractionEnabled=\"NO\" contentMode=\"left\" horizontalHuggingPriority=\"251\" verticalHuggingPriority=\"251\" text=\"1,000,000.12345678\" textAlignment=\"natural\" lineBreakMode=\"tailTruncation\" baselineAdjustment=\"alignBaselines\" minimumFontSize=\"9\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"UKQ-n4-f8s\">\n                                                <rect key=\"frame\" x=\"84\" y=\"37\" width=\"151\" height=\"21\"/>\n                                                <constraints>\n                                                    <constraint firstAttribute=\"width\" relation=\"greaterThanOrEqual\" constant=\"115\" id=\"S4o-Fb-VCX\"/>\n                                                    <constraint firstAttribute=\"width\" constant=\"195\" id=\"S52-wZ-ytT\"/>\n                                                    <constraint firstAttribute=\"height\" constant=\"21\" id=\"Tea-t9-j2U\"/>\n                                                    <constraint firstAttribute=\"width\" relation=\"greaterThanOrEqual\" constant=\"100\" id=\"fw1-Ar-5XK\"/>\n                                                </constraints>\n                                                <fontDescription key=\"fontDescription\" type=\"system\" pointSize=\"17\"/>\n                                                <color key=\"textColor\" red=\"0.0\" green=\"0.0\" blue=\"0.0\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n                                                <nil key=\"highlightedColor\"/>\n                                                <variation key=\"default\">\n                                                    <mask key=\"constraints\">\n                                                        <exclude reference=\"S4o-Fb-VCX\"/>\n                                                        <exclude reference=\"S52-wZ-ytT\"/>\n                                                    </mask>\n                                                </variation>\n                                            </label>\n                                            <label opaque=\"NO\" userInteractionEnabled=\"NO\" contentMode=\"left\" horizontalHuggingPriority=\"251\" verticalHuggingPriority=\"251\" text=\"BTC\" textAlignment=\"natural\" lineBreakMode=\"tailTruncation\" baselineAdjustment=\"alignBaselines\" minimumFontSize=\"9\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"7FD-gV-OIx\">\n                                                <rect key=\"frame\" x=\"84\" y=\"8\" width=\"151\" height=\"21\"/>\n                                                <constraints>\n                                                    <constraint firstAttribute=\"width\" relation=\"greaterThanOrEqual\" constant=\"100\" id=\"Hle-pM-vxa\"/>\n                                                    <constraint firstAttribute=\"width\" constant=\"195\" id=\"Se5-Ym-pGz\"/>\n                                                    <constraint firstAttribute=\"height\" constant=\"21\" id=\"tUr-2y-bX1\"/>\n                                                    <constraint firstAttribute=\"width\" relation=\"greaterThanOrEqual\" constant=\"115\" id=\"v8w-yZ-Mds\"/>\n                                                </constraints>\n                                                <fontDescription key=\"fontDescription\" type=\"system\" pointSize=\"17\"/>\n                                                <color key=\"textColor\" red=\"0.0\" green=\"0.0\" blue=\"0.0\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n                                                <nil key=\"highlightedColor\"/>\n                                                <variation key=\"default\">\n                                                    <mask key=\"constraints\">\n                                                        <exclude reference=\"Se5-Ym-pGz\"/>\n                                                        <exclude reference=\"v8w-yZ-Mds\"/>\n                                                    </mask>\n                                                </variation>\n                                            </label>\n                                            <label opaque=\"NO\" userInteractionEnabled=\"NO\" contentMode=\"left\" horizontalHuggingPriority=\"251\" verticalHuggingPriority=\"251\" text=\"1000000.00\" textAlignment=\"natural\" lineBreakMode=\"tailTruncation\" baselineAdjustment=\"alignBaselines\" minimumFontSize=\"9\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"Va3-CW-hze\">\n                                                <rect key=\"frame\" x=\"251\" y=\"8\" width=\"100\" height=\"21\"/>\n                                                <constraints>\n                                                    <constraint firstAttribute=\"width\" relation=\"greaterThanOrEqual\" constant=\"100\" id=\"KR4-YD-Nne\"/>\n                                                    <constraint firstAttribute=\"width\" constant=\"148\" id=\"M83-OD-aBC\"/>\n                                                    <constraint firstAttribute=\"height\" constant=\"21\" id=\"x8b-5t-mwk\"/>\n                                                </constraints>\n                                                <fontDescription key=\"fontDescription\" type=\"system\" pointSize=\"17\"/>\n                                                <color key=\"textColor\" red=\"0.0\" green=\"0.0\" blue=\"0.0\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n                                                <nil key=\"highlightedColor\"/>\n                                                <variation key=\"default\">\n                                                    <mask key=\"constraints\">\n                                                        <exclude reference=\"M83-OD-aBC\"/>\n                                                    </mask>\n                                                </variation>\n                                            </label>\n                                        </subviews>\n                                        <constraints>\n                                            <constraint firstItem=\"ict-FH-day\" firstAttribute=\"top\" secondItem=\"NfN-kQ-zfd\" secondAttribute=\"bottom\" constant=\"8\" id=\"0uU-fN-i2f\"/>\n                                            <constraint firstItem=\"bc0-yo-6Ao\" firstAttribute=\"leading\" secondItem=\"jQ2-VE-bsm\" secondAttribute=\"leading\" id=\"48n-38-58x\"/>\n                                            <constraint firstItem=\"7FD-gV-OIx\" firstAttribute=\"leading\" secondItem=\"UKQ-n4-f8s\" secondAttribute=\"leading\" id=\"4f1-nD-TdK\"/>\n                                            <constraint firstItem=\"6dK-Su-wIf\" firstAttribute=\"leading\" secondItem=\"oZR-cM-be2\" secondAttribute=\"leading\" id=\"75g-or-D3F\"/>\n                                            <constraint firstItem=\"NGS-uf-qMF\" firstAttribute=\"leading\" secondItem=\"ict-FH-day\" secondAttribute=\"leading\" id=\"BJ4-EN-fVU\"/>\n                                            <constraint firstItem=\"yRL-oX-vHz\" firstAttribute=\"top\" secondItem=\"oZR-cM-be2\" secondAttribute=\"top\" constant=\"37\" id=\"BUR-VI-tuZ\"/>\n                                            <constraint firstItem=\"ict-FH-day\" firstAttribute=\"width\" secondItem=\"NfN-kQ-zfd\" secondAttribute=\"width\" id=\"BVC-fz-Qpn\"/>\n                                            <constraint firstItem=\"NfN-kQ-zfd\" firstAttribute=\"top\" secondItem=\"yRL-oX-vHz\" secondAttribute=\"top\" id=\"Boa-Ue-8Xa\"/>\n                                            <constraint firstAttribute=\"trailing\" secondItem=\"cpe-kI-VzV\" secondAttribute=\"trailing\" id=\"BpH-Ke-qab\"/>\n                                            <constraint firstItem=\"UKQ-n4-f8s\" firstAttribute=\"top\" secondItem=\"7FD-gV-OIx\" secondAttribute=\"bottom\" constant=\"8\" id=\"ByQ-cj-n3W\"/>\n                                            <constraint firstItem=\"7FD-gV-OIx\" firstAttribute=\"top\" secondItem=\"oZR-cM-be2\" secondAttribute=\"top\" constant=\"8\" id=\"CbY-IR-va2\"/>\n                                            <constraint firstItem=\"jQ2-VE-bsm\" firstAttribute=\"width\" secondItem=\"UKQ-n4-f8s\" secondAttribute=\"width\" id=\"H61-JU-Pu8\"/>\n                                            <constraint firstItem=\"cV8-uv-FpY\" firstAttribute=\"top\" secondItem=\"cpe-kI-VzV\" secondAttribute=\"bottom\" constant=\"8\" id=\"J7j-se-sOj\"/>\n                                            <constraint firstItem=\"NfN-kQ-zfd\" firstAttribute=\"top\" secondItem=\"oZR-cM-be2\" secondAttribute=\"top\" constant=\"8\" id=\"KjO-Us-HP2\"/>\n                                            <constraint firstItem=\"6dK-Su-wIf\" firstAttribute=\"top\" secondItem=\"yRL-oX-vHz\" secondAttribute=\"bottom\" constant=\"8\" id=\"MNx-fI-Qai\"/>\n                                            <constraint firstItem=\"Va3-CW-hze\" firstAttribute=\"leading\" secondItem=\"NfN-kQ-zfd\" secondAttribute=\"leading\" id=\"MmB-OO-NRO\"/>\n                                            <constraint firstItem=\"jQ2-VE-bsm\" firstAttribute=\"leading\" secondItem=\"UKQ-n4-f8s\" secondAttribute=\"leading\" id=\"NMd-fk-MxG\"/>\n                                            <constraint firstItem=\"QVc-hR-SLY\" firstAttribute=\"centerY\" secondItem=\"bta-AA-vWW\" secondAttribute=\"centerY\" id=\"NeK-1t-Vcw\"/>\n                                            <constraint firstItem=\"ict-FH-day\" firstAttribute=\"leading\" secondItem=\"NfN-kQ-zfd\" secondAttribute=\"leading\" id=\"PS2-AM-a9v\"/>\n                                            <constraint firstItem=\"bc0-yo-6Ao\" firstAttribute=\"top\" secondItem=\"cpe-kI-VzV\" secondAttribute=\"bottom\" constant=\"8\" id=\"Qdb-b9-wPx\"/>\n                                            <constraint firstItem=\"NGS-uf-qMF\" firstAttribute=\"width\" secondItem=\"NfN-kQ-zfd\" secondAttribute=\"width\" id=\"RMq-3L-Yg2\"/>\n                                            <constraint firstItem=\"UKQ-n4-f8s\" firstAttribute=\"top\" secondItem=\"oZR-cM-be2\" secondAttribute=\"top\" constant=\"8\" id=\"RzH-Lf-OK8\"/>\n                                            <constraint firstItem=\"bta-AA-vWW\" firstAttribute=\"top\" secondItem=\"jQ2-VE-bsm\" secondAttribute=\"bottom\" constant=\"8\" id=\"Vb9-Fb-DOv\"/>\n                                            <constraint firstItem=\"QVc-hR-SLY\" firstAttribute=\"leading\" secondItem=\"bta-AA-vWW\" secondAttribute=\"trailing\" constant=\"8\" id=\"Yly-br-EeS\"/>\n                                            <constraint firstItem=\"bc0-yo-6Ao\" firstAttribute=\"width\" secondItem=\"UKQ-n4-f8s\" secondAttribute=\"width\" id=\"bI1-j2-rUu\"/>\n                                            <constraint firstItem=\"cpe-kI-VzV\" firstAttribute=\"top\" secondItem=\"bta-AA-vWW\" secondAttribute=\"bottom\" constant=\"8\" id=\"bUP-SD-woI\"/>\n                                            <constraint firstItem=\"cpe-kI-VzV\" firstAttribute=\"leading\" secondItem=\"oZR-cM-be2\" secondAttribute=\"leading\" id=\"bdJ-Hd-foG\"/>\n                                            <constraint firstItem=\"UKQ-n4-f8s\" firstAttribute=\"leading\" secondItem=\"yRL-oX-vHz\" secondAttribute=\"trailing\" constant=\"8\" id=\"cHf-0I-yUH\"/>\n                                            <constraint firstItem=\"Va3-CW-hze\" firstAttribute=\"top\" secondItem=\"oZR-cM-be2\" secondAttribute=\"top\" constant=\"8\" id=\"cwI-Lq-gkr\"/>\n                                            <constraint firstItem=\"NfN-kQ-zfd\" firstAttribute=\"leading\" secondItem=\"UKQ-n4-f8s\" secondAttribute=\"trailing\" constant=\"16\" id=\"eoP-Tg-QKC\"/>\n                                            <constraint firstItem=\"yRL-oX-vHz\" firstAttribute=\"leading\" secondItem=\"oZR-cM-be2\" secondAttribute=\"leading\" id=\"frx-61-bv1\"/>\n                                            <constraint firstItem=\"NGS-uf-qMF\" firstAttribute=\"top\" secondItem=\"cpe-kI-VzV\" secondAttribute=\"bottom\" constant=\"8\" id=\"gOd-GL-3db\"/>\n                                            <constraint firstItem=\"NfN-kQ-zfd\" firstAttribute=\"top\" secondItem=\"Va3-CW-hze\" secondAttribute=\"bottom\" constant=\"8\" id=\"gbh-Fm-z02\"/>\n                                            <constraint firstAttribute=\"trailing\" relation=\"greaterThanOrEqual\" secondItem=\"NfN-kQ-zfd\" secondAttribute=\"trailing\" constant=\"8\" id=\"kVf-62-LaM\"/>\n                                            <constraint firstItem=\"UKQ-n4-f8s\" firstAttribute=\"top\" secondItem=\"yRL-oX-vHz\" secondAttribute=\"top\" id=\"mTS-UQ-jLl\"/>\n                                            <constraint firstItem=\"bta-AA-vWW\" firstAttribute=\"leading\" secondItem=\"jQ2-VE-bsm\" secondAttribute=\"leading\" id=\"oQ1-xe-oNy\"/>\n                                            <constraint firstItem=\"jQ2-VE-bsm\" firstAttribute=\"top\" secondItem=\"UKQ-n4-f8s\" secondAttribute=\"bottom\" constant=\"8\" id=\"p9x-m2-D06\"/>\n                                            <constraint firstItem=\"cV8-uv-FpY\" firstAttribute=\"leading\" secondItem=\"oZR-cM-be2\" secondAttribute=\"leading\" id=\"qlW-iH-bGk\"/>\n                                            <constraint firstItem=\"7FD-gV-OIx\" firstAttribute=\"width\" secondItem=\"UKQ-n4-f8s\" secondAttribute=\"width\" id=\"uBC-gE-zM8\"/>\n                                        </constraints>\n                                        <variation key=\"default\">\n                                            <mask key=\"constraints\">\n                                                <exclude reference=\"RzH-Lf-OK8\"/>\n                                                <exclude reference=\"KjO-Us-HP2\"/>\n                                            </mask>\n                                        </variation>\n                                    </view>\n                                    <button opaque=\"NO\" contentMode=\"scaleToFill\" contentHorizontalAlignment=\"center\" contentVerticalAlignment=\"center\" buttonType=\"roundedRect\" lineBreakMode=\"middleTruncation\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"XID-Gh-hGj\">\n                                        <rect key=\"frame\" x=\"16\" y=\"530\" width=\"359\" height=\"64\"/>\n                                        <constraints>\n                                            <constraint firstAttribute=\"height\" constant=\"64\" id=\"y5i-md-a0u\"/>\n                                        </constraints>\n                                        <state key=\"normal\" title=\"Send\"/>\n                                        <userDefinedRuntimeAttributes>\n                                            <userDefinedRuntimeAttribute type=\"string\" keyPath=\"layer.cornerRadius\" value=\"5\"/>\n                                        </userDefinedRuntimeAttributes>\n                                        <connections>\n                                            <action selector=\"sendButtonClicked:\" destination=\"BoH-fs-Zva\" eventType=\"touchUpInside\" id=\"EOx-oD-63d\"/>\n                                        </connections>\n                                    </button>\n                                </subviews>\n                                <color key=\"backgroundColor\" red=\"1\" green=\"1\" blue=\"1\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n                                <constraints>\n                                    <constraint firstAttribute=\"trailing\" secondItem=\"u6a-ff-Ab7\" secondAttribute=\"trailing\" constant=\"16\" id=\"0hn-Kv-UdB\"/>\n                                    <constraint firstItem=\"Wyl-JC-mUk\" firstAttribute=\"top\" secondItem=\"dLL-tj-JB2\" secondAttribute=\"bottom\" constant=\"8\" id=\"2NJ-Y0-sr2\"/>\n                                    <constraint firstItem=\"oZR-cM-be2\" firstAttribute=\"top\" secondItem=\"Wyl-JC-mUk\" secondAttribute=\"bottom\" constant=\"8\" id=\"716-jq-LyF\"/>\n                                    <constraint firstAttribute=\"trailing\" secondItem=\"Wyl-JC-mUk\" secondAttribute=\"trailing\" constant=\"16\" id=\"Apx-F5-x7w\"/>\n                                    <constraint firstItem=\"oZR-cM-be2\" firstAttribute=\"leading\" secondItem=\"H5t-HQ-sZs\" secondAttribute=\"leading\" constant=\"16\" id=\"CdY-wG-7Kk\"/>\n                                    <constraint firstItem=\"u6a-ff-Ab7\" firstAttribute=\"leading\" secondItem=\"H5t-HQ-sZs\" secondAttribute=\"leading\" constant=\"16\" id=\"D8N-IF-9Kd\"/>\n                                    <constraint firstAttribute=\"bottom\" secondItem=\"XID-Gh-hGj\" secondAttribute=\"bottom\" constant=\"8\" id=\"EE9-J1-zc7\"/>\n                                    <constraint firstItem=\"XID-Gh-hGj\" firstAttribute=\"top\" secondItem=\"oZR-cM-be2\" secondAttribute=\"bottom\" constant=\"8\" id=\"HvK-1o-FTD\"/>\n                                    <constraint firstAttribute=\"trailing\" secondItem=\"oZR-cM-be2\" secondAttribute=\"trailing\" constant=\"16\" id=\"IHv-8x-g7o\"/>\n                                    <constraint firstItem=\"dLL-tj-JB2\" firstAttribute=\"leading\" secondItem=\"H5t-HQ-sZs\" secondAttribute=\"leading\" constant=\"16\" id=\"Ovm-50-LAM\"/>\n                                    <constraint firstItem=\"u6a-ff-Ab7\" firstAttribute=\"top\" secondItem=\"H5t-HQ-sZs\" secondAttribute=\"top\" constant=\"8\" id=\"Tb6-5v-rtr\"/>\n                                    <constraint firstItem=\"dLL-tj-JB2\" firstAttribute=\"top\" secondItem=\"PqG-LI-SgL\" secondAttribute=\"bottom\" constant=\"8\" id=\"TnF-RA-eys\"/>\n                                    <constraint firstAttribute=\"trailing\" secondItem=\"dLL-tj-JB2\" secondAttribute=\"trailing\" constant=\"16\" id=\"WHN-Wx-Usy\"/>\n                                    <constraint firstItem=\"PqG-LI-SgL\" firstAttribute=\"leading\" secondItem=\"H5t-HQ-sZs\" secondAttribute=\"leading\" constant=\"16\" id=\"WvP-uQ-TdP\"/>\n                                    <constraint firstAttribute=\"trailing\" secondItem=\"XID-Gh-hGj\" secondAttribute=\"trailing\" constant=\"16\" id=\"Yyd-us-Ed9\"/>\n                                    <constraint firstItem=\"PqG-LI-SgL\" firstAttribute=\"top\" secondItem=\"u6a-ff-Ab7\" secondAttribute=\"bottom\" constant=\"8\" id=\"aqg-wg-tzA\"/>\n                                    <constraint firstItem=\"Wyl-JC-mUk\" firstAttribute=\"leading\" secondItem=\"H5t-HQ-sZs\" secondAttribute=\"leading\" constant=\"16\" id=\"dtp-6v-l1l\"/>\n                                    <constraint firstAttribute=\"trailing\" secondItem=\"PqG-LI-SgL\" secondAttribute=\"trailing\" constant=\"16\" id=\"pD5-Nw-gOS\"/>\n                                    <constraint firstItem=\"XID-Gh-hGj\" firstAttribute=\"leading\" secondItem=\"H5t-HQ-sZs\" secondAttribute=\"leading\" constant=\"16\" id=\"y9q-IN-lhk\"/>\n                                </constraints>\n                            </view>\n                        </subviews>\n                        <color key=\"backgroundColor\" red=\"1\" green=\"1\" blue=\"1\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n                        <constraints>\n                            <constraint firstItem=\"H5t-HQ-sZs\" firstAttribute=\"centerX\" secondItem=\"MUe-oP-K6B\" secondAttribute=\"centerX\" id=\"AAQ-yj-T2V\"/>\n                            <constraint firstItem=\"H5t-HQ-sZs\" firstAttribute=\"trailing\" secondItem=\"U2m-ef-UaP\" secondAttribute=\"trailing\" id=\"Kh4-rz-qBa\"/>\n                            <constraint firstItem=\"H5t-HQ-sZs\" firstAttribute=\"top\" secondItem=\"fFb-o3-9od\" secondAttribute=\"top\" constant=\"65\" id=\"KsD-or-Cg2\"/>\n                            <constraint firstItem=\"H5t-HQ-sZs\" firstAttribute=\"bottom\" secondItem=\"MUe-oP-K6B\" secondAttribute=\"bottom\" id=\"Mqc-VU-SW7\"/>\n                            <constraint firstItem=\"H5t-HQ-sZs\" firstAttribute=\"leading\" secondItem=\"fFb-o3-9od\" secondAttribute=\"leadingMargin\" constant=\"-24\" id=\"NOM-U9-h0h\"/>\n                            <constraint firstItem=\"H5t-HQ-sZs\" firstAttribute=\"top\" secondItem=\"U2m-ef-UaP\" secondAttribute=\"bottom\" constant=\"1\" id=\"deZ-y6-F5p\"/>\n                            <constraint firstItem=\"H5t-HQ-sZs\" firstAttribute=\"leading\" secondItem=\"U2m-ef-UaP\" secondAttribute=\"leading\" id=\"hJY-Oy-fMv\"/>\n                        </constraints>\n                        <viewLayoutGuide key=\"safeArea\" id=\"MUe-oP-K6B\"/>\n                    </view>\n                    <connections>\n                        <outlet property=\"customizeFeeButton\" destination=\"bta-AA-vWW\" id=\"oOG-y4-Cus\"/>\n                        <outlet property=\"feeAmountFiatLabel\" destination=\"ict-FH-day\" id=\"Y4T-EO-oj8\"/>\n                        <outlet property=\"feeAmountLabel\" destination=\"jQ2-VE-bsm\" id=\"HLW-JR-N9z\"/>\n                        <outlet property=\"feeAmountTitleLabel\" destination=\"6dK-Su-wIf\" id=\"DGf-Uh-OUT\"/>\n                        <outlet property=\"fiatUnitLabel\" destination=\"Va3-CW-hze\" id=\"fmo-lm-VBa\"/>\n                        <outlet property=\"fromLabel\" destination=\"PqG-LI-SgL\" id=\"6BW-6S-5jY\"/>\n                        <outlet property=\"fromTitleLabel\" destination=\"u6a-ff-Ab7\" id=\"rLc-Ec-MuT\"/>\n                        <outlet property=\"navigationBar\" destination=\"U2m-ef-UaP\" id=\"JR3-gi-gya\"/>\n                        <outlet property=\"sendButton\" destination=\"XID-Gh-hGj\" id=\"hcm-Yg-NTz\"/>\n                        <outlet property=\"toAmountFiatLabel\" destination=\"NfN-kQ-zfd\" id=\"a1y-b3-BuG\"/>\n                        <outlet property=\"toAmountLabel\" destination=\"UKQ-n4-f8s\" id=\"rPI-P9-SUU\"/>\n                        <outlet property=\"toAmountTitleLabel\" destination=\"yRL-oX-vHz\" id=\"SnR-0J-br0\"/>\n                        <outlet property=\"toLabel\" destination=\"Wyl-JC-mUk\" id=\"qeQ-3J-84v\"/>\n                        <outlet property=\"toTitleLabel\" destination=\"dLL-tj-JB2\" id=\"Y9P-Gd-Vu2\"/>\n                        <outlet property=\"totalAmountLabel\" destination=\"bc0-yo-6Ao\" id=\"Cs6-BY-YXp\"/>\n                        <outlet property=\"totalAmountTitleLabel\" destination=\"cV8-uv-FpY\" id=\"L1Q-FR-cbR\"/>\n                        <outlet property=\"totalFiatAmountLabel\" destination=\"NGS-uf-qMF\" id=\"mhF-Gp-h2F\"/>\n                        <outlet property=\"unitLabel\" destination=\"7FD-gV-OIx\" id=\"VCN-8n-HSh\"/>\n                    </connections>\n                </viewController>\n                <placeholder placeholderIdentifier=\"IBFirstResponder\" id=\"Dfa-N8-xQc\" userLabel=\"First Responder\" sceneMemberID=\"firstResponder\"/>\n            </objects>\n            <point key=\"canvasLocation\" x=\"1921\" y=\"73\"/>\n        </scene>\n        <!--Navigation Controller-->\n        <scene sceneID=\"gvM-v0-LkS\">\n            <objects>\n                <navigationController storyboardIdentifier=\"ColdWalletNav\" id=\"GFW-5S-SPH\" sceneMemberID=\"viewController\">\n                    <navigationBar key=\"navigationBar\" contentMode=\"scaleToFill\" id=\"d2I-a1-Yhb\">\n                        <rect key=\"frame\" x=\"0.0\" y=\"20\" width=\"375\" height=\"44\"/>\n                        <autoresizingMask key=\"autoresizingMask\"/>\n                    </navigationBar>\n                    <connections>\n                        <segue destination=\"9rs-G5-mnO\" kind=\"relationship\" relationship=\"rootViewController\" id=\"jXJ-dm-1GT\"/>\n                    </connections>\n                </navigationController>\n                <placeholder placeholderIdentifier=\"IBFirstResponder\" id=\"px7-y6-3E7\" userLabel=\"First Responder\" sceneMemberID=\"firstResponder\"/>\n            </objects>\n            <point key=\"canvasLocation\" x=\"-300\" y=\"4993\"/>\n        </scene>\n        <!--Cold Wallet-->\n        <scene sceneID=\"rz2-9l-b8t\">\n            <objects>\n                <viewController storyboardIdentifier=\"ColdWallet\" id=\"9rs-G5-mnO\" customClass=\"TLColdWalletViewController\" sceneMemberID=\"viewController\">\n                    <view key=\"view\" contentMode=\"scaleToFill\" id=\"wz5-Y0-Cdm\">\n                        <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"375\" height=\"667\"/>\n                        <autoresizingMask key=\"autoresizingMask\" widthSizable=\"YES\" heightSizable=\"YES\"/>\n                        <subviews>\n                            <tableView clipsSubviews=\"YES\" contentMode=\"scaleToFill\" alwaysBounceVertical=\"YES\" dataMode=\"prototypes\" style=\"grouped\" separatorStyle=\"default\" rowHeight=\"44\" sectionHeaderHeight=\"10\" sectionFooterHeight=\"10\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"d6x-1x-crM\">\n                                <rect key=\"frame\" x=\"-4\" y=\"64\" width=\"383\" height=\"603\"/>\n                                <color key=\"backgroundColor\" red=\"0.93725490199999995\" green=\"0.93725490199999995\" blue=\"0.95686274510000002\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n                                <prototypes>\n                                    <tableViewCell contentMode=\"scaleToFill\" selectionStyle=\"default\" accessoryType=\"disclosureIndicator\" indentationWidth=\"10\" reuseIdentifier=\"ColdWalletCellIdentifier\" textLabel=\"J2q-P7-aOq\" style=\"IBUITableViewCellStyleDefault\" id=\"PpG-Ye-r6b\">\n                                        <rect key=\"frame\" x=\"0.0\" y=\"55.5\" width=\"383\" height=\"44\"/>\n                                        <autoresizingMask key=\"autoresizingMask\"/>\n                                        <tableViewCellContentView key=\"contentView\" opaque=\"NO\" clipsSubviews=\"YES\" multipleTouchEnabled=\"YES\" contentMode=\"center\" tableViewCell=\"PpG-Ye-r6b\" id=\"U3a-oF-zp5\">\n                                            <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"350\" height=\"43.5\"/>\n                                            <autoresizingMask key=\"autoresizingMask\"/>\n                                            <subviews>\n                                                <label opaque=\"NO\" multipleTouchEnabled=\"YES\" contentMode=\"left\" text=\"Title\" textAlignment=\"natural\" lineBreakMode=\"tailTruncation\" baselineAdjustment=\"alignBaselines\" adjustsFontSizeToFit=\"NO\" id=\"J2q-P7-aOq\">\n                                                    <rect key=\"frame\" x=\"15\" y=\"0.0\" width=\"333\" height=\"43.5\"/>\n                                                    <autoresizingMask key=\"autoresizingMask\" flexibleMaxX=\"YES\" flexibleMaxY=\"YES\"/>\n                                                    <fontDescription key=\"fontDescription\" type=\"system\" pointSize=\"16\"/>\n                                                    <color key=\"textColor\" red=\"0.0\" green=\"0.0\" blue=\"0.0\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n                                                    <nil key=\"highlightedColor\"/>\n                                                </label>\n                                            </subviews>\n                                        </tableViewCellContentView>\n                                    </tableViewCell>\n                                </prototypes>\n                            </tableView>\n                        </subviews>\n                        <color key=\"backgroundColor\" red=\"1\" green=\"1\" blue=\"1\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n                        <constraints>\n                            <constraint firstItem=\"Rrq-g0-jG7\" firstAttribute=\"bottom\" secondItem=\"d6x-1x-crM\" secondAttribute=\"bottom\" id=\"1iC-8s-nGU\"/>\n                            <constraint firstItem=\"d6x-1x-crM\" firstAttribute=\"top\" secondItem=\"wz5-Y0-Cdm\" secondAttribute=\"topMargin\" id=\"7LL-8N-Zph\"/>\n                            <constraint firstItem=\"d6x-1x-crM\" firstAttribute=\"leading\" secondItem=\"wz5-Y0-Cdm\" secondAttribute=\"leadingMargin\" constant=\"-20\" id=\"CYs-6N-Geh\"/>\n                            <constraint firstAttribute=\"trailingMargin\" secondItem=\"d6x-1x-crM\" secondAttribute=\"trailing\" constant=\"-20\" id=\"eT9-4x-tqg\"/>\n                        </constraints>\n                        <viewLayoutGuide key=\"safeArea\" id=\"Rrq-g0-jG7\"/>\n                    </view>\n                    <navigationItem key=\"navigationItem\" title=\"Cold Wallet\" id=\"3YE-it-wRp\">\n                        <barButtonItem key=\"leftBarButtonItem\" image=\"list.png\" id=\"NXQ-8l-NdL\">\n                            <connections>\n                                <action selector=\"menuButtonClicked:\" destination=\"9rs-G5-mnO\" id=\"gVe-ph-qie\"/>\n                            </connections>\n                        </barButtonItem>\n                    </navigationItem>\n                    <connections>\n                        <outlet property=\"coldWalletTableView\" destination=\"d6x-1x-crM\" id=\"YoJ-yn-NQW\"/>\n                        <segue destination=\"mtF-bz-Q5X\" kind=\"show\" identifier=\"SegueCreateColdWallet\" id=\"3Gi-oO-CzV\"/>\n                        <segue destination=\"g42-iO-Bfr\" kind=\"show\" identifier=\"SegueSpendColdWallet\" id=\"bJG-MR-DgH\"/>\n                        <segue destination=\"DOb-yd-euR\" kind=\"show\" identifier=\"SegueSeeWalletData\" id=\"rsc-dE-hMF\"/>\n                    </connections>\n                </viewController>\n                <placeholder placeholderIdentifier=\"IBFirstResponder\" id=\"iQU-Mx-op5\" userLabel=\"First Responder\" sceneMemberID=\"firstResponder\"/>\n            </objects>\n            <point key=\"canvasLocation\" x=\"456\" y=\"4993\"/>\n        </scene>\n        <!--Create Cold Wallet View Controller-->\n        <scene sceneID=\"hCa-Dq-ZKI\">\n            <objects>\n                <viewController storyboardIdentifier=\"CreateColdWallet\" id=\"mtF-bz-Q5X\" customClass=\"TLCreateColdWalletViewController\" sceneMemberID=\"viewController\">\n                    <view key=\"view\" contentMode=\"scaleToFill\" id=\"rDA-2w-WHB\">\n                        <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"375\" height=\"667\"/>\n                        <autoresizingMask key=\"autoresizingMask\" widthSizable=\"YES\" heightSizable=\"YES\"/>\n                        <subviews>\n                            <tableView clipsSubviews=\"YES\" contentMode=\"scaleToFill\" alwaysBounceVertical=\"YES\" dataMode=\"prototypes\" style=\"grouped\" separatorStyle=\"default\" allowsSelection=\"NO\" rowHeight=\"303\" sectionHeaderHeight=\"10\" sectionFooterHeight=\"10\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"r4T-KL-Txa\">\n                                <rect key=\"frame\" x=\"-4\" y=\"64\" width=\"383\" height=\"603\"/>\n                                <color key=\"backgroundColor\" red=\"0.93725490199999995\" green=\"0.93725490199999995\" blue=\"0.95686274510000002\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n                                <prototypes>\n                                    <tableViewCell clipsSubviews=\"YES\" contentMode=\"scaleToFill\" selectionStyle=\"default\" indentationWidth=\"10\" reuseIdentifier=\"NewWalletCellIdentifier\" rowHeight=\"303\" id=\"MLB-fr-01h\" customClass=\"TLNewWalletTableViewCell\">\n                                        <rect key=\"frame\" x=\"0.0\" y=\"55.5\" width=\"383\" height=\"303\"/>\n                                        <autoresizingMask key=\"autoresizingMask\"/>\n                                        <tableViewCellContentView key=\"contentView\" opaque=\"NO\" clipsSubviews=\"YES\" multipleTouchEnabled=\"YES\" contentMode=\"center\" tableViewCell=\"MLB-fr-01h\" id=\"mHy-BX-xwD\">\n                                            <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"383\" height=\"302.5\"/>\n                                            <autoresizingMask key=\"autoresizingMask\"/>\n                                            <subviews>\n                                                <label opaque=\"NO\" userInteractionEnabled=\"NO\" contentMode=\"left\" horizontalHuggingPriority=\"251\" verticalHuggingPriority=\"251\" text=\"Backup Passphrase:\" textAlignment=\"natural\" lineBreakMode=\"tailTruncation\" baselineAdjustment=\"alignBaselines\" adjustsFontSizeToFit=\"NO\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"aYW-ME-0t8\">\n                                                    <rect key=\"frame\" x=\"16\" y=\"8\" width=\"155\" height=\"21\"/>\n                                                    <constraints>\n                                                        <constraint firstAttribute=\"height\" constant=\"21\" id=\"iXa-km-jiT\"/>\n                                                    </constraints>\n                                                    <fontDescription key=\"fontDescription\" type=\"system\" pointSize=\"17\"/>\n                                                    <color key=\"textColor\" red=\"0.0\" green=\"0.0\" blue=\"0.0\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n                                                    <nil key=\"highlightedColor\"/>\n                                                </label>\n                                                <textView clipsSubviews=\"YES\" multipleTouchEnabled=\"YES\" contentMode=\"scaleToFill\" text=\"street ankle life mass ready viable worth renew stove panther immense camera\" textAlignment=\"natural\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"h73-3F-Pi3\">\n                                                    <rect key=\"frame\" x=\"16\" y=\"37\" width=\"351\" height=\"49\"/>\n                                                    <color key=\"backgroundColor\" red=\"1\" green=\"1\" blue=\"1\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n                                                    <constraints>\n                                                        <constraint firstAttribute=\"height\" constant=\"49\" id=\"X5Z-gj-282\"/>\n                                                    </constraints>\n                                                    <fontDescription key=\"fontDescription\" type=\"system\" pointSize=\"14\"/>\n                                                    <textInputTraits key=\"textInputTraits\" autocapitalizationType=\"sentences\"/>\n                                                </textView>\n                                                <label opaque=\"NO\" userInteractionEnabled=\"NO\" contentMode=\"left\" horizontalHuggingPriority=\"251\" verticalHuggingPriority=\"251\" preservesSuperviewLayoutMargins=\"YES\" text=\"Account ID:\" textAlignment=\"natural\" lineBreakMode=\"tailTruncation\" baselineAdjustment=\"alignBaselines\" adjustsFontSizeToFit=\"NO\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"lpn-HN-00K\">\n                                                    <rect key=\"frame\" x=\"16\" y=\"137\" width=\"89\" height=\"21\"/>\n                                                    <constraints>\n                                                        <constraint firstAttribute=\"width\" constant=\"85\" id=\"4kj-hW-vW1\"/>\n                                                        <constraint firstAttribute=\"height\" constant=\"21\" id=\"TNT-mj-Tq3\"/>\n                                                    </constraints>\n                                                    <fontDescription key=\"fontDescription\" type=\"system\" pointSize=\"17\"/>\n                                                    <color key=\"textColor\" red=\"0.0\" green=\"0.0\" blue=\"0.0\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n                                                    <nil key=\"highlightedColor\"/>\n                                                    <variation key=\"default\">\n                                                        <mask key=\"constraints\">\n                                                            <exclude reference=\"4kj-hW-vW1\"/>\n                                                        </mask>\n                                                    </variation>\n                                                </label>\n                                                <label opaque=\"NO\" userInteractionEnabled=\"NO\" contentMode=\"left\" horizontalHuggingPriority=\"251\" verticalHuggingPriority=\"251\" text=\"Account Public Key:\" textAlignment=\"natural\" lineBreakMode=\"tailTruncation\" baselineAdjustment=\"alignBaselines\" adjustsFontSizeToFit=\"NO\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"xa4-b8-Sm0\">\n                                                    <rect key=\"frame\" x=\"16\" y=\"170\" width=\"152\" height=\"21\"/>\n                                                    <constraints>\n                                                        <constraint firstAttribute=\"height\" constant=\"21\" id=\"I16-V8-GZ6\"/>\n                                                    </constraints>\n                                                    <fontDescription key=\"fontDescription\" type=\"system\" pointSize=\"17\"/>\n                                                    <color key=\"textColor\" red=\"0.0\" green=\"0.0\" blue=\"0.0\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n                                                    <nil key=\"highlightedColor\"/>\n                                                </label>\n                                                <textView clipsSubviews=\"YES\" multipleTouchEnabled=\"YES\" contentMode=\"scaleToFill\" text=\"xpub6CUHPUqLTj2pxbrab2gdy7XYKiAoy47PFRBkgf8YiBHD3UzJH6WqQSmLXAndZbFuJnU4tWgBWjRjSxyk6AHN5JpVsUMu4E9MwNCGgFNibDd\" textAlignment=\"natural\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"CZC-KE-fwt\">\n                                                    <rect key=\"frame\" x=\"16\" y=\"199\" width=\"351\" height=\"49\"/>\n                                                    <color key=\"backgroundColor\" red=\"1\" green=\"1\" blue=\"1\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n                                                    <constraints>\n                                                        <constraint firstAttribute=\"height\" constant=\"49\" id=\"gJj-TC-bVp\"/>\n                                                    </constraints>\n                                                    <fontDescription key=\"fontDescription\" type=\"system\" pointSize=\"14\"/>\n                                                    <textInputTraits key=\"textInputTraits\" autocapitalizationType=\"sentences\"/>\n                                                </textView>\n                                                <textField opaque=\"NO\" clipsSubviews=\"YES\" contentMode=\"scaleToFill\" contentHorizontalAlignment=\"left\" contentVerticalAlignment=\"center\" text=\"0\" borderStyle=\"line\" placeholder=\"0\" textAlignment=\"natural\" minimumFontSize=\"17\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"o2h-Yp-N8m\">\n                                                    <rect key=\"frame\" x=\"113\" y=\"132\" width=\"97\" height=\"30\"/>\n                                                    <constraints>\n                                                        <constraint firstAttribute=\"height\" constant=\"30\" id=\"NAl-Lj-gBc\"/>\n                                                        <constraint firstAttribute=\"width\" constant=\"97\" id=\"XAW-Th-OtW\"/>\n                                                    </constraints>\n                                                    <fontDescription key=\"fontDescription\" type=\"system\" pointSize=\"14\"/>\n                                                    <textInputTraits key=\"textInputTraits\"/>\n                                                </textField>\n                                                <button opaque=\"NO\" contentMode=\"scaleToFill\" contentHorizontalAlignment=\"center\" contentVerticalAlignment=\"center\" buttonType=\"roundedRect\" lineBreakMode=\"middleTruncation\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"pDU-E2-HeJ\">\n                                                    <rect key=\"frame\" x=\"277\" y=\"256\" width=\"90\" height=\"30\"/>\n                                                    <constraints>\n                                                        <constraint firstAttribute=\"width\" constant=\"90\" id=\"LFU-bI-Kdy\"/>\n                                                        <constraint firstAttribute=\"height\" constant=\"30\" id=\"VhV-bJ-GBi\"/>\n                                                    </constraints>\n                                                    <state key=\"normal\" title=\"QR Code\"/>\n                                                    <userDefinedRuntimeAttributes>\n                                                        <userDefinedRuntimeAttribute type=\"string\" keyPath=\"layer.cornerRadius\" value=\"5\"/>\n                                                    </userDefinedRuntimeAttributes>\n                                                    <connections>\n                                                        <action selector=\"showAccountPublicKeyQRButtonClicked:\" destination=\"MLB-fr-01h\" eventType=\"touchUpInside\" id=\"ph8-mp-cZr\"/>\n                                                    </connections>\n                                                </button>\n                                                <button opaque=\"NO\" contentMode=\"scaleToFill\" contentHorizontalAlignment=\"center\" contentVerticalAlignment=\"center\" buttonType=\"roundedRect\" lineBreakMode=\"middleTruncation\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"imI-wQ-7jn\">\n                                                    <rect key=\"frame\" x=\"277\" y=\"94\" width=\"90\" height=\"30\"/>\n                                                    <constraints>\n                                                        <constraint firstAttribute=\"height\" constant=\"30\" id=\"6Ap-hR-kyk\"/>\n                                                        <constraint firstAttribute=\"width\" constant=\"90\" id=\"KR7-wH-iTh\"/>\n                                                    </constraints>\n                                                    <state key=\"normal\" title=\"New Wallet\"/>\n                                                    <userDefinedRuntimeAttributes>\n                                                        <userDefinedRuntimeAttribute type=\"string\" keyPath=\"layer.cornerRadius\" value=\"5\"/>\n                                                    </userDefinedRuntimeAttributes>\n                                                    <connections>\n                                                        <action selector=\"newWalletButtonClicked:\" destination=\"MLB-fr-01h\" eventType=\"touchUpInside\" id=\"jFh-Sd-Ev2\"/>\n                                                    </connections>\n                                                </button>\n                                                <button opaque=\"NO\" contentMode=\"scaleToFill\" contentHorizontalAlignment=\"center\" contentVerticalAlignment=\"center\" buttonType=\"infoLight\" showsTouchWhenHighlighted=\"YES\" lineBreakMode=\"middleTruncation\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"Yea-0b-EAs\">\n                                                    <rect key=\"frame\" x=\"226\" y=\"136\" width=\"22\" height=\"22\"/>\n                                                    <connections>\n                                                        <action selector=\"clickedAccountInfoButton:\" destination=\"MLB-fr-01h\" eventType=\"touchUpInside\" id=\"n2y-4Q-5Zb\"/>\n                                                    </connections>\n                                                </button>\n                                                <button opaque=\"NO\" contentMode=\"scaleToFill\" contentHorizontalAlignment=\"center\" contentVerticalAlignment=\"center\" buttonType=\"infoLight\" showsTouchWhenHighlighted=\"YES\" lineBreakMode=\"middleTruncation\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"6v0-hc-QVK\">\n                                                    <rect key=\"frame\" x=\"183\" y=\"8\" width=\"22\" height=\"22\"/>\n                                                    <connections>\n                                                        <action selector=\"clickedMnemonicInfoButton:\" destination=\"MLB-fr-01h\" eventType=\"touchUpInside\" id=\"W7Z-Xp-QI6\"/>\n                                                    </connections>\n                                                </button>\n                                            </subviews>\n                                            <constraints>\n                                                <constraint firstItem=\"h73-3F-Pi3\" firstAttribute=\"leading\" secondItem=\"mHy-BX-xwD\" secondAttribute=\"leadingMargin\" constant=\"8\" id=\"16L-5S-38F\"/>\n                                                <constraint firstItem=\"xa4-b8-Sm0\" firstAttribute=\"top\" secondItem=\"o2h-Yp-N8m\" secondAttribute=\"bottom\" constant=\"8\" id=\"5Af-U9-13L\"/>\n                                                <constraint firstItem=\"h73-3F-Pi3\" firstAttribute=\"top\" secondItem=\"aYW-ME-0t8\" secondAttribute=\"bottom\" constant=\"8\" id=\"7j2-mb-KK9\"/>\n                                                <constraint firstItem=\"imI-wQ-7jn\" firstAttribute=\"top\" secondItem=\"h73-3F-Pi3\" secondAttribute=\"bottom\" constant=\"8\" id=\"8bV-vj-3gV\"/>\n                                                <constraint firstItem=\"o2h-Yp-N8m\" firstAttribute=\"top\" secondItem=\"imI-wQ-7jn\" secondAttribute=\"bottom\" constant=\"8\" id=\"GgZ-Q3-ngS\"/>\n                                                <constraint firstItem=\"h73-3F-Pi3\" firstAttribute=\"trailing\" secondItem=\"mHy-BX-xwD\" secondAttribute=\"trailingMargin\" constant=\"-8\" id=\"HtV-F1-BD4\"/>\n                                                <constraint firstItem=\"6v0-hc-QVK\" firstAttribute=\"centerY\" secondItem=\"aYW-ME-0t8\" secondAttribute=\"centerY\" id=\"Kgr-rh-cyA\"/>\n                                                <constraint firstItem=\"6v0-hc-QVK\" firstAttribute=\"leading\" secondItem=\"aYW-ME-0t8\" secondAttribute=\"trailing\" constant=\"12\" id=\"PCX-PH-VPO\"/>\n                                                <constraint firstItem=\"lpn-HN-00K\" firstAttribute=\"centerY\" secondItem=\"o2h-Yp-N8m\" secondAttribute=\"centerY\" id=\"PRC-Gb-h2c\"/>\n                                                <constraint firstAttribute=\"trailingMargin\" secondItem=\"pDU-E2-HeJ\" secondAttribute=\"trailing\" constant=\"8\" id=\"Rka-fg-6Ai\"/>\n                                                <constraint firstItem=\"pDU-E2-HeJ\" firstAttribute=\"top\" secondItem=\"CZC-KE-fwt\" secondAttribute=\"bottom\" constant=\"8\" id=\"Sfr-Fp-xY9\"/>\n                                                <constraint firstItem=\"Yea-0b-EAs\" firstAttribute=\"leading\" secondItem=\"o2h-Yp-N8m\" secondAttribute=\"trailing\" constant=\"16\" id=\"U1b-hk-ylK\"/>\n                                                <constraint firstItem=\"lpn-HN-00K\" firstAttribute=\"leading\" secondItem=\"mHy-BX-xwD\" secondAttribute=\"leadingMargin\" constant=\"8\" id=\"U4b-bU-pAd\"/>\n                                                <constraint firstItem=\"CZC-KE-fwt\" firstAttribute=\"leading\" secondItem=\"mHy-BX-xwD\" secondAttribute=\"leadingMargin\" constant=\"8\" id=\"Wc2-tK-AIY\"/>\n                                                <constraint firstItem=\"aYW-ME-0t8\" firstAttribute=\"leading\" secondItem=\"mHy-BX-xwD\" secondAttribute=\"leadingMargin\" constant=\"8\" id=\"Xm5-jd-6bG\"/>\n                                                <constraint firstItem=\"Yea-0b-EAs\" firstAttribute=\"centerY\" secondItem=\"o2h-Yp-N8m\" secondAttribute=\"centerY\" id=\"cKg-0Z-BJs\"/>\n                                                <constraint firstItem=\"xa4-b8-Sm0\" firstAttribute=\"leading\" secondItem=\"mHy-BX-xwD\" secondAttribute=\"leadingMargin\" constant=\"8\" id=\"gbN-dU-ymF\"/>\n                                                <constraint firstAttribute=\"trailingMargin\" secondItem=\"CZC-KE-fwt\" secondAttribute=\"trailing\" constant=\"8\" id=\"hoW-72-vWn\"/>\n                                                <constraint firstItem=\"CZC-KE-fwt\" firstAttribute=\"top\" secondItem=\"xa4-b8-Sm0\" secondAttribute=\"bottom\" constant=\"8\" id=\"o1T-Na-MJG\"/>\n                                                <constraint firstItem=\"imI-wQ-7jn\" firstAttribute=\"trailing\" secondItem=\"mHy-BX-xwD\" secondAttribute=\"trailingMargin\" constant=\"-8\" id=\"qZ3-Tf-FDG\"/>\n                                                <constraint firstItem=\"aYW-ME-0t8\" firstAttribute=\"top\" secondItem=\"mHy-BX-xwD\" secondAttribute=\"topMargin\" id=\"xzj-qG-KXo\"/>\n                                                <constraint firstItem=\"o2h-Yp-N8m\" firstAttribute=\"leading\" secondItem=\"lpn-HN-00K\" secondAttribute=\"trailing\" constant=\"8\" id=\"z6D-d9-JSQ\"/>\n                                            </constraints>\n                                        </tableViewCellContentView>\n                                        <connections>\n                                            <outlet property=\"accountIDLabel\" destination=\"lpn-HN-00K\" id=\"R3z-ig-0gE\"/>\n                                            <outlet property=\"accountIDTextField\" destination=\"o2h-Yp-N8m\" id=\"aR9-t7-xGJ\"/>\n                                            <outlet property=\"accountPublicKeyLabel\" destination=\"xa4-b8-Sm0\" id=\"9Kb-rJ-c4R\"/>\n                                            <outlet property=\"accountPublicKeyTextView\" destination=\"CZC-KE-fwt\" id=\"c41-Y9-ZCh\"/>\n                                            <outlet property=\"mnemonicLabel\" destination=\"aYW-ME-0t8\" id=\"gGU-yc-PgB\"/>\n                                            <outlet property=\"mnemonicTextView\" destination=\"h73-3F-Pi3\" id=\"dgW-Fu-hsJ\"/>\n                                            <outlet property=\"newWalletButton\" destination=\"imI-wQ-7jn\" id=\"X14-hn-XlU\"/>\n                                            <outlet property=\"showAccountPublicKeyQRButton\" destination=\"pDU-E2-HeJ\" id=\"i3m-Ra-voW\"/>\n                                        </connections>\n                                    </tableViewCell>\n                                </prototypes>\n                            </tableView>\n                        </subviews>\n                        <color key=\"backgroundColor\" red=\"1\" green=\"1\" blue=\"1\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n                        <constraints>\n                            <constraint firstItem=\"r4T-KL-Txa\" firstAttribute=\"leading\" secondItem=\"rDA-2w-WHB\" secondAttribute=\"leadingMargin\" constant=\"-20\" id=\"OU0-Af-Ne5\"/>\n                            <constraint firstAttribute=\"trailingMargin\" secondItem=\"r4T-KL-Txa\" secondAttribute=\"trailing\" constant=\"-20\" id=\"bas-q8-2OI\"/>\n                            <constraint firstItem=\"tkX-ah-QEl\" firstAttribute=\"bottom\" secondItem=\"r4T-KL-Txa\" secondAttribute=\"bottom\" id=\"dW2-85-UjO\"/>\n                            <constraint firstItem=\"r4T-KL-Txa\" firstAttribute=\"top\" secondItem=\"rDA-2w-WHB\" secondAttribute=\"topMargin\" id=\"y0n-Ku-07E\"/>\n                        </constraints>\n                        <viewLayoutGuide key=\"safeArea\" id=\"tkX-ah-QEl\"/>\n                    </view>\n                    <connections>\n                        <outlet property=\"tableView\" destination=\"r4T-KL-Txa\" id=\"qe5-qA-KkH\"/>\n                    </connections>\n                </viewController>\n                <placeholder placeholderIdentifier=\"IBFirstResponder\" id=\"2OQ-5d-E90\" userLabel=\"First Responder\" sceneMemberID=\"firstResponder\"/>\n            </objects>\n            <point key=\"canvasLocation\" x=\"1144.8\" y=\"4992.9535232383814\"/>\n        </scene>\n        <!--Authorize Cold Wallet Payment View Controller-->\n        <scene sceneID=\"Pwp-YH-Xhr\">\n            <objects>\n                <viewController storyboardIdentifier=\"SpendColdWallet\" id=\"g42-iO-Bfr\" customClass=\"TLAuthorizeColdWalletPaymentViewController\" sceneMemberID=\"viewController\">\n                    <view key=\"view\" contentMode=\"scaleToFill\" id=\"2DQ-MR-AJY\">\n                        <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"375\" height=\"667\"/>\n                        <autoresizingMask key=\"autoresizingMask\" widthSizable=\"YES\" heightSizable=\"YES\"/>\n                        <subviews>\n                            <tableView clipsSubviews=\"YES\" contentMode=\"scaleToFill\" alwaysBounceVertical=\"YES\" dataMode=\"prototypes\" style=\"grouped\" separatorStyle=\"default\" allowsSelection=\"NO\" rowHeight=\"92\" sectionHeaderHeight=\"10\" sectionFooterHeight=\"10\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"acg-Nx-MmS\">\n                                <rect key=\"frame\" x=\"-4\" y=\"64\" width=\"383\" height=\"603\"/>\n                                <color key=\"backgroundColor\" red=\"0.93725490199999995\" green=\"0.93725490199999995\" blue=\"0.95686274510000002\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n                                <prototypes>\n                                    <tableViewCell clipsSubviews=\"YES\" contentMode=\"scaleToFill\" selectionStyle=\"default\" indentationWidth=\"10\" reuseIdentifier=\"ScanUnsignedTxCellIdentifier\" rowHeight=\"88\" id=\"nQd-wB-1CD\" customClass=\"TLScanUnsignedTxTableViewCell\">\n                                        <rect key=\"frame\" x=\"0.0\" y=\"55.5\" width=\"383\" height=\"88\"/>\n                                        <autoresizingMask key=\"autoresizingMask\"/>\n                                        <tableViewCellContentView key=\"contentView\" opaque=\"NO\" clipsSubviews=\"YES\" multipleTouchEnabled=\"YES\" contentMode=\"center\" tableViewCell=\"nQd-wB-1CD\" id=\"0JE-Yp-wOJ\">\n                                            <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"383\" height=\"87.5\"/>\n                                            <autoresizingMask key=\"autoresizingMask\"/>\n                                            <subviews>\n                                                <label opaque=\"NO\" userInteractionEnabled=\"NO\" contentMode=\"left\" horizontalHuggingPriority=\"251\" verticalHuggingPriority=\"251\" text=\"Step 1: Scan transaction to authorize\" textAlignment=\"natural\" lineBreakMode=\"tailTruncation\" baselineAdjustment=\"alignBaselines\" minimumFontSize=\"7\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"1EF-AG-Tuv\">\n                                                    <rect key=\"frame\" x=\"16\" y=\"16\" width=\"237.5\" height=\"17\"/>\n                                                    <fontDescription key=\"fontDescription\" type=\"system\" pointSize=\"14\"/>\n                                                    <color key=\"textColor\" cocoaTouchSystemColor=\"darkTextColor\"/>\n                                                    <nil key=\"highlightedColor\"/>\n                                                </label>\n                                                <button opaque=\"NO\" contentMode=\"scaleToFill\" contentHorizontalAlignment=\"center\" contentVerticalAlignment=\"center\" buttonType=\"infoLight\" showsTouchWhenHighlighted=\"YES\" lineBreakMode=\"middleTruncation\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"PUe-vc-MjY\">\n                                                    <rect key=\"frame\" x=\"261.5\" y=\"16\" width=\"22\" height=\"22\"/>\n                                                    <constraints>\n                                                        <constraint firstAttribute=\"height\" constant=\"22\" id=\"bvo-W6-3hq\"/>\n                                                        <constraint firstAttribute=\"width\" constant=\"22\" id=\"s07-5u-AV5\"/>\n                                                    </constraints>\n                                                    <connections>\n                                                        <action selector=\"infoButtonClicked:\" destination=\"nQd-wB-1CD\" eventType=\"touchUpInside\" id=\"wiU-Ru-BOP\"/>\n                                                    </connections>\n                                                </button>\n                                                <button opaque=\"NO\" contentMode=\"scaleToFill\" contentHorizontalAlignment=\"center\" contentVerticalAlignment=\"center\" buttonType=\"roundedRect\" lineBreakMode=\"middleTruncation\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"aFx-Fr-jWj\">\n                                                    <rect key=\"frame\" x=\"16\" y=\"41\" width=\"35\" height=\"30\"/>\n                                                    <constraints>\n                                                        <constraint firstAttribute=\"height\" constant=\"30\" id=\"S4h-uh-n6Z\"/>\n                                                    </constraints>\n                                                    <state key=\"normal\" title=\"Scan\"/>\n                                                    <userDefinedRuntimeAttributes>\n                                                        <userDefinedRuntimeAttribute type=\"string\" keyPath=\"layer.cornerRadius\" value=\"5\"/>\n                                                    </userDefinedRuntimeAttributes>\n                                                    <connections>\n                                                        <action selector=\"scanButtonClicked:\" destination=\"nQd-wB-1CD\" eventType=\"touchUpInside\" id=\"Xu5-ba-Zes\"/>\n                                                    </connections>\n                                                </button>\n                                                <label opaque=\"NO\" userInteractionEnabled=\"NO\" contentMode=\"left\" horizontalHuggingPriority=\"251\" verticalHuggingPriority=\"251\" text=\"Incomplete\" textAlignment=\"natural\" lineBreakMode=\"tailTruncation\" baselineAdjustment=\"alignBaselines\" adjustsFontSizeToFit=\"NO\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"P8S-SZ-g5V\">\n                                                    <rect key=\"frame\" x=\"59\" y=\"46\" width=\"86\" height=\"21\"/>\n                                                    <fontDescription key=\"fontDescription\" type=\"system\" pointSize=\"17\"/>\n                                                    <color key=\"textColor\" cocoaTouchSystemColor=\"darkTextColor\"/>\n                                                    <nil key=\"highlightedColor\"/>\n                                                </label>\n                                            </subviews>\n                                            <constraints>\n                                                <constraint firstItem=\"1EF-AG-Tuv\" firstAttribute=\"top\" secondItem=\"0JE-Yp-wOJ\" secondAttribute=\"topMargin\" constant=\"8\" id=\"HxH-Fl-Jli\"/>\n                                                <constraint firstItem=\"aFx-Fr-jWj\" firstAttribute=\"top\" secondItem=\"1EF-AG-Tuv\" secondAttribute=\"bottom\" constant=\"8\" id=\"Kqu-aY-Mzw\"/>\n                                                <constraint firstItem=\"PUe-vc-MjY\" firstAttribute=\"top\" secondItem=\"0JE-Yp-wOJ\" secondAttribute=\"topMargin\" constant=\"8\" id=\"M3d-Me-3rh\"/>\n                                                <constraint firstItem=\"PUe-vc-MjY\" firstAttribute=\"centerY\" secondItem=\"1EF-AG-Tuv\" secondAttribute=\"centerY\" id=\"QOE-pj-TdC\"/>\n                                                <constraint firstItem=\"P8S-SZ-g5V\" firstAttribute=\"centerY\" secondItem=\"aFx-Fr-jWj\" secondAttribute=\"centerY\" id=\"dbQ-PS-ppg\"/>\n                                                <constraint firstAttribute=\"trailingMargin\" relation=\"greaterThanOrEqual\" secondItem=\"PUe-vc-MjY\" secondAttribute=\"trailing\" constant=\"8\" id=\"edq-Yu-SIy\"/>\n                                                <constraint firstAttribute=\"bottomMargin\" secondItem=\"aFx-Fr-jWj\" secondAttribute=\"bottom\" constant=\"8\" id=\"ehy-2O-w8i\"/>\n                                                <constraint firstItem=\"PUe-vc-MjY\" firstAttribute=\"leading\" secondItem=\"1EF-AG-Tuv\" secondAttribute=\"trailing\" constant=\"8\" id=\"h23-T0-nvn\"/>\n                                                <constraint firstItem=\"1EF-AG-Tuv\" firstAttribute=\"leading\" secondItem=\"0JE-Yp-wOJ\" secondAttribute=\"leadingMargin\" constant=\"8\" id=\"hhD-Si-Ozn\"/>\n                                                <constraint firstItem=\"aFx-Fr-jWj\" firstAttribute=\"leading\" secondItem=\"0JE-Yp-wOJ\" secondAttribute=\"leadingMargin\" constant=\"8\" id=\"jsf-TQ-8ej\"/>\n                                                <constraint firstItem=\"P8S-SZ-g5V\" firstAttribute=\"leading\" secondItem=\"aFx-Fr-jWj\" secondAttribute=\"trailing\" constant=\"8\" id=\"oaO-vf-yyq\"/>\n                                            </constraints>\n                                            <variation key=\"default\">\n                                                <mask key=\"constraints\">\n                                                    <exclude reference=\"ehy-2O-w8i\"/>\n                                                    <exclude reference=\"QOE-pj-TdC\"/>\n                                                </mask>\n                                            </variation>\n                                        </tableViewCellContentView>\n                                        <connections>\n                                            <outlet property=\"scanButton\" destination=\"aFx-Fr-jWj\" id=\"OIX-ku-gKf\"/>\n                                            <outlet property=\"statusLabel\" destination=\"P8S-SZ-g5V\" id=\"NYe-NG-X66\"/>\n                                            <outlet property=\"step1Label\" destination=\"1EF-AG-Tuv\" id=\"3cr-bI-cOL\"/>\n                                        </connections>\n                                    </tableViewCell>\n                                    <tableViewCell clipsSubviews=\"YES\" contentMode=\"scaleToFill\" selectionStyle=\"default\" indentationWidth=\"10\" reuseIdentifier=\"InputColdWalletKeyCellIdentifier\" rowHeight=\"151\" id=\"KE5-bX-FLO\" customClass=\"TLInputColdWalletKeyTableViewCell\">\n                                        <rect key=\"frame\" x=\"0.0\" y=\"143.5\" width=\"383\" height=\"151\"/>\n                                        <autoresizingMask key=\"autoresizingMask\"/>\n                                        <tableViewCellContentView key=\"contentView\" opaque=\"NO\" clipsSubviews=\"YES\" multipleTouchEnabled=\"YES\" contentMode=\"center\" tableViewCell=\"KE5-bX-FLO\" id=\"HZ5-aJ-D8k\">\n                                            <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"383\" height=\"150.5\"/>\n                                            <autoresizingMask key=\"autoresizingMask\"/>\n                                            <subviews>\n                                                <textView clipsSubviews=\"YES\" multipleTouchEnabled=\"YES\" contentMode=\"scaleToFill\" text=\"street ankle life mass ready viable worth renew stove panther immense camera\" textAlignment=\"natural\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"8T4-K7-DEy\">\n                                                    <rect key=\"frame\" x=\"16\" y=\"46\" width=\"351\" height=\"50\"/>\n                                                    <color key=\"backgroundColor\" red=\"1\" green=\"1\" blue=\"1\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n                                                    <constraints>\n                                                        <constraint firstAttribute=\"height\" constant=\"50\" id=\"MPL-rD-aId\"/>\n                                                    </constraints>\n                                                    <fontDescription key=\"fontDescription\" type=\"system\" pointSize=\"14\"/>\n                                                    <textInputTraits key=\"textInputTraits\" autocapitalizationType=\"sentences\"/>\n                                                </textView>\n                                                <button opaque=\"NO\" contentMode=\"scaleToFill\" contentHorizontalAlignment=\"center\" contentVerticalAlignment=\"center\" buttonType=\"infoLight\" showsTouchWhenHighlighted=\"YES\" lineBreakMode=\"middleTruncation\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"wNi-jF-drF\">\n                                                    <rect key=\"frame\" x=\"291\" y=\"16\" width=\"22\" height=\"22\"/>\n                                                    <constraints>\n                                                        <constraint firstAttribute=\"width\" constant=\"22\" id=\"edh-yd-ApQ\"/>\n                                                        <constraint firstAttribute=\"height\" constant=\"22\" id=\"wbW-0c-f4w\"/>\n                                                    </constraints>\n                                                    <connections>\n                                                        <action selector=\"infoButtonClicked:\" destination=\"KE5-bX-FLO\" eventType=\"touchUpInside\" id=\"t8O-R5-gUP\"/>\n                                                    </connections>\n                                                </button>\n                                                <label opaque=\"NO\" userInteractionEnabled=\"NO\" contentMode=\"left\" horizontalHuggingPriority=\"251\" verticalHuggingPriority=\"251\" text=\"Step 2: Input 12 word backup passphrase\" textAlignment=\"natural\" lineBreakMode=\"tailTruncation\" baselineAdjustment=\"alignBaselines\" minimumFontSize=\"7\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"9sL-6M-fQO\">\n                                                    <rect key=\"frame\" x=\"16\" y=\"16\" width=\"267\" height=\"17\"/>\n                                                    <fontDescription key=\"fontDescription\" type=\"system\" pointSize=\"14\"/>\n                                                    <color key=\"textColor\" cocoaTouchSystemColor=\"darkTextColor\"/>\n                                                    <nil key=\"highlightedColor\"/>\n                                                </label>\n                                                <label opaque=\"NO\" userInteractionEnabled=\"NO\" contentMode=\"left\" horizontalHuggingPriority=\"251\" verticalHuggingPriority=\"251\" text=\"Incomplete\" textAlignment=\"natural\" lineBreakMode=\"tailTruncation\" numberOfLines=\"2\" baselineAdjustment=\"alignBaselines\" minimumFontSize=\"9\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"BDz-V2-QTc\">\n                                                    <rect key=\"frame\" x=\"16\" y=\"104\" width=\"351\" height=\"30\"/>\n                                                    <constraints>\n                                                        <constraint firstAttribute=\"height\" constant=\"30\" id=\"6uE-0u-goP\"/>\n                                                    </constraints>\n                                                    <fontDescription key=\"fontDescription\" type=\"system\" pointSize=\"17\"/>\n                                                    <color key=\"textColor\" cocoaTouchSystemColor=\"darkTextColor\"/>\n                                                    <nil key=\"highlightedColor\"/>\n                                                </label>\n                                            </subviews>\n                                            <constraints>\n                                                <constraint firstItem=\"BDz-V2-QTc\" firstAttribute=\"top\" secondItem=\"8T4-K7-DEy\" secondAttribute=\"bottom\" constant=\"8\" id=\"5ww-9g-tst\"/>\n                                                <constraint firstAttribute=\"bottomMargin\" secondItem=\"BDz-V2-QTc\" secondAttribute=\"bottom\" constant=\"8\" id=\"75h-ak-Wkx\"/>\n                                                <constraint firstItem=\"wNi-jF-drF\" firstAttribute=\"centerY\" secondItem=\"9sL-6M-fQO\" secondAttribute=\"centerY\" id=\"IcV-kX-6Zp\"/>\n                                                <constraint firstItem=\"wNi-jF-drF\" firstAttribute=\"top\" secondItem=\"HZ5-aJ-D8k\" secondAttribute=\"topMargin\" constant=\"8\" id=\"J0B-PP-I1V\"/>\n                                                <constraint firstItem=\"8T4-K7-DEy\" firstAttribute=\"top\" secondItem=\"wNi-jF-drF\" secondAttribute=\"bottom\" constant=\"8\" id=\"RX6-G0-eS5\"/>\n                                                <constraint firstItem=\"9sL-6M-fQO\" firstAttribute=\"top\" secondItem=\"HZ5-aJ-D8k\" secondAttribute=\"topMargin\" constant=\"8\" id=\"XZF-Ym-Qhg\"/>\n                                                <constraint firstAttribute=\"trailingMargin\" secondItem=\"BDz-V2-QTc\" secondAttribute=\"trailing\" constant=\"8\" id=\"ZPQ-qJ-fuM\"/>\n                                                <constraint firstAttribute=\"trailingMargin\" secondItem=\"8T4-K7-DEy\" secondAttribute=\"trailing\" constant=\"8\" id=\"ajy-7C-DDe\"/>\n                                                <constraint firstAttribute=\"trailingMargin\" relation=\"greaterThanOrEqual\" secondItem=\"wNi-jF-drF\" secondAttribute=\"trailing\" constant=\"8\" id=\"eSc-8A-4KW\"/>\n                                                <constraint firstItem=\"wNi-jF-drF\" firstAttribute=\"leading\" secondItem=\"9sL-6M-fQO\" secondAttribute=\"trailing\" constant=\"8\" id=\"fqR-CJ-Gaf\"/>\n                                                <constraint firstItem=\"8T4-K7-DEy\" firstAttribute=\"leading\" secondItem=\"HZ5-aJ-D8k\" secondAttribute=\"leadingMargin\" constant=\"8\" id=\"mlN-u2-uWW\"/>\n                                                <constraint firstItem=\"BDz-V2-QTc\" firstAttribute=\"leading\" secondItem=\"HZ5-aJ-D8k\" secondAttribute=\"leadingMargin\" constant=\"8\" id=\"tZp-gi-pad\"/>\n                                                <constraint firstItem=\"9sL-6M-fQO\" firstAttribute=\"leading\" secondItem=\"HZ5-aJ-D8k\" secondAttribute=\"leadingMargin\" constant=\"8\" id=\"wJR-HD-cjz\"/>\n                                            </constraints>\n                                            <variation key=\"default\">\n                                                <mask key=\"constraints\">\n                                                    <exclude reference=\"75h-ak-Wkx\"/>\n                                                    <exclude reference=\"IcV-kX-6Zp\"/>\n                                                </mask>\n                                            </variation>\n                                        </tableViewCellContentView>\n                                        <connections>\n                                            <outlet property=\"keyInputTextView\" destination=\"8T4-K7-DEy\" id=\"bUJ-XY-qUm\"/>\n                                            <outlet property=\"statusLabel\" destination=\"BDz-V2-QTc\" id=\"CLW-kW-Jfq\"/>\n                                            <outlet property=\"step2Label\" destination=\"9sL-6M-fQO\" id=\"uTc-RD-qQe\"/>\n                                        </connections>\n                                    </tableViewCell>\n                                    <tableViewCell clipsSubviews=\"YES\" contentMode=\"scaleToFill\" selectionStyle=\"default\" indentationWidth=\"10\" reuseIdentifier=\"PassSignedTxCellIdentifier\" rowHeight=\"88\" id=\"PUg-nv-QF4\" customClass=\"TLPassSignedTxTableViewCell\">\n                                        <rect key=\"frame\" x=\"0.0\" y=\"294.5\" width=\"383\" height=\"88\"/>\n                                        <autoresizingMask key=\"autoresizingMask\"/>\n                                        <tableViewCellContentView key=\"contentView\" opaque=\"NO\" clipsSubviews=\"YES\" multipleTouchEnabled=\"YES\" contentMode=\"center\" tableViewCell=\"PUg-nv-QF4\" id=\"cUw-h4-8NZ\">\n                                            <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"383\" height=\"87.5\"/>\n                                            <autoresizingMask key=\"autoresizingMask\"/>\n                                            <subviews>\n                                                <label opaque=\"NO\" userInteractionEnabled=\"NO\" contentMode=\"left\" horizontalHuggingPriority=\"251\" verticalHuggingPriority=\"251\" text=\"Step 3: Pass authorized transaction data\" textAlignment=\"natural\" lineBreakMode=\"tailTruncation\" baselineAdjustment=\"alignBaselines\" minimumFontSize=\"7\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"Qhi-3j-THU\">\n                                                    <rect key=\"frame\" x=\"16\" y=\"16\" width=\"262\" height=\"17\"/>\n                                                    <fontDescription key=\"fontDescription\" type=\"system\" pointSize=\"14\"/>\n                                                    <color key=\"textColor\" cocoaTouchSystemColor=\"darkTextColor\"/>\n                                                    <nil key=\"highlightedColor\"/>\n                                                </label>\n                                                <button opaque=\"NO\" contentMode=\"scaleToFill\" contentHorizontalAlignment=\"center\" contentVerticalAlignment=\"center\" buttonType=\"infoLight\" showsTouchWhenHighlighted=\"YES\" lineBreakMode=\"middleTruncation\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"nN3-eA-KV3\">\n                                                    <rect key=\"frame\" x=\"286\" y=\"16\" width=\"22\" height=\"22\"/>\n                                                    <constraints>\n                                                        <constraint firstAttribute=\"width\" constant=\"22\" id=\"Pe1-Ca-aQe\"/>\n                                                        <constraint firstAttribute=\"height\" constant=\"22\" id=\"ylC-r0-xao\"/>\n                                                    </constraints>\n                                                    <connections>\n                                                        <action selector=\"infoButtonClicked:\" destination=\"PUg-nv-QF4\" eventType=\"touchUpInside\" id=\"qZI-iS-fkR\"/>\n                                                    </connections>\n                                                </button>\n                                                <button opaque=\"NO\" contentMode=\"scaleToFill\" contentHorizontalAlignment=\"center\" contentVerticalAlignment=\"center\" buttonType=\"roundedRect\" lineBreakMode=\"middleTruncation\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"noM-hf-cWa\">\n                                                    <rect key=\"frame\" x=\"16\" y=\"41\" width=\"90\" height=\"30\"/>\n                                                    <constraints>\n                                                        <constraint firstAttribute=\"width\" constant=\"90\" id=\"9o6-ca-PA1\"/>\n                                                        <constraint firstAttribute=\"height\" constant=\"30\" id=\"Wen-jO-laC\"/>\n                                                    </constraints>\n                                                    <state key=\"normal\" title=\"Pass\"/>\n                                                    <userDefinedRuntimeAttributes>\n                                                        <userDefinedRuntimeAttribute type=\"string\" keyPath=\"layer.cornerRadius\" value=\"5\"/>\n                                                    </userDefinedRuntimeAttributes>\n                                                    <connections>\n                                                        <action selector=\"passButtonClicked:\" destination=\"PUg-nv-QF4\" eventType=\"touchUpInside\" id=\"fWU-J4-YFL\"/>\n                                                    </connections>\n                                                </button>\n                                            </subviews>\n                                            <constraints>\n                                                <constraint firstItem=\"nN3-eA-KV3\" firstAttribute=\"centerY\" secondItem=\"Qhi-3j-THU\" secondAttribute=\"centerY\" id=\"8GB-2V-bqk\"/>\n                                                <constraint firstItem=\"Qhi-3j-THU\" firstAttribute=\"leading\" secondItem=\"cUw-h4-8NZ\" secondAttribute=\"leadingMargin\" constant=\"8\" id=\"9Jg-7z-3fp\"/>\n                                                <constraint firstItem=\"nN3-eA-KV3\" firstAttribute=\"leading\" secondItem=\"Qhi-3j-THU\" secondAttribute=\"trailing\" constant=\"8\" id=\"B8g-Ps-RLS\"/>\n                                                <constraint firstItem=\"nN3-eA-KV3\" firstAttribute=\"top\" secondItem=\"cUw-h4-8NZ\" secondAttribute=\"topMargin\" constant=\"8\" id=\"JgZ-dt-mYj\"/>\n                                                <constraint firstAttribute=\"trailingMargin\" relation=\"greaterThanOrEqual\" secondItem=\"nN3-eA-KV3\" secondAttribute=\"trailing\" constant=\"8\" id=\"XWJ-OQ-CAq\"/>\n                                                <constraint firstAttribute=\"bottomMargin\" secondItem=\"noM-hf-cWa\" secondAttribute=\"bottom\" constant=\"8\" id=\"apU-Ah-2CJ\"/>\n                                                <constraint firstItem=\"noM-hf-cWa\" firstAttribute=\"leading\" secondItem=\"cUw-h4-8NZ\" secondAttribute=\"leadingMargin\" constant=\"8\" id=\"vQd-KG-cQo\"/>\n                                                <constraint firstItem=\"Qhi-3j-THU\" firstAttribute=\"top\" secondItem=\"cUw-h4-8NZ\" secondAttribute=\"topMargin\" constant=\"8\" id=\"vbA-K5-CF3\"/>\n                                                <constraint firstItem=\"noM-hf-cWa\" firstAttribute=\"top\" secondItem=\"Qhi-3j-THU\" secondAttribute=\"bottom\" constant=\"8\" id=\"yYK-7I-ZVo\"/>\n                                            </constraints>\n                                            <variation key=\"default\">\n                                                <mask key=\"constraints\">\n                                                    <exclude reference=\"apU-Ah-2CJ\"/>\n                                                    <exclude reference=\"8GB-2V-bqk\"/>\n                                                </mask>\n                                            </variation>\n                                        </tableViewCellContentView>\n                                        <connections>\n                                            <outlet property=\"passButton\" destination=\"noM-hf-cWa\" id=\"Z7L-Jv-QNO\"/>\n                                            <outlet property=\"step3Label\" destination=\"Qhi-3j-THU\" id=\"PqP-R7-XFh\"/>\n                                        </connections>\n                                    </tableViewCell>\n                                </prototypes>\n                            </tableView>\n                        </subviews>\n                        <color key=\"backgroundColor\" red=\"1\" green=\"1\" blue=\"1\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n                        <constraints>\n                            <constraint firstItem=\"acg-Nx-MmS\" firstAttribute=\"top\" secondItem=\"2DQ-MR-AJY\" secondAttribute=\"topMargin\" id=\"9qu-x6-7w4\"/>\n                            <constraint firstItem=\"SVd-yL-fzu\" firstAttribute=\"bottom\" secondItem=\"acg-Nx-MmS\" secondAttribute=\"bottom\" id=\"QLe-tV-8G4\"/>\n                            <constraint firstAttribute=\"trailingMargin\" secondItem=\"acg-Nx-MmS\" secondAttribute=\"trailing\" constant=\"-20\" id=\"Z6U-J7-VQL\"/>\n                            <constraint firstItem=\"acg-Nx-MmS\" firstAttribute=\"leading\" secondItem=\"2DQ-MR-AJY\" secondAttribute=\"leadingMargin\" constant=\"-20\" id=\"ukc-yS-T6D\"/>\n                        </constraints>\n                        <viewLayoutGuide key=\"safeArea\" id=\"SVd-yL-fzu\"/>\n                    </view>\n                    <connections>\n                        <outlet property=\"tableView\" destination=\"acg-Nx-MmS\" id=\"vMO-mi-z9d\"/>\n                    </connections>\n                </viewController>\n                <placeholder placeholderIdentifier=\"IBFirstResponder\" id=\"7EJ-pg-ggA\" userLabel=\"First Responder\" sceneMemberID=\"firstResponder\"/>\n            </objects>\n            <point key=\"canvasLocation\" x=\"1152.8\" y=\"5668.5157421289359\"/>\n        </scene>\n        <!--Brain Wallet View Controller-->\n        <scene sceneID=\"8xC-Dy-v2F\">\n            <objects>\n                <viewController storyboardIdentifier=\"SeeHDWalletData\" id=\"DOb-yd-euR\" customClass=\"TLBrainWalletViewController\" sceneMemberID=\"viewController\">\n                    <view key=\"view\" contentMode=\"scaleToFill\" id=\"nbi-WT-AVp\">\n                        <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"375\" height=\"667\"/>\n                        <autoresizingMask key=\"autoresizingMask\" widthSizable=\"YES\" heightSizable=\"YES\"/>\n                        <subviews>\n                            <tableView clipsSubviews=\"YES\" contentMode=\"scaleToFill\" alwaysBounceVertical=\"YES\" dataMode=\"prototypes\" style=\"grouped\" separatorStyle=\"default\" allowsSelection=\"NO\" rowHeight=\"141\" sectionHeaderHeight=\"10\" sectionFooterHeight=\"10\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"gTP-dG-YzZ\">\n                                <rect key=\"frame\" x=\"-4\" y=\"64\" width=\"383\" height=\"603\"/>\n                                <color key=\"backgroundColor\" red=\"0.93725490199999995\" green=\"0.93725490199999995\" blue=\"0.95686274510000002\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n                                <prototypes>\n                                    <tableViewCell clipsSubviews=\"YES\" contentMode=\"scaleToFill\" selectionStyle=\"default\" indentationWidth=\"10\" reuseIdentifier=\"ColdWalletSelectKeyTypeCellIdentifier\" rowHeight=\"61\" id=\"XIR-M6-suE\" customClass=\"TLColdWalletSelectKeyTypeTableViewCell\">\n                                        <rect key=\"frame\" x=\"0.0\" y=\"55.5\" width=\"383\" height=\"61\"/>\n                                        <autoresizingMask key=\"autoresizingMask\"/>\n                                        <tableViewCellContentView key=\"contentView\" opaque=\"NO\" clipsSubviews=\"YES\" multipleTouchEnabled=\"YES\" contentMode=\"center\" tableViewCell=\"XIR-M6-suE\" id=\"n13-8g-bNz\">\n                                            <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"383\" height=\"60.5\"/>\n                                            <autoresizingMask key=\"autoresizingMask\"/>\n                                            <subviews>\n                                                <segmentedControl opaque=\"NO\" contentMode=\"scaleToFill\" contentHorizontalAlignment=\"left\" contentVerticalAlignment=\"top\" segmentControlStyle=\"plain\" selectedSegmentIndex=\"0\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"Whz-q3-zSQ\">\n                                                    <rect key=\"frame\" x=\"16\" y=\"16\" width=\"351\" height=\"30\"/>\n                                                    <constraints>\n                                                        <constraint firstAttribute=\"width\" constant=\"386\" id=\"bMn-hR-mHM\"/>\n                                                    </constraints>\n                                                    <segments>\n                                                        <segment title=\"Mnemonic\"/>\n                                                        <segment title=\"Account Private Key\"/>\n                                                        <segment title=\"\"/>\n                                                    </segments>\n                                                    <variation key=\"default\">\n                                                        <mask key=\"constraints\">\n                                                            <exclude reference=\"bMn-hR-mHM\"/>\n                                                        </mask>\n                                                    </variation>\n                                                    <connections>\n                                                        <action selector=\"coldWalletKeyTypeValueChanged:\" destination=\"XIR-M6-suE\" eventType=\"valueChanged\" id=\"nBL-YS-4p2\"/>\n                                                    </connections>\n                                                </segmentedControl>\n                                            </subviews>\n                                            <constraints>\n                                                <constraint firstItem=\"Whz-q3-zSQ\" firstAttribute=\"centerX\" secondItem=\"n13-8g-bNz\" secondAttribute=\"centerX\" id=\"6A3-UN-rcO\"/>\n                                                <constraint firstAttribute=\"trailingMargin\" secondItem=\"Whz-q3-zSQ\" secondAttribute=\"trailing\" constant=\"99\" id=\"HGI-9S-7F0\"/>\n                                                <constraint firstAttribute=\"trailingMargin\" secondItem=\"Whz-q3-zSQ\" secondAttribute=\"trailing\" constant=\"8\" id=\"K53-4M-nEc\"/>\n                                                <constraint firstItem=\"Whz-q3-zSQ\" firstAttribute=\"leading\" secondItem=\"n13-8g-bNz\" secondAttribute=\"leadingMargin\" constant=\"8\" id=\"SBb-k9-v38\"/>\n                                                <constraint firstItem=\"Whz-q3-zSQ\" firstAttribute=\"top\" secondItem=\"n13-8g-bNz\" secondAttribute=\"topMargin\" constant=\"8\" id=\"ZHv-RA-gXf\"/>\n                                                <constraint firstAttribute=\"bottomMargin\" secondItem=\"Whz-q3-zSQ\" secondAttribute=\"bottom\" constant=\"8\" id=\"enH-5t-c3r\"/>\n                                                <constraint firstItem=\"Whz-q3-zSQ\" firstAttribute=\"leading\" secondItem=\"n13-8g-bNz\" secondAttribute=\"leadingMargin\" constant=\"99\" id=\"yH6-aO-qtx\"/>\n                                            </constraints>\n                                            <variation key=\"default\">\n                                                <mask key=\"constraints\">\n                                                    <exclude reference=\"HGI-9S-7F0\"/>\n                                                    <exclude reference=\"yH6-aO-qtx\"/>\n                                                </mask>\n                                            </variation>\n                                        </tableViewCellContentView>\n                                        <connections>\n                                            <outlet property=\"coldWalletSelectSegmentedControl\" destination=\"Whz-q3-zSQ\" id=\"lbf-Ss-hem\"/>\n                                        </connections>\n                                    </tableViewCell>\n                                    <tableViewCell clipsSubviews=\"YES\" contentMode=\"scaleToFill\" selectionStyle=\"default\" indentationWidth=\"10\" reuseIdentifier=\"AdvancedNewWalletCellIdentifier\" rowHeight=\"1359\" id=\"jeP-rT-Q8B\" customClass=\"TLAdvancedNewWalletTableViewCell\">\n                                        <rect key=\"frame\" x=\"0.0\" y=\"116.5\" width=\"383\" height=\"1359\"/>\n                                        <autoresizingMask key=\"autoresizingMask\" flexibleMaxX=\"YES\" flexibleMaxY=\"YES\"/>\n                                        <tableViewCellContentView key=\"contentView\" opaque=\"NO\" clipsSubviews=\"YES\" multipleTouchEnabled=\"YES\" contentMode=\"center\" tableViewCell=\"jeP-rT-Q8B\" id=\"Tn6-7E-O4W\">\n                                            <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"383\" height=\"1358.5\"/>\n                                            <autoresizingMask key=\"autoresizingMask\"/>\n                                            <subviews>\n                                                <label opaque=\"NO\" userInteractionEnabled=\"NO\" contentMode=\"left\" horizontalHuggingPriority=\"251\" verticalHuggingPriority=\"251\" text=\"Starting Receiving Address ID:\" textAlignment=\"natural\" lineBreakMode=\"tailTruncation\" baselineAdjustment=\"alignBaselines\" adjustsFontSizeToFit=\"NO\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"wHc-Lm-EHM\">\n                                                    <rect key=\"frame\" x=\"16\" y=\"411\" width=\"190\" height=\"21\"/>\n                                                    <constraints>\n                                                        <constraint firstAttribute=\"height\" constant=\"21\" id=\"8lv-XE-RfL\"/>\n                                                        <constraint firstAttribute=\"width\" constant=\"85\" id=\"FuC-5e-yWZ\"/>\n                                                        <constraint firstAttribute=\"width\" constant=\"190\" id=\"L0Y-VW-vML\"/>\n                                                    </constraints>\n                                                    <fontDescription key=\"fontDescription\" type=\"system\" pointSize=\"13\"/>\n                                                    <color key=\"textColor\" red=\"0.0\" green=\"0.0\" blue=\"0.0\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n                                                    <nil key=\"highlightedColor\"/>\n                                                    <variation key=\"default\">\n                                                        <mask key=\"constraints\">\n                                                            <exclude reference=\"FuC-5e-yWZ\"/>\n                                                        </mask>\n                                                    </variation>\n                                                </label>\n                                                <label opaque=\"NO\" userInteractionEnabled=\"NO\" contentMode=\"left\" horizontalHuggingPriority=\"251\" verticalHuggingPriority=\"251\" text=\"Address ID 0:\" textAlignment=\"natural\" lineBreakMode=\"tailTruncation\" baselineAdjustment=\"alignBaselines\" adjustsFontSizeToFit=\"NO\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"1T8-1h-MPB\">\n                                                    <rect key=\"frame\" x=\"16\" y=\"440\" width=\"76\" height=\"21\"/>\n                                                    <constraints>\n                                                        <constraint firstAttribute=\"width\" constant=\"85\" id=\"cS1-HR-mle\"/>\n                                                        <constraint firstAttribute=\"height\" constant=\"21\" id=\"cbR-Y3-Ws9\"/>\n                                                        <constraint firstAttribute=\"width\" constant=\"89\" id=\"woX-ty-ACD\"/>\n                                                    </constraints>\n                                                    <fontDescription key=\"fontDescription\" type=\"system\" pointSize=\"12\"/>\n                                                    <color key=\"textColor\" red=\"0.0\" green=\"0.0\" blue=\"0.0\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n                                                    <nil key=\"highlightedColor\"/>\n                                                    <variation key=\"default\">\n                                                        <mask key=\"constraints\">\n                                                            <exclude reference=\"cS1-HR-mle\"/>\n                                                            <exclude reference=\"woX-ty-ACD\"/>\n                                                        </mask>\n                                                    </variation>\n                                                </label>\n                                                <textField opaque=\"NO\" clipsSubviews=\"YES\" contentMode=\"scaleToFill\" contentHorizontalAlignment=\"left\" contentVerticalAlignment=\"center\" text=\"0\" borderStyle=\"line\" placeholder=\"0\" textAlignment=\"natural\" minimumFontSize=\"17\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"l4f-HC-Yrb\">\n                                                    <rect key=\"frame\" x=\"214\" y=\"406\" width=\"97\" height=\"30\"/>\n                                                    <constraints>\n                                                        <constraint firstAttribute=\"width\" constant=\"97\" id=\"ag5-z7-qAi\"/>\n                                                        <constraint firstAttribute=\"height\" constant=\"30\" id=\"lua-jy-9Es\"/>\n                                                        <constraint firstAttribute=\"height\" constant=\"30\" id=\"mrr-h8-ygD\"/>\n                                                        <constraint firstAttribute=\"width\" constant=\"97\" id=\"n39-TU-i4w\"/>\n                                                    </constraints>\n                                                    <fontDescription key=\"fontDescription\" type=\"system\" pointSize=\"14\"/>\n                                                    <textInputTraits key=\"textInputTraits\"/>\n                                                    <variation key=\"default\">\n                                                        <mask key=\"constraints\">\n                                                            <exclude reference=\"ag5-z7-qAi\"/>\n                                                            <exclude reference=\"lua-jy-9Es\"/>\n                                                        </mask>\n                                                    </variation>\n                                                </textField>\n                                                <label opaque=\"NO\" userInteractionEnabled=\"NO\" contentMode=\"left\" horizontalHuggingPriority=\"251\" verticalHuggingPriority=\"251\" text=\"Account ID:\" textAlignment=\"natural\" lineBreakMode=\"tailTruncation\" baselineAdjustment=\"alignBaselines\" adjustsFontSizeToFit=\"NO\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"SVW-aE-eKJ\">\n                                                    <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"1000\" height=\"1000\"/>\n                                                    <constraints>\n                                                        <constraint firstAttribute=\"width\" constant=\"85\" id=\"B5G-ce-bga\"/>\n                                                        <constraint firstAttribute=\"width\" constant=\"89\" id=\"fxa-zk-RpP\"/>\n                                                        <constraint firstAttribute=\"height\" constant=\"21\" id=\"rRW-5j-9tZ\"/>\n                                                    </constraints>\n                                                    <fontDescription key=\"fontDescription\" type=\"system\" pointSize=\"17\"/>\n                                                    <color key=\"textColor\" red=\"0.0\" green=\"0.0\" blue=\"0.0\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n                                                    <nil key=\"highlightedColor\"/>\n                                                    <variation key=\"default\">\n                                                        <mask key=\"constraints\">\n                                                            <exclude reference=\"B5G-ce-bga\"/>\n                                                        </mask>\n                                                    </variation>\n                                                </label>\n                                                <label opaque=\"NO\" userInteractionEnabled=\"NO\" contentMode=\"left\" horizontalHuggingPriority=\"251\" verticalHuggingPriority=\"251\" text=\"Account Private Key:\" textAlignment=\"natural\" lineBreakMode=\"tailTruncation\" baselineAdjustment=\"alignBaselines\" adjustsFontSizeToFit=\"NO\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"hvV-BT-VFx\">\n                                                    <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"1000\" height=\"1000\"/>\n                                                    <constraints>\n                                                        <constraint firstAttribute=\"width\" constant=\"89\" id=\"3rX-xb-7Ry\"/>\n                                                        <constraint firstAttribute=\"height\" constant=\"21\" id=\"aYu-qI-vVn\"/>\n                                                        <constraint firstAttribute=\"width\" constant=\"85\" id=\"mTC-ye-eyr\"/>\n                                                    </constraints>\n                                                    <fontDescription key=\"fontDescription\" type=\"system\" pointSize=\"17\"/>\n                                                    <color key=\"textColor\" red=\"0.0\" green=\"0.0\" blue=\"0.0\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n                                                    <nil key=\"highlightedColor\"/>\n                                                    <variation key=\"default\">\n                                                        <mask key=\"constraints\">\n                                                            <exclude reference=\"3rX-xb-7Ry\"/>\n                                                            <exclude reference=\"mTC-ye-eyr\"/>\n                                                        </mask>\n                                                    </variation>\n                                                </label>\n                                                <textView clipsSubviews=\"YES\" multipleTouchEnabled=\"YES\" contentMode=\"scaleToFill\" text=\"xpub6CUHPUqLTj2pxbrab2gdy7XYKiAoy47PFRBkgf8YiBHD3UzJH6WqQSmLXAndZbFuJnU4tWgBWjRjSxyk6AHN5JpVsUMu4E9MwNCGgFNibDd\" textAlignment=\"natural\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"nS4-qx-Uvm\">\n                                                    <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"1000\" height=\"1000\"/>\n                                                    <color key=\"backgroundColor\" red=\"1\" green=\"1\" blue=\"1\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n                                                    <constraints>\n                                                        <constraint firstAttribute=\"height\" constant=\"49\" id=\"xk7-8U-o2E\"/>\n                                                    </constraints>\n                                                    <fontDescription key=\"fontDescription\" type=\"system\" pointSize=\"14\"/>\n                                                    <textInputTraits key=\"textInputTraits\" autocapitalizationType=\"sentences\"/>\n                                                </textView>\n                                                <button opaque=\"NO\" contentMode=\"scaleToFill\" contentHorizontalAlignment=\"center\" contentVerticalAlignment=\"center\" buttonType=\"roundedRect\" lineBreakMode=\"middleTruncation\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"kND-lh-fVh\">\n                                                    <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"1000\" height=\"1000\"/>\n                                                    <constraints>\n                                                        <constraint firstAttribute=\"height\" constant=\"30\" id=\"Ubs-5l-Mjm\"/>\n                                                        <constraint firstAttribute=\"width\" constant=\"90\" id=\"Ukh-39-iBO\"/>\n                                                    </constraints>\n                                                    <state key=\"normal\" title=\"Show QR\"/>\n                                                    <userDefinedRuntimeAttributes>\n                                                        <userDefinedRuntimeAttribute type=\"string\" keyPath=\"layer.cornerRadius\" value=\"5\"/>\n                                                    </userDefinedRuntimeAttributes>\n                                                </button>\n                                                <textField opaque=\"NO\" clipsSubviews=\"YES\" contentMode=\"scaleToFill\" contentHorizontalAlignment=\"left\" contentVerticalAlignment=\"center\" text=\"1Jhrq6Uxfku5sK9mf3QNwmPb1WPbKPQ9Yx\" borderStyle=\"line\" textAlignment=\"natural\" minimumFontSize=\"17\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"lXL-Uj-u1w\">\n                                                    <rect key=\"frame\" x=\"16\" y=\"461\" width=\"295\" height=\"30\"/>\n                                                    <constraints>\n                                                        <constraint firstAttribute=\"height\" constant=\"30\" id=\"rWj-LO-lVn\"/>\n                                                    </constraints>\n                                                    <fontDescription key=\"fontDescription\" type=\"system\" pointSize=\"9\"/>\n                                                    <textInputTraits key=\"textInputTraits\"/>\n                                                </textField>\n                                                <textField opaque=\"NO\" clipsSubviews=\"YES\" contentMode=\"scaleToFill\" contentHorizontalAlignment=\"left\" contentVerticalAlignment=\"center\" text=\"0\" borderStyle=\"line\" placeholder=\"0\" textAlignment=\"natural\" minimumFontSize=\"17\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"SPM-HC-T68\">\n                                                    <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"1000\" height=\"1000\"/>\n                                                    <constraints>\n                                                        <constraint firstAttribute=\"height\" constant=\"30\" id=\"1t9-qC-PJK\"/>\n                                                        <constraint firstAttribute=\"width\" constant=\"97\" id=\"3hk-td-t1j\"/>\n                                                        <constraint firstAttribute=\"width\" constant=\"97\" id=\"5a3-Xe-hr1\"/>\n                                                        <constraint firstAttribute=\"height\" constant=\"30\" id=\"h2x-Mc-Cah\"/>\n                                                    </constraints>\n                                                    <fontDescription key=\"fontDescription\" type=\"system\" pointSize=\"14\"/>\n                                                    <textInputTraits key=\"textInputTraits\"/>\n                                                    <variation key=\"default\">\n                                                        <mask key=\"constraints\">\n                                                            <exclude reference=\"1t9-qC-PJK\"/>\n                                                            <exclude reference=\"5a3-Xe-hr1\"/>\n                                                        </mask>\n                                                    </variation>\n                                                </textField>\n                                                <button opaque=\"NO\" contentMode=\"scaleToFill\" contentHorizontalAlignment=\"center\" contentVerticalAlignment=\"center\" buttonType=\"roundedRect\" lineBreakMode=\"middleTruncation\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"98i-Oo-pHA\">\n                                                    <rect key=\"frame\" x=\"319\" y=\"461\" width=\"48\" height=\"30\"/>\n                                                    <constraints>\n                                                        <constraint firstAttribute=\"width\" constant=\"48\" id=\"F1o-Ls-Xyo\"/>\n                                                        <constraint firstAttribute=\"height\" constant=\"30\" id=\"hXF-9l-dMa\"/>\n                                                    </constraints>\n                                                    <fontDescription key=\"fontDescription\" type=\"system\" pointSize=\"9\"/>\n                                                    <state key=\"normal\" title=\"QR Code\"/>\n                                                    <userDefinedRuntimeAttributes>\n                                                        <userDefinedRuntimeAttribute type=\"string\" keyPath=\"layer.cornerRadius\" value=\"5\"/>\n                                                    </userDefinedRuntimeAttributes>\n                                                    <connections>\n                                                        <action selector=\"showAddressQRButtonClicked1:\" destination=\"jeP-rT-Q8B\" eventType=\"touchUpInside\" id=\"oIU-ia-Pbt\"/>\n                                                    </connections>\n                                                </button>\n                                                <textField opaque=\"NO\" clipsSubviews=\"YES\" contentMode=\"scaleToFill\" contentHorizontalAlignment=\"left\" contentVerticalAlignment=\"center\" text=\"L5HJ8fiaSL2oGNUrgVcAnq284r9g43F6P2FsjidA7nwuhTDMEdds\" borderStyle=\"line\" textAlignment=\"natural\" minimumFontSize=\"17\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"Joe-Ag-Cvs\">\n                                                    <rect key=\"frame\" x=\"16\" y=\"492\" width=\"295\" height=\"30\"/>\n                                                    <constraints>\n                                                        <constraint firstAttribute=\"height\" constant=\"30\" id=\"4e3-l7-Zhc\"/>\n                                                    </constraints>\n                                                    <fontDescription key=\"fontDescription\" type=\"system\" pointSize=\"9\"/>\n                                                    <textInputTraits key=\"textInputTraits\"/>\n                                                </textField>\n                                                <button opaque=\"NO\" contentMode=\"scaleToFill\" contentHorizontalAlignment=\"center\" contentVerticalAlignment=\"center\" buttonType=\"roundedRect\" lineBreakMode=\"middleTruncation\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"Oey-so-vuX\">\n                                                    <rect key=\"frame\" x=\"319\" y=\"492\" width=\"48\" height=\"30\"/>\n                                                    <constraints>\n                                                        <constraint firstAttribute=\"height\" constant=\"30\" id=\"6hZ-I1-qX9\"/>\n                                                        <constraint firstAttribute=\"width\" constant=\"48\" id=\"yOB-3e-ScM\"/>\n                                                    </constraints>\n                                                    <fontDescription key=\"fontDescription\" type=\"system\" pointSize=\"9\"/>\n                                                    <state key=\"normal\" title=\"QR Code\"/>\n                                                    <userDefinedRuntimeAttributes>\n                                                        <userDefinedRuntimeAttribute type=\"string\" keyPath=\"layer.cornerRadius\" value=\"5\"/>\n                                                    </userDefinedRuntimeAttributes>\n                                                    <connections>\n                                                        <action selector=\"showPrivateKeyQRButtonClicked1:\" destination=\"jeP-rT-Q8B\" eventType=\"touchUpInside\" id=\"xSh-sQ-z1W\"/>\n                                                    </connections>\n                                                </button>\n                                                <label opaque=\"NO\" userInteractionEnabled=\"NO\" contentMode=\"left\" horizontalHuggingPriority=\"251\" verticalHuggingPriority=\"251\" text=\"Address ID 1:\" textAlignment=\"natural\" lineBreakMode=\"tailTruncation\" baselineAdjustment=\"alignBaselines\" adjustsFontSizeToFit=\"NO\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"4Er-7p-LfQ\">\n                                                    <rect key=\"frame\" x=\"16\" y=\"524\" width=\"75\" height=\"21\"/>\n                                                    <constraints>\n                                                        <constraint firstAttribute=\"height\" constant=\"21\" id=\"DwE-Od-4yU\"/>\n                                                        <constraint firstAttribute=\"width\" constant=\"85\" id=\"oGP-48-TtI\"/>\n                                                        <constraint firstAttribute=\"width\" constant=\"89\" id=\"xcA-Cf-2Dl\"/>\n                                                    </constraints>\n                                                    <fontDescription key=\"fontDescription\" type=\"system\" pointSize=\"12\"/>\n                                                    <color key=\"textColor\" red=\"0.0\" green=\"0.0\" blue=\"0.0\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n                                                    <nil key=\"highlightedColor\"/>\n                                                    <variation key=\"default\">\n                                                        <mask key=\"constraints\">\n                                                            <exclude reference=\"oGP-48-TtI\"/>\n                                                            <exclude reference=\"xcA-Cf-2Dl\"/>\n                                                        </mask>\n                                                    </variation>\n                                                </label>\n                                                <textField opaque=\"NO\" clipsSubviews=\"YES\" contentMode=\"scaleToFill\" contentHorizontalAlignment=\"left\" contentVerticalAlignment=\"center\" text=\"1Jhrq6Uxfku5sK9mf3QNwmPb1WPbKPQ9Yx\" borderStyle=\"line\" textAlignment=\"natural\" minimumFontSize=\"17\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"f2d-GA-xFX\">\n                                                    <rect key=\"frame\" x=\"16\" y=\"545\" width=\"295\" height=\"30\"/>\n                                                    <constraints>\n                                                        <constraint firstAttribute=\"height\" constant=\"30\" id=\"EPQ-gg-hLc\"/>\n                                                    </constraints>\n                                                    <fontDescription key=\"fontDescription\" type=\"system\" pointSize=\"9\"/>\n                                                    <textInputTraits key=\"textInputTraits\"/>\n                                                </textField>\n                                                <button opaque=\"NO\" contentMode=\"scaleToFill\" contentHorizontalAlignment=\"center\" contentVerticalAlignment=\"center\" buttonType=\"roundedRect\" lineBreakMode=\"middleTruncation\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"o3w-pQ-fEA\">\n                                                    <rect key=\"frame\" x=\"319\" y=\"545\" width=\"48\" height=\"30\"/>\n                                                    <constraints>\n                                                        <constraint firstAttribute=\"height\" constant=\"30\" id=\"0sD-EI-GzK\"/>\n                                                        <constraint firstAttribute=\"width\" constant=\"48\" id=\"EQe-BF-AP9\"/>\n                                                    </constraints>\n                                                    <fontDescription key=\"fontDescription\" type=\"system\" pointSize=\"9\"/>\n                                                    <state key=\"normal\" title=\"QR Code\"/>\n                                                    <userDefinedRuntimeAttributes>\n                                                        <userDefinedRuntimeAttribute type=\"string\" keyPath=\"layer.cornerRadius\" value=\"5\"/>\n                                                    </userDefinedRuntimeAttributes>\n                                                    <connections>\n                                                        <action selector=\"showAddressQRButtonClicked2:\" destination=\"jeP-rT-Q8B\" eventType=\"touchUpInside\" id=\"je5-oc-J6u\"/>\n                                                    </connections>\n                                                </button>\n                                                <textField opaque=\"NO\" clipsSubviews=\"YES\" contentMode=\"scaleToFill\" contentHorizontalAlignment=\"left\" contentVerticalAlignment=\"center\" text=\"L5HJ8fiaSL2oGNUrgVcAnq284r9g43F6P2FsjidA7nwuhTDMEdds\" borderStyle=\"line\" textAlignment=\"natural\" minimumFontSize=\"17\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"CyY-nD-niX\">\n                                                    <rect key=\"frame\" x=\"16\" y=\"576\" width=\"295\" height=\"30\"/>\n                                                    <constraints>\n                                                        <constraint firstAttribute=\"height\" constant=\"30\" id=\"75P-m2-V2h\"/>\n                                                    </constraints>\n                                                    <fontDescription key=\"fontDescription\" type=\"system\" pointSize=\"9\"/>\n                                                    <textInputTraits key=\"textInputTraits\"/>\n                                                </textField>\n                                                <button opaque=\"NO\" contentMode=\"scaleToFill\" contentHorizontalAlignment=\"center\" contentVerticalAlignment=\"center\" buttonType=\"roundedRect\" lineBreakMode=\"middleTruncation\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"iHQ-HC-h7I\">\n                                                    <rect key=\"frame\" x=\"319\" y=\"576\" width=\"48\" height=\"30\"/>\n                                                    <constraints>\n                                                        <constraint firstAttribute=\"height\" constant=\"30\" id=\"KNU-g9-A4v\"/>\n                                                        <constraint firstAttribute=\"width\" constant=\"48\" id=\"SqH-0y-TSV\"/>\n                                                    </constraints>\n                                                    <fontDescription key=\"fontDescription\" type=\"system\" pointSize=\"9\"/>\n                                                    <state key=\"normal\" title=\"QR Code\"/>\n                                                    <userDefinedRuntimeAttributes>\n                                                        <userDefinedRuntimeAttribute type=\"string\" keyPath=\"layer.cornerRadius\" value=\"5\"/>\n                                                    </userDefinedRuntimeAttributes>\n                                                    <connections>\n                                                        <action selector=\"showPrivateKeyQRButtonClicked2:\" destination=\"jeP-rT-Q8B\" eventType=\"touchUpInside\" id=\"PHG-dm-wGL\"/>\n                                                    </connections>\n                                                </button>\n                                                <label opaque=\"NO\" userInteractionEnabled=\"NO\" contentMode=\"left\" horizontalHuggingPriority=\"251\" verticalHuggingPriority=\"251\" text=\"Address ID 2:\" textAlignment=\"natural\" lineBreakMode=\"tailTruncation\" baselineAdjustment=\"alignBaselines\" adjustsFontSizeToFit=\"NO\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"Gz1-7B-U19\">\n                                                    <rect key=\"frame\" x=\"16\" y=\"608\" width=\"76\" height=\"21\"/>\n                                                    <constraints>\n                                                        <constraint firstAttribute=\"width\" constant=\"85\" id=\"FIR-Oj-bGU\"/>\n                                                        <constraint firstAttribute=\"width\" constant=\"89\" id=\"k1k-J9-otO\"/>\n                                                        <constraint firstAttribute=\"height\" constant=\"21\" id=\"xf0-d2-hwA\"/>\n                                                    </constraints>\n                                                    <fontDescription key=\"fontDescription\" type=\"system\" pointSize=\"12\"/>\n                                                    <color key=\"textColor\" red=\"0.0\" green=\"0.0\" blue=\"0.0\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n                                                    <nil key=\"highlightedColor\"/>\n                                                    <variation key=\"default\">\n                                                        <mask key=\"constraints\">\n                                                            <exclude reference=\"FIR-Oj-bGU\"/>\n                                                            <exclude reference=\"k1k-J9-otO\"/>\n                                                        </mask>\n                                                    </variation>\n                                                </label>\n                                                <textField opaque=\"NO\" clipsSubviews=\"YES\" contentMode=\"scaleToFill\" contentHorizontalAlignment=\"left\" contentVerticalAlignment=\"center\" text=\"1Jhrq6Uxfku5sK9mf3QNwmPb1WPbKPQ9Yx\" borderStyle=\"line\" textAlignment=\"natural\" minimumFontSize=\"17\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"ln6-WA-vdK\">\n                                                    <rect key=\"frame\" x=\"16\" y=\"629\" width=\"295\" height=\"30\"/>\n                                                    <constraints>\n                                                        <constraint firstAttribute=\"height\" constant=\"30\" id=\"Kr4-9f-hAN\"/>\n                                                    </constraints>\n                                                    <fontDescription key=\"fontDescription\" type=\"system\" pointSize=\"9\"/>\n                                                    <textInputTraits key=\"textInputTraits\"/>\n                                                </textField>\n                                                <button opaque=\"NO\" contentMode=\"scaleToFill\" contentHorizontalAlignment=\"center\" contentVerticalAlignment=\"center\" buttonType=\"roundedRect\" lineBreakMode=\"middleTruncation\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"GXm-xv-dei\">\n                                                    <rect key=\"frame\" x=\"319\" y=\"629\" width=\"48\" height=\"30\"/>\n                                                    <constraints>\n                                                        <constraint firstAttribute=\"width\" constant=\"48\" id=\"7cJ-wA-hwv\"/>\n                                                        <constraint firstAttribute=\"height\" constant=\"30\" id=\"uyi-Jn-O8I\"/>\n                                                    </constraints>\n                                                    <fontDescription key=\"fontDescription\" type=\"system\" pointSize=\"9\"/>\n                                                    <state key=\"normal\" title=\"QR Code\"/>\n                                                    <userDefinedRuntimeAttributes>\n                                                        <userDefinedRuntimeAttribute type=\"string\" keyPath=\"layer.cornerRadius\" value=\"5\"/>\n                                                    </userDefinedRuntimeAttributes>\n                                                    <connections>\n                                                        <action selector=\"showAddressQRButtonClicked3:\" destination=\"jeP-rT-Q8B\" eventType=\"touchUpInside\" id=\"P5S-vo-ao5\"/>\n                                                    </connections>\n                                                </button>\n                                                <textField opaque=\"NO\" clipsSubviews=\"YES\" contentMode=\"scaleToFill\" contentHorizontalAlignment=\"left\" contentVerticalAlignment=\"center\" text=\"L5HJ8fiaSL2oGNUrgVcAnq284r9g43F6P2FsjidA7nwuhTDMEdds\" borderStyle=\"line\" textAlignment=\"natural\" minimumFontSize=\"17\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"PfF-lM-vHP\">\n                                                    <rect key=\"frame\" x=\"16\" y=\"660\" width=\"295\" height=\"30\"/>\n                                                    <constraints>\n                                                        <constraint firstAttribute=\"height\" constant=\"30\" id=\"RGh-gd-WKs\"/>\n                                                    </constraints>\n                                                    <fontDescription key=\"fontDescription\" type=\"system\" pointSize=\"9\"/>\n                                                    <textInputTraits key=\"textInputTraits\"/>\n                                                </textField>\n                                                <button opaque=\"NO\" contentMode=\"scaleToFill\" contentHorizontalAlignment=\"center\" contentVerticalAlignment=\"center\" buttonType=\"roundedRect\" lineBreakMode=\"middleTruncation\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"kOc-Zv-Dw2\">\n                                                    <rect key=\"frame\" x=\"319\" y=\"660\" width=\"48\" height=\"30\"/>\n                                                    <constraints>\n                                                        <constraint firstAttribute=\"height\" constant=\"30\" id=\"R1u-q1-2Zu\"/>\n                                                        <constraint firstAttribute=\"width\" constant=\"48\" id=\"r6p-MY-Xzi\"/>\n                                                    </constraints>\n                                                    <fontDescription key=\"fontDescription\" type=\"system\" pointSize=\"9\"/>\n                                                    <state key=\"normal\" title=\"QR Code\"/>\n                                                    <userDefinedRuntimeAttributes>\n                                                        <userDefinedRuntimeAttribute type=\"string\" keyPath=\"layer.cornerRadius\" value=\"5\"/>\n                                                    </userDefinedRuntimeAttributes>\n                                                    <connections>\n                                                        <action selector=\"showPrivateKeyQRButtonClicked3:\" destination=\"jeP-rT-Q8B\" eventType=\"touchUpInside\" id=\"NQH-gK-d4Y\"/>\n                                                    </connections>\n                                                </button>\n                                                <label opaque=\"NO\" userInteractionEnabled=\"NO\" contentMode=\"left\" horizontalHuggingPriority=\"251\" verticalHuggingPriority=\"251\" text=\"Address ID 3:\" textAlignment=\"natural\" lineBreakMode=\"tailTruncation\" baselineAdjustment=\"alignBaselines\" adjustsFontSizeToFit=\"NO\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"023-0e-B8c\">\n                                                    <rect key=\"frame\" x=\"16\" y=\"698\" width=\"76\" height=\"21\"/>\n                                                    <constraints>\n                                                        <constraint firstAttribute=\"height\" constant=\"21\" id=\"HRP-GN-R7N\"/>\n                                                        <constraint firstAttribute=\"width\" constant=\"89\" id=\"Ozq-bX-h2r\"/>\n                                                        <constraint firstAttribute=\"width\" constant=\"85\" id=\"ReU-i1-ngU\"/>\n                                                    </constraints>\n                                                    <fontDescription key=\"fontDescription\" type=\"system\" pointSize=\"12\"/>\n                                                    <color key=\"textColor\" red=\"0.0\" green=\"0.0\" blue=\"0.0\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n                                                    <nil key=\"highlightedColor\"/>\n                                                    <variation key=\"default\">\n                                                        <mask key=\"constraints\">\n                                                            <exclude reference=\"Ozq-bX-h2r\"/>\n                                                            <exclude reference=\"ReU-i1-ngU\"/>\n                                                        </mask>\n                                                    </variation>\n                                                </label>\n                                                <textField opaque=\"NO\" clipsSubviews=\"YES\" contentMode=\"scaleToFill\" contentHorizontalAlignment=\"left\" contentVerticalAlignment=\"center\" text=\"1Jhrq6Uxfku5sK9mf3QNwmPb1WPbKPQ9Yx\" borderStyle=\"line\" textAlignment=\"natural\" minimumFontSize=\"17\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"bQd-mI-uH9\">\n                                                    <rect key=\"frame\" x=\"16\" y=\"719\" width=\"295\" height=\"30\"/>\n                                                    <constraints>\n                                                        <constraint firstAttribute=\"height\" constant=\"30\" id=\"7ZQ-Dp-thy\"/>\n                                                    </constraints>\n                                                    <fontDescription key=\"fontDescription\" type=\"system\" pointSize=\"9\"/>\n                                                    <textInputTraits key=\"textInputTraits\"/>\n                                                </textField>\n                                                <button opaque=\"NO\" contentMode=\"scaleToFill\" contentHorizontalAlignment=\"center\" contentVerticalAlignment=\"center\" buttonType=\"roundedRect\" lineBreakMode=\"middleTruncation\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"8PH-F7-qh6\">\n                                                    <rect key=\"frame\" x=\"319\" y=\"719\" width=\"48\" height=\"30\"/>\n                                                    <constraints>\n                                                        <constraint firstAttribute=\"height\" constant=\"30\" id=\"suX-sU-0ee\"/>\n                                                        <constraint firstAttribute=\"width\" constant=\"48\" id=\"ztH-I5-HDM\"/>\n                                                    </constraints>\n                                                    <fontDescription key=\"fontDescription\" type=\"system\" pointSize=\"9\"/>\n                                                    <state key=\"normal\" title=\"QR Code\"/>\n                                                    <userDefinedRuntimeAttributes>\n                                                        <userDefinedRuntimeAttribute type=\"string\" keyPath=\"layer.cornerRadius\" value=\"5\"/>\n                                                    </userDefinedRuntimeAttributes>\n                                                    <connections>\n                                                        <action selector=\"showAddressQRButtonClicked4:\" destination=\"jeP-rT-Q8B\" eventType=\"touchUpInside\" id=\"Nfz-nV-Z1G\"/>\n                                                    </connections>\n                                                </button>\n                                                <textField opaque=\"NO\" clipsSubviews=\"YES\" contentMode=\"scaleToFill\" contentHorizontalAlignment=\"left\" contentVerticalAlignment=\"center\" text=\"L5HJ8fiaSL2oGNUrgVcAnq284r9g43F6P2FsjidA7nwuhTDMEdds\" borderStyle=\"line\" textAlignment=\"natural\" minimumFontSize=\"17\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"rAM-gb-eOa\">\n                                                    <rect key=\"frame\" x=\"16\" y=\"750\" width=\"295\" height=\"30\"/>\n                                                    <constraints>\n                                                        <constraint firstAttribute=\"height\" constant=\"30\" id=\"rDl-f6-gqk\"/>\n                                                    </constraints>\n                                                    <fontDescription key=\"fontDescription\" type=\"system\" pointSize=\"9\"/>\n                                                    <textInputTraits key=\"textInputTraits\"/>\n                                                </textField>\n                                                <button opaque=\"NO\" contentMode=\"scaleToFill\" contentHorizontalAlignment=\"center\" contentVerticalAlignment=\"center\" buttonType=\"roundedRect\" lineBreakMode=\"middleTruncation\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"bUQ-jb-flc\">\n                                                    <rect key=\"frame\" x=\"319\" y=\"750\" width=\"48\" height=\"30\"/>\n                                                    <constraints>\n                                                        <constraint firstAttribute=\"height\" constant=\"30\" id=\"HGW-Jc-FZF\"/>\n                                                        <constraint firstAttribute=\"width\" constant=\"48\" id=\"fNt-KB-PgQ\"/>\n                                                    </constraints>\n                                                    <fontDescription key=\"fontDescription\" type=\"system\" pointSize=\"9\"/>\n                                                    <state key=\"normal\" title=\"QR Code\"/>\n                                                    <userDefinedRuntimeAttributes>\n                                                        <userDefinedRuntimeAttribute type=\"string\" keyPath=\"layer.cornerRadius\" value=\"5\"/>\n                                                    </userDefinedRuntimeAttributes>\n                                                    <connections>\n                                                        <action selector=\"showPrivateKeyQRButtonClicked4:\" destination=\"jeP-rT-Q8B\" eventType=\"touchUpInside\" id=\"TXS-ZO-CaR\"/>\n                                                    </connections>\n                                                </button>\n                                                <label opaque=\"NO\" userInteractionEnabled=\"NO\" contentMode=\"left\" horizontalHuggingPriority=\"251\" verticalHuggingPriority=\"251\" text=\"Address ID 4:\" textAlignment=\"natural\" lineBreakMode=\"tailTruncation\" baselineAdjustment=\"alignBaselines\" adjustsFontSizeToFit=\"NO\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"JMG-AI-3du\">\n                                                    <rect key=\"frame\" x=\"16\" y=\"788\" width=\"77\" height=\"21\"/>\n                                                    <constraints>\n                                                        <constraint firstAttribute=\"height\" constant=\"21\" id=\"0DW-mz-wbn\"/>\n                                                        <constraint firstAttribute=\"width\" constant=\"89\" id=\"HbC-4H-vnr\"/>\n                                                        <constraint firstAttribute=\"width\" constant=\"85\" id=\"aaf-l9-0VK\"/>\n                                                    </constraints>\n                                                    <fontDescription key=\"fontDescription\" type=\"system\" pointSize=\"12\"/>\n                                                    <color key=\"textColor\" red=\"0.0\" green=\"0.0\" blue=\"0.0\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n                                                    <nil key=\"highlightedColor\"/>\n                                                    <variation key=\"default\">\n                                                        <mask key=\"constraints\">\n                                                            <exclude reference=\"HbC-4H-vnr\"/>\n                                                            <exclude reference=\"aaf-l9-0VK\"/>\n                                                        </mask>\n                                                    </variation>\n                                                </label>\n                                                <textField opaque=\"NO\" clipsSubviews=\"YES\" contentMode=\"scaleToFill\" contentHorizontalAlignment=\"left\" contentVerticalAlignment=\"center\" text=\"1Jhrq6Uxfku5sK9mf3QNwmPb1WPbKPQ9Yx\" borderStyle=\"line\" textAlignment=\"natural\" minimumFontSize=\"17\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"9Hg-Kd-50y\">\n                                                    <rect key=\"frame\" x=\"16\" y=\"809\" width=\"295\" height=\"30\"/>\n                                                    <constraints>\n                                                        <constraint firstAttribute=\"height\" constant=\"30\" id=\"HEz-UM-Atc\"/>\n                                                    </constraints>\n                                                    <fontDescription key=\"fontDescription\" type=\"system\" pointSize=\"9\"/>\n                                                    <textInputTraits key=\"textInputTraits\"/>\n                                                </textField>\n                                                <button opaque=\"NO\" contentMode=\"scaleToFill\" contentHorizontalAlignment=\"center\" contentVerticalAlignment=\"center\" buttonType=\"roundedRect\" lineBreakMode=\"middleTruncation\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"Znf-pR-Mih\">\n                                                    <rect key=\"frame\" x=\"319\" y=\"809\" width=\"48\" height=\"30\"/>\n                                                    <constraints>\n                                                        <constraint firstAttribute=\"width\" constant=\"48\" id=\"5Pe-sF-Ebv\"/>\n                                                        <constraint firstAttribute=\"height\" constant=\"30\" id=\"6wi-fX-uhh\"/>\n                                                    </constraints>\n                                                    <fontDescription key=\"fontDescription\" type=\"system\" pointSize=\"9\"/>\n                                                    <state key=\"normal\" title=\"QR Code\"/>\n                                                    <userDefinedRuntimeAttributes>\n                                                        <userDefinedRuntimeAttribute type=\"string\" keyPath=\"layer.cornerRadius\" value=\"5\"/>\n                                                    </userDefinedRuntimeAttributes>\n                                                    <connections>\n                                                        <action selector=\"showAddressQRButtonClicked5:\" destination=\"jeP-rT-Q8B\" eventType=\"touchUpInside\" id=\"ovw-26-czK\"/>\n                                                    </connections>\n                                                </button>\n                                                <textField opaque=\"NO\" clipsSubviews=\"YES\" contentMode=\"scaleToFill\" contentHorizontalAlignment=\"left\" contentVerticalAlignment=\"center\" text=\"L5HJ8fiaSL2oGNUrgVcAnq284r9g43F6P2FsjidA7nwuhTDMEdds\" borderStyle=\"line\" textAlignment=\"natural\" minimumFontSize=\"17\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"Wgu-Mq-F3I\">\n                                                    <rect key=\"frame\" x=\"16\" y=\"840\" width=\"295\" height=\"30\"/>\n                                                    <constraints>\n                                                        <constraint firstAttribute=\"height\" constant=\"30\" id=\"tLw-Cy-z2j\"/>\n                                                    </constraints>\n                                                    <fontDescription key=\"fontDescription\" type=\"system\" pointSize=\"9\"/>\n                                                    <textInputTraits key=\"textInputTraits\"/>\n                                                </textField>\n                                                <button opaque=\"NO\" contentMode=\"scaleToFill\" contentHorizontalAlignment=\"center\" contentVerticalAlignment=\"center\" buttonType=\"roundedRect\" lineBreakMode=\"middleTruncation\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"GKc-CM-keO\">\n                                                    <rect key=\"frame\" x=\"319\" y=\"840\" width=\"48\" height=\"30\"/>\n                                                    <constraints>\n                                                        <constraint firstAttribute=\"height\" constant=\"30\" id=\"SZU-Xd-jP0\"/>\n                                                        <constraint firstAttribute=\"width\" constant=\"48\" id=\"mFX-wR-pnY\"/>\n                                                    </constraints>\n                                                    <fontDescription key=\"fontDescription\" type=\"system\" pointSize=\"9\"/>\n                                                    <state key=\"normal\" title=\"QR Code\"/>\n                                                    <userDefinedRuntimeAttributes>\n                                                        <userDefinedRuntimeAttribute type=\"string\" keyPath=\"layer.cornerRadius\" value=\"5\"/>\n                                                    </userDefinedRuntimeAttributes>\n                                                    <connections>\n                                                        <action selector=\"showPrivateKeyQRButtonClicked5:\" destination=\"jeP-rT-Q8B\" eventType=\"touchUpInside\" id=\"lL7-6v-LVp\"/>\n                                                    </connections>\n                                                </button>\n                                                <label opaque=\"NO\" userInteractionEnabled=\"NO\" contentMode=\"left\" horizontalHuggingPriority=\"251\" verticalHuggingPriority=\"251\" text=\"Starting Change Address ID:\" textAlignment=\"natural\" lineBreakMode=\"tailTruncation\" baselineAdjustment=\"alignBaselines\" adjustsFontSizeToFit=\"NO\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"RgE-uK-H2P\">\n                                                    <rect key=\"frame\" x=\"16\" y=\"883\" width=\"190\" height=\"21\"/>\n                                                    <constraints>\n                                                        <constraint firstAttribute=\"width\" constant=\"190\" id=\"4Z3-BO-nEU\"/>\n                                                        <constraint firstAttribute=\"height\" constant=\"21\" id=\"D5j-O9-PWM\"/>\n                                                        <constraint firstAttribute=\"width\" constant=\"85\" id=\"gsm-0e-Bfa\"/>\n                                                    </constraints>\n                                                    <fontDescription key=\"fontDescription\" type=\"system\" pointSize=\"13\"/>\n                                                    <color key=\"textColor\" red=\"0.0\" green=\"0.0\" blue=\"0.0\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n                                                    <nil key=\"highlightedColor\"/>\n                                                    <variation key=\"default\">\n                                                        <mask key=\"constraints\">\n                                                            <exclude reference=\"gsm-0e-Bfa\"/>\n                                                        </mask>\n                                                    </variation>\n                                                </label>\n                                                <label opaque=\"NO\" userInteractionEnabled=\"NO\" contentMode=\"left\" horizontalHuggingPriority=\"251\" verticalHuggingPriority=\"251\" text=\"Change Address ID 0:\" textAlignment=\"natural\" lineBreakMode=\"tailTruncation\" baselineAdjustment=\"alignBaselines\" adjustsFontSizeToFit=\"NO\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"aog-r6-zfJ\">\n                                                    <rect key=\"frame\" x=\"16\" y=\"912\" width=\"123\" height=\"21\"/>\n                                                    <constraints>\n                                                        <constraint firstAttribute=\"height\" constant=\"21\" id=\"AQC-rV-RZ1\"/>\n                                                        <constraint firstAttribute=\"width\" constant=\"89\" id=\"aQA-am-NNb\"/>\n                                                        <constraint firstAttribute=\"width\" constant=\"85\" id=\"gFy-z2-3HO\"/>\n                                                    </constraints>\n                                                    <fontDescription key=\"fontDescription\" type=\"system\" pointSize=\"12\"/>\n                                                    <color key=\"textColor\" red=\"0.0\" green=\"0.0\" blue=\"0.0\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n                                                    <nil key=\"highlightedColor\"/>\n                                                    <variation key=\"default\">\n                                                        <mask key=\"constraints\">\n                                                            <exclude reference=\"aQA-am-NNb\"/>\n                                                            <exclude reference=\"gFy-z2-3HO\"/>\n                                                        </mask>\n                                                    </variation>\n                                                </label>\n                                                <textField opaque=\"NO\" clipsSubviews=\"YES\" contentMode=\"scaleToFill\" contentHorizontalAlignment=\"left\" contentVerticalAlignment=\"center\" text=\"0\" borderStyle=\"line\" placeholder=\"0\" textAlignment=\"natural\" minimumFontSize=\"17\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"r4G-2d-mhz\">\n                                                    <rect key=\"frame\" x=\"214\" y=\"878\" width=\"97\" height=\"30\"/>\n                                                    <constraints>\n                                                        <constraint firstAttribute=\"width\" constant=\"97\" id=\"3u6-Kr-MX6\"/>\n                                                        <constraint firstAttribute=\"height\" constant=\"30\" id=\"DBw-pE-CQh\"/>\n                                                        <constraint firstAttribute=\"width\" constant=\"97\" id=\"iwY-sL-k3h\"/>\n                                                        <constraint firstAttribute=\"height\" constant=\"30\" id=\"maq-1J-NdC\"/>\n                                                    </constraints>\n                                                    <fontDescription key=\"fontDescription\" type=\"system\" pointSize=\"14\"/>\n                                                    <textInputTraits key=\"textInputTraits\"/>\n                                                    <variation key=\"default\">\n                                                        <mask key=\"constraints\">\n                                                            <exclude reference=\"DBw-pE-CQh\"/>\n                                                            <exclude reference=\"iwY-sL-k3h\"/>\n                                                        </mask>\n                                                    </variation>\n                                                </textField>\n                                                <textField opaque=\"NO\" clipsSubviews=\"YES\" contentMode=\"scaleToFill\" contentHorizontalAlignment=\"left\" contentVerticalAlignment=\"center\" text=\"1Jhrq6Uxfku5sK9mf3QNwmPb1WPbKPQ9Yx\" borderStyle=\"line\" textAlignment=\"natural\" minimumFontSize=\"17\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"GIx-ls-zRM\">\n                                                    <rect key=\"frame\" x=\"16\" y=\"933\" width=\"295\" height=\"30\"/>\n                                                    <constraints>\n                                                        <constraint firstAttribute=\"height\" constant=\"30\" id=\"SyQ-Ip-pgf\"/>\n                                                    </constraints>\n                                                    <fontDescription key=\"fontDescription\" type=\"system\" pointSize=\"9\"/>\n                                                    <textInputTraits key=\"textInputTraits\"/>\n                                                </textField>\n                                                <button opaque=\"NO\" contentMode=\"scaleToFill\" contentHorizontalAlignment=\"center\" contentVerticalAlignment=\"center\" buttonType=\"roundedRect\" lineBreakMode=\"middleTruncation\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"p52-sH-YUa\">\n                                                    <rect key=\"frame\" x=\"319\" y=\"933\" width=\"48\" height=\"30\"/>\n                                                    <constraints>\n                                                        <constraint firstAttribute=\"width\" constant=\"48\" id=\"RcP-OQ-DkQ\"/>\n                                                        <constraint firstAttribute=\"height\" constant=\"30\" id=\"ia7-8q-otC\"/>\n                                                    </constraints>\n                                                    <fontDescription key=\"fontDescription\" type=\"system\" pointSize=\"9\"/>\n                                                    <state key=\"normal\" title=\"QR Code\"/>\n                                                    <userDefinedRuntimeAttributes>\n                                                        <userDefinedRuntimeAttribute type=\"string\" keyPath=\"layer.cornerRadius\" value=\"5\"/>\n                                                    </userDefinedRuntimeAttributes>\n                                                    <connections>\n                                                        <action selector=\"showChangeAddressQRButtonClicked1:\" destination=\"jeP-rT-Q8B\" eventType=\"touchUpInside\" id=\"hq7-Q7-v6h\"/>\n                                                    </connections>\n                                                </button>\n                                                <textField opaque=\"NO\" clipsSubviews=\"YES\" contentMode=\"scaleToFill\" contentHorizontalAlignment=\"left\" contentVerticalAlignment=\"center\" text=\"L5HJ8fiaSL2oGNUrgVcAnq284r9g43F6P2FsjidA7nwuhTDMEdds\" borderStyle=\"line\" textAlignment=\"natural\" minimumFontSize=\"17\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"czu-k8-dQ3\">\n                                                    <rect key=\"frame\" x=\"16\" y=\"964\" width=\"295\" height=\"30\"/>\n                                                    <constraints>\n                                                        <constraint firstAttribute=\"height\" constant=\"30\" id=\"kAb-O2-mPo\"/>\n                                                    </constraints>\n                                                    <fontDescription key=\"fontDescription\" type=\"system\" pointSize=\"9\"/>\n                                                    <textInputTraits key=\"textInputTraits\"/>\n                                                </textField>\n                                                <button opaque=\"NO\" contentMode=\"scaleToFill\" contentHorizontalAlignment=\"center\" contentVerticalAlignment=\"center\" buttonType=\"roundedRect\" lineBreakMode=\"middleTruncation\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"tZh-nZ-RvU\">\n                                                    <rect key=\"frame\" x=\"319\" y=\"964\" width=\"48\" height=\"30\"/>\n                                                    <constraints>\n                                                        <constraint firstAttribute=\"height\" constant=\"30\" id=\"MCK-Av-0IO\"/>\n                                                        <constraint firstAttribute=\"width\" constant=\"48\" id=\"gRB-3h-U01\"/>\n                                                    </constraints>\n                                                    <fontDescription key=\"fontDescription\" type=\"system\" pointSize=\"9\"/>\n                                                    <state key=\"normal\" title=\"QR Code\"/>\n                                                    <userDefinedRuntimeAttributes>\n                                                        <userDefinedRuntimeAttribute type=\"string\" keyPath=\"layer.cornerRadius\" value=\"5\"/>\n                                                    </userDefinedRuntimeAttributes>\n                                                    <connections>\n                                                        <action selector=\"showChangePrivateKeyQRButtonClicked1:\" destination=\"jeP-rT-Q8B\" eventType=\"touchUpInside\" id=\"U7B-3t-mSO\"/>\n                                                    </connections>\n                                                </button>\n                                                <label opaque=\"NO\" userInteractionEnabled=\"NO\" contentMode=\"left\" horizontalHuggingPriority=\"251\" verticalHuggingPriority=\"251\" text=\"Change Address ID 1:\" textAlignment=\"natural\" lineBreakMode=\"tailTruncation\" baselineAdjustment=\"alignBaselines\" adjustsFontSizeToFit=\"NO\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"DfB-wQ-pzV\">\n                                                    <rect key=\"frame\" x=\"16\" y=\"996\" width=\"121\" height=\"21\"/>\n                                                    <constraints>\n                                                        <constraint firstAttribute=\"width\" constant=\"89\" id=\"7py-ep-5tQ\"/>\n                                                        <constraint firstAttribute=\"height\" constant=\"21\" id=\"ZtW-2L-MeO\"/>\n                                                        <constraint firstAttribute=\"width\" constant=\"85\" id=\"bYf-2h-pQ6\"/>\n                                                    </constraints>\n                                                    <fontDescription key=\"fontDescription\" type=\"system\" pointSize=\"12\"/>\n                                                    <color key=\"textColor\" red=\"0.0\" green=\"0.0\" blue=\"0.0\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n                                                    <nil key=\"highlightedColor\"/>\n                                                    <variation key=\"default\">\n                                                        <mask key=\"constraints\">\n                                                            <exclude reference=\"7py-ep-5tQ\"/>\n                                                            <exclude reference=\"bYf-2h-pQ6\"/>\n                                                        </mask>\n                                                    </variation>\n                                                </label>\n                                                <textField opaque=\"NO\" clipsSubviews=\"YES\" contentMode=\"scaleToFill\" contentHorizontalAlignment=\"left\" contentVerticalAlignment=\"center\" text=\"1Jhrq6Uxfku5sK9mf3QNwmPb1WPbKPQ9Yx\" borderStyle=\"line\" textAlignment=\"natural\" minimumFontSize=\"17\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"LlW-tc-qEY\">\n                                                    <rect key=\"frame\" x=\"16\" y=\"1017\" width=\"295\" height=\"30\"/>\n                                                    <constraints>\n                                                        <constraint firstAttribute=\"height\" constant=\"30\" id=\"kNO-Sh-qTr\"/>\n                                                    </constraints>\n                                                    <fontDescription key=\"fontDescription\" type=\"system\" pointSize=\"9\"/>\n                                                    <textInputTraits key=\"textInputTraits\"/>\n                                                </textField>\n                                                <button opaque=\"NO\" contentMode=\"scaleToFill\" contentHorizontalAlignment=\"center\" contentVerticalAlignment=\"center\" buttonType=\"roundedRect\" lineBreakMode=\"middleTruncation\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"EWj-Ul-aJK\">\n                                                    <rect key=\"frame\" x=\"319\" y=\"1017\" width=\"48\" height=\"30\"/>\n                                                    <constraints>\n                                                        <constraint firstAttribute=\"width\" constant=\"48\" id=\"Ria-9A-CRk\"/>\n                                                        <constraint firstAttribute=\"height\" constant=\"30\" id=\"ivv-WD-J9a\"/>\n                                                    </constraints>\n                                                    <fontDescription key=\"fontDescription\" type=\"system\" pointSize=\"9\"/>\n                                                    <state key=\"normal\" title=\"QR Code\"/>\n                                                    <userDefinedRuntimeAttributes>\n                                                        <userDefinedRuntimeAttribute type=\"string\" keyPath=\"layer.cornerRadius\" value=\"5\"/>\n                                                    </userDefinedRuntimeAttributes>\n                                                    <connections>\n                                                        <action selector=\"showChangeAddressQRButtonClicked2:\" destination=\"jeP-rT-Q8B\" eventType=\"touchUpInside\" id=\"1zv-18-NNp\"/>\n                                                    </connections>\n                                                </button>\n                                                <textField opaque=\"NO\" clipsSubviews=\"YES\" contentMode=\"scaleToFill\" contentHorizontalAlignment=\"left\" contentVerticalAlignment=\"center\" text=\"L5HJ8fiaSL2oGNUrgVcAnq284r9g43F6P2FsjidA7nwuhTDMEdds\" borderStyle=\"line\" textAlignment=\"natural\" minimumFontSize=\"17\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"6iR-L6-vEV\">\n                                                    <rect key=\"frame\" x=\"16\" y=\"1048\" width=\"295\" height=\"30\"/>\n                                                    <constraints>\n                                                        <constraint firstAttribute=\"height\" constant=\"30\" id=\"euY-xF-EbJ\"/>\n                                                    </constraints>\n                                                    <fontDescription key=\"fontDescription\" type=\"system\" pointSize=\"9\"/>\n                                                    <textInputTraits key=\"textInputTraits\"/>\n                                                </textField>\n                                                <button opaque=\"NO\" contentMode=\"scaleToFill\" contentHorizontalAlignment=\"center\" contentVerticalAlignment=\"center\" buttonType=\"roundedRect\" lineBreakMode=\"middleTruncation\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"gHg-xR-i65\">\n                                                    <rect key=\"frame\" x=\"319\" y=\"1048\" width=\"48\" height=\"30\"/>\n                                                    <constraints>\n                                                        <constraint firstAttribute=\"height\" constant=\"30\" id=\"hw4-0z-FWo\"/>\n                                                        <constraint firstAttribute=\"width\" constant=\"48\" id=\"uWn-xb-Tda\"/>\n                                                    </constraints>\n                                                    <fontDescription key=\"fontDescription\" type=\"system\" pointSize=\"9\"/>\n                                                    <state key=\"normal\" title=\"QR Code\"/>\n                                                    <userDefinedRuntimeAttributes>\n                                                        <userDefinedRuntimeAttribute type=\"string\" keyPath=\"layer.cornerRadius\" value=\"5\"/>\n                                                    </userDefinedRuntimeAttributes>\n                                                    <connections>\n                                                        <action selector=\"showChangePrivateKeyQRButtonClicked2:\" destination=\"jeP-rT-Q8B\" eventType=\"touchUpInside\" id=\"NAU-d9-8CF\"/>\n                                                    </connections>\n                                                </button>\n                                                <label opaque=\"NO\" userInteractionEnabled=\"NO\" contentMode=\"left\" horizontalHuggingPriority=\"251\" verticalHuggingPriority=\"251\" text=\"Change Address ID 2:\" textAlignment=\"natural\" lineBreakMode=\"tailTruncation\" baselineAdjustment=\"alignBaselines\" adjustsFontSizeToFit=\"NO\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"DHC-ME-zNy\">\n                                                    <rect key=\"frame\" x=\"16\" y=\"1080\" width=\"123\" height=\"21\"/>\n                                                    <constraints>\n                                                        <constraint firstAttribute=\"width\" constant=\"85\" id=\"64E-Q8-pmU\"/>\n                                                        <constraint firstAttribute=\"width\" constant=\"89\" id=\"FFa-pv-sIp\"/>\n                                                        <constraint firstAttribute=\"height\" constant=\"21\" id=\"cLM-lg-T1e\"/>\n                                                    </constraints>\n                                                    <fontDescription key=\"fontDescription\" type=\"system\" pointSize=\"12\"/>\n                                                    <color key=\"textColor\" red=\"0.0\" green=\"0.0\" blue=\"0.0\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n                                                    <nil key=\"highlightedColor\"/>\n                                                    <variation key=\"default\">\n                                                        <mask key=\"constraints\">\n                                                            <exclude reference=\"64E-Q8-pmU\"/>\n                                                            <exclude reference=\"FFa-pv-sIp\"/>\n                                                        </mask>\n                                                    </variation>\n                                                </label>\n                                                <textField opaque=\"NO\" clipsSubviews=\"YES\" contentMode=\"scaleToFill\" contentHorizontalAlignment=\"left\" contentVerticalAlignment=\"center\" text=\"1Jhrq6Uxfku5sK9mf3QNwmPb1WPbKPQ9Yx\" borderStyle=\"line\" textAlignment=\"natural\" minimumFontSize=\"17\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"Jrq-7q-biA\">\n                                                    <rect key=\"frame\" x=\"16\" y=\"1101\" width=\"295\" height=\"30\"/>\n                                                    <constraints>\n                                                        <constraint firstAttribute=\"height\" constant=\"30\" id=\"Gzl-AJ-GnZ\"/>\n                                                    </constraints>\n                                                    <fontDescription key=\"fontDescription\" type=\"system\" pointSize=\"9\"/>\n                                                    <textInputTraits key=\"textInputTraits\"/>\n                                                </textField>\n                                                <button opaque=\"NO\" contentMode=\"scaleToFill\" contentHorizontalAlignment=\"center\" contentVerticalAlignment=\"center\" buttonType=\"roundedRect\" lineBreakMode=\"middleTruncation\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"7uk-nQ-Elq\">\n                                                    <rect key=\"frame\" x=\"319\" y=\"1101\" width=\"48\" height=\"30\"/>\n                                                    <constraints>\n                                                        <constraint firstAttribute=\"width\" constant=\"48\" id=\"Vtk-yt-ayg\"/>\n                                                        <constraint firstAttribute=\"height\" constant=\"30\" id=\"p5g-DS-gtL\"/>\n                                                    </constraints>\n                                                    <fontDescription key=\"fontDescription\" type=\"system\" pointSize=\"9\"/>\n                                                    <state key=\"normal\" title=\"QR Code\"/>\n                                                    <userDefinedRuntimeAttributes>\n                                                        <userDefinedRuntimeAttribute type=\"string\" keyPath=\"layer.cornerRadius\" value=\"5\"/>\n                                                    </userDefinedRuntimeAttributes>\n                                                    <connections>\n                                                        <action selector=\"showChangeAddressQRButtonClicked3:\" destination=\"jeP-rT-Q8B\" eventType=\"touchUpInside\" id=\"9ft-0w-kHl\"/>\n                                                    </connections>\n                                                </button>\n                                                <textField opaque=\"NO\" clipsSubviews=\"YES\" contentMode=\"scaleToFill\" contentHorizontalAlignment=\"left\" contentVerticalAlignment=\"center\" text=\"L5HJ8fiaSL2oGNUrgVcAnq284r9g43F6P2FsjidA7nwuhTDMEdds\" borderStyle=\"line\" textAlignment=\"natural\" minimumFontSize=\"17\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"4p4-5y-JUZ\">\n                                                    <rect key=\"frame\" x=\"16\" y=\"1132\" width=\"295\" height=\"30\"/>\n                                                    <constraints>\n                                                        <constraint firstAttribute=\"height\" constant=\"30\" id=\"GC8-h0-gcH\"/>\n                                                    </constraints>\n                                                    <fontDescription key=\"fontDescription\" type=\"system\" pointSize=\"9\"/>\n                                                    <textInputTraits key=\"textInputTraits\"/>\n                                                </textField>\n                                                <button opaque=\"NO\" contentMode=\"scaleToFill\" contentHorizontalAlignment=\"center\" contentVerticalAlignment=\"center\" buttonType=\"roundedRect\" lineBreakMode=\"middleTruncation\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"Xc5-q5-LZT\">\n                                                    <rect key=\"frame\" x=\"319\" y=\"1132\" width=\"48\" height=\"30\"/>\n                                                    <constraints>\n                                                        <constraint firstAttribute=\"height\" constant=\"30\" id=\"DAY-OZ-m9E\"/>\n                                                        <constraint firstAttribute=\"width\" constant=\"48\" id=\"wKt-b3-FZs\"/>\n                                                    </constraints>\n                                                    <fontDescription key=\"fontDescription\" type=\"system\" pointSize=\"9\"/>\n                                                    <state key=\"normal\" title=\"QR Code\"/>\n                                                    <userDefinedRuntimeAttributes>\n                                                        <userDefinedRuntimeAttribute type=\"string\" keyPath=\"layer.cornerRadius\" value=\"5\"/>\n                                                    </userDefinedRuntimeAttributes>\n                                                    <connections>\n                                                        <action selector=\"showChangePrivateKeyQRButtonClicked3:\" destination=\"jeP-rT-Q8B\" eventType=\"touchUpInside\" id=\"X9N-gK-nAq\"/>\n                                                    </connections>\n                                                </button>\n                                                <label opaque=\"NO\" userInteractionEnabled=\"NO\" contentMode=\"left\" horizontalHuggingPriority=\"251\" verticalHuggingPriority=\"251\" text=\"Change Address ID 3:\" textAlignment=\"natural\" lineBreakMode=\"tailTruncation\" baselineAdjustment=\"alignBaselines\" adjustsFontSizeToFit=\"NO\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"2Ct-rU-oU0\">\n                                                    <rect key=\"frame\" x=\"16\" y=\"1170\" width=\"123\" height=\"21\"/>\n                                                    <constraints>\n                                                        <constraint firstAttribute=\"width\" constant=\"89\" id=\"b1I-0H-K5C\"/>\n                                                        <constraint firstAttribute=\"width\" constant=\"85\" id=\"i5P-6m-AHF\"/>\n                                                        <constraint firstAttribute=\"height\" constant=\"21\" id=\"snL-Yh-mPQ\"/>\n                                                    </constraints>\n                                                    <fontDescription key=\"fontDescription\" type=\"system\" pointSize=\"12\"/>\n                                                    <color key=\"textColor\" red=\"0.0\" green=\"0.0\" blue=\"0.0\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n                                                    <nil key=\"highlightedColor\"/>\n                                                    <variation key=\"default\">\n                                                        <mask key=\"constraints\">\n                                                            <exclude reference=\"b1I-0H-K5C\"/>\n                                                            <exclude reference=\"i5P-6m-AHF\"/>\n                                                        </mask>\n                                                    </variation>\n                                                </label>\n                                                <textField opaque=\"NO\" clipsSubviews=\"YES\" contentMode=\"scaleToFill\" contentHorizontalAlignment=\"left\" contentVerticalAlignment=\"center\" text=\"1Jhrq6Uxfku5sK9mf3QNwmPb1WPbKPQ9Yx\" borderStyle=\"line\" textAlignment=\"natural\" minimumFontSize=\"17\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"GaU-ZY-4ye\">\n                                                    <rect key=\"frame\" x=\"16\" y=\"1191\" width=\"295\" height=\"30\"/>\n                                                    <constraints>\n                                                        <constraint firstAttribute=\"height\" constant=\"30\" id=\"hTg-1f-peP\"/>\n                                                    </constraints>\n                                                    <fontDescription key=\"fontDescription\" type=\"system\" pointSize=\"9\"/>\n                                                    <textInputTraits key=\"textInputTraits\"/>\n                                                </textField>\n                                                <button opaque=\"NO\" contentMode=\"scaleToFill\" contentHorizontalAlignment=\"center\" contentVerticalAlignment=\"center\" buttonType=\"roundedRect\" lineBreakMode=\"middleTruncation\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"LU1-2p-LAR\">\n                                                    <rect key=\"frame\" x=\"319\" y=\"1191\" width=\"48\" height=\"30\"/>\n                                                    <constraints>\n                                                        <constraint firstAttribute=\"width\" constant=\"48\" id=\"1yH-hK-ZZX\"/>\n                                                        <constraint firstAttribute=\"height\" constant=\"30\" id=\"y60-3Z-vka\"/>\n                                                    </constraints>\n                                                    <fontDescription key=\"fontDescription\" type=\"system\" pointSize=\"9\"/>\n                                                    <state key=\"normal\" title=\"QR Code\"/>\n                                                    <userDefinedRuntimeAttributes>\n                                                        <userDefinedRuntimeAttribute type=\"string\" keyPath=\"layer.cornerRadius\" value=\"5\"/>\n                                                    </userDefinedRuntimeAttributes>\n                                                    <connections>\n                                                        <action selector=\"showChangeAddressQRButtonClicked4:\" destination=\"jeP-rT-Q8B\" eventType=\"touchUpInside\" id=\"Hrw-r8-Vtg\"/>\n                                                    </connections>\n                                                </button>\n                                                <textField opaque=\"NO\" clipsSubviews=\"YES\" contentMode=\"scaleToFill\" contentHorizontalAlignment=\"left\" contentVerticalAlignment=\"center\" text=\"L5HJ8fiaSL2oGNUrgVcAnq284r9g43F6P2FsjidA7nwuhTDMEdds\" borderStyle=\"line\" textAlignment=\"natural\" minimumFontSize=\"17\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"Vzj-if-ieW\">\n                                                    <rect key=\"frame\" x=\"16\" y=\"1222\" width=\"295\" height=\"30\"/>\n                                                    <constraints>\n                                                        <constraint firstAttribute=\"height\" constant=\"30\" id=\"REQ-vN-MSY\"/>\n                                                    </constraints>\n                                                    <fontDescription key=\"fontDescription\" type=\"system\" pointSize=\"9\"/>\n                                                    <textInputTraits key=\"textInputTraits\"/>\n                                                </textField>\n                                                <button opaque=\"NO\" contentMode=\"scaleToFill\" contentHorizontalAlignment=\"center\" contentVerticalAlignment=\"center\" buttonType=\"roundedRect\" lineBreakMode=\"middleTruncation\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"iQv-V2-g9F\">\n                                                    <rect key=\"frame\" x=\"319\" y=\"1222\" width=\"48\" height=\"30\"/>\n                                                    <constraints>\n                                                        <constraint firstAttribute=\"width\" constant=\"48\" id=\"QZm-vi-8p5\"/>\n                                                        <constraint firstAttribute=\"height\" constant=\"30\" id=\"zWq-cQ-N5a\"/>\n                                                    </constraints>\n                                                    <fontDescription key=\"fontDescription\" type=\"system\" pointSize=\"9\"/>\n                                                    <state key=\"normal\" title=\"QR Code\"/>\n                                                    <userDefinedRuntimeAttributes>\n                                                        <userDefinedRuntimeAttribute type=\"string\" keyPath=\"layer.cornerRadius\" value=\"5\"/>\n                                                    </userDefinedRuntimeAttributes>\n                                                    <connections>\n                                                        <action selector=\"showChangePrivateKeyQRButtonClicked4:\" destination=\"jeP-rT-Q8B\" eventType=\"touchUpInside\" id=\"CdO-3t-tjD\"/>\n                                                    </connections>\n                                                </button>\n                                                <label opaque=\"NO\" userInteractionEnabled=\"NO\" contentMode=\"left\" horizontalHuggingPriority=\"251\" verticalHuggingPriority=\"251\" text=\"Change Address ID 4:\" textAlignment=\"natural\" lineBreakMode=\"tailTruncation\" baselineAdjustment=\"alignBaselines\" adjustsFontSizeToFit=\"NO\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"aDd-oS-yZx\">\n                                                    <rect key=\"frame\" x=\"16\" y=\"1260\" width=\"124\" height=\"21\"/>\n                                                    <constraints>\n                                                        <constraint firstAttribute=\"width\" constant=\"89\" id=\"CdK-Wf-j0Q\"/>\n                                                        <constraint firstAttribute=\"width\" constant=\"85\" id=\"fDC-g6-WEE\"/>\n                                                        <constraint firstAttribute=\"height\" constant=\"21\" id=\"pVy-MD-BbP\"/>\n                                                    </constraints>\n                                                    <fontDescription key=\"fontDescription\" type=\"system\" pointSize=\"12\"/>\n                                                    <color key=\"textColor\" red=\"0.0\" green=\"0.0\" blue=\"0.0\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n                                                    <nil key=\"highlightedColor\"/>\n                                                    <variation key=\"default\">\n                                                        <mask key=\"constraints\">\n                                                            <exclude reference=\"CdK-Wf-j0Q\"/>\n                                                            <exclude reference=\"fDC-g6-WEE\"/>\n                                                        </mask>\n                                                    </variation>\n                                                </label>\n                                                <textField opaque=\"NO\" clipsSubviews=\"YES\" contentMode=\"scaleToFill\" contentHorizontalAlignment=\"left\" contentVerticalAlignment=\"center\" text=\"1Jhrq6Uxfku5sK9mf3QNwmPb1WPbKPQ9Yx\" borderStyle=\"line\" textAlignment=\"natural\" minimumFontSize=\"17\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"8bg-zJ-MLy\">\n                                                    <rect key=\"frame\" x=\"16\" y=\"1281\" width=\"295\" height=\"30\"/>\n                                                    <constraints>\n                                                        <constraint firstAttribute=\"height\" constant=\"30\" id=\"2Zw-m7-YlY\"/>\n                                                    </constraints>\n                                                    <fontDescription key=\"fontDescription\" type=\"system\" pointSize=\"9\"/>\n                                                    <textInputTraits key=\"textInputTraits\"/>\n                                                </textField>\n                                                <button opaque=\"NO\" contentMode=\"scaleToFill\" contentHorizontalAlignment=\"center\" contentVerticalAlignment=\"center\" buttonType=\"roundedRect\" lineBreakMode=\"middleTruncation\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"CKf-rh-o2A\">\n                                                    <rect key=\"frame\" x=\"319\" y=\"1281\" width=\"48\" height=\"30\"/>\n                                                    <constraints>\n                                                        <constraint firstAttribute=\"height\" constant=\"30\" id=\"3cV-Q6-j4H\"/>\n                                                        <constraint firstAttribute=\"width\" constant=\"48\" id=\"jiT-J3-uqw\"/>\n                                                    </constraints>\n                                                    <fontDescription key=\"fontDescription\" type=\"system\" pointSize=\"9\"/>\n                                                    <state key=\"normal\" title=\"QR Code\"/>\n                                                    <userDefinedRuntimeAttributes>\n                                                        <userDefinedRuntimeAttribute type=\"string\" keyPath=\"layer.cornerRadius\" value=\"5\"/>\n                                                    </userDefinedRuntimeAttributes>\n                                                    <connections>\n                                                        <action selector=\"showChangeAddressQRButtonClicked5:\" destination=\"jeP-rT-Q8B\" eventType=\"touchUpInside\" id=\"AXy-xo-iFW\"/>\n                                                    </connections>\n                                                </button>\n                                                <textField opaque=\"NO\" clipsSubviews=\"YES\" contentMode=\"scaleToFill\" contentHorizontalAlignment=\"left\" contentVerticalAlignment=\"center\" text=\"L5HJ8fiaSL2oGNUrgVcAnq284r9g43F6P2FsjidA7nwuhTDMEdds\" borderStyle=\"line\" textAlignment=\"natural\" minimumFontSize=\"17\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"Gev-Fd-cCI\">\n                                                    <rect key=\"frame\" x=\"16\" y=\"1312\" width=\"295\" height=\"30\"/>\n                                                    <constraints>\n                                                        <constraint firstAttribute=\"height\" constant=\"30\" id=\"Ddd-bR-vjC\"/>\n                                                    </constraints>\n                                                    <fontDescription key=\"fontDescription\" type=\"system\" pointSize=\"9\"/>\n                                                    <textInputTraits key=\"textInputTraits\"/>\n                                                </textField>\n                                                <label opaque=\"NO\" userInteractionEnabled=\"NO\" contentMode=\"left\" horizontalHuggingPriority=\"251\" verticalHuggingPriority=\"251\" text=\"Backup Passphrase:\" textAlignment=\"natural\" lineBreakMode=\"tailTruncation\" baselineAdjustment=\"alignBaselines\" adjustsFontSizeToFit=\"NO\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"Y01-kf-oMW\">\n                                                    <rect key=\"frame\" x=\"16\" y=\"8\" width=\"155\" height=\"21\"/>\n                                                    <constraints>\n                                                        <constraint firstAttribute=\"height\" constant=\"21\" id=\"LKt-Kq-ezl\"/>\n                                                    </constraints>\n                                                    <fontDescription key=\"fontDescription\" type=\"system\" pointSize=\"17\"/>\n                                                    <color key=\"textColor\" red=\"0.0\" green=\"0.0\" blue=\"0.0\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n                                                    <nil key=\"highlightedColor\"/>\n                                                </label>\n                                                <textView clipsSubviews=\"YES\" multipleTouchEnabled=\"YES\" contentMode=\"scaleToFill\" text=\"street ankle life mass ready viable worth renew stove panther immense camera\" textAlignment=\"natural\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"rEp-Hf-iwp\">\n                                                    <rect key=\"frame\" x=\"16\" y=\"37\" width=\"351\" height=\"49\"/>\n                                                    <color key=\"backgroundColor\" red=\"1\" green=\"1\" blue=\"1\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n                                                    <constraints>\n                                                        <constraint firstAttribute=\"height\" constant=\"49\" id=\"JIj-CG-mrk\"/>\n                                                    </constraints>\n                                                    <fontDescription key=\"fontDescription\" type=\"system\" pointSize=\"14\"/>\n                                                    <textInputTraits key=\"textInputTraits\" autocapitalizationType=\"sentences\"/>\n                                                </textView>\n                                                <button opaque=\"NO\" contentMode=\"scaleToFill\" contentHorizontalAlignment=\"center\" contentVerticalAlignment=\"center\" buttonType=\"roundedRect\" lineBreakMode=\"middleTruncation\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"W0Y-6g-j1G\">\n                                                    <rect key=\"frame\" x=\"277\" y=\"94\" width=\"90\" height=\"30\"/>\n                                                    <constraints>\n                                                        <constraint firstAttribute=\"width\" constant=\"90\" id=\"fK6-ZX-jmY\"/>\n                                                    </constraints>\n                                                    <state key=\"normal\" title=\"New Wallet\"/>\n                                                    <userDefinedRuntimeAttributes>\n                                                        <userDefinedRuntimeAttribute type=\"string\" keyPath=\"layer.cornerRadius\" value=\"5\"/>\n                                                    </userDefinedRuntimeAttributes>\n                                                    <connections>\n                                                        <action selector=\"newWalletButtonClicked:\" destination=\"jeP-rT-Q8B\" eventType=\"touchUpInside\" id=\"tVI-5f-pSU\"/>\n                                                    </connections>\n                                                </button>\n                                                <label opaque=\"NO\" userInteractionEnabled=\"NO\" contentMode=\"left\" horizontalHuggingPriority=\"251\" verticalHuggingPriority=\"251\" text=\"Account ID:\" textAlignment=\"natural\" lineBreakMode=\"tailTruncation\" baselineAdjustment=\"alignBaselines\" adjustsFontSizeToFit=\"NO\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"zQb-q1-edR\">\n                                                    <rect key=\"frame\" x=\"16\" y=\"129\" width=\"89\" height=\"21\"/>\n                                                    <constraints>\n                                                        <constraint firstAttribute=\"width\" constant=\"85\" id=\"YYs-Be-lh3\"/>\n                                                        <constraint firstAttribute=\"height\" constant=\"21\" id=\"zqb-az-xl7\"/>\n                                                    </constraints>\n                                                    <fontDescription key=\"fontDescription\" type=\"system\" pointSize=\"17\"/>\n                                                    <color key=\"textColor\" red=\"0.0\" green=\"0.0\" blue=\"0.0\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n                                                    <nil key=\"highlightedColor\"/>\n                                                    <variation key=\"default\">\n                                                        <mask key=\"constraints\">\n                                                            <exclude reference=\"YYs-Be-lh3\"/>\n                                                        </mask>\n                                                    </variation>\n                                                </label>\n                                                <label opaque=\"NO\" userInteractionEnabled=\"NO\" contentMode=\"left\" horizontalHuggingPriority=\"251\" verticalHuggingPriority=\"251\" text=\"Account Public Key:\" textAlignment=\"natural\" lineBreakMode=\"tailTruncation\" baselineAdjustment=\"alignBaselines\" adjustsFontSizeToFit=\"NO\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"Mit-XW-AMq\">\n                                                    <rect key=\"frame\" x=\"16\" y=\"162\" width=\"152\" height=\"21\"/>\n                                                    <constraints>\n                                                        <constraint firstAttribute=\"height\" constant=\"21\" id=\"70Q-lE-8kT\"/>\n                                                        <constraint firstAttribute=\"width\" constant=\"85\" id=\"BzR-70-PKl\"/>\n                                                        <constraint firstAttribute=\"width\" constant=\"89\" id=\"JLo-em-I3l\"/>\n                                                    </constraints>\n                                                    <fontDescription key=\"fontDescription\" type=\"system\" pointSize=\"17\"/>\n                                                    <color key=\"textColor\" red=\"0.0\" green=\"0.0\" blue=\"0.0\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n                                                    <nil key=\"highlightedColor\"/>\n                                                    <variation key=\"default\">\n                                                        <mask key=\"constraints\">\n                                                            <exclude reference=\"BzR-70-PKl\"/>\n                                                            <exclude reference=\"JLo-em-I3l\"/>\n                                                        </mask>\n                                                    </variation>\n                                                </label>\n                                                <textView clipsSubviews=\"YES\" multipleTouchEnabled=\"YES\" contentMode=\"scaleToFill\" text=\"xpub6CUHPUqLTj2pxbrab2gdy7XYKiAoy47PFRBkgf8YiBHD3UzJH6WqQSmLXAndZbFuJnU4tWgBWjRjSxyk6AHN5JpVsUMu4E9MwNCGgFNibDd\" textAlignment=\"natural\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"1BE-No-RbK\">\n                                                    <rect key=\"frame\" x=\"16\" y=\"191\" width=\"351\" height=\"49\"/>\n                                                    <color key=\"backgroundColor\" red=\"1\" green=\"1\" blue=\"1\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n                                                    <constraints>\n                                                        <constraint firstAttribute=\"height\" constant=\"49\" id=\"wAu-zg-GJg\"/>\n                                                    </constraints>\n                                                    <fontDescription key=\"fontDescription\" type=\"system\" pointSize=\"14\"/>\n                                                    <textInputTraits key=\"textInputTraits\" autocapitalizationType=\"sentences\"/>\n                                                </textView>\n                                                <button opaque=\"NO\" contentMode=\"scaleToFill\" contentHorizontalAlignment=\"center\" contentVerticalAlignment=\"center\" buttonType=\"roundedRect\" lineBreakMode=\"middleTruncation\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"gw0-28-gSi\">\n                                                    <rect key=\"frame\" x=\"277\" y=\"248\" width=\"90\" height=\"30\"/>\n                                                    <constraints>\n                                                        <constraint firstAttribute=\"height\" constant=\"30\" id=\"4Ah-Md-ECc\"/>\n                                                        <constraint firstAttribute=\"width\" constant=\"90\" id=\"6a6-nr-Uu2\"/>\n                                                    </constraints>\n                                                    <state key=\"normal\" title=\"QR Code\"/>\n                                                    <userDefinedRuntimeAttributes>\n                                                        <userDefinedRuntimeAttribute type=\"string\" keyPath=\"layer.cornerRadius\" value=\"5\"/>\n                                                    </userDefinedRuntimeAttributes>\n                                                    <connections>\n                                                        <action selector=\"showAccountPublicKeyQRButtonClicked:\" destination=\"jeP-rT-Q8B\" eventType=\"touchUpInside\" id=\"eFF-gC-ywF\"/>\n                                                    </connections>\n                                                </button>\n                                                <textField opaque=\"NO\" clipsSubviews=\"YES\" contentMode=\"scaleToFill\" contentHorizontalAlignment=\"left\" contentVerticalAlignment=\"center\" text=\"0\" borderStyle=\"line\" placeholder=\"0\" textAlignment=\"natural\" minimumFontSize=\"17\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"aY3-3U-T31\">\n                                                    <rect key=\"frame\" x=\"113\" y=\"124\" width=\"97\" height=\"30\"/>\n                                                    <constraints>\n                                                        <constraint firstAttribute=\"height\" constant=\"30\" id=\"QFs-mO-S79\"/>\n                                                        <constraint firstAttribute=\"width\" constant=\"97\" id=\"Vaz-aj-Irp\"/>\n                                                        <constraint firstAttribute=\"width\" constant=\"97\" id=\"rO1-6u-Slm\"/>\n                                                        <constraint firstAttribute=\"height\" constant=\"30\" id=\"xCT-V6-5xf\"/>\n                                                    </constraints>\n                                                    <fontDescription key=\"fontDescription\" type=\"system\" pointSize=\"14\"/>\n                                                    <textInputTraits key=\"textInputTraits\"/>\n                                                    <variation key=\"default\">\n                                                        <mask key=\"constraints\">\n                                                            <exclude reference=\"QFs-mO-S79\"/>\n                                                            <exclude reference=\"Vaz-aj-Irp\"/>\n                                                        </mask>\n                                                    </variation>\n                                                </textField>\n                                                <label opaque=\"NO\" userInteractionEnabled=\"NO\" contentMode=\"left\" horizontalHuggingPriority=\"251\" verticalHuggingPriority=\"251\" text=\"Account Private Key:\" textAlignment=\"natural\" lineBreakMode=\"tailTruncation\" baselineAdjustment=\"alignBaselines\" adjustsFontSizeToFit=\"NO\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"YTO-L1-1HN\">\n                                                    <rect key=\"frame\" x=\"16\" y=\"286\" width=\"158\" height=\"21\"/>\n                                                    <constraints>\n                                                        <constraint firstAttribute=\"width\" constant=\"89\" id=\"5Ky-ZB-tOj\"/>\n                                                        <constraint firstAttribute=\"width\" constant=\"85\" id=\"hQt-OV-7em\"/>\n                                                        <constraint firstAttribute=\"height\" constant=\"21\" id=\"vVz-hH-5R1\"/>\n                                                    </constraints>\n                                                    <fontDescription key=\"fontDescription\" type=\"system\" pointSize=\"17\"/>\n                                                    <color key=\"textColor\" red=\"0.0\" green=\"0.0\" blue=\"0.0\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n                                                    <nil key=\"highlightedColor\"/>\n                                                    <variation key=\"default\">\n                                                        <mask key=\"constraints\">\n                                                            <exclude reference=\"5Ky-ZB-tOj\"/>\n                                                            <exclude reference=\"hQt-OV-7em\"/>\n                                                        </mask>\n                                                    </variation>\n                                                </label>\n                                                <textView clipsSubviews=\"YES\" multipleTouchEnabled=\"YES\" contentMode=\"scaleToFill\" text=\"xpub6CUHPUqLTj2pxbrab2gdy7XYKiAoy47PFRBkgf8YiBHD3UzJH6WqQSmLXAndZbFuJnU4tWgBWjRjSxyk6AHN5JpVsUMu4E9MwNCGgFNibDd\" textAlignment=\"natural\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"M9f-im-InR\">\n                                                    <rect key=\"frame\" x=\"16\" y=\"315\" width=\"351\" height=\"49\"/>\n                                                    <color key=\"backgroundColor\" red=\"1\" green=\"1\" blue=\"1\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n                                                    <constraints>\n                                                        <constraint firstAttribute=\"height\" constant=\"49\" id=\"iHd-al-H49\"/>\n                                                    </constraints>\n                                                    <fontDescription key=\"fontDescription\" type=\"system\" pointSize=\"14\"/>\n                                                    <textInputTraits key=\"textInputTraits\" autocapitalizationType=\"sentences\"/>\n                                                </textView>\n                                                <button opaque=\"NO\" contentMode=\"scaleToFill\" contentHorizontalAlignment=\"center\" contentVerticalAlignment=\"center\" buttonType=\"roundedRect\" lineBreakMode=\"middleTruncation\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"SVk-vu-qqu\">\n                                                    <rect key=\"frame\" x=\"277\" y=\"372\" width=\"90\" height=\"30\"/>\n                                                    <constraints>\n                                                        <constraint firstAttribute=\"height\" constant=\"30\" id=\"6Mj-CH-DIi\"/>\n                                                        <constraint firstAttribute=\"width\" constant=\"90\" id=\"GQJ-bY-T0i\"/>\n                                                    </constraints>\n                                                    <state key=\"normal\" title=\"QR Code\"/>\n                                                    <userDefinedRuntimeAttributes>\n                                                        <userDefinedRuntimeAttribute type=\"string\" keyPath=\"layer.cornerRadius\" value=\"5\"/>\n                                                    </userDefinedRuntimeAttributes>\n                                                    <connections>\n                                                        <action selector=\"showAccountPrivateKeyQRButtonClicked:\" destination=\"jeP-rT-Q8B\" eventType=\"touchUpInside\" id=\"8Ec-nK-sB6\"/>\n                                                    </connections>\n                                                </button>\n                                                <button opaque=\"NO\" contentMode=\"scaleToFill\" contentHorizontalAlignment=\"center\" contentVerticalAlignment=\"center\" buttonType=\"roundedRect\" lineBreakMode=\"middleTruncation\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"r5V-Be-iHY\">\n                                                    <rect key=\"frame\" x=\"319\" y=\"1312\" width=\"48\" height=\"30\"/>\n                                                    <constraints>\n                                                        <constraint firstAttribute=\"width\" constant=\"48\" id=\"dCP-Fi-ciQ\"/>\n                                                        <constraint firstAttribute=\"height\" constant=\"30\" id=\"dMU-0J-wGc\"/>\n                                                    </constraints>\n                                                    <fontDescription key=\"fontDescription\" type=\"system\" pointSize=\"9\"/>\n                                                    <state key=\"normal\" title=\"QR Code\"/>\n                                                    <userDefinedRuntimeAttributes>\n                                                        <userDefinedRuntimeAttribute type=\"string\" keyPath=\"layer.cornerRadius\" value=\"5\"/>\n                                                    </userDefinedRuntimeAttributes>\n                                                    <connections>\n                                                        <action selector=\"showChangePrivateKeyQRButtonClicked5:\" destination=\"jeP-rT-Q8B\" eventType=\"touchUpInside\" id=\"ib6-7q-fdp\"/>\n                                                    </connections>\n                                                </button>\n                                            </subviews>\n                                            <constraints>\n                                                <constraint firstItem=\"98i-Oo-pHA\" firstAttribute=\"centerY\" secondItem=\"lXL-Uj-u1w\" secondAttribute=\"centerY\" id=\"0pl-t6-gEo\"/>\n                                                <constraint firstItem=\"Jrq-7q-biA\" firstAttribute=\"leading\" secondItem=\"Tn6-7E-O4W\" secondAttribute=\"leadingMargin\" constant=\"8\" id=\"0ud-j2-HBw\"/>\n                                                <constraint firstItem=\"YTO-L1-1HN\" firstAttribute=\"top\" secondItem=\"gw0-28-gSi\" secondAttribute=\"bottom\" constant=\"8\" id=\"0wc-d5-o9S\"/>\n                                                <constraint firstItem=\"4Er-7p-LfQ\" firstAttribute=\"top\" secondItem=\"Joe-Ag-Cvs\" secondAttribute=\"bottom\" constant=\"2\" id=\"19N-66-W9i\"/>\n                                                <constraint firstItem=\"l4f-HC-Yrb\" firstAttribute=\"leading\" secondItem=\"wHc-Lm-EHM\" secondAttribute=\"trailing\" constant=\"8\" id=\"1dP-Lr-coe\"/>\n                                                <constraint firstItem=\"1BE-No-RbK\" firstAttribute=\"top\" secondItem=\"Mit-XW-AMq\" secondAttribute=\"bottom\" constant=\"8\" id=\"1mE-x2-09f\"/>\n                                                <constraint firstAttribute=\"trailingMargin\" secondItem=\"Oey-so-vuX\" secondAttribute=\"trailing\" constant=\"8\" id=\"1th-TJ-b7q\"/>\n                                                <constraint firstItem=\"r5V-Be-iHY\" firstAttribute=\"leading\" secondItem=\"Gev-Fd-cCI\" secondAttribute=\"trailing\" constant=\"8\" id=\"1tq-5y-4TI\"/>\n                                                <constraint firstItem=\"Znf-pR-Mih\" firstAttribute=\"leading\" secondItem=\"9Hg-Kd-50y\" secondAttribute=\"trailing\" constant=\"8\" id=\"1vH-4C-UqY\"/>\n                                                <constraint firstItem=\"DfB-wQ-pzV\" firstAttribute=\"leading\" secondItem=\"Tn6-7E-O4W\" secondAttribute=\"leadingMargin\" constant=\"8\" id=\"26O-oH-xMM\"/>\n                                                <constraint firstItem=\"iHQ-HC-h7I\" firstAttribute=\"leading\" secondItem=\"CyY-nD-niX\" secondAttribute=\"trailing\" constant=\"8\" id=\"2Vc-Ub-rvG\"/>\n                                                <constraint firstItem=\"nS4-qx-Uvm\" firstAttribute=\"leading\" secondItem=\"Tn6-7E-O4W\" secondAttribute=\"leadingMargin\" constant=\"8\" id=\"2g7-mQ-Vjk\"/>\n                                                <constraint firstAttribute=\"trailingMargin\" secondItem=\"kND-lh-fVh\" secondAttribute=\"trailing\" constant=\"8\" id=\"2hu-mF-iaj\"/>\n                                                <constraint firstItem=\"GaU-ZY-4ye\" firstAttribute=\"top\" secondItem=\"2Ct-rU-oU0\" secondAttribute=\"bottom\" id=\"2qN-oq-zZR\"/>\n                                                <constraint firstItem=\"PfF-lM-vHP\" firstAttribute=\"top\" secondItem=\"ln6-WA-vdK\" secondAttribute=\"bottom\" constant=\"1\" id=\"2xn-xC-Vuo\"/>\n                                                <constraint firstItem=\"aY3-3U-T31\" firstAttribute=\"leading\" secondItem=\"zQb-q1-edR\" secondAttribute=\"trailing\" constant=\"8\" id=\"3ta-mc-G4m\"/>\n                                                <constraint firstAttribute=\"trailingMargin\" secondItem=\"iHQ-HC-h7I\" secondAttribute=\"trailing\" constant=\"8\" id=\"438-o4-Swt\"/>\n                                                <constraint firstItem=\"GIx-ls-zRM\" firstAttribute=\"leading\" secondItem=\"Tn6-7E-O4W\" secondAttribute=\"leadingMargin\" constant=\"8\" id=\"49E-uK-Y0C\"/>\n                                                <constraint firstItem=\"bQd-mI-uH9\" firstAttribute=\"leading\" secondItem=\"Tn6-7E-O4W\" secondAttribute=\"leadingMargin\" constant=\"8\" id=\"4GK-eE-Fkr\"/>\n                                                <constraint firstItem=\"l4f-HC-Yrb\" firstAttribute=\"leading\" secondItem=\"wHc-Lm-EHM\" secondAttribute=\"trailing\" constant=\"8\" id=\"4zf-H4-Z40\"/>\n                                                <constraint firstAttribute=\"trailingMargin\" secondItem=\"rEp-Hf-iwp\" secondAttribute=\"trailing\" constant=\"8\" id=\"54g-PK-UDk\"/>\n                                                <constraint firstItem=\"7uk-nQ-Elq\" firstAttribute=\"leading\" secondItem=\"Jrq-7q-biA\" secondAttribute=\"trailing\" constant=\"8\" id=\"6Jy-gC-7QC\"/>\n                                                <constraint firstItem=\"Znf-pR-Mih\" firstAttribute=\"centerY\" secondItem=\"9Hg-Kd-50y\" secondAttribute=\"centerY\" id=\"6Ky-8G-qY4\"/>\n                                                <constraint firstItem=\"rEp-Hf-iwp\" firstAttribute=\"leading\" secondItem=\"Tn6-7E-O4W\" secondAttribute=\"leadingMargin\" constant=\"8\" id=\"7o3-sX-G8R\"/>\n                                                <constraint firstItem=\"ln6-WA-vdK\" firstAttribute=\"leading\" secondItem=\"Tn6-7E-O4W\" secondAttribute=\"leadingMargin\" constant=\"8\" id=\"8SS-HK-Nkl\"/>\n                                                <constraint firstItem=\"r4G-2d-mhz\" firstAttribute=\"leading\" secondItem=\"RgE-uK-H2P\" secondAttribute=\"trailing\" constant=\"8\" id=\"8iJ-AO-v9T\"/>\n                                                <constraint firstItem=\"GKc-CM-keO\" firstAttribute=\"centerY\" secondItem=\"Wgu-Mq-F3I\" secondAttribute=\"centerY\" id=\"8zc-Ek-yo0\"/>\n                                                <constraint firstAttribute=\"trailingMargin\" secondItem=\"W0Y-6g-j1G\" secondAttribute=\"trailing\" constant=\"8\" id=\"9CU-LM-OIA\"/>\n                                                <constraint firstItem=\"gw0-28-gSi\" firstAttribute=\"top\" secondItem=\"1BE-No-RbK\" secondAttribute=\"bottom\" constant=\"8\" id=\"AQp-3j-6Ak\"/>\n                                                <constraint firstItem=\"rAM-gb-eOa\" firstAttribute=\"top\" secondItem=\"bQd-mI-uH9\" secondAttribute=\"bottom\" constant=\"1\" id=\"Adb-yC-ace\"/>\n                                                <constraint firstItem=\"LlW-tc-qEY\" firstAttribute=\"leading\" secondItem=\"Tn6-7E-O4W\" secondAttribute=\"leadingMargin\" constant=\"8\" id=\"Agz-yP-OjS\"/>\n                                                <constraint firstAttribute=\"trailingMargin\" secondItem=\"r5V-Be-iHY\" secondAttribute=\"trailing\" constant=\"8\" id=\"BFb-gY-FPg\"/>\n                                                <constraint firstAttribute=\"trailingMargin\" secondItem=\"SVk-vu-qqu\" secondAttribute=\"trailing\" constant=\"8\" id=\"BZh-ZK-qBd\"/>\n                                                <constraint firstItem=\"4p4-5y-JUZ\" firstAttribute=\"leading\" secondItem=\"Tn6-7E-O4W\" secondAttribute=\"leadingMargin\" constant=\"8\" id=\"CCU-dt-N28\"/>\n                                                <constraint firstItem=\"023-0e-B8c\" firstAttribute=\"top\" secondItem=\"PfF-lM-vHP\" secondAttribute=\"bottom\" constant=\"8\" id=\"CD0-O7-f9P\"/>\n                                                <constraint firstAttribute=\"trailingMargin\" secondItem=\"nS4-qx-Uvm\" secondAttribute=\"trailing\" constant=\"8\" id=\"CZs-4l-LVL\"/>\n                                                <constraint firstItem=\"023-0e-B8c\" firstAttribute=\"leading\" secondItem=\"Tn6-7E-O4W\" secondAttribute=\"leadingMargin\" constant=\"8\" id=\"CnE-Xh-CIZ\"/>\n                                                <constraint firstAttribute=\"trailingMargin\" secondItem=\"GXm-xv-dei\" secondAttribute=\"trailing\" constant=\"8\" id=\"Cox-ez-cWk\"/>\n                                                <constraint firstItem=\"9Hg-Kd-50y\" firstAttribute=\"leading\" secondItem=\"Tn6-7E-O4W\" secondAttribute=\"leadingMargin\" constant=\"8\" id=\"Dd4-IL-yxz\"/>\n                                                <constraint firstAttribute=\"trailingMargin\" secondItem=\"gHg-xR-i65\" secondAttribute=\"trailing\" constant=\"8\" id=\"Ekl-0D-4gG\"/>\n                                                <constraint firstItem=\"Joe-Ag-Cvs\" firstAttribute=\"leading\" secondItem=\"Tn6-7E-O4W\" secondAttribute=\"leadingMargin\" constant=\"8\" id=\"FIA-sx-w8t\"/>\n                                                <constraint firstItem=\"GXm-xv-dei\" firstAttribute=\"leading\" secondItem=\"ln6-WA-vdK\" secondAttribute=\"trailing\" constant=\"8\" id=\"Ftc-7G-0yQ\"/>\n                                                <constraint firstItem=\"hvV-BT-VFx\" firstAttribute=\"top\" secondItem=\"SPM-HC-T68\" secondAttribute=\"bottom\" constant=\"8\" id=\"GQs-3V-V1Z\"/>\n                                                <constraint firstItem=\"EWj-Ul-aJK\" firstAttribute=\"leading\" secondItem=\"LlW-tc-qEY\" secondAttribute=\"trailing\" constant=\"8\" id=\"GTX-m2-zLn\"/>\n                                                <constraint firstItem=\"PfF-lM-vHP\" firstAttribute=\"leading\" secondItem=\"Tn6-7E-O4W\" secondAttribute=\"leadingMargin\" constant=\"8\" id=\"GiT-Le-oOZ\"/>\n                                                <constraint firstItem=\"YTO-L1-1HN\" firstAttribute=\"leading\" secondItem=\"Tn6-7E-O4W\" secondAttribute=\"leadingMargin\" constant=\"8\" id=\"HHd-zP-x0K\"/>\n                                                <constraint firstItem=\"9Hg-Kd-50y\" firstAttribute=\"top\" secondItem=\"JMG-AI-3du\" secondAttribute=\"bottom\" id=\"IL3-oo-SE5\"/>\n                                                <constraint firstItem=\"GXm-xv-dei\" firstAttribute=\"centerY\" secondItem=\"ln6-WA-vdK\" secondAttribute=\"centerY\" id=\"JIi-ol-Top\"/>\n                                                <constraint firstItem=\"LlW-tc-qEY\" firstAttribute=\"top\" secondItem=\"DfB-wQ-pzV\" secondAttribute=\"bottom\" id=\"JM3-ce-ZHd\"/>\n                                                <constraint firstAttribute=\"trailingMargin\" secondItem=\"GKc-CM-keO\" secondAttribute=\"trailing\" constant=\"8\" id=\"JPC-jH-HhT\"/>\n                                                <constraint firstItem=\"8PH-F7-qh6\" firstAttribute=\"centerY\" secondItem=\"bQd-mI-uH9\" secondAttribute=\"centerY\" id=\"Jhl-kk-Gh6\"/>\n                                                <constraint firstItem=\"Wgu-Mq-F3I\" firstAttribute=\"top\" secondItem=\"9Hg-Kd-50y\" secondAttribute=\"bottom\" constant=\"1\" id=\"KNr-2u-ZQX\"/>\n                                                <constraint firstItem=\"M9f-im-InR\" firstAttribute=\"top\" secondItem=\"YTO-L1-1HN\" secondAttribute=\"bottom\" constant=\"8\" id=\"Kfm-wI-vYZ\"/>\n                                                <constraint firstItem=\"CyY-nD-niX\" firstAttribute=\"leading\" secondItem=\"Tn6-7E-O4W\" secondAttribute=\"leadingMargin\" constant=\"8\" id=\"LP2-wb-7Rh\"/>\n                                                <constraint firstItem=\"ln6-WA-vdK\" firstAttribute=\"top\" secondItem=\"Gz1-7B-U19\" secondAttribute=\"bottom\" id=\"LhY-s8-vag\"/>\n                                                <constraint firstItem=\"aog-r6-zfJ\" firstAttribute=\"leading\" secondItem=\"Tn6-7E-O4W\" secondAttribute=\"leadingMargin\" constant=\"8\" id=\"LnO-7g-0On\"/>\n                                                <constraint firstItem=\"CKf-rh-o2A\" firstAttribute=\"leading\" secondItem=\"8bg-zJ-MLy\" secondAttribute=\"trailing\" constant=\"8\" id=\"Lrh-Va-g3U\"/>\n                                                <constraint firstItem=\"Oey-so-vuX\" firstAttribute=\"centerY\" secondItem=\"Joe-Ag-Cvs\" secondAttribute=\"centerY\" id=\"NXL-Od-Jtu\"/>\n                                                <constraint firstItem=\"czu-k8-dQ3\" firstAttribute=\"top\" secondItem=\"GIx-ls-zRM\" secondAttribute=\"bottom\" constant=\"1\" id=\"NXU-3I-uFs\"/>\n                                                <constraint firstAttribute=\"trailingMargin\" secondItem=\"M9f-im-InR\" secondAttribute=\"trailing\" constant=\"8\" id=\"NgW-ed-ywR\"/>\n                                                <constraint firstItem=\"SVk-vu-qqu\" firstAttribute=\"top\" secondItem=\"M9f-im-InR\" secondAttribute=\"bottom\" constant=\"8\" id=\"Ohp-L7-bjr\"/>\n                                                <constraint firstItem=\"EWj-Ul-aJK\" firstAttribute=\"centerY\" secondItem=\"LlW-tc-qEY\" secondAttribute=\"centerY\" id=\"Ons-DF-29H\"/>\n                                                <constraint firstAttribute=\"trailingMargin\" secondItem=\"1BE-No-RbK\" secondAttribute=\"trailing\" constant=\"8\" id=\"Pv1-SV-D3k\"/>\n                                                <constraint firstItem=\"GIx-ls-zRM\" firstAttribute=\"top\" secondItem=\"aog-r6-zfJ\" secondAttribute=\"bottom\" id=\"QEJ-rA-YJE\"/>\n                                                <constraint firstItem=\"1T8-1h-MPB\" firstAttribute=\"top\" secondItem=\"l4f-HC-Yrb\" secondAttribute=\"bottom\" constant=\"4\" id=\"Qaz-GS-wYi\"/>\n                                                <constraint firstItem=\"CyY-nD-niX\" firstAttribute=\"top\" secondItem=\"f2d-GA-xFX\" secondAttribute=\"bottom\" constant=\"1\" id=\"QnA-mV-atO\"/>\n                                                <constraint firstItem=\"zQb-q1-edR\" firstAttribute=\"centerY\" secondItem=\"aY3-3U-T31\" secondAttribute=\"centerY\" id=\"RQQ-RS-U0w\"/>\n                                                <constraint firstItem=\"SPM-HC-T68\" firstAttribute=\"leading\" secondItem=\"SVW-aE-eKJ\" secondAttribute=\"trailing\" constant=\"8\" id=\"Rin-LJ-bDv\"/>\n                                                <constraint firstItem=\"bUQ-jb-flc\" firstAttribute=\"centerY\" secondItem=\"rAM-gb-eOa\" secondAttribute=\"centerY\" id=\"RkN-5N-NIZ\"/>\n                                                <constraint firstItem=\"Mit-XW-AMq\" firstAttribute=\"leading\" secondItem=\"Tn6-7E-O4W\" secondAttribute=\"leadingMargin\" constant=\"8\" id=\"S4C-3M-npO\"/>\n                                                <constraint firstAttribute=\"trailingMargin\" secondItem=\"Xc5-q5-LZT\" secondAttribute=\"trailing\" constant=\"8\" id=\"T7E-zm-taH\"/>\n                                                <constraint firstItem=\"Gz1-7B-U19\" firstAttribute=\"leading\" secondItem=\"Tn6-7E-O4W\" secondAttribute=\"leadingMargin\" constant=\"8\" id=\"TOI-Bq-g6v\"/>\n                                                <constraint firstItem=\"Wgu-Mq-F3I\" firstAttribute=\"leading\" secondItem=\"Tn6-7E-O4W\" secondAttribute=\"leadingMargin\" constant=\"8\" id=\"U1M-5Y-SbV\"/>\n                                                <constraint firstItem=\"Y01-kf-oMW\" firstAttribute=\"leading\" secondItem=\"Tn6-7E-O4W\" secondAttribute=\"leadingMargin\" constant=\"8\" id=\"U4p-AI-ni1\"/>\n                                                <constraint firstItem=\"LU1-2p-LAR\" firstAttribute=\"centerY\" secondItem=\"GaU-ZY-4ye\" secondAttribute=\"centerY\" id=\"U8k-cU-H3G\"/>\n                                                <constraint firstItem=\"rEp-Hf-iwp\" firstAttribute=\"top\" secondItem=\"Y01-kf-oMW\" secondAttribute=\"bottom\" constant=\"8\" id=\"UAn-2H-WR3\"/>\n                                                <constraint firstItem=\"rAM-gb-eOa\" firstAttribute=\"leading\" secondItem=\"Tn6-7E-O4W\" secondAttribute=\"leadingMargin\" constant=\"8\" id=\"UDk-H9-weU\"/>\n                                                <constraint firstItem=\"4Er-7p-LfQ\" firstAttribute=\"leading\" secondItem=\"Tn6-7E-O4W\" secondAttribute=\"leadingMargin\" constant=\"8\" id=\"UGJ-hw-FTv\"/>\n                                                <constraint firstItem=\"aDd-oS-yZx\" firstAttribute=\"leading\" secondItem=\"Tn6-7E-O4W\" secondAttribute=\"leadingMargin\" constant=\"8\" id=\"UcX-wY-8A7\"/>\n                                                <constraint firstAttribute=\"bottomMargin\" secondItem=\"kND-lh-fVh\" secondAttribute=\"bottom\" constant=\"8\" id=\"VA6-ch-kWr\"/>\n                                                <constraint firstItem=\"8PH-F7-qh6\" firstAttribute=\"leading\" secondItem=\"bQd-mI-uH9\" secondAttribute=\"trailing\" constant=\"8\" id=\"VKp-YS-VpS\"/>\n                                                <constraint firstItem=\"bUQ-jb-flc\" firstAttribute=\"leading\" secondItem=\"rAM-gb-eOa\" secondAttribute=\"trailing\" constant=\"8\" id=\"WBQ-ev-8hI\"/>\n                                                <constraint firstItem=\"JMG-AI-3du\" firstAttribute=\"leading\" secondItem=\"Tn6-7E-O4W\" secondAttribute=\"leadingMargin\" constant=\"8\" id=\"WsK-Kz-IPm\"/>\n                                                <constraint firstAttribute=\"trailingMargin\" secondItem=\"98i-Oo-pHA\" secondAttribute=\"trailing\" constant=\"8\" id=\"XKd-9n-H0k\"/>\n                                                <constraint firstItem=\"SVW-aE-eKJ\" firstAttribute=\"leading\" secondItem=\"Tn6-7E-O4W\" secondAttribute=\"leadingMargin\" constant=\"8\" id=\"YCY-vC-C94\"/>\n                                                <constraint firstItem=\"SVW-aE-eKJ\" firstAttribute=\"centerY\" secondItem=\"SPM-HC-T68\" secondAttribute=\"centerY\" id=\"Yql-Lj-V1t\"/>\n                                                <constraint firstAttribute=\"trailingMargin\" secondItem=\"bUQ-jb-flc\" secondAttribute=\"trailing\" constant=\"8\" id=\"Yy5-l1-MIu\"/>\n                                                <constraint firstItem=\"GKc-CM-keO\" firstAttribute=\"leading\" secondItem=\"Wgu-Mq-F3I\" secondAttribute=\"trailing\" constant=\"8\" id=\"ZHV-cy-xIv\"/>\n                                                <constraint firstAttribute=\"trailingMargin\" secondItem=\"CKf-rh-o2A\" secondAttribute=\"trailing\" constant=\"8\" id=\"ZSK-mJ-v3a\"/>\n                                                <constraint firstItem=\"Jrq-7q-biA\" firstAttribute=\"top\" secondItem=\"DHC-ME-zNy\" secondAttribute=\"bottom\" id=\"Zmt-Tz-U6L\"/>\n                                                <constraint firstItem=\"Gz1-7B-U19\" firstAttribute=\"top\" secondItem=\"CyY-nD-niX\" secondAttribute=\"bottom\" constant=\"2\" id=\"a1Z-rG-dT8\"/>\n                                                <constraint firstAttribute=\"trailingMargin\" secondItem=\"LU1-2p-LAR\" secondAttribute=\"trailing\" constant=\"8\" id=\"a39-65-wvg\"/>\n                                                <constraint firstItem=\"DHC-ME-zNy\" firstAttribute=\"leading\" secondItem=\"Tn6-7E-O4W\" secondAttribute=\"leadingMargin\" constant=\"8\" id=\"a3w-m1-p9e\"/>\n                                                <constraint firstItem=\"lXL-Uj-u1w\" firstAttribute=\"top\" secondItem=\"1T8-1h-MPB\" secondAttribute=\"bottom\" id=\"aFq-WT-5T9\"/>\n                                                <constraint firstItem=\"wHc-Lm-EHM\" firstAttribute=\"centerY\" secondItem=\"l4f-HC-Yrb\" secondAttribute=\"centerY\" id=\"bLA-Zk-JbB\"/>\n                                                <constraint firstItem=\"gHg-xR-i65\" firstAttribute=\"centerY\" secondItem=\"6iR-L6-vEV\" secondAttribute=\"centerY\" id=\"bUG-FU-yxI\"/>\n                                                <constraint firstItem=\"Vzj-if-ieW\" firstAttribute=\"leading\" secondItem=\"Tn6-7E-O4W\" secondAttribute=\"leadingMargin\" constant=\"8\" id=\"bdJ-Z0-qJ9\"/>\n                                                <constraint firstItem=\"r5V-Be-iHY\" firstAttribute=\"centerY\" secondItem=\"Gev-Fd-cCI\" secondAttribute=\"centerY\" id=\"bib-qN-uic\"/>\n                                                <constraint firstItem=\"gHg-xR-i65\" firstAttribute=\"leading\" secondItem=\"6iR-L6-vEV\" secondAttribute=\"trailing\" constant=\"8\" id=\"ccj-X2-KiR\"/>\n                                                <constraint firstItem=\"DHC-ME-zNy\" firstAttribute=\"top\" secondItem=\"6iR-L6-vEV\" secondAttribute=\"bottom\" constant=\"2\" id=\"cjc-a9-D5i\"/>\n                                                <constraint firstItem=\"rEp-Hf-iwp\" firstAttribute=\"top\" secondItem=\"Y01-kf-oMW\" secondAttribute=\"bottom\" constant=\"8\" id=\"d5u-Xk-bfu\"/>\n                                                <constraint firstItem=\"r4G-2d-mhz\" firstAttribute=\"leading\" secondItem=\"RgE-uK-H2P\" secondAttribute=\"trailing\" constant=\"8\" id=\"dPE-dN-2jH\"/>\n                                                <constraint firstItem=\"lXL-Uj-u1w\" firstAttribute=\"leading\" secondItem=\"Tn6-7E-O4W\" secondAttribute=\"leadingMargin\" constant=\"8\" id=\"e9n-bJ-qsb\"/>\n                                                <constraint firstItem=\"1BE-No-RbK\" firstAttribute=\"leading\" secondItem=\"Tn6-7E-O4W\" secondAttribute=\"leadingMargin\" constant=\"8\" id=\"eeJ-OZ-3S9\"/>\n                                                <constraint firstItem=\"hvV-BT-VFx\" firstAttribute=\"leading\" secondItem=\"Tn6-7E-O4W\" secondAttribute=\"leadingMargin\" constant=\"8\" id=\"elL-Oz-c2f\"/>\n                                                <constraint firstItem=\"W0Y-6g-j1G\" firstAttribute=\"top\" secondItem=\"rEp-Hf-iwp\" secondAttribute=\"bottom\" constant=\"8\" id=\"emn-Vz-3fQ\"/>\n                                                <constraint firstAttribute=\"trailingMargin\" secondItem=\"EWj-Ul-aJK\" secondAttribute=\"trailing\" constant=\"8\" id=\"fHh-lF-ohJ\"/>\n                                                <constraint firstItem=\"Mit-XW-AMq\" firstAttribute=\"top\" secondItem=\"aY3-3U-T31\" secondAttribute=\"bottom\" constant=\"8\" id=\"fd5-0g-56r\"/>\n                                                <constraint firstItem=\"Gev-Fd-cCI\" firstAttribute=\"top\" secondItem=\"8bg-zJ-MLy\" secondAttribute=\"bottom\" constant=\"1\" id=\"gGg-na-Enj\"/>\n                                                <constraint firstItem=\"2Ct-rU-oU0\" firstAttribute=\"top\" secondItem=\"4p4-5y-JUZ\" secondAttribute=\"bottom\" constant=\"8\" id=\"gNP-f6-bnd\"/>\n                                                <constraint firstItem=\"2Ct-rU-oU0\" firstAttribute=\"leading\" secondItem=\"Tn6-7E-O4W\" secondAttribute=\"leadingMargin\" constant=\"8\" id=\"gaF-Qp-IQJ\"/>\n                                                <constraint firstItem=\"GaU-ZY-4ye\" firstAttribute=\"leading\" secondItem=\"Tn6-7E-O4W\" secondAttribute=\"leadingMargin\" constant=\"8\" id=\"h0Z-xl-xCt\"/>\n                                                <constraint firstItem=\"kOc-Zv-Dw2\" firstAttribute=\"centerY\" secondItem=\"PfF-lM-vHP\" secondAttribute=\"centerY\" id=\"hNe-NM-Nnr\"/>\n                                                <constraint firstItem=\"aog-r6-zfJ\" firstAttribute=\"top\" secondItem=\"r4G-2d-mhz\" secondAttribute=\"bottom\" constant=\"4\" id=\"heg-Sf-ys7\"/>\n                                                <constraint firstItem=\"o3w-pQ-fEA\" firstAttribute=\"centerY\" secondItem=\"f2d-GA-xFX\" secondAttribute=\"centerY\" id=\"ivt-4u-5wr\"/>\n                                                <constraint firstItem=\"1T8-1h-MPB\" firstAttribute=\"leading\" secondItem=\"Tn6-7E-O4W\" secondAttribute=\"leadingMargin\" constant=\"8\" id=\"jrR-z6-7Fc\"/>\n                                                <constraint firstItem=\"6iR-L6-vEV\" firstAttribute=\"leading\" secondItem=\"Tn6-7E-O4W\" secondAttribute=\"leadingMargin\" constant=\"8\" id=\"k7C-Oq-0JC\"/>\n                                                <constraint firstItem=\"kOc-Zv-Dw2\" firstAttribute=\"leading\" secondItem=\"PfF-lM-vHP\" secondAttribute=\"trailing\" constant=\"8\" id=\"kBt-Ns-QST\"/>\n                                                <constraint firstAttribute=\"trailingMargin\" secondItem=\"8PH-F7-qh6\" secondAttribute=\"trailing\" constant=\"8\" id=\"kRa-BB-Z9p\"/>\n                                                <constraint firstItem=\"tZh-nZ-RvU\" firstAttribute=\"centerY\" secondItem=\"czu-k8-dQ3\" secondAttribute=\"centerY\" id=\"kbz-1a-UJY\"/>\n                                                <constraint firstItem=\"o3w-pQ-fEA\" firstAttribute=\"leading\" secondItem=\"f2d-GA-xFX\" secondAttribute=\"trailing\" constant=\"8\" id=\"kd3-Kj-Qq1\"/>\n                                                <constraint firstItem=\"8bg-zJ-MLy\" firstAttribute=\"leading\" secondItem=\"Tn6-7E-O4W\" secondAttribute=\"leadingMargin\" constant=\"8\" id=\"krw-dQ-S1O\"/>\n                                                <constraint firstItem=\"wHc-Lm-EHM\" firstAttribute=\"top\" secondItem=\"Tn6-7E-O4W\" secondAttribute=\"topMargin\" constant=\"4\" id=\"kyL-xq-Pnv\"/>\n                                                <constraint firstItem=\"czu-k8-dQ3\" firstAttribute=\"leading\" secondItem=\"Tn6-7E-O4W\" secondAttribute=\"leadingMargin\" constant=\"8\" id=\"lA9-62-UT1\"/>\n                                                <constraint firstItem=\"Gev-Fd-cCI\" firstAttribute=\"leading\" secondItem=\"Tn6-7E-O4W\" secondAttribute=\"leadingMargin\" constant=\"8\" id=\"lgP-KQ-JLE\"/>\n                                                <constraint firstItem=\"aY3-3U-T31\" firstAttribute=\"top\" secondItem=\"W0Y-6g-j1G\" secondAttribute=\"bottom\" id=\"m9R-fh-j6R\"/>\n                                                <constraint firstAttribute=\"trailingMargin\" secondItem=\"iQv-V2-g9F\" secondAttribute=\"trailing\" constant=\"8\" id=\"mCl-eF-fkI\"/>\n                                                <constraint firstItem=\"p52-sH-YUa\" firstAttribute=\"leading\" secondItem=\"GIx-ls-zRM\" secondAttribute=\"trailing\" constant=\"8\" id=\"mf2-d2-6TA\"/>\n                                                <constraint firstItem=\"r4G-2d-mhz\" firstAttribute=\"top\" secondItem=\"Wgu-Mq-F3I\" secondAttribute=\"bottom\" constant=\"8\" id=\"n9G-IL-c51\"/>\n                                                <constraint firstAttribute=\"trailingMargin\" secondItem=\"Znf-pR-Mih\" secondAttribute=\"trailing\" constant=\"8\" id=\"n9v-Xm-lPr\"/>\n                                                <constraint firstItem=\"bQd-mI-uH9\" firstAttribute=\"top\" secondItem=\"023-0e-B8c\" secondAttribute=\"bottom\" id=\"nPZ-cF-z8H\"/>\n                                                <constraint firstItem=\"CKf-rh-o2A\" firstAttribute=\"centerY\" secondItem=\"8bg-zJ-MLy\" secondAttribute=\"centerY\" id=\"oJa-ge-ZdR\"/>\n                                                <constraint firstItem=\"nS4-qx-Uvm\" firstAttribute=\"top\" secondItem=\"hvV-BT-VFx\" secondAttribute=\"bottom\" constant=\"8\" id=\"odk-FY-8Om\"/>\n                                                <constraint firstItem=\"tZh-nZ-RvU\" firstAttribute=\"leading\" secondItem=\"czu-k8-dQ3\" secondAttribute=\"trailing\" constant=\"8\" id=\"owW-xO-3Ng\"/>\n                                                <constraint firstItem=\"7uk-nQ-Elq\" firstAttribute=\"centerY\" secondItem=\"Jrq-7q-biA\" secondAttribute=\"centerY\" id=\"p8N-i5-zHD\"/>\n                                                <constraint firstAttribute=\"trailingMargin\" secondItem=\"o3w-pQ-fEA\" secondAttribute=\"trailing\" constant=\"8\" id=\"peC-hK-kGT\"/>\n                                                <constraint firstItem=\"iQv-V2-g9F\" firstAttribute=\"centerY\" secondItem=\"Vzj-if-ieW\" secondAttribute=\"centerY\" id=\"q1U-e2-cIT\"/>\n                                                <constraint firstItem=\"Oey-so-vuX\" firstAttribute=\"leading\" secondItem=\"Joe-Ag-Cvs\" secondAttribute=\"trailing\" constant=\"8\" id=\"qiA-d8-0Me\"/>\n                                                <constraint firstItem=\"p52-sH-YUa\" firstAttribute=\"centerY\" secondItem=\"GIx-ls-zRM\" secondAttribute=\"centerY\" id=\"rBR-mu-q74\"/>\n                                                <constraint firstItem=\"Xc5-q5-LZT\" firstAttribute=\"leading\" secondItem=\"4p4-5y-JUZ\" secondAttribute=\"trailing\" constant=\"8\" id=\"ssE-pz-Rv0\"/>\n                                                <constraint firstItem=\"l4f-HC-Yrb\" firstAttribute=\"top\" secondItem=\"SVk-vu-qqu\" secondAttribute=\"bottom\" constant=\"4\" id=\"tLm-cr-HeA\"/>\n                                                <constraint firstItem=\"wHc-Lm-EHM\" firstAttribute=\"leading\" secondItem=\"Tn6-7E-O4W\" secondAttribute=\"leadingMargin\" constant=\"8\" id=\"tPS-Zf-Rca\"/>\n                                                <constraint firstItem=\"RgE-uK-H2P\" firstAttribute=\"leading\" secondItem=\"Tn6-7E-O4W\" secondAttribute=\"leadingMargin\" constant=\"8\" id=\"tXO-jG-qvF\"/>\n                                                <constraint firstItem=\"f2d-GA-xFX\" firstAttribute=\"leading\" secondItem=\"Tn6-7E-O4W\" secondAttribute=\"leadingMargin\" constant=\"8\" id=\"thD-WN-e3x\"/>\n                                                <constraint firstAttribute=\"trailingMargin\" secondItem=\"p52-sH-YUa\" secondAttribute=\"trailing\" constant=\"8\" id=\"tiX-Hl-cwu\"/>\n                                                <constraint firstItem=\"JMG-AI-3du\" firstAttribute=\"top\" secondItem=\"rAM-gb-eOa\" secondAttribute=\"bottom\" constant=\"8\" id=\"tma-FI-UDh\"/>\n                                                <constraint firstItem=\"iQv-V2-g9F\" firstAttribute=\"leading\" secondItem=\"Vzj-if-ieW\" secondAttribute=\"trailing\" constant=\"8\" id=\"uBn-8K-ks4\"/>\n                                                <constraint firstItem=\"LU1-2p-LAR\" firstAttribute=\"leading\" secondItem=\"GaU-ZY-4ye\" secondAttribute=\"trailing\" constant=\"8\" id=\"uEK-6B-r6E\"/>\n                                                <constraint firstItem=\"W0Y-6g-j1G\" firstAttribute=\"top\" secondItem=\"rEp-Hf-iwp\" secondAttribute=\"bottom\" constant=\"8\" id=\"uSm-7l-D4m\"/>\n                                                <constraint firstItem=\"f2d-GA-xFX\" firstAttribute=\"top\" secondItem=\"4Er-7p-LfQ\" secondAttribute=\"bottom\" id=\"uwo-Qw-6CJ\"/>\n                                                <constraint firstItem=\"zQb-q1-edR\" firstAttribute=\"leading\" secondItem=\"Tn6-7E-O4W\" secondAttribute=\"leadingMargin\" constant=\"8\" id=\"vDa-EJ-lU9\"/>\n                                                <constraint firstItem=\"Vzj-if-ieW\" firstAttribute=\"top\" secondItem=\"GaU-ZY-4ye\" secondAttribute=\"bottom\" constant=\"1\" id=\"vEK-Kf-aGO\"/>\n                                                <constraint firstItem=\"r4G-2d-mhz\" firstAttribute=\"leading\" secondItem=\"RgE-uK-H2P\" secondAttribute=\"trailing\" constant=\"8\" id=\"vGu-qP-dwf\"/>\n                                                <constraint firstItem=\"98i-Oo-pHA\" firstAttribute=\"leading\" secondItem=\"lXL-Uj-u1w\" secondAttribute=\"trailing\" constant=\"8\" id=\"vRH-Mz-Hnt\"/>\n                                                <constraint firstItem=\"DfB-wQ-pzV\" firstAttribute=\"top\" secondItem=\"czu-k8-dQ3\" secondAttribute=\"bottom\" constant=\"2\" id=\"vak-J2-vd9\"/>\n                                                <constraint firstAttribute=\"trailingMargin\" secondItem=\"tZh-nZ-RvU\" secondAttribute=\"trailing\" constant=\"8\" id=\"vlR-11-UBm\"/>\n                                                <constraint firstItem=\"8bg-zJ-MLy\" firstAttribute=\"top\" secondItem=\"aDd-oS-yZx\" secondAttribute=\"bottom\" id=\"vnB-Tg-pAa\"/>\n                                                <constraint firstItem=\"6iR-L6-vEV\" firstAttribute=\"top\" secondItem=\"LlW-tc-qEY\" secondAttribute=\"bottom\" constant=\"1\" id=\"vpk-dM-DCx\"/>\n                                                <constraint firstItem=\"SPM-HC-T68\" firstAttribute=\"leading\" secondItem=\"SVW-aE-eKJ\" secondAttribute=\"trailing\" constant=\"8\" id=\"vyL-88-A70\"/>\n                                                <constraint firstItem=\"Joe-Ag-Cvs\" firstAttribute=\"top\" secondItem=\"lXL-Uj-u1w\" secondAttribute=\"bottom\" constant=\"1\" id=\"wLZ-1J-2Ln\"/>\n                                                <constraint firstItem=\"nS4-qx-Uvm\" firstAttribute=\"top\" secondItem=\"hvV-BT-VFx\" secondAttribute=\"bottom\" constant=\"8\" id=\"wTg-y0-sE1\"/>\n                                                <constraint firstItem=\"4p4-5y-JUZ\" firstAttribute=\"top\" secondItem=\"Jrq-7q-biA\" secondAttribute=\"bottom\" constant=\"1\" id=\"wim-9k-L4n\"/>\n                                                <constraint firstAttribute=\"trailingMargin\" secondItem=\"gw0-28-gSi\" secondAttribute=\"trailing\" constant=\"8\" id=\"xOd-yF-QgN\"/>\n                                                <constraint firstItem=\"RgE-uK-H2P\" firstAttribute=\"centerY\" secondItem=\"r4G-2d-mhz\" secondAttribute=\"centerY\" id=\"xU7-KL-80m\"/>\n                                                <constraint firstItem=\"M9f-im-InR\" firstAttribute=\"leading\" secondItem=\"Tn6-7E-O4W\" secondAttribute=\"leadingMargin\" constant=\"8\" id=\"xuN-tt-R2T\"/>\n                                                <constraint firstItem=\"Xc5-q5-LZT\" firstAttribute=\"centerY\" secondItem=\"4p4-5y-JUZ\" secondAttribute=\"centerY\" id=\"xvT-a4-oV9\"/>\n                                                <constraint firstAttribute=\"trailingMargin\" secondItem=\"7uk-nQ-Elq\" secondAttribute=\"trailing\" constant=\"8\" id=\"yAE-ev-bFz\"/>\n                                                <constraint firstItem=\"iHQ-HC-h7I\" firstAttribute=\"centerY\" secondItem=\"CyY-nD-niX\" secondAttribute=\"centerY\" id=\"yO1-4g-Ety\"/>\n                                                <constraint firstItem=\"aDd-oS-yZx\" firstAttribute=\"top\" secondItem=\"Vzj-if-ieW\" secondAttribute=\"bottom\" constant=\"8\" id=\"yYw-PX-Ymv\"/>\n                                                <constraint firstItem=\"Y01-kf-oMW\" firstAttribute=\"top\" secondItem=\"Tn6-7E-O4W\" secondAttribute=\"topMargin\" id=\"yje-R7-kAm\"/>\n                                                <constraint firstItem=\"kND-lh-fVh\" firstAttribute=\"top\" secondItem=\"nS4-qx-Uvm\" secondAttribute=\"bottom\" constant=\"8\" id=\"zfY-tf-Xh4\"/>\n                                                <constraint firstAttribute=\"trailingMargin\" secondItem=\"kOc-Zv-Dw2\" secondAttribute=\"trailing\" constant=\"8\" id=\"zu2-0v-p2T\"/>\n                                            </constraints>\n                                            <variation key=\"default\">\n                                                <mask key=\"subviews\">\n                                                    <exclude reference=\"SVW-aE-eKJ\"/>\n                                                    <exclude reference=\"hvV-BT-VFx\"/>\n                                                    <exclude reference=\"nS4-qx-Uvm\"/>\n                                                    <exclude reference=\"kND-lh-fVh\"/>\n                                                    <exclude reference=\"SPM-HC-T68\"/>\n                                                </mask>\n                                                <mask key=\"constraints\">\n                                                    <exclude reference=\"d5u-Xk-bfu\"/>\n                                                    <exclude reference=\"uSm-7l-D4m\"/>\n                                                    <exclude reference=\"kyL-xq-Pnv\"/>\n                                                    <exclude reference=\"dPE-dN-2jH\"/>\n                                                    <exclude reference=\"vGu-qP-dwf\"/>\n                                                </mask>\n                                            </variation>\n                                        </tableViewCellContentView>\n                                        <connections>\n                                            <outlet property=\"accountIDLabel\" destination=\"zQb-q1-edR\" id=\"uPR-hw-f28\"/>\n                                            <outlet property=\"accountIDTextField\" destination=\"aY3-3U-T31\" id=\"Fn2-Lk-q82\"/>\n                                            <outlet property=\"accountPrivateKeyLabel\" destination=\"YTO-L1-1HN\" id=\"wL5-iv-8om\"/>\n                                            <outlet property=\"accountPrivateKeyTextView\" destination=\"M9f-im-InR\" id=\"AOq-Ea-UeR\"/>\n                                            <outlet property=\"accountPublicKeyLabel\" destination=\"Mit-XW-AMq\" id=\"MJB-Y3-1wZ\"/>\n                                            <outlet property=\"accountPublicKeyTextView\" destination=\"1BE-No-RbK\" id=\"YMU-oK-Yh0\"/>\n                                            <outlet property=\"addressLabel1\" destination=\"1T8-1h-MPB\" id=\"QnF-Rv-jsH\"/>\n                                            <outlet property=\"addressLabel2\" destination=\"4Er-7p-LfQ\" id=\"wNE-cy-Llm\"/>\n                                            <outlet property=\"addressLabel3\" destination=\"Gz1-7B-U19\" id=\"mLt-Nn-hdb\"/>\n                                            <outlet property=\"addressLabel4\" destination=\"023-0e-B8c\" id=\"MNc-Pl-aja\"/>\n                                            <outlet property=\"addressLabel5\" destination=\"JMG-AI-3du\" id=\"usK-nn-vfN\"/>\n                                            <outlet property=\"addressTextField1\" destination=\"lXL-Uj-u1w\" id=\"c9g-gK-vNF\"/>\n                                            <outlet property=\"addressTextField2\" destination=\"f2d-GA-xFX\" id=\"6ik-oG-nKU\"/>\n                                            <outlet property=\"addressTextField3\" destination=\"ln6-WA-vdK\" id=\"qaS-Be-ybk\"/>\n                                            <outlet property=\"addressTextField4\" destination=\"bQd-mI-uH9\" id=\"Xad-Y6-c8a\"/>\n                                            <outlet property=\"addressTextField5\" destination=\"9Hg-Kd-50y\" id=\"JA2-nB-21W\"/>\n                                            <outlet property=\"backupPassphraseLabel\" destination=\"Y01-kf-oMW\" id=\"ezo-WY-EcV\"/>\n                                            <outlet property=\"changeAddressLabel1\" destination=\"aog-r6-zfJ\" id=\"4jm-Nx-ipf\"/>\n                                            <outlet property=\"changeAddressLabel2\" destination=\"DfB-wQ-pzV\" id=\"UXD-1r-FSy\"/>\n                                            <outlet property=\"changeAddressLabel3\" destination=\"DHC-ME-zNy\" id=\"O42-ld-zeC\"/>\n                                            <outlet property=\"changeAddressLabel4\" destination=\"2Ct-rU-oU0\" id=\"HUw-Yn-bVk\"/>\n                                            <outlet property=\"changeAddressLabel5\" destination=\"aDd-oS-yZx\" id=\"EOB-oB-5SG\"/>\n                                            <outlet property=\"changeAddressTextField1\" destination=\"GIx-ls-zRM\" id=\"2pF-IH-lYa\"/>\n                                            <outlet property=\"changeAddressTextField2\" destination=\"LlW-tc-qEY\" id=\"ILY-Sm-loE\"/>\n                                            <outlet property=\"changeAddressTextField3\" destination=\"Jrq-7q-biA\" id=\"tjR-Ka-fcA\"/>\n                                            <outlet property=\"changeAddressTextField4\" destination=\"GaU-ZY-4ye\" id=\"Ay9-PD-6gr\"/>\n                                            <outlet property=\"changeAddressTextField5\" destination=\"8bg-zJ-MLy\" id=\"HV0-Pg-3ub\"/>\n                                            <outlet property=\"changePrivateKeyTextField1\" destination=\"czu-k8-dQ3\" id=\"M8w-3Z-hPU\"/>\n                                            <outlet property=\"changePrivateKeyTextField2\" destination=\"6iR-L6-vEV\" id=\"Nc6-Xm-Qyx\"/>\n                                            <outlet property=\"changePrivateKeyTextField3\" destination=\"4p4-5y-JUZ\" id=\"kFF-At-pnC\"/>\n                                            <outlet property=\"changePrivateKeyTextField4\" destination=\"Vzj-if-ieW\" id=\"uDh-0a-K65\"/>\n                                            <outlet property=\"changePrivateKeyTextField5\" destination=\"Gev-Fd-cCI\" id=\"ylT-GX-qGK\"/>\n                                            <outlet property=\"mnemonicTextView\" destination=\"rEp-Hf-iwp\" id=\"Jnv-Yl-WVy\"/>\n                                            <outlet property=\"newWalletButton\" destination=\"W0Y-6g-j1G\" id=\"7N3-bm-n6U\"/>\n                                            <outlet property=\"privateKeyTextField1\" destination=\"Joe-Ag-Cvs\" id=\"tSO-cb-KyG\"/>\n                                            <outlet property=\"privateKeyTextField2\" destination=\"CyY-nD-niX\" id=\"D7J-mO-VyR\"/>\n                                            <outlet property=\"privateKeyTextField3\" destination=\"PfF-lM-vHP\" id=\"HdK-hr-yp7\"/>\n                                            <outlet property=\"privateKeyTextField4\" destination=\"rAM-gb-eOa\" id=\"GSP-Dh-tDF\"/>\n                                            <outlet property=\"privateKeyTextField5\" destination=\"Wgu-Mq-F3I\" id=\"fmw-P2-tFS\"/>\n                                            <outlet property=\"showAccountPrivateKeyQRButton\" destination=\"SVk-vu-qqu\" id=\"01m-JV-Xhn\"/>\n                                            <outlet property=\"showAccountPublicKeyQRButton\" destination=\"gw0-28-gSi\" id=\"VuL-Ra-ThR\"/>\n                                            <outlet property=\"showAddressQRCodeButton1\" destination=\"98i-Oo-pHA\" id=\"kDB-mZ-ckd\"/>\n                                            <outlet property=\"showAddressQRCodeButton2\" destination=\"o3w-pQ-fEA\" id=\"vgK-9A-Yqe\"/>\n                                            <outlet property=\"showAddressQRCodeButton3\" destination=\"GXm-xv-dei\" id=\"Sev-0D-Yyg\"/>\n                                            <outlet property=\"showAddressQRCodeButton4\" destination=\"8PH-F7-qh6\" id=\"IQn-tq-gDh\"/>\n                                            <outlet property=\"showAddressQRCodeButton5\" destination=\"Znf-pR-Mih\" id=\"dws-gG-fGB\"/>\n                                            <outlet property=\"showChangeAddressQRCodeButton1\" destination=\"p52-sH-YUa\" id=\"oyP-az-Bqr\"/>\n                                            <outlet property=\"showChangeAddressQRCodeButton2\" destination=\"EWj-Ul-aJK\" id=\"DU0-HT-3mg\"/>\n                                            <outlet property=\"showChangeAddressQRCodeButton3\" destination=\"7uk-nQ-Elq\" id=\"U6x-gc-dcJ\"/>\n                                            <outlet property=\"showChangeAddressQRCodeButton4\" destination=\"LU1-2p-LAR\" id=\"G4V-qC-ILU\"/>\n                                            <outlet property=\"showChangeAddressQRCodeButton5\" destination=\"CKf-rh-o2A\" id=\"Nyh-Mv-BL5\"/>\n                                            <outlet property=\"showChangePrivateKeyQRCodeButton1\" destination=\"tZh-nZ-RvU\" id=\"Gja-Uw-1GW\"/>\n                                            <outlet property=\"showChangePrivateKeyQRCodeButton2\" destination=\"gHg-xR-i65\" id=\"crN-LO-db9\"/>\n                                            <outlet property=\"showChangePrivateKeyQRCodeButton3\" destination=\"Xc5-q5-LZT\" id=\"8uy-7n-mOz\"/>\n                                            <outlet property=\"showChangePrivateKeyQRCodeButton4\" destination=\"iQv-V2-g9F\" id=\"yGU-RS-V4m\"/>\n                                            <outlet property=\"showChangePrivateKeyQRCodeButton5\" destination=\"r5V-Be-iHY\" id=\"4RA-tK-pfz\"/>\n                                            <outlet property=\"showPrivateKeyQRCodeButton1\" destination=\"Oey-so-vuX\" id=\"4aP-jS-CyF\"/>\n                                            <outlet property=\"showPrivateKeyQRCodeButton2\" destination=\"iHQ-HC-h7I\" id=\"OLF-v3-iWB\"/>\n                                            <outlet property=\"showPrivateKeyQRCodeButton3\" destination=\"kOc-Zv-Dw2\" id=\"SSa-Fh-oEa\"/>\n                                            <outlet property=\"showPrivateKeyQRCodeButton4\" destination=\"bUQ-jb-flc\" id=\"7FE-QD-PbZ\"/>\n                                            <outlet property=\"showPrivateKeyQRCodeButton5\" destination=\"GKc-CM-keO\" id=\"mKz-D5-B36\"/>\n                                            <outlet property=\"startingAddressIDTextField\" destination=\"l4f-HC-Yrb\" id=\"PJf-F0-btq\"/>\n                                            <outlet property=\"startingChangeAddressID\" destination=\"RgE-uK-H2P\" id=\"gc1-Ja-AR2\"/>\n                                            <outlet property=\"startingChangeAddressIDTextField\" destination=\"r4G-2d-mhz\" id=\"1xB-4e-W0x\"/>\n                                            <outlet property=\"startingReceivingAddressID\" destination=\"wHc-Lm-EHM\" id=\"zyT-0f-BI6\"/>\n                                        </connections>\n                                    </tableViewCell>\n                                    <tableViewCell clipsSubviews=\"YES\" contentMode=\"scaleToFill\" selectionStyle=\"default\" indentationWidth=\"10\" rowHeight=\"48\" id=\"Neq-5X-SLy\">\n                                        <rect key=\"frame\" x=\"0.0\" y=\"1475.5\" width=\"383\" height=\"48\"/>\n                                        <autoresizingMask key=\"autoresizingMask\"/>\n                                        <tableViewCellContentView key=\"contentView\" opaque=\"NO\" clipsSubviews=\"YES\" multipleTouchEnabled=\"YES\" contentMode=\"center\" tableViewCell=\"Neq-5X-SLy\" id=\"c5h-CL-q8e\">\n                                            <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"383\" height=\"47.5\"/>\n                                            <autoresizingMask key=\"autoresizingMask\"/>\n                                        </tableViewCellContentView>\n                                    </tableViewCell>\n                                </prototypes>\n                            </tableView>\n                        </subviews>\n                        <color key=\"backgroundColor\" red=\"1\" green=\"1\" blue=\"1\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n                        <constraints>\n                            <constraint firstItem=\"gTP-dG-YzZ\" firstAttribute=\"top\" secondItem=\"nbi-WT-AVp\" secondAttribute=\"topMargin\" id=\"1ec-ds-qzP\"/>\n                            <constraint firstItem=\"7By-dU-vqq\" firstAttribute=\"bottom\" secondItem=\"gTP-dG-YzZ\" secondAttribute=\"bottom\" id=\"XKi-8A-f9U\"/>\n                            <constraint firstAttribute=\"trailingMargin\" secondItem=\"gTP-dG-YzZ\" secondAttribute=\"trailing\" constant=\"-20\" id=\"aQ3-df-DTw\"/>\n                            <constraint firstItem=\"gTP-dG-YzZ\" firstAttribute=\"leading\" secondItem=\"nbi-WT-AVp\" secondAttribute=\"leadingMargin\" constant=\"-20\" id=\"alh-V3-YoB\"/>\n                        </constraints>\n                        <viewLayoutGuide key=\"safeArea\" id=\"7By-dU-vqq\"/>\n                    </view>\n                    <connections>\n                        <outlet property=\"tableView\" destination=\"gTP-dG-YzZ\" id=\"UOL-5F-yf4\"/>\n                    </connections>\n                </viewController>\n                <placeholder placeholderIdentifier=\"IBFirstResponder\" id=\"Vj7-0B-OdJ\" userLabel=\"First Responder\" sceneMemberID=\"firstResponder\"/>\n            </objects>\n            <point key=\"canvasLocation\" x=\"455.19999999999999\" y=\"5668.5157421289359\"/>\n        </scene>\n    </scenes>\n    <resources>\n        <image name=\"1200X1200logo.png\" width=\"1200\" height=\"1200\"/>\n        <image name=\"arrow-right7.png\" width=\"112\" height=\"112\"/>\n        <image name=\"download.png\" width=\"26\" height=\"26\"/>\n        <image name=\"list.png\" width=\"26\" height=\"26\"/>\n        <image name=\"upload.png\" width=\"26\" height=\"26\"/>\n    </resources>\n    <inferredMetricsTieBreakers>\n        <segue reference=\"s7I-Xo-HUH\"/>\n        <segue reference=\"jbc-qB-Ba2\"/>\n    </inferredMetricsTieBreakers>\n</document>\n"
  },
  {
    "path": "ArcBit/External/BreadWalletClassesV0.5/BRKey+BIP38.h",
    "content": "//\n//  BRKey+BIP38.h\n//  BreadWallet\n//\n//  Created by Aaron Voisine on 4/9/14.\n//  Copyright (c) 2014 Aaron Voisine <voisine@gmail.com>\n//\n//  Permission is hereby granted, free of charge, to any person obtaining a copy\n//  of this software and associated documentation files (the \"Software\"), to deal\n//  in the Software without restriction, including without limitation the rights\n//  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n//  copies of the Software, and to permit persons to whom the Software is\n//  furnished to do so, subject to the following conditions:\n//\n//  The above copyright notice and this permission notice shall be included in\n//  all copies or substantial portions of the Software.\n//\n//  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n//  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n//  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n//  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n//  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n//  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n//  THE SOFTWARE.\n\n#import \"BRKey.h\"\n\n// BIP38 is a method for encrypting private keys with a passphrase\n// https://github.com/bitcoin/bips/blob/master/bip-0038.mediawiki\n\n@interface BRKey (BIP38)\n\n// decrypts a BIP38 key using the given passphrase or retuns nil if passphrase is incorrect\n+ (instancetype)keyWithBIP38Key:(NSString *)key andPassphrase:(NSString *)passphrase isTestnet:(BOOL)isTestnet;\n\n// generates an \"intermediate code\" for an EC multiply mode key, salt should be 64bits of random data\n+ (NSString *)BIP38IntermediateCodeWithSalt:(uint64_t)salt andPassphrase:(NSString *)passphrase;\n\n// generates an \"intermediate code\" for an EC multiply mode key with a lot and sequence number, lot must be less than\n// 1048576, sequence must be less than 4096, and salt should be 32bits of random data\n+ (NSString *)BIP38IntermediateCodeWithLot:(uint32_t)lot sequence:(uint16_t)sequence salt:(uint32_t)salt\npassphrase:(NSString *)passphrase;\n\n// generates a BIP38 key from an \"intermediate code\" and 24 bytes of cryptographically random data (seedb),\n// compressed indicates if compressed pubKey format should be used for the bitcoin address, confcode (optional) will\n// be set to the \"confirmation code\"\n+ (NSString *)BIP38KeyWithIntermediateCode:(NSString *)code seedb:(NSData *)seedb compressed:(BOOL)compressed\nconfirmationCode:(NSString **)confcode isTestnet:(BOOL)isTestnet;\n\n// returns true if the \"confirmation code\" confirms that the given bitcoin address depends on the specified passphrase\n+ (BOOL)confirmWithBIP38ConfirmationCode:(NSString *)code address:(NSString *)address passphrase:(NSString *)passphrase isTestnet:(BOOL)isTestnet;\n\n- (instancetype)initWithBIP38Key:(NSString *)key andPassphrase:(NSString *)passphrase isTestnet:(BOOL)isTestnet;\n\n// encrypts receiver with passphrase and returns BIP38 key\n- (NSString *)BIP38KeyWithPassphrase:(NSString *)passphrase isTestnet:(BOOL)isTestnet;\n\n@end\n"
  },
  {
    "path": "ArcBit/External/BreadWalletClassesV0.5/BRKey+BIP38.m",
    "content": "//\n//  BRKey+BIP38.m\n//  BreadWallet\n//\n//  Created by Aaron Voisine on 4/9/14.\n//  Copyright (c) 2014 Aaron Voisine <voisine@gmail.com>\n//\n//  Permission is hereby granted, free of charge, to any person obtaining a copy\n//  of this software and associated documentation files (the \"Software\"), to deal\n//  in the Software without restriction, including without limitation the rights\n//  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n//  copies of the Software, and to permit persons to whom the Software is\n//  furnished to do so, subject to the following conditions:\n//\n//  The above copyright notice and this permission notice shall be included in\n//  all copies or substantial portions of the Software.\n//\n//  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n//  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n//  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n//  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n//  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n//  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n//  THE SOFTWARE.\n\n#import \"BRKey+BIP38.h\"\n#import \"NSString+Base58.h\"\n#import \"NSData+Hash.h\"\n#import \"NSMutableData+Bitcoin.h\"\n#import \"ccMemory.h\"\n#import <CommonCrypto/CommonCrypto.h>\n#import <openssl/ecdsa.h>\n#import <openssl/obj_mac.h>\n\n// BIP38 is a method for encrypting private keys with a passphrase\n// https://github.com/bitcoin/bips/blob/master/bip-0038.mediawiki\n\n#define BIP38_SCRYPT_N    16384\n#define BIP38_SCRYPT_R    8\n#define BIP38_SCRYPT_P    8\n#define BIP38_SCRYPT_EC_N 1024\n#define BIP38_SCRYPT_EC_R 1\n#define BIP38_SCRYPT_EC_P 1\n\n// bitwise left rotation, this will typically be compiled into a single instruction\n#define rotl(a, b) (((a) << (b)) | ((a) >> (32 - (b))))\n\n// salsa20/8 stream cypher: http://cr.yp.to/snuffle.html\nstatic void salsa20_8(uint32_t b[16])\n{\n    uint32_t x00 = b[0], x01 = b[1], x02 = b[2], x03 = b[3], x04 = b[4], x05 = b[5], x06 = b[6], x07 = b[7],\n             x08 = b[8], x09 = b[9], x10 = b[10], x11 = b[11], x12 = b[12], x13 = b[13], x14 = b[14], x15 = b[15];\n\n    for (int i = 0; i < 8; i += 2) {\n        // operate on columns\n        x04 ^= rotl(x00 + x12, 7), x08 ^= rotl(x04 + x00, 9), x12 ^= rotl(x08 + x04, 13), x00 ^= rotl(x12 + x08, 18);\n        x09 ^= rotl(x05 + x01, 7), x13 ^= rotl(x09 + x05, 9), x01 ^= rotl(x13 + x09, 13), x05 ^= rotl(x01 + x13, 18);\n        x14 ^= rotl(x10 + x06, 7), x02 ^= rotl(x14 + x10, 9), x06 ^= rotl(x02 + x14, 13), x10 ^= rotl(x06 + x02, 18);\n        x03 ^= rotl(x15 + x11, 7), x07 ^= rotl(x03 + x15, 9), x11 ^= rotl(x07 + x03, 13), x15 ^= rotl(x11 + x07, 18);\n\n        // operate on rows\n        x01 ^= rotl(x00 + x03, 7), x02 ^= rotl(x01 + x00, 9), x03 ^= rotl(x02 + x01, 13), x00 ^= rotl(x03 + x02, 18);\n        x06 ^= rotl(x05 + x04, 7), x07 ^= rotl(x06 + x05, 9), x04 ^= rotl(x07 + x06, 13), x05 ^= rotl(x04 + x07, 18);\n        x11 ^= rotl(x10 + x09, 7), x08 ^= rotl(x11 + x10, 9), x09 ^= rotl(x08 + x11, 13), x10 ^= rotl(x09 + x08, 18);\n        x12 ^= rotl(x15 + x14, 7), x13 ^= rotl(x12 + x15, 9), x14 ^= rotl(x13 + x12, 13), x15 ^= rotl(x14 + x13, 18);\n    }\n\n    b[0] += x00, b[1] += x01, b[2] += x02, b[3] += x03, b[4] += x04, b[5] += x05, b[6] += x06, b[7] += x07;\n    b[8] += x08, b[9] += x09, b[10] += x10, b[11] += x11, b[12] += x12, b[13] += x13, b[14] += x14, b[15] += x15;\n}\n\nstatic void blockmix_salsa8(uint64_t *dest, const uint64_t *src, uint64_t *b, uint32_t r)\n{\n    CC_XMEMCPY(b, &src[(2*r - 1)*8], 64);\n\n    for (uint32_t i = 0; i < 2*r; i += 2) {\n        for (uint32_t j = 0; j < 8; j++) b[j] ^= src[i*8 + j];\n        salsa20_8((uint32_t *)b);\n        CC_XMEMCPY(&dest[i*4], b, 64);\n        for (uint32_t j = 0; j < 8; j++) b[j] ^= src[i*8 + 8 + j];\n        salsa20_8((uint32_t *)b);\n        CC_XMEMCPY(&dest[i*4 + r*8], b, 64);\n    }\n}\n\n// scrypt key derivation: http://www.tarsnap.com/scrypt.html\nstatic NSData *scrypt(NSData *password, NSData *salt, int64_t n, uint32_t r, uint32_t p, NSUInteger length)\n{\n    NSMutableData *d = [NSMutableData secureDataWithLength:length];\n    uint8_t b[128*r*p];\n    uint64_t x[16*r], y[16*r], z[8], *v = CC_XMALLOC(128*r*(int)n), m;\n\n    CCKeyDerivationPBKDF(kCCPBKDF2, password.bytes, password.length, salt.bytes, salt.length, kCCPRFHmacAlgSHA256, 1,\n                         b, sizeof(b));\n\n    for (uint32_t i = 0; i < p; i++) {\n        for (uint32_t j = 0; j < 32*r; j++) {\n            ((uint32_t *)x)[j] = CFSwapInt32LittleToHost(*(uint32_t *)&b[i*128*r + j*4]);\n        }\n\n        for (uint64_t j = 0; j < n; j += 2) {\n            CC_XMEMCPY(&v[j*(16*r)], x, 128*r);\n            blockmix_salsa8(y, x, z, r);\n            CC_XMEMCPY(&v[(j + 1)*(16*r)], y, 128*r);\n            blockmix_salsa8(x, y, z, r);\n        }\n\n        for (uint64_t j = 0; j < n; j += 2) {\n            m = CFSwapInt64LittleToHost(x[(2*r - 1)*8]) & (n - 1);\n            for (uint32_t k = 0; k < 16*r; k++) x[k] ^= v[m*(16*r) + k];\n            blockmix_salsa8(y, x, z, r);\n            m = CFSwapInt64LittleToHost(y[(2*r - 1)*8]) & (n - 1);\n            for (uint32_t k = 0; k < 16*r; k++) y[k] ^= v[m*(16*r) + k];\n            blockmix_salsa8(x, y, z, r);\n        }\n\n        for (uint32_t j = 0; j < 32*r; j++) {\n            *(uint32_t *)&b[i*128*r + j*4] = CFSwapInt32HostToLittle(((uint32_t *)x)[j]);\n        }\n    }\n\n    CCKeyDerivationPBKDF(kCCPBKDF2, password.bytes, password.length, b, sizeof(b), kCCPRFHmacAlgSHA256, 1,\n                         d.mutableBytes, d.length);\n\n    CC_XZEROMEM(b, sizeof(b));\n    CC_XZEROMEM(x, sizeof(x));\n    CC_XZEROMEM(y, sizeof(y));\n    CC_XZEROMEM(z, sizeof(z));\n    CC_XZEROMEM(v, 128*r*(int)n);\n    CC_XFREE(v, 128*r*(int)n);\n    CC_XZEROMEM(&m, sizeof(m));\n    return d;\n}\n\nstatic NSData *normalize_passphrase(NSString *passphrase)\n{\n    NSData *password;\n    CFMutableStringRef pw = CFStringCreateMutableCopy(SecureAllocator(), passphrase.length, (CFStringRef)passphrase);\n\n    CFStringNormalize(pw, kCFStringNormalizationFormC);\n    password = CFBridgingRelease(CFStringCreateExternalRepresentation(SecureAllocator(), pw, kCFStringEncodingUTF8, 0));\n    CFRelease(pw);\n    return password;\n}\n\nstatic void derive_passfactor(BIGNUM *passfactor, uint8_t flag, uint64_t entropy, NSString *passphrase)\n{\n    NSData *password = normalize_passphrase(passphrase);\n    NSData *salt = [NSData dataWithBytesNoCopy:&entropy length:(flag & BIP38_LOTSEQUENCE_FLAG) ? 4 : 8 freeWhenDone:NO];\n    NSData *prefactor = scrypt(password, salt, BIP38_SCRYPT_N, BIP38_SCRYPT_R, BIP38_SCRYPT_P, 32);\n    NSMutableData *d;\n\n    if (flag & BIP38_LOTSEQUENCE_FLAG) { // passfactor = SHA256(SHA256(prefactor + entropy))\n        d = [NSMutableData secureDataWithData:prefactor];\n        [d appendBytes:&entropy length:sizeof(entropy)];\n        BN_bin2bn(d.SHA256_2.bytes, CC_SHA256_DIGEST_LENGTH, passfactor);\n    }\n    else BN_bin2bn(prefactor.bytes, (int)prefactor.length, passfactor); // passfactor = prefactor\n}\n\nstatic NSData *derive_key(NSData *passpoint, uint32_t addresshash, uint64_t entropy)\n{\n    NSMutableData *salt = [NSMutableData secureData];\n\n    [salt appendBytes:&addresshash length:sizeof(addresshash)];\n    [salt appendBytes:&entropy length:sizeof(entropy)]; // salt = addresshash + entropy\n\n    return scrypt(passpoint, salt, BIP38_SCRYPT_EC_N, BIP38_SCRYPT_EC_R, BIP38_SCRYPT_EC_P, 64);\n}\n\nstatic NSData *point_multiply(NSData *point, const BIGNUM *factor, BOOL compressed, BN_CTX *ctx)\n{\n    NSMutableData *d = [NSMutableData secureData];\n    EC_GROUP *group = EC_GROUP_new_by_curve_name(NID_secp256k1);\n    EC_POINT *r = EC_POINT_new(group), *p;\n    point_conversion_form_t form = (compressed) ? POINT_CONVERSION_COMPRESSED : POINT_CONVERSION_UNCOMPRESSED;\n\n    if (point) {\n        p = EC_POINT_new(group);\n        EC_POINT_oct2point(group, p, point.bytes, point.length, ctx);\n        EC_POINT_mul(group, r, NULL, p, factor, ctx); // r = point*factor\n        EC_POINT_clear_free(p);\n    }\n    else EC_POINT_mul(group, r, factor, NULL, NULL, ctx); // r = G*factor\n\n    d.length = EC_POINT_point2oct(group, r, form, NULL, 0, ctx);\n    EC_POINT_point2oct(group, r, form, d.mutableBytes, d.length, ctx);\n    EC_POINT_clear_free(r);\n    EC_GROUP_free(group);\n    return d;\n}\n\n@implementation BRKey (BIP38)\n\n// decrypts a BIP38 key using the given passphrase or retuns nil if passphrase is incorrect\n+ (instancetype)keyWithBIP38Key:(NSString *)key andPassphrase:(NSString *)passphrase isTestnet:(BOOL)isTestnet\n{\n    return [[self alloc] initWithBIP38Key:key andPassphrase:passphrase isTestnet:isTestnet];\n}\n\n// generates an \"intermediate code\" for an EC multiply mode key, salt should be 64bits of random data\n+ (NSString *)BIP38IntermediateCodeWithSalt:(uint64_t)salt andPassphrase:(NSString *)passphrase;\n{\n    if (! passphrase) return nil;\n    salt = CFSwapInt64HostToBig(salt);\n\n    BN_CTX *ctx = BN_CTX_new();\n\n    BN_CTX_start(ctx);\n\n    NSMutableData *code = [NSMutableData secureData];\n    BIGNUM *passfactor = BN_CTX_get(ctx);\n\n    derive_passfactor(passfactor, 0, salt, passphrase);\n\n    [code appendBytes:\"\\x2C\\xE9\\xB3\\xE1\\xFF\\x39\\xE2\\x53\" length:8];\n    [code appendBytes:&salt length:sizeof(salt)];\n    [code appendData:point_multiply(nil, passfactor, YES, ctx)]; // passpoint = G*passfactor\n\n    BN_CTX_end(ctx);\n    BN_CTX_free(ctx);\n\n    return [NSString base58checkWithData:code];\n}\n\n// generates an \"intermediate code\" for an EC multiply mode key with a lot and sequence number, lot must be less than\n// 1048576, sequence must be less than 4096, and salt should be 32bits of random data\n+ (NSString *)BIP38IntermediateCodeWithLot:(uint32_t)lot sequence:(uint16_t)sequence salt:(uint32_t)salt\npassphrase:(NSString *)passphrase\n{\n    if (lot >= 0x100000 || sequence >= 0x1000 || ! passphrase) return nil;\n    salt = CFSwapInt32HostToBig(salt);\n\n    BN_CTX *ctx = BN_CTX_new();\n\n    BN_CTX_start(ctx);\n\n    uint32_t lotsequence = CFSwapInt32HostToBig(lot*0x1000 + sequence);\n    NSMutableData *entropy = [NSMutableData secureData], *code = [NSMutableData secureData];\n    BIGNUM *passfactor = BN_CTX_get(ctx);\n\n    [entropy appendBytes:&salt length:sizeof(salt)];\n    [entropy appendBytes:&lotsequence length:sizeof(lotsequence)];\n\n    derive_passfactor(passfactor, BIP38_LOTSEQUENCE_FLAG, *(const uint64_t *)entropy.bytes, passphrase);\n\n    [code appendBytes:\"\\x2C\\xE9\\xB3\\xE1\\xFF\\x39\\xE2\\x51\" length:8];\n    [code appendData:entropy];\n    [code appendData:point_multiply(nil, passfactor, YES, ctx)]; // passpoint = G*passfactor\n\n    BN_CTX_end(ctx);\n    BN_CTX_free(ctx);\n\n    return [NSString base58checkWithData:code];\n}\n\n// generates a BIP38 key from an \"intermediate code\" and 24 bytes of cryptographically random data (seedb),\n// compressed indicates if compressed pubKey format should be used for the bitcoin address, confcode (optional) will\n// be set to the \"confirmation code\"\n+ (NSString *)BIP38KeyWithIntermediateCode:(NSString *)code seedb:(NSData *)seedb compressed:(BOOL)compressed\nconfirmationCode:(NSString **)confcode isTestnet:(BOOL)isTestnet;\n{\n    NSData *d = code.base58checkToData; // d = 0x2C 0xE9 0xB3 0xE1 0xFF 0x39 0xE2 0x51|0x53 + entropy + passpoint\n\n    if (d.length != 49 || seedb.length != 24) return nil;\n\n    BN_CTX *ctx = BN_CTX_new();\n\n    BN_CTX_start(ctx);\n\n    NSData *passpoint = [NSData dataWithBytesNoCopy:(uint8_t *)d.bytes + 16 length:33 freeWhenDone:NO], *pubKey;\n    BIGNUM *factorb = BN_CTX_get(ctx);\n\n    BN_bin2bn(seedb.SHA256_2.bytes, CC_SHA256_DIGEST_LENGTH, factorb); // factorb = SHA256(SHA256(seedb))\n    pubKey = point_multiply(passpoint, factorb, compressed, ctx); // pubKey = passpoint*factorb\n\n    uint16_t prefix = CFSwapInt16HostToBig(BIP38_EC_PREFIX);\n    uint8_t flag = (compressed) ? BIP38_COMPRESSED_FLAG : 0;\n    NSData *address = [[BRKey keyWithPublicKey:pubKey isTestnet:isTestnet].address dataUsingEncoding:NSUTF8StringEncoding];\n    uint32_t addresshash = (address) ? *(uint32_t *)address.SHA256_2.bytes : 0;\n    uint64_t entropy = *(const uint64_t *)((const uint8_t *)d.bytes + 8);\n    NSData *derived = derive_key(passpoint, addresshash, entropy);\n    const uint64_t *derived1 = (const uint64_t *)derived.bytes, *derived2 = &derived1[4];\n    NSMutableData *key = [NSMutableData secureData], *encrypted1, *encrypted2;\n    NSMutableData *x = [NSMutableData secureDataWithLength:16];\n    size_t l;\n\n    if (((const uint8_t *)d.bytes)[7] == 0x51) flag |= BIP38_LOTSEQUENCE_FLAG;\n\n    // enctryped1 = AES256Encrypt(seedb[0...15] xor derived1[0...15], derived2)\n    ((uint64_t *)x.mutableBytes)[0] = ((const uint64_t *)seedb.bytes)[0] ^ derived1[0];\n    ((uint64_t *)x.mutableBytes)[1] = ((const uint64_t *)seedb.bytes)[1] ^ derived1[1];\n    encrypted1 = [NSMutableData secureDataWithLength:16];\n    CCCrypt(kCCEncrypt, kCCAlgorithmAES, kCCOptionECBMode, derived2, 32, NULL, x.bytes, x.length,\n            encrypted1.mutableBytes, encrypted1.length, &l);\n\n    // encrypted2 = AES256Encrypt((encrypted1[8...15] + seedb[16...23]) xor derived1[16...31], derived2)\n    ((uint64_t *)x.mutableBytes)[0] = ((const uint64_t *)encrypted1.bytes)[1] ^ derived1[2];\n    ((uint64_t *)x.mutableBytes)[1] = ((const uint64_t *)seedb.bytes)[2] ^ derived1[3];\n    encrypted2 = [NSMutableData secureDataWithLength:16];\n    CCCrypt(kCCEncrypt, kCCAlgorithmAES, kCCOptionECBMode, derived2, 32, NULL, x.bytes, x.length,\n            encrypted2.mutableBytes, encrypted2.length, &l);\n\n    [key appendBytes:&prefix length:sizeof(prefix)];\n    [key appendBytes:&flag length:sizeof(flag)];\n    [key appendBytes:&addresshash length:sizeof(addresshash)];\n    [key appendBytes:&entropy length:sizeof(entropy)];\n    [key appendBytes:(const uint8_t *)encrypted1.bytes length:8];\n    [key appendData:encrypted2];\n\n    if (confcode) {\n        NSData *pointb = point_multiply(nil, factorb, YES, ctx); // pointb = G*factorb\n        NSMutableData *c = [NSMutableData secureData], *pointbx1, *pointbx2;\n        uint8_t pointbprefix = ((const uint8_t *)pointb.bytes)[0] ^ (((const uint8_t *)derived2)[31] & 0x01);\n\n        // pointbx1 = AES256Encrypt(pointb[1...16] xor derived1[0...15], derived2)\n        ((uint64_t *)x.mutableBytes)[0] = ((const uint64_t *)((const uint8_t *)pointb.bytes + 1))[0] ^ derived1[0];\n        ((uint64_t *)x.mutableBytes)[1] = ((const uint64_t *)((const uint8_t *)pointb.bytes + 1))[1] ^ derived1[1];\n        pointbx1 = [NSMutableData secureDataWithLength:16];\n        CCCrypt(kCCEncrypt, kCCAlgorithmAES, kCCOptionECBMode, derived2, 32, NULL, x.bytes, x.length,\n                pointbx1.mutableBytes, pointbx1.length, &l);\n\n        // pointbx2 = AES256Encrypt(pointb[17...32] xor derived1[16...31], derived2)\n        ((uint64_t *)x.mutableBytes)[0] = ((const uint64_t *)((const uint8_t *)pointb.bytes + 1))[2] ^ derived1[2];\n        ((uint64_t *)x.mutableBytes)[1] = ((const uint64_t *)((const uint8_t *)pointb.bytes + 1))[3] ^ derived1[3];\n        pointbx2 = [NSMutableData secureDataWithLength:16];\n        CCCrypt(kCCEncrypt, kCCAlgorithmAES, kCCOptionECBMode, derived2, 32, NULL, x.bytes, x.length,\n                pointbx2.mutableBytes, pointbx2.length, &l);\n\n        [c appendBytes:\"\\x64\\x3B\\xF6\\xA8\\x9A\" length:5];\n        [c appendBytes:&flag length:sizeof(flag)];\n        [c appendBytes:&addresshash length:sizeof(addresshash)];\n        [c appendBytes:&entropy length:sizeof(entropy)];\n        [c appendBytes:&pointbprefix length:sizeof(pointbprefix)];\n        [c appendData:pointbx1];\n        [c appendData:pointbx2];\n        *confcode = [NSString base58checkWithData:c];\n    }\n\n    BN_CTX_end(ctx);\n    BN_CTX_free(ctx);\n\n    return [NSString base58checkWithData:key];\n}\n\n// returns true if the \"confirmation code\" confirms that the given bitcoin address depends on the specified passphrase\n+ (BOOL)confirmWithBIP38ConfirmationCode:(NSString *)code address:(NSString *)address passphrase:(NSString *)passphrase isTestnet:(BOOL)isTestnet\n{\n    NSData *d = code.base58checkToData;\n\n    if (d.length != 51 || ! address || ! passphrase) return NO;\n\n    uint8_t flag = ((const uint8_t *)d.bytes)[5];\n    uint32_t addresshash = *(const uint32_t *)((const uint8_t *)d.bytes + 6);\n\n    if (*(const uint32_t *)[address dataUsingEncoding:NSUTF8StringEncoding].SHA256_2.bytes != addresshash) return NO;\n\n    BN_CTX *ctx = BN_CTX_new();\n\n    BN_CTX_start(ctx);\n\n    uint64_t entropy = *(const uint64_t *)((const uint8_t *)d.bytes + 10);\n    uint8_t pointprefix = ((const uint8_t *)d.bytes)[18];\n    const uint8_t *pointbx1 = (const uint8_t *)d.bytes + 19, *pointbx2 = (const uint8_t *)d.bytes + 35;\n    BIGNUM *passfactor = BN_CTX_get(ctx);\n\n    derive_passfactor(passfactor, flag, entropy, passphrase);\n\n    NSData *passpoint = point_multiply(nil, passfactor, YES, ctx); // passpoint = G*passfactor\n    NSData *derived = derive_key(passpoint, addresshash, entropy), *pubKey;\n    const uint64_t *derived1 = (const uint64_t *)derived.bytes, *derived2 = &derived1[4];\n    NSMutableData *pointb = [NSMutableData secureDataWithLength:33];\n    size_t l;\n\n    ((uint8_t *)pointb.mutableBytes)[0] = pointprefix ^ (((const uint8_t *)derived2)[31] & 0x01);\n\n    CCCrypt(kCCDecrypt, kCCAlgorithmAES, kCCOptionECBMode, derived2, 32, NULL, pointbx1, 16,\n            (uint8_t *)pointb.mutableBytes + 1, 16, &l); // pointb[1...16] xor derived1[0...15]\n    ((uint64_t *)((uint8_t *)pointb.mutableBytes + 1))[0] ^= derived1[0];\n    ((uint64_t *)((uint8_t *)pointb.mutableBytes + 1))[1] ^= derived1[1];\n    \n    CCCrypt(kCCDecrypt, kCCAlgorithmAES, kCCOptionECBMode, derived2, 32, NULL, pointbx2, 16,\n            (uint8_t *)pointb.mutableBytes + 17, 16, &l); // pointb[17...32] xor derived1[16...31]\n    ((uint64_t *)((uint8_t *)pointb.mutableBytes + 1))[2] ^= derived1[2];\n    ((uint64_t *)((uint8_t *)pointb.mutableBytes + 1))[3] ^= derived1[3];\n\n    pubKey = point_multiply(pointb, passfactor, flag & BIP38_COMPRESSED_FLAG, ctx); // pubKey = pointb*passfactor\n    BN_CTX_end(ctx);\n    BN_CTX_free(ctx);\n\n    return ([[BRKey keyWithPublicKey:pubKey isTestnet:isTestnet].address isEqual:address]) ? YES : NO;\n}\n\n- (instancetype)initWithBIP38Key:(NSString *)key andPassphrase:(NSString *)passphrase isTestnet:(BOOL)isTestnet\n{\n    NSData *d = key.base58checkToData;\n\n    if (d.length != 39 || ! passphrase) return nil;\n\n    uint16_t prefix = CFSwapInt16BigToHost(*(const uint16_t *)d.bytes);\n    uint8_t flag = ((const uint8_t *)d.bytes)[2];\n    uint32_t addresshash = *(const uint32_t *)((const uint8_t *)d.bytes + 3);\n    NSMutableData *secret = [NSMutableData secureDataWithLength:32];\n    size_t l;\n\n    if (prefix == BIP38_NOEC_PREFIX) { // non EC multiplied key\n        // d = prefix + flag + addresshash + encrypted1 + encrypted2\n        NSData *password = normalize_passphrase(passphrase);\n        NSData *salt = [NSData dataWithBytesNoCopy:&addresshash length:sizeof(addresshash) freeWhenDone:NO];\n        const uint8_t *encrypted1 = (const uint8_t *)d.bytes + 7, *encrypted2 = (const uint8_t *)d.bytes + 23;\n        NSData *derived = scrypt(password, salt, BIP38_SCRYPT_N, BIP38_SCRYPT_R, BIP38_SCRYPT_P, 64);\n        const uint64_t *derived1 = (const uint64_t *)derived.bytes, *derived2 = &((const uint64_t *)derived.bytes)[4];\n\n        CCCrypt(kCCDecrypt, kCCAlgorithmAES, kCCOptionECBMode, derived2, 32, NULL, encrypted1, 16,\n                secret.mutableBytes, 16, &l);\n        CCCrypt(kCCDecrypt, kCCAlgorithmAES, kCCOptionECBMode, derived2, 32, NULL, encrypted2, 16,\n                (uint8_t *)secret.mutableBytes + 16, 16, &l);\n\n        for (size_t i = 0; i < secret.length/sizeof(uint64_t); i++) {\n            ((uint64_t *)secret.mutableBytes)[i] ^= derived1[i];\n        }\n    }\n    else if (prefix == BIP38_EC_PREFIX) { // EC multipled key\n        BN_CTX *ctx = BN_CTX_new();\n\n        BN_CTX_start(ctx);\n\n        // d = prefix + flag + addresshash + entropy + encrypted1[0...7] + encrypted2\n        uint64_t entropy = *(const uint64_t *)((const uint8_t *)d.bytes + 7);\n        NSMutableData *encrypted1 = [NSMutableData secureData];\n        const uint8_t *encrypted2 = (const uint8_t *)d.bytes + 23;\n        BIGNUM *passfactor = BN_CTX_get(ctx), *factorb = BN_CTX_get(ctx), *priv = BN_CTX_get(ctx),\n               *order = BN_CTX_get(ctx);\n\n        derive_passfactor(passfactor, flag, entropy, passphrase);\n\n        NSData *passpoint = point_multiply(nil, passfactor, YES, ctx); // passpoint = G*passfactor\n        NSData *derived = derive_key(passpoint, addresshash, entropy);\n        const uint64_t *derived1 = (const uint64_t *)derived.bytes, *derived2 = &derived1[4];\n        NSMutableData *seedb = [NSMutableData secureDataWithLength:24], *o = [NSMutableData secureDataWithLength:16];\n        EC_GROUP *group = EC_GROUP_new_by_curve_name(NID_secp256k1);\n\n        [encrypted1 appendBytes:(const uint8_t *)d.bytes + 15 length:8];\n        encrypted1.length = 16;\n        \n        CCCrypt(kCCDecrypt, kCCAlgorithmAES, kCCOptionECBMode, derived2, 32, NULL, encrypted2, 16,\n                o.mutableBytes, o.length, &l); // o = (encrypted1[8...15] + seedb[16...23]) xor derived1[16...31]\n        ((uint64_t *)encrypted1.mutableBytes)[1] = ((const uint64_t *)o.bytes)[0] ^ derived1[2];\n        ((uint64_t *)seedb.mutableBytes)[2] = ((const uint64_t *)o.bytes)[1] ^ derived1[3];\n\n        CCCrypt(kCCDecrypt, kCCAlgorithmAES, kCCOptionECBMode, derived2, 32, NULL, encrypted1.bytes, encrypted1.length,\n                o.mutableBytes, o.length, &l); // o = seedb[0...15] xor derived1[0...15]\n        ((uint64_t *)seedb.mutableBytes)[0] = ((const uint64_t *)o.bytes)[0] ^ derived1[0];\n        ((uint64_t *)seedb.mutableBytes)[1] = ((const uint64_t *)o.bytes)[1] ^ derived1[1];\n\n        EC_GROUP_get_order(group, order, ctx);\n        BN_bin2bn(seedb.SHA256_2.bytes, CC_SHA256_DIGEST_LENGTH, factorb); // factorb = SHA256(SHA256(seedb))\n        BN_mod_mul(priv, passfactor, factorb, order, ctx); // secret = passfactor*factorb mod N\n        BN_bn2bin(priv, (unsigned char *)secret.mutableBytes + secret.length - BN_num_bytes(priv));\n\n        EC_GROUP_free(group);\n        BN_CTX_end(ctx);\n        BN_CTX_free(ctx);\n    }\n\n    if (! (self = [self initWithSecret:secret compressed:flag & BIP38_COMPRESSED_FLAG isTestnet:isTestnet])) return nil;\n\n    NSData *address = [self.address dataUsingEncoding:NSUTF8StringEncoding];\n\n    if (! address || *(const uint32_t *)address.SHA256_2.bytes != addresshash) {\n        NSLog(@\"BIP38 bad passphrase\");\n        return nil;\n    }\n\n    return self;\n}\n\n// encrypts receiver with passphrase and returns BIP38 key\n- (NSString *)BIP38KeyWithPassphrase:(NSString *)passphrase isTestnet:(BOOL)isTestnet\n{\n    NSData *priv = self.privateKey.base58checkToData;\n\n    if (priv.length < 33 || ! passphrase) return nil;\n\n    uint16_t prefix = CFSwapInt16HostToBig(BIP38_NOEC_PREFIX);\n    uint8_t flag = BIP38_NOEC_FLAG;\n    NSData *password = normalize_passphrase(passphrase);\n    NSData *address = [self.address dataUsingEncoding:NSUTF8StringEncoding];\n    NSData *salt = [address.SHA256_2 subdataWithRange:NSMakeRange(0, 4)];\n    NSData *derived = scrypt(password, salt, BIP38_SCRYPT_N, BIP38_SCRYPT_R, BIP38_SCRYPT_P, 64);\n    const uint64_t *derived1 = (const uint64_t *)derived.bytes, *derived2 = &derived1[4];\n    NSMutableData *secret = [NSMutableData secureDataWithLength:32], *encrypted1, *encrypted2, *key;\n    size_t l;\n\n    if (priv.length > 33) flag |= BIP38_COMPRESSED_FLAG;\n\n    for (size_t i = 0; i < secret.length/sizeof(uint64_t); i++) {\n        ((uint64_t *)secret.mutableBytes)[i] = ((const uint64_t *)((const uint8_t *)priv.bytes + 1))[i] ^ derived1[i];\n    }\n\n    // enctryped1 = AES256Encrypt(privkey[0...15] xor derived1[0...15], derived2)\n    encrypted1 = [NSMutableData secureDataWithLength:16];\n    CCCrypt(kCCEncrypt, kCCAlgorithmAES, kCCOptionECBMode, derived2, 32, NULL, secret.bytes, 16,\n            encrypted1.mutableBytes, encrypted1.length, &l);\n\n    // encrypted2 = AES256Encrypt(privkey[16...31] xor derived1[16...31], derived2)\n    encrypted2 = [NSMutableData secureDataWithLength:16];\n    CCCrypt(kCCEncrypt, kCCAlgorithmAES, kCCOptionECBMode, derived2, 32, NULL, (const uint8_t *)secret.bytes + 16, 16,\n            encrypted2.mutableBytes, encrypted2.length, &l);\n\n    key = [NSMutableData secureData];\n    [key appendBytes:&prefix length:sizeof(prefix)];\n    [key appendBytes:&flag length:sizeof(flag)];\n    [key appendData:salt];\n    [key appendData:encrypted1];\n    [key appendData:encrypted2];\n\n    return [NSString base58checkWithData:key];\n}\n\n@end\n"
  },
  {
    "path": "ArcBit/External/BreadWalletClassesV0.5/BRKey.h",
    "content": "//\n//  BRKey.h\n//  BreadWallet\n//\n//  Created by Aaron Voisine on 5/22/13.\n//  Copyright (c) 2013 Aaron Voisine <voisine@gmail.com>\n//\n//  Permission is hereby granted, free of charge, to any person obtaining a copy\n//  of this software and associated documentation files (the \"Software\"), to deal\n//  in the Software without restriction, including without limitation the rights\n//  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n//  copies of the Software, and to permit persons to whom the Software is\n//  furnished to do so, subject to the following conditions:\n//\n//  The above copyright notice and this permission notice shall be included in\n//  all copies or substantial portions of the Software.\n//\n//  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n//  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n//  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n//  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n//  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n//  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n//  THE SOFTWARE.\n\n#import <Foundation/Foundation.h>\n\n@interface BRKey : NSObject\n\n@property (nonatomic, strong) NSString *privateKey;\n@property (nonatomic, strong) NSData *publicKey;\n@property (nonatomic, readonly) NSString *address;\n@property (nonatomic, readonly) NSData *hash160;\n\n+ (instancetype)keyWithPrivateKey:(NSString *)privateKey isTestnet:(BOOL)isTestnet;\n+ (instancetype)keyWithSecret:(NSData *)secret compressed:(BOOL)compressed isTestnet:(BOOL)isTestnet;\n+ (instancetype)keyWithPublicKey:(NSData *)publicKey isTestnet:(BOOL)isTestnet;\n\n- (instancetype)initWithPrivateKey:(NSString *)privateKey isTestnet:(BOOL)isTestnet;\n- (instancetype)initWithSecret:(NSData *)secret compressed:(BOOL)compressed isTestnet:(BOOL)isTestnet;\n- (instancetype)initWithPublicKey:(NSData *)publicKey isTestnet:(BOOL)isTestnet;\n\n- (NSData *)sign:(NSData *)d;\n- (BOOL)verify:(NSData *)d signature:(NSData *)sig;\n\n@end\n"
  },
  {
    "path": "ArcBit/External/BreadWalletClassesV0.5/BRKey.m",
    "content": "//\n//  BRKey.m\n//  BreadWallet\n//\n//  Created by Aaron Voisine on 5/22/13.\n//  Copyright (c) 2013 Aaron Voisine <voisine@gmail.com>\n//\n//  Permission is hereby granted, free of charge, to any person obtaining a copy\n//  of this software and associated documentation files (the \"Software\"), to deal\n//  in the Software without restriction, including without limitation the rights\n//  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n//  copies of the Software, and to permit persons to whom the Software is\n//  furnished to do so, subject to the following conditions:\n//\n//  The above copyright notice and this permission notice shall be included in\n//  all copies or substantial portions of the Software.\n//\n//  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n//  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n//  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n//  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n//  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n//  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n//  THE SOFTWARE.\n\n#import \"BRKey.h\"\n#import \"NSString+Base58.h\"\n#import \"NSData+Hash.h\"\n#import \"NSMutableData+Bitcoin.h\"\n#import <CommonCrypto/CommonHMAC.h>\n#import <openssl/ecdsa.h>\n#import <openssl/obj_mac.h>\n\n// HMAC-SHA256 DRBG, using no prediction resistance or personalization string and outputing 256bits\nstatic NSData *hmac_drbg(NSData *entropy, NSData *nonce)\n{\n    NSMutableData *V = [NSMutableData\n                        secureDataWithCapacity:CC_SHA256_DIGEST_LENGTH + 1 + entropy.length + nonce.length],\n                  *K = [NSMutableData secureDataWithCapacity:CC_SHA256_DIGEST_LENGTH],\n                  *T = [NSMutableData secureDataWithLength:CC_SHA256_DIGEST_LENGTH];\n\n    V.length = CC_SHA256_DIGEST_LENGTH;\n    memset(V.mutableBytes, 0x01, V.length); // V = 0x01 0x01 0x01 ... 0x01\n    K.length = CC_SHA256_DIGEST_LENGTH;     // K = 0x00 0x00 0x00 ... 0x00\n    [V appendBytes:\"\\0\" length:1];\n    [V appendBytes:entropy.bytes length:entropy.length];\n    [V appendBytes:nonce.bytes length:nonce.length];\n    CCHmac(kCCHmacAlgSHA256, K.bytes, K.length, V.bytes, V.length, K.mutableBytes); // K = HMAC_K(V || 0x00 || seed)\n    V.length = CC_SHA256_DIGEST_LENGTH;\n    CCHmac(kCCHmacAlgSHA256, K.bytes, K.length, V.bytes, V.length, V.mutableBytes); // V = HMAC_K(V)\n    [V appendBytes:\"\\x01\" length:1];\n    [V appendBytes:entropy.bytes length:entropy.length];\n    [V appendBytes:nonce.bytes length:nonce.length];\n    CCHmac(kCCHmacAlgSHA256, K.bytes, K.length, V.bytes, V.length, K.mutableBytes); // K = HMAC_K(V || 0x01 || seed)\n    V.length = CC_SHA256_DIGEST_LENGTH;\n    CCHmac(kCCHmacAlgSHA256, K.bytes, K.length, V.bytes, V.length, V.mutableBytes); // V = HMAC_K(V)\n    CCHmac(kCCHmacAlgSHA256, K.bytes, K.length, V.bytes, V.length, T.mutableBytes); // T = HMAC_K(V)\n    return T;\n}\n\n@interface BRKey ()\n\n@property (nonatomic, assign) EC_KEY *key;\n@property (nonatomic, assign) BOOL isTestnet;\n\n@end\n\n@implementation BRKey\n\n+ (instancetype)keyWithPrivateKey:(NSString *)privateKey isTestnet:(BOOL)isTestnet\n{\n    return [[self alloc] initWithPrivateKey:privateKey isTestnet:isTestnet];\n}\n\n+ (instancetype)keyWithSecret:(NSData *)secret compressed:(BOOL)compressed isTestnet:(BOOL)isTestnet\n{\n    return [[self alloc] initWithSecret:secret compressed:compressed isTestnet:isTestnet];\n}\n\n+ (instancetype)keyWithPublicKey:(NSData *)publicKey isTestnet:(BOOL)isTestnet\n{\n    return [[self alloc] initWithPublicKey:publicKey isTestnet:isTestnet];\n}\n\n- (instancetype)init\n{\n    if (! (self = [super init])) return nil;\n    \n    _key = EC_KEY_new_by_curve_name(NID_secp256k1);\n    \n    return _key ? self : nil;\n}\n\n- (void)dealloc\n{\n    if (_key) EC_KEY_free(_key);\n}\n\n- (instancetype)initWithSecret:(NSData *)secret compressed:(BOOL)compressed isTestnet:(BOOL)isTestnet\n{\n    if (secret.length != 32) return nil;\n\n    if (! (self = [self init])) return nil;\n\n    self.isTestnet = isTestnet;\n    [self setSecret:secret compressed:compressed];\n    \n    return (EC_KEY_check_key(_key)) ? self : nil;\n}\n\n- (instancetype)initWithPrivateKey:(NSString *)privateKey isTestnet:(BOOL)isTestnet\n{\n    if (! (self = [self init])) return nil;\n    \n    self.isTestnet = isTestnet;\n    self.privateKey = privateKey;\n    \n    return (EC_KEY_check_key(_key)) ? self : nil;\n}\n\n- (instancetype)initWithPublicKey:(NSData *)publicKey isTestnet:(BOOL)isTestnet\n{\n    if (! (self = [self init])) return nil;\n    \n    self.isTestnet = isTestnet;\n    self.publicKey = publicKey;\n    \n    return (EC_KEY_check_key(_key)) ? self : nil;\n}\n\n- (void)setSecret:(NSData *)secret compressed:(BOOL)compressed\n{\n    if (secret.length != 32 || ! _key) return;\n    \n    BN_CTX *ctx = BN_CTX_new();\n\n    if (! ctx) return;\n    BN_CTX_start(ctx);\n\n    BIGNUM *priv = BN_CTX_get(ctx);\n    const EC_GROUP *group = EC_KEY_get0_group(_key);\n    EC_POINT *pub = EC_POINT_new(group);\n\n    if (pub) {\n        BN_bin2bn(secret.bytes, 32, priv);\n        \n        if (EC_POINT_mul(group, pub, priv, NULL, NULL, ctx)) {\n            EC_KEY_set_private_key(_key, priv);\n            EC_KEY_set_public_key(_key, pub);\n            EC_KEY_set_conv_form(_key, compressed ? POINT_CONVERSION_COMPRESSED : POINT_CONVERSION_UNCOMPRESSED);\n        }\n\n        EC_POINT_free(pub);\n    }\n\n    BN_CTX_end(ctx);\n    BN_CTX_free(ctx);\n}\n\n- (void)setPrivateKey:(NSString *)privateKey\n{\n    // mini private key format\n    if ((privateKey.length == 30 || privateKey.length == 22) && [privateKey characterAtIndex:0] == 'S') {\n        if (! [privateKey isValidBitcoinPrivateKey:self.isTestnet]) return;\n        \n        [self setSecret:[CFBridgingRelease(CFStringCreateExternalRepresentation(SecureAllocator(),\n                         (CFStringRef)privateKey, kCFStringEncodingUTF8, 0)) SHA256] compressed:NO];\n        return;\n    }\n\n    NSData *d = privateKey.base58checkToData;\n    uint8_t version = BITCOIN_PRIVKEY;\n\n    if (self.isTestnet) {\n        version = BITCOIN_PRIVKEY_TEST;\n    }\n    \n    if (! d || d.length == 28) d = privateKey.base58ToData;\n    if (d.length < 32 || d.length > 34) d = privateKey.hexToData;\n\n    if ((d.length == 33 || d.length == 34) && *(const unsigned char *)d.bytes == version) {\n        [self setSecret:[NSData dataWithBytesNoCopy:(unsigned char *)d.bytes + 1 length:32 freeWhenDone:NO]\n         compressed:(d.length == 34) ? YES : NO];\n    }\n    else if (d.length == 32) [self setSecret:d compressed:NO];\n}\n\n- (NSString *)privateKey\n{\n    if (! EC_KEY_check_key(_key)) return nil;\n    \n    const BIGNUM *priv = EC_KEY_get0_private_key(_key);\n    NSMutableData *d = [NSMutableData secureDataWithCapacity:34];\n    uint8_t version = BITCOIN_PRIVKEY;\n\n    if (self.isTestnet) {\n        version = BITCOIN_PRIVKEY_TEST;\n    }\n\n    [d appendBytes:&version length:1];\n    d.length = 33;\n    BN_bn2bin(priv, (unsigned char *)d.mutableBytes + d.length - BN_num_bytes(priv));\n    if (EC_KEY_get_conv_form(_key) == POINT_CONVERSION_COMPRESSED) [d appendBytes:\"\\x01\" length:1];\n\n    return [NSString base58checkWithData:d];\n}\n\n- (void)setPublicKey:(NSData *)publicKey\n{\n    const unsigned char *bytes = publicKey.bytes;\n\n    o2i_ECPublicKey(&_key, &bytes, publicKey.length);\n}\n\n- (NSData *)publicKey\n{\n    if (! EC_KEY_check_key(_key)) return nil;\n\n    size_t l = i2o_ECPublicKey(_key, NULL);\n    NSMutableData *pubKey = [NSMutableData secureDataWithLength:l];\n    unsigned char *bytes = pubKey.mutableBytes;\n    \n    if (i2o_ECPublicKey(_key, &bytes) != l) return nil;\n    \n    return pubKey;\n}\n\n- (NSData *)hash160\n{\n    return [[self publicKey] hash160];\n}\n\n- (NSString *)address\n{\n    NSData *hash = [self hash160];\n    \n    if (! hash.length) return nil;\n\n    NSMutableData *d = [NSMutableData secureDataWithCapacity:hash.length + 1];\n    uint8_t version = BITCOIN_PUBKEY_ADDRESS;\n\n    if (self.isTestnet) {\n        version = BITCOIN_PUBKEY_ADDRESS_TEST;\n    }\n    \n    [d appendBytes:&version length:1];\n    [d appendData:hash];\n\n    return [NSString base58checkWithData:d];\n}\n\n- (NSData *)sign:(NSData *)d\n{\n    if (d.length != CC_SHA256_DIGEST_LENGTH) {\n        NSLog(@\"%s:%d: %s: Only 256 bit hashes can be signed\", __FILE__, __LINE__,  __func__);\n        return nil;\n    }\n\n    BN_CTX *ctx = BN_CTX_new();\n\n    BN_CTX_start(ctx);\n\n    BIGNUM *order = BN_CTX_get(ctx), *halforder = BN_CTX_get(ctx), *k = BN_CTX_get(ctx), *r = BN_CTX_get(ctx);\n    const BIGNUM *priv = EC_KEY_get0_private_key(_key);\n    const EC_GROUP *group = EC_KEY_get0_group(_key);\n    EC_POINT *p = EC_POINT_new(group);\n    NSMutableData *sig = nil, *entropy = [NSMutableData secureDataWithLength:32];\n    unsigned char *b;\n\n    EC_GROUP_get_order(group, order, ctx);\n    BN_rshift1(halforder, order);\n\n    // generate k deterministicly per RFC6979: https://tools.ietf.org/html/rfc6979\n    BN_bn2bin(priv, (unsigned char *)entropy.mutableBytes + entropy.length - BN_num_bytes(priv));\n    BN_bin2bn(hmac_drbg(entropy, d).bytes, CC_SHA256_DIGEST_LENGTH, k);\n\n    EC_POINT_mul(group, p, k, NULL, NULL, ctx); // compute r, the x-coordinate of generator*k\n    EC_POINT_get_affine_coordinates_GFp(group, p, r, NULL, ctx);\n    EC_POINT_clear_free(p);\n    \n    BN_mod_inverse(k, k, order, ctx); // compute the inverse of k\n\n    ECDSA_SIG *s = ECDSA_do_sign_ex(d.bytes, (int)d.length, k, r, _key);\n\n    if (s) {\n        // enforce low s values, negate the value (modulo the order) if above order/2.\n        if (BN_cmp(s->s, halforder) > 0) BN_sub(s->s, order, s->s);\n\n        sig = [NSMutableData dataWithLength:ECDSA_size(_key)];\n        b = sig.mutableBytes;\n        sig.length = i2d_ECDSA_SIG(s, &b);\n        ECDSA_SIG_free(s);\n    }\n\n    BN_CTX_end(ctx);\n    BN_CTX_free(ctx);\n\n    return sig;\n}\n\n- (BOOL)verify:(NSData *)d signature:(NSData *)sig\n{\n    // -1 = error, 0 = bad sig, 1 = good\n    return (ECDSA_verify(0, d.bytes, (int)d.length, sig.bytes, (int)sig.length, _key) == 1) ? YES : NO;\n}\n\n@end\n"
  },
  {
    "path": "ArcBit/External/BreadWalletClassesV0.5/BRTransaction.h",
    "content": "//\n//  BRTransaction.h\n//  BreadWallet\n//\n//  Created by Aaron Voisine on 5/16/13.\n//  Copyright (c) 2013 Aaron Voisine <voisine@gmail.com>\n//\n//  Permission is hereby granted, free of charge, to any person obtaining a copy\n//  of this software and associated documentation files (the \"Software\"), to deal\n//  in the Software without restriction, including without limitation the rights\n//  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n//  copies of the Software, and to permit persons to whom the Software is\n//  furnished to do so, subject to the following conditions:\n//\n//  The above copyright notice and this permission notice shall be included in\n//  all copies or substantial portions of the Software.\n//\n//  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n//  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n//  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n//  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n//  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n//  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n//  THE SOFTWARE.\n\n#import <Foundation/Foundation.h>\n\n#if TX_FEE_0_8_RULES\n#define TX_FEE_PER_KB        10000ULL    // standard tx fee per kb of tx size, rounded up to nearest kb (0.8 rules)\n#else\n#define TX_FEE_PER_KB        1000ULL     // standard tx fee per kb of tx size, rounded up to nearest kb\n#endif\n#define TX_MIN_OUTPUT_AMOUNT (TX_FEE_PER_KB*3*(34 + 148)/1000) // no txout can be below this amount (or it won't relay)\n#define TX_MAX_SIZE          100000      // no tx can be larger than this size in bytes\n#define TX_FREE_MAX_SIZE     1000        // tx must not be larger than this size in bytes without a fee\n#define TX_FREE_MIN_PRIORITY 57600000ULL // tx must not have a priority below this value without a fee\n#define TX_UNCONFIRMED       INT32_MAX   // block height indicating transaction is unconfirmed\n#define TX_MAX_LOCK_HEIGHT   500000000u  // a lockTime below this value is a block height, otherwise a timestamp\n#define TX_AVERAGE_SIZE      550         // average transaction size in bytes as of november 2014 (relatively stable)\n\n@interface BRTransaction : NSObject\n\n//@property (nonatomic, readonly) NSArray *inputAddresses;\n- (NSArray*)getInputAddresses:(BOOL)isTestnet;\n@property (nonatomic, readonly) NSArray *inputHashes;\n@property (nonatomic, readonly) NSArray *inputIndexes;\n@property (nonatomic, readonly) NSArray *inputScripts;\n@property (nonatomic, readonly) NSArray *inputSignatures;\n@property (nonatomic, readonly) NSArray *inputSequences;\n@property (nonatomic, readonly) NSArray *outputAmounts;\n@property (nonatomic, readonly) NSArray *outputAddresses;\n@property (nonatomic, readonly) NSArray *outputScripts;\n\n@property (nonatomic, assign) uint32_t version;\n@property (nonatomic, strong) NSData *txHash;\n@property (nonatomic, assign) uint32_t lockTime;\n@property (nonatomic, assign) uint32_t blockHeight;\n@property (nonatomic, readonly) size_t size;\n@property (nonatomic, readonly) uint64_t standardFee;\n@property (nonatomic, readonly) BOOL isSigned; // checks if all signatures exist, but does not verify them\n@property (nonatomic, readonly, getter = toData) NSData *data;\n\n+ (instancetype)transactionWithMessage:(NSData *)message isTestnet:(BOOL)isTestnet;\n\n- (instancetype)initWithMessage:(NSData *)message isTestnet:(BOOL)isTestnet;\n- (instancetype)initWithInputHashes:(NSArray *)hashes inputIndexes:(NSArray *)indexes inputScripts:(NSArray *)scripts\noutputAddresses:(NSArray *)addresses outputAmounts:(NSArray *)amounts isTestnet:(BOOL)isTestnet;\n\n- (void)addInputHash:(NSData *)hash index:(NSUInteger)index script:(NSData *)script;\n- (void)addInputHash:(NSData *)hash index:(NSUInteger)index script:(NSData *)script signature:(NSData *)signature\nsequence:(uint32_t)sequence;\n\n- (void)addOutputAddress:(NSString *)address amount:(uint64_t)amount isTestnet:(BOOL)isTestnet;\n- (void)addOutputScript:(NSData *)script amount:(uint64_t)amount isTestnet:(BOOL)isTestnet;\n- (void)insertOutputScript:(NSData *)script amount:(uint64_t)amount isTestnet:(BOOL)isTestnet;\n\n- (void)setInputAddress:(NSString *)address atIndex:(NSUInteger)index isTestnet:(BOOL)isTestnet;\n\n- (BOOL)signWithPrivateKeys:(NSArray *)privateKeys isTestnet:(BOOL)isTestnet;\n\n// priority = sum(input_amount_in_satoshis*input_age_in_blocks)/tx_size_in_bytes\n- (uint64_t)priorityForAmounts:(NSArray *)amounts withAges:(NSArray *)ages;\n\n// the block height after which the transaction can be confirmed without a fee, or TX_UNCONFIRMED for never\n- (uint32_t)blockHeightUntilFreeForAmounts:(NSArray *)amounts withBlockHeights:(NSArray *)heights;\n\n@end\n"
  },
  {
    "path": "ArcBit/External/BreadWalletClassesV0.5/BRTransaction.m",
    "content": "//\n//  BRTransaction.m\n//  BreadWallet\n//\n//  Created by Aaron Voisine on 5/16/13.\n//  Copyright (c) 2013 Aaron Voisine <voisine@gmail.com>\n//\n//  Permission is hereby granted, free of charge, to any person obtaining a copy\n//  of this software and associated documentation files (the \"Software\"), to deal\n//  in the Software without restriction, including without limitation the rights\n//  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n//  copies of the Software, and to permit persons to whom the Software is\n//  furnished to do so, subject to the following conditions:\n//\n//  The above copyright notice and this permission notice shall be included in\n//  all copies or substantial portions of the Software.\n//\n//  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n//  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n//  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n//  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n//  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n//  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n//  THE SOFTWARE.\n\n#import \"BRTransaction.h\"\n#import \"BRKey.h\"\n#import \"NSString+Base58.h\"\n#import \"NSMutableData+Bitcoin.h\"\n#import \"NSData+Bitcoin.h\"\n#import \"NSData+Hash.h\"\n\n#define TX_VERSION    0x00000001u\n#define TX_LOCKTIME   0x00000000u\n#define TXIN_SEQUENCE UINT32_MAX\n#define SIGHASH_ALL   0x00000001u\n\n@interface BRTransaction ()\n\n@property (nonatomic, strong) NSMutableArray *hashes, *indexes, *inScripts, *signatures, *sequences;\n@property (nonatomic, strong) NSMutableArray *amounts, *addresses, *outScripts;\n\n@end\n\n@implementation BRTransaction\n\n+ (instancetype)transactionWithMessage:(NSData *)message isTestnet:(BOOL)isTestnet\n{\n    return [[self alloc] initWithMessage:message isTestnet:isTestnet];\n}\n\n- (instancetype)init\n{\n    if (! (self = [super init])) return nil;\n    \n    _version = TX_VERSION;\n    self.hashes = [NSMutableArray array];\n    self.indexes = [NSMutableArray array];\n    self.inScripts = [NSMutableArray array];\n    self.amounts = [NSMutableArray array];\n    self.addresses = [NSMutableArray array];\n    self.outScripts = [NSMutableArray array];\n    self.signatures = [NSMutableArray array];\n    self.sequences = [NSMutableArray array];\n    _lockTime = TX_LOCKTIME;\n    _blockHeight = TX_UNCONFIRMED;\n    \n    return self;\n}\n\n- (instancetype)initWithMessage:(NSData *)message isTestnet:(BOOL)isTestnet\n{\n    if (! (self = [self init])) return nil;\n \n    NSString *address = nil;\n    NSUInteger l = 0, off = 0, count = 0;\n    NSData *d = nil;\n\n    _version = [message UInt32AtOffset:off]; // tx version\n    off += sizeof(uint32_t);\n    count = (NSUInteger)[message varIntAtOffset:off length:&l]; // input count\n    if (count == 0) return nil; // at least one input is required\n    off += l;\n\n    for (NSUInteger i = 0; i < count; i++) { // inputs\n        d = [message hashAtOffset:off]; // input tx hash\n        if (! d) return nil; // required\n        [self.hashes addObject:d];\n        off += CC_SHA256_DIGEST_LENGTH;\n        [self.indexes addObject:@([message UInt32AtOffset:off])]; // input index\n        off += sizeof(uint32_t);\n        [self.inScripts addObject:[NSNull null]]; // placeholder for input script (comes from previous transaction)\n        d = [message dataAtOffset:off length:&l];\n        [self.signatures addObject:(d.length > 0) ? d : [NSNull null]]; // input signature\n        off += l;\n        [self.sequences addObject:@([message UInt32AtOffset:off])]; // input sequence number (for replacement tx)\n        off += sizeof(uint32_t);\n    }\n\n    count = (NSUInteger)[message varIntAtOffset:off length:&l]; // output count\n    off += l;\n    \n    for (NSUInteger i = 0; i < count; i++) { // outputs\n        [self.amounts addObject:@([message UInt64AtOffset:off])]; // output amount\n        off += sizeof(uint64_t);\n        d = [message dataAtOffset:off length:&l];\n        [self.outScripts addObject:(d) ? d : [NSNull null]]; // output script\n        off += l;\n        address = [NSString addressWithScriptPubKey:d isTestnet:isTestnet]; // address from output script if applicable\n        [self.addresses addObject:(address) ? address : [NSNull null]];\n    }\n    \n    _lockTime = [message UInt32AtOffset:off]; // tx locktime\n    _txHash = self.data.SHA256_2;\n    \n    return self;\n}\n\n- (instancetype)initWithInputHashes:(NSArray *)hashes inputIndexes:(NSArray *)indexes inputScripts:(NSArray *)scripts\noutputAddresses:(NSArray *)addresses outputAmounts:(NSArray *)amounts isTestnet:(BOOL)isTestnet\n{\n    if (hashes.count == 0 || hashes.count != indexes.count) return nil;\n    if (scripts.count > 0 && hashes.count != scripts.count) return nil;\n    if (addresses.count != amounts.count) return nil;\n\n    if (! (self = [super init])) return nil;\n\n    _version = TX_VERSION;\n    self.hashes = [NSMutableArray arrayWithArray:hashes];\n    self.indexes = [NSMutableArray arrayWithArray:indexes];\n\n    if (scripts.count > 0) {\n        self.inScripts = [NSMutableArray arrayWithArray:scripts];\n    }\n    else self.inScripts = [NSMutableArray arrayWithCapacity:hashes.count];\n\n    while (self.inScripts.count < hashes.count) {\n        [self.inScripts addObject:[NSNull null]];\n    }\n\n    self.amounts = [NSMutableArray arrayWithArray:amounts];\n    self.addresses = [NSMutableArray arrayWithArray:addresses];\n    self.outScripts = [NSMutableArray arrayWithCapacity:addresses.count];\n\n    for (int i = 0; i < addresses.count; i++) {\n        [self.outScripts addObject:[NSMutableData data]];\n        [self.outScripts.lastObject appendScriptPubKeyForAddress:self.addresses[i] isTestnet:isTestnet];\n    }\n\n    self.signatures = [NSMutableArray arrayWithCapacity:hashes.count];\n    self.sequences = [NSMutableArray arrayWithCapacity:hashes.count];\n\n    for (int i = 0; i < hashes.count; i++) {\n        [self.signatures addObject:[NSNull null]];\n        [self.sequences addObject:@(TXIN_SEQUENCE)];\n    }\n\n    _lockTime = TX_LOCKTIME;\n    _blockHeight = TX_UNCONFIRMED;\n    \n    return self;\n}\n\n- (NSArray *)inputHashes\n{\n    return self.hashes;\n}\n\n- (NSArray *)inputIndexes\n{\n    return self.indexes;\n}\n\n- (NSArray *)inputScripts\n{\n    return self.inScripts;\n}\n\n- (NSArray *)inputSignatures\n{\n    return self.signatures;\n}\n\n- (NSArray *)inputSequences\n{\n    return self.sequences;\n}\n\n- (NSArray *)outputAmounts\n{\n    return self.amounts;\n}\n\n- (NSArray *)outputAddresses\n{\n    return self.addresses;\n}\n\n- (NSArray *)outputScripts\n{\n    return self.outScripts;\n}\n\n- (size_t)size\n{\n    //TODO: not all keys come from this wallet (private keys can be swept), might cause a lower than standard tx fee\n    size_t sigSize = 149; // electrum seeds generate uncompressed keys, bip32 uses compressed\n//    size_t sigSize = 181;\n    \n    return 8 + [NSMutableData sizeOfVarInt:self.hashes.count] + [NSMutableData sizeOfVarInt:self.addresses.count] +\n    sigSize*self.hashes.count + 34*self.addresses.count;\n}\n\n- (uint64_t)standardFee\n{\n    return ((self.size + 999)/1000)*TX_FEE_PER_KB;\n}\n\n// checks if all signatures exist, but does not verify them\n- (BOOL)isSigned\n{\n    return (self.signatures.count > 0 && self.signatures.count == self.hashes.count &&\n            ! [self.signatures containsObject:[NSNull null]]);\n}\n\n- (NSData *)toData\n{\n    return [self toDataWithSubscriptIndex:NSNotFound];\n}\n\n- (void)addInputHash:(NSData *)hash index:(NSUInteger)index script:(NSData *)script\n{\n    [self addInputHash:hash index:index script:script signature:nil sequence:TXIN_SEQUENCE];\n}\n\n- (void)addInputHash:(NSData *)hash index:(NSUInteger)index script:(NSData *)script signature:(NSData *)signature\nsequence:(uint32_t)sequence\n{\n    [self.hashes addObject:hash];\n    [self.indexes addObject:@(index)];\n    [self.inScripts addObject:(script) ? script : [NSNull null]];\n    [self.signatures addObject:(signature) ? signature : [NSNull null]];\n    [self.sequences addObject:@(sequence)];\n}\n\n- (void)addOutputAddress:(NSString *)address amount:(uint64_t)amount isTestnet:(BOOL)isTestnet\n{\n    [self.amounts addObject:@(amount)];\n    [self.addresses addObject:address];\n    [self.outScripts addObject:[NSMutableData data]];\n    [self.outScripts.lastObject appendScriptPubKeyForAddress:address isTestnet:isTestnet];\n}\n\n- (void)addOutputScript:(NSData *)script amount:(uint64_t)amount isTestnet:(BOOL)isTestnet;\n{\n    NSString *address = [NSString addressWithScriptPubKey:script isTestnet:isTestnet];\n\n    [self.amounts addObject:@(amount)];\n    [self.outScripts addObject:script];\n    [self.addresses addObject:(address) ? address : [NSNull null]];\n}\n\n- (void)insertOutputScript:(NSData *)script amount:(uint64_t)amount isTestnet:(BOOL)isTestnet {\n    NSString *address = [NSString addressWithScriptPubKey:script isTestnet:isTestnet];\n    \n    [self.amounts insertObject:@(amount) atIndex:0];\n    [self.outScripts insertObject:script atIndex: 0];\n    [self.addresses insertObject:(address) ? address : [NSNull null] atIndex: 0];\n}\n\n- (void)setInputAddress:(NSString *)address atIndex:(NSUInteger)index isTestnet:(BOOL)isTestnet;\n{\n    NSMutableData *d = [NSMutableData data];\n\n    [d appendScriptPubKeyForAddress:address isTestnet:isTestnet];\n    [self.inScripts replaceObjectAtIndex:index withObject:d];\n}\n\n- (NSArray *)getInputAddresses:(BOOL)isTestnet\n{\n    NSMutableArray *addresses = [NSMutableArray arrayWithCapacity:self.inScripts.count];\n    NSInteger i = 0;\n\n    for (NSData *script in self.inScripts) {\n        NSString *addr = [NSString addressWithScriptPubKey:script isTestnet:isTestnet];\n\n        if (! addr) addr = [NSString addressWithScriptSig:self.signatures[i] isTestnet:isTestnet];\n        [addresses addObject:(addr) ? addr : [NSNull null]];\n        i++;\n    }\n\n    return addresses;\n}\n\n// Returns the binary transaction data that needs to be hashed and signed with the private key for the tx input at\n// subscriptIndex. A subscriptIndex of NSNotFound will return the entire signed transaction\n- (NSData *)toDataWithSubscriptIndex:(NSUInteger)subscriptIndex\n{\n    NSMutableData *d = [NSMutableData dataWithCapacity:self.size];\n\n    [d appendUInt32:self.version];\n    [d appendVarInt:self.hashes.count];\n\n    for (NSUInteger i = 0; i < self.hashes.count; i++) {\n        [d appendData:self.hashes[i]];\n        [d appendUInt32:[self.indexes[i] unsignedIntValue]];\n\n        if (subscriptIndex == NSNotFound && self.signatures[i] != [NSNull null]) {\n            [d appendVarInt:[self.signatures[i] length]];\n            [d appendData:self.signatures[i]];\n        }\n        else if (subscriptIndex == i && self.inScripts[i] != [NSNull null]) {\n            //TODO: to fully match the reference implementation, OP_CODESEPARATOR related checksig logic should go here\n            [d appendVarInt:[self.inScripts[i] length]];\n            [d appendData:self.inScripts[i]];\n        }\n        else [d appendVarInt:0];\n        \n        [d appendUInt32:[self.sequences[i] unsignedIntValue]];\n    }\n    \n    [d appendVarInt:self.amounts.count];\n    \n    for (NSUInteger i = 0; i < self.amounts.count; i++) {\n        [d appendUInt64:[self.amounts[i] unsignedLongLongValue]];\n        [d appendVarInt:[self.outScripts[i] length]];\n        [d appendData:self.outScripts[i]];\n    }\n    \n    [d appendUInt32:self.lockTime];\n    \n    if (subscriptIndex != NSNotFound) {\n        [d appendUInt32:SIGHASH_ALL];\n    }\n    \n    return d;\n}\n\n- (BOOL)signWithPrivateKeys:(NSArray *)privateKeys isTestnet:(BOOL)isTestnet\n{\n    NSMutableArray *addresses = [NSMutableArray arrayWithCapacity:privateKeys.count],\n    *keys = [NSMutableArray arrayWithCapacity:privateKeys.count];\n    \n    for (NSString *pk in privateKeys) {\n        BRKey *key = [BRKey keyWithPrivateKey:pk isTestnet:isTestnet];\n        \n        if (! key) continue;\n        \n        [keys addObject:key];\n        [addresses addObject:key.address];\n    }\n    \n    for (NSUInteger i = 0; i < self.hashes.count; i++) {\n        NSString *addr = [NSString addressWithScriptPubKey:self.inScripts[i] isTestnet:isTestnet];\n        NSUInteger keyIdx = (addr) ? [addresses indexOfObject:addr] : NSNotFound;\n        \n        if (keyIdx == NSNotFound) continue;\n        \n        NSMutableData *sig = [NSMutableData data];\n        NSData *hash = [self toDataWithSubscriptIndex:i].SHA256_2;\n        NSMutableData *s = [NSMutableData dataWithData:[keys[keyIdx] sign:hash]];\n        NSArray *elem = [self.inScripts[i] scriptElements];\n        \n        [s appendUInt8:SIGHASH_ALL];\n        [sig appendScriptPushData:s];\n        \n        if (elem.count >= 2 && [elem[elem.count - 2] intValue] == OP_EQUALVERIFY) { // pay-to-pubkey-hash scriptSig\n            [sig appendScriptPushData:[keys[keyIdx] publicKey]];\n        }\n        \n        [self.signatures replaceObjectAtIndex:i withObject:sig];\n    }\n    \n    if (! [self isSigned]) return NO;\n    \n    _txHash = self.data.SHA256_2;\n    \n    return YES;\n}\n\n// priority = sum(input_amount_in_satoshis*input_age_in_blocks)/size_in_bytes\n- (uint64_t)priorityForAmounts:(NSArray *)amounts withAges:(NSArray *)ages\n{\n    uint64_t p = 0;\n    \n    if (amounts.count != self.hashes.count || ages.count != self.hashes.count || [ages containsObject:@(0)]) return 0;\n    \n    for (NSUInteger i = 0; i < amounts.count; i++) {    \n        p += [amounts[i] unsignedLongLongValue]*[ages[i] unsignedLongLongValue];\n    }\n    \n    return p/self.size;\n}\n\n// the block height after which the transaction can be confirmed without a fee, or TX_UNCONFIRMRED for never\n- (uint32_t)blockHeightUntilFreeForAmounts:(NSArray *)amounts withBlockHeights:(NSArray *)heights\n{\n    if (amounts.count != self.hashes.count || heights.count != self.hashes.count ||\n        self.size > TX_FREE_MAX_SIZE || [heights containsObject:@(TX_UNCONFIRMED)]) {\n        return TX_UNCONFIRMED;\n    }\n\n    for (NSNumber *amount in self.amounts) {\n        if (amount.unsignedLongLongValue < TX_MIN_OUTPUT_AMOUNT) return TX_UNCONFIRMED;\n    }\n\n    uint64_t amountTotal = 0, amountsByHeights = 0;\n    \n    for (NSUInteger i = 0; i < amounts.count; i++) {\n        amountTotal += [amounts[i] unsignedLongLongValue];\n        amountsByHeights += [amounts[i] unsignedLongLongValue]*[heights[i] unsignedLongLongValue];\n    }\n    \n    if (amountTotal == 0) return TX_UNCONFIRMED;\n    \n    // this could possibly overflow a uint64 for very large input amounts and far in the future block heights,\n    // however we should be okay up to the largest current bitcoin balance in existence for the next 40 years or so,\n    // and the worst case is paying a transaction fee when it's not needed\n    return (uint32_t)((TX_FREE_MIN_PRIORITY*(uint64_t)self.size + amountsByHeights + amountTotal - 1ULL)/amountTotal);\n}\n\n- (NSUInteger)hash\n{\n    if (self.txHash.length < sizeof(NSUInteger)) return [super hash];\n    return *(const NSUInteger *)self.txHash.bytes;\n}\n\n- (BOOL)isEqual:(id)object\n{\n    return self == object || ([object isKindOfClass:[BRTransaction class]] && [[object txHash] isEqual:self.txHash]);\n}\n\n@end\n"
  },
  {
    "path": "ArcBit/External/BreadWalletClassesV0.5/NSData+Bitcoin.h",
    "content": "//\n//  NSData+Bitcoin.h\n//  BreadWallet\n//\n//  Created by Aaron Voisine on 10/9/13.\n//  Copyright (c) 2013 Aaron Voisine <voisine@gmail.com>\n//\n//  Permission is hereby granted, free of charge, to any person obtaining a copy\n//  of this software and associated documentation files (the \"Software\"), to deal\n//  in the Software without restriction, including without limitation the rights\n//  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n//  copies of the Software, and to permit persons to whom the Software is\n//  furnished to do so, subject to the following conditions:\n//\n//  The above copyright notice and this permission notice shall be included in\n//  all copies or substantial portions of the Software.\n//\n//  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n//  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n//  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n//  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n//  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n//  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n//  THE SOFTWARE.\n\n#import <Foundation/Foundation.h>\n\n#define VAR_INT16_HEADER 0xfd\n#define VAR_INT32_HEADER 0xfe\n#define VAR_INT64_HEADER 0xff\n\n// bitcoin script opcodes: https://en.bitcoin.it/wiki/Script#Constants\n#define OP_PUSHDATA1   0x4c\n#define OP_PUSHDATA2   0x4d\n#define OP_PUSHDATA4   0x4e\n#define OP_DUP         0x76\n#define OP_EQUAL       0x87\n#define OP_EQUALVERIFY 0x88\n#define OP_HASH160     0xa9\n#define OP_CHECKSIG    0xac\n\n@interface NSData (Bitcoin)\n\n- (uint8_t)UInt8AtOffset:(NSUInteger)offset;\n- (uint16_t)UInt16AtOffset:(NSUInteger)offset;\n- (uint32_t)UInt32AtOffset:(NSUInteger)offset;\n- (uint64_t)UInt64AtOffset:(NSUInteger)offset;\n- (uint64_t)varIntAtOffset:(NSUInteger)offset length:(NSUInteger *)length;\n- (NSData *)hashAtOffset:(NSUInteger)offset;\n- (NSString *)stringAtOffset:(NSUInteger)offset length:(NSUInteger *)length;\n- (NSData *)dataAtOffset:(NSUInteger)offset length:(NSUInteger *)length;\n- (NSArray *)scriptElements; // an array of NSNumber and NSData objects representing each script element\n- (int)intValue; // returns the opcode used to store the receiver in a script (i.e. OP_PUSHDATA1)\n\n@end\n"
  },
  {
    "path": "ArcBit/External/BreadWalletClassesV0.5/NSData+Bitcoin.m",
    "content": "//\n//  NSData+Bitcoin.m\n//  BreadWallet\n//\n//  Created by Aaron Voisine on 10/9/13.\n//  Copyright (c) 2013 Aaron Voisine <voisine@gmail.com>\n//\n//  Permission is hereby granted, free of charge, to any person obtaining a copy\n//  of this software and associated documentation files (the \"Software\"), to deal\n//  in the Software without restriction, including without limitation the rights\n//  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n//  copies of the Software, and to permit persons to whom the Software is\n//  furnished to do so, subject to the following conditions:\n//\n//  The above copyright notice and this permission notice shall be included in\n//  all copies or substantial portions of the Software.\n//\n//  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n//  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n//  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n//  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n//  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n//  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n//  THE SOFTWARE.\n\n#import \"NSData+Bitcoin.h\"\n#import <CommonCrypto/CommonCrypto.h>\n\n@implementation NSData (Bitcoin)\n\n- (uint8_t)UInt8AtOffset:(NSUInteger)offset\n{\n    if (self.length < offset + sizeof(uint8_t)) return 0;\n    return *((const uint8_t *)self.bytes + offset);\n}\n\n- (uint16_t)UInt16AtOffset:(NSUInteger)offset\n{\n    if (self.length < offset + sizeof(uint16_t)) return 0;\n    return CFSwapInt16LittleToHost(*(const uint16_t *)((const uint8_t *)self.bytes + offset));\n}\n\n- (uint32_t)UInt32AtOffset:(NSUInteger)offset\n{\n    if (self.length < offset + sizeof(uint32_t)) return 0;\n    return CFSwapInt32LittleToHost(*(const uint32_t *)((const uint8_t *)self.bytes + offset));\n}\n\n- (uint64_t)UInt64AtOffset:(NSUInteger)offset\n{\n    if (self.length < offset + sizeof(uint64_t)) return 0;\n    return CFSwapInt64LittleToHost(*(const uint64_t *)((const uint8_t *)self.bytes + offset));\n}\n\n- (uint64_t)varIntAtOffset:(NSUInteger)offset length:(NSUInteger *)length\n{\n    uint8_t h = [self UInt8AtOffset:offset];\n\n    switch (h) {\n        case VAR_INT16_HEADER:\n            if (length) *length = sizeof(h) + sizeof(uint16_t);\n            return [self UInt16AtOffset:offset + 1];\n            \n        case VAR_INT32_HEADER:\n            if (length) *length = sizeof(h) + sizeof(uint32_t);\n            return [self UInt32AtOffset:offset + 1];\n            \n        case VAR_INT64_HEADER:\n            if (length) *length = sizeof(h) + sizeof(uint64_t);\n            return [self UInt64AtOffset:offset + 1];\n            \n        default:\n            if (length) *length = sizeof(h);\n            return h;\n    }\n}\n\n- (NSData *)hashAtOffset:(NSUInteger)offset\n{\n    if (self.length < offset + CC_SHA256_DIGEST_LENGTH) return nil;\n    return [self subdataWithRange:NSMakeRange(offset, CC_SHA256_DIGEST_LENGTH)];\n}\n\n- (NSString *)stringAtOffset:(NSUInteger)offset length:(NSUInteger *)length\n{\n    NSUInteger ll, l = (NSUInteger)[self varIntAtOffset:offset length:&ll];\n    \n    if (length) *length = ll + l;\n    if (ll == 0 || self.length < offset + ll + l) return nil;\n    return [[NSString alloc] initWithBytes:(const char *)self.bytes + offset + ll length:l\n            encoding:NSUTF8StringEncoding];\n}\n\n- (NSData *)dataAtOffset:(NSUInteger)offset length:(NSUInteger *)length\n{\n    NSUInteger ll, l = (NSUInteger)[self varIntAtOffset:offset length:&ll];\n    \n    if (length) *length = ll + l;\n    if (ll == 0 || self.length < offset + ll + l) return nil;\n    return [self subdataWithRange:NSMakeRange(offset + ll, l)];\n}\n\n// an array of NSNumber and NSData objects representing each script element\n- (NSArray *)scriptElements\n{\n    NSMutableArray *a = [NSMutableArray array];\n    const uint8_t *b = (const uint8_t *)self.bytes;\n    NSUInteger l, length = self.length;\n    \n    for (NSUInteger i = 0; i < length; i++) {\n        if (b[i] > OP_PUSHDATA4) {\n            [a addObject:@(b[i])];\n            continue;\n        }\n        \n        switch (b[i]) {\n            case 0:\n                [a addObject:@(0)];\n                continue;\n\n            case OP_PUSHDATA1:\n                i++;\n                if (i + sizeof(uint8_t) > length) return a;\n                l = b[i];\n                i += sizeof(uint8_t);\n                break;\n\n            case OP_PUSHDATA2:\n                i++;\n                if (i + sizeof(uint16_t) > length) return a;\n                l = CFSwapInt16LittleToHost(*(uint16_t *)&b[i]);\n                i += sizeof(uint16_t);\n                break;\n\n            case OP_PUSHDATA4:\n                i++;\n                if (i + sizeof(uint32_t) > length) return a;\n                l = CFSwapInt32LittleToHost(*(uint32_t *)&b[i]);\n                i += sizeof(uint32_t);\n                break;\n\n            default:\n                l = b[i];\n                i++;\n                break;\n        }\n        \n        if (i + l > length) return a;\n        [a addObject:[NSData dataWithBytes:&b[i] length:l]];\n        i += l - 1;\n    }\n    \n    return a;\n}\n\n// returns the opcode used to store the receiver in a script (i.e. OP_PUSHDATA1)\n- (int)intValue\n{\n    if (self.length < OP_PUSHDATA1) return (int)self.length;\n    else if (self.length <= UINT8_MAX) return OP_PUSHDATA1;\n    else if (self.length <= UINT16_MAX) return OP_PUSHDATA2;\n    else return OP_PUSHDATA4;\n}\n\n@end\n"
  },
  {
    "path": "ArcBit/External/BreadWalletClassesV0.5/NSData+Hash.h",
    "content": "//\n//  NSData+Hash.h\n//  BreadWallet\n//\n//  Created by Aaron Voisine on 5/13/13.\n//  Copyright (c) 2013 Aaron Voisine <voisine@gmail.com>\n//\n//  Permission is hereby granted, free of charge, to any person obtaining a copy\n//  of this software and associated documentation files (the \"Software\"), to deal\n//  in the Software without restriction, including without limitation the rights\n//  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n//  copies of the Software, and to permit persons to whom the Software is\n//  furnished to do so, subject to the following conditions:\n//\n//  The above copyright notice and this permission notice shall be included in\n//  all copies or substantial portions of the Software.\n//\n//  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n//  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n//  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n//  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n//  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n//  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n//  THE SOFTWARE.\n\n#import <Foundation/Foundation.h>\n#import <CommonCrypto/CommonDigest.h>\n\n@interface NSData (Hash)\n\n- (NSData *)SHA1;\n- (NSData *)SHA256;\n- (NSData *)SHA256_2;\n- (NSData *)RMD160;\n- (NSData *)hash160;\n- (NSData *)reverse;\n\n@end\n"
  },
  {
    "path": "ArcBit/External/BreadWalletClassesV0.5/NSData+Hash.m",
    "content": "//\n//  NSData+Hash.m\n//  BreadWallet\n//\n//  Created by Aaron Voisine on 5/13/13.\n//  Copyright (c) 2013 Aaron Voisine <voisine@gmail.com>\n//\n//  Permission is hereby granted, free of charge, to any person obtaining a copy\n//  of this software and associated documentation files (the \"Software\"), to deal\n//  in the Software without restriction, including without limitation the rights\n//  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n//  copies of the Software, and to permit persons to whom the Software is\n//  furnished to do so, subject to the following conditions:\n//\n//  The above copyright notice and this permission notice shall be included in\n//  all copies or substantial portions of the Software.\n//\n//  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n//  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n//  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n//  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n//  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n//  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n//  THE SOFTWARE.\n\n#import \"NSData+Hash.h\"\n#import <CommonCrypto/CommonDigest.h>\n#import <openssl/ripemd.h>\n\n@implementation NSData (Hash)\n\n- (NSData *)SHA1\n{\n    NSMutableData *d = [NSMutableData dataWithLength:CC_SHA1_DIGEST_LENGTH];\n\n    CC_SHA1(self.bytes, (CC_LONG)self.length, d.mutableBytes);\n\n    return d;\n}\n\n- (NSData *)SHA256\n{\n    NSMutableData *d = [NSMutableData dataWithLength:CC_SHA256_DIGEST_LENGTH];\n    \n    CC_SHA256(self.bytes, (CC_LONG)self.length, d.mutableBytes);\n    \n    return d;\n}\n\n- (NSData *)SHA256_2\n{\n    NSMutableData *d = [NSMutableData dataWithLength:CC_SHA256_DIGEST_LENGTH];\n    \n    CC_SHA256(self.bytes, (CC_LONG)self.length, d.mutableBytes);\n    CC_SHA256(d.bytes, (CC_LONG)d.length, d.mutableBytes);\n    \n    return d;\n}\n\n- (NSData *)RMD160\n{\n    NSMutableData *d = [NSMutableData dataWithLength:RIPEMD160_DIGEST_LENGTH];\n    \n    RIPEMD160(self.bytes, self.length, d.mutableBytes);\n    \n    return d;\n}\n\n- (NSData *)hash160\n{\n    return self.SHA256.RMD160;\n}\n\n- (NSData *)reverse\n{\n    NSUInteger l = self.length;\n    NSMutableData *d = [NSMutableData dataWithLength:l];\n    uint8_t *b1 = d.mutableBytes;\n    const uint8_t *b2 = self.bytes;\n    \n    for (NSUInteger i = 0; i < l; i++) {\n        b1[i] = b2[l - i - 1];\n    }\n    \n    return d;\n}\n\n@end\n"
  },
  {
    "path": "ArcBit/External/BreadWalletClassesV0.5/NSMutableData+Bitcoin.h",
    "content": "//\n//  NSMutableData+Bitcoin.h\n//  BreadWallet\n//\n//  Created by Aaron Voisine on 5/20/13.\n//  Copyright (c) 2013 Aaron Voisine <voisine@gmail.com>\n//\n//  Permission is hereby granted, free of charge, to any person obtaining a copy\n//  of this software and associated documentation files (the \"Software\"), to deal\n//  in the Software without restriction, including without limitation the rights\n//  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n//  copies of the Software, and to permit persons to whom the Software is\n//  furnished to do so, subject to the following conditions:\n//\n//  The above copyright notice and this permission notice shall be included in\n//  all copies or substantial portions of the Software.\n//\n//  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n//  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n//  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n//  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n//  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n//  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n//  THE SOFTWARE.\n\n#import <Foundation/Foundation.h>\n\n#if BITCOIN_TESTNET\n#define BITCOIN_MAGIC_NUMBER 0x0709110b\n#else\n#define BITCOIN_MAGIC_NUMBER 0xd9b4bef9\n#endif\n\n@interface NSMutableData (Bitcoin)\n\n+ (NSMutableData *)secureData;\n+ (NSMutableData *)secureDataWithLength:(NSUInteger)length;\n+ (NSMutableData *)secureDataWithCapacity:(NSUInteger)capacity;\n+ (NSMutableData *)secureDataWithData:(NSData *)data;\n\n+ (size_t)sizeOfVarInt:(uint64_t)i;\n\n- (void)appendUInt8:(uint8_t)i;\n- (void)appendUInt16:(uint16_t)i;\n- (void)appendUInt32:(uint32_t)i;\n- (void)appendUInt64:(uint64_t)i;\n- (void)appendVarInt:(uint64_t)i;\n- (void)appendString:(NSString *)s;\n\n- (void)appendScriptPubKeyForAddress:(NSString *)address isTestnet:(BOOL)isTestnet;\n- (void)appendScriptPushData:(NSData *)d;\n\n- (void)appendMessage:(NSData *)message type:(NSString *)type isTestnet:(BOOL)isTestnet;\n- (void)appendNullPaddedString:(NSString *)s length:(NSUInteger)length;\n- (void)appendNetAddress:(uint32_t)address port:(uint16_t)port services:(uint64_t)services;\n\n@end\n"
  },
  {
    "path": "ArcBit/External/BreadWalletClassesV0.5/NSMutableData+Bitcoin.m",
    "content": "//\n//  NSMutableData+Bitcoin.m\n//  BreadWallet\n//\n//  Created by Aaron Voisine on 5/20/13.\n//  Copyright (c) 2013 Aaron Voisine <voisine@gmail.com>\n//\n//  Permission is hereby granted, free of charge, to any person obtaining a copy\n//  of this software and associated documentation files (the \"Software\"), to deal\n//  in the Software without restriction, including without limitation the rights\n//  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n//  copies of the Software, and to permit persons to whom the Software is\n//  furnished to do so, subject to the following conditions:\n//\n//  The above copyright notice and this permission notice shall be included in\n//  all copies or substantial portions of the Software.\n//\n//  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n//  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n//  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n//  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n//  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n//  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n//  THE SOFTWARE.\n\n#import \"NSMutableData+Bitcoin.h\"\n#import \"NSData+Bitcoin.h\"\n#import \"NSString+Base58.h\"\n#import \"NSData+Hash.h\"\n\n@implementation NSMutableData (Bitcoin)\n\n+ (NSMutableData *)secureData\n{\n    return [self secureDataWithCapacity:0];\n}\n\n+ (NSMutableData *)secureDataWithCapacity:(NSUInteger)aNumItems\n{\n    return CFBridgingRelease(CFDataCreateMutable(SecureAllocator(), aNumItems));\n}\n\n+ (NSMutableData *)secureDataWithLength:(NSUInteger)length\n{\n    NSMutableData *d = [self secureDataWithCapacity:length];\n\n    d.length = length;\n    return d;\n}\n\n+ (NSMutableData *)secureDataWithData:(NSData *)data\n{\n    return CFBridgingRelease(CFDataCreateMutableCopy(SecureAllocator(), 0, (__bridge CFDataRef)data));\n}\n\n+ (size_t)sizeOfVarInt:(uint64_t)i\n{\n    if (i < VAR_INT16_HEADER) return sizeof(uint8_t);\n    else if (i <= UINT16_MAX) return sizeof(uint8_t) + sizeof(uint16_t);\n    else if (i <= UINT32_MAX) return sizeof(uint8_t) + sizeof(uint32_t);\n    else return sizeof(uint8_t) + sizeof(uint64_t);\n}\n\n- (void)appendUInt8:(uint8_t)i\n{\n    [self appendBytes:&i length:sizeof(i)];\n}\n\n- (void)appendUInt16:(uint16_t)i\n{\n    i = CFSwapInt16HostToLittle(i);\n    [self appendBytes:&i length:sizeof(i)];\n}\n\n- (void)appendUInt32:(uint32_t)i\n{\n    i = CFSwapInt32HostToLittle(i);\n    [self appendBytes:&i length:sizeof(i)];\n}\n\n- (void)appendUInt64:(uint64_t)i\n{\n    i = CFSwapInt64HostToLittle(i);\n    [self appendBytes:&i length:sizeof(i)];\n}\n\n- (void)appendVarInt:(uint64_t)i\n{\n    if (i < VAR_INT16_HEADER) {\n        uint8_t payload = (uint8_t)i;\n        \n        [self appendBytes:&payload length:sizeof(payload)];\n    }\n    else if (i <= UINT16_MAX) {\n        uint8_t header = VAR_INT16_HEADER;\n        uint16_t payload = CFSwapInt16HostToLittle((uint16_t)i);\n        \n        [self appendBytes:&header length:sizeof(header)];\n        [self appendBytes:&payload length:sizeof(payload)];\n    }\n    else if (i <= UINT32_MAX) {\n        uint8_t header = VAR_INT32_HEADER;\n        uint32_t payload = CFSwapInt32HostToLittle((uint32_t)i);\n        \n        [self appendBytes:&header length:sizeof(header)];\n        [self appendBytes:&payload length:sizeof(payload)];\n    }\n    else {\n        uint8_t header = VAR_INT64_HEADER;\n        uint64_t payload = CFSwapInt64HostToLittle(i);\n        \n        [self appendBytes:&header length:sizeof(header)];\n        [self appendBytes:&payload length:sizeof(payload)];\n    }\n}\n\n- (void)appendString:(NSString *)s\n{\n    NSUInteger l = [s lengthOfBytesUsingEncoding:NSUTF8StringEncoding];\n\n    [self appendVarInt:l];\n    [self appendBytes:s.UTF8String length:l];\n}\n\n#pragma mark - bitcoin script\n\n- (void)appendScriptPushData:(NSData *)d\n{\n    if (d.length == 0) {\n        return;\n    }\n    else if (d.length < OP_PUSHDATA1) {\n        [self appendUInt8:d.length];\n    }\n    else if (d.length < UINT8_MAX) {\n        [self appendUInt8:OP_PUSHDATA1];\n        [self appendUInt8:d.length];\n    }\n    else if (d.length < UINT16_MAX) {\n        [self appendUInt8:OP_PUSHDATA2];\n        [self appendUInt16:d.length];\n    }\n    else {\n        [self appendUInt8:OP_PUSHDATA4];\n        [self appendUInt32:(uint32_t)d.length];\n    }\n\n    [self appendData:d];\n}\n\n- (void)appendScriptPubKeyForAddress:(NSString *)address isTestnet:(BOOL)isTestnet\n{\n    static uint8_t pubkeyAddress = BITCOIN_PUBKEY_ADDRESS, scriptAddress = BITCOIN_SCRIPT_ADDRESS;\n    NSData *d = address.base58checkToData;\n\n    if (d.length != 21) return;\n\n    uint8_t version = *(const uint8_t *)d.bytes;\n    NSData *hash = [d subdataWithRange:NSMakeRange(1, d.length - 1)];\n\n    if (isTestnet) {\n        pubkeyAddress = BITCOIN_PUBKEY_ADDRESS_TEST;\n        scriptAddress = BITCOIN_SCRIPT_ADDRESS_TEST;\n    }\n\n    if (version == pubkeyAddress) {\n        [self appendUInt8:OP_DUP];\n        [self appendUInt8:OP_HASH160];\n        [self appendScriptPushData:hash];\n        [self appendUInt8:OP_EQUALVERIFY];\n        [self appendUInt8:OP_CHECKSIG];\n    }\n    else if (version == scriptAddress) {\n        [self appendUInt8:OP_HASH160];\n        [self appendScriptPushData:hash];\n        [self appendUInt8:OP_EQUAL];\n    }\n}\n\n#pragma mark - bitcoin protocol\n\n- (void)appendMessage:(NSData *)message type:(NSString *)type isTestnet:(BOOL)isTestnet;\n{\n    if (isTestnet) {\n        [self appendUInt32:0x0709110b]; //BITCOIN_MAGIC_NUMBER\n    } else {\n        [self appendUInt32:0xd9b4bef9]; //BITCOIN_MAGIC_NUMBER\n    }\n    [self appendNullPaddedString:type length:12];\n    [self appendUInt32:(uint32_t)message.length];\n    [self appendBytes:message.SHA256_2.bytes length:4];\n    [self appendBytes:message.bytes length:message.length];\n}\n\n- (void)appendNullPaddedString:(NSString *)s length:(NSUInteger)length\n{\n    NSUInteger l = [s lengthOfBytesUsingEncoding:NSUTF8StringEncoding];\n\n    [self appendBytes:s.UTF8String length:l];\n\n    while (l++ < length) {\n        [self appendBytes:\"\\0\" length:1];\n    }\n}\n\n- (void)appendNetAddress:(uint32_t)address port:(uint16_t)port services:(uint64_t)services\n{\n    address = CFSwapInt32HostToBig(address);\n    port = CFSwapInt16HostToBig(port);\n    \n    [self appendUInt64:services];\n    [self appendBytes:\"\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\xFF\\xFF\" length:12]; // IPv4 mapped IPv6 header\n    [self appendBytes:&address length:sizeof(address)];\n    [self appendBytes:&port length:sizeof(port)];\n}\n\n@end\n"
  },
  {
    "path": "ArcBit/External/BreadWalletClassesV0.5/NSString+Base58.h",
    "content": "//\n//  NSString+Base58.h\n//  BreadWallet\n//\n//  Created by Aaron Voisine on 5/13/13.\n//  Copyright (c) 2013 Aaron Voisine <voisine@gmail.com>\n//\n//  Permission is hereby granted, free of charge, to any person obtaining a copy\n//  of this software and associated documentation files (the \"Software\"), to deal\n//  in the Software without restriction, including without limitation the rights\n//  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n//  copies of the Software, and to permit persons to whom the Software is\n//  furnished to do so, subject to the following conditions:\n//\n//  The above copyright notice and this permission notice shall be included in\n//  all copies or substantial portions of the Software.\n//\n//  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n//  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n//  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n//  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n//  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n//  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n//  THE SOFTWARE.\n\n#import <Foundation/Foundation.h>\n\n#define BITCOIN_PUBKEY_ADDRESS      0\n#define BITCOIN_SCRIPT_ADDRESS      5\n#define BITCOIN_PUBKEY_ADDRESS_TEST 111\n#define BITCOIN_SCRIPT_ADDRESS_TEST 196\n#define BITCOIN_PRIVKEY             128\n#define BITCOIN_PRIVKEY_TEST        239\n\n#define BIP38_NOEC_PREFIX      0x0142\n#define BIP38_EC_PREFIX        0x0143\n#define BIP38_NOEC_FLAG        (0x80 | 0x40)\n#define BIP38_COMPRESSED_FLAG  0x20\n#define BIP38_LOTSEQUENCE_FLAG 0x04\n#define BIP38_INVALID_FLAG     (0x10 | 0x08 | 0x02 | 0x01)\n\nCFAllocatorRef SecureAllocator();\n\n@interface NSString (Base58)\n\n+ (NSString *)base58WithData:(NSData *)d;\n+ (NSString *)base58checkWithData:(NSData *)d;\n+ (NSString *)hexWithData:(NSData *)d;\n+ (NSString *)addressWithScriptPubKey:(NSData *)script isTestnet:(BOOL)isTestnet;\n+ (NSString *)addressWithScriptSig:(NSData *)script isTestnet:(BOOL)isTestnet;\n\n- (NSData *)base58ToData;\n- (NSString *)hexToBase58;\n- (NSString *)base58ToHex;\n\n- (NSData *)base58checkToData;\n- (NSString *)hexToBase58check;\n- (NSString *)base58checkToHex;\n\n- (NSData *)hexToData;\n- (NSData *)addressToHash160;\n\n- (BOOL)isValidBitcoinAddress:(BOOL)isTestnet;\n- (BOOL)isValidBitcoinPrivateKey:(BOOL)isTestnet;\n- (BOOL)isValidBitcoinBIP38Key; // BIP38 encrypted keys: https://github.com/bitcoin/bips/blob/master/bip-0038.mediawiki\n\n@end\n"
  },
  {
    "path": "ArcBit/External/BreadWalletClassesV0.5/NSString+Base58.m",
    "content": "//\n//  NSString+Base58.mm\n//  BreadWallet\n//\n//  Created by Aaron Voisine on 5/13/13.\n//  Copyright (c) 2013 Aaron Voisine <voisine@gmail.com>\n//\n//  Permission is hereby granted, free of charge, to any person obtaining a copy\n//  of this software and associated documentation files (the \"Software\"), to deal\n//  in the Software without restriction, including without limitation the rights\n//  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n//  copies of the Software, and to permit persons to whom the Software is\n//  furnished to do so, subject to the following conditions:\n//\n//  The above copyright notice and this permission notice shall be included in\n//  all copies or substantial portions of the Software.\n//\n//  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n//  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n//  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n//  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n//  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n//  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n//  THE SOFTWARE.\n\n#import \"NSString+Base58.h\"\n#import \"NSData+Hash.h\"\n#import \"NSData+Bitcoin.h\"\n#import \"NSMutableData+Bitcoin.h\"\n#import \"ccMemory.h\"\n#import <openssl/bn.h>\n\nstatic const char base58chars[] = \"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz\";\n\nstatic void *secureAllocate(CFIndex allocSize, CFOptionFlags hint, void *info)\n{\n    void *ptr = CC_XMALLOC(sizeof(CFIndex) + allocSize);\n    \n    if (ptr) { // we need to keep track of the size of the allocation so it can be cleansed before deallocation\n        *(CFIndex *)ptr = allocSize;\n        return (CFIndex *)ptr + 1;\n    }\n    else return NULL;\n}\n\nstatic void secureDeallocate(void *ptr, void *info)\n{\n    CFIndex size = *((CFIndex *)ptr - 1);\n\n    if (size) {\n        CC_XZEROMEM(ptr, size);\n        CC_XFREE((CFIndex *)ptr - 1, sizeof(CFIndex) + size);\n    }\n}\n\nstatic void *secureReallocate(void *ptr, CFIndex newsize, CFOptionFlags hint, void *info)\n{\n    // There's no way to tell ahead of time if the original memory will be deallocted even if the new size is smaller\n    // than the old size, so just cleanse and deallocate every time.\n    void *newptr = secureAllocate(newsize, hint, info);\n    CFIndex size = *((CFIndex *)ptr - 1);\n\n    if (newptr && size) {\n        CC_XMEMCPY(newptr, ptr, (size < newsize) ? size : newsize);\n        secureDeallocate(ptr, info);\n    }\n\n    return newptr;\n}\n\n// Since iOS does not page memory to storage, all we need to do is cleanse allocated memory prior to deallocation.\nCFAllocatorRef SecureAllocator()\n{\n    static CFAllocatorRef alloc = NULL;\n    static dispatch_once_t onceToken = 0;\n    \n    dispatch_once(&onceToken, ^{\n        CFAllocatorContext context;\n        \n        context.version = 0;\n        CFAllocatorGetContext(kCFAllocatorDefault, &context);\n        context.allocate = secureAllocate;\n        context.reallocate = secureReallocate;\n        context.deallocate = secureDeallocate;\n        \n        alloc = CFAllocatorCreate(kCFAllocatorDefault, &context);\n    });\n    \n    return alloc;\n}\n\n@implementation NSString (Base58)\n\n+ (NSString *)base58WithData:(NSData *)d\n{\n    BN_CTX *ctx = BN_CTX_new();\n\n    BN_CTX_start(ctx);\n\n    NSUInteger i = d.length*138/100 + 2;\n    char s[i];\n    BIGNUM *base = BN_CTX_get(ctx), *x = BN_CTX_get(ctx), *r = BN_CTX_get(ctx);\n\n    BN_set_word(base, 58);\n    BN_bin2bn(d.bytes, (int)d.length, x);\n    s[--i] = '\\0';\n\n    while (! BN_is_zero(x)) {\n        BN_div(x, r, x, base, ctx);\n        s[--i] = base58chars[BN_get_word(r)];\n    }\n    \n    for (NSUInteger j = 0; j < d.length && *((const uint8_t *)d.bytes + j) == 0; j++) {\n        s[--i] = base58chars[0];\n    }\n\n    BN_CTX_end(ctx);\n    BN_CTX_free(ctx);\n    \n    NSString *ret = CFBridgingRelease(CFStringCreateWithCString(SecureAllocator(), &s[i], kCFStringEncodingUTF8));\n    \n    CC_XZEROMEM(&s[0], d.length*138/100 + 2);\n    return ret;\n}\n\n+ (NSString *)base58checkWithData:(NSData *)d\n{\n    NSMutableData *data = [NSMutableData secureDataWithData:d];\n\n    [data appendBytes:d.SHA256_2.bytes length:4];\n    \n    return [self base58WithData:data];\n}\n\n- (NSData *)base58ToData\n{\n    BN_CTX *ctx = BN_CTX_new();\n\n    BN_CTX_start(ctx);\n\n    NSMutableData *d = [NSMutableData secureDataWithCapacity:self.length + 1];\n    unsigned int b;\n    BIGNUM *base = BN_CTX_get(ctx), *x = BN_CTX_get(ctx), *y = BN_CTX_get(ctx);\n\n    BN_set_word(base, 58);\n    BN_zero(x);\n    \n    for (NSUInteger i = 0; i < self.length && [self characterAtIndex:i] == base58chars[0]; i++) {\n        [d appendBytes:\"\\0\" length:1];\n    }\n        \n    for (NSUInteger i = 0; i < self.length; i++) {\n        b = [self characterAtIndex:i];\n\n        switch (b) {\n            case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9':\n                b -= '1';\n                break;\n            case 'A': case 'B': case 'C': case 'D': case 'E': case 'F': case 'G': case 'H':\n                b += 9 - 'A';\n                break;\n            case 'J': case 'K': case 'L': case 'M': case 'N':\n                b += 17 - 'J';\n                break;\n            case 'P': case 'Q': case 'R': case 'S': case 'T': case 'U': case 'V': case 'W': case 'X': case 'Y':\n            case 'Z':\n                b += 22 - 'P';\n                break;\n            case 'a': case 'b': case 'c': case 'd': case 'e': case 'f': case 'g': case 'h': case 'i': case 'j':\n            case 'k':\n                b += 33 - 'a';\n                break;\n            case 'm': case 'n': case 'o': case 'p': case 'q': case 'r': case 's': case 't': case 'u': case 'v':\n            case 'w': case 'x': case 'y': case 'z':\n                b += 44 - 'm';\n                break;\n            case ' ':\n                continue;\n            default:\n                goto breakout;\n        }\n        \n        BN_mul(x, x, base, ctx);\n        BN_set_word(y, b);\n        BN_add(x, x, y);\n    }\n    \nbreakout:\n    d.length += BN_num_bytes(x);\n    BN_bn2bin(x, (unsigned char *)d.mutableBytes + d.length - BN_num_bytes(x));\n\n    CC_XZEROMEM(&b, sizeof(b));\n    BN_CTX_end(ctx);\n    BN_CTX_free(ctx);\n    \n    return d;\n}\n\n+ (NSString *)hexWithData:(NSData *)d\n{\n    const uint8_t *bytes = d.bytes;\n    NSMutableString *hex = CFBridgingRelease(CFStringCreateMutable(SecureAllocator(), d.length*2));\n    \n    for (NSUInteger i = 0; i < d.length; i++) {\n        [hex appendFormat:@\"%02x\", bytes[i]];\n    }\n    \n    return hex;\n}\n\n// NOTE: It's important here to be permissive with scriptSig (spends) and strict with scriptPubKey (receives). If we\n// miss a receive transaction, only that transaction's funds are missed, however if we accept a receive transaction that\n// we are unable to correctly sign later, then the entire wallet balance after that point would become stuck with the\n// current coin selection code\n+ (NSString *)addressWithScriptPubKey:(NSData *)script isTestnet:(BOOL)isTestnet\n{\n    if (script == (id)[NSNull null]) return nil;\n\n    NSArray *elem = [script scriptElements];\n    NSUInteger l = elem.count;\n    NSMutableData *d = [NSMutableData data];\n    uint8_t v = BITCOIN_PUBKEY_ADDRESS;\n\n    if (isTestnet) {\n        v = BITCOIN_PUBKEY_ADDRESS_TEST;\n    }\n\n    if (l == 5 && [elem[0] intValue] == OP_DUP && [elem[1] intValue] == OP_HASH160 && [elem[2] intValue] == 20 &&\n        [elem[3] intValue] == OP_EQUALVERIFY && [elem[4] intValue] == OP_CHECKSIG) {\n        // pay-to-pubkey-hash scriptPubKey\n        [d appendBytes:&v length:1];\n        [d appendData:elem[2]];\n    }\n    else if (l == 3 && [elem[0] intValue] == OP_HASH160 && [elem[1] intValue] == 20 && [elem[2] intValue] == OP_EQUAL) {\n        // pay-to-script-hash scriptPubKey\n        v = BITCOIN_SCRIPT_ADDRESS;\n        if (isTestnet) {\n            v = BITCOIN_SCRIPT_ADDRESS_TEST;\n        }\n        [d appendBytes:&v length:1];\n        [d appendData:elem[1]];\n    }\n    else if (l == 2 && ([elem[0] intValue] == 65 || [elem[0] intValue] == 33) && [elem[1] intValue] == OP_CHECKSIG) {\n        // pay-to-pubkey scriptPubKey\n        [d appendBytes:&v length:1];\n        [d appendData:[elem[0] hash160]];\n    }\n    else return nil; // unknown script type\n\n    return [self base58checkWithData:d];\n}\n\n+ (NSString *)addressWithScriptSig:(NSData *)script isTestnet:(BOOL)isTestnet\n{\n    if (script == (id)[NSNull null]) return nil;\n\n    NSArray *elem = [script scriptElements];\n    NSUInteger l = elem.count;\n    NSMutableData *d = [NSMutableData data];\n    uint8_t v = BITCOIN_PUBKEY_ADDRESS;\n\n    if (isTestnet) {\n        v = BITCOIN_PUBKEY_ADDRESS_TEST;\n    }\n    \n    if (l >= 2 && [elem[l - 2] intValue] <= OP_PUSHDATA4 && [elem[l - 2] intValue] > 0 &&\n        ([elem[l - 1] intValue] == 65 || [elem[l - 1] intValue] == 33)) { // pay-to-pubkey-hash scriptSig\n        [d appendBytes:&v length:1];\n        [d appendData:[elem[l - 1] hash160]];\n    }\n    else if (l >= 2 && [elem[l - 2] intValue] <= OP_PUSHDATA4 && [elem[l - 2] intValue] > 0 &&\n             [elem[l - 1] intValue] <= OP_PUSHDATA4 && [elem[l - 1] intValue] > 0) { // pay-to-script-hash scriptSig\n        v = BITCOIN_SCRIPT_ADDRESS;\n        if (isTestnet) {\n            v = BITCOIN_SCRIPT_ADDRESS_TEST;\n        }\n        [d appendBytes:&v length:1];\n        [d appendData:[elem[l - 1] hash160]];\n    }\n    else if (l >= 1 && [elem[l - 1] intValue] <= OP_PUSHDATA4 && [elem[l - 1] intValue] > 0) {// pay-to-pubkey scriptSig\n        //TODO: implement Peter Wullie's pubKey recovery from signature\n        return nil;\n    }\n    else return nil; // unknown script type\n    \n    return [self base58checkWithData:d];\n}\n\n- (NSString *)hexToBase58\n{\n    return [[self class] base58WithData:self.hexToData];\n}\n\n- (NSString *)base58ToHex\n{\n    return [NSString hexWithData:self.base58ToData];\n}\n\n- (NSData *)base58checkToData\n{\n    NSData *d = self.base58ToData;\n    \n    if (d.length < 4) return nil;\n\n    NSData *data = CFBridgingRelease(CFDataCreate(SecureAllocator(), d.bytes, d.length - 4));\n\n    // verify checksum\n    if (*(uint32_t *)((const uint8_t *)d.bytes + d.length - 4) != *(uint32_t *)data.SHA256_2.bytes) return nil;\n    \n    return data;\n}\n\n- (NSString *)hexToBase58check\n{\n    return [NSString base58checkWithData:self.hexToData];\n}\n\n- (NSString *)base58checkToHex\n{\n    return [NSString hexWithData:self.base58checkToData];\n}\n\n- (NSData *)hexToData\n{\n    if (self.length % 2) return nil;\n    \n    NSMutableData *d = [NSMutableData secureDataWithCapacity:self.length/2];\n    uint8_t b = 0;\n    \n    for (NSUInteger i = 0; i < self.length; i++) {\n        unichar c = [self characterAtIndex:i];\n        \n        switch (c) {\n            case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9':\n                b += c - '0';\n                break;\n            case 'A': case 'B': case 'C': case 'D': case 'E': case 'F':\n                b += c + 10 - 'A';\n                break;\n            case 'a': case 'b': case 'c': case 'd': case 'e': case 'f':\n                b += c + 10 - 'a';\n                break;\n            default:\n                return d;\n        }\n        \n        if (i % 2) {\n            [d appendBytes:&b length:1];\n            b = 0;\n        }\n        else b *= 16;\n    }\n    \n    return d;\n}\n\n- (NSData *)addressToHash160\n{\n    NSData *d = self.base58checkToData;\n\n    return (d.length == 160/8 + 1) ? [d subdataWithRange:NSMakeRange(1, d.length - 1)] : nil;\n}\n\n- (BOOL)isValidBitcoinAddress:(BOOL)isTestnet\n{\n    NSData *d = self.base58checkToData;\n    \n    if (d.length != 21) return NO;\n    \n    uint8_t version = *(const uint8_t *)d.bytes;\n        \n    if (isTestnet) {\n        return (version == BITCOIN_PUBKEY_ADDRESS_TEST || version == BITCOIN_SCRIPT_ADDRESS_TEST) ? YES : NO;\n    }\n    \n    return (version == BITCOIN_PUBKEY_ADDRESS || version == BITCOIN_SCRIPT_ADDRESS) ? YES : NO;\n}\n\n- (BOOL)isValidBitcoinPrivateKey:(BOOL)isTestnet\n{\n    NSData *d = self.base58checkToData;\n    \n    if (d.length == 33 || d.length == 34) { // wallet import format: https://en.bitcoin.it/wiki/Wallet_import_format\n        if (isTestnet) {\n            return (*(const uint8_t *)d.bytes == BITCOIN_PRIVKEY_TEST) ? YES : NO;\n        } else {\n            return (*(const uint8_t *)d.bytes == BITCOIN_PRIVKEY) ? YES : NO;\n        }\n    }\n    else if ((self.length == 30 || self.length == 22) && [self characterAtIndex:0] == 'S') { // mini private key format\n        NSMutableData *d = [NSMutableData secureDataWithCapacity:self.length + 1];\n\n        d.length = self.length;\n        [self getBytes:d.mutableBytes maxLength:d.length usedLength:NULL encoding:NSUTF8StringEncoding options:0\n         range:NSMakeRange(0, self.length) remainingRange:NULL];\n        [d appendBytes:\"?\" length:1];\n        return (*(const uint8_t *)d.SHA256.bytes == 0) ? YES : NO;\n    }\n    else return (self.hexToData.length == 32) ? YES : NO; // hex encoded key\n}\n\n// BIP38 encrypted keys: https://github.com/bitcoin/bips/blob/master/bip-0038.mediawiki\n- (BOOL)isValidBitcoinBIP38Key\n{\n    NSData *d = self.base58checkToData;\n\n    if (d.length != 39) return NO; // invalid length\n\n    uint16_t prefix = CFSwapInt16BigToHost(*(const uint16_t *)d.bytes);\n    uint8_t flag = ((const uint8_t *)d.bytes)[2];\n\n    if (prefix == BIP38_NOEC_PREFIX) { // non EC multiplied key\n        return ((flag & BIP38_NOEC_FLAG) == BIP38_NOEC_FLAG && (flag & BIP38_LOTSEQUENCE_FLAG) == 0 &&\n                (flag & BIP38_INVALID_FLAG) == 0) ? YES : NO;\n    }\n    else if (prefix == BIP38_EC_PREFIX) { // EC multiplied key\n        return ((flag & BIP38_NOEC_FLAG) == 0 && (flag & BIP38_INVALID_FLAG) == 0) ? YES : NO;\n    }\n    else return NO; // invalid prefix\n}\n\n@end\n"
  },
  {
    "path": "ArcBit/External/BreadWalletClassesV0.5/ccMemory.h",
    "content": "/*                                                                              \n * Copyright (c) 2010 Apple Inc. All Rights Reserved.\n * \n * @APPLE_LICENSE_HEADER_START@\n * \n * This file contains Original Code and/or Modifications of Original Code\n * as defined in and that are subject to the Apple Public Source License\n * Version 2.0 (the 'License'). You may not use this file except in\n * compliance with the License. Please obtain a copy of the License at\n * http://www.opensource.apple.com/apsl/ and read it before using this\n * file.\n * \n * The Original Code and all software distributed under the License are\n * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER\n * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\n * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.\n * Please see the License for the specific language governing rights and\n * limitations under the License.\n * \n * @APPLE_LICENSE_HEADER_END@\n */\n\n/*\n *  ccMemory.h\n *  CommonCrypto\n */\n\n#ifndef CCMEMORY_H\n#define CCMEMORY_H\n\n#ifdef KERNEL\n#define\tCC_XMALLOC(s)  OSMalloc((s), CC_OSMallocTag)\n#define\tCC_XFREE(p, s) OSFree((p), (s), CC_OSMallocTag)\n#else /* KERNEL */\n#include <stdlib.h>\n#include <string.h>\n\n#define CC_XMALLOC(s)  malloc(s)\n#define CC_XCALLOC(c, s) calloc((c), (s))\n#define CC_XREALLOC(p, s) realloc((p), (s))\n#define CC_XFREE(p, s)    free(p)\n#define CC_XMEMCPY(s1, s2, n) memcpy((s1), (s2), (n))\n#define CC_XMEMCMP(s1, s2, n) memcmp((s1), (s2), (n))\n#define CC_XMEMSET(s1, s2, n) memset((s1), (s2), (n))\n#define CC_XZEROMEM(p, n)\tmemset((p), 0, (n))\n#define CC_XSTRCMP(s1, s2) strcmp((s1), (s2))\n#define CC_XSTORE32H(x, y) do {\t\t\t\t\t\t\\\n(y)[0] = (unsigned char)(((x)>>24)&255);\t\t\t\\\n(y)[1] = (unsigned char)(((x)>>16)&255);\t\t\t\\\n(y)[2] = (unsigned char)(((x)>>8)&255);\t\t\t\t\\\n(y)[3] = (unsigned char)((x)&255);\t\t\t\t\\\n} while(0)\n#define CC_XSTORE64H(x, y)                                                                     \\\n{ (y)[0] = (unsigned char)(((x)>>56)&255); (y)[1] = (unsigned char)(((x)>>48)&255);     \\\n(y)[2] = (unsigned char)(((x)>>40)&255); (y)[3] = (unsigned char)(((x)>>32)&255);     \\\n(y)[4] = (unsigned char)(((x)>>24)&255); (y)[5] = (unsigned char)(((x)>>16)&255);     \\\n(y)[6] = (unsigned char)(((x)>>8)&255); (y)[7] = (unsigned char)((x)&255); }\n\n\n\n#define CC_XQSORT(base, nelement, width, comparfunc) qsort((base), (nelement), (width), (comparfunc))\n\n#define CC_XALIGNED(PTR,NBYTE) (!(((size_t)(PTR))%(NBYTE)))\n\n#define CC_XMIN(X,Y) (((X) < (Y)) ? (X): (Y))\n#endif\n\n\n\n\n#endif /* CCMEMORY_H */\n"
  },
  {
    "path": "ArcBit/External/CustomIOS7AlertView/CustomIOS7AlertView.h",
    "content": "//\n//  CustomIOS7AlertView.h\n//  CustomIOS7AlertView\n//\n//  Created by Richard on 20/09/2013.\n//  Copyright (c) 2013 Wimagguc.\n//\n//  Lincesed under The MIT License (MIT)\n//  http://opensource.org/licenses/MIT\n//\n\n#import <UIKit/UIKit.h>\n\n@class CustomIOS7AlertView;\n@protocol CustomIOS7AlertViewDelegate\n\n- (void)customIOS7dialogButtonTouchUpInside:(CustomIOS7AlertView*)alertView clickedButtonAtIndex:(NSInteger)buttonIndex;\n\n@end\n\n@interface CustomIOS7AlertView : UIView<CustomIOS7AlertViewDelegate>\n\n@property (nonatomic, retain) UIView *parentView;    // The parent view this 'dialog' is attached to\n@property (nonatomic, retain) UIView *dialogView;    // Dialog's container view\n@property (nonatomic, retain) UIView *containerView; // Container within the dialog (place your ui elements here)\n@property (nonatomic, retain) UIView *buttonView;    // Buttons on the bottom of the dialog\n\n@property (nonatomic, assign) id<CustomIOS7AlertViewDelegate> delegate;\n@property (nonatomic, retain) NSArray *buttonTitles;\n@property (nonatomic, assign) BOOL useMotionEffects;\n\n@property (copy) void (^onButtonTouchUpInside)(CustomIOS7AlertView *alertView, int buttonIndex) ;\n\n- (id)init;\n\n/*!\n DEPRECATED: Use the [CustomIOS7AlertView init] method without passing a parent view.\n */\n- (id)initWithParentView: (UIView *)_parentView __attribute__ ((deprecated));\n\n- (void)show;\n- (void)close;\n\n- (IBAction)customIOS7dialogButtonTouchUpInside:(id)sender;\n- (void)setOnButtonTouchUpInside:(void (^)(CustomIOS7AlertView *alertView, int buttonIndex))onButtonTouchUpInside;\n\n- (void)deviceOrientationDidChange: (NSNotification *)notification;\n- (void)dealloc;\n\n@end\n"
  },
  {
    "path": "ArcBit/External/CustomIOS7AlertView/CustomIOS7AlertView.m",
    "content": "//\n//  CustomIOS7AlertView.m\n//  CustomIOS7AlertView\n//\n//  Created by Richard on 20/09/2013.\n//  Copyright (c) 2013 Wimagguc.\n//\n//  Lincesed under The MIT License (MIT)\n//  http://opensource.org/licenses/MIT\n//\n\n#import \"CustomIOS7AlertView.h\"\n#import <QuartzCore/QuartzCore.h>\n\nconst static CGFloat kCustomIOS7AlertViewDefaultButtonHeight       = 50;\nconst static CGFloat kCustomIOS7AlertViewDefaultButtonSpacerHeight = 1;\nconst static CGFloat kCustomIOS7AlertViewCornerRadius              = 7;\nconst static CGFloat kCustomIOS7MotionEffectExtent                 = 10.0;\n\n@implementation CustomIOS7AlertView\n\nCGFloat buttonHeight = 0;\nCGFloat buttonSpacerHeight = 0;\n\n@synthesize parentView, containerView, dialogView, buttonView, onButtonTouchUpInside;\n@synthesize delegate;\n@synthesize buttonTitles;\n@synthesize useMotionEffects;\n\n- (id)initWithParentView: (UIView *)_parentView\n{\n    self = [self init];\n    if (_parentView) {\n        self.frame = _parentView.frame;\n        self.parentView = _parentView;\n    }\n    return self;\n}\n\n- (id)init\n{\n    self = [super init];\n    if (self) {\n        self.frame = CGRectMake(0, 0, [UIScreen mainScreen].bounds.size.width, [UIScreen mainScreen].bounds.size.height);\n\n        delegate = self;\n        useMotionEffects = false;\n        buttonTitles = @[@\"Close\"];\n\n        [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(deviceOrientationDidChange:) name:UIDeviceOrientationDidChangeNotification object:nil];\n        [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(keyboardWillShow:) name:UIKeyboardWillShowNotification object:nil];\n        [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(keyboardWillHide:) name:UIKeyboardWillHideNotification object:nil];\n    }\n    return self;\n}\n\n// Create the dialog view, and animate opening the dialog\n- (void)show\n{\n    dialogView = [self createContainerView];\n  \n    dialogView.layer.shouldRasterize = YES;\n    dialogView.layer.rasterizationScale = [[UIScreen mainScreen] scale];\n  \n    self.layer.shouldRasterize = YES;\n    self.layer.rasterizationScale = [[UIScreen mainScreen] scale];\n\n#if (defined(__IPHONE_7_0))\n    if (useMotionEffects) {\n        [self applyMotionEffects];\n    }\n#endif\n\n    dialogView.layer.opacity = 0.5f;\n    dialogView.layer.transform = CATransform3DMakeScale(1.3f, 1.3f, 1.0);\n\n    self.backgroundColor = [UIColor colorWithRed:0 green:0 blue:0 alpha:0];\n\n    [self addSubview:dialogView];\n\n    // Can be attached to a view or to the top most window\n    // Attached to a view:\n    if (parentView != NULL) {\n        [parentView addSubview:self];\n\n    // Attached to the top most window (make sure we are using the right orientation):\n    } else {\n        UIInterfaceOrientation interfaceOrientation = [[UIApplication sharedApplication] statusBarOrientation];\n        switch (interfaceOrientation) {\n            case UIInterfaceOrientationLandscapeLeft:\n                self.transform = CGAffineTransformMakeRotation(M_PI * 270.0 / 180.0);\n                break;\n                \n            case UIInterfaceOrientationLandscapeRight:\n                self.transform = CGAffineTransformMakeRotation(M_PI * 90.0 / 180.0);\n                break;\n\n            case UIInterfaceOrientationPortraitUpsideDown:\n                self.transform = CGAffineTransformMakeRotation(M_PI * 180.0 / 180.0);\n                break;\n\n            default:\n                break;\n        }\n\n        [self setFrame:CGRectMake(0, 0, self.frame.size.width, self.frame.size.height)];\n        [[[[UIApplication sharedApplication] windows] firstObject] addSubview:self];\n    }\n\n    [UIView animateWithDuration:0.2f delay:0.0 options:UIViewAnimationOptionCurveEaseInOut\n\t\t\t\t\t animations:^{\n\t\t\t\t\t\t self.backgroundColor = [UIColor colorWithRed:0 green:0 blue:0 alpha:0.4f];\n                         dialogView.layer.opacity = 1.0f;\n                         dialogView.layer.transform = CATransform3DMakeScale(1, 1, 1);\n\t\t\t\t\t }\n\t\t\t\t\t completion:NULL\n     ];\n}\n\n// Button has been touched\n- (IBAction)customIOS7dialogButtonTouchUpInside:(id)sender\n{\n    if (delegate != NULL) {\n        [delegate customIOS7dialogButtonTouchUpInside:self clickedButtonAtIndex:[sender tag]];\n    }\n\n    if (onButtonTouchUpInside != NULL) {\n        onButtonTouchUpInside(self, [sender tag]);\n    }\n}\n\n// Default button behaviour\n- (void)customIOS7dialogButtonTouchUpInside: (CustomIOS7AlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex\n{\n    [self close];\n}\n\n// Dialog close animation then cleaning and removing the view from the parent\n- (void)close\n{\n    CATransform3D currentTransform = dialogView.layer.transform;\n\n    CGFloat startRotation = [[dialogView valueForKeyPath:@\"layer.transform.rotation.z\"] floatValue];\n    CATransform3D rotation = CATransform3DMakeRotation(-startRotation + M_PI * 270.0 / 180.0, 0.0f, 0.0f, 0.0f);\n\n    dialogView.layer.transform = CATransform3DConcat(rotation, CATransform3DMakeScale(1, 1, 1));\n    dialogView.layer.opacity = 1.0f;\n\n    [UIView animateWithDuration:0.2f delay:0.0 options:UIViewAnimationOptionTransitionNone\n\t\t\t\t\t animations:^{\n\t\t\t\t\t\t self.backgroundColor = [UIColor colorWithRed:0.0f green:0.0f blue:0.0f alpha:0.0f];\n                         dialogView.layer.transform = CATransform3DConcat(currentTransform, CATransform3DMakeScale(0.6f, 0.6f, 1.0));\n                         dialogView.layer.opacity = 0.0f;\n\t\t\t\t\t }\n\t\t\t\t\t completion:^(BOOL finished) {\n                         for (UIView *v in [self subviews]) {\n                             [v removeFromSuperview];\n                         }\n                         [self removeFromSuperview];\n\t\t\t\t\t }\n\t ];\n}\n\n- (void)setSubView: (UIView *)subView\n{\n    containerView = subView;\n}\n\n// Creates the container view here: create the dialog, then add the custom content and buttons\n- (UIView *)createContainerView\n{\n    if (containerView == NULL) {\n        containerView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 300, 150)];\n    }\n\n    CGSize screenSize = [self countScreenSize];\n    CGSize dialogSize = [self countDialogSize];\n\n    // For the black background\n    [self setFrame:CGRectMake(0, 0, screenSize.width, screenSize.height)];\n\n    // This is the dialog's container; we attach the custom content and the buttons to this one\n    UIView *dialogContainer = [[UIView alloc] initWithFrame:CGRectMake((screenSize.width - dialogSize.width) / 2, (screenSize.height - dialogSize.height) / 2, dialogSize.width, dialogSize.height)];\n\n    // First, we style the dialog to match the iOS7 UIAlertView >>>\n    CAGradientLayer *gradient = [CAGradientLayer layer];\n    gradient.frame = dialogContainer.bounds;\n    gradient.colors = [NSArray arrayWithObjects:\n                       (id)[[UIColor colorWithRed:218.0/255.0 green:218.0/255.0 blue:218.0/255.0 alpha:1.0f] CGColor],\n                       (id)[[UIColor colorWithRed:233.0/255.0 green:233.0/255.0 blue:233.0/255.0 alpha:1.0f] CGColor],\n                       (id)[[UIColor colorWithRed:218.0/255.0 green:218.0/255.0 blue:218.0/255.0 alpha:1.0f] CGColor],\n                       nil];\n\n    CGFloat cornerRadius = kCustomIOS7AlertViewCornerRadius;\n    gradient.cornerRadius = cornerRadius;\n    [dialogContainer.layer insertSublayer:gradient atIndex:0];\n\n    dialogContainer.layer.cornerRadius = cornerRadius;\n    dialogContainer.layer.borderColor = [[UIColor colorWithRed:198.0/255.0 green:198.0/255.0 blue:198.0/255.0 alpha:1.0f] CGColor];\n    dialogContainer.layer.borderWidth = 1;\n    dialogContainer.layer.shadowRadius = cornerRadius + 5;\n    dialogContainer.layer.shadowOpacity = 0.1f;\n    dialogContainer.layer.shadowOffset = CGSizeMake(0 - (cornerRadius+5)/2, 0 - (cornerRadius+5)/2);\n    dialogContainer.layer.shadowColor = [UIColor blackColor].CGColor;\n    dialogContainer.layer.shadowPath = [UIBezierPath bezierPathWithRoundedRect:dialogContainer.bounds cornerRadius:dialogContainer.layer.cornerRadius].CGPath;\n\n    // There is a line above the button\n    UIView *lineView = [[UIView alloc] initWithFrame:CGRectMake(0, dialogContainer.bounds.size.height - buttonHeight - buttonSpacerHeight, dialogContainer.bounds.size.width, buttonSpacerHeight)];\n    lineView.backgroundColor = [UIColor colorWithRed:198.0/255.0 green:198.0/255.0 blue:198.0/255.0 alpha:1.0f];\n    [dialogContainer addSubview:lineView];\n    // ^^^\n\n    // Add the custom container if there is any\n    [dialogContainer addSubview:containerView];\n\n    // Add the buttons too\n    [self addButtonsToView:dialogContainer];\n\n    return dialogContainer;\n}\n\n// Helper function: add buttons to container\n- (void)addButtonsToView: (UIView *)container\n{\n    if (buttonTitles==NULL) { return; }\n\n    CGFloat buttonWidth = container.bounds.size.width / [buttonTitles count];\n\n    for (int i=0; i<[buttonTitles count]; i++) {\n\n        UIButton *closeButton = [UIButton buttonWithType:UIButtonTypeCustom];\n\n        [closeButton setFrame:CGRectMake(i * buttonWidth, container.bounds.size.height - buttonHeight, buttonWidth, buttonHeight)];\n\n        [closeButton addTarget:self action:@selector(customIOS7dialogButtonTouchUpInside:) forControlEvents:UIControlEventTouchUpInside];\n        [closeButton setTag:i];\n\n        [closeButton setTitle:[buttonTitles objectAtIndex:i] forState:UIControlStateNormal];\n        [closeButton setTitleColor:[UIColor colorWithRed:0.0f green:0.5f blue:1.0f alpha:1.0f] forState:UIControlStateNormal];\n        [closeButton setTitleColor:[UIColor colorWithRed:0.2f green:0.2f blue:0.2f alpha:0.5f] forState:UIControlStateHighlighted];\n        [closeButton.titleLabel setFont:[UIFont boldSystemFontOfSize:14.0f]];\n        [closeButton.layer setCornerRadius:kCustomIOS7AlertViewCornerRadius];\n\n        [container addSubview:closeButton];\n    }\n}\n\n// Helper function: count and return the dialog's size\n- (CGSize)countDialogSize\n{\n    CGFloat dialogWidth = containerView.frame.size.width;\n    CGFloat dialogHeight = containerView.frame.size.height + buttonHeight + buttonSpacerHeight;\n\n    return CGSizeMake(dialogWidth, dialogHeight);\n}\n\n// Helper function: count and return the screen's size\n- (CGSize)countScreenSize\n{\n    if (buttonTitles!=NULL && [buttonTitles count] > 0) {\n        buttonHeight       = kCustomIOS7AlertViewDefaultButtonHeight;\n        buttonSpacerHeight = kCustomIOS7AlertViewDefaultButtonSpacerHeight;\n    } else {\n        buttonHeight = 0;\n        buttonSpacerHeight = 0;\n    }\n\n    CGFloat screenWidth = [UIScreen mainScreen].bounds.size.width;\n    CGFloat screenHeight = [UIScreen mainScreen].bounds.size.height;\n\n    UIInterfaceOrientation interfaceOrientation = [[UIApplication sharedApplication] statusBarOrientation];\n    if (UIInterfaceOrientationIsLandscape(interfaceOrientation)) {\n        CGFloat tmp = screenWidth;\n        screenWidth = screenHeight;\n        screenHeight = tmp;\n    }\n\n    return CGSizeMake(screenWidth, screenHeight);\n}\n\n#if (defined(__IPHONE_7_0))\n// Add motion effects\n- (void)applyMotionEffects {\n\n    if (floor(NSFoundationVersionNumber) <= NSFoundationVersionNumber_iOS_6_1) {\n        return;\n    }\n\n    UIInterpolatingMotionEffect *horizontalEffect = [[UIInterpolatingMotionEffect alloc] initWithKeyPath:@\"center.x\"\n                                                                                                    type:UIInterpolatingMotionEffectTypeTiltAlongHorizontalAxis];\n    horizontalEffect.minimumRelativeValue = @(-kCustomIOS7MotionEffectExtent);\n    horizontalEffect.maximumRelativeValue = @( kCustomIOS7MotionEffectExtent);\n\n    UIInterpolatingMotionEffect *verticalEffect = [[UIInterpolatingMotionEffect alloc] initWithKeyPath:@\"center.y\"\n                                                                                                  type:UIInterpolatingMotionEffectTypeTiltAlongVerticalAxis];\n    verticalEffect.minimumRelativeValue = @(-kCustomIOS7MotionEffectExtent);\n    verticalEffect.maximumRelativeValue = @( kCustomIOS7MotionEffectExtent);\n\n    UIMotionEffectGroup *motionEffectGroup = [[UIMotionEffectGroup alloc] init];\n    motionEffectGroup.motionEffects = @[horizontalEffect, verticalEffect];\n\n    [dialogView addMotionEffect:motionEffectGroup];\n}\n#endif\n\n- (void)dealloc\n{\n    [[NSNotificationCenter defaultCenter] removeObserver:self name:UIDeviceOrientationDidChangeNotification object:nil];\n    [[NSNotificationCenter defaultCenter] removeObserver:self name:UIKeyboardWillHideNotification object:nil];\n    [[NSNotificationCenter defaultCenter] removeObserver:self name:UIKeyboardWillShowNotification object:nil];\n}\n\n// Handle device orientation changes\n- (void)deviceOrientationDidChange: (NSNotification *)notification\n{\n    // If dialog is attached to the parent view, it probably wants to handle the orientation change itself\n    if (parentView != NULL) {\n        return;\n    }\n\n    UIInterfaceOrientation interfaceOrientation = [[UIApplication sharedApplication] statusBarOrientation];\n\n    CGFloat startRotation = [[self valueForKeyPath:@\"layer.transform.rotation.z\"] floatValue];\n    CGAffineTransform rotation;\n\n    switch (interfaceOrientation) {\n        case UIInterfaceOrientationLandscapeLeft:\n            rotation = CGAffineTransformMakeRotation(-startRotation + M_PI * 270.0 / 180.0);\n            break;\n\n        case UIInterfaceOrientationLandscapeRight:\n            rotation = CGAffineTransformMakeRotation(-startRotation + M_PI * 90.0 / 180.0);\n            break;\n\n        case UIInterfaceOrientationPortraitUpsideDown:\n            rotation = CGAffineTransformMakeRotation(-startRotation + M_PI * 180.0 / 180.0);\n            break;\n\n        default:\n            rotation = CGAffineTransformMakeRotation(-startRotation + 0.0);\n            break;\n    }\n\n    [UIView animateWithDuration:0.2f delay:0.0 options:UIViewAnimationOptionTransitionNone\n\t\t\t\t\t animations:^{\n                         dialogView.transform = rotation;\n\t\t\t\t\t }\n\t\t\t\t\t completion:^(BOOL finished){\n                         // fix errors caused by being rotated one too many times\n                         dispatch_after(dispatch_time(DISPATCH_TIME_NOW, 0.5f * NSEC_PER_SEC), dispatch_get_main_queue(), ^{\n                             UIInterfaceOrientation endInterfaceOrientation = [[UIApplication sharedApplication] statusBarOrientation];\n                             if (interfaceOrientation != endInterfaceOrientation) {\n                                 // TODO user moved phone again before than animation ended: rotation animation can introduce errors here\n                             }\n                         });\n                     }\n\t ];\n\n}\n\n// Handle keyboard show/hide changes\n- (void)keyboardWillShow: (NSNotification *)notification\n{\n    CGSize screenSize = [self countScreenSize];\n    CGSize dialogSize = [self countDialogSize];\n    CGSize keyboardSize = [[[notification userInfo] objectForKey:UIKeyboardFrameBeginUserInfoKey] CGRectValue].size;\n\n    UIInterfaceOrientation interfaceOrientation = [[UIApplication sharedApplication] statusBarOrientation];\n    if (UIInterfaceOrientationIsLandscape(interfaceOrientation)) {\n        CGFloat tmp = keyboardSize.height;\n        keyboardSize.height = keyboardSize.width;\n        keyboardSize.width = tmp;\n    }\n\n    [UIView animateWithDuration:0.2f delay:0.0 options:UIViewAnimationOptionTransitionNone\n\t\t\t\t\t animations:^{\n                         dialogView.frame = CGRectMake((screenSize.width - dialogSize.width) / 2, (screenSize.height - keyboardSize.height - dialogSize.height) / 2, dialogSize.width, dialogSize.height);\n\t\t\t\t\t }\n\t\t\t\t\t completion:nil\n\t ];\n}\n\n- (void)keyboardWillHide: (NSNotification *)notification\n{\n    CGSize screenSize = [self countScreenSize];\n    CGSize dialogSize = [self countDialogSize];\n\n    [UIView animateWithDuration:0.2f delay:0.0 options:UIViewAnimationOptionTransitionNone\n\t\t\t\t\t animations:^{\n                         dialogView.frame = CGRectMake((screenSize.width - dialogSize.width) / 2, (screenSize.height - dialogSize.height) / 2, dialogSize.width, dialogSize.height);\n\t\t\t\t\t }\n\t\t\t\t\t completion:nil\n\t ];\n}\n\n@end\n"
  },
  {
    "path": "ArcBit/External/InAppSettingsKit/Controllers/IASKAppSettingsViewController.h",
    "content": "//\n//  IASKAppSettingsViewController.h\n//  http://www.inappsettingskit.com\n//\n//  Copyright (c) 2009:\n//  Luc Vandal, Edovia Inc., http://www.edovia.com\n//  Ortwin Gentz, FutureTap GmbH, http://www.futuretap.com\n//  All rights reserved.\n//\n//  It is appreciated but not required that you give credit to Luc Vandal and Ortwin Gentz,\n//  as the original authors of this code. You can give credit in a blog post, a tweet or on\n//  a info page of your app. Also, the original authors appreciate letting them know if you use this code.\n//\n//  This code is licensed under the BSD license that is available at: http://www.opensource.org/licenses/bsd-license.php\n//\n\n#import <UIKit/UIKit.h>\n#import <MessageUI/MessageUI.h>\n\n#import \"IASKSettingsStore.h\"\n#import \"IASKViewController.h\"\n#import \"IASKSpecifier.h\"\n\n@class IASKSettingsReader;\n@class IASKAppSettingsViewController;\n\n@protocol IASKSettingsDelegate\n- (void)settingsViewControllerDidEnd:(IASKAppSettingsViewController*)sender;\n\n@optional\n#pragma mark - UITableView header customization\n- (CGFloat) settingsViewController:(id<IASKViewController>)settingsViewController\n                         tableView:(UITableView *)tableView\n         heightForHeaderForSection:(NSInteger)section;\n- (UIView *) settingsViewController:(id<IASKViewController>)settingsViewController\n                          tableView:(UITableView *)tableView\n            viewForHeaderForSection:(NSInteger)section;\n\n#pragma mark - UITableView cell customization\n- (CGFloat)tableView:(UITableView*)tableView heightForSpecifier:(IASKSpecifier*)specifier;\n- (UITableViewCell*)tableView:(UITableView*)tableView cellForSpecifier:(IASKSpecifier*)specifier;\n\n#pragma mark - mail composing customization\n- (NSString*) settingsViewController:(id<IASKViewController>)settingsViewController\n         mailComposeBodyForSpecifier:(IASKSpecifier*) specifier;\n\n- (UIViewController<MFMailComposeViewControllerDelegate>*) settingsViewController:(id<IASKViewController>)settingsViewController\n                                     viewControllerForMailComposeViewForSpecifier:(IASKSpecifier*) specifier;\n\n- (void) settingsViewController:(id<IASKViewController>) settingsViewController\n          mailComposeController:(MFMailComposeViewController*)controller\n            didFinishWithResult:(MFMailComposeResult)result\n                          error:(NSError*)error;\n\n#pragma mark - respond to button taps\n- (void)settingsViewController:(IASKAppSettingsViewController*)sender buttonTappedForKey:(NSString*)key __attribute__((deprecated)); // use the method below with specifier instead\n- (void)settingsViewController:(IASKAppSettingsViewController*)sender buttonTappedForSpecifier:(IASKSpecifier*)specifier;\n- (void)settingsViewController:(IASKAppSettingsViewController*)sender tableView:(UITableView *)tableView didSelectCustomViewSpecifier:(IASKSpecifier*)specifier;\n@end\n\n\n@interface IASKAppSettingsViewController : UITableViewController <IASKViewController, UITextFieldDelegate, MFMailComposeViewControllerDelegate>\n\n@property (nonatomic, assign) IBOutlet id delegate;\n@property (nonatomic, copy) NSString *file;\n@property (nonatomic, assign) BOOL showCreditsFooter;\n@property (nonatomic, assign) IBInspectable BOOL showDoneButton;\n@property (nonatomic, retain) NSSet *hiddenKeys;\n@property (nonatomic) IBInspectable BOOL neverShowPrivacySettings;\n\n- (void)synchronizeSettings;\n- (void)dismiss:(id)sender;\n- (void)setHiddenKeys:(NSSet*)hiddenKeys animated:(BOOL)animated;\n@end\n"
  },
  {
    "path": "ArcBit/External/InAppSettingsKit/Controllers/IASKAppSettingsViewController.m",
    "content": "//\n//  IASKAppSettingsViewController.m\n//  http://www.inappsettingskit.com\n//\n//  Copyright (c) 2009-2010:\n//  Luc Vandal, Edovia Inc., http://www.edovia.com\n//  Ortwin Gentz, FutureTap GmbH, http://www.futuretap.com\n//  All rights reserved.\n// \n//  It is appreciated but not required that you give credit to Luc Vandal and Ortwin Gentz, \n//  as the original authors of this code. You can give credit in a blog post, a tweet or on \n//  a info page of your app. Also, the original authors appreciate letting them know if you use this code.\n//\n//  This code is licensed under the BSD license that is available at: http://www.opensource.org/licenses/bsd-license.php\n//\n\n\n#import \"IASKAppSettingsViewController.h\"\n#import \"IASKSettingsReader.h\"\n#import \"IASKSettingsStoreUserDefaults.h\"\n#import \"IASKPSSliderSpecifierViewCell.h\"\n#import \"IASKPSTextFieldSpecifierViewCell.h\"\n#import \"IASKSwitch.h\"\n#import \"IASKSlider.h\"\n#import \"IASKSpecifier.h\"\n#import \"IASKSpecifierValuesViewController.h\"\n#import \"IASKTextField.h\"\n#import \"IASKTextViewCell.h\"\n#import \"IASKMultipleValueSelection.h\"\n\n#if !__has_feature(objc_arc)\n#error \"IASK needs ARC\"\n#endif\n\nstatic NSString *kIASKCredits = @\"Powered by InAppSettingsKit\"; // Leave this as-is!!!\n\n#define kIASKSpecifierValuesViewControllerIndex       0\n#define kIASKSpecifierChildViewControllerIndex        1\n\n#define kIASKCreditsViewWidth                         285\n\nCGRect IASKCGRectSwap(CGRect rect);\n\n@interface IASKAppSettingsViewController () <UITextViewDelegate> {\n    IASKSettingsReader\t\t*_settingsReader;\n    id<IASKSettingsStore>  _settingsStore;\n    \n    id                      _currentFirstResponder;\n    __weak UIViewController *_currentChildViewController;\n    BOOL _reloadDisabled;\n\t/// The selected index for every group (in case it's a radio group).\n\tNSArray *_selections;\n}\n\n@property (nonatomic, strong) id currentFirstResponder;\n@property (nonatomic, strong) NSMutableDictionary *rowHeights;\n\n- (void)_textChanged:(id)sender;\n- (void)synchronizeSettings;\n- (void)userDefaultsDidChange;\n- (void)reload;\n@end\n\n@implementation IASKAppSettingsViewController\n//synthesize properties from protocol\n@synthesize settingsReader = _settingsReader;\n@synthesize settingsStore = _settingsStore;\n@synthesize file = _file;\n\n#pragma mark accessors\n- (IASKSettingsReader*)settingsReader {\n\tif (!_settingsReader) {\n\t\t_settingsReader = [[IASKSettingsReader alloc] initWithFile:self.file];\n\t\tif (self.neverShowPrivacySettings) {\n\t\t\t_settingsReader.showPrivacySettings = NO;\n\t\t}\n\t}\n\treturn _settingsReader;\n}\n\n- (id<IASKSettingsStore>)settingsStore {\n\tif (!_settingsStore) {\n\t\t_settingsStore = [[IASKSettingsStoreUserDefaults alloc] init];\n\t}\n\treturn _settingsStore;\n}\n\n- (NSString*)file {\n\tif (!_file) {\n\t\tself.file = @\"Root\";\n\t}\n\treturn _file;\n}\n\n- (void)setFile:(NSString *)file {\n    _file = [file copy];\n    self.tableView.contentOffset = CGPointMake(0, -self.tableView.contentInset.top);\n    self.settingsReader = nil; // automatically initializes itself\n    if (!_reloadDisabled) {\n\t\t[self.tableView reloadData];\n\t\t[self createSelections];\n\t}\n}\n\n- (void)createSelections {\n\tNSMutableArray *sectionSelection = [NSMutableArray new];\n\tfor (int i = 0; i < _settingsReader.numberOfSections; i++) {\n\t\tIASKSpecifier *specifier = [self.settingsReader headerSpecifierForSection:i];\n\t\tif ([specifier.type isEqualToString:kIASKPSRadioGroupSpecifier]) {\n\t\t\tIASKMultipleValueSelection *selection = [IASKMultipleValueSelection new];\n\t\t\tselection.tableView = self.tableView;\n\t\t\tselection.specifier = specifier;\n\t\t\tselection.section = i;\n\t\t\tselection.settingsStore = self.settingsStore;\n\t\t\t[sectionSelection addObject:selection];\n\t\t} else {\n\t\t\t[sectionSelection addObject:[NSNull null]];\n\t\t}\n\t}\n\t_selections = sectionSelection;\n}\n\n- (BOOL)isPad {\n\tBOOL isPad = NO;\n#if (__IPHONE_OS_VERSION_MAX_ALLOWED >= 30200)\n\tisPad = UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad;\n#endif\n\treturn isPad;\n}\n\n#pragma mark standard view controller methods\n- (id)init {\n    return [self initWithStyle:UITableViewStyleGrouped];\n}\n\n- (id)initWithStyle:(UITableViewStyle)style {\n    if (style != UITableViewStyleGrouped) {\n        NSLog(@\"WARNING: only UITableViewStyleGrouped style is supported by InAppSettingsKit.\");\n    }\n    if ((self = [super initWithStyle:style])) {\n\t\t[self configure];\n    }\n    return self;\n}\n\n- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil {\n    if (nibNameOrNil) {\n\t\tNSLog (@\"%@ is now deprecated, we are moving away from nibs.\", NSStringFromSelector(_cmd));\n\t\tself = [super initWithStyle:UITableViewStyleGrouped];\n\t} else {\n\t\tself = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];\n\t}\n\tif (self) {\n\t\t[self configure];\n\t}\n\treturn self;\n}\n\n- (id)initWithCoder:(NSCoder *)aDecoder {\n\tif ((self = [super initWithCoder:aDecoder])) {\n\t\t[self configure];\n\t\t_showDoneButton = NO;\n\t}\n\treturn self;\n}\n\n- (void)configure {\n\t_reloadDisabled = NO;\n\t_showDoneButton = YES;\n\t_showCreditsFooter = YES; // display credits for InAppSettingsKit creators\n\tself.rowHeights = [NSMutableDictionary dictionary];\n}\n\n- (void)viewDidLoad {\n    [super viewDidLoad];\n    if ([self isPad]) {\n#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 70000\n        if (floor(NSFoundationVersionNumber) <= NSFoundationVersionNumber_iOS_6_1)\t// don't use etched style on iOS 7\n#endif\n            self.tableView.separatorStyle = UITableViewCellSeparatorStyleSingleLineEtched;\n    }\n    UITapGestureRecognizer *tapGesture = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(singleTapToEndEdit:)];   \n    tapGesture.cancelsTouchesInView = NO;\n    [self.tableView addGestureRecognizer:tapGesture];\n}\n\n- (void)viewWillAppear:(BOOL)animated {\n\tNSIndexPath *selectedIndexPath = [self.tableView indexPathForSelectedRow];\n\n\t[super viewWillAppear:animated];\n\n\t// if there's something selected, the value might have changed\n\t// so reload that row\n\tif(selectedIndexPath) {\n\t\tdispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(animated * UINavigationControllerHideShowBarDuration * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{\n\t\t\t[self.tableView reloadRowsAtIndexPaths:[NSArray arrayWithObject:selectedIndexPath]\n\t\t\t\t\t\t\t\t  withRowAnimation:UITableViewRowAnimationNone];\n\t\t\t// and reselect it, so we get the nice default deselect animation from UITableViewController\n\t\t\t[self.tableView selectRowAtIndexPath:selectedIndexPath animated:NO scrollPosition:UITableViewScrollPositionNone];\n\t\t\t[self.tableView deselectRowAtIndexPath:selectedIndexPath animated:YES];\n\t\t});\n\t}\n\t\n\tif (_showDoneButton) {\n\t\tUIBarButtonItem *buttonItem = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemDone \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttarget:self \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\taction:@selector(dismiss:)];\n\t\tself.navigationItem.rightBarButtonItem = buttonItem;\n\t} \n\tif (!self.title) {\n\t\tself.title = NSLocalizedString(@\"Settings\", @\"\");\n\t}\n\t\n\tif ([self.settingsStore isKindOfClass:[IASKSettingsStoreUserDefaults class]]) {\n\t\tNSNotificationCenter *dc = NSNotificationCenter.defaultCenter;\n\t\tIASKSettingsStoreUserDefaults *udSettingsStore = (id)self.settingsStore;\n\t\t[dc addObserver:self selector:@selector(userDefaultsDidChange) name:NSUserDefaultsDidChangeNotification object:udSettingsStore.defaults];\n\t\t[dc addObserver:self selector:@selector(didChangeSettingViaIASK:) name:kIASKAppSettingChanged object:nil];\n\t\t[self userDefaultsDidChange]; // force update in case of changes while we were hidden\n\t}\n}\n\n- (CGSize)preferredContentSize {\n    return [[self view] sizeThatFits:CGSizeMake(320, 2000)];\n}\n\n- (void)viewDidAppear:(BOOL)animated {\n\t[super viewDidAppear:animated];\n\n\tNSNotificationCenter *dc = [NSNotificationCenter defaultCenter];\n\t[dc addObserver:self selector:@selector(synchronizeSettings) name:UIApplicationDidEnterBackgroundNotification object:[UIApplication sharedApplication]];\n\t[dc addObserver:self selector:@selector(reload) name:UIApplicationWillEnterForegroundNotification object:[UIApplication sharedApplication]];\n\t[dc addObserver:self selector:@selector(synchronizeSettings) name:UIApplicationWillTerminateNotification object:[UIApplication sharedApplication]];\n\n\t[self.tableView beginUpdates];\n\t[self.tableView endUpdates];\n}\n\n- (void)viewWillDisappear:(BOOL)animated {\n\t[NSObject cancelPreviousPerformRequestsWithTarget:self];\n\n\t// hide the keyboard\n    [self.currentFirstResponder resignFirstResponder];\n\t\n\t[super viewWillDisappear:animated];\n}\n\n- (void)viewDidDisappear:(BOOL)animated {\n\tNSNotificationCenter *dc = [NSNotificationCenter defaultCenter];\n\tif ([self.settingsStore isKindOfClass:[IASKSettingsStoreUserDefaults class]]) {\n\t\tIASKSettingsStoreUserDefaults *udSettingsStore = (id)self.settingsStore;\n\t\t[dc removeObserver:self name:NSUserDefaultsDidChangeNotification object:udSettingsStore.defaults];\n\t\t[dc removeObserver:self name:kIASKAppSettingChanged object:self];\n\t}\n\t[dc removeObserver:self name:UIApplicationDidEnterBackgroundNotification object:[UIApplication sharedApplication]];\n\t[dc removeObserver:self name:UIApplicationWillEnterForegroundNotification object:[UIApplication sharedApplication]];\n\t[dc removeObserver:self name:UIApplicationWillTerminateNotification object:[UIApplication sharedApplication]];\n\n\t[super viewDidDisappear:animated];\n}\n\n- (void)setHiddenKeys:(NSSet *)theHiddenKeys {\n\t[self setHiddenKeys:theHiddenKeys animated:NO];\n}\n\n\n- (void)setHiddenKeys:(NSSet*)theHiddenKeys animated:(BOOL)animated {\n    if (_hiddenKeys != theHiddenKeys) {\n        NSSet *oldHiddenKeys = _hiddenKeys;\n        _hiddenKeys = theHiddenKeys;\n        \n        if (animated) {\t\t\t\n            NSMutableSet *showKeys = [NSMutableSet setWithSet:oldHiddenKeys];\n            [showKeys minusSet:theHiddenKeys];\n            \n            NSMutableSet *hideKeys = [NSMutableSet setWithSet:theHiddenKeys];\n            [hideKeys minusSet:oldHiddenKeys];\n            \n            // calculate rows to be deleted\n            NSMutableArray *hideIndexPaths = [NSMutableArray array];\n            for (NSString *key in hideKeys) {\n                NSIndexPath *indexPath = [self.settingsReader indexPathForKey:key];\n                if (indexPath) {\n                    [hideIndexPaths addObject:indexPath];\n                }\n            }\n            \n            // calculate sections to be deleted\n            NSMutableIndexSet *hideSections = [NSMutableIndexSet indexSet];\n            for (NSInteger section = 0; section < [self numberOfSectionsInTableView:self.tableView ]; section++) {\n                NSInteger rowsInSection = 0;\n                for (NSIndexPath *indexPath in hideIndexPaths) {\n                    if (indexPath.section == section) {\n                        rowsInSection++;\n                    }\n                }\n                if (rowsInSection && rowsInSection >= [self.settingsReader numberOfRowsForSection:section]) {\n                    [hideSections addIndex:section];\n                }\n            }\n\t\t\t\n            // set the datasource\n            self.settingsReader.hiddenKeys = theHiddenKeys;\n            \n            \n            // calculate rows to be inserted\n            NSMutableArray *showIndexPaths = [NSMutableArray array];\n            for (NSString *key in showKeys) {\n                NSIndexPath *indexPath = [self.settingsReader indexPathForKey:key];\n                if (indexPath) {\n                    [showIndexPaths addObject:indexPath];\n                }\n            }\n            \n            // calculate sections to be inserted\n            NSMutableIndexSet *showSections = [NSMutableIndexSet indexSet];\n            for (NSInteger section = 0; section < [self.settingsReader numberOfSections]; section++) {\n                NSInteger rowsInSection = 0;\n                for (NSIndexPath *indexPath in showIndexPaths) {\n                    if (indexPath.section == section) {\n                        rowsInSection++;\n                    }\n                }\n                if (rowsInSection && rowsInSection >= [self.settingsReader numberOfRowsForSection:section]) {\n                    [showSections addIndex:section];\n                }\n\t\t\t}\n\t\t\t\n\t\t\tif (hideSections.count || hideIndexPaths.count || showSections.count || showIndexPaths.count) {\n\t\t\t\t[self.tableView beginUpdates];\n\t\t\t\tUITableViewRowAnimation animation = animated ? UITableViewRowAnimationAutomatic : UITableViewRowAnimationNone;\n\t\t\t\tif (hideSections.count) {\n\t\t\t\t\t[self.tableView deleteSections:hideSections withRowAnimation:animation];\n\t\t\t\t}\n\t\t\t\tif (hideIndexPaths) {\n\t\t\t\t\t[self.tableView deleteRowsAtIndexPaths:hideIndexPaths withRowAnimation:animation];\n\t\t\t\t}\n\t\t\t\tif (showSections.count) {\n\t\t\t\t\t[self.tableView insertSections:showSections withRowAnimation:animation];\n\t\t\t\t}\n\t\t\t\tif (showIndexPaths) {\n\t\t\t\t\t[self.tableView insertRowsAtIndexPaths:showIndexPaths withRowAnimation:animation];\n\t\t\t\t}\n\t\t\t\t[self.tableView endUpdates];\n\t\t\t}\n\t\t} else {\n\t\t\tself.settingsReader.hiddenKeys = theHiddenKeys;\n\t\t\tif (!_reloadDisabled) [self.tableView reloadData];\n\t\t}\n\t}\n\tUIViewController *childViewController = _currentChildViewController;\n    if([childViewController respondsToSelector:@selector(setHiddenKeys:animated:)]) {\n        [(id)childViewController setHiddenKeys:theHiddenKeys animated:animated];\n    }\n}\n\n- (void)setNeverShowPrivacySettings:(BOOL)neverShowPrivacySettings {\n\t_neverShowPrivacySettings = neverShowPrivacySettings;\n\tself.settingsReader = nil;\n\t[self reload];\n}\n\n\n- (void)dealloc {\n    [[NSNotificationCenter defaultCenter] removeObserver:self];\n}\n\n\n#pragma mark -\n#pragma mark Actions\n\n- (void)dismiss:(id)sender {\n\t[self.settingsStore synchronize];\n\t\n\tif (self.delegate && [self.delegate conformsToProtocol:@protocol(IASKSettingsDelegate)]) {\n\t\t[self.delegate settingsViewControllerDidEnd:self];\n\t}\n}\n\n- (void)toggledValue:(id)sender {\n    IASKSwitch *toggle    = (IASKSwitch*)sender;\n    IASKSpecifier *spec   = [_settingsReader specifierForKey:[toggle key]];\n    \n    if ([toggle isOn]) {\n        if ([spec trueValue] != nil) {\n            [self.settingsStore setObject:[spec trueValue] forKey:[toggle key]];\n        }\n        else {\n            [self.settingsStore setBool:YES forKey:[toggle key]]; \n        }\n    }\n    else {\n        if ([spec falseValue] != nil) {\n            [self.settingsStore setObject:[spec falseValue] forKey:[toggle key]];\n        }\n        else {\n            [self.settingsStore setBool:NO forKey:[toggle key]]; \n        }\n    }\n    [[NSNotificationCenter defaultCenter] postNotificationName:kIASKAppSettingChanged\n                                                        object:self\n                                                      userInfo:[NSDictionary dictionaryWithObject:[self.settingsStore objectForKey:[toggle key]]\n                                                                                           forKey:[toggle key]]];\n}\n\n- (void)sliderChangedValue:(id)sender {\n    IASKSlider *slider = (IASKSlider*)sender;\n    [self.settingsStore setFloat:[slider value] forKey:[slider key]];\n    [[NSNotificationCenter defaultCenter] postNotificationName:kIASKAppSettingChanged\n                                                        object:self\n                                                      userInfo:[NSDictionary dictionaryWithObject:[NSNumber numberWithFloat:[slider value]]\n                                                                                           forKey:[slider key]]];\n}\n\n\n#pragma mark -\n#pragma mark UITableView Functions\n\n- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {\n\treturn [self.settingsReader numberOfSections];\n}\n\n- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {\n    return [self.settingsReader numberOfRowsForSection:section];\n}\n\n- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {\n    IASKSpecifier *specifier  = [self.settingsReader specifierForIndexPath:indexPath];\n\tif ([specifier.type isEqualToString:kIASKTextViewSpecifier]) {\n\t\tCGFloat height = (CGFloat)[self.rowHeights[specifier.key] doubleValue];\n\t\treturn height > 0 ? height : UITableViewAutomaticDimension;\n\t} else if ([[specifier type] isEqualToString:kIASKCustomViewSpecifier]) {\n\t\tif ([self.delegate respondsToSelector:@selector(tableView:heightForSpecifier:)]) {\n\t\t\treturn [self.delegate tableView:tableView heightForSpecifier:specifier];\n\t\t} else {\n\t\t\treturn 0;\n\t\t}\n\t}\n\tIASK_IF_IOS7_OR_GREATER\n\t(\n\t NSDictionary *rowHeights = @{UIContentSizeCategoryExtraSmall: @(44),\n\t\t\t\t\t\t\t\t  UIContentSizeCategorySmall: @(44),\n\t\t\t\t\t\t\t\t  UIContentSizeCategoryMedium: @(44),\n\t\t\t\t\t\t\t\t  UIContentSizeCategoryLarge: @(44),\n\t\t\t\t\t\t\t\t  UIContentSizeCategoryExtraLarge: @(47)};\n\t CGFloat rowHeight = (CGFloat)[rowHeights[UIApplication.sharedApplication.preferredContentSizeCategory] doubleValue];\n\t return rowHeight != 0 ? rowHeight : 51;\n\t);\n\treturn 44;\n}\n\n- (NSString *)tableView:(UITableView*)tableView titleForHeaderInSection:(NSInteger)section {\n    NSString *header = [self.settingsReader titleForSection:section];\n\tif (0 == header.length) {\n\t\treturn nil;\n\t}\n\treturn header;\n}\n\n- (UIView *)tableView:(UITableView*)tableView viewForHeaderInSection:(NSInteger)section {\n\tif ([self.delegate respondsToSelector:@selector(settingsViewController:tableView:viewForHeaderForSection:)]) {\n\t\treturn [self.delegate settingsViewController:self tableView:tableView viewForHeaderForSection:section];\n\t} else {\n\t\treturn nil;\n\t}\n}\n\n- (CGFloat)tableView:(UITableView*)tableView heightForHeaderInSection:(NSInteger)section {\n\tif ([self tableView:tableView viewForHeaderInSection:section] && [self.delegate respondsToSelector:@selector(settingsViewController:tableView:heightForHeaderForSection:)]) {\n\t\tCGFloat result = [self.delegate settingsViewController:self tableView:tableView heightForHeaderForSection:section];\n\t\tif (result > 0) {\n\t\t\treturn result;\n\t\t}\n\t\t\n\t}\n\treturn UITableViewAutomaticDimension;\n}\n\n- (NSString *)tableView:(UITableView *)tableView titleForFooterInSection:(NSInteger)section\n{\n\tNSString *footerText = [self.settingsReader footerTextForSection:section];\n\tif (_showCreditsFooter && (section == [self.settingsReader numberOfSections]-1)) {\n\t\t// show credits since this is the last section\n\t\tif ((footerText == nil) || ([footerText length] == 0)) {\n\t\t\t// show the credits on their own\n            return @\"\";\n//\t\t\treturn kIASKCredits;\n\t\t} else {\n\t\t\t// show the credits below the app's FooterText\n            return @\"\";\n//\t\t\treturn [NSString stringWithFormat:@\"%@\\n\\n%@\", footerText, kIASKCredits];\n\t\t}\n\t} else {\n\t\treturn footerText;\n\t}\n}\n\n\n- (UITableViewCell*)tableView:(UITableView *)tableView newCellForSpecifier:(IASKSpecifier*)specifier {\n\n\tNSString *identifier = [NSString stringWithFormat:@\"%@-%ld-%d\", specifier.type, (long)specifier.textAlignment, !!specifier.subtitle.length];\n\tUITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:identifier];\n\tif (cell) {\n\t\treturn cell;\n\t}\n\tUITableViewCellStyle style = (specifier.textAlignment == NSTextAlignmentLeft || specifier.subtitle.length) ? UITableViewCellStyleSubtitle : UITableViewCellStyleDefault;\n\tif ([identifier hasPrefix:kIASKPSToggleSwitchSpecifier]) {\n\t\tcell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:kIASKPSToggleSwitchSpecifier];\n\t\tcell.accessoryView = [[IASKSwitch alloc] initWithFrame:CGRectMake(0, 0, 79, 27)];\n\t\t[((IASKSwitch*)cell.accessoryView) addTarget:self action:@selector(toggledValue:) forControlEvents:UIControlEventValueChanged];\n\t\tcell.selectionStyle = UITableViewCellSelectionStyleNone;\n\t}\n\telse if ([identifier hasPrefix:kIASKPSMultiValueSpecifier] || [identifier hasPrefix:kIASKPSTitleValueSpecifier]) {\n\t\tcell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:identifier];\n\t\tcell.accessoryType = [identifier hasPrefix:kIASKPSMultiValueSpecifier] ? UITableViewCellAccessoryDisclosureIndicator : UITableViewCellAccessoryNone;\n\t}\n\telse if ([identifier hasPrefix:kIASKPSTextFieldSpecifier]) {\n\t\tcell = [[IASKPSTextFieldSpecifierViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:kIASKPSTextFieldSpecifier];\n\t\t[((IASKPSTextFieldSpecifierViewCell*)cell).textField addTarget:self action:@selector(_textChanged:) forControlEvents:UIControlEventEditingChanged];\n\t}\n\telse if ([identifier hasPrefix:kIASKTextViewSpecifier]) {\n        cell = [[IASKTextViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:kIASKTextViewSpecifier];\n\t}\n\telse if ([identifier hasPrefix:kIASKPSSliderSpecifier]) {\n        cell = [[IASKPSSliderSpecifierViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:kIASKPSSliderSpecifier];\n\t} else if ([identifier hasPrefix:kIASKPSChildPaneSpecifier]) {\n\t\tcell = [[UITableViewCell alloc] initWithStyle:style reuseIdentifier:identifier];\n\t\tcell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;\n\t} else if ([identifier isEqualToString:kIASKMailComposeSpecifier]) {\n\t\tcell = [[UITableViewCell alloc] initWithStyle:style reuseIdentifier:identifier];\n\t\t[cell setAccessoryType:UITableViewCellAccessoryDisclosureIndicator];\n\t} else {\n\t\tcell = [[UITableViewCell alloc] initWithStyle:style reuseIdentifier:identifier];\n\n\t\tif ([identifier isEqualToString:kIASKOpenURLSpecifier]) {\n\t\t\tcell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;\n\t\t}\n\t}\n\tIASK_IF_PRE_IOS6(cell.textLabel.minimumFontSize = kIASKMinimumFontSize;\n\t\t\t\t\t cell.detailTextLabel.minimumFontSize = kIASKMinimumFontSize;);\n\tIASK_IF_IOS6_OR_GREATER(cell.textLabel.minimumScaleFactor = kIASKMinimumFontSize / cell.textLabel.font.pointSize;\n\t\t\t\t\t\t\tcell.detailTextLabel.minimumScaleFactor = kIASKMinimumFontSize / cell.detailTextLabel.font.pointSize;);\n\treturn cell;\n}\n\n- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {\n\tIASKSpecifier *specifier  = [self.settingsReader specifierForIndexPath:indexPath];\n\tif ([specifier.type isEqualToString:kIASKCustomViewSpecifier] && [self.delegate respondsToSelector:@selector(tableView:cellForSpecifier:)]) {\n\t\tUITableViewCell* cell = [self.delegate tableView:tableView cellForSpecifier:specifier];\n\t\tassert(nil != cell && \"delegate must return a UITableViewCell for custom cell types\");\n\t\treturn cell;\n\t}\n\t\n\tUITableViewCell* cell = [self tableView:tableView newCellForSpecifier:specifier];\n\n\tif ([specifier.type isEqualToString:kIASKPSToggleSwitchSpecifier]) {\n\t\tcell.textLabel.text = specifier.title;\n\t\tcell.detailTextLabel.text = specifier.subtitle;\n\n\t\tid currentValue = [self.settingsStore objectForKey:specifier.key];\n\t\tBOOL toggleState;\n\t\tif (currentValue) {\n\t\t\tif ([currentValue isEqual:specifier.trueValue]) {\n\t\t\t\ttoggleState = YES;\n\t\t\t} else if ([currentValue isEqual:specifier.falseValue]) {\n\t\t\t\ttoggleState = NO;\n\t\t\t} else {\n\t\t\t\ttoggleState = [currentValue boolValue];\n\t\t\t}\n\t\t} else {\n\t\t\ttoggleState = specifier.defaultBoolValue;\n\t\t}\n\t\tIASKSwitch *toggle = (IASKSwitch*)cell.accessoryView;\n\t\ttoggle.on = toggleState;\n\t\ttoggle.key = specifier.key;\n\t}\n\telse if ([specifier.type isEqualToString:kIASKPSMultiValueSpecifier]) {\n\t\tcell.textLabel.text = specifier.title;\n\t\tcell.detailTextLabel.text = [[specifier titleForCurrentValue:[self.settingsStore objectForKey:specifier.key] != nil ? \n\t\t\t\t\t\t\t\t\t  [self.settingsStore objectForKey:specifier.key] : specifier.defaultValue] description];\n\t}\n\telse if ([specifier.type isEqualToString:kIASKPSTitleValueSpecifier]) {\n\t\tcell.textLabel.text = specifier.title;\n\t\tid value = [self.settingsStore objectForKey:specifier.key] ? : specifier.defaultValue;\n\t\t\n\t\tNSString *stringValue;\n\t\tif (specifier.multipleValues || specifier.multipleTitles) {\n\t\t\tstringValue = [specifier titleForCurrentValue:value];\n\t\t} else {\n\t\t\tstringValue = [value description];\n\t\t}\n\t\t\n\t\tcell.detailTextLabel.text = stringValue;\n\t\tcell.userInteractionEnabled = NO;\n\t}\n\telse if ([specifier.type isEqualToString:kIASKPSTextFieldSpecifier]) {\n\t\tcell.textLabel.text = specifier.title;\n\t\t\n\t\tNSString *textValue = [self.settingsStore objectForKey:specifier.key] != nil ? [self.settingsStore objectForKey:specifier.key] : specifier.defaultStringValue;\n\t\tif (textValue && ![textValue isMemberOfClass:[NSString class]]) {\n\t\t\ttextValue = [NSString stringWithFormat:@\"%@\", textValue];\n\t\t}\n\t\tIASKTextField *textField = ((IASKPSTextFieldSpecifierViewCell*)cell).textField;\n\t\ttextField.text = textValue;\n\t\ttextField.placeholder = specifier.placeholder;\n\t\ttextField.key = specifier.key;\n\t\ttextField.delegate = self;\n\t\ttextField.secureTextEntry = [specifier isSecure];\n\t\ttextField.keyboardType = specifier.keyboardType;\n\t\ttextField.autocapitalizationType = specifier.autocapitalizationType;\n\t\tif([specifier isSecure]){\n\t\t\ttextField.autocorrectionType = UITextAutocorrectionTypeNo;\n\t\t} else {\n\t\t\ttextField.autocorrectionType = specifier.autoCorrectionType;\n\t\t}\n\t\ttextField.textAlignment = specifier.textAlignment;\n\t\ttextField.adjustsFontSizeToFitWidth = specifier.adjustsFontSizeToFitWidth;\n\t}\n\telse if ([specifier.type isEqualToString:kIASKTextViewSpecifier]) {\n\t\tIASKTextViewCell *textCell = (id)cell;\n\t\tNSString *value = [self.settingsStore objectForKey:specifier.key] != nil ? [self.settingsStore objectForKey:specifier.key] : specifier.defaultStringValue;\n\t\ttextCell.textView.text = value;\n\t\ttextCell.textView.delegate = self;\n\t\ttextCell.textView.key = specifier.key;\n\t\ttextCell.textView.keyboardType = specifier.keyboardType;\n\t\ttextCell.textView.autocapitalizationType = specifier.autocapitalizationType;\n\t\ttextCell.textView.autocorrectionType = specifier.autoCorrectionType;\n\t\tdispatch_async(dispatch_get_main_queue(), ^{\n\t\t\t[self cacheRowHeightForTextView:textCell.textView];\n\t\t});\n\t}\n\telse if ([specifier.type isEqualToString:kIASKPSSliderSpecifier]) {\n\t\tif (specifier.minimumValueImage.length > 0) {\n\t\t\t((IASKPSSliderSpecifierViewCell*)cell).minImage.image = [UIImage imageWithContentsOfFile:[_settingsReader pathForImageNamed:specifier.minimumValueImage]];\n\t\t}\n\t\t\n\t\tif (specifier.maximumValueImage.length > 0) {\n\t\t\t((IASKPSSliderSpecifierViewCell*)cell).maxImage.image = [UIImage imageWithContentsOfFile:[_settingsReader pathForImageNamed:specifier.maximumValueImage]];\n\t\t}\n\t\t\n\t\tIASKSlider *slider = ((IASKPSSliderSpecifierViewCell*)cell).slider;\n\t\tslider.minimumValue = specifier.minimumValue;\n\t\tslider.maximumValue = specifier.maximumValue;\n\t\tslider.value =\t[self.settingsStore objectForKey:specifier.key] != nil ? [[self.settingsStore objectForKey:specifier.key] floatValue] : [specifier.defaultValue floatValue];\n\t\t[slider addTarget:self action:@selector(sliderChangedValue:) forControlEvents:UIControlEventValueChanged];\n\t\tslider.key = specifier.key;\n\t\t[cell setNeedsLayout];\n\t}\n\telse if ([specifier.type isEqualToString:kIASKPSChildPaneSpecifier]) {\n\t\tcell.textLabel.text = specifier.title;\n\t\tcell.detailTextLabel.text = specifier.subtitle;\n\t} else if ([specifier.type isEqualToString:kIASKOpenURLSpecifier] || [specifier.type isEqualToString:kIASKMailComposeSpecifier]) {\n\t\tcell.textLabel.text = specifier.title;\n\t\tcell.detailTextLabel.text = specifier.subtitle ? : [specifier.defaultValue description];\n\t\tcell.accessoryType = (specifier.textAlignment == NSTextAlignmentLeft) ? UITableViewCellAccessoryDisclosureIndicator : UITableViewCellAccessoryNone;\n\t} else if ([specifier.type isEqualToString:kIASKButtonSpecifier]) {\n\t\tNSString *value = [self.settingsStore objectForKey:specifier.key];\n\t\tcell.textLabel.text = ([value isKindOfClass:NSString.class] && [self.settingsReader titleForId:value].length) ? [self.settingsReader titleForId:value] : specifier.title;\n\t\tcell.detailTextLabel.text = specifier.subtitle;\n\t\tIASK_IF_IOS7_OR_GREATER\n\t\t(if (specifier.textAlignment != NSTextAlignmentLeft) {\n\t\t\tcell.textLabel.textColor = tableView.tintColor;\n\t\t});\n\t\tcell.textLabel.textAlignment = specifier.textAlignment;\n\t\tcell.accessoryType = (specifier.textAlignment == NSTextAlignmentLeft) ? UITableViewCellAccessoryDisclosureIndicator : UITableViewCellAccessoryNone;\n\t} else if ([specifier.type isEqualToString:kIASKPSRadioGroupSpecifier]) {\n\t\tNSInteger index = [specifier.multipleValues indexOfObject:specifier.radioGroupValue];\n\t\tcell.textLabel.text = [self.settingsReader titleForId:specifier.multipleTitles[index]];\n\t\t[_selections[indexPath.section] updateSelectionInCell:cell indexPath:indexPath];\n\t} else {\n\t\tcell.textLabel.text = specifier.title;\n\t}\n    \n\tcell.imageView.image = specifier.cellImage;\n\tcell.imageView.highlightedImage = specifier.highlightedCellImage;\n    \n\tif (![specifier.type isEqualToString:kIASKPSMultiValueSpecifier] && ![specifier.type isEqualToString:kIASKPSTitleValueSpecifier] && ![specifier.type isEqualToString:kIASKPSTextFieldSpecifier] && ![specifier.type isEqualToString:kIASKTextViewSpecifier]) {\n\t\tcell.textLabel.textAlignment = specifier.textAlignment;\n\t}\n\tcell.detailTextLabel.textAlignment = specifier.textAlignment;\n\tcell.textLabel.adjustsFontSizeToFitWidth = specifier.adjustsFontSizeToFitWidth;\n\tcell.detailTextLabel.adjustsFontSizeToFitWidth = specifier.adjustsFontSizeToFitWidth;\n    return cell;\n}\n\n- (NSIndexPath *)tableView:(UITableView *)tableView willSelectRowAtIndexPath:(NSIndexPath *)indexPath {\n\t//create a set of specifier types that can't be selected\n\tstatic NSSet* noSelectionTypes = nil;\n\tif(nil == noSelectionTypes) {\n\t\tnoSelectionTypes = [NSSet setWithObjects:kIASKPSToggleSwitchSpecifier, kIASKPSSliderSpecifier, nil];\n\t}\n  \n\tIASKSpecifier *specifier  = [self.settingsReader specifierForIndexPath:indexPath];\n\tif([noSelectionTypes containsObject:specifier.type]) {\n\t\treturn nil;\n\t} else {\n\t\treturn indexPath;\n\t}\n}\n\n- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {\n    IASKSpecifier *specifier  = [self.settingsReader specifierForIndexPath:indexPath];\n    \n    //switches and sliders can't be selected (should be captured by tableView:willSelectRowAtIndexPath: delegate method)\n    assert(![[specifier type] isEqualToString:kIASKPSToggleSwitchSpecifier]);\n    assert(![[specifier type] isEqualToString:kIASKPSSliderSpecifier]);\n    \n    if ([[specifier type] isEqualToString:kIASKPSMultiValueSpecifier]) {\n        IASKSpecifierValuesViewController *targetViewController = [[IASKSpecifierValuesViewController alloc] init];\n        [targetViewController setCurrentSpecifier:specifier];\n        targetViewController.settingsReader = self.settingsReader;\n        targetViewController.settingsStore = self.settingsStore;\n\t\tIASK_IF_IOS7_OR_GREATER(targetViewController.view.tintColor = self.view.tintColor;)\n        _currentChildViewController = targetViewController;\n        [[self navigationController] pushViewController:targetViewController animated:YES];\n        \n    } else if ([[specifier type] isEqualToString:kIASKPSTextFieldSpecifier]) {\n        IASKPSTextFieldSpecifierViewCell *textFieldCell = (id)[tableView cellForRowAtIndexPath:indexPath];\n        [textFieldCell.textField becomeFirstResponder];\t\t\n\t} else if ([[specifier type] isEqualToString:kIASKPSChildPaneSpecifier]) {\n        if ([specifier viewControllerStoryBoardID]){\n            NSString *storyBoardFileFromSpecifier = [specifier viewControllerStoryBoardFile];\n            storyBoardFileFromSpecifier = storyBoardFileFromSpecifier && storyBoardFileFromSpecifier.length > 0 ? storyBoardFileFromSpecifier : [[NSBundle mainBundle].infoDictionary objectForKey:@\"UIMainStoryboardFile\"];\n\t\t\tUIStoryboard *storyBoard = [UIStoryboard storyboardWithName:storyBoardFileFromSpecifier bundle:nil];\n\t\t\tUIViewController * vc = [storyBoard instantiateViewControllerWithIdentifier:[specifier viewControllerStoryBoardID]];\n\t\t\tIASK_IF_IOS7_OR_GREATER(vc.view.tintColor = self.view.tintColor;)\n            [self.navigationController pushViewController:vc animated:YES];\n\t\t\treturn;\n\t\t}\n        \n        Class vcClass = [specifier viewControllerClass];\n        if (vcClass) {\n\t\t\tif (vcClass == [NSNull class]) {\n\t\t\t\tNSLog(@\"class '%@' not found\", [specifier localizedObjectForKey:kIASKViewControllerClass]);\n\t\t\t\t[tableView deselectRowAtIndexPath:indexPath animated:YES];\n\t\t\t\treturn;\n\t\t\t}\n            SEL initSelector = [specifier viewControllerSelector];\n            if (!initSelector) {\n                initSelector = @selector(init);\n            }\n            UIViewController * vc = [vcClass alloc];\n#pragma clang diagnostic push\n#pragma clang diagnostic ignored \"-Warc-performSelector-leaks\"\n            vc = [vc performSelector:initSelector withObject:[specifier file] withObject:specifier];\n#pragma clang diagnostic pop\n            if ([vc respondsToSelector:@selector(setDelegate:)]) {\n                [vc performSelector:@selector(setDelegate:) withObject:self.delegate];\n            }\n            if ([vc respondsToSelector:@selector(setSettingsStore:)]) {\n                [vc performSelector:@selector(setSettingsStore:) withObject:self.settingsStore];\n            }\n\t\t\tIASK_IF_IOS7_OR_GREATER(vc.view.tintColor = self.view.tintColor;)\n            [self.navigationController pushViewController:vc animated:YES];\n            return;\n\t\t}\n\t\t\t\n        NSString *segueIdentifier = [specifier segueIdentifier];\n        if (segueIdentifier) {\n\t\t\t@try {\n\t\t\t\t[self performSegueWithIdentifier:segueIdentifier sender:self];\n\t\t\t} @catch (NSException *exception) {\n\t\t\t\tNSLog(@\"segue with identifier '%@' not defined\", segueIdentifier);\n\t\t\t\t[tableView deselectRowAtIndexPath:indexPath animated:YES];\n\t\t\t}\n            return;\n        }\n        \n        if (nil == [specifier file]) {\n            [tableView deselectRowAtIndexPath:indexPath animated:YES];\n            return;\n        }\n        \n        _reloadDisabled = YES; // Disable internal unnecessary reloads\n        \n        IASKAppSettingsViewController *targetViewController = [[[self class] alloc] init];\n        targetViewController.showDoneButton = NO;\n        targetViewController.showCreditsFooter = NO; // Does not reload the tableview (but next setters do it)\n        targetViewController.delegate = self.delegate;\n        targetViewController.settingsStore = self.settingsStore;\n        targetViewController.file = specifier.file;\n        targetViewController.hiddenKeys = self.hiddenKeys;\n        targetViewController.title = specifier.title;\n\t\tIASK_IF_IOS7_OR_GREATER(targetViewController.view.tintColor = self.view.tintColor;)\n        _currentChildViewController = targetViewController;\n        \n        _reloadDisabled = NO;\n\t\t\n        [[self navigationController] pushViewController:targetViewController animated:YES];\n        \n    } else if ([[specifier type] isEqualToString:kIASKOpenURLSpecifier]) {\n        [tableView deselectRowAtIndexPath:indexPath animated:YES];\n\t\t[[UIApplication sharedApplication] openURL:[NSURL URLWithString:[specifier localizedObjectForKey:kIASKFile]]];\n    } else if ([[specifier type] isEqualToString:kIASKButtonSpecifier]) {\n        [tableView deselectRowAtIndexPath:indexPath animated:YES];\n        if ([self.delegate respondsToSelector:@selector(settingsViewController:buttonTappedForSpecifier:)]) {\n            [self.delegate settingsViewController:self buttonTappedForSpecifier:specifier];\n        } else if ([self.delegate respondsToSelector:@selector(settingsViewController:buttonTappedForKey:)]) {\n            // deprecated, provided for backward compatibility\n            NSLog(@\"InAppSettingsKit Warning: -settingsViewController:buttonTappedForKey: is deprecated. Please use -settingsViewController:buttonTappedForSpecifier:\");\n#pragma clang diagnostic push\n#pragma clang diagnostic ignored \"-Wdeprecated-declarations\"\n            [self.delegate settingsViewController:self buttonTappedForKey:[specifier key]];\n#pragma clang diagnostic pop\n        } else {\n            // legacy code, provided for backward compatibility\n            // the delegate mechanism above is much cleaner and doesn't leak\n            Class buttonClass = [specifier buttonClass];\n            SEL buttonAction = [specifier buttonAction];\n            if ([buttonClass respondsToSelector:buttonAction]) {\n#pragma clang diagnostic push\n#pragma clang diagnostic ignored \"-Warc-performSelector-leaks\"\n                [buttonClass performSelector:buttonAction withObject:self withObject:[specifier key]];\n#pragma clang diagnostic pop\n                NSLog(@\"InAppSettingsKit Warning: Using IASKButtonSpecifier without implementing the delegate method is deprecated\");\n            }\n        }\n    } else if ([[specifier type] isEqualToString:kIASKMailComposeSpecifier]) {\n        [tableView deselectRowAtIndexPath:indexPath animated:YES];\n        if ([MFMailComposeViewController canSendMail]) {\n            MFMailComposeViewController *mailViewController = [[MFMailComposeViewController alloc] init];\n            mailViewController.navigationBar.barStyle = self.navigationController.navigationBar.barStyle;\n\t\t\tIASK_IF_IOS7_OR_GREATER(mailViewController.navigationBar.tintColor = self.navigationController.navigationBar.tintColor;);\n            mailViewController.navigationBar.titleTextAttributes =  self.navigationController.navigationBar.titleTextAttributes;\n            \n            if ([specifier localizedObjectForKey:kIASKMailComposeSubject]) {\n                [mailViewController setSubject:[specifier localizedObjectForKey:kIASKMailComposeSubject]];\n            }\n            if ([[specifier specifierDict] objectForKey:kIASKMailComposeToRecipents]) {\n                [mailViewController setToRecipients:[[specifier specifierDict] objectForKey:kIASKMailComposeToRecipents]];\n            }\n            if ([[specifier specifierDict] objectForKey:kIASKMailComposeCcRecipents]) {\n                [mailViewController setCcRecipients:[[specifier specifierDict] objectForKey:kIASKMailComposeCcRecipents]];\n            }\n            if ([[specifier specifierDict] objectForKey:kIASKMailComposeBccRecipents]) {\n                [mailViewController setBccRecipients:[[specifier specifierDict] objectForKey:kIASKMailComposeBccRecipents]];\n            }\n            if ([specifier localizedObjectForKey:kIASKMailComposeBody]) {\n                BOOL isHTML = NO;\n                if ([[specifier specifierDict] objectForKey:kIASKMailComposeBodyIsHTML]) {\n                    isHTML = [[[specifier specifierDict] objectForKey:kIASKMailComposeBodyIsHTML] boolValue];\n                }\n                \n                if ([self.delegate respondsToSelector:@selector(settingsViewController:mailComposeBodyForSpecifier:)]) {\n                    [mailViewController setMessageBody:[self.delegate settingsViewController:self\n                                                                 mailComposeBodyForSpecifier:specifier] isHTML:isHTML];\n                }\n                else {\n                    [mailViewController setMessageBody:[specifier localizedObjectForKey:kIASKMailComposeBody] isHTML:isHTML];\n                }\n            }\n            \n            UIViewController<MFMailComposeViewControllerDelegate> *vc = nil;\n            \n            if ([self.delegate respondsToSelector:@selector(settingsViewController:viewControllerForMailComposeViewForSpecifier:)]) {\n                vc = [self.delegate settingsViewController:self viewControllerForMailComposeViewForSpecifier:specifier];\n            }\n            \n            if (vc == nil) {\n                vc = self;\n            }\n            \n            mailViewController.mailComposeDelegate = vc;\n            _currentChildViewController = mailViewController;\n            UIStatusBarStyle savedStatusBarStyle = [UIApplication sharedApplication].statusBarStyle;\n            [vc presentViewController:mailViewController animated:YES completion:^{\n\t\t\t    [UIApplication sharedApplication].statusBarStyle = savedStatusBarStyle;\n            }];\n\t\t\t\n        } else {\n\t\t\tIASK_IF_PRE_IOS8\n\t\t\t(\n            UIAlertView *alert = [[UIAlertView alloc]\n                                  initWithTitle:NSLocalizedString(@\"Mail not configured\", @\"InAppSettingsKit\")\n                                  message:NSLocalizedString(@\"This device is not configured for sending Email. Please configure the Mail settings in the Settings app.\", @\"InAppSettingsKit\")\n                                  delegate: nil\n                                  cancelButtonTitle:NSLocalizedString(@\"OK\", @\"InAppSettingsKit\")\n                                  otherButtonTitles:nil];\n            [alert show];\n\t\t\t )\n\t\t\tIASK_IF_IOS8_OR_GREATER\n\t\t\t(\n\t\t\t UIAlertController *alert = [UIAlertController alertControllerWithTitle:NSLocalizedString(@\"Mail not configured\", @\"InAppSettingsKit\")\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tmessage:NSLocalizedString(@\"This device is not configured for sending Email. Please configure the Mail settings in the Settings app.\", @\"InAppSettingsKit\")\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t preferredStyle:UIAlertControllerStyleAlert];\n\t\t\t [alert addAction:[UIAlertAction actionWithTitle:NSLocalizedString(@\"OK\", @\"InAppSettingsKit\") style:UIAlertActionStyleCancel handler:^(UIAlertAction * action) {}]];\n\t\t\t [self presentViewController:alert animated:YES completion:nil];\n\t\t\t)\n        }\n\t\t\n    } else if ([[specifier type] isEqualToString:kIASKCustomViewSpecifier] && [self.delegate respondsToSelector:@selector(settingsViewController:tableView:didSelectCustomViewSpecifier:)]) {\n        [self.delegate settingsViewController:self tableView:tableView didSelectCustomViewSpecifier:specifier];\n\t} else if ([[specifier type] isEqualToString:kIASKPSRadioGroupSpecifier]) {\n\t\t[_selections[indexPath.section] selectRowAtIndexPath:indexPath];\n    } else {\n        [tableView deselectRowAtIndexPath:indexPath animated:NO];\n    }\n}\n\n\n#pragma mark -\n#pragma mark MFMailComposeViewControllerDelegate Function\n\n-(void)mailComposeController:(MFMailComposeViewController*)controller didFinishWithResult:(MFMailComposeResult)result error:(NSError*)error {\n    \n    // Forward the mail compose delegate\n    if ([self.delegate respondsToSelector:@selector(settingsViewController:mailComposeController:didFinishWithResult:error:)]) {\n         [self.delegate settingsViewController:self \n                         mailComposeController:controller \n                           didFinishWithResult:result \n                                         error:error];\n    }\n    \n    [self dismissViewControllerAnimated:YES\n                             completion:nil];\n}\n\n#pragma mark -\n#pragma mark UITextFieldDelegate Functions\n\n- (void)textFieldDidBeginEditing:(UITextField *)textField {\n\tself.currentFirstResponder = textField;\n}\n\n- (void)_textChanged:(id)sender {\n    IASKTextField *text = sender;\n    [_settingsStore setObject:[text text] forKey:[text key]];\n    [[NSNotificationCenter defaultCenter] postNotificationName:kIASKAppSettingChanged\n                                                        object:self\n                                                      userInfo:[NSDictionary dictionaryWithObject:[text text]\n                                                                                           forKey:[text key]]];\n}\n\n- (BOOL)textFieldShouldReturn:(UITextField *)textField{\n\t[textField resignFirstResponder];\n\tself.currentFirstResponder = nil;\n\treturn YES;\n}\n\n- (void)singleTapToEndEdit:(UIGestureRecognizer *)sender {\n    [self.tableView endEditing:NO];\n}\n\n#pragma mark - UITextViewDelegate\n\n- (void)textViewDidEndEditing:(UITextView *)textView {\n\tself.currentFirstResponder = textView;\n}\n\n- (void)textViewDidChange:(IASKTextView *)textView {\n\t[self cacheRowHeightForTextView:textView];\n\t\n\tCGRect visibleTableRect = UIEdgeInsetsInsetRect(self.tableView.bounds, self.tableView.contentInset);\n\tNSIndexPath *indexPath = [self.settingsReader indexPathForKey:textView.key];\n\tCGRect cellFrame = [self.tableView rectForRowAtIndexPath:indexPath];\n\t\n\tif (!CGRectContainsRect(visibleTableRect, cellFrame)) {\n\t\t[self.tableView scrollRectToVisible:CGRectInset(cellFrame, 0, - 30) animated:YES];\n\t}\n\n\t[_settingsStore setObject:textView.text forKey:textView.key];\n\t[[NSNotificationCenter defaultCenter] postNotificationName:kIASKAppSettingChanged\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tobject:textView.key\n\t\t\t\t\t\t\t\t\t\t\t\t\t  userInfo:@{textView.key: textView.text}];\n\t\n}\n\n- (void)cacheRowHeightForTextView:(IASKTextView *)textView {\n\tCGFloat maxHeight = self.tableView.bounds.size.height - self.tableView.contentInset.top - self.tableView.contentInset.bottom - 60;\n\tCGFloat contentHeight = [textView sizeThatFits:CGSizeMake(textView.frame.size.width, 10000)].height + 16;\n\tself.rowHeights[textView.key] = @(MAX(44, MIN(maxHeight, contentHeight)));\n\ttextView.scrollEnabled = contentHeight > maxHeight;\n\n\t[self.tableView beginUpdates];\n\t[self.tableView endUpdates];\n}\n\n#pragma mark Notifications\n\n- (void)synchronizeSettings {\n    [_settingsStore synchronize];\n}\n\nstatic NSDictionary *oldUserDefaults = nil;\n- (void)userDefaultsDidChange {\n\tdispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.5 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{\n\t\tIASKSettingsStoreUserDefaults *udSettingsStore = (id)self.settingsStore;\n\t\tNSDictionary *currentDict = udSettingsStore.defaults.dictionaryRepresentation;\n\t\tNSMutableArray *indexPathsToUpdate = [NSMutableArray array];\n\t\tfor (NSString *key in currentDict.allKeys) {\n\t\t\tif (oldUserDefaults && ![[oldUserDefaults valueForKey:key] isEqual:[currentDict valueForKey:key]]) {\n\t\t\t\tNSIndexPath *path = [self.settingsReader indexPathForKey:key];\n\t\t\t\tif (path && ![[self.settingsReader specifierForKey:key].type isEqualToString:kIASKCustomViewSpecifier] && [self.tableView.indexPathsForVisibleRows containsObject:path]) {\n\t\t\t\t\t[indexPathsToUpdate addObject:path];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\toldUserDefaults = currentDict;\n\t\t\n\t\tfor (UITableViewCell *cell in self.tableView.visibleCells) {\n\t\t\tif ([cell isKindOfClass:[IASKPSTextFieldSpecifierViewCell class]] && [((IASKPSTextFieldSpecifierViewCell*)cell).textField isFirstResponder]) {\n\t\t\t\t[indexPathsToUpdate removeObject:[self.tableView indexPathForCell:cell]];\n\t\t\t}\n\t\t}\n\t\tif (indexPathsToUpdate.count) {\n\t\t\t[self.tableView reloadRowsAtIndexPaths:indexPathsToUpdate withRowAnimation:UITableViewRowAnimationAutomatic];\n\t\t}\n\t});\n}\n\n- (void)didChangeSettingViaIASK:(NSNotification*)notification {\n\tNSString *key = notification.userInfo.allKeys.firstObject;\n\t[oldUserDefaults setValue:notification.userInfo[key] forKey:key];\n}\n\n- (void)reload {\n\t// wait 0.5 sec until UI is available after applicationWillEnterForeground\n\t[self.tableView performSelector:@selector(reloadData) withObject:nil afterDelay:0.5];\n}\n\n#pragma mark CGRect Utility function\nCGRect IASKCGRectSwap(CGRect rect) {\n\tCGRect newRect;\n\tnewRect.origin.x = rect.origin.y;\n\tnewRect.origin.y = rect.origin.x;\n\tnewRect.size.width = rect.size.height;\n\tnewRect.size.height = rect.size.width;\n\treturn newRect;\n}\n@end\n"
  },
  {
    "path": "ArcBit/External/InAppSettingsKit/Controllers/IASKAppSettingsWebViewController.h",
    "content": "//\n//  IASKAppSettingsWebViewController.h\n//  http://www.inappsettingskit.com\n//\n//  Copyright (c) 2009:\n//  Luc Vandal, Edovia Inc., http://www.edovia.com\n//  Ortwin Gentz, FutureTap GmbH, http://www.futuretap.com\n//  All rights reserved.\n// \n//  It is appreciated but not required that you give credit to Luc Vandal and Ortwin Gentz, \n//  as the original authors of this code. You can give credit in a blog post, a tweet or on \n//  a info page of your app. Also, the original authors appreciate letting them know if you use this code.\n//\n//  This code is licensed under the BSD license that is available at: http://www.opensource.org/licenses/bsd-license.php\n//\n\n#import <UIKit/UIKit.h>\n#import <MessageUI/MessageUI.h>\n#import \"IASKSpecifier.h\"\n\n@interface IASKAppSettingsWebViewController : UIViewController <UIWebViewDelegate, MFMailComposeViewControllerDelegate>\n\n- (id)initWithFile:(NSString*)htmlFileName specifier:(IASKSpecifier*)specifier;\n\n@property (nonatomic, strong) UIWebView *webView;\n@property (nonatomic, strong) NSURL *url;\n@property (nonatomic, strong) NSString *customTitle;\n\n@end\n"
  },
  {
    "path": "ArcBit/External/InAppSettingsKit/Controllers/IASKAppSettingsWebViewController.m",
    "content": "//\n//  IASKAppSettingsWebViewController.h\n//  http://www.inappsettingskit.com\n//\n//  Copyright (c) 2010:\n//  Luc Vandal, Edovia Inc., http://www.edovia.com\n//  Ortwin Gentz, FutureTap GmbH, http://www.futuretap.com\n//  All rights reserved.\n// \n//  It is appreciated but not required that you give credit to Luc Vandal and Ortwin Gentz, \n//  as the original authors of this code. You can give credit in a blog post, a tweet or on \n//  a info page of your app. Also, the original authors appreciate letting them know if you use this code.\n//\n//  This code is licensed under the BSD license that is available at: http://www.opensource.org/licenses/bsd-license.php\n//\n\n#import \"IASKAppSettingsWebViewController.h\"\n#import \"IASKSettingsReader.h\"\n\n@implementation IASKAppSettingsWebViewController\n\n- (id)initWithFile:(NSString*)urlString specifier:(IASKSpecifier*)specifier {\n    self = [super init];\n    if (self) {\n        self.url = [NSURL URLWithString:urlString];\n        if (!self.url || ![self.url scheme]) {\n            NSString *path = [[NSBundle mainBundle] pathForResource:[urlString stringByDeletingPathExtension] ofType:[urlString pathExtension]];\n            if(path)\n                self.url = [NSURL fileURLWithPath:path];\n            else\n                self.url = nil;\n        }\n\t\tself.customTitle = [specifier localizedObjectForKey:kIASKChildTitle];\n\t\tself.title = self.customTitle ? : specifier.title;\n    }\n    return self;\n}\n\n- (void)loadView {\n    self.webView = [[UIWebView alloc] init];\n    self.webView.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;\n    self.webView.delegate = self;\n    \n    self.view = self.webView;\n}\n\n- (void)viewWillAppear:(BOOL)animated {\n\t[super viewWillAppear:animated];\n\t\n\tUIActivityIndicatorView *activityIndicatorView = [[UIActivityIndicatorView alloc] initWithFrame:CGRectMake(0, 0, 40, 20)];\n\tactivityIndicatorView.activityIndicatorViewStyle = UIActivityIndicatorViewStyleWhite;\n\t[activityIndicatorView startAnimating];\n\tself.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithCustomView:activityIndicatorView];\n\t[self.webView loadRequest:[NSURLRequest requestWithURL:self.url]];\n}\n\n- (void)webViewDidFinishLoad:(UIWebView *)webView {\n\tself.navigationItem.rightBarButtonItem = nil;\n\tself.title = self.customTitle.length ? self.customTitle : [self.webView stringByEvaluatingJavaScriptFromString:@\"document.title\"];\n}\n\n- (BOOL)webView:(UIWebView *)webView shouldStartLoadWithRequest:(NSURLRequest *)request navigationType:(UIWebViewNavigationType)navigationType {\n\tNSURL *newURL = [request URL];\n\t\n\t// intercept mailto URL and send it to an in-app Mail compose view instead\n\tif ([[newURL scheme] isEqualToString:@\"mailto\"]) {\n\n\t\tNSArray *rawURLparts = [[newURL resourceSpecifier] componentsSeparatedByString:@\"?\"];\n\t\tif (rawURLparts.count > 2) {\n\t\t\treturn NO; // invalid URL\n\t\t}\n\t\t\n\t\tMFMailComposeViewController *mailViewController = [[MFMailComposeViewController alloc] init];\n\t\tmailViewController.mailComposeDelegate = self;\n\n\t\tNSMutableArray *toRecipients = [NSMutableArray array];\n\t\tNSString *defaultRecipient = [rawURLparts objectAtIndex:0];\n\t\tif (defaultRecipient.length) {\n\t\t\t[toRecipients addObject:defaultRecipient];\n\t\t}\n\t\t\n\t\tif (rawURLparts.count == 2) {\n\t\t\tNSString *queryString = [rawURLparts objectAtIndex:1];\n\t\t\t\n\t\t\tNSArray *params = [queryString componentsSeparatedByString:@\"&\"];\n\t\t\tfor (NSString *param in params) {\n\t\t\t\tNSArray *keyValue = [param componentsSeparatedByString:@\"=\"];\n\t\t\t\tif (keyValue.count != 2) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tNSString *key = [[keyValue objectAtIndex:0] lowercaseString];\n\t\t\t\tNSString *value = [keyValue objectAtIndex:1];\n\t\t\t\t\n\t\t\t\tvalue =  CFBridgingRelease(CFURLCreateStringByReplacingPercentEscapesUsingEncoding(kCFAllocatorDefault,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t (CFStringRef)value,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t CFSTR(\"\"),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t kCFStringEncodingUTF8));\n\t\t\t\t\n\t\t\t\tif ([key isEqualToString:@\"subject\"]) {\n\t\t\t\t\t[mailViewController setSubject:value];\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif ([key isEqualToString:@\"body\"]) {\n\t\t\t\t\t[mailViewController setMessageBody:value isHTML:NO];\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif ([key isEqualToString:@\"to\"]) {\n\t\t\t\t\t[toRecipients addObjectsFromArray:[value componentsSeparatedByString:@\",\"]];\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif ([key isEqualToString:@\"cc\"]) {\n\t\t\t\t\tNSArray *recipients = [value componentsSeparatedByString:@\",\"];\n\t\t\t\t\t[mailViewController setCcRecipients:recipients];\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif ([key isEqualToString:@\"bcc\"]) {\n\t\t\t\t\tNSArray *recipients = [value componentsSeparatedByString:@\",\"];\n\t\t\t\t\t[mailViewController setBccRecipients:recipients];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t[mailViewController setToRecipients:toRecipients];\n\n\t\tmailViewController.navigationBar.barStyle = self.navigationController.navigationBar.barStyle;\n\t\tIASK_IF_IOS7_OR_GREATER(mailViewController.navigationBar.tintColor = self.navigationController.navigationBar.tintColor;);\n\t\tmailViewController.navigationBar.titleTextAttributes =  self.navigationController.navigationBar.titleTextAttributes;\n\n\t\tUIStatusBarStyle savedStatusBarStyle = [UIApplication sharedApplication].statusBarStyle;\n\t\t[self presentViewController:mailViewController animated:YES completion:^{\n\t\t\t[UIApplication sharedApplication].statusBarStyle = savedStatusBarStyle;\n\t\t}];\n\t\treturn NO;\n\t}\n\t\n\t// open inline if host is the same, otherwise, pass to the system\n\tif (![newURL host] || [[newURL host] isEqualToString:[self.url host]]) {\n\t\treturn YES;\n\t}\n\t[[UIApplication sharedApplication] openURL:newURL];\n\treturn NO;\n}\n\n- (void)mailComposeController:(MFMailComposeViewController*)controller didFinishWithResult:(MFMailComposeResult)result error:(NSError*)error {\n    [self dismissViewControllerAnimated:YES completion:nil];\n}\n\n@end\n"
  },
  {
    "path": "ArcBit/External/InAppSettingsKit/Controllers/IASKMultipleValueSelection.h",
    "content": "#import <UIKit/UIKit.h>\n\n@class IASKSpecifier;\n@protocol IASKSettingsStore;\n\n/// Encapsulates the selection among multiple values.\n/// This is used for PSMultiValueSpecifier and PSRadioGroupSpecifier\n@interface IASKMultipleValueSelection : NSObject\n\n@property (nonatomic, assign) UITableView *tableView;\n@property (nonatomic, retain) IASKSpecifier *specifier;\n@property (nonatomic, assign) NSInteger section;\n@property (nonatomic, copy, readonly) NSIndexPath *checkedItem;\n@property (nonatomic, strong) id<IASKSettingsStore> settingsStore;\n\n- (void)selectRowAtIndexPath:(NSIndexPath *)indexPath;\n- (void)updateSelectionInCell:(UITableViewCell *)cell indexPath:(NSIndexPath *)indexPath;\n\n@end\n"
  },
  {
    "path": "ArcBit/External/InAppSettingsKit/Controllers/IASKMultipleValueSelection.m",
    "content": "#import \"IASKMultipleValueSelection.h\"\n\n#import \"IASKSettingsStore.h\"\n#import \"IASKSettingsStoreUserDefaults.h\"\n#import \"IASKSpecifier.h\"\n#import \"IASKSettingsReader.h\"\n\n@implementation IASKMultipleValueSelection {\n    NSInteger _checkedIndex;\n}\n\n@synthesize settingsStore = _settingsStore;\n\n- (void)dealloc {\n    [[NSNotificationCenter defaultCenter] removeObserver:self name:NSUserDefaultsDidChangeNotification object:nil];\n}\n\n- (void)setSpecifier:(IASKSpecifier *)specifier {\n    _specifier = specifier;\n    [self updateCheckedItem];\n}\n\n- (NSIndexPath *)checkedItem {\n    return [NSIndexPath indexPathForRow:_checkedIndex inSection:_section];;\n}\n\n- (void)updateCheckedItem {\n    // Find the currently checked item\n    id value = [self.settingsStore objectForKey:[_specifier key]];\n    if (!value) {\n        value = [_specifier defaultValue];\n    }\n    _checkedIndex = [[_specifier multipleValues] indexOfObject:value];\n}\n\n- (id<IASKSettingsStore>)settingsStore {\n    if (_settingsStore == nil) {\n        self.settingsStore = [[IASKSettingsStoreUserDefaults alloc] init];\n    }\n    return _settingsStore;\n}\n\n- (void)setSettingsStore:(id<IASKSettingsStore>)settingsStore {\n\tif ([_settingsStore isKindOfClass:IASKSettingsStoreUserDefaults.class]) {\n\t\tIASKSettingsStoreUserDefaults *udSettingsStore = (id)_settingsStore;\n\t\t[[NSNotificationCenter defaultCenter] removeObserver:self name:NSUserDefaultsDidChangeNotification object:udSettingsStore.defaults];\n\t}\n\t\n\t_settingsStore = settingsStore;\n\t\n\tif ([settingsStore isKindOfClass:IASKSettingsStoreUserDefaults.class]) {\n\t\tIASKSettingsStoreUserDefaults *udSettingsStore = (id)settingsStore;\n\t\t[[NSNotificationCenter defaultCenter] addObserver:self\n\t\t\t\t\t\t\t\t\t\t\t\t selector:@selector(userDefaultsDidChange)\n\t\t\t\t\t\t\t\t\t\t\t\t\t name:NSUserDefaultsDidChangeNotification\n\t\t\t\t\t\t\t\t\t\t\t\t   object:udSettingsStore.defaults];\n\t}\n}\n\n#pragma mark - selection\n\n- (void)selectRowAtIndexPath:(NSIndexPath *)indexPath {\n\n    if (indexPath == self.checkedItem) {\n        [self.tableView deselectRowAtIndexPath:indexPath animated:YES];\n        return;\n    }\n\n    NSArray *values = [_specifier multipleValues];\n\n    [self.tableView deselectRowAtIndexPath:indexPath animated:YES];\n    [self deselectCell:[self.tableView cellForRowAtIndexPath:self.checkedItem]];\n    [self selectCell:[self.tableView cellForRowAtIndexPath:indexPath]];\n    _checkedIndex = indexPath.row;\n\n    [self.settingsStore setObject:[values objectAtIndex:indexPath.row] forKey:[_specifier key]];\n    [self.settingsStore synchronize];\n    [[NSNotificationCenter defaultCenter] postNotificationName:kIASKAppSettingChanged\n                                                        object:self\n                                                      userInfo:@{\n                                                          _specifier.key: values[indexPath.row]\n                                                      }];\n};\n\n- (void)updateSelectionInCell:(UITableViewCell *)cell indexPath:(NSIndexPath *)indexPath {\n    if ([indexPath isEqual:self.checkedItem]) {\n        [self selectCell:cell];\n    } else {\n        [self deselectCell:cell];\n    }\n}\n\n- (void)selectCell:(UITableViewCell *)cell {\n    [cell setAccessoryType:UITableViewCellAccessoryCheckmark];\n    IASK_IF_PRE_IOS7([[cell textLabel] setTextColor:kIASKgrayBlueColor];);\n}\n\n- (void)deselectCell:(UITableViewCell *)cell {\n    [cell setAccessoryType:UITableViewCellAccessoryNone];\n    IASK_IF_PRE_IOS7([[cell textLabel] setTextColor:[UIColor darkTextColor]];);\n}\n\n\n#pragma mark Notifications\n\n- (void)userDefaultsDidChange {\n    NSIndexPath *oldCheckedItem = self.checkedItem;\n    if (_specifier) {\n        [self updateCheckedItem];\n    }\n\n    // only reload the table if it had changed; prevents animation cancellation\n    if (![self.checkedItem isEqual:oldCheckedItem]) {\n        [self.tableView reloadData];\n    }\n}\n\n@end\n"
  },
  {
    "path": "ArcBit/External/InAppSettingsKit/Controllers/IASKSpecifierValuesViewController.h",
    "content": "//\n//  IASKSpecifierValuesViewController.h\n//  http://www.inappsettingskit.com\n//\n//  Copyright (c) 2009:\n//  Luc Vandal, Edovia Inc., http://www.edovia.com\n//  Ortwin Gentz, FutureTap GmbH, http://www.futuretap.com\n//  All rights reserved.\n// \n//  It is appreciated but not required that you give credit to Luc Vandal and Ortwin Gentz, \n//  as the original authors of this code. You can give credit in a blog post, a tweet or on \n//  a info page of your app. Also, the original authors appreciate letting them know if you use this code.\n//\n//  This code is licensed under the BSD license that is available at: http://www.opensource.org/licenses/bsd-license.php\n//\n\n#import <UIKit/UIKit.h>\n#import \"IASKSettingsStore.h\"\n#import \"IASKViewController.h\"\n@class IASKSpecifier;\n@class IASKSettingsReader;\n\n@interface IASKSpecifierValuesViewController : UIViewController<IASKViewController,UITableViewDelegate,UITableViewDataSource> {\n    UITableView\t\t\t\t*_tableView;\n    \n    IASKSpecifier\t\t\t*_currentSpecifier;\n\tIASKSettingsReader\t\t*_settingsReader;\n}\n\n@property (nonatomic, retain) UITableView *tableView;\n@property (nonatomic, retain) IASKSpecifier *currentSpecifier;\n\n@end\n"
  },
  {
    "path": "ArcBit/External/InAppSettingsKit/Controllers/IASKSpecifierValuesViewController.m",
    "content": "//\n//  IASKSpecifierValuesViewController.m\n//  http://www.inappsettingskit.com\n//\n//  Copyright (c) 2009:\n//  Luc Vandal, Edovia Inc., http://www.edovia.com\n//  Ortwin Gentz, FutureTap GmbH, http://www.futuretap.com\n//  All rights reserved.\n// \n//  It is appreciated but not required that you give credit to Luc Vandal and Ortwin Gentz, \n//  as the original authors of this code. You can give credit in a blog post, a tweet or on \n//  a info page of your app. Also, the original authors appreciate letting them know if you use this code.\n//\n//  This code is licensed under the BSD license that is available at: http://www.opensource.org/licenses/bsd-license.php\n//\n\n#import \"IASKSpecifierValuesViewController.h\"\n#import \"IASKSpecifier.h\"\n#import \"IASKSettingsReader.h\"\n#import \"IASKMultipleValueSelection.h\"\n\n#define kCellValue      @\"kCellValue\"\n\n@interface IASKSpecifierValuesViewController()\n\n@property (nonatomic, strong, readonly) IASKMultipleValueSelection *selection;\n@property (nonatomic) BOOL didFirstLayout;\n@end\n\n@implementation IASKSpecifierValuesViewController\n\n@synthesize tableView=_tableView;\n@synthesize currentSpecifier=_currentSpecifier;\n@synthesize settingsReader = _settingsReader;\n@synthesize settingsStore = _settingsStore;\n\n- (void)setSettingsStore:(id <IASKSettingsStore>)settingsStore {\n    _settingsStore = settingsStore;\n    _selection.settingsStore = settingsStore;\n}\n\n- (void)loadView\n{\n    _tableView = [[UITableView alloc] initWithFrame:CGRectZero style:UITableViewStyleGrouped];\n    _tableView.autoresizingMask = UIViewAutoresizingFlexibleWidth |\n    UIViewAutoresizingFlexibleHeight;\n    _tableView.delegate = self;\n    _tableView.dataSource = self;\n    \n    self.view = _tableView;\n\n    _selection = [IASKMultipleValueSelection new];\n    _selection.tableView = _tableView;\n    _selection.settingsStore = _settingsStore;\n}\n\n- (void)viewWillAppear:(BOOL)animated {\n    if (_currentSpecifier) {\n        [self setTitle:[_currentSpecifier title]];\n        _selection.specifier = _currentSpecifier;\n    }\n    \n    if (_tableView) {\n        [_tableView reloadData];\n\t\t_selection.tableView = _tableView;\n    }\n\tself.didFirstLayout = NO;\n\t[super viewWillAppear:animated];\n}\n\n- (void)viewDidAppear:(BOOL)animated {\n\t[super viewDidAppear:animated];\n\t[_tableView flashScrollIndicators];\n}\n\n- (void)viewDidLayoutSubviews {\n\t[super viewDidLayoutSubviews];\n\n\tif (!self.didFirstLayout) {\n\t\t// Make sure the currently checked item is visible\n\t\t// this needs to be done as early as possible when pushing the view but after the first layout\n\t\t// otherwise scrolling to the first entry doesn't respect tableView.contentInset\n\t\t[_tableView scrollToRowAtIndexPath:_selection.checkedItem\n\t\t\t\t\t\t  atScrollPosition:UITableViewScrollPositionMiddle animated:NO];\n\t\tself.didFirstLayout = YES;\n\t}\n}\n\n- (void)viewDidDisappear:(BOOL)animated {\n\t[super viewDidDisappear:animated];\n    _selection.tableView = nil;\n}\n\n- (void)didReceiveMemoryWarning {\n\t// Releases the view if it doesn't have a superview.\n    [super didReceiveMemoryWarning];\n\t\n\t// Release any cached data, images, etc that aren't in use.\n}\n\n#pragma mark -\n#pragma mark UITableView delegates\n\n- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {\n\treturn 1;\n}\n\n- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {\n    return [_currentSpecifier multipleValuesCount];\n}\n\n- (NSString *)tableView:(UITableView *)tableView titleForFooterInSection:(NSInteger)section {\n    return [_currentSpecifier footerText];\n}\n\n- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {\n    UITableViewCell *cell   = [tableView dequeueReusableCellWithIdentifier:kCellValue];\n    NSArray *titles         = [_currentSpecifier multipleTitles];\n\t\n    if (!cell) {\n        cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:kCellValue];\n    }\n\n    [_selection updateSelectionInCell:cell indexPath:indexPath];\n\n    @try {\n\t\t[[cell textLabel] setText:[self.settingsReader titleForId:[titles objectAtIndex:indexPath.row]]];\n\t}\n\t@catch (NSException * e) {}\n    return cell;\n}\n\n- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {\n    [_selection selectRowAtIndexPath:indexPath];\n}\n\n- (CGSize)preferredContentSize {\n    return [[self view] sizeThatFits:CGSizeMake(320, 2000)];\n}\n\n@end\n"
  },
  {
    "path": "ArcBit/External/InAppSettingsKit/Controllers/IASKViewController.h",
    "content": "//\n//  IASKAppSettingsViewController.h\n//  http://www.inappsettingskit.com\n//\n//  Copyright (c) 2009:\n//  Luc Vandal, Edovia Inc., http://www.edovia.com\n//  Ortwin Gentz, FutureTap GmbH, http://www.futuretap.com\n//  All rights reserved.\n// \n//  It is appreciated but not required that you give credit to Luc Vandal and Ortwin Gentz, \n//  as the original authors of this code. You can give credit in a blog post, a tweet or on \n//  a info page of your app. Also, the original authors appreciate letting them know if you use this code.\n//\n//  This code is licensed under the BSD license that is available at: http://www.opensource.org/licenses/bsd-license.php\n//\n\n@class IASKSettingsReader;\n@protocol IASKSettingsStore;\n\n// protocol all IASK view controllers implement\n@protocol IASKViewController <NSObject>\n\n@property (nonatomic, retain) IASKSettingsReader* settingsReader;\n@property (nonatomic, retain) id<IASKSettingsStore> settingsStore;\n\n@end\n"
  },
  {
    "path": "ArcBit/External/InAppSettingsKit/Models/IASKSettingsReader.h",
    "content": "//\n//  IASKSettingsReader.h\n//  http://www.inappsettingskit.com\n//\n//  Copyright (c) 2009:\n//  Luc Vandal, Edovia Inc., http://www.edovia.com\n//  Ortwin Gentz, FutureTap GmbH, http://www.futuretap.com\n//  All rights reserved.\n// \n//  It is appreciated but not required that you give credit to Luc Vandal and Ortwin Gentz, \n//  as the original authors of this code. You can give credit in a blog post, a tweet or on \n//  a info page of your app. Also, the original authors appreciate letting them know if you use this code.\n//\n//  This code is licensed under the BSD license that is available at: http://www.opensource.org/licenses/bsd-license.php\n//\n\n#import <Foundation/Foundation.h>\n#import <UIKit/UIKit.h>\n\n#define kIASKPreferenceSpecifiers             @\"PreferenceSpecifiers\"\n#define kIASKCellImage                        @\"IASKCellImage\"\n\n#define kIASKType                             @\"Type\"\n#define kIASKTitle                            @\"Title\"\n#define kIASKFooterText                       @\"FooterText\"\n#define kIASKKey                              @\"Key\"\n#define kIASKFile                             @\"File\"\n#define kIASKDefaultValue                     @\"DefaultValue\"\n#define kIASKDisplaySortedByTitle             @\"DisplaySortedByTitle\"\n#define kIASKMinimumValue                     @\"MinimumValue\"\n#define kIASKMaximumValue                     @\"MaximumValue\"\n#define kIASKTrueValue                        @\"TrueValue\"\n#define kIASKFalseValue                       @\"FalseValue\"\n#define kIASKIsSecure                         @\"IsSecure\"\n#define KIASKKeyboardType                     @\"KeyboardType\"\n#define kIASKAutocapitalizationType           @\"AutocapitalizationType\"\n#define kIASKAutoCorrectionType               @\"AutocorrectionType\"\n#define kIASKValues                           @\"Values\"\n#define kIASKTitles                           @\"Titles\"\n#define kIASKShortTitles                      @\"ShortTitles\"\n#define kIASKSupportedUserInterfaceIdioms     @\"SupportedUserInterfaceIdioms\"\n#define kIASKSubtitle                         @\"IASKSubtitle\"\n#define kIASKPlaceholder                      @\"IASKPlaceholder\"\n#define kIASKViewControllerClass              @\"IASKViewControllerClass\"\n#define kIASKViewControllerSelector           @\"IASKViewControllerSelector\"\n#define kIASKViewControllerStoryBoardFile     @\"IASKViewControllerStoryBoardFile\"\n#define kIASKViewControllerStoryBoardId       @\"IASKViewControllerStoryBoardId\"\n#define kIASKSegueIdentifier                  @\"IASKSegueIdentifier\"\n#define kIASKButtonClass                      @\"IASKButtonClass\"\n#define kIASKButtonAction                     @\"IASKButtonAction\"\n#define kIASKMailComposeToRecipents           @\"IASKMailComposeToRecipents\"\n#define kIASKMailComposeCcRecipents           @\"IASKMailComposeCcRecipents\"\n#define kIASKMailComposeBccRecipents          @\"IASKMailComposeBccRecipents\"\n#define kIASKMailComposeSubject               @\"IASKMailComposeSubject\"\n#define kIASKMailComposeBody                  @\"IASKMailComposeBody\"\n#define kIASKMailComposeBodyIsHTML            @\"IASKMailComposeBodyIsHTML\"\n#define kIASKKeyboardAlphabet                 @\"Alphabet\"\n#define kIASKKeyboardNumbersAndPunctuation    @\"NumbersAndPunctuation\"\n#define kIASKKeyboardNumberPad                @\"NumberPad\"\n#define kIASKKeyboardDecimalPad               @\"DecimalPad\"\n#define kIASKKeyboardPhonePad                 @\"PhonePad\"\n#define kIASKKeyboardNamePhonePad             @\"NamePhonePad\"\n#define kIASKKeyboardASCIICapable             @\"AsciiCapable\"\n\n#define KIASKKeyboardURL                      @\"URL\"\n#define kIASKKeyboardEmailAddress             @\"EmailAddress\"\n#define kIASKAutoCapNone                      @\"None\"\n#define kIASKAutoCapSentences                 @\"Sentences\"\n#define kIASKAutoCapWords                     @\"Words\"\n#define kIASKAutoCapAllCharacters             @\"AllCharacters\"\n#define kIASKAutoCorrDefault                  @\"Default\"\n#define kIASKAutoCorrNo                       @\"No\"\n#define kIASKAutoCorrYes                      @\"Yes\"\n#define kIASKMinimumValueImage                @\"MinimumValueImage\"\n#define kIASKMaximumValueImage                @\"MaximumValueImage\"\n#define kIASKAdjustsFontSizeToFitWidth        @\"IASKAdjustsFontSizeToFitWidth\"\n#define kIASKTextLabelAlignment               @\"IASKTextAlignment\"\n#define kIASKTextLabelAlignmentLeft           @\"IASKUITextAlignmentLeft\"\n#define kIASKTextLabelAlignmentCenter         @\"IASKUITextAlignmentCenter\"\n#define kIASKTextLabelAlignmentRight          @\"IASKUITextAlignmentRight\"\n\n#define kIASKPSGroupSpecifier                 @\"PSGroupSpecifier\"\n#define kIASKPSToggleSwitchSpecifier          @\"PSToggleSwitchSpecifier\"\n#define kIASKPSMultiValueSpecifier            @\"PSMultiValueSpecifier\"\n#define kIASKPSRadioGroupSpecifier            @\"PSRadioGroupSpecifier\"\n#define kIASKPSSliderSpecifier                @\"PSSliderSpecifier\"\n#define kIASKPSTitleValueSpecifier            @\"PSTitleValueSpecifier\"\n#define kIASKPSTextFieldSpecifier             @\"PSTextFieldSpecifier\"\n#define kIASKPSChildPaneSpecifier             @\"PSChildPaneSpecifier\"\n#define kIASKTextViewSpecifier                @\"IASKTextViewSpecifier\"\n#define kIASKOpenURLSpecifier                 @\"IASKOpenURLSpecifier\"\n#define kIASKButtonSpecifier                  @\"IASKButtonSpecifier\"\n#define kIASKMailComposeSpecifier             @\"IASKMailComposeSpecifier\"\n#define kIASKCustomViewSpecifier              @\"IASKCustomViewSpecifier\"\n\n// IASKChildTitle can be set if IASKViewControllerClass is set to IASKAppSettingsWebViewController.\n// If IASKChildTitle is set, the navigation title is fixed to it; otherwise, the title value is used and is overridden by the HTML title tag\n// as soon as the web page is loaded; if IASKChildTitle is set to the empty string, the title is not shown on push but _will_ be replaced by\n// the HTML title as soon as the page is loaded. The value of IASKChildTitle is localizable.\n#define kIASKChildTitle                       @\"IASKChildTitle\"\n\n#define kIASKAppSettingChanged                @\"kAppSettingChanged\"\n\n#define kIASKSectionHeaderIndex               0\n\n#define kIASKSliderImageGap                   10\n\n#define kIASKSpacing                          8\n#define kIASKMinLabelWidth                    97\n#define kIASKMaxLabelWidth                    240\n#define kIASKMinValueWidth                    35\n#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 70000\n#define kIASKPaddingLeft                      (floor(NSFoundationVersionNumber) > NSFoundationVersionNumber_iOS_6_1 ? 15 : 9)\n#else\n#define kIASKPaddingLeft                      9\n#endif\n#define kIASKPaddingRight                     10\n#define kIASKHorizontalPaddingGroupTitles     19\n#define kIASKVerticalPaddingGroupTitles       15\n\n#define kIASKLabelFontSize                    17\n#define kIASKgrayBlueColor                    [UIColor colorWithRed:0.318f green:0.4f blue:0.569f alpha:1.f]\n\n#define kIASKMinimumFontSize                  12.0f\n\n#ifndef kCFCoreFoundationVersionNumber_iOS_7_0\n#define kCFCoreFoundationVersionNumber_iOS_7_0 843.00\n#endif\n\n#ifndef kCFCoreFoundationVersionNumber_iOS_8_0\n#define kCFCoreFoundationVersionNumber_iOS_8_0 1129.150000\n#endif\n\n#ifdef __IPHONE_6_0\n#define IASK_IF_IOS6_OR_GREATER(...) \\\nif (kCFCoreFoundationVersionNumber >= kCFCoreFoundationVersionNumber_iOS_6_0) \\\n{ \\\n__VA_ARGS__ \\\n}\n#else\n#define IASK_IF_IOS6_OR_GREATER(...)\n#endif\n\n#ifdef __IPHONE_6_0\n#define IASK_IF_PRE_IOS6(...) \\\n_Pragma(\"clang diagnostic push\") \\\n_Pragma(\"clang diagnostic ignored \\\"-Wdeprecated-declarations\\\"\") \\\nif (kCFCoreFoundationVersionNumber < kCFCoreFoundationVersionNumber_iOS_6_0) \\\n{ \\\n__VA_ARGS__ \\\n} \\\n_Pragma(\"clang diagnostic pop\")\n#else\n#define IASK_IF_PRE_IOS6(...)  __VA_ARGS__\n#endif\n\n#ifdef __IPHONE_7_0\n#define IASK_IF_IOS7_OR_GREATER(...) \\\nif (kCFCoreFoundationVersionNumber >= kCFCoreFoundationVersionNumber_iOS_7_0) \\\n{ \\\n__VA_ARGS__ \\\n}\n#else\n#define IASK_IF_IOS7_OR_GREATER(...)\n#endif\n\n#ifdef __IPHONE_7_0\n#define IASK_IF_PRE_IOS7(...) \\\n_Pragma(\"clang diagnostic push\") \\\n_Pragma(\"clang diagnostic ignored \\\"-Wdeprecated-declarations\\\"\") \\\nif (kCFCoreFoundationVersionNumber < kCFCoreFoundationVersionNumber_iOS_7_0) \\\n{ \\\n__VA_ARGS__ \\\n} \\\n_Pragma(\"clang diagnostic pop\")\n#else\n#define IASK_IF_PRE_IOS7(...)  __VA_ARGS__\n#endif\n\n#ifdef __IPHONE_8_0\n#define IASK_IF_PRE_IOS8(...) \\\n_Pragma(\"clang diagnostic push\") \\\n_Pragma(\"clang diagnostic ignored \\\"-Wdeprecated-declarations\\\"\") \\\nif (kCFCoreFoundationVersionNumber < kCFCoreFoundationVersionNumber_iOS_8_0) \\\n{ \\\n__VA_ARGS__ \\\n} \\\n_Pragma(\"clang diagnostic pop\")\n#else\n#define IASK_IF_PRE_IOS8(...)  __VA_ARGS__\n#endif\n\n\n#ifdef __IPHONE_8_0\n#define IASK_IF_IOS8_OR_GREATER(...) \\\nif (kCFCoreFoundationVersionNumber >= kCFCoreFoundationVersionNumber_iOS_8_0) \\\n{ \\\n__VA_ARGS__ \\\n}\n#else\n#define IASK_IF_IOS8_OR_GREATER(...)\n#endif\n\n\n@class IASKSpecifier;\n\n/** settings reader transform iOS's settings plist files\n to the IASKSpecifier model objects.\n Besides that, it also hides the complexity of finding\n the 'proper' Settings.bundle\n */\n@interface IASKSettingsReader : NSObject\n\n/** designated initializer\n searches for a settings bundle that contains\n a plist with the specified fileName that must\n be contained in the given bundle\n \n calls initWithFile where applicationBundle is\n set to [NSBundle mainBundle]\n */\n- (id) initWithSettingsFileNamed:(NSString*) fileName\n               applicationBundle:(NSBundle*) bundle;\n\n- (id) initWithFile:(NSString*)file;\n\n- (NSInteger)numberOfSections;\n- (NSInteger)numberOfRowsForSection:(NSInteger)section;\n- (IASKSpecifier*)specifierForIndexPath:(NSIndexPath*)indexPath;\n- (IASKSpecifier *)headerSpecifierForSection:(NSInteger)section;\n- (NSIndexPath*)indexPathForKey:(NSString*)key;\n- (IASKSpecifier*)specifierForKey:(NSString*)key;\n- (NSString*)titleForSection:(NSInteger)section;\n- (NSString*)keyForSection:(NSInteger)section;\n- (NSString*)footerTextForSection:(NSInteger)section;\n- (NSString*)titleForId:(NSObject*)titleId;\n- (NSString*)pathForImageNamed:(NSString*)image;\n\n///the main application bundle. most often [NSBundle mainBundle]\n@property (nonatomic, readonly) NSBundle      *applicationBundle;\n\n///the actual settings bundle\n@property (nonatomic, readonly) NSBundle    *settingsBundle;\n\n///the actual settings plist, parsed into a dictionary\n@property (nonatomic, readonly) NSDictionary  *settingsDictionary;\n\n\n@property (nonatomic, retain) NSString      *localizationTable;\n@property (nonatomic, retain) NSArray       *dataSource;\n@property (nonatomic, retain) NSSet         *hiddenKeys;\n@property (nonatomic) BOOL\t\t\t\t\tshowPrivacySettings;\n\n\n#pragma mark - internal use. public only for testing\n- (NSString *)file:(NSString *)file\n        withBundle:(NSString *)bundle\n            suffix:(NSString *)suffix\n         extension:(NSString *)extension;\n- (NSString *)locateSettingsFile:(NSString *)file;\n\n- (NSString *)platformSuffixForInterfaceIdiom:(UIUserInterfaceIdiom) interfaceIdiom;\n@end\n"
  },
  {
    "path": "ArcBit/External/InAppSettingsKit/Models/IASKSettingsReader.m",
    "content": "//\n//\tIASKSettingsReader.m\n//\thttp://www.inappsettingskit.com\n//\n//\tCopyright (c) 2009:\n//\tLuc Vandal, Edovia Inc., http://www.edovia.com\n//\tOrtwin Gentz, FutureTap GmbH, http://www.futuretap.com\n//\tAll rights reserved.\n//\n//\tIt is appreciated but not required that you give credit to Luc Vandal and Ortwin Gentz,\n//\tas the original authors of this code. You can give credit in a blog post, a tweet or on\n//\ta info page of your app. Also, the original authors appreciate letting them know if you use this code.\n//\n//\tThis code is licensed under the BSD license that is available at: http://www.opensource.org/licenses/bsd-license.php\n//\n\n#import \"IASKSettingsReader.h\"\n#import \"IASKSpecifier.h\"\n\n#pragma mark -\n@interface IASKSettingsReader () {\n}\n@end\n\n@implementation IASKSettingsReader\n\n- (id) initWithSettingsFileNamed:(NSString*) fileName\n               applicationBundle:(NSBundle*) bundle {\n    self = [super init];\n    if (self) {\n        _applicationBundle = bundle;\n        \n        NSString* plistFilePath = [self locateSettingsFile: fileName];\n        _settingsDictionary = [NSDictionary dictionaryWithContentsOfFile:plistFilePath];\n        \n        //store the bundle which we'll need later for getting localizations\n        NSString* settingsBundlePath = [plistFilePath stringByDeletingLastPathComponent];\n        _settingsBundle = [NSBundle bundleWithPath:settingsBundlePath];\n        \n        // Look for localization file\n        self.localizationTable = [_settingsDictionary objectForKey:@\"StringsTable\"];\n        if (!self.localizationTable)\n        {\n            // Look for localization file using filename\n            self.localizationTable = [[[[plistFilePath stringByDeletingPathExtension] // removes '.plist'\n                                        stringByDeletingPathExtension] // removes potential '.inApp'\n                                       lastPathComponent] // strip absolute path\n                                      stringByReplacingOccurrencesOfString:[self platformSuffixForInterfaceIdiom:UI_USER_INTERFACE_IDIOM()] withString:@\"\"]; // removes potential '~device' (~ipad, ~iphone)\n            if([self.settingsBundle pathForResource:self.localizationTable ofType:@\"strings\"] == nil){\n                // Could not find the specified localization: use default\n                self.localizationTable = @\"Root\";\n            }\n        }\n\t\t\n\t\tself.showPrivacySettings = NO;\n\t\tIASK_IF_IOS8_OR_GREATER\n\t\t(\n\t\t NSArray *privacyRelatedInfoPlistKeys = @[@\"NSBluetoothPeripheralUsageDescription\", @\"NSCalendarsUsageDescription\", @\"NSCameraUsageDescription\", @\"NSContactsUsageDescription\", @\"NSLocationAlwaysUsageDescription\", @\"NSLocationUsageDescription\", @\"NSLocationWhenInUseUsageDescription\", @\"NSMicrophoneUsageDescription\", @\"NSMotionUsageDescription\", @\"NSPhotoLibraryUsageDescription\", @\"NSRemindersUsageDescription\", @\"NSHealthShareUsageDescription\", @\"NSHealthUpdateUsageDescription\"];\n\t\t NSDictionary *infoDictionary = [[NSBundle mainBundle] infoDictionary];\n\t\t if ([fileName isEqualToString:@\"Root\"]) {\n\t\t\t for (NSString* key in privacyRelatedInfoPlistKeys) {\n\t\t\t\t if (infoDictionary[key]) {\n\t\t\t\t\t self.showPrivacySettings = YES;\n\t\t\t\t\t break;\n\t\t\t\t }\n\t\t\t }\n\t\t }\n\t\t );\n        if (self.settingsDictionary) {\n            [self _reinterpretBundle:self.settingsDictionary];\n        }\n    }\n    return self;\n}\n\n- (id)initWithFile:(NSString*)file {\n    return [self initWithSettingsFileNamed:file applicationBundle:[NSBundle mainBundle]];\n}\n\n- (id)init {\n    return [self initWithFile:@\"Root\"];\n}\n\n- (void)setHiddenKeys:(NSSet *)anHiddenKeys {\n    if (_hiddenKeys != anHiddenKeys) {\n        _hiddenKeys = anHiddenKeys;\n        \n        if (self.settingsDictionary) {\n            [self _reinterpretBundle:self.settingsDictionary];\n        }\n    }\n}\n\n- (void)setShowPrivacySettings:(BOOL)showPrivacySettings {\n\tif (_showPrivacySettings != showPrivacySettings) {\n\t\t_showPrivacySettings = showPrivacySettings;\n\t\t[self _reinterpretBundle:self.settingsDictionary];\n\t}\n}\n\n- (NSArray*)privacySettingsSpecifiers {\n\tNSMutableDictionary *dict = [@{kIASKTitle: [[self getBundle] localizedStringForKey:@\"Privacy\" value:@\"\" table:@\"IASKLocalizable\"],\n\t\t\t\t\t\t\t\t   kIASKKey: @\"IASKPrivacySettingsCellKey\",\n\t\t\t\t\t\t\t\t   kIASKType: kIASKOpenURLSpecifier,\n\t\t\t\t\t\t\t\t   kIASKFile: UIApplicationOpenSettingsURLString,\n\t\t\t\t\t\t\t\t   } mutableCopy];\n\tNSString *subtitle = [[self getBundle] localizedStringForKey:@\"Open in Settings app\" value:@\"\" table:@\"IASKLocalizable\"];\n\tif (subtitle.length) {\n\t\tdict [kIASKSubtitle] = subtitle;\n\t}\n\t\n\treturn @[@[[[IASKSpecifier alloc] initWithSpecifier:@{kIASKKey: @\"IASKPrivacySettingsHeaderKey\", kIASKType: kIASKPSGroupSpecifier}],\n\t\t\t   [[IASKSpecifier alloc] initWithSpecifier:dict]]];\n}\n\n- (NSBundle*)getBundle {\n\tNSURL *inAppSettingsBundlePath = [[NSBundle bundleForClass:[self class]] URLForResource:@\"InAppSettingsKit\" withExtension:@\"bundle\"];\n\tNSBundle *bundle;\n\t\n\tif (inAppSettingsBundlePath) {\n\t\tbundle = [NSBundle bundleWithURL:inAppSettingsBundlePath];\n\t} else {\n\t\tbundle = [NSBundle mainBundle];\n\t}\n\t\n\treturn bundle;\n}\n\n- (void)_reinterpretBundle:(NSDictionary*)settingsBundle {\n    NSArray *preferenceSpecifiers\t= [settingsBundle objectForKey:kIASKPreferenceSpecifiers];\n    NSMutableArray *dataSource\t\t= [NSMutableArray array];\n\t\n\tif (self.showPrivacySettings) {\n\t\tIASK_IF_IOS8_OR_GREATER\n\t\t(\n\t\t [dataSource addObjectsFromArray:self.privacySettingsSpecifiers];\n\t\t );\n\t}\n\n    for (NSDictionary *specifierDictionary in preferenceSpecifiers) {\n        IASKSpecifier *newSpecifier = [[IASKSpecifier alloc] initWithSpecifier:specifierDictionary];\n        newSpecifier.settingsReader = self;\n        [newSpecifier sortIfNeeded];\n\n        if ([self.hiddenKeys containsObject:newSpecifier.key]) {\n            continue;\n        }\n        NSString *type = newSpecifier.type;\n        if ([type isEqualToString:kIASKPSGroupSpecifier]\n            || [type isEqualToString:kIASKPSRadioGroupSpecifier]) {\n\n            NSMutableArray *newArray = [NSMutableArray array];\n            [newArray addObject:newSpecifier];\n            [dataSource addObject:newArray];\n\n            if ([type isEqualToString:kIASKPSRadioGroupSpecifier]) {\n                for (NSString *value in newSpecifier.multipleValues) {\n                    IASKSpecifier *valueSpecifier =\n                        [[IASKSpecifier alloc] initWithSpecifier:specifierDictionary radioGroupValue:value];\n                    valueSpecifier.settingsReader = self;\n                    [valueSpecifier sortIfNeeded];\n                    [newArray addObject:valueSpecifier];\n                }\n            }\n        }\n        else {\n            if (dataSource.count == 0 || (dataSource.count == 1 && self.showPrivacySettings)) {\n                [dataSource addObject:[NSMutableArray array]];\n            }\n            \n            if ([newSpecifier.userInterfaceIdioms containsObject:@(UI_USER_INTERFACE_IDIOM())]) {\n                [(NSMutableArray*)dataSource.lastObject addObject:newSpecifier];\n            }\n        }\n    }\n    [self setDataSource:dataSource];\n}\n\n- (BOOL)_sectionHasHeading:(NSInteger)section {\n    return [self headerSpecifierForSection:section] != nil;\n}\n\n/// Returns the specifier describing the section's header, or nil if there is no header.\n- (IASKSpecifier *)headerSpecifierForSection:(NSInteger)section {\n    IASKSpecifier *specifier = self.dataSource[section][kIASKSectionHeaderIndex];\n    if ([specifier.type isEqualToString:kIASKPSGroupSpecifier]\n        || [specifier.type isEqualToString:kIASKPSRadioGroupSpecifier]) {\n        return specifier;\n    }\n    return nil;\n}\n\n- (NSInteger)numberOfSections {\n    return self.dataSource.count;\n}\n\n- (NSInteger)numberOfRowsForSection:(NSInteger)section {\n    int headingCorrection = [self _sectionHasHeading:section] ? 1 : 0;\n    return [(NSArray*)[[self dataSource] objectAtIndex:section] count] - headingCorrection;\n}\n\n- (IASKSpecifier*)specifierForIndexPath:(NSIndexPath*)indexPath {\n    int headingCorrection = [self _sectionHasHeading:indexPath.section] ? 1 : 0;\n    \n    IASKSpecifier *specifier = [[[self dataSource] objectAtIndex:indexPath.section] objectAtIndex:(indexPath.row+headingCorrection)];\n    specifier.settingsReader = self;\n    return specifier;\n}\n\n- (NSIndexPath*)indexPathForKey:(NSString *)key {\n    for (NSUInteger sectionIndex = 0; sectionIndex < self.dataSource.count; sectionIndex++) {\n        NSArray *section = [self.dataSource objectAtIndex:sectionIndex];\n        for (NSUInteger rowIndex = 0; rowIndex < section.count; rowIndex++) {\n            IASKSpecifier *specifier = (IASKSpecifier*)[section objectAtIndex:rowIndex];\n            if ([specifier isKindOfClass:[IASKSpecifier class]] && [specifier.key isEqualToString:key]) {\n                NSUInteger correctedRowIndex = rowIndex - [self _sectionHasHeading:sectionIndex];\n                return [NSIndexPath indexPathForRow:correctedRowIndex inSection:sectionIndex];\n            }\n        }\n    }\n    return nil;\n}\n\n- (IASKSpecifier*)specifierForKey:(NSString*)key {\n    for (NSArray *specifiers in _dataSource) {\n        for (id sp in specifiers) {\n            if ([sp isKindOfClass:[IASKSpecifier class]]) {\n                if ([[sp key] isEqualToString:key]) {\n                    return sp;\n                }\n            }\n        }\n    }\n    return nil;\n}\n\n- (NSString*)titleForSection:(NSInteger)section {\n    return [self titleForId:[self headerSpecifierForSection:section].title];\n}\n\n- (NSString*)keyForSection:(NSInteger)section {\n    return [self headerSpecifierForSection:section].key;\n}\n\n- (NSString*)footerTextForSection:(NSInteger)section {\n    return [self titleForId:[self headerSpecifierForSection:section].footerText];\n}\n\n- (NSString*)titleForId:(NSObject*)titleId\n{\n\tif([titleId isKindOfClass:[NSNumber class]]) {\n\t\tNSNumber* numberTitleId = (NSNumber*)titleId;\n\t\tNSNumberFormatter* formatter = [NSNumberFormatter new];\n\t\t[formatter setNumberStyle:NSNumberFormatterNoStyle];\n\t\treturn [formatter stringFromNumber:numberTitleId];\n\t}\n\telse\n\t{\n\t\tNSString* stringTitleId = (NSString*)titleId;\n\t\treturn [self.settingsBundle localizedStringForKey:stringTitleId value:stringTitleId table:self.localizationTable];\n\t}\n}\n\n- (NSString*)pathForImageNamed:(NSString*)image {\n    return [[self.settingsBundle bundlePath] stringByAppendingPathComponent:image];\n}\n\n- (NSString *)platformSuffixForInterfaceIdiom:(UIUserInterfaceIdiom) interfaceIdiom {\n    switch (interfaceIdiom) {\n        case UIUserInterfaceIdiomPad: return @\"~ipad\";\n        case UIUserInterfaceIdiomPhone: return @\"~iphone\";\n\t\tdefault: return @\"~iphone\";\n    }\n}\n\n- (NSString *)file:(NSString *)file\n        withBundle:(NSString *)bundle\n            suffix:(NSString *)suffix\n         extension:(NSString *)extension {\n    \n\tbundle = [self.applicationBundle pathForResource:bundle ofType:nil];\n    file = [file stringByAppendingFormat:@\"%@%@\", suffix, extension];\n    return [bundle stringByAppendingPathComponent:file];\n}\n\n- (NSString *)locateSettingsFile: (NSString *)file {\n    static NSString* const kIASKBundleFolder = @\"Settings.bundle\";\n    static NSString* const kIASKBundleFolderAlt = @\"InAppSettings.bundle\";\n    \n    static NSString* const kIASKBundleLocaleFolderExtension = @\".lproj\";\n\n    // The file is searched in the following order:\n    //\n    // InAppSettings.bundle/FILE~DEVICE.inApp.plist\n    // InAppSettings.bundle/FILE.inApp.plist\n    // InAppSettings.bundle/FILE~DEVICE.plist\n    // InAppSettings.bundle/FILE.plist\n    // Settings.bundle/FILE~DEVICE.inApp.plist\n    // Settings.bundle/FILE.inApp.plist\n    // Settings.bundle/FILE~DEVICE.plist\n    // Settings.bundle/FILE.plist\n    //\n    // where DEVICE is either \"iphone\" or \"ipad\" depending on the current\n    // interface idiom.\n    //\n    // Settings.app uses the ~DEVICE suffixes since iOS 4.0.  There are some\n    // differences from this implementation:\n    // - For an iPhone-only app running on iPad, Settings.app will not use the\n    //\t ~iphone suffix.  There is no point in using these suffixes outside\n    //\t of universal apps anyway.\n    // - This implementation uses the device suffixes on iOS 3.x as well.\n    // - also check current locale (short only)\n    \n    NSArray *settingsBundleNames = @[kIASKBundleFolderAlt, kIASKBundleFolder];\n    \n    NSArray *extensions = @[@\".inApp.plist\", @\".plist\"];\n    \n    NSArray *plattformSuffixes = @[[self platformSuffixForInterfaceIdiom:UI_USER_INTERFACE_IDIOM()],\n                                   @\"\"];\n    \n    NSArray *preferredLanguages = [NSLocale preferredLanguages];\n    NSArray *languageFolders = @[[ (preferredLanguages.count ? [preferredLanguages objectAtIndex:0] : @\"en\") stringByAppendingString:kIASKBundleLocaleFolderExtension],\n                                 @\"\"];\n\n    \n    NSString *path = nil;\n    NSFileManager *fileManager = [NSFileManager defaultManager];\n    \n    for (NSString *settingsBundleName in settingsBundleNames) {\n        for (NSString *extension in extensions) {\n            for (NSString *platformSuffix in plattformSuffixes) {\n                for (NSString *languageFolder in languageFolders) {\n                    path = [self file:file\n                           withBundle:[settingsBundleName stringByAppendingPathComponent:languageFolder]\n                               suffix:platformSuffix\n                            extension:extension];\n                    if ([fileManager fileExistsAtPath:path]) {\n                        goto exitFromNestedLoop;\n                    }\n                }\n            }\n        }\n    }\n    \nexitFromNestedLoop:\n    return path;\n}\n\n@end\n"
  },
  {
    "path": "ArcBit/External/InAppSettingsKit/Models/IASKSettingsStore.h",
    "content": "//\n//  IASKSettingsStore.h\n//  http://www.inappsettingskit.com\n//\n//  Copyright (c) 2010:\n//  Luc Vandal, Edovia Inc., http://www.edovia.com\n//  Ortwin Gentz, FutureTap GmbH, http://www.futuretap.com\n//  Marc-Etienne M.Léveillé, Edovia Inc., http://www.edovia.com\n//  All rights reserved.\n// \n//  It is appreciated but not required that you give credit to Luc Vandal and Ortwin Gentz, \n//  as the original authors of this code. You can give credit in a blog post, a tweet or on \n//  a info page of your app. Also, the original authors appreciate letting them know if you use this code.\n//\n//  This code is licensed under the BSD license that is available at: http://www.opensource.org/licenses/bsd-license.php\n//\n\n#import <Foundation/Foundation.h>\n\n/** protocol that needs to be implemented from a settings store\n */\n@protocol IASKSettingsStore <NSObject>\n@required\n- (void)setBool:(BOOL)value      forKey:(NSString*)key;\n- (void)setFloat:(float)value    forKey:(NSString*)key;\n- (void)setDouble:(double)value  forKey:(NSString*)key;\n- (void)setInteger:(NSInteger)value    forKey:(NSString*)key;\n- (void)setObject:(id)value      forKey:(NSString*)key;\n- (BOOL)boolForKey:(NSString*)key;\n- (float)floatForKey:(NSString*)key;\n- (double)doubleForKey:(NSString*)key;\n- (NSInteger)integerForKey:(NSString*)key;\n- (id)objectForKey:(NSString*)key;\n- (BOOL)synchronize; // Write settings to a permanant storage. Returns YES on success, NO otherwise\n@end\n\n\n/** abstract default implementation of IASKSettingsStore protocol\n\n helper to implement a store which maps all methods to setObject:forKey:\n and objectForKey:. Those 2 methods need to be overwritten.\n */\n@interface IASKAbstractSettingsStore : NSObject <IASKSettingsStore>\n\n/** default implementation raises an exception\n must be overridden by subclasses\n */\n- (void)setObject:(id)value forKey:(NSString*)key;\n\n/** default implementation raises an exception\n must be overridden by subclasses\n */\n- (id)objectForKey:(NSString*)key;\n\n/** default implementation does nothing and returns NO\n */\n- (BOOL)synchronize;\n\n@end\n"
  },
  {
    "path": "ArcBit/External/InAppSettingsKit/Models/IASKSettingsStore.m",
    "content": "//\n//  IASKSettingsStore.m\n//  http://www.inappsettingskit.com\n//\n//  Copyright (c) 2010:\n//  Luc Vandal, Edovia Inc., http://www.edovia.com\n//  Ortwin Gentz, FutureTap GmbH, http://www.futuretap.com\n//  Marc-Etienne M.Léveillé, Edovia Inc., http://www.edovia.com\n//  All rights reserved.\n// \n//  It is appreciated but not required that you give credit to Luc Vandal and Ortwin Gentz, \n//  as the original authors of this code. You can give credit in a blog post, a tweet or on \n//  a info page of your app. Also, the original authors appreciate letting them know if you use this code.\n//\n//  This code is licensed under the BSD license that is available at: http://www.opensource.org/licenses/bsd-license.php\n//\n\n#import \"IASKSettingsStore.h\"\n\n@implementation IASKAbstractSettingsStore\n\n- (void)setObject:(id)value forKey:(NSString*)key {\n    [NSException raise:@\"Unimplemented\"\n                format:@\"setObject:forKey: must be implemented in subclasses of IASKAbstractSettingsStore\"];\n}\n\n- (id)objectForKey:(NSString*)key {\n    [NSException raise:@\"Unimplemented\"\n                format:@\"objectForKey: must be implemented in subclasses of IASKAbstractSettingsStore\"];\n    return nil;\n}\n\n- (void)setBool:(BOOL)value forKey:(NSString*)key {\n    [self setObject:[NSNumber numberWithBool:value] forKey:key];\n}\n\n- (void)setFloat:(float)value forKey:(NSString*)key {\n    [self setObject:[NSNumber numberWithFloat:value] forKey:key];\n}\n\n- (void)setInteger:(NSInteger)value forKey:(NSString*)key {\n    [self setObject:[NSNumber numberWithInteger:value] forKey:key];\n}\n\n- (void)setDouble:(double)value forKey:(NSString*)key {\n    [self setObject:[NSNumber numberWithDouble:value] forKey:key];\n}\n\n- (BOOL)boolForKey:(NSString*)key {\n    return [[self objectForKey:key] boolValue];\n}\n\n- (float)floatForKey:(NSString*)key {\n    return [[self objectForKey:key] floatValue];\n}\n- (NSInteger)integerForKey:(NSString*)key {\n    return [[self objectForKey:key] integerValue];\n}\n\n- (double)doubleForKey:(NSString*)key {\n    return [[self objectForKey:key] doubleValue];\n}\n\n- (BOOL)synchronize {\n    return NO;\n}\n\n@end\n"
  },
  {
    "path": "ArcBit/External/InAppSettingsKit/Models/IASKSettingsStoreFile.h",
    "content": "//\n//  IASKSettingsStoreFile.h\n//  http://www.inappsettingskit.com\n//\n//  Copyright (c) 2010:\n//  Luc Vandal, Edovia Inc., http://www.edovia.com\n//  Ortwin Gentz, FutureTap GmbH, http://www.futuretap.com\n//  Marc-Etienne M.Léveillé, Edovia Inc., http://www.edovia.com\n//  All rights reserved.\n// \n//  It is appreciated but not required that you give credit to Luc Vandal and Ortwin Gentz, \n//  as the original authors of this code. You can give credit in a blog post, a tweet or on \n//  a info page of your app. Also, the original authors appreciate letting them know if you use this code.\n//\n//  This code is licensed under the BSD license that is available at: http://www.opensource.org/licenses/bsd-license.php\n//\n\n#import <Foundation/Foundation.h>\n#import \"IASKSettingsStore.h\"\n\n/** file-based implementation of IASKAbstractSettingsStore\n\n uses an NSDictionary + its read/write to file support to store\n settings in a file at the specified path\n */\n@interface IASKSettingsStoreFile : IASKAbstractSettingsStore\n\n/** designated initializer\n \n @param path absolute file-path to store settings dictionary\n */\n- (id)initWithPath:(NSString*)path;\n\n@property (nonatomic, copy, readonly) NSString* filePath;\n\n@end\n"
  },
  {
    "path": "ArcBit/External/InAppSettingsKit/Models/IASKSettingsStoreFile.m",
    "content": "//\n//  IASKSettingsStoreFile.m\n//  http://www.inappsettingskit.com\n//\n//  Copyright (c) 2010:\n//  Luc Vandal, Edovia Inc., http://www.edovia.com\n//  Ortwin Gentz, FutureTap GmbH, http://www.futuretap.com\n//  Marc-Etienne M.Léveillé, Edovia Inc., http://www.edovia.com\n//  All rights reserved.\n// \n//  It is appreciated but not required that you give credit to Luc Vandal and Ortwin Gentz, \n//  as the original authors of this code. You can give credit in a blog post, a tweet or on \n//  a info page of your app. Also, the original authors appreciate letting them know if you use this code.\n//\n//  This code is licensed under the BSD license that is available at: http://www.opensource.org/licenses/bsd-license.php\n//\n\n#import \"IASKSettingsStoreFile.h\"\n\n@interface IASKSettingsStoreFile() {\n    NSMutableDictionary * _dict;\n}\n\n@end\n\n@implementation IASKSettingsStoreFile\n\n- (id)initWithPath:(NSString*)path {\n    if((self = [super init])) {\n        _filePath = [path copy];\n        _dict = [[NSMutableDictionary alloc] initWithContentsOfFile:path];\n        if(_dict == nil) {\n            _dict = [[NSMutableDictionary alloc] init];\n        }\n    }\n    return self;\n}\n\n- (void)setObject:(id)value forKey:(NSString *)key {\n    [_dict setObject:value forKey:key];\n}\n\n- (id)objectForKey:(NSString *)key {\n    return [_dict objectForKey:key];\n}\n\n- (BOOL)synchronize {\n    return [_dict writeToFile:_filePath atomically:YES];\n}\n\n@end\n"
  },
  {
    "path": "ArcBit/External/InAppSettingsKit/Models/IASKSettingsStoreUserDefaults.h",
    "content": "//\n//  IASKSettingsStoreUserDefaults.h\n//  http://www.inappsettingskit.com\n//\n//  Copyright (c) 2010:\n//  Luc Vandal, Edovia Inc., http://www.edovia.com\n//  Ortwin Gentz, FutureTap GmbH, http://www.futuretap.com\n//  Marc-Etienne M.Léveillé, Edovia Inc., http://www.edovia.com\n//  All rights reserved.\n// \n//  It is appreciated but not required that you give credit to Luc Vandal and Ortwin Gentz, \n//  as the original authors of this code. You can give credit in a blog post, a tweet or on \n//  a info page of your app. Also, the original authors appreciate letting them know if you use this code.\n//\n//  This code is licensed under the BSD license that is available at: http://www.opensource.org/licenses/bsd-license.php\n//\n\n#import <Foundation/Foundation.h>\n#import \"IASKSettingsStore.h\"\n\n/** implementation of IASKSettingsStore that uses NSUserDefaults\n */\n@interface IASKSettingsStoreUserDefaults : NSObject<IASKSettingsStore>\n\n///designated initializer\n- (id) initWithUserDefaults:(NSUserDefaults*) defaults;\n\n///calls initWithUserDefaults: with [NSUserDefaults standardUserDefaults]\n- (id) init;\n\n@property (nonatomic, retain, readonly) NSUserDefaults* defaults;\n\n@end\n"
  },
  {
    "path": "ArcBit/External/InAppSettingsKit/Models/IASKSettingsStoreUserDefaults.m",
    "content": "//\n//  IASKSettingsStoreUserDefaults.m\n//  http://www.inappsettingskit.com\n//\n//  Copyright (c) 2010:\n//  Luc Vandal, Edovia Inc., http://www.edovia.com\n//  Ortwin Gentz, FutureTap GmbH, http://www.futuretap.com\n//  Marc-Etienne M.Léveillé, Edovia Inc., http://www.edovia.com\n//  All rights reserved.\n//\n//  It is appreciated but not required that you give credit to Luc Vandal and Ortwin Gentz,\n//  as the original authors of this code. You can give credit in a blog post, a tweet or on\n//  a info page of your app. Also, the original authors appreciate letting them know if you use this code.\n//\n//  This code is licensed under the BSD license that is available at: http://www.opensource.org/licenses/bsd-license.php\n//\n\n#import \"IASKSettingsStoreUserDefaults.h\"\n\n@interface IASKSettingsStoreUserDefaults ()\n\n@property (nonatomic, retain, readwrite) NSUserDefaults* defaults;\n\n@end\n\n@implementation IASKSettingsStoreUserDefaults\n\n- (id)initWithUserDefaults:(NSUserDefaults *)defaults {\n    self = [super init];\n    if( self ) {\n        _defaults = defaults;\n    }\n    return self;\n}\n\n- (id)init {\n    return [self initWithUserDefaults:[NSUserDefaults standardUserDefaults]];\n}\n\n- (void)setBool:(BOOL)value forKey:(NSString*)key {\n    [self.defaults setBool:value forKey:key];\n}\n\n- (void)setFloat:(float)value forKey:(NSString*)key {\n    [self.defaults setFloat:value forKey:key];\n}\n\n- (void)setDouble:(double)value forKey:(NSString*)key {\n    [self.defaults setDouble:value forKey:key];\n}\n\n- (void)setInteger:(NSInteger)value forKey:(NSString*)key {\n    [self.defaults setInteger:value forKey:key];\n}\n\n- (void)setObject:(id)value forKey:(NSString*)key {\n    [self.defaults setObject:value forKey:key];\n}\n\n- (BOOL)boolForKey:(NSString*)key {\n    return [self.defaults boolForKey:key];\n}\n\n- (float)floatForKey:(NSString*)key {\n    return [self.defaults floatForKey:key];\n}\n\n- (double)doubleForKey:(NSString*)key {\n    return [self.defaults doubleForKey:key];\n}\n\n- (NSInteger)integerForKey:(NSString*)key {\n    return [self.defaults integerForKey:key];\n}\n\n- (id)objectForKey:(NSString*)key {\n    return [self.defaults objectForKey:key];\n}\n\n- (BOOL)synchronize {\n    return [self.defaults synchronize];\n}\n\n@end\n"
  },
  {
    "path": "ArcBit/External/InAppSettingsKit/Models/IASKSpecifier.h",
    "content": "//\n//  IASKSpecifier.h\n//  http://www.inappsettingskit.com\n//\n//  Copyright (c) 2009:\n//  Luc Vandal, Edovia Inc., http://www.edovia.com\n//  Ortwin Gentz, FutureTap GmbH, http://www.futuretap.com\n//  All rights reserved.\n//\n//  It is appreciated but not required that you give credit to Luc Vandal and Ortwin Gentz,\n//  as the original authors of this code. You can give credit in a blog post, a tweet or on\n//  a info page of your app. Also, the original authors appreciate letting them know if you use this code.\n//\n//  This code is licensed under the BSD license that is available at: http://www.opensource.org/licenses/bsd-license.php\n//\n\n#import <Foundation/Foundation.h>\n#import <UIKit/UIKit.h>\n\n@class IASKSettingsReader;\n\n@interface IASKSpecifier : NSObject\n\n@property (nonatomic, retain) NSDictionary  *specifierDict;\n@property (nonatomic, weak) IASKSettingsReader *settingsReader;\n\n- (id)initWithSpecifier:(NSDictionary*)specifier;\n/// A specifier for one entry in a radio group preceeded by a radio group specifier.\n- (id)initWithSpecifier:(NSDictionary *)specifier\n        radioGroupValue:(NSString *)radioGroupValue;\n\n- (void)sortIfNeeded;\n\n- (NSString*)localizedObjectForKey:(NSString*)key;\n- (NSString*)title;\n- (NSString*)subtitle;\n- (NSString*)placeholder;\n- (NSString*)key;\n- (NSString*)type;\n- (NSString*)titleForCurrentValue:(id)currentValue;\n- (NSInteger)multipleValuesCount;\n- (NSArray*)multipleValues;\n- (NSArray*)multipleTitles;\n- (NSString*)file;\n- (id)defaultValue;\n- (id)defaultStringValue;\n- (BOOL)defaultBoolValue;\n- (id)trueValue;\n- (id)falseValue;\n- (float)minimumValue;\n- (float)maximumValue;\n- (NSString*)minimumValueImage;\n- (NSString*)maximumValueImage;\n- (BOOL)isSecure;\n- (BOOL)displaySortedByTitle;\n- (UIKeyboardType)keyboardType;\n- (UITextAutocapitalizationType)autocapitalizationType;\n- (UITextAutocorrectionType)autoCorrectionType;\n- (NSString*)footerText;\n- (Class)viewControllerClass;\n- (SEL)viewControllerSelector;\n- (NSString*)viewControllerStoryBoardFile;\n- (NSString*)viewControllerStoryBoardID;\n- (NSString*)segueIdentifier;\n- (Class)buttonClass;\n- (SEL)buttonAction;\n- (UIImage *)cellImage;\n- (UIImage *)highlightedCellImage;\n- (BOOL)adjustsFontSizeToFitWidth;\n- (NSTextAlignment)textAlignment;\n- (NSArray *)userInterfaceIdioms;\n- (NSString *)radioGroupValue;\n@end\n"
  },
  {
    "path": "ArcBit/External/InAppSettingsKit/Models/IASKSpecifier.m",
    "content": "//\n//  IASKSpecifier.m\n//  http://www.inappsettingskit.com\n//\n//  Copyright (c) 2009:\n//  Luc Vandal, Edovia Inc., http://www.edovia.com\n//  Ortwin Gentz, FutureTap GmbH, http://www.futuretap.com\n//  All rights reserved.\n// \n//  It is appreciated but not required that you give credit to Luc Vandal and Ortwin Gentz, \n//  as the original authors of this code. You can give credit in a blog post, a tweet or on \n//  a info page of your app. Also, the original authors appreciate letting them know if you use this code.\n//\n//  This code is licensed under the BSD license that is available at: http://www.opensource.org/licenses/bsd-license.php\n//\n\n#import \"IASKSpecifier.h\"\n#import \"IASKSettingsReader.h\"\n#import \"IASKAppSettingsWebViewController.h\"\n\n@interface IASKSpecifier ()\n\n@property (nonatomic, retain) NSDictionary  *multipleValuesDict;\n@property (nonatomic, copy) NSString *radioGroupValue;\n\n@end\n\n@implementation IASKSpecifier\n\n- (id)initWithSpecifier:(NSDictionary*)specifier {\n    if ((self = [super init])) {\n        [self setSpecifierDict:specifier];\n\n        if ([self isMultiValueSpecifierType]) {\n            [self updateMultiValuesDict];\n        }\n    }\n    return self;\n}\n\n- (BOOL)isMultiValueSpecifierType {\n    static NSArray *types = nil;\n    if (!types) {\n        types = @[kIASKPSMultiValueSpecifier, kIASKPSTitleValueSpecifier, kIASKPSRadioGroupSpecifier];\n    }\n    return [types containsObject:[self type]];\n}\n\n- (id)initWithSpecifier:(NSDictionary *)specifier\n        radioGroupValue:(NSString *)radioGroupValue {\n\n    self = [self initWithSpecifier:specifier];\n    if (self) {\n        self.radioGroupValue = radioGroupValue;\n    }\n    return self;\n}\n- (void)updateMultiValuesDict {\n    NSArray *values = [_specifierDict objectForKey:kIASKValues];\n    NSArray *titles = [_specifierDict objectForKey:kIASKTitles];\n    NSArray *shortTitles = [_specifierDict objectForKey:kIASKShortTitles];\n    NSMutableDictionary *multipleValuesDict = [NSMutableDictionary new];\n    \n    if (values) {\n\t\t[multipleValuesDict setObject:values forKey:kIASKValues];\n\t}\n\t\n    if (titles) {\n\t\t[multipleValuesDict setObject:titles forKey:kIASKTitles];\n\t}\n    \n    if (shortTitles.count) {\n\t\t[multipleValuesDict setObject:shortTitles forKey:kIASKShortTitles];\n\t}\n    \n    [self setMultipleValuesDict:multipleValuesDict];\n}\n\n- (void)sortIfNeeded {\n    if (self.displaySortedByTitle) {\n        NSArray *values = [_specifierDict objectForKey:kIASKValues];\n        NSArray *titles = [_specifierDict objectForKey:kIASKTitles];\n        NSArray *shortTitles = [_specifierDict objectForKey:kIASKShortTitles];\n\n        NSAssert(values.count == titles.count, @\"Malformed multi-value specifier found in settings bundle. Number of values and titles differ.\");\n        NSAssert(shortTitles == nil || shortTitles.count == values.count, @\"Malformed multi-value specifier found in settings bundle. Number of short titles and values differ.\");\n\n        NSMutableDictionary *multipleValuesDict = [NSMutableDictionary new];\n\n        NSMutableArray *temporaryMappingsForSort = [NSMutableArray arrayWithCapacity:titles.count];\n\n        static NSString *const titleKey = @\"title\";\n        static NSString *const shortTitleKey = @\"shortTitle\";\n        static NSString *const localizedTitleKey = @\"localizedTitle\";\n        static NSString *const valueKey = @\"value\";\n        IASKSettingsReader *strongSettingsReader = self.settingsReader;\n        [titles enumerateObjectsUsingBlock:^(id obj, NSUInteger idx, BOOL *stop) {\n            NSString *localizedTitle = [strongSettingsReader titleForId:obj];\n            [temporaryMappingsForSort addObject:@{titleKey : obj,\n                                                  valueKey : values[idx],\n                                                  localizedTitleKey : localizedTitle,\n                                                  shortTitleKey : (shortTitles[idx] ?: [NSNull null]),\n                                                  }];\n        }];\n        \n        NSArray *sortedTemporaryMappings = [temporaryMappingsForSort sortedArrayUsingComparator:^NSComparisonResult(id obj1, id obj2) {\n            NSString *localizedTitle1 = obj1[localizedTitleKey];\n            NSString *localizedTitle2 = obj2[localizedTitleKey];\n\n            if ([localizedTitle1 isKindOfClass:[NSString class]] && [localizedTitle2 isKindOfClass:[NSString class]]) {\n                return [localizedTitle1 localizedCompare:localizedTitle2];\n            } else {\n                return NSOrderedSame;\n            }\n        }];\n        \n        NSMutableArray *sortedTitles = [NSMutableArray arrayWithCapacity:sortedTemporaryMappings.count];\n        NSMutableArray *sortedShortTitles = [NSMutableArray arrayWithCapacity:sortedTemporaryMappings.count];\n        NSMutableArray *sortedValues = [NSMutableArray arrayWithCapacity:sortedTemporaryMappings.count];\n\n        [sortedTemporaryMappings enumerateObjectsUsingBlock:^(id obj, NSUInteger idx, BOOL *stop) {\n            NSDictionary *mapping = obj;\n            sortedTitles[idx] = mapping[titleKey];\n            sortedValues[idx] = mapping[valueKey];\n            if (mapping[shortTitleKey] != [NSNull null]) {\n                sortedShortTitles[idx] = mapping[shortTitleKey];\n            }\n        }];\n        titles = [sortedTitles copy];\n        values = [sortedValues copy];\n        shortTitles = [sortedShortTitles copy];\n        \n        if (values) {\n            [multipleValuesDict setObject:values forKey:kIASKValues];\n        }\n        \n        if (titles) {\n            [multipleValuesDict setObject:titles forKey:kIASKTitles];\n        }\n        \n        if (shortTitles.count) {\n            [multipleValuesDict setObject:shortTitles forKey:kIASKShortTitles];\n        }\n        \n        [self setMultipleValuesDict:multipleValuesDict];\n    }\n}\n\n- (BOOL)displaySortedByTitle {\n    return [[_specifierDict objectForKey:kIASKDisplaySortedByTitle] boolValue];\n}\n\n- (NSString*)localizedObjectForKey:(NSString*)key {\n\tIASKSettingsReader *settingsReader = self.settingsReader;\n\treturn [settingsReader titleForId:[_specifierDict objectForKey:key]];\n}\n\n- (NSString*)title {\n    return [self localizedObjectForKey:kIASKTitle];\n}\n\n- (NSString*)subtitle {\n\treturn [self localizedObjectForKey:kIASKSubtitle];\n}\n\n- (NSString *)placeholder {\n    return [self localizedObjectForKey:kIASKPlaceholder];\n}\n\n- (NSString*)footerText {\n    return [self localizedObjectForKey:kIASKFooterText];\n}\n\n- (Class)viewControllerClass {\n    [IASKAppSettingsWebViewController class]; // make sure this is linked into the binary/library\n\tNSString *classString = [_specifierDict objectForKey:kIASKViewControllerClass];\n\treturn classString ? ([self classFromString:classString] ?: [NSNull class]) : nil;\n}\n\n- (Class)classFromString:(NSString *)className {\n    Class class = NSClassFromString(className);\n    if (!class) {\n        // if the class doesn't exist as a pure Obj-C class then try to retrieve it as a Swift class.\n        NSString *appName = [[NSBundle mainBundle] objectForInfoDictionaryKey:@\"CFBundleName\"];\n        NSString *classStringName = [NSString stringWithFormat:@\"_TtC%lu%@%lu%@\", (unsigned long)appName.length, appName, (unsigned long)className.length, className];\n        class = NSClassFromString(classStringName);\n    }\n    return class;\n}\n\n- (SEL)viewControllerSelector {\n    return NSSelectorFromString([_specifierDict objectForKey:kIASKViewControllerSelector]);\n}\n\n- (NSString*)viewControllerStoryBoardFile {\n\treturn [_specifierDict objectForKey:kIASKViewControllerStoryBoardFile];\n}\n\n- (NSString*)viewControllerStoryBoardID {\n\treturn [_specifierDict objectForKey:kIASKViewControllerStoryBoardId];\n}\n\n- (NSString*)segueIdentifier {\n    return [_specifierDict objectForKey:kIASKSegueIdentifier];\n}\n\n- (Class)buttonClass {\n    return NSClassFromString([_specifierDict objectForKey:kIASKButtonClass]);\n}\n\n- (SEL)buttonAction {\n    return NSSelectorFromString([_specifierDict objectForKey:kIASKButtonAction]);\n}\n\n- (NSString*)key {\n    return [_specifierDict objectForKey:kIASKKey];\n}\n\n- (NSString*)type {\n    return [_specifierDict objectForKey:kIASKType];\n}\n\n- (NSString*)titleForCurrentValue:(id)currentValue {\n\tNSArray *values = [self multipleValues];\n\tNSArray *titles = [self multipleShortTitles];\n\tif (!titles) {\n        titles = [self multipleTitles];\n\t}\n\tif (values.count != titles.count) {\n\t\treturn nil;\n\t}\n    NSInteger keyIndex = [values indexOfObject:currentValue];\n\tif (keyIndex == NSNotFound) {\n\t\treturn nil;\n\t}\n\t@try {\n\t\tIASKSettingsReader *strongSettingsReader = self.settingsReader;\n\t\treturn [strongSettingsReader titleForId:[titles objectAtIndex:keyIndex]];\n\t}\n\t@catch (NSException * e) {}\n\treturn nil;\n}\n\n- (NSInteger)multipleValuesCount {\n    return [[_multipleValuesDict objectForKey:kIASKValues] count];\n}\n\n- (NSArray*)multipleValues {\n    return [_multipleValuesDict objectForKey:kIASKValues];\n}\n\n- (NSArray*)multipleTitles {\n    return [_multipleValuesDict objectForKey:kIASKTitles];\n}\n\n- (NSArray*)multipleShortTitles {\n    return [_multipleValuesDict objectForKey:kIASKShortTitles];\n}\n\n- (NSString*)file {\n    return [_specifierDict objectForKey:kIASKFile];\n}\n\n- (id)defaultValue {\n    return [_specifierDict objectForKey:kIASKDefaultValue];\n}\n\n- (id)defaultStringValue {\n    return [[_specifierDict objectForKey:kIASKDefaultValue] description];\n}\n\n- (BOOL)defaultBoolValue {\n\tid defaultValue = [self defaultValue];\n\tif ([defaultValue isEqual:[self trueValue]]) {\n\t\treturn YES;\n\t}\n\tif ([defaultValue isEqual:[self falseValue]]) {\n\t\treturn NO;\n\t}\n\treturn [defaultValue boolValue];\n}\n\n- (id)trueValue {\n    return [_specifierDict objectForKey:kIASKTrueValue];\n}\n\n- (id)falseValue {\n    return [_specifierDict objectForKey:kIASKFalseValue];\n}\n\n- (float)minimumValue {\n    return [[_specifierDict objectForKey:kIASKMinimumValue] floatValue];\n}\n\n- (float)maximumValue {\n    return [[_specifierDict objectForKey:kIASKMaximumValue] floatValue];\n}\n\n- (NSString*)minimumValueImage {\n    return [_specifierDict objectForKey:kIASKMinimumValueImage];\n}\n\n- (NSString*)maximumValueImage {\n    return [_specifierDict objectForKey:kIASKMaximumValueImage];\n}\n\n- (BOOL)isSecure {\n    return [[_specifierDict objectForKey:kIASKIsSecure] boolValue];\n}\n\n- (UIKeyboardType)keyboardType {\n    if ([[_specifierDict objectForKey:KIASKKeyboardType] isEqualToString:kIASKKeyboardAlphabet]) {\n        return UIKeyboardTypeDefault;\n    }\n    else if ([[_specifierDict objectForKey:KIASKKeyboardType] isEqualToString:kIASKKeyboardNumbersAndPunctuation]) {\n        return UIKeyboardTypeNumbersAndPunctuation;\n    }\n    else if ([[_specifierDict objectForKey:KIASKKeyboardType] isEqualToString:kIASKKeyboardNumberPad]) {\n        return UIKeyboardTypeNumberPad;\n    }\n    else if ([[_specifierDict objectForKey:KIASKKeyboardType] isEqualToString:kIASKKeyboardPhonePad]) {\n        return UIKeyboardTypePhonePad;\n    }\n    else if ([[_specifierDict objectForKey:KIASKKeyboardType] isEqualToString:kIASKKeyboardNamePhonePad]) {\n        return UIKeyboardTypeNamePhonePad;\n    }\n    else if ([[_specifierDict objectForKey:KIASKKeyboardType] isEqualToString:kIASKKeyboardASCIICapable]) {\n        return UIKeyboardTypeASCIICapable;\n    }\n    else if ([[_specifierDict objectForKey:KIASKKeyboardType] isEqualToString:kIASKKeyboardDecimalPad]) {\n\t\treturn UIKeyboardTypeDecimalPad;\n    }\n    else if ([[_specifierDict objectForKey:KIASKKeyboardType] isEqualToString:KIASKKeyboardURL]) {\n        return UIKeyboardTypeURL;\n    }\n    else if ([[_specifierDict objectForKey:KIASKKeyboardType] isEqualToString:kIASKKeyboardEmailAddress]) {\n        return UIKeyboardTypeEmailAddress;\n    }\n    return UIKeyboardTypeDefault;\n}\n\n- (UITextAutocapitalizationType)autocapitalizationType {\n    if ([[_specifierDict objectForKey:kIASKAutocapitalizationType] isEqualToString:kIASKAutoCapNone]) {\n        return UITextAutocapitalizationTypeNone;\n    }\n    else if ([[_specifierDict objectForKey:kIASKAutocapitalizationType] isEqualToString:kIASKAutoCapSentences]) {\n        return UITextAutocapitalizationTypeSentences;\n    }\n    else if ([[_specifierDict objectForKey:kIASKAutocapitalizationType] isEqualToString:kIASKAutoCapWords]) {\n        return UITextAutocapitalizationTypeWords;\n    }\n    else if ([[_specifierDict objectForKey:kIASKAutocapitalizationType] isEqualToString:kIASKAutoCapAllCharacters]) {\n        return UITextAutocapitalizationTypeAllCharacters;\n    }\n    return UITextAutocapitalizationTypeNone;\n}\n\n- (UITextAutocorrectionType)autoCorrectionType {\n    if ([[_specifierDict objectForKey:kIASKAutoCorrectionType] isEqualToString:kIASKAutoCorrDefault]) {\n        return UITextAutocorrectionTypeDefault;\n    }\n    else if ([[_specifierDict objectForKey:kIASKAutoCorrectionType] isEqualToString:kIASKAutoCorrNo]) {\n        return UITextAutocorrectionTypeNo;\n    }\n    else if ([[_specifierDict objectForKey:kIASKAutoCorrectionType] isEqualToString:kIASKAutoCorrYes]) {\n        return UITextAutocorrectionTypeYes;\n    }\n    return UITextAutocorrectionTypeDefault;\n}\n\n- (UIImage *)cellImage\n{\n    NSString *imageName = [_specifierDict objectForKey:kIASKCellImage];\n    if( imageName.length == 0 )\n        return nil;\n    \n    return [UIImage imageNamed:imageName];\n}\n\n- (UIImage *)highlightedCellImage\n{\n    NSString *imageName = [[_specifierDict objectForKey:kIASKCellImage ] stringByAppendingString:@\"Highlighted\"];\n    if( imageName.length == 0 )\n        return nil;\n\n    return [UIImage imageNamed:imageName];\n}\n\n- (BOOL)adjustsFontSizeToFitWidth {\n\tNSNumber *boxedResult = [_specifierDict objectForKey:kIASKAdjustsFontSizeToFitWidth];\n\treturn !boxedResult || [boxedResult boolValue];\n}\n\n- (NSTextAlignment)textAlignment\n{\n    if (self.subtitle.length || [[_specifierDict objectForKey:kIASKTextLabelAlignment] isEqualToString:kIASKTextLabelAlignmentLeft]) {\n        return NSTextAlignmentLeft;\n    } else if ([[_specifierDict objectForKey:kIASKTextLabelAlignment] isEqualToString:kIASKTextLabelAlignmentCenter]) {\n        return NSTextAlignmentCenter;\n    } else if ([[_specifierDict objectForKey:kIASKTextLabelAlignment] isEqualToString:kIASKTextLabelAlignmentRight]) {\n        return NSTextAlignmentRight;\n    }\n    if ([self.type isEqualToString:kIASKButtonSpecifier] && !self.cellImage) {\n\t\treturn NSTextAlignmentCenter;\n\t} else if ([self.type isEqualToString:kIASKPSMultiValueSpecifier] || [self.type isEqualToString:kIASKPSTitleValueSpecifier] || [self.type isEqualToString:kIASKTextViewSpecifier]) {\n\t\treturn NSTextAlignmentRight;\n\t}\n\treturn NSTextAlignmentLeft;\n}\n\n- (NSArray *)userInterfaceIdioms {\n    NSArray *idiomStrings = _specifierDict[kIASKSupportedUserInterfaceIdioms];\n    if (idiomStrings.count == 0) {\n        return @[@(UIUserInterfaceIdiomPhone), @(UIUserInterfaceIdiomPad)];\n    }\n    NSMutableArray *idioms = [NSMutableArray new];\n    for (NSString *idiomString in idiomStrings) {\n        if ([idiomString isEqualToString:@\"Phone\"]) {\n            [idioms addObject:@(UIUserInterfaceIdiomPhone)];\n        } else if ([idiomString isEqualToString:@\"Pad\"]) {\n            [idioms addObject:@(UIUserInterfaceIdiomPad)];\n        }\n    }\n    return idioms;\n}\n\n- (id)valueForKey:(NSString *)key {\n\treturn [_specifierDict objectForKey:key];\n}\n@end\n"
  },
  {
    "path": "ArcBit/External/InAppSettingsKit/Resources/Base.lproj/IASKLocalizable.strings",
    "content": "/*\n IASKLocalizable.strings\n Where To\n \n Created by Ortwin Gentz on 20.10.14.\n Copyright (c) 2014 FutureTap. All rights reserved.\n */\n\n\n\"Privacy\" = \"Privacy\"; // iOS 8+ Privacy cell: title\n\"Open in Settings app\" = \"\"; // iOS 8+ Privacy cell: subtitle (TODO)\n"
  },
  {
    "path": "ArcBit/External/InAppSettingsKit/Resources/de.lproj/IASKLocalizable.strings",
    "content": "/* \n  IASKLocalizable.strings\n  Where To\n\n  Created by Ortwin Gentz on 20.10.14.\n  Copyright (c) 2014 FutureTap. All rights reserved.\n*/\n\n\n\"Privacy\" = \"Datenschutz\"; // iOS 8+ Privacy cell: title\n\"Open in Settings app\" = \"In “Einstellungen” App öffnen\"; // iOS 8+ Privacy cell: subtitle\n"
  },
  {
    "path": "ArcBit/External/InAppSettingsKit/Resources/el.lproj/IASKLocalizable.strings",
    "content": "/* \n  IASKLocalizable.strings\n  Where To\n\n  Created by Ortwin Gentz on 20.10.14.\n  Copyright (c) 2014 FutureTap. All rights reserved.\n*/\n\n\n\"Privacy\" = \"Απόρρητο\"; // iOS 8+ Privacy cell: title\n\"Open in Settings app\" = \"\"; // iOS 8+ Privacy cell: subtitle (TODO)\n"
  },
  {
    "path": "ArcBit/External/InAppSettingsKit/Resources/en.lproj/IASKLocalizable.strings",
    "content": "/* \n  IASKLocalizable.strings\n  Where To\n\n  Created by Ortwin Gentz on 20.10.14.\n  Copyright (c) 2014 FutureTap. All rights reserved.\n*/\n\n\n\"Privacy\" = \"Privacy\"; // iOS 8+ Privacy cell: title\n\"Open in Settings app\" = \"Open in “Settings” app\"; // iOS 8+ Privacy cell: subtitle\n"
  },
  {
    "path": "ArcBit/External/InAppSettingsKit/Resources/es.lproj/IASKLocalizable.strings",
    "content": "/* \n  IASKLocalizable.strings\n  Where To\n\n  Created by Ortwin Gentz on 20.10.14.\n  Copyright (c) 2014 FutureTap. All rights reserved.\n*/\n\n\n\"Privacy\" = \"Privacidad\"; // iOS 8+ Privacy cell: title\n\"Open in Settings app\" = \"\"; // iOS 8+ Privacy cell: subtitle (TODO!)\n"
  },
  {
    "path": "ArcBit/External/InAppSettingsKit/Resources/fr.lproj/IASKLocalizable.strings",
    "content": "/* \n  IASKLocalizable.strings\n  Where To\n\n  Created by Ortwin Gentz on 20.10.14.\n  Copyright (c) 2014 FutureTap. All rights reserved.\n*/\n\n\n\"Privacy\" = \"Confidentialité\"; // iOS 8+ Privacy cell: title\n\"Open in Settings app\" = \"\"; // iOS 8+ Privacy cell: subtitle (TODO!)\n"
  },
  {
    "path": "ArcBit/External/InAppSettingsKit/Resources/it.lproj/IASKLocalizable.strings",
    "content": "/*\n IASKLocalizable.strings\n Where To\n \n Created by Ortwin Gentz on 20.10.14.\n Copyright (c) 2014 FutureTap. All rights reserved.\n */\n\n\n\"Privacy\" = \"Privacy\"; // iOS 8+ Privacy cell: title\n\"Open in Settings app\" = \"\"; // iOS 8+ Privacy cell: subtitle (TODO)\n"
  },
  {
    "path": "ArcBit/External/InAppSettingsKit/Resources/ja.lproj/IASKLocalizable.strings",
    "content": "/*\n IASKLocalizable.strings\n Where To\n \n Created by Ortwin Gentz on 20.10.14.\n Copyright (c) 2014 FutureTap. All rights reserved.\n */\n\n\n\"Privacy\" = \"プライバシー\"; // iOS 8+ Privacy cell: title\n\"Open in Settings app\" = \"\"; // iOS 8+ Privacy cell: subtitle (TODO)\n"
  },
  {
    "path": "ArcBit/External/InAppSettingsKit/Resources/nl.lproj/IASKLocalizable.strings",
    "content": "/* \n  IASKLocalizable.strings\n  Where To\n\n  Created by Ortwin Gentz on 20.10.14.\n  Copyright (c) 2014 FutureTap. All rights reserved.\n*/\n\n\n\"Privacy\" = \"Privacy\"; // iOS 8+ Privacy cell: title\n\"Open in Settings app\" = \"In “Instellingen” app openen\"; // iOS 8+ Privacy cell: subtitle\n"
  },
  {
    "path": "ArcBit/External/InAppSettingsKit/Resources/pt-PT.lproj/IASKLocalizable.strings",
    "content": "/*\n IASKLocalizable.strings\n Where To\n \n Created by Ortwin Gentz on 20.10.14.\n Copyright (c) 2014 FutureTap. All rights reserved.\n */\n\n\n\"Privacy\" = \"Privacidade\"; // iOS 8+ Privacy cell: title\n\"Open in Settings app\" = \"\"; // iOS 8+ Privacy cell: subtitle (TODO)\n"
  },
  {
    "path": "ArcBit/External/InAppSettingsKit/Resources/pt.lproj/IASKLocalizable.strings",
    "content": "/*\n IASKLocalizable.strings\n Where To\n \n Created by Ortwin Gentz on 20.10.14.\n Copyright (c) 2014 FutureTap. All rights reserved.\n */\n\n\n\"Privacy\" = \"Privacidade\"; // iOS 8+ Privacy cell: title\n\"Open in Settings app\" = \"\"; // iOS 8+ Privacy cell: subtitle (TODO)\n"
  },
  {
    "path": "ArcBit/External/InAppSettingsKit/Resources/ru.lproj/IASKLocalizable.strings",
    "content": "/*\n IASKLocalizable.strings\n Where To\n \n Created by Ortwin Gentz on 20.10.14.\n Copyright (c) 2014 FutureTap. All rights reserved.\n */\n\n\n\"Privacy\" = \"Приватность\"; // iOS 8+ Privacy cell: title\n\"Open in Settings app\" = \"\"; // iOS 8+ Privacy cell: subtitle (TODO)\n"
  },
  {
    "path": "ArcBit/External/InAppSettingsKit/Resources/sv.lproj/IASKLocalizable.strings",
    "content": "/*\n IASKLocalizable.strings\n Where To\n \n Created by Ortwin Gentz on 20.10.14.\n Copyright (c) 2014 FutureTap. All rights reserved.\n */\n\n\n\"Privacy\" = \"Integritetsskydd\"; // iOS 8+ Privacy cell: title\n\"Open in Settings app\" = \"\"; // iOS 8+ Privacy cell: subtitle (TODO)\n"
  },
  {
    "path": "ArcBit/External/InAppSettingsKit/Resources/th.lproj/IASKLocalizable.strings",
    "content": "/*\n IASKLocalizable.strings\n Where To\n \n Created by Ortwin Gentz on 20.10.14.\n Copyright (c) 2014 FutureTap. All rights reserved.\n */\n\n\n\"Privacy\" = \"ความเป็นส่วนตัว\"; // iOS 8+ Privacy cell: title\n\"Open in Settings app\" = \"\"; // iOS 8+ Privacy cell: subtitle (TODO)\n"
  },
  {
    "path": "ArcBit/External/InAppSettingsKit/Resources/tr.lproj/IASKLocalizable.strings",
    "content": "/*\n IASKLocalizable.strings\n Where To\n \n Created by Ortwin Gentz on 20.10.14.\n Copyright (c) 2014 FutureTap. All rights reserved.\n */\n\n\n\"Privacy\" = \"Gizlilik\"; // iOS 8+ Privacy cell: title\n\"Open in Settings app\" = \"\"; // iOS 8+ Privacy cell: subtitle (TODO)\n"
  },
  {
    "path": "ArcBit/External/InAppSettingsKit/Resources/zh-Hant.lproj/IASKLocalizable.strings",
    "content": "/*\n IASKLocalizable.strings\n Where To\n \n Created by Ortwin Gentz on 20.10.14.\n Copyright (c) 2014 FutureTap. All rights reserved.\n */\n\n\n\"Privacy\" = \"Privacy\"; // iOS 8+ Privacy cell: title\n\"Open in Settings app\" = \"\"; // iOS 8+ Privacy cell: subtitle (TODO)\n"
  },
  {
    "path": "ArcBit/External/InAppSettingsKit/Views/IASKPSSliderSpecifierViewCell.h",
    "content": "//\n//  IASKPSSliderSpecifierViewCell.h\n//  http://www.inappsettingskit.com\n//\n//  Copyright (c) 2009:\n//  Luc Vandal, Edovia Inc., http://www.edovia.com\n//  Ortwin Gentz, FutureTap GmbH, http://www.futuretap.com\n//  All rights reserved.\n// \n//  It is appreciated but not required that you give credit to Luc Vandal and Ortwin Gentz, \n//  as the original authors of this code. You can give credit in a blog post, a tweet or on \n//  a info page of your app. Also, the original authors appreciate letting them know if you use this code.\n//\n//  This code is licensed under the BSD license that is available at: http://www.opensource.org/licenses/bsd-license.php\n//\n\n#import <UIKit/UIKit.h>\n\n@class IASKSlider;\n\n@interface IASKPSSliderSpecifierViewCell : UITableViewCell\n\n@property (nonatomic, strong) IASKSlider *slider;\n@property (nonatomic, strong) UIImageView *minImage;\n@property (nonatomic, strong) UIImageView *maxImage;\n\n@end\n"
  },
  {
    "path": "ArcBit/External/InAppSettingsKit/Views/IASKPSSliderSpecifierViewCell.m",
    "content": "//\n//  IASKPSSliderSpecifierViewCell.m\n//  http://www.inappsettingskit.com\n//\n//  Copyright (c) 2009-2010:\n//  Luc Vandal, Edovia Inc., http://www.edovia.com\n//  Ortwin Gentz, FutureTap GmbH, http://www.futuretap.com\n//  All rights reserved.\n// \n//  It is appreciated but not required that you give credit to Luc Vandal and Ortwin Gentz, \n//  as the original authors of this code. You can give credit in a blog post, a tweet or on \n//  a info page of your app. Also, the original authors appreciate letting them know if you use this code.\n//\n//  This code is licensed under the BSD license that is available at: http://www.opensource.org/licenses/bsd-license.php\n//\n\n#import \"IASKPSSliderSpecifierViewCell.h\"\n#import \"IASKSlider.h\"\n#import \"IASKSettingsReader.h\"\n\n@implementation IASKPSSliderSpecifierViewCell\n\n- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier\n{\n    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];\n    if (self) {\n        // Setting only frame data that will not be overwritten by layoutSubviews\n        // Slider\n        _slider = [[IASKSlider alloc] initWithFrame:CGRectMake(0, 0, 0, 23)];\n        _slider.autoresizingMask = UIViewAutoresizingFlexibleBottomMargin |\n        UIViewAutoresizingFlexibleWidth;\n        _slider.continuous = NO;\n        [self.contentView addSubview:_slider];\n\n        // MinImage\n        _minImage = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, 21, 21)];\n        _minImage.autoresizingMask = UIViewAutoresizingFlexibleRightMargin |\n        UIViewAutoresizingFlexibleBottomMargin;\n        [self.contentView addSubview:_minImage];\n\n        // MaxImage\n        _maxImage = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, 21, 21)];\n        _maxImage.autoresizingMask = UIViewAutoresizingFlexibleLeftMargin |\n        UIViewAutoresizingFlexibleBottomMargin;\n        [self.contentView addSubview:_maxImage];\n\n        self.selectionStyle = UITableViewCellSelectionStyleNone;\n    }\n    return self;\n}\n\n- (void)layoutSubviews {\n    [super layoutSubviews];\n    \n    UIEdgeInsets padding = (UIEdgeInsets) { 0, kIASKPaddingLeft, 0, kIASKPaddingRight };\n    if ([self respondsToSelector:@selector(layoutMargins)]) {\n        padding = [self layoutMargins];\n    }\n\tCGRect  sliderBounds    = _slider.bounds;\n    CGPoint sliderCenter    = _slider.center;\n    const CGFloat superViewWidth = _slider.superview.frame.size.width;\n    \n    sliderBounds.size.width = superViewWidth - (padding.left + padding.right);\n    sliderCenter.x = padding.left + sliderBounds.size.width / 2;\n    sliderCenter.y = self.contentView.center.y;\n\t_minImage.hidden = YES;\n\t_maxImage.hidden = YES;\n\n\t// Check if there are min and max images. If so, change the layout accordingly.\n\tif (_minImage.image) {\n\t\t// Min image\n\t\t_minImage.hidden = NO;\n        sliderBounds.size.width -= _minImage.frame.size.width + kIASKSliderImageGap;\n        sliderCenter.x += (_minImage.frame.size.width + kIASKSliderImageGap) / 2;\n        _minImage.center = CGPointMake(_minImage.frame.size.width / 2 + padding.left,\n                                       self.contentView.center.y);\n    }\n\tif (_maxImage.image) {\n\t\t// Max image\n\t\t_maxImage.hidden = NO;\n        sliderBounds.size.width  -= kIASKSliderImageGap + _maxImage.frame.size.width;\n\t\tsliderCenter.x    -= (kIASKSliderImageGap + _maxImage.frame.size.width) / 2;\n        _maxImage.center = CGPointMake(superViewWidth - padding.right - _maxImage.frame.size.width /2, self.contentView.center.y );\n\t}\n\t\n\t_slider.bounds = sliderBounds;\n    _slider.center = sliderCenter;\n}\t\n\n- (void)prepareForReuse {\n\t[super prepareForReuse];\n\t_minImage.image = nil;\n\t_maxImage.image = nil;\n}\n@end\n"
  },
  {
    "path": "ArcBit/External/InAppSettingsKit/Views/IASKPSTextFieldSpecifierViewCell.h",
    "content": "//\n//  IASKPSTextFieldSpecifierViewCell.h\n//  http://www.inappsettingskit.com\n//\n//  Copyright (c) 2009:\n//  Luc Vandal, Edovia Inc., http://www.edovia.com\n//  Ortwin Gentz, FutureTap GmbH, http://www.futuretap.com\n//  All rights reserved.\n// \n//  It is appreciated but not required that you give credit to Luc Vandal and Ortwin Gentz, \n//  as the original authors of this code. You can give credit in a blog post, a tweet or on \n//  a info page of your app. Also, the original authors appreciate letting them know if you use this code.\n//\n//  This code is licensed under the BSD license that is available at: http://www.opensource.org/licenses/bsd-license.php\n//\n\n#import <UIKit/UIKit.h>\n\n@class IASKTextField;\n\n@interface IASKPSTextFieldSpecifierViewCell : UITableViewCell\n\n@property (nonatomic, strong) IASKTextField *textField;\n\n@end\n"
  },
  {
    "path": "ArcBit/External/InAppSettingsKit/Views/IASKPSTextFieldSpecifierViewCell.m",
    "content": "//\n//  IASKPSTextFieldSpecifierViewCell.m\n//  http://www.inappsettingskit.com\n//\n//  Copyright (c) 2009-2010:\n//  Luc Vandal, Edovia Inc., http://www.edovia.com\n//  Ortwin Gentz, FutureTap GmbH, http://www.futuretap.com\n//  All rights reserved.\n// \n//  It is appreciated but not required that you give credit to Luc Vandal and Ortwin Gentz, \n//  as the original authors of this code. You can give credit in a blog post, a tweet or on \n//  a info page of your app. Also, the original authors appreciate letting them know if you use this code.\n//\n//  This code is licensed under the BSD license that is available at: http://www.opensource.org/licenses/bsd-license.php\n//\n\n#import \"IASKPSTextFieldSpecifierViewCell.h\"\n#import \"IASKTextField.h\"\n#import \"IASKSettingsReader.h\"\n\n@implementation IASKPSTextFieldSpecifierViewCell\n- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier\n{\n    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];\n    if (self) {\n\t\tself.textLabel.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight | UIViewAutoresizingFlexibleRightMargin;\n\n        // TextField\n        _textField = [[IASKTextField alloc] initWithFrame:CGRectMake(0, 0, 200, self.frame.size.height)];\n        _textField.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight | UIViewAutoresizingFlexibleLeftMargin;\n        _textField.font = [UIFont systemFontOfSize:kIASKLabelFontSize];\n        _textField.minimumFontSize = kIASKMinimumFontSize;\n        IASK_IF_PRE_IOS7(_textField.textColor = [UIColor colorWithRed:0.275f green:0.376f blue:0.522f alpha:1.000f];);\n        [self.contentView addSubview:_textField];\n        \n        self.selectionStyle = UITableViewCellSelectionStyleNone; \n    }\n    return self;\n}\n\n- (void)layoutSubviews {\n    [super layoutSubviews];\n    \n    UIEdgeInsets padding = (UIEdgeInsets) { 0, kIASKPaddingLeft, 0, kIASKPaddingRight };\n    if ([self respondsToSelector:@selector(layoutMargins)]) {\n        padding = [self layoutMargins];\n    }\n    \n    // Label\n\tCGFloat imageOffset = self.imageView.image ? self.imageView.bounds.size.width + padding.left : 0;\n    CGSize labelSize = [self.textLabel sizeThatFits:CGSizeZero];\n\tlabelSize.width = MAX(labelSize.width, kIASKMinLabelWidth - imageOffset);\n    self.textLabel.frame = (CGRect){self.textLabel.frame.origin, {MIN(kIASKMaxLabelWidth, labelSize.width), self.textLabel.frame.size.height}} ;\n\n    // TextField\n    _textField.center = CGPointMake(_textField.center.x, self.contentView.center.y);\n\tCGRect textFieldFrame = _textField.frame;\n\ttextFieldFrame.origin.x = self.textLabel.frame.origin.x + MAX(kIASKMinLabelWidth - imageOffset, self.textLabel.frame.size.width) + kIASKSpacing;\n\ttextFieldFrame.size.width = _textField.superview.frame.size.width - textFieldFrame.origin.x - padding.right;\n\t\n\tif (!self.textLabel.text.length) {\n\t\ttextFieldFrame.origin.x = padding.left + imageOffset;\n\t\ttextFieldFrame.size.width = self.contentView.bounds.size.width - padding.left - padding.right - imageOffset;\n\t} else if (_textField.textAlignment == NSTextAlignmentRight) {\n\t\ttextFieldFrame.origin.x = self.textLabel.frame.origin.x + labelSize.width + kIASKSpacing;\n\t\ttextFieldFrame.size.width = _textField.superview.frame.size.width - textFieldFrame.origin.x - padding.right;\n\t}\n\t_textField.frame = textFieldFrame;\n}\n\n@end\n"
  },
  {
    "path": "ArcBit/External/InAppSettingsKit/Views/IASKSlider.h",
    "content": "//\n//  IASKSlider.h\n//  http://www.inappsettingskit.com\n//\n//  Copyright (c) 2009:\n//  Luc Vandal, Edovia Inc., http://www.edovia.com\n//  Ortwin Gentz, FutureTap GmbH, http://www.futuretap.com\n//  All rights reserved.\n// \n//  It is appreciated but not required that you give credit to Luc Vandal and Ortwin Gentz, \n//  as the original authors of this code. You can give credit in a blog post, a tweet or on \n//  a info page of your app. Also, the original authors appreciate letting them know if you use this code.\n//\n//  This code is licensed under the BSD license that is available at: http://www.opensource.org/licenses/bsd-license.php\n//\n\n#import <UIKit/UIKit.h>\n\n\n@interface IASKSlider : UISlider\n\n@property (nonatomic, copy) NSString *key;\n\n@end\n"
  },
  {
    "path": "ArcBit/External/InAppSettingsKit/Views/IASKSlider.m",
    "content": "//\n//  IASKSlider.m\n//  http://www.inappsettingskit.com\n//\n//  Copyright (c) 2009:\n//  Luc Vandal, Edovia Inc., http://www.edovia.com\n//  Ortwin Gentz, FutureTap GmbH, http://www.futuretap.com\n//  All rights reserved.\n// \n//  It is appreciated but not required that you give credit to Luc Vandal and Ortwin Gentz, \n//  as the original authors of this code. You can give credit in a blog post, a tweet or on \n//  a info page of your app. Also, the original authors appreciate letting them know if you use this code.\n//\n//  This code is licensed under the BSD license that is available at: http://www.opensource.org/licenses/bsd-license.php\n//\n\n#import \"IASKSlider.h\"\n\n\n@implementation IASKSlider\n\n@end\n"
  },
  {
    "path": "ArcBit/External/InAppSettingsKit/Views/IASKSwitch.h",
    "content": "//\n//  IASKSwitch.h\n//  http://www.inappsettingskit.com\n//\n//  Copyright (c) 2009:\n//  Luc Vandal, Edovia Inc., http://www.edovia.com\n//  Ortwin Gentz, FutureTap GmbH, http://www.futuretap.com\n//  All rights reserved.\n// \n//  It is appreciated but not required that you give credit to Luc Vandal and Ortwin Gentz, \n//  as the original authors of this code. You can give credit in a blog post, a tweet or on \n//  a info page of your app. Also, the original authors appreciate letting them know if you use this code.\n//\n//  This code is licensed under the BSD license that is available at: http://www.opensource.org/licenses/bsd-license.php\n//\n\n#import <UIKit/UIKit.h>\n\n\n@interface IASKSwitch : UISwitch\n\n@property (nonatomic, copy) NSString *key;\n\n@end\n"
  },
  {
    "path": "ArcBit/External/InAppSettingsKit/Views/IASKSwitch.m",
    "content": "//\n//  IASKSwitch.m\n//  http://www.inappsettingskit.com\n//\n//  Copyright (c) 2009:\n//  Luc Vandal, Edovia Inc., http://www.edovia.com\n//  Ortwin Gentz, FutureTap GmbH, http://www.futuretap.com\n//  All rights reserved.\n// \n//  It is appreciated but not required that you give credit to Luc Vandal and Ortwin Gentz, \n//  as the original authors of this code. You can give credit in a blog post, a tweet or on \n//  a info page of your app. Also, the original authors appreciate letting them know if you use this code.\n//\n//  This code is licensed under the BSD license that is available at: http://www.opensource.org/licenses/bsd-license.php\n//\n\n#import \"IASKSwitch.h\"\n\n\n@implementation IASKSwitch\n\n@end\n"
  },
  {
    "path": "ArcBit/External/InAppSettingsKit/Views/IASKTextField.h",
    "content": "//\n//  IASKTextField.h\n//  http://www.inappsettingskit.com\n//\n//  Copyright (c) 2009:\n//  Luc Vandal, Edovia Inc., http://www.edovia.com\n//  Ortwin Gentz, FutureTap GmbH, http://www.futuretap.com\n//  All rights reserved.\n// \n//  It is appreciated but not required that you give credit to Luc Vandal and Ortwin Gentz, \n//  as the original authors of this code. You can give credit in a blog post, a tweet or on \n//  a info page of your app. Also, the original authors appreciate letting them know if you use this code.\n//\n//  This code is licensed under the BSD license that is available at: http://www.opensource.org/licenses/bsd-license.php\n//\n\n#import <UIKit/UIKit.h>\n\n\n@interface IASKTextField : UITextField\n\n@property (nonatomic, copy) NSString *key;\n\n@end\n"
  },
  {
    "path": "ArcBit/External/InAppSettingsKit/Views/IASKTextField.m",
    "content": "//\n//  IASKTextField.m\n//  http://www.inappsettingskit.com\n//\n//  Copyright (c) 2009:\n//  Luc Vandal, Edovia Inc., http://www.edovia.com\n//  Ortwin Gentz, FutureTap GmbH, http://www.futuretap.com\n//  All rights reserved.\n// \n//  It is appreciated but not required that you give credit to Luc Vandal and Ortwin Gentz, \n//  as the original authors of this code. You can give credit in a blog post, a tweet or on \n//  a info page of your app. Also, the original authors appreciate letting them know if you use this code.\n//\n//  This code is licensed under the BSD license that is available at: http://www.opensource.org/licenses/bsd-license.php\n//\n\n#import \"IASKTextField.h\"\n\n\n@implementation IASKTextField\n\n@end\n"
  },
  {
    "path": "ArcBit/External/InAppSettingsKit/Views/IASKTextView.h",
    "content": "//\n//  IASKTextView.h\n//  http://www.inappsettingskit.com\n//\n//  Copyright (c) 2009-2015:\n//  Luc Vandal, Edovia Inc., http://www.edovia.com\n//  Ortwin Gentz, FutureTap GmbH, http://www.futuretap.com\n//  All rights reserved.\n//\n//  It is appreciated but not required that you give credit to Luc Vandal and Ortwin Gentz,\n//  as the original authors of this code. You can give credit in a blog post, a tweet or on\n//  a info page of your app. Also, the original authors appreciate letting them know if you use this code.\n//\n//  This code is licensed under the BSD license that is available at: http://www.opensource.org/licenses/bsd-license.php\n//\n\n#import <UIKit/UIKit.h>\n\n@interface IASKTextView : UITextView\n\n@property (nonatomic, copy) NSString *key;\n\n@end\n"
  },
  {
    "path": "ArcBit/External/InAppSettingsKit/Views/IASKTextView.m",
    "content": "//\n//  IASKTextView.m\n//  http://www.inappsettingskit.com\n//\n//  Copyright (c) 2009-2015:\n//  Luc Vandal, Edovia Inc., http://www.edovia.com\n//  Ortwin Gentz, FutureTap GmbH, http://www.futuretap.com\n//  All rights reserved.\n//\n//  It is appreciated but not required that you give credit to Luc Vandal and Ortwin Gentz,\n//  as the original authors of this code. You can give credit in a blog post, a tweet or on\n//  a info page of your app. Also, the original authors appreciate letting them know if you use this code.\n//\n//  This code is licensed under the BSD license that is available at: http://www.opensource.org/licenses/bsd-license.php\n//\n\n#import \"IASKTextView.h\"\n\n@implementation IASKTextView\n\n@end\n"
  },
  {
    "path": "ArcBit/External/InAppSettingsKit/Views/IASKTextViewCell.h",
    "content": "//\n//  IASKTextViewCell.h\n//  http://www.inappsettingskit.com\n//\n//  Copyright (c) 2009-2015:\n//  Luc Vandal, Edovia Inc., http://www.edovia.com\n//  Ortwin Gentz, FutureTap GmbH, http://www.futuretap.com\n//  All rights reserved.\n//\n//  It is appreciated but not required that you give credit to Luc Vandal and Ortwin Gentz,\n//  as the original authors of this code. You can give credit in a blog post, a tweet or on\n//  a info page of your app. Also, the original authors appreciate letting them know if you use this code.\n//\n//  This code is licensed under the BSD license that is available at: http://www.opensource.org/licenses/bsd-license.php\n//\n\n#import <UIKit/UIKit.h>\n#import \"IASKTextView.h\"\n\n@interface IASKTextViewCell : UITableViewCell\n\n@property (nonatomic, strong) IASKTextView *textView;\n\n@end\n"
  },
  {
    "path": "ArcBit/External/InAppSettingsKit/Views/IASKTextViewCell.m",
    "content": "//\n//  IASKTextViewCell.m\n//  http://www.inappsettingskit.com\n//\n//  Copyright (c) 2009-2015:\n//  Luc Vandal, Edovia Inc., http://www.edovia.com\n//  Ortwin Gentz, FutureTap GmbH, http://www.futuretap.com\n//  All rights reserved.\n//\n//  It is appreciated but not required that you give credit to Luc Vandal and Ortwin Gentz,\n//  as the original authors of this code. You can give credit in a blog post, a tweet or on\n//  a info page of your app. Also, the original authors appreciate letting them know if you use this code.\n//\n//  This code is licensed under the BSD license that is available at: http://www.opensource.org/licenses/bsd-license.php\n//\n\n#import \"IASKTextViewCell.h\"\n#import \"IASKSettingsReader.h\"\n\n@implementation IASKTextViewCell\n\n\n- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {\n\tif ((self = [super initWithStyle:UITableViewCellStyleDefault reuseIdentifier:reuseIdentifier])) {\n\t\tself.selectionStyle = UITableViewCellSelectionStyleNone;\n\t\tself.accessoryType = UITableViewCellAccessoryNone;\n\n\t\tIASKTextView *textView = [[IASKTextView alloc] initWithFrame:CGRectZero];\n\t\ttextView.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;\n\t\ttextView.scrollEnabled = NO;\n\t\ttextView.font = [UIFont systemFontOfSize:17.0];\n\t\ttextView.backgroundColor = [UIColor whiteColor];\n\t\t[self.contentView addSubview:textView];\n\n\t\tself.textView = textView;\n    }\n    return self;\n}\n\n- (void)layoutSubviews {\n\t[super layoutSubviews];\n\t\n\tUIEdgeInsets padding = (UIEdgeInsets) { 0, kIASKPaddingLeft, 0, kIASKPaddingRight };\n\tif ([self respondsToSelector:@selector(layoutMargins)]) {\n\t\tpadding = self.layoutMargins;\n\t\tpadding.left -= 5;\n\t\tpadding.right -= 5;\n\t\tpadding.top -= 5;\n\t\tpadding.bottom -= 5;\n\t}\n\t\n\tself.textView.frame = UIEdgeInsetsInsetRect(self.bounds, padding);\n}\n\n@end\n"
  },
  {
    "path": "ArcBit/External/JNKeychain-master/JNKeychain.h",
    "content": "//\n//  JNKeychain.h\n//\n//  Created by Jeremias Nunez on 5/10/13.\n//  Copyright (c) 2013 Jeremias Nunez. All rights reserved.\n//\n//  Based on Anomie's great answer - http://stackoverflow.com/a/5251820\n//\n//  jeremias.np@gmail.com\n\n#import <Foundation/Foundation.h>\n\n@interface JNKeychain : NSObject\n\n+ (void)saveValue:(id)data forKey:(NSString*)key;\n+ (id)loadValueForKey:(NSString*)key;\n+ (void)deleteValueForKey:(NSString *)key;\n\n@end\n"
  },
  {
    "path": "ArcBit/External/JNKeychain-master/JNKeychain.m",
    "content": "//\n//  JNKeychain.m\n//\n//  Created by Jeremias Nunez on 5/10/13.\n//  Copyright (c) 2013 Jeremias Nunez. All rights reserved.\n//\n//  jeremias.np@gmail.com\n\n#import \"JNKeychain.h\"\n\n@interface JNKeychain ()\n\n+ (NSMutableDictionary *)getKeychainQuery:(NSString *)key;\n\n@end\n\n@implementation JNKeychain\n\n+ (NSMutableDictionary *)getKeychainQuery:(NSString *)key\n{\n    // see http://developer.apple.com/library/ios/#DOCUMENTATION/Security/Reference/keychainservices/Reference/reference.html \n    return [NSMutableDictionary dictionaryWithObjectsAndKeys:\n            (__bridge id)kSecClassGenericPassword, (__bridge id)kSecClass,\n            key, (__bridge id)kSecAttrService,\n            key, (__bridge id)kSecAttrAccount,\n            (__bridge id)kSecAttrAccessibleAfterFirstUnlock, (__bridge id)kSecAttrAccessible,\n            nil];\n}\n\n+ (void)saveValue:(id)data forKey:(NSString*)key\n{\n    NSMutableDictionary *keychainQuery = [self getKeychainQuery:key];\n    // delete any previous value with this key\n    SecItemDelete((__bridge CFDictionaryRef)keychainQuery);\n    \n    [keychainQuery setObject:[NSKeyedArchiver archivedDataWithRootObject:data] forKey:(__bridge id)kSecValueData];\n    \n    SecItemAdd((__bridge CFDictionaryRef)keychainQuery, NULL);\n}\n\n+ (id)loadValueForKey:(NSString *)key\n{\n    id value = nil;\n    NSMutableDictionary *keychainQuery = [self getKeychainQuery:key];\n    CFDataRef keyData = NULL;\n    \n    [keychainQuery setObject:(__bridge id)kCFBooleanTrue forKey:(__bridge id)kSecReturnData];\n    [keychainQuery setObject:(__bridge id)kSecMatchLimitOne forKey:(__bridge id)kSecMatchLimit];\n    \n    if (SecItemCopyMatching((__bridge CFDictionaryRef)keychainQuery, (CFTypeRef *)&keyData) == noErr) {\n        @try {\n            value = [NSKeyedUnarchiver unarchiveObjectWithData:(__bridge NSData *)keyData];\n        }\n        @catch (NSException *e) {\n            NSLog(@\"Unarchive of %@ failed: %@\", key, e);\n        }\n        @finally {}\n    }\n    \n    if (keyData) {\n        CFRelease(keyData);\n    }\n    \n    return value;\n}\n\n+ (void)deleteValueForKey:(NSString *)key\n{\n    NSMutableDictionary *keychainQuery = [self getKeychainQuery:key];\n    SecItemDelete((__bridge CFDictionaryRef)keychainQuery);\n}\n\n@end\n"
  },
  {
    "path": "ArcBit/External/KeychainItemWrapper/KeychainItemWrapper.h",
    "content": "/*\n     File: KeychainItemWrapper.h\n Abstract: \n Objective-C wrapper for accessing a single keychain item.\n \n  Version: 1.2 - ARCified\n \n Disclaimer: IMPORTANT:  This Apple software is supplied to you by Apple\n Inc. (\"Apple\") in consideration of your agreement to the following\n terms, and your use, installation, modification or redistribution of\n this Apple software constitutes acceptance of these terms.  If you do\n not agree with these terms, please do not use, install, modify or\n redistribute this Apple software.\n \n In consideration of your agreement to abide by the following terms, and\n subject to these terms, Apple grants you a personal, non-exclusive\n license, under Apple's copyrights in this original Apple software (the\n \"Apple Software\"), to use, reproduce, modify and redistribute the Apple\n Software, with or without modifications, in source and/or binary forms;\n provided that if you redistribute the Apple Software in its entirety and\n without modifications, you must retain this notice and the following\n text and disclaimers in all such redistributions of the Apple Software.\n Neither the name, trademarks, service marks or logos of Apple Inc. may\n be used to endorse or promote products derived from the Apple Software\n without specific prior written permission from Apple.  Except as\n expressly stated in this notice, no other rights or licenses, express or\n implied, are granted by Apple herein, including but not limited to any\n patent rights that may be infringed by your derivative works or by other\n works in which the Apple Software may be incorporated.\n \n The Apple Software is provided by Apple on an \"AS IS\" basis.  APPLE\n MAKES NO WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION\n THE IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS\n FOR A PARTICULAR PURPOSE, REGARDING THE APPLE SOFTWARE OR ITS USE AND\n OPERATION ALONE OR IN COMBINATION WITH YOUR PRODUCTS.\n \n IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL\n OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n INTERRUPTION) ARISING IN ANY WAY OUT OF THE USE, REPRODUCTION,\n MODIFICATION AND/OR DISTRIBUTION OF THE APPLE SOFTWARE, HOWEVER CAUSED\n AND WHETHER UNDER THEORY OF CONTRACT, TORT (INCLUDING NEGLIGENCE),\n STRICT LIABILITY OR OTHERWISE, EVEN IF APPLE HAS BEEN ADVISED OF THE\n POSSIBILITY OF SUCH DAMAGE.\n \n Copyright (C) 2010 Apple Inc. All Rights Reserved.\n \n*/\n\n#import <UIKit/UIKit.h>\n\n/*\n    The KeychainItemWrapper class is an abstraction layer for the iPhone Keychain communication. It is merely a \n    simple wrapper to provide a distinct barrier between all the idiosyncracies involved with the Keychain\n    CF/NS container objects.\n*/\n@interface KeychainItemWrapper : NSObject\n\n// Designated initializer.\n- (id)initWithIdentifier: (NSString *)identifier accessGroup:(NSString *)accessGroup;\n- (void)setObject:(id)inObject forKey:(id)key;\n- (id)objectForKey:(id)key;\n\n// Initializes and resets the default generic keychain item data.\n- (void)resetKeychainItem;\n\n@end\n"
  },
  {
    "path": "ArcBit/External/KeychainItemWrapper/KeychainItemWrapper.m",
    "content": "/*\n     File: KeychainItemWrapper.m \n Abstract: \n Objective-C wrapper for accessing a single keychain item.\n  \n  Version: 1.2 - ARCified\n  \n Disclaimer: IMPORTANT:  This Apple software is supplied to you by Apple \n Inc. (\"Apple\") in consideration of your agreement to the following \n terms, and your use, installation, modification or redistribution of \n this Apple software constitutes acceptance of these terms.  If you do \n not agree with these terms, please do not use, install, modify or \n redistribute this Apple software. \n  \n In consideration of your agreement to abide by the following terms, and \n subject to these terms, Apple grants you a personal, non-exclusive \n license, under Apple's copyrights in this original Apple software (the \n \"Apple Software\"), to use, reproduce, modify and redistribute the Apple \n Software, with or without modifications, in source and/or binary forms; \n provided that if you redistribute the Apple Software in its entirety and \n without modifications, you must retain this notice and the following \n text and disclaimers in all such redistributions of the Apple Software. \n Neither the name, trademarks, service marks or logos of Apple Inc. may \n be used to endorse or promote products derived from the Apple Software \n without specific prior written permission from Apple.  Except as \n expressly stated in this notice, no other rights or licenses, express or \n implied, are granted by Apple herein, including but not limited to any \n patent rights that may be infringed by your derivative works or by other \n works in which the Apple Software may be incorporated. \n  \n The Apple Software is provided by Apple on an \"AS IS\" basis.  APPLE \n MAKES NO WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION \n THE IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS \n FOR A PARTICULAR PURPOSE, REGARDING THE APPLE SOFTWARE OR ITS USE AND \n OPERATION ALONE OR IN COMBINATION WITH YOUR PRODUCTS. \n  \n IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL \n OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF \n SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS \n INTERRUPTION) ARISING IN ANY WAY OUT OF THE USE, REPRODUCTION, \n MODIFICATION AND/OR DISTRIBUTION OF THE APPLE SOFTWARE, HOWEVER CAUSED \n AND WHETHER UNDER THEORY OF CONTRACT, TORT (INCLUDING NEGLIGENCE), \n STRICT LIABILITY OR OTHERWISE, EVEN IF APPLE HAS BEEN ADVISED OF THE \n POSSIBILITY OF SUCH DAMAGE. \n  \n Copyright (C) 2010 Apple Inc. All Rights Reserved. \n  \n*/ \n\n#define PASSWORD_USES_DATA\n\n#import \"KeychainItemWrapper.h\"\n#import <Security/Security.h>\n\n/*\n\nThese are the default constants and their respective types,\navailable for the kSecClassGenericPassword Keychain Item class:\n\nkSecAttrAccessGroup\t\t\t-\t\tCFStringRef\nkSecAttrCreationDate\t\t-\t\tCFDateRef\nkSecAttrModificationDate    -\t\tCFDateRef\nkSecAttrDescription\t\t\t-\t\tCFStringRef\nkSecAttrComment\t\t\t\t-\t\tCFStringRef\nkSecAttrCreator\t\t\t\t-\t\tCFNumberRef\nkSecAttrType                -\t\tCFNumberRef\nkSecAttrLabel\t\t\t\t-\t\tCFStringRef\nkSecAttrIsInvisible\t\t\t-\t\tCFBooleanRef\nkSecAttrIsNegative\t\t\t-\t\tCFBooleanRef\nkSecAttrAccount\t\t\t\t-\t\tCFStringRef\nkSecAttrService\t\t\t\t-\t\tCFStringRef\nkSecAttrGeneric\t\t\t\t-\t\tCFDataRef\n \nSee the header file Security/SecItem.h for more details.\n\n*/\n\n@interface KeychainItemWrapper (PrivateMethods)\n/*\nThe decision behind the following two methods (secItemFormatToDictionary and dictionaryToSecItemFormat) was\nto encapsulate the transition between what the detail view controller was expecting (NSString *) and what the\nKeychain API expects as a validly constructed container class.\n*/\n- (NSMutableDictionary *)secItemFormatToDictionary:(NSDictionary *)dictionaryToConvert;\n- (NSMutableDictionary *)dictionaryToSecItemFormat:(NSDictionary *)dictionaryToConvert;\n\n// Updates the item in the keychain, or adds it if it doesn't exist.\n- (void)writeToKeychain;\n\n@end\n\n@implementation KeychainItemWrapper\n{\n    NSMutableDictionary *keychainItemData;\t\t// The actual keychain item data backing store.\n    NSMutableDictionary *genericPasswordQuery;\t// A placeholder for the generic keychain item query used to locate the item.\n}\n\n- (id)initWithIdentifier: (NSString *)identifier accessGroup:(NSString *) accessGroup;\n{\n    if (self = [super init])\n    {\n        // Begin Keychain search setup. The genericPasswordQuery leverages the special user\n        // defined attribute kSecAttrGeneric to distinguish itself between other generic Keychain\n        // items which may be included by the same application.\n        genericPasswordQuery = [[NSMutableDictionary alloc] init];\n        \n\t\t[genericPasswordQuery setObject:(__bridge id)kSecClassGenericPassword forKey:(__bridge id)kSecClass];\n        [genericPasswordQuery setObject:identifier forKey:(__bridge id)kSecAttrGeneric];\n\t\t\n\t\t// The keychain access group attribute determines if this item can be shared\n\t\t// amongst multiple apps whose code signing entitlements contain the same keychain access group.\n\t\tif (accessGroup != nil)\n\t\t{\n#if TARGET_IPHONE_SIMULATOR\n\t\t\t// Ignore the access group if running on the iPhone simulator.\n\t\t\t// \n\t\t\t// Apps that are built for the simulator aren't signed, so there's no keychain access group\n\t\t\t// for the simulator to check. This means that all apps can see all keychain items when run\n\t\t\t// on the simulator.\n\t\t\t//\n\t\t\t// If a SecItem contains an access group attribute, SecItemAdd and SecItemUpdate on the\n\t\t\t// simulator will return -25243 (errSecNoAccessForItem).\n#else\t\t\t\n\t\t\t[genericPasswordQuery setObject:accessGroup forKey:(__bridge id)kSecAttrAccessGroup];\n#endif\n\t\t}\n\t\t\n\t\t// Use the proper search constants, return only the attributes of the first match.\n        [genericPasswordQuery setObject:(__bridge id)kSecMatchLimitOne forKey:(__bridge id)kSecMatchLimit];\n        [genericPasswordQuery setObject:(__bridge id)kCFBooleanTrue forKey:(__bridge id)kSecReturnAttributes];\n        \n        NSDictionary *tempQuery = [NSDictionary dictionaryWithDictionary:genericPasswordQuery];\n        \n        CFMutableDictionaryRef outDictionary = NULL;\n        \n        if (!SecItemCopyMatching((__bridge CFDictionaryRef)tempQuery, (CFTypeRef *)&outDictionary) == noErr)\n        {\n            // Stick these default values into keychain item if nothing found.\n            [self resetKeychainItem];\n\t\t\t\n\t\t\t// Add the generic attribute and the keychain access group.\n\t\t\t[keychainItemData setObject:identifier forKey:(__bridge id)kSecAttrGeneric];\n\t\t\tif (accessGroup != nil)\n\t\t\t{\n#if TARGET_IPHONE_SIMULATOR\n\t\t\t\t// Ignore the access group if running on the iPhone simulator.\n\t\t\t\t// \n\t\t\t\t// Apps that are built for the simulator aren't signed, so there's no keychain access group\n\t\t\t\t// for the simulator to check. This means that all apps can see all keychain items when run\n\t\t\t\t// on the simulator.\n\t\t\t\t//\n\t\t\t\t// If a SecItem contains an access group attribute, SecItemAdd and SecItemUpdate on the\n\t\t\t\t// simulator will return -25243 (errSecNoAccessForItem).\n#else\t\t\t\n\t\t\t\t[keychainItemData setObject:accessGroup forKey:(__bridge id)kSecAttrAccessGroup];\n#endif\n\t\t\t}\n\t\t}\n        else\n        {\n            // load the saved data from Keychain.\n            keychainItemData = [self secItemFormatToDictionary:(__bridge NSDictionary *)outDictionary];\n        }\n\t\tif(outDictionary) CFRelease(outDictionary);\n    }\n    \n\treturn self;\n}\n\n- (void)setObject:(id)inObject forKey:(id)key \n{\n    if (inObject == nil) return;\n    id currentObject = [keychainItemData objectForKey:key];\n    if (![currentObject isEqual:inObject])\n    {\n        [keychainItemData setObject:inObject forKey:key];\n        [self writeToKeychain];\n    }\n}\n\n- (id)objectForKey:(id)key\n{\n    return [keychainItemData objectForKey:key];\n}\n\n- (void)resetKeychainItem\n{\n    if (!keychainItemData) \n    {\n        keychainItemData = [[NSMutableDictionary alloc] init];\n    }\n    else if (keychainItemData)\n    {\n        NSMutableDictionary *tempDictionary = [self dictionaryToSecItemFormat:keychainItemData];\n#ifndef NS_BLOCK_ASSERTIONS\n\t\tOSStatus junk = \n#endif\n\t\t\tSecItemDelete((__bridge CFDictionaryRef)tempDictionary);\n        NSAssert( junk == noErr || junk == errSecItemNotFound, @\"Problem deleting current dictionary.\" );\n    }\n    \n    // Default attributes for keychain item.\n    [keychainItemData setObject:@\"\" forKey:(__bridge id)kSecAttrAccount];\n    [keychainItemData setObject:@\"\" forKey:(__bridge id)kSecAttrLabel];\n    [keychainItemData setObject:@\"\" forKey:(__bridge id)kSecAttrDescription];\n    \n\t// Default data for keychain item.\n#ifndef PASSWORD_USES_DATA\n    [keychainItemData setObject:@\"\" forKey:(__bridge id)kSecValueData];\n#else\n    [keychainItemData setObject:[NSData data] forKey:(__bridge id)kSecValueData];\n#endif\n}\n\n- (NSMutableDictionary *)dictionaryToSecItemFormat:(NSDictionary *)dictionaryToConvert\n{\n    // The assumption is that this method will be called with a properly populated dictionary\n    // containing all the right key/value pairs for a SecItem.\n    \n    // Create a dictionary to return populated with the attributes and data.\n    NSMutableDictionary *returnDictionary = [NSMutableDictionary dictionaryWithDictionary:dictionaryToConvert];\n    \n    // Add the Generic Password keychain item class attribute.\n    [returnDictionary setObject:(__bridge id)kSecClassGenericPassword forKey:(__bridge id)kSecClass];\n    \n    // Convert the NSString to NSData to meet the requirements for the value type kSecValueData.\n\t// This is where to store sensitive data that should be encrypted.\n#ifndef PASSWORD_USES_DATA\n\t// orig\n    NSString *passwordString = [dictionaryToConvert objectForKey:(__bridge id)kSecValueData];\n    [returnDictionary setObject:[passwordString dataUsingEncoding:NSUTF8StringEncoding] forKey:(__bridge id)kSecValueData];\n#else\n\t// DFH\n    id val = [dictionaryToConvert objectForKey:(__bridge id)kSecValueData];\n\tif([val isKindOfClass:[NSString class]]) {\n\t\tval = [(NSString *)val dataUsingEncoding:NSUTF8StringEncoding];\n\t}\n    [returnDictionary setObject:val forKey:(__bridge id)kSecValueData];\n#endif\n\n    \n    return returnDictionary;\n}\n\n- (NSMutableDictionary *)secItemFormatToDictionary:(NSDictionary *)dictionaryToConvert\n{\n    // The assumption is that this method will be called with a properly populated dictionary\n    // containing all the right key/value pairs for the UI element.\n    \n    // Create a dictionary to return populated with the attributes and data.\n    NSMutableDictionary *returnDictionary = [NSMutableDictionary dictionaryWithDictionary:dictionaryToConvert];\n    \n    // Add the proper search key and class attribute.\n    [returnDictionary setObject:(__bridge id)kCFBooleanTrue forKey:(__bridge id)kSecReturnData];\n    [returnDictionary setObject:(__bridge id)kSecClassGenericPassword forKey:(__bridge id)kSecClass];\n    \n    // Acquire the password data from the attributes.\n    CFDataRef passwordData = NULL;\n    if (SecItemCopyMatching((__bridge CFDictionaryRef)returnDictionary, (CFTypeRef *)&passwordData) == noErr)\n    {\n        // Remove the search, class, and identifier key/value, we don't need them anymore.\n        [returnDictionary removeObjectForKey:(__bridge id)kSecReturnData];\n\n#ifndef PASSWORD_USES_DATA\n        // Add the password to the dictionary, converting from NSData to NSString.\n        NSString *password = [[NSString alloc] initWithBytes:[(__bridge NSData *)passwordData bytes] length:[(__bridge NSData *)passwordData length] \n                                                     encoding:NSUTF8StringEncoding];\n#else\n\t\tNSData *password = (__bridge_transfer NSData *)passwordData;\n\t\tpasswordData = NULL;\n#endif\n        [returnDictionary setObject:password forKey:(__bridge id)kSecValueData];\n    }\n    else\n    {\n        // Don't do anything if nothing is found.\n        NSAssert(NO, @\"Serious error, no matching item found in the keychain.\\n\");\n    }\n\tif(passwordData) CFRelease(passwordData);\n\n\treturn returnDictionary;\n}\n\n- (void)writeToKeychain\n{\n    CFDictionaryRef attributes = NULL;\n    NSMutableDictionary *updateItem = nil;\n\tOSStatus result;\n    \n    if (SecItemCopyMatching((__bridge CFDictionaryRef)genericPasswordQuery, (CFTypeRef *)&attributes) == noErr)\n    {\n        // First we need the attributes from the Keychain.\n        updateItem = [NSMutableDictionary dictionaryWithDictionary:(__bridge NSDictionary *)attributes];\n        // Second we need to add the appropriate search key/values.\n        [updateItem setObject:[genericPasswordQuery objectForKey:(__bridge id)kSecClass] forKey:(__bridge id)kSecClass];\n        \n        // Lastly, we need to set up the updated attribute list being careful to remove the class.\n        NSMutableDictionary *tempCheck = [self dictionaryToSecItemFormat:keychainItemData];\n        [tempCheck removeObjectForKey:(__bridge id)kSecClass];\n\t\t\n#if TARGET_IPHONE_SIMULATOR\n\t\t// Remove the access group if running on the iPhone simulator.\n\t\t// \n\t\t// Apps that are built for the simulator aren't signed, so there's no keychain access group\n\t\t// for the simulator to check. This means that all apps can see all keychain items when run\n\t\t// on the simulator.\n\t\t//\n\t\t// If a SecItem contains an access group attribute, SecItemAdd and SecItemUpdate on the\n\t\t// simulator will return -25243 (errSecNoAccessForItem).\n\t\t//\n\t\t// The access group attribute will be included in items returned by SecItemCopyMatching,\n\t\t// which is why we need to remove it before updating the item.\n\t\t[tempCheck removeObjectForKey:(__bridge id)kSecAttrAccessGroup];\n#endif\n        \n        // An implicit assumption is that you can only update a single item at a time.\n#ifndef NDEBUG\t\t\n        result = \n#endif\n\t\t\tSecItemUpdate((__bridge CFDictionaryRef)updateItem, (__bridge CFDictionaryRef)tempCheck);\n\n\t\tNSAssert( result == noErr, @\"Couldn't update the Keychain Item.\" );\n    }\n    else\n    {\n        // No previous item found; add the new one.\n        result = SecItemAdd((__bridge CFDictionaryRef)[self dictionaryToSecItemFormat:keychainItemData], NULL);\n\t\tNSAssert( result == noErr, @\"Couldn't add the Keychain Item.\" );\n    }\n\t\n\tif(attributes) CFRelease(attributes);\n}\n\n@end\n"
  },
  {
    "path": "ArcBit/External/LTHPasscodeViewController3.50/LTHKeychainUtils.h",
    "content": "//\n//  SFHFKeychainUtils.h\n//\n//  Created by Buzz Andersen on 10/20/08.\n//  Based partly on code by Jonathan Wight, Jon Crosby, and Mike Malone.\n//  Copyright 2008 Sci-Fi Hi-Fi. All rights reserved.\n//\n//  Permission is hereby granted, free of charge, to any person\n//  obtaining a copy of this software and associated documentation\n//  files (the \"Software\"), to deal in the Software without\n//  restriction, including without limitation the rights to use,\n//  copy, modify, merge, publish, distribute, sublicense, and/or sell\n//  copies of the Software, and to permit persons to whom the\n//  Software is furnished to do so, subject to the following\n//  conditions:\n//\n//  The above copyright notice and this permission notice shall be\n//  included in all copies or substantial portions of the Software.\n//\n//  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n//  EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\n//  OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n//  NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\n//  HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n//  WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n//  FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\n//  OTHER DEALINGS IN THE SOFTWARE.\n//\n\n#import <UIKit/UIKit.h>\n\n/**\n Renamed it to LTHKeychainUtils because it could have conflicted with SFHFKeychainUtils already present in the project. This version is ARC-compliant, but all the rights and thanks go to Buzz Andersen for SFHFKeychainUtils.\n */\n@interface LTHKeychainUtils : NSObject {\n\t\n}\n\n+ (NSString *) getPasswordForUsername: (NSString *) username andServiceName: (NSString *) serviceName error: (NSError **) error;\n+ (BOOL) storeUsername: (NSString *) username andPassword: (NSString *) password forServiceName: (NSString *) serviceName updateExisting: (BOOL) updateExisting error: (NSError **) error;\n+ (BOOL) deleteItemForUsername: (NSString *) username andServiceName: (NSString *) serviceName error: (NSError **) error;\n\n@end"
  },
  {
    "path": "ArcBit/External/LTHPasscodeViewController3.50/LTHKeychainUtils.m",
    "content": "//\n//  SFHFKeychainUtils.m\n//\n\n//  Created by Buzz Andersen on 10/20/08.\n//  Based partly on code by Jonathan Wight, Jon Crosby, and Mike Malone.\n//  Copyright 2008 Sci-Fi Hi-Fi. All rights reserved.\n//\n\n//  Permission is hereby granted, free of charge, to any person\n//  obtaining a copy of this software and associated documentation\n//  files (the \"Software\"), to deal in the Software without\n//  restriction, including without limitation the rights to use,\n//  copy, modify, merge, publish, distribute, sublicense, and/or sell\n//  copies of the Software, and to permit persons to whom the\n//  Software is furnished to do so, subject to the following\n//  conditions:\n//\n\n//  The above copyright notice and this permission notice shall be\n//  included in all copies or substantial portions of the Software.\n//\n//  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n//  EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\n//  OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n//  NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\n//  HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n//  WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n//  FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\n//  OTHER DEALINGS IN THE SOFTWARE.\n//\n\n#import \"LTHKeychainUtils.h\"\n#import <Security/Security.h>\n\n\nstatic NSString *SFHFKeychainUtilsErrorDomain = @\"SFHFKeychainUtilsErrorDomain\";\n\n@implementation LTHKeychainUtils\n\n\n+ (NSString *) getPasswordForUsername: (NSString *) username andServiceName: (NSString *) serviceName error: (NSError **) error {\n\t\n\tif (!username || !serviceName) {\n\t\tif (error != nil) {\n\t\t\t*error = [NSError errorWithDomain: SFHFKeychainUtilsErrorDomain code: -2000 userInfo: nil];\n\t\t}\n\t\treturn nil;\n\t}\n\t\n\tif (error != nil) {\n\t\t*error = nil;\n\t}\n\t// Set up a query dictionary with the base query attributes: item type (generic), username, and service\n\tNSArray *keys = [[NSArray alloc] initWithObjects: (__bridge_transfer NSString *) kSecClass, kSecAttrAccount, kSecAttrService, nil];\n\tNSArray *objects = [[NSArray alloc] initWithObjects: (__bridge_transfer NSString *) kSecClassGenericPassword, username, serviceName, nil];\n\tNSMutableDictionary *query = [[NSMutableDictionary alloc] initWithObjects: objects forKeys: keys];\n\t// First do a query for attributes, in case we already have a Keychain item with no password data set.\n\t// One likely way such an incorrect item could have come about is due to the previous (incorrect)\n\t// version of this code (which set the password as a generic attribute instead of password data).\n\tNSMutableDictionary *attributeQuery = [query mutableCopy];\n\t[attributeQuery setObject: (id) kCFBooleanTrue forKey:(__bridge_transfer id) kSecReturnAttributes];\n\tCFTypeRef attrResult = NULL;\n\tOSStatus status = SecItemCopyMatching((__bridge  CFDictionaryRef) attributeQuery, (CFTypeRef *) &attrResult);\n\tif (status != noErr) {\n\t\t// No existing item found--simply return nil for the password\n\t\tif (error != nil && status != errSecItemNotFound) {\n\t\t\t//Only return an error if a real exception happened--not simply for \"not found.\"\n\t\t\t*error = [NSError errorWithDomain: SFHFKeychainUtilsErrorDomain code: status userInfo: nil];\n\t\t}\n\t\treturn nil;\n\t}\n\t\n\t// We have an existing item, now query for the password data associated with it.\n\tNSMutableDictionary *passwordQuery = [query mutableCopy];\n\t[passwordQuery setObject: (id) kCFBooleanTrue forKey: (__bridge_transfer id) kSecReturnData];\n\tCFTypeRef resData = NULL;\n\tstatus = SecItemCopyMatching((__bridge CFDictionaryRef) passwordQuery, (CFTypeRef *) &resData);\n\tNSData *resultData = (__bridge_transfer NSData *)resData;\n\tif (status != noErr) {\n\t\tif (status == errSecItemNotFound) {\n\t\t\t// We found attributes for the item previously, but no password now, so return a special error.\n\t\t\t// Users of this API will probably want to detect this error and prompt the user to\n\t\t\t// re-enter their credentials.  When you attempt to store the re-entered credentials\n\t\t\t// using storeUsername:andPassword:forServiceName:updateExisting:error\n\t\t\t// the old, incorrect entry will be deleted and a new one with a properly encrypted\n\t\t\t// password will be added.\n\t\t\t\n\t\t\tif (error != nil) {\n\t\t\t\t*error = [NSError errorWithDomain: SFHFKeychainUtilsErrorDomain code: -1999 userInfo: nil];\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\t// Something else went wrong. Simply return the normal Keychain API error code.\n\t\t\tif (error != nil) {\n\t\t\t\t*error = [NSError errorWithDomain: SFHFKeychainUtilsErrorDomain code: status userInfo: nil];\n\t\t\t}\n\t\t}\n\t\treturn nil;\n\t}\n\tNSString *password = nil;\n\tif (resultData) {\n\t\tpassword = [[NSString alloc] initWithData: resultData encoding: NSUTF8StringEncoding];\n\t}\n\telse {\n\t\t// There is an existing item, but we weren't able to get password data for it for some reason,\n\t\t// Possibly as a result of an item being incorrectly entered by the previous code.\n\t\t// Set the -1999 error so the code above us can prompt the user again.\n\t\t\n\t\tif (error != nil) {\n\t\t\t*error = [NSError errorWithDomain: SFHFKeychainUtilsErrorDomain code: -1999 userInfo: nil];\n\t\t}\n\t}\n\treturn password;\n}\n\n+ (BOOL) storeUsername: (NSString *) username andPassword: (NSString *) password forServiceName: (NSString *) serviceName updateExisting: (BOOL) updateExisting error: (NSError **) error\n\n{\n\tif (!username || !password || !serviceName)\n\t\t\n\t{\n\t\tif (error != nil)\n\t\t{\n\t\t\t*error = [NSError errorWithDomain: SFHFKeychainUtilsErrorDomain code: -2000 userInfo: nil];\n\t\t}\n\t\treturn NO;\n\t}\n\t\n    // See if we already have a password entered for these credentials.\n\t\n\tNSError *getError = nil;\n\tNSString *existingPassword = [self getPasswordForUsername: username andServiceName: serviceName error:&getError];\n\t\n\tif ([getError code] == -1999)\n\t{\n\t\t// There is an existing entry without a password properly stored (possibly as a result of the previous incorrect version of this code.\n\t\t\n\t\t// Delete the existing item before moving on entering a correct one.\n\t\tgetError = nil;\n\t\t\n\t\t[self deleteItemForUsername: username andServiceName: serviceName error: &getError];\n\t\t\n\t\tif ([getError code] != noErr)\n\t\t{\n\t\t\tif (error != nil)\n\t\t\t{\n\t\t\t\t*error = getError;\n\t\t\t}\n\t\t\treturn NO;\n\t\t}\n\t}\n    else if ([getError code] != noErr)\n\t{\n\t\tif (error != nil)\n\t\t{\n\t\t\t*error = getError;\n\t\t}\n\t\treturn NO;\n\t}\n\tif (error != nil)\n\t{\n\t\t*error = nil;\n\t}\n\t\n\tOSStatus status = noErr;\n\t\n\tif (existingPassword)\n\t{\n\t\t\n\t\t// We have an existing, properly entered item with a password.\n\t\t// Update the existing item.\n\t\t\n\t\tif (![existingPassword isEqualToString:password] && updateExisting)\n\t\t{\n\t\t\t//Only update if we're allowed to update existing.  If not, simply do nothing.\n\t\t\t\n\t\t\tNSArray *keys = [[NSArray alloc] initWithObjects: (__bridge_transfer NSString *) kSecClass,kSecAttrService,kSecAttrLabel,kSecAttrAccount,nil];\n\t\t\t\n\t\t\tNSArray *objects = [[NSArray alloc] initWithObjects: (__bridge_transfer NSString *) kSecClassGenericPassword,serviceName,serviceName,username,nil];\n\t\t\t\n\t\t\tNSDictionary *query = [[NSDictionary alloc] initWithObjects: objects forKeys: keys];\n\t\t\t\n\t\t\tstatus = SecItemUpdate((__bridge CFDictionaryRef) query, (__bridge CFDictionaryRef) [NSDictionary dictionaryWithObject: [password dataUsingEncoding: NSUTF8StringEncoding] forKey: (__bridge_transfer NSString *) kSecValueData]);\n\t\t}\n\t}\n\telse\n\t{\n\t\t// No existing entry (or an existing, improperly entered, and therefore now\n\t\t\n\t\t// deleted, entry).  Create a new entry.\n\t\t\n\t\t\n\t\tNSArray *keys = [[NSArray alloc] initWithObjects: (__bridge_transfer NSString *) kSecClass,kSecAttrService,kSecAttrLabel,kSecAttrAccount,kSecValueData,nil];\n\t\t\n\t\tNSArray *objects = [[NSArray alloc] initWithObjects: (__bridge_transfer NSString *) kSecClassGenericPassword,serviceName,serviceName,username,[password dataUsingEncoding: NSUTF8StringEncoding],nil];\n\t\t\n\t\tNSDictionary *query = [[NSDictionary alloc] initWithObjects: objects forKeys: keys];\n\t\t\n\t\tstatus = SecItemAdd((__bridge CFDictionaryRef) query, NULL);\n\t}\n\tif (error != nil && status != noErr)\n\t{\n\t\t// Something went wrong with adding the new item. Return the Keychain error code.\n\t\t*error = [NSError errorWithDomain: SFHFKeychainUtilsErrorDomain code: status userInfo: nil];\n\t\treturn NO;\n\t}\n\treturn YES;\n}\n\n+ (BOOL) deleteItemForUsername: (NSString *) username andServiceName: (NSString *) serviceName error: (NSError **) error\n{\n\tif (!username || !serviceName)\n\t{\n\t\tif (error != nil)\n\t\t{\n\t\t\t*error = [NSError errorWithDomain: SFHFKeychainUtilsErrorDomain code: -2000 userInfo: nil];\n\t\t}\n\t\treturn NO;\n\t}\n\tif (error != nil)\n\t{\n\t\t*error = nil;\n\t}\n\tNSArray *keys = [[NSArray alloc] initWithObjects: (__bridge_transfer NSString *) kSecClass, kSecAttrAccount, kSecAttrService, kSecReturnAttributes, nil];\n\tNSArray *objects = [[NSArray alloc] initWithObjects: (__bridge_transfer NSString *) kSecClassGenericPassword, username, serviceName, kCFBooleanTrue, nil];\n\tNSDictionary *query = [[NSDictionary alloc] initWithObjects: objects forKeys: keys];\n\tOSStatus status = SecItemDelete((__bridge CFDictionaryRef) query);\n\t\n\tif (error != nil && status != noErr)\n\t{\n\t\t*error = [NSError errorWithDomain: SFHFKeychainUtilsErrorDomain code: status userInfo: nil];\n\t\treturn NO;\n\t}\n\treturn YES;\n}\n\n@end"
  },
  {
    "path": "ArcBit/External/LTHPasscodeViewController3.50/LTHPasscodeViewController.h",
    "content": "//\n//  PasscodeViewController.h\n//  LTHPasscodeViewController\n//\n//  Created by Roland Leth on 9/6/13.\n//  Copyright (c) 2013 Roland Leth. All rights reserved.\n//\n\n#import <UIKit/UIKit.h>\n\n@protocol LTHPasscodeViewControllerDelegate <NSObject>\n@optional\n/**\n @brief Called right before the passcode view controller will be dismissed or popped.\n */\n- (void)passcodeViewControllerWillClose;\n/**\n @brief Called when the max number of failed attempts has been reached.\n */\n- (void)maxNumberOfFailedAttemptsReached;\n/**\n @brief Called when the passcode was entered successfully.\n */\n- (void)passcodeWasEnteredSuccessfully;\n/**\n @brief Called when the logout button was pressed.\n */\n- (void)logoutButtonWasPressed;\n/**\n @brief\t  Handle here the retrieval of the duration that needs to pass while app is in background for the lock to be displayed.\n @details Called when @c +timerDuration is called and @c +useKeychain:NO was used, but falls back to the Keychain anyway if not implemented.\n @return The duration.\n */\n- (NSTimeInterval)timerDuration;\n/**\n @brief\t\t\t Handle here the saving of the duration that needs to pass while the app is in background for the lock to be displayed.\n @details        Called when @c +saveTimerDuration: is called and @c +useKeychain:NO was used, but falls back to the Keychain anyway if not implemented.\n @param duration The duration.\n */\n- (void)saveTimerDuration:(NSTimeInterval)duration;\n/**\n @brief   Handle here the retrieval of the time at which the timer started.\n @details Called when @c +timerStartTime is called and @c +useKeychain:NO was used, but falls back to the Keychain anyway if not implemented.\n @return The time at which the timer started.\n */\n- (NSTimeInterval)timerStartTime;\n/**\n @brief    Handle here the saving of the current time.\n @details  Called when @c +saveTimerStartTime is called and @c +useKeychain:NO was used, but falls back to the Keychain anyway if not implemented.\n */\n- (void)saveTimerStartTime;\n/**\n @brief      Handle here the check if the timer has ended and the lock has to be displayed.\n @details    Called when @c +didPasscodeTimerEnd is called and @c +useKeychain:NO was used, but falls back to the Keychain anyway if not implemented.\n @return @c YES if the timer ended and the lock has to be displayed.\n */\n- (BOOL)didPasscodeTimerEnd;\n/**\n @brief   Handle here the passcode deletion.\n @details Called when @c +deletePasscode or @c +deletePasscodeAndClose are called and @c +useKeychain:NO was used, but falls back to the Keychain anyway if not implemented.\n */\n- (void)deletePasscode;\n/**\n @brief   Handle here the saving of the passcode.\n @details Called if @c +useKeychain:NO was used, but falls back to the Keychain anyway if not implemented.\n @param passcode The passcode.\n */\n- (void)savePasscode:(NSString *)passcode;\n/**\n @brief   Retrieve here the saved passcode.\n @details Called if @c +useKeychain:NO was used, but falls back to the Keychain anyway if not implemented.\n @return The passcode.\n */\n- (NSString *)passcode;\n@end\n\n@interface LTHPasscodeViewController : UIViewController\n/**\n @brief   The delegate.\n */\n@property (nonatomic, weak) id<LTHPasscodeViewControllerDelegate> delegate;\n/**\n @brief The gap between the passcode digits.\n */\n@property (nonatomic, assign) CGFloat   horizontalGap;\n/**\n @brief The gap between the top label and the passcode digits/field.\n */\n@property (nonatomic, assign) CGFloat   verticalGap;\n/**\n @brief The gap between the passcode digits and the failed label.\n */\n@property (nonatomic, assign) CGFloat   failedAttemptLabelGap;\n/**\n @brief The height for the complex passcode overlay.\n */\n@property (nonatomic, assign) CGFloat   passcodeOverlayHeight;\n/**\n @brief The font size for the top label.\n */\n@property (nonatomic, assign) CGFloat   labelFontSize;\n/**\n @brief The font size for the passcode digits.\n */\n@property (nonatomic, assign) CGFloat   passcodeFontSize;\n/**\n @brief The font for the top label.\n */\n@property (nonatomic, strong) UIFont    *labelFont;\n/**\n @brief The font for the passcode digits.\n */\n@property (nonatomic, strong) UIFont    *passcodeFont;\n/**\n @brief The background color for the top label.\n */\n@property (nonatomic, strong) UIColor   *enterPasscodeLabelBackgroundColor;\n/**\n @brief The background color for the view.\n */\n@property (nonatomic, strong) UIColor   *backgroundColor;\n/**\n @brief The background color for the cover view that appears on top of the app, visible in the multitasking.\n */\n@property (nonatomic, strong) UIColor   *coverViewBackgroundColor;\n/**\n @brief The background color for the passcode digits.\n */\n@property (nonatomic, strong) UIColor   *passcodeBackgroundColor;\n/**\n @brief The background color for the failed attempt label.\n */\n@property (nonatomic, strong) UIColor   *failedAttemptLabelBackgroundColor;\n/**\n @brief The text color for the top label.\n */\n@property (nonatomic, strong) UIColor   *labelTextColor;\n/**\n @brief The text color for the passcode digits.\n */\n@property (nonatomic, strong) UIColor   *passcodeTextColor;\n/**\n @brief The text color for the failed attempt label.\n */\n@property (nonatomic, strong) UIColor   *failedAttemptLabelTextColor;\n/**\n @brief The tint color to apply to the navigation items and bar button items.\n */\n@property (nonatomic, strong) UIColor   *navigationBarTintColor;\n/**\n @brief The tint color to apply to the navigation bar background.\n */\n@property (nonatomic, strong) UIColor   *navigationTintColor;\n/**\n @brief The color for te navigation bar's title.\n */\n@property (nonatomic, strong) UIColor   *navigationTitleColor;\n/**\n @brief The string to be used as username for the passcode in the Keychain.\n */\n@property (nonatomic, strong) NSString  *keychainPasscodeUsername;\n/**\n @brief The string to be used as username for the timer start time in the Keychain.\n */\n@property (nonatomic, strong) NSString  *keychainTimerStartUsername;\n/**\n @brief The string to be used as username for the timer duration in the Keychain.\n */\n@property (nonatomic, strong) NSString  *keychainTimerDurationUsername;\n/**\n @brief The string to be used as service name for all the Keychain entries.\n */\n@property (nonatomic, strong) NSString  *keychainServiceName;\n/**\n @brief The character for the passcode digit.\n */\n@property (nonatomic, strong) NSString  *passcodeCharacter;\n/**\n @brief The table name for NSLocalizedStringFromTable.\n */\n@property (nonatomic, strong) NSString  *localizationTableName;\n/**\n @brief The tag for the cover view.\n */\n@property (nonatomic, assign) NSInteger coverViewTag;\n/**\n @brief The string displayed when entering your old passcode (while changing).\n */\n@property (nonatomic, strong) NSString *enterOldPasscodeString;\n/**\n @brief The string displayed when entering your passcode.\n */\n@property (nonatomic, strong) NSString *enterPasscodeString;\n/**\n @brief The string displayed when entering your new passcode (while changing).\n */\n@property (nonatomic, strong) NSString *enterNewPasscodeString;\n/**\n @brief The string displayed when enabling your passcode.\n */\n@property (nonatomic, strong) NSString *enablePasscodeString;\n/**\n @brief The string displayed when changing your passcode.\n */\n@property (nonatomic, strong) NSString *changePasscodeString;\n/**\n @brief The string displayed when disabling your passcode.\n */\n@property (nonatomic, strong) NSString *turnOffPasscodeString;\n/**\n @brief The string displayed when reentering your passcode.\n */\n@property (nonatomic, strong) NSString *reenterPasscodeString;\n/**\n @brief The string displayed when reentering your new passcode (while changing).\n */\n@property (nonatomic, strong) NSString *reenterNewPasscodeString;\n/**\n @brief The string displayed while user unlocks with Touch ID.\n */\n@property (nonatomic, strong) NSString *touchIDString;\n/**\n @brief The duration of the lock animation.\n */\n@property (nonatomic, assign) CGFloat   lockAnimationDuration;\n/**\n @brief The duration of the slide animation.\n */\n@property (nonatomic, assign) CGFloat   slideAnimationDuration;\n/**\n @brief The maximum number of failed attempts allowed.\n */\n@property (nonatomic, assign) NSInteger maxNumberOfAllowedFailedAttempts;\n/**\n @brief The navigation bar, if one was used.\n */\n@property (nonatomic, strong) UINavigationBar *navBar;\n/**\n @brief A Boolean value that indicates whether the navigation bar is translucent (@c YES) or not (@c NO).\n */\n@property (nonatomic, assign) BOOL navigationBarTranslucent;\n/**\n @brief A Boolean value that indicates whether the back bar button is hidden (@c YES) or not (@c NO). Default is @c YES.\n */\n@property (nonatomic, assign) BOOL hidesBackButton;\n/**\n @brief A Boolean value that indicates whether Touch ID can be used (@c YES) or not (@c NO). Default is @c YES.\n */\n@property (nonatomic, assign) BOOL allowUnlockWithTouchID;\n\n//BELOW PROPERTIES MADE PUBLIC BY TIMLEE\n@property (nonatomic, strong) UITextField *firstDigitTextField;\n@property (nonatomic, strong) UITextField *secondDigitTextField;\n@property (nonatomic, strong) UITextField *thirdDigitTextField;\n@property (nonatomic, strong) UITextField *fourthDigitTextField;\n\n@property (nonatomic, strong) UILabel     *failedAttemptLabel;\n@property (nonatomic, strong) UILabel     *enterPasscodeLabel;\n@property (nonatomic, strong) UIButton    *OKButton;\n\n/**\n @brief\t\t\t\tUsed for displaying the lock. The passcode view is added directly on the keyWindow.\n @param hasLogout   Set to @c YES for a navBar with a Logout button, set to @c NO for no navBar.\n @param logoutTitle The title of the Logout button.\n */\n- (void)showLockScreenWithAnimation:(BOOL)animated withLogout:(BOOL)hasLogout andLogoutTitle:(NSString*)logoutTitle;\n/**\n @brief\t\t\t\t   Used for enabling the passcode.\n @details              The back bar button is hidden by default. Set @c hidesBackButton to @c NO if you want it to be visible.\n @param\tviewController The view controller where the passcode view controller will be displayed.\n @param asModal        Set to @c YES to present as a modal, or to @c NO to push on the current nav stack.\n */\n- (void)showForEnablingPasscodeInViewController:(UIViewController *)viewController asModal:(BOOL)isModal;\n/**\n @brief\t\t\t\t   Used for changing the passcode.\n @details              The back bar button is hidden by default. Set @c hidesBackButton to @c NO if you want it to be visible.\n @param\tviewController The view controller where the passcode view controller will be displayed.\n @param asModal        Set to @c YES to present as a modal, or to @c NO to push on the current nav stack.\n */\n- (void)showForChangingPasscodeInViewController:(UIViewController *)viewController asModal:(BOOL)isModal;\n/**\n @brief\t\t\t\t   Used for disabling the passcode.\n @details              The back bar button is hidden by default. Set @c hidesBackButton to @c NO if you want it to be visible.\n @param\tviewController The view controller where the passcode view controller will be displayed.\n @param asModal        Set to @c YES to present as a modal, or to @c NO to push on the current nav stack.\n */\n- (void)showForDisablingPasscodeInViewController:(UIViewController *)viewController asModal:(BOOL)isModal;\n/**\n @brief  Returns a Boolean value that indicates whether a simple, 4 digit (@c YES) or a complex passcode will be used (@c NO).\n @return @c YES if the passcode is simple, @c NO if the passcode is complex\n */\n- (BOOL)isSimple;\n/**\n @brief                 Sets if the passcode should be simple (4 digits) or complex.\n @param isSimple        Set to @c YES for a simple passcode, and to @c NO for a complex passcode.\n @param viewController  The view controller where the passcode view controller will be displayed.\n @param isModal         Set to @c YES to present as a modal, or to @c NO to push on the current nav stack.\n @details               @c inViewController and @c asModal are needed because the delegate is of type id, and the passcode needs to be presented somewhere and with a specific style - modal or pushed.\n */\n- (void)setIsSimple:(BOOL)isSimple inViewController:(UIViewController *)viewController asModal:(BOOL)isModal;\n/**\n @brief  Returns a Boolean value that indicates whether a passcode exists (@c YES) or not (@c NO).\n @return @c YES if a passcode is enabled. This also means it is enabled, unless custom logic was added to the library.\n */\n+ (BOOL)doesPasscodeExist;\n/**\n @brief\t Retrieves from the keychain the duration while app is in background after which the lock has to be displayed.\n @return The duration.\n */\n+ (NSTimeInterval)timerDuration;\n/**\n @brief\t\t\t Saves in the keychain the duration that needs to pass while app is in background  for the lock to be displayed.\n @param duration The duration.\n */\n+ (void)saveTimerDuration:(NSTimeInterval)duration;\n/**\n @brief  Retrieves from the keychain the time at which the timer started.\n @return The time, as @c timeIntervalSinceReferenceDate, at which the timer started.\n */\n+ (NSTimeInterval)timerStartTime;\n/**\n @brief Saves the current time, as @c timeIntervalSinceReferenceDate.\n */\n+ (void)saveTimerStartTime;\n/**\n @brief  Returns a Boolean value that indicates whether the timer has ended (@c YES) and the lock has to be displayed or not (@c NO).\n @return @c YES if the timer ended and the lock has to be displayed.\n */\n+ (BOOL)didPasscodeTimerEnd;\n/**\n @brief Removes the passcode from the keychain.\n */\n+ (void)deletePasscode;\n/**\n @brief Closes the passcode view controller.\n */\n+ (void)close;\n/**\n @brief Removes the passcode from the keychain and closes the passcode view controller.\n */\n+ (void)deletePasscodeAndClose;\n/**\n @brief             Call this if you want to save and read the passcode and timers to and from somewhere else rather than the Keychain.\n @attention         All the protocol methods will fall back to the Keychain if not implemented, even if calling this method with @c NO. This allows for flexibility over what and where you save.\n @param useKeychain Set to @c NO if you want to save and read the passcode and timers to and from somewhere else rather than the Keychain. Default is @c YES.\n */\n+ (void)useKeychain:(BOOL)useKeychain;\n/**\n @brief  Returns the shared instance of the passcode view controller.\n */\n+ (instancetype)sharedUser;\n\n@end"
  },
  {
    "path": "ArcBit/External/LTHPasscodeViewController3.50/LTHPasscodeViewController.m",
    "content": "//\n//  PasscodeViewController.m\n//  LTHPasscodeViewController\n//\n//  Created by Roland Leth on 9/6/13.\n//  Copyright (c) 2013 Roland Leth. All rights reserved.\n//\n\n#import \"LTHPasscodeViewController.h\"\n#import \"LTHKeychainUtils.h\"\n#if !(TARGET_IPHONE_SIMULATOR)\n#import <LocalAuthentication/LocalAuthentication.h>\n#endif\n\n#define DegreesToRadians(x) ((x) * M_PI / 180.0)\n#define LTHiOS8 ([[[UIDevice currentDevice] systemVersion] compare:@\"8.0\" \\\noptions:NSNumericSearch] != NSOrderedAscending)\n\n#if __IPHONE_OS_VERSION_MIN_REQUIRED >= 70000\n#define kPasscodeCharWidth [_passcodeCharacter sizeWithAttributes: @{NSFontAttributeName : _passcodeFont}].width\n#define kFailedAttemptLabelWidth (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad ? [_failedAttemptLabel.text sizeWithAttributes: @{NSFontAttributeName : _labelFont}].width + 60.0f : [_failedAttemptLabel.text sizeWithAttributes: @{NSFontAttributeName : _labelFont}].width + 30.0f)\n#define kFailedAttemptLabelHeight [_failedAttemptLabel.text sizeWithAttributes: @{NSFontAttributeName : _labelFont}].height\n#define kEnterPasscodeLabelWidth [_enterPasscodeLabel.text sizeWithAttributes: @{NSFontAttributeName : _labelFont}].width\n#else\n// Thanks to Kent Nguyen - https://github.com/kentnguyen\n#define kPasscodeCharWidth [_passcodeCharacter sizeWithFont:_passcodeFont].width\n#define kFailedAttemptLabelWidth (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad ? [_failedAttemptLabel.text sizeWithFont:_labelFont].width + 60.0f : [_failedAttemptLabel.text sizeWithFont:_labelFont].width + 20.0f)\n#define kFailedAttemptLabelHeight [_failedAttemptLabel.text sizeWithFont:_labelFont].height\n#define kEnterPasscodeLabelWidth [_enterPasscodeLabel.text sizeWithFont:_labelFont].width\n#endif\n\n@interface LTHPasscodeViewController () <UITextFieldDelegate>\n@property (nonatomic, strong) UIView      *coverView;\n@property (nonatomic, strong) UIView      *animatingView;\n@property (nonatomic, strong) UIView      *complexPasscodeOverlayView;\n\n@property (nonatomic, strong) UITextField *passcodeTextField;\n//BELOW IS COMMENTED OUT BY TIMLEE\n//@property (nonatomic, strong) UITextField *firstDigitTextField;\n//@property (nonatomic, strong) UITextField *secondDigitTextField;\n//@property (nonatomic, strong) UITextField *thirdDigitTextField;\n//@property (nonatomic, strong) UITextField *fourthDigitTextField;\n\n//@property (nonatomic, strong) UILabel     *failedAttemptLabel;\n//@property (nonatomic, strong) UILabel     *enterPasscodeLabel;\n//@property (nonatomic, strong) UIButton    *OKButton;\n\n@property (nonatomic, strong) NSString    *tempPasscode;\n@property (nonatomic, assign) NSInteger   failedAttempts;\n\n@property (nonatomic, assign) CGFloat     modifierForBottomVerticalGap;\n@property (nonatomic, assign) CGFloat     iPadFontSizeModifier;\n@property (nonatomic, assign) CGFloat     iPhoneHorizontalGap;\n\n@property (nonatomic, assign) BOOL        usesKeychain;\n@property (nonatomic, assign) BOOL        displayedAsModal;\n@property (nonatomic, assign) BOOL        displayedAsLockScreen;\n@property (nonatomic, assign) BOOL        isCurrentlyOnScreen;\n@property (nonatomic, assign) BOOL        isSimple;// YES by default\n@property (nonatomic, assign) BOOL        isUserConfirmingPasscode;\n@property (nonatomic, assign) BOOL        isUserBeingAskedForNewPasscode;\n@property (nonatomic, assign) BOOL        isUserTurningPasscodeOff;\n@property (nonatomic, assign) BOOL        isUserChangingPasscode;\n@property (nonatomic, assign) BOOL        isUserEnablingPasscode;\n@property (nonatomic, assign) BOOL        isUserSwitchingBetweenPasscodeModes;// simple/complex\n@property (nonatomic, assign) BOOL        timerStartInSeconds;\n\n#if !(TARGET_IPHONE_SIMULATOR)\n@property (nonatomic, strong) LAContext   *context;\n#endif\n@end\n\n@implementation LTHPasscodeViewController\n\n\n#pragma mark - Public, class methods\n+ (BOOL)doesPasscodeExist {\n\treturn [[LTHPasscodeViewController sharedUser] _doesPasscodeExist];\n}\n\n\n+ (NSString *)passcode {\n\treturn [[LTHPasscodeViewController sharedUser] _passcode];\n}\n\n\n+ (NSTimeInterval)timerDuration {\n\treturn [[LTHPasscodeViewController sharedUser] _timerDuration];\n}\n\n\n+ (void)saveTimerDuration:(NSTimeInterval)duration {\n    [[LTHPasscodeViewController sharedUser] _saveTimerDuration:duration];\n}\n\n\n+ (NSTimeInterval)timerStartTime {\n    return [[LTHPasscodeViewController sharedUser] _timerStartTime];\n}\n\n\n+ (void)saveTimerStartTime {\n\t[[LTHPasscodeViewController sharedUser] _saveTimerStartTime];\n}\n\n\n+ (BOOL)didPasscodeTimerEnd {\n\treturn [[LTHPasscodeViewController sharedUser] _didPasscodeTimerEnd];\n}\n\n\n+ (void)deletePasscodeAndClose {\n\t[LTHPasscodeViewController deletePasscode];\n    [LTHPasscodeViewController close];\n}\n\n\n+ (void)close {\n    [[LTHPasscodeViewController sharedUser] _close];\n}\n\n\n+ (void)deletePasscode {\n\t[[LTHPasscodeViewController sharedUser] _deletePasscode];\n}\n\n\n+ (void)useKeychain:(BOOL)useKeychain {\n    [[LTHPasscodeViewController sharedUser] _useKeychain:useKeychain];\n}\n\n\n#pragma mark - Private methods\n- (void)_close {\n    if (_displayedAsLockScreen) [self _dismissMe];\n    else [self _cancelAndDismissMe];\n}\n\n\n- (void)_useKeychain:(BOOL)useKeychain {\n    _usesKeychain = useKeychain;\n}\n\n\n- (BOOL)_doesPasscodeExist {\n\treturn [self _passcode].length != 0;\n}\n\n\n- (NSTimeInterval)_timerDuration {\n    if (!_usesKeychain &&\n        [self.delegate respondsToSelector:@selector(timerDuration)]) {\n        return [self.delegate timerDuration];\n    }\n    \n\tNSString *keychainValue =\n    [LTHKeychainUtils getPasswordForUsername:_keychainTimerDurationUsername\n                               andServiceName:_keychainServiceName\n                                        error:nil];\n\tif (!keychainValue) return -1;\n\treturn keychainValue.doubleValue;\n}\n\n\n- (void)_saveTimerDuration:(NSTimeInterval) duration {\n    if (!_usesKeychain &&\n        [self.delegate respondsToSelector:@selector(saveTimerDuration:)]) {\n        [self.delegate saveTimerDuration:duration];\n        \n        return;\n    }\n    \n    [LTHKeychainUtils storeUsername:_keychainTimerDurationUsername\n\t\t\t\t\t\t andPassword:[NSString stringWithFormat: @\"%.6f\", duration]\n\t\t\t\t\t  forServiceName:_keychainServiceName\n\t\t\t\t\t  updateExisting:YES\n\t\t\t\t\t\t\t   error:nil];\n}\n\n\n- (NSTimeInterval)_timerStartTime {\n    if (!_usesKeychain &&\n        [self.delegate respondsToSelector:@selector(timerStartTime)]) {\n        return [self.delegate timerStartTime];\n    }\n    \n    NSString *keychainValue =\n    [LTHKeychainUtils getPasswordForUsername:_keychainTimerStartUsername\n                               andServiceName:_keychainServiceName\n                                        error:nil];\n\tif (!keychainValue) return -1;\n\treturn keychainValue.doubleValue;\n}\n\n\n- (void)_saveTimerStartTime {\n    if (!_usesKeychain &&\n        [self.delegate respondsToSelector:@selector(saveTimerStartTime)]) {\n        [self.delegate saveTimerStartTime];\n        \n        return;\n    }\n    \n\t[LTHKeychainUtils storeUsername:_keychainTimerStartUsername\n\t\t\t\t\t\t andPassword:[NSString stringWithFormat: @\"%.6f\",\n                                      [NSDate timeIntervalSinceReferenceDate]]\n\t\t\t\t\t  forServiceName:_keychainServiceName\n\t\t\t\t\t  updateExisting:YES\n\t\t\t\t\t\t\t   error:nil];\n}\n\n\n- (BOOL)_didPasscodeTimerEnd {\n    if (!_usesKeychain &&\n        [self.delegate respondsToSelector:@selector(didPasscodeTimerEnd)]) {\n        return [self.delegate didPasscodeTimerEnd];\n    }\n    \n\tNSTimeInterval now = [NSDate timeIntervalSinceReferenceDate];\n\t// startTime wasn't saved yet (first app use and it crashed, phone force\n\t// closed, etc) if it returns -1.\n\tif (now - [self _timerStartTime] >= [self _timerDuration] ||\n        [self _timerStartTime] == -1) return YES;\n\treturn NO;\n}\n\n\n- (void)_deletePasscode {\n    if (!_usesKeychain &&\n        [self.delegate respondsToSelector:@selector(deletePasscode)]) {\n        [self.delegate deletePasscode];\n        \n        return;\n    }\n    \n\t[LTHKeychainUtils deleteItemForUsername:_keychainPasscodeUsername\n\t\t\t\t\t\t\t  andServiceName:_keychainServiceName\n\t\t\t\t\t\t\t\t\t   error:nil];\n}\n\n\n- (void)_savePasscode:(NSString *)passcode {\n    if (!_usesKeychain &&\n        [self.delegate respondsToSelector:@selector(savePasscode:)]) {\n        [self.delegate savePasscode:passcode];\n        \n        return;\n    }\n    \n    [LTHKeychainUtils storeUsername:_keychainPasscodeUsername\n                         andPassword:passcode\n                      forServiceName:_keychainServiceName\n                      updateExisting:YES\n                               error:nil];\n}\n\n\n- (NSString *)_passcode {\n\tif (!_usesKeychain &&\n\t\t[self.delegate respondsToSelector:@selector(passcode)]) {\n\t\treturn [self.delegate passcode];\n\t}\n\t\n\treturn [LTHKeychainUtils getPasswordForUsername:_keychainPasscodeUsername\n\t\t\t\t\t\t\t\t\t  andServiceName:_keychainServiceName\n\t\t\t\t\t\t\t\t\t\t\t   error:nil];\n}\n\n#if !(TARGET_IPHONE_SIMULATOR)\n- (void)_setupFingerPrint {\n    if (!self.context && _allowUnlockWithTouchID) {\n        self.context = [[LAContext alloc] init];\n        \n        NSError *error = nil;\n        if ([self.context canEvaluatePolicy:LAPolicyDeviceOwnerAuthenticationWithBiometrics error:&error]) {\n            if (error) {\n                return;\n            }\n            // Authenticate User\n            \n            \n            [self.context evaluatePolicy:LAPolicyDeviceOwnerAuthenticationWithBiometrics\n                         localizedReason:NSLocalizedStringFromTable(self.touchIDString, _localizationTableName, @\"\")\n                                   reply:^(BOOL success, NSError *error) {\n                                       \n                                       if (error) {\n                                           dispatch_async(dispatch_get_main_queue(), ^{\n                                               [self _resetUI];\n                                           });\n                                           self.context = nil;\n                                           return;\n                                       }\n                                       \n                                       if (success) {\n                                           dispatch_async(dispatch_get_main_queue(), ^{\n                                               [self _dismissMe];\n                                               \n                                               if ([self.delegate respondsToSelector: @selector(passcodeWasEnteredSuccessfully)]) {\n                                                   [self.delegate performSelector: @selector(passcodeWasEnteredSuccessfully)];\n                                               }\n                                           });\n                                       }\n                                       else {\n                                           dispatch_async(dispatch_get_main_queue(), ^{\n                                               [self _resetUI];\n                                           });\n                                       }\n                                       \n                                       self.context = nil;\n                                       \n                                   }];\n        }\n    }\n}\n#endif\n\n#pragma mark - View life\n- (void)viewDidLoad {\n    [super viewDidLoad];\n\tself.view.backgroundColor = _backgroundColor;\n    \n\t_failedAttempts = 0;\n\t_animatingView = [[UIView alloc] initWithFrame: self.view.frame];\n\t[self.view addSubview: _animatingView];\n    \n\t[self _setupViews];\n    [self _setupLabels];\n    [self _setupDigitFields];\n    [self _setupOKButton];\n\t\n\t_passcodeTextField = [[UITextField alloc] initWithFrame: CGRectZero];\n\t_passcodeTextField.delegate = self;\n    _passcodeTextField.secureTextEntry = YES;\n    _passcodeTextField.translatesAutoresizingMaskIntoConstraints = NO;\n    \n    [self.view setNeedsUpdateConstraints];\n}\n\n\n- (void)viewWillAppear:(BOOL)animated {\n\t[super viewWillAppear:animated];\n\t[_passcodeTextField becomeFirstResponder];\n}\n\n\n- (void)viewDidAppear:(BOOL)animated {\n    [super viewDidAppear:animated];\n\tif (!_passcodeTextField.isFirstResponder) [_passcodeTextField becomeFirstResponder];\n}\n\n\n- (void)viewWillDisappear:(BOOL)animated {\n    [super viewWillDisappear:animated];\n    if (!_displayedAsModal && !_displayedAsLockScreen) {\n        [self textFieldShouldEndEditing:_passcodeTextField];\n    }\n}\n\n\n- (void)_cancelAndDismissMe {\n\t_isCurrentlyOnScreen = NO;\n\t_isUserBeingAskedForNewPasscode = NO;\n\t_isUserChangingPasscode = NO;\n\t_isUserConfirmingPasscode = NO;\n\t_isUserEnablingPasscode = NO;\n\t_isUserTurningPasscodeOff = NO;\n    _isUserSwitchingBetweenPasscodeModes = NO;\n\t[self _resetUI];\n\t[_passcodeTextField resignFirstResponder];\n\t\n    if ([self.delegate respondsToSelector: @selector(passcodeViewControllerWillClose)]) {\n\t\t[self.delegate performSelector: @selector(passcodeViewControllerWillClose)];\n    }\n// Or, if you prefer by notifications:\n//\t[[NSNotificationCenter defaultCenter] postNotificationName: @\"passcodeViewControllerWillClose\"\n//\t\t\t\t\t\t\t\t\t\t\t\t\t\tobject: self\n//\t\t\t\t\t\t\t\t\t\t\t\t\t  userInfo: nil];\n\tif (_displayedAsModal) [self dismissViewControllerAnimated:YES completion:nil];\n\telse if (!_displayedAsLockScreen) [self.navigationController popViewControllerAnimated:YES];\n}\n\n\n- (void)_dismissMe {\n    _failedAttempts = 0;\n\t_isCurrentlyOnScreen = NO;\n\t[self _resetUI];\n\t[_passcodeTextField resignFirstResponder];\n\t[UIView animateWithDuration: _lockAnimationDuration animations: ^{\n\t\tif (_displayedAsLockScreen) {\n            if (LTHiOS8) {\n                self.view.center = CGPointMake(self.view.center.x, self.view.center.y * 2.f);\n            }\n            else {\n                if ([UIApplication sharedApplication].statusBarOrientation == UIInterfaceOrientationLandscapeLeft) {\n                    self.view.center = CGPointMake(self.view.center.x * -1.f, self.view.center.y);\n                }\n                else if ([UIApplication sharedApplication].statusBarOrientation == UIInterfaceOrientationLandscapeRight) {\n                    self.view.center = CGPointMake(self.view.center.x * 2.f, self.view.center.y);\n                }\n                else if ([UIApplication sharedApplication].statusBarOrientation == UIInterfaceOrientationPortrait) {\n                    self.view.center = CGPointMake(self.view.center.x, self.view.center.y * -1.f);\n                }\n                else {\n                    self.view.center = CGPointMake(self.view.center.x, self.view.center.y * 2.f);\n                }\n            }\n\t\t}\n\t\telse {\n\t\t\t// Delete from Keychain\n\t\t\tif (_isUserTurningPasscodeOff) {\n\t\t\t\t[self _deletePasscode];\n\t\t\t}\n\t\t\t// Update the Keychain if adding or changing passcode\n\t\t\telse {\n\t\t\t\t[self _savePasscode:_tempPasscode];\n                //finalize type switching\n                if (_isUserSwitchingBetweenPasscodeModes) {\n                    _isUserConfirmingPasscode = NO;\n                    [self setIsSimple:!self.isSimple\n                     inViewController:nil\n                              asModal:_displayedAsModal];\n                }\n\t\t\t}\n\t\t}\n\t} completion: ^(BOOL finished) {\n        if ([self.delegate respondsToSelector: @selector(passcodeViewControllerWillClose)]) {\n            [self.delegate performSelector: @selector(passcodeViewControllerWillClose)];\n        }\n// Or, if you prefer by notifications:\n//\t\t[[NSNotificationCenter defaultCenter] postNotificationName: @\"passcodeViewControllerWillClose\"\n//\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tobject: self\n//\t\t\t\t\t\t\t\t\t\t\t\t\t\t  userInfo: nil];\n\t\tif (_displayedAsLockScreen) {\n\t\t\t[self.view removeFromSuperview];\n\t\t\t[self removeFromParentViewController];\n\t\t}\n        else if (_displayedAsModal) {\n            [self dismissViewControllerAnimated:YES\n                                     completion:nil];\n        }\n        else if (!_displayedAsLockScreen) {\n            [self.navigationController popViewControllerAnimated:NO];\n        }\n\t}];\n\t[[NSNotificationCenter defaultCenter]\n     removeObserver: self\n     name: UIApplicationDidChangeStatusBarOrientationNotification\n     object: nil];\n\t[[NSNotificationCenter defaultCenter]\n     removeObserver: self\n     name: UIApplicationDidChangeStatusBarFrameNotification\n     object: nil];\n}\n\n\n#pragma mark - UI setup\n- (void)_setupViews {\n    _coverView = [[UIView alloc] initWithFrame: CGRectZero];\n    _coverView.backgroundColor = _coverViewBackgroundColor;\n    _coverView.frame = self.view.frame;\n    _coverView.userInteractionEnabled = NO;\n    _coverView.tag = _coverViewTag;\n    _coverView.hidden = YES;\n    [[UIApplication sharedApplication].keyWindow addSubview: _coverView];\n    \n    _complexPasscodeOverlayView = [[UIView alloc] initWithFrame:CGRectZero];\n    _complexPasscodeOverlayView.backgroundColor = [UIColor whiteColor];\n    _complexPasscodeOverlayView.translatesAutoresizingMaskIntoConstraints = NO;\n    [_animatingView addSubview:_complexPasscodeOverlayView];\n}\n\n\n- (void)_setupLabels {\n    _enterPasscodeLabel = [[UILabel alloc] initWithFrame: CGRectZero];\n\t_enterPasscodeLabel.backgroundColor = _enterPasscodeLabelBackgroundColor;\n\t_enterPasscodeLabel.numberOfLines = 0;\n\t_enterPasscodeLabel.textColor = _labelTextColor;\n\t_enterPasscodeLabel.font = _labelFont;\n\t_enterPasscodeLabel.textAlignment = NSTextAlignmentCenter;\n\t[_animatingView addSubview: _enterPasscodeLabel];\n\t\n\t// It is also used to display the \"Passcodes did not match\" error message\n    // if the user fails to confirm the passcode.\n\t_failedAttemptLabel = [[UILabel alloc] initWithFrame: CGRectZero];\n\t_failedAttemptLabel.text = @\"1 Passcode Failed Attempt\";\n    _failedAttemptLabel.numberOfLines = 0;\n\t_failedAttemptLabel.backgroundColor\t= _failedAttemptLabelBackgroundColor;\n\t_failedAttemptLabel.hidden = YES;\n\t_failedAttemptLabel.textColor = _failedAttemptLabelTextColor;\n\t_failedAttemptLabel.font = _labelFont;\n\t_failedAttemptLabel.textAlignment = NSTextAlignmentCenter;\n\t[_animatingView addSubview: _failedAttemptLabel];\n    \n    _enterPasscodeLabel.text = _isUserChangingPasscode ? NSLocalizedStringFromTable(self.enterOldPasscodeString, _localizationTableName, @\"\") : NSLocalizedStringFromTable(self.enterPasscodeString, _localizationTableName, @\"\");\n    _enterPasscodeLabel.translatesAutoresizingMaskIntoConstraints = NO;\n\t_failedAttemptLabel.translatesAutoresizingMaskIntoConstraints = NO;\n}\n\n\n- (void)_setupDigitFields {\n    _firstDigitTextField = [self _makeDigitField];\n    [_animatingView addSubview:_firstDigitTextField];\n    \n    _secondDigitTextField = [self _makeDigitField];\n    [_animatingView addSubview:_secondDigitTextField];\n    \n    _thirdDigitTextField = [self _makeDigitField];\n    [_animatingView addSubview:_thirdDigitTextField];\n    \n    _fourthDigitTextField = [self _makeDigitField];\n    [_animatingView addSubview:_fourthDigitTextField];\n}\n\n\n- (UITextField *)_makeDigitField{\n    UITextField *field = [[UITextField alloc] initWithFrame:CGRectZero];\n    field.backgroundColor = _passcodeBackgroundColor;\n    field.textAlignment = NSTextAlignmentCenter;\n    field.text = _passcodeCharacter;\n    field.textColor = _passcodeTextColor;\n    field.font = _passcodeFont;\n    field.secureTextEntry = NO;\n    field.userInteractionEnabled = NO;\n    field.translatesAutoresizingMaskIntoConstraints = NO;\n    [field setBorderStyle:UITextBorderStyleNone];\n    return field;\n}\n\n\n- (void)_setupOKButton {\n    _OKButton = [UIButton buttonWithType:UIButtonTypeCustom];\n    [_OKButton setTitle:NSLocalizedStringFromTable(@\"OK\", _localizationTableName, nil)\n               forState:UIControlStateNormal];\n    _OKButton.titleLabel.font = _labelFont;\n    _OKButton.backgroundColor = _enterPasscodeLabelBackgroundColor;\n    [_OKButton setTitleColor:_labelTextColor forState:UIControlStateNormal];\n    [_OKButton setTitleColor:[UIColor blackColor] forState:UIControlStateHighlighted];\n    [_OKButton addTarget:self\n                  action:@selector(_validateComplexPasscode)\n        forControlEvents:UIControlEventTouchUpInside];\n    [_complexPasscodeOverlayView addSubview:_OKButton];\n    \n    _OKButton.hidden = YES;\n    _OKButton.translatesAutoresizingMaskIntoConstraints = NO;\n}\n\n\n- (void)updateViewConstraints {\n    [super updateViewConstraints];\n    [self.view removeConstraints:self.view.constraints];\n    [_animatingView removeConstraints:_animatingView.constraints];\n    \n    _firstDigitTextField.hidden = !self.isSimple;\n    _secondDigitTextField.hidden = !self.isSimple;\n    _thirdDigitTextField.hidden = !self.isSimple;\n    _fourthDigitTextField.hidden = !self.isSimple;\n    \n    _complexPasscodeOverlayView.hidden = self.isSimple;\n    _passcodeTextField.hidden = self.isSimple;\n\t_passcodeTextField.keyboardType =\n    self.isSimple ? UIKeyboardTypeNumberPad : UIKeyboardTypeASCIICapable;\n    [_passcodeTextField reloadInputViews];\n    \n    if (self.isSimple) {\n        [_animatingView addSubview:_passcodeTextField];\n    }\n    else {\n        [_complexPasscodeOverlayView addSubview:_passcodeTextField];\n        \n        // If we come from simple state some constraints are added even if\n        // translatesAutoresizingMaskIntoConstraints = NO,\n        // because no constraints are added manually in that case\n        [_passcodeTextField removeConstraints:_passcodeTextField.constraints];\n    }\n    \n    // MARK: Please read\n\t// The controller works properly on all devices and orientations, but looks odd on iPhone's landscape.\n\t// Usually, lockscreens on iPhone are kept portrait-only, though. It also doesn't fit inside a modal when landscape.\n\t// That's why only portrait is selected for iPhone's supported orientations.\n\t// Modify this to fit your needs.\n\t\n\tCGFloat yOffsetFromCenter = -self.view.frame.size.height * 0.24;\n\tNSLayoutConstraint *enterPasscodeConstraintCenterX =\n\t[NSLayoutConstraint constraintWithItem: _enterPasscodeLabel\n\t\t\t\t\t\t\t\t attribute: NSLayoutAttributeCenterX\n\t\t\t\t\t\t\t\t relatedBy: NSLayoutRelationEqual\n\t\t\t\t\t\t\t\t\ttoItem: _animatingView\n\t\t\t\t\t\t\t\t attribute: NSLayoutAttributeCenterX\n\t\t\t\t\t\t\t\tmultiplier: 1.0f\n\t\t\t\t\t\t\t\t  constant: 0.0f];\n\tNSLayoutConstraint *enterPasscodeConstraintCenterY =\n    [NSLayoutConstraint constraintWithItem: _enterPasscodeLabel\n                                 attribute: NSLayoutAttributeCenterY\n                                 relatedBy: NSLayoutRelationEqual\n                                    toItem: _animatingView\n                                 attribute: NSLayoutAttributeCenterY\n                                multiplier: 1.0f\n                                  constant: yOffsetFromCenter];\n    [self.view addConstraint: enterPasscodeConstraintCenterX];\n    [self.view addConstraint: enterPasscodeConstraintCenterY];\n\t\n    if (self.isSimple) {\n        NSLayoutConstraint *firstDigitX =\n        [NSLayoutConstraint constraintWithItem: _firstDigitTextField\n                                     attribute: NSLayoutAttributeLeft\n                                     relatedBy: NSLayoutRelationEqual\n                                        toItem: _animatingView\n                                     attribute: NSLayoutAttributeCenterX\n                                    multiplier: 1.0f\n                                      constant: - _horizontalGap * 1.5f - 2.0f];\n        NSLayoutConstraint *secondDigitX =\n        [NSLayoutConstraint constraintWithItem: _secondDigitTextField\n                                     attribute: NSLayoutAttributeLeft\n                                     relatedBy: NSLayoutRelationEqual\n                                        toItem: _animatingView\n                                     attribute: NSLayoutAttributeCenterX\n                                    multiplier: 1.0f\n                                      constant: - _horizontalGap * 2/3 - 2.0f];\n        NSLayoutConstraint *thirdDigitX =\n        [NSLayoutConstraint constraintWithItem: _thirdDigitTextField\n                                     attribute: NSLayoutAttributeLeft\n                                     relatedBy: NSLayoutRelationEqual\n                                        toItem: _animatingView\n                                     attribute: NSLayoutAttributeCenterX\n                                    multiplier: 1.0f\n                                      constant: _horizontalGap * 1/6 - 2.0f];\n        NSLayoutConstraint *fourthDigitX =\n        [NSLayoutConstraint constraintWithItem: _fourthDigitTextField\n                                     attribute: NSLayoutAttributeLeft\n                                     relatedBy: NSLayoutRelationEqual\n                                        toItem: _animatingView\n                                     attribute: NSLayoutAttributeCenterX\n                                    multiplier: 1.0f\n                                      constant: _horizontalGap - 2.0f];\n        NSLayoutConstraint *firstDigitY =\n        [NSLayoutConstraint constraintWithItem: _firstDigitTextField\n                                     attribute: NSLayoutAttributeCenterY\n                                     relatedBy: NSLayoutRelationEqual\n                                        toItem: _enterPasscodeLabel\n                                     attribute: NSLayoutAttributeBottom\n                                    multiplier: 1.0f\n                                      constant: _verticalGap];\n        NSLayoutConstraint *secondDigitY =\n        [NSLayoutConstraint constraintWithItem: _secondDigitTextField\n                                     attribute: NSLayoutAttributeCenterY\n                                     relatedBy: NSLayoutRelationEqual\n                                        toItem: _enterPasscodeLabel\n                                     attribute: NSLayoutAttributeBottom\n                                    multiplier: 1.0f\n                                      constant: _verticalGap];\n        NSLayoutConstraint *thirdDigitY =\n        [NSLayoutConstraint constraintWithItem: _thirdDigitTextField\n                                     attribute: NSLayoutAttributeCenterY\n                                     relatedBy: NSLayoutRelationEqual\n                                        toItem: _enterPasscodeLabel\n                                     attribute: NSLayoutAttributeBottom\n                                    multiplier: 1.0f\n                                      constant: _verticalGap];\n        NSLayoutConstraint *fourthDigitY =\n        [NSLayoutConstraint constraintWithItem: _fourthDigitTextField\n                                     attribute: NSLayoutAttributeCenterY\n                                     relatedBy: NSLayoutRelationEqual\n                                        toItem: _enterPasscodeLabel\n                                     attribute: NSLayoutAttributeBottom\n                                    multiplier: 1.0f\n                                      constant: _verticalGap];\n        [self.view addConstraint:firstDigitX];\n        [self.view addConstraint:secondDigitX];\n        [self.view addConstraint:thirdDigitX];\n        [self.view addConstraint:fourthDigitX];\n        [self.view addConstraint:firstDigitY];\n        [self.view addConstraint:secondDigitY];\n        [self.view addConstraint:thirdDigitY];\n        [self.view addConstraint:fourthDigitY];\n    }\n    else {\n        NSDictionary *viewsDictionary = NSDictionaryOfVariableBindings(_passcodeTextField, _OKButton);\n        \n        //TODO: specify different offsets through metrics\n        NSArray *constraints =\n        [NSLayoutConstraint constraintsWithVisualFormat:@\"H:|-10-[_passcodeTextField]-5-[_OKButton]-10-|\"\n                                                options:0\n                                                metrics:nil\n                                                  views:viewsDictionary];\n        \n        [self.view addConstraints:constraints];\n        \n        constraints =\n        [NSLayoutConstraint constraintsWithVisualFormat:@\"V:|-5-[_passcodeTextField]-5-|\"\n                                                options:0\n                                                metrics:nil\n                                                  views:viewsDictionary];\n        \n        [self.view addConstraints:constraints];\n        \n        NSLayoutConstraint *buttonY =\n        [NSLayoutConstraint constraintWithItem: _OKButton\n                                     attribute: NSLayoutAttributeCenterY\n                                     relatedBy: NSLayoutRelationEqual\n                                        toItem: _passcodeTextField\n                                     attribute: NSLayoutAttributeCenterY\n                                    multiplier: 1.0f\n                                      constant: 0.0f];\n        \n        [self.view addConstraint:buttonY];\n        \n        NSLayoutConstraint *buttonHeight =\n        [NSLayoutConstraint constraintWithItem: _OKButton\n                                     attribute: NSLayoutAttributeHeight\n                                     relatedBy: NSLayoutRelationEqual\n                                        toItem: _passcodeTextField\n                                     attribute: NSLayoutAttributeHeight\n                                    multiplier: 1.0f\n                                      constant: 0.0f];\n        \n        [self.view addConstraint:buttonHeight];\n        \n        NSLayoutConstraint *overlayViewLeftConstraint =\n        [NSLayoutConstraint constraintWithItem: _complexPasscodeOverlayView\n                                     attribute: NSLayoutAttributeLeft\n                                     relatedBy: NSLayoutRelationEqual\n                                        toItem: _animatingView\n                                     attribute: NSLayoutAttributeLeft\n                                    multiplier: 1.0f\n                                      constant: 0.0f];\n        \n        NSLayoutConstraint *overlayViewY =\n        [NSLayoutConstraint constraintWithItem: _complexPasscodeOverlayView\n                                     attribute: NSLayoutAttributeCenterY\n                                     relatedBy: NSLayoutRelationEqual\n                                        toItem: _enterPasscodeLabel\n                                     attribute: NSLayoutAttributeBottom\n                                    multiplier: 1.0f\n                                      constant: _verticalGap];\n        \n        NSLayoutConstraint *overlayViewHeight =\n        [NSLayoutConstraint constraintWithItem: _complexPasscodeOverlayView\n                                     attribute: NSLayoutAttributeHeight\n                                     relatedBy: NSLayoutRelationEqual\n                                        toItem: nil\n                                     attribute: NSLayoutAttributeNotAnAttribute\n                                    multiplier: 1.0f\n                                      constant: _passcodeOverlayHeight];\n        \n        NSLayoutConstraint *overlayViewWidth =\n        [NSLayoutConstraint constraintWithItem: _complexPasscodeOverlayView\n                                     attribute: NSLayoutAttributeWidth\n                                     relatedBy: NSLayoutRelationEqual\n                                        toItem: _animatingView\n                                     attribute: NSLayoutAttributeWidth\n                                    multiplier: 1.0f\n                                      constant: 0.0f];\n        [self.view addConstraints:@[overlayViewLeftConstraint, overlayViewY, overlayViewHeight, overlayViewWidth]];\n    }\n\t\n    NSLayoutConstraint *failedAttemptLabelCenterX =\n    [NSLayoutConstraint constraintWithItem: _failedAttemptLabel\n                                 attribute: NSLayoutAttributeCenterX\n                                 relatedBy: NSLayoutRelationEqual\n                                    toItem: _animatingView\n                                 attribute: NSLayoutAttributeCenterX\n                                multiplier: 1.0f\n                                  constant: 0.0f];\n\tNSLayoutConstraint *failedAttemptLabelCenterY =\n    [NSLayoutConstraint constraintWithItem: _failedAttemptLabel\n                                 attribute: NSLayoutAttributeCenterY\n                                 relatedBy: NSLayoutRelationEqual\n                                    toItem: _enterPasscodeLabel\n                                 attribute: NSLayoutAttributeBottom\n                                multiplier: 1.0f\n                                  constant: _failedAttemptLabelGap];\n\tNSLayoutConstraint *failedAttemptLabelWidth =\n    [NSLayoutConstraint constraintWithItem: _failedAttemptLabel\n                                 attribute: NSLayoutAttributeWidth\n                                 relatedBy: NSLayoutRelationGreaterThanOrEqual\n                                    toItem: nil\n                                 attribute: NSLayoutAttributeNotAnAttribute\n                                multiplier: 1.0f\n                                  constant: kFailedAttemptLabelWidth];\n\tNSLayoutConstraint *failedAttemptLabelHeight =\n    [NSLayoutConstraint constraintWithItem: _failedAttemptLabel\n                                 attribute: NSLayoutAttributeHeight\n                                 relatedBy: NSLayoutRelationEqual\n                                    toItem: nil\n                                 attribute: NSLayoutAttributeNotAnAttribute\n                                multiplier: 1.0f\n                                  constant: kFailedAttemptLabelHeight + 6.0f];\n\t[self.view addConstraint:failedAttemptLabelCenterX];\n\t[self.view addConstraint:failedAttemptLabelCenterY];\n\t[self.view addConstraint:failedAttemptLabelWidth];\n\t[self.view addConstraint:failedAttemptLabelHeight];\n    \n//    NSLog(@\"constraints %@\", self.view.constraints);\n//    NSLog(@\"_passcodeTextField %@\", _passcodeTextField.constraints);\n}\n\n\n#pragma mark - Displaying\n- (void)showLockscreenWithoutAnimation {\n\t[self showLockScreenWithAnimation:NO withLogout:NO andLogoutTitle:nil];\n}\n\n\n- (void)showLockScreenWithAnimation:(BOOL)animated withLogout:(BOOL)hasLogout andLogoutTitle:(NSString*)logoutTitle {\n\t[self _prepareAsLockScreen];\n    \n\t// In case the user leaves the app while the lockscreen is already active.\n\tif (!_isCurrentlyOnScreen) {\n\t\t// Usually, the app's window is the first on the stack. I'm doing this because if an alertView or actionSheet\n\t\t// is open when presenting the lockscreen causes problems, because the av/as has it's own window that replaces the keyWindow\n\t\t// and due to how Apple handles said window internally.\n\t\t// Currently the lockscreen appears behind the av/as, which is the best compromise for now.\n\t\t// You can read and/or give a hand following one of the links below\n\t\t// http://stackoverflow.com/questions/19816142/uialertviews-uiactionsheets-and-keywindow-problems\n\t\t// https://github.com/rolandleth/LTHPasscodeViewController/issues/16\n\t\t// Usually not more than one window is needed, but your needs may vary; modify below.\n\t\t// Also, in case the control doesn't work properly,\n\t\t// try it with .keyWindow before anything else, it might work.\n//\t\tUIWindow *mainWindow = [UIApplication sharedApplication].keyWindow;\n\t\tUIWindow *mainWindow = [UIApplication sharedApplication].windows[0];\n\t\t[mainWindow addSubview: self.view];\n//\t\t[mainWindow.rootViewController addChildViewController: self];\n\t\t// All this hassle because a view added to UIWindow does not rotate automatically\n\t\t// and if we would have added the view anywhere else, it wouldn't display properly\n\t\t// (having a modal on screen when the user leaves the app, for example).\n\t\t[self rotateAccordingToStatusBarOrientationAndSupportedOrientations];\n\t\tCGPoint newCenter;\n        [self statusBarFrameOrOrientationChanged:nil];\n        if (LTHiOS8) {\n            self.view.center = CGPointMake(self.view.center.x, self.view.center.y * -1.f);\n            newCenter = CGPointMake(mainWindow.center.x,\n                                    mainWindow.center.y + self.navigationController.navigationBar.frame.size.height / 2);\n        }\n        else {\n            if ([UIApplication sharedApplication].statusBarOrientation == UIInterfaceOrientationLandscapeLeft) {\n                self.view.center = CGPointMake(self.view.center.x * -1.f, self.view.center.y);\n                newCenter = CGPointMake(mainWindow.center.x - self.navigationController.navigationBar.frame.size.height / 2,\n                                        mainWindow.center.y);\n            }\n            else if ([UIApplication sharedApplication].statusBarOrientation == UIInterfaceOrientationLandscapeRight) {\n                self.view.center = CGPointMake(self.view.center.x * 2.f, self.view.center.y);\n                newCenter = CGPointMake(mainWindow.center.x + self.navigationController.navigationBar.frame.size.height / 2,\n                                        mainWindow.center.y);\n            }\n            else if ([UIApplication sharedApplication].statusBarOrientation == UIInterfaceOrientationPortrait) {\n                self.view.center = CGPointMake(self.view.center.x, self.view.center.y * -1.f);\n                newCenter = CGPointMake(mainWindow.center.x,\n                                        mainWindow.center.y - self.navigationController.navigationBar.frame.size.height / 2);\n            }\n            else {\n                self.view.center = CGPointMake(self.view.center.x, self.view.center.y * 2.f);\n                newCenter = CGPointMake(mainWindow.center.x,\n                                        mainWindow.center.y + self.navigationController.navigationBar.frame.size.height / 2);\n            }\n        }\n\t\tif (animated) {\n\t\t\t[UIView animateWithDuration: _lockAnimationDuration animations: ^{\n\t\t\t\tself.view.center = newCenter;\n\t\t\t}];\n\t\t}\n        else {\n\t\t\tself.view.center = newCenter;\n\t\t}\n\t\t\n\t\t// Add nav bar & logout button if specified\n\t\tif (hasLogout) {\n\t\t\t// Navigation Bar with custom UI\n\t\t\tself.navBar =\n\t\t\t[[UINavigationBar alloc] initWithFrame:CGRectMake(0, mainWindow.frame.origin.y,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t  mainWindow.frame.size.width, 64)];\n            self.navBar.tintColor = self.navigationTintColor;\n\t\t\tif ([self respondsToSelector:@selector(setEdgesForExtendedLayout:)]) {\n\t\t\t\tself.navBar.barTintColor = self.navigationBarTintColor;\n\t\t\t\tself.navBar.translucent  = self.navigationBarTranslucent;\n\t\t\t}\n\t\t\tif (self.navigationTitleColor) {\n\t\t\t\tself.navBar.titleTextAttributes =\n\t\t\t\t@{ NSForegroundColorAttributeName : self.navigationTitleColor };\n\t\t\t}\n\t\t\t\n\t\t\t// Navigation item\n\t\t\tUIBarButtonItem *leftButton =\n            [[UIBarButtonItem alloc] initWithTitle:logoutTitle\n                                             style:UIBarButtonItemStyleDone\n                                            target:self\n                                            action:@selector(_logoutWasPressed)];\n\t\t\tUINavigationItem *item =\n            [[UINavigationItem alloc] initWithTitle:self.title];\n\t\t\titem.leftBarButtonItem = leftButton;\n\t\t\titem.hidesBackButton = YES;\n\t\t\t\n\t\t\t[self.navBar pushNavigationItem:item animated:NO];\n\t\t\t[mainWindow addSubview:self.navBar];\n\t\t}\n\t\t\n\t\t_isCurrentlyOnScreen = YES;\n\t}\n}\n\n\n- (void)_prepareNavigationControllerWithController:(UIViewController *)viewController {\n\tself.navigationItem.rightBarButtonItem =\n\t[[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemCancel\n\t\t\t\t\t\t\t\t\t\t\t\t  target:self\n\t\t\t\t\t\t\t\t\t\t\t\t  action:@selector(_cancelAndDismissMe)];\n\t\n\tif (!_displayedAsModal) {\n\t\t[viewController.navigationController pushViewController:self\n\t\t\t\t\t\t\t\t\t\t\t\t\t   animated:YES];\n        self.navigationItem.hidesBackButton = _hidesBackButton;\n        [self rotateAccordingToStatusBarOrientationAndSupportedOrientations];\n        \n\t\treturn;\n\t}\n\tUINavigationController *navController =\n\t[[UINavigationController alloc] initWithRootViewController:self];\n\t\n\t// Make sure nav bar for logout is off the screen\n\t[self.navBar removeFromSuperview];\n\tself.navBar = nil;\n\t\n\t// Customize navigation bar\n\t// Make sure UITextAttributeTextColor is not set to nil\n\t// barTintColor & translucent is only called on iOS7+\n\tnavController.navigationBar.tintColor = self.navigationTintColor;\n\tif ([self respondsToSelector:@selector(setEdgesForExtendedLayout:)]) {\n\t\tnavController.navigationBar.barTintColor = self.navigationBarTintColor;\n\t\tnavController.navigationBar.translucent = self.navigationBarTranslucent;\n\t}\n\tif (self.navigationTitleColor) {\n\t\tnavController.navigationBar.titleTextAttributes =\n\t\t@{ NSForegroundColorAttributeName : self.navigationTitleColor };\n\t}\n\t\n\t[viewController presentViewController:navController\n\t\t\t\t\t\t\t\t animated:YES\n\t\t\t\t\t\t\t   completion:nil];\n\t[self rotateAccordingToStatusBarOrientationAndSupportedOrientations];\n}\n\n\n- (void)showForEnablingPasscodeInViewController:(UIViewController *)viewController\n\t\t\t\t\t\t\t\t\t\tasModal:(BOOL)isModal {\n\t_displayedAsModal = isModal;\n\t[self _prepareForEnablingPasscode];\n\t[self _prepareNavigationControllerWithController:viewController];\n\tself.title = NSLocalizedStringFromTable(self.enablePasscodeString, _localizationTableName, @\"\");\n}\n\n\n- (void)showForChangingPasscodeInViewController:(UIViewController *)viewController\n\t\t\t\t\t\t\t\t\t\tasModal:(BOOL)isModal {\n\t_displayedAsModal = isModal;\n\t[self _prepareForChangingPasscode];\n\t[self _prepareNavigationControllerWithController:viewController];\n\tself.title = NSLocalizedStringFromTable(self.changePasscodeString, _localizationTableName, @\"\");\n}\n\n\n- (void)showForDisablingPasscodeInViewController:(UIViewController *)viewController\n                                         asModal:(BOOL)isModal {\n\t_displayedAsModal = isModal;\n\t[self _prepareForTurningOffPasscode];\n\t[self _prepareNavigationControllerWithController:viewController];\n\tself.title = NSLocalizedStringFromTable(self.turnOffPasscodeString, _localizationTableName, @\"\");\n}\n\n\n#pragma mark - Preparing\n- (void)_prepareAsLockScreen {\n    // In case the user leaves the app while changing/disabling Passcode.\n    if (_isCurrentlyOnScreen && !_displayedAsLockScreen) {\n        [self _cancelAndDismissMe];\n    }\n    _displayedAsLockScreen = YES;\n\t_isUserTurningPasscodeOff = NO;\n\t_isUserChangingPasscode = NO;\n\t_isUserConfirmingPasscode = NO;\n\t_isUserEnablingPasscode = NO;\n    _isUserSwitchingBetweenPasscodeModes = NO;\n    \n\t[self _resetUI];\n    #if !(TARGET_IPHONE_SIMULATOR)\n    [self _setupFingerPrint];\n    #endif\n}\n\n\n- (void)_prepareForChangingPasscode {\n\t_isCurrentlyOnScreen = YES;\n\t_displayedAsLockScreen = NO;\n\t_isUserTurningPasscodeOff = NO;\n\t_isUserChangingPasscode = YES;\n\t_isUserConfirmingPasscode = NO;\n\t_isUserEnablingPasscode = NO;\n    \n\t[self _resetUI];\n}\n\n\n- (void)_prepareForTurningOffPasscode {\n\t_isCurrentlyOnScreen = YES;\n\t_displayedAsLockScreen = NO;\n\t_isUserTurningPasscodeOff = YES;\n\t_isUserChangingPasscode = NO;\n\t_isUserConfirmingPasscode = NO;\n\t_isUserEnablingPasscode = NO;\n    _isUserSwitchingBetweenPasscodeModes = NO;\n    \n\t[self _resetUI];\n}\n\n\n- (void)_prepareForEnablingPasscode {\n\t_isCurrentlyOnScreen = YES;\n\t_displayedAsLockScreen = NO;\n\t_isUserTurningPasscodeOff = NO;\n\t_isUserChangingPasscode = NO;\n\t_isUserConfirmingPasscode = NO;\n\t_isUserEnablingPasscode = YES;\n    _isUserSwitchingBetweenPasscodeModes = NO;\n    \n\t[self _resetUI];\n}\n\n\n#pragma mark - UITextFieldDelegate\n- (BOOL)textFieldShouldEndEditing:(UITextField *)textField {\n    if (!_displayedAsLockScreen && !_displayedAsModal) return YES;\n\treturn !_isCurrentlyOnScreen;\n}\n\n- (BOOL)textField:(UITextField *)textField shouldChangeCharactersInRange:(NSRange)range replacementString:(NSString *)string {\n    \n    if ([string isEqualToString: @\"\\n\"]) return NO;\n    \n    NSString *typedString = [textField.text stringByReplacingCharactersInRange: range\n                                                                    withString: string];\n    \n    if (self.isSimple) {\n        if (typedString.length >= 1) _firstDigitTextField.secureTextEntry = YES;\n        else _firstDigitTextField.secureTextEntry = NO;\n        if (typedString.length >= 2) _secondDigitTextField.secureTextEntry = YES;\n        else _secondDigitTextField.secureTextEntry = NO;\n        if (typedString.length >= 3) _thirdDigitTextField.secureTextEntry = YES;\n        else _thirdDigitTextField.secureTextEntry = NO;\n        if (typedString.length >= 4) _fourthDigitTextField.secureTextEntry = YES;\n        else _fourthDigitTextField.secureTextEntry = NO;\n        \n        if (typedString.length == 4) {\n        \t// Make the last bullet show up\n\t\t\t[self performSelector: @selector(_validatePasscode:)\n\t\t\t\t\t   withObject: typedString\n\t\t\t\t\t   afterDelay: 0.15];\n\t\t}\n        \n        if (typedString.length > 4) return NO;\n    }\n    else _OKButton.hidden = [typedString length] == 0;\n\t\n\treturn YES;\n}\n\n#pragma mark - Validation\n- (void)_validateComplexPasscode {\n    NSLog(@\"isValid %@\", [self _validatePasscode:_passcodeTextField.text] ? @\"YES\" : @\"NO\");\n}\n\n\n- (BOOL)_validatePasscode:(NSString *)typedString {\n    NSString *savedPasscode = [self _passcode];\n    // Entering from Settings. If savedPasscode is empty, it means\n    // the user is setting a new Passcode now, or is changing his current Passcode.\n    if ((_isUserChangingPasscode  || savedPasscode.length == 0) && !_isUserTurningPasscodeOff) {\n        // Either the user is being asked for a new passcode, confirmation comes next,\n        // either he is setting up a new passcode, confirmation comes next, still.\n        // We need the !_isUserConfirmingPasscode condition, because if he's adding a new Passcode,\n        // then savedPasscode is still empty and the condition will always be true, not passing this point.\n        if ((_isUserBeingAskedForNewPasscode || savedPasscode.length == 0) && !_isUserConfirmingPasscode) {\n            _tempPasscode = typedString;\n            // The delay is to give time for the last bullet to appear\n            [self performSelector:@selector(_askForConfirmationPasscode)\n                       withObject:nil\n                       afterDelay:0.15f];\n        }\n        // User entered his Passcode correctly and we are at the confirming screen.\n        else if (_isUserConfirmingPasscode) {\n            // User entered the confirmation Passcode correctly\n            if ([typedString isEqualToString: _tempPasscode]) {\n                [self _dismissMe];\n            }\n            // User entered the confirmation Passcode incorrectly, start over.\n            else {\n                [self performSelector:@selector(_reAskForNewPasscode)\n                           withObject:nil\n                           afterDelay:_slideAnimationDuration];\n            }\n        }\n        // Changing Passcode and the entered Passcode is correct.\n        else if ([typedString isEqualToString:savedPasscode]){\n            [self performSelector:@selector(_askForNewPasscode)\n                       withObject:nil\n                       afterDelay:_slideAnimationDuration];\n            _failedAttempts = 0;\n        }\n        // Acting as lockscreen and the entered Passcode is incorrect.\n        else {\n            [self performSelector: @selector(_denyAccess)\n                       withObject: nil\n                       afterDelay: _slideAnimationDuration];\n            return NO;\n        }\n    }\n    // App launch/Turning passcode off: Passcode OK -> dismiss, Passcode incorrect -> deny access.\n    else {\n        if ([typedString isEqualToString: savedPasscode]) {\n// Or, if you prefer by notifications:\n//            [[NSNotificationCenter defaultCenter] postNotificationName: @\"passcodeWasEnteredSuccessfully\"\n//                                                                object: self\n//                                                              userInfo: nil];\n            [self _dismissMe];\n            if ([self.delegate respondsToSelector: @selector(passcodeWasEnteredSuccessfully)]) {\n                [self.delegate performSelector: @selector(passcodeWasEnteredSuccessfully)];\n            }\n        }\n        else {\n            [self performSelector: @selector(_denyAccess)\n                       withObject: nil\n                       afterDelay: _slideAnimationDuration];\n            return NO;\n        }\n    }\n    \n    return YES;\n}\n\n\n#pragma mark - Actions\n- (void)_askForNewPasscode {\n\t_isUserBeingAskedForNewPasscode = YES;\n\t_isUserConfirmingPasscode = NO;\n    \n    // Update layout considering type\n    [self.view setNeedsUpdateConstraints];\n    \n\t_failedAttemptLabel.hidden = YES;\n\t\n\tCATransition *transition = [CATransition animation];\n\t[transition setDelegate: self];\n\t[self performSelector: @selector(_resetUI) withObject: nil afterDelay: 0.1f];\n\t[transition setType: kCATransitionPush];\n\t[transition setSubtype: kCATransitionFromRight];\n\t[transition setDuration: _slideAnimationDuration];\n\t[transition setTimingFunction:\n     [CAMediaTimingFunction functionWithName: kCAMediaTimingFunctionEaseInEaseOut]];\n\t[[_animatingView layer] addAnimation: transition forKey: @\"swipe\"];\n}\n\n\n- (void)_reAskForNewPasscode {\n\t_isUserBeingAskedForNewPasscode = YES;\n\t_isUserConfirmingPasscode = NO;\n\t_tempPasscode = @\"\";\n\t\n\tCATransition *transition = [CATransition animation];\n\t[transition setDelegate: self];\n\t[self performSelector: @selector(_resetUIForReEnteringNewPasscode)\n               withObject: nil\n               afterDelay: 0.1f];\n\t[transition setType: kCATransitionPush];\n\t[transition setSubtype: kCATransitionFromRight];\n\t[transition setDuration: _slideAnimationDuration];\n\t[transition setTimingFunction:\n     [CAMediaTimingFunction functionWithName: kCAMediaTimingFunctionEaseInEaseOut]];\n\t[[_animatingView layer] addAnimation: transition forKey: @\"swipe\"];\n}\n\n\n- (void)_askForConfirmationPasscode {\n\t_isUserBeingAskedForNewPasscode = NO;\n\t_isUserConfirmingPasscode = YES;\n\t_failedAttemptLabel.hidden = YES;\n\t\n\tCATransition *transition = [CATransition animation];\n\t[transition setDelegate: self];\n\t[self performSelector: @selector(_resetUI) withObject: nil afterDelay: 0.1f];\n\t[transition setType: kCATransitionPush];\n\t[transition setSubtype: kCATransitionFromRight];\n\t[transition setDuration: _slideAnimationDuration];\n\t[transition setTimingFunction:\n     [CAMediaTimingFunction functionWithName: kCAMediaTimingFunctionEaseInEaseOut]];\n\t[[_animatingView layer] addAnimation: transition forKey: @\"swipe\"];\n}\n\n\n- (void)_denyAccess {\n\t[self _resetTextFields];\n\t_passcodeTextField.text = @\"\";\n    _OKButton.hidden = YES;\n    \n\t_failedAttempts++;\n\t\n\tif (_maxNumberOfAllowedFailedAttempts > 0 &&\n\t\t_failedAttempts == _maxNumberOfAllowedFailedAttempts &&\n\t\t[self.delegate respondsToSelector: @selector(maxNumberOfFailedAttemptsReached)]) {\n\t\t[self.delegate maxNumberOfFailedAttemptsReached];\n    }\n//\tOr, if you prefer by notifications:\n//\t[[NSNotificationCenter defaultCenter] postNotificationName: @\"maxNumberOfFailedAttemptsReached\"\n//\t\t\t\t\t\t\t\t\t\t\t\t\t\tobject: self\n//\t\t\t\t\t\t\t\t\t\t\t\t\t  userInfo: nil];\n\t\n\tif (_failedAttempts == 1) {\n        _failedAttemptLabel.text =\n        NSLocalizedStringFromTable(@\"1 Passcode Failed Attempt\", _localizationTableName, @\"\");\n    }\n\telse {\n\t\t_failedAttemptLabel.text = [NSString stringWithFormat: NSLocalizedStringFromTable(@\"%i Passcode Failed Attempts\", _localizationTableName, @\"\"), _failedAttempts];\n\t}\n\t_failedAttemptLabel.layer.cornerRadius = kFailedAttemptLabelHeight * 0.65f;\n\t_failedAttemptLabel.clipsToBounds = true;\n\t_failedAttemptLabel.hidden = NO;\n}\n\n\n- (void)_logoutWasPressed {\n\t// Notify delegate that logout button was pressed\n\tif ([self.delegate respondsToSelector: @selector(logoutButtonWasPressed)]) {\n\t\t[self.delegate logoutButtonWasPressed];\n\t}\n}\n\n\n- (void)_resetTextFields {\n\tif (![_passcodeTextField isFirstResponder]) [_passcodeTextField becomeFirstResponder];\n\t_firstDigitTextField.secureTextEntry = NO;\n\t_secondDigitTextField.secureTextEntry = NO;\n\t_thirdDigitTextField.secureTextEntry = NO;\n\t_fourthDigitTextField.secureTextEntry = NO;\n}\n\n\n- (void)_resetUI {\n\t[self _resetTextFields];\n\t_failedAttemptLabel.backgroundColor\t= _failedAttemptLabelBackgroundColor;\n\t_failedAttemptLabel.textColor = _failedAttemptLabelTextColor;\n    if (_failedAttempts == 0) _failedAttemptLabel.hidden = YES;\n\t\n\t_passcodeTextField.text = @\"\";\n\tif (_isUserConfirmingPasscode) {\n\t\tif (_isUserEnablingPasscode) {\n            _enterPasscodeLabel.text = NSLocalizedStringFromTable(self.reenterPasscodeString, _localizationTableName, @\"\");\n        }\n\t\telse if (_isUserChangingPasscode) {\n            _enterPasscodeLabel.text = NSLocalizedStringFromTable(self.reenterNewPasscodeString, _localizationTableName, @\"\");\n        }\n\t}\n\telse if (_isUserBeingAskedForNewPasscode) {\n\t\tif (_isUserEnablingPasscode || _isUserChangingPasscode) {\n\t\t\t_enterPasscodeLabel.text = NSLocalizedStringFromTable(self.enterNewPasscodeString, _localizationTableName, @\"\");\n\t\t}\n\t}\n\telse {\n        if (_isUserChangingPasscode) {\n            _enterPasscodeLabel.text = NSLocalizedStringFromTable(self.enterOldPasscodeString, _localizationTableName, @\"\");\n        } else {\n            _enterPasscodeLabel.text = NSLocalizedStringFromTable(self.enterPasscodeString, _localizationTableName, @\"\");\n        }\n    }\n\t\n\t// Make sure nav bar for logout is off the screen\n\t[self.navBar removeFromSuperview];\n\tself.navBar = nil;\n    \n    _OKButton.hidden = YES;\n}\n\n\n- (void)_resetUIForReEnteringNewPasscode {\n\t[self _resetTextFields];\n\t_passcodeTextField.text = @\"\";\n\t// If there's no passcode saved in Keychain,\n    // the user is adding one for the first time, otherwise he's changing his passcode.\n\tNSString *savedPasscode = [LTHKeychainUtils getPasswordForUsername: _keychainPasscodeUsername\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t andServiceName: _keychainServiceName\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t  error: nil];\n\t_enterPasscodeLabel.text = savedPasscode.length == 0 ? NSLocalizedStringFromTable(self.enterPasscodeString, _localizationTableName, @\"\") : NSLocalizedStringFromTable(self.enterNewPasscodeString, _localizationTableName, @\"\");\n\t\n\t_failedAttemptLabel.hidden = NO;\n\t_failedAttemptLabel.text = NSLocalizedStringFromTable(@\"Passcodes did not match. Try again.\", _localizationTableName, @\"\");\n\t_failedAttemptLabel.backgroundColor = [UIColor clearColor];\n\t_failedAttemptLabel.layer.borderWidth = 0;\n\t_failedAttemptLabel.layer.borderColor = [UIColor clearColor].CGColor;\n\t_failedAttemptLabel.textColor = _labelTextColor;\n}\n\n\n- (void)setIsSimple:(BOOL)isSimple inViewController:(UIViewController *)viewController asModal:(BOOL)isModal{\n    if (!_isUserSwitchingBetweenPasscodeModes &&\n        !_isUserBeingAskedForNewPasscode &&\n        [self _doesPasscodeExist]) {\n        // User trying to change passcode type while having passcode already\n        _isUserSwitchingBetweenPasscodeModes = YES;\n        // Display modified change passcode flow starting with input once passcode\n        // of current type and then 2 times new one of another type\n        [self showForChangingPasscodeInViewController:viewController\n                                              asModal:isModal];\n    }\n    else {\n        _isUserSwitchingBetweenPasscodeModes = NO;\n        _isSimple = isSimple;\n        [self.view setNeedsUpdateConstraints];\n    }\n}\n\n- (BOOL)isSimple {\n    // Is in process of changing, but not finished ->\n    // we need to display UI accordingly\n    if (_isUserSwitchingBetweenPasscodeModes &&\n        (_isUserBeingAskedForNewPasscode || _isUserConfirmingPasscode)) {\n        return !_isSimple;\n    }\n    \n    return _isSimple;\n}\n\n#pragma mark - Notification Observers\n- (void)_applicationDidEnterBackground {\n    //BELOW IS COMMENTED OUT BY TIMLEE\n    /*\n\tif ([self _doesPasscodeExist]) {\n\t\tif ([_passcodeTextField isFirstResponder])\n\t\t\t[_passcodeTextField resignFirstResponder];\n\t\t// Without animation because otherwise it won't come down fast enough,\n\t\t// so inside iOS' multitasking view the app won't be covered by anything.\n\t\tif ([self _timerDuration] <= 0) {\n            // This is here and the rest in willEnterForeground because when self is pushed\n            // instead of presented as a modal,\n            // the app would be visible from the multitasking view.\n            if (_isCurrentlyOnScreen && !_displayedAsModal) return;\n            \n            [self showLockScreenWithAnimation:NO\n                                   withLogout:NO\n                               andLogoutTitle:nil];\n        }\n\t\telse {\n\t\t\t_coverView.hidden = NO;\n\t\t\tif (![[UIApplication sharedApplication].keyWindow viewWithTag: _coverViewTag])\n\t\t\t\t[[UIApplication sharedApplication].keyWindow addSubview: _coverView];\n\t\t}\n\t}\n    //*/\n}\n\n\n- (void)_applicationDidBecomeActive {\n\t_coverView.hidden = YES;\n}\n\n\n- (void)_applicationWillEnterForeground {\n    /*\n\tif ([self _doesPasscodeExist] &&\n\t\t[self _didPasscodeTimerEnd]) {\n        // This is here instead of didEnterBackground because when self is pushed\n        // instead of presented as a modal,\n        // the app would be visible from the multitasking view.\n        if (!_displayedAsModal && !_displayedAsLockScreen && _isCurrentlyOnScreen) {\n            [_passcodeTextField resignFirstResponder];\n            [self.navigationController popViewControllerAnimated:NO];\n            // This is like this because it screws up the navigation stack otherwise\n            [self performSelector:@selector(showLockscreenWithoutAnimation)\n                       withObject:nil\n                       afterDelay:0.0];\n        }\n        else {\n            [self showLockScreenWithAnimation:NO\n                                   withLogout:NO\n                               andLogoutTitle:nil];\n        }\n\t}\n    //*/\n}\n\n\n- (void)_applicationWillResignActive {\n\tif ([self _doesPasscodeExist] && !([self isCurrentlyOnScreen] && [self displayedAsLockScreen])) {\n\t\t[self _saveTimerStartTime];\n\t}\n}\n\n\n#pragma mark - Init\n+ (instancetype)sharedUser {\n    __strong static LTHPasscodeViewController *sharedObject = nil;\n    \n\tstatic dispatch_once_t pred;\n\tdispatch_once(&pred, ^{\n\t\tsharedObject = [[LTHPasscodeViewController alloc] init];\n\t});\n\t\n\treturn sharedObject;\n}\n\n\n- (id)init {\n    self = [super init];\n    if (self) {\n        [self _commonInit];\n    }\n    return self;\n}\n\n\n- (id)initWithCoder:(NSCoder *)aDecoder {\n    self = [super initWithCoder:aDecoder];\n    if (self) {\n        [self _commonInit];\n    }\n    return self;\n}\n\n\n- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil {\n    self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];\n    if (self) {\n        [self _commonInit];\n    }\n    return self;\n}\n\n\n- (void)_commonInit {\n\t_isSimple = YES;\n\t[self _loadDefaults];\n\t[self _addObservers];\n}\n\n\n- (void)_loadDefaults {\n    [self _loadMiscDefaults];\n    [self _loadStringDefaults];\n    [self _loadGapDefaults];\n    [self _loadFontDefaults];\n    [self _loadColorDefaults];\n    [self _loadKeychainDefaults];\n}\n\n\n- (void)_loadMiscDefaults {\n    _coverViewTag = 994499;\n    _lockAnimationDuration = 0.25;\n    _slideAnimationDuration = 0.15;\n    _maxNumberOfAllowedFailedAttempts = 0;\n    _usesKeychain = YES;\n    _displayedAsModal = YES;\n    _hidesBackButton = YES;\n    _allowUnlockWithTouchID = YES;\n    _passcodeCharacter = @\"\\u2014\"; // A longer \"-\";\n    _localizationTableName = @\"LTHPasscodeViewController\";\n}\n\n\n- (void)_loadStringDefaults {\n    self.enterOldPasscodeString = @\"Enter your old passcode\";\n    self.enterPasscodeString = @\"Enter your passcode\";\n    self.enablePasscodeString = @\"Enable Passcode\";\n    self.changePasscodeString = @\"Change Passcode\";\n    self.turnOffPasscodeString = @\"Turn Off Passcode\";\n    self.reenterPasscodeString = @\"Re-enter your passcode\";\n    self.reenterNewPasscodeString = @\"Re-enter your new passcode\";\n    self.enterNewPasscodeString = @\"Enter your new passcode\";\n    self.touchIDString = @\"Unlock using Touch ID\";\n}\n\n\n- (void)_loadGapDefaults {\n    _iPadFontSizeModifier = 1.5;\n    _iPhoneHorizontalGap = 40.0;\n    _horizontalGap = UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad ? _iPhoneHorizontalGap * _iPadFontSizeModifier : _iPhoneHorizontalGap;\n    _verticalGap = UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad ? 60.0f : 25.0f;\n    _modifierForBottomVerticalGap = UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad ? 2.6f : 3.0f;\n    _failedAttemptLabelGap = _verticalGap * _modifierForBottomVerticalGap - 2.0f;\n    _passcodeOverlayHeight = UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad ? 96.0f : 40.0f;\n}\n\n\n- (void)_loadFontDefaults {\n    _labelFontSize = 15.0;\n    _passcodeFontSize = 33.0;\n    _labelFont = UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad ?\n    [UIFont fontWithName: @\"AvenirNext-Regular\" size:_labelFontSize * _iPadFontSizeModifier] :\n    [UIFont fontWithName: @\"AvenirNext-Regular\" size:_labelFontSize];\n    _passcodeFont = UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad ?\n    [UIFont fontWithName: @\"AvenirNext-Regular\" size: _passcodeFontSize * _iPadFontSizeModifier] :\n    [UIFont fontWithName: @\"AvenirNext-Regular\" size: _passcodeFontSize];\n}\n\n\n- (void)_loadColorDefaults {\n    // Backgrounds\n    _backgroundColor =  [UIColor colorWithRed:0.97f green:0.97f blue:1.0f alpha:1.00f];\n    _passcodeBackgroundColor = [UIColor clearColor];\n    _coverViewBackgroundColor = [UIColor colorWithRed:0.97f green:0.97f blue:1.0f alpha:1.00f];\n    _failedAttemptLabelBackgroundColor =  [UIColor colorWithRed:0.8f green:0.1f blue:0.2f alpha:1.000f];\n    _enterPasscodeLabelBackgroundColor = [UIColor clearColor];\n    \n    // Text\n    _labelTextColor = [UIColor colorWithWhite:0.31f alpha:1.0f];\n    _passcodeTextColor = [UIColor colorWithWhite:0.31f alpha:1.0f];\n    _failedAttemptLabelTextColor = [UIColor whiteColor];\n}\n\n\n- (void)_loadKeychainDefaults {\n    _keychainPasscodeUsername = @\"demoPasscode\";\n    _keychainTimerStartUsername = @\"demoPasscodeTimerStart\";\n    _keychainServiceName = @\"demoServiceName\";\n    _keychainTimerDurationUsername = @\"passcodeTimerDuration\";\n}\n\n\n- (void)_addObservers {\n    [[NSNotificationCenter defaultCenter]\n     addObserver: self\n     selector: @selector(_applicationDidEnterBackground)\n     name: UIApplicationDidEnterBackgroundNotification\n     object: nil];\n    [[NSNotificationCenter defaultCenter]\n     addObserver: self\n     selector: @selector(_applicationWillResignActive)\n     name: UIApplicationWillResignActiveNotification\n     object: nil];\n    [[NSNotificationCenter defaultCenter]\n     addObserver: self\n     selector: @selector(_applicationDidBecomeActive)\n     name: UIApplicationDidBecomeActiveNotification\n     object: nil];\n    [[NSNotificationCenter defaultCenter]\n     addObserver: self\n     selector: @selector(_applicationWillEnterForeground)\n     name: UIApplicationWillEnterForegroundNotification\n     object: nil];\n    [[NSNotificationCenter defaultCenter]\n     addObserver:self\n     selector:@selector(statusBarFrameOrOrientationChanged:)\n     name:UIApplicationDidChangeStatusBarOrientationNotification\n     object:nil];\n    [[NSNotificationCenter defaultCenter]\n     addObserver:self\n     selector:@selector(statusBarFrameOrOrientationChanged:)\n     name:UIApplicationDidChangeStatusBarFrameNotification\n     object:nil];\n}\n\n\n#pragma mark - Handling rotation\n- (NSUInteger)supportedInterfaceOrientations {\n\tif (_displayedAsLockScreen)\n        return LTHiOS8 ? UIInterfaceOrientationMaskPortrait : UIInterfaceOrientationMaskAll;\n\t// I'll be honest and mention I have no idea why this line of code below works.\n\t// Without it, if you present the passcode view as lockscreen (directly on the window)\n\t// and then inside of a modal, the orientation will be wrong.\n\t\n\t// If you could explain why, I'd be more than grateful :)\n\treturn UIInterfaceOrientationPortraitUpsideDown;\n}\n\n\n// All of the rotation handling is thanks to Håvard Fossli's - https://github.com/hfossli\n// answer: http://stackoverflow.com/a/4960988/793916\n- (void)statusBarFrameOrOrientationChanged:(NSNotification *)notification {\n    /*\n     This notification is most likely triggered inside an animation block,\n     therefore no animation is needed to perform this nice transition.\n     */\n    [self rotateAccordingToStatusBarOrientationAndSupportedOrientations];\n    if (LTHiOS8) {\n        _animatingView.frame = self.view.frame;\n    }\n    else {\n        if (UIInterfaceOrientationIsPortrait([UIApplication sharedApplication].statusBarOrientation)) {\n            _animatingView.frame = CGRectMake(0, 0, [UIApplication sharedApplication].keyWindow.frame.size.width, [UIApplication sharedApplication].keyWindow.frame.size.height);\n        }\n        else {\n            _animatingView.frame = CGRectMake(0, 0, [UIApplication sharedApplication].keyWindow.frame.size.height, [UIApplication sharedApplication].keyWindow.frame.size.width);\n        }\n    }\n}\n\n\n// And to his AGWindowView: https://github.com/hfossli/AGWindowView\n// Without the 'desiredOrientation' method, using showLockscreen in one orientation,\n// then presenting it inside a modal in another orientation would display\n// the view in the first orientation.\n- (UIInterfaceOrientation)desiredOrientation {\n    UIInterfaceOrientation statusBarOrientation =\n    [[UIApplication sharedApplication] statusBarOrientation];\n    UIInterfaceOrientationMask statusBarOrientationAsMask = UIInterfaceOrientationMaskFromOrientation(statusBarOrientation);\n    if(self.supportedInterfaceOrientations & statusBarOrientationAsMask) {\n        return statusBarOrientation;\n    }\n    else {\n        if(self.supportedInterfaceOrientations & UIInterfaceOrientationMaskPortrait) {\n            return UIInterfaceOrientationPortrait;\n        }\n        else if(self.supportedInterfaceOrientations & UIInterfaceOrientationMaskLandscapeLeft) {\n            return UIInterfaceOrientationLandscapeLeft;\n        }\n        else if(self.supportedInterfaceOrientations & UIInterfaceOrientationMaskLandscapeRight) {\n            return UIInterfaceOrientationLandscapeRight;\n        }\n        else {\n            return UIInterfaceOrientationPortraitUpsideDown;\n        }\n    }\n}\n\n\n- (void)rotateAccordingToStatusBarOrientationAndSupportedOrientations {\n\tUIInterfaceOrientation orientation = [self desiredOrientation];\n    CGFloat angle = UIInterfaceOrientationAngleOfOrientation(orientation);\n    CGAffineTransform transform = CGAffineTransformMakeRotation(angle);\n\t\n    [self setIfNotEqualTransform: transform\n\t\t\t\t\t\t   frame: self.view.window.bounds];\n}\n\n\n- (void)setIfNotEqualTransform:(CGAffineTransform)transform frame:(CGRect)frame {\n    if(!CGAffineTransformEqualToTransform(self.view.transform, transform)) {\n        self.view.transform = transform;\n    }\n    if(!CGRectEqualToRect(self.view.frame, frame)) {\n        self.view.frame = frame;\n    }\n}\n\n\n+ (CGFloat)getStatusBarHeight {\n    UIInterfaceOrientation orientation = [UIApplication sharedApplication].statusBarOrientation;\n    if (UIInterfaceOrientationIsLandscape(orientation)) {\n        return [UIApplication sharedApplication].statusBarFrame.size.width;\n    }\n    else {\n        return [UIApplication sharedApplication].statusBarFrame.size.height;\n    }\n}\n\n\nCGFloat UIInterfaceOrientationAngleOfOrientation(UIInterfaceOrientation orientation) {\n    CGFloat angle;\n\t\n    switch (orientation) {\n        case UIInterfaceOrientationPortraitUpsideDown:\n            angle = M_PI;\n            break;\n        case UIInterfaceOrientationLandscapeLeft:\n            angle = -M_PI_2;\n            break;\n        case UIInterfaceOrientationLandscapeRight:\n            angle = M_PI_2;\n            break;\n        default:\n            angle = 0.0;\n            break;\n    }\n\t\n    return angle;\n}\n\nUIInterfaceOrientationMask UIInterfaceOrientationMaskFromOrientation(UIInterfaceOrientation orientation) {\n    return 1 << orientation;\n}\n\n\n@end\n"
  },
  {
    "path": "ArcBit/External/Localizations/de.lproj/LTHPasscodeViewController.strings",
    "content": "/*\n LTHPasscodeViewController.strings\n */\n\"Enter Passcode\" = \"Pincode eingeben\";\n\n\"Enter your old passcode\" = \"Alten Pincode eingeben\";\n\n\"Enter your passcode\" = \"Geben Sie Ihren Pincode ein\";\n\n\"Enable Passcode\" = \"Pincode aktivieren\";\n\n\"Change Passcode\" = \"Pincode ändern\";\n\n\"Turn Off Passcode\" = \"Pincode deaktivieren\";\n\n\"Re-enter your passcode\" = \"Pincode wiederholen\";\n\n\"Re-enter your new passcode\" = \"Neuen Pincode wiederholen\";\n\n\"Enter your new passcode\" = \"Geben Sie Ihren neuen Pincode ein\";\n\n\"Passcodes did not match. Try again.\" = \"Pincodes nicht ident. Bitte nochmals versuchen.\";\n\n\"1 Passcode Failed Attempt\" = \"1 fehlgeschlagener Eingabeversuch\";\n\n\"%i Passcode Failed Attempts\" = \"%i fehlgeschlagene Eingabeversuche\";"
  },
  {
    "path": "ArcBit/External/Localizations/en.lproj/LTHPasscodeViewController.strings",
    "content": "/*\n LTHPasscodeViewController.strings\n */\n\"Enter Passcode\" = \"Enter Passcode\";\n\n\"Enter your old passcode\" = \"Enter your old passcode\";\n\n\"Enter your passcode\" = \"Enter your passcode\";\n\n\"Enable Passcode\" = \"Enable Passcode\";\n\n\"Change Passcode\" = \"Change Passcode\";\n\n\"Turn Off Passcode\" = \"Turn Off Passcode\";\n\n\"Re-enter your passcode\" = \"Re-enter your passcode\";\n\n\"Re-enter your new passcode\" = \"Re-enter your new passcode\";\n\n\"Enter your new passcode\" = \"Enter your new passcode\";\n\n\"Passcodes did not match. Try again.\" = \"Passcodes did not match. Try again.\";\n\n\"1 Passcode Failed Attempt\" = \"1 Passcode Failed Attempt\";\n\n\"%i Passcode Failed Attempts\" = \"%i Passcode Failed Attempts\";"
  },
  {
    "path": "ArcBit/External/Localizations/es.lproj/LTHPasscodeViewController.strings",
    "content": "/*\n LTHPasscodeViewController.strings\n */\n\"Enter Passcode\" = \"Insertar contraseña\";\n\n\"Enter your old passcode\" = \"Insertar contraseña antigua\";\n\n\"Enter your passcode\" = \"Inserte su contraseña\";\n\n\"Enable Passcode\" = \"Activar contraseña\";\n\n\"Change Passcode\" = \"Cambiar contraseña\";\n\n\"Turn Off Passcode\" = \"Desactivar contraseña\";\n\n\"Re-enter your passcode\" = \"Repetir contraseña\";\n\n\"Re-enter your new passcode\" = \"Repetir contraseña nueva\";\n\n\"Enter your new passcode\" = \"Inserte su contraseña nueva\";\n\n\"Passcodes did not match. Try again.\" = \"Contraseña no son iguales. Por favor tratalo otra vez.\";\n\n\"1 Passcode Failed Attempt\" = \"1 inteto de entrada falló\";\n\n\"%i Passcode Failed Attempts\" = \"%i intentos de entrada fallaron\";"
  },
  {
    "path": "ArcBit/External/Localizations/fr.lproj/LTHPasscodeViewController.strings",
    "content": "/*\n LTHPasscodeViewController.strings\n */\n\"Enter Passcode\" = \"Entrer votre mot de passe\";\n\n\"Enter your old passcode\" = \"Entrer votre ancien mot de passe\";\n\n\"Enter your passcode\" = \"Entrer votre mot de passe\";\n\n\"Enable Passcode\" = \"Enter votre mot de passe\";\n\n\"Change Passcode\" = \"Changer votre mot de passe\";\n\n\"Turn Off Passcode\" = \"Supprimer votre mot de passe\";\n\n\"Re-enter your passcode\" = \"Réentrer votre mot de passe\";\n\n\"Re-enter your new passcode\" = \"Réentrer votre nouveau mot de passe\";\n\n\"Enter your new passcode\" = \"Entrer votre nouveau mot de passe\";\n\n\"Passcodes did not match. Try again.\" = \"Les mots de passe ne correspondent pas. Essayer à nouveau.\";\n\n\"1 Passcode Failed Attempt\" = \"1 échec\";\n\n\"%i Passcode Failed Attempts\" = \"%i échecs\";"
  },
  {
    "path": "ArcBit/External/Localizations/ja.lproj/LTHPasscodeViewController.strings",
    "content": "/*\n LTHPasscodeViewController.strings\n */\n\"Enter Passcode\" = \"パスコードを入力\";\n\n\"Enter your old passcode\" = \"古いパスコードを入力\";\n\n\"Enter your passcode\" = \"パスコードを入力\";\n\n\"Enable Passcode\" = \"パスコードを設定\";\n\n\"Change Passcode\" = \"パスコードを変更\";\n\n\"Turn Off Passcode\" = \"パスコードをオフ\";\n\n\"Re-enter your passcode\" = \"パスコードを再入力\";\n\n\"Re-enter your new passcode\" = \"新しいパスコードを再入力\";\n\n\"Enter your new passcode\" = \"新しいパスコードを入力\";\n\n\"Passcodes did not match. Try again.\" = \"パスコードが一致しません。\\nもう一度入力してください。\";\n\n\"1 Passcode Failed Attempt\" = \"パスコード入力に1回失敗\";\n\n\"%i Passcode Failed Attempts\" = \"パスコード入力に%i回失敗\";"
  },
  {
    "path": "ArcBit/External/Localizations/ro.lproj/LTHPasscodeViewController.strings",
    "content": "/*\n LTHPasscodeViewController.strings\n */\n\"Enter Passcode\" = \"Introduceți parola\";\n\n\"Enter your old passcode\" = \"Introduceți parola veche\";\n\n\"Enter your passcode\" = \"Introduceți parola\";\n\n\"Enable Passcode\" = \"Activați parola\";\n\n\"Change Passcode\" = \"Schimbați parola\";\n\n\"Turn Off Passcode\" = \"Dezactivați parola\";\n\n\"Re-enter your passcode\" = \"Reintroduceți parola\";\n\n\"Re-enter your new passcode\" = \"Reintroduceți parola nouă\";\n\n\"Enter your new passcode\" = \"Introduceți parola nouă\";\n\n\"Passcodes did not match. Try again.\" = \"Parolele nu coincid. Incercați din nou.\";\n\n\"1 Passcode Failed Attempt\" = \"1 încercare eșuată\";\n\n\"%i Passcode Failed Attempts\" = \"%i încercări eșuate\";"
  },
  {
    "path": "ArcBit/External/Localizations/ru.lproj/LTHPasscodeViewController.strings",
    "content": "/*\n LTHPasscodeViewController.strings\n */\n\"Enter Passcode\" = \"Введите пароль\";\n\n\"Enter your old passcode\" = \"Введите старый пароль\";\n\n\"Enter your passcode\" = \"Введите свой пароль\";\n\n\"Enable Passcode\" = \"Включить пароль\";\n\n\"Change Passcode\" = \"Изменить пароль\";\n\n\"Turn Off Passcode\" = \"Выключить пароль\";\n\n\"Re-enter your passcode\" = \"Повторно введите пароль\";\n\n\"Re-enter your new passcode\" = \"Повторно введите новый пароль\";\n\n\"Enter your new passcode\" = \"Введите новый пароль\";\n\n\"Passcodes did not match. Try again.\" = \"Пароли не совпадают. Попробуйте снова.\";\n\n\"1 Passcode Failed Attempt\" = \"1 Неудачная попытка ввода пароля\";\n\n\"%i Passcode Failed Attempts\" = \"%i Неудачная попытка \";"
  },
  {
    "path": "ArcBit/External/Localizations/zh-Hans-CN.lproj/LTHPasscodeViewController.strings",
    "content": "/*\n LTHPasscodeViewController.strings\n */\n\"Enter Passcode\" = \"输入密码\";\n\n\"Enter your old passcode\" = \"输入老的密码\";\n\n\"Enter your passcode\" = \"输入你的密码\";\n\n\"Enable Passcode\" = \"启用密码\";\n\n\"Change Passcode\" = \"改密码\";\n\n\"Turn Off Passcode\" = \"不启用密码\";\n\n\"Re-enter your passcode\" = \"重新输入你的密码\";\n\n\"Re-enter your new passcode\" = \"重新输入你的新密码\";\n\n\"Enter your new passcode\" = \"输入你的新密码\";\n\n\"Passcodes did not match. Try again.\" = \"密码不正确，请重试！\";\n\n\"1 Passcode Failed Attempt\" = \"密码尝试失败一次\";\n\n\"%i Passcode Failed Attempts\" = \"%i 次密码尝试失败\";"
  },
  {
    "path": "ArcBit/External/Localizations/zh-Hant.lproj/LTHPasscodeViewController.strings",
    "content": "/*\n LTHPasscodeViewController.strings\n */\n\"Enter Passcode\" = \"輸入密碼\";\n\n\"Enter your old passcode\" = \"輸入您的舊密碼\";\n\n\"Enter your passcode\" = \"輸入您的密碼\";\n\n\"Enable Passcode\" = \"啟用密碼\";\n\n\"Change Passcode\" = \"更改密碼\";\n\n\"Turn Off Passcode\" = \"關閉密碼\";\n\n\"Re-enter your passcode\" = \"重新輸入您的密碼\";\n\n\"Re-enter your new passcode\" = \"重新輸入新的密碼\";\n\n\"Enter your new passcode\" = \"輸入新的密碼\";\n\n\"Passcodes did not match. Try again.\" = \"密碼不匹配。再試一次\";\n\n\"1 Passcode Failed Attempt\" = \"密碼嘗試失敗一次\";\n\n\"%i Passcode Failed Attempts\" = \"%i 次密碼失敗嘗試\";\n"
  },
  {
    "path": "ArcBit/External/MySocketRocketExtras/SRWebSocket+Helpers.h",
    "content": "//\n//  SRWebSocket+Helpers.h\n//  ArcBit\n//\n//  Created by Timothy Lee on 3/14/15.\n//  Copyright (c) 2015 Timothy Lee <stequald01@gmail.com>\n//\n//   This library is free software; you can redistribute it and/or\n//   modify it under the terms of the GNU Lesser General Public\n//   License as published by the Free Software Foundation; either\n//   version 2.1 of the License, or (at your option) any later version.\n//\n//   This library is distributed in the hope that it will be useful,\n//   but WITHOUT ANY WARRANTY; without even the implied warranty of\n//   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n//   Lesser General Public License for more details.\n//\n//   You should have received a copy of the GNU Lesser General Public\n//   License along with this library; if not, write to the Free Software\n//   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,\n//   MA 02110-1301  USA\n\n#import \"SRWebSocket.h\"\n\n@interface SRWebSocket (Helpers)\n\n+ (NSMutableURLRequest*)createURLRequest:(NSString*)urlString withPinnedCert:(NSData*)certData;\n\n@end\n"
  },
  {
    "path": "ArcBit/External/MySocketRocketExtras/SRWebSocket+Helpers.m",
    "content": "//\n//  SRWebSocket+Helpers.m\n//  ArcBit\n//\n//  Created by Timothy Lee on 3/14/15.\n//  Copyright (c) 2015 Timothy Lee <stequald01@gmail.com>\n//\n//   This library is free software; you can redistribute it and/or\n//   modify it under the terms of the GNU Lesser General Public\n//   License as published by the Free Software Foundation; either\n//   version 2.1 of the License, or (at your option) any later version.\n//\n//   This library is distributed in the hope that it will be useful,\n//   but WITHOUT ANY WARRANTY; without even the implied warranty of\n//   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n//   Lesser General Public License for more details.\n//\n//   You should have received a copy of the GNU Lesser General Public\n//   License along with this library; if not, write to the Free Software\n//   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,\n//   MA 02110-1301  USA\n\n#import \"SRWebSocket+Helpers.h\"\n\n@implementation SRWebSocket (Helpers)\n\n+ (NSMutableURLRequest*)createURLRequest:(NSString*)urlString withPinnedCert:(NSData*)certData  {\n    NSMutableURLRequest *request = [[NSMutableURLRequest alloc] initWithURL:[NSURL URLWithString:urlString]];\n    if (certData != nil) {\n        CFDataRef certDataRef = (__bridge CFDataRef)certData;\n        SecCertificateRef certRef = SecCertificateCreateWithData(NULL, certDataRef);\n        id certificate = (__bridge id)certRef;\n        [request setSR_SSLPinnedCertificates:@[certificate]];        \n    }\n    return request;\n}\n\n@end\n"
  },
  {
    "path": "ArcBit/External/NSDate-Extensions/NSDate-Utilities.h",
    "content": "/*\n Erica Sadun, http://ericasadun.com\n iPhone Developer's Cookbook 3.x and beyond\n BSD License, Use at your own risk\n */\n\n#import <Foundation/Foundation.h>\n\n#define D_MINUTE\t60\n#define D_HOUR\t\t3600\n#define D_DAY\t\t86400\n#define D_WEEK\t\t604800\n#define D_YEAR\t\t31556926\n\n@interface NSDate (Utilities)\n\n// Relative dates from the current date\n+ (NSDate *) dateTomorrow;\n+ (NSDate *) dateYesterday;\n+ (NSDate *) dateWithDaysFromNow: (NSInteger) days;\n+ (NSDate *) dateWithDaysBeforeNow: (NSInteger) days;\n+ (NSDate *) dateWithHoursFromNow: (NSInteger) dHours;\n+ (NSDate *) dateWithHoursBeforeNow: (NSInteger) dHours;\n+ (NSDate *) dateWithMinutesFromNow: (NSInteger) dMinutes;\n+ (NSDate *) dateWithMinutesBeforeNow: (NSInteger) dMinutes;\n\n// Comparing dates\n- (BOOL) isEqualToDateIgnoringTime: (NSDate *) aDate;\n- (BOOL) isToday;\n- (BOOL) isTomorrow;\n- (BOOL) isYesterday;\n- (BOOL) isSameWeekAsDate: (NSDate *) aDate;\n- (BOOL) isThisWeek;\n- (BOOL) isNextWeek;\n- (BOOL) isLastWeek;\n- (BOOL) isSameMonthAsDate: (NSDate *) aDate; \n- (BOOL) isThisMonth;\n- (BOOL) isSameYearAsDate: (NSDate *) aDate;\n- (BOOL) isThisYear;\n- (BOOL) isNextYear;\n- (BOOL) isLastYear;\n- (BOOL) isEarlierThanDate: (NSDate *) aDate;\n- (BOOL) isLaterThanDate: (NSDate *) aDate;\n- (BOOL) isInFuture;\n- (BOOL) isInPast;\n\n// Date roles\n- (BOOL) isTypicallyWorkday;\n- (BOOL) isTypicallyWeekend;\n\n// Adjusting dates\n- (NSDate *) dateByAddingDays: (NSInteger) dDays;\n- (NSDate *) dateBySubtractingDays: (NSInteger) dDays;\n- (NSDate *) dateByAddingHours: (NSInteger) dHours;\n- (NSDate *) dateBySubtractingHours: (NSInteger) dHours;\n- (NSDate *) dateByAddingMinutes: (NSInteger) dMinutes;\n- (NSDate *) dateBySubtractingMinutes: (NSInteger) dMinutes;\n- (NSDate *) dateAtStartOfDay;\n\n// Retrieving intervals\n- (NSInteger) minutesAfterDate: (NSDate *) aDate;\n- (NSInteger) minutesBeforeDate: (NSDate *) aDate;\n- (NSInteger) hoursAfterDate: (NSDate *) aDate;\n- (NSInteger) hoursBeforeDate: (NSDate *) aDate;\n- (NSInteger) daysAfterDate: (NSDate *) aDate;\n- (NSInteger) daysBeforeDate: (NSDate *) aDate;\n- (NSInteger)distanceInDaysToDate:(NSDate *)anotherDate;\n\n// Decomposing dates\n@property (readonly) NSInteger nearestHour;\n@property (readonly) NSInteger hour;\n@property (readonly) NSInteger minute;\n@property (readonly) NSInteger seconds;\n@property (readonly) NSInteger day;\n@property (readonly) NSInteger month;\n@property (readonly) NSInteger week;\n@property (readonly) NSInteger weekday;\n@property (readonly) NSInteger nthWeekday; // e.g. 2nd Tuesday of the month == 2\n@property (readonly) NSInteger year;\n@end\n"
  },
  {
    "path": "ArcBit/External/NSDate-Extensions/NSDate-Utilities.m",
    "content": "/*\n Erica Sadun, http://ericasadun.com\n iPhone Developer's Cookbook 3.x and beyond\n BSD License, Use at your own risk\n */\n\n/*\n #import <humor.h> : Not planning to implement: dateByAskingBoyOut and dateByGettingBabysitter\n ----\n General Thanks: sstreza, Scott Lawrence, Kevin Ballard, NoOneButMe, Avi`, August Joki. Emanuele Vulcano, jcromartiej, Blagovest Dachev, Matthias Plappert,  Slava Bushtruk, Ali Servet Donmez, Ricardo1980, pip8786, Danny Thuerin, Dennis Madsen\n*/\n\n#import \"NSDate-Utilities.h\"\n\n#define DATE_COMPONENTS (NSYearCalendarUnit| NSMonthCalendarUnit | NSDayCalendarUnit | NSWeekCalendarUnit |  NSHourCalendarUnit | NSMinuteCalendarUnit | NSSecondCalendarUnit | NSWeekdayCalendarUnit | NSWeekdayOrdinalCalendarUnit)\n#define CURRENT_CALENDAR [NSCalendar currentCalendar]\n\n@implementation NSDate (Utilities)\n\n#pragma mark Relative Dates\n\n+ (NSDate *) dateWithDaysFromNow: (NSInteger) days\n{\n    // Thanks, Jim Morrison\n\treturn [[NSDate date] dateByAddingDays:days];\n}\n\n+ (NSDate *) dateWithDaysBeforeNow: (NSInteger) days\n{\n    // Thanks, Jim Morrison\n\treturn [[NSDate date] dateBySubtractingDays:days];\n}\n\n+ (NSDate *) dateTomorrow\n{\n\treturn [NSDate dateWithDaysFromNow:1];\n}\n\n+ (NSDate *) dateYesterday\n{\n\treturn [NSDate dateWithDaysBeforeNow:1];\n}\n\n+ (NSDate *) dateWithHoursFromNow: (NSInteger) dHours\n{\n\tNSTimeInterval aTimeInterval = [[NSDate date] timeIntervalSinceReferenceDate] + D_HOUR * dHours;\n\tNSDate *newDate = [NSDate dateWithTimeIntervalSinceReferenceDate:aTimeInterval];\n\treturn newDate;\t\n}\n\n+ (NSDate *) dateWithHoursBeforeNow: (NSInteger) dHours\n{\n\tNSTimeInterval aTimeInterval = [[NSDate date] timeIntervalSinceReferenceDate] - D_HOUR * dHours;\n\tNSDate *newDate = [NSDate dateWithTimeIntervalSinceReferenceDate:aTimeInterval];\n\treturn newDate;\t\n}\n\n+ (NSDate *) dateWithMinutesFromNow: (NSInteger) dMinutes\n{\n\tNSTimeInterval aTimeInterval = [[NSDate date] timeIntervalSinceReferenceDate] + D_MINUTE * dMinutes;\n\tNSDate *newDate = [NSDate dateWithTimeIntervalSinceReferenceDate:aTimeInterval];\n\treturn newDate;\t\t\n}\n\n+ (NSDate *) dateWithMinutesBeforeNow: (NSInteger) dMinutes\n{\n\tNSTimeInterval aTimeInterval = [[NSDate date] timeIntervalSinceReferenceDate] - D_MINUTE * dMinutes;\n\tNSDate *newDate = [NSDate dateWithTimeIntervalSinceReferenceDate:aTimeInterval];\n\treturn newDate;\t\t\n}\n\n#pragma mark Comparing Dates\n\n- (BOOL) isEqualToDateIgnoringTime: (NSDate *) aDate\n{\n\tNSDateComponents *components1 = [CURRENT_CALENDAR components:DATE_COMPONENTS fromDate:self];\n\tNSDateComponents *components2 = [CURRENT_CALENDAR components:DATE_COMPONENTS fromDate:aDate];\n\treturn ((components1.year == components2.year) &&\n\t\t\t(components1.month == components2.month) && \n\t\t\t(components1.day == components2.day));\n}\n\n- (BOOL) isToday\n{\n\treturn [self isEqualToDateIgnoringTime:[NSDate date]];\n}\n\n- (BOOL) isTomorrow\n{\n\treturn [self isEqualToDateIgnoringTime:[NSDate dateTomorrow]];\n}\n\n- (BOOL) isYesterday\n{\n\treturn [self isEqualToDateIgnoringTime:[NSDate dateYesterday]];\n}\n\n// This hard codes the assumption that a week is 7 days\n- (BOOL) isSameWeekAsDate: (NSDate *) aDate\n{\n\tNSDateComponents *components1 = [CURRENT_CALENDAR components:DATE_COMPONENTS fromDate:self];\n\tNSDateComponents *components2 = [CURRENT_CALENDAR components:DATE_COMPONENTS fromDate:aDate];\n\t\n\t// Must be same week. 12/31 and 1/1 will both be week \"1\" if they are in the same week\n\tif (components1.week != components2.week) return NO;\n\t\n\t// Must have a time interval under 1 week. Thanks @aclark\n\treturn (abs([self timeIntervalSinceDate:aDate]) < D_WEEK);\n}\n\n- (BOOL) isThisWeek\n{\n\treturn [self isSameWeekAsDate:[NSDate date]];\n}\n\n- (BOOL) isNextWeek\n{\n\tNSTimeInterval aTimeInterval = [[NSDate date] timeIntervalSinceReferenceDate] + D_WEEK;\n\tNSDate *newDate = [NSDate dateWithTimeIntervalSinceReferenceDate:aTimeInterval];\n\treturn [self isSameWeekAsDate:newDate];\n}\n\n- (BOOL) isLastWeek\n{\n\tNSTimeInterval aTimeInterval = [[NSDate date] timeIntervalSinceReferenceDate] - D_WEEK;\n\tNSDate *newDate = [NSDate dateWithTimeIntervalSinceReferenceDate:aTimeInterval];\n\treturn [self isSameWeekAsDate:newDate];\n}\n\n// Thanks, mspasov\n- (BOOL) isSameMonthAsDate: (NSDate *) aDate\n{\n    NSDateComponents *components1 = [CURRENT_CALENDAR components:NSYearCalendarUnit | NSMonthCalendarUnit fromDate:self];\n    NSDateComponents *components2 = [CURRENT_CALENDAR components:NSYearCalendarUnit | NSMonthCalendarUnit fromDate:aDate];\n    return ((components1.month == components2.month) &&\n            (components1.year == components2.year));\n}\n\n- (BOOL) isThisMonth\n{\n    return [self isSameMonthAsDate:[NSDate date]];\n}\n\n- (BOOL) isSameYearAsDate: (NSDate *) aDate\n{\n\tNSDateComponents *components1 = [CURRENT_CALENDAR components:NSYearCalendarUnit fromDate:self];\n\tNSDateComponents *components2 = [CURRENT_CALENDAR components:NSYearCalendarUnit fromDate:aDate];\n\treturn (components1.year == components2.year);\n}\n\n- (BOOL) isThisYear\n{\n    // Thanks, baspellis\n\treturn [self isSameYearAsDate:[NSDate date]];\n}\n\n- (BOOL) isNextYear\n{\n\tNSDateComponents *components1 = [CURRENT_CALENDAR components:NSYearCalendarUnit fromDate:self];\n\tNSDateComponents *components2 = [CURRENT_CALENDAR components:NSYearCalendarUnit fromDate:[NSDate date]];\n\t\n\treturn (components1.year == (components2.year + 1));\n}\n\n- (BOOL) isLastYear\n{\n\tNSDateComponents *components1 = [CURRENT_CALENDAR components:NSYearCalendarUnit fromDate:self];\n\tNSDateComponents *components2 = [CURRENT_CALENDAR components:NSYearCalendarUnit fromDate:[NSDate date]];\n\t\n\treturn (components1.year == (components2.year - 1));\n}\n\n- (BOOL) isEarlierThanDate: (NSDate *) aDate\n{\n\treturn ([self compare:aDate] == NSOrderedAscending);\n}\n\n- (BOOL) isLaterThanDate: (NSDate *) aDate\n{\n\treturn ([self compare:aDate] == NSOrderedDescending);\n}\n\n// Thanks, markrickert\n- (BOOL) isInFuture\n{\n    return ([self isLaterThanDate:[NSDate date]]);\n}\n\n// Thanks, markrickert\n- (BOOL) isInPast\n{\n    return ([self isEarlierThanDate:[NSDate date]]);\n}\n\n\n#pragma mark Roles\n- (BOOL) isTypicallyWeekend\n{\n    NSDateComponents *components = [CURRENT_CALENDAR components:NSWeekdayCalendarUnit fromDate:self];\n    if ((components.weekday == 1) ||\n        (components.weekday == 7))\n        return YES;\n    return NO;\n}\n\n- (BOOL) isTypicallyWorkday\n{\n    return ![self isTypicallyWeekend];\n}\n\n#pragma mark Adjusting Dates\n\n- (NSDate *) dateByAddingDays: (NSInteger) dDays\n{\n\tNSTimeInterval aTimeInterval = [self timeIntervalSinceReferenceDate] + D_DAY * dDays;\n\tNSDate *newDate = [NSDate dateWithTimeIntervalSinceReferenceDate:aTimeInterval];\n\treturn newDate;\t\t\n}\n\n- (NSDate *) dateBySubtractingDays: (NSInteger) dDays\n{\n\treturn [self dateByAddingDays: (dDays * -1)];\n}\n\n- (NSDate *) dateByAddingHours: (NSInteger) dHours\n{\n\tNSTimeInterval aTimeInterval = [self timeIntervalSinceReferenceDate] + D_HOUR * dHours;\n\tNSDate *newDate = [NSDate dateWithTimeIntervalSinceReferenceDate:aTimeInterval];\n\treturn newDate;\t\t\n}\n\n- (NSDate *) dateBySubtractingHours: (NSInteger) dHours\n{\n\treturn [self dateByAddingHours: (dHours * -1)];\n}\n\n- (NSDate *) dateByAddingMinutes: (NSInteger) dMinutes\n{\n\tNSTimeInterval aTimeInterval = [self timeIntervalSinceReferenceDate] + D_MINUTE * dMinutes;\n\tNSDate *newDate = [NSDate dateWithTimeIntervalSinceReferenceDate:aTimeInterval];\n\treturn newDate;\t\t\t\n}\n\n- (NSDate *) dateBySubtractingMinutes: (NSInteger) dMinutes\n{\n\treturn [self dateByAddingMinutes: (dMinutes * -1)];\n}\n\n- (NSDate *) dateAtStartOfDay\n{\n\tNSDateComponents *components = [CURRENT_CALENDAR components:DATE_COMPONENTS fromDate:self];\n\tcomponents.hour = 0;\n\tcomponents.minute = 0;\n\tcomponents.second = 0;\n\treturn [CURRENT_CALENDAR dateFromComponents:components];\n}\n\n- (NSDateComponents *) componentsWithOffsetFromDate: (NSDate *) aDate\n{\n\tNSDateComponents *dTime = [CURRENT_CALENDAR components:DATE_COMPONENTS fromDate:aDate toDate:self options:0];\n\treturn dTime;\n}\n\n#pragma mark Retrieving Intervals\n\n- (NSInteger) minutesAfterDate: (NSDate *) aDate\n{\n\tNSTimeInterval ti = [self timeIntervalSinceDate:aDate];\n\treturn (NSInteger) (ti / D_MINUTE);\n}\n\n- (NSInteger) minutesBeforeDate: (NSDate *) aDate\n{\n\tNSTimeInterval ti = [aDate timeIntervalSinceDate:self];\n\treturn (NSInteger) (ti / D_MINUTE);\n}\n\n- (NSInteger) hoursAfterDate: (NSDate *) aDate\n{\n\tNSTimeInterval ti = [self timeIntervalSinceDate:aDate];\n\treturn (NSInteger) (ti / D_HOUR);\n}\n\n- (NSInteger) hoursBeforeDate: (NSDate *) aDate\n{\n\tNSTimeInterval ti = [aDate timeIntervalSinceDate:self];\n\treturn (NSInteger) (ti / D_HOUR);\n}\n\n- (NSInteger) daysAfterDate: (NSDate *) aDate\n{\n\tNSTimeInterval ti = [self timeIntervalSinceDate:aDate];\n\treturn (NSInteger) (ti / D_DAY);\n}\n\n- (NSInteger) daysBeforeDate: (NSDate *) aDate\n{\n\tNSTimeInterval ti = [aDate timeIntervalSinceDate:self];\n\treturn (NSInteger) (ti / D_DAY);\n}\n\n// Thanks, dmitrydims\n// I have not yet thoroughly tested this\n- (NSInteger)distanceInDaysToDate:(NSDate *)anotherDate\n{\n    NSCalendar *gregorianCalendar = [[NSCalendar alloc] initWithCalendarIdentifier:NSGregorianCalendar];\n    NSDateComponents *components = [gregorianCalendar components:NSDayCalendarUnit fromDate:self toDate:anotherDate options:0];\n    return components.day;\n}\n\n#pragma mark Decomposing Dates\n\n- (NSInteger) nearestHour\n{\n\tNSTimeInterval aTimeInterval = [[NSDate date] timeIntervalSinceReferenceDate] + D_MINUTE * 30;\n\tNSDate *newDate = [NSDate dateWithTimeIntervalSinceReferenceDate:aTimeInterval];\n\tNSDateComponents *components = [CURRENT_CALENDAR components:NSHourCalendarUnit fromDate:newDate];\n\treturn components.hour;\n}\n\n- (NSInteger) hour\n{\n\tNSDateComponents *components = [CURRENT_CALENDAR components:DATE_COMPONENTS fromDate:self];\n\treturn components.hour;\n}\n\n- (NSInteger) minute\n{\n\tNSDateComponents *components = [CURRENT_CALENDAR components:DATE_COMPONENTS fromDate:self];\n\treturn components.minute;\n}\n\n- (NSInteger) seconds\n{\n\tNSDateComponents *components = [CURRENT_CALENDAR components:DATE_COMPONENTS fromDate:self];\n\treturn components.second;\n}\n\n- (NSInteger) day\n{\n\tNSDateComponents *components = [CURRENT_CALENDAR components:DATE_COMPONENTS fromDate:self];\n\treturn components.day;\n}\n\n- (NSInteger) month\n{\n\tNSDateComponents *components = [CURRENT_CALENDAR components:DATE_COMPONENTS fromDate:self];\n\treturn components.month;\n}\n\n- (NSInteger) week\n{\n\tNSDateComponents *components = [CURRENT_CALENDAR components:DATE_COMPONENTS fromDate:self];\n\treturn components.week;\n}\n\n- (NSInteger) weekday\n{\n\tNSDateComponents *components = [CURRENT_CALENDAR components:DATE_COMPONENTS fromDate:self];\n\treturn components.weekday;\n}\n\n- (NSInteger) nthWeekday // e.g. 2nd Tuesday of the month is 2\n{\n\tNSDateComponents *components = [CURRENT_CALENDAR components:DATE_COMPONENTS fromDate:self];\n\treturn components.weekdayOrdinal;\n}\n\n- (NSInteger) year\n{\n\tNSDateComponents *components = [CURRENT_CALENDAR components:DATE_COMPONENTS fromDate:self];\n\treturn components.year;\n}\n@end\n"
  },
  {
    "path": "ArcBit/External/QRCodeEncoderObjectiveCAtGithub/DataMatrix.h",
    "content": "\n\n#import <Foundation/Foundation.h>\n\n\n@interface DataMatrix : NSObject {\n    \n    int dim;\n    bool** data;\n\n}\n\n- (id)initWith:(int)dimension;\n\n- (int)dimension;\n\n- (void)set:(bool)value x:(int)x y:(int)y;\n\n- (bool)valueAt:(int)x y:(int)y;\n\n- (NSString*)toString;\n\n@end\n"
  },
  {
    "path": "ArcBit/External/QRCodeEncoderObjectiveCAtGithub/DataMatrix.mm",
    "content": "\n\n#import \"DataMatrix.h\"\n\n\n@implementation DataMatrix\n\n- (id)initWith:(int)dimension {\n    if ([super init]) {\n        self->dim = dimension;\n        self->data = (bool**)malloc(sizeof(bool*) * self->dim);\n        for (int y=0; y<self->dim; y++) {\n            self->data[y] = (bool*)malloc(sizeof(bool) * self->dim);\n            if (self->data[y]==NULL) {\n                NSLog(@\"null!\");\n            }\n        }\n        \n    }\n    return self;\n}\n\n- (int)dimension {\n    return self->dim;\n}\n\n- (void)set:(bool)value x:(int)x y:(int)y {\n    self->data[y][x] = value;\n}\n\n- (bool)valueAt:(int)x y:(int)y {\n    return self->data[y][x];\n}\n\n- (NSString*)toString {\n    NSString* string = [NSString string];\n    for (int y=0; y<self->dim; y++) {\n        for (int x=0; x<self->dim; x++) {\n            bool value = self->data[y][x];\n            string = [string stringByAppendingFormat:@\"%d\", value];\n        }\n        string = [string stringByAppendingString:@\"\\n\"];\n    }\n    return string;\n}\n\n- (void)dealloc {\n    for (int y=0; y<self->dim; y++) {\n        free(self->data[y]);\n    }\n    free(self->data);\n    [super dealloc];\n}\n\n@end\n"
  },
  {
    "path": "ArcBit/External/QRCodeEncoderObjectiveCAtGithub/QRCodeEncoderDemoViewController.h",
    "content": "//\n//  QRCodeDemoViewController.h\n//  QRCodeEncoderObjectiveCAtGithub\n//\n//\n\n#import <UIKit/UIKit.h>\n#import \"QREncoder.h\"\n#import \"DataMatrix.h\"\n\n@interface QRCodeEncoderDemoViewController : UIViewController {\n    \n}\n\n@end\n"
  },
  {
    "path": "ArcBit/External/QRCodeEncoderObjectiveCAtGithub/QRCodeEncoderDemoViewController.mm",
    "content": "\n\n#import \"QRCodeEncoderDemoViewController.h\"\n\n\n@implementation QRCodeEncoderDemoViewController\n\n- (void)dealloc\n{\n    [super dealloc];\n}\n\n#pragma mark - View lifecycle\n\n- (void)viewDidLoad\n{\n    [super viewDidLoad];\n    \n    \n    //the qrcode is square. now we make it 250 pixels wide\n    int qrcodeImageDimension = 250;\n    \n    //the string can be very long\n    NSString* aVeryLongURL = @\"http://thelongestlistofthelongeststuffatthelongestdomainnameatlonglast.com/\";\n    \n    //first encode the string into a matrix of bools, TRUE for black dot and FALSE for white. Let the encoder decide the error correction level and version\n    DataMatrix* qrMatrix = [QREncoder encodeWithECLevel:QR_ECLEVEL_AUTO version:QR_VERSION_AUTO string:aVeryLongURL];\n    \n    //then render the matrix\n    UIImage* qrcodeImage = [QREncoder renderDataMatrix:qrMatrix imageDimension:qrcodeImageDimension];\n    \n    //put the image into the view\n    UIImageView* qrcodeImageView = [[UIImageView alloc] initWithImage:qrcodeImage];\n    CGRect parentFrame = self.view.frame;\n    CGRect tabBarFrame = self.tabBarController.tabBar.frame;\n    \n    //center the image\n    CGFloat x = (parentFrame.size.width - qrcodeImageDimension) / 2.0;\n    CGFloat y = (parentFrame.size.height - qrcodeImageDimension - tabBarFrame.size.height) / 2.0;\n    CGRect qrcodeImageViewFrame = CGRectMake(x, y, qrcodeImageDimension, qrcodeImageDimension);\n    [qrcodeImageView setFrame:qrcodeImageViewFrame];\n    \n    //and that's it!\n    [self.view addSubview:qrcodeImageView];\n    [qrcodeImageView release];\n}\n\n@end\n"
  },
  {
    "path": "ArcBit/External/QRCodeEncoderObjectiveCAtGithub/QRCodeEncoderObjectiveCAtGithub-Prefix.pch",
    "content": "//\n// Prefix header for all source files of the 'QRCodeEncoderObjectiveCAtGithub' target in the 'QRCodeEncoderObjectiveCAtGithub' project\n//\n\n#ifdef __OBJC__\n    #import <Foundation/Foundation.h>\n#endif\n"
  },
  {
    "path": "ArcBit/External/QRCodeEncoderObjectiveCAtGithub/QREncoder-Prefix.pch",
    "content": "//\n// Prefix header for all source files of the 'QREncoder' target in the 'QREncoder' project\n//\n\n#ifdef __OBJC__\n    #import <Foundation/Foundation.h>\n#endif\n"
  },
  {
    "path": "ArcBit/External/QRCodeEncoderObjectiveCAtGithub/QREncoder.h",
    "content": "\n\n#import <Foundation/Foundation.h>\n#import <UIKit/UIKit.h>\n#import <CommonCrypto/CommonCryptor.h>\n//#include \"QR_Encode.h\" // moved to QREncoder.mm\n#import \"DataMatrix.h\"\n\nconst static int QR_ECLEVEL_AUTO =  0;\n//const static int QR_ECLEVEL_H =     QR_LEVEL_H;\n//const static int QR_ECLEVEL_M =     QR_LEVEL_M;\n//const static int QR_ECLEVEL_L =     QR_LEVEL_L;\n//const static int QR_ECLEVEL_Q =     QR_LEVEL_Q;\n\nconst static int QR_VERSION_AUTO =  -1;\n\nconst static int BITS_PER_BYTE =    8;\nconst static int BYTES_PER_PIXEL =  4;\n\nconst static unsigned char WHITE =  0xff;\n\n@interface QREncoder : NSObject {\n    \n}\n\n+ (DataMatrix*)encodeWithECLevel:(int)ecLevel version:(int)version string:(NSString *)string AESPassphrase:(NSString*)AESPassphrase;\n\n+ (DataMatrix*)encodeWithECLevel:(int)ecLevel version:(int)version string:(NSString*)string;\n\n+ (UIImage*)renderDataMatrix:(DataMatrix*)matrix imageDimension:(int)imageDimension;\n\n@end\n\nvoid FLProviderReleaseData(void *info, const void *data, size_t size);\n"
  },
  {
    "path": "ArcBit/External/QRCodeEncoderObjectiveCAtGithub/QREncoder.mm",
    "content": "\n#import \"QREncoder.h\"\n#include \"QR_Encode.h\"\n\n@implementation QREncoder\n\n+ (NSData*)AESEncryptString:(NSString*)string withPassphrase:(NSString*)passphrase {\n    if (passphrase.length>kCCKeySizeAES256) {\n        throw [NSException exceptionWithName:@\"invalid passphrase exception\" reason:[NSString stringWithFormat:@\"passphrase too long: %d\", passphrase.length] userInfo:nil];\n    }\n    const char* cstrPassphraseOriginal = [passphrase cStringUsingEncoding:NSUTF8StringEncoding];\n    char cstrPassphrasePadded[kCCKeySizeAES256 + 1];\n    memset(cstrPassphrasePadded, 0, sizeof(cstrPassphrasePadded));\n    memcpy(cstrPassphrasePadded, cstrPassphraseOriginal, [passphrase length]);\n    const char* dataIn = [string cStringUsingEncoding:NSUTF8StringEncoding];\n    size_t dataInLength = [string length];\n    size_t dataOutLength = dataInLength + kCCBlockSizeAES128;\n    void* dataOut = malloc(dataOutLength);\n    size_t encryptedDataLength = 0;\n    CCCryptorStatus status = CCCrypt(kCCEncrypt, kCCAlgorithmAES128, kCCOptionPKCS7Padding, cstrPassphrasePadded, kCCKeySizeAES256, NULL, dataIn, dataInLength, dataOut, dataOutLength, &encryptedDataLength);\n    NSData* encryptedData = nil;\n    if (status==kCCSuccess) {\n        encryptedData = [NSData dataWithBytes:dataOut length:encryptedDataLength];\n    }\n    free(dataOut);\n    return encryptedData;\n}\n\n+ (NSString*)AESDecryptString:(NSData*)string withPassphrase:(NSString*)passphrase {\n    if (passphrase.length>kCCKeySizeAES256) {\n        throw [NSException exceptionWithName:@\"invalid passphrase exception\" reason:[NSString stringWithFormat:@\"passphrase too long: %d\", passphrase.length] userInfo:nil];\n    }\n    const char* cstrPassphraseOriginal = [passphrase cStringUsingEncoding:NSASCIIStringEncoding];\n    char cstrPassphrase[kCCKeySizeAES256 + 1];\n    memset(cstrPassphrase, 0, sizeof(cstrPassphrase));\n    memcpy(cstrPassphrase, cstrPassphraseOriginal, [passphrase length]);\n    const void* dataIn = [string bytes];\n    size_t dataInLength = [string length];\n    size_t dataOutLength = dataInLength + kCCBlockSizeAES128;\n    void* dataOut = malloc(dataOutLength);\n    size_t decryptedDataLength = 0;\n    CCCryptorStatus status = CCCrypt(kCCDecrypt, kCCAlgorithmAES128, kCCOptionPKCS7Padding, cstrPassphrase, kCCKeySizeAES256, NULL, dataIn, dataInLength, dataOut, dataOutLength, &decryptedDataLength);\n    NSString* decryptedString = nil;\n    if (status==kCCSuccess) {\n        NSData* data = [NSData dataWithBytes:dataOut length:decryptedDataLength];\n        decryptedString = [[[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding] autorelease];\n    }\n    free(dataOut);\n    return decryptedString;\n}\n\n+ (DataMatrix*)encodeCStringWithECLevel:(int)ecLevel version:(int)version cstring:(const char*)cstring {\n    CQR_Encode* encoder = new CQR_Encode;\n    encoder->EncodeData(ecLevel, version, true, -1, cstring);\n    int dimension = encoder->m_nSymbleSize;\n    DataMatrix* matrix = [[[DataMatrix alloc] initWith:dimension] autorelease];\n    for (int y=0; y<dimension; y++) {\n        for (int x=0; x<dimension; x++) {\n            int v = encoder->m_byModuleData[y][x];\n            bool bk = v==1;\n            [matrix set:bk x:y y:x];\n        }\n    }\n    \n    delete encoder;\n    \n    return matrix;\n\n}\n\n+ (DataMatrix*)encodeWithECLevel:(int)ecLevel version:(int)version string:(NSString *)string AESPassphrase:(NSString*)AESPassphrase {\n    NSData* encryptedString = [QREncoder AESEncryptString:string withPassphrase:AESPassphrase];\n    const unsigned int len = [encryptedString length];\n    char cstring[len + 1];\n    bzero(cstring, len + 1);\n    [encryptedString getBytes:cstring length:len];\n    DataMatrix* matrix = [QREncoder encodeCStringWithECLevel:ecLevel version:version cstring:cstring];\n    return matrix;\n}\n\n+ (DataMatrix*)encodeWithECLevel:(int)ecLevel version:(int)version string:(NSString *)string {\n    const char* cstring = [string cStringUsingEncoding:NSUTF8StringEncoding];\n    DataMatrix* matrix = [QREncoder encodeCStringWithECLevel:ecLevel version:version cstring:cstring];\n    return matrix;\n}\n\n+ (UIImage*)renderDataMatrix:(DataMatrix*)matrix imageDimension:(int)imageDimension {\n    \n    const int bitsPerPixel = BITS_PER_BYTE * BYTES_PER_PIXEL;\n    const int bytesPerLine = BYTES_PER_PIXEL * imageDimension;\n    const int rawDataSize = imageDimension * imageDimension * BYTES_PER_PIXEL;\n    unsigned char* rawData = (unsigned char*)malloc(rawDataSize);\n    \n    int matrixDimension = [matrix dimension];\n    int pixelPerDot = imageDimension / matrixDimension;\n    int offsetTopAndLeft = (int)((imageDimension - pixelPerDot * matrixDimension) / 2);\n    int offsetBottomAndRight = (imageDimension - pixelPerDot * matrixDimension - offsetTopAndLeft);\n    \n    // alpha, blue, green, red\n    const uint32_t white = 0xFFFFFFFF, black = 0xFF000000, transp = 0x00FFFFFF;\n    \n    uint32_t *ptrData = (uint32_t *)rawData;\n    // top offset\n    for(int c=offsetTopAndLeft*imageDimension; c>0; c--)\n        *(ptrData++) = transp;\n    \n    for(int my=0; my<matrixDimension; my++) {\n        uint32_t *ptrDataSouce = ptrData; // start of the row we will copy\n        // left offset\n        for(int c=offsetTopAndLeft; c>0; c--) \n            *(ptrData++) = transp;\n        \n        for(int mx=0; mx<matrixDimension; mx++) {\n            uint32_t clr = [matrix valueAt:mx y:my] ? black : white;\n            // draw one pixel line of data\n            for(int c=pixelPerDot; c>0; c--) \n                *(ptrData++) = clr;\n        }\n        \n        // right offset\n        for(int c=offsetBottomAndRight; c>0; c--) \n            *(ptrData++) = transp;\n        \n        // then copy that row pixelPerDot-1 times\n        for(int c=(pixelPerDot-1)*imageDimension; c>0; c--) \n            *(ptrData++) = *(ptrDataSouce++);\n    }\n    \n    // bottom offset\n    for(int c=offsetBottomAndRight*imageDimension; c>0; c--) \n        *(ptrData++) = transp;\n    \n    CGDataProviderRef provider = CGDataProviderCreateWithData(NULL, \n                                                              rawData, \n                                                              rawDataSize, \n                                                              FLProviderReleaseData);\n    \n    CGColorSpaceRef colorSpaceRef = CGColorSpaceCreateDeviceRGB();\n    CGBitmapInfo bitmapInfo = kCGBitmapByteOrderDefault | kCGImageAlphaLast;\n    CGColorRenderingIntent renderingIntent = kCGRenderingIntentDefault;\n    CGImageRef imageRef = CGImageCreate(imageDimension,\n                                        imageDimension,\n                                        BITS_PER_BYTE,\n                                        bitsPerPixel,\n                                        bytesPerLine,\n                                        colorSpaceRef,\n                                        bitmapInfo,\n                                        provider,\n                                        NULL,NO,renderingIntent);\n    \n    UIImage *newImage = [UIImage imageWithCGImage:imageRef];\n    \n    CGImageRelease(imageRef);\n    CGColorSpaceRelease(colorSpaceRef);\n    CGDataProviderRelease(provider);\n    \n    return newImage;\n}\n\nvoid FLProviderReleaseData(void *info, const void *data, size_t size) {\n    free((void *)data);\n}\n\n@end\n"
  },
  {
    "path": "ArcBit/External/QRCodeEncoderObjectiveCAtGithub/QR_Encode.cpp",
    "content": "// QR_Encode.cpp : CQR_Encode NX Cve[V t@C\r\n// Date 2006/05/17\tVer. 1.22\tPsytec Inc.\r\n\r\n#include \"QR_Encode.h\"\r\n\r\n#ifdef _DEBUG\r\n#define new DEBUG_NEW\r\n#undef THIS_FILE\r\nstatic char THIS_FILE[] = __FILE__;\r\n#endif\r\n\r\n/////////////////////////////////////////////////////////////////////////////\r\n// QRR[ho[W(^)\r\nstatic QR_VERSIONINFO QR_VersonInfo[] = {{0}, // (_~[:Ver.0)\r\n\t\t\t\t\t\t\t\t\t\t { 1, // Ver.1\r\n\t\t\t\t\t\t\t\t\t\t    26,   19,   16,   13,    9,\r\n\t\t\t\t\t\t\t\t\t\t   0,   0,   0,   0,   0,   0,   0,\r\n\t\t\t\t\t\t\t\t\t\t   1,  26,  19,\r\n\t\t\t\t\t\t\t\t\t\t   1,  26,  16,\r\n\t\t\t\t\t\t\t\t\t\t   1,  26,  13,\r\n\t\t\t\t\t\t\t\t\t\t   1,  26,   9,\r\n\t\t\t\t\t\t\t\t\t\t   0,   0,   0,\r\n\t\t\t\t\t\t\t\t\t\t   0,   0,   0,\r\n\t\t\t\t\t\t\t\t\t\t   0,   0,   0,\r\n\t\t\t\t\t\t\t\t\t\t   0,   0,   0},\r\n\t\t\t\t\t\t\t\t\t\t { 2, // Ver.2\r\n\t\t\t\t\t\t\t\t\t\t    44,   34,   28,   22,   16,\r\n\t\t\t\t\t\t\t\t\t\t   1,  18,   0,   0,   0,   0,   0,\r\n\t\t\t\t\t\t\t\t\t\t   1,  44,  34,\r\n\t\t\t\t\t\t\t\t\t\t   1,  44,  28,\r\n\t\t\t\t\t\t\t\t\t\t   1,  44,  22,\r\n\t\t\t\t\t\t\t\t\t\t   1,  44,  16,\r\n\t\t\t\t\t\t\t\t\t\t   0,   0,   0,\r\n\t\t\t\t\t\t\t\t\t\t   0,   0,   0,\r\n\t\t\t\t\t\t\t\t\t\t   0,   0,   0,\r\n\t\t\t\t\t\t\t\t\t\t   0,   0,   0},\r\n\t\t\t\t\t\t\t\t\t\t { 3, // Ver.3\r\n\t\t\t\t\t\t\t\t\t\t    70,   55,   44,   34,   26,\r\n\t\t\t\t\t\t\t\t\t\t   1,  22,   0,   0,   0,   0,   0,\r\n\t\t\t\t\t\t\t\t\t\t   1,  70,  55,\r\n\t\t\t\t\t\t\t\t\t\t   1,  70,  44,\r\n\t\t\t\t\t\t\t\t\t\t   2,  35,  17,\r\n\t\t\t\t\t\t\t\t\t\t   2,  35,  13,\r\n\t\t\t\t\t\t\t\t\t\t   0,   0,   0,\r\n\t\t\t\t\t\t\t\t\t\t   0,   0,   0,\r\n\t\t\t\t\t\t\t\t\t\t   0,   0,   0,\r\n\t\t\t\t\t\t\t\t\t\t   0,   0,   0},\r\n\t\t\t\t\t\t\t\t\t\t { 4, // Ver.4\r\n\t\t\t\t\t\t\t\t\t\t   100,   80,   64,   48,   36,\r\n\t\t\t\t\t\t\t\t\t\t   1,  26,   0,   0,   0,   0,   0,\r\n\t\t\t\t\t\t\t\t\t\t   1, 100,  80,\r\n\t\t\t\t\t\t\t\t\t\t   2,  50,  32,\r\n\t\t\t\t\t\t\t\t\t\t   2,  50,  24,\r\n\t\t\t\t\t\t\t\t\t\t   4,  25,   9,\r\n\t\t\t\t\t\t\t\t\t\t   0,   0,   0,\r\n\t\t\t\t\t\t\t\t\t\t   0,   0,   0,\r\n\t\t\t\t\t\t\t\t\t\t   0,   0,   0,\r\n\t\t\t\t\t\t\t\t\t\t   0,   0,   0},\r\n\t\t\t\t\t\t\t\t\t\t { 5, // Ver.5\r\n\t\t\t\t\t\t\t\t\t\t   134,  108,   86,   62,   46,\r\n\t\t\t\t\t\t\t\t\t\t   1,  30,   0,   0,   0,   0,   0,\r\n\t\t\t\t\t\t\t\t\t\t   1, 134, 108,\r\n\t\t\t\t\t\t\t\t\t\t   2,  67,  43,\r\n\t\t\t\t\t\t\t\t\t\t   2,  33,  15,\r\n\t\t\t\t\t\t\t\t\t\t   2,  33,  11,\r\n\t\t\t\t\t\t\t\t\t\t   0,   0,   0,\r\n\t\t\t\t\t\t\t\t\t\t   0,   0,   0,\r\n\t\t\t\t\t\t\t\t\t\t   2,  34,  16,\r\n\t\t\t\t\t\t\t\t\t\t   2,  34,  12},\r\n\t\t\t\t\t\t\t\t\t\t { 6, // Ver.6\r\n\t\t\t\t\t\t\t\t\t\t   172,  136,  108,   76,   60,\r\n\t\t\t\t\t\t\t\t\t\t   1,  34,   0,   0,   0,   0,   0,\r\n\t\t\t\t\t\t\t\t\t\t   2,  86,  68,\r\n\t\t\t\t\t\t\t\t\t\t   4,  43,  27,\r\n\t\t\t\t\t\t\t\t\t\t   4,  43,  19,\r\n\t\t\t\t\t\t\t\t\t\t   4,  43,  15,\r\n\t\t\t\t\t\t\t\t\t\t   0,   0,   0,\r\n\t\t\t\t\t\t\t\t\t\t   0,   0,   0,\r\n\t\t\t\t\t\t\t\t\t\t   0,   0,   0,\r\n\t\t\t\t\t\t\t\t\t\t   0,   0,   0},\r\n\t\t\t\t\t\t\t\t\t\t { 7, // Ver.7\r\n\t\t\t\t\t\t\t\t\t\t   196,  156,  124,   88,   66,\r\n\t\t\t\t\t\t\t\t\t\t   2,  22,  38,   0,   0,   0,   0,\r\n\t\t\t\t\t\t\t\t\t\t   2,  98,  78,\r\n\t\t\t\t\t\t\t\t\t\t   4,  49,  31,\r\n\t\t\t\t\t\t\t\t\t\t   2,  32,  14,\r\n\t\t\t\t\t\t\t\t\t\t   4,  39,  13,\r\n\t\t\t\t\t\t\t\t\t\t   0,   0,   0,\r\n\t\t\t\t\t\t\t\t\t\t   0,   0,   0,\r\n\t\t\t\t\t\t\t\t\t\t   4,  33,  15,\r\n\t\t\t\t\t\t\t\t\t\t   1,  40,  14},\r\n\t\t\t\t\t\t\t\t\t\t { 8, // Ver.8\r\n\t\t\t\t\t\t\t\t\t\t   242,  194,  154,  110,   86,\r\n\t\t\t\t\t\t\t\t\t\t   2,  24,  42,   0,   0,   0,   0,\r\n\t\t\t\t\t\t\t\t\t\t   2, 121,  97,\r\n\t\t\t\t\t\t\t\t\t\t   2,  60,  38,\r\n\t\t\t\t\t\t\t\t\t\t   4,  40,  18,\r\n\t\t\t\t\t\t\t\t\t\t   4,  40,  14,\r\n\t\t\t\t\t\t\t\t\t\t   0,   0,   0,\r\n\t\t\t\t\t\t\t\t\t\t   2,  61,  39,\r\n\t\t\t\t\t\t\t\t\t\t   2,  41,  19,\r\n\t\t\t\t\t\t\t\t\t\t   2,  41,  15},\r\n\t\t\t\t\t\t\t\t\t\t { 9, // Ver.9\r\n\t\t\t\t\t\t\t\t\t\t   292,  232,  182,  132,  100,\r\n\t\t\t\t\t\t\t\t\t\t   2,  26,  46,   0,   0,   0,   0,\r\n\t\t\t\t\t\t\t\t\t\t   2, 146, 116,\r\n\t\t\t\t\t\t\t\t\t\t   3,  58,  36,\r\n\t\t\t\t\t\t\t\t\t\t   4,  36,  16,\r\n\t\t\t\t\t\t\t\t\t\t   4,  36,  12,\r\n\t\t\t\t\t\t\t\t\t\t   0,   0,   0,\r\n\t\t\t\t\t\t\t\t\t\t   2,  59,  37,\r\n\t\t\t\t\t\t\t\t\t\t   4,  37,  17,\r\n\t\t\t\t\t\t\t\t\t\t   4,  37,  13},\r\n\t\t\t\t\t\t\t\t\t\t {10, // Ver.10\r\n\t\t\t\t\t\t\t\t\t\t   346,  274,  216,  154,  122,\r\n\t\t\t\t\t\t\t\t\t\t   2,  28,  50,   0,   0,   0,   0,\r\n\t\t\t\t\t\t\t\t\t\t   2,  86,  68,\r\n\t\t\t\t\t\t\t\t\t\t   4,  69,  43,\r\n\t\t\t\t\t\t\t\t\t\t   6,  43,  19,\r\n\t\t\t\t\t\t\t\t\t\t   6,  43,  15,\r\n\t\t\t\t\t\t\t\t\t\t   2,  87,  69,\r\n\t\t\t\t\t\t\t\t\t\t   1,  70,  44,\r\n\t\t\t\t\t\t\t\t\t\t   2,  44,  20,\r\n\t\t\t\t\t\t\t\t\t\t   2,  44,  16},\r\n\t\t\t\t\t\t\t\t\t\t {11, // Ver.11\r\n\t\t\t\t\t\t\t\t\t\t   404,  324,  254,  180,  140,\r\n\t\t\t\t\t\t\t\t\t\t   2,  30,  54,   0,   0,   0,   0,\r\n\t\t\t\t\t\t\t\t\t\t   4, 101,  81,\r\n\t\t\t\t\t\t\t\t\t\t   1,  80,  50,\r\n\t\t\t\t\t\t\t\t\t\t   4,  50,  22,\r\n\t\t\t\t\t\t\t\t\t\t   3,  36,  12,\r\n\t\t\t\t\t\t\t\t\t\t   0,   0,   0,\r\n\t\t\t\t\t\t\t\t\t\t   4,  81,  51,\r\n\t\t\t\t\t\t\t\t\t\t   4,  51,  23,\r\n\t\t\t\t\t\t\t\t\t\t   8,  37,  13},\r\n\t\t\t\t\t\t\t\t\t\t {12, // Ver.12\r\n\t\t\t\t\t\t\t\t\t\t   466,  370,  290,  206,  158,\r\n\t\t\t\t\t\t\t\t\t\t   2,  32,  58,   0,   0,   0,   0,\r\n\t\t\t\t\t\t\t\t\t\t   2, 116,  92,\r\n\t\t\t\t\t\t\t\t\t\t   6,  58,  36,\r\n\t\t\t\t\t\t\t\t\t\t   4,  46,  20,\r\n\t\t\t\t\t\t\t\t\t\t   7,  42,  14,\r\n\t\t\t\t\t\t\t\t\t\t   2, 117,  93,\r\n\t\t\t\t\t\t\t\t\t\t   2,  59,  37,\r\n\t\t\t\t\t\t\t\t\t\t   6,  47,  21,\r\n\t\t\t\t\t\t\t\t\t\t   4,  43,  15},\r\n\t\t\t\t\t\t\t\t\t\t {13, // Ver.13\r\n\t\t\t\t\t\t\t\t\t\t   532,  428,  334,  244,  180,\r\n\t\t\t\t\t\t\t\t\t\t   2,  34,  62,   0,   0,   0,   0,\r\n\t\t\t\t\t\t\t\t\t\t   4, 133, 107,\r\n\t\t\t\t\t\t\t\t\t\t   8,  59,  37,\r\n\t\t\t\t\t\t\t\t\t\t   8,  44,  20,\r\n\t\t\t\t\t\t\t\t\t\t  12,  33,  11,\r\n\t\t\t\t\t\t\t\t\t\t   0,   0,   0,\r\n\t\t\t\t\t\t\t\t\t\t   1,  60,  38,\r\n\t\t\t\t\t\t\t\t\t\t   4,  45,  21,\r\n\t\t\t\t\t\t\t\t\t\t   4,  34,  12},\r\n\t\t\t\t\t\t\t\t\t\t {14, // Ver.14\r\n\t\t\t\t\t\t\t\t\t\t   581,  461,  365,  261,  197,\r\n\t\t\t\t\t\t\t\t\t\t   3,  26,  46,  66,   0,   0,   0,\r\n\t\t\t\t\t\t\t\t\t\t   3, 145, 115,\r\n\t\t\t\t\t\t\t\t\t\t   4,  64,  40,\r\n\t\t\t\t\t\t\t\t\t\t  11,  36,  16,\r\n\t\t\t\t\t\t\t\t\t\t  11,  36,  12,\r\n\t\t\t\t\t\t\t\t\t\t   1, 146, 116,\r\n\t\t\t\t\t\t\t\t\t\t   5,  65,  41,\r\n\t\t\t\t\t\t\t\t\t\t   5,  37,  17,\r\n\t\t\t\t\t\t\t\t\t\t   5,  37,  13},\r\n\t\t\t\t\t\t\t\t\t\t {15, // Ver.15\r\n\t\t\t\t\t\t\t\t\t\t   655,  523,  415,  295,  223,\r\n\t\t\t\t\t\t\t\t\t\t   3,  26,  48,  70,   0,   0,   0,\r\n\t\t\t\t\t\t\t\t\t\t   5, 109,  87,\r\n\t\t\t\t\t\t\t\t\t\t   5,  65,  41,\r\n\t\t\t\t\t\t\t\t\t\t   5,  54,  24,\r\n\t\t\t\t\t\t\t\t\t\t  11,  36,  12,\r\n\t\t\t\t\t\t\t\t\t\t   1, 110,  88,\r\n\t\t\t\t\t\t\t\t\t\t   5,  66,  42,\r\n\t\t\t\t\t\t\t\t\t\t   7,  55,  25,\r\n\t\t\t\t\t\t\t\t\t\t   7,  37,  13},\r\n\t\t\t\t\t\t\t\t\t\t {16, // Ver.16\r\n\t\t\t\t\t\t\t\t\t\t   733,  589,  453,  325,  253,\r\n\t\t\t\t\t\t\t\t\t\t   3,  26,  50,  74,   0,   0,   0,\r\n\t\t\t\t\t\t\t\t\t\t   5, 122,  98,\r\n\t\t\t\t\t\t\t\t\t\t   7,  73,  45,\r\n\t\t\t\t\t\t\t\t\t\t  15,  43,  19,\r\n\t\t\t\t\t\t\t\t\t\t   3,  45,  15,\r\n\t\t\t\t\t\t\t\t\t\t   1, 123,  99,\r\n\t\t\t\t\t\t\t\t\t\t   3,  74,  46,\r\n\t\t\t\t\t\t\t\t\t\t   2,  44,  20,\r\n\t\t\t\t\t\t\t\t\t\t  13,  46,  16},\r\n\t\t\t\t\t\t\t\t\t\t {17, // Ver.17\r\n\t\t\t\t\t\t\t\t\t\t   815,  647,  507,  367,  283,\r\n\t\t\t\t\t\t\t\t\t\t   3,  30,  54,  78,   0,   0,   0,\r\n\t\t\t\t\t\t\t\t\t\t   1, 135, 107,\r\n\t\t\t\t\t\t\t\t\t\t  10,  74,  46,\r\n\t\t\t\t\t\t\t\t\t\t   1,  50,  22,\r\n\t\t\t\t\t\t\t\t\t\t   2,  42,  14,\r\n\t\t\t\t\t\t\t\t\t\t   5, 136, 108,\r\n\t\t\t\t\t\t\t\t\t\t   1,  75,  47,\r\n\t\t\t\t\t\t\t\t\t\t  15,  51,  23,\r\n\t\t\t\t\t\t\t\t\t\t  17,  43,  15},\r\n\t\t\t\t\t\t\t\t\t\t {18, // Ver.18\r\n\t\t\t\t\t\t\t\t\t\t   901,  721,  563,  397,  313,\r\n\t\t\t\t\t\t\t\t\t\t   3,  30,  56,  82,   0,   0,   0,\r\n\t\t\t\t\t\t\t\t\t\t   5, 150, 120,\r\n\t\t\t\t\t\t\t\t\t\t   9,  69,  43,\r\n\t\t\t\t\t\t\t\t\t\t  17,  50,  22,\r\n\t\t\t\t\t\t\t\t\t\t   2,  42,  14,\r\n\t\t\t\t\t\t\t\t\t\t   1, 151, 121,\r\n\t\t\t\t\t\t\t\t\t\t   4,  70,  44,\r\n\t\t\t\t\t\t\t\t\t\t   1,  51,  23,\r\n\t\t\t\t\t\t\t\t\t\t  19,  43,  15},\r\n\t\t\t\t\t\t\t\t\t\t {19, // Ver.19\r\n\t\t\t\t\t\t\t\t\t\t   991,  795,  627,  445,  341,\r\n\t\t\t\t\t\t\t\t\t\t   3,  30,  58,  86,   0,   0,   0,\r\n\t\t\t\t\t\t\t\t\t\t   3, 141, 113,\r\n\t\t\t\t\t\t\t\t\t\t   3,  70,  44,\r\n\t\t\t\t\t\t\t\t\t\t  17,  47,  21,\r\n\t\t\t\t\t\t\t\t\t\t   9,  39,  13,\r\n\t\t\t\t\t\t\t\t\t\t   4, 142, 114,\r\n\t\t\t\t\t\t\t\t\t\t  11,  71,  45,\r\n\t\t\t\t\t\t\t\t\t\t   4,  48,  22,\r\n\t\t\t\t\t\t\t\t\t\t  16,  40,  14},\r\n\t\t\t\t\t\t\t\t\t\t {20, // Ver.20\r\n\t\t\t\t\t\t\t\t\t\t  1085,  861,  669,  485,  385,\r\n\t\t\t\t\t\t\t\t\t\t   3,  34,  62,  90,   0,   0,   0,\r\n\t\t\t\t\t\t\t\t\t\t   3, 135, 107,\r\n\t\t\t\t\t\t\t\t\t\t   3,  67,  41,\r\n\t\t\t\t\t\t\t\t\t\t  15,  54,  24,\r\n\t\t\t\t\t\t\t\t\t\t  15,  43,  15,\r\n\t\t\t\t\t\t\t\t\t\t   5, 136, 108,\r\n\t\t\t\t\t\t\t\t\t\t  13,  68,  42,\r\n\t\t\t\t\t\t\t\t\t\t   5,  55,  25,\r\n\t\t\t\t\t\t\t\t\t\t  10,  44,  16},\r\n\t\t\t\t\t\t\t\t\t\t {21, // Ver.21\r\n\t\t\t\t\t\t\t\t\t\t  1156,  932,  714,  512,  406,\r\n\t\t\t\t\t\t\t\t\t\t   4,  28,  50,  72,  94,   0,   0,\r\n\t\t\t\t\t\t\t\t\t\t   4, 144, 116,\r\n\t\t\t\t\t\t\t\t\t\t  17,  68,  42,\r\n\t\t\t\t\t\t\t\t\t\t  17,  50,  22,\r\n\t\t\t\t\t\t\t\t\t\t  19,  46,  16,\r\n\t\t\t\t\t\t\t\t\t\t   4, 145, 117,\r\n\t\t\t\t\t\t\t\t\t\t   0,   0,   0,\r\n\t\t\t\t\t\t\t\t\t\t   6,  51,  23,\r\n\t\t\t\t\t\t\t\t\t\t   6,  47,  17},\r\n\t\t\t\t\t\t\t\t\t\t {22, // Ver.22\r\n\t\t\t\t\t\t\t\t\t\t  1258, 1006,  782,  568,  442,\r\n\t\t\t\t\t\t\t\t\t\t   4,  26,  50,  74,  98,   0,   0,\r\n\t\t\t\t\t\t\t\t\t\t   2, 139, 111,\r\n\t\t\t\t\t\t\t\t\t\t  17,  74,  46,\r\n\t\t\t\t\t\t\t\t\t\t   7,  54,  24,\r\n\t\t\t\t\t\t\t\t\t\t  34,  37,  13,\r\n\t\t\t\t\t\t\t\t\t\t   7, 140, 112,\r\n\t\t\t\t\t\t\t\t\t\t   0,   0,   0,\r\n\t\t\t\t\t\t\t\t\t\t  16,  55,  25,\r\n\t\t\t\t\t\t\t\t\t\t   0,   0,   0},\r\n\t\t\t\t\t\t\t\t\t\t {23, // Ver.23\r\n\t\t\t\t\t\t\t\t\t\t  1364, 1094,  860,  614,  464,\r\n\t\t\t\t\t\t\t\t\t\t   4,  30,  54,  78, 102,   0,   0,\r\n\t\t\t\t\t\t\t\t\t\t   4, 151, 121,\r\n\t\t\t\t\t\t\t\t\t\t   4,  75,  47,\r\n\t\t\t\t\t\t\t\t\t\t  11,  54,  24,\r\n\t\t\t\t\t\t\t\t\t\t  16,  45,  15,\r\n\t\t\t\t\t\t\t\t\t\t   5, 152, 122,\r\n\t\t\t\t\t\t\t\t\t\t  14,  76,  48,\r\n\t\t\t\t\t\t\t\t\t\t  14,  55,  25,\r\n\t\t\t\t\t\t\t\t\t\t  14,  46,  16},\r\n\t\t\t\t\t\t\t\t\t\t {24, // Ver.24\r\n\t\t\t\t\t\t\t\t\t\t  1474, 1174,  914,  664,  514,\r\n\t\t\t\t\t\t\t\t\t\t   4,  28,  54,  80, 106,   0,   0,\r\n\t\t\t\t\t\t\t\t\t\t   6, 147, 117,\r\n\t\t\t\t\t\t\t\t\t\t   6,  73,  45,\r\n\t\t\t\t\t\t\t\t\t\t  11,  54,  24,\r\n\t\t\t\t\t\t\t\t\t\t  30,  46,  16,\r\n\t\t\t\t\t\t\t\t\t\t   4, 148, 118,\r\n\t\t\t\t\t\t\t\t\t\t  14,  74,  46,\r\n\t\t\t\t\t\t\t\t\t\t  16,  55,  25,\r\n\t\t\t\t\t\t\t\t\t\t   2,  47,  17},\r\n\t\t\t\t\t\t\t\t\t\t {25, // Ver.25\r\n\t\t\t\t\t\t\t\t\t\t  1588, 1276, 1000,  718,  538,\r\n\t\t\t\t\t\t\t\t\t\t   4,  32,  58,  84, 110,   0,   0,\r\n\t\t\t\t\t\t\t\t\t\t   8, 132, 106,\r\n\t\t\t\t\t\t\t\t\t\t   8,  75,  47,\r\n\t\t\t\t\t\t\t\t\t\t   7,  54,  24,\r\n\t\t\t\t\t\t\t\t\t\t  22,  45,  15,\r\n\t\t\t\t\t\t\t\t\t\t   4, 133, 107,\r\n\t\t\t\t\t\t\t\t\t\t  13,  76,  48,\r\n\t\t\t\t\t\t\t\t\t\t  22,  55,  25,\r\n\t\t\t\t\t\t\t\t\t\t  13,  46,  16},\r\n\t\t\t\t\t\t\t\t\t\t {26, // Ver.26\r\n\t\t\t\t\t\t\t\t\t\t  1706, 1370, 1062,  754,  596,\r\n\t\t\t\t\t\t\t\t\t\t   4,  30,  58,  86, 114,   0,   0,\r\n\t\t\t\t\t\t\t\t\t\t  10, 142, 114,\r\n\t\t\t\t\t\t\t\t\t\t  19,  74,  46,\r\n\t\t\t\t\t\t\t\t\t\t  28,  50,  22,\r\n\t\t\t\t\t\t\t\t\t\t  33,  46,  16,\r\n\t\t\t\t\t\t\t\t\t\t   2, 143, 115,\r\n\t\t\t\t\t\t\t\t\t\t   4,  75,  47,\r\n\t\t\t\t\t\t\t\t\t\t   6,  51,  23,\r\n\t\t\t\t\t\t\t\t\t\t   4,  47,  17},\r\n\t\t\t\t\t\t\t\t\t\t {27, // Ver.27\r\n\t\t\t\t\t\t\t\t\t\t  1828, 1468, 1128,  808,  628,\r\n\t\t\t\t\t\t\t\t\t\t   4,  34,  62,  90, 118,   0,   0,\r\n\t\t\t\t\t\t\t\t\t\t   8, 152, 122,\r\n\t\t\t\t\t\t\t\t\t\t  22,  73,  45,\r\n\t\t\t\t\t\t\t\t\t\t   8,  53,  23,\r\n\t\t\t\t\t\t\t\t\t\t  12,  45,  15,\r\n\t\t\t\t\t\t\t\t\t\t   4, 153, 123,\r\n\t\t\t\t\t\t\t\t\t\t   3,  74,  46,\r\n\t\t\t\t\t\t\t\t\t\t  26,  54,  24,\r\n\t\t\t\t\t\t\t\t\t\t  28,  46,  16},\r\n\t\t\t\t\t\t\t\t\t\t {28, // Ver.28\r\n\t\t\t\t\t\t\t\t\t\t  1921, 1531, 1193,  871,  661,\r\n\t\t\t\t\t\t\t\t\t\t   5,  26,  50,  74,  98, 122,   0,\r\n\t\t\t\t\t\t\t\t\t\t   3, 147, 117,\r\n\t\t\t\t\t\t\t\t\t\t   3,  73,  45,\r\n\t\t\t\t\t\t\t\t\t\t   4,  54,  24,\r\n\t\t\t\t\t\t\t\t\t\t  11,  45,  15,\r\n\t\t\t\t\t\t\t\t\t\t  10, 148, 118,\r\n\t\t\t\t\t\t\t\t\t\t  23,  74,  46,\r\n\t\t\t\t\t\t\t\t\t\t  31,  55,  25,\r\n\t\t\t\t\t\t\t\t\t\t  31,  46,  16},\r\n\t\t\t\t\t\t\t\t\t\t {29, // Ver.29\r\n\t\t\t\t\t\t\t\t\t\t  2051, 1631, 1267,  911,  701,\r\n\t\t\t\t\t\t\t\t\t\t   5,  30,  54,  78, 102, 126,   0,\r\n\t\t\t\t\t\t\t\t\t\t   7, 146, 116,\r\n\t\t\t\t\t\t\t\t\t\t  21,  73,  45,\r\n\t\t\t\t\t\t\t\t\t\t   1,  53,  23,\r\n\t\t\t\t\t\t\t\t\t\t  19,  45,  15,\r\n\t\t\t\t\t\t\t\t\t\t   7, 147, 117,\r\n\t\t\t\t\t\t\t\t\t\t   7,  74,  46,\r\n\t\t\t\t\t\t\t\t\t\t  37,  54,  24,\r\n\t\t\t\t\t\t\t\t\t\t  26,  46,  16},\r\n\t\t\t\t\t\t\t\t\t\t {30, // Ver.30\r\n\t\t\t\t\t\t\t\t\t\t  2185, 1735, 1373,  985,  745,\r\n\t\t\t\t\t\t\t\t\t\t   5,  26,  52,  78, 104, 130,   0,\r\n\t\t\t\t\t\t\t\t\t\t   5, 145, 115,\r\n\t\t\t\t\t\t\t\t\t\t  19,  75,  47,\r\n\t\t\t\t\t\t\t\t\t\t  15,  54,  24,\r\n\t\t\t\t\t\t\t\t\t\t  23,  45,  15,\r\n\t\t\t\t\t\t\t\t\t\t  10, 146, 116,\r\n\t\t\t\t\t\t\t\t\t\t  10,  76,  48,\r\n\t\t\t\t\t\t\t\t\t\t  25,  55,  25,\r\n\t\t\t\t\t\t\t\t\t\t  25,  46,  16},\r\n\t\t\t\t\t\t\t\t\t\t {31, // Ver.31\r\n\t\t\t\t\t\t\t\t\t\t  2323, 1843, 1455, 1033,  793,\r\n\t\t\t\t\t\t\t\t\t\t   5,  30,  56,  82, 108, 134,   0,\r\n\t\t\t\t\t\t\t\t\t\t  13, 145, 115,\r\n\t\t\t\t\t\t\t\t\t\t   2,  74,  46,\r\n\t\t\t\t\t\t\t\t\t\t  42,  54,  24,\r\n\t\t\t\t\t\t\t\t\t\t  23,  45,  15,\r\n\t\t\t\t\t\t\t\t\t\t   3, 146, 116,\r\n\t\t\t\t\t\t\t\t\t\t  29,  75,  47,\r\n\t\t\t\t\t\t\t\t\t\t   1,  55,  25,\r\n\t\t\t\t\t\t\t\t\t\t  28,  46,  16},\r\n\t\t\t\t\t\t\t\t\t\t {32, // Ver.32\r\n\t\t\t\t\t\t\t\t\t\t  2465, 1955, 1541, 1115,  845,\r\n\t\t\t\t\t\t\t\t\t\t   5,  34,  60,  86, 112, 138,   0,\r\n\t\t\t\t\t\t\t\t\t\t  17, 145, 115,\r\n\t\t\t\t\t\t\t\t\t\t  10,  74,  46,\r\n\t\t\t\t\t\t\t\t\t\t  10,  54,  24,\r\n\t\t\t\t\t\t\t\t\t\t  19,  45,  15,\r\n\t\t\t\t\t\t\t\t\t\t   0,   0,   0,\r\n\t\t\t\t\t\t\t\t\t\t  23,  75,  47,\r\n\t\t\t\t\t\t\t\t\t\t  35,  55,  25,\r\n\t\t\t\t\t\t\t\t\t\t  35,  46,  16},\r\n\t\t\t\t\t\t\t\t\t\t {33, // Ver.33\r\n\t\t\t\t\t\t\t\t\t\t  2611, 2071, 1631, 1171,  901,\r\n\t\t\t\t\t\t\t\t\t\t   5,  30,  58,  86, 114, 142,   0,\r\n\t\t\t\t\t\t\t\t\t\t  17, 145, 115,\r\n\t\t\t\t\t\t\t\t\t\t  14,  74,  46,\r\n\t\t\t\t\t\t\t\t\t\t  29,  54,  24,\r\n\t\t\t\t\t\t\t\t\t\t  11,  45,  15,\r\n\t\t\t\t\t\t\t\t\t\t   1, 146, 116,\r\n\t\t\t\t\t\t\t\t\t\t  21,  75,  47,\r\n\t\t\t\t\t\t\t\t\t\t  19,  55,  25,\r\n\t\t\t\t\t\t\t\t\t\t  46,  46,  16},\r\n\t\t\t\t\t\t\t\t\t\t {34, // Ver.34\r\n\t\t\t\t\t\t\t\t\t\t  2761, 2191, 1725, 1231,  961,\r\n\t\t\t\t\t\t\t\t\t\t   5,  34,  62,  90, 118, 146,   0,\r\n\t\t\t\t\t\t\t\t\t\t  13, 145, 115,\r\n\t\t\t\t\t\t\t\t\t\t  14,  74,  46,\r\n\t\t\t\t\t\t\t\t\t\t  44,  54,  24,\r\n\t\t\t\t\t\t\t\t\t\t  59,  46,  16,\r\n\t\t\t\t\t\t\t\t\t\t   6, 146, 116,\r\n\t\t\t\t\t\t\t\t\t\t  23,  75,  47,\r\n\t\t\t\t\t\t\t\t\t\t   7,  55,  25,\r\n\t\t\t\t\t\t\t\t\t\t   1,  47,  17},\r\n\t\t\t\t\t\t\t\t\t\t {35, // Ver.35\r\n\t\t\t\t\t\t\t\t\t\t  2876, 2306, 1812, 1286,  986,\r\n\t\t\t\t\t\t\t\t\t\t   6,  30,  54,  78, 102, 126, 150,\r\n\t\t\t\t\t\t\t\t\t\t  12, 151, 121,\r\n\t\t\t\t\t\t\t\t\t\t  12,  75,  47,\r\n\t\t\t\t\t\t\t\t\t\t  39,  54,  24,\r\n\t\t\t\t\t\t\t\t\t\t  22,  45,  15,\r\n\t\t\t\t\t\t\t\t\t\t   7, 152, 122,\r\n\t\t\t\t\t\t\t\t\t\t  26,  76,  48,\r\n\t\t\t\t\t\t\t\t\t\t  14,  55,  25,\r\n\t\t\t\t\t\t\t\t\t\t  41,  46,  16},\r\n\t\t\t\t\t\t\t\t\t\t {36, // Ver.36\r\n\t\t\t\t\t\t\t\t\t\t  3034, 2434, 1914, 1354, 1054,\r\n\t\t\t\t\t\t\t\t\t\t   6,  24,  50,  76, 102, 128, 154,\r\n\t\t\t\t\t\t\t\t\t\t   6, 151, 121,\r\n\t\t\t\t\t\t\t\t\t\t   6,  75,  47,\r\n\t\t\t\t\t\t\t\t\t\t  46,  54,  24,\r\n\t\t\t\t\t\t\t\t\t\t   2,  45,  15,\r\n\t\t\t\t\t\t\t\t\t\t  14, 152, 122,\r\n\t\t\t\t\t\t\t\t\t\t  34,  76,  48,\r\n\t\t\t\t\t\t\t\t\t\t  10,  55,  25,\r\n\t\t\t\t\t\t\t\t\t\t  64,  46,  16},\r\n\t\t\t\t\t\t\t\t\t\t {37, // Ver.37\r\n\t\t\t\t\t\t\t\t\t\t  3196, 2566, 1992, 1426, 1096,\r\n\t\t\t\t\t\t\t\t\t\t   6,  28,  54,  80, 106, 132, 158,\r\n\t\t\t\t\t\t\t\t\t\t  17, 152, 122,\r\n\t\t\t\t\t\t\t\t\t\t  29,  74,  46,\r\n\t\t\t\t\t\t\t\t\t\t  49,  54,  24,\r\n\t\t\t\t\t\t\t\t\t\t  24,  45,  15,\r\n\t\t\t\t\t\t\t\t\t\t   4, 153, 123,\r\n\t\t\t\t\t\t\t\t\t\t  14,  75,  47,\r\n\t\t\t\t\t\t\t\t\t\t  10,  55,  25,\r\n\t\t\t\t\t\t\t\t\t\t  46,  46,  16},\r\n\t\t\t\t\t\t\t\t\t\t {38, // Ver.38\r\n\t\t\t\t\t\t\t\t\t\t  3362, 2702, 2102, 1502, 1142,\r\n\t\t\t\t\t\t\t\t\t\t   6,  32,  58,  84, 110, 136, 162,\r\n\t\t\t\t\t\t\t\t\t\t   4, 152, 122,\r\n\t\t\t\t\t\t\t\t\t\t  13,  74,  46,\r\n\t\t\t\t\t\t\t\t\t\t  48,  54,  24,\r\n\t\t\t\t\t\t\t\t\t\t  42,  45,  15,\r\n\t\t\t\t\t\t\t\t\t\t  18, 153, 123,\r\n\t\t\t\t\t\t\t\t\t\t  32,  75,  47,\r\n\t\t\t\t\t\t\t\t\t\t  14,  55,  25,\r\n\t\t\t\t\t\t\t\t\t\t  32,  46,  16},\r\n\t\t\t\t\t\t\t\t\t\t {39, // Ver.39\r\n\t\t\t\t\t\t\t\t\t\t  3532, 2812, 2216, 1582, 1222,\r\n\t\t\t\t\t\t\t\t\t\t   6,  26,  54,  82, 110, 138, 166,\r\n\t\t\t\t\t\t\t\t\t\t  20, 147, 117,\r\n\t\t\t\t\t\t\t\t\t\t  40,  75,  47,\r\n\t\t\t\t\t\t\t\t\t\t  43,  54,  24,\r\n\t\t\t\t\t\t\t\t\t\t  10,  45,  15,\r\n\t\t\t\t\t\t\t\t\t\t   4, 148, 118,\r\n\t\t\t\t\t\t\t\t\t\t   7,  76,  48,\r\n\t\t\t\t\t\t\t\t\t\t  22,  55,  25,\r\n\t\t\t\t\t\t\t\t\t\t  67,  46,  16},\r\n\t\t\t\t\t\t\t\t\t\t {40, // Ver.40\r\n\t\t\t\t\t\t\t\t\t\t  3706, 2956, 2334, 1666, 1276,\r\n\t\t\t\t\t\t\t\t\t\t   6,  30,  58,  86, 114, 142, 170,\r\n\t\t\t\t\t\t\t\t\t\t  19, 148, 118,\r\n\t\t\t\t\t\t\t\t\t\t  18,  75,  47,\r\n\t\t\t\t\t\t\t\t\t\t  34,  54,  24,\r\n\t\t\t\t\t\t\t\t\t\t  20,  45,  15,\r\n\t\t\t\t\t\t\t\t\t\t   6, 149, 119,\r\n\t\t\t\t\t\t\t\t\t\t  31,  76,  48,\r\n\t\t\t\t\t\t\t\t\t\t  34,  55,  25,\r\n\t\t\t\t\t\t\t\t\t\t  61,  46,  16}\r\n\t\t\t\t\t\t\t\t\t\t};\r\n\r\n\r\n/////////////////////////////////////////////////////////////////////////////\r\n// GF(2^8)wϊe[u\r\nstatic BYTE byExpToInt[] = {  1,   2,   4,   8,  16,  32,  64, 128,  29,  58, 116, 232, 205, 135,  19,  38,\r\n\t\t\t\t\t\t\t 76, 152,  45,  90, 180, 117, 234, 201, 143,   3,   6,  12,  24,  48,  96, 192,\r\n\t\t\t\t\t\t\t157,  39,  78, 156,  37,  74, 148,  53, 106, 212, 181, 119, 238, 193, 159,  35,\r\n\t\t\t\t\t\t\t 70, 140,   5,  10,  20,  40,  80, 160,  93, 186, 105, 210, 185, 111, 222, 161,\r\n\t\t\t\t\t\t\t 95, 190,  97, 194, 153,  47,  94, 188, 101, 202, 137,  15,  30,  60, 120, 240,\r\n\t\t\t\t\t\t\t253, 231, 211, 187, 107, 214, 177, 127, 254, 225, 223, 163,  91, 182, 113, 226,\r\n\t\t\t\t\t\t\t217, 175,  67, 134,  17,  34,  68, 136,  13,  26,  52, 104, 208, 189, 103, 206,\r\n\t\t\t\t\t\t\t129,  31,  62, 124, 248, 237, 199, 147,  59, 118, 236, 197, 151,  51, 102, 204,\r\n\t\t\t\t\t\t\t133,  23,  46,  92, 184, 109, 218, 169,  79, 158,  33,  66, 132,  21,  42,  84,\r\n\t\t\t\t\t\t\t168,  77, 154,  41,  82, 164,  85, 170,  73, 146,  57, 114, 228, 213, 183, 115,\r\n\t\t\t\t\t\t\t230, 209, 191,  99, 198, 145,  63, 126, 252, 229, 215, 179, 123, 246, 241, 255,\r\n\t\t\t\t\t\t\t227, 219, 171,  75, 150,  49,  98, 196, 149,  55, 110, 220, 165,  87, 174,  65,\r\n\t\t\t\t\t\t\t130,  25,  50, 100, 200, 141,   7,  14,  28,  56, 112, 224, 221, 167,  83, 166,\r\n\t\t\t\t\t\t\t 81, 162,  89, 178, 121, 242, 249, 239, 195, 155,  43,  86, 172,  69, 138,   9,\r\n\t\t\t\t\t\t\t 18,  36,  72, 144,  61, 122, 244, 245, 247, 243, 251, 235, 203, 139,  11,  22,\r\n\t\t\t\t\t\t\t 44,  88, 176, 125, 250, 233, 207, 131,  27,  54, 108, 216, 173,  71, 142,   1};\r\n\r\n\r\n/////////////////////////////////////////////////////////////////////////////\r\n// GF(2^8)wϊe[u\r\nstatic BYTE byIntToExp[] = {  0,   0,   1,  25,   2,  50,  26, 198,   3, 223,  51, 238,  27, 104, 199,  75,\r\n\t\t\t\t\t\t\t  4, 100, 224,  14,  52, 141, 239, 129,  28, 193, 105, 248, 200,   8,  76, 113,\r\n\t\t\t\t\t\t\t  5, 138, 101,  47, 225,  36,  15,  33,  53, 147, 142, 218, 240,  18, 130,  69,\r\n\t\t\t\t\t\t\t 29, 181, 194, 125, 106,  39, 249, 185, 201, 154,   9, 120,  77, 228, 114, 166,\r\n\t\t\t\t\t\t\t  6, 191, 139,  98, 102, 221,  48, 253, 226, 152,  37, 179,  16, 145,  34, 136,\r\n\t\t\t\t\t\t\t 54, 208, 148, 206, 143, 150, 219, 189, 241, 210,  19,  92, 131,  56,  70,  64,\r\n\t\t\t\t\t\t\t 30,  66, 182, 163, 195,  72, 126, 110, 107,  58,  40,  84, 250, 133, 186,  61,\r\n\t\t\t\t\t\t\t202,  94, 155, 159,  10,  21, 121,  43,  78, 212, 229, 172, 115, 243, 167,  87,\r\n\t\t\t\t\t\t\t  7, 112, 192, 247, 140, 128,  99,  13, 103,  74, 222, 237,  49, 197, 254,  24,\r\n\t\t\t\t\t\t\t227, 165, 153, 119,  38, 184, 180, 124,  17,  68, 146, 217,  35,  32, 137,  46,\r\n\t\t\t\t\t\t\t 55,  63, 209,  91, 149, 188, 207, 205, 144, 135, 151, 178, 220, 252, 190,  97,\r\n\t\t\t\t\t\t\t242,  86, 211, 171,  20,  42,  93, 158, 132,  60,  57,  83,  71, 109,  65, 162,\r\n\t\t\t\t\t\t\t 31,  45,  67, 216, 183, 123, 164, 118, 196,  23,  73, 236, 127,  12, 111, 246,\r\n\t\t\t\t\t\t\t108, 161,  59,  82,  41, 157,  85, 170, 251,  96, 134, 177, 187, 204,  62,  90,\r\n\t\t\t\t\t\t\t203,  89,  95, 176, 156, 169, 160,  81,  11, 245,  22, 235, 122, 117,  44, 215,\r\n\t\t\t\t\t\t\t 79, 174, 213, 233, 230, 231, 173, 232, 116, 214, 244, 234, 168,  80,  88, 175};\r\n\r\n\r\n/////////////////////////////////////////////////////////////////////////////\r\n// W\r\nstatic BYTE byRSExp7[]  = {87, 229, 146, 149, 238, 102,  21};\r\nstatic BYTE byRSExp10[] = {251,  67,  46,  61, 118,  70,  64,  94,  32,  45};\r\nstatic BYTE byRSExp13[] = { 74, 152, 176, 100,  86, 100, 106, 104, 130, 218, 206, 140,  78};\r\nstatic BYTE byRSExp15[] = {  8, 183,  61,  91, 202,  37,  51,  58,  58, 237, 140, 124,   5,  99, 105};\r\nstatic BYTE byRSExp16[] = {120, 104, 107, 109, 102, 161,  76,   3,  91, 191, 147, 169, 182, 194, 225, 120};\r\nstatic BYTE byRSExp17[] = { 43, 139, 206,  78,  43, 239, 123, 206, 214, 147,  24,  99, 150,  39, 243, 163, 136};\r\nstatic BYTE byRSExp18[] = {215, 234, 158,  94, 184,  97, 118, 170,  79, 187, 152, 148, 252, 179,   5,  98,  96, 153};\r\nstatic BYTE byRSExp20[] = { 17,  60,  79,  50,  61, 163,  26, 187, 202, 180, 221, 225,  83, 239, 156, 164, 212, 212, 188, 190};\r\nstatic BYTE byRSExp22[] = {210, 171, 247, 242,  93, 230,  14, 109, 221,  53, 200,  74,   8, 172,  98,  80, 219, 134, 160, 105,\r\n\t\t\t\t\t\t   165, 231};\r\nstatic BYTE byRSExp24[] = {229, 121, 135,  48, 211, 117, 251, 126, 159, 180, 169, 152, 192, 226, 228, 218, 111,   0, 117, 232,\r\n\t\t\t\t\t\t    87,  96, 227,  21};\r\nstatic BYTE byRSExp26[] = {173, 125, 158,   2, 103, 182, 118,  17, 145, 201, 111,  28, 165,  53, 161,  21, 245, 142,  13, 102,\r\n\t\t\t\t\t\t    48, 227, 153, 145, 218,  70};\r\nstatic BYTE byRSExp28[] = {168, 223, 200, 104, 224, 234, 108, 180, 110, 190, 195, 147, 205,  27, 232, 201,  21,  43, 245,  87,\r\n\t\t\t\t\t\t    42, 195, 212, 119, 242,  37,   9, 123};\r\nstatic BYTE byRSExp30[] = { 41, 173, 145, 152, 216,  31, 179, 182,  50,  48, 110,  86, 239,  96, 222, 125,  42, 173, 226, 193,\r\n\t\t\t\t\t\t   224, 130, 156,  37, 251, 216, 238,  40, 192, 180};\r\nstatic BYTE byRSExp32[] = { 10,   6, 106, 190, 249, 167,   4,  67, 209, 138, 138,  32, 242, 123,  89,  27, 120, 185,  80, 156,\r\n\t\t\t\t\t\t    38,  69, 171,  60,  28, 222,  80,  52, 254, 185, 220, 241};\r\nstatic BYTE byRSExp34[] = {111,  77, 146,  94,  26,  21, 108,  19, 105,  94, 113, 193,  86, 140, 163, 125,  58, 158, 229, 239,\r\n\t\t\t\t\t\t   218, 103,  56,  70, 114,  61, 183, 129, 167,  13,  98,  62, 129,  51};\r\nstatic BYTE byRSExp36[] = {200, 183,  98,  16, 172,  31, 246, 234,  60, 152, 115,   0, 167, 152, 113, 248, 238, 107,  18,  63,\r\n\t\t\t\t\t\t   218,  37,  87, 210, 105, 177, 120,  74, 121, 196, 117, 251, 113, 233,  30, 120};\r\nstatic BYTE byRSExp38[] = {159,  34,  38, 228, 230,  59, 243,  95,  49, 218, 176, 164,  20,  65,  45, 111,  39,  81,  49, 118,\r\n\t\t\t\t\t\t   113, 222, 193, 250, 242, 168, 217,  41, 164, 247, 177,  30, 238,  18, 120, 153,  60, 193};\r\nstatic BYTE byRSExp40[] = { 59, 116,  79, 161, 252,  98, 128, 205, 128, 161, 247,  57, 163,  56, 235, 106,  53,  26, 187, 174,\r\n\t\t\t\t\t\t   226, 104, 170,   7, 175,  35, 181, 114,  88,  41,  47, 163, 125, 134,  72,  20, 232,  53,  35,  15};\r\nstatic BYTE byRSExp42[] = {250, 103, 221, 230,  25,  18, 137, 231,   0,   3,  58, 242, 221, 191, 110,  84, 230,   8, 188, 106,\r\n\t\t\t\t\t\t    96, 147,  15, 131, 139,  34, 101, 223,  39, 101, 213, 199, 237, 254, 201, 123, 171, 162, 194, 117,\r\n\t\t\t\t\t\t    50,  96};\r\nstatic BYTE byRSExp44[] = {190,   7,  61, 121,  71, 246,  69,  55, 168, 188,  89, 243, 191,  25,  72, 123,   9, 145,  14, 247,\r\n\t\t\t\t\t\t     1, 238,  44,  78, 143,  62, 224, 126, 118, 114,  68, 163,  52, 194, 217, 147, 204, 169,  37, 130,\r\n\t\t\t\t\t\t   113, 102,  73, 181};\r\nstatic BYTE byRSExp46[] = {112,  94,  88, 112, 253, 224, 202, 115, 187,  99,  89,   5,  54, 113, 129,  44,  58,  16, 135, 216,\r\n\t\t\t\t\t\t   169, 211,  36,   1,   4,  96,  60, 241,  73, 104, 234,   8, 249, 245, 119, 174,  52,  25, 157, 224,\r\n\t\t\t\t\t\t    43, 202, 223,  19,  82,  15};\r\nstatic BYTE byRSExp48[] = {228,  25, 196, 130, 211, 146,  60,  24, 251,  90,  39, 102, 240,  61, 178,  63,  46, 123, 115,  18,\r\n\t\t\t\t\t\t   221, 111, 135, 160, 182, 205, 107, 206,  95, 150, 120, 184,  91,  21, 247, 156, 140, 238, 191,  11,\r\n\t\t\t\t\t\t    94, 227,  84,  50, 163,  39,  34, 108};\r\nstatic BYTE byRSExp50[] = {232, 125, 157, 161, 164,   9, 118,  46, 209,  99, 203, 193,  35,   3, 209, 111, 195, 242, 203, 225,\r\n\t\t\t\t\t\t    46,  13,  32, 160, 126, 209, 130, 160, 242, 215, 242,  75,  77,  42, 189,  32, 113,  65, 124,  69,\r\n\t\t\t\t\t\t   228, 114, 235, 175, 124, 170, 215, 232, 133, 205};\r\nstatic BYTE byRSExp52[] = {116,  50,  86, 186,  50, 220, 251,  89, 192,  46,  86, 127, 124,  19, 184, 233, 151, 215,  22,  14,\r\n\t\t\t\t\t\t    59, 145,  37, 242, 203, 134, 254,  89, 190,  94,  59,  65, 124, 113, 100, 233, 235, 121,  22,  76,\r\n\t\t\t\t\t\t    86,  97,  39, 242, 200, 220, 101,  33, 239, 254, 116,  51};\r\nstatic BYTE byRSExp54[] = {183,  26, 201,  87, 210, 221, 113,  21,  46,  65,  45,  50, 238, 184, 249, 225, 102,  58, 209, 218,\r\n\t\t\t\t\t\t   109, 165,  26,  95, 184, 192,  52, 245,  35, 254, 238, 175, 172,  79, 123,  25, 122,  43, 120, 108,\r\n\t\t\t\t\t\t   215,  80, 128, 201, 235,   8, 153,  59, 101,  31, 198,  76,  31, 156};\r\nstatic BYTE byRSExp56[] = {106, 120, 107, 157, 164, 216, 112, 116,   2,  91, 248, 163,  36, 201, 202, 229,   6, 144, 254, 155,\r\n\t\t\t\t\t\t   135, 208, 170, 209,  12, 139, 127, 142, 182, 249, 177, 174, 190,  28,  10,  85, 239, 184, 101, 124,\r\n\t\t\t\t\t\t   152, 206,  96,  23, 163,  61,  27, 196, 247, 151, 154, 202, 207,  20,  61,  10};\r\nstatic BYTE byRSExp58[] = { 82, 116,  26, 247,  66,  27,  62, 107, 252, 182, 200, 185, 235,  55, 251, 242, 210, 144, 154, 237,\r\n\t\t\t\t\t\t   176, 141, 192, 248, 152, 249, 206,  85, 253, 142,  65, 165, 125,  23,  24,  30, 122, 240, 214,   6,\r\n\t\t\t\t\t\t   129, 218,  29, 145, 127, 134, 206, 245, 117,  29,  41,  63, 159, 142, 233, 125, 148, 123};\r\nstatic BYTE byRSExp60[] = {107, 140,  26,  12,   9, 141, 243, 197, 226, 197, 219,  45, 211, 101, 219, 120,  28, 181, 127,   6,\r\n\t\t\t\t\t\t   100, 247,   2, 205, 198,  57, 115, 219, 101, 109, 160,  82,  37,  38, 238,  49, 160, 209, 121,  86,\r\n\t\t\t\t\t\t    11, 124,  30, 181,  84,  25, 194,  87,  65, 102, 190, 220,  70,  27, 209,  16,  89,   7,  33, 240};\r\nstatic BYTE byRSExp62[] = { 65, 202, 113,  98,  71, 223, 248, 118, 214,  94,   0, 122,  37,  23,   2, 228,  58, 121,   7, 105,\r\n\t\t\t\t\t\t   135,  78, 243, 118,  70,  76, 223,  89,  72,  50,  70, 111, 194,  17, 212, 126, 181,  35, 221, 117,\r\n\t\t\t\t\t\t   235,  11, 229, 149, 147, 123, 213,  40, 115,   6, 200, 100,  26, 246, 182, 218, 127, 215,  36, 186,\r\n\t\t\t\t\t\t   110, 106};\r\nstatic BYTE byRSExp64[] = { 45,  51, 175,   9,   7, 158, 159,  49,  68, 119,  92, 123, 177, 204, 187, 254, 200,  78, 141, 149,\r\n\t\t\t\t\t\t   119,  26, 127,  53, 160,  93, 199, 212,  29,  24, 145, 156, 208, 150, 218, 209,   4, 216,  91,  47,\r\n\t\t\t\t\t\t   184, 146,  47, 140, 195, 195, 125, 242, 238,  63,  99, 108, 140, 230, 242,  31, 204,  11, 178, 243,\r\n\t\t\t\t\t\t   217, 156, 213, 231};\r\nstatic BYTE byRSExp66[] = {  5, 118, 222, 180, 136, 136, 162,  51,  46, 117,  13, 215,  81,  17, 139, 247, 197, 171,  95, 173,\r\n\t\t\t\t\t\t    65, 137, 178,  68, 111,  95, 101,  41,  72, 214, 169, 197,  95,   7,  44, 154,  77, 111, 236,  40,\r\n\t\t\t\t\t\t   121, 143,  63,  87,  80, 253, 240, 126, 217,  77,  34, 232, 106,  50, 168,  82,  76, 146,  67, 106,\r\n\t\t\t\t\t\t   171,  25, 132,  93,  45, 105};\r\nstatic BYTE byRSExp68[] = {247, 159, 223,  33, 224,  93,  77,  70,  90, 160,  32, 254,  43, 150,  84, 101, 190, 205, 133,  52,\r\n\t\t\t\t\t\t    60, 202, 165, 220, 203, 151,  93,  84,  15,  84, 253, 173, 160,  89, 227,  52, 199,  97,  95, 231,\r\n\t\t\t\t\t\t    52, 177,  41, 125, 137, 241, 166, 225, 118,   2,  54,  32,  82, 215, 175, 198,  43, 238, 235,  27,\r\n\t\t\t\t\t\t   101, 184, 127,   3,   5,   8, 163, 238};\r\n\r\nstatic LPBYTE  byRSExp[] = {NULL,      NULL,      NULL,      NULL,      NULL,      NULL,      NULL,      byRSExp7,  NULL,      NULL,\r\n\t\t\t\t\t\t\tbyRSExp10, NULL,      NULL,      byRSExp13, NULL,      byRSExp15, byRSExp16, byRSExp17, byRSExp18, NULL,\r\n\t\t\t\t\t\t\tbyRSExp20, NULL,      byRSExp22, NULL,      byRSExp24, NULL,      byRSExp26, NULL,      byRSExp28, NULL,\r\n\t\t\t\t\t\t\tbyRSExp30, NULL,      byRSExp32, NULL,      byRSExp34, NULL,      byRSExp36, NULL,      byRSExp38, NULL,\r\n\t\t\t\t\t\t\tbyRSExp40, NULL,      byRSExp42, NULL,      byRSExp44, NULL,      byRSExp46, NULL,      byRSExp48, NULL,\r\n\t\t\t\t\t\t\tbyRSExp50, NULL,      byRSExp52, NULL,      byRSExp54, NULL,      byRSExp56, NULL,      byRSExp58, NULL,\r\n\t\t\t\t\t\t\tbyRSExp60, NULL,      byRSExp62, NULL,      byRSExp64, NULL,      byRSExp66, NULL,      byRSExp68};\r\n\r\n// CWP[^rbg(o[WO[v, {S, M, L})\r\nstatic int nIndicatorLenNumeral[]  = {10, 12, 14};\r\nstatic int nIndicatorLenAlphabet[] = { 9, 11, 13};\r\nstatic int nIndicatorLen8Bit[]\t   = { 8, 16, 16};\r\nstatic int nIndicatorLenKanji[]\t   = { 8, 10, 12};\r\n\r\n\r\n/////////////////////////////////////////////////////////////////////////////\r\n// QR_Encode NX̍\\z/\r\n\r\nCQR_Encode::CQR_Encode()\r\n{\r\n}\r\n\r\nCQR_Encode::~CQR_Encode()\r\n{\r\n}\r\nint min(int a, int b);\r\nint min(int a, int b) {\r\n    if (a<=b) {\r\n        return a;\r\n    }\r\n    else {\r\n        return b;\r\n    }\r\n}\r\n\r\n/////////////////////////////////////////////////////////////////////////////\r\n// CQR_Encode::EncodeData\r\n// p  rFf[^GR[h\r\n//   FxA^(0=)A^ԎgtOA}XLOԍ(-1=)AGR[hf[^AGR[hf[^\r\n// ߂lFGR[h=trueAf[^ȂA܂͗eʃI[o[=false\r\n\r\nbool CQR_Encode::EncodeData(int nLevel, int nVersion, bool bAutoExtent, int nMaskingNo, LPCSTR lpsSource, int ncSource)\r\n{\r\n\tint i, j;\r\n\r\n\tm_nLevel = nLevel;\r\n\tm_nMaskingNo = nMaskingNo;\r\n\r\n\t// f[^w肳ĂȂꍇ lstrlen ɂĎ擾\r\n\tint ncLength = ncSource > 0 ? ncSource : strlen(lpsSource);\r\n\r\n\tif (ncLength == 0)\r\n\t\treturn false; // f[^Ȃ\r\n\r\n\t// o[W(^)`FbN\r\n\tint nEncodeVersion = GetEncodeVersion(nVersion, lpsSource, ncLength);\r\n\r\n\tif (nEncodeVersion == 0)\r\n\t\treturn false; // eʃI[o[\r\n\r\n\tif (nVersion == 0)\r\n\t{\r\n\t\t// ^Ԏ\r\n\t\tm_nVersion = nEncodeVersion;\r\n\t}\r\n\telse\r\n\t{\r\n\t\tif (nEncodeVersion <= nVersion)\r\n\t\t{\r\n\t\t\tm_nVersion = nVersion;\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tif (bAutoExtent)\r\n\t\t\t\tm_nVersion = nEncodeVersion; // o[W(^)g\r\n\t\t\telse\r\n\t\t\t\treturn false; // eʃI[o[\r\n\t\t}\r\n\t}\r\n\r\n\t// ^[~l[^R[h\"0000\"t\r\n\tint ncDataCodeWord = QR_VersonInfo[m_nVersion].ncDataCodeWord[nLevel];\r\n\r\n\tint ncTerminater = min(4, (ncDataCodeWord * 8) - m_ncDataCodeWordBit);\r\n\r\n\tif (ncTerminater > 0)\r\n\t\tm_ncDataCodeWordBit = SetBitStream(m_ncDataCodeWordBit, 0, ncTerminater);\r\n\r\n\t// pfBOR[h\"11101100, 00010001\"t\r\n\tBYTE byPaddingCode = 0xec;\r\n\r\n\tfor (i = (m_ncDataCodeWordBit + 7) / 8; i < ncDataCodeWord; ++i)\r\n\t{\r\n\t\tm_byDataCodeWord[i] = byPaddingCode;\r\n\r\n\t\tbyPaddingCode = (BYTE)(byPaddingCode == 0xec ? 0x11 : 0xec);\r\n\t}\r\n\r\n\t// R[h[hZoGANA\r\n\tm_ncAllCodeWord = QR_VersonInfo[m_nVersion].ncAllCodeWord;\r\n\tZeroMemory(m_byAllCodeWord, m_ncAllCodeWord);\r\n\r\n\tint nDataCwIndex = 0; // f[^R[h[hʒu\r\n\r\n\t// f[^ubN\r\n\tint ncBlock1 = QR_VersonInfo[m_nVersion].RS_BlockInfo1[nLevel].ncRSBlock;\r\n\tint ncBlock2 = QR_VersonInfo[m_nVersion].RS_BlockInfo2[nLevel].ncRSBlock;\r\n\tint ncBlockSum = ncBlock1 + ncBlock2;\r\n\r\n\tint nBlockNo = 0; // ubNԍ\r\n\r\n\t// ubNʃf[^R[h[h\r\n\tint ncDataCw1 = QR_VersonInfo[m_nVersion].RS_BlockInfo1[nLevel].ncDataCodeWord;\r\n\tint ncDataCw2 = QR_VersonInfo[m_nVersion].RS_BlockInfo2[nLevel].ncDataCodeWord;\r\n\r\n\t// f[^R[h[hC^[[uzu\r\n\tfor (i = 0; i < ncBlock1; ++i)\r\n\t{\r\n\t\tfor (j = 0; j < ncDataCw1; ++j)\r\n\t\t{\r\n\t\t\tm_byAllCodeWord[(ncBlockSum * j) + nBlockNo] = m_byDataCodeWord[nDataCwIndex++];\r\n\t\t}\r\n\r\n\t\t++nBlockNo;\r\n\t}\r\n\r\n\tfor (i = 0; i < ncBlock2; ++i)\r\n\t{\r\n\t\tfor (j = 0; j < ncDataCw2; ++j)\r\n\t\t{\r\n\t\t\tif (j < ncDataCw1)\r\n\t\t\t{\r\n\t\t\t\tm_byAllCodeWord[(ncBlockSum * j) + nBlockNo] = m_byDataCodeWord[nDataCwIndex++];\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t// QڃubN[zu\r\n\t\t\t\tm_byAllCodeWord[(ncBlockSum * ncDataCw1) + i]  = m_byDataCodeWord[nDataCwIndex++];\r\n\t\t\t}\t\r\n\t\t}\r\n\r\n\t\t++nBlockNo;\r\n\t}\r\n\r\n\t// ubNʂqrR[h[h(ł͓)\r\n\tint ncRSCw1 = QR_VersonInfo[m_nVersion].RS_BlockInfo1[nLevel].ncAllCodeWord - ncDataCw1;\r\n\tint ncRSCw2 = QR_VersonInfo[m_nVersion].RS_BlockInfo2[nLevel].ncAllCodeWord - ncDataCw2;\r\n\r\n\t/////////////////////////////////////////////////////////////////////////\r\n\t// qrR[h[hZo\r\n\r\n\tnDataCwIndex = 0;\r\n\tnBlockNo = 0;\r\n\r\n\tfor (i = 0; i < ncBlock1; ++i)\r\n\t{\r\n\t\tZeroMemory(m_byRSWork, sizeof(m_byRSWork));\r\n\r\n\t\tmemmove(m_byRSWork, m_byDataCodeWord + nDataCwIndex, ncDataCw1);\r\n\r\n\t\tGetRSCodeWord(m_byRSWork, ncDataCw1, ncRSCw1);\r\n\r\n\t\t// qrR[h[hzu\r\n\t\tfor (j = 0; j < ncRSCw1; ++j)\r\n\t\t{\r\n\t\t\tm_byAllCodeWord[ncDataCodeWord + (ncBlockSum * j) + nBlockNo] = m_byRSWork[j];\r\n\t\t}\r\n\r\n\t\tnDataCwIndex += ncDataCw1;\r\n\t\t++nBlockNo;\r\n\t}\r\n\r\n\tfor (i = 0; i < ncBlock2; ++i)\r\n\t{\r\n\t\tZeroMemory(m_byRSWork, sizeof(m_byRSWork));\r\n\r\n\t\tmemmove(m_byRSWork, m_byDataCodeWord + nDataCwIndex, ncDataCw2);\r\n\r\n\t\tGetRSCodeWord(m_byRSWork, ncDataCw2, ncRSCw2);\r\n\r\n\t\t// qrR[h[hzu\r\n\t\tfor (j = 0; j < ncRSCw2; ++j)\r\n\t\t{\r\n\t\t\tm_byAllCodeWord[ncDataCodeWord + (ncBlockSum * j) + nBlockNo] = m_byRSWork[j];\r\n\t\t}\r\n\r\n\t\tnDataCwIndex += ncDataCw2;\r\n\t\t++nBlockNo;\r\n\t}\r\n\r\n\tm_nSymbleSize = m_nVersion * 4 + 17;\r\n\r\n\t// W[zu\r\n\tFormatModule();\r\n\r\n\treturn true;\r\n}\r\n\r\n\r\n/////////////////////////////////////////////////////////////////////////////\r\n// CQR_Encode::GetEncodeVersion\r\n// p  rFGR[ho[W(^)擾\r\n//   FJno[WAGR[hf[^AGR[hf[^\r\n// ߂lFo[WԍieʃI[o[=0j\r\n\r\nint CQR_Encode::GetEncodeVersion(int nVersion, LPCSTR lpsSource, int ncLength)\r\n{\r\n\tint nVerGroup = nVersion >= 27 ? QR_VRESION_L : (nVersion >= 10 ? QR_VRESION_M : QR_VRESION_S);\r\n\tint i, j;\r\n\r\n\tfor (i = nVerGroup; i <= QR_VRESION_L; ++i)\r\n\t{\r\n\t\tif (EncodeSourceData(lpsSource, ncLength, i))\r\n\t\t{\r\n\t\t\tif (i == QR_VRESION_S)\r\n\t\t\t{\r\n\t\t\t\tfor (j = 1; j <= 9; ++j)\r\n\t\t\t\t{\r\n\t\t\t\t\tif ((m_ncDataCodeWordBit + 7) / 8 <= QR_VersonInfo[j].ncDataCodeWord[m_nLevel])\r\n\t\t\t\t\t\treturn j;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse if (i == QR_VRESION_M)\r\n\t\t\t{\r\n\t\t\t\tfor (j = 10; j <= 26; ++j)\r\n\t\t\t\t{\r\n\t\t\t\t\tif ((m_ncDataCodeWordBit + 7) / 8 <= QR_VersonInfo[j].ncDataCodeWord[m_nLevel])\r\n\t\t\t\t\t\treturn j;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse if (i == QR_VRESION_L)\r\n\t\t\t{\r\n\t\t\t\tfor (j = 27; j <= 40; ++j)\r\n\t\t\t\t{\r\n\t\t\t\t\tif ((m_ncDataCodeWordBit + 7) / 8 <= QR_VersonInfo[j].ncDataCodeWord[m_nLevel])\r\n\t\t\t\t\t\treturn j;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\treturn 0;\r\n}\r\n\r\n\r\n/////////////////////////////////////////////////////////////////////////////\r\n// CQR_Encode::EncodeSourceData\r\n// p  rF̓f[^GR[h\r\n//   F̓f[^A̓f[^Ao[W(^)O[v\r\n// ߂lFGR[h=true\r\n\r\nbool CQR_Encode::EncodeSourceData(LPCSTR lpsSource, int ncLength, int nVerGroup)\r\n{\r\n\tZeroMemory(m_nBlockLength, sizeof(m_nBlockLength));\r\n\r\n\tint i, j;\r\n\r\n\t// ǂ̃[h(oCg)pĂ邩𒲍\r\n\tfor (m_ncDataBlock = i = 0; i < ncLength; ++i)\r\n\t{\r\n\t\tBYTE byMode;\r\n\r\n\t\tif (i < ncLength - 1 && IsKanjiData(lpsSource[i], lpsSource[i + 1]))\r\n\t\t\tbyMode = QR_MODE_KANJI;\r\n\t\telse if (IsNumeralData(lpsSource[i]))\r\n\t\t\tbyMode = QR_MODE_NUMERAL;\r\n\t\telse if (IsAlphabetData(lpsSource[i]))\r\n\t\t\tbyMode = QR_MODE_ALPHABET;\r\n\t\telse\r\n\t\t\tbyMode = QR_MODE_8BIT;\r\n\r\n\t\tif (i == 0)\r\n\t\t\tm_byBlockMode[0] = byMode;\r\n\r\n\t\tif (m_byBlockMode[m_ncDataBlock] != byMode)\r\n\t\t\tm_byBlockMode[++m_ncDataBlock] = byMode;\r\n\r\n\t\t++m_nBlockLength[m_ncDataBlock];\r\n\r\n\t\tif (byMode == QR_MODE_KANJI)\r\n\t\t{\r\n\t\t\t// ͕ł͂Ȃ\tŋL^\r\n\t\t\t++m_nBlockLength[m_ncDataBlock];\r\n\t\t\t++i;\r\n\t\t}\r\n\t}\r\n\r\n\t++m_ncDataBlock;\r\n\r\n\t/////////////////////////////////////////////////////////////////////////\r\n\t// אڂp[hubNƐ[hubN̕тɂ茋\r\n\r\n\tint ncSrcBits, ncDstBits; // ̃rbgƒP̉p[hubNꍇ̃rbg\r\n\r\n\tint nBlock = 0;\r\n\r\n\twhile (nBlock < m_ncDataBlock - 1)\r\n\t{\r\n\t\tint ncJoinFront, ncJoinBehind; // OWrbgoCg[hubNƌꍇ̃rbg\r\n\t\tint nJoinPosition = 0; // WrbgoCg[hubNƂ̌F-1=OƌA0=ȂA1=ƌ\r\n\r\n\t\t// u|pv܂́up|v̕\r\n\t\tif ((m_byBlockMode[nBlock] == QR_MODE_NUMERAL  && m_byBlockMode[nBlock + 1] == QR_MODE_ALPHABET) ||\r\n\t\t\t(m_byBlockMode[nBlock] == QR_MODE_ALPHABET && m_byBlockMode[nBlock + 1] == QR_MODE_NUMERAL))\r\n\t\t{\r\n\t\t\t// ̃rbgƒP̉p[hubNꍇ̃rbgr\r\n\t\t\tncSrcBits = GetBitLength(m_byBlockMode[nBlock], m_nBlockLength[nBlock], nVerGroup) +\r\n\t\t\t\t\t\tGetBitLength(m_byBlockMode[nBlock + 1], m_nBlockLength[nBlock + 1], nVerGroup);\r\n\r\n\t\t\tncDstBits = GetBitLength(QR_MODE_ALPHABET, m_nBlockLength[nBlock] + m_nBlockLength[nBlock + 1], nVerGroup);\r\n\r\n\t\t\tif (ncSrcBits > ncDstBits)\r\n\t\t\t{\r\n\t\t\t\t// OɂWrbgoCg[hubNꍇAƂ̌Lǂ`FbN\r\n\t\t\t\tif (nBlock >= 1 && m_byBlockMode[nBlock - 1] == QR_MODE_8BIT)\r\n\t\t\t\t{\r\n\t\t\t\t\t// OɂWrbgoCg[hubN\r\n\t\t\t\t\tncJoinFront = GetBitLength(QR_MODE_8BIT, m_nBlockLength[nBlock - 1] + m_nBlockLength[nBlock], nVerGroup) +\r\n\t\t\t\t\t\t\t\t  GetBitLength(m_byBlockMode[nBlock + 1], m_nBlockLength[nBlock + 1], nVerGroup);\r\n\r\n\t\t\t\t\tif (ncJoinFront > ncDstBits + GetBitLength(QR_MODE_8BIT, m_nBlockLength[nBlock - 1], nVerGroup))\r\n\t\t\t\t\t\tncJoinFront = 0; // WrbgoCg[hubNƂ͌Ȃ\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t\tncJoinFront = 0;\r\n\r\n\t\t\t\tif (nBlock < m_ncDataBlock - 2 && m_byBlockMode[nBlock + 2] == QR_MODE_8BIT)\r\n\t\t\t\t{\r\n\t\t\t\t\t// ɂWrbgoCg[hubN\r\n\t\t\t\t\tncJoinBehind = GetBitLength(m_byBlockMode[nBlock], m_nBlockLength[nBlock], nVerGroup) +\r\n\t\t\t\t\t\t\t\t   GetBitLength(QR_MODE_8BIT, m_nBlockLength[nBlock + 1] + m_nBlockLength[nBlock + 2], nVerGroup);\r\n\r\n\t\t\t\t\tif (ncJoinBehind > ncDstBits + GetBitLength(QR_MODE_8BIT, m_nBlockLength[nBlock + 2], nVerGroup))\r\n\t\t\t\t\t\tncJoinBehind = 0; // WrbgoCg[hubNƂ͌Ȃ\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t\tncJoinBehind = 0;\r\n\r\n\t\t\t\tif (ncJoinFront != 0 && ncJoinBehind != 0)\r\n\t\t\t\t{\r\n\t\t\t\t\t// O㗼ɂWrbgoCg[hubNꍇ̓f[^ZȂD\r\n\t\t\t\t\tnJoinPosition = (ncJoinFront < ncJoinBehind) ? -1 : 1;\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\tnJoinPosition = (ncJoinFront != 0) ? -1 : ((ncJoinBehind != 0) ? 1 : 0);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (nJoinPosition != 0)\r\n\t\t\t\t{\r\n\t\t\t\t\t// WrbgoCg[hubNƂ̌\r\n\t\t\t\t\tif (nJoinPosition == -1)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tm_nBlockLength[nBlock - 1] += m_nBlockLength[nBlock];\r\n\r\n\t\t\t\t\t\t// 㑱Vtg\r\n\t\t\t\t\t\tfor (i = nBlock; i < m_ncDataBlock - 1; ++i)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tm_byBlockMode[i]  = m_byBlockMode[i + 1];\r\n\t\t\t\t\t\t\tm_nBlockLength[i] = m_nBlockLength[i + 1];\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tm_byBlockMode[nBlock + 1] = QR_MODE_8BIT;\r\n\t\t\t\t\t\tm_nBlockLength[nBlock + 1] += m_nBlockLength[nBlock + 2];\r\n\r\n\t\t\t\t\t\t// 㑱Vtg\r\n\t\t\t\t\t\tfor (i = nBlock + 2; i < m_ncDataBlock - 1; ++i)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tm_byBlockMode[i]  = m_byBlockMode[i + 1];\r\n\t\t\t\t\t\t\tm_nBlockLength[i] = m_nBlockLength[i + 1];\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t--m_ncDataBlock;\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\t// pƐ̕тP̉p[hubNɓ\r\n\r\n\t\t\t\t\tif (nBlock < m_ncDataBlock - 2 && m_byBlockMode[nBlock + 2] == QR_MODE_ALPHABET)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t// 悤ƂubŇɑp[hubN\r\n\t\t\t\t\t\tm_nBlockLength[nBlock + 1] += m_nBlockLength[nBlock + 2];\r\n\r\n\t\t\t\t\t\t// 㑱Vtg\r\n\t\t\t\t\t\tfor (i = nBlock + 2; i < m_ncDataBlock - 1; ++i)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tm_byBlockMode[i]  = m_byBlockMode[i + 1];\r\n\t\t\t\t\t\t\tm_nBlockLength[i] = m_nBlockLength[i + 1];\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t--m_ncDataBlock;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tm_byBlockMode[nBlock] = QR_MODE_ALPHABET;\r\n\t\t\t\t\tm_nBlockLength[nBlock] += m_nBlockLength[nBlock + 1];\r\n\r\n\t\t\t\t\t// 㑱Vtg\r\n\t\t\t\t\tfor (i = nBlock + 1; i < m_ncDataBlock - 1; ++i)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tm_byBlockMode[i]  = m_byBlockMode[i + 1];\r\n\t\t\t\t\t\tm_nBlockLength[i] = m_nBlockLength[i + 1];\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t--m_ncDataBlock;\r\n\r\n\t\t\t\t\tif (nBlock >= 1 && m_byBlockMode[nBlock - 1] == QR_MODE_ALPHABET)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t// ubN̑Ỏp[hubN\r\n\t\t\t\t\t\tm_nBlockLength[nBlock - 1] += m_nBlockLength[nBlock];\r\n\r\n\t\t\t\t\t\t// 㑱Vtg\r\n\t\t\t\t\t\tfor (i = nBlock; i < m_ncDataBlock - 1; ++i)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tm_byBlockMode[i]  = m_byBlockMode[i + 1];\r\n\t\t\t\t\t\t\tm_nBlockLength[i] = m_nBlockLength[i + 1];\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t--m_ncDataBlock;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tcontinue; // ݈ʒũubNĒ\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t++nBlock; // ubN𒲍\r\n\t}\r\n\r\n\t/////////////////////////////////////////////////////////////////////////\r\n\t// AZ[hubNWrbgoCg[hubN\r\n\r\n\tnBlock = 0;\r\n\r\n\twhile (nBlock < m_ncDataBlock - 1)\r\n\t{\r\n\t\tncSrcBits = GetBitLength(m_byBlockMode[nBlock], m_nBlockLength[nBlock], nVerGroup)\r\n\t\t\t\t\t+ GetBitLength(m_byBlockMode[nBlock + 1], m_nBlockLength[nBlock + 1], nVerGroup);\r\n\r\n\t\tncDstBits = GetBitLength(QR_MODE_8BIT, m_nBlockLength[nBlock] + m_nBlockLength[nBlock + 1], nVerGroup);\r\n\r\n\t\t// OɂWrbgoCg[hubNꍇAdCWP[^Z\r\n\t\tif (nBlock >= 1 && m_byBlockMode[nBlock - 1] == QR_MODE_8BIT)\r\n\t\t\tncDstBits -= (4 + nIndicatorLen8Bit[nVerGroup]);\r\n\r\n\t\t// ɂWrbgoCg[hubNꍇAdCWP[^Z\r\n\t\tif (nBlock < m_ncDataBlock - 2 && m_byBlockMode[nBlock + 2] == QR_MODE_8BIT)\r\n\t\t\tncDstBits -= (4 + nIndicatorLen8Bit[nVerGroup]);\r\n\r\n\t\tif (ncSrcBits > ncDstBits)\r\n\t\t{\r\n\t\t\tif (nBlock >= 1 && m_byBlockMode[nBlock - 1] == QR_MODE_8BIT)\r\n\t\t\t{\r\n\t\t\t\t// ubN̑OɂWrbgoCg[hubN\r\n\t\t\t\tm_nBlockLength[nBlock - 1] += m_nBlockLength[nBlock];\r\n\r\n\t\t\t\t// 㑱Vtg\r\n\t\t\t\tfor (i = nBlock; i < m_ncDataBlock - 1; ++i)\r\n\t\t\t\t{\r\n\t\t\t\t\tm_byBlockMode[i]  = m_byBlockMode[i + 1];\r\n\t\t\t\t\tm_nBlockLength[i] = m_nBlockLength[i + 1];\r\n\t\t\t\t}\r\n\r\n\t\t\t\t--m_ncDataBlock;\r\n\t\t\t\t--nBlock;\r\n\t\t\t}\r\n\r\n\t\t\tif (nBlock < m_ncDataBlock - 2 && m_byBlockMode[nBlock + 2] == QR_MODE_8BIT)\r\n\t\t\t{\r\n\t\t\t\t// ubŇɂWrbgoCg[hubN\r\n\t\t\t\tm_nBlockLength[nBlock + 1] += m_nBlockLength[nBlock + 2];\r\n\r\n\t\t\t\t// 㑱Vtg\r\n\t\t\t\tfor (i = nBlock + 2; i < m_ncDataBlock - 1; ++i)\r\n\t\t\t\t{\r\n\t\t\t\t\tm_byBlockMode[i]  = m_byBlockMode[i + 1];\r\n\t\t\t\t\tm_nBlockLength[i] = m_nBlockLength[i + 1];\r\n\t\t\t\t}\r\n\r\n\t\t\t\t--m_ncDataBlock;\r\n\t\t\t}\r\n\r\n\t\t\tm_byBlockMode[nBlock] = QR_MODE_8BIT;\r\n\t\t\tm_nBlockLength[nBlock] += m_nBlockLength[nBlock + 1];\r\n\r\n\t\t\t// 㑱Vtg\r\n\t\t\tfor (i = nBlock + 1; i < m_ncDataBlock - 1; ++i)\r\n\t\t\t{\r\n\t\t\t\tm_byBlockMode[i]  = m_byBlockMode[i + 1];\r\n\t\t\t\tm_nBlockLength[i] = m_nBlockLength[i + 1];\r\n\t\t\t}\r\n\r\n\t\t\t--m_ncDataBlock;\r\n\r\n\t\t\t// ubN̑OĒ\r\n\t\t\tif (nBlock >= 1)\r\n\t\t\t\t--nBlock;\r\n\r\n\t\t\tcontinue;\r\n\t\t}\r\n\r\n\t\t++nBlock; // ubN𒲍\r\n\t}\r\n\r\n\t/////////////////////////////////////////////////////////////////////////\r\n\t// rbgz\r\n\tint ncComplete = 0; // σf[^JE^\r\n\tWORD wBinCode;\r\n\r\n\tm_ncDataCodeWordBit = 0; // rbgPʏJE^\r\n\r\n\tZeroMemory(m_byDataCodeWord, MAX_DATACODEWORD);\r\n\r\n\tfor (i = 0; i < m_ncDataBlock && m_ncDataCodeWordBit != -1; ++i)\r\n\t{\r\n\t\tif (m_byBlockMode[i] == QR_MODE_NUMERAL)\r\n\t\t{\r\n\t\t\t/////////////////////////////////////////////////////////////////\r\n\t\t\t// [h\r\n\r\n\t\t\t// CWP[^(0001b)\r\n\t\t\tm_ncDataCodeWordBit = SetBitStream(m_ncDataCodeWordBit, 1, 4); \r\n\r\n\t\t\t// Zbg\r\n\t\t\tm_ncDataCodeWordBit = SetBitStream(m_ncDataCodeWordBit, (WORD)m_nBlockLength[i], nIndicatorLenNumeral[nVerGroup]);\r\n\r\n\t\t\t// rbgۑ\r\n\t\t\tfor (j = 0; j < m_nBlockLength[i]; j += 3)\r\n\t\t\t{\r\n\t\t\t\tif (j < m_nBlockLength[i] - 2)\r\n\t\t\t\t{\r\n\t\t\t\t\twBinCode = (WORD)(((lpsSource[ncComplete + j]\t  - '0') * 100) +\r\n\t\t\t\t\t\t\t\t\t  ((lpsSource[ncComplete + j + 1] - '0') * 10) +\r\n\t\t\t\t\t\t\t\t\t   (lpsSource[ncComplete + j + 2] - '0'));\r\n\r\n\t\t\t\t\tm_ncDataCodeWordBit = SetBitStream(m_ncDataCodeWordBit, wBinCode, 10);\r\n\t\t\t\t}\r\n\t\t\t\telse if (j == m_nBlockLength[i] - 2)\r\n\t\t\t\t{\r\n\t\t\t\t\t// [QoCg\r\n\t\t\t\t\twBinCode = (WORD)(((lpsSource[ncComplete + j] - '0') * 10) +\r\n\t\t\t\t\t\t\t\t\t   (lpsSource[ncComplete + j + 1] - '0'));\r\n\r\n\t\t\t\t\tm_ncDataCodeWordBit = SetBitStream(m_ncDataCodeWordBit, wBinCode, 7);\r\n\t\t\t\t}\r\n\t\t\t\telse if (j == m_nBlockLength[i] - 1)\r\n\t\t\t\t{\r\n\t\t\t\t\t// [PoCg\r\n\t\t\t\t\twBinCode = (WORD)(lpsSource[ncComplete + j] - '0');\r\n\r\n\t\t\t\t\tm_ncDataCodeWordBit = SetBitStream(m_ncDataCodeWordBit, wBinCode, 4);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tncComplete += m_nBlockLength[i];\r\n\t\t}\r\n\r\n\t\telse if (m_byBlockMode[i] == QR_MODE_ALPHABET)\r\n\t\t{\r\n\t\t\t/////////////////////////////////////////////////////////////////\r\n\t\t\t// p[h\r\n\r\n\t\t\t// [hCWP[^(0010b)\r\n\t\t\tm_ncDataCodeWordBit = SetBitStream(m_ncDataCodeWordBit, 2, 4);\r\n\r\n\t\t\t// Zbg\r\n\t\t\tm_ncDataCodeWordBit = SetBitStream(m_ncDataCodeWordBit, (WORD)m_nBlockLength[i], nIndicatorLenAlphabet[nVerGroup]);\r\n\r\n\t\t\t// rbgۑ\r\n\t\t\tfor (j = 0; j < m_nBlockLength[i]; j += 2)\r\n\t\t\t{\r\n\t\t\t\tif (j < m_nBlockLength[i] - 1)\r\n\t\t\t\t{\r\n\t\t\t\t\twBinCode = (WORD)((AlphabetToBinaly(lpsSource[ncComplete + j]) * 45) +\r\n\t\t\t\t\t\t\t\t\t   AlphabetToBinaly(lpsSource[ncComplete + j + 1]));\r\n\r\n\t\t\t\t\tm_ncDataCodeWordBit = SetBitStream(m_ncDataCodeWordBit, wBinCode, 11);\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\t// [PoCg\r\n\t\t\t\t\twBinCode = (WORD)AlphabetToBinaly(lpsSource[ncComplete + j]);\r\n\r\n\t\t\t\t\tm_ncDataCodeWordBit = SetBitStream(m_ncDataCodeWordBit, wBinCode, 6);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tncComplete += m_nBlockLength[i];\r\n\t\t}\r\n\r\n\t\telse if (m_byBlockMode[i] == QR_MODE_8BIT)\r\n\t\t{\r\n\t\t\t/////////////////////////////////////////////////////////////////\r\n\t\t\t// WrbgoCg[h\r\n\r\n\t\t\t// [hCWP[^(0100b)\r\n\t\t\tm_ncDataCodeWordBit = SetBitStream(m_ncDataCodeWordBit, 4, 4);\r\n\r\n\t\t\t// Zbg\r\n\t\t\tm_ncDataCodeWordBit = SetBitStream(m_ncDataCodeWordBit, (WORD)m_nBlockLength[i], nIndicatorLen8Bit[nVerGroup]);\r\n\r\n\t\t\t// rbgۑ\r\n\t\t\tfor (j = 0; j < m_nBlockLength[i]; ++j)\r\n\t\t\t{\r\n\t\t\t\tm_ncDataCodeWordBit = SetBitStream(m_ncDataCodeWordBit, (WORD)lpsSource[ncComplete + j], 8);\r\n\t\t\t}\r\n\r\n\t\t\tncComplete += m_nBlockLength[i];\r\n\t\t}\r\n\t\telse // m_byBlockMode[i] == QR_MODE_KANJI\r\n\t\t{\r\n\t\t\t/////////////////////////////////////////////////////////////////\r\n\t\t\t// [h\r\n\r\n\t\t\t// [hCWP[^(1000b)\r\n\t\t\tm_ncDataCodeWordBit = SetBitStream(m_ncDataCodeWordBit, 8, 4);\r\n\r\n\t\t\t// Zbg\r\n\t\t\tm_ncDataCodeWordBit = SetBitStream(m_ncDataCodeWordBit, (WORD)(m_nBlockLength[i] / 2), nIndicatorLenKanji[nVerGroup]);\r\n\r\n\t\t\t// [hŃrbgۑ\r\n\t\t\tfor (j = 0; j < m_nBlockLength[i] / 2; ++j)\r\n\t\t\t{\r\n\t\t\t\tWORD wBinCode = KanjiToBinaly((WORD)(((BYTE)lpsSource[ncComplete + (j * 2)] << 8) + (BYTE)lpsSource[ncComplete + (j * 2) + 1]));\r\n\r\n\t\t\t\tm_ncDataCodeWordBit = SetBitStream(m_ncDataCodeWordBit, wBinCode, 13);\r\n\t\t\t}\r\n\r\n\t\t\tncComplete += m_nBlockLength[i];\r\n\t\t}\r\n\t}\r\n\r\n\treturn (m_ncDataCodeWordBit != -1);\r\n}\r\n\r\n\r\n/////////////////////////////////////////////////////////////////////////////\r\n// CQR_Encode::GetBitLength\r\n// p  rFrbg擾\r\n//   Ff[^[hʁAf[^Ao[W(^)O[v\r\n// ߂lFf[^rbg\r\n//   lF[hł̃f[^͕ł͂ȂoCg\r\n\r\nint CQR_Encode::GetBitLength(BYTE nMode, int ncData, int nVerGroup)\r\n{\r\n\tint ncBits = 0;\r\n\r\n\tswitch (nMode)\r\n\t{\r\n\tcase QR_MODE_NUMERAL:\r\n\t\tncBits = 4 + nIndicatorLenNumeral[nVerGroup] + (10 * (ncData / 3));\r\n\t\tswitch (ncData % 3)\r\n\t\t{\r\n\t\tcase 1:\r\n\t\t\tncBits += 4;\r\n\t\t\tbreak;\r\n\t\tcase 2:\r\n\t\t\tncBits += 7;\r\n\t\t\tbreak;\r\n\t\tdefault: // case 0:\r\n\t\t\tbreak;\r\n\t\t}\r\n\r\n\t\tbreak;\r\n\r\n\tcase QR_MODE_ALPHABET:\r\n\t\tncBits = 4 + nIndicatorLenAlphabet[nVerGroup] + (11 * (ncData / 2)) + (6 * (ncData % 2));\r\n\t\tbreak;\r\n\r\n\tcase QR_MODE_8BIT:\r\n\t\tncBits = 4 + nIndicatorLen8Bit[nVerGroup] + (8 * ncData);\r\n\t\tbreak;\r\n\r\n\tdefault: // case QR_MODE_KANJI:\r\n\t\tncBits = 4 + nIndicatorLenKanji[nVerGroup] + (13 * (ncData / 2));\r\n\t\tbreak;\r\n\t}\r\n\r\n\treturn ncBits;\r\n}\r\n\r\n\r\n/////////////////////////////////////////////////////////////////////////////\r\n// CQR_Encode::SetBitStream\r\n// p  rFrbgZbg\r\n//   F}ʒuArbgzf[^Af[^rbg(ő16)\r\n// ߂lF}ʒu(obt@I[o[=-1)\r\n//   lFm_byDataCodeWord ɌʂZbg(v[)\r\n\r\nint CQR_Encode::SetBitStream(int nIndex, WORD wData, int ncData)\r\n{\r\n\tint i;\r\n\r\n\tif (nIndex == -1 || nIndex + ncData > MAX_DATACODEWORD * 8)\r\n\t\treturn -1;\r\n\r\n\tfor (i = 0; i < ncData; ++i)\r\n\t{\r\n\t\tif (wData & (1 << (ncData - i - 1)))\r\n\t\t{\r\n\t\t\tm_byDataCodeWord[(nIndex + i) / 8] |= 1 << (7 - ((nIndex + i) % 8));\r\n\t\t}\r\n\t}\r\n\r\n\treturn nIndex + ncData;\r\n}\r\n\r\n\r\n/////////////////////////////////////////////////////////////////////////////\r\n// CQR_Encode::IsNumeralData\r\n// p  rF[hY`FbN\r\n//   F\r\n// ߂lFY=true\r\n\r\nbool CQR_Encode::IsNumeralData(unsigned char c)\r\n{\r\n\tif (c >= '0' && c <= '9')\r\n\t\treturn true;\r\n\r\n\treturn false;\r\n}\r\n\r\n\r\n/////////////////////////////////////////////////////////////////////////////\r\n// CQR_Encode::IsAlphabetData\r\n// p  rFp[hY`FbN\r\n//   F\r\n// ߂lFY=true\r\n\r\nbool CQR_Encode::IsAlphabetData(unsigned char c)\r\n{\r\n\tif (c >= '0' && c <= '9')\r\n\t\treturn true;\r\n\r\n\tif (c >= 'A' && c <= 'Z')\r\n\t\treturn true;\r\n\r\n\tif (c == ' ' || c == '$' || c == '%' || c == '*' || c == '+' || c == '-' || c == '.' || c == '/' || c == ':')\r\n\t\treturn true;\r\n\r\n\treturn false;\r\n}\r\n\r\n\r\n/////////////////////////////////////////////////////////////////////////////\r\n// CQR_Encode::IsKanjiData\r\n// p  rF[hY`FbN\r\n//   Fi16rbgj\r\n// ߂lFY=true\r\n//   lFEBBFh ȍ~ S-JIS ͑ΏۊO\r\n\r\nbool CQR_Encode::IsKanjiData(unsigned char c1, unsigned char c2)\r\n{\r\n\tif (((c1 >= 0x81 && c1 <= 0x9f) || (c1 >= 0xe0 && c1 <= 0xeb)) && (c2 >= 0x40))\r\n\t{\r\n\t\tif ((c1 == 0x9f && c2 > 0xfc) || (c1 == 0xeb && c2 > 0xbf))\r\n\t\t\treturn false;\r\n\r\n\t\treturn true;\r\n\t}\r\n\r\n\treturn false;\r\n}\r\n\r\n\r\n/////////////////////////////////////////////////////////////////////////////\r\n// CQR_Encode::AlphabetToBinaly\r\n// p  rFp[h̃oCi\r\n//   FΏە\r\n// ߂lFoCil\r\n\r\nBYTE CQR_Encode::AlphabetToBinaly(unsigned char c)\r\n{\r\n\tif (c >= '0' && c <= '9') return (unsigned char)(c - '0');\r\n\r\n\tif (c >= 'A' && c <= 'Z') return (unsigned char)(c - 'A' + 10);\r\n\r\n\tif (c == ' ') return 36;\r\n\r\n\tif (c == '$') return 37;\r\n\r\n\tif (c == '%') return 38;\r\n\r\n\tif (c == '*') return 39;\r\n\r\n\tif (c == '+') return 40;\r\n\r\n\tif (c == '-') return 41;\r\n\r\n\tif (c == '.') return 42;\r\n\r\n\tif (c == '/') return 43;\r\n\r\n\treturn 44; // c == ':'\r\n}\r\n\r\n\r\n/////////////////////////////////////////////////////////////////////////////\r\n// CQR_Encode::KanjiToBinaly\r\n// p  rF[h̃oCi\r\n//   FΏە\r\n// ߂lFoCil\r\n\r\nWORD CQR_Encode::KanjiToBinaly(WORD wc)\r\n{\r\n\tif (wc >= 0x8140 && wc <= 0x9ffc)\r\n\t\twc -= 0x8140;\r\n\telse // (wc >= 0xe040 && wc <= 0xebbf)\r\n\t\twc -= 0xc140;\r\n\r\n\treturn (WORD)(((wc >> 8) * 0xc0) + (wc & 0x00ff));\r\n}\r\n\r\n\r\n/////////////////////////////////////////////////////////////////////////////\r\n// CQR_Encode::GetRSCodeWord\r\n// p  rFqrR[h[h擾\r\n//   Ff[^R[h[hAhXAf[^R[h[hAqrR[h[h\r\n//   lFR[h[h̃GAmۂĂĂяo\r\n\r\nvoid CQR_Encode::GetRSCodeWord(LPBYTE lpbyRSWork, int ncDataCodeWord, int ncRSCodeWord)\r\n{\r\n\tint i, j;\r\n\r\n\tfor (i = 0; i < ncDataCodeWord ; ++i)\r\n\t{\r\n\t\tif (lpbyRSWork[0] != 0)\r\n\t\t{\r\n\t\t\tBYTE nExpFirst = byIntToExp[lpbyRSWork[0]]; // W搔Zo\r\n\r\n\t\t\tfor (j = 0; j < ncRSCodeWord; ++j)\r\n\t\t\t{\r\n\t\t\t\t// e搔ɏ搔Zi% 255  ^255 = 1j\r\n\t\t\t\tBYTE nExpElement = (BYTE)(((int)(byRSExp[ncRSCodeWord][j] + nExpFirst)) % 255);\r\n\r\n\t\t\t\t// r_aɂ]Zo\r\n\t\t\t\tlpbyRSWork[j] = (BYTE)(lpbyRSWork[j + 1] ^ byExpToInt[nExpElement]);\r\n\t\t\t}\r\n\r\n\t\t\t// c茅Vtg\r\n\t\t\tfor (j = ncRSCodeWord; j < ncDataCodeWord + ncRSCodeWord - 1; ++j)\r\n\t\t\t\tlpbyRSWork[j] = lpbyRSWork[j + 1];\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t// c茅Vtg\r\n\t\t\tfor (j = 0; j < ncDataCodeWord + ncRSCodeWord - 1; ++j)\r\n\t\t\t\tlpbyRSWork[j] = lpbyRSWork[j + 1];\r\n\t\t}\r\n\t}\r\n}\r\n\r\n\r\n/////////////////////////////////////////////////////////////////////////////\r\n// CQR_Encode::FormatModule\r\n// p  rFW[ւ̃f[^zu\r\n// ߂lFӂ̃W[\r\n\r\nvoid CQR_Encode::FormatModule()\r\n{\r\n\tint i, j;\r\n\r\n\tZeroMemory(m_byModuleData, sizeof(m_byModuleData));\r\n\r\n\t// @\\W[zu\r\n\tSetFunctionModule();\r\n\r\n\t// f[^p^[zu\r\n\tSetCodeWordPattern();\r\n\r\n\tif (m_nMaskingNo == -1)\r\n\t{\r\n\t\t// œK}XLOp^[I\r\n\t\tm_nMaskingNo = 0;\r\n\r\n\t\tSetMaskingPattern(m_nMaskingNo); // }XLO\r\n\t\tSetFormatInfoPattern(m_nMaskingNo); // tH[}bgp^[zu\r\n\r\n\t\tint nMinPenalty = CountPenalty();\r\n\r\n\t\tfor (i = 1; i <= 7; ++i)\r\n\t\t{\r\n\t\t\tSetMaskingPattern(i); // }XLO\r\n\t\t\tSetFormatInfoPattern(i); // tH[}bgp^[zu\r\n\r\n\t\t\tint nPenalty = CountPenalty();\r\n\r\n\t\t\tif (nPenalty < nMinPenalty)\r\n\t\t\t{\r\n\t\t\t\tnMinPenalty = nPenalty;\r\n\t\t\t\tm_nMaskingNo = i;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tSetMaskingPattern(m_nMaskingNo); // }XLO\r\n\tSetFormatInfoPattern(m_nMaskingNo); // tH[}bgp^[zu\r\n\r\n\t// W[p^[u[lɕϊ\r\n\tfor (i = 0; i < m_nSymbleSize; ++i)\r\n\t{\r\n\t\tfor (j = 0; j < m_nSymbleSize; ++j)\r\n\t\t{\r\n\t\t\tm_byModuleData[i][j] = (BYTE)((m_byModuleData[i][j] & 0x11) != 0);\r\n\t\t}\r\n\t}\r\n}\r\n\r\n\r\n/////////////////////////////////////////////////////////////////////////////\r\n// CQR_Encode::SetFunctionModule\r\n// p  rF@\\W[zu\r\n//   lFtH[}bg͋@\\W[o^̂(f[^͋)\r\n\r\nvoid CQR_Encode::SetFunctionModule()\r\n{\r\n\tint i, j;\r\n\r\n\t// ʒuop^[\r\n\tSetFinderPattern(0, 0);\r\n\tSetFinderPattern(m_nSymbleSize - 7, 0);\r\n\tSetFinderPattern(0, m_nSymbleSize - 7);\r\n\r\n\t// ʒuop^[Zp[^\r\n\tfor (i = 0; i < 8; ++i)\r\n\t{\r\n\t\tm_byModuleData[i][7] = m_byModuleData[7][i] = '\\x20';\r\n\t\tm_byModuleData[m_nSymbleSize - 8][i] = m_byModuleData[m_nSymbleSize - 8 + i][7] = '\\x20';\r\n\t\tm_byModuleData[i][m_nSymbleSize - 8] = m_byModuleData[7][m_nSymbleSize - 8 + i] = '\\x20';\r\n\t}\r\n\r\n\t// tH[}bgLqʒu@\\W[Ƃēo^\r\n\tfor (i = 0; i < 9; ++i)\r\n\t{\r\n\t\tm_byModuleData[i][8] = m_byModuleData[8][i] = '\\x20';\r\n\t}\r\n\r\n\tfor (i = 0; i < 8; ++i)\r\n\t{\r\n\t\tm_byModuleData[m_nSymbleSize - 8 + i][8] = m_byModuleData[8][m_nSymbleSize - 8 + i] = '\\x20';\r\n\t}\r\n\r\n\t// o[Wp^[\r\n\tSetVersionPattern();\r\n\r\n\t// ʒu킹p^[\r\n\tfor (i = 0; i < QR_VersonInfo[m_nVersion].ncAlignPoint; ++i)\r\n\t{\r\n\t\tSetAlignmentPattern(QR_VersonInfo[m_nVersion].nAlignPoint[i], 6);\r\n\t\tSetAlignmentPattern(6, QR_VersonInfo[m_nVersion].nAlignPoint[i]);\r\n\r\n\t\tfor (j = 0; j < QR_VersonInfo[m_nVersion].ncAlignPoint; ++j)\r\n\t\t{\r\n\t\t\tSetAlignmentPattern(QR_VersonInfo[m_nVersion].nAlignPoint[i], QR_VersonInfo[m_nVersion].nAlignPoint[j]);\r\n\t\t}\r\n\t}\r\n\r\n\t// ^C~Op^[\r\n\tfor (i = 8; i <= m_nSymbleSize - 9; ++i)\r\n\t{\r\n\t\tm_byModuleData[i][6] = (i % 2) == 0 ? '\\x30' : '\\x20';\r\n\t\tm_byModuleData[6][i] = (i % 2) == 0 ? '\\x30' : '\\x20';\r\n\t}\r\n}\r\n\r\n\r\n/////////////////////////////////////////////////////////////////////////////\r\n// CQR_Encode::SetFinderPattern\r\n// p  rFʒuop^[zu\r\n//   FzuW\r\n\r\nvoid CQR_Encode::SetFinderPattern(int x, int y)\r\n{\r\n\tstatic BYTE byPattern[] = {0x7f,  // 1111111b\r\n\t\t\t\t\t\t\t   0x41,  // 1000001b\r\n\t\t\t\t\t\t\t   0x5d,  // 1011101b\r\n\t\t\t\t\t\t\t   0x5d,  // 1011101b\r\n\t\t\t\t\t\t\t   0x5d,  // 1011101b\r\n\t\t\t\t\t\t\t   0x41,  // 1000001b\r\n\t\t\t\t\t\t\t   0x7f}; // 1111111b\r\n\tint i, j;\r\n\r\n\tfor (i = 0; i < 7; ++i)\r\n\t{\r\n\t\tfor (j = 0; j < 7; ++j)\r\n\t\t{\r\n\t\t\tm_byModuleData[x + j][y + i] = (byPattern[i] & (1 << (6 - j))) ? '\\x30' : '\\x20'; \r\n\t\t}\r\n\t}\r\n}\r\n\r\n\r\n/////////////////////////////////////////////////////////////////////////////\r\n// CQR_Encode::SetAlignmentPattern\r\n// p  rFʒu킹p^[zu\r\n//   FzuW\r\n\r\nvoid CQR_Encode::SetAlignmentPattern(int x, int y)\r\n{\r\n\tstatic BYTE byPattern[] = {0x1f,  // 11111b\r\n\t\t\t\t\t\t\t   0x11,  // 10001b\r\n\t\t\t\t\t\t\t   0x15,  // 10101b\r\n\t\t\t\t\t\t\t   0x11,  // 10001b\r\n\t\t\t\t\t\t\t   0x1f}; // 11111b\r\n\tint i, j;\r\n\r\n\tif (m_byModuleData[x][y] & 0x20)\r\n\t\treturn; // @\\W[Əd邽ߏO\r\n\r\n\tx -= 2; y -= 2; // Wɕϊ\r\n\r\n\tfor (i = 0; i < 5; ++i)\r\n\t{\r\n\t\tfor (j = 0; j < 5; ++j)\r\n\t\t{\r\n\t\t\tm_byModuleData[x + j][y + i] = (byPattern[i] & (1 << (4 - j))) ? '\\x30' : '\\x20'; \r\n\t\t}\r\n\t}\r\n}\r\n\r\n\r\n/////////////////////////////////////////////////////////////////////////////\r\n// CQR_Encode::SetVersionPattern\r\n// p  rFo[W(^)p^[zu\r\n//   lFgabg(18,6)ƂĎgp\r\n\r\nvoid CQR_Encode::SetVersionPattern()\r\n{\r\n\tint i, j;\r\n\r\n\tif (m_nVersion <= 6)\r\n\t\treturn;\r\n\r\n\tint nVerData = m_nVersion << 12;\r\n\r\n\t// ]rbgZo\r\n\tfor (i = 0; i < 6; ++i)\r\n\t{\r\n\t\tif (nVerData & (1 << (17 - i)))\r\n\t\t{\r\n\t\t\tnVerData ^= (0x1f25 << (5 - i));\r\n\t\t}\r\n\t}\r\n\r\n\tnVerData += m_nVersion << 12;\r\n\r\n\tfor (i = 0; i < 6; ++i)\r\n\t{\r\n\t\tfor (j = 0; j < 3; ++j)\r\n\t\t{\r\n\t\t\tm_byModuleData[m_nSymbleSize - 11 + j][i] = m_byModuleData[i][m_nSymbleSize - 11 + j] =\r\n\t\t\t(nVerData & (1 << (i * 3 + j))) ? '\\x30' : '\\x20';\r\n\t\t}\r\n\t}\r\n}\r\n\r\n\r\n/////////////////////////////////////////////////////////////////////////////\r\n// CQR_Encode::SetCodeWordPattern\r\n// p  rFf[^p^[zu\r\n\r\nvoid CQR_Encode::SetCodeWordPattern()\r\n{\r\n\tint x = m_nSymbleSize;\r\n\tint y = m_nSymbleSize - 1;\r\n\r\n\tint nCoef_x = 1; // zu\r\n\tint nCoef_y = 1; // zu\r\n\r\n\tint i, j;\r\n\r\n\tfor (i = 0; i < m_ncAllCodeWord; ++i)\r\n\t{\r\n\t\tfor (j = 0; j < 8; ++j)\r\n\t\t{\r\n\t\t\tdo\r\n\t\t\t{\r\n\t\t\t\tx += nCoef_x;\r\n\t\t\t\tnCoef_x *= -1;\r\n\r\n\t\t\t\tif (nCoef_x < 0)\r\n\t\t\t\t{\r\n\t\t\t\t\ty += nCoef_y;\r\n\r\n\t\t\t\t\tif (y < 0 || y == m_nSymbleSize)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\ty = (y < 0) ? 0 : m_nSymbleSize - 1;\r\n\t\t\t\t\t\tnCoef_y *= -1;\r\n\r\n\t\t\t\t\t\tx -= 2;\r\n\r\n\t\t\t\t\t\tif (x == 6) // ^C~Op^[\r\n\t\t\t\t\t\t\t--x;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\twhile (m_byModuleData[x][y] & 0x20); // @\\W[O\r\n\r\n\t\t\tm_byModuleData[x][y] = (m_byAllCodeWord[i] & (1 << (7 - j))) ? '\\x02' : '\\x00';\r\n\t\t}\r\n\t}\r\n}\r\n\r\n\r\n/////////////////////////////////////////////////////////////////////////////\r\n// CQR_Encode::SetMaskingPattern\r\n// p  rF}XLOp^[zu\r\n//   F}XLOp^[ԍ\r\n\r\nvoid CQR_Encode::SetMaskingPattern(int nPatternNo)\r\n{\r\n\tint i, j;\r\n\r\n\tfor (i = 0; i < m_nSymbleSize; ++i)\r\n\t{\r\n\t\tfor (j = 0; j < m_nSymbleSize; ++j)\r\n\t\t{\r\n\t\t\tif (! (m_byModuleData[j][i] & 0x20)) // @\\W[O\r\n\t\t\t{\r\n\t\t\t\tbool bMask;\r\n\r\n\t\t\t\tswitch (nPatternNo)\r\n\t\t\t\t{\r\n\t\t\t\tcase 0:\r\n\t\t\t\t\tbMask = ((i + j) % 2 == 0);\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase 1:\r\n\t\t\t\t\tbMask = (i % 2 == 0);\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase 2:\r\n\t\t\t\t\tbMask = (j % 3 == 0);\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase 3:\r\n\t\t\t\t\tbMask = ((i + j) % 3 == 0);\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase 4:\r\n\t\t\t\t\tbMask = (((i / 2) + (j / 3)) % 2 == 0);\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase 5:\r\n\t\t\t\t\tbMask = (((i * j) % 2) + ((i * j) % 3) == 0);\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase 6:\r\n\t\t\t\t\tbMask = ((((i * j) % 2) + ((i * j) % 3)) % 2 == 0);\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\tdefault: // case 7:\r\n\t\t\t\t\tbMask = ((((i * j) % 3) + ((i + j) % 2)) % 2 == 0);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tm_byModuleData[j][i] = (BYTE)((m_byModuleData[j][i] & 0xfe) | (((m_byModuleData[j][i] & 0x02) > 1) ^ bMask));\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}\r\n\r\n\r\n/////////////////////////////////////////////////////////////////////////////\r\n// CQR_Encode::SetFormatInfoPattern\r\n// p  rFtH[}bgzu\r\n//   F}XLOp^[ԍ\r\n\r\nvoid CQR_Encode::SetFormatInfoPattern(int nPatternNo)\r\n{\r\n\tint nFormatInfo;\r\n\tint i;\r\n\r\n\tswitch (m_nLevel)\r\n\t{\r\n\tcase QR_LEVEL_M:\r\n\t\tnFormatInfo = 0x00; // 00nnnb\r\n\t\tbreak;\r\n\r\n\tcase QR_LEVEL_L:\r\n\t\tnFormatInfo = 0x08; // 01nnnb\r\n\t\tbreak;\r\n\r\n\tcase QR_LEVEL_Q:\r\n\t\tnFormatInfo = 0x18; // 11nnnb\r\n\t\tbreak;\r\n\r\n\tdefault: // case QR_LEVEL_H:\r\n\t\tnFormatInfo = 0x10; // 10nnnb\r\n\t\tbreak;\r\n\t}\r\n\r\n\tnFormatInfo += nPatternNo;\r\n\r\n\tint nFormatData = nFormatInfo << 10;\r\n\r\n\t// ]rbgZo\r\n\tfor (i = 0; i < 5; ++i)\r\n\t{\r\n\t\tif (nFormatData & (1 << (14 - i)))\r\n\t\t{\r\n\t\t\tnFormatData ^= (0x0537 << (4 - i)); // 10100110111b\r\n\t\t}\r\n\t}\r\n\r\n\tnFormatData += nFormatInfo << 10;\r\n\r\n\t// }XLO\r\n\tnFormatData ^= 0x5412; // 101010000010010b\r\n\r\n\t// ʒuop^[zu\r\n\tfor (i = 0; i <= 5; ++i)\r\n\t\tm_byModuleData[8][i] = (nFormatData & (1 << i)) ? '\\x30' : '\\x20';\r\n\r\n\tm_byModuleData[8][7] = (nFormatData & (1 << 6)) ? '\\x30' : '\\x20';\r\n\tm_byModuleData[8][8] = (nFormatData & (1 << 7)) ? '\\x30' : '\\x20';\r\n\tm_byModuleData[7][8] = (nFormatData & (1 << 8)) ? '\\x30' : '\\x20';\r\n\r\n\tfor (i = 9; i <= 14; ++i)\r\n\t\tm_byModuleData[14 - i][8] = (nFormatData & (1 << i)) ? '\\x30' : '\\x20';\r\n\r\n\t// Eʒuop^[zu\r\n\tfor (i = 0; i <= 7; ++i)\r\n\t\tm_byModuleData[m_nSymbleSize - 1 - i][8] = (nFormatData & (1 << i)) ? '\\x30' : '\\x20';\r\n\r\n\t// ʒuop^[Ezu\r\n\tm_byModuleData[8][m_nSymbleSize - 8] = '\\x30'; // ŒÃW[\r\n\r\n\tfor (i = 8; i <= 14; ++i)\r\n\t\tm_byModuleData[8][m_nSymbleSize - 15 + i] = (nFormatData & (1 << i)) ? '\\x30' : '\\x20';\r\n}\r\n\r\n\r\n/////////////////////////////////////////////////////////////////////////////\r\n// CQR_Encode::CountPenalty\r\n// p  rF}XNyieBXRAZo\r\n\r\nint CQR_Encode::CountPenalty()\r\n{\r\n\tint nPenalty = 0;\r\n\tint i, j, k;\r\n\r\n\t// F̗̗אڃW[\r\n\tfor (i = 0; i < m_nSymbleSize; ++i)\r\n\t{\r\n\t\tfor (j = 0; j < m_nSymbleSize - 4; ++j)\r\n\t\t{\r\n\t\t\tint nCount = 1;\r\n\r\n\t\t\tfor (k = j + 1; k < m_nSymbleSize; k++)\r\n\t\t\t{\r\n\t\t\t\tif (((m_byModuleData[i][j] & 0x11) == 0) == ((m_byModuleData[i][k] & 0x11) == 0))\r\n\t\t\t\t\t++nCount;\r\n\t\t\t\telse\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\tif (nCount >= 5)\r\n\t\t\t{\r\n\t\t\t\tnPenalty += 3 + (nCount - 5);\r\n\t\t\t}\r\n\r\n\t\t\tj = k - 1;\r\n\t\t}\r\n\t}\r\n\r\n\t// F̍s̗אڃW[\r\n\tfor (i = 0; i < m_nSymbleSize; ++i)\r\n\t{\r\n\t\tfor (j = 0; j < m_nSymbleSize - 4; ++j)\r\n\t\t{\r\n\t\t\tint nCount = 1;\r\n\r\n\t\t\tfor (k = j + 1; k < m_nSymbleSize; k++)\r\n\t\t\t{\r\n\t\t\t\tif (((m_byModuleData[j][i] & 0x11) == 0) == ((m_byModuleData[k][i] & 0x11) == 0))\r\n\t\t\t\t\t++nCount;\r\n\t\t\t\telse\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\tif (nCount >= 5)\r\n\t\t\t{\r\n\t\t\t\tnPenalty += 3 + (nCount - 5);\r\n\t\t\t}\r\n\r\n\t\t\tj = k - 1;\r\n\t\t}\r\n\t}\r\n\r\n\t// F̃W[ubNiQ~Qj\r\n\tfor (i = 0; i < m_nSymbleSize - 1; ++i)\r\n\t{\r\n\t\tfor (j = 0; j < m_nSymbleSize - 1; ++j)\r\n\t\t{\r\n\t\t\tif ((((m_byModuleData[i][j] & 0x11) == 0) == ((m_byModuleData[i + 1][j]\t\t& 0x11) == 0)) &&\r\n\t\t\t\t(((m_byModuleData[i][j] & 0x11) == 0) == ((m_byModuleData[i]\t[j + 1] & 0x11) == 0)) &&\r\n\t\t\t\t(((m_byModuleData[i][j] & 0x11) == 0) == ((m_byModuleData[i + 1][j + 1] & 0x11) == 0)))\r\n\t\t\t{\r\n\t\t\t\tnPenalty += 3;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t// ɂ 1:1:3:1:1 䗦i::::Áj̃p^[\r\n\tfor (i = 0; i < m_nSymbleSize; ++i)\r\n\t{\r\n\t\tfor (j = 0; j < m_nSymbleSize - 6; ++j)\r\n\t\t{\r\n\t\t\tif (((j == 0) ||\t\t\t\t (! (m_byModuleData[i][j - 1] & 0x11))) && //  ܂ V{O\r\n\t\t\t\t\t\t\t\t\t\t\t (   m_byModuleData[i][j]     & 0x11)   && //  - 1\r\n\t\t\t\t\t\t\t\t\t\t\t (! (m_byModuleData[i][j + 1] & 0x11))  && //  - 1\r\n\t\t\t\t\t\t\t\t\t\t\t (   m_byModuleData[i][j + 2] & 0x11)   && //  \r\n\t\t\t\t\t\t\t\t\t\t\t (   m_byModuleData[i][j + 3] & 0x11)   && //  3\r\n\t\t\t\t\t\t\t\t\t\t\t (   m_byModuleData[i][j + 4] & 0x11)   && //  \r\n\t\t\t\t\t\t\t\t\t\t\t (! (m_byModuleData[i][j + 5] & 0x11))  && //  - 1\r\n\t\t\t\t\t\t\t\t\t\t\t (   m_byModuleData[i][j + 6] & 0x11)   && //  - 1\r\n\t\t\t\t((j == m_nSymbleSize - 7) || (! (m_byModuleData[i][j + 7] & 0x11))))   //  ܂ V{O\r\n\t\t\t{\r\n\t\t\t\t// O܂͌4ȏ̖p^[\r\n\t\t\t\tif (((j < 2 || ! (m_byModuleData[i][j - 2] & 0x11)) && \r\n\t\t\t\t\t (j < 3 || ! (m_byModuleData[i][j - 3] & 0x11)) &&\r\n\t\t\t\t\t (j < 4 || ! (m_byModuleData[i][j - 4] & 0x11))) ||\r\n\t\t\t\t\t((j >= m_nSymbleSize - 8  || ! (m_byModuleData[i][j + 8]  & 0x11)) &&\r\n\t\t\t\t\t (j >= m_nSymbleSize - 9  || ! (m_byModuleData[i][j + 9]  & 0x11)) &&\r\n\t\t\t\t\t (j >= m_nSymbleSize - 10 || ! (m_byModuleData[i][j + 10] & 0x11))))\r\n\t\t\t\t{\r\n\t\t\t\t\tnPenalty += 40;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t// sɂ 1:1:3:1:1 䗦i::::Áj̃p^[\r\n\tfor (i = 0; i < m_nSymbleSize; ++i)\r\n\t{\r\n\t\tfor (j = 0; j < m_nSymbleSize - 6; ++j)\r\n\t\t{\r\n\t\t\tif (((j == 0) ||\t\t\t\t (! (m_byModuleData[j - 1][i] & 0x11))) && //  ܂ V{O\r\n\t\t\t\t\t\t\t\t\t\t\t (   m_byModuleData[j]    [i] & 0x11)   && //  - 1\r\n\t\t\t\t\t\t\t\t\t\t\t (! (m_byModuleData[j + 1][i] & 0x11))  && //  - 1\r\n\t\t\t\t\t\t\t\t\t\t\t (   m_byModuleData[j + 2][i] & 0x11)   && //  \r\n\t\t\t\t\t\t\t\t\t\t\t (   m_byModuleData[j + 3][i] & 0x11)   && //  3\r\n\t\t\t\t\t\t\t\t\t\t\t (   m_byModuleData[j + 4][i] & 0x11)   && //  \r\n\t\t\t\t\t\t\t\t\t\t\t (! (m_byModuleData[j + 5][i] & 0x11))  && //  - 1\r\n\t\t\t\t\t\t\t\t\t\t\t (   m_byModuleData[j + 6][i] & 0x11)   && //  - 1\r\n\t\t\t\t((j == m_nSymbleSize - 7) || (! (m_byModuleData[j + 7][i] & 0x11))))   //  ܂ V{O\r\n\t\t\t{\r\n\t\t\t\t// O܂͌4ȏ̖p^[\r\n\t\t\t\tif (((j < 2 || ! (m_byModuleData[j - 2][i] & 0x11)) && \r\n\t\t\t\t\t (j < 3 || ! (m_byModuleData[j - 3][i] & 0x11)) &&\r\n\t\t\t\t\t (j < 4 || ! (m_byModuleData[j - 4][i] & 0x11))) ||\r\n\t\t\t\t\t((j >= m_nSymbleSize - 8  || ! (m_byModuleData[j + 8][i]  & 0x11)) &&\r\n\t\t\t\t\t (j >= m_nSymbleSize - 9  || ! (m_byModuleData[j + 9][i]  & 0x11)) &&\r\n\t\t\t\t\t (j >= m_nSymbleSize - 10 || ! (m_byModuleData[j + 10][i] & 0x11))))\r\n\t\t\t\t{\r\n\t\t\t\t\tnPenalty += 40;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t// Ŝɑ΂ÃW[̐߂銄\r\n\tint nCount = 0;\r\n\r\n\tfor (i = 0; i < m_nSymbleSize; ++i)\r\n\t{\r\n\t\tfor (j = 0; j < m_nSymbleSize; ++j)\r\n\t\t{\r\n\t\t\tif (! (m_byModuleData[i][j] & 0x11))\r\n\t\t\t{\r\n\t\t\t\t++nCount;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tnPenalty += (abs(50 - ((nCount * 100) / (m_nSymbleSize * m_nSymbleSize))) / 5) * 10;\r\n\r\n\treturn nPenalty;\r\n}\r\n"
  },
  {
    "path": "ArcBit/External/QRCodeEncoderObjectiveCAtGithub/QR_Encode.h",
    "content": "// QR_Encode.h : CQR_Encode NX錾уC^[tFCX`\r\n// Date 2006/05/17\tVer. 1.22\tPsytec Inc.\r\n\r\n\r\n#ifndef _QR_ENCODE_H\r\n#define _QR_ENCODE_H\r\n\r\n#include <string.h>\r\n#include <stdlib.h>\r\n\r\n\r\n/////////////////////////////////////////////////////////////////////////////\r\n// 萔\r\n\r\n// x\r\n#define QR_LEVEL_L\t0\r\n#define QR_LEVEL_M\t1\r\n#define QR_LEVEL_Q\t2\r\n#define QR_LEVEL_H\t3\r\n\r\n// f[^[h\r\n#define QR_MODE_NUMERAL\t\t0\r\n#define QR_MODE_ALPHABET\t1\r\n#define QR_MODE_8BIT\t\t2\r\n#define QR_MODE_KANJI\t\t3\r\n\r\n// o[W(^)O[v\r\n#define QR_VRESION_S\t0 // 1 ` 9\r\n#define QR_VRESION_M\t1 // 10 ` 26\r\n#define QR_VRESION_L\t2 // 27 ` 40\r\n\r\n#define MAX_ALLCODEWORD\t 3706 // R[h[hől\r\n#define MAX_DATACODEWORD 2956 // f[^R[h[hől(o[W40-L)\r\n#define MAX_CODEBLOCK\t  153 // ubNf[^R[h[hől(qrR[h[h܂)\r\n#define MAX_MODULESIZE\t  177 // ӃW[ől\r\n\r\n// rbg}bv`掞}[W\r\n#define QR_MARGIN\t4\r\n\r\n\r\n/////////////////////////////////////////////////////////////////////////////\r\ntypedef struct tagRS_BLOCKINFO\r\n{\r\n\tint ncRSBlock;\t\t// qrubN\r\n\tint ncAllCodeWord;\t// ubNR[h[h\r\n\tint ncDataCodeWord;\t// f[^R[h[h(R[h[h - qrR[h[h)\r\n\r\n} RS_BLOCKINFO, *LPRS_BLOCKINFO;\r\n\r\n\r\n/////////////////////////////////////////////////////////////////////////////\r\n// QRR[ho[W(^)֘A\r\n\r\ntypedef struct tagQR_VERSIONINFO\r\n{\r\n\tint nVersionNo;\t   // o[W(^)ԍ(1`40)\r\n\tint ncAllCodeWord; // R[h[h\r\n\r\n\t// ȉzY͌(0 = L, 1 = M, 2 = Q, 3 = H) \r\n\tint ncDataCodeWord[4];\t// f[^R[h[h(R[h[h - qrR[h[h)\r\n\r\n\tint ncAlignPoint;\t// ACgp^[W\r\n\tint nAlignPoint[6];\t// ACgp^[SW\r\n\r\n\tRS_BLOCKINFO RS_BlockInfo1[4]; // qrubN(1)\r\n\tRS_BLOCKINFO RS_BlockInfo2[4]; // qrubN(2)\r\n\r\n} QR_VERSIONINFO, *LPQR_VERSIONINFO;\r\n\r\ntypedef unsigned short WORD;\r\n\r\ntypedef unsigned char BYTE;\r\n\r\ntypedef BYTE* LPBYTE;\r\n\r\ntypedef const char* LPCSTR;\r\n\r\n#define ZeroMemory(Destination,Length) memset((Destination),0,(Length))\r\n\r\n\r\nclass CQR_Encode\r\n{\r\n// \\z/\r\npublic:\r\n\tCQR_Encode();\r\n\t~CQR_Encode();\r\n\r\npublic:\r\n\tint m_nLevel;\t\t// x\r\n\tint m_nVersion;\t\t// o[W(^)\r\n\tbool m_bAutoExtent;\t// o[W(^)gwtO\r\n\tint m_nMaskingNo;\t// }XLOp^[ԍ\r\n\r\npublic:\r\n\tint m_nSymbleSize;\r\n\tBYTE m_byModuleData[MAX_MODULESIZE][MAX_MODULESIZE]; // [x][y]\r\n\t// bit5:@\\W[i}XLOΏۊOjtO\r\n\t// bit4:@\\W[`f[^\r\n\t// bit1:GR[hf[^\r\n\t// bit0:}XNGR[h`f[^\r\n\t// 20hƂ̘_aɂ@\\W[A11hƂ̘_aɂ`iŏIIɂboollj\r\n\r\nprivate:\r\n\tint m_ncDataCodeWordBit; // f[^R[h[hrbg\r\n\tBYTE m_byDataCodeWord[MAX_DATACODEWORD]; // ̓f[^GR[hGA\r\n\r\n\tint m_ncDataBlock;\r\n\tBYTE m_byBlockMode[MAX_DATACODEWORD];\r\n\tint m_nBlockLength[MAX_DATACODEWORD];\r\n\r\n\tint m_ncAllCodeWord; // R[h[h(qrf[^܂)\r\n\tBYTE m_byAllCodeWord[MAX_ALLCODEWORD]; // R[h[hZoGA\r\n\tBYTE m_byRSWork[MAX_CODEBLOCK]; // qrR[h[hZo[N\r\n\r\n// f[^GR[h֘At@NV\r\npublic:\r\n\tbool EncodeData(int nLevel, int nVersion, bool bAutoExtent, int nMaskingNo, LPCSTR lpsSource, int ncSource = 0);\r\n\r\nprivate:\r\n\tint GetEncodeVersion(int nVersion, LPCSTR lpsSource, int ncLength);\r\n\tbool EncodeSourceData(LPCSTR lpsSource, int ncLength, int nVerGroup);\r\n\r\n\tint GetBitLength(BYTE nMode, int ncData, int nVerGroup);\r\n\r\n\tint SetBitStream(int nIndex, WORD wData, int ncData);\r\n\r\n\tbool IsNumeralData(unsigned char c);\r\n\tbool IsAlphabetData(unsigned char c);\r\n\tbool IsKanjiData(unsigned char c1, unsigned char c2);\r\n\r\n\tBYTE AlphabetToBinaly(unsigned char c);\r\n\tWORD KanjiToBinaly(WORD wc);\r\n\r\n\tvoid GetRSCodeWord(LPBYTE lpbyRSWork, int ncDataCodeWord, int ncRSCodeWord);\r\n\r\n// W[zu֘At@NV\r\nprivate:\r\n\tvoid FormatModule();\r\n\r\n\tvoid SetFunctionModule();\r\n\tvoid SetFinderPattern(int x, int y);\r\n\tvoid SetAlignmentPattern(int x, int y);\r\n\tvoid SetVersionPattern();\r\n\tvoid SetCodeWordPattern();\r\n\tvoid SetMaskingPattern(int nPatternNo);\r\n\tvoid SetFormatInfoPattern(int nPatternNo);\r\n\tint CountPenalty();\r\n};\r\n\r\n/////////////////////////////////////////////////////////////////////////////\r\n\r\n#endif"
  },
  {
    "path": "ArcBit/External/SocketRocket/NSData+SRB64Additions.h",
    "content": "//\n//   Copyright 2012 Square Inc.\n//\n//   Licensed under the Apache License, Version 2.0 (the \"License\");\n//   you may not use this file except in compliance with the License.\n//   You may obtain a copy of the License at\n//\n//       http://www.apache.org/licenses/LICENSE-2.0\n//\n//   Unless required by applicable law or agreed to in writing, software\n//   distributed under the License is distributed on an \"AS IS\" BASIS,\n//   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n//   See the License for the specific language governing permissions and\n//   limitations under the License.\n//\n\n#import <Foundation/Foundation.h>\n\n\n@interface NSData (SRB64Additions)\n\n- (NSString *)SR_stringByBase64Encoding;\n\n@end\n"
  },
  {
    "path": "ArcBit/External/SocketRocket/NSData+SRB64Additions.m",
    "content": "//\n//   Copyright 2012 Square Inc.\n//\n//   Licensed under the Apache License, Version 2.0 (the \"License\");\n//   you may not use this file except in compliance with the License.\n//   You may obtain a copy of the License at\n//\n//       http://www.apache.org/licenses/LICENSE-2.0\n//\n//   Unless required by applicable law or agreed to in writing, software\n//   distributed under the License is distributed on an \"AS IS\" BASIS,\n//   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n//   See the License for the specific language governing permissions and\n//   limitations under the License.\n//\n\n#import \"NSData+SRB64Additions.h\"\n#import \"base64.h\"\n\n\n@implementation NSData (SRB64Additions)\n\n- (NSString *)SR_stringByBase64Encoding;\n{\n    size_t buffer_size = (([self length] * 3 + 2) / 2);\n    \n    char *buffer = (char *)malloc(buffer_size);\n    \n    int len = b64_ntop([self bytes], [self length], buffer, buffer_size);\n    \n    if (len == -1) {\n        free(buffer);\n        return nil;\n    } else{\n        return [[NSString alloc] initWithBytesNoCopy:buffer length:len encoding:NSUTF8StringEncoding freeWhenDone:YES];\n    }\n}\n\n@end\n"
  },
  {
    "path": "ArcBit/External/SocketRocket/SRWebSocket.h",
    "content": "//\n//   Copyright 2012 Square Inc.\n//\n//   Licensed under the Apache License, Version 2.0 (the \"License\");\n//   you may not use this file except in compliance with the License.\n//   You may obtain a copy of the License at\n//\n//       http://www.apache.org/licenses/LICENSE-2.0\n//\n//   Unless required by applicable law or agreed to in writing, software\n//   distributed under the License is distributed on an \"AS IS\" BASIS,\n//   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n//   See the License for the specific language governing permissions and\n//   limitations under the License.\n//\n\n#import <Foundation/Foundation.h>\n#import <Security/SecCertificate.h>\n\ntypedef enum {\n    SR_CONNECTING   = 0,\n    SR_OPEN         = 1,\n    SR_CLOSING      = 2,\n    SR_CLOSED       = 3,\n} SRReadyState;\n\n@class SRWebSocket;\n\nextern NSString *const SRWebSocketErrorDomain;\n\n#pragma mark - SRWebSocketDelegate\n\n@protocol SRWebSocketDelegate;\n\n#pragma mark - SRWebSocket\n\n@interface SRWebSocket : NSObject <NSStreamDelegate>\n\n@property (nonatomic, assign) id <SRWebSocketDelegate> delegate;\n\n@property (nonatomic, readonly) SRReadyState readyState;\n@property (nonatomic, readonly, retain) NSURL *url;\n\n// This returns the negotiated protocol.\n// It will be nil until after the handshake completes.\n@property (nonatomic, readonly, copy) NSString *protocol;\n\n// Protocols should be an array of strings that turn into Sec-WebSocket-Protocol.\n- (id)initWithURLRequest:(NSURLRequest *)request protocols:(NSArray *)protocols;\n- (id)initWithURLRequest:(NSURLRequest *)request;\n\n// Some helper constructors.\n- (id)initWithURL:(NSURL *)url protocols:(NSArray *)protocols;\n- (id)initWithURL:(NSURL *)url;\n\n// Delegate queue will be dispatch_main_queue by default.\n// You cannot set both OperationQueue and dispatch_queue.\n- (void)setDelegateOperationQueue:(NSOperationQueue*) queue;\n- (void)setDelegateDispatchQueue:(dispatch_queue_t) queue;\n\n// By default, it will schedule itself on +[NSRunLoop SR_networkRunLoop] using defaultModes.\n- (void)scheduleInRunLoop:(NSRunLoop *)aRunLoop forMode:(NSString *)mode;\n- (void)unscheduleFromRunLoop:(NSRunLoop *)aRunLoop forMode:(NSString *)mode;\n\n// SRWebSockets are intended for one-time-use only.  Open should be called once and only once.\n- (void)open;\n\n- (void)close;\n- (void)closeWithCode:(NSInteger)code reason:(NSString *)reason;\n\n// Send a UTF8 String or Data.\n- (void)send:(id)data;\n\n@end\n\n#pragma mark - SRWebSocketDelegate\n\n@protocol SRWebSocketDelegate <NSObject>\n\n// message will either be an NSString if the server is using text\n// or NSData if the server is using binary.\n- (void)webSocket:(SRWebSocket *)webSocket didReceiveMessage:(id)message;\n\n@optional\n\n- (void)webSocketDidOpen:(SRWebSocket *)webSocket;\n- (void)webSocket:(SRWebSocket *)webSocket didFailWithError:(NSError *)error;\n- (void)webSocket:(SRWebSocket *)webSocket didCloseWithCode:(NSInteger)code reason:(NSString *)reason wasClean:(BOOL)wasClean;\n\n@end\n\n#pragma mark - NSURLRequest (CertificateAdditions)\n\n@interface NSURLRequest (CertificateAdditions)\n\n@property (nonatomic, retain, readonly) NSArray *SR_SSLPinnedCertificates;\n\n@end\n\n#pragma mark - NSMutableURLRequest (CertificateAdditions)\n\n@interface NSMutableURLRequest (CertificateAdditions)\n\n@property (nonatomic, retain) NSArray *SR_SSLPinnedCertificates;\n\n@end\n\n#pragma mark - NSRunLoop (SRWebSocket)\n\n@interface NSRunLoop (SRWebSocket)\n\n+ (NSRunLoop *)SR_networkRunLoop;\n\n@end\n"
  },
  {
    "path": "ArcBit/External/SocketRocket/SRWebSocket.m",
    "content": "//\n//   Copyright 2012 Square Inc.\n//\n//   Licensed under the Apache License, Version 2.0 (the \"License\");\n//   you may not use this file except in compliance with the License.\n//   You may obtain a copy of the License at\n//\n//       http://www.apache.org/licenses/LICENSE-2.0\n//\n//   Unless required by applicable law or agreed to in writing, software\n//   distributed under the License is distributed on an \"AS IS\" BASIS,\n//   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n//   See the License for the specific language governing permissions and\n//   limitations under the License.\n//\n\n\n#import \"SRWebSocket.h\"\n\n#if TARGET_OS_IPHONE\n#define HAS_ICU\n#endif\n\n#ifdef HAS_ICU\n#import <unicode/utf8.h>\n#endif\n\n#if TARGET_OS_IPHONE\n#import <Endian.h>\n#else\n#import <CoreServices/CoreServices.h>\n#endif\n\n#import <CommonCrypto/CommonDigest.h>\n#import <Security/SecRandom.h>\n\n#import \"base64.h\"\n#import \"NSData+SRB64Additions.h\"\n\n#if OS_OBJECT_USE_OBJC_RETAIN_RELEASE\n#define sr_dispatch_retain(x)\n#define sr_dispatch_release(x)\n#define maybe_bridge(x) ((__bridge void *) x)\n#else\n#define sr_dispatch_retain(x) dispatch_retain(x)\n#define sr_dispatch_release(x) dispatch_release(x)\n#define maybe_bridge(x) (x)\n#endif\n\n#if !__has_feature(objc_arc) \n#error SocketRocket muust be compiled with ARC enabled\n#endif\n\n\ntypedef enum  {\n    SROpCodeTextFrame = 0x1,\n    SROpCodeBinaryFrame = 0x2,\n    // 3-7 reserved.\n    SROpCodeConnectionClose = 0x8,\n    SROpCodePing = 0x9,\n    SROpCodePong = 0xA,\n    // B-F reserved.\n} SROpCode;\n\ntypedef enum {\n    SRStatusCodeNormal = 1000,\n    SRStatusCodeGoingAway = 1001,\n    SRStatusCodeProtocolError = 1002,\n    SRStatusCodeUnhandledType = 1003,\n    // 1004 reserved.\n    SRStatusNoStatusReceived = 1005,\n    // 1004-1006 reserved.\n    SRStatusCodeInvalidUTF8 = 1007,\n    SRStatusCodePolicyViolated = 1008,\n    SRStatusCodeMessageTooBig = 1009,\n} SRStatusCode;\n\ntypedef struct {\n    BOOL fin;\n//  BOOL rsv1;\n//  BOOL rsv2;\n//  BOOL rsv3;\n    uint8_t opcode;\n    BOOL masked;\n    uint64_t payload_length;\n} frame_header;\n\nstatic NSString *const SRWebSocketAppendToSecKeyString = @\"258EAFA5-E914-47DA-95CA-C5AB0DC85B11\";\n\nstatic inline int32_t validate_dispatch_data_partial_string(NSData *data);\nstatic inline dispatch_queue_t log_queue();\nstatic inline void SRFastLog(NSString *format, ...);\n\n@interface NSData (SRWebSocket)\n\n- (NSString *)stringBySHA1ThenBase64Encoding;\n\n@end\n\n\n@interface NSString (SRWebSocket)\n\n- (NSString *)stringBySHA1ThenBase64Encoding;\n\n@end\n\n\n@interface NSURL (SRWebSocket)\n\n// The origin isn't really applicable for a native application.\n// So instead, just map ws -> http and wss -> https.\n- (NSString *)SR_origin;\n\n@end\n\n\n@interface _SRRunLoopThread : NSThread\n\n@property (nonatomic, readonly) NSRunLoop *runLoop;\n\n@end\n\n\nstatic NSString *newSHA1String(const char *bytes, size_t length) {\n    uint8_t md[CC_SHA1_DIGEST_LENGTH];\n    \n    CC_SHA1(bytes, length, md);\n    \n    size_t buffer_size = ((sizeof(md) * 3 + 2) / 2);\n    \n    char *buffer =  (char *)malloc(buffer_size);\n    \n    int len = b64_ntop(md, CC_SHA1_DIGEST_LENGTH, buffer, buffer_size);\n    if (len == -1) {\n        free(buffer);\n        return nil;\n    } else{\n        return [[NSString alloc] initWithBytesNoCopy:buffer length:len encoding:NSASCIIStringEncoding freeWhenDone:YES];\n    }\n}\n\n@implementation NSData (SRWebSocket)\n\n- (NSString *)stringBySHA1ThenBase64Encoding;\n{\n    return newSHA1String(self.bytes, self.length);\n}\n\n@end\n\n\n@implementation NSString (SRWebSocket)\n\n- (NSString *)stringBySHA1ThenBase64Encoding;\n{\n    return newSHA1String(self.UTF8String, self.length);\n}\n\n@end\n\nNSString *const SRWebSocketErrorDomain = @\"SRWebSocketErrorDomain\";\n\n// Returns number of bytes consumed. Returning 0 means you didn't match.\n// Sends bytes to callback handler;\ntypedef size_t (^stream_scanner)(NSData *collected_data);\n\ntypedef void (^data_callback)(SRWebSocket *webSocket,  NSData *data);\n\n@interface SRIOConsumer : NSObject {\n    stream_scanner _scanner;\n    data_callback _handler;\n    size_t _bytesNeeded;\n    BOOL _readToCurrentFrame;\n    BOOL _unmaskBytes;\n}\n@property (nonatomic, copy, readonly) stream_scanner consumer;\n@property (nonatomic, copy, readonly) data_callback handler;\n@property (nonatomic, assign) size_t bytesNeeded;\n@property (nonatomic, assign, readonly) BOOL readToCurrentFrame;\n@property (nonatomic, assign, readonly) BOOL unmaskBytes;\n\n@end\n\n// This class is not thread-safe, and is expected to always be run on the same queue.\n@interface SRIOConsumerPool : NSObject\n\n- (id)initWithBufferCapacity:(NSUInteger)poolSize;\n\n- (SRIOConsumer *)consumerWithScanner:(stream_scanner)scanner handler:(data_callback)handler bytesNeeded:(size_t)bytesNeeded readToCurrentFrame:(BOOL)readToCurrentFrame unmaskBytes:(BOOL)unmaskBytes;\n- (void)returnConsumer:(SRIOConsumer *)consumer;\n\n@end\n\n@interface SRWebSocket ()  <NSStreamDelegate>\n\n- (void)_writeData:(NSData *)data;\n- (void)_closeWithProtocolError:(NSString *)message;\n- (void)_failWithError:(NSError *)error;\n\n- (void)_disconnect;\n\n- (void)_readFrameNew;\n- (void)_readFrameContinue;\n\n- (void)_pumpScanner;\n\n- (void)_pumpWriting;\n\n- (void)_addConsumerWithScanner:(stream_scanner)consumer callback:(data_callback)callback;\n- (void)_addConsumerWithDataLength:(size_t)dataLength callback:(data_callback)callback readToCurrentFrame:(BOOL)readToCurrentFrame unmaskBytes:(BOOL)unmaskBytes;\n- (void)_addConsumerWithScanner:(stream_scanner)consumer callback:(data_callback)callback dataLength:(size_t)dataLength;\n- (void)_readUntilBytes:(const void *)bytes length:(size_t)length callback:(data_callback)dataHandler;\n- (void)_readUntilHeaderCompleteWithCallback:(data_callback)dataHandler;\n\n- (void)_sendFrameWithOpcode:(SROpCode)opcode data:(id)data;\n\n- (BOOL)_checkHandshake:(CFHTTPMessageRef)httpMessage;\n- (void)_SR_commonInit;\n\n- (void)_initializeStreams;\n- (void)_connect;\n\n@property (nonatomic) SRReadyState readyState;\n\n@property (nonatomic) NSOperationQueue *delegateOperationQueue;\n@property (nonatomic) dispatch_queue_t delegateDispatchQueue;\n\n@end\n\n\n@implementation SRWebSocket {\n    NSInteger _webSocketVersion;\n    \n    NSOperationQueue *_delegateOperationQueue;\n    dispatch_queue_t _delegateDispatchQueue;\n    \n    dispatch_queue_t _workQueue;\n    NSMutableArray *_consumers;\n\n    NSInputStream *_inputStream;\n    NSOutputStream *_outputStream;\n   \n    NSMutableData *_readBuffer;\n    NSUInteger _readBufferOffset;\n \n    NSMutableData *_outputBuffer;\n    NSUInteger _outputBufferOffset;\n\n    uint8_t _currentFrameOpcode;\n    size_t _currentFrameCount;\n    size_t _readOpCount;\n    uint32_t _currentStringScanPosition;\n    NSMutableData *_currentFrameData;\n    \n    NSString *_closeReason;\n    \n    NSString *_secKey;\n    \n    BOOL _pinnedCertFound;\n    \n    uint8_t _currentReadMaskKey[4];\n    size_t _currentReadMaskOffset;\n\n    BOOL _consumerStopped;\n    \n    BOOL _closeWhenFinishedWriting;\n    BOOL _failed;\n\n    BOOL _secure;\n    NSURLRequest *_urlRequest;\n\n    CFHTTPMessageRef _receivedHTTPHeaders;\n    \n    BOOL _sentClose;\n    BOOL _didFail;\n    int _closeCode;\n    \n    BOOL _isPumping;\n    \n    NSMutableSet *_scheduledRunloops;\n    \n    // We use this to retain ourselves.\n    __strong SRWebSocket *_selfRetain;\n    \n    NSArray *_requestedProtocols;\n    SRIOConsumerPool *_consumerPool;\n}\n\n@synthesize delegate = _delegate;\n@synthesize url = _url;\n@synthesize readyState = _readyState;\n@synthesize protocol = _protocol;\n\nstatic __strong NSData *CRLFCRLF;\n\n+ (void)initialize;\n{\n    CRLFCRLF = [[NSData alloc] initWithBytes:\"\\r\\n\\r\\n\" length:4];\n}\n\n- (id)initWithURLRequest:(NSURLRequest *)request protocols:(NSArray *)protocols;\n{\n    self = [super init];\n    if (self) {\n        assert(request.URL);\n        _url = request.URL;\n        _urlRequest = request;\n        \n        _requestedProtocols = [protocols copy];\n        \n        [self _SR_commonInit];\n    }\n    \n    return self;\n}\n\n- (id)initWithURLRequest:(NSURLRequest *)request;\n{\n    return [self initWithURLRequest:request protocols:nil];\n}\n\n- (id)initWithURL:(NSURL *)url;\n{\n    return [self initWithURL:url protocols:nil];\n}\n\n- (id)initWithURL:(NSURL *)url protocols:(NSArray *)protocols;\n{\n    NSMutableURLRequest *request = [[NSMutableURLRequest alloc] initWithURL:url];    \n    return [self initWithURLRequest:request protocols:protocols];\n}\n\n- (void)_SR_commonInit;\n{\n    \n    NSString *scheme = _url.scheme.lowercaseString;\n    assert([scheme isEqualToString:@\"ws\"] || [scheme isEqualToString:@\"http\"] || [scheme isEqualToString:@\"wss\"] || [scheme isEqualToString:@\"https\"]);\n    \n    if ([scheme isEqualToString:@\"wss\"] || [scheme isEqualToString:@\"https\"]) {\n        _secure = YES;\n    }\n    \n    _readyState = SR_CONNECTING;\n    _consumerStopped = YES;\n    _webSocketVersion = 13;\n    \n    _workQueue = dispatch_queue_create(NULL, DISPATCH_QUEUE_SERIAL);\n    \n    // Going to set a specific on the queue so we can validate we're on the work queue\n    dispatch_queue_set_specific(_workQueue, (__bridge void *)self, maybe_bridge(_workQueue), NULL);\n    \n    _delegateDispatchQueue = dispatch_get_main_queue();\n    sr_dispatch_retain(_delegateDispatchQueue);\n    \n    _readBuffer = [[NSMutableData alloc] init];\n    _outputBuffer = [[NSMutableData alloc] init];\n    \n    _currentFrameData = [[NSMutableData alloc] init];\n\n    _consumers = [[NSMutableArray alloc] init];\n    \n    _consumerPool = [[SRIOConsumerPool alloc] init];\n    \n    _scheduledRunloops = [[NSMutableSet alloc] init];\n    \n    [self _initializeStreams];\n    \n    // default handlers\n}\n\n- (void)assertOnWorkQueue;\n{\n    assert(dispatch_get_specific((__bridge void *)self) == maybe_bridge(_workQueue));\n}\n\n- (void)dealloc\n{\n    _inputStream.delegate = nil;\n    _outputStream.delegate = nil;\n\n    [_inputStream close];\n    [_outputStream close];\n    \n    sr_dispatch_release(_workQueue);\n    _workQueue = NULL;\n    \n    if (_receivedHTTPHeaders) {\n        CFRelease(_receivedHTTPHeaders);\n        _receivedHTTPHeaders = NULL;\n    }\n    \n    if (_delegateDispatchQueue) {\n        sr_dispatch_release(_delegateDispatchQueue);\n        _delegateDispatchQueue = NULL;\n    }\n}\n\n#ifndef NDEBUG\n\n- (void)setReadyState:(SRReadyState)aReadyState;\n{\n    [self willChangeValueForKey:@\"readyState\"];\n    assert(aReadyState > _readyState);\n    _readyState = aReadyState;\n    [self didChangeValueForKey:@\"readyState\"];\n}\n\n#endif\n\n- (void)open;\n{\n    assert(_url);\n    NSAssert(_readyState == SR_CONNECTING, @\"Cannot call -(void)open on SRWebSocket more than once\");\n\n    _selfRetain = self;\n    \n    [self _connect];\n}\n\n// Calls block on delegate queue\n- (void)_performDelegateBlock:(dispatch_block_t)block;\n{\n    if (_delegateOperationQueue) {\n        [_delegateOperationQueue addOperationWithBlock:block];\n    } else {\n        assert(_delegateDispatchQueue);\n        dispatch_async(_delegateDispatchQueue, block);\n    }\n}\n\n- (void)setDelegateDispatchQueue:(dispatch_queue_t)queue;\n{\n    if (queue) {\n        sr_dispatch_retain(queue);\n    }\n    \n    if (_delegateDispatchQueue) {\n        sr_dispatch_release(_delegateDispatchQueue);\n    }\n    \n    _delegateDispatchQueue = queue;\n}\n\n- (BOOL)_checkHandshake:(CFHTTPMessageRef)httpMessage;\n{\n    NSString *acceptHeader = CFBridgingRelease(CFHTTPMessageCopyHeaderFieldValue(httpMessage, CFSTR(\"Sec-WebSocket-Accept\")));\n\n    if (acceptHeader == nil) {\n        return NO;\n    }\n    \n    NSString *concattedString = [_secKey stringByAppendingString:SRWebSocketAppendToSecKeyString];\n    NSString *expectedAccept = [concattedString stringBySHA1ThenBase64Encoding];\n    \n    return [acceptHeader isEqualToString:expectedAccept];\n}\n\n- (void)_HTTPHeadersDidFinish;\n{\n    NSInteger responseCode = CFHTTPMessageGetResponseStatusCode(_receivedHTTPHeaders);\n    \n    if (responseCode >= 400) {\n        SRFastLog(@\"Request failed with response code %d\", responseCode);\n        [self _failWithError:[NSError errorWithDomain:@\"org.lolrus.SocketRocket\" code:2132 userInfo:[NSDictionary dictionaryWithObject:[NSString stringWithFormat:@\"received bad response code from server %d\", responseCode] forKey:NSLocalizedDescriptionKey]]];\n        return;\n\n    }\n    \n    if(![self _checkHandshake:_receivedHTTPHeaders]) {\n        [self _failWithError:[NSError errorWithDomain:SRWebSocketErrorDomain code:2133 userInfo:[NSDictionary dictionaryWithObject:[NSString stringWithFormat:@\"Invalid Sec-WebSocket-Accept response\"] forKey:NSLocalizedDescriptionKey]]];\n        return;\n    }\n    \n    NSString *negotiatedProtocol = CFBridgingRelease(CFHTTPMessageCopyHeaderFieldValue(_receivedHTTPHeaders, CFSTR(\"Sec-WebSocket-Protocol\")));\n    if (negotiatedProtocol) {\n        // Make sure we requested the protocol\n        if ([_requestedProtocols indexOfObject:negotiatedProtocol] == NSNotFound) {\n            [self _failWithError:[NSError errorWithDomain:SRWebSocketErrorDomain code:2133 userInfo:[NSDictionary dictionaryWithObject:[NSString stringWithFormat:@\"Server specified Sec-WebSocket-Protocol that wasn't requested\"] forKey:NSLocalizedDescriptionKey]]];\n            return;\n        }\n        \n        _protocol = negotiatedProtocol;\n    }\n    \n    self.readyState = SR_OPEN;\n    \n    if (!_didFail) {\n        [self _readFrameNew];\n    }\n\n    [self _performDelegateBlock:^{\n        if ([self.delegate respondsToSelector:@selector(webSocketDidOpen:)]) {\n            [self.delegate webSocketDidOpen:self];\n        };\n    }];\n}\n\n\n- (void)_readHTTPHeader;\n{\n    if (_receivedHTTPHeaders == NULL) {\n        _receivedHTTPHeaders = CFHTTPMessageCreateEmpty(NULL, NO);\n    }\n                        \n    [self _readUntilHeaderCompleteWithCallback:^(SRWebSocket *self,  NSData *data) {\n        CFHTTPMessageAppendBytes(_receivedHTTPHeaders, (const UInt8 *)data.bytes, data.length);\n        \n        if (CFHTTPMessageIsHeaderComplete(_receivedHTTPHeaders)) {\n            SRFastLog(@\"Finished reading headers %@\", CFBridgingRelease(CFHTTPMessageCopyAllHeaderFields(_receivedHTTPHeaders)));\n            [self _HTTPHeadersDidFinish];\n        } else {\n            [self _readHTTPHeader];\n        }\n    }];\n}\n\n- (void)didConnect\n{\n    SRFastLog(@\"Connected\");\n    CFHTTPMessageRef request = CFHTTPMessageCreateRequest(NULL, CFSTR(\"GET\"), (__bridge CFURLRef)_url, kCFHTTPVersion1_1);\n    \n    // Set host first so it defaults\n    CFHTTPMessageSetHeaderFieldValue(request, CFSTR(\"Host\"), (__bridge CFStringRef)(_url.port ? [NSString stringWithFormat:@\"%@:%@\", _url.host, _url.port] : _url.host));\n        \n    NSMutableData *keyBytes = [[NSMutableData alloc] initWithLength:16];\n    SecRandomCopyBytes(kSecRandomDefault, keyBytes.length, keyBytes.mutableBytes);\n    _secKey = [keyBytes SR_stringByBase64Encoding];\n    assert([_secKey length] == 24);\n    \n    CFHTTPMessageSetHeaderFieldValue(request, CFSTR(\"Upgrade\"), CFSTR(\"websocket\"));\n    CFHTTPMessageSetHeaderFieldValue(request, CFSTR(\"Connection\"), CFSTR(\"Upgrade\"));\n    CFHTTPMessageSetHeaderFieldValue(request, CFSTR(\"Sec-WebSocket-Key\"), (__bridge CFStringRef)_secKey);\n    CFHTTPMessageSetHeaderFieldValue(request, CFSTR(\"Sec-WebSocket-Version\"), (__bridge CFStringRef)[NSString stringWithFormat:@\"%d\", _webSocketVersion]);\n    \n    CFHTTPMessageSetHeaderFieldValue(request, CFSTR(\"Origin\"), (__bridge CFStringRef)_url.SR_origin);\n    \n    if (_requestedProtocols) {\n        CFHTTPMessageSetHeaderFieldValue(request, CFSTR(\"Sec-WebSocket-Protocol\"), (__bridge CFStringRef)[_requestedProtocols componentsJoinedByString:@\", \"]);\n    }\n\n    [_urlRequest.allHTTPHeaderFields enumerateKeysAndObjectsUsingBlock:^(id key, id obj, BOOL *stop) {\n        CFHTTPMessageSetHeaderFieldValue(request, (__bridge CFStringRef)key, (__bridge CFStringRef)obj);\n    }];\n    \n    NSData *message = CFBridgingRelease(CFHTTPMessageCopySerializedMessage(request));\n    \n    CFRelease(request);\n\n    [self _writeData:message];\n    [self _readHTTPHeader];\n}\n\n- (void)_initializeStreams;\n{\n    NSInteger port = _url.port.integerValue;\n    if (port == 0) {\n        if (!_secure) {\n            port = 80;\n        } else {\n            port = 443;\n        }\n    }\n    NSString *host = _url.host;\n    \n    CFReadStreamRef readStream = NULL;\n    CFWriteStreamRef writeStream = NULL;\n    \n    CFStreamCreatePairWithSocketToHost(NULL, (__bridge CFStringRef)host, port, &readStream, &writeStream);\n    \n    _outputStream = CFBridgingRelease(writeStream);\n    _inputStream = CFBridgingRelease(readStream);\n    \n    \n    if (_secure) {\n        NSMutableDictionary *SSLOptions = [[NSMutableDictionary alloc] init];\n        \n        [_outputStream setProperty:(__bridge id)kCFStreamSocketSecurityLevelNegotiatedSSL forKey:(__bridge id)kCFStreamPropertySocketSecurityLevel];\n        \n        // If we're using pinned certs, don't validate the certificate chain\n        if ([_urlRequest SR_SSLPinnedCertificates].count) {\n            [SSLOptions setValue:[NSNumber numberWithBool:NO] forKey:(__bridge id)kCFStreamSSLValidatesCertificateChain];\n        }\n        \n#if DEBUG\n        [SSLOptions setValue:[NSNumber numberWithBool:NO] forKey:(__bridge id)kCFStreamSSLValidatesCertificateChain];\n        NSLog(@\"SocketRocket: In debug mode.  Allowing connection to any root cert\");\n#endif\n        \n        [_outputStream setProperty:SSLOptions\n                            forKey:(__bridge id)kCFStreamPropertySSLSettings];\n    }\n    \n    _inputStream.delegate = self;\n    _outputStream.delegate = self;\n}\n\n- (void)_connect;\n{\n    if (!_scheduledRunloops.count) {\n        [self scheduleInRunLoop:[NSRunLoop SR_networkRunLoop] forMode:NSDefaultRunLoopMode];\n    }\n    \n    \n    [_outputStream open];\n    [_inputStream open];\n}\n\n- (void)scheduleInRunLoop:(NSRunLoop *)aRunLoop forMode:(NSString *)mode;\n{\n    [_outputStream scheduleInRunLoop:aRunLoop forMode:mode];\n    [_inputStream scheduleInRunLoop:aRunLoop forMode:mode];\n    \n    [_scheduledRunloops addObject:@[aRunLoop, mode]];\n}\n\n- (void)unscheduleFromRunLoop:(NSRunLoop *)aRunLoop forMode:(NSString *)mode;\n{\n    [_outputStream removeFromRunLoop:aRunLoop forMode:mode];\n    [_inputStream removeFromRunLoop:aRunLoop forMode:mode];\n    \n    [_scheduledRunloops removeObject:@[aRunLoop, mode]];\n}\n\n- (void)close;\n{\n    [self closeWithCode:-1 reason:nil];\n}\n\n- (void)closeWithCode:(NSInteger)code reason:(NSString *)reason;\n{\n    assert(code);\n    dispatch_async(_workQueue, ^{\n        if (self.readyState == SR_CLOSING || self.readyState == SR_CLOSED) {\n            return;\n        }\n        \n        BOOL wasConnecting = self.readyState == SR_CONNECTING;\n        \n        self.readyState = SR_CLOSING;\n        \n        SRFastLog(@\"Closing with code %d reason %@\", code, reason);\n        \n        if (wasConnecting) {\n            [self _disconnect];\n            return;\n        }\n\n        size_t maxMsgSize = [reason maximumLengthOfBytesUsingEncoding:NSUTF8StringEncoding];\n        NSMutableData *mutablePayload = [[NSMutableData alloc] initWithLength:sizeof(uint16_t) + maxMsgSize];\n        NSData *payload = mutablePayload;\n        \n        ((uint16_t *)mutablePayload.mutableBytes)[0] = EndianU16_BtoN(code);\n        \n        if (reason) {\n            NSRange remainingRange = {0};\n            \n            NSUInteger usedLength = 0;\n            \n            BOOL success = [reason getBytes:(char *)mutablePayload.mutableBytes + sizeof(uint16_t) maxLength:payload.length - sizeof(uint16_t) usedLength:&usedLength encoding:NSUTF8StringEncoding options:NSStringEncodingConversionExternalRepresentation range:NSMakeRange(0, reason.length) remainingRange:&remainingRange];\n            \n            assert(success);\n            assert(remainingRange.length == 0);\n\n            if (usedLength != maxMsgSize) {\n                payload = [payload subdataWithRange:NSMakeRange(0, usedLength + sizeof(uint16_t))];\n            }\n        }\n        \n        \n        [self _sendFrameWithOpcode:SROpCodeConnectionClose data:payload];\n    });\n}\n\n- (void)_closeWithProtocolError:(NSString *)message;\n{\n    // Need to shunt this on the _callbackQueue first to see if they received any messages \n    [self _performDelegateBlock:^{\n        [self closeWithCode:SRStatusCodeProtocolError reason:message];\n        dispatch_async(_workQueue, ^{\n            [self _disconnect];\n        });\n    }];\n}\n\n- (void)_failWithError:(NSError *)error;\n{\n    dispatch_async(_workQueue, ^{\n        if (self.readyState != SR_CLOSED) {\n            _failed = YES;\n            [self _performDelegateBlock:^{\n                if ([self.delegate respondsToSelector:@selector(webSocket:didFailWithError:)]) {\n                    [self.delegate webSocket:self didFailWithError:error];\n                }\n            }];\n\n            self.readyState = SR_CLOSED;\n            _selfRetain = nil;\n\n            SRFastLog(@\"Failing with error %@\", error.localizedDescription);\n            \n            [self _disconnect];\n        }\n    });\n}\n\n- (void)_writeData:(NSData *)data;\n{    \n    [self assertOnWorkQueue];\n\n    if (_closeWhenFinishedWriting) {\n            return;\n    }\n    [_outputBuffer appendData:data];\n    [self _pumpWriting];\n}\n- (void)send:(id)data;\n{\n    NSAssert(self.readyState != SR_CONNECTING, @\"Invalid State: Cannot call send: until connection is open\");\n    // TODO: maybe not copy this for performance\n    data = [data copy];\n    dispatch_async(_workQueue, ^{\n        if ([data isKindOfClass:[NSString class]]) {\n            [self _sendFrameWithOpcode:SROpCodeTextFrame data:[(NSString *)data dataUsingEncoding:NSUTF8StringEncoding]];\n        } else if ([data isKindOfClass:[NSData class]]) {\n            [self _sendFrameWithOpcode:SROpCodeBinaryFrame data:data];\n        } else if (data == nil) {\n            [self _sendFrameWithOpcode:SROpCodeTextFrame data:data];\n        } else {\n            assert(NO);\n        }\n    });\n}\n\n- (void)handlePing:(NSData *)pingData;\n{\n    // Need to pingpong this off _callbackQueue first to make sure messages happen in order\n    [self _performDelegateBlock:^{\n        dispatch_async(_workQueue, ^{\n            [self _sendFrameWithOpcode:SROpCodePong data:pingData];\n        });\n    }];\n}\n\n- (void)handlePong;\n{\n    // NOOP\n}\n\n- (void)_handleMessage:(id)message\n{\n    SRFastLog(@\"Received message\");\n    [self _performDelegateBlock:^{\n        [self.delegate webSocket:self didReceiveMessage:message];\n    }];\n}\n\n\nstatic inline BOOL closeCodeIsValid(int closeCode) {\n    if (closeCode < 1000) {\n        return NO;\n    }\n    \n    if (closeCode >= 1000 && closeCode <= 1011) {\n        if (closeCode == 1004 ||\n            closeCode == 1005 ||\n            closeCode == 1006) {\n            return NO;\n        }\n        return YES;\n    }\n    \n    if (closeCode >= 3000 && closeCode <= 3999) {\n        return YES;\n    }\n    \n    if (closeCode >= 4000 && closeCode <= 4999) {\n        return YES;\n    }\n\n    return NO;\n}\n\n//  Note from RFC:\n//\n//  If there is a body, the first two\n//  bytes of the body MUST be a 2-byte unsigned integer (in network byte\n//  order) representing a status code with value /code/ defined in\n//  Section 7.4.  Following the 2-byte integer the body MAY contain UTF-8\n//  encoded data with value /reason/, the interpretation of which is not\n//  defined by this specification.\n\n- (void)handleCloseWithData:(NSData *)data;\n{\n    size_t dataSize = data.length;\n    __block uint16_t closeCode = 0;\n    \n    SRFastLog(@\"Received close frame\");\n    \n    if (dataSize == 1) {\n        // TODO handle error\n        [self _closeWithProtocolError:@\"Payload for close must be larger than 2 bytes\"];\n        return;\n    } else if (dataSize >= 2) {\n        [data getBytes:&closeCode length:sizeof(closeCode)];\n        _closeCode = EndianU16_BtoN(closeCode);\n        if (!closeCodeIsValid(_closeCode)) {\n            [self _closeWithProtocolError:[NSString stringWithFormat:@\"Cannot have close code of %d\", _closeCode]];\n            return;\n        }\n        if (dataSize > 2) {\n            _closeReason = [[NSString alloc] initWithData:[data subdataWithRange:NSMakeRange(2, dataSize - 2)] encoding:NSUTF8StringEncoding];\n            if (!_closeReason) {\n                [self _closeWithProtocolError:@\"Close reason MUST be valid UTF-8\"];\n                return;\n            }\n        }\n    } else {\n        _closeCode = SRStatusNoStatusReceived;\n    }\n    \n    [self assertOnWorkQueue];\n    \n    if (self.readyState == SR_OPEN) {\n        [self closeWithCode:1000 reason:nil];\n    }\n    dispatch_async(_workQueue, ^{\n        [self _disconnect];\n    });\n}\n\n- (void)_disconnect;\n{\n    [self assertOnWorkQueue];\n    SRFastLog(@\"Trying to disconnect\");\n    _closeWhenFinishedWriting = YES;\n    [self _pumpWriting];\n}\n\n- (void)_handleFrameWithData:(NSData *)frameData opCode:(NSInteger)opcode;\n{                \n    // Check that the current data is valid UTF8\n    \n    BOOL isControlFrame = (opcode == SROpCodePing || opcode == SROpCodePong || opcode == SROpCodeConnectionClose);\n    if (!isControlFrame) {\n        [self _readFrameNew];\n    } else {\n        dispatch_async(_workQueue, ^{\n            [self _readFrameContinue];\n        });\n    }\n    \n    switch (opcode) {\n        case SROpCodeTextFrame: {\n            NSString *str = [[NSString alloc] initWithData:frameData encoding:NSUTF8StringEncoding];\n            if (str == nil && frameData) {\n                [self closeWithCode:SRStatusCodeInvalidUTF8 reason:@\"Text frames must be valid UTF-8\"];\n                dispatch_async(_workQueue, ^{\n                    [self _disconnect];\n                });\n\n                return;\n            }\n            [self _handleMessage:str];\n            break;\n        }\n        case SROpCodeBinaryFrame:\n            [self _handleMessage:[frameData copy]];\n            break;\n        case SROpCodeConnectionClose:\n            [self handleCloseWithData:frameData];\n            break;\n        case SROpCodePing:\n            [self handlePing:frameData];\n            break;\n        case SROpCodePong:\n            [self handlePong];\n            break;\n        default:\n            [self _closeWithProtocolError:[NSString stringWithFormat:@\"Unknown opcode %d\", opcode]];\n            // TODO: Handle invalid opcode\n            break;\n    }\n}\n\n- (void)_handleFrameHeader:(frame_header)frame_header curData:(NSData *)curData;\n{\n    assert(frame_header.opcode != 0);\n    \n    if (self.readyState != SR_OPEN) {\n        return;\n    }\n    \n    \n    BOOL isControlFrame = (frame_header.opcode == SROpCodePing || frame_header.opcode == SROpCodePong || frame_header.opcode == SROpCodeConnectionClose);\n    \n    if (isControlFrame && !frame_header.fin) {\n        [self _closeWithProtocolError:@\"Fragmented control frames not allowed\"];\n        return;\n    }\n    \n    if (isControlFrame && frame_header.payload_length >= 126) {\n        [self _closeWithProtocolError:@\"Control frames cannot have payloads larger than 126 bytes\"];\n        return;\n    }\n    \n    if (!isControlFrame) {\n        _currentFrameOpcode = frame_header.opcode;\n        _currentFrameCount += 1;\n    }\n    \n    if (frame_header.payload_length == 0) {\n        if (isControlFrame) {\n            [self _handleFrameWithData:curData opCode:frame_header.opcode];\n        } else {\n            if (frame_header.fin) {\n                [self _handleFrameWithData:_currentFrameData opCode:frame_header.opcode];\n            } else {\n                // TODO add assert that opcode is not a control;\n                [self _readFrameContinue];\n            }\n        }\n    } else {\n        [self _addConsumerWithDataLength:frame_header.payload_length callback:^(SRWebSocket *self, NSData *newData) {\n            if (isControlFrame) {\n                [self _handleFrameWithData:newData opCode:frame_header.opcode];\n            } else {\n                if (frame_header.fin) {\n                    [self _handleFrameWithData:self->_currentFrameData opCode:frame_header.opcode];\n                } else {\n                    // TODO add assert that opcode is not a control;\n                    [self _readFrameContinue];\n                }\n                \n            }\n        } readToCurrentFrame:!isControlFrame unmaskBytes:frame_header.masked];\n    }\n}\n\n/* From RFC:\n\n 0                   1                   2                   3\n 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1\n +-+-+-+-+-------+-+-------------+-------------------------------+\n |F|R|R|R| opcode|M| Payload len |    Extended payload length    |\n |I|S|S|S|  (4)  |A|     (7)     |             (16/64)           |\n |N|V|V|V|       |S|             |   (if payload len==126/127)   |\n | |1|2|3|       |K|             |                               |\n +-+-+-+-+-------+-+-------------+ - - - - - - - - - - - - - - - +\n |     Extended payload length continued, if payload len == 127  |\n + - - - - - - - - - - - - - - - +-------------------------------+\n |                               |Masking-key, if MASK set to 1  |\n +-------------------------------+-------------------------------+\n | Masking-key (continued)       |          Payload Data         |\n +-------------------------------- - - - - - - - - - - - - - - - +\n :                     Payload Data continued ...                :\n + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +\n |                     Payload Data continued ...                |\n +---------------------------------------------------------------+\n */\n\nstatic const uint8_t SRFinMask          = 0x80;\nstatic const uint8_t SROpCodeMask       = 0x0F;\nstatic const uint8_t SRRsvMask          = 0x70;\nstatic const uint8_t SRMaskMask         = 0x80;\nstatic const uint8_t SRPayloadLenMask   = 0x7F;\n\n\n- (void)_readFrameContinue;\n{\n    assert((_currentFrameCount == 0 && _currentFrameOpcode == 0) || (_currentFrameCount > 0 && _currentFrameOpcode > 0));\n\n    [self _addConsumerWithDataLength:2 callback:^(SRWebSocket *self, NSData *data) {\n        __block frame_header header = {0};\n        \n        const uint8_t *headerBuffer = data.bytes;\n        assert(data.length >= 2);\n        \n        if (headerBuffer[0] & SRRsvMask) {\n            [self _closeWithProtocolError:@\"Server used RSV bits\"];\n            return;\n        }\n        \n        uint8_t receivedOpcode = (SROpCodeMask & headerBuffer[0]);\n        \n        BOOL isControlFrame = (receivedOpcode == SROpCodePing || receivedOpcode == SROpCodePong || receivedOpcode == SROpCodeConnectionClose);\n        \n        if (!isControlFrame && receivedOpcode != 0 && self->_currentFrameCount > 0) {\n            [self _closeWithProtocolError:@\"all data frames after the initial data frame must have opcode 0\"];\n            return;\n        }\n        \n        if (receivedOpcode == 0 && self->_currentFrameCount == 0) {\n            [self _closeWithProtocolError:@\"cannot continue a message\"];\n            return;\n        }\n        \n        header.opcode = receivedOpcode == 0 ? self->_currentFrameOpcode : receivedOpcode;\n        \n        header.fin = !!(SRFinMask & headerBuffer[0]);\n        \n        \n        header.masked = !!(SRMaskMask & headerBuffer[1]);\n        header.payload_length = SRPayloadLenMask & headerBuffer[1];\n        \n        headerBuffer = NULL;\n        \n        if (header.masked) {\n            [self _closeWithProtocolError:@\"Client must receive unmasked data\"];\n        }\n        \n        size_t extra_bytes_needed = header.masked ? sizeof(_currentReadMaskKey) : 0;\n        \n        if (header.payload_length == 126) {\n            extra_bytes_needed += sizeof(uint16_t);\n        } else if (header.payload_length == 127) {\n            extra_bytes_needed += sizeof(uint64_t);\n        }\n        \n        if (extra_bytes_needed == 0) {\n            [self _handleFrameHeader:header curData:self->_currentFrameData];\n        } else {\n            [self _addConsumerWithDataLength:extra_bytes_needed callback:^(SRWebSocket *self, NSData *data) {\n                size_t mapped_size = data.length;\n                const void *mapped_buffer = data.bytes;\n                size_t offset = 0;\n                \n                if (header.payload_length == 126) {\n                    assert(mapped_size >= sizeof(uint16_t));\n                    uint16_t newLen = EndianU16_BtoN(*(uint16_t *)(mapped_buffer));\n                    header.payload_length = newLen;\n                    offset += sizeof(uint16_t);\n                } else if (header.payload_length == 127) {\n                    assert(mapped_size >= sizeof(uint64_t));\n                    header.payload_length = EndianU64_BtoN(*(uint64_t *)(mapped_buffer));\n                    offset += sizeof(uint64_t);\n                } else {\n                    assert(header.payload_length < 126 && header.payload_length >= 0);\n                }\n                \n                \n                if (header.masked) {\n                    assert(mapped_size >= sizeof(_currentReadMaskOffset) + offset);\n                    memcpy(self->_currentReadMaskKey, ((uint8_t *)mapped_buffer) + offset, sizeof(self->_currentReadMaskKey));\n                }\n                \n                [self _handleFrameHeader:header curData:self->_currentFrameData];\n            } readToCurrentFrame:NO unmaskBytes:NO];\n        }\n    } readToCurrentFrame:NO unmaskBytes:NO];\n}\n\n- (void)_readFrameNew;\n{\n    dispatch_async(_workQueue, ^{\n        [_currentFrameData setLength:0];\n        \n        _currentFrameOpcode = 0;\n        _currentFrameCount = 0;\n        _readOpCount = 0;\n        _currentStringScanPosition = 0;\n        \n        [self _readFrameContinue];\n    });\n}\n\n- (void)_pumpWriting;\n{\n    [self assertOnWorkQueue];\n    \n    NSUInteger dataLength = _outputBuffer.length;\n    if (dataLength - _outputBufferOffset > 0 && _outputStream.hasSpaceAvailable) {\n        NSInteger bytesWritten = [_outputStream write:_outputBuffer.bytes + _outputBufferOffset maxLength:dataLength - _outputBufferOffset];\n        if (bytesWritten == -1) {\n            [self _failWithError:[NSError errorWithDomain:@\"org.lolrus.SocketRocket\" code:2145 userInfo:[NSDictionary dictionaryWithObject:@\"Error writing to stream\" forKey:NSLocalizedDescriptionKey]]];\n             return;\n        }\n        \n        _outputBufferOffset += bytesWritten;\n        \n        if (_outputBufferOffset > 4096 && _outputBufferOffset > (_outputBuffer.length >> 1)) {\n            _outputBuffer = [[NSMutableData alloc] initWithBytes:(char *)_outputBuffer.bytes + _outputBufferOffset length:_outputBuffer.length - _outputBufferOffset];\n            _outputBufferOffset = 0;\n        }\n    }\n    \n    if (_closeWhenFinishedWriting && \n        _outputBuffer.length - _outputBufferOffset == 0 && \n        (_inputStream.streamStatus != NSStreamStatusNotOpen &&\n         _inputStream.streamStatus != NSStreamStatusClosed) &&\n        !_sentClose) {\n        _sentClose = YES;\n            \n        [_outputStream close];\n        [_inputStream close];\n        \n        \n        for (NSArray *runLoop in [_scheduledRunloops copy]) {\n            [self unscheduleFromRunLoop:[runLoop objectAtIndex:0] forMode:[runLoop objectAtIndex:1]];\n        }\n        \n        if (!_failed) {\n            [self _performDelegateBlock:^{\n                if ([self.delegate respondsToSelector:@selector(webSocket:didCloseWithCode:reason:wasClean:)]) {\n                    [self.delegate webSocket:self didCloseWithCode:_closeCode reason:_closeReason wasClean:YES];\n                }\n            }];\n        }\n        \n        _selfRetain = nil;\n    }\n}\n\n- (void)_addConsumerWithScanner:(stream_scanner)consumer callback:(data_callback)callback;\n{\n    [self assertOnWorkQueue];\n    [self _addConsumerWithScanner:consumer callback:callback dataLength:0];\n}\n\n- (void)_addConsumerWithDataLength:(size_t)dataLength callback:(data_callback)callback readToCurrentFrame:(BOOL)readToCurrentFrame unmaskBytes:(BOOL)unmaskBytes;\n{   \n    [self assertOnWorkQueue];\n    assert(dataLength);\n    \n    [_consumers addObject:[_consumerPool consumerWithScanner:nil handler:callback bytesNeeded:dataLength readToCurrentFrame:readToCurrentFrame unmaskBytes:unmaskBytes]];\n    [self _pumpScanner];\n}\n\n- (void)_addConsumerWithScanner:(stream_scanner)consumer callback:(data_callback)callback dataLength:(size_t)dataLength;\n{    \n    [self assertOnWorkQueue];\n    [_consumers addObject:[_consumerPool consumerWithScanner:consumer handler:callback bytesNeeded:dataLength readToCurrentFrame:NO unmaskBytes:NO]];\n    [self _pumpScanner];\n}\n\n\nstatic const char CRLFCRLFBytes[] = {'\\r', '\\n', '\\r', '\\n'};\n\n- (void)_readUntilHeaderCompleteWithCallback:(data_callback)dataHandler;\n{\n    [self _readUntilBytes:CRLFCRLFBytes length:sizeof(CRLFCRLFBytes) callback:dataHandler];\n}\n\n- (void)_readUntilBytes:(const void *)bytes length:(size_t)length callback:(data_callback)dataHandler;\n{\n    // TODO optimize so this can continue from where we last searched\n    stream_scanner consumer = ^size_t(NSData *data) {\n        __block size_t found_size = 0;\n        __block size_t match_count = 0;\n        \n        size_t size = data.length;\n        const unsigned char *buffer = data.bytes;\n        for (size_t i = 0; i < size; i++ ) {\n            if (((const unsigned char *)buffer)[i] == ((const unsigned char *)bytes)[match_count]) {\n                match_count += 1;\n                if (match_count == length) {\n                    found_size = i + 1;\n                    break;\n                }\n            } else {\n                match_count = 0;\n            }\n        }\n        return found_size;\n    };\n    [self _addConsumerWithScanner:consumer callback:dataHandler];\n}\n\n\n// Returns true if did work\n- (BOOL)_innerPumpScanner {\n    \n    BOOL didWork = NO;\n    \n    if (self.readyState >= SR_CLOSING) {\n        return didWork;\n    }\n    \n    if (!_consumers.count) {\n        return didWork;\n    }\n    \n    size_t curSize = _readBuffer.length - _readBufferOffset;\n    if (!curSize) {\n        return didWork;\n    }\n    \n    SRIOConsumer *consumer = [_consumers objectAtIndex:0];\n    \n    size_t bytesNeeded = consumer.bytesNeeded;\n    \n    size_t foundSize = 0;\n    if (consumer.consumer) {\n        NSData *tempView = [NSData dataWithBytesNoCopy:(char *)_readBuffer.bytes + _readBufferOffset length:_readBuffer.length - _readBufferOffset freeWhenDone:NO];  \n        foundSize = consumer.consumer(tempView);\n    } else {\n        assert(consumer.bytesNeeded);\n        if (curSize >= bytesNeeded) {\n            foundSize = bytesNeeded;\n        } else if (consumer.readToCurrentFrame) {\n            foundSize = curSize;\n        }\n    }\n    \n    NSData *slice = nil;\n    if (consumer.readToCurrentFrame || foundSize) {\n        NSRange sliceRange = NSMakeRange(_readBufferOffset, foundSize);\n        slice = [_readBuffer subdataWithRange:sliceRange];\n        \n        _readBufferOffset += foundSize;\n        \n        if (_readBufferOffset > 4096 && _readBufferOffset > (_readBuffer.length >> 1)) {\n            _readBuffer = [[NSMutableData alloc] initWithBytes:(char *)_readBuffer.bytes + _readBufferOffset length:_readBuffer.length - _readBufferOffset];            _readBufferOffset = 0;\n        }\n        \n        if (consumer.unmaskBytes) {\n            NSMutableData *mutableSlice = [slice mutableCopy];\n            \n            NSUInteger len = mutableSlice.length;\n            uint8_t *bytes = mutableSlice.mutableBytes;\n            \n            for (NSUInteger i = 0; i < len; i++) {\n                bytes[i] = bytes[i] ^ _currentReadMaskKey[_currentReadMaskOffset % sizeof(_currentReadMaskKey)];\n                _currentReadMaskOffset += 1;\n            }\n            \n            slice = mutableSlice;\n        }\n        \n        if (consumer.readToCurrentFrame) {\n            [_currentFrameData appendData:slice];\n            \n            _readOpCount += 1;\n            \n            if (_currentFrameOpcode == SROpCodeTextFrame) {\n                // Validate UTF8 stuff.\n                size_t currentDataSize = _currentFrameData.length;\n                if (_currentFrameOpcode == SROpCodeTextFrame && currentDataSize > 0) {\n                    // TODO: Optimize the crap out of this.  Don't really have to copy all the data each time\n                    \n                    size_t scanSize = currentDataSize - _currentStringScanPosition;\n                    \n                    NSData *scan_data = [_currentFrameData subdataWithRange:NSMakeRange(_currentStringScanPosition, scanSize)];\n                    int32_t valid_utf8_size = validate_dispatch_data_partial_string(scan_data);\n                    \n                    if (valid_utf8_size == -1) {\n                        [self closeWithCode:SRStatusCodeInvalidUTF8 reason:@\"Text frames must be valid UTF-8\"];\n                        dispatch_async(_workQueue, ^{\n                            [self _disconnect];\n                        });\n                        return didWork;\n                    } else {\n                        _currentStringScanPosition += valid_utf8_size;\n                    }\n                } \n                \n            }\n            \n            consumer.bytesNeeded -= foundSize;\n            \n            if (consumer.bytesNeeded == 0) {\n                [_consumers removeObjectAtIndex:0];\n                consumer.handler(self, nil);\n                [_consumerPool returnConsumer:consumer];\n                didWork = YES;\n            }\n        } else if (foundSize) {\n            [_consumers removeObjectAtIndex:0];\n            consumer.handler(self, slice);\n            [_consumerPool returnConsumer:consumer];\n            didWork = YES;\n        }\n    }\n    return didWork;\n}\n\n-(void)_pumpScanner;\n{\n    [self assertOnWorkQueue];\n    \n    if (!_isPumping) {\n        _isPumping = YES;\n    } else {\n        return;\n    }\n    \n    while ([self _innerPumpScanner]) {\n        \n    }\n    \n    _isPumping = NO;\n}\n\n//#define NOMASK\n\nstatic const size_t SRFrameHeaderOverhead = 32;\n\n- (void)_sendFrameWithOpcode:(SROpCode)opcode data:(id)data;\n{\n    [self assertOnWorkQueue];\n    \n    NSAssert(data == nil || [data isKindOfClass:[NSData class]] || [data isKindOfClass:[NSString class]], @\"Function expects nil, NSString or NSData\");\n    \n    size_t payloadLength = [data isKindOfClass:[NSString class]] ? [(NSString *)data lengthOfBytesUsingEncoding:NSUTF8StringEncoding] : [data length];\n        \n    NSMutableData *frame = [[NSMutableData alloc] initWithLength:payloadLength + SRFrameHeaderOverhead];\n    if (!frame) {\n        [self closeWithCode:SRStatusCodeMessageTooBig reason:@\"Message too big\"];\n        return;\n    }\n    uint8_t *frame_buffer = (uint8_t *)[frame mutableBytes];\n    \n    // set fin\n    frame_buffer[0] = SRFinMask | opcode;\n    \n    BOOL useMask = YES;\n#ifdef NOMASK\n    useMask = NO;\n#endif\n    \n    if (useMask) {\n    // set the mask and header\n        frame_buffer[1] |= SRMaskMask;\n    }\n    \n    size_t frame_buffer_size = 2;\n    \n    const uint8_t *unmasked_payload = NULL;\n    if ([data isKindOfClass:[NSData class]]) {\n        unmasked_payload = (uint8_t *)[data bytes];\n    } else if ([data isKindOfClass:[NSString class]]) {\n        unmasked_payload =  (const uint8_t *)[data UTF8String];\n    } else {\n        assert(NO);\n    }\n    \n    if (payloadLength < 126) {\n        frame_buffer[1] |= payloadLength;\n    } else if (payloadLength <= UINT16_MAX) {\n        frame_buffer[1] |= 126;\n        *((uint16_t *)(frame_buffer + frame_buffer_size)) = EndianU16_BtoN((uint16_t)payloadLength);\n        frame_buffer_size += sizeof(uint16_t);\n    } else {\n        frame_buffer[1] |= 127;\n        *((uint64_t *)(frame_buffer + frame_buffer_size)) = EndianU64_BtoN((uint64_t)payloadLength);\n        frame_buffer_size += sizeof(uint64_t);\n    }\n        \n    if (!useMask) {\n        for (size_t i = 0; i < payloadLength; i++) {\n            frame_buffer[frame_buffer_size] = unmasked_payload[i];\n            frame_buffer_size += 1;\n        }\n    } else {\n        uint8_t *mask_key = frame_buffer + frame_buffer_size;\n        SecRandomCopyBytes(kSecRandomDefault, sizeof(uint32_t), (uint8_t *)mask_key);\n        frame_buffer_size += sizeof(uint32_t);\n        \n        // TODO: could probably optimize this with SIMD\n        for (size_t i = 0; i < payloadLength; i++) {\n            frame_buffer[frame_buffer_size] = unmasked_payload[i] ^ mask_key[i % sizeof(uint32_t)];\n            frame_buffer_size += 1;\n        }\n    }\n\n    assert(frame_buffer_size <= [frame length]);\n    frame.length = frame_buffer_size;\n    \n    [self _writeData:frame];\n}\n\n- (void)stream:(NSStream *)aStream handleEvent:(NSStreamEvent)eventCode;\n{\n    if (_secure && !_pinnedCertFound && (eventCode == NSStreamEventHasBytesAvailable || eventCode == NSStreamEventHasSpaceAvailable)) {\n        \n        NSArray *sslCerts = [_urlRequest SR_SSLPinnedCertificates];\n        if (sslCerts) {\n            SecTrustRef secTrust = (__bridge SecTrustRef)[aStream propertyForKey:(__bridge id)kCFStreamPropertySSLPeerTrust];\n            if (secTrust) {\n                NSInteger numCerts = SecTrustGetCertificateCount(secTrust);\n                for (NSInteger i = 0; i < numCerts && !_pinnedCertFound; i++) {\n                    SecCertificateRef cert = SecTrustGetCertificateAtIndex(secTrust, i);\n                    NSData *certData = CFBridgingRelease(SecCertificateCopyData(cert));\n                    \n                    for (id ref in sslCerts) {\n                        SecCertificateRef trustedCert = (__bridge SecCertificateRef)ref;\n                        NSData *trustedCertData = CFBridgingRelease(SecCertificateCopyData(trustedCert));\n                        \n                        if ([trustedCertData isEqualToData:certData]) {\n                            _pinnedCertFound = YES;\n                            break;\n                        }\n                    }\n                }\n            }\n            \n            if (!_pinnedCertFound) {\n                dispatch_async(_workQueue, ^{\n                    [self _failWithError:[NSError errorWithDomain:@\"org.lolrus.SocketRocket\" code:23556 userInfo:[NSDictionary dictionaryWithObject:[NSString stringWithFormat:@\"Invalid server cert\"] forKey:NSLocalizedDescriptionKey]]];\n                });\n                return;\n            }\n        }\n    }\n\n    dispatch_async(_workQueue, ^{\n        switch (eventCode) {\n            case NSStreamEventOpenCompleted: {\n                SRFastLog(@\"NSStreamEventOpenCompleted %@\", aStream);\n                if (self.readyState >= SR_CLOSING) {\n                    return;\n                }\n                assert(_readBuffer);\n                \n                if (self.readyState == SR_CONNECTING && aStream == _inputStream) {\n                    [self didConnect];\n                }\n                [self _pumpWriting];\n                [self _pumpScanner];\n                break;\n            }\n                \n            case NSStreamEventErrorOccurred: {\n                SRFastLog(@\"NSStreamEventErrorOccurred %@ %@\", aStream, [[aStream streamError] copy]);\n                /// TODO specify error better!\n                [self _failWithError:aStream.streamError];\n                _readBufferOffset = 0;\n                [_readBuffer setLength:0];\n                break;\n                \n            }\n                \n            case NSStreamEventEndEncountered: {\n                [self _pumpScanner];\n                SRFastLog(@\"NSStreamEventEndEncountered %@\", aStream);\n                if (aStream.streamError) {\n                    [self _failWithError:aStream.streamError];\n                } else {\n                    if (self.readyState != SR_CLOSED) {\n                        self.readyState = SR_CLOSED;\n                        _selfRetain = nil;\n                    }\n\n                    if (!_sentClose && !_failed) {\n                        _sentClose = YES;\n                        // If we get closed in this state it's probably not clean because we should be sending this when we send messages\n                        [self _performDelegateBlock:^{\n                            if ([self.delegate respondsToSelector:@selector(webSocket:didCloseWithCode:reason:wasClean:)]) {\n                                [self.delegate webSocket:self didCloseWithCode:0 reason:@\"Stream end encountered\" wasClean:NO];\n                            }\n                        }];\n                    }\n                }\n                \n                break;\n            }\n                \n            case NSStreamEventHasBytesAvailable: {\n                SRFastLog(@\"NSStreamEventHasBytesAvailable %@\", aStream);\n                const int bufferSize = 2048;\n                uint8_t buffer[bufferSize];\n                \n                while (_inputStream.hasBytesAvailable) {\n                    int bytes_read = [_inputStream read:buffer maxLength:bufferSize];\n                    \n                    if (bytes_read > 0) {\n                        [_readBuffer appendBytes:buffer length:bytes_read];\n                    } else if (bytes_read < 0) {\n                        [self _failWithError:_inputStream.streamError];\n                    }\n                    \n                    if (bytes_read != bufferSize) {\n                        break;\n                    }\n                };\n                [self _pumpScanner];\n                break;\n            }\n                \n            case NSStreamEventHasSpaceAvailable: {\n                SRFastLog(@\"NSStreamEventHasSpaceAvailable %@\", aStream);\n                [self _pumpWriting];\n                break;\n            }\n                \n            default:\n                SRFastLog(@\"(default)  %@\", aStream);\n                break;\n        }\n    });\n}\n\n@end\n\n\n@implementation SRIOConsumer\n\n@synthesize bytesNeeded = _bytesNeeded;\n@synthesize consumer = _scanner;\n@synthesize handler = _handler;\n@synthesize readToCurrentFrame = _readToCurrentFrame;\n@synthesize unmaskBytes = _unmaskBytes;\n\n- (void)setupWithScanner:(stream_scanner)scanner handler:(data_callback)handler bytesNeeded:(size_t)bytesNeeded readToCurrentFrame:(BOOL)readToCurrentFrame unmaskBytes:(BOOL)unmaskBytes;\n{\n    _scanner = [scanner copy];\n    _handler = [handler copy];\n    _bytesNeeded = bytesNeeded;\n    _readToCurrentFrame = readToCurrentFrame;\n    _unmaskBytes = unmaskBytes;\n    assert(_scanner || _bytesNeeded);\n}\n\n\n@end\n\n\n@implementation SRIOConsumerPool {\n    NSUInteger _poolSize;\n    NSMutableArray *_bufferedConsumers;\n}\n\n- (id)initWithBufferCapacity:(NSUInteger)poolSize;\n{\n    self = [super init];\n    if (self) {\n        _poolSize = poolSize;\n        _bufferedConsumers = [[NSMutableArray alloc] initWithCapacity:poolSize];\n    }\n    return self;\n}\n\n- (id)init\n{\n    return [self initWithBufferCapacity:8];\n}\n\n- (SRIOConsumer *)consumerWithScanner:(stream_scanner)scanner handler:(data_callback)handler bytesNeeded:(size_t)bytesNeeded readToCurrentFrame:(BOOL)readToCurrentFrame unmaskBytes:(BOOL)unmaskBytes;\n{\n    SRIOConsumer *consumer = nil;\n    if (_bufferedConsumers.count) {\n        consumer = [_bufferedConsumers lastObject];\n        [_bufferedConsumers removeLastObject];\n    } else {\n        consumer = [[SRIOConsumer alloc] init];\n    }\n    \n    [consumer setupWithScanner:scanner handler:handler bytesNeeded:bytesNeeded readToCurrentFrame:readToCurrentFrame unmaskBytes:unmaskBytes];\n    \n    return consumer;\n}\n\n- (void)returnConsumer:(SRIOConsumer *)consumer;\n{\n    if (_bufferedConsumers.count < _poolSize) {\n        [_bufferedConsumers addObject:consumer];\n    }\n}\n\n@end\n\n\n@implementation  NSURLRequest (CertificateAdditions)\n\n- (NSArray *)SR_SSLPinnedCertificates;\n{\n    return [NSURLProtocol propertyForKey:@\"SR_SSLPinnedCertificates\" inRequest:self];\n}\n\n@end\n\n@implementation  NSMutableURLRequest (CertificateAdditions)\n\n- (NSArray *)SR_SSLPinnedCertificates;\n{\n    return [NSURLProtocol propertyForKey:@\"SR_SSLPinnedCertificates\" inRequest:self];\n}\n\n- (void)setSR_SSLPinnedCertificates:(NSArray *)SR_SSLPinnedCertificates;\n{\n    [NSURLProtocol setProperty:SR_SSLPinnedCertificates forKey:@\"SR_SSLPinnedCertificates\" inRequest:self];\n}\n\n@end\n\n@implementation NSURL (SRWebSocket)\n\n- (NSString *)SR_origin;\n{\n    NSString *scheme = [self.scheme lowercaseString];\n        \n    if ([scheme isEqualToString:@\"wss\"]) {\n        scheme = @\"https\";\n    } else if ([scheme isEqualToString:@\"ws\"]) {\n        scheme = @\"http\";\n    }\n    \n    if (self.port) {\n        return [NSString stringWithFormat:@\"%@://%@:%@/\", scheme, self.host, self.port];\n    } else {\n        return [NSString stringWithFormat:@\"%@://%@/\", scheme, self.host];\n    }\n}\n\n@end\n\nstatic inline dispatch_queue_t log_queue() {\n    static dispatch_queue_t queue = 0;\n    static dispatch_once_t onceToken;\n    dispatch_once(&onceToken, ^{\n        queue = dispatch_queue_create(\"fast log queue\", DISPATCH_QUEUE_SERIAL);\n    });\n    \n    return queue;\n}\n\n//#define SR_ENABLE_LOG\n\nstatic inline void SRFastLog(NSString *format, ...)  {\n#ifdef SR_ENABLE_LOG\n    __block va_list arg_list;\n    va_start (arg_list, format);\n    \n    NSString *formattedString = [[NSString alloc] initWithFormat:format arguments:arg_list];\n    \n    va_end(arg_list);\n    \n    NSLog(@\"[SR] %@\", formattedString);\n#endif\n}\n\n\n#ifdef HAS_ICU\n\nstatic inline int32_t validate_dispatch_data_partial_string(NSData *data) {\n    const void * contents = [data bytes];\n    long size = [data length];\n    \n    const uint8_t *str = (const uint8_t *)contents;\n    \n    UChar32 codepoint = 1;\n    int32_t offset = 0;\n    int32_t lastOffset = 0;\n    while(offset < size && codepoint > 0)  {\n        lastOffset = offset;\n        U8_NEXT(str, offset, size, codepoint);\n    }\n    \n    if (codepoint == -1) {\n        // Check to see if the last byte is valid or whether it was just continuing\n        if (!U8_IS_LEAD(str[lastOffset]) || U8_COUNT_TRAIL_BYTES(str[lastOffset]) + lastOffset < (int32_t)size) {\n            \n            size = -1;\n        } else {\n            uint8_t leadByte = str[lastOffset];\n            U8_MASK_LEAD_BYTE(leadByte, U8_COUNT_TRAIL_BYTES(leadByte));\n            \n            for (int i = lastOffset + 1; i < offset; i++) {\n                if (U8_IS_SINGLE(str[i]) || U8_IS_LEAD(str[i]) || !U8_IS_TRAIL(str[i])) {\n                    size = -1;\n                }\n            }\n            \n            if (size != -1) {\n                size = lastOffset;\n            }\n        }\n    }\n    \n    if (size != -1 && ![[NSString alloc] initWithBytesNoCopy:(char *)[data bytes] length:size encoding:NSUTF8StringEncoding freeWhenDone:NO]) {\n        size = -1;\n    }\n    \n    return size;\n}\n\n#else\n\n// This is a hack, and probably not optimal\nstatic inline int32_t validate_dispatch_data_partial_string(NSData *data) {\n    static const int maxCodepointSize = 3;\n    \n    for (int i = 0; i < maxCodepointSize; i++) {\n        NSString *str = [[NSString alloc] initWithBytesNoCopy:(char *)data.bytes length:data.length - i encoding:NSUTF8StringEncoding freeWhenDone:NO];\n        if (str) {\n            return data.length - i;\n        }\n    }\n    \n    return -1;\n}\n\n#endif\n\nstatic _SRRunLoopThread *networkThread = nil;\nstatic NSRunLoop *networkRunLoop = nil;\n\n@implementation NSRunLoop (SRWebSocket)\n\n+ (NSRunLoop *)SR_networkRunLoop {\n    static dispatch_once_t onceToken;\n    dispatch_once(&onceToken, ^{\n        networkThread = [[_SRRunLoopThread alloc] init];\n        networkThread.name = @\"com.squareup.SocketRocket.NetworkThread\";\n        [networkThread start];\n        networkRunLoop = networkThread.runLoop;\n    });\n    \n    return networkRunLoop;\n}\n\n@end\n\n\n@implementation _SRRunLoopThread {\n    dispatch_group_t _waitGroup;\n}\n\n@synthesize runLoop = _runLoop;\n\n- (void)dealloc\n{\n    sr_dispatch_release(_waitGroup);\n}\n\n- (id)init\n{\n    self = [super init];\n    if (self) {\n        _waitGroup = dispatch_group_create();\n        dispatch_group_enter(_waitGroup);\n    }\n    return self;\n}\n\n- (void)main;\n{\n    @autoreleasepool {\n        _runLoop = [NSRunLoop currentRunLoop];\n        dispatch_group_leave(_waitGroup);\n        \n        NSTimer *timer = [[NSTimer alloc] initWithFireDate:[NSDate distantFuture] interval:0.0 target:nil selector:nil userInfo:nil repeats:NO];\n        [_runLoop addTimer:timer forMode:NSDefaultRunLoopMode];\n        \n        while ([_runLoop runMode:NSDefaultRunLoopMode beforeDate:[NSDate distantFuture]]) {\n            \n        }\n        assert(NO);\n    }\n}\n\n- (NSRunLoop *)runLoop;\n{\n    dispatch_group_wait(_waitGroup, DISPATCH_TIME_FOREVER);\n    return _runLoop;\n}\n\n@end\n"
  },
  {
    "path": "ArcBit/External/SocketRocket/SocketRocket-Prefix.pch",
    "content": "//\n//   Copyright 2012 Square Inc.\n//\n//   Licensed under the Apache License, Version 2.0 (the \"License\");\n//   you may not use this file except in compliance with the License.\n//   You may obtain a copy of the License at\n//\n//       http://www.apache.org/licenses/LICENSE-2.0\n//\n//   Unless required by applicable law or agreed to in writing, software\n//   distributed under the License is distributed on an \"AS IS\" BASIS,\n//   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n//   See the License for the specific language governing permissions and\n//   limitations under the License.\n//\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n    \n#ifdef __OBJC__\n    #import <Foundation/Foundation.h>\n#endif\n    \n#ifdef __cplusplus\n}\n#endif\n"
  },
  {
    "path": "ArcBit/External/SocketRocket/base64.c",
    "content": "/*\t$OpenBSD: base64.c,v 1.5 2006/10/21 09:55:03 otto Exp $\t*/\n\n/*\n * Copyright (c) 1996 by Internet Software Consortium.\n *\n * Permission to use, copy, modify, and distribute this software for any\n * purpose with or without fee is hereby granted, provided that the above\n * copyright notice and this permission notice appear in all copies.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS\n * ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES\n * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE\n * CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL\n * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR\n * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS\n * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS\n * SOFTWARE.\n */\n\n/*\n * Portions Copyright (c) 1995 by International Business Machines, Inc.\n *\n * International Business Machines, Inc. (hereinafter called IBM) grants\n * permission under its copyrights to use, copy, modify, and distribute this\n * Software with or without fee, provided that the above copyright notice and\n * all paragraphs of this notice appear in all copies, and that the name of IBM\n * not be used in connection with the marketing of any product incorporating\n * the Software or modifications thereof, without specific, written prior\n * permission.\n *\n * To the extent it has a right to do so, IBM grants an immunity from suit\n * under its patents, if any, for the use, sale or manufacture of products to\n * the extent that such products are used for performing Domain Name System\n * dynamic updates in TCP/IP networks by means of the Software.  No immunity is\n * granted for any product per se or for any other function of any product.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", AND IBM DISCLAIMS ALL WARRANTIES,\n * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A\n * PARTICULAR PURPOSE.  IN NO EVENT SHALL IBM BE LIABLE FOR ANY SPECIAL,\n * DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER ARISING\n * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE, EVEN\n * IF IBM IS APPRISED OF THE POSSIBILITY OF SUCH DAMAGES.\n */\n\n/* OPENBSD ORIGINAL: lib/libc/net/base64.c */\n\n\n#if (!defined(HAVE_B64_NTOP) && !defined(HAVE___B64_NTOP)) || (!defined(HAVE_B64_PTON) && !defined(HAVE___B64_PTON))\n\n#include <sys/types.h>\n#include <sys/param.h>\n#include <sys/socket.h>\n#include <netinet/in.h>\n#include <arpa/inet.h>\n\n#include <ctype.h>\n#include <stdio.h>\n\n#include <stdlib.h>\n#include <string.h>\n\n#include \"base64.h\"\n\nstatic const char Base64[] =\n\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\";\nstatic const char Pad64 = '=';\n\n/* (From RFC1521 and draft-ietf-dnssec-secext-03.txt)\n The following encoding technique is taken from RFC 1521 by Borenstein\n and Freed.  It is reproduced here in a slightly edited form for\n convenience.\n \n A 65-character subset of US-ASCII is used, enabling 6 bits to be\n represented per printable character. (The extra 65th character, \"=\",\n is used to signify a special processing function.)\n \n The encoding process represents 24-bit groups of input bits as output\n strings of 4 encoded characters. Proceeding from left to right, a\n 24-bit input group is formed by concatenating 3 8-bit input groups.\n These 24 bits are then treated as 4 concatenated 6-bit groups, each\n of which is translated into a single digit in the base64 alphabet.\n \n Each 6-bit group is used as an index into an array of 64 printable\n characters. The character referenced by the index is placed in the\n output string.\n \n Table 1: The Base64 Alphabet\n \n Value Encoding  Value Encoding  Value Encoding  Value Encoding\n 0 A            17 R            34 i            51 z\n 1 B            18 S            35 j            52 0\n 2 C            19 T            36 k            53 1\n 3 D            20 U            37 l            54 2\n 4 E            21 V            38 m            55 3\n 5 F            22 W            39 n            56 4\n 6 G            23 X            40 o            57 5\n 7 H            24 Y            41 p            58 6\n 8 I            25 Z            42 q            59 7\n 9 J            26 a            43 r            60 8\n 10 K            27 b            44 s            61 9\n 11 L            28 c            45 t            62 +\n 12 M            29 d            46 u            63 /\n 13 N            30 e            47 v\n 14 O            31 f            48 w         (pad) =\n 15 P            32 g            49 x\n 16 Q            33 h            50 y\n \n Special processing is performed if fewer than 24 bits are available\n at the end of the data being encoded.  A full encoding quantum is\n always completed at the end of a quantity.  When fewer than 24 input\n bits are available in an input group, zero bits are added (on the\n right) to form an integral number of 6-bit groups.  Padding at the\n end of the data is performed using the '=' character.\n \n Since all base64 input is an integral number of octets, only the\n -------------------------------------------------                       \n following cases can arise:\n \n (1) the final quantum of encoding input is an integral\n multiple of 24 bits; here, the final unit of encoded\n output will be an integral multiple of 4 characters\n with no \"=\" padding,\n (2) the final quantum of encoding input is exactly 8 bits;\n here, the final unit of encoded output will be two\n characters followed by two \"=\" padding characters, or\n (3) the final quantum of encoding input is exactly 16 bits;\n here, the final unit of encoded output will be three\n characters followed by one \"=\" padding character.\n */\n\n#if !defined(HAVE_B64_NTOP) && !defined(HAVE___B64_NTOP) \nint\nb64_ntop(u_char const *src, size_t srclength, char *target, size_t targsize)\n{\n\tsize_t datalength = 0;\n\tu_char input[3];\n\tu_char output[4];\n\tu_int i;\n    \n\twhile (2 < srclength) {\n\t\tinput[0] = *src++;\n\t\tinput[1] = *src++;\n\t\tinput[2] = *src++;\n\t\tsrclength -= 3;\n        \n\t\toutput[0] = input[0] >> 2;\n\t\toutput[1] = ((input[0] & 0x03) << 4) + (input[1] >> 4);\n\t\toutput[2] = ((input[1] & 0x0f) << 2) + (input[2] >> 6);\n\t\toutput[3] = input[2] & 0x3f;\n        \n\t\tif (datalength + 4 > targsize)\n\t\t\treturn (-1);\n\t\ttarget[datalength++] = Base64[output[0]];\n\t\ttarget[datalength++] = Base64[output[1]];\n\t\ttarget[datalength++] = Base64[output[2]];\n\t\ttarget[datalength++] = Base64[output[3]];\n\t}\n    \n\t/* Now we worry about padding. */\n\tif (0 != srclength) {\n\t\t/* Get what's left. */\n\t\tinput[0] = input[1] = input[2] = '\\0';\n\t\tfor (i = 0; i < srclength; i++)\n\t\t\tinput[i] = *src++;\n        \n\t\toutput[0] = input[0] >> 2;\n\t\toutput[1] = ((input[0] & 0x03) << 4) + (input[1] >> 4);\n\t\toutput[2] = ((input[1] & 0x0f) << 2) + (input[2] >> 6);\n        \n\t\tif (datalength + 4 > targsize)\n\t\t\treturn (-1);\n\t\ttarget[datalength++] = Base64[output[0]];\n\t\ttarget[datalength++] = Base64[output[1]];\n\t\tif (srclength == 1)\n\t\t\ttarget[datalength++] = Pad64;\n\t\telse\n\t\t\ttarget[datalength++] = Base64[output[2]];\n\t\ttarget[datalength++] = Pad64;\n\t}\n\tif (datalength >= targsize)\n\t\treturn (-1);\n\ttarget[datalength] = '\\0';\t/* Returned value doesn't count \\0. */\n\treturn (datalength);\n}\n#endif /* !defined(HAVE_B64_NTOP) && !defined(HAVE___B64_NTOP) */\n\n#if !defined(HAVE_B64_PTON) && !defined(HAVE___B64_PTON)\n\n/* skips all whitespace anywhere.\n converts characters, four at a time, starting at (or after)\n src from base - 64 numbers into three 8 bit bytes in the target area.\n it returns the number of data bytes stored at the target, or -1 on error.\n */\n\nint\nb64_pton(char const *src, u_char *target, size_t targsize)\n{\n\tu_int tarindex, state;\n\tint ch;\n\tchar *pos;\n    \n\tstate = 0;\n\ttarindex = 0;\n    \n\twhile ((ch = *src++) != '\\0') {\n\t\tif (isspace(ch))\t/* Skip whitespace anywhere. */\n\t\t\tcontinue;\n        \n\t\tif (ch == Pad64)\n\t\t\tbreak;\n        \n\t\tpos = strchr(Base64, ch);\n\t\tif (pos == 0) \t\t/* A non-base64 character. */\n\t\t\treturn (-1);\n        \n\t\tswitch (state) {\n            case 0:\n                if (target) {\n                    if (tarindex >= targsize)\n                        return (-1);\n                    target[tarindex] = (pos - Base64) << 2;\n                }\n                state = 1;\n                break;\n            case 1:\n                if (target) {\n                    if (tarindex + 1 >= targsize)\n                        return (-1);\n                    target[tarindex]   |=  (pos - Base64) >> 4;\n                    target[tarindex+1]  = ((pos - Base64) & 0x0f)\n                    << 4 ;\n                }\n                tarindex++;\n                state = 2;\n                break;\n            case 2:\n                if (target) {\n                    if (tarindex + 1 >= targsize)\n                        return (-1);\n                    target[tarindex]   |=  (pos - Base64) >> 2;\n                    target[tarindex+1]  = ((pos - Base64) & 0x03)\n                    << 6;\n                }\n                tarindex++;\n                state = 3;\n                break;\n            case 3:\n                if (target) {\n                    if (tarindex >= targsize)\n                        return (-1);\n                    target[tarindex] |= (pos - Base64);\n                }\n                tarindex++;\n                state = 0;\n                break;\n\t\t}\n\t}\n    \n\t/*\n\t * We are done decoding Base-64 chars.  Let's see if we ended\n\t * on a byte boundary, and/or with erroneous trailing characters.\n\t */\n    \n\tif (ch == Pad64) {\t\t/* We got a pad char. */\n\t\tch = *src++;\t\t/* Skip it, get next. */\n\t\tswitch (state) {\n            case 0:\t\t/* Invalid = in first position */\n            case 1:\t\t/* Invalid = in second position */\n                return (-1);\n                \n            case 2:\t\t/* Valid, means one byte of info */\n                /* Skip any number of spaces. */\n                for (; ch != '\\0'; ch = *src++)\n                    if (!isspace(ch))\n                        break;\n                /* Make sure there is another trailing = sign. */\n                if (ch != Pad64)\n                    return (-1);\n                ch = *src++;\t\t/* Skip the = */\n                /* Fall through to \"single trailing =\" case. */\n                /* FALLTHROUGH */\n                \n            case 3:\t\t/* Valid, means two bytes of info */\n                /*\n                 * We know this char is an =.  Is there anything but\n                 * whitespace after it?\n                 */\n                for (; ch != '\\0'; ch = *src++)\n                    if (!isspace(ch))\n                        return (-1);\n                \n                /*\n                 * Now make sure for cases 2 and 3 that the \"extra\"\n                 * bits that slopped past the last full byte were\n                 * zeros.  If we don't check them, they become a\n                 * subliminal channel.\n                 */\n                if (target && target[tarindex] != 0)\n                    return (-1);\n\t\t}\n\t} else {\n\t\t/*\n\t\t * We ended by seeing the end of the string.  Make sure we\n\t\t * have no partial bytes lying around.\n\t\t */\n\t\tif (state != 0)\n\t\t\treturn (-1);\n\t}\n    \n\treturn (tarindex);\n}\n\n#endif /* !defined(HAVE_B64_PTON) && !defined(HAVE___B64_PTON) */\n#endif \n"
  },
  {
    "path": "ArcBit/External/SocketRocket/base64.h",
    "content": "//   Copyright 2012 Square Inc.\n//\n//   Licensed under the Apache License, Version 2.0 (the \"License\");\n//   you may not use this file except in compliance with the License.\n//   You may obtain a copy of the License at\n//\n//       http://www.apache.org/licenses/LICENSE-2.0\n//\n//   Unless required by applicable law or agreed to in writing, software\n//   distributed under the License is distributed on an \"AS IS\" BASIS,\n//   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n//   See the License for the specific language governing permissions and\n//   limitations under the License.\n//\n\n\n#ifndef SocketRocket_base64_h\n#define SocketRocket_base64_h\n\n#include <sys/types.h>\n\nextern int\nb64_ntop(u_char const *src,\n         size_t srclength,\n         char *target,\n         size_t targsize);\n\nextern int\nb64_pton(char const *src,\n         u_char *target, \n         size_t targsize);\n\n\n#endif\n"
  },
  {
    "path": "ArcBit/External/TLCloudDocumentSyncWrapper/TLCloudDocumentSyncWrapper.h",
    "content": "//\n//  TLCloudDocumentSyncWrapper.h\n//  ArcBit\n//\n//  Created by Timothy Lee on 3/14/15.\n//  Copyright (c) 2015 Timothy Lee <stequald01@gmail.com>\n//\n//   This library is free software; you can redistribute it and/or\n//   modify it under the terms of the GNU Lesser General Public\n//   License as published by the Free Software Foundation; either\n//   version 2.1 of the License, or (at your option) any later version.\n//\n//   This library is distributed in the hope that it will be useful,\n//   but WITHOUT ANY WARRANTY; without even the implied warranty of\n//   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n//   Lesser General Public License for more details.\n//\n//   You should have received a copy of the GNU Lesser General Public\n//   License along with this library; if not, write to the Free Software\n//   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,\n//   MA 02110-1301  USA\n\n#import <Foundation/Foundation.h>\n#import <iCloud.h>\n\n@interface TLCloudDocumentSyncWrapper : NSObject <iCloudDelegate>\n\n+ (TLCloudDocumentSyncWrapper *)instance;\n- (BOOL)checkCloudAvailability;\n- (void)saveFileToCloud:(NSString*)fileName content:(NSString*)content completion:(void (^)(UIDocument *cloudDocument, NSData *documentData, NSError *error))completion;\n- (void)getFileFromCloud:(NSString*)fileName completion:(void (^)(UIDocument *cloudDocument, NSData *documentData, NSError *error))completion;\n\n@end\n"
  },
  {
    "path": "ArcBit/External/TLCloudDocumentSyncWrapper/TLCloudDocumentSyncWrapper.m",
    "content": "//\n//  TLCloudDocumentSyncWrapper.m\n//  ArcBit\n//\n//  Created by Timothy Lee on 3/14/15.\n//  Copyright (c) 2015 Timothy Lee <stequald01@gmail.com>\n//\n//   This library is free software; you can redistribute it and/or\n//   modify it under the terms of the GNU Lesser General Public\n//   License as published by the Free Software Foundation; either\n//   version 2.1 of the License, or (at your option) any later version.\n//\n//   This library is distributed in the hope that it will be useful,\n//   but WITHOUT ANY WARRANTY; without even the implied warranty of\n//   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n//   Lesser General Public License for more details.\n//\n//   You should have received a copy of the GNU Lesser General Public\n//   License along with this library; if not, write to the Free Software\n//   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,\n//   MA 02110-1301  USA\n\n#import \"TLCloudDocumentSyncWrapper.h\"\n\nstatic NSString* WALLET_JSON_CLOUD_BACKUP_FILE_EXTENSION = @\"backup\";\n\n@implementation TLCloudDocumentSyncWrapper\n\n+ (TLCloudDocumentSyncWrapper *)instance {\n    static id _instance = nil;\n    static dispatch_once_t oncePredicate;\n    \n    dispatch_once(&oncePredicate, ^{\n        _instance = [[self alloc] init];\n    });\n    \n    return _instance;\n}\n\n- (id)init {\n    self = [super init];\n    if (self) {\n        [[iCloud sharedCloud] setDelegate:self];\n        [[iCloud sharedCloud] setVerboseLogging:YES];\n        [[iCloud sharedCloud] setupiCloudDocumentSyncWithUbiquityContainer:nil];\n    }\n    \n    return self;\n}\n\n- (BOOL)checkCloudAvailability {\n    BOOL cloudIsAvailable = [[iCloud sharedCloud] checkCloudAvailability];\n    return cloudIsAvailable;\n}\n\n- (void)saveFileToCloud:(NSString*)fileName content:(NSString*)content completion:(void (^)(UIDocument *cloudDocument, NSData *documentData, NSError *error))completion {\n    NSData* data = [content dataUsingEncoding:NSUTF8StringEncoding];\n    [[iCloud sharedCloud] saveAndCloseDocumentWithName:fileName withContent:data completion:^(UIDocument *cloudDocument, NSData *documentData, NSError *error) {\n        completion(cloudDocument, documentData, error);\n    }];\n}\n\n- (void)getFileFromCloud:(NSString*)fileName completion:(void (^)(UIDocument *cloudDocument, NSData *documentData, NSError *error))completion {\n    [[iCloud sharedCloud] retrieveCloudDocumentWithName:fileName completion:^(UIDocument *cloudDocument, NSData *documentData, NSError *error) {\n        completion(cloudDocument, documentData, error);\n    }];\n}\n\n#pragma mark - iCloud Methods\n\n- (void)iCloudDidFinishInitializingWitUbiquityToken:(id)cloudToken withUbiquityContainer:(NSURL *)ubiquityContainer {\n    NSLog(@\"Ubiquity container initialized. You may proceed to perform document operations.\");\n}\n\n- (void)iCloudAvailabilityDidChangeToState:(BOOL)cloudIsAvailable withUbiquityToken:(id)ubiquityToken withUbiquityContainer:(NSURL *)ubiquityContainer {\n    if (!cloudIsAvailable) {\n        UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@\"iCloud Unavailable\" message:@\"iCloud is no longer available. Make sure that you are signed into a valid iCloud account.\" delegate:nil cancelButtonTitle:@\"Okay\" otherButtonTitles:nil];\n        [alert show];\n    }\n}\n\n- (void)iCloudFilesDidChange:(NSMutableArray *)files withNewFileNames:(NSMutableArray *)fileNames {\n}\n\n- (NSString *)iCloudQueryLimitedToFileExtension {\n    return WALLET_JSON_CLOUD_BACKUP_FILE_EXTENSION;\n}\n\n- (void)iCloudFileConflictBetweenCloudFile:(NSDictionary *)cloudFile andLocalFile:(NSDictionary *)localFile {\n}\n\n- (void)iCloudFileUpdateDidBegin {\n}\n\n- (void)iCloudFileUpdateDidEnd {\n}\n\n- (void)refreshCloudList {\n    [[iCloud sharedCloud] updateFiles];\n}\n\n- (void)refreshCloudListAfterSetup {\n    [[iCloud sharedCloud] setDelegate:self];\n    [[iCloud sharedCloud] updateFiles];\n}\n\n@end\n"
  },
  {
    "path": "ArcBit/External/UIAlertController+Blocks/UIAlertConrtoller+Blocks.m",
    "content": "//\n//  UIAlertController+Blocks.m\n//  UIAlertControllerBlocks\n//\n//  Created by Ryan Maxwell on 11/09/14.\n//\n//  The MIT License (MIT)\n//\n//  Copyright (c) 2014 Ryan Maxwell\n//\n//  Permission is hereby granted, free of charge, to any person obtaining a copy of\n//  this software and associated documentation files (the \"Software\"), to deal in\n//  the Software without restriction, including without limitation the rights to\n//  use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\n//  the Software, and to permit persons to whom the Software is furnished to do so,\n//  subject to the following conditions:\n//\n//  The above copyright notice and this permission notice shall be included in all\n//  copies or substantial portions of the Software.\n//\n//  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n//  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\n//  FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\n//  COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\n//  IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\n//  CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n//\n\n#import \"UIAlertController+Blocks.h\"\n\nstatic NSInteger const UIAlertControllerBlocksCancelButtonIndex = 0;\nstatic NSInteger const UIAlertControllerBlocksDestructiveButtonIndex = 1;\nstatic NSInteger const UIAlertControllerBlocksFirstOtherButtonIndex = 2;\n\n@implementation UIAlertController (Blocks)\n\n+ (instancetype)showInViewController:(UIViewController *)viewController\n                           withTitle:(NSString *)title\n                             message:(NSString *)message\n                      preferredStyle:(UIAlertControllerStyle)preferredStyle\n                   cancelButtonTitle:(NSString *)cancelButtonTitle\n              destructiveButtonTitle:(NSString *)destructiveButtonTitle\n                   otherButtonTitles:(NSArray *)otherButtonTitles\n  popoverPresentationControllerBlock:(void(^)(UIPopoverPresentationController *popover))popoverPresentationControllerBlock\n                            tapBlock:(UIAlertControllerCompletionBlock)tapBlock\n                        preShowBlock:(UIAlertControllerPreshowBlock)preShowBlock\n{\n    UIAlertController *strongController = [self alertControllerWithTitle:title\n                                                                 message:message\n                                                          preferredStyle:preferredStyle];\n    \n    __weak UIAlertController *controller = strongController;\n    \n    if (cancelButtonTitle) {\n        UIAlertAction *cancelAction = [UIAlertAction actionWithTitle:cancelButtonTitle\n                                                               style:UIAlertActionStyleCancel\n                                                             handler:^(UIAlertAction *action){\n                                                                 if (tapBlock) {\n                                                                     tapBlock(controller, action, UIAlertControllerBlocksCancelButtonIndex);\n                                                                 }\n                                                             }];\n        [controller addAction:cancelAction];\n    }\n    \n    if (destructiveButtonTitle) {\n        UIAlertAction *destructiveAction = [UIAlertAction actionWithTitle:destructiveButtonTitle\n                                                                    style:UIAlertActionStyleDestructive\n                                                                  handler:^(UIAlertAction *action){\n                                                                      if (tapBlock) {\n                                                                          tapBlock(controller, action, UIAlertControllerBlocksDestructiveButtonIndex);\n                                                                      }\n                                                                  }];\n        [controller addAction:destructiveAction];\n    }\n    \n    for (NSUInteger i = 0; i < otherButtonTitles.count; i++) {\n        NSString *otherButtonTitle = otherButtonTitles[i];\n        \n        UIAlertAction *otherAction = [UIAlertAction actionWithTitle:otherButtonTitle\n                                                              style:UIAlertActionStyleDefault\n                                                            handler:^(UIAlertAction *action){\n                                                                if (tapBlock) {\n                                                                    tapBlock(controller, action, UIAlertControllerBlocksFirstOtherButtonIndex + i);\n                                                                }\n                                                            }];\n        [controller addAction:otherAction];\n    }\n    \n    if (popoverPresentationControllerBlock) {\n        popoverPresentationControllerBlock(controller.popoverPresentationController);\n    }\n    \n    if(preShowBlock)\n    {\n        preShowBlock(controller);\n    }\n    \n    [viewController presentViewController:controller animated:YES completion:nil];\n    \n    return controller;\n}\n\n+ (instancetype)showInViewController:(UIViewController *)viewController\n                           withTitle:(NSString *)title\n                             message:(NSString *)message\n                      preferredStyle:(UIAlertControllerStyle)preferredStyle\n                   cancelButtonTitle:(NSString *)cancelButtonTitle\n              destructiveButtonTitle:(NSString *)destructiveButtonTitle\n                   otherButtonTitles:(NSArray *)otherButtonTitles\n  popoverPresentationControllerBlock:(void(^)(UIPopoverPresentationController *popover))popoverPresentationControllerBlock\n                            tapBlock:(UIAlertControllerCompletionBlock)tapBlock\n{\n    UIAlertController *strongController = [self alertControllerWithTitle:title\n                                                                 message:message\n                                                          preferredStyle:preferredStyle];\n    \n    __weak UIAlertController *controller = strongController;\n    \n    if (cancelButtonTitle) {\n        UIAlertAction *cancelAction = [UIAlertAction actionWithTitle:cancelButtonTitle\n                                                               style:UIAlertActionStyleCancel\n                                                             handler:^(UIAlertAction *action){\n                                                                 if (tapBlock) {\n                                                                     tapBlock(controller, action, UIAlertControllerBlocksCancelButtonIndex);\n                                                                 }\n                                                             }];\n        [controller addAction:cancelAction];\n    }\n    \n    if (destructiveButtonTitle) {\n        UIAlertAction *destructiveAction = [UIAlertAction actionWithTitle:destructiveButtonTitle\n                                                                    style:UIAlertActionStyleDestructive\n                                                                  handler:^(UIAlertAction *action){\n                                                                      if (tapBlock) {\n                                                                          tapBlock(controller, action, UIAlertControllerBlocksDestructiveButtonIndex);\n                                                                      }\n                                                                  }];\n        [controller addAction:destructiveAction];\n    }\n    \n    for (NSUInteger i = 0; i < otherButtonTitles.count; i++) {\n        NSString *otherButtonTitle = otherButtonTitles[i];\n        \n        UIAlertAction *otherAction = [UIAlertAction actionWithTitle:otherButtonTitle\n                                                              style:UIAlertActionStyleDefault\n                                                            handler:^(UIAlertAction *action){\n                                                                if (tapBlock) {\n                                                                    tapBlock(controller, action, UIAlertControllerBlocksFirstOtherButtonIndex + i);\n                                                                }\n                                                            }];\n        [controller addAction:otherAction];\n    }\n    \n    if (popoverPresentationControllerBlock) {\n        popoverPresentationControllerBlock(controller.popoverPresentationController);\n    }\n    \n    [viewController presentViewController:controller animated:YES completion:nil];\n    \n    return controller;\n}\n\n\n+ (instancetype)showAlertInViewController:(UIViewController *)viewController\n                                withTitle:(NSString *)title\n                                  message:(NSString *)message\n                        cancelButtonTitle:(NSString *)cancelButtonTitle\n                   destructiveButtonTitle:(NSString *)destructiveButtonTitle\n                        otherButtonTitles:(NSArray *)otherButtonTitles\n                                 tapBlock:(UIAlertControllerCompletionBlock)tapBlock\n{\n    return [self showInViewController:viewController\n                            withTitle:title\n                              message:message\n                       preferredStyle:UIAlertControllerStyleAlert\n                    cancelButtonTitle:cancelButtonTitle\n               destructiveButtonTitle:destructiveButtonTitle\n                    otherButtonTitles:otherButtonTitles\n   popoverPresentationControllerBlock:nil\n                             tapBlock:tapBlock\n                         preShowBlock:nil];\n}\n\n+ (instancetype)showAlertInViewController:(UIViewController *)viewController\n                                withTitle:(NSString *)title\n                                  message:(NSString *)message\n                           preferredStyle:(UIAlertControllerStyle)preferredStyle\n                        cancelButtonTitle:(NSString *)cancelButtonTitle\n                   destructiveButtonTitle:(NSString *)destructiveButtonTitle\n                        otherButtonTitles:(NSArray *)otherButtonTitles\n                             preShowBlock:(UIAlertControllerPreshowBlock)preShowBlock\n                                 tapBlock:(UIAlertControllerCompletionBlock)tapBlock\n{\n    return [self showInViewController:viewController\n                            withTitle:title\n                              message:message\n                       preferredStyle:preferredStyle\n                    cancelButtonTitle:cancelButtonTitle\n               destructiveButtonTitle:destructiveButtonTitle\n                    otherButtonTitles:otherButtonTitles\n   popoverPresentationControllerBlock:nil\n                             tapBlock:tapBlock\n                         preShowBlock:preShowBlock\n\n            ];\n}\n\n+ (instancetype)showAlertInViewController:(UIViewController *)viewController\n                                withTitle:(NSString *)title\n                                  message:(NSString *)message\n                           preferredStyle:(UIAlertControllerStyle)preferredStyle\n                        cancelButtonTitle:(NSString *)cancelButtonTitle\n                   destructiveButtonTitle:(NSString *)destructiveButtonTitle\n                        otherButtonTitles:(NSArray *)otherButtonTitles\n                                 tapBlock:(UIAlertControllerCompletionBlock)tapBlock\n{\n    return [self showInViewController:viewController\n                            withTitle:title\n                              message:message\n                       preferredStyle:preferredStyle\n                    cancelButtonTitle:cancelButtonTitle\n               destructiveButtonTitle:destructiveButtonTitle\n                    otherButtonTitles:otherButtonTitles\n   popoverPresentationControllerBlock:nil\n                             tapBlock:tapBlock\n                         preShowBlock:nil\n            ];\n}\n\n+ (instancetype)showActionSheetInViewController:(UIViewController *)viewController\n                                      withTitle:(NSString *)title\n                                        message:(NSString *)message\n                              cancelButtonTitle:(NSString *)cancelButtonTitle\n                         destructiveButtonTitle:(NSString *)destructiveButtonTitle\n                              otherButtonTitles:(NSArray *)otherButtonTitles\n                                       tapBlock:(UIAlertControllerCompletionBlock)tapBlock\n{\n    return [self showActionSheetInViewController:viewController\n                                       withTitle:title\n                                         message:message\n                               cancelButtonTitle:cancelButtonTitle\n                          destructiveButtonTitle:destructiveButtonTitle\n                               otherButtonTitles:otherButtonTitles\n              popoverPresentationControllerBlock:nil\n                                        tapBlock:tapBlock];\n}\n\n+ (instancetype)showActionSheetInViewController:(UIViewController *)viewController\n                                      withTitle:(NSString *)title\n                                        message:(NSString *)message\n                              cancelButtonTitle:(NSString *)cancelButtonTitle\n                         destructiveButtonTitle:(NSString *)destructiveButtonTitle\n                              otherButtonTitles:(NSArray *)otherButtonTitles\n             popoverPresentationControllerBlock:(void(^)(UIPopoverPresentationController *popover))popoverPresentationControllerBlock\n                                       tapBlock:(UIAlertControllerCompletionBlock)tapBlock\n{\n    return [self showInViewController:viewController\n                            withTitle:title\n                              message:message\n                       preferredStyle:UIAlertControllerStyleActionSheet\n                    cancelButtonTitle:cancelButtonTitle\n               destructiveButtonTitle:destructiveButtonTitle\n                    otherButtonTitles:otherButtonTitles\n   popoverPresentationControllerBlock:popoverPresentationControllerBlock\n                             tapBlock:tapBlock\n                         preShowBlock:nil\n            ];\n}\n\n#pragma mark -\n\n- (BOOL)visible\n{\n    return self.view.superview != nil;\n}\n\n- (NSInteger)cancelButtonIndex\n{\n    return UIAlertControllerBlocksCancelButtonIndex;\n}\n\n- (NSInteger)firstOtherButtonIndex\n{\n    return UIAlertControllerBlocksFirstOtherButtonIndex;\n}\n\n- (NSInteger)destructiveButtonIndex\n{\n    return UIAlertControllerBlocksDestructiveButtonIndex;\n}\n\n@end\n"
  },
  {
    "path": "ArcBit/External/UIAlertController+Blocks/UIAlertController+Blocks.h",
    "content": "//\n//  UIAlertController+Blocks.h\n//  UIAlertControllerBlocks\n//\n//  Created by Ryan Maxwell on 11/09/14.\n//\n//  The MIT License (MIT)\n//\n//  Copyright (c) 2014 Ryan Maxwell\n//\n//  Permission is hereby granted, free of charge, to any person obtaining a copy of\n//  this software and associated documentation files (the \"Software\"), to deal in\n//  the Software without restriction, including without limitation the rights to\n//  use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\n//  the Software, and to permit persons to whom the Software is furnished to do so,\n//  subject to the following conditions:\n//\n//  The above copyright notice and this permission notice shall be included in all\n//  copies or substantial portions of the Software.\n//\n//  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n//  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\n//  FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\n//  COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\n//  IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\n//  CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n//\n\n#import <UIKit/UIKit.h>\n\ntypedef void (^UIAlertControllerCompletionBlock) (UIAlertController *controller, UIAlertAction *action, NSInteger buttonIndex);\ntypedef void (^UIAlertControllerPreshowBlock) (UIAlertController *controller);\n\n@interface UIAlertController (Blocks)\n\n+ (instancetype)showInViewController:(UIViewController *)viewController\n                           withTitle:(NSString *)title\n                             message:(NSString *)message\n                      preferredStyle:(UIAlertControllerStyle)preferredStyle\n                   cancelButtonTitle:(NSString *)cancelButtonTitle\n              destructiveButtonTitle:(NSString *)destructiveButtonTitle\n                   otherButtonTitles:(NSArray *)otherButtonTitles\n  popoverPresentationControllerBlock:(void(^)(UIPopoverPresentationController *popover))popoverPresentationControllerBlock\n                            tapBlock:(UIAlertControllerCompletionBlock)tapBlock\n                        preShowBlock:(UIAlertControllerPreshowBlock)preShowBlock;\n\n\n+ (instancetype)showAlertInViewController:(UIViewController *)viewController\n                                withTitle:(NSString *)title\n                                  message:(NSString *)message\n                        cancelButtonTitle:(NSString *)cancelButtonTitle\n                   destructiveButtonTitle:(NSString *)destructiveButtonTitle\n                        otherButtonTitles:(NSArray *)otherButtonTitles\n                                 tapBlock:(UIAlertControllerCompletionBlock)tapBlock;\n\n+ (instancetype)showActionSheetInViewController:(UIViewController *)viewController\n                                      withTitle:(NSString *)title\n                                        message:(NSString *)message\n                              cancelButtonTitle:(NSString *)cancelButtonTitle\n                         destructiveButtonTitle:(NSString *)destructiveButtonTitle\n                              otherButtonTitles:(NSArray *)otherButtonTitles\n             popoverPresentationControllerBlock:(void(^)(UIPopoverPresentationController *popover))popoverPresentationControllerBlock\n                                       tapBlock:(UIAlertControllerCompletionBlock)tapBlock;\n\n+ (instancetype)showAlertInViewController:(UIViewController *)viewController\n                                withTitle:(NSString *)title\n                                  message:(NSString *)message\n                           preferredStyle:(UIAlertControllerStyle)preferredStyle\n                        cancelButtonTitle:(NSString *)cancelButtonTitle\n                   destructiveButtonTitle:(NSString *)destructiveButtonTitle\n                        otherButtonTitles:(NSArray *)otherButtonTitles\n                                 tapBlock:(UIAlertControllerCompletionBlock)tapBlock;\n\n+ (instancetype)showAlertInViewController:(UIViewController *)viewController\n                                withTitle:(NSString *)title\n                                  message:(NSString *)message\n                           preferredStyle:(UIAlertControllerStyle)preferredStyle\n                        cancelButtonTitle:(NSString *)cancelButtonTitle\n                   destructiveButtonTitle:(NSString *)destructiveButtonTitle\n                        otherButtonTitles:(NSArray *)otherButtonTitles\n                             preShowBlock:(UIAlertControllerPreshowBlock)preShowBlock\n                                 tapBlock:(UIAlertControllerCompletionBlock)tapBlock;\n\n@property (readonly, nonatomic) BOOL visible;\n@property (readonly, nonatomic) NSInteger cancelButtonIndex;\n@property (readonly, nonatomic) NSInteger firstOtherButtonIndex;\n@property (readonly, nonatomic) NSInteger destructiveButtonIndex;\n\n@end\n"
  },
  {
    "path": "ArcBit/External/UINavigationBar-FixedHeightWhenStatusBarHidden-master/UINavigationBar+FixedHeightWhenStatusBarHidden.h",
    "content": "//\n//  UINavigationBar+FixedHeightWhenStatusBarHidden.h\n//\n//  Created by Vitaliy Ivanov on 7/30/14.\n//  Copyright (c) 2014 Factorial Complexity. All rights reserved.\n//\n//  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n//  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n//  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n//  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n//  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n//  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n//  THE SOFTWARE.\n\n#import <UIKit/UIKit.h>\n\n@interface UINavigationBar (FixedHeightWhenStatusBarHidden)\n\n/**\n * If set to YES, UINavigationBar height will not change after status bar was hidden.\n * Normally on iOS 7+ navigation bar height equals to 64 px, when status bar is shown.\n * After it is hidden, its height is changed to 44 px by default.\n */\n@property (readwrite, nonatomic) BOOL fixedHeightWhenStatusBarHidden;\n\n@end\n"
  },
  {
    "path": "ArcBit/External/UINavigationBar-FixedHeightWhenStatusBarHidden-master/UINavigationBar+FixedHeightWhenStatusBarHidden.m",
    "content": "//\n//  UINavigationBar+FixedHeightWhenStatusBarHidden.m\n//\n//  Created by Vitaliy Ivanov on 7/30/14.\n//  Copyright (c) 2014 Factorial Complexity. All rights reserved.\n//\n//  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n//  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n//  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n//  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n//  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n//  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n//  THE SOFTWARE.\n//\n\n#import \"UINavigationBar+FixedHeightWhenStatusBarHidden.h\"\n#import <objc/runtime.h>\n\n#define FYIsIOSVersionGreaterThanOrEqualTo(v) \\\n\t([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] != NSOrderedAscending)\n\nstatic char const* const FixedNavigationBarSize = \"FixedNavigationBarSize\";\n\n@implementation UINavigationBar (FixedHeightWhenStatusBarHidden)\n\n- (CGSize)sizeThatFits_FixedHeightWhenStatusBarHidden:(CGSize)size\n{\n\tif ([UIApplication sharedApplication].statusBarHidden &&\n\t\tFYIsIOSVersionGreaterThanOrEqualTo(@\"7.0\") &&\n\t\tself.fixedHeightWhenStatusBarHidden)\n\t{\n\t\tCGSize newSize = CGSizeMake(self.frame.size.width, 64);\n\t\treturn newSize;\n\t}\n\telse\n\t{\n\t\treturn [self sizeThatFits_FixedHeightWhenStatusBarHidden:size];\n\t}\n}\n\n- (BOOL)fixedHeightWhenStatusBarHidden\n{\n\treturn [objc_getAssociatedObject(self, FixedNavigationBarSize) boolValue];\n}\n\n- (void)setFixedHeightWhenStatusBarHidden:(BOOL)fixedHeightWhenStatusBarHidden\n{\n\tobjc_setAssociatedObject(self, FixedNavigationBarSize,\n\t\t[NSNumber numberWithBool:fixedHeightWhenStatusBarHidden], OBJC_ASSOCIATION_RETAIN);\n}\n\n+ (void)load\n{\n    method_exchangeImplementations(class_getInstanceMethod(self, @selector(sizeThatFits:)),\n\t\tclass_getInstanceMethod(self, @selector(sizeThatFits_FixedHeightWhenStatusBarHidden:)));\n}\n\n@end\n"
  },
  {
    "path": "ArcBit/External/iToast/iToast.h",
    "content": "/*\n\niToast.h\n\nMIT LICENSE\n\nCopyright (c) 2012 Guru Software\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n*/\n\n#import <Foundation/Foundation.h>\n#import <UIKit/UIKit.h>\n\ntypedef enum iToastGravity {\n\tiToastGravityTop = 1000001,\n\tiToastGravityBottom,\n\tiToastGravityCenter\n}iToastGravity;\n\nenum iToastDuration {\n\tiToastDurationLong = 10000,\n\tiToastDurationShort = 1000,\n\tiToastDurationNormal = 3000\n}iToastDuration;\n\ntypedef enum iToastType {\n\tiToastTypeInfo = -100000,\n\tiToastTypeNotice,\n\tiToastTypeWarning,\n\tiToastTypeError,\n\tiToastTypeNone // For internal use only (to force no image)\n}iToastType;\n\ntypedef enum {\n    iToastImageLocationTop,\n    iToastImageLocationLeft\n} iToastImageLocation;\n\n\n@class iToastSettings;\n\n@interface iToast : NSObject {\n\tiToastSettings *_settings;\n\t\n\tNSTimer *timer;\n\t\n\tUIView *view;\n\tNSString *text;\n}\n\n- (void) show;\n- (void) show:(iToastType) type;\n- (iToast *) setDuration:(NSInteger ) duration;\n- (iToast *) setGravity:(iToastGravity) gravity \n\t\t\t offsetLeft:(NSInteger) left\n\t\t\t offsetTop:(NSInteger) top;\n- (iToast *) setGravity:(iToastGravity) gravity;\n- (iToast *) setPostion:(CGPoint) position;\n- (iToast *) setFontSize:(CGFloat) fontSize;\n- (iToast *) setUseShadow:(BOOL) useShadow;\n- (iToast *) setCornerRadius:(CGFloat) cornerRadius;\n- (iToast *) setBgRed:(CGFloat) bgRed;\n- (iToast *) setBgGreen:(CGFloat) bgGreen;\n- (iToast *) setBgBlue:(CGFloat) bgBlue;\n- (iToast *) setBgAlpha:(CGFloat) bgAlpha;\n\n+ (iToast *) makeText:(NSString *) text;\n\n-(iToastSettings *) theSettings;\n\n@end\n\n\n\n@interface iToastSettings : NSObject<NSCopying>{\n\tNSInteger duration;\n\tiToastGravity gravity;\n\tCGPoint postition;\n\tiToastType toastType;\n\tCGFloat fontSize;\n\tBOOL useShadow;\n\tCGFloat cornerRadius;\n\tCGFloat bgRed;\n\tCGFloat bgGreen;\n\tCGFloat bgBlue;\n\tCGFloat bgAlpha;\n\tNSInteger offsetLeft;\n\tNSInteger offsetTop;\n\n\tNSDictionary *images;\n\t\n\tBOOL positionIsSet;\n}\n\n\n@property(assign) NSInteger duration;\n@property(assign) iToastGravity gravity;\n@property(assign) CGPoint postition;\n@property(assign) CGFloat fontSize;\n@property(assign) BOOL useShadow;\n@property(assign) CGFloat cornerRadius;\n@property(assign) CGFloat bgRed;\n@property(assign) CGFloat bgGreen;\n@property(assign) CGFloat bgBlue;\n@property(assign) CGFloat bgAlpha;\n@property(assign) NSInteger offsetLeft;\n@property(assign) NSInteger offsetTop;\n@property(readonly) NSDictionary *images;\n@property(assign) iToastImageLocation imageLocation;\n\n\n- (void) setImage:(UIImage *)img forType:(iToastType) type;\n- (void) setImage:(UIImage *)img withLocation:(iToastImageLocation)location forType:(iToastType)type;\n+ (iToastSettings *) getSharedSettings;\n\t\t\t\t\t\t  \n@end"
  },
  {
    "path": "ArcBit/External/iToast/iToast.m",
    "content": "/*\n\niToast.m\n\nMIT LICENSE\n\nCopyright (c) 2011 Guru Software\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n\n*/\n\n\n#import \"iToast.h\"\n#import <QuartzCore/QuartzCore.h>\n\n#define CURRENT_TOAST_TAG 6984678\n\nstatic const CGFloat kComponentPadding = 5;\n\nstatic iToastSettings *sharedSettings = nil;\n\n@interface iToast(private)\n\n- (iToast *) settings;\n- (CGRect)_toastFrameForImageSize:(CGSize)imageSize withLocation:(iToastImageLocation)location andTextSize:(CGSize)textSize;\n- (CGRect)_frameForImage:(iToastType)type inToastFrame:(CGRect)toastFrame;\n\n@end\n\n\n@implementation iToast\n\n\n- (id) initWithText:(NSString *) tex{\n\tif (self = [super init]) {\n\t\ttext = [tex copy];\n\t}\n\t\n\treturn self;\n}\n\n- (void) show{\n\t[self show:iToastTypeNone];\n}\n\n- (void) show:(iToastType) type {\n\t\n\tiToastSettings *theSettings = _settings;\n\t\n\tif (!theSettings) {\n\t\ttheSettings = [iToastSettings getSharedSettings];\n\t}\n\t\n\tUIImage *image = [theSettings.images valueForKey:[NSString stringWithFormat:@\"%i\", type]];\n\t\n\tUIFont *font = [UIFont systemFontOfSize:theSettings.fontSize];\n\tCGSize textSize = [text sizeWithFont:font constrainedToSize:CGSizeMake(280, 60)];\n\t\n\tUILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, textSize.width + kComponentPadding, textSize.height + kComponentPadding)];\n\tlabel.backgroundColor = [UIColor clearColor];\n\tlabel.textColor = [UIColor whiteColor];\n\tlabel.font = font;\n\tlabel.text = text;\n\tlabel.numberOfLines = 0;\n\tif (theSettings.useShadow) {\n\t\tlabel.shadowColor = [UIColor darkGrayColor];\n\t\tlabel.shadowOffset = CGSizeMake(1, 1);\n\t}\n\t\n\tUIButton *v = [UIButton buttonWithType:UIButtonTypeCustom];\n\tif (image) {\n\t\tv.frame = [self _toastFrameForImageSize:image.size withLocation:[theSettings imageLocation] andTextSize:textSize];\n        \n        switch ([theSettings imageLocation]) {\n            case iToastImageLocationLeft:\n                [label setTextAlignment:UITextAlignmentLeft];\n                label.center = CGPointMake(image.size.width + kComponentPadding * 2 \n                                           + (v.frame.size.width - image.size.width - kComponentPadding * 2) / 2, \n                                           v.frame.size.height / 2);\n                break;\n            case iToastImageLocationTop:\n                [label setTextAlignment:UITextAlignmentCenter];\n                label.center = CGPointMake(v.frame.size.width / 2, \n                                           (image.size.height + kComponentPadding * 2 \n                                            + (v.frame.size.height - image.size.height - kComponentPadding * 2) / 2));\n                break;\n            default:\n                break;\n        }\n\t\t\n\t} else {\n\t\tv.frame = CGRectMake(0, 0, textSize.width + kComponentPadding * 2, textSize.height + kComponentPadding * 2);\n\t\tlabel.center = CGPointMake(v.frame.size.width / 2, v.frame.size.height / 2);\n\t}\n\tCGRect lbfrm = label.frame;\n\tlbfrm.origin.x = ceil(lbfrm.origin.x);\n\tlbfrm.origin.y = ceil(lbfrm.origin.y);\n\tlabel.frame = lbfrm;\n\t[v addSubview:label];\n\t[label release];\n\t\n\tif (image) {\n\t\tUIImageView *imageView = [[UIImageView alloc] initWithImage:image];\n\t\timageView.frame = [self _frameForImage:type inToastFrame:v.frame];\n\t\t[v addSubview:imageView];\n\t\t[imageView release];\n\t}\n\t\n\tv.backgroundColor = [UIColor colorWithRed:theSettings.bgRed green:theSettings.bgGreen blue:theSettings.bgBlue alpha:theSettings.bgAlpha];\n\tv.layer.cornerRadius = theSettings.cornerRadius;\n\t\n\tUIWindow *window = [[[UIApplication sharedApplication] windows] objectAtIndex:0];\n\t\n\tCGPoint point;\n\t\n\t// Set correct orientation/location regarding device orientation\n\tUIInterfaceOrientation orientation = (UIInterfaceOrientation)[[UIApplication sharedApplication] statusBarOrientation];\n\tswitch (orientation) {\n\t\tcase UIDeviceOrientationPortrait:\n\t\t{\n\t\t\tif (theSettings.gravity == iToastGravityTop) {\n\t\t\t\tpoint = CGPointMake(window.frame.size.width / 2, 45);\n\t\t\t} else if (theSettings.gravity == iToastGravityBottom) {\n\t\t\t\tpoint = CGPointMake(window.frame.size.width / 2, window.frame.size.height - 45);\n\t\t\t} else if (theSettings.gravity == iToastGravityCenter) {\n\t\t\t\tpoint = CGPointMake(window.frame.size.width/2, window.frame.size.height/2);\n\t\t\t} else {\n\t\t\t\tpoint = theSettings.postition;\n\t\t\t}\n\t\t\t\n\t\t\tpoint = CGPointMake(point.x + theSettings.offsetLeft, point.y + theSettings.offsetTop);\n\t\t\tbreak;\n\t\t}\n\t\tcase UIDeviceOrientationPortraitUpsideDown:\n\t\t{\n\t\t\tv.transform = CGAffineTransformMakeRotation(M_PI);\n\t\t\t\n\t\t\tfloat width = window.frame.size.width;\n\t\t\tfloat height = window.frame.size.height;\n\t\t\t\n\t\t\tif (theSettings.gravity == iToastGravityTop) {\n\t\t\t\tpoint = CGPointMake(width / 2, height - 45);\n\t\t\t} else if (theSettings.gravity == iToastGravityBottom) {\n\t\t\t\tpoint = CGPointMake(width / 2, 45);\n\t\t\t} else if (theSettings.gravity == iToastGravityCenter) {\n\t\t\t\tpoint = CGPointMake(width/2, height/2);\n\t\t\t} else {\n\t\t\t\t// TODO : handle this case\n\t\t\t\tpoint = theSettings.postition;\n\t\t\t}\n\t\t\t\n\t\t\tpoint = CGPointMake(point.x - theSettings.offsetLeft, point.y - theSettings.offsetTop);\n\t\t\tbreak;\n\t\t}\n\t\tcase UIDeviceOrientationLandscapeLeft:\n\t\t{\n\t\t\tv.transform = CGAffineTransformMakeRotation(M_PI/2); //rotation in radians\n\t\t\t\n\t\t\tif (theSettings.gravity == iToastGravityTop) {\n\t\t\t\tpoint = CGPointMake(window.frame.size.width - 45, window.frame.size.height / 2);\n\t\t\t} else if (theSettings.gravity == iToastGravityBottom) {\n\t\t\t\tpoint = CGPointMake(45,window.frame.size.height / 2);\n\t\t\t} else if (theSettings.gravity == iToastGravityCenter) {\n\t\t\t\tpoint = CGPointMake(window.frame.size.width/2, window.frame.size.height/2);\n\t\t\t} else {\n\t\t\t\t// TODO : handle this case\n\t\t\t\tpoint = theSettings.postition;\n\t\t\t}\n\t\t\t\n\t\t\tpoint = CGPointMake(point.x - theSettings.offsetTop, point.y - theSettings.offsetLeft);\n\t\t\tbreak;\n\t\t}\n\t\tcase UIDeviceOrientationLandscapeRight:\n\t\t{\n\t\t\tv.transform = CGAffineTransformMakeRotation(-M_PI/2);\n\t\t\t\n\t\t\tif (theSettings.gravity == iToastGravityTop) {\n\t\t\t\tpoint = CGPointMake(45, window.frame.size.height / 2);\n\t\t\t} else if (theSettings.gravity == iToastGravityBottom) {\n\t\t\t\tpoint = CGPointMake(window.frame.size.width - 45, window.frame.size.height/2);\n\t\t\t} else if (theSettings.gravity == iToastGravityCenter) {\n\t\t\t\tpoint = CGPointMake(window.frame.size.width/2, window.frame.size.height/2);\n\t\t\t} else {\n\t\t\t\t// TODO : handle this case\n\t\t\t\tpoint = theSettings.postition;\n\t\t\t}\n\t\t\t\n\t\t\tpoint = CGPointMake(point.x + theSettings.offsetTop, point.y + theSettings.offsetLeft);\n\t\t\tbreak;\n\t\t}\n\t\tdefault:\n\t\t\tbreak;\n\t}\n\n\tv.center = point;\n\tv.frame = CGRectIntegral(v.frame);\n\t\n\tNSTimer *timer1 = [NSTimer timerWithTimeInterval:((float)theSettings.duration)/1000 \n\t\t\t\t\t\t\t\t\t\t\t target:self selector:@selector(hideToast:) \n\t\t\t\t\t\t\t\t\t\t   userInfo:nil repeats:NO];\n\t[[NSRunLoop mainRunLoop] addTimer:timer1 forMode:NSDefaultRunLoopMode];\n\t\n\tv.tag = CURRENT_TOAST_TAG;\n\n\tUIView *currentToast = [window viewWithTag:CURRENT_TOAST_TAG];\n\tif (currentToast != nil) {\n    \t[currentToast removeFromSuperview];\n\t}\n\n\tv.alpha = 0;\n\t[window addSubview:v];\n\t[UIView beginAnimations:nil context:nil];\n\tv.alpha = 1;\n\t[UIView commitAnimations];\n\t\n\tview = [v retain];\n\t\n\t[v addTarget:self action:@selector(hideToast:) forControlEvents:UIControlEventTouchDown];\n}\n\n- (CGRect)_toastFrameForImageSize:(CGSize)imageSize withLocation:(iToastImageLocation)location andTextSize:(CGSize)textSize {\n    CGRect theRect = CGRectZero;\n    switch (location) {\n        case iToastImageLocationLeft:\n            theRect = CGRectMake(0, 0, \n                                 imageSize.width + textSize.width + kComponentPadding * 3, \n                                 MAX(textSize.height, imageSize.height) + kComponentPadding * 2);\n            break;\n        case iToastImageLocationTop:\n            theRect = CGRectMake(0, 0, \n                                 MAX(textSize.width, imageSize.width) + kComponentPadding * 2, \n                                 imageSize.height + textSize.height + kComponentPadding * 3);\n            \n        default:\n            break;\n    }    \n    return theRect;\n}\n\n- (CGRect)_frameForImage:(iToastType)type inToastFrame:(CGRect)toastFrame {\n    iToastSettings *theSettings = _settings;\n    UIImage *image = [theSettings.images valueForKey:[NSString stringWithFormat:@\"%i\", type]];\n    \n    if (!image) return CGRectZero;\n    \n    CGRect imageFrame = CGRectZero;\n\n    switch ([theSettings imageLocation]) {\n        case iToastImageLocationLeft:\n            imageFrame = CGRectMake(kComponentPadding, (toastFrame.size.height - image.size.height) / 2, image.size.width, image.size.height);\n            break;\n        case iToastImageLocationTop:\n            imageFrame = CGRectMake((toastFrame.size.width - image.size.width) / 2, kComponentPadding, image.size.width, image.size.height);\n            break;\n            \n        default:\n            break;\n    }\n    \n    return imageFrame;\n    \n}\n\n- (void) hideToast:(NSTimer*)theTimer{\n\t[UIView beginAnimations:nil context:NULL];\n\tview.alpha = 0;\n\t[UIView commitAnimations];\n\t\n\tNSTimer *timer2 = [NSTimer timerWithTimeInterval:500 \n\t\t\t\t\t\t\t\t\t\t\t target:self selector:@selector(hideToast:) \n\t\t\t\t\t\t\t\t\t\t   userInfo:nil repeats:NO];\n\t[[NSRunLoop mainRunLoop] addTimer:timer2 forMode:NSDefaultRunLoopMode];\n}\n\n- (void) removeToast:(NSTimer*)theTimer{\n\t[view removeFromSuperview];\n}\n\n\n+ (iToast *) makeText:(NSString *) _text{\n\tiToast *toast = [[[iToast alloc] initWithText:_text] autorelease];\n\t\n\treturn toast;\n}\n\n\n- (iToast *) setDuration:(NSInteger ) duration{\n\t[self theSettings].duration = duration;\n\treturn self;\n}\n\n- (iToast *) setGravity:(iToastGravity) gravity \n\t\t\t offsetLeft:(NSInteger) left\n\t\t\t  offsetTop:(NSInteger) top{\n\t[self theSettings].gravity = gravity;\n\t[self theSettings].offsetLeft = left;\n\t[self theSettings].offsetTop = top;\n\treturn self;\n}\n\n- (iToast *) setGravity:(iToastGravity) gravity{\n\t[self theSettings].gravity = gravity;\n\treturn self;\n}\n\n- (iToast *) setPostion:(CGPoint) _position{\n\t[self theSettings].postition = CGPointMake(_position.x, _position.y);\n\t\n\treturn self;\n}\n\n- (iToast *) setFontSize:(CGFloat) fontSize{\n\t[self theSettings].fontSize = fontSize;\n\treturn self;\n}\n\n- (iToast *) setUseShadow:(BOOL) useShadow{\n\t[self theSettings].useShadow = useShadow;\n\treturn self;\n}\n\n- (iToast *) setCornerRadius:(CGFloat) cornerRadius{\n\t[self theSettings].cornerRadius = cornerRadius;\n\treturn self;\n}\n\n- (iToast *) setBgRed:(CGFloat) bgRed{\n\t[self theSettings].bgRed = bgRed;\n\treturn self;\n}\n\n- (iToast *) setBgGreen:(CGFloat) bgGreen{\n\t[self theSettings].bgGreen = bgGreen;\n\treturn self;\n}\n\n- (iToast *) setBgBlue:(CGFloat) bgBlue{\n\t[self theSettings].bgBlue = bgBlue;\n\treturn self;\n}\n\n- (iToast *) setBgAlpha:(CGFloat) bgAlpha{\n\t[self theSettings].bgAlpha = bgAlpha;\n\treturn self;\n}\n\n\n-(iToastSettings *) theSettings{\n\tif (!_settings) {\n\t\t_settings = [[iToastSettings getSharedSettings] copy];\n\t}\n\t\n\treturn _settings;\n}\n\n@end\n\n\n@implementation iToastSettings\n@synthesize offsetLeft;\n@synthesize offsetTop;\n@synthesize duration;\n@synthesize gravity;\n@synthesize postition;\n@synthesize fontSize;\n@synthesize useShadow;\n@synthesize cornerRadius;\n@synthesize bgRed;\n@synthesize bgGreen;\n@synthesize bgBlue;\n@synthesize bgAlpha;\n@synthesize images;\n@synthesize imageLocation;\n\n- (void) setImage:(UIImage *) img withLocation:(iToastImageLocation)location forType:(iToastType) type {\n\tif (type == iToastTypeNone) {\n\t\t// This should not be used, internal use only (to force no image)\n\t\treturn;\n\t}\n\t\n\tif (!images) {\n\t\timages = [[NSMutableDictionary alloc] initWithCapacity:4];\n\t}\n\t\n\tif (img) {\n\t\tNSString *key = [NSString stringWithFormat:@\"%i\", type];\n\t\t[images setValue:img forKey:key];\n\t}\n    \n    [self setImageLocation:location];\n}\n\n- (void)setImage:(UIImage *)img forType:(iToastType)type {\n    [self setImage:img withLocation:iToastImageLocationLeft forType:type];\n}\n\n\n+ (iToastSettings *) getSharedSettings{\n\tif (!sharedSettings) {\n\t\tsharedSettings = [iToastSettings new];\n\t\tsharedSettings.gravity = iToastGravityCenter;\n\t\tsharedSettings.duration = iToastDurationShort;\n\t\tsharedSettings.fontSize = 16.0;\n\t\tsharedSettings.useShadow = YES;\n\t\tsharedSettings.cornerRadius = 5.0;\n\t\tsharedSettings.bgRed = 0;\n\t\tsharedSettings.bgGreen = 0;\n\t\tsharedSettings.bgBlue = 0;\n\t\tsharedSettings.bgAlpha = 0.7;\n\t\tsharedSettings.offsetLeft = 0;\n\t\tsharedSettings.offsetTop = 0;\n\t}\n\t\n\treturn sharedSettings;\n\t\n}\n\n- (id) copyWithZone:(NSZone *)zone{\n\tiToastSettings *copy = [iToastSettings new];\n\tcopy.gravity = self.gravity;\n\tcopy.duration = self.duration;\n\tcopy.postition = self.postition;\n\tcopy.fontSize = self.fontSize;\n\tcopy.useShadow = self.useShadow;\n\tcopy.cornerRadius = self.cornerRadius;\n\tcopy.bgRed = self.bgRed;\n\tcopy.bgGreen = self.bgGreen;\n\tcopy.bgBlue = self.bgBlue;\n\tcopy.bgAlpha = self.bgAlpha;\n\tcopy.offsetLeft = self.offsetLeft;\n\tcopy.offsetTop = self.offsetTop;\n\t\n\tNSArray *keys = [self.images allKeys];\n\t\n\tfor (NSString *key in keys){\n\t\t[copy setImage:[images valueForKey:key] forType:[key intValue]];\n\t}\n    \n    [copy setImageLocation:imageLocation];\n\t\n\treturn copy;\n}\n\n@end\n"
  },
  {
    "path": "ArcBit/External/socket.io-client-swift-10.0.0/Source/SSLSecurity.swift",
    "content": "//////////////////////////////////////////////////////////////////////////////////////////////////\n//\n//  SSLSecurity.swift\n//  Starscream\n//\n//  Created by Dalton Cherry on 5/16/15.\n//  Copyright (c) 2014-2016 Dalton Cherry.\n//\n//  Licensed under the Apache License, Version 2.0 (the \"License\");\n//  you may not use this file except in compliance with the License.\n//  You may obtain a copy of the License at\n//\n//  http://www.apache.org/licenses/LICENSE-2.0\n//\n//  Unless required by applicable law or agreed to in writing, software\n//  distributed under the License is distributed on an \"AS IS\" BASIS,\n//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n//  See the License for the specific language governing permissions and\n//  limitations under the License.\n//\n//////////////////////////////////////////////////////////////////////////////////////////////////\nimport Foundation\nimport Security\n\npublic protocol SSLTrustValidator {\n    func isValid(_ trust: SecTrust, domain: String?) -> Bool\n}\n\nopen class SSLCert : NSObject {\n    var certData: Data?\n    var key: SecKey?\n    \n    /**\n     Designated init for certificates\n     \n     - parameter data: is the binary data of the certificate\n     \n     - returns: a representation security object to be used with\n     */\n    public init(data: Data) {\n        self.certData = data\n    }\n    \n    /**\n     Designated init for public keys\n     \n     - parameter key: is the public key to be used\n     \n     - returns: a representation security object to be used with\n     */\n    public init(key: SecKey) {\n        self.key = key\n    }\n}\n\nopen class SSLSecurity : SSLTrustValidator {\n    public var validatedDN = true //should the domain name be validated?\n    \n    var isReady = false //is the key processing done?\n    var certificates: [Data]? //the certificates\n    @nonobjc var pubKeys: [SecKey]? //the public keys\n    var usePublicKeys = false //use public keys or certificate validation?\n    \n    /**\n     Use certs from main app bundle\n     \n     - parameter usePublicKeys: is to specific if the publicKeys or certificates should be used for SSL pinning validation\n     \n     - returns: a representation security object to be used with\n     */\n    public convenience init(usePublicKeys: Bool = false) {\n        let paths = Bundle.main.paths(forResourcesOfType: \"cer\", inDirectory: \".\")\n        \n        let certs = paths.reduce([SSLCert]()) { (certs: [SSLCert], path: String) -> [SSLCert] in\n            var certs = certs\n            if let data = NSData(contentsOfFile: path) {\n                certs.append(SSLCert(data: data as Data))\n            }\n            return certs\n        }\n        \n        self.init(certs: certs, usePublicKeys: usePublicKeys)\n    }\n    \n    /**\n     Designated init\n     \n     - parameter certs: is the certificates or public keys to use\n     - parameter usePublicKeys: is to specific if the publicKeys or certificates should be used for SSL pinning validation\n     \n     - returns: a representation security object to be used with\n     */\n    public init(certs: [SSLCert], usePublicKeys: Bool) {\n        self.usePublicKeys = usePublicKeys\n        \n        if self.usePublicKeys {\n            DispatchQueue.global(qos: .default).async {\n                let pubKeys = certs.reduce([SecKey]()) { (pubKeys: [SecKey], cert: SSLCert) -> [SecKey] in\n                    var pubKeys = pubKeys\n                    if let data = cert.certData, cert.key == nil {\n                        cert.key = self.extractPublicKey(data)\n                    }\n                    if let key = cert.key {\n                        pubKeys.append(key)\n                    }\n                    return pubKeys\n                }\n                \n                self.pubKeys = pubKeys\n                self.isReady = true\n            }\n        } else {\n            let certificates = certs.reduce([Data]()) { (certificates: [Data], cert: SSLCert) -> [Data] in\n                var certificates = certificates\n                if let data = cert.certData {\n                    certificates.append(data)\n                }\n                return certificates\n            }\n            self.certificates = certificates\n            self.isReady = true\n        }\n    }\n    \n    /**\n     Valid the trust and domain name.\n     \n     - parameter trust: is the serverTrust to validate\n     - parameter domain: is the CN domain to validate\n     \n     - returns: if the key was successfully validated\n     */\n    public func isValid(_ trust: SecTrust, domain: String?) -> Bool {\n        \n        var tries = 0\n        while !self.isReady {\n            usleep(1000)\n            tries += 1\n            if tries > 5 {\n                return false //doesn't appear it is going to ever be ready...\n            }\n        }\n        var policy: SecPolicy\n        if self.validatedDN {\n            policy = SecPolicyCreateSSL(true, domain as NSString?)\n        } else {\n            policy = SecPolicyCreateBasicX509()\n        }\n        SecTrustSetPolicies(trust,policy)\n        if self.usePublicKeys {\n            if let keys = self.pubKeys {\n                let serverPubKeys = publicKeyChain(trust)\n                for serverKey in serverPubKeys as [AnyObject] {\n                    for key in keys as [AnyObject] {\n                        if serverKey.isEqual(key) {\n                            return true\n                        }\n                    }\n                }\n            }\n        } else if let certs = self.certificates {\n            let serverCerts = certificateChain(trust)\n            var collect = [SecCertificate]()\n            for cert in certs {\n                collect.append(SecCertificateCreateWithData(nil,cert as CFData)!)\n            }\n            SecTrustSetAnchorCertificates(trust,collect as NSArray)\n            var result: SecTrustResultType = .unspecified\n            SecTrustEvaluate(trust,&result)\n            if result == .unspecified || result == .proceed {\n                var trustedCount = 0\n                for serverCert in serverCerts {\n                    for cert in certs {\n                        if cert == serverCert {\n                            trustedCount += 1\n                            break\n                        }\n                    }\n                }\n                if trustedCount == serverCerts.count {\n                    return true\n                }\n            }\n        }\n        return false\n    }\n    \n    /**\n     Get the public key from a certificate data\n     \n     - parameter data: is the certificate to pull the public key from\n     \n     - returns: a public key\n     */\n    func extractPublicKey(_ data: Data) -> SecKey? {\n        guard let cert = SecCertificateCreateWithData(nil, data as CFData) else { return nil }\n        \n        return extractPublicKey(cert, policy: SecPolicyCreateBasicX509())\n    }\n    \n    /**\n     Get the public key from a certificate\n     \n     - parameter data: is the certificate to pull the public key from\n     \n     - returns: a public key\n     */\n    func extractPublicKey(_ cert: SecCertificate, policy: SecPolicy) -> SecKey? {\n        var possibleTrust: SecTrust?\n        SecTrustCreateWithCertificates(cert, policy, &possibleTrust)\n        \n        guard let trust = possibleTrust else { return nil }\n        var result: SecTrustResultType = .unspecified\n        SecTrustEvaluate(trust, &result)\n        return SecTrustCopyPublicKey(trust)\n    }\n    \n    /**\n     Get the certificate chain for the trust\n     \n     - parameter trust: is the trust to lookup the certificate chain for\n     \n     - returns: the certificate chain for the trust\n     */\n    func certificateChain(_ trust: SecTrust) -> [Data] {\n        let certificates = (0..<SecTrustGetCertificateCount(trust)).reduce([Data]()) { (certificates: [Data], index: Int) -> [Data] in\n            var certificates = certificates\n            let cert = SecTrustGetCertificateAtIndex(trust, index)\n            certificates.append(SecCertificateCopyData(cert!) as Data)\n            return certificates\n        }\n        \n        return certificates\n    }\n    \n    /**\n     Get the public key chain for the trust\n     \n     - parameter trust: is the trust to lookup the certificate chain and extract the public keys\n     \n     - returns: the public keys from the certifcate chain for the trust\n     */\n    @nonobjc func publicKeyChain(_ trust: SecTrust) -> [SecKey] {\n        let policy = SecPolicyCreateBasicX509()\n        let keys = (0..<SecTrustGetCertificateCount(trust)).reduce([SecKey]()) { (keys: [SecKey], index: Int) -> [SecKey] in\n            var keys = keys\n            let cert = SecTrustGetCertificateAtIndex(trust, index)\n            if let key = extractPublicKey(cert!, policy: policy) {\n                keys.append(key)\n            }\n            \n            return keys\n        }\n        \n        return keys\n    }\n    \n    \n}\n"
  },
  {
    "path": "ArcBit/External/socket.io-client-swift-10.0.0/Source/SocketAckEmitter.swift",
    "content": "//\n//  SocketAckEmitter.swift\n//  Socket.IO-Client-Swift\n//\n//  Created by Erik Little on 9/16/15.\n//\n//  Permission is hereby granted, free of charge, to any person obtaining a copy\n//  of this software and associated documentation files (the \"Software\"), to deal\n//  in the Software without restriction, including without limitation the rights\n//  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n//  copies of the Software, and to permit persons to whom the Software is\n//  furnished to do so, subject to the following conditions:\n//\n//  The above copyright notice and this permission notice shall be included in\n//  all copies or substantial portions of the Software.\n//\n//  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n//  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n//  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n//  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n//  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n//  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n//  THE SOFTWARE.\n\nimport Dispatch\nimport Foundation\n\n/// A class that represents a waiting ack call.\n///\n/// **NOTE**: You should not store this beyond the life of the event handler.\npublic final class SocketAckEmitter : NSObject {\n    let socket: SocketIOClient\n    let ackNum: Int\n\n    // MARK: Properties\n\n    /// If true, this handler is expecting to be acked. Call `with(_: SocketData...)` to ack.\n    public var expected: Bool {\n        return ackNum != -1\n    }\n\n    init(socket: SocketIOClient, ackNum: Int) {\n        self.socket = socket\n        self.ackNum = ackNum\n    }\n\n    // MARK: Methods\n\n    /// Call to ack receiving this event.\n    ///\n    /// If an error occurs trying to transform `items` into their socket representation, a `SocketClientEvent.error`\n    /// will be emitted. The structure of the error data is `[ackNum, items, theError]`\n    ///\n    /// - parameter items: A variable number of items to send when acking.\n    public func with(_ items: SocketData...) {\n        guard ackNum != -1 else { return }\n\n        do {\n            socket.emitAck(ackNum, with: try items.map({ try $0.socketRepresentation() }))\n        } catch let err {\n            socket.handleClientEvent(.error, data: [ackNum, items, err])\n        }\n    }\n\n    /// Call to ack receiving this event.\n    ///\n    /// - parameter items: An array of items to send when acking. Use `[]` to send nothing.\n    public func with(_ items: [Any]) {\n        guard ackNum != -1 else { return }\n\n        socket.emitAck(ackNum, with: items)\n    }\n\n}\n\n/// A class that represents an emit that will request an ack that has not yet been sent.\n/// Call `timingOut(after:callback:)` to complete the emit\n/// Example:\n///\n/// ```swift\n/// socket.emitWithAck(\"myEvent\").timingOut(after: 1) {data in\n///     ...\n/// }\n/// ```\npublic final class OnAckCallback : NSObject {\n    private let ackNumber: Int\n    private let items: [Any]\n    private weak var socket: SocketIOClient?\n\n    init(ackNumber: Int, items: [Any], socket: SocketIOClient) {\n        self.ackNumber = ackNumber\n        self.items = items\n        self.socket = socket\n    }\n\n    deinit {\n        DefaultSocketLogger.Logger.log(\"OnAckCallback for \\(ackNumber) being released\", type: \"OnAckCallback\")\n    }\n\n    // MARK: Methods\n\n    /// Completes an emitWithAck. If this isn't called, the emit never happens.\n    ///\n    /// - parameter after: The number of seconds before this emit times out if an ack hasn't been received.\n    /// - parameter callback: The callback called when an ack is received, or when a timeout happens.\n    ///                       To check for timeout, use `SocketAckStatus`'s `noAck` case.\n    public func timingOut(after seconds: Int, callback: @escaping AckCallback) {\n        guard let socket = self.socket, ackNumber != -1 else { return }\n\n        socket.ackHandlers.addAck(ackNumber, callback: callback)\n        socket._emit(items, ack: ackNumber)\n\n        guard seconds != 0 else { return }\n\n        socket.handleQueue.asyncAfter(deadline: DispatchTime.now() + Double(seconds)) {\n            socket.ackHandlers.timeoutAck(self.ackNumber, onQueue: socket.handleQueue)\n        }\n    }\n\n}\n"
  },
  {
    "path": "ArcBit/External/socket.io-client-swift-10.0.0/Source/SocketAckManager.swift",
    "content": "//\n//  SocketAckManager.swift\n//  Socket.IO-Client-Swift\n//\n//  Created by Erik Little on 4/3/15.\n//\n//  Permission is hereby granted, free of charge, to any person obtaining a copy\n//  of this software and associated documentation files (the \"Software\"), to deal\n//  in the Software without restriction, including without limitation the rights\n//  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n//  copies of the Software, and to permit persons to whom the Software is\n//  furnished to do so, subject to the following conditions:\n//\n//  The above copyright notice and this permission notice shall be included in\n//  all copies or substantial portions of the Software.\n//\n//  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n//  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n//  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n//  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n//  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n//  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n//  THE SOFTWARE.\n\nimport Dispatch\nimport Foundation\n\n/// The status of an ack.\npublic enum SocketAckStatus : String {\n    /// The ack timed out.\n    case noAck = \"NO ACK\"\n}\n\nprivate struct SocketAck : Hashable {\n    let ack: Int\n    var callback: AckCallback!\n    var hashValue: Int {\n        return ack.hashValue\n    }\n\n    init(ack: Int) {\n        self.ack = ack\n    }\n\n    init(ack: Int, callback: @escaping AckCallback) {\n        self.ack = ack\n        self.callback = callback\n    }\n\n    fileprivate static func <(lhs: SocketAck, rhs: SocketAck) -> Bool {\n        return lhs.ack < rhs.ack\n    }\n\n    fileprivate static func ==(lhs: SocketAck, rhs: SocketAck) -> Bool {\n        return lhs.ack == rhs.ack\n    }\n}\n\nstruct SocketAckManager {\n    private var acks = Set<SocketAck>(minimumCapacity: 1)\n    private let ackSemaphore = DispatchSemaphore(value: 1)\n\n    mutating func addAck(_ ack: Int, callback: @escaping AckCallback) {\n        acks.insert(SocketAck(ack: ack, callback: callback))\n    }\n\n    /// Should be called on handle queue\n    mutating func executeAck(_ ack: Int, with items: [Any], onQueue: DispatchQueue) {\n        ackSemaphore.wait()\n        defer { ackSemaphore.signal() }\n        let ack = acks.remove(SocketAck(ack: ack))\n\n        onQueue.async() { ack?.callback(items) }\n    }\n\n    /// Should be called on handle queue\n    mutating func timeoutAck(_ ack: Int, onQueue: DispatchQueue) {\n        ackSemaphore.wait()\n        defer { ackSemaphore.signal() }\n        let ack = acks.remove(SocketAck(ack: ack))\n\n        onQueue.async() {\n            ack?.callback?([SocketAckStatus.noAck.rawValue])\n        }\n    }\n}\n"
  },
  {
    "path": "ArcBit/External/socket.io-client-swift-10.0.0/Source/SocketAnyEvent.swift",
    "content": "//\n//  SocketAnyEvent.swift\n//  Socket.IO-Client-Swift\n//\n//  Created by Erik Little on 3/28/15.\n//\n//  Permission is hereby granted, free of charge, to any person obtaining a copy\n//  of this software and associated documentation files (the \"Software\"), to deal\n//  in the Software without restriction, including without limitation the rights\n//  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n//  copies of the Software, and to permit persons to whom the Software is\n//  furnished to do so, subject to the following conditions:\n//\n//  The above copyright notice and this permission notice shall be included in\n//  all copies or substantial portions of the Software.\n//\n//  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n//  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n//  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n//  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n//  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n//  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n//  THE SOFTWARE.\n\nimport Foundation\n\n/// Represents some event that was received.\npublic final class SocketAnyEvent : NSObject {\n    // MARK: Properties\n\n    /// The event name.\n    public let event: String\n\n    /// The data items for this event.\n    public let items: [Any]?\n\n    /// The description of this event.\n    override public var description: String {\n        return \"SocketAnyEvent: Event: \\(event) items: \\(String(describing: items))\"\n    }\n\n    init(event: String, items: [Any]?) {\n        self.event = event\n        self.items = items\n    }\n}\n"
  },
  {
    "path": "ArcBit/External/socket.io-client-swift-10.0.0/Source/SocketClientManager.swift",
    "content": "//\n//  SocketClientManager.swift\n//  Socket.IO-Client-Swift\n//\n//  Created by Erik Little on 6/11/16.\n//\n//  Permission is hereby granted, free of charge, to any person obtaining a copy\n//  of this software and associated documentation files (the \"Software\"), to deal\n//  in the Software without restriction, including without limitation the rights\n//  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n//  copies of the Software, and to permit persons to whom the Software is\n//  furnished to do so, subject to the following conditions:\n//\n//  The above copyright notice and this permission notice shall be included in\n//  all copies or substantial portions of the Software.\n//\n//  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n//  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n//  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n//  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n//  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n//  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n//  THE SOFTWARE.\n\nimport Foundation\n\n/**\n Experimental socket manager.\n\n API subject to change.\n\n Can be used to persist sockets across ViewControllers.\n\n Sockets are strongly stored, so be sure to remove them once they are no\n longer needed.\n\n Example usage:\n ```\n let manager = SocketClientManager.sharedManager\n manager[\"room1\"] = socket1\n manager[\"room2\"] = socket2\n manager.removeSocket(socket: socket2)\n manager[\"room1\"]?.emit(\"hello\")\n ```\n */\nopen class SocketClientManager : NSObject {\n    // MARK: Properties.\n\n    /// The shared manager.\n    open static let sharedManager = SocketClientManager()\n\n    private var sockets = [String: SocketIOClient]()\n\n    /// Gets a socket by its name.\n    ///\n    /// - returns: The socket, if one had the given name.\n    open subscript(string: String) -> SocketIOClient? {\n        get {\n            return sockets[string]\n        }\n\n        set(socket) {\n            sockets[string] = socket\n        }\n    }\n\n    // MARK: Methods.\n\n    /// Adds a socket.\n    ///\n    /// - parameter socket: The socket to add.\n    /// - parameter labeledAs: The label for this socket.\n    open func addSocket(_ socket: SocketIOClient, labeledAs label: String) {\n        sockets[label] = socket\n    }\n\n    /// Removes a socket by a given name.\n    ///\n    /// - parameter withLabel: The label of the socket to remove.\n    /// - returns: The socket for the given label, if one was present.\n    @discardableResult\n    open func removeSocket(withLabel label: String) -> SocketIOClient? {\n        return sockets.removeValue(forKey: label)\n    }\n\n    /// Removes a socket.\n    ///\n    /// - parameter socket: The socket to remove.\n    /// - returns: The socket if it was in the manager.\n    @discardableResult\n    open func removeSocket(_ socket: SocketIOClient) -> SocketIOClient? {\n        var returnSocket: SocketIOClient?\n\n        for (label, dictSocket) in sockets where dictSocket === socket {\n            returnSocket = sockets.removeValue(forKey: label)\n        }\n\n        return returnSocket\n    }\n\n    /// Removes all the sockets in the manager.\n    open func removeSockets() {\n        sockets.removeAll()\n    }\n}\n"
  },
  {
    "path": "ArcBit/External/socket.io-client-swift-10.0.0/Source/SocketEngine.swift",
    "content": "//\n//  SocketEngine.swift\n//  Socket.IO-Client-Swift\n//\n//  Created by Erik Little on 3/3/15.\n//\n//  Permission is hereby granted, free of charge, to any person obtaining a copy\n//  of this software and associated documentation files (the \"Software\"), to deal\n//  in the Software without restriction, including without limitation the rights\n//  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n//  copies of the Software, and to permit persons to whom the Software is\n//  furnished to do so, subject to the following conditions:\n//\n//  The above copyright notice and this permission notice shall be included in\n//  all copies or substantial portions of the Software.\n//\n//  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n//  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n//  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n//  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n//  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n//  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n//  THE SOFTWARE.\n\nimport Dispatch\nimport Foundation\n\n/// The class that handles the engine.io protocol and transports.\n/// See `SocketEnginePollable` and `SocketEngineWebsocket` for transport specific methods.\npublic final class SocketEngine : NSObject, URLSessionDelegate, SocketEnginePollable, SocketEngineWebsocket {\n    // MARK: Properties\n\n    /// The queue that all engine actions take place on.\n    public let engineQueue = DispatchQueue(label: \"com.socketio.engineHandleQueue\")\n\n    /// The connect parameters sent during a connect.\n    public var connectParams: [String: Any]? {\n        didSet {\n            (urlPolling, urlWebSocket) = createURLs()\n        }\n    }\n\n    /// A queue of engine.io messages waiting for POSTing\n    ///\n    /// **You should not touch this directly**\n    public var postWait = [String]()\n\n    /// `true` if there is an outstanding poll. Trying to poll before the first is done will cause socket.io to\n    /// disconnect us.\n    ///\n    /// **Do not touch this directly**\n    public var waitingForPoll = false\n\n    /// `true` if there is an outstanding post. Trying to post before the first is done will cause socket.io to\n    /// disconnect us.\n    ///\n    /// **Do not touch this directly**\n    public var waitingForPost = false\n\n    /// `true` if this engine is closed.\n    public private(set) var closed = false\n\n    /// `true` if this engine is connected. Connected means that the initial poll connect has succeeded.\n    public private(set) var connected = false\n\n    /// An array of HTTPCookies that are sent during the connection.\n    public private(set) var cookies: [HTTPCookie]?\n\n    /// A dictionary of extra http headers that will be set during connection.\n    public private(set) var extraHeaders: [String: String]?\n\n    /// When `true`, the engine is in the process of switching to WebSockets.\n    ///\n    /// **Do not touch this directly**\n    public private(set) var fastUpgrade = false\n\n    /// When `true`, the engine will only use HTTP long-polling as a transport.\n    public private(set) var forcePolling = false\n\n    /// When `true`, the engine will only use WebSockets as a transport.\n    public private(set) var forceWebsockets = false\n\n    /// `true` If engine's session has been invalidated.\n    public private(set) var invalidated = false\n\n    /// If `true`, the engine is currently in HTTP long-polling mode.\n    public private(set) var polling = true\n\n    /// If `true`, the engine is currently seeing whether it can upgrade to WebSockets.\n    public private(set) var probing = false\n\n    /// The URLSession that will be used for polling.\n    public private(set) var session: URLSession?\n\n    /// The session id for this engine.\n    public private(set) var sid = \"\"\n\n    /// The path to engine.io.\n    public private(set) var socketPath = \"/engine.io/\"\n\n    /// The url for polling.\n    public private(set) var urlPolling = URL(string: \"http://localhost/\")!\n\n    /// The url for WebSockets.\n    public private(set) var urlWebSocket = URL(string: \"http://localhost/\")!\n\n    /// If `true`, then the engine is currently in WebSockets mode.\n    public private(set) var websocket = false\n\n    /// The WebSocket for this engine.\n    public private(set) var ws: WebSocket?\n\n    /// The client for this engine.\n    public weak var client: SocketEngineClient?\n\n    private weak var sessionDelegate: URLSessionDelegate?\n\n    private let logType = \"SocketEngine\"\n    private let url: URL\n\n    private var pingInterval: Double?\n    private var pingTimeout = 0.0 {\n        didSet {\n            pongsMissedMax = Int(pingTimeout / (pingInterval ?? 25))\n        }\n    }\n\n    private var pongsMissed = 0\n    private var pongsMissedMax = 0\n    private var probeWait = ProbeWaitQueue()\n    private var secure = false\n    private var security: SSLSecurity?\n    private var selfSigned = false\n    private var voipEnabled = false\n\n    // MARK: Initializers\n\n    /// Creates a new engine.\n    ///\n    /// - parameter client: The client for this engine.\n    /// - parameter url: The url for this engine.\n    /// - parameter config: An array of configuration options for this engine.\n    public init(client: SocketEngineClient, url: URL, config: SocketIOClientConfiguration) {\n        self.client = client\n        self.url = url\n        for option in config {\n            switch option {\n            case let .connectParams(params):\n                connectParams = params\n            case let .cookies(cookies):\n                self.cookies = cookies\n            case let .extraHeaders(headers):\n                extraHeaders = headers\n            case let .sessionDelegate(delegate):\n                sessionDelegate = delegate\n            case let .forcePolling(force):\n                forcePolling = force\n            case let .forceWebsockets(force):\n                forceWebsockets = force\n            case let .path(path):\n                socketPath = path\n\n                if !socketPath.hasSuffix(\"/\") {\n                    socketPath += \"/\"\n                }\n            case let .voipEnabled(enable):\n                voipEnabled = enable\n            case let .secure(secure):\n                self.secure = secure\n            case let .selfSigned(selfSigned):\n                self.selfSigned = selfSigned\n            case let .security(security):\n                self.security = security\n            default:\n                continue\n            }\n        }\n\n        super.init()\n\n        sessionDelegate = sessionDelegate ?? self\n\n        (urlPolling, urlWebSocket) = createURLs()\n    }\n\n    /// Creates a new engine.\n    ///\n    /// - parameter client: The client for this engine.\n    /// - parameter url: The url for this engine.\n    /// - parameter options: The options for this engine.\n    public convenience init(client: SocketEngineClient, url: URL, options: NSDictionary?) {\n        self.init(client: client, url: url, config: options?.toSocketConfiguration() ?? [])\n    }\n\n    deinit {\n        DefaultSocketLogger.Logger.log(\"Engine is being released\", type: logType)\n        closed = true\n        stopPolling()\n    }\n\n    // MARK: Methods\n\n    private func checkAndHandleEngineError(_ msg: String) {\n        do {\n            let dict = try msg.toNSDictionary()\n            guard let error = dict[\"message\"] as? String else { return }\n\n            /*\n             0: Unknown transport\n             1: Unknown sid\n             2: Bad handshake request\n             3: Bad request\n             */\n            didError(reason: error)\n        } catch {\n            client?.engineDidError(reason: \"Got unknown error from server \\(msg)\")\n        }\n    }\n\n    private func handleBase64(message: String) {\n        // binary in base64 string\n        let noPrefix = message[message.index(message.startIndex, offsetBy: 2)..<message.endIndex]\n\n        if let data = Data(base64Encoded: noPrefix, options: .ignoreUnknownCharacters) {\n            client?.parseEngineBinaryData(data)\n        }\n    }\n\n    private func closeOutEngine(reason: String) {\n        sid = \"\"\n        closed = true\n        invalidated = true\n        connected = false\n\n        ws?.disconnect()\n        stopPolling()\n        client?.engineDidClose(reason: reason)\n    }\n\n    /// Starts the connection to the server.\n    public func connect() {\n        engineQueue.async {\n            self._connect()\n        }\n    }\n\n    private func _connect() {\n        if connected {\n            DefaultSocketLogger.Logger.error(\"Engine tried opening while connected. Assuming this was a reconnect\", type: logType)\n            disconnect(reason: \"reconnect\")\n        }\n\n        DefaultSocketLogger.Logger.log(\"Starting engine. Server: %@\", type: logType, args: url)\n        DefaultSocketLogger.Logger.log(\"Handshaking\", type: logType)\n\n        resetEngine()\n\n        if forceWebsockets {\n            polling = false\n            websocket = true\n            createWebsocketAndConnect()\n            return\n        }\n\n        var reqPolling = URLRequest(url: urlPolling, cachePolicy: .reloadIgnoringLocalCacheData, timeoutInterval: 60.0)\n\n        if cookies != nil {\n            let headers = HTTPCookie.requestHeaderFields(with: cookies!)\n            reqPolling.allHTTPHeaderFields = headers\n        }\n\n        if let extraHeaders = extraHeaders {\n            for (headerName, value) in extraHeaders {\n                reqPolling.setValue(value, forHTTPHeaderField: headerName)\n            }\n        }\n\n        doLongPoll(for: reqPolling)\n    }\n\n    private func createURLs() -> (URL, URL) {\n        if client == nil {\n            return (URL(string: \"http://localhost/\")!, URL(string: \"http://localhost/\")!)\n        }\n\n        var urlPolling = URLComponents(string: url.absoluteString)!\n        var urlWebSocket = URLComponents(string: url.absoluteString)!\n        var queryString = \"\"\n\n        urlWebSocket.path = socketPath\n        urlPolling.path = socketPath\n\n        if secure {\n            urlPolling.scheme = \"https\"\n            urlWebSocket.scheme = \"wss\"\n        } else {\n            urlPolling.scheme = \"http\"\n            urlWebSocket.scheme = \"ws\"\n        }\n\n        if connectParams != nil {\n            for (key, value) in connectParams! {\n                let keyEsc   = key.urlEncode()!\n                let valueEsc = \"\\(value)\".urlEncode()!\n\n                queryString += \"&\\(keyEsc)=\\(valueEsc)\"\n            }\n        }\n\n        urlWebSocket.percentEncodedQuery = \"transport=websocket\" + queryString\n        urlPolling.percentEncodedQuery = \"transport=polling&b64=1\" + queryString\n\n        return (urlPolling.url!, urlWebSocket.url!)\n    }\n\n    private func createWebsocketAndConnect() {\n        ws?.delegate = nil\n        ws = WebSocket(url: urlWebSocketWithSid as URL)\n\n        if cookies != nil {\n            let headers = HTTPCookie.requestHeaderFields(with: cookies!)\n            for (key, value) in headers {\n                ws?.headers[key] = value\n            }\n        }\n\n        if extraHeaders != nil {\n            for (headerName, value) in extraHeaders! {\n                ws?.headers[headerName] = value\n            }\n        }\n\n        ws?.callbackQueue = engineQueue\n        ws?.voipEnabled = voipEnabled\n        ws?.delegate = self\n        ws?.disableSSLCertValidation = selfSigned\n        ws?.security = security\n\n        ws?.connect()\n    }\n\n    /// Called when an error happens during execution. Causes a disconnection.\n    public func didError(reason: String) {\n        DefaultSocketLogger.Logger.error(\"%@\", type: logType, args: reason)\n        client?.engineDidError(reason: reason)\n        disconnect(reason: reason)\n    }\n\n    /// Disconnects from the server.\n    ///\n    /// - parameter reason: The reason for the disconnection. This is communicated up to the client.\n    public func disconnect(reason: String) {\n        engineQueue.async {\n            self._disconnect(reason: reason)\n        }\n    }\n\n    private func _disconnect(reason: String) {\n        guard connected else { return closeOutEngine(reason: reason) }\n\n        DefaultSocketLogger.Logger.log(\"Engine is being closed.\", type: logType)\n\n        if closed {\n            return closeOutEngine(reason: reason)\n        }\n\n        if websocket {\n            sendWebSocketMessage(\"\", withType: .close, withData: [])\n            closeOutEngine(reason: reason)\n        } else {\n            disconnectPolling(reason: reason)\n        }\n    }\n\n    // We need to take special care when we're polling that we send it ASAP\n    // Also make sure we're on the emitQueue since we're touching postWait\n    private func disconnectPolling(reason: String) {\n        postWait.append(String(SocketEnginePacketType.close.rawValue))\n\n        doRequest(for: createRequestForPostWithPostWait()) {_, _, _ in }\n        closeOutEngine(reason: reason)\n    }\n\n    /// Called to switch from HTTP long-polling to WebSockets. After calling this method the engine will be in\n    /// WebSocket mode.\n    ///\n    /// **You shouldn't call this directly**\n    public func doFastUpgrade() {\n        if waitingForPoll {\n            DefaultSocketLogger.Logger.error(\"Outstanding poll when switched to WebSockets,\" +\n                \"we'll probably disconnect soon. You should report this.\", type: logType)\n        }\n\n        sendWebSocketMessage(\"\", withType: .upgrade, withData: [])\n        websocket = true\n        polling = false\n        fastUpgrade = false\n        probing = false\n        flushProbeWait()\n    }\n\n    private func flushProbeWait() {\n        DefaultSocketLogger.Logger.log(\"Flushing probe wait\", type: logType)\n\n        for waiter in probeWait {\n            write(waiter.msg, withType: waiter.type, withData: waiter.data)\n        }\n\n        probeWait.removeAll(keepingCapacity: false)\n\n        if postWait.count != 0 {\n            flushWaitingForPostToWebSocket()\n        }\n    }\n\n    /// Causes any packets that were waiting for POSTing to be sent through the WebSocket. This happens because when\n    /// the engine is attempting to upgrade to WebSocket it does not do any POSTing.\n    ///\n    /// **You shouldn't call this directly**\n    public func flushWaitingForPostToWebSocket() {\n        guard let ws = self.ws else { return }\n\n        for msg in postWait {\n            ws.write(string: msg)\n        }\n\n        postWait.removeAll(keepingCapacity: false)\n    }\n\n    private func handleClose(_ reason: String) {\n        client?.engineDidClose(reason: reason)\n    }\n\n    private func handleMessage(_ message: String) {\n        client?.parseEngineMessage(message)\n    }\n\n    private func handleNOOP() {\n        doPoll()\n    }\n\n    private func handleOpen(openData: String) {\n        guard let json = try? openData.toNSDictionary() else {\n            didError(reason: \"Error parsing open packet\")\n\n            return\n        }\n\n        guard let sid = json[\"sid\"] as? String else {\n            didError(reason: \"Open packet contained no sid\")\n\n            return\n        }\n\n        let upgradeWs: Bool\n\n        self.sid = sid\n        connected = true\n        pongsMissed = 0\n\n        if let upgrades = json[\"upgrades\"] as? [String] {\n            upgradeWs = upgrades.contains(\"websocket\")\n        } else {\n            upgradeWs = false\n        }\n\n        if let pingInterval = json[\"pingInterval\"] as? Double, let pingTimeout = json[\"pingTimeout\"] as? Double {\n            self.pingInterval = pingInterval / 1000.0\n            self.pingTimeout = pingTimeout / 1000.0\n        }\n\n        if !forcePolling && !forceWebsockets && upgradeWs {\n            createWebsocketAndConnect()\n        }\n\n        sendPing()\n\n        if !forceWebsockets {\n            doPoll()\n        }\n\n        client?.engineDidOpen(reason: \"Connect\")\n    }\n\n    private func handlePong(with message: String) {\n        pongsMissed = 0\n\n        // We should upgrade\n        if message == \"3probe\" {\n            upgradeTransport()\n        }\n    }\n\n    /// Parses raw binary received from engine.io.\n    ///\n    /// - parameter data: The data to parse.\n    public func parseEngineData(_ data: Data) {\n        DefaultSocketLogger.Logger.log(\"Got binary data: %@\", type: \"SocketEngine\", args: data)\n\n        client?.parseEngineBinaryData(data.subdata(in: 1..<data.endIndex))\n    }\n\n    /// Parses a raw engine.io packet.\n    ///\n    /// - parameter message: The message to parse.\n    /// - parameter fromPolling: Whether this message is from long-polling.\n    ///                          If `true` we might have to fix utf8 encoding.\n    public func parseEngineMessage(_ message: String) {\n        DefaultSocketLogger.Logger.log(\"Got message: %@\", type: logType, args: message)\n\n        let reader = SocketStringReader(message: message)\n\n        if message.hasPrefix(\"b4\") {\n            return handleBase64(message: message)\n        }\n\n        guard let type = SocketEnginePacketType(rawValue: Int(reader.currentCharacter) ?? -1) else {\n            checkAndHandleEngineError(message)\n\n            return\n        }\n\n        switch type {\n        case .message:\n            handleMessage(String(message.characters.dropFirst()))\n        case .noop:\n            handleNOOP()\n        case .pong:\n            handlePong(with: message)\n        case .open:\n            handleOpen(openData: String(message.characters.dropFirst()))\n        case .close:\n            handleClose(message)\n        default:\n            DefaultSocketLogger.Logger.log(\"Got unknown packet type\", type: logType)\n        }\n    }\n\n    // Puts the engine back in its default state\n    private func resetEngine() {\n        let queue = OperationQueue()\n        queue.underlyingQueue = engineQueue\n\n        closed = false\n        connected = false\n        fastUpgrade = false\n        polling = true\n        probing = false\n        invalidated = false\n        session = Foundation.URLSession(configuration: .default, delegate: sessionDelegate, delegateQueue: queue)\n        sid = \"\"\n        waitingForPoll = false\n        waitingForPost = false\n        websocket = false\n    }\n\n    private func sendPing() {\n        guard connected else { return }\n\n        // Server is not responding\n        if pongsMissed > pongsMissedMax {\n            client?.engineDidClose(reason: \"Ping timeout\")\n\n            return\n        }\n\n        guard let pingInterval = pingInterval else { return }\n\n        pongsMissed += 1\n        write(\"\", withType: .ping, withData: [])\n\n        engineQueue.asyncAfter(deadline: DispatchTime.now() + Double(pingInterval)) {[weak self] in self?.sendPing() }\n    }\n\n    // Moves from long-polling to websockets\n    private func upgradeTransport() {\n        if ws?.isConnected ?? false {\n            DefaultSocketLogger.Logger.log(\"Upgrading transport to WebSockets\", type: logType)\n\n            fastUpgrade = true\n            sendPollMessage(\"\", withType: .noop, withData: [])\n            // After this point, we should not send anymore polling messages\n        }\n    }\n\n    /// Writes a message to engine.io, independent of transport.\n    ///\n    /// - parameter msg: The message to send.\n    /// - parameter withType: The type of this message.\n    /// - parameter withData: Any data that this message has.\n    public func write(_ msg: String, withType type: SocketEnginePacketType, withData data: [Data]) {\n        engineQueue.async {\n            guard self.connected else { return }\n\n            if self.websocket {\n                DefaultSocketLogger.Logger.log(\"Writing ws: %@ has data: %@\",\n                                               type: self.logType, args: msg, data.count != 0)\n                self.sendWebSocketMessage(msg, withType: type, withData: data)\n            } else if !self.probing {\n                DefaultSocketLogger.Logger.log(\"Writing poll: %@ has data: %@\",\n                                               type: self.logType, args: msg, data.count != 0)\n                self.sendPollMessage(msg, withType: type, withData: data)\n            } else {\n                self.probeWait.append((msg, type, data))\n            }\n        }\n    }\n\n    // MARK: Starscream delegate conformance\n\n    /// Delegate method for connection.\n    public func websocketDidConnect(socket: WebSocket) {\n        if !forceWebsockets {\n            probing = true\n            probeWebSocket()\n        } else {\n            connected = true\n            probing = false\n            polling = false\n        }\n    }\n\n    /// Delegate method for disconnection.\n    public func websocketDidDisconnect(socket: WebSocket, error: NSError?) {\n        probing = false\n\n        if closed {\n            client?.engineDidClose(reason: \"Disconnect\")\n\n            return\n        }\n\n        guard websocket else {\n            flushProbeWait()\n\n            return\n        }\n\n        connected = false\n        websocket = false\n\n        if let reason = error?.localizedDescription {\n            didError(reason: reason)\n        } else {\n            client?.engineDidClose(reason: \"Socket Disconnected\")\n        }\n    }\n}\n\nextension SocketEngine {\n    // MARK: URLSessionDelegate methods\n\n    /// Delegate called when the session becomes invalid.\n    public func URLSession(session: URLSession, didBecomeInvalidWithError error: NSError?) {\n        DefaultSocketLogger.Logger.error(\"Engine URLSession became invalid\", type: \"SocketEngine\")\n\n        didError(reason: \"Engine URLSession became invalid\")\n    }\n}\n"
  },
  {
    "path": "ArcBit/External/socket.io-client-swift-10.0.0/Source/SocketEngineClient.swift",
    "content": "//\n//  SocketEngineClient.swift\n//  Socket.IO-Client-Swift\n//\n//  Created by Erik Little on 3/19/15.\n//\n//  Permission is hereby granted, free of charge, to any person obtaining a copy\n//  of this software and associated documentation files (the \"Software\"), to deal\n//  in the Software without restriction, including without limitation the rights\n//  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n//  copies of the Software, and to permit persons to whom the Software is\n//  furnished to do so, subject to the following conditions:\n//\n//  The above copyright notice and this permission notice shall be included in\n//  all copies or substantial portions of the Software.\n//\n//  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n//  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n//  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n//  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n//  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n//  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n//  THE SOFTWARE.\n//\n\nimport Foundation\n\n/// Declares that a type will be a delegate to an engine.\n@objc public protocol SocketEngineClient {\n    // MARK: Methods\n\n    /// Called when the engine errors.\n    ///\n    /// - parameter reason: The reason the engine errored.\n    func engineDidError(reason: String)\n\n    /// Called when the engine closes.\n    ///\n    /// - parameter reason: The reason that the engine closed.\n    func engineDidClose(reason: String)\n\n    /// Called when the engine opens.\n    ///\n    /// - parameter reason: The reason the engine opened.\n    func engineDidOpen(reason: String)\n\n    /// Called when the engine has a message that must be parsed.\n    ///\n    /// - parameter msg: The message that needs parsing.\n    func parseEngineMessage(_ msg: String)\n\n    /// Called when the engine receives binary data.\n    ///\n    /// - parameter data: The data the engine received.\n    func parseEngineBinaryData(_ data: Data)\n}\n"
  },
  {
    "path": "ArcBit/External/socket.io-client-swift-10.0.0/Source/SocketEnginePacketType.swift",
    "content": "//\n//  SocketEnginePacketType.swift\n//  Socket.IO-Client-Swift\n//\n//  Created by Erik Little on 10/7/15.\n//\n//  Permission is hereby granted, free of charge, to any person obtaining a copy\n//  of this software and associated documentation files (the \"Software\"), to deal\n//  in the Software without restriction, including without limitation the rights\n//  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n//  copies of the Software, and to permit persons to whom the Software is\n//  furnished to do so, subject to the following conditions:\n//\n//  The above copyright notice and this permission notice shall be included in\n//  all copies or substantial portions of the Software.\n//\n//  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n//  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n//  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n//  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n//  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n//  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n//  THE SOFTWARE.\n//\n\nimport Foundation\n\n/// Represents the type of engine.io packet types.\n@objc public enum SocketEnginePacketType : Int {\n    /// Open message.\n    case open\n\n    /// Close message.\n    case close\n\n    /// Ping message.\n    case ping\n\n    /// Pong message.\n    case pong\n\n    /// Regular message.\n    case message\n\n    /// Upgrade message.\n    case upgrade\n\n    /// NOOP.\n    case noop\n}\n"
  },
  {
    "path": "ArcBit/External/socket.io-client-swift-10.0.0/Source/SocketEnginePollable.swift",
    "content": "//\n//  SocketEnginePollable.swift\n//  Socket.IO-Client-Swift\n//\n//  Created by Erik Little on 1/15/16.\n//\n//  Permission is hereby granted, free of charge, to any person obtaining a copy\n//  of this software and associated documentation files (the \"Software\"), to deal\n//  in the Software without restriction, including without limitation the rights\n//  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n//  copies of the Software, and to permit persons to whom the Software is\n//  furnished to do so, subject to the following conditions:\n//\n//  The above copyright notice and this permission notice shall be included in\n//  all copies or substantial portions of the Software.\n//\n//  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n//  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n//  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n//  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n//  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n//  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n//  THE SOFTWARE.\n\nimport Foundation\n\n/// Protocol that is used to implement socket.io polling support\npublic protocol SocketEnginePollable : SocketEngineSpec {\n    /// MARK: Properties\n\n    /// `true` If engine's session has been invalidated.\n    var invalidated: Bool { get }\n\n    /// A queue of engine.io messages waiting for POSTing\n    ///\n    /// **You should not touch this directly**\n    var postWait: [String] { get set }\n\n    /// The URLSession that will be used for polling.\n    var session: URLSession? { get }\n\n    /// `true` if there is an outstanding poll. Trying to poll before the first is done will cause socket.io to\n    /// disconnect us.\n    ///\n    /// **Do not touch this directly**\n    var waitingForPoll: Bool { get set }\n\n    /// `true` if there is an outstanding post. Trying to post before the first is done will cause socket.io to\n    /// disconnect us.\n    ///\n    /// **Do not touch this directly**\n    var waitingForPost: Bool { get set }\n\n    /// Call to send a long-polling request.\n    ///\n    /// You shouldn't need to call this directly, the engine should automatically maintain a long-poll request.\n    func doPoll()\n\n    /// Sends an engine.io message through the polling transport.\n    ///\n    /// You shouldn't call this directly, instead call the `write` method on `SocketEngine`.\n    ///\n    /// - parameter message: The message to send.\n    /// - parameter withType: The type of message to send.\n    /// - parameter withData: The data associated with this message.\n    func sendPollMessage(_ message: String, withType type: SocketEnginePacketType, withData datas: [Data])\n\n    /// Call to stop polling and invalidate the URLSession.\n    func stopPolling()\n}\n\n// Default polling methods\nextension SocketEnginePollable {\n    private func addHeaders(to req: inout URLRequest) {\n        if cookies != nil {\n            let headers = HTTPCookie.requestHeaderFields(with: cookies!)\n            req.allHTTPHeaderFields = headers\n        }\n\n        if extraHeaders != nil {\n            for (headerName, value) in extraHeaders! {\n                req.setValue(value, forHTTPHeaderField: headerName)\n            }\n        }\n    }\n\n    func createRequestForPostWithPostWait() -> URLRequest {\n        defer { postWait.removeAll(keepingCapacity: true) }\n\n        var postStr = \"\"\n\n        for packet in postWait {\n            postStr += \"\\(packet.utf16.count):\\(packet)\"\n        }\n\n        DefaultSocketLogger.Logger.log(\"Created POST string: %@\", type: \"SocketEnginePolling\", args: postStr)\n\n        var req = URLRequest(url: urlPollingWithSid)\n        let postData = postStr.data(using: .utf8, allowLossyConversion: false)!\n\n        addHeaders(to: &req)\n\n        req.httpMethod = \"POST\"\n        req.setValue(\"text/plain; charset=UTF-8\", forHTTPHeaderField: \"Content-Type\")\n        req.httpBody = postData\n        req.setValue(String(postData.count), forHTTPHeaderField: \"Content-Length\")\n\n        return req\n    }\n\n    /// Call to send a long-polling request.\n    ///\n    /// You shouldn't need to call this directly, the engine should automatically maintain a long-poll request.\n    public func doPoll() {\n        guard !websocket && !waitingForPoll && connected && !closed else { return }\n\n        var req = URLRequest(url: urlPollingWithSid)\n        addHeaders(to: &req)\n\n        doLongPoll(for: req)\n    }\n\n    func doRequest(for req: URLRequest, callbackWith callback: @escaping (Data?, URLResponse?, Error?) -> Void) {\n        guard polling && !closed && !invalidated && !fastUpgrade else { return }\n\n        DefaultSocketLogger.Logger.log(\"Doing polling %@ %@\", type: \"SocketEnginePolling\",\n                                       args: req.httpMethod ?? \"\", req)\n\n        session?.dataTask(with: req, completionHandler: callback).resume()\n    }\n\n    func doLongPoll(for req: URLRequest) {\n        waitingForPoll = true\n\n        doRequest(for: req) {[weak self] data, res, err in\n            guard let this = self, this.polling else { return }\n\n            if err != nil || data == nil {\n                DefaultSocketLogger.Logger.error(err?.localizedDescription ?? \"Error\", type: \"SocketEnginePolling\")\n\n                if this.polling {\n                    this.didError(reason: err?.localizedDescription ?? \"Error\")\n                }\n\n                return\n            }\n\n            DefaultSocketLogger.Logger.log(\"Got polling response\", type: \"SocketEnginePolling\")\n\n            if let str = String(data: data!, encoding: String.Encoding.utf8) {\n                this.parsePollingMessage(str)\n            }\n\n            this.waitingForPoll = false\n\n            if this.fastUpgrade {\n                this.doFastUpgrade()\n            } else if !this.closed && this.polling {\n                this.doPoll()\n            }\n        }\n    }\n\n    private func flushWaitingForPost() {\n        guard postWait.count != 0 && connected else { return }\n        guard !websocket else {\n            flushWaitingForPostToWebSocket()\n\n            return\n        }\n\n        let req = createRequestForPostWithPostWait()\n\n        waitingForPost = true\n\n        DefaultSocketLogger.Logger.log(\"POSTing\", type: \"SocketEnginePolling\")\n\n        doRequest(for: req) {[weak self] data, res, err in\n            guard let this = self else { return }\n\n            if err != nil {\n                DefaultSocketLogger.Logger.error(err?.localizedDescription ?? \"Error\", type: \"SocketEnginePolling\")\n\n                if this.polling {\n                    this.didError(reason: err?.localizedDescription ?? \"Error\")\n                }\n\n                return\n            }\n\n            this.waitingForPost = false\n\n            if !this.fastUpgrade {\n                this.flushWaitingForPost()\n                this.doPoll()\n            }\n        }\n    }\n\n    func parsePollingMessage(_ str: String) {\n        guard str.characters.count != 1 else { return }\n\n        DefaultSocketLogger.Logger.log(\"Got poll message: %@\", type: \"SocketEnginePolling\", args: str)\n\n        var reader = SocketStringReader(message: str)\n\n        while reader.hasNext {\n            if let n = Int(reader.readUntilOccurence(of: \":\")) {\n                parseEngineMessage(reader.read(count: n))\n            } else {\n                parseEngineMessage(str)\n                break\n            }\n        }\n    }\n\n    /// Sends an engine.io message through the polling transport.\n    ///\n    /// You shouldn't call this directly, instead call the `write` method on `SocketEngine`.\n    ///\n    /// - parameter message: The message to send.\n    /// - parameter withType: The type of message to send.\n    /// - parameter withData: The data associated with this message.\n    public func sendPollMessage(_ message: String, withType type: SocketEnginePacketType, withData datas: [Data]) {\n        DefaultSocketLogger.Logger.log(\"Sending poll: %@ as type: %@\", type: \"SocketEnginePolling\", args: message, type.rawValue)\n\n        postWait.append(String(type.rawValue) + message)\n\n        for data in datas {\n            if case let .right(bin) = createBinaryDataForSend(using: data) {\n                postWait.append(bin)\n            }\n        }\n\n        if !waitingForPost {\n            flushWaitingForPost()\n        }\n    }\n\n    /// Call to stop polling and invalidate the URLSession.\n    public func stopPolling() {\n        waitingForPoll = false\n        waitingForPost = false\n        session?.finishTasksAndInvalidate()\n    }\n}\n"
  },
  {
    "path": "ArcBit/External/socket.io-client-swift-10.0.0/Source/SocketEngineSpec.swift",
    "content": "//\n//  SocketEngineSpec.swift\n//  Socket.IO-Client-Swift\n//\n//  Created by Erik Little on 10/7/15.\n//\n//  Permission is hereby granted, free of charge, to any person obtaining a copy\n//  of this software and associated documentation files (the \"Software\"), to deal\n//  in the Software without restriction, including without limitation the rights\n//  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n//  copies of the Software, and to permit persons to whom the Software is\n//  furnished to do so, subject to the following conditions:\n//\n//  The above copyright notice and this permission notice shall be included in\n//  all copies or substantial portions of the Software.\n//\n//  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n//  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n//  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n//  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n//  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n//  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n//  THE SOFTWARE.\n//\n\nimport Foundation\n\n/// Specifies a SocketEngine.\n@objc public protocol SocketEngineSpec {\n    /// The client for this engine.\n    weak var client: SocketEngineClient? { get set }\n\n    /// `true` if this engine is closed.\n    var closed: Bool { get }\n\n    /// `true` if this engine is connected. Connected means that the initial poll connect has succeeded.\n    var connected: Bool { get }\n\n    /// The connect parameters sent during a connect.\n    var connectParams: [String: Any]? { get set }\n\n    /// An array of HTTPCookies that are sent during the connection.\n    var cookies: [HTTPCookie]? { get }\n\n    /// The queue that all engine actions take place on.\n    var engineQueue: DispatchQueue { get }\n\n    /// A dictionary of extra http headers that will be set during connection.\n    var extraHeaders: [String: String]? { get }\n\n    /// When `true`, the engine is in the process of switching to WebSockets.\n    var fastUpgrade: Bool { get }\n\n    /// When `true`, the engine will only use HTTP long-polling as a transport.\n    var forcePolling: Bool { get }\n\n    /// When `true`, the engine will only use WebSockets as a transport.\n    var forceWebsockets: Bool { get }\n\n    /// If `true`, the engine is currently in HTTP long-polling mode.\n    var polling: Bool { get }\n\n    /// If `true`, the engine is currently seeing whether it can upgrade to WebSockets.\n    var probing: Bool { get }\n\n    /// The session id for this engine.\n    var sid: String { get }\n\n    /// The path to engine.io.\n    var socketPath: String { get }\n\n    /// The url for polling.\n    var urlPolling: URL { get }\n\n    /// The url for WebSockets.\n    var urlWebSocket: URL { get }\n\n    /// If `true`, then the engine is currently in WebSockets mode.\n    var websocket: Bool { get }\n\n    /// The WebSocket for this engine.\n    var ws: WebSocket? { get }\n\n    /// Creates a new engine.\n    ///\n    /// - parameter client: The client for this engine.\n    /// - parameter url: The url for this engine.\n    /// - parameter options: The options for this engine.\n    init(client: SocketEngineClient, url: URL, options: NSDictionary?)\n\n    /// Starts the connection to the server.\n    func connect()\n\n    /// Called when an error happens during execution. Causes a disconnection.\n    func didError(reason: String)\n\n    /// Disconnects from the server.\n    ///\n    /// - parameter reason: The reason for the disconnection. This is communicated up to the client.\n    func disconnect(reason: String)\n\n    /// Called to switch from HTTP long-polling to WebSockets. After calling this method the engine will be in\n    /// WebSocket mode.\n    ///\n    /// **You shouldn't call this directly**\n    func doFastUpgrade()\n\n    /// Causes any packets that were waiting for POSTing to be sent through the WebSocket. This happens because when\n    /// the engine is attempting to upgrade to WebSocket it does not do any POSTing.\n    ///\n    /// **You shouldn't call this directly**\n    func flushWaitingForPostToWebSocket()\n\n    /// Parses raw binary received from engine.io.\n    ///\n    /// - parameter data: The data to parse.\n    func parseEngineData(_ data: Data)\n\n    /// Parses a raw engine.io packet.\n    ///\n    /// - parameter message: The message to parse.\n    /// - parameter fromPolling: Whether this message is from long-polling.\n    ///                          If `true` we might have to fix utf8 encoding.\n    func parseEngineMessage(_ message: String)\n\n    /// Writes a message to engine.io, independent of transport.\n    ///\n    /// - parameter msg: The message to send.\n    /// - parameter withType: The type of this message.\n    /// - parameter withData: Any data that this message has.\n    func write(_ msg: String, withType type: SocketEnginePacketType, withData data: [Data])\n}\n\nextension SocketEngineSpec {\n    var urlPollingWithSid: URL {\n        var com = URLComponents(url: urlPolling, resolvingAgainstBaseURL: false)!\n        com.percentEncodedQuery = com.percentEncodedQuery! + \"&sid=\\(sid.urlEncode()!)\"\n\n        return com.url!\n    }\n\n    var urlWebSocketWithSid: URL {\n        var com = URLComponents(url: urlWebSocket, resolvingAgainstBaseURL: false)!\n        com.percentEncodedQuery = com.percentEncodedQuery! + (sid == \"\" ? \"\" : \"&sid=\\(sid.urlEncode()!)\")\n\n        return com.url!\n    }\n\n    func createBinaryDataForSend(using data: Data) -> Either<Data, String> {\n        if websocket {\n            var byteArray = [UInt8](repeating: 0x4, count: 1)\n            let mutData = NSMutableData(bytes: &byteArray, length: 1)\n\n            mutData.append(data)\n\n            return .left(mutData as Data)\n        } else {\n            let str = \"b4\" + data.base64EncodedString(options: Data.Base64EncodingOptions(rawValue: 0))\n\n            return .right(str)\n        }\n    }\n\n    /// Send an engine message (4)\n    func send(_ msg: String, withData datas: [Data]) {\n        write(msg, withType: .message, withData: datas)\n    }\n}\n"
  },
  {
    "path": "ArcBit/External/socket.io-client-swift-10.0.0/Source/SocketEngineWebsocket.swift",
    "content": "//\n//  SocketEngineWebsocket.swift\n//  Socket.IO-Client-Swift\n//\n//  Created by Erik Little on 1/15/16.\n//\n//  Permission is hereby granted, free of charge, to any person obtaining a copy\n//  of this software and associated documentation files (the \"Software\"), to deal\n//  in the Software without restriction, including without limitation the rights\n//  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n//  copies of the Software, and to permit persons to whom the Software is\n//  furnished to do so, subject to the following conditions:\n//\n//  The above copyright notice and this permission notice shall be included in\n//  all copies or substantial portions of the Software.\n//\n//  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n//  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n//  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n//  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n//  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n//  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n//  THE SOFTWARE.\n//\n\nimport Foundation\n\n/// Protocol that is used to implement socket.io WebSocket support\npublic protocol SocketEngineWebsocket : SocketEngineSpec, WebSocketDelegate {\n    /// Sends an engine.io message through the WebSocket transport.\n    ///\n    /// You shouldn't call this directly, instead call the `write` method on `SocketEngine`.\n    ///\n    /// - parameter message: The message to send.\n    /// - parameter withType: The type of message to send.\n    /// - parameter withData: The data associated with this message.\n    func sendWebSocketMessage(_ str: String, withType type: SocketEnginePacketType, withData datas: [Data])\n}\n\n// WebSocket methods\nextension SocketEngineWebsocket {\n    func probeWebSocket() {\n        if ws?.isConnected ?? false {\n            sendWebSocketMessage(\"probe\", withType: .ping, withData: [])\n        }\n    }\n\n    /// Sends an engine.io message through the WebSocket transport.\n    ///\n    /// You shouldn't call this directly, instead call the `write` method on `SocketEngine`.\n    ///\n    /// - parameter message: The message to send.\n    /// - parameter withType: The type of message to send.\n    /// - parameter withData: The data associated with this message.\n    public func sendWebSocketMessage(_ str: String, withType type: SocketEnginePacketType, withData datas: [Data]) {\n        DefaultSocketLogger.Logger.log(\"Sending ws: %@ as type: %@\", type: \"SocketEngine\", args: str, type.rawValue)\n\n        ws?.write(string: \"\\(type.rawValue)\\(str)\")\n\n        for data in datas {\n            if case let .left(bin) = createBinaryDataForSend(using: data) {\n                ws?.write(data: bin)\n            }\n        }\n    }\n\n    // MARK: Starscream delegate methods\n\n    /// Delegate method for when a message is received.\n    public func websocketDidReceiveMessage(socket: WebSocket, text: String) {\n        parseEngineMessage(text)\n    }\n\n    /// Delegate method for when binary is received.\n    public func websocketDidReceiveData(socket: WebSocket, data: Data) {\n        parseEngineData(data)\n    }\n}\n"
  },
  {
    "path": "ArcBit/External/socket.io-client-swift-10.0.0/Source/SocketEventHandler.swift",
    "content": "//\n//  EventHandler.swift\n//  Socket.IO-Client-Swift\n//\n//  Created by Erik Little on 1/18/15.\n//\n//  Permission is hereby granted, free of charge, to any person obtaining a copy\n//  of this software and associated documentation files (the \"Software\"), to deal\n//  in the Software without restriction, including without limitation the rights\n//  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n//  copies of the Software, and to permit persons to whom the Software is\n//  furnished to do so, subject to the following conditions:\n//\n//  The above copyright notice and this permission notice shall be included in\n//  all copies or substantial portions of the Software.\n//\n//  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n//  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n//  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n//  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n//  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n//  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n//  THE SOFTWARE.\n\nimport Foundation\n\nstruct SocketEventHandler {\n    let event: String\n    let id: UUID\n    let callback: NormalCallback\n    \n    func executeCallback(with items: [Any], withAck ack: Int, withSocket socket: SocketIOClient) {\n        callback(items, SocketAckEmitter(socket: socket, ackNum: ack))\n    }\n}\n"
  },
  {
    "path": "ArcBit/External/socket.io-client-swift-10.0.0/Source/SocketExtensions.swift",
    "content": "//\n//  SocketExtensions.swift\n//  Socket.IO-Client-Swift\n//\n//  Created by Erik Little on 7/1/2016.\n//\n//  Permission is hereby granted, free of charge, to any person obtaining a copy\n//  of this software and associated documentation files (the \"Software\"), to deal\n//  in the Software without restriction, including without limitation the rights\n//  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n//  copies of the Software, and to permit persons to whom the Software is\n//  furnished to do so, subject to the following conditions:\n//\n//  The above copyright notice and this permission notice shall be included in\n//  all copies or substantial portions of the Software.\n//\n//  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n//  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n//  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n//  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n//  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n//  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n//  THE SOFTWARE.\n\nimport Foundation\n\nenum JSONError : Error {\n    case notArray\n    case notNSDictionary\n}\n\nextension Array {\n    func toJSON() throws -> Data {\n        return try JSONSerialization.data(withJSONObject: self, options: JSONSerialization.WritingOptions(rawValue: 0))\n    }\n}\n\nextension CharacterSet {\n    static var allowedURLCharacterSet: CharacterSet {\n        return CharacterSet(charactersIn: \"!*'();:@&=+$,/?%#[]\\\" {}\").inverted\n    }\n}\n\nextension NSDictionary {\n    private static func keyValueToSocketIOClientOption(key: String, value: Any) -> SocketIOClientOption? {\n        switch (key, value) {\n        case let (\"connectParams\", params as [String: Any]):\n            return .connectParams(params)\n        case let (\"cookies\", cookies as [HTTPCookie]):\n            return .cookies(cookies)\n        case let (\"extraHeaders\", headers as [String: String]):\n            return .extraHeaders(headers)\n        case let (\"forceNew\", force as Bool):\n            return .forceNew(force)\n        case let (\"forcePolling\", force as Bool):\n            return .forcePolling(force)\n        case let (\"forceWebsockets\", force as Bool):\n            return .forceWebsockets(force)\n        case let (\"handleQueue\", queue as DispatchQueue):\n            return .handleQueue(queue)\n        case let (\"log\", log as Bool):\n            return .log(log)\n        case let (\"logger\", logger as SocketLogger):\n            return .logger(logger)\n        case let (\"nsp\", nsp as String):\n            return .nsp(nsp)\n        case let (\"path\", path as String):\n            return .path(path)\n        case let (\"reconnects\", reconnects as Bool):\n            return .reconnects(reconnects)\n        case let (\"reconnectAttempts\", attempts as Int):\n            return .reconnectAttempts(attempts)\n        case let (\"reconnectWait\", wait as Int):\n            return .reconnectWait(wait)\n        case let (\"secure\", secure as Bool):\n            return .secure(secure)\n        case let (\"security\", security as SSLSecurity):\n            return .security(security)\n        case let (\"selfSigned\", selfSigned as Bool):\n            return .selfSigned(selfSigned)\n        case let (\"sessionDelegate\", delegate as URLSessionDelegate):\n            return .sessionDelegate(delegate)\n        case let (\"voipEnabled\", enable as Bool):\n            return .voipEnabled(enable)\n        default:\n            return nil\n        }\n    }\n\n    func toSocketConfiguration() -> SocketIOClientConfiguration {\n        var options = [] as SocketIOClientConfiguration\n\n        for (rawKey, value) in self {\n            if let key = rawKey as? String, let opt = NSDictionary.keyValueToSocketIOClientOption(key: key, value: value) {\n                options.insert(opt)\n            }\n        }\n\n        return options\n    }\n}\n\nextension String {\n    func toArray() throws -> [Any] {\n        guard let stringData = data(using: .utf16, allowLossyConversion: false) else { return [] }\n        guard let array = try JSONSerialization.jsonObject(with: stringData, options: .mutableContainers) as? [Any] else {\n             throw JSONError.notArray\n        }\n\n        return array\n    }\n\n    func toNSDictionary() throws -> NSDictionary {\n        guard let binData = data(using: .utf16, allowLossyConversion: false) else { return [:] }\n        guard let json = try JSONSerialization.jsonObject(with: binData, options: .allowFragments) as? NSDictionary else {\n            throw JSONError.notNSDictionary\n        }\n\n        return json\n    }\n\n    func urlEncode() -> String? {\n        return addingPercentEncoding(withAllowedCharacters: .allowedURLCharacterSet)\n    }\n}\n"
  },
  {
    "path": "ArcBit/External/socket.io-client-swift-10.0.0/Source/SocketIOClient.swift",
    "content": "//\n//  SocketIOClient.swift\n//  Socket.IO-Client-Swift\n//\n//  Created by Erik Little on 11/23/14.\n//\n//  Permission is hereby granted, free of charge, to any person obtaining a copy\n//  of this software and associated documentation files (the \"Software\"), to deal\n//  in the Software without restriction, including without limitation the rights\n//  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n//  copies of the Software, and to permit persons to whom the Software is\n//  furnished to do so, subject to the following conditions:\n//\n//  The above copyright notice and this permission notice shall be included in\n//  all copies or substantial portions of the Software.\n//\n//  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n//  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n//  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n//  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n//  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n//  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n//  THE SOFTWARE.\n\nimport Dispatch\nimport Foundation\n\n/// The main class for SocketIOClientSwift.\n///\n/// Represents a socket.io-client. Most interaction with socket.io will be through this class.\nopen class SocketIOClient : NSObject, SocketIOClientSpec, SocketEngineClient, SocketParsable {\n    // MARK: Properties\n\n    /// The URL of the socket.io server. This is set in the initializer.\n    public let socketURL: URL\n\n    /// The engine for this client.\n    public private(set) var engine: SocketEngineSpec?\n\n    /// The status of this client.\n    public private(set) var status = SocketIOClientStatus.notConnected {\n        didSet {\n            switch status {\n            case .connected:\n                reconnecting = false\n                currentReconnectAttempt = 0\n            default:\n                break\n            }\n\n            handleClientEvent(.statusChange, data: [status])\n        }\n    }\n\n    /// If `true` then every time `connect` is called, a new engine will be created.\n    public var forceNew = false\n\n    /// The queue that all interaction with the client should occur on. This is the queue that event handlers are\n    /// called on.\n    public var handleQueue = DispatchQueue.main\n\n    /// The namespace for this client.\n    public var nsp = \"/\"\n\n    /// The configuration for this client.\n    public var config: SocketIOClientConfiguration\n\n    /// If `true`, this client will try and reconnect on any disconnects.\n    public var reconnects = true\n\n    /// The number of seconds to wait before attempting to reconnect.\n    public var reconnectWait = 10\n\n    /// The session id of this client.\n    public var sid: String? {\n        return engine?.sid\n    }\n\n    private let logType = \"SocketIOClient\"\n\n    private var anyHandler: ((SocketAnyEvent) -> Void)?\n    private var currentReconnectAttempt = 0\n    private var handlers = [SocketEventHandler]()\n    private var reconnecting = false\n\n    private(set) var currentAck = -1\n    private(set) var reconnectAttempts = -1\n\n    var ackHandlers = SocketAckManager()\n    var waitingPackets = [SocketPacket]()\n\n    // MARK: Initializers\n\n    /// Type safe way to create a new SocketIOClient. `opts` can be omitted.\n    ///\n    /// - parameter socketURL: The url of the socket.io server.\n    /// - parameter config: The config for this socket.\n    public init(socketURL: URL, config: SocketIOClientConfiguration = []) {\n        self.config = config\n        self.socketURL = socketURL\n\n        if socketURL.absoluteString.hasPrefix(\"https://\") {\n            self.config.insert(.secure(true))\n        }\n\n        for option in config {\n            switch option {\n            case let .reconnects(reconnects):\n                self.reconnects = reconnects\n            case let .reconnectAttempts(attempts):\n                reconnectAttempts = attempts\n            case let .reconnectWait(wait):\n                reconnectWait = abs(wait)\n            case let .nsp(nsp):\n                self.nsp = nsp\n            case let .log(log):\n                DefaultSocketLogger.Logger.log = log\n            case let .logger(logger):\n                DefaultSocketLogger.Logger = logger\n            case let .handleQueue(queue):\n                handleQueue = queue\n            case let .forceNew(force):\n                forceNew = force\n            default:\n                continue\n            }\n        }\n\n        self.config.insert(.path(\"/socket.io/\"), replacing: false)\n\n        super.init()\n    }\n\n    /// Not so type safe way to create a SocketIOClient, meant for Objective-C compatiblity.\n    /// If using Swift it's recommended to use `init(socketURL: NSURL, options: Set<SocketIOClientOption>)`\n    ///\n    /// - parameter socketURL: The url of the socket.io server.\n    /// - parameter config: The config for this socket.\n    public convenience init(socketURL: NSURL, config: NSDictionary?) {\n        self.init(socketURL: socketURL as URL, config: config?.toSocketConfiguration() ?? [])\n    }\n\n    deinit {\n        DefaultSocketLogger.Logger.log(\"Client is being released\", type: logType)\n        engine?.disconnect(reason: \"Client Deinit\")\n    }\n\n    // MARK: Methods\n\n    private func addEngine() -> SocketEngineSpec {\n        DefaultSocketLogger.Logger.log(\"Adding engine\", type: logType, args: \"\")\n\n        engine?.client = nil\n        engine = SocketEngine(client: self, url: socketURL, config: config)\n\n        return engine!\n    }\n\n    /// Connect to the server.\n    open func connect() {\n        connect(timeoutAfter: 0, withHandler: nil)\n    }\n\n    /// Connect to the server. If we aren't connected after `timeoutAfter` seconds, then `withHandler` is called.\n    ///\n    /// - parameter timeoutAfter: The number of seconds after which if we are not connected we assume the connection\n    ///                           has failed. Pass 0 to never timeout.\n    /// - parameter withHandler: The handler to call when the client fails to connect.\n    open func connect(timeoutAfter: Int, withHandler handler: (() -> Void)?) {\n        assert(timeoutAfter >= 0, \"Invalid timeout: \\(timeoutAfter)\")\n\n        guard status != .connected else {\n            DefaultSocketLogger.Logger.log(\"Tried connecting on an already connected socket\", type: logType)\n            return\n        }\n\n        status = .connecting\n\n        if engine == nil || forceNew {\n            addEngine().connect()\n        } else {\n            engine?.connect()\n        }\n\n        guard timeoutAfter != 0 else { return }\n\n        handleQueue.asyncAfter(deadline: DispatchTime.now() + Double(timeoutAfter)) {[weak self] in\n            guard let this = self, this.status == .connecting || this.status == .notConnected else { return }\n\n            this.status = .disconnected\n            this.engine?.disconnect(reason: \"Connect timeout\")\n\n            handler?()\n        }\n    }\n\n    private func createOnAck(_ items: [Any]) -> OnAckCallback {\n        currentAck += 1\n\n        return OnAckCallback(ackNumber: currentAck, items: items, socket: self)\n    }\n\n    func didConnect() {\n        DefaultSocketLogger.Logger.log(\"Socket connected\", type: logType)\n\n        status = .connected\n\n        handleClientEvent(.connect, data: [])\n    }\n\n    func didDisconnect(reason: String) {\n        guard status != .disconnected else { return }\n\n        DefaultSocketLogger.Logger.log(\"Disconnected: %@\", type: logType, args: reason)\n\n        reconnecting = false\n        status = .disconnected\n\n        // Make sure the engine is actually dead.\n        engine?.disconnect(reason: reason)\n        handleClientEvent(.disconnect, data: [reason])\n    }\n\n    /// Disconnects the socket.\n    open func disconnect() {\n        DefaultSocketLogger.Logger.log(\"Closing socket\", type: logType)\n\n        didDisconnect(reason: \"Disconnect\")\n    }\n\n    /// Send an event to the server, with optional data items.\n    ///\n    /// If an error occurs trying to transform `items` into their socket representation, a `SocketClientEvent.error`\n    /// will be emitted. The structure of the error data is `[eventName, items, theError]`\n    ///\n    /// - parameter event: The event to send.\n    /// - parameter items: The items to send with this event. May be left out.\n    open func emit(_ event: String, _ items: SocketData...) {\n        do {\n            try emit(event, with: items.map({ try $0.socketRepresentation() }))\n        } catch let err {\n            DefaultSocketLogger.Logger.error(\"Error creating socketRepresentation for emit: \\(event), \\(items)\",\n                                             type: logType)\n\n            handleClientEvent(.error, data: [event, items, err])\n        }\n    }\n\n    /// Same as emit, but meant for Objective-C\n    ///\n    /// - parameter event: The event to send.\n    /// - parameter with: The items to send with this event. May be left out.\n    open func emit(_ event: String, with items: [Any]) {\n        guard status == .connected else {\n            handleClientEvent(.error, data: [\"Tried emitting \\(event) when not connected\"])\n            return\n        }\n\n        _emit([event] + items)\n    }\n\n    /// Sends a message to the server, requesting an ack.\n    ///\n    /// **NOTE**: It is up to the server send an ack back, just calling this method does not mean the server will ack.\n    /// Check that your server's api will ack the event being sent.\n    ///\n    /// If an error occurs trying to transform `items` into their socket representation, a `SocketClientEvent.error`\n    /// will be emitted. The structure of the error data is `[eventName, items, theError]`\n    ///\n    /// Example:\n    ///\n    /// ```swift\n    /// socket.emitWithAck(\"myEvent\", 1).timingOut(after: 1) {data in\n    ///     ...\n    /// }\n    /// ```\n    ///\n    /// - parameter event: The event to send.\n    /// - parameter items: The items to send with this event. May be left out.\n    /// - returns: An `OnAckCallback`. You must call the `timingOut(after:)` method before the event will be sent.\n    open func emitWithAck(_ event: String, _ items: SocketData...) -> OnAckCallback {\n        do {\n            return emitWithAck(event, with: try items.map({ try $0.socketRepresentation() }))\n        } catch let err {\n            DefaultSocketLogger.Logger.error(\"Error creating socketRepresentation for emit: \\(event), \\(items)\",\n                                             type: logType)\n\n            handleClientEvent(.error, data: [event, items, err])\n\n            return OnAckCallback(ackNumber: -1, items: [], socket: self)\n        }\n    }\n\n    /// Same as emitWithAck, but for Objective-C\n    ///\n    /// **NOTE**: It is up to the server send an ack back, just calling this method does not mean the server will ack.\n    /// Check that your server's api will ack the event being sent.\n    ///\n    /// Example:\n    ///\n    /// ```swift\n    /// socket.emitWithAck(\"myEvent\", with: [1]).timingOut(after: 1) {data in\n    ///     ...\n    /// }\n    /// ```\n    ///\n    /// - parameter event: The event to send.\n    /// - parameter with: The items to send with this event. Use `[]` to send nothing.\n    /// - returns: An `OnAckCallback`. You must call the `timingOut(after:)` method before the event will be sent.\n    open func emitWithAck(_ event: String, with items: [Any]) -> OnAckCallback {\n        return createOnAck([event] + items)\n    }\n\n    func _emit(_ data: [Any], ack: Int? = nil) {\n        guard status == .connected else {\n            handleClientEvent(.error, data: [\"Tried emitting when not connected\"])\n            return\n        }\n\n        let packet = SocketPacket.packetFromEmit(data, id: ack ?? -1, nsp: nsp, ack: false)\n        let str = packet.packetString\n\n        DefaultSocketLogger.Logger.log(\"Emitting: %@\", type: logType, args: str)\n\n        engine?.send(str, withData: packet.binary)\n    }\n\n    // If the server wants to know that the client received data\n    func emitAck(_ ack: Int, with items: [Any]) {\n        guard status == .connected else { return }\n\n        let packet = SocketPacket.packetFromEmit(items, id: ack, nsp: nsp, ack: true)\n        let str = packet.packetString\n\n        DefaultSocketLogger.Logger.log(\"Emitting Ack: %@\", type: logType, args: str)\n\n        engine?.send(str, withData: packet.binary)\n    }\n\n    /// Called when the engine closes.\n    ///\n    /// - parameter reason: The reason that the engine closed.\n    open func engineDidClose(reason: String) {\n        handleQueue.async {\n            self._engineDidClose(reason: reason)\n        }\n    }\n\n    private func _engineDidClose(reason: String) {\n        waitingPackets.removeAll()\n\n        if status != .disconnected {\n            status = .notConnected\n        }\n\n        if status == .disconnected || !reconnects {\n            didDisconnect(reason: reason)\n        } else if !reconnecting {\n            reconnecting = true\n            tryReconnect(reason: reason)\n        }\n    }\n\n    /// Called when the engine errors.\n    ///\n    /// - parameter reason: The reason the engine errored.\n    open func engineDidError(reason: String) {\n        handleQueue.async {\n            self._engineDidError(reason: reason)\n        }\n    }\n\n    private func _engineDidError(reason: String) {\n        DefaultSocketLogger.Logger.error(\"%@\", type: logType, args: reason)\n\n        handleClientEvent(.error, data: [reason])\n    }\n\n    /// Called when the engine opens.\n    ///\n    /// - parameter reason: The reason the engine opened.\n    open func engineDidOpen(reason: String) {\n        DefaultSocketLogger.Logger.log(reason, type: \"SocketEngineClient\")\n    }\n\n    // Called when the socket gets an ack for something it sent\n    func handleAck(_ ack: Int, data: [Any]) {\n        guard status == .connected else { return }\n\n        DefaultSocketLogger.Logger.log(\"Handling ack: %@ with data: %@\", type: logType, args: ack, data)\n\n        ackHandlers.executeAck(ack, with: data, onQueue: handleQueue)\n    }\n\n    /// Causes an event to be handled, and any event handlers for that event to be called.\n    ///\n    /// - parameter event: The event that is to be handled.\n    /// - parameter data: the data associated with this event.\n    /// - parameter isInternalMessage: If `true` event handlers for this event will be called regardless of status.\n    /// - parameter withAck: The ack number for this event. May be left out.\n    open func handleEvent(_ event: String, data: [Any], isInternalMessage: Bool, withAck ack: Int = -1) {\n        guard status == .connected || isInternalMessage else { return }\n\n        DefaultSocketLogger.Logger.log(\"Handling event: %@ with data: %@\", type: logType, args: event, data)\n\n        anyHandler?(SocketAnyEvent(event: event, items: data))\n\n        for handler in handlers where handler.event == event {\n            handler.executeCallback(with: data, withAck: ack, withSocket: self)\n        }\n    }\n\n    func handleClientEvent(_ event: SocketClientEvent, data: [Any]) {\n        handleEvent(event.rawValue, data: data, isInternalMessage: true)\n    }\n\n    /// Leaves nsp and goes back to the default namespace.\n    open func leaveNamespace() {\n        if nsp != \"/\" {\n            engine?.send(\"1\\(nsp)\", withData: [])\n            nsp = \"/\"\n        }\n    }\n\n    /// Joins `namespace`.\n    ///\n    /// **Do not use this to join the default namespace.** Instead call `leaveNamespace`.\n    ///\n    /// - parameter namespace: The namespace to join.\n    open func joinNamespace(_ namespace: String) {\n        nsp = namespace\n\n        if nsp != \"/\" {\n            DefaultSocketLogger.Logger.log(\"Joining namespace\", type: logType)\n            engine?.send(\"0\\(nsp)\", withData: [])\n        }\n    }\n\n    /// Removes handler(s) based on an event name.\n    ///\n    /// If you wish to remove a specific event, call the `off(id:)` with the UUID received from its `on` call.\n    ///\n    /// - parameter event: The event to remove handlers for.\n    open func off(_ event: String) {\n        DefaultSocketLogger.Logger.log(\"Removing handler for event: %@\", type: logType, args: event)\n\n        handlers = handlers.filter({ $0.event != event })\n    }\n\n    /// Removes a handler with the specified UUID gotten from an `on` or `once`\n    ///\n    /// If you want to remove all events for an event, call the off `off(_:)` method with the event name.\n    ///\n    /// - parameter id: The UUID of the handler you wish to remove.\n    open func off(id: UUID) {\n        DefaultSocketLogger.Logger.log(\"Removing handler with id: %@\", type: logType, args: id)\n\n        handlers = handlers.filter({ $0.id != id })\n    }\n\n    /// Adds a handler for an event.\n    ///\n    /// - parameter event: The event name for this handler.\n    /// - parameter callback: The callback that will execute when this event is received.\n    /// - returns: A unique id for the handler that can be used to remove it.\n    @discardableResult\n    open func on(_ event: String, callback: @escaping NormalCallback) -> UUID {\n        DefaultSocketLogger.Logger.log(\"Adding handler for event: %@\", type: logType, args: event)\n\n        let handler = SocketEventHandler(event: event, id: UUID(), callback: callback)\n        handlers.append(handler)\n\n        return handler.id\n    }\n\n    /// Adds a handler for a client event.\n    ///\n    /// Example:\n    ///\n    /// ```swift\n    /// socket.on(clientEvent: .connect) {data, ack in\n    ///     ...\n    /// }\n    /// ```\n    ///\n    /// - parameter event: The event for this handler.\n    /// - parameter callback: The callback that will execute when this event is received.\n    /// - returns: A unique id for the handler that can be used to remove it.\n    @discardableResult\n    open func on(clientEvent event: SocketClientEvent, callback: @escaping NormalCallback) -> UUID {\n        DefaultSocketLogger.Logger.log(\"Adding handler for event: %@\", type: logType, args: event)\n\n        let handler = SocketEventHandler(event: event.rawValue, id: UUID(), callback: callback)\n        handlers.append(handler)\n\n        return handler.id\n    }\n\n\n    /// Adds a single-use handler for an event.\n    ///\n    /// - parameter event: The event name for this handler.\n    /// - parameter callback: The callback that will execute when this event is received.\n    /// - returns: A unique id for the handler that can be used to remove it.\n    @discardableResult\n    open func once(_ event: String, callback: @escaping NormalCallback) -> UUID {\n        DefaultSocketLogger.Logger.log(\"Adding once handler for event: %@\", type: logType, args: event)\n\n        let id = UUID()\n\n        let handler = SocketEventHandler(event: event, id: id) {[weak self] data, ack in\n            guard let this = self else { return }\n            this.off(id: id)\n            callback(data, ack)\n        }\n\n        handlers.append(handler)\n\n        return handler.id\n    }\n\n    /// Adds a handler that will be called on every event.\n    ///\n    /// - parameter handler: The callback that will execute whenever an event is received.\n    open func onAny(_ handler: @escaping (SocketAnyEvent) -> Void) {\n        anyHandler = handler\n    }\n\n    /// Called when the engine has a message that must be parsed.\n    ///\n    /// - parameter msg: The message that needs parsing.\n    public func parseEngineMessage(_ msg: String) {\n        DefaultSocketLogger.Logger.log(\"Should parse message: %@\", type: \"SocketIOClient\", args: msg)\n\n        handleQueue.async { self.parseSocketMessage(msg) }\n    }\n\n    /// Called when the engine receives binary data.\n    ///\n    /// - parameter data: The data the engine received.\n    public func parseEngineBinaryData(_ data: Data) {\n        handleQueue.async { self.parseBinaryData(data) }\n    }\n\n    /// Tries to reconnect to the server.\n    ///\n    /// This will cause a `disconnect` event to be emitted, as well as an `reconnectAttempt` event.\n    open func reconnect() {\n        guard !reconnecting else { return }\n\n        engine?.disconnect(reason: \"manual reconnect\")\n    }\n\n    /// Removes all handlers.\n    /// Can be used after disconnecting to break any potential remaining retain cycles.\n    open func removeAllHandlers() {\n        handlers.removeAll(keepingCapacity: false)\n    }\n\n    private func tryReconnect(reason: String) {\n        guard reconnecting else { return }\n\n        DefaultSocketLogger.Logger.log(\"Starting reconnect\", type: logType)\n        handleClientEvent(.reconnect, data: [reason])\n\n        _tryReconnect()\n    }\n\n    private func _tryReconnect() {\n        guard reconnects && reconnecting && status != .disconnected else { return }\n\n        if reconnectAttempts != -1 && currentReconnectAttempt + 1 > reconnectAttempts {\n            return didDisconnect(reason: \"Reconnect Failed\")\n        }\n\n        DefaultSocketLogger.Logger.log(\"Trying to reconnect\", type: logType)\n        handleClientEvent(.reconnectAttempt, data: [(reconnectAttempts - currentReconnectAttempt)])\n\n        currentReconnectAttempt += 1\n        connect()\n\n        handleQueue.asyncAfter(deadline: DispatchTime.now() + Double(reconnectWait), execute: _tryReconnect)\n    }\n\n    // Test properties\n\n    var testHandlers: [SocketEventHandler] {\n        return handlers\n    }\n\n    func setTestable() {\n        status = .connected\n    }\n\n    func setTestStatus(_ status: SocketIOClientStatus) {\n        self.status = status\n    }\n\n    func setTestEngine(_ engine: SocketEngineSpec?) {\n        self.engine = engine\n    }\n\n    func emitTest(event: String, _ data: Any...) {\n        _emit([event] + data)\n    }\n}\n"
  },
  {
    "path": "ArcBit/External/socket.io-client-swift-10.0.0/Source/SocketIOClientConfiguration.swift",
    "content": "//\n//  SocketIOClientConfiguration.swift\n//  Socket.IO-Client-Swift\n//\n//  Created by Erik Little on 8/13/16.\n//\n//  Permission is hereby granted, free of charge, to any person obtaining a copy\n//  of this software and associated documentation files (the \"Software\"), to deal\n//  in the Software without restriction, including without limitation the rights\n//  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n//  copies of the Software, and to permit persons to whom the Software is\n//  furnished to do so, subject to the following conditions:\n//\n//  The above copyright notice and this permission notice shall be included in\n//  all copies or substantial portions of the Software.\n//\n//  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n//  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n//  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n//  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n//  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n//  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n//  THE SOFTWARE.\n\n/// An array-like type that holds `SocketIOClientOption`s\npublic struct SocketIOClientConfiguration : ExpressibleByArrayLiteral, Collection, MutableCollection {\n    // MARK: Typealiases\n\n    /// Type of element stored.\n    public typealias Element = SocketIOClientOption\n\n    /// Index type.\n    public typealias Index = Array<SocketIOClientOption>.Index\n\n    /// Iterator type.\n    public typealias Iterator = Array<SocketIOClientOption>.Iterator\n\n    /// SubSequence type.\n    public typealias SubSequence =  Array<SocketIOClientOption>.SubSequence\n\n    // MARK: Properties\n\n    private var backingArray = [SocketIOClientOption]()\n\n    /// The start index of this collection.\n    public var startIndex: Index {\n        return backingArray.startIndex\n    }\n\n    /// The end index of this collection.\n    public var endIndex: Index {\n        return backingArray.endIndex\n    }\n\n    /// Whether this collection is empty.\n    public var isEmpty: Bool {\n        return backingArray.isEmpty\n    }\n\n    /// The number of elements stored in this collection.\n    public var count: Index.Stride {\n        return backingArray.count\n    }\n\n    /// The first element in this collection.\n    public var first: Element? {\n        return backingArray.first\n    }\n\n    public subscript(position: Index) -> Element {\n        get {\n            return backingArray[position]\n        }\n\n        set {\n            backingArray[position] = newValue\n        }\n    }\n\n    public subscript(bounds: Range<Index>) -> SubSequence {\n        get {\n            return backingArray[bounds]\n        }\n\n        set {\n            backingArray[bounds] = newValue\n        }\n    }\n\n    // MARK: Initializers\n\n    /// Creates a new `SocketIOClientConfiguration` from an array literal.\n    ///\n    /// - parameter arrayLiteral: The elements.\n    public init(arrayLiteral elements: Element...) {\n        backingArray = elements\n    }\n\n    // MARK: Methods\n\n    /// Creates an iterator for this collection.\n    ///\n    /// - returns: An iterator over this collection.\n    public func makeIterator() -> Iterator {\n        return backingArray.makeIterator()\n    }\n\n    /// - returns: The index after index.\n    public func index(after i: Index) -> Index {\n        return backingArray.index(after: i)\n    }\n\n    /// Special method that inserts `element` into the collection, replacing any other instances of `element`.\n    ///\n    /// - parameter element: The element to insert.\n    /// - parameter replacing: Whether to replace any occurrences of element to the new item. Default is `true`.\n    public mutating func insert(_ element: Element, replacing replace: Bool = true) {\n        for i in 0..<backingArray.count where backingArray[i] == element {\n            guard replace else { return }\n\n            backingArray[i] = element\n\n            return\n        }\n\n        backingArray.append(element)\n    }\n\n}\n"
  },
  {
    "path": "ArcBit/External/socket.io-client-swift-10.0.0/Source/SocketIOClientOption.swift",
    "content": "//\n//  SocketIOClientOption .swift\n//  Socket.IO-Client-Swift\n//\n//  Created by Erik Little on 10/17/15.\n//\n//  Permission is hereby granted, free of charge, to any person obtaining a copy\n//  of this software and associated documentation files (the \"Software\"), to deal\n//  in the Software without restriction, including without limitation the rights\n//  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n//  copies of the Software, and to permit persons to whom the Software is\n//  furnished to do so, subject to the following conditions:\n//\n//  The above copyright notice and this permission notice shall be included in\n//  all copies or substantial portions of the Software.\n//\n//  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n//  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n//  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n//  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n//  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n//  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n//  THE SOFTWARE.\n\nimport Foundation\n\nprotocol ClientOption : CustomStringConvertible, Equatable {\n    func getSocketIOOptionValue() -> Any\n}\n\n/// The options for a client.\npublic enum SocketIOClientOption : ClientOption {\n    /// A dictionary of GET parameters that will be included in the connect url.\n    case connectParams([String: Any])\n\n    /// An array of cookies that will be sent during the initial connection.\n    case cookies([HTTPCookie])\n\n    /// Deprecated\n    @available(*, deprecated, message: \"No longer needed in socket.io 2.0+\")\n    case doubleEncodeUTF8(Bool)\n\n    /// Any extra HTTP headers that should be sent during the initial connection.\n    case extraHeaders([String: String])\n\n    /// If passed `true`, will cause the client to always create a new engine. Useful for debugging,\n    /// or when you want to be sure no state from previous engines is being carried over.\n    case forceNew(Bool)\n\n    /// If passed `true`, the only transport that will be used will be HTTP long-polling.\n    case forcePolling(Bool)\n\n    /// If passed `true`, the only transport that will be used will be WebSockets.\n    case forceWebsockets(Bool)\n\n    /// The queue that all interaction with the client should occur on. This is the queue that event handlers are\n    /// called on.\n    case handleQueue(DispatchQueue)\n\n    /// If passed `true`, the client will log debug information. This should be turned off in production code.\n    case log(Bool)\n\n    /// Used to pass in a custom logger.\n    case logger(SocketLogger)\n\n    /// The namespace that this client should connect to. Can be changed during use using the `joinNamespace`\n    /// and `leaveNamespace` methods on `SocketIOClient`.\n    case nsp(String)\n\n    /// A custom path to socket.io. Only use this if the socket.io server is configured to look for this path.\n    case path(String)\n\n    /// If passed `false`, the client will not reconnect when it loses connection. Useful if you want full control\n    /// over when reconnects happen.\n    case reconnects(Bool)\n\n    /// The number of times to try and reconnect before giving up. Pass `-1` to [never give up](https://www.youtube.com/watch?v=dQw4w9WgXcQ).\n    case reconnectAttempts(Int)\n\n    /// The number of seconds to wait before reconnect attempts.\n    case reconnectWait(Int)\n\n    /// Set `true` if your server is using secure transports.\n    case secure(Bool)\n\n    /// Allows you to set which certs are valid. Useful for SSL pinning.\n    case security(SSLSecurity)\n\n    /// If you're using a self-signed set. Only use for development.\n    case selfSigned(Bool)\n\n    /// Sets an NSURLSessionDelegate for the underlying engine. Useful if you need to handle self-signed certs.\n    case sessionDelegate(URLSessionDelegate)\n\n    /// If passed `true`, the WebSocket transport will try and use voip logic to keep network connections open in\n    /// the background. **This option is experimental as socket.io shouldn't be used for background communication.**\n    case voipEnabled(Bool)\n\n    // MARK: Properties\n\n    /// The description of this option.\n    public var description: String {\n        let description: String\n\n        switch self {\n        case .connectParams:\n            description = \"connectParams\"\n        case .cookies:\n            description = \"cookies\"\n        case .doubleEncodeUTF8:\n            description = \"doubleEncodeUTF8\"\n        case .extraHeaders:\n            description = \"extraHeaders\"\n        case .forceNew:\n            description = \"forceNew\"\n        case .forcePolling:\n            description = \"forcePolling\"\n        case .forceWebsockets:\n            description = \"forceWebsockets\"\n        case .handleQueue:\n            description = \"handleQueue\"\n        case .log:\n            description = \"log\"\n        case .logger:\n            description = \"logger\"\n        case .nsp:\n            description = \"nsp\"\n        case .path:\n            description = \"path\"\n        case .reconnects:\n            description = \"reconnects\"\n        case .reconnectAttempts:\n            description = \"reconnectAttempts\"\n        case .reconnectWait:\n            description = \"reconnectWait\"\n        case .secure:\n            description = \"secure\"\n        case .selfSigned:\n            description = \"selfSigned\"\n        case .security:\n            description = \"security\"\n        case .sessionDelegate:\n            description = \"sessionDelegate\"\n        case .voipEnabled:\n            description = \"voipEnabled\"\n        }\n\n        return description\n    }\n\n    func getSocketIOOptionValue() -> Any {\n        let value: Any\n\n        switch self {\n        case let .connectParams(params):\n            value = params\n        case let .cookies(cookies):\n            value = cookies\n        case let .doubleEncodeUTF8(encode):\n            value = encode\n        case let .extraHeaders(headers):\n            value = headers\n        case let .forceNew(force):\n            value = force\n        case let .forcePolling(force):\n            value = force\n        case let .forceWebsockets(force):\n            value = force\n        case let .handleQueue(queue):\n            value = queue\n        case let .log(log):\n            value = log\n        case let .logger(logger):\n            value = logger\n        case let .nsp(nsp):\n            value = nsp\n        case let .path(path):\n            value = path\n        case let .reconnects(reconnects):\n            value = reconnects\n        case let .reconnectAttempts(attempts):\n            value = attempts\n        case let .reconnectWait(wait):\n            value = wait\n        case let .secure(secure):\n            value = secure\n        case let .security(security):\n            value = security\n        case let .selfSigned(signed):\n            value = signed\n        case let .sessionDelegate(delegate):\n            value = delegate\n        case let .voipEnabled(enabled):\n            value = enabled\n        }\n\n        return value\n    }\n\n    // MARK: Operators\n\n    /// Compares whether two options are the same.\n    ///\n    /// - parameter lhs: Left operand to compare.\n    /// - parameter rhs: Right operand to compare.\n    /// - returns: `true` if the two are the same option.\n    public static func ==(lhs: SocketIOClientOption, rhs: SocketIOClientOption) -> Bool {\n        return lhs.description == rhs.description\n    }\n\n}\n"
  },
  {
    "path": "ArcBit/External/socket.io-client-swift-10.0.0/Source/SocketIOClientSpec.swift",
    "content": "//\n//  SocketIOClientSpec.swift\n//  Socket.IO-Client-Swift\n//\n//  Created by Erik Little on 1/3/16.\n//\n//  Permission is hereby granted, free of charge, to any person obtaining a copy\n//  of this software and associated documentation files (the \"Software\"), to deal\n//  in the Software without restriction, including without limitation the rights\n//  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n//  copies of the Software, and to permit persons to whom the Software is\n//  furnished to do so, subject to the following conditions:\n//\n//  The above copyright notice and this permission notice shall be included in\n//  all copies or substantial portions of the Software.\n//\n//  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n//  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n//  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n//  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n//  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n//  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n//  THE SOFTWARE.\n\nimport Dispatch\n\nprotocol SocketIOClientSpec : class {\n    var handleQueue: DispatchQueue { get set }\n    var nsp: String { get set }\n    var waitingPackets: [SocketPacket] { get set }\n\n    func didConnect()\n    func didDisconnect(reason: String)\n    func didError(reason: String)\n    func handleAck(_ ack: Int, data: [Any])\n    func handleEvent(_ event: String, data: [Any], isInternalMessage: Bool, withAck ack: Int)\n    func handleClientEvent(_ event: SocketClientEvent, data: [Any])\n    func joinNamespace(_ namespace: String)\n}\n\nextension SocketIOClientSpec {\n    func didError(reason: String) {\n        DefaultSocketLogger.Logger.error(\"%@\", type: \"SocketIOClient\", args: reason)\n\n        handleClientEvent(.error, data: [reason])\n    }\n}\n\n/// The set of events that are generated by the client.\npublic enum SocketClientEvent : String {\n    /// Emitted when the client connects. This is also called on a successful reconnection.\n    case connect\n\n    /// Called when the socket has disconnected and will not attempt to try to reconnect.\n    case disconnect\n\n    /// Called when an error occurs.\n    case error\n\n    /// Called when the client begins the reconnection process.\n    case reconnect\n\n    /// Called each time the client tries to reconnect to the server.\n    case reconnectAttempt\n\n    /// Called every time there is a change in the client's status.\n    case statusChange\n}\n"
  },
  {
    "path": "ArcBit/External/socket.io-client-swift-10.0.0/Source/SocketIOClientStatus.swift",
    "content": "//\n//  SocketIOClientStatus.swift\n//  Socket.IO-Client-Swift\n//\n//  Created by Erik Little on 8/14/15.\n//\n//  Permission is hereby granted, free of charge, to any person obtaining a copy\n//  of this software and associated documentation files (the \"Software\"), to deal\n//  in the Software without restriction, including without limitation the rights\n//  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n//  copies of the Software, and to permit persons to whom the Software is\n//  furnished to do so, subject to the following conditions:\n//\n//  The above copyright notice and this permission notice shall be included in\n//  all copies or substantial portions of the Software.\n//\n//  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n//  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n//  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n//  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n//  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n//  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n//  THE SOFTWARE.\n\nimport Foundation\n\n/// Represents the state of the client.\n@objc public enum SocketIOClientStatus : Int {\n    /// The client has never been connected. Or the client has been reset.\n    case notConnected\n\n    /// The client was once connected, but not anymore.\n    case disconnected\n\n    /// The client is in the process of connecting.\n    case connecting\n\n    /// The client is currently connected.\n    case connected\n}\n"
  },
  {
    "path": "ArcBit/External/socket.io-client-swift-10.0.0/Source/SocketLogger.swift",
    "content": "//\n//  SocketLogger.swift\n//  Socket.IO-Client-Swift\n//\n//  Created by Erik Little on 4/11/15.\n//\n//  Permission is hereby granted, free of charge, to any person obtaining a copy\n//  of this software and associated documentation files (the \"Software\"), to deal\n//  in the Software without restriction, including without limitation the rights\n//  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n//  copies of the Software, and to permit persons to whom the Software is\n//  furnished to do so, subject to the following conditions:\n//\n//  The above copyright notice and this permission notice shall be included in\n//  all copies or substantial portions of the Software.\n//\n//  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n//  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n//  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n//  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n//  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n//  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n//  THE SOFTWARE.\n\nimport Foundation\n\n/// Represents a class will log client events.\npublic protocol SocketLogger : class {\n    // MARK: Properties\n\n    /// Whether to log or not\n    var log: Bool { get set }\n\n    // MARK: Methods\n\n    /// Normal log messages\n    ///\n    /// - parameter message: The message being logged. Can include `%@` that will be replaced with `args`\n    /// - parameter type: The type of entity that called for logging.\n    /// - parameter args: Any args that should be inserted into the message. May be left out.\n    func log(_ message: String, type: String, args: Any...)\n\n    /// Error Messages\n    ///\n    /// - parameter message: The message being logged. Can include `%@` that will be replaced with `args`\n    /// - parameter type: The type of entity that called for logging.\n    /// - parameter args: Any args that should be inserted into the message. May be left out.\n    func error(_ message: String, type: String, args: Any...)\n}\n\npublic extension SocketLogger {\n    /// Default implementation.\n    func log(_ message: String, type: String, args: Any...) {\n        abstractLog(\"LOG\", message: message, type: type, args: args)\n    }\n\n    /// Default implementation.\n    func error(_ message: String, type: String, args: Any...) {\n        abstractLog(\"ERROR\", message: message, type: type, args: args)\n    }\n\n    private func abstractLog(_ logType: String, message: String, type: String, args: [Any]) {\n        guard log else { return }\n\n        let newArgs = args.map({arg -> CVarArg in String(describing: arg)})\n        let messageFormat = String(format: message, arguments: newArgs)\n\n        NSLog(\"\\(logType) \\(type): %@\", messageFormat)\n    }\n}\n\nclass DefaultSocketLogger : SocketLogger {\n    static var Logger: SocketLogger = DefaultSocketLogger()\n\n    var log = false\n}\n"
  },
  {
    "path": "ArcBit/External/socket.io-client-swift-10.0.0/Source/SocketPacket.swift",
    "content": "//\n//  SocketPacket.swift\n//  Socket.IO-Client-Swift\n//\n//  Created by Erik Little on 1/18/15.\n//\n//  Permission is hereby granted, free of charge, to any person obtaining a copy\n//  of this software and associated documentation files (the \"Software\"), to deal\n//  in the Software without restriction, including without limitation the rights\n//  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n//  copies of the Software, and to permit persons to whom the Software is\n//  furnished to do so, subject to the following conditions:\n//\n//  The above copyright notice and this permission notice shall be included in\n//  all copies or substantial portions of the Software.\n//\n//  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n//  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n//  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n//  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n//  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n//  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n//  THE SOFTWARE.\n//\n\nimport Foundation\n\nstruct SocketPacket {\n    enum PacketType: Int {\n        case connect, disconnect, event, ack, error, binaryEvent, binaryAck\n    }\n    \n    private let placeholders: Int\n    \n    private static let logType = \"SocketPacket\"\n\n    let nsp: String\n    let id: Int\n    let type: PacketType\n    \n    var binary: [Data]\n    var data: [Any]\n    var args: [Any] {\n        if type == .event || type == .binaryEvent && data.count != 0 {\n            return Array(data.dropFirst())\n        } else {\n            return data\n        }\n    }\n    \n    var description: String {\n        return \"SocketPacket {type: \\(String(type.rawValue)); data: \" +\n            \"\\(String(describing: data)); id: \\(id); placeholders: \\(placeholders); nsp: \\(nsp)}\"\n    }\n    \n    var event: String {\n        return String(describing: data[0])\n    }\n    \n    var packetString: String {\n        return createPacketString()\n    }\n    \n    init(type: PacketType, data: [Any] = [Any](), id: Int = -1, nsp: String, placeholders: Int = 0,\n         binary: [Data] = [Data]()) {\n        self.data = data\n        self.id = id\n        self.nsp = nsp\n        self.type = type\n        self.placeholders = placeholders\n        self.binary = binary\n    }\n    \n    mutating func addData(_ data: Data) -> Bool {\n        if placeholders == binary.count {\n            return true\n        }\n        \n        binary.append(data)\n        \n        if placeholders == binary.count {\n            fillInPlaceholders()\n            return true\n        } else {\n            return false\n        }\n    }\n    \n    private func completeMessage(_ message: String) -> String {\n        if data.count == 0 {\n            return message + \"[]\"\n        }\n        \n        guard let jsonSend = try? data.toJSON(), let jsonString = String(data: jsonSend, encoding: .utf8) else {\n            DefaultSocketLogger.Logger.error(\"Error creating JSON object in SocketPacket.completeMessage\",\n                                             type: SocketPacket.logType)\n            \n            return message + \"[]\"\n        }\n        \n        return message + jsonString\n    }\n    \n    private func createPacketString() -> String {\n        let typeString = String(type.rawValue)\n        // Binary count?\n        let binaryCountString = typeString + (type == .binaryEvent || type == .binaryAck ? \"\\(String(binary.count))-\" : \"\")\n        // Namespace?\n        let nspString = binaryCountString + (nsp != \"/\" ? \"\\(nsp),\" : \"\")\n        // Ack number?\n        let idString = nspString + (id != -1 ? String(id) : \"\")\n        \n        return completeMessage(idString)\n    }\n    \n    // Called when we have all the binary data for a packet\n    // calls _fillInPlaceholders, which replaces placeholders with the\n    // corresponding binary\n    private mutating func fillInPlaceholders() {\n        data = data.map(_fillInPlaceholders)\n    }\n    \n    // Helper method that looks for placeholders\n    // If object is a collection it will recurse\n    // Returns the object if it is not a placeholder or the corresponding\n    // binary data\n    private func _fillInPlaceholders(_ object: Any) -> Any {\n        switch object {\n        case let dict as JSON:\n            if dict[\"_placeholder\"] as? Bool ?? false {\n                return binary[dict[\"num\"] as! Int]\n            } else {\n                return dict.reduce(JSON(), {cur, keyValue in\n                    var cur = cur\n                    \n                    cur[keyValue.0] = _fillInPlaceholders(keyValue.1)\n                    \n                    return cur\n                })\n            }\n        case let arr as [Any]:\n            return arr.map(_fillInPlaceholders)\n        default:\n            return object\n        }\n    }\n}\n\nextension SocketPacket {\n    private static func findType(_ binCount: Int, ack: Bool) -> PacketType {\n        switch binCount {\n        case 0 where !ack:\n            return .event\n        case 0 where ack:\n            return .ack\n        case _ where !ack:\n            return .binaryEvent\n        case _ where ack:\n            return .binaryAck\n        default:\n            return .error\n        }\n    }\n    \n    static func packetFromEmit(_ items: [Any], id: Int, nsp: String, ack: Bool) -> SocketPacket {\n        let (parsedData, binary) = deconstructData(items)\n        let packet = SocketPacket(type: findType(binary.count, ack: ack), data: parsedData,\n            id: id, nsp: nsp, binary: binary)\n        \n        return packet\n    }\n}\n\nprivate extension SocketPacket {\n    // Recursive function that looks for NSData in collections\n    static func shred(_ data: Any, binary: inout [Data]) -> Any {\n        let placeholder = [\"_placeholder\": true, \"num\": binary.count] as JSON\n        \n        switch data {\n        case let bin as Data:\n            binary.append(bin)\n            \n            return placeholder\n        case let arr as [Any]:\n            return arr.map({shred($0, binary: &binary)})\n        case let dict as JSON:\n            return dict.reduce(JSON(), {cur, keyValue in\n                var mutCur = cur\n                \n                mutCur[keyValue.0] = shred(keyValue.1, binary: &binary)\n                \n                return mutCur\n            })\n        default:\n            return data\n        }\n    }\n    \n    // Removes binary data from emit data\n    // Returns a type containing the de-binaryed data and the binary\n    static func deconstructData(_ data: [Any]) -> ([Any], [Data]) {\n        var binary = [Data]()\n        \n        return (data.map({shred($0, binary: &binary)}), binary)\n    }\n}\n"
  },
  {
    "path": "ArcBit/External/socket.io-client-swift-10.0.0/Source/SocketParsable.swift",
    "content": "//\n//  SocketParsable.swift\n//  Socket.IO-Client-Swift\n//\n//  Permission is hereby granted, free of charge, to any person obtaining a copy\n//  of this software and associated documentation files (the \"Software\"), to deal\n//  in the Software without restriction, including without limitation the rights\n//  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n//  copies of the Software, and to permit persons to whom the Software is\n//  furnished to do so, subject to the following conditions:\n//\n//  The above copyright notice and this permission notice shall be included in\n//  all copies or substantial portions of the Software.\n//\n//  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n//  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n//  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n//  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n//  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n//  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n//  THE SOFTWARE.\n\nimport Foundation\n\nprotocol SocketParsable {\n    func parseBinaryData(_ data: Data)\n    func parseSocketMessage(_ message: String)\n}\n\nextension SocketParsable where Self: SocketIOClientSpec {\n    private func isCorrectNamespace(_ nsp: String) -> Bool {\n        return nsp == self.nsp\n    }\n    \n    private func handleConnect(_ packetNamespace: String) {\n        if packetNamespace == \"/\" && nsp != \"/\" {\n            joinNamespace(nsp)\n        } else {\n            didConnect()\n        }\n    }\n    \n    private func handlePacket(_ pack: SocketPacket) {\n        switch pack.type {\n        case .event where isCorrectNamespace(pack.nsp):\n            handleEvent(pack.event, data: pack.args, isInternalMessage: false, withAck: pack.id)\n        case .ack where isCorrectNamespace(pack.nsp):\n            handleAck(pack.id, data: pack.data)\n        case .binaryEvent where isCorrectNamespace(pack.nsp):\n            waitingPackets.append(pack)\n        case .binaryAck where isCorrectNamespace(pack.nsp):\n            waitingPackets.append(pack)\n        case .connect:\n            handleConnect(pack.nsp)\n        case .disconnect:\n            didDisconnect(reason: \"Got Disconnect\")\n        case .error:\n            handleEvent(\"error\", data: pack.data, isInternalMessage: true, withAck: pack.id)\n        default:\n            DefaultSocketLogger.Logger.log(\"Got invalid packet: %@\", type: \"SocketParser\", args: pack.description)\n        }\n    }\n    \n    /// Parses a messsage from the engine. Returning either a string error or a complete SocketPacket\n    func parseString(_ message: String) -> Either<String, SocketPacket> {\n        var reader = SocketStringReader(message: message)\n        \n\t\tguard let type = Int(reader.read(count: 1)).flatMap({ SocketPacket.PacketType(rawValue: $0) }) else {\n            return .left(\"Invalid packet type\")\n        }\n        \n        if !reader.hasNext {\n            return .right(SocketPacket(type: type, nsp: \"/\"))\n        }\n        \n        var namespace = \"/\"\n        var placeholders = -1\n        \n        if type == .binaryEvent || type == .binaryAck {\n            if let holders = Int(reader.readUntilOccurence(of: \"-\")) {\n                placeholders = holders\n            } else {\n                return .left(\"Invalid packet\")\n            }\n        }\n        \n        if reader.currentCharacter == \"/\" {\n            namespace = reader.readUntilOccurence(of: \",\") \n        }\n        \n        if !reader.hasNext {\n            return .right(SocketPacket(type: type, nsp: namespace, placeholders: placeholders))\n        }\n        \n        var idString = \"\"\n        \n        if type == .error {\n            reader.advance(by: -1)\n        } else {\n            while reader.hasNext {\n                if let int = Int(reader.read(count: 1)) {\n                    idString += String(int)\n                } else {\n                    reader.advance(by: -2)\n                    break\n                }\n            }\n        }\n        \n        var dataArray = String(message.utf16[message.utf16.index(reader.currentIndex, offsetBy: 1)..<message.utf16.endIndex])!\n        \n        if type == .error && !dataArray.hasPrefix(\"[\") && !dataArray.hasSuffix(\"]\") {\n            dataArray = \"[\" + dataArray + \"]\"\n        }\n        \n        switch parseData(dataArray) {\n        case let .left(err):\n            return .left(err)\n        case let .right(data):\n            return .right(SocketPacket(type: type, data: data, id: Int(idString) ?? -1,\n                nsp: namespace, placeholders: placeholders))\n        }\n    }\n    \n    // Parses data for events\n    private func parseData(_ data: String) -> Either<String, [Any]> {\n        do {\n            return .right(try data.toArray())\n        } catch {\n            return .left(\"Error parsing data for packet\")\n        }\n    }\n    \n    // Parses messages recieved\n    func parseSocketMessage(_ message: String) {\n        guard !message.isEmpty else { return }\n        \n        DefaultSocketLogger.Logger.log(\"Parsing %@\", type: \"SocketParser\", args: message)\n        \n        switch parseString(message) {\n        case let .left(err):\n            DefaultSocketLogger.Logger.error(\"\\(err): %@\", type: \"SocketParser\", args: message)\n        case let .right(pack):\n            DefaultSocketLogger.Logger.log(\"Decoded packet as: %@\", type: \"SocketParser\", args: pack.description)\n            handlePacket(pack)\n        }\n    }\n    \n    func parseBinaryData(_ data: Data) {\n        guard !waitingPackets.isEmpty else {\n            DefaultSocketLogger.Logger.error(\"Got data when not remaking packet\", type: \"SocketParser\")\n            return\n        }\n        \n        // Should execute event?\n        guard waitingPackets[waitingPackets.count - 1].addData(data) else { return }\n        \n        let packet = waitingPackets.removeLast()\n        \n        if packet.type != .binaryAck {\n            handleEvent(packet.event, data: packet.args, isInternalMessage: false, withAck: packet.id)\n        } else {\n            handleAck(packet.id, data: packet.args)\n        }\n    }\n}\n"
  },
  {
    "path": "ArcBit/External/socket.io-client-swift-10.0.0/Source/SocketStringReader.swift",
    "content": "//\n//  SocketStringReader.swift\n//  Socket.IO-Client-Swift\n//\n//  Created by Lukas Schmidt on 07.09.15.\n//\n//  Permission is hereby granted, free of charge, to any person obtaining a copy\n//  of this software and associated documentation files (the \"Software\"), to deal\n//  in the Software without restriction, including without limitation the rights\n//  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n//  copies of the Software, and to permit persons to whom the Software is\n//  furnished to do so, subject to the following conditions:\n//\n//  The above copyright notice and this permission notice shall be included in\n//  all copies or substantial portions of the Software.\n//\n//  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n//  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n//  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n//  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n//  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n//  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n//  THE SOFTWARE.\n\nstruct SocketStringReader {\n    let message: String\n    var currentIndex: String.UTF16View.Index\n    var hasNext: Bool {\n        return currentIndex != message.utf16.endIndex\n    }\n\n    var currentCharacter: String {\n        return String(UnicodeScalar(message.utf16[currentIndex])!)\n    }\n\n    init(message: String) {\n        self.message = message\n        currentIndex = message.utf16.startIndex\n    }\n\n    @discardableResult\n    mutating func advance(by: Int) -> String.UTF16View.Index {\n        currentIndex = message.utf16.index(currentIndex, offsetBy: by)\n\n        return currentIndex\n    }\n\n    mutating func read(count: Int) -> String {\n        let readString = String(message.utf16[currentIndex..<message.utf16.index(currentIndex, offsetBy: count)])!\n\n        advance(by: count)\n\n        return readString\n    }\n\n    mutating func readUntilOccurence(of string: String) -> String {\n        let substring = message.utf16[currentIndex..<message.utf16.endIndex]\n\n        guard let foundIndex = substring.index(of: string.utf16.first!) else {\n            currentIndex = message.utf16.endIndex\n\n            return String(substring)!\n        }\n\n        advance(by: substring.distance(from: substring.startIndex, to: foundIndex) + 1)\n\n        return String(substring[substring.startIndex..<foundIndex])!\n    }\n\n    mutating func readUntilEnd() -> String {\n        return read(count: message.utf16.distance(from: currentIndex, to: message.utf16.endIndex))\n    }\n}\n"
  },
  {
    "path": "ArcBit/External/socket.io-client-swift-10.0.0/Source/SocketTypes.swift",
    "content": "//\n//  SocketTypes.swift\n//  Socket.IO-Client-Swift\n//\n//  Created by Erik Little on 4/8/15.\n//\n//  Permission is hereby granted, free of charge, to any person obtaining a copy\n//  of this software and associated documentation files (the \"Software\"), to deal\n//  in the Software without restriction, including without limitation the rights\n//  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n//  copies of the Software, and to permit persons to whom the Software is\n//  furnished to do so, subject to the following conditions:\n//\n//  The above copyright notice and this permission notice shall be included in\n//  all copies or substantial portions of the Software.\n//\n//  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n//  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n//  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n//  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n//  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n//  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n//  THE SOFTWARE.\n\nimport Foundation\n\n/// A marking protocol that says a type can be represented in a socket.io packet.\n///\n/// Example:\n///\n/// ```swift\n/// struct CustomData : SocketData {\n///    let name: String\n///    let age: Int\n///\n///    func socketRepresentation() -> SocketData {\n///        return [\"name\": name, \"age\": age]\n///    }\n/// }\n///\n/// socket.emit(\"myEvent\", CustomData(name: \"Erik\", age: 24))\n/// ```\npublic protocol SocketData {\n    // MARK: Methods\n\n    /// A representation of self that can sent over socket.io.\n    func socketRepresentation() throws -> SocketData\n}\n\npublic extension SocketData {\n    /// Default implementation. Only works for native Swift types and a few Foundation types.\n    func socketRepresentation() -> SocketData {\n        return self\n    }\n}\n\nextension Array : SocketData { }\nextension Bool : SocketData { }\nextension Dictionary : SocketData { }\nextension Double : SocketData { }\nextension Int : SocketData { }\nextension NSArray : SocketData { }\nextension Data : SocketData { }\nextension NSData : SocketData { }\nextension NSDictionary : SocketData { }\nextension NSString : SocketData { }\nextension NSNull : SocketData { }\nextension String : SocketData { }\n\n/// A typealias for an ack callback.\npublic typealias AckCallback = ([Any]) -> Void\n\n/// A typealias for a normal callback.\npublic typealias NormalCallback = ([Any], SocketAckEmitter) -> Void\n\ntypealias JSON = [String: Any]\ntypealias Probe = (msg: String, type: SocketEnginePacketType, data: [Data])\ntypealias ProbeWaitQueue = [Probe]\n\nenum Either<E, V> {\n    case left(E)\n    case right(V)\n}\n"
  },
  {
    "path": "ArcBit/External/socket.io-client-swift-10.0.0/Source/WebSocket.swift",
    "content": "//////////////////////////////////////////////////////////////////////////////////////////////////\n//\n//  Websocket.swift\n//\n//  Created by Dalton Cherry on 7/16/14.\n//  Copyright (c) 2014-2016 Dalton Cherry.\n//\n//  Licensed under the Apache License, Version 2.0 (the \"License\");\n//  you may not use this file except in compliance with the License.\n//  You may obtain a copy of the License at\n//\n//  http://www.apache.org/licenses/LICENSE-2.0\n//\n//  Unless required by applicable law or agreed to in writing, software\n//  distributed under the License is distributed on an \"AS IS\" BASIS,\n//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n//  See the License for the specific language governing permissions and\n//  limitations under the License.\n//\n//////////////////////////////////////////////////////////////////////////////////////////////////\nimport Foundation\nimport CoreFoundation\nimport Security\n\npublic let WebsocketDidConnectNotification = \"WebsocketDidConnectNotification\"\npublic let WebsocketDidDisconnectNotification = \"WebsocketDidDisconnectNotification\"\npublic let WebsocketDisconnectionErrorKeyName = \"WebsocketDisconnectionErrorKeyName\"\n\npublic protocol WebSocketDelegate: class {\n    func websocketDidConnect(socket: WebSocket)\n    func websocketDidDisconnect(socket: WebSocket, error: NSError?)\n    func websocketDidReceiveMessage(socket: WebSocket, text: String)\n    func websocketDidReceiveData(socket: WebSocket, data: Data)\n}\n\npublic protocol WebSocketPongDelegate: class {\n    func websocketDidReceivePong(socket: WebSocket, data: Data?)\n}\n\nopen class WebSocket : NSObject, StreamDelegate {\n    \n    enum OpCode : UInt8 {\n        case continueFrame = 0x0\n        case textFrame = 0x1\n        case binaryFrame = 0x2\n        // 3-7 are reserved.\n        case connectionClose = 0x8\n        case ping = 0x9\n        case pong = 0xA\n        // B-F reserved.\n    }\n    \n    public enum CloseCode : UInt16 {\n        case normal                 = 1000\n        case goingAway              = 1001\n        case protocolError          = 1002\n        case protocolUnhandledType  = 1003\n        // 1004 reserved.\n        case noStatusReceived       = 1005\n        //1006 reserved.\n        case encoding               = 1007\n        case policyViolated         = 1008\n        case messageTooBig          = 1009\n    }\n    \n    public static let ErrorDomain = \"WebSocket\"\n    \n    enum InternalErrorCode: UInt16 {\n        // 0-999 WebSocket status codes not used\n        case outputStreamWriteError = 1\n    }\n    \n    // Where the callback is executed. It defaults to the main UI thread queue.\n    public var callbackQueue = DispatchQueue.main\n    \n    var optionalProtocols: [String]?\n    \n    // MARK: - Constants\n    let headerWSUpgradeName     = \"Upgrade\"\n    let headerWSUpgradeValue    = \"websocket\"\n    let headerWSHostName        = \"Host\"\n    let headerWSConnectionName  = \"Connection\"\n    let headerWSConnectionValue = \"Upgrade\"\n    let headerWSProtocolName    = \"Sec-WebSocket-Protocol\"\n    let headerWSVersionName     = \"Sec-WebSocket-Version\"\n    let headerWSVersionValue    = \"13\"\n    let headerWSKeyName         = \"Sec-WebSocket-Key\"\n    let headerOriginName        = \"Origin\"\n    let headerWSAcceptName      = \"Sec-WebSocket-Accept\"\n    let BUFFER_MAX              = 4096\n    let FinMask: UInt8          = 0x80\n    let OpCodeMask: UInt8       = 0x0F\n    let RSVMask: UInt8          = 0x70\n    let MaskMask: UInt8         = 0x80\n    let PayloadLenMask: UInt8   = 0x7F\n    let MaxFrameSize: Int       = 32\n    let httpSwitchProtocolCode  = 101\n    let supportedSSLSchemes     = [\"wss\", \"https\"]\n    \n    class WSResponse {\n        var isFin = false\n        var code: OpCode = .continueFrame\n        var bytesLeft = 0\n        var frameCount = 0\n        var buffer: NSMutableData?\n    }\n    \n    // MARK: - Delegates\n    /// Responds to callback about new messages coming in over the WebSocket\n    /// and also connection/disconnect messages.\n    public weak var delegate: WebSocketDelegate?\n    \n    /// Receives a callback for each pong message recived.\n    public weak var pongDelegate: WebSocketPongDelegate?\n    \n    \n    // MARK: - Block based API.\n    public var onConnect: ((Void) -> Void)?\n    public var onDisconnect: ((NSError?) -> Void)?\n    public var onText: ((String) -> Void)?\n    public var onData: ((Data) -> Void)?\n    public var onPong: ((Data?) -> Void)?\n    \n    public var headers = [String: String]()\n    public var voipEnabled = false\n    public var disableSSLCertValidation = false\n    public var security: SSLTrustValidator?\n    public var enabledSSLCipherSuites: [SSLCipherSuite]?\n    public var origin: String?\n    public var timeout = 5\n    public var isConnected: Bool {\n        return connected\n    }\n    \n    public var currentURL: URL { return url }\n    \n    // MARK: - Private\n    private var url: URL\n    private var inputStream: InputStream?\n    private var outputStream: OutputStream?\n    private var connected = false\n    private var isConnecting = false\n    private var writeQueue = OperationQueue()\n    private var readStack = [WSResponse]()\n    private var inputQueue = [Data]()\n    private var fragBuffer: Data?\n    private var certValidated = false\n    private var didDisconnect = false\n    private var readyToWrite = false\n    private let mutex = NSLock()\n    private let notificationCenter = NotificationCenter.default\n    private var canDispatch: Bool {\n        mutex.lock()\n        let canWork = readyToWrite\n        mutex.unlock()\n        return canWork\n    }\n    /// The shared processing queue used for all WebSocket.\n    private static let sharedWorkQueue = DispatchQueue(label: \"com.vluxe.starscream.websocket\", attributes: [])\n    \n    /// Used for setting protocols.\n    public init(url: URL, protocols: [String]? = nil) {\n        self.url = url\n        self.origin = url.absoluteString\n        if let hostUrl = URL (string: \"/\", relativeTo: url) {\n            var origin = hostUrl.absoluteString\n            origin.remove(at: origin.index(before: origin.endIndex))\n            self.origin = origin\n        }\n        writeQueue.maxConcurrentOperationCount = 1\n        optionalProtocols = protocols\n    }\n    \n    // Used for specifically setting the QOS for the write queue.\n    public convenience init(url: URL, writeQueueQOS: QualityOfService, protocols: [String]? = nil) {\n        self.init(url: url, protocols: protocols)\n        writeQueue.qualityOfService = writeQueueQOS\n    }\n    \n    /**\n     Connect to the WebSocket server on a background thread.\n     */\n    open func connect() {\n        guard !isConnecting else { return }\n        didDisconnect = false\n        isConnecting = true\n        createHTTPRequest()\n    }\n    \n    /**\n     Disconnect from the server. I send a Close control frame to the server, then expect the server to respond with a Close control frame and close the socket from its end. I notify my delegate once the socket has been closed.\n     If you supply a non-nil `forceTimeout`, I wait at most that long (in seconds) for the server to close the socket. After the timeout expires, I close the socket and notify my delegate.\n     If you supply a zero (or negative) `forceTimeout`, I immediately close the socket (without sending a Close control frame) and notify my delegate.\n     - Parameter forceTimeout: Maximum time to wait for the server to close the socket.\n     - Parameter closeCode: The code to send on disconnect. The default is the normal close code for cleanly disconnecting a webSocket.\n     */\n    open func disconnect(forceTimeout: TimeInterval? = nil, closeCode: UInt16 = CloseCode.normal.rawValue) {\n        guard isConnected else { return }\n        switch forceTimeout {\n        case .some(let seconds) where seconds > 0:\n            let milliseconds = Int(seconds * 1_000)\n            callbackQueue.asyncAfter(deadline: .now() + .milliseconds(milliseconds)) { [weak self] in\n                self?.disconnectStream(nil)\n            }\n            fallthrough\n        case .none:\n            writeError(closeCode)\n        default:\n            disconnectStream(nil)\n            break\n        }\n    }\n    \n    /**\n     Write a string to the websocket. This sends it as a text frame.\n     If you supply a non-nil completion block, I will perform it when the write completes.\n     - parameter string:        The string to write.\n     - parameter completion: The (optional) completion handler.\n     */\n    open func write(string: String, completion: (() -> ())? = nil) {\n        guard isConnected else { return }\n        dequeueWrite(string.data(using: String.Encoding.utf8)!, code: .textFrame, writeCompletion: completion)\n    }\n    \n    /**\n     Write binary data to the websocket. This sends it as a binary frame.\n     If you supply a non-nil completion block, I will perform it when the write completes.\n     - parameter data:       The data to write.\n     - parameter completion: The (optional) completion handler.\n     */\n    open func write(data: Data, completion: (() -> ())? = nil) {\n        guard isConnected else { return }\n        dequeueWrite(data, code: .binaryFrame, writeCompletion: completion)\n    }\n    \n    /**\n     Write a ping to the websocket. This sends it as a control frame.\n     Yodel a   sound  to the planet.    This sends it as an astroid. http://youtu.be/Eu5ZJELRiJ8?t=42s\n     */\n    open func write(ping: Data, completion: (() -> ())? = nil) {\n        guard isConnected else { return }\n        dequeueWrite(ping, code: .ping, writeCompletion: completion)\n    }\n    \n    /**\n     Private method that starts the connection.\n     */\n    private func createHTTPRequest() {\n        let urlRequest = CFHTTPMessageCreateRequest(kCFAllocatorDefault, \"GET\" as CFString,\n                                                    url as CFURL, kCFHTTPVersion1_1).takeRetainedValue()\n        \n        var port = url.port\n        if port == nil {\n            if supportedSSLSchemes.contains(url.scheme!) {\n                port = 443\n            } else {\n                port = 80\n            }\n        }\n        addHeader(urlRequest, key: headerWSUpgradeName, val: headerWSUpgradeValue)\n        addHeader(urlRequest, key: headerWSConnectionName, val: headerWSConnectionValue)\n        if let protocols = optionalProtocols {\n            addHeader(urlRequest, key: headerWSProtocolName, val: protocols.joined(separator: \",\"))\n        }\n        addHeader(urlRequest, key: headerWSVersionName, val: headerWSVersionValue)\n        addHeader(urlRequest, key: headerWSKeyName, val: generateWebSocketKey())\n        if let origin = origin {\n            addHeader(urlRequest, key: headerOriginName, val: origin)\n        }\n        addHeader(urlRequest, key: headerWSHostName, val: \"\\(url.host!):\\(port!)\")\n        for (key, value) in headers {\n            addHeader(urlRequest, key: key, val: value)\n        }\n        if let cfHTTPMessage = CFHTTPMessageCopySerializedMessage(urlRequest) {\n            let serializedRequest = cfHTTPMessage.takeRetainedValue()\n            initStreamsWithData(serializedRequest as Data, Int(port!))\n        }\n    }\n    \n    /**\n     Add a header to the CFHTTPMessage by using the NSString bridges to CFString\n     */\n    private func addHeader(_ urlRequest: CFHTTPMessage, key: String, val: String) {\n        CFHTTPMessageSetHeaderFieldValue(urlRequest, key as CFString, val as CFString)\n    }\n    \n    /**\n     Generate a WebSocket key as needed in RFC.\n     */\n    private func generateWebSocketKey() -> String {\n        var key = \"\"\n        let seed = 16\n        for _ in 0..<seed {\n            let uni = UnicodeScalar(UInt32(97 + arc4random_uniform(25)))\n            key += \"\\(Character(uni!))\"\n        }\n        let data = key.data(using: String.Encoding.utf8)\n        let baseKey = data?.base64EncodedString(options: NSData.Base64EncodingOptions(rawValue: 0))\n        return baseKey!\n    }\n    \n    /**\n     Start the stream connection and write the data to the output stream.\n     */\n    private func initStreamsWithData(_ data: Data, _ port: Int) {\n        //higher level API we will cut over to at some point\n        //NSStream.getStreamsToHostWithName(url.host, port: url.port.integerValue, inputStream: &inputStream, outputStream: &outputStream)\n        // Disconnect and clean up any existing streams before setting up a new pair\n        disconnectStream(nil, runDelegate: false)\n        \n        var readStream: Unmanaged<CFReadStream>?\n        var writeStream: Unmanaged<CFWriteStream>?\n        let h = url.host! as NSString\n        CFStreamCreatePairWithSocketToHost(nil, h, UInt32(port), &readStream, &writeStream)\n        inputStream = readStream!.takeRetainedValue()\n        outputStream = writeStream!.takeRetainedValue()\n        guard let inStream = inputStream, let outStream = outputStream else { return }\n        inStream.delegate = self\n        outStream.delegate = self\n        if supportedSSLSchemes.contains(url.scheme!) {\n            certValidated = false\n            inStream.setProperty(StreamSocketSecurityLevel.negotiatedSSL as AnyObject, forKey: Stream.PropertyKey.socketSecurityLevelKey)\n            outStream.setProperty(StreamSocketSecurityLevel.negotiatedSSL as AnyObject, forKey: Stream.PropertyKey.socketSecurityLevelKey)\n            if disableSSLCertValidation {\n                let settings: [NSObject: NSObject] = [kCFStreamSSLValidatesCertificateChain: NSNumber(value: false), kCFStreamSSLPeerName: kCFNull]\n                inStream.setProperty(settings, forKey: kCFStreamPropertySSLSettings as Stream.PropertyKey)\n                outStream.setProperty(settings, forKey: kCFStreamPropertySSLSettings as Stream.PropertyKey)\n            }\n            if let cipherSuites = self.enabledSSLCipherSuites {\n                if let sslContextIn = CFReadStreamCopyProperty(inputStream, CFStreamPropertyKey(rawValue: kCFStreamPropertySSLContext)) as! SSLContext?,\n                    let sslContextOut = CFWriteStreamCopyProperty(outputStream, CFStreamPropertyKey(rawValue: kCFStreamPropertySSLContext)) as! SSLContext? {\n                    let resIn = SSLSetEnabledCiphers(sslContextIn, cipherSuites, cipherSuites.count)\n                    let resOut = SSLSetEnabledCiphers(sslContextOut, cipherSuites, cipherSuites.count)\n                    if resIn != errSecSuccess {\n                        let error = self.errorWithDetail(\"Error setting ingoing cypher suites\", code: UInt16(resIn))\n                        disconnectStream(error)\n                        return\n                    }\n                    if resOut != errSecSuccess {\n                        let error = self.errorWithDetail(\"Error setting outgoing cypher suites\", code: UInt16(resOut))\n                        disconnectStream(error)\n                        return\n                    }\n                }\n            }\n        } else {\n            certValidated = true //not a https session, so no need to check SSL pinning\n        }\n        if voipEnabled {\n            inStream.setProperty(StreamNetworkServiceTypeValue.voIP as AnyObject, forKey: Stream.PropertyKey.networkServiceType)\n            outStream.setProperty(StreamNetworkServiceTypeValue.voIP as AnyObject, forKey: Stream.PropertyKey.networkServiceType)\n        }\n        \n        CFReadStreamSetDispatchQueue(inStream, WebSocket.sharedWorkQueue)\n        CFWriteStreamSetDispatchQueue(outStream, WebSocket.sharedWorkQueue)\n        inStream.open()\n        outStream.open()\n        \n        self.mutex.lock()\n        self.readyToWrite = true\n        self.mutex.unlock()\n        \n        let bytes = UnsafeRawPointer((data as NSData).bytes).assumingMemoryBound(to: UInt8.self)\n        var out = timeout * 1_000_000 // wait 5 seconds before giving up\n        let operation = BlockOperation()\n        operation.addExecutionBlock { [weak self, weak operation] in\n            guard let sOperation = operation else { return }\n            while !outStream.hasSpaceAvailable && !sOperation.isCancelled {\n                usleep(100) // wait until the socket is ready\n                guard !sOperation.isCancelled else { return }\n                out -= 100\n                if out < 0 {\n                    WebSocket.sharedWorkQueue.async {\n                        self?.cleanupStream()\n                    }\n                    self?.doDisconnect(self?.errorWithDetail(\"write wait timed out\", code: 2))\n                    return\n                } else if outStream.streamError != nil {\n                    return // disconnectStream will be called.\n                }\n            }\n            guard !sOperation.isCancelled, let s = self else { return }\n            // Do the pinning now if needed\n            if let sec = s.security, !s.certValidated {\n                let trust = outStream.property(forKey: kCFStreamPropertySSLPeerTrust as Stream.PropertyKey) as! SecTrust\n                let domain = outStream.property(forKey: kCFStreamSSLPeerName as Stream.PropertyKey) as? String\n                s.certValidated = sec.isValid(trust, domain: domain)\n                if !s.certValidated {\n                    WebSocket.sharedWorkQueue.async {\n                        let error = s.errorWithDetail(\"Invalid SSL certificate\", code: 1)\n                        s.disconnectStream(error)\n                    }\n                    return\n                }\n            }\n            outStream.write(bytes, maxLength: data.count)\n        }\n        writeQueue.addOperation(operation)\n    }\n    \n    /**\n     Delegate for the stream methods. Processes incoming bytes\n     */\n    open func stream(_ aStream: Stream, handle eventCode: Stream.Event) {\n        if eventCode == .hasBytesAvailable {\n            if aStream == inputStream {\n                processInputStream()\n            }\n        } else if eventCode == .errorOccurred {\n            disconnectStream(aStream.streamError as NSError?)\n        } else if eventCode == .endEncountered {\n            disconnectStream(nil)\n        }\n    }\n    \n    /**\n     Disconnect the stream object and notifies the delegate.\n     */\n    private func disconnectStream(_ error: NSError?, runDelegate: Bool = true) {\n        if error == nil {\n            writeQueue.waitUntilAllOperationsAreFinished()\n        } else {\n            writeQueue.cancelAllOperations()\n        }\n        cleanupStream()\n        connected = false\n        if runDelegate {\n            doDisconnect(error)\n        }\n    }\n    \n    /**\n     cleanup the streams.\n     */\n    private func cleanupStream() {\n        outputStream?.delegate = nil\n        inputStream?.delegate = nil\n        if let stream = inputStream {\n            CFReadStreamSetDispatchQueue(stream, nil)\n            stream.close()\n        }\n        if let stream = outputStream {\n            CFWriteStreamSetDispatchQueue(stream, nil)\n            stream.close()\n        }\n        outputStream = nil\n        inputStream = nil\n        fragBuffer = nil\n    }\n    \n    /**\n     Handles the incoming bytes and sending them to the proper processing method.\n     */\n    private func processInputStream() {\n        let buf = NSMutableData(capacity: BUFFER_MAX)\n        let buffer = UnsafeMutableRawPointer(mutating: buf!.bytes).assumingMemoryBound(to: UInt8.self)\n        let length = inputStream!.read(buffer, maxLength: BUFFER_MAX)\n        guard length > 0 else { return }\n        var process = false\n        if inputQueue.count == 0 {\n            process = true\n        }\n        inputQueue.append(Data(bytes: buffer, count: length))\n        if process {\n            dequeueInput()\n        }\n    }\n    \n    /**\n     Dequeue the incoming input so it is processed in order.\n     */\n    private func dequeueInput() {\n        while !inputQueue.isEmpty {\n            autoreleasepool {\n                let data = inputQueue[0]\n                var work = data\n                if let buffer = fragBuffer {\n                    var combine = NSData(data: buffer) as Data\n                    combine.append(data)\n                    work = combine\n                    fragBuffer = nil\n                }\n                let buffer = UnsafeRawPointer((work as NSData).bytes).assumingMemoryBound(to: UInt8.self)\n                let length = work.count\n                if !connected {\n                    processTCPHandshake(buffer, bufferLen: length)\n                } else {\n                    processRawMessagesInBuffer(buffer, bufferLen: length)\n                }\n                inputQueue = inputQueue.filter{ $0 != data }\n            }\n        }\n    }\n    \n    /**\n     Handle checking the inital connection status\n     */\n    private func processTCPHandshake(_ buffer: UnsafePointer<UInt8>, bufferLen: Int) {\n        let code = processHTTP(buffer, bufferLen: bufferLen)\n        switch code {\n        case 0:\n            break\n        case -1:\n            fragBuffer = Data(bytes: buffer, count: bufferLen)\n        break // do nothing, we are going to collect more data\n        default:\n            doDisconnect(errorWithDetail(\"Invalid HTTP upgrade\", code: UInt16(code)))\n        }\n    }\n    \n    /**\n     Finds the HTTP Packet in the TCP stream, by looking for the CRLF.\n     */\n    private func processHTTP(_ buffer: UnsafePointer<UInt8>, bufferLen: Int) -> Int {\n        let CRLFBytes = [UInt8(ascii: \"\\r\"), UInt8(ascii: \"\\n\"), UInt8(ascii: \"\\r\"), UInt8(ascii: \"\\n\")]\n        var k = 0\n        var totalSize = 0\n        for i in 0..<bufferLen {\n            if buffer[i] == CRLFBytes[k] {\n                k += 1\n                if k == 3 {\n                    totalSize = i + 1\n                    break\n                }\n            } else {\n                k = 0\n            }\n        }\n        if totalSize > 0 {\n            let code = validateResponse(buffer, bufferLen: totalSize)\n            if code != 0 {\n                return code\n            }\n            isConnecting = false\n            connected = true\n            didDisconnect = false\n            if canDispatch {\n                callbackQueue.async { [weak self] in\n                    guard let s = self else { return }\n                    s.onConnect?()\n                    s.delegate?.websocketDidConnect(socket: s)\n                    s.notificationCenter.post(name: NSNotification.Name(WebsocketDidConnectNotification), object: self)\n                }\n            }\n            totalSize += 1 //skip the last \\n\n            let restSize = bufferLen - totalSize\n            if restSize > 0 {\n                processRawMessagesInBuffer(buffer + totalSize, bufferLen: restSize)\n            }\n            return 0 //success\n        }\n        return -1 // Was unable to find the full TCP header.\n    }\n    \n    /**\n     Validates the HTTP is a 101 as per the RFC spec.\n     */\n    private func validateResponse(_ buffer: UnsafePointer<UInt8>, bufferLen: Int) -> Int {\n        let response = CFHTTPMessageCreateEmpty(kCFAllocatorDefault, false).takeRetainedValue()\n        CFHTTPMessageAppendBytes(response, buffer, bufferLen)\n        let code = CFHTTPMessageGetResponseStatusCode(response)\n        if code != httpSwitchProtocolCode {\n            return code\n        }\n        if let cfHeaders = CFHTTPMessageCopyAllHeaderFields(response) {\n            let headers = cfHeaders.takeRetainedValue() as NSDictionary\n            if let acceptKey = headers[headerWSAcceptName as NSString] as? NSString {\n                if acceptKey.length > 0 {\n                    return 0\n                }\n            }\n        }\n        return -1\n    }\n    \n    /**\n     Read a 16 bit big endian value from a buffer\n     */\n    private static func readUint16(_ buffer: UnsafePointer<UInt8>, offset: Int) -> UInt16 {\n        return (UInt16(buffer[offset + 0]) << 8) | UInt16(buffer[offset + 1])\n    }\n    \n    /**\n     Read a 64 bit big endian value from a buffer\n     */\n    private static func readUint64(_ buffer: UnsafePointer<UInt8>, offset: Int) -> UInt64 {\n        var value = UInt64(0)\n        for i in 0...7 {\n            value = (value << 8) | UInt64(buffer[offset + i])\n        }\n        return value\n    }\n    \n    /**\n     Write a 16-bit big endian value to a buffer.\n     */\n    private static func writeUint16(_ buffer: UnsafeMutablePointer<UInt8>, offset: Int, value: UInt16) {\n        buffer[offset + 0] = UInt8(value >> 8)\n        buffer[offset + 1] = UInt8(value & 0xff)\n    }\n    \n    /**\n     Write a 64-bit big endian value to a buffer.\n     */\n    private static func writeUint64(_ buffer: UnsafeMutablePointer<UInt8>, offset: Int, value: UInt64) {\n        for i in 0...7 {\n            buffer[offset + i] = UInt8((value >> (8*UInt64(7 - i))) & 0xff)\n        }\n    }\n    \n    /**\n     Process one message at the start of `buffer`. Return another buffer (sharing storage) that contains the leftover contents of `buffer` that I didn't process.\n     */\n    private func processOneRawMessage(inBuffer buffer: UnsafeBufferPointer<UInt8>) -> UnsafeBufferPointer<UInt8> {\n        let response = readStack.last\n        guard let baseAddress = buffer.baseAddress else {return emptyBuffer}\n        let bufferLen = buffer.count\n        if response != nil && bufferLen < 2 {\n            fragBuffer = Data(buffer: buffer)\n            return emptyBuffer\n        }\n        if let response = response, response.bytesLeft > 0 {\n            var len = response.bytesLeft\n            var extra = bufferLen - response.bytesLeft\n            if response.bytesLeft > bufferLen {\n                len = bufferLen\n                extra = 0\n            }\n            response.bytesLeft -= len\n            response.buffer?.append(Data(bytes: baseAddress, count: len))\n            _ = processResponse(response)\n            return buffer.fromOffset(bufferLen - extra)\n        } else {\n            let isFin = (FinMask & baseAddress[0])\n            let receivedOpcodeRawValue = (OpCodeMask & baseAddress[0])\n            let receivedOpcode = OpCode(rawValue: receivedOpcodeRawValue)\n            let isMasked = (MaskMask & baseAddress[1])\n            let payloadLen = (PayloadLenMask & baseAddress[1])\n            var offset = 2\n            if (isMasked > 0 || (RSVMask & baseAddress[0]) > 0) && receivedOpcode != .pong {\n                let errCode = CloseCode.protocolError.rawValue\n                doDisconnect(errorWithDetail(\"masked and rsv data is not currently supported\", code: errCode))\n                writeError(errCode)\n                return emptyBuffer\n            }\n            let isControlFrame = (receivedOpcode == .connectionClose || receivedOpcode == .ping)\n            if !isControlFrame && (receivedOpcode != .binaryFrame && receivedOpcode != .continueFrame &&\n                receivedOpcode != .textFrame && receivedOpcode != .pong) {\n                let errCode = CloseCode.protocolError.rawValue\n                doDisconnect(errorWithDetail(\"unknown opcode: \\(receivedOpcodeRawValue)\", code: errCode))\n                writeError(errCode)\n                return emptyBuffer\n            }\n            if isControlFrame && isFin == 0 {\n                let errCode = CloseCode.protocolError.rawValue\n                doDisconnect(errorWithDetail(\"control frames can't be fragmented\", code: errCode))\n                writeError(errCode)\n                return emptyBuffer\n            }\n            var closeCode = CloseCode.normal.rawValue\n            if receivedOpcode == .connectionClose {\n                if payloadLen == 1 {\n                    closeCode = CloseCode.protocolError.rawValue\n                } else if payloadLen > 1 {\n                    closeCode = WebSocket.readUint16(baseAddress, offset: offset)\n                    if closeCode < 1000 || (closeCode > 1003 && closeCode < 1007) || (closeCode > 1011 && closeCode < 3000) {\n                        closeCode = CloseCode.protocolError.rawValue\n                    }\n                }\n                if payloadLen < 2 {\n                    doDisconnect(errorWithDetail(\"connection closed by server\", code: closeCode))\n                    writeError(closeCode)\n                    return emptyBuffer\n                }\n            } else if isControlFrame && payloadLen > 125 {\n                writeError(CloseCode.protocolError.rawValue)\n                return emptyBuffer\n            }\n            var dataLength = UInt64(payloadLen)\n            if dataLength == 127 {\n                dataLength = WebSocket.readUint64(baseAddress, offset: offset)\n                offset += MemoryLayout<UInt64>.size\n            } else if dataLength == 126 {\n                dataLength = UInt64(WebSocket.readUint16(baseAddress, offset: offset))\n                offset += MemoryLayout<UInt16>.size\n            }\n            if bufferLen < offset || UInt64(bufferLen - offset) < dataLength {\n                fragBuffer = Data(bytes: baseAddress, count: bufferLen)\n                return emptyBuffer\n            }\n            var len = dataLength\n            if dataLength > UInt64(bufferLen) {\n                len = UInt64(bufferLen-offset)\n            }\n            if receivedOpcode == .connectionClose && len > 0 {\n                let size = MemoryLayout<UInt16>.size\n                offset += size\n                len -= UInt64(size)\n            }\n            let data = Data(bytes: baseAddress+offset, count: Int(len))\n            \n            if receivedOpcode == .connectionClose {\n                var closeReason = \"connection closed by server\"\n                if let customCloseReason = String(data: data, encoding: .utf8) {\n                    closeReason = customCloseReason\n                } else {\n                    closeCode = CloseCode.protocolError.rawValue\n                }\n                doDisconnect(errorWithDetail(closeReason, code: closeCode))\n                writeError(closeCode)\n                return emptyBuffer\n            }\n            if receivedOpcode == .pong {\n                if canDispatch {\n                    callbackQueue.async { [weak self] in\n                        guard let s = self else { return }\n                        let pongData: Data? = data.count > 0 ? data : nil\n                        s.onPong?(pongData)\n                        s.pongDelegate?.websocketDidReceivePong(socket: s, data: pongData)\n                    }\n                }\n                return buffer.fromOffset(offset + Int(len))\n            }\n            var response = readStack.last\n            if isControlFrame {\n                response = nil // Don't append pings.\n            }\n            if isFin == 0 && receivedOpcode == .continueFrame && response == nil {\n                let errCode = CloseCode.protocolError.rawValue\n                doDisconnect(errorWithDetail(\"continue frame before a binary or text frame\", code: errCode))\n                writeError(errCode)\n                return emptyBuffer\n            }\n            var isNew = false\n            if response == nil {\n                if receivedOpcode == .continueFrame {\n                    let errCode = CloseCode.protocolError.rawValue\n                    doDisconnect(errorWithDetail(\"first frame can't be a continue frame\",\n                                                 code: errCode))\n                    writeError(errCode)\n                    return emptyBuffer\n                }\n                isNew = true\n                response = WSResponse()\n                response!.code = receivedOpcode!\n                response!.bytesLeft = Int(dataLength)\n                response!.buffer = NSMutableData(data: data)\n            } else {\n                if receivedOpcode == .continueFrame {\n                    response!.bytesLeft = Int(dataLength)\n                } else {\n                    let errCode = CloseCode.protocolError.rawValue\n                    doDisconnect(errorWithDetail(\"second and beyond of fragment message must be a continue frame\",\n                                                 code: errCode))\n                    writeError(errCode)\n                    return emptyBuffer\n                }\n                response!.buffer!.append(data)\n            }\n            if let response = response {\n                response.bytesLeft -= Int(len)\n                response.frameCount += 1\n                response.isFin = isFin > 0 ? true : false\n                if isNew {\n                    readStack.append(response)\n                }\n                _ = processResponse(response)\n            }\n            \n            let step = Int(offset + numericCast(len))\n            return buffer.fromOffset(step)\n        }\n    }\n    \n    /**\n     Process all messages in the buffer if possible.\n     */\n    private func processRawMessagesInBuffer(_ pointer: UnsafePointer<UInt8>, bufferLen: Int) {\n        var buffer = UnsafeBufferPointer(start: pointer, count: bufferLen)\n        repeat {\n            buffer = processOneRawMessage(inBuffer: buffer)\n        } while buffer.count >= 2\n        if buffer.count > 0 {\n            fragBuffer = Data(buffer: buffer)\n        }\n    }\n    \n    /**\n     Process the finished response of a buffer.\n     */\n    private func processResponse(_ response: WSResponse) -> Bool {\n        if response.isFin && response.bytesLeft <= 0 {\n            if response.code == .ping {\n                let data = response.buffer! // local copy so it is perverse for writing\n                dequeueWrite(data as Data, code: .pong)\n            } else if response.code == .textFrame {\n                let str: NSString? = NSString(data: response.buffer! as Data, encoding: String.Encoding.utf8.rawValue)\n                if str == nil {\n                    writeError(CloseCode.encoding.rawValue)\n                    return false\n                }\n                if canDispatch {\n                    callbackQueue.async { [weak self] in\n                        guard let s = self else { return }\n                        s.onText?(str! as String)\n                        s.delegate?.websocketDidReceiveMessage(socket: s, text: str! as String)\n                    }\n                }\n            } else if response.code == .binaryFrame {\n                if canDispatch {\n                    let data = response.buffer! // local copy so it is perverse for writing\n                    callbackQueue.async { [weak self] in\n                        guard let s = self else { return }\n                        s.onData?(data as Data)\n                        s.delegate?.websocketDidReceiveData(socket: s, data: data as Data)\n                    }\n                }\n            }\n            readStack.removeLast()\n            return true\n        }\n        return false\n    }\n    \n    /**\n     Create an error\n     */\n    private func errorWithDetail(_ detail: String, code: UInt16) -> NSError {\n        var details = [String: String]()\n        details[NSLocalizedDescriptionKey] =  detail\n        return NSError(domain: WebSocket.ErrorDomain, code: Int(code), userInfo: details)\n    }\n    \n    /**\n     Write an error to the socket\n     */\n    private func writeError(_ code: UInt16) {\n        let buf = NSMutableData(capacity: MemoryLayout<UInt16>.size)\n        let buffer = UnsafeMutableRawPointer(mutating: buf!.bytes).assumingMemoryBound(to: UInt8.self)\n        WebSocket.writeUint16(buffer, offset: 0, value: code)\n        dequeueWrite(Data(bytes: buffer, count: MemoryLayout<UInt16>.size), code: .connectionClose)\n    }\n    \n    /**\n     Used to write things to the stream\n     */\n    private func dequeueWrite(_ data: Data, code: OpCode, writeCompletion: (() -> ())? = nil) {\n        let operation = BlockOperation()\n        operation.addExecutionBlock { [weak self, weak operation] in\n            //stream isn't ready, let's wait\n            guard let s = self else { return }\n            guard let sOperation = operation else { return }\n            var offset = 2\n            let dataLength = data.count\n            let frame = NSMutableData(capacity: dataLength + s.MaxFrameSize)\n            let buffer = UnsafeMutableRawPointer(frame!.mutableBytes).assumingMemoryBound(to: UInt8.self)\n            buffer[0] = s.FinMask | code.rawValue\n            if dataLength < 126 {\n                buffer[1] = CUnsignedChar(dataLength)\n            } else if dataLength <= Int(UInt16.max) {\n                buffer[1] = 126\n                WebSocket.writeUint16(buffer, offset: offset, value: UInt16(dataLength))\n                offset += MemoryLayout<UInt16>.size\n            } else {\n                buffer[1] = 127\n                WebSocket.writeUint64(buffer, offset: offset, value: UInt64(dataLength))\n                offset += MemoryLayout<UInt64>.size\n            }\n            buffer[1] |= s.MaskMask\n            let maskKey = UnsafeMutablePointer<UInt8>(buffer + offset)\n            _ = SecRandomCopyBytes(kSecRandomDefault, Int(MemoryLayout<UInt32>.size), maskKey)\n            offset += MemoryLayout<UInt32>.size\n            \n            for i in 0..<dataLength {\n                buffer[offset] = data[i] ^ maskKey[i % MemoryLayout<UInt32>.size]\n                offset += 1\n            }\n            var total = 0\n            while !sOperation.isCancelled {\n                guard let outStream = s.outputStream else { break }\n                let writeBuffer = UnsafeRawPointer(frame!.bytes+total).assumingMemoryBound(to: UInt8.self)\n                let len = outStream.write(writeBuffer, maxLength: offset-total)\n                if len < 0 {\n                    var error: Error?\n                    if let streamError = outStream.streamError {\n                        error = streamError\n                    } else {\n                        let errCode = InternalErrorCode.outputStreamWriteError.rawValue\n                        error = s.errorWithDetail(\"output stream error during write\", code: errCode)\n                    }\n                    s.doDisconnect(error as NSError?)\n                    break\n                } else {\n                    total += len\n                }\n                if total >= offset {\n                    if let queue = self?.callbackQueue, let callback = writeCompletion {\n                        queue.async {\n                            callback()\n                        }\n                    }\n                    \n                    break\n                }\n            }\n        }\n        writeQueue.addOperation(operation)\n    }\n    \n    /**\n     Used to preform the disconnect delegate\n     */\n    private func doDisconnect(_ error: NSError?) {\n        guard !didDisconnect else { return }\n        didDisconnect = true\n        isConnecting = false\n        connected = false\n        guard canDispatch else {return}\n        callbackQueue.async { [weak self] in\n            guard let s = self else { return }\n            s.onDisconnect?(error)\n            s.delegate?.websocketDidDisconnect(socket: s, error: error)\n            let userInfo = error.map{ [WebsocketDisconnectionErrorKeyName: $0] }\n            s.notificationCenter.post(name: NSNotification.Name(WebsocketDidDisconnectNotification), object: self, userInfo: userInfo)\n        }\n    }\n    \n    // MARK: - Deinit\n    deinit {\n        mutex.lock()\n        readyToWrite = false\n        mutex.unlock()\n        cleanupStream()\n        writeQueue.cancelAllOperations()\n    }\n    \n}\n\nprivate extension Data {\n    \n    init(buffer: UnsafeBufferPointer<UInt8>) {\n        self.init(bytes: buffer.baseAddress!, count: buffer.count)\n    }\n    \n}\n\nprivate extension UnsafeBufferPointer {\n    \n    func fromOffset(_ offset: Int) -> UnsafeBufferPointer<Element> {\n        return UnsafeBufferPointer<Element>(start: baseAddress?.advanced(by: offset), count: count - offset)\n    }\n    \n}\n\nprivate let emptyBuffer = UnsafeBufferPointer<UInt8>(start: nil, count: 0)\n"
  },
  {
    "path": "ArcBit/Images.xcassets/AppIcon.appiconset/Contents.json",
    "content": "{\n  \"images\" : [\n    {\n      \"idiom\" : \"iphone\",\n      \"size\" : \"20x20\",\n      \"scale\" : \"2x\"\n    },\n    {\n      \"idiom\" : \"iphone\",\n      \"size\" : \"20x20\",\n      \"scale\" : \"3x\"\n    },\n    {\n      \"size\" : \"29x29\",\n      \"idiom\" : \"iphone\",\n      \"filename\" : \"58X58.png\",\n      \"scale\" : \"2x\"\n    },\n    {\n      \"size\" : \"29x29\",\n      \"idiom\" : \"iphone\",\n      \"filename\" : \"87x87me.png\",\n      \"scale\" : \"3x\"\n    },\n    {\n      \"size\" : \"40x40\",\n      \"idiom\" : \"iphone\",\n      \"filename\" : \"80X80.png\",\n      \"scale\" : \"2x\"\n    },\n    {\n      \"size\" : \"40x40\",\n      \"idiom\" : \"iphone\",\n      \"filename\" : \"120X120.png\",\n      \"scale\" : \"3x\"\n    },\n    {\n      \"size\" : \"60x60\",\n      \"idiom\" : \"iphone\",\n      \"filename\" : \"120X120-1.png\",\n      \"scale\" : \"2x\"\n    },\n    {\n      \"size\" : \"60x60\",\n      \"idiom\" : \"iphone\",\n      \"filename\" : \"180X180.png\",\n      \"scale\" : \"3x\"\n    },\n    {\n      \"size\" : \"1024x1024\",\n      \"idiom\" : \"ios-marketing\",\n      \"filename\" : \"1024X1024.png\",\n      \"scale\" : \"1x\"\n    }\n  ],\n  \"info\" : {\n    \"version\" : 1,\n    \"author\" : \"xcode\"\n  }\n}"
  },
  {
    "path": "ArcBit/Images.xcassets/Contents.json",
    "content": "{\n  \"info\" : {\n    \"version\" : 1,\n    \"author\" : \"xcode\"\n  }\n}"
  },
  {
    "path": "ArcBit/Images.xcassets/home3.imageset/Contents.json",
    "content": "{\n  \"images\" : [\n    {\n      \"idiom\" : \"universal\",\n      \"scale\" : \"1x\"\n    },\n    {\n      \"idiom\" : \"universal\",\n      \"filename\" : \"home3@2x.png\",\n      \"scale\" : \"2x\"\n    },\n    {\n      \"idiom\" : \"universal\",\n      \"filename\" : \"home3@3x.png\",\n      \"scale\" : \"3x\"\n    }\n  ],\n  \"info\" : {\n    \"version\" : 1,\n    \"author\" : \"xcode\"\n  }\n}"
  },
  {
    "path": "ArcBit/Images.xcassets/lifebuoy.imageset/Contents.json",
    "content": "{\n  \"images\" : [\n    {\n      \"idiom\" : \"universal\",\n      \"scale\" : \"1x\"\n    },\n    {\n      \"idiom\" : \"universal\",\n      \"filename\" : \"lifebuoy@2x.png\",\n      \"scale\" : \"2x\"\n    },\n    {\n      \"idiom\" : \"universal\",\n      \"filename\" : \"lifebuoy@3x.png\",\n      \"scale\" : \"3x\"\n    }\n  ],\n  \"info\" : {\n    \"version\" : 1,\n    \"author\" : \"xcode\"\n  }\n}"
  },
  {
    "path": "ArcBit/Images.xcassets/link.imageset/Contents.json",
    "content": "{\n  \"images\" : [\n    {\n      \"idiom\" : \"universal\",\n      \"scale\" : \"1x\"\n    },\n    {\n      \"idiom\" : \"universal\",\n      \"filename\" : \"link@2x.png\",\n      \"scale\" : \"2x\"\n    },\n    {\n      \"idiom\" : \"universal\",\n      \"filename\" : \"link@3x.png\",\n      \"scale\" : \"3x\"\n    }\n  ],\n  \"info\" : {\n    \"version\" : 1,\n    \"author\" : \"xcode\"\n  }\n}"
  },
  {
    "path": "ArcBit/Images.xcassets/twitter.imageset/Contents.json",
    "content": "{\n  \"images\" : [\n    {\n      \"idiom\" : \"universal\",\n      \"scale\" : \"1x\"\n    },\n    {\n      \"idiom\" : \"universal\",\n      \"filename\" : \"twitter@2x.png\",\n      \"scale\" : \"2x\"\n    },\n    {\n      \"idiom\" : \"universal\",\n      \"filename\" : \"twitter@3x.png\",\n      \"scale\" : \"3x\"\n    }\n  ],\n  \"info\" : {\n    \"version\" : 1,\n    \"author\" : \"xcode\"\n  }\n}"
  },
  {
    "path": "ArcBit/Images.xcassets/vault.imageset/Contents.json",
    "content": "{\n  \"images\" : [\n    {\n      \"idiom\" : \"universal\",\n      \"filename\" : \"vault.png\",\n      \"scale\" : \"1x\"\n    },\n    {\n      \"idiom\" : \"universal\",\n      \"filename\" : \"vault@2x.png\",\n      \"scale\" : \"2x\"\n    },\n    {\n      \"idiom\" : \"universal\",\n      \"filename\" : \"vault@3x.png\",\n      \"scale\" : \"3x\"\n    }\n  ],\n  \"info\" : {\n    \"version\" : 1,\n    \"author\" : \"xcode\"\n  }\n}"
  },
  {
    "path": "ArcBit/InAppSettings.bundle/Advanced.plist",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\n<plist version=\"1.0\">\n<dict>\n\t<key>Title</key>\n\t<string>ADVANCED_TITLE</string>\n\t<key>StringsTable</key>\n\t<string>Root</string>\n\t<key>PreferenceSpecifiers</key>\n\t<array>\n        <dict>\n            <key>Title</key>\n            <string>EMPTY</string>\n            <key>Type</key>\n            <string>PSGroupSpecifier</string>\n            <key>FooterText</key>\n            <string>ENABLE_COLD_WALLET_FOOTER</string>\n        </dict>\n        <dict>\n            <key>DefaultValue</key>\n            <string>NO</string>\n            <key>Key</key>\n            <string>enablecoldwallet</string>\n            <key>Title</key>\n            <string>ENABLE_COLD_WALLET</string>\n            <key>Type</key>\n            <string>PSToggleSwitchSpecifier</string>\n        </dict>\n        \n        <dict>\n            <key>Title</key>\n            <string>EMPTY</string>\n            <key>Type</key>\n            <string>PSGroupSpecifier</string>\n            <key>FooterText</key>\n            <string>ENABLE_ADVANCE_MODE_FOOTER</string>\n        </dict>\n        <dict>\n            <key>DefaultValue</key>\n            <string>NO</string>\n            <key>Key</key>\n            <string>enableadvancemode</string>\n            <key>Title</key>\n            <string>ENABLE_ADVANCE_MODE</string>\n            <key>Type</key>\n            <string>PSToggleSwitchSpecifier</string>\n        </dict>\n        \n        <dict>\n            <key>Title</key>\n            <string>EMPTY</string>\n            <key>Type</key>\n            <string>PSGroupSpecifier</string>\n        </dict>\n        <dict>\n            <key>DefaultValue</key>\n            <string>0</string>\n            <key>Key</key>\n            <string>blockexplorerapi</string>\n            <key>Title</key>\n            <string>BLOCKCHAIN_API_TYPE</string>\n            <key>Titles</key>\n            <array>\n                <string>BLOCKCHAIN_API_TYPE_1</string>\n                <string>BLOCKCHAIN_API_TYPE_2</string>\n            </array>\n            <key>Type</key>\n            <string>PSMultiValueSpecifier</string>\n            <key>Values</key>\n            <array>\n                <string>0</string>\n                <string>1</string>\n            </array>\n        </dict>\n        <dict>\n            <key>Key</key>\n            <string>blockexplorerurl</string>\n            <key>Type</key>\n            <string>PSTitleValueSpecifier</string>\n            <key>IASKTextAlignment</key>\n            <string>IASKUITextAlignmentCenter</string>\n        </dict>\n        <dict>\n            <key>Title</key>\n            <string>CHANGE_BLOCKEXPLORER_URL</string>\n            <key>Key</key>\n            <string>setblockexplorerurl</string>\n            <key>Type</key>\n            <string>IASKButtonSpecifier</string>\n        </dict>\n        \n        <dict>\n            <key>Title</key>\n            <string>EMPTY</string>\n            <key>Type</key>\n            <string>PSGroupSpecifier</string>\n            <key>FooterText</key>\n            <string>ENABLE_STEALTH_ADDRESS_DEFAULT_FOOTER</string>\n            <key>Key</key>\n            <string>stealthaddressfooter</string>\n        </dict>\n        <dict>\n            <key>DefaultValue</key>\n            <string>NO</string>\n            <key>Key</key>\n            <string>stealthaddressdefault</string>\n            <key>Title</key>\n            <string>ENABLE_STEALTH_ADDRESS_DEFAULT</string>\n            <key>Type</key>\n            <string>PSToggleSwitchSpecifier</string>\n        </dict>\n        \n        <dict>\n            <key>Title</key>\n            <string>EMPTY</string>\n            <key>Type</key>\n            <string>PSGroupSpecifier</string>\n            <key>FooterText</key>\n            <string>ENABLE_CAN_RESTORE_DELETED_APP_FOOTER</string>\n        </dict>\n        <dict>\n            <key>DefaultValue</key>\n            <string>NO</string>\n            <key>Key</key>\n            <string>canrestoredeletedapp</string>\n            <key>Title</key>\n            <string>ENABLE_CAN_RESTORE_DELETED_APP</string>\n            <key>Type</key>\n            <string>PSToggleSwitchSpecifier</string>\n        </dict>\n\n\t</array>\n</dict>\n</plist>\n"
  },
  {
    "path": "ArcBit/InAppSettings.bundle/Root.plist",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\n<plist version=\"1.0\">\n    <dict>\n        <key>PreferenceSpecifiers</key>\n        <array>\n            <dict>\n                <key>Title</key>\n                <string>EMPTY</string>\n                <key>Type</key>\n                <string>PSGroupSpecifier</string>\n            </dict>\n            <dict>\n                <key>DefaultValue</key>\n                <string>NO</string>\n                <key>Key</key>\n                <string>enablepincode</string>\n                <key>Title</key>\n                <string>ENABLE_PIN_CODE</string>\n                <key>Type</key>\n                <string>PSToggleSwitchSpecifier</string>\n            </dict>\n            <dict>\n                <key>Title</key>\n                <string>CHANGE_PIN_CODE</string>\n                <key>Key</key>\n                <string>changepincode</string>\n                <key>Type</key>\n                <string>IASKButtonSpecifier</string>\n            </dict>\n            \n            <dict>\n                <key>Title</key>\n                <string>EMPTY</string>\n                <key>Type</key>\n                <string>PSGroupSpecifier</string>\n            </dict>\n            <dict>\n                <key>DefaultValue</key>\n                <string>NO</string>\n                <key>Key</key>\n                <string>displaylocalcurrency</string>\n                <key>Title</key>\n                <string>DISPLAY_LOCAL_CURRENCY</string>\n                <key>Type</key>\n                <string>PSToggleSwitchSpecifier</string>\n            </dict>\n            \n            <dict>\n                <key>DefaultValue</key>\n                <string>0</string>\n                <key>Key</key>\n                <string>currency</string>\n                <key>Title</key>\n                <string>DEFAULT_CURRENCY</string>\n                <key>Titles</key>\n                <array>\n                    <string>DEFAULT_CURRENCY_1</string>\n                    <string>DEFAULT_CURRENCY_2</string>\n                    <string>DEFAULT_CURRENCY_3</string>\n                    <string>DEFAULT_CURRENCY_4</string>\n                    <string>DEFAULT_CURRENCY_5</string>\n                    <string>DEFAULT_CURRENCY_6</string>\n                    <string>DEFAULT_CURRENCY_7</string>\n                    <string>DEFAULT_CURRENCY_8</string>\n                    <string>DEFAULT_CURRENCY_9</string>\n                    <string>DEFAULT_CURRENCY_10</string>\n                    <string>DEFAULT_CURRENCY_11</string>\n                    <string>DEFAULT_CURRENCY_12</string>\n                    <string>DEFAULT_CURRENCY_13</string>\n                    <string>DEFAULT_CURRENCY_14</string>\n                    <string>DEFAULT_CURRENCY_15</string>\n                    <string>DEFAULT_CURRENCY_16</string>\n                    <string>DEFAULT_CURRENCY_17</string>\n                    <string>DEFAULT_CURRENCY_18</string>\n                    <string>DEFAULT_CURRENCY_19</string>\n                    <string>DEFAULT_CURRENCY_20</string>\n                    <string>DEFAULT_CURRENCY_21</string>\n                    <string>DEFAULT_CURRENCY_22</string>\n                    <string>DEFAULT_CURRENCY_23</string>\n                    <string>DEFAULT_CURRENCY_24</string>\n                    <string>DEFAULT_CURRENCY_25</string>\n                    <string>DEFAULT_CURRENCY_26</string>\n                    <string>DEFAULT_CURRENCY_27</string>\n                    <string>DEFAULT_CURRENCY_28</string>\n                    <string>DEFAULT_CURRENCY_29</string>\n                    <string>DEFAULT_CURRENCY_30</string>\n                    <string>DEFAULT_CURRENCY_31</string>\n                    <string>DEFAULT_CURRENCY_32</string>\n                    <string>DEFAULT_CURRENCY_33</string>\n                    <string>DEFAULT_CURRENCY_34</string>\n                    <string>DEFAULT_CURRENCY_35</string>\n                    <string>DEFAULT_CURRENCY_36</string>\n                    <string>DEFAULT_CURRENCY_37</string>\n                    <string>DEFAULT_CURRENCY_38</string>\n                    <string>DEFAULT_CURRENCY_39</string>\n                    <string>DEFAULT_CURRENCY_40</string>\n                    <string>DEFAULT_CURRENCY_41</string>\n                    <string>DEFAULT_CURRENCY_42</string>\n                    <string>DEFAULT_CURRENCY_43</string>\n                    <string>DEFAULT_CURRENCY_44</string>\n                    <string>DEFAULT_CURRENCY_45</string>\n                    <string>DEFAULT_CURRENCY_46</string>\n                    <string>DEFAULT_CURRENCY_47</string>\n                    <string>DEFAULT_CURRENCY_48</string>\n                    <string>DEFAULT_CURRENCY_49</string>\n                    <string>DEFAULT_CURRENCY_50</string>\n                    <string>DEFAULT_CURRENCY_51</string>\n                    <string>DEFAULT_CURRENCY_52</string>\n                    <string>DEFAULT_CURRENCY_53</string>\n                    <string>DEFAULT_CURRENCY_54</string>\n                    <string>DEFAULT_CURRENCY_55</string>\n                    <string>DEFAULT_CURRENCY_56</string>\n                    <string>DEFAULT_CURRENCY_57</string>\n                    <string>DEFAULT_CURRENCY_58</string>\n                    <string>DEFAULT_CURRENCY_59</string>\n                    <string>DEFAULT_CURRENCY_60</string>\n                    <string>DEFAULT_CURRENCY_61</string>\n                    <string>DEFAULT_CURRENCY_62</string>\n                    <string>DEFAULT_CURRENCY_63</string>\n                    <string>DEFAULT_CURRENCY_64</string>\n                    <string>DEFAULT_CURRENCY_65</string>\n                    <string>DEFAULT_CURRENCY_66</string>\n                    <string>DEFAULT_CURRENCY_67</string>\n                    <string>DEFAULT_CURRENCY_68</string>\n                    <string>DEFAULT_CURRENCY_69</string>\n                    <string>DEFAULT_CURRENCY_70</string>\n                    <string>DEFAULT_CURRENCY_71</string>\n                    <string>DEFAULT_CURRENCY_72</string>\n                    <string>DEFAULT_CURRENCY_73</string>\n                    <string>DEFAULT_CURRENCY_74</string>\n                    <string>DEFAULT_CURRENCY_75</string>\n                    <string>DEFAULT_CURRENCY_76</string>\n                    <string>DEFAULT_CURRENCY_77</string>\n                    <string>DEFAULT_CURRENCY_78</string>\n                    <string>DEFAULT_CURRENCY_79</string>\n                    <string>DEFAULT_CURRENCY_80</string>\n                    <string>DEFAULT_CURRENCY_81</string>\n                    <string>DEFAULT_CURRENCY_82</string>\n                    <string>DEFAULT_CURRENCY_83</string>\n                    <string>DEFAULT_CURRENCY_84</string>\n                    <string>DEFAULT_CURRENCY_85</string>\n                    <string>DEFAULT_CURRENCY_86</string>\n                    <string>DEFAULT_CURRENCY_87</string>\n                    <string>DEFAULT_CURRENCY_88</string>\n                    <string>DEFAULT_CURRENCY_89</string>\n                    <string>DEFAULT_CURRENCY_90</string>\n                    <string>DEFAULT_CURRENCY_91</string>\n                    <string>DEFAULT_CURRENCY_92</string>\n                    <string>DEFAULT_CURRENCY_93</string>\n                    <string>DEFAULT_CURRENCY_94</string>\n                    <string>DEFAULT_CURRENCY_95</string>\n                    <string>DEFAULT_CURRENCY_96</string>\n                    <string>DEFAULT_CURRENCY_97</string>\n                    <string>DEFAULT_CURRENCY_98</string>\n                    <string>DEFAULT_CURRENCY_99</string>\n                    <string>DEFAULT_CURRENCY_100</string>\n                    <string>DEFAULT_CURRENCY_101</string>\n                    <string>DEFAULT_CURRENCY_102</string>\n                    <string>DEFAULT_CURRENCY_103</string>\n                    <string>DEFAULT_CURRENCY_104</string>\n                    <string>DEFAULT_CURRENCY_105</string>\n                    <string>DEFAULT_CURRENCY_106</string>\n                    <string>DEFAULT_CURRENCY_107</string>\n                    <string>DEFAULT_CURRENCY_108</string>\n                    <string>DEFAULT_CURRENCY_109</string>\n                    <string>DEFAULT_CURRENCY_110</string>\n                    <string>DEFAULT_CURRENCY_111</string>\n                    <string>DEFAULT_CURRENCY_112</string>\n                    <string>DEFAULT_CURRENCY_113</string>\n                    <string>DEFAULT_CURRENCY_114</string>\n                    <string>DEFAULT_CURRENCY_115</string>\n                    <string>DEFAULT_CURRENCY_116</string>\n                    <string>DEFAULT_CURRENCY_117</string>\n                    <string>DEFAULT_CURRENCY_118</string>\n                    <string>DEFAULT_CURRENCY_119</string>\n                    <string>DEFAULT_CURRENCY_120</string>\n                    <string>DEFAULT_CURRENCY_121</string>\n                    <string>DEFAULT_CURRENCY_122</string>\n                    <string>DEFAULT_CURRENCY_123</string>\n                    <string>DEFAULT_CURRENCY_124</string>\n                    <string>DEFAULT_CURRENCY_125</string>\n                    <string>DEFAULT_CURRENCY_126</string>\n                    <string>DEFAULT_CURRENCY_127</string>\n                    <string>DEFAULT_CURRENCY_128</string>\n                    <string>DEFAULT_CURRENCY_129</string>\n                    <string>DEFAULT_CURRENCY_130</string>\n                    <string>DEFAULT_CURRENCY_131</string>\n                    <string>DEFAULT_CURRENCY_132</string>\n                    <string>DEFAULT_CURRENCY_133</string>\n                    <string>DEFAULT_CURRENCY_134</string>\n                    <string>DEFAULT_CURRENCY_135</string>\n                    <string>DEFAULT_CURRENCY_136</string>\n                    <string>DEFAULT_CURRENCY_137</string>\n                    <string>DEFAULT_CURRENCY_138</string>\n                    <string>DEFAULT_CURRENCY_139</string>\n                    <string>DEFAULT_CURRENCY_140</string>\n                    <string>DEFAULT_CURRENCY_141</string>\n                    <string>DEFAULT_CURRENCY_142</string>\n                    <string>DEFAULT_CURRENCY_143</string>\n                    <string>DEFAULT_CURRENCY_144</string>\n                    <string>DEFAULT_CURRENCY_145</string>\n                    <string>DEFAULT_CURRENCY_146</string>\n                    <string>DEFAULT_CURRENCY_147</string>\n                    <string>DEFAULT_CURRENCY_148</string>\n                    <string>DEFAULT_CURRENCY_149</string>\n                    <string>DEFAULT_CURRENCY_150</string>\n                    <string>DEFAULT_CURRENCY_151</string>\n                    <string>DEFAULT_CURRENCY_152</string>\n                    <string>DEFAULT_CURRENCY_153</string>\n                    <string>DEFAULT_CURRENCY_154</string>\n                    <string>DEFAULT_CURRENCY_155</string>\n                    <string>DEFAULT_CURRENCY_156</string>\n                    <string>DEFAULT_CURRENCY_157</string>\n                    <string>DEFAULT_CURRENCY_158</string>\n                </array>\n                <key>Type</key>\n                <string>PSMultiValueSpecifier</string>\n                <key>Values</key>\n                <array>\n                    <string>0</string>\n                    <string>1</string>\n                    <string>2</string>\n                    <string>3</string>\n                    <string>4</string>\n                    <string>5</string>\n                    <string>6</string>\n                    <string>7</string>\n                    <string>8</string>\n                    <string>9</string>\n                    <string>10</string>\n                    <string>11</string>\n                    <string>12</string>\n                    <string>13</string>\n                    <string>14</string>\n                    <string>15</string>\n                    <string>16</string>\n                    <string>17</string>\n                    <string>18</string>\n                    <string>19</string>\n                    <string>20</string>\n                    <string>21</string>\n                    <string>22</string>\n                    <string>23</string>\n                    <string>24</string>\n                    <string>25</string>\n                    <string>26</string>\n                    <string>27</string>\n                    <string>28</string>\n                    <string>29</string>\n                    <string>30</string>\n                    <string>31</string>\n                    <string>32</string>\n                    <string>33</string>\n                    <string>34</string>\n                    <string>35</string>\n                    <string>36</string>\n                    <string>37</string>\n                    <string>38</string>\n                    <string>39</string>\n                    <string>40</string>\n                    <string>41</string>\n                    <string>42</string>\n                    <string>43</string>\n                    <string>44</string>\n                    <string>45</string>\n                    <string>46</string>\n                    <string>47</string>\n                    <string>48</string>\n                    <string>49</string>\n                    <string>50</string>\n                    <string>51</string>\n                    <string>52</string>\n                    <string>53</string>\n                    <string>54</string>\n                    <string>55</string>\n                    <string>56</string>\n                    <string>57</string>\n                    <string>58</string>\n                    <string>59</string>\n                    <string>60</string>\n                    <string>61</string>\n                    <string>62</string>\n                    <string>63</string>\n                    <string>64</string>\n                    <string>65</string>\n                    <string>66</string>\n                    <string>67</string>\n                    <string>68</string>\n                    <string>69</string>\n                    <string>70</string>\n                    <string>71</string>\n                    <string>72</string>\n                    <string>73</string>\n                    <string>74</string>\n                    <string>75</string>\n                    <string>76</string>\n                    <string>77</string>\n                    <string>78</string>\n                    <string>79</string>\n                    <string>80</string>\n                    <string>81</string>\n                    <string>82</string>\n                    <string>83</string>\n                    <string>84</string>\n                    <string>85</string>\n                    <string>86</string>\n                    <string>87</string>\n                    <string>88</string>\n                    <string>89</string>\n                    <string>90</string>\n                    <string>91</string>\n                    <string>92</string>\n                    <string>93</string>\n                    <string>94</string>\n                    <string>95</string>\n                    <string>96</string>\n                    <string>97</string>\n                    <string>98</string>\n                    <string>99</string>\n                    <string>100</string>\n                    <string>101</string>\n                    <string>102</string>\n                    <string>103</string>\n                    <string>104</string>\n                    <string>105</string>\n                    <string>106</string>\n                    <string>107</string>\n                    <string>108</string>\n                    <string>109</string>\n                    <string>110</string>\n                    <string>111</string>\n                    <string>112</string>\n                    <string>113</string>\n                    <string>114</string>\n                    <string>115</string>\n                    <string>116</string>\n                    <string>117</string>\n                    <string>118</string>\n                    <string>119</string>\n                    <string>120</string>\n                    <string>121</string>\n                    <string>122</string>\n                    <string>123</string>\n                    <string>124</string>\n                    <string>125</string>\n                    <string>126</string>\n                    <string>127</string>\n                    <string>128</string>\n                    <string>129</string>\n                    <string>130</string>\n                    <string>131</string>\n                    <string>132</string>\n                    <string>133</string>\n                    <string>134</string>\n                    <string>135</string>\n                    <string>136</string>\n                    <string>137</string>\n                    <string>138</string>\n                    <string>139</string>\n                    <string>140</string>\n                    <string>141</string>\n                    <string>142</string>\n                    <string>143</string>\n                    <string>144</string>\n                    <string>145</string>\n                    <string>146</string>\n                    <string>147</string>\n                    <string>148</string>\n                    <string>149</string>\n                    <string>150</string>\n                    <string>151</string>\n                    <string>152</string>\n                    <string>153</string>\n                    <string>154</string>\n                    <string>155</string>\n                    <string>156</string>\n                    <string>157</string>\n                </array>\n            </dict>\n            \n            <dict>\n                <key>DefaultValue</key>\n                <string>0</string>\n                <key>Key</key>\n                <string>bitcoindisplay</string>\n                <key>Title</key>\n                <string>BITCOIN_DISPLAY</string>\n                <key>Titles</key>\n                <array>\n                    <string>BITCOIN_DISPLAY_1</string>\n                    <string>BITCOIN_DISPLAY_2</string>\n                    <string>BITCOIN_DISPLAY_3</string>\n                </array>\n                <key>Type</key>\n                <string>PSMultiValueSpecifier</string>\n                <key>Values</key>\n                <array>\n                    <string>0</string>\n                    <string>1</string>\n                    <string>2</string>\n                </array>\n            </dict>\n        \n            \n            <dict>\n                <key>Title</key>\n                <string>EMPTY</string>\n                <key>Type</key>\n                <string>PSGroupSpecifier</string>\n            </dict>\n            <dict>\n                <key>DefaultValue</key>\n                <string>NO</string>\n                <key>Key</key>\n                <string>enabledynamicfee</string>\n                <key>Title</key>\n                <string>ENABLE_DYNAMIC_FEE</string>\n                <key>Type</key>\n                <string>PSToggleSwitchSpecifier</string>\n            </dict>\n            <dict>\n                <key>Key</key>\n                <string>transactionfee</string>\n                <key>Type</key>\n                <string>PSTitleValueSpecifier</string>\n                <key>IASKTextAlignment</key>\n                <string>IASKUITextAlignmentCenter</string>\n            </dict>\n            <dict>\n                <key>Title</key>\n                <string>SET_FIXED_TRANSACTION_FEE</string>\n                <key>Key</key>\n                <string>settransactionfee</string>\n                <key>Type</key>\n                <string>IASKButtonSpecifier</string>\n            </dict>\n            \n            <dict>\n                <key>DefaultValue</key>\n                <string>0</string>\n                <key>Key</key>\n                <string>dynamicfeeoption</string>\n                <key>Title</key>\n                <string>CONFIRMATION_TIME</string>\n                <key>Titles</key>\n                <array>\n                    <string>DYNAMIC_FEE_OPTION_1</string>\n                    <string>DYNAMIC_FEE_OPTION_2</string>\n                    <string>DYNAMIC_FEE_OPTION_3</string>\n                </array>\n                <key>Type</key>\n                <string>PSMultiValueSpecifier</string>\n                <key>Values</key>\n                <array>\n                    <string>0</string>\n                    <string>1</string>\n                    <string>2</string>\n                </array>\n            </dict>\n            \n            <dict>\n                <key>Title</key>\n                <string>EMPTY</string>\n                <key>Type</key>\n                <string>PSGroupSpecifier</string>\n            </dict>\n            <dict>\n                <key>Title</key>\n                <string>SHOW_PASSPHRASE</string>\n                <key>Key</key>\n                <string>showpassphrase</string>\n                <key>Type</key>\n                <string>IASKButtonSpecifier</string>\n            </dict>\n\n            <dict>\n                <key>Title</key>\n                <string>EMPTY</string>\n                <key>Type</key>\n                <string>PSGroupSpecifier</string>\n            </dict>\n            <dict>\n                <key>Title</key>\n                <string>RESTORE_WALLET</string>\n                <key>Key</key>\n                <string>restorewallet</string>\n                <key>Type</key>\n                <string>IASKButtonSpecifier</string>\n            </dict>\n\n            \n            <dict>\n                <key>Title</key>\n                <string>EMPTY</string>\n                <key>Type</key>\n                <string>PSGroupSpecifier</string>\n            </dict>\n            <dict>\n                <key>Type</key>\n                <string>PSChildPaneSpecifier</string>\n                <key>Title</key>\n                <string>ADVANCED_TITLE</string>\n                <key>File</key>\n                <string>Advanced</string>\n            </dict>\n\n        </array>\n        <key>StringsTable</key>\n        <string>Root</string>\n        <key>Title</key>\n        <string>WhereTo</string>\n    </dict>\n</plist>\n"
  },
  {
    "path": "ArcBit/InAppSettings.bundle/de.lproj/Root.strings",
    "content": "\"DEFAULT_CURRENCY\"      = \"Währung\";\n\"DEFAULT_CURRENCY_1\"             = \"$ - AUD\";\n\"DEFAULT_CURRENCY_2\"             = \"R$ - BRL\";\n\"DEFAULT_CURRENCY_3\"             = \"$ - CAD\";\n\"DEFAULT_CURRENCY_4\"             = \"CHF - CHF\";\n\"DEFAULT_CURRENCY_5\"             = \"$ - CLP\";\n\"DEFAULT_CURRENCY_6\"             = \"¥ - CNY\";\n\"DEFAULT_CURRENCY_7\"             = \"kr - DKK\";\n\"DEFAULT_CURRENCY_8\"             = \"€ - EUR\";\n\"DEFAULT_CURRENCY_9\"             = \"£ - GBP\";\n\"DEFAULT_CURRENCY_10\"             = \"$ - HKD\";\n\"DEFAULT_CURRENCY_11\"             = \"kr - ISK\";\n\"DEFAULT_CURRENCY_12\"             = \"¥ - JPY\";\n\"DEFAULT_CURRENCY_13\"             = \"₩ - KRW\";\n\"DEFAULT_CURRENCY_14\"             = \"$ - NZD\";\n\"DEFAULT_CURRENCY_15\"             = \"zł - PLN\";\n\"DEFAULT_CURRENCY_16\"             = \"RUB - RUB\";\n\"DEFAULT_CURRENCY_17\"             = \"kr - SEK\";\n\"DEFAULT_CURRENCY_18\"             = \"$ - SGD\";\n\"DEFAULT_CURRENCY_19\"             = \"฿ - THB\";\n\"DEFAULT_CURRENCY_20\"             = \"$ - TWD\";\n\"DEFAULT_CURRENCY_21\"             = \"$ - USD\";\n\"DEFAULT_CURRENCY_22\"             = \"UAE Dirham - AED\";\n\"DEFAULT_CURRENCY_23\"             = \"Afghan Afghani - AFN\";\n\"DEFAULT_CURRENCY_24\"             = \"Albanian Lek - ALL\";\n\"DEFAULT_CURRENCY_25\"             = \"Armenian Dram - AMD\";\n\"DEFAULT_CURRENCY_26\"             = \"Netherlands Antillean Guilder - ANG\";\n\"DEFAULT_CURRENCY_27\"             = \"Angolan Kwanza - AOA\";\n\"DEFAULT_CURRENCY_28\"             = \"Argentine Peso - ARS\";\n\"DEFAULT_CURRENCY_29\"             = \"Aruban Florin - AWG\";\n\"DEFAULT_CURRENCY_30\"             = \"Azerbaijani Manat - AZN\";\n\"DEFAULT_CURRENCY_31\"             = \"Bosnia-Herzegovina Convertible Mark - BAM\";\n\"DEFAULT_CURRENCY_32\"             = \"Barbadian Dollar - BBD\";\n\"DEFAULT_CURRENCY_33\"             = \"Bangladeshi Taka - BDT\";\n\"DEFAULT_CURRENCY_34\"             = \"Bulgarian Lev - BGN\";\n\"DEFAULT_CURRENCY_35\"             = \"Bahraini Dinar - BHD\";\n\"DEFAULT_CURRENCY_36\"             = \"Burundian Franc - BIF\";\n\"DEFAULT_CURRENCY_37\"             = \"Bermudan Dollar - BMD\";\n\"DEFAULT_CURRENCY_38\"             = \"Brunei Dollar - BND\";\n\"DEFAULT_CURRENCY_39\"             = \"Bolivian Boliviano - BOB\";\n\"DEFAULT_CURRENCY_40\"             = \"Bahamian Dollar - BSD\";\n\"DEFAULT_CURRENCY_41\"             = \"Bhutanese Ngultrum - BTN\";\n\"DEFAULT_CURRENCY_42\"             = \"Botswanan Pula - BWP\";\n\"DEFAULT_CURRENCY_43\"             = \"Belarusian Ruble - BYR\";\n\"DEFAULT_CURRENCY_44\"             = \"Belize Dollar - BZD\";\n\"DEFAULT_CURRENCY_45\"             = \"Congolese Franc - CDF\";\n\"DEFAULT_CURRENCY_46\"             = \"Chilean Unit of Account (UF) - CLF\";\n\"DEFAULT_CURRENCY_47\"             = \"Colombian Peso - COP\";\n\"DEFAULT_CURRENCY_48\"             = \"Costa Rican Colón - CRC\";\n\"DEFAULT_CURRENCY_49\"             = \"Cape Verdean Escudo - CVE\";\n\"DEFAULT_CURRENCY_50\"             = \"Czech Koruna - CZK\";\n\"DEFAULT_CURRENCY_51\"             = \"Djiboutian Franc - DJF\";\n\"DEFAULT_CURRENCY_52\"             = \"Dominican Peso - DOP\";\n\"DEFAULT_CURRENCY_53\"             = \"Algerian Dinar - DZD\";\n\"DEFAULT_CURRENCY_54\"             = \"Estonian Kroon - EEK\";\n\"DEFAULT_CURRENCY_55\"             = \"Egyptian Pound - EGP\";\n\"DEFAULT_CURRENCY_56\"             = \"Ethiopian Birr - ETB\";\n\"DEFAULT_CURRENCY_57\"             = \"Fijian Dollar - FJD\";\n\"DEFAULT_CURRENCY_58\"             = \"Falkland Islands Pound - FKP\";\n\"DEFAULT_CURRENCY_59\"             = \"Georgian Lari - GEL\";\n\"DEFAULT_CURRENCY_60\"             = \"Ghanaian Cedi - GHS\";\n\"DEFAULT_CURRENCY_61\"             = \"Gibraltar Pound - GIP\";\n\"DEFAULT_CURRENCY_62\"             = \"Gambian Dalasi - GMD\";\n\"DEFAULT_CURRENCY_63\"             = \"Guinean Franc - GNF\";\n\"DEFAULT_CURRENCY_64\"             = \"Guatemalan Quetzal - GTQ\";\n\"DEFAULT_CURRENCY_65\"             = \"Guyanaese Dollar - GYD\";\n\"DEFAULT_CURRENCY_66\"             = \"Honduran Lempira - HNL\";\n\"DEFAULT_CURRENCY_67\"             = \"Croatian Kuna - HRK\";\n\"DEFAULT_CURRENCY_68\"             = \"Haitian Gourde - HTG\";\n\"DEFAULT_CURRENCY_69\"             = \"Hungarian Forint - HUF\";\n\"DEFAULT_CURRENCY_70\"             = \"Indonesian Rupiah - IDR\";\n\"DEFAULT_CURRENCY_71\"             = \"Israeli Shekel - ILS\";\n\"DEFAULT_CURRENCY_72\"             = \"Indian Rupee - INR\";\n\"DEFAULT_CURRENCY_73\"             = \"Iraqi Dinar - IQD\";\n\"DEFAULT_CURRENCY_74\"             = \"Jersey Pound - JEP\";\n\"DEFAULT_CURRENCY_75\"             = \"Jamaican Dollar - JMD\";\n\"DEFAULT_CURRENCY_76\"             = \"Jordanian Dinar - JOD\";\n\"DEFAULT_CURRENCY_77\"             = \"Kenyan Shilling - KES\";\n\"DEFAULT_CURRENCY_78\"             = \"Kyrgystani Som - KGS\";\n\"DEFAULT_CURRENCY_79\"             = \"Cambodian Riel - KHR\";\n\"DEFAULT_CURRENCY_80\"             = \"Comorian Franc - KMF\";\n\"DEFAULT_CURRENCY_81\"             = \"Kuwaiti Dinar - KWD\";\n\"DEFAULT_CURRENCY_82\"             = \"Cayman Islands Dollar - KYD\";\n\"DEFAULT_CURRENCY_83\"             = \"Kazakhstani Tenge - KZT\";\n\"DEFAULT_CURRENCY_84\"             = \"Laotian Kip - LAK\";\n\"DEFAULT_CURRENCY_85\"             = \"Lebanese Pound - LBP\";\n\"DEFAULT_CURRENCY_86\"             = \"Sri Lankan Rupee - LKR\";\n\"DEFAULT_CURRENCY_87\"             = \"Liberian Dollar - LRD\";\n\"DEFAULT_CURRENCY_88\"             = \"Lesotho Loti - LSL\";\n\"DEFAULT_CURRENCY_89\"             = \"Lithuanian Litas - LTL\";\n\"DEFAULT_CURRENCY_90\"             = \"Latvian Lats - LVL\";\n\"DEFAULT_CURRENCY_91\"             = \"Libyan Dinar - LYD\";\n\"DEFAULT_CURRENCY_92\"             = \"Moroccan Dirham - MAD\";\n\"DEFAULT_CURRENCY_93\"             = \"Moldovan Leu - MDL\";\n\"DEFAULT_CURRENCY_94\"             = \"Malagasy Ariary - MGA\";\n\"DEFAULT_CURRENCY_95\"             = \"Macedonian Denar - MKD\";\n\"DEFAULT_CURRENCY_96\"             = \"Myanma Kyat - MMK\";\n\"DEFAULT_CURRENCY_97\"             = \"Mongolian Tugrik - MNT\";\n\"DEFAULT_CURRENCY_98\"             = \"Macanese Pataca - MOP\";\n\"DEFAULT_CURRENCY_99\"             = \"Mauritanian Ouguiya - MRO\";\n\"DEFAULT_CURRENCY_100\"             = \"Mauritian Rupee - MUR\";\n\"DEFAULT_CURRENCY_101\"             = \"Maldivian Rufiyaa - MVR\";\n\"DEFAULT_CURRENCY_102\"             = \"Malawian Kwacha - MWK\";\n\"DEFAULT_CURRENCY_103\"             = \"Mexican Peso - MXN\";\n\"DEFAULT_CURRENCY_104\"             = \"Malaysian Ringgit - MYR\";\n\"DEFAULT_CURRENCY_105\"             = \"Mozambican Metical - MZN\";\n\"DEFAULT_CURRENCY_106\"             = \"Namibian Dollar - NAD\";\n\"DEFAULT_CURRENCY_107\"             = \"Nigerian Naira - NGN\";\n\"DEFAULT_CURRENCY_108\"             = \"Nicaraguan Córdoba - NIO\";\n\"DEFAULT_CURRENCY_109\"             = \"Norwegian Krone - NOK\";\n\"DEFAULT_CURRENCY_110\"             = \"Nepalese Rupee - NPR\";\n\"DEFAULT_CURRENCY_111\"             = \"Omani Rial - OMR\";\n\"DEFAULT_CURRENCY_112\"             = \"Panamanian Balboa - PAB\";\n\"DEFAULT_CURRENCY_113\"             = \"Peruvian Nuevo Sol - PEN\";\n\"DEFAULT_CURRENCY_114\"             = \"Papua New Guinean Kina - PGK\";\n\"DEFAULT_CURRENCY_115\"             = \"Philippine Peso - PHP\";\n\"DEFAULT_CURRENCY_116\"             = \"Pakistani Rupee - PKR\";\n\"DEFAULT_CURRENCY_117\"             = \"Paraguayan Guarani - PYG\";\n\"DEFAULT_CURRENCY_118\"             = \"Qatari Rial - QAR\";\n\"DEFAULT_CURRENCY_119\"             = \"Romanian Leu - RON\";\n\"DEFAULT_CURRENCY_120\"             = \"Serbian Dinar - RSD\";\n\"DEFAULT_CURRENCY_121\"             = \"Rwandan Franc - RWF\";\n\"DEFAULT_CURRENCY_122\"             = \"Saudi Riyal - SAR\";\n\"DEFAULT_CURRENCY_123\"             = \"Solomon Islands Dollar - SBD\";\n\"DEFAULT_CURRENCY_124\"             = \"Seychellois Rupee - SCR\";\n\"DEFAULT_CURRENCY_125\"             = \"Sudanese Pound - SDG\";\n\"DEFAULT_CURRENCY_126\"             = \"Saint Helena Pound - SHP\";\n\"DEFAULT_CURRENCY_127\"             = \"Sierra Leonean Leone - SLL\";\n\"DEFAULT_CURRENCY_128\"             = \"Somali Shilling - SOS\";\n\"DEFAULT_CURRENCY_129\"             = \"Surinamese Dollar - SRD\";\n\"DEFAULT_CURRENCY_130\"             = \"São Tomé and Príncipe Dobra - STD\";\n\"DEFAULT_CURRENCY_131\"             = \"Salvadoran Colón - SVC\";\n\"DEFAULT_CURRENCY_132\"             = \"Syrian Pound - SYP\";\n\"DEFAULT_CURRENCY_133\"             = \"Swazi Lilangeni - SZL\";\n\"DEFAULT_CURRENCY_134\"             = \"Tajikistani Somoni - TJS\";\n\"DEFAULT_CURRENCY_135\"             = \"Turkmenistani Manat - TMT\";\n\"DEFAULT_CURRENCY_136\"             = \"Tunisian Dinar - TND\";\n\"DEFAULT_CURRENCY_137\"             = \"Tongan Paʻanga - TOP\";\n\"DEFAULT_CURRENCY_138\"             = \"Turkish Lira - TRY\";\n\"DEFAULT_CURRENCY_139\"             = \"Trinidad and Tobago Dollar - TTD\";\n\"DEFAULT_CURRENCY_140\"             = \"Tanzanian Shilling - TZS\";\n\"DEFAULT_CURRENCY_141\"             = \"Ukrainian Hryvnia - UAH\";\n\"DEFAULT_CURRENCY_142\"             = \"Ugandan Shilling - UGX\";\n\"DEFAULT_CURRENCY_143\"             = \"Uruguayan Peso - UYU\";\n\"DEFAULT_CURRENCY_144\"             = \"Uzbekistan Som - UZS\";\n\"DEFAULT_CURRENCY_145\"             = \"Venezuelan Bolívar Fuerte - VEF\";\n\"DEFAULT_CURRENCY_146\"             = \"Vietnamese Dong - VND\";\n\"DEFAULT_CURRENCY_147\"             = \"Vanuatu Vatu - VUV\";\n\"DEFAULT_CURRENCY_148\"             = \"Samoan Tala - WST\";\n\"DEFAULT_CURRENCY_149\"             = \"CFA Franc BEAC - XAF\";\n\"DEFAULT_CURRENCY_150\"             = \"Silver (troy ounce) - XAG\";\n\"DEFAULT_CURRENCY_151\"             = \"Gold (troy ounce) - XAU\";\n\"DEFAULT_CURRENCY_152\"             = \"East Caribbean Dollar - XCD\";\n\"DEFAULT_CURRENCY_153\"             = \"CFA Franc BCEAO - XOF\";\n\"DEFAULT_CURRENCY_154\"             = \"CFP Franc - XPF\";\n\"DEFAULT_CURRENCY_155\"             = \"Yemeni Rial - YER\";\n\"DEFAULT_CURRENCY_156\"             = \"South African Rand - ZAR\";\n\"DEFAULT_CURRENCY_157\"             = \"Zambian Kwacha - ZMW\";\n\"DEFAULT_CURRENCY_158\"             = \"Zimbabwean Dollar - ZWL\";\n\n\n\"BITCOIN_DISPLAY\"      = \"Bitcoin Einheit\";\n\"BLOCKCHAIN_API_TYPE\"      = \"Block Explorer API Typ\";\n\n\"CHANGE_BLOCKEXPLORER_URL\"      = \"Wechsel Blockexplorer URL\";\n\n\"BLOCKCHAIN_API_TYPE_1\"             = \"blockchain.info\";\n\"BLOCKCHAIN_API_TYPE_2\"             = \"Bitpay's Insight\";\n\n\n\"ADVANCED_TITLE\"             = \"Erweiterte Einstellunge\";\n\n\"BITCOIN_DISPLAY_1\"             = \"Bitcoin - BTC\";\n\"BITCOIN_DISPLAY_2\"             = \"MilliBit - mBTC\";\n\"BITCOIN_DISPLAY_3\"             = \"Bits - uBTC\";\n\n\"ENABLE_PIN_CODE\"              = \"Aktiviere PIN\";\n\"SHOW_PASSPHRASE\"              = \"Zeige Backup Wortfolge\";\n\"RESTORE_WALLET\"              = \"Stelle das Wallet wieder her\";\n\n\"DISPLAY_LOCAL_CURRENCY\"    = \"Zeige locale Währung\";\n\"FEE_AMOUNT_IN_BITCOINS\"              = \"Gebührenbetrag in Bitcoins\";\n\n\"ENABLE_DYNAMIC_FEE\"              = \"Aktiviere dynamische Gebühr\";\n\"CONFIRMATION_TIME\"              = \"Bestätigungszeit\";\n\"DYNAMIC_FEE_OPTION_1\"              = \"So schnell wie möglich\";\n\"DYNAMIC_FEE_OPTION_2\"              = \"Durchschnittlich 30 Minuten\";\n\"DYNAMIC_FEE_OPTION_3\"              = \"Durchschnittlich 60 Minuten\";\n\n\"ENABLE_COLD_WALLET_FOOTER\"              = \"Das aktivieren der offline Brieftasche erhöht die Sicherheit, erfordert jedoch auch zwei Geräte. Eines, dass täglich genutzte, hat eine Verbindung zum Internet. Das andere nicht, wodurch es vor Einflüssen von außen geschützt ist.\";\n\"ENABLE_COLD_WALLET\"              = \"Aktiviere das Offline Brieftasche\";\n\n\"ENABLE_ADVANCE_MODE_FOOTER\"              = \"Der fortgeschrittenen Modus ermögliche den Import von privaten Schlüsseln und Adressen. Bitte beachte, dass die Wortfolge nicht den privaten Schlüssel wiederherstellen kann. Diesen solltest du getrennt sichern. Alle Features findest du wenn du den Modus aktivierst und dann zu Hilfe wechselst.\";\n\"ENABLE_ADVANCE_MODE\"              = \"Aktiviere den fortgeschrittenen Modus\";\n\n\n\"SET_FIXED_TRANSACTION_FEE\"             = \"Bestimme eine feste Gebühr\";\n\"CHANGE_PIN_CODE\"                 = \"PIN ändern\";\n\"EMPTY\"                           = \"\";\n\"VERSION\"                         = \"Version\";\n\"ABOUT_TITLE\"                     = \"Über\";\n\n\"ENABLE_SOUND_NOTIFICATION\"             = \"Soundbenachrichtigung\";\n\n\"EMAIL_SUPPORT\"             = \"Email Unterstützung\";\n\n\"ENABLE_STEALTH_ADDRESS_DEFAULT_FOOTER\" = \"Das aktivieren der wiederverwendbaren Adressen zeigt alle wiederverwendbaren Adressen auf dem zugehörigen Tap ganz vorne an.\";\n\"ENABLE_STEALTH_ADDRESS_DEFAULT\" = \"Standart Adresse\";\n\n\n\"ENABLE_CAN_RESTORE_DELETED_APP_FOOTER\" = \"Mit dieser Funktion können Sie Ihre native ArcBit-Wallet wiederherstellen, wenn Sie diese App löschen. Ihre Backup-Passphrase wird in Ihrem Schlüsselbund gespeichert. Wenn Sie diese Funktion aktivieren, kann eine neu installierte App sie lesen. Diese Funktion ermöglicht keine Wiederherstellung von Brieftaschen oder Adressen, die Sie in andere Konten importiert haben.\";\n\"ENABLE_CAN_RESTORE_DELETED_APP\" = \"Wiederherstellbar\";\n\n\"ARCBIT_CONTRIBUTORS_LIST\"    = \"ArcBit Beitragsliste\";\n\"CONTRIBUTORS_LIST\"    = \"Liste der Mitwirkenden\";\n\"CONTRIBUTOR_1\"    = \"Mikhail Barinov\";\n\"CONTRIBUTOR_2\"    = \"Tomáš Horváth\";\n\"CONTRIBUTOR_3\"    = \"David Johnson\";\n\"CONTRIBUTOR_4\"    = \"汉服骑射\";\n\n\n"
  },
  {
    "path": "ArcBit/InAppSettings.bundle/es.lproj/Root.strings",
    "content": "\"DEFAULT_CURRENCY\"      = \"Moneda\";\n\"DEFAULT_CURRENCY_1\"             = \"$ - AUD\";\n\"DEFAULT_CURRENCY_2\"             = \"R$ - BRL\";\n\"DEFAULT_CURRENCY_3\"             = \"$ - CAD\";\n\"DEFAULT_CURRENCY_4\"             = \"CHF - CHF\";\n\"DEFAULT_CURRENCY_5\"             = \"$ - CLP\";\n\"DEFAULT_CURRENCY_6\"             = \"¥ - CNY\";\n\"DEFAULT_CURRENCY_7\"             = \"kr - DKK\";\n\"DEFAULT_CURRENCY_8\"             = \"€ - EUR\";\n\"DEFAULT_CURRENCY_9\"             = \"£ - GBP\";\n\"DEFAULT_CURRENCY_10\"             = \"$ - HKD\";\n\"DEFAULT_CURRENCY_11\"             = \"kr - ISK\";\n\"DEFAULT_CURRENCY_12\"             = \"¥ - JPY\";\n\"DEFAULT_CURRENCY_13\"             = \"₩ - KRW\";\n\"DEFAULT_CURRENCY_14\"             = \"$ - NZD\";\n\"DEFAULT_CURRENCY_15\"             = \"zł - PLN\";\n\"DEFAULT_CURRENCY_16\"             = \"RUB - RUB\";\n\"DEFAULT_CURRENCY_17\"             = \"kr - SEK\";\n\"DEFAULT_CURRENCY_18\"             = \"$ - SGD\";\n\"DEFAULT_CURRENCY_19\"             = \"฿ - THB\";\n\"DEFAULT_CURRENCY_20\"             = \"$ - TWD\";\n\"DEFAULT_CURRENCY_21\"             = \"$ - USD\";\n\"DEFAULT_CURRENCY_22\"             = \"UAE Dirham - AED\";\n\"DEFAULT_CURRENCY_23\"             = \"Afghan Afghani - AFN\";\n\"DEFAULT_CURRENCY_24\"             = \"Albanian Lek - ALL\";\n\"DEFAULT_CURRENCY_25\"             = \"Armenian Dram - AMD\";\n\"DEFAULT_CURRENCY_26\"             = \"Netherlands Antillean Guilder - ANG\";\n\"DEFAULT_CURRENCY_27\"             = \"Angolan Kwanza - AOA\";\n\"DEFAULT_CURRENCY_28\"             = \"Argentine Peso - ARS\";\n\"DEFAULT_CURRENCY_29\"             = \"Aruban Florin - AWG\";\n\"DEFAULT_CURRENCY_30\"             = \"Azerbaijani Manat - AZN\";\n\"DEFAULT_CURRENCY_31\"             = \"Bosnia-Herzegovina Convertible Mark - BAM\";\n\"DEFAULT_CURRENCY_32\"             = \"Barbadian Dollar - BBD\";\n\"DEFAULT_CURRENCY_33\"             = \"Bangladeshi Taka - BDT\";\n\"DEFAULT_CURRENCY_34\"             = \"Bulgarian Lev - BGN\";\n\"DEFAULT_CURRENCY_35\"             = \"Bahraini Dinar - BHD\";\n\"DEFAULT_CURRENCY_36\"             = \"Burundian Franc - BIF\";\n\"DEFAULT_CURRENCY_37\"             = \"Bermudan Dollar - BMD\";\n\"DEFAULT_CURRENCY_38\"             = \"Brunei Dollar - BND\";\n\"DEFAULT_CURRENCY_39\"             = \"Bolivian Boliviano - BOB\";\n\"DEFAULT_CURRENCY_40\"             = \"Bahamian Dollar - BSD\";\n\"DEFAULT_CURRENCY_41\"             = \"Bhutanese Ngultrum - BTN\";\n\"DEFAULT_CURRENCY_42\"             = \"Botswanan Pula - BWP\";\n\"DEFAULT_CURRENCY_43\"             = \"Belarusian Ruble - BYR\";\n\"DEFAULT_CURRENCY_44\"             = \"Belize Dollar - BZD\";\n\"DEFAULT_CURRENCY_45\"             = \"Congolese Franc - CDF\";\n\"DEFAULT_CURRENCY_46\"             = \"Chilean Unit of Account (UF) - CLF\";\n\"DEFAULT_CURRENCY_47\"             = \"Colombian Peso - COP\";\n\"DEFAULT_CURRENCY_48\"             = \"Costa Rican Colón - CRC\";\n\"DEFAULT_CURRENCY_49\"             = \"Cape Verdean Escudo - CVE\";\n\"DEFAULT_CURRENCY_50\"             = \"Czech Koruna - CZK\";\n\"DEFAULT_CURRENCY_51\"             = \"Djiboutian Franc - DJF\";\n\"DEFAULT_CURRENCY_52\"             = \"Dominican Peso - DOP\";\n\"DEFAULT_CURRENCY_53\"             = \"Algerian Dinar - DZD\";\n\"DEFAULT_CURRENCY_54\"             = \"Estonian Kroon - EEK\";\n\"DEFAULT_CURRENCY_55\"             = \"Egyptian Pound - EGP\";\n\"DEFAULT_CURRENCY_56\"             = \"Ethiopian Birr - ETB\";\n\"DEFAULT_CURRENCY_57\"             = \"Fijian Dollar - FJD\";\n\"DEFAULT_CURRENCY_58\"             = \"Falkland Islands Pound - FKP\";\n\"DEFAULT_CURRENCY_59\"             = \"Georgian Lari - GEL\";\n\"DEFAULT_CURRENCY_60\"             = \"Ghanaian Cedi - GHS\";\n\"DEFAULT_CURRENCY_61\"             = \"Gibraltar Pound - GIP\";\n\"DEFAULT_CURRENCY_62\"             = \"Gambian Dalasi - GMD\";\n\"DEFAULT_CURRENCY_63\"             = \"Guinean Franc - GNF\";\n\"DEFAULT_CURRENCY_64\"             = \"Guatemalan Quetzal - GTQ\";\n\"DEFAULT_CURRENCY_65\"             = \"Guyanaese Dollar - GYD\";\n\"DEFAULT_CURRENCY_66\"             = \"Honduran Lempira - HNL\";\n\"DEFAULT_CURRENCY_67\"             = \"Croatian Kuna - HRK\";\n\"DEFAULT_CURRENCY_68\"             = \"Haitian Gourde - HTG\";\n\"DEFAULT_CURRENCY_69\"             = \"Hungarian Forint - HUF\";\n\"DEFAULT_CURRENCY_70\"             = \"Indonesian Rupiah - IDR\";\n\"DEFAULT_CURRENCY_71\"             = \"Israeli Shekel - ILS\";\n\"DEFAULT_CURRENCY_72\"             = \"Indian Rupee - INR\";\n\"DEFAULT_CURRENCY_73\"             = \"Iraqi Dinar - IQD\";\n\"DEFAULT_CURRENCY_74\"             = \"Jersey Pound - JEP\";\n\"DEFAULT_CURRENCY_75\"             = \"Jamaican Dollar - JMD\";\n\"DEFAULT_CURRENCY_76\"             = \"Jordanian Dinar - JOD\";\n\"DEFAULT_CURRENCY_77\"             = \"Kenyan Shilling - KES\";\n\"DEFAULT_CURRENCY_78\"             = \"Kyrgystani Som - KGS\";\n\"DEFAULT_CURRENCY_79\"             = \"Cambodian Riel - KHR\";\n\"DEFAULT_CURRENCY_80\"             = \"Comorian Franc - KMF\";\n\"DEFAULT_CURRENCY_81\"             = \"Kuwaiti Dinar - KWD\";\n\"DEFAULT_CURRENCY_82\"             = \"Cayman Islands Dollar - KYD\";\n\"DEFAULT_CURRENCY_83\"             = \"Kazakhstani Tenge - KZT\";\n\"DEFAULT_CURRENCY_84\"             = \"Laotian Kip - LAK\";\n\"DEFAULT_CURRENCY_85\"             = \"Lebanese Pound - LBP\";\n\"DEFAULT_CURRENCY_86\"             = \"Sri Lankan Rupee - LKR\";\n\"DEFAULT_CURRENCY_87\"             = \"Liberian Dollar - LRD\";\n\"DEFAULT_CURRENCY_88\"             = \"Lesotho Loti - LSL\";\n\"DEFAULT_CURRENCY_89\"             = \"Lithuanian Litas - LTL\";\n\"DEFAULT_CURRENCY_90\"             = \"Latvian Lats - LVL\";\n\"DEFAULT_CURRENCY_91\"             = \"Libyan Dinar - LYD\";\n\"DEFAULT_CURRENCY_92\"             = \"Moroccan Dirham - MAD\";\n\"DEFAULT_CURRENCY_93\"             = \"Moldovan Leu - MDL\";\n\"DEFAULT_CURRENCY_94\"             = \"Malagasy Ariary - MGA\";\n\"DEFAULT_CURRENCY_95\"             = \"Macedonian Denar - MKD\";\n\"DEFAULT_CURRENCY_96\"             = \"Myanma Kyat - MMK\";\n\"DEFAULT_CURRENCY_97\"             = \"Mongolian Tugrik - MNT\";\n\"DEFAULT_CURRENCY_98\"             = \"Macanese Pataca - MOP\";\n\"DEFAULT_CURRENCY_99\"             = \"Mauritanian Ouguiya - MRO\";\n\"DEFAULT_CURRENCY_100\"             = \"Mauritian Rupee - MUR\";\n\"DEFAULT_CURRENCY_101\"             = \"Maldivian Rufiyaa - MVR\";\n\"DEFAULT_CURRENCY_102\"             = \"Malawian Kwacha - MWK\";\n\"DEFAULT_CURRENCY_103\"             = \"Mexican Peso - MXN\";\n\"DEFAULT_CURRENCY_104\"             = \"Malaysian Ringgit - MYR\";\n\"DEFAULT_CURRENCY_105\"             = \"Mozambican Metical - MZN\";\n\"DEFAULT_CURRENCY_106\"             = \"Namibian Dollar - NAD\";\n\"DEFAULT_CURRENCY_107\"             = \"Nigerian Naira - NGN\";\n\"DEFAULT_CURRENCY_108\"             = \"Nicaraguan Córdoba - NIO\";\n\"DEFAULT_CURRENCY_109\"             = \"Norwegian Krone - NOK\";\n\"DEFAULT_CURRENCY_110\"             = \"Nepalese Rupee - NPR\";\n\"DEFAULT_CURRENCY_111\"             = \"Omani Rial - OMR\";\n\"DEFAULT_CURRENCY_112\"             = \"Panamanian Balboa - PAB\";\n\"DEFAULT_CURRENCY_113\"             = \"Peruvian Nuevo Sol - PEN\";\n\"DEFAULT_CURRENCY_114\"             = \"Papua New Guinean Kina - PGK\";\n\"DEFAULT_CURRENCY_115\"             = \"Philippine Peso - PHP\";\n\"DEFAULT_CURRENCY_116\"             = \"Pakistani Rupee - PKR\";\n\"DEFAULT_CURRENCY_117\"             = \"Paraguayan Guarani - PYG\";\n\"DEFAULT_CURRENCY_118\"             = \"Qatari Rial - QAR\";\n\"DEFAULT_CURRENCY_119\"             = \"Romanian Leu - RON\";\n\"DEFAULT_CURRENCY_120\"             = \"Serbian Dinar - RSD\";\n\"DEFAULT_CURRENCY_121\"             = \"Rwandan Franc - RWF\";\n\"DEFAULT_CURRENCY_122\"             = \"Saudi Riyal - SAR\";\n\"DEFAULT_CURRENCY_123\"             = \"Solomon Islands Dollar - SBD\";\n\"DEFAULT_CURRENCY_124\"             = \"Seychellois Rupee - SCR\";\n\"DEFAULT_CURRENCY_125\"             = \"Sudanese Pound - SDG\";\n\"DEFAULT_CURRENCY_126\"             = \"Saint Helena Pound - SHP\";\n\"DEFAULT_CURRENCY_127\"             = \"Sierra Leonean Leone - SLL\";\n\"DEFAULT_CURRENCY_128\"             = \"Somali Shilling - SOS\";\n\"DEFAULT_CURRENCY_129\"             = \"Surinamese Dollar - SRD\";\n\"DEFAULT_CURRENCY_130\"             = \"São Tomé and Príncipe Dobra - STD\";\n\"DEFAULT_CURRENCY_131\"             = \"Salvadoran Colón - SVC\";\n\"DEFAULT_CURRENCY_132\"             = \"Syrian Pound - SYP\";\n\"DEFAULT_CURRENCY_133\"             = \"Swazi Lilangeni - SZL\";\n\"DEFAULT_CURRENCY_134\"             = \"Tajikistani Somoni - TJS\";\n\"DEFAULT_CURRENCY_135\"             = \"Turkmenistani Manat - TMT\";\n\"DEFAULT_CURRENCY_136\"             = \"Tunisian Dinar - TND\";\n\"DEFAULT_CURRENCY_137\"             = \"Tongan Paʻanga - TOP\";\n\"DEFAULT_CURRENCY_138\"             = \"Turkish Lira - TRY\";\n\"DEFAULT_CURRENCY_139\"             = \"Trinidad and Tobago Dollar - TTD\";\n\"DEFAULT_CURRENCY_140\"             = \"Tanzanian Shilling - TZS\";\n\"DEFAULT_CURRENCY_141\"             = \"Ukrainian Hryvnia - UAH\";\n\"DEFAULT_CURRENCY_142\"             = \"Ugandan Shilling - UGX\";\n\"DEFAULT_CURRENCY_143\"             = \"Uruguayan Peso - UYU\";\n\"DEFAULT_CURRENCY_144\"             = \"Uzbekistan Som - UZS\";\n\"DEFAULT_CURRENCY_145\"             = \"Venezuelan Bolívar Fuerte - VEF\";\n\"DEFAULT_CURRENCY_146\"             = \"Vietnamese Dong - VND\";\n\"DEFAULT_CURRENCY_147\"             = \"Vanuatu Vatu - VUV\";\n\"DEFAULT_CURRENCY_148\"             = \"Samoan Tala - WST\";\n\"DEFAULT_CURRENCY_149\"             = \"CFA Franc BEAC - XAF\";\n\"DEFAULT_CURRENCY_150\"             = \"Silver (troy ounce) - XAG\";\n\"DEFAULT_CURRENCY_151\"             = \"Gold (troy ounce) - XAU\";\n\"DEFAULT_CURRENCY_152\"             = \"East Caribbean Dollar - XCD\";\n\"DEFAULT_CURRENCY_153\"             = \"CFA Franc BCEAO - XOF\";\n\"DEFAULT_CURRENCY_154\"             = \"CFP Franc - XPF\";\n\"DEFAULT_CURRENCY_155\"             = \"Yemeni Rial - YER\";\n\"DEFAULT_CURRENCY_156\"             = \"South African Rand - ZAR\";\n\"DEFAULT_CURRENCY_157\"             = \"Zambian Kwacha - ZMW\";\n\"DEFAULT_CURRENCY_158\"             = \"Zimbabwean Dollar - ZWL\";\n\n\n\"BITCOIN_DISPLAY\"      = \"Unidad de Bitcoin\";\n\"BLOCKCHAIN_API_TYPE\"      = \"Bloquear el Explorador de tipo API\";\n\n\"CHANGE_BLOCKEXPLORER_URL\"      = \"Cambiar la URL blockexplorer\";\n\n\"BLOCKCHAIN_API_TYPE_1\"             = \"blockchain.info\";\n\"BLOCKCHAIN_API_TYPE_2\"             = \"Bitpay's Insight\";\n\n\n\"ADVANCED_TITLE\"             = \"Ajustes avanzados\";\n\n\"BITCOIN_DISPLAY_1\"             = \"Bitcoin - BTC\";\n\"BITCOIN_DISPLAY_2\"             = \"MilliBit - mBTC\";\n\"BITCOIN_DISPLAY_3\"             = \"Bits - uBTC\";\n\n\"ENABLE_PIN_CODE\"              = \"Habilitar código PIN\";\n\"SHOW_PASSPHRASE\"              = \"Mostrar contraseña de copia de seguridad\";\n\"RESTORE_WALLET\"              = \"Restaurar cartera\";\n\n\"DISPLAY_LOCAL_CURRENCY\"    = \"Mostrar la moneda local\";\n\"FEE_AMOUNT_IN_BITCOINS\"              = \"Cuota de la tasa en bitcoins\";\n\n\"ENABLE_DYNAMIC_FEE\"              = \"Habilitar comisión dinámico\";\n\"CONFIRMATION_TIME\"              = \"Hora de confirmación\";\n\"DYNAMIC_FEE_OPTION_1\"              = \"Tan rápido como sea posible\";\n\"DYNAMIC_FEE_OPTION_2\"              = \"Promedio 30 minutos\";\n\"DYNAMIC_FEE_OPTION_3\"              = \"Promedio 60 minutos\";\n\n\"ENABLE_COLD_WALLET_FOOTER\"              = \"Activación de la función Cartera fría le permitirá crear cuentas que ofrecen una mayor seguridad en línea a continuación, carteras normales. Se necesitan 2 dispositivos para utilizar esta función. Su día normal a día dispositivo que está conectado a internet y otro dispositivo que no está conectado a la internet. Puede encontrar la función Cartera fría en el menú lateral.\";\n\"ENABLE_COLD_WALLET\"              = \"Habilitar cartera fría\";\n\n\"ENABLE_ADVANCE_MODE_FOOTER\"              = \"La activación del modo avanzado expondrá las características ocultas, incluyendo la capacidad de importar bitcoin claves privadas y direcciones. Tenga en cuenta que la frase de contraseña de copia de seguridad no puede recuperar sus claves privadas bitcoin y direcciones, por lo que debe ser respaldado por separado. Para ver una lista de todas las características avanzadas, active el modo avanzado y vaya a la sección de Ayuda.\";\n\"ENABLE_ADVANCE_MODE\"              = \"Activar el modo avanzado\";\n\n\n\"SET_FIXED_TRANSACTION_FEE\"             = \"Conjunto fijo comisión\";\n\"CHANGE_PIN_CODE\"                 = \"Cambiar PIN\";\n\"EMPTY\"                           = \"\";\n\"VERSION\"                         = \"Versión\";\n\"ABOUT_TITLE\"                     = \"Acerca de\";\n\n\"ENABLE_SOUND_NOTIFICATION\"             = \"Notificación de sonido\";\n\n\"EMAIL_SUPPORT\"             = \"Soporte de correo electrónico\";\n\n\"ENABLE_STEALTH_ADDRESS_DEFAULT_FOOTER\" = \"Habilitación de direcciones reutilizables como predeterminado pondrá toda cuenta de direcciones reutilizables en el frente de la lista de direcciones de recepción en la pantalla de recepción.\";\n\"ENABLE_STEALTH_ADDRESS_DEFAULT\" = \"Por defecto direcciones reutilizables\";\n\n\n\"ENABLE_CAN_RESTORE_DELETED_APP_FOOTER\" = \"Esta característica le permite recuperar su billetera ArcBit nativa si se elimina esta aplicación. La frase de contraseña de copia de seguridad se almacena en su llavero y si se habilita esta función una aplicación de re-instalada será capaz de leerlo. Esta característica no permite la recuperación de carteras o direcciones que se importan desde otras cuentas.\";\n\"ENABLE_CAN_RESTORE_DELETED_APP\" = \"Recuperable\";\n\n\"ARCBIT_CONTRIBUTORS_LIST\"    = \"Lista de colaboradores de ArcBit\";\n\"CONTRIBUTORS_LIST\"    = \"Lista de contribuyentes\";\n\"CONTRIBUTOR_1\"    = \"Mikhail Barinov\";\n\"CONTRIBUTOR_2\"    = \"Tomáš Horváth\";\n\"CONTRIBUTOR_3\"    = \"David Johnson\";\n\"CONTRIBUTOR_4\"    = \"汉服骑射\";\n\n"
  },
  {
    "path": "ArcBit/Info.plist",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\n<plist version=\"1.0\">\n<dict>\n\t<key>CFBundleDevelopmentRegion</key>\n\t<string>en</string>\n\t<key>CFBundleExecutable</key>\n\t<string>$(EXECUTABLE_NAME)</string>\n\t<key>CFBundleIdentifier</key>\n\t<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>\n\t<key>CFBundleInfoDictionaryVersion</key>\n\t<string>6.0</string>\n\t<key>CFBundleName</key>\n\t<string>$(PRODUCT_NAME)</string>\n\t<key>CFBundlePackageType</key>\n\t<string>APPL</string>\n\t<key>CFBundleShortVersionString</key>\n\t<string>1.4.10</string>\n\t<key>CFBundleSignature</key>\n\t<string>????</string>\n\t<key>CFBundleURLTypes</key>\n\t<array>\n\t\t<dict>\n\t\t\t<key>CFBundleTypeRole</key>\n\t\t\t<string>Editor</string>\n\t\t\t<key>CFBundleURLName</key>\n\t\t\t<string>com.ArcBit.app</string>\n\t\t\t<key>CFBundleURLSchemes</key>\n\t\t\t<array>\n\t\t\t\t<string>bitcoin</string>\n\t\t\t</array>\n\t\t</dict>\n\t</array>\n\t<key>CFBundleVersion</key>\n\t<string>1</string>\n\t<key>Fabric</key>\n\t<dict>\n\t\t<key>APIKey</key>\n\t\t<string>24ecfd2fbad3162671908399854ab3e9ddba0710</string>\n\t\t<key>Kits</key>\n\t\t<array>\n\t\t\t<dict>\n\t\t\t\t<key>KitInfo</key>\n\t\t\t\t<dict/>\n\t\t\t\t<key>KitName</key>\n\t\t\t\t<string>Crashlytics</string>\n\t\t\t</dict>\n\t\t</array>\n\t</dict>\n\t<key>LSRequiresIPhoneOS</key>\n\t<true/>\n\t<key>NSCameraUsageDescription</key>\n\t<string>Camera permission is require to scan QR Codes</string>\n\t<key>UILaunchStoryboardName</key>\n\t<string>LaunchScreen</string>\n\t<key>UIMainStoryboardFile</key>\n\t<string>Main</string>\n\t<key>UIRequiredDeviceCapabilities</key>\n\t<array>\n\t\t<string>armv7</string>\n\t</array>\n\t<key>UISupportedInterfaceOrientations</key>\n\t<array>\n\t\t<string>UIInterfaceOrientationPortrait</string>\n\t\t<string>UIInterfaceOrientationPortraitUpsideDown</string>\n\t</array>\n</dict>\n</plist>\n"
  },
  {
    "path": "ArcBit/de.lproj/Localizable.strings",
    "content": "\"\" = \"\";\n\n\"%@ is not allowed to access the camera\" = \"%@ darf nicht auf die Kamera zugreifen\";\n\n\"%@ servers not reachable.\" = \"%@ server nicht erreichbar..\";\n\n\"%d/%d parts scanned.\" = \"%d/%d Teile gescannt.\";\n\n\"%llu confirmations\" = \"%llu Bestätigungen\";\n\n\"1 Confirmation\" = \"1 Bestätigung\";\n\n\"A bitcoin address typically begins with a '1' or '3'. You can see the transactions and track the balance of an address, but you cannot spend from an imported address.\\nYou can temporarily import this watch addresses private key to spend its bitcoins. Simply go the Send screen and select a watch address to spend from and you will be prompted to temporarily import your addresses' private key when you click 'Review Payment' in the Send screen. The private key will stay in memory until the app exits or until you remove it manually in the Accounts screen.\" = \"A bitcoin address typically begins with a '1' or '3'. You can see the transactions and track the balance of an address, but you cannot spend from an imported address.\\nYou can temporarily import this watch addresses private key to spend its bitcoins. Simply go the Send screen and select a watch address to spend from and you will be prompted to temporarily import your addresses' private key when you click 'Review Payment' in the Send screen. The private key will stay in memory until the app exits or until you remove it manually in the Accounts screen.\";\n\n\"A bitcoin wallet is a software application that allows people to send, receive and manage their bitcoins.\\nBe aware of how other bitcoin applications store your bitcoins' private keys, which are needed to spend your bitcoins.\\nThere are generally three different ways applications can your store your bitcoins.\\n1.\\nThe banking model, where your bitcoin private keys are held for you by someone else.\\n2.\\nThe security box model, where your bitcoin private keys are stored encrypted on someone else’s servers.\\n3.\\nThe wallet model, where your bitcoin private keys are stored only on your device.\" = \"A bitcoin wallet is a software application that allows people to send, receive and manage their bitcoins.\\nBe aware of how other bitcoin applications store your bitcoins' private keys, which are needed to spend your bitcoins.\\nThere are generally three different ways applications can your store your bitcoins.\\n1.\\nThe banking model, where your bitcoin private keys are held for you by someone else.\\n2.\\nThe security box model, where your bitcoin private keys are stored encrypted on someone else’s servers.\\n3.\\nThe wallet model, where your bitcoin private keys are stored only on your device.\";\n\n\"A private key begins with an 'L', 'K', or '5'.\\nBIP 38 encrypted private keys can also be imported. They can either be imported encrypted or unencrypted. If you choose to import it encrypted, you will need to input the password each time you spend from your encrypted private key.\" = \"A private key begins with an 'L', 'K', or '5'.\\nBIP 38 encrypted private keys can also be imported. They can either be imported encrypted or unencrypted. If you choose to import it encrypted, you will need to input the password each time you spend from your encrypted private key.\";\n\n\"Account %@ imported\" = \"Account %@ importiert\";\n\n\"Account %lu\" = \"Account %lu\";\n\n\"Account 1\" = \"Account 1\";\n\n\"Account ID\" = \"Account ID\";\n\n\"Account ID: %u\" = \"Account ID: %u\";\n\n\"Account Private Key\" = \"Account privater Schlüssel\";\n\n\"Account Public Key\" = \"Account öffentlicher Schlüssel\";\n\n\"Account private key does not match imported account public key\" = \"Der private Schlüssel passt nicht zum öffentlichen Schlüssel\";\n\n\"Account private key missing\" = \"Account privater Schlüssel fehlt\";\n\n\"Accounts\" = \"Accounts\";\n\n\"Achievement List\" = \"Achievement List\";\n\n\"Achievements\" = \"Achievements\";\n\n\"Actions\" = \"Aktionen\";\n\n\"Active Change Addresses\" = \"Aktive gewechselte Adressen\";\n\n\"Active Main Addresses\" = \"Aktive Hauptadressen\";\n\n\"Add Contacts Entry\" = \"Add Contacts Entry\";\n\n\"Address\" = \"Adresse\";\n\n\"Address ID \" = \"Adresse ID \";\n\n\"Address ID: %lu\" = \"Adresse ID: %lu\";\n\n\"Addresses\" = \"Adressen\";\n\n\"Advanced Achievement List\" = \"Advanced Achievement List\";\n\n\"Advanced FAQ\" = \"Advanced FAQ\";\n\n\"Advanced how To:\" = \"Advanced how To:\";\n\n\"After a transaction is broadcast to the Bitcoin network, it may be included in a block that is published to the network. When that happens, it is said that the transaction has been mined at a depth of 1 block. With each subsequent block that is found, the number of blocks deep is increased by one. To be secure against double spending, a transaction should not be considered as confirmed until it is a certain number of blocks deep.\\nA good rule of thumb is that 1 confirmation is good for small value amounts of bitcoins and a user should wait for more confirmations for larger value amounts.\\nArcBit will display the confirmation number up until the 6th confirmation.\" = \"After a transaction is broadcast to the Bitcoin network, it may be included in a block that is published to the network. When that happens, it is said that the transaction has been mined at a depth of 1 block. With each subsequent block that is found, the number of blocks deep is increased by one. To be secure against double spending, a transaction should not be considered as confirmed until it is a certain number of blocks deep.\\nA good rule of thumb is that 1 confirmation is good for small value amounts of bitcoins and a user should wait for more confirmations for larger value amounts.\\nArcBit will display the confirmation number up until the 6th confirmation.\";\n\n\"Amount:\" = \"Betrag：\";\n\n\"An account is a collection of bitcoin addresses. With accounts, you will no longer have to manage bitcoin addresses directly anymore. Since address reuse results in a loss of privacy for people using Bitcoin, ArcBit’s HD wallet account system will automatically handle the cycling of bitcoin addresses for you. This ensures you don’t use the same bitcoin address more then once.\\nEach account also has a reusable address. You can find it in your Receive screen. Swipe all the way to right on the QRCode in your Receive screen and you will find a reusable address.\\nYou can create an unlimited amount of accounts with ArcBit. See the help section on how to create a new account in ArcBit.\" = \"An account is a collection of bitcoin addresses. With accounts, you will no longer have to manage bitcoin addresses directly anymore. Since address reuse results in a loss of privacy for people using Bitcoin, ArcBit’s HD wallet account system will automatically handle the cycling of bitcoin addresses for you. This ensures you don’t use the same bitcoin address more then once.\\nEach account also has a reusable address. You can find it in your Receive screen. Swipe all the way to right on the QRCode in your Receive screen and you will find a reusable address.\\nYou can create an unlimited amount of accounts with ArcBit. See the help section on how to create a new account in ArcBit.\";\n\n\"An account private key begins with the letters 'xprv'. You can see, spend and recover the transactions and bitcoins of an entire account from an account private key.\" = \"An account private key begins with the letters 'xprv'. You can see, spend and recover the transactions and bitcoins of an entire account from an account private key.\";\n\n\"An account public key begins with the letters 'xpub'. You can see the transactions and bitcoins of an entire account from an account private key, with the exception of reusable address payments. Future releases will address this issue.\\nYou can temporarily import the corresponding account private key for this accounts' account public key to spend your watch accounts' bitcoins. Simply go to the Send screen and select a watch account to spend from and you will be prompted to temporarily import your account's private key when you click 'Review Payment' on the Send screen. The private key will stay in memory until the app exits or until you remove it manually on the Accounts screen.\" = \"An account public key begins with the letters 'xpub'. You can see the transactions and bitcoins of an entire account from an account private key, with the exception of reusable address payments. Future releases will address this issue.\\nYou can temporarily import the corresponding account private key for this accounts' account public key to spend your watch accounts' bitcoins. Simply go to the Send screen and select a watch account to spend from and you will be prompted to temporarily import your account's private key when you click 'Review Payment' on the Send screen. The private key will stay in memory until the app exits or until you remove it manually on the Accounts screen.\";\n\n\"ArcBit Brain Wallet\" = \"Arcbit Gedächtnisbrieftasche\";\n\n\"ArcBit Web Wallet\" = \"Arcbit Web Wallet\";\n\n\"ArcBit uses the the bitcoin wallet model (See the section ’What is a bitcoin wallet?’ to understand the 3 different security models of bitcoin software). However, if you use iCloud to backup your wallet, you will be using the security box model. It is recommended that you do not use iCloud and be responsible for your bitcoins yourself. For those who don’t want to remember a simple backup passphrase, iCloud backup is a good alternative.\" = \"ArcBit uses the the bitcoin wallet model (See the section ’What is a bitcoin wallet?’ to understand the 3 different security models of bitcoin software). However, if you use iCloud to backup your wallet, you will be using the security box model. It is recommended that you do not use iCloud and be responsible for your bitcoins yourself. For those who don’t want to remember a simple backup passphrase, iCloud backup is a good alternative.\";\n\n\"Archive Account\" = \"Archiviere Account\";\n\n\"Archive address\" = \"Archiviere Adresse\";\n\n\"Archived Accounts\" = \"Archivierte Accounts\";\n\n\"Archived Change Addresses\" = \"Wechsel archivierte Adresse\";\n\n\"Archived Cold Wallet Accounts\" = \"Archivierte Offline Brieftasche\";\n\n\"Archived Imported Accounts\" = \"Archivierte importierte Accounts\";\n\n\"Archived Imported Addresses\" = \"Archivierte importierte Adressen\";\n\n\"Archived Imported Watch Accounts\" = \"Archivierte importierte watch Accounts\";\n\n\"Archived Imported Watch Addresses\" = \"Archivierte importierte watch Adressen\";\n\n\"Archived Main Addresses\" = \"Archivierte Hauptadressen\";\n\n\"Are you sure you want to archive account %@?\" = \"Bist du sicher, dass du diesen Account archivieren möchtest %@？\";\n\n\"Are you sure you want to archive address %@?\" = \"Bist du sicher, dass du diese Adresse archivieren möchtest %@？\";\n\n\"Are you sure you want to delete this account?\" = \"Bist du sicher, dass du diesen Account löschen möchtest\";\n\n\"Are you sure you want to unarchive account %@\" = \"Bist du sicher, dass du diesen Account entarchivieren möchtest %@?\";\n\n\"Are you sure you want to unarchive address %@?\" = \"Bist du sicher, dass du diese Adresse entarchivieren möchtest %@？\";\n\n\"Authorize Cold Wallet Account Payment\" = \"Autorisiere eine Zahlung des Offline Brieftasches\";\n\n\"Authorize Payment\" = \"Autorisiere Zahlung\";\n\n\"Backup Passphrase\" = \"Backup Passphrase\";\n\n\"Backup wallet\" = \"Backup Brieftasche\";\n\n\"Backup local wallet\" = \"Lokale Brieftasche sichern\";\n\n\"Backup passphrase found in keychain\" = \"Backup-Passphrase im Schlüsselbund gefunden\";\n\n\"Bitcoin cuts out the middleman and allows you to send money anywhere in the world with an internet connection with minimum to zero fees.\" = \"Bitcoin cuts out the middleman and allows you to send money anywhere in the world with an internet connection with minimum to zero fees.\";\n\n\"Bitcoin, uppercase 'B', is an online payment system invented in 2008 and released as open-source software in 2009 by a programmer named Satoshi Nakamoto. The system is decentralized and peer-to-peer allowing users to transact directly without needing an intermediary.\\nBitcoin is also a platform of which other decentralized applications can be built upon. Bitcoin, lowercase 'b' is the currency unit that Bitcoin uses.\" = \"Bitcoin, uppercase 'B', is an online payment system invented in 2008 and released as open-source software in 2009 by a programmer named Satoshi Nakamoto. The system is decentralized and peer-to-peer allowing users to transact directly without needing an intermediary.\\nBitcoin is also a platform of which other decentralized applications can be built upon. Bitcoin, lowercase 'b' is the currency unit that Bitcoin uses.\";\n\n\"Bitcoins can be purchased from various bitcoin exchanges. ArcBit is not a bitcoin exchange. ArcBit is a bitcoin wallet. After you purchase some bitcoins from an exchange, you can move it to a bitcoin wallet.\" = \"Bitcoins can be purchased from various bitcoin exchanges. ArcBit is not a bitcoin exchange. ArcBit is a bitcoin wallet. After you purchase some bitcoins from an exchange, you can move it to a bitcoin wallet.\";\n\n\"Cancel\" = \"Abbrechen\";\n\n\"Cannot archive your default account\" = \"Der standard Account kann nicht archiviert werden.\";\n\n\"Cannot archive your one and only account\" = \"Der einzige Account kann nicht archiviert werden.\";\n\n\"Cannot create transactions with outputs less then %@\" = \"Transaktionen können nicht erstellt werden mit Outputs weniger als %@\";\n\n\"Cannot decrypt iCloud backup wallet.\" = \"Kann iCloud-Backup-Wallet nicht entschlüsseln.\";\n\n\"Cannot import reusable address\" = \"Wiederverwendete Adressen können nicht importiert werden\";\n\n\"Change Address ID \" = \"Wechsel Adressen ID \";\n\n\"Change Automatic Transaction Fee\" = \"Change Automatic Transaction Fee\";\n\n\"Change Block Explorer URL\" = \"Wechsel Blockexplorer URL\";\n\n\"Change Blockexplorer Type\" = \"Change Blockexplorer Type\";\n\n\"Check out the ArcBit Brain Wallet\" = \"Schau dir das ArcBit Gedächtnisbrieftasche an\";\n\n\"Check out the ArcBit Web Wallet\" = \"Schau dir das ArcBit Web-Brieftasche an\";\n\n\"Check out the ArcBit Web Wallet!\" = \"Schau dir das ArcBit Web-Brieftasche an!\";\n\n\"Checking Transaction\" = \"Prüfe Trnsaktionen\";\n\n\"Clear account private key from memory\" = \"Lösche Account Schlüssel aus dem Speicher\";\n\n\"Clear private key from memory\" = \"Lösche privaten Schlüssel aus dem Speicher\";\n\n\"Cleared from memory\" = \"Speicher gesäubert\";\n\n\"Click an address\" = \"Click an address\";\n\n\"Click the button with the arrow\" = \"Click the button with the arrow\";\n\n\"Click the plus button at the top right\" = \"Click the plus button at the top right\";\n\n\"Click the ‘Contacts’ button\" = \"Click the ‘Contacts’ button\";\n\n\"Click ‘Accounts’\" = \"Click ‘Accounts’\";\n\n\"Click ‘Advanced settings’\" = \"Click ‘Advanced settings’\";\n\n\"Click ‘Archive Account’\" = \"Click ‘Archive Account’\";\n\n\"Click ‘Create New Account’\" = \"Click ‘Create New Account’\";\n\n\"Click ‘Delete’\" = \"Click ‘Delete’\";\n\n\"Click ‘Done’\" = \"Click ‘Done’\";\n\n\"Click ‘Edit Account Name’\" = \"Click ‘Edit Account Name’\";\n\n\"Click ‘Edit’\" = \"Click ‘Edit’\";\n\n\"Click ‘Enable PIN Code’\" = \"Click ‘Enable PIN Code’\";\n\n\"Click ‘History’\" = \"Click ‘History’\";\n\n\"Click ‘Import Account’\" = \"Click ‘Import Account’\";\n\n\"Click ‘Import Private Key’\" = \"Click ‘Import Private Key’\";\n\n\"Click ‘Import Watch Only Account’\" = \"Click ‘Import Watch Only Account’\";\n\n\"Click ‘Import Watch Only Address’\" = \"Click ‘Import Watch Only Address’\";\n\n\"Click ‘Label transaction’\" = \"Click ‘Label transaction’\";\n\n\"Click ‘Restore Wallet’\" = \"Click ‘Restore Wallet’\";\n\n\"Click ‘Restore’\" = \"Click ‘Restore’\";\n\n\"Click ‘Review Payment’\" = \"Click ‘Review Payment’\";\n\n\"Click ‘Send’\" = \"Click ‘Send’\";\n\n\"Click ‘Set Transaction Fee’\" = \"Click ‘Set Transaction Fee’\";\n\n\"Click ‘Settings’\" = \"Click ‘Settings’\";\n\n\"Click ‘Show Backup Passphrase’\" = \"Click ‘Show Backup Passphrase’\";\n\n\"Click ‘View Addresses’\" = \"Click ‘View Addresses’\";\n\n\"Click ‘View account private key QR code’\" = \"Click ‘View account private key QR code’\";\n\n\"Click ‘View account public key QR code’\" = \"Click ‘View account public key QR code’\";\n\n\"Click ‘View address QR code’\" = \"Click ‘View address QR code’\";\n\n\"Click ‘View in web’\" = \"Click ‘View in web’\";\n\n\"Click ‘View private key QR code’\" = \"Click ‘View private key QR code’\";\n\n\"Click ‘blockexplorer API type’\" = \"Click ‘blockexplorer API type’\";\n\n\"Click ’Receive’\" = \"Click ’Receive’\";\n\n\"Close\" = \"Schließen\";\n\n\"Cold Wallet\" = \"Offline Brieftasche\";\n\n\"Cold Wallet Accounts\" = \"Offline Brieftasche Accounts\";\n\n\"Cold Wallet Accounts can't see reusable address payments, thus this accounts' reusable address is not available.\" = \"Die Offline Brieftasche kann keine wiederverwendbaren Adressen nutzen.\";\n\n\"Cold Wallet Overview\" = \"Offline Brieftasche Übersicht\";\n\n\"Cold wallet private keys are not stored here and cannot be viewed\" = \"Die privaten Schlüssel des offline Brieftasche sind nicht gespeichert und können nicht angezeigt werden.\";\n\n\"Complete\" = \"Vollständig\";\n\n\"Complete step 1\" = \"Schritt 1 vollständig\";\n\n\"Confirm Payment\" = \"Bestätige Zahlung\";\n\n\"Confirm Pin Code\" = \"Bestätige PIN\";\n\n\"Contacts\" = \"Kontakte\";\n\n\"Continue\" = \"Weiter\";\n\n\"Copied To clipboard\" = \"In die Zwischenablage kopiert.\";\n\n\"Copy\" = \"Kopieren\";\n\n\"Copy Transaction ID to Clipboard\" = \"Transaktions ID in die Zwischenablage kopieren\";\n\n\"Create Cold Wallet\" = \"Erstelle Offline Brieftasche\";\n\n\"Create New Account\" = \"Erstelle neuen Account\";\n\n\"Create new contact\" = \"Erstelle neuen Kontakt\";\n\n\"Customize Fee\" = \"Gebühr anpassen\";\n\n\"Decrypting\" = \"Entschlüsseln\";\n\n\"Delete\" = \"Löschen\";\n\n\"Delete %@\" = \"Lösche %@\";\n\n\"Delete Account\" = \"Lösche Account\";\n\n\"Delete Contact\" = \"Kontakt löschen?\";\n\n\"Delete address\" = \"Lösche Adresse\";\n\n\"Do not use the QR code from here to receive bitcoins. Go to the Receive screen to get a QR code to receive bitcoins.\" = \"Benutze nicht diesen QR-Code um BTC zu erhalten sondern wechsel in den 'Erhalten' Tap\";\n\n\"Do you like using ArcBit?\" = \"Magst du ArcBit?\";\n\n\"Do you want to load and backup your current local wallet file?\" = \"Möchten Sie Ihre aktuelle lokale Wallet-Datei laden und sichern?\";\n\n\"Do you want to load local wallet file?\" = \"Möchten Sie eine lokale Wallet-Datei laden?\";\n\n\"Do you want to restore from your backup passphrase or start a new wallet?\" = \"Möchtest du eine neue Brieftasche erstellen oder mit der Wortfolge wiederherstellen?\";\n\n\"Do you want to temporary import your account private key?\" = \"Möchtest du den private Schlüssel temporär importieren?\";\n\n\"Do you want to temporary import your private key?\" = \"Möchtest du den privaten Schlüssel temporär importieren?\";\n\n\"Don't remind me\" = \"Erinnere mich nicht\";\n\n\"Done\" = \"Fertig\";\n\n\"Each account has a public and private account key. Account keys should be kept secret as they are used to view the account's transactions and spend the account's bitcoins.\" = \"Each account has a public and private account key. Account keys should be kept secret as they are used to view the account's transactions and spend the account's bitcoins.\";\n\n\"Edit\" = \"Bearbeiten\";\n\n\"Edit Account Name\" = \"Account Namen ändern\";\n\n\"Edit Contact Name\" = \"Kontakt Namen ändern\";\n\n\"Edit Label\" = \"Bezeichnung ändern\";\n\n\"Edit Transaction label\" = \"Transaktionsbezeichnung ändern\";\n\n\"Email Support\" = \"Email Unterstützung\";\n\n\"Enable PIN code in settings to better secure your wallet.\" = \"Aktiviere die PIN in den Einstellungen um das Wallet besser zu schützen.\";\n\n\"Enable Pin Code\" = \"Aktiviere PIN\";\n\n\"Enable Transaction Fee\" = \"Enable Transaction Fee\";\n\n\"Enable advanced mode\" = \"Aktiviere den fortgeschrittenen Modus\";\n\n\"Encountered error creating transaction. Please try again.\" = \"Fehler beim Erstellen einer Transaktion Bitte versuche es erneut.\";\n\n\"Encrypted\" = \"Verschlüsselt\";\n\n\"Enter Label\" = \"Bezeichnung eingeben\";\n\n\"Enter PIN\" = \"PIN eingeben\";\n\n\"Enter a wallet backup passphrase to wipe the current wallet and start/restore another.\" = \"Gib die Wortfolge ein, um ein neues Wallet zu erstellen oder eines wiederherzustellen.\";\n\n\"Enter account private key\" = \"Gib den privaten Schlüssel ei\";\n\n\"Enter account public key\" = \"Gib den öffentlichen Schlüssel ein\";\n\n\"Enter address\" = \"Gib die Adresse ein\";\n\n\"Enter an account ID and click 'QR Code'. Then on your primary online device, enable Cold Wallet in settings. Then go to the Accounts screen and click 'Import Cold Wallet Account' and scan the Account Public Key QR Code. Afterwards use this cold wallet account as you would a normal account and deposit bitcoins into it. When you want to make a payment from a cold wallet account, go to the next section on the previous screen and follow the step by step instructions there.\" = \"Gibt eine Account ID ein und klicke 'QR-Code'. Danach auf deinem primären Gerät, aktiviereOffline Brieftasche. Gehe auf den Account und klicke auf 'Account importieren' und scanne den öffentlichen Schlüssel. Danach kannst du diesen Account benutzen um BTC zu erhalten. Um von dieser Brieftasche eine Transaktion durchzuführen gehe bitte in die vorherige Ansicht und folge dort der Anleitung.\";\n\n\"Enter backup passphrase\" = \"Enter backup passphrase\";\n\n\"Enter passphrase for your iCloud backup wallet.\" = \"Geben Sie die Passphrase für Ihre iCloud-Backup-Wallet ein.\";\n\n\"Enter password for encrypted private key\" = \"Passwort für die Verschlüsselung der privaten Schlüssel\";\n\n\"Enter the 12 word passphrase that belongs to the cold wallet account that you want to make a payment from. This is the passphrase that was used to generate your account public key that was generated on the 'Create Cold Wallet' section found on the previous screen.\" = \"Gib deine 12 Worte lange Wortfolge ein, die zu der offlinen Brieftasche gehört, die importiert werden soll. Diese Wortfolge wurde erstellt, als die offline Brieftasche erstellt worden ist.\";\n\n\"Error\" = \"Fehler\";\n\n\"Error fetching Transaction.\" = \"Fehler beim Holen der Transaktionen\";\n\n\"Error fetching unspent outputs. Try again later.\" = \"Fehler beim Holen der unverbrauchten Ausgänge, versuche es später.\";\n\n\"Error fetching unspent outputs. Try again.\" = \"Fehler beim Holen der unverbrauchten Ausgänge, versuche es später.\";\n\n\"Error getting block height.\" = \"Fehler beim Abrufen der Blockhöhe.\";\n\n\"Error importing account\" = \"Fehler beim Importieren des Accounts\";\n\n\"Error loading wallet JSON file\" = \"Fehler beim Laden der Wallet-JSON-Datei\";\n\n\"Explanation\" = \"Explanation\";\n\n\"FAQ\" = \"FAQ\";\n\n\"Fee:\" = \"Gebühr:\";\n\n\"Fill address field\" = \"Fill address field\";\n\n\"Finished Passing Transaction Data\" = \"Transaktionsdaten lesen fertiggestellt\";\n\n\"First make sure you are using your secondary offline device for this screen (as mentioned in the overview on the previous screen). Click 'New Wallet' and write down or memorize the generated 12 word passphrase. This passphrase can recover and generate all your accounts and the bitcoins associated with it, so keep it safe and to yourself. Also instead of creating a new wallet, you can also input an existing 12 word passphrase that was generated here to create additional accounts.\" = \"Stelle sicher, das du ein Zweitgerät nutzt, welches nicht mit dem Internet verbunden ist. Klicke 'neues Wallet' und schreibe die Wortreihenfolge auf oder merke sie dir. Diese Wortreihenfolge kann alle deine Accounts wiederherstellen. Falls du bereits eine Wortreihenfolge hast, kannst du diese verwenden um weitere Accounts hinzuzufügen.\";\n\n\"Follow us on Twitter\" = \"Folge uns auf Twitter\";\n\n\"From:\" = \"Von：\";\n\n\"Funds have been claimed already.\" = \"Guthaben wurde bereits verwendet.\";\n\n\"Funds imported\" = \"Guthaben importiert\";\n\n\"Go\" = \"Gehen\";\n\n\"Go to the side menu\" = \"Go to the side menu\";\n\n\"Have sender scan QR code\" = \"Have sender scan QR code\";\n\n\"Have sender send you payment\" = \"Have sender send you payment\";\n\n\"Help\" = \"Hilfe\";\n\n\"Here are some features that no other mobile bitcoin wallet supports.\\n- Reusable address support\\n- Ability to import individual account (extended) keys\\n- iCloud backup support\\n- Over 150 local currencies supported\" = \"Here are some features that no other mobile bitcoin wallet supports.\\n- Reusable address support\\n- Ability to import individual account (extended) keys\\n- iCloud backup support\\n- Over 150 local currencies supported\";\n\n\"Hierarchical Deterministic Wallet\" = \"Hierarchical Deterministic Wallet\";\n\n\"History\" = \"Geschichte\";\n\n\"How To:\" = \"How To:\";\n\n\"How do I get bitcoins?\" = \"How do I get bitcoins?\";\n\n\"How does ArcBit Wallet work?\" = \"How does ArcBit Wallet work?\";\n\n\"Import Account\" = \"Account importieren\";\n\n\"Import Cold Wallet Account\" = \"Importiere Offline Brieftasche Account\";\n\n\"Import Feature\" = \"Import Feature\";\n\n\"Import Private Key\" = \"Importiere privaten Schlüssel\";\n\n\"Import Private/Encrypted Key\" = \"Import Private/Encrypted Key\";\n\n\"Import Watch Account\" = \"Importiere Watch Account\";\n\n\"Import Watch Address\" = \"Importiere Watch Adresse\";\n\n\"Import private key encrypted or unencrypted?\" = \"Privaten Schlüssel ent- oder verschlüsselt importieren?\";\n\n\"Import with QR code\" = \"Importiere mit QR-Code\";\n\n\"Import with text input\" = \"Importiere mit Texteingabe\";\n\n\"Imported Account %@\" = \"Importierter Account %@\";\n\n\"Imported Accounts\" = \"Importiere Accounts\";\n\n\"Imported Address\" = \"Importierte Adresse\";\n\n\"Imported Addresses\" = \"Importierte Adressen\";\n\n\"Imported Cold Wallet Account %@\" = \"Importierter Offline Brieftasche Account %@\";\n\n\"Imported Watch Account %@\" = \"Importierter Watch Account %@\";\n\n\"Imported Watch Accounts\" = \"Importierte Watch Accounts\";\n\n\"Imported Watch Addresses\" = \"Importierte Watch Adressen\";\n\n\"Imported Watch Only Accounts can't see reusable address payments, thus this accounts' reusable address is not available. If you want see the reusable address for this account, import the account private key that corresponds to this accounts public key.\" = \"Importierte Watch Accounts können keine Zahlungen der wiederverwendeten Adressen sehen. Wenn du die Zahlungen sehen willst, muss der passende private Schlüssel importiert werden.\";\n\n\"Importing Account\" = \"Importiere Account\";\n\n\"Importing Cold Wallet Account\" = \"Importiere Offline Brieftasche Accounts\";\n\n\"Importing a Private Key\" = \"Importing a Private Key\";\n\n\"Importing a Watch Only Account\" = \"Importing a Watch Only Account\";\n\n\"Importing a Watch Only Address\" = \"Importing a Watch Only Address\";\n\n\"Importing an Account\" = \"Importing an Account\";\n\n\"Importing an encrypted key will require you to input the password every time you want to send bitcoins from it.\" = \"Wenn verschlüsselt imortiert, muss vor jeder Zahlung der Schlüssel entschlüsselt werden mittels des Passwortes.\";\n\n\"In advanced mode, you can import bitcoin keys and addresses from other sources. You can import account private keys, account public keys, private keys, and addresses.\\nPlease note that your 12 word passphrase cannot recover your bitcoins, so it is recommended that you backup imported keys and addresses separately.\" = \"In advanced mode, you can import bitcoin keys and addresses from other sources. You can import account private keys, account public keys, private keys, and addresses.\\nPlease note that your 12 word passphrase cannot recover your bitcoins, so it is recommended that you backup imported keys and addresses separately.\";\n\n\"Incomplete\" = \"unvollständig\";\n\n\"Incorrect passphrase, could not decrypt iCloud wallet backup.\" = \"Falsche Passphrase, konnte iCloud Wallet-Backup nicht entschlüsseln.\";\n\n\"Input a bitcoin address\" = \"Input a bitcoin address\";\n\n\"Input a label\" = \"Input a label\";\n\n\"Input a new label\" = \"Input a new label\";\n\n\"Input a recommended amount. Somewhere between %@ and %@ BTC\" = \"Input a recommended amount. Somewhere between %@ and %@ BTC\";\n\n\"Input amount\" = \"Input amount\";\n\n\"Input label\" = \"Input label\";\n\n\"Input new account name\" = \"Input new account name\";\n\n\"Input transaction fee in bitcoins\" = \"Input transaction fee in bitcoins\";\n\n\"Instructions\" = \"Instructions\";\n\n\"Insufficient Funds\" = \"Nicht genug Guthaben\";\n\n\"Insufficient Funds. Account balance is %@ when %@ is required.\" = \"Nicht genug Guthaben. Account Guthaben beträgt %@ aber %@ wird benötigt.\";\n\n\"Insufficient Funds. Account contains bitcoin dust. You can only send up to %@ for now.\" = \"Nicht genug Guthaben. Der Account erhält nur sehr geringe BTC-Mengen, es werden mindestens %@ benötigt zum senden.\";\n\n\"Internal Wallet Data\" = \"Wallet Daten\";\n\n\"Internal account transfer\" = \"Account intern verschieben\";\n\n\"Invalid Address\" = \"Ungültige Adresse\";\n\n\"Invalid Passphrase\" = \"Ungültige Wortfolge\";\n\n\"Invalid URL\" = \"Ungültige URL\";\n\n\"Invalid account private key\" = \"Ungültiger privater Schlüssel\";\n\n\"Invalid account public Key\" = \"Ungültiger öffentlicher Schlüssel\";\n\n\"Invalid amount\" = \"Ungültiger Betrag\";\n\n\"Invalid backup passphrase\" = \"Ungültige Backup Wortfolge\";\n\n\"Invalid private key\" = \"Ungültiger privater Schlüssel\";\n\n\"Invalid scanned data\" = \"Ungültiger Scann\";\n\n\"Invalid transaction ID\" = \"Ungültige Transactions ID\";\n\n\"It is not recommended that you manually manage private keys yourself. A leak of a private key can lead to the compromise of your accounts.\" = \"Es wird nicht geraten die privaten Schlüssel selber zu verwalten. Ein Leck kann zum Verlust des gesamten Wallet-Guthabens führen.\";\n\n\"It is not recommended that you use a regular bitcoin address for multiple payments, but instead you should import a reusable address. Add address anyways?\" = \"Es wird nicht geraten Adressen mehrfach zu nutzen, lieber sollte eine wiederverwendbare Adresse importiert werden. Trotzdem hinzufügen?\";\n\n\"Label\" = \"Beschriftung\";\n\n\"Label Transaction\" = \"Transaktions Beschriftung\";\n\n\"Local backup to wallet failed!\" = \"Die lokale Sicherung in der Brieftasche ist fehlgeschlagen!\";\n\n\"Local wallet will be lost. Are you sure you want to restore wallet from iCloud?\" = \"Die lokale Brieftasche geht verloren. Sind Sie sicher, dass Sie die Brieftasche von iCloud wiederherstellen möchten?\";\n\n\"Maximum accounts reached\" = \"Maximale Anzahl an Accounts erreicht\";\n\n\"More\" = \"Mehr\";\n\n\"Name\" = \"Name\";\n\n\"Network Error\" = \"Netzwerkfehler\";\n\n\"New Wallet\" = \"Neue Brieftasche\";\n\n\"New addresses will be automatically generated and cycled for you as you use your current available addresses.\" = \"Neue Adressen werden automatisch erzeugt und durchgewechselt.\";\n\n\"Next\" = \"Nächste\";\n\n\"No\" = \"Nein\";\n\n\"None currently\" = \"Gegenwärtig keine\";\n\n\"Not now\" = \"Nicht jetzt\";\n\n\"Now authorize the transaction on your air gap device. When you have done so, click continue on this device to scan the authorized transaction data and make your payment.\" = \"Autorisiere nun die Transaktion mit dem zweiten Gerät. Scanne dazu die Transaktionsdaten und führe die Zahlung durch.\";\n\n\"OK\" = \"OK\";\n\n\"On your primary online device, when you want to make a payment from a cold wallet account, simply do it as you normally would on a normal account. When you click 'Send' on the Review Payment screen, instead of the payment going out immediately, you will be prompted to pass the unauthorized transaction data. Then on your secondary offline device, within this screen click 'Scan' to import the transaction so it can be authorized.\" = \"Auf dem primären Gerät wird die Zahlung auch aus dem Offline Brieftasche 'ganz normal' durchgeführt. Nachdem die 'normale' Zahlung abgeschlossen ist und auf 'senden' geklickt wurde, muss die umautorisierte Zahlung noch autorisiert werden. Auf dem Zweitgerät müssen diese Daten dann eingescannt werden und autorisiert werden.\";\n\n\"Once the transaction has been authorized by completing the above two steps, pass the authorized transaction back to your primary online device to finalize your payment.\" = \"Nachdem die Transaktion so autorisiert wurde, muss sie zurück auf das online Gerät übertragen werden um an das Netzwerk übertragen zu werden.\";\n\n\"Other Links\" = \"andere Links\";\n\n\"Pass\" = \"Pass\";\n\n\"Passphrase\" = \"Wortfolge\";\n\n\"Passphrase does not match the transaction\" = \"Die Wortfolge passt nicht zur Transaktion\";\n\n\"Password\" = \"Passwort\";\n\n\"Payment Index: %lu\" = \"Zahlungs Index：%lu\";\n\n\"Private key does not match address\" = \"Der private Schlüssel passt nicht zur Adresse\";\n\n\"Private key missing\" = \"Privater Schlüssel fehlt\";\n\n\"QR code\" = \"QR-Code\";\n\n\"Quit and re-enter app\" = \"Quit and re-enter app\";\n\n\"Rate\" = \"Bewertung\";\n\n\"Rate us in the App Store!\" = \"Bewerte uns im App Store!\";\n\n\"Receive\" = \"Erhalten\";\n\n\"Receive Payment\" = \"Receive Payment\";\n\n\"Receive Payment From Reusable Address\" = \"Receive Payment From Reusable Address\";\n\n\"Remind me Later\" = \"Erinnere mich später\";\n\n\"Restore\" = \"Wiederherstellen\";\n\n\"Restore Wallet\" = \"Stelle das Wallet wieder her\";\n\n\"Restore from iCloud\" = \"Wiederherstellen von iCloud\";\n\n\"Restoring Wallet\" = \"Stelle Wallet  wieder her\";\n\n\"Retry\" = \"Wiederholen\";\n\n\"Reusable Address Payment Addresses\" = \"Wiederverwendbare Zahlungsadressen\";\n\n\"Reusable Address:\" = \"Wiederverwendbare Adresse:\";\n\n\"Reusable Addresses\" = \"Reusable Addresses\";\n\n\"Review Payment\" = \"Überprüfe Zahlung\";\n\n\"Save\" = \"sichern\";\n\n\"Scan\" = \"Scannen\";\n\n\"Scan For Reusable Address Payment\" = \"Scanne auf wiederverwendbare Adressen\";\n\n\"Scan QR Code\" = \"Scanne QR Code\";\n\n\"Scan for reusable address transaction\" = \"Scanne auf Transaktionen\";\n\n\"Scan next part\" = \"扫描下一部分\";\n\n\"Scroll down to the section ‘Account Actions’\" = \"Scroll down to the section ‘Account Actions’\";\n\n\"Select Account\" = \"Scanne nächstes Stück\";\n\n\"Select and click a blockexplorer API\" = \"Select and click a blockexplorer API\";\n\n\"Select and click a transaction\" = \"Select and click a transaction\";\n\n\"Select and click an account\" = \"Select and click an account\";\n\n\"Select and click an account to receive from\" = \"Select and click an account to receive from\";\n\n\"Select and click an account to view it’s transaction history\" = \"Select and click an account to view it’s transaction history\";\n\n\"Select and click an address\" = \"Select and click an address\";\n\n\"Send\" = \"Gesendet\";\n\n\"Send Payment\" = \"Zahlung gesendet\";\n\n\"Send To Address In Contacts\" = \"Send To Address In Contacts\";\n\n\"Send authorized payment?\" = \"Sende autorisierte Zahlung?\";\n\n\"Sending\" = \"Sende\";\n\n\"Sending payment to a reusable address might take longer to show up then a normal transaction with the blockchain.info API. You might have to wait until at least 1 confirmation for the transaction to show up. This is due to the limitations of the blockchain.info API. For reusable address payments to show up faster, configure your app to use the Insight API in advance settings.\" = \"Gesendete Transaktionen mit wiederverwendbaren Adressen brauchen vielleicht länger um angezeigt zu werden. Eventuell muss auf +1 Bestätigung gewartet werden. Durch einen Wechsel der API in den erweiterten Einstellungen kann das behoben werden.\";\n\n\"Sent %@ to %@\" = \"Gesendet %@ an %@\";\n\n\"Set Transaction Fee in %@\" = \"Setzt Transaktionsgebühr auf %@\";\n\n\"Settings\" = \"Einstellungen\";\n\n\"Some funds may be pending confirmation and cannot be spent yet. (Check your account history) Account only has a spendable balance of %@\" = \"Einige eingehende Transaktionen sind noch nicht bestätigt und können nicht ausgegeben werden. Der Account hat eine senfbare Palace von %@\";\n\n\"Some people have compared bitcoin addresses to a bank routing number. It is a good analogy, however bitcoin addresses are public. So if you reuse the same bitcoin address for multiple payments like you would a routing number, people will be able to figure out how much bitcoin you have. Thus it is recommended that you only use one address per payment.\\nThis causes usability issues making the user use a new address whenever receiving a payment is cumbersome.\\nStealth/reusable addresses provides a better solution. When you give a sender a reusable address, the sender will derive a one time regular bitcoin address from the reusable address. Then the sender will send a payment to that regular bitcoin address. Now you can give many people just one reusable address and have them all send you payments without letting other people know how much bitcoin you have.\\nA reusable address looks like this vJmxthatTBXibYe9aZavx18iAT9gyiJETGkhwPX2WbHQGuzX83YvQXynD2t8yHU4Xjfonu5x9m6B4yxquytFP1c2CRbVR9mecxesvE. A reusable address is a lot longer then a regular bitcoin address, it is 102 characters in length.\\nReusable addresses are great, however there are no other mobile bitcoin wallets but ArcBit that supports reusable addresses for now. Which is why ArcBit supports receiving payments from both regular bitcoin addresses and reusable addresses.\\nFor each account, you have one reusable address. You can find it on your Receive screen. Swipe all the way to right on the QRCode on your Receive screen and you will find a reusable address.\" = \"Some people have compared bitcoin addresses to a bank routing number. It is a good analogy, however bitcoin addresses are public. So if you reuse the same bitcoin address for multiple payments like you would a routing number, people will be able to figure out how much bitcoin you have. Thus it is recommended that you only use one address per payment.\\nThis causes usability issues making the user use a new address whenever receiving a payment is cumbersome.\\nStealth/reusable addresses provides a better solution. When you give a sender a reusable address, the sender will derive a one time regular bitcoin address from the reusable address. Then the sender will send a payment to that regular bitcoin address. Now you can give many people just one reusable address and have them all send you payments without letting other people know how much bitcoin you have.\\nA reusable address looks like this vJmxthatTBXibYe9aZavx18iAT9gyiJETGkhwPX2WbHQGuzX83YvQXynD2t8yHU4Xjfonu5x9m6B4yxquytFP1c2CRbVR9mecxesvE. A reusable address is a lot longer then a regular bitcoin address, it is 102 characters in length.\\nReusable addresses are great, however there are no other mobile bitcoin wallets but ArcBit that supports reusable addresses for now. Which is why ArcBit supports receiving payments from both regular bitcoin addresses and reusable addresses.\\nFor each account, you have one reusable address. You can find it on your Receive screen. Swipe all the way to right on the QRCode on your Receive screen and you will find a reusable address.\";\n\n\"Spending from a cold wallet account\" = \"Sende vom Offline Brieftasche Account\";\n\n\"Start fresh\" = \"Frisch starten\";\n\n\"Start/Restore Another Wallet\" = \"Start/Restore Another Wallet\";\n\n\"Starting Change address ID:\" = \"Starte Adressen ID:\";\n\n\"Starting Receiving Address ID:\" = \"Empfangen der Adressen ID：\";\n\n\"Step 1: Scan transaction to authorize\" = \"Schritt 1: Scanne Transaktion zum Autorisieren\";\n\n\"Step 2: Input 12 word backup passphrase\" = \"Schritt 2: Gib die Wortfolge ein\";\n\n\"Step 3: Pass authorized transaction data\" = \"Schritt 3: Übertrage die autorisierte Transaktion\";\n\n\"Steps\" = \"Steps\";\n\n\"Success\" = \"Erfolgreich\";\n\n\"Swipe right on an address\" = \"Swipe right on an address\";\n\n\"Swipe to the right on the QR Code Image until you see the reusable address\" = \"Swipe to the right on the QR Code Image until you see the reusable address\";\n\n\"Temporarily import account private key\" = \"Importiere privaten Account Schlüssel temporär\";\n\n\"Temporarily import private key\" = \"Importiere privaten Schlüssel temporär\";\n\n\"The cold wallet feature will allow you to create accounts which offer better security compared to normal online wallets. You will need 2 devices to use this feature. Your normal day to day device that is connected to the internet and a secondary device that is not connected to the internet (Your secondary device would need to be online once to download the ArcBit app. Afterwards keep the secondary device offline for maximum security). This feature allows you to authorize bitcoin payments from an offline device so that the keys to your bitcoins will never need to be stored on your online device. Follow the step by step instructions by clicking the info buttons within the below sections.\" = \"Das Offline Brieftasche gibt dir die Möglichkeit die Sicherheit zu erhöhen. Ein Gerät ist mit dem Internet verbunden und ein zweites ist am Besten immer offline nachdem die ArcBit App heruntergeladen ist. So können Transaktionen autorisiert werden und das Guthaben muss trotzdem nicht auf einem Online Wallet liegen. Informationen dazu findest du in der Schritt für Schritt Anleitung weiter unten.\";\n\n\"The cold wallet feature will allow you to create accounts which offer better security compared to normal online wallets. You will need 2 devices to use this feature. Your normal day to day device that is connected to the internet and a secondary device that is not connected to the internet (Your secondary device would need to be online once to download the ArcBit app. Afterwards keep the secondary device offline for maximum security). This feature allows you to authorize bitcoin payments from an offline device so that the keys to your bitcoins will never need to be stored on your online device. You can enable the cold wallet feature by going into advanced settings.\" = \"The cold wallet feature will allow you to create accounts which offer better security compared to normal online wallets. You will need 2 devices to use this feature. Your normal day to day device that is connected to the internet and a secondary device that is not connected to the internet (Your secondary device would need to be online once to download the ArcBit app. Afterwards keep the secondary device offline for maximum security). This feature allows you to authorize bitcoin payments from an offline device so that the keys to your bitcoins will never need to be stored on your online device. You can enable the cold wallet feature by going into advanced settings.\";\n\n\"This account type can't see reusable address payments\" = \"Dieser Account Typ kann keine wiederverwendbaren Adressen sehen.\";\n\n\"This feature allows you to manually input a transaction ID and see if the corresponding transaction contains a reusable address payment to your reusable address. If so, then the funds will be added to your wallet. Normally the app will discover reusable address payments automatically for you, but if you believe a payment is missing you can use this feature.\" = \"Dies Funktion erlaubt es manuell eine Transaktion ID einzugeben um zu prüfen ob noch Transaktionen auf wiederverwendbaren Adressen liegen. Wenn ja werden die BTC dem Account hinzugefügt. Normalerweise geschieht das automatisch.\";\n\n\"To:\" = \"An：\";\n\n\"Today\" = \"Heute\";\n\n\"Toggle Automatic Transaction Fee\" = \"Toggle Automatic Transaction Fee\";\n\n\"Toggle ‘Enable Transaction Fee’\" = \"Toggle ‘Enable Transaction Fee’\";\n\n\"Toggle ’Enable advanced mode’\" = \"Toggle ’Enable advanced mode’\";\n\n\"Total:\" = \"Gesamt:\";\n\n\"Transaction %@ already accounted for.\" = \"Transaktion %@ wurde bereits gezählt.\";\n\n\"Transaction %@ does not belong to this account.\" = \"Die Transaktion gehört nicht zu diesem Account.\";\n\n\"Transaction Fee\" = \"Transaktionsgebühr\";\n\n\"Transaction ID\" = \"Transaktions ID\";\n\n\"Transaction ID: %@\" = \"Transaktions ID: %@\";\n\n\"Transaction authorized\" = \"Transaktion autorisiert\";\n\n\"Transaction confirmations\" = \"Transaction confirmations\";\n\n\"Transaction fees impact how quickly the Bitcoin network will confirm your transactions. Higher fees means faster confirmation times. Default fee behavior can be configured in settings.\" = \"Transaktionsgebühren beeinflussen wie schnell das Bitcoin Netzwerk die Transaktion bestätigt. Höhere Gebühren bedeuten eine schnellere Bestätigung. Die Gebühren Berechnung kann in den Einstellungen eingestellt werden.\";\n\n\"Transaction is not a reusable address transaction.\" = \"Diese Transaktion ist keine Transaktion einer wiederverwendbaren Adresse.\";\n\n\"Transaction needs to be authorized by an offline and air gap device. Send transaction to an offline device for authorization?\" = \"Transaktion muss durch ein zweites Gerät autorisiert werden. Zum autorisieren übertragen?\";\n\n\"Transaction needs to be passed back to your online device in order for the payment to be sent\" = \">Transaktion muss wieder zum online Gerät übertragen werden um gesendet zu werden.\";\n\n\"Try Again\" = \"Versuche es erneut\";\n\n\"Try our new cold wallet feature!\" = \"Probiere unser Offline Brieftasche feature aus!\";\n\n\"URL does not contain an address.\" = \"URL enthält keine Adresse.\";\n\n\"Unable to get dynamic fees. Falling back on fixed transaction fee. (fee can be configured on review payment)\" = \"Fehler beim lesen der dynamischen Gebührendaten. Es wird die festgelegte Gebühr genutzt.\";\n\n\"Unarchive Account\" = \"Entarchiviere Account\";\n\n\"Unarchive address\" = \"Entarchiviere Adresse\";\n\n\"Unarchived address\" = \"Entarchivierte Adresse\";\n\n\"Unconfirmed\" = \"Unbestätigt\";\n\n\"Unencrypted\" = \"Unverschlüsselt\";\n\n\"Use ArcBit on your browser to complement the mobile app. The web wallet has all the features that the mobile wallet has plus more!\" = \"Nutzer ArcBit im Browser um die App zu vervollständigen. Das Web Wallet hat alle Features und mehr!\";\n\n\"Use all funds\" = \"Alle Mittel verwenden\";\n\n\"View Account Address\" = \"View Account Address\";\n\n\"View Account Address In Web\" = \"View Account Address In Web\";\n\n\"View Account Addresses\" = \"View Account Addresses\";\n\n\"View Account Private Key\" = \"View Account Private Key\";\n\n\"View Account Public Key\" = \"View Account Public Key\";\n\n\"View Achievements\" = \"View Achievements\";\n\n\"View Addresses\" = \"Adressen ansehen\";\n\n\"View ArcBit Brain Wallet Details\" = \"ArcBit Gedächtnisbrieftasche Details\";\n\n\"View ArcBit Web Wallet Details\" = \"ArcBit Web-Brieftasche Details\";\n\n\"View History\" = \"View History\";\n\n\"View Private Key\" = \"View Private Key\";\n\n\"View Transaction In Web\" = \"View Transaction In Web\";\n\n\"View account private key QR code\" = \"QR-Code Account privater Schlüssel\";\n\n\"View account public key QR code\" = \"QR-Code Account öffentlicher Schlüssel\";\n\n\"View address QR code\" = \"QR-Code Adresse\";\n\n\"View address in web\" = \"Adresse im Web ansehen\";\n\n\"View in web\" = \"Im Web ansehen\";\n\n\"View private key QR code\" = \"QR-Code privater Schlüssel\";\n\n\"Visit our home page\" = \"Besuchen Sie unsere Homepage\";\n\n\"Wallet backup passphrase\" = \"Wallet backup Wortfolge\";\n\n\"Warning\" = \"Warnung\";\n\n\"Welcome to ArcBit, a user only controlled Bitcoin wallet. Start using the app now by depositing your Bitcoins here.\" = \"Willkommen bei ArcBit. Einem Nutzer kontrolliertem Bitcoin Wallet. Fange an und sende Bitcoin an dieses Wallet.\";\n\n\"Welcome!\" = \"Willkommen！\";\n\n\"What are Account/Extended Keys?\" = \"What are Account/Extended Keys?\";\n\n\"What are accounts?\" = \"What are accounts?\";\n\n\"What are reusable addresses?\" = \"What are reusable addresses?\";\n\n\"What are the benefits and advantages of Bitcoin?\" = \"What are the benefits and advantages of Bitcoin?\";\n\n\"What are transaction confirmations?\" = \"What are transaction confirmations?\";\n\n\"What is ArcBit's cold wallet feature?\" = \"What is ArcBit's cold wallet feature?\";\n\n\"What is Bitcoin?\" = \"What is Bitcoin?\";\n\n\"What is a bitcoin wallet?\" = \"What is a bitcoin wallet?\";\n\n\"What makes ArcBit different from other bitcoin wallets?\" = \"What makes ArcBit different from other bitcoin wallets?\";\n\n\"With an ArcBit cold wallet feature, you can create wallets and make payments offline without exposing your private keys to an internet connected device. This feature is great for storing large amounts of bitcoin or for the security conscious minded. Check out this feature in the cold wallet section in the side menu.\" = \"Mit dem ArcBit Offline Brieftasche können größere BTC Beträge sicher gelagert werden. Es werden keine privaten Schlüssel auf einem Online Gerät verwaltet sondern getrennt offline. Es erhöht die Sicherheit auch bei kleineren Beträgen. Mehr dazu im Offline Brieftasche Menu an der Seite.\";\n\n\"Write down backup passphrase\" = \"Write down backup passphrase\";\n\n\"Write down or memorize your 12 word wallet backup passphrase. You can view it by clicking \\\"Show backup passphrase\\\" in Settings. Your wallet backup passphrase is needed to recover your bitcoins.\" = \"Schriebe diese Wortfolge auf oder merke sie dir gut! Diese Wortfolge wird benötigt um deine BTC wiederherzustellen.\";\n\n\"Write down the 12 word passphrase below and keep it safe. This passphrase alone can restore your entire wallets\\' bitcoins (excluding imports).\" = \"Schreib diese Wortfolge auf und bewahre sie gut auf. Diese Wortfolge kann das gesamte Wallet wiederherstellen (ausgenommen sind Imports)\";\n\n\"Write down the 12 word passphrase below and keep it safe. This passphrase alone can restore your entire wallets\\' bitcoins.\" = \"Schreib diese Wortfolge auf und bewahre sie gut auf. Diese Wortfolge kann das gesamte Wallet wiederherstellen.\";\n\n\"Yes\" = \"Ja\";\n\n\"You are making a payment to a reusable address. Make sure that the receiver can see the payment made to them. (All ArcBit reusable addresses are compatible with other ArcBit wallets)\" = \"Du führst eine Zahlung an eine Wiederverwendbare Adresse aus. Stelle sicher, dass der Empfänger die Zahlung sehen kann. Wiederverwendbare Adressen sind mit anderen ArcBit Wallets kompatibel.\";\n\n\"You have %@, but %@ is needed. (This includes the transactions fee)\" = \"Du hast %@, aber %@ Wird benötigt. Darin enthalten ist die Transaktionsgebühr.\";\n\n\"You must exit and kill this app in order for this to take effect.\" = \"Du musst die App komplett beenden damit die Änderung wirksam wird.\";\n\n\"Your current wallet will be deleted. Your can restore your current wallet later with the wallet passphrase, but any imported accounts or addresses created in advanced mode cannot be recovered. Do you wish to continue?\" = \"Das aktuelle Wallet wird gelöscht. Du kannst es wiederherstellen mit der Wortfolge aber alle importierten importierten Accounts und im fortgeschrittenen Modus erstellten Adressen können nicht wieder hergestellt werden. Trotzdem fortfahren?\";\n\n\"Your iCloud backup was last saved on %@. Do you want to restore your wallet from iCloud or backup your local wallet to iCloud?\" = \"Ihre iCloud-Sicherung wurde zuletzt auf %@ gespeichert. Möchten Sie Ihre Brieftasche von iCloud wiederherstellen oder Ihre lokale Brieftasche auf iCloud sichern?\";\n\n\"Your new transaction fee is too high\" = \"Die neue Transaktionsgebühr ist zu hoch.\";\n\n\"Your wallet is now restored\" = \"Dein Wallet ist nun wiederhergetellt\";\n\n\"\\nAllow camera access in\\n Settings->Privacy->Camera->%@\" = \"\\nKamerazugriff in\\n Einstellungen->Privatsphäre->Kamera->%@\";\n\n\"\\tArcBit Web Wallet is a Chrome extension. It has all the features of the mobile wallet plus more. Highlights include the ability to create multiple wallets instead of just one, and a new non-cumbersome way to generate wallets, store and spend bitcoins all from cold storage! ArcBit's new way to manage your cold storage bitcoins also offers a more compelling reason to use ArcBit's watch account feature. Now you can safely watch the balance of your cold storage bitcoins by enabling advance mode in ArcBit and importing your cold storage account public keys.\\n\\tUse ArcBit Web Wallet in whatever way you wish. You can create a new wallet, or you can input your current 12 word backup passphrase to manage the same bitcoins across different devices. Check out the ArcBit Web Wallet in the Chrome Web Store for more details!\\n\" = \"\\tArcBits Web Wallet ist eine Chrome Erweiterung. Es hat alle Features der mobilen Wallets und mehr. Es können mehr als ein Wallet gleichzeitig erstellt werden. Außerdem kann so das Offline Brieftasche Feature noch besser genutzt werden. Von überall kann mit dem öffentlichen Schlüssel die Balance angesehen werden und trotzdem sind die BTC sicher nur auf dem Offline Brieftasche und können nicht gesendet werden ohne extra Autorisierung.\\n\\tWenn du im Web Wallet die selbe Wortfolge verwendest, kannst du das selbe Wallet von überall aus verwalten. Schau dir mehr Detail an m Chrome Web Store.\\n\";\n\n\"\\tWith the Arcbit Brain Wallet you can safely spend your bitcoins without ever having your private keys be exposed to the internet. It can be use in conjunction with your Arcbit Wallet or as a stand alone wallet.\\n\" = \"\\tDas ArcBit Gedächtnisbrieftasche kann genutzt werden um deine Bitcoin zu verwalten ohne jemals die privaten Schlüssel öffentlich werden zu lassen. Du kannst es zusammen mit der ArcBit App verwenden oder allein. Nur du hast Zugang.\\n\";\n\n\"iCloud Error: %@\" = \"iCloud-Fehler: %@\";\n\n\"iCloud backup found\" = \"iCloud-Sicherung gefunden\";\n\n\"iCloud backup not found\" = \"iCloud-Sicherung nicht gefunden\";\n\n\"iCloud backup will be lost. Are you sure you want to backup your local wallet to iCloud?\" = \"Die iCloud-Sicherung geht verloren. Sind Sie sicher, dass Sie Ihre lokale Brieftasche auf iCloud sichern möchten?\";\n\n\"Wallet backup passphrase will be shown\" = \"Wallet backup Wortfolge wird angezeigt werden\";\n\n\"Write down or memorize your wallet backup passphrase. If you lose your backup passphrase, your wallet cannot be recovered.\" = \"Notieren oder merken Sie sich Ihre Brieftaschen-Backup-Passphrase. Wenn Sie Ihre Backup-Passphrase verlieren, kann Ihre Brieftasche nicht wiederhergestellt werden.\";\n\n\"I understand\" = \"ich verstehe\";\n\n\"iCloud support for ArcBit discontinued\" = \"Die iCloud-Unterstützung für ArcBit wird eingestellt\";\n\n\"iCloud support for ArcBit is being discontinued. If your backup passphrase has not been backed up already, please do so.\" = \"Die iCloud-Unterstützung für ArcBit wird eingestellt. Wenn Ihre Backup-Passphrase noch nicht gesichert wurde, tun Sie dies bitte.\";\n\n\"Reusable address payments are disabled until further notice.\" = \"Wiederverwendbare Adresszahlungen sind bis auf weiteres deaktiviert.\";\n"
  },
  {
    "path": "ArcBit/es.lproj/Localizable.strings",
    "content": "\"\" = \"\";\n\n\"%@ is not allowed to access the camera\" = \"%@ no está permitido acceder a la cámara\";\n\n\"%@ servers not reachable.\" = \"%@ servidores no accesibles.\";\n\n\"%d/%d parts scanned.\" = \"%d/%d partes escaneadas.\";\n\n\"%llu confirmations\" = \"%llu confirmaciones\";\n\n\"1 Confirmation\" = \"1 confirmación\";\n\n\"A bitcoin address typically begins with a '1' or '3'. You can see the transactions and track the balance of an address, but you cannot spend from an imported address.\\nYou can temporarily import this watch addresses private key to spend its bitcoins. Simply go the Send screen and select a watch address to spend from and you will be prompted to temporarily import your addresses' private key when you click 'Review Payment' in the Send screen. The private key will stay in memory until the app exits or until you remove it manually in the Accounts screen.\" = \"A bitcoin address typically begins with a '1' or '3'. You can see the transactions and track the balance of an address, but you cannot spend from an imported address.\\nYou can temporarily import this watch addresses private key to spend its bitcoins. Simply go the Send screen and select a watch address to spend from and you will be prompted to temporarily import your addresses' private key when you click 'Review Payment' in the Send screen. The private key will stay in memory until the app exits or until you remove it manually in the Accounts screen.\";\n\n\"A bitcoin wallet is a software application that allows people to send, receive and manage their bitcoins.\\nBe aware of how other bitcoin applications store your bitcoins' private keys, which are needed to spend your bitcoins.\\nThere are generally three different ways applications can your store your bitcoins.\\n1.\\nThe banking model, where your bitcoin private keys are held for you by someone else.\\n2.\\nThe security box model, where your bitcoin private keys are stored encrypted on someone else’s servers.\\n3.\\nThe wallet model, where your bitcoin private keys are stored only on your device.\" = \"A bitcoin wallet is a software application that allows people to send, receive and manage their bitcoins.\\nBe aware of how other bitcoin applications store your bitcoins' private keys, which are needed to spend your bitcoins.\\nThere are generally three different ways applications can your store your bitcoins.\\n1.\\nThe banking model, where your bitcoin private keys are held for you by someone else.\\n2.\\nThe security box model, where your bitcoin private keys are stored encrypted on someone else’s servers.\\n3.\\nThe wallet model, where your bitcoin private keys are stored only on your device.\";\n\n\"A private key begins with an 'L', 'K', or '5'.\\nBIP 38 encrypted private keys can also be imported. They can either be imported encrypted or unencrypted. If you choose to import it encrypted, you will need to input the password each time you spend from your encrypted private key.\" = \"A private key begins with an 'L', 'K', or '5'.\\nBIP 38 encrypted private keys can also be imported. They can either be imported encrypted or unencrypted. If you choose to import it encrypted, you will need to input the password each time you spend from your encrypted private key.\";\n\n\"Account %@ imported\" = \"Cuenta %@ importada\";\n\n\"Account %lu\" = \"Cuenta %lu\";\n\n\"Account 1\" = \"Cuenta 1\";\n\n\"Account ID\" = \"ID de cuenta：\";\n\n\"ID de cuenta: %u\" = \"ID de cuenta %u\";\n\n\"Account Private Key\" = \"Clave privada de cuenta\";\n\n\"Account Public Key\" = \"Clave pública de cuenta\";\n\n\"Account private key does not match imported account public key\" = \"La clave privada de la cuenta no coincide con la clave pública de la cuenta importad\";\n\n\"Account private key missing\" = \"Falta la clave privada de la cuenta\";\n\n\"Accounts\" = \"Cuentas\";\n\n\"Achievement List\" = \"Achievement List\";\n\n\"Achievements\" = \"Achievements\";\n\n\"Actions\" = \"Acciones\";\n\n\"Active Change Addresses\" = \"Direcciones de cambios activo\";\n\n\"Active Main Addresses\" = \"Direcciones principales activas\";\n\n\"Add Contacts Entry\" = \"Add Contacts Entry\";\n\n\"Address\" = \"Dirección\";\n\n\"Address ID \" = \"ID dirección \";\n\n\"Address ID: %lu\" = \"ID dirección: %lu\";\n\n\"Addresses\" = \"Direcciones\";\n\n\"Advanced Achievement List\" = \"Advanced Achievement List\";\n\n\"Advanced FAQ\" = \"Advanced FAQ\";\n\n\"Advanced how To:\" = \"Advanced how To:\";\n\n\"After a transaction is broadcast to the Bitcoin network, it may be included in a block that is published to the network. When that happens, it is said that the transaction has been mined at a depth of 1 block. With each subsequent block that is found, the number of blocks deep is increased by one. To be secure against double spending, a transaction should not be considered as confirmed until it is a certain number of blocks deep.\\nA good rule of thumb is that 1 confirmation is good for small value amounts of bitcoins and a user should wait for more confirmations for larger value amounts.\\nArcBit will display the confirmation number up until the 6th confirmation.\" = \"After a transaction is broadcast to the Bitcoin network, it may be included in a block that is published to the network. When that happens, it is said that the transaction has been mined at a depth of 1 block. With each subsequent block that is found, the number of blocks deep is increased by one. To be secure against double spending, a transaction should not be considered as confirmed until it is a certain number of blocks deep.\\nA good rule of thumb is that 1 confirmation is good for small value amounts of bitcoins and a user should wait for more confirmations for larger value amounts.\\nArcBit will display the confirmation number up until the 6th confirmation.\";\n\n\"Amount:\" = \"Cantidad：\";\n\n\"An account is a collection of bitcoin addresses. With accounts, you will no longer have to manage bitcoin addresses directly anymore. Since address reuse results in a loss of privacy for people using Bitcoin, ArcBit’s HD wallet account system will automatically handle the cycling of bitcoin addresses for you. This ensures you don’t use the same bitcoin address more then once.\\nEach account also has a reusable address. You can find it in your Receive screen. Swipe all the way to right on the QRCode in your Receive screen and you will find a reusable address.\\nYou can create an unlimited amount of accounts with ArcBit. See the help section on how to create a new account in ArcBit.\" = \"An account is a collection of bitcoin addresses. With accounts, you will no longer have to manage bitcoin addresses directly anymore. Since address reuse results in a loss of privacy for people using Bitcoin, ArcBit’s HD wallet account system will automatically handle the cycling of bitcoin addresses for you. This ensures you don’t use the same bitcoin address more then once.\\nEach account also has a reusable address. You can find it in your Receive screen. Swipe all the way to right on the QRCode in your Receive screen and you will find a reusable address.\\nYou can create an unlimited amount of accounts with ArcBit. See the help section on how to create a new account in ArcBit.\";\n\n\"An account private key begins with the letters 'xprv'. You can see, spend and recover the transactions and bitcoins of an entire account from an account private key.\" = \"An account private key begins with the letters 'xprv'. You can see, spend and recover the transactions and bitcoins of an entire account from an account private key.\";\n\n\"An account public key begins with the letters 'xpub'. You can see the transactions and bitcoins of an entire account from an account private key, with the exception of reusable address payments. Future releases will address this issue.\\nYou can temporarily import the corresponding account private key for this accounts' account public key to spend your watch accounts' bitcoins. Simply go to the Send screen and select a watch account to spend from and you will be prompted to temporarily import your account's private key when you click 'Review Payment' on the Send screen. The private key will stay in memory until the app exits or until you remove it manually on the Accounts screen.\" = \"An account public key begins with the letters 'xpub'. You can see the transactions and bitcoins of an entire account from an account private key, with the exception of reusable address payments. Future releases will address this issue.\\nYou can temporarily import the corresponding account private key for this accounts' account public key to spend your watch accounts' bitcoins. Simply go to the Send screen and select a watch account to spend from and you will be prompted to temporarily import your account's private key when you click 'Review Payment' on the Send screen. The private key will stay in memory until the app exits or until you remove it manually on the Accounts screen.\";\n\n\"ArcBit Brain Wallet\" = \"Cartera Arcbit cerebro\";\n\n\"ArcBit Web Wallet\" = \"Cartera Arcbit Web\";\n\n\"ArcBit uses the the bitcoin wallet model (See the section ’What is a bitcoin wallet?’ to understand the 3 different security models of bitcoin software). However, if you use iCloud to backup your wallet, you will be using the security box model. It is recommended that you do not use iCloud and be responsible for your bitcoins yourself. For those who don’t want to remember a simple backup passphrase, iCloud backup is a good alternative.\" = \"ArcBit uses the the bitcoin wallet model (See the section ’What is a bitcoin wallet?’ to understand the 3 different security models of bitcoin software). However, if you use iCloud to backup your wallet, you will be using the security box model. It is recommended that you do not use iCloud and be responsible for your bitcoins yourself. For those who don’t want to remember a simple backup passphrase, iCloud backup is a good alternative.\";\n\n\"Archive Account\" = \"Archivo cuenta\";\n\n\"Archive address\" = \"Archivo dirección\";\n\n\"Archived Accounts\" = \"Cuentas archivados\";\n\n\"Archived Change Addresses\" = \"Direcciónes de cambios archivadas\";\n\n\"Archived Cold Wallet Accounts\" = \"Cuentas archivadas de la cartera fría\";\n\n\"Archived Imported Accounts\" = \"Cuentas importadas archivadas\";\n\n\"Archived Imported Addresses\" = \"Direcciones importadas archivadas\";\n\n\"Archived Imported Watch Accounts\" = \"Cuentas de observar importadas archivadas\";\n\n\"Archived Imported Watch Addresses\" = \"Las direcciones de observar importadas archivadas\";\n\n\"Archived Main Addresses\" = \"Direcciones principales archivadas\";\n\n\"Are you sure you want to archive account %@?\" = \"¿Está seguro de que desea archivar cuenta %@？\";\n\n\"Are you sure you want to archive address %@?\" = \"¿Está seguro de que desea archivar la dirección %@？\";\n\n\"Are you sure you want to delete this account?\" = \"¿Está seguro de que quiere eliminar esta cuenta?\";\n\n\"Are you sure you want to unarchive account %@\" = \"¿Está seguro de que desea anular el archivo cuenta %1$s？\";\n\n\"Are you sure you want to unarchive address %@?\" = \"Está seguro de que desea anular el archivo de dirección %1$s？\";\n\n\"Authorize Cold Wallet Account Payment\" = \"Autorizar cartera fría pago de la cuenta\";\n\n\"Authorize Payment\" = \"autorizar el pago\";\n\n\"Backup Passphrase\" = \"Frase de copia de seguridad\";\n\n\"Backup wallet\" = \"Cartera de copia de seguridad\";\n\n\"Backup local wallet\" = \"Carpeta local de respaldo\";\n\n\"Backup passphrase found in keychain\" = \"Frase de paso de seguridad encontrada en llavero\";\n\n\"Bitcoin cuts out the middleman and allows you to send money anywhere in the world with an internet connection with minimum to zero fees.\" = \"Bitcoin cuts out the middleman and allows you to send money anywhere in the world with an internet connection with minimum to zero fees.\";\n\n\"Bitcoin, uppercase 'B', is an online payment system invented in 2008 and released as open-source software in 2009 by a programmer named Satoshi Nakamoto. The system is decentralized and peer-to-peer allowing users to transact directly without needing an intermediary.\\nBitcoin is also a platform of which other decentralized applications can be built upon. Bitcoin, lowercase 'b' is the currency unit that Bitcoin uses.\" = \"Bitcoin, uppercase 'B', is an online payment system invented in 2008 and released as open-source software in 2009 by a programmer named Satoshi Nakamoto. The system is decentralized and peer-to-peer allowing users to transact directly without needing an intermediary.\\nBitcoin is also a platform of which other decentralized applications can be built upon. Bitcoin, lowercase 'b' is the currency unit that Bitcoin uses.\";\n\n\"Bitcoins can be purchased from various bitcoin exchanges. ArcBit is not a bitcoin exchange. ArcBit is a bitcoin wallet. After you purchase some bitcoins from an exchange, you can move it to a bitcoin wallet.\" = \"Bitcoins can be purchased from various bitcoin exchanges. ArcBit is not a bitcoin exchange. ArcBit is a bitcoin wallet. After you purchase some bitcoins from an exchange, you can move it to a bitcoin wallet.\";\n\n\"Cancel\" = \"Cancelar\";\n\n\"Cannot archive your default account\" = \"No se puede archivar su cuenta predeterminad\";\n\n\"Cannot archive your one and only account\" = \"No se puede archivar su primera y única cuenta\";\n\n\"Cannot create transactions with outputs less then %@\" = \"No se puede crear transacciones con salidas de menos de %@\";\n\n\"Cannot decrypt iCloud backup wallet.\" = \"No se puede descifrar la billetera de copia de seguridad de iCloud.\";\n\n\"Cannot import reusable address\" = \"No se puede importar la dirección reutilizable\";\n\n\"Change Address ID \" = \"Dirección de cambio ID \";\n\n\"Change Automatic Transaction Fee\" = \"Change Automatic Transaction Fee\";\n\n\"Change Block Explorer URL\" = \"Cambiar URL bloque explorador\";\n\n\"Change Blockexplorer Type\" = \"Change Blockexplorer Type\";\n\n\"Check out the ArcBit Brain Wallet\" = \"Echa un vistazo a la cartera Arcbit cerebro\";\n\n\"Check out the ArcBit Web Wallet\" = \"Echa un vistazo a la cartera Arcbit Web\";\n\n\"Check out the ArcBit Web Wallet!\" = \"Echa un vistazo a la cartera Arcbit Web!\";\n\n\"Checking Transaction\" = \"Comprobación de Transacció\";\n\n\"Clear account private key from memory\" = \"Borrar clave privada de la memoria\";\n\n\"Clear private key from memory\" = \"Borrar clave privada de la memoria\";\n\n\"Cleared from memory\" = \"Borradas de la memoria\";\n\n\"Click an address\" = \"Click an address\";\n\n\"Click the button with the arrow\" = \"Click the button with the arrow\";\n\n\"Click the plus button at the top right\" = \"Click the plus button at the top right\";\n\n\"Click the ‘Contacts’ button\" = \"Click the ‘Contacts’ button\";\n\n\"Click ‘Accounts’\" = \"Click ‘Accounts’\";\n\n\"Click ‘Advanced settings’\" = \"Click ‘Advanced settings’\";\n\n\"Click ‘Archive Account’\" = \"Click ‘Archive Account’\";\n\n\"Click ‘Create New Account’\" = \"Click ‘Create New Account’\";\n\n\"Click ‘Delete’\" = \"Click ‘Delete’\";\n\n\"Click ‘Done’\" = \"Click ‘Done’\";\n\n\"Click ‘Edit Account Name’\" = \"Click ‘Edit Account Name’\";\n\n\"Click ‘Edit’\" = \"Click ‘Edit’\";\n\n\"Click ‘Enable PIN Code’\" = \"Click ‘Enable PIN Code’\";\n\n\"Click ‘History’\" = \"Click ‘History’\";\n\n\"Click ‘Import Account’\" = \"Click ‘Import Account’\";\n\n\"Click ‘Import Private Key’\" = \"Click ‘Import Private Key’\";\n\n\"Click ‘Import Watch Only Account’\" = \"Click ‘Import Watch Only Account’\";\n\n\"Click ‘Import Watch Only Address’\" = \"Click ‘Import Watch Only Address’\";\n\n\"Click ‘Label transaction’\" = \"Click ‘Label transaction’\";\n\n\"Click ‘Restore Wallet’\" = \"Click ‘Restore Wallet’\";\n\n\"Click ‘Restore’\" = \"Click ‘Restore’\";\n\n\"Click ‘Review Payment’\" = \"Click ‘Review Payment’\";\n\n\"Click ‘Send’\" = \"Click ‘Send’\";\n\n\"Click ‘Set Transaction Fee’\" = \"Click ‘Set Transaction Fee’\";\n\n\"Click ‘Settings’\" = \"Click ‘Settings’\";\n\n\"Click ‘Show Backup Passphrase’\" = \"Click ‘Show Backup Passphrase’\";\n\n\"Click ‘View Addresses’\" = \"Click ‘View Addresses’\";\n\n\"Click ‘View account private key QR code’\" = \"Click ‘View account private key QR code’\";\n\n\"Click ‘View account public key QR code’\" = \"Click ‘View account public key QR code’\";\n\n\"Click ‘View address QR code’\" = \"Click ‘View address QR code’\";\n\n\"Click ‘View in web’\" = \"Click ‘View in web’\";\n\n\"Click ‘View private key QR code’\" = \"Click ‘View private key QR code’\";\n\n\"Click ‘blockexplorer API type’\" = \"Click ‘blockexplorer API type’\";\n\n\"Click ’Receive’\" = \"Click ’Receive’\";\n\n\"Close\" = \"Cerca\";\n\n\"Cold Wallet\" = \"Cartera fría\";\n\n\"Cold Wallet Accounts\" = \"Cuentas de cartera fría\";\n\n\"Cold Wallet Accounts can't see reusable address payments, thus this accounts' reusable address is not available.\" = \"Las cuentas de cartera fría no pueden ver los pagos de direcciones reutilizables, por lo que la dirección reutilizable de estas cuentas no está disponible.\";\n\n\"Cold Wallet Overview\" = \"Descripción general de la cartera frío\";\n\n\"Cold wallet private keys are not stored here and cannot be viewed\" = \"Las claves privadas de cartera frío no se almacenan aquí y no se puede ver.\";\n\n\"Complete\" = \"Completar\";\n\n\"Complete step 1\" = \"Complete el paso 1\";\n\n\"Confirm Payment\" = \"Confirmar pago\";\n\n\"Confirm Pin Code\" = \"Confirmar PIN\";\n\n\"Contacts\" = \"Contactos\";\n\n\"Continue\" = \"Continuar\";\n\n\"Copied To clipboard\" = \"Copiado al portapapeles\";\n\n\"Copy\" = \"Dupdo\";\n\n\"Copy Transaction ID to Clipboard\" = \"Copia el ID de transacción en el portapapeles\";\n\n\"Create Cold Wallet\" = \"Crear Cartera Fría\";\n\n\"Create New Account\" = \"Crear una nueva cuenta\";\n\n\"Create new contact\" = \"Crear nuevo contacto\";\n\n\"Customize Fee\" = \"Personalizar tarifa\";\n\n\"Decrypting\" = \"Descifrado\";\n\n\"Delete\" = \"Eliminar\";\n\n\"Delete %@\" = \"Eliminar %@\";\n\n\"Delete Account\" = \"Borrar cuenta\";\n\n\"Delete Contact\" = \"Borrar contacto?\";\n\n\"Delete address\" = \"Borrar dirección\";\n\n\"Do not use the QR code from here to receive bitcoins. Go to the Receive screen to get a QR code to receive bitcoins.\" = \"No utilice el código QR desde aquí para recibir bitcoins. Ir a la pantalla de recepción para obtener un código QR para recibir bitcoins.\";\n\n\"Do you like using ArcBit?\" = \"¿Te gusta usar Arcbit?\";\n\n\"Do you want to load and backup your current local wallet file?\" = \"¿Desea cargar y hacer una copia de seguridad de su archivo de billetera local actual?\";\n\n\"Do you want to load local wallet file?\" = \"¿Desea cargar el archivo de monedero local?\";\n\n\"Do you want to restore from your backup passphrase or start a new wallet?\" = \"¿Quieres restaurar a partir de copia de seguridad de su contraseña o iniciar una nueva cartera?\";\n\n\"Do you want to temporary import your account private key?\" = \"¿Quieres importación temporal clave privada de su cuenta?\";\n\n\"Do you want to temporary import your private key?\" = \"¿Quieres importación temporal de la clave privada?\";\n\n\"Don't remind me\" = \"No me lo recuerdes\";\n\n\"Done\" = \"Hecho\";\n\n\"Each account has a public and private account key. Account keys should be kept secret as they are used to view the account's transactions and spend the account's bitcoins.\" = \"Each account has a public and private account key. Account keys should be kept secret as they are used to view the account's transactions and spend the account's bitcoins.\";\n\n\"Edit\" = \"Editar\";\n\n\"Edit Account Name\" = \"Editar Nombre de Cuenta\";\n\n\"Edit Contact Name\" = \"Editar Nombre de Contacto\";\n\n\"Edit Label\" = \"Editar etiqueta\";\n\n\"Edit Transaction label\" = \"Editar etiqueta de Transacción\";\n\n\"Email Support\" = \"Soporte de correo electrónico\";\n\n\"Enable PIN code in settings to better secure your wallet.\" = \"Habilitar que el código PIN en Ajustes para asegurar mejor su cartera.\";\n\n\"Enable Pin Code\" = \"Habilitar código PIN\";\n\n\"Enable Transaction Fee\" = \"Enable Transaction Fee\";\n\n\"Enable advanced mode\" = \"Activar el modo avanzado\";\n\n\"Encountered error creating transaction. Please try again.\" = \"Se encontró un error al crear una transacción. Por favor intente de nuevo\";\n\n\"Encrypted\" = \"Eifrada\";\n\n\"Enter Label\" = \"Introduzca la etiqueta\";\n\n\"Enter PIN\" = \"Ingrese su PIN\";\n\n\"Enter a wallet backup passphrase to wipe the current wallet and start/restore another.\" = \"Introduzca una contraseña de copia de seguridad de la cartera para limpiar la cartera actual e iniciar/restaurar otro.\";\n\n\"Enter account private key\" = \"Introducir la clave privada de la cuenta\";\n\n\"Enter account public key\" = \"Introducir clave pública de cuenta\";\n\n\"Enter address\" = \"Introducir dirección\";\n\n\"Enter an account ID and click 'QR Code'. Then on your primary online device, enable Cold Wallet in settings. Then go to the Accounts screen and click 'Import Cold Wallet Account' and scan the Account Public Key QR Code. Afterwards use this cold wallet account as you would a normal account and deposit bitcoins into it. When you want to make a payment from a cold wallet account, go to the next section on the previous screen and follow the step by step instructions there.\" = \"Introduzca un ID de cuenta y haga clic en 'Código QR'. A continuación, en su dispositivo en línea principal, habilitar Cold Wallet en la configuración. A continuación, vaya a la pantalla de cuentas y haga clic en 'Importar cuenta de cartera fría' y escanear el código QR de clave pública de cuenta. Después utilice esta cuenta de cartera fría como lo haría con una cuenta normal y depositará bitcoins en ella. Cuando desee realizar un pago desde una cuenta de cartera fría, vaya a la siguiente sección en la pantalla anterior y siga las instrucciones paso a paso allí.\";\n\n\"Enter backup passphrase\" = \"Enter backup passphrase\";\n\n\"Enter passphrase for your iCloud backup wallet.\" = \"Ingrese la frase de contraseña para su billetera de respaldo de iCloud.\";\n\n\"Enter password for encrypted private key\" = \"Introduzca la contraseña para la clave privada encriptada\";\n\n\"Enter the 12 word passphrase that belongs to the cold wallet account that you want to make a payment from. This is the passphrase that was used to generate your account public key that was generated on the 'Create Cold Wallet' section found on the previous screen.\" = \"Introduzca la contraseña de 12 palabras que pertenece a la cuenta de cartera fría de la que desea realizar un pago. Esta es la frase de contraseña que se utilizó para generar la clave pública de su cuenta que se generó en la sección 'Crear Cartera fría' encontrada en la pantalla anterior.\";\n\n\"Error\" = \"Error\";\n\n\"Error fetching Transaction.\" = \"Error de transacción ir a buscar\";\n\n\"Error fetching unspent outputs. Try again later.\" = \"Error al recuperar las salidas no utilizadas. Inténtelo de nuevo más tarde.\";\n\n\"Error fetching unspent outputs. Try again.\" = \"Error al recuperar las salidas no utilizadas. Inténtalo de nuevo.\";\n\n\"Error getting block height.\" = \"Error al obtener la altura del bloque\";\n\n\"Error importing account\" = \"Error al importar la cuenta\";\n\n\"Error loading wallet JSON file\" = \"Error al cargar el archivo JSON de la cartera\";\n\n\"Explanation\" = \"Explanation\";\n\n\"FAQ\" = \"FAQ\";\n\n\"Fee:\" = \"Comisión:\";\n\n\"Fill address field\" = \"Fill address field\";\n\n\"Finished Passing Transaction Data\" = \"Terminado de pasar datos de transacciones\";\n\n\"First make sure you are using your secondary offline device for this screen (as mentioned in the overview on the previous screen). Click 'New Wallet' and write down or memorize the generated 12 word passphrase. This passphrase can recover and generate all your accounts and the bitcoins associated with it, so keep it safe and to yourself. Also instead of creating a new wallet, you can also input an existing 12 word passphrase that was generated here to create additional accounts.\" = \"Primero, asegúrese de que está utilizando su dispositivo fuera de línea secundario para esta pantalla (como se menciona en la vista general en la pantalla anterior). Haga clic en 'New Wallet' y anote o memorice la contraseña de 12 palabras generada. Esta frase de paso puede recuperar y generar todas sus cuentas y los bitcoins asociados con él, así que guárdelo seguro ya sí mismo. También en lugar de crear una cartera nueva, también puede introducir una contraseña de 12 palabras existente que se generó aquí para crear cuentas adicionales.\";\n\n\"Follow us on Twitter\" = \"Síganos en Twitter\";\n\n\"From:\" = \"De：\";\n\n\"Funds have been claimed already.\" = \"Los fondos han sido ya reivindicado.\";\n\n\"Funds imported\" = \"Fondos importados\";\n\n\"Ir\" = \"走\";\n\n\"Go to the side menu\" = \"Go to the side menu\";\n\n\"Have sender scan QR code\" = \"Have sender scan QR code\";\n\n\"Have sender send you payment\" = \"Have sender send you payment\";\n\n\"Help\" = \"Ayuda\";\n\n\"Here are some features that no other mobile bitcoin wallet supports.\\n- Reusable address support\\n- Ability to import individual account (extended) keys\\n- iCloud backup support\\n- Over 150 local currencies supported\" = \"Here are some features that no other mobile bitcoin wallet supports.\\n- Reusable address support\\n- Ability to import individual account (extended) keys\\n- iCloud backup support\\n- Over 150 local currencies supported\";\n\n\"Hierarchical Deterministic Wallet\" = \"Hierarchical Deterministic Wallet\";\n\n\"History\" = \"Historia\";\n\n\"How To:\" = \"How To:\";\n\n\"How do I get bitcoins?\" = \"How do I get bitcoins?\";\n\n\"How does ArcBit Wallet work?\" = \"How does ArcBit Wallet work?\";\n\n\"Import Account\" = \"Importar cuenta\";\n\n\"Import Cold Wallet Account\" = \"Importar cuenta de cartera fría\";\n\n\"Import Feature\" = \"Import Feature\";\n\n\"Import Private Key\" = \"Importar clave privada\";\n\n\"Import Private/Encrypted Key\" = \"Import Private/Encrypted Key\";\n\n\"Import Watch Account\" = \"Importar cuenta del observar\";\n\n\"Import Watch Address\" = \"Importar observar dirección\";\n\n\"Import private key encrypted or unencrypted?\" = \"Importar clave privada cifrado o sin cifrado?\";\n\n\"Import with QR code\" = \"Importar con el código QR\";\n\n\"Import with text input\" = \"Importar con la introducción de texto\";\n\n\"Imported Account %@\" = \"Importada cuenta %@\";\n\n\"Imported Accounts\" = \"Importada Cuentas\";\n\n\"Imported Address\" = \"Importada Dirección\";\n\n\"Imported Addresses\" = \"Importada Direcciones\";\n\n\"Imported Cold Wallet Account %@\" = \"Importada duenta de cartera fría %@\";\n\n\"Imported Watch Account %@\" = \"Importada observar de cuenta %@\";\n\n\"Imported Watch Accounts\" = \"Cuentas del observar importados\";\n\n\"Imported Watch Addresses\" = \"Direcciones Observar Importados\";\n\n\"Imported Watch Only Accounts can't see reusable address payments, thus this accounts' reusable address is not available. If you want see the reusable address for this account, import the account private key that corresponds to this accounts public key.\" = \"Las cuentas de observar importadas no pueden ver los pagos de direcciones reutilizables, por lo que la dirección reutilizable de estas cuentas no está disponible. Si desea ver la dirección reutilizable para esta cuenta, importe la clave privada de la cuenta que corresponde a esta clave pública de cuentas.\";\n\n\"Importing Account\" = \"Importación de cuenta\";\n\n\"Importing Cold Wallet Account\" = \"Importación de cuenta de cartera fría\";\n\n\"Importing a Private Key\" = \"Importing a Private Key\";\n\n\"Importing a Watch Only Account\" = \"Importing a Watch Only Account\";\n\n\"Importing a Watch Only Address\" = \"Importing a Watch Only Address\";\n\n\"Importing an Account\" = \"Importing an Account\";\n\n\"Importing an encrypted key will require you to input the password every time you want to send bitcoins from it.\" = \"Importar clave cifrada requerirán que introduzca la contraseña cada vez que desee enviar dinero de él.\";\n\n\"In advanced mode, you can import bitcoin keys and addresses from other sources. You can import account private keys, account public keys, private keys, and addresses.\\nPlease note that your 12 word passphrase cannot recover your bitcoins, so it is recommended that you backup imported keys and addresses separately.\" = \"In advanced mode, you can import bitcoin keys and addresses from other sources. You can import account private keys, account public keys, private keys, and addresses.\\nPlease note that your 12 word passphrase cannot recover your bitcoins, so it is recommended that you backup imported keys and addresses separately.\";\n\n\"Incomplete\" = \"Incompleto\";\n\n\"Incorrect passphrase, could not decrypt iCloud wallet backup.\" = \"Frase de contraseña incorrecta, no se pudo descifrar la copia de seguridad de iCloud wallet.\";\n\n\"Input a bitcoin address\" = \"Input a bitcoin address\";\n\n\"Input a label\" = \"Input a label\";\n\n\"Input a new label\" = \"Input a new label\";\n\n\"Input a recommended amount. Somewhere between %@ and %@ BTC\" = \"Input a recommended amount. Somewhere between %@ and %@ BTC\";\n\n\"Input amount\" = \"Input amount\";\n\n\"Input label\" = \"Input label\";\n\n\"Input new account name\" = \"Input new account name\";\n\n\"Input transaction fee in bitcoins\" = \"Input transaction fee in bitcoins\";\n\n\"Instructions\" = \"Instructions\";\n\n\"Insufficient Funds\" = \"Fondos insuficiente\";\n\n\"Insufficient Funds. Account balance is %@ when %@ is required.\" = \"Fondos insuficientes. saldo de la cuenta es %@ cuando se requiere %@.\";\n\n\"Insufficient Funds. Account contains bitcoin dust. You can only send up to %@ for now.\" = \"Fondos insuficientes. Cuenta bitcoin contiene polvo. Sólo se puede enviar un máximo de %@ por ahora\";\n\n\"Internal Wallet Data\" = \"Los datos de la cartera interna\";\n\n\"Internal account transfer\" = \"Transferencia de cuenta interna\";\n\n\"Invalid Address\" = \"Dirección inválida\";\n\n\"Invalid Passphrase\" = \"Frase de contraseña no válido\";\n\n\"Invalid URL\" = \"URL invalida\";\n\n\"Invalid account private key\" = \"Clave privada de cuenta no válido\";\n\n\"Invalid account public Key\" = \"Clave pública de cuenta no válido\";\n\n\"Invalid amount\" = \"Monto invalido\";\n\n\"Invalid backup passphrase\" = \"Frase de contraseña de respaldo no válido\";\n\n\"Invalid private key\" = \"Clave privada no válido\";\n\n\"Invalid scanned data\" = \"Datos escaneados no válido\";\n\n\"Invalid transaction ID\" = \"ID de transacción no válido\";\n\n\"It is not recommended that you manually manage private keys yourself. A leak of a private key can lead to the compromise of your accounts.\" = \"No se recomienda administrar manualmente las claves privadas a sí mismo. Una fuga de una clave privada puede conducir al compromiso de sus cuentas.\";\n\n\"It is not recommended that you use a regular bitcoin address for multiple payments, but instead you should import a reusable address. Add address anyways?\" = \"No se recomienda que utilice una dirección regular para varios pagos, sino que debe importar una dirección reutilizable. Añadir dirección de todos modos?\";\n\n\"Label\" = \"Etiqueta\";\n\n\"Label Transaction\" = \"Transacción etiqueta\";\n\n\"Local backup to wallet failed!\" = \"Error de respaldo local en la billetera！\";\n\n\"Local wallet will be lost. Are you sure you want to restore wallet from iCloud?\" = \"La billetera local se perderá. ¿Seguro que quieres restaurar la billetera desde iCloud?\";\n\n\"Maximum accounts reached\" = \"Cuentas máximo alcanzado\";\n\n\"More\" = \"Más\";\n\n\"Name\" = \"Nombre\";\n\n\"Network Error\" = \"Error de red\";\n\n\"New Wallet\" = \"Nueva cartera\";\n\n\"New addresses will be automatically generated and cycled for you as you use your current available addresses.\" = \"Nuevas direcciones se generan automáticamente y se reciclan para usted como usted utiliza sus direcciones disponibles actuales.\";\n\n\"Next\" = \"Siguiente\";\n\n\"No\" = \"No\";\n\n\"None currently\" = \"Ninguno actualmente\";\n\n\"Not now\" = \"Ahora no\";\n\n\"Now authorize the transaction on your air gap device. When you have done so, click continue on this device to scan the authorized transaction data and make your payment.\" = \"Ahora autorizar la transacción en su dispositivo de separación de aire. Cuando haya hecho clic en continuar en este dispositivo para escanear los datos de las transacciones autorizadas y hacer su pago.\";\n\n\"OK\" = \"OK\";\n\n\"On your primary online device, when you want to make a payment from a cold wallet account, simply do it as you normally would on a normal account. When you click 'Send' on the Review Payment screen, instead of the payment going out immediately, you will be prompted to pass the unauthorized transaction data. Then on your secondary offline device, within this screen click 'Scan' to import the transaction so it can be authorized.\" = \"En su dispositivo en línea principal, cuando desea realizar un pago desde una cuenta de cartera fría, simplemente hágalo como normalmente lo haría en una cuenta normal. Al hacer clic en 'Enviar' en la pantalla Revisar pago, en lugar de que el pago salga inmediatamente, se le pedirá que pase los datos de transacción no autorizados. A continuación, en su dispositivo secundario sin conexión, en esta pantalla haga clic en 'Escanear' para importar la transacción para que pueda ser autorizada.\";\n\n\"Once the transaction has been authorized by completing the above two steps, pass the authorized transaction back to your primary online device to finalize your payment.\" = \"Una vez que la transacción haya sido autorizada, completando los dos pasos anteriores, pasar la transacción autorizada de nuevo a su dispositivo en línea primaria para finalizar su pago.\";\n\n\"Other Links\" = \"Otros enlaces\";\n\n\"Pass\" = \"Pasar\";\n\n\"Passphrase\" = \"Frase de contraseña\";\n\n\"Passphrase does not match the transaction\" = \"Frase de contraseña no coincide con la transacción\";\n\n\"Password\" = \"Contraseña\";\n\n\"Payment Index: %lu\" = \"Índice de Pago： %lu\";\n\n\"Private key does not match address\" = \"私密金鑰不匹配地址\";\n\n\"Private key missing\" = \"Clave privada no coincide con la dirección\";\n\n\"QR code\" = \"Código QR\";\n\n\"Quit and re-enter app\" = \"Quit and re-enter app\";\n\n\"Rate\" = \"Tarifa\";\n\n\"Rate us in the App Store!\" = \"Nos clasificaría en el App Store!\";\n\n\"Receive\" = \"Recibir\";\n\n\"Receive Payment\" = \"Receive Payment\";\n\n\"Receive Payment From Reusable Address\" = \"Receive Payment From Reusable Address\";\n\n\"Remind me Later\" = \"Recuérdame más tarde\";\n\n\"Restore\" = \"Restaurar\";\n\n\"Restore Wallet\" = \"Restaurar cartera\";\n\n\"Restore from iCloud\" = \"Restaurar desde iCloud\";\n\n\"Restoring Wallet\" = \"Restaurar cartera\";\n\n\"Retry\" = \"Rever\";\n\n\"Reusable Address Payment Addresses\" = \"Reutilizable dirección direcciones de pago\";\n\n\"Reusable Address:\" = \"Reutilizable Dirección:\";\n\n\"Reusable Addresses\" = \"Reusable Addresses\";\n\n\"Review Payment\" = \"Revisión de pagos\";\n\n\"Save\" = \"Salvar\";\n\n\"Scan\" = \"Escanear\";\n\n\"Scan For Reusable Address Payment\" = \"Para escanear reutilizable dirección de pago\";\n\n\"Scan QR Code\" = \"Escanear código QR\";\n\n\"Scan for reusable address transaction\" = \"Analizar en busca de transacción dirección reutilizable\";\n\n\"Scan next part\" = \"Scan parte próxima\";\n\n\"Scroll down to the section ‘Account Actions’\" = \"Scroll down to the section ‘Account Actions’\";\n\n\"Select Account\" = \"Seleccionar cuenta\";\n\n\"Select and click a blockexplorer API\" = \"Select and click a blockexplorer API\";\n\n\"Select and click a transaction\" = \"Select and click a transaction\";\n\n\"Select and click an account\" = \"Select and click an account\";\n\n\"Select and click an account to receive from\" = \"Select and click an account to receive from\";\n\n\"Select and click an account to view it’s transaction history\" = \"Select and click an account to view it’s transaction history\";\n\n\"Select and click an address\" = \"Select and click an address\";\n\n\"Send\" = \"Enviar\";\n\n\"Send Payment\" = \"Enviar Pago\";\n\n\"Send To Address In Contacts\" = \"Send To Address In Contacts\";\n\n\"Send authorized payment?\" = \"Envíe el pago autorizado?\";\n\n\"Sending\" = \"Enviando\";\n\n\"Sending payment to a reusable address might take longer to show up then a normal transaction with the blockchain.info API. You might have to wait until at least 1 confirmation for the transaction to show up. This is due to the limitations of the blockchain.info API. For reusable address payments to show up faster, configure your app to use the Insight API in advance settings.\" = \"Enviar el pago a una dirección reutilizable podría tomar más tiempo para aparecer luego de una transacción normal con la API blockchain.info. Es posible que tenga que esperar al menos hasta el 1 de confirmación de la transacción en aparecer. Esto es debido a las limitaciones de la API blockchain.info. Para los pagos de direcciones reutilizables para mostrar más rápido, configurar la aplicación para utilizar la API de Insight en configuraciones avanzadas.\";\n\n\"Sent %@ to %@\" = \"Enviado %@ a %@\";\n\n\"Set Transaction Fee in %@\" = \"Establecer cuota de transacción en %@\";\n\n\"Settings\" = \"Ajustes\";\n\n\"Some funds may be pending confirmation and cannot be spent yet. (Check your account history) Account only has a spendable balance of %@\" = \"Algunos fondos pueden estar pendientes de confirmación y no se pueden gastar todavía. (Consulte su historial de la cuenta) cuenta solamente tiene un saldo gastable de %@\";\n\n\"Some people have compared bitcoin addresses to a bank routing number. It is a good analogy, however bitcoin addresses are public. So if you reuse the same bitcoin address for multiple payments like you would a routing number, people will be able to figure out how much bitcoin you have. Thus it is recommended that you only use one address per payment.\\nThis causes usability issues making the user use a new address whenever receiving a payment is cumbersome.\\nStealth/reusable addresses provides a better solution. When you give a sender a reusable address, the sender will derive a one time regular bitcoin address from the reusable address. Then the sender will send a payment to that regular bitcoin address. Now you can give many people just one reusable address and have them all send you payments without letting other people know how much bitcoin you have.\\nA reusable address looks like this vJmxthatTBXibYe9aZavx18iAT9gyiJETGkhwPX2WbHQGuzX83YvQXynD2t8yHU4Xjfonu5x9m6B4yxquytFP1c2CRbVR9mecxesvE. A reusable address is a lot longer then a regular bitcoin address, it is 102 characters in length.\\nReusable addresses are great, however there are no other mobile bitcoin wallets but ArcBit that supports reusable addresses for now. Which is why ArcBit supports receiving payments from both regular bitcoin addresses and reusable addresses.\\nFor each account, you have one reusable address. You can find it on your Receive screen. Swipe all the way to right on the QRCode on your Receive screen and you will find a reusable address.\" = \"Some people have compared bitcoin addresses to a bank routing number. It is a good analogy, however bitcoin addresses are public. So if you reuse the same bitcoin address for multiple payments like you would a routing number, people will be able to figure out how much bitcoin you have. Thus it is recommended that you only use one address per payment.\\nThis causes usability issues making the user use a new address whenever receiving a payment is cumbersome.\\nStealth/reusable addresses provides a better solution. When you give a sender a reusable address, the sender will derive a one time regular bitcoin address from the reusable address. Then the sender will send a payment to that regular bitcoin address. Now you can give many people just one reusable address and have them all send you payments without letting other people know how much bitcoin you have.\\nA reusable address looks like this vJmxthatTBXibYe9aZavx18iAT9gyiJETGkhwPX2WbHQGuzX83YvQXynD2t8yHU4Xjfonu5x9m6B4yxquytFP1c2CRbVR9mecxesvE. A reusable address is a lot longer then a regular bitcoin address, it is 102 characters in length.\\nReusable addresses are great, however there are no other mobile bitcoin wallets but ArcBit that supports reusable addresses for now. Which is why ArcBit supports receiving payments from both regular bitcoin addresses and reusable addresses.\\nFor each account, you have one reusable address. You can find it on your Receive screen. Swipe all the way to right on the QRCode on your Receive screen and you will find a reusable address.\";\n\n\"Spending from a cold wallet account\" = \"Pasar de una cuenta de cartera fría\";\n\n\"Start fresh\" = \"Empezar de nuevo\";\n\n\"Start/Restore Another Wallet\" = \"Start/Restore Another Wallet\";\n\n\"Starting Change address ID:\" = \"Inicio de la ID de dirección de cambio:\";\n\n\"Starting Receiving Address ID:\" = \"Inicio de la ID de dirección de recepción:\";\n\n\"Step 1: Scan transaction to authorize\" = \"Paso 1: Escanear para autorizar la transacción\";\n\n\"Step 2: Input 12 word backup passphrase\" = \"Paso 2: Entrada 12 palabra frase de contraseña de copia de seguridad\";\n\n\"Step 3: Pass authorized transaction data\" = \"Paso 3: Pasar los datos de transacciones autorizadas\";\n\n\"Steps\" = \"Steps\";\n\n\"Success\" = \"Éxito\";\n\n\"Swipe right on an address\" = \"Swipe right on an address\";\n\n\"Swipe to the right on the QR Code Image until you see the reusable address\" = \"Swipe to the right on the QR Code Image until you see the reusable address\";\n\n\"Temporarily import account private key\" = \"Cuenta de clave privada importación temporal\";\n\n\"Temporarily import private key\" = \"Clave privada importación temporal\";\n\n\"The cold wallet feature will allow you to create accounts which offer better security compared to normal online wallets. You will need 2 devices to use this feature. Your normal day to day device that is connected to the internet and a secondary device that is not connected to the internet (Your secondary device would need to be online once to download the ArcBit app. Afterwards keep the secondary device offline for maximum security). This feature allows you to authorize bitcoin payments from an offline device so that the keys to your bitcoins will never need to be stored on your online device. Follow the step by step instructions by clicking the info buttons within the below sections.\" = \"La función Cartera fría le permitirá crear cuentas que ofrecen una mayor seguridad en línea a continuación, carteras normales. Se necesitan 2 dispositivos para utilizar esta función. Su día normal de dispositivo de día que está conectado a Internet y un dispositivo secundario que no está conectado a Internet (Su dispositivo secundario tendría que estar en línea una vez que descargar la aplicación Arcbit. Posteriormente a mantener el dispositivo fuera de línea secundaria para la seguridad máxima). Esta característica le permite autorizar pagos bitcoin de un dispositivo de conexión para que las llaves de sus bitcoins no tendrán que ser Store en el dispositivo en línea. Siga las instrucciones paso a paso haciendo clic en los botones de información dentro de las siguientes secciones\";\n\n\"The cold wallet feature will allow you to create accounts which offer better security compared to normal online wallets. You will need 2 devices to use this feature. Your normal day to day device that is connected to the internet and a secondary device that is not connected to the internet (Your secondary device would need to be online once to download the ArcBit app. Afterwards keep the secondary device offline for maximum security). This feature allows you to authorize bitcoin payments from an offline device so that the keys to your bitcoins will never need to be stored on your online device. You can enable the cold wallet feature by going into advanced settings.\" = \"The cold wallet feature will allow you to create accounts which offer better security compared to normal online wallets. You will need 2 devices to use this feature. Your normal day to day device that is connected to the internet and a secondary device that is not connected to the internet (Your secondary device would need to be online once to download the ArcBit app. Afterwards keep the secondary device offline for maximum security). This feature allows you to authorize bitcoin payments from an offline device so that the keys to your bitcoins will never need to be stored on your online device. You can enable the cold wallet feature by going into advanced settings.\";\n\n\"This account type can't see reusable address payments\" = \"Este tipo de cuenta no puede ver los pagos de direcciones reutilizables\";\n\n\"This feature allows you to manually input a transaction ID and see if the corresponding transaction contains a reusable address payment to your reusable address. If so, then the funds will be added to your wallet. Normally the app will discover reusable address payments automatically for you, but if you believe a payment is missing you can use this feature.\" = \"Esta característica le permite introducir manualmente un identificador de transacción y ver si la transacción correspondiente contiene un pago reenvío a su dirección reutilizable. Si es así, entonces los fondos se añadirán a su cartera. Normalmente, la aplicación va a descubrir los pagos de reenvío automáticamente para usted, pero si usted cree que un pago no se encuentra usted puede utilizar esta función.\";\n\n\"To:\" = \"A:\";\n\n\"Today\" = \"Hoy\";\n\n\"Toggle Automatic Transaction Fee\" = \"Toggle Automatic Transaction Fee\";\n\n\"Toggle ‘Enable Transaction Fee’\" = \"Toggle ‘Enable Transaction Fee’\";\n\n\"Toggle ’Enable advanced mode’\" = \"Toggle ’Enable advanced mode’\";\n\n\"Total:\" = \"Total:\";\n\n\"Transaction %@ already accounted for.\" = \"Transacción %@ ya contabilizados.\";\n\n\"Transaction %@ does not belong to this account.\" = \"Transacción %@ no pertenece a esta cuenta.\";\n\n\"Transaction Fee\" = \"Comisión de transacción\";\n\n\"Transaction ID\" = \"ID de transacción\";\n\n\"Transaction ID: %@\" = \"ID de transacción: %@\";\n\n\"Transaction authorized\" = \"Transacción autorizada\";\n\n\"Transaction confirmations\" = \"Transaction confirmations\";\n\n\"Transaction fees impact how quickly the Bitcoin network will confirm your transactions. Higher fees means faster confirmation times. Default fee behavior can be configured in settings.\" = \"Las comisiones de transacción afectan la rapidez con que la red de Bitcoin confirmará sus transacciones. Las tarifas más altas significan tiempos de confirmación más rápidos. El comportamiento de pago predeterminado se puede configurar en la configuración.\";\n\n\"Transaction is not a reusable address transaction.\" = \"La transacción no es una transacción dirección reutilizable.\";\n\n\"Transaction needs to be authorized by an offline and air gap device. Send transaction to an offline device for authorization?\" = \"Transacción debe ser autorizada por un dispositivo fuera de línea y espacio de aire. Enviar a un dispositivo de transacción fuera de línea para la autorización?\";\n\n\"Transaction needs to be passed back to your online device in order for the payment to be sent\" = \"Transacción debe ser aprobada de nuevo a su dispositivo en línea para que el pago que se enviará\";\n\n\"Try Again\" = \"Inténtalo de nuevo\";\n\n\"Try our new cold wallet feature!\" = \"Pruebe nuestra nueva función de cartera frío!\";\n\n\"URL does not contain an address.\" = \"La URL no contiene una dirección.\";\n\n\"Unable to get dynamic fees. Falling back on fixed transaction fee. (fee can be configured on review payment)\" = \">No es posible obtener tasas dinámicas. Volver a caer sobre el precio de la transacción fijo. (De pago se puede configurar mediante el pago revisión)\";\n\n\"Unarchive Account\" = \"Desarchivar cuenta\";\n\n\"Unarchive address\" = \"Desarchivar dirección\";\n\n\"Unarchived address\" = \"Dirección desarchivados\";\n\n\"Unconfirmed\" = \"Inconfirmado\";\n\n\"Unencrypted\" = \"Sin cifrar\";\n\n\"Use ArcBit on your browser to complement the mobile app. The web wallet has all the features that the mobile wallet has plus more!\" = \"Utilice cartera Arcbit Web para complementar la aplicación móvil. La cartera web tiene todas las características que la billetera móvil tiene mucho más!\";\n\n\"Use all funds\" = \"Usa todos los fondos\";\n\n\"View Account Address\" = \"View Account Address\";\n\n\"View Account Address In Web\" = \"View Account Address In Web\";\n\n\"View Account Addresses\" = \"View Account Addresses\";\n\n\"View Account Private Key\" = \"View Account Private Key\";\n\n\"View Account Public Key\" = \"View Account Public Key\";\n\n\"View Achievements\" = \"View Achievements\";\n\n\"View Addresses\" = \"Ver Direcciones\";\n\n\"View ArcBit Brain Wallet Details\" = \"Ver cartera Arcbit cerebrales detalles\";\n\n\"View ArcBit Web Wallet Details\" = \"Ver cartera Arcbit web detalles\";\n\n\"View History\" = \"View History\";\n\n\"View Private Key\" = \"View Private Key\";\n\n\"View Transaction In Web\" = \"View Transaction In Web\";\n\n\"View account private key QR code\" = \"Ver código QR clave privada de cuenta\";\n\n\"View account public key QR code\" = \"Ver código QR clave pública de cuenta\";\n\n\"View address QR code\" = \"Ver dirección de código QR\";\n\n\"View address in web\" = \"Ver dirección en la Web\";\n\n\"View in web\" = \"Ver en la Web\";\n\n\"View private key QR code\" = \"Ver código QR clave privada\";\n\n\"Visit our home page\" = \"Visita nuestra página de inicio\";\n\n\"Wallet backup passphrase\" = \"Contraseña de copia de seguridad\";\n\n\"Warning\" = \"Advertencia\";\n\n\"Welcome to ArcBit, a user only controlled Bitcoin wallet. Start using the app now by depositing your Bitcoins here.\" = \"Bienvenido a Arcbit, un usuario sólo controlado Bitcoin cartera. Comience a utilizar la aplicación ahora depositando sus bitcoins aquí.\";\n\n\"Welcome!\" = \"¡Bienvenido!\";\n\n\"What are Account/Extended Keys?\" = \"What are Account/Extended Keys?\";\n\n\"What are accounts?\" = \"What are accounts?\";\n\n\"What are reusable addresses?\" = \"What are reusable addresses?\";\n\n\"What are the benefits and advantages of Bitcoin?\" = \"What are the benefits and advantages of Bitcoin?\";\n\n\"What are transaction confirmations?\" = \"What are transaction confirmations?\";\n\n\"What is ArcBit's cold wallet feature?\" = \"What is ArcBit's cold wallet feature?\";\n\n\"What is Bitcoin?\" = \"What is Bitcoin?\";\n\n\"What is a bitcoin wallet?\" = \"What is a bitcoin wallet?\";\n\n\"What makes ArcBit different from other bitcoin wallets?\" = \"What makes ArcBit different from other bitcoin wallets?\";\n\n\"With an ArcBit cold wallet feature, you can create wallets and make payments offline without exposing your private keys to an internet connected device. This feature is great for storing large amounts of bitcoin or for the security conscious minded. Check out this feature in the cold wallet section in the side menu.\" = \"Con una función Cartera fría Arcbit, puede crear carteras y realizar pagos en línea sin exponer sus claves privadas a un dispositivo conectado a Internet. Esta característica es ideal para el almacenamiento de grandes cantidades de bitcoins o para la seguridad de mente consciente. Echa un vistazo a esta característica en la sección de cartera frío en el menú lateral.\";\n\n\"Write down backup passphrase\" = \"Write down backup passphrase\";\n\n\"Write down or memorize your 12 word wallet backup passphrase. You can view it by clicking \\\"Show backup passphrase\\\" in Settings. Your wallet backup passphrase is needed to recover your bitcoins.\" = \"Anotar o memorizar el 12 palabra frase de contraseña de copia de seguridad de la cartera que se puede encontrar en la configuración. Se necesita su contraseña de copia de seguridad de la cartera para recuperar sus bitcoins.\";\n\n\"Write down the 12 word passphrase below and keep it safe. This passphrase alone can restore your entire wallets\\' bitcoins (excluding imports).\" = \"Anote la contraseña de 12 palabras abajo y manténgala segura. Esta frase de contraseña solo puede restaurar los bitcoins de todas sus carteras (excluyendo las importaciones).\";\n\n\"Write down the 12 word passphrase below and keep it safe. This passphrase alone can restore your entire wallets\\' bitcoins.\" = \"Anote la contraseña de 12 palabras abajo y manténgala segura. Esta frase de contraseña solo puede restaurar los bitcoins de toda su cartera.\";\n\n\"Yes\" = \"Sí\";\n\n\"You are making a payment to a reusable address. Make sure that the receiver can see the payment made to them. (All ArcBit reusable addresses are compatible with other ArcBit wallets)\" = \"Usted está haciendo un pago a una dirección reutilizable. Asegúrese de que el receptor puede ver el pago hecho a ellos. (Todas las direcciones reutilizables Arcbit son compatibles con otras carteras ArcBit)\";\n\n\"You have %@, but %@ is needed. (This includes the transactions fee)\" = \"Tienes %@, pero se necesita %@. (Esto incluye la cuota de transacciones)\";\n\n\"You must exit and kill this app in order for this to take effect.\" = \"Debe salir y matar esta aplicación para que esto tenga efecto.\";\n\n\"Your current wallet will be deleted. Your can restore your current wallet later with the wallet passphrase, but any imported accounts or addresses created in advanced mode cannot be recovered. Do you wish to continue?\" = \"Se eliminará su cartera actual. Su puede restaurar su cartera actual más tarde con la frase de cartera, pero ninguna cuenta o direcciones creadas en el modo avanzado importados no se pueden recuperar. ¿Desea continuar?\";\n\n\"Your iCloud backup was last saved on %@. Do you want to restore your wallet from iCloud or backup your local wallet to iCloud?\" = \"Su copia de seguridad de iCloud se guardó por última vez en %@. ¿Desea restaurar su billetera desde iCloud o hacer una copia de seguridad de su billetera local en iCloud?\";\n\n\"Your new transaction fee is too high\" = \"Su nueva tarifa de transacción es demasiado alto\";\n\n\"Your wallet is now restored\" = \"Su cartera ahora se restaura\";\n\n\"\\nAllow camera access in\\n Settings->Privacy->Camera->%@\" = \"\\nPermitir acceso a la cámara en\\n Configuraciones->Intimidad->Cámara->%@\";\n\n\"\\tArcBit Web Wallet is a Chrome extension. It has all the features of the mobile wallet plus more. Highlights include the ability to create multiple wallets instead of just one, and a new non-cumbersome way to generate wallets, store and spend bitcoins all from cold storage! ArcBit's new way to manage your cold storage bitcoins also offers a more compelling reason to use ArcBit's watch account feature. Now you can safely watch the balance of your cold storage bitcoins by enabling advance mode in ArcBit and importing your cold storage account public keys.\\n\\tUse ArcBit Web Wallet in whatever way you wish. You can create a new wallet, or you can input your current 12 word backup passphrase to manage the same bitcoins across different devices. Check out the ArcBit Web Wallet in the Chrome Web Store for more details!\\n\" = \"\\tCartera Arcbit web es una extensión de Chrome. Tiene todas las características de la cartera móvil y más. Lo más destacado es la posibilidad de crear varias carteras en lugar de sólo una, y una nueva forma no engorrosa para generar carteras, almacenar y gastar bitcoins todo desde el almacenamiento en frío! La nueva forma de ArcBit para administrar tus bitcoins de almacenamiento en frío también ofrece una razón más convincente para usar la función de cuenta de reloj de ArcBit. Ahora puede ver con seguridad el balance de sus bitcoins de almacenamiento en frío al habilitar el modo avanzado en ArcBit e importar las claves públicas de su cuenta de almacenamiento en frío.\\n\\tUtilice cartera Arcbit web de la forma que desee. Puede crear una cartera nueva o puede introducir su contraseña de copia de seguridad actual de 12 palabras para administrar los mismos bitcoins entre dispositivos diferentes. Echa un vistazo a cartera Arcbit web en la Chrome Web Store para obtener más detalles.\\n\";\n\n\"\\tWith the Arcbit Brain Wallet you can safely spend your bitcoins without ever having your private keys be exposed to the internet. It can be use in conjunction with your Arcbit Wallet or as a stand alone wallet.\\n\" = \"\\tCon el Arcbit Brain Wallet puede pasar con seguridad sus bitcoins sin tener sus claves privadas expuestas a Internet. Se puede utilizar en conjunto con su cartera de Arcbit o como una cartera independiente.\\n\";\n\n\"iCloud Error: %@\" = \"Error de iCloud: %@\";\n\n\"iCloud backup found\" = \"Copia de seguridad de iCloud encontrada\";\n\n\"iCloud backup not found\" = \"No se encontró la copia de seguridad de iCloud\";\n\n\"iCloud backup will be lost. Are you sure you want to backup your local wallet to iCloud?\" = \"La copia de seguridad de iCloud se perderá. ¿Seguro que quieres hacer una copia de seguridad de tu billetera local en iCloud?\";\n\n\"Wallet backup passphrase will be shown\" = \"Se mostrará la contraseña de copia de seguridad cartera\";\n\n\"Write down or memorize your wallet backup passphrase. If you lose your backup passphrase, your wallet cannot be recovered.\" = \"Escriba o memorice su contraseña de contraseña de la billetera. Si pierde su frase de contraseña de respaldo, su billetera no podrá recuperarse.\";\n\n\"I understand\" = \"entiendo\";\n\n\"iCloud support for ArcBit discontinued\" = \"El soporte de iCloud para ArcBit se descontinúa\";\n\n\"iCloud support for ArcBit is being discontinued. If your backup passphrase has not been backed up already, please do so.\" = \"El soporte de iCloud para ArcBit se descontinúa. Si su frase de paso de seguridad no se ha respaldado ya, hágalo.\";\n\n\"Reusable address payments are disabled until further notice.\" = \"Los pagos de direcciones reutilizables están deshabilitados hasta nuevo aviso.\";\n"
  },
  {
    "path": "ArcBit/model/TLAccountObject.swift",
    "content": "//\n//  TLAccountObject.swift\n//  ArcBit\n//\n//  Created by Timothy Lee on 3/14/15.\n//  Copyright (c) 2015 Timothy Lee <stequald01@gmail.com>\n//\n//   This library is free software; you can redistribute it and/or\n//   modify it under the terms of the GNU Lesser General Public\n//   License as published by the Free Software Foundation; either\n//   version 2.1 of the License, or (at your option) any later version.\n//\n//   This library is distributed in the hope that it will be useful,\n//   but WITHOUT ANY WARRANTY; without even the implied warranty of\n//   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n//   Lesser General Public License for more details.\n//\n//   You should have received a copy of the GNU Lesser General Public\n//   License along with this library; if not, write to the Free Software\n//   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,\n//   MA 02110-1301  USA\n\nimport Foundation\n\n@objc class TLAccountObject: NSObject {\n    \n    let ACCOUNT_UNUSED_ACTIVE_MAIN_ADDRESS_AHEAD_OF_LATEST_USED_ONE_MINIMUM_COUNT = 5\n    let ACCOUNT_UNUSED_ACTIVE_CHANGE_ADDRESS_AHEAD_OF_LATEST_USED_ONE_MINIMUM_COUNT = 5\n    let GAP_LIMIT = 20\n    let MAX_ACTIVE_MAIN_ADDRESS_TO_HAVE = 55\n    let MAX_ACTIVE_CHANGE_ADDRESS_TO_HAVE = 55\n    let EXTENDED_KEY_DEFAULT_ACCOUNT_NAME_LENGTH = 50\n    let MAX_CONSOLIDATE_STEALTH_PAYMENT_UTXOS_COUNT:Int = 12\n\n    var appWallet:TLWallet?\n    fileprivate var accountDict: NSMutableDictionary?\n    lazy var haveUpDatedUTXOs: Bool = false\n    lazy var unspentOutputsCount: Int = 0\n    lazy var stealthPaymentUnspentOutputsCount: Int = 0\n    var unspentOutputs: NSMutableArray?\n    var stealthPaymentUnspentOutputs: NSMutableArray?\n    fileprivate var mainActiveAddresses = [String]()\n    fileprivate var changeActiveAddresses = [String]()\n    fileprivate var activeAddressesDict = [String:Bool]()\n    fileprivate var mainArchivedAddresses = [String]()\n    fileprivate var changeArchivedAddresses = [String]()\n    fileprivate var address2BalanceDict = [String:TLCoin]()\n    fileprivate var address2HDIndexDict = [String:Int]()\n    fileprivate var address2IsMainAddress = [String:Bool]()\n    fileprivate var address2NumberOfTransactions = [String:Int]()\n    fileprivate var HDIndexToArchivedMainAddress = [Int:String]()\n    fileprivate var HDIndexToArchivedChangeAddress = [Int:String]()\n    fileprivate var txObjectArray = [TLTxObject]()\n    fileprivate var txidToAccountAmountDict = [String:TLCoin]()\n    fileprivate var txidToAccountAmountTypeDict = [String:Int]()\n    fileprivate var receivingAddressesArray = [String]()\n    fileprivate var processedTxSet:NSMutableSet = NSMutableSet()\n    fileprivate var accountType: TLAccountType?\n    var accountBalance = TLCoin.zero()\n    fileprivate var totalUnspentOutputsSum: TLCoin?\n    fileprivate var fetchedAccountData = false\n    var listeningToIncomingTransactions = false\n    fileprivate var positionInWalletArray = 0\n    fileprivate var extendedPrivateKey: String?\n    var stealthWallet: TLStealthWallet?\n    var downloadState:TLDownloadState = .notDownloading\n\n    class func MAX_ACCOUNT_WAIT_TO_RECEIVE_ADDRESS() -> (Int) {\n        return 5\n    }\n    \n    class func NUM_ACCOUNT_STEALTH_ADDRESSES() -> (Int) {\n        return 1\n    }\n    \n    fileprivate func setUpActiveMainAddresses() -> () {\n        mainActiveAddresses = [String]()\n        let addressesArray = accountDict!.object(forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_KEY_MAIN_ADDRESSES) as! NSMutableArray\n        let minAddressIdx = accountDict!.object(forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_KEY_MIN_MAIN_ADDRESS_IDX) as! Int\n        \n        let startIdx: Int\n        if (TLWalletUtils.STATIC_MEMBERS.SHOULD_SAVE_ARCHIVED_ADDRESSES_IN_JSON) {\n            startIdx = minAddressIdx\n        } else {\n            startIdx = 0\n        }\n        for i in stride(from: startIdx, to: addressesArray.count, by: 1) {\n            let addressDict = addressesArray.object(at: i) as! NSDictionary\n            let HDIndex = addressDict.object(forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_KEY_INDEX) as! Int\n            let address = addressDict.object(forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_KEY_ADDRESS) as! String\n            address2HDIndexDict[address] = HDIndex\n            address2IsMainAddress[address] = true\n            address2BalanceDict[address] = TLCoin.zero()\n            address2NumberOfTransactions[address] = 0\n            mainActiveAddresses.append(address)\n            activeAddressesDict[address] = true\n        }\n    }\n    \n    fileprivate func setUpActiveChangeAddresses() -> () {\n        changeActiveAddresses = [String]()\n        \n        let addressesArray = accountDict!.object(forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_KEY_CHANGE_ADDRESSES) as! NSMutableArray\n        let minAddressIdx = accountDict!.object(forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_KEY_MIN_CHANGE_ADDRESS_IDX) as! Int\n        \n        var startIdx = 0\n        if (TLWalletUtils.STATIC_MEMBERS.SHOULD_SAVE_ARCHIVED_ADDRESSES_IN_JSON) {\n            startIdx = minAddressIdx\n        } else {\n            startIdx = 0\n        }\n        for i in stride(from: startIdx, to: addressesArray.count, by: 1) {\n            let addressDict = addressesArray.object(at: i) as! NSDictionary\n            let HDIndex = addressDict.object(forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_KEY_INDEX) as! Int\n            let address = addressDict.object(forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_KEY_ADDRESS) as! String\n            address2HDIndexDict[address] = HDIndex\n            address2IsMainAddress[address] = false\n            address2BalanceDict[address] = TLCoin.zero()\n            address2NumberOfTransactions[address] = 0\n            changeActiveAddresses.append(address)\n            activeAddressesDict[address] = true\n        }\n    }\n    \n    fileprivate func setUpArchivedMainAddresses() -> () {\n        mainArchivedAddresses = [String]()\n        \n        let addressesArray = accountDict!.object(forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_KEY_MAIN_ADDRESSES) as! NSMutableArray\n        let maxAddressIdx = accountDict!.object(forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_KEY_MIN_MAIN_ADDRESS_IDX) as! Int// - 1\n        \n        for i in stride(from: 0, to: maxAddressIdx, by: 1) {\n            let addressDict = addressesArray.object(at: i) as! NSDictionary\n            assert(addressDict.object(forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_KEY_STATUS) as! Int == Int(TLAddressStatus.archived.rawValue), \"\")\n            let HDIndex = addressDict.object(forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_KEY_INDEX) as! Int\n            \n            let address = addressDict.object(forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_KEY_ADDRESS) as! String\n            \n            address2HDIndexDict[address] = HDIndex\n            address2IsMainAddress[address] = true\n\n            address2BalanceDict[address] = TLCoin.zero()\n            address2NumberOfTransactions[address] = 0\n            mainArchivedAddresses.append(address)\n        }\n    }\n    \n    fileprivate func setUpArchivedChangeAddresses() -> () {\n        changeArchivedAddresses = [String]()\n        \n        let addressesArray = accountDict!.object(forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_KEY_CHANGE_ADDRESSES) as! NSMutableArray\n        let maxAddressIdx = accountDict!.object(forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_KEY_MIN_CHANGE_ADDRESS_IDX) as! Int// - 1\n        \n        for i in stride(from: 0, to: maxAddressIdx, by: 1) {\n            let addressDict = addressesArray.object(at: i) as! NSDictionary\n            let HDIndex = addressDict.object(forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_KEY_INDEX) as! Int\n            \n            let address = addressDict.object(forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_KEY_ADDRESS) as! String\n            assert((addressDict.object(forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_KEY_STATUS) as! Int) == Int(TLAddressStatus.archived.rawValue), \"\")\n            address2HDIndexDict[address] = HDIndex\n            address2IsMainAddress[address] = false\n            address2BalanceDict[address] = TLCoin.zero()\n            address2NumberOfTransactions[address] = 0\n            changeArchivedAddresses.append(address)\n        }\n    }\n    \n    init(appWallet: TLWallet, dict: NSDictionary, accountType at: TLAccountType) {\n        super.init()\n        self.appWallet = appWallet\n        accountType = at\n        accountDict = NSMutableDictionary(dictionary: dict)\n        unspentOutputs = nil\n        totalUnspentOutputsSum = nil\n        extendedPrivateKey = nil\n        \n        txidToAccountAmountTypeDict = [String:Int]()\n        address2BalanceDict = [String:TLCoin]()\n        \n        setUpActiveMainAddresses()\n        setUpActiveChangeAddresses()\n        if (TLWalletUtils.STATIC_MEMBERS.SHOULD_SAVE_ARCHIVED_ADDRESSES_IN_JSON) {\n            setUpArchivedMainAddresses()\n            setUpArchivedChangeAddresses()\n        } else {\n            HDIndexToArchivedMainAddress = [Int:String]()\n            HDIndexToArchivedChangeAddress = [Int:String]()\n        }\n        DLog(\"\\(self.getAccountIdxNumber()) getMainActiveAddressesCount \\(self.getMainActiveAddressesCount())\")\n        DLog(\"\\(self.getAccountIdxNumber()) getMainAddressesCount \\(self.getMainAddressesCount())\")\n        DLog(\"\\(self.getAccountIdxNumber()) getChangeActiveAddressesCount \\(self.getChangeActiveAddressesCount())\")\n        DLog(\"\\(self.getAccountIdxNumber()) getChangeAddressesCount \\(self.getChangeAddressesCount())\")\n\n        \n        if (accountType == TLAccountType.hdWallet) {\n            positionInWalletArray = getAccountIdxNumber()\n        } else if (accountType == TLAccountType.coldWallet) {\n            //set later in accounts\n        } else if (accountType == TLAccountType.imported) {\n            //set later in accounts\n        } else if (accountType == TLAccountType.importedWatch) {\n            //set later in accounts\n        }\n        \n        if TLWalletUtils.ALLOW_MANUAL_SCAN_FOR_STEALTH_PAYMENT() && accountType != TLAccountType.importedWatch && accountType != TLAccountType.coldWallet {\n            let stealthAddressArray = accountDict!.object(forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_KEY_STEALTH_ADDRESSES) as! NSArray\n            let stealthWalletDict = stealthAddressArray.object(at: 0) as! NSDictionary\n            self.stealthWallet = TLStealthWallet(stealthDict: stealthWalletDict, accountObject: self,\n                updateStealthPaymentStatuses: !self.isArchived())\n            \n            \n            //add default zero balance so that if user goes to address list view before account data downloaded,\n            // then accountObject will return a 0 balance for payment address instead of getting optional unwrap nil error\n            for i in 0 ..< self.stealthWallet!.getStealthAddressPaymentsCount() {\n                let address = self.stealthWallet!.getPaymentAddressForIndex(i)\n                address2BalanceDict[address] = TLCoin.zero()\n            }\n        }\n    }\n    \n    func isWatchOnly() -> (Bool) {\n        return accountType == TLAccountType.importedWatch\n    }\n    \n    func isColdWalletAccount() -> (Bool) {\n        return accountType == TLAccountType.coldWallet\n    }\n    \n    func hasSetExtendedPrivateKeyInMemory() -> (Bool) {\n        assert(accountType == TLAccountType.importedWatch, \"\")\n        return extendedPrivateKey != nil\n    }\n    \n    func setExtendedPrivateKeyInMemory(_ extendedPrivKey: String) -> Bool {\n        assert(accountType == TLAccountType.importedWatch, \"\")\n        assert(TLHDWalletWrapper.isValidExtendedPrivateKey(extendedPrivKey), \"extendedPrivKey isValidExtendedPrivateKey\")\n        \n        if (TLHDWalletWrapper.getExtendPubKey(extendedPrivKey) == getExtendedPubKey()) {\n            extendedPrivateKey = extendedPrivKey\n            return true\n        }\n        return false\n    }\n    \n    func clearExtendedPrivateKeyFromMemory() -> () {\n        assert(accountType == TLAccountType.importedWatch, \"\")\n        extendedPrivateKey = nil\n    }\n    \n    \n    func hasFetchedAccountData() -> (Bool) {\n        return self.fetchedAccountData\n    }\n    \n    @discardableResult func renameAccount(_ accountName: String) -> (Bool) {\n        accountDict!.setObject(accountName, forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_KEY_NAME as NSCopying)\n        return true\n    }\n    \n    func getAccountName() -> String {\n        return accountDict!.object(forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_KEY_NAME) as! String\n    }\n    \n    func getAccountNameOrAccountPublicKey() -> String {\n        let accountName = accountDict!.object(forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_KEY_NAME) as! String\n        return accountName != \"\" ? accountName : getExtendedPubKey()\n    }\n    \n    func archiveAccount(_ enabled: Bool) -> (Bool) {\n        let status = enabled ? TLAddressStatus.archived : TLAddressStatus.active\n        accountDict!.setObject(status.rawValue, forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_KEY_STATUS as NSCopying)\n        return true\n    }\n    \n    func isArchived() -> (Bool) {\n        return (accountDict!.object(forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_KEY_STATUS) as! Int) == Int(TLAddressStatus.archived.rawValue)\n    }\n    \n    func getAccountID() -> (String) {\n        let accountIdx = accountDict!.object(forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_ACCOUNT_IDX) as! Int\n        return String(accountIdx)\n    }\n    \n    func getAccountIdxNumber() -> (Int) {\n        return accountDict!.object(forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_ACCOUNT_IDX) as! Int\n    }\n    \n    func getAccountHDIndex() -> UInt32 {\n        return TLHDWalletWrapper.getAccountIdxForExtendedKey(getExtendedPubKey()) as UInt32\n    }\n    \n    func getExtendedPubKey() -> String {\n        return accountDict!.object(forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_EXTENDED_PUBLIC_KEY) as! String\n    }\n    \n    func getExtendedPrivKey() -> String? {\n        if (accountType == TLAccountType.hdWallet) {\n            return accountDict!.object(forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_EXTENDED_PRIVATE_KEY) as? String\n        } else if (accountType == TLAccountType.imported) {\n            return accountDict!.object(forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_EXTENDED_PRIVATE_KEY) as? String\n        } else if (accountType == TLAccountType.importedWatch) {\n            return extendedPrivateKey\n        }\n        return nil\n    }\n    \n    func getAddressBalance(_ address: String) -> TLCoin {\n        if let amount = address2BalanceDict[address] {\n            return amount\n        } else {\n            return TLCoin.zero()\n        }\n    }\n    \n    func getNumberOfTransactionsForAddress(_ address: String) -> Int {\n        assert(self.isHDWalletAddress(address))\n        if address2NumberOfTransactions[address] == nil {\n            return 0;\n        }\n        return address2NumberOfTransactions[address]!\n    }\n    \n    func isMainAddress(_ address: String) -> Bool {\n        return address2IsMainAddress[address]!\n    }\n    \n    func getAddressHDIndex(_ address: String) -> Int {\n        return address2HDIndexDict[address]!\n    }\n    \n    func getAccountPrivateKey(_ address: String) -> String? {\n        if self.isHDWalletAddress(address) {\n            if (address2IsMainAddress[address] == true) {\n                return getMainPrivateKey(address)\n            } else {\n                return getChangePrivateKey(address)\n            }\n        }\n        \n        return nil\n    }\n    \n    func getMainPrivateKey(_ address: String) -> String {\n        let HDIndexNumber = address2HDIndexDict[address]!\n        let addressSequence = [Int(TLAddressType.main.rawValue), HDIndexNumber]\n        if (accountType == TLAccountType.importedWatch) {\n            assert(extendedPrivateKey != nil, \"\")\n            return TLHDWalletWrapper.getPrivateKey(extendedPrivateKey! as! NSString, sequence: addressSequence as NSArray, isTestnet: self.appWallet!.walletConfig.isTestnet)\n        } else {\n            return TLHDWalletWrapper.getPrivateKey(accountDict!.object(forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_EXTENDED_PRIVATE_KEY) as! NSString, sequence: addressSequence as NSArray, isTestnet: self.appWallet!.walletConfig.isTestnet)\n        }\n    }\n    \n    func getChangePrivateKey(_ address: String) -> String {\n        let HDIndexNumber = address2HDIndexDict[address]!\n        let addressSequence = [TLAddressType.change.rawValue, HDIndexNumber]\n        if (accountType == TLAccountType.importedWatch) {\n            assert(extendedPrivateKey != nil, \"\")\n            return TLHDWalletWrapper.getPrivateKey(extendedPrivateKey! as NSString, sequence: addressSequence as NSArray, isTestnet: self.appWallet!.walletConfig.isTestnet)\n        } else {\n            return TLHDWalletWrapper.getPrivateKey(accountDict!.object(forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_EXTENDED_PRIVATE_KEY) as! NSString, sequence: addressSequence as NSArray, isTestnet: self.appWallet!.walletConfig.isTestnet)\n        }\n    }\n    \n    func getTxObjectCount() -> Int {\n        return txObjectArray.count\n    }\n    \n    func getTxObject(_ txIdx: Int) -> TLTxObject {\n        return txObjectArray[txIdx]\n    }\n    \n    fileprivate func isAddressPartOfAccountActiveChangeAddresses(_ address: String) -> (Bool) {\n        return changeActiveAddresses.index(of: address) != nil\n    }\n    \n    fileprivate func isAddressPartOfAccountActiveMainAddresses(_ address: String) -> Bool {\n        return mainActiveAddresses.index(of: address) != nil\n    }\n    \n    func isActiveAddress(_ address: String) -> Bool {\n        return activeAddressesDict[address] != nil\n    }\n    \n    func isHDWalletAddress(_ address: String) -> Bool {\n        return address2HDIndexDict[address] != nil\n    }\n    \n    func isAddressPartOfAccount(_ address: String) -> Bool {\n        if  self.stealthWallet == nil {\n            return self.isHDWalletAddress(address)\n        } else {\n            return self.isHDWalletAddress(address) || self.stealthWallet!.isPaymentAddress(address)            \n        }\n    }\n    \n    func getBalance() -> TLCoin {\n        return self.accountBalance\n    }\n    \n    func getAccountType() -> TLAccountType {\n        return accountType!\n    }\n    \n    func getAccountAmountChangeForTx(_ txHash: String) -> TLCoin? {\n        return txidToAccountAmountDict[txHash]\n    }\n    \n    func getAccountAmountChangeTypeForTx(_ txHash: String) -> TLAccountTxType {\n        return TLAccountTxType(rawValue: txidToAccountAmountTypeDict[txHash]!)!\n    }\n    \n    fileprivate func addToAddressBalance(_ address: NSString, amount: TLCoin) -> () {\n        var addressBalance = address2BalanceDict[address as String]\n        if (addressBalance == nil) {\n            addressBalance = amount\n            address2BalanceDict[address as String] = addressBalance!\n        } else {\n            addressBalance! = addressBalance!.add(amount)\n            address2BalanceDict[address as String] = addressBalance!\n        }\n    }\n    \n    fileprivate func subtractToAddressBalance(_ address: String, amount: TLCoin) -> () {\n        var addressBalance = address2BalanceDict[address]\n        if (addressBalance == nil) {\n            addressBalance = TLCoin.zero().subtract(amount)\n            address2BalanceDict[address] = addressBalance!\n        } else {\n            addressBalance = addressBalance!.subtract(amount)\n            address2BalanceDict[address] = addressBalance!\n        }\n    }\n    \n    func processNewTx(_ txObject: TLTxObject) -> TLCoin? {\n        if (processedTxSet.contains(txObject.getHash()!)) {\n            return nil\n        }\n        \n        let receivedAmount = processTx(txObject, shouldCheckToAddressesNTxsCount: true, shouldUpdateAccountBalance: true)\n        \n        \n        txObjectArray.insert(txObject, at: 0)\n        \n        checkToArchiveAddresses()\n        updateReceivingAddresses()\n        updateChangeAddresses()\n        return receivedAmount\n    }\n    \n    fileprivate func processTx(_ txObject: TLTxObject, shouldCheckToAddressesNTxsCount: Bool, shouldUpdateAccountBalance: Bool) -> TLCoin? {\n        haveUpDatedUTXOs = false\n        processedTxSet.add(txObject.getHash()!)\n        var currentTxSubtract:UInt64 = 0\n        var currentTxAdd:UInt64 = 0\n        \n        let address2hasUpdatedNTxCount = NSMutableDictionary()\n        \n//        DLog(\"TLAccountObject processTx: \\(self.getAccountID()) \\(txObject.getTxid()!)\")\n    \n        let outputAddressToValueArray = txObject.getOutputAddressToValueArray()\n\n        for _output in outputAddressToValueArray! {\n            let output = _output as! NSDictionary\n            \n            var value:UInt64 = 0\n            if let v = output.object(forKey: \"value\") as? NSNumber {\n                value = UInt64(v.uint64Value)\n            }\n            \n            if let address = output.object(forKey: \"addr\") as? String {\n                \n                if (isActiveAddress(address)) {\n                    \n                    currentTxAdd += value\n                    //DLog(\"addToAddressBalance: \\(address) \\(value)\")\n                    if (shouldUpdateAccountBalance) {\n                        addToAddressBalance(address as NSString, amount: TLCoin(uint64: value))\n                    }\n                    \n                    if (shouldCheckToAddressesNTxsCount &&\n                        address2hasUpdatedNTxCount.object(forKey: address) == nil) {\n                            \n                            address2hasUpdatedNTxCount.setObject(\"\", forKey: address as NSCopying)\n                            \n                            let ntxs = getNumberOfTransactionsForAddress(address)\n                            address2NumberOfTransactions[address] = ntxs + 1\n                    }\n                } else if self.stealthWallet != nil && self.stealthWallet!.isPaymentAddress(address) {\n                    currentTxAdd += value\n                    //DLog(\"addToAddressBalance: stealth \\(address) \\(value)\")\n                    if shouldUpdateAccountBalance {\n                        addToAddressBalance(address as NSString, amount: TLCoin(uint64: value))\n                    }\n                } else {\n                }\n            }\n        }\n        \n        let inputAddressToValueArray = txObject.getInputAddressToValueArray()\n        for _input in inputAddressToValueArray! {\n            let input = _input as! NSDictionary\n            \n            var value:UInt64 = 0\n            if let v = input.object(forKey: \"value\") as? NSNumber {\n                value = UInt64(v.uint64Value)\n            }\n\n            if let address = input.object(forKey: \"addr\") as? String {\n\n                if (isActiveAddress(address)) {\n                        \n                    currentTxSubtract += value\n                    //DLog(\"subtractToAddressBalance: \\(address) \\(value)\")\n                    if (shouldUpdateAccountBalance) {\n                        subtractToAddressBalance(address, amount: TLCoin(uint64: value))\n                    }\n                    \n                    if (shouldCheckToAddressesNTxsCount &&\n                        address2hasUpdatedNTxCount.object(forKey: address) == nil) {\n                            \n                            address2hasUpdatedNTxCount.setObject(\"\", forKey: address as NSCopying)\n                            let ntxs = getNumberOfTransactionsForAddress(address)\n                            address2NumberOfTransactions[address] = ntxs + 1\n                    }\n                } else if self.stealthWallet != nil && self.stealthWallet!.isPaymentAddress(address) {\n                    currentTxSubtract += value\n                    //DLog(\"subtractToAddressBalance: stealth \\(address) \\(value)\")\n                    if shouldUpdateAccountBalance {\n                        subtractToAddressBalance(address, amount: TLCoin(uint64: value))\n                    }\n                } else {\n                }\n            }\n        }\n        \n        //DLog(\"current processTxprocessTx \\(self.accountBalance.toUInt64()) + \\(currentTxAdd) - \\(currentTxSubtract)\")\n        if (shouldUpdateAccountBalance) {\n            self.accountBalance = TLCoin(uint64: self.accountBalance.toUInt64() + currentTxAdd - currentTxSubtract)\n        }\n        \n        if (currentTxSubtract > currentTxAdd) {\n            let amountChangeToAccountFromTx = TLCoin(uint64: UInt64(currentTxSubtract - currentTxAdd))\n            txidToAccountAmountDict[txObject.getHash()! as String] = amountChangeToAccountFromTx\n            txidToAccountAmountTypeDict[txObject.getHash()! as String] = Int(TLAccountTxType.send.rawValue)\n            return nil\n        } else if (currentTxSubtract < currentTxAdd) {\n            let amountChangeToAccountFromTx = TLCoin(uint64: UInt64(currentTxAdd - currentTxSubtract))\n            txidToAccountAmountDict[txObject.getHash()! as String] = amountChangeToAccountFromTx\n            txidToAccountAmountTypeDict[txObject.getHash()! as String] = Int(TLAccountTxType.receive.rawValue)\n            return amountChangeToAccountFromTx\n        } else {\n            let amountChangeToAccountFromTx = TLCoin.zero()\n            txidToAccountAmountDict[txObject.getHash()! as String] = amountChangeToAccountFromTx\n            txidToAccountAmountTypeDict[txObject.getHash()! as String] = Int(TLAccountTxType.moveBetweenAccount.rawValue)\n            return nil\n        }\n    }\n    \n    func getReceivingAddressesCount() -> Int {\n        return receivingAddressesArray.count\n    }\n    \n    func getReceivingAddress(_ idx: Int) -> (String) {\n        return receivingAddressesArray[idx]\n    }\n    \n    fileprivate func updateReceivingAddresses() -> () {\n        receivingAddressesArray = [String]()\n        \n        var addressIdx = 0\n        while addressIdx < mainActiveAddresses.count {\n            let address = mainActiveAddresses[addressIdx]\n            if (getNumberOfTransactionsForAddress(address) == 0) {\n                break\n            }\n            addressIdx += 1\n        }\n        \n        var lookedAtAllAddresses = false\n        var receivingAddressesStartIdx = -1\n        while addressIdx < addressIdx + TLAccountObject.MAX_ACCOUNT_WAIT_TO_RECEIVE_ADDRESS() {\n            if (addressIdx >= getMainActiveAddressesCount()) {\n                lookedAtAllAddresses = true\n                break\n            }\n            let address = mainActiveAddresses[addressIdx]\n            if (getNumberOfTransactionsForAddress(address) == 0) {\n                receivingAddressesArray.append(address)\n                if receivingAddressesStartIdx == -1 {\n                    receivingAddressesStartIdx = addressIdx\n                }\n            }\n            if (receivingAddressesArray.count >= TLAccountObject.MAX_ACCOUNT_WAIT_TO_RECEIVE_ADDRESS() ||\n                addressIdx - receivingAddressesStartIdx >= TLAccountObject.MAX_ACCOUNT_WAIT_TO_RECEIVE_ADDRESS()) {\n                    break\n            }\n            addressIdx += 1\n        }\n        \n        while (lookedAtAllAddresses && receivingAddressesArray.count < TLAccountObject.MAX_ACCOUNT_WAIT_TO_RECEIVE_ADDRESS()) {\n            let address = getNewMainAddress(getMainAddressesCount())\n            addressIdx += 1\n            if (addressIdx - receivingAddressesStartIdx < TLAccountObject.MAX_ACCOUNT_WAIT_TO_RECEIVE_ADDRESS()) {\n                receivingAddressesArray.append(address)\n            } else {\n                break\n            }\n        }\n        \n        while (getMainActiveAddressesCount() - addressIdx < ACCOUNT_UNUSED_ACTIVE_MAIN_ADDRESS_AHEAD_OF_LATEST_USED_ONE_MINIMUM_COUNT) {\n            getNewMainAddress(getMainAddressesCount())\n        }\n\n        NotificationCenter.default.post(name: Notification.Name(rawValue: TLNotificationEvents.EVENT_UPDATED_RECEIVING_ADDRESSES()), object: nil)\n    }\n    \n    \n    fileprivate func updateChangeAddresses() -> () {\n        var addressIdx = 0\n        for i in stride(from: addressIdx, to: changeActiveAddresses.count, by: 1) {\n                let address = changeActiveAddresses[addressIdx]\n            if (getNumberOfTransactionsForAddress(address) == 0) {\n                break\n            }\n        }\n        while (getChangeActiveAddressesCount() - addressIdx < ACCOUNT_UNUSED_ACTIVE_CHANGE_ADDRESS_AHEAD_OF_LATEST_USED_ONE_MINIMUM_COUNT) {\n            getNewChangeAddress(getChangeAddressesCount())\n        }\n    }\n    \n    \n    fileprivate func checkToArchiveAddresses() -> () {\n        self.checkToArchiveMainAddresses()\n        self.checkToArchiveChangeAddresses()\n    }\n    \n    fileprivate func checkToArchiveMainAddresses() -> () {\n        if (getMainActiveAddressesCount() <= MAX_ACTIVE_MAIN_ADDRESS_TO_HAVE) {\n            return\n        }\n\n        let activeMainAddresses = getActiveMainAddresses()!.copy() as! NSArray\n\n        for _address in activeMainAddresses {\n            let address = _address as! String\n            if (getAddressBalance(address).lessOrEqual(TLCoin.zero()) &&\n                getNumberOfTransactionsForAddress(address) > 0) {\n\n                    let addressIdx = address2HDIndexDict[address]!\n                    let accountIdx = accountDict!.object(forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_ACCOUNT_IDX) as! Int\n                    \n                    if (TLWalletUtils.STATIC_MEMBERS.SHOULD_SAVE_ARCHIVED_ADDRESSES_IN_JSON) {\n                        \n                        assert(addressIdx == mainArchivedAddresses.count, \"\")\n                        mainArchivedAddresses.append(address)\n                    } else {\n                        if (accountType == TLAccountType.hdWallet) {\n                            assert(addressIdx == self.appWallet!.getMinMainAddressIdxFromHDWallet(accountIdx), \"\")\n                        } else if (accountType == TLAccountType.imported) {\n                            assert(addressIdx == self.appWallet!.getMinMainAddressIdxFromImportedAccount(getPositionInWalletArray()), \"\")\n                        } else {\n                            assert(addressIdx == self.appWallet!.getMinMainAddressIdxFromImportedWatchAccount(getPositionInWalletArray()), \"\")\n                        }\n                    }\n                    \n                    assert(mainActiveAddresses.first == address, \"\")\n                    mainActiveAddresses.remove(at: 0)\n                    activeAddressesDict.removeValue(forKey: address)\n                    if (accountType == TLAccountType.hdWallet) {\n                        self.appWallet!.updateMainAddressStatusFromHDWallet(accountIdx,\n                            addressIdx: addressIdx,\n                            addressStatus: TLAddressStatus.archived)\n                    } else if (accountType == TLAccountType.imported) {\n                        self.appWallet!.updateMainAddressStatusFromImportedAccount(getPositionInWalletArray(),\n                            addressIdx: addressIdx,\n                            addressStatus: TLAddressStatus.archived)\n                    } else {\n                        self.appWallet!.updateMainAddressStatusFromImportedWatchAccount(getPositionInWalletArray(),\n                            addressIdx: addressIdx,\n                            addressStatus: TLAddressStatus.archived)\n                    }\n            } else {\n                return\n            }\n            if (getMainActiveAddressesCount() <= MAX_ACTIVE_MAIN_ADDRESS_TO_HAVE) {\n                return\n            }\n        }\n    }\n    \n    fileprivate func checkToArchiveChangeAddresses() -> () {\n        if (getChangeActiveAddressesCount() <= MAX_ACTIVE_CHANGE_ADDRESS_TO_HAVE) {\n            return\n        }\n        \n        let activeChangeAddresses = getActiveChangeAddresses()!.copy() as! NSArray\n        \n        for _address in activeChangeAddresses {\n            let address = _address as! String\n            \n            if (getAddressBalance(address).lessOrEqual(TLCoin.zero()) &&\n                getNumberOfTransactionsForAddress(address) > 0) {\n                    \n                    let addressIdx = address2HDIndexDict[address]!\n                    let accountIdx = accountDict!.object(forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_ACCOUNT_IDX) as! Int\n                    \n                    if (TLWalletUtils.STATIC_MEMBERS.SHOULD_SAVE_ARCHIVED_ADDRESSES_IN_JSON) {\n                        assert(addressIdx == changeArchivedAddresses.count, \"\")\n                        changeArchivedAddresses.append(address)\n                    } else {\n                        if (accountType == TLAccountType.hdWallet) {\n                            assert(addressIdx == self.appWallet!.getMinChangeAddressIdxFromHDWallet(accountIdx), \"\")\n                        } else if (accountType == TLAccountType.imported) {\n                            assert(addressIdx == self.appWallet!.getMinChangeAddressIdxFromImportedAccount(getPositionInWalletArray()), \"\")\n                        } else {\n                            assert(addressIdx == self.appWallet!.getMinChangeAddressIdxFromImportedWatchAccount(getPositionInWalletArray()), \"\")\n                        }\n                    }\n                    \n                    assert(changeActiveAddresses.first == address, \"\")\n                    changeActiveAddresses.remove(at: 0)\n                    activeAddressesDict.removeValue(forKey: address)\n                    if (accountType == TLAccountType.hdWallet) {\n                        self.appWallet!.updateChangeAddressStatusFromHDWallet(accountIdx,\n                            addressIdx: addressIdx,\n                            addressStatus: TLAddressStatus.archived)\n                    } else if (accountType == TLAccountType.imported) {\n                        self.appWallet!.updateChangeAddressStatusFromImportedAccount(getPositionInWalletArray(),\n                            addressIdx: addressIdx,\n                            addressStatus: TLAddressStatus.archived)\n                    } else {\n                        self.appWallet!.updateChangeAddressStatusFromImportedWatchAccount(getPositionInWalletArray(),\n                            addressIdx: addressIdx,\n                            addressStatus: TLAddressStatus.archived)\n                    }\n            } else {\n                return\n            }\n            if (getChangeActiveAddressesCount() <= MAX_ACTIVE_CHANGE_ADDRESS_TO_HAVE) {\n                return\n            }\n        }\n    }\n    \n    fileprivate func processTxArray(_ txArray: NSArray, shouldResetAccountBalance: (Bool)) -> () {\n        for _tx in txArray {\n            let tx = _tx as! NSDictionary\n            let txObject = TLTxObject(dict: tx)\n            processTx(txObject, shouldCheckToAddressesNTxsCount: true, shouldUpdateAccountBalance: false)\n            txObjectArray.append(txObject)\n        }\n        \n        if (shouldResetAccountBalance) {\n            checkToArchiveAddresses()\n            updateReceivingAddresses()\n            updateChangeAddresses()\n        }\n    }\n    \n    \n    func getPositionInWalletArray() -> Int {\n        return positionInWalletArray\n    }\n    \n    func setPositionInWalletArray(_ idx: Int) -> () {\n        positionInWalletArray = idx\n    }\n    \n    fileprivate func getNewMainAddress(_ expectedAddressIndex: Int) -> String {\n        let addressDict: NSDictionary\n        \n        if (accountType == TLAccountType.hdWallet) {\n            let accountIdx = accountDict!.object(forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_ACCOUNT_IDX) as! Int\n            addressDict = self.appWallet!.getNewMainAddressFromHDWallet(accountIdx, expectedAddressIndex: expectedAddressIndex)\n        } else if (accountType == TLAccountType.coldWallet) {\n            addressDict = self.appWallet!.getNewMainAddressFromColdWalletAccount(positionInWalletArray, expectedAddressIndex: expectedAddressIndex)\n        } else if (accountType == TLAccountType.imported) {\n            addressDict = self.appWallet!.getNewMainAddressFromImportedAccount(positionInWalletArray, expectedAddressIndex: expectedAddressIndex)\n        } else {\n            addressDict = self.appWallet!.getNewMainAddressFromImportedWatchAccount(positionInWalletArray, expectedAddressIndex: expectedAddressIndex)\n        }\n        \n        let address = addressDict.object(forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_KEY_ADDRESS) as! String\n        let HDIndex = addressDict.object(forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_KEY_INDEX) as! Int\n        address2HDIndexDict[address] = HDIndex\n        address2IsMainAddress[address] = true\n        address2BalanceDict[address] = TLCoin.zero()\n        address2NumberOfTransactions[address] = 0\n        mainActiveAddresses.append(address)\n        activeAddressesDict[address] = true\n        \n        NotificationCenter.default.post(name: Notification.Name(rawValue: TLNotificationEvents.EVENT_NEW_ADDRESS_GENERATED()), object: address)\n        \n        return address\n    }\n    \n    fileprivate func getNewChangeAddress(_ expectedAddressIndex: Int) -> (String) {\n        let addressDict: NSDictionary\n        \n        if (accountType == TLAccountType.hdWallet) {\n            let accountIdx = accountDict!.object(forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_ACCOUNT_IDX) as! Int\n            addressDict = self.appWallet!.getNewChangeAddressFromHDWallet(accountIdx, expectedAddressIndex: expectedAddressIndex)\n        } else if (accountType == TLAccountType.coldWallet) {\n            addressDict = self.appWallet!.getNewChangeAddressFromColdWalletAccount(UInt(positionInWalletArray), expectedAddressIndex: expectedAddressIndex)\n        } else if (accountType == TLAccountType.imported) {\n            addressDict = self.appWallet!.getNewChangeAddressFromImportedAccount(positionInWalletArray, expectedAddressIndex: expectedAddressIndex)\n        } else {\n            addressDict = self.appWallet!.getNewChangeAddressFromImportedWatchAccount(UInt(positionInWalletArray), expectedAddressIndex: expectedAddressIndex)\n        }\n        \n        let address = addressDict.object(forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_KEY_ADDRESS) as! String\n        let HDIndex = addressDict.object(forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_KEY_INDEX) as! Int\n        address2HDIndexDict[address] = HDIndex\n        address2IsMainAddress[address] = false\n        address2BalanceDict[address] = TLCoin.zero()\n        address2NumberOfTransactions[address] = 0\n        changeActiveAddresses.append(address)\n        activeAddressesDict[address] = true\n        \n        NotificationCenter.default.post(name: Notification.Name(rawValue: TLNotificationEvents.EVENT_NEW_ADDRESS_GENERATED()), object: address)\n        \n        return address\n    }\n    \n    fileprivate func removeTopMainAddress() -> (Bool) {\n        if (accountType == TLAccountType.hdWallet) {\n            let accountIdx = accountDict!.object(forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_ACCOUNT_IDX) as! Int\n            self.appWallet!.removeTopMainAddressFromHDWallet(accountIdx)!\n        } else if (accountType == TLAccountType.coldWallet) {\n            self.appWallet!.removeTopMainAddressFromColdWalletAccount(positionInWalletArray)!\n        } else if (accountType == TLAccountType.imported) {\n            self.appWallet!.removeTopMainAddressFromImportedAccount(positionInWalletArray)!\n        } else if (accountType == TLAccountType.importedWatch) {\n            self.appWallet!.removeTopMainAddressFromImportedWatchAccount(positionInWalletArray)!\n        }\n        \n        if (mainActiveAddresses.count > 0) {\n            let address = mainActiveAddresses.last!\n            address2HDIndexDict.removeValue(forKey: address)\n            address2BalanceDict.removeValue(forKey: address)\n            address2NumberOfTransactions.removeValue(forKey: address)\n            mainActiveAddresses.removeLast()\n            activeAddressesDict.removeValue(forKey: address)\n            return true\n        } else if (TLWalletUtils.STATIC_MEMBERS.SHOULD_SAVE_ARCHIVED_ADDRESSES_IN_JSON) {\n            if (mainArchivedAddresses.count > 0) {\n                let address = mainArchivedAddresses.last!\n                address2HDIndexDict.removeValue(forKey: address)\n                address2BalanceDict.removeValue(forKey: address)\n                address2NumberOfTransactions.removeValue(forKey: address)\n                mainArchivedAddresses.removeLast()\n                activeAddressesDict.removeValue(forKey: address)\n            }\n            return true\n        }\n        \n        return false\n    }\n    \n    fileprivate func removeTopChangeAddress() -> (Bool) {\n        if (accountType == TLAccountType.hdWallet) {\n            let accountIdx = accountDict!.object(forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_ACCOUNT_IDX) as! Int\n            self.appWallet!.removeTopChangeAddressFromHDWallet(accountIdx)!\n        } else if (accountType == TLAccountType.coldWallet) {\n            self.appWallet!.removeTopChangeAddressFromColdWalletAccount(positionInWalletArray)!\n        } else if (accountType == TLAccountType.imported) {\n            self.appWallet!.removeTopChangeAddressFromImportedAccount(positionInWalletArray)!\n        } else if (accountType == TLAccountType.importedWatch) {\n            self.appWallet!.removeTopChangeAddressFromImportedWatchAccount(positionInWalletArray)!\n        }\n        \n        if (changeActiveAddresses.count > 0) {\n            let address = changeActiveAddresses.last!\n            address2HDIndexDict.removeValue(forKey: address)\n            address2BalanceDict.removeValue(forKey: address)\n            address2NumberOfTransactions.removeValue(forKey: address)\n            changeActiveAddresses.removeLast()\n            activeAddressesDict.removeValue(forKey: address)\n            \n            return true\n        } else if (TLWalletUtils.STATIC_MEMBERS.SHOULD_SAVE_ARCHIVED_ADDRESSES_IN_JSON) {\n            if (changeArchivedAddresses.count > 0) {\n                let address = changeArchivedAddresses.last!\n                address2HDIndexDict.removeValue(forKey: address)\n                address2BalanceDict.removeValue(forKey: address)\n                address2NumberOfTransactions.removeValue(forKey: address)\n                changeArchivedAddresses.removeLast()\n                activeAddressesDict.removeValue(forKey: address)\n                \n            }\n            return true\n        }\n        \n        return false\n    }\n    \n    func getCurrentChangeAddress() -> String {\n        for address in changeActiveAddresses {\n            if getNumberOfTransactionsForAddress(address) == 0 && self.getAddressBalance(address).equalTo(TLCoin.zero()) {\n                return address\n            }\n        }\n\n        return getNewChangeAddress(getChangeAddressesCount())\n    }\n    \n    func getActiveMainAddresses() -> NSArray? {\n        return mainActiveAddresses as NSArray?\n    }\n    \n    func getActiveChangeAddresses() -> NSArray? {\n        return changeActiveAddresses as NSArray?\n    }\n    \n    func getMainActiveAddressesCount() -> Int {\n        return mainActiveAddresses.count\n    }\n    \n    func getMainArchivedAddressesCount() -> Int {\n        if (TLWalletUtils.STATIC_MEMBERS.SHOULD_SAVE_ARCHIVED_ADDRESSES_IN_JSON) {\n            return mainArchivedAddresses.count\n        } else {\n            if (accountType == TLAccountType.hdWallet) {\n                let accountIdx = accountDict!.object(forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_ACCOUNT_IDX) as! Int\n                return self.appWallet!.getMinMainAddressIdxFromHDWallet(accountIdx)\n            } else if (accountType == TLAccountType.coldWallet) {\n                return self.appWallet!.getMinMainAddressIdxFromColdWalletAccount(getPositionInWalletArray())\n            } else if (accountType == TLAccountType.imported) {\n                return self.appWallet!.getMinMainAddressIdxFromImportedAccount(getPositionInWalletArray())\n            } else {\n                return self.appWallet!.getMinMainAddressIdxFromImportedWatchAccount(getPositionInWalletArray())\n            }\n        }\n    }\n    \n    fileprivate func getMainAddressesCount() -> Int {\n        return getMainActiveAddressesCount() + getMainArchivedAddressesCount()\n    }\n    \n    func getChangeActiveAddressesCount() -> Int {\n        return changeActiveAddresses.count\n    }\n    \n    func getChangeArchivedAddressesCount() -> Int {\n        if (TLWalletUtils.STATIC_MEMBERS.SHOULD_SAVE_ARCHIVED_ADDRESSES_IN_JSON) {\n            return changeArchivedAddresses.count\n        } else {\n            if (accountType == TLAccountType.hdWallet) {\n                let accountIdx = accountDict!.object(forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_ACCOUNT_IDX) as! Int\n                return self.appWallet!.getMinChangeAddressIdxFromHDWallet(accountIdx)\n            } else if (accountType == TLAccountType.coldWallet) {\n                return self.appWallet!.getMinChangeAddressIdxFromColdWalletAccount(getPositionInWalletArray())\n            } else if (accountType == TLAccountType.imported) {\n                return self.appWallet!.getMinChangeAddressIdxFromImportedAccount(getPositionInWalletArray())\n            } else {\n                return self.appWallet!.getMinChangeAddressIdxFromImportedWatchAccount(getPositionInWalletArray())\n            }\n        }\n    }\n    \n    fileprivate func getChangeAddressesCount() -> Int {\n        return getChangeActiveAddressesCount() + getChangeArchivedAddressesCount()\n    }\n    \n    func getMainActiveAddress(_ idx: Int) -> String {\n        return mainActiveAddresses[idx]\n    }\n    \n    func getChangeActiveAddress(_ idx: Int) -> String {\n        return changeActiveAddresses[idx]\n    }\n    \n    func getMainArchivedAddress(_ idx: Int) -> String {\n        if (TLWalletUtils.STATIC_MEMBERS.SHOULD_SAVE_ARCHIVED_ADDRESSES_IN_JSON) {\n            return mainArchivedAddresses[idx]\n        } else {\n            let HDIndex = idx\n            var address = HDIndexToArchivedMainAddress[HDIndex]\n            if (address == nil) {\n                let extendedPublicKey = accountDict!.object(forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_EXTENDED_PUBLIC_KEY) as! String\n                let mainAddressSequence = [Int(TLAddressType.main.rawValue), idx]\n                address = TLHDWalletWrapper.getAddress(extendedPublicKey, sequence: mainAddressSequence as NSArray, isTestnet: self.appWallet!.walletConfig.isTestnet)\n                HDIndexToArchivedMainAddress[HDIndex] = address!\n                \n                address2HDIndexDict[address!] = HDIndex\n                address2IsMainAddress[address!] = true\n            }\n            return address!\n        }\n    }\n    \n    func getChangeArchivedAddress(_ idx: Int) -> String {\n        if (TLWalletUtils.STATIC_MEMBERS.SHOULD_SAVE_ARCHIVED_ADDRESSES_IN_JSON) {\n            return changeArchivedAddresses[idx]\n        } else {\n            let HDIndex = idx\n            var address = HDIndexToArchivedChangeAddress[HDIndex]\n            if (address == nil) {\n                let extendedPublicKey = accountDict!.object(forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_EXTENDED_PUBLIC_KEY) as! String\n                let changeAddressSequence = [Int(TLAddressType.change.rawValue), idx]\n                address = TLHDWalletWrapper.getAddress(extendedPublicKey, sequence: changeAddressSequence as NSArray, isTestnet: self.appWallet!.walletConfig.isTestnet)\n                HDIndexToArchivedChangeAddress[HDIndex] = address!\n                \n                address2HDIndexDict[address!] = HDIndex\n                address2IsMainAddress[address!] = false\n            }\n            return address!\n        }\n    }\n    \n    func recoverAccountMainAddresses(_ shouldResetAccountBalance: Bool) -> Int {\n        var lookAheadOffset = 0\n        var continueLookingAheadAddress = true\n        DLog(\"recoverAccountMainAddresses: getAccountID: \\(getAccountID())\")\n        var accountAddressIdx = -1\n        \n        while (continueLookingAheadAddress) {\n            var addresses = [String]()\n            addresses.reserveCapacity(GAP_LIMIT)\n            \n            let addressToIdxDict = NSMutableDictionary(capacity: GAP_LIMIT)\n            \n            for i in stride(from: lookAheadOffset, to: lookAheadOffset + GAP_LIMIT, by: 1) {\n                let address = getNewMainAddress(i)\n                DLog(String(format:\"getNewMainAddress HDIdx: %lu address: %@\", i, address))\n                addresses.append(address)\n                addressToIdxDict.setObject(i, forKey: address as NSCopying)\n            }\n\n            let jsonData = TLBlockExplorerAPI.instance().getAddressesInfoSynchronous(addresses)\n            if (jsonData.object(forKey: TLNetworking.STATIC_MEMBERS.HTTP_ERROR_CODE) != nil) {\n                DLog(\"getAccountDataSynchronous error \\(jsonData.description)\")\n                NSException(name: NSExceptionName(rawValue: \"Network Error\"), reason: \"HTTP Error\", userInfo: nil).raise()\n            }\n            let addressesArray = jsonData.object(forKey: \"addresses\") as! NSArray\n            var balance:UInt64 = 0\n            for _addressDict in addressesArray {\n                let addressDict = _addressDict as! NSDictionary\n                let n_tx = addressDict.object(forKey: \"n_tx\") as! Int\n                let address = addressDict.object(forKey: \"address\") as! String\n                address2NumberOfTransactions[address] = n_tx\n                let addressBalance = (addressDict.object(forKey: \"final_balance\") as! NSNumber).uint64Value\n                balance += addressBalance\n                address2BalanceDict[address] = TLCoin(uint64: addressBalance)\n\n                \n                let HDIdx = addressToIdxDict.object(forKey: address) as! Int\n                DLog(String(format: \"recoverAccountMainAddresses HDIdx: %d address: %@ n_tx: %d\", HDIdx, address, n_tx))\n                if (n_tx > 0 && HDIdx > accountAddressIdx) {\n                    accountAddressIdx = HDIdx\n                }\n            }\n            self.accountBalance = TLCoin(uint64: self.accountBalance.toUInt64() + UInt64(balance))\n            \n            DLog(String(format: \"accountAddressIdx: %ld lookAheadOffset: %lu\", accountAddressIdx, lookAheadOffset))\n            \n            if (accountAddressIdx < lookAheadOffset) {\n                continueLookingAheadAddress = false\n            }\n            \n            lookAheadOffset += GAP_LIMIT\n            \n        }\n        \n        while (getMainAddressesCount() > accountAddressIdx + 1) {\n            removeTopMainAddress()\n        }\n        \n        while (getMainAddressesCount() < accountAddressIdx + 1 + ACCOUNT_UNUSED_ACTIVE_MAIN_ADDRESS_AHEAD_OF_LATEST_USED_ONE_MINIMUM_COUNT) {\n            getNewMainAddress(getMainAddressesCount())\n        }\n        \n        return accountAddressIdx\n    }\n    \n    fileprivate func recoverAccountChangeAddresses(_ shouldResetAccountBalance: Bool) -> Int {\n        var lookAheadOffset = 0\n        var continueLookingAheadAddress = true\n        var accountAddressIdx = -1\n        \n        \n        while (continueLookingAheadAddress) {\n            var addresses = [String]()\n            addresses.reserveCapacity(GAP_LIMIT)\n            let addressToIdxDict = NSMutableDictionary(capacity: GAP_LIMIT)\n            for i in stride(from: lookAheadOffset, to: lookAheadOffset + GAP_LIMIT, by: 1) {\n                let address = getNewChangeAddress(i)\n                DLog(String(format:\"getNewChangeAddress HDIdx: %lu address: %@\", i, address))\n                addresses.append(address)\n                addressToIdxDict.setObject(i, forKey: address as NSCopying)\n            }\n            \n            let jsonData = TLBlockExplorerAPI.instance().getAddressesInfoSynchronous(addresses)\n            if (jsonData.object(forKey: TLNetworking.STATIC_MEMBERS.HTTP_ERROR_CODE) != nil) {\n                DLog(\"getAccountDataSynchronous error \\(jsonData.description)\")\n                NSException(name: NSExceptionName(rawValue: \"Network Error\"), reason: \"HTTP Error\", userInfo: nil).raise()\n            }\n            let addressesArray = jsonData.object(forKey: \"addresses\") as! NSArray\n            var balance:UInt64 = 0\n            for _addressDict in addressesArray {\n                let addressDict = _addressDict as! NSDictionary\n                let n_tx = addressDict.object(forKey: \"n_tx\") as! Int\n                let address = addressDict.object(forKey: \"address\") as! String\n                address2NumberOfTransactions[address] = n_tx\n                let addressBalance = (addressDict.object(forKey: \"final_balance\") as! NSNumber).uint64Value\n                balance += addressBalance\n                address2BalanceDict[address] = TLCoin(uint64: addressBalance)\n                \n                let HDIdx = addressToIdxDict.object(forKey: address) as! Int\n                DLog(String(format: \"recoverAccountChangeAddresses HDIdx: %d address: %@ n_tx: %d\", HDIdx, address, n_tx))\n                if (n_tx > 0 && HDIdx > accountAddressIdx) {\n                    accountAddressIdx = HDIdx\n                }\n            }\n            accountBalance = TLCoin(uint64: self.accountBalance.toUInt64() + UInt64(balance))\n            \n            if (accountAddressIdx < lookAheadOffset) {\n                continueLookingAheadAddress = false\n            }\n            \n            lookAheadOffset += GAP_LIMIT\n        }\n        \n        while (getChangeAddressesCount() > accountAddressIdx + 1) {\n            removeTopChangeAddress()\n        }\n        \n        while (getChangeAddressesCount() < accountAddressIdx + 1 + ACCOUNT_UNUSED_ACTIVE_CHANGE_ADDRESS_AHEAD_OF_LATEST_USED_ONE_MINIMUM_COUNT) {\n            getNewChangeAddress(getChangeAddressesCount())\n        }\n        \n        return accountAddressIdx\n    }\n    \n    func recoverAccount(_ shouldResetAccountBalance: Bool, recoverStealthPayments: Bool=false) -> Int {\n        let accountMainAddressMaxIdx = recoverAccountMainAddresses(shouldResetAccountBalance)\n        let accountChangeAddressMaxIdx = recoverAccountChangeAddresses(shouldResetAccountBalance)\n        \n        checkToArchiveAddresses()\n        updateReceivingAddresses()\n        updateChangeAddresses()\n        if recoverStealthPayments && self.stealthWallet != nil {\n            let semaphore = DispatchSemaphore(value: 0)\n            DispatchQueue.global(priority: DispatchQueue.GlobalQueuePriority.default).async {\n                self.fetchNewStealthPayments(recoverStealthPayments)\n                semaphore.signal()\n            }\n            semaphore.wait(timeout: DispatchTime.distantFuture)\n        }\n        \n        updateAccountNeedsRecovering(false)\n        return accountMainAddressMaxIdx + accountChangeAddressMaxIdx\n    }\n    \n    func updateAccountNeedsRecovering(_ needsRecovering: Bool) -> () {\n        if (accountType == TLAccountType.hdWallet) {\n            let accountIdx = accountDict!.object(forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_ACCOUNT_IDX) as! Int\n            self.appWallet!.updateAccountNeedsRecoveringFromHDWallet(accountIdx, accountNeedsRecovering: needsRecovering)\n        } else if (accountType == TLAccountType.coldWallet) {\n            self.appWallet!.updateAccountNeedsRecoveringFromColdWalletAccount(getPositionInWalletArray(), accountNeedsRecovering: needsRecovering)\n        } else if (accountType == TLAccountType.imported) {\n            self.appWallet!.updateAccountNeedsRecoveringFromImportedAccount(getPositionInWalletArray(), accountNeedsRecovering: needsRecovering)\n        } else {\n            self.appWallet!.updateAccountNeedsRecoveringFromImportedWatchAccount(getPositionInWalletArray(), accountNeedsRecovering: needsRecovering)\n        }\n        accountDict!.setObject(needsRecovering, forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_ACCOUNT_NEEDS_RECOVERING as NSCopying)\n    }\n    \n    func clearAllAddresses() -> () {\n        \n        mainActiveAddresses = [String]()\n        mainArchivedAddresses = [String]()\n        changeActiveAddresses = [String]()\n        changeArchivedAddresses = [String]()\n        \n        txidToAccountAmountDict = [String:TLCoin]()\n        txidToAccountAmountTypeDict = [String:Int]()\n        address2HDIndexDict = [String:Int]()\n        address2BalanceDict = [String:TLCoin]()\n        address2NumberOfTransactions = [String:Int]()\n        activeAddressesDict = [String:Bool]()\n        \n        \n        if (accountType == TLAccountType.hdWallet) {\n            let accountIdx = accountDict!.object(forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_ACCOUNT_IDX) as! Int\n            self.appWallet!.clearAllAddressesFromHDWallet(accountIdx)\n            self.appWallet!.clearAllStealthPaymentsFromHDWallet(accountIdx)\n        } else if (accountType == TLAccountType.coldWallet) {\n            self.appWallet!.clearAllAddressesFromColdWalletAccount(getPositionInWalletArray())\n        } else if (accountType == TLAccountType.imported) {\n            self.appWallet!.clearAllAddressesFromImportedAccount(getPositionInWalletArray())\n            self.appWallet!.clearAllStealthPaymentsFromImportedAccount(getPositionInWalletArray())\n        } else {\n            self.appWallet!.clearAllAddressesFromImportedWatchAccount(getPositionInWalletArray())\n        }\n        \n\n    }\n    \n    func needsRecovering() -> (Bool) {\n        let needsRecovering = accountDict!.object(forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_ACCOUNT_NEEDS_RECOVERING) as! Bool\n        return needsRecovering\n    }\n    \n    func getUnspentArray() -> NSArray {\n        return unspentOutputs!\n    }\n    \n    func getStealthPaymentUnspentOutputsArray() -> NSArray {\n        return stealthPaymentUnspentOutputs!\n    }\n    \n    func getTotalUnspentSum() -> TLCoin {\n        if (totalUnspentOutputsSum != nil) {\n            return totalUnspentOutputsSum!\n        }\n        \n        if (unspentOutputs == nil) {\n            return TLCoin.zero()\n        }\n        \n        var totalUnspentOutputsSumTemp:UInt64 = 0\n        \n        for _unspentOutput in stealthPaymentUnspentOutputs! {\n            let unspentOutput = _unspentOutput as! NSDictionary\n            let amount = unspentOutput.object(forKey: \"value\") as! NSNumber\n            totalUnspentOutputsSumTemp += amount.uint64Value\n        }\n        \n        for _unspentOutput in unspentOutputs! {\n            let unspentOutput = _unspentOutput as! NSDictionary\n            let amount = unspentOutput.object(forKey: \"value\") as! NSNumber\n            totalUnspentOutputsSumTemp += amount.uint64Value\n        }\n        \n        totalUnspentOutputsSum = TLCoin(uint64: totalUnspentOutputsSumTemp)\n        return totalUnspentOutputsSum!\n    }\n\n    func getInputsNeededToConsume(_ amountNeeded: TLCoin) -> Int {\n        var valueSelected:UInt64 = 0\n        var inputCount = 0\n        for _unspentOutput in stealthPaymentUnspentOutputs! {\n            let unspentOutput = _unspentOutput as! NSDictionary\n            let amount = unspentOutput.object(forKey: \"value\") as! NSNumber\n            valueSelected += amount.uint64Value\n            \n            inputCount += 1\n            if (valueSelected >= amountNeeded.toUInt64() && inputCount >= MAX_CONSOLIDATE_STEALTH_PAYMENT_UTXOS_COUNT) {\n                break\n            }\n        }\n        \n        if valueSelected >= amountNeeded.toUInt64() {\n            return inputCount\n        }\n        \n        for _unspentOutput in unspentOutputs! {\n            let unspentOutput = _unspentOutput as! NSDictionary\n            let amount = unspentOutput.object(forKey: \"value\") as! NSNumber\n            valueSelected += amount.uint64Value\n            inputCount += 1\n            if valueSelected >= amountNeeded.toUInt64() {\n                return inputCount\n            }\n        }\n        return inputCount\n    }\n\n    func getUnspentOutputs(_ success: @escaping TLWalletUtils.Success, failure:@escaping TLWalletUtils.Error) {\n        var activeAddresses = getActiveMainAddresses()! as! [String]\n        activeAddresses += getActiveChangeAddresses()! as! [String]\n        \n        if self.stealthWallet != nil {\n            activeAddresses += self.stealthWallet!.getUnspentPaymentAddresses()\n        }\n        \n        unspentOutputs = nil\n        totalUnspentOutputsSum = nil\n        stealthPaymentUnspentOutputs = nil\n        unspentOutputsCount = 0\n        stealthPaymentUnspentOutputsCount = 0\n        haveUpDatedUTXOs = false\n        \n        TLBlockExplorerAPI.instance().getUnspentOutputs(activeAddresses, success: {\n            (jsonData) in\n            let unspentOutputs = (jsonData as! NSDictionary).object(forKey: \"unspent_outputs\") as! NSArray!\n            self.unspentOutputs = NSMutableArray(capacity: unspentOutputs!.count)\n            self.stealthPaymentUnspentOutputs = NSMutableArray(capacity: unspentOutputs!.count)\n\n            for unspentOutput in unspentOutputs! {\n                let outputScript = (unspentOutput as AnyObject).object(forKey: \"script\") as! String\n                \n                let address = TLCoreBitcoinWrapper.getAddressFromOutputScript(outputScript, isTestnet: self.appWallet!.walletConfig.isTestnet)\n                if (address == nil) {\n                    DLog(\"address cannot be decoded. not normal pubkeyhash outputScript: \\(outputScript)\")\n                    continue\n                }\n                if self.stealthWallet != nil && self.stealthWallet!.isPaymentAddress(address!) == true {\n                    self.stealthPaymentUnspentOutputs!.add(unspentOutput)\n                    self.stealthPaymentUnspentOutputsCount += 1\n                } else {\n                    self.unspentOutputs!.add(unspentOutput)\n                    self.unspentOutputsCount += 1\n                }\n            }\n        \n            self.unspentOutputs = NSMutableArray(array: self.unspentOutputs!.sortedArray (comparator: {\n                (obj1, obj2) -> ComparisonResult in\n                \n                var confirmations1 = 0\n                var confirmations2 = 0\n                \n                if let c1 = (obj1 as! NSDictionary).object(forKey: \"confirmations\") as? Int {\n                    confirmations1 = c1\n                }\n                \n                if let c2 = (obj2 as! NSDictionary).object(forKey: \"confirmations\") as? Int {\n                    confirmations2 = c2\n                }\n\n                if confirmations1 > confirmations2 {\n                    return .orderedAscending\n                } else if confirmations1 < confirmations2 {\n                    return .orderedDescending\n                } else {\n                    return .orderedSame\n                }\n            }))\n            \n            self.stealthPaymentUnspentOutputs = NSMutableArray(array: self.stealthPaymentUnspentOutputs!.sortedArray (comparator: {\n                (obj1, obj2) -> ComparisonResult in\n                \n                var confirmations1 = 0\n                var confirmations2 = 0\n                \n                if let c1 = (obj1 as! NSDictionary).object(forKey: \"confirmations\") as? Int {\n                    confirmations1 = c1\n                }\n                \n                if let c2 = (obj2 as! NSDictionary).object(forKey: \"confirmations\") as? Int {\n                    confirmations2 = c2\n                }\n                \n                if confirmations1 > confirmations2 {\n                    return .orderedAscending\n                } else if confirmations1 < confirmations2 {\n                    return .orderedDescending\n                } else {\n                    return .orderedSame\n                }\n            }))\n            self.haveUpDatedUTXOs = true\n            success()\n            }, failure: {\n                (code, status) in\n                failure()\n        })\n    }\n    \n    func fetchNewStealthPayments(_ isRestoringAccount: Bool) {\n        self.stealthWallet!.checkToWatchStealthAddress()\n        var offset = 0\n        var currentLatestTxTime:UInt64 = 0\n        while true {\n            let ret = self.stealthWallet!.getAndStoreStealthPayments(offset)\n            if ret == nil {\n                break\n            }\n            let latestTxTime = ret!.1\n            if latestTxTime > currentLatestTxTime {\n                currentLatestTxTime = latestTxTime\n            }\n            let gotOldestPaymentAddresses = ret!.0\n            let newStealthPaymentAddresses = ret!.2\n            DLog(\"getAccountData  \\(self.getAccountIdxNumber()) newStealthPaymentAddresses \\(newStealthPaymentAddresses.description)\")\n            //TODO: txarray will not be in chronological order because of this, fix this\n            if newStealthPaymentAddresses.count > 0 {\n                self.getAccountDataO(newStealthPaymentAddresses, shouldResetAccountBalance: false)\n            }\n            if gotOldestPaymentAddresses {\n                break\n            }\n            offset += TLStealthExplorerAPI.STATIC_MEMBERS.STEALTH_PAYMENTS_FETCH_COUNT\n        }\n        \n        self.setStealthAddressLastTxTime(TLPreferences.getStealthExplorerURL()!, lastTxTime: currentLatestTxTime)\n        \n        if isRestoringAccount {\n            self.stealthWallet!.setUpStealthPaymentAddresses(true, isSetup: true, async: false)\n        }\n    }\n    \n    func getAccountData(_ addresses: Array<String>, shouldResetAccountBalance: Bool,\n        success: @escaping TLWalletUtils.Success, failure:@escaping TLWalletUtils.Error) -> () {\n            \n            TLBlockExplorerAPI.instance().getAddressesInfo(addresses, success: {\n                (_jsonData) in\n                let jsonData = _jsonData as! NSDictionary\n                if (shouldResetAccountBalance) {\n                    self.resetAccountBalances()\n                }\n                \n                let addressesDict = jsonData.object(forKey: \"addresses\") as! NSArray\n                var balance:UInt64 = 0\n                for _addressDict in addressesDict {\n                    let addressDict = _addressDict as! NSDictionary\n                    let n_tx = addressDict.object(forKey: \"n_tx\") as! Int\n                    let address = addressDict.object(forKey: \"address\") as! String\n                    self.address2NumberOfTransactions[address] = n_tx\n                    let addressBalance = (addressDict.object(forKey: \"final_balance\") as! NSNumber).uint64Value\n                    balance += addressBalance\n                    self.address2BalanceDict[address] = TLCoin(uint64: addressBalance)\n                }\n                self.accountBalance = TLCoin(uint64: self.accountBalance.toUInt64() + balance)\n                \n                self.processTxArray(jsonData.object(forKey: \"txs\") as! NSArray, shouldResetAccountBalance: true)\n                \n                \n                self.fetchedAccountData = true\n                self.subscribeToWebsockets()\n                self.downloadState = .downloaded\n                DLog(\"postNotificationName: EVENT_FETCHED_ADDRESSES_DATA \\(self.getAccountIdxNumber())\")\n                NotificationCenter.default.post(name: Notification.Name(rawValue: TLNotificationEvents.EVENT_FETCHED_ADDRESSES_DATA()), object: nil)\n                success()\n                },\n                failure: {\n                    (code, status) in\n                    failure()\n            })\n    }\n    \n    fileprivate func getAccountDataSynchronous(_ addresses: Array<String>, shouldResetAccountBalance: Bool, shouldProcessTxArray: Bool) -> NSDictionary? {\n        let jsonData = TLBlockExplorerAPI.instance().getAddressesInfoSynchronous(addresses)\n        if (jsonData.object(forKey: TLNetworking.STATIC_MEMBERS.HTTP_ERROR_CODE) == nil) {\n            if (shouldResetAccountBalance) {\n                resetAccountBalances()\n            }\n            \n            let addressesArray = jsonData.object(forKey: \"addresses\") as! NSArray\n            var balance:UInt64 = 0\n            for _addressDict in addressesArray {\n                let addressDict = _addressDict as! NSDictionary\n                let n_tx = addressDict.object(forKey: \"n_tx\") as! Int\n                let address = addressDict.object(forKey: \"address\") as! String\n                address2NumberOfTransactions[address] = n_tx\n                let addressBalance = (addressDict.object(forKey: \"final_balance\") as! NSNumber).uint64Value\n                balance += addressBalance\n                address2BalanceDict[address] = TLCoin(uint64: addressBalance)\n            }\n            self.accountBalance = TLCoin(uint64: self.accountBalance.toUInt64() + balance)\n            \n            if (shouldProcessTxArray) {\n                self.processTxArray(jsonData.object(forKey: \"txs\") as! NSArray, shouldResetAccountBalance: false)\n                self.fetchedAccountData = false //need to be false because after recovering account need to fetch stealth payments\n            }\n        } else {\n            DLog(\"getAccountDataSynchronous error \\(jsonData.description)\")\n            NSException(name: NSExceptionName(rawValue: \"Network Error\"), reason: \"HTTP Error\", userInfo: nil).raise()\n        }\n        \n        return jsonData\n    }\n    \n    \n    fileprivate func resetAccountBalances() -> () {\n        txObjectArray = [TLTxObject]()\n        address2BalanceDict = [String:TLCoin]()\n        address2NumberOfTransactions = [String:Int]()\n        \n        accountBalance = TLCoin.zero()\n        \n        for address in mainActiveAddresses {\n            address2BalanceDict[address] = TLCoin.zero()\n            address2NumberOfTransactions[address] = 0\n        }\n        for address in changeActiveAddresses {\n            address2BalanceDict[address] = TLCoin.zero()\n            address2NumberOfTransactions[address] = 0\n        }\n        if (TLWalletUtils.STATIC_MEMBERS.SHOULD_SAVE_ARCHIVED_ADDRESSES_IN_JSON) {\n            for address in mainArchivedAddresses {\n                address2BalanceDict[address] = TLCoin.zero()\n                address2NumberOfTransactions[address] = 0\n            }\n            for address in changeArchivedAddresses {\n                address2BalanceDict[address] = TLCoin.zero()\n                address2NumberOfTransactions[address] = 0\n            }\n        }\n    }\n    \n    func setStealthAddressServerStatus(_ serverURL: String, isWatching: Bool) -> () {\n        if (self.accountType == TLAccountType.hdWallet) {\n            let accountIdx = self.getAccountIdxNumber()\n            self.appWallet!.setStealthAddressServerStatusHDWallet(accountIdx, serverURL: serverURL, isWatching: isWatching)\n        } else if (self.accountType == TLAccountType.coldWallet) {\n            self.appWallet!.setStealthAddressServerStatusColdWalletAccount(self.getPositionInWalletArray(), serverURL: serverURL, isWatching: isWatching)\n        } else if (self.accountType == TLAccountType.imported) {\n            self.appWallet!.setStealthAddressServerStatusImportedAccount(self.getPositionInWalletArray(), serverURL: serverURL, isWatching: isWatching)\n        } else {\n            self.appWallet!.setStealthAddressServerStatusImportedWatchAccount(self.getPositionInWalletArray(), serverURL: serverURL, isWatching: isWatching)\n        }\n    }\n\n    func setStealthAddressLastTxTime(_ serverURL: String, lastTxTime: UInt64) -> () {\n        if (self.accountType == TLAccountType.hdWallet) {\n            let accountIdx = self.getAccountIdxNumber()\n            self.appWallet!.setStealthAddressLastTxTimeHDWallet(accountIdx, serverURL: serverURL, lastTxTime: lastTxTime)\n        } else if (self.accountType == TLAccountType.coldWallet) {\n            self.appWallet!.setStealthAddressLastTxTimeColdWalletAccount(self.getPositionInWalletArray(), serverURL: serverURL, lastTxTime: lastTxTime)\n        } else if (self.accountType == TLAccountType.imported) {\n            self.appWallet!.setStealthAddressLastTxTimeImportedAccount(self.getPositionInWalletArray(), serverURL: serverURL, lastTxTime: lastTxTime)\n        } else {\n            self.appWallet!.setStealthAddressLastTxTimeImportedWatchAccount(self.getPositionInWalletArray(), serverURL: serverURL, lastTxTime: lastTxTime)\n        }\n    }\n    \n    func addStealthAddressPaymentKey(_ privateKey:String, address:String, txid: String, txTime: UInt64, stealthPaymentStatus: TLStealthPaymentStatus) -> () {\n        if (accountType == TLAccountType.hdWallet) {\n            let accountIdx = self.getAccountIdxNumber()\n            self.appWallet!.addStealthAddressPaymentKeyHDWallet(accountIdx, privateKey:privateKey,\n                address:address, txid:txid, txTime: txTime, stealthPaymentStatus: stealthPaymentStatus)\n        } else if (accountType == TLAccountType.coldWallet) {\n            self.appWallet!.addStealthAddressPaymentKeyColdWalletAccount(self.getPositionInWalletArray(),\n                privateKey:privateKey, address:address, txid:txid, txTime: txTime, stealthPaymentStatus: stealthPaymentStatus)\n        } else if (accountType == TLAccountType.imported) {\n            self.appWallet!.addStealthAddressPaymentKeyImportedAccount(self.getPositionInWalletArray(),\n                privateKey:privateKey, address:address, txid:txid, txTime: txTime, stealthPaymentStatus: stealthPaymentStatus)\n        } else if (accountType == TLAccountType.importedWatch) {\n            self.appWallet!.addStealthAddressPaymentKeyImportedWatchAccount(self.getPositionInWalletArray(),\n                privateKey:privateKey, address:address, txid:txid, txTime: txTime, stealthPaymentStatus: stealthPaymentStatus)\n        }\n    }\n    \n    func setStealthPaymentStatus(_ txid: String, stealthPaymentStatus: TLStealthPaymentStatus, lastCheckTime: UInt64) -> () {\n        if (accountType == TLAccountType.hdWallet) {\n            let accountIdx = self.getAccountIdxNumber()\n            self.appWallet!.setStealthPaymentStatusHDWallet(accountIdx, txid:txid,\n                stealthPaymentStatus:stealthPaymentStatus, lastCheckTime: lastCheckTime)\n        } else if (accountType == TLAccountType.coldWallet) {\n            self.appWallet!.setStealthPaymentStatusColdWalletAccount(self.getPositionInWalletArray(),\n                txid:txid, stealthPaymentStatus:stealthPaymentStatus, lastCheckTime: lastCheckTime)\n        } else if (accountType == TLAccountType.imported) {\n            self.appWallet!.setStealthPaymentStatusImportedAccount(self.getPositionInWalletArray(),\n                txid:txid, stealthPaymentStatus:stealthPaymentStatus, lastCheckTime: lastCheckTime)\n        } else if (accountType == TLAccountType.importedWatch) {\n            self.appWallet!.setStealthPaymentStatusImportedWatchAccount(self.getPositionInWalletArray(),\n                txid:txid, stealthPaymentStatus:stealthPaymentStatus, lastCheckTime: lastCheckTime)\n        }\n    }\n    \n    func removeOldStealthPayments() -> () {\n        if (accountType == TLAccountType.hdWallet) {\n            let accountIdx = self.getAccountIdxNumber()\n            self.appWallet!.removeOldStealthPaymentsHDWallet(accountIdx)\n        } else if (accountType == TLAccountType.coldWallet) {\n            self.appWallet!.removeOldStealthPaymentsColdWalletAccount(self.getPositionInWalletArray())\n        } else if (accountType == TLAccountType.imported) {\n            self.appWallet!.removeOldStealthPaymentsImportedAccount(self.getPositionInWalletArray())\n        } else if (accountType == TLAccountType.importedWatch) {\n            self.appWallet!.removeOldStealthPaymentsImportedWatchAccount(self.getPositionInWalletArray())\n        }\n    }\n\n    func setStealthPaymentLastCheckTime(_ txid: String, lastCheckTime: UInt64) -> () {\n        if (accountType == TLAccountType.hdWallet) {\n            let accountIdx = self.getAccountIdxNumber()\n            self.appWallet!.setStealthPaymentLastCheckTimeHDWallet(accountIdx, txid: txid, lastCheckTime: lastCheckTime)\n        } else if (accountType == TLAccountType.coldWallet) {\n            self.appWallet!.setStealthPaymentLastCheckTimeColdWalletAccount(self.getPositionInWalletArray(), txid: txid, lastCheckTime: lastCheckTime)\n        } else if (accountType == TLAccountType.imported) {\n            self.appWallet!.setStealthPaymentLastCheckTimeImportedAccount(self.getPositionInWalletArray(), txid: txid, lastCheckTime: lastCheckTime)\n        } else if (accountType == TLAccountType.importedWatch) {\n            self.appWallet!.setStealthPaymentLastCheckTimeImportedWatchAccount(self.getPositionInWalletArray(), txid: txid, lastCheckTime: lastCheckTime)\n        }\n    }\n    \n    \n    func getAccountDataO() -> () {\n        // if account needs recovering dont fetch account data\n        if (needsRecovering()) {\n            self.downloadState = .failed\n            return\n        }\n\n\n        var activeAddresses = getActiveMainAddresses()! as! [String]\n        activeAddresses += getActiveChangeAddresses()! as! [String]\n        \n        if self.stealthWallet != nil {\n            activeAddresses += self.stealthWallet!.getPaymentAddresses()\n            DispatchQueue.global(priority: DispatchQueue.GlobalQueuePriority.default).async {\n                self.fetchNewStealthPayments(false)\n            }\n        }\n        \n        self.getAccountDataO(activeAddresses, shouldResetAccountBalance: true)\n    }\n    \n    fileprivate func getAccountDataO(_ addresses: Array<String>, shouldResetAccountBalance: Bool) -> () {\n        let jsonData = TLBlockExplorerAPI.instance().getAddressesInfoSynchronous(addresses)\n        if (jsonData.object(forKey: TLNetworking.STATIC_MEMBERS.HTTP_ERROR_CODE) != nil) {\n            self.downloadState = .failed\n            return\n        }\n\n        if (shouldResetAccountBalance) {\n            self.resetAccountBalances()\n        }\n\n        let addressesDict = jsonData.object(forKey: \"addresses\") as! NSArray\n        var balance:UInt64 = 0\n        for _addressDict in addressesDict {\n            let addressDict = _addressDict as! NSDictionary\n            let n_tx = addressDict.object(forKey: \"n_tx\") as! Int\n            let address = addressDict.object(forKey: \"address\") as! String\n            self.address2NumberOfTransactions[address] = n_tx\n            let addressBalance = (addressDict.object(forKey: \"final_balance\") as! NSNumber).uint64Value\n            balance += addressBalance\n            self.address2BalanceDict[address] = TLCoin(uint64: addressBalance)\n        }\n        self.accountBalance = TLCoin(uint64: self.accountBalance.toUInt64() + balance)\n        \n        self.processTxArray(jsonData.object(forKey: \"txs\") as! NSArray, shouldResetAccountBalance: true)\n        \n        self.fetchedAccountData = true\n        self.subscribeToWebsockets()\n        self.downloadState = .downloaded\n        DispatchQueue.main.async(execute: {\n            DLog(\"postNotificationName: EVENT_FETCHED_ADDRESSES_DATA \\(self.getAccountIdxNumber())\")\n            NotificationCenter.default.post(name: Notification.Name(rawValue: TLNotificationEvents.EVENT_FETCHED_ADDRESSES_DATA()), object: nil)\n        })\n    }\n    \n    fileprivate func subscribeToWebsockets() -> () {\n        if self.listeningToIncomingTransactions == false {\n            self.listeningToIncomingTransactions = true\n            let activeMainAddresses = self.getActiveMainAddresses()\n            for address in activeMainAddresses! {\n                TLTransactionListener.instance().listenToIncomingTransactionForAddress(address as! String)\n            }\n            let activeChangeAddresses = self.getActiveChangeAddresses()\n            for address in activeChangeAddresses! {\n                TLTransactionListener.instance().listenToIncomingTransactionForAddress(address as! String)\n            }\n        }\n        if self.stealthWallet != nil {\n            let stealthPaymentAddresses = self.stealthWallet!.getUnspentPaymentAddresses()\n            for address in stealthPaymentAddresses {\n                TLTransactionListener.instance().listenToIncomingTransactionForAddress(address)\n            }\n            \n            if self.stealthWallet!.isListeningToStealthPayment == false {\n                let challenge = TLStealthWebSocket.instance().challenge\n                let addrAndSignature = self.stealthWallet!.getStealthAddressAndSignatureFromChallenge(challenge)\n                TLStealthWebSocket.instance().sendMessageSubscribeToStealthAddress(addrAndSignature.0, signature: addrAndSignature.1)\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "ArcBit/model/TLAccounts.swift",
    "content": "//\n//  TLAccounts.swift\n//  ArcBit\n//\n//  Created by Timothy Lee on 3/14/15.\n//  Copyright (c) 2015 Timothy Lee <stequald01@gmail.com>\n//\n//   This library is free software; you can redistribute it and/or\n//   modify it under the terms of the GNU Lesser General Public\n//   License as published by the Free Software Foundation; either\n//   version 2.1 of the License, or (at your option) any later version.\n//\n//   This library is distributed in the hope that it will be useful,\n//   but WITHOUT ANY WARRANTY; without even the implied warranty of\n//   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n//   Lesser General Public License for more details.\n//\n//   You should have received a copy of the GNU Lesser General Public\n//   License along with this library; if not, write to the Free Software\n//   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,\n//   MA 02110-1301  USA\n\nimport Foundation\n\n@objc class TLAccounts:NSObject {\n    fileprivate var appWallet:TLWallet?\n    fileprivate var accountsDict:NSMutableDictionary?\n    fileprivate let accountsArray = NSMutableArray()\n    fileprivate let archivedAccountsArray = NSMutableArray()\n    fileprivate var accountType:TLAccountType?\n\n    init(appWallet: TLWallet, accountsArray: NSArray, accountType at:TLAccountType) {\n        super.init()\n        self.appWallet = appWallet\n        accountType = at\n        \n        self.accountsDict = NSMutableDictionary(capacity: accountsArray.count)\n        \n        for i in stride(from: 0, to: accountsArray.count, by: 1) {\n            let accountObject = accountsArray.object(at: i) as! TLAccountObject\n            if (accountObject.isArchived()) {\n                self.archivedAccountsArray.add(accountObject)\n            } else {\n                self.accountsArray.add(accountObject)\n            }\n            \n            accountObject.setPositionInWalletArray(i)\n            self.accountsDict!.setObject(accountObject, forKey:i as NSCopying)\n        }\n    }\n    \n    @discardableResult func addAccountWithExtendedKey(_ extendedKey:String, accountName:String) -> TLAccountObject {\n        assert(accountType != TLAccountType.hdWallet, \"accountType == TLAccountTypeHDWallet\")\n        let accountObject:TLAccountObject\n        \n        if (accountType == TLAccountType.coldWallet) {\n            accountObject = self.appWallet!.addColdWalletAccount(extendedKey)\n        } else if (accountType == TLAccountType.imported) {\n            accountObject = self.appWallet!.addImportedAccount(extendedKey)\n        } else {\n            accountObject = self.appWallet!.addWatchOnlyAccount(extendedKey)\n        }\n        self.accountsArray.add(accountObject)\n        let positionInWalletArray = self.getNumberOfAccounts()+getNumberOfArchivedAccounts()-1\n        accountObject.setPositionInWalletArray(positionInWalletArray)\n        self.accountsDict!.setObject(accountObject, forKey:accountObject.getPositionInWalletArray() as NSCopying)\n        \n        renameAccount(positionInWalletArray, accountName: accountName)\n        \n        return accountObject\n    }\n    \n    fileprivate func addAccount(_ accountObject: TLAccountObject) -> (Bool){\n        assert(accountType == TLAccountType.hdWallet, \"accountType != TLAccountTypeHDWallet\")\n        assert(self.accountsDict!.object(forKey: accountObject.getAccountIdxNumber()) == nil, \"\")\n        \n        self.accountsDict!.setObject(accountObject, forKey:accountObject.getAccountIdxNumber() as NSCopying)\n        self.accountsArray.add(accountObject)\n        \n        return true\n    }\n    \n    @discardableResult func renameAccount(_ accountIdxNumber:Int, accountName:String) -> (Bool){\n        if (accountType == TLAccountType.hdWallet) {\n            let accountObject = self.accountsDict!.object(forKey: accountIdxNumber) as! TLAccountObject\n            accountObject.renameAccount(accountName)\n            self.appWallet!.renameAccount(accountObject.getAccountIdxNumber(), accountName:accountName)\n        } else  {\n            let accountObject = self.getAccountObjectForAccountIdxNumber(accountIdxNumber)\n            accountObject.renameAccount(accountName)\n            if (accountType == TLAccountType.coldWallet) {\n                self.appWallet!.setColdWalletAccountName(accountName, idx:accountIdxNumber)\n            } else if (accountType == TLAccountType.imported) {\n                self.appWallet!.setImportedAccountName(accountName, idx:accountIdxNumber)\n            } else if (accountType == TLAccountType.importedWatch) {\n                self.appWallet!.setWatchOnlyAccountName(accountName, idx:accountIdxNumber)\n            }\n        }\n        \n        return true\n    }\n    \n    //in this context accountIdx is not the accountID, accountIdx is simply the order in which i want to display the accounts, neccessary cuz accounts can be deleted and such,\n    func getAccountObjectForIdx(_ idx:Int)-> (TLAccountObject) {\n        return self.accountsArray.object(at: idx) as! TLAccountObject\n    }\n    \n    func getArchivedAccountObjectForIdx(_ idx:Int) -> TLAccountObject {\n        return self.archivedAccountsArray.object(at: idx) as! TLAccountObject\n    }\n    \n    func getIdxForAccountObject(_ accountObject:TLAccountObject) -> (Int){\n        return self.accountsArray.index(of: accountObject) as Int\n    }\n    \n    func getNumberOfAccounts() -> Int {\n        return self.accountsArray.count\n    }\n    \n    func getNumberOfArchivedAccounts() -> Int{\n        return self.archivedAccountsArray.count\n    }\n    \n    \n    func getAccountObjectForAccountIdxNumber(_ accountIdxNumber:Int) ->TLAccountObject {\n        return self.accountsDict!.object(forKey: accountIdxNumber) as! TLAccountObject\n    }\n    \n    func archiveAccount(_ positionInWalletArray:Int) -> (){\n        setArchiveAccount(positionInWalletArray, enabled:true)\n        \n        let toMoveAccountObject = self.accountsDict!.object(forKey: positionInWalletArray) as! TLAccountObject\n        \n        self.accountsArray.remove(toMoveAccountObject)\n        for i in stride(from: 0, to: self.archivedAccountsArray.count, by: 1) {\n            let accountObject = self.archivedAccountsArray.object(at: i) as! TLAccountObject\n            \n            if (accountObject.getPositionInWalletArray() > toMoveAccountObject.getPositionInWalletArray()) {\n                self.archivedAccountsArray.insert(toMoveAccountObject, at:i)\n                return\n            }\n        }\n        self.archivedAccountsArray.add(toMoveAccountObject)\n    }\n    \n    func unarchiveAccount(_ positionInWalletArray:Int) -> (){\n        setArchiveAccount(positionInWalletArray, enabled:false)\n        \n        let toMoveAccountObject = self.accountsDict!.object(forKey: positionInWalletArray) as! TLAccountObject\n        \n        self.archivedAccountsArray.remove(toMoveAccountObject)\n        for i in stride(from: 0, to: self.accountsArray.count, by: 1) {\n            let accountObject = self.accountsArray.object(at: i) as! TLAccountObject\n            if (accountObject.getPositionInWalletArray() > toMoveAccountObject.getPositionInWalletArray()) {\n                self.accountsArray.insert(toMoveAccountObject, at:i)\n                return\n            }\n        }\n        self.accountsArray.add(toMoveAccountObject)\n    }\n    \n    fileprivate func setArchiveAccount(_ accountIdxNumber:Int, enabled:Bool)  -> (){\n        let accountObject = getAccountObjectForAccountIdxNumber(accountIdxNumber) as TLAccountObject\n        accountObject.archiveAccount(enabled)\n        \n        if (accountType == TLAccountType.hdWallet) {\n            self.appWallet!.archiveAccountHDWallet(accountIdxNumber, enabled:enabled)\n        } else if (accountType == TLAccountType.coldWallet) {\n            self.appWallet!.archiveAccountColdWalletAccount(accountIdxNumber, enabled:enabled)\n        } else if (accountType == TLAccountType.imported) {\n            self.appWallet!.archiveAccountImportedAccount(accountIdxNumber, enabled:enabled)\n        } else if (accountType == TLAccountType.importedWatch) {\n            self.appWallet!.archiveAccountImportedWatchAccount(accountIdxNumber, enabled:enabled)\n        }\n    }\n    \n    @discardableResult func createNewAccount(_ accountName:String, accountType:TLAccount) -> TLAccountObject {\n        let accountObject = self.appWallet!.createNewAccount(accountName, accountType:TLAccount.normal,\n            preloadStartingAddresses:true)\n        accountObject.updateAccountNeedsRecovering(false)\n        addAccount(accountObject)\n        return accountObject\n    }\n    \n    func createNewAccount(_ accountName:String, accountType:TLAccount, preloadStartingAddresses:Bool) -> TLAccountObject {\n        let accountObject = self.appWallet!.createNewAccount(accountName, accountType:TLAccount.normal, preloadStartingAddresses:preloadStartingAddresses)\n        addAccount(accountObject)\n        return accountObject\n    }\n    \n    @discardableResult func popTopAccount() -> (Bool){\n        if (self.accountsArray.count <= 0) {\n            return false\n        }\n        \n        let accountObject = self.accountsArray.lastObject as! TLAccountObject\n        self.accountsDict!.removeObject(forKey: accountObject.getAccountIdxNumber())\n        \n        self.accountsArray.removeLastObject()\n        self.appWallet!.removeTopAccount()\n        return true\n    }\n    \n    func deleteAccount(_ idx:Int) -> (Bool){\n        assert(accountType != TLAccountType.hdWallet, \"accountType == TLAccountTypeHDWallet\")\n        \n        let accountObject = self.archivedAccountsArray.object(at: idx) as! TLAccountObject\n        self.archivedAccountsArray.removeObject(at: idx)\n        \n        if (accountType == TLAccountType.coldWallet) {\n            self.appWallet!.deleteColdWalletAccount(accountObject.getPositionInWalletArray())\n        } else if (accountType == TLAccountType.imported) {\n            self.appWallet!.deleteImportedAccount(accountObject.getPositionInWalletArray())\n        } else if (accountType == TLAccountType.importedWatch) {\n            self.appWallet!.deleteWatchOnlyAccount(accountObject.getPositionInWalletArray())\n        }\n        \n        self.accountsDict!.removeObject(forKey: accountObject.getPositionInWalletArray())\n        \n        let tmpDict = self.accountsDict!.copy() as! NSDictionary\n        for (key, _) in tmpDict {\n            let ao = self.accountsDict!.object(forKey: key) as! TLAccountObject\n            if (ao.getPositionInWalletArray() > accountObject.getPositionInWalletArray()) {\n                ao.setPositionInWalletArray(ao.getPositionInWalletArray()-1)\n                self.accountsDict!.setObject(ao, forKey:ao.getPositionInWalletArray() as NSCopying)\n            }\n        }\n        \n        if (accountObject.getPositionInWalletArray() < self.accountsDict!.count - 1) {\n            self.accountsDict!.removeObject(forKey: self.accountsDict!.count-1)\n        }\n        \n        return true\n    }\n}\n\n"
  },
  {
    "path": "ArcBit/model/TLAchievements.swift",
    "content": "//\n//  TLAchievements.swift\n//  ArcBit\n//\n//  Created by Timothy Lee on 3/14/15.\n//  Copyright (c) 2015 Timothy Lee <stequald01@gmail.com>\n//\n//   This library is free software; you can redistribute it and/or\n//   modify it under the terms of the GNU Lesser General Public\n//   License as published by the Free Software Foundation; either\n//   version 2.1 of the License, or (at your option) any later version.\n//\n//   This library is distributed in the hope that it will be useful,\n//   but WITHOUT ANY WARRANTY; without even the implied warranty of\n//   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n//   Lesser General Public License for more details.\n//\n//   You should have received a copy of the GNU Lesser General Public\n//   License along with this library; if not, write to the Free Software\n//   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,\n//   MA 02110-1301  USA\n\nimport Foundation\n\nclass TLAchievements {\n    struct STATIC_MEMBERS {\n        static var _instance:TLAchievements? = nil\n    }\n    \n    class func instance() -> (TLAchievements) {\n        if(STATIC_MEMBERS._instance == nil) {\n            STATIC_MEMBERS._instance = TLAchievements()\n        }\n        return STATIC_MEMBERS._instance!\n    }\n    \n    func hasDoneAction(_ action:String) -> (Bool) {\n        let userAnalyticsDict = NSMutableDictionary(dictionary:TLPreferences.getAnalyticsDict() ?? NSDictionary())\n        if userAnalyticsDict.value(forKey: action) == nil {\n            return false\n        }\n        let eventCount = (userAnalyticsDict.value(forKey: action) as! NSNumber).intValue\n        return eventCount > 0\n    }\n}\n"
  },
  {
    "path": "ArcBit/model/TLAnalytics.swift",
    "content": "//\n//  TLAnalytics.swift\n//  ArcBit\n//\n//  Created by Timothy Lee on 3/14/15.\n//  Copyright (c) 2015 Timothy Lee <stequald01@gmail.com>\n//\n//   This library is free software; you can redistribute it and/or\n//   modify it under the terms of the GNU Lesser General Public\n//   License as published by the Free Software Foundation; either\n//   version 2.1 of the License, or (at your option) any later version.\n//\n//   This library is distributed in the hope that it will be useful,\n//   but WITHOUT ANY WARRANTY; without even the implied warranty of\n//   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n//   Lesser General Public License for more details.\n//\n//   You should have received a copy of the GNU Lesser General Public\n//   License along with this library; if not, write to the Free Software\n//   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,\n//   MA 02110-1301  USA\n\nimport Foundation\n\nclass TLAnalytics: NSObject {\n    struct STATIC_MEMBERS {\n        static var _instance:TLAnalytics? = nil\n    }\n    \n    class func instance() -> (TLAnalytics) {\n        if(STATIC_MEMBERS._instance == nil) {\n            STATIC_MEMBERS._instance = TLAnalytics()\n        }\n        return STATIC_MEMBERS._instance!\n    }\n    \n    override init() {\n        super.init()\n        observeUserInterfaceInteractions()\n    }\n    \n    fileprivate func observeUserInterfaceInteractionsWithAchievements() -> () {\n        NotificationCenter.default.addObserver(self\n            ,selector:#selector(TLAnalytics.updateSentPayment(_:)),\n            name:NSNotification.Name(rawValue: TLNotificationEvents.EVENT_SEND_PAYMENT()), object:nil)\n        NotificationCenter.default.addObserver(self\n            ,selector:#selector(TLAnalytics.updateReceivePayment(_:)),\n            name:NSNotification.Name(rawValue: TLNotificationEvents.EVENT_RECEIVE_PAYMENT()), object:nil)\n        NotificationCenter.default.addObserver(self\n            ,selector:#selector(TLAnalytics.updateViewHistoryScreen(_:)),\n            name:NSNotification.Name(rawValue: TLNotificationEvents.EVENT_VIEW_HISTORY()), object:nil)\n        NotificationCenter.default.addObserver(self\n            ,selector:#selector(TLAnalytics.updateCreateNewAccount(_:)),\n            name:NSNotification.Name(rawValue: TLNotificationEvents.EVENT_CREATE_NEW_ACCOUNT()), object:nil)\n        NotificationCenter.default.addObserver(self\n            ,selector:#selector(TLAnalytics.updateEditAccountName(_:)),\n            name:NSNotification.Name(rawValue: TLNotificationEvents.EVENT_EDIT_ACCOUNT_NAME()), object:nil)\n        NotificationCenter.default.addObserver(self\n            ,selector:#selector(TLAnalytics.updateArchiveAccount(_:)),\n            name:NSNotification.Name(rawValue: TLNotificationEvents.EVENT_ARCHIVE_ACCOUNT()), object:nil)\n        NotificationCenter.default.addObserver(self\n            ,selector:#selector(TLAnalytics.updateEnablePINCode(_:)),\n            name:NSNotification.Name(rawValue: TLNotificationEvents.EVENT_ENABLE_PIN_CODE()), object:nil)\n        NotificationCenter.default.addObserver(self\n            ,selector:#selector(TLAnalytics.updateBackupPassphrase(_:)),\n            name:NSNotification.Name(rawValue: TLNotificationEvents.EVENT_BACKUP_PASSPHRASE()), object:nil)\n        NotificationCenter.default.addObserver(self\n            ,selector:#selector(TLAnalytics.updateRestoreWallet(_:)),\n            name:NSNotification.Name(rawValue: TLNotificationEvents.EVENT_RESTORE_WALLET()), object:nil)\n        NotificationCenter.default.addObserver(self\n            ,selector:#selector(TLAnalytics.updateAddToAddressBook(_:)),\n            name:NSNotification.Name(rawValue: TLNotificationEvents.EVENT_ADD_TO_ADDRESS_BOOK()), object:nil)\n        NotificationCenter.default.addObserver(self\n            ,selector:#selector(TLAnalytics.updateEditEntryAddressBook(_:)),\n            name:NSNotification.Name(rawValue: TLNotificationEvents.EVENT_EDIT_ENTRY_ADDRESS_BOOK()), object:nil)\n        NotificationCenter.default.addObserver(self\n            ,selector:#selector(TLAnalytics.updateDeleteEntryAddressBook(_:)),\n            name:NSNotification.Name(rawValue: TLNotificationEvents.EVENT_DELETE_ENTRY_ADDRESS_BOOK()), object:nil)\n        NotificationCenter.default.addObserver(self\n            ,selector:#selector(TLAnalytics.updateSendToAddressInAddressBook(_:)),\n            name:NSNotification.Name(rawValue: TLNotificationEvents.EVENT_SEND_TO_ADDRESS_IN_ADDRESS_BOOK()), object:nil)\n        NotificationCenter.default.addObserver(self\n            ,selector:#selector(TLAnalytics.updateTagTransaction(_:)),\n            name:NSNotification.Name(rawValue: TLNotificationEvents.EVENT_TAG_TRANSACTION()), object:nil)\n        NotificationCenter.default.addObserver(self\n            ,selector:#selector(TLAnalytics.updateToggleAutomaticTxFee(_:)),\n            name:NSNotification.Name(rawValue: TLNotificationEvents.EVENT_TOGGLE_AUTOMATIC_TX_FEE()), object:nil)\n        NotificationCenter.default.addObserver(self\n            ,selector:#selector(TLAnalytics.updateChangeAutomaticTxFee(_:)),\n            name:NSNotification.Name(rawValue: TLNotificationEvents.EVENT_CHANGE_AUTOMATIC_TX_FEE()), object:nil)\n        NotificationCenter.default.addObserver(self\n            ,selector:#selector(TLAnalytics.updateViewAccountAddresses(_:)),\n            name:NSNotification.Name(rawValue: TLNotificationEvents.EVENT_VIEW_ACCOUNT_ADDRESSES()), object:nil)\n        NotificationCenter.default.addObserver(self\n            ,selector:#selector(TLAnalytics.updateViewAccountAddress(_:)),\n            name:NSNotification.Name(rawValue: TLNotificationEvents.EVENT_VIEW_ACCOUNT_ADDRESS()), object:nil)\n        NotificationCenter.default.addObserver(self\n            ,selector:#selector(TLAnalytics.updateViewTransactionInWeb(_:)),\n            name:NSNotification.Name(rawValue: TLNotificationEvents.EVENT_VIEW_TRANSACTION_IN_WEB()), object:nil)\n        NotificationCenter.default.addObserver(self\n            ,selector:#selector(TLAnalytics.updateViewAccountAddressInWeb(_:)),\n            name:NSNotification.Name(rawValue: TLNotificationEvents.EVENT_VIEW_ACCOUNT_ADDRESS_IN_WEB()), object:nil)\n        NotificationCenter.default.addObserver(self\n            ,selector:#selector(TLAnalytics.updateViewEnableAdvancedMode(_:)),\n             name:NSNotification.Name(rawValue: TLNotificationEvents.EVENT_ENABLE_ADVANCE_MODE()), object:nil)\n\n        NotificationCenter.default.addObserver(self\n            ,selector:#selector(TLAnalytics.updateImportAccount(_:)),\n            name:NSNotification.Name(rawValue: TLNotificationEvents.EVENT_IMPORT_ACCOUNT()), object:nil)\n        NotificationCenter.default.addObserver(self\n            ,selector:#selector(TLAnalytics.updateImportWatchOnlyAccount(_:)),\n            name:NSNotification.Name(rawValue: TLNotificationEvents.EVENT_IMPORT_WATCH_ONLY_ACCOUNT()), object:nil)\n        NotificationCenter.default.addObserver(self\n            ,selector:#selector(TLAnalytics.updateImportPrivateKey(_:)),\n            name:NSNotification.Name(rawValue: TLNotificationEvents.EVENT_IMPORT_PRIVATE_KEY()), object:nil)\n        NotificationCenter.default.addObserver(self\n            ,selector:#selector(TLAnalytics.updateImportWatchOnlyAddress(_:)),\n            name:NSNotification.Name(rawValue: TLNotificationEvents.EVENT_IMPORT_WATCH_ONLY_ADDRESS()), object:nil)\n        NotificationCenter.default.addObserver(self\n            ,selector:#selector(TLAnalytics.updateChangeBlockExplorerType(_:)),\n            name:NSNotification.Name(rawValue: TLNotificationEvents.EVENT_CHANGE_BLOCKEXPLORER_TYPE()), object:nil)\n        NotificationCenter.default.addObserver(self\n            ,selector:#selector(TLAnalytics.updateViewExtendedPublicKey(_:)),\n            name:NSNotification.Name(rawValue: TLNotificationEvents.EVENT_VIEW_EXTENDED_PUBLIC_KEY()), object:nil)\n        NotificationCenter.default.addObserver(self\n            ,selector:#selector(TLAnalytics.updateViewExtendedPrivateKey(_:)),\n            name:NSNotification.Name(rawValue: TLNotificationEvents.EVENT_VIEW_EXTENDED_PRIVATE_KEY()), object:nil)\n        NotificationCenter.default.addObserver(self\n            ,selector:#selector(TLAnalytics.updateViewAccountsPrivateKey(_:)),\n            name:NSNotification.Name(rawValue: TLNotificationEvents.EVENT_VIEW_ACCOUNT_PRIVATE_KEY()), object:nil)\n    }\n    \n    func observeUserInterfaceInteractions() -> () {\n        NotificationCenter.default.addObserver(self\n            ,selector:#selector(TLAnalytics.updateViewSendScreen(_:)),\n            name:NSNotification.Name(rawValue: TLNotificationEvents.EVENT_VIEW_SEND_SCREEN()), object:nil)\n        \n        NotificationCenter.default.addObserver(self\n            ,selector:#selector(TLAnalytics.updateViewReceiveScreen(_:)),\n            name:NSNotification.Name(rawValue: TLNotificationEvents.EVENT_VIEW_RECEIVE_SCREEN()), object:nil)\n        \n        NotificationCenter.default.addObserver(self\n            ,selector:#selector(TLAnalytics.updateViewAccountsScreen(_:)),\n            name:NSNotification.Name(rawValue: TLNotificationEvents.EVENT_VIEW_ACCOUNTS_SCREEN()), object:nil)\n        \n        NotificationCenter.default.addObserver(self\n            ,selector:#selector(TLAnalytics.updateViewManageAccountsScreen(_:)),\n            name:NSNotification.Name(rawValue: TLNotificationEvents.EVENT_VIEW_MANAGE_ACCOUNTS_SCREEN()), object:nil)\n        \n        NotificationCenter.default.addObserver(self\n            ,selector:#selector(TLAnalytics.updateViewHelpScreen(_:)),\n            name:NSNotification.Name(rawValue: TLNotificationEvents.EVENT_VIEW_HELP_SCREEN()), object:nil)\n        \n        NotificationCenter.default.addObserver(self\n            ,selector:#selector(TLAnalytics.updateViewSettingsScreen(_:)),\n            name:NSNotification.Name(rawValue: TLNotificationEvents.EVENT_VIEW_SETTINGS_SCREEN()), object:nil)\n        \n        observeUserInterfaceInteractionsWithAchievements()\n    }\n    \n    func updateViewSendScreen(_ notification: Notification) -> () {\n        updateUserAnalyticsWithEvent(TLNotificationEvents.EVENT_VIEW_SEND_SCREEN())\n    }\n    \n    func updateViewReceiveScreen(_ notification: Notification) -> () {\n        updateUserAnalyticsWithEvent(TLNotificationEvents.EVENT_VIEW_RECEIVE_SCREEN())\n    }\n    \n    func updateViewAccountsScreen(_ notification: Notification) -> () {\n        updateUserAnalyticsWithEvent(TLNotificationEvents.EVENT_VIEW_ACCOUNTS_SCREEN())\n    }\n    \n    func updateViewManageAccountsScreen(_ notification: Notification) -> () {\n        updateUserAnalyticsWithEvent(TLNotificationEvents.EVENT_VIEW_MANAGE_ACCOUNTS_SCREEN())\n    }\n    \n    func updateViewHelpScreen(_ notification: Notification) -> () {\n        updateUserAnalyticsWithEvent(TLNotificationEvents.EVENT_VIEW_HELP_SCREEN())\n    }\n    \n    func updateViewSettingsScreen(_ notification: Notification) -> () {\n        updateUserAnalyticsWithEvent(TLNotificationEvents.EVENT_VIEW_SETTINGS_SCREEN())\n    }\n    \n    // Achievements\n    func updateSentPayment(_ notification: Notification) -> () {\n        updateUserAnalyticsWithEvent(TLNotificationEvents.EVENT_SEND_PAYMENT())\n    }\n    \n    func updateReceivePayment(_ notification: Notification) -> () {\n        updateUserAnalyticsWithEvent(TLNotificationEvents.EVENT_RECEIVE_PAYMENT())\n    }\n    \n    func updateViewHistoryScreen(_ notification: Notification) -> () {\n        updateUserAnalyticsWithEvent(TLNotificationEvents.EVENT_VIEW_HISTORY())\n    }\n    \n    func updateCreateNewAccount(_ notification: Notification) -> () {\n        updateUserAnalyticsWithEvent(TLNotificationEvents.EVENT_CREATE_NEW_ACCOUNT())\n    }\n    \n    func updateEditAccountName(_ notification: Notification) -> () {\n        updateUserAnalyticsWithEvent(TLNotificationEvents.EVENT_EDIT_ACCOUNT_NAME())\n    }\n    \n    func updateArchiveAccount(_ notification: Notification) -> () {\n        updateUserAnalyticsWithEvent(TLNotificationEvents.EVENT_ARCHIVE_ACCOUNT())\n    }\n    \n    func updateEnablePINCode(_ notification: Notification) -> () {\n        updateUserAnalyticsWithEvent(TLNotificationEvents.EVENT_ENABLE_PIN_CODE())\n    }\n    \n    func updateBackupPassphrase(_ notification: Notification) -> () {\n        updateUserAnalyticsWithEvent(TLNotificationEvents.EVENT_BACKUP_PASSPHRASE())\n    }\n    \n    func updateRestoreWallet(_ notification: Notification) -> () {\n        updateUserAnalyticsWithEvent(TLNotificationEvents.EVENT_RESTORE_WALLET())\n    }\n    \n    func updateAddToAddressBook(_ notification: Notification) -> () {\n        updateUserAnalyticsWithEvent(TLNotificationEvents.EVENT_ADD_TO_ADDRESS_BOOK())\n    }\n    \n    func updateEditEntryAddressBook(_ notification: Notification) -> () {\n        updateUserAnalyticsWithEvent(TLNotificationEvents.EVENT_EDIT_ENTRY_ADDRESS_BOOK())\n    }\n    \n    func updateDeleteEntryAddressBook(_ notification: Notification) -> () {\n        updateUserAnalyticsWithEvent(TLNotificationEvents.EVENT_DELETE_ENTRY_ADDRESS_BOOK())\n    }\n    \n    func updateSendToAddressInAddressBook(_ notification: Notification) -> () {\n        updateUserAnalyticsWithEvent(TLNotificationEvents.EVENT_SEND_TO_ADDRESS_IN_ADDRESS_BOOK())\n    }\n    \n    func updateTagTransaction(_ notification: Notification) -> () {\n        updateUserAnalyticsWithEvent(TLNotificationEvents.EVENT_TAG_TRANSACTION())\n    }\n    \n    func updateToggleAutomaticTxFee(_ notification: Notification) -> () {\n        updateUserAnalyticsWithEvent(TLNotificationEvents.EVENT_TOGGLE_AUTOMATIC_TX_FEE())\n    }\n    \n    func updateChangeAutomaticTxFee(_ notification: Notification) -> () {\n        updateUserAnalyticsWithEvent(TLNotificationEvents.EVENT_CHANGE_AUTOMATIC_TX_FEE())\n    }\n    \n    func updateViewAccountAddresses(_ notification: Notification) -> () {\n        updateUserAnalyticsWithEvent(TLNotificationEvents.EVENT_VIEW_ACCOUNT_ADDRESSES())\n    }\n    \n    func updateViewAccountAddress(_ notification: Notification) -> () {\n        updateUserAnalyticsWithEvent(TLNotificationEvents.EVENT_VIEW_ACCOUNT_ADDRESS())\n    }\n    \n    func updateViewTransactionInWeb(_ notification: Notification) -> () {\n        updateUserAnalyticsWithEvent(TLNotificationEvents.EVENT_VIEW_TRANSACTION_IN_WEB())\n    }\n    \n    func updateViewAccountAddressInWeb(_ notification: Notification) -> () {\n        updateUserAnalyticsWithEvent(TLNotificationEvents.EVENT_VIEW_ACCOUNT_ADDRESS_IN_WEB())\n    }\n    \n    func updateViewEnableAdvancedMode(_ notification: Notification) -> () {\n        updateUserAnalyticsWithEvent(TLNotificationEvents.EVENT_ENABLE_ADVANCE_MODE())\n    }\n    \n    \n    func updateImportAccount(_ notification: Notification) -> () {\n        updateUserAnalyticsWithEvent(TLNotificationEvents.EVENT_IMPORT_ACCOUNT())\n    }\n    \n    func updateImportWatchOnlyAccount(_ notification: Notification) -> () {\n        updateUserAnalyticsWithEvent(TLNotificationEvents.EVENT_IMPORT_WATCH_ONLY_ACCOUNT())\n    }\n    \n    func updateImportPrivateKey(_ notification: Notification) -> () {\n        updateUserAnalyticsWithEvent(TLNotificationEvents.EVENT_IMPORT_PRIVATE_KEY())\n    }\n    \n    func updateImportWatchOnlyAddress(_ notification: Notification) -> () {\n        updateUserAnalyticsWithEvent(TLNotificationEvents.EVENT_IMPORT_WATCH_ONLY_ADDRESS())\n    }\n    \n    func updateChangeBlockExplorerType(_ notification: Notification) -> () {\n        updateUserAnalyticsWithEvent(TLNotificationEvents.EVENT_CHANGE_BLOCKEXPLORER_TYPE())\n    }\n    \n    func updateViewExtendedPublicKey(_ notification: Notification) -> ()  {\n        updateUserAnalyticsWithEvent(TLNotificationEvents.EVENT_VIEW_EXTENDED_PUBLIC_KEY())\n    }\n    \n    func updateViewExtendedPrivateKey(_ notification: Notification) -> () {\n        updateUserAnalyticsWithEvent(TLNotificationEvents.EVENT_VIEW_EXTENDED_PRIVATE_KEY())\n    }\n    \n    func updateViewAccountsPrivateKey(_ notification: Notification) -> () {\n        updateUserAnalyticsWithEvent(TLNotificationEvents.EVENT_VIEW_ACCOUNT_PRIVATE_KEY())\n    }\n    \n    fileprivate func updateUserAnalyticsWithEvent(_ event: String) -> ()  {\n        let userAnalyticsDict = NSMutableDictionary(dictionary:TLPreferences.getAnalyticsDict() ?? NSDictionary())\n        let dict = (userAnalyticsDict.value(forKey: event) as! NSNumber? ?? 0)\n        let eventCount = dict.uintValue\n        userAnalyticsDict.setObject(eventCount + 1, forKey:event as NSCopying)\n        TLPreferences.setAnalyticsDict(userAnalyticsDict)\n    }\n}\n"
  },
  {
    "path": "ArcBit/model/TLBlockchainStatus.swift",
    "content": "//\n//  TLBlockchainStatus.swift\n//  ArcBit\n//\n//  Created by Timothy Lee on 3/14/15.\n//  Copyright (c) 2015 Timothy Lee <stequald01@gmail.com>\n//\n//   This library is free software; you can redistribute it and/or\n//   modify it under the terms of the GNU Lesser General Public\n//   License as published by the Free Software Foundation; either\n//   version 2.1 of the License, or (at your option) any later version.\n//\n//   This library is distributed in the hope that it will be useful,\n//   but WITHOUT ANY WARRANTY; without even the implied warranty of\n//   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n//   Lesser General Public License for more details.\n//\n//   You should have received a copy of the GNU Lesser General Public\n//   License along with this library; if not, write to the Free Software\n//   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,\n//   MA 02110-1301  USA\n\nimport Foundation\nimport UIKit\n\nclass TLBlockchainStatus {\n    struct STATIC_MEMBERS{\n        static var _instance:TLBlockchainStatus? = nil\n    }\n    \n    var blockHeight:UInt64 = 0\n    \n    class func instance() -> (TLBlockchainStatus) {\n        if(STATIC_MEMBERS._instance == nil) {\n            STATIC_MEMBERS._instance = TLBlockchainStatus()\n        }\n        return STATIC_MEMBERS._instance!\n    }\n}\n"
  },
  {
    "path": "ArcBit/model/TLCoin.swift",
    "content": "//\n//  TLCoin.swift\n//  ArcBit\n//\n//  Created by Timothy Lee on 3/14/15.\n//  Copyright (c) 2015 Timothy Lee <stequald01@gmail.com>\n//\n//   This library is free software; you can redistribute it and/or\n//   modify it under the terms of the GNU Lesser General Public\n//   License as published by the Free Software Foundation; either\n//   version 2.1 of the License, or (at your option) any later version.\n//\n//   This library is distributed in the hope that it will be useful,\n//   but WITHOUT ANY WARRANTY; without even the implied warranty of\n//   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n//   Lesser General Public License for more details.\n//\n//   You should have received a copy of the GNU Lesser General Public\n//   License along with this library; if not, write to the Free Software\n//   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,\n//   MA 02110-1301  USA\n\nimport Foundation\n\nenum TLBitcoinDenomination:Int {\n    case bitcoin  = 0\n    case milliBit = 1\n    case bits     = 2\n}\n\n\n@objc class TLCoin:NSObject {\n    struct STATIC_MEMBERS {\n        static let numberFormatter: NumberFormatter =  NumberFormatter()\n    }\n    \n    fileprivate var coin:BTCMutableBigNumber\n    \n    class func zero() -> (TLCoin) {\n        return TLCoin(btcNumber:BTCBigNumber.zero())\n    }\n    \n    class func one() -> (TLCoin) {\n        return TLCoin(btcNumber:BTCBigNumber.one())\n    }\n    \n    class func negativeOne() -> (TLCoin) {\n        return TLCoin(btcNumber:BTCBigNumber.negativeOne())\n    }\n    \n    init(btcNumber:BTCBigNumber) {\n        coin = btcNumber.mutableCopy()\n    }\n    \n    fileprivate func getBTCNumber() -> (BTCBigNumber) {\n        return coin\n    }\n    \n    func add(_ other:TLCoin) -> (TLCoin) {\n        let tmp = coin.mutableCopy().add(other.getBTCNumber())\n        return TLCoin(btcNumber: tmp!.copy())\n    }\n    \n    func subtract(_ other:TLCoin) -> (TLCoin) {\n        let tmp = coin.mutableCopy().subtract(other.getBTCNumber())\n        return TLCoin(btcNumber: tmp!.copy())\n    }\n    \n    fileprivate func multiply(_ other:TLCoin) -> (TLCoin) {\n        let tmp = coin.mutableCopy().multiply(other.getBTCNumber())\n        return TLCoin(btcNumber: tmp!.copy())\n    }\n    \n    fileprivate func divide(_ other:TLCoin) -> (TLCoin) {\n        let tmp = coin.mutableCopy().divide(other.getBTCNumber())\n        return TLCoin(btcNumber: tmp!.copy())\n    }\n    \n    init(uint64:UInt64) {\n        coin = BTCMutableBigNumber(uInt64: uint64)\n    }\n    \n    init(doubleValue:Double) {\n        //TODO: get rid this init method\n        let tmp = NSDecimalNumber(value: doubleValue as Double).multiplying(by: NSDecimalNumber(value: 100000000 as UInt64))\n        coin = BTCMutableBigNumber(uInt64: tmp.uint64Value)\n    }\n    \n    func toUInt64() -> (UInt64) {\n        return STATIC_MEMBERS.numberFormatter.number(from: coin.decimalString)!.uint64Value\n    }\n    \n    init(bitcoinAmount:(String), bitcoinDenomination:(TLBitcoinDenomination), locale: Locale=Locale.current) {\n        //TODO move to TLCurrencyFormat like an droid, so dont have to create formatter everytime\n        let bitcoinFormatter = NumberFormatter()\n        bitcoinFormatter.numberStyle = .decimal\n        bitcoinFormatter.maximumFractionDigits = 8\n        bitcoinFormatter.locale = locale\n        \n        let tmpString = bitcoinFormatter.number(from: bitcoinAmount)\n        if tmpString == nil {\n            coin = BTCMutableBigNumber(uInt64:0)\n            return\n        }\n\n        let satoshis:UInt64\n        let mericaFormatter = NumberFormatter()\n        mericaFormatter.maximumFractionDigits = 8\n        mericaFormatter.locale = Locale(identifier: \"en_US\")\n        let decimalAmount = NSDecimalNumber(string: mericaFormatter.string(from: bitcoinFormatter.number(from: bitcoinAmount)!))\n        if (bitcoinDenomination == TLBitcoinDenomination.bitcoin) {\n            satoshis = decimalAmount.multiplying(by: NSDecimalNumber(string: \"100000000\")).uint64Value\n        }\n        else if (bitcoinDenomination == TLBitcoinDenomination.milliBit) {\n            satoshis = (decimalAmount.multiplying(by: NSDecimalNumber(value: 100000 as UInt64))).uint64Value\n        }\n        else {\n            satoshis = (decimalAmount.multiplying(by: NSDecimalNumber(value: 100 as UInt64))).uint64Value\n        }\n        coin = BTCMutableBigNumber(uInt64:satoshis)\n    }\n    \n    func bigIntegerToBitcoinAmountString(_ bitcoinDenomination: TLBitcoinDenomination) -> (String) {\n        //TODO move to TLCurrencyFormat like an droid, so dont have to create formatter everytime\n        let bitcoinFormatter = NumberFormatter()\n        bitcoinFormatter.numberStyle = .decimal\n        \n        if (bitcoinDenomination == TLBitcoinDenomination.bitcoin) {\n            bitcoinFormatter.maximumFractionDigits = 8\n            return bitcoinFormatter.string(from: NSNumber(value: bigIntegerToBitcoin() as Double))!\n        }\n        else if (bitcoinDenomination == TLBitcoinDenomination.milliBit) {\n            bitcoinFormatter.maximumFractionDigits = 5\n            return bitcoinFormatter.string(from: NSNumber(value: bigIntegerToMilliBit() as Double))!\n        }\n        else {\n            bitcoinFormatter.maximumFractionDigits = 2\n            return bitcoinFormatter.string(from: NSNumber(value: bigIntegerToBits() as Double))!\n        }\n    }\n    \n    func toString() -> (String) {\n        return coin.decimalString != nil ? coin.decimalString : \"0\"\n    }\n    \n    fileprivate func bigIntegerToBits() -> (Double) {\n        return (NSDecimalNumber(string: coin.decimalString as String).multiplying(by: NSDecimalNumber(value: 0.01 as Double))).doubleValue\n    }\n    \n    fileprivate func bigIntegerToMilliBit() -> (Double){\n        return (NSDecimalNumber(string: coin.decimalString as String).multiplying(by: NSDecimalNumber(value: 0.00001 as Double))).doubleValue\n    }\n    \n    func bigIntegerToBitcoin() -> (Double) {\n        return (NSDecimalNumber(string: coin.decimalString as String).multiplying(by: NSDecimalNumber(value: 0.00000001 as Double))).doubleValue\n    }\n    \n    func less(_ other:TLCoin) -> (Bool) {\n        return coin.less(other.getBTCNumber())\n    }\n    \n    func lessOrEqual(_ other:TLCoin) -> (Bool) {\n        return coin.lessOrEqual(other.getBTCNumber())\n    }\n    \n    func greater(_ other:TLCoin) -> (Bool) {\n        return coin.greater(other.getBTCNumber())\n    }\n    \n    func greaterOrEqual(_ other:TLCoin) -> (Bool) {\n        return coin.greaterOrEqual(other.getBTCNumber())\n    }\n    \n    func equalTo(_ other:TLCoin) -> (Bool) {\n        return coin.greaterOrEqual(other.getBTCNumber()) && coin.lessOrEqual(other.getBTCNumber())\n    }\n}\n"
  },
  {
    "path": "ArcBit/model/TLColdWallet.swift",
    "content": "//\n//  TLColdWallet.swift\n//  ArcBit\n//\n//  Created by Timothy Lee on 3/14/15.\n//  Copyright (c) 2015 Timothy Lee <stequald01@gmail.com>\n//\n//   This library is free software; you can redistribute it and/or\n//   modify it under the terms of the GNU Lesser General Public\n//   License as published by the Free Software Foundation; either\n//   version 2.1 of the License, or (at your option) any later version.\n//\n//   This library is distributed in the hope that it will be useful,\n//   but WITHOUT ANY WARRANTY; without even the implied warranty of\n//   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n//   Lesser General Public License for more details.\n//\n//   You should have received a copy of the GNU Lesser General Public\n//   License along with this library; if not, write to the Free Software\n//   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,\n//   MA 02110-1301  USA\n\nimport Foundation\n\nclass TLColdWallet {\n    \n    enum TLColdWalletError: Error {\n        case InvalidScannedData(String)\n        case InvalidKey(String)\n        case MisMatchExtendedPublicKey(String)\n    }\n    \n    static let SPLIT_SUB_STRING_LENGTH = 100\n    static let AIR_GAP_DATA_VERSION = \"1\"\n    static let AIR_GAP_DATA_TRANSPORT_VERSION = \"1\"\n\n    struct STATIC_MEMBERS {\n        static var instance:TLSpaghettiGodSend?\n    }\n\n    class func createUnsignedTxAipGapData(_ unSignedTx: String, extendedPublicKey: String, inputScripts:NSArray, txInputsAccountHDIdxes:NSArray) -> String? {\n        let data = TLWalletUtils.hexStringToData(unSignedTx)\n        if let base64Encoded = data?.base64EncodedString(options: NSData.Base64EncodingOptions(rawValue: 0)) {\n            \n            let dataDictionaryToAirGapPass = [\n                \"v\": AIR_GAP_DATA_VERSION,\n                \"account_public_key\": extendedPublicKey,\n                \"unsigned_tx_base64\": base64Encoded,\n                \"input_scripts\": inputScripts, //inputScripts in hex\n                \"tx_inputs_account_hd_idxes\": txInputsAccountHDIdxes //[[\"idx\":123, \"is_change\":false], [\"idx\":124, \"is_change\":true]]\n            ] as [String : Any]\n            \n            return TLUtils.dictionaryToJSONString(false, dict: dataDictionaryToAirGapPass as NSDictionary)\n        }\n        return nil\n    }\n\n    class func createSerializedUnsignedTxAipGapData(_ unSignedTx: String, extendedPublicKey: String, inputScripts:NSArray, txInputsAccountHDIdxes:NSArray) -> String? {\n        let aipGapDataJSONString = TLColdWallet.createUnsignedTxAipGapData(unSignedTx, extendedPublicKey: extendedPublicKey, inputScripts: inputScripts, txInputsAccountHDIdxes: txInputsAccountHDIdxes)\n        let data = aipGapDataJSONString?.data(using: String.Encoding.utf8)\n        return data?.base64EncodedString(options: NSData.Base64EncodingOptions(rawValue: 0))\n    }\n\n    class func splitStringToArray(_ str: String) -> Array<String> {\n        var partsArray = [String]()\n        var idx = 0\n        let SPLIT_SUB_STRING_LENGTH = 100\n        let nsString = str as NSString\n        var partCount = 0\n        while true {\n            let subString:String\n            \n            \n            partCount += 1\n            if idx+SPLIT_SUB_STRING_LENGTH >= str.characters.count {\n                subString = nsString.substring(with: NSRange(location: idx, length: nsString.length-idx))\n                partsArray.append(subString+\":\"+String(partCount))\n\n                break\n            } else {\n                subString = nsString.substring(with: NSRange(location: idx, length: SPLIT_SUB_STRING_LENGTH))\n                partsArray.append(subString+\":\"+String(partCount))\n            }\n\n            idx += SPLIT_SUB_STRING_LENGTH\n        }\n        for i in stride(from: 0, to: partsArray.count, by: 1) {\n            partsArray[i] = partsArray[i]+\".\"+String(partCount)\n        }\n        return partsArray\n    }\n    \n    class func parseScannedPart(_ str: String) -> (String, Int, Int) {\n        let parts = str.components(separatedBy: \":\")\n        let data = parts[0]\n        let partCountAndTotal = parts[1]\n        let partCountAndTotalArray = partCountAndTotal.components(separatedBy: \".\")\n        let partCount = partCountAndTotalArray[0]\n        let totalParts = partCountAndTotalArray[1]\n        return (data, Int(partCount)!, Int(totalParts)!)\n    }\n\n    class func convertDataToDictionary(_ data: Data) -> [String:AnyObject]? {\n        do {\n            return try JSONSerialization.jsonObject(with: data, options: []) as? [String:AnyObject]\n        } catch let error as NSError {\n            print(error)\n        }\n        return nil\n    }\n    \n    class func createSerializedSignedTxAipGapData(_ aipGapDataBase64: String, mnemonicOrExtendedPrivateKey: String, isTestnet:Bool) throws -> String? {\n        if let signedTxHexAndTxHash = try createSignedTxAipGapData(aipGapDataBase64, mnemonicOrExtendedPrivateKey: mnemonicOrExtendedPrivateKey, isTestnet: isTestnet) {\n            DLog(\"createSerializedSignedTxAipGapData signedTxHexAndTxHash \\(signedTxHexAndTxHash)\");\n            \n            let aipGapDataJSONString = TLUtils.dictionaryToJSONString(false, dict: signedTxHexAndTxHash)\n            let data = aipGapDataJSONString.data(using: String.Encoding.utf8)\n            return data?.base64EncodedString(options: NSData.Base64EncodingOptions(rawValue: 0))\n        }\n        return nil\n    }\n\n    class func createSignedTxAipGapData(_ aipGapDataBase64: String, mnemonicOrExtendedPrivateKey: String, isTestnet:Bool) throws -> NSDictionary? {\n        let data = Data(base64Encoded: aipGapDataBase64, options: NSData.Base64DecodingOptions.ignoreUnknownCharacters)\n        if data == nil {\n            throw TLColdWalletError.InvalidScannedData(\"\")\n            return nil\n        }\n        if let result = convertDataToDictionary(data!) {\n            DLog(\"createSignedTxAipGapData:  \\(result)\")\n            let extendedPublicKey = result[\"account_public_key\"] as! String\n            \n            \n            let txInputsAccountHDIdxes = result[\"tx_inputs_account_hd_idxes\"] as! NSArray\n            \n            let accountIdx = TLHDWalletWrapper.getAccountIdxForExtendedKey(extendedPublicKey)\n            DLog(\"createSignedTxAipGapData accountIdx extendedPublicKey:  \\(accountIdx) \\(extendedPublicKey)\")\n\n            let mnemonicExtendedPrivateKey:String\n            if TLHDWalletWrapper.phraseIsValid(mnemonicOrExtendedPrivateKey) {\n                let masterHex = TLHDWalletWrapper.getMasterHex(mnemonicOrExtendedPrivateKey)\n                mnemonicExtendedPrivateKey = TLHDWalletWrapper.getExtendPrivKey(masterHex, accountIdx: UInt(accountIdx))\n                DLog(\"createSignedTxAipGapData xxxx1 : \\(mnemonicExtendedPrivateKey)\")\n            } else if TLHDWalletWrapper.isValidExtendedPrivateKey(mnemonicOrExtendedPrivateKey) {\n                mnemonicExtendedPrivateKey = mnemonicOrExtendedPrivateKey\n                DLog(\"createSignedTxAipGapData xxxx2 : \\(mnemonicExtendedPrivateKey)\")\n            } else {\n                throw TLColdWalletError.InvalidKey(\"\")\n            }\n            let mnemonicExtendedPublicKey = TLHDWalletWrapper.getExtendPubKey(mnemonicExtendedPrivateKey)\n            DLog(\"createSignedTxAipGapData xxxx3 :  \\(extendedPublicKey) \\(mnemonicExtendedPublicKey)\")\n            if extendedPublicKey != mnemonicExtendedPublicKey {\n                throw TLColdWalletError.MisMatchExtendedPublicKey(\"\")\n            }\n            \n            let privateKeysArray = NSMutableArray(capacity: txInputsAccountHDIdxes.count)\n            for _txInputsAccountHDIdx in txInputsAccountHDIdxes {\n                let txInputsAccountHDIdx = _txInputsAccountHDIdx as! NSDictionary\n                let HDIndexNumber = txInputsAccountHDIdx[\"idx\"] as! Int\n                let isChange = txInputsAccountHDIdx[\"is_change\"] as! Bool\n                let addressSequence = [isChange ? Int(TLAddressType.change.rawValue) : Int(TLAddressType.main.rawValue), HDIndexNumber]\n                let privateKey = TLHDWalletWrapper.getPrivateKey(mnemonicExtendedPrivateKey as NSString, sequence: addressSequence as NSArray, isTestnet: isTestnet)\n                privateKeysArray.add(privateKey)\n            }\n            \n            let base64UnsignedTx = result[\"unsigned_tx_base64\"] as! String\n            let txData = Data(base64Encoded: base64UnsignedTx, options: NSData.Base64DecodingOptions.ignoreUnknownCharacters)\n            //                .map({ NSString(data: $0, encoding: NSUTF8StringEncoding) })\n            DLog(\"Decoded:  \\(txData!)\")\n            \n            \n            let inputHexScriptsArray = result[\"input_scripts\"] as! NSArray\n            let inputScriptsArray = NSMutableArray(capacity: inputHexScriptsArray.count)\n            for hexScript in inputHexScriptsArray {\n                inputScriptsArray.add(TLWalletUtils.hexStringToData(hexScript as! String)!)\n            }\n\n            for _ in 0...3 {\n                let txHexAndTxHash = TLCoreBitcoinWrapper.createSignedSerializedTransactionHex(txData!, inputScripts: inputScriptsArray, privateKeys: privateKeysArray, isTestnet: isTestnet)\n                DLog(\"createSignedTxAipGapData txHexAndTxHash: \\(txHexAndTxHash.debugDescription as AnyObject)\")\n                //                break\n                if txHexAndTxHash != nil {\n                    return txHexAndTxHash!\n                }\n            }\n        }\n        return nil\n    }\n    \n    \n    class func getSignedTxData(_ aipGapDataBase64: String) -> NSDictionary? {\n        let data = Data(base64Encoded: aipGapDataBase64, options: NSData.Base64DecodingOptions.ignoreUnknownCharacters)\n        if data == nil {\n            return nil\n        }\n        if let result = convertDataToDictionary(data!) {\n            return result as NSDictionary?\n        }\n        return nil\n    }\n}\n"
  },
  {
    "path": "ArcBit/model/TLCoreBitcoinWrapper.swift",
    "content": "//\n//  TLCoreBitcoinWrapper.swift\n//  ArcBit\n//\n//  Created by Timothy Lee on 3/14/15.\n//  Copyright (c) 2015 Timothy Lee <stequald01@gmail.com>\n//\n//   This library is free software; you can redistribute it and/or\n//   modify it under the terms of the GNU Lesser General Public\n//   License as published by the Free Software Foundation; either\n//   version 2.1 of the License, or (at your option) any later version.\n//\n//   This library is distributed in the hope that it will be useful,\n//   but WITHOUT ANY WARRANTY; without even the implied warranty of\n//   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n//   Lesser General Public License for more details.\n//\n//   You should have received a copy of the GNU Lesser General Public\n//   License along with this library; if not, write to the Free Software\n//   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,\n//   MA 02110-1301  USA\n\nimport Foundation\n\nclass TLCoreBitcoinWrapper {\n    \n    // WARNING: returns compressed address only\n    class func getAddressFromOutputScript(_ scriptHex:String, isTestnet:Bool) -> (String?){\n        let scriptData = TLWalletUtils.hexStringToData(scriptHex)!\n        let script = BTCScript(data:scriptData)\n        if let address = script?.standardAddress {\n            if !isTestnet {\n                return address.string\n            } else {\n                return BTCPublicKeyAddressTestnet(data: script?.standardAddress.data)!.string\n            }\n        }\n        \n        return nil\n    }\n   \n    class func getStandardPubKeyHashScriptFromAddress(_ address:String, isTestnet:Bool) -> String {\n        let scriptData = BTCScript(address: BTCAddress(base58String: address))\n        return scriptData!.hex\n    }\n    \n    class func getAddress(_ privateKey:String, isTestnet:Bool) -> (String?){\n        if let key = BTCKey(wif: privateKey) {\n            if !isTestnet {\n                return key.address.string\n            } else {\n                return key.addressTestnet.string\n            }\n        } else {\n            return nil\n        }\n    }\n    \n    class func getAddressFromPublicKey(_ publicKey:String, isTestnet:Bool) -> (String?){\n        if !isTestnet {\n            if let key = BTCKey(publicKey: TLWalletUtils.hexStringToData(publicKey)!) {\n                return key.address.string\n            } else {\n                return nil\n            }\n        } else {\n            if let key = BTCKey(publicKey:  TLWalletUtils.hexStringToData(publicKey)!) {\n                return key.addressTestnet.string\n            } else {\n                return nil\n            }\n        }\n    }\n    \n    // WARNING: returns compressed address only\n    class func getAddressFromSecret(_ secret:String, isTestnet:Bool) -> (String?){\n        if let key = BTCKey(privateKey: BTCDataFromHex(secret)) {\n            if !isTestnet {\n                return key.compressedPublicKeyAddress.string\n            } else {\n                key.isPublicKeyCompressed = true\n                return key.addressTestnet.string\n            }\n        } else {\n            return nil\n        }\n    }\n    \n    class func privateKeyFromEncryptedPrivateKey(_ encryptedPrivateKey:String, password:String, isTestnet:Bool) -> (String?) {\n        if let key = BRKey(bip38Key:encryptedPrivateKey, andPassphrase:password, isTestnet:isTestnet) {\n            return key.privateKey\n        }\n        return nil\n    }\n    \n    // WARNING: returns compressed address only\n    class func privateKeyFromSecret(_ secret:String, isTestnet:Bool) -> (String){\n        let key = BTCKey(privateKey:BTCDataFromHex(secret))\n        key?.isPublicKeyCompressed = true\n        if !isTestnet {\n            return key!.privateKeyAddress.string\n        } else {\n            return key!.privateKeyAddressTestnet.string\n        }\n    }\n    \n    class func isAddressVersion0(_ address:String, isTestnet:Bool) -> (Bool){\n        if !isTestnet {\n            return address.hasPrefix(\"1\")\n        } else {\n            return address.hasPrefix(\"m\") || address.hasPrefix(\"n\")\n        }\n    }\n    \n    /*\n    class func getBitcoinURL(address:String, amount:TLCoin, label:String) -> (String?){\n        assert(amount.greater(TLCoin.zero()), \"BTCBitcoinURL does not allow <= 0 value\")\n        let btcAddress = BTCPublicKeyAddress.addressWithBase58String(address) as BTCAddress\n        // not useable because BTCBitcoinURL does not allow 0 amount\n        //let bitcoinURL = BTCBitcoinURL.URLWithAddress(btcAddress, amount:1, label:label)\n        let bitcoinURL = BTCBitcoinURL.URLWithAddress(btcAddress, amount:BTCSatoshi(amount.toUInt64()), label:label)\n        return bitcoinURL.absoluteString?\n    }\n    */\n    \n    class func isValidAddress(_ address:String, isTestnet:Bool) -> (Bool){\n        return address.isValidBitcoinAddress(isTestnet) || TLStealthAddress.isStealthAddress(address, isTestnet:isTestnet)\n    }\n    \n    class func isValidPrivateKey(_ privateKey:String, isTestnet:Bool) -> Bool{\n        return privateKey.isValidBitcoinPrivateKey(isTestnet)\n    }\n    \n    class func isBIP38EncryptedKey(_ privateKey:String, isTestnet:Bool) -> Bool{\n        return (privateKey as NSString).substring(with: NSMakeRange(0, 2)) == \"6P\"\n    }\n    \n    class func getSignature(_ privateKey:String, message:String) -> String {\n        let key = BTCKey(privateKey: BTCDataFromHex(privateKey))\n        let signature = key?.signature(forMessage: message)\n        assert((key?.isValidSignature(signature, forMessage: message))!, \"\")\n        return signature!.base64EncodedString(options: NSData.Base64EncodingOptions.lineLength64Characters);\n    }\n    \n    class func createSignedSerializedTransactionHex(_ hashes:NSArray, inputIndexes indexes:NSArray, inputScripts scripts:NSArray,\n                                                    outputAddresses:NSArray, outputAmounts amounts:NSArray, privateKeys:NSArray,\n                                                    outputScripts:NSArray?, isTestnet:Bool) -> NSDictionary? {\n        return createSignedSerializedTransactionHex(hashes, inputIndexes: indexes, inputScripts: scripts, outputAddresses: outputAddresses, outputAmounts: amounts, privateKeys: privateKeys, outputScripts: outputScripts, signTx: true, isTestnet: isTestnet)\n    }\n    \n    class func createSignedSerializedTransactionHex(_ hashes:NSArray, inputIndexes indexes:NSArray, inputScripts scripts:NSArray,\n                                                    outputAddresses:NSArray, outputAmounts amounts:NSArray, privateKeys:NSArray,\n                                                    outputScripts:NSArray?, signTx: Bool, isTestnet:Bool) -> NSDictionary? {\n            \n            let tx = BRTransaction(inputHashes:hashes as [AnyObject], inputIndexes:indexes as [AnyObject],inputScripts:scripts as [AnyObject],\n                outputAddresses:outputAddresses as [AnyObject], outputAmounts:amounts as [AnyObject], isTestnet:isTestnet)\n            \n            if (outputScripts != nil) {\n                for i in stride(from: 0, to: outputScripts!.count, by: 1) {\n                    let outputScript = outputScripts!.object(at: i) as! String\n                    tx?.insertOutputScript(TLWalletUtils.hexStringToData(outputScript), amount:UInt64(0), isTestnet:isTestnet)\n                }\n            }\n        \n            if !signTx {\n                let inputHexScripts = NSMutableArray(capacity: tx!.inputScripts.count)\n                for script in tx!.inputScripts {\n                    inputHexScripts.add(TLWalletUtils.dataToHexString(script as! Data))\n                }\n                return [\n                    \"inputScripts\": inputHexScripts,\n                    \"txHex\": TLWalletUtils.dataToHexString(tx!.data),\n                ]\n            }\n        \n            tx?.sign(withPrivateKeys: privateKeys as [AnyObject], isTestnet:isTestnet)\n            assert((tx?.isSigned)!, \"tx is not signed\")\n\n            let txFromHexData = BRTransaction(message: tx?.data, isTestnet: isTestnet)\n\n            var expectedOutputCount = outputAddresses.count\n            if outputScripts != nil {\n                expectedOutputCount += outputScripts!.count\n            }\n            if txFromHexData?.outputScripts.count != expectedOutputCount {\n                return nil\n            }\n\n            return [\n                \"txHex\": TLWalletUtils.dataToHexString(tx!.data),\n                \"txHash\": TLWalletUtils.reverseHexString(TLWalletUtils.dataToHexString(tx!.txHash)),\n                \"txSize\": tx!.size\n            ]\n    }\n\n    class func createSignedSerializedTransactionHex(_ unsignedTx:Data, inputScripts:NSArray, privateKeys:NSArray, isTestnet:Bool) -> NSDictionary? {\n        let tx = BRTransaction(message: unsignedTx, isTestnet: isTestnet)\n        let inputHashes = tx!.inputHashes as NSArray\n        let inputIndexes = tx!.inputIndexes as NSArray\n        let outputAmounts = tx!.outputAmounts as NSArray\n        let outputAddresses = tx!.outputAddresses as NSArray\n        let txHexAndTxHash = TLCoreBitcoinWrapper.createSignedSerializedTransactionHex(inputHashes, inputIndexes:inputIndexes, inputScripts:inputScripts,\n                                                                                       outputAddresses:outputAddresses, outputAmounts:outputAmounts, privateKeys:privateKeys,\n                                                                                       outputScripts:nil, signTx: true, isTestnet: isTestnet)\n        return txHexAndTxHash\n    }\n\n}\n"
  },
  {
    "path": "ArcBit/model/TLCrypto.swift",
    "content": "//\n//  TLCrypto.swift\n//  ArcBit\n//\n//  Created by Tim Lee on 8/10/15.\n//  Copyright (c) 2015 ArcBit. All rights reserved.\n//\n\nimport Foundation\n\nlet kRNCryptorAES256Settings:RNCryptorSettings  = RNCryptorSettings(algorithm: CCAlgorithm(kCCAlgorithmAES128), blockSize: kCCBlockSizeAES128, IVSize: kCCBlockSizeAES128,\n    options: CCOptions(kCCOptionPKCS7Padding), HMACAlgorithm: CCHmacAlgorithm(kCCHmacAlgSHA256), HMACLength: Int(CC_SHA256_DIGEST_LENGTH),\n    keySettings: RNCryptorKeyDerivationSettings(keySize: kCCKeySizeAES256, saltSize: 8, PBKDFAlgorithm: CCPBKDFAlgorithm(kCCPBKDF2), PRF: CCPseudoRandomAlgorithm(kCCPRFHmacAlgSHA1), rounds: 10000, hasV2Password: false),\n    HMACKeySettings: RNCryptorKeyDerivationSettings(keySize: kCCKeySizeAES256, saltSize: 8, PBKDFAlgorithm: CCPBKDFAlgorithm(kCCPBKDF2), PRF: CCPseudoRandomAlgorithm(kCCPRFHmacAlgSHA1), rounds: 10000, hasV2Password: false))\n\n\nclass TLCrypto {\n\n    class func getDefaultPBKDF2Iterations() -> UInt32 {\n        return 10000\n    }\n    \n    class func encrypt(_ plainText: String, password: String) -> (String) {\n        return TLCrypto.encrypt(plainText, password: password, PBKDF2Iterations: getDefaultPBKDF2Iterations())\n    }\n    \n    class func decrypt(_ cipherText: String, password: String) -> (String?) {\n        return TLCrypto.decrypt(cipherText, password: password, PBKDF2Iterations: getDefaultPBKDF2Iterations())\n    }\n    \n    class func encrypt(_ plainText: String, password: String, PBKDF2Iterations: UInt32) -> String {\n        var settings = kRNCryptorAES256Settings\n        settings.keySettings.rounds = PBKDF2Iterations\n        //DLog(\"saveWalletJson encrypt: %@\", plainText)\n        \n        let data = plainText.data(using: String.Encoding.utf8)\n        var error: NSError? = nil\n        var encryptedData: Data!\n        do {\n            encryptedData = try RNEncryptor.encryptData(data, with: settings, password: password)\n        } catch let error1 as NSError {\n            error = error1\n            encryptedData = nil\n        }\n        \n        if (error != nil) {\n            DLog(\"TLCrypto encrypt error: \\(error!.localizedDescription)\")\n            NSException(name: NSExceptionName(rawValue: \"Error\"), reason: \"Error encrypting\", userInfo: nil).raise()\n        }\n        \n        let base64EncryptedString = encryptedData.base64EncodedString(options: NSData.Base64EncodingOptions.lineLength64Characters)\n        //DLog(\"TLCrypto encrypt base64EncryptedData: %@\", base64EncryptedString)\n        return base64EncryptedString\n    }\n    \n    class func decrypt(_ cipherText: String, password: String, PBKDF2Iterations: UInt32) -> String? {\n        var settings = kRNCryptorAES256Settings\n        settings.keySettings.rounds = PBKDF2Iterations\n        \n        let encryptedData = Data(base64Encoded: cipherText, options: NSData.Base64DecodingOptions.ignoreUnknownCharacters)\n        var error: NSError? = nil\n        let decryptedData: Data!\n        do {\n            decryptedData = try RNDecryptor.decryptData(encryptedData,\n                        with: settings,\n                        password: password)\n        } catch let error1 as NSError {\n            error = error1\n            decryptedData = nil\n        }\n        \n        // Note: there will only be error if password is incorrect, if PBKDF2Iterations dont match then there will be no error, just nil decryptedData\n        if (error != nil) {\n            return nil\n        }\n        \n        let decryptedString = NSString(data: decryptedData!, encoding: String.Encoding.utf8.rawValue)\n        //DLog(\"TLCrypto decrypt decryptedString: %@\", decryptedString!)\n        return decryptedString as? String\n    }\n\n    class func SHA256HashFor(_ input: NSString) -> String {\n        let str = input.utf8String\n        \n        let result = [CUnsignedChar](repeating: 0, count: Int(CC_SHA256_DIGEST_LENGTH))\n        let resultBytes: UnsafeMutablePointer<UInt8> = UnsafeMutablePointer(mutating: result)\n        \n        CC_SHA256(str, CC_LONG(strlen(str)), resultBytes)\n        \n        let ret = NSMutableString(capacity:Int(CC_SHA256_DIGEST_LENGTH)*2)\n        for i in stride(from: 0, to: Int(CC_SHA256_DIGEST_LENGTH), by: 1) {\n            ret.appendFormat(\"%02x\",result[i])\n        }\n        return ret as String\n    }\n    \n    class func doubleSHA256HashFor(_ input: NSString) -> String {\n        let str = input.utf8String\n        let result = [CUnsignedChar](repeating: 0, count: Int(CC_SHA256_DIGEST_LENGTH))\n        let resultBytes: UnsafeMutablePointer<UInt8> = UnsafeMutablePointer(mutating: result)\n        \n        CC_SHA256(str, CC_LONG(strlen(str)), resultBytes)\n        let result2 = [CUnsignedChar](repeating: 0, count: Int(CC_SHA256_DIGEST_LENGTH))\n        let result2Bytes: UnsafeMutablePointer<UInt8> = UnsafeMutablePointer(mutating: result2)\n        \n        CC_SHA256(result, CC_LONG(CC_SHA256_DIGEST_LENGTH), result2Bytes)\n        \n        let ret = NSMutableString(capacity:Int(CC_SHA256_DIGEST_LENGTH*2))\n        for i in stride(from: 0, to: Int(CC_SHA256_DIGEST_LENGTH), by: 1) {\n            ret.appendFormat(\"%02x\",result2[i])\n        }\n        return ret as String\n    }\n}\n"
  },
  {
    "path": "ArcBit/model/TLCurrencyFormat.swift",
    "content": "//\n//  TLCurrencyFormat.swift\n//  ArcBit\n//\n//  Created by Timothy Lee on 3/14/15.\n//  Copyright (c) 2015 Timothy Lee <stequald01@gmail.com>\n//\n//   This library is free software; you can redistribute it and/or\n//   modify it under the terms of the GNU Lesser General Public\n//   License as published by the Free Software Foundation; either\n//   version 2.1 of the License, or (at your option) any later version.\n//\n//   This library is distributed in the hope that it will be useful,\n//   but WITHOUT ANY WARRANTY; without even the implied warranty of\n//   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n//   Lesser General Public License for more details.\n//\n//   You should have received a copy of the GNU Lesser General Public\n//   License along with this library; if not, write to the Free Software\n//   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,\n//   MA 02110-1301  USA\n\nimport Foundation\n\nclass TLCurrencyFormat {\n    \n    struct STATIC_MEMBERS {\n        static var _currencies: NSArray?\n        static var _currencySymbols: NSArray?\n        static var _bitcoinDisplays: NSArray?\n        static var _bitcoinDisplayWords: NSArray?\n    }\n    \n    class func bitcoinAmountStringToCoin(_ amount: String, locale: Locale=Locale.current) -> TLCoin {\n        return amountStringToCoin(amount, bitcoinDenomination: TLBitcoinDenomination.bitcoin, locale: locale)\n    }\n    \n    class func properBitcoinAmountStringToCoin(_ amount: String, locale: Locale=Locale.current) -> TLCoin {\n        return amountStringToCoin(amount, bitcoinDenomination: TLPreferences.getBitcoinDenomination(), locale: locale)\n    }\n    \n    fileprivate class func amountStringToCoin(_ amount: String, bitcoinDenomination: TLBitcoinDenomination, locale: Locale) -> TLCoin {\n        if amount.characters.count != 0 {\n            if let _ = amount.rangeOfCharacter(from: CharacterSet(charactersIn: \"0123456789.,\").inverted) {\n                return TLCoin.zero()\n            } else {\n                return TLCoin(bitcoinAmount: amount, bitcoinDenomination: bitcoinDenomination, locale: locale)\n            }\n        } else {\n            return TLCoin.zero()\n        }\n    }\n    \n    class func coinToProperBitcoinAmountString(_ amount: TLCoin, withCode: Bool = false) -> String {\n        if withCode {\n            return amount.bigIntegerToBitcoinAmountString(TLPreferences.getBitcoinDenomination()) + \" \" + TLCurrencyFormat.getBitcoinDisplay()\n        } else {\n            return amount.bigIntegerToBitcoinAmountString(TLPreferences.getBitcoinDenomination())\n        }\n    }\n    \n    class func coinToProperFiatAmountString(_ amount: TLCoin, withCode: Bool = false) -> String {\n        let currency = TLCurrencyFormat.getFiatCurrency()\n        if withCode {\n            return TLExchangeRate.instance().fiatAmountStringFromBitcoin(currency, bitcoinAmount: amount) + \" \" + TLCurrencyFormat.getFiatCurrency()\n        } else {\n            return TLExchangeRate.instance().fiatAmountStringFromBitcoin(currency, bitcoinAmount: amount)\n        }\n    }\n    \n    class func getProperAmount(_ amount: TLCoin) -> NSString {\n        var balance: NSString? = nil\n        if (TLPreferences.isDisplayLocalCurrency()) {\n            let currency = TLCurrencyFormat.getProperCurrency()\n            balance = TLExchangeRate.instance().fiatAmountStringFromBitcoin(currency, bitcoinAmount: amount) as NSString?\n        } else {\n            balance = coinToProperBitcoinAmountString(amount) as NSString?\n        }\n        \n        balance = String(format: \"%@ %@\", balance!, getProperCurrency()) as NSString?\n        \n        return balance!\n    }\n    \n    class func getCurrencySymbol() -> String {\n        return getCurrencySymbolArray().object(at: Int(TLPreferences.getCurrencyIdx()!)!) as! String\n    }\n    \n    class func getFiatCurrency() -> String {\n        return getCurrencyArray().object(at: Int(TLPreferences.getCurrencyIdx()!)!) as! String\n    }\n    \n    class func getProperCurrency() -> String {\n        if (TLPreferences.isDisplayLocalCurrency()) {\n            return getCurrencyArray().object(at: Int(TLPreferences.getCurrencyIdx()!)!) as! String\n        } else {\n            return getBitcoinDisplay()\n        }\n    }\n    \n    class func getBitcoinDisplay() -> String {\n        let bitcoinDenomination = TLPreferences.getBitcoinDenomination()\n        \n        if (bitcoinDenomination == TLBitcoinDenomination.bitcoin) {\n            return getBitcoinDisplayArray().object(at: 0) as! String\n        } else if (bitcoinDenomination == TLBitcoinDenomination.milliBit) {\n            return getBitcoinDisplayArray().object(at: 1) as! String\n        } else {\n            return getBitcoinDisplayArray().object(at: 2) as! String\n        }\n    }\n    \n    class func getBitcoinDisplayWord() -> String {\n        let bitcoinDenomination = TLPreferences.getBitcoinDenomination()\n        \n        if (bitcoinDenomination == TLBitcoinDenomination.bitcoin) {\n            return getBitcoinDisplayWordArray().object(at: 0) as! String\n        } else if (bitcoinDenomination == TLBitcoinDenomination.milliBit) {\n            return getBitcoinDisplayWordArray().object(at: 1) as! String\n        } else {\n            return getBitcoinDisplayWordArray().object(at: 2) as! String\n        }\n    }\n    \n    class func getBitcoinDisplayArray() -> NSArray {\n        if (STATIC_MEMBERS._bitcoinDisplays == nil) {\n            STATIC_MEMBERS._bitcoinDisplays = [\n                \"BTC\",\n                \"mBTC\",\n                \"uBTC\",\n            ]\n        }\n        return STATIC_MEMBERS._bitcoinDisplays!\n    }\n    \n    class func getBitcoinDisplayWordArray() -> NSArray {\n        if (STATIC_MEMBERS._bitcoinDisplayWords == nil) {\n            STATIC_MEMBERS._bitcoinDisplayWords = [\n                \"Bitcoin\",\n                \"MilliBit\",\n                \"Bits\",\n            ]\n        }\n        return STATIC_MEMBERS._bitcoinDisplayWords!\n    }\n    \n    class func getCurrencySymbolArray() -> (NSArray) {\n        if (STATIC_MEMBERS._currencySymbols == nil) {\n            STATIC_MEMBERS._currencySymbols = [\n                \"$\",\n                \"R$\",\n                \"$\",\n                \"CHF\",\n                \"$\",\n                \"¥\",\n                \"kr\",\n                \"€\",\n                \"£\",\n                \"$\",\n                \"kr\",\n                \"¥\",\n                \"₩\",\n                \"$\",\n                \"zł\",\n                \"RUB\",\n                \"kr\",\n                \"$\",\n                \"฿\",\n                \"$\",\n                \"$\",\n                \n                \"D\",\n                \"N\",\n                \"L\",\n                \"D\",\n                \"G\",\n                \"A\",\n                \"S\",\n                \"G\",\n                \"N\",\n                \"M\",\n                \"D\",\n                \"T\",\n                \"N\",\n                \"D\",\n                \"F\",\n                \"D\",\n                \"D\",\n                \"B\",\n                \"D\",\n                \"N\",\n                \"P\",\n                \"R\",\n                \"D\",\n                \"F\",\n                \"F\",\n                \"P\",\n                \"C\",\n                \"E\",\n                \"K\",\n                \"F\",\n                \"P\",\n                \"D\",\n                \"K\",\n                \"P\",\n                \"B\",\n                \"D\",\n                \"P\",\n                \"L\",\n                \"S\",\n                \"P\",\n                \"D\",\n                \"F\",\n                \"Q\",\n                \"D\",\n                \"L\",\n                \"K\",\n                \"G\",\n                \"F\",\n                \"R\",\n                \"S\",\n                \"R\",\n                \"D\",\n                \"P\",\n                \"D\",\n                \"D\",\n                \"S\",\n                \"S\",\n                \"R\",\n                \"F\",\n                \"D\",\n                \"D\",\n                \"T\",\n                \"K\",\n                \"P\",\n                \"R\",\n                \"D\",\n                \"L\",\n                \"L\",\n                \"L\",\n                \"D\",\n                \"D\",\n                \"L\",\n                \"A\",\n                \"D\",\n                \"K\",\n                \"T\",\n                \"P\",\n                \"O\",\n                \"R\",\n                \"R\",\n                \"K\",\n                \"N\",\n                \"R\",\n                \"N\",\n                \"D\",\n                \"N\",\n                \"O\",\n                \"K\",\n                \"R\",\n                \"R\",\n                \"B\",\n                \"N\",\n                \"K\",\n                \"P\",\n                \"R\",\n                \"G\",\n                \"R\",\n                \"N\",\n                \"D\",\n                \"F\",\n                \"R\",\n                \"D\",\n                \"R\",\n                \"G\",\n                \"P\",\n                \"L\",\n                \"S\",\n                \"D\",\n                \"D\",\n                \"C\",\n                \"P\",\n                \"L\",\n                \"S\",\n                \"T\",\n                \"D\",\n                \"P\",\n                \"Y\",\n                \"D\",\n                \"S\",\n                \"H\",\n                \"X\",\n                \"U\",\n                \"S\",\n                \"F\",\n                \"D\",\n                \"V\",\n                \"T\",\n                \"F\",\n                \"G\",\n                \"U\",\n                \"D\",\n                \"F\",\n                \"F\",\n                \"R\",\n                \"R\",\n                \"W\",\n                \"L\"]\n        }\n        return STATIC_MEMBERS._currencySymbols!\n    }\n    \n    class func getCurrencyArray() -> NSArray {\n        if (STATIC_MEMBERS._currencies == nil) {\n            STATIC_MEMBERS._currencies = [\n                \n                \"AUD\",\n                \"BRL\",\n                \"CAD\",\n                \"CHF\",\n                \"CLP\",\n                \"CNY\",\n                \"DKK\",\n                \"EUR\",\n                \"GBP\",\n                \"HKD\",\n                \"ISK\",\n                \"JPY\",\n                \"KRW\",\n                \"NZD\",\n                \"PLN\",\n                \"RUB\",\n                \"SEK\",\n                \"SGD\",\n                \"THB\",\n                \"TWD\",\n                \"USD\",\n                \n                \"AED\",\n                \"AFN\",\n                \"ALL\",\n                \"AMD\",\n                \"ANG\",\n                \"AOA\",\n                \"ARS\",\n                \"AWG\",\n                \"AZN\",\n                \"BAM\",\n                \"BBD\",\n                \"BDT\",\n                \"BGN\",\n                \"BHD\",\n                \"BIF\",\n                \"BMD\",\n                \"BND\",\n                \"BOB\",\n                \"BSD\",\n                \"BTN\",\n                \"BWP\",\n                \"BYR\",\n                \"BZD\",\n                \"CDF\",\n                \"CLF\",\n                \"COP\",\n                \"CRC\",\n                \"CVE\",\n                \"CZK\",\n                \"DJF\",\n                \"DOP\",\n                \"DZD\",\n                \"EEK\",\n                \"EGP\",\n                \"ETB\",\n                \"FJD\",\n                \"FKP\",\n                \"GEL\",\n                \"GHS\",\n                \"GIP\",\n                \"GMD\",\n                \"GNF\",\n                \"GTQ\",\n                \"GYD\",\n                \"HNL\",\n                \"HRK\",\n                \"HTG\",\n                \"HUF\",\n                \"IDR\",\n                \"ILS\",\n                \"INR\",\n                \"IQD\",\n                \"JEP\",\n                \"JMD\",\n                \"JOD\",\n                \"KES\",\n                \"KGS\",\n                \"KHR\",\n                \"KMF\",\n                \"KWD\",\n                \"KYD\",\n                \"KZT\",\n                \"LAK\",\n                \"LBP\",\n                \"LKR\",\n                \"LRD\",\n                \"LSL\",\n                \"LTL\",\n                \"LVL\",\n                \"LYD\",\n                \"MAD\",\n                \"MDL\",\n                \"MGA\",\n                \"MKD\",\n                \"MMK\",\n                \"MNT\",\n                \"MOP\",\n                \"MRO\",\n                \"MUR\",\n                \"MVR\",\n                \"MWK\",\n                \"MXN\",\n                \"MYR\",\n                \"MZN\",\n                \"NAD\",\n                \"NGN\",\n                \"NIO\",\n                \"NOK\",\n                \"NPR\",\n                \"OMR\",\n                \"PAB\",\n                \"PEN\",\n                \"PGK\",\n                \"PHP\",\n                \"PKR\",\n                \"PYG\",\n                \"QAR\",\n                \"RON\",\n                \"RSD\",\n                \"RWF\",\n                \"SAR\",\n                \"SBD\",\n                \"SCR\",\n                \"SDG\",\n                \"SHP\",\n                \"SLL\",\n                \"SOS\",\n                \"SRD\",\n                \"STD\",\n                \"SVC\",\n                \"SYP\",\n                \"SZL\",\n                \"TJS\",\n                \"TMT\",\n                \"TND\",\n                \"TOP\",\n                \"TRY\",\n                \"TTD\",\n                \"TZS\",\n                \"UAH\",\n                \"UGX\",\n                \"UYU\",\n                \"UZS\",\n                \"VEF\",\n                \"VND\",\n                \"VUV\",\n                \"WST\",\n                \"XAF\",\n                \"XAG\",\n                \"XAU\",\n                \"XCD\",\n                \"XOF\",\n                \"XPF\",\n                \"YER\",\n                \"ZAR\",\n                \"ZMW\",\n                \"ZWL\"]\n        }\n        return STATIC_MEMBERS._currencies!\n    }\n}\n"
  },
  {
    "path": "ArcBit/model/TLDisplayStrings.swift",
    "content": "//\n//  TLDisplayStrings.swift\n//  ArcBit\n//\n//  Created by Timothy Lee on 3/14/15.\n//  Copyright (c) 2015 Timothy Lee <stequald01@gmail.com>\n//\n//   This library is free software; you can redistribute it and/or\n//   modify it under the terms of the GNU Lesser General Public\n//   License as published by the Free Software Foundation; either\n//   version 2.1 of the License, or (at your option) any later version.\n//\n//   This library is distributed in the hope that it will be useful,\n//   but WITHOUT ANY WARRANTY; without even the implied warranty of\n//   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n//   Lesser General Public License for more details.\n//\n//   You should have received a copy of the GNU Lesser General Public\n//   License along with this library; if not, write to the Free Software\n//   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,\n//   MA 02110-1301  USA\n\nimport Foundation\n\n\nclass TLDisplayStrings {\n    class func DISMISS_STRING() -> String { return \"\".localized }\n    class func X_NOT_ALLOWED_TO_ACCESS_THE_CAMERA_STRING() -> String { return \"%@ is not allowed to access the camera\".localized }\n    class func X_SERVERS_NOT_REACHABLE_STRING() -> String { return \"%@ servers not reachable.\".localized }\n    class func X_SLASH_Y_PARTS_SCANNED_STRING() -> String { return \"%d/%d parts scanned.\".localized }\n    class func ONE_CONFIRMATION_STRING() -> String { return \"1 Confirmation\".localized }\n    class func X_CONFIRMATIONS_STRING() -> String { return \"%llu confirmations\".localized }\n    class func IMPORTING_A_WATCH_ONLY_ADDRESS_DESC_STRING() -> String { return \"A bitcoin address typically begins with a '1' or '3'. You can see the transactions and track the balance of an address, but you cannot spend from an imported address.\\nYou can temporarily import this watch addresses private key to spend its bitcoins. Simply go the Send screen and select a watch address to spend from and you will be prompted to temporarily import your addresses' private key when you click 'Review Payment' in the Send screen. The private key will stay in memory until the app exits or until you remove it manually in the Accounts screen.\".localized }\n    class func WHAT_IS_A_BITCOIN_WALLET_DESC_STRING() -> String { return \"A bitcoin wallet is a software application that allows people to send, receive and manage their bitcoins.\\nBe aware of how other bitcoin applications store your bitcoins' private keys, which are needed to spend your bitcoins.\\nThere are generally three different ways applications can your store your bitcoins.\\n1.\\nThe banking model, where your bitcoin private keys are held for you by someone else.\\n2.\\nThe security box model, where your bitcoin private keys are stored encrypted on someone else’s servers.\\n3.\\nThe wallet model, where your bitcoin private keys are stored only on your device.\".localized }\n    class func IMPORTING_A_PRIVATE_KEY_DESC_STRING() -> String { return \"A private key begins with an 'L', 'K', or '5'.\\nBIP 38 encrypted private keys can also be imported. They can either be imported encrypted or unencrypted. If you choose to import it encrypted, you will need to input the password each time you spend from your encrypted private key.\".localized }\n    class func ACCOUNT_X_IMPORTED_STRING() -> String { return \"Account %@ imported\".localized }\n    class func ACCOUNT_X_STRING() -> String { return \"Account %lu\".localized }\n    class func ACCOUNT_1_STRING() -> String { return \"Account 1\".localized }\n    class func ACCOUNT_ACTIONS_STRING() -> String { return \"Actions\".localized }\n    class func ACCOUNT_ID_COLON_X_STRING() -> String { return \"Account ID: %u\".localized }\n    class func ACCOUNT_PRIVATE_KEY_STRING() -> String { return \"Account Private Key\".localized }\n    class func ACCOUNT_PUBLIC_KEY_STRING() -> String { return \"Account Public Key\".localized }\n    class func ACCOUNT_NAME_STRING() -> String { return \"Name\".localized }\n    class func ACCOUNT_PRIVATE_KEY_DOES_NOT_MATCH_STRING() -> String { return \"Account private key does not match imported account public key\".localized }\n    class func ACCOUNT_PRIVATE_KEY_MISSING_STRING() -> String { return \"Account private key missing\".localized }\n    class func ACCOUNTS_STRING() -> String { return \"Accounts\".localized }\n    class func ACHIEVEMENT_LIST_STRING() -> String { return \"Achievement List\".localized }\n    class func ACHIEVEMENTS_STRING() -> String { return \"Achievements\".localized }\n    class func ACTIVE_CHANGE_ADDRESSES_STRING() -> String { return \"Active Change Addresses\".localized }\n    class func ACTIVE_MAIN_ADDRESSES_STRING() -> String { return \"Active Main Addresses\".localized }\n    class func ADD_CONTACTS_ENTRY_STRING() -> String { return \"Add Contacts Entry\".localized }\n    class func ADDRESS_STRING() -> String { return \"Address\".localized }\n    class func IMPORTED_ADDRESS_STRING() -> String { return \"Imported Address\".localized }\n    class func ADDRESS_ID_STRING() -> String { return \"Address ID \".localized }\n    class func ADDRESS_ID_X_STRING_STRING() -> String { return \"Address ID: %lu\".localized }\n    class func ADDRESSES_STRING() -> String { return \"Addresses\".localized }\n    class func ADVANCE_ACHIEVEMENT_LIST_STRING() -> String { return \"Advanced Achievement List\".localized }\n    class func ADVANCE_FAQ_STRING() -> String { return \"Advanced FAQ\".localized }\n    class func ADVANCE_HOW_TO_COLON_STRING_STRING() -> String { return \"Advanced how To:\".localized }\n    class func WHAT_ARE_TRANSACTION_CONFIRMATIONS_DESC_STRING() -> String { return \"After a transaction is broadcast to the Bitcoin network, it may be included in a block that is published to the network. When that happens, it is said that the transaction has been mined at a depth of 1 block. With each subsequent block that is found, the number of blocks deep is increased by one. To be secure against double spending, a transaction should not be considered as confirmed until it is a certain number of blocks deep.\\nA good rule of thumb is that 1 confirmation is good for small value amounts of bitcoins and a user should wait for more confirmations for larger value amounts.\\nArcBit will display the confirmation number up until the 6th confirmation.\".localized }\n    class func INVALID_AMOUNT_STRING() -> String { return \"Invalid amount\".localized }\n    class func WHAT_ARE_ACCOUNTS_DESC_STRING() -> String { return \"An account is a collection of bitcoin addresses. With accounts, you will no longer have to manage bitcoin addresses directly anymore. Since address reuse results in a loss of privacy for people using Bitcoin, ArcBit’s HD wallet account system will automatically handle the cycling of bitcoin addresses for you. This ensures you don’t use the same bitcoin address more then once.\\nEach account also has a reusable address. You can find it in your Receive screen. Swipe all the way to right on the QRCode in your Receive screen and you will find a reusable address.\\nYou can create an unlimited amount of accounts with ArcBit. See the help section on how to create a new account in ArcBit.\".localized }\n    class func IMPORTING_AN_ACCOUNT_DESC_STRING() -> String { return \"An account private key begins with the letters 'xprv'. You can see, spend and recover the transactions and bitcoins of an entire account from an account private key.\".localized }\n    class func IMPORTING_A_WATCH_ONLY_ACCOUNT_DESC_STRING() -> String { return \"An account public key begins with the letters 'xpub'. You can see the transactions and bitcoins of an entire account from an account private key, with the exception of reusable address payments. Future releases will address this issue.\\nYou can temporarily import the corresponding account private key for this accounts' account public key to spend your watch accounts' bitcoins. Simply go to the Send screen and select a watch account to spend from and you will be prompted to temporarily import your account's private key when you click 'Review Payment' on the Send screen. The private key will stay in memory until the app exits or until you remove it manually on the Accounts screen.\".localized }\n    class func ARCBIT_BRAIN_WALLET_STRING() -> String { return \"ArcBit Brain Wallet\".localized }\n    class func ARCBIT_WEB_WALLET_STRING() -> String { return \"ArcBit Web Wallet\".localized }\n    class func HOW_DOES_ARCBIT_WALLET_WORK_DESC_STRING() -> String { return \"ArcBit uses the the bitcoin wallet model (See the section ’What is a bitcoin wallet?’ to understand the 3 different security models of bitcoin software). However, if you use iCloud to backup your wallet, you will be using the security box model. It is recommended that you do not use iCloud and be responsible for your bitcoins yourself. For those who don’t want to remember a simple backup passphrase, iCloud backup is a good alternative.\".localized }\n    class func ARCHIVE_ACCOUNT_STRING() -> String { return \"Archive Account\".localized }\n    class func ARCHIVE_ADDRESS_STRING() -> String { return \"Archive address\".localized }\n    class func ARCHIVED_ACCOUNTS_STRING() -> String { return \"Archived Accounts\".localized }\n    class func ARCHIVED_CHANGE_ADDRESSES_STRING() -> String { return \"Archived Change Addresses\".localized }\n    class func ARCHIVED_COLD_WALLET_ACCOUNTS_STRING() -> String { return \"Archived Cold Wallet Accounts\".localized }\n    class func ARCHIVED_IMPORTED_ACCOUNTS_STRING() -> String { return \"Archived Imported Accounts\".localized }\n    class func ARCHIVED_IMPORTED_ADDRESSES_STRING() -> String { return \"Archived Imported Addresses\".localized }\n    class func ARCHIVED_IMPORTED_WATCH_ACCOUNTS_STRING() -> String { return \"Archived Imported Watch Accounts\".localized }\n    class func ARCHIVED_IMPORTED_WATCH_ADDRESSES_STRING() -> String { return \"Archived Imported Watch Addresses\".localized }\n    class func ARCHIVED_MAIN_ADDRESSES_STRING() -> String { return \"Archived Main Addresses\".localized }\n    class func ARE_YOU_SURE_YOU_WANT_TO_ARCHIVE_ACCOUNT_X_STRING() -> String { return \"Are you sure you want to archive account %@?\".localized }\n    class func ARE_YOU_SURE_YOU_WANT_TO_ARCHIVE_ADDRESS_X_STRING() -> String { return \"Are you sure you want to archive address %@?\".localized }\n    class func ARE_YOU_SURE_YOU_WANT_TO_DELETE_THIS_ACCOUNT_STRING() -> String { return \"Are you sure you want to delete this account?\".localized }\n    class func ARE_YOU_SURE_YOU_WANT_TO_UNARCHIVE_ACCOUNT_X_STRING() -> String { return \"Are you sure you want to unarchive account %@\".localized }\n    class func ARE_YOU_SURE_YOU_WANT_TO_UNARCHIVE_ADDRESS_X_STRING() -> String { return \"Are you sure you want to unarchive address %@?\".localized }\n    class func AUTHORIZE_COLD_WALLET_ACCOUNT_PAYMENT_STRING() -> String { return \"Authorize Cold Wallet Account Payment\".localized }\n    class func AUTHORIZE_PAYMENT_STRING() -> String { return \"Authorize Payment\".localized }\n    class func BACK_UP_PASSPHRASE_STRING() -> String { return \"Backup Passphrase\".localized }\n    class func BACK_UP_WALLET_STRING() -> String { return \"Backup wallet\".localized }\n    class func BACKUP_LOCAL_WALLET_STRING() -> String { return \"Backup local wallet\".localized }\n    class func BACKUP_PASSPHRASE_FOUND_IN_KEYCHAIN_STRING() -> String { return \"Backup passphrase found in keychain\".localized }\n    class func WHAT_ARE_THE_BENEFITS_AND_ADVANTAGES_OF_BITCOIN_DESC_STRING() -> String { return \"Bitcoin cuts out the middleman and allows you to send money anywhere in the world with an internet connection with minimum to zero fees.\".localized }\n    class func WHAT_IS_BITCOIN_DESC_STRING() -> String { return \"Bitcoin, uppercase 'B', is an online payment system invented in 2008 and released as open-source software in 2009 by a programmer named Satoshi Nakamoto. The system is decentralized and peer-to-peer allowing users to transact directly without needing an intermediary.\\nBitcoin is also a platform of which other decentralized applications can be built upon. Bitcoin, lowercase 'b' is the currency unit that Bitcoin uses.\".localized }\n    class func HOW_DO_I_GET_BITCOINS_DESC_STRING() -> String { return \"Bitcoins can be purchased from various bitcoin exchanges. ArcBit is not a bitcoin exchange. ArcBit is a bitcoin wallet. After you purchase some bitcoins from an exchange, you can move it to a bitcoin wallet.\".localized }\n    class func CANCEL_STRING() -> String { return \"Cancel\".localized }\n    class func CANNOT_ARCHIVE_YOUR_DEFAULT_ACCOUNT_STRING() -> String { return \"Cannot archive your default account\".localized }\n    class func CANNOT_ARCHIVE_YOUR_ONE_AND_ONLY_ACCOUNT_STRING() -> String { return \"Cannot archive your one and only account\".localized }\n    class func CANNOT_CREATE_TRANSACTIONS_WITH_OUTPUTS_LESS_THEN_X_BITCOINS_STRING() -> String { return \"Cannot create transactions with outputs less then %@\".localized }\n    class func CANNOT_DECRYPT_ICLOUD_BACKUP_WALLET_STRING() -> String { return \"Cannot decrypt iCloud backup wallet.\".localized }\n    class func CANNOT_IMPORT_REUSABLE_ADDRESS_STRING() -> String { return \"Cannot import reusable address\".localized }\n    class func CHANGE_ADDRESS_ID_STRING() -> String { return \"Change Address ID \".localized }\n    class func CHANGE_AUTOMATIC_TRANSACTION_FEE_STRING() -> String { return \"Change Automatic Transaction Fee\".localized }\n    class func CHANGE_BLOCKEXPLORER_TYPE_STRING() -> String { return \"Change Blockexplorer Type\".localized }\n    class func CHECK_OUT_THE_ARCBIT_BRAIN_WALLET_STRING() -> String { return \"Check out the ArcBit Brain Wallet\".localized }\n    class func CHECK_OUT_THE_ARCBIT_WEB_WALLET_STRING() -> String { return \"Check out the ArcBit Web Wallet\".localized }\n    class func CHECK_OUT_THE_ARCBIT_WEB_WALLET_EXCLAMATION_STRING() -> String { return \"Check out the ArcBit Web Wallet!\".localized }\n    class func CHECKING_TRANSACTION_STRING() -> String { return \"Checking Transaction\".localized }\n    class func CLEAR_ACCOUNT_PRIVATE_KEY_FROM_MEMORY_STRING() -> String { return \"Clear account private key from memory\".localized }\n    class func CLEAR_PRIVATE_KEY_FROM_MEMORY_STRING() -> String { return \"Clear private key from memory\".localized }\n    class func CLICK_AN_ADDRESS_STRING() -> String { return \"Click an address\".localized }\n    class func CLICK_THE_BUTTON_WITH_THE_ARROW_STRING() -> String { return \"Click the button with the arrow\".localized }\n    class func CLICK_THE_PLUS_BUTTON_AT_THE_TOP_RIGHT_STRING() -> String { return \"Click the plus button at the top right\".localized }\n    class func CLICK_THE_CONTACTS_BUTTON_STRING() -> String { return \"Click the ‘Contacts’ button\".localized }\n    class func CLICK_ACCOUNTS_STRING() -> String { return \"Click ‘Accounts’\".localized }\n    class func CLICK_ADVANCED_SETTINGS_STRING() -> String { return \"Click ‘Advanced settings’\".localized }\n    class func CLICK_ARCHIVE_ACCOUNT_STRING() -> String { return \"Click ‘Archive Account’\".localized }\n    class func CLICK_CREATE_NEW_ACCOUNT_STRING() -> String { return \"Click ‘Create New Account’\".localized }\n    class func CLICK_DELETE_STRING() -> String { return \"Click ‘Delete’\".localized }\n    class func CLICK_DONE_STRING() -> String { return \"Click ‘Done’\".localized }\n    class func CLICK_EDIT_ACCOUNT_NAME_STRING() -> String { return \"Click ‘Edit Account Name’\".localized }\n    class func CLICK_EDIT_STRING() -> String { return \"Click ‘Edit’\".localized }\n    class func CLICK_ENABLE_PIN_CODE_STRING() -> String { return \"Click ‘Enable PIN Code’\".localized }\n    class func CLICK_HISTORY_STRING() -> String { return \"Click ‘History’\".localized }\n    class func CLICK_IMPORT_ACCOUNT_STRING() -> String { return \"Click ‘Import Account’\".localized }\n    class func CLICK_IMPORT_PRIVATE_KEY_STRING() -> String { return \"Click ‘Import Private Key’\".localized }\n    class func CLICK_IMPORT_WATCH_ACCOUNT_STRING() -> String { return \"Click ‘Import Watch Only Account’\".localized }\n    class func CLICK_IMPORT_WATCH_ADDRESS_STRING() -> String { return \"Click ‘Import Watch Only Address’\".localized }\n    class func CLICK_LABEL_TRANSACTION_STRING() -> String { return \"Click ‘Label transaction’\".localized }\n    class func CLICK_RESTORE_WALLET_STRING() -> String { return \"Click ‘Restore Wallet’\".localized }\n    class func CLICK_RESTORE_STRING() -> String { return \"Click ‘Restore’\".localized }\n    class func CLICK_REVIEW_PAYMENT_STRING() -> String { return \"Click ‘Review Payment’\".localized }\n    class func CLICK_SEND_STRING() -> String { return \"Click ‘Send’\".localized }\n    class func CLICK_SET_TRANSACTION_FEE_STRING() -> String { return \"Click ‘Set Transaction Fee’\".localized }\n    class func CLICK_SETTINGS_STRING() -> String { return \"Click ‘Settings’\".localized }\n    class func CLICK_SHOW_BACKUP_PASSPHRASE_STRING() -> String { return \"Click ‘Show Backup Passphrase’\".localized }\n    class func CLICK_VIEW_ADDRESSES_STRING() -> String { return \"Click ‘View Addresses’\".localized }\n    class func CLICK_VIEW_ACCOUNT_PRIVATE_KEY_QR_CODE_STRING() -> String { return \"Click ‘View account private key QR code’\".localized }\n    class func CLICK_VIEW_ACCOUNT_PUBLIC_KEY_QR_CODE_STRING() -> String { return \"Click ‘View account public key QR code’\".localized }\n    class func CLICK_VIEW_ADDRESS_QR_CODE_STRING() -> String { return \"Click ‘View address QR code’\".localized }\n    class func CLICK_VIEW_IN_WEB_STRING() -> String { return \"Click ‘View in web’\".localized }\n    class func CLICK_VIEW_PRIVATE_KEY_QR_CODE_STRING() -> String { return \"Click ‘View private key QR code’\".localized }\n    class func CLICK_BLOCKEXPLORER_API_TYPE_STRING() -> String { return \"Click ‘blockexplorer API type’\".localized }\n    class func CLICK_RECEIVE_STRING() -> String { return \"Click ’Receive’\".localized }\n    class func CLOSE_STRING() -> String { return \"Close\".localized }\n    class func COLD_WALLET_STRING() -> String { return \"Cold Wallet\".localized }\n    class func COLD_WALLET_ACCOUNTS_STRING() -> String { return \"Cold Wallet Accounts\".localized }\n    class func IMPORTED_COLD_WALLET_ACCOUNTS_REUSABLE_ADDRESS_INFO_DESC_STRING() -> String { return \"Cold Wallet Accounts can't see reusable address payments, thus this accounts' reusable address is not available.\".localized }\n    class func COLD_WALLET_OVERVIEW_STRING() -> String { return \"Cold Wallet Overview\".localized }\n    class func COLD_WALLET_PRIVATE_KEYS_ARE_NOT_STORED_HERE_STRING() -> String { return \"Cold wallet private keys are not stored here and cannot be viewed\".localized }\n    class func COMPLETE_STRING() -> String { return \"Complete\".localized }\n    class func COMPLETE_STEP_1_STRING() -> String { return \"Complete step 1\".localized }\n    class func CONFIRM_PIN_CODE_STRING() -> String { return \"Confirm Pin Code\".localized }\n    class func CONTINUE_STRING() -> String { return \"Continue\".localized }\n    class func COPIED_TO_CLIPBOARD_STRING() -> String { return \"Copied To clipboard\".localized }\n    class func COPY_TO_CLIPBOARD_STRING() -> String { return \"Copy\".localized }\n    class func COPY_TRANSACTION_ID_TO_CLIPBOARD_STRING() -> String { return \"Copy Transaction ID to Clipboard\".localized }\n    class func CREATE_COLD_WALLET_STRING() -> String { return \"Create Cold Wallet\".localized }\n    class func CREATE_NEW_ACCOUNT_STRING() -> String { return \"Create New Account\".localized }\n    class func CREATE_NEW_CONTACT_STRING() -> String { return \"Create new contact\".localized }\n    class func DECRYPTING_PRIVATE_KEY_STRING() -> String { return \"Decrypting\".localized }\n    class func DELETE_STRING() -> String { return \"Delete\".localized }\n    class func DELETE_X_STRING() -> String { return \"Delete %@\".localized }\n    class func DELETE_ACCOUNT_STRING() -> String { return \"Delete Account\".localized }\n    class func DELETE_CONTACTS_ENTRY_STRING() -> String { return \"Delete Contact\".localized }\n    class func DELETE_ADDRESS_STRING() -> String { return \"Delete address\".localized }\n    class func DONT_MANAGE_INDIVIDUAL_ACCOUNT_ADDRESS_WARNING_DESC_STRING() -> String { return \"Do not use the QR code from here to receive bitcoins. Go to the Receive screen to get a QR code to receive bitcoins.\".localized }\n    class func ICLOUD_BACKUP_NOT_FOUND_DESC_STRING() -> String { return \"Do you want to load and backup your current local wallet file?\".localized }\n    class func DO_YOU_WANT_TO_LOAD_LOCAL_WALLET_FILE_STRING() -> String { return \"Do you want to load local wallet file?\".localized }\n    class func BACKUP_PASSPHRASE_FOUND_IN_KEYCHAIN_DESC_STRING() -> String { return \"Do you want to restore from your backup passphrase or start a new wallet?\".localized }\n    class func ASK_TEMPORARY_IMPORT_ACCOUNT_PRIVATE_KEY_STRING() -> String { return \"Do you want to temporary import your account private key?\".localized }\n    class func DO_YOU_WANT_TO_TEMPORARY_IMPORT_YOUR_PRIVATE_KEY_STRING() -> String { return \"Do you want to temporary import your private key?\".localized }\n    class func DONT_REMIND_ME_STRING() -> String { return \"Don't remind me\".localized }\n    class func DONE_STRING() -> String { return \"Done\".localized }\n    class func WHAT_ARE_ACCOUNT_EXTENDED_KEYS_DESC_STRING() -> String { return \"Each account has a public and private account key. Account keys should be kept secret as they are used to view the account's transactions and spend the account's bitcoins.\".localized }\n    class func EDIT_STRING() -> String { return \"Edit\".localized }\n    class func EDIT_ACCOUNT_NAME_STRING() -> String { return \"Edit Account Name\".localized }\n    class func EDIT_CONTACTS_ENTRY_STRING() -> String { return \"Edit Contact Name\".localized }\n    class func EDIT_LABEL_STRING() -> String { return \"Edit Label\".localized }\n    class func EDIT_TRANSACTION_LABEL_STRING() -> String { return \"Edit Transaction label\".localized }\n    class func EMAIL_SUPPORT_STRING() -> String { return \"Email Support\".localized }\n    class func ENABLE_PIN_CODE_TO_BETTER_SECURE_WALLET_STRING() -> String { return \"Enable PIN code in settings to better secure your wallet.\".localized }\n    class func ENABLE_PIN_CODE_STRING() -> String { return \"Enable Pin Code\".localized }\n    class func ENABLE_TRANSACTION_FEE_STRING() -> String { return \"Enable Transaction Fee\".localized }\n    class func ENABLE_ADVANCED_MODE_STRING() -> String { return \"Enable advanced mode\".localized }\n    class func ENCOUNTERED_ERROR_CREATING_TRANSACTION_TRY_AGAIN_STRING() -> String { return \"Encountered error creating transaction. Please try again.\".localized }\n    class func ENCRYPTED_STRING() -> String { return \"Encrypted\".localized }\n    class func ENTER_LABEL_STRING() -> String { return \"Enter Label\".localized }\n    class func ENTER_PIN_CODE_STRING() -> String { return \"Enter PIN\".localized }\n    class func ENTER_BACKUP_PASSPHRASE_STRING() -> String { return \"Enter backup passphrase\".localized }\n    class func ENTER_PASSPHRASE_FOR_ICLOUD_BACKUP_WALLET_STRING() -> String { return \"Enter passphrase for your iCloud backup wallet.\".localized }\n    class func ENTER_PASSWORD_FOR_ENCRYPTED_PRIVATE_KEY_STRING() -> String { return \"Enter password for encrypted private key\".localized }\n    class func ERROR_STRING() -> String { return \"Error\".localized }\n    class func ERROR_FETCHING_TRANSACTION_STRING() -> String { return \"Error fetching Transaction.\".localized }\n    class func ERROR_FETCHING_UNSPENT_OUTPUTS_TRY_AGAIN_LATER_STRING() -> String { return \"Error fetching unspent outputs. Try again later.\".localized }\n    class func ERROR_FETCHING_UNSPENT_OUTPUTS_TRY_AGAIN_STRING() -> String { return \"Error fetching unspent outputs. Try again.\".localized }\n    class func ERROR_GETTING_BLOCK_HEIGHT_STRING() -> String { return \"Error getting block height.\".localized }\n    class func ERROR_IMPORTING_ACCOUNT_STRING() -> String { return \"Error importing account\".localized }\n    class func ERROR_LOADING_WALLET_JSON_FILE_STRING() -> String { return \"Error loading wallet JSON file\".localized }\n    class func EXPLANATION_STRING() -> String { return \"Explanation\".localized }\n    class func FAQ_STRING() -> String { return \"FAQ\".localized }\n    class func FILL_ADDRESS_FIELD_STRING() -> String { return \"Fill address field\".localized }\n    class func FINISHED_PASSING_TRANSACTION_DATA_STRING() -> String { return \"Finished Passing Transaction Data\".localized }\n    class func MNEMONIC_INFO_STRING() -> String { return \"First make sure you are using your secondary offline device for this screen (as mentioned in the overview on the previous screen). Click 'New Wallet' and write down or memorize the generated 12 word passphrase. This passphrase can recover and generate all your accounts and the bitcoins associated with it, so keep it safe and to yourself. Also instead of creating a new wallet, you can also input an existing 12 word passphrase that was generated here to create additional accounts.\".localized }\n    class func ACCOUNT_ID_INFO_STRING() -> String { return \"Enter an account ID and click 'QR Code'. Then on your primary online device, enable Cold Wallet in settings. Then go to the Accounts screen and click 'Import Cold Wallet Account' and scan the Account Public Key QR Code. Afterwards use this cold wallet account as you would a normal account and deposit bitcoins into it. When you want to make a payment from a cold wallet account, go to the next section on the previous screen and follow the step by step instructions there.\".localized }\n    class func FOLLOW_US_ON_TWITTER_STRING() -> String { return \"Follow us on Twitter\".localized }\n    class func FUNDS_HAVE_BEEN_CLAIMED_ALREADY_STRING() -> String { return \"Funds have been claimed already.\".localized }\n    class func GO_STRING() -> String { return \"Go\".localized }\n    class func GO_TO_THE_SIDE_MENU_STRING() -> String { return \"Go to the side menu\".localized }\n    class func HAVE_SENDER_SCAN_QR_CODE_STRING() -> String { return \"Have sender scan QR code\".localized }\n    class func HAVE_SENDER_SEND_YOU_PAYMENT_STRING() -> String { return \"Have sender send you payment\".localized }\n    class func HELP_STRING() -> String { return \"Help\".localized }\n    class func WHAT_MAKES_ARCBIT_DIFFERENT_FROM_OTHER_BITCOIN_WALLETS_DESC_STRING() -> String { return \"Here are some features that no other mobile bitcoin wallet supports.\\n- Reusable address support\\n- Ability to import individual account (extended) keys\\n- iCloud backup support\\n- Over 150 local currencies supported\".localized }\n    class func HIERARCHICAL_DETERMINISTIC_WALLET_STRING() -> String { return \"Hierarchical Deterministic Wallet\".localized }\n    class func HISTORY_STRING() -> String { return \"History\".localized }\n    class func HOW_TO_COLON_STRING() -> String { return \"How To:\".localized }\n    class func HOW_DO_I_GET_BITCOINS_STRING() -> String { return \"How do I get bitcoins?\".localized }\n    class func HOW_DOES_ARCBIT_WALLET_WORK_STRING() -> String { return \"How does ArcBit Wallet work?\".localized }\n    class func IMPORT_ACCOUNT_STRING() -> String { return \"Import Account\".localized }\n    class func IMPORT_COLD_WALLET_ACCOUNT_STRING() -> String { return \"Import Cold Wallet Account\".localized }\n    class func IMPORT_FEATURE_STRING() -> String { return \"Import Feature\".localized }\n    class func IMPORT_PRIVATE_KEY_STRING() -> String { return \"Import Private Key\".localized }\n    class func IMPORT_PRIVATE_ENCRYPTED_KEY_STRING() -> String { return \"Import Private/Encrypted Key\".localized }\n    class func IMPORT_WATCH_ACCOUNT_STRING() -> String { return \"Import Watch Account\".localized }\n    class func IMPORT_WATCH_ADDRESS_STRING() -> String { return \"Import Watch Address\".localized }\n    class func IMPORT_PRIVATE_KEY_ENCRYPTED_OR_UNENCRYPTED_STRING() -> String { return \"Import private key encrypted or unencrypted?\".localized }\n    class func IMPORT_WITH_QR_CODE_STRING() -> String { return \"Import with QR code\".localized }\n    class func IMPORT_WITH_TEXT_INPUT_STRING() -> String { return \"Import with text input\".localized }\n    class func IMPORTED_ACCOUNTS_STRING() -> String { return \"Imported Accounts\".localized }\n    class func IMPORTED_ADDRESSES_STRING() -> String { return \"Imported Addresses\".localized }\n    class func IMPORTED_WATCH_ACCOUNTS_STRING() -> String { return \"Imported Watch Accounts\".localized }\n    class func IMPORTED_WATCH_ADDRESSES_STRING() -> String { return \"Imported Watch Addresses\".localized }\n    class func IMPORTED_WATCH_ONLY_ACCOUNTS_REUSABLE_ADDRESS_INFO_DESC_STRING() -> String { return \"Imported Watch Only Accounts can't see reusable address payments, thus this accounts' reusable address is not available. If you want see the reusable address for this account, import the account private key that corresponds to this accounts public key.\".localized }\n    class func IMPORTING_ACCOUNT_STRING() -> String { return \"Importing Account\".localized }\n    class func IMPORTING_COLD_WALLET_ACCOUNT_STRING() -> String { return \"Importing Cold Wallet Account\".localized }\n    class func IMPORTING_A_PRIVATE_KEY_STRING() -> String { return \"Importing a Private Key\".localized }\n    class func IMPORTING_A_WATCH_ONLY_ACCOUNT_STRING() -> String { return \"Importing a Watch Only Account\".localized }\n    class func IMPORTING_A_WATCH_ONLY_ADDRESS_STRING() -> String { return \"Importing a Watch Only Address\".localized }\n    class func IMPORTING_AN_ACCOUNT_STRING() -> String { return \"Importing an Account\".localized }\n    class func IMPORT_PRIVATE_KEY_ENCRYPTED_OR_UNENCRYPTED_DESC_STRING() -> String { return \"Importing an encrypted key will require you to input the password every time you want to send bitcoins from it.\".localized }\n    class func IMPORT_FEATURE_DESC_STRING() -> String { return \"In advanced mode, you can import bitcoin keys and addresses from other sources. You can import account private keys, account public keys, private keys, and addresses.\\nPlease note that your 12 word passphrase cannot recover your bitcoins, so it is recommended that you backup imported keys and addresses separately.\".localized }\n    class func INCOMPLETE_STRING() -> String { return \"Incomplete\".localized }\n    class func INCORRECT_PASSPHRASE_FOR_ICLOUD_WALLET_BACKUP_STRING() -> String { return \"Incorrect passphrase, could not decrypt iCloud wallet backup.\".localized }\n    class func INPUT_A_BITCOIN_ADDRESS_STRING() -> String { return \"Input a bitcoin address\".localized }\n    class func INPUT_A_LABEL_STRING() -> String { return \"Input a label\".localized }\n    class func INPUT_A_NEW_LABEL_STRING() -> String { return \"Input a new label\".localized }\n    class func INPUT_ACCOUNT_PRIVATE_KEY_STRING() -> String { return \"Enter account private key\".localized }\n    class func INPUT_ACCOUNT_PUBLIC_KEY_STRING() -> String { return \"Enter account public key\".localized }\n    class func INPUT_ADDRESS_STRING() -> String { return \"Enter address\".localized }\n    class func INPUT_AMOUNT_STRING() -> String { return \"Input amount\".localized }\n    class func INPUT_LABEL_STRING() -> String { return \"Input label\".localized }\n    class func INPUT_NEW_ACCOUNT_NAME_STRING() -> String { return \"Input new account name\".localized }\n    class func INPUT_COLD_WALLET_KEY_INFO_STRING() -> String { return \"Enter the 12 word passphrase that belongs to the cold wallet account that you want to make a payment from. This is the passphrase that was used to generate your account public key that was generated in the \\'Create Cold Wallet\\' section found in the previous screen.\".localized }\n    class func INPUT_TRANSACTION_FEE_IN_BITCOINS_STRING() -> String { return \"Input transaction fee in bitcoins\".localized }\n    class func INPUT_YOUR_CUSTOM_FEE_IN_X_STRING() -> String { return \"Input your custom fee in %@\".localized }\n    class func INVALID_TRANSACTION_ID() -> String { return \"Invalid transaction ID\".localized }\n    class func INSTRUCTIONS_STRING() -> String { return \"Instructions\".localized }\n    class func INSUFFICIENT_FUNDS_STRING() -> String { return \"Insufficient Funds\".localized }\n    class func INSUFFICIENT_FUNDS_ACCOUNT_BALANCE_IS_STRING() -> String { return \"Insufficient Funds. Account balance is %@ when %@ is required.\".localized }\n    class func INSUFFICIENT_FUNDS_ACCOUNT_CONTAINS_BITCOIN_DUST_STRING() -> String { return \"Insufficient Funds. Account contains bitcoin dust. You can only send up to %@ for now.\".localized }\n    class func INTERNAL_ACCOUNT_TRANSFER_STRING() -> String { return \"Internal account transfer\".localized }\n    class func INVALID_ADDRESS_STRING() -> String { return \"Invalid Address\".localized }\n    class func INVALID_URL_STRING() -> String { return \"Invalid URL\".localized }\n    class func INVALID_ACCOUNT_PRIVATE_KEY_STRING() -> String { return \"Invalid account private key\".localized }\n    class func INVALID_ACCOUNT_PUBLIC_KEY_STRING() -> String { return \"Invalid account public Key\".localized }\n    class func INVALID_BACKUP_PASSPHRASE_STRING() -> String { return \"Invalid backup passphrase\".localized }\n    class func INVALID_PASSPHRASE_STRING() -> String { return \"Invalid passphrase\".localized }\n    class func INVALID_PRIVATE_KEY_STRING() -> String { return \"Invalid private key\".localized }\n    class func INVALID_SCANNED_DATA_STRING() -> String { return \"Invalid scanned data\".localized }\n    class func DONT_MANAGE_INDIVIDUAL_ACCOUNT_PRIVATE_KEY_WARNING_DESC_STRING() -> String { return \"It is not recommended that you manually manage private keys yourself. A leak of a private key can lead to the compromise of your accounts.\".localized }\n    class func ADD_ADDRESS_TO_CONTACT_WARNING_DESC_STRING() -> String { return \"It is not recommended that you use a regular bitcoin address for multiple payments, but instead you should import a reusable address. Add address anyways?\".localized }\n    class func LABEL_STRING() -> String { return \"Label\".localized }\n    class func LABEL_TRANSACTION_STRING() -> String { return \"Label Transaction\".localized }\n    class func LIKE_USING_ARCBIT_STRING() -> String { return \"Do you like using ArcBit?\".localized }\n    class func LOCAL_BACK_UP_TO_WALLET_FAILED_STRING() -> String { return \"Local backup to wallet failed!\".localized }\n    class func RESTORE_WALLET_FROM_ICLOUD_STRING() -> String { return \"Local wallet will be lost. Are you sure you want to restore wallet from iCloud?\".localized }\n    class func SCAN_REUSABLE_ADDRESS_PAYMENT_STRING() -> String { return \"Scan For Reusable Address Payment\".localized }\n    class func MAXIMUM_ACCOUNTS_REACHED_STRING() -> String { return \"Maximum accounts reached\".localized }\n    class func MORE_STRING() -> String { return \"More\".localized }\n    class func NETWORK_ERROR_STRING() -> String { return \"Network Error\".localized }\n    class func NEW_ADDRESSES_WILL_BE_AUTOMATICALLY_GENERATED_DESC_STRING() -> String { return \"New addresses will be automatically generated and cycled for you as you use your current available addresses.\".localized }\n    class func NEXT_STRING() -> String { return \"Next\".localized }\n    class func NO_STRING() -> String { return \"No\".localized }\n    class func NONE_CURRENTLY_STRING() -> String { return \"None currently\".localized }\n    class func NOT_NOW_STRING() -> String { return \"Not now\".localized }\n    class func FINISHED_PASSING_TRANSACTION_DATA_DESC_STRING() -> String { return \"Now authorize the transaction on your air gap device. When you have done so, click continue on this device to scan the authorized transaction data and make your payment.\".localized }\n    class func OK_STRING() -> String { return \"OK\".localized }\n    class func SCAN_UNSIGNED_TX_INFO_STRING() -> String { return \"On your primary online device, when you want to make a payment from a cold wallet account, simply do it as you normally would on a normal account. When you click 'Send' on the Review Payment screen, instead of the payment going out immediately, you will be prompted to pass the unauthorized transaction data. Then on your secondary offline device, within this screen click 'Scan' to import the transaction so it can be authorized.\".localized }\n    class func PASS_SIGNED_TX_INFO_STRING() -> String { return \"Once the transaction has been authorized by completing the above two steps, pass the authorized transaction back to your primary online device to finalize your payment.\".localized }\n    class func OTHER_LINKS_STRING() -> String { return \"Other Links\".localized }\n    class func PASSPHRASE_DOES_NOT_MATCH_THE_TRANSACTION_STRING() -> String { return \"Passphrase does not match the transaction\".localized }\n    class func PASSWORD_STRING() -> String { return \"Password\".localized }\n    class func PAYMENT_INDEX_X_STRING() -> String { return \"Payment Index: %lu\".localized }\n    class func CLEARED_FROM_MEMORY_STRING() -> String { return \"Cleared from memory\".localized }\n    class func PRIVATE_KEY_DOES_NOT_MATCH_ADDRESS_STRING() -> String { return \"Private key does not match address\".localized }\n    class func PRIVATE_KEY_MISSING_STRING() -> String { return \"Private key missing\".localized }\n    class func QR_CODE_STRING() -> String { return \"QR code\".localized }\n    class func QUIT_AND_RE_ENTER_APP_STRING() -> String { return \"Quit and re-enter app\".localized }\n    class func RATE_STRING() -> String { return \"Rate\".localized }\n    class func RATE_US_IN_THE_APP_STORE_STRING() -> String { return \"Rate us in the App Store!\".localized }\n    class func RECEIVE_STRING() -> String { return \"Receive\".localized }\n    class func RECEIVE_PAYMENT_STRING() -> String { return \"Receive Payment\".localized }\n    class func RECEIVE_PAYMENT_FROM_REUSABLE_ADDRESS_STRING() -> String { return \"Receive Payment From Reusable Address\".localized }\n    class func REMIND_ME_LATER_STRING() -> String { return \"Remind me Later\".localized }\n    class func RESTORE_STRING() -> String { return \"Restore\".localized }\n    class func RESTORE_FROM_ICLOUD_STRING() -> String { return \"Restore from iCloud\".localized }\n    class func RESTORING_WALLET_STRING() -> String { return \"Restoring Wallet\".localized }\n    class func RETRY_STRING() -> String { return \"Retry\".localized }\n    class func REUSABLE_ADDRESS_PAYMENT_ADDRESSES_STRING() -> String { return \"Reusable Address Payment Addresses\".localized }\n    class func REUSABLE_ADDRESS_COLON_STRING() -> String { return \"Reusable Address:\".localized }\n    class func REUSABLE_ADDRESSES_STRING() -> String { return \"Reusable Addresses\".localized }\n    class func SAVE_STRING() -> String { return \"Save\".localized }\n    class func SCAN_STRING() -> String { return \"Scan\".localized }\n    class func SCAN_FOR_REUSABLE_ADDRESS_PAYMENT_STRING() -> String { return \"Scan For Reusable Address Payment\".localized }\n    class func SCAN_FOR_REUSABLE_ADDRESS_TRANSACTION_STRING() -> String { return \"Scan for reusable address transaction\".localized }\n    class func SCAN_NEXT_PART_STRING() -> String { return \"Scan next part\".localized }\n    class func SCROLL_DOWN_TO_THE_SECTION_ACCOUNT_ACTIONS_STRING() -> String { return \"Scroll down to the section ‘Account Actions’\".localized }\n    class func INTERNAL_WALLET_DATA_STRING() -> String { return \"Internal Wallet Data\".localized }\n    class func SELECT_ACCOUNT_STRING() -> String { return \"Select Account\".localized }\n    class func SELECT_AND_CLICK_A_BLOCKEXPLORER_API_STRING() -> String { return \"Select and click a blockexplorer API\".localized }\n    class func SELECT_AND_CLICK_A_TRANSACTION_STRING() -> String { return \"Select and click a transaction\".localized }\n    class func SELECT_AND_CLICK_AN_ACCOUNT_STRING() -> String { return \"Select and click an account\".localized }\n    class func SELECT_AND_CLICK_AN_ACCOUNT_TO_RECEIVE_FROM_STRING() -> String { return \"Select and click an account to receive from\".localized }\n    class func SELECT_AND_CLICK_AN_ACCOUNT_TO_VIEW_TRANSACTION_HISTORY_STRING() -> String { return \"Select and click an account to view it’s transaction history\".localized }\n    class func SELECT_AND_CLICK_AN_ADDRESS_STRING() -> String { return \"Select and click an address\".localized }\n    class func SEND_STRING() -> String { return \"Send\".localized }\n    class func SEND_PAYMENT_STRING() -> String { return \"Send Payment\".localized }\n    class func SEND_TO_ADDRESS_IN_CONTACTS_STRING() -> String { return \"Send To Address In Contacts\".localized }\n    class func SEND_AUTHORIZED_PAYMENT_STRING() -> String { return \"Send authorized payment?\".localized }\n    class func SENDING_STRING() -> String { return \"Sending\".localized }\n    class func REUSABLE_ADDRESS_BLOCKCHAIN_API_WARNING_STRING() -> String { return \"Sending payment to a reusable address might take longer to show up then a normal transaction with the blockchain.info API. You might have to wait until at least 1 confirmation for the transaction to show up. This is due to the limitations of the blockchain.info API. For reusable address payments to show up faster, configure your app to use the Insight API in advance settings.\".localized }\n    class func SENT_X_TO_Y_STRING() -> String { return \"Sent %@ to %@\".localized }\n    class func CHANGE_BLOCK_EXPLORER_URL_STRING() -> String { return \"Change Block Explorer URL\".localized }\n    class func SET_TRANSACTION_FEE_IN_X_STRING() -> String { return \"Set Transaction Fee in %@\".localized }\n    class func SETTINGS_STRING() -> String { return \"Settings\".localized }\n    class func SOME_FUNDS_MAY_BE_PENDING_CONFIRMATION_DESC_STRING() -> String { return \"Some funds may be pending confirmation and cannot be spent yet. (Check your account history) Account only has a spendable balance of %@\".localized }\n    class func WHAT_ARE_REUSABLE_ADDRESSES_DESC_STRING() -> String { return \"Some people have compared bitcoin addresses to a bank routing number. It is a good analogy, however bitcoin addresses are public. So if you reuse the same bitcoin address for multiple payments like you would a routing number, people will be able to figure out how much bitcoin you have. Thus it is recommended that you only use one address per payment.\\nThis causes usability issues making the user use a new address whenever receiving a payment is cumbersome.\\nStealth/reusable addresses provides a better solution. When you give a sender a reusable address, the sender will derive a one time regular bitcoin address from the reusable address. Then the sender will send a payment to that regular bitcoin address. Now you can give many people just one reusable address and have them all send you payments without letting other people know how much bitcoin you have.\\nA reusable address looks like this vJmxthatTBXibYe9aZavx18iAT9gyiJETGkhwPX2WbHQGuzX83YvQXynD2t8yHU4Xjfonu5x9m6B4yxquytFP1c2CRbVR9mecxesvE. A reusable address is a lot longer then a regular bitcoin address, it is 102 characters in length.\\nReusable addresses are great, however there are no other mobile bitcoin wallets but ArcBit that supports reusable addresses for now. Which is why ArcBit supports receiving payments from both regular bitcoin addresses and reusable addresses.\\nFor each account, you have one reusable address. You can find it on your Receive screen. Swipe all the way to right on the QRCode on your Receive screen and you will find a reusable address.\".localized }\n    class func SPENDING_FROM_A_COLD_WALLET_ACCOUNT_STRING() -> String { return \"Spending from a cold wallet account\".localized }\n    class func START_FRESH_STRING() -> String { return \"Start fresh\".localized }\n    class func START_RESTORE_ANOTHER_WALLET_STRING() -> String { return \"Start/Restore Another Wallet\".localized }\n    class func STEPS_STRING() -> String { return \"Steps\".localized }\n    class func SUCCESS_STRING() -> String { return \"Success\".localized }\n    class func SWIPE_RIGHT_ON_AN_ADDRESS_STRING() -> String { return \"Swipe right on an address\".localized }\n    class func SWIPE_UNTIL_YOU_SEE_THE_REUSABLE_ADDRESS_STRING() -> String { return \"Swipe to the right on the QR Code Image until you see the reusable address\".localized }\n    class func TEMPORARY_IMPORT_ACCOUNT_PRIVATE_KEY_STRING() -> String { return \"Temporarily import account private key\".localized }\n    class func TEMPORARY_IMPORT_PRIVATE_KEY_STRING() -> String { return \"Temporarily import private key\".localized }\n    class func COLD_WALLET_OVERVIEW_DESC_STRING() -> String { return \"The cold wallet feature will allow you to create accounts which offer better security compared to normal online wallets. You will need 2 devices to use this feature. Your normal day to day device that is connected to the internet and a secondary device that is not connected to the internet (Your secondary device would need to be online once to download the ArcBit app. Afterwards keep the secondary device offline for maximum security). This feature allows you to authorize bitcoin payments from an offline device so that the keys to your bitcoins will never need to be stored on your online device. Follow the step by step instructions by clicking the info buttons within the below sections.\".localized }\n    class func WHAT_IS_ARCBITS_COLD_WALLET_FEATURE_DESC_STRING() -> String { return \"The cold wallet feature will allow you to create accounts which offer better security compared to normal online wallets. You will need 2 devices to use this feature. Your normal day to day device that is connected to the internet and a secondary device that is not connected to the internet (Your secondary device would need to be online once to download the ArcBit app. Afterwards keep the secondary device offline for maximum security). This feature allows you to authorize bitcoin payments from an offline device so that the keys to your bitcoins will never need to be stored on your online device. You can enable the cold wallet feature by going into advanced settings.\".localized }\n    class func CANT_SEE_REUSABLE_ADDRESS_PAYMENTS_STRING() -> String { return \"This account type can't see reusable address payments\".localized }\n    class func MANUALLY_SCAN_TRANSACTION_FOR_STEALTH_TX_INFO_STRING() -> String { return \"This feature allows you to manually input a transaction ID and see if the corresponding transaction contains a reusable address payment to your reusable address. If so, then the funds will be added to your wallet. Normally the app will discover reusable address payments automatically for you, but if you believe a payment is missing you can use this feature.\".localized }\n    class func TOGGLE_AUTOMATIC_TRANSACTION_FEE_STRING() -> String { return \"Toggle Automatic Transaction Fee\".localized }\n    class func TOGGLE_ENABLE_TRANSACTION_FEE_STRING() -> String { return \"Toggle ‘Enable Transaction Fee’\".localized }\n    class func TOGGLE_ENABLE_ADVANCED_MODE_STRING() -> String { return \"Toggle ’Enable advanced mode’\".localized }\n    class func TRANSACTION_X_ALREADY_ACCOUNTED_FOR_STRING() -> String { return \"Transaction %@ already accounted for.\".localized }\n    class func FUNDS_IMPORTED() -> String { return \"Funds imported\".localized }\n    class func TRANSACTION_X_DOES_NOT_BELONG_TO_THIS_ACCOUNT_STRING() -> String { return \"Transaction %@ does not belong to this account.\".localized }\n    class func TRANSACTION_FEE_STRING() -> String { return \"Transaction Fee\".localized }\n    class func TRANSACTION_ID_STRING() -> String { return \"Transaction ID\".localized }\n    class func TRANSACTION_ID_COLON_X_STRING() -> String { return \"Transaction ID: %@\".localized }\n    class func TRANSACTION_AUTHORIZED_STRING() -> String { return \"Transaction authorized\".localized }\n    class func TRANSACTION_CONFIRMATIONS_STRING() -> String { return \"Transaction confirmations\".localized }\n    class func FEE_INFO_DESC_STRING() -> String { return \"Transaction fees impact how quickly the Bitcoin network will confirm your transactions. Higher fees means faster confirmation times. Default fee behavior can be configured in settings.\".localized }\n    class func SPENDING_FROM_A_COLD_WALLET_ACCOUNT_DESC_STRING() -> String { return \"Transaction needs to be authorized by an offline and air gap device. Send transaction to an offline device for authorization?\".localized }\n    class func TRANSACTION_AUTHORIZED_DESC_STRING() -> String { return \"Transaction needs to be passed back to your online device in order for the payment to be sent\".localized }\n    class func TRY_AGAIN_STRING() -> String { return \"Try Again\".localized }\n    class func TRY_OUR_NEW_COLD_WALLET_FEATURE_STRING() -> String { return \"Try our new cold wallet feature!\".localized }\n    class func TRANSACTION_NOT_REUSABLE_ADDRESS_TRANSACTION_STRING() -> String { return \"Transaction is not a reusable address transaction.\".localized }\n    class func URL_DOES_NOT_CONTAIN_AN_ADDRESS_STRING() -> String { return \"URL does not contain an address.\".localized }\n    class func UNABLE_TO_GET_DYNAMIC_FEES_STRING() -> String { return \"Unable to get dynamic fees. Falling back on fixed transaction fee. (fee can be configured on review payment)\".localized }\n    class func UNARCHIVE_ACCOUNT_STRING() -> String { return \"Unarchive Account\".localized }\n    class func UNARCHIVE_ADDRESS_STRING() -> String { return \"Unarchive address\".localized }\n    class func UNARCHIVED_ADDRESS_STRING() -> String { return \"Unarchived address\".localized }\n    class func UNCONFIRMED_STRING() -> String { return \"Unconfirmed\".localized }\n    class func UNENCRYPTED_STRING() -> String { return \"Unencrypted\".localized }\n    class func CHECK_OUT_THE_ARCBIT_WEB_WALLET_DESC_STRING() -> String { return \"Use ArcBit on your browser to complement the mobile app. The web wallet has all the features that the mobile wallet has plus more!\".localized }\n    class func USE_ALL_FUNDS_STRING() -> String { return \"Use all funds\".localized }\n    class func VIEW_ACCOUNT_ADDRESS_STRING() -> String { return \"View Account Address\".localized }\n    class func VIEW_ACCOUNT_ADDRESS_IN_WEB_STRING() -> String { return \"View Account Address In Web\".localized }\n    class func VIEW_ACCOUNT_ADDRESSES_STRING() -> String { return \"View Account Addresses\".localized }\n    class func VIEW_ACCOUNT_PRIVATE_KEY_STRING() -> String { return \"View Account Private Key\".localized }\n    class func VIEW_ACCOUNT_PUBLIC_KEY_STRING() -> String { return \"View Account Public Key\".localized }\n    class func VIEW_ACHIEVEMENTS_STRING() -> String { return \"View Achievements\".localized }\n    class func VIEW_ADDRESSES_STRING() -> String { return \"View Addresses\".localized }\n    class func VIEW_ARCBIT_BRAIN_WALLET_DETAILS_STRING() -> String { return \"View ArcBit Brain Wallet Details\".localized }\n    class func VIEW_ARCBIT_WEB_WALLET_DETAILS_STRING() -> String { return \"View ArcBit Web Wallet Details\".localized }\n    class func VIEW_HISTORY_STRING() -> String { return \"View History\".localized }\n    class func VIEW_PRIVATE_KEY_STRING() -> String { return \"View Private Key\".localized }\n    class func VIEW_TRANSACTION_IN_WEB_STRING() -> String { return \"View Transaction In Web\".localized }\n    class func VIEW_ACCOUNT_PRIVATE_KEY_QR_CODE_STRING() -> String { return \"View account private key QR code\".localized }\n    class func VIEW_ACCOUNT_PUBLIC_KEY_QR_CODE_STRING() -> String { return \"View account public key QR code\".localized }\n    class func VIEW_ADDRESS_QR_CODE_STRING() -> String { return \"View address QR code\".localized }\n    class func VIEW_ADDRESS_IN_WEB_STRING() -> String { return \"View address in web\".localized }\n    class func VIEW_IN_WEB_STRING() -> String { return \"View in web\".localized }\n    class func VIEW_PRIVATE_KEY_QR_CODE_STRING() -> String { return \"View private key QR code\".localized }\n    class func VISIT_OUR_HOME_PAGE_STRING() -> String { return \"Visit our home page\".localized }\n    class func WARNING_STRING() -> String { return \"Warning\".localized }\n    class func WELCOME_DESC_STRING() -> String { return \"Welcome to ArcBit, a user only controlled Bitcoin wallet. Start using the app now by depositing your Bitcoins here.\".localized }\n    class func WELCOME_EXCLAMATION_STRING() -> String { return \"Welcome!\".localized }\n    class func WHAT_ARE_ACCOUNT_EXTENDED_KEYS_STRING() -> String { return \"What are Account/Extended Keys?\".localized }\n    class func WHAT_ARE_ACCOUNTS_STRING() -> String { return \"What are accounts?\".localized }\n    class func WHAT_ARE_REUSABLE_ADDRESSES_STRING() -> String { return \"What are reusable addresses?\".localized }\n    class func WHAT_ARE_THE_BENEFITS_AND_ADVANTAGES_OF_BITCOIN_STRING() -> String { return \"What are the benefits and advantages of Bitcoin?\".localized }\n    class func WHAT_ARE_TRANSACTION_CONFIRMATIONS_STRING() -> String { return \"What are transaction confirmations?\".localized }\n    class func WHAT_IS_ARCBITS_COLD_WALLET_FEATURE_STRING() -> String { return \"What is ArcBit's cold wallet feature?\".localized }\n    class func WHAT_IS_BITCOIN_STRING() -> String { return \"What is Bitcoin?\".localized }\n    class func WHAT_IS_A_BITCOIN_WALLET_STRING() -> String { return \"What is a bitcoin wallet?\".localized }\n    class func WHAT_MAKES_ARCBIT_DIFFERENT_FROM_OTHER_BITCOIN_WALLETS_STRING() -> String { return \"What makes ArcBit different from other bitcoin wallets?\".localized }\n    class func TRY_OUR_NEW_COLD_WALLET_FEATURE_DESC_STRING() -> String { return \"With an ArcBit cold wallet feature, you can create wallets and make payments offline without exposing your private keys to an internet connected device. This feature is great for storing large amounts of bitcoin or for the security conscious minded. Check out this feature in the cold wallet section in the side menu.\".localized }\n    class func WRITE_DOWN_BACKUP_PASSPHRASE_STRING() -> String { return \"Write down backup passphrase\".localized }\n    class func SUGGEST_BACK_UP_WALLET_PASSPHRASE_DESC_STRING() -> String { return \"Write down or memorize your 12 word wallet backup passphrase. You can view it by clicking \\\"Show backup passphrase\\\" in Settings. Your wallet backup passphrase is needed to recover your bitcoins.\".localized }\n    class func BACKUP_PASSPHRASE_ADVANCED_EXPLANATION_STRING() -> String { return \"Write down the 12 word passphrase below and keep it safe. This passphrase alone can restore your entire wallets\\' bitcoins (excluding imports).\".localized }\n    class func BACKUP_PASSPHRASE_EXPLANATION_STRING() -> String { return \"Write down the 12 word passphrase below and keep it safe. This passphrase alone can restore your entire wallets\\' bitcoins.\".localized }\n    class func YES_STRING() -> String { return \"Yes\".localized }\n    class func STEALTH_PAYMENT_NOTE_STRING() -> String { return \"You are making a payment to a reusable address. Make sure that the receiver can see the payment made to them. (All ArcBit reusable addresses are compatible with other ArcBit wallets)\".localized }\n    class func YOU_HAVE_X_Y_BUT_Z_IS_NEEDED_STRING() -> String { return \"You have %@, but %@ is needed. (This includes the transactions fee)\".localized }\n    class func KILL_THIS_APP_DESC_STRING() -> String { return \"You must exit and kill this app in order for this to take effect.\".localized }\n    class func RESTORING_WALLET_DESC_STRING() -> String { return \"Your current wallet will be deleted. Your can restore your current wallet later with the wallet passphrase, but any imported accounts or addresses created in advanced mode cannot be recovered. Do you wish to continue?\".localized }\n    class func YOUR_ICLOUD_BACKUP_WAS_LAST_SAVED_ON_X_DATE_STRING() -> String { return \"Your iCloud backup was last saved on %@. Do you want to restore your wallet from iCloud or backup your local wallet to iCloud?\".localized }\n    class func YOUR_NEW_TRANSACTION_FEE_IS_TOO_HIGH_STRING() -> String { return \"Your new transaction fee is too high\".localized }\n    class func YOUR_WALLET_IS_NOW_RESTORED_STRING() -> String { return \"Your wallet is now restored\".localized }\n    class func ALLOW_CAMERA_ACCESS_IN_STRING() -> String { return \"\\nAllow camera access in\\n Settings->Privacy->Camera->%@\".localized }\n    class func ARCBIT_WEB_WALLET_DESC_STRING() -> String { return \"\\tArcBit Web Wallet is a Chrome extension. It has all the features of the mobile wallet plus more. Highlights include the ability to create multiple wallets instead of just one, and a new non-cumbersome way to generate wallets, store and spend bitcoins all from cold storage! ArcBit's new way to manage your cold storage bitcoins also offers a more compelling reason to use ArcBit's watch account feature. Now you can safely watch the balance of your cold storage bitcoins by enabling advance mode in ArcBit and importing your cold storage account public keys.\\n\\tUse ArcBit Web Wallet in whatever way you wish. You can create a new wallet, or you can input your current 12 word backup passphrase to manage the same bitcoins across different devices. Check out the ArcBit Web Wallet in the Chrome Web Store for more details!\\n\".localized }\n    class func ARCBIT_BRAIN_WALLET_STRING_DESC_STRING() -> String { return \"\\tWith the Arcbit Brain Wallet you can safely spend your bitcoins without ever having your private keys be exposed to the internet. It can be use in conjunction with your Arcbit Wallet or as a stand alone wallet.\\n\".localized }\n    class func ICLOUD_ERROR_COLON_X_STRING() -> String { return \"iCloud Error: %@\".localized }\n    class func ICLOUD_BACKUP_FOUND_STRING() -> String { return \"iCloud backup found\".localized }\n    class func ICLOUD_BACKUP_NOT_FOUND_STRING() -> String { return \"iCloud backup not found\".localized }\n    class func BACKUP_IYOUR_LOCAL_WALLET_TO_ICLOUD_STRING() -> String { return \"iCloud backup will be lost. Are you sure you want to backup your local wallet to iCloud?\".localized }\n    \n    class func TODAY_STRING() -> String { return \"Today\".localized }\n    class func CONFIRM_PAYMENT_STRING() -> String { return \"Confirm Payment\".localized }\n    class func FEE_COLON_STRING() -> String { return \"Fee:\".localized }\n    class func TOTAL_COLON_STRING() -> String { return \"Total:\".localized }\n    class func CUSTOMIZE_FEE_STRING() -> String { return \"Customize Fee\".localized }\n    class func ENTER_A_WALLET_BACKUP_PASSPHRASE_STRING() -> String { return \"Enter a wallet backup passphrase to wipe the current wallet and start/restore another.\".localized }\n    class func PASSPHRASE_STRING() -> String { return \"Passphrase\".localized }\n    class func RESTORE_WALLET_STRING() -> String { return \"Restore Wallet\".localized }\n    class func WALLET_BACKUP_PASSPHRASE_STRING() -> String { return \"Wallet backup passphrase\".localized }\n    class func FROM_COLON_STRING() -> String { return \"From:\".localized }\n    class func AMOUNT_COLON_STRING() -> String { return \"Amount:\".localized }\n    class func TO_COLON_STRING() -> String { return \"To:\".localized }\n    class func SCAN_QR_STRING() -> String { return \"Scan QR Code\".localized }\n    class func CONTACTS_STRING() -> String { return \"Contacts\".localized }\n    class func REVIEW_PAYMENT_STRING() -> String { return \"Review Payment\".localized }\n    class func ACCOUNT_ID_STRING() -> String { return \"Account ID\".localized }\n    class func AUTHORIZE_PAYMENT_STEP_1() -> String { return \"Step 1: Scan transaction to authorize\".localized }\n    class func AUTHORIZE_PAYMENT_STEP_2() -> String { return \"Step 2: Input 12 word backup passphrase\".localized }\n    class func AUTHORIZE_PAYMENT_STEP_3() -> String { return \"Step 3: Pass authorized transaction data\".localized }\n    class func STARTING_RECEIVING_ADDRESS_ID() -> String { return \"Starting Receiving Address ID:\".localized }\n    class func STARTING_CHANGE_ADDRESS_ID() -> String { return \"Starting Change address ID:\".localized }\n    class func NEW_WALLET() -> String { return \"New Wallet\".localized }\n    class func SCAN() -> String { return \"Scan\".localized }\n    class func PASS() -> String { return \"Pass\".localized }\n\n    class func IMPORTED_COLD_WALLET_ACCOUNT_STRING() -> String { return \"Imported Cold Wallet Account %@\".localized }\n    class func IMPORTED_ACCOUNT_STRING() -> String { return \"Imported Account %@\".localized }\n    class func IMPORTED_WATCH_ACCOUNT_STRING() -> String { return \"Imported Watch Account %@\".localized }\n\n    \n    class func WALLET_BACKUP_PASSPHRASE_WILL_BE_SHOWN() -> String { return \"Wallet backup passphrase will be shown\".localized }\n    class func PLEASE_WRITE_DOWN_OR_MEMORIZE_YOUR_WALLET_BACKUP_PASSPHRASE() -> String { return \"Write down or memorize your wallet backup passphrase. If you lose your backup passphrase, your wallet cannot be recovered.\".localized }\n    class func I_UNDERSTAND() -> String { return \"I understand\".localized }\n    class func ICLOUD_SUPPORT_DISCONTINUED() -> String { return \"iCloud support for ArcBit discontinued\".localized }\n    class func ICLOUD_SUPPORT_DISCONTINUED_DESCRIPTION() -> String { return \"iCloud support for ArcBit is being discontinued. If your backup passphrase has not been backed up already, please do so.\".localized }\n    class func REUSABLE_ADDRESS_DISABLED() -> String { return \"Reusable address payments are disabled until further notice.\".localized }\n}\n"
  },
  {
    "path": "ArcBit/model/TLHDWalletWrapper.swift",
    "content": "//\n//  TLHDWalletWrapper.swift\n//  ArcBit\n//\n//  Created by Timothy Lee on 3/14/15.\n//  Copyright (c) 2015 Timothy Lee <stequald01@gmail.com>\n//\n//   This library is free software; you can redistribute it and/or\n//   modify it under the terms of the GNU Lesser General Public\n//   License as published by the Free Software Foundation; either\n//   version 2.1 of the License, or (at your option) any later version.\n//\n//   This library is distributed in the hope that it will be useful,\n//   but WITHOUT ANY WARRANTY; without even the implied warranty of\n//   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n//   Lesser General Public License for more details.\n//\n//   You should have received a copy of the GNU Lesser General Public\n//   License along with this library; if not, write to the Free Software\n//   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,\n//   MA 02110-1301  USA\n\nimport Foundation\n\nclass TLHDWalletWrapper {\n    \n    class func getBIP44KeyChain(_ masterHex:NSString, accountIdx:UInt) -> BTCKeychain{\n        let seed = BTCDataWithHexCString(masterHex.utf8String)\n        let masterChain = BTCKeychain(seed:seed)\n        let purposeKeychain = masterChain?.derivedKeychain(at: 44, hardened:true)\n        let coinTypeKeychain = purposeKeychain?.derivedKeychain(at: 0, hardened:true)\n        let accountKeychain = coinTypeKeychain?.derivedKeychain(at: UInt32(accountIdx), hardened:true)\n        return accountKeychain!\n    }\n    \n    class func generateMnemonicPassphrase() -> String? {\n        if let mnemonic = BTCMnemonic(entropy: BTCRandomDataWithLength(16) as Data!, password: nil, wordListType: .english) {\n            return (mnemonic.words as NSArray).componentsJoined(by: \" \")\n        } else {\n            return nil\n        }\n    }\n    \n    class func phraseIsValid(_ phrase:String) -> (Bool){\n        return BTCMnemonic(words: phrase.components(separatedBy: \" \"), password: nil, wordListType: .english) != nil\n    }\n\n    class func getMasterHex(_ mnemonic: String) -> String {\n        assert(phraseIsValid(mnemonic), \"mnemonic is invalid\")\n        let mnemonicData = mnemonic.data(using: String.Encoding.utf8)\n        let salt = \"mnemonic\".data(using: String.Encoding.utf8)\n        \n        let rounds:UInt = 2048\n        let derivedKeyLen:Int = 64\n        \n        let key = [CUnsignedChar](repeating: 0, count: derivedKeyLen)\n        \n        let unsafeMutablePointerOfPassData: UnsafePointer<Int8> = (mnemonicData! as NSData).bytes.bindMemory(to: Int8.self, capacity: mnemonicData!.count)\n        let unsafeMutablePointerOfSaltData: UnsafePointer<UInt8> = (salt! as NSData).bytes.bindMemory(to: UInt8.self, capacity: salt!.count)\n        let unsafeMutablePointerOfKey: UnsafeMutablePointer<UInt8> = UnsafeMutablePointer(mutating: key)\n        CCKeyDerivationPBKDF(CCPBKDFAlgorithm(kCCPBKDF2),unsafeMutablePointerOfPassData,mnemonicData!.count,unsafeMutablePointerOfSaltData,salt!.count,CCPseudoRandomAlgorithm(kCCPRFHmacAlgSHA512),CUnsignedInt(rounds),unsafeMutablePointerOfKey,derivedKeyLen)\n        \n        let len = MemoryLayout<CUnsignedChar>.size * Int(derivedKeyLen)\n        \n        let masterSeedData = Data(bytes: UnsafePointer<UInt8>(unsafeMutablePointerOfKey), count: len)\n        return (masterSeedData as NSData).hex()\n    }\n    \n    \n    class func getStealthAddress(_ extendedKey:String, isTestnet:Bool) -> (NSDictionary) {\n        \n        // hd wallet\n        // m / purpose' / coin_type' / account' / change / address_index\n        // stealth\n        // m / purpose' / coin_type' / account' / 100' / scan|spend / 0\n        // 100' because 0 and 1 are change, and is hardened because if it is not then if an attacker knows a xpub,\n        // then he can can hack stealth server, take scan keys and compromise whole account\n        \n        var scanKeyChain = BTCKeychain(extendedKey:extendedKey)\n        let scanPrivSequence = [[\"idx\":100, \"hardened\":true],\n            [\"idx\":0, \"hardened\":false]]\n        for _idxHardened in scanPrivSequence {\n            let idxHardened = _idxHardened as NSDictionary\n            scanKeyChain = scanKeyChain?.derivedKeychain(at: UInt32(idxHardened.object(forKey: \"idx\") as! Int),\n                hardened:idxHardened.object(forKey: \"hardened\") as! Bool)\n        }\n        \n        var spendKeyChain = BTCKeychain(extendedKey:extendedKey)\n        let spendPrivSequence = [[\"idx\":100, \"hardened\":true],\n            [\"idx\":1, \"hardened\":false]]\n        for idxHardened in spendPrivSequence as [NSDictionary] {\n            spendKeyChain = spendKeyChain?.derivedKeychain(at: UInt32(idxHardened.object(forKey: \"idx\") as! Int),\n                hardened:idxHardened.object(forKey: \"hardened\") as! Bool)\n        }\n        \n        \n        let scanKey = scanKeyChain?.key\n        let scanPriv = (scanKey?.privateKey.hex())! as String\n        let scanPublicKey = (scanKey?.compressedPublicKey.hex())! as String\n        \n        let spendKey = spendKeyChain?.key\n        let spendPriv = (spendKey?.privateKey.hex())! as String\n        let spendPublicKey = (spendKey?.compressedPublicKey.hex())! as String\n        \n        let stealthAddress = TLStealthAddress.createStealthAddress(scanPublicKey as NSString, spendPublicKey:spendPublicKey as NSString, isTestnet:isTestnet)\n        return [\"stealthAddress\":stealthAddress, \"scanPriv\":scanPriv, \"spendPriv\":spendPriv]\n    }\n    \n    class func getAccountIdxForExtendedKey(_ extendedKey:String) -> UInt32 {\n        let keyChain = BTCKeychain(extendedKey:extendedKey)\n        return keyChain!.index    }\n    \n    \n    class func isValidExtendedPublicKey(_ extendedPublicKey:String) -> Bool {\n        let keyChain = BTCKeychain(extendedKey:extendedPublicKey)\n        return (keyChain != nil && !keyChain!.isPrivate)\n    }\n    \n    class func isValidExtendedPrivateKey(_ extendedPrivateKey:String) -> Bool {\n        let keyChain = BTCKeychain(extendedKey:extendedPrivateKey)\n        return (keyChain != nil && keyChain!.isPrivate)\n    }\n    \n    class func getExtendPubKey(_ extendPrivKey:String) -> String{\n        let keyChain = BTCKeychain(extendedKey:extendPrivKey)\n        return keyChain!.extendedPublicKey\n    }\n    \n    class func getExtendPubKeyFromMasterHex(_ masterHex:String, accountIdx:UInt) -> String{\n        let accountKeychain = getBIP44KeyChain(masterHex as NSString, accountIdx:accountIdx)\n        return accountKeychain.extendedPublicKey\n    }\n    \n    class func getExtendPrivKey(_ masterHex:String, accountIdx:UInt) -> String{\n        let accountKeychain = getBIP44KeyChain(masterHex as NSString, accountIdx:accountIdx)\n        \n        return accountKeychain.extendedPrivateKey\n    }\n    \n    class func getAddress(_ extendPubKey:String, sequence:NSArray, isTestnet:Bool) -> String{\n        var keyChain = BTCKeychain(extendedKey:extendPubKey)\n        \n        for _idx in sequence {\n            let idx = _idx as! Int\n            keyChain = keyChain?.derivedKeychain(at: UInt32(idx), hardened:false)\n        }\n        \n        if !isTestnet {\n            return keyChain!.key.compressedPublicKeyAddress.string\n        } else {\n            return keyChain!.key.addressTestnet.string\n        }\n    }\n    \n    class func getPrivateKey(_ extendPrivKey:NSString, sequence:NSArray, isTestnet:Bool) -> String{\n        var keyChain = BTCKeychain(extendedKey:extendPrivKey as String)\n        \n        for _idx in sequence {\n            let idx = _idx as! Int\n            keyChain = keyChain?.derivedKeychain(at: UInt32(idx), hardened:false)\n        }\n        \n        keyChain?.key.isPublicKeyCompressed = true\n        if !isTestnet {\n            return keyChain!.key.wif\n        } else {\n            return keyChain!.key.wifTestnet\n        }\n    }\n}\n"
  },
  {
    "path": "ArcBit/model/TLHelpDoc.swift",
    "content": "//\n//  TLHelpDoc.swift\n//  ArcBit\n//\n//  Created by Timothy Lee on 3/14/15.\n//  Copyright (c) 2015 Timothy Lee <stequald01@gmail.com>\n//\n//   This library is free software; you can redistribute it and/or\n//   modify it under the terms of the GNU Lesser General Public\n//   License as published by the Free Software Foundation; either\n//   version 2.1 of the License, or (at your option) any later version.\n//\n//   This library is distributed in the hope that it will be useful,\n//   but WITHOUT ANY WARRANTY; without even the implied warranty of\n//   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n//   Lesser General Public License for more details.\n//\n//   You should have received a copy of the GNU Lesser General Public\n//   License along with this library; if not, write to the Free Software\n//   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,\n//   MA 02110-1301  USA\n\nimport Foundation\n\nclass TLHelpDoc {\n    struct STATIC_MEMBERS {\n        static var _actionEventToInstructionStepsTitleArray: NSArray?\n        static var _advanceActionInstructionStepsArray: NSArray?\n        static var _actionEventToInstructionsTitleDict: NSDictionary?\n        static var _explanationArray: NSArray?\n        static var _advanceExplanationArray: NSArray?\n        static var _howToDoAdvanceAchievementsArray: NSArray?\n        static var _eventsArray: NSArray?\n        \n        static let FAQ_TRANSACTION_CONFIRMATIONS = TLDisplayStrings.TRANSACTION_CONFIRMATIONS_STRING()\n        static let FAQ_HD_WALLET = TLDisplayStrings.HIERARCHICAL_DETERMINISTIC_WALLET_STRING()\n        static let FAQ_STEALTH_ADDRESS = TLDisplayStrings.REUSABLE_ADDRESSES_STRING()\n        \n        static let ACCOUNT_ACTION_CREATE_NEW_ACCOUNT = TLDisplayStrings.CREATE_NEW_ACCOUNT_STRING()\n        static let ACCOUNT_ACTION_IMPORT_COLD_WALLET_ACCOUNT = TLDisplayStrings.IMPORT_COLD_WALLET_ACCOUNT_STRING()\n        static let ACCOUNT_ACTION_IMPORT_ACCOUNT = TLDisplayStrings.IMPORT_ACCOUNT_STRING()\n        static let ACCOUNT_ACTION_IMPORT_WATCH_ONLY_ACCOUNT = TLDisplayStrings.IMPORT_WATCH_ACCOUNT_STRING()\n        static let ACCOUNT_ACTION_IMPORT_PRIVATE_KEY = TLDisplayStrings.IMPORT_PRIVATE_KEY_STRING()\n        static let ACCOUNT_ACTION_IMPORT_WATCH_ONLY_ADDRESS = TLDisplayStrings.IMPORT_WATCH_ADDRESS_STRING()\n        \n        static let ACTION_SEND_PAYMENT = TLDisplayStrings.SEND_PAYMENT_STRING()\n        static let ACTION_RECEIVE_PAYMENT = TLDisplayStrings.RECEIVE_PAYMENT_STRING()\n        static let ACTION_RECEIVE_PAYMENT_FROM_STEALTH_ADDRESS = TLDisplayStrings.RECEIVE_PAYMENT_FROM_REUSABLE_ADDRESS_STRING()\n        static let ACTION_VIEW_HISTORY = TLDisplayStrings.VIEW_HISTORY_STRING()\n        static let ACTION_CREATE_NEW_ACCOUNT = TLDisplayStrings.CREATE_NEW_ACCOUNT_STRING()\n        static let ACTION_EDIT_ACCOUNT_NAME = TLDisplayStrings.EDIT_ACCOUNT_NAME_STRING()\n        static let ACTION_ARCHIVE_ACCOUNT = TLDisplayStrings.ARCHIVE_ACCOUNT_STRING()\n        static let ACTION_ENABLE_PIN_CODE = TLDisplayStrings.ENABLE_PIN_CODE_STRING()\n        static let ACTION_BACKUP_PASSPHRASE = TLDisplayStrings.BACK_UP_PASSPHRASE_STRING()\n        static let ACTION_RESTORE_WALLET = TLDisplayStrings.START_RESTORE_ANOTHER_WALLET_STRING()\n        static let ACTION_ADD_TO_ADDRESS_BOOK = TLDisplayStrings.ADD_CONTACTS_ENTRY_STRING()\n        static let ACTION_EDIT_ENTRY_ADDRESS_BOOK = TLDisplayStrings.EDIT_CONTACTS_ENTRY_STRING()\n        static let ACTION_DELETE_ENTRY_ADDRESS_BOOK = TLDisplayStrings.DELETE_CONTACTS_ENTRY_STRING()\n        static let ACTION_SEND_TO_ADDRESS_IN_ADDRESS_BOOK = TLDisplayStrings.SEND_TO_ADDRESS_IN_CONTACTS_STRING()\n        static let ACTION_TAG_TRANSACTION = TLDisplayStrings.LABEL_TRANSACTION_STRING()\n        static let ACTION_TOGGLE_AUTOMATIC_TX_FEE = TLDisplayStrings.TOGGLE_AUTOMATIC_TRANSACTION_FEE_STRING()\n        static let ACTION_CHANGE_AUTOMATIC_TX_FEE = TLDisplayStrings.CHANGE_AUTOMATIC_TRANSACTION_FEE_STRING()\n        static let ACTION_VIEW_ACCOUNT_ADDRESSES = TLDisplayStrings.VIEW_ACCOUNT_ADDRESSES_STRING()\n        static let ACTION_VIEW_ACCOUNT_ADDRESS_IN_WEB = TLDisplayStrings.VIEW_ACCOUNT_ADDRESS_IN_WEB_STRING()\n        static let ACTION_VIEW_TRANSACTION_IN_WEB = TLDisplayStrings.VIEW_TRANSACTION_IN_WEB_STRING()\n        static let ACTION_ENABLE_ADVANCE_MODE = TLDisplayStrings.ENABLE_ADVANCED_MODE_STRING()\n        \n        static let ACTION_IMPORT_ACCOUNT = TLDisplayStrings.IMPORT_ACCOUNT_STRING()\n        static let ACTION_IMPORT_WATCH_ONLY_ACCOUNT = TLDisplayStrings.IMPORT_WATCH_ACCOUNT_STRING()\n        static let ACTION_IMPORT_PRIVATE_KEY = TLDisplayStrings.IMPORT_PRIVATE_ENCRYPTED_KEY_STRING()\n        static let ACTION_IMPORT_WATCH_ONLY_ADDRESS = TLDisplayStrings.IMPORT_WATCH_ADDRESS_STRING()\n        static let ACTION_CHANGE_BLOCKEXPLORER_TYPE = TLDisplayStrings.CHANGE_BLOCKEXPLORER_TYPE_STRING()\n        static let ACTION_VIEW_EXTENDED_PUBLIC_KEY = TLDisplayStrings.VIEW_ACCOUNT_PUBLIC_KEY_STRING()\n        static let ACTION_VIEW_EXTENDED_PRIVATE_KEY = TLDisplayStrings.VIEW_ACCOUNT_PRIVATE_KEY_STRING()\n        static let ACTION_VIEW_ACCOUNT_PRIVATE_KEY = TLDisplayStrings.VIEW_PRIVATE_KEY_STRING()\n        static let ACTION_VIEW_ACCOUNT_ADDRESS = TLDisplayStrings.VIEW_ACCOUNT_ADDRESS_STRING()\n        \n    }\n    \n    class func getBasicActionInstructionStepsArray(_ idx: Int) -> NSArray {\n        if (STATIC_MEMBERS._actionEventToInstructionStepsTitleArray == nil) {\n            STATIC_MEMBERS._actionEventToInstructionStepsTitleArray = [\n                [\n                    TLDisplayStrings.GO_TO_THE_SIDE_MENU_STRING(),\n                    TLDisplayStrings.CLICK_SEND_STRING(),\n                    TLDisplayStrings.FILL_ADDRESS_FIELD_STRING(),\n                    TLDisplayStrings.INPUT_AMOUNT_STRING(),\n                    TLDisplayStrings.CLICK_REVIEW_PAYMENT_STRING(),\n                    TLDisplayStrings.CLICK_SEND_STRING(),\n                ],\n                [\n                    TLDisplayStrings.GO_TO_THE_SIDE_MENU_STRING(),\n                    TLDisplayStrings.CLICK_RECEIVE_STRING(),\n                    TLDisplayStrings.CLICK_THE_BUTTON_WITH_THE_ARROW_STRING(),\n                    TLDisplayStrings.SELECT_AND_CLICK_AN_ACCOUNT_TO_RECEIVE_FROM_STRING(),\n                    TLDisplayStrings.HAVE_SENDER_SCAN_QR_CODE_STRING(),\n                    TLDisplayStrings.HAVE_SENDER_SEND_YOU_PAYMENT_STRING(),\n                ],\n                [\n                    TLDisplayStrings.GO_TO_THE_SIDE_MENU_STRING(),\n                    TLDisplayStrings.CLICK_RECEIVE_STRING(),\n                    TLDisplayStrings.CLICK_THE_BUTTON_WITH_THE_ARROW_STRING(),\n                    TLDisplayStrings.SELECT_AND_CLICK_AN_ACCOUNT_TO_RECEIVE_FROM_STRING(),\n                    TLDisplayStrings.HAVE_SENDER_SCAN_QR_CODE_STRING(),\n                    TLDisplayStrings.SWIPE_UNTIL_YOU_SEE_THE_REUSABLE_ADDRESS_STRING(),\n                    TLDisplayStrings.HAVE_SENDER_SEND_YOU_PAYMENT_STRING(),\n                ],\n                [\n                    TLDisplayStrings.GO_TO_THE_SIDE_MENU_STRING(),\n                    TLDisplayStrings.CLICK_HISTORY_STRING(),\n                    TLDisplayStrings.CLICK_THE_BUTTON_WITH_THE_ARROW_STRING(),\n                    TLDisplayStrings.SELECT_AND_CLICK_AN_ACCOUNT_TO_VIEW_TRANSACTION_HISTORY_STRING(),\n                ],\n                [\n                    TLDisplayStrings.GO_TO_THE_SIDE_MENU_STRING(),\n                    TLDisplayStrings.CLICK_ACCOUNTS_STRING(),\n                    TLDisplayStrings.SCROLL_DOWN_TO_THE_SECTION_ACCOUNT_ACTIONS_STRING(),\n                    TLDisplayStrings.CLICK_CREATE_NEW_ACCOUNT_STRING(),\n                ],\n                [\n                    TLDisplayStrings.GO_TO_THE_SIDE_MENU_STRING(),\n                    TLDisplayStrings.CLICK_ACCOUNTS_STRING(),\n                    TLDisplayStrings.SELECT_AND_CLICK_AN_ACCOUNT_STRING(),\n                    TLDisplayStrings.CLICK_EDIT_ACCOUNT_NAME_STRING(),\n                    TLDisplayStrings.INPUT_NEW_ACCOUNT_NAME_STRING(),\n                ],\n                [\n                    TLDisplayStrings.GO_TO_THE_SIDE_MENU_STRING(),\n                    TLDisplayStrings.CLICK_ACCOUNTS_STRING(),\n                    TLDisplayStrings.SELECT_AND_CLICK_AN_ACCOUNT_STRING(),\n                    TLDisplayStrings.CLICK_ARCHIVE_ACCOUNT_STRING(),\n                ],\n                [\n                    TLDisplayStrings.GO_TO_THE_SIDE_MENU_STRING(),\n                    TLDisplayStrings.CLICK_SETTINGS_STRING(),\n                    TLDisplayStrings.CLICK_ENABLE_PIN_CODE_STRING(),\n                    TLDisplayStrings.ENTER_PIN_CODE_STRING(),\n                    TLDisplayStrings.CONFIRM_PIN_CODE_STRING(),\n                ],\n                [\n                    TLDisplayStrings.GO_TO_THE_SIDE_MENU_STRING(),\n                    TLDisplayStrings.CLICK_SETTINGS_STRING(),\n                    TLDisplayStrings.CLICK_SHOW_BACKUP_PASSPHRASE_STRING(),\n                    TLDisplayStrings.WRITE_DOWN_BACKUP_PASSPHRASE_STRING(),\n                ],\n                [\n                    TLDisplayStrings.GO_TO_THE_SIDE_MENU_STRING(),\n                    TLDisplayStrings.CLICK_SETTINGS_STRING(),\n                    TLDisplayStrings.CLICK_RESTORE_WALLET_STRING(),\n                    TLDisplayStrings.ENTER_BACKUP_PASSPHRASE_STRING(),\n                    TLDisplayStrings.CLICK_DONE_STRING(),\n                    TLDisplayStrings.CLICK_RESTORE_STRING(),\n                    ],\n                [\n                    TLDisplayStrings.GO_TO_THE_SIDE_MENU_STRING(),\n                    TLDisplayStrings.CLICK_SEND_STRING(),\n                    TLDisplayStrings.CLICK_THE_CONTACTS_BUTTON_STRING(),\n                    TLDisplayStrings.CLICK_THE_PLUS_BUTTON_AT_THE_TOP_RIGHT_STRING(),\n                    TLDisplayStrings.INPUT_A_BITCOIN_ADDRESS_STRING(),\n                    TLDisplayStrings.INPUT_A_LABEL_STRING(),\n                    ],\n                [\n                    TLDisplayStrings.GO_TO_THE_SIDE_MENU_STRING(),\n                    TLDisplayStrings.CLICK_SEND_STRING(),\n                    TLDisplayStrings.SWIPE_RIGHT_ON_AN_ADDRESS_STRING(),\n                    TLDisplayStrings.CLICK_EDIT_STRING(),\n                    TLDisplayStrings.INPUT_A_NEW_LABEL_STRING(),\n                    ],\n                [\n                    TLDisplayStrings.GO_TO_THE_SIDE_MENU_STRING(),\n                    TLDisplayStrings.CLICK_SEND_STRING(),\n                    TLDisplayStrings.CLICK_THE_CONTACTS_BUTTON_STRING(),\n                    TLDisplayStrings.SWIPE_RIGHT_ON_AN_ADDRESS_STRING(),\n                    TLDisplayStrings.CLICK_DELETE_STRING(),\n                    ],\n                [\n                    TLDisplayStrings.GO_TO_THE_SIDE_MENU_STRING(),\n                    TLDisplayStrings.CLICK_SEND_STRING(),\n                    TLDisplayStrings.CLICK_THE_CONTACTS_BUTTON_STRING(),\n                    TLDisplayStrings.CLICK_AN_ADDRESS_STRING(),\n                    ],\n                [\n                    TLDisplayStrings.GO_TO_THE_SIDE_MENU_STRING(),\n                    TLDisplayStrings.CLICK_HISTORY_STRING(),\n                    TLDisplayStrings.SELECT_AND_CLICK_A_TRANSACTION_STRING(),\n                    TLDisplayStrings.CLICK_LABEL_TRANSACTION_STRING(),\n                    TLDisplayStrings.INPUT_LABEL_STRING(),\n                    ],\n                [\n                    TLDisplayStrings.GO_TO_THE_SIDE_MENU_STRING(),\n                    TLDisplayStrings.CLICK_SETTINGS_STRING(),\n                    TLDisplayStrings.TOGGLE_ENABLE_TRANSACTION_FEE_STRING(),\n                    ],\n                [\n                    TLDisplayStrings.GO_TO_THE_SIDE_MENU_STRING(),\n                    TLDisplayStrings.CLICK_SETTINGS_STRING(),\n                    TLDisplayStrings.ENABLE_TRANSACTION_FEE_STRING(),\n                    TLDisplayStrings.CLICK_SET_TRANSACTION_FEE_STRING(),\n                    TLDisplayStrings.INPUT_TRANSACTION_FEE_IN_BITCOINS_STRING(),\n                    ],\n                [\n                    TLDisplayStrings.GO_TO_THE_SIDE_MENU_STRING(),\n                    TLDisplayStrings.CLICK_ACCOUNTS_STRING(),\n                    TLDisplayStrings.SELECT_AND_CLICK_AN_ACCOUNT_STRING(),\n                    TLDisplayStrings.CLICK_VIEW_ADDRESSES_STRING(),\n                    ],\n                [\n                    TLDisplayStrings.GO_TO_THE_SIDE_MENU_STRING(),\n                    TLDisplayStrings.CLICK_ACCOUNTS_STRING(),\n                    TLDisplayStrings.SELECT_AND_CLICK_AN_ACCOUNT_STRING(),\n                    TLDisplayStrings.CLICK_VIEW_ADDRESSES_STRING(),\n                    TLDisplayStrings.SELECT_AND_CLICK_AN_ADDRESS_STRING(),\n                    TLDisplayStrings.CLICK_VIEW_ADDRESS_QR_CODE_STRING(),\n                    ],\n                [\n                    TLDisplayStrings.GO_TO_THE_SIDE_MENU_STRING(),\n                    TLDisplayStrings.CLICK_HISTORY_STRING(),\n                    TLDisplayStrings.SELECT_AND_CLICK_A_TRANSACTION_STRING(),\n                    TLDisplayStrings.CLICK_VIEW_IN_WEB_STRING(),\n                    ],\n                [\n                    TLDisplayStrings.GO_TO_THE_SIDE_MENU_STRING(),\n                    TLDisplayStrings.CLICK_ACCOUNTS_STRING(),\n                    TLDisplayStrings.SELECT_AND_CLICK_AN_ACCOUNT_STRING(),\n                    TLDisplayStrings.CLICK_VIEW_ADDRESSES_STRING(),\n                    TLDisplayStrings.SELECT_AND_CLICK_AN_ADDRESS_STRING(),\n                    TLDisplayStrings.CLICK_VIEW_IN_WEB_STRING(),\n                    ],\n                [\n                    TLDisplayStrings.GO_TO_THE_SIDE_MENU_STRING(),\n                    TLDisplayStrings.CLICK_SETTINGS_STRING(),\n                    TLDisplayStrings.CLICK_ADVANCED_SETTINGS_STRING(),\n                    TLDisplayStrings.TOGGLE_ENABLE_ADVANCED_MODE_STRING(),\n                    ],\n            ]\n        }\n        return STATIC_MEMBERS._actionEventToInstructionStepsTitleArray!.object(at: idx) as! NSArray\n        \n    }\n    \n    \n    class func getAdvanceActionInstructionStepsArray(_ idx: Int) -> NSArray {\n        if (STATIC_MEMBERS._advanceActionInstructionStepsArray == nil) {\n            STATIC_MEMBERS._advanceActionInstructionStepsArray = [\n                [\n                    TLDisplayStrings.GO_TO_THE_SIDE_MENU_STRING(),\n                    TLDisplayStrings.CLICK_ACCOUNTS_STRING(),\n                    TLDisplayStrings.SCROLL_DOWN_TO_THE_SECTION_ACCOUNT_ACTIONS_STRING(),\n                    TLDisplayStrings.CLICK_IMPORT_ACCOUNT_STRING(),\n                ],\n                [\n                    TLDisplayStrings.GO_TO_THE_SIDE_MENU_STRING(),\n                    TLDisplayStrings.CLICK_ACCOUNTS_STRING(),\n                    TLDisplayStrings.SCROLL_DOWN_TO_THE_SECTION_ACCOUNT_ACTIONS_STRING(),\n                    TLDisplayStrings.CLICK_IMPORT_WATCH_ACCOUNT_STRING(),\n                ],\n                [\n                    TLDisplayStrings.GO_TO_THE_SIDE_MENU_STRING(),\n                    TLDisplayStrings.CLICK_ACCOUNTS_STRING(),\n                    TLDisplayStrings.SCROLL_DOWN_TO_THE_SECTION_ACCOUNT_ACTIONS_STRING(),\n                    TLDisplayStrings.CLICK_IMPORT_PRIVATE_KEY_STRING(),\n                ],\n                [\n                    TLDisplayStrings.GO_TO_THE_SIDE_MENU_STRING(),\n                    TLDisplayStrings.CLICK_ACCOUNTS_STRING(),\n                    TLDisplayStrings.SCROLL_DOWN_TO_THE_SECTION_ACCOUNT_ACTIONS_STRING(),\n                    TLDisplayStrings.CLICK_IMPORT_WATCH_ADDRESS_STRING(),\n                ],\n                [\n                    TLDisplayStrings.GO_TO_THE_SIDE_MENU_STRING(),\n                    TLDisplayStrings.CLICK_SETTINGS_STRING(),\n                    TLDisplayStrings.CLICK_ADVANCED_SETTINGS_STRING(),\n                    TLDisplayStrings.CLICK_BLOCKEXPLORER_API_TYPE_STRING(),\n                    TLDisplayStrings.SELECT_AND_CLICK_A_BLOCKEXPLORER_API_STRING(),\n                    TLDisplayStrings.QUIT_AND_RE_ENTER_APP_STRING(),\n                ],\n                [\n                    TLDisplayStrings.GO_TO_THE_SIDE_MENU_STRING(),\n                    TLDisplayStrings.CLICK_ACCOUNTS_STRING(),\n                    TLDisplayStrings.SELECT_AND_CLICK_AN_ACCOUNT_STRING(),\n                    TLDisplayStrings.CLICK_VIEW_ACCOUNT_PUBLIC_KEY_QR_CODE_STRING(),\n                ],\n                [\n                    TLDisplayStrings.GO_TO_THE_SIDE_MENU_STRING(),\n                    TLDisplayStrings.CLICK_ACCOUNTS_STRING(),\n                    TLDisplayStrings.SELECT_AND_CLICK_AN_ACCOUNT_STRING(),\n                    TLDisplayStrings.CLICK_VIEW_ACCOUNT_PRIVATE_KEY_QR_CODE_STRING(),\n                ],\n                [\n                    TLDisplayStrings.GO_TO_THE_SIDE_MENU_STRING(),\n                    TLDisplayStrings.CLICK_ACCOUNTS_STRING(),\n                    TLDisplayStrings.SELECT_AND_CLICK_AN_ACCOUNT_STRING(),\n                    TLDisplayStrings.CLICK_VIEW_ADDRESSES_STRING(),\n                    TLDisplayStrings.SELECT_AND_CLICK_AN_ADDRESS_STRING(),\n                    TLDisplayStrings.CLICK_VIEW_PRIVATE_KEY_QR_CODE_STRING(),\n                ],\n            ]\n        }\n        return STATIC_MEMBERS._advanceActionInstructionStepsArray!.object(at: idx) as! NSArray\n    }\n    \n    class func getActionEventToHowToActionTitleDict() -> NSDictionary {\n        if (STATIC_MEMBERS._actionEventToInstructionsTitleDict == nil) {\n            STATIC_MEMBERS._actionEventToInstructionsTitleDict = [\n                TLNotificationEvents.EVENT_SEND_PAYMENT(): STATIC_MEMBERS.ACTION_SEND_PAYMENT,\n                TLNotificationEvents.EVENT_RECEIVE_PAYMENT(): STATIC_MEMBERS.ACTION_RECEIVE_PAYMENT,\n                TLNotificationEvents.EVENT_RECEIVE_PAYMENT_FROM_STEALTH_ADDRESS(): STATIC_MEMBERS.ACTION_RECEIVE_PAYMENT_FROM_STEALTH_ADDRESS,\n                TLNotificationEvents.EVENT_VIEW_HISTORY(): STATIC_MEMBERS.ACTION_VIEW_HISTORY,\n                TLNotificationEvents.EVENT_CREATE_NEW_ACCOUNT(): STATIC_MEMBERS.ACTION_CREATE_NEW_ACCOUNT,\n                TLNotificationEvents.EVENT_EDIT_ACCOUNT_NAME(): STATIC_MEMBERS.ACTION_EDIT_ACCOUNT_NAME,\n                TLNotificationEvents.EVENT_ARCHIVE_ACCOUNT(): STATIC_MEMBERS.ACTION_ARCHIVE_ACCOUNT,\n                TLNotificationEvents.EVENT_ENABLE_PIN_CODE(): STATIC_MEMBERS.ACTION_ENABLE_PIN_CODE,\n                TLNotificationEvents.EVENT_BACKUP_PASSPHRASE(): STATIC_MEMBERS.ACTION_BACKUP_PASSPHRASE,\n                TLNotificationEvents.EVENT_RESTORE_WALLET(): STATIC_MEMBERS.ACTION_RESTORE_WALLET,\n                TLNotificationEvents.EVENT_ADD_TO_ADDRESS_BOOK(): STATIC_MEMBERS.ACTION_ADD_TO_ADDRESS_BOOK,\n                TLNotificationEvents.EVENT_EDIT_ENTRY_ADDRESS_BOOK(): STATIC_MEMBERS.ACTION_EDIT_ENTRY_ADDRESS_BOOK,\n                TLNotificationEvents.EVENT_DELETE_ENTRY_ADDRESS_BOOK(): STATIC_MEMBERS.ACTION_DELETE_ENTRY_ADDRESS_BOOK,\n                TLNotificationEvents.EVENT_SEND_TO_ADDRESS_IN_ADDRESS_BOOK(): STATIC_MEMBERS.ACTION_SEND_TO_ADDRESS_IN_ADDRESS_BOOK,\n                TLNotificationEvents.EVENT_TAG_TRANSACTION(): STATIC_MEMBERS.ACTION_TAG_TRANSACTION,\n                TLNotificationEvents.EVENT_TOGGLE_AUTOMATIC_TX_FEE(): STATIC_MEMBERS.ACTION_TOGGLE_AUTOMATIC_TX_FEE,\n                TLNotificationEvents.EVENT_CHANGE_AUTOMATIC_TX_FEE(): STATIC_MEMBERS.ACTION_CHANGE_AUTOMATIC_TX_FEE,\n                TLNotificationEvents.EVENT_VIEW_ACCOUNT_ADDRESSES(): STATIC_MEMBERS.ACTION_VIEW_ACCOUNT_ADDRESSES,\n                TLNotificationEvents.EVENT_VIEW_ACCOUNT_ADDRESS(): STATIC_MEMBERS.ACTION_VIEW_ACCOUNT_ADDRESS,\n                TLNotificationEvents.EVENT_VIEW_ACCOUNT_ADDRESS_IN_WEB(): STATIC_MEMBERS.ACTION_VIEW_ACCOUNT_ADDRESS_IN_WEB,\n                TLNotificationEvents.EVENT_VIEW_TRANSACTION_IN_WEB(): STATIC_MEMBERS.ACTION_VIEW_TRANSACTION_IN_WEB,\n                TLNotificationEvents.EVENT_ENABLE_ADVANCE_MODE(): STATIC_MEMBERS.ACTION_ENABLE_ADVANCE_MODE,\n                \n                TLNotificationEvents.EVENT_IMPORT_ACCOUNT(): STATIC_MEMBERS.ACTION_IMPORT_ACCOUNT,\n                TLNotificationEvents.EVENT_IMPORT_WATCH_ONLY_ACCOUNT(): STATIC_MEMBERS.ACTION_IMPORT_WATCH_ONLY_ACCOUNT,\n                TLNotificationEvents.EVENT_IMPORT_PRIVATE_KEY(): STATIC_MEMBERS.ACTION_IMPORT_PRIVATE_KEY,\n                TLNotificationEvents.EVENT_IMPORT_WATCH_ONLY_ADDRESS(): STATIC_MEMBERS.ACTION_IMPORT_WATCH_ONLY_ADDRESS,\n                TLNotificationEvents.EVENT_CHANGE_BLOCKEXPLORER_TYPE(): STATIC_MEMBERS.ACTION_CHANGE_BLOCKEXPLORER_TYPE,\n                TLNotificationEvents.EVENT_VIEW_EXTENDED_PUBLIC_KEY(): STATIC_MEMBERS.ACTION_VIEW_EXTENDED_PUBLIC_KEY,\n                TLNotificationEvents.EVENT_VIEW_EXTENDED_PRIVATE_KEY(): STATIC_MEMBERS.ACTION_VIEW_EXTENDED_PRIVATE_KEY,\n                TLNotificationEvents.EVENT_VIEW_ACCOUNT_PRIVATE_KEY(): STATIC_MEMBERS.ACTION_VIEW_ACCOUNT_PRIVATE_KEY,\n            ]\n        }\n        return STATIC_MEMBERS._actionEventToInstructionsTitleDict!\n    }\n    \n    class func getAccountActionsArray() -> NSArray {\n        if (TLPreferences.enabledAdvancedMode()) {\n            return getAdvanceAccountActionsArray()\n        } else {\n            return getBasicAccountActionsArray()\n        }\n    }\n    \n    class func getBasicAccountActionsArray() -> NSArray {\n        var accountActionsArray: NSArray?\n        if TLPreferences.enabledColdWallet() {\n            accountActionsArray = [\n                STATIC_MEMBERS.ACCOUNT_ACTION_CREATE_NEW_ACCOUNT,\n                STATIC_MEMBERS.ACCOUNT_ACTION_IMPORT_COLD_WALLET_ACCOUNT\n            ]\n        } else {\n            accountActionsArray = [\n                STATIC_MEMBERS.ACCOUNT_ACTION_CREATE_NEW_ACCOUNT\n            ]\n        }\n        return accountActionsArray!\n    }\n    \n    class func getAdvanceAccountActionsArray() -> NSArray {\n        var accountActionsArray: NSArray?\n        if TLPreferences.enabledColdWallet() {\n            accountActionsArray = [\n                STATIC_MEMBERS.ACCOUNT_ACTION_CREATE_NEW_ACCOUNT,\n                STATIC_MEMBERS.ACCOUNT_ACTION_IMPORT_COLD_WALLET_ACCOUNT,\n                STATIC_MEMBERS.ACCOUNT_ACTION_IMPORT_ACCOUNT,\n                STATIC_MEMBERS.ACCOUNT_ACTION_IMPORT_WATCH_ONLY_ACCOUNT,\n                STATIC_MEMBERS.ACCOUNT_ACTION_IMPORT_PRIVATE_KEY,\n                STATIC_MEMBERS.ACCOUNT_ACTION_IMPORT_WATCH_ONLY_ADDRESS\n            ]\n        } else {\n            accountActionsArray = [\n                STATIC_MEMBERS.ACCOUNT_ACTION_CREATE_NEW_ACCOUNT,\n                STATIC_MEMBERS.ACCOUNT_ACTION_IMPORT_ACCOUNT,\n                STATIC_MEMBERS.ACCOUNT_ACTION_IMPORT_WATCH_ONLY_ACCOUNT,\n                STATIC_MEMBERS.ACCOUNT_ACTION_IMPORT_PRIVATE_KEY,\n                STATIC_MEMBERS.ACCOUNT_ACTION_IMPORT_WATCH_ONLY_ADDRESS\n            ]\n        }\n        return accountActionsArray!\n    }\n    \n    class func getEventsArray() -> NSArray {\n        if (STATIC_MEMBERS._eventsArray == nil) {\n            STATIC_MEMBERS._eventsArray = [\n                TLNotificationEvents.EVENT_SEND_PAYMENT(),\n                TLNotificationEvents.EVENT_RECEIVE_PAYMENT(),\n                TLNotificationEvents.EVENT_RECEIVE_PAYMENT_FROM_STEALTH_ADDRESS(),\n                TLNotificationEvents.EVENT_VIEW_HISTORY(),\n                TLNotificationEvents.EVENT_CREATE_NEW_ACCOUNT(),\n                TLNotificationEvents.EVENT_EDIT_ACCOUNT_NAME(),\n                TLNotificationEvents.EVENT_ARCHIVE_ACCOUNT(),\n                TLNotificationEvents.EVENT_ENABLE_PIN_CODE(),\n                TLNotificationEvents.EVENT_BACKUP_PASSPHRASE(),\n                TLNotificationEvents.EVENT_RESTORE_WALLET(),\n                TLNotificationEvents.EVENT_ADD_TO_ADDRESS_BOOK(),\n                TLNotificationEvents.EVENT_EDIT_ENTRY_ADDRESS_BOOK(),\n                TLNotificationEvents.EVENT_DELETE_ENTRY_ADDRESS_BOOK(),\n                TLNotificationEvents.EVENT_SEND_TO_ADDRESS_IN_ADDRESS_BOOK(),\n                TLNotificationEvents.EVENT_TAG_TRANSACTION(),\n                TLNotificationEvents.EVENT_TOGGLE_AUTOMATIC_TX_FEE(),\n                TLNotificationEvents.EVENT_CHANGE_AUTOMATIC_TX_FEE(),\n                TLNotificationEvents.EVENT_VIEW_ACCOUNT_ADDRESSES(),\n                TLNotificationEvents.EVENT_VIEW_ACCOUNT_ADDRESS(),\n                TLNotificationEvents.EVENT_VIEW_TRANSACTION_IN_WEB(),\n                TLNotificationEvents.EVENT_VIEW_ACCOUNT_ADDRESS_IN_WEB(),\n                TLNotificationEvents.EVENT_ENABLE_ADVANCE_MODE(),\n            ]\n        }\n        return STATIC_MEMBERS._eventsArray!\n    }\n    \n    class func getAdvanceEventsArray() -> NSArray {\n        if (STATIC_MEMBERS._howToDoAdvanceAchievementsArray == nil) {\n            STATIC_MEMBERS._howToDoAdvanceAchievementsArray = [\n                \n                TLNotificationEvents.EVENT_IMPORT_ACCOUNT(),\n                TLNotificationEvents.EVENT_IMPORT_WATCH_ONLY_ACCOUNT(),\n                TLNotificationEvents.EVENT_IMPORT_PRIVATE_KEY(),\n                TLNotificationEvents.EVENT_IMPORT_WATCH_ONLY_ADDRESS(),\n                TLNotificationEvents.EVENT_CHANGE_BLOCKEXPLORER_TYPE(),\n                TLNotificationEvents.EVENT_VIEW_EXTENDED_PUBLIC_KEY(),\n                TLNotificationEvents.EVENT_VIEW_EXTENDED_PRIVATE_KEY(),\n                TLNotificationEvents.EVENT_VIEW_ACCOUNT_PRIVATE_KEY(),\n            ]\n        }\n        return STATIC_MEMBERS._howToDoAdvanceAchievementsArray!\n    }\n    \n    class func getFAQArray() -> NSArray {\n        var _faqArray: NSArray?\n        if (_faqArray == nil) {\n            _faqArray = [\n                TLDisplayStrings.WHAT_IS_BITCOIN_STRING(),\n                TLDisplayStrings.WHAT_ARE_THE_BENEFITS_AND_ADVANTAGES_OF_BITCOIN_STRING(),\n                TLDisplayStrings.HOW_DO_I_GET_BITCOINS_STRING(),\n                TLDisplayStrings.WHAT_IS_A_BITCOIN_WALLET_STRING(),\n                TLDisplayStrings.HOW_DOES_ARCBIT_WALLET_WORK_STRING(),\n                TLDisplayStrings.WHAT_MAKES_ARCBIT_DIFFERENT_FROM_OTHER_BITCOIN_WALLETS_STRING(),\n                TLDisplayStrings.WHAT_ARE_TRANSACTION_CONFIRMATIONS_STRING(),\n                TLDisplayStrings.WHAT_ARE_ACCOUNTS_STRING(),\n                TLDisplayStrings.WHAT_ARE_REUSABLE_ADDRESSES_STRING(),\n                TLDisplayStrings.WHAT_IS_ARCBITS_COLD_WALLET_FEATURE_STRING(),\n            ]\n        }\n        return _faqArray!\n    }\n    \n    class func getExplanation(_ idx: Int) -> String {\n        if (STATIC_MEMBERS._explanationArray == nil) {\n            STATIC_MEMBERS._explanationArray = [\n                TLDisplayStrings.WHAT_IS_BITCOIN_DESC_STRING(),\n                TLDisplayStrings.WHAT_ARE_THE_BENEFITS_AND_ADVANTAGES_OF_BITCOIN_DESC_STRING(),\n                TLDisplayStrings.HOW_DO_I_GET_BITCOINS_DESC_STRING(),\n                TLDisplayStrings.WHAT_IS_A_BITCOIN_WALLET_DESC_STRING(),\n                TLDisplayStrings.HOW_DOES_ARCBIT_WALLET_WORK_DESC_STRING(),\n                TLDisplayStrings.WHAT_MAKES_ARCBIT_DIFFERENT_FROM_OTHER_BITCOIN_WALLETS_DESC_STRING(),\n                TLDisplayStrings.WHAT_ARE_TRANSACTION_CONFIRMATIONS_DESC_STRING(),\n                TLDisplayStrings.WHAT_ARE_ACCOUNTS_DESC_STRING(),\n                TLDisplayStrings.WHAT_ARE_REUSABLE_ADDRESSES_DESC_STRING(),\n                TLDisplayStrings.WHAT_IS_ARCBITS_COLD_WALLET_FEATURE_DESC_STRING(),\n            ]\n        }\n        return STATIC_MEMBERS._explanationArray!.object(at: idx) as! String\n    }\n    \n    class func getAdvanceFAQArray() -> NSArray {\n        var _faqArray: NSArray?\n        if (_faqArray == nil) {\n            _faqArray = [\n                TLDisplayStrings.WHAT_ARE_ACCOUNT_EXTENDED_KEYS_STRING(),\n                TLDisplayStrings.IMPORT_FEATURE_STRING(),\n                TLDisplayStrings.IMPORTING_AN_ACCOUNT_STRING(),\n                TLDisplayStrings.IMPORTING_A_WATCH_ONLY_ACCOUNT_STRING(),\n                TLDisplayStrings.IMPORTING_A_PRIVATE_KEY_STRING(),\n                TLDisplayStrings.IMPORTING_A_WATCH_ONLY_ADDRESS_STRING(),\n            ]\n        }\n        return _faqArray!\n    }\n    \n    class func getAdvanceExplanation(_ idx: Int) -> String {\n        if (STATIC_MEMBERS._advanceExplanationArray == nil) {\n            STATIC_MEMBERS._advanceExplanationArray = [\n                TLDisplayStrings.WHAT_ARE_ACCOUNT_EXTENDED_KEYS_DESC_STRING(),\n                TLDisplayStrings.IMPORT_FEATURE_DESC_STRING(),\n                TLDisplayStrings.IMPORTING_AN_ACCOUNT_DESC_STRING(),\n                TLDisplayStrings.IMPORTING_A_WATCH_ONLY_ACCOUNT_DESC_STRING(),\n                TLDisplayStrings.IMPORTING_A_PRIVATE_KEY_DESC_STRING(),\n                TLDisplayStrings.IMPORTING_A_WATCH_ONLY_ADDRESS_DESC_STRING(),\n            ]\n        }\n        \n        return STATIC_MEMBERS._advanceExplanationArray!.object(at: idx) as! String\n    }\n}\n"
  },
  {
    "path": "ArcBit/model/TLImportedAddress.swift",
    "content": "//\n//  TLImportedAddress.swift\n//  ArcBit\n//\n//  Created by Timothy Lee on 3/14/15.\n//  Copyright (c) 2015 Timothy Lee <stequald01@gmail.com>\n//\n//   This library is free software; you can redistribute it and/or\n//   modify it under the terms of the GNU Lesser General Public\n//   License as published by the Free Software Foundation; either\n//   version 2.1 of the License, or (at your option) any later version.\n//\n//   This library is distributed in the hope that it will be useful,\n//   but WITHOUT ANY WARRANTY; without even the implied warranty of\n//   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n//   Lesser General Public License for more details.\n//\n//   You should have received a copy of the GNU Lesser General Public\n//   License along with this library; if not, write to the Free Software\n//   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,\n//   MA 02110-1301  USA\n\nimport Foundation\n\n@objc class TLImportedAddress : NSObject {\n    \n    fileprivate var appWallet:TLWallet?\n    fileprivate var addressDict:NSMutableDictionary?\n    lazy var haveUpDatedUTXOs: Bool = false\n    lazy var unspentOutputsCount: Int = 0\n    fileprivate var unspentOutputs:NSArray?\n    fileprivate var unspentOutputsSum:TLCoin?\n    var balance = TLCoin.zero()\n    fileprivate var fetchedAccountData = false\n    var listeningToIncomingTransactions = false\n    fileprivate var watchOnly = false\n    fileprivate var archived = false\n    fileprivate var positionInWalletArray:Int?\n    fileprivate var txObjectArray:NSMutableArray?\n    fileprivate var txidToAccountAmountDict:NSMutableDictionary?\n    fileprivate var txidToAccountAmountTypeDict:NSMutableDictionary?\n    fileprivate var processedTxSet:NSMutableSet?\n    fileprivate var privateKey:String?\n    fileprivate var importedAddress:String?\n    var downloadState:TLDownloadState = .notDownloading\n\n    init(appWallet: TLWallet, dict:NSDictionary) {\n        super.init()\n        self.appWallet = appWallet\n        addressDict = NSMutableDictionary(dictionary:dict)\n        importedAddress = addressDict!.object(forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_KEY_ADDRESS) as! String?\n        unspentOutputs = NSMutableArray()\n        processedTxSet = NSMutableSet()\n        if (addressDict!.object(forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_KEY_KEY) != nil) {\n            self.watchOnly = false\n        } else {\n            self.watchOnly = true\n        }\n        \n        self.archived = addressDict!.object(forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_KEY_STATUS) as! Int == TLAddressStatus.archived.rawValue\n        resetAccountBalances()\n    }\n    \n    func hasSetPrivateKeyInMemory() -> (Bool) {\n        return privateKey != nil\n    }\n    \n    func setPrivateKeyInMemory(_ privKey:String) -> (Bool) {\n        if (TLCoreBitcoinWrapper.getAddress(privKey, isTestnet: self.appWallet!.walletConfig.isTestnet) == getAddress()) {\n            privateKey = privKey\n            return true\n        }\n        return false\n    }\n    \n    func clearPrivateKeyFromMemory() -> (){\n        privateKey = nil\n    }\n    \n    func getDefaultAddressLabel()-> (String?) {\n        return importedAddress\n    }\n    \n    func setHasFetchedAccountData(_ fetched:Bool) -> () {\n        self.fetchedAccountData = fetched\n        if fetched {\n            self.downloadState = .downloaded\n        }\n        if self.fetchedAccountData == true && self.listeningToIncomingTransactions == false {\n            self.listeningToIncomingTransactions = true\n            let address = self.getAddress()\n            TLTransactionListener.instance().listenToIncomingTransactionForAddress(address)\n        }\n    }\n    \n    func hasFetchedAccountData() -> (Bool){\n        return self.fetchedAccountData\n    }\n    \n    func getUnspentArray() -> (NSArray?) {\n        return unspentOutputs\n    }\n    \n    func getUnspentSum() -> (TLCoin?) {\n        if (unspentOutputsSum != nil) {\n            return unspentOutputsSum\n        }\n        \n        if (unspentOutputs == nil) {\n            return TLCoin.zero()\n        }\n        \n        var unspentOutputsSumTemp:UInt64 = 0\n        for unspentOutput in unspentOutputs as! [NSDictionary] {\n            let amount = unspentOutput.object(forKey: \"value\") as! NSNumber\n            unspentOutputsSumTemp += UInt64(amount)\n        }\n        \n        \n        unspentOutputsSum = TLCoin(uint64: unspentOutputsSumTemp)\n        return unspentOutputsSum\n    }\n\n    func getInputsNeededToConsume(_ amountNeeded: TLCoin) -> Int {\n        var valueSelected:UInt64 = 0\n        var inputCount = 0\n        for _unspentOutput in unspentOutputs! {\n            let unspentOutput = _unspentOutput as! NSDictionary\n            let amount = unspentOutput.object(forKey: \"value\") as! NSNumber\n            valueSelected += amount.uint64Value\n            inputCount += 1\n            if valueSelected >= amountNeeded.toUInt64() {\n                return inputCount\n            }\n        }\n        return inputCount\n    }\n    \n    func setUnspentOutputs(_ unspentOuts:NSArray)-> () {\n        unspentOutputs = unspentOuts.copy() as? NSArray\n    }\n    \n    func getBalance() -> (TLCoin?) {\n        return self.balance\n    }\n    \n    func isWatchOnly() -> (Bool) {\n        return self.watchOnly\n    }\n    \n    func setArchived(_ archived:Bool) -> () {\n        self.archived = archived\n    }\n    \n    func isArchived() -> (Bool) {\n        return self.archived\n    }\n    \n    func getPositionInWalletArray() -> Int {\n        return positionInWalletArray ?? 0\n    }\n    \n    func getPositionInWalletArrayNumber() -> (NSNumber) {\n        return NSNumber(value: positionInWalletArray ?? 0 as Int)\n    }\n    \n    \n    func setPositionInWalletArray(_ idx: Int) -> () {\n        positionInWalletArray = idx\n    }\n    \n    func isPrivateKeyEncrypted() -> (Bool) {\n        if (self.watchOnly) {\n            return false\n        }\n        if (TLCoreBitcoinWrapper.isBIP38EncryptedKey(addressDict!.object(forKey: \"key\") as! String, isTestnet: self.appWallet!.walletConfig.isTestnet)) {\n            return true\n        }\n        return false\n    }\n    \n    func getAddress() -> String {\n        return addressDict!.object(forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_KEY_ADDRESS) as! String\n    }\n    \n    func getEitherPrivateKeyOrEncryptedPrivateKey() -> String? {\n        if (self.watchOnly) {\n            return privateKey\n        } else {\n            return addressDict!.object(forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_KEY_KEY) as? String\n        }\n    }\n    \n    func getPrivateKey() -> (String?) {\n        if (self.watchOnly) {\n            return privateKey\n        }\n        else if (isPrivateKeyEncrypted()) {\n            return privateKey\n        }\n        else {\n            return addressDict!.object(forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_KEY_KEY) as? String\n        }\n    }\n    \n    func getEncryptedPrivateKey() -> (String?) {\n        if (isPrivateKeyEncrypted()) {\n            return addressDict!.object(forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_KEY_KEY) as? String\n        } else {\n            return nil\n        }\n    }\n    \n    func getLabel() -> (String) {\n        if (addressDict!.object(forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_KEY_LABEL) as? String == nil ||\n            addressDict!.object(forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_KEY_LABEL) as! String == \"\") {\n            return addressDict!.object(forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_KEY_ADDRESS) as! String\n        }\n        else {\n            return addressDict!.object(forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_KEY_LABEL) as! String\n        }\n    }\n    \n    func getTxObjectCount() -> (Int) {\n        return txObjectArray!.count\n    }\n    \n    func getTxObject(_ txIdx: Int) -> TLTxObject {\n        return txObjectArray!.object(at: txIdx) as! TLTxObject\n    }\n    \n    func getAccountAmountChangeForTx(_ txHash: String) -> TLCoin? {\n        return txidToAccountAmountDict!.object(forKey: txHash) as? TLCoin\n    }\n    \n    func getAccountAmountChangeTypeForTx(_ txHash:String) -> TLAccountTxType {\n        return TLAccountTxType(rawValue: Int(txidToAccountAmountTypeDict!.object(forKey: txHash) as! Int))!\n    }\n    \n    \n    func processNewTx(_ txObject: TLTxObject) -> TLCoin? {\n        if (processedTxSet!.contains(txObject.getHash()!)) {\n            // happens when you send coins to the same account, so you get the same tx from the websockets more then once\n            return nil\n        }\n        let doesTxInvolveAddressAndReceivedAmount = processTx(txObject, shouldUpdateAccountBalance: true)\n        \n        txObjectArray!.insert(txObject, at:0)\n        return doesTxInvolveAddressAndReceivedAmount.1\n    }\n    \n    func processTxArray(_ txArray: NSArray, shouldUpdateAccountBalance: Bool) -> (){\n        resetAccountBalances()\n\n        for tx in txArray as! [NSDictionary] {\n            let txObject = TLTxObject(dict:tx)\n            let doesTxInvolveAddressAndReceivedAmount = processTx(txObject, shouldUpdateAccountBalance: shouldUpdateAccountBalance)\n            if (doesTxInvolveAddressAndReceivedAmount.0) {\n                txObjectArray!.add(txObject)\n            }\n        }\n    }\n    \n    fileprivate func processTx(_ txObject: TLTxObject, shouldUpdateAccountBalance: Bool) -> (Bool, TLCoin?) {\n        haveUpDatedUTXOs = false\n        processedTxSet!.add(txObject.getHash()!)\n        var currentTxSubtract:UInt64 = 0\n        var currentTxAdd:UInt64 = 0\n        var doesTxInvolveAddress = false\n        let ouputAddressToValueArray = txObject.getOutputAddressToValueArray()\n        for output in ouputAddressToValueArray as! [NSDictionary] {\n            var value:UInt64 = 0;\n            if let v = output.object(forKey: \"value\") as? NSNumber {\n                value = UInt64(v.uint64Value)\n            }\n            let address = output.object(forKey: \"addr\") as? String\n            if (address != nil && address == importedAddress) {\n                currentTxAdd += value\n                doesTxInvolveAddress = true\n            }\n        }\n        \n        let inputAddressToValueArray = txObject.getInputAddressToValueArray()\n        for input in inputAddressToValueArray as! [NSDictionary] {\n            var value:UInt64 = 0;\n            if let v = input.object(forKey: \"value\") as? NSNumber {\n                value = UInt64(v.uint64Value)\n            }\n            let address = input.object(forKey: \"addr\") as? String\n            if (address != nil && address == importedAddress) {\n                currentTxSubtract += value\n                doesTxInvolveAddress = true\n            }\n            \n        }\n        \n        if (shouldUpdateAccountBalance) {\n            self.balance = TLCoin(uint64: self.balance.toUInt64() + currentTxAdd - currentTxSubtract)\n        }\n\n        let receivedAmount:TLCoin?\n        if (currentTxSubtract > currentTxAdd) {\n            let amountChangeToAccountFromTx = TLCoin(uint64:currentTxSubtract - currentTxAdd)\n            txidToAccountAmountDict!.setObject(amountChangeToAccountFromTx, forKey:txObject.getHash()!)\n            txidToAccountAmountTypeDict!.setObject(TLAccountTxType.send.rawValue, forKey:txObject.getHash()!)\n            receivedAmount = nil\n        } else if (currentTxSubtract < currentTxAdd) {\n            let amountChangeToAccountFromTx = TLCoin(uint64:currentTxAdd - currentTxSubtract)\n            txidToAccountAmountDict!.setObject(amountChangeToAccountFromTx, forKey:txObject.getHash()!)\n            txidToAccountAmountTypeDict!.setObject(TLAccountTxType.receive.rawValue, forKey:txObject.getHash()!)\n            receivedAmount = amountChangeToAccountFromTx\n        } else {\n            let amountChangeToAccountFromTx = TLCoin.zero()\n            txidToAccountAmountDict!.setObject(amountChangeToAccountFromTx, forKey:txObject.getHash()!)\n            txidToAccountAmountTypeDict!.setObject(TLAccountTxType.moveBetweenAccount.rawValue, forKey:txObject.getHash()!)\n            receivedAmount = nil\n        }\n        \n        return (doesTxInvolveAddress, receivedAmount)\n    }\n    \n    func getSingleAddressData(_ success: @escaping TLWalletUtils.Success, failure:@escaping TLWalletUtils.Error) -> () {\n        TLBlockExplorerAPI.instance().getAddressesInfo([importedAddress!], success:{(jsonData:AnyObject!) in\n            \n            let addressesArray = jsonData.object(forKey: \"addresses\") as! NSArray\n            for addressDict in addressesArray {\n                let addressBalance = ((addressDict as AnyObject).object(forKey: \"final_balance\") as! NSNumber).uint64Value\n                self.balance = TLCoin(uint64: addressBalance)\n\n                self.processTxArray((jsonData as! NSDictionary!).object(forKey: \"txs\") as! NSArray, shouldUpdateAccountBalance: false)\n            }\n            \n            self.setHasFetchedAccountData(true)\n            DLog(\"postNotificationName: EVENT_FETCHED_ADDRESSES_DATA \\(self.getAddress())\")\n            NotificationCenter.default.post(name: Notification.Name(rawValue: TLNotificationEvents.EVENT_FETCHED_ADDRESSES_DATA())\n                ,object:self.importedAddress, userInfo:nil)\n            \n            success()\n            }, failure: {(code, status) in\n                failure()\n            }\n        )\n    }\n    \n    func getSingleAddressDataO(_ fetchDataAgain:Bool) -> () {\n        if self.fetchedAccountData == true && !fetchDataAgain {\n            self.downloadState = .downloaded\n            return\n        }\n        \n        let jsonData = TLBlockExplorerAPI.instance().getAddressesInfoSynchronous([importedAddress!])\n        let addressesArray = jsonData.object(forKey: \"addresses\") as! NSArray\n        for addressDict in addressesArray {\n            let addressBalance = ((addressDict as AnyObject).object(forKey: \"final_balance\") as! NSNumber).uint64Value\n            self.balance = TLCoin(uint64: addressBalance)\n            self.processTxArray(jsonData.object(forKey: \"txs\") as! NSArray, shouldUpdateAccountBalance: false)\n        }\n        \n        self.setHasFetchedAccountData(true)\n        DispatchQueue.main.async(execute: {\n            DLog(\"postNotificationName: EVENT_FETCHED_ADDRESSES_DATA \\(self.getAddress())\")\n            NotificationCenter.default.post(name: Notification.Name(rawValue: TLNotificationEvents.EVENT_FETCHED_ADDRESSES_DATA())\n                ,object:self.importedAddress, userInfo:nil)\n        })\n    }\n    \n    func setLabel(_ label:NSString) -> (){\n        addressDict!.setObject(label, forKey:TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_KEY_LABEL as NSCopying)\n    }\n    \n    fileprivate func resetAccountBalances() -> () {\n        txObjectArray = NSMutableArray()\n        txidToAccountAmountDict = NSMutableDictionary()\n        txidToAccountAmountTypeDict = NSMutableDictionary()\n    }\n}\n"
  },
  {
    "path": "ArcBit/model/TLImportedAddresses.swift",
    "content": "//\n//  TLImportedAddresses.swift\n//  ArcBit\n//\n//  Created by Timothy Lee on 3/14/15.\n//  Copyright (c) 2015 Timothy Lee <stequald01@gmail.com>\n//\n//   This library is free software; you can redistribute it and/or\n//   modify it under the terms of the GNU Lesser General Public\n//   License as published by the Free Software Foundation; either\n//   version 2.1 of the License, or (at your option) any later version.\n//\n//   This library is distributed in the hope that it will be useful,\n//   but WITHOUT ANY WARRANTY; without even the implied warranty of\n//   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n//   Lesser General Public License for more details.\n//\n//   You should have received a copy of the GNU Lesser General Public\n//   License along with this library; if not, write to the Free Software\n//   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,\n//   MA 02110-1301  USA\n\nimport Foundation\n\n@objc class TLImportedAddresses:NSObject\n{\n    fileprivate var appWallet:TLWallet?\n    fileprivate let importedAddresses = NSMutableArray()\n    fileprivate let archivedImportedAddresses = NSMutableArray()\n    fileprivate let addressToIdxDict = NSMutableDictionary()\n    fileprivate let addressToPositionInWalletArrayDict = NSMutableDictionary()\n    fileprivate var accountAddressType:TLAccountAddressType?\n    var downloadState:TLDownloadState = .notDownloading\n\n    init(appWallet: TLWallet, importedAddresses:NSArray, accountAddressType:(TLAccountAddressType)) {\n        super.init()\n        self.appWallet = appWallet\n        self.accountAddressType = accountAddressType\n        \n        for i in stride(from: 0, to: importedAddresses.count, by: 1) {\n            let importedAddressObject = importedAddresses.object(at: i) as! TLImportedAddress\n            if (importedAddressObject.isArchived()) {\n                self.archivedImportedAddresses.add(importedAddressObject)\n            } else {\n                var indexes = self.addressToIdxDict.object(forKey: importedAddressObject.getAddress()) as? NSMutableArray\n                if (indexes == nil) {\n                    indexes = NSMutableArray()\n                    self.addressToIdxDict.setObject(indexes!, forKey:importedAddressObject.getAddress() as NSCopying)\n                }\n                \n                indexes!.add(self.importedAddresses.count)\n                \n                self.importedAddresses.add(importedAddressObject)\n            }\n            \n            importedAddressObject.setPositionInWalletArray(i)\n            self.addressToPositionInWalletArrayDict.setObject(importedAddressObject, forKey:importedAddressObject.getPositionInWalletArrayNumber())\n        }\n    }\n    \n    func getAddressObjectAtIdx(_ idx:Int) -> TLImportedAddress {\n        return self.importedAddresses.object(at: idx) as! TLImportedAddress\n    }\n    \n    func getArchivedAddressObjectAtIdx(_ idx:Int) -> TLImportedAddress{\n        return self.archivedImportedAddresses.object(at: idx) as! TLImportedAddress\n    }\n    \n    func getCount() -> Int{\n        return self.importedAddresses.count\n    }\n    \n    func getArchivedCount() -> Int{\n        return self.archivedImportedAddresses.count\n    }\n    \n    func checkToGetAndSetAddressesData(_ fetchDataAgain:Bool, success:@escaping TLWalletUtils.Success, failure:@escaping TLWalletUtils.Error) -> () {\n        let addresses = NSMutableSet()\n\n        for importedAddressObject in self.importedAddresses {\n            if (!(importedAddressObject as! TLImportedAddress).hasFetchedAccountData() || fetchDataAgain) {\n                let address = (importedAddressObject as! TLImportedAddress).getAddress()\n                addresses.add(address)\n                \n            }\n        }\n        \n        if (addresses.count == 0) {\n            success()\n            return\n        }\n\n        TLBlockExplorerAPI.instance().getAddressesInfo(addresses.allObjects as! [String], success:{(jsonData:AnyObject!) in\n            let addressesArray = jsonData.object(forKey: \"addresses\") as! NSArray\n            let txArray = jsonData.object(forKey: \"txs\") as! NSArray\n            for addressDict in addressesArray {\n                let address = (addressDict as! NSDictionary).object(forKey: \"address\") as! String\n                \n                let indexes = self.addressToIdxDict.object(forKey: address) as! NSArray\n                for idx in indexes {\n                    let importedAddressObject = self.importedAddresses.object(at: idx as! Int) as! TLImportedAddress\n                    let addressBalance = ((addressDict as AnyObject).object(forKey: \"final_balance\") as! NSNumber).uint64Value\n                    importedAddressObject.balance = TLCoin(uint64: addressBalance)\n                    importedAddressObject.processTxArray(txArray, shouldUpdateAccountBalance: false)\n                    importedAddressObject.setHasFetchedAccountData(true)\n                }\n            }\n            \n            DLog(\"postNotificationName: EVENT_FETCHED_ADDRESSES_DATA importedAddresses\")\n            NotificationCenter.default.post(name: Notification.Name(rawValue: TLNotificationEvents.EVENT_FETCHED_ADDRESSES_DATA()),\n                object:nil, userInfo:nil)\n            \n            success()\n            } , failure:{(code, status) in\n                failure()\n        })\n    }\n    \n    func checkToGetAndSetAddressesDataO(_ fetchDataAgain:Bool) -> () {\n        let addresses = NSMutableSet()\n        \n        for importedAddressObject in self.importedAddresses {\n            if (!(importedAddressObject as! TLImportedAddress).hasFetchedAccountData() || fetchDataAgain) {\n                let address = (importedAddressObject as! TLImportedAddress).getAddress()\n                addresses.add(address)\n                \n            }\n        }\n        \n        if (addresses.count == 0) {\n            return\n        }\n        \n        let jsonData = TLBlockExplorerAPI.instance().getAddressesInfoSynchronous(addresses.allObjects as! [String])\n        if (jsonData.object(forKey: TLNetworking.STATIC_MEMBERS.HTTP_ERROR_CODE) != nil) {\n            self.downloadState = .failed\n            return\n        }\n\n        let addressesArray = jsonData.object(forKey: \"addresses\") as! NSArray\n        let txArray = jsonData.object(forKey: \"txs\") as! NSArray\n        for addressDict in addressesArray {\n            let address = (addressDict as! NSDictionary).object(forKey: \"address\") as! String\n            \n            let indexes = (self.addressToIdxDict).object(forKey: address) as! NSArray\n            for idx in indexes {\n                let importedAddressObject = self.importedAddresses.object(at: idx as! Int) as! TLImportedAddress\n                let addressBalance = ((addressDict as AnyObject).object(forKey: \"final_balance\") as! NSNumber).uint64Value\n                importedAddressObject.balance = TLCoin(uint64: addressBalance)\n                importedAddressObject.processTxArray(txArray, shouldUpdateAccountBalance: false)\n                importedAddressObject.setHasFetchedAccountData(true)\n            }\n        }\n        \n        self.downloadState = .downloaded\n        DispatchQueue.main.async(execute: {\n            DLog(\"postNotificationName: EVENT_FETCHED_ADDRESSES_DATA importedAddresses\")\n            NotificationCenter.default.post(name: Notification.Name(rawValue: TLNotificationEvents.EVENT_FETCHED_ADDRESSES_DATA()), object:nil, userInfo:nil)\n        })\n    }\n    \n    func addImportedPrivateKey(_ privateKey:String, encryptedPrivateKey:String?) -> (TLImportedAddress) {\n        let importedPrivateKeyDict = self.appWallet!.addImportedPrivateKey(privateKey, encryptedPrivateKey:encryptedPrivateKey)\n        \n        let importedAddressObject = TLImportedAddress(appWallet:self.appWallet!, dict:importedPrivateKeyDict)\n        self.importedAddresses.add(importedAddressObject)\n        \n        importedAddressObject.setPositionInWalletArray(self.importedAddresses.count + self.archivedImportedAddresses.count - 1)\n        self.addressToPositionInWalletArrayDict.setObject(importedAddressObject, forKey:importedAddressObject.getPositionInWalletArrayNumber())\n        \n        let address = TLCoreBitcoinWrapper.getAddress(privateKey, isTestnet: self.appWallet!.walletConfig.isTestnet)\n        \n        var indexes = self.addressToIdxDict.object(forKey: address!) as! NSMutableArray?\n        if (indexes == nil) {\n            indexes = NSMutableArray()\n            self.addressToIdxDict.setObject(indexes!, forKey:importedAddressObject.getAddress() as NSCopying)\n        }\n        \n        indexes!.add(self.importedAddresses.count-1)\n        \n        setLabel(importedAddressObject.getDefaultAddressLabel()!, positionInWalletArray:importedAddressObject.getPositionInWalletArray())\n        \n        return importedAddressObject\n    }\n    \n    func addImportedWatchAddress(_ address:String) -> (TLImportedAddress) {\n        let importedDict = self.appWallet!.addWatchOnlyAddress(address as NSString)\n        let importedAddressObject = TLImportedAddress(appWallet:self.appWallet!, dict:importedDict)\n        self.importedAddresses.add(importedAddressObject)\n        \n        importedAddressObject.setPositionInWalletArray(self.importedAddresses.count + self.archivedImportedAddresses.count - 1)\n        self.addressToPositionInWalletArrayDict.setObject(importedAddressObject, forKey:importedAddressObject.getPositionInWalletArrayNumber())\n        \n        var indexes = self.addressToIdxDict.object(forKey: address) as? NSMutableArray\n        if (indexes == nil) {\n            indexes = NSMutableArray()\n            self.addressToIdxDict.setObject(indexes!, forKey:address as NSCopying)\n        }\n        \n        indexes!.add(self.importedAddresses.count-1)\n        \n        setLabel(importedAddressObject.getDefaultAddressLabel()!, positionInWalletArray:importedAddressObject.getPositionInWalletArray())\n        \n        return importedAddressObject\n    }\n    \n    func setLabel(_ label:String, positionInWalletArray:Int) {\n        let importedAddressObject = self.addressToPositionInWalletArrayDict.object(forKey: positionInWalletArray) as! TLImportedAddress\n        \n        importedAddressObject.setLabel(label as NSString)\n        if (self.accountAddressType == .imported) {\n            self.appWallet!.setImportedPrivateKeyLabel(label, idx:positionInWalletArray)\n        } else if (self.accountAddressType! == .importedWatch) {\n            self.appWallet!.setWatchOnlyAddressLabel(label, idx:positionInWalletArray)\n        }\n    }\n    \n    func archiveAddress(_ positionInWalletArray:Int) -> () {\n        self.setArchived(positionInWalletArray, archive:true)\n        \n        let toMoveAddressObject = self.addressToPositionInWalletArrayDict.object(forKey: positionInWalletArray) as! TLImportedAddress\n        var indexes = self.addressToIdxDict.object(forKey: toMoveAddressObject.getAddress()) as? NSMutableArray\n        if (indexes == nil) {\n            indexes = NSMutableArray()\n            self.addressToIdxDict.setObject(indexes!, forKey:toMoveAddressObject.getAddress() as NSCopying)\n        }\n        let toMoveIndex = self.importedAddresses.index(of: toMoveAddressObject) as Int\n        \n        for key in self.addressToIdxDict {\n            let indexes: AnyObject = (self.addressToIdxDict.object(forKey: key.key) as! NSArray).copy() as AnyObject\n            \n            for idx in indexes as! [Int] {\n                if (idx > toMoveIndex) {\n                    let indexes = self.addressToIdxDict.object(forKey: key.key) as! NSMutableArray\n                    indexes.remove(idx)\n                    indexes.add(UInt(idx)-1)\n                }\n            }\n        }\n        \n        indexes!.remove(toMoveIndex)\n        \n        self.importedAddresses.remove(toMoveAddressObject)\n        for i in stride(from: 0, to: self.archivedImportedAddresses.count, by: 1) {\n            let importedAddressObject = self.archivedImportedAddresses.object(at: i) as! TLImportedAddress\n            \n            if (importedAddressObject.getPositionInWalletArray() > toMoveAddressObject.getPositionInWalletArray()) {\n                self.archivedImportedAddresses.insert(toMoveAddressObject, at:i)\n                return\n            }\n        }\n        self.archivedImportedAddresses.add(toMoveAddressObject)\n    }\n    \n    func unarchiveAddress(_ positionInWalletArray:Int) -> (){\n        setArchived(positionInWalletArray, archive:false)\n        \n        let toMoveAddressObject = self.addressToPositionInWalletArrayDict.object(forKey: positionInWalletArray) as! TLImportedAddress\n        \n        self.archivedImportedAddresses.remove(toMoveAddressObject)\n        for i in stride(from: 0, to: self.importedAddresses.count, by: 1) {\n            let importedAddressObject = self.importedAddresses.object(at: i) as! TLImportedAddress\n            if (importedAddressObject.getPositionInWalletArray() > toMoveAddressObject.getPositionInWalletArray()) {\n                self.importedAddresses.insert(toMoveAddressObject, at:i)\n                var indexes = self.addressToIdxDict.object(forKey: toMoveAddressObject.getAddress()) as? NSMutableArray\n                if (indexes == nil) {\n                    indexes = NSMutableArray()\n                    indexes!.add(i)\n                    self.addressToIdxDict.setObject(indexes!, forKey:toMoveAddressObject.getAddress() as NSCopying)\n                }\n                \n                for key in self.addressToIdxDict {\n                    let indexes: AnyObject = (self.addressToIdxDict.object(forKey: key.key) as! NSArray).copy() as AnyObject\n                    for idx in indexes as! [Int] {\n                        if (idx >= i) {\n                            let indexes = self.addressToIdxDict.object(forKey: key.key) as! NSMutableArray\n                            indexes.remove(idx)\n                            indexes.add(UInt(idx)+1)\n                        }\n                    }\n                }\n                \n                return\n            }\n        }\n        self.importedAddresses.add(toMoveAddressObject)\n    }\n    \n    fileprivate func setArchived(_ positionInWalletArray:Int, archive:Bool) -> Bool{\n        let importedAddressObject = self.addressToPositionInWalletArrayDict.object(forKey: positionInWalletArray) as! TLImportedAddress\n        \n        importedAddressObject.setArchived(archive)\n        if (self.accountAddressType! == .imported) {\n            self.appWallet!.setImportedPrivateKeyArchive(archive, idx:positionInWalletArray)\n        } else if (self.accountAddressType == .importedWatch) {\n            self.appWallet!.setWatchOnlyAddressArchive(archive, idx:positionInWalletArray)\n        }\n        \n        return true\n    }\n    \n    func deleteAddress(_ idx:Int) -> Bool {\n        let importedAddressObject = self.archivedImportedAddresses.object(at: idx) as! TLImportedAddress\n        \n        self.archivedImportedAddresses.removeObject(at: idx)\n        if (self.accountAddressType == .imported) {\n            self.appWallet!.deleteImportedPrivateKey(importedAddressObject.getPositionInWalletArray())\n        } else if (self.accountAddressType == .importedWatch) {\n            self.appWallet!.deleteImportedWatchAddress(importedAddressObject.getPositionInWalletArray())\n        }\n        \n        self.addressToPositionInWalletArrayDict.removeObject(forKey: importedAddressObject.getPositionInWalletArrayNumber())\n        let tmpDict = self.addressToPositionInWalletArrayDict.copy() as! NSDictionary\n        for (key, _) in tmpDict {\n            let ia = self.addressToPositionInWalletArrayDict.object(forKey: key as! NSNumber) as! TLImportedAddress\n            if (ia.getPositionInWalletArray() > importedAddressObject.getPositionInWalletArray()) {\n                ia.setPositionInWalletArray(ia.getPositionInWalletArray()-1)\n                self.addressToPositionInWalletArrayDict.setObject(ia, forKey:ia.getPositionInWalletArrayNumber())\n            }\n        }\n        \n\n        if importedAddressObject.getPositionInWalletArray() < self.addressToPositionInWalletArrayDict.count - 1 {\n            self.addressToPositionInWalletArrayDict.removeObject(forKey: self.addressToPositionInWalletArrayDict.count-1)\n        }\n        \n        return true\n    }\n    \n    func hasFetchedAddressesData() -> Bool {\n        for importedAddressObject in self.importedAddresses {\n            if (!((importedAddressObject as! TLImportedAddress).hasFetchedAccountData())) {\n                return false\n            }\n        }\n        return true\n    }\n}\n\n"
  },
  {
    "path": "ArcBit/model/TLOperationsManager.swift",
    "content": "//\n//  TLOperationsManager.swift\n//  ArcBit\n//\n//  Created by Timothy Lee on 3/14/15.\n//  Copyright (c) 2015 Timothy Lee <stequald01@gmail.com>\n//\n//   This library is free software; you can redistribute it and/or\n//   modify it under the terms of the GNU Lesser General Public\n//   License as published by the Free Software Foundation; either\n//   version 2.1 of the License, or (at your option) any later version.\n//\n//   This library is distributed in the hope that it will be useful,\n//   but WITHOUT ANY WARRANTY; without even the implied warranty of\n//   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n//   Lesser General Public License for more details.\n//\n//   You should have received a copy of the GNU Lesser General Public\n//   License along with this library; if not, write to the Free Software\n//   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,\n//   MA 02110-1301  USA\n\nimport Foundation\n\nclass PendingOperations {\n    fileprivate lazy var downloadQueue:OperationQueue = {\n        var queue = OperationQueue()\n        queue.qualityOfService = QualityOfService.userInteractive\n        queue.name = \"Fetch addresses data queue\"\n        return queue\n        }()\n    \n    func addSetUpImportedAddressesOperation(_ importedAddresses: TLImportedAddresses, fetchDataAgain :Bool, success: @escaping TLWalletUtils.Success) -> Bool {\n        if importedAddresses.downloadState == .queuedForDownloading || importedAddresses.downloadState == .downloading\n            || (!fetchDataAgain && importedAddresses.downloadState == .downloaded)  {\n            return false\n        }\n        importedAddresses.downloadState = .queuedForDownloading\n        \n        let downloader = SetUpImportedAddressesOperation(importedAddresses: importedAddresses, fetchDataAgain: fetchDataAgain)\n        downloader.completionBlock = {\n            if downloader.isCancelled {\n                return\n            }\n            DispatchQueue.main.async(execute: {\n                success()\n            })\n        }\n        self.downloadQueue.addOperation(downloader)\n        return true\n    }\n    \n    func addSetUpImportedAddressOperation(_ importedAddress: TLImportedAddress, fetchDataAgain :Bool, success: @escaping TLWalletUtils.Success) -> Bool {\n        if importedAddress.downloadState == .queuedForDownloading || importedAddress.downloadState == .downloading\n            || (!fetchDataAgain && importedAddress.downloadState == .downloaded)  {\n            return false\n        }\n        importedAddress.downloadState = .queuedForDownloading\n        \n        let downloader = SetUpImportedAddressOperation(importedAddress: importedAddress, fetchDataAgain: fetchDataAgain)\n        downloader.completionBlock = {\n            if downloader.isCancelled {\n                DispatchQueue.main.async(execute: {\n                    success()\n                })\n                return\n            }\n            DispatchQueue.main.async(execute: {\n                success()\n            })\n        }\n        self.downloadQueue.addOperation(downloader)\n        return true\n    }\n    \n    func addSetUpAccountOperation(_ accountObject: TLAccountObject, fetchDataAgain :Bool, success: @escaping TLWalletUtils.Success) -> Bool {\n        if accountObject.downloadState == .queuedForDownloading || accountObject.downloadState == .downloading\n            || (!fetchDataAgain && accountObject.downloadState == .downloaded)  {\n            return false\n        }\n        accountObject.downloadState = .queuedForDownloading\n        \n\n        let downloader = SetUpAccountOperation(accountObject: accountObject)\n        downloader.completionBlock = {\n            if downloader.isCancelled {\n                DispatchQueue.main.async(execute: {\n                    success()\n                })\n                return\n            }\n            DispatchQueue.main.async(execute: {\n                success()\n            })\n        }\n        self.downloadQueue.addOperation(downloader)\n        return true\n    }\n}\n\nenum TLDownloadState:Int {\n    case notDownloading=0, queuedForDownloading, downloading, downloaded, failed\n}\n\nclass SetUpImportedAddressOperation: Operation {\n    let importedAddress: TLImportedAddress\n    let fetchDataAgain: Bool\n    init(importedAddress: TLImportedAddress, fetchDataAgain:Bool) {\n        self.importedAddress = importedAddress\n        self.fetchDataAgain = fetchDataAgain\n        \n    }\n    \n    override func main () {\n        if self.isCancelled {\n            return\n        }\n        \n        self.importedAddress.downloadState = .downloading\n        self.importedAddress.getSingleAddressDataO(self.fetchDataAgain)\n    }\n}\n\nclass SetUpImportedAddressesOperation: Operation {\n    let importedAddresses: TLImportedAddresses\n    let fetchDataAgain: Bool\n    \n    init(importedAddresses: TLImportedAddresses, fetchDataAgain:Bool) {\n        self.importedAddresses = importedAddresses\n        self.fetchDataAgain = fetchDataAgain\n    }\n    \n    override func main () {\n        if self.isCancelled {\n            return\n        }\n\n        self.importedAddresses.downloadState = .downloading\n        self.importedAddresses.checkToGetAndSetAddressesDataO(self.fetchDataAgain)\n    }\n}\n\nclass SetUpAccountOperation: Operation {\n    let accountObject: TLAccountObject\n    \n    init(accountObject: TLAccountObject) {\n        self.accountObject = accountObject\n    }\n    \n    override func main () {\n        if self.isCancelled {\n            return\n        }\n        \n        self.accountObject.downloadState = .downloading        \n        self.accountObject.getAccountDataO()\n    }\n}\n"
  },
  {
    "path": "ArcBit/model/TLPreferences.swift",
    "content": "//\n//  TLPreferences.swift\n//  ArcBit\n//\n//  Created by Timothy Lee on 3/14/15.\n//  Copyright (c) 2015 Timothy Lee <stequald01@gmail.com>\n//\n//   This library is free software; you can redistribute it and/or\n//   modify it under the terms of the GNU Lesser General Public\n//   License as published by the Free Software Foundation; either\n//   version 2.1 of the License, or (at your option) any later version.\n//\n//   This library is distributed in the hope that it will be useful,\n//   but WITHOUT ANY WARRANTY; without even the implied warranty of\n//   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n//   Lesser General Public License for more details.\n//\n//   You should have received a copy of the GNU Lesser General Public\n//   License along with this library; if not, write to the Free Software\n//   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,\n//   MA 02110-1301  USA\n\nimport Foundation\nclass TLPreferences\n{\n    struct CLASS_STATIC {\n        static let RESET_CLOUD_BACKUP_WALLET_FILE_NAME = false\n        \n        //keys must match keys defined in Settings.bundle/Root.plist\n        static let INAPPSETTINGS_KIT_RECEIVING_ADDRESS = \"address\"\n        static let INAPPSETTINGS_KIT_NAME = \"name\"\n        static let INAPPSETTINGS_KIT_TRANSACTION_FEE = \"transactionfee\"\n        static let INAPPSETTINGS_KIT_BLOCKEXPLORER_URL = \"blockexplorerurl\"\n        static let INAPPSETTINGS_KIT_BLOCKEXPLORER_API = \"blockexplorerapi\"\n        static let INAPPSETTINGS_KIT_STEALTH_EXPLORER_URL = \"stealthexplorerurl\"\n        static let INAPPSETTINGS_KIT_STEALTH_WEB_SOCKET_URL = \"stealthwebsocketurl\"\n        static let INAPPSETTINGS_KIT_STEALTH_SERVER_PORT = \"stealthwebserverport\"\n        static let INAPPSETTINGS_KIT_STEALTH_WEB_SOCKET_PORT = \"stealthwebsocketport\"\n        static let INAPPSETTINGS_KIT_RECEIVING_CURRENCY = \"currency\"\n        static let INAPPSETTINGS_KIT_DISPLAY_LOCAL_CURRENCY = \"displaylocalcurrency\"\n        static let INAPPSETTINGS_KIT_ENABLE_DYNAMIC_FEE = \"enabledynamicfee\"\n        static let INAPPSETTINGS_KIT_DYNAMIC_FEE_OPTION = \"dynamicfeeoption\"\n        static let INAPPSETTINGS_KIT_ENABLE_COLD_WALLET = \"enablecoldwallet\"\n\n        static let PREFERENCE_INSTALL_DATE = \"pref-install-date\"\n        static let PREFERENCE_APP_VERSION = \"pref-app-version\"\n        static let PREFERENCE_PUSH_NOTIFICTION = \"pref-push-notification\"\n        static let PREFERENCE_FIAT_DISPLAY = \"pref-fiat-display\"\n        static let PREFERENCE_BITCOIN_DISPLAY = \"pref-bitcoin-display\"\n        static let PREFERENCE_BLOCKEXPLORER_API = \"pref-blockexplorer-api\"\n        static let PREFERENCE_BLOCKEXPLORER_API_URL_DICT = \"pref-blockexplorer-api-url\"\n        static let PREFERENCE_BTC_SYMBOL_TOGGLED = \"pref-btc-symbol-toggled\"\n        static let PREFERENCE_ENABLE_BACKUP_WITH_ICLOUD = \"pref-enable-backup-with-icloud\"\n        static let INAPPSETTINGS_KIT_ENABLE_BACKUP_WITH_ICLOUD = \"enablebackupwithicloud\"\n        static let INAPPSETTINGS_KIT_ENABLE_PIN_CODE = \"enablepincode\"\n        static let INAPPSETTINGS_CAN_RESTORE_DELETED_APP = \"canrestoredeletedapp\"\n        static let PREFERENCE_CAN_RESTORE_DELETED_APP = \"pref-can-restore-deleted-app\"\n        static let PREFERENCE_CLOUD_BACKUP_WALLET_FILE_NAME = \"pref-cloud-backup-wallet-file-name\"\n        static let PREFERENCE_WALLET_PASSPHRASE = \"pref-wallet-passphrase\"\n        static let PREFERENCE_ENCRYPTED_WALLET_JSON_PASSPHRASE = \"pref-encrypted-wallet-json-passphrase\"\n        static let PREFERENCE_ENCRYPTED_WALLET_JSON_CHECKSUM = \"pref-encrypted-wallet-json-checksum\"\n        static let PREFERENCE_LAST_SAVED_ENCRYPTED_WALLET_JSON_DATE = \"pref-last-saved-encrypted-wallet-json-date\"\n        static let PREFERENCE_ENABLE_PIN_CODE = \"pref-enable-pin-code\"\n        static let PREFERENCE_WALLET_COLD_WALLET = \"pref-cold-wallet\"\n        static let PREFERENCE_WALLET_ADVANCE_MODE = \"pref-advance-mode\"\n        static let PREFERENCE_DISPLAY_LOCAL_CURRENCY = \"pref-display-local-currency\"\n        static let PREFERENCE_FEE_AMOUNT = \"pref-fee-amount\"\n        static let PREFERENCE_SUGGESTIONS_DICT = \"pref-suggestions-dict\"\n        static let PREFERENCE_ANALYTICS_DICT = \"pref-analytics-dict\"\n        static let PREFERENCE_SEND_FROM_TYPE = \"pref-send-from-type\"\n        static let PREFERENCE_SEND_FROM_INDEX = \"pref-send-from-index\"\n        static let PREFERENCE_HAS_SETUP_HDWALLET = \"pref-has-setup-hdwallet\"\n        static let PREFERENCE_ENABLE_STEALTH_ADDRESS_DEFAULT = \"pref-enable-stealth-address-default\"\n        static let PREFERENCE_ENCRYPTED_BACKUP_PASSPHRASE = \"pref-encrypted-backup-passphrase\"\n        static let PREFERENCE_ENCRYPTED_BACKUP_PASSPHRASE_KEY = \"pref-encrypted-backup-passphrase-key\"\n        static let PREFERENCE_ENABLED_PROMPT_SHOW_WEB_WALLET = \"pref-enabled-prompt-show-web-wallet\"\n        static let PREFERENCE_ENABLED_PROMPT_SHOW_TRY_COLD_WALLET = \"pref-enabled-prompt-show-try-cold-wallet\"\n        static let ENABLE_SHOW_FEE_EXPLANATION_INFO  = \"pref-disabled=showfee-explanation-info\"\n        static let PREFERENCE_ENABLED_PROMPT_RATE_APP = \"pref-enabled-prompt-rate-app\"\n        static let PREFERENCE_RATED_ONCE = \"pref-rated-once\"\n        static let HAS_RECEIVED_PAYMENT_FOR_FIRST_TIME = \"has-received-payment-for-first-time\"\n        static let HAS_SHOWN_BACKUP_PASSPHRASE = \"has-shown-backup-passphrase\"\n    }\n    \n    class func setHasSetupHDWallet(_ enabled:Bool) -> () {\n        UserDefaults.standard.set(enabled ,forKey:CLASS_STATIC.PREFERENCE_HAS_SETUP_HDWALLET)\n        UserDefaults.standard.synchronize()\n    }\n    \n    class func hasSetupHDWallet() -> (Bool) {\n        return UserDefaults.standard.bool(forKey: CLASS_STATIC.PREFERENCE_HAS_SETUP_HDWALLET)\n    }\n    \n    class func setInstallDate() -> () {\n        if(UserDefaults.standard.object(forKey: CLASS_STATIC.PREFERENCE_INSTALL_DATE) == nil) {\n            UserDefaults.standard.set(Date() ,forKey:CLASS_STATIC.PREFERENCE_INSTALL_DATE)\n            UserDefaults.standard.synchronize()\n        }\n    }\n    \n    class func getInstallDate() -> (Date?) {\n        let joinedDate = UserDefaults.standard.object(forKey: CLASS_STATIC.PREFERENCE_INSTALL_DATE) as! Date?\n        if(joinedDate == nil) {\n            return nil\n        }\n        return joinedDate\n    }\n    \n    class func getAppVersion() -> String {\n        let ver = UserDefaults.standard.string(forKey: CLASS_STATIC.PREFERENCE_APP_VERSION)\n        return ver != nil ? ver! : \"0\";\n    }\n    \n    class func setAppVersion(_ version: String) -> () {\n        UserDefaults.standard.set(version, forKey:CLASS_STATIC.PREFERENCE_APP_VERSION)\n        UserDefaults.standard.synchronize()\n    }\n    \n    class func getCurrencyIdx() -> (String?) {\n        return UserDefaults.standard.string(forKey: CLASS_STATIC.PREFERENCE_FIAT_DISPLAY)\n    }\n    \n    class func setCurrency(_ currencyIdx:String) -> () {\n        UserDefaults.standard.set(currencyIdx ,forKey:CLASS_STATIC.PREFERENCE_FIAT_DISPLAY)\n        UserDefaults.standard.synchronize()\n        NotificationCenter.default.post(name: Notification.Name(rawValue: TLNotificationEvents.EVENT_PREFERENCES_FIAT_DISPLAY_CHANGED()), object:nil, userInfo:nil)\n    }\n    \n    class func getBitcoinDenomination() -> (TLBitcoinDenomination) {\n        let value = UserDefaults.standard.string(forKey: CLASS_STATIC.PREFERENCE_BITCOIN_DISPLAY) as NSString?\n        if(value == nil) {\n            return TLBitcoinDenomination(rawValue: 0)!\n        }\n        return TLBitcoinDenomination(rawValue: value!.integerValue)!\n    }\n    \n    class func setBitcoinDisplay(_ bitcoinDisplayIdx:String) -> (){\n        UserDefaults.standard.set(bitcoinDisplayIdx ,forKey:CLASS_STATIC.PREFERENCE_BITCOIN_DISPLAY)\n        UserDefaults.standard.synchronize()\n        NotificationCenter.default.post(name: Notification.Name(rawValue: TLNotificationEvents.EVENT_PREFERENCES_BITCOIN_DISPLAY_CHANGED())\n            ,object:nil, userInfo:nil)\n    }\n    \n    class func getSendFromType() -> (TLSendFromType) {\n        return TLSendFromType(rawValue:UserDefaults.standard.integer(forKey: CLASS_STATIC.PREFERENCE_SEND_FROM_TYPE))!\n    }\n    \n    class func setSendFromType(_ sendFromType:TLSendFromType) -> () {\n        UserDefaults.standard.set(sendFromType.rawValue ,forKey:CLASS_STATIC.PREFERENCE_SEND_FROM_TYPE)\n        UserDefaults.standard.synchronize()\n    }\n    \n    class func getSendFromIndex() -> (UInt) {\n        return UInt(UserDefaults.standard.integer(forKey: CLASS_STATIC.PREFERENCE_SEND_FROM_INDEX))\n    }\n    \n    class func setSendFromIndex(_ sendFromIndex:UInt) -> () {\n        UserDefaults.standard.set(Int(sendFromIndex) ,forKey:CLASS_STATIC.PREFERENCE_SEND_FROM_INDEX)\n        UserDefaults.standard.synchronize()\n    }\n    \n    \n    class func getBlockExplorerAPI() -> (TLBlockExplorer) {\n        let value = UserDefaults.standard.string(forKey: CLASS_STATIC.PREFERENCE_BLOCKEXPLORER_API) as NSString?\n        if(value == nil) {\n            return TLBlockExplorer(rawValue: 0)!\n        }\n        return TLBlockExplorer(rawValue: value!.integerValue)!\n    }\n    \n    class func setBlockExplorerAPI(_ blockexplorerIdx:String) -> () {\n        UserDefaults.standard.set(blockexplorerIdx ,forKey:CLASS_STATIC.PREFERENCE_BLOCKEXPLORER_API)\n        UserDefaults.standard.synchronize()\n    }\n    \n    class func getBlockExplorerURL(_ blockExplorer:TLBlockExplorer) -> (String?) {\n        let blockExplorer2blockExplorerURLDict = UserDefaults.standard.object(forKey: CLASS_STATIC.PREFERENCE_BLOCKEXPLORER_API_URL_DICT) as! NSDictionary\n        let key = String(format:\"%ld\", blockExplorer.rawValue)\n        return blockExplorer2blockExplorerURLDict.value(forKey: key) as? String\n    }\n    \n    class func setBlockExplorerURL(_ blockExplorer:TLBlockExplorer, value:(String)) -> (){\n        assert(blockExplorer == TLBlockExplorer.insight, \"can only change insight URL currently\")\n        let blockExplorer2blockExplorerURLDict = (UserDefaults.standard.object(forKey: CLASS_STATIC.PREFERENCE_BLOCKEXPLORER_API_URL_DICT) as! NSDictionary).mutableCopy() as! NSDictionary\n        blockExplorer2blockExplorerURLDict.setValue(value ,forKey:String(format:\"%ld\", blockExplorer.rawValue))\n        UserDefaults.standard.set(blockExplorer2blockExplorerURLDict ,forKey:CLASS_STATIC.PREFERENCE_BLOCKEXPLORER_API_URL_DICT)\n        UserDefaults.standard.synchronize()\n    }\n    \n    class func resetBlockExplorerAPIURL() -> (){\n        let blockExplorer2blockExplorerURLDict = NSMutableDictionary(capacity: 3)\n        blockExplorer2blockExplorerURLDict.setObject(\"https://blockchain.info/\" ,forKey:String(format:\"%ld\", TLBlockExplorer.blockchain.rawValue) as NSCopying)\n        blockExplorer2blockExplorerURLDict.setObject(\"https://insight.bitpay.com/\" ,forKey:String(format:\"%ld\", TLBlockExplorer.insight.rawValue) as NSCopying)\n        blockExplorer2blockExplorerURLDict.setObject(\"https://bitcoin.toshi.io/\" ,forKey:String(format:\"%ld\", TLBlockExplorer.toshi.rawValue) as NSCopying)\n        UserDefaults.standard.set(blockExplorer2blockExplorerURLDict ,forKey:CLASS_STATIC.PREFERENCE_BLOCKEXPLORER_API_URL_DICT)\n        UserDefaults.standard.synchronize()\n    }\n    \n    class func getStealthExplorerURL() -> (String?) {\n        return UserDefaults.standard.string(forKey: CLASS_STATIC.INAPPSETTINGS_KIT_STEALTH_EXPLORER_URL)\n    }\n    \n    class func setStealthExplorerURL(_ value:(String)) -> () {\n        UserDefaults.standard.set(value ,forKey:CLASS_STATIC.INAPPSETTINGS_KIT_STEALTH_EXPLORER_URL)\n        UserDefaults.standard.synchronize()\n    }\n    \n    class func getStealthServerPort() -> (Int?) {\n        return UserDefaults.standard.integer(forKey: CLASS_STATIC.INAPPSETTINGS_KIT_STEALTH_SERVER_PORT)\n    }\n    \n    class func setStealthServerPort(_ value:(Int)) -> () {\n        UserDefaults.standard.set(value ,forKey:CLASS_STATIC.INAPPSETTINGS_KIT_STEALTH_SERVER_PORT)\n        UserDefaults.standard.synchronize()\n    }\n    \n    class func getStealthWebSocketPort() -> (Int?) {\n        return UserDefaults.standard.integer(forKey: CLASS_STATIC.INAPPSETTINGS_KIT_STEALTH_WEB_SOCKET_PORT)\n    }\n    \n    class func setStealthWebSocketPort(_ value:(Int)) -> () {\n        UserDefaults.standard.set(value ,forKey:CLASS_STATIC.INAPPSETTINGS_KIT_STEALTH_WEB_SOCKET_PORT)\n        UserDefaults.standard.synchronize()\n    }\n    \n    class func resetStealthExplorerAPIURL() -> () {\n        self.setStealthExplorerURL(TLStealthServerConfig.instance().getStealthServerUrl())\n    }\n    \n    class func resetStealthServerPort() -> () {\n        self.setStealthServerPort(TLStealthServerConfig.instance().getStealthServerPort())\n    }\n    \n    class func resetStealthWebSocketPort() -> () {\n        self.setStealthWebSocketPort(TLStealthServerConfig.instance().getWebSocketServerPort())\n    }\n    \n    class func getInAppSettingsKitBlockExplorerAPI() -> (String?){\n        return UserDefaults.standard.string(forKey: CLASS_STATIC.INAPPSETTINGS_KIT_BLOCKEXPLORER_API)\n    }\n    \n    class func setInAppSettingsKitBlockExplorerAPI(_ value:String) -> () {\n        UserDefaults.standard.set(value ,forKey:CLASS_STATIC.INAPPSETTINGS_KIT_BLOCKEXPLORER_API)\n        UserDefaults.standard.synchronize()\n    }\n    \n    class func getInAppSettingsKitBlockExplorerURL() -> (String?) {\n        return UserDefaults.standard.string(forKey: CLASS_STATIC.INAPPSETTINGS_KIT_BLOCKEXPLORER_URL)\n    }\n    \n    class func setInAppSettingsKitBlockExplorerURL(_ value: String) -> (){\n        UserDefaults.standard.set(value ,forKey:CLASS_STATIC.INAPPSETTINGS_KIT_BLOCKEXPLORER_URL)\n        UserDefaults.standard.synchronize()\n    }\n    \n    class func getInAppSettingsKitCurrencyIdx() -> (String?) {\n        return UserDefaults.standard.string(forKey: CLASS_STATIC.INAPPSETTINGS_KIT_RECEIVING_CURRENCY)\n    }\n    \n    class func setInAppSettingsKitCurrency(_ currencyIdx:String) -> () {\n        UserDefaults.standard.set(currencyIdx, forKey:CLASS_STATIC.INAPPSETTINGS_KIT_RECEIVING_CURRENCY)\n        UserDefaults.standard.synchronize()\n    }\n    \n    class func isInAppSettingsKitDisplayLocalCurrency() -> (Bool) {\n        return UserDefaults.standard.bool(forKey: CLASS_STATIC.INAPPSETTINGS_KIT_DISPLAY_LOCAL_CURRENCY)\n    }\n    \n    class func setInAppSettingsKitDisplayLocalCurrency(_ enabled:Bool) -> () {\n        UserDefaults.standard.set(enabled ,forKey:CLASS_STATIC.INAPPSETTINGS_KIT_DISPLAY_LOCAL_CURRENCY)\n        UserDefaults.standard.synchronize()\n    }\n    \n    class func getInAppSettingsKitName() -> (String?) {\n        return UserDefaults.standard.string(forKey: CLASS_STATIC.INAPPSETTINGS_KIT_NAME)\n    }\n    \n    class func setInAppSettingsKitName(_ value:String) -> () {\n        UserDefaults.standard.set(value ,forKey:CLASS_STATIC.INAPPSETTINGS_KIT_NAME)\n        UserDefaults.standard.synchronize()\n    }\n    \n    class func getInAppSettingsKitEnablePinCode() -> (Bool) {\n        return UserDefaults.standard.bool(forKey: CLASS_STATIC.INAPPSETTINGS_KIT_ENABLE_PIN_CODE)\n    }\n    \n    class func setInAppSettingsKitEnablePinCode(_ value:Bool) -> () {\n        UserDefaults.standard.set(value ,forKey:CLASS_STATIC.INAPPSETTINGS_KIT_ENABLE_PIN_CODE)\n        UserDefaults.standard.synchronize()\n    }\n    \n    class func getInAppSettingsKitTransactionFee() -> (String?) {\n        return UserDefaults.standard.string(forKey: CLASS_STATIC.INAPPSETTINGS_KIT_TRANSACTION_FEE)\n    }\n    \n    class func setInAppSettingsKitTransactionFee(_ value:String) -> () {\n        UserDefaults.standard.set(value ,forKey:CLASS_STATIC.INAPPSETTINGS_KIT_TRANSACTION_FEE)\n        UserDefaults.standard.synchronize()\n    }\n    \n    class func getInAppSettingsKitEnableBackupWithiCloud() -> (Bool) {\n        return UserDefaults.standard.bool(forKey: CLASS_STATIC.INAPPSETTINGS_KIT_ENABLE_BACKUP_WITH_ICLOUD)\n    }\n    \n    class func setInAppSettingsKitEnableBackupWithiCloud(_ value:Bool) -> () {\n        UserDefaults.standard.set(value ,forKey:CLASS_STATIC.INAPPSETTINGS_KIT_ENABLE_BACKUP_WITH_ICLOUD)\n        UserDefaults.standard.synchronize()\n    }\n    \n    class func getEnableBackupWithiCloud() -> (Bool) {\n        return UserDefaults.standard.bool(forKey: CLASS_STATIC.PREFERENCE_ENABLE_BACKUP_WITH_ICLOUD)\n    }\n    \n    class func setEnableBackupWithiCloud(_ value:Bool) -> () {\n        UserDefaults.standard.set(value ,forKey:CLASS_STATIC.PREFERENCE_ENABLE_BACKUP_WITH_ICLOUD)\n        UserDefaults.standard.synchronize()\n    }\n    \n    class func deleteAllKeychainItems() -> () {\n        JNKeychain.deleteValue(forKey: CLASS_STATIC.PREFERENCE_CLOUD_BACKUP_WALLET_FILE_NAME)\n        JNKeychain.deleteValue(forKey: CLASS_STATIC.PREFERENCE_WALLET_PASSPHRASE)\n        JNKeychain.deleteValue(forKey: CLASS_STATIC.PREFERENCE_ENCRYPTED_WALLET_JSON_PASSPHRASE)\n        JNKeychain.deleteValue(forKey: CLASS_STATIC.PREFERENCE_CAN_RESTORE_DELETED_APP)\n    }\n    \n    class func getCloudBackupWalletFileName() -> (String?) {\n        //CLASS_STATIC.RESET_CLOUD_BACKUP_WALLET_FILE_NAME = true // debug only, to reset cloud backup file name install fresh app with this set once, and comment out again\n        if (CLASS_STATIC.RESET_CLOUD_BACKUP_WALLET_FILE_NAME) {\n            return nil\n        }\n        return JNKeychain.loadValue(forKey: CLASS_STATIC.PREFERENCE_CLOUD_BACKUP_WALLET_FILE_NAME) as! String?\n    }\n    \n    class func setCloudBackupWalletFileName() -> (){\n        if (JNKeychain.loadValue(forKey: CLASS_STATIC.PREFERENCE_CLOUD_BACKUP_WALLET_FILE_NAME) != nil && !CLASS_STATIC.RESET_CLOUD_BACKUP_WALLET_FILE_NAME) {\n            NSException(name:NSExceptionName(rawValue: \"Cannot set cloud backup wallet file name\"), reason:\"Cloud backup wallet file name is already set\", userInfo:nil).raise()\n        }\n        let cloudBackupWalletFileName = String(format:\"%@.%@.%@\", TLWalletUtils.STATIC_MEMBERS.WALLET_JSON_CLOUD_BACKUP_FILE_NAME,\n            TLStealthAddress.generateEphemeralPrivkey(), TLWalletUtils.STATIC_MEMBERS.WALLET_JSON_CLOUD_BACKUP_FILE_EXTENSION)\n        DLog(\"cloudBackupWalletFileName \\(cloudBackupWalletFileName)\")\n        JNKeychain.saveValue(cloudBackupWalletFileName ,forKey:CLASS_STATIC.PREFERENCE_CLOUD_BACKUP_WALLET_FILE_NAME)\n    }\n    \n    class func deleteWalletPassphrase()  -> (){\n        JNKeychain.deleteValue(forKey: CLASS_STATIC.PREFERENCE_WALLET_PASSPHRASE)\n        UserDefaults.standard.removeObject(forKey: CLASS_STATIC.PREFERENCE_ENCRYPTED_BACKUP_PASSPHRASE)\n        UserDefaults.standard.synchronize()\n    }\n    \n    class func getWalletPassphrase(_ useKeychain:Bool)  -> (String?){\n        if useKeychain {\n            return JNKeychain.loadValue(forKey: CLASS_STATIC.PREFERENCE_WALLET_PASSPHRASE) as! String?\n        } else {\n            return UserDefaults.standard.string(forKey: CLASS_STATIC.PREFERENCE_ENCRYPTED_BACKUP_PASSPHRASE)\n        }\n    }\n    \n    class func setWalletPassphrase(_ value:String, useKeychain:Bool)  -> (){\n        if useKeychain {\n            JNKeychain.saveValue(value ,forKey:CLASS_STATIC.PREFERENCE_WALLET_PASSPHRASE)\n            UserDefaults.standard.removeObject(forKey: CLASS_STATIC.PREFERENCE_ENCRYPTED_BACKUP_PASSPHRASE)\n            UserDefaults.standard.synchronize()\n        } else {\n            UserDefaults.standard.set(value ,forKey:CLASS_STATIC.PREFERENCE_ENCRYPTED_BACKUP_PASSPHRASE)\n            UserDefaults.standard.synchronize()\n            JNKeychain.deleteValue(forKey: CLASS_STATIC.PREFERENCE_WALLET_PASSPHRASE)\n        }\n    }\n    class func deleteEncryptedWalletJSONPassphrase()  -> (){\n        JNKeychain.deleteValue(forKey: CLASS_STATIC.PREFERENCE_ENCRYPTED_WALLET_JSON_PASSPHRASE)\n        UserDefaults.standard.removeObject(forKey: CLASS_STATIC.PREFERENCE_ENCRYPTED_BACKUP_PASSPHRASE)\n        UserDefaults.standard.synchronize()\n    }\n\n    class func getEncryptedWalletPassphraseKey() -> (String?) {\n        return UserDefaults.standard.string(forKey: CLASS_STATIC.PREFERENCE_ENCRYPTED_BACKUP_PASSPHRASE_KEY)\n    }\n    \n    class func setEncryptedWalletPassphraseKey(_ value:String)  -> (){\n        UserDefaults.standard.set(value ,forKey:CLASS_STATIC.PREFERENCE_ENCRYPTED_BACKUP_PASSPHRASE_KEY)\n        UserDefaults.standard.synchronize()\n    }\n    \n    class func clearEncryptedWalletPassphraseKey() -> () {\n        UserDefaults.standard.removeObject(forKey: CLASS_STATIC.PREFERENCE_ENCRYPTED_BACKUP_PASSPHRASE_KEY)\n        UserDefaults.standard.synchronize()\n    }\n    \n    class func setCanRestoreDeletedApp(_ enabled:Bool)  -> (){\n        if (enabled) {\n            JNKeychain.saveValue(\"true\" ,forKey:CLASS_STATIC.PREFERENCE_CAN_RESTORE_DELETED_APP)\n        } else {\n            JNKeychain.saveValue(\"false\" ,forKey:CLASS_STATIC.PREFERENCE_CAN_RESTORE_DELETED_APP)\n        }\n    }\n    \n    class func canRestoreDeletedApp() -> (Bool) {\n        let enabled = JNKeychain.loadValue(forKey: CLASS_STATIC.PREFERENCE_CAN_RESTORE_DELETED_APP) as! NSString?\n        return enabled == \"true\" ? true : false\n    }\n    \n    class func getInAppSettingsKitcanRestoreDeletedApp() -> (Bool) {\n        return UserDefaults.standard.bool(forKey: CLASS_STATIC.INAPPSETTINGS_CAN_RESTORE_DELETED_APP)\n    }\n    \n    class func setInAppSettingsCanRestoreDeletedApp(_ value: Bool) -> () {\n        UserDefaults.standard.set(value ,forKey:CLASS_STATIC.INAPPSETTINGS_CAN_RESTORE_DELETED_APP)\n        UserDefaults.standard.synchronize()\n    }\n    \n    class func getEncryptedWalletJSONPassphrase(_ useKeychain:Bool) -> (String?){\n        if useKeychain {\n            return JNKeychain.loadValue(forKey: CLASS_STATIC.PREFERENCE_ENCRYPTED_WALLET_JSON_PASSPHRASE) as! String?\n        } else {\n            return UserDefaults.standard.string(forKey: CLASS_STATIC.PREFERENCE_ENCRYPTED_WALLET_JSON_PASSPHRASE) as String?\n        }\n    }\n    \n    class func setEncryptedWalletJSONPassphrase(_ value: String, useKeychain:Bool) -> () {\n        if useKeychain {\n            JNKeychain.saveValue(value ,forKey:CLASS_STATIC.PREFERENCE_ENCRYPTED_WALLET_JSON_PASSPHRASE)\n            UserDefaults.standard.removeObject(forKey: CLASS_STATIC.PREFERENCE_ENCRYPTED_WALLET_JSON_PASSPHRASE)\n            UserDefaults.standard.synchronize()\n        } else {\n            UserDefaults.standard.set(value ,forKey:CLASS_STATIC.PREFERENCE_ENCRYPTED_WALLET_JSON_PASSPHRASE)\n            UserDefaults.standard.synchronize()\n            JNKeychain.deleteValue(forKey: CLASS_STATIC.PREFERENCE_ENCRYPTED_WALLET_JSON_PASSPHRASE)\n        }\n    }\n    \n    class func getEncryptedWalletJSONChecksum() -> (String?) {\n        return UserDefaults.standard.string(forKey: CLASS_STATIC.PREFERENCE_ENCRYPTED_WALLET_JSON_CHECKSUM) as String?\n    }\n    \n    class func setEncryptedWalletJSONChecksum(_ value:String) -> (){\n        UserDefaults.standard.set(value ,forKey:CLASS_STATIC.PREFERENCE_ENCRYPTED_WALLET_JSON_CHECKSUM)\n        UserDefaults.standard.synchronize()\n    }\n    \n    class func getLastSavedEncryptedWalletJSONDate() -> (Date) {\n        return UserDefaults.standard.object(forKey: CLASS_STATIC.PREFERENCE_LAST_SAVED_ENCRYPTED_WALLET_JSON_DATE) as! Date\n    }\n    \n    class func setLastSavedEncryptedWalletJSONDate(_ value:Date) -> () {\n        UserDefaults.standard.set(value ,forKey:CLASS_STATIC.PREFERENCE_LAST_SAVED_ENCRYPTED_WALLET_JSON_DATE)\n        UserDefaults.standard.synchronize()\n    }\n    \n    class func isDisplayLocalCurrency() ->(Bool){\n        return UserDefaults.standard.bool(forKey: CLASS_STATIC.PREFERENCE_DISPLAY_LOCAL_CURRENCY)\n    }\n    \n    class func setDisplayLocalCurrency(_ enabled:Bool) -> () {\n        UserDefaults.standard.set(enabled ,forKey:CLASS_STATIC.PREFERENCE_DISPLAY_LOCAL_CURRENCY)\n        UserDefaults.standard.synchronize()\n        NotificationCenter.default.post(name: Notification.Name(rawValue: TLNotificationEvents.EVENT_DISPLAY_LOCAL_CURRENCY_TOGGLED()), object:nil)\n    }\n    \n    class func enabledColdWallet() -> (Bool) {\n        return UserDefaults.standard.bool(forKey: CLASS_STATIC.PREFERENCE_WALLET_COLD_WALLET)\n    }\n    \n    class func setEnableColdWallet(_ enabled:Bool) -> () {\n        UserDefaults.standard.set(enabled ,forKey:CLASS_STATIC.PREFERENCE_WALLET_COLD_WALLET)\n        UserDefaults.standard.synchronize()\n    }\n    \n    class func enabledInAppSettingsKitColdWallet() -> (Bool) {\n        return UserDefaults.standard.bool(forKey: CLASS_STATIC.INAPPSETTINGS_KIT_ENABLE_COLD_WALLET)\n    }\n    \n    class func setEnableInAppSettingsKitColdWallet(_ enabled:Bool) -> () {\n        UserDefaults.standard.set(enabled ,forKey:CLASS_STATIC.INAPPSETTINGS_KIT_ENABLE_COLD_WALLET)\n        UserDefaults.standard.synchronize()\n    }\n    \n    class func enabledAdvancedMode() -> (Bool) {\n        return UserDefaults.standard.bool(forKey: CLASS_STATIC.PREFERENCE_WALLET_ADVANCE_MODE)\n    }\n    \n    class func setAdvancedMode(_ enabled:Bool) -> () {\n        UserDefaults.standard.set(enabled ,forKey:CLASS_STATIC.PREFERENCE_WALLET_ADVANCE_MODE)\n        UserDefaults.standard.synchronize()\n        NotificationCenter.default.post(name: Notification.Name(rawValue: TLNotificationEvents.EVENT_ADVANCE_MODE_TOGGLED()), object:enabled)\n        if enabled {\n            NotificationCenter.default.post(name: Notification.Name(rawValue: TLNotificationEvents.EVENT_ENABLE_ADVANCE_MODE()), object:enabled)\n        }\n    }\n    \n    class func isEnablePINCode() -> (Bool) {\n        return UserDefaults.standard.bool(forKey: CLASS_STATIC.PREFERENCE_ENABLE_PIN_CODE)\n    }\n    \n    class func setEnablePINCode(_ enabled:Bool) -> () {\n        UserDefaults.standard.set(enabled ,forKey:CLASS_STATIC.PREFERENCE_ENABLE_PIN_CODE)\n        UserDefaults.standard.synchronize()\n    }\n    \n    class func getSuggestionsDict() -> (NSDictionary?){\n        return UserDefaults.standard.object(forKey: CLASS_STATIC.PREFERENCE_SUGGESTIONS_DICT) as! NSDictionary?\n    }\n    \n    class func setSuggestionsDict(_ value:NSDictionary) -> () {\n        UserDefaults.standard.set(value ,forKey:CLASS_STATIC.PREFERENCE_SUGGESTIONS_DICT)\n        UserDefaults.standard.synchronize()\n    }\n    \n    class func getAnalyticsDict() -> (NSDictionary?) {\n        return UserDefaults.standard.object(forKey: CLASS_STATIC.PREFERENCE_ANALYTICS_DICT) as! NSDictionary?\n    }\n    \n    class func setAnalyticsDict(_ value:NSDictionary) -> (){\n        UserDefaults.standard.set(value ,forKey:CLASS_STATIC.PREFERENCE_ANALYTICS_DICT)\n        UserDefaults.standard.synchronize()\n    }\n    \n    class func enabledStealthAddressDefault() -> (Bool){\n        return UserDefaults.standard.bool(forKey: CLASS_STATIC.PREFERENCE_ENABLE_STEALTH_ADDRESS_DEFAULT)\n    }\n    \n    class func setEnabledStealthAddressDefault(_ enabled:Bool) -> () {\n        UserDefaults.standard.set(enabled ,forKey:CLASS_STATIC.PREFERENCE_ENABLE_STEALTH_ADDRESS_DEFAULT)\n        UserDefaults.standard.synchronize()\n    }\n    \n    class func disabledPromptShowWebWallet() -> (Bool) {\n        return UserDefaults.standard.bool(forKey: CLASS_STATIC.PREFERENCE_ENABLED_PROMPT_SHOW_WEB_WALLET)\n    }\n    \n    class func setDisabledPromptShowWebWallet(_ disabled:Bool) -> () {\n        UserDefaults.standard.set(disabled ,forKey:CLASS_STATIC.PREFERENCE_ENABLED_PROMPT_SHOW_WEB_WALLET)\n        UserDefaults.standard.synchronize()\n    }\n    \n    class func disabledPromptShowTryColdWallet() -> (Bool) {\n        return UserDefaults.standard.bool(forKey: CLASS_STATIC.PREFERENCE_ENABLED_PROMPT_SHOW_TRY_COLD_WALLET)\n    }\n    \n    class func setDisabledPromptShowTryColdWallet(_ disabled:Bool) -> () {\n        UserDefaults.standard.set(disabled ,forKey:CLASS_STATIC.PREFERENCE_ENABLED_PROMPT_SHOW_TRY_COLD_WALLET)\n        UserDefaults.standard.synchronize()\n    }\n\n    class func disabledShowFeeExplanationInfo() -> (Bool){\n        return UserDefaults.standard.bool(forKey: CLASS_STATIC.ENABLE_SHOW_FEE_EXPLANATION_INFO)\n    }\n    \n    class func setDisableShowFeeExplanationInfo(_ disabled:Bool) -> (){\n        UserDefaults.standard.set(disabled ,forKey:CLASS_STATIC.ENABLE_SHOW_FEE_EXPLANATION_INFO)\n        UserDefaults.standard.synchronize()\n    }\n    \n    class func disabledPromptRateApp() -> (Bool) {\n        return UserDefaults.standard.bool(forKey: CLASS_STATIC.PREFERENCE_ENABLED_PROMPT_RATE_APP)\n    }\n    \n    class func setDisabledPromptRateApp(_ disabled:Bool) -> () {\n        UserDefaults.standard.set(disabled ,forKey:CLASS_STATIC.PREFERENCE_ENABLED_PROMPT_RATE_APP)\n        UserDefaults.standard.synchronize()\n    }\n    \n    class func hasRatedOnce() -> (Bool) {\n        return UserDefaults.standard.bool(forKey: CLASS_STATIC.PREFERENCE_RATED_ONCE)\n    }\n    \n    class func setHasRatedOnce() -> () {\n        UserDefaults.standard.set(true ,forKey:CLASS_STATIC.PREFERENCE_RATED_ONCE)\n        UserDefaults.standard.synchronize()\n    }\n    \n    class func hasReceivePaymentForFirstTime() -> (Bool) {\n        return UserDefaults.standard.bool(forKey: CLASS_STATIC.HAS_RECEIVED_PAYMENT_FOR_FIRST_TIME)\n    }\n    \n    class func setHasReceivePaymentForFirstTime(_ received:Bool) -> () {\n        UserDefaults.standard.set(received ,forKey:CLASS_STATIC.HAS_RECEIVED_PAYMENT_FOR_FIRST_TIME)\n        UserDefaults.standard.synchronize()\n    }\n    \n    class func hasShownBackupPassphrase() -> (Bool) {\n        return UserDefaults.standard.bool(forKey: CLASS_STATIC.HAS_SHOWN_BACKUP_PASSPHRASE)\n    }\n    \n    class func setHasShownBackupPassphrase(_ hasShown:Bool) -> () {\n        UserDefaults.standard.set(hasShown ,forKey:CLASS_STATIC.HAS_SHOWN_BACKUP_PASSPHRASE)\n        UserDefaults.standard.synchronize()\n    }\n    \n    class func enabledInAppSettingsKitDynamicFee() -> (Bool){\n        return UserDefaults.standard.bool(forKey: CLASS_STATIC.INAPPSETTINGS_KIT_ENABLE_DYNAMIC_FEE)\n    }\n    \n    class func setInAppSettingsKitEnabledDynamicFee(_ enabled:Bool) -> () {\n        UserDefaults.standard.set(enabled ,forKey:CLASS_STATIC.INAPPSETTINGS_KIT_ENABLE_DYNAMIC_FEE)\n        UserDefaults.standard.synchronize()\n    }\n\n    //WARNING: TLDynamicFeeSetting, therefore InAppSettingsKit must match the keys for 21's dynamic fee api return object keys called in TLTxFeeAPI\n    class func getInAppSettingsKitDynamicFeeSetting() -> TLDynamicFeeSetting {\n        if let fee = UserDefaults.standard.string(forKey: CLASS_STATIC.INAPPSETTINGS_KIT_DYNAMIC_FEE_OPTION) {\n            return TLDynamicFeeSetting(rawValue:fee)!\n        } else {\n            return TLDynamicFeeSetting.FastestFee\n        }\n    }\n    \n    class func setInAppSettingsKitDynamicFeeSettingIdx(_ dynamicFeeSetting:TLDynamicFeeSetting) -> () {\n        UserDefaults.standard.set(dynamicFeeSetting.rawValue ,forKey:CLASS_STATIC.INAPPSETTINGS_KIT_DYNAMIC_FEE_OPTION)\n        UserDefaults.standard.synchronize()\n    }\n}\n"
  },
  {
    "path": "ArcBit/model/TLSelectedObject.swift",
    "content": "//\n//  TLSelectedObject.swift\n//  ArcBit\n//\n//  Created by Timothy Lee on 3/14/15.\n//  Copyright (c) 2015 Timothy Lee <stequald01@gmail.com>\n//\n//   This library is free software; you can redistribute it and/or\n//   modify it under the terms of the GNU Lesser General Public\n//   License as published by the Free Software Foundation; either\n//   version 2.1 of the License, or (at your option) any later version.\n//\n//   This library is distributed in the hope that it will be useful,\n//   but WITHOUT ANY WARRANTY; without even the implied warranty of\n//   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n//   Lesser General Public License for more details.\n//\n//   You should have received a copy of the GNU Lesser General Public\n//   License along with this library; if not, write to the Free Software\n//   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,\n//   MA 02110-1301  USA\n\nimport Foundation\n@objc class TLSelectedObject:NSObject {\n    fileprivate var accountObject:TLAccountObject?\n    fileprivate var importedAddress:TLImportedAddress?\n    \n    func setSelectedAccount(_ accountObject: TLAccountObject) -> () {\n        self.accountObject = accountObject\n        self.importedAddress = nil\n    }\n    \n    func setSelectedAddress(_ importedAddress: TLImportedAddress) -> () {\n        self.importedAddress = importedAddress\n        self.accountObject = nil\n    }\n    \n    func getDownloadState() -> (TLDownloadState) {\n        if (self.accountObject != nil) {\n            return self.accountObject!.downloadState\n        } else if (self.importedAddress != nil) {\n            return self.importedAddress!.downloadState\n        }\n        \n        return .failed\n    }\n    \n    func getBalanceForSelectedObject() -> (TLCoin?) {\n        if (self.accountObject != nil) {\n            return self.accountObject!.getBalance()\n        } else if (self.importedAddress != nil) {\n            return self.importedAddress!.getBalance()\n        }\n        return nil\n    }\n    \n    func getLabelForSelectedObject() -> (String?) {\n        if (self.accountObject != nil) {\n            return self.accountObject!.getAccountName()\n        } else if (self.importedAddress != nil) {\n            return self.importedAddress!.getLabel()\n        }\n        return nil\n    }\n    \n    func getReceivingAddressesCount() -> (UInt) {\n        if (self.accountObject != nil) {\n            return UInt(self.accountObject!.getReceivingAddressesCount())\n        } else if (self.importedAddress != nil) {\n            return 1\n        }\n        return 0\n    }\n    \n    func getReceivingAddressForSelectedObject(_ idx:Int) -> (String?) {\n        if (self.accountObject != nil) {\n            return self.accountObject!.getReceivingAddress(idx)\n        } else if (self.importedAddress != nil) {\n            return self.importedAddress!.getAddress()\n        }\n        \n        return nil\n    }\n    \n    func getStealthAddress() -> String? {\n        if self.accountObject != nil && self.accountObject!.getAccountType() != .importedWatch {\n            if self.accountObject!.stealthWallet != nil {\n                return self.accountObject!.stealthWallet!.getStealthAddress()\n            }\n        }\n        return nil\n    }\n    \n    func hasFetchedCurrentFromData() -> (Bool) {\n        if (self.accountObject != nil) {\n            return self.accountObject!.hasFetchedAccountData()\n        } else if (self.importedAddress != nil) {\n            return self.importedAddress!.hasFetchedAccountData()\n        }\n        \n        return true\n    }\n    \n    \n    func isAddressPartOfAccount(_ address: String) -> (Bool) {\n        if (self.accountObject != nil) {\n            return self.accountObject!.isAddressPartOfAccount(address)\n        } else if (self.importedAddress != nil) {\n            return self.importedAddress!.getAddress() == address\n        }\n        \n        return true\n    }\n    \n    func getTxObjectCount() -> (UInt) {\n        if (self.accountObject != nil) {\n            return UInt(self.accountObject!.getTxObjectCount())\n        } else if (self.importedAddress != nil) {\n            return UInt(self.importedAddress!.getTxObjectCount())\n        }\n        \n        return 1\n    }\n    \n    func getTxObject(_ txIdx:Int) -> (TLTxObject?) {\n        if (self.accountObject != nil) {\n            return self.accountObject!.getTxObject(txIdx)\n        } else if (self.importedAddress != nil) {\n            return self.importedAddress!.getTxObject(txIdx)\n        }\n        \n        return nil\n    }\n    \n    func getAccountAmountChangeForTx(_ txHash: String) -> (TLCoin?) {\n        if (self.accountObject != nil) {\n            return self.accountObject!.getAccountAmountChangeForTx(txHash)!\n        } else if (self.importedAddress != nil) {\n            return self.importedAddress!.getAccountAmountChangeForTx(txHash)\n        }\n        \n        return nil\n    }\n    \n    func getAccountAmountChangeTypeForTx(_ txHash: String) -> (TLAccountTxType) {\n        if (self.accountObject != nil) {\n            return self.accountObject!.getAccountAmountChangeTypeForTx(txHash)\n        } else if (self.importedAddress != nil) {\n            return self.importedAddress!.getAccountAmountChangeTypeForTx(txHash)\n        }\n        \n        return TLAccountTxType(rawValue: 0)!\n    }\n    \n    func getSelectedObjectType() -> (TLSelectObjectType) {\n        if (self.accountObject != nil) {\n            return TLSelectObjectType.account\n        } else {\n            return TLSelectObjectType.address\n        }\n    }\n    \n    func getSelectedObject() -> AnyObject? {\n        if (self.accountObject != nil) {\n            return self.accountObject\n        } else {\n            return self.importedAddress\n        }\n    }\n    \n    func getAccountType() -> (TLAccountType) {\n        if (self.accountObject != nil) {\n            return self.accountObject!.getAccountType()\n        } else {\n            return TLAccountType.unknown\n        }\n    }\n}\n"
  },
  {
    "path": "ArcBit/model/TLSendFormData.swift",
    "content": "//\n//  TLSendFormData.swift\n//  ArcBit\n//\n//  Created by Timothy Lee on 3/14/15.\n//  Copyright (c) 2015 Timothy Lee <stequald01@gmail.com>\n//\n//   This library is free software; you can redistribute it and/or\n//   modify it under the terms of the GNU Lesser General Public\n//   License as published by the Free Software Foundation; either\n//   version 2.1 of the License, or (at your option) any later version.\n//\n//   This library is distributed in the hope that it will be useful,\n//   but WITHOUT ANY WARRANTY; without even the implied warranty of\n//   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n//   Lesser General Public License for more details.\n//\n//   You should have received a copy of the GNU Lesser General Public\n//   License along with this library; if not, write to the Free Software\n//   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,\n//   MA 02110-1301  USA\n\nimport Foundation\n\nenum TLSelectObjectType:Int {\n    case unknown       = 0\n    case account       = 1\n    case address       = 2\n}\n\nclass TLSendFormData {\n    struct STATIC_MEMBERS{\n        static var _instance:TLSendFormData? = nil\n    }\n    \n    var useAllFunds = false\n    var beforeSendBalance: TLCoin? = nil\n    var fromLabel:String?\n    fileprivate var address:String?\n    fileprivate var amount:String?\n    fileprivate var fiatAmount:String?\n\n    var toAmount:TLCoin?\n    var feeAmount:TLCoin?\n\n    class func instance() -> (TLSendFormData) {\n        if(STATIC_MEMBERS._instance == nil) {\n            STATIC_MEMBERS._instance = TLSendFormData()\n        }\n        return STATIC_MEMBERS._instance!\n    }\n    \n    init() {\n        self.address = nil\n        self.amount = nil\n        self.fiatAmount = nil\n    }\n    \n    func setAddress(_ address:String?) -> () {\n        self.address = address\n    }\n    \n    func getAddress() -> (String?) {\n        return self.address\n    }\n    \n    func setAmount(_ amount:String?) -> () {\n        self.amount = amount\n    }\n    \n    func getAmount() -> (String?) {\n        return self.amount\n    }\n    \n    func setFiatAmount(_ fiatAmount:String?) -> () {\n        self.fiatAmount = fiatAmount\n    }\n    \n    func getFiatAmount() -> (String?) {\n        return self.fiatAmount\n    }\n}\n\n"
  },
  {
    "path": "ArcBit/model/TLSpaghettiGodSend.swift",
    "content": "//\n//  TLSpaghettiGodSend.swift\n//  ArcBit\n//\n//  Created by Timothy Lee on 3/14/15.\n//  Copyright (c) 2015 Timothy Lee <stequald01@gmail.com>\n//\n//   This library is free software; you can redistribute it and/or\n//   modify it under the terms of the GNU Lesser General Public\n//   License as published by the Free Software Foundation; either\n//   version 2.1 of the License, or (at your option) any later version.\n//\n//   This library is distributed in the hope that it will be useful,\n//   but WITHOUT ANY WARRANTY; without even the implied warranty of\n//   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n//   Lesser General Public License for more details.\n//\n//   You should have received a copy of the GNU Lesser General Public\n//   License along with this library; if not, write to the Free Software\n//   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,\n//   MA 02110-1301  USA\n\n\n@objc class TLSpaghettiGodSend:NSObject {\n    \n    let DUST_AMOUNT:UInt64 = 546\n\n    fileprivate var appWallet: TLWallet\n    fileprivate var sendFromAccounts:NSMutableArray?\n    fileprivate var sendFromAddresses:NSMutableArray?\n\n    struct STATIC_MEMBERS {\n        static var instance:TLSpaghettiGodSend?\n    }\n    \n    init(appWallet: TLWallet) {\n        self.appWallet = appWallet\n        sendFromAccounts = NSMutableArray()\n        sendFromAddresses = NSMutableArray()\n        super.init()\n    }\n    \n    fileprivate func clearFromAccountsAndAddresses() -> () {\n        sendFromAccounts = NSMutableArray()\n        sendFromAddresses = NSMutableArray()\n    }\n    \n    func getSelectedSendObject() -> AnyObject? {\n        if (sendFromAccounts != nil && sendFromAccounts!.count != 0) {\n            return sendFromAccounts!.object(at: 0) as AnyObject?\n        } else if (sendFromAddresses != nil && sendFromAddresses!.count != 0) {\n            return sendFromAddresses!.object(at: 0) as AnyObject?\n        }\n        \n        return nil\n    }\n    \n    func getSelectedObjectType() -> (TLSelectObjectType) {\n        if (sendFromAccounts != nil && sendFromAccounts!.count != 0) {\n            return TLSelectObjectType.account\n        } else if (sendFromAddresses != nil && sendFromAddresses!.count != 0) {\n            return TLSelectObjectType.address\n        }\n        \n        return TLSelectObjectType.unknown\n    }\n    \n    \n    func isPaymentToOwnAccount(_ address: String) -> Bool {\n        if (sendFromAccounts != nil && sendFromAccounts!.count != 0) {\n            let accountObject = sendFromAccounts!.object(at: 0) as! TLAccountObject\n            if address == accountObject.stealthWallet?.getStealthAddress() {\n                return true\n            }\n            if accountObject.isAddressPartOfAccount(address) {\n                return true\n            }\n            return false\n        } else if (sendFromAddresses != nil && sendFromAddresses!.count != 0) {\n            let importedAddress = sendFromAddresses!.object(at: 0) as! TLImportedAddress\n            if address == importedAddress.getAddress() {\n                return true\n            }\n            return false\n        }\n        return false\n    }\n    \n    func haveUpDatedUTXOs() -> Bool {\n        if (sendFromAccounts != nil && sendFromAccounts!.count != 0) {\n            let accountObject = sendFromAccounts!.object(at: 0) as! TLAccountObject\n            return accountObject.haveUpDatedUTXOs\n        } else if (sendFromAddresses != nil && sendFromAddresses!.count != 0) {\n            let importedAddress = sendFromAddresses!.object(at: 0) as! TLImportedAddress\n            return importedAddress.haveUpDatedUTXOs\n        }\n        return false\n    }\n    \n    fileprivate func getLabelForSelectedSendObject() -> String? {\n        if (sendFromAccounts != nil && sendFromAccounts!.count != 0) {\n            let accountObject = sendFromAccounts!.object(at: 0) as! TLAccountObject\n            return accountObject.getAccountName()\n        } else if (sendFromAddresses != nil && sendFromAddresses!.count != 0) {\n            let importedAddress = sendFromAddresses!.object(at: 0) as! TLImportedAddress\n            return importedAddress.getLabel()\n        }\n        return nil\n    }\n    \n    func getCurrentFromLabel() -> String? {\n        if (sendFromAccounts != nil && sendFromAccounts!.count != 0) {\n            let accountObject = sendFromAccounts!.object(at: 0) as! TLAccountObject\n            return accountObject.getAccountName()\n        } else if (sendFromAddresses != nil && sendFromAddresses!.count != 0) {\n            let importedAddress = sendFromAddresses!.object(at: 0) as! TLImportedAddress\n            return importedAddress.getLabel()\n        }\n        \n        return nil\n    }\n    \n    func getStealthAddress() -> String? {\n        if (sendFromAccounts != nil && sendFromAccounts!.count != 0) {\n            let accountObject = sendFromAccounts!.object(at: 0) as! TLAccountObject\n            return accountObject.stealthWallet?.getStealthAddress()\n        }\n        return nil\n    }\n    \n    func getExtendedPubKey() -> String? {\n        if (sendFromAccounts != nil && sendFromAccounts!.count != 0) {\n            let accountObject = sendFromAccounts!.object(at: 0) as! TLAccountObject\n            return accountObject.getExtendedPubKey()\n        }\n        return nil\n    }\n    \n    func setOnlyFromAccount(_ accountObject:TLAccountObject) -> () {\n        sendFromAddresses = nil\n        sendFromAccounts = NSMutableArray(objects:accountObject)\n    }\n    \n    func setOnlyFromAddress(_ importedAddress:TLImportedAddress) -> () {\n        sendFromAccounts = nil\n        sendFromAddresses = NSMutableArray(objects:importedAddress)\n    }\n    \n    fileprivate func  addSendAccount(_ accountObject: TLAccountObject) -> () {\n        sendFromAccounts!.add(accountObject)\n    }\n    \n    fileprivate func addImportedAddress(_ importedAddress:TLImportedAddress) -> () {\n        sendFromAddresses!.add(importedAddress)\n    }\n\n    func isColdWalletAccount() -> (Bool) {\n        if (sendFromAccounts != nil && sendFromAccounts!.count != 0) {\n            let accountObject = sendFromAccounts!.object(at: 0) as! TLAccountObject\n            return accountObject.isColdWalletAccount()\n        }\n        return false\n    }\n    \n    func needWatchOnlyAccountPrivateKey() -> (Bool) {\n        if (sendFromAccounts != nil && sendFromAccounts!.count != 0) {\n            let accountObject = sendFromAccounts!.object(at: 0) as! TLAccountObject\n            return accountObject.isWatchOnly() && !accountObject.hasSetExtendedPrivateKeyInMemory()\n        }\n        return false\n    }\n    \n    func needWatchOnlyAddressPrivateKey() -> (Bool) {\n        if (sendFromAddresses != nil && sendFromAddresses!.count != 0) {\n            let importedAddress = sendFromAddresses!.object(at: 0) as! TLImportedAddress\n            return importedAddress.isWatchOnly() && !importedAddress.hasSetPrivateKeyInMemory()\n        }\n        return false\n    }\n    \n    func needEncryptedPrivateKeyPassword() -> Bool {\n        if (sendFromAddresses != nil && sendFromAddresses!.count != 0) {\n            let importedAddress = sendFromAddresses!.object(at: 0) as! TLImportedAddress\n            if (importedAddress.isWatchOnly()) {\n                return false\n            } else {\n                return importedAddress.isPrivateKeyEncrypted() && !importedAddress.hasSetPrivateKeyInMemory()\n            }\n        }\n        return false\n    }\n    \n    func getEncryptedPrivateKey () -> (String) {\n        assert(sendFromAddresses!.count != 0, \"sendFromAddresses!.count == 0\")\n        let importedAddress = sendFromAddresses!.object(at: 0) as! TLImportedAddress\n        assert(importedAddress.isPrivateKeyEncrypted() != false, \"! importedAddress isPrivateKeyEncrypted]\")\n        return importedAddress.getEncryptedPrivateKey()!\n    }\n    \n    func hasFetchedCurrentFromData() -> (Bool) {\n        if (sendFromAccounts != nil && sendFromAccounts!.count != 0) {\n            let accountObject = sendFromAccounts!.object(at: 0) as! TLAccountObject\n            return accountObject.hasFetchedAccountData()\n        } else if (sendFromAddresses != nil && sendFromAddresses!.count != 0) {\n            let importedAddress = sendFromAddresses!.object(at: 0) as! TLImportedAddress\n            return importedAddress.hasFetchedAccountData()\n        }\n        return true\n    }\n\n    func setCurrentFromBalance(_ balance: TLCoin) {\n        if (sendFromAccounts != nil && sendFromAccounts!.count != 0) {\n            let accountObject = sendFromAccounts!.object(at: 0) as! TLAccountObject\n            accountObject.accountBalance = balance\n        } else if (sendFromAddresses != nil && sendFromAddresses!.count != 0) {\n            let importedAddress = sendFromAddresses!.object(at: 0) as! TLImportedAddress\n            importedAddress.balance = balance\n        }\n    }\n    \n    func getCurrentFromBalance() -> (TLCoin) {\n        if (sendFromAccounts != nil && sendFromAccounts!.count != 0) {\n            let accountObject = sendFromAccounts!.object(at: 0) as! TLAccountObject\n            return accountObject.getBalance()\n        } else if (sendFromAddresses != nil && sendFromAddresses!.count != 0) {\n            let importedAddress = sendFromAddresses!.object(at: 0) as! TLImportedAddress\n            return importedAddress.getBalance()!\n        }\n        return TLCoin.zero()\n    }\n    \n    func getCurrentFromUnspentOutputsSum() -> (TLCoin) {\n        if (sendFromAccounts != nil && sendFromAccounts!.count != 0) {\n            let accountObject = sendFromAccounts!.object(at: 0) as! TLAccountObject\n            return accountObject.getTotalUnspentSum()\n        } else if (sendFromAddresses != nil && sendFromAddresses!.count != 0) {\n            let importedAddress = sendFromAddresses!.object(at: 0) as! TLImportedAddress\n            return importedAddress.getUnspentSum()!\n        }\n        return TLCoin.zero()\n    }\n    \n    func getAndSetUnspentOutputs(_ success:@escaping TLWalletUtils.Success, failure:@escaping TLWalletUtils.Error) -> () {\n        if (sendFromAccounts != nil && sendFromAccounts!.count != 0) {\n            let accountObject  = sendFromAccounts!.object(at: 0) as! TLAccountObject\n            let amount = accountObject.getBalance()\n            if (amount.greater(TLCoin.zero())) {\n                accountObject.getUnspentOutputs({() in\n                    success()\n                    }, failure:{() in\n                        failure()\n                    }\n                )\n            }\n            \n        } else {\n            var addresses: [String] = []\n            addresses.reserveCapacity(sendFromAddresses!.count)\n            let importedAddress = sendFromAddresses!.object(at: 0) as! TLImportedAddress\n            let amount = importedAddress.getBalance()\n            if (amount!.greater(TLCoin.zero())) {\n                addresses.append(importedAddress.getAddress())\n            }\n            \n            if (addresses.count > 0) {\n                importedAddress.haveUpDatedUTXOs = false\n                TLBlockExplorerAPI.instance().getUnspentOutputs(addresses, success:{(jsonData:AnyObject!) in\n                    let unspentOutputs = (jsonData as! NSDictionary).object(forKey: \"unspent_outputs\") as! NSArray\n                    \n                    let address2UnspentOutputs = NSMutableDictionary(capacity:addresses.count)\n                    \n                    for _unspentOutput in unspentOutputs {\n                        let unspentOutput = _unspentOutput as! NSDictionary\n                        let outputScript = unspentOutput.object(forKey: \"script\") as! String\n                        \n                        let address = TLCoreBitcoinWrapper.getAddressFromOutputScript(outputScript, isTestnet: self.appWallet.walletConfig.isTestnet)\n                        if (address == nil) {\n                            DLog(\"address cannot be decoded. not normal pubkeyhash outputScript: \\(outputScript)\")\n                            continue\n                        }\n                        \n                        var cachedUnspentOutputs = address2UnspentOutputs.object(forKey: address!) as! NSMutableArray?\n                        if (cachedUnspentOutputs == nil) {\n                            cachedUnspentOutputs = NSMutableArray()\n                            address2UnspentOutputs.setObject(cachedUnspentOutputs!, forKey:address! as NSCopying)\n                        }\n                        cachedUnspentOutputs!.add(unspentOutput)\n                    }\n                    \n                    for _address in address2UnspentOutputs {\n                        let address = _address.key as! String\n                        let idx = addresses.index(of: address)\n                        let importedAddress = self.sendFromAddresses!.object(at: idx!) as! TLImportedAddress\n                        let unspentOutputsArray = address2UnspentOutputs.object(forKey: address) as! NSArray\n                        importedAddress.unspentOutputsCount = unspentOutputsArray.count\n                        importedAddress.setUnspentOutputs(unspentOutputsArray)\n                        importedAddress.haveUpDatedUTXOs = true\n                    }\n                    \n                    success()\n                    }, failure:{(code, status) in\n                        failure()\n                    }\n                )\n            }\n        }\n    }\n    \n    class func getEstimatedTxSize(_ inputCount: Int, outputCount: Int) -> UInt64 {\n        return UInt64(10 + 159*inputCount + 34*outputCount)\n    }\n        \n    func createSignedSerializedTransactionHex(_ toAddressesAndAmounts:NSArray,\n                                              feeAmount:TLCoin, signTx: Bool = true, nonce: UInt32? = nil, ephemeralPrivateKeyHex: String? = nil, error:TLWalletUtils.ErrorWithString) -> (NSDictionary?, Array<String>, NSArray?) {\n            let inputsData = NSMutableArray()\n            let outputsData = NSMutableArray()\n            var outputValueSum = TLCoin.zero()\n\n            for _toAddressAndAmount in toAddressesAndAmounts {\n                let amount = (_toAddressAndAmount as! NSDictionary).object(forKey: \"amount\") as! TLCoin\n                outputValueSum = outputValueSum.add(amount)\n            }\n            let valueNeeded = outputValueSum.add(feeAmount)\n            \n            var valueSelected = TLCoin.zero()\n            \n            var changeAddress:NSString? = nil\n            var dustAmount:UInt64 = 0\n            \n            if sendFromAddresses != nil {\n                for _importedAddress in sendFromAddresses! {\n                    let importedAddress = _importedAddress as! TLImportedAddress\n                    if (changeAddress == nil) {\n                        changeAddress = importedAddress.getAddress() as NSString?\n                    }\n                    \n                    let unspentOutputs = importedAddress.getUnspentArray()\n                    for _unspentOutput in unspentOutputs! {\n                        let unspentOutput = _unspentOutput as! NSDictionary\n                        let amount = (unspentOutput.object(forKey: \"value\") as! NSNumber).uint64Value\n                        if (amount < DUST_AMOUNT) {\n                            dustAmount += amount\n                            continue\n                        }\n                        \n                        valueSelected = valueSelected.add(TLCoin(uint64:amount))\n                        \n                        let outputScript = unspentOutput.object(forKey: \"script\") as! String\n                        \n                        let address = TLCoreBitcoinWrapper.getAddressFromOutputScript(outputScript, isTestnet: self.appWallet.walletConfig.isTestnet)\n                        if (address == nil) {\n                            DLog(\"address cannot be decoded. not normal pubkeyhash outputScript: \\(outputScript)\")\n                            continue\n                        }\n                        assert(address == changeAddress as? String, \"! address == changeAddress\")\n                        \n                        if signTx {\n                            inputsData.add([\n                                \"tx_hash\": TLWalletUtils.hexStringToData(unspentOutput.object(forKey: \"tx_hash\") as! String)!,\n                                \"txid\": TLWalletUtils.hexStringToData(unspentOutput.object(forKey: \"tx_hash_big_endian\") as! String)!,\n                                \"tx_output_n\": unspentOutput.object(forKey: \"tx_output_n\")!,\n                                \"script\": TLWalletUtils.hexStringToData(outputScript)!,\n                                \"private_key\": importedAddress.getPrivateKey()!])\n                        } else {\n                            inputsData.add([\n                                \"tx_hash\": TLWalletUtils.hexStringToData(unspentOutput.object(forKey: \"tx_hash\") as! String)!,\n                                \"txid\": TLWalletUtils.hexStringToData(unspentOutput.object(forKey: \"tx_hash_big_endian\") as! String)!,\n                                \"tx_output_n\": unspentOutput.object(forKey: \"tx_output_n\")!,\n                                \"script\": TLWalletUtils.hexStringToData(outputScript)!])\n                        }\n                        \n                        if (valueSelected.greaterOrEqual(valueNeeded)) {\n                            break\n                        }\n                    }\n                }\n            }\n            if (valueSelected.less(valueNeeded)) {\n                changeAddress = nil\n                if sendFromAccounts != nil {\n                    \n                    for _accountObject in sendFromAccounts! {\n                        let accountObject = _accountObject as! TLAccountObject\n                        if (changeAddress == nil) {\n                            changeAddress = accountObject.getCurrentChangeAddress() as NSString?\n                        }\n                        \n                        // move some stealth payments to HD wallet as soon as possible\n                        var stealthPaymentUnspentOutputs = NSArray()\n                        if accountObject.stealthWallet != nil {\n                            stealthPaymentUnspentOutputs = accountObject.getStealthPaymentUnspentOutputsArray()\n                        }\n                        \n                        var unspentOutputsUsingCount = 0\n                        for _unspentOutput in stealthPaymentUnspentOutputs {\n                            let unspentOutput = _unspentOutput as! NSDictionary\n                            let amount = (unspentOutput.object(forKey: \"value\") as! NSNumber).uint64Value\n                            if (amount < DUST_AMOUNT) {\n                                // if commented out, app will try to spend dust inputs\n                                dustAmount += amount\n                                continue\n                            }\n                            \n                            valueSelected = valueSelected.add(TLCoin(uint64:amount))\n                            let outputScript = unspentOutput.object(forKey: \"script\") as! String\n                            DLog(\"createSignedSerializedTransactionHex outputScript: \\(outputScript)\")\n                            \n                            let address = TLCoreBitcoinWrapper.getAddressFromOutputScript(outputScript, isTestnet: self.appWallet.walletConfig.isTestnet)\n                            if (address == nil) {\n                                DLog(\"address cannot be decoded. not normal pubkeyhash outputScript: \\(outputScript)\")\n                                continue\n                            }\n                            \n                            if signTx {\n                                inputsData.add([\n                                    \"tx_hash\": TLWalletUtils.hexStringToData(unspentOutput.object(forKey: \"tx_hash\") as! String)!,\n                                    \"txid\": TLWalletUtils.hexStringToData(unspentOutput.object(forKey: \"tx_hash_big_endian\") as! String)!,\n                                    \"tx_output_n\": unspentOutput.object(forKey: \"tx_output_n\")!,\n                                    \"script\": TLWalletUtils.hexStringToData(outputScript)!,\n                                    \"private_key\": accountObject.stealthWallet!.getPaymentAddressPrivateKey(address!)!])\n                            } else {\n                                inputsData.add([\n                                    \"tx_hash\": TLWalletUtils.hexStringToData(unspentOutput.object(forKey: \"tx_hash\") as! String)!,\n                                    \"txid\": TLWalletUtils.hexStringToData(unspentOutput.object(forKey: \"tx_hash_big_endian\") as! String)!,\n                                    \"tx_output_n\": unspentOutput.object(forKey: \"tx_output_n\")!,\n                                    \"script\": TLWalletUtils.hexStringToData(outputScript)!])\n                            }\n                            \n                            unspentOutputsUsingCount += 1\n                            if (valueSelected.greaterOrEqual(valueNeeded) && unspentOutputsUsingCount >= accountObject.MAX_CONSOLIDATE_STEALTH_PAYMENT_UTXOS_COUNT) {\n                                // limit amount of stealth payment unspent outputs to use\n                                break\n                            }\n                        }\n                        \n                        if (valueSelected.greaterOrEqual(valueNeeded)) {\n                            break\n                        }\n                        \n                        let unspentOutputs = accountObject.getUnspentArray()\n                        for _unspentOutput in unspentOutputs {\n                            let unspentOutput = _unspentOutput as! NSDictionary\n                            let amount = (unspentOutput.object(forKey: \"value\") as! NSNumber).uint64Value\n                            if (amount < DUST_AMOUNT) {\n                                // if commented out, app will try to spend dust inputs\n                                dustAmount += amount\n                                continue\n                            }\n                            \n                            valueSelected = valueSelected.add(TLCoin(uint64:amount))\n                            \n                            let outputScript = unspentOutput.object(forKey: \"script\") as! String\n                            DLog(\"createSignedSerializedTransactionHex outputScript: \\(outputScript)\")\n                            \n                            let address = TLCoreBitcoinWrapper.getAddressFromOutputScript(outputScript, isTestnet: self.appWallet.walletConfig.isTestnet)\n                            if (address == nil) {\n                                DLog(\"address cannot be decoded. not normal pubkeyhash outputScript: \\(outputScript)\")\n                                continue\n                            }\n                            \n                            if signTx {\n                                inputsData.add([\n                                    \"tx_hash\": TLWalletUtils.hexStringToData(unspentOutput.object(forKey: \"tx_hash\") as! String)!,\n                                    \"txid\": TLWalletUtils.hexStringToData(unspentOutput.object(forKey: \"tx_hash_big_endian\") as! String)!,\n                                    \"tx_output_n\": unspentOutput.object(forKey: \"tx_output_n\")!,\n                                    \"script\": TLWalletUtils.hexStringToData(outputScript)!,\n                                    \"private_key\": accountObject.getAccountPrivateKey(address!)!\n                                    ])\n                            } else {\n                                inputsData.add([\n                                    \"tx_hash\": TLWalletUtils.hexStringToData(unspentOutput.object(forKey: \"tx_hash\") as! String)!,\n                                    \"txid\": TLWalletUtils.hexStringToData(unspentOutput.object(forKey: \"tx_hash_big_endian\") as! String)!,\n                                    \"tx_output_n\": unspentOutput.object(forKey: \"tx_output_n\")!,\n                                    \"script\": TLWalletUtils.hexStringToData(outputScript)!,\n                                    \"hd_account_info\": [\"idx\": accountObject.getAddressHDIndex(address!), \"is_change\": !accountObject.isMainAddress(address!)]\n                                    ])\n                            }\n                            \n                            if (valueSelected.greaterOrEqual(valueNeeded)) {\n                                break\n                            }\n                        }\n                    }\n                }\n            }\n            \n            DLog(\"createSignedSerializedTransactionHex valueSelected \\(valueSelected.toString())\")\n            DLog(\"createSignedSerializedTransactionHex valueNeeded \\(valueNeeded.toString())\")\n            var realToAddresses = [String]()\n            if (valueSelected.less(valueNeeded)) {\n                if (dustAmount > 0) {\n                    let dustCoinAmount = TLCoin(uint64:dustAmount)\n                    DLog(\"createSignedSerializedTransactionHex dustAmount \\(Int(dustAmount))\")\n                    DLog(\"createSignedSerializedTransactionHex dustCoinAmount \\(dustCoinAmount.toString())\")\n                    DLog(\"createSignedSerializedTransactionHex valueNeeded \\(valueNeeded.toString())\")\n                    let amountCanSendString = TLCurrencyFormat.coinToProperBitcoinAmountString(valueNeeded.subtract(dustCoinAmount))\n                    error(String(format: TLDisplayStrings.INSUFFICIENT_FUNDS_ACCOUNT_CONTAINS_BITCOIN_DUST_STRING(), \"\\(amountCanSendString) \\(TLCurrencyFormat.getBitcoinDisplay())\"))\n                    return (nil, realToAddresses, nil)\n                }\n                let valueSelectedString = TLCurrencyFormat.coinToProperBitcoinAmountString(valueSelected)\n                let valueNeededString = TLCurrencyFormat.coinToProperBitcoinAmountString(valueNeeded)\n                error(String(format: TLDisplayStrings.INSUFFICIENT_FUNDS_ACCOUNT_BALANCE_IS_STRING(), \"\\(valueSelectedString) \\(TLCurrencyFormat.getBitcoinDisplay())\", \"\\(valueNeededString) \\(TLCurrencyFormat.getBitcoinDisplay())\"))\n                return (nil, realToAddresses, nil)\n            }\n            \n            var stealthOutputScripts:NSMutableArray? = nil\n            for i in stride(from: 0, to: toAddressesAndAmounts.count, by: 1) {\n                let toAddress = (toAddressesAndAmounts.object(at: i) as AnyObject).object(forKey: \"address\") as! String\n                let amount = (toAddressesAndAmounts.object(at: i) as AnyObject).object(forKey: \"amount\") as! TLCoin!\n                \n                if (!TLStealthAddress.isStealthAddress(toAddress, isTestnet:self.appWallet.walletConfig.isTestnet)) {\n                    realToAddresses.append(toAddress)\n                    \n                    outputsData.add([\n                        \"to_address\":toAddress,\n                        \"amount\": NSNumber (value: amount!.toUInt64() as UInt64)])\n                    \n                } else {\n                    if (stealthOutputScripts == nil) {\n                        stealthOutputScripts = NSMutableArray(capacity:1)\n                    }\n                    \n                    let ephemeralPrivateKey = ephemeralPrivateKeyHex != nil ? ephemeralPrivateKeyHex! : TLStealthAddress.generateEphemeralPrivkey()\n                    let stealthDataScriptNonce = nonce != nil ? nonce! : TLStealthAddress.generateNonce()\n                    let stealthDataScriptAndPaymentAddress = TLStealthAddress.createDataScriptAndPaymentAddress(toAddress,\n                        ephemeralPrivateKey: ephemeralPrivateKey, nonce: stealthDataScriptNonce, isTestnet: self.appWallet.walletConfig.isTestnet)\n                    \n                    DLog(\"createSignedSerializedTransactionHex stealthDataScript: \\(stealthDataScriptAndPaymentAddress.0)\")\n                    DLog(\"createSignedSerializedTransactionHex paymentAddress: \\(stealthDataScriptAndPaymentAddress.1)\")\n                    stealthOutputScripts!.add(stealthDataScriptAndPaymentAddress.0)\n                    let paymentAddress = stealthDataScriptAndPaymentAddress.1\n                    realToAddresses.append(paymentAddress)\n                    outputsData.add([\n                        \"to_address\":paymentAddress,\n                        \"amount\": NSNumber (value: amount!.toUInt64() as UInt64)])\n                }\n            }\n            \n            var changeAmount = TLCoin.zero()\n            if (valueSelected.greater(valueNeeded)) {\n                if (changeAddress != nil) {\n                    changeAmount = valueSelected.subtract(valueNeeded)\n                    outputsData.add([\n                        \"to_address\":changeAddress!,\n                        \"amount\": NSNumber(value: changeAmount.toUInt64() as UInt64)])\n                }\n            }\n            \n            DLog(\"createSignedSerializedTransactionHex changeAmount : \\(changeAmount.toString())\")\n            DLog(\"createSignedSerializedTransactionHex feeAmount: \\(feeAmount.toString())\")\n            DLog(\"createSignedSerializedTransactionHex valueSelected: \\(valueSelected.toString())\")\n            DLog(\"createSignedSerializedTransactionHex valueNeeded: \\(valueNeeded.toString())\")\n            \n            if valueNeeded.greater(valueSelected) {\n                NSException(name:NSExceptionName(rawValue: \"Send Error\"), reason:\"not enough unspent outputs\", userInfo:nil).raise()\n            }\n            \n            for outputData in outputsData {\n                let outputAmount = ((outputData as! NSDictionary).object(forKey: \"amount\") as! NSNumber).uint64Value\n                if outputAmount <= DUST_AMOUNT {\n                    let dustAmountBitcoins = TLCurrencyFormat.coinToProperBitcoinAmountString(TLCoin(uint64: DUST_AMOUNT), withCode: true)\n                    error(String(format: TLDisplayStrings.CANNOT_CREATE_TRANSACTIONS_WITH_OUTPUTS_LESS_THEN_X_BITCOINS_STRING(), dustAmountBitcoins))\n                    return (nil, realToAddresses, nil)\n                }\n            }\n            \n            let sortedInputs = inputsData.sortedArray (comparator: {\n                (obj1, obj2) -> ComparisonResult in\n                \n                let firstTxid = (obj1 as! NSDictionary).object(forKey: \"txid\") as! Data\n                let secondTxid = (obj2 as! NSDictionary).object(forKey: \"txid\") as! Data\n                \n                let firstTxBytes = (firstTxid as NSData).bytes.bindMemory(to: UInt8.self, capacity: firstTxid.count)\n                let secondTxBytes = (secondTxid as NSData).bytes.bindMemory(to: UInt8.self, capacity: secondTxid.count)\n                \n                for i in stride(from: 0, to: firstTxid.count, by: 1) {\n                    if firstTxBytes[i] < secondTxBytes[i] {\n                        return ComparisonResult.orderedAscending\n                    } else if firstTxBytes[i] > secondTxBytes[i] {\n                        return ComparisonResult.orderedDescending\n                    }\n                }\n                \n                let firstTxOutputN = (obj1 as! NSDictionary).object(forKey: \"tx_output_n\") as! NSNumber\n                let secondTxOutputN = (obj2 as! NSDictionary).object(forKey: \"tx_output_n\") as! NSNumber\n\n                if firstTxOutputN.uint64Value < secondTxOutputN.uint64Value {\n                    return ComparisonResult.orderedAscending\n                } else if firstTxOutputN.uint64Value > secondTxOutputN.uint64Value {\n                    return ComparisonResult.orderedDescending\n                }\n\n                return ComparisonResult.orderedSame\n            })\n            \n            let hashes = NSMutableArray()\n            let inputIndexes = NSMutableArray()\n            let inputScripts = NSMutableArray()\n            let privateKeys = NSMutableArray()\n            let txInputsAccountHDIdxes = NSMutableArray()\n            var isInputsAllFromHDAccountAddresses = true //only used for cold wallet accounts, and cant have addresses from other then hd account addresses\n            for _sortedInput in sortedInputs {\n                let sortedInput = _sortedInput as! NSDictionary\n                hashes.add(sortedInput.object(forKey: \"tx_hash\")!)\n                inputIndexes.add(sortedInput.object(forKey: \"tx_output_n\")!)\n                if signTx {\n                    privateKeys.add(sortedInput.object(forKey: \"private_key\")!)\n                } else {\n                    if let hdAccountInfo = sortedInput.object(forKey: \"hd_account_info\") {\n                        txInputsAccountHDIdxes.add(hdAccountInfo)\n                    } else {\n                        isInputsAllFromHDAccountAddresses = false\n                    }\n                }\n                inputScripts.add(sortedInput.object(forKey: \"script\")!)\n            }\n            let sortedOutputs = outputsData.sortedArray (comparator: {\n                (obj1, obj2) -> ComparisonResult in\n                \n                let firstAmount = (obj1 as! NSDictionary).object(forKey: \"amount\") as! NSNumber\n                let secondAmount = (obj2 as! NSDictionary).object(forKey: \"amount\") as! NSNumber\n                \n                if firstAmount.uint64Value < secondAmount.uint64Value {\n                    return ComparisonResult.orderedAscending\n                } else if firstAmount.uint64Value > secondAmount.uint64Value {\n                    return ComparisonResult.orderedDescending\n                } else {\n                    let firstAddress = (obj1 as! NSDictionary).object(forKey: \"to_address\") as! String\n                    let secondAddress = (obj2 as! NSDictionary).object(forKey: \"to_address\") as! String\n                    \n                    let firstScript = TLCoreBitcoinWrapper.getStandardPubKeyHashScriptFromAddress(firstAddress, isTestnet: self.appWallet.walletConfig.isTestnet)\n                    let secondScript = TLCoreBitcoinWrapper.getStandardPubKeyHashScriptFromAddress(secondAddress, isTestnet: self.appWallet.walletConfig.isTestnet)\n                    \n                    let firstScriptData = TLWalletUtils.hexStringToData(firstScript)!\n                    let secondScriptData = TLWalletUtils.hexStringToData(secondScript)!\n                    \n                    let firstScriptBytes = (firstScriptData as NSData).bytes.bindMemory(to: UInt8.self, capacity: firstScriptData.count)\n                    let secondScriptBytes = (secondScriptData as NSData).bytes.bindMemory(to: UInt8.self, capacity: secondScriptData.count)\n\n                    for i in stride(from: 0, to: firstScript.characters.count/2, by: 1) {\n                        if firstScriptBytes[i] < secondScriptBytes[i] {\n                            return ComparisonResult.orderedAscending\n                        } else if firstScriptBytes[i] > secondScriptBytes[i] {\n                            return ComparisonResult.orderedDescending\n                        }\n                    }\n                    \n                    return ComparisonResult.orderedSame\n                }\n            })\n            \n            let outputAmounts = NSMutableArray()\n            let outputAddresses = NSMutableArray()\n            for _sortedOutput in sortedOutputs {\n                let sortedOutput = _sortedOutput as! NSDictionary\n                outputAddresses.add(sortedOutput.object(forKey: \"to_address\")!)\n                outputAmounts.add(sortedOutput.object(forKey: \"amount\")!)\n            }\n            \n            \n            DLog(\"createSignedSerializedTransactionHex hashes: \\(hashes.debugDescription)\")\n            DLog(\"createSignedSerializedTransactionHex inputIndexes: \\(inputIndexes.debugDescription)\")\n            DLog(\"createSignedSerializedTransactionHex inputScripts: \\(inputScripts.debugDescription)\")\n            DLog(\"createSignedSerializedTransactionHex outputAddresses: \\(outputAddresses.debugDescription)\")\n            DLog(\"createSignedSerializedTransactionHex outputAmounts: \\(outputAmounts.debugDescription)\")\n            DLog(\"createSignedSerializedTransactionHex privateKeys: \\(privateKeys.debugDescription)\")\n            for _ in 0...3 {\n                let txHexAndTxHash = TLCoreBitcoinWrapper.createSignedSerializedTransactionHex(hashes, inputIndexes:inputIndexes, inputScripts:inputScripts,\n                    outputAddresses:outputAddresses, outputAmounts:outputAmounts, privateKeys:privateKeys,\n                    outputScripts:stealthOutputScripts, signTx: signTx, isTestnet: self.appWallet.walletConfig.isTestnet)\n                DLog(\"createSignedSerializedTransactionHex txHexAndTxHash: \\(txHexAndTxHash.debugDescription)\")\n                if txHexAndTxHash != nil {\n                    return (txHexAndTxHash!, realToAddresses, isInputsAllFromHDAccountAddresses ? txInputsAccountHDIdxes : nil)\n                }\n            }\n            \n            error(TLDisplayStrings.ENCOUNTERED_ERROR_CREATING_TRANSACTION_TRY_AGAIN_STRING())\n            return (nil, realToAddresses, nil)\n    }\n}\n\n\n"
  },
  {
    "path": "ArcBit/model/TLStealthAddress.swift",
    "content": "//\n//  TLStealthAddress.swift\n//  ArcBit\n//\n//  Created by Timothy Lee on 3/14/15.\n//  Copyright (c) 2015 Timothy Lee <stequald01@gmail.com>\n//\n//   This library is free software; you can redistribute it and/or\n//   modify it under the terms of the GNU Lesser General Public\n//   License as published by the Free Software Foundation; either\n//   version 2.1 of the License, or (at your option) any later version.\n//\n//   This library is distributed in the hope that it will be useful,\n//   but WITHOUT ANY WARRANTY; without even the implied warranty of\n//   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n//   Lesser General Public License for more details.\n//\n//   You should have received a copy of the GNU Lesser General Public\n//   License along with this library; if not, write to the Free Software\n//   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,\n//   MA 02110-1301  USA\n\nimport Foundation\n\nclass TLStealthAddress {\n    \n    struct STATIC_MEMBERS {\n        static let STEALTH_ADDRESS_MSG_SIZE: UInt8 = 0x26\n        static let STEALTH_ADDRESS_TRANSACTION_VERSION: UInt8 = 0x06\n        static let BTC_MAGIC_BYTE: UInt8 = 0x2a\n        static let BTC_TESTNET_MAGIC_BYTE: UInt8 = 0x2b\n    }\n    \n    class func getStealthAddressTransacionVersion() -> UInt8 {\n        return STATIC_MEMBERS.STEALTH_ADDRESS_TRANSACTION_VERSION\n    }\n    \n    class func getMagicByte(_ isTestnet: Bool) -> UInt8 {\n        if (isTestnet) {\n            return STATIC_MEMBERS.BTC_TESTNET_MAGIC_BYTE\n        } else {\n            return STATIC_MEMBERS.BTC_MAGIC_BYTE\n        }\n    }\n    \n    class func getStealthAddressMsgSize() -> UInt8 {\n        return STATIC_MEMBERS.STEALTH_ADDRESS_MSG_SIZE\n    }\n    \n    class func isStealthAddress(_ stealthAddress: String, isTestnet: Bool) -> Bool {\n        let data = BTCDataFromBase58Check(stealthAddress)\n        if(data == nil) {\n            return false\n        }\n        let stealthAddressHex = data?.hex()\n        \n        if (stealthAddressHex != nil && stealthAddressHex?.characters.count != 142) {\n            return false\n        }\n        \n        var bytes = [UInt8](repeating: 0, count: (data?.length)!)\n        data?.getBytes(&bytes, length: (data?.length)!)\n        \n        if (bytes[0] != getMagicByte(isTestnet)) {\n            return false\n        }\n        \n        let scanPublicKey = (stealthAddressHex! as NSString).substring(with: NSMakeRange(4, 66))\n        let spendPublicKey = (stealthAddressHex! as NSString).substring(with: NSMakeRange(72, 66))\n        \n        let stealthAddr = createStealthAddress(scanPublicKey as NSString, spendPublicKey: spendPublicKey as NSString, isTestnet: isTestnet)\n        return stealthAddress == stealthAddr\n    }\n    \n    class func createStealthAddress(_ scanPublicKey: NSString, spendPublicKey: NSString, isTestnet: (Bool)) -> (String) {\n        let hexString = NSString(format: \"%02x00%@01%@0100\", getMagicByte(isTestnet), scanPublicKey, spendPublicKey)\n        return BTCBase58CheckStringWithData(BTCDataFromHex(hexString as String))\n    }\n    \n    class func generateEphemeralPrivkey() -> (String) {\n        let key = BTCKey()\n        let newKey: BTCKey = BTCKey(privateKey: key!.privateKey as Data!)\n        assert(newKey.privateKey.hex() == key?.privateKey.hex(), \"\")\n        return key!.privateKey.hex()\n    }\n    \n    class func generateNonce() -> UInt32 {\n        return arc4random()\n    }\n    \n    class func createDataScriptAndPaymentAddress(_ stealthAddress: String, isTestnet: Bool) -> (String, String) {\n        let ephemeralPrivateKey = generateEphemeralPrivkey()\n        let nonce = generateNonce()\n        return createDataScriptAndPaymentAddress(stealthAddress, ephemeralPrivateKey: ephemeralPrivateKey, nonce: nonce, isTestnet: isTestnet)\n    }\n    \n    class func createDataScriptAndPaymentAddress(_ stealthAddress: String, ephemeralPrivateKey: String, nonce: UInt32, isTestnet: Bool) -> (String, String) {\n        let publicKeys = getScanPublicKeyAndSpendPublicKey(stealthAddress, isTestnet: isTestnet)\n        let scanPublicKey = publicKeys.0\n        let spendPublicKey = publicKeys.1\n        \n        assert(createStealthAddress(scanPublicKey as NSString, spendPublicKey: spendPublicKey as NSString, isTestnet: isTestnet) == stealthAddress, \"Invalid stealth address\")\n        \n        let key = BTCKey(privateKey: BTCDataFromHex(ephemeralPrivateKey))\n        \n        let ephemeralPublicKey = key?.compressedPublicKey.hex()\n        \n        let stealthDataScript = NSString(format: \"%02x%02x%02x%08x%@\",\n            BTCOpcode.OP_RETURN.rawValue,\n            getStealthAddressMsgSize(),\n            getStealthAddressTransacionVersion(),\n            nonce,\n            ephemeralPublicKey!)\n        \n        let paymentPublicKey = getPaymentPublicKeySender(scanPublicKey, spendPublicKey: spendPublicKey, ephemeralPrivateKey: ephemeralPrivateKey)\n        let paymentAddress: String\n        if (!isTestnet) {\n            let key = BTCKey(publicKey: BTCDataFromHex(paymentPublicKey!))\n            paymentAddress = (key?.address.base58String)!\n        } else {\n            //TODO:\n            let key = BTCKey(publicKey: BTCDataFromHex(paymentPublicKey!))\n            paymentAddress = (key?.address.base58String)!\n        }\n        return (stealthDataScript as String, paymentAddress)\n    }\n    \n    class func getEphemeralPublicKeyFromStealthDataScript(_ scriptHex: String) -> (String?) {\n        if (scriptHex.characters.count != 80) {\n            return nil\n        }\n        return (scriptHex as NSString).substring(with: NSMakeRange(14, scriptHex.characters.count - 14))\n    }\n    \n    class func getPaymentAddressPrivateKeySecretFromScript(_ stealthDataScript: String, scanPrivateKey: String, spendPrivateKey: String) -> (String?) {\n        let ephemeralPublicKey = getEphemeralPublicKeyFromStealthDataScript(stealthDataScript)\n        if (ephemeralPublicKey == nil) {\n            return nil\n        }\n\n        return getPaymentPrivateKey(scanPrivateKey, spendPrivateKey: spendPrivateKey, ephemeralPublicKey: ephemeralPublicKey!)\n    }\n    \n    class func getPaymentAddressPublicKeyFromScript(_ stealthDataScript: String, scanPrivateKey: String, spendPublicKey: String) -> (String?) {\n        let ephemeralPublicKey = getEphemeralPublicKeyFromStealthDataScript(stealthDataScript)\n        if (ephemeralPublicKey == nil) {\n            return nil\n        }\n        return getPaymentPublicKeyForReceiver(scanPrivateKey, spendPublicKey: spendPublicKey, ephemeralPublicKey: ephemeralPublicKey!)\n    }\n    \n    class func getScanPublicKeyAndSpendPublicKey(_ stealthAddress: (String), isTestnet: (Bool)) -> (String, String) {\n        let data = BTCDataFromBase58Check(stealthAddress)\n        let stealthAddressHex = data?.hex()\n        \n        assert(stealthAddressHex?.characters.count == 142, \"stealthAddressHex.length != 142\")\n        var bytes = [UInt8](repeating: 0, count: (data?.length)!)\n        data?.getBytes(&bytes, length: (data?.length)!)\n        assert(bytes[0] == getMagicByte(isTestnet), \"stealth address contains invalid magic byte\")\n        \n        let scanPublicKey = (stealthAddressHex! as NSString).substring(with: NSMakeRange(4, 66))\n        let spendPublicKey = (stealthAddressHex! as NSString).substring(with: NSMakeRange(72, 66))\n        \n        return (scanPublicKey, spendPublicKey)\n    }\n    \n    class func getSharedSecretForSender(_ scanPublicKey: String, ephemeralPrivateKey: String) -> (String?) {\n        let scanPublicKeyPoint = BTCCurvePoint(data: BTCDataFromHex(scanPublicKey))\n        let ephemeralPrivateKeySecret = BTCBigNumber(string: ephemeralPrivateKey, base: 16)\n        let key = BTCKey(curvePoint: scanPublicKeyPoint?.multiply(ephemeralPrivateKeySecret))\n        return key?.compressedPublicKey.sha256().map{ String(format: \"%02x\", $0) }.joined()\n    }\n    \n    class func getSharedSecretForReceiver(_ ephemeralPublicKey: String, scanPrivateKey: String) -> (String?) {\n        let ephemeralPublicKeyPoint = BTCCurvePoint(data: BTCDataFromHex(ephemeralPublicKey))\n        let scanPrivateKeySecret = BTCBigNumber(string: scanPrivateKey, base: 16)\n        let key = BTCKey(curvePoint: ephemeralPublicKeyPoint?.multiply(scanPrivateKeySecret))\n        return key?.compressedPublicKey.sha256().map{ String(format: \"%02x\", $0) }.joined()\n    }\n    \n    class func getPaymentPublicKeyForReceiver(_ scanPrivateKey: String, spendPublicKey: String, ephemeralPublicKey: String) -> (String?) {\n        let sharedSecret = getSharedSecretForReceiver(ephemeralPublicKey, scanPrivateKey: scanPrivateKey)\n        if (sharedSecret == nil) {\n            return nil\n        } else {\n            let key = BTCKey(privateKey: BTCDataFromHex(sharedSecret))\n            return addPublicKeys(spendPublicKey, rhsPublicKey: (key?.compressedPublicKey.hex())!)\n        }\n    }\n    \n    class func getPaymentPublicKeySender(_ scanPublicKey: String, spendPublicKey: String, ephemeralPrivateKey: String) -> (String?) {\n        let sharedSecret = getSharedSecretForSender(scanPublicKey, ephemeralPrivateKey: ephemeralPrivateKey)\n        if (sharedSecret == nil) {\n            return nil\n        } else {\n            let key = BTCKey(privateKey: BTCDataFromHex(sharedSecret))\n            return addPublicKeys(spendPublicKey, rhsPublicKey: (key?.compressedPublicKey.hex())!)\n        }\n    }\n    \n    class func getPaymentPrivateKey(_ scanPrivateKey:String, spendPrivateKey:String, ephemeralPublicKey:String) -> (String?) {\n        let sharedSecret = getSharedSecretForReceiver(ephemeralPublicKey, scanPrivateKey:scanPrivateKey)\n        if (sharedSecret == nil) {\n            return nil\t\n        } else {\n            return addPrivateKeys(spendPrivateKey, rhsPrivateKey:sharedSecret!)\n        }\n    }\n    \n    class func addPublicKeys(_ lhsPublicKey:String, rhsPublicKey:String) -> (String) {\n        let lhsPoint = BTCCurvePoint(data: BTCDataFromHex(lhsPublicKey))\n        let rhsPoint = BTCCurvePoint(data: BTCDataFromHex(rhsPublicKey))\n        return lhsPoint!.add(rhsPoint).data.map{ String(format: \"%02x\", $0) }.joined()\n    }\n    \n    class func addPrivateKeys(_ lhsPrivateKey:String, rhsPrivateKey:String) -> (String) {\n        let lhsBigNumber = BTCBigNumber(unsignedBigEndian: BTCDataFromHex(lhsPrivateKey))\n        let rhsBigNumber = BTCBigNumber(unsignedBigEndian: BTCDataFromHex(rhsPrivateKey))\n        var hexString = (lhsBigNumber?.mutableCopy().add(rhsBigNumber, mod:BTCCurvePoint.curveOrder()).hexString)! as String\n        while hexString.characters.count < 64 {\n            hexString = \"0\" + hexString\n        }\n        return hexString\n    }\n}\n"
  },
  {
    "path": "ArcBit/model/TLStealthWallet.swift",
    "content": "//\n//  TLStealthWallet.swift\n//  ArcBit\n//\n//  Created by Timothy Lee on 3/14/15.\n//  Copyright (c) 2015 Timothy Lee <stequald01@gmail.com>\n//\n//   This library is free software; you can redistribute it and/or\n//   modify it under the terms of the GNU Lesser General Public\n//   License as published by the Free Software Foundation; either\n//   version 2.1 of the License, or (at your option) any later version.\n//\n//   This library is distributed in the hope that it will be useful,\n//   but WITHOUT ANY WARRANTY; without even the implied warranty of\n//   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n//   Lesser General Public License for more details.\n//\n//   You should have received a copy of the GNU Lesser General Public\n//   License along with this library; if not, write to the Free Software\n//   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,\n//   MA 02110-1301  USA\n\n\nimport Foundation\n\n@objc class TLStealthWallet: NSObject {\n    struct Challenge {\n        static var challenge = \"\"\n        static var needsRefreshing = true\n    }\n    \n    struct STATIC_MEMBERS {\n        static let MAX_CONSECUTIVE_INVALID_SIGNATURES = 4\n        static let PREVIOUS_TX_CONFIRMATIONS_TO_COUNT_AS_SPENT:UInt64 = 12\n        static let TIME_TO_WAIT_TO_CHECK_FOR_SPENT_TX:UInt64 = 86400 // 1 day in seconds\n    }\n    \n    fileprivate var stealthWalletDict: NSDictionary?\n    fileprivate var unspentPaymentAddress2PaymentTxid = [String:String]()\n    fileprivate var paymentAddress2PrivateKeyDict = [String:String]()\n    fileprivate var paymentTxid2PaymentAddressDict = [String:String]()\n    fileprivate var scanPublicKey: String? = nil\n    fileprivate var spendPublicKey: String? = nil\n    fileprivate var accountObject: TLAccountObject?\n    var hasUpdateStealthPaymentStatuses = false\n    var isListeningToStealthPayment: Bool = false\n\n    init(stealthDict: NSDictionary, accountObject: TLAccountObject, updateStealthPaymentStatuses: Bool) {\n        super.init()\n        self.stealthWalletDict = stealthDict\n        self.accountObject = accountObject\n        self.setUpStealthPaymentAddresses(updateStealthPaymentStatuses, isSetup: true)\n    }\n    \n    func getStealthAddress() -> String {\n        return self.stealthWalletDict!.object(forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_KEY_STEALTH_ADDRESS) as! String\n    }\n    \n    func getStealthAddressScanKey() -> String {\n        return self.stealthWalletDict!.object(forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_KEY_STEALTH_ADDRESS_SCAN_KEY) as! String\n    }\n    \n    func getStealthAddressSpendKey() -> String {\n        return self.stealthWalletDict!.object(forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_KEY_STEALTH_ADDRESS_SPEND_KEY) as! String\n    }\n    \n    func getStealthAddressLastTxTime() -> UInt64 {\n        return (self.stealthWalletDict!.object(forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_KEY_LAST_TX_TIME) as! NSNumber).uint64Value\n    }\n    \n    func getStealthAddressServers() -> NSMutableDictionary {\n        return self.stealthWalletDict!.object(forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_KEY_SERVERS) as! NSMutableDictionary\n    }\n    \n    func paymentTxidExist(_ txid: String) -> Bool {\n        return self.paymentTxid2PaymentAddressDict[txid] != nil\n    }\n    \n    func isPaymentAddress(_ address: String) -> Bool {\n        return self.paymentAddress2PrivateKeyDict[address] != nil\n    }\n    \n    func getPaymentAddressPrivateKey(_ address: String) -> String? {\n        return self.paymentAddress2PrivateKeyDict[address]\n    }\n    \n    func setPaymentAddressPrivateKey(_ address: String, privateKey: String) -> () {\n        let lock = NSLock()\n        lock.lock()\n        self.paymentAddress2PrivateKeyDict[address] = privateKey\n        lock.unlock()\n    }\n    \n    func getStealthAddressPayments() -> NSArray {\n        return self.stealthWalletDict!.object(forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_KEY_PAYMENTS) as! NSArray\n    }\n    \n    func getPaymentAddressForIndex(_ index: Int) -> String {\n        let paymentDict = (self.stealthWalletDict!.object(forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_KEY_PAYMENTS)\n            as! NSArray).object(at: index) as! NSDictionary\n        return paymentDict.object(forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_KEY_ADDRESS) as! String\n    }\n    \n    func getStealthAddressPaymentsCount() -> Int {\n        return (self.stealthWalletDict!.object(forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_KEY_PAYMENTS) as! NSArray).count\n    }\n    \n    func getPaymentAddresses() -> Array<String> {\n        return [String](self.paymentAddress2PrivateKeyDict.keys)\n    }\n    \n    func getUnspentPaymentAddresses() -> Array<String> {\n        return [String](self.unspentPaymentAddress2PaymentTxid.keys)\n    }\n    \n    func getStealthAddressSpendPublicKey() -> String {\n        if spendPublicKey == nil {\n            let publicKeys = TLStealthAddress.getScanPublicKeyAndSpendPublicKey(self.getStealthAddress(), isTestnet: self.accountObject!.appWallet!.walletConfig.isTestnet)\n            scanPublicKey = publicKeys.0\n            spendPublicKey = publicKeys.1\n        }\n        return spendPublicKey!\n    }\n    \n    func getStealthAddressScanPublicKey() -> String {\n        if scanPublicKey == nil {\n            let publicKeys = TLStealthAddress.getScanPublicKeyAndSpendPublicKey(self.getStealthAddress(), isTestnet: self.accountObject!.appWallet!.walletConfig.isTestnet)\n            scanPublicKey = publicKeys.0\n            spendPublicKey = publicKeys.1\n        }\n        return scanPublicKey!\n    }\n    \n    func setUpStealthPaymentAddresses(_ updateStealthPaymentStatuses: Bool, isSetup: Bool, async: Bool=true) -> () {\n        DLog(\"\\(self.accountObject!.getAccountIdxNumber()) setUpStealthPaymentAddresses0 \\(self.getStealthAddressPayments().count)\")\n        if isSetup {\n            self.accountObject!.removeOldStealthPayments()\n        }\n        DLog(\"\\(self.accountObject!.getAccountIdxNumber()) setUpStealthPaymentAddresses1 \\(self.getStealthAddressPayments().count)\")\n\n        let paymentsArray = self.getStealthAddressPayments()\n\n        if isSetup {\n            self.unspentPaymentAddress2PaymentTxid = [String:String]()\n            self.paymentAddress2PrivateKeyDict = [String:String]()\n            self.paymentTxid2PaymentAddressDict = [String:String]()\n        }\n        \n        var possiblyClaimedTxidArray = [String]()\n        var possiblyClaimedAddressArray = [String]()\n        var possiblyClaimedTxTimeArray = [UInt64]()\n\n        let nowTime = UInt64(Date().timeIntervalSince1970)\n\n    \n        for i in stride(from: 0, to: paymentsArray.count, by: 1) {\n            if let paymentDict = paymentsArray.object(at: i) as? NSDictionary {\n                let address = paymentDict.object(forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_KEY_ADDRESS) as! String\n                let txid = paymentDict.object(forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_KEY_TXID) as! String\n                let privateKey = paymentDict.object(forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_KEY_KEY) as! String\n                if isSetup {\n                    self.paymentTxid2PaymentAddressDict[txid] = address\n                    self.paymentAddress2PrivateKeyDict[address] = privateKey\n                }\n                \n                let stealthPaymentStatus = paymentDict.object(forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_KEY_STATUS) as! Int\n                \n                if isSetup {\n                    if stealthPaymentStatus == TLStealthPaymentStatus.unspent.rawValue {\n                        self.unspentPaymentAddress2PaymentTxid[address] = txid\n                    }\n                }\n                \n                // dont check to remove last STEALTH_PAYMENTS_FETCH_COUNT payment addresses\n                if i >= paymentsArray.count - Int(TLStealthExplorerAPI.STATIC_MEMBERS.STEALTH_PAYMENTS_FETCH_COUNT) {\n                    continue\n                }\n                \n                if stealthPaymentStatus == TLStealthPaymentStatus.claimed.rawValue || stealthPaymentStatus == TLStealthPaymentStatus.unspent.rawValue {\n                    \n                    let lastCheckTime = UInt64((paymentDict.object(forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_KEY_CHECK_TIME) as! NSNumber).uint64Value)\n                    \n                    if (nowTime - lastCheckTime) > STATIC_MEMBERS.TIME_TO_WAIT_TO_CHECK_FOR_SPENT_TX {\n                        possiblyClaimedTxidArray.append(txid)\n                        possiblyClaimedAddressArray.append(address)\n                        possiblyClaimedTxTimeArray.append(lastCheckTime)\n                    }\n                }\n            }\n        }\n        \n        if updateStealthPaymentStatuses {\n            hasUpdateStealthPaymentStatuses = true\n            if async {\n                DispatchQueue.global(priority: DispatchQueue.GlobalQueuePriority.low).async {\n                    self.addOrSetStealthPaymentsWithStatus(possiblyClaimedTxidArray, addressArray: possiblyClaimedAddressArray,\n                        txTimeArray: possiblyClaimedTxTimeArray, isAddingPayments: false, waitForCompletion: false)\n                }\n            } else {\n                self.addOrSetStealthPaymentsWithStatus(possiblyClaimedTxidArray, addressArray: possiblyClaimedAddressArray,\n                    txTimeArray: possiblyClaimedTxTimeArray, isAddingPayments: false, waitForCompletion: true)\n            }\n        }\n    }\n    \n    func updateStealthPaymentStatusesAsync() -> () {\n        self.setUpStealthPaymentAddresses(true, isSetup: false)\n    }\n    \n    func getPrivateKeyForAddress(_ expectedAddress: String, script: String) -> String? {\n        let scanKey = self.getStealthAddressScanKey()\n        let spendKey = self.getStealthAddressSpendKey()\n        if let secret = TLStealthAddress.getPaymentAddressPrivateKeySecretFromScript(script, scanPrivateKey: scanKey, spendPrivateKey: spendKey) {\n            let outputAddress = TLCoreBitcoinWrapper.getAddressFromSecret(secret, isTestnet: self.accountObject!.appWallet!.walletConfig.isTestnet)\n            if outputAddress! == expectedAddress {\n                return TLCoreBitcoinWrapper.privateKeyFromSecret(secret, isTestnet: self.accountObject!.appWallet!.walletConfig.isTestnet)\n            }\n        }\n        return nil\n    }\n    \n    func isCurrentServerWatching() -> Bool {\n        let currentServerURL = TLPreferences.getStealthExplorerURL()!\n        let stealthAddressServersDict = self.getStealthAddressServers()\n        if let stealthServerDict: AnyObject = stealthAddressServersDict.object(forKey: currentServerURL) as AnyObject? {\n            return (stealthServerDict as! NSDictionary).object(forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_KEY_WATCHING) as! Bool\n        } else {\n            self.accountObject!.setStealthAddressServerStatus(currentServerURL, isWatching: false)\n\n            let serverAttributes = [\n                TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_KEY_WATCHING: false,\n            ]\n            let serverAttributesDict = NSMutableDictionary(dictionary: serverAttributes)\n            stealthAddressServersDict.setObject(serverAttributesDict, forKey: currentServerURL as NSCopying)\n            \n            return false\n        }\n    }\n    \n    func checkIfHaveStealthPayments() -> Bool {\n        let stealthAddress = self.getStealthAddress()\n        let scanKey = self.getStealthAddressScanKey()\n        let spendKey = self.getStealthAddressSpendKey()\n        let scanPublicKey = self.getStealthAddressScanPublicKey()\n        let success = TLStealthWallet.watchStealthAddress(stealthAddress, scanPriv: scanKey, spendPriv: spendKey, scanPublicKey: scanPublicKey)\n        if success {\n            let gotOldestPaymentAddressesAndPayments = self.getStealthPayments(stealthAddress,\n                scanPriv: scanKey, spendPriv: spendKey, scanPublicKey: scanPublicKey, offset: 0)\n            if gotOldestPaymentAddressesAndPayments != nil &&\n                (gotOldestPaymentAddressesAndPayments!.2 != nil && gotOldestPaymentAddressesAndPayments!.2!.count > 0) {\n                return true\n            }\n        }\n        \n        return false\n    }\n    \n    func checkToWatchStealthAddress() -> () {\n        let stealthAddress = self.getStealthAddress()\n        if self.isCurrentServerWatching() != true {\n            let scanKey = self.getStealthAddressScanKey()\n            let spendKey = self.getStealthAddressSpendKey()\n            let scanPublicKey = self.getStealthAddressScanPublicKey()\n            let success = TLStealthWallet.watchStealthAddress(stealthAddress, scanPriv: scanKey, spendPriv: spendKey, scanPublicKey: scanPublicKey)\n            if success {\n                let stealthAddressServersDict = self.getStealthAddressServers()\n                let currentServerURL = TLPreferences.getStealthExplorerURL()!\n                (stealthAddressServersDict.object(forKey: currentServerURL) as! NSMutableDictionary).setObject(true, forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_KEY_WATCHING as NSCopying)\n                self.accountObject!.setStealthAddressServerStatus(currentServerURL, isWatching: true)\n            }\n        }\n    }\n\n    func getStealthAddressAndSignatureFromChallenge(_ challenge: String) -> (String, String) {\n        let privKey = self.getStealthAddressScanKey()\n        let signature = TLCoreBitcoinWrapper.getSignature(privKey, message: challenge);\n        let stealthAddress = self.getStealthAddress()\n        return (stealthAddress, signature);\n    }\n    \n    class func getChallengeAndSign(_ stealthAddress: String, privKey: String, pubKey: String) -> String? {\n        if TLStealthWallet.Challenge.needsRefreshing == true {\n            let jsonData = TLStealthExplorerAPI.instance().getChallenge()\n            if let _: AnyObject = jsonData.object(forKey: TLNetworking.STATIC_MEMBERS.HTTP_ERROR_CODE) as AnyObject? {\n                return nil\n            }\n            \n            TLStealthWallet.Challenge.challenge = jsonData[\"challenge\"] as! String\n            TLStealthWallet.Challenge.needsRefreshing = false\n        }\n        \n        let challenge = TLStealthWallet.Challenge.challenge\n\n        DLog(\"getChallengeAndSign \\(challenge)\")\n        return TLCoreBitcoinWrapper.getSignature(privKey, message: challenge);\n    }\n\n    func addOrSetStealthPaymentsWithStatus(_ txidArray: [String], addressArray: [String], txTimeArray: [UInt64], isAddingPayments: Bool, waitForCompletion: Bool) -> () {\n        var jsonData:NSDictionary? = nil\n        if txidArray.count > 0 {\n            jsonData = TLBlockExplorerAPI.instance().getUnspentOutputsSynchronous(addressArray as NSArray)\n            if let _: AnyObject = jsonData!.object(forKey: TLNetworking.STATIC_MEMBERS.HTTP_ERROR_CODE) as AnyObject? {\n                let msg = jsonData![TLNetworking.STATIC_MEMBERS.HTTP_ERROR_MSG] as? String\n                if msg != \"No free outputs to spend\" {\n                    \n                    return\n                } else {\n                    jsonData = [\"unspent_outputs\":[]];\n                }\n            }\n        }\n        \n        var txid2hasUnspentOutputs = [String:Bool]()\n        for txid in txidArray {\n            txid2hasUnspentOutputs[txid] = false\n        }\n\n        if jsonData != nil {\n            let unspentOutputs = jsonData!.object(forKey: \"unspent_outputs\") as! NSArray\n            \n            for _unspentOutput in unspentOutputs {\n                let unspentOutput = _unspentOutput as! NSDictionary\n                let unspentOutputTxid = unspentOutput.object(forKey: \"tx_hash_big_endian\") as! String\n                txid2hasUnspentOutputs[unspentOutputTxid] = true\n            }\n        }\n\n        let group = DispatchGroup()\n        let nowTime = UInt64(Date().timeIntervalSince1970)\n\n        for i in 0 ..< txidArray.count {\n            let txid = txidArray[i]\n            let paymentAddress = addressArray[i]\n            let txTime = txTimeArray[i]\n\n            if txid2hasUnspentOutputs[txid] == false {\n                // means blockexplorer has not seen tx yet OR stealth payment already been spent\n                \n                if waitForCompletion {\n                    group.enter()\n                }\n                // cant figure out whether stealth payments has been spent by getting unspent outputs because\n                // blockexplorer api might receive tx yet, if we are pushing tx from a source that is not the blockexplorer api\n                TLBlockExplorerAPI.instance().getTxBackground(txid, success: { (jsonData:AnyObject?) -> () in\n                    if (jsonData == nil) {\n                        if waitForCompletion {\n                            group.leave()\n                        }\n                        return\n                    }\n                    let stealthDataScriptAndOutputAddresses = TLStealthWallet.getStealthDataScriptAndOutputAddresses((jsonData as? NSDictionary)!)\n                    \n                    if stealthDataScriptAndOutputAddresses == nil || stealthDataScriptAndOutputAddresses!.0 == nil {\n                        if waitForCompletion {\n                            group.leave()\n                        }\n                        return\n                    }\n                    if (stealthDataScriptAndOutputAddresses!.1).index(of: paymentAddress) != nil {\n                        let txObject = TLTxObject(dict:jsonData as! NSDictionary)\n                        \n                        //Note: this confirmation count is not the confirmations for the tx that spent the stealth payment\n                        let confirmations = txObject.getConfirmations()\n                        \n                        if confirmations >= STATIC_MEMBERS.PREVIOUS_TX_CONFIRMATIONS_TO_COUNT_AS_SPENT {\n                            if isAddingPayments {\n                                if let privateKey = self.generateAndAddStealthAddressPaymentKey(stealthDataScriptAndOutputAddresses!.0!, expectedAddress: paymentAddress,\n                                    txid: txid, txTime: txTime, stealthPaymentStatus: TLStealthPaymentStatus.spent) {\n                                        self.setPaymentAddressPrivateKey(paymentAddress, privateKey: privateKey)\n                                } else {\n                                    DLog(\"no privateKey for \\(paymentAddress)\")\n                                }\n                            } else {\n                                self.accountObject!.setStealthPaymentStatus(txid, stealthPaymentStatus: TLStealthPaymentStatus.spent, lastCheckTime: nowTime)\n                            }\n                        } else {\n                            if isAddingPayments {\n                                if let privateKey = self.generateAndAddStealthAddressPaymentKey(stealthDataScriptAndOutputAddresses!.0!, expectedAddress: paymentAddress,\n                                    txid: txid, txTime: txTime, stealthPaymentStatus: TLStealthPaymentStatus.claimed) {\n                                        self.setPaymentAddressPrivateKey(paymentAddress, privateKey: privateKey)\n                                } else {\n                                    DLog(\"no privateKey for \\(paymentAddress)\")\n                                }\n                            } else {\n                                self.accountObject!.setStealthPaymentStatus(txid, stealthPaymentStatus: TLStealthPaymentStatus.claimed, lastCheckTime: nowTime)\n                            }\n                        }\n                        \n                    }\n                    if waitForCompletion {\n                        group.leave()\n                    }\n                    \n                    }, failure: { (code, status) -> () in\n                        if waitForCompletion {\n                            group.leave()\n                        }\n                })\n                \n            } else {\n                if waitForCompletion {\n                    group.enter()\n                }\n                TLBlockExplorerAPI.instance().getTxBackground(txid, success: { (jsonData:AnyObject?) -> () in\n                    if (jsonData == nil) {\n                        if waitForCompletion {\n                            group.leave()\n                        }\n                        return\n                    }\n                    if let stealthDataScriptAndOutputAddresses = TLStealthWallet.getStealthDataScriptAndOutputAddresses((jsonData as? NSDictionary)!) {\n                        if stealthDataScriptAndOutputAddresses.0 == nil {\n                            if waitForCompletion {\n                                group.leave()\n                            }\n                            return\n                        }\n                        if (stealthDataScriptAndOutputAddresses.1).index(of: paymentAddress) != nil {\n                            if isAddingPayments {\n                                if let privateKey = self.generateAndAddStealthAddressPaymentKey(stealthDataScriptAndOutputAddresses.0!, expectedAddress: paymentAddress,\n                                    txid: txid, txTime: txTime, stealthPaymentStatus: TLStealthPaymentStatus.unspent) {\n                                        self.setPaymentAddressPrivateKey(paymentAddress, privateKey: privateKey)\n                                } else {\n                                    DLog(\"no privateKey for \\(paymentAddress)\")\n                                }\n                            } else {\n                                self.accountObject!.setStealthPaymentStatus(txid, stealthPaymentStatus: TLStealthPaymentStatus.unspent, lastCheckTime: nowTime)\n                            }\n                        }\n                    }\n                    if waitForCompletion {\n                        group.leave()\n                    }\n                    \n                    }, failure: { (code, status) -> () in\n                        if waitForCompletion {\n                            group.leave()\n                        }\n                        \n                })\n                \n            }\n        }\n        \n        if waitForCompletion {\n            group.wait(timeout: DispatchTime.distantFuture)\n        }\n    }\n    \n    func getAndStoreStealthPayments(_ offset: Int) -> (Bool, UInt64, [String])? {\n        let stealthAddress = self.getStealthAddress()\n        let scanKey = self.getStealthAddressScanKey()\n        let spendKey = self.getStealthAddressSpendKey()\n        let scanPublicKey = self.getStealthAddressScanPublicKey()\n        \n        let ret = self.getStealthPayments(stealthAddress, scanPriv: scanKey, spendPriv: spendKey,\n            scanPublicKey: scanPublicKey, offset: offset)\n        \n        if ret == nil {\n            return nil\n        }\n        \n        let gotOldestPaymentAddresses = ret!.0\n        let latestTxTime = ret!.1\n        let payments = ret!.2\n\n        if payments == nil {\n            return (gotOldestPaymentAddresses, latestTxTime, [])\n        }\n        \n        var txidArray = [String]()\n        var addressArray = [String]()\n        var txTimeArray = [UInt64]()\n\n        for _payment in payments!.reverseObjectEnumerator() {\n            let payment = _payment as! NSDictionary\n            let txid = payment.object(forKey: \"txid\") as! String\n            if self.paymentTxidExist(txid) == true {\n                continue\n            }\n            let addr = payment.object(forKey: \"addr\") as! String\n            txidArray.append(txid)\n            addressArray.append(addr)\n            txTimeArray.append(UInt64((payment.object(forKey: \"time\") as! NSNumber).uint64Value))\n        }\n        if txidArray.count == 0 {\n            return (gotOldestPaymentAddresses, latestTxTime, [])\n        }\n\n        // must check if txids exist and are stealth payments that belong to this account before storing it\n        self.addOrSetStealthPaymentsWithStatus(txidArray, addressArray: addressArray, txTimeArray: txTimeArray, isAddingPayments: true, waitForCompletion: true)\n        return (gotOldestPaymentAddresses, latestTxTime, addressArray)\n    }\n\n    class func getStealthDataScriptAndOutputAddresses(_ jsonTxData: NSDictionary) -> (stealthDataScript: String?, outputAddresses:Array<String>)? {\n        let outsArray = jsonTxData.object(forKey: \"out\") as? NSArray\n        \n        if (outsArray != nil) {\n            var outputAddresses = [String]()\n            var stealthDataScript:String? = nil\n            for _output in outsArray! {\n                let output = _output as! NSDictionary\n                \n                if let addr = output.object(forKey: \"addr\") as? String {\n                    outputAddresses.append(addr)\n                } else {\n                    let script = output.object(forKey: \"script\") as! String\n                    if script.characters.count == 80 {\n                        stealthDataScript = script\n                    }\n                    \n                }\n            }\n            return (stealthDataScript, outputAddresses)\n        }\n        return nil\n    }\n\n    func generateAndAddStealthAddressPaymentKey(_ stealthAddressDataScript: String, expectedAddress: String, txid: String, txTime: UInt64, stealthPaymentStatus:\n        TLStealthPaymentStatus) -> String? {\n\n        if self.paymentTxidExist(txid) == true {\n            return nil\n        }\n        if let privateKey = self.getPrivateKeyForAddress(expectedAddress, script: stealthAddressDataScript) {\n            self.unspentPaymentAddress2PaymentTxid[expectedAddress] = txid\n            self.paymentTxid2PaymentAddressDict[txid] = expectedAddress\n            self.setPaymentAddressPrivateKey(expectedAddress, privateKey: privateKey)\n\n            self.accountObject!.addStealthAddressPaymentKey(privateKey, address: expectedAddress, txid: txid, txTime: txTime, stealthPaymentStatus: stealthPaymentStatus)\n            return privateKey\n        } else {\n            DLog(\"error key not found for address \\(expectedAddress)\")\n            return nil\n        }\n    }\n    \n    func addStealthAddressPaymentKey(_ privateKey: String, paymentAddress: String, txid: String, txTime: UInt64, stealthPaymentStatus: TLStealthPaymentStatus) -> Bool {\n        self.unspentPaymentAddress2PaymentTxid[paymentAddress] = txid\n        self.paymentTxid2PaymentAddressDict[txid] = paymentAddress\n        self.setPaymentAddressPrivateKey(paymentAddress, privateKey: privateKey)\n        self.accountObject!.addStealthAddressPaymentKey(privateKey, address: paymentAddress, txid: txid, txTime: txTime, stealthPaymentStatus: stealthPaymentStatus)\n        return true\n    }\n    \n    func getStealthPayments(_ stealthAddress: String, scanPriv: String, spendPriv: String,\n        scanPublicKey: String, offset:Int) -> (Bool, UInt64, NSArray?)? {\n            var signature = TLStealthWallet.getChallengeAndSign(stealthAddress, privKey: scanPriv, pubKey: scanPublicKey)\n            \n            if signature == nil {\n                return nil\n            }\n                        \n            var gotOldestPaymentAddresses = false\n            \n            var jsonData:NSDictionary? = nil\n            var consecutiveInvalidSignatures = 0\n            \n            while true {\n                jsonData = TLStealthExplorerAPI.instance().getStealthPaymentsSynchronous(stealthAddress, signature: signature!, offset: offset)\n                if let _: AnyObject = jsonData?.object(forKey: TLNetworking.STATIC_MEMBERS.HTTP_ERROR_CODE) as AnyObject? {\n                    return nil\n                }\n                \n                if let errorCode = jsonData!.object(forKey: TLStealthExplorerAPI.STATIC_MEMBERS.SERVER_ERROR_CODE) as? Int {\n                    if errorCode == TLStealthExplorerAPI.STATIC_MEMBERS.INVALID_SIGNATURE_ERROR {\n                        consecutiveInvalidSignatures += 1\n                        if (consecutiveInvalidSignatures > STATIC_MEMBERS.MAX_CONSECUTIVE_INVALID_SIGNATURES) {\n                            return nil\n                        }\n                        TLStealthWallet.Challenge.needsRefreshing = true\n                        signature = TLStealthWallet.getChallengeAndSign(stealthAddress, privKey: scanPriv, pubKey: scanPublicKey)\n                        if signature == nil {\n                            return nil\n                        }\n                    }\n                    continue\n                }\n                break\n            }\n            \n            let stealthPayments = jsonData![\"payments\"] as! NSArray\n\n            if stealthPayments.count == 0 {\n                gotOldestPaymentAddresses = true\n                return (true, 0, stealthPayments)\n            }\n            \n            let txTimeLowerBound = self.getStealthAddressLastTxTime()\n            let olderTxTime = ((stealthPayments.lastObject as! NSDictionary)[\"time\"] as! NSNumber).uint64Value\n            if olderTxTime < txTimeLowerBound || stealthPayments.count < TLStealthExplorerAPI.STATIC_MEMBERS.STEALTH_PAYMENTS_FETCH_COUNT {\n                gotOldestPaymentAddresses = true\n            }\n            \n            let latestTxTime = ((stealthPayments.firstObject as! NSDictionary)[\"time\"] as! NSNumber).uint64Value\n            return (gotOldestPaymentAddresses, latestTxTime, stealthPayments)\n    }\n    \n    class func watchStealthAddress(_ stealthAddress: String, scanPriv: String, spendPriv: String, scanPublicKey: String) -> Bool {\n        var signature = self.getChallengeAndSign(stealthAddress, privKey: scanPriv, pubKey: scanPublicKey)\n        if signature == nil {\n            return false\n        }\n        \n        var consecutiveInvalidSignatures = 0\n        \n        while true {\n            let jsonData = TLStealthExplorerAPI.instance().watchStealthAddressSynchronous(stealthAddress, scanPriv: scanPriv, signature: signature!)\n            \n            if let _: AnyObject = jsonData.object(forKey: TLNetworking.STATIC_MEMBERS.HTTP_ERROR_CODE) as AnyObject? {\n                return false\n            }\n            \n            if let errorCode = (jsonData as NSDictionary).object(forKey: TLStealthExplorerAPI.STATIC_MEMBERS.SERVER_ERROR_CODE) as? Int {\n                if errorCode == TLStealthExplorerAPI.STATIC_MEMBERS.INVALID_SIGNATURE_ERROR {\n                    TLStealthWallet.Challenge.needsRefreshing = true\n                    signature = self.getChallengeAndSign(stealthAddress, privKey: scanPriv, pubKey: scanPublicKey)\n                    if signature == nil {\n                        return false\n                    }\n                    consecutiveInvalidSignatures += 1\n                    if (consecutiveInvalidSignatures > STATIC_MEMBERS.MAX_CONSECUTIVE_INVALID_SIGNATURES) {\n                        return false\n                    } else {\n                        continue\n                    }\n                }\n            } else {\n                if let success: AnyObject = jsonData.object(forKey: \"success\") as AnyObject?  {\n                    return success as! Bool\n                }\n                \n                return false\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "ArcBit/model/TLSuggestions.swift",
    "content": "//\n//  TLSuggestions.swift\n//  ArcBit\n//\n//  Created by Timothy Lee on 3/14/15.\n//  Copyright (c) 2015 Timothy Lee <stequald01@gmail.com>\n//\n//   This library is free software; you can redistribute it and/or\n//   modify it under the terms of the GNU Lesser General Public\n//   License as published by the Free Software Foundation; either\n//   version 2.1 of the License, or (at your option) any later version.\n//\n//   This library is distributed in the hope that it will be useful,\n//   but WITHOUT ANY WARRANTY; without even the implied warranty of\n//   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n//   Lesser General Public License for more details.\n//\n//   You should have received a copy of the GNU Lesser General Public\n//   License along with this library; if not, write to the Free Software\n//   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,\n//   MA 02110-1301  USA\n\nimport Foundation\nimport UIKit\n\nclass TLSuggestions {\n    fileprivate var suggestions:NSMutableDictionary?\n    let VIEW_RECEIVE_SCREEN_GAP_COUNT_TO_SHOW_SUGGESTION_TO_ENABLE_PIN = 13\n    \n    // use prime numbers to avoid multiple prompts to be displayed at once\n    let VIEW_SEND_SCREEN_GAP_COUNT_TO_SHOW_SUGGESTION_TO_BACKUP_WALLET_PASSPHRASE = 3\n    let VIEW_SEND_SCREEN_GAP_COUNT_TO_SHOW_WEB_WALLET = 31\n    let VIEW_SEND_SCREEN_GAP_COUNT_TO_SHOW_TRY_COLD_WALLET = 37\n    let VIEW_SEND_SCREEN_GAP_COUNT_TO_SHOW_RATE_APP_ONCE = 47\n    let VIEW_SEND_SCREEN_GAP_COUNT_TO_SHOW_RATE_APP = 89\n\n    let ENABLE_SUGGESTED_ENABLE_PIN  = \"enableSuggestedEnablePin\"\n    let ENABLE_SUGGESTED_BACKUP_WALLET_PASSPHRASE = \"enableSuggestBackUpWalletPassphrase\"\n    let ENABLE_SUGGESTED_DONT_MANAGE_INDIVIDUAL_ACCOUNT_ADDRESSES  = \"enableSuggestDontManageIndividualAccountAddresses\"\n    let ENABLE_SUGGESTED_DONT_MANAGE_INDIVIDUAL_ACCOUNT_PRIVATE_KEYS  = \"enableSuggestDontManageIndividualAccountPrivateKeys\"\n    let ENABLE_SUGGESTED_DONT_ADD_falseRMAL_ADDRESS_TO_ADDRESS_BOOK  = \"enableSuggestDontAddNormalAddressToAddressBook\"\n    let ENABLE_SHOW_MANUALLY_SCAN_TRANSACTION_FOR_STEALTH_TX_INFO  = \"enableShowManuallyScanTransactionForStealthTxInfo\"\n    let ENABLE_SHOW_STEALTH_PAYMENT_DELAY_INFO  = \"enableShowStealthPaymentDelayInfo\"\n    let ENABLE_SHOW_STEALTH_PAYMENT_NOTE  = \"enableShowStealthPaymentNote\"\n\n    struct STATIC_MEMBERS {\n        static var instance:TLSuggestions?\n    }\n    \n    class func instance() -> (TLSuggestions) {\n        if(STATIC_MEMBERS.instance == nil) {\n            STATIC_MEMBERS.instance = TLSuggestions()\n        }\n        return STATIC_MEMBERS.instance!\n    }\n    \n    init() {\n        suggestions = NSMutableDictionary(dictionary:TLPreferences.getSuggestionsDict() ?? NSDictionary())\n    }\n    \n    //Deprecated, just use TLPreferences, see method disabledShowFeeExplanationInfo/setDisableShowFeeExplanationInfo\n    func enabledAllSuggestions() -> () {\n        suggestions = NSMutableDictionary(dictionary:[\n            ENABLE_SUGGESTED_ENABLE_PIN : true,\n            ENABLE_SUGGESTED_BACKUP_WALLET_PASSPHRASE : true,\n            ENABLE_SUGGESTED_DONT_MANAGE_INDIVIDUAL_ACCOUNT_ADDRESSES : true,\n            ENABLE_SUGGESTED_DONT_MANAGE_INDIVIDUAL_ACCOUNT_PRIVATE_KEYS : true,\n            ENABLE_SUGGESTED_DONT_ADD_falseRMAL_ADDRESS_TO_ADDRESS_BOOK : true,\n            ENABLE_SHOW_MANUALLY_SCAN_TRANSACTION_FOR_STEALTH_TX_INFO : true,\n            ENABLE_SHOW_STEALTH_PAYMENT_DELAY_INFO : true,\n            ])\n        TLPreferences.setSuggestionsDict(suggestions!)\n    }\n\n    //should have done negation of enabled as default for suggestions when first built app, instead now have to return true for any new suggestions\n    func enabledShowStealthPaymentNote() -> (Bool) {\n        if (suggestions!.object(forKey: ENABLE_SHOW_STEALTH_PAYMENT_NOTE) == nil) {\n            return true;\n        }\n        return suggestions!.object(forKey: ENABLE_SHOW_STEALTH_PAYMENT_NOTE) as! Bool\n    }\n    \n    func setEnableShowStealthPaymentNote(_ enabled:Bool) -> (){\n        suggestions!.setObject(enabled, forKey:ENABLE_SHOW_STEALTH_PAYMENT_NOTE as NSCopying)\n        TLPreferences.setSuggestionsDict(suggestions!)\n    }\n    \n    func enabledShowStealthPaymentDelayInfo() -> (Bool){\n        return suggestions!.object(forKey: ENABLE_SHOW_STEALTH_PAYMENT_DELAY_INFO) as! Bool\n    }\n    \n    func setEnableShowStealthPaymentDelayInfo(_ enabled:Bool) -> (){\n        suggestions!.setObject(enabled, forKey:ENABLE_SHOW_STEALTH_PAYMENT_DELAY_INFO as NSCopying)\n        TLPreferences.setSuggestionsDict(suggestions!)\n    }\n    \n    func enabledShowManuallyScanTransactionForStealthTxInfo() -> (Bool){\n        return suggestions!.object(forKey: ENABLE_SHOW_MANUALLY_SCAN_TRANSACTION_FOR_STEALTH_TX_INFO) as! Bool\n    }\n    \n    func setEnabledShowManuallyScanTransactionForStealthTxInfo(_ enabled:Bool) -> (){\n        suggestions!.setObject(enabled, forKey:ENABLE_SHOW_MANUALLY_SCAN_TRANSACTION_FOR_STEALTH_TX_INFO as NSCopying)\n        TLPreferences.setSuggestionsDict(suggestions!)\n    }\n    \n    func conditionToPromptRateAppSatisfied() -> (Bool) {\n        let userAnalyticsDict = NSMutableDictionary(dictionary:TLPreferences.getAnalyticsDict() ?? NSDictionary())\n        let viewSendScreenCount = userAnalyticsDict.object(forKey: TLNotificationEvents.EVENT_VIEW_SEND_SCREEN()) as! Int? ?? 0\n        if !TLPreferences.disabledPromptRateApp() &&\n            viewSendScreenCount > 0 &&\n            ((!TLPreferences.hasRatedOnce() && viewSendScreenCount % VIEW_SEND_SCREEN_GAP_COUNT_TO_SHOW_RATE_APP_ONCE == 0) ||\n            (TLPreferences.hasRatedOnce() && viewSendScreenCount % VIEW_SEND_SCREEN_GAP_COUNT_TO_SHOW_RATE_APP == 0)) {\n                return true\n        } else {\n            return false\n        }\n    }\n    \n    func conditionToPromptShowWebWallet() -> (Bool) {\n        let userAnalyticsDict = NSMutableDictionary(dictionary:TLPreferences.getAnalyticsDict() ?? NSDictionary())\n        let viewSendScreenCount = userAnalyticsDict.object(forKey: TLNotificationEvents.EVENT_VIEW_SEND_SCREEN()) as! Int? ?? 0\n        if !TLPreferences.disabledPromptShowWebWallet() &&\n            viewSendScreenCount > 0 &&\n            viewSendScreenCount % VIEW_SEND_SCREEN_GAP_COUNT_TO_SHOW_WEB_WALLET == 0 {\n            return true\n        } else {\n            return false\n        }\n    }\n    \n    func conditionToPromptTryColdWallet() -> (Bool) {\n        let userAnalyticsDict = NSMutableDictionary(dictionary:TLPreferences.getAnalyticsDict() ?? NSDictionary())\n        let viewSendScreenCount = userAnalyticsDict.object(forKey: TLNotificationEvents.EVENT_VIEW_SEND_SCREEN()) as! Int? ?? 0\n        if TLPreferences.getInstallDate() == nil {\n            return false\n        }\n        if !TLPreferences.disabledPromptShowTryColdWallet() &&\n            !TLPreferences.enabledColdWallet() &&\n            TLUtils.daysSinceDate(TLPreferences.getInstallDate()!) > 60 && // 60 days\n            viewSendScreenCount > 0 &&\n            viewSendScreenCount % VIEW_SEND_SCREEN_GAP_COUNT_TO_SHOW_TRY_COLD_WALLET == 0 {\n            return true\n        } else {\n            return false\n        }\n    }\n    \n    fileprivate func setEnabledSuggestedEnablePin(_ enabled:Bool) -> (){\n        suggestions!.setObject(enabled, forKey:ENABLE_SUGGESTED_ENABLE_PIN as NSCopying)\n        TLPreferences.setSuggestionsDict(suggestions!)\n    }\n    \n    fileprivate func enabledSuggestedEnablePin() -> (Bool) {\n        return suggestions!.object(forKey: ENABLE_SUGGESTED_ENABLE_PIN) as! Bool\n    }\n    \n    func conditionToPromptToSuggestEnablePinSatisfied() -> (Bool) {\n        let userAnalyticsDict = NSMutableDictionary(dictionary:TLPreferences.getAnalyticsDict() ?? NSDictionary())\n        let viewReceiveScreenCount = (userAnalyticsDict.object(forKey: TLNotificationEvents.EVENT_VIEW_RECEIVE_SCREEN()) as! Int? ?? 0)\n        if (enabledSuggestedEnablePin() &&\n            viewReceiveScreenCount > 0 &&\n            viewReceiveScreenCount % VIEW_RECEIVE_SCREEN_GAP_COUNT_TO_SHOW_SUGGESTION_TO_ENABLE_PIN == 0) {\n                return true\n        } else {\n            return false\n        }\n    }\n    \n    func promptToSuggestEnablePin(_ vc:UIViewController) -> () {\n        \n        UIAlertController.showAlert(in: vc,\n            withTitle: TLDisplayStrings.ENABLE_PIN_CODE_STRING(),\n            message: TLDisplayStrings.ENABLE_PIN_CODE_TO_BETTER_SECURE_WALLET_STRING(),\n            cancelButtonTitle: TLDisplayStrings.REMIND_ME_LATER_STRING(),\n            destructiveButtonTitle: nil,\n            otherButtonTitles: [TLDisplayStrings.DONT_REMIND_ME_STRING()],\n            \n            tap: {(alertView, action, buttonIndex) in\n                if (buttonIndex == alertView?.firstOtherButtonIndex) {\n                    self.setEnabledSuggestedEnablePin(false)\n                } else if (buttonIndex == alertView?.cancelButtonIndex) {\n                }\n        })\n    }\n    \n    fileprivate func setEnabledSuggestedBackUpWalletPassphrase(_ enabled:Bool) -> (){\n        suggestions!.setObject(enabled, forKey:ENABLE_SUGGESTED_BACKUP_WALLET_PASSPHRASE as NSCopying)\n        TLPreferences.setSuggestionsDict(suggestions!)\n    }\n    \n    fileprivate func enabledSuggestedBackUpWalletPassphrase() -> (Bool) {\n        return (suggestions!.object(forKey: ENABLE_SUGGESTED_BACKUP_WALLET_PASSPHRASE) as! Bool)\n    }\n    \n    func conditionToPromptToSuggestedBackUpWalletPassphraseSatisfied() -> (Bool) {\n        let userAnalyticsDict = NSMutableDictionary(dictionary:TLPreferences.getAnalyticsDict() ?? NSDictionary())\n        let viewSendScreenCount = userAnalyticsDict.object(forKey: TLNotificationEvents.EVENT_VIEW_SEND_SCREEN()) as! Int? ?? 0\n        if (enabledSuggestedBackUpWalletPassphrase() &&\n            viewSendScreenCount > 0 &&\n            viewSendScreenCount % VIEW_SEND_SCREEN_GAP_COUNT_TO_SHOW_SUGGESTION_TO_BACKUP_WALLET_PASSPHRASE == 0) {\n                return true\n        } else {\n            return false\n        }\n    }\n    \n    func promptToSuggestBackUpWalletPassphrase(_ vc:UIViewController) -> () {\n        UIAlertController.showAlert(in: vc, withTitle: TLDisplayStrings.BACK_UP_WALLET_STRING(),\n            message: TLDisplayStrings.SUGGEST_BACK_UP_WALLET_PASSPHRASE_DESC_STRING(),\n            cancelButtonTitle: TLDisplayStrings.REMIND_ME_LATER_STRING(),\n            destructiveButtonTitle: nil,\n            otherButtonTitles: [TLDisplayStrings.DONT_REMIND_ME_STRING()],\n            tap: {(alertView, action, buttonIndex) in\n                if (buttonIndex == alertView?.firstOtherButtonIndex) {\n                    self.setEnabledSuggestedBackUpWalletPassphrase(false)\n                } else if (buttonIndex == alertView?.cancelButtonIndex) {\n                }\n        })}\n    \n    \n    func setEnableSuggestDontManageIndividualAccountAddress(_ enabled:Bool) -> () {\n        suggestions!.setObject(enabled, forKey:ENABLE_SUGGESTED_DONT_MANAGE_INDIVIDUAL_ACCOUNT_ADDRESSES as NSCopying)\n        TLPreferences.setSuggestionsDict(suggestions!)\n    }\n    \n    func enabledSuggestDontManageIndividualAccountAddress() -> (Bool) {\n        return suggestions!.object(forKey: ENABLE_SUGGESTED_DONT_MANAGE_INDIVIDUAL_ACCOUNT_ADDRESSES) as! Bool\n    }\n    \n    \n    func setEnableSuggestDontManageIndividualAccountPrivateKeys(_ enabled:Bool) -> () {\n        suggestions!.setObject(enabled, forKey:ENABLE_SUGGESTED_DONT_MANAGE_INDIVIDUAL_ACCOUNT_PRIVATE_KEYS as NSCopying)\n        TLPreferences.setSuggestionsDict(suggestions!)\n    }\n    \n    func enabledSuggestDontManageIndividualAccountPrivateKeys() -> (Bool) {\n        return suggestions!.object(forKey: ENABLE_SUGGESTED_DONT_MANAGE_INDIVIDUAL_ACCOUNT_PRIVATE_KEYS) as! Bool\n    }\n    \n    func setEnableSuggestDontAddNormalAddressToAddressBook(_ enabled:Bool) -> () {\n        suggestions!.setObject(enabled, forKey:ENABLE_SUGGESTED_DONT_ADD_falseRMAL_ADDRESS_TO_ADDRESS_BOOK as NSCopying)\n        TLPreferences.setSuggestionsDict(suggestions!)\n    }\n    \n    func enabledSuggestDontAddNormalAddressToAddressBook() -> (Bool) {\n        return suggestions!.object(forKey: ENABLE_SUGGESTED_DONT_ADD_falseRMAL_ADDRESS_TO_ADDRESS_BOOK) as! Bool\n    }\n}\n\n"
  },
  {
    "path": "ArcBit/model/TLTxObject.swift",
    "content": "//\n//  TLTxObject.swift\n//  ArcBit\n//\n//  Created by Timothy Lee on 3/14/15.\n//  Copyright (c) 2015 Timothy Lee <stequald01@gmail.com>\n//\n//   This library is free software; you can redistribute it and/or\n//   modify it under the terms of the GNU Lesser General Public\n//   License as published by the Free Software Foundation; either\n//   version 2.1 of the License, or (at your option) any later version.\n//\n//   This library is distributed in the hope that it will be useful,\n//   but WITHOUT ANY WARRANTY; without even the implied warranty of\n//   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n//   Lesser General Public License for more details.\n//\n//   You should have received a copy of the GNU Lesser General Public\n//   License along with this library; if not, write to the Free Software\n//   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,\n//   MA 02110-1301  USA\n\nimport Foundation\n\n@objc class TLTxObject : NSObject\n{\n    fileprivate var txDict : NSDictionary\n    fileprivate var inputAddressToValueArray : NSMutableArray?\n    fileprivate var outputAddressToValueArray : NSMutableArray?\n    fileprivate var addresses:[String]? = nil\n    fileprivate var txid : String?\n    \n    init(dict: NSDictionary) {\n        txDict = NSDictionary(dictionary:dict)\n        super.init()\n        txid = nil\n        buildTxObject(txDict)\n    }\n    \n    fileprivate func buildTxObject(_ tx: NSDictionary) -> (){\n        inputAddressToValueArray = NSMutableArray()\n        let inputsArray = tx.object(forKey: \"inputs\") as? NSArray\n        if (inputsArray != nil) {\n            for _input in inputsArray! {\n                let input = _input as! NSDictionary\n                let prevOut = input.object(forKey: \"prev_out\") as? NSDictionary\n                if (prevOut != nil) {\n                    let addr = prevOut!.object(forKey: \"addr\") as? String\n                    \n                    let inp = NSMutableDictionary()\n                    if (addr != nil) {\n                        inp.setObject(addr!, forKey:\"addr\" as NSCopying)\n                        inp.setObject(prevOut!.object(forKey: \"value\") as! Int, forKey:\"value\" as NSCopying)\n                    }\n                    inputAddressToValueArray!.add(inp)\n                }\n            }\n        }\n        \n        outputAddressToValueArray = NSMutableArray()\n        let outsArray = tx.object(forKey: \"out\") as? NSArray\n        if (outsArray != nil) {\n            for _output in outsArray! {\n                let output = _output as! NSDictionary\n                let addr = output.object(forKey: \"addr\") as? String\n                let outt = NSMutableDictionary()\n                if (addr != nil) {\n                    outt.setObject(addr!, forKey:\"addr\" as NSCopying)\n                    outt.setObject(output.object(forKey: \"value\") as! Int, forKey:\"value\" as NSCopying)\n                }\n                \n                outt.setObject(output.object(forKey: \"script\") as! String, forKey:\"script\" as NSCopying)\n                outputAddressToValueArray!.add(outt)\n            }\n        }\n    }\n    \n    func getAddresses() -> [String] {\n        if (addresses != nil)\n        {\n            return addresses!\n        }\n        \n        addresses = [String]()\n        \n        for addressTovalueDict in inputAddressToValueArray! {\n            if let address = (addressTovalueDict as! NSDictionary).object(forKey: \"addr\") as? String {\n                addresses!.append(address)\n            }\n        }\n        for addressTovalueDict in outputAddressToValueArray! {\n            if let address = (addressTovalueDict as! NSDictionary).object(forKey: \"addr\") as? String {\n                addresses!.append(address)\n            }\n        }\n        return addresses!\n    }\n    \n    func getInputAddressToValueArray() -> (NSArray?) {\n        return inputAddressToValueArray\n    }\n    \n    func getInputAddressArray() -> [String] {\n        var addresses = [String]()\n        addresses.reserveCapacity(inputAddressToValueArray!.count)\n        for _input in inputAddressToValueArray! {\n            let input = _input as! NSDictionary\n            if let address = input.object(forKey: \"addr\") as? String {\n                addresses.append(address)\n            }\n        }\n        return addresses\n    }\n    \n    func getOutputAddressArray() -> [String] {\n        var addresses = [String]()\n        addresses.reserveCapacity(outputAddressToValueArray!.count)\n        for _output in outputAddressToValueArray! {\n            let output = _output as! NSDictionary\n            if let address = output.object(forKey: \"addr\") as? String {\n                addresses.append(address)\n            }\n        }\n        return addresses\n    }\n    \n    func getPossibleStealthDataScripts() -> [String] {\n        var possibleStealthDataScripts = [String]()\n        possibleStealthDataScripts.reserveCapacity(outputAddressToValueArray!.count)\n        \n        for _output in outputAddressToValueArray! {\n            let output = _output as! NSDictionary\n            let script = output.object(forKey: \"script\") as! String\n            if script.characters.count == 80 {\n                possibleStealthDataScripts.append(script)\n            }\n        }\n        return possibleStealthDataScripts\n    }\n    \n    func getOutputAddressToValueArray() -> (NSArray?) {\n        return outputAddressToValueArray\n    }\n    \n    func getHash() -> NSString? {\n        return txDict.object(forKey: \"hash\") as! NSString?\n    }\n    \n    func getTxid() -> (String?) {\n        if (txid == nil) {\n            txid = TLWalletUtils.reverseHexString(txDict.object(forKey: \"hash\") as! String)\n        }\n        return txid\n    }\n    \n    func getTxUnixTime() -> UInt64 {\n        let timeNumber = txDict.object(forKey: \"time\") as? NSNumber\n        if (timeNumber != nil) {\n            return timeNumber!.uint64Value\n        }\n        return 0\n    }\n    \n    fileprivate func getTxUnixTimeInterval() -> TimeInterval {\n        return TimeInterval((txDict.object(forKey: \"time\") as! NSNumber).int64Value)\n    }\n    \n    func getTime() -> (String){\n        let interval = getTxUnixTimeInterval()\n        \n        //TODO: specific to insight api, later dont use confirmations but block_height for all apis\n        if (txDict.object(forKey: \"confirmations\") != nil && interval <= 0) {\n            return \"\"\n        }\n        \n        let transactionDate = Date(timeIntervalSince1970:interval)\n        \n        let formatterTime = DateFormatter()\n        formatterTime.dateFormat = \"@ hh:mm a\"\n        \n        if ((transactionDate as NSDate).isToday()) {\n            return String(format:\"%@ %@\", TLDisplayStrings.TODAY_STRING(), formatterTime.string(from: transactionDate))\n        } else {\n            let formatterDate = DateFormatter()\n            formatterDate.dateFormat = \"EEE dd MMM YYYY\"\n            return String(format:\"%@ %@\", formatterDate.string(from: transactionDate), formatterTime.string(from: transactionDate))\n        }\n    }\n    \n    func getConfirmations() -> UInt64 {\n        //TODO: specific to insight api, later dont use confirmations but block_height for all apis\n        if (txDict.object(forKey: \"confirmations\") as? NSNumber? != nil) {\n            if let conf:NSNumber = txDict.object(forKey: \"confirmations\") as? NSNumber {\n                return UInt64(conf.int64Value)\n            }\n        }\n        \n        if (txDict.object(forKey: \"block_height\") != nil && (txDict.object(forKey: \"block_height\") as! NSNumber).uint64Value > 0) {\n            let height = UInt64(TLBlockchainStatus.instance().blockHeight)\n            let txBlockHeight = UInt64((txDict.object(forKey: \"block_height\") as! NSNumber).uint64Value) + UInt64(1)\n            if txBlockHeight < height {\n                return height - txBlockHeight\n            } else {\n                return 6 //FIXME\n            }\n        }\n        \n        return 0\n    }\n}\n\n"
  },
  {
    "path": "ArcBit/model/TLWallet+Stealth.swift",
    "content": "//\n//  TLWallet+Stealth.swift\n//  ArcBit\n//\n//  Created by Timothy Lee on 3/14/15.\n//  Copyright (c) 2015 Timothy Lee <stequald01@gmail.com>\n//\n//   This library is free software; you can redistribute it and/or\n//   modify it under the terms of the GNU Lesser General Public\n//   License as published by the Free Software Foundation; either\n//   version 2.1 of the License, or (at your option) any later version.\n//\n//   This library is distributed in the hope that it will be useful,\n//   but WITHOUT ANY WARRANTY; without even the implied warranty of\n//   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n//   Lesser General Public License for more details.\n//\n//   You should have received a copy of the GNU Lesser General Public\n//   License along with this library; if not, write to the Free Software\n//   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,\n//   MA 02110-1301  USA\n\nimport Foundation\n\nextension TLWallet {\n    \n    func setStealthAddressServerStatus(_ accountDict: NSMutableDictionary, serverURL: String, isWatching: Bool) -> () {\n        let stealthAddressArray = accountDict.object(forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_KEY_STEALTH_ADDRESSES) as! NSMutableArray\n        let stealthAddressServersDict = (stealthAddressArray.object(at: 0) as! NSDictionary).object(forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_KEY_SERVERS) as! NSMutableDictionary\n        \n        if let stealthServerDict = stealthAddressServersDict.object(forKey: serverURL) as? NSMutableDictionary  {\n            stealthServerDict.setObject(isWatching, forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_KEY_WATCHING as NSCopying)\n        } else {\n            let serverAttributes = [\n                TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_KEY_WATCHING: isWatching,\n            ]\n            let serverAttributesDict = NSMutableDictionary(dictionary: serverAttributes)\n            stealthAddressServersDict.setObject(serverAttributesDict, forKey: serverURL as NSCopying)\n        }\n        \n        NotificationCenter.default.post(name: Notification.Name(rawValue: TLNotificationEvents.EVENT_WALLET_PAYLOAD_UPDATED()), object: nil, userInfo: nil)\n    }\n    \n    func setStealthAddressServerStatusHDWallet(_ accountIdx: Int, serverURL: String, isWatching: Bool) -> () {\n        let accountDict = getAccountDict(accountIdx)\n        setStealthAddressServerStatus(accountDict, serverURL: serverURL, isWatching:isWatching)\n    }\n    \n    func setStealthAddressServerStatusColdWalletAccount(_ idx: Int, serverURL: String, isWatching: Bool) -> () {\n        let accountDict = getColdWalletAccountAtIndex(idx)\n        setStealthAddressServerStatus(accountDict, serverURL: serverURL, isWatching: isWatching)\n    }\n    \n    func setStealthAddressServerStatusImportedAccount(_ idx: Int, serverURL: String, isWatching: Bool) -> () {\n        let accountDict = getImportedAccountAtIndex(idx)\n        setStealthAddressServerStatus(accountDict, serverURL: serverURL, isWatching: isWatching)\n    }\n    \n    func setStealthAddressServerStatusImportedWatchAccount(_ idx: Int, serverURL: String, isWatching: Bool) -> () {\n        let accountDict = getImportedWatchOnlyAccountAtIndex(idx)\n        setStealthAddressServerStatus(accountDict, serverURL: serverURL, isWatching: isWatching)\n    }\n\n    \n    func setStealthAddressLastTxTime(_ accountDict: NSMutableDictionary, serverURL: String, lastTxTime: UInt64) -> () {\n        let stealthAddressArray = accountDict.object(forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_KEY_STEALTH_ADDRESSES) as! NSMutableArray\n        let stealthAddressDict = (stealthAddressArray.object(at: 0) as! NSMutableDictionary)\n        stealthAddressDict.setObject(NSNumber(value: lastTxTime as UInt64), forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_KEY_LAST_TX_TIME as NSCopying)\n        NotificationCenter.default.post(name: Notification.Name(rawValue: TLNotificationEvents.EVENT_WALLET_PAYLOAD_UPDATED()), object: nil, userInfo: nil)\n    }\n    \n    func setStealthAddressLastTxTimeHDWallet(_ accountIdx: Int, serverURL: String, lastTxTime: UInt64) -> () {\n        let accountDict = getAccountDict(accountIdx)\n        setStealthAddressLastTxTime(accountDict, serverURL: serverURL, lastTxTime: lastTxTime)\n    }\n    \n    func setStealthAddressLastTxTimeColdWalletAccount(_ idx: Int, serverURL: String, lastTxTime: UInt64) -> () {\n        let accountDict = getColdWalletAccountAtIndex(idx)\n        setStealthAddressLastTxTime(accountDict, serverURL: serverURL, lastTxTime: lastTxTime)\n    }\n    \n    func setStealthAddressLastTxTimeImportedAccount(_ idx: Int, serverURL: String, lastTxTime: UInt64) -> () {\n        let accountDict = getImportedAccountAtIndex(idx)\n        setStealthAddressLastTxTime(accountDict, serverURL: serverURL, lastTxTime: lastTxTime)\n    }\n    \n    func setStealthAddressLastTxTimeImportedWatchAccount(_ idx: Int, serverURL: String, lastTxTime: UInt64) -> () {\n        let accountDict = getImportedWatchOnlyAccountAtIndex(idx)\n        setStealthAddressLastTxTime(accountDict, serverURL: serverURL, lastTxTime: lastTxTime)\n    }\n    \n    \n    fileprivate func addStealthAddressPaymentKey(_ accountDict: NSMutableDictionary, privateKey: String,\n        address: String, txid: String, txTime: UInt64, stealthPaymentStatus: TLStealthPaymentStatus) -> () {\n        let paymentDict = [\n            TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_KEY_KEY: privateKey,\n            TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_KEY_ADDRESS: address,\n            TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_KEY_TXID: txid,\n            TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_KEY_TIME: NSNumber(value: txTime as UInt64),\n            TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_KEY_CHECK_TIME: NSNumber(value: 0 as UInt64),\n            TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_KEY_STATUS: stealthPaymentStatus.rawValue\n        ] as [String : Any]\n        \n        let stealthAddressPaymentDict = NSMutableDictionary(dictionary: paymentDict)\n        let lock = NSLock()\n        lock.lock()\n        let stealthAddressArray = accountDict.object(forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_KEY_STEALTH_ADDRESSES) as! NSMutableArray\n        let stealthAddressPaymentsArray = (stealthAddressArray.object(at: 0) as! NSDictionary).object(forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_KEY_PAYMENTS) as! NSMutableArray\n        var indexToInsert = stealthAddressPaymentsArray.count-1            \n\n        while indexToInsert >= 0 {\n            if let currentStealthAddressPaymentDict = stealthAddressPaymentsArray.object(at: indexToInsert) as? NSDictionary {\n                if (currentStealthAddressPaymentDict.object(forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_KEY_TIME) as! NSNumber).uint64Value < txTime {\n                    break\n                }\n            }\n            indexToInsert -= 1\n        }\n        \n        if stealthAddressPaymentDict != nil {\n            stealthAddressPaymentsArray.insert(stealthAddressPaymentDict, at: indexToInsert+1)\n        }\n        lock.unlock()\n            \n        DispatchQueue.main.async {\n            NotificationCenter.default.post(name: Notification.Name(rawValue: TLNotificationEvents.EVENT_WALLET_PAYLOAD_UPDATED()), object: nil, userInfo: nil)\n        }\n    }\n    \n    func addStealthAddressPaymentKeyHDWallet(_ accountIdx: Int, privateKey: String, address: String,\n        txid: String, txTime: UInt64, stealthPaymentStatus: TLStealthPaymentStatus) -> () {\n            let accountDict = getAccountDict(accountIdx)\n            addStealthAddressPaymentKey(accountDict, privateKey: privateKey, address: address,\n                txid: txid, txTime: txTime, stealthPaymentStatus: stealthPaymentStatus)\n    }\n    \n    func addStealthAddressPaymentKeyColdWalletAccount(_ idx: Int, privateKey: String, address: String,\n                                                         txid: String, txTime: UInt64, stealthPaymentStatus: TLStealthPaymentStatus) -> () {\n        let accountDict = getColdWalletAccountAtIndex(idx)\n        addStealthAddressPaymentKey(accountDict, privateKey: privateKey, address: address,\n                                    txid: txid, txTime: txTime, stealthPaymentStatus: stealthPaymentStatus)\n    }\n    \n    func addStealthAddressPaymentKeyImportedAccount(_ idx: Int, privateKey: String, address: String,\n        txid: String, txTime: UInt64, stealthPaymentStatus: TLStealthPaymentStatus) -> () {\n            let accountDict = getImportedAccountAtIndex(idx)\n            addStealthAddressPaymentKey(accountDict, privateKey: privateKey, address: address,\n                txid: txid, txTime: txTime, stealthPaymentStatus: stealthPaymentStatus)\n    }\n    \n    func addStealthAddressPaymentKeyImportedWatchAccount(_ idx: Int, privateKey: String, address: String,\n        txid: String, txTime: UInt64, stealthPaymentStatus: TLStealthPaymentStatus) -> () {\n            let accountDict = getImportedWatchOnlyAccountAtIndex(idx)\n            addStealthAddressPaymentKey(accountDict, privateKey: privateKey, address: address,\n                txid: txid, txTime: txTime, stealthPaymentStatus: stealthPaymentStatus)\n    }\n    \n    \n    func setStealthPaymentLastCheckTime(_ accountDict: NSMutableDictionary, txid: String, lastCheckTime: UInt64) -> () {\n        let stealthAddressArray = accountDict.object(forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_KEY_STEALTH_ADDRESSES) as! NSMutableArray\n        let paymentsArray = (stealthAddressArray.object(at: 0) as! NSDictionary).object(forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_KEY_PAYMENTS) as! NSMutableArray\n        \n        for _payment in paymentsArray {\n            let payment = _payment as! NSMutableDictionary\n            if payment.object(forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_KEY_TXID) as? String == txid {\n                payment.setObject(NSNumber(value: lastCheckTime as UInt64), forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_KEY_CHECK_TIME as NSCopying)\n                break\n            }\n        }\n        NotificationCenter.default.post(name: Notification.Name(rawValue: TLNotificationEvents.EVENT_WALLET_PAYLOAD_UPDATED()), object: nil, userInfo: nil)\n    }\n    \n    func setStealthPaymentLastCheckTimeHDWallet(_ accountIdx: Int, txid: String, lastCheckTime: UInt64) -> () {\n        let accountDict = getAccountDict(accountIdx)\n        setStealthPaymentLastCheckTime(accountDict, txid: txid, lastCheckTime: lastCheckTime)\n    }\n    \n    func setStealthPaymentLastCheckTimeColdWalletAccount(_ idx: Int, txid: String, lastCheckTime: UInt64) -> () {\n        let accountDict = getColdWalletAccountAtIndex(idx)\n        setStealthPaymentLastCheckTime(accountDict, txid: txid, lastCheckTime: lastCheckTime)\n    }\n    \n    func setStealthPaymentLastCheckTimeImportedAccount(_ idx: Int, txid: String, lastCheckTime: UInt64) -> () {\n        let accountDict = getImportedAccountAtIndex(idx)\n        setStealthPaymentLastCheckTime(accountDict, txid: txid, lastCheckTime: lastCheckTime)\n    }\n    \n    func setStealthPaymentLastCheckTimeImportedWatchAccount(_ idx: Int, txid: String, lastCheckTime: UInt64) -> () {\n        let accountDict = getImportedWatchOnlyAccountAtIndex(idx)\n        setStealthPaymentLastCheckTime(accountDict, txid: txid, lastCheckTime: lastCheckTime)\n    }\n    \n    func setStealthPaymentStatus(_ accountDict: NSMutableDictionary, txid: String,\n        stealthPaymentStatus: TLStealthPaymentStatus, lastCheckTime: UInt64) -> () {\n        let stealthAddressArray = accountDict.object(forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_KEY_STEALTH_ADDRESSES) as! NSMutableArray\n        let paymentsArray = (stealthAddressArray.object(at: 0) as! NSDictionary).object(forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_KEY_PAYMENTS) as! NSMutableArray\n        \n        for _payment in paymentsArray {\n            let payment = _payment as! NSMutableDictionary\n            if payment.object(forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_KEY_TXID) as? String == txid {\n                payment.setObject(stealthPaymentStatus.rawValue, forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_KEY_STATUS as NSCopying)\n                payment.setObject(NSNumber(value: lastCheckTime as UInt64), forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_KEY_CHECK_TIME as NSCopying)\n                break\n            }\n        }\n        DispatchQueue.main.async {\n            NotificationCenter.default.post(name: Notification.Name(rawValue: TLNotificationEvents.EVENT_WALLET_PAYLOAD_UPDATED()), object: nil, userInfo: nil)\n        }\n    }\n    \n    func setStealthPaymentStatusHDWallet(_ accountIdx: Int, txid: String, stealthPaymentStatus: TLStealthPaymentStatus, lastCheckTime: UInt64) -> () {\n        let accountDict = getAccountDict(accountIdx)\n        setStealthPaymentStatus(accountDict, txid: txid, stealthPaymentStatus: stealthPaymentStatus, lastCheckTime: lastCheckTime)\n    }\n    \n    func setStealthPaymentStatusColdWalletAccount(_ idx: Int, txid: String, stealthPaymentStatus: TLStealthPaymentStatus, lastCheckTime: UInt64) -> () {\n        let accountDict = getColdWalletAccountAtIndex(idx)\n        setStealthPaymentStatus(accountDict, txid: txid, stealthPaymentStatus: stealthPaymentStatus, lastCheckTime: lastCheckTime)\n    }\n    \n    func setStealthPaymentStatusImportedAccount(_ idx: Int, txid: String, stealthPaymentStatus: TLStealthPaymentStatus, lastCheckTime: UInt64) -> () {\n        let accountDict = getImportedAccountAtIndex(idx)\n        setStealthPaymentStatus(accountDict, txid: txid, stealthPaymentStatus: stealthPaymentStatus, lastCheckTime: lastCheckTime)\n    }\n    \n    func setStealthPaymentStatusImportedWatchAccount(_ idx: Int, txid: String, stealthPaymentStatus: TLStealthPaymentStatus, lastCheckTime: UInt64) -> () {\n        let accountDict = getImportedWatchOnlyAccountAtIndex(idx)\n        setStealthPaymentStatus(accountDict, txid: txid, stealthPaymentStatus: stealthPaymentStatus, lastCheckTime: lastCheckTime)\n    }\n    \n\n    func removeOldStealthPayments(_ accountDict: NSMutableDictionary) -> () {\n        let stealthAddressArray = accountDict.object(forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_KEY_STEALTH_ADDRESSES) as! NSMutableArray\n        let stealthAddressPaymentsArray = (stealthAddressArray.object(at: 0) as! NSDictionary).object(forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_KEY_PAYMENTS) as! NSMutableArray\n\n        let startCount = stealthAddressPaymentsArray.count\n        var stealthAddressPaymentsArrayCount = stealthAddressPaymentsArray.count\n        while (stealthAddressPaymentsArray.count > TLStealthExplorerAPI.STATIC_MEMBERS.STEALTH_PAYMENTS_FETCH_COUNT) {\n            if let stealthAddressPaymentDict = stealthAddressPaymentsArray.object(at: 0) as? NSDictionary {\n                if (stealthAddressPaymentDict.object(forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_KEY_STATUS) as! Int == TLStealthPaymentStatus.spent.rawValue) {\n                    stealthAddressPaymentsArray.removeObject(at: 0)\n                    stealthAddressPaymentsArrayCount -= 1\n                } else {\n                    break\n                }\n            } else {\n                stealthAddressPaymentsArray.removeObject(at: 0)\n                stealthAddressPaymentsArrayCount -= 1\n            }\n        }\n\n        if startCount != stealthAddressPaymentsArrayCount {\n            DispatchQueue.main.async {\n                NotificationCenter.default.post(name: Notification.Name(rawValue: TLNotificationEvents.EVENT_WALLET_PAYLOAD_UPDATED()), object: nil, userInfo: nil)\n            }\n        }\n    }\n    \n    func removeOldStealthPaymentsHDWallet(_ accountIdx: Int) -> () {\n        let accountDict = getAccountDict(accountIdx)\n        removeOldStealthPayments(accountDict)\n    }\n    \n    func removeOldStealthPaymentsColdWalletAccount(_ idx: Int) -> () {\n        let accountDict = getColdWalletAccountAtIndex(idx)\n        removeOldStealthPayments(accountDict)\n    }\n    \n    func removeOldStealthPaymentsImportedAccount(_ idx: Int) -> () {\n        let accountDict = getImportedAccountAtIndex(idx)\n        removeOldStealthPayments(accountDict)\n    }\n    \n    func removeOldStealthPaymentsImportedWatchAccount(_ idx: Int) -> () {\n        let accountDict = getImportedWatchOnlyAccountAtIndex(idx)\n        removeOldStealthPayments(accountDict)\n    }\n    \n    \n    func clearAllStealthPayments(_ accountDict: NSMutableDictionary) -> () {\n        let stealthAddressArray = accountDict.object(forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_KEY_STEALTH_ADDRESSES) as! NSMutableArray\n        let stealthAddressDict = stealthAddressArray.object(at: 0) as! NSMutableDictionary\n        stealthAddressDict.setObject(NSMutableArray(), forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_KEY_PAYMENTS as NSCopying)\n        NotificationCenter.default.post(name: Notification.Name(rawValue: TLNotificationEvents.EVENT_WALLET_PAYLOAD_UPDATED()), object: nil, userInfo: nil)\n    }\n    \n    func clearAllStealthPaymentsFromHDWallet(_ accountIdx: Int) -> () {\n        let accountDict = getAccountDict(accountIdx)\n        clearAllStealthPayments(accountDict)\n    }\n\n    func clearAllStealthPaymentsFromColdWalletAccount(_ idx: Int) -> () {\n        let accountDict = getColdWalletAccountAtIndex(idx)\n        clearAllStealthPayments(accountDict)\n    }\n    \n    func clearAllStealthPaymentsFromImportedAccount(_ idx: Int) -> () {\n        let accountDict = getImportedAccountAtIndex(idx)\n        clearAllStealthPayments(accountDict)\n    }\n    \n    func clearAllStealthPaymentsFromImportedWatchAccount(_ idx: Int) -> () {\n        let accountDict = getImportedWatchOnlyAccountAtIndex(idx)\n        clearAllStealthPayments(accountDict)\n    }\n}\n"
  },
  {
    "path": "ArcBit/model/TLWallet.swift",
    "content": "//\n//  TLWallet.swift\n//  ArcBit\n//\n//  Created by Timothy Lee on 3/14/15.\n//  Copyright (c) 2015 Timothy Lee <stequald01@gmail.com>\n//\n//   This library is free software; you can redistribute it and/or\n//   modify it under the terms of the GNU Lesser General Public\n//   License as published by the Free Software Foundation; either\n//   version 2.1 of the License, or (at your option) any later version.\n//\n//   This library is distributed in the hope that it will be useful,\n//   but WITHOUT ANY WARRANTY; without even the implied warranty of\n//   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n//   Lesser General Public License for more details.\n//\n//   You should have received a copy of the GNU Lesser General Public\n//   License along with this library; if not, write to the Free Software\n//   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,\n//   MA 02110-1301  USA\n\nimport Foundation\n\nclass TLWallet {\n    fileprivate var walletName: String?\n    var walletConfig: TLWalletConfig\n    fileprivate var rootDict: NSMutableDictionary?\n    fileprivate var currentHDWalletIdx: Int?\n    fileprivate var masterHex: String?\n    \n    init(walletName: String, walletConfig: TLWalletConfig) {\n        self.walletName = walletName\n        self.walletConfig = walletConfig\n        currentHDWalletIdx = 0\n    }\n    \n    //----------------------------------------------------------------------------------------------------------------\n    \n    fileprivate func createStealthAddressDict(_ extendKey: String, isPrivateExtendedKey: (Bool)) -> (NSMutableDictionary) {\n        assert(isPrivateExtendedKey == true, \"Cant generate stealth address scan key from xpub key\")\n        let stealthAddressDict = NSMutableDictionary()\n        let stealthAddressObject = TLHDWalletWrapper.getStealthAddress(extendKey, isTestnet: self.walletConfig.isTestnet)\n        stealthAddressDict.setObject((stealthAddressObject.object(forKey: \"stealthAddress\"))!, forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_KEY_STEALTH_ADDRESS as NSCopying)\n        stealthAddressDict.setObject((stealthAddressObject.object(forKey: \"scanPriv\"))!, forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_KEY_STEALTH_ADDRESS_SCAN_KEY as NSCopying)\n        stealthAddressDict.setObject((stealthAddressObject.object(forKey: \"spendPriv\"))!, forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_KEY_STEALTH_ADDRESS_SPEND_KEY as NSCopying)\n        stealthAddressDict.setObject(NSMutableDictionary(), forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_KEY_SERVERS as NSCopying)\n        stealthAddressDict.setObject(NSMutableArray(), forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_KEY_PAYMENTS as NSCopying)\n        stealthAddressDict.setObject(NSNumber(value: 0 as UInt64), forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_KEY_LAST_TX_TIME as NSCopying)\n        return stealthAddressDict\n    }\n    \n    fileprivate func createAccountDictWithPreload(_ accountName: String, extendedKey: String,\n        isPrivateExtendedKey: Bool, accountIdx: Int,\n        preloadStartingAddresses: Bool) -> (NSMutableDictionary) {\n            \n            let account = NSMutableDictionary()\n            account.setObject(accountName, forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_KEY_NAME as NSCopying)\n            account.setObject(accountIdx, forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_ACCOUNT_IDX as NSCopying)\n            \n            if (isPrivateExtendedKey) {\n                let extendedPublickey = TLHDWalletWrapper.getExtendPubKey(extendedKey)\n                account.setObject(extendedPublickey, forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_EXTENDED_PUBLIC_KEY as NSCopying)\n                account.setObject(extendedKey, forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_EXTENDED_PRIVATE_KEY as NSCopying)\n                \n                let stealthAddressesArray = NSMutableArray()\n                \n                let stealthAddressDict = createStealthAddressDict(extendedKey, isPrivateExtendedKey: isPrivateExtendedKey)\n                stealthAddressesArray.add(stealthAddressDict)\n                \n                account.setObject(stealthAddressesArray, forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_KEY_STEALTH_ADDRESSES as NSCopying)\n            } else {\n                account.setObject(extendedKey, forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_EXTENDED_PUBLIC_KEY as NSCopying)\n            }\n            \n            account.setValue(TLAddressStatus.active.rawValue, forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_KEY_STATUS)\n            account.setObject(true, forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_ACCOUNT_NEEDS_RECOVERING as NSCopying)\n            \n            let mainAddressesArray = NSMutableArray()\n            account.setObject(mainAddressesArray, forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_KEY_MAIN_ADDRESSES as NSCopying)\n            \n            let changeAddressesArray = NSMutableArray()\n            account.setObject(changeAddressesArray, forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_KEY_CHANGE_ADDRESSES as NSCopying)\n            \n            account.setObject(0, forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_KEY_MIN_MAIN_ADDRESS_IDX as NSCopying)\n            account.setObject(0, forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_KEY_MIN_CHANGE_ADDRESS_IDX as NSCopying)\n            \n            if (!preloadStartingAddresses) {\n                return account\n            }\n            \n            let extendedPublicKey = account.object(forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_EXTENDED_PUBLIC_KEY) as! String\n            //create initial receiving address\n            for i in stride(from: 0, to: TLAccountObject.MAX_ACCOUNT_WAIT_TO_RECEIVE_ADDRESS(), by: 1) {\n                let mainAddressDict = NSMutableDictionary()\n                let mainAddressIdx = i\n                let mainAddressSequence = [TLAddressType.main.rawValue, (mainAddressIdx)]\n                \n                let address = TLHDWalletWrapper.getAddress(extendedPublicKey, sequence: mainAddressSequence as NSArray, isTestnet: self.walletConfig.isTestnet)\n                mainAddressDict.setObject(address, forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_KEY_ADDRESS as NSCopying)\n                mainAddressDict.setObject(TLAddressStatus.active.rawValue, forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_KEY_STATUS as NSCopying)\n                mainAddressDict.setObject(i, forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_KEY_INDEX as NSCopying)\n                \n                mainAddressesArray.add(mainAddressDict)\n            }\n            \n            let changeAddressDict = NSMutableDictionary()\n            let changeAddressIdx = 0\n            let changeAddressSequence = [TLAddressType.change.rawValue, changeAddressIdx]\n            \n            let address = TLHDWalletWrapper.getAddress(extendedPublicKey, sequence: changeAddressSequence as NSArray, isTestnet: self.walletConfig.isTestnet)\n            changeAddressDict.setObject(address, forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_KEY_ADDRESS as NSCopying)\n            changeAddressDict.setObject(TLAddressStatus.active.rawValue, forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_KEY_STATUS as NSCopying)\n            changeAddressDict.setObject(0, forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_KEY_INDEX as NSCopying)\n            \n            changeAddressesArray.add(changeAddressDict)\n            \n            return account\n    }\n    \n    \n    internal func getAccountDict(_ accountIdx: Int) -> (NSMutableDictionary) {\n        let accountsArray = getAccountsArray()\n        let accountDict = accountsArray.object(at: accountIdx) as! NSMutableDictionary\n        return accountDict\n    }\n    \n    //----------------------------------------------------------------------------------------------------------------\n    \n    func clearAllAddressesFromHDWallet(_ accountIdx: Int) -> () {\n        let accountDict = getAccountDict(accountIdx)\n        let mainAddressesArray = NSMutableArray()\n        accountDict.setObject(mainAddressesArray, forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_KEY_MAIN_ADDRESSES as NSCopying)\n        let changeAddressesArray = NSMutableArray()\n        accountDict.setObject(changeAddressesArray, forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_KEY_CHANGE_ADDRESSES as NSCopying)\n        accountDict.setObject(0, forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_KEY_MIN_MAIN_ADDRESS_IDX as NSCopying)\n        accountDict.setObject(0, forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_KEY_MIN_CHANGE_ADDRESS_IDX as NSCopying)\n        \n        NotificationCenter.default.post(name: Notification.Name(rawValue: TLNotificationEvents.EVENT_WALLET_PAYLOAD_UPDATED()), object: nil, userInfo: nil)\n    }\n    \n    func clearAllAddressesFromColdWalletAccount(_ idx: Int) -> () {\n        let accountDict = getColdWalletAccountAtIndex(idx)\n        let mainAddressesArray = NSMutableArray()\n        accountDict.setObject(mainAddressesArray, forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_KEY_MAIN_ADDRESSES as NSCopying)\n        let changeAddressesArray = NSMutableArray()\n        accountDict.setObject(changeAddressesArray, forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_KEY_CHANGE_ADDRESSES as NSCopying)\n        accountDict.setObject(0, forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_KEY_MIN_MAIN_ADDRESS_IDX as NSCopying)\n        accountDict.setObject(0, forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_KEY_MIN_CHANGE_ADDRESS_IDX as NSCopying)\n        NotificationCenter.default.post(name: Notification.Name(rawValue: TLNotificationEvents.EVENT_WALLET_PAYLOAD_UPDATED()), object: nil, userInfo: nil)\n    }\n    \n    func clearAllAddressesFromImportedAccount(_ idx: Int) -> () {\n        let accountDict = getImportedAccountAtIndex(idx)\n        let mainAddressesArray = NSMutableArray()\n        accountDict.setObject(mainAddressesArray, forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_KEY_MAIN_ADDRESSES as NSCopying)\n        let changeAddressesArray = NSMutableArray()\n        accountDict.setObject(changeAddressesArray, forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_KEY_CHANGE_ADDRESSES as NSCopying)\n        accountDict.setObject(0, forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_KEY_MIN_MAIN_ADDRESS_IDX as NSCopying)\n        accountDict.setObject(0, forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_KEY_MIN_CHANGE_ADDRESS_IDX as NSCopying)\n        NotificationCenter.default.post(name: Notification.Name(rawValue: TLNotificationEvents.EVENT_WALLET_PAYLOAD_UPDATED()), object: nil, userInfo: nil)\n    }\n    \n    func clearAllAddressesFromImportedWatchAccount(_ idx: Int) -> () {\n        let accountDict = getImportedWatchOnlyAccountAtIndex(idx)\n        let mainAddressesArray = NSMutableArray()\n        accountDict.setObject(mainAddressesArray, forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_KEY_MAIN_ADDRESSES as NSCopying)\n        let changeAddressesArray = NSMutableArray()\n        accountDict.setObject(changeAddressesArray, forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_KEY_CHANGE_ADDRESSES as NSCopying)\n        accountDict.setObject(0, forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_KEY_MIN_MAIN_ADDRESS_IDX as NSCopying)\n        accountDict.setObject(0, forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_KEY_MIN_CHANGE_ADDRESS_IDX as NSCopying)\n        NotificationCenter.default.post(name: Notification.Name(rawValue: TLNotificationEvents.EVENT_WALLET_PAYLOAD_UPDATED()), object: nil, userInfo: nil)\n    }\n    \n    //----------------------------------------------------------------------------------------------------------------\n    func updateAccountNeedsRecoveringFromHDWallet(_ accountIdx: Int, accountNeedsRecovering: Bool) -> () {\n        let accountDict = getAccountDict(accountIdx)\n        accountDict.setObject(accountNeedsRecovering, forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_ACCOUNT_NEEDS_RECOVERING as NSCopying)\n        NotificationCenter.default.post(name: Notification.Name(rawValue: TLNotificationEvents.EVENT_WALLET_PAYLOAD_UPDATED()), object: nil, userInfo: nil)\n    }\n    \n    func updateAccountNeedsRecoveringFromColdWalletAccount(_ idx: Int, accountNeedsRecovering: Bool) -> () {\n        let accountDict = getColdWalletAccountAtIndex(idx)\n        accountDict.setObject(accountNeedsRecovering, forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_ACCOUNT_NEEDS_RECOVERING as NSCopying)\n        NotificationCenter.default.post(name: Notification.Name(rawValue: TLNotificationEvents.EVENT_WALLET_PAYLOAD_UPDATED()), object: nil, userInfo: nil)\n    }\n    \n    func updateAccountNeedsRecoveringFromImportedAccount(_ idx: Int, accountNeedsRecovering: Bool) -> () {\n        let accountDict = getImportedAccountAtIndex(idx)\n        accountDict.setObject(accountNeedsRecovering, forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_ACCOUNT_NEEDS_RECOVERING as NSCopying)\n        NotificationCenter.default.post(name: Notification.Name(rawValue: TLNotificationEvents.EVENT_WALLET_PAYLOAD_UPDATED()), object: nil, userInfo: nil)\n    }\n    \n    func updateAccountNeedsRecoveringFromImportedWatchAccount(_ idx: Int, accountNeedsRecovering: Bool) -> () {\n        let accountDict = getImportedWatchOnlyAccountAtIndex(idx)\n        accountDict.setObject(accountNeedsRecovering, forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_ACCOUNT_NEEDS_RECOVERING as NSCopying)\n        NotificationCenter.default.post(name: Notification.Name(rawValue: TLNotificationEvents.EVENT_WALLET_PAYLOAD_UPDATED()), object: nil, userInfo: nil)\n    }\n    //----------------------------------------------------------------------------------------------------------------\n    \n    \n    func updateMainAddressStatusFromHDWallet(_ accountIdx: Int, addressIdx: Int,\n        addressStatus: TLAddressStatus) -> () {\n            let accountDict = getAccountDict(accountIdx)\n            self.updateMainAddressStatus(accountDict,\n                addressIdx: addressIdx,\n                addressStatus: addressStatus)\n    }\n    \n    func updateMainAddressStatusFromColdWalletAccount(_ idx: Int, addressIdx: Int,\n                                                         addressStatus: TLAddressStatus) -> () {\n        let accountDict = getColdWalletAccountAtIndex(idx)\n        self.updateMainAddressStatus(accountDict,\n                                     addressIdx: addressIdx,\n                                     addressStatus: addressStatus)\n    }\n    \n    func updateMainAddressStatusFromImportedAccount(_ idx: Int, addressIdx: Int,\n        addressStatus: TLAddressStatus) -> () {\n            let accountDict = getImportedAccountAtIndex(idx)\n            self.updateMainAddressStatus(accountDict,\n                addressIdx: addressIdx,\n                addressStatus: addressStatus)\n    }\n    \n    func updateMainAddressStatusFromImportedWatchAccount(_ idx: Int, addressIdx: Int,\n        addressStatus: TLAddressStatus) -> () {\n            let accountDict = getImportedWatchOnlyAccountAtIndex(idx)\n            self.updateMainAddressStatus(accountDict,\n                addressIdx: addressIdx,\n                addressStatus: addressStatus)\n    }\n    \n    func updateMainAddressStatus(_ accountDict: NSMutableDictionary, addressIdx: Int,\n        addressStatus: TLAddressStatus) -> () {\n            \n            let minMainAddressIdx = accountDict.object(forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_KEY_MIN_MAIN_ADDRESS_IDX) as! Int\n            \n            DLog(\"updateMainAddressStatus accountIdx \\(accountDict.object(forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_ACCOUNT_IDX) as! Int)\")\n            DLog(\"updateMainAddressStatus minMainAddressIdx \\(minMainAddressIdx) addressIdx: \\(addressIdx)\")\n            \n            assert(Int(addressIdx) == minMainAddressIdx, \"addressIdx != minMainAddressIdx\")\n            accountDict.setObject((minMainAddressIdx+1), forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_KEY_MIN_MAIN_ADDRESS_IDX as NSCopying)\n            \n            let mainAddressesArray = accountDict.object(forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_KEY_MAIN_ADDRESSES) as! NSMutableArray\n            \n            if (addressStatus == .archived && !TLWalletUtils.STATIC_MEMBERS.SHOULD_SAVE_ARCHIVED_ADDRESSES_IN_JSON) {\n                mainAddressesArray.removeObject(at: 0)\n            } else {\n                let mainAddressDict = mainAddressesArray.object(at: addressIdx) as! NSMutableDictionary\n                mainAddressDict.setObject(addressStatus.rawValue, forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_KEY_STATUS as NSCopying)\n            }\n            \n            NotificationCenter.default.post(name: Notification.Name(rawValue: TLNotificationEvents.EVENT_WALLET_PAYLOAD_UPDATED()), object: nil, userInfo: nil)\n    }\n    \n    func updateChangeAddressStatusFromHDWallet(_ accountIdx: Int, addressIdx: Int,\n        addressStatus: TLAddressStatus) -> () {\n            let accountDict = getAccountDict(accountIdx)\n            self.updateChangeAddressStatus(accountDict,\n                addressIdx: addressIdx,\n                addressStatus: addressStatus)\n    }\n    \n    func updateChangeAddressStatusFromImportedAccount(_ idx: Int, addressIdx: Int,\n        addressStatus: TLAddressStatus) -> () {\n            let accountDict = getImportedAccountAtIndex(idx)\n            self.updateChangeAddressStatus(accountDict,\n                addressIdx: addressIdx,\n                addressStatus: addressStatus)\n    }\n    \n    func updateChangeAddressStatusFromColdWalletAccount(_ idx: Int, addressIdx: Int,\n                                                           addressStatus: TLAddressStatus) -> () {\n        let accountDict = getColdWalletAccountAtIndex(idx)\n        self.updateChangeAddressStatus(accountDict,\n                                       addressIdx: addressIdx,\n                                       addressStatus: addressStatus)\n    }\n    \n    func updateChangeAddressStatusFromImportedWatchAccount(_ idx: Int, addressIdx: Int,\n        addressStatus: TLAddressStatus) -> () {\n            let accountDict = getImportedWatchOnlyAccountAtIndex(idx)\n            self.updateChangeAddressStatus(accountDict,\n                addressIdx: addressIdx,\n                addressStatus: addressStatus)\n    }\n    \n    func updateChangeAddressStatus(_ accountDict: NSMutableDictionary, addressIdx: Int,\n        addressStatus: TLAddressStatus) -> () {\n            \n            let minChangeAddressIdx = accountDict.object(forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_KEY_MIN_CHANGE_ADDRESS_IDX) as! Int\n            \n            DLog(\"updateChangeAddressStatus accountIdx \\(accountDict.object(forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_ACCOUNT_IDX) as! Int)\")\n            DLog(\"updateChangeAddressStatus minChangeAddressIdx \\(minChangeAddressIdx) addressIdx: \\(addressIdx)\")\n            \n            assert(Int(addressIdx) == minChangeAddressIdx, \"addressIdx != minChangeAddressIdx\")\n            accountDict.setObject((minChangeAddressIdx + 1), forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_KEY_MIN_CHANGE_ADDRESS_IDX as NSCopying)\n            \n            let changeAddressesArray = accountDict.object(forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_KEY_CHANGE_ADDRESSES) as! NSMutableArray\n            \n            if (addressStatus == .archived && !TLWalletUtils.STATIC_MEMBERS.SHOULD_SAVE_ARCHIVED_ADDRESSES_IN_JSON) {\n                changeAddressesArray.removeObject(at: 0)\n            } else {\n                let changeAddressDict = changeAddressesArray.object(at: addressIdx) as! NSMutableDictionary\n                changeAddressDict.setObject(addressStatus.rawValue, forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_KEY_STATUS as NSCopying)\n            }\n            \n            NotificationCenter.default.post(name: Notification.Name(rawValue: TLNotificationEvents.EVENT_WALLET_PAYLOAD_UPDATED()), object: nil, userInfo: nil)\n    }\n    //----------------------------------------------------------------------------------------------------------------\n    func getMinMainAddressIdxFromHDWallet(_ accountIdx: Int) -> Int {\n        let accountDict = getAccountDict(accountIdx)\n        return self.getMinMainAddressIdx(accountDict)\n    }\n    \n    func getMinMainAddressIdxFromColdWalletAccount(_ idx: Int) -> (Int) {\n        let accountDict = getColdWalletAccountAtIndex(idx)\n        return self.getMinMainAddressIdx(accountDict)\n    }\n    \n    func getMinMainAddressIdxFromImportedAccount(_ idx: Int) -> (Int) {\n        let accountDict = getImportedAccountAtIndex(idx)\n        return self.getMinMainAddressIdx(accountDict)\n    }\n    \n    func getMinMainAddressIdxFromImportedWatchAccount(_ idx: Int) -> (Int) {\n        let accountDict = getImportedWatchOnlyAccountAtIndex(idx)\n        return self.getMinMainAddressIdx(accountDict)\n    }\n    \n    func getMinMainAddressIdx(_ accountDict: NSMutableDictionary) -> (Int) {\n        return accountDict.object(forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_KEY_MIN_MAIN_ADDRESS_IDX) as! Int\n    }\n    \n    func getMinChangeAddressIdxFromHDWallet(_ accountIdx: Int) -> (Int) {\n        let accountDict = getAccountDict(accountIdx)\n        return self.getMinChangeAddressIdx(accountDict) as Int\n    }\n    \n    func getMinChangeAddressIdxFromColdWalletAccount(_ idx: Int) -> (Int) {\n        let accountDict = getColdWalletAccountAtIndex(idx)\n        return self.getMinChangeAddressIdx(accountDict) as Int\n    }\n    \n    func getMinChangeAddressIdxFromImportedAccount(_ idx: Int) -> (Int) {\n        let accountDict = getImportedAccountAtIndex(idx)\n        return self.getMinChangeAddressIdx(accountDict) as Int\n    }\n    \n    func getMinChangeAddressIdxFromImportedWatchAccount(_ idx: Int) -> (Int) {\n        let accountDict = getImportedWatchOnlyAccountAtIndex(idx)\n        return self.getMinChangeAddressIdx(accountDict) as Int\n    }\n    \n    func getMinChangeAddressIdx(_ accountDict: NSMutableDictionary) -> (Int) {\n        return accountDict.object(forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_KEY_MIN_CHANGE_ADDRESS_IDX) as! Int\n    }\n    \n    //----------------------------------------------------------------------------------------------------------------\n    \n    func getNewMainAddressFromHDWallet(_ accountIdx: Int, expectedAddressIndex: Int) -> (NSDictionary) {\n        let accountDict = getAccountDict(accountIdx)\n        return getNewMainAddress(accountDict, expectedAddressIndex: expectedAddressIndex)\n    }\n    \n    func getNewMainAddressFromColdWalletAccount(_ idx: Int, expectedAddressIndex: Int) -> (NSDictionary) {\n        let accountDict = getColdWalletAccountAtIndex(idx)\n        return getNewMainAddress(accountDict, expectedAddressIndex: expectedAddressIndex)\n    }\n    \n    func getNewMainAddressFromImportedAccount(_ idx: Int, expectedAddressIndex: Int) -> (NSDictionary) {\n        let accountDict = getImportedAccountAtIndex(idx)\n        return getNewMainAddress(accountDict, expectedAddressIndex: expectedAddressIndex)\n    }\n    \n    func getNewMainAddressFromImportedWatchAccount(_ idx: Int, expectedAddressIndex: Int) -> (NSDictionary) {\n        let accountDict = getImportedWatchOnlyAccountAtIndex(idx)\n        return getNewMainAddress(accountDict, expectedAddressIndex: expectedAddressIndex)\n    }\n    \n    fileprivate func getNewMainAddress(_ accountDict: NSDictionary, expectedAddressIndex: Int) -> (NSDictionary) {\n        let mainAddressesArray = accountDict.object(forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_KEY_MAIN_ADDRESSES) as! NSMutableArray\n        \n        DLog(String(format:\"getNewMainAddress expectedAddressIndex %lu mainAddressesArray.count %lu\", expectedAddressIndex, mainAddressesArray.count))\n        \n        let mainAddressIdx:Int\n        if (TLWalletUtils.STATIC_MEMBERS.SHOULD_SAVE_ARCHIVED_ADDRESSES_IN_JSON) {\n            assert(expectedAddressIndex == mainAddressesArray.count, \"expectedAddressIndex != mainAddressesArray.count\")\n            mainAddressIdx = (expectedAddressIndex)\n        } else {\n            let minMainAddressIdx = accountDict.object(forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_KEY_MIN_MAIN_ADDRESS_IDX) as! Int\n            assert(expectedAddressIndex == mainAddressesArray.count + minMainAddressIdx, \"expectedAddressIndex != mainAddressesArray.count + minMainAddressIdx\")\n            mainAddressIdx = (expectedAddressIndex)\n        }\n        \n        if (mainAddressIdx >= NSIntegerMax) {\n            NSException(name: NSExceptionName(rawValue: \"Universe ended\"), reason: \"reached max hdwallet index\", userInfo: nil).raise()\n            \n        }\n        \n        let mainAddressSequence = [TLAddressType.main.rawValue, mainAddressIdx]\n        let mainAddressDict = NSMutableDictionary()\n        \n        let extendedPublicKey = accountDict.object(forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_EXTENDED_PUBLIC_KEY) as! String\n        let address = TLHDWalletWrapper.getAddress(extendedPublicKey, sequence: mainAddressSequence as NSArray, isTestnet: self.walletConfig.isTestnet)\n        \n        mainAddressDict.setObject(address, forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_KEY_ADDRESS as NSCopying)\n        mainAddressDict.setObject((TLAddressStatus.active.rawValue), forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_KEY_STATUS as NSCopying)\n        mainAddressDict.setObject(mainAddressIdx, forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_KEY_INDEX as NSCopying)\n        \n        mainAddressesArray.add(mainAddressDict)\n        \n        DispatchQueue.main.async {\n            NotificationCenter.default.post(name: Notification.Name(rawValue: TLNotificationEvents.EVENT_WALLET_PAYLOAD_UPDATED()), object: nil, userInfo: nil)\n        }\n        \n        return mainAddressDict\n    }\n    //----------------------------------------------------------------------------------------------------------------\n    func getNewChangeAddressFromHDWallet(_ accountIdx: Int, expectedAddressIndex: Int) -> (NSDictionary) {\n        let accountDict = getAccountDict(accountIdx)\n        return getNewChangeAddress(accountDict, expectedAddressIndex: expectedAddressIndex)\n    }\n    \n    func getNewChangeAddressFromColdWalletAccount(_ idx: UInt, expectedAddressIndex: Int) -> (NSDictionary) {\n        let accountDict = getColdWalletAccountAtIndex(Int(idx))\n        return getNewChangeAddress(accountDict, expectedAddressIndex: expectedAddressIndex)\n    }\n    \n    func getNewChangeAddressFromImportedAccount(_ idx: Int, expectedAddressIndex: Int) -> (NSDictionary) {\n        let accountDict = getImportedAccountAtIndex(idx)\n        return getNewChangeAddress(accountDict, expectedAddressIndex: expectedAddressIndex)\n    }\n    \n    func getNewChangeAddressFromImportedWatchAccount(_ idx: UInt, expectedAddressIndex: Int) -> (NSDictionary) {\n        let accountDict = getImportedWatchOnlyAccountAtIndex(Int(idx))\n        return getNewChangeAddress(accountDict, expectedAddressIndex: expectedAddressIndex)\n    }\n    \n    fileprivate func getNewChangeAddress(_ accountDict: NSDictionary, expectedAddressIndex: Int) -> (NSDictionary) {\n        \n        let changeAddressesArray = accountDict.object(forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_KEY_CHANGE_ADDRESSES) as! NSMutableArray\n        \n        DLog(String(format: \"getNewChangeAddress expectedAddressIndex %lu changeAddressesArray.count %lu\", expectedAddressIndex, changeAddressesArray.count))\n        \n        let changeAddressIdx:Int\n        if (TLWalletUtils.STATIC_MEMBERS.SHOULD_SAVE_ARCHIVED_ADDRESSES_IN_JSON) {\n            assert(expectedAddressIndex == changeAddressesArray.count, \"expectedAddressIndex != changeAddressesArray.count\")\n            changeAddressIdx = (changeAddressesArray.count)\n        } else {\n            let minChangeAddressIdx = accountDict.object(forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_KEY_MIN_CHANGE_ADDRESS_IDX) as! Int\n            assert(expectedAddressIndex == changeAddressesArray.count + minChangeAddressIdx, \"expectedAddressIndex != changeAddressesArray.count + minChangeAddressIdx\")\n            changeAddressIdx = (expectedAddressIndex)\n        }\n        \n        if (changeAddressIdx >= NSIntegerMax) {\n            NSException(name: NSExceptionName(rawValue: \"Universe ended\"), reason: \"reached max hdwallet index\", userInfo: nil).raise()\n        }\n        \n        let changeAddressSequence = [TLAddressType.change.rawValue, changeAddressIdx]\n        let changeAddressDict = NSMutableDictionary()\n        \n        let extendedPublicKey = accountDict.object(forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_EXTENDED_PUBLIC_KEY) as! String\n        let address = TLHDWalletWrapper.getAddress(extendedPublicKey, sequence: changeAddressSequence as NSArray, isTestnet: self.walletConfig.isTestnet)\n        changeAddressDict.setObject(address, forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_KEY_ADDRESS as NSCopying)\n        changeAddressDict.setObject(TLAddressStatus.active.rawValue, forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_KEY_STATUS as NSCopying)\n        changeAddressDict.setObject(changeAddressIdx, forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_KEY_INDEX as NSCopying)\n        \n        changeAddressesArray.add(changeAddressDict)\n        \n        DispatchQueue.main.async {\n            NotificationCenter.default.post(name: Notification.Name(rawValue: TLNotificationEvents.EVENT_WALLET_PAYLOAD_UPDATED()), object: nil, userInfo: nil)\n        }\n        \n        return changeAddressDict\n    }\n    \n    //----------------------------------------------------------------------------------------------------------------\n    func removeTopMainAddressFromHDWallet(_ accountIdx: Int) -> (String?) {\n        let accountDict = getAccountDict(accountIdx)\n        return removeTopMainAddress(accountDict)\n    }\n    \n    func removeTopMainAddressFromColdWalletAccount(_ idx: Int) -> (String?) {\n        let accountDict = getColdWalletAccountAtIndex(idx)\n        return removeTopMainAddress(accountDict)\n    }\n    \n    func removeTopMainAddressFromImportedAccount(_ idx: Int) -> (String?) {\n        let accountDict = getImportedAccountAtIndex(idx)\n        return removeTopMainAddress(accountDict)\n    }\n    \n    func removeTopMainAddressFromImportedWatchAccount(_ idx: Int) -> (String?) {\n        let accountDict = getImportedWatchOnlyAccountAtIndex(idx)\n        return removeTopMainAddress(accountDict)\n    }\n    \n    fileprivate func removeTopMainAddress(_ accountDict: NSMutableDictionary) -> (String?) {\n        let mainAddressesArray = accountDict.object(forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_KEY_MAIN_ADDRESSES) as! NSMutableArray\n        if (mainAddressesArray.count > 0) {\n            let mainAddressDict = mainAddressesArray.lastObject as! NSDictionary\n            mainAddressesArray.removeLastObject()\n            NotificationCenter.default.post(name: Notification.Name(rawValue: TLNotificationEvents.EVENT_WALLET_PAYLOAD_UPDATED()), object: nil, userInfo: nil)\n            return mainAddressDict.object(forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_KEY_ADDRESS) as? String\n        }\n        \n        return nil\n    }\n    //----------------------------------------------------------------------------------------------------------------\n    func removeTopChangeAddressFromHDWallet(_ accountIdx: Int) -> (String?) {\n        let accountDict = getAccountDict(accountIdx)\n        return removeTopChangeAddress(accountDict)\n    }\n    \n    func removeTopChangeAddressFromColdWalletAccount(_ idx: Int) -> (String?) {\n        let accountDict = getColdWalletAccountAtIndex(idx)\n        return removeTopChangeAddress(accountDict)\n    }\n\n    func removeTopChangeAddressFromImportedAccount(_ idx: Int) -> (String?) {\n        let accountDict = getImportedAccountAtIndex(idx)\n        return removeTopChangeAddress(accountDict)\n    }\n    \n    func removeTopChangeAddressFromImportedWatchAccount(_ idx: Int) -> (String?) {\n        let accountDict = getImportedWatchOnlyAccountAtIndex(idx)\n        return removeTopChangeAddress(accountDict)\n    }\n    \n    fileprivate func removeTopChangeAddress(_ accountDict: NSMutableDictionary) -> (String?) {\n        let changeAddressesArray = accountDict.object(forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_KEY_CHANGE_ADDRESSES) as! NSMutableArray\n        if (changeAddressesArray.count > 0) {\n            let changeAddressDict = changeAddressesArray.lastObject as! NSDictionary\n            changeAddressesArray.removeLastObject()\n            NotificationCenter.default.post(name: Notification.Name(rawValue: TLNotificationEvents.EVENT_WALLET_PAYLOAD_UPDATED()), object: nil, userInfo: nil)\n            return changeAddressDict.object(forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_KEY_ADDRESS) as? String\n        }\n        return nil\n    }\n    \n    //----------------------------------------------------------------------------------------------------------------\n    \n    func archiveAccountHDWallet(_ accountIdx: Int, enabled: Bool) -> () {\n        let accountsArray = getAccountsArray()\n        assert(accountsArray.count > 1, \"\")\n        let accountDict = accountsArray.object(at: accountIdx) as! NSDictionary\n        let status = enabled ? TLAddressStatus.archived : TLAddressStatus.active\n        accountDict.setValue(status.rawValue, forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_KEY_STATUS)\n        NotificationCenter.default.post(name: Notification.Name(rawValue: TLNotificationEvents.EVENT_WALLET_PAYLOAD_UPDATED()), object: nil, userInfo: nil)\n    }\n    \n    func archiveAccountColdWalletAccount(_ idx: Int, enabled: Bool) -> () {\n        let accountDict = getColdWalletAccountAtIndex(idx)\n        let status = enabled ? TLAddressStatus.archived : TLAddressStatus.active\n        accountDict.setValue(status.rawValue, forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_KEY_STATUS)\n        NotificationCenter.default.post(name: Notification.Name(rawValue: TLNotificationEvents.EVENT_WALLET_PAYLOAD_UPDATED()), object: nil, userInfo: nil)\n    }\n    \n    func archiveAccountImportedAccount(_ idx: Int, enabled: Bool) -> () {\n        let accountDict = getImportedAccountAtIndex(idx)\n        let status = enabled ? TLAddressStatus.archived : TLAddressStatus.active\n        accountDict.setValue(status.rawValue, forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_KEY_STATUS)\n        NotificationCenter.default.post(name: Notification.Name(rawValue: TLNotificationEvents.EVENT_WALLET_PAYLOAD_UPDATED()), object: nil, userInfo: nil)\n    }\n    \n    func archiveAccountImportedWatchAccount(_ idx: Int, enabled: Bool) -> () {\n        let accountDict = getImportedWatchOnlyAccountAtIndex(idx)\n        let status = enabled ? TLAddressStatus.archived : TLAddressStatus.active\n        accountDict.setValue(status.rawValue, forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_KEY_STATUS)\n        NotificationCenter.default.post(name: Notification.Name(rawValue: TLNotificationEvents.EVENT_WALLET_PAYLOAD_UPDATED()), object: nil, userInfo: nil)\n    }\n\n    //----------------------------------------------------------------------------------------------------------------\n    \n    fileprivate func getAccountsArray() -> NSMutableArray {\n        let hdWalletDict = getHDWallet()\n        let accountsArray = hdWalletDict.object(forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_KEY_ACCOUNTS) as! NSMutableArray\n        return accountsArray\n    }\n    \n    func removeTopAccount() -> (Bool) {\n        let accountsArray = getAccountsArray()\n        if (accountsArray.count > 0) {\n            accountsArray.removeLastObject()\n            let hdWalletDict = getHDWallet()\n            let maxAccountIDCreated = hdWalletDict.object(forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_KEY_MAX_ACCOUNTS_CREATED) as! Int\n            hdWalletDict.setObject((maxAccountIDCreated - 1), forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_KEY_MAX_ACCOUNTS_CREATED as NSCopying)\n            NotificationCenter.default.post(name: Notification.Name(rawValue: TLNotificationEvents.EVENT_WALLET_PAYLOAD_UPDATED()), object: nil, userInfo: nil)\n            return true\n        }\n        \n        return false\n    }\n    \n    fileprivate func createNewAccount(_ accountName: String, accountType: TLAccount) -> (TLAccountObject) {\n        return createNewAccount(accountName, accountType: accountType, preloadStartingAddresses: true)\n    }\n    \n    func createNewAccount(_ accountName: String, accountType: TLAccount, preloadStartingAddresses: Bool) -> TLAccountObject {\n            assert(self.masterHex != nil, \"\")\n            let hdWalletDict = getHDWallet()\n            let accountsArray = getAccountsArray()\n            let maxAccountIDCreated = hdWalletDict.object(forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_KEY_MAX_ACCOUNTS_CREATED) as! Int\n            let extendPrivKey = TLHDWalletWrapper.getExtendPrivKey(self.masterHex!, accountIdx: UInt(maxAccountIDCreated))\n            let accountDict = createAccountDictWithPreload(accountName, extendedKey: extendPrivKey,\n                isPrivateExtendedKey: true, accountIdx: Int(maxAccountIDCreated), preloadStartingAddresses: preloadStartingAddresses)\n            accountsArray.add(accountDict)\n            hdWalletDict.setObject((maxAccountIDCreated + 1), forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_KEY_MAX_ACCOUNTS_CREATED as NSCopying)\n        \n            NotificationCenter.default.post(name: Notification.Name(rawValue: TLNotificationEvents.EVENT_WALLET_PAYLOAD_UPDATED()), object: nil, userInfo: nil)\n        \n            if (getCurrentAccountID() == nil) {\n                setCurrentAccountID(\"0\")\n            }\n            \n            return TLAccountObject(appWallet: self, dict: accountDict, accountType: .hdWallet)\n    }\n    \n    fileprivate func createWallet(_ passphrase: String, masterHex: String, walletName: String) -> (NSMutableDictionary) {\n        let createdWalletDict = NSMutableDictionary()\n        \n        let hdWalletDict = NSMutableDictionary()\n        hdWalletDict.setObject(walletName, forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_KEY_NAME as NSCopying)\n        hdWalletDict.setObject(masterHex, forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_KEY_MASTER_HEX as NSCopying)\n        hdWalletDict.setObject(passphrase, forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_KEY_PASSPHRASE as NSCopying)\n        \n        hdWalletDict.setObject(0, forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_KEY_MAX_ACCOUNTS_CREATED as NSCopying)\n        \n        let accountsArray = NSMutableArray()\n        hdWalletDict.setObject(accountsArray, forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_KEY_ACCOUNTS as NSCopying)\n        let hdWalletsArray = NSMutableArray()\n        hdWalletsArray.add(hdWalletDict)\n        \n        createdWalletDict.setValue(hdWalletsArray, forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_KEY_HDWALLETS)\n        \n        let importedKeysDict = NSMutableDictionary()\n        \n        let coldWalletAccountsArray = NSMutableArray()\n        let importedAccountsArray = NSMutableArray()\n        let watchOnlyAccountsArray = NSMutableArray()\n        let importedPrivateKeysArray = NSMutableArray()\n        let watchOnlyAddressesArray = NSMutableArray()\n        importedKeysDict.setObject(coldWalletAccountsArray, forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_COLD_WALLET_ACCOUNTS as NSCopying)\n        importedKeysDict.setObject(importedAccountsArray, forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_IMPORTED_ACCOUNTS as NSCopying)\n        importedKeysDict.setObject(watchOnlyAccountsArray, forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_WATCH_ONLY_ACCOUNTS as NSCopying)\n        importedKeysDict.setObject(importedPrivateKeysArray, forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_IMPORTED_PRIVATE_KEYS as NSCopying)\n        importedKeysDict.setObject(watchOnlyAddressesArray, forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_WATCH_ONLY_ADDRESSES as NSCopying)\n        \n        \n        createdWalletDict.setObject(importedKeysDict, forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_IMPORTS as NSCopying)\n        \n        return createdWalletDict\n    }\n    \n    fileprivate func getImportedKeysDict() -> (NSMutableDictionary) {\n        let hdWallet = getCurrentWallet()\n        return hdWallet.object(forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_IMPORTS) as! NSMutableDictionary\n    }\n    \n    internal func getColdWalletAccountAtIndex(_ idx: Int) -> (NSMutableDictionary) {\n        let importedKeysDict = getImportedKeysDict()\n        let coldWalletAccountsArray = importedKeysDict.object(forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_COLD_WALLET_ACCOUNTS) as! NSArray\n        let accountDict = coldWalletAccountsArray.object(at: idx) as! NSMutableDictionary\n        return accountDict\n    }\n    \n    internal func getImportedAccountAtIndex(_ idx: Int) -> (NSMutableDictionary) {\n        let importedKeysDict = getImportedKeysDict()\n        let importedAccountsArray = importedKeysDict.object(forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_IMPORTED_ACCOUNTS) as! NSArray\n        \n        let accountDict = importedAccountsArray.object(at: idx) as! NSMutableDictionary\n        return accountDict\n    }\n    \n    internal func getImportedWatchOnlyAccountAtIndex(_ idx: Int) -> (NSMutableDictionary) {\n        let importedKeysDict = getImportedKeysDict()\n        let watchOnlyAccountsArray = importedKeysDict.object(forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_WATCH_ONLY_ACCOUNTS) as! NSArray\n        let accountDict = watchOnlyAccountsArray.object(at: idx) as! NSMutableDictionary\n        return accountDict\n    }\n    \n    //------------------------------------------------------------------------------------------------------------------------------------------------\n    //------------------------------------------------------------------------------------------------------------------------------------------------\n    //------------------------------------------------------------------------------------------------------------------------------------------------\n    \n    func addColdWalletAccount(_ extendedPublicKey: String) -> (TLAccountObject) {\n        let importedKeysDict = getImportedKeysDict()\n        let coldWalletAccountsArray = importedKeysDict.object(forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_COLD_WALLET_ACCOUNTS) as! NSMutableArray\n        \n        let accountIdx = coldWalletAccountsArray.count // \"accountIdx\" key is different for ImportedAccount then hdwallet account\n        let coldWalletAccountDict = createAccountDictWithPreload(\"\", extendedKey: extendedPublicKey, isPrivateExtendedKey: false, accountIdx: accountIdx, preloadStartingAddresses: false)\n        coldWalletAccountsArray.add(coldWalletAccountDict)\n        NotificationCenter.default.post(name: Notification.Name(rawValue: TLNotificationEvents.EVENT_WALLET_PAYLOAD_UPDATED()), object: nil, userInfo: nil)\n        return TLAccountObject(appWallet: self, dict: coldWalletAccountDict, accountType: .coldWallet)\n    }\n    \n    func deleteColdWalletAccount(_ idx: Int) -> () {\n        let importedKeysDict = getImportedKeysDict()\n        let coldWalletAccountsArray = importedKeysDict.object(forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_COLD_WALLET_ACCOUNTS) as! NSMutableArray\n        \n        coldWalletAccountsArray.removeObject(at: idx)\n        NotificationCenter.default.post(name: Notification.Name(rawValue: TLNotificationEvents.EVENT_WALLET_PAYLOAD_UPDATED()), object: nil, userInfo: nil)\n    }\n    \n    func setColdWalletAccountName(_ name: String, idx: Int) -> () {\n        let importedKeysDict = getImportedKeysDict()\n        let coldWalletAccountsArray = importedKeysDict.object(forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_COLD_WALLET_ACCOUNTS) as! NSArray\n        \n        let accountDict = coldWalletAccountsArray.object(at: idx) as! NSMutableDictionary\n        accountDict.setObject(name, forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_KEY_NAME as NSCopying)\n        NotificationCenter.default.post(name: Notification.Name(rawValue: TLNotificationEvents.EVENT_WALLET_PAYLOAD_UPDATED()), object: nil, userInfo: nil)\n    }\n    \n    func getColdWalletAccountArray() -> (NSArray) {\n        let importedKeysDict = getImportedKeysDict()\n        let accountsArray = importedKeysDict.object(forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_COLD_WALLET_ACCOUNTS) as! NSArray\n        \n        \n        let accountObjectArray = NSMutableArray()\n        for accountDict in accountsArray as! [NSDictionary] {\n            let accountObject = TLAccountObject(appWallet: self, dict: accountDict, accountType: .coldWallet)\n            accountObjectArray.add(accountObject)\n        }\n        return accountObjectArray\n    }\n\n    func addImportedAccount(_ extendedPrivateKey: String) -> (TLAccountObject) {\n        let importedKeysDict = getImportedKeysDict()\n        let importedAccountsArray = importedKeysDict.object(forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_IMPORTED_ACCOUNTS) as! NSMutableArray\n        \n        let accountIdx = importedAccountsArray.count // \"accountIdx\" key is different for ImportedAccount then hdwallet account\n        let accountDict = createAccountDictWithPreload(\"\", extendedKey: extendedPrivateKey, isPrivateExtendedKey: true, accountIdx: accountIdx, preloadStartingAddresses: false)\n        importedAccountsArray.add(accountDict)\n        NotificationCenter.default.post(name: Notification.Name(rawValue: TLNotificationEvents.EVENT_WALLET_PAYLOAD_UPDATED()), object: nil, userInfo: nil)\n        \n        return TLAccountObject(appWallet: self, dict: accountDict, accountType: .imported)\n    }\n    \n    func deleteImportedAccount(_ idx: Int) -> () {\n        let importedKeysDict = getImportedKeysDict()\n        let importedAccountsArray = importedKeysDict.object(forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_IMPORTED_ACCOUNTS) as! NSMutableArray\n        \n        importedAccountsArray.removeObject(at: idx)\n        NotificationCenter.default.post(name: Notification.Name(rawValue: TLNotificationEvents.EVENT_WALLET_PAYLOAD_UPDATED()), object: nil, userInfo: nil)\n    }\n    \n    func setImportedAccountName(_ name: String, idx: Int) -> () {\n        let accountDict = getImportedAccountAtIndex(idx)\n        accountDict.setObject(name, forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_KEY_NAME as NSCopying)\n        NotificationCenter.default.post(name: Notification.Name(rawValue: TLNotificationEvents.EVENT_WALLET_PAYLOAD_UPDATED()), object: nil, userInfo: nil)\n    }\n    \n    func getImportedAccountArray() -> (NSArray) {\n        let importedKeysDict = getImportedKeysDict()\n        let accountsArray = importedKeysDict.object(forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_IMPORTED_ACCOUNTS) as! NSArray\n        \n        \n        let accountObjectArray = NSMutableArray()\n        for accountDict in accountsArray as! [NSDictionary] {\n            let accountObject = TLAccountObject(appWallet: self, dict: accountDict, accountType: .imported)\n            accountObjectArray.add(accountObject)\n            \n            \n        }\n        return accountObjectArray\n    }\n    \n    func addWatchOnlyAccount(_ extendedPublicKey: String) -> (TLAccountObject) {\n        let importedKeysDict = getImportedKeysDict()\n        let watchOnlyAccountsArray = importedKeysDict.object(forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_WATCH_ONLY_ACCOUNTS) as! NSMutableArray\n        \n        let accountIdx = watchOnlyAccountsArray.count // \"accountIdx\" key is different for ImportedAccount then hdwallet account\n        let watchOnlyAccountDict = createAccountDictWithPreload(\"\", extendedKey: extendedPublicKey, isPrivateExtendedKey: false, accountIdx: accountIdx, preloadStartingAddresses: false)\n        watchOnlyAccountsArray.add(watchOnlyAccountDict)\n        NotificationCenter.default.post(name: Notification.Name(rawValue: TLNotificationEvents.EVENT_WALLET_PAYLOAD_UPDATED()), object: nil, userInfo: nil)\n        return TLAccountObject(appWallet: self, dict: watchOnlyAccountDict, accountType: .importedWatch)\n    }\n    \n    func deleteWatchOnlyAccount(_ idx: Int) -> () {\n        let importedKeysDict = getImportedKeysDict()\n        let watchOnlyAccountsArray = importedKeysDict.object(forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_WATCH_ONLY_ACCOUNTS) as! NSMutableArray\n        \n        watchOnlyAccountsArray.removeObject(at: idx)\n        NotificationCenter.default.post(name: Notification.Name(rawValue: TLNotificationEvents.EVENT_WALLET_PAYLOAD_UPDATED()), object: nil, userInfo: nil)\n    }\n    \n    func setWatchOnlyAccountName(_ name: String, idx: Int) -> () {\n        let importedKeysDict = getImportedKeysDict()\n        let watchOnlyAccountsArray = importedKeysDict.object(forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_WATCH_ONLY_ACCOUNTS) as! NSArray\n        \n        let accountDict = watchOnlyAccountsArray.object(at: idx) as! NSMutableDictionary\n        accountDict.setObject(name, forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_KEY_NAME as NSCopying)\n        NotificationCenter.default.post(name: Notification.Name(rawValue: TLNotificationEvents.EVENT_WALLET_PAYLOAD_UPDATED()), object: nil, userInfo: nil)\n    }\n    \n    func getWatchOnlyAccountArray() -> (NSArray) {\n        let importedKeysDict = getImportedKeysDict()\n        let accountsArray = importedKeysDict.object(forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_WATCH_ONLY_ACCOUNTS) as! NSArray\n        \n        \n        let accountObjectArray = NSMutableArray()\n        for accountDict in accountsArray as! [NSDictionary] {\n            let accountObject = TLAccountObject(appWallet: self, dict: accountDict, accountType: .importedWatch)\n            accountObjectArray.add(accountObject)\n        }\n        return accountObjectArray\n    }\n    \n    func addImportedPrivateKey(_ privateKey: String, encryptedPrivateKey: String?) -> (NSDictionary) {\n        let importedKeysDict = getImportedKeysDict()\n        let importedPrivateKeyArray = importedKeysDict.object(forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_IMPORTED_PRIVATE_KEYS) as! NSMutableArray\n        \n        var importedPrivateKey = NSDictionary()\n        if (encryptedPrivateKey == nil) {\n            importedPrivateKey = [\n                TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_KEY_KEY: privateKey,\n                TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_KEY_ADDRESS: TLCoreBitcoinWrapper.getAddress(privateKey, isTestnet: self.walletConfig.isTestnet)!,\n                TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_KEY_LABEL: String(\"\"),\n                TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_KEY_STATUS: Int(TLAddressStatus.active.rawValue)\n            ]\n        } else {\n            importedPrivateKey = [\n                TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_KEY_KEY: encryptedPrivateKey!,\n                TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_KEY_ADDRESS: TLCoreBitcoinWrapper.getAddress(privateKey, isTestnet: self.walletConfig.isTestnet)!,\n                TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_KEY_LABEL: String(),\n                TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_KEY_STATUS: Int(TLAddressStatus.active.rawValue)\n            ]\n        }\n        \n        let importedPrivateKeyDict = NSMutableDictionary(dictionary: importedPrivateKey)\n        importedPrivateKeyArray.add(importedPrivateKeyDict)\n        NotificationCenter.default.post(name: Notification.Name(rawValue: TLNotificationEvents.EVENT_WALLET_PAYLOAD_UPDATED()), object: nil, userInfo: nil)\n        return importedPrivateKey\n    }\n    \n    func deleteImportedPrivateKey(_ idx: Int) -> () {\n        let importedKeysDict = getImportedKeysDict()\n        let importedPrivateKeyArray = importedKeysDict.object(forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_IMPORTED_PRIVATE_KEYS) as! NSMutableArray\n        \n        importedPrivateKeyArray.removeObject(at: idx)\n        NotificationCenter.default.post(name: Notification.Name(rawValue: TLNotificationEvents.EVENT_WALLET_PAYLOAD_UPDATED()), object: nil, userInfo: nil)\n    }\n    \n    func setImportedPrivateKeyLabel(_ label: String, idx: Int) -> () {\n        let importedKeysDict = getImportedKeysDict()\n        let importedPrivateKeyArray = importedKeysDict.object(forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_IMPORTED_PRIVATE_KEYS) as! NSArray\n        \n        let privateKeyDict = importedPrivateKeyArray.object(at: idx) as! NSMutableDictionary\n        privateKeyDict.setObject(label, forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_KEY_LABEL as NSCopying)\n        NotificationCenter.default.post(name: Notification.Name(rawValue: TLNotificationEvents.EVENT_WALLET_PAYLOAD_UPDATED()), object: nil, userInfo: nil)\n    }\n    \n    func setImportedPrivateKeyArchive(_ archive: Bool, idx: Int) -> () {\n        let importedKeysDict = getImportedKeysDict()\n        let importedPrivateKeyArray = importedKeysDict.object(forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_IMPORTED_PRIVATE_KEYS) as! NSArray\n        let privateKeyDict = importedPrivateKeyArray.object(at: idx) as! NSMutableDictionary\n        \n        let status = archive ? TLAddressStatus.archived : TLAddressStatus.active\n        privateKeyDict.setObject(status.rawValue, forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_KEY_STATUS as NSCopying)\n        NotificationCenter.default.post(name: Notification.Name(rawValue: TLNotificationEvents.EVENT_WALLET_PAYLOAD_UPDATED()), object: nil, userInfo: nil)\n    }\n    \n    func getImportedPrivateKeyArray() -> (NSArray) {\n        let importedKeysDict = getImportedKeysDict()\n        \n        let importedAddresses = importedKeysDict.object(forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_IMPORTED_PRIVATE_KEYS) as! NSArray\n        let importedAddressesObjectArray = NSMutableArray(capacity: importedAddresses.count)\n        \n        for addressDict in importedAddresses as! [NSDictionary] {\n            let importedAddressObject = TLImportedAddress(appWallet: self, dict: addressDict)\n            importedAddressesObjectArray.add(importedAddressObject)\n        }\n        return importedAddressesObjectArray\n    }\n    \n    func addWatchOnlyAddress(_ address: NSString) -> (NSDictionary) {\n        let importedKeysDict = getImportedKeysDict()\n        let watchOnlyAddressArray = importedKeysDict.object(forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_WATCH_ONLY_ADDRESSES) as! NSMutableArray\n        \n        let watchOnlyAddress = [\n            TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_KEY_ADDRESS: address,\n            TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_KEY_LABEL: \"\",\n            TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_KEY_STATUS: (TLAddressStatus.active.rawValue)\n        ] as [String : Any]\n        \n        let watchOnlyAddressDict = NSMutableDictionary(dictionary: watchOnlyAddress)\n        watchOnlyAddressArray.add(watchOnlyAddressDict)\n        NotificationCenter.default.post(name: Notification.Name(rawValue: TLNotificationEvents.EVENT_WALLET_PAYLOAD_UPDATED()), object: nil, userInfo: nil)\n        return watchOnlyAddress as (NSDictionary)\n    }\n    \n    func deleteImportedWatchAddress(_ idx: Int) -> () {\n        let importedKeysDict = getImportedKeysDict()\n        let watchOnlyAddressArray = importedKeysDict.object(forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_WATCH_ONLY_ADDRESSES) as! NSMutableArray\n        \n        watchOnlyAddressArray.removeObject(at: idx)\n        NotificationCenter.default.post(name: Notification.Name(rawValue: TLNotificationEvents.EVENT_WALLET_PAYLOAD_UPDATED()), object: nil, userInfo: nil)\n    }\n    \n    \n    func setWatchOnlyAddressLabel(_ label: String, idx: Int) -> () {\n        let importedKeysDict = getImportedKeysDict()\n        let watchOnlyAddressArray = importedKeysDict.object(forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_WATCH_ONLY_ADDRESSES) as! NSArray\n        let addressDict = watchOnlyAddressArray.object(at: idx) as! NSMutableDictionary\n        addressDict.setObject(label, forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_KEY_LABEL as NSCopying)\n        NotificationCenter.default.post(name: Notification.Name(rawValue: TLNotificationEvents.EVENT_WALLET_PAYLOAD_UPDATED()), object: nil, userInfo: nil)\n    }\n    \n    func setWatchOnlyAddressArchive(_ archive: Bool, idx: Int) -> () {\n        let importedKeysDict = getImportedKeysDict()\n        let watchOnlyAddressArray = importedKeysDict.object(forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_WATCH_ONLY_ADDRESSES) as! NSArray\n        let addressDict = watchOnlyAddressArray.object(at: idx) as! NSMutableDictionary\n        \n        let status = archive ? TLAddressStatus.archived : TLAddressStatus.active\n        addressDict.setObject(status.rawValue, forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_KEY_STATUS as NSCopying)\n        NotificationCenter.default.post(name: Notification.Name(rawValue: TLNotificationEvents.EVENT_WALLET_PAYLOAD_UPDATED()), object: nil, userInfo: nil)\n    }\n    \n    \n    func getWatchOnlyAddressArray() -> (NSArray) {\n        let importedKeysDict = getImportedKeysDict()\n        \n        let importedAddresses = importedKeysDict.object(forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_WATCH_ONLY_ADDRESSES) as! NSArray\n        let importedAddressesObjectArray = NSMutableArray(capacity: importedAddresses.count)\n        \n        for addressDict in importedAddresses as! [NSDictionary] {\n            let importedAddressObject = TLImportedAddress(appWallet: self, dict: addressDict)\n            importedAddressesObjectArray.add(importedAddressObject)\n        }\n        \n        return importedAddressesObjectArray\n    }\n    \n    //------------------------------------------------------------------------------------------------------------------------------------------------\n    //------------------------------------------------------------------------------------------------------------------------------------------------\n    //------------------------------------------------------------------------------------------------------------------------------------------------\n    \n    func getAddressBook() -> (NSArray) {\n        return self.getCurrentWallet().object(forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_KEY_ADDRESS_BOOK) as! NSArray\n    }\n    \n    func addAddressBookEntry(_ address: String, label: String) -> () {\n        let addressBookArray = getCurrentWallet().object(forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_KEY_ADDRESS_BOOK) as! NSMutableArray\n        addressBookArray.add([TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_KEY_ADDRESS: address, TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_KEY_LABEL: label])\n        NotificationCenter.default.post(name: Notification.Name(rawValue: TLNotificationEvents.EVENT_WALLET_PAYLOAD_UPDATED()), object: nil, userInfo: nil)\n    }\n    \n    func getLabelForAddress(_ address: String) -> String? { //if duplicate labels return first one\n        let addressBookArray = getCurrentWallet().object(forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_KEY_ADDRESS_BOOK) as! NSMutableArray\n        for i in stride(from: 0, to: addressBookArray.count, by: 1) {\n            let addressBook: NSDictionary = addressBookArray.object(at: i) as! NSDictionary\n            if address == addressBook.object(forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_KEY_ADDRESS) as! String {\n                return addressBook.object(forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_KEY_LABEL) as? String\n            }\n        }\n        return nil\n    }\n    \n    func editAddressBookEntry(_ index: Int, label: String) -> () {\n        let addressBookArray = getCurrentWallet().object(forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_KEY_ADDRESS_BOOK) as! NSMutableArray\n        let oldEntry = addressBookArray.object(at: index) as! NSDictionary\n        addressBookArray.replaceObject(at: index, with: [TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_KEY_ADDRESS: oldEntry.object(forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_KEY_ADDRESS) as! String, TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_KEY_LABEL: label])\n        NotificationCenter.default.post(name: Notification.Name(rawValue: TLNotificationEvents.EVENT_WALLET_PAYLOAD_UPDATED()), object: nil, userInfo: nil)\n    }\n    \n    func deleteAddressBookEntry(_ idx: Int) -> () {\n        let addressBookArray = getCurrentWallet().object(forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_KEY_ADDRESS_BOOK) as! NSMutableArray\n        addressBookArray.removeObject(at: idx)\n        NotificationCenter.default.post(name: Notification.Name(rawValue: TLNotificationEvents.EVENT_WALLET_PAYLOAD_UPDATED()), object: nil, userInfo: nil)\n    }\n    \n    func setTransactionTag(_ txid: String, tag: String) -> () {\n        let transactionLabelDict = getCurrentWallet().object(forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_KEY_TRANSACTION_TAGS) as! NSMutableDictionary\n        transactionLabelDict.setObject(tag, forKey: txid as NSCopying)\n        NotificationCenter.default.post(name: Notification.Name(rawValue: TLNotificationEvents.EVENT_WALLET_PAYLOAD_UPDATED()), object: nil, userInfo: nil)\n    }\n    \n    func deleteTransactionTag(_ txid: String) -> () {\n        let transactionLabelDict = getCurrentWallet().object(forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_KEY_TRANSACTION_TAGS) as! NSMutableDictionary\n        transactionLabelDict.removeObject(forKey: txid)\n        NotificationCenter.default.post(name: Notification.Name(rawValue: TLNotificationEvents.EVENT_WALLET_PAYLOAD_UPDATED()), object: nil, userInfo: nil)\n    }\n    \n    func getTransactionTag(_ txid: String) -> String? {\n        let transactionLabelDict = getCurrentWallet().object(forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_KEY_TRANSACTION_TAGS) as! NSDictionary\n        return transactionLabelDict.object(forKey: txid) as! String?\n    }\n    \n    \n    fileprivate func createNewWallet(_ passphrase: String, masterHex: String, walletName: String) -> () {\n        let walletsArray = getWallets()\n        \n        let walletDict = createWallet(passphrase, masterHex: masterHex, walletName: walletName)\n        walletDict.setValue(NSMutableArray(), forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_KEY_ADDRESS_BOOK)\n        walletDict.setValue(NSMutableDictionary(), forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_KEY_TRANSACTION_TAGS)\n        \n        walletsArray.add(walletDict)\n    }\n    \n    func createInitialWalletPayload(_ passphrase: String, masterHex: String) -> () {\n        self.masterHex = masterHex\n        \n        rootDict = NSMutableDictionary()\n        let walletsArray = NSMutableArray()\n        rootDict!.setValue(TLWalletJSONKeys.getLastestVersion(), forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_KEY_VERSION)\n        \n        let payload = NSMutableDictionary()\n        rootDict!.setValue(payload, forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_KEY_PAYLOAD)\n        \n        payload.setValue(walletsArray, forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_KEY_WALLETS)\n        createNewWallet(passphrase, masterHex: masterHex, walletName: \"default\")\n        NotificationCenter.default.post(name: Notification.Name(rawValue: TLNotificationEvents.EVENT_WALLET_PAYLOAD_UPDATED()), object: nil, userInfo: nil)\n    }\n    \n    func loadWalletPayload(_ walletPayload: NSDictionary, masterHex: String) -> () {\n        self.masterHex = masterHex\n        \n        rootDict = NSMutableDictionary(dictionary: walletPayload)\n        let walletDict = getCurrentWallet().mutableCopy() as! NSMutableDictionary\n        \n        let accountsArray = getAccountsArray().mutableCopy() as! NSMutableArray\n        for i in stride(from: 0, to: accountsArray.count, by: 1) {\n            let accountDict: NSMutableDictionary = (accountsArray.object(at: i) as! NSDictionary).mutableCopy() as! NSMutableDictionary\n            accountsArray.replaceObject(at: i, with: accountDict)\n        }\n        DLog(String(format: \"loadWalletPayload rootDict: 1 \\n%@\", rootDict!.description))\n\n        // migrate to version 2 of wallet payload\n        let version = rootDict!.object(forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_KEY_VERSION) as! String\n        if version == TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_VERSION_ONE {\n            rootDict!.setObject(TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_VERSION_TWO, forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_KEY_VERSION as NSCopying)\n            getImportedKeysDict().setObject(NSMutableArray(), forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_COLD_WALLET_ACCOUNTS as NSCopying)\n            getCurrentWallet().setObject(getImportedKeysDict(), forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_IMPORTS as NSCopying)\n            NotificationCenter.default.post(name: Notification.Name(rawValue: TLNotificationEvents.EVENT_WALLET_PAYLOAD_UPDATED()), object: nil, userInfo: nil)\n        }\n        \n        let importedKeysDict = getImportedKeysDict().mutableCopy() as! NSMutableDictionary\n        \n        walletDict.setObject(importedKeysDict, forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_IMPORTS as NSCopying)\n\n        let coldWalletAccountsArray: AnyObject = (importedKeysDict.object(forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_COLD_WALLET_ACCOUNTS) as! NSArray).mutableCopy() as AnyObject\n        importedKeysDict.setObject(coldWalletAccountsArray, forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_COLD_WALLET_ACCOUNTS as NSCopying)\n        \n        let importedAccountsArray: AnyObject = (importedKeysDict.object(forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_IMPORTED_ACCOUNTS) as! NSArray).mutableCopy() as AnyObject\n        importedKeysDict.setObject(importedAccountsArray, forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_IMPORTED_ACCOUNTS as NSCopying)\n        \n        let watchOnlyAccountsArray: AnyObject = (importedKeysDict.object(forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_WATCH_ONLY_ACCOUNTS) as! NSArray).mutableCopy() as AnyObject\n        importedKeysDict.setObject(watchOnlyAccountsArray, forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_WATCH_ONLY_ACCOUNTS as NSCopying)\n        \n        let importedPrivateKeysArray: AnyObject = (importedKeysDict.object(forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_IMPORTED_PRIVATE_KEYS) as! NSArray).mutableCopy() as AnyObject\n        importedKeysDict.setObject(importedPrivateKeysArray, forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_IMPORTED_PRIVATE_KEYS as NSCopying)\n        \n        let watchOnlyAddressesArray: AnyObject = (importedKeysDict.object(forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_WATCH_ONLY_ADDRESSES) as! NSArray).mutableCopy() as AnyObject\n        importedKeysDict.setObject(watchOnlyAddressesArray, forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_WATCH_ONLY_ADDRESSES as NSCopying)\n    }\n    \n    func getWalletsJson() -> (NSDictionary?) {\n        return rootDict?.copy() as? NSDictionary\n    }\n    \n    fileprivate func getWallets() -> (NSMutableArray) {\n        return (rootDict!.object(forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_KEY_PAYLOAD) as! NSDictionary).object(forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_KEY_WALLETS) as! NSMutableArray\n    }\n    \n    fileprivate func getFirstWallet() -> (NSMutableDictionary) {\n        return getWallets().object(at: 0) as! NSMutableDictionary\n    }\n    \n    \n    fileprivate func getCurrentWallet() -> (NSMutableDictionary) {\n        return getFirstWallet()\n    }\n    \n    fileprivate func getHDWallet() -> (NSMutableDictionary) {\n        return (getCurrentWallet().object(forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_KEY_HDWALLETS) as! NSArray).object(at: 0) as! NSMutableDictionary\n    }\n    \n    fileprivate func getCurrentAccountID() -> (String?) {\n        let hdWallet = getHDWallet()\n        return hdWallet.object(forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_CURRENT_ACCOUNT_ID) as? String\n    }\n    \n    fileprivate func setCurrentAccountID(_ accountID: String) -> () {\n        let hdWallet = getHDWallet()\n        hdWallet.setObject(accountID, forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_CURRENT_ACCOUNT_ID as NSCopying)\n    }\n    \n    func renameAccount(_ accountIdxNumber: Int, accountName: String) -> (Bool) {\n        let accountsArray = getAccountsArray()\n        let accountDict = accountsArray.object(at: accountIdxNumber) as! NSMutableDictionary\n        accountDict.setObject(accountName, forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_KEY_NAME as NSCopying)\n        NotificationCenter.default.post(name: Notification.Name(rawValue: TLNotificationEvents.EVENT_WALLET_PAYLOAD_UPDATED()), object: nil, userInfo: nil)\n        \n        return true\n    }\n    \n    func getAccountObjectArray() -> (NSArray) {\n        let accountsArray = getAccountsArray()\n        \n        let accountObjectArray = NSMutableArray()\n        for accountDict in accountsArray {\n            let accountObject = TLAccountObject(appWallet: self, dict: accountDict as! NSDictionary, accountType: .hdWallet)\n            accountObjectArray.add(accountObject)\n        }\n        return accountObjectArray\n    }\n    \n    fileprivate func getAccountObjectForIdx(_ accountIdx: Int) -> (TLAccountObject) {\n        let accountsArray = getAccountsArray()\n        let accountDict = accountsArray.object(at: accountIdx) as! NSDictionary\n        return TLAccountObject(appWallet: self, dict: accountDict, accountType: .hdWallet)\n    }\n}\n\n\n\n"
  },
  {
    "path": "ArcBit/model/TLWalletConfig.swift",
    "content": "//\n//  TLWalletConfig.swift\n//  ArcBit\n//\n//  Created by Tim Lee on 8/27/15.\n//  Copyright (c) 2015 ArcBit. All rights reserved.\n//\n\nimport Foundation\n\nclass TLWalletConfig {\n    var isTestnet:Bool = false\n\n    init(isTestnet:Bool) {\n        self.isTestnet = isTestnet\n    }\n}\n"
  },
  {
    "path": "ArcBit/model/TLWalletJSONKeys.swift",
    "content": "//\n//  TLWalletJsonKeys.swift\n//  ArcBit\n//\n//  Created by Tim Lee on 9/22/15.\n//  Copyright © 2015 ArcBit. All rights reserved.\n//\n\nimport Foundation\n\nenum TLAccount:Int {\n    case normal       = 0\n    case multisig     = 1\n}\n\nenum TLAddressStatus:Int {\n    case archived = 0 //archived: passed window\n    case active = 1\n}\n\nenum TLAddressType:Int {\n    case main = 0\n    case change = 1\n    case stealth = 2\n}\n\nenum TLStealthPaymentStatus:Int {\n    case unspent = 0 // >=0 confirmations for payment tx\n    case claimed = 1 // 0-5 confirmations for payment tx and >=0 confirm for claimed tx\n    case spent = 2 // > 6 confirmations for payment tx and >=0 confirm for claimed tx\n}\n\nclass TLWalletJSONKeys {\n    \n    struct STATIC_MEMBERS {\n        static let WALLET_PAYLOAD_VERSION_ONE = \"1\"\n        static let WALLET_PAYLOAD_VERSION_TWO = \"2\"\n        \n        static let WALLET_PAYLOAD_KEY_VERSION = \"version\"\n        static let WALLET_PAYLOAD_KEY_PAYLOAD = \"payload\"\n        static let WALLET_PAYLOAD_KEY_WALLETS = \"wallets\"\n        static let WALLET_PAYLOAD_KEY_HDWALLETS = \"hd_wallets\"\n        static let WALLET_PAYLOAD_KEY_ACCOUNTS = \"accounts\"\n        static let WALLET_PAYLOAD_CURRENT_ACCOUNT_ID = \"current_account_id\"\n        static let WALLET_PAYLOAD_IMPORTS = \"imports\"\n        static let WALLET_PAYLOAD_COLD_WALLET_ACCOUNTS = \"cold_wallet_accounts\"\n        static let WALLET_PAYLOAD_IMPORTED_ACCOUNTS = \"imported_accounts\"\n        static let WALLET_PAYLOAD_WATCH_ONLY_ACCOUNTS = \"watch_only_accounts\"\n        static let WALLET_PAYLOAD_IMPORTED_PRIVATE_KEYS = \"imported_private_keys\"\n        static let WALLET_PAYLOAD_WATCH_ONLY_ADDRESSES = \"watch_only_addresses\"\n        static let WALLET_PAYLOAD_ACCOUNT_IDX = \"account_idx\"\n        static let WALLET_PAYLOAD_EXTENDED_PRIVATE_KEY = \"xprv\"\n        static let WALLET_PAYLOAD_EXTENDED_PUBLIC_KEY = \"xpub\"\n        static let WALLET_PAYLOAD_ACCOUNT_NEEDS_RECOVERING = \"needs_recovering\"\n        static let WALLET_PAYLOAD_KEY_MAIN_ADDRESSES = \"main_addresses\"\n        static let WALLET_PAYLOAD_KEY_CHANGE_ADDRESSES = \"change_addresses\"\n        static let WALLET_PAYLOAD_KEY_STEALTH_ADDRESSES = \"stealth_addresses\"\n        static let WALLET_PAYLOAD_KEY_STEALTH_ADDRESS = \"stealth_address\"\n        static let WALLET_PAYLOAD_KEY_STEALTH_ADDRESS_SCAN_KEY = \"scan_key\"\n        static let WALLET_PAYLOAD_KEY_STEALTH_ADDRESS_SPEND_KEY = \"spend_key\"\n        static let WALLET_PAYLOAD_KEY_PAYMENTS = \"payments\"\n        static let WALLET_PAYLOAD_KEY_SERVERS = \"servers\"\n        static let WALLET_PAYLOAD_KEY_WATCHING = \"watching\"\n        static let WALLET_PAYLOAD_KEY_TXID = \"txid\"\n        static let WALLET_PAYLOAD_KEY_MIN_MAIN_ADDRESS_IDX = \"min_main_address_idx\"\n        static let WALLET_PAYLOAD_KEY_MIN_CHANGE_ADDRESS_IDX = \"min_change_address_vidx\"\n        static let WALLET_PAYLOAD_KEY_TIME = \"time\"\n        static let WALLET_PAYLOAD_KEY_CHECK_TIME = \"check_time\"\n        static let WALLET_PAYLOAD_KEY_LAST_TX_TIME = \"last_tx_time\"\n        static let WALLET_PAYLOAD_KEY_KEY = \"key\"\n        static let WALLET_PAYLOAD_KEY_ADDRESS = \"address\"\n        static let WALLET_PAYLOAD_KEY_STATUS = \"status\"\n        static let WALLET_PAYLOAD_KEY_INDEX = \"index\"\n        static let WALLET_PAYLOAD_KEY_LABEL = \"label\"\n        static let WALLET_PAYLOAD_KEY_NAME = \"name\"\n        static let WALLET_PAYLOAD_KEY_MAX_ACCOUNTS_CREATED = \"max_account_id_created\"\n        static let WALLET_PAYLOAD_KEY_MASTER_HEX = \"master_hex\"\n        static let WALLET_PAYLOAD_KEY_PASSPHRASE = \"passphrase\"\n        static let WALLET_PAYLOAD_KEY_ADDRESS_BOOK = \"address_book\"\n        static let WALLET_PAYLOAD_KEY_TRANSACTION_TAGS = \"tx_tags\"        \n    }\n    \n    // Notes:\n    // version 2: Add 'cold_wallet_accounts' dictionary to 'imports' dictionary\n    class func getLastestVersion () -> String { return \"2\" }\n\n}\n"
  },
  {
    "path": "ArcBit/model/TLWalletJson.swift",
    "content": "//\n//  TLWalletJson.swift\n//  ArcBit\n//\n//  Created by Timothy Lee on 3/14/15.\n//  Copyright (c) 2015 Timothy Lee <stequald01@gmail.com>\n//\n//   This library is free software; you can redistribute it and/or\n//   modify it under the terms of the GNU Lesser General Public\n//   License as published by the Free Software Foundation; either\n//   version 2.1 of the License, or (at your option) any later version.\n//\n//   This library is distributed in the hope that it will be useful,\n//   but WITHOUT ANY WARRANTY; without even the implied warranty of\n//   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n//   Lesser General Public License for more details.\n//\n//   You should have received a copy of the GNU Lesser General Public\n//   License along with this library; if not, write to the Free Software\n//   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,\n//   MA 02110-1301  USA\n\nimport Foundation\n\nclass TLWalletJson {\n\n    class func getDecryptedEncryptedWalletJSONPassphrase() -> String? {\n        let encryptedWalletPassphraseKey = TLPreferences.getEncryptedWalletPassphraseKey()\n        if encryptedWalletPassphraseKey != nil {\n            let encryptedWalletPassphrase = TLPreferences.getEncryptedWalletJSONPassphrase(TLPreferences.canRestoreDeletedApp())\n            let decryptedEncryptedWalletPassphrase = TLWalletPassphrase.decryptWalletPassphrase(encryptedWalletPassphrase!,\n                key: encryptedWalletPassphraseKey!)\n            assert(decryptedEncryptedWalletPassphrase != nil)\n            return decryptedEncryptedWalletPassphrase\n        } else {\n            return TLPreferences.getEncryptedWalletJSONPassphrase(TLPreferences.canRestoreDeletedApp())\n        }\n    }\n    \n    class func getWalletJsonFileName() -> (String) {\n        return \"wallet.json.asc\"\n    }\n        \n    class func generatePayloadChecksum(_ payload: String) -> String {\n        return TLCrypto.doubleSHA256HashFor(payload as NSString)\n    }\n    \n    class func getEncryptedWalletJsonContainer(_ walletJson: NSDictionary, password: String) -> (String) {\n        assert(TLHDWalletWrapper.phraseIsValid(password), \"phrase is invalid\")\n        var str = TLUtils.dictionaryToJSONString(false, dict: walletJson)\n        //DLog(\"getEncryptedWalletJsonContainer str: %@\", str)\n        let encryptJSONPassword = TLCrypto.doubleSHA256HashFor(password as NSString)\n        str = TLCrypto.encrypt(str, password: encryptJSONPassword)\n        let walletJsonEncryptedWrapperDict = [\"version\":1, \"payload\":str] as [String : Any]\n        let walletJsonEncryptedWrapperString = TLUtils.dictionaryToJSONString(true, dict: walletJsonEncryptedWrapperDict as NSDictionary)\n        return walletJsonEncryptedWrapperString\n    }\n    \n    class func getWalletJsonDict(_ encryptedWalletJSONFileContent: String?, password: String?) -> (NSDictionary?) {\n        if encryptedWalletJSONFileContent == nil {\n            return nil\n        }\n        \n        let walletJsonEncryptedWrapperDict = TLUtils.JSONStringToDictionary(encryptedWalletJSONFileContent!)\n\n        let version = walletJsonEncryptedWrapperDict.object(forKey: \"version\") as! Int\n        assert(version == 1, \"Incorrect encryption version\")\n        \n        let encryptedWalletJSONPayloadString = walletJsonEncryptedWrapperDict.object(forKey: \"payload\") as! String\n        \n        let walletJsonString = decryptWalletJSONFile(encryptedWalletJSONPayloadString, password: password)\n        if (walletJsonString == nil) {\n            return nil\n        }\n        \n        let walletJsonData = walletJsonString!.data(using: String.Encoding.utf8)\n        \n        let error: NSError? = nil\n        let walletDict = (try! JSONSerialization.jsonObject(with: walletJsonData!,\n            options: JSONSerialization.ReadingOptions.mutableContainers)) as! NSDictionary\n        assert(error == nil, \"Error serializing wallet json string\")\n        //DLog(\"getWalletJsonDict: %@\", walletDict.description)\n        return walletDict\n    }\n    \n    class func decryptWalletJSONFile(_ encryptedWalletJSONFile: String?, password: String?) -> (String?) {\n        if (encryptedWalletJSONFile == nil || password == nil) {\n            return nil\n        }\n        assert(TLHDWalletWrapper.phraseIsValid(password!), \"phrase is invalid\")\n        let encryptJSONPassword = TLCrypto.doubleSHA256HashFor(password! as NSString)\n        let str = TLCrypto.decrypt(encryptedWalletJSONFile!, password: encryptJSONPassword)\n        //DLog(\"getWalletJsonString: %@\", str)\n        return str\n    }\n    \n    class func saveWalletJson(_ walletFile: String, date: Date) -> (Bool) {\n\n        \n        let paths = NSSearchPathForDirectoriesInDomains(FileManager.SearchPathDirectory.documentDirectory, FileManager.SearchPathDomainMask.userDomainMask, true) as NSArray\n        let documentDirectory = paths.object(at: 0) as! NSString\n        let filePath = documentDirectory.appendingPathComponent(TLWalletJson.getWalletJsonFileName())\n\n        var error: NSError? = nil\n        do {\n            try walletFile.write(toFile: filePath, atomically: true, encoding: String.Encoding(rawValue: String.Encoding.utf8.rawValue))\n        } catch let error1 as NSError {\n            error = error1\n        }\n        if (error != nil) {\n            return false\n        } else {\n            return true\n        }\n    }\n    \n    class func getLocalWalletJSONFile() -> (String?) {\n        let paths = NSSearchPathForDirectoriesInDomains(FileManager.SearchPathDirectory.documentDirectory, FileManager.SearchPathDomainMask.userDomainMask, true) as NSArray\n        let documentDirectory = paths.object(at: 0) as! NSString\n        let filePath = documentDirectory.appendingPathComponent(TLWalletJson.getWalletJsonFileName())\n        \n        let error: NSError? = nil\n        if (error != nil) {\n            DLog(\"TLWalletJson error getWalletJsonString: \\(error!.localizedDescription)\")\n            return nil\n        }\n        \n        do {\n            let contents = try NSString(contentsOfFile: filePath, encoding: String.Encoding.utf8.rawValue)\n            return contents as String\n        } catch _ {\n            return nil\n        }\n    }\n}\n"
  },
  {
    "path": "ArcBit/model/TLWalletPassphrase.swift",
    "content": "//\n//  TLWalletPassphrase.swift\n//  ArcBit\n//\n//  Created by Tim Lee on 8/10/15.\n//  Copyright (c) 2015 ArcBit. All rights reserved.\n//\n\nimport Foundation\n\nclass TLWalletPassphrase {\n\n    class func enableRecoverableFeature(_ useKeychain:Bool) {\n        let encryptedWalletPassphraseKey = TLPreferences.getEncryptedWalletPassphraseKey()\n        let encryptedWalletPassphrase = TLPreferences.getWalletPassphrase(useKeychain)\n        assert(encryptedWalletPassphraseKey != nil)\n        let walletPassphrase = TLWalletPassphrase.decryptWalletPassphrase(encryptedWalletPassphrase!, key: encryptedWalletPassphraseKey!)\n        TLPreferences.setWalletPassphrase(walletPassphrase!, useKeychain: true)\n        TLPreferences.setEncryptedWalletJSONPassphrase(walletPassphrase!, useKeychain: true)\n        TLPreferences.clearEncryptedWalletPassphraseKey()\n    }\n    \n    class func disableRecoverableFeature(_ useKeychain:Bool) {\n        let encryptedWalletPassphraseKey = TLWalletPassphrase.generateWalletPassphraseKey()\n        let walletPassphrase = TLPreferences.getWalletPassphrase(useKeychain)\n        let encryptedWalletPassphrase = TLWalletPassphrase.encryptWalletPassphrase(walletPassphrase!, key: encryptedWalletPassphraseKey)\n        assert(TLPreferences.getEncryptedWalletPassphraseKey() == nil)\n        TLPreferences.setEncryptedWalletPassphraseKey(encryptedWalletPassphraseKey)\n        TLPreferences.setWalletPassphrase(encryptedWalletPassphrase, useKeychain: false)\n        TLPreferences.setEncryptedWalletJSONPassphrase(encryptedWalletPassphrase, useKeychain: false)\n    }\n    \n    class func getDecryptedWalletPassphrase() -> String? {\n        if TLUpdateAppData.instance().beforeUpdatedAppVersion != nil\n            && TLUpdateAppData.instance().beforeUpdatedAppVersion!.hasPrefix(\"1.0\") {\n                if !TLPreferences.canRestoreDeletedApp() {\n                    TLWalletPassphrase.disableRecoverableFeature(true)\n                }\n                TLUpdateAppData.instance().beforeUpdatedAppVersion = nil\n                return TLPreferences.getWalletPassphrase(true)\n        } else {\n            let encryptedWalletPassphraseKey = TLPreferences.getEncryptedWalletPassphraseKey()\n            if encryptedWalletPassphraseKey != nil {\n                let encryptedWalletPassphrase = TLPreferences.getWalletPassphrase(TLPreferences.canRestoreDeletedApp())\n                return TLWalletPassphrase.decryptWalletPassphrase(encryptedWalletPassphrase!,\n                    key: encryptedWalletPassphraseKey!)\n            } else {\n                return TLPreferences.getWalletPassphrase(TLPreferences.canRestoreDeletedApp())\n            }\n        }\n    }\n    \n    class func generateWalletPassphraseKey() -> String {\n        return BTCKey().privateKeyAddress.base58String\n    }\n    \n    class func decryptWalletPassphrase(_ encryptedWalletPassphrase: String, key: String)  -> String? {\n        return TLCrypto.decrypt(encryptedWalletPassphrase, password: key)\n    }\n    \n    class func encryptWalletPassphrase(_ walletPassphrase: String, key: String)  -> String {\n        return TLCrypto.encrypt(walletPassphrase, password: key)\n    }\n    \n    \n    \n}\n"
  },
  {
    "path": "ArcBit/model/TLWalletUtils.swift",
    "content": "//\n//  TLWalletUtils.swift\n//  ArcBit\n//\n//  Created by Timothy Lee on 3/14/15.\n//  Copyright (c) 2015 Timothy Lee <stequald01@gmail.com>\n//\n//   This library is free software; you can redistribute it and/or\n//   modify it under the terms of the GNU Lesser General Public\n//   License as published by the Free Software Foundation; either\n//   version 2.1 of the License, or (at your option) any later version.\n//\n//   This library is distributed in the hope that it will be useful,\n//   but WITHOUT ANY WARRANTY; without even the implied warranty of\n//   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n//   Lesser General Public License for more details.\n//\n//   You should have received a copy of the GNU Lesser General Public\n//   License along with this library; if not, write to the Free Software\n//   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,\n//   MA 02110-1301  USA\n\nimport Foundation\n\n\nenum TLSendFromType: Int {\n    case hdWallet = 0\n    case importedAccount = 1\n    case importedWatchAccount = 2\n    case importedAddress = 3\n    case importedWatchAddress = 4\n    case coldWalletAccount = 5\n}\n\nenum TLAccountTxType: Int {\n    case send = 0\n    case receive = 1\n    case moveBetweenAccount = 2\n}\n\nenum TLAccountType: Int {\n    case unknown = 0\n    case hdWallet = 1\n    case imported = 2\n    case importedWatch = 3\n    case coldWallet = 4\n}\n\nenum TLAccountAddressType: Int {\n    case imported = 1\n    case importedWatch = 2\n}\n\n\nclass TLWalletUtils {\n    typealias Error = () -> ()\n    typealias Success = () -> ()\n    \n    typealias SuccessWithDictionary = (NSDictionary) -> ()\n    \n    typealias SuccessWithString = (String!) -> ()\n    typealias ErrorWithString = (String?) -> ()\n    \n    \n    class func APP_NAME() -> String {\n        return STATIC_MEMBERS.APP_NAME\n    }\n    \n    class func DEFAULT_FEE_AMOUNT_IN_BITCOINS() -> (String) {\n        return TLCurrencyFormat.bitcoinAmountStringToCoin(STATIC_MEMBERS.DEFAULT_FEE_AMOUNT, locale: Locale(identifier: \"en_US\")).bigIntegerToBitcoinAmountString(TLBitcoinDenomination.bitcoin)\n    }\n\n    class func RECEIVE_ICON_IMAGE_NAME() -> (String) {\n        return STATIC_MEMBERS.RECEIVE_ICON_IMAGE_NAME\n    }\n    \n    class func SEND_ICON_IMAGE_NAME() -> (String) {\n        return STATIC_MEMBERS.SEND_ICON_IMAGE_NAME\n    }\n    \n    \n    class func HISTORY_ICON_IMAGE_NAME() -> (String) {\n        return STATIC_MEMBERS.HISTORY_ICON_IMAGE_NAME\n    }\n    \n    class func ACCOUNT_ICON_IMAGE_NAME() -> (String) {\n        return STATIC_MEMBERS.ACCOUNT_ICON_IMAGE_NAME\n    }\n    \n    class func HELP_ICON_IMAGE_NAME() -> (String) {\n        return STATIC_MEMBERS.HELP_ICON_IMAGE_NAME\n    }\n    \n    class func LINK_ICON_IMAGE_NAME() -> (String) {\n        return STATIC_MEMBERS.LINK_ICON_IMAGE_NAME\n    }\n    \n    class func SETTINGS_ICON_IMAGE_NAME() -> (String) {\n        return STATIC_MEMBERS.SETTINGS_ICON_IMAGE_NAME\n    }\n    \n    class func VAULT_ICON_IMAGE_NAME() -> (String) {\n        return STATIC_MEMBERS.VAULT_ICON_IMAGE_NAME\n    }\n    \n    struct STATIC_MEMBERS {\n        static let APP_NAME = \"ArcBit Wallet\"\n        \n        static let WALLET_JSON_CLOUD_BACKUP_FILE_NAME = \"wallet.json.asc\"\n        static let WALLET_JSON_CLOUD_BACKUP_FILE_EXTENSION = \"backup\"\n        \n        static let SHOULD_SAVE_ARCHIVED_ADDRESSES_IN_JSON = false\n        static let ENABLE_STEALTH_ADDRESS = false\n        static let ALLOW_MANUAL_SCAN_FOR_STEALTH_PAYMENT = true\n\n        static let SEND_ICON_IMAGE_NAME = \"upload.png\"\n        static let RECEIVE_ICON_IMAGE_NAME = \"download.png\"\n        static let SEND_ICON_2_IMAGE_NAME = \"upload2.png\"\n        static let RECEIVE_ICON_2_IMAGE_NAME = \"download2.png\"\n        static let HISTORY_ICON_IMAGE_NAME = \"newspaper-alt.png\"\n        static let ACCOUNT_ICON_IMAGE_NAME = \"data.png\"\n        static let HELP_ICON_IMAGE_NAME = \"book.png\"\n        static let LINK_ICON_IMAGE_NAME = \"link.png\"\n        static let SETTINGS_ICON_IMAGE_NAME = \"settings.png\"\n        static let SELECT_ACCOUNT_ICON_IMAGE_NAME = \"arrow-right7.png\"\n        static let VAULT_ICON_IMAGE_NAME = \"vault.png\"\n\n        static let BITCOIN_URI_BASE = \"bitcoin:\"\n        static let BITCOIN_ISO_CODE = \"BTC\"\n        static let BITCOIN_SYMBOL = \"B\"\n        \n        static let DEFAULT_FEE_AMOUNT = \"0.0001\"\n    }\n    \n    class func ENABLE_STEALTH_ADDRESS() -> (Bool) {\n        return STATIC_MEMBERS.ENABLE_STEALTH_ADDRESS\n    }\n    \n    class func ALLOW_MANUAL_SCAN_FOR_STEALTH_PAYMENT() -> (Bool) {\n        return STATIC_MEMBERS.ALLOW_MANUAL_SCAN_FOR_STEALTH_PAYMENT\n    }\n    \n    class func dataToHexString(_ data: Data) -> String {\n        return (data as NSData).hex()\n    }\n    \n    class func hexStringToData(_ hexString: String) -> Data? {\n        return BTCDataFromHex(hexString)\n    }\n    \n    class func reverseHexString(_ txHashHex: String) -> String {\n        return dataToHexString((hexStringToData(txHashHex)! as NSData).reverse())\n    }\n    \n    class func getBitcoinURI(_ address: String, amount: TLCoin,\n        label: String?, message: String?) -> String {\n            \n            let bitcoinURI = NSMutableString(string: STATIC_MEMBERS.BITCOIN_URI_BASE)\n            \n            bitcoinURI.append(address)\n            \n            bitcoinURI.append(\"?amount=\")\n            bitcoinURI.append(amount.toString())\n            \n            if (label != nil && label! != \"\") {\n                bitcoinURI.append(\"&label=\")\n                bitcoinURI.append(label!)\n            }\n            \n            if (message != nil && message! != \"\") {\n                bitcoinURI.append(\"&message=\")\n                bitcoinURI.append(message!)\n            }\n            \n            return bitcoinURI as String\n    }\n    \n    class func parseBitcoinURI(_ urlString: String) -> NSDictionary? {\n        if !urlString.hasPrefix(\"bitcoin:\") {\n            return nil\n        }\n        \n        var replaced = urlString.replacingOccurrences(of: \"bitcoin:\", with: \"bitcoin://\").replacingOccurrences(of: \"////\", with: \"//\")\n        \n        if replaced.range(of: \"&\") == nil && replaced.range(of: \"?\") == nil {\n            replaced = replaced+\"?\"\n        }\n        \n        let url = URL(string: replaced)\n        \n        let dict = parseBitcoinQueryString(url!.query!)\n        \n        if (url!.host != nil) {\n            dict.setObject(url!.host!, forKey: \"address\" as NSCopying)\n        }\n        \n        return dict\n    }\n    \n    class func parseBitcoinQueryString(_ query: String) -> NSMutableDictionary {\n        let dict = NSMutableDictionary(capacity: 6)\n        let pairs = query.components(separatedBy: \"&\")\n        \n        for _pair in pairs {\n            let pair = _pair as String\n            let elements = pair.components(separatedBy: \"=\")\n            if (elements.count >= 2) {\n                let key = elements[0].replacingPercentEscapes(using: String.Encoding.utf8)!\n                let val = elements[1].replacingPercentEscapes(using: String.Encoding.utf8)!\n                \n                dict.setObject(val, forKey: key as NSCopying)\n            }\n        }\n        return dict\n    }\n    \n    class func getQRCodeImage(_ data: String, imageDimension: Int) -> UIImage {\n        let dataMatrix = QREncoder.encode(withECLevel: 1, version: 1, string: data)\n        let image = QREncoder.renderDataMatrix(dataMatrix, imageDimension: Int32(imageDimension))\n        return image!\n    }\n}\n"
  },
  {
    "path": "ArcBit/ru.lproj/Localizable.strings",
    "content": "\"\" = \"\";\n\n\"%@ is not allowed to access the camera\" = \"%@ не разрешено доступ к камере\";\n\n\"%@ servers not reachable.\" = \"%@ серверов недоступны.\";\n\n\"%d/%d parts scanned.\" = \"%d/%d Сканированные части.\";\n\n\"%llu confirmations\" = \"%lluПодтверждени\";\n\n\"1 Confirmation\" = \"1Подтверждение\";\n\n\"A bitcoin address typically begins with a '1' or '3'. You can see the transactions and track the balance of an address, but you cannot spend from an imported address.\\nYou can temporarily import this watch addresses private key to spend its bitcoins. Simply go the Send screen and select a watch address to spend from and you will be prompted to temporarily import your addresses' private key when you click 'Review Payment' in the Send screen. The private key will stay in memory until the app exits or until you remove it manually in the Accounts screen.\" = \"A bitcoin address typically begins with a '1' or '3'. You can see the transactions and track the balance of an address, but you cannot spend from an imported address.\\nYou can temporarily import this watch addresses private key to spend its bitcoins. Simply go the Send screen and select a watch address to spend from and you will be prompted to temporarily import your addresses' private key when you click 'Review Payment' in the Send screen. The private key will stay in memory until the app exits or until you remove it manually in the Accounts screen.\";\n\n\"A bitcoin wallet is a software application that allows people to send, receive and manage their bitcoins.\\nBe aware of how other bitcoin applications store your bitcoins' private keys, which are needed to spend your bitcoins.\\nThere are generally three different ways applications can your store your bitcoins.\\n1.\\nThe banking model, where your bitcoin private keys are held for you by someone else.\\n2.\\nThe security box model, where your bitcoin private keys are stored encrypted on someone else’s servers.\\n3.\\nThe wallet model, where your bitcoin private keys are stored only on your device.\" = \"A bitcoin wallet is a software application that allows people to send, receive and manage their bitcoins.\\nBe aware of how other bitcoin applications store your bitcoins' private keys, which are needed to spend your bitcoins.\\nThere are generally three different ways applications can your store your bitcoins.\\n1.\\nThe banking model, where your bitcoin private keys are held for you by someone else.\\n2.\\nThe security box model, where your bitcoin private keys are stored encrypted on someone else’s servers.\\n3.\\nThe wallet model, where your bitcoin private keys are stored only on your device.\";\n\n\"A private key begins with an 'L', 'K', or '5'.\\nBIP 38 encrypted private keys can also be imported. They can either be imported encrypted or unencrypted. If you choose to import it encrypted, you will need to input the password each time you spend from your encrypted private key.\" = \"A private key begins with an 'L', 'K', or '5'.\\nBIP 38 encrypted private keys can also be imported. They can either be imported encrypted or unencrypted. If you choose to import it encrypted, you will need to input the password each time you spend from your encrypted private key.\";\n\n\"Account %@ imported\" = \"Учетная запись %@已 импортирована\";\n\n\"Account %lu\" = \"Учетная запись %lu\";\n\n\"Account 1\" = \"Учетная запись 1\";\n\n\"Account ID\" = \"ID учетной записи\";\n\n\"Account ID: %u\" = \"ID учетной записи: %u\";\n\n\"Account Private Key\" = \"Закрытый ключ учетной записи\";\n\n\"Account Public Key\" = \"Открытый ключ учетной записи\";\n\n\"Account private key does not match imported account public key\" = \"Закрытый ключ учетной записи не соответствует открытому ключу импортированной учетной записи\";\n\n\"Account private key missing\" = \"Отсутствует закрытый ключ учетной записи\";\n\n\"Accounts\" = \"Учетные записи\";\n\n\"Achievement List\" = \"Achievement List\";\n\n\"Achievements\" = \"Achievements\";\n\n\"Actions\" = \"Действия\";\n\n\"Active Change Addresses\" = \"Активные изменяемые адреса\";\n\n\"Active Main Addresses\" = \"Активные основные адреса\";\n\n\"Add Contacts Entry\" = \"Add Contacts Entry\";\n\n\"Address\" = \"Адреса\";\n\n\"Address ID \" = \"ID адреса\";\n\n\"Address ID: %lu\" = \"ID адреса: %lu\";\n\n\"Addresses\" = \"Адреса\";\n\n\"Advanced Achievement List\" = \"Advanced Achievement List\";\n\n\"Advanced FAQ\" = \"Advanced FAQ\";\n\n\"Advanced how To:\" = \"Advanced how To:\";\n\n\"After a transaction is broadcast to the Bitcoin network, it may be included in a block that is published to the network. When that happens, it is said that the transaction has been mined at a depth of 1 block. With each subsequent block that is found, the number of blocks deep is increased by one. To be secure against double spending, a transaction should not be considered as confirmed until it is a certain number of blocks deep.\\nA good rule of thumb is that 1 confirmation is good for small value amounts of bitcoins and a user should wait for more confirmations for larger value amounts.\\nArcBit will display the confirmation number up until the 6th confirmation.\" = \"After a transaction is broadcast to the Bitcoin network, it may be included in a block that is published to the network. When that happens, it is said that the transaction has been mined at a depth of 1 block. With each subsequent block that is found, the number of blocks deep is increased by one. To be secure against double spending, a transaction should not be considered as confirmed until it is a certain number of blocks deep.\\nA good rule of thumb is that 1 confirmation is good for small value amounts of bitcoins and a user should wait for more confirmations for larger value amounts.\\nArcBit will display the confirmation number up until the 6th confirmation.\";\n\n\"Amount:\" = \"Сумма：\";\n\n\"An account is a collection of bitcoin addresses. With accounts, you will no longer have to manage bitcoin addresses directly anymore. Since address reuse results in a loss of privacy for people using Bitcoin, ArcBit’s HD wallet account system will automatically handle the cycling of bitcoin addresses for you. This ensures you don’t use the same bitcoin address more then once.\\nEach account also has a reusable address. You can find it in your Receive screen. Swipe all the way to right on the QRCode in your Receive screen and you will find a reusable address.\\nYou can create an unlimited amount of accounts with ArcBit. See the help section on how to create a new account in ArcBit.\" = \"An account is a collection of bitcoin addresses. With accounts, you will no longer have to manage bitcoin addresses directly anymore. Since address reuse results in a loss of privacy for people using Bitcoin, ArcBit’s HD wallet account system will automatically handle the cycling of bitcoin addresses for you. This ensures you don’t use the same bitcoin address more then once.\\nEach account also has a reusable address. You can find it in your Receive screen. Swipe all the way to right on the QRCode in your Receive screen and you will find a reusable address.\\nYou can create an unlimited amount of accounts with ArcBit. See the help section on how to create a new account in ArcBit.\";\n\n\"An account private key begins with the letters 'xprv'. You can see, spend and recover the transactions and bitcoins of an entire account from an account private key.\" = \"An account private key begins with the letters 'xprv'. You can see, spend and recover the transactions and bitcoins of an entire account from an account private key.\";\n\n\"An account public key begins with the letters 'xpub'. You can see the transactions and bitcoins of an entire account from an account private key, with the exception of reusable address payments. Future releases will address this issue.\\nYou can temporarily import the corresponding account private key for this accounts' account public key to spend your watch accounts' bitcoins. Simply go to the Send screen and select a watch account to spend from and you will be prompted to temporarily import your account's private key when you click 'Review Payment' on the Send screen. The private key will stay in memory until the app exits or until you remove it manually on the Accounts screen.\" = \"An account public key begins with the letters 'xpub'. You can see the transactions and bitcoins of an entire account from an account private key, with the exception of reusable address payments. Future releases will address this issue.\\nYou can temporarily import the corresponding account private key for this accounts' account public key to spend your watch accounts' bitcoins. Simply go to the Send screen and select a watch account to spend from and you will be prompted to temporarily import your account's private key when you click 'Review Payment' on the Send screen. The private key will stay in memory until the app exits or until you remove it manually on the Accounts screen.\";\n\n\"ArcBit Brain Wallet\" = \"Arcbit мысликошелек\";\n\n\"ArcBit Web Wallet\" = \"Arcbit Веб-кошелек\";\n\n\"ArcBit uses the the bitcoin wallet model (See the section ’What is a bitcoin wallet?’ to understand the 3 different security models of bitcoin software). However, if you use iCloud to backup your wallet, you will be using the security box model. It is recommended that you do not use iCloud and be responsible for your bitcoins yourself. For those who don’t want to remember a simple backup passphrase, iCloud backup is a good alternative.\" = \"ArcBit uses the the bitcoin wallet model (See the section ’What is a bitcoin wallet?’ to understand the 3 different security models of bitcoin software). However, if you use iCloud to backup your wallet, you will be using the security box model. It is recommended that you do not use iCloud and be responsible for your bitcoins yourself. For those who don’t want to remember a simple backup passphrase, iCloud backup is a good alternative.\";\n\n\"Archive Account\" = \"Архивировать учетную запись\";\n\n\"Archive address\" = \"Архивировать адрес\";\n\n\"Archived Accounts\" = \"Заархивированная учетная запись\";\n\n\"Archived Change Addresses\" = \"Заархивированный адрес для сдачи\";\n\n\"Archived Cold Wallet Accounts\" = \"Заархивированные учетные записи холодного кошелька\";\n\n\"Archived Imported Accounts\" = \"Заархивированные импортированные учетные записи\";\n\n\"Archived Imported Addresses\" = \"Заархивированные импортированные адреса\";\n\n\"Archived Imported Watch Accounts\" = \"Заархивированная импортированная учетная запись для просмотра\";\n\n\"Archived Imported Watch Addresses\" = \"Заархивированные импортированные адреса для просмотра\";\n\n\"Archived Main Addresses\" = \"Заархивированные основные адреса\";\n\n\"Are you sure you want to archive account %@?\" = \"Вы уверены, что хотите заархивировать учетную запись %@？\";\n\n\"Are you sure you want to archive address %@?\" = \"Вы уверены, что хотите заархивировать адреса %@？\";\n\n\"Are you sure you want to delete this account?\" = \"Вы уверены, что хотите удалить учетную запись?\";\n\n\"Are you sure you want to unarchive account %@\" = \"Вы уверены, что хотите разархивировать учетную запись %@？\";\n\n\"Are you sure you want to unarchive address %@?\" = \"Вы уверены, что хотите разархивировать адреса %@？\";\n\n\"Authorize Cold Wallet Account Payment\" = \"Авторизовать платеж учетной записи холодного кошелька\";\n\n\"Authorize Payment\" = \"Разрешить оплату\";\n\n\"Backup Passphrase\" = \"Восстановительная фраза-пароль\";\n\n\"Backup wallet\" = \"Резервная копия кошелька\";\n\n\"Backup local wallet\" = \"Резервное копирование локального кошелька\";\n\n\"Backup passphrase found in keychain\" = \"Резервная парольная фраза найдена в брелках\";\n\n\"Bitcoin cuts out the middleman and allows you to send money anywhere in the world with an internet connection with minimum to zero fees.\" = \"Bitcoin cuts out the middleman and allows you to send money anywhere in the world with an internet connection with minimum to zero fees.\";\n\n\"Bitcoin, uppercase 'B', is an online payment system invented in 2008 and released as open-source software in 2009 by a programmer named Satoshi Nakamoto. The system is decentralized and peer-to-peer allowing users to transact directly without needing an intermediary.\\nBitcoin is also a platform of which other decentralized applications can be built upon. Bitcoin, lowercase 'b' is the currency unit that Bitcoin uses.\" = \"Bitcoin, uppercase 'B', is an online payment system invented in 2008 and released as open-source software in 2009 by a programmer named Satoshi Nakamoto. The system is decentralized and peer-to-peer allowing users to transact directly without needing an intermediary.\\nBitcoin is also a platform of which other decentralized applications can be built upon. Bitcoin, lowercase 'b' is the currency unit that Bitcoin uses.\";\n\n\"Bitcoins can be purchased from various bitcoin exchanges. ArcBit is not a bitcoin exchange. ArcBit is a bitcoin wallet. After you purchase some bitcoins from an exchange, you can move it to a bitcoin wallet.\" = \"Bitcoins can be purchased from various bitcoin exchanges. ArcBit is not a bitcoin exchange. ArcBit is a bitcoin wallet. After you purchase some bitcoins from an exchange, you can move it to a bitcoin wallet.\";\n\n\"Cancel\" = \"Отмена\";\n\n\"Cannot archive your default account\" = \"Не удается активировать Вашу учетную запись по умолчанию\";\n\n\"Cannot archive your one and only account\" = \"Не удается заархивировать Вашу единственную учетную запись\";\n\n\"Cannot create transactions with outputs less then %@\" = \"Невозможно создать транзакции с неизрасходованными средствами, менее чем %@\";\n\n\"Cannot decrypt iCloud backup wallet.\" = \"Невозможно расшифровать резервный кошелек iCloud.\";\n\n\"Cannot import reusable address\" = \"Невозможно импортировать многоразовый адрес\";\n\n\"Change Address ID \" = \"Изменить ID адреса \";\n\n\"Change Automatic Transaction Fee\" = \"Change Automatic Transaction Fee\";\n\n\"Change Block Explorer URL\" = \"Изменить блок-проводник URL\";\n\n\"Change Blockexplorer Type\" = \"Change Blockexplorer Type\";\n\n\"Check out the ArcBit Brain Wallet\" = \"Проверить ArcBit мыслекошелек\";\n\n\"Check out the ArcBit Web Wallet\" = \"Проверить ArcBit Веб-кошелек\";\n\n\"Check out the ArcBit Web Wallet!\" = \"Проверить ArcBit Веб-кошелек!\";\n\n\"Checking Transaction\" = \"Проверка транзакции\";\n\n\"Clear account private key from memory\" = \"Очистить закрытый ключ учетной записи из памяти\";\n\n\"Clear private key from memory\" = \"Очистить закрытый ключ из памяти\";\n\n\"Cleared from memory\" = \"Удалено из памяти\";\n\n\"Click an address\" = \"Click an address\";\n\n\"Click the button with the arrow\" = \"Click the button with the arrow\";\n\n\"Click the plus button at the top right\" = \"Click the plus button at the top right\";\n\n\"Click the ‘Contacts’ button\" = \"Click the ‘Contacts’ button\";\n\n\"Click ‘Accounts’\" = \"Click ‘Accounts’\";\n\n\"Click ‘Advanced settings’\" = \"Click ‘Advanced settings’\";\n\n\"Click ‘Archive Account’\" = \"Click ‘Archive Account’\";\n\n\"Click ‘Create New Account’\" = \"Click ‘Create New Account’\";\n\n\"Click ‘Delete’\" = \"Click ‘Delete’\";\n\n\"Click ‘Done’\" = \"Click ‘Done’\";\n\n\"Click ‘Edit Account Name’\" = \"Click ‘Edit Account Name’\";\n\n\"Click ‘Edit’\" = \"Click ‘Edit’\";\n\n\"Click ‘Enable PIN Code’\" = \"Click ‘Enable PIN Code’\";\n\n\"Click ‘History’\" = \"Click ‘History’\";\n\n\"Click ‘Import Account’\" = \"Click ‘Import Account’\";\n\n\"Click ‘Import Private Key’\" = \"Click ‘Import Private Key’\";\n\n\"Click ‘Import Watch Only Account’\" = \"Click ‘Import Watch Only Account’\";\n\n\"Click ‘Import Watch Only Address’\" = \"Click ‘Import Watch Only Address’\";\n\n\"Click ‘Label transaction’\" = \"Click ‘Label transaction’\";\n\n\"Click ‘Restore Wallet’\" = \"Click ‘Restore Wallet’\";\n\n\"Click ‘Restore’\" = \"Click ‘Restore’\";\n\n\"Click ‘Review Payment’\" = \"Click ‘Review Payment’\";\n\n\"Click ‘Send’\" = \"Click ‘Send’\";\n\n\"Click ‘Set Transaction Fee’\" = \"Click ‘Set Transaction Fee’\";\n\n\"Click ‘Settings’\" = \"Click ‘Settings’\";\n\n\"Click ‘Show Backup Passphrase’\" = \"Click ‘Show Backup Passphrase’\";\n\n\"Click ‘View Addresses’\" = \"Click ‘View Addresses’\";\n\n\"Click ‘View account private key QR code’\" = \"Click ‘View account private key QR code’\";\n\n\"Click ‘View account public key QR code’\" = \"Click ‘View account public key QR code’\";\n\n\"Click ‘View address QR code’\" = \"Click ‘View address QR code’\";\n\n\"Click ‘View in web’\" = \"Click ‘View in web’\";\n\n\"Click ‘View private key QR code’\" = \"Click ‘View private key QR code’\";\n\n\"Click ‘blockexplorer API type’\" = \"Click ‘blockexplorer API type’\";\n\n\"Click ’Receive’\" = \"Click ’Receive’\";\n\n\"Close\" = \"Закрыть\";\n\n\"Cold Wallet\" = \"Холодный Кошелек\";\n\n\"Cold Wallet Accounts\" = \"Учетные записи Холодного Кошелька\";\n\n\"Cold Wallet Accounts can't see reusable address payments, thus this accounts' reusable address is not available.\" = \"Учетные записи холодного кошелька не имеют доступа к просмотру платежей на многоразовые адреса, поэтому многоразовые адреса данной учетной записи недоступны.\";\n\n\"Cold Wallet Overview\" = \"Обзор холодного кошелька\";\n\n\"Cold wallet private keys are not stored here and cannot be viewed\" = \"Закрытые ключи холодного кошелька здесь не хранятся и не могут быть просмотрены.\";\n\n\"Complete\" = \"Завершить\";\n\n\"Complete step 1\" = \"Завершите шаг 1\";\n\n\"Confirm Payment\" = \"Подтвердить платеж\";\n\n\"Confirm Pin Code\" = \"Подтвердите PIN\";\n\n\"Contacts\" = \"Контакты\";\n\n\"Continue\" = \"Продолжить\";\n\n\"Copied To clipboard\" = \"Скопировано в буфер обмена\";\n\n\"Copy\" = \"Копировать\";\n\n\"Copy Transaction ID to Clipboard\" = \"Скопировать ID транзакции в буфер обмена\";\n\n\"Create Cold Wallet\" = \"Создайте холодный кошелек\";\n\n\"Create New Account\" = \"Создайте новую учетную запись\";\n\n\"Create new contact\" = \"Создать новый контакт\";\n\n\"Customize Fee\" = \"Настроить плату\";\n\n\"Decrypting\" = \"Расшифровка\";\n\n\"Delete\" = \"Удалить\";\n\n\"Delete %@\" = \"Удалить %@\";\n\n\"Delete Account\" = \"Удалить учетную запись\";\n\n\"Delete Contact\" = \"Удалить контакт?\";\n\n\"Delete address\" = \"Удалить адрес\";\n\n\"Do not use the QR code from here to receive bitcoins. Go to the Receive screen to get a QR code to receive bitcoins.\" = \"Не используйте данный QR-код для получения биткоинов. Перейдите на экран «Получить» для получения QR-кода, чтобы получить биткоины.\";\n\n\"Do you like using ArcBit?\" = \"Нравится ли Вам использовать ArcBit?\";\n\n\"Do you want to load and backup your current local wallet file?\" = \"Вы хотите загрузить и создать резервную копию текущего файла локального кошелька?\";\n\n\"Do you want to load local wallet file?\" = \"Вы хотите загрузить локальный файл кошелька?\";\n\n\"Do you want to restore from your backup passphrase or start a new wallet?\" = \"Вы хотите восстановить с помощью восстановительной фразы-пароля или начать новый кошелек?\";\n\n\"Do you want to temporary import your account private key?\" = \"Вы хотите временно импортировать закрытый ключ Вашей учетной записи?\";\n\n\"Do you want to temporary import your private key?\" = \"Вы хотите временно импортировать открытый ключ Вашей учетной записи?\";\n\n\"Don't remind me\" = \"Больше не напоминать\";\n\n\"Done\" = \"Готово\";\n\n\"Each account has a public and private account key. Account keys should be kept secret as they are used to view the account's transactions and spend the account's bitcoins.\" = \"Each account has a public and private account key. Account keys should be kept secret as they are used to view the account's transactions and spend the account's bitcoins.\";\n\n\"Edit\" = \"Изменить\";\n\n\"Edit Account Name\" = \"Изменить имя учетной записи\";\n\n\"Edit Contact Name\" = \"Изменить имя контакта\";\n\n\"Edit Label\" = \"Изменить метку\";\n\n\"Edit Transaction label\" = \"Изменить метку транзакции\";\n\n\"Email Support\" = \"Написать Email в Службу Поддержки\";\n\n\"Enable PIN code in settings to better secure your wallet.\" = \"Включите PIN код в настройках для лучшей безопасности Вашего кошелька.\";\n\n\"Enable Pin Code\" = \"Включить PIN код\";\n\n\"Enable Transaction Fee\" = \"Enable Transaction Fee\";\n\n\"Enable advanced mode\" = \"Активировать расширенный режим\";\n\n\"Encountered error creating transaction. Please try again.\" = \"Ошибка при создании транзакции. Пожалуйста, попробуйте еще раз.\";\n\n\"Encrypted\" = \"Зашифровано\";\n\n\"Enter Label\" = \"Введите метку\";\n\n\"Enter PIN\" = \"Введите PIN\";\n\n\"Enter a wallet backup passphrase to wipe the current wallet and start/restore another.\" = \"Введите восстановительную фразу-пароль кошелька, чтобы стереть текущий кошелек и запустить / восстановить другой.\";\n\n\"Enter account private key\" = \"Введите закрытый ключ учетной записи\";\n\n\"Enter account public key\" = \"Введите открытый ключ учетной записи\";\n\n\"Enter address\" = \"Введите адрес\";\n\n\"Enter an account ID and click 'QR Code'. Then on your primary online device, enable Cold Wallet in settings. Then go to the Accounts screen and click 'Import Cold Wallet Account' and scan the Account Public Key QR Code. Afterwards use this cold wallet account as you would a normal account and deposit bitcoins into it. When you want to make a payment from a cold wallet account, go to the next section on the previous screen and follow the step by step instructions there.\" = \"Введите ID учетной записи и нажмите «QR-код». Затем в основном онлайн-устройстве включите параметр «Холодный кошелек» в настройках. Перейдите на экран учетных записей и нажмите «Импортировать учетную запись холодного кошелька» и сканируйте QR-код учетной записи открытого ключа. После этого используйте эту учетную запись холодного кошелька, как обычную учетную запись, и кладите на нее биткоины. Если Вы хотите произвести платеж с учетной записи холодного кошелька, перейдите к следующему разделу на предыдущем экране и следуйте пошаговым инструкциям.\";\n\n\"Enter backup passphrase\" = \"Enter backup passphrase\";\n\n\"Enter passphrase for your iCloud backup wallet.\" = \"Введите кодовую фразу для своего резервного кошелька iCloud.\";\n\n\"Enter password for encrypted private key\" = \"Введите пароль от зашифрованного закрытого ключа\";\n\n\"Enter the 12 word passphrase that belongs to the cold wallet account that you want to make a payment from. This is the passphrase that was used to generate your account public key that was generated on the 'Create Cold Wallet' section found on the previous screen.\" = \"Введите ключевую фразу-пароль из 12 слов, принадлежащую учетной записи холодного кошелька, из которого Вы хотите произвести платеж. Это ключевая фраза-пароль, которая использовалась для создания открытого ключа Вашей учетной записи, который был создан в разделе «Создать холодный кошелек» на предыдущем экране.\";\n\n\"Error\" = \"Ошибка\";\n\n\"Error fetching Transaction.\" = \"Ошибка получения транзакции\";\n\n\"Error fetching unspent outputs. Try again later.\" = \"Ошибка получения непотраченного. Попробуйте еще раз позже.\";\n\n\"Error fetching unspent outputs. Try again.\" = \"Ошибка получения непотраченного. Попробуйте еще раз.\";\n\n\"Error getting block height.\" = \"Ошибка при получении высоты блока.\";\n\n\"Error importing account\" = \"Ошибка импорта учетной записи\";\n\n\"Error loading wallet JSON file\" = \"Ошибка загрузки файла JSON кошелька\";\n\n\"Explanation\" = \"Explanation\";\n\n\"FAQ\" = \"FAQ\";\n\n\"Fee:\" = \"Комиссия:\";\n\n\"Fill address field\" = \"Fill address field\";\n\n\"Finished Passing Transaction Data\" = \"Передача данных транзакции завершена\";\n\n\"First make sure you are using your secondary offline device for this screen (as mentioned in the overview on the previous screen). Click 'New Wallet' and write down or memorize the generated 12 word passphrase. This passphrase can recover and generate all your accounts and the bitcoins associated with it, so keep it safe and to yourself. Also instead of creating a new wallet, you can also input an existing 12 word passphrase that was generated here to create additional accounts.\" = \"Сначала убедитесь, что Вы используете вторичное оффлайн устройство для этого экрана (как указано в обзоре на предыдущем экране). Нажмите «Новый кошелек» и запишите или запомните созданную кодовую фразу из 12 слов. Эта кодовая фраза может восстанавливать и генерировать все Ваши учетные записи и связанные с ней биткоины, поэтому храните ее в безопасности и только у себя. Кроме того, вместо создания нового кошелька Вы также можете ввести существующую кодовую фразу из 12 слов, которая была создана здесь, для создания дополнительных учетных записей.\";\n\n\"Follow us on Twitter\" = \"Подписывайтесь на нас вTwitter\";\n\n\"From:\" = \"От：\";\n\n\"Funds have been claimed already.\" = \"Средства уже были заявлены.\";\n\n\"Funds imported\" = \"Средства импортированы\";\n\n\"Go\" = \"Идти\";\n\n\"Go to the side menu\" = \"Go to the side menu\";\n\n\"Have sender scan QR code\" = \"Have sender scan QR code\";\n\n\"Have sender send you payment\" = \"Have sender send you payment\";\n\n\"Help\" = \"Помогите\";\n\n\"Here are some features that no other mobile bitcoin wallet supports.\\n- Reusable address support\\n- Ability to import individual account (extended) keys\\n- iCloud backup support\\n- Over 150 local currencies supported\" = \"Here are some features that no other mobile bitcoin wallet supports.\\n- Reusable address support\\n- Ability to import individual account (extended) keys\\n- iCloud backup support\\n- Over 150 local currencies supported\";\n\n\"Hierarchical Deterministic Wallet\" = \"Hierarchical Deterministic Wallet\";\n\n\"History\" = \"История\";\n\n\"How To:\" = \"How To:\";\n\n\"How do I get bitcoins?\" = \"How do I get bitcoins?\";\n\n\"How does ArcBit Wallet work?\" = \"How does ArcBit Wallet work?\";\n\n\"Import Account\" = \"Импорт учетной записи\";\n\n\"Import Cold Wallet Account\" = \"Импорт учетной записи холодного кошелька\";\n\n\"Import Feature\" = \"Import Feature\";\n\n\"Import Private Key\" = \"Импорт закрытого ключа\";\n\n\"Import Private/Encrypted Key\" = \"Import Private/Encrypted Key\";\n\n\"Import Watch Account\" = \"Импорт учетной записи для просмотра\";\n\n\"Import Watch Address\" = \"Импорт адреса для просмотра\";\n\n\"Import private key encrypted or unencrypted?\" = \"Импорт закрытого ключа зашифрованным или незашифрованным?\";\n\n\"Import with QR code\" = \"Импорт с QR кодом\";\n\n\"Import with text input\" = \"Импорт с текстовым вводом\";\n\n\"Imported Account %@\" = \"Импортирована учетная запись %@\";\n\n\"Imported Accounts\" = \"Импортированные учетные записи\";\n\n\"Imported Address\" = \"Импортированный адрес\";\n\n\"Imported Addresses\" = \"Импортированные адреса\";\n\n\"Imported Cold Wallet Account %@\" = \"Импортирована учетная запись холодного кошелька %@\";\n\n\"Imported Watch Account %@\" = \"мпортирована учетная запись для просмотра %@\";\n\n\"Imported Watch Accounts\" = \"Импортированы учетные записи для просмотра\";\n\n\"Imported Watch Addresses\" = \"Импортированы адреса для просмотра\";\n\n\"Imported Watch Only Accounts can't see reusable address payments, thus this accounts' reusable address is not available. If you want see the reusable address for this account, import the account private key that corresponds to this accounts public key.\" = \"Импортированные учетные записи не имеют доступа к просмотру платежей многоразовых адресов, поэтому этот адрес повторного использования недоступен. Если Вы хотите увидеть многоразовый адрес для этой учетной записи, импортируйте закрытый ключ учетной записи, соответствующий открытому ключу этой учетной записи.\";\n\n\"Importing Account\" = \"Импорт учетной записи\";\n\n\"Importing Cold Wallet Account\" = \"Импорт учетной записи холодного кошелька\";\n\n\"Importing a Private Key\" = \"Importing a Private Key\";\n\n\"Importing a Watch Only Account\" = \"Importing a Watch Only Account\";\n\n\"Importing a Watch Only Address\" = \"Importing a Watch Only Address\";\n\n\"Importing an Account\" = \"Importing an Account\";\n\n\"Importing an encrypted key will require you to input the password every time you want to send bitcoins from it.\" = \"Импортирование зашифрованого ключа потребует ввода пароля каждый раз, когда Вы хотите отправить деньги.\";\n\n\"In advanced mode, you can import bitcoin keys and addresses from other sources. You can import account private keys, account public keys, private keys, and addresses.\\nPlease note that your 12 word passphrase cannot recover your bitcoins, so it is recommended that you backup imported keys and addresses separately.\" = \"In advanced mode, you can import bitcoin keys and addresses from other sources. You can import account private keys, account public keys, private keys, and addresses.\\nPlease note that your 12 word passphrase cannot recover your bitcoins, so it is recommended that you backup imported keys and addresses separately.\";\n\n\"Incomplete\" = \"Не завершено\";\n\n\"Incorrect passphrase, could not decrypt iCloud wallet backup.\" = \"Неправильная кодовая фраза, не может расшифровать резервную копию кошелька iCloud.\";\n\n\"Input a bitcoin address\" = \"Input a bitcoin address\";\n\n\"Input a label\" = \"Input a label\";\n\n\"Input a new label\" = \"Input a new label\";\n\n\"Input a recommended amount. Somewhere between %@ and %@ BTC\" = \"Input a recommended amount. Somewhere between %@ and %@ BTC\";\n\n\"Input amount\" = \"Input amount\";\n\n\"Input label\" = \"Input label\";\n\n\"Input new account name\" = \"Input new account name\";\n\n\"Input transaction fee in bitcoins\" = \"Input transaction fee in bitcoins\";\n\n\"Instructions\" = \"Instructions\";\n\n\"Insufficient Funds\" = \"Недостаточно средств\";\n\n\"Insufficient Funds. Account balance is %@ when %@ is required.\" = \"Недостаточно средств. Баланс учетной записи %@ в то время как необходимы %@.\";\n\n\"Insufficient Funds. Account contains bitcoin dust. You can only send up to %@ for now.\" = \"Недостаточно средств. Учетная запись содержит биткоиновую “пыль”. Вы можете отправлять только до %@.\";\n\n\"Internal Wallet Data\" = \"Данные внутреннего кошелька\";\n\n\"Internal account transfer\" = \"Трансфер внутри учетной записи\";\n\n\"Invalid Address\" = \"Неверный Биткоин адрес\";\n\n\"Invalid Passphrase\" = \"Неверная кодовая фраза-пароль\";\n\n\"Invalid URL\" = \"Неверный URL\";\n\n\"Invalid account private key\" = \"Неверный закрытый ключ учетной записи\";\n\n\"Invalid account public Key\" = \"Неверный открытый ключ учетной записи\";\n\n\"Invalid amount\" = \"Неверная сумма\";\n\n\"Invalid backup passphrase\" = \"Неверная восстановительная фраза-пароль\";\n\n\"Invalid private key\" = \"Неверный закрытый ключ\";\n\n\"Invalid scanned data\" = \"Неверные сканированные данные\";\n\n\"Invalid transaction ID\" = \"Неверный ID транзакции\";\n\n\"It is not recommended that you manually manage private keys yourself. A leak of a private key can lead to the compromise of your accounts.\" = \"Не рекомендуется  самостоятельно вручную управлять личными ключами. Утечка закрытого ключа может привести к компрометации Ваших учетных записей.\";\n\n\"It is not recommended that you use a regular bitcoin address for multiple payments, but instead you should import a reusable address. Add address anyways?\" = \"Не рекомендуется использовать обычный адрес для нескольких платежей - рекомендуется импортировать адрес для многоразового использования. Все равно хотите добавить адрес?\";\n\n\"Label\" = \"Метка\";\n\n\"Label Transaction\" = \"Метка транзакции\";\n\n\"Local backup to wallet failed!\" = \"Локальное резервное копирование в кошелек не удалось!\";\n\n\"Local wallet will be lost. Are you sure you want to restore wallet from iCloud?\" = \"Локальный кошелек будет потерян. Вы действительно хотите восстановить кошелек от iCloud?\";\n\n\"Maximum accounts reached\" = \"Достигнуто максимальное количество учетных записей\";\n\n\"More\" = \"Более\";\n\n\"Name\" = \"Имя\";\n\n\"Network Error\" = \"Ошибка сети\";\n\n\"New Wallet\" = \"Новый кошелек\";\n\n\"New addresses will be automatically generated and cycled for you as you use your current available addresses.\" = \"Новые адреса будут автоматически генерироваться и циклироваться для Вас, когда Вы используете текущие доступные адреса.\";\n\n\"Next\" = \"Далее\";\n\n\"No\" = \"Нет\";\n\n\"None currently\" = \"Сейчас нет\";\n\n\"Not now\" = \"Не сейчас\";\n\n\"Now authorize the transaction on your air gap device. When you have done so, click continue on this device to scan the authorized transaction data and make your payment.\" = \"Теперь авторизуйте транзакцию на своем физически изолированном устройстве. Когда Вы это сделаете, нажмите на этом устройстве, чтобы просмотреть авторизированные данные транзакции и внести платеж.\";\n\n\"OK\" = \"OK\";\n\n\"On your primary online device, when you want to make a payment from a cold wallet account, simply do it as you normally would on a normal account. When you click 'Send' on the Review Payment screen, instead of the payment going out immediately, you will be prompted to pass the unauthorized transaction data. Then on your secondary offline device, within this screen click 'Scan' to import the transaction so it can be authorized.\" = \"Когда Вы хотите сделать платеж с учетной записи холодного кошелька на своем основном онлайн-устройстве просто сделайте, как обычно, на обычной учетной записи. Когда Вы нажимаете «Отправить» на экране «Обзор платежей», вместо немедленного платежа Вам будет предложено передать данные несанкционированной транзакции. Затем на своем вторичном оффлайн устройстве на этом экране нажмите «Сканировать», чтобы импортировать транзакцию для авторизации.\";\n\n\"Once the transaction has been authorized by completing the above two steps, pass the authorized transaction back to your primary online device to finalize your payment.\" = \"После того, как транзакция будет авторизована путем выполнения вышеуказанных двух шагов, переведите авторизованную транзакцию обратно на основное онлайн-устройство, чтобы завершить платеж\";\n\n\"Other Links\" = \"Другие ссылки\";\n\n\"Pass\" = \"Передать\";\n\n\"Passphrase\" = \"Фраза-пароль\";\n\n\"Passphrase does not match the transaction\" = \"Фраза-пароль не соответствует транзакции\";\n\n\"Password\" = \"Пароль\";\n\n\"Payment Index: %lu\" = \"Индекс платежа： %lu\";\n\n\"Private key does not match address\" = \"Закрытый ключ не соответствует адресу\";\n\n\"Private key missing\" = \"Не хватает закрытого ключа\";\n\n\"QR code\" = \"QR код\";\n\n\"Quit and re-enter app\" = \"Quit and re-enter app\";\n\n\"Rate\" = \"Оценка\";\n\n\"Rate us in the App Store!\" = \"Оцените нас на App Store!\";\n\n\"Receive\" = \"Получить\";\n\n\"Receive Payment\" = \"Receive Payment\";\n\n\"Receive Payment From Reusable Address\" = \"Receive Payment From Reusable Address\";\n\n\"Remind me Later\" = \"Напомните мне позже\";\n\n\"Restore\" = \"Восстановить\";\n\n\"Restore Wallet\" = \"Восстановить кошелек\";\n\n\"Restore from iCloud\" = \"Восстановить от iCloud\";\n\n\"Restoring Wallet\" = \"Восстановление кошелька\";\n\n\"Retry\" = \"Повторите попытку\";\n\n\"Reusable Address Payment Addresses\" = \"Адреса платежей на многоразовые адреса\";\n\n\"Reusable Address:\" = \"Многоразовые адреса:\";\n\n\"Reusable Addresses\" = \"Reusable Addresses\";\n\n\"Review Payment\" = \"Обзор платежа\";\n\n\"Save\" = \"Сохранить\";\n\n\"Scan\" = \"Сканировать\";\n\n\"Scan For Reusable Address Payment\" = \"Сканировать платежи на адреса многоразового использования\";\n\n\"Scan QR Code\" = \"канировать QR код\";\n\n\"Scan for reusable address transaction\" = \"Сканировать транзакции на многоразовые адреса\";\n\n\"Scan next part\" = \"Сканируйте следующую часть\";\n\n\"Scroll down to the section ‘Account Actions’\" = \"Scroll down to the section ‘Account Actions’\";\n\n\"Select Account\" = \"Выбрать учетную запись\";\n\n\"Select and click a blockexplorer API\" = \"Select and click a blockexplorer API\";\n\n\"Select and click a transaction\" = \"Select and click a transaction\";\n\n\"Select and click an account\" = \"Select and click an account\";\n\n\"Select and click an account to receive from\" = \"Select and click an account to receive from\";\n\n\"Select and click an account to view it’s transaction history\" = \"Select and click an account to view it’s transaction history\";\n\n\"Select and click an address\" = \"Select and click an address\";\n\n\"Send\" = \"Отправить\";\n\n\"Send Payment\" = \"править платеж\";\n\n\"Send To Address In Contacts\" = \"Send To Address In Contacts\";\n\n\"Send authorized payment?\" = \"Отправить авторизованный платеж?\";\n\n\"Sending\" = \"Отправление\";\n\n\"Sending payment to a reusable address might take longer to show up then a normal transaction with the blockchain.info API. You might have to wait until at least 1 confirmation for the transaction to show up. This is due to the limitations of the blockchain.info API. For reusable address payments to show up faster, configure your app to use the Insight API in advance settings.\" = \"Отправка платежа на многоразовый адрес может занять больше времени, чем отправка обычной транзакции с помощью API-интерфейса blockchain.info. Возможно, Вам придется подождать, пока не появится хотя бы одно подтверждение транзакции. Это связано с ограничениями API-интерфейса blockchain.info. Чтобы многоразовые адресные платежи отображались быстрее, настройте приложение для использования API Insight.\";\n\n\"Sent %@ to %@\" = \"Отправлено %@ получателю %@\";\n\n\"Set Transaction Fee in %@\" = \"Установить комиссию по транзакции %@\";\n\n\"Settings\" = \"Настройки\";\n\n\"Some funds may be pending confirmation and cannot be spent yet. (Check your account history) Account only has a spendable balance of %@\" = \"Некоторые средства могут находиться в ожидании подтверждения и еще не могут быть потрачены. (Проверьте историю своей учетной записи) Учетная запись имеет только отложенный остаток %@\";\n\n\"Some people have compared bitcoin addresses to a bank routing number. It is a good analogy, however bitcoin addresses are public. So if you reuse the same bitcoin address for multiple payments like you would a routing number, people will be able to figure out how much bitcoin you have. Thus it is recommended that you only use one address per payment.\\nThis causes usability issues making the user use a new address whenever receiving a payment is cumbersome.\\nStealth/reusable addresses provides a better solution. When you give a sender a reusable address, the sender will derive a one time regular bitcoin address from the reusable address. Then the sender will send a payment to that regular bitcoin address. Now you can give many people just one reusable address and have them all send you payments without letting other people know how much bitcoin you have.\\nA reusable address looks like this vJmxthatTBXibYe9aZavx18iAT9gyiJETGkhwPX2WbHQGuzX83YvQXynD2t8yHU4Xjfonu5x9m6B4yxquytFP1c2CRbVR9mecxesvE. A reusable address is a lot longer then a regular bitcoin address, it is 102 characters in length.\\nReusable addresses are great, however there are no other mobile bitcoin wallets but ArcBit that supports reusable addresses for now. Which is why ArcBit supports receiving payments from both regular bitcoin addresses and reusable addresses.\\nFor each account, you have one reusable address. You can find it on your Receive screen. Swipe all the way to right on the QRCode on your Receive screen and you will find a reusable address.\" = \"Some people have compared bitcoin addresses to a bank routing number. It is a good analogy, however bitcoin addresses are public. So if you reuse the same bitcoin address for multiple payments like you would a routing number, people will be able to figure out how much bitcoin you have. Thus it is recommended that you only use one address per payment.\\nThis causes usability issues making the user use a new address whenever receiving a payment is cumbersome.\\nStealth/reusable addresses provides a better solution. When you give a sender a reusable address, the sender will derive a one time regular bitcoin address from the reusable address. Then the sender will send a payment to that regular bitcoin address. Now you can give many people just one reusable address and have them all send you payments without letting other people know how much bitcoin you have.\\nA reusable address looks like this vJmxthatTBXibYe9aZavx18iAT9gyiJETGkhwPX2WbHQGuzX83YvQXynD2t8yHU4Xjfonu5x9m6B4yxquytFP1c2CRbVR9mecxesvE. A reusable address is a lot longer then a regular bitcoin address, it is 102 characters in length.\\nReusable addresses are great, however there are no other mobile bitcoin wallets but ArcBit that supports reusable addresses for now. Which is why ArcBit supports receiving payments from both regular bitcoin addresses and reusable addresses.\\nFor each account, you have one reusable address. You can find it on your Receive screen. Swipe all the way to right on the QRCode on your Receive screen and you will find a reusable address.\";\n\n\"Spending from a cold wallet account\" = \"Трата из учетной записи холодного кошелька\";\n\n\"Start fresh\" = \"Начать свежие\";\n\n\"Start/Restore Another Wallet\" = \"Start/Restore Another Wallet\";\n\n\"Starting Change address ID:\" = \"Запуск Изменить адрес ID:\";\n\n\"Starting Receiving Address ID:\" = \"Начало получения ID адресов:\";\n\n\"Step 1: Scan transaction to authorize\" = \"Шаг 1: Сканируйте транзакцию для авторизации\";\n\n\"Step 2: Input 12 word backup passphrase\" = \"Шаг 2: Введите 12 слов Вашей восстановительный фразы-пароля\";\n\n\"Step 3: Pass authorized transaction data\" = \"Шаг 3: Передайте авторизированные данные транзакции\";\n\n\"Steps\" = \"Steps\";\n\n\"Success\" = \"Успешно\";\n\n\"Swipe right on an address\" = \"Swipe right on an address\";\n\n\"Swipe to the right on the QR Code Image until you see the reusable address\" = \"Swipe to the right on the QR Code Image until you see the reusable address\";\n\n\"Temporarily import account private key\" = \"Временно импортируйте закрытый ключ учетной записи\";\n\n\"Temporarily import private key\" = \"Временно импортируйте закрытый ключа\";\n\n\"The cold wallet feature will allow you to create accounts which offer better security compared to normal online wallets. You will need 2 devices to use this feature. Your normal day to day device that is connected to the internet and a secondary device that is not connected to the internet (Your secondary device would need to be online once to download the ArcBit app. Afterwards keep the secondary device offline for maximum security). This feature allows you to authorize bitcoin payments from an offline device so that the keys to your bitcoins will never need to be stored on your online device. Follow the step by step instructions by clicking the info buttons within the below sections.\" = \"Функция «холодного кошелька» позволит Вам создавать учетные записи, которые обеспечивают лучшую безопасность, чем обычные онлайн-кошельки. Для использования этой функции Вам понадобятся 2 устройства. Ваше обычное ежедневное устройство, подключенное к Интернету, и второе устройство, которое не подключено к Интернету (для загрузки приложения ArcBit необходимо единожды подключиться к Интернету, а затем отключить устройство в оффлайн режим для максимальной безопасности). Эта функция позволяет Вам авторизовывать биткоин-платежи с оффлайн устройства, так что Ваши ключи от биткоинов не будут храниться на Вашем онлайн-устройстве. Следуйте пошаговым инструкциям, кликая на информационные кнопки в нижеследующих разделах.\";\n\n\"The cold wallet feature will allow you to create accounts which offer better security compared to normal online wallets. You will need 2 devices to use this feature. Your normal day to day device that is connected to the internet and a secondary device that is not connected to the internet (Your secondary device would need to be online once to download the ArcBit app. Afterwards keep the secondary device offline for maximum security). This feature allows you to authorize bitcoin payments from an offline device so that the keys to your bitcoins will never need to be stored on your online device. You can enable the cold wallet feature by going into advanced settings.\" = \"The cold wallet feature will allow you to create accounts which offer better security compared to normal online wallets. You will need 2 devices to use this feature. Your normal day to day device that is connected to the internet and a secondary device that is not connected to the internet (Your secondary device would need to be online once to download the ArcBit app. Afterwards keep the secondary device offline for maximum security). This feature allows you to authorize bitcoin payments from an offline device so that the keys to your bitcoins will never need to be stored on your online device. You can enable the cold wallet feature by going into advanced settings.\";\n\n\"This account type can't see reusable address payments\" = \"Данный тип учетной записи не может просматривать платежи на многоразовые адреса\";\n\n\"This feature allows you to manually input a transaction ID and see if the corresponding transaction contains a reusable address payment to your reusable address. If so, then the funds will be added to your wallet. Normally the app will discover reusable address payments automatically for you, but if you believe a payment is missing you can use this feature.\" = \"Эта функция позволяет вам вручную ввести ID транзакции и посмотреть, содержит ли соответствующая транзакция платеж на ваш многразовый адрес. Если это так, то средства будут добавлены в ваш кошелек. Обычно приложение автоматически обнаруживает переадресацию платежей, но если Вы считаете, что платеж отсутствует, Вы можете использовать эту функцию.\";\n\n\"To:\" = \"Кому：\";\n\n\"Today\" = \"Cегодня\";\n\n\"Toggle Automatic Transaction Fee\" = \"Toggle Automatic Transaction Fee\";\n\n\"Toggle ‘Enable Transaction Fee’\" = \"Toggle ‘Enable Transaction Fee’\";\n\n\"Toggle ’Enable advanced mode’\" = \"Toggle ’Enable advanced mode’\";\n\n\"Total:\" = \"Всего:\";\n\n\"Transaction %@ already accounted for.\" = \"Транзакция %@ уже учтена.\";\n\n\"Transaction %@ does not belong to this account.\" = \"Транзакция %@ не принадлежит данной учетной записи.\";\n\n\"Transaction Fee\" = \"Комиссия по транзакции\";\n\n\"Transaction ID\" = \"ID транзакции\";\n\n\"Transaction ID: %@\" = \"ID транзакции: %@\";\n\n\"Transaction authorized\" = \"Транзакция авторизована\";\n\n\"Transaction confirmations\" = \"Transaction confirmations\";\n\n\"Transaction fees impact how quickly the Bitcoin network will confirm your transactions. Higher fees means faster confirmation times. Default fee behavior can be configured in settings.\" = \"Комиссия по транзакции влияет на то, как быстро сеть Биткоин подтвердит ваши транзакции. Более высокая комиссия дает быстрое подтверждение по времени. Комиссия по умолчанию может быть изменена в настройках.\";\n\n\"Transaction is not a reusable address transaction.\" = \"Транзакция не является транзакцией на многоразовый адрес.\";\n\n\"Transaction needs to be authorized by an offline and air gap device. Send transaction to an offline device for authorization?\" = \"Транзакция должна быть авторизована онлайн и физически изолированным устройством. Отправить транзакцию оффлайн устройству для авторизации?\";\n\n\"Transaction needs to be passed back to your online device in order for the payment to be sent\" = \"Чтобы отправить платеж, транзакция должна быть возвращена на Ваше онлайн-устройство.\";\n\n\"Try Again\" = \"Попробуйте еще раз\";\n\n\"Try our new cold wallet feature!\" = \"Попробуйте нашу новую функцию холодного кошелька！\";\n\n\"URL does not contain an address.\" = \"URL-адрес не содержит адреса.\";\n\n\"Unable to get dynamic fees. Falling back on fixed transaction fee. (fee can be configured on review payment)\" = \"Невозможно получить динамическую комиссию. Возврат к фиксированной комиссии по транзакции. (Плата может быть настроена за просмотр)\";\n\n\"Unarchive Account\" = \"Разархивированная учетная запись\";\n\n\"Unarchive address\" = \"Разархивированный адрес\";\n\n\"Unarchived address\" = \"Разархивированный адрес\";\n\n\"Unconfirmed\" = \"Не подтверждено\";\n\n\"Unencrypted\" = \"Не зашифровано\";\n\n\"Use ArcBit on your browser to complement the mobile app. The web wallet has all the features that the mobile wallet has plus more!\" = \"Используйте ArcBit в своем браузере, чтобы дополнить мобильное приложение. Веб-кошелек имеет все функции, как и у мобильного кошелька, плюс дополнительные возможности!\";\n\n\"Use all funds\" = \"Использовать все средства\";\n\n\"View Account Address\" = \"View Account Address\";\n\n\"View Account Address In Web\" = \"View Account Address In Web\";\n\n\"View Account Addresses\" = \"View Account Addresses\";\n\n\"View Account Private Key\" = \"View Account Private Key\";\n\n\"View Account Public Key\" = \"View Account Public Key\";\n\n\"View Achievements\" = \"View Achievements\";\n\n\"View Addresses\" = \"Показать адреса\";\n\n\"View ArcBit Brain Wallet Details\" = \"Показать детали ArcBit мыслекошелька\";\n\n\"View ArcBit Web Wallet Details\" = \"Показать детали ArcBit Веб-кошелька\";\n\n\"View History\" = \"View History\";\n\n\"View Private Key\" = \"View Private Key\";\n\n\"View Transaction In Web\" = \"View Transaction In Web\";\n\n\"View account private key QR code\" = \"Показать QR код закрытого ключа учетной записи\";\n\n\"View account public key QR code\" = \"Показать QR код открытого ключа учетной записи\";\n\n\"View address QR code\" = \"Показать QR код адреса\";\n\n\"View address in web\" = \"Показать адрес в Веб\";\n\n\"View in web\" = \"Показать в Веб\";\n\n\"View private key QR code\" = \"Показать закрытый ключ QR код\";\n\n\"Visit our home page\" = \"Посетите нашу домашнюю страницу\";\n\n\"Wallet backup passphrase\" = \"Восстановительная фраза-пароль кошелька\";\n\n\"Warning\" = \"Предупреждение\";\n\n\"Welcome to ArcBit, a user only controlled Bitcoin wallet. Start using the app now by depositing your Bitcoins here.\" = \"Добро пожаловать в ArcBit - Биткоин-кошелек, контролируемый только пользователем. Начните использовать приложение сейчас, разместив свои биткоины здесь\";\n\n\"Welcome!\" = \"Добро пожаловать！\";\n\n\"What are Account/Extended Keys?\" = \"What are Account/Extended Keys?\";\n\n\"What are accounts?\" = \"What are accounts?\";\n\n\"What are reusable addresses?\" = \"What are reusable addresses?\";\n\n\"What are the benefits and advantages of Bitcoin?\" = \"What are the benefits and advantages of Bitcoin?\";\n\n\"What are transaction confirmations?\" = \"What are transaction confirmations?\";\n\n\"What is ArcBit's cold wallet feature?\" = \"What is ArcBit's cold wallet feature?\";\n\n\"What is Bitcoin?\" = \"What is Bitcoin?\";\n\n\"What is a bitcoin wallet?\" = \"What is a bitcoin wallet?\";\n\n\"What makes ArcBit different from other bitcoin wallets?\" = \"What makes ArcBit different from other bitcoin wallets?\";\n\n\"With an ArcBit cold wallet feature, you can create wallets and make payments offline without exposing your private keys to an internet connected device. This feature is great for storing large amounts of bitcoin or for the security conscious minded. Check out this feature in the cold wallet section in the side menu.\" = \"Благодаря функции холодного хранения ArcBit Вы можете создавать кошельки и совершать платежи в оффлайн режиме, не используя свои личные ключи на устройстве, подключенному к Интернету. Эта функция отлично подходит для хранения большого количества биткоинов и по причинам безопасности. Вы можете найти эту функцию в секции холодного кошелька в боковом меню.\";\n\n\"Write down backup passphrase\" = \"Write down backup passphrase\";\n\n\"Write down or memorize your 12 word wallet backup passphrase. You can view it by clicking \\\"Show backup passphrase\\\" in Settings. Your wallet backup passphrase is needed to recover your bitcoins.\" = \"Запишите или запомните кодовую фразу из 12 слов, которая может быть найдена в настройках. Восстановительная фраза-пароль из 12 слов необходима для восстановления ваших биткоинов.\";\n\n\"Write down the 12 word passphrase below and keep it safe. This passphrase alone can restore your entire wallets\\' bitcoins (excluding imports).\" = \"Запишите приведенную ниже кодовую фразу-пароль из 12 слов и сохраните ее в безопасности. Эта кодовая фраза может восстановить все ваши кошельки и биткоины (включая импорты).\";\n\n\"Write down the 12 word passphrase below and keep it safe. This passphrase alone can restore your entire wallets\\' bitcoins.\" = \"Запишите приведенную ниже кодовую фразу-пароль из 12 слов и сохраните ее в безопасности. Эта кодовая фраза может восстановить все ваши кошельки и биткоины.\";\n\n\"Yes\" = \"Да\";\n\n\"You are making a payment to a reusable address. Make sure that the receiver can see the payment made to them. (All ArcBit reusable addresses are compatible with other ArcBit wallets)\" = \"Вы совершаете платеж на адрес многоразового использования. Убедитесь, что получатель может видеть отправленные ему платежи. (Все многоразовые адреса ArcBit совместимы с другими кошельками ArcBit)\";\n\n\"You have %@, but %@ is needed. (This includes the transactions fee)\" = \" вас есть %@, но необходимо %@. (Сюда уже включена комиссия по транзакции)\";\n\n\"You must exit and kill this app in order for this to take effect.\" = \"Вы должны выйти и закрыть это приложение, чтобы изменения вступили в силу.\";\n\n\"Your current wallet will be deleted. Your can restore your current wallet later with the wallet passphrase, but any imported accounts or addresses created in advanced mode cannot be recovered. Do you wish to continue?\" = \"Ваш текущий кошелек будет удален. Вы можете восстановить текущий кошелек с помощью восстановительной фразы-пароля, но любые импортированные учетные записи или адреса, созданные в расширенном режиме, не могут быть восстановлены. Вы хотите продолжить?\";\n\n\"Your iCloud backup was last saved on %@. Do you want to restore your wallet from iCloud or backup your local wallet to iCloud?\" = \"Ваша резервная копия iCloud была сохранена в последний раз на% @. Вы хотите восстановить свой кошелек из iCloud или создать резервную копию своего кошелька в iCloud?\";\n\n\"Your new transaction fee is too high\" = \"Ваша новая комиссия по транзакции слишком высокая\";\n\n\"Your wallet is now restored\" = \"Ваш кошелек восстановлен\";\n\n\"\\nAllow camera access in\\n Settings->Privacy->Camera->%@\" = \"\\nРазрешить доступ к камере в\\n настройки->Конфиденциальность->камера->%@\";\n\n\"\\tArcBit Web Wallet is a Chrome extension. It has all the features of the mobile wallet plus more. Highlights include the ability to create multiple wallets instead of just one, and a new non-cumbersome way to generate wallets, store and spend bitcoins all from cold storage! ArcBit's new way to manage your cold storage bitcoins also offers a more compelling reason to use ArcBit's watch account feature. Now you can safely watch the balance of your cold storage bitcoins by enabling advance mode in ArcBit and importing your cold storage account public keys.\\n\\tUse ArcBit Web Wallet in whatever way you wish. You can create a new wallet, or you can input your current 12 word backup passphrase to manage the same bitcoins across different devices. Check out the ArcBit Web Wallet in the Chrome Web Store for more details!\\n\" = \"\\tArcBit веб-кошелек - это расширение для Chrome. Он поддерживает все функции мобильного кошелька, а также многое другое. Из основного - возможность создания нескольких кошельков вместо одного, а также новый не громоздкий способ генерации кошельков, хранение и расчёты биткоинами из холодного хранения! Новый способ управления Вашими биткоинами с использованием холодного хранения ArcBit также предлагает более веские основания использовать функцию учетной записи ArcBit. Теперь Вы можете спокойно следить за балансом ваших биткоинов с холодным хранением, включив опционный режим в ArcBit и импортируя открытые ключи учетной записи холодного хранения.\\n\\tИспользуйте ArcBit веб-кошелек по-разному, как бы Вы хотели: Вы можете создать новый кошелек, или Вы можете ввести свою текущую восстановительную фразу-пароль, которая состоит из 12 слов для управления одними и теми же биткоинами на разных устройствах. Узнайте больше о веб-кошельке ArcBit в интернет-магазине Chrome.\\n\";\n\n\"\\tWith the Arcbit Brain Wallet you can safely spend your bitcoins without ever having your private keys be exposed to the internet. It can be use in conjunction with your Arcbit Wallet or as a stand alone wallet.\\n\" = \"\\tС Arcbit-мыслекошельком Вы можете безопасно тратить свои биткоины, не используя при этом Ваши личные ключи в Интернете. Его можно использовать в сочетании с вашим Arcbit-кошельком или оффлайн-кошельком.\\n\";\n\n\"iCloud Error: %@\" = \"Ошибка iCloud: %@\";\n\n\"iCloud backup found\" = \"Найдена резервная копия iCloud\";\n\n\"iCloud backup not found\" = \"Резервное копирование iCloud не найдено\";\n\n\"iCloud backup will be lost. Are you sure you want to backup your local wallet to iCloud?\" = \"Резервное копирование iCloud будет потеряно. Вы действительно хотите сделать резервную копию своего местного кошелька в iCloud?\";\n\n\"Wallet backup passphrase will be shown\" = \"Восстановительная фраза-пароль кошелька будет отображена\";\n\n\"Write down or memorize your wallet backup passphrase. If you lose your backup passphrase, your wallet cannot be recovered.\" = \"Запишите или запишите свою кодовую фразу. Если вы потеряете ключевую фразу для резервного копирования, ваш кошелек не может быть восстановлен.\";\n\n\"I understand\" = \"я понимаю\";\n\n\"iCloud support for ArcBit discontinued\" = \"Поддержка iCloud для ArcBit прекращена\";\n\n\"iCloud support for ArcBit is being discontinued. If your backup passphrase has not been backed up already, please do so.\" = \"Поддержка iCloud для ArcBit прекращается. Если ваша кодовая фраза резервного копирования еще не была скопирована, сделайте это.\";\n\n\"Reusable address payments are disabled until further notice.\" = \"Повторные платежи адресов отключены до дальнейшего уведомления.\";\n"
  },
  {
    "path": "ArcBit/ru.lproj/Main.strings",
    "content": "\n/* Class = \"UILabel\"; text = \"BTC\"; ObjectID = \"3XA-yE-mb3\"; */\n\"3XA-yE-mb3.text\" = \"BTC\";\n\n/* Class = \"UINavigationItem\"; title = \"Restore Wallet\"; ObjectID = \"4al-pX-1Gn\"; */\n\"4al-pX-1Gn.title\" = \"Restore Wallet\";\n\n/* Class = \"UITabBarItem\"; title = \"Send\"; ObjectID = \"4mb-2o-3A1\"; */\n\"4mb-2o-3A1.title\" = \"Send\";\n\n/* Class = \"UITabBarItem\"; title = \"Receive\"; ObjectID = \"4vC-pM-f1o\"; */\n\"4vC-pM-f1o.title\" = \"Receive\";\n\n/* Class = \"UILabel\"; text = \"Amount:\"; ObjectID = \"59b-yN-GFc\"; */\n\"59b-yN-GFc.text\" = \"Amount:\";\n\n/* Class = \"UILabel\"; text = \"Account Name\"; ObjectID = \"5EJ-8r-ive\"; */\n\"5EJ-8r-ive.text\" = \"Account Name\";\n\n/* Class = \"UILabel\"; text = \"Master Seed Hex\"; ObjectID = \"6BY-dx-fLW\"; */\n\"6BY-dx-fLW.text\" = \"Master Seed Hex\";\n\n/* Class = \"UITextField\"; placeholder = \"address\"; ObjectID = \"6V1-g4-Kqz\"; */\n\"6V1-g4-Kqz.placeholder\" = \"address\";\n\n/* Class = \"UILabel\"; text = \"Label\"; ObjectID = \"AHj-6Y-pf6\"; */\n\"AHj-6Y-pf6.text\" = \"Label\";\n\n/* Class = \"UINavigationItem\"; title = \"Root View Controller\"; ObjectID = \"AUN-mh-2Qy\"; */\n\"AUN-mh-2Qy.title\" = \"Root View Controller\";\n\n/* Class = \"UILabel\"; text = \"Wallet backup passphrase\"; ObjectID = \"C32-6S-BC5\"; */\n\"C32-6S-BC5.text\" = \"Wallet backup passphrase\";\n\n/* Class = \"UILabel\"; text = \"USD\"; ObjectID = \"DlS-FL-u3H\"; */\n\"DlS-FL-u3H.text\" = \"USD\";\n\n/* Class = \"UILabel\"; text = \"Enter this wallet's backup phrase to wipe it and start/restore another.\"; ObjectID = \"End-6K-7BJ\"; */\n\"End-6K-7BJ.text\" = \"Enter this wallet's backup phrase to wipe it and start/restore another.\";\n\n/* Class = \"UILabel\"; text = \"Account Name\"; ObjectID = \"GKZ-gr-jad\"; */\n\"GKZ-gr-jad.text\" = \"Account Name\";\n\n/* Class = \"UILabel\"; text = \"description\"; ObjectID = \"HDn-9v-o1a\"; */\n\"HDn-9v-o1a.text\" = \"description\";\n\n/* Class = \"UILabel\"; text = \"Label\"; ObjectID = \"JHD-rx-W8M\"; */\n\"JHD-rx-W8M.text\" = \"Label\";\n\n/* Class = \"UIButton\"; normalTitle = \"Contacts\"; ObjectID = \"JvL-Cg-kNK\"; */\n\"JvL-Cg-kNK.normalTitle\" = \"Contacts\";\n\n/* Class = \"UITabBarItem\"; title = \"Send\"; ObjectID = \"KIz-U8-UaX\"; */\n\"KIz-U8-UaX.title\" = \"Send\";\n\n/* Class = \"UIButton\"; normalTitle = \"Button\"; ObjectID = \"Koj-wy-VOb\"; */\n\"Koj-wy-VOb.normalTitle\" = \"Button\";\n\n/* Class = \"UILabel\"; text = \"100 Confimations\"; ObjectID = \"Lf7-5m-ufO\"; */\n\"Lf7-5m-ufO.text\" = \"100 Confimations\";\n\n/* Class = \"UITextView\"; text = \"f23324e18c237876f96d2064abbc26399cc3cd34d503cc6f2b00a9403b003dcad2cf7642e4e3311cf2e5de32307d88b116ac743f0b02fc4c2afe0e30dcd843f6\"; ObjectID = \"N96-Pu-vSQ\"; */\n\"N96-Pu-vSQ.text\" = \"f23324e18c237876f96d2064abbc26399cc3cd34d503cc6f2b00a9403b003dcad2cf7642e4e3311cf2e5de32307d88b116ac743f0b02fc4c2afe0e30dcd843f6\";\n\n/* Class = \"UILabel\"; text = \"Receive From:\"; ObjectID = \"OX8-v3-aou\"; */\n\"OX8-v3-aou.text\" = \"Receive From:\";\n\n/* Class = \"UILabel\"; text = \"Label\"; ObjectID = \"P5j-13-Jpg\"; */\n\"P5j-13-Jpg.text\" = \"Label\";\n\n/* Class = \"UILabel\"; text = \"Label\"; ObjectID = \"P8X-aW-lhi\"; */\n\"P8X-aW-lhi.text\" = \"Label\";\n\n/* Class = \"UILabel\"; text = \"date\"; ObjectID = \"RAj-d0-yzE\"; */\n\"RAj-d0-yzE.text\" = \"date\";\n\n/* Class = \"UILabel\"; text = \"From:\"; ObjectID = \"VQ0-4Z-YAo\"; */\n\"VQ0-4Z-YAo.text\" = \"From:\";\n\n/* Class = \"UINavigationItem\"; title = \"Manage Accounts\"; ObjectID = \"WPt-OD-Zry\"; */\n\"WPt-OD-Zry.title\" = \"Manage Accounts\";\n\n/* Class = \"UITextView\"; text = \"Loading...\"; ObjectID = \"YlR-nU-l4e\"; */\n\"YlR-nU-l4e.text\" = \"Loading...\";\n\n/* Class = \"UIButton\"; normalTitle = \"Review Payment\"; ObjectID = \"b97-9w-wKT\"; */\n\"b97-9w-wKT.normalTitle\" = \"Review Payment\";\n\n/* Class = \"UINavigationItem\"; title = \"Send\"; ObjectID = \"bCV-xP-8V6\"; */\n\"bCV-xP-8V6.title\" = \"Send\";\n\n/* Class = \"UILabel\"; text = \"Account Name\"; ObjectID = \"cmA-Xp-Fwi\"; */\n\"cmA-Xp-Fwi.text\" = \"Account Name\";\n\n/* Class = \"UILabel\"; text = \"Write down the 12 word passphrase below and keep it safe. You can restore your wallet with this single passphrase.\"; ObjectID = \"evC-L0-0Dc\"; */\n\"evC-L0-0Dc.text\" = \"Write down the 12 word passphrase below and keep it safe. You can restore your wallet with this single passphrase.\";\n\n/* Class = \"UITabBarItem\"; title = \"Receive\"; ObjectID = \"hWO-u0-HoS\"; */\n\"hWO-u0-HoS.title\" = \"Receive\";\n\n/* Class = \"UILabel\"; text = \"Label\"; ObjectID = \"i0i-6T-FsV\"; */\n\"i0i-6T-FsV.text\" = \"Label\";\n\n/* Class = \"UIButton\"; normalTitle = \"Scan QR\"; ObjectID = \"i9k-eB-RT8\"; */\n\"i9k-eB-RT8.normalTitle\" = \"Scan QR\";\n\n/* Class = \"UINavigationItem\"; title = \"History\"; ObjectID = \"kF7-DP-jfw\"; */\n\"kF7-DP-jfw.title\" = \"History\";\n\n/* Class = \"UINavigationItem\"; title = \"Help\"; ObjectID = \"m13-Co-pa3\"; */\n\"m13-Co-pa3.title\" = \"Help\";\n\n/* Class = \"UINavigationItem\"; title = \"Contacts\"; ObjectID = \"ob3-Xc-rR5\"; */\n\"ob3-Xc-rR5.title\" = \"Contacts\";\n\n/* Class = \"UITextView\"; text = \"nice muse brush descend pattern focus bleed college sneak calm leap flight\"; ObjectID = \"p18-DP-CtY\"; */\n\"p18-DP-CtY.text\" = \"nice muse brush descend pattern focus bleed college sneak calm leap flight\";\n\n/* Class = \"UIButton\"; normalTitle = \"Button\"; ObjectID = \"q2V-qX-91M\"; */\n\"q2V-qX-91M.normalTitle\" = \"Button\";\n\n/* Class = \"UILabel\"; text = \"Account Name\"; ObjectID = \"qKO-FH-M15\"; */\n\"qKO-FH-M15.text\" = \"Account Name\";\n\n/* Class = \"UINavigationItem\"; title = \"Receive\"; ObjectID = \"wZG-Zf-k4F\"; */\n\"wZG-Zf-k4F.title\" = \"Receive\";\n\n/* Class = \"UILabel\"; text = \"The master seed hex is derived from the passphrase. If you want to import Bitcoins into another wallet, and if that other wallets don't use BIP39, then it's possible to import the Bitcoins using the master seed hex as long as they support BIP44.\"; ObjectID = \"wjz-SH-FCO\"; */\n\"wjz-SH-FCO.text\" = \"The master seed hex is derived from the passphrase. If you want to import Bitcoins into another wallet, and if that other wallets don't use BIP39, then it's possible to import the Bitcoins using the master seed hex as long as they support BIP44.\";\n\n/* Class = \"UILabel\"; text = \"To:\"; ObjectID = \"xuQ-JE-0IT\"; */\n\"xuQ-JE-0IT.text\" = \"To:\";\n\n/* Class = \"UILabel\"; text = \"From:\"; ObjectID = \"yUe-8I-uLU\"; */\n\"yUe-8I-uLU.text\" = \"From:\";\n\n/* Class = \"UINavigationItem\"; title = \"Passphrase\"; ObjectID = \"zdP-16-weC\"; */\n\"zdP-16-weC.title\" = \"Passphrase\";\n"
  },
  {
    "path": "ArcBit/utils/TLColors.swift",
    "content": "//\n//  TLColors.swift\n//  ArcBit\n//\n//  Created by Timothy Lee on 3/14/15.\n//  Copyright (c) 2015 Timothy Lee <stequald01@gmail.com>\n//\n//   This library is free software; you can redistribute it and/or\n//   modify it under the terms of the GNU Lesser General Public\n//   License as published by the Free Software Foundation; either\n//   version 2.1 of the License, or (at your option) any later version.\n//\n//   This library is distributed in the hope that it will be useful,\n//   but WITHOUT ANY WARRANTY; without even the implied warranty of\n//   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n//   Lesser General Public License for more details.\n//\n//   You should have received a copy of the GNU Lesser General Public\n//   License along with this library; if not, write to the Free Software\n//   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,\n//   MA 02110-1301  USA\n\n\nimport Foundation\nimport UIKit\n\nclass TLColors {\n    struct Static {\n        static var color:UIColor? = nil\n    }\n    \n    class func mainAppColor() -> UIColor {\n        if Static.color == nil {\n            let r = 36.0/255.0\n            let g = 171/255.0\n            let b = 220/255.0\n            \n            Static.color = UIColor(red: CGFloat(r), green:CGFloat(g), blue:CGFloat(b), alpha:1)\n        }\n        return Static.color!\n    }\n    \n    class func mainAppOppositeColor() -> UIColor {\n        return UIColor.white\n    }\n    \n    class func evenTableViewCellColor() -> UIColor {\n        return UIColor.white\n    }\n    \n    class func oddTableViewCellColor() -> UIColor {\n        return UIColor.white\n    }\n}\n"
  },
  {
    "path": "ArcBit/utils/TLHUDWrapper.swift",
    "content": "//\n//  TLHUDWrapper.swift\n//  ArcBit\n//\n//  Created by Timothy Lee on 3/14/15.\n//  Copyright (c) 2015 Timothy Lee <stequald01@gmail.com>\n//\n//   This library is free software; you can redistribute it and/or\n//   modify it under the terms of the GNU Lesser General Public\n//   License as published by the Free Software Foundation; either\n//   version 2.1 of the License, or (at your option) any later version.\n//\n//   This library is distributed in the hope that it will be useful,\n//   but WITHOUT ANY WARRANTY; without even the implied warranty of\n//   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n//   Lesser General Public License for more details.\n//\n//   You should have received a copy of the GNU Lesser General Public\n//   License along with this library; if not, write to the Free Software\n//   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,\n//   MA 02110-1301  USA\n\nimport Foundation\nimport UIKit\n\nclass TLHUDWrapper {\n    struct STATIC_MEMBERS {\n        static var LOADING_BACKGROUND_VIEW_TAG = 618033\n        static var BACKGROUND_VIEW_ALPHA = 0.7\n    }\n    \n    class func showHUDAddedTo(_ view:UIView, labelText:String, animated:Bool) -> () {\n        let subView = UIView(frame: view.frame)\n        subView.backgroundColor = UIColor.black\n        subView.alpha = CGFloat(STATIC_MEMBERS.BACKGROUND_VIEW_ALPHA)\n        subView.tag = STATIC_MEMBERS.LOADING_BACKGROUND_VIEW_TAG\n        \n        AppDelegate.instance().window!.addSubview(subView)\n        \n        let hud = MBProgressHUD.showAdded(to: AppDelegate.instance().window, animated:animated)\n        hud?.labelText = labelText\n    }\n    \n    class func hideHUDForView(_ view:UIView, animated:(Bool)) -> () {\n        MBProgressHUD.hide(for: AppDelegate.instance().window, animated:true)\n        \n        for subview in AppDelegate.instance().window!.subviews {\n            if (subview.tag == STATIC_MEMBERS.LOADING_BACKGROUND_VIEW_TAG) {\n                subview.removeFromSuperview()\n                break\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "ArcBit/utils/TLMacros.swift",
    "content": "//\n//  TLMacros.swift\n//  ArcBit\n//\n//  Created by Timothy Lee on 3/14/15.\n//  Copyright (c) 2015 Timothy Lee <stequald01@gmail.com>\n//\n//   This library is free software; you can redistribute it and/or\n//   modify it under the terms of the GNU Lesser General Public\n//   License as published by the Free Software Foundation; either\n//   version 2.1 of the License, or (at your option) any later version.\n//\n//   This library is distributed in the hope that it will be useful,\n//   but WITHOUT ANY WARRANTY; without even the implied warranty of\n//   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n//   Lesser General Public License for more details.\n//\n//   You should have received a copy of the GNU Lesser General Public\n//   License along with this library; if not, write to the Free Software\n//   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,\n//   MA 02110-1301  USA\n\nimport Foundation\n\nfunc DLog(_ message: String, function: AnyObject) {\n#if DEBUG\n    if(function is NSObject) {\n    let obj = function as! NSObject\n    NSLog(String(format: message, obj))}\n    else {\n    NSLog(String(format: message, \"\"))\n    }\n#endif\n}\n\nfunc DLog(_ message: String) {\n#if DEBUG\n    NSLog(\"%@\", message)\n#endif\n}\n"
  },
  {
    "path": "ArcBit/utils/TLNotificationEvents.swift",
    "content": "//\n//  TLNotificationEvents.swift\n//  ArcBit\n//\n//  Created by Timothy Lee on 3/14/15.\n//  Copyright (c) 2015 Timothy Lee <stequald01@gmail.com>\n//\n//   This library is free software; you can redistribute it and/or\n//   modify it under the terms of the GNU Lesser General Public\n//   License as published by the Free Software Foundation; either\n//   version 2.1 of the License, or (at your option) any later version.\n//\n//   This library is distributed in the hope that it will be useful,\n//   but WITHOUT ANY WARRANTY; without even the implied warranty of\n//   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n//   Lesser General Public License for more details.\n//\n//   You should have received a copy of the GNU Lesser General Public\n//   License along with this library; if not, write to the Free Software\n//   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,\n//   MA 02110-1301  USA\n\n\nimport Foundation\n\nclass TLNotificationEvents {\n    class func EVENT_WALLET_PAYLOAD_UPDATED() -> String { return \"event.wallet.payload.updated\"}\n    class func EVENT_ACCOUNT_SELECTED() -> String { return \"event.account.selected\"}\n    class func EVENT_ADDRESS_SELECTED() -> String { return \"event.address.selected\"}\n    class func EVENT_PREFERENCES_FIAT_DISPLAY_CHANGED() -> String { return \"pref.fiatcurrencychanged\"}\n    class func EVENT_PREFERENCES_BITCOIN_DISPLAY_CHANGED() -> String { return \"pref.bitcoindisplaychanged\"}\n    class func EVENT_DISPLAY_LOCAL_CURRENCY_TOGGLED() -> String { return \"pref.displaylocalcurrencychanged\"}\n    class func EVENT_ADVANCE_MODE_TOGGLED() -> String { return \"pref.advancemode\"}\n    class func EVENT_FETCHED_ADDRESS() -> String { return \"api.address\"}\n    class func EVENT_FETCHED_ADDRESSES_DATA() -> String { return \"api.multiaddress\"}\n    class func EVENT_NEW_UNCONFIRMED_TRANSACTION() -> String { return \"api.newunconfirmedtx\"}\n    class func EVENT_NEW_BLOCK() -> String { return \"api.newblock\"}\n    class func EVENT_TRANSACTION_LISTENER_OPEN() -> String { return \"api.transaction.listener.open\"}\n    class func EVENT_TRANSACTION_LISTENER_CLOSE() -> String { return \"api.transaction.listener.close\"}\n    class func EVENT_STEALTH_PAYMENT_LISTENER_OPEN() -> String { return \"api.stealth.payment.listener.open\"}\n    class func EVENT_STEALTH_PAYMENT_LISTENER_CLOSE() -> String { return \"api.stealth.payment.listener.close\"}\n    class func EVENT_RECEIVED_STEALTH_CHALLENGE() -> String { return \"api.stealth.challenge\"}\n    class func EVENT_RECEIVED_STEALTH_ADDRESS_SUBSCRIPTION() -> String { return \"api.stealth.address.subscription\"}\n    class func EVENT_RECEIVED_STEALTH_PAYMENT() -> String { return \"api.stealth.payment\"}\n    class func EVENT_EXCHANGE_RATE_UPDATED() -> String { return \"api.updated.exchangerate\"}\n    class func EVENT_MODEL_UPDATED_NEW_UNCONFIRMED_TRANSACTION() -> String { return \"model.updated.newunconfirmedtx\"}\n    class func EVENT_MODEL_UPDATED_NEW_BLOCK() -> String { return \"model.updated.newblock\"}\n    class func EVENT_NEW_ADDRESS_GENERATED() -> String { return \"app.newaddressgenerated\"}\n    class func EVENT_UPDATED_RECEIVING_ADDRESSES() -> String { return \"app.updatedreceivingaddresses\"}\n    class func EVENT_VIEW_QR_CODE_PRIVATE_KEY() -> String { return \"trigger.feature.qrcode.private.key\"}\n    class func EVENT_VIEW_QR_CODE_ADDRESS() -> String { return \"trigger.feature.qrcode.address\"}\n    class func EVENT_VIEW_QR_CODE_EXTENDED_PRIVATE_KEY() -> String { return \"trigger.feature.qrcode.extended.private.key\"}\n    class func EVENT_VIEW_QR_CODE_EXTENDED_PUBLIC_KEY() -> String { return \"trigger.feature.qrcode.extended.public.key\"}\n    class func EVENT_VIEW_QR_CODE_ACCOUNT_ADDRESSES() -> String { return \"trigger.feature.qrcode.private.key\"}\n    class func EVENT_VIEW_QR_CODE_ACCOUNT_ADDRESSES_WEBVIEW() -> String { return \"trigger.feature.qrcode.private.key\"}\n    class func EVENT_ENTER_MNEMONIC_VIEWCONTROLLER_DISMISSED() -> String {return \"EnterMnemonicViewControllerDismissed\"}\n    class func EVENT_SEND_SCREEN_LOADING() -> String { return \"event.feature.send.screen.loading\"}\n    class func EVENT_VIEW_SEND_SCREEN() -> String { return \"event.view.send.screen\"}\n    class func EVENT_VIEW_RECEIVE_SCREEN() -> String { return \"event.view.receive.screen\"}\n    class func EVENT_VIEW_ACCOUNTS_SCREEN() -> String { return \"event.view.accounts!.screen\"}\n    class func EVENT_VIEW_MANAGE_ACCOUNTS_SCREEN() -> String { return \"event.view.manageaccounts.screen\"}\n    class func EVENT_VIEW_HELP_SCREEN() -> String { return \"event.view.help.screen\"}\n    class func EVENT_VIEW_COLD_WALLET_SCREEN() -> String { return \"event.view.cold.wallet.screen\"}\n    class func EVENT_VIEW_SETTINGS_SCREEN() -> String { return \"event.view.settings.screen\"}\n    class func EVENT_HAMBURGER_MENU_OPENED() -> String { return \"event.feature.hamburger.menu.opened\"}\n    class func EVENT_HAMBURGER_MENU_CLOSED() -> String { return \"event.feature.hamburger.menu.closed\"}\n    class func EVENT_SEND_PAYMENT () -> String { return \"event.send.payment\"}\n    class func EVENT_RECEIVE_PAYMENT () -> String { return \"event.receive.payment\"}\n    class func EVENT_RECEIVE_PAYMENT_FROM_STEALTH_ADDRESS () -> String { return \"event.receive.payment.from.stealth.address\"}\n    class func EVENT_VIEW_HISTORY () -> String { return \"event.view.history.screen\"}\n    class func EVENT_CREATE_NEW_ACCOUNT() -> String { return \"event.create.new.account\"}\n    class func EVENT_EDIT_ACCOUNT_NAME() -> String { return \"event.edit.account.name\"}\n    class func EVENT_ARCHIVE_ACCOUNT () -> String { return \"event.archive.account\"}\n    class func EVENT_ENABLE_PIN_CODE () -> String { return \"event.enable.pin.code\"}\n    class func EVENT_BACKUP_PASSPHRASE () -> String { return \"event.backup.passphrase\"}\n    class func EVENT_RESTORE_WALLET() -> String { return \"event.restorewallet\"}\n    class func EVENT_ADD_TO_ADDRESS_BOOK () -> String { return \"event.add.to.address.book\"}\n    class func EVENT_EDIT_ENTRY_ADDRESS_BOOK () -> String { return \"event.edit.entry.address.book\"}\n    class func EVENT_DELETE_ENTRY_ADDRESS_BOOK () -> String { return \"event.delete.entry.address.book\"}\n    class func EVENT_SEND_TO_ADDRESS_IN_ADDRESS_BOOK () -> String { return \"event.send.to.address.in.address.book\"}\n    class func EVENT_TAG_TRANSACTION () -> String { return \"event.label.trasaction\"}\n    class func EVENT_TOGGLE_AUTOMATIC_TX_FEE () -> String { return \"event.toggle.automatic.transaction.fee\"}\n    class func EVENT_CHANGE_AUTOMATIC_TX_FEE () -> String { return \"event.change.automatic.transaction.fee\"}\n    class func EVENT_VIEW_ACCOUNT_ADDRESSES() -> String { return \"event.view.account.addresses\"}\n    class func EVENT_VIEW_ACCOUNT_ADDRESS() -> String { return \"event.view.account.address\"}\n    class func EVENT_VIEW_ACCOUNT_ADDRESS_IN_WEB() -> String { return \"event.view.account.address.web\"}\n    class func EVENT_VIEW_TRANSACTION_IN_WEB() -> String { return \"event.view.transaction.web\"}\n    class func EVENT_ENABLE_ADVANCE_MODE() -> String { return \"event.view.enable.advance.mode\"}\n    class func EVENT_IMPORT_COLD_WALLET_ACCOUNT() -> String { return \"event.import.cold.wallet.account\"}\n    class func EVENT_IMPORT_ACCOUNT() -> String { return \"event.import.account\"}\n    class func EVENT_IMPORT_WATCH_ONLY_ACCOUNT() -> String { return \"event.import.watch.only.account\"}\n    class func EVENT_IMPORT_PRIVATE_KEY() -> String { return \"event.import.private.key\"}\n    class func EVENT_IMPORT_WATCH_ONLY_ADDRESS() -> String { return \"event.import.watch.only.addresss\"}\n    class func EVENT_CHANGE_BLOCKEXPLORER_TYPE() -> String { return \"event.change.blockexplorer.type\"}\n    class func EVENT_VIEW_EXTENDED_PUBLIC_KEY() -> String { return \"event.view.extended.public.key\"}\n    class func EVENT_VIEW_EXTENDED_PRIVATE_KEY() -> String { return \"event.view.extended.private.key\"}\n    class func EVENT_VIEW_ACCOUNT_PRIVATE_KEY() -> String { return \"event.view.account.private.key\"}\n}\n"
  },
  {
    "path": "ArcBit/utils/TLPrompts.swift",
    "content": "//\n//  TLPrompts.swift\n//  ArcBit\n//\n//  Created by Timothy Lee on 3/14/15.\n//  Copyright (c) 2015 Timothy Lee <stequald01@gmail.com>\n//\n//   This library is free software; you can redistribute it and/or\n//   modify it under the terms of the GNU Lesser General Public\n//   License as published by the Free Software Foundation; either\n//   version 2.1 of the License, or (at your option) any later version.\n//\n//   This library is distributed in the hope that it will be useful,\n//   but WITHOUT ANY WARRANTY; without even the implied warranty of\n//   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n//   Lesser General Public License for more details.\n//\n//   You should have received a copy of the GNU Lesser General Public\n//   License along with this library; if not, write to the Free Software\n//   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,\n//   MA 02110-1301  USA\n\n\nimport Foundation\nimport UIKit\n\nclass TLPrompts {\n    \n    typealias EnterPINSuccess = () -> ()\n    typealias EnterPINFailure = (Bool) -> ()\n    typealias Failure = (Bool) -> ()\n    typealias UserInputCallback = (String!) -> ()\n    \n    class func promptAlertController(_ vc: UIViewController, title: String, message: String, okText: String, cancelTx: String,\n        success: @escaping TLWalletUtils.Success\n        , failure: @escaping Failure) -> () {\n            UIAlertController.showAlert(in: vc,\n                withTitle: title,\n                message: message,\n                cancelButtonTitle: cancelTx,\n                destructiveButtonTitle: nil,\n                otherButtonTitles: [okText],\n                \n                tap: {(alertView, action, buttonIndex) in\n                    if (buttonIndex == alertView?.firstOtherButtonIndex) {\n                        success()\n                    } else if (buttonIndex == alertView?.cancelButtonIndex) {\n                        failure(true)\n                    }\n            })\n    }\n    \n    class func promtForInputText(_ vc:UIViewController, title: String, message: String,\n        textFieldPlaceholder: String?,\n        success: @escaping UserInputCallback\n        , failure: @escaping Failure) -> () {\n            UIAlertController.showAlert(in: vc,\n                withTitle: title,\n                message: message,\n                preferredStyle: .alert,\n                cancelButtonTitle: TLDisplayStrings.CANCEL_STRING(),\n                destructiveButtonTitle: nil,\n                otherButtonTitles: [TLDisplayStrings.OK_STRING()],\n                preShow: {(controller) in\n                    func addPromptTextField(_ textField: UITextField!){\n                        textField.placeholder = textFieldPlaceholder\n                    }\n                    controller!.addTextField(configurationHandler: addPromptTextField)\n                }\n                ,\n                tap: {(alertView, action, buttonIndex) in\n                    if (buttonIndex == alertView!.firstOtherButtonIndex) {\n                        let inputedText = (alertView!.textFields![0] ).text\n                        success(inputedText)\n                    } else if (buttonIndex == alertView!.cancelButtonIndex) {\n                        failure(true)\n                    }\n            })\n            \n    }\n    \n    class func promtForOKCancel(_ vc: UIViewController, title: String, message: String,\n        success: @escaping TLWalletUtils.Success\n        , failure: @escaping Failure) -> () {\n            UIAlertController.showAlert(in: vc,\n                withTitle: title,\n                message: message,\n                cancelButtonTitle: TLDisplayStrings.CANCEL_STRING(),\n                destructiveButtonTitle: nil,\n                otherButtonTitles: [TLDisplayStrings.OK_STRING()],\n                \n                tap: {(alertView, action, buttonIndex) in\n                    if (buttonIndex == alertView!.firstOtherButtonIndex) {\n                        success()\n                    } else if (buttonIndex == alertView!.cancelButtonIndex) {\n                        failure(true)\n                    }\n            })\n    }\n    \n    class func promptWithOneButton(_ vc: UIViewController, title: String, message: String, buttonText: String,\n                                success: @escaping TLWalletUtils.Success) -> () {\n        UIAlertController.showAlert(in: vc,\n                                    withTitle: title,\n                                    message: message,\n                                    cancelButtonTitle: buttonText,\n                                    destructiveButtonTitle: nil,\n                                    otherButtonTitles: [],\n                                    tap: {(alertView, action, buttonIndex) in\n                                        success()\n        })\n    }\n    \n    class func promtForOK(_ vc:UIViewController, title: String, message: String,\n        success: @escaping TLWalletUtils.Success) -> () {\n            UIAlertController.showAlert(in: vc,\n                withTitle: title,\n                message: message,\n                cancelButtonTitle: nil,\n                destructiveButtonTitle: nil,\n                otherButtonTitles: [TLDisplayStrings.OK_STRING()],\n                \n                tap: {(alertView, action, buttonIndex) in\n                    success()\n            })\n    }\n    \n    \n    class func promptForTempararyImportPrivateKey(_ viewController: UIViewController, success: @escaping TLWalletUtils.SuccessWithString, error: @escaping TLWalletUtils.ErrorWithString) -> () {\n        UIAlertController.showAlert(in: viewController,\n            withTitle: TLDisplayStrings.PRIVATE_KEY_MISSING_STRING(),\n            message: TLDisplayStrings.DO_YOU_WANT_TO_TEMPORARY_IMPORT_YOUR_PRIVATE_KEY_STRING(),\n            cancelButtonTitle: TLDisplayStrings.NO_STRING(),\n            destructiveButtonTitle: nil,\n            otherButtonTitles: [TLDisplayStrings.YES_STRING()],\n            tap: {(alertView, action, buttonIndex) in\n                if (buttonIndex == alertView?.firstOtherButtonIndex) {\n                    UIAlertController.showAlert(in: viewController,\n                                                withTitle: \"\",\n                                                message:\"\",\n                                                preferredStyle: .actionSheet,\n                                                cancelButtonTitle: TLDisplayStrings.CANCEL_STRING(),\n                                                destructiveButtonTitle: nil,\n                                                otherButtonTitles: [TLDisplayStrings.IMPORT_WITH_QR_CODE_STRING(), TLDisplayStrings.IMPORT_WITH_TEXT_INPUT_STRING()],\n                                                tap: {(actionSheet, action, buttonIndex) in\n                                                    if (buttonIndex == (actionSheet?.firstOtherButtonIndex)! + 0) {\n                                                        AppDelegate.instance().showPrivateKeyReaderController(viewController, success: {\n                                                            (data: NSDictionary) in\n                                                            let encryptedPrivateKey = data.object(forKey: \"encryptedPrivateKey\") as? String\n                                                            if encryptedPrivateKey == nil {\n                                                                success(data.object(forKey: \"privateKey\") as? String)\n                                                            }\n                                                        }, error: {\n                                                            (data: String?) in\n                                                            error(data)\n                                                        })\n                                                    } else if (buttonIndex == (actionSheet?.firstOtherButtonIndex)! + 1) {\n                                                        TLPrompts.promtForInputText(viewController, title: TLDisplayStrings.TEMPORARY_IMPORT_PRIVATE_KEY_STRING(), message: \"\", textFieldPlaceholder: nil, success: {\n                                                            (inputText: String!) in\n                                                            success(inputText)\n                                                        }, failure: {\n                                                            (cancelled: Bool) in\n                                                        })\n                                                    } else if (buttonIndex == actionSheet?.cancelButtonIndex) {\n                                                    }\n                    })\n                } else if (buttonIndex == alertView?.cancelButtonIndex) {\n                    error(\"\")\n                }\n        })\n    }\n    \n    class func promptForTempararyImportExtendedPrivateKey(_ viewController: UIViewController, success: @escaping TLWalletUtils.SuccessWithString, error: @escaping TLWalletUtils.ErrorWithString) -> () {\n        UIAlertController.showAlert(in: viewController,\n            withTitle:  TLDisplayStrings.ACCOUNT_PRIVATE_KEY_MISSING_STRING(),\n            message: TLDisplayStrings.ASK_TEMPORARY_IMPORT_ACCOUNT_PRIVATE_KEY_STRING(),\n            cancelButtonTitle: TLDisplayStrings.NO_STRING(),\n            destructiveButtonTitle: nil,\n            otherButtonTitles: [TLDisplayStrings.YES_STRING()],\n            tap: {(alertView, action, buttonIndex) in\n                if (buttonIndex == alertView?.firstOtherButtonIndex) {                    \n                    UIAlertController.showAlert(in: viewController,\n                                                withTitle: \"\",\n                                                message:\"\",\n                                                preferredStyle: .actionSheet,\n                                                cancelButtonTitle: TLDisplayStrings.CANCEL_STRING(),\n                                                destructiveButtonTitle: nil,\n                                                otherButtonTitles: [TLDisplayStrings.IMPORT_WITH_QR_CODE_STRING(), TLDisplayStrings.IMPORT_WITH_TEXT_INPUT_STRING()],\n                                                tap: {(actionSheet, action, buttonIndex) in\n                                                    if (buttonIndex == (actionSheet?.firstOtherButtonIndex)! + 0) {\n                                                        AppDelegate.instance().showExtendedPrivateKeyReaderController(viewController, success: {\n                                                            (data: String!) in\n                                                            success(data)\n                                                        }, error: {\n                                                            (data: String?) in\n                                                            error(data)\n                                                        })\n                                                    } else if (buttonIndex == (actionSheet?.firstOtherButtonIndex)! + 1) {\n                                                        TLPrompts.promtForInputText(viewController, title:TLDisplayStrings.TEMPORARY_IMPORT_ACCOUNT_PRIVATE_KEY_STRING(), message: TLDisplayStrings.INPUT_ACCOUNT_PRIVATE_KEY_STRING(), textFieldPlaceholder: nil, success: {\n                                                            (inputText: String!) in\n                                                            success(inputText)\n                                                        }, failure: {\n                                                            (cancelled: Bool) in\n                                                        })\n                                                    } else if (buttonIndex == actionSheet?.cancelButtonIndex) {\n                                                    }\n                    })\n                } else if (buttonIndex == alertView?.cancelButtonIndex) {\n                    error(\"\")\n                }\n        })\n    }\n    \n    class func promptForEncryptedPrivKeyPassword(_ vc:UIViewController, view: UIView, encryptedPrivKey: String, success: @escaping UserInputCallback, failure: @escaping Failure) -> () {\n        UIAlertController.showAlert(in: vc,\n            withTitle: TLDisplayStrings.ENTER_PASSWORD_FOR_ENCRYPTED_PRIVATE_KEY_STRING(),\n            message: \"\",\n            preferredStyle: .alert,\n            cancelButtonTitle: TLDisplayStrings.CANCEL_STRING(),\n            destructiveButtonTitle: nil,\n            otherButtonTitles: [TLDisplayStrings.OK_STRING()],\n            preShow: {(controller) in\n                func addPromptTextField(_ textField: UITextField!){\n                    textField.placeholder = TLDisplayStrings.PASSWORD_STRING()\n                }\n                controller!.addTextField(configurationHandler: addPromptTextField)\n            },\n            tap: {(alertView, action, buttonIndex) in\n                if (buttonIndex == alertView!.firstOtherButtonIndex) {\n                    TLHUDWrapper.showHUDAddedTo(view, labelText: TLDisplayStrings.DECRYPTING_PRIVATE_KEY_STRING(), animated: true)\n                    \n                    let password = (alertView!.textFields![0] ).text\n                    \n                    DispatchQueue.global(priority: DispatchQueue.GlobalQueuePriority.high).async {\n                        let privKey = TLCoreBitcoinWrapper.privateKeyFromEncryptedPrivateKey(encryptedPrivKey, password: password!, isTestnet: AppDelegate.instance().appWallet.walletConfig.isTestnet)\n                        DispatchQueue.main.async {\n                            TLHUDWrapper.hideHUDForView(view, animated: true)\n                            \n                            if (privKey != nil) {\n                                success(privKey)\n                            } else {\n                                UIAlertController.showAlert(in: vc,\n                                    withTitle: TLDisplayStrings.INVALID_PASSPHRASE_STRING(),\n                                    message: \"\",\n                                    cancelButtonTitle: TLDisplayStrings.CANCEL_STRING(),\n                                    destructiveButtonTitle: nil,\n                                    \n                                    otherButtonTitles: [TLDisplayStrings.RETRY_STRING()],\n                                    \n                                    tap: {(alertView, action, buttonIndex) in\n                                        if (buttonIndex == alertView!.firstOtherButtonIndex) {\n                                            self.promptForEncryptedPrivKeyPassword(vc, view:view, encryptedPrivKey: encryptedPrivKey, success: success, failure: failure)\n                                        } else if (buttonIndex == alertView!.cancelButtonIndex) {\n                                            failure(true)\n                                        }\n                                })\n                            }\n                        }\n                    }\n                } else if (buttonIndex == alertView!.cancelButtonIndex) {\n                    failure(true)\n                }\n        })\n    }\n    \n    class func promptSuccessMessage(_ title: String?, message: String) -> () {\n        let av = UIAlertView(title: title ?? \"\",\n            message: message,\n            delegate: nil,\n            cancelButtonTitle: nil,\n            otherButtonTitles: TLDisplayStrings.OK_STRING())\n        \n        av.show()\n    }\n    \n    class func promptErrorMessage(_ title: String, message: String) -> () {\n        let av = UIAlertView(title: title,\n            message: message,\n            delegate: nil,\n            cancelButtonTitle: nil,\n            otherButtonTitles: TLDisplayStrings.OK_STRING())\n        \n        av.show()\n    }\n}\n"
  },
  {
    "path": "ArcBit/utils/TLQRImageModal.swift",
    "content": "//\n//  TLQRImageModal.swift\n//  ArcBit\n//\n//  Created by Timothy Lee on 3/14/15.\n//  Copyright (c) 2015 Timothy Lee <stequald01@gmail.com>\n//\n//   This library is free software; you can redistribute it and/or\n//   modify it under the terms of the GNU Lesser General Public\n//   License as published by the Free Software Foundation; either\n//   version 2.1 of the License, or (at your option) any later version.\n//\n//   This library is distributed in the hope that it will be useful,\n//   but WITHOUT ANY WARRANTY; without even the implied warranty of\n//   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n//   Lesser General Public License for more details.\n//\n//   You should have received a copy of the GNU Lesser General Public\n//   License along with this library; if not, write to the Free Software\n//   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,\n//   MA 02110-1301  USA\n\nimport Foundation\nimport UIKit\n\n@objc class TLQRImageModal:NSObject {\n    \n    fileprivate let alertView:CustomIOS7AlertView\n    let QRcodeDisplayData:String\n    \n    init(data:NSString, buttonCopyText:(String), vc:(UIViewController)) {\n        QRcodeDisplayData = data as String\n        \n        let QR_CODE_IMAGE_DIMENSION_IPHONE = CGFloat(300.0)\n        let QR_CODE_IMAGE_DIMENSION_IPAD = CGFloat(450.0)\n        \n        let DATA_LABEL_HEIGHT_IPHONE = CGFloat(60.0)\n        let DATA_LABEL_HEIGHT_IPAD = CGFloat(120.0)\n        \n        let QRCodeImageDimension:CGFloat\n        let dataLabelHeight:CGFloat\n        if (UIDevice.current.userInterfaceIdiom == .phone) {\n            QRCodeImageDimension = QR_CODE_IMAGE_DIMENSION_IPHONE\n            dataLabelHeight = DATA_LABEL_HEIGHT_IPHONE\n        } else {\n            QRCodeImageDimension = QR_CODE_IMAGE_DIMENSION_IPAD\n            dataLabelHeight = DATA_LABEL_HEIGHT_IPAD\n        }\n        \n        let containerView = UIView(frame:CGRect(x: 0, y: 0,\n            width: QRCodeImageDimension,\n            height: QRCodeImageDimension+dataLabelHeight))\n        \n        \n        let QRCodeImage = TLWalletUtils.getQRCodeImage(data as String, imageDimension:Int(QRCodeImageDimension))\n        let qrCodeImageView = UIImageView(frame: CGRect(x: 0, y: 0,\n            width: QRCodeImageDimension,\n            height: QRCodeImageDimension))\n        qrCodeImageView.image = QRCodeImage\n        \n        containerView.addSubview(qrCodeImageView)\n        \n        alertView = CustomIOS7AlertView()\n        \n        let titleLabel = UITextView(frame:CGRect(x: 0, y: QRCodeImageDimension, width: QRCodeImageDimension, height: dataLabelHeight))\n        titleLabel.text = data as String\n        titleLabel.textAlignment = .center\n        \n        titleLabel.isUserInteractionEnabled = false\n        titleLabel.backgroundColor = TLColors.mainAppColor()\n        titleLabel.textColor = TLColors.mainAppOppositeColor()\n        titleLabel.layer.cornerRadius = 5.0\n        \n        containerView.addSubview(titleLabel)\n        \n        alertView.containerView = containerView\n        alertView.buttonTitles = [buttonCopyText, TLDisplayStrings.DISMISS_STRING()]\n        \n        //TODO: refactor, find cleaner way to do this\n        if (vc is TLManageAccountsViewController) {\n            alertView.delegate = vc as! TLManageAccountsViewController\n        } else if (vc is TLAddressListViewController) {\n            alertView.delegate = vc as! TLAddressListViewController\n        } else if (vc is TLCreateColdWalletViewController) {\n            alertView.delegate = vc as! TLCreateColdWalletViewController\n        } else if (vc is TLAuthorizeColdWalletPaymentViewController) {\n            alertView.delegate = vc as! TLAuthorizeColdWalletPaymentViewController\n        } else if (vc is TLBrainWalletViewController) {\n            alertView.delegate = vc as! TLBrainWalletViewController\n        } else if (vc is TLReviewPaymentViewController) {\n            alertView.delegate = vc as! TLReviewPaymentViewController\n        }\n    }\n    \n    func show() -> () {\n        alertView.show()\n        NotificationCenter.default.addObserver(self, selector:#selector(TLQRImageModal.dismissDialog(_:)), name:NSNotification.Name.UIApplicationDidEnterBackground, object:nil)\n    }\n    \n    func dismissDialog(_ notification: Notification) -> () {\n        for subview in alertView.dialogView.subviews {\n            if (subview is UIButton) {\n                let button = subview as! UIButton\n                if (button.titleLabel!.text == TLDisplayStrings.DISMISS_STRING()) {\n                    button.sendActions(for: .touchUpInside)\n                }\n            }\n        }\n    }\n    \n    deinit {\n        NotificationCenter.default.removeObserver(self, name:NSNotification.Name.UIApplicationDidEnterBackground, object:nil)\n    }\n}\n"
  },
  {
    "path": "ArcBit/utils/TLStringLocalized.swift",
    "content": "//\n//  TLMacros.swift\n//  ArcBit\n//\n//  Created by Timothy Lee on 3/14/15.\n//  Copyright (c) 2015 Timothy Lee <stequald01@gmail.com>\n//\n//   This library is free software; you can redistribute it and/or\n//   modify it under the terms of the GNU Lesser General Public\n//   License as published by the Free Software Foundation; either\n//   version 2.1 of the License, or (at your option) any later version.\n//\n//   This library is distributed in the hope that it will be useful,\n//   but WITHOUT ANY WARRANTY; without even the implied warranty of\n//   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n//   Lesser General Public License for more details.\n//\n//   You should have received a copy of the GNU Lesser General Public\n//   License along with this library; if not, write to the Free Software\n//   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,\n//   MA 02110-1301  USA\n\nimport Foundation\n\nextension String {\n    var localized: String {\n        return NSLocalizedString(self, tableName: nil, bundle: Bundle.main, value: \"\", comment: \"\")\n    }\n    \n    func localizedWithComment(_ comment:String) -> String {\n        return NSLocalizedString(self, tableName: nil, bundle: Bundle.main, value: \"\", comment: comment)\n    }\n}\n"
  },
  {
    "path": "ArcBit/utils/TLUpdateAppData.swift",
    "content": "//\n//  TLUpdateAppData.swift\n//  ArcBit\n//\n//  Created by Tim Lee on 8/20/15.\n//  Copyright (c) 2015 ArcBit. All rights reserved.\n//\n\nimport Foundation\n\nclass TLUpdateAppData {\n    struct STATIC_MEMBERS {\n        static var instance:TLUpdateAppData?\n    }\n    \n    var beforeUpdatedAppVersion: String? = nil\n    \n    class func instance() -> (TLUpdateAppData) {\n        if(STATIC_MEMBERS.instance == nil) {\n            STATIC_MEMBERS.instance = TLUpdateAppData()\n        }\n        return STATIC_MEMBERS.instance!\n    }\n}\n"
  },
  {
    "path": "ArcBit/utils/TLUtils.swift",
    "content": "//\n//  TLUtils.swift\n//  ArcBit\n//\n//  Created by Timothy Lee on 3/14/15.\n//  Copyright (c) 2015 Timothy Lee <stequald01@gmail.com>\n//\n//   This library is free software; you can redistribute it and/or\n//   modify it under the terms of the GNU Lesser General Public\n//   License as published by the Free Software Foundation; either\n//   version 2.1 of the License, or (at your option) any later version.\n//\n//   This library is distributed in the hope that it will be useful,\n//   but WITHOUT ANY WARRANTY; without even the implied warranty of\n//   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n//   Lesser General Public License for more details.\n//\n//   You should have received a copy of the GNU Lesser General Public\n//   License along with this library; if not, write to the Free Software\n//   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,\n//   MA 02110-1301  USA\n\n\nimport Foundation\n\nclass TLUtils {\n\n    class func getiOSVersion() -> Int {\n        let versionArray = UIDevice.current.systemVersion.components(separatedBy: \".\")\n        return (versionArray[0] as NSString).integerValue\n    }\n    \n    //TODO: better way\n    class func isIPhone5() -> Bool {\n        return UIScreen.main.bounds.size.height == 568\n    }\n    class func isIPhone4() -> Bool {\n        return UIScreen.main.bounds.size.height == 480\n    }\n    \n    class func defaultAppName() -> String {\n        return \"ArcBit\"\n    }\n    \n    class func daysSinceDate(_ date: Date) -> Int {\n        let nowDate:Date = Date()\n        let calendar: Calendar = Calendar.current\n        let dateComponents = calendar.dateComponents([Calendar.Component.day], from: calendar.startOfDay(for: date), to: calendar.startOfDay(for: nowDate))\n        return dateComponents.day!\n    }\n    \n    class func dictionaryToJSONString(_ prettyPrint: Bool, dict: NSDictionary) -> String {\n        let jsonData: Data?\n        do {\n            jsonData = try JSONSerialization.data(withJSONObject: dict,\n                        options: (prettyPrint ? JSONSerialization.WritingOptions.prettyPrinted : JSONSerialization.WritingOptions(rawValue: 0)) as JSONSerialization.WritingOptions)\n        } catch _ as NSError {\n            jsonData = nil\n        }\n        assert(jsonData != nil, \"jsonData not valid\")\n        return NSString(data: jsonData!, encoding: String.Encoding.utf8.rawValue)! as String\n    }\n    \n    class func JSONStringToDictionary(_ jsonString: String) -> NSDictionary {\n        var error: NSError? = nil\n        let jsonData = jsonString.data(using: String.Encoding.utf8)\n        let jsonDict:Any?\n        do {\n            jsonDict = try JSONSerialization.jsonObject(with: jsonData!,\n                        options: JSONSerialization.ReadingOptions.mutableContainers)\n        } catch let error1 as NSError {\n            error = error1\n            jsonDict = nil\n        }\n        assert(error == nil, \"Invalid JSON string\")\n        return jsonDict as! NSDictionary\n    }\n}\n"
  },
  {
    "path": "ArcBit/utils/TransitionDelegate.swift",
    "content": "//\n//  TransitionDelegate.swift\n//  ArcBit\n//\n//  Created by Timothy Lee on 3/14/15.\n//  Copyright (c) 2015 Timothy Lee <stequald01@gmail.com>\n//\n//   This library is free software; you can redistribute it and/or\n//   modify it under the terms of the GNU Lesser General Public\n//   License as published by the Free Software Foundation; either\n//   version 2.1 of the License, or (at your option) any later version.\n//\n//   This library is distributed in the hope that it will be useful,\n//   but WITHOUT ANY WARRANTY; without even the implied warranty of\n//   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n//   Lesser General Public License for more details.\n//\n//   You should have received a copy of the GNU Lesser General Public\n//   License along with this library; if not, write to the Free Software\n//   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,\n//   MA 02110-1301  USA\n\nimport UIKit\n\nclass TransitionDelegate: NSObject, UIViewControllerTransitioningDelegate {\n    \n    func animationController(forPresented presented: UIViewController, presenting: UIViewController, source: UIViewController) -> UIViewControllerAnimatedTransitioning? {\n        return nil;\n    }\n    \n    func animationController(forDismissed dismissed: UIViewController) -> UIViewControllerAnimatedTransitioning? {\n        return nil;\n    }\n}\n\n"
  },
  {
    "path": "ArcBit/utils/UINavigationController+StatusBarStyle.swift",
    "content": "//\n//  UINavigationController+StatusBarStyle.swift\n//  ArcBit\n//\n//  Created by Timothy Lee on 3/14/15.\n//  Copyright (c) 2015 Timothy Lee <stequald01@gmail.com>\n//\n//   This library is free software; you can redistribute it and/or\n//   modify it under the terms of the GNU Lesser General Public\n//   License as published by the Free Software Foundation; either\n//   version 2.1 of the License, or (at your option) any later version.\n//\n//   This library is distributed in the hope that it will be useful,\n//   but WITHOUT ANY WARRANTY; without even the implied warranty of\n//   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n//   Lesser General Public License for more details.\n//\n//   You should have received a copy of the GNU Lesser General Public\n//   License along with this library; if not, write to the Free Software\n//   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,\n//   MA 02110-1301  USA\n\n\nimport Foundation\nimport UIKit\n\nextension UINavigationController {\n    // work around to get status bar text color to be white: http://stackoverflow.com/a/21433339/299648\n    open override var preferredStatusBarStyle : UIStatusBarStyle {\n        return UIStatusBarStyle.lightContent\n    }\n}\n"
  },
  {
    "path": "ArcBit/utils/UIView+FormScroll.swift",
    "content": "//\n//  UIView+FormScroll.swift\n//  ArcBit\n//\n//  Created by Timothy Lee on 3/14/15.\n//  Copyright (c) 2015 Timothy Lee <stequald01@gmail.com>\n//\n//   This library is free software; you can redistribute it and/or\n//   modify it under the terms of the GNU Lesser General Public\n//   License as published by the Free Software Foundation; either\n//   version 2.1 of the License, or (at your option) any later version.\n//\n//   This library is distributed in the hope that it will be useful,\n//   but WITHOUT ANY WARRANTY; without even the implied warranty of\n//   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n//   Lesser General Public License for more details.\n//\n//   You should have received a copy of the GNU Lesser General Public\n//   License along with this library; if not, write to the Free Software\n//   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,\n//   MA 02110-1301  USA\n\nimport Foundation\nimport UIKit\n\n\nextension UIView{\n    public func scrollToY(_ y:Float) -> () {\n        UIView.beginAnimations(\"registerScroll\", context:nil)\n        UIView.setAnimationCurve(.easeInOut)\n        UIView.setAnimationDuration(0.4)\n        transform = CGAffineTransform(translationX: 0, y: CGFloat(y))\n        UIView.commitAnimations()\n    }\n\n    public func scrollToView(_ view:UIView) -> () {\n        let OFFSET_Y = CGFloat(70.0)\n\n        let theFrame = view.frame\n        var y = theFrame.origin.y - 15\n        y -= (y/1.7) - 60\n\n        if (-y+OFFSET_Y < 0) {\n            scrollToY(Float(-y+OFFSET_Y))\n        } else {\n            scrollToY(Float(-y))\n        }\n    }\n\n    public func scrollElement(_ view:UIView, toPoint y:Float) -> () {\n        let theFrame = view.frame\n        let orig_y = theFrame.origin.y\n        let diff = y - Float(orig_y)\n        if (diff < 0) {\n            scrollToY(diff)\n        }\n        else {\n            scrollToY(0)\n        }\n    }\n}\n"
  },
  {
    "path": "ArcBit/utils/UIViewController+Extras.swift",
    "content": "//\n//  UIViewController+Extras.swift\n//  ArcBit\n//\n//  Created by Timothy Lee on 3/14/15.\n//  Copyright (c) 2015 Timothy Lee <stequald01@gmail.com>\n//\n//   This library is free software; you can redistribute it and/or\n//   modify it under the terms of the GNU Lesser General Public\n//   License as published by the Free Software Foundation; either\n//   version 2.1 of the License, or (at your option) any later version.\n//\n//   This library is distributed in the hope that it will be useful,\n//   but WITHOUT ANY WARRANTY; without even the implied warranty of\n//   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n//   Lesser General Public License for more details.\n//\n//   You should have received a copy of the GNU Lesser General Public\n//   License along with this library; if not, write to the Free Software\n//   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,\n//   MA 02110-1301  USA\n\n\nimport Foundation\nimport UIKit\n\nextension UIViewController {\n    public func showSendView() -> () {\n        slidingViewController().topViewController = storyboard!.instantiateViewController(withIdentifier: \"SendNav\") \n    }\n}\n"
  },
  {
    "path": "ArcBit/utils/UIViewController+Style.swift",
    "content": "//\n//  UIViewController+Style.swift\n//  ArcBit\n//\n//  Created by Timothy Lee on 3/14/15.\n//  Copyright (c) 2015 Timothy Lee <stequald01@gmail.com>\n//\n//   This library is free software; you can redistribute it and/or\n//   modify it under the terms of the GNU Lesser General Public\n//   License as published by the Free Software Foundation; either\n//   version 2.1 of the License, or (at your option) any later version.\n//\n//   This library is distributed in the hope that it will be useful,\n//   but WITHOUT ANY WARRANTY; without even the implied warranty of\n//   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n//   Lesser General Public License for more details.\n//\n//   You should have received a copy of the GNU Lesser General Public\n//   License along with this library; if not, write to the Free Software\n//   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,\n//   MA 02110-1301  USA\n\n\nimport Foundation\nimport UIKit\n\nextension UIViewController\n{\n    public func setLogoImageView() -> () {\n        let image = UIImage(named:\"360X80logo.png\")\n        let imageView = UIImageView(frame:CGRect(x: 0, y: 0, width: 180, height: 40))\n        \n        imageView.contentMode = UIViewContentMode.scaleToFill\n        imageView.contentMode = UIViewContentMode.scaleAspectFit\n        imageView.image = image\n        imageView.backgroundColor = TLColors.mainAppColor()\n        navigationItem.titleView = imageView\n        \n        // Add dummy rightBarButtonItem so that self.navigationItem.titleView does not extend to far to the right\n        let dummyBarButtonItem = UIBarButtonItem(title: \"\", style: UIBarButtonItemStyle.plain, target: self, action: nil)\n        \n        navigationItem.rightBarButtonItem = dummyBarButtonItem\n        // work around to hide rightBarButtonItem\n        navigationItem.rightBarButtonItem!.tintColor = TLColors.mainAppColor()\n    }\n    \n    public func setColors() -> () {\n        if(navigationController != nil)\n        {\n            navigationController!.navigationBar.fixedHeightWhenStatusBarHidden = true\n            \n            navigationController!.navigationBar.barTintColor = TLColors.mainAppColor()\n            navigationController!.navigationBar.tintColor = TLColors.mainAppOppositeColor()\n            navigationController!.navigationBar.isTranslucent = false\n            navigationController!.navigationBar.titleTextAttributes = [NSForegroundColorAttributeName: TLColors.mainAppOppositeColor()]\n            \n            navigationController!.navigationItem.rightBarButtonItem = nil\n        }\n        if self.slidingViewController() != nil {\n            slidingViewController().topViewController.view.layer.shadowOpacity = 0.75\n            slidingViewController().topViewController.view.layer.shadowRadius = 10.0\n            slidingViewController().topViewController.view.layer.shadowColor = UIColor.black.cgColor\n        }\n    }\n    \n    public func setNavigationBarColors(_ navigationBar:UINavigationBar) -> () {\n        navigationBar.barTintColor = TLColors.mainAppColor()\n        navigationBar.tintColor = TLColors.mainAppOppositeColor()\n        navigationBar.isTranslucent = false\n        navigationBar.titleTextAttributes = [NSForegroundColorAttributeName: TLColors.mainAppOppositeColor()]\n        navigationBar.barTintColor = TLColors.mainAppColor()\n        view.backgroundColor = TLColors.mainAppColor()\n    }\n}\n"
  },
  {
    "path": "ArcBit/viewControllers/TLAccountTableViewCell.swift",
    "content": "//\n//  TLAccountTableViewCell.swift\n//  ArcBit\n//\n//  Created by Timothy Lee on 3/14/15.\n//  Copyright (c) 2015 Timothy Lee <stequald01@gmail.com>\n//\n//   This library is free software; you can redistribute it and/or\n//   modify it under the terms of the GNU Lesser General Public\n//   License as published by the Free Software Foundation; either\n//   version 2.1 of the License, or (at your option) any later version.\n//\n//   This library is distributed in the hope that it will be useful,\n//   but WITHOUT ANY WARRANTY; without even the implied warranty of\n//   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n//   Lesser General Public License for more details.\n//\n//   You should have received a copy of the GNU Lesser General Public\n//   License along with this library; if not, write to the Free Software\n//   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,\n//   MA 02110-1301  USA\n\nimport Foundation\nimport UIKit\n\n@objc(TLAccountTableViewCell) class TLAccountTableViewCell:UITableViewCell {\n    required init?(coder aDecoder: NSCoder) {\n        super.init(coder: aDecoder)\n    }\n    \n    @IBOutlet var accountNameLabel : UILabel?\n    @IBOutlet var accountBalanceButton : UIButton?\n    \n    override func awakeFromNib() {\n        super.awakeFromNib()\n        accountBalanceButton!.backgroundColor = TLColors.mainAppColor()\n        self.accountBalanceButton!.setTitleColor(TLColors.mainAppOppositeColor(), for:UIControlState())\n        self.accountBalanceButton!.titleLabel!.adjustsFontSizeToFitWidth = true\n    }\n    \n    override init(style: UITableViewCellStyle, reuseIdentifier: String?) {\n        super.init(style: UITableViewCellStyle.subtitle, reuseIdentifier: reuseIdentifier)\n        \n    }\n    \n    override func setSelected(_ selected:Bool, animated:Bool) -> () {\n        super.setSelected(selected, animated:animated)\n    }\n    \n    @IBAction fileprivate func accountBalanceButtonClicked(_ sender:UIButton) {\n        TLPreferences.setDisplayLocalCurrency(!TLPreferences.isDisplayLocalCurrency())\n        TLPreferences.setInAppSettingsKitDisplayLocalCurrency(TLPreferences.isDisplayLocalCurrency())\n    }\n}\n"
  },
  {
    "path": "ArcBit/viewControllers/TLAccountsViewController.swift",
    "content": "//\n//  TLAccountsViewController.swift\n//  ArcBit\n//\n//  Created by Timothy Lee on 3/14/15.\n//  Copyright (c) 2015 Timothy Lee <stequald01@gmail.com>\n//\n//   This library is free software; you can redistribute it and/or\n//   modify it under the terms of the GNU Lesser General Public\n//   License as published by the Free Software Foundation; either\n//   version 2.1 of the License, or (at your option) any later version.\n//\n//   This library is distributed in the hope that it will be useful,\n//   but WITHOUT ANY WARRANTY; without even the implied warranty of\n//   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n//   Lesser General Public License for more details.\n//\n//   You should have received a copy of the GNU Lesser General Public\n//   License along with this library; if not, write to the Free Software\n//   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,\n//   MA 02110-1301  USA\n\nimport UIKit\n\n\n@objc(TLAccountsViewController) class TLAccountsViewController: UIViewController, UITableViewDataSource, UITableViewDelegate {\n    \n    required init?(coder aDecoder: NSCoder) {\n        super.init(coder: aDecoder)\n    }\n    \n    @IBOutlet fileprivate var accountsTableView: UITableView?\n    fileprivate var numberOfSections = 0\n    fileprivate var accountListSection = 0\n    fileprivate var coldWalletAccountSection = 0\n    fileprivate var importedAccountSection = 0\n    fileprivate var importedWatchAccountSection = 0\n    fileprivate var importedAddressSection = 0\n    fileprivate var importedWatchAddressSection = 0\n    fileprivate var accountRefreshControl: UIRefreshControl?\n    \n    override func viewDidLoad() {\n        super.viewDidLoad()\n        setColors()\n        \n        accountListSection = 0\n        \n        self.accountsTableView!.delegate = self\n        self.accountsTableView!.dataSource = self\n        self.accountsTableView!.tableFooterView = UIView(frame: CGRect.zero)\n        \n        NotificationCenter.default.addObserver(self, selector: #selector(TLAccountsViewController.refreshWalletAccountsNotification(_:)),\n            name: NSNotification.Name(rawValue: TLNotificationEvents.EVENT_DISPLAY_LOCAL_CURRENCY_TOGGLED()), object: nil)\n        \n        NotificationCenter.default.addObserver(self, selector: #selector(TLAccountsViewController.refreshWalletAccountsNotification(_:)),\n            name: NSNotification.Name(rawValue: TLNotificationEvents.EVENT_FETCHED_ADDRESSES_DATA()), object: nil)\n        \n        NotificationCenter.default.addObserver(self, selector: #selector(TLAccountsViewController.accountsTableViewReloadDataWrapper(_:)),\n            name: NSNotification.Name(rawValue: TLNotificationEvents.EVENT_ADVANCE_MODE_TOGGLED()), object: nil)\n        \n        NotificationCenter.default.addObserver(self, selector: #selector(TLAccountsViewController.accountsTableViewReloadDataWrapper(_:)),\n                                               name: NSNotification.Name(rawValue: TLNotificationEvents.EVENT_EXCHANGE_RATE_UPDATED()), object: nil)\n\n        NotificationCenter.default.addObserver(self, selector: #selector(TLAccountsViewController.accountsTableViewReloadDataWrapper(_:)), name: NSNotification.Name(rawValue: TLNotificationEvents.EVENT_MODEL_UPDATED_NEW_UNCONFIRMED_TRANSACTION()), object: nil)\n        \n        accountRefreshControl = UIRefreshControl()\n        accountRefreshControl!.addTarget(self, action: #selector(TLAccountsViewController.refresh(_:)), for: .valueChanged)\n        self.accountsTableView!.addSubview(accountRefreshControl!)\n        \n        self.checkToRecoverAccounts()\n        \n        self.refreshWalletAccounts(false)\n    }\n    \n    func refresh(_ refreshControl: UIRefreshControl) {\n        self.refreshWalletAccounts(true)\n        accountRefreshControl!.endRefreshing()\n    }\n    \n    override func viewWillAppear(_ animated: Bool) {\n        self.refreshWalletAccounts(false)\n    }\n    \n    override func viewDidAppear(_ animated: Bool) -> () {\n        NotificationCenter.default.post(name: Notification.Name(rawValue: TLNotificationEvents.EVENT_VIEW_ACCOUNTS_SCREEN()),\n            object: nil, userInfo: nil)\n    }\n    \n    fileprivate func checkToRecoverAccounts() {\n        if (AppDelegate.instance().aAccountNeedsRecovering()) {\n            TLHUDWrapper.showHUDAddedTo(self.slidingViewController().topViewController!.view,\n                labelText: TLDisplayStrings.RESTORING_WALLET_STRING(), animated: true)\n            DispatchQueue.global(priority: DispatchQueue.GlobalQueuePriority.high).async {\n                AppDelegate.instance().checkToRecoverAccounts()\n                DispatchQueue.main.async {\n                    self.refreshWalletAccounts(false)\n                    TLHUDWrapper.hideHUDForView(self.view, animated: true)\n                }\n            }\n        }\n    }\n    \n    fileprivate func refreshColdWalletAccounts(_ fetchDataAgain: Bool) {\n        for i in stride(from: 0, to: AppDelegate.instance().coldWalletAccounts!.getNumberOfAccounts(), by: 1) {\n            let accountObject = AppDelegate.instance().coldWalletAccounts!.getAccountObjectForIdx(i)\n            let indexPath = IndexPath(row: i, section:coldWalletAccountSection)\n            if (!accountObject.hasFetchedAccountData() || fetchDataAgain) {\n                let cell = self.accountsTableView!.cellForRow(at: indexPath) as? TLAccountTableViewCell\n                if cell != nil {\n                    (cell!.accessoryView as! UIActivityIndicatorView).isHidden = false\n                    cell!.accountBalanceButton!.isHidden = true\n                    (cell!.accessoryView as! UIActivityIndicatorView).startAnimating()\n                }\n                AppDelegate.instance().pendingOperations.addSetUpAccountOperation(accountObject,\n                                                                                  fetchDataAgain: fetchDataAgain, success: {\n                                                                                    if cell != nil {\n                                                                                        (cell!.accessoryView as! UIActivityIndicatorView).stopAnimating()\n                                                                                        (cell!.accessoryView as! UIActivityIndicatorView).isHidden = true\n                                                                                        cell!.accountBalanceButton!.isHidden = false\n                                                                                        if accountObject.downloadState == .downloaded {\n                                                                                            let balance = TLCurrencyFormat.getProperAmount(accountObject.getBalance())\n                                                                                            cell!.accountBalanceButton!.setTitle(balance as String, for: UIControlState())\n                                                                                        }\n                                                                                        cell!.accountBalanceButton!.isHidden = false\n                                                                                    }\n                })\n            } else {\n                if let cell = self.accountsTableView!.cellForRow(at: indexPath) as? TLAccountTableViewCell {\n                    cell.accountNameLabel!.text = accountObject.getAccountName()\n                    let balance = TLCurrencyFormat.getProperAmount(accountObject.getBalance())\n                    cell.accountBalanceButton!.setTitle(balance as String, for: UIControlState())\n                }\n            }\n        }\n    }\n    \n    fileprivate func refreshImportedAccounts(_ fetchDataAgain: Bool) {\n        for i in stride(from: 0, to: AppDelegate.instance().importedAccounts!.getNumberOfAccounts(), by: 1) {\n            let accountObject = AppDelegate.instance().importedAccounts!.getAccountObjectForIdx(i)\n            let indexPath = IndexPath(row: i, section: importedAccountSection)\n            if (!accountObject.hasFetchedAccountData() || fetchDataAgain) {\n                let cell = self.accountsTableView!.cellForRow(at: indexPath) as? TLAccountTableViewCell\n                if cell != nil {\n                    (cell!.accessoryView as! UIActivityIndicatorView).isHidden = false\n                    cell!.accountBalanceButton!.isHidden = true\n                    (cell!.accessoryView as! UIActivityIndicatorView).startAnimating()\n                }\n                AppDelegate.instance().pendingOperations.addSetUpAccountOperation(accountObject,\n                    fetchDataAgain: fetchDataAgain, success: {\n                        if cell != nil {\n                            (cell!.accessoryView as! UIActivityIndicatorView).stopAnimating()\n                            (cell!.accessoryView as! UIActivityIndicatorView).isHidden = true\n                            cell!.accountBalanceButton!.isHidden = false\n                            if accountObject.downloadState == .downloaded {\n                                let balance = TLCurrencyFormat.getProperAmount(accountObject.getBalance())\n                                cell!.accountBalanceButton!.setTitle(balance as String, for: UIControlState())\n                            }\n                            cell!.accountBalanceButton!.isHidden = false\n                        }\n                })\n            } else {\n                if let cell = self.accountsTableView!.cellForRow(at: indexPath) as? TLAccountTableViewCell {\n                    cell.accountNameLabel!.text = accountObject.getAccountName()\n                    let balance = TLCurrencyFormat.getProperAmount(accountObject.getBalance())\n                    cell.accountBalanceButton!.setTitle(balance as String, for: UIControlState())\n                }\n            }\n        }\n    }\n    \n    fileprivate func refreshImportedWatchAccounts(_ fetchDataAgain: Bool) {\n        for i in stride(from: 0, to: AppDelegate.instance().importedWatchAccounts!.getNumberOfAccounts(), by: 1) {\n            let accountObject = AppDelegate.instance().importedWatchAccounts!.getAccountObjectForIdx(i)\n            let indexPath = IndexPath(row: i, section:importedWatchAccountSection)\n            if (!accountObject.hasFetchedAccountData() || fetchDataAgain) {\n                let cell = self.accountsTableView!.cellForRow(at: indexPath) as? TLAccountTableViewCell\n                if cell != nil {\n                    (cell!.accessoryView as! UIActivityIndicatorView).isHidden = false\n                    cell!.accountBalanceButton!.isHidden = true\n                    (cell!.accessoryView as! UIActivityIndicatorView).startAnimating()\n                }\n                AppDelegate.instance().pendingOperations.addSetUpAccountOperation(accountObject,\n                    fetchDataAgain: fetchDataAgain, success: {\n                        if cell != nil {\n                            (cell!.accessoryView as! UIActivityIndicatorView).stopAnimating()\n                            (cell!.accessoryView as! UIActivityIndicatorView).isHidden = true\n                            cell!.accountBalanceButton!.isHidden = false\n                            if accountObject.downloadState == .downloaded {\n                                let balance = TLCurrencyFormat.getProperAmount(accountObject.getBalance())\n                                cell!.accountBalanceButton!.setTitle(balance as String, for: UIControlState())\n                            }\n                            cell!.accountBalanceButton!.isHidden = false\n                        }\n                })\n            } else {\n                if let cell = self.accountsTableView!.cellForRow(at: indexPath) as? TLAccountTableViewCell {\n                    cell.accountNameLabel!.text = accountObject.getAccountName()\n                    let balance = TLCurrencyFormat.getProperAmount(accountObject.getBalance())\n                    cell.accountBalanceButton!.setTitle(balance as String, for: UIControlState())\n                }\n            }\n        }\n    }\n    \n    fileprivate func refreshImportedAddressBalances(_ fetchDataAgain: Bool) {\n        if (AppDelegate.instance().importedAddresses!.getCount() > 0 &&\n            (!AppDelegate.instance().importedAddresses!.hasFetchedAddressesData() || fetchDataAgain)) {\n                for i in stride(from: 0, to: AppDelegate.instance().importedAddresses!.getCount(), by: 1) {\n                    let indexPath = IndexPath(row: i, section: importedAddressSection)\n                    if let cell = self.accountsTableView!.cellForRow(at: indexPath) as? TLAccountTableViewCell {\n                        (cell.accessoryView as! UIActivityIndicatorView).isHidden = false\n                        cell.accountBalanceButton!.isHidden = true\n                        (cell.accessoryView as! UIActivityIndicatorView).startAnimating()\n                    }\n                }\n                \n                AppDelegate.instance().pendingOperations.addSetUpImportedAddressesOperation(AppDelegate.instance().importedAddresses!, fetchDataAgain: fetchDataAgain, success: {\n                    for i in stride(from: 0, to: AppDelegate.instance().importedAddresses!.getCount(), by: 1) {\n                        let indexPath = IndexPath(row: i, section: self.importedAddressSection)\n                        if let cell = self.accountsTableView!.cellForRow(at: indexPath) as? TLAccountTableViewCell {\n                            (cell.accessoryView as! UIActivityIndicatorView).stopAnimating()\n                            (cell.accessoryView as! UIActivityIndicatorView).isHidden = true\n                            if AppDelegate.instance().importedAddresses!.downloadState == .downloaded {\n                                let importAddressObject = AppDelegate.instance().importedAddresses!.getAddressObjectAtIdx(i)\n                                let balance = TLCurrencyFormat.getProperAmount(importAddressObject.getBalance()!)\n                                cell.accountBalanceButton!.setTitle(balance as String, for: UIControlState())\n                            }\n                            cell.accountBalanceButton!.isHidden = false\n                        }\n                    }\n                })\n        }\n    }\n    \n    fileprivate func refreshImportedWatchAddressBalances(_ fetchDataAgain: Bool) {\n        if (AppDelegate.instance().importedWatchAddresses!.getCount() > 0 && (!AppDelegate.instance().importedWatchAddresses!.hasFetchedAddressesData() || fetchDataAgain)) {\n            for i in stride(from: 0, to: AppDelegate.instance().importedWatchAddresses!.getCount(), by: 1) {\n                let indexPath = IndexPath(row: i, section: importedWatchAddressSection)\n                if let cell = self.accountsTableView!.cellForRow(at: indexPath) as? TLAccountTableViewCell {\n                    (cell.accessoryView as! UIActivityIndicatorView).isHidden = false\n                    cell.accountBalanceButton!.isHidden = true\n                    (cell.accessoryView as! UIActivityIndicatorView).startAnimating()\n                }\n            }\n            \n            AppDelegate.instance().pendingOperations.addSetUpImportedAddressesOperation(AppDelegate.instance().importedWatchAddresses!, fetchDataAgain: fetchDataAgain, success: {\n                for i in stride(from: 0, to: AppDelegate.instance().importedWatchAddresses!.getCount(), by: 1) {\n                    let indexPath = IndexPath(row: i, section: self.importedWatchAddressSection)\n                    if let cell = self.accountsTableView!.cellForRow(at: indexPath) as? TLAccountTableViewCell {\n                        (cell.accessoryView as! UIActivityIndicatorView).stopAnimating()\n                        (cell.accessoryView as! UIActivityIndicatorView).isHidden = true\n                        \n                        if AppDelegate.instance().importedWatchAddresses!.downloadState == .downloaded {\n                            let importAddressObject = AppDelegate.instance().importedWatchAddresses!.getAddressObjectAtIdx(i)\n                            let balance = TLCurrencyFormat.getProperAmount(importAddressObject.getBalance()!)\n                            cell.accountBalanceButton!.setTitle(balance as String, for: UIControlState())\n                        }\n                        cell.accountBalanceButton!.isHidden = false\n                    }\n                }\n            })\n        }\n    }\n    \n    fileprivate func refreshAccountBalances(_ fetchDataAgain: Bool) {\n        for i in stride(from: 0, to: AppDelegate.instance().accounts!.getNumberOfAccounts(), by: 1) {\n            let accountObject = AppDelegate.instance().accounts!.getAccountObjectForIdx(i)\n            let indexPath = IndexPath(row: i, section: accountListSection)\n            if (!accountObject.hasFetchedAccountData() || fetchDataAgain) {\n                let cell = self.accountsTableView!.cellForRow(at: indexPath) as? TLAccountTableViewCell\n                if cell != nil {\n                    (cell!.accessoryView as! UIActivityIndicatorView).isHidden = false\n                    cell!.accountBalanceButton!.isHidden = true\n                    (cell!.accessoryView as! UIActivityIndicatorView).startAnimating()\n                }\n                \n                AppDelegate.instance().pendingOperations.addSetUpAccountOperation(accountObject, fetchDataAgain: fetchDataAgain, success: {\n                    if cell != nil {\n                        (cell!.accessoryView as! UIActivityIndicatorView).stopAnimating()\n                        (cell!.accessoryView as! UIActivityIndicatorView).isHidden = true\n                        cell!.accountBalanceButton!.isHidden = false\n                        if accountObject.downloadState == .downloaded {\n                            let balance = TLCurrencyFormat.getProperAmount(accountObject.getBalance())\n                            cell!.accountBalanceButton!.setTitle(balance as String, for: UIControlState())\n                        }\n                        cell!.accountBalanceButton!.isHidden = false\n                    }\n                })\n            } else {\n                if let cell = self.accountsTableView!.cellForRow(at: indexPath) as? TLAccountTableViewCell {\n                    cell.accountNameLabel!.text = accountObject.getAccountName()\n                    let balance = TLCurrencyFormat.getProperAmount(accountObject.getBalance())\n                    cell.accountBalanceButton!.setTitle(balance as String, for: UIControlState())\n                }\n            }\n        }\n    }\n    \n    override func didReceiveMemoryWarning() {\n        super.didReceiveMemoryWarning()\n    }\n    \n    func refreshWalletAccountsNotification(_ notification: Notification) {\n        self.refreshWalletAccounts(false)\n    }\n    \n    fileprivate func refreshWalletAccounts(_ fetchDataAgain: Bool) {\n        self._accountsTableViewReloadDataWrapper()\n        self.refreshAccountBalances(fetchDataAgain)\n        if TLPreferences.enabledColdWallet() {\n            self.refreshColdWalletAccounts(fetchDataAgain)\n        }\n        if (TLPreferences.enabledAdvancedMode()) {\n            self.refreshImportedAccounts(fetchDataAgain)\n            self.refreshImportedWatchAccounts(fetchDataAgain)\n            self.refreshImportedAddressBalances(fetchDataAgain)\n            self.refreshImportedWatchAddressBalances(fetchDataAgain)\n        }\n    }\n    \n    fileprivate func setUpCellAccounts(_ accountObject: TLAccountObject, cell: TLAccountTableViewCell, cellForRowAtIndexPath indexPath: IndexPath) {\n        cell.accountNameLabel!.text = accountObject.getAccountName()\n        if (accountObject.hasFetchedAccountData()) {\n            (cell.accessoryView as! UIActivityIndicatorView).isHidden = true\n            (cell.accessoryView as! UIActivityIndicatorView).stopAnimating()\n            let balance = TLCurrencyFormat.getProperAmount(accountObject.getBalance())\n            cell.accountBalanceButton!.setTitle(balance as String, for: UIControlState())\n            cell.accountBalanceButton!.isHidden = false\n        } else {\n            (cell.accessoryView as! UIActivityIndicatorView).isHidden = false\n            (cell.accessoryView as! UIActivityIndicatorView).startAnimating()\n            AppDelegate.instance().pendingOperations.addSetUpAccountOperation(accountObject, fetchDataAgain: false, success: {\n                (cell.accessoryView as! UIActivityIndicatorView).stopAnimating()\n                (cell.accessoryView as! UIActivityIndicatorView).isHidden = true\n                if accountObject.downloadState == .downloaded {\n                    let balance = TLCurrencyFormat.getProperAmount(accountObject.getBalance())\n                    cell.accountBalanceButton!.setTitle(balance as String, for: UIControlState())\n                    cell.accountBalanceButton!.isHidden = false\n                }\n            })\n        }\n    }\n    \n    fileprivate func setUpCellImportedAddresses(_ importedAddressObject: TLImportedAddress, cell: TLAccountTableViewCell, cellForRowAtIndexPath indexPath: IndexPath) {\n        let label = importedAddressObject.getLabel()\n        cell.accountNameLabel!.text = label\n        \n        if (importedAddressObject.hasFetchedAccountData()) {\n            (cell.accessoryView as! UIActivityIndicatorView).isHidden = true\n            (cell.accessoryView as! UIActivityIndicatorView).stopAnimating()\n            let balance = TLCurrencyFormat.getProperAmount(importedAddressObject.getBalance()!)\n            cell.accountBalanceButton!.setTitle(balance as String, for: UIControlState())\n            cell.accountBalanceButton!.isHidden = false\n        }\n    }\n    \n    func _accountsTableViewReloadDataWrapper() {\n        numberOfSections = 1\n        \n        var sectionCounter = 1\n        \n        if TLPreferences.enabledColdWallet() {\n            if (AppDelegate.instance().coldWalletAccounts!.getNumberOfAccounts() > 0) {\n                coldWalletAccountSection = sectionCounter\n                sectionCounter += 1\n                numberOfSections += 1\n            } else {\n                coldWalletAccountSection = NSIntegerMax\n            }\n        }\n        \n        if (TLPreferences.enabledAdvancedMode()) {\n            if (AppDelegate.instance().importedAccounts!.getNumberOfAccounts() > 0) {\n                importedAccountSection = sectionCounter\n                sectionCounter += 1\n                numberOfSections += 1\n            } else {\n                importedAccountSection = NSIntegerMax\n            }\n            \n            if (AppDelegate.instance().importedWatchAccounts!.getNumberOfAccounts() > 0) {\n                importedWatchAccountSection = sectionCounter\n                sectionCounter += 1\n                numberOfSections += 1\n            } else {\n                importedWatchAccountSection = NSIntegerMax\n            }\n            \n            if (AppDelegate.instance().importedAddresses!.getCount() > 0) {\n                importedAddressSection = sectionCounter\n                sectionCounter += 1\n                numberOfSections += 1\n            } else {\n                importedAddressSection = NSIntegerMax\n            }\n            \n            if (AppDelegate.instance().importedWatchAddresses!.getCount() > 0) {\n                importedWatchAddressSection = sectionCounter\n                sectionCounter += 1\n                numberOfSections += 1\n            } else {\n                importedWatchAddressSection = NSIntegerMax\n            }\n        }\n        \n        self.accountsTableView!.reloadData()}\n    \n    func accountsTableViewReloadDataWrapper(_ notification: Notification) {\n        _accountsTableViewReloadDataWrapper()\n    }\n    \n    fileprivate func doSelectFrom(_ sendFromType: TLSendFromType, sendFromIndex: NSInteger) {\n        var viewControllersIdx = self.navigationController!.viewControllers.count - 2\n        // make sure viewControllersIdx not negative\n        if (self.navigationController!.viewControllers.count < 2) {\n            viewControllersIdx = 0\n        }\n        \n        self.navigationController!.popToViewController((self.navigationController!.viewControllers as NSArray).object(at: viewControllersIdx) as! UIViewController, animated: true)\n        let selectedDict = [\"sendFromType\": sendFromType.rawValue, \"sendFromIndex\": sendFromIndex]\n        NotificationCenter.default.post(name: Notification.Name(rawValue: TLNotificationEvents.EVENT_ACCOUNT_SELECTED()), object: selectedDict, userInfo: nil)\n    }\n    \n    func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {\n        // hard code height here to prevent cell auto-resizing\n        return 74\n    }\n    \n    func numberOfSections(in tableView: UITableView) -> Int {\n        return numberOfSections\n    }\n    \n    func tableView(_ tableView: UITableView, titleForHeaderInSection section: Int) -> String? {\n        if (TLPreferences.enabledAdvancedMode()) {\n            if (section == accountListSection) {\n                return TLDisplayStrings.ACCOUNTS_STRING()\n            } else if (section == coldWalletAccountSection) {\n                return TLDisplayStrings.COLD_WALLET_ACCOUNTS_STRING()\n            } else if (section == importedAccountSection) {\n                return TLDisplayStrings.IMPORTED_ACCOUNTS_STRING()\n            } else if (section == importedWatchAccountSection) {\n                return TLDisplayStrings.IMPORTED_WATCH_ACCOUNTS_STRING()\n            } else if (section == importedAddressSection) {\n                return TLDisplayStrings.IMPORTED_ADDRESSES_STRING()\n            } else if (section == importedWatchAddressSection) {\n                return TLDisplayStrings.IMPORTED_WATCH_ADDRESSES_STRING()\n            } else {\n            }\n        } else {\n            if (section == accountListSection) {\n                return TLDisplayStrings.ACCOUNTS_STRING()\n            } else {\n            }\n        }\n        \n        return nil\n    }\n    \n    func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {\n        if (TLPreferences.enabledColdWallet() && section == coldWalletAccountSection) {\n            return AppDelegate.instance().coldWalletAccounts!.getNumberOfAccounts()\n        }\n        if (TLPreferences.enabledAdvancedMode()) {\n            if (section == accountListSection) {\n                return AppDelegate.instance().accounts!.getNumberOfAccounts()\n            } else if (section == importedAccountSection) {\n                return AppDelegate.instance().importedAccounts!.getNumberOfAccounts()\n            } else if (section == importedWatchAccountSection) {\n                return AppDelegate.instance().importedWatchAccounts!.getNumberOfAccounts()\n            } else if (section == importedAddressSection) {\n                return AppDelegate.instance().importedAddresses!.getCount()\n            } else if (section == importedWatchAddressSection) {\n                return AppDelegate.instance().importedWatchAddresses!.getCount()\n            } else {\n                \n            }\n        } else {\n            if (section == accountListSection) {\n                return AppDelegate.instance().accounts!.getNumberOfAccounts()\n            } else {\n            }\n        }\n        return 0\n    }\n    \n    func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {\n        \n        let MyIdentifier = \"AccountCellIdentifier\"\n        \n        var cell = tableView.dequeueReusableCell(withIdentifier: MyIdentifier) as! TLAccountTableViewCell?\n        if (cell == nil) {\n            cell = UITableViewCell(style: UITableViewCellStyle.default,\n                reuseIdentifier: MyIdentifier) as? TLAccountTableViewCell\n        }\n        \n        let activityView = UIActivityIndicatorView(activityIndicatorStyle: .gray)\n        cell!.accessoryView = (activityView)\n        \n        cell!.accountBalanceButton!.titleLabel!.adjustsFontSizeToFitWidth = true\n        if (TLPreferences.enabledColdWallet() && (indexPath as NSIndexPath).section == coldWalletAccountSection) {\n            let accountObject = AppDelegate.instance().coldWalletAccounts!.getAccountObjectForIdx((indexPath as NSIndexPath).row)\n            self.setUpCellAccounts(accountObject, cell: cell!, cellForRowAtIndexPath: indexPath)\n        }\n        if (TLPreferences.enabledAdvancedMode()) {\n            if ((indexPath as NSIndexPath).section == accountListSection) {\n                let accountObject = AppDelegate.instance().accounts!.getAccountObjectForIdx((indexPath as NSIndexPath).row)\n                self.setUpCellAccounts(accountObject, cell: cell!, cellForRowAtIndexPath: indexPath)\n            } else if ((indexPath as NSIndexPath).section == importedAccountSection) {\n                let accountObject = AppDelegate.instance().importedAccounts!.getAccountObjectForIdx((indexPath as NSIndexPath).row)\n                \n                self.setUpCellAccounts(accountObject, cell: cell!, cellForRowAtIndexPath: indexPath)\n                \n            } else if ((indexPath as NSIndexPath).section == importedWatchAccountSection) {\n                let accountObject = AppDelegate.instance().importedWatchAccounts!.getAccountObjectForIdx((indexPath as NSIndexPath).row)\n                \n                self.setUpCellAccounts(accountObject, cell: cell!, cellForRowAtIndexPath: indexPath)\n                \n            } else if ((indexPath as NSIndexPath).section == importedAddressSection) {\n                let importedAddressObject = AppDelegate.instance().importedAddresses!.getAddressObjectAtIdx((indexPath as NSIndexPath).row)\n                self.setUpCellImportedAddresses(importedAddressObject, cell: cell!, cellForRowAtIndexPath: indexPath)\n            } else if ((indexPath as NSIndexPath).section == importedWatchAddressSection) {\n                let importedAddressObject = AppDelegate.instance().importedWatchAddresses!.getAddressObjectAtIdx((indexPath as NSIndexPath).row)\n                self.setUpCellImportedAddresses(importedAddressObject, cell: cell!, cellForRowAtIndexPath: indexPath)\n            } else {\n            }\n        } else {\n            if ((indexPath as NSIndexPath).section == accountListSection) {\n                let accountObject = AppDelegate.instance().accounts!.getAccountObjectForIdx((indexPath as NSIndexPath).row)\n                self.setUpCellAccounts(accountObject, cell: cell!, cellForRowAtIndexPath: indexPath)\n            } else {\n            }\n        }\n        \n        if ((indexPath as NSIndexPath).row % 2 == 0) {\n            cell!.backgroundColor = TLColors.evenTableViewCellColor()\n        } else {\n            cell!.backgroundColor = TLColors.oddTableViewCellColor()\n        }\n        \n        return cell!\n    }\n    \n    func tableView(_ tableView: UITableView, willSelectRowAt indexPath: IndexPath) -> IndexPath? {\n        if (TLPreferences.enabledColdWallet() && (indexPath as NSIndexPath).section == coldWalletAccountSection) {\n            self.doSelectFrom(.coldWalletAccount, sendFromIndex: (indexPath as NSIndexPath).row)\n            return nil\n        }\n        if (TLPreferences.enabledAdvancedMode()) {\n            if ((indexPath as NSIndexPath).section == accountListSection) {\n                let accountObject = AppDelegate.instance().accounts!.getAccountObjectForIdx((indexPath as NSIndexPath).row)\n                if (accountObject.hasFetchedAccountData()) {\n                    self.doSelectFrom(.hdWallet, sendFromIndex: (indexPath as NSIndexPath).row)\n                }\n                return nil\n            } else if ((indexPath as NSIndexPath).section == importedAccountSection) {\n                self.doSelectFrom(.importedAccount, sendFromIndex: (indexPath as NSIndexPath).row)\n                return nil\n            } else if ((indexPath as NSIndexPath).section == importedWatchAccountSection) {\n                self.doSelectFrom(.importedWatchAccount, sendFromIndex: (indexPath as NSIndexPath).row)\n                return nil\n            } else if ((indexPath as NSIndexPath).section == importedAddressSection) {\n                self.doSelectFrom(.importedAddress, sendFromIndex: (indexPath as NSIndexPath).row)\n                return nil\n            } else if ((indexPath as NSIndexPath).section == importedWatchAddressSection) {\n                self.doSelectFrom(.importedWatchAddress, sendFromIndex: (indexPath as NSIndexPath).row)\n                return nil\n            } else {\n            }\n        } else {\n            if ((indexPath as NSIndexPath).section == accountListSection) {\n                let accountObject = AppDelegate.instance().accounts!.getAccountObjectForIdx((indexPath as NSIndexPath).row)\n                \n                if (accountObject.hasFetchedAccountData()) {\n                    self.doSelectFrom(.hdWallet, sendFromIndex: (indexPath as NSIndexPath).row)\n                }\n            } else {\n            }\n        }\n        \n        return nil\n    }\n\n    deinit {\n        NotificationCenter.default.removeObserver(self)\n    }\n}\n"
  },
  {
    "path": "ArcBit/viewControllers/TLAchievementsViewController.swift",
    "content": "//\n//  TLAchievementsViewController.swift\n//  ArcBit\n//\n//  Created by Timothy Lee on 3/14/15.\n//  Copyright (c) 2015 Timothy Lee <stequald01@gmail.com>\n//\n//   This library is free software; you can redistribute it and/or\n//   modify it under the terms of the GNU Lesser General Public\n//   License as published by the Free Software Foundation; either\n//   version 2.1 of the License, or (at your option) any later version.\n//\n//   This library is distributed in the hope that it will be useful,\n//   but WITHOUT ANY WARRANTY; without even the implied warranty of\n//   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n//   Lesser General Public License for more details.\n//\n//   You should have received a copy of the GNU Lesser General Public\n//   License along with this library; if not, write to the Free Software\n//   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,\n//   MA 02110-1301  USA\n\n\n\nimport Foundation\nimport UIKit\n\n@objc(TLAchievementsViewController) class  TLAchievementsViewController : UIViewController, UITableViewDataSource, UITableViewDelegate {\n    \n    var eventActionArray:NSArray?\n    var  advanceeventActionArray:NSArray?\n    @IBOutlet fileprivate var howToInstructionsTableView: UITableView?\n    \n    override func viewDidLoad() {\n        super.viewDidLoad()\n        setColors()\n        \n        eventActionArray = TLHelpDoc.getEventsArray()\n        advanceeventActionArray = TLHelpDoc.getAdvanceEventsArray()\n        \n        self.howToInstructionsTableView!.delegate = self\n        self.howToInstructionsTableView!.dataSource = self\n        self.howToInstructionsTableView!.tableFooterView = UIView(frame:CGRect.zero)\n    }\n    \n    override func didReceiveMemoryWarning() {\n        super.didReceiveMemoryWarning()\n    }\n    \n    func numberOfSections(in tableView:UITableView) -> Int {\n        if (TLPreferences.enabledAdvancedMode()) {\n            return 2\n        } else {\n            return 1\n        }\n    }\n    \n    func tableView(_ tableView:UITableView, titleForHeaderInSection section:Int) -> String? {\n        if(section == 0) {\n            return TLDisplayStrings.ACHIEVEMENT_LIST_STRING()\n        }\n        else {\n            return TLDisplayStrings.ADVANCE_ACHIEVEMENT_LIST_STRING()\n        }\n    }\n    \n    \n    func tableView(_ tableView: UITableView, numberOfRowsInSection section:Int) -> Int {\n        if(section == 0) {\n            return eventActionArray!.count\n        }\n        else {\n            return advanceeventActionArray!.count\n        }\n    }\n    \n    func tableView(_ tableView: UITableView, cellForRowAt indexPath:IndexPath) -> UITableViewCell{\n        let MyIdentifier = \"AchievementCellIdentifier\"\n        \n        var cell = tableView.dequeueReusableCell(withIdentifier: MyIdentifier) \n        if (cell == nil) {\n            cell = UITableViewCell(style:UITableViewCellStyle.default,\n                reuseIdentifier:MyIdentifier)\n        }\n        cell!.textLabel!.numberOfLines = 0\n\n        if((indexPath as NSIndexPath).section == 0) {\n            let event = eventActionArray!.object(at: (indexPath as NSIndexPath).row) as! String\n            if (TLAchievements.instance().hasDoneAction(event)) {\n                cell!.accessoryType = UITableViewCellAccessoryType.checkmark\n            } else {\n                cell!.accessoryType = UITableViewCellAccessoryType.none\n            }\n            cell!.textLabel!.text = TLHelpDoc.getActionEventToHowToActionTitleDict().object(forKey: event) as? String\n        } else {\n            let event = advanceeventActionArray!.object(at: (indexPath as NSIndexPath).row) as! String\n            if (TLAchievements.instance().hasDoneAction(event)) {\n                cell!.accessoryType = UITableViewCellAccessoryType.checkmark\n            } else {\n                cell!.accessoryType = UITableViewCellAccessoryType.none\n            }\n            cell!.textLabel!.text = TLHelpDoc.getActionEventToHowToActionTitleDict().object(forKey: event) as? String\n        }\n        \n        if ((indexPath as NSIndexPath).row % 2 == 0) {\n            cell!.backgroundColor = TLColors.evenTableViewCellColor()\n        } else {\n            cell!.backgroundColor = TLColors.oddTableViewCellColor()\n        }\n        \n        return cell!\n    }\n    \n    func tableView(_ tableView:UITableView, willSelectRowAt indexPath:IndexPath) -> IndexPath? {\n        return nil\n    }\n}\n"
  },
  {
    "path": "ArcBit/viewControllers/TLAddressBookViewController.swift",
    "content": "//\n//  TLAddressBookViewController.swift\n//  ArcBit\n//\n//  Created by Timothy Lee on 3/14/15.\n//  Copyright (c) 2015 Timothy Lee <stequald01@gmail.com>\n//\n//   This library is free software; you can redistribute it and/or\n//   modify it under the terms of the GNU Lesser General Public\n//   License as published by the Free Software Foundation; either\n//   version 2.1 of the License, or (at your option) any later version.\n//\n//   This library is distributed in the hope that it will be useful,\n//   but WITHOUT ANY WARRANTY; without even the implied warranty of\n//   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n//   Lesser General Public License for more details.\n//\n//   You should have received a copy of the GNU Lesser General Public\n//   License along with this library; if not, write to the Free Software\n//   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,\n//   MA 02110-1301  USA\n\nimport Foundation\nimport UIKit\n\n@objc(TLAddressBookViewController) class TLAddressBookViewController: UIViewController, UITableViewDataSource, UITableViewDelegate {\n\n    @IBOutlet fileprivate var navigationBar: UINavigationBar?\n    @IBOutlet fileprivate var addressBookTableView: UITableView?\n    fileprivate var addressBook: NSArray?\n    \n    required init?(coder aDecoder: NSCoder) {\n        super.init(coder: aDecoder)\n    }\n    \n    override var preferredStatusBarStyle : (UIStatusBarStyle) {\n        return UIStatusBarStyle.lightContent\n    }\n    \n    override func viewDidLoad() {\n        super.viewDidLoad()\n        self.setNavigationBarColors(self.navigationBar!)\n        self.navigationBar?.topItem?.title = TLDisplayStrings.CONTACTS_STRING()\n        \n        addressBook = AppDelegate.instance().appWallet.getAddressBook()\n        \n        self.addressBookTableView!.delegate = self\n        self.addressBookTableView!.dataSource = self\n        self.addressBookTableView!.tableFooterView = UIView(frame: CGRect.zero)\n    }\n    \n    override func viewWillAppear(_ animated: Bool) {\n        // TODO: better way\n        if AppDelegate.instance().scannedAddressBookAddress != nil {\n            self.processAddressBookAddress(AppDelegate.instance().scannedAddressBookAddress!)\n            AppDelegate.instance().scannedAddressBookAddress = nil\n        }\n    }\n    \n    fileprivate func promptAddToAddressBookActionSheet() -> () {\n        UIAlertController.showAlert(in: self,\n            withTitle: TLDisplayStrings.CREATE_NEW_CONTACT_STRING(),\n            message:\"\",\n            preferredStyle: .actionSheet,\n            cancelButtonTitle: TLDisplayStrings.CANCEL_STRING(),\n            destructiveButtonTitle: nil,\n            otherButtonTitles: [TLDisplayStrings.IMPORT_WITH_QR_CODE_STRING(), TLDisplayStrings.IMPORT_WITH_TEXT_INPUT_STRING()],\n            \n            tap: {(actionSheet, action, buttonIndex) in\n                if (buttonIndex == actionSheet?.firstOtherButtonIndex) {\n                    AppDelegate.instance().showAddressReaderControllerFromViewController(self, success: {\n                        (data: String!) in\n                        AppDelegate.instance().scannedAddressBookAddress = data\n                        }, error: {\n                            (data: String?) in\n                    })\n                } else if (buttonIndex == (actionSheet?.firstOtherButtonIndex)! + 1) {\n                    TLPrompts.promtForInputText(self, title: TLDisplayStrings.INPUT_ADDRESS_STRING(), message: \"\", textFieldPlaceholder: TLDisplayStrings.ADDRESS_STRING(), success: {(inputText: String!) in\n                        self.processAddressBookAddress(inputText)\n                        }, failure: {\n                            (isCanceled: Bool) in\n                            \n                    })\n                } else if (buttonIndex == actionSheet?.cancelButtonIndex) {\n                }\n                \n        })\n    }\n    \n    fileprivate func processAddressBookAddress(_ address: String) -> () {\n        if (TLCoreBitcoinWrapper.isValidAddress(address, isTestnet: AppDelegate.instance().appWallet.walletConfig.isTestnet)) {\n            if (TLCoreBitcoinWrapper.isAddressVersion0(address, isTestnet: AppDelegate.instance().appWallet.walletConfig.isTestnet)) {\n                if (TLWalletUtils.ENABLE_STEALTH_ADDRESS() && TLSuggestions.instance().enabledSuggestDontAddNormalAddressToAddressBook()) {\n                    TLPrompts.promtForOKCancel(self, title: TLDisplayStrings.WARNING_STRING(), message: TLDisplayStrings.ADD_ADDRESS_TO_CONTACT_WARNING_DESC_STRING(), success: {\n                        () in\n                        self.promptForLabel(address)\n                        TLSuggestions.instance().setEnableSuggestDontAddNormalAddressToAddressBook(false)\n                        }, failure: {\n                            (isCanceled: Bool) in\n                    })\n                } else {\n                    self.promptForLabel(address)\n                }\n            } else {\n                self.promptForLabel(address)\n            }\n        }\n        else {\n            TLPrompts.promptErrorMessage(TLDisplayStrings.INVALID_ADDRESS_STRING(), message: \"\")\n        }\n    }\n    \n    fileprivate func promptForLabel(_ address: String) -> () {\n        TLPrompts.promtForInputText(self, title: TLDisplayStrings.EDIT_CONTACTS_ENTRY_STRING(), message: \"\", textFieldPlaceholder: TLDisplayStrings.LABEL_STRING(), success: {\n            (inputText: String!) in\n            AppDelegate.instance().appWallet.addAddressBookEntry(address, label: inputText)\n            NotificationCenter.default.post(name: Notification.Name(rawValue: TLNotificationEvents.EVENT_ADD_TO_ADDRESS_BOOK()), object: nil, userInfo: nil)\n            \n            self.addressBookTableView!.reloadData()\n            \n            }, failure: {\n                (isCanceled: Bool) in\n                \n        })\n    }\n    \n    @IBAction fileprivate func addAddressBookEntryButtonClicked(_ sender: UIButton) -> () {\n        self.promptAddToAddressBookActionSheet()\n    }\n    \n    @IBAction fileprivate func cancelButtonClicked(_ sender: UIButton) -> () {\n        dismiss(animated: true, completion: nil)\n    }\n    \n    func tableView(_ tableView: UITableView, canEditRowAt indexPath: IndexPath) -> Bool {\n        return true\n    }\n    \n    func tableView(_ tableView: UITableView, commit editingStyle: UITableViewCellEditingStyle, forRowAt indexPath: IndexPath) -> () {\n        if (editingStyle == UITableViewCellEditingStyle.delete) {\n            \n        } else if (editingStyle == UITableViewCellEditingStyle.none) {\n        }\n    }\n    \n    func numberOfSections(in tableView: UITableView) -> (Int) {\n        return 1\n    }\n    \n    func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {\n        return addressBook!.count\n    }\n    \n    func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {\n        let MyIdentifier = \"AddressBookCellIdentifier\"\n        \n        var cell = tableView.dequeueReusableCell(withIdentifier: MyIdentifier) \n        if (cell == nil) {\n            cell = UITableViewCell(style: UITableViewCellStyle.subtitle,\n                reuseIdentifier: MyIdentifier)\n        }\n        \n        cell!.textLabel!.text = (addressBook!.object(at: (indexPath as NSIndexPath).row) as! NSDictionary).object(forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_KEY_LABEL) as? String\n        cell!.detailTextLabel!.text = (addressBook!.object(at: (indexPath as NSIndexPath).row) as! NSDictionary).object(forKey: TLWalletJSONKeys.STATIC_MEMBERS.WALLET_PAYLOAD_KEY_ADDRESS) as? String\n        cell!.detailTextLabel!.numberOfLines = 0\n        \n        if ((indexPath as NSIndexPath).row % 2 == 0) {\n            cell!.backgroundColor = TLColors.evenTableViewCellColor()\n        } else {\n            cell!.backgroundColor = TLColors.oddTableViewCellColor()\n        }\n        \n        return cell!\n    }\n    \n    func tableView(_ tableView: UITableView, willSelectRowAt indexPath: IndexPath) -> IndexPath? {\n        let cell = self.addressBookTableView!.cellForRow(at: indexPath)\n        self.dismiss(animated: true, completion: nil)\n        let address = cell!.detailTextLabel!.text\n        NotificationCenter.default.post(name: Notification.Name(rawValue: TLNotificationEvents.EVENT_ADDRESS_SELECTED()), object: address, userInfo: nil)\n        NotificationCenter.default.post(name: Notification.Name(rawValue: TLNotificationEvents.EVENT_SEND_TO_ADDRESS_IN_ADDRESS_BOOK()), object: nil, userInfo: nil)\n        \n        return nil\n    }\n    \n    func tableView(_ tableView: UITableView, editActionsForRowAt indexPath: IndexPath) -> [UITableViewRowAction]? {\n        let moreAction = UITableViewRowAction(style:UITableViewRowActionStyle.default, title: TLDisplayStrings.EDIT_STRING(), handler: {\n            (action: UITableViewRowAction, indexPath: IndexPath) in\n            tableView.isEditing = false\n            \n            TLPrompts.promtForInputText(self, title: TLDisplayStrings.EDIT_CONTACTS_ENTRY_STRING(), message: \"\", textFieldPlaceholder: TLDisplayStrings.ADDRESS_STRING(), success: {\n                (inputText: String!) in\n                AppDelegate.instance().appWallet.editAddressBookEntry((indexPath as NSIndexPath).row, label: inputText)\n                NotificationCenter.default.post(name: Notification.Name(rawValue: TLNotificationEvents.EVENT_EDIT_ENTRY_ADDRESS_BOOK()), object: nil, userInfo: nil)\n                tableView.reloadData()\n                }, failure: {\n                    (isCancelled: Bool) in\n            })\n        })\n        moreAction.backgroundColor = UIColor.lightGray\n        \n        let deleteAction = UITableViewRowAction(style:UITableViewRowActionStyle.default, title: TLDisplayStrings.DELETE_STRING(), handler: {\n            (action: UITableViewRowAction, indexPath: IndexPath) in\n            tableView.isEditing = false\n            \n            TLPrompts.promtForOKCancel(self, title: TLDisplayStrings.DELETE_ADDRESS_STRING(), message: TLDisplayStrings.ARE_YOU_SURE_YOU_WANT_TO_DELETE_THIS_ACCOUNT_STRING(), success: {\n                () in\n                AppDelegate.instance().appWallet.deleteAddressBookEntry((indexPath as NSIndexPath).row)\n                NotificationCenter.default.post(name: Notification.Name(rawValue: TLNotificationEvents.EVENT_DELETE_ENTRY_ADDRESS_BOOK()), object: nil, userInfo: nil)\n                tableView.reloadData()\n                }, failure: {\n                    (isCancelled: Bool) in\n                    \n            })\n        })\n        \n        return [deleteAction, moreAction]\n    }\n}\n\n"
  },
  {
    "path": "ArcBit/viewControllers/TLAddressListViewController.swift",
    "content": "//\n//  TLAddressListViewController.swift\n//  ArcBit\n//\n//  Created by Timothy Lee on 3/14/15.\n//  Copyright (c) 2015 Timothy Lee <stequald01@gmail.com>\n//\n//   This library is free software; you can redistribute it and/or\n//   modify it under the terms of the GNU Lesser General Public\n//   License as published by the Free Software Foundation; either\n//   version 2.1 of the License, or (at your option) any later version.\n//\n//   This library is distributed in the hope that it will be useful,\n//   but WITHOUT ANY WARRANTY; without even the implied warranty of\n//   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n//   Lesser General Public License for more details.\n//\n//   You should have received a copy of the GNU Lesser General Public\n//   License along with this library; if not, write to the Free Software\n//   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,\n//   MA 02110-1301  USA\n\nimport Foundation\nimport UIKit\n\n@objc(TLAddressListViewController) class TLAddressListViewController: UIViewController, UITableViewDataSource, UITableViewDelegate, CustomIOS7AlertViewDelegate {\n\n    struct STATIC_MEMBERS {\n        static let kStealthAddressSection = \"kStealthAddressSection\"\n        static let kActiveMainSection = \"kActiveMainSection\"\n        static let kArchivedMainSection = \"kArchivedMainSection\"\n        static let kActiveChangeSection = \"kActiveChangeSection\"\n        static let kArchivedChangeSection = \"kArchivedChangeSection\"\n    }\n    \n    var accountObject: TLAccountObject?\n    fileprivate var QRImageModal: TLQRImageModal?\n    fileprivate lazy var sectionArray = Array<String>()\n    var showBalances: Bool = false\n    let TL_STRING_NO_STEALTH_PAYMENT_ADDRESSES_INFO = TLDisplayStrings.CANT_SEE_REUSABLE_ADDRESS_PAYMENTS_STRING()\n    let TL_STRING_NONE_CURRENTLY = TLDisplayStrings.NONE_CURRENTLY_STRING()\n    \n    @IBOutlet fileprivate var addressListTableView: UITableView?\n    \n    required init?(coder aDecoder: NSCoder) {\n        super.init(coder: aDecoder)\n    }\n    \n    override func viewDidLoad() {\n        super.viewDidLoad()\n        setColors()\n        \n        NotificationCenter.default.addObserver(self,\n            selector: #selector(TLAddressListViewController.reloadAddressListTableView(_:)),\n            name: NSNotification.Name(rawValue: TLNotificationEvents.EVENT_DISPLAY_LOCAL_CURRENCY_TOGGLED()), object: nil)\n        NotificationCenter.default.addObserver(self,\n                                               selector: #selector(TLAddressListViewController.reloadAddressListTableView(_:)),\n                                               name: NSNotification.Name(rawValue: TLNotificationEvents.EVENT_EXCHANGE_RATE_UPDATED()), object: nil)\n\n        if TLWalletUtils.ENABLE_STEALTH_ADDRESS() {\n            self.sectionArray = [STATIC_MEMBERS.kStealthAddressSection, STATIC_MEMBERS.kActiveMainSection, STATIC_MEMBERS.kArchivedMainSection, STATIC_MEMBERS.kActiveChangeSection, STATIC_MEMBERS.kArchivedChangeSection]\n        } else {\n            self.sectionArray = [STATIC_MEMBERS.kActiveMainSection, STATIC_MEMBERS.kArchivedMainSection, STATIC_MEMBERS.kActiveChangeSection, STATIC_MEMBERS.kArchivedChangeSection]\n        }\n        \n        self.addressListTableView!.delegate = self\n        self.addressListTableView!.dataSource = self\n        self.addressListTableView!.tableFooterView = UIView(frame: CGRect.zero)\n    }\n    \n    override func viewDidAppear(_ animated: Bool) -> () {\n        NotificationCenter.default.post(name: Notification.Name(rawValue: TLNotificationEvents.EVENT_VIEW_ACCOUNT_ADDRESSES()),\n            object: nil, userInfo: nil)\n    }\n    \n    override func didReceiveMemoryWarning() {\n        super.didReceiveMemoryWarning()\n    }\n    \n    func reloadAddressListTableView(_ notification: Notification) -> () {\n        self.addressListTableView!.reloadData()\n    }\n    \n    fileprivate func promptAddressActionSheet(_ address: String, addressType: TLAddressType,\n        title: String,\n        addressNtxs: Int) -> () {\n            let otherButtonTitles:[String]\n            if (TLPreferences.enabledAdvancedMode()) {\n                otherButtonTitles = [TLDisplayStrings.VIEW_IN_WEB_STRING(), TLDisplayStrings.VIEW_ADDRESS_QR_CODE_STRING(), TLDisplayStrings.VIEW_PRIVATE_KEY_QR_CODE_STRING()]\n            } else {\n                otherButtonTitles = [TLDisplayStrings.VIEW_IN_WEB_STRING(), TLDisplayStrings.VIEW_ADDRESS_QR_CODE_STRING()]\n            }\n            \n            UIAlertController.showAlert(in: self,\n                withTitle: title,\n                message:\"\",\n                preferredStyle: .actionSheet,\n                cancelButtonTitle: TLDisplayStrings.CANCEL_STRING(),\n                destructiveButtonTitle: nil,\n                otherButtonTitles: otherButtonTitles as [AnyObject],\n                \n                tap: {(actionSheet, action, buttonIndex) in\n                    \n                    if (buttonIndex == actionSheet?.firstOtherButtonIndex) {\n                        TLBlockExplorerAPI.instance().openWebViewForAddress(address)\n                        NotificationCenter.default.post(name: Notification.Name(rawValue: TLNotificationEvents.EVENT_VIEW_ACCOUNT_ADDRESS_IN_WEB()),\n                            object: nil, userInfo: nil)\n                        \n                    } else if (buttonIndex == (actionSheet?.firstOtherButtonIndex)! + 1) {\n                        if (TLSuggestions.instance().enabledSuggestDontManageIndividualAccountAddress()) {\n                            TLPrompts.promtForOK(self, title:TLDisplayStrings.WARNING_STRING(), message: TLDisplayStrings.DONT_MANAGE_INDIVIDUAL_ACCOUNT_ADDRESS_WARNING_DESC_STRING(), success: {\n                                () in\n                                self.showAddressQRCode(address)\n                                TLSuggestions.instance().setEnableSuggestDontManageIndividualAccountAddress(false)\n                            })\n                        } else {\n                            self.showAddressQRCode(address)\n                        }\n                    } else if (buttonIndex == (actionSheet?.firstOtherButtonIndex)! + 2) {\n                        if (TLSuggestions.instance().enabledSuggestDontManageIndividualAccountPrivateKeys()) {\n                            TLPrompts.promtForOK(self,title:TLDisplayStrings.WARNING_STRING(), message: TLDisplayStrings.DONT_MANAGE_INDIVIDUAL_ACCOUNT_PRIVATE_KEY_WARNING_DESC_STRING(), success: {\n                                () in\n                                self.showPrivateKeyQRCode(address, addressType: addressType)\n                                TLSuggestions.instance().setEnableSuggestDontManageIndividualAccountPrivateKeys(false)\n                            })\n                        } else {\n                            self.showPrivateKeyQRCode(address, addressType: addressType)\n                        }\n                    } else if (buttonIndex == actionSheet?.cancelButtonIndex) {\n                    }\n            })\n    }\n    \n    fileprivate func showAddressQRCode(_ address: String) -> () {\n        self.QRImageModal = TLQRImageModal(data: address as NSString, buttonCopyText: TLDisplayStrings.COPY_TO_CLIPBOARD_STRING(), vc: self)\n        self.QRImageModal!.show()\n        NotificationCenter.default.post(name: Notification.Name(rawValue: TLNotificationEvents.EVENT_VIEW_ACCOUNT_ADDRESS()),\n            object: nil, userInfo: nil)\n    }\n    \n    fileprivate func showPrivateKeyQRCode(_ address: String, addressType: TLAddressType) -> () {\n        if (self.accountObject!.isWatchOnly() && !self.accountObject!.hasSetExtendedPrivateKeyInMemory() &&\n            (addressType == .main || addressType == .change)) {\n                TLPrompts.promptForTempararyImportExtendedPrivateKey(self, success: {\n                    (data: String!) -> () in\n                    if (!TLHDWalletWrapper.isValidExtendedPrivateKey(data)) {\n                        TLPrompts.promptErrorMessage(TLDisplayStrings.ERROR_STRING(), message: TLDisplayStrings.INVALID_ACCOUNT_PRIVATE_KEY_STRING())\n                    } else {\n                        let success = self.accountObject!.setExtendedPrivateKeyInMemory(data)\n                        if (!success) {\n                            TLPrompts.promptErrorMessage(TLDisplayStrings.ERROR_STRING(), message: TLDisplayStrings.ACCOUNT_PRIVATE_KEY_DOES_NOT_MATCH_STRING())\n                        } else {\n                            self.showPrivateKeyQRCodeFinal(address, addressType: addressType)\n                        }\n                    }\n                    }, error: {\n                        (data: String?) in\n                })\n        } else if self.accountObject!.isColdWalletAccount() {\n            TLPrompts.promptErrorMessage(\"\", message: TLDisplayStrings.COLD_WALLET_PRIVATE_KEYS_ARE_NOT_STORED_HERE_STRING())\n        } else {\n            self.showPrivateKeyQRCodeFinal(address, addressType: addressType)\n        }\n    }\n    \n    fileprivate func showPrivateKeyQRCodeFinal(_ address: String, addressType: TLAddressType) {\n        let privateKey:String\n        if (addressType == .stealth) {\n            privateKey = self.accountObject!.stealthWallet!.getPaymentAddressPrivateKey(address)!\n        } else if (addressType == .main) {\n            privateKey = self.accountObject!.getMainPrivateKey(address)\n        } else {\n            privateKey = self.accountObject!.getChangePrivateKey(address)\n        }\n        \n        self.QRImageModal = TLQRImageModal(data: privateKey as NSString, buttonCopyText: TLDisplayStrings.COPY_TO_CLIPBOARD_STRING(), vc: self)\n        self.QRImageModal!.show()\n        NotificationCenter.default.post(name: Notification.Name(rawValue: TLNotificationEvents.EVENT_VIEW_ACCOUNT_PRIVATE_KEY()), object: nil, userInfo: nil)\n    }\n    \n    func numberOfSections(in tableView: UITableView) -> Int {\n        return self.sectionArray.count\n    }\n    \n    func tableView(_ tableView: UITableView, titleForHeaderInSection section: Int) -> String? {\n        let sectionType = self.sectionArray[section]\n        if sectionType == STATIC_MEMBERS.kStealthAddressSection {\n            //there are no archived stealth payment addresses, because old payment addresses are deleted\n            return TLDisplayStrings.REUSABLE_ADDRESS_PAYMENT_ADDRESSES_STRING()\n        } else if sectionType == STATIC_MEMBERS.kActiveMainSection {\n            return TLDisplayStrings.ACTIVE_MAIN_ADDRESSES_STRING()\n        } else if sectionType == STATIC_MEMBERS.kArchivedMainSection {\n            return TLDisplayStrings.ARCHIVED_MAIN_ADDRESSES_STRING()\n        } else if sectionType == STATIC_MEMBERS.kActiveChangeSection {\n            return TLDisplayStrings.ACTIVE_CHANGE_ADDRESSES_STRING()\n        } else if sectionType == STATIC_MEMBERS.kArchivedChangeSection {\n            return TLDisplayStrings.ARCHIVED_CHANGE_ADDRESSES_STRING()\n        } else {\n            return nil\n        }\n    }\n    \n    func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {\n        let count:Int\n        let sectionType = self.sectionArray[section]\n        if sectionType == STATIC_MEMBERS.kStealthAddressSection {\n            if TLWalletUtils.ENABLE_STEALTH_ADDRESS() && self.accountObject!.getAccountType() != .importedWatch && self.accountObject!.getAccountType() != .coldWallet {\n                count = self.accountObject!.stealthWallet!.getStealthAddressPaymentsCount()\n            } else {\n                count = 0\n            }\n        } else if sectionType == STATIC_MEMBERS.kActiveMainSection {\n            count = self.accountObject!.getMainActiveAddressesCount()\n        } else if sectionType == STATIC_MEMBERS.kArchivedMainSection {\n            count = self.accountObject!.getMainArchivedAddressesCount()\n        } else if sectionType == STATIC_MEMBERS.kActiveChangeSection {\n            count = self.accountObject!.getChangeActiveAddressesCount()\n        } else if sectionType == STATIC_MEMBERS.kArchivedChangeSection {\n            count = self.accountObject!.getChangeArchivedAddressesCount()\n        } else {\n            count = 0\n        }\n        return count == 0 ? 1 : count\n    }\n    \n    func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {\n        let MyIdentifier = \"AddressCellIdentifier\"\n        \n        var cell = tableView.dequeueReusableCell(withIdentifier: MyIdentifier) as! TLAddressTableViewCell?\n        if (cell == nil) {\n            cell = UITableViewCell(style: UITableViewCellStyle.subtitle,\n                reuseIdentifier: MyIdentifier) as? TLAddressTableViewCell\n        }\n        let sectionType = self.sectionArray[(indexPath as NSIndexPath).section]\n        if sectionType == STATIC_MEMBERS.kStealthAddressSection || sectionType == STATIC_MEMBERS.kActiveMainSection || sectionType == STATIC_MEMBERS.kActiveChangeSection {\n            cell!.textLabel!.isHidden = true\n            cell!.amountButton!.isHidden = false\n            cell!.addressLabel!.isHidden = false\n            cell!.addressLabel!.adjustsFontSizeToFitWidth = true\n            \n            var address = \"\"\n            var balance = \"\"\n            if sectionType == STATIC_MEMBERS.kStealthAddressSection {\n                if TLWalletUtils.ENABLE_STEALTH_ADDRESS() && self.accountObject!.getAccountType() != .importedWatch && self.accountObject!.getAccountType() != .coldWallet {\n                    if (self.accountObject!.stealthWallet!.getStealthAddressPaymentsCount() == 0) {\n                        address = TL_STRING_NONE_CURRENTLY\n                    } else {\n                        let idx = self.accountObject!.stealthWallet!.getStealthAddressPaymentsCount() - 1 - (indexPath as NSIndexPath).row\n                        address = self.accountObject!.stealthWallet!.getPaymentAddressForIndex(idx)\n                    }\n                } else {\n                    cell!.textLabel!.isHidden = false\n                    cell!.addressLabel!.isHidden = true\n                    cell!.textLabel!.numberOfLines = 0\n                    cell!.textLabel!.text = TL_STRING_NO_STEALTH_PAYMENT_ADDRESSES_INFO\n                    address = TL_STRING_NO_STEALTH_PAYMENT_ADDRESSES_INFO\n                }\n            } else if sectionType == STATIC_MEMBERS.kActiveMainSection {\n                if (self.accountObject!.getMainActiveAddressesCount() == 0) {\n                    address = TL_STRING_NONE_CURRENTLY\n                } else {\n                    let idx = self.accountObject!.getMainActiveAddressesCount() - 1 - (indexPath as NSIndexPath).row\n                    address = self.accountObject!.getMainActiveAddress(idx)\n                }\n            } else if sectionType == STATIC_MEMBERS.kActiveChangeSection {\n                if (self.accountObject!.getChangeActiveAddressesCount() == 0) {\n                    address = TL_STRING_NONE_CURRENTLY\n                } else {\n                    let idx = self.accountObject!.getChangeActiveAddressesCount() - 1 - (indexPath as NSIndexPath).row\n                    address = self.accountObject!.getChangeActiveAddress(idx)\n                }\n            }\n            \n            cell!.addressLabel!.text = address\n            if (self.showBalances && address != TL_STRING_NONE_CURRENTLY && address != TL_STRING_NO_STEALTH_PAYMENT_ADDRESSES_INFO &&\n                (sectionType == STATIC_MEMBERS.kStealthAddressSection || sectionType == STATIC_MEMBERS.kActiveMainSection || sectionType == STATIC_MEMBERS.kActiveChangeSection)) {\n                    // only show balances of active addresses\n                    cell!.amountButton!.isHidden = false\n                    balance = TLCurrencyFormat.getProperAmount(self.accountObject!.getAddressBalance(address)) as String\n                    cell!.amountButton!.setTitle(balance, for: UIControlState())\n            } else {\n                cell!.amountButton!.isHidden = true\n            }            \n        } else {\n            cell!.textLabel!.isHidden = false\n            cell!.amountButton!.isHidden = true\n            cell!.addressLabel!.isHidden = true\n            cell!.textLabel!.adjustsFontSizeToFitWidth = true\n            \n            var address = \"\"\n            if sectionType == STATIC_MEMBERS.kArchivedMainSection {\n                if (self.accountObject!.getMainArchivedAddressesCount() == 0) {\n                    address = TL_STRING_NONE_CURRENTLY\n                } else {\n                    let idx = self.accountObject!.getMainArchivedAddressesCount() - 1 - (indexPath as NSIndexPath).row\n                    address = self.accountObject!.getMainArchivedAddress(idx)\n                }\n            } else if sectionType == STATIC_MEMBERS.kArchivedChangeSection {\n                if (self.accountObject!.getChangeArchivedAddressesCount() == 0) {\n                    address = TL_STRING_NONE_CURRENTLY\n                } else {\n                    let idx = self.accountObject!.getChangeArchivedAddressesCount() - 1 - (indexPath as NSIndexPath).row\n                    address = self.accountObject!.getChangeArchivedAddress(idx)\n                }\n            }\n            \n            cell!.textLabel!.text = address\n        }\n        \n        if ((indexPath as NSIndexPath).row % 2 == 0) {\n            cell!.backgroundColor = TLColors.evenTableViewCellColor()\n        } else {\n            cell!.backgroundColor = TLColors.oddTableViewCellColor()\n        }\n        \n        return cell!\n    }\n    \n    func tableView(_ tableView: UITableView, willSelectRowAt indexPath: IndexPath) -> IndexPath? {\n        var address = \"\"\n        let cell = tableView.cellForRow(at: indexPath) as! TLAddressTableViewCell\n        \n        let sectionType = self.sectionArray[(indexPath as NSIndexPath).section]\n        if sectionType == STATIC_MEMBERS.kStealthAddressSection || sectionType == STATIC_MEMBERS.kActiveMainSection || sectionType == STATIC_MEMBERS.kActiveChangeSection {\n            address = cell.addressLabel!.text!\n        } else {\n            address = cell.textLabel!.text!\n        }\n        \n        if address == TL_STRING_NONE_CURRENTLY || address == TL_STRING_NO_STEALTH_PAYMENT_ADDRESSES_INFO {\n            return nil\n        }\n        \n        let addressType:TLAddressType\n        let title:String\n        if sectionType == STATIC_MEMBERS.kStealthAddressSection {\n            addressType = .stealth\n            title = String(format: TLDisplayStrings.PAYMENT_INDEX_X_STRING(), self.accountObject!.stealthWallet!.getStealthAddressPaymentsCount() - (indexPath as NSIndexPath).row)\n        } else if sectionType == STATIC_MEMBERS.kActiveMainSection || sectionType == STATIC_MEMBERS.kActiveChangeSection {\n            addressType = .main\n            title = String(format: TLDisplayStrings.ADDRESS_ID_X_STRING_STRING(), self.accountObject!.getAddressHDIndex(address))\n        } else {\n            addressType = .change\n            title = String(format: TLDisplayStrings.ADDRESS_ID_X_STRING_STRING(), self.accountObject!.getAddressHDIndex(address))\n        }\n        \n        var nTxs = 0\n        if (sectionType == STATIC_MEMBERS.kActiveMainSection || sectionType == STATIC_MEMBERS.kActiveChangeSection) {\n            nTxs = self.accountObject!.getNumberOfTransactionsForAddress(address)\n        }\n        \n        promptAddressActionSheet(address, addressType: addressType, title: title,\n            addressNtxs: nTxs)\n        \n        return nil\n    }\n    \n    func customIOS7dialogButtonTouchUp(inside alertView: CustomIOS7AlertView, clickedButtonAt buttonIndex: Int) {\n        if (buttonIndex == 0) {\n            iToast.makeText(TLDisplayStrings.COPY_TO_CLIPBOARD_STRING()).setGravity(iToastGravityCenter).setDuration(1000).show()\n            \n            let pasteboard = UIPasteboard.general\n            pasteboard.string = self.QRImageModal!.QRcodeDisplayData\n        }\n        \n        alertView.close()\n    }\n    \n    deinit {\n        NotificationCenter.default.removeObserver(self)\n    }\n}\n"
  },
  {
    "path": "ArcBit/viewControllers/TLAddressTableViewCell.swift",
    "content": "//\n//  TLAddressTableViewCell.swift\n//  ArcBit\n//\n//  Created by Timothy Lee on 3/14/15.\n//  Copyright (c) 2015 Timothy Lee <stequald01@gmail.com>\n//\n//   This library is free software; you can redistribute it and/or\n//   modify it under the terms of the GNU Lesser General Public\n//   License as published by the Free Software Foundation; either\n//   version 2.1 of the License, or (at your option) any later version.\n//\n//   This library is distributed in the hope that it will be useful,\n//   but WITHOUT ANY WARRANTY; without even the implied warranty of\n//   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n//   Lesser General Public License for more details.\n//\n//   You should have received a copy of the GNU Lesser General Public\n//   License along with this library; if not, write to the Free Software\n//   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,\n//   MA 02110-1301  USA\n\nimport Foundation\nimport UIKit\n\n@objc(TLAddressTableViewCell) class TLAddressTableViewCell:UITableViewCell {\n    required init?(coder aDecoder: NSCoder) {\n        super.init(coder: aDecoder)\n    }\n    \n    @IBOutlet var addressLabel : UILabel?\n    @IBOutlet var numberOfTransactionsCountLabel : UILabel?\n    @IBOutlet var amountButton : UIButton?\n    \n    override func awakeFromNib() {\n        super.awakeFromNib()\n        self.amountButton!.backgroundColor = TLColors.mainAppColor()\n        self.amountButton!.setTitleColor(TLColors.mainAppOppositeColor(), for:UIControlState())\n        self.amountButton!.titleLabel!.adjustsFontSizeToFitWidth = true\n    }\n    \n    override func setSelected(_ selected:Bool, animated:Bool) -> () {\n        super.setSelected(selected, animated:animated)\n    }\n    \n    @IBAction fileprivate func amountButtonClicked(_ sender:UIButton) {\n        TLPreferences.setDisplayLocalCurrency(!TLPreferences.isDisplayLocalCurrency())\n        TLPreferences.setInAppSettingsKitDisplayLocalCurrency(TLPreferences.isDisplayLocalCurrency())\n    }\n}\n"
  },
  {
    "path": "ArcBit/viewControllers/TLAuthorizeColdWalletPaymentViewController.swift",
    "content": "//\n//  TLAuthorizeColdWalletPaymentViewController.swift\n//  ArcBit\n//\n//  Created by Timothy Lee on 3/14/15.\n//  Copyright (c) 2015 Timothy Lee <stequald01@gmail.com>\n//\n//   This library is free software; you can redistribute it and/or\n//   modify it under the terms of the GNU Lesser General Public\n//   License as published by the Free Software Foundation; either\n//   version 2.1 of the License, or (at your option) any later version.\n//\n//   This library is distributed in the hope that it will be useful,\n//   but WITHOUT ANY WARRANTY; without even the implied warranty of\n//   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n//   Lesser General Public License for more details.\n//\n//   You should have received a copy of the GNU Lesser General Public\n//   License along with this library; if not, write to the Free Software\n//   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,\n//   MA 02110-1301  USA\n\n\n\nimport Foundation\nimport UIKit\n\n@objc(TLAuthorizeColdWalletPaymentViewController) class  TLAuthorizeColdWalletPaymentViewController : UIViewController, UITableViewDataSource, UITableViewDelegate, UITextViewDelegate, TLScanUnsignedTxTableViewCellDelegate, TLInputColdWalletKeyTableViewCellDelegate, TLPassSignedTxTableViewCellDelegate, CustomIOS7AlertViewDelegate {\n    \n    struct STATIC_MEMBERS {\n        static let kInstuctionsSection = \"kInstuctionsSection\"\n        static let kSpendColdWalletSection = \"kSpendColdWalletSection\"\n        \n        static let kScanUnsignedTxRow = \"kScanUnsignedTxRow\"\n        static let kInputKeyRow = \"kInputKeyRow\"\n        static let kPassSignedTxRow = \"kPassSignedTxRow\"\n    }\n    \n    @IBOutlet fileprivate var tableView: UITableView?\n    fileprivate var QRImageModal: TLQRImageModal?\n    fileprivate var sectionArray: Array<String>?\n    fileprivate var instructionsRowArray: Array<String>?\n    fileprivate var spendColdWalletRowArray: Array<String>?\n    fileprivate var tapGesture: UITapGestureRecognizer?\n    fileprivate var scanUnsignedTxTableViewCell: TLScanUnsignedTxTableViewCell?\n    fileprivate var inputColdWalletKeyTableViewCell: TLInputColdWalletKeyTableViewCell?\n    fileprivate var passSignedTxTableViewCell: TLPassSignedTxTableViewCell?\n\n    private var scannedUnsignedTxAirGapDataPartsDict = [Int:String]()\n    private var totalExpectedParts:Int = 0\n    private var scannedUnsignedTxAirGapData:String? = nil\n    private var airGapDataBase64PartsArray: Array<String>?\n    private var savedAirGapDataBase64PartsArray: Array<String>?\n\n    override func viewDidLoad() {\n        super.viewDidLoad()\n        setColors()\n        \n        NotificationCenter.default.addObserver(self ,selector:#selector(TLCreateColdWalletViewController.keyboardWillShow(_:)),\n                                                         name:NSNotification.Name.UIKeyboardWillShow, object:nil)\n        NotificationCenter.default.addObserver(self ,selector:#selector(TLCreateColdWalletViewController.keyboardWillHide(_:)),\n                                                         name:NSNotification.Name.UIKeyboardWillHide, object:nil)\n        \n        self.tapGesture = UITapGestureRecognizer(target: self,\n                                                 action: #selector(dismissKeyboard))\n        \n        self.view.addGestureRecognizer(self.tapGesture!)\n        \n        self.sectionArray = [STATIC_MEMBERS.kInstuctionsSection, STATIC_MEMBERS.kSpendColdWalletSection]\n        self.instructionsRowArray = []\n        \n        self.spendColdWalletRowArray = [STATIC_MEMBERS.kScanUnsignedTxRow, STATIC_MEMBERS.kInputKeyRow, STATIC_MEMBERS.kPassSignedTxRow]\n        \n        self.tableView!.delegate = self\n        self.tableView!.dataSource = self\n        self.tableView!.tableFooterView = UIView(frame:CGRect.zero)\n    }\n    \n    func dismissKeyboard() {\n        self.inputColdWalletKeyTableViewCell?.keyInputTextView.resignFirstResponder()\n    }\n    \n    func didClickScanUnsignedTxInfoButton(_ cell: TLScanUnsignedTxTableViewCell) {\n        dismissKeyboard()\n        let msg = TLDisplayStrings.SCAN_UNSIGNED_TX_INFO_STRING()\n        TLPrompts.promtForOK(self, title:\"\", message: msg, success: {\n            () in\n        })\n    }\n\n    func didClickInputColdWalletKeyInfoButton(_ cell: TLInputColdWalletKeyTableViewCell) {\n        dismissKeyboard()\n        let msg = TLDisplayStrings.INPUT_COLD_WALLET_KEY_INFO_STRING()\n        TLPrompts.promtForOK(self, title:\"\", message: msg, success: {\n            () in\n        })\n    }\n    \n    func didClickPassSignedTxInfoButton(_ cell: TLPassSignedTxTableViewCell) {\n        dismissKeyboard()\n        let msg = TLDisplayStrings.PASS_SIGNED_TX_INFO_STRING()\n        TLPrompts.promtForOK(self, title:\"\", message: msg, success: {\n            () in\n        })\n    }\n    \n    func checkToCreateSignedTx() {\n        let keyText = self.inputColdWalletKeyTableViewCell?.keyInputTextView.text\n        if keyText == nil || keyText!.isEmpty {\n            self.inputColdWalletKeyTableViewCell?.statusLabel.text = TLDisplayStrings.INCOMPLETE_STRING()\n            self.inputColdWalletKeyTableViewCell?.setstatusLabel(false)\n            self.passSignedTxTableViewCell?.passButton.isEnabled = false\n            self.passSignedTxTableViewCell?.passButton.alpha = 0.5\n            return\n        }\n        if !TLHDWalletWrapper.phraseIsValid(keyText!) && !TLHDWalletWrapper.isValidExtendedPrivateKey(keyText!) {\n            self.inputColdWalletKeyTableViewCell?.statusLabel.text = TLDisplayStrings.INVALID_PASSPHRASE_STRING()\n            self.inputColdWalletKeyTableViewCell?.setstatusLabel(false)\n            self.passSignedTxTableViewCell?.passButton.isEnabled = false\n            self.passSignedTxTableViewCell?.passButton.alpha = 0.5\n            return\n        }\n        if self.scannedUnsignedTxAirGapData == nil {\n            self.inputColdWalletKeyTableViewCell?.statusLabel.text = TLDisplayStrings.COMPLETE_STEP_1_STRING()\n            self.inputColdWalletKeyTableViewCell?.setstatusLabel(false)\n            self.passSignedTxTableViewCell?.passButton.isEnabled = false\n            self.passSignedTxTableViewCell?.passButton.alpha = 0.5\n            return\n        }\n        \n        do {\n            let serializedSignedAipGapData = try TLColdWallet.createSerializedSignedTxAipGapData(self.scannedUnsignedTxAirGapData!,\n                                                                                               mnemonicOrExtendedPrivateKey: keyText!,\n                                                                                               isTestnet: AppDelegate.instance().appWallet.walletConfig.isTestnet)\n            self.airGapDataBase64PartsArray = TLColdWallet.splitStringToArray(serializedSignedAipGapData!)\n            self.savedAirGapDataBase64PartsArray = TLColdWallet.splitStringToArray(serializedSignedAipGapData!)\n            \n            self.inputColdWalletKeyTableViewCell?.statusLabel.text = TLDisplayStrings.COMPLETE_STRING()\n            self.inputColdWalletKeyTableViewCell?.setstatusLabel(true)\n            self.passSignedTxTableViewCell?.passButton.isEnabled = true\n            self.passSignedTxTableViewCell?.passButton.alpha = 1.0\n        } catch TLColdWallet.TLColdWalletError.InvalidScannedData(let error) { //shouldn't happen, if user scanned correct QR codes\n            self.airGapDataBase64PartsArray = nil\n            self.savedAirGapDataBase64PartsArray = nil\n            self.scanUnsignedTxTableViewCell?.setInvalidScannedData()\n            self.passSignedTxTableViewCell?.passButton.isEnabled = false\n            self.passSignedTxTableViewCell?.passButton.alpha = 0.5\n        } catch TLColdWallet.TLColdWalletError.InvalidKey(let error) {\n            self.airGapDataBase64PartsArray = nil\n            self.savedAirGapDataBase64PartsArray = nil\n            self.inputColdWalletKeyTableViewCell?.statusLabel.text = TLDisplayStrings.INVALID_PASSPHRASE_STRING()\n            self.inputColdWalletKeyTableViewCell?.setstatusLabel(false)\n            self.passSignedTxTableViewCell?.passButton.isEnabled = false\n            self.passSignedTxTableViewCell?.passButton.alpha = 0.5\n        } catch TLColdWallet.TLColdWalletError.MisMatchExtendedPublicKey(let error) {\n            self.airGapDataBase64PartsArray = nil\n            self.savedAirGapDataBase64PartsArray = nil\n            self.inputColdWalletKeyTableViewCell?.statusLabel.text = TLDisplayStrings.PASSPHRASE_DOES_NOT_MATCH_THE_TRANSACTION_STRING()\n            self.inputColdWalletKeyTableViewCell?.setstatusLabel(false)\n            self.passSignedTxTableViewCell?.passButton.isEnabled = false\n            self.passSignedTxTableViewCell?.passButton.alpha = 0.5\n        } catch {\n        }\n    }\n\n    func didClickScanButton(_ cell: TLScanUnsignedTxTableViewCell) {\n        dismissKeyboard()\n    \n        scanUnsignedTx(success: { () in\n            if self.totalExpectedParts != 0 && self.scannedUnsignedTxAirGapDataPartsDict.count == self.totalExpectedParts {\n                self.scannedUnsignedTxAirGapData = \"\"\n                for i in stride(from: 1, through: self.totalExpectedParts, by: 1) {\n                    let dataPart = self.scannedUnsignedTxAirGapDataPartsDict[i]\n                    self.scannedUnsignedTxAirGapData = self.scannedUnsignedTxAirGapData! + dataPart!\n                }\n                self.scannedUnsignedTxAirGapDataPartsDict = [Int:String]()\n                self.checkToCreateSignedTx()\n            }\n            }, error: {\n                () in\n        })\n    }\n    \n    func scanUnsignedTx(success: @escaping (TLWalletUtils.Success), error: @escaping (TLWalletUtils.Error)) {\n        AppDelegate.instance().showColdWalletSpendReaderControllerFromViewController(self, success: {\n            (data: String!) in\n            let ret = TLColdWallet.parseScannedPart(data)\n            let dataPart = ret.0\n            let partNumber = ret.1\n            let totalParts = ret.2\n            \n            self.totalExpectedParts = totalParts\n            self.scannedUnsignedTxAirGapDataPartsDict[partNumber] = dataPart\n            \n            self.scanUnsignedTxTableViewCell?.setstatusLabel(self.scannedUnsignedTxAirGapDataPartsDict.count, totalParts: totalParts)\n            success()\n            }, error: {\n                (data: String?) in\n                error()\n        })\n    }\n    \n    func showNextSignedTxPartQRCode() {\n        if self.airGapDataBase64PartsArray == nil {\n            return\n        }\n        let nextAipGapDataPart = self.airGapDataBase64PartsArray![0]\n        self.airGapDataBase64PartsArray!.remove(at: 0)\n        self.QRImageModal = TLQRImageModal(data: nextAipGapDataPart as NSString, buttonCopyText: TLDisplayStrings.NEXT_STRING(), vc: self)\n        self.QRImageModal!.show()\n    }\n\n    func didClickPassButton(_ cell: TLPassSignedTxTableViewCell) {\n        dismissKeyboard()\n        if self.airGapDataBase64PartsArray == nil {\n            return\n        }\n        TLPrompts.promtForOKCancel(self, title: TLDisplayStrings.TRANSACTION_AUTHORIZED_STRING(), message: \"Transaction needs to be passed back to your online device in order for the payment to be sent\", success: {\n            () in\n                self.showNextSignedTxPartQRCode()\n            \n            }, failure: {\n                (isCancelled: Bool) in\n        })\n    }\n    \n    func textViewDidChange(_ textView: UITextView) {\n        if textView == self.inputColdWalletKeyTableViewCell?.keyInputTextView {\n            self.checkToCreateSignedTx()\n        }\n    }\n    \n    func numberOfSections(in tableView:UITableView) -> Int {\n        return self.sectionArray!.count\n    }\n    \n    func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {\n        let section = self.sectionArray![(indexPath as NSIndexPath).section]\n        if(section == STATIC_MEMBERS.kInstuctionsSection) {\n            return 100\n        } else if(section == STATIC_MEMBERS.kSpendColdWalletSection) {\n            let row = self.spendColdWalletRowArray![(indexPath as NSIndexPath).row]\n            if row == STATIC_MEMBERS.kScanUnsignedTxRow {\n                return TLScanUnsignedTxTableViewCell.cellHeight()\n            } else if row == STATIC_MEMBERS.kInputKeyRow {\n                return TLInputColdWalletKeyTableViewCell.cellHeight()\n            } else if row == STATIC_MEMBERS.kPassSignedTxRow {\n                return TLPassSignedTxTableViewCell.cellHeight()\n            }\n        }\n        return 0\n    }\n    \n    func tableView(_ tableView:UITableView, titleForHeaderInSection section:Int) -> String? {\n        let section = self.sectionArray![section]\n        if(section == STATIC_MEMBERS.kInstuctionsSection) {\n            return \"\"\n        } else if(section == STATIC_MEMBERS.kSpendColdWalletSection) {\n            return \"\"\n        }\n        return \"\"\n    }\n    \n    \n    func tableView(_ tableView: UITableView, numberOfRowsInSection section:Int) -> Int {\n        let section = self.sectionArray![section]\n        if (section == STATIC_MEMBERS.kInstuctionsSection) {\n            return self.instructionsRowArray!.count\n        } else if(section == STATIC_MEMBERS.kSpendColdWalletSection) {\n            return self.spendColdWalletRowArray!.count\n        }\n        return 0\n    }\n    \n    func tableView(_ tableView: UITableView, cellForRowAt indexPath:IndexPath) -> UITableViewCell{\n        let section = self.sectionArray![(indexPath as NSIndexPath).section];\n        if (section == STATIC_MEMBERS.kInstuctionsSection) {\n            let MyIdentifier = \"InstructionsCellIdentifier\"\n            \n            var cell = tableView.dequeueReusableCell(withIdentifier: MyIdentifier)\n            if (cell == nil) {\n                cell = UITableViewCell(style:UITableViewCellStyle.default,\n                                       reuseIdentifier:MyIdentifier)\n            }\n            return cell!\n        } else if(section == STATIC_MEMBERS.kSpendColdWalletSection) {\n            let row = self.spendColdWalletRowArray![(indexPath as NSIndexPath).row];\n            self.spendColdWalletRowArray = [STATIC_MEMBERS.kScanUnsignedTxRow, STATIC_MEMBERS.kInputKeyRow, STATIC_MEMBERS.kPassSignedTxRow]\n\n            if row == STATIC_MEMBERS.kScanUnsignedTxRow {\n                let MyIdentifier = \"ScanUnsignedTxCellIdentifier\"\n                var cell = tableView.dequeueReusableCell(withIdentifier: MyIdentifier) as! TLScanUnsignedTxTableViewCell?\n                if (cell == nil) {\n                    cell = UITableViewCell(style: UITableViewCellStyle.default,\n                                           reuseIdentifier: MyIdentifier) as? TLScanUnsignedTxTableViewCell\n                }\n                \n                cell?.delegate = self\n                self.scanUnsignedTxTableViewCell = cell\n                return cell!\n            } else if row == STATIC_MEMBERS.kInputKeyRow {\n                let MyIdentifier = \"InputColdWalletKeyCellIdentifier\"\n                var cell = tableView.dequeueReusableCell(withIdentifier: MyIdentifier) as! TLInputColdWalletKeyTableViewCell?\n                if (cell == nil) {\n                    cell = UITableViewCell(style: UITableViewCellStyle.default,\n                                           reuseIdentifier: MyIdentifier) as? TLInputColdWalletKeyTableViewCell\n                }\n                \n                cell?.delegate = self\n                cell?.keyInputTextView.delegate = self\n                self.inputColdWalletKeyTableViewCell = cell\n                return cell!\n            } else if row == STATIC_MEMBERS.kPassSignedTxRow {\n                let MyIdentifier = \"PassSignedTxCellIdentifier\"\n                var cell = tableView.dequeueReusableCell(withIdentifier: MyIdentifier) as! TLPassSignedTxTableViewCell?\n                if (cell == nil) {\n                    cell = UITableViewCell(style: UITableViewCellStyle.default,\n                                           reuseIdentifier: MyIdentifier) as? TLPassSignedTxTableViewCell\n                }\n                \n                cell?.delegate = self\n                self.passSignedTxTableViewCell = cell\n                return cell!\n            }\n        }\n        \n        return UITableViewCell(style:UITableViewCellStyle.default,\n                               reuseIdentifier:\"DefaultCellIdentifier\")\n    }\n    \n    func keyboardWillShow(_ sender: Notification) {\n        let kbSize = ((sender as NSNotification).userInfo![UIKeyboardFrameEndUserInfoKey]! as AnyObject).cgRectValue!.size\n        \n        let duration = ((sender as NSNotification).userInfo![UIKeyboardAnimationDurationUserInfoKey]! as AnyObject).doubleValue!\n        \n        let height = UIDeviceOrientationIsPortrait(UIDevice.current.orientation) ? kbSize.height : kbSize.width;\n        UIView.animate(withDuration: duration, delay: 1.0, options: UIViewAnimationOptions(), animations: {\n            var edgeInsets = self.tableView!.contentInset;\n            edgeInsets.bottom = height;\n            self.tableView!.contentInset = edgeInsets;\n            edgeInsets = self.tableView!.scrollIndicatorInsets;\n            edgeInsets.bottom = height;\n            self.tableView!.scrollIndicatorInsets = edgeInsets;\n            }, completion: { finished in\n        })\n    }\n    \n    func keyboardWillHide(_ sender: Notification) {\n        let duration = ((sender as NSNotification).userInfo![UIKeyboardAnimationDurationUserInfoKey]! as AnyObject).doubleValue!\n        UIView.animate(withDuration: duration, delay: 1.0, options: UIViewAnimationOptions(), animations: {\n            var edgeInsets = self.tableView!.contentInset;\n            edgeInsets.bottom = 0;\n            self.tableView!.contentInset = edgeInsets;\n            edgeInsets = self.tableView!.scrollIndicatorInsets;\n            edgeInsets.bottom = 0;\n            self.tableView!.scrollIndicatorInsets = edgeInsets;\n            }, completion: { finished in\n        })\n    }\n    \n    func customIOS7dialogButtonTouchUp(inside alertView: CustomIOS7AlertView, clickedButtonAt buttonIndex: Int) {\n        if (buttonIndex == 0) {\n            if self.airGapDataBase64PartsArray == nil {\n                return\n            }\n            if self.airGapDataBase64PartsArray!.count > 0 {\n                self.showNextSignedTxPartQRCode()\n            } else {\n                TLPrompts.promtForOK(self, title: TLDisplayStrings.FINISHED_PASSING_TRANSACTION_DATA_STRING(),\n                                     message: TLDisplayStrings.FINISHED_PASSING_TRANSACTION_DATA_DESC_STRING(), success: {\n                                        () in\n                                        self.airGapDataBase64PartsArray = self.savedAirGapDataBase64PartsArray\n                                        //for part in self.savedAirGapDataBase64PartsArray! {\n                                        //    self.airGapDataBase64PartsArray!.append(part.copy() as! String)\n                                        //}\n                                        \n                })\n            }\n        } else {\n            self.airGapDataBase64PartsArray = self.savedAirGapDataBase64PartsArray\n        }\n        \n        alertView.close()\n    }\n}\n"
  },
  {
    "path": "ArcBit/viewControllers/TLBrainWalletViewController.swift",
    "content": "//\n//  TLBrainWalletViewController.swift\n//  ArcBit\n//\n//  Created by Timothy Lee on 3/14/15.\n//  Copyright (c) 2015 Timothy Lee <stequald01@gmail.com>\n//\n//   This library is free software; you can redistribute it and/or\n//   modify it under the terms of the GNU Lesser General Public\n//   License as published by the Free Software Foundation; either\n//   version 2.1 of the License, or (at your option) any later version.\n//\n//   This library is distributed in the hope that it will be useful,\n//   but WITHOUT ANY WARRANTY; without even the implied warranty of\n//   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n//   Lesser General Public License for more details.\n//\n//   You should have received a copy of the GNU Lesser General Public\n//   License along with this library; if not, write to the Free Software\n//   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,\n//   MA 02110-1301  USA\n\n\n\nimport Foundation\nimport UIKit\n\n@objc(TLBrainWalletViewController) class TLBrainWalletViewController : UIViewController, UITableViewDataSource, UITableViewDelegate, UITextViewDelegate, UITextFieldDelegate, TLAdvancedNewWalletTableViewCellDelegate, TLColdWalletSelectKeyTypeTableViewCellDelegate, CustomIOS7AlertViewDelegate {\n    \n    struct STATIC_MEMBERS {\n        static let kInstuctionsSection = \"kInstuctionsSection\"\n        static let kCreateNewWalletSection = \"kCreateNewWalletSection\"\n        static let kSelectWhichKeyRow = \"kSelectWhichKeyRow\"\n        static let kAdvancedNewWalletRow = \"kAdvancedNewWalletRow\"\n    }\n    \n    @IBOutlet fileprivate var tableView: UITableView?\n    fileprivate var QRImageModal: TLQRImageModal?\n    fileprivate var mnemonicPassphrase: String?\n    //    private var shouldShowMore: Bool = false\n    fileprivate var masterHex: String?\n    fileprivate var extendedKeyIdx: UInt?\n    fileprivate var extendedPublicKey: String?\n    fileprivate var extendedPrivateKey: String?\n    fileprivate var sectionArray: Array<String>?\n    fileprivate var instructionsRowArray: Array<String>?\n    fileprivate var createNewWalletRowArray: Array<String>?\n    fileprivate var advancedNewWalletTableViewCell: TLAdvancedNewWalletTableViewCell?\n    fileprivate var tapGesture: UITapGestureRecognizer?\n    fileprivate lazy var coldWalletKeyType: TLColdWalletKeyType = .mnemonic\n\n    override func viewDidLoad() {\n        super.viewDidLoad()\n        setColors()\n        \n        NotificationCenter.default.addObserver(self ,selector:#selector(TLBrainWalletViewController.keyboardWillShow(_:)),\n                                                         name:NSNotification.Name.UIKeyboardWillShow, object:nil)\n        NotificationCenter.default.addObserver(self ,selector:#selector(TLBrainWalletViewController.keyboardWillHide(_:)),\n                                                         name:NSNotification.Name.UIKeyboardWillHide, object:nil)\n        \n        self.tapGesture = UITapGestureRecognizer(target: self,\n                                                 action: #selector(dismissKeyboard))\n        \n        self.view.addGestureRecognizer(self.tapGesture!)\n        \n        self.extendedKeyIdx = 0\n        self.sectionArray = [STATIC_MEMBERS.kInstuctionsSection, STATIC_MEMBERS.kCreateNewWalletSection]\n        self.instructionsRowArray = []\n        \n        self.createNewWalletRowArray = [STATIC_MEMBERS.kSelectWhichKeyRow, STATIC_MEMBERS.kAdvancedNewWalletRow]\n\n        \n        self.tableView!.delegate = self\n        self.tableView!.dataSource = self\n        self.tableView!.tableFooterView = UIView(frame:CGRect.zero)\n    }\n    \n    func dismissKeyboard() {\n        self.advancedNewWalletTableViewCell?.mnemonicTextView.resignFirstResponder()\n        self.advancedNewWalletTableViewCell?.accountIDTextField.resignFirstResponder()\n        self.advancedNewWalletTableViewCell?.accountPublicKeyTextView.resignFirstResponder()\n        self.advancedNewWalletTableViewCell?.accountPrivateKeyTextView.resignFirstResponder()\n        self.advancedNewWalletTableViewCell?.startingAddressIDTextField.resignFirstResponder()\n        self.advancedNewWalletTableViewCell?.startingChangeAddressIDTextField.resignFirstResponder()\n    }\n    \n    func didSelectColdWalletKeyType(_ cell: TLColdWalletSelectKeyTypeTableViewCell, keyType: TLColdWalletKeyType) {\n        self.coldWalletKeyType = keyType\n        self.tableView?.reloadData()\n    }\n\n    \n    func didAdvancedNewWalletClickShowQRCodeButton(_ cell: TLAdvancedNewWalletTableViewCell, data: String) {\n        dismissKeyboard()\n        self.QRImageModal = TLQRImageModal(data: data as NSString, buttonCopyText: TLDisplayStrings.COPY_TO_CLIPBOARD_STRING(), vc: self)\n        self.QRImageModal!.show()\n    }\n    \n    func textFieldDidBeginEditing(_ textField: UITextField) {\n        //        var frame:CGRect = CGRectMake(textField.frame.origin.x, textField.frame.origin.y, textField.frame.size.width, textField.frame.size.height)\n        //        if textField == self.newWalletTableViewCell?.accountIDTextField {\n        //            frame.origin.y += 100\n        //        } else {\n        //            frame.origin.y += 50\n        //        }\n        //        self.tableView!.scrollRectToVisible(self.tableView!.convertRect(frame, fromView:textField.superview), animated:true)\n        self.tableView!.scrollRectToVisible(self.tableView!.convert(textField.frame, from:textField.superview), animated:true)\n    }\n    \n    func textViewDidBeginEditing(_ textView: UITextView) {\n        let frame = CGRect(x: textView.frame.origin.x, y: textView.frame.origin.y+50, width: textView.frame.size.width, height: textView.frame.size.height)\n        self.tableView!.scrollRectToVisible(self.tableView!.convert(frame, from:textView.superview), animated:true)\n    }\n    \n    func textField(_ textField: UITextField, shouldChangeCharactersIn range: NSRange, replacementString string: String) -> Bool {\n        \n        if textField == self.advancedNewWalletTableViewCell?.accountIDTextField {\n            \n            let nsString = textField.text! as NSString\n            let newString = nsString.replacingCharacters(in: range, with: string)\n            \n            var HDAccountID:Int = 0\n            if let accountID = Int(newString) {\n                HDAccountID = accountID\n            }\n            \n            if self.coldWalletKeyType != .mnemonic {\n                return true\n            }\n            self.advancedNewWalletTableViewCell?.didUpdateMnemonic(self.advancedNewWalletTableViewCell!.mnemonicTextView.text, accountID: HDAccountID)\n\n        } else if textField == self.advancedNewWalletTableViewCell?.startingAddressIDTextField {\n            let nsString = textField.text! as NSString\n            let newString = nsString.replacingCharacters(in: range, with: string)\n            \n            var addressID:Int = 0\n            if let addrID = Int(newString) {\n                addressID = addrID\n            }\n            self.advancedNewWalletTableViewCell?.updateAddressFieldsWithStartingAddressID(addressID)\n        } else if textField == self.advancedNewWalletTableViewCell?.startingChangeAddressIDTextField {\n            let nsString = textField.text! as NSString\n            let newString = nsString.replacingCharacters(in: range, with: string)\n            \n            var addressID:Int = 0\n            if let addrID = Int(newString) {\n                addressID = addrID\n            }\n            self.advancedNewWalletTableViewCell?.updateChangeAddressFieldsWithStartingAddressID(addressID)\n        }\n        \n        return true\n    }\n    \n    func textViewDidChange(_ textView: UITextView) {\n        if textView == self.advancedNewWalletTableViewCell?.mnemonicTextView {\n            self.advancedNewWalletTableViewCell?.didUpdateMnemonic(textView.text!)\n        } else if textView == self.advancedNewWalletTableViewCell?.accountPublicKeyTextView {\n            self.advancedNewWalletTableViewCell?.didUpdateAccountPublicKey(textView.text!)\n        } else if textView == self.advancedNewWalletTableViewCell?.accountPrivateKeyTextView {\n            self.advancedNewWalletTableViewCell?.didUpdateAccountPrivateKey(textView.text!)\n        }\n    }\n    \n    \n    \n    \n    func keyboardWillShow(_ sender: Notification) {\n        let kbSize = ((sender as NSNotification).userInfo![UIKeyboardFrameEndUserInfoKey]! as AnyObject).cgRectValue!.size\n        \n        let duration = ((sender as NSNotification).userInfo![UIKeyboardAnimationDurationUserInfoKey]! as AnyObject).doubleValue!\n        \n        let height = UIDeviceOrientationIsPortrait(UIDevice.current.orientation) ? kbSize.height : kbSize.width;\n        UIView.animate(withDuration: duration, delay: 1.0, options: UIViewAnimationOptions(), animations: {\n            var edgeInsets = self.tableView!.contentInset;\n            edgeInsets.bottom = height;\n            self.tableView!.contentInset = edgeInsets;\n            edgeInsets = self.tableView!.scrollIndicatorInsets;\n            edgeInsets.bottom = height;\n            self.tableView!.scrollIndicatorInsets = edgeInsets;\n            }, completion: { finished in\n        })\n    }\n    \n    func keyboardWillHide(_ sender: Notification) {\n        let duration = ((sender as NSNotification).userInfo![UIKeyboardAnimationDurationUserInfoKey]! as AnyObject).doubleValue!\n        UIView.animate(withDuration: duration, delay: 1.0, options: UIViewAnimationOptions(), animations: {\n            var edgeInsets = self.tableView!.contentInset;\n            edgeInsets.bottom = 0;\n            self.tableView!.contentInset = edgeInsets;\n            edgeInsets = self.tableView!.scrollIndicatorInsets;\n            edgeInsets.bottom = 0;\n            self.tableView!.scrollIndicatorInsets = edgeInsets;\n            }, completion: { finished in\n        })\n    }\n    \n    func numberOfSections(in tableView:UITableView) -> Int {\n        return self.sectionArray!.count\n    }\n    \n    func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {\n        let section = self.sectionArray![(indexPath as NSIndexPath).section]\n        if(section == STATIC_MEMBERS.kInstuctionsSection) {\n            return 100\n        } else if(section == STATIC_MEMBERS.kCreateNewWalletSection) {\n            let row = self.createNewWalletRowArray![(indexPath as NSIndexPath).row]\n            if row == STATIC_MEMBERS.kSelectWhichKeyRow {\n                return TLColdWalletSelectKeyTypeTableViewCell.cellHeight()\n            } else if row == STATIC_MEMBERS.kAdvancedNewWalletRow {\n                return TLAdvancedNewWalletTableViewCell.cellHeight()\n            }\n        }\n        return 0\n    }\n    \n    func tableView(_ tableView:UITableView, titleForHeaderInSection section:Int) -> String? {\n        let section = self.sectionArray![section]\n        if(section == STATIC_MEMBERS.kInstuctionsSection) {\n            return \"\"\n        } else if(section == STATIC_MEMBERS.kCreateNewWalletSection) {\n            return \"\"\n        }\n        return \"\"\n    }\n    \n    func tableView(_ tableView: UITableView, numberOfRowsInSection section:Int) -> Int {\n        let section = self.sectionArray![section]\n        if (section == STATIC_MEMBERS.kInstuctionsSection) {\n            return self.instructionsRowArray!.count\n        } else if(section == STATIC_MEMBERS.kCreateNewWalletSection) {\n            return self.createNewWalletRowArray!.count\n        }\n        return 0\n    }\n    \n    func tableView(_ tableView: UITableView, cellForRowAt indexPath:IndexPath) -> UITableViewCell {\n        let section = self.sectionArray![(indexPath as NSIndexPath).section];\n        if (section == STATIC_MEMBERS.kInstuctionsSection) {\n            let MyIdentifier = \"InstructionsCellIdentifier\"\n            \n            var cell = tableView.dequeueReusableCell(withIdentifier: MyIdentifier)\n            if (cell == nil) {\n                cell = UITableViewCell(style:UITableViewCellStyle.default,\n                                       reuseIdentifier:MyIdentifier)\n            }\n            return cell!\n        } else if(section == STATIC_MEMBERS.kCreateNewWalletSection) {\n            let row = self.createNewWalletRowArray![(indexPath as NSIndexPath).row];\n            if row == STATIC_MEMBERS.kSelectWhichKeyRow {\n                let MyIdentifier = \"ColdWalletSelectKeyTypeCellIdentifier\"\n                \n                var cell = tableView.dequeueReusableCell(withIdentifier: MyIdentifier) as! TLColdWalletSelectKeyTypeTableViewCell?\n                if (cell == nil) {\n                    cell = UITableViewCell(style: UITableViewCellStyle.default,\n                                           reuseIdentifier: MyIdentifier) as? TLColdWalletSelectKeyTypeTableViewCell\n                }\n                cell?.delegate = self\n                return cell!\n            } else if row == STATIC_MEMBERS.kAdvancedNewWalletRow {\n                let MyIdentifier = \"AdvancedNewWalletCellIdentifier\"\n                \n                var cell = tableView.dequeueReusableCell(withIdentifier: MyIdentifier) as! TLAdvancedNewWalletTableViewCell?\n                if (cell == nil) {\n                    cell = UITableViewCell(style: UITableViewCellStyle.default,\n                                           reuseIdentifier: MyIdentifier) as? TLAdvancedNewWalletTableViewCell\n                }\n                \n                cell?.updateCellWithColdWalletKeyType(self.coldWalletKeyType)\n                cell?.delegate = self\n                cell?.mnemonicTextView.delegate = self\n                cell?.accountIDTextField.delegate = self\n                cell?.accountPublicKeyTextView.delegate = self\n                cell?.accountPrivateKeyTextView.delegate = self\n                cell?.startingAddressIDTextField.delegate = self\n                cell?.startingChangeAddressIDTextField.delegate = self\n                self.advancedNewWalletTableViewCell = cell\n                return cell!\n            }\n        }\n        return UITableViewCell(style:UITableViewCellStyle.default,\n                               reuseIdentifier:\"DefaultCellIdentifier\")\n    }\n    \n    func tableView(_ tableView:UITableView, willSelectRowAt indexPath:IndexPath) -> IndexPath? {\n        return nil\n    }\n    \n    func customIOS7dialogButtonTouchUp(inside alertView: CustomIOS7AlertView, clickedButtonAt buttonIndex: Int) {\n        if (buttonIndex == 0) {\n            iToast.makeText(TLDisplayStrings.COPY_TO_CLIPBOARD_STRING()).setGravity(iToastGravityCenter).setDuration(1000).show()\n            \n            let pasteboard = UIPasteboard.general\n            pasteboard.string = self.QRImageModal!.QRcodeDisplayData\n        }\n        \n        alertView.close()\n    }\n}\n"
  },
  {
    "path": "ArcBit/viewControllers/TLColdWalletViewController.swift",
    "content": "//\n//  TLColdWalletViewController.m\n//  ArcBit\n//\n//  Created by Tim Lee on 3/18/15.\n//  Copyright (c) 2015 ArcBit. All rights reserved.\n//\n\n\n//\n//  TLColdWalletViewController.swift\n//  ArcBit\n//\n//  Created by Timothy Lee on 3/14/15.\n//  Copyright (c) 2015 Timothy Lee <stequald01@gmail.com>\n//\n//   This library is free software; you can redistribute it and/or\n//   modify it under the terms of the GNU Lesser General Public\n//   License as published by the Free Software Foundation; either\n//   version 2.1 of the License, or (at your option) any later version.\n//\n//   This library is distributed in the hope that it will be useful,\n//   but WITHOUT ANY WARRANTY; without even the implied warranty of\n//   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n//   Lesser General Public License for more details.\n//\n//   You should have received a copy of the GNU Lesser General Public\n//   License along with this library; if not, write to the Free Software\n//   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,\n//   MA 02110-1301  USA\n\nimport Foundation\nimport UIKit\n\n@objc(TLColdWalletViewController) class TLColdWalletViewController: UIViewController, UITableViewDataSource, UITableViewDelegate, MFMailComposeViewControllerDelegate {\n    \n    struct STATIC_MEMBERS {\n        static let kColdWalletSection = \"kColdWalletSection\"\n        static let kColdWalletOverViewRow = \"kColdWalletOverViewRow\"\n        static let kColdWalletCreateRow = \"kColdWalletCreateRow\"\n        static let kColdWalletSpendtRow = \"kColdWalletSpendtRow\"\n\n        static let kSeeHDWalletDataSection = \"kSeeHDWalletDataSection\"\n        static let kSeeHDWalletDataRow = \"kSeeHDWalletDataRow\"\n    }\n    \n    fileprivate var sectionArray: Array<String>?\n    fileprivate var coldWalletRowArray: Array<String>?\n    fileprivate var seeHDWalletDataRowArray: Array<String>?\n\n    required init?(coder aDecoder: NSCoder) {\n        super.init(coder: aDecoder)\n    }\n    \n    @IBOutlet fileprivate var coldWalletTableView:UITableView?\n\n    override func viewDidLoad() {\n        super.viewDidLoad()\n        setColors()\n        setLogoImageView()\n        \n        self.navigationController!.view.addGestureRecognizer(self.slidingViewController().panGesture)\n        \n        if (TLPreferences.enabledAdvancedMode()) {\n            self.sectionArray = [STATIC_MEMBERS.kColdWalletSection, STATIC_MEMBERS.kSeeHDWalletDataSection]\n        } else {\n            self.sectionArray = [STATIC_MEMBERS.kColdWalletSection]\n        }\n        self.coldWalletRowArray = [STATIC_MEMBERS.kColdWalletOverViewRow, STATIC_MEMBERS.kColdWalletCreateRow, STATIC_MEMBERS.kColdWalletSpendtRow]\n        self.seeHDWalletDataRowArray = [STATIC_MEMBERS.kSeeHDWalletDataRow]\n\n        \n        self.coldWalletTableView!.delegate = self\n        self.coldWalletTableView!.dataSource = self\n        self.coldWalletTableView!.tableFooterView = UIView(frame:CGRect.zero)\n    }\n    \n    override func viewDidAppear(_ animated:Bool) -> () {\n        NotificationCenter.default.post(name: Notification.Name(rawValue: TLNotificationEvents.EVENT_VIEW_COLD_WALLET_SCREEN()),\n            object:nil)\n    }\n\n    override func prepare(for segue: UIStoryboardSegue, sender:Any!) -> () {\n        if (segue.identifier == \"SegueCreateColdWallet\") {\n            let vc = segue.destination\n            vc.navigationItem.title = TLDisplayStrings.CREATE_COLD_WALLET_STRING()\n        } else if (segue.identifier == \"SegueSpendColdWallet\") {\n            let vc = segue.destination\n            vc.navigationItem.title = TLDisplayStrings.AUTHORIZE_PAYMENT_STRING()\n        } else if (segue.identifier == \"SegueSpendColdWallet\") {\n            let vc = segue.destination\n            vc.navigationItem.title = \"\"\n        }\n    }\n    \n    @IBAction fileprivate func menuButtonClicked(_ sender:UIButton) -> () {\n        self.slidingViewController().anchorTopViewToRight(animated: true)\n    }\n    \n    func tableView(_ tableView: UITableView, numberOfRowsInSection section:Int) -> Int {\n        let sectionType = self.sectionArray![section]\n        if(sectionType == STATIC_MEMBERS.kColdWalletSection) {\n            return self.coldWalletRowArray!.count\n        } else if(sectionType == STATIC_MEMBERS.kSeeHDWalletDataSection) {\n            return self.seeHDWalletDataRowArray!.count\n        }\n        return 0\n    }\n    \n    func numberOfSections(in tableView:UITableView) -> Int {\n        return self.sectionArray!.count\n    }\n    \n    func tableView(_ tableView:UITableView, titleForHeaderInSection section:Int) -> String? {\n        let sectionType = self.sectionArray![section]\n        if(sectionType == STATIC_MEMBERS.kColdWalletSection) {\n            return TLDisplayStrings.COLD_WALLET_STRING()\n        } else if(sectionType == STATIC_MEMBERS.kSeeHDWalletDataSection) {\n            return TLDisplayStrings.INTERNAL_WALLET_DATA_STRING()\n        }\n        return \"\"\n    }\n    \n    func tableView(_ tableView: UITableView, cellForRowAt indexPath:IndexPath) -> UITableViewCell{\n        let MyIdentifier = \"ColdWalletCellIdentifier\"\n        \n        var cell = tableView.dequeueReusableCell(withIdentifier: MyIdentifier)\n        if (cell == nil) {\n            cell = UITableViewCell(style:UITableViewCellStyle.default,\n                reuseIdentifier:MyIdentifier)\n        }\n        let sectionType = self.sectionArray![(indexPath as NSIndexPath).section]\n        if(sectionType == STATIC_MEMBERS.kColdWalletSection) {\n            cell!.textLabel!.font = cell!.textLabel!.font.withSize(15)\n            let row = self.coldWalletRowArray![(indexPath as NSIndexPath).row]\n            if row == STATIC_MEMBERS.kColdWalletOverViewRow {\n                cell!.textLabel!.text = TLDisplayStrings.COLD_WALLET_OVERVIEW_STRING()\n            } else if row == STATIC_MEMBERS.kColdWalletCreateRow {\n                cell!.textLabel!.text = TLDisplayStrings.CREATE_COLD_WALLET_STRING()\n            } else if row == STATIC_MEMBERS.kColdWalletSpendtRow {\n                cell!.textLabel!.text = TLDisplayStrings.AUTHORIZE_COLD_WALLET_ACCOUNT_PAYMENT_STRING()\n            }\n        } else if(sectionType == STATIC_MEMBERS.kSeeHDWalletDataSection) {\n            let row = self.seeHDWalletDataRowArray![(indexPath as NSIndexPath).row]\n            if row == STATIC_MEMBERS.kSeeHDWalletDataRow {\n                cell!.textLabel!.text = TLDisplayStrings.INTERNAL_WALLET_DATA_STRING()\n            }\n        }\n\n        return cell!\n    }\n    \n    func tableView(_ tableView:UITableView, willSelectRowAt indexPath:IndexPath) -> IndexPath? {\n        let sectionType = self.sectionArray![(indexPath as NSIndexPath).section]\n        if(sectionType == STATIC_MEMBERS.kColdWalletSection) {\n            let row = self.coldWalletRowArray![(indexPath as NSIndexPath).row]\n            if row == STATIC_MEMBERS.kColdWalletOverViewRow {\n                let msg = TLDisplayStrings.COLD_WALLET_OVERVIEW_DESC_STRING()\n                TLPrompts.promtForOK(self, title:\"\", message: msg, success: {\n                    () in\n                })\n            } else if row == STATIC_MEMBERS.kColdWalletCreateRow {\n                performSegue(withIdentifier: \"SegueCreateColdWallet\", sender:self)\n            } else if row == STATIC_MEMBERS.kColdWalletSpendtRow {\n                performSegue(withIdentifier: \"SegueSpendColdWallet\", sender:self)\n            }\n        } else if(sectionType == STATIC_MEMBERS.kSeeHDWalletDataSection){\n            let row = self.seeHDWalletDataRowArray![(indexPath as NSIndexPath).row]\n            if row == STATIC_MEMBERS.kSeeHDWalletDataRow {\n                performSegue(withIdentifier: \"SegueSeeWalletData\", sender:self)\n            }\n        }\n\n        return nil\n    }\n}\n"
  },
  {
    "path": "ArcBit/viewControllers/TLCreateColdWalletViewController.swift",
    "content": "//\n//  TLCreateColdWalletViewController.swift\n//  ArcBit\n//\n//  Created by Timothy Lee on 3/14/15.\n//  Copyright (c) 2015 Timothy Lee <stequald01@gmail.com>\n//\n//   This library is free software; you can redistribute it and/or\n//   modify it under the terms of the GNU Lesser General Public\n//   License as published by the Free Software Foundation; either\n//   version 2.1 of the License, or (at your option) any later version.\n//\n//   This library is distributed in the hope that it will be useful,\n//   but WITHOUT ANY WARRANTY; without even the implied warranty of\n//   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n//   Lesser General Public License for more details.\n//\n//   You should have received a copy of the GNU Lesser General Public\n//   License along with this library; if not, write to the Free Software\n//   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,\n//   MA 02110-1301  USA\n\n\n\nimport Foundation\nimport UIKit\n\n@objc(TLCreateColdWalletViewController) class TLCreateColdWalletViewController : UIViewController, UITableViewDataSource, UITableViewDelegate, UITextViewDelegate, UITextFieldDelegate, TLNewWalletTableViewCellDelegate, CustomIOS7AlertViewDelegate {\n\n    struct STATIC_MEMBERS {\n        static let kInstuctionsSection = \"kInstuctionsSection\"\n        static let kCreateNewWalletSection = \"kCreateNewWalletSection\"\n\n        static let kSimpleNewWalletRow = \"kSimpleNewWalletRow\"\n    }\n    \n    @IBOutlet fileprivate var tableView: UITableView?\n    fileprivate var QRImageModal: TLQRImageModal?\n    fileprivate var mnemonicPassphrase: String?\n    fileprivate var masterHex: String?\n    fileprivate var extendedKeyIdx: UInt?\n    fileprivate var extendedPublicKey: String?\n    fileprivate var extendedPrivateKey: String?\n    fileprivate var sectionArray: Array<String>?\n    fileprivate var instructionsRowArray: Array<String>?\n    fileprivate var createNewWalletRowArray: Array<String>?\n    fileprivate var newWalletTableViewCell: TLNewWalletTableViewCell?\n    fileprivate var tapGesture: UITapGestureRecognizer?\n\n    override func viewDidLoad() {\n        super.viewDidLoad()\n        setColors()\n\n        NotificationCenter.default.addObserver(self ,selector:#selector(TLCreateColdWalletViewController.keyboardWillShow(_:)),\n                                                         name:NSNotification.Name.UIKeyboardWillShow, object:nil)\n        NotificationCenter.default.addObserver(self ,selector:#selector(TLCreateColdWalletViewController.keyboardWillHide(_:)),\n                                                         name:NSNotification.Name.UIKeyboardWillHide, object:nil)\n\n        self.tapGesture = UITapGestureRecognizer(target: self,\n                                                 action: #selector(dismissKeyboard))\n        \n        self.view.addGestureRecognizer(self.tapGesture!)\n        \n        self.extendedKeyIdx = 0\n        self.sectionArray = [STATIC_MEMBERS.kInstuctionsSection, STATIC_MEMBERS.kCreateNewWalletSection]\n        self.instructionsRowArray = []\n\n        self.createNewWalletRowArray = [STATIC_MEMBERS.kSimpleNewWalletRow]\n        \n        self.tableView!.delegate = self\n        self.tableView!.dataSource = self\n        self.tableView!.tableFooterView = UIView(frame:CGRect.zero)\n    }\n    \n    func dismissKeyboard() {\n        self.newWalletTableViewCell?.accountIDTextField.resignFirstResponder()\n        self.newWalletTableViewCell?.mnemonicTextView.resignFirstResponder()\n        self.newWalletTableViewCell?.accountPublicKeyTextView.resignFirstResponder()\n    }\n    \n    func didClickShowQRCodeButton(_ cell: TLNewWalletTableViewCell, data: String) {\n        dismissKeyboard()\n        self.QRImageModal = TLQRImageModal(data: data as NSString, buttonCopyText: TLDisplayStrings.COPY_TO_CLIPBOARD_STRING(), vc: self)\n        self.QRImageModal!.show()\n    }\n    func didClickMnemonicInfoButton(_ cell: TLNewWalletTableViewCell) {\n        dismissKeyboard()\n        let msg = TLDisplayStrings.MNEMONIC_INFO_STRING()\n        TLPrompts.promtForOK(self, title:\"\", message: msg, success: {\n            () in\n        })\n    }\n    \n    func didClickAccountInfoButton(_ cell: TLNewWalletTableViewCell) {\n        dismissKeyboard()\n        let msg = TLDisplayStrings.ACCOUNT_ID_INFO_STRING()\n        TLPrompts.promtForOK(self, title:\"\", message: msg, success: {\n            () in\n        })\n    }\n    \n    func textFieldDidBeginEditing(_ textField: UITextField) {\n//        var frame:CGRect = CGRectMake(textField.frame.origin.x, textField.frame.origin.y, textField.frame.size.width, textField.frame.size.height)\n//        if textField == self.newWalletTableViewCell?.accountIDTextField {\n//            frame.origin.y += 100\n//        } else {\n//            frame.origin.y += 50\n//        }\n//        self.tableView!.scrollRectToVisible(self.tableView!.convertRect(frame, fromView:textField.superview), animated:true)\n        self.tableView!.scrollRectToVisible(self.tableView!.convert(textField.frame, from:textField.superview), animated:true)\n    }\n    \n    func textViewDidBeginEditing(_ textView: UITextView) {\n        let frame = CGRect(x: textView.frame.origin.x, y: textView.frame.origin.y+50, width: textView.frame.size.width, height: textView.frame.size.height)\n        self.tableView!.scrollRectToVisible(self.tableView!.convert(frame, from:textView.superview), animated:true)\n    }\n    \n    func textField(_ textField: UITextField, shouldChangeCharactersIn range: NSRange, replacementString string: String) -> Bool {\n        \n        if textField == self.newWalletTableViewCell?.accountIDTextField {\n            if textField.text!.characters.count == 1 && string.isEmpty {\n                self.newWalletTableViewCell?.updateAccountPublicKeyTextView(nil)\n                return true\n            }\n            \n            let nsString = textField.text! as NSString\n            let newString = nsString.replacingCharacters(in: range, with: string)\n            if let accountID = UInt(newString) {\n                let mnemonicPassphrase = self.newWalletTableViewCell?.mnemonicTextView.text\n                if mnemonicPassphrase != nil && TLHDWalletWrapper.phraseIsValid(mnemonicPassphrase!) {\n                    let masterHex = TLHDWalletWrapper.getMasterHex(mnemonicPassphrase!)\n                    let extendedPublicKey = TLHDWalletWrapper.getExtendPubKeyFromMasterHex(masterHex, accountIdx: accountID)\n                    self.newWalletTableViewCell?.accountPublicKeyTextView.text = extendedPublicKey\n                    self.newWalletTableViewCell?.updateAccountPublicKeyTextView(extendedPublicKey)\n                } else {\n                    self.newWalletTableViewCell?.updateAccountPublicKeyTextView(nil)\n                }\n            } else {\n                self.newWalletTableViewCell?.updateAccountPublicKeyTextView(nil)\n            }\n        }\n\n        return true\n    }\n    \n    func textViewDidChange(_ textView: UITextView) {\n        if textView == self.newWalletTableViewCell?.mnemonicTextView {\n            let mnemonicPassphrase = textView.text!\n            if TLHDWalletWrapper.phraseIsValid(mnemonicPassphrase) {\n                self.newWalletTableViewCell?.didUpdateMnemonic(textView.text!)\n            } else {\n                self.newWalletTableViewCell?.updateAccountPublicKeyTextView(nil)\n            }\n        } else if textView == self.newWalletTableViewCell?.accountPublicKeyTextView {\n            let accountPublicKey = self.newWalletTableViewCell?.accountPublicKeyTextView.text\n            if accountPublicKey != nil && !accountPublicKey!.isEmpty && TLHDWalletWrapper.isValidExtendedPublicKey(accountPublicKey!) {\n                self.newWalletTableViewCell?.showAccountPublicKeyQRButton.isEnabled = true\n                self.newWalletTableViewCell?.showAccountPublicKeyQRButton.alpha = 1\n            } else {\n                self.newWalletTableViewCell?.showAccountPublicKeyQRButton.isEnabled = false\n                self.newWalletTableViewCell?.showAccountPublicKeyQRButton.alpha = 0.5\n            }\n        }\n    }\n    \n    func numberOfSections(in tableView:UITableView) -> Int {\n        return self.sectionArray!.count\n    }\n    \n    func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {\n        let section = self.sectionArray![(indexPath as NSIndexPath).section]\n        if(section == STATIC_MEMBERS.kInstuctionsSection) {\n            return 100\n        } else if(section == STATIC_MEMBERS.kCreateNewWalletSection) {\n            let row = self.createNewWalletRowArray![(indexPath as NSIndexPath).row]\n            if row == STATIC_MEMBERS.kSimpleNewWalletRow {\n                return TLNewWalletTableViewCell.cellHeight()\n            }\n        }\n        return 0\n    }\n    \n    func tableView(_ tableView:UITableView, titleForHeaderInSection section:Int) -> String? {\n        let section = self.sectionArray![section]\n        if(section == STATIC_MEMBERS.kInstuctionsSection) {\n            return \"\"\n        } else if(section == STATIC_MEMBERS.kCreateNewWalletSection) {\n            return \"\"\n        }\n        return \"\"\n    }\n    \n    func tableView(_ tableView: UITableView, numberOfRowsInSection section:Int) -> Int {\n        let section = self.sectionArray![section]\n        if (section == STATIC_MEMBERS.kInstuctionsSection) {\n            return self.instructionsRowArray!.count\n        } else if(section == STATIC_MEMBERS.kCreateNewWalletSection) {\n            return self.createNewWalletRowArray!.count\n        }\n        return 0\n    }\n    \n    func tableView(_ tableView: UITableView, cellForRowAt indexPath:IndexPath) -> UITableViewCell {\n        let section = self.sectionArray![(indexPath as NSIndexPath).section];\n        if (section == STATIC_MEMBERS.kInstuctionsSection) {\n            let MyIdentifier = \"InstructionsCellIdentifier\"\n            \n            var cell = tableView.dequeueReusableCell(withIdentifier: MyIdentifier)\n            if (cell == nil) {\n                cell = UITableViewCell(style:UITableViewCellStyle.default,\n                                       reuseIdentifier:MyIdentifier)\n            }\n            return cell!\n        } else if(section == STATIC_MEMBERS.kCreateNewWalletSection) {\n            let row = self.createNewWalletRowArray![(indexPath as NSIndexPath).row];\n            if row == STATIC_MEMBERS.kSimpleNewWalletRow {\n                let MyIdentifier = \"NewWalletCellIdentifier\"\n                \n                var cell = tableView.dequeueReusableCell(withIdentifier: MyIdentifier) as! TLNewWalletTableViewCell?\n                if (cell == nil) {\n                    cell = UITableViewCell(style: UITableViewCellStyle.default,\n                                           reuseIdentifier: MyIdentifier) as? TLNewWalletTableViewCell\n                }\n                \n                cell?.delegate = self\n                cell?.mnemonicTextView.delegate = self\n                cell?.accountIDTextField.delegate = self\n                cell?.accountPublicKeyTextView.delegate = self\n                self.newWalletTableViewCell = cell\n                return cell!\n            }\n        }\n        return UITableViewCell(style:UITableViewCellStyle.default,\n                               reuseIdentifier:\"DefaultCellIdentifier\")\n    }\n\n    func keyboardWillShow(_ sender: Notification) {\n        let kbSize = ((sender as NSNotification).userInfo![UIKeyboardFrameEndUserInfoKey]! as AnyObject).cgRectValue!.size\n        \n        let duration = ((sender as NSNotification).userInfo![UIKeyboardAnimationDurationUserInfoKey]! as AnyObject).doubleValue!\n        \n        let height = UIDeviceOrientationIsPortrait(UIDevice.current.orientation) ? kbSize.height : kbSize.width;\n        UIView.animate(withDuration: duration, delay: 1.0, options: UIViewAnimationOptions(), animations: {\n            var edgeInsets = self.tableView!.contentInset;\n            edgeInsets.bottom = height;\n            self.tableView!.contentInset = edgeInsets;\n            edgeInsets = self.tableView!.scrollIndicatorInsets;\n            edgeInsets.bottom = height;\n            self.tableView!.scrollIndicatorInsets = edgeInsets;\n            }, completion: { finished in\n        })\n    }\n    \n    func keyboardWillHide(_ sender: Notification) {\n        let duration = ((sender as NSNotification).userInfo![UIKeyboardAnimationDurationUserInfoKey]! as AnyObject).doubleValue!\n        UIView.animate(withDuration: duration, delay: 1.0, options: UIViewAnimationOptions(), animations: {\n            var edgeInsets = self.tableView!.contentInset;\n            edgeInsets.bottom = 0;\n            self.tableView!.contentInset = edgeInsets;\n            edgeInsets = self.tableView!.scrollIndicatorInsets;\n            edgeInsets.bottom = 0;\n            self.tableView!.scrollIndicatorInsets = edgeInsets;\n            }, completion: { finished in\n        })\n    }\n    \n    func customIOS7dialogButtonTouchUp(inside alertView: CustomIOS7AlertView, clickedButtonAt buttonIndex: Int) {\n        if (buttonIndex == 0) {\n            iToast.makeText(TLDisplayStrings.COPY_TO_CLIPBOARD_STRING()).setGravity(iToastGravityCenter).setDuration(1000).show()\n            \n            let pasteboard = UIPasteboard.general\n            pasteboard.string = self.QRImageModal!.QRcodeDisplayData\n        }\n        \n        alertView.close()\n    }\n}\n"
  },
  {
    "path": "ArcBit/viewControllers/TLHelpViewController.swift",
    "content": "//\n//  TLHelpViewController.m\n//  ArcBit\n//\n//  Created by Tim Lee on 3/18/15.\n//  Copyright (c) 2015 ArcBit. All rights reserved.\n//\n\n\n//\n//  TLHelpViewController.swift\n//  ArcBit\n//\n//  Created by Timothy Lee on 3/14/15.\n//  Copyright (c) 2015 Timothy Lee <stequald01@gmail.com>\n//\n//   This library is free software; you can redistribute it and/or\n//   modify it under the terms of the GNU Lesser General Public\n//   License as published by the Free Software Foundation; either\n//   version 2.1 of the License, or (at your option) any later version.\n//\n//   This library is distributed in the hope that it will be useful,\n//   but WITHOUT ANY WARRANTY; without even the implied warranty of\n//   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n//   Lesser General Public License for more details.\n//\n//   You should have received a copy of the GNU Lesser General Public\n//   License along with this library; if not, write to the Free Software\n//   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,\n//   MA 02110-1301  USA\n\nimport Foundation\nimport UIKit\n\n@objc(TLHelpViewController) class TLHelpViewController: UIViewController, UITableViewDataSource, UITableViewDelegate {\n    required init?(coder aDecoder: NSCoder) {\n        super.init(coder: aDecoder)\n    }\n    \n    struct STATIC_MEMBERS {\n        static let kAchievementsSection = \"kAchievementsSection\"\n        static let kFAQSection = \"kFAQSection\"\n        static let kHowToSection = \"kHowToSection\"\n        static let kAdvancedFAQSection = \"kAdvancedFAQSection\"\n        static let kAdvancedHowToFAQSection = \"kAdvancedHowToFAQSection\"\n    }\n    \n    @IBOutlet fileprivate var howToInstructionsTableView:UITableView?\n    fileprivate var eventActionArray:NSArray?\n    fileprivate var eventAdvanceActionArray:NSArray?\n    fileprivate var FAQArray:NSArray?\n    fileprivate var advancedFAQArray:NSArray?\n    fileprivate var instructions:NSArray?\n    fileprivate var action:NSString?\n    fileprivate var FAQText:NSString?\n    fileprivate var sectionArray: Array<String>?\n    \n    override func viewDidLoad() {\n        super.viewDidLoad()\n        setColors()\n        setLogoImageView()\n        \n        eventActionArray = TLHelpDoc.getEventsArray()\n        eventAdvanceActionArray = TLHelpDoc.getAdvanceEventsArray()\n        FAQArray = TLHelpDoc.getFAQArray()\n        advancedFAQArray = TLHelpDoc.getAdvanceFAQArray()\n        if (TLPreferences.enabledAdvancedMode()) {\n            //self.sectionArray = [STATIC_MEMBERS.kAchievementsSection, STATIC_MEMBERS.kFAQSection, STATIC_MEMBERS.kHowToSection, STATIC_MEMBERS.kAdvancedFAQSection, STATIC_MEMBERS.kAdvancedHowToFAQSection]\n            self.sectionArray = [STATIC_MEMBERS.kFAQSection, STATIC_MEMBERS.kHowToSection, STATIC_MEMBERS.kAdvancedFAQSection, STATIC_MEMBERS.kAdvancedHowToFAQSection]\n        } else {\n            //self.sectionArray = [STATIC_MEMBERS.kAchievementsSection, STATIC_MEMBERS.kFAQSection, STATIC_MEMBERS.kHowToSection]\n            self.sectionArray = [STATIC_MEMBERS.kFAQSection, STATIC_MEMBERS.kHowToSection]\n        }\n\n        self.navigationController!.view.addGestureRecognizer(self.slidingViewController().panGesture)\n        \n        self.howToInstructionsTableView!.delegate = self\n        self.howToInstructionsTableView!.dataSource = self\n        self.howToInstructionsTableView!.tableFooterView = UIView(frame:CGRect.zero)\n    }\n    \n    override func viewDidAppear(_ animated:Bool) -> () {\n        NotificationCenter.default.post(name: Notification.Name(rawValue: TLNotificationEvents.EVENT_VIEW_HELP_SCREEN()),\n            object:nil)\n    }\n    \n    override func didReceiveMemoryWarning() -> () {\n        super.didReceiveMemoryWarning()\n    }\n    \n    override func prepare(for segue: UIStoryboardSegue, sender:Any!) -> () {\n        if (segue.identifier == \"SegueAchievements\") {\n            let vc = segue.destination \n            vc.navigationItem.title = TLDisplayStrings.ACHIEVEMENTS_STRING()\n        } else if (segue.identifier == \"SegueText\") {\n            let vc = segue.destination as! TLTextViewViewController\n            vc.navigationItem.title = TLDisplayStrings.EXPLANATION_STRING()\n            vc.text = FAQText as? String\n        } else if (segue.identifier == \"SegueInstructions\") {\n            let vc = segue.destination as! TLInstructionsViewController\n            vc.navigationItem.title = TLDisplayStrings.INSTRUCTIONS_STRING()\n            vc.action = action as? String\n            vc.actionInstructionsSteps = instructions\n        }\n    }\n    \n    @IBAction fileprivate func menuButtonClicked(_ sender:UIButton) -> () {\n        self.slidingViewController().anchorTopViewToRight(animated: true)\n    }\n    \n    func numberOfSections(in tableView:UITableView) -> Int {\n        return self.sectionArray!.count\n    }\n    \n    func tableView(_ tableView:UITableView, titleForHeaderInSection section:Int) -> String? {\n        let sectionType = self.sectionArray![section]\n        if(sectionType == STATIC_MEMBERS.kAchievementsSection) {\n            return TLDisplayStrings.ACHIEVEMENTS_STRING()\n        } else if(sectionType == STATIC_MEMBERS.kFAQSection) {\n            return TLDisplayStrings.FAQ_STRING()\n        } else if(sectionType == STATIC_MEMBERS.kHowToSection) {\n            return TLDisplayStrings.HOW_TO_COLON_STRING()\n        } else if(sectionType == STATIC_MEMBERS.kAdvancedFAQSection) {\n            return TLDisplayStrings.ADVANCE_FAQ_STRING()\n        } else if(sectionType == STATIC_MEMBERS.kAdvancedHowToFAQSection) {\n            return TLDisplayStrings.ADVANCE_HOW_TO_COLON_STRING_STRING()\n        }\n        return nil\n    }\n    \n    func tableView(_ tableView: UITableView, numberOfRowsInSection section:Int) -> Int {\n        let sectionType = self.sectionArray![section]\n        if(sectionType == STATIC_MEMBERS.kAchievementsSection) {\n            return 1\n        } else if(sectionType == STATIC_MEMBERS.kFAQSection) {\n            return FAQArray!.count\n        } else if(sectionType == STATIC_MEMBERS.kHowToSection) {\n            return eventActionArray!.count\n        } else if(sectionType == STATIC_MEMBERS.kAdvancedFAQSection) {\n            return advancedFAQArray!.count\n        } else if(sectionType == STATIC_MEMBERS.kAdvancedHowToFAQSection) {\n            return eventAdvanceActionArray!.count\n        }\n        return 0\n    }\n    \n    func tableView(_ tableView: UITableView, cellForRowAt indexPath:IndexPath) -> UITableViewCell{\n        let MyIdentifier = \"HowToCellIdentifier\"\n        \n        var cell = tableView.dequeueReusableCell(withIdentifier: MyIdentifier) \n        if (cell == nil) {\n            cell = UITableViewCell(style:UITableViewCellStyle.default,\n                reuseIdentifier:MyIdentifier)\n        }\n        cell!.textLabel!.numberOfLines = 0\n        let sectionType = self.sectionArray![(indexPath as NSIndexPath).section]\n        if(sectionType == STATIC_MEMBERS.kAchievementsSection) {\n            cell!.textLabel!.text = TLDisplayStrings.VIEW_ACHIEVEMENTS_STRING()\n        } else if(sectionType == STATIC_MEMBERS.kFAQSection) {\n            cell!.textLabel!.text = FAQArray!.object(at: (indexPath as NSIndexPath).row) as? String\n        } else if(sectionType == STATIC_MEMBERS.kHowToSection) {\n            cell!.textLabel!.text = TLHelpDoc.getActionEventToHowToActionTitleDict().object(forKey: eventActionArray!.object(at: (indexPath as NSIndexPath).row) as! String) as? String\n        } else if(sectionType == STATIC_MEMBERS.kAdvancedFAQSection) {\n            cell!.textLabel!.text = advancedFAQArray!.object(at: (indexPath as NSIndexPath).row) as? String\n        } else if(sectionType == STATIC_MEMBERS.kAdvancedHowToFAQSection) {\n            cell!.textLabel!.text = TLHelpDoc.getActionEventToHowToActionTitleDict().object(forKey: eventAdvanceActionArray!.object(at: (indexPath as NSIndexPath).row) as! String) as? String\n        }\n        \n        if ((indexPath as NSIndexPath).row % 2 == 0) {\n            cell!.backgroundColor = TLColors.evenTableViewCellColor()\n        } else {\n            cell!.backgroundColor = TLColors.oddTableViewCellColor()\n        }\n        \n        return cell!\n    }\n    \n    func tableView(_ tableView:UITableView, willSelectRowAt indexPath:IndexPath) -> IndexPath? {\n        let sectionType = self.sectionArray![(indexPath as NSIndexPath).section]\n        if(sectionType == STATIC_MEMBERS.kAchievementsSection) {\n            performSegue(withIdentifier: \"SegueAchievements\", sender:self)\n        } else if(sectionType == STATIC_MEMBERS.kFAQSection) {\n            FAQText = TLHelpDoc.getExplanation((indexPath as NSIndexPath).row) as NSString?\n            performSegue(withIdentifier: \"SegueText\", sender:self)\n        } else if(sectionType == STATIC_MEMBERS.kHowToSection) {\n            action = TLHelpDoc.getActionEventToHowToActionTitleDict().object(forKey: eventActionArray!.object(at: (indexPath as NSIndexPath).row)) as! String as NSString?\n            instructions = TLHelpDoc.getBasicActionInstructionStepsArray((indexPath as NSIndexPath).row)\n            performSegue(withIdentifier: \"SegueInstructions\", sender:self)\n        } else if(sectionType == STATIC_MEMBERS.kAdvancedFAQSection) {\n            FAQText = TLHelpDoc.getAdvanceExplanation((indexPath as NSIndexPath).row) as NSString?\n            performSegue(withIdentifier: \"SegueText\", sender:self)\n        } else if(sectionType == STATIC_MEMBERS.kAdvancedHowToFAQSection) {\n            action = TLHelpDoc.getActionEventToHowToActionTitleDict().object(forKey: eventAdvanceActionArray!.object(at: (indexPath as NSIndexPath).row)) as! String as NSString?\n            instructions = TLHelpDoc.getAdvanceActionInstructionStepsArray((indexPath as NSIndexPath).row)\n            performSegue(withIdentifier: \"SegueInstructions\", sender:self)\n        }\n        return nil\n    }\n}\n"
  },
  {
    "path": "ArcBit/viewControllers/TLHistoryViewController.swift",
    "content": "//\n//  TLHistoryViewController.swift\n//  ArcBit\n//\n//  Created by Timothy Lee on 3/14/15.\n//  Copyright (c) 2015 Timothy Lee <stequald01@gmail.com>\n//\n//   This library is free software; you can redistribute it and/or\n//   modify it under the terms of the GNU Lesser General Public\n//   License as published by the Free Software Foundation; either\n//   version 2.1 of the License, or (at your option) any later version.\n//\n//   This library is distributed in the hope that it will be useful,\n//   but WITHOUT ANY WARRANTY; without even the implied warranty of\n//   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n//   Lesser General Public License for more details.\n//\n//   You should have received a copy of the GNU Lesser General Public\n//   License along with this library; if not, write to the Free Software\n//   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,\n//   MA 02110-1301  USA\n\nimport UIKit\nimport CoreData\n\n@objc(TLHistoryViewController) class TLHistoryViewController: UIViewController, UITableViewDataSource, UITableViewDelegate, UIAlertViewDelegate {\n    \n    required init?(coder aDecoder: NSCoder) {\n        super.init(coder: aDecoder)\n    }\n    \n    fileprivate let MAX_CONFIRMATIONS_TO_DISPLAY = 6\n    fileprivate var accountRefreshControl: UIRefreshControl?\n    fileprivate var managedObjectContext: NSManagedObjectContext?\n    fileprivate var paymentInfos: NSMutableArray?\n    fileprivate var transactions: NSMutableArray?\n    @IBOutlet fileprivate var transactionsTableView: UITableView?\n    @IBOutlet fileprivate var accountNameLabel: UILabel?\n    @IBOutlet fileprivate var accountBalanceLabel: UILabel?\n    @IBOutlet fileprivate var balanceActivityIndicatorView: UIActivityIndicatorView?\n    @IBOutlet fileprivate var selectAccountImageView: UIImageView?\n    @IBOutlet fileprivate var fromViewContainer: UIButton?\n    @IBOutlet fileprivate var tableviewBackgroundView: UIView?\n    @IBOutlet fileprivate var fromBackgroundView: UIView?\n    @IBOutlet fileprivate var revealButtonItem: UIBarButtonItem?\n    @IBOutlet weak var fromLabel: UILabel!\n    \n    override func viewDidLoad() {\n        super.viewDidLoad()\n        setColors()\n        \n        setLogoImageView()\n       self.fromLabel.text = TLDisplayStrings.FROM_COLON_STRING()\n        self.fromViewContainer!.backgroundColor = TLColors.mainAppColor()\n        self.accountNameLabel!.textColor = TLColors.mainAppOppositeColor()\n        self.accountBalanceLabel!.textColor = TLColors.mainAppOppositeColor()\n        self.balanceActivityIndicatorView!.color = TLColors.mainAppOppositeColor()\n        \n        self.navigationController!.view.addGestureRecognizer(self.slidingViewController().panGesture)\n        \n        NotificationCenter.default.addObserver(self\n            , selector: #selector(TLHistoryViewController.updateViewToNewSelectedObject),\n            name: NSNotification.Name(rawValue: TLNotificationEvents.EVENT_DISPLAY_LOCAL_CURRENCY_TOGGLED()), object: nil)\n        \n        NotificationCenter.default.addObserver(self\n            , selector: #selector(TLHistoryViewController.updateViewToNewSelectedObject),\n            name: NSNotification.Name(rawValue: TLNotificationEvents.EVENT_FETCHED_ADDRESSES_DATA()), object: nil)\n        NotificationCenter.default.addObserver(self\n            , selector: #selector(TLHistoryViewController.updateViewToNewSelectedObject),\n            name: NSNotification.Name(rawValue: TLNotificationEvents.EVENT_MODEL_UPDATED_NEW_UNCONFIRMED_TRANSACTION()), object: nil)\n        \n        NotificationCenter.default.addObserver(self\n            , selector: #selector(TLHistoryViewController.updateViewToNewSelectedObject),\n            name: NSNotification.Name(rawValue: TLNotificationEvents.EVENT_DISPLAY_LOCAL_CURRENCY_TOGGLED()), object: nil)\n        \n        NotificationCenter.default.addObserver(self\n            , selector: #selector(TLHistoryViewController.updateTransactionsTableView(_:)),\n            name: NSNotification.Name(rawValue: TLNotificationEvents.EVENT_PREFERENCES_BITCOIN_DISPLAY_CHANGED()), object: nil)\n        NotificationCenter.default.addObserver(self\n            , selector: #selector(TLHistoryViewController.updateTransactionsTableView(_:)),\n            name: NSNotification.Name(rawValue: TLNotificationEvents.EVENT_PREFERENCES_FIAT_DISPLAY_CHANGED()), object: nil)\n        NotificationCenter.default.addObserver(self\n            , selector: #selector(TLHistoryViewController.updateTransactionsTableView(_:)),\n            name: NSNotification.Name(rawValue: TLNotificationEvents.EVENT_DISPLAY_LOCAL_CURRENCY_TOGGLED()), object: nil)\n        \n        NotificationCenter.default.addObserver(self\n            , selector: #selector(TLHistoryViewController.updateTransactionsTableView(_:)),\n            name: NSNotification.Name(rawValue: TLNotificationEvents.EVENT_MODEL_UPDATED_NEW_BLOCK()), object: nil)\n        \n        NotificationCenter.default.addObserver(self\n            , selector: #selector(TLHistoryViewController.updateTransactionsTableView(_:)),\n              name: NSNotification.Name(rawValue: TLNotificationEvents.EVENT_EXCHANGE_RATE_UPDATED()), object: nil)\n\n        self.transactionsTableView!.delegate = self\n        self.transactionsTableView!.dataSource = self\n        self.transactionsTableView!.tableFooterView = UIView(frame: CGRect.zero)\n        self.transactionsTableView!.backgroundColor = self.fromBackgroundView!.backgroundColor\n        \n        self.tableviewBackgroundView!.layer.masksToBounds = false\n        self.tableviewBackgroundView!.layer.shadowOpacity = 0.75\n        self.tableviewBackgroundView!.layer.shadowRadius = 10.0\n        self.tableviewBackgroundView!.layer.shadowColor = UIColor.black.cgColor\n        self.tableviewBackgroundView!.isHidden = true // If I want the shadow, comment out this line\n        \n        accountRefreshControl = UIRefreshControl()\n        accountRefreshControl!.addTarget(self, action: #selector(TLHistoryViewController.refresh(_:)), for: .valueChanged)\n        self.transactionsTableView!.addSubview(accountRefreshControl!)\n        \n        self.updateViewToNewSelectedObject()\n        \n        self.refreshSelectedAccount(false)\n    }\n    \n    func refresh(_ refreshControl: UIRefreshControl) {\n        self.refreshSelectedAccount(true)\n        accountRefreshControl!.endRefreshing()\n    }\n    \n    fileprivate func refreshSelectedAccount(_ fetchDataAgain: Bool) {\n        if (!AppDelegate.instance().historySelectedObject!.hasFetchedCurrentFromData() || fetchDataAgain) {\n            if (AppDelegate.instance().historySelectedObject!.getSelectedObjectType() == .account) {\n                let accountObject = AppDelegate.instance().historySelectedObject!.getSelectedObject() as! TLAccountObject\n                self.balanceActivityIndicatorView!.isHidden = false\n                self.accountBalanceLabel!.isHidden = true\n                self.balanceActivityIndicatorView!.startAnimating()\n                AppDelegate.instance().pendingOperations.addSetUpAccountOperation(accountObject, fetchDataAgain: fetchDataAgain, success: {\n                    self.accountBalanceLabel!.isHidden = false\n                    self.balanceActivityIndicatorView!.stopAnimating()\n                    self.balanceActivityIndicatorView!.isHidden = true\n                    if accountObject.downloadState == .downloaded {\n                        self.updateAccountBalance()\n                    }\n                })\n                \n            } else if (AppDelegate.instance().historySelectedObject!.getSelectedObjectType() == .address) {\n                let importedAddress = AppDelegate.instance().historySelectedObject!.getSelectedObject() as! TLImportedAddress\n                self.balanceActivityIndicatorView!.isHidden = false\n                self.accountBalanceLabel!.isHidden = true\n                AppDelegate.instance().pendingOperations.addSetUpImportedAddressOperation(importedAddress, fetchDataAgain: fetchDataAgain, success: {\n                    self.accountBalanceLabel!.isHidden = false\n                    self.balanceActivityIndicatorView!.stopAnimating()\n                    self.balanceActivityIndicatorView!.isHidden = true\n                    if importedAddress.downloadState != .downloaded {\n                        self.updateAccountBalance()\n                    }\n                })\n            }\n        } else {\n            let balance = TLCurrencyFormat.getProperAmount(AppDelegate.instance().historySelectedObject!.getBalanceForSelectedObject()!)\n            accountBalanceLabel!.text = balance as String\n            self.balanceActivityIndicatorView!.isHidden = true\n        }\n    }\n    \n    func updateViewToNewSelectedObject() {\n        let label = AppDelegate.instance().historySelectedObject!.getLabelForSelectedObject()\n        self.accountNameLabel!.text = label\n        self.updateAccountBalance()\n        self._updateTransactionsTableView()\n    }\n    \n    func _updateTransactionsTableView() {\n        self.transactionsTableView!.reloadData()\n    }\n    \n    func updateTransactionsTableView(_ notification: Notification) {\n        _updateTransactionsTableView()\n    }\n    \n    override func viewWillAppear(_ animated: Bool) -> () {\n        self.updateViewToNewSelectedObject()\n    }\n    \n    override func viewDidAppear(_ animated: Bool) -> () {\n        NotificationCenter.default.post(name: Notification.Name(rawValue: TLNotificationEvents.EVENT_VIEW_HISTORY()),\n            object: nil, userInfo: nil)\n    }\n    \n    fileprivate func updateAccountBalance() {\n        let balance = AppDelegate.instance().historySelectedObject!.getBalanceForSelectedObject()\n        let balanceString = TLCurrencyFormat.getProperAmount(balance!)\n    \n        self.balanceActivityIndicatorView!.stopAnimating()\n        self.balanceActivityIndicatorView!.isHidden = true\n\n        self.accountBalanceLabel!.text = balanceString as String\n        self.accountBalanceLabel!.isHidden = false\n    }\n    \n    func onAccountSelected(_ note: Notification) {\n        NotificationCenter.default.removeObserver(self, name: NSNotification.Name(rawValue: TLNotificationEvents.EVENT_ACCOUNT_SELECTED()),\n            object: nil)\n        \n        let selectedDict = note.object as! NSDictionary\n        let sendFromType = TLSendFromType(rawValue: selectedDict.object(forKey: \"sendFromType\") as! Int)\n        let sendFromIndex = selectedDict.object(forKey: \"sendFromIndex\") as! Int\n        AppDelegate.instance().updateHistorySelectedObject(sendFromType!, sendFromIndex: sendFromIndex)\n        self.updateViewToNewSelectedObject()\n    }\n    \n    override func prepare(for segue: UIStoryboardSegue, sender: Any!) -> () {\n        if (segue.identifier == \"selectAccount\") {\n            let vc = segue.destination \n            vc.navigationItem.title = TLDisplayStrings.SELECT_ACCOUNT_STRING()\n            \n            NotificationCenter.default.addObserver(self\n                , selector: #selector(TLHistoryViewController.onAccountSelected(_:)),\n                name: NSNotification.Name(rawValue: TLNotificationEvents.EVENT_ACCOUNT_SELECTED()), object: nil)\n        }\n    }\n    \n    func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {\n        return Int(AppDelegate.instance().historySelectedObject!.getTxObjectCount())\n    }\n    \n    func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {\n        let MyIdentifier = \"TransactionCellIdentifier\"\n        \n        var cell = tableView.dequeueReusableCell(withIdentifier: MyIdentifier) as! TLTransactionTableViewCell?\n        if (cell == nil) {\n            cell = UITableViewCell(style: UITableViewCellStyle.default,\n                reuseIdentifier: MyIdentifier) as? TLTransactionTableViewCell\n        }\n        \n        cell!.amountButton!.titleEdgeInsets = UIEdgeInsetsMake(0.0, 5.0, 0.0, 5.0)\n        let txObject = AppDelegate.instance().historySelectedObject!.getTxObject((indexPath as NSIndexPath).row)\n        DLog(\"txObject hash: \\(txObject!.getHash()!)\")\n        cell!.dateLabel!.text = txObject!.getTime()\n        \n        let amount = TLCurrencyFormat.getProperAmount(AppDelegate.instance().historySelectedObject!.getAccountAmountChangeForTx(txObject!.getHash()! as String)!)\n        let amountType = AppDelegate.instance().historySelectedObject!.getAccountAmountChangeTypeForTx(txObject!.getHash()! as String)\n        var amountTypeString = \"\"\n        let txTag = AppDelegate.instance().appWallet.getTransactionTag(txObject!.getHash()! as String)\n\n        cell!.descriptionLabel!.adjustsFontSizeToFitWidth = true\n        if (amountType == .send) {\n            amountTypeString = \"-\"\n            cell!.amountButton!.backgroundColor = UIColor.red\n            if txTag == nil || txTag == \"\" {\n                let outputAddressToValueArray = txObject!.getOutputAddressToValueArray()\n                for _dict in outputAddressToValueArray! {\n                    let dict = _dict as! NSDictionary\n                    if let address = dict.object(forKey: \"addr\") as? String {\n                        if AppDelegate.instance().historySelectedObject!.isAddressPartOfAccount(address) {\n                            cell!.descriptionLabel!.text = address\n                        } else {\n                            cell!.descriptionLabel!.text = address\n                            break\n                        }\n                    } else {\n                        cell!.descriptionLabel!.text = \"\"\n                    }\n                }\n            } else {\n                cell!.descriptionLabel!.text = txTag\n            }\n        } else if (amountType == .receive) {\n            amountTypeString = \"+\"\n            cell!.amountButton!.backgroundColor = UIColor.green\n            if txTag == nil || txTag == \"\" {\n                cell!.descriptionLabel!.text = \"\"\n            } else {\n                cell!.descriptionLabel!.text = txTag\n            }\n\n        } else {\n            cell!.amountButton!.backgroundColor = UIColor.gray\n            if (txTag == nil) {\n                cell!.descriptionLabel!.text = String(format: TLDisplayStrings.INTERNAL_ACCOUNT_TRANSFER_STRING())\n            } else {\n                cell!.descriptionLabel!.text = txTag\n            }\n        }\n        cell!.amountButton!.setTitle(String(format: \"%@%@\", amountTypeString, amount), for: UIControlState())\n        \n        let confirmations = txObject!.getConfirmations()\n        DLog(\"confirmations \\(Int(confirmations))\")\n        \n        if (Int(confirmations) > MAX_CONFIRMATIONS_TO_DISPLAY) {\n            cell!.confirmationsLabel!.text = String(format: TLDisplayStrings.X_CONFIRMATIONS_STRING(), txObject!.getConfirmations()) // label is hidden\n            cell!.confirmationsLabel!.backgroundColor = UIColor.green\n            cell!.confirmationsLabel!.isHidden = true\n        } else {\n            if (confirmations == 0) {\n                cell!.confirmationsLabel!.backgroundColor = UIColor.red\n            } else if (confirmations == 1) {\n                cell!.confirmationsLabel!.backgroundColor = UIColor.orange\n            } else if (confirmations <= 2 && confirmations <= 5) {\n                //cell!.confirmationsLabel.backgroundColor = UIColor.yellowColor) //yellow color too light\n                cell!.confirmationsLabel!.backgroundColor = UIColor.green\n            } else {\n                cell!.confirmationsLabel!.backgroundColor = UIColor.green\n            }\n            \n            if (confirmations == 0) {\n                cell!.confirmationsLabel!.text = String(format: TLDisplayStrings.UNCONFIRMED_STRING())\n            } else if (confirmations == 1) {\n                cell!.confirmationsLabel!.text = String(format: TLDisplayStrings.ONE_CONFIRMATION_STRING())\n            } else {\n                cell!.confirmationsLabel!.text = String(format: TLDisplayStrings.X_CONFIRMATIONS_STRING(), txObject!.getConfirmations())\n            }\n            cell!.confirmationsLabel!.isHidden = false\n        }\n        \n        if ((indexPath as NSIndexPath).row % 2 == 0) {\n            cell!.backgroundColor = TLColors.evenTableViewCellColor()\n        } else {\n            cell!.backgroundColor = TLColors.oddTableViewCellColor()\n        }\n        \n        return cell!\n    }\n    \n    func tableView(_ tableView: UITableView, willSelectRowAt indexPath: IndexPath) -> IndexPath? {\n        let txObject = AppDelegate.instance().historySelectedObject!.getTxObject((indexPath as NSIndexPath).row)\n        self.promptTransactionActionSheet(txObject!.getHash()!)\n        return nil\n    }\n    \n    fileprivate func promptTransactionActionSheet(_ txHash: NSString) {\n        let otherButtonTitles = [TLDisplayStrings.VIEW_IN_WEB_STRING(), TLDisplayStrings.LABEL_TRANSACTION_STRING(), TLDisplayStrings.COPY_TRANSACTION_ID_TO_CLIPBOARD_STRING()]\n        \n        UIAlertController.showAlert(in: self,\n            withTitle: String(format: TLDisplayStrings.TRANSACTION_ID_COLON_X_STRING(), txHash),\n            message:\"\",\n            preferredStyle: .actionSheet,\n            cancelButtonTitle: TLDisplayStrings.CANCEL_STRING(),\n            destructiveButtonTitle: nil,\n            otherButtonTitles: otherButtonTitles as [AnyObject],\n            tap: {(actionSheet, action, buttonIndex) in\n                if (buttonIndex == actionSheet?.firstOtherButtonIndex) {\n                    TLBlockExplorerAPI.instance().openWebViewForTransaction(txHash as String)\n                    NotificationCenter.default.post(name: Notification.Name(rawValue: TLNotificationEvents.EVENT_VIEW_TRANSACTION_IN_WEB()),\n                        object: nil, userInfo: nil)\n                } else if (buttonIndex == (actionSheet?.firstOtherButtonIndex)! + 1) {\n                    TLPrompts.promtForInputText(self, title:TLDisplayStrings.EDIT_TRANSACTION_LABEL_STRING(), message: \"\", textFieldPlaceholder: TLDisplayStrings.LABEL_STRING(), success: {\n                        (inputText: String!) in\n                        if (inputText == \"\") {\n                            AppDelegate.instance().appWallet.deleteTransactionTag(txHash as String)\n                        } else {\n                            AppDelegate.instance().appWallet.setTransactionTag(txHash as String, tag: inputText)\n                            NotificationCenter.default.post(name: Notification.Name(rawValue: TLNotificationEvents.EVENT_TAG_TRANSACTION()),\n                                object: nil, userInfo: nil)\n                        }\n                        self._updateTransactionsTableView()\n                        }, failure: {\n                            (isCancelled: Bool) in\n                    })\n                } else if (buttonIndex == (actionSheet?.firstOtherButtonIndex)! + 2) {\n                    let pasteboard = UIPasteboard.general\n                    pasteboard.string = txHash as String\n                    iToast.makeText(TLDisplayStrings.COPIED_TO_CLIPBOARD_STRING()).setGravity(iToastGravityCenter).setDuration(1000).show()\n                } else if (buttonIndex == actionSheet?.cancelButtonIndex) {\n                }\n        })\n    }\n    \n    func tableView(_ tableView: UITableView, editActionsForRowAt indexPath: IndexPath) -> [UITableViewRowAction]? {\n        let moreAction = UITableViewRowAction(style: .default, title: TLDisplayStrings.MORE_STRING(), handler: {\n            (action: UITableViewRowAction, indexPath: IndexPath) in\n            tableView.isEditing = false\n            let txObject = AppDelegate.instance().historySelectedObject!.getTxObject((indexPath as NSIndexPath).row)\n            \n            self.promptTransactionActionSheet(txObject!.getHash()!)\n        })\n        moreAction.backgroundColor = UIColor.lightGray\n        \n        return [moreAction]\n    }\n    \n    @IBAction fileprivate func menuButtonClicked(_ sender: AnyObject) {\n        self.slidingViewController().anchorTopViewToRight(animated: true)\n    }\n\n    deinit {\n        NotificationCenter.default.removeObserver(self)\n    }\n}\n"
  },
  {
    "path": "ArcBit/viewControllers/TLInstructionsViewController.swift",
    "content": "//\n//  TLInstructionsViewController.swift\n//  ArcBit\n//\n//  Created by Timothy Lee on 3/14/15.\n//  Copyright (c) 2015 Timothy Lee <stequald01@gmail.com>\n//\n//   This library is free software; you can redistribute it and/or\n//   modify it under the terms of the GNU Lesser General Public\n//   License as published by the Free Software Foundation; either\n//   version 2.1 of the License, or (at your option) any later version.\n//\n//   This library is distributed in the hope that it will be useful,\n//   but WITHOUT ANY WARRANTY; without even the implied warranty of\n//   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n//   Lesser General Public License for more details.\n//\n//   You should have received a copy of the GNU Lesser General Public\n//   License along with this library; if not, write to the Free Software\n//   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,\n//   MA 02110-1301  USA\n\n\nimport Foundation\nimport UIKit\n\n@objc(TLInstructionsViewController) class TLInstructionsViewController : UIViewController, UITableViewDataSource, UITableViewDelegate {\n    required init?(coder aDecoder: NSCoder) {\n        super.init(coder: aDecoder)\n    }\n    \n    @IBOutlet fileprivate var instructionsTableView: UITableView?\n    var action:String?\n    var actionInstructionsSteps:NSArray?\n    \n    override func viewDidLoad() {\n        super.viewDidLoad()\n        setColors()\n        self.instructionsTableView!.delegate = self\n        self.instructionsTableView!.dataSource = self\n        self.instructionsTableView!.tableFooterView = UIView(frame:CGRect.zero)\n    }\n    \n    override func didReceiveMemoryWarning() {\n        super.didReceiveMemoryWarning()\n    }\n    \n    func numberOfSections(in tableView:UITableView) -> Int {\n        return 1\n    }\n    \n    func tableView(_ tableView:UITableView, titleForHeaderInSection section:Int) -> String? {\n        return TLDisplayStrings.STEPS_STRING()\n    }\n        \n    func tableView(_ tableView: UITableView, numberOfRowsInSection section:Int) -> Int {\n        return actionInstructionsSteps!.count\n    }\n    \n    func tableView(_ tableView: UITableView, cellForRowAt indexPath:IndexPath) -> UITableViewCell{\n        let MyIdentifier = \"InstructionStepCellIdentifier\"\n        \n        var cell = tableView.dequeueReusableCell(withIdentifier: MyIdentifier) \n        if (cell == nil) {\n            cell = UITableViewCell(style:UITableViewCellStyle.default,\n                reuseIdentifier:MyIdentifier)\n        }\n        cell!.textLabel!.numberOfLines = 0\n\n        let text = String(format:\"%ld. %@\", (indexPath as NSIndexPath).row+1, actionInstructionsSteps!.object(at: (indexPath as NSIndexPath).row) as! String)\n        cell!.textLabel!.text = text\n        \n        if ((indexPath as NSIndexPath).row % 2 == 0) {\n            cell!.backgroundColor = TLColors.evenTableViewCellColor()\n        } else {\n            cell!.backgroundColor = TLColors.oddTableViewCellColor()\n        }\n        \n        return cell!\n    }\n}\n"
  },
  {
    "path": "ArcBit/viewControllers/TLLinksViewController.swift",
    "content": "//\n//  TLLinksViewController.m\n//  ArcBit\n//\n//  Created by Tim Lee on 3/18/15.\n//  Copyright (c) 2015 ArcBit. All rights reserved.\n//\n\n\n//\n//  TLLinksViewController.swift\n//  ArcBit\n//\n//  Created by Timothy Lee on 3/14/15.\n//  Copyright (c) 2015 Timothy Lee <stequald01@gmail.com>\n//\n//   This library is free software; you can redistribute it and/or\n//   modify it under the terms of the GNU Lesser General Public\n//   License as published by the Free Software Foundation; either\n//   version 2.1 of the License, or (at your option) any later version.\n//\n//   This library is distributed in the hope that it will be useful,\n//   but WITHOUT ANY WARRANTY; without even the implied warranty of\n//   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n//   Lesser General Public License for more details.\n//\n//   You should have received a copy of the GNU Lesser General Public\n//   License along with this library; if not, write to the Free Software\n//   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,\n//   MA 02110-1301  USA\n\nimport Foundation\nimport UIKit\n\n@objc(TLLinksViewController) class TLLinksViewController: UIViewController, UITableViewDataSource, UITableViewDelegate, MFMailComposeViewControllerDelegate {\n    required init?(coder aDecoder: NSCoder) {\n        super.init(coder: aDecoder)\n    }\n    \n    struct STATIC_MEMBERS {\n        static let kWebWalletSection = \"kColdWalletSection\"\n        static let kBrainSection = \"kBrainSection\"\n        static let kOthersSection = \"kOthersSection\"\n        static let kEmailSupportSection = \"kEmailSupportSection\"\n    }\n    \n    @IBOutlet fileprivate var linksTableView:UITableView?\n    fileprivate var action:NSString?\n    fileprivate var clickRightBarButtonCount:Int = 0\n    fileprivate var selectedSection:String = \"\"\n    fileprivate lazy var sectionArray = Array<String>()\n\n    override func viewDidLoad() {\n        super.viewDidLoad()\n        setColors()\n        setLogoImageView()\n        \n        //self.sectionArray = [STATIC_MEMBERS.kWebWalletSection, STATIC_MEMBERS.kBrainSection, STATIC_MEMBERS.kOthersSection, STATIC_MEMBERS.kEmailSupportSection]\n        self.sectionArray = [STATIC_MEMBERS.kWebWalletSection, STATIC_MEMBERS.kOthersSection, STATIC_MEMBERS.kEmailSupportSection]\n\n        self.navigationController!.view.addGestureRecognizer(self.slidingViewController().panGesture)\n        \n        self.linksTableView!.delegate = self\n        self.linksTableView!.dataSource = self\n        self.linksTableView!.tableFooterView = UIView(frame:CGRect.zero)\n        self.clickRightBarButtonCount = 0\n        \n        let button   = UIButton(frame: CGRect(x: 0, y: 0, width: 80, height: 30))\n        button.backgroundColor = TLColors.mainAppColor()\n        button.setTitle(\"Status\", for: UIControlState())\n        button.setTitleColor(TLColors.mainAppColor(), for: UIControlState())\n        button.addTarget(self, action: #selector(TLLinksViewController.rightBarButtonClicked), for: UIControlEvents.touchUpInside)\n        let rightBarButtonItem = UIBarButtonItem(customView: button)\n        navigationItem.rightBarButtonItem = rightBarButtonItem\n    }\n    \n    func rightBarButtonClicked() {\n        self.clickRightBarButtonCount += 1\n        if (self.clickRightBarButtonCount >= 10) {\n            TLStealthWebSocket.instance().isWebSocketOpen()\n            let av = UIAlertView(title: \"Web Socket Server status\",\n                message: \"Up: \\(TLStealthWebSocket.instance().isWebSocketOpen())\",\n                delegate: nil,\n                cancelButtonTitle: TLDisplayStrings.CANCEL_STRING(),\n                otherButtonTitles: TLDisplayStrings.OK_STRING())\n            av.show()\n        }\n    }\n    \n    func mailComposeController(_ controller: MFMailComposeViewController, didFinishWith result: MFMailComposeResult, error: Error?) {\n        self.dismiss(animated: true, completion: nil)\n    }\n\n    func showEmailSupportViewController() {\n        let mc = MFMailComposeViewController()\n        mc.mailComposeDelegate = self\n        mc.setSubject(String(format: \"%@ iOS Support\", TLWalletUtils.APP_NAME()))\n        let message = \"Dear ArcBit Support,\\n\\n\\n\\n--\\nApp Version: \\(TLPreferences .getAppVersion())\\nSystem: \\(UIDevice.current.systemName) \\(UIDevice.current.systemVersion)\\n\"\n        DLog(message);\n        mc.setMessageBody(message, isHTML: false)\n        mc.setToRecipients([\"support@arcbit.zendesk.com\"])\n        self.present(mc, animated: true, completion: nil)\n    }\n    \n    override func viewDidAppear(_ animated:Bool) -> () {\n        NotificationCenter.default.post(name: Notification.Name(rawValue: TLNotificationEvents.EVENT_VIEW_HELP_SCREEN()),\n            object:nil)\n    }\n    \n    override func didReceiveMemoryWarning() -> () {\n        super.didReceiveMemoryWarning()\n    }\n    \n    override func prepare(for segue: UIStoryboardSegue, sender:Any!) -> () {\n        if (segue.identifier == \"SegueText2\") {\n            if (self.selectedSection == \"webwallet\") {\n                let vc = segue.destination as! TLTextViewViewController\n                vc.navigationItem.title = TLDisplayStrings.ARCBIT_WEB_WALLET_STRING()\n                vc.text = TLDisplayStrings.ARCBIT_WEB_WALLET_DESC_STRING()\n            } else if (self.selectedSection == \"brainwallet\") {\n                let vc = segue.destination as! TLTextViewViewController\n                vc.navigationItem.title = TLDisplayStrings.ARCBIT_BRAIN_WALLET_STRING()\n                vc.text = TLDisplayStrings.ARCBIT_BRAIN_WALLET_STRING_DESC_STRING()\n            }\n        }\n    }\n    \n    @IBAction fileprivate func menuButtonClicked(_ sender:UIButton) -> () {\n        self.slidingViewController().anchorTopViewToRight(animated: true)\n    }\n    \n    func numberOfSections(in tableView:UITableView) -> Int {\n        return self.sectionArray.count\n    }\n    \n    func tableView(_ tableView:UITableView, titleForHeaderInSection section:Int) -> String? {\n        let sectionType = self.sectionArray[section]\n        if sectionType == STATIC_MEMBERS.kWebWalletSection {\n            return TLDisplayStrings.ARCBIT_WEB_WALLET_STRING()\n        } else if sectionType == STATIC_MEMBERS.kBrainSection {\n            return TLDisplayStrings.ARCBIT_BRAIN_WALLET_STRING()\n        } else if sectionType == STATIC_MEMBERS.kOthersSection {\n            return TLDisplayStrings.OTHER_LINKS_STRING()\n        } else {\n            return TLDisplayStrings.EMAIL_SUPPORT_STRING()\n        }\n    }\n    \n    func tableView(_ tableView: UITableView, numberOfRowsInSection section:Int) -> Int {\n        let sectionType = self.sectionArray[section]\n        if sectionType == STATIC_MEMBERS.kWebWalletSection ||\n            sectionType == STATIC_MEMBERS.kBrainSection ||\n            sectionType == STATIC_MEMBERS.kOthersSection {\n            return 2\n        } else {\n            return 1\n        }\n    }\n    \n    func tableView(_ tableView: UITableView, cellForRowAt indexPath:IndexPath) -> UITableViewCell{\n        let MyIdentifier = \"LinksCellIdentifier\"\n        \n        var cell = tableView.dequeueReusableCell(withIdentifier: MyIdentifier)\n        if (cell == nil) {\n            cell = UITableViewCell(style:UITableViewCellStyle.default,\n                reuseIdentifier:MyIdentifier)\n        }\n        cell!.textLabel!.numberOfLines = 0\n        \n        let sectionType = self.sectionArray[indexPath.section]\n        if sectionType == STATIC_MEMBERS.kWebWalletSection {\n            if (indexPath as NSIndexPath).row == 0 {\n                cell!.textLabel?.text = TLDisplayStrings.CHECK_OUT_THE_ARCBIT_WEB_WALLET_STRING()\n            } else {\n                cell!.textLabel?.text = TLDisplayStrings.VIEW_ARCBIT_WEB_WALLET_DETAILS_STRING()\n            }\n        } else if sectionType == STATIC_MEMBERS.kBrainSection {\n            if (indexPath as NSIndexPath).row == 0 {\n                cell!.textLabel?.text = TLDisplayStrings.CHECK_OUT_THE_ARCBIT_BRAIN_WALLET_STRING()\n            } else {\n                cell!.textLabel?.text = TLDisplayStrings.VIEW_ARCBIT_BRAIN_WALLET_DETAILS_STRING()\n            }\n        } else if sectionType == STATIC_MEMBERS.kOthersSection {\n            if (indexPath as NSIndexPath).row == 0 {\n                cell!.imageView?.image = UIImage(named: \"home3\")\n                cell!.textLabel?.text = TLDisplayStrings.VISIT_OUR_HOME_PAGE_STRING()\n            } else {\n                cell!.imageView?.image = UIImage(named: \"twitter\")\n                cell!.textLabel?.text = TLDisplayStrings.FOLLOW_US_ON_TWITTER_STRING()\n            }\n        } else {\n            cell!.accessoryType = UITableViewCellAccessoryType.none\n            cell!.imageView?.image = UIImage(named: \"lifebuoy\")\n            cell!.textLabel?.text = TLDisplayStrings.EMAIL_SUPPORT_STRING()\n        }\n\n        return cell!\n    }\n    \n    func tableView(_ tableView:UITableView, willSelectRowAt indexPath:IndexPath) -> IndexPath? {\n        let sectionType = self.sectionArray[indexPath.section]\n        if sectionType == STATIC_MEMBERS.kWebWalletSection {\n            self.selectedSection = \"webwallet\"\n            if (indexPath as NSIndexPath).row == 0 {\n                let url = URL(string: \"https://chrome.google.com/webstore/detail/arcbit-bitcoin-wallet/dkceiphcnbfahjbomhpdgjmphnpgogfk\");\n                if (UIApplication.shared.canOpenURL(url!)) {\n                    UIApplication.shared.openURL(url!);\n                }\n            } else {\n                performSegue(withIdentifier: \"SegueText2\", sender:self)\n            }\n        } else if sectionType == STATIC_MEMBERS.kBrainSection {\n            self.selectedSection = \"brainwallet\"\n            if (indexPath as NSIndexPath).row == 0 {\n                let url = URL(string: \"https://www.arcbitbrainwallet.com\");\n                if (UIApplication.shared.canOpenURL(url!)) {\n                    UIApplication.shared.openURL(url!);\n                }\n            } else {\n                performSegue(withIdentifier: \"SegueText2\", sender:self)\n            }\n        } else if sectionType == STATIC_MEMBERS.kOthersSection {\n            if (indexPath as NSIndexPath).row == 0 {\n                let url = URL(string: \"http://arcbit.io/\");\n                if (UIApplication.shared.canOpenURL(url!)) {\n                    UIApplication.shared.openURL(url!);\n                }\n            } else {\n                let url = URL(string: \"https://twitter.com/arc_bit\");\n                if (UIApplication.shared.canOpenURL(url!)) {\n                    UIApplication.shared.openURL(url!);\n                }\n            }\n        } else {\n            self.showEmailSupportViewController()\n        }\n        \n        return nil\n    }\n}\n"
  },
  {
    "path": "ArcBit/viewControllers/TLManageAccountsViewController.swift",
    "content": "//\n//  TLManageAccountsViewController.swift\n//  ArcBit\n//\n//  Created by Timothy Lee on 3/14/15.\n//  Copyright (c) 2015 Timothy Lee <stequald01@gmail.com>\n//\n//   This library is free software; you can redistribute it and/or\n//   modify it under the terms of the GNU Lesser General Public\n//   License as published by the Free Software Foundation; either\n//   version 2.1 of the License, or (at your option) any later version.\n//\n//   This library is distributed in the hope that it will be useful,\n//   but WITHOUT ANY WARRANTY; without even the implied warranty of\n//   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n//   Lesser General Public License for more details.\n//\n//   You should have received a copy of the GNU Lesser General Public\n//   License along with this library; if not, write to the Free Software\n//   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,\n//   MA 02110-1301  USA\n\nimport Foundation\nimport UIKit\n\n@objc(TLManageAccountsViewController) class TLManageAccountsViewController: UIViewController, UITableViewDataSource, UITableViewDelegate, CustomIOS7AlertViewDelegate {\n\n    required init?(coder aDecoder: NSCoder) {\n        super.init(coder: aDecoder)\n    }\n\n    let MAX_ACTIVE_CREATED_ACCOUNTS = 8\n    @IBOutlet fileprivate var accountsTableView: UITableView?\n    fileprivate var QRImageModal: TLQRImageModal?\n    fileprivate var accountActionsArray: NSArray?\n    fileprivate var numberOfSections: Int = 0\n    fileprivate var accountListSection: Int = 0\n    fileprivate var coldWalletAccountSection: Int = 0\n    fileprivate var importedAccountSection: Int = 0\n    fileprivate var importedWatchAccountSection: Int = 0\n    fileprivate var importedAddressSection: Int = 0\n    fileprivate var importedWatchAddressSection: Int = 0\n    fileprivate var archivedAccountSection: Int = 0\n    fileprivate var archivedColdWalletAccountSection: Int = 0\n    fileprivate var archivedImportedAccountSection: Int = 0\n    fileprivate var archivedImportedWatchAccountSection: Int = 0\n    fileprivate var archivedImportedAddressSection: Int = 0\n    fileprivate var archivedImportedWatchAddressSection: Int = 0\n    fileprivate var accountActionSection: Int = 0\n    fileprivate var accountRefreshControl: UIRefreshControl?\n    fileprivate var showAddressListAccountObject: TLAccountObject?\n    fileprivate var showAddressListShowBalances: Bool = false\n\n    override func viewDidLoad() {\n        super.viewDidLoad()\n        setColors()\n\n        self.setLogoImageView()\n\n        self.navigationController!.view.addGestureRecognizer(self.slidingViewController().panGesture)\n\n        accountListSection = 0\n\n        self.accountsTableView!.delegate = self\n        self.accountsTableView!.dataSource = self\n        self.accountsTableView!.tableFooterView = UIView(frame: CGRect.zero)\n\n        NotificationCenter.default.addObserver(self,\n                selector: #selector(TLManageAccountsViewController.refreshWalletAccountsNotification(_:)),\n                name: NSNotification.Name(rawValue: TLNotificationEvents.EVENT_DISPLAY_LOCAL_CURRENCY_TOGGLED()), object: nil)\n\n        NotificationCenter.default.addObserver(self, selector: #selector(TLManageAccountsViewController.refreshWalletAccountsNotification(_:)),\n                name: NSNotification.Name(rawValue: TLNotificationEvents.EVENT_FETCHED_ADDRESSES_DATA()), object: nil)\n\n        NotificationCenter.default.addObserver(self, selector: #selector(TLManageAccountsViewController.accountsTableViewReloadDataWrapper(_:)),\n                name: NSNotification.Name(rawValue: TLNotificationEvents.EVENT_ADVANCE_MODE_TOGGLED()), object: nil)\n\n        NotificationCenter.default.addObserver(self,\n                selector: #selector(TLManageAccountsViewController.accountsTableViewReloadDataWrapper(_:)), name: NSNotification.Name(rawValue: TLNotificationEvents.EVENT_MODEL_UPDATED_NEW_UNCONFIRMED_TRANSACTION()), object: nil)\n\n        NotificationCenter.default.addObserver(self,\n                                               selector: #selector(TLManageAccountsViewController.accountsTableViewReloadDataWrapper(_:)), name: NSNotification.Name(rawValue: TLNotificationEvents.EVENT_EXCHANGE_RATE_UPDATED()), object: nil)\n\n        accountRefreshControl = UIRefreshControl()\n        accountRefreshControl!.addTarget(self, action: #selector(TLManageAccountsViewController.refresh(_:)), for: .valueChanged)\n        self.accountsTableView!.addSubview(accountRefreshControl!)\n\n        checkToRecoverAccounts()\n        refreshWalletAccounts(false)\n    }\n\n    func refresh(_ refresh:UIRefreshControl) -> () {\n        self.refreshWalletAccounts(true)\n        accountRefreshControl!.endRefreshing()\n    }\n\n    override func viewWillAppear(_ animated: Bool) -> () {\n        // TODO: better way\n        if AppDelegate.instance().scannedEncryptedPrivateKey != nil {\n            TLPrompts.promptForEncryptedPrivKeyPassword(self, view:self.slidingViewController().topViewController.view,\n                encryptedPrivKey:AppDelegate.instance().scannedEncryptedPrivateKey!,\n                success:{(privKey: String!) in\n                    let privateKey = privKey\n                    let encryptedPrivateKey = AppDelegate.instance().scannedEncryptedPrivateKey\n                    self.checkAndImportAddress(privateKey!, encryptedPrivateKey: encryptedPrivateKey)\n                    AppDelegate.instance().scannedEncryptedPrivateKey = nil\n                }, failure:{(isCanceled: Bool) in\n                    AppDelegate.instance().scannedEncryptedPrivateKey = nil\n            })\n        }\n    }\n    \n    override func viewDidAppear(_ animated: Bool) -> () {\n        NotificationCenter.default.post(name: Notification.Name(rawValue: TLNotificationEvents.EVENT_VIEW_MANAGE_ACCOUNTS_SCREEN()),\n                object: nil)\n    }\n\n    func checkToRecoverAccounts() {\n        if (AppDelegate.instance().aAccountNeedsRecovering()) {\n            TLHUDWrapper.showHUDAddedTo(self.slidingViewController().topViewController.view, labelText: TLDisplayStrings.RESTORING_WALLET_STRING(), animated: true)\n            DispatchQueue.global(priority: DispatchQueue.GlobalQueuePriority.high).async {\n                AppDelegate.instance().checkToRecoverAccounts()\n                DispatchQueue.main.async {\n                    self.refreshWalletAccounts(false)\n                    TLHUDWrapper.hideHUDForView(self.view, animated: true)\n                }\n            }\n        }\n    }\n\n    fileprivate func refreshColdWalletAccounts(_ fetchDataAgain: Bool) -> () {\n        for i in stride(from: 0, to: AppDelegate.instance().coldWalletAccounts!.getNumberOfAccounts(), by: 1) {\n            let accountObject = AppDelegate.instance().coldWalletAccounts!.getAccountObjectForIdx(i)\n            let indexPath = IndexPath(row: i, section: coldWalletAccountSection)\n            if self.accountsTableView!.cellForRow(at: indexPath) == nil {\n                return\n            }\n            if (!accountObject.hasFetchedAccountData() || fetchDataAgain) {\n                let cell = self.accountsTableView!.cellForRow(at: indexPath) as? TLAccountTableViewCell\n                if cell != nil {\n                    (cell!.accessoryView! as! UIActivityIndicatorView).isHidden = false\n                    (cell!.accessoryView! as! UIActivityIndicatorView).startAnimating()\n                    cell!.accountBalanceButton!.isHidden = true\n                }\n                AppDelegate.instance().pendingOperations.addSetUpAccountOperation(accountObject, fetchDataAgain: fetchDataAgain, success: {\n                    if cell != nil {\n                        (cell!.accessoryView as! UIActivityIndicatorView).stopAnimating()\n                        (cell!.accessoryView as! UIActivityIndicatorView).isHidden = true\n                        cell!.accountBalanceButton!.isHidden = false\n                        if accountObject.downloadState == .downloaded {\n                            let balance = TLCurrencyFormat.getProperAmount(accountObject.getBalance())\n                            cell!.accountBalanceButton!.setTitle(balance as String, for: UIControlState())\n                        }\n                        cell!.accountBalanceButton!.isHidden = false\n                    }\n                })\n            } else {\n                if let cell = self.accountsTableView!.cellForRow(at: indexPath) as? TLAccountTableViewCell {\n                    cell.accountNameLabel!.text = accountObject.getAccountName()\n                    let balance = TLCurrencyFormat.getProperAmount(accountObject.getBalance())\n                    cell.accountBalanceButton!.setTitle(balance as String, for: UIControlState())\n                }\n            }\n        }\n    }\n    \n    fileprivate func refreshImportedAccounts(_ fetchDataAgain: Bool) -> () {\n        for i in stride(from: 0, to: AppDelegate.instance().importedAccounts!.getNumberOfAccounts(), by: 1) {\n            let accountObject = AppDelegate.instance().importedAccounts!.getAccountObjectForIdx(i)\n            let indexPath = IndexPath(row: i, section: importedAccountSection)\n            if self.accountsTableView!.cellForRow(at: indexPath) == nil {\n                return\n            }\n            if (!accountObject.hasFetchedAccountData() || fetchDataAgain) {\n                let cell = self.accountsTableView!.cellForRow(at: indexPath) as? TLAccountTableViewCell\n                if cell != nil {\n                    (cell!.accessoryView! as! UIActivityIndicatorView).isHidden = false\n                    cell!.accountBalanceButton!.isHidden = true\n                    (cell!.accessoryView! as! UIActivityIndicatorView).startAnimating()\n                }\n                AppDelegate.instance().pendingOperations.addSetUpAccountOperation(accountObject, fetchDataAgain: fetchDataAgain, success: {\n                    if cell != nil {\n                        (cell!.accessoryView as! UIActivityIndicatorView).stopAnimating()\n                        (cell!.accessoryView as! UIActivityIndicatorView).isHidden = true\n                        cell!.accountBalanceButton!.isHidden = false\n                        if accountObject.downloadState == .downloaded {\n                            let balance = TLCurrencyFormat.getProperAmount(accountObject.getBalance())\n                            cell!.accountBalanceButton!.setTitle(balance as String, for: UIControlState())\n                        }\n                        cell!.accountBalanceButton!.isHidden = false\n                    }\n                })\n            } else {\n                if let cell = self.accountsTableView!.cellForRow(at: indexPath) as? TLAccountTableViewCell {\n                    cell.accountNameLabel!.text = accountObject.getAccountName()\n                    let balance = TLCurrencyFormat.getProperAmount(accountObject.getBalance())\n                    cell.accountBalanceButton!.setTitle(balance as String, for: UIControlState())\n                }\n            }\n        }\n    }\n\n    fileprivate func refreshImportedWatchAccounts(_ fetchDataAgain: Bool) -> () {\n        for i in stride(from: 0, to: AppDelegate.instance().importedWatchAccounts!.getNumberOfAccounts(), by: 1) {\n            let accountObject = AppDelegate.instance().importedWatchAccounts!.getAccountObjectForIdx(i)\n            let indexPath = IndexPath(row: i, section: importedWatchAccountSection)\n            if self.accountsTableView!.cellForRow(at: indexPath) == nil {\n                return\n            }\n            if (!accountObject.hasFetchedAccountData() || fetchDataAgain) {\n                let cell = self.accountsTableView!.cellForRow(at: indexPath) as? TLAccountTableViewCell\n                if cell != nil {\n                    (cell!.accessoryView! as! UIActivityIndicatorView).isHidden = false\n                    (cell!.accessoryView! as! UIActivityIndicatorView).startAnimating()\n                    cell!.accountBalanceButton!.isHidden = true\n                }\n                AppDelegate.instance().pendingOperations.addSetUpAccountOperation(accountObject, fetchDataAgain: fetchDataAgain, success: {\n                    if cell != nil {\n                        (cell!.accessoryView as! UIActivityIndicatorView).stopAnimating()\n                        (cell!.accessoryView as! UIActivityIndicatorView).isHidden = true\n                        cell!.accountBalanceButton!.isHidden = false\n                        if accountObject.downloadState == .downloaded {\n                            let balance = TLCurrencyFormat.getProperAmount(accountObject.getBalance())\n                            cell!.accountBalanceButton!.setTitle(balance as String, for: UIControlState())\n                        }\n                        cell!.accountBalanceButton!.isHidden = false\n                    }\n                })\n            } else {\n                if let cell = self.accountsTableView!.cellForRow(at: indexPath) as? TLAccountTableViewCell {\n                    cell.accountNameLabel!.text = accountObject.getAccountName()\n                    let balance = TLCurrencyFormat.getProperAmount(accountObject.getBalance())\n                    cell.accountBalanceButton!.setTitle(balance as String, for: UIControlState())\n                }\n            }\n        }\n    }\n\n    fileprivate func refreshImportedAddressBalances(_ fetchDataAgain: Bool) {\n        if (AppDelegate.instance().importedAddresses!.getCount() > 0 &&\n            (!AppDelegate.instance().importedAddresses!.hasFetchedAddressesData() || fetchDataAgain)) {\n            for i in stride(from: 0, to: AppDelegate.instance().importedAddresses!.getCount(), by: 1) {\n                    let indexPath = IndexPath(row: i, section: importedAddressSection)\n                    if let cell = self.accountsTableView!.cellForRow(at: indexPath) as? TLAccountTableViewCell {\n                        (cell.accessoryView as! UIActivityIndicatorView).isHidden = false\n                        cell.accountBalanceButton!.isHidden = true\n                        (cell.accessoryView as! UIActivityIndicatorView).startAnimating()\n                    }\n                }\n                \n                AppDelegate.instance().pendingOperations.addSetUpImportedAddressesOperation(AppDelegate.instance().importedAddresses!, fetchDataAgain: fetchDataAgain, success: {\n                    for i in stride(from: 0, to: AppDelegate.instance().importedAddresses!.getCount(), by: 1) {\n                        let indexPath = IndexPath(row: i, section: self.importedAddressSection)\n                        if let cell = self.accountsTableView!.cellForRow(at: indexPath) as? TLAccountTableViewCell {\n                            (cell.accessoryView as! UIActivityIndicatorView).stopAnimating()\n                            (cell.accessoryView as! UIActivityIndicatorView).isHidden = true\n                            if AppDelegate.instance().importedAddresses!.downloadState == .downloaded {\n                                let importAddressObject = AppDelegate.instance().importedAddresses!.getAddressObjectAtIdx(i)\n                                let balance = TLCurrencyFormat.getProperAmount(importAddressObject.getBalance()!)\n                                cell.accountBalanceButton!.setTitle(balance as String, for: UIControlState())\n                            }\n                            cell.accountBalanceButton!.isHidden = false\n                        }\n                    }\n                })\n        }\n    }\n\n    fileprivate func refreshImportedWatchAddressBalances(_ fetchDataAgain: Bool) {\n        if (AppDelegate.instance().importedWatchAddresses!.getCount() > 0 && (!AppDelegate.instance().importedWatchAddresses!.hasFetchedAddressesData() || fetchDataAgain)) {\n            for i in stride(from: 0, to: AppDelegate.instance().importedWatchAddresses!.getCount(), by: 1) {\n                let indexPath = IndexPath(row: i, section: importedWatchAddressSection)\n                if let cell = self.accountsTableView!.cellForRow(at: indexPath) as? TLAccountTableViewCell {\n                    (cell.accessoryView as! UIActivityIndicatorView).isHidden = false\n                    cell.accountBalanceButton!.isHidden = true\n                    (cell.accessoryView as! UIActivityIndicatorView).startAnimating()\n                }\n            }\n            \n            AppDelegate.instance().pendingOperations.addSetUpImportedAddressesOperation(AppDelegate.instance().importedWatchAddresses!, fetchDataAgain: fetchDataAgain, success: {\n                for i in stride(from: 0, to: AppDelegate.instance().importedWatchAddresses!.getCount(), by: 1) {\n                    let indexPath = IndexPath(row: i, section: self.importedWatchAddressSection)\n                    if let cell = self.accountsTableView!.cellForRow(at: indexPath) as? TLAccountTableViewCell {\n                        (cell.accessoryView as! UIActivityIndicatorView).stopAnimating()\n                        (cell.accessoryView as! UIActivityIndicatorView).isHidden = true\n                        \n                        if AppDelegate.instance().importedWatchAddresses!.downloadState == .downloaded {\n                            let importAddressObject = AppDelegate.instance().importedWatchAddresses!.getAddressObjectAtIdx(i)\n                            let balance = TLCurrencyFormat.getProperAmount(importAddressObject.getBalance()!)\n                            cell.accountBalanceButton!.setTitle(balance as String, for: UIControlState())\n                        }\n                        cell.accountBalanceButton!.isHidden = false\n                    }\n                }\n            })\n        }\n    }\n\n    fileprivate func refreshAccountBalances(_ fetchDataAgain: Bool) -> () {\n        for i in stride(from: 0, to: AppDelegate.instance().accounts!.getNumberOfAccounts(), by: 1) {\n            let accountObject = AppDelegate.instance().accounts!.getAccountObjectForIdx(i)\n            let indexPath = IndexPath(row: i, section: accountListSection)\n            if self.accountsTableView?.cellForRow(at: indexPath) == nil {\n                return\n            }\n            if (!accountObject.hasFetchedAccountData() || fetchDataAgain) {\n                let cell = self.accountsTableView!.cellForRow(at: indexPath) as? TLAccountTableViewCell\n                if cell != nil {\n                    (cell!.accessoryView! as! UIActivityIndicatorView).isHidden = false\n                    cell!.accountBalanceButton!.isHidden = true\n                    (cell!.accessoryView! as! UIActivityIndicatorView).startAnimating()\n                }\n                AppDelegate.instance().pendingOperations.addSetUpAccountOperation(accountObject, fetchDataAgain: fetchDataAgain, success: {\n                    if cell != nil {\n                        (cell!.accessoryView as! UIActivityIndicatorView).stopAnimating()\n                        (cell!.accessoryView as! UIActivityIndicatorView).isHidden = true\n                        cell!.accountBalanceButton!.isHidden = false\n                        if accountObject.downloadState != .failed {\n                            let balance = TLCurrencyFormat.getProperAmount(accountObject.getBalance())\n                            cell!.accountBalanceButton!.setTitle(balance as String, for: UIControlState())\n                            cell!.accountBalanceButton!.isHidden = false\n                        }\n                    }\n                })\n            } else {\n                if let cell = self.accountsTableView!.cellForRow(at: indexPath) as? TLAccountTableViewCell {\n                    cell.accountNameLabel!.text = (accountObject.getAccountName())\n                    let balance = TLCurrencyFormat.getProperAmount(accountObject.getBalance())\n                    cell.accountBalanceButton!.setTitle(balance as String, for: UIControlState())\n                }\n            }\n        }\n    }\n\n    override func didReceiveMemoryWarning() {\n        super.didReceiveMemoryWarning()\n    }\n\n    override func prepare(for segue: UIStoryboardSegue, sender: Any!) -> () {\n        if (segue.identifier == \"SegueAddressList\") {\n            let vc = segue.destination as! TLAddressListViewController\n            vc.navigationItem.title = TLDisplayStrings.ADDRESSES_STRING()\n            vc.accountObject = showAddressListAccountObject\n            vc.showBalances = showAddressListShowBalances\n        }\n    }\n\n    func refreshWalletAccountsNotification(_ notification: Notification) -> () {\n        self.refreshWalletAccounts(false)\n    }\n\n    fileprivate func refreshWalletAccounts(_ fetchDataAgain: Bool) -> () {\n        self._accountsTableViewReloadDataWrapper()\n        self.refreshAccountBalances(fetchDataAgain)\n        if TLPreferences.enabledColdWallet() {\n            self.refreshColdWalletAccounts(fetchDataAgain)\n        }\n        if (TLPreferences.enabledAdvancedMode()) {\n            self.refreshImportedAccounts(fetchDataAgain)\n            self.refreshImportedWatchAccounts(fetchDataAgain)\n            self.refreshImportedAddressBalances(fetchDataAgain)\n            self.refreshImportedWatchAddressBalances(fetchDataAgain)\n        }\n    }\n\n    fileprivate func setUpCellAccounts(_ accountObject: TLAccountObject, cell: TLAccountTableViewCell, cellForRowAtIndexPath indexPath: IndexPath) -> () {\n        cell.accountNameLabel!.isHidden = false\n        cell.accountBalanceButton!.isHidden = false\n        cell.textLabel!.isHidden = true\n\n        cell.accountNameLabel!.text = accountObject.getAccountName()\n\n        if (accountObject.hasFetchedAccountData()) {\n            (cell.accessoryView! as! UIActivityIndicatorView).isHidden = true\n            (cell.accessoryView! as! UIActivityIndicatorView).stopAnimating()\n            let balance = TLCurrencyFormat.getProperAmount(accountObject.getBalance())\n            cell.accountBalanceButton!.setTitle(balance as String, for: UIControlState())\n            cell.accountBalanceButton!.isHidden = false\n        } else {\n            (cell.accessoryView! as! UIActivityIndicatorView).isHidden = false\n            (cell.accessoryView! as! UIActivityIndicatorView).startAnimating()\n            AppDelegate.instance().pendingOperations.addSetUpAccountOperation(accountObject, fetchDataAgain: false, success: {\n                (cell.accessoryView as! UIActivityIndicatorView).stopAnimating()\n                (cell.accessoryView as! UIActivityIndicatorView).isHidden = true\n                if accountObject.downloadState == .downloaded {\n                    let balance = TLCurrencyFormat.getProperAmount(accountObject.getBalance())\n                    cell.accountBalanceButton!.setTitle(balance as String, for: UIControlState())\n                    cell.accountBalanceButton!.isHidden = false\n                }\n            })\n        }\n    }\n\n    fileprivate func setUpCellImportedAddresses(_ importedAddressObject: TLImportedAddress, cell: TLAccountTableViewCell, cellForRowAtIndexPath indexPath: IndexPath) -> () {\n        cell.accountNameLabel!.isHidden = false\n        cell.accountBalanceButton!.isHidden = false\n        cell.textLabel!.isHidden = true\n\n        let label = importedAddressObject.getLabel()\n        cell.accountNameLabel!.text = label\n\n\n        if (importedAddressObject.hasFetchedAccountData()) {\n            (cell.accessoryView! as! UIActivityIndicatorView).isHidden = true\n            (cell.accessoryView! as! UIActivityIndicatorView).stopAnimating()\n            let balance = TLCurrencyFormat.getProperAmount(importedAddressObject.getBalance()!)\n            cell.accountBalanceButton!.setTitle(balance as String, for: UIControlState())\n        }\n    }\n\n    fileprivate func setUpCellArchivedImportedAddresses(_ importedAddressObject: TLImportedAddress, cell: TLAccountTableViewCell, cellForRowAtIndexPath indexPath: IndexPath) -> () {\n        cell.accountNameLabel!.isHidden = true\n        cell.accountBalanceButton!.isHidden = true\n        cell.textLabel!.isHidden = false\n\n        let label = importedAddressObject.getLabel()\n        cell.textLabel!.text = label\n    }\n\n    fileprivate func setUpCellArchivedAccounts(_ accountObject: TLAccountObject, cell: TLAccountTableViewCell, cellForRowAtIndexPath indexPath: IndexPath) -> () {\n\n        cell.accountNameLabel!.isHidden = true\n        cell.accountBalanceButton!.isHidden = true\n        cell.textLabel!.isHidden = false\n\n        cell.textLabel!.text = accountObject.getAccountName()\n        (cell.accessoryView! as! UIActivityIndicatorView).isHidden = true\n    }\n\n    fileprivate func promtForLabel(_ success: @escaping TLPrompts.UserInputCallback, failure: @escaping TLPrompts.Failure) -> () {\n        func addTextField(_ textField: UITextField!){\n            textField.placeholder = TLDisplayStrings.LABEL_STRING()\n        }\n        \n        UIAlertController.showAlert(in: self,\n            withTitle: TLDisplayStrings.ENTER_LABEL_STRING(),\n            message: \"\",\n            preferredStyle: .alert,\n            cancelButtonTitle: TLDisplayStrings.SAVE_STRING(),\n            destructiveButtonTitle: nil,\n            otherButtonTitles: [TLDisplayStrings.SAVE_STRING()],\n            preShow: {(controller) in\n                controller!.addTextField(configurationHandler: addTextField)\n            },\n            tap: {(alertView, action, buttonIndex) in\n            if (buttonIndex == alertView!.firstOtherButtonIndex) {\n                if(alertView!.textFields != nil) {\n                    let label = (alertView!.textFields![0] ).text\n                    success(label)\n                }\n            } else if (buttonIndex == alertView!.cancelButtonIndex) {\n                failure(true)\n            }\n        })\n    }\n\n    fileprivate func promtForNameAccount(_ success: @escaping TLPrompts.UserInputCallback, failure: @escaping TLPrompts.Failure) -> () {\n        func addTextField(_ textField: UITextField!){\n            textField.placeholder = TLDisplayStrings.ACCOUNT_NAME_STRING()\n        }\n        \n        UIAlertController.showAlert(in: self,\n            withTitle: TLDisplayStrings.ENTER_LABEL_STRING(),\n            message: \"\",\n            preferredStyle: .alert,\n            cancelButtonTitle: TLDisplayStrings.CANCEL_STRING(),\n            destructiveButtonTitle: nil,\n            otherButtonTitles: [TLDisplayStrings.SAVE_STRING()],\n            preShow: {(controller) in\n                controller!.addTextField(configurationHandler: addTextField)\n            },\n            tap: {(alertView, action, buttonIndex) in\n                if (buttonIndex == alertView!.firstOtherButtonIndex) {\n                    let accountName = (alertView!.textFields![0]).text\n                    success(accountName)\n                } else if (buttonIndex == alertView!.cancelButtonIndex) {\n                    failure(true)\n                }\n        })\n    }\n    \n    func _accountsTableViewReloadDataWrapper() -> () {\n        accountActionsArray = TLHelpDoc.getAccountActionsArray()\n        \n        numberOfSections = 2\n        \n        var sectionCounter = 1\n        \n        if TLPreferences.enabledColdWallet() {\n            if (AppDelegate.instance().coldWalletAccounts!.getNumberOfAccounts() > 0) {\n                coldWalletAccountSection = sectionCounter\n                sectionCounter += 1\n                numberOfSections += 1\n            } else {\n                coldWalletAccountSection = NSIntegerMax\n            }\n        }\n        \n        if (TLPreferences.enabledAdvancedMode()) {\n            if (AppDelegate.instance().importedAccounts!.getNumberOfAccounts() > 0) {\n                importedAccountSection = sectionCounter\n                sectionCounter += 1\n                numberOfSections += 1\n            } else {\n                importedAccountSection = NSIntegerMax\n            }\n            \n            if (AppDelegate.instance().importedWatchAccounts!.getNumberOfAccounts() > 0) {\n                importedWatchAccountSection = sectionCounter\n                sectionCounter += 1\n                numberOfSections += 1\n            } else {\n                importedWatchAccountSection = NSIntegerMax\n            }\n            \n            if (AppDelegate.instance().importedAddresses!.getCount() > 0) {\n                importedAddressSection = sectionCounter\n                sectionCounter += 1\n                numberOfSections += 1\n            } else {\n                importedAddressSection = NSIntegerMax\n            }\n            \n            if (AppDelegate.instance().importedWatchAddresses!.getCount() > 0) {\n                importedWatchAddressSection = sectionCounter\n                sectionCounter += 1\n                numberOfSections += 1\n            } else {\n                importedWatchAddressSection = NSIntegerMax\n            }\n        } else {\n            importedAccountSection = NSIntegerMax\n            importedWatchAccountSection = NSIntegerMax\n            importedAddressSection = NSIntegerMax\n            importedWatchAddressSection = NSIntegerMax\n        }\n        \n        if (AppDelegate.instance().accounts!.getNumberOfArchivedAccounts() > 0) {\n            archivedAccountSection = sectionCounter\n            sectionCounter += 1\n            numberOfSections += 1\n        } else {\n            archivedAccountSection = NSIntegerMax\n        }\n        \n        if TLPreferences.enabledColdWallet() {\n            if (AppDelegate.instance().coldWalletAccounts!.getNumberOfArchivedAccounts() > 0) {\n                archivedColdWalletAccountSection = sectionCounter\n                sectionCounter += 1\n                numberOfSections += 1\n            } else {\n                archivedColdWalletAccountSection = NSIntegerMax\n            }\n        }\n        \n        if (TLPreferences.enabledAdvancedMode()) {\n            if (AppDelegate.instance().importedAccounts!.getNumberOfArchivedAccounts() > 0) {\n                archivedImportedAccountSection = sectionCounter\n                sectionCounter += 1\n                numberOfSections += 1\n            } else {\n                archivedImportedAccountSection = NSIntegerMax\n            }\n            \n            if (AppDelegate.instance().importedWatchAccounts!.getNumberOfArchivedAccounts() > 0) {\n                archivedImportedWatchAccountSection = sectionCounter\n                sectionCounter += 1\n                numberOfSections += 1\n            } else {\n                archivedImportedWatchAccountSection = NSIntegerMax\n            }\n            \n            if (AppDelegate.instance().importedAddresses!.getArchivedCount() > 0) {\n                archivedImportedAddressSection = sectionCounter\n                sectionCounter += 1\n                numberOfSections += 1\n            } else {\n                archivedImportedAddressSection = NSIntegerMax\n            }\n            \n            if (AppDelegate.instance().importedWatchAddresses!.getArchivedCount() > 0) {\n                archivedImportedWatchAddressSection = sectionCounter\n                sectionCounter += 1\n                numberOfSections += 1\n            } else {\n                archivedImportedWatchAddressSection = NSIntegerMax\n            }\n        } else {\n            archivedImportedAccountSection = NSIntegerMax\n            archivedImportedWatchAccountSection = NSIntegerMax\n        }\n        \n        accountActionSection = sectionCounter\n        \n        self.accountsTableView!.reloadData()\n    }\n    \n    func accountsTableViewReloadDataWrapper(_ notification: Notification) -> () {\n        _accountsTableViewReloadDataWrapper()\n    }\n\n    fileprivate func promptAccountsActionSheet(_ idx: Int) -> () {\n        let accountObject = AppDelegate.instance().accounts!.getAccountObjectForIdx(idx)\n        let accountHDIndex = accountObject.getAccountHDIndex()\n        let title = String(format: TLDisplayStrings.ACCOUNT_ID_COLON_X_STRING(), accountHDIndex)\n        \n        let otherButtonTitles:[String]\n        if (TLPreferences.enabledAdvancedMode()) {\n            if TLWalletUtils.ALLOW_MANUAL_SCAN_FOR_STEALTH_PAYMENT() {\n                otherButtonTitles = [TLDisplayStrings.VIEW_ACCOUNT_PUBLIC_KEY_QR_CODE_STRING(), TLDisplayStrings.VIEW_ACCOUNT_PRIVATE_KEY_QR_CODE_STRING(), TLDisplayStrings.VIEW_ADDRESSES_STRING(), TLDisplayStrings.SCAN_FOR_REUSABLE_ADDRESS_PAYMENT_STRING(), TLDisplayStrings.EDIT_ACCOUNT_NAME_STRING(), TLDisplayStrings.ARCHIVE_ACCOUNT_STRING()]\n            } else {\n                otherButtonTitles = [TLDisplayStrings.VIEW_ACCOUNT_PUBLIC_KEY_QR_CODE_STRING(), TLDisplayStrings.VIEW_ACCOUNT_PRIVATE_KEY_QR_CODE_STRING(), TLDisplayStrings.VIEW_ADDRESSES_STRING(), TLDisplayStrings.EDIT_ACCOUNT_NAME_STRING(), TLDisplayStrings.ARCHIVE_ACCOUNT_STRING()]\n            }\n        } else {\n            otherButtonTitles = [TLDisplayStrings.VIEW_ADDRESSES_STRING(), TLDisplayStrings.EDIT_ACCOUNT_NAME_STRING(), TLDisplayStrings.ARCHIVE_ACCOUNT_STRING()]\n        }\n        \n        UIAlertController.showAlert(in: self,\n            withTitle: title,\n            message: \"\",\n            preferredStyle: .actionSheet,\n            cancelButtonTitle: TLDisplayStrings.CANCEL_STRING(),\n            destructiveButtonTitle: nil,\n            otherButtonTitles: otherButtonTitles as [AnyObject],\n            tap: {(actionSheet, action, buttonIndex) in\n                var VIEW_EXTENDED_PUBLIC_KEY_BUTTON_IDX = actionSheet!.firstOtherButtonIndex\n                var VIEW_EXTENDED_PRIVATE_KEY_BUTTON_IDX = actionSheet!.firstOtherButtonIndex+1\n                var VIEW_ADDRESSES_BUTTON_IDX = actionSheet!.firstOtherButtonIndex+2\n                var MANUALLY_SCAN_TX_FOR_STEALTH_TRANSACTION_BUTTON_IDX:NSInteger\n                var RENAME_ACCOUNT_BUTTON_IDX:NSInteger\n                var ARCHIVE_ACCOUNT_BUTTON_IDX:NSInteger\n                if TLWalletUtils.ALLOW_MANUAL_SCAN_FOR_STEALTH_PAYMENT() {\n                    MANUALLY_SCAN_TX_FOR_STEALTH_TRANSACTION_BUTTON_IDX = actionSheet!.firstOtherButtonIndex+3\n                    RENAME_ACCOUNT_BUTTON_IDX = actionSheet!.firstOtherButtonIndex+4\n                    ARCHIVE_ACCOUNT_BUTTON_IDX = actionSheet!.firstOtherButtonIndex+5\n                } else {\n                    MANUALLY_SCAN_TX_FOR_STEALTH_TRANSACTION_BUTTON_IDX = -1\n                    RENAME_ACCOUNT_BUTTON_IDX = actionSheet!.firstOtherButtonIndex+3\n                    ARCHIVE_ACCOUNT_BUTTON_IDX = actionSheet!.firstOtherButtonIndex+4\n                }\n                if (!TLPreferences.enabledAdvancedMode()) {\n                    VIEW_EXTENDED_PUBLIC_KEY_BUTTON_IDX = -1\n                    VIEW_EXTENDED_PRIVATE_KEY_BUTTON_IDX = -1\n                    MANUALLY_SCAN_TX_FOR_STEALTH_TRANSACTION_BUTTON_IDX = -1\n                    VIEW_ADDRESSES_BUTTON_IDX = actionSheet!.firstOtherButtonIndex\n                    RENAME_ACCOUNT_BUTTON_IDX = actionSheet!.firstOtherButtonIndex+1\n                    ARCHIVE_ACCOUNT_BUTTON_IDX = actionSheet!.firstOtherButtonIndex+2\n                }\n                \n                if (buttonIndex == VIEW_EXTENDED_PUBLIC_KEY_BUTTON_IDX) {\n                    self.QRImageModal = TLQRImageModal(data: accountObject.getExtendedPubKey() as NSString, buttonCopyText: TLDisplayStrings.COPY_TO_CLIPBOARD_STRING(), vc: self)\n                    self.QRImageModal!.show()\n                    NotificationCenter.default.post(name: Notification.Name(rawValue: TLNotificationEvents.EVENT_VIEW_EXTENDED_PUBLIC_KEY()), object: accountObject, userInfo: nil)\n                    \n                    \n                } else if (buttonIndex == VIEW_EXTENDED_PRIVATE_KEY_BUTTON_IDX) {\n                    self.QRImageModal = TLQRImageModal(data: accountObject.getExtendedPrivKey()! as NSString, buttonCopyText: TLDisplayStrings.COPY_TO_CLIPBOARD_STRING(), vc: self)\n                    self.QRImageModal!.show()\n                    NotificationCenter.default.post(name: Notification.Name(rawValue: TLNotificationEvents.EVENT_VIEW_EXTENDED_PRIVATE_KEY()),\n                        object: accountObject, userInfo: nil)\n                    \n                } else if (buttonIndex == MANUALLY_SCAN_TX_FOR_STEALTH_TRANSACTION_BUTTON_IDX) {\n                    self.promptInfoAndToManuallyScanForStealthTransactionAccount(accountObject)\n                } else if (buttonIndex == VIEW_ADDRESSES_BUTTON_IDX) {\n                    self.showAddressListAccountObject = accountObject\n                    self.showAddressListShowBalances = true\n                    self.performSegue(withIdentifier: \"SegueAddressList\", sender: self)\n                } else if (buttonIndex == RENAME_ACCOUNT_BUTTON_IDX) {\n                    self.promtForNameAccount({\n                        (accountName: String!) in\n                        AppDelegate.instance().accounts!.renameAccount(accountObject.getAccountIdxNumber(), accountName: accountName)\n                        NotificationCenter.default.post(name: Notification.Name(rawValue: TLNotificationEvents.EVENT_EDIT_ACCOUNT_NAME()),\n                            object: accountObject, userInfo: nil)\n                        \n                        self._accountsTableViewReloadDataWrapper()\n                        \n                        }, failure: ({\n                            (isCanceled: Bool) in\n                        }))\n                } else if (buttonIndex == ARCHIVE_ACCOUNT_BUTTON_IDX) {\n                    self.promptToArchiveAccountHDWalletAccount(accountObject)\n                    \n                } else if (buttonIndex == actionSheet!.cancelButtonIndex) {\n                    \n                }\n        })\n    }\n\n    fileprivate func promptColdWalletAccountsActionSheet(_ indexPath: IndexPath) -> () {\n        let accountObject = AppDelegate.instance().coldWalletAccounts!.getAccountObjectForIdx((indexPath as NSIndexPath).row)\n        let accountHDIndex = accountObject.getAccountHDIndex()\n        let title = String(format: TLDisplayStrings.ACCOUNT_ID_COLON_X_STRING(), accountHDIndex)\n        let otherButtons:[String]\n        if (TLPreferences.enabledAdvancedMode()) {\n            otherButtons = [TLDisplayStrings.VIEW_ACCOUNT_PUBLIC_KEY_QR_CODE_STRING(), TLDisplayStrings.VIEW_ADDRESSES_STRING(), TLDisplayStrings.EDIT_ACCOUNT_NAME_STRING(), TLDisplayStrings.ARCHIVE_ACCOUNT_STRING()]\n        } else {\n            otherButtons = [TLDisplayStrings.VIEW_ADDRESSES_STRING(), TLDisplayStrings.EDIT_ACCOUNT_NAME_STRING(), TLDisplayStrings.ARCHIVE_ACCOUNT_STRING()]\n        }\n        \n        UIAlertController.showAlert(in: self,\n                                                    withTitle: title,\n                                                    message:\"\",\n                                                    preferredStyle: .actionSheet,\n                                                    cancelButtonTitle: TLDisplayStrings.CANCEL_STRING(),\n                                                    destructiveButtonTitle: nil,\n                                                    otherButtonTitles: otherButtons as [AnyObject],\n                                                    tap: {(actionSheet, action, buttonIndex) in\n                                                        var VIEW_EXTENDED_PUBLIC_KEY_BUTTON_IDX = actionSheet!.firstOtherButtonIndex\n                                                        var VIEW_ADDRESSES_BUTTON_IDX = actionSheet!.firstOtherButtonIndex+1\n                                                        var RENAME_ACCOUNT_BUTTON_IDX = actionSheet!.firstOtherButtonIndex+2\n                                                        var ARCHIVE_ACCOUNT_BUTTON_IDX = actionSheet!.firstOtherButtonIndex+3\n                                                        if (!TLPreferences.enabledAdvancedMode()) {\n                                                            VIEW_EXTENDED_PUBLIC_KEY_BUTTON_IDX = -1\n                                                            VIEW_ADDRESSES_BUTTON_IDX = actionSheet!.firstOtherButtonIndex\n                                                            RENAME_ACCOUNT_BUTTON_IDX = actionSheet!.firstOtherButtonIndex+1\n                                                            ARCHIVE_ACCOUNT_BUTTON_IDX = actionSheet!.firstOtherButtonIndex+2\n                                                        }\n                                                        \n                                                        if (buttonIndex == VIEW_EXTENDED_PUBLIC_KEY_BUTTON_IDX) {\n                                                            self.QRImageModal = TLQRImageModal(data: accountObject.getExtendedPubKey() as NSString,\n                                                                buttonCopyText: TLDisplayStrings.COPY_TO_CLIPBOARD_STRING(), vc: self)\n                                                            self.QRImageModal!.show()\n                                                            NotificationCenter.default.post(name: Notification.Name(rawValue: TLNotificationEvents.EVENT_VIEW_EXTENDED_PUBLIC_KEY()), object: accountObject, userInfo: nil)\n                                                        } else if (buttonIndex == VIEW_ADDRESSES_BUTTON_IDX) {\n                                                            self.showAddressListAccountObject = accountObject\n                                                            self.showAddressListShowBalances = true\n                                                            self.performSegue(withIdentifier: \"SegueAddressList\", sender: self)\n                                                            \n                                                        } else if (buttonIndex == RENAME_ACCOUNT_BUTTON_IDX) {\n                                                            self.promtForNameAccount({\n                                                                (accountName: String!) in\n                                                                AppDelegate.instance().coldWalletAccounts!.renameAccount(accountObject.getAccountIdxNumber(), accountName: accountName)\n                                                                self._accountsTableViewReloadDataWrapper()\n                                                                }, failure: {\n                                                                    (isCancelled: Bool) in\n                                                            })\n                                                        } else if (buttonIndex == ARCHIVE_ACCOUNT_BUTTON_IDX) {\n                                                            self.promptToArchiveAccount(accountObject)\n                                                        } else if (buttonIndex == actionSheet!.cancelButtonIndex) {\n                                                            \n                                                        }\n        })\n    }\n\n\n    fileprivate func promptImportedAccountsActionSheet(_ indexPath: IndexPath) -> () {\n        let accountObject = AppDelegate.instance().importedAccounts!.getAccountObjectForIdx((indexPath as NSIndexPath).row)\n        let accountHDIndex = accountObject.getAccountHDIndex()\n        let title = String(format: TLDisplayStrings.ACCOUNT_ID_COLON_X_STRING(), accountHDIndex)\n        \n        let otherButtonTitles:[String]\n        if TLWalletUtils.ALLOW_MANUAL_SCAN_FOR_STEALTH_PAYMENT() {\n            otherButtonTitles = [TLDisplayStrings.VIEW_ACCOUNT_PUBLIC_KEY_QR_CODE_STRING(), TLDisplayStrings.VIEW_ACCOUNT_PRIVATE_KEY_QR_CODE_STRING(), TLDisplayStrings.VIEW_ADDRESSES_STRING(), TLDisplayStrings.SCAN_REUSABLE_ADDRESS_PAYMENT_STRING(), TLDisplayStrings.EDIT_ACCOUNT_NAME_STRING(), TLDisplayStrings.ARCHIVE_ACCOUNT_STRING()]\n        } else {\n            otherButtonTitles = [TLDisplayStrings.VIEW_ACCOUNT_PUBLIC_KEY_QR_CODE_STRING(), TLDisplayStrings.VIEW_ACCOUNT_PRIVATE_KEY_QR_CODE_STRING(), TLDisplayStrings.VIEW_ADDRESSES_STRING(), TLDisplayStrings.EDIT_ACCOUNT_NAME_STRING(), TLDisplayStrings.ARCHIVE_ACCOUNT_STRING()]\n        }\n        \n        UIAlertController.showAlert(in: self,\n            withTitle: title,\n            message: \"\",\n            preferredStyle: .actionSheet,\n            cancelButtonTitle: TLDisplayStrings.CANCEL_STRING(),\n            destructiveButtonTitle: nil,\n            otherButtonTitles: otherButtonTitles,\n            tap: {(actionSheet, action, buttonIndex) in\n                let VIEW_EXTENDED_PUBLIC_KEY_BUTTON_IDX = actionSheet!.firstOtherButtonIndex\n                let VIEW_EXTENDED_PRIVATE_KEY_BUTTON_IDX = actionSheet!.firstOtherButtonIndex+1\n                let VIEW_ADDRESSES_BUTTON_IDX = actionSheet!.firstOtherButtonIndex+2\n                let MANUALLY_SCAN_TX_FOR_STEALTH_TRANSACTION_BUTTON_IDX:NSInteger\n                let RENAME_ACCOUNT_BUTTON_IDX:NSInteger\n                let ARCHIVE_ACCOUNT_BUTTON_IDX:NSInteger\n                if TLWalletUtils.ALLOW_MANUAL_SCAN_FOR_STEALTH_PAYMENT() {\n                    MANUALLY_SCAN_TX_FOR_STEALTH_TRANSACTION_BUTTON_IDX = actionSheet!.firstOtherButtonIndex+3\n                    RENAME_ACCOUNT_BUTTON_IDX = actionSheet!.firstOtherButtonIndex+4\n                    ARCHIVE_ACCOUNT_BUTTON_IDX = actionSheet!.firstOtherButtonIndex+5\n                } else {\n                    MANUALLY_SCAN_TX_FOR_STEALTH_TRANSACTION_BUTTON_IDX = -1\n                    RENAME_ACCOUNT_BUTTON_IDX = actionSheet!.firstOtherButtonIndex+3\n                    ARCHIVE_ACCOUNT_BUTTON_IDX = actionSheet!.firstOtherButtonIndex+4\n                }\n     \n                \n                if (buttonIndex == VIEW_EXTENDED_PUBLIC_KEY_BUTTON_IDX) {\n                    self.QRImageModal = TLQRImageModal(data: accountObject.getExtendedPubKey() as NSString,\n                        buttonCopyText: TLDisplayStrings.COPY_TO_CLIPBOARD_STRING(), vc: self)\n                    self.QRImageModal!.show()\n                    NotificationCenter.default.post(name: Notification.Name(rawValue: TLNotificationEvents.EVENT_VIEW_EXTENDED_PUBLIC_KEY()), object: accountObject, userInfo: nil)\n                } else if (buttonIndex == VIEW_EXTENDED_PRIVATE_KEY_BUTTON_IDX) {\n                    self.QRImageModal = TLQRImageModal(data: accountObject.getExtendedPrivKey()! as NSString,\n                        buttonCopyText: TLDisplayStrings.COPY_TO_CLIPBOARD_STRING(), vc: self)\n                    self.QRImageModal!.show()\n                    NotificationCenter.default.post(name: Notification.Name(rawValue: TLNotificationEvents.EVENT_VIEW_EXTENDED_PRIVATE_KEY()), object: accountObject, userInfo: nil)\n                    \n                } else if (buttonIndex == VIEW_ADDRESSES_BUTTON_IDX) {\n                    self.showAddressListAccountObject = accountObject\n                    self.showAddressListShowBalances = true\n                    self.performSegue(withIdentifier: \"SegueAddressList\", sender: self)\n                    \n                } else if (buttonIndex == MANUALLY_SCAN_TX_FOR_STEALTH_TRANSACTION_BUTTON_IDX) {\n                    self.promptInfoAndToManuallyScanForStealthTransactionAccount(accountObject)\n                    \n                } else if (buttonIndex == RENAME_ACCOUNT_BUTTON_IDX) {\n                    \n                    self.promtForNameAccount({\n                        (accountName: String!) in\n                        AppDelegate.instance().importedAccounts!.renameAccount(accountObject.getAccountIdxNumber(), accountName: accountName)\n                        NotificationCenter.default.post(name: Notification.Name(rawValue: TLNotificationEvents.EVENT_EDIT_ACCOUNT_NAME()), object: nil, userInfo: nil)\n                        self._accountsTableViewReloadDataWrapper()\n                        }\n                        , failure: ({\n                            (isCanceled: Bool) in\n                        }))}\n                else if (buttonIndex == ARCHIVE_ACCOUNT_BUTTON_IDX) {\n                    self.promptToArchiveAccount(accountObject)\n                } else if (buttonIndex == actionSheet!.cancelButtonIndex) {\n                }\n        })\n    }\n\n    fileprivate func promptImportedWatchAccountsActionSheet(_ indexPath: IndexPath) -> () {\n        let accountObject = AppDelegate.instance().importedWatchAccounts!.getAccountObjectForIdx((indexPath as NSIndexPath).row)\n        let accountHDIndex = accountObject.getAccountHDIndex()\n        let title = String(format: TLDisplayStrings.ACCOUNT_ID_COLON_X_STRING(), accountHDIndex)\n        var addClearPrivateKeyButton = false\n        let otherButtons:[String]\n        if (accountObject.hasSetExtendedPrivateKeyInMemory()) {\n            addClearPrivateKeyButton = true\n            otherButtons = [TLDisplayStrings.CLEAR_ACCOUNT_PRIVATE_KEY_FROM_MEMORY_STRING(), TLDisplayStrings.VIEW_ACCOUNT_PUBLIC_KEY_QR_CODE_STRING(), TLDisplayStrings.VIEW_ADDRESSES_STRING(),  TLDisplayStrings.EDIT_ACCOUNT_NAME_STRING(), TLDisplayStrings.ARCHIVE_ACCOUNT_STRING()]\n        } else {\n            otherButtons = [TLDisplayStrings.VIEW_ACCOUNT_PUBLIC_KEY_QR_CODE_STRING(), TLDisplayStrings.VIEW_ADDRESSES_STRING(), TLDisplayStrings.EDIT_ACCOUNT_NAME_STRING(), TLDisplayStrings.ARCHIVE_ACCOUNT_STRING()]\n        }\n        \n        UIAlertController.showAlert(in: self,\n            withTitle: title,\n            message:\"\",\n            preferredStyle: .actionSheet,\n            cancelButtonTitle: TLDisplayStrings.CANCEL_STRING(),\n            destructiveButtonTitle: nil,\n            otherButtonTitles: otherButtons as [AnyObject],\n            tap: {(actionSheet, action, buttonIndex) in\n                var CLEAR_ACCOUNT_PRIVATE_KEY_BUTTON_IDX = -1\n                var VIEW_EXTENDED_PUBLIC_KEY_BUTTON_IDX = actionSheet!.firstOtherButtonIndex\n                var VIEW_ADDRESSES_BUTTON_IDX = actionSheet!.firstOtherButtonIndex+1\n                var RENAME_ACCOUNT_BUTTON_IDX = actionSheet!.firstOtherButtonIndex+2\n                var ARCHIVE_ACCOUNT_BUTTON_IDX = actionSheet!.firstOtherButtonIndex+3\n\n                if (accountObject.hasSetExtendedPrivateKeyInMemory()) {\n                    CLEAR_ACCOUNT_PRIVATE_KEY_BUTTON_IDX = actionSheet!.firstOtherButtonIndex\n                    VIEW_EXTENDED_PUBLIC_KEY_BUTTON_IDX = actionSheet!.firstOtherButtonIndex+1\n                    VIEW_ADDRESSES_BUTTON_IDX = actionSheet!.firstOtherButtonIndex+2\n                    RENAME_ACCOUNT_BUTTON_IDX = actionSheet!.firstOtherButtonIndex+3\n                    ARCHIVE_ACCOUNT_BUTTON_IDX = actionSheet!.firstOtherButtonIndex+4\n                }\n\n                if (addClearPrivateKeyButton && buttonIndex == CLEAR_ACCOUNT_PRIVATE_KEY_BUTTON_IDX) {\n                assert(accountObject.hasSetExtendedPrivateKeyInMemory(), \"\")\n                accountObject.clearExtendedPrivateKeyFromMemory()\n                TLPrompts.promptSuccessMessage(nil, message: TLDisplayStrings.CLEARED_FROM_MEMORY_STRING())\n            } else if (buttonIndex == VIEW_EXTENDED_PUBLIC_KEY_BUTTON_IDX) {\n                self.QRImageModal = TLQRImageModal(data: accountObject.getExtendedPubKey() as NSString,\n                        buttonCopyText: TLDisplayStrings.COPY_TO_CLIPBOARD_STRING(), vc: self)\n                self.QRImageModal!.show()\n                NotificationCenter.default.post(name: Notification.Name(rawValue: TLNotificationEvents.EVENT_VIEW_EXTENDED_PUBLIC_KEY()), object: accountObject, userInfo: nil)\n            } else if (buttonIndex == VIEW_ADDRESSES_BUTTON_IDX) {\n                self.showAddressListAccountObject = accountObject\n                self.showAddressListShowBalances = true\n                self.performSegue(withIdentifier: \"SegueAddressList\", sender: self)\n\n            } else if (buttonIndex == RENAME_ACCOUNT_BUTTON_IDX) {\n                self.promtForNameAccount({\n                    (accountName: String!) in\n                    AppDelegate.instance().importedWatchAccounts!.renameAccount(accountObject.getAccountIdxNumber(), accountName: accountName)\n                    self._accountsTableViewReloadDataWrapper()\n                }, failure: {\n                    (isCancelled: Bool) in\n                })\n            } else if (buttonIndex == ARCHIVE_ACCOUNT_BUTTON_IDX) {\n                self.promptToArchiveAccount(accountObject)\n            } else if (buttonIndex == actionSheet!.cancelButtonIndex) {\n\n            }\n        })\n    }\n\n    fileprivate func promptImportedAddressActionSheet(_ importedAddressIdx: Int) -> () {\n        let importAddressObject = AppDelegate.instance().importedAddresses!.getAddressObjectAtIdx(importedAddressIdx)\n        \n        UIAlertController.showAlert(in: self,\n            withTitle: nil,\n            message:\"\",\n            preferredStyle: .actionSheet,\n            cancelButtonTitle: TLDisplayStrings.CANCEL_STRING(),\n            destructiveButtonTitle: nil,\n            otherButtonTitles: [TLDisplayStrings.VIEW_ADDRESS_QR_CODE_STRING(), TLDisplayStrings.VIEW_PRIVATE_KEY_QR_CODE_STRING(), TLDisplayStrings.VIEW_ADDRESS_IN_WEB_STRING(), TLDisplayStrings.EDIT_LABEL_STRING(), TLDisplayStrings.ARCHIVE_ADDRESS_STRING()],\n            \n            tap: {(actionSheet, action, buttonIndex) in\n     \n        \n            if (buttonIndex == actionSheet?.firstOtherButtonIndex) {\n                self.QRImageModal = TLQRImageModal(data: importAddressObject.getAddress() as NSString, buttonCopyText: TLDisplayStrings.COPY_TO_CLIPBOARD_STRING(), vc: self)\n                self.QRImageModal!.show()\n            } else if (buttonIndex == (actionSheet?.firstOtherButtonIndex)!+1) {\n                self.QRImageModal = TLQRImageModal(data: importAddressObject.getEitherPrivateKeyOrEncryptedPrivateKey()! as NSString, buttonCopyText: TLDisplayStrings.COPY_TO_CLIPBOARD_STRING(), vc: self)\n\n                self.QRImageModal!.show()\n\n            } else if (buttonIndex == (actionSheet?.firstOtherButtonIndex)!+2) {\n                TLBlockExplorerAPI.instance().openWebViewForAddress(importAddressObject.getAddress())\n\n            } else if (buttonIndex == (actionSheet?.firstOtherButtonIndex)!+3) {\n\n                self.promtForLabel({\n                    (inputText: String!) in\n\n                    AppDelegate.instance().importedAddresses!.setLabel(inputText, positionInWalletArray: Int(importAddressObject.getPositionInWalletArrayNumber()))\n\n                    self._accountsTableViewReloadDataWrapper()\n                }, failure: {\n                    (isCancelled: Bool) in\n                })\n            } else if (buttonIndex == (actionSheet?.firstOtherButtonIndex)!+4) {\n                self.promptToArchiveAddress(importAddressObject)\n            } else if (buttonIndex == actionSheet?.cancelButtonIndex) {\n            }\n        })\n    }\n\n    fileprivate func promptImportedWatchAddressActionSheet(_ importedAddressIdx: Int) -> () {\n        let importAddressObject = AppDelegate.instance().importedWatchAddresses!.getAddressObjectAtIdx(importedAddressIdx)\n        var addClearPrivateKeyButton = false\n\n        let otherButtonTitles:[String]\n        if (importAddressObject.hasSetPrivateKeyInMemory()) {\n            addClearPrivateKeyButton = true\n\n            otherButtonTitles = [TLDisplayStrings.CLEAR_PRIVATE_KEY_FROM_MEMORY_STRING(), TLDisplayStrings.VIEW_ADDRESS_QR_CODE_STRING(), TLDisplayStrings.VIEW_ADDRESS_IN_WEB_STRING(), TLDisplayStrings.EDIT_LABEL_STRING(), TLDisplayStrings.ARCHIVE_ADDRESS_STRING()]\n        } else {\n            otherButtonTitles = [TLDisplayStrings.VIEW_ADDRESS_QR_CODE_STRING(), TLDisplayStrings.VIEW_ADDRESS_IN_WEB_STRING(), TLDisplayStrings.EDIT_LABEL_STRING(), TLDisplayStrings.ARCHIVE_ADDRESS_STRING()]\n        }\n\n        UIAlertController.showAlert(in: self,\n            withTitle: nil,\n            message:\"\",\n            preferredStyle: .actionSheet,\n            cancelButtonTitle: TLDisplayStrings.CANCEL_STRING(),\n            destructiveButtonTitle: nil,\n            otherButtonTitles: otherButtonTitles as [AnyObject],\n            \n            tap: {(actionSheet, action, buttonIndex) in\n\n                var CLEAR_PRIVATE_KEY_BUTTON_IDX = -1\n                var VIEW_ADDRESS_BUTTON_IDX = actionSheet?.firstOtherButtonIndex\n                var VIEW_ADDRESS_IN_WEB_BUTTON_IDX = (actionSheet?.firstOtherButtonIndex)!+1\n                var RENAME_ADDRESS_BUTTON_IDX = (actionSheet?.firstOtherButtonIndex)!+2\n                var ARCHIVE_ADDRESS_BUTTON_IDX = (actionSheet?.firstOtherButtonIndex)!+3\n                if (importAddressObject.hasSetPrivateKeyInMemory()) {\n                    CLEAR_PRIVATE_KEY_BUTTON_IDX = (actionSheet?.firstOtherButtonIndex)!\n                    VIEW_ADDRESS_BUTTON_IDX = (actionSheet?.firstOtherButtonIndex)! + 1\n                    VIEW_ADDRESS_IN_WEB_BUTTON_IDX = (actionSheet?.firstOtherButtonIndex)! + 2\n                    RENAME_ADDRESS_BUTTON_IDX = (actionSheet?.firstOtherButtonIndex)! + 3\n                    ARCHIVE_ADDRESS_BUTTON_IDX = (actionSheet?.firstOtherButtonIndex)! + 4\n                }\n\n                if (addClearPrivateKeyButton && buttonIndex == CLEAR_PRIVATE_KEY_BUTTON_IDX) {\n                assert(importAddressObject.hasSetPrivateKeyInMemory(), \"\")\n                importAddressObject.clearPrivateKeyFromMemory()\n                TLPrompts.promptSuccessMessage(nil, message: TLDisplayStrings.CLEARED_FROM_MEMORY_STRING())\n            }\n            if (buttonIndex == VIEW_ADDRESS_BUTTON_IDX) {\n                self.QRImageModal = TLQRImageModal(data: importAddressObject.getAddress() as NSString,\n                        buttonCopyText: TLDisplayStrings.COPY_TO_CLIPBOARD_STRING(), vc: self)\n                self.QRImageModal!.show()\n\n            } else if (buttonIndex == VIEW_ADDRESS_IN_WEB_BUTTON_IDX) {\n                TLBlockExplorerAPI.instance().openWebViewForAddress(importAddressObject.getAddress())\n\n            } else if (buttonIndex == RENAME_ADDRESS_BUTTON_IDX) {\n\n                self.promtForLabel({\n                    (inputText: String!) in\n\n                    AppDelegate.instance().importedWatchAddresses!.setLabel(inputText, positionInWalletArray: Int(importAddressObject.getPositionInWalletArrayNumber()))\n                    self._accountsTableViewReloadDataWrapper()\n                }, failure: ({\n                    (isCanceled: Bool) in\n                }))\n            } else if (buttonIndex == ARCHIVE_ADDRESS_BUTTON_IDX) {\n                self.promptToArchiveAddress(importAddressObject)\n            } else if (buttonIndex == actionSheet?.cancelButtonIndex) {\n\n            }\n        })\n    }\n\n    fileprivate func promptArchivedImportedAddressActionSheet(_ importedAddressIdx: Int) -> () {\n        let importAddressObject = AppDelegate.instance().importedAddresses!.getArchivedAddressObjectAtIdx(importedAddressIdx)\n        UIAlertController.showAlert(in: self,\n                                                    withTitle: nil,\n                                                    message:\"\",\n                                                    preferredStyle: .actionSheet,\n                                                    cancelButtonTitle: TLDisplayStrings.CANCEL_STRING(),\n                                                    destructiveButtonTitle: nil,\n                                                    otherButtonTitles: [TLDisplayStrings.VIEW_ADDRESS_QR_CODE_STRING(), TLDisplayStrings.VIEW_PRIVATE_KEY_QR_CODE_STRING(), TLDisplayStrings.VIEW_ADDRESS_IN_WEB_STRING(), TLDisplayStrings.EDIT_LABEL_STRING(), TLDisplayStrings.UNARCHIVED_ADDRESS_STRING(), TLDisplayStrings.DELETE_ADDRESS_STRING()],\n                                                    \n                                                    tap: {(actionSheet, action, buttonIndex) in\n                                                        \n                                                        if (buttonIndex == actionSheet?.firstOtherButtonIndex) {\n                                                            self.QRImageModal = TLQRImageModal(data: importAddressObject.getAddress() as NSString, buttonCopyText: TLDisplayStrings.COPY_TO_CLIPBOARD_STRING(), vc: self)\n                                                            \n                                                            self.QRImageModal!.show()\n                                                            \n                                                        } else if (buttonIndex == (actionSheet?.firstOtherButtonIndex)!+1) {\n                                                            self.QRImageModal = TLQRImageModal(data: importAddressObject.getEitherPrivateKeyOrEncryptedPrivateKey()! as NSString, buttonCopyText: TLDisplayStrings.COPY_TO_CLIPBOARD_STRING(), vc: self)\n                                                            \n                                                            self.QRImageModal!.show()\n                                                            \n                                                        } else if (buttonIndex == (actionSheet?.firstOtherButtonIndex)!+2) {\n                                                            TLBlockExplorerAPI.instance().openWebViewForAddress(importAddressObject.getAddress())\n                                                            \n                                                        } else if (buttonIndex == (actionSheet?.firstOtherButtonIndex)!+3) {\n                                                            \n                                                            self.promtForLabel({\n                                                                (inputText: String!) in\n                                                                \n                                                                \n                                                                AppDelegate.instance().importedAddresses!.setLabel(inputText, positionInWalletArray: Int(importAddressObject.getPositionInWalletArrayNumber()))\n                                                                self._accountsTableViewReloadDataWrapper()\n                                                                }, failure: ({\n                                                                    (isCanceled: Bool) in\n                                                                }))\n                                                        } else if (buttonIndex == (actionSheet?.firstOtherButtonIndex)!+4) {\n                                                            self.promptToUnarchiveAddress(importAddressObject)\n                                                        } else if (buttonIndex == (actionSheet?.firstOtherButtonIndex)!+5) {\n                                                            self.promptToDeleteImportedAddress(importedAddressIdx)\n                                                        } else if (buttonIndex == actionSheet?.cancelButtonIndex) {\n                                                        }\n        })\n    }\n\n    fileprivate func promptArchivedImportedWatchAddressActionSheet(_ importedAddressIdx: Int) -> () {\n        let importAddressObject = AppDelegate.instance().importedWatchAddresses!.getArchivedAddressObjectAtIdx(importedAddressIdx)\n        var addClearPrivateKeyButton = false\n        let otherButtonTitles:[String]\n        if (importAddressObject.hasSetPrivateKeyInMemory()) {\n            addClearPrivateKeyButton = true\n            otherButtonTitles = [TLDisplayStrings.CLEAR_PRIVATE_KEY_FROM_MEMORY_STRING(), TLDisplayStrings.VIEW_ADDRESS_QR_CODE_STRING(), TLDisplayStrings.VIEW_ADDRESS_IN_WEB_STRING(), TLDisplayStrings.EDIT_LABEL_STRING(), TLDisplayStrings.UNARCHIVED_ADDRESS_STRING(), TLDisplayStrings.DELETE_ADDRESS_STRING()]\n        } else {\n            otherButtonTitles = [TLDisplayStrings.VIEW_ADDRESS_QR_CODE_STRING(), TLDisplayStrings.VIEW_ADDRESS_IN_WEB_STRING(), TLDisplayStrings.EDIT_LABEL_STRING(), TLDisplayStrings.UNARCHIVED_ADDRESS_STRING(), TLDisplayStrings.DELETE_ADDRESS_STRING()]\n        }\n\n        UIAlertController.showAlert(in: self,\n            withTitle: nil,\n            message:\"\",\n            preferredStyle: .actionSheet,\n            cancelButtonTitle: TLDisplayStrings.CANCEL_STRING(),\n            destructiveButtonTitle: nil,\n            otherButtonTitles: otherButtonTitles as [AnyObject],\n            \n            tap: {(actionSheet, action, buttonIndex) in\n\n                var CLEAR_PRIVATE_KEY_BUTTON_IDX = -1\n                var VIEW_ADDRESS_BUTTON_IDX = (actionSheet?.firstOtherButtonIndex)! + 0\n                var VIEW_ADDRESS_IN_WEB_BUTTON_IDX = (actionSheet?.firstOtherButtonIndex)! + 1\n                var RENAME_ADDRESS_BUTTON_IDX = (actionSheet?.firstOtherButtonIndex)! + 2\n                var UNARCHIVE_ADDRESS_BUTTON_IDX = (actionSheet?.firstOtherButtonIndex)! + 3\n                var DELETE_ADDRESS_BUTTON_IDX = (actionSheet?.firstOtherButtonIndex)! + 4\n                if (importAddressObject.hasSetPrivateKeyInMemory()) {\n                    CLEAR_PRIVATE_KEY_BUTTON_IDX = (actionSheet?.firstOtherButtonIndex)!\n                    VIEW_ADDRESS_BUTTON_IDX = (actionSheet?.firstOtherButtonIndex)! + 1\n                    VIEW_ADDRESS_IN_WEB_BUTTON_IDX = (actionSheet?.firstOtherButtonIndex)! + 2\n                    RENAME_ADDRESS_BUTTON_IDX = (actionSheet?.firstOtherButtonIndex)! + 3\n                    UNARCHIVE_ADDRESS_BUTTON_IDX = (actionSheet?.firstOtherButtonIndex)! + 4\n                    DELETE_ADDRESS_BUTTON_IDX = (actionSheet?.firstOtherButtonIndex)! + 5\n                } else {\n                }\n\n                if (addClearPrivateKeyButton && buttonIndex == CLEAR_PRIVATE_KEY_BUTTON_IDX) {\n                assert(importAddressObject.hasSetPrivateKeyInMemory(), \"\")\n                importAddressObject.clearPrivateKeyFromMemory()\n                TLPrompts.promptSuccessMessage(nil, message: TLDisplayStrings.CLEARED_FROM_MEMORY_STRING())\n            }\n            if (buttonIndex == VIEW_ADDRESS_BUTTON_IDX) {\n                self.QRImageModal = TLQRImageModal(data: importAddressObject.getAddress() as NSString,\n                        buttonCopyText: TLDisplayStrings.COPY_TO_CLIPBOARD_STRING(), vc: self)\n                self.QRImageModal!.show()\n\n            } else if (buttonIndex == VIEW_ADDRESS_IN_WEB_BUTTON_IDX) {\n                TLBlockExplorerAPI.instance().openWebViewForAddress(importAddressObject.getAddress())\n\n            } else if (buttonIndex == RENAME_ADDRESS_BUTTON_IDX) {\n\n                self.promtForLabel({\n                    (inputText: String!) in\n                    \n                    AppDelegate.instance().importedWatchAddresses!.setLabel(inputText, positionInWalletArray: Int(importAddressObject.getPositionInWalletArrayNumber()))\n                    self._accountsTableViewReloadDataWrapper()\n                    }, failure: ({\n                        (isCanceled: Bool) in\n                    }))\n            } else if (buttonIndex == UNARCHIVE_ADDRESS_BUTTON_IDX) {\n                self.promptToUnarchiveAddress(importAddressObject)\n            } else if (buttonIndex == DELETE_ADDRESS_BUTTON_IDX) {\n                self.promptToDeleteImportedWatchAddress(importedAddressIdx)\n            } else if (buttonIndex == actionSheet?.cancelButtonIndex) {\n\n            }\n        })\n    }\n\n    fileprivate func promptArchivedImportedAccountsActionSheet(_ indexPath: IndexPath, accountType: TLAccountType) -> () {\n        assert(accountType == .imported || accountType == .importedWatch || accountType == .coldWallet, \"not TLAccountTypeImported or TLAccountTypeImportedWatch or not TLAccountTypeIColdWallet\")\n        var accountObject: TLAccountObject?\n        if (accountType == .coldWallet) {\n            accountObject = AppDelegate.instance().coldWalletAccounts!.getArchivedAccountObjectForIdx((indexPath as NSIndexPath).row)\n        } else if (accountType == .imported) {\n            accountObject = AppDelegate.instance().importedAccounts!.getArchivedAccountObjectForIdx((indexPath as NSIndexPath).row)\n        } else if (accountType == .importedWatch) {\n            accountObject = AppDelegate.instance().importedWatchAccounts!.getArchivedAccountObjectForIdx((indexPath as NSIndexPath).row)\n        }\n        \n        let accountHDIndex = accountObject!.getAccountHDIndex()\n        let title = String(format: TLDisplayStrings.ACCOUNT_ID_COLON_X_STRING(), accountHDIndex)\n        let otherButtonTitles:[String]\n        if (accountObject!.getAccountType() == .imported) {\n            otherButtonTitles = [TLDisplayStrings.VIEW_ACCOUNT_PUBLIC_KEY_QR_CODE_STRING(), TLDisplayStrings.VIEW_ACCOUNT_PRIVATE_KEY_QR_CODE_STRING(), TLDisplayStrings.VIEW_ADDRESSES_STRING(), TLDisplayStrings.EDIT_ACCOUNT_NAME_STRING(), TLDisplayStrings.UNARCHIVE_ACCOUNT_STRING(), TLDisplayStrings.DELETE_ACCOUNT_STRING()]\n        } else {\n            otherButtonTitles = [TLDisplayStrings.VIEW_ACCOUNT_PUBLIC_KEY_QR_CODE_STRING(), TLDisplayStrings.VIEW_ADDRESSES_STRING(), TLDisplayStrings.EDIT_ACCOUNT_NAME_STRING(), TLDisplayStrings.UNARCHIVE_ACCOUNT_STRING(), TLDisplayStrings.DELETE_ACCOUNT_STRING()]\n        }\n        \n        UIAlertController.showAlert(in: self,\n            withTitle: title,\n            message:\"\",\n            preferredStyle: .actionSheet,\n            cancelButtonTitle: TLDisplayStrings.CANCEL_STRING(),\n            destructiveButtonTitle: nil,\n            otherButtonTitles: otherButtonTitles as [AnyObject],\n            \n            tap: {(actionSheet, action, buttonIndex) in\n                let VIEW_EXTENDED_PUBLIC_KEY_BUTTON_IDX = (actionSheet?.firstOtherButtonIndex)! + 0\n                var VIEW_EXTENDED_PRIVATE_KEY_BUTTON_IDX = (actionSheet?.firstOtherButtonIndex)! + 1\n                var VIEW_ADDRESSES_BUTTON_IDX = (actionSheet?.firstOtherButtonIndex)! + 2\n                var RENAME_ACCOUNT_BUTTON_IDX = (actionSheet?.firstOtherButtonIndex)! + 3\n                var UNARCHIVE_ACCOUNT_BUTTON_IDX = (actionSheet?.firstOtherButtonIndex)! + 4\n                var DELETE_ACCOUNT_BUTTON_IDX = (actionSheet?.firstOtherButtonIndex)! + 5\n                if (accountObject!.getAccountType() == .imported) {\n                } else {\n                    VIEW_EXTENDED_PRIVATE_KEY_BUTTON_IDX = -1\n                    VIEW_ADDRESSES_BUTTON_IDX = (actionSheet?.firstOtherButtonIndex)! + 1\n                    RENAME_ACCOUNT_BUTTON_IDX = (actionSheet?.firstOtherButtonIndex)! + 2\n                    UNARCHIVE_ACCOUNT_BUTTON_IDX = (actionSheet?.firstOtherButtonIndex)! + 3\n                    DELETE_ACCOUNT_BUTTON_IDX = (actionSheet?.firstOtherButtonIndex)! + 4\n                }\n                if (buttonIndex == VIEW_EXTENDED_PUBLIC_KEY_BUTTON_IDX) {\n                    self.QRImageModal = TLQRImageModal(data: accountObject!.getExtendedPubKey() as NSString,\n                        buttonCopyText: TLDisplayStrings.COPY_TO_CLIPBOARD_STRING(), vc: self)\n                    self.QRImageModal!.show()\n                    NotificationCenter.default.post(name: Notification.Name(rawValue: TLNotificationEvents.EVENT_VIEW_EXTENDED_PUBLIC_KEY()),\n                        object: accountObject, userInfo: nil)\n                    \n                } else if (buttonIndex == VIEW_EXTENDED_PRIVATE_KEY_BUTTON_IDX) {\n                    self.QRImageModal = TLQRImageModal(data: accountObject!.getExtendedPrivKey()! as NSString,\n                        buttonCopyText: TLDisplayStrings.COPY_TO_CLIPBOARD_STRING(), vc: self)\n                    self.QRImageModal!.show()\n                    NotificationCenter.default.post(name: Notification.Name(rawValue: TLNotificationEvents.EVENT_VIEW_EXTENDED_PRIVATE_KEY()),\n                        object: accountObject, userInfo: nil)\n                    \n                } else if (buttonIndex == VIEW_ADDRESSES_BUTTON_IDX) {\n                    self.showAddressListAccountObject = accountObject\n                    self.showAddressListShowBalances = false\n                    self.performSegue(withIdentifier: \"SegueAddressList\", sender: self)\n                } else if (buttonIndex == RENAME_ACCOUNT_BUTTON_IDX) {\n                    self.promtForNameAccount({\n                        (accountName: String!) in\n                        if (accountType == .coldWallet) {\n                            AppDelegate.instance().coldWalletAccounts!.renameAccount(accountObject!.getAccountIdxNumber(), accountName: accountName)\n                        } else if (accountType == .imported) {\n                            AppDelegate.instance().importedAccounts!.renameAccount(accountObject!.getAccountIdxNumber(), accountName: accountName)\n                        } else if (accountType == .importedWatch) {\n                            AppDelegate.instance().importedWatchAccounts!.renameAccount(accountObject!.getAccountIdxNumber(), accountName: accountName)\n                        }\n                        self._accountsTableViewReloadDataWrapper()\n                        }, failure: ({\n                            (isCanceled: Bool) in\n                        }))\n                } else if (buttonIndex == UNARCHIVE_ACCOUNT_BUTTON_IDX) {\n                    self.promptToUnarchiveAccount(accountObject!)\n                } else if (buttonIndex == DELETE_ACCOUNT_BUTTON_IDX) {\n                    if (accountType == .coldWallet) {\n                        self.promptToDeleteColdWalletAccount(indexPath)\n                    } else if (accountType == .imported) {\n                        self.promptToDeleteImportedAccount(indexPath)\n                    } else if (accountType == .importedWatch) {\n                        self.promptToDeleteImportedWatchAccount(indexPath)\n                    }\n                } else if (buttonIndex == actionSheet?.cancelButtonIndex) {\n                    \n                }\n        })\n    }\n\n    fileprivate func promptArchivedAccountsActionSheet(_ idx: Int) -> () {\n        let accountObject = AppDelegate.instance().accounts!.getArchivedAccountObjectForIdx(idx)\n        let accountHDIndex = accountObject.getAccountHDIndex()\n        let title = String(format: TLDisplayStrings.ACCOUNT_ID_COLON_X_STRING(), accountHDIndex)\n        let otherButtonTitles:[String]\n        if (TLPreferences.enabledAdvancedMode()) {\n            otherButtonTitles = [TLDisplayStrings.VIEW_ACCOUNT_PUBLIC_KEY_QR_CODE_STRING(), TLDisplayStrings.VIEW_ACCOUNT_PRIVATE_KEY_QR_CODE_STRING(), TLDisplayStrings.VIEW_ADDRESSES_STRING(), TLDisplayStrings.EDIT_ACCOUNT_NAME_STRING(), TLDisplayStrings.UNARCHIVE_ACCOUNT_STRING()]\n        } else {\n            otherButtonTitles = [TLDisplayStrings.VIEW_ADDRESSES_STRING(), TLDisplayStrings.EDIT_ACCOUNT_NAME_STRING(), TLDisplayStrings.UNARCHIVE_ACCOUNT_STRING()]\n        }\n\n        UIAlertController.showAlert(in: self,\n            withTitle: title,\n            message:\"\",\n            preferredStyle: .actionSheet,\n            cancelButtonTitle: TLDisplayStrings.CANCEL_STRING(),\n            destructiveButtonTitle: nil,\n            otherButtonTitles: otherButtonTitles as [AnyObject],\n            tap: {(actionSheet, action, buttonIndex) in\n                var VIEW_EXTENDED_PUBLIC_KEY_BUTTON_IDX = actionSheet!.firstOtherButtonIndex + 0\n                var VIEW_EXTENDED_PRIVATE_KEY_BUTTON_IDX = actionSheet!.firstOtherButtonIndex + 1\n                var VIEW_ADDRESSES_BUTTON_IDX = actionSheet!.firstOtherButtonIndex + 2\n                var RENAME_ACCOUNT_BUTTON_IDX = actionSheet!.firstOtherButtonIndex + 3\n                var UNARCHIVE_ACCOUNT_BUTTON_IDX = actionSheet!.firstOtherButtonIndex + 4\n                if (!TLPreferences.enabledAdvancedMode()) {\n                    VIEW_EXTENDED_PUBLIC_KEY_BUTTON_IDX = -1\n                    VIEW_EXTENDED_PRIVATE_KEY_BUTTON_IDX = -1\n                    VIEW_ADDRESSES_BUTTON_IDX = actionSheet!.firstOtherButtonIndex + 0\n                    RENAME_ACCOUNT_BUTTON_IDX = actionSheet!.firstOtherButtonIndex + 1\n                    UNARCHIVE_ACCOUNT_BUTTON_IDX = actionSheet!.firstOtherButtonIndex + 2\n                }\n            \n            if (buttonIndex == VIEW_EXTENDED_PUBLIC_KEY_BUTTON_IDX) {\n                self.QRImageModal = TLQRImageModal(data: accountObject.getExtendedPubKey() as NSString,\n                        buttonCopyText: TLDisplayStrings.COPY_TO_CLIPBOARD_STRING(), vc: self)\n                self.QRImageModal!.show()\n                NotificationCenter.default.post(name: Notification.Name(rawValue: TLNotificationEvents.EVENT_VIEW_EXTENDED_PUBLIC_KEY()), object: accountObject, userInfo: nil)\n\n            } else if (buttonIndex == VIEW_EXTENDED_PRIVATE_KEY_BUTTON_IDX) {\n                self.QRImageModal = TLQRImageModal(data: accountObject.getExtendedPrivKey()! as NSString,\n                        buttonCopyText: TLDisplayStrings.COPY_TO_CLIPBOARD_STRING(), vc: self)\n                self.QRImageModal!.show()\n                NotificationCenter.default.post(name: Notification.Name(rawValue: TLNotificationEvents.EVENT_VIEW_EXTENDED_PRIVATE_KEY()), object: accountObject, userInfo: nil)\n\n            } else if (buttonIndex == VIEW_ADDRESSES_BUTTON_IDX) {\n                self.showAddressListAccountObject = accountObject\n                self.showAddressListShowBalances = false\n                self.performSegue(withIdentifier: \"SegueAddressList\", sender: self)\n            } else if (buttonIndex == RENAME_ACCOUNT_BUTTON_IDX) {\n                self.promtForNameAccount({\n                    (accountName: String!) in\n                    AppDelegate.instance().accounts!.renameAccount(accountObject.getAccountIdxNumber(), accountName: accountName)\n                    self._accountsTableViewReloadDataWrapper()\n                }, failure: ({\n                    (isCanceled: Bool) in\n                }))\n            } else if (buttonIndex == UNARCHIVE_ACCOUNT_BUTTON_IDX) {\n                self.promptToUnarchiveAccount(accountObject)\n            } else if (buttonIndex == actionSheet!.cancelButtonIndex) {\n            }\n        })\n    }\n\n    fileprivate func promptToManuallyScanForStealthTransactionAccount(_ accountObject: TLAccountObject) -> () {\n        func addTextField(_ textField: UITextField!){\n            textField.placeholder = TLDisplayStrings.TRANSACTION_ID_STRING()\n        }\n        \n        UIAlertController.showAlert(in: self,\n            withTitle: TLDisplayStrings.SCAN_FOR_REUSABLE_ADDRESS_TRANSACTION_STRING(),\n            message: \"\",\n            preferredStyle: .alert,\n            cancelButtonTitle: TLDisplayStrings.CANCEL_STRING(),\n            destructiveButtonTitle: nil,\n            otherButtonTitles: [TLDisplayStrings.YES_STRING()],\n            \n            preShow: {(controller) in\n                controller!.addTextField(configurationHandler: addTextField)\n            }\n            ,\n            tap: {(alertView, action, buttonIndex) in\n                if (buttonIndex == alertView!.firstOtherButtonIndex) {\n                    let txid = (alertView!.textFields![0] ).text\n                    self.manuallyScanForStealthTransactionAccount(accountObject, txid: txid!)\n                } else if (buttonIndex == alertView!.cancelButtonIndex) {\n                    \n                }\n            }\n        )\n    }\n\n    fileprivate func manuallyScanForStealthTransactionAccount(_ accountObject: TLAccountObject, txid: String) -> () {\n        if accountObject.stealthWallet!.paymentTxidExist(txid) {\n            TLPrompts.promptSuccessMessage(\"\", message: String(format: TLDisplayStrings.TRANSACTION_X_ALREADY_ACCOUNTED_FOR_STRING(), txid))\n            return\n        }\n        \n        if txid.characters.count != 64 || TLWalletUtils.hexStringToData(txid) == nil {\n            TLPrompts.promptErrorMessage(TLDisplayStrings.INVALID_TRANSACTION_ID(), message: \"\")\n            return\n        }\n\n        TLHUDWrapper.showHUDAddedTo(self.slidingViewController().topViewController.view, labelText: TLDisplayStrings.CHECKING_TRANSACTION_STRING(), animated: true)\n\n        TLBlockExplorerAPI.instance().getTx(txid, success: {\n            (jsonData) in\n            let stealthDataScriptAndOutputAddresses = TLStealthWallet.getStealthDataScriptAndOutputAddresses(jsonData as! NSDictionary)\n            if stealthDataScriptAndOutputAddresses == nil || stealthDataScriptAndOutputAddresses!.stealthDataScript == nil {\n                TLHUDWrapper.hideHUDForView(self.view, animated: true)\n                TLPrompts.promptSuccessMessage(\"\", message: TLDisplayStrings.TRANSACTION_NOT_REUSABLE_ADDRESS_TRANSACTION_STRING())\n                return\n            }\n            \n            let scanPriv = accountObject.stealthWallet!.getStealthAddressScanKey()\n            let spendPriv = accountObject.stealthWallet!.getStealthAddressSpendKey()\n            let stealthDataScript = stealthDataScriptAndOutputAddresses!.stealthDataScript!\n            if let secret = TLStealthAddress.getPaymentAddressPrivateKeySecretFromScript(stealthDataScript, scanPrivateKey: scanPriv, spendPrivateKey: spendPriv) {\n                let paymentAddress = TLCoreBitcoinWrapper.getAddressFromSecret(secret, isTestnet: AppDelegate.instance().appWallet.walletConfig.isTestnet)\n                if (stealthDataScriptAndOutputAddresses!.outputAddresses).index(of: (paymentAddress!)) != nil {\n                    \n                    TLBlockExplorerAPI.instance().getUnspentOutputs([paymentAddress!], success: {\n                        (jsonData2: AnyObject!) in\n                        let unspentOutputs = (jsonData2 as! NSDictionary).object(forKey: \"unspent_outputs\") as! NSArray!\n                        if (unspentOutputs!.count > 0) {\n                            let privateKey = TLCoreBitcoinWrapper.privateKeyFromSecret(secret, isTestnet: AppDelegate.instance().appWallet.walletConfig.isTestnet)\n                            let txObject = TLTxObject(dict:jsonData as! NSDictionary)\n                            let txTime = txObject.getTxUnixTime()\n                            accountObject.stealthWallet!.addStealthAddressPaymentKey(privateKey, paymentAddress: paymentAddress!,\n                                txid: txid, txTime: txTime, stealthPaymentStatus: TLStealthPaymentStatus.unspent)\n                            \n                            TLHUDWrapper.hideHUDForView(self.view, animated: true)\n                            TLPrompts.promptSuccessMessage(TLDisplayStrings.SUCCESS_STRING(), message: String(format: TLDisplayStrings.FUNDS_IMPORTED(), txid))\n                            \n                            AppDelegate.instance().pendingOperations.addSetUpAccountOperation(accountObject, fetchDataAgain: true, success: {\n                                self.refreshWalletAccounts(false)\n                                \n                                TLStealthExplorerAPI.instance().lookupTx(accountObject.stealthWallet!.getStealthAddress(), txid: txid, success: { (jsonData) -> () in\n                                    DLog(\"lookupTx success \\(jsonData.description)\")\n                                }) { (code, status) -> () in\n                                    DLog(\"lookupTx failure code: \\(code) \\(status)\")\n                                }\n                            })\n                        } else {\n                            TLHUDWrapper.hideHUDForView(self.view, animated: true)\n                            TLPrompts.promptSuccessMessage(\"\", message: TLDisplayStrings.FUNDS_HAVE_BEEN_CLAIMED_ALREADY_STRING())\n                        }\n                        }, failure: {(code, status) in\n                            TLHUDWrapper.hideHUDForView(self.view, animated: true)\n                            TLPrompts.promptSuccessMessage(\"\", message: TLDisplayStrings.FUNDS_HAVE_BEEN_CLAIMED_ALREADY_STRING())\n                    })\n                } else {\n                    TLHUDWrapper.hideHUDForView(self.view, animated: true)\n                    TLPrompts.promptSuccessMessage(\"\", message: String(format: TLDisplayStrings.TRANSACTION_X_DOES_NOT_BELONG_TO_THIS_ACCOUNT_STRING(), txid))\n                }\n            } else {\n                TLHUDWrapper.hideHUDForView(self.view, animated: true)\n                TLPrompts.promptSuccessMessage(\"\", message: String(format: TLDisplayStrings.TRANSACTION_X_DOES_NOT_BELONG_TO_THIS_ACCOUNT_STRING(), txid))\n            }\n            \n            }, failure: {\n                (code, status) in\n                TLHUDWrapper.hideHUDForView(self.view, animated: true)\n                TLPrompts.promptSuccessMessage(TLDisplayStrings.ERROR_STRING(), message: TLDisplayStrings.ERROR_FETCHING_TRANSACTION_STRING())\n        })\n    }\n    \n    fileprivate func promptInfoAndToManuallyScanForStealthTransactionAccount(_ accountObject: TLAccountObject) -> () {\n        if (TLSuggestions.instance().enabledShowManuallyScanTransactionForStealthTxInfo()) {\n            TLPrompts.promtForOK(self, title:\"\", message: TLDisplayStrings.MANUALLY_SCAN_TRANSACTION_FOR_STEALTH_TX_INFO_STRING(), success: {\n                () in\n                self.promptToManuallyScanForStealthTransactionAccount(accountObject)\n                TLSuggestions.instance().setEnabledShowManuallyScanTransactionForStealthTxInfo(false)\n            })\n        } else {\n            self.promptToManuallyScanForStealthTransactionAccount(accountObject)\n        }\n    }\n\n    fileprivate func promptToUnarchiveAccount(_ accountObject: TLAccountObject) -> () {\n        UIAlertController.showAlert(in: self,\n            withTitle: TLDisplayStrings.UNARCHIVE_ACCOUNT_STRING(),\n            message: String(format: TLDisplayStrings.ARE_YOU_SURE_YOU_WANT_TO_UNARCHIVE_ACCOUNT_X_STRING(), accountObject.getAccountName()),\n            cancelButtonTitle: TLDisplayStrings.CANCEL_STRING(),\n            destructiveButtonTitle: nil,\n            otherButtonTitles: [TLDisplayStrings.YES_STRING()],\n            tap: {(alertView, action, buttonIndex) in\n                if (buttonIndex == alertView?.firstOtherButtonIndex) {\n                    if (accountObject.getAccountType() == .hdWallet) {\n                        AppDelegate.instance().accounts!.unarchiveAccount(accountObject.getAccountIdxNumber())\n                    } else if (accountObject.getAccountType() == .coldWallet) {\n                        AppDelegate.instance().coldWalletAccounts!.unarchiveAccount(accountObject.getPositionInWalletArray())\n                    } else if (accountObject.getAccountType() == .imported) {\n                        AppDelegate.instance().importedAccounts!.unarchiveAccount(accountObject.getPositionInWalletArray())\n                    } else if (accountObject.getAccountType() == .importedWatch) {\n                        AppDelegate.instance().importedWatchAccounts!.unarchiveAccount(accountObject.getPositionInWalletArray())\n                    }\n                    \n                    if TLWalletUtils.ALLOW_MANUAL_SCAN_FOR_STEALTH_PAYMENT() && !accountObject.isWatchOnly() && !accountObject.isColdWalletAccount() && !accountObject.stealthWallet!.hasUpdateStealthPaymentStatuses {\n                        accountObject.stealthWallet!.updateStealthPaymentStatusesAsync()\n                    }\n                    self._accountsTableViewReloadDataWrapper()\n                    AppDelegate.instance().pendingOperations.addSetUpAccountOperation(accountObject, fetchDataAgain: true, success: {\n                        self._accountsTableViewReloadDataWrapper()\n                    })\n                } else if (buttonIndex == alertView?.cancelButtonIndex) {\n                }\n            }\n        )\n    }\n\n    fileprivate func promptToArchiveAccount(_ accountObject: TLAccountObject) -> () {\n        UIAlertController.showAlert(in: self,\n            withTitle:  TLDisplayStrings.ARCHIVE_ACCOUNT_STRING(),\n            message: String(format: TLDisplayStrings.ARE_YOU_SURE_YOU_WANT_TO_ARCHIVE_ACCOUNT_X_STRING(), accountObject.getAccountName()),\n            cancelButtonTitle: TLDisplayStrings.CANCEL_STRING(),\n            destructiveButtonTitle: nil,\n            otherButtonTitles: [TLDisplayStrings.YES_STRING()],\n\n            tap: {(alertView, action, buttonIndex) in\n                if (buttonIndex == alertView?.firstOtherButtonIndex) {\n                    if (accountObject.getAccountType() == .hdWallet) {\n                        AppDelegate.instance().accounts!.archiveAccount(accountObject.getAccountIdxNumber())\n                    } else if (accountObject.getAccountType() == .coldWallet) {\n                        AppDelegate.instance().coldWalletAccounts!.archiveAccount(accountObject.getPositionInWalletArray())\n                    } else if (accountObject.getAccountType() == .imported) {\n                        AppDelegate.instance().importedAccounts!.archiveAccount(accountObject.getPositionInWalletArray())\n                    } else if (accountObject.getAccountType() == .importedWatch) {\n                        AppDelegate.instance().importedWatchAccounts!.archiveAccount(accountObject.getPositionInWalletArray())\n                    }\n                    self._accountsTableViewReloadDataWrapper()\n                    NotificationCenter.default.post(name: Notification.Name(rawValue: TLNotificationEvents.EVENT_ARCHIVE_ACCOUNT()), object: nil, userInfo: nil)\n                } else if (buttonIndex == alertView?.cancelButtonIndex) {\n                }\n            }\n        )\n    }\n\n    fileprivate func promptToArchiveAccountHDWalletAccount(_ accountObject: TLAccountObject) -> () {\n        if (accountObject.getAccountIdxNumber() == 0) {\n            let av = UIAlertView(title: TLDisplayStrings.CANNOT_ARCHIVE_YOUR_DEFAULT_ACCOUNT_STRING(),\n                    message: \"\",\n                    delegate: nil,\n                    cancelButtonTitle: nil,\n                    otherButtonTitles: TLDisplayStrings.OK_STRING())\n\n            av.show()\n        } else if (AppDelegate.instance().accounts!.getNumberOfAccounts() <= 1) {\n            let av = UIAlertView(title: TLDisplayStrings.CANNOT_ARCHIVE_YOUR_ONE_AND_ONLY_ACCOUNT_STRING(),\n                    message: \"\",\n                    delegate: nil,\n                    cancelButtonTitle: nil,\n                    otherButtonTitles: TLDisplayStrings.OK_STRING())\n\n            av.show()\n        } else {\n            self.promptToArchiveAccount(accountObject)\n        }\n    }\n\n    fileprivate func promptToArchiveAddress(_ importedAddressObject: TLImportedAddress) -> () {\n        UIAlertController.showAlert(in: self,\n            withTitle: TLDisplayStrings.ARCHIVE_ADDRESS_STRING(),\n            message: String(format: TLDisplayStrings.ARE_YOU_SURE_YOU_WANT_TO_ARCHIVE_ADDRESS_X_STRING(), importedAddressObject.getLabel()),\n            cancelButtonTitle: TLDisplayStrings.CANCEL_STRING(),\n            destructiveButtonTitle: nil,\n            otherButtonTitles: [TLDisplayStrings.YES_STRING()],\n            tap: {(alertView, action, buttonIndex) in\n                if (buttonIndex == alertView?.firstOtherButtonIndex) {\n                    if (importedAddressObject.isWatchOnly()) {\n                        AppDelegate.instance().importedWatchAddresses!.archiveAddress(Int(importedAddressObject.getPositionInWalletArrayNumber()))\n                    } else {\n                        AppDelegate.instance().importedAddresses!.archiveAddress(Int(importedAddressObject.getPositionInWalletArrayNumber()))\n                    }\n                    self._accountsTableViewReloadDataWrapper()\n                    NotificationCenter.default.post(name: Notification.Name(rawValue: TLNotificationEvents.EVENT_ARCHIVE_ACCOUNT()), object: nil, userInfo: nil)\n                } else if (buttonIndex == alertView?.cancelButtonIndex) {\n                    \n                }\n            }\n        )\n    }\n\n    fileprivate func promptToUnarchiveAddress(_ importedAddressObject: TLImportedAddress) -> () {\n        UIAlertController.showAlert(in: self,\n            withTitle: TLDisplayStrings.UNARCHIVE_ADDRESS_STRING(),\n            message:  String(format: TLDisplayStrings.ARE_YOU_SURE_YOU_WANT_TO_UNARCHIVE_ADDRESS_X_STRING(), importedAddressObject.getLabel()),\n            cancelButtonTitle: TLDisplayStrings.CANCEL_STRING(),\n            destructiveButtonTitle: nil,\n            otherButtonTitles: [TLDisplayStrings.YES_STRING()],\n            tap: {(alertView, action, buttonIndex) in\n                if (buttonIndex == alertView?.firstOtherButtonIndex) {\n                    if (importedAddressObject.isWatchOnly()) {\n                        AppDelegate.instance().importedWatchAddresses!.unarchiveAddress(Int(importedAddressObject.getPositionInWalletArrayNumber()))\n                    } else {\n                        AppDelegate.instance().importedAddresses!.unarchiveAddress(Int(importedAddressObject.getPositionInWalletArrayNumber()))\n                    }\n                    self._accountsTableViewReloadDataWrapper()\n                    importedAddressObject.getSingleAddressData({\n                        () in\n                        self._accountsTableViewReloadDataWrapper()\n                        }, failure: {\n                            () in\n                            \n                    })\n                } else if (buttonIndex == alertView?.cancelButtonIndex) {\n                    \n                }\n            }\n        )\n    }\n\n    fileprivate func promptToDeleteColdWalletAccount(_ indexPath: IndexPath) -> () {\n        let accountObject = AppDelegate.instance().coldWalletAccounts!.getArchivedAccountObjectForIdx((indexPath as NSIndexPath).row)\n        \n        UIAlertController.showAlert(in: self,\n                                                    withTitle: String(format: TLDisplayStrings.DELETE_X_STRING(), accountObject.getAccountName()),\n                                                    message: TLDisplayStrings.ARE_YOU_SURE_YOU_WANT_TO_DELETE_THIS_ACCOUNT_STRING(),\n                                                    cancelButtonTitle: TLDisplayStrings.NO_STRING(),\n                                                    destructiveButtonTitle: nil,\n                                                    otherButtonTitles: [TLDisplayStrings.YES_STRING()],\n                                                    tap: {(alertView, action, buttonIndex) in\n                                                        \n                                                        if (buttonIndex == alertView!.firstOtherButtonIndex) {\n                                                            AppDelegate.instance().coldWalletAccounts!.deleteAccount((indexPath as NSIndexPath).row)\n                                                            //*\n                                                            self.accountsTableView!.beginUpdates()\n                                                            let index = NSIndexPath(indexes:[self.archivedColdWalletAccountSection, (indexPath as NSIndexPath).row], length:2) as IndexPath\n                                                            let deleteIndexPaths = [index]\n                                                            self.accountsTableView!.deleteRows(at: deleteIndexPaths, with: .fade)\n                                                            self.accountsTableView!.endUpdates()\n                                                            //*/\n                                                            self._accountsTableViewReloadDataWrapper()\n                                                        } else if (buttonIndex == alertView!.cancelButtonIndex) {\n                                                            self.accountsTableView!.isEditing = false\n                                                        }\n        })\n    }\n    \n    fileprivate func promptToDeleteImportedAccount(_ indexPath: IndexPath) -> () {\n        let accountObject = AppDelegate.instance().importedAccounts!.getArchivedAccountObjectForIdx((indexPath as NSIndexPath).row)\n\n        UIAlertController.showAlert(in: self,\n            withTitle: String(format: TLDisplayStrings.DELETE_X_STRING(), accountObject.getAccountName()),\n            message: TLDisplayStrings.ARE_YOU_SURE_YOU_WANT_TO_DELETE_THIS_ACCOUNT_STRING(),\n            cancelButtonTitle: TLDisplayStrings.NO_STRING(),\n            destructiveButtonTitle: nil,\n            otherButtonTitles: [TLDisplayStrings.YES_STRING()],\n            tap: {(alertView, action, buttonIndex) in\n                if (buttonIndex == alertView!.firstOtherButtonIndex) {\n                    AppDelegate.instance().importedAccounts!.deleteAccount((indexPath as NSIndexPath).row)\n                    \n                    self.accountsTableView!.beginUpdates()\n                    let index = NSIndexPath(indexes: [self.archivedImportedAccountSection, (indexPath as NSIndexPath).row], length:2) as IndexPath\n                    let deleteIndexPaths = [index]\n                    self.accountsTableView!.deleteRows(at: deleteIndexPaths, with: .fade)\n                    self.accountsTableView!.endUpdates()\n                    self._accountsTableViewReloadDataWrapper()\n                } else if (buttonIndex == alertView!.cancelButtonIndex) {\n                    self.accountsTableView!.isEditing = false\n                }\n            }\n        )\n    }\n\n    fileprivate func promptToDeleteImportedWatchAccount(_ indexPath: IndexPath) -> () {\n        let accountObject = AppDelegate.instance().importedWatchAccounts!.getArchivedAccountObjectForIdx((indexPath as NSIndexPath).row)\n        \n        UIAlertController.showAlert(in: self,\n            withTitle: String(format: TLDisplayStrings.DELETE_X_STRING(), accountObject.getAccountName()),\n            message: TLDisplayStrings.ARE_YOU_SURE_YOU_WANT_TO_DELETE_THIS_ACCOUNT_STRING(),\n            cancelButtonTitle: TLDisplayStrings.NO_STRING(),\n            destructiveButtonTitle: nil,\n            otherButtonTitles: [TLDisplayStrings.YES_STRING()],\n            tap: {(alertView, action, buttonIndex) in\n                \n                if (buttonIndex == alertView!.firstOtherButtonIndex) {\n                    AppDelegate.instance().importedWatchAccounts!.deleteAccount((indexPath as NSIndexPath).row)\n                    //*\n                    self.accountsTableView!.beginUpdates()\n                    let index = NSIndexPath(indexes:[self.archivedImportedWatchAccountSection, (indexPath as NSIndexPath).row], length:2) as IndexPath\n                    let deleteIndexPaths = [index]\n                    self.accountsTableView!.deleteRows(at: deleteIndexPaths, with: .fade)\n                    self.accountsTableView!.endUpdates()\n                    //*/\n                    self._accountsTableViewReloadDataWrapper()\n                } else if (buttonIndex == alertView!.cancelButtonIndex) {\n                    self.accountsTableView!.isEditing = false\n                }\n        })\n    }\n\n    fileprivate func promptToDeleteImportedAddress(_ importedAddressIdx: Int) -> () {\n        let importedAddressObject = AppDelegate.instance().importedAddresses!.getArchivedAddressObjectAtIdx(importedAddressIdx)\n\n        UIAlertController.showAlert(in: self,\n            withTitle: String(format: TLDisplayStrings.DELETE_X_STRING(), importedAddressObject.getLabel()),\n            message: TLDisplayStrings.ARE_YOU_SURE_YOU_WANT_TO_DELETE_THIS_ACCOUNT_STRING(),\n            cancelButtonTitle: TLDisplayStrings.NO_STRING(),\n            destructiveButtonTitle: nil,\n            otherButtonTitles: [TLDisplayStrings.YES_STRING()],\n            tap: {(alertView, action, buttonIndex) in\n        \n            if (buttonIndex == alertView!.firstOtherButtonIndex) {\n                self.accountsTableView!.setEditing(true, animated: true)\n                AppDelegate.instance().importedAddresses!.deleteAddress(importedAddressIdx)\n                self._accountsTableViewReloadDataWrapper()\n                self.accountsTableView!.setEditing(false, animated: true)\n            } else if (buttonIndex == alertView!.cancelButtonIndex) {\n                self.accountsTableView!.isEditing = false\n            }\n        })\n    }\n\n    fileprivate func promptToDeleteImportedWatchAddress(_ importedAddressIdx: Int) -> () {\n        let importedAddressObject = AppDelegate.instance().importedWatchAddresses!.getArchivedAddressObjectAtIdx(importedAddressIdx)\n\n        UIAlertController.showAlert(in: self,\n            withTitle:  String(format: TLDisplayStrings.DELETE_X_STRING(), importedAddressObject.getLabel()),\n            message: TLDisplayStrings.ARE_YOU_SURE_YOU_WANT_TO_DELETE_THIS_ACCOUNT_STRING(),\n            cancelButtonTitle: TLDisplayStrings.NO_STRING(),\n            destructiveButtonTitle: nil,\n            otherButtonTitles: [TLDisplayStrings.YES_STRING()],\n\n            tap: {(alertView, action, buttonIndex) in\n\n            if (buttonIndex == alertView!.firstOtherButtonIndex) {\n                self.accountsTableView!.setEditing(true, animated: true)\n                AppDelegate.instance().importedWatchAddresses!.deleteAddress(importedAddressIdx)\n                self._accountsTableViewReloadDataWrapper()\n                self.accountsTableView!.setEditing(false, animated: true)\n            } else if (buttonIndex == alertView!.cancelButtonIndex) {\n                self.accountsTableView!.isEditing = false\n            }\n        })\n    }\n\n    fileprivate func setEditingAndRefreshAccounts() -> () {\n        self.accountsTableView!.setEditing(true, animated: true)\n        self.refreshWalletAccounts(false)\n        self._accountsTableViewReloadDataWrapper()\n        self.accountsTableView!.setEditing(false, animated: true)\n    }\n    \n    fileprivate func importColdWalletAccount(_ extendedPublicKey: String) -> (Bool) {\n        if (TLHDWalletWrapper.isValidExtendedPublicKey(extendedPublicKey)) {\n            AppDelegate.instance().saveWalletJsonCloudBackground()\n            AppDelegate.instance().saveWalletJSONEnabled = false\n            let defaultAccountName = String(format: TLDisplayStrings.IMPORTED_COLD_WALLET_ACCOUNT_STRING(), String(AppDelegate.instance().coldWalletAccounts!.getNumberOfAccounts() + AppDelegate.instance().coldWalletAccounts!.getNumberOfArchivedAccounts() + 1))\n            let accountObject = AppDelegate.instance().coldWalletAccounts!.addAccountWithExtendedKey(extendedPublicKey, accountName: defaultAccountName)\n            \n            TLHUDWrapper.showHUDAddedTo(self.slidingViewController().topViewController.view, labelText: TLDisplayStrings.IMPORTING_COLD_WALLET_ACCOUNT_STRING(), animated: true)\n            DispatchQueue.global(priority: DispatchQueue.GlobalQueuePriority.high).async {\n                SwiftTryCatch.`try`({\n                    () -> () in\n                    accountObject.recoverAccount(false, recoverStealthPayments: true)\n                    AppDelegate.instance().saveWalletJSONEnabled = true\n                    AppDelegate.instance().saveWalletJsonCloudBackground()\n                    \n                    NotificationCenter.default.post(name: Notification.Name(rawValue: TLNotificationEvents.EVENT_IMPORT_COLD_WALLET_ACCOUNT()),\n                        object: nil)\n                    // don't need to call do accountObject.getAccountData like in importAccount() cause watch account does not see stealth payments. yet\n                    DispatchQueue.main.async {\n                        TLHUDWrapper.hideHUDForView(self.view, animated: true)\n                        self.promtForNameAccount({\n                            (_accountName: String?) in\n                            var accountName = _accountName\n                            if (accountName == nil || accountName == \"\") {\n                                accountName = defaultAccountName\n                            }\n                            AppDelegate.instance().coldWalletAccounts!.renameAccount(accountObject.getAccountIdxNumber(), accountName: accountName!)\n                            \n                            let titleStr = String(format: TLDisplayStrings.ACCOUNT_X_IMPORTED_STRING(), accountName!)\n                            let av = UIAlertView(title: titleStr,\n                                message: \"\",\n                                delegate: nil,\n                                cancelButtonTitle: TLDisplayStrings.OK_STRING())\n                            \n                            av.show()\n                            self.setEditingAndRefreshAccounts()\n                            }, failure: {\n                                (isCanceled: Bool) in\n                                \n                                self.setEditingAndRefreshAccounts()\n                        })\n                    }\n                    }, catch: {\n                        (exception) -> Void in\n                        DispatchQueue.main.async {\n                            AppDelegate.instance().coldWalletAccounts!.deleteAccount(AppDelegate.instance().coldWalletAccounts!.getNumberOfAccounts() - 1)\n                            TLHUDWrapper.hideHUDForView(self.view, animated: true)\n                            TLPrompts.promptErrorMessage(TLDisplayStrings.ERROR_IMPORTING_ACCOUNT_STRING(), message: TLDisplayStrings.TRY_AGAIN_STRING())\n                            self.setEditingAndRefreshAccounts()\n                        }\n                    }, finally: { () in })\n            }\n            \n            return true\n        } else {\n            let av = UIAlertView(title: TLDisplayStrings.INVALID_ACCOUNT_PUBLIC_KEY_STRING(),\n                                 message: \"\",\n                                 delegate: nil,\n                                 cancelButtonTitle: TLDisplayStrings.CANCEL_STRING(),\n                                 otherButtonTitles: TLDisplayStrings.OK_STRING())\n            \n            av.show()\n            return false\n        }\n    }\n    \n    fileprivate func importAccount(_ extendedPrivateKey: String) -> (Bool) {\n        let handleImportAccountFail = {\n            DispatchQueue.main.async {\n                AppDelegate.instance().importedAccounts!.deleteAccount(AppDelegate.instance().importedAccounts!.getNumberOfAccounts() - 1)\n                TLHUDWrapper.hideHUDForView(self.view, animated: true)\n                TLPrompts.promptErrorMessage(TLDisplayStrings.ERROR_IMPORTING_ACCOUNT_STRING(), message: TLDisplayStrings.TRY_AGAIN_STRING())\n                self.setEditingAndRefreshAccounts()\n            }\n        }\n        \n        if (TLHDWalletWrapper.isValidExtendedPrivateKey(extendedPrivateKey)) {\n            AppDelegate.instance().saveWalletJsonCloudBackground()\n            AppDelegate.instance().saveWalletJSONEnabled = false\n            \n            let defaultAccountName = String(format: TLDisplayStrings.IMPORTED_ACCOUNT_STRING(), String(AppDelegate.instance().importedAccounts!.getNumberOfAccounts() + AppDelegate.instance().importedAccounts!.getNumberOfArchivedAccounts() + 1))\n            let accountObject = AppDelegate.instance().importedAccounts!.addAccountWithExtendedKey(extendedPrivateKey, accountName: defaultAccountName)\n            TLHUDWrapper.showHUDAddedTo(self.slidingViewController().topViewController.view, labelText: TLDisplayStrings.IMPORTING_ACCOUNT_STRING(), animated: true)\n            DispatchQueue.global(priority: DispatchQueue.GlobalQueuePriority.high).async {\n                SwiftTryCatch.`try`({\n                    () -> () in\n                    accountObject.recoverAccount(false, recoverStealthPayments: true)\n                    AppDelegate.instance().saveWalletJSONEnabled = true\n                    AppDelegate.instance().saveWalletJsonCloudBackground()\n                    \n                    let handleImportAccountSuccess = {\n                        DispatchQueue.main.async {\n                            TLHUDWrapper.hideHUDForView(self.view, animated: true)\n                            self.promtForNameAccount({\n                                (_accountName: String?) in\n                                var accountName = _accountName\n                                if (accountName == nil || accountName == \"\") {\n                                    accountName = defaultAccountName\n                                }\n                                AppDelegate.instance().importedAccounts!.renameAccount(accountObject.getAccountIdxNumber(), accountName: accountName!)\n                                let av = UIAlertView(title: String(format: TLDisplayStrings.ACCOUNT_X_IMPORTED_STRING(), accountName!),\n                                    message: nil,\n                                    delegate: nil,\n                                    cancelButtonTitle: TLDisplayStrings.OK_STRING())\n                                \n                                av.show()\n                                self.setEditingAndRefreshAccounts()\n                                }, failure: ({\n                                    (isCanceled: Bool) in\n                                    self.setEditingAndRefreshAccounts()\n                                }))\n                        }\n                    }\n                    \n                    NotificationCenter.default.post(name: Notification.Name(rawValue: TLNotificationEvents.EVENT_IMPORT_ACCOUNT()),\n                        object: nil, userInfo: nil)\n                    TLStealthWebSocket.instance().sendMessageGetChallenge()\n                    AppDelegate.instance().pendingOperations.addSetUpAccountOperation(accountObject, fetchDataAgain: true, success: {\n                        self.refreshWalletAccounts(false)\n                        handleImportAccountSuccess()\n                    })\n                }, catch: {\n                        (e) -> Void in\n                    handleImportAccountFail()\n                    \n                }, finally: { () in })\n            }\n            return true\n\n        } else {\n            let av = UIAlertView(title: TLDisplayStrings.INVALID_ACCOUNT_PRIVATE_KEY_STRING(),\n                message: \"\",\n                delegate: nil,\n                cancelButtonTitle: TLDisplayStrings.CANCEL_STRING(),\n                otherButtonTitles: TLDisplayStrings.OK_STRING())\n            \n            av.show()\n            return false\n        }\n    }\n\n    fileprivate func importWatchOnlyAccount(_ extendedPublicKey: String) -> (Bool) {\n        if (TLHDWalletWrapper.isValidExtendedPublicKey(extendedPublicKey)) {\n            AppDelegate.instance().saveWalletJsonCloudBackground()\n            AppDelegate.instance().saveWalletJSONEnabled = false\n            let defaultAccountName = String(format: TLDisplayStrings.IMPORTED_WATCH_ACCOUNT_STRING(), String(AppDelegate.instance().importedWatchAccounts!.getNumberOfAccounts() + AppDelegate.instance().importedWatchAccounts!.getNumberOfArchivedAccounts() + 1))\n            let accountObject = AppDelegate.instance().importedWatchAccounts!.addAccountWithExtendedKey(extendedPublicKey, accountName: defaultAccountName)\n            \n            TLHUDWrapper.showHUDAddedTo(self.slidingViewController().topViewController.view, labelText: TLDisplayStrings.IMPORTING_ACCOUNT_STRING(), animated: true)\n            DispatchQueue.global(priority: DispatchQueue.GlobalQueuePriority.high).async {\n                SwiftTryCatch.`try`({\n                    () -> () in\n                    accountObject.recoverAccount(false, recoverStealthPayments: true)\n                    AppDelegate.instance().saveWalletJSONEnabled = true\n                    AppDelegate.instance().saveWalletJsonCloudBackground()\n\n                    NotificationCenter.default.post(name: Notification.Name(rawValue: TLNotificationEvents.EVENT_IMPORT_WATCH_ONLY_ACCOUNT()),\n                        object: nil)\n                    // don't need to call do accountObject.getAccountData like in importAccount() cause watch account does not see stealth payments. yet\n                    DispatchQueue.main.async {\n                        TLHUDWrapper.hideHUDForView(self.view, animated: true)\n                        self.promtForNameAccount({\n                            (_accountName: String?) in\n                                var accountName = _accountName\n                                if (accountName == nil || accountName == \"\") {\n                                    accountName = defaultAccountName\n                                }\n                                AppDelegate.instance().importedWatchAccounts!.renameAccount(accountObject.getAccountIdxNumber(), accountName: accountName!)\n                            \n                                let titleStr = String(format: TLDisplayStrings.ACCOUNT_X_IMPORTED_STRING(), accountName!)\n                                let av = UIAlertView(title: titleStr,\n                                    message: \"\",\n                                    delegate: nil,\n                                    cancelButtonTitle: TLDisplayStrings.OK_STRING())\n                            \n                                av.show()\n                                self.setEditingAndRefreshAccounts()\n                            }, failure: {\n                                (isCanceled: Bool) in\n                                \n                                self.setEditingAndRefreshAccounts()\n                        })\n                    }\n                }, catch: {\n                    (exception) -> Void in\n                    DispatchQueue.main.async {\n                        AppDelegate.instance().importedWatchAccounts!.deleteAccount(AppDelegate.instance().importedWatchAccounts!.getNumberOfAccounts() - 1)\n                        TLHUDWrapper.hideHUDForView(self.view, animated: true)\n                        TLPrompts.promptErrorMessage(TLDisplayStrings.ERROR_IMPORTING_ACCOUNT_STRING(), message: TLDisplayStrings.TRY_AGAIN_STRING())\n                        self.setEditingAndRefreshAccounts()\n                    }\n                }, finally: { () in })\n            }\n            \n            return true\n        } else {\n            let av = UIAlertView(title: TLDisplayStrings.INVALID_ACCOUNT_PUBLIC_KEY_STRING(),\n                message: \"\",\n                delegate: nil,\n                cancelButtonTitle: TLDisplayStrings.CANCEL_STRING(),\n                otherButtonTitles: TLDisplayStrings.OK_STRING())\n            \n            av.show()\n            return false\n        }\n    }\n\n    fileprivate func checkAndImportAddress(_ privateKey: String, encryptedPrivateKey: String?) -> (Bool) {        \n        if (TLCoreBitcoinWrapper.isValidPrivateKey(privateKey, isTestnet: AppDelegate.instance().appWallet.walletConfig.isTestnet)) {\n            if (encryptedPrivateKey != nil) {\n                UIAlertController.showAlert(in: self,\n                    withTitle: TLDisplayStrings.IMPORT_PRIVATE_KEY_ENCRYPTED_OR_UNENCRYPTED_STRING(),\n                    message: TLDisplayStrings.IMPORT_PRIVATE_KEY_ENCRYPTED_OR_UNENCRYPTED_DESC_STRING(),\n                    cancelButtonTitle: TLDisplayStrings.ENCRYPTED_STRING(),\n                    destructiveButtonTitle: nil,\n                    otherButtonTitles: [TLDisplayStrings.UNENCRYPTED_STRING()],\n\n                    tap: {(alertView, action, buttonIndex) in\n                    if (buttonIndex == alertView?.firstOtherButtonIndex) {\n                        let importedAddressObject = AppDelegate.instance().importedAddresses!.addImportedPrivateKey(privateKey,\n                                encryptedPrivateKey: nil)\n                        self.refreshAfterImportAddress(importedAddressObject)\n                    } else if (buttonIndex == alertView?.cancelButtonIndex) {\n                        let importedAddressObject = AppDelegate.instance().importedAddresses!.addImportedPrivateKey(privateKey,\n                                encryptedPrivateKey: encryptedPrivateKey)\n                        self.refreshAfterImportAddress(importedAddressObject)\n                    }\n                })\n            } else {\n                let importedAddressObject = AppDelegate.instance().importedAddresses!.addImportedPrivateKey(privateKey,\n                    encryptedPrivateKey: nil)\n                self.refreshAfterImportAddress(importedAddressObject)\n            }\n\n            return true\n        } else {\n            let av = UIAlertView(title: TLDisplayStrings.INVALID_PRIVATE_KEY_STRING(),\n                    message: \"\",\n                    delegate: nil,\n                    cancelButtonTitle: TLDisplayStrings.OK_STRING())\n\n            av.show()\n            return false\n        }\n    }\n\n    fileprivate func refreshAfterImportAddress(_ importedAddressObject: TLImportedAddress) -> () {\n        let lastIdx = AppDelegate.instance().importedAddresses!.getCount()\n        let indexPath = IndexPath(row: lastIdx, section: importedAddressSection)\n        let cell = self.accountsTableView!.cellForRow(at: indexPath) as? TLAccountTableViewCell\n        if cell != nil {\n            (cell!.accessoryView! as! UIActivityIndicatorView).isHidden = false\n            (cell!.accessoryView! as! UIActivityIndicatorView).startAnimating()\n        }\n\n        importedAddressObject.getSingleAddressData({\n            () in\n            if cell != nil {\n                (cell!.accessoryView! as! UIActivityIndicatorView).stopAnimating()\n                (cell!.accessoryView! as! UIActivityIndicatorView).isHidden = true\n                \n                let balance = TLCurrencyFormat.getProperAmount(importedAddressObject.getBalance()!)\n                cell!.accountBalanceButton!.setTitle(balance as String, for: UIControlState())\n                self.setEditingAndRefreshAccounts()\n            }\n        }, failure: {\n            () in\n            if cell != nil {\n                (cell!.accessoryView! as! UIActivityIndicatorView).stopAnimating()\n                (cell!.accessoryView! as! UIActivityIndicatorView).isHidden = true\n            }\n        })\n\n        let address = importedAddressObject.getAddress()\n        let msg = String(format: TLDisplayStrings.IMPORTED_ADDRESS_STRING())\n        let av = UIAlertView(title: msg,\n                message: \"\",\n                delegate: nil,\n                cancelButtonTitle: TLDisplayStrings.OK_STRING())\n\n        av.show()\n\n        NotificationCenter.default.post(name: Notification.Name(rawValue: TLNotificationEvents.EVENT_IMPORT_PRIVATE_KEY()), object: nil, userInfo: nil)\n    }\n\n    fileprivate func checkAndImportWatchAddress(_ address: String) -> (Bool) {\n        if (TLCoreBitcoinWrapper.isValidAddress(address, isTestnet: AppDelegate.instance().appWallet.walletConfig.isTestnet)) {\n            if (TLStealthAddress.isStealthAddress(address, isTestnet: AppDelegate.instance().appWallet.walletConfig.isTestnet)) {\n                TLPrompts.promptErrorMessage(TLDisplayStrings.ERROR_STRING(), message: TLDisplayStrings.CANNOT_IMPORT_REUSABLE_ADDRESS_STRING())\n                return false\n            }\n            \n            let importedAddressObject = AppDelegate.instance().importedWatchAddresses!.addImportedWatchAddress(address)\n            let lastIdx = AppDelegate.instance().importedWatchAddresses!.getCount()\n            let indexPath = IndexPath(row: lastIdx, section: importedWatchAddressSection)\n            let cell = self.accountsTableView!.cellForRow(at: indexPath) as? TLAccountTableViewCell\n            if cell != nil {\n                (cell!.accessoryView! as! UIActivityIndicatorView).isHidden = false\n                (cell!.accessoryView! as! UIActivityIndicatorView).startAnimating()\n            }\n            importedAddressObject.getSingleAddressData(\n                {\n                    () in\n                    if cell != nil {\n                        (cell!.accessoryView! as! UIActivityIndicatorView).stopAnimating()\n                        (cell!.accessoryView! as! UIActivityIndicatorView).isHidden = true\n                        \n                        let balance = TLCurrencyFormat.getProperAmount(importedAddressObject.getBalance()!)\n                        cell!.accountBalanceButton!.setTitle(balance as String, for: UIControlState())\n                        self.setEditingAndRefreshAccounts()\n                    }\n                }, failure: {\n                    () in\n                    if cell != nil {\n                        (cell!.accessoryView! as! UIActivityIndicatorView).stopAnimating()\n                        (cell!.accessoryView! as! UIActivityIndicatorView).isHidden = true\n                    }\n            })\n            \n            let av = UIAlertView(title: String(format: TLDisplayStrings.ACCOUNT_X_IMPORTED_STRING()),\n                message: \"\",\n                delegate: nil,\n                cancelButtonTitle: TLDisplayStrings.OK_STRING())\n            \n            av.show()\n            NotificationCenter.default.post(name: Notification.Name(rawValue: TLNotificationEvents.EVENT_IMPORT_WATCH_ONLY_ADDRESS()), object: nil, userInfo: nil)\n            return true\n        } else {\n            TLPrompts.promptErrorMessage(TLDisplayStrings.INVALID_ADDRESS_STRING(), message: \"\")\n            return false\n        }\n    }\n\n    \n    fileprivate func promptColdWalletAccountActionSheet() -> () {\n        UIAlertController.showAlert(in: self,\n                                                    withTitle: TLDisplayStrings.IMPORT_COLD_WALLET_ACCOUNT_STRING(),\n                                                    message:\"\",\n                                                    preferredStyle: .actionSheet,\n                                                    cancelButtonTitle: TLDisplayStrings.CANCEL_STRING(),\n                                                    destructiveButtonTitle: nil,\n                                                    otherButtonTitles: [TLDisplayStrings.IMPORT_WITH_QR_CODE_STRING(), TLDisplayStrings.IMPORT_WITH_TEXT_INPUT_STRING()],\n                                                    tap: {(actionSheet, action, buttonIndex) in\n                                                        if (buttonIndex == (actionSheet?.firstOtherButtonIndex)! + 0) {\n                                                            AppDelegate.instance().showExtendedPublicKeyReaderController(self, success: {\n                                                                (data: String!) in\n                                                                self.importColdWalletAccount(data)\n                                                                }, error: {\n                                                                    (data: String?) in\n                                                            })\n                                                        } else if (buttonIndex == (actionSheet?.firstOtherButtonIndex)! + 1) {\n                                                            TLPrompts.promtForInputText(self, title: TLDisplayStrings.IMPORT_COLD_WALLET_ACCOUNT_STRING(), message: TLDisplayStrings.INPUT_ACCOUNT_PUBLIC_KEY_STRING(), textFieldPlaceholder: nil, success: {\n                                                                (inputText: String!) in\n                                                                self.importColdWalletAccount(inputText)\n                                                                }, failure: {\n                                                                    (isCanceled: Bool) in\n                                                            })\n                                                        } else if (buttonIndex == actionSheet?.cancelButtonIndex) {\n                                                        }\n        })\n    }\n    \n    fileprivate func promptImportAccountActionSheet() -> () {\n        UIAlertController.showAlert(in: self,\n            withTitle: TLDisplayStrings.IMPORT_ACCOUNT_STRING(),\n            message:\"\",\n            preferredStyle: .actionSheet,\n            cancelButtonTitle: TLDisplayStrings.CANCEL_STRING(),\n            destructiveButtonTitle: nil,\n            otherButtonTitles: [TLDisplayStrings.IMPORT_WITH_QR_CODE_STRING(), TLDisplayStrings.IMPORT_WITH_TEXT_INPUT_STRING()],\n            tap: {(actionSheet, action, buttonIndex) in\n            if (buttonIndex == (actionSheet?.firstOtherButtonIndex)! + 0) {\n                AppDelegate.instance().showExtendedPrivateKeyReaderController(self, success: {\n                    (data: String!) in\n                    self.importAccount(data)\n                }, error: {\n                    (data: String?) in\n                })\n\n            } else if (buttonIndex == (actionSheet?.firstOtherButtonIndex)! + 1) {\n                TLPrompts.promtForInputText(self, title: TLDisplayStrings.IMPORT_ACCOUNT_STRING(), message: TLDisplayStrings.INPUT_ACCOUNT_PRIVATE_KEY_STRING(), textFieldPlaceholder: nil, success: {\n                    (inputText: String!) in\n                    self.importAccount(inputText)\n                }, failure: {\n                    (isCanceled: Bool) in\n                })\n            } else if (buttonIndex == actionSheet?.cancelButtonIndex) {\n            }\n        })\n    }\n\n    fileprivate func promptImportWatchAccountActionSheet() -> () {\n        UIAlertController.showAlert(in: self,\n            withTitle: TLDisplayStrings.IMPORT_WATCH_ACCOUNT_STRING(),\n            message:\"\",\n            preferredStyle: .actionSheet,\n            cancelButtonTitle: TLDisplayStrings.CANCEL_STRING(),\n            destructiveButtonTitle: nil,\n            otherButtonTitles: [TLDisplayStrings.IMPORT_WITH_QR_CODE_STRING(), TLDisplayStrings.IMPORT_WITH_TEXT_INPUT_STRING()],\n            tap: {(actionSheet, action, buttonIndex) in\n                if (buttonIndex == (actionSheet?.firstOtherButtonIndex)! + 0) {\n                    AppDelegate.instance().showExtendedPublicKeyReaderController(self, success: {\n                        (data: String!) in\n                        self.importWatchOnlyAccount(data)\n                        }, error: {\n                            (data: String?) in\n                    })\n                } else if (buttonIndex == (actionSheet?.firstOtherButtonIndex)! + 1) {\n                    TLPrompts.promtForInputText(self, title: TLDisplayStrings.IMPORT_WATCH_ACCOUNT_STRING(), message: TLDisplayStrings.INPUT_ACCOUNT_PUBLIC_KEY_STRING(), textFieldPlaceholder: nil, success: {\n                        (inputText: String!) in\n                        self.importWatchOnlyAccount(inputText)\n                        }, failure: {\n                            (isCanceled: Bool) in\n                    })\n                } else if (buttonIndex == actionSheet?.cancelButtonIndex) {\n                }\n        })\n    }\n\n    fileprivate func promptImportPrivateKeyActionSheet() -> () {\n        UIAlertController.showAlert(in: self,\n            withTitle: TLDisplayStrings.IMPORT_PRIVATE_KEY_STRING(),\n            message:\"\",\n            preferredStyle: .actionSheet,\n            cancelButtonTitle: TLDisplayStrings.CANCEL_STRING(),\n            destructiveButtonTitle: nil,\n            otherButtonTitles: [TLDisplayStrings.IMPORT_WITH_QR_CODE_STRING(), TLDisplayStrings.IMPORT_WITH_TEXT_INPUT_STRING()],\n            tap: {(actionSheet, action, buttonIndex) in\n                if (buttonIndex == (actionSheet?.firstOtherButtonIndex)! + 0) {\n                    AppDelegate.instance().showPrivateKeyReaderController(self, success: {\n                        (data: NSDictionary) in\n                        let privateKey = data.object(forKey: \"privateKey\") as? String\n                        let encryptedPrivateKey = data.object(forKey: \"encryptedPrivateKey\") as? String\n                        if encryptedPrivateKey == nil {\n                            self.checkAndImportAddress(privateKey!, encryptedPrivateKey: encryptedPrivateKey)\n                        }\n                        }, error: {\n                            (data: String?) in\n                    })\n                } else if (buttonIndex == (actionSheet?.firstOtherButtonIndex)! + 1) {\n                    TLPrompts.promtForInputText(self, title: TLDisplayStrings.IMPORT_PRIVATE_KEY_STRING(), message: \"\", textFieldPlaceholder: nil, success: {\n                        (inputText: String!) in\n                        if (TLCoreBitcoinWrapper.isBIP38EncryptedKey(inputText, isTestnet: AppDelegate.instance().appWallet.walletConfig.isTestnet)) {\n                            TLPrompts.promptForEncryptedPrivKeyPassword(self, view:self.slidingViewController().topViewController.view, encryptedPrivKey: inputText, success: {\n                                (privKey: String!) in\n                                self.checkAndImportAddress(privKey, encryptedPrivateKey: inputText)\n                                }, failure: {\n                                    (isCanceled: Bool) in\n                            })\n                        } else {\n                            self.checkAndImportAddress(inputText, encryptedPrivateKey: nil)\n                        }\n                        }, failure: {\n                            (isCanceled: Bool) in\n                    })\n                } else if (buttonIndex == actionSheet?.cancelButtonIndex) {\n                }\n        })\n    }\n\n    fileprivate func promptImportWatchAddressActionSheet() -> () {\n        UIAlertController.showAlert(in: self,\n            withTitle: TLDisplayStrings.IMPORT_WATCH_ADDRESS_STRING(),\n            message:\"\",\n            preferredStyle: .actionSheet,\n            cancelButtonTitle: TLDisplayStrings.CANCEL_STRING(),\n            destructiveButtonTitle: nil,\n            otherButtonTitles: [TLDisplayStrings.IMPORT_WITH_QR_CODE_STRING(), TLDisplayStrings.IMPORT_WITH_TEXT_INPUT_STRING()],\n            tap: {(actionSheet, action, buttonIndex) in\n                if (buttonIndex == (actionSheet?.firstOtherButtonIndex)! + 0) {\n                    AppDelegate.instance().showAddressReaderControllerFromViewController(self, success: {\n                        (data: String!) in\n                        self.checkAndImportWatchAddress(data)\n                        }, error: {\n                            (data: String?) in\n                    })\n                } else if (buttonIndex == (actionSheet?.firstOtherButtonIndex)! + 1) {\n                    TLPrompts.promtForInputText(self, title: TLDisplayStrings.IMPORT_WATCH_ADDRESS_STRING(), message: \"\", textFieldPlaceholder: nil, success: {\n                        (inputText: String!) in\n                        self.checkAndImportWatchAddress(inputText)\n                        }, failure: {\n                            (isCanceled: Bool) in\n                    })\n                } else if (buttonIndex == actionSheet?.cancelButtonIndex) {\n                }\n        })\n    }\n\n    fileprivate func doAccountAction(_ accountSelectIdx: Int) -> () {\n        var count = 0\n        let CREATE_NEW_ACCOUNT_BUTTON_IDX = count\n        count +=  1\n        var IMPORT_COLD_WALLET_ACCOUNT_BUTTON_IDX = -1\n        if TLPreferences.enabledColdWallet() {\n            IMPORT_COLD_WALLET_ACCOUNT_BUTTON_IDX = count\n            count +=  1\n        }\n        let IMPORT_ACCOUNT_BUTTON_IDX = count\n        count +=  1\n        let IMPORT_WATCH_ACCOUNT_BUTTON_IDX = count\n        count +=  1\n        let IMPORT_PRIVATE_KEY_BUTTON_IDX = count\n        count +=  1\n        let IMPORT_WATCH_ADDRESS_BUTTON_IDX = count\n        \n        if (accountSelectIdx == CREATE_NEW_ACCOUNT_BUTTON_IDX) {\n            self.promtForNameAccount({\n                (accountName: String!) in\n                AppDelegate.instance().accounts!.createNewAccount(accountName, accountType: .normal)\n\n                NotificationCenter.default.post(name: Notification.Name(rawValue: TLNotificationEvents.EVENT_CREATE_NEW_ACCOUNT()), object: nil, userInfo: nil)\n\n                self.refreshWalletAccounts(false)\n                TLStealthWebSocket.instance().sendMessageGetChallenge()\n            }, failure: {\n                (isCanceled: Bool) in\n            })\n        } else if (accountSelectIdx == IMPORT_COLD_WALLET_ACCOUNT_BUTTON_IDX) {\n            self.promptColdWalletAccountActionSheet()\n        } else if (accountSelectIdx == IMPORT_ACCOUNT_BUTTON_IDX) {\n            self.promptImportAccountActionSheet()\n        } else if (accountSelectIdx == IMPORT_WATCH_ACCOUNT_BUTTON_IDX) {\n            self.promptImportWatchAccountActionSheet()\n        } else if (accountSelectIdx == IMPORT_PRIVATE_KEY_BUTTON_IDX) {\n            self.promptImportPrivateKeyActionSheet()\n        } else if (accountSelectIdx == IMPORT_WATCH_ADDRESS_BUTTON_IDX) {\n            self.promptImportWatchAddressActionSheet()\n        }\n    }\n\n    @IBAction fileprivate func menuButtonClicked(_ sender: UIButton) {\n        self.slidingViewController().anchorTopViewToRight(animated: true)\n    }\n\n    func tableView(_ tableView: UITableView, heightForRowAt heightForRowAtIndexPath: IndexPath) -> CGFloat {\n        // hard code height here to prevent cell auto-resizing\n        return 74\n    }\n\n    func numberOfSections(in tableView: UITableView) -> Int {\n        return numberOfSections\n    }\n\n    func tableView(_ tableView: UITableView, titleForHeaderInSection section: Int) -> String? {\n        if (TLPreferences.enabledAdvancedMode()) {\n            if (section == accountListSection) {\n                return TLDisplayStrings.ACCOUNTS_STRING()\n            } else if (section == coldWalletAccountSection) {\n                return TLDisplayStrings.COLD_WALLET_ACCOUNTS_STRING()\n            } else if (section == importedAccountSection) {\n                return TLDisplayStrings.IMPORTED_ACCOUNTS_STRING()\n            } else if (section == importedWatchAccountSection) {\n                return TLDisplayStrings.IMPORTED_WATCH_ACCOUNTS_STRING()\n            } else if (section == importedAddressSection) {\n                return TLDisplayStrings.IMPORTED_ADDRESSES_STRING()\n            } else if (section == importedWatchAddressSection) {\n                return TLDisplayStrings.IMPORTED_WATCH_ADDRESSES_STRING()\n            } else if (section == archivedAccountSection) {\n                return TLDisplayStrings.ARCHIVED_ACCOUNTS_STRING()\n            } else if (section == archivedColdWalletAccountSection) {\n                return TLDisplayStrings.ARCHIVED_COLD_WALLET_ACCOUNTS_STRING()\n            } else if (section == archivedImportedAccountSection) {\n                return TLDisplayStrings.ARCHIVED_IMPORTED_ACCOUNTS_STRING()\n            } else if (section == archivedImportedWatchAccountSection) {\n                return TLDisplayStrings.ARCHIVED_IMPORTED_WATCH_ACCOUNTS_STRING()\n            } else if (section == archivedImportedAddressSection) {\n                return TLDisplayStrings.ARCHIVED_IMPORTED_ADDRESSES_STRING()\n            } else if (section == archivedImportedWatchAddressSection) {\n                return TLDisplayStrings.ARCHIVED_IMPORTED_WATCH_ADDRESSES_STRING()\n            } else {\n                return TLDisplayStrings.ACCOUNT_ACTIONS_STRING()\n            }\n        } else {\n            if (section == accountListSection) {\n                return TLDisplayStrings.ACCOUNTS_STRING()\n            } else if (section == coldWalletAccountSection) {\n                return TLDisplayStrings.COLD_WALLET_ACCOUNTS_STRING()\n            } else if (section == archivedAccountSection) {\n                return TLDisplayStrings.ARCHIVED_ACCOUNTS_STRING()\n            } else if (section == archivedColdWalletAccountSection) {\n                return TLDisplayStrings.ARCHIVED_COLD_WALLET_ACCOUNTS_STRING()\n            } else {\n                return TLDisplayStrings.ACCOUNT_ACTIONS_STRING()\n            }\n        }\n    }\n\n    func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {\n        if (TLPreferences.enabledAdvancedMode()) {\n            if (section == accountListSection) {\n                return AppDelegate.instance().accounts!.getNumberOfAccounts()\n            } else if (section == coldWalletAccountSection) {\n                return AppDelegate.instance().coldWalletAccounts!.getNumberOfAccounts()\n            } else if (section == importedAccountSection) {\n                return AppDelegate.instance().importedAccounts!.getNumberOfAccounts()\n            } else if (section == importedWatchAccountSection) {\n                return AppDelegate.instance().importedWatchAccounts!.getNumberOfAccounts()\n            } else if (section == importedAddressSection) {\n                return AppDelegate.instance().importedAddresses!.getCount()\n            } else if (section == importedWatchAddressSection) {\n                return AppDelegate.instance().importedWatchAddresses!.getCount()\n            } else if (section == archivedAccountSection) {\n                return AppDelegate.instance().accounts!.getNumberOfArchivedAccounts()\n            } else if (section == archivedColdWalletAccountSection) {\n                return AppDelegate.instance().coldWalletAccounts!.getNumberOfArchivedAccounts()\n            } else if (section == archivedImportedAccountSection) {\n                return AppDelegate.instance().importedAccounts!.getNumberOfArchivedAccounts()\n            } else if (section == archivedImportedWatchAccountSection) {\n                return AppDelegate.instance().importedWatchAccounts!.getNumberOfArchivedAccounts()\n            } else if (section == archivedImportedAddressSection) {\n                return AppDelegate.instance().importedAddresses!.getArchivedCount()\n            } else if (section == archivedImportedWatchAddressSection) {\n                return AppDelegate.instance().importedWatchAddresses!.getArchivedCount()\n            } else {\n                return accountActionsArray!.count\n            }\n        } else if (section == accountListSection) {\n            return AppDelegate.instance().accounts!.getNumberOfAccounts()\n        } else if (section == coldWalletAccountSection) {\n            return AppDelegate.instance().coldWalletAccounts!.getNumberOfAccounts()\n        } else if (section == archivedAccountSection) {\n            return AppDelegate.instance().accounts!.getNumberOfArchivedAccounts()\n        } else if (section == archivedColdWalletAccountSection) {\n            return AppDelegate.instance().coldWalletAccounts!.getNumberOfArchivedAccounts()\n        } else {\n            return accountActionsArray!.count\n        }\n    }\n\n\n    fileprivate func setUpCellAccountActions(_ cell: UITableViewCell, cellForRowAtIndexPath indexPath: IndexPath) -> () {\n        cell.accessoryType = UITableViewCellAccessoryType.none\n        cell.textLabel!.text = accountActionsArray!.object(at: (indexPath as NSIndexPath).row) as? String\n        if(cell.accessoryView != nil) {\n            (cell.accessoryView as! UIActivityIndicatorView).isHidden = true\n        }\n    }\n\n    func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {\n        if ((indexPath as NSIndexPath).section == accountActionSection) {\n            let MyIdentifier = \"AccountActionCellIdentifier\"\n\n            var cell = tableView.dequeueReusableCell(withIdentifier: MyIdentifier) \n            if (cell == nil) {\n                cell = UITableViewCell(style: UITableViewCellStyle.default,\n                        reuseIdentifier: MyIdentifier)\n            }\n\n            cell!.textLabel!.textAlignment = .center\n            cell!.textLabel!.font = UIFont.boldSystemFont(ofSize: cell!.textLabel!.font.pointSize)\n            self.setUpCellAccountActions(cell!, cellForRowAtIndexPath: indexPath)\n\n            if ((indexPath as NSIndexPath).row % 2 == 0) {\n                cell!.backgroundColor = TLColors.evenTableViewCellColor()\n            } else {\n                cell!.backgroundColor = TLColors.oddTableViewCellColor()\n            }\n\n            return cell!\n        } else {\n            let MyIdentifier = \"AccountCellIdentifier\"\n\n            var cell = tableView.dequeueReusableCell(withIdentifier: MyIdentifier) as? TLAccountTableViewCell\n            if (cell == nil) {\n                cell = UITableViewCell(style: UITableViewCellStyle.default,\n                        reuseIdentifier: MyIdentifier) as? TLAccountTableViewCell\n            }\n\n            cell!.accountNameLabel!.textAlignment = .natural\n            let activityView = UIActivityIndicatorView(activityIndicatorStyle: .gray)\n            cell!.accessoryView = activityView\n\n            if (TLPreferences.enabledAdvancedMode()) {\n                if ((indexPath as NSIndexPath).section == accountListSection) {\n                    let accountObject = AppDelegate.instance().accounts!.getAccountObjectForIdx((indexPath as NSIndexPath).row)\n                    self.setUpCellAccounts(accountObject, cell: cell!, cellForRowAtIndexPath: indexPath)\n                } else if ((indexPath as NSIndexPath).section == coldWalletAccountSection) {\n                    let accountObject = AppDelegate.instance().coldWalletAccounts!.getAccountObjectForIdx((indexPath as NSIndexPath).row)\n                    self.setUpCellAccounts(accountObject, cell: cell!, cellForRowAtIndexPath: indexPath)\n                } else if ((indexPath as NSIndexPath).section == importedAccountSection) {\n                    let accountObject = AppDelegate.instance().importedAccounts!.getAccountObjectForIdx((indexPath as NSIndexPath).row)\n                    self.setUpCellAccounts(accountObject, cell: cell!, cellForRowAtIndexPath: indexPath)\n                } else if ((indexPath as NSIndexPath).section == importedWatchAccountSection) {\n                    let accountObject = AppDelegate.instance().importedWatchAccounts!.getAccountObjectForIdx((indexPath as NSIndexPath).row)\n                    self.setUpCellAccounts(accountObject, cell: cell!, cellForRowAtIndexPath: indexPath)\n                } else if ((indexPath as NSIndexPath).section == importedAddressSection) {\n                    let importedAddressObject = AppDelegate.instance().importedAddresses!.getAddressObjectAtIdx((indexPath as NSIndexPath).row)\n                    self.setUpCellImportedAddresses(importedAddressObject, cell: cell!, cellForRowAtIndexPath: indexPath)\n                } else if ((indexPath as NSIndexPath).section == importedWatchAddressSection) {\n                    let importedAddressObject = AppDelegate.instance().importedWatchAddresses!.getAddressObjectAtIdx((indexPath as NSIndexPath).row)\n                    self.setUpCellImportedAddresses(importedAddressObject, cell: cell!, cellForRowAtIndexPath: indexPath)\n                } else if ((indexPath as NSIndexPath).section == archivedAccountSection) {\n                    let accountObject = AppDelegate.instance().accounts!.getArchivedAccountObjectForIdx((indexPath as NSIndexPath).row)\n                    self.setUpCellArchivedAccounts(accountObject, cell: cell!, cellForRowAtIndexPath: indexPath)\n                } else if ((indexPath as NSIndexPath).section == archivedColdWalletAccountSection) {\n                    let accountObject = AppDelegate.instance().coldWalletAccounts!.getArchivedAccountObjectForIdx((indexPath as NSIndexPath).row)\n                    self.setUpCellArchivedAccounts(accountObject, cell: cell!, cellForRowAtIndexPath: indexPath)\n                } else if ((indexPath as NSIndexPath).section == archivedImportedAccountSection) {\n                    let accountObject = AppDelegate.instance().importedAccounts!.getArchivedAccountObjectForIdx((indexPath as NSIndexPath).row)\n                    self.setUpCellArchivedAccounts(accountObject, cell: cell!, cellForRowAtIndexPath: indexPath)\n                } else if ((indexPath as NSIndexPath).section == archivedImportedWatchAccountSection) {\n                    let accountObject = AppDelegate.instance().importedWatchAccounts!.getArchivedAccountObjectForIdx((indexPath as NSIndexPath).row)\n                    self.setUpCellArchivedAccounts(accountObject, cell: cell!, cellForRowAtIndexPath: indexPath)\n                } else if ((indexPath as NSIndexPath).section == archivedImportedAddressSection) {\n                    let importedAddressObject = AppDelegate.instance().importedAddresses!.getArchivedAddressObjectAtIdx((indexPath as NSIndexPath).row)\n                    self.setUpCellArchivedImportedAddresses(importedAddressObject, cell: cell!, cellForRowAtIndexPath: indexPath)\n                } else if ((indexPath as NSIndexPath).section == archivedImportedWatchAddressSection) {\n                    let importedAddressObject = AppDelegate.instance().importedWatchAddresses!.getArchivedAddressObjectAtIdx((indexPath as NSIndexPath).row)\n                    self.setUpCellArchivedImportedAddresses(importedAddressObject, cell: cell!, cellForRowAtIndexPath: indexPath)\n                } else {\n                }\n            } else {\n                if ((indexPath as NSIndexPath).section == accountListSection) {\n                    let accountObject = AppDelegate.instance().accounts!.getAccountObjectForIdx((indexPath as NSIndexPath).row)\n                    self.setUpCellAccounts(accountObject, cell: cell!, cellForRowAtIndexPath: indexPath)\n                } else if ((indexPath as NSIndexPath).section == coldWalletAccountSection) {\n                    let accountObject = AppDelegate.instance().coldWalletAccounts!.getAccountObjectForIdx((indexPath as NSIndexPath).row)\n                    self.setUpCellAccounts(accountObject, cell: cell!, cellForRowAtIndexPath: indexPath)\n                } else if ((indexPath as NSIndexPath).section == archivedAccountSection) {\n                    let accountObject = AppDelegate.instance().accounts!.getArchivedAccountObjectForIdx((indexPath as NSIndexPath).row)\n                    self.setUpCellArchivedAccounts(accountObject, cell: cell!, cellForRowAtIndexPath: indexPath)\n                } else if ((indexPath as NSIndexPath).section == archivedColdWalletAccountSection) {\n                    let accountObject = AppDelegate.instance().coldWalletAccounts!.getArchivedAccountObjectForIdx((indexPath as NSIndexPath).row)\n                    self.setUpCellArchivedAccounts(accountObject, cell: cell!, cellForRowAtIndexPath: indexPath)\n                } else {\n                }\n            }\n\n            if ((indexPath as NSIndexPath).row % 2 == 0) {\n                cell!.backgroundColor = TLColors.evenTableViewCellColor()\n            } else {\n                cell!.backgroundColor = TLColors.oddTableViewCellColor()\n            }\n\n            return cell!\n        }\n    }\n\n    func tableView(_ tableView: UITableView, willSelectRowAt indexPath: IndexPath) -> IndexPath? {\n        if (TLPreferences.enabledAdvancedMode()) {\n            if ((indexPath as NSIndexPath).section == accountListSection) {\n                self.promptAccountsActionSheet((indexPath as NSIndexPath).row)\n                return nil\n            } else if ((indexPath as NSIndexPath).section == coldWalletAccountSection) {\n                self.promptColdWalletAccountsActionSheet(indexPath)\n                return nil\n            } else if ((indexPath as NSIndexPath).section == importedAccountSection) {\n                self.promptImportedAccountsActionSheet(indexPath)\n                return nil\n            } else if ((indexPath as NSIndexPath).section == importedWatchAccountSection) {\n                self.promptImportedWatchAccountsActionSheet(indexPath)\n                return nil\n            } else if ((indexPath as NSIndexPath).section == importedAddressSection) {\n                self.promptImportedAddressActionSheet((indexPath as NSIndexPath).row)\n                return nil\n            } else if ((indexPath as NSIndexPath).section == importedWatchAddressSection) {\n                self.promptImportedWatchAddressActionSheet((indexPath as NSIndexPath).row)\n                return nil\n            } else if ((indexPath as NSIndexPath).section == archivedAccountSection) {\n                self.promptArchivedAccountsActionSheet((indexPath as NSIndexPath).row)\n                return nil\n            } else if ((indexPath as NSIndexPath).section == archivedColdWalletAccountSection) {\n                self.promptArchivedImportedAccountsActionSheet(indexPath, accountType: .coldWallet)\n                return nil\n            } else if ((indexPath as NSIndexPath).section == archivedImportedAccountSection) {\n                self.promptArchivedImportedAccountsActionSheet(indexPath, accountType: .imported)\n                return nil\n            } else if ((indexPath as NSIndexPath).section == archivedImportedWatchAccountSection) {\n                self.promptArchivedImportedAccountsActionSheet(indexPath, accountType: .importedWatch)\n                return nil\n            } else if ((indexPath as NSIndexPath).section == archivedImportedAddressSection) {\n                self.promptArchivedImportedAddressActionSheet((indexPath as NSIndexPath).row)\n                return nil\n            } else if ((indexPath as NSIndexPath).section == archivedImportedWatchAddressSection) {\n                self.promptArchivedImportedWatchAddressActionSheet((indexPath as NSIndexPath).row)\n                return nil\n            } else {\n                self.doAccountAction((indexPath as NSIndexPath).row)\n                return nil\n            }\n        } else {\n            if ((indexPath as NSIndexPath).section == accountListSection) {\n                self.promptAccountsActionSheet((indexPath as NSIndexPath).row)\n                return nil\n            } else if ((indexPath as NSIndexPath).section == coldWalletAccountSection) {\n                self.promptColdWalletAccountsActionSheet(indexPath)\n                return nil\n            } else if ((indexPath as NSIndexPath).section == archivedAccountSection) {\n                self.promptArchivedAccountsActionSheet((indexPath as NSIndexPath).row)\n                return nil\n            } else if ((indexPath as NSIndexPath).section == archivedColdWalletAccountSection) {\n                self.promptArchivedImportedAccountsActionSheet(indexPath, accountType: .coldWallet)\n                return nil\n            } else {\n                self.doAccountAction((indexPath as NSIndexPath).row)\n                return nil\n            }\n        }\n    }\n\n    func customIOS7dialogButtonTouchUp(inside alertView: CustomIOS7AlertView, clickedButtonAt buttonIndex: Int) -> () {\n        if (buttonIndex == 0) {\n            iToast.makeText(TLDisplayStrings.COPIED_TO_CLIPBOARD_STRING()).setGravity(iToastGravityCenter).setDuration(1000).show()\n            let pasteboard = UIPasteboard.general\n            pasteboard.string = self.QRImageModal!.QRcodeDisplayData\n        } else {\n\n        }\n\n        alertView.close()\n    }\n    \n    deinit {\n        NotificationCenter.default.removeObserver(self)\n    }\n}\n"
  },
  {
    "path": "ArcBit/viewControllers/TLMenuViewController.swift",
    "content": "//\n//  TLMenuViewController.swift\n//  ArcBit\n//\n//  Created by Timothy Lee on 3/14/15.\n//  Copyright (c) 2015 Timothy Lee <stequald01@gmail.com>\n//\n//   This library is free software; you can redistribute it and/or\n//   modify it under the terms of the GNU Lesser General Public\n//   License as published by the Free Software Foundation; either\n//   version 2.1 of the License, or (at your option) any later version.\n//\n//   This library is distributed in the hope that it will be useful,\n//   but WITHOUT ANY WARRANTY; without even the implied warranty of\n//   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n//   Lesser General Public License for more details.\n//\n//   You should have received a copy of the GNU Lesser General Public\n//   License along with this library; if not, write to the Free Software\n//   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,\n//   MA 02110-1301  USA\n\nimport Foundation\nimport UIKit\n@objc(TLMenuViewController) class TLMenuViewController: UIViewController, UITableViewDataSource, UITableViewDelegate {\n    required init?(coder aDecoder: NSCoder) {\n        super.init(coder: aDecoder)\n    }\n    \n    fileprivate var menuItems:NSArray?\n    @IBOutlet fileprivate var menuTopView:UIView?\n    @IBOutlet fileprivate var tableView:UITableView?\n\n    // This is used so that status bar text color is set to white\n    override var preferredStatusBarStyle : (UIStatusBarStyle) {\n        return UIStatusBarStyle.lightContent\n    }\n    \n    override func viewDidLoad() {\n        super.viewDidLoad()\n        setColors()\n        self.menuTopView!.backgroundColor = TLColors.mainAppColor()\n        self.tableView!.backgroundColor = TLColors.mainAppColor()\n        self.tableView!.separatorInset = UIEdgeInsets.zero\n    }\n    \n    override func viewDidAppear(_ animated:Bool) -> () {\n        super.viewDidAppear(animated)\n        UIApplication.shared.setStatusBarHidden(true, with:UIStatusBarAnimation.none)\n        NotificationCenter.default.post(name: Notification.Name(rawValue: TLNotificationEvents.EVENT_HAMBURGER_MENU_OPENED()),\n            object:nil)\n    }\n    \n    override func viewWillAppear(_ animated:Bool) {\n        super.viewWillAppear(animated)\n        if TLPreferences.enabledColdWallet() {\n            menuItems = [TLDisplayStrings.SEND_STRING(), TLDisplayStrings.RECEIVE_STRING(), TLDisplayStrings.HISTORY_STRING(), TLDisplayStrings.ACCOUNTS_STRING(), TLDisplayStrings.COLD_WALLET_STRING(), TLDisplayStrings.HELP_STRING(), TLDisplayStrings.MORE_STRING(), TLDisplayStrings.SETTINGS_STRING()]\n        } else {\n            menuItems = [TLDisplayStrings.SEND_STRING(), TLDisplayStrings.RECEIVE_STRING(), TLDisplayStrings.HISTORY_STRING(), TLDisplayStrings.ACCOUNTS_STRING(), TLDisplayStrings.HELP_STRING(), TLDisplayStrings.MORE_STRING(), TLDisplayStrings.SETTINGS_STRING()]\n        }\n        self.tableView!.reloadData()\n    }\n    \n    override func viewWillDisappear(_ animated:Bool) {\n        super.viewWillDisappear(animated)\n        UIApplication.shared.setStatusBarHidden(false, with:UIStatusBarAnimation.none)\n        self.view.endEditing(true)\n    }\n    \n    func tableView(_ tableView: UITableView, numberOfRowsInSection section:Int) -> Int {\n        return menuItems!.count\n    }\n    \n    func tableView(_ tableView: UITableView, cellForRowAt indexPath:IndexPath) -> UITableViewCell{\n        let MyIdentifier = \"MenuCell\"\n        var cell = tableView.dequeueReusableCell(withIdentifier: MyIdentifier) \n        if (cell == nil) {\n            cell = UITableViewCell(style:UITableViewCellStyle.default,\n                reuseIdentifier:MyIdentifier)\n        }\n        \n        cell!.selectionStyle = UITableViewCellSelectionStyle.none\n        \n        let menuItem = menuItems![(indexPath as NSIndexPath).row] as! String\n        \n        cell!.textLabel!.text = menuItem\n        cell!.backgroundColor = UIColor.clear\n        \n        var imageName = \"\"\n        var name = \"\"\n        \n        \n        if TLPreferences.enabledColdWallet() {\n            switch ((indexPath as NSIndexPath).row) {\n            case 0:\n                imageName = TLWalletUtils.SEND_ICON_IMAGE_NAME()\n                name = TLDisplayStrings.SEND_STRING()\n                break\n            case 1:\n                imageName = TLWalletUtils.RECEIVE_ICON_IMAGE_NAME()\n                name = TLDisplayStrings.RECEIVE_STRING()\n                break\n            case 2:\n                imageName = TLWalletUtils.HISTORY_ICON_IMAGE_NAME()\n                name = TLDisplayStrings.HISTORY_STRING()\n                break\n            case 3:\n                imageName = TLWalletUtils.ACCOUNT_ICON_IMAGE_NAME()\n                name = TLDisplayStrings.ACCOUNTS_STRING()\n                break\n            case 4:\n                imageName = TLWalletUtils.VAULT_ICON_IMAGE_NAME()\n                name = TLDisplayStrings.COLD_WALLET_STRING()\n                break\n            case 5:\n                imageName = TLWalletUtils.HELP_ICON_IMAGE_NAME()\n                name = TLDisplayStrings.HELP_STRING()\n                break\n            case 6:\n                imageName = TLWalletUtils.LINK_ICON_IMAGE_NAME()\n                name = TLDisplayStrings.MORE_STRING()\n                break\n            default:\n                imageName = TLWalletUtils.SETTINGS_ICON_IMAGE_NAME()\n                name = TLDisplayStrings.SETTINGS_STRING()\n                break\n            }\n        } else {\n            switch ((indexPath as NSIndexPath).row) {\n            case 0:\n                imageName = TLWalletUtils.SEND_ICON_IMAGE_NAME()\n                name = TLDisplayStrings.SEND_STRING()\n                break\n            case 1:\n                imageName = TLWalletUtils.RECEIVE_ICON_IMAGE_NAME()\n                name = TLDisplayStrings.RECEIVE_STRING()\n                break\n            case 2:\n                imageName = TLWalletUtils.HISTORY_ICON_IMAGE_NAME()\n                name = TLDisplayStrings.HISTORY_STRING()\n                break\n            case 3:\n                imageName = TLWalletUtils.ACCOUNT_ICON_IMAGE_NAME()\n                name = TLDisplayStrings.ACCOUNTS_STRING()\n                break\n            case 4:\n                imageName = TLWalletUtils.HELP_ICON_IMAGE_NAME()\n                name = TLDisplayStrings.HELP_STRING()\n                break\n            case 5:\n                imageName = TLWalletUtils.LINK_ICON_IMAGE_NAME()\n                name = TLDisplayStrings.MORE_STRING()\n                break\n            default:\n                imageName = TLWalletUtils.SETTINGS_ICON_IMAGE_NAME()\n                name = TLDisplayStrings.SETTINGS_STRING()\n                break\n            }\n        }\n\n        cell!.textLabel!.text = name\n        cell!.textLabel!.textColor = TLColors.mainAppOppositeColor()\n        \n        cell!.imageView!.image = UIImage(named: imageName)!.withRenderingMode(UIImageRenderingMode.alwaysTemplate)\n        cell!.imageView!.tintColor = TLColors.mainAppOppositeColor()\n        \n        return cell!\n    }\n    \n    func tableView(_ tableView:UITableView, heightForHeaderInSection section:Int) -> CGFloat {\n        return 30.0\n    }\n\n    func tableView(_ tableView:UITableView, didSelectRowAt indexPath:IndexPath) -> () {\n        if TLPreferences.enabledColdWallet() {\n            if ((indexPath as NSIndexPath).row == 0) {\n                self.slidingViewController().topViewController = self.storyboard!.instantiateViewController(withIdentifier: \"SendNav\")\n            } else if ((indexPath as NSIndexPath).row == 1) {\n                self.slidingViewController().topViewController = self.storyboard!.instantiateViewController(withIdentifier: \"ReceiveNav\")\n            } else if ((indexPath as NSIndexPath).row == 2) {\n                self.slidingViewController().topViewController = self.storyboard!.instantiateViewController(withIdentifier: \"HistoryNav\")\n            } else if ((indexPath as NSIndexPath).row == 3) {\n                self.slidingViewController().topViewController = self.storyboard!.instantiateViewController(withIdentifier: \"ManageAccountNav\")\n            } else if ((indexPath as NSIndexPath).row == 4) {\n                self.slidingViewController().topViewController = self.storyboard!.instantiateViewController(withIdentifier: \"ColdWalletNav\")\n            } else if ((indexPath as NSIndexPath).row == 5) {\n                self.slidingViewController().topViewController = self.storyboard!.instantiateViewController(withIdentifier: \"HelpNav\")\n            } else if ((indexPath as NSIndexPath).row == 6) {\n                self.slidingViewController().topViewController = self.storyboard!.instantiateViewController(withIdentifier: \"LinksNav\")\n            } else {\n                self.slidingViewController().topViewController = self.storyboard!.instantiateViewController(withIdentifier: \"SettingsNav\")\n            }\n        } else {\n            if ((indexPath as NSIndexPath).row == 0) {\n                self.slidingViewController().topViewController = self.storyboard!.instantiateViewController(withIdentifier: \"SendNav\")\n            } else if ((indexPath as NSIndexPath).row == 1) {\n                self.slidingViewController().topViewController = self.storyboard!.instantiateViewController(withIdentifier: \"ReceiveNav\")\n            } else if ((indexPath as NSIndexPath).row == 2) {\n                self.slidingViewController().topViewController = self.storyboard!.instantiateViewController(withIdentifier: \"HistoryNav\")\n            } else if ((indexPath as NSIndexPath).row == 3) {\n                self.slidingViewController().topViewController = self.storyboard!.instantiateViewController(withIdentifier: \"ManageAccountNav\")\n            } else if ((indexPath as NSIndexPath).row == 4) {\n                self.slidingViewController().topViewController = self.storyboard!.instantiateViewController(withIdentifier: \"HelpNav\")\n            } else if ((indexPath as NSIndexPath).row == 5) {\n                self.slidingViewController().topViewController = self.storyboard!.instantiateViewController(withIdentifier: \"LinksNav\")\n            } else {\n                self.slidingViewController().topViewController = self.storyboard!.instantiateViewController(withIdentifier: \"SettingsNav\")\n            }\n        }\n        \n        self.slidingViewController().resetTopView(animated: true)\n    }\n}\n"
  },
  {
    "path": "ArcBit/viewControllers/TLPassPhraseViewController.swift",
    "content": "//\n//  TLPassPhraseViewController.swift\n//  ArcBit\n//\n//  Created by Timothy Lee on 3/14/15.\n//  Copyright (c) 2015 Timothy Lee <stequald01@gmail.com>\n//\n//   This library is free software; you can redistribute it and/or\n//   modify it under the terms of the GNU Lesser General Public\n//   License as published by the Free Software Foundation; either\n//   version 2.1 of the License, or (at your option) any later version.\n//\n//   This library is distributed in the hope that it will be useful,\n//   but WITHOUT ANY WARRANTY; without even the implied warranty of\n//   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n//   Lesser General Public License for more details.\n//\n//   You should have received a copy of the GNU Lesser General Public\n//   License along with this library; if not, write to the Free Software\n//   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,\n//   MA 02110-1301  USA\n\nimport Foundation\nimport UIKit\n\n@objc(TLPassPhraseViewController) class TLPassPhraseViewController: UIViewController {\n    required init?(coder aDecoder: NSCoder) {\n        super.init(coder: aDecoder)\n    }\n    \n    @IBOutlet fileprivate var navigationBar:UINavigationBar?\n    @IBOutlet weak var walletBackupPassphraseLabel: UILabel!\n    @IBOutlet fileprivate var  backupPassphraseExplanation:UILabel?\n    @IBOutlet fileprivate var passPhraseTextView:UITextView?\n    @IBOutlet fileprivate var masterSeedHexTitleLabel:UILabel?\n    @IBOutlet fileprivate var masterSeedHexTitleExplanation:UILabel?\n    @IBOutlet fileprivate var masterSeedHexTextView:UITextView?\n    \n    override var preferredStatusBarStyle : (UIStatusBarStyle) {\n        return UIStatusBarStyle.lightContent\n    }\n    \n    override func viewDidLoad() {\n        super.viewDidLoad()\n        setNavigationBarColors(self.navigationBar!)\n        self.navigationBar?.topItem?.title = TLDisplayStrings.PASSPHRASE_STRING()\n        self.walletBackupPassphraseLabel?.text = TLDisplayStrings.WALLET_BACKUP_PASSPHRASE_STRING()\n\n        self.passPhraseTextView!.isSelectable = false\n        self.masterSeedHexTextView!.isSelectable = false\n        let passPhraseTextViewGestureRecognizer = UITapGestureRecognizer(target: self, action:#selector(TLPassPhraseViewController.passPhraseTextViewTapped(_:)))\n        self.passPhraseTextView!.addGestureRecognizer(passPhraseTextViewGestureRecognizer)\n        let masterSeedHexGestureRecognizer = UITapGestureRecognizer(target:self, action:#selector(TLPassPhraseViewController.masterSeedHexTextViewTapped(_:)))\n        self.masterSeedHexTextView!.addGestureRecognizer(masterSeedHexGestureRecognizer)\n        \n        self.passPhraseTextView!.backgroundColor = TLColors.mainAppColor()\n        self.passPhraseTextView!.textColor = (TLColors.mainAppOppositeColor())\n        self.masterSeedHexTextView!.backgroundColor = TLColors.mainAppColor()\n        self.masterSeedHexTextView!.textColor = TLColors.mainAppOppositeColor()\n        \n        let passphrase = TLWalletPassphrase.getDecryptedWalletPassphrase()\n        self.passPhraseTextView!.text = (passphrase)\n//        if (!TLPreferences.enabledAdvancedMode()) {\n            self.backupPassphraseExplanation!.text = TLDisplayStrings.BACKUP_PASSPHRASE_EXPLANATION_STRING()\n            self.masterSeedHexTitleLabel!.isHidden = true\n            self.masterSeedHexTitleExplanation!.isHidden = true\n            self.masterSeedHexTextView!.isHidden = true\n            self.masterSeedHexTextView!.text = (\"\")\n//        } else {\n//            self.backupPassphraseExplanation!.text = TLDisplayStrings.BACKUP_PASSPHRASE_ADVANCED_EXPLANATION_STRING()\n//            self.masterSeedHexTitleLabel!.isHidden = false\n//            self.masterSeedHexTitleExplanation!.isHidden = false\n//            self.masterSeedHexTextView!.isHidden = false\n//            let masterHex = TLHDWalletWrapper.getMasterHex(passphrase ?? \"\")\n//            self.masterSeedHexTextView!.text = (masterHex)\n//        }\n        if (!TLPreferences.hasShownBackupPassphrase()) {\n            TLPreferences.setHasShownBackupPassphrase(true)\n        }\n    }\n    \n    func passPhraseTextViewTapped(_ sender:AnyObject) {\n    }\n    \n    func masterSeedHexTextViewTapped(_ sender:AnyObject) {\n    }\n    \n    override func viewDidAppear(_ animated:Bool) -> () {\n        NotificationCenter.default.post(name: Notification.Name(rawValue: TLNotificationEvents.EVENT_BACKUP_PASSPHRASE()),\n            object:nil, userInfo:nil)\n    }\n    \n    override func didReceiveMemoryWarning() {\n        super.didReceiveMemoryWarning()\n    }\n\n    @IBAction fileprivate func cancel(_ sender:AnyObject) {\n        self.passPhraseTextView!.resignFirstResponder()\n        self.dismiss(animated: true, completion:nil)\n    }\n}\n"
  },
  {
    "path": "ArcBit/viewControllers/TLPreloadViewController.swift",
    "content": "//\n//  TLPreloadViewController.swift\n//  ArcBit\n//\n//  Created by Timothy Lee on 3/14/15.\n//  Copyright (c) 2015 Timothy Lee <stequald01@gmail.com>\n//\n//   This library is free software; you can redistribute it and/or\n//   modify it under the terms of the GNU Lesser General Public\n//   License as published by the Free Software Foundation; either\n//   version 2.1 of the License, or (at your option) any later version.\n//\n//   This library is distributed in the hope that it will be useful,\n//   but WITHOUT ANY WARRANTY; without even the implied warranty of\n//   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n//   Lesser General Public License for more details.\n//\n//   You should have received a copy of the GNU Lesser General Public\n//   License along with this library; if not, write to the Free Software\n//   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,\n//   MA 02110-1301  USA\n\nimport Foundation\nimport UIKit\n\n\n@objc(TLPreloadViewController) class TLPreloadViewController: UIViewController, UIAlertViewDelegate {\n    \n    required init?(coder aDecoder: NSCoder) {\n        super.init(coder: aDecoder)\n    }\n    \n    @IBOutlet fileprivate var walletLoadingActivityIndicatorView: UIActivityIndicatorView?\n    @IBOutlet fileprivate var backgroundView: UIView?\n    @IBOutlet weak var backgroundImageView: UIImageView!\n\n    override func viewDidLoad() {\n        super.viewDidLoad()\n\n        self.walletLoadingActivityIndicatorView!.isHidden = true\n        self.walletLoadingActivityIndicatorView!.color = UIColor.gray\n        \n        self.navigationController!.navigationBar.isHidden = true\n        UIApplication.shared.setStatusBarHidden(true, with: UIStatusBarAnimation.none)\n        \n        let passphrase = TLWalletPassphrase.getDecryptedWalletPassphrase()\n        if (TLPreferences.canRestoreDeletedApp() && !TLPreferences.hasSetupHDWallet() && passphrase != nil) {\n            // is fresh app but not first time installing\n            UIAlertController.showAlert(in: self,\n                withTitle: TLDisplayStrings.BACKUP_PASSPHRASE_FOUND_IN_KEYCHAIN_STRING(),\n                message: TLDisplayStrings.BACKUP_PASSPHRASE_FOUND_IN_KEYCHAIN_DESC_STRING(),\n                cancelButtonTitle: TLDisplayStrings.RESTORE_STRING(),\n                destructiveButtonTitle: nil,\n                otherButtonTitles: [TLDisplayStrings.START_FRESH_STRING()],\n                tap: {(alertView, action, buttonIndex) in\n                    if (buttonIndex == alertView?.firstOtherButtonIndex) {\n                        self.initializeWalletAppAndShowInitialScreenAndGoToMainScreen(nil)\n                    } else if (buttonIndex == alertView?.cancelButtonIndex) {\n                        \n                        TLHUDWrapper.showHUDAddedTo(self.view, labelText: TLDisplayStrings.RESTORING_WALLET_STRING(), animated: true)\n                        AppDelegate.instance().saveWalletJSONEnabled = false\n\n                        DispatchQueue.global(priority: DispatchQueue.GlobalQueuePriority.high).async {\n                            AppDelegate.instance().initializeWalletAppAndShowInitialScreen(true, walletPayload: nil)\n                            AppDelegate.instance().refreshHDWalletAccounts(true)\n                            DispatchQueue.main.async {\n                                AppDelegate.instance().saveWalletJSONEnabled = true\n                                AppDelegate.instance().saveWalletJsonCloud()\n                                TLTransactionListener.instance().reconnect()\n                                TLStealthWebSocket.instance().reconnect()\n                                TLHUDWrapper.hideHUDForView(self.view, animated: true)\n                                self.slidingViewController()!.topViewController = self.storyboard!.instantiateViewController(withIdentifier: \"SendNav\") \n                            }\n                        }\n                    }\n            })\n        } else {\n            self.checkToLoadFromLocal()\n        }\n    }\n    \n    fileprivate func checkToLoadFromLocal() -> () {\n        if (TLWalletJson.getDecryptedEncryptedWalletJSONPassphrase() != nil) {\n            let localWalletPayload = AppDelegate.instance().getLocalWalletJsonDict()\n            self.initializeWalletAppAndShowInitialScreenAndGoToMainScreen(localWalletPayload)\n        } else {\n            self.initializeWalletAppAndShowInitialScreenAndGoToMainScreen(nil)\n        }\n    }\n    \n    fileprivate func initializeWalletAppAndShowInitialScreenAndGoToMainScreen(_ walletPayload: NSDictionary?) -> () {\n        AppDelegate.instance().initializeWalletAppAndShowInitialScreen(false, walletPayload: walletPayload)\n        TLTransactionListener.instance().reconnect()\n        TLStealthWebSocket.instance().reconnect()\n\n        if self.slidingViewController() != nil {\n            self.slidingViewController().topViewController = self.storyboard!.instantiateViewController(withIdentifier: \"SendNav\") \n        } else {\n            //is running unit test\n        }\n    }\n    \n    override func viewWillDisappear(_ animated: Bool) -> () {\n        UIApplication.shared.setStatusBarHidden(false, with: UIStatusBarAnimation.none)\n    }\n}\n"
  },
  {
    "path": "ArcBit/viewControllers/TLQRCodeScannerViewController.swift",
    "content": "//\n//  TLQRCodeScannerViewController.swift\n//  ArcBit\n//\n//  Created by Timothy Lee on 3/14/15.\n//  Copyright (c) 2015 Timothy Lee <stequald01@gmail.com>\n//\n//   This library is free software; you can redistribute it and/or\n//   modify it under the terms of the GNU Lesser General Public\n//   License as published by the Free Software Foundation; either\n//   version 2.1 of the License, or (at your option) any later version.\n//\n//   This library is distributed in the hope that it will be useful,\n//   but WITHOUT ANY WARRANTY; without even the implied warranty of\n//   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n//   Lesser General Public License for more details.\n//\n//   You should have received a copy of the GNU Lesser General Public\n//   License along with this library; if not, write to the Free Software\n//   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,\n//   MA 02110-1301  USA\n\nimport Foundation\nimport UIKit\nimport AVFoundation\n\n@objc(TLQRCodeScannerViewController) class TLQRCodeScannerViewController: UIViewController, AVCaptureMetadataOutputObjectsDelegate {\n    \n    fileprivate let n = 66\n    fileprivate let DEFAULT_HEADER_HEIGHT = 66\n    \n    required init?(coder aDecoder: NSCoder) {\n        super.init(coder: aDecoder)\n    }\n    \n    fileprivate var success: ((String?) -> ())?\n    fileprivate var error: ((String?) -> ())?\n    fileprivate var captureSession: AVCaptureSession?\n    fileprivate var videoPreviewLayer: AVCaptureVideoPreviewLayer?\n    fileprivate var isReadingQRCode: Bool = false\n    \n    override var preferredStatusBarStyle : (UIStatusBarStyle) {\n        return UIStatusBarStyle.lightContent\n    }\n    \n    init(success __success: ((String?) -> ())?, error __error: ((String?) -> ())?) {\n        super.init(nibName: nil, bundle: nil)\n        self.modalTransitionStyle = UIModalTransitionStyle.crossDissolve\n        self.success = __success\n        self.error = __error\n    }\n    \n    override func viewDidLoad() {\n        super.viewDidLoad()\n        let app = AppDelegate.instance()\n        self.view.frame = CGRect(x: 0, y: 0, width: app.window!.frame.size.width, height: app.window!.frame.size.height - CGFloat(DEFAULT_HEADER_HEIGHT))\n        \n        let topBarView = UIView(frame: CGRect(x: 0, y: 0, width: self.view.frame.size.width, height: CGFloat(DEFAULT_HEADER_HEIGHT)))\n        topBarView.backgroundColor = TLColors.mainAppColor()\n        self.view.addSubview(topBarView)\n        \n        let logo = UIImageView(image: UIImage(named: \"top_menu_logo.png\"))\n        logo.frame = CGRect(x: 88, y: 22, width: 143, height: 40)\n        topBarView.addSubview(logo)\n        \n        let closeButton = UIButton(frame: CGRect(x: self.view.frame.size.width - 70, y: 15, width: 80, height: 51))\n        closeButton.setTitle(TLDisplayStrings.CLOSE_STRING(), for: UIControlState())\n        closeButton.setTitleColor(UIColor(white:0.56, alpha: 1.0), for: UIControlState.highlighted)\n        closeButton.titleLabel!.font = UIFont.systemFont(ofSize: 15)\n        closeButton.addTarget(self, action: #selector(TLQRCodeScannerViewController.closeButtonClicked(_:)), for: .touchUpInside)\n        topBarView.addSubview(closeButton)\n        \n        self.startReadingQRCode()\n    }\n    \n    func closeButtonClicked(_ sender: UIButton) -> () {\n        self.stopReadingQRCode()\n    }\n    \n    func startReadingQRCode() -> () {\n        var error: NSError?\n        \n        let captureDevice = AVCaptureDevice.defaultDevice(withMediaType: AVMediaTypeVideo)\n        \n        var input: AnyObject!\n        do {\n            input = try AVCaptureDeviceInput(device: captureDevice) as AVCaptureDeviceInput\n        } catch let error1 as NSError {\n            error = error1\n            input = nil\n        }\n        if (input == nil) {\n            // This should not happen - all devices we support have cameras\n            DLog(\"QR code scanner problem: \\(error!.localizedDescription)\")\n            return\n        }\n        \n        captureSession = AVCaptureSession()\n        captureSession!.addInput(input as! AVCaptureInput!)\n        \n        let captureMetadataOutput = AVCaptureMetadataOutput()\n        captureSession!.addOutput(captureMetadataOutput)\n        \n        let dispatchQueue = DispatchQueue(label: \"myQueue\", attributes: [])\n        captureMetadataOutput.setMetadataObjectsDelegate(self, queue: dispatchQueue)\n        captureMetadataOutput.metadataObjectTypes = [AVMetadataObjectTypeQRCode]\n        \n        videoPreviewLayer = AVCaptureVideoPreviewLayer(session: captureSession)\n        videoPreviewLayer?.videoGravity = (AVLayerVideoGravityResizeAspectFill)\n        \n        let app = AppDelegate.instance()\n        let frame = CGRect(x: 0, y: CGFloat(DEFAULT_HEADER_HEIGHT), width: app.window!.frame.size.width, height: app.window!.frame.size.height - CGFloat(DEFAULT_HEADER_HEIGHT))\n        \n        videoPreviewLayer!.frame = frame\n        \n        self.view.layer.addSublayer(videoPreviewLayer!)\n        \n        captureSession!.startRunning()\n    }\n    \n    func stopReadingQRCode() -> () {\n        if(captureSession != nil)\n        {\n            captureSession!.stopRunning()\n            captureSession = nil\n        }\n        \n        if(videoPreviewLayer != nil)\n        {\n            videoPreviewLayer!.removeFromSuperlayer()\n        }\n        \n        self.dismiss(animated: true, completion: nil)\n        \n        if (self.error != nil) {\n            self.error!(nil)\n        }\n    }\n    \n     func captureOutput(_ captureOutput: AVCaptureOutput!,\n        didOutputMetadataObjects metadataObjects: [Any]!,\n        from connection: AVCaptureConnection!) -> () {\n        if (metadataObjects != nil && metadataObjects!.count > 0) {\n            let metadataObj: AnyObject = metadataObjects![0] as AnyObject\n            if (metadataObj.type == AVMetadataObjectTypeQRCode) {\n                // do something useful with results\n                DispatchQueue.main.sync {\n                    let data:String = metadataObj.stringValue\n                    \n                    if (self.success != nil) {\n                        self.success!(data)\n                        self.stopReadingQRCode()\n                    }\n                }\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "ArcBit/viewControllers/TLReceiveViewController.swift",
    "content": "//\n//  TLReceiveViewController.swift\n//  ArcBit\n//\n//  Created by Timothy Lee on 3/14/15.\n//  Copyright (c) 2015 Timothy Lee <stequald01@gmail.com>\n//\n//   This library is free software; you can redistribute it and/or\n//   modify it under the terms of the GNU Lesser General Public\n//   License as published by the Free Software Foundation; either\n//   version 2.1 of the License, or (at your option) any later version.\n//\n//   This library is distributed in the hope that it will be useful,\n//   but WITHOUT ANY WARRANTY; without even the implied warranty of\n//   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n//   Lesser General Public License for more details.\n//\n//   You should have received a copy of the GNU Lesser General Public\n//   License along with this library; if not, write to the Free Software\n//   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,\n//   MA 02110-1301  USA\n\nimport UIKit\n\n@objc(TLReceiveViewController) class TLReceiveViewController: UIViewController, UIScrollViewDelegate, UITabBarDelegate {\n    @IBOutlet fileprivate var addressQRCodeImageView: UIImageView?\n    @IBOutlet fileprivate var addressLabel: UILabel?\n    @IBOutlet fileprivate var accountNameLabel: UILabel?\n    @IBOutlet fileprivate var receiveAddressesScrollView: UIScrollView?\n    @IBOutlet fileprivate var receiveAddressesPageControl: UIPageControl?\n    @IBOutlet fileprivate var fromViewContainerButton: UIButton?\n    @IBOutlet fileprivate var scrollContentView: UIView?\n    @IBOutlet fileprivate var selectAccountImageView: UIImageView?\n    @IBOutlet fileprivate var balanceActivityIndicatorView: UIActivityIndicatorView?\n    @IBOutlet fileprivate var accountBalanceLabel: UILabel?\n    @IBOutlet fileprivate var fromViewContainer: UIButton?\n    @IBOutlet fileprivate var pageControlViewContainer: UIView?\n    @IBOutlet fileprivate var receivingAddressPageControl: UIPageControl?\n    @IBOutlet fileprivate var tabBar: UITabBar?\n    @IBOutlet weak var receiveLabel: UILabel!\n    \n    fileprivate var pageControlBeingUsed = false\n    fileprivate var receiveAddresses: NSMutableArray?\n    let newAddressInfoText = TLDisplayStrings.NEW_ADDRESSES_WILL_BE_AUTOMATICALLY_GENERATED_DESC_STRING()\n    let importedWatchAccountStealthAddressInfoText = TLDisplayStrings.IMPORTED_WATCH_ONLY_ACCOUNTS_REUSABLE_ADDRESS_INFO_DESC_STRING()\n    let coldWalletAccountStealthAddressInfoText = TLDisplayStrings.IMPORTED_COLD_WALLET_ACCOUNTS_REUSABLE_ADDRESS_INFO_DESC_STRING()\n    \n    func setupLabels() {\n        let sendTabBarItem = self.tabBar?.items?[0]\n        sendTabBarItem?.title = TLDisplayStrings.SEND_STRING()\n        let receiveTabBarItem = self.tabBar?.items?[1]\n        receiveTabBarItem?.title = TLDisplayStrings.RECEIVE_STRING()\n    }\n    \n    override func viewDidLoad() {\n        super.viewDidLoad()\n        setColors()\n        \n        self.setLogoImageView()\n        self.setupLabels()\n\n        self.receiveLabel.text = TLDisplayStrings.FROM_COLON_STRING()\n        self.fromViewContainer!.backgroundColor = TLColors.mainAppColor()\n        self.accountNameLabel!.textColor = TLColors.mainAppOppositeColor()\n        self.accountBalanceLabel!.textColor = TLColors.mainAppOppositeColor()\n        self.pageControlViewContainer!.backgroundColor = TLColors.mainAppColor()\n        self.receivingAddressPageControl!.backgroundColor = TLColors.mainAppColor()\n        self.receiveAddressesScrollView!.backgroundColor = TLColors.mainAppColor()\n        self.balanceActivityIndicatorView!.color = TLColors.mainAppOppositeColor()\n\n        self.navigationController!.setToolbarHidden(false, animated: false)\n        self.navigationController!.isToolbarHidden = true\n\n        self.tabBar!.selectedItem = ((self.tabBar!.items as NSArray!).object(at: 1)) as? UITabBarItem\n        if UIScreen.main.bounds.size.height <= 480.0 { // is 3.5 inch screen\n            self.tabBar!.isHidden = true\n        }\n        \n        self.navigationItem.rightBarButtonItem = UIBarButtonItem(barButtonSystemItem: UIBarButtonSystemItem.refresh, target: self, action: #selector(TLReceiveViewController.refreshSelectedAccountAgain))\n        \n        self.navigationController!.view.addGestureRecognizer(self.slidingViewController().panGesture)\n\n        NotificationCenter.default.addObserver(self, selector: #selector(TLReceiveViewController.updateReceiveViewController(_:)),\n            name: NSNotification.Name(rawValue: TLNotificationEvents.EVENT_ADVANCE_MODE_TOGGLED()), object: nil)\n        NotificationCenter.default.addObserver(self, selector: #selector(TLReceiveViewController.updateViewToNewSelectedObject),\n            name: NSNotification.Name(rawValue: TLNotificationEvents.EVENT_UPDATED_RECEIVING_ADDRESSES()), object: nil)\n        NotificationCenter.default.addObserver(self\n            , selector: #selector(TLReceiveViewController.updateViewToNewSelectedObjectAndAlertNewText),\n            name: NSNotification.Name(rawValue: TLNotificationEvents.EVENT_MODEL_UPDATED_NEW_UNCONFIRMED_TRANSACTION()), object: nil)\n        NotificationCenter.default.addObserver(self\n            , selector: #selector(TLReceiveViewController.updateViewToNewSelectedObject),\n            name: NSNotification.Name(rawValue: TLNotificationEvents.EVENT_DISPLAY_LOCAL_CURRENCY_TOGGLED()), object: nil)\n        NotificationCenter.default.addObserver(self\n            , selector: #selector(TLReceiveViewController.updateViewToNewSelectedObject),\n            name: NSNotification.Name(rawValue: TLNotificationEvents.EVENT_FETCHED_ADDRESSES_DATA()), object: nil)\n        NotificationCenter.default.addObserver(self\n            , selector: #selector(TLReceiveViewController.updateViewToNewSelectedObject),\n            name: NSNotification.Name(rawValue: TLNotificationEvents.EVENT_DISPLAY_LOCAL_CURRENCY_TOGGLED()), object: nil)\n        NotificationCenter.default.addObserver(self\n            , selector: #selector(TLReceiveViewController.updateViewToNewSelectedObject),\n              name: NSNotification.Name(rawValue: TLNotificationEvents.EVENT_EXCHANGE_RATE_UPDATED()), object: nil)\n        NotificationCenter.default.addObserver(self\n            , selector: #selector(TLReceiveViewController.checkToShowPassphraseViewController),\n              name: NSNotification.Name(rawValue: TLNotificationEvents.EVENT_MODEL_UPDATED_NEW_UNCONFIRMED_TRANSACTION()), object: nil)\n\n        \n        self.receiveAddressesScrollView!.delegate = self\n        \n        let singleFingerTap = UITapGestureRecognizer(target: self, action: #selector(TLReceiveViewController.singleFingerTap))\n        self.receiveAddressesScrollView!.addGestureRecognizer(singleFingerTap)\n        \n        if (AppDelegate.instance().justSetupHDWallet) {\n            AppDelegate.instance().justSetupHDWallet = false\n            TLPrompts.promptSuccessMessage(TLDisplayStrings.WELCOME_EXCLAMATION_STRING(), message: TLDisplayStrings.WELCOME_DESC_STRING())\n        }\n        \n        self.refreshSelectedAccount(false)\n    }\n    \n    override func viewWillAppear(_ animated: Bool) -> () {\n        self.updateViewToNewSelectedObject()\n    }\n    \n    override func viewDidAppear(_ animated: Bool) -> () {\n        NotificationCenter.default.post(name: Notification.Name(rawValue: TLNotificationEvents.EVENT_VIEW_RECEIVE_SCREEN()), object: nil, userInfo: nil)\n        \n        if (TLSuggestions.instance().conditionToPromptToSuggestedBackUpWalletPassphraseSatisfied()) {\n            TLSuggestions.instance().promptToSuggestBackUpWalletPassphrase(self)\n        } else if let balance = AppDelegate.instance().receiveSelectedObject!.getBalanceForSelectedObject(), balance.greater(TLCoin.zero()) && !TLPreferences.hasShownBackupPassphrase() {\n            self.showPromptThenPassphraseViewController()\n        }\n    }\n    \n    override func didReceiveMemoryWarning() {\n        super.didReceiveMemoryWarning()\n    }\n    \n    func refreshSelectedAccountAgain() {\n        self.refreshSelectedAccount(true)\n    }\n\n    func checkToShowPassphraseViewController() {\n        if !TLPreferences.hasReceivePaymentForFirstTime() && !TLPreferences.hasShownBackupPassphrase() {\n            self.showPromptThenPassphraseViewController()\n        }\n        TLPreferences.setHasReceivePaymentForFirstTime(true)\n    }\n    \n    func showPromptThenPassphraseViewController() {\n        TLPrompts.promptWithOneButton(self, title: TLDisplayStrings.WALLET_BACKUP_PASSPHRASE_WILL_BE_SHOWN(), message: TLDisplayStrings.PLEASE_WRITE_DOWN_OR_MEMORIZE_YOUR_WALLET_BACKUP_PASSPHRASE(), buttonText: TLDisplayStrings.I_UNDERSTAND(), success: {\n            let vc = self.storyboard!.instantiateViewController(withIdentifier: \"Passphrase\")\n            self.slidingViewController().present(vc, animated: true, completion: nil)\n        })\n    }\n    \n    fileprivate func refreshSelectedAccount(_ fetchDataAgain: Bool) {\n        if (!AppDelegate.instance().receiveSelectedObject!.hasFetchedCurrentFromData() || fetchDataAgain) {\n            if (AppDelegate.instance().receiveSelectedObject!.getSelectedObjectType() == .account) {\n                let accountObject = AppDelegate.instance().receiveSelectedObject!.getSelectedObject() as! TLAccountObject\n                self.balanceActivityIndicatorView!.isHidden = false\n                self.accountBalanceLabel!.isHidden = true\n                self.balanceActivityIndicatorView!.startAnimating()\n                AppDelegate.instance().pendingOperations.addSetUpAccountOperation(accountObject, fetchDataAgain: fetchDataAgain, success: {\n                    self.accountBalanceLabel!.isHidden = false\n                    self.balanceActivityIndicatorView!.stopAnimating()\n                    self.balanceActivityIndicatorView!.isHidden = true\n                    if accountObject.downloadState != .downloaded {\n                        self.updateAccountBalance()\n                    }\n                })\n                \n            } else if (AppDelegate.instance().receiveSelectedObject!.getSelectedObjectType() == .address) {\n                let importedAddress = AppDelegate.instance().receiveSelectedObject!.getSelectedObject() as! TLImportedAddress\n                self.balanceActivityIndicatorView!.isHidden = false\n                self.accountBalanceLabel!.isHidden = true\n                self.balanceActivityIndicatorView!.startAnimating()\n                AppDelegate.instance().pendingOperations.addSetUpImportedAddressOperation(importedAddress, fetchDataAgain: fetchDataAgain, success: {\n                    self.accountBalanceLabel!.isHidden = false\n                    self.balanceActivityIndicatorView!.stopAnimating()\n                    self.balanceActivityIndicatorView!.isHidden = true\n                    if importedAddress.downloadState != .downloaded {\n                        self.updateAccountBalance()\n                    }\n                })\n            }\n        } else {\n            let balance = TLCurrencyFormat.getProperAmount(AppDelegate.instance().historySelectedObject!.getBalanceForSelectedObject()!)\n            accountBalanceLabel!.text = balance as String\n            self.balanceActivityIndicatorView!.isHidden = true\n        }\n    }\n    \n    override func showSendView() {\n        self.slidingViewController().topViewController = self.storyboard!.instantiateViewController(withIdentifier: \"SendNav\") \n    }\n    \n    func singleFingerTap() {\n        if self.receiveAddresses == nil {\n            // receiveAddresses not loaded yet\n            return\n        }\n        let address = self.receiveAddresses!.object(at: self.receiveAddressesPageControl!.currentPage) as! String\n        let pasteboard = UIPasteboard.general\n        pasteboard.string = address\n        iToast.makeText(TLDisplayStrings.COPIED_TO_CLIPBOARD_STRING()).setGravity(iToastGravityCenter).setDuration(1000).show()\n    }\n    \n    @IBAction fileprivate func scrollViewClicked(_ sender: AnyObject) {\n        if self.receiveAddresses == nil {\n            // receiveAddresses not loaded yet\n            return\n        }\n        let address = self.receiveAddresses!.object(at: self.receiveAddressesPageControl!.currentPage) as! String\n        let pasteboard = UIPasteboard.general\n        pasteboard.string = address\n        iToast.makeText(TLDisplayStrings.COPIED_TO_CLIPBOARD_STRING()).setGravity(iToastGravityCenter).setDuration(1000).show()\n    }\n    \n    fileprivate func getAddressInfoLabel(_ frame: CGRect, text: String) -> UILabel {\n        let addressInfoLabel = UILabel(frame: frame)\n        addressInfoLabel.textAlignment = .center\n        addressInfoLabel.text = text\n        addressInfoLabel.textColor = TLColors.mainAppOppositeColor()\n        addressInfoLabel.numberOfLines = 0\n        return addressInfoLabel\n    }\n    \n    fileprivate func getPageWidth() -> CGFloat {\n        if (UIScreen.main.bounds.size.width > 414) {\n            //is iPad\n            return UIScreen.main.bounds.size.width - 16\n        }\n        if (UIScreen.main.bounds.size.width == 414) {\n            //is iPhone6+\n            return UIScreen.main.bounds.size.width - 16 - 8\n        }\n        \n        return UIScreen.main.bounds.size.width - 16\n    }\n    \n    fileprivate func getLastPageView(_ lastPageCount: Int, text: String) -> UIView {\n        let pageWidth = self.getPageWidth()\n        \n        var frame = CGRect()\n        frame.origin.x = CGFloat(pageWidth * CGFloat(lastPageCount))\n        frame.origin.y = 0\n        frame.size = self.receiveAddressesScrollView!.frame.size\n        let pageView = UIView(frame: frame)\n        \n        let QRCodeImageWidth = pageWidth - 40\n        \n        let xToBeInCenter = (pageWidth - QRCodeImageWidth) / 2\n        let imageViewFrame = CGRect(x: xToBeInCenter,\n            y: 0,\n            width: QRCodeImageWidth,\n            height: QRCodeImageWidth)\n        \n        pageView.addSubview(self.getAddressInfoLabel(imageViewFrame, text: text))\n        \n        pageView.backgroundColor = TLColors.mainAppColor()\n        \n        return pageView\n    }\n    \n    fileprivate func updateReceiveAddressesView() {\n        self.scrollContentView!.autoresizesSubviews = false\n        \n        var numPages = 0\n        if (self.receiveAddresses!.count != 1) {\n            if (TLWalletUtils.ENABLE_STEALTH_ADDRESS()) {\n                numPages = TLAccountObject.MAX_ACCOUNT_WAIT_TO_RECEIVE_ADDRESS() + TLAccountObject.NUM_ACCOUNT_STEALTH_ADDRESSES() + 1\n            } else {\n                numPages = TLAccountObject.MAX_ACCOUNT_WAIT_TO_RECEIVE_ADDRESS() + 1\n            }\n        } else {\n            numPages = 1\n        }\n        \n        let pageWidth = self.getPageWidth()\n        let pageHeight:CGFloat\n        if UIScreen.main.bounds.size.height > 480.0 {\n            pageHeight = pageWidth\n        } else { // is 3.5 inch screen\n            pageHeight = pageWidth - 100\n        }\n        \n        var pageCount = 0\n\n        for i in stride(from: 0, to: self.receiveAddresses!.count, by: 1) {\n            pageCount += 1\n            \n            var frame = CGRect()\n            frame.origin.x = pageWidth * CGFloat(i)\n            frame.origin.y = 0\n            frame.size = self.receiveAddressesScrollView!.frame.size\n            let pageView = UIView(frame: frame)\n            \n            let QRCodeImageWidth:CGFloat\n            if UIScreen.main.bounds.size.height > 480.0 {\n                QRCodeImageWidth = pageWidth - 30\n            } else { // is 3.5 inch screen\n                QRCodeImageWidth = pageWidth - 110\n            }\n            \n            let xToBeInCenter = (pageWidth - QRCodeImageWidth) / 2.0\n            let imageViewFrame = CGRect(x: xToBeInCenter,\n                y: 0,\n                width: QRCodeImageWidth,\n                height: QRCodeImageWidth)\n            \n            if (i < self.receiveAddresses!.count - 1 || AppDelegate.instance().receiveSelectedObject!.getSelectedObjectType() == .address) {\n                    \n                    \n                let address = self.receiveAddresses!.object(at: i) as! String\n                let QRCodeImage = getQRCodeImage(address, size: QRCodeImageWidth - 5)\n                    \n                let QRCodeImageView = UIImageView(frame: imageViewFrame)\n                QRCodeImageView.image = QRCodeImage\n                pageView.addSubview(QRCodeImageView)\n                    \n                let addressLabelY: CGFloat\n                let infoLabelY: CGFloat\n                if (UIScreen.main.bounds.size.width <= 320) {\n                    //is <= iPhone5s\n                    addressLabelY = QRCodeImageWidth + 5\n                    infoLabelY = QRCodeImageWidth - 15\n                } else {\n                    addressLabelY = QRCodeImageWidth + 21\n                    infoLabelY = QRCodeImageWidth\n                }\n                    \n                let addressLabelFrame = CGRect(x: xToBeInCenter,\n                    y: addressLabelY,\n                    width: QRCodeImageWidth,\n                    height: 21)\n                let labelEdgeInsets = UIEdgeInsetsMake(0, 5, 0, 5)\n                    \n                let addressLabel = UILabel(frame: UIEdgeInsetsInsetRect(addressLabelFrame, labelEdgeInsets))\n                addressLabel.textColor = TLColors.mainAppOppositeColor()\n                addressLabel.adjustsFontSizeToFitWidth = true\n                addressLabel.textAlignment = .center\n                addressLabel.font = UIFont.boldSystemFont(ofSize: addressLabel.font.pointSize)\n                addressLabel.text = address\n                if address.characters.count > 35 { // is stealth address\n                    addressLabel.numberOfLines = 2\n                } else {\n                    addressLabel.numberOfLines = 1\n                }\n                pageView.addSubview(addressLabel)\n                    \n                if (TLStealthAddress.isStealthAddress(address, isTestnet: AppDelegate.instance().appWallet.walletConfig.isTestnet)) {\n                    let infoLabelFrame = CGRect(x: xToBeInCenter,\n                        y: infoLabelY,\n                        width: QRCodeImageWidth,\n                        height: 21)\n                        \n                    let infoLabel = UILabel(frame: UIEdgeInsetsInsetRect(infoLabelFrame, labelEdgeInsets))\n                    infoLabel.textColor = TLColors.mainAppOppositeColor()\n                    infoLabel.font = UIFont.boldSystemFont(ofSize: addressLabel.font.pointSize - 5)\n                    infoLabel.text = TLDisplayStrings.REUSABLE_ADDRESS_COLON_STRING()\n                    pageView.addSubview(infoLabel)\n                    //QRCodeImageView.backgroundColor = UIColor.orangeColor()\n                }\n            } else {\n                if AppDelegate.instance().receiveSelectedObject!.getAccountType() == .coldWallet {\n                    pageView.addSubview(self.getAddressInfoLabel(imageViewFrame, text: coldWalletAccountStealthAddressInfoText))\n                } else if AppDelegate.instance().receiveSelectedObject!.getAccountType() == .importedWatch {\n                    pageView.addSubview(self.getAddressInfoLabel(imageViewFrame, text: importedWatchAccountStealthAddressInfoText))\n                } else {\n                    pageView.addSubview(self.getAddressInfoLabel(imageViewFrame, text: newAddressInfoText))\n                }\n            }\n            \n            pageView.backgroundColor = TLColors.mainAppColor()\n            //if (i % 2 == 0) {pageView.backgroundColor = UIColor.yellowColor()}\n            \n            self.scrollContentView!.addSubview(pageView)\n        }\n        \n        while (pageCount < numPages) {\n            self.scrollContentView!.addSubview(self.getLastPageView(pageCount, text: newAddressInfoText))\n            pageCount += 1\n        }\n        \n        self.receiveAddressesScrollView!.contentSize = CGSize(width: pageWidth * CGFloat(numPages),\n            height: CGFloat(pageHeight))\n        \n        self.receiveAddressesPageControl!.currentPage = 0\n        self.receiveAddressesPageControl!.numberOfPages = numPages\n        \n        if (self.receiveAddressesPageControl!.numberOfPages > 1) {\n            self.receiveAddressesPageControl!.isHidden = false\n            self.pageControlViewContainer!.isHidden = false\n        } else {\n            self.receiveAddressesPageControl!.isHidden = true\n            self.pageControlViewContainer!.isHidden = true\n        }\n    }\n\n    fileprivate func updateReceiveAddressArray() {\n        let receivingAddressesCount = AppDelegate.instance().receiveSelectedObject!.getReceivingAddressesCount()\n        self.receiveAddresses = NSMutableArray(capacity: Int(receivingAddressesCount))\n        for i in stride(from: 0, to: Int(receivingAddressesCount), by: 1) {\n            let address = AppDelegate.instance().receiveSelectedObject!.getReceivingAddressForSelectedObject(i)\n            self.receiveAddresses!.add(address!)\n        }\n\n        if (TLWalletUtils.ENABLE_STEALTH_ADDRESS()) {\n            if (AppDelegate.instance().receiveSelectedObject!.getSelectedObjectType() == .account) {\n                if let stealthAddress = AppDelegate.instance().receiveSelectedObject!.getStealthAddress() {\n                    if (TLPreferences.enabledStealthAddressDefault()) {\n                        self.receiveAddresses!.insert(stealthAddress, at: 0)\n                    } else {\n                        self.receiveAddresses!.add(stealthAddress)\n                    }                    \n                }\n            }\n        }\n\n        if (AppDelegate.instance().receiveSelectedObject!.getSelectedObjectType() == .account) {\n            self.receiveAddresses!.add(\"End\")\n        }\n    }\n\n    func updateViewToNewSelectedObjectAndAlertNewText() {\n        updateViewToNewSelectedObject()\n    }\n    \n    func updateViewToNewSelectedObject() {\n        DispatchQueue.main.async {\n            self.updateAccountBalance()\n            let receivingAddressesCount = AppDelegate.instance().receiveSelectedObject!.getReceivingAddressesCount()\n            if (receivingAddressesCount == 0) {\n                // this happens if receiving addresses have not been computed yet (cuz it requires look ups), thus don't update UI yet\n                // EVENT_UPDATED_RECEIVING_ADDRESSES will fire and this method be called\n                return\n            }\n            let label = AppDelegate.instance().receiveSelectedObject!.getLabelForSelectedObject()\n            self.accountNameLabel!.text = label\n            self.updateReceiveAddressArray()\n            self.updateReceiveAddressesView()\n            self.scrollToPage(0)\n        }\n    }\n\n    fileprivate func updateAccountBalance() {\n        let balance = AppDelegate.instance().receiveSelectedObject!.getBalanceForSelectedObject()\n        let balanceString = TLCurrencyFormat.getProperAmount(balance!)\n        \n        if AppDelegate.instance().receiveSelectedObject!.getDownloadState() == .downloaded {\n            self.balanceActivityIndicatorView!.stopAnimating()\n            self.balanceActivityIndicatorView!.isHidden = true\n            self.accountBalanceLabel!.text = balanceString as String\n            self.accountBalanceLabel!.isHidden = false\n        }\n    }\n\n    fileprivate func getQRCodeImage(_ address: String, size: CGFloat) -> UIImage {\n        //let QRCodeData = TLWalletUtils.getBitcoinURI(address, amount: TLCoin.zero(), label: nil, message: nil)\n        let QRCodeData = address\n        let QRCodeImage = TLWalletUtils.getQRCodeImage(QRCodeData,\n                imageDimension: Int(size))\n\n        return QRCodeImage\n    }\n\n    func updateReceiveViewController(_ notification: Notification) {\n        if (TLPreferences.enabledAdvancedMode()) {\n            //self.addressLabel!.hidden = false\n        } else {\n            //self.addressLabel!.hidden = true\n        }\n    }\n\n    override func prepare(for segue: UIStoryboardSegue, sender: Any!) -> () {\n        if(segue.identifier == \"selectAccount\") {\n            let vc = segue.destination \n            vc.navigationItem.title = TLDisplayStrings.SELECT_ACCOUNT_STRING()\n            NotificationCenter.default.addObserver(self, selector: #selector(TLReceiveViewController.onAccountSelected(_:)), name: NSNotification.Name(rawValue: TLNotificationEvents.EVENT_ACCOUNT_SELECTED()), object: nil)\n        }\n    }\n\n    func onAccountSelected(_ note: Notification) {\n        NotificationCenter.default.removeObserver(self, name: NSNotification.Name(rawValue: TLNotificationEvents.EVENT_ACCOUNT_SELECTED()), object: nil)\n        let selectedDict = note.object as! NSDictionary\n        let sendFromType = TLSendFromType(rawValue: selectedDict.object(forKey: \"sendFromType\") as! Int)\n\n        let sendFromIndex = selectedDict.object(forKey: \"sendFromIndex\") as! Int\n        AppDelegate.instance().updateReceiveSelectedObject(sendFromType!, sendFromIndex: sendFromIndex)\n\n        self.updateViewToNewSelectedObject()\n    }\n\n    fileprivate func scrollToPage(_ page: NSInteger) {\n        // Update the scroll view to the appropriate page\n        var frame = CGRect()\n        frame.origin.x = self.receiveAddressesScrollView!.frame.size.width * CGFloat(page)\n        frame.origin.y = 0\n        frame.size = self.receiveAddressesScrollView!.frame.size\n        self.receiveAddressesScrollView!.scrollRectToVisible(frame, animated: true)\n\n        // Keep track of when scrolls happen in response to the page control\n        // value changing. If we don't do this, a noticeable \"flashing\" occurs\n        // as the the scroll delegate will temporarily switch back the page\n        // number.\n        pageControlBeingUsed = true\n    }\n\n    @IBAction fileprivate func changePage(_ sender: AnyObject) {\n        self.scrollToPage(self.receiveAddressesPageControl!.currentPage)\n    }\n\n    @IBAction fileprivate func menuButtonClicked(_ sender: AnyObject) {\n        self.slidingViewController().anchorTopViewToRight(animated: true)\n    }\n\n    func scrollViewDidScroll(_ sender: UIScrollView) {\n        if (!pageControlBeingUsed) {\n            // change page when more than 50% of the previous/next page is visible\n            let pageWidth = self.receiveAddressesScrollView!.frame.size.width\n            let page = floor((self.receiveAddressesScrollView!.contentOffset.x - pageWidth / 2) / pageWidth) + 1\n            self.receiveAddressesPageControl!.currentPage = Int(page)\n        }\n    }\n\n    func scrollViewWillBeginDragging(_ scrollView: UIScrollView) {\n        pageControlBeingUsed = false\n    }\n\n    func scrollViewDidEndDecelerating(_ scrollView: UIScrollView) {\n        pageControlBeingUsed = false\n    }\n\n    func tabBar(_ tabBar: UITabBar, didSelect item: UITabBarItem) {\n        if (item.tag == 0) {\n            self.showSendView()\n        }\n    }\n    \n    deinit {\n        NotificationCenter.default.removeObserver(self)\n    }\n}\n\n"
  },
  {
    "path": "ArcBit/viewControllers/TLRestoreWalletViewController.swift",
    "content": "//\n//  TLRestoreWalletViewController.swift\n//  ArcBit\n//\n//  Created by Timothy Lee on 3/14/15.\n//  Copyright (c) 2015 Timothy Lee <stequald01@gmail.com>\n//\n//   This library is free software; you can redistribute it and/or\n//   modify it under the terms of the GNU Lesser General Public\n//   License as published by the Free Software Foundation; either\n//   version 2.1 of the License, or (at your option) any later version.\n//\n//   This library is distributed in the hope that it will be useful,\n//   but WITHOUT ANY WARRANTY; without even the implied warranty of\n//   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n//   Lesser General Public License for more details.\n//\n//   You should have received a copy of the GNU Lesser General Public\n//   License along with this library; if not, write to the Free Software\n//   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,\n//   MA 02110-1301  USA\n\n\nimport Foundation\nimport UIKit\n\n@objc(TLRestoreWalletViewController) class TLRestoreWalletViewController: UIViewController, UITextViewDelegate {\n    required init?(coder aDecoder: NSCoder) {\n        super.init(coder: aDecoder)\n    }\n    \n    @IBOutlet fileprivate var navigationBar:UINavigationBar?\n    @IBOutlet fileprivate var inputMnemonicTextView:UITextView?\n    @IBOutlet fileprivate var restoreWalletDescriptionLabel:UILabel?\n    \n    var encryptedWalletJSON:String?\n    \n    override var preferredStatusBarStyle : (UIStatusBarStyle) {\n        return UIStatusBarStyle.lightContent\n    }\n    \n    override func viewDidLoad() {\n        super.viewDidLoad()\n        setNavigationBarColors(self.navigationBar!)\n        self.navigationBar?.topItem?.title = TLDisplayStrings.RESTORE_WALLET_STRING()\n        self.restoreWalletDescriptionLabel!.text = TLDisplayStrings.ENTER_A_WALLET_BACKUP_PASSPHRASE_STRING()\n        \n        self.inputMnemonicTextView!.returnKeyType = .done\n        self.inputMnemonicTextView!.delegate = self\n        self.inputMnemonicTextView!.backgroundColor = TLColors.mainAppColor()\n        self.inputMnemonicTextView!.textColor = TLColors.mainAppOppositeColor()\n        self.inputMnemonicTextView!.isSecureTextEntry = true\n        \n        self.inputMnemonicTextView!.becomeFirstResponder()\n    }\n    \n    fileprivate func showPromptToRestoreWallet(_ mnemonicPassphrase:String, walletPayload:NSDictionary?) -> () {\n        let msg = TLDisplayStrings.RESTORING_WALLET_DESC_STRING()\n        \n        UIAlertController.showAlert(in: self,\n            withTitle:TLDisplayStrings.RESTORING_WALLET_STRING(),\n            message:msg,\n            cancelButtonTitle:TLDisplayStrings.CANCEL_STRING(),\n            destructiveButtonTitle: nil,\n            otherButtonTitles:[TLDisplayStrings.CONTINUE_STRING()],\n            tap: {(alertView, action, buttonIndex) in\n                if (buttonIndex == alertView?.firstOtherButtonIndex) {\n                    self.inputMnemonicTextView!.resignFirstResponder()\n                    TLHUDWrapper.showHUDAddedTo(self.view, labelText:TLDisplayStrings.RESTORING_WALLET_STRING(), animated:true)\n                    \n                    DispatchQueue.global(priority: DispatchQueue.GlobalQueuePriority.high).async {\n                        AppDelegate.instance().saveWalletJSONEnabled = false\n                        AppDelegate.instance().recoverHDWallet(mnemonicPassphrase, shouldRefreshApp:false)\n                        AppDelegate.instance().refreshHDWalletAccounts(true)\n                        AppDelegate.instance().refreshApp(mnemonicPassphrase, clearWalletInMemory:false)\n                        AppDelegate.instance().saveWalletJSONEnabled = true\n                        self.handleAfterRecoverWallet(mnemonicPassphrase)\n                    }\n                }\n                else if (buttonIndex == alertView?.cancelButtonIndex) {\n                }\n        })\n    }\n    \n    fileprivate func handleAfterRecoverWallet(_ mnemonicPassphrase:String) -> () {\n        AppDelegate.instance().updateGodSend(TLSendFromType.hdWallet, sendFromIndex:0)\n        AppDelegate.instance().updateReceiveSelectedObject(TLSendFromType.hdWallet, sendFromIndex:0)\n        AppDelegate.instance().updateHistorySelectedObject(TLSendFromType.hdWallet, sendFromIndex:0)\n        \n        AppDelegate.instance().saveWalletJsonCloud()\n        \n        NotificationCenter.default.post(name: Notification.Name(rawValue: TLNotificationEvents.EVENT_RESTORE_WALLET()),\n            object:nil, userInfo:nil)\n        \n        DispatchQueue.main.async {\n            TLTransactionListener.instance().reconnect()\n            TLStealthWebSocket.instance().reconnect()\n            TLHUDWrapper.hideHUDForView(self.view, animated:true)\n            self.dismiss(animated: true, completion:nil)\n            TLPrompts.promptSuccessMessage(TLDisplayStrings.SUCCESS_STRING(), message:TLDisplayStrings.YOUR_WALLET_IS_NOW_RESTORED_STRING())\n        }\n    }\n    \n    @IBAction fileprivate func cancel(_ sender:AnyObject!) {\n        self.inputMnemonicTextView!.resignFirstResponder()\n        NotificationCenter.default.post(name: Notification.Name(rawValue: TLNotificationEvents.EVENT_ENTER_MNEMONIC_VIEWCONTROLLER_DISMISSED()),\n            object:nil, userInfo:nil)\n        self.dismiss(animated: true, completion:nil)\n    }\n    \n    func textView(_ textView:UITextView, shouldChangeTextIn range:NSRange, replacementText text:String) -> Bool {\n        \n        if(text == \"\\n\") {\n            var passphrase = textView.text\n            passphrase = passphrase?.trimmingCharacters(in: CharacterSet.whitespacesAndNewlines)\n            \n            if (TLHDWalletWrapper.phraseIsValid(passphrase!)) {\n                showPromptToRestoreWallet(passphrase!, walletPayload:nil)\n            } else {\n                TLPrompts.promptErrorMessage(TLDisplayStrings.ERROR_STRING(), message:TLDisplayStrings.INVALID_BACKUP_PASSPHRASE_STRING())\n            }\n            \n            return false\n        }\n        \n        return true\n    }\n    \n    fileprivate func textViewShouldReturn(_ textView:UITextView) -> (Bool){\n        textView.resignFirstResponder()\n        return true\n    }\n    \n    func textViewShouldBeginEditing(_ textView:UITextView) -> (Bool) {\n        return true\n    }\n    \n    func textViewShouldEndEditing(_ textView:UITextView) -> (Bool) {\n        textView.resignFirstResponder()\n        return true\n    }\n}\n"
  },
  {
    "path": "ArcBit/viewControllers/TLReviewPaymentViewController.swift",
    "content": "//\n//  TLReviewPaymentViewController.swift\n//  ArcBit\n//\n//  Created by Timothy Lee on 3/14/15.\n//  Copyright (c) 2015 Timothy Lee <stequald01@gmail.com>\n//\n//   This library is free software; you can redistribute it and/or\n//   modify it under the terms of the GNU Lesser General Public\n//   License as published by the Free Software Foundation; either\n//   version 2.1 of the License, or (at your option) any later version.\n//\n//   This library is distributed in the hope that it will be useful,\n//   but WITHOUT ANY WARRANTY; without even the implied warranty of\n//   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n//   Lesser General Public License for more details.\n//\n//   You should have received a copy of the GNU Lesser General Public\n//   License along with this library; if not, write to the Free Software\n//   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,\n//   MA 02110-1301  USA\n\nimport Foundation\nimport UIKit\nimport AVFoundation\nfileprivate func < <T : Comparable>(lhs: T?, rhs: T?) -> Bool {\n  switch (lhs, rhs) {\n  case let (l?, r?):\n    return l < r\n  case (nil, _?):\n    return true\n  default:\n    return false\n  }\n}\n\nfileprivate func > <T : Comparable>(lhs: T?, rhs: T?) -> Bool {\n  switch (lhs, rhs) {\n  case let (l?, r?):\n    return l > r\n  default:\n    return rhs < lhs\n  }\n}\n\n\n@objc(TLReviewPaymentViewController) class TLReviewPaymentViewController: UIViewController, CustomIOS7AlertViewDelegate {\n    required init?(coder aDecoder: NSCoder) {\n        super.init(coder: aDecoder)\n    }\n    \n    @IBOutlet weak var navigationBar:UINavigationBar?\n    \n    @IBOutlet weak var fromTitleLabel: UILabel!\n    @IBOutlet weak var toTitleLabel: UILabel!\n    @IBOutlet weak var toAmountTitleLabel: UILabel!\n    @IBOutlet weak var feeAmountTitleLabel: UILabel!\n    @IBOutlet weak var totalAmountTitleLabel: UILabel!\n\n    @IBOutlet weak var fromLabel: UILabel!\n    @IBOutlet weak var toLabel: UILabel!\n    @IBOutlet weak var unitLabel: UILabel!\n    @IBOutlet weak var fiatUnitLabel: UILabel!\n    @IBOutlet weak var toAmountLabel: UILabel!\n    @IBOutlet weak var feeAmountLabel: UILabel!\n    @IBOutlet weak var toAmountFiatLabel: UILabel!\n    @IBOutlet weak var feeAmountFiatLabel: UILabel!\n    @IBOutlet weak var totalAmountLabel: UILabel!\n    @IBOutlet weak var totalFiatAmountLabel: UILabel!\n    @IBOutlet weak var customizeFeeButton: UIButton!\n    @IBOutlet weak var sendButton: UIButton!\n    weak var reviewPaymentViewController: TLReviewPaymentViewController?\n    fileprivate lazy var showedPromptedForSentPaymentTxHashSet:NSMutableSet = NSMutableSet()\n    fileprivate var QRImageModal: TLQRImageModal?\n    fileprivate var airGapDataBase64PartsArray: Array<String>?\n    var sendTimer:Timer?\n    var sendTxHash:String?\n    var toAddress:String?\n    var toAmount:TLCoin?\n    var amountMovedFromAccount: TLCoin? = nil\n    var realToAddresses: Array<String>? = nil\n    \n\n    \n    private var scannedSignedTxAirGapDataPartsDict = [Int:String]()\n    private var totalExpectedParts:Int = 0\n    private var scannedSignedTxAirGapData:String? = nil\n    \n    private var shouldPromptToScanSignedTxAirGapData = false\n    private var shouldPromptToBroadcastSignedTx = false\n    private var signedAirGapTxHex:String? = nil\n    private var signedAirGapTxHash:String? = nil\n    \n    \n    \n    override var preferredStatusBarStyle : (UIStatusBarStyle) {\n        return UIStatusBarStyle.lightContent\n    }\n\n    override func viewDidLoad() {\n        super.viewDidLoad()\n        setNavigationBarColors(self.navigationBar!)\n        \n        self.navigationBar?.topItem?.title = TLDisplayStrings.CONFIRM_PAYMENT_STRING()\n        self.fromTitleLabel.text = TLDisplayStrings.FROM_COLON_STRING()\n        self.toTitleLabel.text = TLDisplayStrings.TO_COLON_STRING()\n        self.toAmountTitleLabel.text = TLDisplayStrings.AMOUNT_COLON_STRING()\n        self.feeAmountTitleLabel.text = TLDisplayStrings.FEE_COLON_STRING()\n        self.totalAmountTitleLabel.text = TLDisplayStrings.TOTAL_COLON_STRING()\n\n        self.customizeFeeButton.setTitle(TLDisplayStrings.CUSTOMIZE_FEE_STRING(), for: .normal)\n        self.sendButton.setTitle(TLDisplayStrings.SEND_STRING(), for: .normal)\n        \n        self.sendButton.backgroundColor = TLColors.mainAppColor()\n        self.sendButton.setTitleColor(TLColors.mainAppOppositeColor(), for: UIControlState())\n        NotificationCenter.default.addObserver(self\n            ,selector:#selector(TLReviewPaymentViewController.finishSend(_:)),\n             name:NSNotification.Name(rawValue: TLNotificationEvents.EVENT_MODEL_UPDATED_NEW_UNCONFIRMED_TRANSACTION()), object:nil)\n        updateView()\n        self.reviewPaymentViewController = self\n        if !TLPreferences.enabledAdvancedMode() {\n            self.customizeFeeButton.isHidden = true\n        }\n    }\n    \n    override func viewWillAppear(_ animated: Bool) {\n        if self.shouldPromptToScanSignedTxAirGapData {\n            self.promptToScanSignedTxAirGapData()\n        } else if self.shouldPromptToBroadcastSignedTx {\n            self.shouldPromptToBroadcastSignedTx = false\n            self.promptToBroadcastColdWalletAccountSignedTx(self.signedAirGapTxHex!, txHash: self.signedAirGapTxHash!)\n        }\n    }\n\n    override func viewDidAppear(_ animated: Bool) {\n        if (!TLPreferences.disabledShowFeeExplanationInfo()) {\n            TLPrompts.promptSuccessMessage(TLDisplayStrings.TRANSACTION_FEE_STRING(), message: TLDisplayStrings.FEE_INFO_DESC_STRING())\n            TLPreferences.setDisableShowFeeExplanationInfo(true);\n        }\n    }\n\n    func updateView() {\n        self.fromLabel.text = TLSendFormData.instance().fromLabel\n        self.toLabel.text = TLSendFormData.instance().getAddress()\n        self.unitLabel.text = TLCurrencyFormat.getBitcoinDisplay()\n        self.fiatUnitLabel.text = TLCurrencyFormat.getFiatCurrency()\n        self.toAmountLabel.text = TLCurrencyFormat.coinToProperBitcoinAmountString(TLSendFormData.instance().toAmount!, withCode: false)\n        self.toAmountFiatLabel.text = TLCurrencyFormat.coinToProperFiatAmountString(TLSendFormData.instance().toAmount!, withCode: false)\n        self.feeAmountLabel.text = TLCurrencyFormat.coinToProperBitcoinAmountString(TLSendFormData.instance().feeAmount!, withCode: false)\n        self.feeAmountFiatLabel.text = TLCurrencyFormat.coinToProperFiatAmountString(TLSendFormData.instance().feeAmount!, withCode: false)\n        let total = TLSendFormData.instance().toAmount!.add(TLSendFormData.instance().feeAmount!)\n        self.totalAmountLabel.text = TLCurrencyFormat.coinToProperBitcoinAmountString(total, withCode: false)\n        self.totalFiatAmountLabel.text = TLCurrencyFormat.coinToProperFiatAmountString(total, withCode: false)\n    }\n    \n    fileprivate func showPromptForSetTransactionFee() {\n        let msg = String(format: TLDisplayStrings.SET_TRANSACTION_FEE_IN_X_STRING(), TLCurrencyFormat.getBitcoinDisplay())\n\n        func addTextField(_ textField: UITextField!){\n            textField.placeholder = \"\"\n            textField.keyboardType = .decimalPad\n        }\n        \n        UIAlertController.showAlert(in: self,\n                                                    withTitle: TLDisplayStrings.TRANSACTION_FEE_STRING(),\n                                                    \n                                                    message: msg,\n                                                    preferredStyle: .alert,\n                                                    cancelButtonTitle: TLDisplayStrings.CANCEL_STRING(),\n                                                    destructiveButtonTitle: nil,\n                                                    otherButtonTitles: [TLDisplayStrings.OK_STRING()],\n                                                    \n                                                    preShow: {(controller) in\n                                                        controller!.addTextField(configurationHandler: addTextField)\n            }\n            ,\n                                                    tap: {(alertView, action, buttonIndex) in\n                                                        if (buttonIndex == alertView!.firstOtherButtonIndex) {\n                                                            let feeAmountString = (alertView!.textFields![0]).text\n                                                            \n                                                            let feeAmount = TLCurrencyFormat.properBitcoinAmountStringToCoin(feeAmountString!)\n                                                            \n                                                            let amountNeeded = TLSendFormData.instance().toAmount!.add(feeAmount)\n                                                            let sendFromBalance = AppDelegate.instance().godSend!.getCurrentFromBalance()\n                                                            if (amountNeeded.greater(sendFromBalance)) {\n                                                                TLPrompts.promptErrorMessage(TLDisplayStrings.INSUFFICIENT_FUNDS_STRING(), message: TLDisplayStrings.YOUR_NEW_TRANSACTION_FEE_IS_TOO_HIGH_STRING())\n                                                                return\n                                                            }\n                                                            \n                                                            TLSendFormData.instance().feeAmount = feeAmount\n                                                            self.updateView()\n\n                                                        } else if (buttonIndex == alertView!.cancelButtonIndex) {\n                                                        }\n        })\n    }\n\n    func showPromptPaymentSent(_ txHash: String, address: String, amount: TLCoin) {\n        DLog(\"showPromptPaymentSent \\(txHash)\")\n        let msg = String(format:TLDisplayStrings.SENT_X_TO_Y_STRING(), TLCurrencyFormat.getProperAmount(amount), address)\n        TLHUDWrapper.hideHUDForView(self.view, animated: true)\n        TLPrompts.promtForOK(self, title: \"\", message: msg, success: {\n            self.dismiss(animated: true, completion: nil)\n        })\n    }\n    \n    func cancelSend() {\n        sendTimer?.invalidate()\n        TLHUDWrapper.hideHUDForView(self.view, animated: true)\n    }\n\n    func retryFinishSend() {\n        DLog(\"retryFinishSend \\(self.sendTxHash)\")\n        if !AppDelegate.instance().webSocketNotifiedTxHashSet.contains(self.sendTxHash!) {\n            let nonUpdatedBalance = AppDelegate.instance().godSend!.getCurrentFromBalance()\n            let accountNewBalance = nonUpdatedBalance.subtract(self.amountMovedFromAccount!)\n            DLog(\"retryFinishSend 2 \\(self.sendTxHash)\")\n            AppDelegate.instance().godSend!.setCurrentFromBalance(accountNewBalance)\n        }\n\n        if !self.showedPromptedForSentPaymentTxHashSet.contains(self.sendTxHash!) {\n            self.showedPromptedForSentPaymentTxHashSet.add(self.sendTxHash!)\n            self.showPromptPaymentSent(self.sendTxHash!, address: self.toAddress!, amount: self.toAmount!)\n        }\n    }\n    \n    func finishSend(_ note: Notification) {\n        let webSocketNotifiedTxHash = note.object as? String\n        DLog(\"finishSend \\(webSocketNotifiedTxHash)\")\n        if webSocketNotifiedTxHash! == self.sendTxHash! && !self.showedPromptedForSentPaymentTxHashSet.contains(webSocketNotifiedTxHash!) {\n            DLog(\"finishSend 2 \\(webSocketNotifiedTxHash)\")\n            self.showedPromptedForSentPaymentTxHashSet.add(webSocketNotifiedTxHash!)\n            sendTimer?.invalidate()\n            self.showPromptPaymentSent(webSocketNotifiedTxHash!, address: self.toAddress!, amount: self.toAmount!)\n        }\n    }\n\n    func initiateSend() {\n        let unspentOutputsSum = AppDelegate.instance().godSend!.getCurrentFromUnspentOutputsSum()\n        if (unspentOutputsSum.less(TLSendFormData.instance().toAmount!)) {\n            // can only happen if unspentOutputsSum is for some reason less then the balance computed from the transactions, which it shouldn't\n            cancelSend()\n            let unspentOutputsSumString = TLCurrencyFormat.coinToProperBitcoinAmountString(unspentOutputsSum)\n            TLPrompts.promptErrorMessage(TLDisplayStrings.INSUFFICIENT_FUNDS_STRING(), message: String(format: TLDisplayStrings.SOME_FUNDS_MAY_BE_PENDING_CONFIRMATION_DESC_STRING(), \"\\(unspentOutputsSumString) \\(TLCurrencyFormat.getBitcoinDisplay())\"))\n            return\n        }\n        \n        let toAddressesAndAmount = NSMutableDictionary()\n        toAddressesAndAmount.setObject(TLSendFormData.instance().getAddress()!, forKey: \"address\" as NSCopying)\n        toAddressesAndAmount.setObject(TLSendFormData.instance().toAmount!, forKey: \"amount\" as NSCopying)\n        let toAddressesAndAmounts = NSArray(objects: toAddressesAndAmount)\n        \n        let signTx = !AppDelegate.instance().godSend!.isColdWalletAccount()\n        let ret = AppDelegate.instance().godSend!.createSignedSerializedTransactionHex(toAddressesAndAmounts,\n                                                                                       feeAmount: TLSendFormData.instance().feeAmount!,\n                                                                                       signTx: signTx,\n                                                                                       error: {\n                                                                                        (data: String?) in\n                                                                                        self.cancelSend()\n                                                                                        TLPrompts.promptErrorMessage(TLDisplayStrings.ERROR_STRING(), message: data ?? \"\")\n        })\n        \n        let txHexAndTxHash = ret.0\n        self.realToAddresses = ret.1\n        \n        if txHexAndTxHash == nil {\n            cancelSend()\n            return\n        }\n        \n        let txHex = txHexAndTxHash!.object(forKey: \"txHex\") as? String\n        \n        if (txHex == nil) {\n            //should not reach here, because I check sum of unspent outputs already,\n            // unless unspent outputs contains dust and are require to filled the amount I want to send\n            cancelSend()\n            return\n        }\n        \n        if AppDelegate.instance().godSend!.isColdWalletAccount() {\n            cancelSend()\n            let txInputsAccountHDIdxes = ret.2\n            let inputScripts = txHexAndTxHash!.object(forKey: \"inputScripts\") as! NSArray\n            self.promptToSignTransaction(txHex!, inputScripts:inputScripts, txInputsAccountHDIdxes:txInputsAccountHDIdxes!)\n            return;\n        }\n        let txHash = txHexAndTxHash!.object(forKey: \"txHash\") as? String\n        prepAndBroadcastTx(txHex!, txHash: txHash!)\n    }\n\n    func prepAndBroadcastTx(_ txHex: String, txHash: String) {\n        if (TLSendFormData.instance().getAddress() == AppDelegate.instance().godSend!.getStealthAddress()) {\n            AppDelegate.instance().pendingSelfStealthPaymentTxid = txHash\n        }\n        \n        if AppDelegate.instance().godSend!.isPaymentToOwnAccount(TLSendFormData.instance().getAddress()!) {\n            self.amountMovedFromAccount = TLSendFormData.instance().feeAmount!\n        } else {\n            self.amountMovedFromAccount = TLSendFormData.instance().toAmount!.add(TLSendFormData.instance().feeAmount!)\n        }\n        \n        for address in self.realToAddresses! {\n            TLTransactionListener.instance().listenToIncomingTransactionForAddress(address)\n        }\n        \n        TLSendFormData.instance().beforeSendBalance = AppDelegate.instance().godSend!.getCurrentFromBalance()\n        self.sendTxHash = txHash\n        self.toAddress = TLSendFormData.instance().getAddress()\n        self.toAmount = TLSendFormData.instance().toAmount\n        DLog(\"showPromptReviewTx txHex: \\(txHex)\")\n        DLog(\"showPromptReviewTx txHash: \\(txHash)\")\n        broadcastTx(txHex, txHash: txHash, toAddress: TLSendFormData.instance().getAddress()!)\n    }\n    \n    func broadcastTx(_ txHex: String, txHash: String, toAddress: String) {\n        let handlePushTxSuccess = { () -> () in\n            NotificationCenter.default.post(name: Notification.Name(rawValue: TLNotificationEvents.EVENT_SEND_PAYMENT()),\n                                                                      object: nil, userInfo: nil)\n        }\n        \n        TLPushTxAPI.instance().sendTx(txHex, txHash: txHash, toAddress: toAddress, success: {\n            (jsonData) in\n            DLog(\"showPromptReviewTx pushTx: success \\(jsonData)\")\n            \n            if TLStealthAddress.isStealthAddress(toAddress, isTestnet:false) == true {\n                // doing stealth payment with push tx insight get wrong hash back??\n                let txid = (jsonData as! NSDictionary).object(forKey: \"txid\") as! String\n                DLog(\"showPromptReviewTx pushTx: success txid \\(txid)\")\n                DLog(\"showPromptReviewTx pushTx: success txHash \\(txHash)\")\n                if txid != txHash {\n                    NSException(name: NSExceptionName(rawValue: \"API Error\"), reason:\"txid return does not match txid in app\", userInfo:nil).raise()\n                }\n            }\n            \n            if let label = AppDelegate.instance().appWallet.getLabelForAddress(toAddress) {\n                AppDelegate.instance().appWallet.setTransactionTag(txHash, tag: label)\n            }\n            handlePushTxSuccess()\n            \n            }, failure: {\n                (code, status) in\n                DLog(\"showPromptReviewTx pushTx: failure \\(code) \\(status)\")\n                if (code == 200) {\n                    handlePushTxSuccess()\n                } else {\n                    TLPrompts.promptErrorMessage(TLDisplayStrings.ERROR_STRING(), message: status!)\n                    self.cancelSend()\n                }\n        })\n    }\n\n    func showNextUnsignedTxPartQRCode() {\n        if self.airGapDataBase64PartsArray == nil {\n            return\n        }\n        let nextAipGapDataPart = self.airGapDataBase64PartsArray![0]\n        self.airGapDataBase64PartsArray!.remove(at: 0)\n        self.QRImageModal = TLQRImageModal(data: nextAipGapDataPart as NSString, buttonCopyText: TLDisplayStrings.NEXT_STRING(), vc: self)\n        self.QRImageModal!.show()\n    }\n    \n    func promptToSignTransaction(_ unSignedTx: String, inputScripts:NSArray, txInputsAccountHDIdxes:NSArray) {\n        let extendedPublicKey = AppDelegate.instance().godSend!.getExtendedPubKey()\n        if let airGapDataBase64 = TLColdWallet.createSerializedUnsignedTxAipGapData(unSignedTx, extendedPublicKey: extendedPublicKey!, inputScripts: inputScripts, txInputsAccountHDIdxes: txInputsAccountHDIdxes) {\n            self.airGapDataBase64PartsArray = TLColdWallet.splitStringToArray(airGapDataBase64)\n            DLog(\"airGapDataBase64PartsArray \\(airGapDataBase64PartsArray)\")\n            TLPrompts.promtForOKCancel(self, title: TLDisplayStrings.SPENDING_FROM_A_COLD_WALLET_ACCOUNT_STRING(), message: TLDisplayStrings.SPENDING_FROM_A_COLD_WALLET_ACCOUNT_DESC_STRING(), success: {\n                () in\n                self.showNextUnsignedTxPartQRCode()\n                }, failure: {\n                    (isCancelled: Bool) in\n            })\n        }\n    }\n    \n    @IBAction func customizeFeeButtonClicked(_ sender: AnyObject) {\n        showPromptForSetTransactionFee()\n    }\n    \n    @IBAction func feeInfoButtonClicked(_ sender: AnyObject) {\n        TLPrompts.promptSuccessMessage(TLDisplayStrings.TRANSACTION_FEE_STRING(), message: TLDisplayStrings.FEE_INFO_DESC_STRING())\n    }\n    \n    @IBAction func sendButtonClicked(_ sender: AnyObject) {\n        self.startSendTimer()\n        if !AppDelegate.instance().godSend!.haveUpDatedUTXOs() {\n            AppDelegate.instance().godSend!.getAndSetUnspentOutputs({\n                self.initiateSend()\n                }, failure: {\n                    self.cancelSend()\n                    TLPrompts.promptErrorMessage(TLDisplayStrings.ERROR_STRING(), message: TLDisplayStrings.ERROR_FETCHING_UNSPENT_OUTPUTS_TRY_AGAIN_STRING())\n            })\n        } else {\n            self.initiateSend()\n        }\n    }\n\n    @IBAction fileprivate func cancel(_ sender:AnyObject) {\n        self.dismiss(animated: true, completion:nil)\n    }\n\n    func startSendTimer() {\n        TLHUDWrapper.showHUDAddedTo(self.view, labelText: TLDisplayStrings.SENDING_STRING(), animated: true)\n        // relying on websocket to know when a payment has been sent can be unreliable, so cancel after a certain time\n        let TIME_TO_WAIT_TO_HIDE_HUD_AND_REFRESH_ACCOUNT = 13.0\n        sendTimer = Timer.scheduledTimer(timeInterval: TIME_TO_WAIT_TO_HIDE_HUD_AND_REFRESH_ACCOUNT, target: self,\n                                         selector: #selector(retryFinishSend), userInfo: nil, repeats: false)\n    }\n\n    func promptToBroadcastColdWalletAccountSignedTx(_ txHex: String, txHash: String) {\n        TLPrompts.promptAlertController(self, title: TLDisplayStrings.SEND_AUTHORIZED_PAYMENT_STRING(),\n                                        message: \"\", okText: TLDisplayStrings.SEND_STRING(), cancelTx: TLDisplayStrings.CANCEL_STRING(), success: {\n                                            () in\n                                            self.startSendTimer()\n                                            self.prepAndBroadcastTx(txHex, txHash: txHash)\n            }, failure: {\n                (isCancelled: Bool) in\n        })\n    }\n\n    func didClickScanSignedTxButton() {\n        scanSignedTx(success: { () in\n            DLog(\"didClickScanSignedTxButton success\");\n            \n            if self.totalExpectedParts != 0 && self.scannedSignedTxAirGapDataPartsDict.count == self.totalExpectedParts {\n                self.shouldPromptToScanSignedTxAirGapData = false\n\n                self.scannedSignedTxAirGapData = \"\"\n                for i in stride(from: 1, through: self.totalExpectedParts, by: 1) {\n                    let dataPart = self.scannedSignedTxAirGapDataPartsDict[i]\n                    self.scannedSignedTxAirGapData = self.scannedSignedTxAirGapData! + dataPart!\n                }\n                self.scannedSignedTxAirGapDataPartsDict = [Int:String]()\n                DLog(\"didClickScanSignedTxButton self.scannedSignedTxAirGapData \\(self.scannedSignedTxAirGapData)\");\n\n                if let signedTxData = TLColdWallet.getSignedTxData(self.scannedSignedTxAirGapData!) {\n                    DLog(\"didClickScanSignedTxButton signedTxData \\(signedTxData)\");\n                    let txHex = signedTxData[\"txHex\"] as! String\n                    let txHash = signedTxData[\"txHash\"] as! String\n                    let txSize = signedTxData[\"txSize\"] as! NSNumber\n                    DLog(\"didClickScanSignedTxButton txHex \\(txHex)\");\n                    DLog(\"didClickScanSignedTxButton txHash \\(txHash)\");\n                    DLog(\"didClickScanSignedTxButton txSize \\(txSize)\");\n\n                    self.signedAirGapTxHex = txHex\n                    self.signedAirGapTxHash = txHash\n                    self.shouldPromptToBroadcastSignedTx = true\n                }\n            } else {\n                self.shouldPromptToScanSignedTxAirGapData = true\n            }\n            \n            }, error: {\n                () in\n                DLog(\"didClickScanSignedTxButton error\");\n        })\n    }\n    \n    func scanSignedTx(success: @escaping (TLWalletUtils.Success), error: @escaping (TLWalletUtils.Error)) {\n        AppDelegate.instance().showColdWalletSpendReaderControllerFromViewController(self, success: {\n            (data: String!) in\n            let ret = TLColdWallet.parseScannedPart(data)\n            let dataPart = ret.0\n            let partNumber = ret.1\n            let totalParts = ret.2\n\n            self.totalExpectedParts = totalParts\n            self.scannedSignedTxAirGapDataPartsDict[partNumber] = dataPart\n\n            DLog(\"scanSignedTx \\(dataPart) \\(partNumber) \\(totalParts)\");\n            success()\n            }, error: {\n                (data: String?) in\n                error()\n        })\n    }\n\n    func promptToScanSignedTxAirGapData() {\n        let msg = String(format: TLDisplayStrings.X_SLASH_Y_PARTS_SCANNED_STRING(), self.scannedSignedTxAirGapDataPartsDict.count, self.totalExpectedParts)\n        TLPrompts.promptAlertController(self, title: TLDisplayStrings.SCAN_NEXT_PART_STRING(), message: msg,\n                                        okText: TLDisplayStrings.SCAN_STRING(), cancelTx: TLDisplayStrings.CANCEL_STRING(), success: { () in\n                                            self.didClickScanSignedTxButton()\n            }, failure: {\n                (isCancelled: Bool) in\n        })\n    }\n\n    func customIOS7dialogButtonTouchUp(inside alertView: CustomIOS7AlertView, clickedButtonAt buttonIndex: Int) {\n        if (buttonIndex == 0) {\n            if self.airGapDataBase64PartsArray?.count > 0 {\n                self.showNextUnsignedTxPartQRCode()\n            } else {\n                TLPrompts.promptAlertController(self, title: TLDisplayStrings.FINISHED_PASSING_TRANSACTION_DATA_STRING(),\n                                                message: TLDisplayStrings.FINISHED_PASSING_TRANSACTION_DATA_DESC_STRING(),\n                                                okText: TLDisplayStrings.CONTINUE_STRING(), cancelTx: TLDisplayStrings.CANCEL_STRING(), success: {\n                                                    () in\n                                                    self.didClickScanSignedTxButton()\n                    }, failure: {\n                        (isCancelled: Bool) in\n                })\n            }\n        }\n        \n        alertView.close()\n    }\n}\n"
  },
  {
    "path": "ArcBit/viewControllers/TLSendViewController.swift",
    "content": "//\n//  TLSendViewController.swift\n//  ArcBit\n//\n//  Created by Timothy Lee on 3/14/15.\n//  Copyright (c) 2015 Timothy Lee <stequald01@gmail.com>\n//\n//   This library is free software; you can redistribute it and/or\n//   modify it under the terms of the GNU Lesser General Public\n//   License as published by the Free Software Foundation; either\n//   version 2.1 of the License, or (at your option) any later version.\n//\n//   This library is distributed in the hope that it will be useful,\n//   but WITHOUT ANY WARRANTY; without even the implied warranty of\n//   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n//   Lesser General Public License for more details.\n//\n//   You should have received a copy of the GNU Lesser General Public\n//   License along with this library; if not, write to the Free Software\n//   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,\n//   MA 02110-1301  USA\n\nimport UIKit\nimport StoreKit\n\n@objc(TLSendViewController) class TLSendViewController: UIViewController, UITextFieldDelegate, UITabBarDelegate {\n    \n    required init?(coder aDecoder: NSCoder) {\n        super.init(coder: aDecoder)\n    }\n    \n    @IBOutlet fileprivate var currencySymbolButton: UIButton?\n    @IBOutlet fileprivate var toAddressTextField: UITextField?\n    @IBOutlet fileprivate var amountTextField: UITextField?\n    @IBOutlet fileprivate var qrCodeImageView: UIImageView?\n    @IBOutlet fileprivate var selectAccountImageView: UIImageView?\n    @IBOutlet fileprivate var bitcoinDisplayLabel: UILabel?\n    @IBOutlet fileprivate var fiatCurrencyDisplayLabel: UILabel?\n    @IBOutlet fileprivate var scanQRButton: UIButton?\n    @IBOutlet fileprivate var reviewPaymentButton: UIButton?\n    @IBOutlet fileprivate var addressBookButton: UIButton?\n    @IBOutlet fileprivate var fiatAmountTextField: UITextField?\n    @IBOutlet fileprivate var topView: UIView?\n    @IBOutlet fileprivate var bottomView: UIView?\n    @IBOutlet fileprivate var accountNameLabel: UILabel?\n    @IBOutlet fileprivate var accountBalanceLabel: UILabel?\n    @IBOutlet fileprivate var balanceActivityIndicatorView: UIActivityIndicatorView?\n    @IBOutlet fileprivate var fromViewContainer: UIView?\n    @IBOutlet fileprivate var fromLabel: UILabel!\n    @IBOutlet fileprivate var toLabel: UILabel!\n    @IBOutlet fileprivate var amountLabel: UILabel!\n\n    @IBOutlet fileprivate var tabBar: UITabBar?\n    fileprivate var tapGesture: UITapGestureRecognizer?\n\n    fileprivate func setAmountFromUrlHandler() -> () {\n        let dict = AppDelegate.instance().bitcoinURIOptionsDict\n        if (dict != nil) {\n            let addr = dict!.object(forKey: \"address\") as! String\n            let amount = dict!.object(forKey: \"amount\") as! String\n            \n            self.setAmountFromUrlHandler(TLCurrencyFormat.bitcoinAmountStringToCoin(amount), address: addr)\n            AppDelegate.instance().bitcoinURIOptionsDict = nil\n        }\n    }\n    \n    fileprivate func setAmountFromUrlHandler(_ amount: TLCoin, address: String) {\n        self.toAddressTextField!.text = address\n        let amountString = TLCurrencyFormat.coinToProperBitcoinAmountString(amount)\n        self.amountTextField!.text = amountString\n        \n        TLSendFormData.instance().setAddress(address)\n        TLSendFormData.instance().setAmount(amountString)\n        \n        self.updateFiatAmountTextFieldExchangeRate(nil)\n    }\n    \n    fileprivate func setAllCoinsBarButton() {\n        let allBarButtonItem = UIBarButtonItem(title: TLDisplayStrings.USE_ALL_FUNDS_STRING(), style: UIBarButtonItemStyle.plain, target: self, action: #selector(TLSendViewController.checkToFetchUTXOsAndDynamicFeesAndFillAmountFieldWithWholeBalance))\n        navigationItem.rightBarButtonItem = allBarButtonItem\n    }\n    \n    fileprivate func clearRightBarButton() {\n        let allBarButtonItem = UIBarButtonItem(title: \"\", style: UIBarButtonItemStyle.plain, target: self, action: nil)\n        navigationItem.rightBarButtonItem = allBarButtonItem\n    }\n    \n    func checkToFetchUTXOsAndDynamicFeesAndFillAmountFieldWithWholeBalance() {\n        if TLPreferences.enabledInAppSettingsKitDynamicFee() {\n            if !AppDelegate.instance().godSend!.haveUpDatedUTXOs() {\n                AppDelegate.instance().godSend!.getAndSetUnspentOutputs({\n                    self.checkToFetchDynamicFeesAndFillAmountFieldWithWholeBalance()\n                    }, failure: {\n                        TLPrompts.promptErrorMessage(TLDisplayStrings.ERROR_STRING(), message: TLDisplayStrings.ERROR_FETCHING_UNSPENT_OUTPUTS_TRY_AGAIN_LATER_STRING())\n                })\n            } else {\n                self.checkToFetchDynamicFeesAndFillAmountFieldWithWholeBalance()\n            }\n        } else {\n            self.fillAmountFieldWithWholeBalance(false)\n        }\n    }\n\n    func checkToFetchDynamicFeesAndFillAmountFieldWithWholeBalance() {\n        if !AppDelegate.instance().txFeeAPI.haveUpdatedCachedDynamicFees() {\n            AppDelegate.instance().txFeeAPI.getDynamicTxFee({\n                (_jsonData) in\n                self.fillAmountFieldWithWholeBalance(true)\n                }, failure: {\n                    (code, status) in\n                    TLPrompts.promptErrorMessage(TLDisplayStrings.ERROR_STRING(), message: TLDisplayStrings.UNABLE_TO_GET_DYNAMIC_FEES_STRING())\n                    self.fillAmountFieldWithWholeBalance(false)\n            })\n        } else {\n            self.fillAmountFieldWithWholeBalance(true)\n        }\n    }\n\n    \n    func fillAmountFieldWithWholeBalance(_ useDynamicFees: Bool) {\n        let fee:TLCoin\n        let txSizeBytes:UInt64\n        if useDynamicFees {\n            if (AppDelegate.instance().godSend!.getSelectedObjectType() == .account) {\n                let accountObject = AppDelegate.instance().godSend!.getSelectedSendObject() as! TLAccountObject\n                let inputCount = accountObject.stealthPaymentUnspentOutputsCount + accountObject.unspentOutputsCount\n                txSizeBytes = TLSpaghettiGodSend.getEstimatedTxSize(inputCount, outputCount: 1)\n                DLog(\"fillAmountFieldWithWholeBalance TLAccountObject useDynamicFees inputCount txSizeBytes: \\(inputCount) \\(txSizeBytes)\")\n            } else {\n                let importedAddress = AppDelegate.instance().godSend!.getSelectedSendObject() as! TLImportedAddress\n                txSizeBytes = TLSpaghettiGodSend.getEstimatedTxSize(importedAddress.unspentOutputsCount, outputCount: 1)\n                DLog(\"fillAmountFieldWithWholeBalance importedAddress useDynamicFees inputCount txSizeBytes: \\(importedAddress.unspentOutputsCount) \\(txSizeBytes)\")\n            }\n            \n            if let dynamicFeeSatoshis:NSNumber? = AppDelegate.instance().txFeeAPI.getCachedDynamicFee() {\n                fee = TLCoin(uint64: txSizeBytes*dynamicFeeSatoshis!.uint64Value)\n                DLog(\"fillAmountFieldWithWholeBalance coinFeeAmount dynamicFeeSatoshis: \\(txSizeBytes*dynamicFeeSatoshis!.uint64Value)\")\n            } else {\n                fee = TLCurrencyFormat.bitcoinAmountStringToCoin(TLPreferences.getInAppSettingsKitTransactionFee()!)\n            }\n            \n        } else {\n            let feeAmount = TLPreferences.getInAppSettingsKitTransactionFee()\n            fee = TLCurrencyFormat.bitcoinAmountStringToCoin(feeAmount!)\n        }\n\n        let accountBalance = AppDelegate.instance().godSend!.getCurrentFromBalance()\n        let sendAmount = accountBalance.subtract(fee)\n        DLog(\"fillAmountFieldWithWholeBalance accountBalance: \\(accountBalance.toUInt64())\")\n        DLog(\"fillAmountFieldWithWholeBalance sendAmount: \\(sendAmount.toUInt64())\")\n        DLog(\"fillAmountFieldWithWholeBalance fee: \\(fee.toUInt64())\")\n        TLSendFormData.instance().feeAmount = fee\n        TLSendFormData.instance().useAllFunds = true\n        if accountBalance.greater(fee) && sendAmount.greater(TLCoin.zero()) {\n            TLSendFormData.instance().setAmount(TLCurrencyFormat.coinToProperBitcoinAmountString(sendAmount))\n        } else {\n            TLSendFormData.instance().setAmount(nil)\n        }\n        TLSendFormData.instance().setFiatAmount(nil)\n        self.updateSendForm()\n    }\n    \n    func setupLabels() {\n        let sendTabBarItem = self.tabBar?.items?[0]\n        sendTabBarItem?.title = TLDisplayStrings.SEND_STRING()\n        let receiveTabBarItem = self.tabBar?.items?[1]\n        receiveTabBarItem?.title = TLDisplayStrings.RECEIVE_STRING()\n        self.toAddressTextField?.placeholder = TLDisplayStrings.ADDRESS_STRING()\n\n        self.toLabel.text = TLDisplayStrings.TO_COLON_STRING()\n        self.fromLabel.text = TLDisplayStrings.FROM_COLON_STRING()\n        self.amountLabel.text = TLDisplayStrings.AMOUNT_COLON_STRING()\n        self.scanQRButton?.setTitle(TLDisplayStrings.SCAN_QR_STRING(), for: .normal)\n        self.addressBookButton?.setTitle(TLDisplayStrings.CONTACTS_STRING(), for: .normal)\n        self.reviewPaymentButton?.setTitle(TLDisplayStrings.REVIEW_PAYMENT_STRING(), for: .normal)\n    }\n    \n    override func viewDidLoad() {\n        super.viewDidLoad()\n        setColors()\n        \n        self.setLogoImageView()\n        self.setupLabels()\n        \n        self.bottomView!.backgroundColor = TLColors.mainAppColor()\n        \n        self.fromViewContainer!.backgroundColor = TLColors.mainAppColor()\n        self.accountNameLabel!.textColor = TLColors.mainAppOppositeColor()\n        self.accountBalanceLabel!.textColor = TLColors.mainAppOppositeColor()\n        self.balanceActivityIndicatorView!.color = TLColors.mainAppOppositeColor()\n        \n        self.scanQRButton!.backgroundColor = TLColors.mainAppColor()\n        self.reviewPaymentButton!.backgroundColor = TLColors.mainAppColor()\n        self.addressBookButton!.backgroundColor = TLColors.mainAppColor()\n        self.scanQRButton!.setTitleColor(TLColors.mainAppOppositeColor(), for: UIControlState())\n        self.reviewPaymentButton!.setTitleColor(TLColors.mainAppOppositeColor(), for: UIControlState())\n        self.addressBookButton!.setTitleColor(TLColors.mainAppOppositeColor(), for: UIControlState())\n        \n        if TLUtils.isIPhone5() || TLUtils.isIPhone4() {\n            let keyboardDoneButtonView = UIToolbar()\n            keyboardDoneButtonView.sizeToFit()\n            let item = UIBarButtonItem(title: TLDisplayStrings.DONE_STRING(), style: UIBarButtonItemStyle.plain, target: self, action: #selector(TLSendViewController.dismissKeyboard) )\n            let toolbarButtons = [item]\n            keyboardDoneButtonView.setItems(toolbarButtons, animated: false)\n            self.amountTextField!.inputAccessoryView = keyboardDoneButtonView\n            self.fiatAmountTextField!.inputAccessoryView = keyboardDoneButtonView\n        }\n\n        NotificationCenter.default.post(name: Notification.Name(rawValue: TLNotificationEvents.EVENT_SEND_SCREEN_LOADING()),\n            object: nil)\n        \n\n        self.tabBar!.selectedItem = ((self.tabBar!.items as NSArray!).object(at: 0)) as? UITabBarItem\n        if UIScreen.main.bounds.size.height <= 480.0 { // is 3.5 inch screen\n            self.tabBar!.isHidden = true\n        }\n        \n        \n        NotificationCenter.default.addObserver(self\n            ,selector:#selector(TLSendViewController.dismissTextFieldsAndScrollDown(_:)),\n            name:NSNotification.Name(rawValue: TLNotificationEvents.EVENT_HAMBURGER_MENU_OPENED()), object:nil)\n        NotificationCenter.default.addObserver(self\n            ,selector:#selector(TLSendViewController.clearSendForm(_:)),\n            name:NSNotification.Name(rawValue: TLNotificationEvents.EVENT_PREFERENCES_FIAT_DISPLAY_CHANGED()), object:nil)\n        NotificationCenter.default.addObserver(self\n            ,selector:#selector(TLSendViewController.clearSendForm(_:)),\n            name:NSNotification.Name(rawValue: TLNotificationEvents.EVENT_PREFERENCES_BITCOIN_DISPLAY_CHANGED()), object:nil)\n        NotificationCenter.default.addObserver(self\n            ,selector:#selector(TLSendViewController.updateCurrencyView(_:)),\n            name:NSNotification.Name(rawValue: TLNotificationEvents.EVENT_PREFERENCES_FIAT_DISPLAY_CHANGED()), object:nil)\n        NotificationCenter.default.addObserver(self\n            ,selector:#selector(TLSendViewController.updateBitcoinDisplayView(_:)),\n            name:NSNotification.Name(rawValue: TLNotificationEvents.EVENT_PREFERENCES_BITCOIN_DISPLAY_CHANGED()), object:nil)\n        NotificationCenter.default.addObserver(self\n            ,selector:#selector(TLSendViewController.updateAccountBalanceView(_:)),\n            name:NSNotification.Name(rawValue: TLNotificationEvents.EVENT_PREFERENCES_FIAT_DISPLAY_CHANGED()), object:nil)\n        NotificationCenter.default.addObserver(self\n            ,selector:#selector(TLSendViewController.updateAccountBalanceView(_:)),\n            name:NSNotification.Name(rawValue: TLNotificationEvents.EVENT_PREFERENCES_BITCOIN_DISPLAY_CHANGED()), object:nil)\n        NotificationCenter.default.addObserver(self\n            ,selector:#selector(TLSendViewController.updateAccountBalanceView(_:)),\n            name:NSNotification.Name(rawValue: TLNotificationEvents.EVENT_DISPLAY_LOCAL_CURRENCY_TOGGLED()), object:nil)\n        NotificationCenter.default.addObserver(self\n            ,selector:#selector(TLSendViewController.updateAccountBalanceView(_:)),\n            name:NSNotification.Name(rawValue: TLNotificationEvents.EVENT_FETCHED_ADDRESSES_DATA()), object:nil)\n        NotificationCenter.default.addObserver(self\n            ,selector:#selector(TLSendViewController.hideHUDAndUpdateBalanceView),\n            name:NSNotification.Name(rawValue: TLNotificationEvents.EVENT_MODEL_UPDATED_NEW_UNCONFIRMED_TRANSACTION()), object:nil)\n        NotificationCenter.default.addObserver(self\n            ,selector:#selector(TLSendViewController.clearSendForm(_:)),\n             name:NSNotification.Name(rawValue: TLNotificationEvents.EVENT_SEND_PAYMENT()), object:nil)\n        NotificationCenter.default.addObserver(self\n            ,selector:#selector(TLSendViewController.updateAccountBalanceView(_:)),\n             name:NSNotification.Name(rawValue: TLNotificationEvents.EVENT_EXCHANGE_RATE_UPDATED()), object:nil)\n\n        \n        self.updateSendForm()\n        \n        self.amountTextField!.keyboardType = .decimalPad\n        self.amountTextField!.delegate = self\n        self.fiatAmountTextField!.keyboardType = .decimalPad\n        self.fiatAmountTextField!.delegate = self\n        \n        self.toAddressTextField!.delegate = self\n        self.toAddressTextField!.clearButtonMode = UITextFieldViewMode.whileEditing\n        \n        self.currencySymbolButton?.setBackgroundImage(UIImage(named: \"balance_bg_pressed.9.png\"), for: .highlighted)\n        self.currencySymbolButton?.setBackgroundImage(UIImage(named: \"balance_bg_normal.9.png\"), for: UIControlState())\n        \n        self.sendViewSetup()\n        \n        if self.slidingViewController() != nil {\n            self.slidingViewController().topViewAnchoredGesture = [.tapping, .panning]\n        }\n    }\n    \n    override func viewWillDisappear(_ animated: Bool) {\n        self.topView!.scrollToY(0)\n    }\n    \n    fileprivate func sendViewSetup() -> () {\n        self._updateCurrencyView()\n        self._updateBitcoinDisplayView()\n        \n        self.updateViewToNewSelectedObject()\n        \n        if (AppDelegate.instance().godSend!.hasFetchedCurrentFromData()) {\n            let balance = AppDelegate.instance().godSend!.getCurrentFromBalance()\n            let balanceString = TLCurrencyFormat.getProperAmount(balance)\n            self.accountBalanceLabel!.text = balanceString as String\n            self.accountBalanceLabel!.isHidden = false\n            self.balanceActivityIndicatorView!.stopAnimating()\n            self.balanceActivityIndicatorView!.isHidden = true\n        } else {\n            self.refreshAccountDataAndSetBalanceView()\n        }\n        if (AppDelegate.instance().justSetupHDWallet) {\n            self.showReceiveView()\n        }\n    }\n    \n    func refreshAccountDataAndSetBalanceView(_ fetchDataAgain: Bool = false) -> () {\n        if (AppDelegate.instance().godSend!.getSelectedObjectType() == .account) {\n            let accountObject = AppDelegate.instance().godSend!.getSelectedSendObject() as! TLAccountObject\n            self.balanceActivityIndicatorView!.isHidden = false\n            self.accountBalanceLabel!.isHidden = true\n            self.balanceActivityIndicatorView!.startAnimating()\n            AppDelegate.instance().pendingOperations.addSetUpAccountOperation(accountObject, fetchDataAgain: fetchDataAgain, success: {\n                if accountObject.downloadState == .downloaded {\n                    self.accountBalanceLabel!.isHidden = false\n                    self.balanceActivityIndicatorView!.stopAnimating()\n                    self.balanceActivityIndicatorView!.isHidden = true\n                    self._updateAccountBalanceView()\n                }\n            })\n            \n        } else if (AppDelegate.instance().godSend!.getSelectedObjectType() == .address) {\n            let importedAddress = AppDelegate.instance().godSend!.getSelectedSendObject() as! TLImportedAddress\n            self.balanceActivityIndicatorView!.isHidden = false\n            self.accountBalanceLabel!.isHidden = true\n            self.balanceActivityIndicatorView!.startAnimating()\n            AppDelegate.instance().pendingOperations.addSetUpImportedAddressOperation(importedAddress, fetchDataAgain: fetchDataAgain, success: {\n                if importedAddress.downloadState == .downloaded {\n                    self.accountBalanceLabel!.isHidden = false\n                    self.balanceActivityIndicatorView!.stopAnimating()\n                    self.balanceActivityIndicatorView!.isHidden = true\n                    self._updateAccountBalanceView()\n                }\n            })\n        }\n    }\n    \n    fileprivate func showReceiveView() -> () {\n        self.slidingViewController().topViewController = self.storyboard!.instantiateViewController(withIdentifier: \"ReceiveNav\") \n    }\n    \n    fileprivate func updateViewToNewSelectedObject() -> () {\n        let label = AppDelegate.instance().godSend!.getCurrentFromLabel()\n        self.accountNameLabel!.text = label\n        self._updateAccountBalanceView()\n    }\n    \n    override func viewWillAppear(_ animated: Bool) {\n        self.updateViewToNewSelectedObject()\n    \n        // TODO: better way\n        if AppDelegate.instance().scannedEncryptedPrivateKey != nil {\n            TLPrompts.promptForEncryptedPrivKeyPassword(self, view:self.slidingViewController().topViewController.view,\n                encryptedPrivKey:AppDelegate.instance().scannedEncryptedPrivateKey!,\n                success:{(privKey: String!) in\n                    if AppDelegate.instance().scannedEncryptedPrivateKey == nil {\n                        return\n                    }\n\n                    if (!TLCoreBitcoinWrapper.isValidPrivateKey(privKey, isTestnet: AppDelegate.instance().appWallet.walletConfig.isTestnet)) {\n                        TLPrompts.promptErrorMessage(TLDisplayStrings.ERROR_STRING(), message: TLDisplayStrings.INVALID_PRIVATE_KEY_STRING())\n                    } else {\n                        let importedAddress = AppDelegate.instance().godSend!.getSelectedSendObject() as! TLImportedAddress?\n                        let success = importedAddress!.setPrivateKeyInMemory(privKey)\n                        if (!success) {\n                            TLPrompts.promptSuccessMessage(TLDisplayStrings.ERROR_STRING(), message: TLDisplayStrings.PRIVATE_KEY_DOES_NOT_MATCH_ADDRESS_STRING())\n                        } else {\n                            self._reviewPaymentClicked()\n                        }\n                        AppDelegate.instance().scannedEncryptedPrivateKey = nil\n                    }\n                }, failure:{(isCanceled: Bool) in\n                    AppDelegate.instance().scannedEncryptedPrivateKey = nil\n            })\n        }\n    }\n    \n    override func viewDidAppear(_ animated: Bool) {\n        NotificationCenter.default.post(name: Notification.Name(rawValue: TLNotificationEvents.EVENT_VIEW_SEND_SCREEN()),\n            object: nil, userInfo: nil)\n        \n        self.setAmountFromUrlHandler()\n        \n        if (!TLPreferences.getInAppSettingsKitEnablePinCode() && TLSuggestions.instance().conditionToPromptToSuggestEnablePinSatisfied()) {\n            TLSuggestions.instance().promptToSuggestEnablePin(self)\n        } else if TLSuggestions.instance().conditionToPromptRateAppSatisfied() {\n            if  #available(iOS 10.3, *) {\n                SKStoreReviewController.requestReview()\n            } else {\n                TLPrompts.promptAlertController(self, title: TLDisplayStrings.LIKE_USING_ARCBIT_STRING(),\n                                                message: TLDisplayStrings.RATE_US_IN_THE_APP_STORE_STRING(), okText: TLDisplayStrings.RATE_STRING(), cancelTx: TLDisplayStrings.NOT_NOW_STRING(),\n                                                success: { () -> () in\n                                                    let url = URL(string: \"https://itunes.apple.com/app/id999487888\");\n                                                    if (UIApplication.shared.canOpenURL(url!)) {\n                                                        UIApplication.shared.openURL(url!);\n                                                    }\n                                                    TLPreferences.setDisabledPromptRateApp(true)\n                                                    if !TLPreferences.hasRatedOnce() {\n                                                        TLPreferences.setHasRatedOnce()\n                                                    }\n                }, failure: { (Bool) -> () in\n                })\n            }\n        } else if TLSuggestions.instance().conditionToPromptShowWebWallet() {\n            TLPrompts.promptAlertController(self, title: TLDisplayStrings.CHECK_OUT_THE_ARCBIT_WEB_WALLET_EXCLAMATION_STRING(),\n                message: TLDisplayStrings.CHECK_OUT_THE_ARCBIT_WEB_WALLET_DESC_STRING(), okText: TLDisplayStrings.GO_STRING(), cancelTx: TLDisplayStrings.NOT_NOW_STRING(),\n                success: { () -> () in\n                    let url = URL(string: \"https://chrome.google.com/webstore/detail/arcbit-bitcoin-wallet/dkceiphcnbfahjbomhpdgjmphnpgogfk\");\n                    if (UIApplication.shared.canOpenURL(url!)) {\n                        UIApplication.shared.openURL(url!);\n                    }\n                    TLPreferences.setDisabledPromptShowWebWallet(true)\n                }, failure: { (Bool) -> () in\n            })\n        } else if TLSuggestions.instance().conditionToPromptTryColdWallet() {\n            TLPreferences.setEnableColdWallet(true)\n            TLPreferences.setEnableInAppSettingsKitColdWallet(true)\n               let msg = TLDisplayStrings.TRY_OUR_NEW_COLD_WALLET_FEATURE_DESC_STRING()\n            TLPrompts.promtForOK(self, title:TLDisplayStrings.TRY_OUR_NEW_COLD_WALLET_FEATURE_STRING(), message:msg, success: {\n                () in\n                TLPreferences.setDisabledPromptShowTryColdWallet(true)\n            })\n        } else if let balance = AppDelegate.instance().receiveSelectedObject!.getBalanceForSelectedObject(), balance.greater(TLCoin.zero()) && !TLPreferences.hasShownBackupPassphrase() {\n            self.showPromptThenPassphraseViewController()\n        }\n        if TLPreferences.getEnableBackupWithiCloud() {\n            TLPreferences.setEnableBackupWithiCloud(false)\n            TLPreferences.setInAppSettingsKitEnableBackupWithiCloud(false)\n            TLPrompts.promptWithOneButton(self, title: TLDisplayStrings.ICLOUD_SUPPORT_DISCONTINUED(), message: TLDisplayStrings.ICLOUD_SUPPORT_DISCONTINUED_DESCRIPTION(), buttonText: TLDisplayStrings.I_UNDERSTAND(), success: {\n            })\n        }\n        self.navigationController!.view.addGestureRecognizer(self.slidingViewController().panGesture)\n    }\n    \n    func showPromptThenPassphraseViewController() {\n        TLPrompts.promptWithOneButton(self, title: TLDisplayStrings.WALLET_BACKUP_PASSPHRASE_WILL_BE_SHOWN(), message: TLDisplayStrings.PLEASE_WRITE_DOWN_OR_MEMORIZE_YOUR_WALLET_BACKUP_PASSPHRASE(), buttonText: TLDisplayStrings.I_UNDERSTAND(), success: {\n            let vc = self.storyboard!.instantiateViewController(withIdentifier: \"Passphrase\")\n            self.slidingViewController().present(vc, animated: true, completion: nil)\n        })\n    }\n    \n    func _clearSendForm() {\n        TLSendFormData.instance().setAddress(nil)\n        TLSendFormData.instance().setAmount(nil)\n        self.updateSendForm()\n    }\n    \n    func clearSendForm(_ notification: Notification) {\n        _clearSendForm()\n    }\n    \n    fileprivate func updateSendForm() {\n        self.toAddressTextField!.text = TLSendFormData.instance().getAddress()\n        \n        if (TLSendFormData.instance().getAmount() != nil) {\n            self.amountTextField!.text = TLSendFormData.instance().getAmount()!\n            self.updateFiatAmountTextFieldExchangeRate(nil)\n        } else if (TLSendFormData.instance().getFiatAmount() != nil) {\n            self.fiatAmountTextField!.text = TLSendFormData.instance().getFiatAmount()!\n            self.updateAmountTextFieldExchangeRate(nil)\n        } else {\n            self.amountTextField!.text = nil\n            self.fiatAmountTextField!.text = nil\n        }\n    }\n    \n    func _updateCurrencyView() {\n        let currency = TLCurrencyFormat.getFiatCurrency()\n        self.fiatCurrencyDisplayLabel!.text = currency\n        \n        self.updateSendForm()\n        \n        self.updateAmountTextFieldExchangeRate(nil)\n    }\n    \n    func updateCurrencyView(_ notification: Notification) {\n        _updateCurrencyView()\n    }\n    \n    func _updateBitcoinDisplayView() {\n        let bitcoinDisplay = TLCurrencyFormat.getBitcoinDisplay()\n        self.bitcoinDisplayLabel!.text = bitcoinDisplay\n        \n        self.updateSendForm()\n        \n        self.updateFiatAmountTextFieldExchangeRate(nil)\n    }\n    \n    func updateBitcoinDisplayView(_ notification: Notification) {\n        _updateBitcoinDisplayView()\n    }\n    \n    func dismissKeyboard() {\n        self.amountTextField!.resignFirstResponder()\n        self.fiatAmountTextField!.resignFirstResponder()\n        self.toAddressTextField!.resignFirstResponder()\n        if self.tapGesture != nil {\n            self.view.removeGestureRecognizer(self.tapGesture!)\n            self.tapGesture = nil\n        }\n        self.topView!.scrollToY(0)\n    }\n    \n    func hideHUDAndUpdateBalanceView() {\n        self.accountBalanceLabel!.isHidden = false\n        self.balanceActivityIndicatorView!.stopAnimating()\n        self.balanceActivityIndicatorView!.isHidden = true\n        self._updateAccountBalanceView()\n    }\n    \n    func _updateAccountBalanceView() {\n        let balance = AppDelegate.instance().godSend!.getCurrentFromBalance()\n        let balanceString = TLCurrencyFormat.getProperAmount(balance)\n        self.accountBalanceLabel!.text = balanceString as String\n    }\n    \n    func updateAccountBalanceView(_ notification: Notification) {\n        self._updateAccountBalanceView()\n    }\n    \n    func onAccountSelected(_ note: Notification) {\n        NotificationCenter.default.removeObserver(self, name: NSNotification.Name(rawValue: TLNotificationEvents.EVENT_ACCOUNT_SELECTED()),\n            object: nil)\n        \n        let selectedDict = note.object as! NSDictionary\n        let sendFromType = TLSendFromType(rawValue: selectedDict.object(forKey: \"sendFromType\") as! Int)\n        let sendFromIndex = selectedDict.object(forKey: \"sendFromIndex\") as! Int\n        AppDelegate.instance().updateGodSend(sendFromType!, sendFromIndex: sendFromIndex)\n        \n        self.updateViewToNewSelectedObject()\n    }\n    \n    fileprivate func fillToAddressTextField(_ address: String) -> Bool {\n        if (TLCoreBitcoinWrapper.isValidAddress(address, isTestnet: AppDelegate.instance().appWallet.walletConfig.isTestnet)) {\n            self.toAddressTextField!.text = address\n            TLSendFormData.instance().setAddress(address)\n            return true\n        } else {\n            let av = UIAlertView(title: TLDisplayStrings.INVALID_ADDRESS_STRING(),\n                message: \"\",\n                delegate: nil,\n                cancelButtonTitle: TLDisplayStrings.OK_STRING()\n            )\n            \n            av.show()\n            return false\n        }\n    }\n    \n    fileprivate func checkTofetchFeeThenFinalPromptReviewTx() {\n        if TLPreferences.enabledInAppSettingsKitDynamicFee() && !AppDelegate.instance().txFeeAPI.haveUpdatedCachedDynamicFees() {\n            AppDelegate.instance().txFeeAPI.getDynamicTxFee({\n                (_jsonData) in\n                self.showFinalPromptReviewTx()\n                }, failure: {\n                    (code, status) in\n                    self.showFinalPromptReviewTx()\n            })\n        } else {\n            self.showFinalPromptReviewTx()\n        }\n    }\n\n    fileprivate func showFinalPromptReviewTx() {\n        let bitcoinAmount = self.amountTextField!.text\n        let toAddress = self.toAddressTextField!.text\n    \n        if (!TLCoreBitcoinWrapper.isValidAddress(toAddress!, isTestnet: AppDelegate.instance().appWallet.walletConfig.isTestnet)) {\n            TLPrompts.promptErrorMessage(TLDisplayStrings.ERROR_STRING(), message: TLDisplayStrings.INVALID_ADDRESS_STRING())\n            return\n        }\n\n        DLog(\"showFinalPromptReviewTx bitcoinAmount \\(bitcoinAmount!)\")\n        let inputtedAmount = TLCurrencyFormat.properBitcoinAmountStringToCoin(bitcoinAmount!)\n        \n        if (inputtedAmount.equalTo(TLCoin.zero())) {\n            TLPrompts.promptErrorMessage(TLDisplayStrings.ERROR_STRING(), message: TLDisplayStrings.INVALID_AMOUNT_STRING())\n            return\n        }\n        \n\n        func showReviewPaymentViewController(_ useDynamicFees: Bool) {\n            let fee:TLCoin\n            let txSizeBytes:UInt64\n            if useDynamicFees {\n                if TLSendFormData.instance().useAllFunds {\n                    fee = TLSendFormData.instance().feeAmount!\n                } else {\n                    if (AppDelegate.instance().godSend!.getSelectedObjectType() == .account) {\n                        let accountObject = AppDelegate.instance().godSend!.getSelectedSendObject() as! TLAccountObject\n                        let inputCount = accountObject.getInputsNeededToConsume(inputtedAmount)\n                        //TODO account for change output, output count likely 2 (3 if have stealth payment) cause if user dont do click use all funds because will likely have change\n                        // but for now dont need to be fully accurate with tx fee, for now we will underestimate tx fee, wont underestimate much because outputs contributes little to tx size\n                        txSizeBytes = TLSpaghettiGodSend.getEstimatedTxSize(inputCount, outputCount: 1)\n                        DLog(\"showPromptReviewTx TLAccountObject useDynamicFees inputCount txSizeBytes: \\(inputCount) \\(txSizeBytes)\")\n                    } else {\n                        let importedAddress = AppDelegate.instance().godSend!.getSelectedSendObject() as! TLImportedAddress\n                        // TODO same as above\n                        let inputCount = importedAddress.getInputsNeededToConsume(inputtedAmount)\n                        txSizeBytes = TLSpaghettiGodSend.getEstimatedTxSize(inputCount, outputCount: 1)\n                        DLog(\"showPromptReviewTx importedAddress useDynamicFees inputCount txSizeBytes: \\(importedAddress.unspentOutputsCount) \\(txSizeBytes)\")\n                    }\n                    \n                    if let dynamicFeeSatoshis:NSNumber? = AppDelegate.instance().txFeeAPI.getCachedDynamicFee() {\n                        fee = TLCoin(uint64: txSizeBytes*dynamicFeeSatoshis!.uint64Value)\n                        DLog(\"showPromptReviewTx coinFeeAmount dynamicFeeSatoshis: \\(txSizeBytes*dynamicFeeSatoshis!.uint64Value)\")\n                        \n                    } else {\n                        fee = TLCurrencyFormat.bitcoinAmountStringToCoin(TLPreferences.getInAppSettingsKitTransactionFee()!)\n                    }\n                    TLSendFormData.instance().feeAmount = fee\n                }\n            } else {\n                let feeAmount = TLPreferences.getInAppSettingsKitTransactionFee()\n                fee = TLCurrencyFormat.bitcoinAmountStringToCoin(feeAmount!)\n                TLSendFormData.instance().feeAmount = fee\n            }\n            \n            let amountNeeded = inputtedAmount.add(fee)\n            let accountBalance = AppDelegate.instance().godSend!.getCurrentFromBalance()\n            if (amountNeeded.greater(accountBalance)) {\n                let msg = String(format: TLDisplayStrings.YOU_HAVE_X_Y_BUT_Z_IS_NEEDED_STRING(), \"\\(TLCurrencyFormat.coinToProperBitcoinAmountString(accountBalance)) \\(TLCurrencyFormat.getBitcoinDisplay())\", TLCurrencyFormat.coinToProperBitcoinAmountString(amountNeeded))\n                TLPrompts.promptErrorMessage(TLDisplayStrings.INSUFFICIENT_FUNDS_STRING(), message: msg)\n                return\n            }\n            \n            DLog(\"showPromptReviewTx accountBalance: \\(accountBalance.toUInt64())\")\n            DLog(\"showPromptReviewTx inputtedAmount: \\(inputtedAmount.toUInt64())\")\n            DLog(\"showPromptReviewTx fee: \\(fee.toUInt64())\")\n            TLSendFormData.instance().fromLabel = AppDelegate.instance().godSend!.getCurrentFromLabel()!\n            let vc = self.storyboard!.instantiateViewController(withIdentifier: \"ReviewPayment\") as! TLReviewPaymentViewController\n            self.slidingViewController().present(vc, animated: true, completion: nil)\n        }\n        \n        func checkToFetchDynamicFees() {\n            if !AppDelegate.instance().txFeeAPI.haveUpdatedCachedDynamicFees() {\n                AppDelegate.instance().txFeeAPI.getDynamicTxFee({\n                    (_jsonData) in\n                    showReviewPaymentViewController(true)\n                    }, failure: {\n                        (code, status) in\n                        TLPrompts.promptErrorMessage(TLDisplayStrings.ERROR_STRING(), message: TLDisplayStrings.UNABLE_TO_GET_DYNAMIC_FEES_STRING())\n                        showReviewPaymentViewController(false)\n                })\n            } else {\n                showReviewPaymentViewController(true)\n            }\n        }\n        \n        if TLPreferences.enabledInAppSettingsKitDynamicFee() {\n            if !AppDelegate.instance().godSend!.haveUpDatedUTXOs() {\n                AppDelegate.instance().godSend!.getAndSetUnspentOutputs({\n                    checkToFetchDynamicFees()\n                    }, failure: {\n                        TLPrompts.promptErrorMessage(TLDisplayStrings.ERROR_STRING(), message: TLDisplayStrings.ERROR_FETCHING_UNSPENT_OUTPUTS_TRY_AGAIN_LATER_STRING())\n                })\n            } else {\n                checkToFetchDynamicFees()\n            }\n        } else {\n            showReviewPaymentViewController(false)\n        }\n    }\n    \n    fileprivate func handleTempararyImportPrivateKey(_ privateKey: String) {\n        if (!TLCoreBitcoinWrapper.isValidPrivateKey(privateKey, isTestnet: AppDelegate.instance().appWallet.walletConfig.isTestnet)) {\n            TLPrompts.promptErrorMessage(TLDisplayStrings.ERROR_STRING(), message: TLDisplayStrings.INVALID_PRIVATE_KEY_STRING())\n        } else {\n            let importedAddress = AppDelegate.instance().godSend!.getSelectedSendObject() as! TLImportedAddress?\n            let success = importedAddress!.setPrivateKeyInMemory(privateKey)\n            if (!success) {\n                TLPrompts.promptSuccessMessage(TLDisplayStrings.ERROR_STRING(), message: TLDisplayStrings.PRIVATE_KEY_DOES_NOT_MATCH_ADDRESS_STRING())\n            } else {\n                self.checkTofetchFeeThenFinalPromptReviewTx()\n            }\n        }\n    }\n    \n    fileprivate func showPromptReviewTx() {\n        if (AppDelegate.instance().godSend!.needWatchOnlyAccountPrivateKey()) {\n            let accountObject = AppDelegate.instance().godSend!.getSelectedSendObject() as! TLAccountObject\n            TLPrompts.promptForTempararyImportExtendedPrivateKey(self, success: {\n                (data: String!) in\n                if (!TLHDWalletWrapper.isValidExtendedPrivateKey(data)) {\n                    TLPrompts.promptErrorMessage(TLDisplayStrings.ERROR_STRING(), message: TLDisplayStrings.INVALID_ACCOUNT_PRIVATE_KEY_STRING())\n                } else {\n                    let success = accountObject.setExtendedPrivateKeyInMemory(data)\n                    if (!success) {\n                        TLPrompts.promptErrorMessage(TLDisplayStrings.ERROR_STRING(), message: TLDisplayStrings.ACCOUNT_PRIVATE_KEY_DOES_NOT_MATCH_STRING())\n                    } else {\n                        self.checkTofetchFeeThenFinalPromptReviewTx()\n                    }\n                }\n                \n\n                }, error: {\n                    (data: String?) in\n            })\n        } else if (AppDelegate.instance().godSend!.needWatchOnlyAddressPrivateKey()) {\n            TLPrompts.promptForTempararyImportPrivateKey(self, success: {\n                (data: String!) in\n                if (TLCoreBitcoinWrapper.isBIP38EncryptedKey(data, isTestnet: AppDelegate.instance().appWallet.walletConfig.isTestnet)) {\n                    TLPrompts.promptForEncryptedPrivKeyPassword(self, view:self.slidingViewController().topViewController.view, encryptedPrivKey: data, success: {\n                        (privKey: String!) in\n                        self.handleTempararyImportPrivateKey(privKey)\n                        }, failure: {\n                            (isCanceled: Bool) in\n                    })\n                } else {\n                    if AppDelegate.instance().scannedEncryptedPrivateKey == nil {\n                        self.handleTempararyImportPrivateKey(data)\n                    }\n                }\n                }, error: {\n                    (data: String?) in\n            })\n            \n        } else if (AppDelegate.instance().godSend!.needEncryptedPrivateKeyPassword()) {\n            let encryptedPrivateKey = AppDelegate.instance().godSend!.getEncryptedPrivateKey()\n            TLPrompts.promptForEncryptedPrivKeyPassword(self, view:self.slidingViewController().topViewController.view, encryptedPrivKey: encryptedPrivateKey, success: {\n                (privKey: String!) in\n                let importedAddress = AppDelegate.instance().godSend!.getSelectedSendObject() as! TLImportedAddress?\n                let success = importedAddress!.setPrivateKeyInMemory(privKey)\n                if (!success) {\n                    TLPrompts.promptSuccessMessage(TLDisplayStrings.ERROR_STRING(), message: TLDisplayStrings.PRIVATE_KEY_DOES_NOT_MATCH_ADDRESS_STRING())\n                } else {\n                    self.checkTofetchFeeThenFinalPromptReviewTx()\n                }\n                }, failure: {\n                    (isCanceled: Bool) in\n            })\n        } else {\n            self.checkTofetchFeeThenFinalPromptReviewTx()\n        }\n    }\n    \n    func dismissTextFieldsAndScrollDown(_ notification: Notification) {\n        self.fiatAmountTextField!.resignFirstResponder()\n        self.amountTextField!.resignFirstResponder()\n        self.toAddressTextField!.resignFirstResponder()\n        \n        self.topView!.scrollToY(0)\n        NotificationCenter.default.removeObserver(self, name: NSNotification.Name.UIApplicationDidEnterBackground,\n            object: nil)\n    }\n    \n    func onAddressSelected(_ note: Notification) {\n        NotificationCenter.default.removeObserver(self, name: NSNotification.Name(rawValue: TLNotificationEvents.EVENT_ADDRESS_SELECTED()),\n            object: nil)\n        \n        let address = note.object as! String\n        self.toAddressTextField!.text = address\n        TLSendFormData.instance().setAddress(address)\n    }\n    \n    func _reviewPaymentClicked() {\n        self.showPromptReviewTx()\n    }\n    \n    fileprivate func handleScannedAddress(_ data: String) {\n        if (data.hasPrefix(\"bitcoin:\")) {\n            let parsedBitcoinURI = TLWalletUtils.parseBitcoinURI(data)\n            if parsedBitcoinURI == nil {\n                TLPrompts.promptErrorMessage(TLDisplayStrings.ERROR_STRING(), message: TLDisplayStrings.URL_DOES_NOT_CONTAIN_AN_ADDRESS_STRING())\n                return\n            }\n            let address = parsedBitcoinURI!.object(forKey: \"address\") as! String?\n            if (address == nil) {\n                TLPrompts.promptErrorMessage(TLDisplayStrings.ERROR_STRING(), message: TLDisplayStrings.URL_DOES_NOT_CONTAIN_AN_ADDRESS_STRING())\n                return\n            }\n            \n            let success = self.fillToAddressTextField(address!)\n            if (success) {\n                let parsedBitcoinURIAmount = parsedBitcoinURI!.object(forKey: \"amount\") as! String?\n                if (parsedBitcoinURIAmount != nil) {\n                    let coinAmount = TLCoin(bitcoinAmount: parsedBitcoinURIAmount!, bitcoinDenomination: TLBitcoinDenomination.bitcoin)\n                    let amountString = TLCurrencyFormat.coinToProperBitcoinAmountString(coinAmount)\n                    self.amountTextField!.text = amountString\n                    self.updateFiatAmountTextFieldExchangeRate(nil)\n                    TLSendFormData.instance().setAmount(amountString)\n                    TLSendFormData.instance().setFiatAmount(nil)\n                }\n            }\n        } else {\n            self.fillToAddressTextField(data)\n        }\n    }\n    \n    override func prepare(for segue: UIStoryboardSegue, sender: Any!) -> () {\n        if (segue.identifier == \"selectAccount\") {\n            let vc = segue.destination \n            vc.navigationItem.title = TLDisplayStrings.SELECT_ACCOUNT_STRING()\n            NotificationCenter.default.addObserver(self, selector: #selector(TLSendViewController.onAccountSelected(_:)),\n                name: NSNotification.Name(rawValue: TLNotificationEvents.EVENT_ACCOUNT_SELECTED()), object: nil)\n        }\n    }\n    \n    func preFetchUTXOsAndDynamicFees() {\n        DispatchQueue.global(priority: DispatchQueue.GlobalQueuePriority.background).async {\n            DLog(\"preFetchUTXOsAndDynamicFees\")\n            if TLPreferences.enabledInAppSettingsKitDynamicFee() {\n                DLog(\"preFetchUTXOsAndDynamicFees enabledInAppSettingsKitDynamicFee\")\n                \n                if !AppDelegate.instance().txFeeAPI.haveUpdatedCachedDynamicFees() {\n                    AppDelegate.instance().txFeeAPI.getDynamicTxFee({\n                        (_jsonData) in\n                        DLog(\"preFetchUTXOsAndDynamicFees getDynamicTxFee success\")\n                        }, failure: {\n                            (code, status) in\n                            DLog(\"preFetchUTXOsAndDynamicFees getDynamicTxFee failure\")\n                    })\n                }\n                \n                if !AppDelegate.instance().godSend!.haveUpDatedUTXOs() {\n                    AppDelegate.instance().godSend!.getAndSetUnspentOutputs({\n                        DLog(\"preFetchUTXOsAndDynamicFees getAndSetUnspentOutputs success\")\n                        }, failure: {\n                            DLog(\"preFetchUTXOsAndDynamicFees getAndSetUnspentOutputs failure\")\n                    })\n                }\n            }\n        }\n    }\n    \n    @IBAction fileprivate func updateFiatAmountTextFieldExchangeRate(_ sender: AnyObject?) {\n        let currency = TLCurrencyFormat.getFiatCurrency()\n        let amount = TLCurrencyFormat.properBitcoinAmountStringToCoin(self.amountTextField!.text!)\n\n        if (amount.greater(TLCoin.zero())) {\n            self.fiatAmountTextField!.text = TLExchangeRate.instance().fiatAmountStringFromBitcoin(currency,\n                bitcoinAmount: amount)\n            TLSendFormData.instance().toAmount = amount\n        } else {\n            self.fiatAmountTextField!.text = nil\n            TLSendFormData.instance().toAmount = nil\n        }\n    }\n    \n    @IBAction fileprivate func updateAmountTextFieldExchangeRate(_ sender: AnyObject?) {\n        let currency = TLCurrencyFormat.getFiatCurrency()\n        let fiatFormatter = NumberFormatter()\n        fiatFormatter.numberStyle = .decimal\n        fiatFormatter.maximumFractionDigits = 2\n        let fiatAmount = fiatFormatter.number(from: self.fiatAmountTextField!.text!)\n        if fiatAmount != nil && fiatAmount! != 0 {\n            let bitcoinAmount = TLExchangeRate.instance().bitcoinAmountFromFiat(currency, fiatAmount: fiatAmount!.doubleValue)\n            self.amountTextField!.text = TLCurrencyFormat.coinToProperBitcoinAmountString(bitcoinAmount)\n            TLSendFormData.instance().toAmount = bitcoinAmount\n        } else {\n            self.amountTextField!.text = nil\n            TLSendFormData.instance().toAmount = nil\n        }\n    }\n    \n    @IBAction fileprivate func reviewPaymentClicked(_ sender: AnyObject) {\n        self.dismissKeyboard()\n        \n        let toAddress = self.toAddressTextField!.text\n        if toAddress != nil && TLStealthAddress.isStealthAddress(toAddress!, isTestnet: false) {\n            if !TLWalletUtils.ENABLE_STEALTH_ADDRESS() {\n                TLPrompts.promptWithOneButton(self, title: \"\", message: TLDisplayStrings.REUSABLE_ADDRESS_DISABLED(), buttonText: TLDisplayStrings.OK_STRING(), success: {\n                })\n                return\n            }\n            func checkToShowStealthPaymentDelayInfo() {\n                if TLSuggestions.instance().enabledShowStealthPaymentDelayInfo() && TLBlockExplorerAPI.STATIC_MEMBERS.blockExplorerAPI == .blockchain {\n                    let msg = TLDisplayStrings.REUSABLE_ADDRESS_BLOCKCHAIN_API_WARNING_STRING()\n                    TLPrompts.promtForOK(self, title:TLDisplayStrings.WARNING_STRING(), message:msg, success: {\n                        () in\n                        TLSuggestions.instance().setEnableShowStealthPaymentDelayInfo(false)\n                    })\n                } else {\n                    self._reviewPaymentClicked()\n                }\n            }\n            \n            if TLSuggestions.instance().enabledShowStealthPaymentNote() {\n                let msg = TLDisplayStrings.STEALTH_PAYMENT_NOTE_STRING()\n                TLPrompts.promtForOK(self, title:TLDisplayStrings.WARNING_STRING(), message:msg, success: {\n                    () in\n                    self._reviewPaymentClicked()\n                    TLSuggestions.instance().setEnableShowStealthPaymentNote(false)\n                    checkToShowStealthPaymentDelayInfo()\n                })\n            } else {\n                checkToShowStealthPaymentDelayInfo();\n            }\n            \n        } else {\n            self._reviewPaymentClicked()\n        }\n    }\n    \n    @IBAction fileprivate func scanQRCodeClicked(_ sender: AnyObject) {\n        AppDelegate.instance().showAddressReaderControllerFromViewController(self, success: {\n            (data: String!) in\n            self.handleScannedAddress(data)\n            }, error: {\n                (data: String?) in\n        })\n    }\n    \n    @IBAction fileprivate func addressBookClicked(_ sender: AnyObject) {\n        NotificationCenter.default.addObserver(self, selector: #selector(TLSendViewController.onAddressSelected(_:)), name: NSNotification.Name(rawValue: TLNotificationEvents.EVENT_ADDRESS_SELECTED()), object: nil)\n        let vc = self.storyboard!.instantiateViewController(withIdentifier: \"AddressBook\") \n        self.slidingViewController().present(vc, animated: true, completion: nil)\n    }\n    \n    @IBAction fileprivate func menuButtonClicked(_ sender: AnyObject) {\n        self.slidingViewController().anchorTopViewToRight(animated: true)\n    }\n    \n    func textField(_ textField: UITextField, shouldChangeCharactersIn range: (NSRange), replacementString string: String) -> Bool {\n        let newString = (textField.text as! NSString).replacingCharacters(in: range, with: string)\n        if (textField == self.toAddressTextField) {\n            TLSendFormData.instance().setAddress(newString)\n        } else if (textField == self.amountTextField) {\n            TLSendFormData.instance().setAmount(newString)\n            TLSendFormData.instance().setFiatAmount(nil)\n            TLSendFormData.instance().useAllFunds = false\n        } else if (textField == self.fiatAmountTextField) {\n            TLSendFormData.instance().setFiatAmount(newString)\n            TLSendFormData.instance().setAmount(nil)\n            TLSendFormData.instance().useAllFunds = false\n        }\n        return true\n    }\n    \n    func textFieldDidBeginEditing(_ textField: UITextField) {\n        \n        if (self.tapGesture == nil) {\n            self.tapGesture = UITapGestureRecognizer(target: self,\n                action: #selector(TLSendViewController.dismissKeyboard))\n            \n            self.view.addGestureRecognizer(self.tapGesture!)\n        }\n        \n        self.setAllCoinsBarButton()\n    }\n    \n    func textFieldShouldReturn(_ textField: UITextField) -> Bool {\n        \n        textField.resignFirstResponder()\n        return true\n    }\n    \n    func textFieldShouldBeginEditing(_ textField: UITextField) -> Bool {\n        NotificationCenter.default.addObserver(self, selector: #selector(TLSendViewController.dismissTextFieldsAndScrollDown(_:)), name: NSNotification.Name.UIApplicationDidEnterBackground, object: nil)\n        if TLUtils.isIPhone5() {\n            if textField == self.amountTextField || textField == self.fiatAmountTextField {\n                self.topView!.scrollToY(-140)\n            } else {\n                self.topView!.scrollToView(self.fiatAmountTextField!)\n            }\n        } else if TLUtils.isIPhone4() {\n            if textField == self.amountTextField || textField == self.fiatAmountTextField {\n                self.topView!.scrollToY(-230)\n            } else {\n                self.topView!.scrollToView(self.fiatAmountTextField!)\n            }\n        }\n        if textField == self.amountTextField || textField == self.fiatAmountTextField {\n            self.preFetchUTXOsAndDynamicFees()\n        }\n        return true\n    }\n    \n    func textFieldShouldEndEditing(_ textField: UITextField) -> Bool {\n        if textField != self.toAddressTextField {\n            self.clearRightBarButton()\n        }\n        textField.resignFirstResponder()\n        return true\n    }\n    \n    func textFieldShouldClear(_ textField: UITextField) -> Bool {\n        if (textField == self.toAddressTextField) {\n            TLSendFormData.instance().setAddress(nil)\n        }\n        \n        return true\n    }\n    \n    func tabBar(_ tabBar: UITabBar, didSelect item: UITabBarItem) {\n        if (item.tag == 1) {\n            self.showReceiveView()\n        }\n    }\n\n    deinit {\n        NotificationCenter.default.removeObserver(self)\n    }\n}\n\n\n"
  },
  {
    "path": "ArcBit/viewControllers/TLSettingsViewController.swift",
    "content": "//\n//  TLSettingsViewController.swift\n//  ArcBit\n//\n//  Created by Timothy Lee on 3/14/15.\n//  Copyright (c) 2015 Timothy Lee <stequald01@gmail.com>\n//\n//   This library is free software; you can redistribute it and/or\n//   modify it under the terms of the GNU Lesser General Public\n//   License as published by the Free Software Foundation; either\n//   version 2.1 of the License, or (at your option) any later version.\n//\n//   This library is distributed in the hope that it will be useful,\n//   but WITHOUT ANY WARRANTY; without even the implied warranty of\n//   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n//   Lesser General Public License for more details.\n//\n//   You should have received a copy of the GNU Lesser General Public\n//   License along with this library; if not, write to the Free Software\n//   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,\n//   MA 02110-1301  USA\n\nimport UIKit\nimport AVFoundation\n\n@objc(TLSettingsViewController) class TLSettingsViewController:IASKAppSettingsViewController, IASKSettingsDelegate,LTHPasscodeViewControllerDelegate {\n    \n    override var preferredStatusBarStyle : (UIStatusBarStyle) {\n        return .lightContent\n    }\n    \n    override func viewDidLoad() {\n        super.viewDidLoad()\n        setColors()\n        AppDelegate.instance().setSettingsPasscodeViewColors()\n\n        AppDelegate.instance().giveExitAppNoticeForBlockExplorerAPIToTakeEffect = false\n        \n        LTHPasscodeViewController.sharedUser().delegate = self\n        self.neverShowPrivacySettings = true\n        self.delegate = self\n        \n        NotificationCenter.default.addObserver(self, selector: #selector(TLSettingsViewController.settingDidChange(_:)), name: NSNotification.Name(rawValue: kIASKAppSettingChanged), object: nil)\n        \n        self.updateHiddenKeys()\n    }\n    \n    override func viewDidAppear(_ animated: Bool) -> () {\n        NotificationCenter.default.post(name: Notification.Name(rawValue: TLNotificationEvents.EVENT_VIEW_SETTINGS_SCREEN()), object: nil)\n        if (AppDelegate.instance().giveExitAppNoticeForBlockExplorerAPIToTakeEffect) {\n            TLPrompts.promptSuccessMessage(\"\", message: TLDisplayStrings.KILL_THIS_APP_DESC_STRING())\n            AppDelegate.instance().giveExitAppNoticeForBlockExplorerAPIToTakeEffect = false\n        }\n    }\n    \n    @IBAction fileprivate func menuButtonClicked(_ sender: UIButton) {\n        self.slidingViewController().anchorTopViewToRight(animated: true)\n    }\n    \n    fileprivate func updateHiddenKeys() {\n        let hiddenKeys = NSMutableSet()\n        \n        if (TLPreferences.enabledInAppSettingsKitDynamicFee()) {\n            hiddenKeys.add(\"transactionfee\")\n            hiddenKeys.add(\"settransactionfee\")\n        } else {\n            hiddenKeys.add(\"dynamicfeeoption\")\n        }\n        \n        if (!LTHPasscodeViewController.doesPasscodeExist()) {\n            hiddenKeys.add(\"changepincode\")\n        }\n        \n        let blockExplorerAPI = TLPreferences.getBlockExplorerAPI()\n        if (blockExplorerAPI == .blockchain) {\n            hiddenKeys.add(\"blockexplorerurl\")\n            hiddenKeys.add(\"setblockexplorerurl\")\n        } else {\n            if (blockExplorerAPI == .insight) {\n                let blockExplorerURL = TLPreferences.getBlockExplorerURL(blockExplorerAPI)\n                TLPreferences.setInAppSettingsKitBlockExplorerURL(blockExplorerURL!)\n            }\n        }\n        \n        if (!TLWalletUtils.ENABLE_STEALTH_ADDRESS()) {\n            hiddenKeys.add(\"stealthaddressdefault\")\n            hiddenKeys.add(\"stealthaddressfooter\")\n        }\n        \n        self.setHiddenKeys(hiddenKeys as Set<NSObject>, animated: true)\n    }\n    \n    override func viewWillAppear(_ animated: Bool) {\n        super.viewWillAppear(animated)\n    }\n    \n    fileprivate func showPromptForSetBlockExplorerURL() {\n        UIAlertController.showAlert(in: self,\n            withTitle: TLDisplayStrings.CHANGE_BLOCK_EXPLORER_URL_STRING(),\n            message: \"\",\n            preferredStyle: .alert,\n            cancelButtonTitle: TLDisplayStrings.CANCEL_STRING(),\n            destructiveButtonTitle: nil,\n            otherButtonTitles: [TLDisplayStrings.OK_STRING()],\n            \n            preShow: {(controller) in\n                \n                func addPromptTextField(_ textField: UITextField!){\n                    textField.placeholder = \"\"\n                    textField.text = \"http://\"\n                }\n                \n                controller!.addTextField(configurationHandler: addPromptTextField)\n            }\n            ,\n            tap: {(alertView, action, buttonIndex) in\n                if (buttonIndex == alertView!.firstOtherButtonIndex) {\n                    let candidate = (alertView!.textFields![0] ).text\n                    \n                    let candidateURL = URL(string: candidate!)\n                    \n                    if (candidateURL != nil && candidateURL!.host != nil) {\n                        TLPreferences.setInAppSettingsKitBlockExplorerURL(candidateURL!.absoluteString)\n                        TLPreferences.setBlockExplorerURL(TLPreferences.getBlockExplorerAPI(), value: candidateURL!.absoluteString)\n                        TLPrompts.promptSuccessMessage(\"\", message: TLDisplayStrings.KILL_THIS_APP_DESC_STRING())\n                    } else {\n                        UIAlertController.showAlert(in: self,\n                            withTitle:  TLDisplayStrings.INVALID_URL_STRING(),\n                            message: \"\",\n                            cancelButtonTitle: TLDisplayStrings.OK_STRING(),\n                            destructiveButtonTitle: nil,\n                            otherButtonTitles: nil,\n                            tap: {(alertView, action, buttonIndex) in\n                                self.showPromptForSetBlockExplorerURL()\n                        })\n                    }\n                } else if (buttonIndex == alertView!.cancelButtonIndex) {\n                }\n        })\n    }\n    \n    fileprivate func showPromptForSetTransactionFee() {\n        let msg = String(format: TLDisplayStrings.SET_TRANSACTION_FEE_IN_X_STRING(), TLCurrencyFormat.getBitcoinDisplay())\n        \n        func addTextField(_ textField: UITextField!){\n            textField.placeholder = \"\"\n            textField.keyboardType = .decimalPad\n        }\n        \n        UIAlertController.showAlert(in: self,\n            withTitle: TLDisplayStrings.TRANSACTION_FEE_STRING(),\n            \n            message: msg,\n            preferredStyle: .alert,\n            cancelButtonTitle: TLDisplayStrings.CANCEL_STRING(),\n            destructiveButtonTitle: nil,\n            otherButtonTitles: [TLDisplayStrings.OK_STRING()],\n            \n            preShow: {(controller) in\n                controller!.addTextField(configurationHandler: addTextField)\n            }\n            ,\n            tap: {(alertView, action, buttonIndex) in\n                if (buttonIndex == alertView!.firstOtherButtonIndex) {\n                    let feeAmount = (alertView!.textFields![0] ).text\n                    \n                    let feeAmountCoin = TLCurrencyFormat.bitcoinAmountStringToCoin(feeAmount!)\n                    TLPreferences.setInAppSettingsKitTransactionFee(feeAmountCoin.bigIntegerToBitcoinAmountString(.bitcoin))\n                    NotificationCenter.default.post(name: Notification.Name(rawValue: TLNotificationEvents.EVENT_CHANGE_AUTOMATIC_TX_FEE()), object: nil)\n                } else if (buttonIndex == alertView!.cancelButtonIndex) {\n                }\n        })\n    }\n    \n    override func tableView(_ tableView: UITableView, heightForHeaderInSection: Int) -> CGFloat {\n        return 30.0\n    }\n    \n    func settingsViewControllerDidEnd(_ sender: IASKAppSettingsViewController) {\n        self.dismiss(animated: true, completion: nil)\n    }\n    \n    func settingsViewController(_ settingsViewController: IASKViewController?,\n        tableView: UITableView,\n        heightForHeaderForSection section: Int) -> CGFloat {\n            \n            let key = settingsViewController!.settingsReader.key(forSection: section)\n            if (key == \"IASKLogo\") {\n                return UIImage(named: \"Icon.png\")!.size.height + 25\n            } else if (key == \"IASKCustomHeaderStyle\") {\n                return 55\n            }\n            return 0\n    }\n    \n    fileprivate func switchPasscodeType(_ sender: UISwitch) {\n        LTHPasscodeViewController.sharedUser().setIsSimple(sender.isOn,\n            in: self,\n            asModal: true)\n    }\n    \n    fileprivate func showLockViewForEnablingPasscode() {\n        LTHPasscodeViewController.sharedUser().showForEnablingPasscode(in: self,\n            asModal: true)\n    }\n    \n    fileprivate func showLockViewForChangingPasscode() {\n        LTHPasscodeViewController.sharedUser().showForChangingPasscode(in: self, asModal: true)\n    }\n    \n    \n    fileprivate func showLockViewForTurningPasscodeOff() {\n        LTHPasscodeViewController.sharedUser().showForDisablingPasscode(in: self,\n            asModal: true)\n    }\n    \n    func settingDidChange(_ info: Notification) {\n        let userInfo = (info as NSNotification).userInfo! as NSDictionary\n        for key1 in userInfo.allKeys {\n            guard let didChangeKey = key1 as? String else {\n                return\n            }\n        if (didChangeKey == \"enablecoldwallet\") {\n            let enabled = (userInfo.object(forKey: \"enablecoldwallet\")) as! Bool\n            TLPreferences.setEnableColdWallet(enabled)\n        } else if (didChangeKey == \"enableadvancemode\") {\n            let enabled = (userInfo.object(forKey: \"enableadvancemode\")) as! Bool\n            TLPreferences.setAdvancedMode(enabled)\n        } else if (didChangeKey == \"canrestoredeletedapp\") {\n            let enabled = (userInfo.object(forKey: \"canrestoredeletedapp\")) as! Bool\n            \n            TLPreferences.setInAppSettingsCanRestoreDeletedApp(!enabled) // make sure below code completes firstbefore enabling\n            if enabled {\n                // settingDidChange gets called twice on one change, so need to do this\n                if (TLPreferences.getEncryptedWalletPassphraseKey() == nil) {\n                    TLPreferences.setInAppSettingsCanRestoreDeletedApp(enabled)\n                    return\n                }\n                TLWalletPassphrase.enableRecoverableFeature(TLPreferences.canRestoreDeletedApp())\n            } else {\n                // settingDidChange gets called twice on one change, so need to do this\n                if (TLPreferences.getEncryptedWalletPassphraseKey() != nil) {\n                    TLPreferences.setInAppSettingsCanRestoreDeletedApp(enabled)\n                    return\n                }\n                TLWalletPassphrase.disableRecoverableFeature(TLPreferences.canRestoreDeletedApp())\n            }\n            TLPreferences.setInAppSettingsCanRestoreDeletedApp(enabled)\n            TLPreferences.setCanRestoreDeletedApp(enabled)\n        } else if (didChangeKey == \"enablepincode\") {\n            let enabled = userInfo.object(forKey: \"enablepincode\") as! Bool\n            TLPreferences.setEnablePINCode(enabled)\n            if (!LTHPasscodeViewController.doesPasscodeExist()) {\n                self.showLockViewForEnablingPasscode()\n            } else {\n                self.showLockViewForTurningPasscodeOff()\n            }\n        } else if (didChangeKey == \"displaylocalcurrency\") {\n            let enabled = userInfo.object(forKey: \"displaylocalcurrency\") as! Bool\n            TLPreferences.setDisplayLocalCurrency(enabled)\n        } else if (didChangeKey == \"dynamicfeeoption\") {\n        } else if (didChangeKey == \"enabledynamicfee\") {\n            self.updateHiddenKeys()\n        } else if (didChangeKey == \"currency\") {\n            let currencyIdx = userInfo.object(forKey: \"currency\") as! String\n            TLPreferences.setCurrency(currencyIdx)\n        } else if (didChangeKey == \"bitcoindisplay\") {\n            let bitcoindisplayIdx = userInfo.object(forKey: \"bitcoindisplay\") as! String\n            TLPreferences.setBitcoinDisplay(bitcoindisplayIdx)\n        } else if (didChangeKey == \"stealthaddressdefault\") {\n            let enabled = userInfo.object(forKey: \"stealthaddressdefault\") as! Bool\n            TLPreferences.setEnabledStealthAddressDefault(enabled)\n        } else if (didChangeKey == \"blockexplorerapi\") {\n            let blockexplorerAPIIdx = userInfo.object(forKey: \"blockexplorerapi\") as! String\n            TLPreferences.setBlockExplorerAPI(blockexplorerAPIIdx)\n            TLPreferences.resetBlockExplorerAPIURL()\n            self.updateHiddenKeys()\n            \n            AppDelegate.instance().giveExitAppNoticeForBlockExplorerAPIToTakeEffect = true\n            \n            NotificationCenter.default.post(name: Notification.Name(rawValue: TLNotificationEvents.EVENT_CHANGE_BLOCKEXPLORER_TYPE()), object: nil)\n        }\n        }\n    }\n    \n    func settingsViewController(_ sender: IASKAppSettingsViewController, buttonTappedFor specifier: IASKSpecifier) {\n        if (specifier.key() == \"changepincode\") {\n            self.showLockViewForChangingPasscode()\n        } else if (specifier.key() == \"showpassphrase\") {\n            let vc = self.storyboard!.instantiateViewController(withIdentifier: \"Passphrase\") \n            self.slidingViewController().present(vc, animated: true, completion: nil)\n        } else if (specifier.key() == \"restorewallet\") {\n            let vc = self.storyboard!.instantiateViewController(withIdentifier: \"EnterMnemonic\") \n            self.slidingViewController().present(vc, animated: true, completion: nil)\n            \n        } else if (specifier.key() == \"settransactionfee\") {\n            self.showPromptForSetTransactionFee()\n        } else if (specifier.key() == \"setblockexplorerurl\") {\n            self.showPromptForSetBlockExplorerURL()\n        }\n    }\n    \n    func passcodeViewControllerWillClose() {\n        if (LTHPasscodeViewController.doesPasscodeExist()) {\n            TLPreferences.setInAppSettingsKitEnablePinCode(true)\n            TLPreferences.setEnablePINCode(true)\n            NotificationCenter.default.post(name: Notification.Name(rawValue: TLNotificationEvents.EVENT_ENABLE_PIN_CODE()), object: nil)\n        } else {\n            TLPreferences.setInAppSettingsKitEnablePinCode(false)\n            TLPreferences.setEnablePINCode(false)\n        }\n        self.updateHiddenKeys()\n    }\n    \n    func maxNumberOfFailedAttemptsReached() {\n    }\n    \n    func passcodeWasEnteredSuccessfully() {\n    }\n    \n    func logoutButtonWasPressed() {\n    }\n \n    deinit {\n        NotificationCenter.default.removeObserver(self)\n    }\n}\n"
  },
  {
    "path": "ArcBit/viewControllers/TLTextViewViewController.swift",
    "content": "//\n//  TLTextViewViewController.swift\n//  ArcBit\n//\n//  Created by Timothy Lee on 3/14/15.\n//  Copyright (c) 2015 Timothy Lee <stequald01@gmail.com>\n//\n//   This library is free software; you can redistribute it and/or\n//   modify it under the terms of the GNU Lesser General Public\n//   License as published by the Free Software Foundation; either\n//   version 2.1 of the License, or (at your option) any later version.\n//\n//   This library is distributed in the hope that it will be useful,\n//   but WITHOUT ANY WARRANTY; without even the implied warranty of\n//   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n//   Lesser General Public License for more details.\n//\n//   You should have received a copy of the GNU Lesser General Public\n//   License along with this library; if not, write to the Free Software\n//   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,\n//   MA 02110-1301  USA\n\nimport Foundation\nimport UIKit\n\n@objc(TLTextViewViewController) class TLTextViewViewController:UIViewController {\n    var text:String?\n    @IBOutlet fileprivate var textView:UITextView?\n    \n    required init?(coder aDecoder: NSCoder) {\n        super.init(coder: aDecoder)\n    }\n    \n    override func viewDidLoad() {\n        super.viewDidLoad()\n\n        setColors()\n    \n        self.textView!.backgroundColor = TLColors.mainAppColor()\n        self.textView!.text = self.text\n        self.textView!.textColor = (TLColors.mainAppOppositeColor())\n        if(self.textView!.font != nil) {\n            self.textView!.font = (UIFont(name:self.textView!.font!.fontName, size:26.0))\n        }\n    }\n}\n"
  },
  {
    "path": "ArcBit/viewControllers/TLTransactionTableViewCell.swift",
    "content": "//\n//  TLTransactionTableViewCell.swift\n//  ArcBit\n//\n//  Created by Timothy Lee on 3/14/15.\n//  Copyright (c) 2015 Timothy Lee <stequald01@gmail.com>\n//\n//   This library is free software; you can redistribute it and/or\n//   modify it under the terms of the GNU Lesser General Public\n//   License as published by the Free Software Foundation; either\n//   version 2.1 of the License, or (at your option) any later version.\n//\n//   This library is distributed in the hope that it will be useful,\n//   but WITHOUT ANY WARRANTY; without even the implied warranty of\n//   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n//   Lesser General Public License for more details.\n//\n//   You should have received a copy of the GNU Lesser General Public\n//   License along with this library; if not, write to the Free Software\n//   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,\n//   MA 02110-1301  USA\n\nimport Foundation\nimport UIKit\n\n\n@objc(TLTransactionTableViewCell) class TLTransactionTableViewCell:UITableViewCell {\n    required init?(coder aDecoder: NSCoder) {\n        super.init(coder: aDecoder)\n    }\n    \n    @IBOutlet var dateLabel:UILabel?\n    @IBOutlet var currencyLabel:UILabel?\n    @IBOutlet var amountLabel:UILabel?\n    @IBOutlet var descriptionLabel:UILabel?\n    @IBOutlet var confirmationsLabel:UILabel?\n    @IBOutlet var amountButton:UIButton?\n    @IBOutlet var confirmedStatusImageView:UIImageView?\n    \n    @IBAction fileprivate func amountButtonClicked(_ sender:UIButton) {\n        TLPreferences.setDisplayLocalCurrency(!TLPreferences.isDisplayLocalCurrency())\n        TLPreferences.setInAppSettingsKitDisplayLocalCurrency(TLPreferences.isDisplayLocalCurrency())\n    }\n    \n    override init(style:UITableViewCellStyle, reuseIdentifier:String?) {\n        super.init(style:style, reuseIdentifier:reuseIdentifier)\n    }\n    \n    override func awakeFromNib() {\n        super.awakeFromNib()\n        \n        self.amountButton!.backgroundColor = TLColors.mainAppColor()\n        self.amountButton!.setTitleColor(TLColors.mainAppOppositeColor(), for:UIControlState())\n        self.amountButton!.titleLabel!.adjustsFontSizeToFitWidth = true\n    }\n        \n    override func setSelected(_ selected:Bool, animated:Bool) -> () {\n        super.setSelected(selected, animated:animated)\n    }\n}\n"
  },
  {
    "path": "ArcBit/viewControllers/TransparentViewController.swift",
    "content": "//\n//  TransparentViewController.swift\n//  ArcBit\n//\n//  Created by Timothy Lee on 3/14/15.\n//  Copyright (c) 2015 Timothy Lee <stequald01@gmail.com>\n//\n//   This library is free software; you can redistribute it and/or\n//   modify it under the terms of the GNU Lesser General Public\n//   License as published by the Free Software Foundation; either\n//   version 2.1 of the License, or (at your option) any later version.\n//\n//   This library is distributed in the hope that it will be useful,\n//   but WITHOUT ANY WARRANTY; without even the implied warranty of\n//   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n//   Lesser General Public License for more details.\n//\n//   You should have received a copy of the GNU Lesser General Public\n//   License along with this library; if not, write to the Free Software\n//   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,\n//   MA 02110-1301  USA\n\nimport Foundation\nimport UIKit\n\n@objc(TransparentViewController) class TransparentViewController:UIViewController {\n    \n    required init?(coder aDecoder: NSCoder) {\n        super.init(coder: aDecoder)\n    }\n    \n    override var preferredStatusBarStyle : (UIStatusBarStyle) {\n        return UIStatusBarStyle.lightContent\n    }\n    \n    override func viewWillAppear(_ animated: Bool) {\n        self.slidingViewController()!.topViewController = self.storyboard!.instantiateViewController(withIdentifier: \"SendNav\") \n    }\n}\n"
  },
  {
    "path": "ArcBit/viewControllers/tableViewCells/createColdWalletTableViewCells/TLAdvancedNewWalletTableViewCell.swift",
    "content": "//\n//  TLAdvancedNewWalletTableViewCell.swift\n//  ArcBit\n//\n//  Created by Timothy Lee on 3/14/15.\n//  Copyright (c) 2015 Timothy Lee <stequald01@gmail.com>\n//\n//   This library is free software; you can redistribute it and/or\n//   modify it under the terms of the GNU Lesser General Public\n//   License as published by the Free Software Foundation; either\n//   version 2.1 of the License, or (at your option) any later version.\n//\n//   This library is distributed in the hope that it will be useful,\n//   but WITHOUT ANY WARRANTY; without even the implied warranty of\n//   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n//   Lesser General Public License for more details.\n//\n//   You should have received a copy of the GNU Lesser General Public\n//   License along with this library; if not, write to the Free Software\n//   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,\n//   MA 02110-1301  USA\n\nimport Foundation\nimport UIKit\n\nprotocol TLAdvancedNewWalletTableViewCellDelegate {\n    func didAdvancedNewWalletClickShowQRCodeButton(_ cell: TLAdvancedNewWalletTableViewCell, data: String)\n}\n\n@objc(TLAdvancedNewWalletTableViewCell) class TLAdvancedNewWalletTableViewCell:UITableViewCell {\n    required init?(coder aDecoder: NSCoder) {\n        super.init(coder: aDecoder)\n    }\n    \n    @IBOutlet weak var backupPassphraseLabel: UILabel!\n    @IBOutlet weak var accountIDLabel: UILabel!\n    @IBOutlet weak var accountPublicKeyLabel: UILabel!\n    @IBOutlet weak var accountPrivateKeyLabel: UILabel!\n    @IBOutlet weak var startingReceivingAddressID: UILabel!\n    @IBOutlet weak var startingChangeAddressID: UILabel!\n\n    \n    @IBOutlet var mnemonicTextView:UITextView!\n    @IBOutlet var newWalletButton:UIButton!\n    @IBOutlet var accountIDTextField: UITextField!\n    @IBOutlet var accountPublicKeyTextView:UITextView!\n    @IBOutlet var showAccountPublicKeyQRButton:UIButton!\n    @IBOutlet var accountPrivateKeyTextView:UITextView!\n    @IBOutlet var showAccountPrivateKeyQRButton:UIButton!\n    \n    @IBOutlet weak var startingAddressIDTextField: UITextField!\n    @IBOutlet weak var addressLabel1: UILabel!\n    @IBOutlet weak var addressTextField1: UITextField!\n    @IBOutlet weak var privateKeyTextField1: UITextField!\n    @IBOutlet weak var showAddressQRCodeButton1: UIButton!\n    @IBOutlet weak var showPrivateKeyQRCodeButton1: UIButton!\n    @IBOutlet weak var addressLabel2: UILabel!\n    @IBOutlet weak var addressTextField2: UITextField!\n    @IBOutlet weak var privateKeyTextField2: UITextField!\n    @IBOutlet weak var showAddressQRCodeButton2: UIButton!\n    @IBOutlet weak var showPrivateKeyQRCodeButton2: UIButton!\n    @IBOutlet weak var addressLabel3: UILabel!\n    @IBOutlet weak var addressTextField3: UITextField!\n    @IBOutlet weak var privateKeyTextField3: UITextField!\n    @IBOutlet weak var showAddressQRCodeButton3: UIButton!\n    @IBOutlet weak var showPrivateKeyQRCodeButton3: UIButton!\n    @IBOutlet weak var addressLabel4: UILabel!\n    @IBOutlet weak var addressTextField4: UITextField!\n    @IBOutlet weak var privateKeyTextField4: UITextField!\n    @IBOutlet weak var showAddressQRCodeButton4: UIButton!\n    @IBOutlet weak var showPrivateKeyQRCodeButton4: UIButton!\n    @IBOutlet weak var addressLabel5: UILabel!\n    @IBOutlet weak var addressTextField5: UITextField!\n    @IBOutlet weak var privateKeyTextField5: UITextField!\n    @IBOutlet weak var showAddressQRCodeButton5: UIButton!\n    @IBOutlet weak var showPrivateKeyQRCodeButton5: UIButton!\n\n    @IBOutlet weak var startingChangeAddressIDTextField: UITextField!\n    @IBOutlet weak var changeAddressLabel1: UILabel!\n    @IBOutlet weak var changeAddressTextField1: UITextField!\n    @IBOutlet weak var changePrivateKeyTextField1: UITextField!\n    @IBOutlet weak var showChangeAddressQRCodeButton1: UIButton!\n    @IBOutlet weak var showChangePrivateKeyQRCodeButton1: UIButton!\n    @IBOutlet weak var changeAddressLabel2: UILabel!\n    @IBOutlet weak var changeAddressTextField2: UITextField!\n    @IBOutlet weak var changePrivateKeyTextField2: UITextField!\n    @IBOutlet weak var showChangeAddressQRCodeButton2: UIButton!\n    @IBOutlet weak var showChangePrivateKeyQRCodeButton2: UIButton!\n    @IBOutlet weak var changeAddressLabel3: UILabel!\n    @IBOutlet weak var changeAddressTextField3: UITextField!\n    @IBOutlet weak var changePrivateKeyTextField3: UITextField!\n    @IBOutlet weak var showChangeAddressQRCodeButton3: UIButton!\n    @IBOutlet weak var showChangePrivateKeyQRCodeButton3: UIButton!\n    @IBOutlet weak var changeAddressLabel4: UILabel!\n    @IBOutlet weak var changeAddressTextField4: UITextField!\n    @IBOutlet weak var changePrivateKeyTextField4: UITextField!\n    @IBOutlet weak var showChangeAddressQRCodeButton4: UIButton!\n    @IBOutlet weak var showChangePrivateKeyQRCodeButton4: UIButton!\n    @IBOutlet weak var changeAddressLabel5: UILabel!\n    @IBOutlet weak var changeAddressTextField5: UITextField!\n    @IBOutlet weak var changePrivateKeyTextField5: UITextField!\n    @IBOutlet weak var showChangeAddressQRCodeButton5: UIButton!\n    @IBOutlet weak var showChangePrivateKeyQRCodeButton5: UIButton!\n    \n    var delegate: TLAdvancedNewWalletTableViewCellDelegate?\n    fileprivate lazy var coldWalletKeyType: TLColdWalletKeyType = .mnemonic\n    fileprivate var isTestnet = AppDelegate.instance().appWallet.walletConfig.isTestnet\n    fileprivate var extendedPrivateKey: String?\n    fileprivate var extendedPublicKey: String?\n\n    override init(style:UITableViewCellStyle, reuseIdentifier:String?) {\n        super.init(style:style, reuseIdentifier:reuseIdentifier)\n    }\n    \n    override func awakeFromNib() {\n        super.awakeFromNib()\n        self.backupPassphraseLabel.text = TLDisplayStrings.BACK_UP_PASSPHRASE_STRING()+\":\"\n        self.accountIDLabel.text = TLDisplayStrings.ACCOUNT_ID_STRING()+\":\"\n        self.accountPublicKeyLabel.text = TLDisplayStrings.ACCOUNT_PUBLIC_KEY_STRING()+\":\"\n        self.accountPrivateKeyLabel.text = TLDisplayStrings.ACCOUNT_PRIVATE_KEY_STRING()+\":\"\n        self.startingReceivingAddressID.text = TLDisplayStrings.STARTING_RECEIVING_ADDRESS_ID()\n        self.startingChangeAddressID.text = TLDisplayStrings.STARTING_CHANGE_ADDRESS_ID()\n        self.newWalletButton.setTitle(TLDisplayStrings.NEW_WALLET(), for: .normal)\n        self.showAccountPublicKeyQRButton.setTitle(TLDisplayStrings.QR_CODE_STRING(), for: .normal)\n        self.showAccountPrivateKeyQRButton.setTitle(TLDisplayStrings.QR_CODE_STRING(), for: .normal)\n        self.showAddressQRCodeButton1.setTitle(TLDisplayStrings.QR_CODE_STRING(), for: .normal)\n        self.showPrivateKeyQRCodeButton1.setTitle(TLDisplayStrings.QR_CODE_STRING(), for: .normal)\n        self.showAddressQRCodeButton2.setTitle(TLDisplayStrings.QR_CODE_STRING(), for: .normal)\n        self.showPrivateKeyQRCodeButton2.setTitle(TLDisplayStrings.QR_CODE_STRING(), for: .normal)\n        self.showAddressQRCodeButton3.setTitle(TLDisplayStrings.QR_CODE_STRING(), for: .normal)\n        self.showPrivateKeyQRCodeButton3.setTitle(TLDisplayStrings.QR_CODE_STRING(), for: .normal)\n        self.showAddressQRCodeButton4.setTitle(TLDisplayStrings.QR_CODE_STRING(), for: .normal)\n        self.showPrivateKeyQRCodeButton4.setTitle(TLDisplayStrings.QR_CODE_STRING(), for: .normal)\n        self.showAddressQRCodeButton5.setTitle(TLDisplayStrings.QR_CODE_STRING(), for: .normal)\n        self.showPrivateKeyQRCodeButton5.setTitle(TLDisplayStrings.QR_CODE_STRING(), for: .normal)\n        self.showChangeAddressQRCodeButton1.setTitle(TLDisplayStrings.QR_CODE_STRING(), for: .normal)\n        self.showChangePrivateKeyQRCodeButton1.setTitle(TLDisplayStrings.QR_CODE_STRING(), for: .normal)\n        self.showChangeAddressQRCodeButton2.setTitle(TLDisplayStrings.QR_CODE_STRING(), for: .normal)\n        self.showChangePrivateKeyQRCodeButton2.setTitle(TLDisplayStrings.QR_CODE_STRING(), for: .normal)\n        self.showChangeAddressQRCodeButton3.setTitle(TLDisplayStrings.QR_CODE_STRING(), for: .normal)\n        self.showChangePrivateKeyQRCodeButton3.setTitle(TLDisplayStrings.QR_CODE_STRING(), for: .normal)\n        self.showChangeAddressQRCodeButton4.setTitle(TLDisplayStrings.QR_CODE_STRING(), for: .normal)\n        self.showChangePrivateKeyQRCodeButton4.setTitle(TLDisplayStrings.QR_CODE_STRING(), for: .normal)\n        self.showChangeAddressQRCodeButton5.setTitle(TLDisplayStrings.QR_CODE_STRING(), for: .normal)\n        self.showChangePrivateKeyQRCodeButton5.setTitle(TLDisplayStrings.QR_CODE_STRING(), for: .normal)\n        \n        self.mnemonicTextView.layer.borderWidth = 1.0\n        self.mnemonicTextView.layer.borderColor = UIColor.black.cgColor\n        self.mnemonicTextView.autocorrectionType = UITextAutocorrectionType.no\n        self.mnemonicTextView.autocapitalizationType = .none\n        self.newWalletButton.backgroundColor = TLColors.mainAppColor()\n        self.newWalletButton.setTitleColor(TLColors.mainAppOppositeColor(), for:UIControlState())\n        self.newWalletButton.titleLabel!.adjustsFontSizeToFitWidth = true\n        self.accountIDTextField.keyboardType = UIKeyboardType.numberPad\n        self.accountPublicKeyTextView.layer.borderWidth = 1.0\n        self.showAccountPublicKeyQRButton.backgroundColor = TLColors.mainAppColor()\n        self.showAccountPublicKeyQRButton.setTitleColor(TLColors.mainAppOppositeColor(), for:UIControlState())\n        self.accountPrivateKeyTextView.layer.borderWidth = 1.0\n        self.showAccountPrivateKeyQRButton.backgroundColor = TLColors.mainAppColor()\n        self.showAccountPrivateKeyQRButton.setTitleColor(TLColors.mainAppOppositeColor(), for:UIControlState())\n        self.updateWalletKeys()\n        \n        self.startingAddressIDTextField.keyboardType = UIKeyboardType.numberPad\n        \n        self.showAddressQRCodeButton1.setTitleColor(TLColors.mainAppOppositeColor(), for:UIControlState())\n        self.showAddressQRCodeButton1.backgroundColor = TLColors.mainAppColor()\n        self.showPrivateKeyQRCodeButton1.setTitleColor(TLColors.mainAppOppositeColor(), for:UIControlState())\n        self.showPrivateKeyQRCodeButton1.backgroundColor = TLColors.mainAppColor()\n        \n        self.showAddressQRCodeButton2.setTitleColor(TLColors.mainAppOppositeColor(), for:UIControlState())\n        self.showAddressQRCodeButton2.backgroundColor = TLColors.mainAppColor()\n        self.showPrivateKeyQRCodeButton2.setTitleColor(TLColors.mainAppOppositeColor(), for:UIControlState())\n        self.showPrivateKeyQRCodeButton2.backgroundColor = TLColors.mainAppColor()\n        \n        self.showAddressQRCodeButton3.setTitleColor(TLColors.mainAppOppositeColor(), for:UIControlState())\n        self.showAddressQRCodeButton3.backgroundColor = TLColors.mainAppColor()\n        self.showPrivateKeyQRCodeButton3.setTitleColor(TLColors.mainAppOppositeColor(), for:UIControlState())\n        self.showPrivateKeyQRCodeButton3.backgroundColor = TLColors.mainAppColor()\n        \n        self.showAddressQRCodeButton4.setTitleColor(TLColors.mainAppOppositeColor(), for:UIControlState())\n        self.showAddressQRCodeButton4.backgroundColor = TLColors.mainAppColor()\n        self.showPrivateKeyQRCodeButton4.setTitleColor(TLColors.mainAppOppositeColor(), for:UIControlState())\n        self.showPrivateKeyQRCodeButton4.backgroundColor = TLColors.mainAppColor()\n        \n        self.showAddressQRCodeButton5.setTitleColor(TLColors.mainAppOppositeColor(), for:UIControlState())\n        self.showAddressQRCodeButton5.backgroundColor = TLColors.mainAppColor()\n        self.showPrivateKeyQRCodeButton5.setTitleColor(TLColors.mainAppOppositeColor(), for:UIControlState())\n        self.showPrivateKeyQRCodeButton5.backgroundColor = TLColors.mainAppColor()\n      \n        self.startingChangeAddressIDTextField.keyboardType = UIKeyboardType.numberPad\n        \n        self.showChangeAddressQRCodeButton1.setTitleColor(TLColors.mainAppOppositeColor(), for:UIControlState())\n        self.showChangeAddressQRCodeButton1.backgroundColor = TLColors.mainAppColor()\n        self.showChangePrivateKeyQRCodeButton1.setTitleColor(TLColors.mainAppOppositeColor(), for:UIControlState())\n        self.showChangePrivateKeyQRCodeButton1.backgroundColor = TLColors.mainAppColor()\n        \n        self.showChangeAddressQRCodeButton2.setTitleColor(TLColors.mainAppOppositeColor(), for:UIControlState())\n        self.showChangeAddressQRCodeButton2.backgroundColor = TLColors.mainAppColor()\n        self.showChangePrivateKeyQRCodeButton2.setTitleColor(TLColors.mainAppOppositeColor(), for:UIControlState())\n        self.showChangePrivateKeyQRCodeButton2.backgroundColor = TLColors.mainAppColor()\n        \n        self.showChangeAddressQRCodeButton3.setTitleColor(TLColors.mainAppOppositeColor(), for:UIControlState())\n        self.showChangeAddressQRCodeButton3.backgroundColor = TLColors.mainAppColor()\n        self.showChangePrivateKeyQRCodeButton3.setTitleColor(TLColors.mainAppOppositeColor(), for:UIControlState())\n        self.showChangePrivateKeyQRCodeButton3.backgroundColor = TLColors.mainAppColor()\n        \n        self.showChangeAddressQRCodeButton4.setTitleColor(TLColors.mainAppOppositeColor(), for:UIControlState())\n        self.showChangeAddressQRCodeButton4.backgroundColor = TLColors.mainAppColor()\n        self.showChangePrivateKeyQRCodeButton4.setTitleColor(TLColors.mainAppOppositeColor(), for:UIControlState())\n        self.showChangePrivateKeyQRCodeButton4.backgroundColor = TLColors.mainAppColor()\n        \n        self.showChangeAddressQRCodeButton5.setTitleColor(TLColors.mainAppOppositeColor(), for:UIControlState())\n        self.showChangeAddressQRCodeButton5.backgroundColor = TLColors.mainAppColor()\n        self.showChangePrivateKeyQRCodeButton5.setTitleColor(TLColors.mainAppOppositeColor(), for:UIControlState())\n        self.showChangePrivateKeyQRCodeButton5.backgroundColor = TLColors.mainAppColor()\n        \n        self.mnemonicTextView.text = nil\n        self.accountPublicKeyTextView.text = nil\n        self.accountPrivateKeyTextView.text = nil\n\n        \n        self.updateAccountIDTextField(false)\n        self.updateAccountPublicKeyTextView(nil)\n        self.updateAccountPrivateKeyTextView(nil)\n        self.clearAddressFields()\n    }\n    \n    class func cellHeight() -> CGFloat {\n        return 1359\n    }\n    \n    fileprivate func enableTextView(_ textView:UITextView, enable:Bool) {\n        if enable {\n            textView.isUserInteractionEnabled = true\n            textView.alpha = 1\n        } else {\n            textView.isUserInteractionEnabled = false\n            textView.alpha = 0.5\n        }\n    }\n\n    fileprivate func enableTextField(_ textField:UITextField, enable:Bool) {\n        if enable {\n            textField.isEnabled = true\n            textField.alpha = 1.0\n        } else {\n            textField.isEnabled = false\n            textField.alpha = 0.5\n        }\n    }\n    \n    fileprivate func enableButton(_ button:UIButton, enable:Bool) {\n        if enable {\n            button.isEnabled = true\n            button.alpha = 1.0\n        } else {\n            button.isEnabled = false\n            button.alpha = 0.5\n        }\n    }\n    \n    \n    func updateWalletKeys() {\n        if self.coldWalletKeyType == .mnemonic {\n            self.enableTextView(self.mnemonicTextView, enable: true)\n            self.enableButton(self.newWalletButton, enable: true)\n            self.updateAccountIDTextField(false)\n            self.enableTextView(self.accountPrivateKeyTextView, enable: false)\n            self.enableTextView(self.accountPublicKeyTextView, enable: false)\n            \n            self.didUpdateMnemonic(self.mnemonicTextView.text!)\n\n        } else if self.coldWalletKeyType == .accountPublicKey {\n            self.mnemonicTextView.text = nil\n            self.enableTextView(self.mnemonicTextView, enable: false)\n            self.enableButton(self.newWalletButton, enable: false)\n            self.updateAccountIDTextField(false)\n            self.accountPrivateKeyTextView.text = nil\n            self.enableTextView(self.accountPrivateKeyTextView, enable: false)\n            self.enableTextView(self.accountPublicKeyTextView, enable: true)\n\n            self.enableButton(self.showAccountPrivateKeyQRButton, enable: false)\n\n            self.didUpdateAccountPublicKey(self.accountPublicKeyTextView.text!)\n\n        } else if self.coldWalletKeyType == .accountPrivateKey {\n            self.mnemonicTextView.text = nil\n            self.enableTextView(self.mnemonicTextView, enable: false)\n            self.enableButton(self.newWalletButton, enable: false)\n            self.updateAccountIDTextField(false)\n            self.enableTextView(self.accountPrivateKeyTextView, enable: true)\n            self.enableTextView(self.accountPublicKeyTextView, enable: false)\n\n            self.didUpdateAccountPrivateKey(self.accountPrivateKeyTextView.text!)\n        }\n    }\n\n    func updateCellWithColdWalletKeyType(_ coldWalletKeyType: TLColdWalletKeyType) {\n        self.coldWalletKeyType = coldWalletKeyType\n        self.updateWalletKeys()\n    }\n\n    func didUpdateMnemonic(_ mnemonicPassphrase: String, accountID: Int? = nil) {\n        if TLHDWalletWrapper.phraseIsValid(mnemonicPassphrase) {\n            let masterHex = TLHDWalletWrapper.getMasterHex(mnemonicPassphrase)\n            var HDAccountID:Int? = 0\n            if accountID == nil {\n                HDAccountID = Int(self.accountIDTextField.text!)\n                if HDAccountID == nil {\n                    HDAccountID = 0\n                }\n            } else {\n                HDAccountID = accountID\n            }\n\n            self.updateAccountIDTextField(true)\n            let extendedPublicKey = TLHDWalletWrapper.getExtendPubKeyFromMasterHex(masterHex, accountIdx: UInt(HDAccountID!))\n            self.accountPublicKeyTextView.text = extendedPublicKey\n            self.updateAccountPublicKeyTextView(extendedPublicKey)\n            let extendedPrivateKey = TLHDWalletWrapper.getExtendPrivKey(masterHex, accountIdx: UInt(HDAccountID!))\n            self.accountPrivateKeyTextView.text = extendedPrivateKey\n            self.updateAccountPrivateKeyTextView(extendedPrivateKey)\n  \n            self.updateAddressFieldsWithStartingAddressID()\n            self.updateChangeAddressFieldsWithStartingAddressID()\n        } else {\n            self.updateAccountIDTextField(false)\n            self.accountPublicKeyTextView.text = nil\n            self.accountPrivateKeyTextView.text = nil\n            self.updateAccountPublicKeyTextView(nil)\n            self.updateAccountPrivateKeyTextView(nil)\n            self.clearAddressFields()\n        }\n    }\n    \n    func didUpdateAccountPublicKey(_ accountPublicKey: String?) {\n        if !accountPublicKey!.isEmpty && TLHDWalletWrapper.isValidExtendedPublicKey(accountPublicKey!) {\n            let accoundIdx = TLHDWalletWrapper.getAccountIdxForExtendedKey(accountPublicKey!)\n            self.accountIDTextField.text = String(accoundIdx)\n            self.enableButton(self.showAccountPublicKeyQRButton, enable: true)\n            self.updateAddressFieldsWithStartingAddressID()\n            self.updateChangeAddressFieldsWithStartingAddressID()\n        } else {\n            self.accountIDTextField.text = nil\n            self.enableButton(self.showAccountPublicKeyQRButton, enable: false)\n            self.clearAddressFields()\n        }\n    }\n\n    func didUpdateAccountPrivateKey(_ accountPrivateKey: String?) {\n        if !accountPrivateKey!.isEmpty && TLHDWalletWrapper.isValidExtendedPrivateKey(accountPrivateKey!) {\n            let accoundIdx = TLHDWalletWrapper.getAccountIdxForExtendedKey(accountPrivateKey!)\n            self.accountIDTextField.text = String(accoundIdx)\n            let accountPublicKey = TLHDWalletWrapper.getExtendPubKey(accountPrivateKey!)\n            self.accountPublicKeyTextView.text = accountPublicKey\n            self.enableButton(self.showAccountPrivateKeyQRButton, enable: true)\n            self.enableButton(self.showAccountPublicKeyQRButton, enable: true)\n            self.updateAccountPrivateKeyTextView(accountPrivateKey)\n            self.updateAddressFieldsWithStartingAddressID()\n        } else {\n            self.accountIDTextField.text = nil\n            self.accountPublicKeyTextView.text = nil\n            self.updateAccountPublicKeyTextView(nil)\n            self.enableButton(self.showAccountPrivateKeyQRButton, enable: false)\n            self.enableButton(self.showAccountPublicKeyQRButton, enable: false)\n            self.clearAddressFields()\n        }\n    }\n\n    func updateAccountIDTextField(_ enable: Bool) {\n        if enable {\n            self.enableTextField(self.accountIDTextField, enable: true)\n        } else {\n            self.enableTextField(self.accountIDTextField, enable: false)\n            self.accountIDTextField.text = nil\n        }\n    }\n    \n    func updateAccountPublicKeyTextView(_ extendedPublicKey: String?) {\n        if extendedPublicKey == nil {\n            self.enableButton(self.showAccountPublicKeyQRButton, enable: false)\n            return\n        }\n        self.enableButton(self.showAccountPublicKeyQRButton, enable: true)\n        \n        // shrink text to fit textview\n        var fontSize:CGFloat = (self.accountPublicKeyTextView.font?.pointSize)!\n        self.accountPublicKeyTextView.font = self.accountPublicKeyTextView.font?.withSize(fontSize)\n        while (self.accountPublicKeyTextView.contentSize.height > self.accountPublicKeyTextView.frame.size.height && fontSize > 8.0) {\n            fontSize -= 1.0\n            self.accountPublicKeyTextView.font = self.accountPublicKeyTextView.font?.withSize(fontSize)\n        }\n    }\n    \n    func updateAccountPrivateKeyTextView(_ extendedPrivateKey: String?) {\n        if extendedPrivateKey == nil {\n            self.enableButton(self.showAccountPrivateKeyQRButton, enable: false)\n            return\n        }\n        self.enableButton(self.showAccountPrivateKeyQRButton, enable: true)\n        \n        // shrink text to fit textview\n        var fontSize:CGFloat = (self.accountPrivateKeyTextView.font?.pointSize)!\n        self.accountPrivateKeyTextView.font = self.accountPrivateKeyTextView.font?.withSize(fontSize)\n        while (self.accountPrivateKeyTextView.contentSize.height > self.accountPrivateKeyTextView.frame.size.height && fontSize > 8.0) {\n            fontSize -= 1.0\n            self.accountPrivateKeyTextView.font = self.accountPrivateKeyTextView.font?.withSize(fontSize)\n        }\n    }\n\n    func clearAddressFields() {\n        self.clearReceivingAddressFields()\n        self.clearChangeAddressFields()\n    }\n\n    func clearReceivingAddressFields() {\n        self.enableTextField(self.startingAddressIDTextField, enable: false)\n        \n        self.enableButton(self.showAddressQRCodeButton1, enable: false)\n        self.enableButton(self.showAddressQRCodeButton2, enable: false)\n        self.enableButton(self.showAddressQRCodeButton3, enable: false)\n        self.enableButton(self.showAddressQRCodeButton4, enable: false)\n        self.enableButton(self.showAddressQRCodeButton5, enable: false)\n        \n        self.enableButton(self.showPrivateKeyQRCodeButton1, enable: false)\n        self.enableButton(self.showPrivateKeyQRCodeButton2, enable: false)\n        self.enableButton(self.showPrivateKeyQRCodeButton3, enable: false)\n        self.enableButton(self.showPrivateKeyQRCodeButton4, enable: false)\n        self.enableButton(self.showPrivateKeyQRCodeButton5, enable: false)\n        \n        self.enableTextField(self.addressTextField1, enable: false)\n        self.enableTextField(self.addressTextField2, enable: false)\n        self.enableTextField(self.addressTextField3, enable: false)\n        self.enableTextField(self.addressTextField4, enable: false)\n        self.enableTextField(self.addressTextField5, enable: false)\n        \n        self.enableTextField(self.privateKeyTextField1, enable: false)\n        self.enableTextField(self.privateKeyTextField2, enable: false)\n        self.enableTextField(self.privateKeyTextField3, enable: false)\n        self.enableTextField(self.privateKeyTextField4, enable: false)\n        self.enableTextField(self.privateKeyTextField5, enable: false)\n        \n        self.startingAddressIDTextField.text = nil\n        \n        self.privateKeyTextField1.text = nil\n        self.addressTextField1.text = nil\n        self.privateKeyTextField2.text = nil\n        self.addressTextField2.text = nil\n        self.privateKeyTextField3.text = nil\n        self.addressTextField3.text = nil\n        self.privateKeyTextField4.text = nil\n        self.addressTextField4.text = nil\n        self.privateKeyTextField5.text = nil\n        self.addressTextField5.text = nil\n    }\n\n    func clearChangeAddressFields() {\n        self.enableTextField(self.startingChangeAddressIDTextField, enable: false)\n        \n        self.enableButton(self.showChangeAddressQRCodeButton1, enable: false)\n        self.enableButton(self.showChangeAddressQRCodeButton2, enable: false)\n        self.enableButton(self.showChangeAddressQRCodeButton3, enable: false)\n        self.enableButton(self.showChangeAddressQRCodeButton4, enable: false)\n        self.enableButton(self.showChangeAddressQRCodeButton5, enable: false)\n        \n        self.enableButton(self.showChangePrivateKeyQRCodeButton1, enable: false)\n        self.enableButton(self.showChangePrivateKeyQRCodeButton2, enable: false)\n        self.enableButton(self.showChangePrivateKeyQRCodeButton3, enable: false)\n        self.enableButton(self.showChangePrivateKeyQRCodeButton4, enable: false)\n        self.enableButton(self.showChangePrivateKeyQRCodeButton5, enable: false)\n        \n        self.enableTextField(self.changeAddressTextField1, enable: false)\n        self.enableTextField(self.changeAddressTextField2, enable: false)\n        self.enableTextField(self.changeAddressTextField3, enable: false)\n        self.enableTextField(self.changeAddressTextField4, enable: false)\n        self.enableTextField(self.changeAddressTextField5, enable: false)\n        \n        self.enableTextField(self.changePrivateKeyTextField1, enable: false)\n        self.enableTextField(self.changePrivateKeyTextField2, enable: false)\n        self.enableTextField(self.changePrivateKeyTextField3, enable: false)\n        self.enableTextField(self.changePrivateKeyTextField4, enable: false)\n        self.enableTextField(self.changePrivateKeyTextField5, enable: false)\n        \n        self.startingChangeAddressIDTextField.text = nil\n        \n        self.changePrivateKeyTextField1.text = nil\n        self.changeAddressTextField1.text = nil\n        self.changePrivateKeyTextField2.text = nil\n        self.changeAddressTextField2.text = nil\n        self.changePrivateKeyTextField3.text = nil\n        self.changeAddressTextField3.text = nil\n        self.changePrivateKeyTextField4.text = nil\n        self.changeAddressTextField4.text = nil\n        self.changePrivateKeyTextField5.text = nil\n        self.changeAddressTextField5.text = nil\n    }\n    \n    func updateAddressFieldsWithStartingAddressID(_ startingAddressID: Int? = nil) {\n        var addressID:Int? = 0\n        if startingAddressID == nil {\n            addressID = Int(self.startingAddressIDTextField.text!)\n            if addressID == nil {\n                addressID = 0\n            }\n        } else {\n            addressID = startingAddressID\n        }\n        updateAddressFields(addressID!)\n    }\n\n    func updateChangeAddressFieldsWithStartingAddressID(_ startingAddressID: Int? = nil) {\n        var addressID:Int? = 0\n        if startingAddressID == nil {\n            addressID = Int(self.startingChangeAddressIDTextField.text!)\n            if addressID == nil {\n                addressID = 0\n            }\n        } else {\n            addressID = startingAddressID\n        }\n        updateChangeAddressFields(addressID!)\n    }\n    \n    func updateAddressFields(_ startingAddressID: Int) {\n        var extendedPrivateKey:String? = nil\n        var extendedPublicKey:String? = nil\n        if self.coldWalletKeyType == .mnemonic {\n            extendedPublicKey = self.accountPublicKeyTextView.text\n            extendedPrivateKey = self.accountPrivateKeyTextView.text\n        } else if self.coldWalletKeyType == .accountPublicKey {\n            extendedPublicKey = self.accountPublicKeyTextView.text\n        } else if self.coldWalletKeyType == .accountPrivateKey {\n            extendedPublicKey = self.accountPublicKeyTextView.text\n            extendedPrivateKey = self.accountPrivateKeyTextView.text\n        }\n        if extendedPublicKey != nil && TLHDWalletWrapper.isValidExtendedPublicKey(extendedPublicKey!)\n            && (extendedPrivateKey == nil || extendedPrivateKey != nil && TLHDWalletWrapper.isValidExtendedPrivateKey(extendedPrivateKey!)) {\n            self.enableTextField(self.startingAddressIDTextField, enable: true)\n\n            var HDAddressIdx = startingAddressID\n            let addressSequence1 = [Int(TLAddressType.main.rawValue), HDAddressIdx] as [Any]\n            self.addressLabel1.text = TLDisplayStrings.ADDRESS_ID_STRING() + String(HDAddressIdx) + \":\"\n            self.addressTextField1.text = TLHDWalletWrapper.getAddress(extendedPublicKey!, sequence: addressSequence1 as NSArray, isTestnet: isTestnet)\n            HDAddressIdx += 1\n            let addressSequence2 = [Int(TLAddressType.main.rawValue), HDAddressIdx]\n            self.addressLabel2.text = TLDisplayStrings.ADDRESS_ID_STRING() + String(HDAddressIdx) + \":\"\n            self.addressTextField2.text = TLHDWalletWrapper.getAddress(extendedPublicKey!, sequence: addressSequence2 as NSArray, isTestnet: isTestnet)\n            HDAddressIdx += 1\n            let addressSequence3 = [Int(TLAddressType.main.rawValue), HDAddressIdx]\n            self.addressLabel3.text = TLDisplayStrings.ADDRESS_ID_STRING() + String(HDAddressIdx) + \":\"\n            self.addressTextField3.text = TLHDWalletWrapper.getAddress(extendedPublicKey!, sequence: addressSequence3 as NSArray, isTestnet: isTestnet)\n            HDAddressIdx += 1\n            let addressSequence4 = [Int(TLAddressType.main.rawValue), HDAddressIdx]\n            self.addressLabel4.text = TLDisplayStrings.ADDRESS_ID_STRING() + String(HDAddressIdx) + \":\"\n            self.addressTextField4.text = TLHDWalletWrapper.getAddress(extendedPublicKey!, sequence: addressSequence4 as NSArray, isTestnet: isTestnet)\n            HDAddressIdx += 1\n            let addressSequence5 = [Int(TLAddressType.main.rawValue), HDAddressIdx]\n            self.addressLabel5.text = TLDisplayStrings.ADDRESS_ID_STRING() + String(HDAddressIdx) + \":\"\n            self.addressTextField5.text = TLHDWalletWrapper.getAddress(extendedPublicKey!, sequence: addressSequence5 as NSArray, isTestnet: isTestnet)\n\n            self.enableButton(self.showAddressQRCodeButton1, enable: true)\n            self.enableButton(self.showAddressQRCodeButton2, enable: true)\n            self.enableButton(self.showAddressQRCodeButton3, enable: true)\n            self.enableButton(self.showAddressQRCodeButton4, enable: true)\n            self.enableButton(self.showAddressQRCodeButton5, enable: true)\n            \n            if extendedPrivateKey != nil {\n                self.privateKeyTextField1.text = TLHDWalletWrapper.getPrivateKey(extendedPrivateKey! as NSString, sequence: addressSequence1 as NSArray, isTestnet: isTestnet)\n                self.privateKeyTextField2.text = TLHDWalletWrapper.getPrivateKey(extendedPrivateKey! as NSString, sequence: addressSequence2 as NSArray, isTestnet: isTestnet)\n                self.privateKeyTextField3.text = TLHDWalletWrapper.getPrivateKey(extendedPrivateKey! as NSString, sequence: addressSequence3 as NSArray, isTestnet: isTestnet)\n                self.privateKeyTextField4.text = TLHDWalletWrapper.getPrivateKey(extendedPrivateKey! as NSString, sequence: addressSequence4 as NSArray, isTestnet: isTestnet)\n                self.privateKeyTextField5.text = TLHDWalletWrapper.getPrivateKey(extendedPrivateKey! as NSString, sequence: addressSequence5 as NSArray, isTestnet: isTestnet)\n                self.enableButton(self.showPrivateKeyQRCodeButton1, enable: true)\n                self.enableButton(self.showPrivateKeyQRCodeButton2, enable: true)\n                self.enableButton(self.showPrivateKeyQRCodeButton3, enable: true)\n                self.enableButton(self.showPrivateKeyQRCodeButton4, enable: true)\n                self.enableButton(self.showPrivateKeyQRCodeButton5, enable: true)\n            } else {\n                self.privateKeyTextField1.text = nil\n                self.privateKeyTextField2.text = nil\n                self.privateKeyTextField3.text = nil\n                self.privateKeyTextField4.text = nil\n                self.privateKeyTextField5.text = nil\n                self.enableButton(self.showPrivateKeyQRCodeButton1, enable: false)\n                self.enableButton(self.showPrivateKeyQRCodeButton2, enable: false)\n                self.enableButton(self.showPrivateKeyQRCodeButton3, enable: false)\n                self.enableButton(self.showPrivateKeyQRCodeButton4, enable: false)\n                self.enableButton(self.showPrivateKeyQRCodeButton5, enable: false)\n            }\n        }\n    }\n    \n    func updateChangeAddressFields(_ startingAddressID: Int) {\n        var extendedPrivateKey:String? = nil\n        var extendedPublicKey:String? = nil\n        if self.coldWalletKeyType == .mnemonic {\n            extendedPublicKey = self.accountPublicKeyTextView.text\n            extendedPrivateKey = self.accountPrivateKeyTextView.text\n        } else if self.coldWalletKeyType == .accountPublicKey {\n            extendedPublicKey = self.accountPublicKeyTextView.text\n        } else if self.coldWalletKeyType == .accountPrivateKey {\n            extendedPublicKey = self.accountPublicKeyTextView.text\n            extendedPrivateKey = self.accountPrivateKeyTextView.text\n        }\n        if extendedPublicKey != nil && TLHDWalletWrapper.isValidExtendedPublicKey(extendedPublicKey!)\n            && (extendedPrivateKey == nil || extendedPrivateKey != nil && TLHDWalletWrapper.isValidExtendedPrivateKey(extendedPrivateKey!)) {\n            self.enableTextField(self.startingChangeAddressIDTextField, enable: true)\n            \n            var HDAddressIdx = startingAddressID\n            let addressSequence1 = [Int(TLAddressType.change.rawValue), HDAddressIdx] as [Any]\n            self.changeAddressLabel1.text = TLDisplayStrings.CHANGE_ADDRESS_ID_STRING() + String(HDAddressIdx) + \":\"\n            self.changeAddressTextField1.text = TLHDWalletWrapper.getAddress(extendedPublicKey!, sequence: addressSequence1 as NSArray, isTestnet: isTestnet)\n            HDAddressIdx += 1\n            let addressSequence2 = [Int(TLAddressType.change.rawValue), HDAddressIdx]\n            self.changeAddressLabel2.text = TLDisplayStrings.CHANGE_ADDRESS_ID_STRING() + String(HDAddressIdx) + \":\"\n            self.changeAddressTextField2.text = TLHDWalletWrapper.getAddress(extendedPublicKey!, sequence: addressSequence2 as NSArray, isTestnet: isTestnet)\n            HDAddressIdx += 1\n            let addressSequence3 = [Int(TLAddressType.change.rawValue), HDAddressIdx]\n            self.changeAddressLabel3.text = TLDisplayStrings.CHANGE_ADDRESS_ID_STRING() + String(HDAddressIdx) + \":\"\n            self.changeAddressTextField3.text = TLHDWalletWrapper.getAddress(extendedPublicKey!, sequence: addressSequence3 as NSArray, isTestnet: isTestnet)\n            HDAddressIdx += 1\n            let addressSequence4 = [Int(TLAddressType.change.rawValue), HDAddressIdx]\n            self.changeAddressLabel4.text = TLDisplayStrings.CHANGE_ADDRESS_ID_STRING() + String(HDAddressIdx) + \":\"\n            self.changeAddressTextField4.text = TLHDWalletWrapper.getAddress(extendedPublicKey!, sequence: addressSequence4 as NSArray, isTestnet: isTestnet)\n            HDAddressIdx += 1\n            let addressSequence5 = [Int(TLAddressType.change.rawValue), HDAddressIdx]\n            self.changeAddressLabel5.text = TLDisplayStrings.CHANGE_ADDRESS_ID_STRING() + String(HDAddressIdx) + \":\"\n            self.changeAddressTextField5.text = TLHDWalletWrapper.getAddress(extendedPublicKey!, sequence: addressSequence5 as NSArray, isTestnet: isTestnet)\n            \n            self.enableButton(self.showChangeAddressQRCodeButton1, enable: true)\n            self.enableButton(self.showChangeAddressQRCodeButton2, enable: true)\n            self.enableButton(self.showChangeAddressQRCodeButton3, enable: true)\n            self.enableButton(self.showChangeAddressQRCodeButton4, enable: true)\n            self.enableButton(self.showChangeAddressQRCodeButton5, enable: true)\n            \n            if extendedPrivateKey != nil {\n                self.changePrivateKeyTextField1.text = TLHDWalletWrapper.getPrivateKey(extendedPrivateKey! as NSString, sequence: addressSequence1 as NSArray, isTestnet: isTestnet)\n                self.changePrivateKeyTextField2.text = TLHDWalletWrapper.getPrivateKey(extendedPrivateKey! as NSString, sequence: addressSequence2 as NSArray, isTestnet: isTestnet)\n                self.changePrivateKeyTextField3.text = TLHDWalletWrapper.getPrivateKey(extendedPrivateKey! as NSString, sequence: addressSequence3 as NSArray, isTestnet: isTestnet)\n                self.changePrivateKeyTextField4.text = TLHDWalletWrapper.getPrivateKey(extendedPrivateKey! as NSString, sequence: addressSequence4 as NSArray, isTestnet: isTestnet)\n                self.changePrivateKeyTextField5.text = TLHDWalletWrapper.getPrivateKey(extendedPrivateKey! as NSString, sequence: addressSequence5 as NSArray, isTestnet: isTestnet)\n                self.enableButton(self.showChangePrivateKeyQRCodeButton1, enable: true)\n                self.enableButton(self.showChangePrivateKeyQRCodeButton2, enable: true)\n                self.enableButton(self.showChangePrivateKeyQRCodeButton3, enable: true)\n                self.enableButton(self.showChangePrivateKeyQRCodeButton4, enable: true)\n                self.enableButton(self.showChangePrivateKeyQRCodeButton5, enable: true)\n            } else {\n                self.changePrivateKeyTextField1.text = nil\n                self.changePrivateKeyTextField2.text = nil\n                self.changePrivateKeyTextField3.text = nil\n                self.changePrivateKeyTextField4.text = nil\n                self.changePrivateKeyTextField5.text = nil\n                self.enableButton(self.showChangePrivateKeyQRCodeButton1, enable: false)\n                self.enableButton(self.showChangePrivateKeyQRCodeButton2, enable: false)\n                self.enableButton(self.showChangePrivateKeyQRCodeButton3, enable: false)\n                self.enableButton(self.showChangePrivateKeyQRCodeButton4, enable: false)\n                self.enableButton(self.showChangePrivateKeyQRCodeButton5, enable: false)\n            }\n        }\n    }\n    \n    @IBAction fileprivate func newWalletButtonClicked(_ sender:UIButton) {\n        if let mnemonicPassphrase = TLHDWalletWrapper.generateMnemonicPassphrase() {\n            self.mnemonicTextView.text = mnemonicPassphrase\n            self.didUpdateMnemonic(mnemonicPassphrase)\n        }\n    }\n    \n    @IBAction fileprivate func showAccountPublicKeyQRButtonClicked(_ sender:UIButton) {\n        let accountPublicKey = self.accountPublicKeyTextView.text\n        if accountPublicKey != nil && !accountPublicKey!.isEmpty && TLHDWalletWrapper.isValidExtendedPublicKey(accountPublicKey!) {\n            delegate?.didAdvancedNewWalletClickShowQRCodeButton(self, data: accountPublicKey!)\n        }\n    }\n    \n    @IBAction fileprivate func showAccountPrivateKeyQRButtonClicked(_ sender:UIButton) {\n        let accountPrivateKey = self.accountPrivateKeyTextView.text\n        if accountPrivateKey != nil && !accountPrivateKey!.isEmpty && TLHDWalletWrapper.isValidExtendedPrivateKey(accountPrivateKey!) {\n            delegate?.didAdvancedNewWalletClickShowQRCodeButton(self, data: accountPrivateKey!)\n        }\n    }\n    \n    \n    @IBAction fileprivate func showAddressQRButtonClicked1(_ sender:UIButton) {\n        let address = self.addressTextField1.text\n        if address != nil && !address!.isEmpty && TLCoreBitcoinWrapper.isValidAddress(address!, isTestnet: isTestnet) {\n            delegate?.didAdvancedNewWalletClickShowQRCodeButton(self, data: address!)\n        }\n    }\n    \n    @IBAction fileprivate func showPrivateKeyQRButtonClicked1(_ sender:UIButton) {\n        let privateKey = self.privateKeyTextField1.text\n        if privateKey != nil && !privateKey!.isEmpty && TLCoreBitcoinWrapper.isValidPrivateKey(privateKey!, isTestnet: isTestnet) {\n            delegate?.didAdvancedNewWalletClickShowQRCodeButton(self, data: privateKey!)\n        }\n    }\n    \n    @IBAction fileprivate func showAddressQRButtonClicked2(_ sender:UIButton) {\n        let address = self.addressTextField2.text\n        if address != nil && !address!.isEmpty && TLCoreBitcoinWrapper.isValidAddress(address!, isTestnet: isTestnet) {\n            delegate?.didAdvancedNewWalletClickShowQRCodeButton(self, data: address!)\n        }\n    }\n    \n    @IBAction fileprivate func showPrivateKeyQRButtonClicked2(_ sender:UIButton) {\n        let privateKey = self.privateKeyTextField2.text\n        if privateKey != nil && !privateKey!.isEmpty && TLCoreBitcoinWrapper.isValidPrivateKey(privateKey!, isTestnet: isTestnet) {\n            delegate?.didAdvancedNewWalletClickShowQRCodeButton(self, data: privateKey!)\n        }\n    }\n    \n    @IBAction fileprivate func showAddressQRButtonClicked3(_ sender:UIButton) {\n        let address = self.addressTextField3.text\n        if address != nil && !address!.isEmpty && TLCoreBitcoinWrapper.isValidAddress(address!, isTestnet: isTestnet) {\n            delegate?.didAdvancedNewWalletClickShowQRCodeButton(self, data: address!)\n        }\n    }\n    \n    @IBAction fileprivate func showPrivateKeyQRButtonClicked3(_ sender:UIButton) {\n        let privateKey = self.privateKeyTextField3.text\n        if privateKey != nil && !privateKey!.isEmpty && TLCoreBitcoinWrapper.isValidPrivateKey(privateKey!, isTestnet: isTestnet) {\n            delegate?.didAdvancedNewWalletClickShowQRCodeButton(self, data: privateKey!)\n        }\n    }\n    \n    @IBAction fileprivate func showAddressQRButtonClicked4(_ sender:UIButton) {\n        let address = self.addressTextField4.text\n        if address != nil && !address!.isEmpty && TLCoreBitcoinWrapper.isValidAddress(address!, isTestnet: isTestnet) {\n            delegate?.didAdvancedNewWalletClickShowQRCodeButton(self, data: address!)\n        }\n    }\n    \n    @IBAction fileprivate func showPrivateKeyQRButtonClicked4(_ sender:UIButton) {\n        let privateKey = self.privateKeyTextField4.text\n        if privateKey != nil && !privateKey!.isEmpty && TLCoreBitcoinWrapper.isValidPrivateKey(privateKey!, isTestnet: isTestnet) {\n            delegate?.didAdvancedNewWalletClickShowQRCodeButton(self, data: privateKey!)\n        }\n    }\n    \n    @IBAction fileprivate func showAddressQRButtonClicked5(_ sender:UIButton) {\n        let address = self.addressTextField5.text\n        if address != nil && !address!.isEmpty && TLCoreBitcoinWrapper.isValidAddress(address!, isTestnet: isTestnet) {\n            delegate?.didAdvancedNewWalletClickShowQRCodeButton(self, data: address!)\n        }\n    }\n    \n    @IBAction fileprivate func showPrivateKeyQRButtonClicked5(_ sender:UIButton) {\n        let privateKey = self.privateKeyTextField5.text\n        if privateKey != nil && !privateKey!.isEmpty && TLCoreBitcoinWrapper.isValidPrivateKey(privateKey!, isTestnet: isTestnet) {\n            delegate?.didAdvancedNewWalletClickShowQRCodeButton(self, data: privateKey!)\n        }\n    }\n    \n    \n    \n    @IBAction fileprivate func showChangeAddressQRButtonClicked1(_ sender:UIButton) {\n        let address = self.changeAddressTextField1.text\n        if address != nil && !address!.isEmpty && TLCoreBitcoinWrapper.isValidAddress(address!, isTestnet: isTestnet) {\n            delegate?.didAdvancedNewWalletClickShowQRCodeButton(self, data: address!)\n        }\n    }\n    \n    @IBAction fileprivate func showChangePrivateKeyQRButtonClicked1(_ sender:UIButton) {\n        let privateKey = self.changePrivateKeyTextField1.text\n        if privateKey != nil && !privateKey!.isEmpty && TLCoreBitcoinWrapper.isValidPrivateKey(privateKey!, isTestnet: isTestnet) {\n            delegate?.didAdvancedNewWalletClickShowQRCodeButton(self, data: privateKey!)\n        }\n    }\n    \n    @IBAction fileprivate func showChangeAddressQRButtonClicked2(_ sender:UIButton) {\n        let address = self.changeAddressTextField2.text\n        if address != nil && !address!.isEmpty && TLCoreBitcoinWrapper.isValidAddress(address!, isTestnet: isTestnet) {\n            delegate?.didAdvancedNewWalletClickShowQRCodeButton(self, data: address!)\n        }\n    }\n    \n    @IBAction fileprivate func showChangePrivateKeyQRButtonClicked2(_ sender:UIButton) {\n        let privateKey = self.changePrivateKeyTextField2.text\n        if privateKey != nil && !privateKey!.isEmpty && TLCoreBitcoinWrapper.isValidPrivateKey(privateKey!, isTestnet: isTestnet) {\n            delegate?.didAdvancedNewWalletClickShowQRCodeButton(self, data: privateKey!)\n        }\n    }\n    \n    @IBAction fileprivate func showChangeAddressQRButtonClicked3(_ sender:UIButton) {\n        let address = self.changeAddressTextField3.text\n        if address != nil && !address!.isEmpty && TLCoreBitcoinWrapper.isValidAddress(address!, isTestnet: isTestnet) {\n            delegate?.didAdvancedNewWalletClickShowQRCodeButton(self, data: address!)\n        }\n    }\n    \n    @IBAction fileprivate func showChangePrivateKeyQRButtonClicked3(_ sender:UIButton) {\n        let privateKey = self.changePrivateKeyTextField3.text\n        if privateKey != nil && !privateKey!.isEmpty && TLCoreBitcoinWrapper.isValidPrivateKey(privateKey!, isTestnet: isTestnet) {\n            delegate?.didAdvancedNewWalletClickShowQRCodeButton(self, data: privateKey!)\n        }\n    }\n    \n    @IBAction fileprivate func showChangeAddressQRButtonClicked4(_ sender:UIButton) {\n        let address = self.changeAddressTextField4.text\n        if address != nil && !address!.isEmpty && TLCoreBitcoinWrapper.isValidAddress(address!, isTestnet: isTestnet) {\n            delegate?.didAdvancedNewWalletClickShowQRCodeButton(self, data: address!)\n        }\n    }\n    \n    @IBAction fileprivate func showChangePrivateKeyQRButtonClicked4(_ sender:UIButton) {\n        let privateKey = self.changePrivateKeyTextField4.text\n        if privateKey != nil && !privateKey!.isEmpty && TLCoreBitcoinWrapper.isValidPrivateKey(privateKey!, isTestnet: isTestnet) {\n            delegate?.didAdvancedNewWalletClickShowQRCodeButton(self, data: privateKey!)\n        }\n    }\n    \n    @IBAction fileprivate func showChangeAddressQRButtonClicked5(_ sender:UIButton) {\n        let address = self.changeAddressTextField5.text\n        if address != nil && !address!.isEmpty && TLCoreBitcoinWrapper.isValidAddress(address!, isTestnet: isTestnet) {\n            delegate?.didAdvancedNewWalletClickShowQRCodeButton(self, data: address!)\n        }\n    }\n    \n    @IBAction fileprivate func showChangePrivateKeyQRButtonClicked5(_ sender:UIButton) {\n        let privateKey = self.changePrivateKeyTextField5.text\n        if privateKey != nil && !privateKey!.isEmpty && TLCoreBitcoinWrapper.isValidPrivateKey(privateKey!, isTestnet: isTestnet) {\n            delegate?.didAdvancedNewWalletClickShowQRCodeButton(self, data: privateKey!)\n        }\n    }\n}\n"
  },
  {
    "path": "ArcBit/viewControllers/tableViewCells/createColdWalletTableViewCells/TLColdWalletSelectWayTableViewCell.swift",
    "content": "//\n//  TLColdWalletSelectKeyTypeTableViewCell.swift\n//  ArcBit\n//\n//  Created by Timothy Lee on 3/14/15.\n//  Copyright (c) 2015 Timothy Lee <stequald01@gmail.com>\n//\n//   This library is free software; you can redistribute it and/or\n//   modify it under the terms of the GNU Lesser General Public\n//   License as published by the Free Software Foundation; either\n//   version 2.1 of the License, or (at your option) any later version.\n//\n//   This library is distributed in the hope that it will be useful,\n//   but WITHOUT ANY WARRANTY; without even the implied warranty of\n//   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n//   Lesser General Public License for more details.\n//\n//   You should have received a copy of the GNU Lesser General Public\n//   License along with this library; if not, write to the Free Software\n//   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,\n//   MA 02110-1301  USA\n\nimport Foundation\nimport UIKit\n\nenum TLColdWalletKeyType:Int {\n    case mnemonic = 0\n    case accountPrivateKey = 1\n    case accountPublicKey = 2\n}\n\nprotocol TLColdWalletSelectKeyTypeTableViewCellDelegate {\n    func didSelectColdWalletKeyType(_ cell: TLColdWalletSelectKeyTypeTableViewCell, keyType: TLColdWalletKeyType)\n}\n\n@objc(TLColdWalletSelectKeyTypeTableViewCell) class TLColdWalletSelectKeyTypeTableViewCell:UITableViewCell {\n    required init?(coder aDecoder: NSCoder) {\n        super.init(coder: aDecoder)\n    }\n\n    @IBOutlet var coldWalletSelectSegmentedControl:UISegmentedControl!\n    var delegate: TLColdWalletSelectKeyTypeTableViewCellDelegate?\n    \n    override init(style:UITableViewCellStyle, reuseIdentifier:String?) {\n        super.init(style:style, reuseIdentifier:reuseIdentifier)\n    }\n    \n    override func awakeFromNib() {\n        super.awakeFromNib()\n        let attr:NSDictionary\n        if UIScreen.main.bounds.size.width <= 320 {\n            attr = NSDictionary(object: UIFont(name: \"HelveticaNeue\", size: 10.0)!, forKey: NSFontAttributeName as NSCopying)\n        } else {\n            attr = NSDictionary(object: UIFont(name: \"HelveticaNeue\", size: 12.0)!, forKey: NSFontAttributeName as NSCopying)\n        }\n        self.coldWalletSelectSegmentedControl.setTitleTextAttributes(attr as! [AnyHashable: Any] , for: UIControlState())\n     \n        self.coldWalletSelectSegmentedControl.setTitle(TLDisplayStrings.BACK_UP_PASSPHRASE_STRING(), forSegmentAt: 0)\n        self.coldWalletSelectSegmentedControl.setTitle(TLDisplayStrings.ACCOUNT_PRIVATE_KEY_STRING(), forSegmentAt: 1)\n        self.coldWalletSelectSegmentedControl.setTitle(TLDisplayStrings.ACCOUNT_PUBLIC_KEY_STRING(), forSegmentAt: 2)\n    }\n    \n    class func cellHeight() -> CGFloat {\n        return 61\n    }\n    \n    @IBAction func coldWalletKeyTypeValueChanged(_ sender: UISegmentedControl) {\n        let selectedIndex = sender.selectedSegmentIndex\n        delegate?.didSelectColdWalletKeyType(self, keyType: TLColdWalletKeyType(rawValue: selectedIndex)!)\n    }\n}\n"
  },
  {
    "path": "ArcBit/viewControllers/tableViewCells/createColdWalletTableViewCells/TLNewWalletTableViewCell.swift",
    "content": "//\n//  TLNewWalletTableViewCell.swift\n//  ArcBit\n//\n//  Created by Timothy Lee on 3/14/15.\n//  Copyright (c) 2015 Timothy Lee <stequald01@gmail.com>\n//\n//   This library is free software; you can redistribute it and/or\n//   modify it under the terms of the GNU Lesser General Public\n//   License as published by the Free Software Foundation; either\n//   version 2.1 of the License, or (at your option) any later version.\n//\n//   This library is distributed in the hope that it will be useful,\n//   but WITHOUT ANY WARRANTY; without even the implied warranty of\n//   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n//   Lesser General Public License for more details.\n//\n//   You should have received a copy of the GNU Lesser General Public\n//   License along with this library; if not, write to the Free Software\n//   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,\n//   MA 02110-1301  USA\n\nimport Foundation\nimport UIKit\n\n\nprotocol TLNewWalletTableViewCellDelegate {\n    func didClickShowQRCodeButton(_ cell: TLNewWalletTableViewCell, data: String)\n    func didClickMnemonicInfoButton(_ cell: TLNewWalletTableViewCell)\n    func didClickAccountInfoButton(_ cell: TLNewWalletTableViewCell)\n}\n\n@objc(TLNewWalletTableViewCell) class TLNewWalletTableViewCell:UITableViewCell {\n    required init?(coder aDecoder: NSCoder) {\n        super.init(coder: aDecoder)\n    }\n    \n    @IBOutlet var mnemonicLabel:UILabel!\n    @IBOutlet var mnemonicTextView:UITextView!\n    @IBOutlet var newWalletButton:UIButton!\n    @IBOutlet weak var accountIDLabel: UILabel!\n    @IBOutlet var accountIDTextField: UITextField!\n    @IBOutlet weak var accountPublicKeyLabel: UILabel!\n    @IBOutlet var accountPublicKeyTextView:UITextView!\n    @IBOutlet var showAccountPublicKeyQRButton:UIButton!\n    var delegate: TLNewWalletTableViewCellDelegate?\n    \n    override init(style:UITableViewCellStyle, reuseIdentifier:String?) {\n        super.init(style:style, reuseIdentifier:reuseIdentifier)\n    }\n    \n    override func awakeFromNib() {\n        super.awakeFromNib()\n        self.mnemonicLabel.text = TLDisplayStrings.BACK_UP_PASSPHRASE_STRING()+\":\"\n        self.accountIDLabel.text = TLDisplayStrings.ACCOUNT_ID_STRING()+\":\"\n        self.accountPublicKeyLabel.text = TLDisplayStrings.ACCOUNT_PUBLIC_KEY_STRING()+\":\"\n        self.newWalletButton.setTitle(TLDisplayStrings.NEW_WALLET(), for: .normal)\n        self.showAccountPublicKeyQRButton.setTitle(TLDisplayStrings.QR_CODE_STRING(), for: .normal)\n\n        self.mnemonicTextView.layer.borderWidth = 1.0\n        self.mnemonicTextView.layer.borderColor = UIColor.black.cgColor\n        self.mnemonicTextView.text = nil\n        self.mnemonicTextView.autocorrectionType = UITextAutocorrectionType.no\n        self.mnemonicTextView.autocapitalizationType = .none\n        self.newWalletButton.backgroundColor = TLColors.mainAppColor()\n        self.newWalletButton.setTitleColor(TLColors.mainAppOppositeColor(), for:UIControlState())\n        self.newWalletButton.titleLabel!.adjustsFontSizeToFitWidth = true\n        self.accountIDTextField.keyboardType = UIKeyboardType.numberPad\n        self.accountIDTextField.autocorrectionType = UITextAutocorrectionType.no\n        self.accountPublicKeyTextView.layer.borderWidth = 1.0\n        self.accountPublicKeyTextView.alpha = 0.5\n        self.accountPublicKeyTextView.text = nil\n        self.accountPublicKeyTextView.isUserInteractionEnabled = false\n        self.showAccountPublicKeyQRButton.backgroundColor = TLColors.mainAppColor()\n        self.showAccountPublicKeyQRButton.setTitleColor(TLColors.mainAppOppositeColor(), for:UIControlState())\n        self.showAccountPublicKeyQRButton.alpha = 0.5\n        self.showAccountPublicKeyQRButton.isEnabled = false\n    }\n    \n    class func cellHeight() -> CGFloat {\n        return 303\n    }\n    \n    @IBAction func clickedMnemonicInfoButton(_ sender: AnyObject) {\n        delegate?.didClickMnemonicInfoButton(self)\n    }\n    \n    @IBAction func clickedAccountInfoButton(_ sender: AnyObject) {\n        delegate?.didClickAccountInfoButton(self)\n    }\n    \n    @IBAction fileprivate func newWalletButtonClicked(_ sender:UIButton) {\n        if let mnemonicPassphrase = TLHDWalletWrapper.generateMnemonicPassphrase() {\n            self.mnemonicTextView.text = mnemonicPassphrase\n            self.didUpdateMnemonic(mnemonicPassphrase)\n        }\n    }\n    \n    @IBAction fileprivate func showAccountPublicKeyQRButtonClicked(_ sender:UIButton) {\n        let accountPublicKey = self.accountPublicKeyTextView.text\n        if accountPublicKey != nil && !accountPublicKey!.isEmpty && TLHDWalletWrapper.isValidExtendedPublicKey(accountPublicKey!) {\n            delegate?.didClickShowQRCodeButton(self, data: accountPublicKey!)\n        }\n    }\n    \n    func didUpdateMnemonic(_ mnemonicPassphrase: String) {\n        let masterHex = TLHDWalletWrapper.getMasterHex(mnemonicPassphrase)\n        if let accountID = UInt(self.accountIDTextField.text!) {\n            let extendedPublicKey = TLHDWalletWrapper.getExtendPubKeyFromMasterHex(masterHex, accountIdx: accountID)\n            self.updateAccountPublicKeyTextView(extendedPublicKey)\n        } else {\n            self.accountIDTextField.text = \"0\"\n            let extendedPublicKey = TLHDWalletWrapper.getExtendPubKeyFromMasterHex(masterHex, accountIdx: 0)\n            self.updateAccountPublicKeyTextView(extendedPublicKey)\n        }\n    }\n\n    func updateAccountPublicKeyTextView(_ extendedPublicKey: String?) {\n        if extendedPublicKey == nil {\n            self.showAccountPublicKeyQRButton.isEnabled = false\n            self.showAccountPublicKeyQRButton.alpha = 0.5\n            self.accountPublicKeyTextView.text = nil\n            return\n        }\n        self.showAccountPublicKeyQRButton.isEnabled = true\n        self.showAccountPublicKeyQRButton.alpha = 1\n        self.accountPublicKeyTextView.text = extendedPublicKey!\n        \n        // shrink text to fit textview\n        var fontSize:CGFloat = (self.accountPublicKeyTextView.font?.pointSize)!\n        self.accountPublicKeyTextView.font = self.accountPublicKeyTextView.font?.withSize(fontSize)\n        while (self.accountPublicKeyTextView.contentSize.height > self.accountPublicKeyTextView.frame.size.height && fontSize > 8.0) {\n            fontSize -= 1.0\n            self.accountPublicKeyTextView.font = self.accountPublicKeyTextView.font?.withSize(fontSize)\n        }\n    }\n}\n"
  },
  {
    "path": "ArcBit/viewControllers/tableViewCells/spendColdWalletTableViewCells/TLInputColdWalletKeyTableViewCell.swift",
    "content": "//\n//  TLInputColdWalletKeyTableViewCell.swift\n//  ArcBit\n//\n//  Created by Timothy Lee on 3/14/15.\n//  Copyright (c) 2015 Timothy Lee <stequald01@gmail.com>\n//\n//   This library is free software; you can redistribute it and/or\n//   modify it under the terms of the GNU Lesser General Public\n//   License as published by the Free Software Foundation; either\n//   version 2.1 of the License, or (at your option) any later version.\n//\n//   This library is distributed in the hope that it will be useful,\n//   but WITHOUT ANY WARRANTY; without even the implied warranty of\n//   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n//   Lesser General Public License for more details.\n//\n//   You should have received a copy of the GNU Lesser General Public\n//   License along with this library; if not, write to the Free Software\n//   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,\n//   MA 02110-1301  USA\n\nimport Foundation\nimport UIKit\n\n\nprotocol TLInputColdWalletKeyTableViewCellDelegate {\n    func didClickInputColdWalletKeyInfoButton(_ cell: TLInputColdWalletKeyTableViewCell)\n}\n\n@objc(TLInputColdWalletKeyTableViewCell) class TLInputColdWalletKeyTableViewCell:UITableViewCell {\n    required init?(coder aDecoder: NSCoder) {\n        super.init(coder: aDecoder)\n    }\n    \n    @IBOutlet var keyInputTextView:UITextView!\n    @IBOutlet var statusLabel: UILabel!\n    @IBOutlet weak var step2Label: UILabel!\n\n    var delegate: TLInputColdWalletKeyTableViewCellDelegate?\n    \n    override init(style:UITableViewCellStyle, reuseIdentifier:String?) {\n        super.init(style:style, reuseIdentifier:reuseIdentifier)\n    }\n    \n    override func awakeFromNib() {\n        super.awakeFromNib()\n        self.step2Label.text = TLDisplayStrings.AUTHORIZE_PAYMENT_STEP_2()\n        self.statusLabel.text = TLDisplayStrings.INCOMPLETE_STRING()\n        self.keyInputTextView.layer.borderWidth = 1.0\n        self.keyInputTextView.layer.borderColor = UIColor.black.cgColor\n        self.keyInputTextView.autocorrectionType = UITextAutocorrectionType.no\n        self.keyInputTextView.autocapitalizationType = .none\n        self.keyInputTextView.text = nil\n        self.setstatusLabel(false)\n    }\n    \n    class func cellHeight() -> CGFloat {\n        return 151\n    }\n    \n    @IBAction fileprivate func infoButtonClicked(_ sender:UIButton) {\n        delegate?.didClickInputColdWalletKeyInfoButton(self)\n    }\n    \n    func setstatusLabel(_ complete:Bool) {\n        if complete {\n            statusLabel.textColor = UIColor.green\n        } else {\n            statusLabel.textColor = UIColor.red\n        }\n    }\n}\n"
  },
  {
    "path": "ArcBit/viewControllers/tableViewCells/spendColdWalletTableViewCells/TLPassSignedTxTableViewCell.swift",
    "content": "//\n//  TLPassSignedTxTableViewCell.swift\n//  ArcBit\n//\n//  Created by Timothy Lee on 3/14/15.\n//  Copyright (c) 2015 Timothy Lee <stequald01@gmail.com>\n//\n//   This library is free software; you can redistribute it and/or\n//   modify it under the terms of the GNU Lesser General Public\n//   License as published by the Free Software Foundation; either\n//   version 2.1 of the License, or (at your option) any later version.\n//\n//   This library is distributed in the hope that it will be useful,\n//   but WITHOUT ANY WARRANTY; without even the implied warranty of\n//   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n//   Lesser General Public License for more details.\n//\n//   You should have received a copy of the GNU Lesser General Public\n//   License along with this library; if not, write to the Free Software\n//   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,\n//   MA 02110-1301  USA\n\nimport Foundation\nimport UIKit\n\n\nprotocol TLPassSignedTxTableViewCellDelegate {\n    func didClickPassButton(_ cell: TLPassSignedTxTableViewCell)\n    func didClickPassSignedTxInfoButton(_ cell: TLPassSignedTxTableViewCell)\n}\n\n@objc(TLPassSignedTxTableViewCell) class TLPassSignedTxTableViewCell:UITableViewCell {\n    required init?(coder aDecoder: NSCoder) {\n        super.init(coder: aDecoder)\n    }\n    \n    @IBOutlet var passButton:UIButton!\n    @IBOutlet weak var step3Label: UILabel!\n\n    var delegate: TLPassSignedTxTableViewCellDelegate?\n    \n    override init(style:UITableViewCellStyle, reuseIdentifier:String?) {\n        super.init(style:style, reuseIdentifier:reuseIdentifier)\n    }\n    \n    override func awakeFromNib() {\n        super.awakeFromNib()\n        self.step3Label.text = TLDisplayStrings.AUTHORIZE_PAYMENT_STEP_3()\n        self.passButton.setTitle(TLDisplayStrings.PASS(), for: .normal)\n        self.passButton.backgroundColor = TLColors.mainAppColor()\n        self.passButton.setTitleColor(TLColors.mainAppOppositeColor(), for:UIControlState())\n        self.passButton.isEnabled = false\n        self.passButton.alpha = 0.5\n    }\n    \n    class func cellHeight() -> CGFloat {\n        return 88\n    }\n    \n    @IBAction fileprivate func infoButtonClicked(_ sender:UIButton) {\n        delegate?.didClickPassSignedTxInfoButton(self)\n    }\n    \n    @IBAction fileprivate func passButtonClicked(_ sender:UIButton) {\n        delegate?.didClickPassButton(self)\n    }\n}\n"
  },
  {
    "path": "ArcBit/viewControllers/tableViewCells/spendColdWalletTableViewCells/TLScanUnsignedTxTableViewCell.swift",
    "content": "//\n//  TLScanUnsignedTxTableViewCell.swift\n//  ArcBit\n//\n//  Created by Timothy Lee on 3/14/15.\n//  Copyright (c) 2015 Timothy Lee <stequald01@gmail.com>\n//\n//   This library is free software; you can redistribute it and/or\n//   modify it under the terms of the GNU Lesser General Public\n//   License as published by the Free Software Foundation; either\n//   version 2.1 of the License, or (at your option) any later version.\n//\n//   This library is distributed in the hope that it will be useful,\n//   but WITHOUT ANY WARRANTY; without even the implied warranty of\n//   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n//   Lesser General Public License for more details.\n//\n//   You should have received a copy of the GNU Lesser General Public\n//   License along with this library; if not, write to the Free Software\n//   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,\n//   MA 02110-1301  USA\n\nimport Foundation\nimport UIKit\n\n\nprotocol TLScanUnsignedTxTableViewCellDelegate {\n    func didClickScanButton(_ cell: TLScanUnsignedTxTableViewCell)\n    func didClickScanUnsignedTxInfoButton(_ cell: TLScanUnsignedTxTableViewCell)\n}\n\n@objc(TLScanUnsignedTxTableViewCell) class TLScanUnsignedTxTableViewCell:UITableViewCell {\n    required init?(coder aDecoder: NSCoder) {\n        super.init(coder: aDecoder)\n    }\n    \n    @IBOutlet var scanButton:UIButton!\n    @IBOutlet var statusLabel: UILabel!\n    @IBOutlet weak var step1Label: UILabel!\n\n    var delegate: TLScanUnsignedTxTableViewCellDelegate?\n    \n    override init(style:UITableViewCellStyle, reuseIdentifier:String?) {\n        super.init(style:style, reuseIdentifier:reuseIdentifier)\n    }\n    \n    override func awakeFromNib() {\n        super.awakeFromNib()\n        self.step1Label.text = TLDisplayStrings.AUTHORIZE_PAYMENT_STEP_1()\n        self.scanButton.setTitle(TLDisplayStrings.SCAN(), for: .normal)\n        \n        self.scanButton.backgroundColor = TLColors.mainAppColor()\n        self.scanButton.setTitleColor(TLColors.mainAppOppositeColor(), for:UIControlState())\n        self.setstatusLabel(0, totalParts: 0)\n    }\n    \n    class func cellHeight() -> CGFloat {\n        return 88\n    }\n    \n    @IBAction fileprivate func infoButtonClicked(_ sender:UIButton) {\n        delegate?.didClickScanUnsignedTxInfoButton(self)\n    }\n    \n    @IBAction fileprivate func scanButtonClicked(_ sender:UIButton) {\n        delegate?.didClickScanButton(self)\n    }\n\n    func setInvalidScannedData() {\n        statusLabel.textColor = UIColor.red\n        statusLabel.text = TLDisplayStrings.INVALID_SCANNED_DATA_STRING()\n    }\n\n    func setstatusLabel(_ partsScanned: Int, totalParts: Int) {\n        if partsScanned == 0 && totalParts == 0 {\n            statusLabel.textColor = UIColor.red\n            statusLabel.text = TLDisplayStrings.INCOMPLETE_STRING()\n        } else if partsScanned < totalParts {\n            statusLabel.textColor = UIColor.red\n            statusLabel.text = \"\\(partsScanned)/\\(totalParts) \" + TLDisplayStrings.COMPLETE_STRING()\n        } else {\n            statusLabel.textColor = UIColor.green\n            statusLabel.text = \"\\(partsScanned)/\\(totalParts) \" + TLDisplayStrings.COMPLETE_STRING()\n        }\n    }\n}\n"
  },
  {
    "path": "ArcBit/viewControllers/tableViewCells/walletTableViewCells/TLAccountTableViewCell.swift",
    "content": "//\n//  TLAccountTableViewCell.swift\n//  ArcBit\n//\n//  Created by Timothy Lee on 3/14/15.\n//  Copyright (c) 2015 Timothy Lee <stequald01@gmail.com>\n//\n//   This library is free software; you can redistribute it and/or\n//   modify it under the terms of the GNU Lesser General Public\n//   License as published by the Free Software Foundation; either\n//   version 2.1 of the License, or (at your option) any later version.\n//\n//   This library is distributed in the hope that it will be useful,\n//   but WITHOUT ANY WARRANTY; without even the implied warranty of\n//   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n//   Lesser General Public License for more details.\n//\n//   You should have received a copy of the GNU Lesser General Public\n//   License along with this library; if not, write to the Free Software\n//   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,\n//   MA 02110-1301  USA\n\nimport Foundation\nimport UIKit\n\n@objc(TLAccountTableViewCell) class TLAccountTableViewCell:UITableViewCell {\n    required init?(coder aDecoder: NSCoder) {\n        super.init(coder: aDecoder)\n    }\n    \n    @IBOutlet var accountNameLabel : UILabel?\n    @IBOutlet var accountBalanceButton : UIButton?\n    \n    override func awakeFromNib() {\n        super.awakeFromNib()\n        accountBalanceButton!.backgroundColor = TLColors.mainAppColor()\n        self.accountBalanceButton!.setTitleColor(TLColors.mainAppOppositeColor(), for:UIControlState())\n        self.accountBalanceButton!.titleLabel!.adjustsFontSizeToFitWidth = true\n    }\n    \n    override init(style: UITableViewCellStyle, reuseIdentifier: String?) {\n        super.init(style: UITableViewCellStyle.subtitle, reuseIdentifier: reuseIdentifier)\n        \n    }\n    \n    override func setSelected(_ selected:Bool, animated:Bool) -> () {\n        super.setSelected(selected, animated:animated)\n    }\n    \n    @IBAction fileprivate func accountBalanceButtonClicked(_ sender:UIButton) {\n        TLPreferences.setDisplayLocalCurrency(!TLPreferences.isDisplayLocalCurrency())\n        TLPreferences.setInAppSettingsKitDisplayLocalCurrency(TLPreferences.isDisplayLocalCurrency())\n    }\n}\n"
  },
  {
    "path": "ArcBit/viewControllers/tableViewCells/walletTableViewCells/TLAddressTableViewCell.swift",
    "content": "//\n//  TLAddressTableViewCell.swift\n//  ArcBit\n//\n//  Created by Timothy Lee on 3/14/15.\n//  Copyright (c) 2015 Timothy Lee <stequald01@gmail.com>\n//\n//   This library is free software; you can redistribute it and/or\n//   modify it under the terms of the GNU Lesser General Public\n//   License as published by the Free Software Foundation; either\n//   version 2.1 of the License, or (at your option) any later version.\n//\n//   This library is distributed in the hope that it will be useful,\n//   but WITHOUT ANY WARRANTY; without even the implied warranty of\n//   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n//   Lesser General Public License for more details.\n//\n//   You should have received a copy of the GNU Lesser General Public\n//   License along with this library; if not, write to the Free Software\n//   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,\n//   MA 02110-1301  USA\n\nimport Foundation\nimport UIKit\n\n@objc(TLAddressTableViewCell) class TLAddressTableViewCell:UITableViewCell {\n    required init?(coder aDecoder: NSCoder) {\n        super.init(coder: aDecoder)\n    }\n    \n    @IBOutlet var addressLabel : UILabel?\n    @IBOutlet var numberOfTransactionsCountLabel : UILabel?\n    @IBOutlet var amountButton : UIButton?\n    \n    override func awakeFromNib() {\n        super.awakeFromNib()\n        self.amountButton!.backgroundColor = TLColors.mainAppColor()\n        self.amountButton!.setTitleColor(TLColors.mainAppOppositeColor(), for:UIControlState())\n        self.amountButton!.titleLabel!.adjustsFontSizeToFitWidth = true\n    }\n    \n    override func setSelected(_ selected:Bool, animated:Bool) -> () {\n        super.setSelected(selected, animated:animated)\n    }\n    \n    @IBAction fileprivate func amountButtonClicked(_ sender:UIButton) {\n        TLPreferences.setDisplayLocalCurrency(!TLPreferences.isDisplayLocalCurrency())\n        TLPreferences.setInAppSettingsKitDisplayLocalCurrency(TLPreferences.isDisplayLocalCurrency())\n    }\n}\n"
  },
  {
    "path": "ArcBit/viewControllers/tableViewCells/walletTableViewCells/TLTransactionTableViewCell.swift",
    "content": "//\n//  TLTransactionTableViewCell.swift\n//  ArcBit\n//\n//  Created by Timothy Lee on 3/14/15.\n//  Copyright (c) 2015 Timothy Lee <stequald01@gmail.com>\n//\n//   This library is free software; you can redistribute it and/or\n//   modify it under the terms of the GNU Lesser General Public\n//   License as published by the Free Software Foundation; either\n//   version 2.1 of the License, or (at your option) any later version.\n//\n//   This library is distributed in the hope that it will be useful,\n//   but WITHOUT ANY WARRANTY; without even the implied warranty of\n//   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n//   Lesser General Public License for more details.\n//\n//   You should have received a copy of the GNU Lesser General Public\n//   License along with this library; if not, write to the Free Software\n//   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,\n//   MA 02110-1301  USA\n\nimport Foundation\nimport UIKit\n\n\n@objc(TLTransactionTableViewCell) class TLTransactionTableViewCell:UITableViewCell {\n    required init?(coder aDecoder: NSCoder) {\n        super.init(coder: aDecoder)\n    }\n    \n    @IBOutlet var dateLabel:UILabel?\n    @IBOutlet var currencyLabel:UILabel?\n    @IBOutlet var amountLabel:UILabel?\n    @IBOutlet var descriptionLabel:UILabel?\n    @IBOutlet var confirmationsLabel:UILabel?\n    @IBOutlet var amountButton:UIButton?\n    @IBOutlet var confirmedStatusImageView:UIImageView?\n    \n    @IBAction fileprivate func amountButtonClicked(_ sender:UIButton) {\n        TLPreferences.setDisplayLocalCurrency(!TLPreferences.isDisplayLocalCurrency())\n        TLPreferences.setInAppSettingsKitDisplayLocalCurrency(TLPreferences.isDisplayLocalCurrency())\n    }\n    \n    override init(style:UITableViewCellStyle, reuseIdentifier:String?) {\n        super.init(style:style, reuseIdentifier:reuseIdentifier)\n    }\n    \n    override func awakeFromNib() {\n        super.awakeFromNib()\n        \n        self.amountButton!.backgroundColor = TLColors.mainAppColor()\n        self.amountButton!.setTitleColor(TLColors.mainAppOppositeColor(), for:UIControlState())\n        self.amountButton!.titleLabel!.adjustsFontSizeToFitWidth = true\n    }\n        \n    override func setSelected(_ selected:Bool, animated:Bool) -> () {\n        super.setSelected(selected, animated:animated)\n    }\n}\n"
  },
  {
    "path": "ArcBit/zh-Hans-CN.lproj/Localizable.strings",
    "content": "\"\" = \"\";\n\n\"%@ is not allowed to access the camera\" = \"%@不允许访问相机\";\n\n\"%@ servers not reachable.\" = \"%@服务器无法访问。\";\n\n\"%d/%d parts scanned.\" = \"%d/%d个部分进行扫描。\";\n\n\"%llu confirmations\" = \"%llu个确认深度\";\n\n\"1 Confirmation\" = \"1个确认深度\";\n\n\"A bitcoin address typically begins with a '1' or '3'. You can see the transactions and track the balance of an address, but you cannot spend from an imported address.\\nYou can temporarily import this watch addresses private key to spend its bitcoins. Simply go the Send screen and select a watch address to spend from and you will be prompted to temporarily import your addresses' private key when you click 'Review Payment' in the Send screen. The private key will stay in memory until the app exits or until you remove it manually in the Accounts screen.\" = \"比特币地址通常以“1”或“3”开头。 您可以查看交易并跟踪地址的余额，但无法从导入的地址消费。\\n您可以暂时导入此监控地址私钥以使用比特币。 只需进入发送屏幕并选择一个监控地址，然后在发送屏幕中点击“审查付款”时，系统会提示您临时导入地址的私钥。 私钥将保留在内存中，直到应用程序退出或直到您在“账户”屏幕中手动删除它。\";\n\n\"A bitcoin wallet is a software application that allows people to send, receive and manage their bitcoins.\\nBe aware of how other bitcoin applications store your bitcoins' private keys, which are needed to spend your bitcoins.\\nThere are generally three different ways applications can your store your bitcoins.\\n1.\\nThe banking model, where your bitcoin private keys are held for you by someone else.\\n2.\\nThe security box model, where your bitcoin private keys are stored encrypted on someone else’s servers.\\n3.\\nThe wallet model, where your bitcoin private keys are stored only on your device.\" = \"比特币钱包是一种允许人们发送、接收和管理比特币的软件应用程序。\\n请注意其他比特币应用程序如何存储您的比特币私钥（这是比特币支付所必需的）。\\n对APP而言通常可以有三种不同的方式存储您的比特币私钥。\\n1.\\n银行模式，您的比特币私钥由其他人持有。\\n2.\\n安全箱模式，您的比特币私钥在其他人的服务器上加密存储。\\n3.\\n钱包模式，您的比特币私钥只存储在您的设备上。\";\n\n\"A private key begins with an 'L', 'K', or '5'.\\nBIP 38 encrypted private keys can also be imported. They can either be imported encrypted or unencrypted. If you choose to import it encrypted, you will need to input the password each time you spend from your encrypted private key.\" = \"私钥以字符“L”，“K”或“5”打头。\\nBIP38加密的私钥也可以导入。您可以将它们以加密或不加密方式导入。如果您选择加密导入，则每次使用加密私钥时都需要输入密码。\";\n\n\"Account %@ imported\" = \"账户%@已导入\";\n\n\"Account %lu\" = \"账户 %lu\";\n\n\"Account 1\" = \"账户 1\";\n\n\"Account ID\" = \"账户ID\";\n\n\"Account ID: %u\" = \"账户ID: %u\";\n\n\"Account Private Key\" = \"账户私钥\";\n\n\"Account Public Key\" = \"账户公钥\";\n\n\"Account private key does not match imported account public key\" = \"账户私钥不匹配导入的账户公钥\";\n\n\"Account private key missing\" = \"账户私钥缺失\";\n\n\"Accounts\" = \"账户列表\";\n\n\"Achievement List\" = \"成就列表\";\n\n\"Achievements\" = \"成就\";\n\n\"Actions\" = \"操作\";\n\n\"Active Change Addresses\" = \"活跃的找零地址\";\n\n\"Active Main Addresses\" = \"活跃的主地址\";\n\n\"Add Contacts Entry\" = \"添加联系人条目\";\n\n\"Address\" = \"地址\";\n\n\"Address ID \" = \"地址ID \";\n\n\"Address ID: %lu\" = \"地址ID: %lu\";\n\n\"Addresses\" = \"地址列表\";\n\n\"Advanced Achievement List\" = \"高级成就列表\";\n\n\"Advanced FAQ\" = \"高级常见问题\";\n\n\"Advanced how To:\" = \"高级操作说明:\";\n\n\"After a transaction is broadcast to the Bitcoin network, it may be included in a block that is published to the network. When that happens, it is said that the transaction has been mined at a depth of 1 block. With each subsequent block that is found, the number of blocks deep is increased by one. To be secure against double spending, a transaction should not be considered as confirmed until it is a certain number of blocks deep.\\nA good rule of thumb is that 1 confirmation is good for small value amounts of bitcoins and a user should wait for more confirmations for larger value amounts.\\nArcBit will display the confirmation number up until the 6th confirmation.\" = \"在交易被广播到比特币网络之后，它可能被包含在发布到网络的块中。当这种情况发生时，意味着这笔交易已经被开采了1个区块的深度。随着后续区块的陆续开采，此块的深度逐步增加。为了防止双重支出，交易在达到一定的区块深度之前不应该被视为得到确认。\\n一个较好的经验法则是，对于小额支付，1个确认深度是合适的；对于较大的金额，用户应该等待更多的确认深度。\\nArcBit将显示确认深度直到达到6个。\";\n\n\"Amount:\" = \"数量：\";\n\n\"An account is a collection of bitcoin addresses. With accounts, you will no longer have to manage bitcoin addresses directly anymore. Since address reuse results in a loss of privacy for people using Bitcoin, ArcBit’s HD wallet account system will automatically handle the cycling of bitcoin addresses for you. This ensures you don’t use the same bitcoin address more then once.\\nEach account also has a reusable address. You can find it in your Receive screen. Swipe all the way to right on the QRCode in your Receive screen and you will find a reusable address.\\nYou can create an unlimited amount of accounts with ArcBit. See the help section on how to create a new account in ArcBit.\" = \"一个账户是若干比特币地址的集合。有了账户，您将不再需要直接管理比特币地址了。由于地址重用会导致比特币用户损失隐私，ArcBit的HD钱包账户系统将自动为您处理比特币地址的循环。这可以确保您不会重复使用同一个比特币地址。\\n每个账户也有一个可重用地址。您可以在接收屏幕中找到它。在接收屏幕上一直滑动到最右侧的二维码，您将找到可重用地址。\\n您可以使用ArcBit创建任意数量的账户。请参阅帮助部分了解如何在ArcBit中创建新账户。\";\n\n\"An account private key begins with the letters 'xprv'. You can see, spend and recover the transactions and bitcoins of an entire account from an account private key.\" = \"一个账号私钥以字母“xprv”开头。您可以通过账户私钥查看、支付和恢复整个账户的交易和比特币。\";\n\n\"An account public key begins with the letters 'xpub'. You can see the transactions and bitcoins of an entire account from an account private key, with the exception of reusable address payments. Future releases will address this issue.\\nYou can temporarily import the corresponding account private key for this accounts' account public key to spend your watch accounts' bitcoins. Simply go to the Send screen and select a watch account to spend from and you will be prompted to temporarily import your account's private key when you click 'Review Payment' on the Send screen. The private key will stay in memory until the app exits or until you remove it manually on the Accounts screen.\" = \"账号公钥以字母“xpub”开头。您可以通过账户私钥查看整个账户的交易和比特币，但可重用地址付款除外。未来的版本将解决这个问题。\\n您可以临时导入账户相对应的私钥以支付您的监视账户中的比特币。只需进入发送屏幕，选择一个监视账户，然后在发送屏幕上单击“审查付款”，此时系统会提示您临时导入账户的私钥。私钥将保留在内存中，直到应用程序退出，或您在“账户”屏幕上手动删除它。\";\n\n\"ArcBit Brain Wallet\" = \"ArcBit脑钱包\";\n\n\"ArcBit Web Wallet\" = \"ArcBit网页钱包\";\n\n\"ArcBit uses the the bitcoin wallet model (See the section ’What is a bitcoin wallet?’ to understand the 3 different security models of bitcoin software). However, if you use iCloud to backup your wallet, you will be using the security box model. It is recommended that you do not use iCloud and be responsible for your bitcoins yourself. For those who don’t want to remember a simple backup passphrase, iCloud backup is a good alternative.\" = \"ArcBit使用比特币钱包模型（请参阅“什么是比特币钱包”以了解比特币软件的三种不同安全模型）。但是，如果您使用iCloud备份您的钱包，则将使用安全箱模型。建议您不要使用iCloud并自行负责您的比特币。对于那些不想记住简单的备份短语的人来说，iCloud备份是一个不错的选择。\";\n\n\"Archive Account\" = \"封存账户\";\n\n\"Archive address\" = \"封存地址\";\n\n\"Archived Accounts\" = \"封存账户列表\";\n\n\"Archived Change Addresses\" = \"封存活跃的找零地址\";\n\n\"Archived Cold Wallet Accounts\" = \"封存的冷钱包账户列表\";\n\n\"Archived Imported Accounts\" = \"已封存的导入账户列表\";\n\n\"Archived Imported Addresses\" = \"已封存的导入地址列表\";\n\n\"Archived Imported Watch Accounts\" = \"已封存的导入的监视账户列表\";\n\n\"Archived Imported Watch Addresses\" = \"已封存的导入的监视地址列表\";\n\n\"Archived Main Addresses\" = \"已封存的主地址\";\n\n\"Are you sure you want to archive account %@?\" = \"您确定要封存账户%@吗？\";\n\n\"Are you sure you want to archive address %@?\" = \"您确定要封存地址%@吗？\";\n\n\"Are you sure you want to delete this account?\" = \"您确定要删除这个账户吗？\";\n\n\"Are you sure you want to unarchive account %@\" = \"您确定您想解除封存账户%@吗？\";\n\n\"Are you sure you want to unarchive address %@?\" = \"您确定您想解除封存地址%@吗？\";\n\n\"Authorize Cold Wallet Account Payment\" = \"授权冷钱包账户付款\";\n\n\"Authorize Payment\" = \"授权付款\";\n\n\"Backup Passphrase\" = \"备份短语\";\n\n\"Backup wallet\" = \"备份钱包\";\n\n\"Backup local wallet\" = \"备份本地钱包\";\n\n\"Backup passphrase found in keychain\" = \"在钥匙扣中找到备份短语\";\n\n\"Bitcoin cuts out the middleman and allows you to send money anywhere in the world with an internet connection with minimum to zero fees.\" = \"比特币免去了中间商，并允许您通过互联网向世界任何地方汇款，收费最低为零。\";\n\n\"Bitcoin, uppercase 'B', is an online payment system invented in 2008 and released as open-source software in 2009 by a programmer named Satoshi Nakamoto. The system is decentralized and peer-to-peer allowing users to transact directly without needing an intermediary.\\nBitcoin is also a platform of which other decentralized applications can be built upon. Bitcoin, lowercase 'b' is the currency unit that Bitcoin uses.\" = \"比特币（大写字母'B'）是一个在线支付系统。中本聪于2008年发明了该系统，并于2009年作为开源软件发布。 该系统是去中心化的、对等的，允许用户直接进行交易，而不需要中间人。\\n比特币也是一个平台，允许其他去中心化的应用程序建立在这个平台上。 比特币（小写字母'b'）是比特币使用的货币单位。\";\n\n\"Bitcoins can be purchased from various bitcoin exchanges. ArcBit is not a bitcoin exchange. ArcBit is a bitcoin wallet. After you purchase some bitcoins from an exchange, you can move it to a bitcoin wallet.\" = \"您可以从很多比特币交易所买到比特币。 ArcBit不是比特币交易所，而是比特币钱包。您从交易所购买比特币后，可以将其转移到比特币钱包。\";\n\n\"Cancel\" = \"取消\";\n\n\"Cannot archive your default account\" = \"不能封存默认账户\";\n\n\"Cannot archive your one and only account\" = \"不能封存唯一的账户\";\n\n\"Cannot create transactions with outputs less then %@\" = \"无法创建输出小于%@的交易\";\n\n\"Cannot decrypt iCloud backup wallet.\" = \"无法解密iCloud备份钱包。\";\n\n\"Cannot import reusable address\" = \"无法导入可重用地址\";\n\n\"Change Address ID \" = \"找零地址ID \";\n\n\"Change Automatic Transaction Fee\" = \"更改自动交易费\";\n\n\"Change Block Explorer URL\" = \"更改区块浏览器网址\";\n\n\"Change Blockexplorer Type\" = \"更改区块浏览器类型\";\n\n\"Check out the ArcBit Brain Wallet\" = \"检查ArcBit脑钱包\";\n\n\"Check out the ArcBit Web Wallet\" = \"检查ArcBit网页钱包\";\n\n\"Check out the ArcBit Web Wallet!\" = \"检查ArcBit网页钱包!\";\n\n\"Checking Transaction\" = \"检查交易\";\n\n\"Clear account private key from memory\" = \"从内存中清除账户私钥\";\n\n\"Clear private key from memory\" = \"从内存中清除私钥\";\n\n\"Cleared from memory\" = \"已从内存中清除\";\n\n\"Click an address\" = \"点击一个地址\";\n\n\"Click the button with the arrow\" = \"点击带有箭头的按键\";\n\n\"Click the plus button at the top right\" = \"点击右上角的加号键\";\n\n\"Click the ‘Contacts’ button\" = \"点击“联系人”按键\";\n\n\"Click ‘Accounts’\" = \"点击“账户”\";\n\n\"Click ‘Advanced settings’\" = \"点击“高级设置”\";\n\n\"Click ‘Archive Account’\" = \"点击“封存账户”\";\n\n\"Click ‘Create New Account’\" = \"点击“创建新账户”\";\n\n\"Click ‘Delete’\" = \"点击“删除”\";\n\n\"Click ‘Done’\" = \"点击“完成”\";\n\n\"Click ‘Edit Account Name’\" = \"点击“编辑账户名称”\";\n\n\"Click ‘Edit’\" = \"点击“编辑”\";\n\n\"Click ‘Enable PIN Code’\" = \"点击“启用PIN代码”\";\n\n\"Click ‘History’\" = \"点击“历史”\";\n\n\"Click ‘Import Account’\" = \"点击“导入账户”\";\n\n\"Click ‘Import Private Key’\" = \"点击“导入私钥”\";\n\n\"Click ‘Import Watch Only Account’\" = \"点击“导入监视账户”\";\n\n\"Click ‘Import Watch Only Address’\" = \"点击“导入监视地址”\";\n\n\"Click ‘Label transaction’\" = \"点击“给交易贴标签”\";\n\n\"Click ‘Restore Wallet’\" = \"点击“恢复钱包”\";\n\n\"Click ‘Restore’\" = \"点击“恢复”\";\n\n\"Click ‘Review Payment’\" = \"点击“审查付款”\";\n\n\"Click ‘Send’\" = \"点击“发送”\";\n\n\"Click ‘Set Transaction Fee’\" = \"点击“设置交易费”\";\n\n\"Click ‘Settings’\" = \"点击“设置”\";\n\n\"Click ‘Show Backup Passphrase’\" = \"点击“显示备份短语”\";\n\n\"Click ‘View Addresses’\" = \"点击“查看地址列表”\";\n\n\"Click ‘View account private key QR code’\" = \"点击“查看账户私钥二维码”\";\n\n\"Click ‘View account public key QR code’\" = \"点击“查看账户公钥二维码”\";\n\n\"Click ‘View address QR code’\" = \"点击“查看地址二维码”\";\n\n\"Click ‘View in web’\" = \"点击“在网页中查看”\";\n\n\"Click ‘View private key QR code’\" = \"点击“查看私钥二维码”\";\n\n\"Click ‘blockexplorer API type’\" = \"点击“区块浏览器API类型”\";\n\n\"Click ’Receive’\" = \"点击“接收”\";\n\n\"Close\" = \"关闭\";\n\n\"Cold Wallet\" = \"冷钱包\";\n\n\"Cold Wallet Accounts\" = \"冷钱包账户列表\";\n\n\"Cold Wallet Accounts can't see reusable address payments, thus this accounts' reusable address is not available.\" = \"冷钱包账户无法查看可重用地址付款，因而该账户的可重用地址不可用。\";\n\n\"Cold Wallet Overview\" = \"冷钱包概述\";\n\n\"Cold wallet private keys are not stored here and cannot be viewed\" = \"冷钱包私钥不存储在这里，无法查看。\";\n\n\"Complete\" = \"完成\";\n\n\"Complete step 1\" = \"完成第1步\";\n\n\"Confirm Payment\" = \"确认付款\";\n\n\"Confirm Pin Code\" = \"确认PIN码\";\n\n\"Contacts\" = \"联系人\";\n\n\"Continue\" = \"继续\";\n\n\"Copied To clipboard\" = \"已复制到剪贴板\";\n\n\"Copy\" = \"复制\";\n\n\"Copy Transaction ID to Clipboard\" = \"复制交易ID到剪贴板\";\n\n\"Create Cold Wallet\" = \"新建冷钱包\";\n\n\"Create New Account\" = \"新建新账户\";\n\n\"Create new contact\" = \"新建联系人\";\n\n\"Customize Fee\" = \"定制交易费\";\n\n\"Decrypting\" = \"解密\";\n\n\"Delete\" = \"删除\";\n\n\"Delete %@\" = \"删除 %@\";\n\n\"Delete Account\" = \"删除账户\";\n\n\"Delete Contact\" = \"删除联系人\";\n\n\"Delete address\" = \"删除地址\";\n\n\"Do not use the QR code from here to receive bitcoins. Go to the Receive screen to get a QR code to receive bitcoins.\" = \"不要使用这里的二维码接受比特币。进入接收屏幕得到一个QR二维码以接收比特币。\";\n\n\"Do you like using ArcBit?\" = \"您喜欢用ArcBit吗？\";\n\n\"Do you want to load and backup your current local wallet file?\" = \"您要加载和备份您当前的本地钱包文件吗？\";\n\n\"Do you want to load local wallet file?\" = \"要加载本地钱包文件吗？\";\n\n\"Do you want to restore from your backup passphrase or start a new wallet?\" = \"您想从您的备份短语恢复或启动一个新的钱包？\";\n\n\"Do you want to temporary import your account private key?\" = \"您想临时导入账户私钥？\";\n\n\"Do you want to temporary import your private key?\" = \"您想临时导入私钥？\";\n\n\"Don't remind me\" = \"不要提醒我\";\n\n\"Done\" = \"完成\";\n\n\"Each account has a public and private account key. Account keys should be kept secret as they are used to view the account's transactions and spend the account's bitcoins.\" = \"每个账户都有一个公钥和一个私钥。账户公钥和私钥都应当妥善保管，因为它们可以被用来查看账户的交易，以及支付账户里的比特币。\";\n\n\"Edit\" = \"编辑\";\n\n\"Edit Account Name\" = \"编辑账户名称\";\n\n\"Edit Contact Name\" = \"编辑联系人姓名\";\n\n\"Edit Label\" = \"编辑标签\";\n\n\"Edit Transaction label\" = \"编辑交易标签\";\n\n\"Email Support\" = \"电子邮件支持\";\n\n\"Enable PIN code in settings to better secure your wallet.\" = \"在设置中启用PIN码以更好地保护您的钱包\";\n\n\"Enable Pin Code\" = \"启用PIN码\";\n\n\"Enable Transaction Fee\" = \"启用交易费\";\n\n\"Enable advanced mode\" = \"启用高级模式\";\n\n\"Encountered error creating transaction. Please try again.\" = \"创建交易时遇到错误。请再试一次。\";\n\n\"Encrypted\" = \"加密\";\n\n\"Enter Label\" = \"输入标签\";\n\n\"Enter PIN\" = \"输入PIN码\";\n\n\"Enter a wallet backup passphrase to wipe the current wallet and start/restore another.\" = \"输入一个钱包备份短语以擦除当前的钱包，并启用/还原另一个。\";\n\n\"Enter account private key\" = \"输入账户私钥\";\n\n\"Enter account public key\" = \"输入账户公钥\";\n\n\"Enter address\" = \"输入网址\";\n\n\"Enter an account ID and click 'QR Code'. Then on your primary online device, enable Cold Wallet in settings. Then go to the Accounts screen and click 'Import Cold Wallet Account' and scan the Account Public Key QR Code. Afterwards use this cold wallet account as you would a normal account and deposit bitcoins into it. When you want to make a payment from a cold wallet account, go to the next section on the previous screen and follow the step by step instructions there.\" = \"首先输入一个账户ID并点击“二维码”。然后在您的在线主设备上，在设置中启用冷钱包。然后进入账户屏幕，点击“导入冷钱包账户”并扫描账户公钥二维码。之后像使用正常账户一样使用这个冷钱包账户，并将比特币存入其中。如果您想从冷钱包账户中支付，请转至上一屏幕的下一部分，然后按照说明进行操作。\";\n\n\"Enter backup passphrase\" = \"输入备份短语\";\n\n\"Enter passphrase for your iCloud backup wallet.\" = \"为您的iCloud备份钱包输入短语。\";\n\n\"Enter password for encrypted private key\" = \"输入加密私钥的密码\";\n\n\"Enter the 12 word passphrase that belongs to the cold wallet account that you want to make a payment from. This is the passphrase that was used to generate your account public key that was generated on the 'Create Cold Wallet' section found on the previous screen.\" = \"输入您要从中付款的冷钱包账户所对应的12个单词的短语。这是前面的屏幕中的“创建冷钱包”部分生成的12单词短语，该短语被用来生成账户公钥。\";\n\n\"Error\" = \"错误\";\n\n\"Error fetching Transaction.\" = \"获取交易时遇到错误\";\n\n\"Error fetching unspent outputs. Try again later.\" = \"获取未使用的输出时遇到错误。请稍后再试。\";\n\n\"Error fetching unspent outputs. Try again.\" = \"获取未使用的输出时遇到错误。请再试一次。\";\n\n\"Error getting block height.\" = \"获取块高度时遇到错误。\";\n\n\"Error importing account\" = \"导入账户时出错\";\n\n\"Error loading wallet JSON file\" = \"加载钱包JSON文件时出错\";\n\n\"Explanation\" = \"说明\";\n\n\"FAQ\" = \"常见问题\";\n\n\"Fee:\" = \"费用：\";\n\n\"Fill address field\" = \"填充地址域\";\n\n\"Finished Passing Transaction Data\" = \"交易数据传送已完成\";\n\n\"First make sure you are using your secondary offline device for this screen (as mentioned in the overview on the previous screen). Click 'New Wallet' and write down or memorize the generated 12 word passphrase. This passphrase can recover and generate all your accounts and the bitcoins associated with it, so keep it safe and to yourself. Also instead of creating a new wallet, you can also input an existing 12 word passphrase that was generated here to create additional accounts.\" = \"首先请确保您正在使用您的离线辅设备打开此屏幕（如前一屏幕中的概述所述）。点击“新建钱包”，记下或记住生成的12个单词的短语。这个短语可以恢复并生成所有的账户、以及与之相关的比特币，所以请务必注意保密。或者，有别于创建一个新的钱包，您也可以输入这里生成的12个单词短语来创建额外的账户。\";\n\n\"Follow us on Twitter\" = \"在推特上关注我们\";\n\n\"From:\" = \"从：\";\n\n\"Funds have been claimed already.\" = \"资金已经被申报。\";\n\n\"Funds imported\" = \"资金导入完毕\";\n\n\"Go\" = \"出发\";\n\n\"Go to the side menu\" = \"转到侧边菜单\";\n\n\"Have sender scan QR code\" = \"让付款人扫描二维码\";\n\n\"Have sender send you payment\" = \"让付款人向您发送付款\";\n\n\"Help\" = \"帮助\";\n\n\"Here are some features that no other mobile bitcoin wallet supports.\\n- Reusable address support\\n- Ability to import individual account (extended) keys\\n- iCloud backup support\\n- Over 150 local currencies supported\" = \"这里有一些ArcBit独有的功能。\\n-可重用地址支持\\n-能够导入个人账户（扩展）密钥\\n- iCloud备份支持\\n-支持150多种本地货币\";\n\n\"Hierarchical Deterministic Wallet\" = \"分层确定性钱包\";\n\n\"History\" = \"历史\";\n\n\"How To:\" = \"如何:\";\n\n\"How do I get bitcoins?\" = \"如何获得比特币？\";\n\n\"How does ArcBit Wallet work?\" = \"ArcBit钱包是如何工作的？\";\n\n\"Import Account\" = \"导入账户\";\n\n\"Import Cold Wallet Account\" = \"导入冷钱包账户\";\n\n\"Import Feature\" = \"导入特性\";\n\n\"Import Private Key\" = \"导入私钥\";\n\n\"Import Private/Encrypted Key\" = \"导入私有/加密密钥\";\n\n\"Import Watch Account\" = \"导入监视账户\";\n\n\"Import Watch Address\" = \"导入监视地址\";\n\n\"Import private key encrypted or unencrypted?\" = \"将私钥导入为加密形式还是不加密形式？\";\n\n\"Import with QR code\" = \"以二维码导入\";\n\n\"Import with text input\" = \"以文本输入导入\";\n\n\"Imported Account %@\" = \"导入的账户%@\";\n\n\"Imported Accounts\" = \"导入的账户列表\";\n\n\"Imported Address\" = \"导入的地址\";\n\n\"Imported Addresses\" = \"导入的地址列表\";\n\n\"Imported Cold Wallet Account %@\" = \"导入冷钱包账户%@\";\n\n\"Imported Watch Account %@\" = \"导入监视账户%@\";\n\n\"Imported Watch Accounts\" = \"导入的监视账户列表\";\n\n\"Imported Watch Addresses\" = \"导入的监视地址列表\";\n\n\"Imported Watch Only Accounts can't see reusable address payments, thus this accounts' reusable address is not available. If you want see the reusable address for this account, import the account private key that corresponds to this accounts public key.\" = \"导入的监视账户列表无法看到可重用地址上的付款，因此此账户的可重用地址不可用。如果您想查看此账户的可重用地址，请导入与此账户对应的私钥。\";\n\n\"Importing Account\" = \"正在导入账户\";\n\n\"Importing Cold Wallet Account\" = \"正在导入冷钱包账户\";\n\n\"Importing a Private Key\" = \"正在导入私钥\";\n\n\"Importing a Watch Only Account\" = \"正在导入监视账户\";\n\n\"Importing a Watch Only Address\" = \"正在导入监视地址\";\n\n\"Importing an Account\" = \"正在导入账户\";\n\n\"Importing an encrypted key will require you to input the password every time you want to send bitcoins from it.\" = \"将密钥导入为加密形式将会在您每次从中付款时要求输入密码。\";\n\n\"In advanced mode, you can import bitcoin keys and addresses from other sources. You can import account private keys, account public keys, private keys, and addresses.\\nPlease note that your 12 word passphrase cannot recover your bitcoins, so it is recommended that you backup imported keys and addresses separately.\" = \"在高级模式下，您可以从其他来源导入比特币密钥和地址。您可以导入账户私钥、账户公钥、私钥和地址。\\n请注意，您的12个单词短语无法恢复您以此种方式导入的比特币，因此建议您单独备份这些导入的密钥和地址。\";\n\n\"Incomplete\" = \"不完整\";\n\n\"Incorrect passphrase, could not decrypt iCloud wallet backup.\" = \"短语错误，无法解密iCloud钱包备份。\";\n\n\"Input a bitcoin address\" = \"输入一个比特币地址\";\n\n\"Input a label\" = \"输入一个标签\";\n\n\"Input a new label\" = \"输入一个新标签\";\n\n\"Input a recommended amount. Somewhere between %@ and %@ BTC\" = \"输入一个推荐值（介于 %@ 和 %@ BTC之间）\";\n\n\"Input amount\" = \"输入数量\";\n\n\"Input label\" = \"输入标签\";\n\n\"Input new account name\" = \"输入新账户名称\";\n\n\"Input transaction fee in bitcoins\" = \"输入交易费（以比特币为单位）\";\n\n\"Instructions\" = \"指令\";\n\n\"Insufficient Funds\" = \"资金不足\";\n\n\"Insufficient Funds. Account balance is %@ when %@ is required.\" = \"资金不足。账户余额为%@，但需要%@。\";\n\n\"Insufficient Funds. Account contains bitcoin dust. You can only send up to %@ for now.\" = \"资金不足。账户内有比特币灰尘。当前您最多可以支出%@。\";\n\n\"Internal Wallet Data\" = \"内部钱包数据\";\n\n\"Internal account transfer\" = \"内部转账\";\n\n\"Invalid Address\" = \"无效的地址\";\n\n\"Invalid Passphrase\" = \"无效短语\";\n\n\"Invalid URL\" = \"无效的网址\";\n\n\"Invalid account private key\" = \"无效账户私钥\";\n\n\"Invalid account public Key\" = \"无效账户公钥\";\n\n\"Invalid amount\" = \"无效数量\";\n\n\"Invalid backup passphrase\" = \"无效的备份短语\";\n\n\"Invalid private key\" = \"无效私钥\";\n\n\"Invalid scanned data\" = \"无效的扫描数据\";\n\n\"Invalid transaction ID\" = \"无效的交易ID\";\n\n\"It is not recommended that you manually manage private keys yourself. A leak of a private key can lead to the compromise of your accounts.\" = \"我们不建议您自己手工管理私钥。私钥的泄漏可能会导致您的账户受到损害。\";\n\n\"It is not recommended that you use a regular bitcoin address for multiple payments, but instead you should import a reusable address. Add address anyways?\" = \"我们不建议您使用常规的地址多次付款，建议您导入一个可重用地址。仍然坚持添加地址吗？\";\n\n\"Label\" = \"标签\";\n\n\"Label Transaction\" = \"给交易加标签\";\n\n\"Local backup to wallet failed!\" = \"本地备份到钱包失败了！\";\n\n\"Local wallet will be lost. Are you sure you want to restore wallet from iCloud?\" = \"本地钱包将会丢失。您确定要从iCloud还原钱包吗？\";\n\n\"Maximum accounts reached\" = \"达到最大的账户数量\";\n\n\"More\" = \"更多\";\n\n\"Name\" = \"名称\";\n\n\"Network Error\" = \"网络错误\";\n\n\"New Wallet\" = \"新建錢包\";\n\n\"New addresses will be automatically generated and cycled for you as you use your current available addresses.\" = \"您使用当前可用地址的时候将为您自动生成新地址并循环。\";\n\n\"Next\" = \"下一个\";\n\n\"No\" = \"没有\";\n\n\"None currently\" = \"目前没有\";\n\n\"Not now\" = \"不是现在\";\n\n\"Now authorize the transaction on your air gap device. When you have done so, click continue on this device to scan the authorized transaction data and make your payment.\" = \"现在，请在您的离线辅设备上授权此交易。然后，在此设备上单击“继续”以扫描授权的交易数据并进行付款。\";\n\n\"OK\" = \"OK\";\n\n\"On your primary online device, when you want to make a payment from a cold wallet account, simply do it as you normally would on a normal account. When you click 'Send' on the Review Payment screen, instead of the payment going out immediately, you will be prompted to pass the unauthorized transaction data. Then on your secondary offline device, within this screen click 'Scan' to import the transaction so it can be authorized.\" = \"在您的在线主设备上，当您想通过冷钱包账户付款时，只需按照通常在正常账户中的方式进行付款。当您在“审核付款”屏幕上点击“发送”时，系统会提示您传递未经授权的交易数据，而不是立即付款。然后在您的离线辅设备上，在此屏幕中单击“扫描”以导入交易，以便完成对交易的授权。\";\n\n\"Once the transaction has been authorized by completing the above two steps, pass the authorized transaction back to your primary online device to finalize your payment.\" = \"一旦该交易已通过以上两个步骤完成授权，将已授权交易送回在线主设备以最终完成支付。\";\n\n\"Other Links\" = \"其它链接\";\n\n\"Pass\" = \"通过\";\n\n\"Passphrase\" = \"短语\";\n\n\"Passphrase does not match the transaction\" = \"短语不匹配交易\";\n\n\"Password\" = \"密码\";\n\n\"Payment Index: %lu\" = \"付款索引： %lu\";\n\n\"Private key does not match address\" = \"私钥不匹配地址\";\n\n\"Private key missing\" = \"私钥缺失\";\n\n\"QR code\" = \"二维码\";\n\n\"Quit and re-enter app\" = \"退出并重新进入APP\";\n\n\"Rate\" = \"比率\";\n\n\"Rate us in the App Store!\" = \"在App商店给我们评分！\";\n\n\"Receive\" = \"接收\";\n\n\"Receive Payment\" = \"接收付款\";\n\n\"Receive Payment From Reusable Address\" = \"从可重用地址接收付款\";\n\n\"Remind me Later\" = \"稍后提醒我\";\n\n\"Restore\" = \"恢复\";\n\n\"Restore Wallet\" = \"恢复钱包\";\n\n\"Restore from iCloud\" = \"从iCloud还原\";\n\n\"Restoring Wallet\" = \"恢复钱包\";\n\n\"Retry\" = \"重试\";\n\n\"Reusable Address Payment Addresses\" = \"可重用地址付款地址\";\n\n\"Reusable Address:\" = \"可重用地址:\";\n\n\"Reusable Addresses\" = \"可重用地址列表\";\n\n\"Review Payment\" = \"审查付款\";\n\n\"Save\" = \"保存\";\n\n\"Scan\" = \"扫描\";\n\n\"Scan For Reusable Address Payment\" = \"扫描支付到可重用地址的付款\";\n\n\"Scan QR Code\" = \"扫描二维码\";\n\n\"Scan for reusable address transaction\" = \"扫描可重用地址交易\";\n\n\"Scan next part\" = \"扫描下一部分\";\n\n\"Scroll down to the section ‘Account Actions’\" = \"向下滚动到“账户操作”部分\";\n\n\"Select Account\" = \"选择账户\";\n\n\"Select and click a blockexplorer API\" = \"选择并点击一个区块浏览API\";\n\n\"Select and click a transaction\" = \"选择并点击一个交易\";\n\n\"Select and click an account\" = \"选择并点击一个账户\";\n\n\"Select and click an account to receive from\" = \"选择并点击一个账户以从中收款\";\n\n\"Select and click an account to view it’s transaction history\" = \"选择并点击一个账户以查看其交易历史记录\";\n\n\"Select and click an address\" = \"选择并点击一个地址\";\n\n\"Send\" = \"发送\";\n\n\"Send Payment\" = \"发送付款\";\n\n\"Send To Address In Contacts\" = \"发送到联系人的地址\";\n\n\"Send authorized payment?\" = \"发送已授权的付款？\";\n\n\"Sending\" = \"发送中\";\n\n\"Sending payment to a reusable address might take longer to show up then a normal transaction with the blockchain.info API. You might have to wait until at least 1 confirmation for the transaction to show up. This is due to the limitations of the blockchain.info API. For reusable address payments to show up faster, configure your app to use the Insight API in advance settings.\" = \"在使用blockchain.info API时，比起正常交易，发送款项到可重用地址可能需要较长时间才能显示出来。您可能不得不至少等到该交易得到1次确认。这是由blockchain.info API的限制导致的。如果希望发送到可重用地址的款项能够尽快地显示，请在高级设置中配置您的应用程序使用Insight API。\";\n\n\"Sent %@ to %@\" = \"已发送%@到%@\";\n\n\"Set Transaction Fee in %@\" = \"在%@中设置交易费\";\n\n\"Settings\" = \"设置\";\n\n\"Some funds may be pending confirmation and cannot be spent yet. (Check your account history) Account only has a spendable balance of %@\" = \"一些资金尚处于待确认状态，暂时不能使用。（请检查您的账户历史记录）账户仅有%@的可支付余额\";\n\n\"Some people have compared bitcoin addresses to a bank routing number. It is a good analogy, however bitcoin addresses are public. So if you reuse the same bitcoin address for multiple payments like you would a routing number, people will be able to figure out how much bitcoin you have. Thus it is recommended that you only use one address per payment.\\nThis causes usability issues making the user use a new address whenever receiving a payment is cumbersome.\\nStealth/reusable addresses provides a better solution. When you give a sender a reusable address, the sender will derive a one time regular bitcoin address from the reusable address. Then the sender will send a payment to that regular bitcoin address. Now you can give many people just one reusable address and have them all send you payments without letting other people know how much bitcoin you have.\\nA reusable address looks like this vJmxthatTBXibYe9aZavx18iAT9gyiJETGkhwPX2WbHQGuzX83YvQXynD2t8yHU4Xjfonu5x9m6B4yxquytFP1c2CRbVR9mecxesvE. A reusable address is a lot longer then a regular bitcoin address, it is 102 characters in length.\\nReusable addresses are great, however there are no other mobile bitcoin wallets but ArcBit that supports reusable addresses for now. Which is why ArcBit supports receiving payments from both regular bitcoin addresses and reusable addresses.\\nFor each account, you have one reusable address. You can find it on your Receive screen. Swipe all the way to right on the QRCode on your Receive screen and you will find a reusable address.\" = \"有些人将比特币地址与银行路由号码进行了比较。这是一个很好的比喻。不过，比特币地址是公开的。因此，如果您重复使用相同的比特币地址进行多次付款（就像您的路由号码），则人们将能够计算出您拥有多少比特币。因此，建议您每个地址只收一次款。\\n但是要求用户在每次收款时换用新地址是很麻烦的，这会导致可用性问题。\\n隐形地址/可重用地址提供了更好的解决方案。当您给付款人一个可重用地址时，付款人将从可重用地址得到一个一次性的比特币地址。然后付款人会发送一个支付到该地址。现在您可以给许多人同一个可重用地址，让他们都给您付款，而不会让别人知道您有多少比特币。\\n一个可重用地址看起来像这样：vJmxthatTBXibYe9aZavx18iAT9gyiJETGkhwPX2WbHQGuzX83YvQXynD2t8yHU4Xjfonu5x9m6B4yxquytFP1c2CRbVR9mecxesvE。可重用地址的长度为102个字符，比普通的比特币地址长得多。\\n可重用地址非常棒，但是到目前为止，除了ArcBit，还没有其他比特币手机钱包支持。这就是为什么ArcBit支持从常规比特币地址和可重用地址接收付款的原因。\\n对于每个账户，您都有一个可重用地址。在接收屏幕上一直向右滑动二维码，您就可以找到它。\";\n\n\"Spending from a cold wallet account\" = \"从冷钱包账户支出\";\n\n\"Start fresh\" = \"全新开始\";\n\n\"Start/Restore Another Wallet\" = \"开始/恢复另一个钱包\";\n\n\"Starting Change address ID:\" = \"找零地址ID:\";\n\n\"Starting Receiving Address ID:\" = \"起始接收地址ID：\";\n\n\"Step 1: Scan transaction to authorize\" = \"第1步：扫描交易授权\";\n\n\"Step 2: Input 12 word backup passphrase\" = \"第2步：输入12字备份短语\";\n\n\"Step 3: Pass authorized transaction data\" = \"第3步：传递经过授权的交易数据\";\n\n\"Steps\" = \"步骤\";\n\n\"Success\" = \"成功\";\n\n\"Swipe right on an address\" = \"在地址上向右滑动\";\n\n\"Swipe to the right on the QR Code Image until you see the reusable address\" = \"在二维码图像上向右滑动，直到看到可重用地址\";\n\n\"Temporarily import account private key\" = \"临时导入账户私钥\";\n\n\"Temporarily import private key\" = \"临时导入私钥\";\n\n\"The cold wallet feature will allow you to create accounts which offer better security compared to normal online wallets. You will need 2 devices to use this feature. Your normal day to day device that is connected to the internet and a secondary device that is not connected to the internet (Your secondary device would need to be online once to download the ArcBit app. Afterwards keep the secondary device offline for maximum security). This feature allows you to authorize bitcoin payments from an offline device so that the keys to your bitcoins will never need to be stored on your online device. Follow the step by step instructions by clicking the info buttons within the below sections.\" = \"冷钱包功能将允许您创建比普通在线钱包更安全的账户。您需要2个设备才能使用此功能。您连接到互联网的日常使用设备和不连接到互联网的辅助设备（您的辅助设备需要在线一次以下载ArcBit应用程序，然后请保持辅助设备永久性离线以保证最大的安全性）。 此功能允许您从离线设备授权比特币付款，这样比特币的密钥永远不需要存储在您的在线设备上。点击下面的部分中的信息按钮，按照分步指令的指引进行操作。\";\n\n\"The cold wallet feature will allow you to create accounts which offer better security compared to normal online wallets. You will need 2 devices to use this feature. Your normal day to day device that is connected to the internet and a secondary device that is not connected to the internet (Your secondary device would need to be online once to download the ArcBit app. Afterwards keep the secondary device offline for maximum security). This feature allows you to authorize bitcoin payments from an offline device so that the keys to your bitcoins will never need to be stored on your online device. You can enable the cold wallet feature by going into advanced settings.\" = \"冷钱包功能将允许您创建比普通在线钱包更安全的账户。您需要2个设备才能使用此功能。您连接到互联网的普通日常设备和不连接到互联网的辅助设备（您的辅助设备需要在线一次以下载ArcBit应用程序，然后请保持辅助设备永久性离线以获得最大的安全性）。 此功能允许您从离线设备授权比特币付款，这样比特币的密钥永远不需要存储在您的在线设备上。您可以在高级设置中启用冷钱包功能。\";\n\n\"This account type can't see reusable address payments\" = \"此账户类型不能看到可重用地址的支付\";\n\n\"This feature allows you to manually input a transaction ID and see if the corresponding transaction contains a reusable address payment to your reusable address. If so, then the funds will be added to your wallet. Normally the app will discover reusable address payments automatically for you, but if you believe a payment is missing you can use this feature.\" = \"此功能可让您手工输入交易ID，以查看相应的交易是否包含支付到您的可重用地址的付款。如果包含，资金将被添加到您的钱包。通常情况下，应用程序将自动发现支付到您的可重用地址的付款，但如果您确信付款丢失了，您可以使用此功能。\";\n\n\"To:\" = \"至：\";\n\n\"Today\" = \"今天\";\n\n\"Toggle Automatic Transaction Fee\" = \"切换动态交易费\";\n\n\"Toggle ‘Enable Transaction Fee’\" = \"切换“启用交易费”\";\n\n\"Toggle ’Enable advanced mode’\" = \"切换“启用高级模式”\";\n\n\"Total:\" = \"总计:\";\n\n\"Transaction %@ already accounted for.\" = \"交易%@已入账。\";\n\n\"Transaction %@ does not belong to this account.\" = \"交易%@不属于此账户。\";\n\n\"Transaction Fee\" = \"手续费\";\n\n\"Transaction ID\" = \"交易ID\";\n\n\"Transaction ID: %@\" = \"交易ID: %@\";\n\n\"Transaction authorized\" = \"交易授权\";\n\n\"Transaction confirmations\" = \"交易确认深度\";\n\n\"Transaction fees impact how quickly the Bitcoin network will confirm your transactions. Higher fees means faster confirmation times. Default fee behavior can be configured in settings.\" = \"交易费用影响比特币网络确认您的交易的速度。费用越高，确认越快。可以在设置中配置默认交易费规则。\";\n\n\"Transaction is not a reusable address transaction.\" = \"交易不是一个可重用地址交易。\";\n\n\"Transaction needs to be authorized by an offline and air gap device. Send transaction to an offline device for authorization?\" = \"交易需要由离线辅设备授权。发送交易到离线辅设备进行授权？\";\n\n\"Transaction needs to be passed back to your online device in order for the payment to be sent\" = \"交易需要传递回您的在线主设备，以便将付款交易发送到网络\";\n\n\"Try Again\" = \"再试一次\";\n\n\"Try our new cold wallet feature!\" = \"尝试我们的冷钱包特性！\";\n\n\"URL does not contain an address.\" = \"网址不包含地址。\";\n\n\"Unable to get dynamic fees. Falling back on fixed transaction fee. (fee can be configured on review payment)\" = \"无法获得动态的费用，仍旧使用固定交易费（费用可以在审核支付时修改）。\";\n\n\"Unarchive Account\" = \"解除封存账户\";\n\n\"Unarchive address\" = \"解除封存地址\";\n\n\"Unarchived address\" = \"未封存地址\";\n\n\"Unconfirmed\" = \"未确认\";\n\n\"Unencrypted\" = \"未加密\";\n\n\"Use ArcBit on your browser to complement the mobile app. The web wallet has all the features that the mobile wallet has plus more!\" = \"在您的浏览器中使用ArcBit作为移动APP的补充！网页版钱包包含所有的移动钱包功能，以及一些额外的功能！\";\n\n\"Use all funds\" = \"使用所有资金\";\n\n\"View Account Address\" = \"查看账户地址\";\n\n\"View Account Address In Web\" = \"在网页中查看账户地址\";\n\n\"View Account Addresses\" = \"查看账户地址列表\";\n\n\"View Account Private Key\" = \"查看账户私钥\";\n\n\"View Account Public Key\" = \"查看账户公钥\";\n\n\"View Achievements\" = \"查看成就\";\n\n\"View Addresses\" = \"查看地址列表\";\n\n\"View ArcBit Brain Wallet Details\" = \"查看ArcBit脑钱包详情\";\n\n\"View ArcBit Web Wallet Details\" = \"查看ArcBit网页钱包详情\";\n\n\"View History\" = \"查看历史\";\n\n\"View Private Key\" = \"查看私钥\";\n\n\"View Transaction In Web\" = \"在网页中查看交易\";\n\n\"View account private key QR code\" = \"查看账户私钥二维码\";\n\n\"View account public key QR code\" = \"查看账户公钥二维码\";\n\n\"View address QR code\" = \"查看地址二维码\";\n\n\"View address in web\" = \"在网络中查看地址\";\n\n\"View in web\" = \"在网页中查看\";\n\n\"View private key QR code\" = \"查看私钥二维码\";\n\n\"Visit our home page\" = \"访问我们的主页\";\n\n\"Wallet backup passphrase\" = \"钱包备份短语\";\n\n\"Warning\" = \"警告\";\n\n\"Welcome to ArcBit, a user only controlled Bitcoin wallet. Start using the app now by depositing your Bitcoins here.\" = \"欢迎来到ArcBit——一款完全由用户控制的比特币钱包。将您的比特币转入ArcBit，现在就开始使用它！\";\n\n\"Welcome!\" = \"欢迎！\";\n\n\"What are Account/Extended Keys?\" = \"什么是账户/扩展密钥？\";\n\n\"What are accounts?\" = \"什么是账户？\";\n\n\"What are reusable addresses?\" = \"什么是可重用地址？\";\n\n\"What are the benefits and advantages of Bitcoin?\" = \"比特币有什么好处？\";\n\n\"What are transaction confirmations?\" = \"交易确认数是什么意思？\";\n\n\"What is ArcBit's cold wallet feature?\" = \"ArcBit的冷钱包功能是什么？\";\n\n\"What is Bitcoin?\" = \"什么是比特币？\";\n\n\"What is a bitcoin wallet?\" = \"什么是比特币钱包？\";\n\n\"What makes ArcBit different from other bitcoin wallets?\" = \"ArcBit与其他钱包的区别在哪里？\";\n\n\"With an ArcBit cold wallet feature, you can create wallets and make payments offline without exposing your private keys to an internet connected device. This feature is great for storing large amounts of bitcoin or for the security conscious minded. Check out this feature in the cold wallet section in the side menu.\" = \"使用ArcBit冷钱包功能，您可以创建钱包并离线付款，而不会将您的私钥暴露给连接到互联网的设备。这个功能非常适合存储大量的比特币或者对安全敏感的用户。请在侧边菜单的冷钱包部分查看此功能。\";\n\n\"Write down backup passphrase\" = \"写下备份短语\";\n\n\"Write down or memorize your 12 word wallet backup passphrase. You can view it by clicking \\\"Show backup passphrase\\\" in Settings. Your wallet backup passphrase is needed to recover your bitcoins.\" = \"写下或记住您的12单词钱包备份短语。在设置中单击“显示备份短语”可以查看。您的钱包备份短语可以用来恢复您的比特币。\";\n\n\"Write down the 12 word passphrase below and keep it safe. This passphrase alone can restore your entire wallets\\' bitcoins (excluding imports).\" = \"记下下面的12单词短语，并妥善保管。这个短语可以恢复您的整个钱包的比特币（但不包括导入的）\";\n\n\"Write down the 12 word passphrase below and keep it safe. This passphrase alone can restore your entire wallets\\' bitcoins.\" = \"记下下面的12单词短语，并妥善保管。这个短语可以恢复您的整个钱包的比特币。\";\n\n\"Yes\" = \"是\";\n\n\"You are making a payment to a reusable address. Make sure that the receiver can see the payment made to them. (All ArcBit reusable addresses are compatible with other ArcBit wallets)\" = \"您正在向可重用地址付款。确保接收方可以看到对他们的付款。（所有ArcBit可重用地址都与其他ArcBit钱包兼容）\";\n\n\"You have %@, but %@ is needed. (This includes the transactions fee)\" = \"您有%@，但需要%@（包括交易费用）。\";\n\n\"You must exit and kill this app in order for this to take effect.\" = \"您必须退出并杀死此APP，以使此修改生效。\";\n\n\"Your current wallet will be deleted. Your can restore your current wallet later with the wallet passphrase, but any imported accounts or addresses created in advanced mode cannot be recovered. Do you wish to continue?\" = \"您目前的钱包将被删除。您可以稍后使用钱包短语恢复您当前的钱包，但无法恢复在高级模式下创建的任何导入的账户或地址。您想继续吗？\";\n\n\"Your iCloud backup was last saved on %@. Do you want to restore your wallet from iCloud or backup your local wallet to iCloud?\" = \"您的iCloud备份最后保存于%@。您要从iCloud还原您的钱包，还是将本地钱包备份到iCloud？\";\n\n\"Your new transaction fee is too high\" = \"您的新交易费太高\";\n\n\"Your wallet is now restored\" = \"您的钱包现在已恢复\";\n\n\"\\nAllow camera access in\\n Settings->Privacy->Camera->%@\" = \"\\n允许相机访问于\\n 设置->隐私->相机->%@\";\n\n\"\\tArcBit Web Wallet is a Chrome extension. It has all the features of the mobile wallet plus more. Highlights include the ability to create multiple wallets instead of just one, and a new non-cumbersome way to generate wallets, store and spend bitcoins all from cold storage! ArcBit's new way to manage your cold storage bitcoins also offers a more compelling reason to use ArcBit's watch account feature. Now you can safely watch the balance of your cold storage bitcoins by enabling advance mode in ArcBit and importing your cold storage account public keys.\\n\\tUse ArcBit Web Wallet in whatever way you wish. You can create a new wallet, or you can input your current 12 word backup passphrase to manage the same bitcoins across different devices. Check out the ArcBit Web Wallet in the Chrome Web Store for more details!\\n\" = \"\\tArcBit网页钱包是一款Chrome扩展程序。它比手机钱包具备更多功能。亮点包括可以创建多个钱包，以一种新的简便方式来生成钱包，以及从冷钱包中存储和支付比特币！ArcBit的管理冷钱包的新方法也为使用ArcBit的监视账户提供了令人信服的理由。现在，您可以通过在ArcBit中启用高级模式并导入冷钱包账户公钥，安全地观察冷钱包的比特币余额。\\n\\t您可以以任何您希望的方式使用ArcBit网页钱包。您可以创建一个新的钱包，或者您也可以输入您当前的12单词备份短语，以管理不同设备上的相同比特币。更多详细信息，请参阅Chrome应用商店中的ArcBit网页钱包。\\n\";\n\n\"\\tWith the Arcbit Brain Wallet you can safely spend your bitcoins without ever having your private keys be exposed to the internet. It can be use in conjunction with your Arcbit Wallet or as a stand alone wallet.\\n\" = \"\\t使用Arcbit脑钱包，您可以安全地支付您的比特币，而不必让您的私钥暴露在互联网。它可以与您的Arcbit钱包一起使用或作为独立的钱包使用。\\n\";\n\n\"iCloud Error: %@\" = \"iCloud错误: %@\";\n\n\"iCloud backup found\" = \"找到iCloud备份\";\n\n\"iCloud backup not found\" = \"未找到iCloud备份\";\n\n\"iCloud backup will be lost. Are you sure you want to backup your local wallet to iCloud?\" = \"iCloud备份将丢失。您确定要将本地的钱包备份到iCloud吗？\";\n\n\"Wallet backup passphrase will be shown\" = \"将显示钱包备份短语\";\n\n\"Write down or memorize your wallet backup passphrase. If you lose your backup passphrase, your wallet cannot be recovered.\" = \"记下或记住您的钱包备份短语。如果您丢失了备份短语，您的钱包将无法恢复。\";\n\n\"I understand\" = \"我明白\";\n\n\"iCloud support for ArcBit discontinued\" = \"iCloud对ArcBit的支持已经停止\";\n\n\"iCloud support for ArcBit is being discontinued. If your backup passphrase has not been backed up already, please do so.\" = \"iCloud即将停止对ArcBit的支持。如果您尚未备份您的备份短语，请备份之。\";\n\n\"Reusable address payments are disabled until further notice.\" = \"可重用地址付款被禁用，直至另行通知。\";\n\n"
  },
  {
    "path": "ArcBit/zh-Hant.lproj/LaunchScreen.strings",
    "content": "\n"
  },
  {
    "path": "ArcBit/zh-Hant.lproj/Localizable.strings",
    "content": "\"\" = \"\";\n\n\"%@ is not allowed to access the camera\" = \"%@不允許訪問相機\";\n\n\"%@ servers not reachable.\" = \"%@伺服器無法訪問。\";\n\n\"%d/%d parts scanned.\" = \"%d/%d個部分進行掃描。\";\n\n\"%llu confirmations\" = \"%llu個確認深度\";\n\n\"1 Confirmation\" = \"1個確認深度\";\n\n\"A bitcoin address typically begins with a '1' or '3'. You can see the transactions and track the balance of an address, but you cannot spend from an imported address.\\nYou can temporarily import this watch addresses private key to spend its bitcoins. Simply go the Send screen and select a watch address to spend from and you will be prompted to temporarily import your addresses' private key when you click 'Review Payment' in the Send screen. The private key will stay in memory until the app exits or until you remove it manually in the Accounts screen.\" = \"比特幣位址通常以“1”或“3”開頭。 您可以查看交易並跟蹤位址的餘額，但無法從導入的地址消費。\\n您可以暫時導入此監控位址私密金鑰以使用比特幣。 只需進入發送螢幕並選擇一個監控位址，然後在發送螢幕中點擊“審查付款”時，系統會提示您臨時導入位址的私密金鑰。 私密金鑰將保留在記憶體中，直到應用程式退出或直到您在“帳戶”螢幕中手動刪除它。\";\n\n\"A bitcoin wallet is a software application that allows people to send, receive and manage their bitcoins.\\nBe aware of how other bitcoin applications store your bitcoins' private keys, which are needed to spend your bitcoins.\\nThere are generally three different ways applications can your store your bitcoins.\\n1.\\nThe banking model, where your bitcoin private keys are held for you by someone else.\\n2.\\nThe security box model, where your bitcoin private keys are stored encrypted on someone else’s servers.\\n3.\\nThe wallet model, where your bitcoin private keys are stored only on your device.\" = \"比特幣錢包是一種允許人們發送、接收和管理比特幣的軟體應用程式。\\n請注意其他比特幣應用程式如何存儲您的比特幣私密金鑰（這是比特幣支付所必需的）。\\n對APP而言通常可以有三種不同的方式存儲您的比特幣私密金鑰。\\n1.\\n銀行模式，您的比特幣私密金鑰由其他人持有。\\n2.\\n安全箱模式，您的比特幣私密金鑰在其他人的伺服器上加密存儲。\\n3.\\n錢包模式，您的比特幣私密金鑰只存儲在您的設備上。\";\n\n\"A private key begins with an 'L', 'K', or '5'.\\nBIP 38 encrypted private keys can also be imported. They can either be imported encrypted or unencrypted. If you choose to import it encrypted, you will need to input the password each time you spend from your encrypted private key.\" = \"私密金鑰以字元“L”，“K”或“5”打頭。\\nBIP38加密的私密金鑰也可以導入。您可以將它們以加密或不加密方式導入。如果您選擇加密導入，則每次使用加密私密金鑰時都需要輸入密碼。\";\n\n\"Account %@ imported\" = \"帳戶%@已導入\";\n\n\"Account %lu\" = \"帳戶 %lu\";\n\n\"Account 1\" = \"帳戶 1\";\n\n\"Account ID\" = \"帳戶ID\";\n\n\"Account ID: %u\" = \"帳戶ID: %u\";\n\n\"Account Private Key\" = \"帳戶私密金鑰\";\n\n\"Account Public Key\" = \"帳戶公開金鑰\";\n\n\"Account private key does not match imported account public key\" = \"帳戶私密金鑰不匹配導入的帳戶公開金鑰\";\n\n\"Account private key missing\" = \"帳戶私密金鑰缺失\";\n\n\"Accounts\" = \"帳戶列表\";\n\n\"Achievement List\" = \"成就列表\";\n\n\"Achievements\" = \"成就\";\n\n\"Actions\" = \"操作\";\n\n\"Active Change Addresses\" = \"活躍的找零地址\";\n\n\"Active Main Addresses\" = \"活躍的主地址\";\n\n\"Add Contacts Entry\" = \"添加連絡人條目\";\n\n\"Address\" = \"地址\";\n\n\"Address ID \" = \"地址ID \";\n\n\"Address ID: %lu\" = \"地址ID: %lu\";\n\n\"Addresses\" = \"地址清單\";\n\n\"Advanced Achievement List\" = \"高級成就列表\";\n\n\"Advanced FAQ\" = \"高級常見問題\";\n\n\"Advanced how To:\" = \"高級操作說明:\";\n\n\"After a transaction is broadcast to the Bitcoin network, it may be included in a block that is published to the network. When that happens, it is said that the transaction has been mined at a depth of 1 block. With each subsequent block that is found, the number of blocks deep is increased by one. To be secure against double spending, a transaction should not be considered as confirmed until it is a certain number of blocks deep.\\nA good rule of thumb is that 1 confirmation is good for small value amounts of bitcoins and a user should wait for more confirmations for larger value amounts.\\nArcBit will display the confirmation number up until the 6th confirmation.\" = \"在交易被廣播到比特幣網路之後，它可能被包含在發佈到網路的塊中。當這種情況發生時，意味著這筆交易已經被開採了1個區塊的深度。隨著後續區塊的陸續開採，此塊的深度逐步增加。為了防止雙重支出，交易在達到一定的區塊深度之前不應該被視為得到確認。\\n一個較好的經驗法則是，對於小額支付，1個確認深度是合適的；對於較大的金額，用戶應該等待更多的確認深度。\\nArcBit將顯示確認深度直到達到6個。\";\n\n\"Amount:\" = \"數量：\";\n\n\"An account is a collection of bitcoin addresses. With accounts, you will no longer have to manage bitcoin addresses directly anymore. Since address reuse results in a loss of privacy for people using Bitcoin, ArcBit’s HD wallet account system will automatically handle the cycling of bitcoin addresses for you. This ensures you don’t use the same bitcoin address more then once.\\nEach account also has a reusable address. You can find it in your Receive screen. Swipe all the way to right on the QRCode in your Receive screen and you will find a reusable address.\\nYou can create an unlimited amount of accounts with ArcBit. See the help section on how to create a new account in ArcBit.\" = \"一個帳戶是若干比特幣位址的集合。有了帳戶，您將不再需要直接管理比特幣位址了。由於位址重用會導致比特幣用戶損失隱私，ArcBit的HD錢包帳戶系統將自動為您處理比特幣位址的迴圈。這可以確保您不會重複使用同一個比特幣位址。\\n每個帳戶也有一個可重用位址。您可以在接收螢幕中找到它。在接收螢幕上一直滑動到最右側的二維碼，您將找到可重用地址。\\n您可以使用ArcBit創建任意數量的帳戶。請參閱説明部分瞭解如何在ArcBit中創建新帳戶。\";\n\n\"An account private key begins with the letters 'xprv'. You can see, spend and recover the transactions and bitcoins of an entire account from an account private key.\" = \"一個帳號私密金鑰以字母“xprv”開頭。您可以通過帳戶私密金鑰查看、支付和恢復整個帳戶的交易和比特幣。\";\n\n\"An account public key begins with the letters 'xpub'. You can see the transactions and bitcoins of an entire account from an account private key, with the exception of reusable address payments. Future releases will address this issue.\\nYou can temporarily import the corresponding account private key for this accounts' account public key to spend your watch accounts' bitcoins. Simply go to the Send screen and select a watch account to spend from and you will be prompted to temporarily import your account's private key when you click 'Review Payment' on the Send screen. The private key will stay in memory until the app exits or until you remove it manually on the Accounts screen.\" = \"帳號公開金鑰以字母“xpub”開頭。您可以通過帳戶私密金鑰查看整個帳戶的交易和比特幣，但可重用地址付款除外。未來的版本將解決這個問題。\\n您可以臨時導入帳戶相對應的私密金鑰以支付您的監視帳戶中的比特幣。只需進入發送螢幕，選擇一個監視帳戶，然後在發送螢幕上按一下“審查付款”，此時系統會提示您臨時導入帳戶的私密金鑰。私密金鑰將保留在記憶體中，直到應用程式退出，或您在“帳戶”螢幕上手動刪除它。\";\n\n\"ArcBit Brain Wallet\" = \"ArcBit腦錢包\";\n\n\"ArcBit Web Wallet\" = \"ArcBit網頁錢包\";\n\n\"ArcBit uses the the bitcoin wallet model (See the section ’What is a bitcoin wallet?’ to understand the 3 different security models of bitcoin software). However, if you use iCloud to backup your wallet, you will be using the security box model. It is recommended that you do not use iCloud and be responsible for your bitcoins yourself. For those who don’t want to remember a simple backup passphrase, iCloud backup is a good alternative.\" = \"ArcBit使用比特幣錢包模型（請參閱“什麼是比特幣錢包”以瞭解比特幣軟體的三種不同安全模型）。但是，如果您使用iCloud備份您的錢包，則將使用安全箱模型。建議您不要使用iCloud並自行負責您的比特幣。對於那些不想記住簡單的備份短語的人來說，iCloud備份是一個不錯的選擇。\";\n\n\"Archive Account\" = \"封存帳戶\";\n\n\"Archive address\" = \"封存地址\";\n\n\"Archived Accounts\" = \"封存帳戶列表\";\n\n\"Archived Change Addresses\" = \"封存活躍的找零地址\";\n\n\"Archived Cold Wallet Accounts\" = \"封存的冷錢包帳戶列表\";\n\n\"Archived Imported Accounts\" = \"已封存的導入帳戶列表\";\n\n\"Archived Imported Addresses\" = \"已封存的導入地址清單\";\n\n\"Archived Imported Watch Accounts\" = \"已封存的導入的監視帳戶清單\";\n\n\"Archived Imported Watch Addresses\" = \"已封存的導入的監視地址清單\";\n\n\"Archived Main Addresses\" = \"已封存的主地址\";\n\n\"Are you sure you want to archive account %@?\" = \"您確定要封存帳戶%@嗎？\";\n\n\"Are you sure you want to archive address %@?\" = \"您確定要封存位址%@嗎？\";\n\n\"Are you sure you want to delete this account?\" = \"您確定要刪除這個帳戶嗎？\";\n\n\"Are you sure you want to unarchive account %@\" = \"您確定您想解除封存帳戶%@嗎？\";\n\n\"Are you sure you want to unarchive address %@?\" = \"您確定您想解除封存位址%@嗎？\";\n\n\"Authorize Cold Wallet Account Payment\" = \"授權冷錢包帳戶付款\";\n\n\"Authorize Payment\" = \"授權付款\";\n\n\"Backup Passphrase\" = \"備份短語\";\n\n\"Backup wallet\" = \"備份錢包\";\n\n\"Backup local wallet\" = \"備份本地錢包\";\n\n\"Backup passphrase found in keychain\" = \"在鑰匙扣中找到備份短語\";\n\n\"Bitcoin cuts out the middleman and allows you to send money anywhere in the world with an internet connection with minimum to zero fees.\" = \"比特幣免去了中間商，並允許您通過互聯網向世界任何地方匯款，收費最低為零。\";\n\n\"Bitcoin, uppercase 'B', is an online payment system invented in 2008 and released as open-source software in 2009 by a programmer named Satoshi Nakamoto. The system is decentralized and peer-to-peer allowing users to transact directly without needing an intermediary.\\nBitcoin is also a platform of which other decentralized applications can be built upon. Bitcoin, lowercase 'b' is the currency unit that Bitcoin uses.\" = \"比特幣（大寫字母'B'）是一個線上支付系統。中本聰于2008年發明了該系統，並于2009年作為開源軟體發佈。 該系統是去中心化的、對等的，允許使用者直接進行交易，而不需要中間人。\\n比特幣也是一個平臺，允許其他去中心化的應用程式建立在這個平臺上。 比特幣（小寫字母'b'）是比特幣使用的貨幣單位。\";\n\n\"Bitcoins can be purchased from various bitcoin exchanges. ArcBit is not a bitcoin exchange. ArcBit is a bitcoin wallet. After you purchase some bitcoins from an exchange, you can move it to a bitcoin wallet.\" = \"您可以從很多比特幣交易所買到比特幣。 ArcBit不是比特幣交易所，而是比特幣錢包。您從交易所購買比特幣後，可以將其轉移到比特幣錢包。\";\n\n\"Cancel\" = \"取消\";\n\n\"Cannot archive your default account\" = \"不能封存默認帳戶\";\n\n\"Cannot archive your one and only account\" = \"不能封存唯一的帳戶\";\n\n\"Cannot create transactions with outputs less then %@\" = \"無法創建輸出小於%@的交易\";\n\n\"Cannot decrypt iCloud backup wallet.\" = \"無法解密iCloud備份錢包。\";\n\n\"Cannot import reusable address\" = \"無法導入可重用地址\";\n\n\"Change Address ID \" = \"找零地址ID \";\n\n\"Change Automatic Transaction Fee\" = \"更改自動交易費\";\n\n\"Change Block Explorer URL\" = \"更改區塊流覽器網址\";\n\n\"Change Blockexplorer Type\" = \"更改區塊流覽器類型\";\n\n\"Check out the ArcBit Brain Wallet\" = \"檢查ArcBit腦錢包\";\n\n\"Check out the ArcBit Web Wallet\" = \"檢查ArcBit網頁錢包\";\n\n\"Check out the ArcBit Web Wallet!\" = \"檢查ArcBit網頁錢包!\";\n\n\"Checking Transaction\" = \"檢查交易\";\n\n\"Clear account private key from memory\" = \"從記憶體中清除帳戶私密金鑰\";\n\n\"Clear private key from memory\" = \"從記憶體中清除私密金鑰\";\n\n\"Cleared from memory\" = \"已從記憶體中清除\";\n\n\"Click an address\" = \"點擊一個位址\";\n\n\"Click the button with the arrow\" = \"點擊帶有箭頭的按鍵\";\n\n\"Click the plus button at the top right\" = \"點擊右上角的加號鍵\";\n\n\"Click the ‘Contacts’ button\" = \"點擊“連絡人”按鍵\";\n\n\"Click ‘Accounts’\" = \"點擊“帳戶”\";\n\n\"Click ‘Advanced settings’\" = \"點擊“高級設置”\";\n\n\"Click ‘Archive Account’\" = \"點擊“封存帳戶”\";\n\n\"Click ‘Create New Account’\" = \"點擊“創建新帳戶”\";\n\n\"Click ‘Delete’\" = \"點擊“刪除”\";\n\n\"Click ‘Done’\" = \"點擊“完成”\";\n\n\"Click ‘Edit Account Name’\" = \"點擊“編輯帳戶名稱”\";\n\n\"Click ‘Edit’\" = \"點擊“編輯”\";\n\n\"Click ‘Enable PIN Code’\" = \"點擊“啟用PIN代碼”\";\n\n\"Click ‘History’\" = \"點擊“歷史”\";\n\n\"Click ‘Import Account’\" = \"點擊“導入帳戶”\";\n\n\"Click ‘Import Private Key’\" = \"點擊“導入私密金鑰”\";\n\n\"Click ‘Import Watch Only Account’\" = \"點擊“導入監視帳戶”\";\n\n\"Click ‘Import Watch Only Address’\" = \"點擊“導入監視位址”\";\n\n\"Click ‘Label transaction’\" = \"點擊“給交易貼標籤”\";\n\n\"Click ‘Restore Wallet’\" = \"點擊“恢復錢包”\";\n\n\"Click ‘Restore’\" = \"點擊“恢復”\";\n\n\"Click ‘Review Payment’\" = \"點擊“審查付款”\";\n\n\"Click ‘Send’\" = \"點擊“發送”\";\n\n\"Click ‘Set Transaction Fee’\" = \"點擊“設置交易費”\";\n\n\"Click ‘Settings’\" = \"點擊“設置”\";\n\n\"Click ‘Show Backup Passphrase’\" = \"點擊“顯示備份短語”\";\n\n\"Click ‘View Addresses’\" = \"點擊“查看地址清單”\";\n\n\"Click ‘View account private key QR code’\" = \"點擊“查看帳戶私密金鑰二維碼”\";\n\n\"Click ‘View account public key QR code’\" = \"點擊“查看帳戶公開金鑰二維碼”\";\n\n\"Click ‘View address QR code’\" = \"點擊“查看地址二維碼”\";\n\n\"Click ‘View in web’\" = \"點擊“在網頁中查看”\";\n\n\"Click ‘View private key QR code’\" = \"點擊“查看私密金鑰二維碼”\";\n\n\"Click ‘blockexplorer API type’\" = \"點擊“區塊流覽器API類型”\";\n\n\"Click ’Receive’\" = \"點擊“接收”\";\n\n\"Close\" = \"關閉\";\n\n\"Cold Wallet\" = \"冷錢包\";\n\n\"Cold Wallet Accounts\" = \"冷錢包帳戶列表\";\n\n\"Cold Wallet Accounts can't see reusable address payments, thus this accounts' reusable address is not available.\" = \"冷錢包帳戶無法查看可重用地址付款，因而該帳戶的可重用地址不可用。\";\n\n\"Cold Wallet Overview\" = \"冷錢包概述\";\n\n\"Cold wallet private keys are not stored here and cannot be viewed\" = \"冷錢包私密金鑰不存儲在這裡，無法查看。\";\n\n\"Complete\" = \"完成\";\n\n\"Complete step 1\" = \"完成第1步\";\n\n\"Confirm Payment\" = \"確認付款\";\n\n\"Confirm Pin Code\" = \"確認PIN碼\";\n\n\"Contacts\" = \"連絡人\";\n\n\"Continue\" = \"繼續\";\n\n\"Copied To clipboard\" = \"已複製到剪貼板\";\n\n\"Copy\" = \"複製\";\n\n\"Copy Transaction ID to Clipboard\" = \"複製交易ID到剪貼板\";\n\n\"Create Cold Wallet\" = \"新建冷錢包\";\n\n\"Create New Account\" = \"新建新帳戶\";\n\n\"Create new contact\" = \"新建連絡人\";\n\n\"Customize Fee\" = \"定制交易費\";\n\n\"Decrypting\" = \"解密\";\n\n\"Delete\" = \"刪除\";\n\n\"Delete %@\" = \"刪除 %@\";\n\n\"Delete Account\" = \"刪除帳戶\";\n\n\"Delete Contact\" = \"刪除連絡人\";\n\n\"Delete address\" = \"刪除地址\";\n\n\"Do not use the QR code from here to receive bitcoins. Go to the Receive screen to get a QR code to receive bitcoins.\" = \"不要使用這裡的二維碼接受比特幣。進入接收螢幕得到一個QR二維碼以接收比特幣。\";\n\n\"Do you like using ArcBit?\" = \"您喜歡用ArcBit嗎？\";\n\n\"Do you want to load and backup your current local wallet file?\" = \"您要載入和備份您當前的本地錢包檔嗎？\";\n\n\"Do you want to load local wallet file?\" = \"要載入本地錢包檔嗎？\";\n\n\"Do you want to restore from your backup passphrase or start a new wallet?\" = \"您想從您的備份短語恢復或啟動一個新的錢包？\";\n\n\"Do you want to temporary import your account private key?\" = \"您想臨時導入帳戶私密金鑰？\";\n\n\"Do you want to temporary import your private key?\" = \"您想臨時導入私密金鑰？\";\n\n\"Don't remind me\" = \"不要提醒我\";\n\n\"Done\" = \"完成\";\n\n\"Each account has a public and private account key. Account keys should be kept secret as they are used to view the account's transactions and spend the account's bitcoins.\" = \"每個帳戶都有一個公開金鑰和一個私密金鑰。帳戶公開金鑰和私密金鑰都應當妥善保管，因為它們可以被用來查看帳戶的交易，以及支付帳戶裡的比特幣。\";\n\n\"Edit\" = \"編輯\";\n\n\"Edit Account Name\" = \"編輯帳戶名稱\";\n\n\"Edit Contact Name\" = \"編輯連絡人姓名\";\n\n\"Edit Label\" = \"編輯標籤\";\n\n\"Edit Transaction label\" = \"編輯交易標籤\";\n\n\"Email Support\" = \"電子郵件支援\";\n\n\"Enable PIN code in settings to better secure your wallet.\" = \"在設置中啟用PIN碼以更好地保護您的錢包\";\n\n\"Enable Pin Code\" = \"啟用PIN碼\";\n\n\"Enable Transaction Fee\" = \"啟用交易費\";\n\n\"Enable advanced mode\" = \"啟用高級模式\";\n\n\"Encountered error creating transaction. Please try again.\" = \"創建交易時遇到錯誤。請再試一次。\";\n\n\"Encrypted\" = \"加密\";\n\n\"Enter Label\" = \"輸入標籤\";\n\n\"Enter PIN\" = \"輸入PIN碼\";\n\n\"Enter a wallet backup passphrase to wipe the current wallet and start/restore another.\" = \"輸入一個錢包備份短語以擦除當前的錢包，並啟用/還原另一個。\";\n\n\"Enter account private key\" = \"輸入帳戶私密金鑰\";\n\n\"Enter account public key\" = \"輸入帳戶公開金鑰\";\n\n\"Enter address\" = \"輸入網址\";\n\n\"Enter an account ID and click 'QR Code'. Then on your primary online device, enable Cold Wallet in settings. Then go to the Accounts screen and click 'Import Cold Wallet Account' and scan the Account Public Key QR Code. Afterwards use this cold wallet account as you would a normal account and deposit bitcoins into it. When you want to make a payment from a cold wallet account, go to the next section on the previous screen and follow the step by step instructions there.\" = \"首先輸入一個帳戶ID並點擊“二維碼”。然後在您的線上主設備上，在設置中啟用冷錢包。然後進入帳戶螢幕，點擊“導入冷錢包帳戶”並掃描帳戶公開金鑰二維碼。之後像使用正常帳戶一樣使用這個冷錢包帳戶，並將比特幣存入其中。如果您想從冷錢包帳戶中支付，請轉至上一螢幕的下一部分，然後按照說明進行操作。\";\n\n\"Enter backup passphrase\" = \"輸入備份短語\";\n\n\"Enter passphrase for your iCloud backup wallet.\" = \"為您的iCloud備份錢包輸入短語。\";\n\n\"Enter password for encrypted private key\" = \"輸入加密私密金鑰的密碼\";\n\n\"Enter the 12 word passphrase that belongs to the cold wallet account that you want to make a payment from. This is the passphrase that was used to generate your account public key that was generated on the 'Create Cold Wallet' section found on the previous screen.\" = \"輸入您要從中付款的冷錢包帳戶所對應的12個單詞的短語。這是前面的螢幕中的“創建冷錢包”部分生成的12單詞短語，該短語被用來生成帳戶公開金鑰。\";\n\n\"Error\" = \"錯誤\";\n\n\"Error fetching Transaction.\" = \"獲取交易時遇到錯誤\";\n\n\"Error fetching unspent outputs. Try again later.\" = \"獲取未使用的輸出時遇到錯誤。請稍後再試。\";\n\n\"Error fetching unspent outputs. Try again.\" = \"獲取未使用的輸出時遇到錯誤。請再試一次。\";\n\n\"Error getting block height.\" = \"獲取塊高度時遇到錯誤。\";\n\n\"Error importing account\" = \"導入帳戶時出錯\";\n\n\"Error loading wallet JSON file\" = \"載入錢包JSON檔時出錯\";\n\n\"Explanation\" = \"說明\";\n\n\"FAQ\" = \"常見問題\";\n\n\"Fee:\" = \"費用：\";\n\n\"Fill address field\" = \"填充地址域\";\n\n\"Finished Passing Transaction Data\" = \"交易資料傳送已完成\";\n\n\"First make sure you are using your secondary offline device for this screen (as mentioned in the overview on the previous screen). Click 'New Wallet' and write down or memorize the generated 12 word passphrase. This passphrase can recover and generate all your accounts and the bitcoins associated with it, so keep it safe and to yourself. Also instead of creating a new wallet, you can also input an existing 12 word passphrase that was generated here to create additional accounts.\" = \"首先請確保您正在使用您的離線輔設備打開此螢幕（如前一螢幕中的概述所述）。點擊“新錢包”，記下或記住生成的12個單詞的短語。這個短語可以恢復並生成所有的帳戶、以及與之相關的比特幣，所以請務必注意保密。或者，有別於創建一個新的錢包，您也可以輸入這裡生成的12個單詞短語來創建額外的帳戶。\";\n\n\"Follow us on Twitter\" = \"在推特上關注我們\";\n\n\"From:\" = \"從：\";\n\n\"Funds have been claimed already.\" = \"資金已經被申報。\";\n\n\"Funds imported\" = \"資金導入完畢\";\n\n\"Go\" = \"出發\";\n\n\"Go to the side menu\" = \"轉到側邊菜單\";\n\n\"Have sender scan QR code\" = \"讓付款人掃描二維碼\";\n\n\"Have sender send you payment\" = \"讓付款人向您發送付款\";\n\n\"Help\" = \"幫助\";\n\n\"Here are some features that no other mobile bitcoin wallet supports.\\n- Reusable address support\\n- Ability to import individual account (extended) keys\\n- iCloud backup support\\n- Over 150 local currencies supported\" = \"這裡有一些ArcBit獨有的功能。\\n-可重用位址支持\\n-能夠導入個人帳戶（擴展）金鑰\\n- iCloud備份支持\\n-支持150多種本地貨幣\";\n\n\"Hierarchical Deterministic Wallet\" = \"分層確定性錢包\";\n\n\"History\" = \"歷史\";\n\n\"How To:\" = \"如何:\";\n\n\"How do I get bitcoins?\" = \"如何獲得比特幣？\";\n\n\"How does ArcBit Wallet work?\" = \"ArcBit錢包是如何工作的？\";\n\n\"Import Account\" = \"導入帳戶\";\n\n\"Import Cold Wallet Account\" = \"導入冷錢包帳戶\";\n\n\"Import Feature\" = \"導入特性\";\n\n\"Import Private Key\" = \"導入私密金鑰\";\n\n\"Import Private/Encrypted Key\" = \"導入私有/加密金鑰\";\n\n\"Import Watch Account\" = \"導入監視帳戶\";\n\n\"Import Watch Address\" = \"導入監視位址\";\n\n\"Import private key encrypted or unencrypted?\" = \"將私密金鑰導入為加密形式還是不加密形式？\";\n\n\"Import with QR code\" = \"以二維碼導入\";\n\n\"Import with text input\" = \"以文本輸入導入\";\n\n\"Imported Account %@\" = \"導入的帳戶%@\";\n\n\"Imported Accounts\" = \"導入的帳戶列表\";\n\n\"Imported Address\" = \"導入的地址\";\n\n\"Imported Addresses\" = \"導入的地址清單\";\n\n\"Imported Cold Wallet Account %@\" = \"導入冷錢包帳戶%@\";\n\n\"Imported Watch Account %@\" = \"導入監視帳戶%@\";\n\n\"Imported Watch Accounts\" = \"導入的監視帳戶清單\";\n\n\"Imported Watch Addresses\" = \"導入的監視地址清單\";\n\n\"Imported Watch Only Accounts can't see reusable address payments, thus this accounts' reusable address is not available. If you want see the reusable address for this account, import the account private key that corresponds to this accounts public key.\" = \"導入的監視帳戶清單無法看到可重用位址上的付款，因此此帳戶的可重用位址不可用。如果您想查看此帳戶的可重用位址，請導入與此帳戶對應的私密金鑰。\";\n\n\"Importing Account\" = \"正在導入帳戶\";\n\n\"Importing Cold Wallet Account\" = \"正在導入冷錢包帳戶\";\n\n\"Importing a Private Key\" = \"正在導入私密金鑰\";\n\n\"Importing a Watch Only Account\" = \"正在導入監視帳戶\";\n\n\"Importing a Watch Only Address\" = \"正在導入監視位址\";\n\n\"Importing an Account\" = \"正在導入帳戶\";\n\n\"Importing an encrypted key will require you to input the password every time you want to send bitcoins from it.\" = \"將金鑰導入為加密形式將會在您每次從中付款時要求輸入密碼。\";\n\n\"In advanced mode, you can import bitcoin keys and addresses from other sources. You can import account private keys, account public keys, private keys, and addresses.\\nPlease note that your 12 word passphrase cannot recover your bitcoins, so it is recommended that you backup imported keys and addresses separately.\" = \"在高級模式下，您可以從其他來源導入比特幣金鑰和位址。您可以導入帳戶私密金鑰、帳戶公開金鑰、私密金鑰和地址。\\n請注意，您的12個單詞短語無法恢復您以此種方式導入的比特幣，因此建議您單獨備份這些導入的金鑰和位址。\";\n\n\"Incomplete\" = \"不完整\";\n\n\"Incorrect passphrase, could not decrypt iCloud wallet backup.\" = \"短語錯誤，無法解密iCloud錢包備份。\";\n\n\"Input a bitcoin address\" = \"輸入一個比特幣位址\";\n\n\"Input a label\" = \"輸入一個標籤\";\n\n\"Input a new label\" = \"輸入一個新標籤\";\n\n\"Input a recommended amount. Somewhere between %@ and %@ BTC\" = \"輸入一個推薦值（介於 %@ 和 %@ BTC之間）\";\n\n\"Input amount\" = \"輸入數量\";\n\n\"Input label\" = \"輸入標籤\";\n\n\"Input new account name\" = \"輸入新帳戶名稱\";\n\n\"Input transaction fee in bitcoins\" = \"輸入交易費（以比特幣為單位）\";\n\n\"Instructions\" = \"指令\";\n\n\"Insufficient Funds\" = \"資金不足\";\n\n\"Insufficient Funds. Account balance is %@ when %@ is required.\" = \"資金不足。帳戶餘額為%@，但需要%@。\";\n\n\"Insufficient Funds. Account contains bitcoin dust. You can only send up to %@ for now.\" = \"資金不足。帳戶內有比特幣灰塵。當前您最多可以支出%@。\";\n\n\"Internal Wallet Data\" = \"內部錢包資料\";\n\n\"Internal account transfer\" = \"內部轉帳\";\n\n\"Invalid Address\" = \"無效的地址\";\n\n\"Invalid Passphrase\" = \"無效短語\";\n\n\"Invalid URL\" = \"無效的網址\";\n\n\"Invalid account private key\" = \"無效帳戶私密金鑰\";\n\n\"Invalid account public Key\" = \"無效帳戶公開金鑰\";\n\n\"Invalid amount\" = \"無效數量\";\n\n\"Invalid backup passphrase\" = \"無效的備份短語\";\n\n\"Invalid private key\" = \"無效私密金鑰\";\n\n\"Invalid scanned data\" = \"無效的掃描資料\";\n\n\"Invalid transaction ID\" = \"無效的交易ID\";\n\n\"It is not recommended that you manually manage private keys yourself. A leak of a private key can lead to the compromise of your accounts.\" = \"我們不建議您自己手工管理私密金鑰。私密金鑰的洩漏可能會導致您的帳戶受到損害。\";\n\n\"It is not recommended that you use a regular bitcoin address for multiple payments, but instead you should import a reusable address. Add address anyways?\" = \"我們不建議您使用常規的位址多次付款，建議您導入一個可重用的位址。仍然堅持添加地址嗎？\";\n\n\"Label\" = \"標籤\";\n\n\"Label Transaction\" = \"給交易加標籤\";\n\n\"Local backup to wallet failed!\" = \"本地備份到錢包失敗了！\";\n\n\"Local wallet will be lost. Are you sure you want to restore wallet from iCloud?\" = \"本地錢包將會丟失。您確定要從iCloud還原錢包嗎？\";\n\n\"Maximum accounts reached\" = \"達到最大的帳戶數量\";\n\n\"More\" = \"更多\";\n\n\"Name\" = \"名稱\";\n\n\"Network Error\" = \"網路錯誤\";\n\n\"New Wallet\" = \"新建錢包\";\n\n\"New addresses will be automatically generated and cycled for you as you use your current available addresses.\" = \"您使用當前可用位址的時候將為您自動生成新位址並迴圈。\";\n\n\"Next\" = \"下一個\";\n\n\"No\" = \"沒有\";\n\n\"None currently\" = \"目前沒有\";\n\n\"Not now\" = \"不是現在\";\n\n\"Now authorize the transaction on your air gap device. When you have done so, click continue on this device to scan the authorized transaction data and make your payment.\" = \"現在，請在您的離線輔設備上授權此交易。然後，在此設備上按一下“繼續”以掃描授權的交易資料並進行付款。\";\n\n\"OK\" = \"OK\";\n\n\"On your primary online device, when you want to make a payment from a cold wallet account, simply do it as you normally would on a normal account. When you click 'Send' on the Review Payment screen, instead of the payment going out immediately, you will be prompted to pass the unauthorized transaction data. Then on your secondary offline device, within this screen click 'Scan' to import the transaction so it can be authorized.\" = \"在您的線上主設備上，當您想通過冷錢包帳戶付款時，只需按照通常在正常帳戶中的方式進行付款。當您在“審核付款”螢幕上點擊“發送”時，系統會提示您傳遞未經授權的交易資料，而不是立即付款。然後在您的離線輔設備上，在此螢幕中按一下“掃描”以導入交易，以便完成對交易的授權。\";\n\n\"Once the transaction has been authorized by completing the above two steps, pass the authorized transaction back to your primary online device to finalize your payment.\" = \"一旦該交易已通過以上兩個步驟完成授權，將已授權交易送回線上主設備以最終完成支付。\";\n\n\"Other Links\" = \"其它連結\";\n\n\"Pass\" = \"通過\";\n\n\"Passphrase\" = \"短語\";\n\n\"Passphrase does not match the transaction\" = \"短語不匹配交易\";\n\n\"Password\" = \"密碼\";\n\n\"Payment Index: %lu\" = \"付款索引： %lu\";\n\n\"Private key does not match address\" = \"私密金鑰不匹配地址\";\n\n\"Private key missing\" = \"私密金鑰缺失\";\n\n\"QR code\" = \"二維碼\";\n\n\"Quit and re-enter app\" = \"退出並重新進入APP\";\n\n\"Rate\" = \"比率\";\n\n\"Rate us in the App Store!\" = \"在App商店給我們評分！\";\n\n\"Receive\" = \"接收\";\n\n\"Receive Payment\" = \"接收付款\";\n\n\"Receive Payment From Reusable Address\" = \"從可重用位址接收付款\";\n\n\"Remind me Later\" = \"稍後提醒我\";\n\n\"Restore\" = \"恢復\";\n\n\"Restore Wallet\" = \"恢復錢包\";\n\n\"Restore from iCloud\" = \"從iCloud還原\";\n\n\"Restoring Wallet\" = \"恢復錢包\";\n\n\"Retry\" = \"重試\";\n\n\"Reusable Address Payment Addresses\" = \"可重用地址付款地址\";\n\n\"Reusable Address:\" = \"可重用地址:\";\n\n\"Reusable Addresses\" = \"可重用地址清單\";\n\n\"Review Payment\" = \"審查付款\";\n\n\"Save\" = \"保存\";\n\n\"Scan\" = \"掃描\";\n\n\"Scan For Reusable Address Payment\" = \"掃描支付到可重用位址的付款\";\n\n\"Scan QR Code\" = \"掃描二維碼\";\n\n\"Scan for reusable address transaction\" = \"掃描可重用位址交易\";\n\n\"Scan next part\" = \"掃描下一部分\";\n\n\"Scroll down to the section ‘Account Actions’\" = \"向下滾動到“帳戶操作”部分\";\n\n\"Select Account\" = \"選擇帳戶\";\n\n\"Select and click a blockexplorer API\" = \"選擇並點擊一個區塊流覽API\";\n\n\"Select and click a transaction\" = \"選擇並點擊一個交易\";\n\n\"Select and click an account\" = \"選擇並點擊一個帳戶\";\n\n\"Select and click an account to receive from\" = \"選擇並點擊一個帳戶以從中收款\";\n\n\"Select and click an account to view it’s transaction history\" = \"選擇並點擊一個帳戶以查看其交易歷史記錄\";\n\n\"Select and click an address\" = \"選擇並點擊一個位址\";\n\n\"Send\" = \"發送\";\n\n\"Send Payment\" = \"發送付款\";\n\n\"Send To Address In Contacts\" = \"發送到連絡人的地址\";\n\n\"Send authorized payment?\" = \"發送已授權的付款？\";\n\n\"Sending\" = \"發送中\";\n\n\"Sending payment to a reusable address might take longer to show up then a normal transaction with the blockchain.info API. You might have to wait until at least 1 confirmation for the transaction to show up. This is due to the limitations of the blockchain.info API. For reusable address payments to show up faster, configure your app to use the Insight API in advance settings.\" = \"在使用blockchain.info API時，比起正常交易，發送款項到可重用位址可能需要較長時間才能顯示出來。您可能不得不至少等到該交易得到1次確認。這是由blockchain.info API的限制導致的。如果希望發送到可重用位址的款項能夠儘快地顯示，請在高級設置中配置您的應用程式使用Insight API。\";\n\n\"Sent %@ to %@\" = \"已發送%@到%@\";\n\n\"Set Transaction Fee in %@\" = \"在%@中設置交易費\";\n\n\"Settings\" = \"設置\";\n\n\"Some funds may be pending confirmation and cannot be spent yet. (Check your account history) Account only has a spendable balance of %@\" = \"一些資金尚處於待確認狀態，暫時不能使用。（請檢查您的帳戶歷史記錄）帳戶僅有%@的可支付餘額\";\n\n\"Some people have compared bitcoin addresses to a bank routing number. It is a good analogy, however bitcoin addresses are public. So if you reuse the same bitcoin address for multiple payments like you would a routing number, people will be able to figure out how much bitcoin you have. Thus it is recommended that you only use one address per payment.\\nThis causes usability issues making the user use a new address whenever receiving a payment is cumbersome.\\nStealth/reusable addresses provides a better solution. When you give a sender a reusable address, the sender will derive a one time regular bitcoin address from the reusable address. Then the sender will send a payment to that regular bitcoin address. Now you can give many people just one reusable address and have them all send you payments without letting other people know how much bitcoin you have.\\nA reusable address looks like this vJmxthatTBXibYe9aZavx18iAT9gyiJETGkhwPX2WbHQGuzX83YvQXynD2t8yHU4Xjfonu5x9m6B4yxquytFP1c2CRbVR9mecxesvE. A reusable address is a lot longer then a regular bitcoin address, it is 102 characters in length.\\nReusable addresses are great, however there are no other mobile bitcoin wallets but ArcBit that supports reusable addresses for now. Which is why ArcBit supports receiving payments from both regular bitcoin addresses and reusable addresses.\\nFor each account, you have one reusable address. You can find it on your Receive screen. Swipe all the way to right on the QRCode on your Receive screen and you will find a reusable address.\" = \"有些人將比特幣位址與銀行路由號碼進行了比較。這是一個很好的比喻。不過，比特幣地址是公開的。因此，如果您重複使用相同的比特幣位址進行多次付款（就像您的路由號碼），則人們將能夠計算出您擁有多少比特幣。因此，建議您每個位址只收一次款。\\n但是要求用戶在每次收款時換用新地址是很麻煩的，這會導致可用性問題。\\n隱形地址/可重用地址提供了更好的解決方案。當您給付款人一個可重用位址時，付款人將從可重用位址得到一個一次性的比特幣位址。然後付款人會發送一個支付到該位址。現在您可以給許多人同一個可重用位址，讓他們都給您付款，而不會讓別人知道您有多少比特幣。\\n一個可重用位址看起來像這樣：vJmxthatTBXibYe9aZavx18iAT9gyiJETGkhwPX2WbHQGuzX83YvQXynD2t8yHU4Xjfonu5x9m6B4yxquytFP1c2CRbVR9mecxesvE。可重用位址的長度為102個字元，比普通的比特幣位址長得多。\\n可重用位址非常棒，但是到目前為止，除了ArcBit，還沒有其他比特幣手機錢包支持。這就是為什麼ArcBit支援從常規比特幣位址和可重用位址接收付款的原因。\\n對於每個帳戶，您都有一個可重用位址。在接收螢幕上一直向右滑動二維碼，您就可以找到它。\";\n\n\"Spending from a cold wallet account\" = \"從冷錢包帳戶支出\";\n\n\"Start fresh\" = \"全新開始\";\n\n\"Start/Restore Another Wallet\" = \"開始/恢復另一個錢包\";\n\n\"Starting Change address ID:\" = \"找零地址ID:\";\n\n\"Starting Receiving Address ID:\" = \"起始接收位址ID：\";\n\n\"Step 1: Scan transaction to authorize\" = \"第1步：掃描交易授權\";\n\n\"Step 2: Input 12 word backup passphrase\" = \"第2步：輸入12字備份短語\";\n\n\"Step 3: Pass authorized transaction data\" = \"第3步：傳遞經過授權的交易資料\";\n\n\"Steps\" = \"步驟\";\n\n\"Success\" = \"成功\";\n\n\"Swipe right on an address\" = \"在地址上向右滑動\";\n\n\"Swipe to the right on the QR Code Image until you see the reusable address\" = \"在二維碼圖像上向右滑動，直到看到可重用地址\";\n\n\"Temporarily import account private key\" = \"臨時導入帳戶私密金鑰\";\n\n\"Temporarily import private key\" = \"臨時導入私密金鑰\";\n\n\"The cold wallet feature will allow you to create accounts which offer better security compared to normal online wallets. You will need 2 devices to use this feature. Your normal day to day device that is connected to the internet and a secondary device that is not connected to the internet (Your secondary device would need to be online once to download the ArcBit app. Afterwards keep the secondary device offline for maximum security). This feature allows you to authorize bitcoin payments from an offline device so that the keys to your bitcoins will never need to be stored on your online device. Follow the step by step instructions by clicking the info buttons within the below sections.\" = \"冷錢包功能將允許您創建比普通線上錢包更安全的帳戶。您需要2個設備才能使用此功能。您連接到互聯網的日常使用設備和不連接到互聯網的輔助設備（您的輔助設備需要線上一次以下載ArcBit應用程式，然後請保持輔助設備永久性離線以保證最大的安全性）。 此功能允許您從離線設備授權比特幣付款，這樣比特幣的金鑰永遠不需要存儲在您的線上設備上。點擊下面的部分中的資訊按鈕，按照分步指令的指引進行操作。\";\n\n\"The cold wallet feature will allow you to create accounts which offer better security compared to normal online wallets. You will need 2 devices to use this feature. Your normal day to day device that is connected to the internet and a secondary device that is not connected to the internet (Your secondary device would need to be online once to download the ArcBit app. Afterwards keep the secondary device offline for maximum security). This feature allows you to authorize bitcoin payments from an offline device so that the keys to your bitcoins will never need to be stored on your online device. You can enable the cold wallet feature by going into advanced settings.\" = \"冷錢包功能將允許您創建比普通線上錢包更安全的帳戶。您需要2個設備才能使用此功能。您連接到互聯網的普通日常設備和不連接到互聯網的輔助設備（您的輔助設備需要線上一次以下載ArcBit應用程式，然後請保持輔助設備永久性離線以獲得最大的安全性）。 此功能允許您從離線設備授權比特幣付款，這樣比特幣的金鑰永遠不需要存儲在您的線上設備上。您可以在高級設置中啟用冷錢包功能。\";\n\n\"This account type can't see reusable address payments\" = \"此帳戶類型不能看到可重用位址的支付\";\n\n\"This feature allows you to manually input a transaction ID and see if the corresponding transaction contains a reusable address payment to your reusable address. If so, then the funds will be added to your wallet. Normally the app will discover reusable address payments automatically for you, but if you believe a payment is missing you can use this feature.\" = \"此功能可讓您手工輸入交易ID，以查看相應的交易是否包含支付到您的可重用位址的付款。如果包含，資金將被添加到您的錢包。通常情況下，應用程式將自動發現支付到您的可重用位址的付款，但如果您確信付款丟失了，您可以使用此功能。\";\n\n\"To:\" = \"至：\";\n\n\"Today\" = \"今天\";\n\n\"Toggle Automatic Transaction Fee\" = \"切換動態交易費\";\n\n\"Toggle ‘Enable Transaction Fee’\" = \"切換“啟用交易費”\";\n\n\"Toggle ’Enable advanced mode’\" = \"切換“啟用高級模式”\";\n\n\"Total:\" = \"總計:\";\n\n\"Transaction %@ already accounted for.\" = \"交易%@已入帳。\";\n\n\"Transaction %@ does not belong to this account.\" = \"交易%@不屬於此帳戶。\";\n\n\"Transaction Fee\" = \"手續費\";\n\n\"Transaction ID\" = \"交易ID\";\n\n\"Transaction ID: %@\" = \"交易ID: %@\";\n\n\"Transaction authorized\" = \"交易授權\";\n\n\"Transaction confirmations\" = \"交易確認深度\";\n\n\"Transaction fees impact how quickly the Bitcoin network will confirm your transactions. Higher fees means faster confirmation times. Default fee behavior can be configured in settings.\" = \"交易費用影響比特幣網路確認您的交易的速度。費用越高，確認越快。可以在設置中配置預設交易費規則。\";\n\n\"Transaction is not a reusable address transaction.\" = \"交易不是一個可重用位址交易。\";\n\n\"Transaction needs to be authorized by an offline and air gap device. Send transaction to an offline device for authorization?\" = \"交易需要由離線輔設備授權。發送交易到離線輔設備進行授權？\";\n\n\"Transaction needs to be passed back to your online device in order for the payment to be sent\" = \"交易需要傳遞回您的線上主設備，以便發送付款\";\n\n\"Try Again\" = \"再試一次\";\n\n\"Try our new cold wallet feature!\" = \"嘗試我們的冷錢包功能！\";\n\n\"URL does not contain an address.\" = \"網址不包含位址。\";\n\n\"Unable to get dynamic fees. Falling back on fixed transaction fee. (fee can be configured on review payment)\" = \"無法獲得動態的費用。仍舊使用固定交易費。（費用可以在審核支付時修改）\";\n\n\"Unarchive Account\" = \"解除封存帳戶\";\n\n\"Unarchive address\" = \"解除封存地址\";\n\n\"Unarchived address\" = \"未封存地址\";\n\n\"Unconfirmed\" = \"未確認\";\n\n\"Unencrypted\" = \"未加密\";\n\n\"Use ArcBit on your browser to complement the mobile app. The web wallet has all the features that the mobile wallet has plus more!\" = \"在您的流覽器中使用ArcBit作為移動APP的補充！網頁版錢包包含所有的移動錢包功能，以及一些額外的功能！\";\n\n\"Use all funds\" = \"使用所有資金\";\n\n\"View Account Address\" = \"查看帳戶地址\";\n\n\"View Account Address In Web\" = \"在網頁中查看帳戶地址\";\n\n\"View Account Addresses\" = \"查看帳戶地址清單\";\n\n\"View Account Private Key\" = \"查看帳戶私密金鑰\";\n\n\"View Account Public Key\" = \"查看帳戶公開金鑰\";\n\n\"View Achievements\" = \"查看成就\";\n\n\"View Addresses\" = \"查看地址清單\";\n\n\"View ArcBit Brain Wallet Details\" = \"查看ArcBit腦錢包詳情\";\n\n\"View ArcBit Web Wallet Details\" = \"查看ArcBit網頁錢包詳情\";\n\n\"View History\" = \"查看歷史\";\n\n\"View Private Key\" = \"查看私密金鑰\";\n\n\"View Transaction In Web\" = \"在網頁中查看交易\";\n\n\"View account private key QR code\" = \"查看帳戶私密金鑰二維碼\";\n\n\"View account public key QR code\" = \"查看帳戶公開金鑰二維碼\";\n\n\"View address QR code\" = \"查看地址二維碼\";\n\n\"View address in web\" = \"在網路中查看位址\";\n\n\"View in web\" = \"在網頁中查看\";\n\n\"View private key QR code\" = \"查看私密金鑰二維碼\";\n\n\"Visit our home page\" = \"訪問我們的主頁\";\n\n\"Wallet backup passphrase\" = \"錢包備份短語\";\n\n\"Warning\" = \"警告\";\n\n\"Welcome to ArcBit, a user only controlled Bitcoin wallet. Start using the app now by depositing your Bitcoins here.\" = \"歡迎來到ArcBit——一款完全由用戶控制的比特幣錢包。將您的比特幣轉入ArcBit，現在就開始使用它！\";\n\n\"Welcome!\" = \"歡迎！\";\n\n\"What are Account/Extended Keys?\" = \"什麼是帳戶/擴展金鑰？\";\n\n\"What are accounts?\" = \"什麼是帳戶？\";\n\n\"What are reusable addresses?\" = \"什麼是可重用地址？\";\n\n\"What are the benefits and advantages of Bitcoin?\" = \"比特幣有什麼好處？\";\n\n\"What are transaction confirmations?\" = \"交易確認數是什麼意思？\";\n\n\"What is ArcBit's cold wallet feature?\" = \"ArcBit的冷錢包功能是什麼？\";\n\n\"What is Bitcoin?\" = \"什麼是比特幣？\";\n\n\"What is a bitcoin wallet?\" = \"什麼是比特幣錢包？\";\n\n\"What makes ArcBit different from other bitcoin wallets?\" = \"ArcBit與其他錢包的區別在哪裡？\";\n\n\"With an ArcBit cold wallet feature, you can create wallets and make payments offline without exposing your private keys to an internet connected device. This feature is great for storing large amounts of bitcoin or for the security conscious minded. Check out this feature in the cold wallet section in the side menu.\" = \"使用ArcBit冷錢包功能，您可以創建錢包並離線付款，而不會將您的私密金鑰暴露給連接到互聯網的設備。這個功能非常適合存儲大量的比特幣或者對安全敏感的用戶。請在側邊功能表的冷錢包部分查看此功能。\";\n\n\"Write down backup passphrase\" = \"寫下備份短語\";\n\n\"Write down or memorize your 12 word wallet backup passphrase. You can view it by clicking \\\"Show backup passphrase\\\" in Settings. Your wallet backup passphrase is needed to recover your bitcoins.\" = \"寫下或記住您的12單詞錢包備份短語。在設置中按一下“顯示備份短語”可以查看。您的錢包備份短語可以用來恢復您的比特幣。\";\n\n\"Write down the 12 word passphrase below and keep it safe. This passphrase alone can restore your entire wallets\\' bitcoins (excluding imports).\" = \"記下下麵的12單詞短語，並妥善保管。這個短語可以恢復您的整個錢包的比特幣（但不包括導入的）\";\n\n\"Write down the 12 word passphrase below and keep it safe. This passphrase alone can restore your entire wallets\\' bitcoins.\" = \"記下下麵的12單詞短語，並妥善保管。這個短語可以恢復您的整個錢包的比特幣。\";\n\n\"Yes\" = \"是\";\n\n\"You are making a payment to a reusable address. Make sure that the receiver can see the payment made to them. (All ArcBit reusable addresses are compatible with other ArcBit wallets)\" = \"您正在向可重用地址付款。確保接收方可以看到對他們的付款。（所有ArcBit可重用地址都與其他ArcBit錢包相容）\";\n\n\"You have %@, but %@ is needed. (This includes the transactions fee)\" = \"您有%@，但需要%@（包括交易費用）。\";\n\n\"You must exit and kill this app in order for this to take effect.\" = \"您必須退出並殺死此APP，以使此修改生效。\";\n\n\"Your current wallet will be deleted. Your can restore your current wallet later with the wallet passphrase, but any imported accounts or addresses created in advanced mode cannot be recovered. Do you wish to continue?\" = \"您目前的錢包將被刪除。您可以稍後使用錢包短語恢復您當前的錢包，但無法恢復在高級模式下創建的任何導入的帳戶或位址。您想繼續嗎？\";\n\n\"Your iCloud backup was last saved on %@. Do you want to restore your wallet from iCloud or backup your local wallet to iCloud?\" = \"您的iCloud備份最後保存於%@。您要從iCloud還原您的錢包，還是將本地錢包備份到iCloud？\";\n\n\"Your new transaction fee is too high\" = \"您的新交易費太高\";\n\n\"Your wallet is now restored\" = \"您的錢包現在已恢復\";\n\n\"\\nAllow camera access in\\n Settings->Privacy->Camera->%@\" = \"\\n允許相機訪問於\\n 設置->隱私->相機->%@\";\n\n\"\\tArcBit Web Wallet is a Chrome extension. It has all the features of the mobile wallet plus more. Highlights include the ability to create multiple wallets instead of just one, and a new non-cumbersome way to generate wallets, store and spend bitcoins all from cold storage! ArcBit's new way to manage your cold storage bitcoins also offers a more compelling reason to use ArcBit's watch account feature. Now you can safely watch the balance of your cold storage bitcoins by enabling advance mode in ArcBit and importing your cold storage account public keys.\\n\\tUse ArcBit Web Wallet in whatever way you wish. You can create a new wallet, or you can input your current 12 word backup passphrase to manage the same bitcoins across different devices. Check out the ArcBit Web Wallet in the Chrome Web Store for more details!\\n\" = \"\\tArcBit網頁錢包是一款Chrome擴展程式。它比手機錢包具備更多功能。亮點包括可以創建多個錢包，以一種新的簡便方式來生成錢包，以及從冷錢包中存儲和支付比特幣！ArcBit的管理冷錢包的新方法也為使用ArcBit的監視帳戶提供了令人信服的理由。現在，您可以通過在ArcBit中啟用高級模式並導入冷錢包帳戶公開金鑰，安全地觀察冷錢包的比特幣餘額。\\n\\t您可以以任何您希望的方式使用ArcBit網頁錢包。您可以創建一個新的錢包，或者您也可以輸入您當前的12單詞備份短語，以管理不同設備上的相同比特幣。更多詳細資訊，請參閱Chrome應用商店中的ArcBit網頁錢包。\\n\";\n\n\"\\tWith the Arcbit Brain Wallet you can safely spend your bitcoins without ever having your private keys be exposed to the internet. It can be use in conjunction with your Arcbit Wallet or as a stand alone wallet.\\n\" = \"\\t使用Arcbit腦錢包，您可以安全地支付您的比特幣，而不必讓您的私密金鑰暴露在互聯網。它可以與您的Arcbit錢包一起使用或作為獨立的錢包使用。\\n\";\n\n\"iCloud Error: %@\" = \"iCloud錯誤: %@\";\n\n\"iCloud backup found\" = \"找到iCloud備份\";\n\n\"iCloud backup not found\" = \"未找到iCloud備份\";\n\n\"iCloud backup will be lost. Are you sure you want to backup your local wallet to iCloud?\" = \"iCloud備份將丟失。您確定要將本地的錢包備份到iCloud嗎？\";\n\n\"Wallet backup passphrase will be shown\" = \"將顯示錢包備份短語\";\n\n\"Write down or memorize your wallet backup passphrase. If you lose your backup passphrase, your wallet cannot be recovered.\" = \"記下或記住您的錢包備份短語。如果您丟失了備份短語，您的錢包將無法恢復。\";\n\n\"I understand\" = \"我明白\";\n\n\"iCloud support for ArcBit discontinued\" = \"iCloud對ArcBit的支持已經停止\";\n\n\"iCloud support for ArcBit is being discontinued. If your backup passphrase has not been backed up already, please do so.\" = \"iCloud即將停止對ArcBit的支持。如果您尚未備份您的備份短語，請備份之。\";\n\n\"Reusable address payments are disabled until further notice.\" = \"可重用地址付款被禁用，直至另行通知。\";\n\n"
  },
  {
    "path": "ArcBit/zh-Hant.lproj/Main.strings",
    "content": "\n/* Class = \"UILabel\"; text = \"Address ID 3:\"; ObjectID = \"023-0e-B8c\"; */\n\"023-0e-B8c.text\" = \"Address ID 3:\";\n\n/* Class = \"UITextView\"; text = \"xpub6CUHPUqLTj2pxbrab2gdy7XYKiAoy47PFRBkgf8YiBHD3UzJH6WqQSmLXAndZbFuJnU4tWgBWjRjSxyk6AHN5JpVsUMu4E9MwNCGgFNibDd\"; ObjectID = \"1BE-No-RbK\"; */\n\"1BE-No-RbK.text\" = \"xpub6CUHPUqLTj2pxbrab2gdy7XYKiAoy47PFRBkgf8YiBHD3UzJH6WqQSmLXAndZbFuJnU4tWgBWjRjSxyk6AHN5JpVsUMu4E9MwNCGgFNibDd\";\n\n/* Class = \"UILabel\"; text = \"Step 1: Scan transaction to authorize\"; ObjectID = \"1EF-AG-Tuv\"; */\n\"1EF-AG-Tuv.text\" = \"Step 1: Scan transaction to authorize\";\n\n/* Class = \"UITextField\"; placeholder = \"0\"; ObjectID = \"1SA-Gl-EbR\"; */\n\"1SA-Gl-EbR.placeholder\" = \"0\";\n\n/* Class = \"UILabel\"; text = \"Address ID 0:\"; ObjectID = \"1T8-1h-MPB\"; */\n\"1T8-1h-MPB.text\" = \"Address ID 0:\";\n\n/* Class = \"UILabel\"; text = \"Change Address ID 3:\"; ObjectID = \"2Ct-rU-oU0\"; */\n\"2Ct-rU-oU0.text\" = \"Change Address ID 3:\";\n\n/* Class = \"UILabel\"; text = \"Title\"; ObjectID = \"2WH-yM-ULb\"; */\n\"2WH-yM-ULb.text\" = \"Title\";\n\n/* Class = \"UILabel\"; text = \"BTC\"; ObjectID = \"3XA-yE-mb3\"; */\n\"3XA-yE-mb3.text\" = \"BTC\";\n\n/* Class = \"UINavigationItem\"; title = \"Cold Wallet\"; ObjectID = \"3YE-it-wRp\"; */\n\"3YE-it-wRp.title\" = \"Cold Wallet\";\n\n/* Class = \"UILabel\"; text = \"Address ID 1:\"; ObjectID = \"4Er-7p-LfQ\"; */\n\"4Er-7p-LfQ.text\" = \"Address ID 1:\";\n\n/* Class = \"UINavigationItem\"; title = \"Restore Wallet\"; ObjectID = \"4al-pX-1Gn\"; */\n\"4al-pX-1Gn.title\" = \"Restore Wallet\";\n\n/* Class = \"UITabBarItem\"; title = \"Send\"; ObjectID = \"4mb-2o-3A1\"; */\n\"4mb-2o-3A1.title\" = \"Send\";\n\n/* Class = \"UITextField\"; text = \"L5HJ8fiaSL2oGNUrgVcAnq284r9g43F6P2FsjidA7nwuhTDMEdds\"; ObjectID = \"4p4-5y-JUZ\"; */\n\"4p4-5y-JUZ.text\" = \"L5HJ8fiaSL2oGNUrgVcAnq284r9g43F6P2FsjidA7nwuhTDMEdds\";\n\n/* Class = \"UITabBarItem\"; title = \"Receive\"; ObjectID = \"4vC-pM-f1o\"; */\n\"4vC-pM-f1o.title\" = \"Receive\";\n\n/* Class = \"UINavigationItem\"; title = \"Links\"; ObjectID = \"4vj-uf-BUZ\"; */\n\"4vj-uf-BUZ.title\" = \"Links\";\n\n/* Class = \"UILabel\"; text = \"Amount:\"; ObjectID = \"59b-yN-GFc\"; */\n\"59b-yN-GFc.text\" = \"Amount:\";\n\n/* Class = \"UILabel\"; text = \"Account Name\"; ObjectID = \"5EJ-8r-ive\"; */\n\"5EJ-8r-ive.text\" = \"Account Name\";\n\n/* Class = \"UILabel\"; text = \"Master Seed Hex\"; ObjectID = \"6BY-dx-fLW\"; */\n\"6BY-dx-fLW.text\" = \"Master Seed Hex\";\n\n/* Class = \"UITextField\"; placeholder = \"address\"; ObjectID = \"6V1-g4-Kqz\"; */\n\"6V1-g4-Kqz.placeholder\" = \"address\";\n\n/* Class = \"UILabel\"; text = \"Fee:\"; ObjectID = \"6dK-Su-wIf\"; */\n\"6dK-Su-wIf.text\" = \"Fee:\";\n\n/* Class = \"UITextField\"; text = \"L5HJ8fiaSL2oGNUrgVcAnq284r9g43F6P2FsjidA7nwuhTDMEdds\"; ObjectID = \"6iR-L6-vEV\"; */\n\"6iR-L6-vEV.text\" = \"L5HJ8fiaSL2oGNUrgVcAnq284r9g43F6P2FsjidA7nwuhTDMEdds\";\n\n/* Class = \"UILabel\"; text = \"BTC\"; ObjectID = \"7FD-gV-OIx\"; */\n\"7FD-gV-OIx.text\" = \"BTC\";\n\n/* Class = \"UIButton\"; normalTitle = \"QR Code\"; ObjectID = \"7uk-nQ-Elq\"; */\n\"7uk-nQ-Elq.normalTitle\" = \"QR Code\";\n\n/* Class = \"UIButton\"; normalTitle = \"QR Code\"; ObjectID = \"8PH-F7-qh6\"; */\n\"8PH-F7-qh6.normalTitle\" = \"QR Code\";\n\n/* Class = \"UITextView\"; text = \"street ankle life mass ready viable worth renew stove panther immense camera\"; ObjectID = \"8T4-K7-DEy\"; */\n\"8T4-K7-DEy.text\" = \"street ankle life mass ready viable worth renew stove panther immense camera\";\n\n/* Class = \"UITextField\"; text = \"1Jhrq6Uxfku5sK9mf3QNwmPb1WPbKPQ9Yx\"; ObjectID = \"8bg-zJ-MLy\"; */\n\"8bg-zJ-MLy.text\" = \"1Jhrq6Uxfku5sK9mf3QNwmPb1WPbKPQ9Yx\";\n\n/* Class = \"UIButton\"; normalTitle = \"QR Code\"; ObjectID = \"98i-Oo-pHA\"; */\n\"98i-Oo-pHA.normalTitle\" = \"QR Code\";\n\n/* Class = \"UITextField\"; text = \"1Jhrq6Uxfku5sK9mf3QNwmPb1WPbKPQ9Yx\"; ObjectID = \"9Hg-Kd-50y\"; */\n\"9Hg-Kd-50y.text\" = \"1Jhrq6Uxfku5sK9mf3QNwmPb1WPbKPQ9Yx\";\n\n/* Class = \"UILabel\"; text = \"Step 2: Input 12 word backup passphrase\"; ObjectID = \"9sL-6M-fQO\"; */\n\"9sL-6M-fQO.text\" = \"Step 2: Input 12 word backup passphrase\";\n\n/* Class = \"UILabel\"; text = \"Label\"; ObjectID = \"AHj-6Y-pf6\"; */\n\"AHj-6Y-pf6.text\" = \"Label\";\n\n/* Class = \"UINavigationItem\"; title = \"Root View Controller\"; ObjectID = \"AUN-mh-2Qy\"; */\n\"AUN-mh-2Qy.title\" = \"Root View Controller\";\n\n/* Class = \"UILabel\"; text = \"Incomplete\"; ObjectID = \"BDz-V2-QTc\"; */\n\"BDz-V2-QTc.text\" = \"Incomplete\";\n\n/* Class = \"UILabel\"; text = \"Wallet backup passphrase\"; ObjectID = \"C32-6S-BC5\"; */\n\"C32-6S-BC5.text\" = \"Wallet backup passphrase\";\n\n/* Class = \"UIButton\"; normalTitle = \"QR Code\"; ObjectID = \"CKf-rh-o2A\"; */\n\"CKf-rh-o2A.normalTitle\" = \"QR Code\";\n\n/* Class = \"UITextView\"; text = \"xpub6CUHPUqLTj2pxbrab2gdy7XYKiAoy47PFRBkgf8YiBHD3UzJH6WqQSmLXAndZbFuJnU4tWgBWjRjSxyk6AHN5JpVsUMu4E9MwNCGgFNibDd\"; ObjectID = \"CZC-KE-fwt\"; */\n\"CZC-KE-fwt.text\" = \"xpub6CUHPUqLTj2pxbrab2gdy7XYKiAoy47PFRBkgf8YiBHD3UzJH6WqQSmLXAndZbFuJnU4tWgBWjRjSxyk6AHN5JpVsUMu4E9MwNCGgFNibDd\";\n\n/* Class = \"UITextField\"; text = \"L5HJ8fiaSL2oGNUrgVcAnq284r9g43F6P2FsjidA7nwuhTDMEdds\"; ObjectID = \"CyY-nD-niX\"; */\n\"CyY-nD-niX.text\" = \"L5HJ8fiaSL2oGNUrgVcAnq284r9g43F6P2FsjidA7nwuhTDMEdds\";\n\n/* Class = \"UILabel\"; text = \"Change Address ID 2:\"; ObjectID = \"DHC-ME-zNy\"; */\n\"DHC-ME-zNy.text\" = \"Change Address ID 2:\";\n\n/* Class = \"UILabel\"; text = \"Change Address ID 1:\"; ObjectID = \"DfB-wQ-pzV\"; */\n\"DfB-wQ-pzV.text\" = \"Change Address ID 1:\";\n\n/* Class = \"UILabel\"; text = \"USD\"; ObjectID = \"DlS-FL-u3H\"; */\n\"DlS-FL-u3H.text\" = \"USD\";\n\n/* Class = \"UIButton\"; normalTitle = \"QR Code\"; ObjectID = \"EWj-Ul-aJK\"; */\n\"EWj-Ul-aJK.normalTitle\" = \"QR Code\";\n\n/* Class = \"UILabel\"; text = \"Enter a wallet backup passphrase to wipe the current wallet and start/restore another.\"; ObjectID = \"End-6K-7BJ\"; */\n\"End-6K-7BJ.text\" = \"Enter a wallet backup passphrase to wipe the current wallet and start/restore another.\";\n\n/* Class = \"UITextField\"; text = \"1Jhrq6Uxfku5sK9mf3QNwmPb1WPbKPQ9Yx\"; ObjectID = \"GIx-ls-zRM\"; */\n\"GIx-ls-zRM.text\" = \"1Jhrq6Uxfku5sK9mf3QNwmPb1WPbKPQ9Yx\";\n\n/* Class = \"UILabel\"; text = \"Account Name\"; ObjectID = \"GKZ-gr-jad\"; */\n\"GKZ-gr-jad.text\" = \"Account Name\";\n\n/* Class = \"UIButton\"; normalTitle = \"QR Code\"; ObjectID = \"GKc-CM-keO\"; */\n\"GKc-CM-keO.normalTitle\" = \"QR Code\";\n\n/* Class = \"UIButton\"; normalTitle = \"QR Code\"; ObjectID = \"GXm-xv-dei\"; */\n\"GXm-xv-dei.normalTitle\" = \"QR Code\";\n\n/* Class = \"UITextField\"; text = \"1Jhrq6Uxfku5sK9mf3QNwmPb1WPbKPQ9Yx\"; ObjectID = \"GaU-ZY-4ye\"; */\n\"GaU-ZY-4ye.text\" = \"1Jhrq6Uxfku5sK9mf3QNwmPb1WPbKPQ9Yx\";\n\n/* Class = \"UITextField\"; text = \"L5HJ8fiaSL2oGNUrgVcAnq284r9g43F6P2FsjidA7nwuhTDMEdds\"; ObjectID = \"Gev-Fd-cCI\"; */\n\"Gev-Fd-cCI.text\" = \"L5HJ8fiaSL2oGNUrgVcAnq284r9g43F6P2FsjidA7nwuhTDMEdds\";\n\n/* Class = \"UILabel\"; text = \"Address ID 2:\"; ObjectID = \"Gz1-7B-U19\"; */\n\"Gz1-7B-U19.text\" = \"Address ID 2:\";\n\n/* Class = \"UILabel\"; text = \"description\"; ObjectID = \"HDn-9v-o1a\"; */\n\"HDn-9v-o1a.text\" = \"description\";\n\n/* Class = \"UILabel\"; text = \"Title\"; ObjectID = \"J2q-P7-aOq\"; */\n\"J2q-P7-aOq.text\" = \"Title\";\n\n/* Class = \"UILabel\"; text = \"Label\"; ObjectID = \"JHD-rx-W8M\"; */\n\"JHD-rx-W8M.text\" = \"Label\";\n\n/* Class = \"UILabel\"; text = \"Address ID 4:\"; ObjectID = \"JMG-AI-3du\"; */\n\"JMG-AI-3du.text\" = \"Address ID 4:\";\n\n/* Class = \"UITextField\"; text = \"L5HJ8fiaSL2oGNUrgVcAnq284r9g43F6P2FsjidA7nwuhTDMEdds\"; ObjectID = \"Joe-Ag-Cvs\"; */\n\"Joe-Ag-Cvs.text\" = \"L5HJ8fiaSL2oGNUrgVcAnq284r9g43F6P2FsjidA7nwuhTDMEdds\";\n\n/* Class = \"UITextField\"; text = \"1Jhrq6Uxfku5sK9mf3QNwmPb1WPbKPQ9Yx\"; ObjectID = \"Jrq-7q-biA\"; */\n\"Jrq-7q-biA.text\" = \"1Jhrq6Uxfku5sK9mf3QNwmPb1WPbKPQ9Yx\";\n\n/* Class = \"UIButton\"; normalTitle = \"Contacts\"; ObjectID = \"JvL-Cg-kNK\"; */\n\"JvL-Cg-kNK.normalTitle\" = \"Contacts\";\n\n/* Class = \"UITabBarItem\"; title = \"Send\"; ObjectID = \"KIz-U8-UaX\"; */\n\"KIz-U8-UaX.title\" = \"Send\";\n\n/* Class = \"UIButton\"; normalTitle = \"Button\"; ObjectID = \"Koj-wy-VOb\"; */\n\"Koj-wy-VOb.normalTitle\" = \"Button\";\n\n/* Class = \"UIButton\"; normalTitle = \"QR Code\"; ObjectID = \"LU1-2p-LAR\"; */\n\"LU1-2p-LAR.normalTitle\" = \"QR Code\";\n\n/* Class = \"UILabel\"; text = \"100 Confimations\"; ObjectID = \"Lf7-5m-ufO\"; */\n\"Lf7-5m-ufO.text\" = \"100 Confimations\";\n\n/* Class = \"UITextField\"; text = \"1Jhrq6Uxfku5sK9mf3QNwmPb1WPbKPQ9Yx\"; ObjectID = \"LlW-tc-qEY\"; */\n\"LlW-tc-qEY.text\" = \"1Jhrq6Uxfku5sK9mf3QNwmPb1WPbKPQ9Yx\";\n\n/* Class = \"UITextView\"; text = \"xpub6CUHPUqLTj2pxbrab2gdy7XYKiAoy47PFRBkgf8YiBHD3UzJH6WqQSmLXAndZbFuJnU4tWgBWjRjSxyk6AHN5JpVsUMu4E9MwNCGgFNibDd\"; ObjectID = \"M9f-im-InR\"; */\n\"M9f-im-InR.text\" = \"xpub6CUHPUqLTj2pxbrab2gdy7XYKiAoy47PFRBkgf8YiBHD3UzJH6WqQSmLXAndZbFuJnU4tWgBWjRjSxyk6AHN5JpVsUMu4E9MwNCGgFNibDd\";\n\n/* Class = \"UILabel\"; text = \"Account Public Key:\"; ObjectID = \"Mit-XW-AMq\"; */\n\"Mit-XW-AMq.text\" = \"Account Public Key:\";\n\n/* Class = \"UITextView\"; text = \"f23324e18c237876f96d2064abbc26399cc3cd34d503cc6f2b00a9403b003dcad2cf7642e4e3311cf2e5de32307d88b116ac743f0b02fc4c2afe0e30dcd843f6\"; ObjectID = \"N96-Pu-vSQ\"; */\n\"N96-Pu-vSQ.text\" = \"f23324e18c237876f96d2064abbc26399cc3cd34d503cc6f2b00a9403b003dcad2cf7642e4e3311cf2e5de32307d88b116ac743f0b02fc4c2afe0e30dcd843f6\";\n\n/* Class = \"UILabel\"; text = \"1000000.00 USD\"; ObjectID = \"NGS-uf-qMF\"; */\n\"NGS-uf-qMF.text\" = \"1000000.00 USD\";\n\n/* Class = \"UILabel\"; text = \"1000000.00\"; ObjectID = \"NfN-kQ-zfd\"; */\n\"NfN-kQ-zfd.text\" = \"1000000.00\";\n\n/* Class = \"UILabel\"; text = \"From:\"; ObjectID = \"OX8-v3-aou\"; */\n\"OX8-v3-aou.text\" = \"From:\";\n\n/* Class = \"UIButton\"; normalTitle = \"QR Code\"; ObjectID = \"Oey-so-vuX\"; */\n\"Oey-so-vuX.normalTitle\" = \"QR Code\";\n\n/* Class = \"UILabel\"; text = \"Label\"; ObjectID = \"P5j-13-Jpg\"; */\n\"P5j-13-Jpg.text\" = \"Label\";\n\n/* Class = \"UILabel\"; text = \"Incomplete\"; ObjectID = \"P8S-SZ-g5V\"; */\n\"P8S-SZ-g5V.text\" = \"Incomplete\";\n\n/* Class = \"UILabel\"; text = \"Label\"; ObjectID = \"P8X-aW-lhi\"; */\n\"P8X-aW-lhi.text\" = \"Label\";\n\n/* Class = \"UITextField\"; text = \"L5HJ8fiaSL2oGNUrgVcAnq284r9g43F6P2FsjidA7nwuhTDMEdds\"; ObjectID = \"PfF-lM-vHP\"; */\n\"PfF-lM-vHP.text\" = \"L5HJ8fiaSL2oGNUrgVcAnq284r9g43F6P2FsjidA7nwuhTDMEdds\";\n\n/* Class = \"UILabel\"; text = \"12c6DSiU4Rq3P4ZxziKxzrL5LmMBrzjrJX \"; ObjectID = \"PqG-LI-SgL\"; */\n\"PqG-LI-SgL.text\" = \"12c6DSiU4Rq3P4ZxziKxzrL5LmMBrzjrJX \";\n\n/* Class = \"UILabel\"; text = \"Step 3: Pass authorized transaction data\"; ObjectID = \"Qhi-3j-THU\"; */\n\"Qhi-3j-THU.text\" = \"Step 3: Pass authorized transaction data\";\n\n/* Class = \"UILabel\"; text = \"date\"; ObjectID = \"RAj-d0-yzE\"; */\n\"RAj-d0-yzE.text\" = \"date\";\n\n/* Class = \"UILabel\"; text = \"Starting Change Address ID:\"; ObjectID = \"RgE-uK-H2P\"; */\n\"RgE-uK-H2P.text\" = \"Starting Change Address ID:\";\n\n/* Class = \"UITextField\"; placeholder = \"0\"; ObjectID = \"SPM-HC-T68\"; */\n\"SPM-HC-T68.placeholder\" = \"0\";\n\n/* Class = \"UITextField\"; text = \"0\"; ObjectID = \"SPM-HC-T68\"; */\n\"SPM-HC-T68.text\" = \"0\";\n\n/* Class = \"UILabel\"; text = \"Account ID:\"; ObjectID = \"SVW-aE-eKJ\"; */\n\"SVW-aE-eKJ.text\" = \"Account ID:\";\n\n/* Class = \"UIButton\"; normalTitle = \"QR Code\"; ObjectID = \"SVk-vu-qqu\"; */\n\"SVk-vu-qqu.normalTitle\" = \"QR Code\";\n\n/* Class = \"UILabel\"; text = \"1,000,000.12345678\"; ObjectID = \"UKQ-n4-f8s\"; */\n\"UKQ-n4-f8s.text\" = \"1,000,000.12345678\";\n\n/* Class = \"UILabel\"; text = \"From:\"; ObjectID = \"VQ0-4Z-YAo\"; */\n\"VQ0-4Z-YAo.text\" = \"From:\";\n\n/* Class = \"UILabel\"; text = \"1000000.00\"; ObjectID = \"Va3-CW-hze\"; */\n\"Va3-CW-hze.text\" = \"1000000.00\";\n\n/* Class = \"UITextField\"; text = \"L5HJ8fiaSL2oGNUrgVcAnq284r9g43F6P2FsjidA7nwuhTDMEdds\"; ObjectID = \"Vzj-if-ieW\"; */\n\"Vzj-if-ieW.text\" = \"L5HJ8fiaSL2oGNUrgVcAnq284r9g43F6P2FsjidA7nwuhTDMEdds\";\n\n/* Class = \"UIButton\"; normalTitle = \"New Wallet\"; ObjectID = \"W0Y-6g-j1G\"; */\n\"W0Y-6g-j1G.normalTitle\" = \"New Wallet\";\n\n/* Class = \"UINavigationItem\"; title = \"Manage Accounts\"; ObjectID = \"WPt-OD-Zry\"; */\n\"WPt-OD-Zry.title\" = \"Manage Accounts\";\n\n/* Class = \"UITextField\"; text = \"L5HJ8fiaSL2oGNUrgVcAnq284r9g43F6P2FsjidA7nwuhTDMEdds\"; ObjectID = \"Wgu-Mq-F3I\"; */\n\"Wgu-Mq-F3I.text\" = \"L5HJ8fiaSL2oGNUrgVcAnq284r9g43F6P2FsjidA7nwuhTDMEdds\";\n\n/* Class = \"UISegmentedControl\"; Whz-q3-zSQ.segmentTitles[0] = \"Mnemonic\"; ObjectID = \"Whz-q3-zSQ\"; */\n\"Whz-q3-zSQ.segmentTitles[0]\" = \"Mnemonic\";\n\n/* Class = \"UISegmentedControl\"; Whz-q3-zSQ.segmentTitles[1] = \"Account Private Key\"; ObjectID = \"Whz-q3-zSQ\"; */\n\"Whz-q3-zSQ.segmentTitles[1]\" = \"Account Private Key\";\n\n/* Class = \"UILabel\"; text = \"vJmwhHhMNevDQh188gSeHd2xxxYGBQmnVuMY2yG2MmVTC31UWN5s3vaM3xsM2Q1bUremdK1W7eNVgPg1BnvbTyQuDtMKAYJanahvse\"; ObjectID = \"Wyl-JC-mUk\"; */\n\"Wyl-JC-mUk.text\" = \"vJmwhHhMNevDQh188gSeHd2xxxYGBQmnVuMY2yG2MmVTC31UWN5s3vaM3xsM2Q1bUremdK1W7eNVgPg1BnvbTyQuDtMKAYJanahvse\";\n\n/* Class = \"UIButton\"; normalTitle = \"Send\"; ObjectID = \"XID-Gh-hGj\"; */\n\"XID-Gh-hGj.normalTitle\" = \"Send\";\n\n/* Class = \"UIButton\"; normalTitle = \"QR Code\"; ObjectID = \"Xc5-q5-LZT\"; */\n\"Xc5-q5-LZT.normalTitle\" = \"QR Code\";\n\n/* Class = \"UILabel\"; text = \"Backup Passphrase:\"; ObjectID = \"Y01-kf-oMW\"; */\n\"Y01-kf-oMW.text\" = \"Backup Passphrase:\";\n\n/* Class = \"UILabel\"; text = \"Account Private Key:\"; ObjectID = \"YTO-L1-1HN\"; */\n\"YTO-L1-1HN.text\" = \"Account Private Key:\";\n\n/* Class = \"UITextView\"; text = \"Loading...\"; ObjectID = \"YlR-nU-l4e\"; */\n\"YlR-nU-l4e.text\" = \"Loading...\";\n\n/* Class = \"UIButton\"; normalTitle = \"QR Code\"; ObjectID = \"Znf-pR-Mih\"; */\n\"Znf-pR-Mih.normalTitle\" = \"QR Code\";\n\n/* Class = \"UILabel\"; text = \"Change Address ID 4:\"; ObjectID = \"aDd-oS-yZx\"; */\n\"aDd-oS-yZx.text\" = \"Change Address ID 4:\";\n\n/* Class = \"UIButton\"; normalTitle = \"Scan\"; ObjectID = \"aFx-Fr-jWj\"; */\n\"aFx-Fr-jWj.normalTitle\" = \"Scan\";\n\n/* Class = \"UITextField\"; placeholder = \"0\"; ObjectID = \"aY3-3U-T31\"; */\n\"aY3-3U-T31.placeholder\" = \"0\";\n\n/* Class = \"UITextField\"; text = \"0\"; ObjectID = \"aY3-3U-T31\"; */\n\"aY3-3U-T31.text\" = \"0\";\n\n/* Class = \"UILabel\"; text = \"Backup Passphrase:\"; ObjectID = \"aYW-ME-0t8\"; */\n\"aYW-ME-0t8.text\" = \"Backup Passphrase:\";\n\n/* Class = \"UILabel\"; text = \"Change Address ID 0:\"; ObjectID = \"aog-r6-zfJ\"; */\n\"aog-r6-zfJ.text\" = \"Change Address ID 0:\";\n\n/* Class = \"UIButton\"; normalTitle = \"Review Payment\"; ObjectID = \"b97-9w-wKT\"; */\n\"b97-9w-wKT.normalTitle\" = \"Review Payment\";\n\n/* Class = \"UINavigationItem\"; title = \"Send\"; ObjectID = \"bCV-xP-8V6\"; */\n\"bCV-xP-8V6.title\" = \"Send\";\n\n/* Class = \"UITextField\"; text = \"1Jhrq6Uxfku5sK9mf3QNwmPb1WPbKPQ9Yx\"; ObjectID = \"bQd-mI-uH9\"; */\n\"bQd-mI-uH9.text\" = \"1Jhrq6Uxfku5sK9mf3QNwmPb1WPbKPQ9Yx\";\n\n/* Class = \"UIButton\"; normalTitle = \"QR Code\"; ObjectID = \"bUQ-jb-flc\"; */\n\"bUQ-jb-flc.normalTitle\" = \"QR Code\";\n\n/* Class = \"UILabel\"; text = \"100000.12345678 BTC\"; ObjectID = \"bc0-yo-6Ao\"; */\n\"bc0-yo-6Ao.text\" = \"100000.12345678 BTC\";\n\n/* Class = \"UIButton\"; normalTitle = \"Customize Fee\"; ObjectID = \"bta-AA-vWW\"; */\n\"bta-AA-vWW.normalTitle\" = \"Customize Fee\";\n\n/* Class = \"UILabel\"; text = \"Total:\"; ObjectID = \"cV8-uv-FpY\"; */\n\"cV8-uv-FpY.text\" = \"Total:\";\n\n/* Class = \"UILabel\"; text = \"Account Name\"; ObjectID = \"cmA-Xp-Fwi\"; */\n\"cmA-Xp-Fwi.text\" = \"Account Name\";\n\n/* Class = \"UITextField\"; text = \"L5HJ8fiaSL2oGNUrgVcAnq284r9g43F6P2FsjidA7nwuhTDMEdds\"; ObjectID = \"czu-k8-dQ3\"; */\n\"czu-k8-dQ3.text\" = \"L5HJ8fiaSL2oGNUrgVcAnq284r9g43F6P2FsjidA7nwuhTDMEdds\";\n\n/* Class = \"UILabel\"; text = \"To:\"; ObjectID = \"dLL-tj-JB2\"; */\n\"dLL-tj-JB2.text\" = \"To:\";\n\n/* Class = \"UILabel\"; text = \"Write down the 12 word passphrase below and keep it safe. You can restore your wallet with this single passphrase.\"; ObjectID = \"evC-L0-0Dc\"; */\n\"evC-L0-0Dc.text\" = \"Write down the 12 word passphrase below and keep it safe. You can restore your wallet with this single passphrase.\";\n\n/* Class = \"UITextField\"; text = \"1Jhrq6Uxfku5sK9mf3QNwmPb1WPbKPQ9Yx\"; ObjectID = \"f2d-GA-xFX\"; */\n\"f2d-GA-xFX.text\" = \"1Jhrq6Uxfku5sK9mf3QNwmPb1WPbKPQ9Yx\";\n\n/* Class = \"UIButton\"; normalTitle = \"QR Code\"; ObjectID = \"gHg-xR-i65\"; */\n\"gHg-xR-i65.normalTitle\" = \"QR Code\";\n\n/* Class = \"UIButton\"; normalTitle = \"QR Code\"; ObjectID = \"gw0-28-gSi\"; */\n\"gw0-28-gSi.normalTitle\" = \"QR Code\";\n\n/* Class = \"UITextView\"; text = \"street ankle life mass ready viable worth renew stove panther immense camera\"; ObjectID = \"h73-3F-Pi3\"; */\n\"h73-3F-Pi3.text\" = \"street ankle life mass ready viable worth renew stove panther immense camera\";\n\n/* Class = \"UITabBarItem\"; title = \"Receive\"; ObjectID = \"hWO-u0-HoS\"; */\n\"hWO-u0-HoS.title\" = \"Receive\";\n\n/* Class = \"UILabel\"; text = \"Account Private Key:\"; ObjectID = \"hvV-BT-VFx\"; */\n\"hvV-BT-VFx.text\" = \"Account Private Key:\";\n\n/* Class = \"UILabel\"; text = \"Label\"; ObjectID = \"i0i-6T-FsV\"; */\n\"i0i-6T-FsV.text\" = \"Label\";\n\n/* Class = \"UIButton\"; normalTitle = \"Scan QR\"; ObjectID = \"i9k-eB-RT8\"; */\n\"i9k-eB-RT8.normalTitle\" = \"Scan QR\";\n\n/* Class = \"UIButton\"; normalTitle = \"QR Code\"; ObjectID = \"iHQ-HC-h7I\"; */\n\"iHQ-HC-h7I.normalTitle\" = \"QR Code\";\n\n/* Class = \"UIButton\"; normalTitle = \"QR Code\"; ObjectID = \"iQv-V2-g9F\"; */\n\"iQv-V2-g9F.normalTitle\" = \"QR Code\";\n\n/* Class = \"UILabel\"; text = \"1000000.00\"; ObjectID = \"ict-FH-day\"; */\n\"ict-FH-day.text\" = \"1000000.00\";\n\n/* Class = \"UIButton\"; normalTitle = \"New Wallet\"; ObjectID = \"imI-wQ-7jn\"; */\n\"imI-wQ-7jn.normalTitle\" = \"New Wallet\";\n\n/* Class = \"UITextField\"; placeholder = \"0\"; ObjectID = \"ixE-Ze-q3A\"; */\n\"ixE-Ze-q3A.placeholder\" = \"0\";\n\n/* Class = \"UILabel\"; text = \"1,000,000.12345678\"; ObjectID = \"jQ2-VE-bsm\"; */\n\"jQ2-VE-bsm.text\" = \"1,000,000.12345678\";\n\n/* Class = \"UINavigationItem\"; title = \"History\"; ObjectID = \"kF7-DP-jfw\"; */\n\"kF7-DP-jfw.title\" = \"History\";\n\n/* Class = \"UIButton\"; normalTitle = \"Show QR\"; ObjectID = \"kND-lh-fVh\"; */\n\"kND-lh-fVh.normalTitle\" = \"Show QR\";\n\n/* Class = \"UIButton\"; normalTitle = \"QR Code\"; ObjectID = \"kOc-Zv-Dw2\"; */\n\"kOc-Zv-Dw2.normalTitle\" = \"QR Code\";\n\n/* Class = \"UITextField\"; placeholder = \"0\"; ObjectID = \"l4f-HC-Yrb\"; */\n\"l4f-HC-Yrb.placeholder\" = \"0\";\n\n/* Class = \"UITextField\"; text = \"0\"; ObjectID = \"l4f-HC-Yrb\"; */\n\"l4f-HC-Yrb.text\" = \"0\";\n\n/* Class = \"UITextField\"; text = \"1Jhrq6Uxfku5sK9mf3QNwmPb1WPbKPQ9Yx\"; ObjectID = \"lXL-Uj-u1w\"; */\n\"lXL-Uj-u1w.text\" = \"1Jhrq6Uxfku5sK9mf3QNwmPb1WPbKPQ9Yx\";\n\n/* Class = \"UITextField\"; text = \"1Jhrq6Uxfku5sK9mf3QNwmPb1WPbKPQ9Yx\"; ObjectID = \"ln6-WA-vdK\"; */\n\"ln6-WA-vdK.text\" = \"1Jhrq6Uxfku5sK9mf3QNwmPb1WPbKPQ9Yx\";\n\n/* Class = \"UILabel\"; text = \"Account ID:\"; ObjectID = \"lpn-HN-00K\"; */\n\"lpn-HN-00K.text\" = \"Account ID:\";\n\n/* Class = \"UINavigationItem\"; title = \"Help\"; ObjectID = \"m13-Co-pa3\"; */\n\"m13-Co-pa3.title\" = \"Help\";\n\n/* Class = \"UITextView\"; text = \"xpub6CUHPUqLTj2pxbrab2gdy7XYKiAoy47PFRBkgf8YiBHD3UzJH6WqQSmLXAndZbFuJnU4tWgBWjRjSxyk6AHN5JpVsUMu4E9MwNCGgFNibDd\"; ObjectID = \"nS4-qx-Uvm\"; */\n\"nS4-qx-Uvm.text\" = \"xpub6CUHPUqLTj2pxbrab2gdy7XYKiAoy47PFRBkgf8YiBHD3UzJH6WqQSmLXAndZbFuJnU4tWgBWjRjSxyk6AHN5JpVsUMu4E9MwNCGgFNibDd\";\n\n/* Class = \"UIButton\"; normalTitle = \"Pass\"; ObjectID = \"noM-hf-cWa\"; */\n\"noM-hf-cWa.normalTitle\" = \"Pass\";\n\n/* Class = \"UITextField\"; placeholder = \"0\"; ObjectID = \"o2h-Yp-N8m\"; */\n\"o2h-Yp-N8m.placeholder\" = \"0\";\n\n/* Class = \"UITextField\"; text = \"0\"; ObjectID = \"o2h-Yp-N8m\"; */\n\"o2h-Yp-N8m.text\" = \"0\";\n\n/* Class = \"UIButton\"; normalTitle = \"QR Code\"; ObjectID = \"o3w-pQ-fEA\"; */\n\"o3w-pQ-fEA.normalTitle\" = \"QR Code\";\n\n/* Class = \"UINavigationItem\"; title = \"Contacts\"; ObjectID = \"ob3-Xc-rR5\"; */\n\"ob3-Xc-rR5.title\" = \"Contacts\";\n\n/* Class = \"UINavigationItem\"; title = \"Confirm Payment\"; ObjectID = \"or3-6l-X5f\"; */\n\"or3-6l-X5f.title\" = \"Confirm Payment\";\n\n/* Class = \"UITextView\"; text = \"nice muse brush descend pattern focus bleed college sneak calm leap flight\"; ObjectID = \"p18-DP-CtY\"; */\n\"p18-DP-CtY.text\" = \"nice muse brush descend pattern focus bleed college sneak calm leap flight\";\n\n/* Class = \"UIButton\"; normalTitle = \"QR Code\"; ObjectID = \"p52-sH-YUa\"; */\n\"p52-sH-YUa.normalTitle\" = \"QR Code\";\n\n/* Class = \"UIButton\"; normalTitle = \"QR Code\"; ObjectID = \"pDU-E2-HeJ\"; */\n\"pDU-E2-HeJ.normalTitle\" = \"QR Code\";\n\n/* Class = \"UIButton\"; normalTitle = \"Button\"; ObjectID = \"q2V-qX-91M\"; */\n\"q2V-qX-91M.normalTitle\" = \"Button\";\n\n/* Class = \"UILabel\"; text = \"Account Name\"; ObjectID = \"qKO-FH-M15\"; */\n\"qKO-FH-M15.text\" = \"Account Name\";\n\n/* Class = \"UITextField\"; placeholder = \"0\"; ObjectID = \"r4G-2d-mhz\"; */\n\"r4G-2d-mhz.placeholder\" = \"0\";\n\n/* Class = \"UITextField\"; text = \"0\"; ObjectID = \"r4G-2d-mhz\"; */\n\"r4G-2d-mhz.text\" = \"0\";\n\n/* Class = \"UIButton\"; normalTitle = \"QR Code\"; ObjectID = \"r5V-Be-iHY\"; */\n\"r5V-Be-iHY.normalTitle\" = \"QR Code\";\n\n/* Class = \"UITextField\"; text = \"L5HJ8fiaSL2oGNUrgVcAnq284r9g43F6P2FsjidA7nwuhTDMEdds\"; ObjectID = \"rAM-gb-eOa\"; */\n\"rAM-gb-eOa.text\" = \"L5HJ8fiaSL2oGNUrgVcAnq284r9g43F6P2FsjidA7nwuhTDMEdds\";\n\n/* Class = \"UITextView\"; text = \"street ankle life mass ready viable worth renew stove panther immense camera\"; ObjectID = \"rEp-Hf-iwp\"; */\n\"rEp-Hf-iwp.text\" = \"street ankle life mass ready viable worth renew stove panther immense camera\";\n\n/* Class = \"UIButton\"; normalTitle = \"QR Code\"; ObjectID = \"tZh-nZ-RvU\"; */\n\"tZh-nZ-RvU.normalTitle\" = \"QR Code\";\n\n/* Class = \"UILabel\"; text = \"From:\"; ObjectID = \"u6a-ff-Ab7\"; */\n\"u6a-ff-Ab7.text\" = \"From:\";\n\n/* Class = \"UILabel\"; text = \"Starting Receiving Address ID:\"; ObjectID = \"wHc-Lm-EHM\"; */\n\"wHc-Lm-EHM.text\" = \"Starting Receiving Address ID:\";\n\n/* Class = \"UINavigationItem\"; title = \"Receive\"; ObjectID = \"wZG-Zf-k4F\"; */\n\"wZG-Zf-k4F.title\" = \"Receive\";\n\n/* Class = \"UILabel\"; text = \"The master seed hex is derived from the passphrase. If you want to import Bitcoins into another wallet, and if that other wallets don't use BIP39, then it's possible to import the Bitcoins using the master seed hex as long as they support BIP44.\"; ObjectID = \"wjz-SH-FCO\"; */\n\"wjz-SH-FCO.text\" = \"The master seed hex is derived from the passphrase. If you want to import Bitcoins into another wallet, and if that other wallets don't use BIP39, then it's possible to import the Bitcoins using the master seed hex as long as they support BIP44.\";\n\n/* Class = \"UILabel\"; text = \"Account Public Key:\"; ObjectID = \"xa4-b8-Sm0\"; */\n\"xa4-b8-Sm0.text\" = \"Account Public Key:\";\n\n/* Class = \"UILabel\"; text = \"To:\"; ObjectID = \"xuQ-JE-0IT\"; */\n\"xuQ-JE-0IT.text\" = \"To:\";\n\n/* Class = \"UILabel\"; text = \"Amount:\"; ObjectID = \"yRL-oX-vHz\"; */\n\"yRL-oX-vHz.text\" = \"Amount:\";\n\n/* Class = \"UILabel\"; text = \"From:\"; ObjectID = \"yUe-8I-uLU\"; */\n\"yUe-8I-uLU.text\" = \"From:\";\n\n/* Class = \"UILabel\"; text = \"Account ID:\"; ObjectID = \"zQb-q1-edR\"; */\n\"zQb-q1-edR.text\" = \"Account ID:\";\n\n/* Class = \"UINavigationItem\"; title = \"Passphrase\"; ObjectID = \"zdP-16-weC\"; */\n\"zdP-16-weC.title\" = \"Passphrase\";\n"
  },
  {
    "path": "ArcBit.xcodeproj/project.pbxproj",
    "content": "// !$*UTF8*$!\n{\n\tarchiveVersion = 1;\n\tclasses = {\n\t};\n\tobjectVersion = 46;\n\tobjects = {\n\n/* Begin PBXBuildFile section */\n\t\t371609F6191B495389E4EF29 /* libPods-ArcBit.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 7C8CDAAD6F71CF30CCD5BBD6 /* libPods-ArcBit.a */; };\n\t\tC004134A1ACEFAF200505F31 /* TLOperationsManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = C00413491ACEFAF200505F31 /* TLOperationsManager.swift */; };\n\t\tC004134B1ACEFCB700505F31 /* TLOperationsManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = C00413491ACEFAF200505F31 /* TLOperationsManager.swift */; };\n\t\tC01681A21DB0B1D9004D5FD7 /* TLBrainWalletViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = C01681A11DB0B1D9004D5FD7 /* TLBrainWalletViewController.swift */; };\n\t\tC01681AC1DBD9ED8004D5FD7 /* TLColdWallet.swift in Sources */ = {isa = PBXBuildFile; fileRef = C01681AB1DBD9ED8004D5FD7 /* TLColdWallet.swift */; };\n\t\tC0378C931AF4A1850083206F /* AssetsLibrary.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C0378C921AF4A1850083206F /* AssetsLibrary.framework */; };\n\t\tC0378C951AF4A18A0083206F /* CoreText.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C0378C941AF4A18A0083206F /* CoreText.framework */; };\n\t\tC0378C971AF4A18F0083206F /* QuickLook.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C0378C961AF4A18F0083206F /* QuickLook.framework */; };\n\t\tC03ECBF71B54A104005D4B0F /* TLStringLocalized.swift in Sources */ = {isa = PBXBuildFile; fileRef = C0BD70051B4E2C4F00A5788D /* TLStringLocalized.swift */; };\n\t\tC046DD5F1D6E271000B39580 /* TLReviewPaymentViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = C046DD5E1D6E271000B39580 /* TLReviewPaymentViewController.swift */; };\n\t\tC05C398B1AD0710B00AADE55 /* TLCloudDocumentSyncWrapper.m in Sources */ = {isa = PBXBuildFile; fileRef = C05C398A1AD0710B00AADE55 /* TLCloudDocumentSyncWrapper.m */; };\n\t\tC05C398C1AD0712B00AADE55 /* TLCloudDocumentSyncWrapper.m in Sources */ = {isa = PBXBuildFile; fileRef = C05C398A1AD0710B00AADE55 /* TLCloudDocumentSyncWrapper.m */; };\n\t\tC05F82E01EF5D13E0016F0FC /* SocketAckEmitter.swift in Sources */ = {isa = PBXBuildFile; fileRef = C05F82C81EF5D13E0016F0FC /* SocketAckEmitter.swift */; };\n\t\tC05F82E11EF5D13E0016F0FC /* SocketAckManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = C05F82C91EF5D13E0016F0FC /* SocketAckManager.swift */; };\n\t\tC05F82E21EF5D13E0016F0FC /* SocketAnyEvent.swift in Sources */ = {isa = PBXBuildFile; fileRef = C05F82CA1EF5D13E0016F0FC /* SocketAnyEvent.swift */; };\n\t\tC05F82E31EF5D13E0016F0FC /* SocketClientManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = C05F82CB1EF5D13E0016F0FC /* SocketClientManager.swift */; };\n\t\tC05F82E41EF5D13E0016F0FC /* SocketEngine.swift in Sources */ = {isa = PBXBuildFile; fileRef = C05F82CC1EF5D13E0016F0FC /* SocketEngine.swift */; };\n\t\tC05F82E51EF5D13E0016F0FC /* SocketEngineClient.swift in Sources */ = {isa = PBXBuildFile; fileRef = C05F82CD1EF5D13E0016F0FC /* SocketEngineClient.swift */; };\n\t\tC05F82E61EF5D13E0016F0FC /* SocketEnginePacketType.swift in Sources */ = {isa = PBXBuildFile; fileRef = C05F82CE1EF5D13E0016F0FC /* SocketEnginePacketType.swift */; };\n\t\tC05F82E71EF5D13E0016F0FC /* SocketEnginePollable.swift in Sources */ = {isa = PBXBuildFile; fileRef = C05F82CF1EF5D13E0016F0FC /* SocketEnginePollable.swift */; };\n\t\tC05F82E81EF5D13E0016F0FC /* SocketEngineSpec.swift in Sources */ = {isa = PBXBuildFile; fileRef = C05F82D01EF5D13E0016F0FC /* SocketEngineSpec.swift */; };\n\t\tC05F82E91EF5D13E0016F0FC /* SocketEngineWebsocket.swift in Sources */ = {isa = PBXBuildFile; fileRef = C05F82D11EF5D13E0016F0FC /* SocketEngineWebsocket.swift */; };\n\t\tC05F82EA1EF5D13E0016F0FC /* SocketEventHandler.swift in Sources */ = {isa = PBXBuildFile; fileRef = C05F82D21EF5D13E0016F0FC /* SocketEventHandler.swift */; };\n\t\tC05F82EB1EF5D13E0016F0FC /* SocketExtensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = C05F82D31EF5D13E0016F0FC /* SocketExtensions.swift */; };\n\t\tC05F82EC1EF5D13E0016F0FC /* SocketIOClient.swift in Sources */ = {isa = PBXBuildFile; fileRef = C05F82D41EF5D13E0016F0FC /* SocketIOClient.swift */; };\n\t\tC05F82ED1EF5D13E0016F0FC /* SocketIOClientConfiguration.swift in Sources */ = {isa = PBXBuildFile; fileRef = C05F82D51EF5D13E0016F0FC /* SocketIOClientConfiguration.swift */; };\n\t\tC05F82EE1EF5D13E0016F0FC /* SocketIOClientOption.swift in Sources */ = {isa = PBXBuildFile; fileRef = C05F82D61EF5D13E0016F0FC /* SocketIOClientOption.swift */; };\n\t\tC05F82EF1EF5D13E0016F0FC /* SocketIOClientSpec.swift in Sources */ = {isa = PBXBuildFile; fileRef = C05F82D71EF5D13E0016F0FC /* SocketIOClientSpec.swift */; };\n\t\tC05F82F01EF5D13E0016F0FC /* SocketIOClientStatus.swift in Sources */ = {isa = PBXBuildFile; fileRef = C05F82D81EF5D13E0016F0FC /* SocketIOClientStatus.swift */; };\n\t\tC05F82F11EF5D13E0016F0FC /* SocketLogger.swift in Sources */ = {isa = PBXBuildFile; fileRef = C05F82D91EF5D13E0016F0FC /* SocketLogger.swift */; };\n\t\tC05F82F21EF5D13E0016F0FC /* SocketPacket.swift in Sources */ = {isa = PBXBuildFile; fileRef = C05F82DA1EF5D13E0016F0FC /* SocketPacket.swift */; };\n\t\tC05F82F31EF5D13E0016F0FC /* SocketParsable.swift in Sources */ = {isa = PBXBuildFile; fileRef = C05F82DB1EF5D13E0016F0FC /* SocketParsable.swift */; };\n\t\tC05F82F41EF5D13E0016F0FC /* SocketStringReader.swift in Sources */ = {isa = PBXBuildFile; fileRef = C05F82DC1EF5D13E0016F0FC /* SocketStringReader.swift */; };\n\t\tC05F82F51EF5D13E0016F0FC /* SocketTypes.swift in Sources */ = {isa = PBXBuildFile; fileRef = C05F82DD1EF5D13E0016F0FC /* SocketTypes.swift */; };\n\t\tC05F82F61EF5D13E0016F0FC /* SSLSecurity.swift in Sources */ = {isa = PBXBuildFile; fileRef = C05F82DE1EF5D13E0016F0FC /* SSLSecurity.swift */; };\n\t\tC05F82F71EF5D13E0016F0FC /* WebSocket.swift in Sources */ = {isa = PBXBuildFile; fileRef = C05F82DF1EF5D13E0016F0FC /* WebSocket.swift */; };\n\t\tC05F82F81EF5D1420016F0FC /* SocketAckEmitter.swift in Sources */ = {isa = PBXBuildFile; fileRef = C05F82C81EF5D13E0016F0FC /* SocketAckEmitter.swift */; };\n\t\tC05F82F91EF5D1450016F0FC /* SocketAckManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = C05F82C91EF5D13E0016F0FC /* SocketAckManager.swift */; };\n\t\tC05F82FA1EF5D1470016F0FC /* SocketAnyEvent.swift in Sources */ = {isa = PBXBuildFile; fileRef = C05F82CA1EF5D13E0016F0FC /* SocketAnyEvent.swift */; };\n\t\tC05F82FB1EF5D1490016F0FC /* SocketClientManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = C05F82CB1EF5D13E0016F0FC /* SocketClientManager.swift */; };\n\t\tC05F82FC1EF5D14B0016F0FC /* SocketEngine.swift in Sources */ = {isa = PBXBuildFile; fileRef = C05F82CC1EF5D13E0016F0FC /* SocketEngine.swift */; };\n\t\tC05F82FD1EF5D14C0016F0FC /* SocketEngineClient.swift in Sources */ = {isa = PBXBuildFile; fileRef = C05F82CD1EF5D13E0016F0FC /* SocketEngineClient.swift */; };\n\t\tC05F82FE1EF5D14E0016F0FC /* SocketEnginePacketType.swift in Sources */ = {isa = PBXBuildFile; fileRef = C05F82CE1EF5D13E0016F0FC /* SocketEnginePacketType.swift */; };\n\t\tC05F82FF1EF5D1500016F0FC /* SocketEnginePollable.swift in Sources */ = {isa = PBXBuildFile; fileRef = C05F82CF1EF5D13E0016F0FC /* SocketEnginePollable.swift */; };\n\t\tC05F83001EF5D1530016F0FC /* SocketEngineSpec.swift in Sources */ = {isa = PBXBuildFile; fileRef = C05F82D01EF5D13E0016F0FC /* SocketEngineSpec.swift */; };\n\t\tC05F83011EF5D1550016F0FC /* SocketEngineWebsocket.swift in Sources */ = {isa = PBXBuildFile; fileRef = C05F82D11EF5D13E0016F0FC /* SocketEngineWebsocket.swift */; };\n\t\tC05F83021EF5D1570016F0FC /* SocketEventHandler.swift in Sources */ = {isa = PBXBuildFile; fileRef = C05F82D21EF5D13E0016F0FC /* SocketEventHandler.swift */; };\n\t\tC05F83031EF5D1580016F0FC /* SocketExtensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = C05F82D31EF5D13E0016F0FC /* SocketExtensions.swift */; };\n\t\tC05F83041EF5D15B0016F0FC /* SocketIOClient.swift in Sources */ = {isa = PBXBuildFile; fileRef = C05F82D41EF5D13E0016F0FC /* SocketIOClient.swift */; };\n\t\tC05F83051EF5D15C0016F0FC /* SocketIOClientConfiguration.swift in Sources */ = {isa = PBXBuildFile; fileRef = C05F82D51EF5D13E0016F0FC /* SocketIOClientConfiguration.swift */; };\n\t\tC05F83061EF5D15F0016F0FC /* SocketIOClientOption.swift in Sources */ = {isa = PBXBuildFile; fileRef = C05F82D61EF5D13E0016F0FC /* SocketIOClientOption.swift */; };\n\t\tC05F83071EF5D1620016F0FC /* SocketIOClientSpec.swift in Sources */ = {isa = PBXBuildFile; fileRef = C05F82D71EF5D13E0016F0FC /* SocketIOClientSpec.swift */; };\n\t\tC05F83081EF5D1640016F0FC /* SocketIOClientStatus.swift in Sources */ = {isa = PBXBuildFile; fileRef = C05F82D81EF5D13E0016F0FC /* SocketIOClientStatus.swift */; };\n\t\tC05F83091EF5D1660016F0FC /* SocketLogger.swift in Sources */ = {isa = PBXBuildFile; fileRef = C05F82D91EF5D13E0016F0FC /* SocketLogger.swift */; };\n\t\tC05F830A1EF5D1680016F0FC /* SocketPacket.swift in Sources */ = {isa = PBXBuildFile; fileRef = C05F82DA1EF5D13E0016F0FC /* SocketPacket.swift */; };\n\t\tC05F830B1EF5D16A0016F0FC /* SocketParsable.swift in Sources */ = {isa = PBXBuildFile; fileRef = C05F82DB1EF5D13E0016F0FC /* SocketParsable.swift */; };\n\t\tC05F830C1EF5D16D0016F0FC /* SocketStringReader.swift in Sources */ = {isa = PBXBuildFile; fileRef = C05F82DC1EF5D13E0016F0FC /* SocketStringReader.swift */; };\n\t\tC05F830D1EF5D16F0016F0FC /* SocketTypes.swift in Sources */ = {isa = PBXBuildFile; fileRef = C05F82DD1EF5D13E0016F0FC /* SocketTypes.swift */; };\n\t\tC05F830E1EF5D1710016F0FC /* SSLSecurity.swift in Sources */ = {isa = PBXBuildFile; fileRef = C05F82DE1EF5D13E0016F0FC /* SSLSecurity.swift */; };\n\t\tC05F830F1EF5D1730016F0FC /* WebSocket.swift in Sources */ = {isa = PBXBuildFile; fileRef = C05F82DF1EF5D13E0016F0FC /* WebSocket.swift */; };\n\t\tC0607FCD1AEEB3CD007203F8 /* TLStealthServerConfig.swift in Sources */ = {isa = PBXBuildFile; fileRef = C0607FCC1AEEB3CD007203F8 /* TLStealthServerConfig.swift */; };\n\t\tC0607FCE1AEEB716007203F8 /* TLStealthServerConfig.swift in Sources */ = {isa = PBXBuildFile; fileRef = C0607FCC1AEEB3CD007203F8 /* TLStealthServerConfig.swift */; };\n\t\tC0649CA31E256B52007E3965 /* TLAccountTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = C0649CA01E256B52007E3965 /* TLAccountTableViewCell.swift */; };\n\t\tC0649CA41E256B52007E3965 /* TLAddressTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = C0649CA11E256B52007E3965 /* TLAddressTableViewCell.swift */; };\n\t\tC0649CA51E256B52007E3965 /* TLTransactionTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = C0649CA21E256B52007E3965 /* TLTransactionTableViewCell.swift */; };\n\t\tC0649CA71E256E16007E3965 /* TLDisplayStrings.swift in Sources */ = {isa = PBXBuildFile; fileRef = C0649CA61E256E16007E3965 /* TLDisplayStrings.swift */; };\n\t\tC0649CA81E25969D007E3965 /* TLDisplayStrings.swift in Sources */ = {isa = PBXBuildFile; fileRef = C0649CA61E256E16007E3965 /* TLDisplayStrings.swift */; };\n\t\tC09D416C1DC9B05200E2D09A /* TLColdWallet.swift in Sources */ = {isa = PBXBuildFile; fileRef = C01681AB1DBD9ED8004D5FD7 /* TLColdWallet.swift */; };\n\t\tC0A18F941ABF51C200BED648 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = C0A18F931ABF51C200BED648 /* AppDelegate.swift */; };\n\t\tC0A18F9B1ABF51C200BED648 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = C0A18F9A1ABF51C200BED648 /* Images.xcassets */; };\n\t\tC0A18F9E1ABF51C200BED648 /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = C0A18F9C1ABF51C200BED648 /* LaunchScreen.xib */; };\n\t\tC0A18FAA1ABF51C200BED648 /* ArcBitTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = C0A18FA91ABF51C200BED648 /* ArcBitTests.swift */; };\n\t\tC0A1909E1ABF53A100BED648 /* arrow-right7-original.png in Resources */ = {isa = PBXBuildFile; fileRef = C0A18FB81ABF53A100BED648 /* arrow-right7-original.png */; };\n\t\tC0A1909F1ABF53A100BED648 /* arrow-right7.png in Resources */ = {isa = PBXBuildFile; fileRef = C0A18FB91ABF53A100BED648 /* arrow-right7.png */; };\n\t\tC0A190A01ABF53A100BED648 /* download2.png in Resources */ = {isa = PBXBuildFile; fileRef = C0A18FBA1ABF53A100BED648 /* download2.png */; };\n\t\tC0A190A11ABF53A100BED648 /* book.png in Resources */ = {isa = PBXBuildFile; fileRef = C0A18FBC1ABF53A100BED648 /* book.png */; };\n\t\tC0A190A21ABF53A100BED648 /* book@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = C0A18FBD1ABF53A100BED648 /* book@2x.png */; };\n\t\tC0A190A31ABF53A100BED648 /* book@3x.png in Resources */ = {isa = PBXBuildFile; fileRef = C0A18FBE1ABF53A100BED648 /* book@3x.png */; };\n\t\tC0A190A41ABF53A100BED648 /* data.png in Resources */ = {isa = PBXBuildFile; fileRef = C0A18FBF1ABF53A100BED648 /* data.png */; };\n\t\tC0A190A51ABF53A100BED648 /* data@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = C0A18FC01ABF53A100BED648 /* data@2x.png */; };\n\t\tC0A190A61ABF53A100BED648 /* data@3x.png in Resources */ = {isa = PBXBuildFile; fileRef = C0A18FC11ABF53A100BED648 /* data@3x.png */; };\n\t\tC0A190A71ABF53A100BED648 /* download.png in Resources */ = {isa = PBXBuildFile; fileRef = C0A18FC21ABF53A100BED648 /* download.png */; };\n\t\tC0A190A81ABF53A100BED648 /* download@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = C0A18FC31ABF53A100BED648 /* download@2x.png */; };\n\t\tC0A190A91ABF53A100BED648 /* download@3x.png in Resources */ = {isa = PBXBuildFile; fileRef = C0A18FC41ABF53A100BED648 /* download@3x.png */; };\n\t\tC0A190AA1ABF53A100BED648 /* list.png in Resources */ = {isa = PBXBuildFile; fileRef = C0A18FC51ABF53A100BED648 /* list.png */; };\n\t\tC0A190AB1ABF53A100BED648 /* list@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = C0A18FC61ABF53A100BED648 /* list@2x.png */; };\n\t\tC0A190AC1ABF53A100BED648 /* list@3x.png in Resources */ = {isa = PBXBuildFile; fileRef = C0A18FC71ABF53A100BED648 /* list@3x.png */; };\n\t\tC0A190AD1ABF53A100BED648 /* newspaper-alt.png in Resources */ = {isa = PBXBuildFile; fileRef = C0A18FC81ABF53A100BED648 /* newspaper-alt.png */; };\n\t\tC0A190AE1ABF53A100BED648 /* newspaper-alt@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = C0A18FC91ABF53A100BED648 /* newspaper-alt@2x.png */; };\n\t\tC0A190AF1ABF53A100BED648 /* newspaper-alt@3x.png in Resources */ = {isa = PBXBuildFile; fileRef = C0A18FCA1ABF53A100BED648 /* newspaper-alt@3x.png */; };\n\t\tC0A190B01ABF53A100BED648 /* settings.png in Resources */ = {isa = PBXBuildFile; fileRef = C0A18FCB1ABF53A100BED648 /* settings.png */; };\n\t\tC0A190B11ABF53A100BED648 /* settings@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = C0A18FCC1ABF53A100BED648 /* settings@2x.png */; };\n\t\tC0A190B21ABF53A100BED648 /* settings@3x.png in Resources */ = {isa = PBXBuildFile; fileRef = C0A18FCD1ABF53A100BED648 /* settings@3x.png */; };\n\t\tC0A190B31ABF53A100BED648 /* upload.png in Resources */ = {isa = PBXBuildFile; fileRef = C0A18FCE1ABF53A100BED648 /* upload.png */; };\n\t\tC0A190B41ABF53A100BED648 /* upload@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = C0A18FCF1ABF53A100BED648 /* upload@2x.png */; };\n\t\tC0A190B51ABF53A100BED648 /* upload@3x.png in Resources */ = {isa = PBXBuildFile; fileRef = C0A18FD01ABF53A100BED648 /* upload@3x.png */; };\n\t\tC0A190B61ABF53A100BED648 /* upload2.png in Resources */ = {isa = PBXBuildFile; fileRef = C0A18FD11ABF53A100BED648 /* upload2.png */; };\n\t\tC0A190C11ABF53A100BED648 /* BRKey+BIP38.m in Sources */ = {isa = PBXBuildFile; fileRef = C0A18FE41ABF53A100BED648 /* BRKey+BIP38.m */; };\n\t\tC0A190C21ABF53A100BED648 /* BRKey.m in Sources */ = {isa = PBXBuildFile; fileRef = C0A18FE61ABF53A100BED648 /* BRKey.m */; };\n\t\tC0A190C31ABF53A100BED648 /* BRTransaction.m in Sources */ = {isa = PBXBuildFile; fileRef = C0A18FE91ABF53A100BED648 /* BRTransaction.m */; };\n\t\tC0A190C41ABF53A100BED648 /* NSData+Bitcoin.m in Sources */ = {isa = PBXBuildFile; fileRef = C0A18FEC1ABF53A100BED648 /* NSData+Bitcoin.m */; };\n\t\tC0A190C51ABF53A100BED648 /* NSData+Hash.m in Sources */ = {isa = PBXBuildFile; fileRef = C0A18FEE1ABF53A100BED648 /* NSData+Hash.m */; };\n\t\tC0A190C61ABF53A100BED648 /* NSMutableData+Bitcoin.m in Sources */ = {isa = PBXBuildFile; fileRef = C0A18FF01ABF53A100BED648 /* NSMutableData+Bitcoin.m */; };\n\t\tC0A190C71ABF53A100BED648 /* NSString+Base58.m in Sources */ = {isa = PBXBuildFile; fileRef = C0A18FF21ABF53A100BED648 /* NSString+Base58.m */; };\n\t\tC0A190C81ABF53A100BED648 /* CustomIOS7AlertView.m in Sources */ = {isa = PBXBuildFile; fileRef = C0A18FF51ABF53A100BED648 /* CustomIOS7AlertView.m */; };\n\t\tC0A190DB1ABF53A100BED648 /* iToast.m in Sources */ = {isa = PBXBuildFile; fileRef = C0A190221ABF53A100BED648 /* iToast.m */; settings = {COMPILER_FLAGS = \"-fno-objc-arc\"; }; };\n\t\tC0A190DC1ABF53A100BED648 /* JNKeychain.m in Sources */ = {isa = PBXBuildFile; fileRef = C0A190251ABF53A100BED648 /* JNKeychain.m */; };\n\t\tC0A190DD1ABF53A100BED648 /* KeychainItemWrapper.m in Sources */ = {isa = PBXBuildFile; fileRef = C0A190281ABF53A100BED648 /* KeychainItemWrapper.m */; };\n\t\tC0A190DE1ABF53A100BED648 /* LTHPasscodeViewController.strings in Resources */ = {isa = PBXBuildFile; fileRef = C0A1902A1ABF53A100BED648 /* LTHPasscodeViewController.strings */; };\n\t\tC0A190DF1ABF53A100BED648 /* LTHKeychainUtils.m in Sources */ = {isa = PBXBuildFile; fileRef = C0A190351ABF53A100BED648 /* LTHKeychainUtils.m */; };\n\t\tC0A190E01ABF53A100BED648 /* LTHPasscodeViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = C0A190371ABF53A100BED648 /* LTHPasscodeViewController.m */; };\n\t\tC0A190E11ABF53A100BED648 /* NSDate-Utilities.m in Sources */ = {isa = PBXBuildFile; fileRef = C0A1903A1ABF53A100BED648 /* NSDate-Utilities.m */; };\n\t\tC0A190E21ABF53A100BED648 /* DataMatrix.mm in Sources */ = {isa = PBXBuildFile; fileRef = C0A1903D1ABF53A100BED648 /* DataMatrix.mm */; settings = {COMPILER_FLAGS = \"-fno-objc-arc\"; }; };\n\t\tC0A190E31ABF53A100BED648 /* QR_Encode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C0A1903E1ABF53A100BED648 /* QR_Encode.cpp */; };\n\t\tC0A190E41ABF53A100BED648 /* QRCodeEncoderDemoViewController.mm in Sources */ = {isa = PBXBuildFile; fileRef = C0A190411ABF53A100BED648 /* QRCodeEncoderDemoViewController.mm */; settings = {COMPILER_FLAGS = \"-fno-objc-arc\"; }; };\n\t\tC0A190E51ABF53A100BED648 /* QREncoder.mm in Sources */ = {isa = PBXBuildFile; fileRef = C0A190451ABF53A100BED648 /* QREncoder.mm */; settings = {COMPILER_FLAGS = \"-fno-objc-arc\"; }; };\n\t\tC0A190E91ABF53A100BED648 /* UIAlertConrtoller+Blocks.m in Sources */ = {isa = PBXBuildFile; fileRef = C0A190501ABF53A100BED648 /* UIAlertConrtoller+Blocks.m */; };\n\t\tC0A190EA1ABF53A100BED648 /* UINavigationBar+FixedHeightWhenStatusBarHidden.m in Sources */ = {isa = PBXBuildFile; fileRef = C0A190541ABF53A100BED648 /* UINavigationBar+FixedHeightWhenStatusBarHidden.m */; };\n\t\tC0A190EC1ABF53A100BED648 /* InAppSettings.bundle in Resources */ = {isa = PBXBuildFile; fileRef = C0A190561ABF53A100BED648 /* InAppSettings.bundle */; };\n\t\tC0A190EE1ABF53A100BED648 /* TLAccountObject.swift in Sources */ = {isa = PBXBuildFile; fileRef = C0A190591ABF53A100BED648 /* TLAccountObject.swift */; };\n\t\tC0A190EF1ABF53A100BED648 /* TLAccounts.swift in Sources */ = {isa = PBXBuildFile; fileRef = C0A1905A1ABF53A100BED648 /* TLAccounts.swift */; };\n\t\tC0A190F01ABF53A100BED648 /* TLBlockchainStatus.swift in Sources */ = {isa = PBXBuildFile; fileRef = C0A1905B1ABF53A100BED648 /* TLBlockchainStatus.swift */; };\n\t\tC0A190F11ABF53A100BED648 /* TLCoin.swift in Sources */ = {isa = PBXBuildFile; fileRef = C0A1905C1ABF53A100BED648 /* TLCoin.swift */; };\n\t\tC0A190F21ABF53A100BED648 /* TLCoreBitcoinWrapper.swift in Sources */ = {isa = PBXBuildFile; fileRef = C0A1905D1ABF53A100BED648 /* TLCoreBitcoinWrapper.swift */; };\n\t\tC0A190F31ABF53A100BED648 /* TLHDWalletWrapper.swift in Sources */ = {isa = PBXBuildFile; fileRef = C0A1905E1ABF53A100BED648 /* TLHDWalletWrapper.swift */; };\n\t\tC0A190F41ABF53A100BED648 /* TLImportedAddress.swift in Sources */ = {isa = PBXBuildFile; fileRef = C0A1905F1ABF53A100BED648 /* TLImportedAddress.swift */; };\n\t\tC0A190F51ABF53A100BED648 /* TLImportedAddresses.swift in Sources */ = {isa = PBXBuildFile; fileRef = C0A190601ABF53A100BED648 /* TLImportedAddresses.swift */; };\n\t\tC0A190F61ABF53A100BED648 /* TLSelectedObject.swift in Sources */ = {isa = PBXBuildFile; fileRef = C0A190611ABF53A100BED648 /* TLSelectedObject.swift */; };\n\t\tC0A190F71ABF53A100BED648 /* TLSendFormData.swift in Sources */ = {isa = PBXBuildFile; fileRef = C0A190621ABF53A100BED648 /* TLSendFormData.swift */; };\n\t\tC0A190F81ABF53A100BED648 /* TLSpaghettiGodSend.swift in Sources */ = {isa = PBXBuildFile; fileRef = C0A190631ABF53A100BED648 /* TLSpaghettiGodSend.swift */; };\n\t\tC0A190F91ABF53A100BED648 /* TLStealthAddress.swift in Sources */ = {isa = PBXBuildFile; fileRef = C0A190641ABF53A100BED648 /* TLStealthAddress.swift */; };\n\t\tC0A190FA1ABF53A100BED648 /* TLStealthWallet.swift in Sources */ = {isa = PBXBuildFile; fileRef = C0A190651ABF53A100BED648 /* TLStealthWallet.swift */; };\n\t\tC0A190FB1ABF53A100BED648 /* TLSuggestions.swift in Sources */ = {isa = PBXBuildFile; fileRef = C0A190661ABF53A100BED648 /* TLSuggestions.swift */; };\n\t\tC0A190FC1ABF53A100BED648 /* TLTxObject.swift in Sources */ = {isa = PBXBuildFile; fileRef = C0A190671ABF53A100BED648 /* TLTxObject.swift */; };\n\t\tC0A190FD1ABF53A100BED648 /* TLWallet.swift in Sources */ = {isa = PBXBuildFile; fileRef = C0A190681ABF53A100BED648 /* TLWallet.swift */; };\n\t\tC0A190FE1ABF53A100BED648 /* TLWalletJson.swift in Sources */ = {isa = PBXBuildFile; fileRef = C0A190691ABF53A100BED648 /* TLWalletJson.swift */; };\n\t\tC0A190FF1ABF53A100BED648 /* TLWalletUtils.swift in Sources */ = {isa = PBXBuildFile; fileRef = C0A1906A1ABF53A100BED648 /* TLWalletUtils.swift */; };\n\t\tC0A191181ABF53A100BED648 /* UINavigationController+StatusBarStyle.swift in Sources */ = {isa = PBXBuildFile; fileRef = C0A190861ABF53A100BED648 /* UINavigationController+StatusBarStyle.swift */; };\n\t\tC0A191191ABF53A100BED648 /* UIView+FormScroll.swift in Sources */ = {isa = PBXBuildFile; fileRef = C0A190871ABF53A100BED648 /* UIView+FormScroll.swift */; };\n\t\tC0A1911A1ABF53A100BED648 /* UIViewController+Extras.swift in Sources */ = {isa = PBXBuildFile; fileRef = C0A190881ABF53A100BED648 /* UIViewController+Extras.swift */; };\n\t\tC0A1911B1ABF53A100BED648 /* UIViewController+Style.swift in Sources */ = {isa = PBXBuildFile; fileRef = C0A190891ABF53A100BED648 /* UIViewController+Style.swift */; };\n\t\tC0A1911C1ABF53A100BED648 /* TLAccountsViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = C0A1908B1ABF53A100BED648 /* TLAccountsViewController.swift */; };\n\t\tC0A1911D1ABF53A100BED648 /* TLAchievementsViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = C0A1908C1ABF53A100BED648 /* TLAchievementsViewController.swift */; };\n\t\tC0A1911E1ABF53A100BED648 /* TLAddressBookViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = C0A1908D1ABF53A100BED648 /* TLAddressBookViewController.swift */; };\n\t\tC0A1911F1ABF53A100BED648 /* TLAddressListViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = C0A1908E1ABF53A100BED648 /* TLAddressListViewController.swift */; };\n\t\tC0A191201ABF53A100BED648 /* TLRestoreWalletViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = C0A1908F1ABF53A100BED648 /* TLRestoreWalletViewController.swift */; };\n\t\tC0A191211ABF53A100BED648 /* TLHelpViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = C0A190901ABF53A100BED648 /* TLHelpViewController.swift */; };\n\t\tC0A191221ABF53A100BED648 /* TLHistoryViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = C0A190911ABF53A100BED648 /* TLHistoryViewController.swift */; };\n\t\tC0A191231ABF53A100BED648 /* TLInstructionsViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = C0A190921ABF53A100BED648 /* TLInstructionsViewController.swift */; };\n\t\tC0A191241ABF53A100BED648 /* TLManageAccountsViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = C0A190931ABF53A100BED648 /* TLManageAccountsViewController.swift */; };\n\t\tC0A191251ABF53A100BED648 /* TLMenuViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = C0A190941ABF53A100BED648 /* TLMenuViewController.swift */; };\n\t\tC0A191261ABF53A100BED648 /* TLPassPhraseViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = C0A190951ABF53A100BED648 /* TLPassPhraseViewController.swift */; };\n\t\tC0A191271ABF53A100BED648 /* TLPreloadViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = C0A190961ABF53A100BED648 /* TLPreloadViewController.swift */; };\n\t\tC0A191281ABF53A100BED648 /* TLQRCodeScannerViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = C0A190971ABF53A100BED648 /* TLQRCodeScannerViewController.swift */; };\n\t\tC0A191291ABF53A100BED648 /* TLReceiveViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = C0A190981ABF53A100BED648 /* TLReceiveViewController.swift */; };\n\t\tC0A1912A1ABF53A100BED648 /* TLSendViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = C0A190991ABF53A100BED648 /* TLSendViewController.swift */; };\n\t\tC0A1912B1ABF53A100BED648 /* TLSettingsViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = C0A1909A1ABF53A100BED648 /* TLSettingsViewController.swift */; };\n\t\tC0A1912C1ABF53A100BED648 /* TLTextViewViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = C0A1909B1ABF53A100BED648 /* TLTextViewViewController.swift */; };\n\t\tC0A192D31ABF6EB200BED648 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C0A192D21ABF6EB200BED648 /* CoreGraphics.framework */; };\n\t\tC0A192D51ABF6EB900BED648 /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C0A192D41ABF6EB900BED648 /* QuartzCore.framework */; };\n\t\tC0A192D71ABF6EC200BED648 /* AVFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C0A192D61ABF6EC200BED648 /* AVFoundation.framework */; };\n\t\tC0A192D91ABF6EC900BED648 /* CoreMedia.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C0A192D81ABF6EC900BED648 /* CoreMedia.framework */; };\n\t\tC0A192DB1ABF6ED500BED648 /* CFNetwork.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C0A192DA1ABF6ED500BED648 /* CFNetwork.framework */; };\n\t\tC0A192DD1ABF6EDC00BED648 /* MobileCoreServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C0A192DC1ABF6EDC00BED648 /* MobileCoreServices.framework */; };\n\t\tC0A192DF1ABF6EE800BED648 /* SystemConfiguration.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C0A192DE1ABF6EE800BED648 /* SystemConfiguration.framework */; };\n\t\tC0A192E11ABF6EEE00BED648 /* Security.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C0A192E01ABF6EEE00BED648 /* Security.framework */; };\n\t\tC0A192E31ABF6EF500BED648 /* MessageUI.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C0A192E21ABF6EF500BED648 /* MessageUI.framework */; };\n\t\tC0A192E51ABF6F0500BED648 /* libicucore.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = C0A192E41ABF6F0500BED648 /* libicucore.dylib */; };\n\t\tC0A192E81ABF707400BED648 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = C0A192E61ABF707400BED648 /* Main.storyboard */; };\n\t\tC0A192EC1ABF742D00BED648 /* TLAchievements.swift in Sources */ = {isa = PBXBuildFile; fileRef = C0A192E91ABF742D00BED648 /* TLAchievements.swift */; };\n\t\tC0A192ED1ABF742D00BED648 /* TLAnalytics.swift in Sources */ = {isa = PBXBuildFile; fileRef = C0A192EA1ABF742D00BED648 /* TLAnalytics.swift */; };\n\t\tC0A192EE1ABF742D00BED648 /* TLPreferences.swift in Sources */ = {isa = PBXBuildFile; fileRef = C0A192EB1ABF742D00BED648 /* TLPreferences.swift */; };\n\t\tC0A192F71ABF744300BED648 /* TLMacros.swift in Sources */ = {isa = PBXBuildFile; fileRef = C0A192EF1ABF744300BED648 /* TLMacros.swift */; };\n\t\tC0A192F81ABF744300BED648 /* TLUtils.swift in Sources */ = {isa = PBXBuildFile; fileRef = C0A192F01ABF744300BED648 /* TLUtils.swift */; };\n\t\tC0A192F91ABF744300BED648 /* TLColors.swift in Sources */ = {isa = PBXBuildFile; fileRef = C0A192F11ABF744300BED648 /* TLColors.swift */; };\n\t\tC0A192FA1ABF744300BED648 /* TLHUDWrapper.swift in Sources */ = {isa = PBXBuildFile; fileRef = C0A192F21ABF744300BED648 /* TLHUDWrapper.swift */; };\n\t\tC0A192FB1ABF744300BED648 /* TLNotificationEvents.swift in Sources */ = {isa = PBXBuildFile; fileRef = C0A192F31ABF744300BED648 /* TLNotificationEvents.swift */; };\n\t\tC0A192FD1ABF744300BED648 /* TLPrompts.swift in Sources */ = {isa = PBXBuildFile; fileRef = C0A192F51ABF744300BED648 /* TLPrompts.swift */; };\n\t\tC0A192FE1ABF744300BED648 /* TLQRImageModal.swift in Sources */ = {isa = PBXBuildFile; fileRef = C0A192F61ABF744300BED648 /* TLQRImageModal.swift */; };\n\t\tC0A193091ABF744E00BED648 /* TLBitcoinListener.swift in Sources */ = {isa = PBXBuildFile; fileRef = C0A193001ABF744E00BED648 /* TLBitcoinListener.swift */; };\n\t\tC0A1930A1ABF744E00BED648 /* TLBlockchainAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = C0A193011ABF744E00BED648 /* TLBlockchainAPI.swift */; };\n\t\tC0A1930B1ABF744E00BED648 /* TLBlockExplorerAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = C0A193021ABF744E00BED648 /* TLBlockExplorerAPI.swift */; };\n\t\tC0A1930D1ABF744E00BED648 /* TLExchangeRate.swift in Sources */ = {isa = PBXBuildFile; fileRef = C0A193041ABF744E00BED648 /* TLExchangeRate.swift */; };\n\t\tC0A1930E1ABF744E00BED648 /* TLInsightAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = C0A193051ABF744E00BED648 /* TLInsightAPI.swift */; };\n\t\tC0A1930F1ABF744E00BED648 /* TLNetworking.swift in Sources */ = {isa = PBXBuildFile; fileRef = C0A193061ABF744E00BED648 /* TLNetworking.swift */; };\n\t\tC0A193101ABF744E00BED648 /* TLStealthServerAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = C0A193071ABF744E00BED648 /* TLStealthServerAPI.swift */; };\n\t\tC0A193111ABF744E00BED648 /* TLStealthWebSocket.swift in Sources */ = {isa = PBXBuildFile; fileRef = C0A193081ABF744E00BED648 /* TLStealthWebSocket.swift */; };\n\t\tC0A1931A1ABF751800BED648 /* BreadWalletTests.m in Sources */ = {isa = PBXBuildFile; fileRef = C0A193191ABF751800BED648 /* BreadWalletTests.m */; };\n\t\tC0A1931C1ABF81CB00BED648 /* TLStealthAddress.swift in Sources */ = {isa = PBXBuildFile; fileRef = C0A190641ABF53A100BED648 /* TLStealthAddress.swift */; };\n\t\tC0A1931D1ABF81D100BED648 /* TLWalletJson.swift in Sources */ = {isa = PBXBuildFile; fileRef = C0A190691ABF53A100BED648 /* TLWalletJson.swift */; };\n\t\tC0A1931E1ABF81DD00BED648 /* TLMacros.swift in Sources */ = {isa = PBXBuildFile; fileRef = C0A192EF1ABF744300BED648 /* TLMacros.swift */; };\n\t\tC0A1931F1ABF822000BED648 /* TLHDWalletWrapper.swift in Sources */ = {isa = PBXBuildFile; fileRef = C0A1905E1ABF53A100BED648 /* TLHDWalletWrapper.swift */; };\n\t\tC0A193201ABF824800BED648 /* TLWalletUtils.swift in Sources */ = {isa = PBXBuildFile; fileRef = C0A1906A1ABF53A100BED648 /* TLWalletUtils.swift */; };\n\t\tC0A193211ABF825700BED648 /* TLCoreBitcoinWrapper.swift in Sources */ = {isa = PBXBuildFile; fileRef = C0A1905D1ABF53A100BED648 /* TLCoreBitcoinWrapper.swift */; };\n\t\tC0A193221ABF829800BED648 /* TLAchievements.swift in Sources */ = {isa = PBXBuildFile; fileRef = C0A192E91ABF742D00BED648 /* TLAchievements.swift */; };\n\t\tC0A193231ABF829A00BED648 /* TLAnalytics.swift in Sources */ = {isa = PBXBuildFile; fileRef = C0A192EA1ABF742D00BED648 /* TLAnalytics.swift */; };\n\t\tC0A193241ABF829C00BED648 /* TLPreferences.swift in Sources */ = {isa = PBXBuildFile; fileRef = C0A192EB1ABF742D00BED648 /* TLPreferences.swift */; };\n\t\tC0A193251ABF829E00BED648 /* TLAccountObject.swift in Sources */ = {isa = PBXBuildFile; fileRef = C0A190591ABF53A100BED648 /* TLAccountObject.swift */; };\n\t\tC0A193261ABF82A100BED648 /* TLAccounts.swift in Sources */ = {isa = PBXBuildFile; fileRef = C0A1905A1ABF53A100BED648 /* TLAccounts.swift */; };\n\t\tC0A193271ABF82A300BED648 /* TLBlockchainStatus.swift in Sources */ = {isa = PBXBuildFile; fileRef = C0A1905B1ABF53A100BED648 /* TLBlockchainStatus.swift */; };\n\t\tC0A193281ABF82A500BED648 /* TLCoin.swift in Sources */ = {isa = PBXBuildFile; fileRef = C0A1905C1ABF53A100BED648 /* TLCoin.swift */; };\n\t\tC0A193291ABF82AA00BED648 /* TLImportedAddress.swift in Sources */ = {isa = PBXBuildFile; fileRef = C0A1905F1ABF53A100BED648 /* TLImportedAddress.swift */; };\n\t\tC0A1932A1ABF82AC00BED648 /* TLImportedAddresses.swift in Sources */ = {isa = PBXBuildFile; fileRef = C0A190601ABF53A100BED648 /* TLImportedAddresses.swift */; };\n\t\tC0A1932B1ABF82AF00BED648 /* TLSelectedObject.swift in Sources */ = {isa = PBXBuildFile; fileRef = C0A190611ABF53A100BED648 /* TLSelectedObject.swift */; };\n\t\tC0A1932C1ABF82B100BED648 /* TLSendFormData.swift in Sources */ = {isa = PBXBuildFile; fileRef = C0A190621ABF53A100BED648 /* TLSendFormData.swift */; };\n\t\tC0A1932D1ABF82B300BED648 /* TLSpaghettiGodSend.swift in Sources */ = {isa = PBXBuildFile; fileRef = C0A190631ABF53A100BED648 /* TLSpaghettiGodSend.swift */; };\n\t\tC0A1932E1ABF82B700BED648 /* TLStealthWallet.swift in Sources */ = {isa = PBXBuildFile; fileRef = C0A190651ABF53A100BED648 /* TLStealthWallet.swift */; };\n\t\tC0A1932F1ABF82B900BED648 /* TLSuggestions.swift in Sources */ = {isa = PBXBuildFile; fileRef = C0A190661ABF53A100BED648 /* TLSuggestions.swift */; };\n\t\tC0A193301ABF82BB00BED648 /* TLTxObject.swift in Sources */ = {isa = PBXBuildFile; fileRef = C0A190671ABF53A100BED648 /* TLTxObject.swift */; };\n\t\tC0A193311ABF82BD00BED648 /* TLWallet.swift in Sources */ = {isa = PBXBuildFile; fileRef = C0A190681ABF53A100BED648 /* TLWallet.swift */; };\n\t\tC0A193321ABF82E200BED648 /* TLBitcoinListener.swift in Sources */ = {isa = PBXBuildFile; fileRef = C0A193001ABF744E00BED648 /* TLBitcoinListener.swift */; };\n\t\tC0A193331ABF82E400BED648 /* TLBlockchainAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = C0A193011ABF744E00BED648 /* TLBlockchainAPI.swift */; };\n\t\tC0A193341ABF82E600BED648 /* TLBlockExplorerAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = C0A193021ABF744E00BED648 /* TLBlockExplorerAPI.swift */; };\n\t\tC0A193361ABF82EA00BED648 /* TLExchangeRate.swift in Sources */ = {isa = PBXBuildFile; fileRef = C0A193041ABF744E00BED648 /* TLExchangeRate.swift */; };\n\t\tC0A193371ABF82EC00BED648 /* TLInsightAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = C0A193051ABF744E00BED648 /* TLInsightAPI.swift */; };\n\t\tC0A193381ABF82EF00BED648 /* TLNetworking.swift in Sources */ = {isa = PBXBuildFile; fileRef = C0A193061ABF744E00BED648 /* TLNetworking.swift */; };\n\t\tC0A193391ABF82F100BED648 /* TLStealthWebSocket.swift in Sources */ = {isa = PBXBuildFile; fileRef = C0A193081ABF744E00BED648 /* TLStealthWebSocket.swift */; };\n\t\tC0A1933A1ABF82F300BED648 /* TLStealthServerAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = C0A193071ABF744E00BED648 /* TLStealthServerAPI.swift */; };\n\t\tC0A1933E1ABF830000BED648 /* TLNotificationEvents.swift in Sources */ = {isa = PBXBuildFile; fileRef = C0A192F31ABF744300BED648 /* TLNotificationEvents.swift */; };\n\t\tC0A6AD751C42E80F00B8C22B /* TLLinksViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = C0A6AD741C42E80F00B8C22B /* TLLinksViewController.swift */; };\n\t\tC0AB0A331AC52A8400B456DB /* TLPushTxAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = C0AB0A321AC52A8400B456DB /* TLPushTxAPI.swift */; };\n\t\tC0AD2C591AC3DE3200FEF982 /* TLBlockrAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = C0AD2C581AC3DE3200FEF982 /* TLBlockrAPI.swift */; };\n\t\tC0AD2C5A1AC3DED100FEF982 /* TLBlockrAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = C0AD2C581AC3DE3200FEF982 /* TLBlockrAPI.swift */; };\n\t\tC0AD2C5B1AC4DF7700FEF982 /* TLUtils.swift in Sources */ = {isa = PBXBuildFile; fileRef = C0A192F01ABF744300BED648 /* TLUtils.swift */; };\n\t\tC0AE41B11F788BD700682CDE /* IASKAppSettingsViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = C0AE417E1F788BD700682CDE /* IASKAppSettingsViewController.m */; };\n\t\tC0AE41B21F788BD700682CDE /* IASKAppSettingsWebViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = C0AE41801F788BD700682CDE /* IASKAppSettingsWebViewController.m */; };\n\t\tC0AE41B31F788BD700682CDE /* IASKMultipleValueSelection.m in Sources */ = {isa = PBXBuildFile; fileRef = C0AE41821F788BD700682CDE /* IASKMultipleValueSelection.m */; };\n\t\tC0AE41B41F788BD700682CDE /* IASKSpecifierValuesViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = C0AE41841F788BD700682CDE /* IASKSpecifierValuesViewController.m */; };\n\t\tC0AE41B51F788BD700682CDE /* IASKSettingsReader.m in Sources */ = {isa = PBXBuildFile; fileRef = C0AE41881F788BD700682CDE /* IASKSettingsReader.m */; };\n\t\tC0AE41B61F788BD700682CDE /* IASKSettingsStore.m in Sources */ = {isa = PBXBuildFile; fileRef = C0AE418A1F788BD700682CDE /* IASKSettingsStore.m */; };\n\t\tC0AE41B71F788BD700682CDE /* IASKSettingsStoreFile.m in Sources */ = {isa = PBXBuildFile; fileRef = C0AE418C1F788BD700682CDE /* IASKSettingsStoreFile.m */; };\n\t\tC0AE41B81F788BD700682CDE /* IASKSettingsStoreUserDefaults.m in Sources */ = {isa = PBXBuildFile; fileRef = C0AE418E1F788BD700682CDE /* IASKSettingsStoreUserDefaults.m */; };\n\t\tC0AE41B91F788BD700682CDE /* IASKSpecifier.m in Sources */ = {isa = PBXBuildFile; fileRef = C0AE41901F788BD700682CDE /* IASKSpecifier.m */; };\n\t\tC0AE41BA1F788BD700682CDE /* IASKLocalizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = C0AE41921F788BD700682CDE /* IASKLocalizable.strings */; };\n\t\tC0AE41BB1F788BD700682CDE /* IASKPSSliderSpecifierViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = C0AE41A41F788BD700682CDE /* IASKPSSliderSpecifierViewCell.m */; };\n\t\tC0AE41BC1F788BD700682CDE /* IASKPSTextFieldSpecifierViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = C0AE41A61F788BD700682CDE /* IASKPSTextFieldSpecifierViewCell.m */; };\n\t\tC0AE41BD1F788BD700682CDE /* IASKSlider.m in Sources */ = {isa = PBXBuildFile; fileRef = C0AE41A81F788BD700682CDE /* IASKSlider.m */; };\n\t\tC0AE41BE1F788BD700682CDE /* IASKSwitch.m in Sources */ = {isa = PBXBuildFile; fileRef = C0AE41AA1F788BD700682CDE /* IASKSwitch.m */; };\n\t\tC0AE41BF1F788BD700682CDE /* IASKTextField.m in Sources */ = {isa = PBXBuildFile; fileRef = C0AE41AC1F788BD700682CDE /* IASKTextField.m */; };\n\t\tC0AE41C01F788BD700682CDE /* IASKTextView.m in Sources */ = {isa = PBXBuildFile; fileRef = C0AE41AE1F788BD700682CDE /* IASKTextView.m */; };\n\t\tC0AE41C11F788BD700682CDE /* IASKTextViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = C0AE41B01F788BD700682CDE /* IASKTextViewCell.m */; };\n\t\tC0B4E7891AFAAEA200DC9B65 /* SRWebSocket+Helpers.m in Sources */ = {isa = PBXBuildFile; fileRef = C0B4E7881AFAAEA200DC9B65 /* SRWebSocket+Helpers.m */; };\n\t\tC0BD70011B4E2BE300A5788D /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = C0BD70031B4E2BE300A5788D /* Localizable.strings */; };\n\t\tC0BD70061B4E2C4F00A5788D /* TLStringLocalized.swift in Sources */ = {isa = PBXBuildFile; fileRef = C0BD70051B4E2C4F00A5788D /* TLStringLocalized.swift */; };\n\t\tC0C1BE781AF92CB500B705C4 /* base64.c in Sources */ = {isa = PBXBuildFile; fileRef = C0C1BE711AF92CB500B705C4 /* base64.c */; };\n\t\tC0C1BE791AF92CB500B705C4 /* NSData+SRB64Additions.m in Sources */ = {isa = PBXBuildFile; fileRef = C0C1BE741AF92CB500B705C4 /* NSData+SRB64Additions.m */; };\n\t\tC0C1BE7A1AF92CB500B705C4 /* SRWebSocket.m in Sources */ = {isa = PBXBuildFile; fileRef = C0C1BE771AF92CB500B705C4 /* SRWebSocket.m */; };\n\t\tC0C3BDEC1AC0F7AA001AC6CD /* TLWallet+Stealth.swift in Sources */ = {isa = PBXBuildFile; fileRef = C0C3BDEB1AC0F7AA001AC6CD /* TLWallet+Stealth.swift */; };\n\t\tC0C3BDED1AC11BD2001AC6CD /* TLWallet+Stealth.swift in Sources */ = {isa = PBXBuildFile; fileRef = C0C3BDEB1AC0F7AA001AC6CD /* TLWallet+Stealth.swift */; };\n\t\tC0C61C5A1AF15BEF00F9F71F /* TransitionDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = C0C61C591AF15BEF00F9F71F /* TransitionDelegate.swift */; };\n\t\tC0C61C5E1AF15E6100F9F71F /* TransparentViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = C0C61C5D1AF15E6100F9F71F /* TransparentViewController.swift */; };\n\t\tC0D20A921D5963FF008F70F2 /* TLTxFeeAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = C0D20A911D5963FF008F70F2 /* TLTxFeeAPI.swift */; };\n\t\tC0D20A931D5966AB008F70F2 /* TLTxFeeAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = C0D20A911D5963FF008F70F2 /* TLTxFeeAPI.swift */; };\n\t\tC0D5A6141DD8FA1300849E2C /* TLAdvancedNewWalletTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = C0D5A60D1DD8FA1300849E2C /* TLAdvancedNewWalletTableViewCell.swift */; };\n\t\tC0D5A6151DD8FA1300849E2C /* TLColdWalletSelectWayTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = C0D5A60E1DD8FA1300849E2C /* TLColdWalletSelectWayTableViewCell.swift */; };\n\t\tC0D5A6161DD8FA1300849E2C /* TLNewWalletTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = C0D5A60F1DD8FA1300849E2C /* TLNewWalletTableViewCell.swift */; };\n\t\tC0D5A6171DD8FA1300849E2C /* TLInputColdWalletKeyTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = C0D5A6111DD8FA1300849E2C /* TLInputColdWalletKeyTableViewCell.swift */; };\n\t\tC0D5A6181DD8FA1300849E2C /* TLPassSignedTxTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = C0D5A6121DD8FA1300849E2C /* TLPassSignedTxTableViewCell.swift */; };\n\t\tC0D5A6191DD8FA1300849E2C /* TLScanUnsignedTxTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = C0D5A6131DD8FA1300849E2C /* TLScanUnsignedTxTableViewCell.swift */; };\n\t\tC0D7B2DB1B16FDA10096E599 /* live.cer in Resources */ = {isa = PBXBuildFile; fileRef = C0D7B2DA1B16FDA10096E599 /* live.cer */; };\n\t\tC0D8A36B1DAA126700497D31 /* TLColdWalletViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = C0D8A36A1DAA126700497D31 /* TLColdWalletViewController.swift */; };\n\t\tC0D8A36D1DAA16C900497D31 /* TLCreateColdWalletViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = C0D8A36C1DAA16C900497D31 /* TLCreateColdWalletViewController.swift */; };\n\t\tC0D8A36F1DAA183D00497D31 /* TLAuthorizeColdWalletPaymentViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = C0D8A36E1DAA183D00497D31 /* TLAuthorizeColdWalletPaymentViewController.swift */; };\n\t\tC0E5393D1AD454FD00651FE4 /* TLHelpDoc.swift in Sources */ = {isa = PBXBuildFile; fileRef = C0E5393C1AD454FD00651FE4 /* TLHelpDoc.swift */; };\n\t\tC0E5393E1AD4555C00651FE4 /* TLHelpDoc.swift in Sources */ = {isa = PBXBuildFile; fileRef = C0E5393C1AD454FD00651FE4 /* TLHelpDoc.swift */; };\n\t\tC0EE6D6A1B1B7E6000982692 /* 360X80logo.png in Resources */ = {isa = PBXBuildFile; fileRef = C0EE6D681B1B7E6000982692 /* 360X80logo.png */; };\n\t\tC0EE6D6B1B1B7E6000982692 /* 1200X1200logo.png in Resources */ = {isa = PBXBuildFile; fileRef = C0EE6D691B1B7E6000982692 /* 1200X1200logo.png */; };\n\t\tC0F278C81C41EA1A0013DC1A /* TLCurrencyFormat.swift in Sources */ = {isa = PBXBuildFile; fileRef = C0F278C71C41EA1A0013DC1A /* TLCurrencyFormat.swift */; };\n\t\tC0F278C91C41EAF90013DC1A /* TLCurrencyFormat.swift in Sources */ = {isa = PBXBuildFile; fileRef = C0F278C71C41EA1A0013DC1A /* TLCurrencyFormat.swift */; };\n\t\tF338F9561B794D1D00C02F74 /* TLWalletPassphrase.swift in Sources */ = {isa = PBXBuildFile; fileRef = F338F9551B794D1D00C02F74 /* TLWalletPassphrase.swift */; };\n\t\tF338F9581B79718900C02F74 /* TLCrypto.swift in Sources */ = {isa = PBXBuildFile; fileRef = F338F9571B79718900C02F74 /* TLCrypto.swift */; };\n\t\tF34D5C601B7A2C0100DF37DC /* TLCrypto.swift in Sources */ = {isa = PBXBuildFile; fileRef = F338F9571B79718900C02F74 /* TLCrypto.swift */; };\n\t\tF37072461B8F570D0026505D /* TLWalletConfig.swift in Sources */ = {isa = PBXBuildFile; fileRef = F37072451B8F570D0026505D /* TLWalletConfig.swift */; };\n\t\tF37072481B8F57810026505D /* TLWalletConfig.swift in Sources */ = {isa = PBXBuildFile; fileRef = F37072451B8F570D0026505D /* TLWalletConfig.swift */; };\n\t\tF3BC360F1B8681A300CBB3F7 /* TLWalletPassphrase.swift in Sources */ = {isa = PBXBuildFile; fileRef = F338F9551B794D1D00C02F74 /* TLWalletPassphrase.swift */; };\n\t\tF3BC36111B8681FF00CBB3F7 /* TLUpdateAppData.swift in Sources */ = {isa = PBXBuildFile; fileRef = F3BC36101B8681FF00CBB3F7 /* TLUpdateAppData.swift */; };\n\t\tF3BC36121B8681FF00CBB3F7 /* TLUpdateAppData.swift in Sources */ = {isa = PBXBuildFile; fileRef = F3BC36101B8681FF00CBB3F7 /* TLUpdateAppData.swift */; };\n\t\tF3DAAD661BB1D9EC000488F0 /* TLWalletJSONKeys.swift in Sources */ = {isa = PBXBuildFile; fileRef = F3DAAD651BB1D9EC000488F0 /* TLWalletJSONKeys.swift */; };\n\t\tF3F1651B1BB1DB7F00F1293A /* TLWalletJSONKeys.swift in Sources */ = {isa = PBXBuildFile; fileRef = F3DAAD651BB1D9EC000488F0 /* TLWalletJSONKeys.swift */; };\n\t\tF7E43EEB86A2A43FC05335C4 /* libPods-ArcBitTests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = BABE2B037811FC35D025CD09 /* libPods-ArcBitTests.a */; };\n/* End PBXBuildFile section */\n\n/* Begin PBXContainerItemProxy section */\n\t\tC0A18FA41ABF51C200BED648 /* PBXContainerItemProxy */ = {\n\t\t\tisa = PBXContainerItemProxy;\n\t\t\tcontainerPortal = C0A18F861ABF51C200BED648 /* Project object */;\n\t\t\tproxyType = 1;\n\t\t\tremoteGlobalIDString = C0A18F8D1ABF51C200BED648;\n\t\t\tremoteInfo = ArcBit;\n\t\t};\n/* End PBXContainerItemProxy section */\n\n/* Begin PBXFileReference section */\n\t\t173E65BB79838FECABC37B10 /* Pods-ArcBitTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = \"Pods-ArcBitTests.release.xcconfig\"; path = \"Pods/Target Support Files/Pods-ArcBitTests/Pods-ArcBitTests.release.xcconfig\"; sourceTree = \"<group>\"; };\n\t\t3C7ACA9C0834D6AF891F762C /* Pods-ArcBitTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = \"Pods-ArcBitTests.debug.xcconfig\"; path = \"Pods/Target Support Files/Pods-ArcBitTests/Pods-ArcBitTests.debug.xcconfig\"; sourceTree = \"<group>\"; };\n\t\t7C8CDAAD6F71CF30CCD5BBD6 /* libPods-ArcBit.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = \"libPods-ArcBit.a\"; sourceTree = BUILT_PRODUCTS_DIR; };\n\t\tAA36D9E0C4AFE7E2A43F3C79 /* Pods-ArcBit.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = \"Pods-ArcBit.release.xcconfig\"; path = \"Pods/Target Support Files/Pods-ArcBit/Pods-ArcBit.release.xcconfig\"; sourceTree = \"<group>\"; };\n\t\tBABE2B037811FC35D025CD09 /* libPods-ArcBitTests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = \"libPods-ArcBitTests.a\"; sourceTree = BUILT_PRODUCTS_DIR; };\n\t\tC00413491ACEFAF200505F31 /* TLOperationsManager.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TLOperationsManager.swift; sourceTree = \"<group>\"; };\n\t\tC00E61361FB18C65003AD828 /* de */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = de; path = de.lproj/Localizable.strings; sourceTree = \"<group>\"; };\n\t\tC01681A11DB0B1D9004D5FD7 /* TLBrainWalletViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TLBrainWalletViewController.swift; sourceTree = \"<group>\"; };\n\t\tC01681AB1DBD9ED8004D5FD7 /* TLColdWallet.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TLColdWallet.swift; sourceTree = \"<group>\"; };\n\t\tC01A489E1B4F9E6E004D7FA0 /* ru */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ru; path = ru.lproj/Main.strings; sourceTree = \"<group>\"; };\n\t\tC02D3B111B4A45F500B3B7F0 /* ArcBit copy-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; name = \"ArcBit copy-Info.plist\"; path = \"/Users/timothylee/git/arcbit-ios/ArcBit copy-Info.plist\"; sourceTree = \"<absolute>\"; };\n\t\tC0378C921AF4A1850083206F /* AssetsLibrary.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AssetsLibrary.framework; path = System/Library/Frameworks/AssetsLibrary.framework; sourceTree = SDKROOT; };\n\t\tC0378C941AF4A18A0083206F /* CoreText.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreText.framework; path = System/Library/Frameworks/CoreText.framework; sourceTree = SDKROOT; };\n\t\tC0378C961AF4A18F0083206F /* QuickLook.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuickLook.framework; path = System/Library/Frameworks/QuickLook.framework; sourceTree = SDKROOT; };\n\t\tC046DD5E1D6E271000B39580 /* TLReviewPaymentViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TLReviewPaymentViewController.swift; sourceTree = \"<group>\"; };\n\t\tC04A50E91B1792A8001FCE4E /* ArcBit.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.xml; path = ArcBit.entitlements; sourceTree = \"<group>\"; };\n\t\tC05C39891AD0710B00AADE55 /* TLCloudDocumentSyncWrapper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TLCloudDocumentSyncWrapper.h; sourceTree = \"<group>\"; };\n\t\tC05C398A1AD0710B00AADE55 /* TLCloudDocumentSyncWrapper.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TLCloudDocumentSyncWrapper.m; sourceTree = \"<group>\"; };\n\t\tC05F82C81EF5D13E0016F0FC /* SocketAckEmitter.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SocketAckEmitter.swift; sourceTree = \"<group>\"; };\n\t\tC05F82C91EF5D13E0016F0FC /* SocketAckManager.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SocketAckManager.swift; sourceTree = \"<group>\"; };\n\t\tC05F82CA1EF5D13E0016F0FC /* SocketAnyEvent.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SocketAnyEvent.swift; sourceTree = \"<group>\"; };\n\t\tC05F82CB1EF5D13E0016F0FC /* SocketClientManager.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SocketClientManager.swift; sourceTree = \"<group>\"; };\n\t\tC05F82CC1EF5D13E0016F0FC /* SocketEngine.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SocketEngine.swift; sourceTree = \"<group>\"; };\n\t\tC05F82CD1EF5D13E0016F0FC /* SocketEngineClient.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SocketEngineClient.swift; sourceTree = \"<group>\"; };\n\t\tC05F82CE1EF5D13E0016F0FC /* SocketEnginePacketType.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SocketEnginePacketType.swift; sourceTree = \"<group>\"; };\n\t\tC05F82CF1EF5D13E0016F0FC /* SocketEnginePollable.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SocketEnginePollable.swift; sourceTree = \"<group>\"; };\n\t\tC05F82D01EF5D13E0016F0FC /* SocketEngineSpec.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SocketEngineSpec.swift; sourceTree = \"<group>\"; };\n\t\tC05F82D11EF5D13E0016F0FC /* SocketEngineWebsocket.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SocketEngineWebsocket.swift; sourceTree = \"<group>\"; };\n\t\tC05F82D21EF5D13E0016F0FC /* SocketEventHandler.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SocketEventHandler.swift; sourceTree = \"<group>\"; };\n\t\tC05F82D31EF5D13E0016F0FC /* SocketExtensions.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SocketExtensions.swift; sourceTree = \"<group>\"; };\n\t\tC05F82D41EF5D13E0016F0FC /* SocketIOClient.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SocketIOClient.swift; sourceTree = \"<group>\"; };\n\t\tC05F82D51EF5D13E0016F0FC /* SocketIOClientConfiguration.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SocketIOClientConfiguration.swift; sourceTree = \"<group>\"; };\n\t\tC05F82D61EF5D13E0016F0FC /* SocketIOClientOption.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SocketIOClientOption.swift; sourceTree = \"<group>\"; };\n\t\tC05F82D71EF5D13E0016F0FC /* SocketIOClientSpec.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SocketIOClientSpec.swift; sourceTree = \"<group>\"; };\n\t\tC05F82D81EF5D13E0016F0FC /* SocketIOClientStatus.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SocketIOClientStatus.swift; sourceTree = \"<group>\"; };\n\t\tC05F82D91EF5D13E0016F0FC /* SocketLogger.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SocketLogger.swift; sourceTree = \"<group>\"; };\n\t\tC05F82DA1EF5D13E0016F0FC /* SocketPacket.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SocketPacket.swift; sourceTree = \"<group>\"; };\n\t\tC05F82DB1EF5D13E0016F0FC /* SocketParsable.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SocketParsable.swift; sourceTree = \"<group>\"; };\n\t\tC05F82DC1EF5D13E0016F0FC /* SocketStringReader.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SocketStringReader.swift; sourceTree = \"<group>\"; };\n\t\tC05F82DD1EF5D13E0016F0FC /* SocketTypes.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SocketTypes.swift; sourceTree = \"<group>\"; };\n\t\tC05F82DE1EF5D13E0016F0FC /* SSLSecurity.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SSLSecurity.swift; sourceTree = \"<group>\"; };\n\t\tC05F82DF1EF5D13E0016F0FC /* WebSocket.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = WebSocket.swift; sourceTree = \"<group>\"; };\n\t\tC0607FCC1AEEB3CD007203F8 /* TLStealthServerConfig.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TLStealthServerConfig.swift; sourceTree = \"<group>\"; };\n\t\tC0649CA01E256B52007E3965 /* TLAccountTableViewCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TLAccountTableViewCell.swift; sourceTree = \"<group>\"; };\n\t\tC0649CA11E256B52007E3965 /* TLAddressTableViewCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TLAddressTableViewCell.swift; sourceTree = \"<group>\"; };\n\t\tC0649CA21E256B52007E3965 /* TLTransactionTableViewCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TLTransactionTableViewCell.swift; sourceTree = \"<group>\"; };\n\t\tC0649CA61E256E16007E3965 /* TLDisplayStrings.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TLDisplayStrings.swift; sourceTree = \"<group>\"; };\n\t\tC0920A971FA82DB6008A0745 /* zh-Hant */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = \"zh-Hant\"; path = \"zh-Hant.lproj/Main.strings\"; sourceTree = \"<group>\"; };\n\t\tC0920A981FA82DB6008A0745 /* zh-Hant */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = \"zh-Hant\"; path = \"zh-Hant.lproj/LaunchScreen.strings\"; sourceTree = \"<group>\"; };\n\t\tC0920A991FA82DB6008A0745 /* zh-Hant */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = \"zh-Hant\"; path = \"zh-Hant.lproj/IASKLocalizable.strings\"; sourceTree = \"<group>\"; };\n\t\tC0920A9A1FA82DB6008A0745 /* zh-Hant */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = \"zh-Hant\"; path = \"zh-Hant.lproj/LTHPasscodeViewController.strings\"; sourceTree = \"<group>\"; };\n\t\tC0920A9B1FA82DB6008A0745 /* zh-Hant */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = \"zh-Hant\"; path = \"zh-Hant.lproj/Localizable.strings\"; sourceTree = \"<group>\"; };\n\t\tC0A18F8E1ABF51C200BED648 /* ArcBit.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = ArcBit.app; sourceTree = BUILT_PRODUCTS_DIR; };\n\t\tC0A18F921ABF51C200BED648 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = \"<group>\"; };\n\t\tC0A18F931ABF51C200BED648 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = \"<group>\"; };\n\t\tC0A18F9A1ABF51C200BED648 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = \"<group>\"; };\n\t\tC0A18F9D1ABF51C200BED648 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/LaunchScreen.xib; sourceTree = \"<group>\"; };\n\t\tC0A18FA31ABF51C200BED648 /* ArcBitTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = ArcBitTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };\n\t\tC0A18FA81ABF51C200BED648 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = \"<group>\"; };\n\t\tC0A18FA91ABF51C200BED648 /* ArcBitTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ArcBitTests.swift; sourceTree = \"<group>\"; };\n\t\tC0A18FB81ABF53A100BED648 /* arrow-right7-original.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = \"arrow-right7-original.png\"; sourceTree = \"<group>\"; };\n\t\tC0A18FB91ABF53A100BED648 /* arrow-right7.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = \"arrow-right7.png\"; sourceTree = \"<group>\"; };\n\t\tC0A18FBA1ABF53A100BED648 /* download2.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = download2.png; sourceTree = \"<group>\"; };\n\t\tC0A18FBC1ABF53A100BED648 /* book.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = book.png; sourceTree = \"<group>\"; };\n\t\tC0A18FBD1ABF53A100BED648 /* book@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = \"book@2x.png\"; sourceTree = \"<group>\"; };\n\t\tC0A18FBE1ABF53A100BED648 /* book@3x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = \"book@3x.png\"; sourceTree = \"<group>\"; };\n\t\tC0A18FBF1ABF53A100BED648 /* data.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = data.png; sourceTree = \"<group>\"; };\n\t\tC0A18FC01ABF53A100BED648 /* data@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = \"data@2x.png\"; sourceTree = \"<group>\"; };\n\t\tC0A18FC11ABF53A100BED648 /* data@3x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = \"data@3x.png\"; sourceTree = \"<group>\"; };\n\t\tC0A18FC21ABF53A100BED648 /* download.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = download.png; sourceTree = \"<group>\"; };\n\t\tC0A18FC31ABF53A100BED648 /* download@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = \"download@2x.png\"; sourceTree = \"<group>\"; };\n\t\tC0A18FC41ABF53A100BED648 /* download@3x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = \"download@3x.png\"; sourceTree = \"<group>\"; };\n\t\tC0A18FC51ABF53A100BED648 /* list.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = list.png; sourceTree = \"<group>\"; };\n\t\tC0A18FC61ABF53A100BED648 /* list@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = \"list@2x.png\"; sourceTree = \"<group>\"; };\n\t\tC0A18FC71ABF53A100BED648 /* list@3x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = \"list@3x.png\"; sourceTree = \"<group>\"; };\n\t\tC0A18FC81ABF53A100BED648 /* newspaper-alt.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = \"newspaper-alt.png\"; sourceTree = \"<group>\"; };\n\t\tC0A18FC91ABF53A100BED648 /* newspaper-alt@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = \"newspaper-alt@2x.png\"; sourceTree = \"<group>\"; };\n\t\tC0A18FCA1ABF53A100BED648 /* newspaper-alt@3x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = \"newspaper-alt@3x.png\"; sourceTree = \"<group>\"; };\n\t\tC0A18FCB1ABF53A100BED648 /* settings.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = settings.png; sourceTree = \"<group>\"; };\n\t\tC0A18FCC1ABF53A100BED648 /* settings@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = \"settings@2x.png\"; sourceTree = \"<group>\"; };\n\t\tC0A18FCD1ABF53A100BED648 /* settings@3x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = \"settings@3x.png\"; sourceTree = \"<group>\"; };\n\t\tC0A18FCE1ABF53A100BED648 /* upload.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = upload.png; sourceTree = \"<group>\"; };\n\t\tC0A18FCF1ABF53A100BED648 /* upload@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = \"upload@2x.png\"; sourceTree = \"<group>\"; };\n\t\tC0A18FD01ABF53A100BED648 /* upload@3x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = \"upload@3x.png\"; sourceTree = \"<group>\"; };\n\t\tC0A18FD11ABF53A100BED648 /* upload2.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = upload2.png; sourceTree = \"<group>\"; };\n\t\tC0A18FE31ABF53A100BED648 /* BRKey+BIP38.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = \"BRKey+BIP38.h\"; sourceTree = \"<group>\"; };\n\t\tC0A18FE41ABF53A100BED648 /* BRKey+BIP38.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = \"BRKey+BIP38.m\"; sourceTree = \"<group>\"; };\n\t\tC0A18FE51ABF53A100BED648 /* BRKey.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BRKey.h; sourceTree = \"<group>\"; };\n\t\tC0A18FE61ABF53A100BED648 /* BRKey.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BRKey.m; sourceTree = \"<group>\"; };\n\t\tC0A18FE81ABF53A100BED648 /* BRTransaction.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BRTransaction.h; sourceTree = \"<group>\"; };\n\t\tC0A18FE91ABF53A100BED648 /* BRTransaction.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BRTransaction.m; sourceTree = \"<group>\"; };\n\t\tC0A18FEA1ABF53A100BED648 /* ccMemory.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ccMemory.h; sourceTree = \"<group>\"; };\n\t\tC0A18FEB1ABF53A100BED648 /* NSData+Bitcoin.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = \"NSData+Bitcoin.h\"; sourceTree = \"<group>\"; };\n\t\tC0A18FEC1ABF53A100BED648 /* NSData+Bitcoin.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = \"NSData+Bitcoin.m\"; sourceTree = \"<group>\"; };\n\t\tC0A18FED1ABF53A100BED648 /* NSData+Hash.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = \"NSData+Hash.h\"; sourceTree = \"<group>\"; };\n\t\tC0A18FEE1ABF53A100BED648 /* NSData+Hash.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = \"NSData+Hash.m\"; sourceTree = \"<group>\"; };\n\t\tC0A18FEF1ABF53A100BED648 /* NSMutableData+Bitcoin.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = \"NSMutableData+Bitcoin.h\"; sourceTree = \"<group>\"; };\n\t\tC0A18FF01ABF53A100BED648 /* NSMutableData+Bitcoin.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = \"NSMutableData+Bitcoin.m\"; sourceTree = \"<group>\"; };\n\t\tC0A18FF11ABF53A100BED648 /* NSString+Base58.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = \"NSString+Base58.h\"; sourceTree = \"<group>\"; };\n\t\tC0A18FF21ABF53A100BED648 /* NSString+Base58.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = \"NSString+Base58.m\"; sourceTree = \"<group>\"; };\n\t\tC0A18FF41ABF53A100BED648 /* CustomIOS7AlertView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CustomIOS7AlertView.h; sourceTree = \"<group>\"; };\n\t\tC0A18FF51ABF53A100BED648 /* CustomIOS7AlertView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CustomIOS7AlertView.m; sourceTree = \"<group>\"; };\n\t\tC0A190211ABF53A100BED648 /* iToast.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = iToast.h; sourceTree = \"<group>\"; };\n\t\tC0A190221ABF53A100BED648 /* iToast.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = iToast.m; sourceTree = \"<group>\"; };\n\t\tC0A190241ABF53A100BED648 /* JNKeychain.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JNKeychain.h; sourceTree = \"<group>\"; };\n\t\tC0A190251ABF53A100BED648 /* JNKeychain.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = JNKeychain.m; sourceTree = \"<group>\"; };\n\t\tC0A190271ABF53A100BED648 /* KeychainItemWrapper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = KeychainItemWrapper.h; sourceTree = \"<group>\"; };\n\t\tC0A190281ABF53A100BED648 /* KeychainItemWrapper.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = KeychainItemWrapper.m; sourceTree = \"<group>\"; };\n\t\tC0A1902B1ABF53A100BED648 /* de */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = de; path = de.lproj/LTHPasscodeViewController.strings; sourceTree = \"<group>\"; };\n\t\tC0A1902C1ABF53A100BED648 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/LTHPasscodeViewController.strings; sourceTree = \"<group>\"; };\n\t\tC0A1902D1ABF53A100BED648 /* es */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = es; path = es.lproj/LTHPasscodeViewController.strings; sourceTree = \"<group>\"; };\n\t\tC0A1902E1ABF53A100BED648 /* fr */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = fr; path = fr.lproj/LTHPasscodeViewController.strings; sourceTree = \"<group>\"; };\n\t\tC0A1902F1ABF53A100BED648 /* ja */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ja; path = ja.lproj/LTHPasscodeViewController.strings; sourceTree = \"<group>\"; };\n\t\tC0A190301ABF53A100BED648 /* ro */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ro; path = ro.lproj/LTHPasscodeViewController.strings; sourceTree = \"<group>\"; };\n\t\tC0A190311ABF53A100BED648 /* ru */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ru; path = ru.lproj/LTHPasscodeViewController.strings; sourceTree = \"<group>\"; };\n\t\tC0A190321ABF53A100BED648 /* zh-Hans-CN */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = \"zh-Hans-CN\"; path = \"zh-Hans-CN.lproj/LTHPasscodeViewController.strings\"; sourceTree = \"<group>\"; };\n\t\tC0A190341ABF53A100BED648 /* LTHKeychainUtils.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LTHKeychainUtils.h; sourceTree = \"<group>\"; };\n\t\tC0A190351ABF53A100BED648 /* LTHKeychainUtils.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LTHKeychainUtils.m; sourceTree = \"<group>\"; };\n\t\tC0A190361ABF53A100BED648 /* LTHPasscodeViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LTHPasscodeViewController.h; sourceTree = \"<group>\"; };\n\t\tC0A190371ABF53A100BED648 /* LTHPasscodeViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LTHPasscodeViewController.m; sourceTree = \"<group>\"; };\n\t\tC0A190391ABF53A100BED648 /* NSDate-Utilities.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = \"NSDate-Utilities.h\"; sourceTree = \"<group>\"; };\n\t\tC0A1903A1ABF53A100BED648 /* NSDate-Utilities.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = \"NSDate-Utilities.m\"; sourceTree = \"<group>\"; };\n\t\tC0A1903C1ABF53A100BED648 /* DataMatrix.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DataMatrix.h; sourceTree = \"<group>\"; };\n\t\tC0A1903D1ABF53A100BED648 /* DataMatrix.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = DataMatrix.mm; sourceTree = \"<group>\"; };\n\t\tC0A1903E1ABF53A100BED648 /* QR_Encode.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = QR_Encode.cpp; sourceTree = \"<group>\"; };\n\t\tC0A1903F1ABF53A100BED648 /* QR_Encode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = QR_Encode.h; sourceTree = \"<group>\"; };\n\t\tC0A190401ABF53A100BED648 /* QRCodeEncoderDemoViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = QRCodeEncoderDemoViewController.h; sourceTree = \"<group>\"; };\n\t\tC0A190411ABF53A100BED648 /* QRCodeEncoderDemoViewController.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = QRCodeEncoderDemoViewController.mm; sourceTree = \"<group>\"; };\n\t\tC0A190421ABF53A100BED648 /* QRCodeEncoderObjectiveCAtGithub-Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = \"QRCodeEncoderObjectiveCAtGithub-Prefix.pch\"; sourceTree = \"<group>\"; };\n\t\tC0A190431ABF53A100BED648 /* QREncoder-Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = \"QREncoder-Prefix.pch\"; sourceTree = \"<group>\"; };\n\t\tC0A190441ABF53A100BED648 /* QREncoder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = QREncoder.h; sourceTree = \"<group>\"; };\n\t\tC0A190451ABF53A100BED648 /* QREncoder.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = QREncoder.mm; sourceTree = \"<group>\"; };\n\t\tC0A190501ABF53A100BED648 /* UIAlertConrtoller+Blocks.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = \"UIAlertConrtoller+Blocks.m\"; sourceTree = \"<group>\"; };\n\t\tC0A190511ABF53A100BED648 /* UIAlertController+Blocks.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = \"UIAlertController+Blocks.h\"; sourceTree = \"<group>\"; };\n\t\tC0A190531ABF53A100BED648 /* UINavigationBar+FixedHeightWhenStatusBarHidden.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = \"UINavigationBar+FixedHeightWhenStatusBarHidden.h\"; sourceTree = \"<group>\"; };\n\t\tC0A190541ABF53A100BED648 /* UINavigationBar+FixedHeightWhenStatusBarHidden.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = \"UINavigationBar+FixedHeightWhenStatusBarHidden.m\"; sourceTree = \"<group>\"; };\n\t\tC0A190561ABF53A100BED648 /* InAppSettings.bundle */ = {isa = PBXFileReference; lastKnownFileType = \"wrapper.plug-in\"; path = InAppSettings.bundle; sourceTree = \"<group>\"; };\n\t\tC0A190591ABF53A100BED648 /* TLAccountObject.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TLAccountObject.swift; sourceTree = \"<group>\"; };\n\t\tC0A1905A1ABF53A100BED648 /* TLAccounts.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TLAccounts.swift; sourceTree = \"<group>\"; };\n\t\tC0A1905B1ABF53A100BED648 /* TLBlockchainStatus.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TLBlockchainStatus.swift; sourceTree = \"<group>\"; };\n\t\tC0A1905C1ABF53A100BED648 /* TLCoin.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TLCoin.swift; sourceTree = \"<group>\"; };\n\t\tC0A1905D1ABF53A100BED648 /* TLCoreBitcoinWrapper.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TLCoreBitcoinWrapper.swift; sourceTree = \"<group>\"; };\n\t\tC0A1905E1ABF53A100BED648 /* TLHDWalletWrapper.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TLHDWalletWrapper.swift; sourceTree = \"<group>\"; };\n\t\tC0A1905F1ABF53A100BED648 /* TLImportedAddress.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TLImportedAddress.swift; sourceTree = \"<group>\"; };\n\t\tC0A190601ABF53A100BED648 /* TLImportedAddresses.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TLImportedAddresses.swift; sourceTree = \"<group>\"; };\n\t\tC0A190611ABF53A100BED648 /* TLSelectedObject.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TLSelectedObject.swift; sourceTree = \"<group>\"; };\n\t\tC0A190621ABF53A100BED648 /* TLSendFormData.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TLSendFormData.swift; sourceTree = \"<group>\"; };\n\t\tC0A190631ABF53A100BED648 /* TLSpaghettiGodSend.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TLSpaghettiGodSend.swift; sourceTree = \"<group>\"; };\n\t\tC0A190641ABF53A100BED648 /* TLStealthAddress.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TLStealthAddress.swift; sourceTree = \"<group>\"; };\n\t\tC0A190651ABF53A100BED648 /* TLStealthWallet.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TLStealthWallet.swift; sourceTree = \"<group>\"; };\n\t\tC0A190661ABF53A100BED648 /* TLSuggestions.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TLSuggestions.swift; sourceTree = \"<group>\"; };\n\t\tC0A190671ABF53A100BED648 /* TLTxObject.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TLTxObject.swift; sourceTree = \"<group>\"; };\n\t\tC0A190681ABF53A100BED648 /* TLWallet.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TLWallet.swift; sourceTree = \"<group>\"; };\n\t\tC0A190691ABF53A100BED648 /* TLWalletJson.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; lineEnding = 0; path = TLWalletJson.swift; sourceTree = \"<group>\"; xcLanguageSpecificationIdentifier = xcode.lang.swift; };\n\t\tC0A1906A1ABF53A100BED648 /* TLWalletUtils.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TLWalletUtils.swift; sourceTree = \"<group>\"; };\n\t\tC0A190861ABF53A100BED648 /* UINavigationController+StatusBarStyle.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = \"UINavigationController+StatusBarStyle.swift\"; sourceTree = \"<group>\"; };\n\t\tC0A190871ABF53A100BED648 /* UIView+FormScroll.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = \"UIView+FormScroll.swift\"; sourceTree = \"<group>\"; };\n\t\tC0A190881ABF53A100BED648 /* UIViewController+Extras.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = \"UIViewController+Extras.swift\"; sourceTree = \"<group>\"; };\n\t\tC0A190891ABF53A100BED648 /* UIViewController+Style.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = \"UIViewController+Style.swift\"; sourceTree = \"<group>\"; };\n\t\tC0A1908B1ABF53A100BED648 /* TLAccountsViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TLAccountsViewController.swift; sourceTree = \"<group>\"; };\n\t\tC0A1908C1ABF53A100BED648 /* TLAchievementsViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TLAchievementsViewController.swift; sourceTree = \"<group>\"; };\n\t\tC0A1908D1ABF53A100BED648 /* TLAddressBookViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TLAddressBookViewController.swift; sourceTree = \"<group>\"; };\n\t\tC0A1908E1ABF53A100BED648 /* TLAddressListViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TLAddressListViewController.swift; sourceTree = \"<group>\"; };\n\t\tC0A1908F1ABF53A100BED648 /* TLRestoreWalletViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TLRestoreWalletViewController.swift; sourceTree = \"<group>\"; };\n\t\tC0A190901ABF53A100BED648 /* TLHelpViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TLHelpViewController.swift; sourceTree = \"<group>\"; };\n\t\tC0A190911ABF53A100BED648 /* TLHistoryViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TLHistoryViewController.swift; sourceTree = \"<group>\"; };\n\t\tC0A190921ABF53A100BED648 /* TLInstructionsViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TLInstructionsViewController.swift; sourceTree = \"<group>\"; };\n\t\tC0A190931ABF53A100BED648 /* TLManageAccountsViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TLManageAccountsViewController.swift; sourceTree = \"<group>\"; };\n\t\tC0A190941ABF53A100BED648 /* TLMenuViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TLMenuViewController.swift; sourceTree = \"<group>\"; };\n\t\tC0A190951ABF53A100BED648 /* TLPassPhraseViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TLPassPhraseViewController.swift; sourceTree = \"<group>\"; };\n\t\tC0A190961ABF53A100BED648 /* TLPreloadViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; lineEnding = 0; path = TLPreloadViewController.swift; sourceTree = \"<group>\"; xcLanguageSpecificationIdentifier = xcode.lang.swift; };\n\t\tC0A190971ABF53A100BED648 /* TLQRCodeScannerViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TLQRCodeScannerViewController.swift; sourceTree = \"<group>\"; };\n\t\tC0A190981ABF53A100BED648 /* TLReceiveViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TLReceiveViewController.swift; sourceTree = \"<group>\"; };\n\t\tC0A190991ABF53A100BED648 /* TLSendViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TLSendViewController.swift; sourceTree = \"<group>\"; };\n\t\tC0A1909A1ABF53A100BED648 /* TLSettingsViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TLSettingsViewController.swift; sourceTree = \"<group>\"; };\n\t\tC0A1909B1ABF53A100BED648 /* TLTextViewViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TLTextViewViewController.swift; sourceTree = \"<group>\"; };\n\t\tC0A1912D1ABF540000BED648 /* ArcBit-Bridging-Header.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = \"ArcBit-Bridging-Header.h\"; sourceTree = \"<group>\"; };\n\t\tC0A192D21ABF6EB200BED648 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; };\n\t\tC0A192D41ABF6EB900BED648 /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; };\n\t\tC0A192D61ABF6EC200BED648 /* AVFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AVFoundation.framework; path = System/Library/Frameworks/AVFoundation.framework; sourceTree = SDKROOT; };\n\t\tC0A192D81ABF6EC900BED648 /* CoreMedia.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreMedia.framework; path = System/Library/Frameworks/CoreMedia.framework; sourceTree = SDKROOT; };\n\t\tC0A192DA1ABF6ED500BED648 /* CFNetwork.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CFNetwork.framework; path = System/Library/Frameworks/CFNetwork.framework; sourceTree = SDKROOT; };\n\t\tC0A192DC1ABF6EDC00BED648 /* MobileCoreServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MobileCoreServices.framework; path = System/Library/Frameworks/MobileCoreServices.framework; sourceTree = SDKROOT; };\n\t\tC0A192DE1ABF6EE800BED648 /* SystemConfiguration.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SystemConfiguration.framework; path = System/Library/Frameworks/SystemConfiguration.framework; sourceTree = SDKROOT; };\n\t\tC0A192E01ABF6EEE00BED648 /* Security.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Security.framework; path = System/Library/Frameworks/Security.framework; sourceTree = SDKROOT; };\n\t\tC0A192E21ABF6EF500BED648 /* MessageUI.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MessageUI.framework; path = System/Library/Frameworks/MessageUI.framework; sourceTree = SDKROOT; };\n\t\tC0A192E41ABF6F0500BED648 /* libicucore.dylib */ = {isa = PBXFileReference; lastKnownFileType = \"compiled.mach-o.dylib\"; name = libicucore.dylib; path = usr/lib/libicucore.dylib; sourceTree = SDKROOT; };\n\t\tC0A192E71ABF707400BED648 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = \"<group>\"; };\n\t\tC0A192E91ABF742D00BED648 /* TLAchievements.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TLAchievements.swift; sourceTree = \"<group>\"; };\n\t\tC0A192EA1ABF742D00BED648 /* TLAnalytics.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TLAnalytics.swift; sourceTree = \"<group>\"; };\n\t\tC0A192EB1ABF742D00BED648 /* TLPreferences.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; lineEnding = 0; path = TLPreferences.swift; sourceTree = \"<group>\"; xcLanguageSpecificationIdentifier = xcode.lang.swift; };\n\t\tC0A192EF1ABF744300BED648 /* TLMacros.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TLMacros.swift; sourceTree = \"<group>\"; };\n\t\tC0A192F01ABF744300BED648 /* TLUtils.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TLUtils.swift; sourceTree = \"<group>\"; };\n\t\tC0A192F11ABF744300BED648 /* TLColors.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TLColors.swift; sourceTree = \"<group>\"; };\n\t\tC0A192F21ABF744300BED648 /* TLHUDWrapper.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TLHUDWrapper.swift; sourceTree = \"<group>\"; };\n\t\tC0A192F31ABF744300BED648 /* TLNotificationEvents.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TLNotificationEvents.swift; sourceTree = \"<group>\"; };\n\t\tC0A192F51ABF744300BED648 /* TLPrompts.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TLPrompts.swift; sourceTree = \"<group>\"; };\n\t\tC0A192F61ABF744300BED648 /* TLQRImageModal.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TLQRImageModal.swift; sourceTree = \"<group>\"; };\n\t\tC0A193001ABF744E00BED648 /* TLBitcoinListener.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TLBitcoinListener.swift; sourceTree = \"<group>\"; };\n\t\tC0A193011ABF744E00BED648 /* TLBlockchainAPI.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TLBlockchainAPI.swift; sourceTree = \"<group>\"; };\n\t\tC0A193021ABF744E00BED648 /* TLBlockExplorerAPI.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TLBlockExplorerAPI.swift; sourceTree = \"<group>\"; };\n\t\tC0A193041ABF744E00BED648 /* TLExchangeRate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TLExchangeRate.swift; sourceTree = \"<group>\"; };\n\t\tC0A193051ABF744E00BED648 /* TLInsightAPI.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TLInsightAPI.swift; sourceTree = \"<group>\"; };\n\t\tC0A193061ABF744E00BED648 /* TLNetworking.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TLNetworking.swift; sourceTree = \"<group>\"; };\n\t\tC0A193071ABF744E00BED648 /* TLStealthServerAPI.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TLStealthServerAPI.swift; sourceTree = \"<group>\"; };\n\t\tC0A193081ABF744E00BED648 /* TLStealthWebSocket.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TLStealthWebSocket.swift; sourceTree = \"<group>\"; };\n\t\tC0A193181ABF751700BED648 /* ArcBitTests-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = \"ArcBitTests-Bridging-Header.h\"; sourceTree = \"<group>\"; };\n\t\tC0A193191ABF751800BED648 /* BreadWalletTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BreadWalletTests.m; sourceTree = \"<group>\"; };\n\t\tC0A6AD741C42E80F00B8C22B /* TLLinksViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TLLinksViewController.swift; sourceTree = \"<group>\"; };\n\t\tC0AB0A321AC52A8400B456DB /* TLPushTxAPI.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TLPushTxAPI.swift; sourceTree = \"<group>\"; };\n\t\tC0AD2C581AC3DE3200FEF982 /* TLBlockrAPI.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TLBlockrAPI.swift; sourceTree = \"<group>\"; };\n\t\tC0AE417D1F788BD700682CDE /* IASKAppSettingsViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IASKAppSettingsViewController.h; sourceTree = \"<group>\"; };\n\t\tC0AE417E1F788BD700682CDE /* IASKAppSettingsViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = IASKAppSettingsViewController.m; sourceTree = \"<group>\"; };\n\t\tC0AE417F1F788BD700682CDE /* IASKAppSettingsWebViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IASKAppSettingsWebViewController.h; sourceTree = \"<group>\"; };\n\t\tC0AE41801F788BD700682CDE /* IASKAppSettingsWebViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = IASKAppSettingsWebViewController.m; sourceTree = \"<group>\"; };\n\t\tC0AE41811F788BD700682CDE /* IASKMultipleValueSelection.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IASKMultipleValueSelection.h; sourceTree = \"<group>\"; };\n\t\tC0AE41821F788BD700682CDE /* IASKMultipleValueSelection.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = IASKMultipleValueSelection.m; sourceTree = \"<group>\"; };\n\t\tC0AE41831F788BD700682CDE /* IASKSpecifierValuesViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IASKSpecifierValuesViewController.h; sourceTree = \"<group>\"; };\n\t\tC0AE41841F788BD700682CDE /* IASKSpecifierValuesViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = IASKSpecifierValuesViewController.m; sourceTree = \"<group>\"; };\n\t\tC0AE41851F788BD700682CDE /* IASKViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IASKViewController.h; sourceTree = \"<group>\"; };\n\t\tC0AE41871F788BD700682CDE /* IASKSettingsReader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IASKSettingsReader.h; sourceTree = \"<group>\"; };\n\t\tC0AE41881F788BD700682CDE /* IASKSettingsReader.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = IASKSettingsReader.m; sourceTree = \"<group>\"; };\n\t\tC0AE41891F788BD700682CDE /* IASKSettingsStore.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IASKSettingsStore.h; sourceTree = \"<group>\"; };\n\t\tC0AE418A1F788BD700682CDE /* IASKSettingsStore.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = IASKSettingsStore.m; sourceTree = \"<group>\"; };\n\t\tC0AE418B1F788BD700682CDE /* IASKSettingsStoreFile.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IASKSettingsStoreFile.h; sourceTree = \"<group>\"; };\n\t\tC0AE418C1F788BD700682CDE /* IASKSettingsStoreFile.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = IASKSettingsStoreFile.m; sourceTree = \"<group>\"; };\n\t\tC0AE418D1F788BD700682CDE /* IASKSettingsStoreUserDefaults.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IASKSettingsStoreUserDefaults.h; sourceTree = \"<group>\"; };\n\t\tC0AE418E1F788BD700682CDE /* IASKSettingsStoreUserDefaults.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = IASKSettingsStoreUserDefaults.m; sourceTree = \"<group>\"; };\n\t\tC0AE418F1F788BD700682CDE /* IASKSpecifier.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IASKSpecifier.h; sourceTree = \"<group>\"; };\n\t\tC0AE41901F788BD700682CDE /* IASKSpecifier.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = IASKSpecifier.m; sourceTree = \"<group>\"; };\n\t\tC0AE41931F788BD700682CDE /* Base */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = Base; path = Base.lproj/IASKLocalizable.strings; sourceTree = \"<group>\"; };\n\t\tC0AE41941F788BD700682CDE /* de */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = de; path = de.lproj/IASKLocalizable.strings; sourceTree = \"<group>\"; };\n\t\tC0AE41951F788BD700682CDE /* el */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = el; path = el.lproj/IASKLocalizable.strings; sourceTree = \"<group>\"; };\n\t\tC0AE41961F788BD700682CDE /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/IASKLocalizable.strings; sourceTree = \"<group>\"; };\n\t\tC0AE41971F788BD700682CDE /* es */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = es; path = es.lproj/IASKLocalizable.strings; sourceTree = \"<group>\"; };\n\t\tC0AE41981F788BD700682CDE /* fr */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = fr; path = fr.lproj/IASKLocalizable.strings; sourceTree = \"<group>\"; };\n\t\tC0AE41991F788BD700682CDE /* it */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = it; path = it.lproj/IASKLocalizable.strings; sourceTree = \"<group>\"; };\n\t\tC0AE419A1F788BD700682CDE /* ja */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ja; path = ja.lproj/IASKLocalizable.strings; sourceTree = \"<group>\"; };\n\t\tC0AE419B1F788BD700682CDE /* nl */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = nl; path = nl.lproj/IASKLocalizable.strings; sourceTree = \"<group>\"; };\n\t\tC0AE419C1F788BD700682CDE /* pt-PT */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = \"pt-PT\"; path = \"pt-PT.lproj/IASKLocalizable.strings\"; sourceTree = \"<group>\"; };\n\t\tC0AE419D1F788BD700682CDE /* pt */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = pt; path = pt.lproj/IASKLocalizable.strings; sourceTree = \"<group>\"; };\n\t\tC0AE419E1F788BD700682CDE /* ru */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ru; path = ru.lproj/IASKLocalizable.strings; sourceTree = \"<group>\"; };\n\t\tC0AE419F1F788BD700682CDE /* sv */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = sv; path = sv.lproj/IASKLocalizable.strings; sourceTree = \"<group>\"; };\n\t\tC0AE41A01F788BD700682CDE /* th */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = th; path = th.lproj/IASKLocalizable.strings; sourceTree = \"<group>\"; };\n\t\tC0AE41A11F788BD700682CDE /* tr */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = tr; path = tr.lproj/IASKLocalizable.strings; sourceTree = \"<group>\"; };\n\t\tC0AE41A31F788BD700682CDE /* IASKPSSliderSpecifierViewCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IASKPSSliderSpecifierViewCell.h; sourceTree = \"<group>\"; };\n\t\tC0AE41A41F788BD700682CDE /* IASKPSSliderSpecifierViewCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = IASKPSSliderSpecifierViewCell.m; sourceTree = \"<group>\"; };\n\t\tC0AE41A51F788BD700682CDE /* IASKPSTextFieldSpecifierViewCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IASKPSTextFieldSpecifierViewCell.h; sourceTree = \"<group>\"; };\n\t\tC0AE41A61F788BD700682CDE /* IASKPSTextFieldSpecifierViewCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = IASKPSTextFieldSpecifierViewCell.m; sourceTree = \"<group>\"; };\n\t\tC0AE41A71F788BD700682CDE /* IASKSlider.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IASKSlider.h; sourceTree = \"<group>\"; };\n\t\tC0AE41A81F788BD700682CDE /* IASKSlider.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = IASKSlider.m; sourceTree = \"<group>\"; };\n\t\tC0AE41A91F788BD700682CDE /* IASKSwitch.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IASKSwitch.h; sourceTree = \"<group>\"; };\n\t\tC0AE41AA1F788BD700682CDE /* IASKSwitch.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = IASKSwitch.m; sourceTree = \"<group>\"; };\n\t\tC0AE41AB1F788BD700682CDE /* IASKTextField.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IASKTextField.h; sourceTree = \"<group>\"; };\n\t\tC0AE41AC1F788BD700682CDE /* IASKTextField.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = IASKTextField.m; sourceTree = \"<group>\"; };\n\t\tC0AE41AD1F788BD700682CDE /* IASKTextView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IASKTextView.h; sourceTree = \"<group>\"; };\n\t\tC0AE41AE1F788BD700682CDE /* IASKTextView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = IASKTextView.m; sourceTree = \"<group>\"; };\n\t\tC0AE41AF1F788BD700682CDE /* IASKTextViewCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IASKTextViewCell.h; sourceTree = \"<group>\"; };\n\t\tC0AE41B01F788BD700682CDE /* IASKTextViewCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = IASKTextViewCell.m; sourceTree = \"<group>\"; };\n\t\tC0B4E7871AFAAEA200DC9B65 /* SRWebSocket+Helpers.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = \"SRWebSocket+Helpers.h\"; sourceTree = \"<group>\"; };\n\t\tC0B4E7881AFAAEA200DC9B65 /* SRWebSocket+Helpers.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = \"SRWebSocket+Helpers.m\"; sourceTree = \"<group>\"; };\n\t\tC0B56BC11F51F30B00E4CA87 /* es */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = es; path = es.lproj/Localizable.strings; sourceTree = \"<group>\"; };\n\t\tC0B56BC21F51F6BC00E4CA87 /* zh-Hans-CN */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = \"zh-Hans-CN\"; path = \"zh-Hans-CN.lproj/Localizable.strings\"; sourceTree = \"<group>\"; };\n\t\tC0BD70021B4E2BE300A5788D /* Base */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = Base; path = Base.lproj/Localizable.strings; sourceTree = \"<group>\"; };\n\t\tC0BD70041B4E2BE600A5788D /* ru */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ru; path = ru.lproj/Localizable.strings; sourceTree = \"<group>\"; };\n\t\tC0BD70051B4E2C4F00A5788D /* TLStringLocalized.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TLStringLocalized.swift; sourceTree = \"<group>\"; };\n\t\tC0C1BE711AF92CB500B705C4 /* base64.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = base64.c; sourceTree = \"<group>\"; };\n\t\tC0C1BE721AF92CB500B705C4 /* base64.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = base64.h; sourceTree = \"<group>\"; };\n\t\tC0C1BE731AF92CB500B705C4 /* NSData+SRB64Additions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = \"NSData+SRB64Additions.h\"; sourceTree = \"<group>\"; };\n\t\tC0C1BE741AF92CB500B705C4 /* NSData+SRB64Additions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = \"NSData+SRB64Additions.m\"; sourceTree = \"<group>\"; };\n\t\tC0C1BE751AF92CB500B705C4 /* SocketRocket-Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = \"SocketRocket-Prefix.pch\"; sourceTree = \"<group>\"; };\n\t\tC0C1BE761AF92CB500B705C4 /* SRWebSocket.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SRWebSocket.h; sourceTree = \"<group>\"; };\n\t\tC0C1BE771AF92CB500B705C4 /* SRWebSocket.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SRWebSocket.m; sourceTree = \"<group>\"; };\n\t\tC0C3BDEB1AC0F7AA001AC6CD /* TLWallet+Stealth.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = \"TLWallet+Stealth.swift\"; sourceTree = \"<group>\"; };\n\t\tC0C61C591AF15BEF00F9F71F /* TransitionDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TransitionDelegate.swift; sourceTree = \"<group>\"; };\n\t\tC0C61C5D1AF15E6100F9F71F /* TransparentViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TransparentViewController.swift; sourceTree = \"<group>\"; };\n\t\tC0D20A911D5963FF008F70F2 /* TLTxFeeAPI.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TLTxFeeAPI.swift; sourceTree = \"<group>\"; };\n\t\tC0D5A60D1DD8FA1300849E2C /* TLAdvancedNewWalletTableViewCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TLAdvancedNewWalletTableViewCell.swift; sourceTree = \"<group>\"; };\n\t\tC0D5A60E1DD8FA1300849E2C /* TLColdWalletSelectWayTableViewCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TLColdWalletSelectWayTableViewCell.swift; sourceTree = \"<group>\"; };\n\t\tC0D5A60F1DD8FA1300849E2C /* TLNewWalletTableViewCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TLNewWalletTableViewCell.swift; sourceTree = \"<group>\"; };\n\t\tC0D5A6111DD8FA1300849E2C /* TLInputColdWalletKeyTableViewCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TLInputColdWalletKeyTableViewCell.swift; sourceTree = \"<group>\"; };\n\t\tC0D5A6121DD8FA1300849E2C /* TLPassSignedTxTableViewCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TLPassSignedTxTableViewCell.swift; sourceTree = \"<group>\"; };\n\t\tC0D5A6131DD8FA1300849E2C /* TLScanUnsignedTxTableViewCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TLScanUnsignedTxTableViewCell.swift; sourceTree = \"<group>\"; };\n\t\tC0D7B2DA1B16FDA10096E599 /* live.cer */ = {isa = PBXFileReference; lastKnownFileType = file; path = live.cer; sourceTree = \"<group>\"; };\n\t\tC0D8A36A1DAA126700497D31 /* TLColdWalletViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TLColdWalletViewController.swift; sourceTree = \"<group>\"; };\n\t\tC0D8A36C1DAA16C900497D31 /* TLCreateColdWalletViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TLCreateColdWalletViewController.swift; sourceTree = \"<group>\"; };\n\t\tC0D8A36E1DAA183D00497D31 /* TLAuthorizeColdWalletPaymentViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TLAuthorizeColdWalletPaymentViewController.swift; sourceTree = \"<group>\"; };\n\t\tC0E5393C1AD454FD00651FE4 /* TLHelpDoc.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TLHelpDoc.swift; sourceTree = \"<group>\"; };\n\t\tC0EE6D681B1B7E6000982692 /* 360X80logo.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = 360X80logo.png; sourceTree = \"<group>\"; };\n\t\tC0EE6D691B1B7E6000982692 /* 1200X1200logo.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = 1200X1200logo.png; sourceTree = \"<group>\"; };\n\t\tC0F278C71C41EA1A0013DC1A /* TLCurrencyFormat.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TLCurrencyFormat.swift; sourceTree = \"<group>\"; };\n\t\tC4D7E88E9BE3FC3994E59767 /* Pods-ArcBit.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = \"Pods-ArcBit.debug.xcconfig\"; path = \"Pods/Target Support Files/Pods-ArcBit/Pods-ArcBit.debug.xcconfig\"; sourceTree = \"<group>\"; };\n\t\tF338F9551B794D1D00C02F74 /* TLWalletPassphrase.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TLWalletPassphrase.swift; sourceTree = \"<group>\"; };\n\t\tF338F9571B79718900C02F74 /* TLCrypto.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TLCrypto.swift; sourceTree = \"<group>\"; };\n\t\tF37072451B8F570D0026505D /* TLWalletConfig.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TLWalletConfig.swift; sourceTree = \"<group>\"; };\n\t\tF3BC36101B8681FF00CBB3F7 /* TLUpdateAppData.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TLUpdateAppData.swift; sourceTree = \"<group>\"; };\n\t\tF3DAAD651BB1D9EC000488F0 /* TLWalletJSONKeys.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TLWalletJSONKeys.swift; sourceTree = \"<group>\"; };\n/* End PBXFileReference section */\n\n/* Begin PBXFrameworksBuildPhase section */\n\t\tC0A18F8B1ABF51C200BED648 /* Frameworks */ = {\n\t\t\tisa = PBXFrameworksBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t\tC0378C971AF4A18F0083206F /* QuickLook.framework in Frameworks */,\n\t\t\t\tC0378C951AF4A18A0083206F /* CoreText.framework in Frameworks */,\n\t\t\t\tC0378C931AF4A1850083206F /* AssetsLibrary.framework in Frameworks */,\n\t\t\t\tC0A192E51ABF6F0500BED648 /* libicucore.dylib in Frameworks */,\n\t\t\t\tC0A192E31ABF6EF500BED648 /* MessageUI.framework in Frameworks */,\n\t\t\t\tC0A192E11ABF6EEE00BED648 /* Security.framework in Frameworks */,\n\t\t\t\tC0A192DF1ABF6EE800BED648 /* SystemConfiguration.framework in Frameworks */,\n\t\t\t\tC0A192DD1ABF6EDC00BED648 /* MobileCoreServices.framework in Frameworks */,\n\t\t\t\tC0A192DB1ABF6ED500BED648 /* CFNetwork.framework in Frameworks */,\n\t\t\t\tC0A192D91ABF6EC900BED648 /* CoreMedia.framework in Frameworks */,\n\t\t\t\tC0A192D71ABF6EC200BED648 /* AVFoundation.framework in Frameworks */,\n\t\t\t\tC0A192D51ABF6EB900BED648 /* QuartzCore.framework in Frameworks */,\n\t\t\t\tC0A192D31ABF6EB200BED648 /* CoreGraphics.framework in Frameworks */,\n\t\t\t\t371609F6191B495389E4EF29 /* libPods-ArcBit.a in Frameworks */,\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n\t\tC0A18FA01ABF51C200BED648 /* Frameworks */ = {\n\t\t\tisa = PBXFrameworksBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t\tF7E43EEB86A2A43FC05335C4 /* libPods-ArcBitTests.a in Frameworks */,\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n/* End PBXFrameworksBuildPhase section */\n\n/* Begin PBXGroup section */\n\t\t15CDECF35E9C56BC58C8CBCC /* Pods */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\tC4D7E88E9BE3FC3994E59767 /* Pods-ArcBit.debug.xcconfig */,\n\t\t\t\tAA36D9E0C4AFE7E2A43F3C79 /* Pods-ArcBit.release.xcconfig */,\n\t\t\t\t3C7ACA9C0834D6AF891F762C /* Pods-ArcBitTests.debug.xcconfig */,\n\t\t\t\t173E65BB79838FECABC37B10 /* Pods-ArcBitTests.release.xcconfig */,\n\t\t\t);\n\t\t\tname = Pods;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t65EAF1BBE7F17CF5F70A560B /* Frameworks */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\tC0378C961AF4A18F0083206F /* QuickLook.framework */,\n\t\t\t\tC0378C941AF4A18A0083206F /* CoreText.framework */,\n\t\t\t\tC0378C921AF4A1850083206F /* AssetsLibrary.framework */,\n\t\t\t\tC0A192E41ABF6F0500BED648 /* libicucore.dylib */,\n\t\t\t\tC0A192E21ABF6EF500BED648 /* MessageUI.framework */,\n\t\t\t\tC0A192E01ABF6EEE00BED648 /* Security.framework */,\n\t\t\t\tC0A192DE1ABF6EE800BED648 /* SystemConfiguration.framework */,\n\t\t\t\tC0A192DC1ABF6EDC00BED648 /* MobileCoreServices.framework */,\n\t\t\t\tC0A192DA1ABF6ED500BED648 /* CFNetwork.framework */,\n\t\t\t\tC0A192D81ABF6EC900BED648 /* CoreMedia.framework */,\n\t\t\t\tC0A192D61ABF6EC200BED648 /* AVFoundation.framework */,\n\t\t\t\tC0A192D41ABF6EB900BED648 /* QuartzCore.framework */,\n\t\t\t\tC0A192D21ABF6EB200BED648 /* CoreGraphics.framework */,\n\t\t\t\t7C8CDAAD6F71CF30CCD5BBD6 /* libPods-ArcBit.a */,\n\t\t\t\tBABE2B037811FC35D025CD09 /* libPods-ArcBitTests.a */,\n\t\t\t);\n\t\t\tname = Frameworks;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\tC041DA131AE76BAA003D74C9 /* certs */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\tC0D7B2DA1B16FDA10096E599 /* live.cer */,\n\t\t\t);\n\t\t\tpath = certs;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\tC05C39881AD0710B00AADE55 /* TLCloudDocumentSyncWrapper */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\tC05C39891AD0710B00AADE55 /* TLCloudDocumentSyncWrapper.h */,\n\t\t\t\tC05C398A1AD0710B00AADE55 /* TLCloudDocumentSyncWrapper.m */,\n\t\t\t);\n\t\t\tpath = TLCloudDocumentSyncWrapper;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\tC05F82C61EF5D13E0016F0FC /* socket.io-client-swift-10.0.0 */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\tC05F82C71EF5D13E0016F0FC /* Source */,\n\t\t\t);\n\t\t\tpath = \"socket.io-client-swift-10.0.0\";\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\tC05F82C71EF5D13E0016F0FC /* Source */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\tC05F82C81EF5D13E0016F0FC /* SocketAckEmitter.swift */,\n\t\t\t\tC05F82C91EF5D13E0016F0FC /* SocketAckManager.swift */,\n\t\t\t\tC05F82CA1EF5D13E0016F0FC /* SocketAnyEvent.swift */,\n\t\t\t\tC05F82CB1EF5D13E0016F0FC /* SocketClientManager.swift */,\n\t\t\t\tC05F82CC1EF5D13E0016F0FC /* SocketEngine.swift */,\n\t\t\t\tC05F82CD1EF5D13E0016F0FC /* SocketEngineClient.swift */,\n\t\t\t\tC05F82CE1EF5D13E0016F0FC /* SocketEnginePacketType.swift */,\n\t\t\t\tC05F82CF1EF5D13E0016F0FC /* SocketEnginePollable.swift */,\n\t\t\t\tC05F82D01EF5D13E0016F0FC /* SocketEngineSpec.swift */,\n\t\t\t\tC05F82D11EF5D13E0016F0FC /* SocketEngineWebsocket.swift */,\n\t\t\t\tC05F82D21EF5D13E0016F0FC /* SocketEventHandler.swift */,\n\t\t\t\tC05F82D31EF5D13E0016F0FC /* SocketExtensions.swift */,\n\t\t\t\tC05F82D41EF5D13E0016F0FC /* SocketIOClient.swift */,\n\t\t\t\tC05F82D51EF5D13E0016F0FC /* SocketIOClientConfiguration.swift */,\n\t\t\t\tC05F82D61EF5D13E0016F0FC /* SocketIOClientOption.swift */,\n\t\t\t\tC05F82D71EF5D13E0016F0FC /* SocketIOClientSpec.swift */,\n\t\t\t\tC05F82D81EF5D13E0016F0FC /* SocketIOClientStatus.swift */,\n\t\t\t\tC05F82D91EF5D13E0016F0FC /* SocketLogger.swift */,\n\t\t\t\tC05F82DA1EF5D13E0016F0FC /* SocketPacket.swift */,\n\t\t\t\tC05F82DB1EF5D13E0016F0FC /* SocketParsable.swift */,\n\t\t\t\tC05F82DC1EF5D13E0016F0FC /* SocketStringReader.swift */,\n\t\t\t\tC05F82DD1EF5D13E0016F0FC /* SocketTypes.swift */,\n\t\t\t\tC05F82DE1EF5D13E0016F0FC /* SSLSecurity.swift */,\n\t\t\t\tC05F82DF1EF5D13E0016F0FC /* WebSocket.swift */,\n\t\t\t);\n\t\t\tpath = Source;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\tC0649C9F1E256B52007E3965 /* walletTableViewCells */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\tC0649CA01E256B52007E3965 /* TLAccountTableViewCell.swift */,\n\t\t\t\tC0649CA11E256B52007E3965 /* TLAddressTableViewCell.swift */,\n\t\t\t\tC0649CA21E256B52007E3965 /* TLTransactionTableViewCell.swift */,\n\t\t\t);\n\t\t\tpath = walletTableViewCells;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\tC0A18F851ABF51C200BED648 = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\tC0A18F901ABF51C200BED648 /* ArcBit */,\n\t\t\t\tC0A18FA61ABF51C200BED648 /* ArcBitTests */,\n\t\t\t\tC0A18F8F1ABF51C200BED648 /* Products */,\n\t\t\t\t65EAF1BBE7F17CF5F70A560B /* Frameworks */,\n\t\t\t\t15CDECF35E9C56BC58C8CBCC /* Pods */,\n\t\t\t);\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\tC0A18F8F1ABF51C200BED648 /* Products */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\tC0A18F8E1ABF51C200BED648 /* ArcBit.app */,\n\t\t\t\tC0A18FA31ABF51C200BED648 /* ArcBitTests.xctest */,\n\t\t\t);\n\t\t\tname = Products;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\tC0A18F901ABF51C200BED648 /* ArcBit */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\tC04A50E91B1792A8001FCE4E /* ArcBit.entitlements */,\n\t\t\t\tC0A1908A1ABF53A100BED648 /* viewControllers */,\n\t\t\t\tC0A190581ABF53A100BED648 /* model */,\n\t\t\t\tC0A192FF1ABF744E00BED648 /* APIs */,\n\t\t\t\tC0A190851ABF53A100BED648 /* utils */,\n\t\t\t\tC0A18F931ABF51C200BED648 /* AppDelegate.swift */,\n\t\t\t\tC0A1912D1ABF540000BED648 /* ArcBit-Bridging-Header.h */,\n\t\t\t\tC0A190561ABF53A100BED648 /* InAppSettings.bundle */,\n\t\t\t\tC0A18F9A1ABF51C200BED648 /* Images.xcassets */,\n\t\t\t\tC0A192E61ABF707400BED648 /* Main.storyboard */,\n\t\t\t\tC0A18F9C1ABF51C200BED648 /* LaunchScreen.xib */,\n\t\t\t\tC0A18FDE1ABF53A100BED648 /* External */,\n\t\t\t\tC0A18FB31ABF53A100BED648 /* Assets */,\n\t\t\t\tC0A18F911ABF51C200BED648 /* Supporting Files */,\n\t\t\t);\n\t\t\tpath = ArcBit;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\tC0A18F911ABF51C200BED648 /* Supporting Files */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\tC02D3B111B4A45F500B3B7F0 /* ArcBit copy-Info.plist */,\n\t\t\t\tC0A18F921ABF51C200BED648 /* Info.plist */,\n\t\t\t\tC0BD70031B4E2BE300A5788D /* Localizable.strings */,\n\t\t\t);\n\t\t\tname = \"Supporting Files\";\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\tC0A18FA61ABF51C200BED648 /* ArcBitTests */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\tC0A18FA91ABF51C200BED648 /* ArcBitTests.swift */,\n\t\t\t\tC0A18FA71ABF51C200BED648 /* Supporting Files */,\n\t\t\t\tC0A193191ABF751800BED648 /* BreadWalletTests.m */,\n\t\t\t\tC0A193181ABF751700BED648 /* ArcBitTests-Bridging-Header.h */,\n\t\t\t);\n\t\t\tpath = ArcBitTests;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\tC0A18FA71ABF51C200BED648 /* Supporting Files */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\tC0A18FA81ABF51C200BED648 /* Info.plist */,\n\t\t\t);\n\t\t\tname = \"Supporting Files\";\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\tC0A18FB31ABF53A100BED648 /* Assets */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\tC041DA131AE76BAA003D74C9 /* certs */,\n\t\t\t\tC0A18FB41ABF53A100BED648 /* images */,\n\t\t\t);\n\t\t\tpath = Assets;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\tC0A18FB41ABF53A100BED648 /* images */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\tC0A18FB71ABF53A100BED648 /* imageIcons */,\n\t\t\t\tC0A18FD21ABF53A100BED648 /* logo */,\n\t\t\t);\n\t\t\tpath = images;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\tC0A18FB71ABF53A100BED648 /* imageIcons */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\tC0A18FB81ABF53A100BED648 /* arrow-right7-original.png */,\n\t\t\t\tC0A18FB91ABF53A100BED648 /* arrow-right7.png */,\n\t\t\t\tC0A18FBA1ABF53A100BED648 /* download2.png */,\n\t\t\t\tC0A18FBB1ABF53A100BED648 /* imageWithDiffSizes */,\n\t\t\t\tC0A18FD11ABF53A100BED648 /* upload2.png */,\n\t\t\t);\n\t\t\tpath = imageIcons;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\tC0A18FBB1ABF53A100BED648 /* imageWithDiffSizes */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\tC0A18FBC1ABF53A100BED648 /* book.png */,\n\t\t\t\tC0A18FBD1ABF53A100BED648 /* book@2x.png */,\n\t\t\t\tC0A18FBE1ABF53A100BED648 /* book@3x.png */,\n\t\t\t\tC0A18FBF1ABF53A100BED648 /* data.png */,\n\t\t\t\tC0A18FC01ABF53A100BED648 /* data@2x.png */,\n\t\t\t\tC0A18FC11ABF53A100BED648 /* data@3x.png */,\n\t\t\t\tC0A18FC21ABF53A100BED648 /* download.png */,\n\t\t\t\tC0A18FC31ABF53A100BED648 /* download@2x.png */,\n\t\t\t\tC0A18FC41ABF53A100BED648 /* download@3x.png */,\n\t\t\t\tC0A18FC51ABF53A100BED648 /* list.png */,\n\t\t\t\tC0A18FC61ABF53A100BED648 /* list@2x.png */,\n\t\t\t\tC0A18FC71ABF53A100BED648 /* list@3x.png */,\n\t\t\t\tC0A18FC81ABF53A100BED648 /* newspaper-alt.png */,\n\t\t\t\tC0A18FC91ABF53A100BED648 /* newspaper-alt@2x.png */,\n\t\t\t\tC0A18FCA1ABF53A100BED648 /* newspaper-alt@3x.png */,\n\t\t\t\tC0A18FCB1ABF53A100BED648 /* settings.png */,\n\t\t\t\tC0A18FCC1ABF53A100BED648 /* settings@2x.png */,\n\t\t\t\tC0A18FCD1ABF53A100BED648 /* settings@3x.png */,\n\t\t\t\tC0A18FCE1ABF53A100BED648 /* upload.png */,\n\t\t\t\tC0A18FCF1ABF53A100BED648 /* upload@2x.png */,\n\t\t\t\tC0A18FD01ABF53A100BED648 /* upload@3x.png */,\n\t\t\t);\n\t\t\tpath = imageWithDiffSizes;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\tC0A18FD21ABF53A100BED648 /* logo */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\tC0EE6D681B1B7E6000982692 /* 360X80logo.png */,\n\t\t\t\tC0EE6D691B1B7E6000982692 /* 1200X1200logo.png */,\n\t\t\t);\n\t\t\tpath = logo;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\tC0A18FDE1ABF53A100BED648 /* External */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\tC0AE417B1F788BD700682CDE /* InAppSettingsKit */,\n\t\t\t\tC05F82C61EF5D13E0016F0FC /* socket.io-client-swift-10.0.0 */,\n\t\t\t\tC0B4E7861AFAAEA200DC9B65 /* MySocketRocketExtras */,\n\t\t\t\tC0C1BE701AF92CB500B705C4 /* SocketRocket */,\n\t\t\t\tC05C39881AD0710B00AADE55 /* TLCloudDocumentSyncWrapper */,\n\t\t\t\tC0A18FDF1ABF53A100BED648 /* BreadWalletClassesV0.5 */,\n\t\t\t\tC0A18FF31ABF53A100BED648 /* CustomIOS7AlertView */,\n\t\t\t\tC0A190201ABF53A100BED648 /* iToast */,\n\t\t\t\tC0A190231ABF53A100BED648 /* JNKeychain-master */,\n\t\t\t\tC0A190261ABF53A100BED648 /* KeychainItemWrapper */,\n\t\t\t\tC0A190291ABF53A100BED648 /* Localizations */,\n\t\t\t\tC0A190331ABF53A100BED648 /* LTHPasscodeViewController3.50 */,\n\t\t\t\tC0A190381ABF53A100BED648 /* NSDate-Extensions */,\n\t\t\t\tC0A1903B1ABF53A100BED648 /* QRCodeEncoderObjectiveCAtGithub */,\n\t\t\t\tC0A1904E1ABF53A100BED648 /* SWRevealViewController */,\n\t\t\t\tC0A1904F1ABF53A100BED648 /* UIAlertController+Blocks */,\n\t\t\t\tC0A190521ABF53A100BED648 /* UINavigationBar-FixedHeightWhenStatusBarHidden-master */,\n\t\t\t);\n\t\t\tpath = External;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\tC0A18FDF1ABF53A100BED648 /* BreadWalletClassesV0.5 */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\tC0A18FE31ABF53A100BED648 /* BRKey+BIP38.h */,\n\t\t\t\tC0A18FE41ABF53A100BED648 /* BRKey+BIP38.m */,\n\t\t\t\tC0A18FE51ABF53A100BED648 /* BRKey.h */,\n\t\t\t\tC0A18FE61ABF53A100BED648 /* BRKey.m */,\n\t\t\t\tC0A18FE81ABF53A100BED648 /* BRTransaction.h */,\n\t\t\t\tC0A18FE91ABF53A100BED648 /* BRTransaction.m */,\n\t\t\t\tC0A18FEA1ABF53A100BED648 /* ccMemory.h */,\n\t\t\t\tC0A18FEB1ABF53A100BED648 /* NSData+Bitcoin.h */,\n\t\t\t\tC0A18FEC1ABF53A100BED648 /* NSData+Bitcoin.m */,\n\t\t\t\tC0A18FED1ABF53A100BED648 /* NSData+Hash.h */,\n\t\t\t\tC0A18FEE1ABF53A100BED648 /* NSData+Hash.m */,\n\t\t\t\tC0A18FEF1ABF53A100BED648 /* NSMutableData+Bitcoin.h */,\n\t\t\t\tC0A18FF01ABF53A100BED648 /* NSMutableData+Bitcoin.m */,\n\t\t\t\tC0A18FF11ABF53A100BED648 /* NSString+Base58.h */,\n\t\t\t\tC0A18FF21ABF53A100BED648 /* NSString+Base58.m */,\n\t\t\t);\n\t\t\tpath = BreadWalletClassesV0.5;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\tC0A18FF31ABF53A100BED648 /* CustomIOS7AlertView */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\tC0A18FF41ABF53A100BED648 /* CustomIOS7AlertView.h */,\n\t\t\t\tC0A18FF51ABF53A100BED648 /* CustomIOS7AlertView.m */,\n\t\t\t);\n\t\t\tpath = CustomIOS7AlertView;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\tC0A190201ABF53A100BED648 /* iToast */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\tC0A190211ABF53A100BED648 /* iToast.h */,\n\t\t\t\tC0A190221ABF53A100BED648 /* iToast.m */,\n\t\t\t);\n\t\t\tpath = iToast;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\tC0A190231ABF53A100BED648 /* JNKeychain-master */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\tC0A190241ABF53A100BED648 /* JNKeychain.h */,\n\t\t\t\tC0A190251ABF53A100BED648 /* JNKeychain.m */,\n\t\t\t);\n\t\t\tpath = \"JNKeychain-master\";\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\tC0A190261ABF53A100BED648 /* KeychainItemWrapper */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\tC0A190271ABF53A100BED648 /* KeychainItemWrapper.h */,\n\t\t\t\tC0A190281ABF53A100BED648 /* KeychainItemWrapper.m */,\n\t\t\t);\n\t\t\tpath = KeychainItemWrapper;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\tC0A190291ABF53A100BED648 /* Localizations */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\tC0A1902A1ABF53A100BED648 /* LTHPasscodeViewController.strings */,\n\t\t\t);\n\t\t\tpath = Localizations;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\tC0A190331ABF53A100BED648 /* LTHPasscodeViewController3.50 */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\tC0A190341ABF53A100BED648 /* LTHKeychainUtils.h */,\n\t\t\t\tC0A190351ABF53A100BED648 /* LTHKeychainUtils.m */,\n\t\t\t\tC0A190361ABF53A100BED648 /* LTHPasscodeViewController.h */,\n\t\t\t\tC0A190371ABF53A100BED648 /* LTHPasscodeViewController.m */,\n\t\t\t);\n\t\t\tpath = LTHPasscodeViewController3.50;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\tC0A190381ABF53A100BED648 /* NSDate-Extensions */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\tC0A190391ABF53A100BED648 /* NSDate-Utilities.h */,\n\t\t\t\tC0A1903A1ABF53A100BED648 /* NSDate-Utilities.m */,\n\t\t\t);\n\t\t\tpath = \"NSDate-Extensions\";\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\tC0A1903B1ABF53A100BED648 /* QRCodeEncoderObjectiveCAtGithub */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\tC0A1903C1ABF53A100BED648 /* DataMatrix.h */,\n\t\t\t\tC0A1903D1ABF53A100BED648 /* DataMatrix.mm */,\n\t\t\t\tC0A1903E1ABF53A100BED648 /* QR_Encode.cpp */,\n\t\t\t\tC0A1903F1ABF53A100BED648 /* QR_Encode.h */,\n\t\t\t\tC0A190401ABF53A100BED648 /* QRCodeEncoderDemoViewController.h */,\n\t\t\t\tC0A190411ABF53A100BED648 /* QRCodeEncoderDemoViewController.mm */,\n\t\t\t\tC0A190421ABF53A100BED648 /* QRCodeEncoderObjectiveCAtGithub-Prefix.pch */,\n\t\t\t\tC0A190431ABF53A100BED648 /* QREncoder-Prefix.pch */,\n\t\t\t\tC0A190441ABF53A100BED648 /* QREncoder.h */,\n\t\t\t\tC0A190451ABF53A100BED648 /* QREncoder.mm */,\n\t\t\t);\n\t\t\tpath = QRCodeEncoderObjectiveCAtGithub;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\tC0A1904E1ABF53A100BED648 /* SWRevealViewController */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t);\n\t\t\tpath = SWRevealViewController;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\tC0A1904F1ABF53A100BED648 /* UIAlertController+Blocks */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\tC0A190501ABF53A100BED648 /* UIAlertConrtoller+Blocks.m */,\n\t\t\t\tC0A190511ABF53A100BED648 /* UIAlertController+Blocks.h */,\n\t\t\t);\n\t\t\tpath = \"UIAlertController+Blocks\";\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\tC0A190521ABF53A100BED648 /* UINavigationBar-FixedHeightWhenStatusBarHidden-master */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\tC0A190531ABF53A100BED648 /* UINavigationBar+FixedHeightWhenStatusBarHidden.h */,\n\t\t\t\tC0A190541ABF53A100BED648 /* UINavigationBar+FixedHeightWhenStatusBarHidden.m */,\n\t\t\t);\n\t\t\tpath = \"UINavigationBar-FixedHeightWhenStatusBarHidden-master\";\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\tC0A190581ABF53A100BED648 /* model */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\tC0649CA61E256E16007E3965 /* TLDisplayStrings.swift */,\n\t\t\t\tC0A192E91ABF742D00BED648 /* TLAchievements.swift */,\n\t\t\t\tC0A192EA1ABF742D00BED648 /* TLAnalytics.swift */,\n\t\t\t\tC0A192EB1ABF742D00BED648 /* TLPreferences.swift */,\n\t\t\t\tC0A190591ABF53A100BED648 /* TLAccountObject.swift */,\n\t\t\t\tC00413491ACEFAF200505F31 /* TLOperationsManager.swift */,\n\t\t\t\tC0A1905A1ABF53A100BED648 /* TLAccounts.swift */,\n\t\t\t\tC0A1905B1ABF53A100BED648 /* TLBlockchainStatus.swift */,\n\t\t\t\tC0A1905C1ABF53A100BED648 /* TLCoin.swift */,\n\t\t\t\tC0A1905D1ABF53A100BED648 /* TLCoreBitcoinWrapper.swift */,\n\t\t\t\tC0A1905E1ABF53A100BED648 /* TLHDWalletWrapper.swift */,\n\t\t\t\tC0A1905F1ABF53A100BED648 /* TLImportedAddress.swift */,\n\t\t\t\tC0A190601ABF53A100BED648 /* TLImportedAddresses.swift */,\n\t\t\t\tC0A190611ABF53A100BED648 /* TLSelectedObject.swift */,\n\t\t\t\tC0A190621ABF53A100BED648 /* TLSendFormData.swift */,\n\t\t\t\tC0A190631ABF53A100BED648 /* TLSpaghettiGodSend.swift */,\n\t\t\t\tC0A190641ABF53A100BED648 /* TLStealthAddress.swift */,\n\t\t\t\tC0A190651ABF53A100BED648 /* TLStealthWallet.swift */,\n\t\t\t\tC0A190661ABF53A100BED648 /* TLSuggestions.swift */,\n\t\t\t\tC0A190671ABF53A100BED648 /* TLTxObject.swift */,\n\t\t\t\tC0A190681ABF53A100BED648 /* TLWallet.swift */,\n\t\t\t\tC0C3BDEB1AC0F7AA001AC6CD /* TLWallet+Stealth.swift */,\n\t\t\t\tC0A190691ABF53A100BED648 /* TLWalletJson.swift */,\n\t\t\t\tF3DAAD651BB1D9EC000488F0 /* TLWalletJSONKeys.swift */,\n\t\t\t\tC0A1906A1ABF53A100BED648 /* TLWalletUtils.swift */,\n\t\t\t\tC0F278C71C41EA1A0013DC1A /* TLCurrencyFormat.swift */,\n\t\t\t\tC0E5393C1AD454FD00651FE4 /* TLHelpDoc.swift */,\n\t\t\t\tF338F9551B794D1D00C02F74 /* TLWalletPassphrase.swift */,\n\t\t\t\tF338F9571B79718900C02F74 /* TLCrypto.swift */,\n\t\t\t\tF37072451B8F570D0026505D /* TLWalletConfig.swift */,\n\t\t\t\tC01681AB1DBD9ED8004D5FD7 /* TLColdWallet.swift */,\n\t\t\t);\n\t\t\tpath = model;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\tC0A190851ABF53A100BED648 /* utils */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\tC0BD70051B4E2C4F00A5788D /* TLStringLocalized.swift */,\n\t\t\t\tC0A192EF1ABF744300BED648 /* TLMacros.swift */,\n\t\t\t\tC0A192F01ABF744300BED648 /* TLUtils.swift */,\n\t\t\t\tC0A192F11ABF744300BED648 /* TLColors.swift */,\n\t\t\t\tC0A192F21ABF744300BED648 /* TLHUDWrapper.swift */,\n\t\t\t\tC0A192F31ABF744300BED648 /* TLNotificationEvents.swift */,\n\t\t\t\tC0A192F51ABF744300BED648 /* TLPrompts.swift */,\n\t\t\t\tC0A192F61ABF744300BED648 /* TLQRImageModal.swift */,\n\t\t\t\tC0A190861ABF53A100BED648 /* UINavigationController+StatusBarStyle.swift */,\n\t\t\t\tC0A190871ABF53A100BED648 /* UIView+FormScroll.swift */,\n\t\t\t\tC0A190881ABF53A100BED648 /* UIViewController+Extras.swift */,\n\t\t\t\tC0A190891ABF53A100BED648 /* UIViewController+Style.swift */,\n\t\t\t\tC0C61C591AF15BEF00F9F71F /* TransitionDelegate.swift */,\n\t\t\t\tF3BC36101B8681FF00CBB3F7 /* TLUpdateAppData.swift */,\n\t\t\t);\n\t\t\tpath = utils;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\tC0A1908A1ABF53A100BED648 /* viewControllers */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\tC0D5A60B1DD8FA1300849E2C /* tableViewCells */,\n\t\t\t\tC0D8A36E1DAA183D00497D31 /* TLAuthorizeColdWalletPaymentViewController.swift */,\n\t\t\t\tC0D8A36C1DAA16C900497D31 /* TLCreateColdWalletViewController.swift */,\n\t\t\t\tC01681A11DB0B1D9004D5FD7 /* TLBrainWalletViewController.swift */,\n\t\t\t\tC0D8A36A1DAA126700497D31 /* TLColdWalletViewController.swift */,\n\t\t\t\tC0A1908B1ABF53A100BED648 /* TLAccountsViewController.swift */,\n\t\t\t\tC0A1908C1ABF53A100BED648 /* TLAchievementsViewController.swift */,\n\t\t\t\tC0A1908D1ABF53A100BED648 /* TLAddressBookViewController.swift */,\n\t\t\t\tC0A1908E1ABF53A100BED648 /* TLAddressListViewController.swift */,\n\t\t\t\tC0A1908F1ABF53A100BED648 /* TLRestoreWalletViewController.swift */,\n\t\t\t\tC0A190901ABF53A100BED648 /* TLHelpViewController.swift */,\n\t\t\t\tC0A6AD741C42E80F00B8C22B /* TLLinksViewController.swift */,\n\t\t\t\tC0A190911ABF53A100BED648 /* TLHistoryViewController.swift */,\n\t\t\t\tC0A190921ABF53A100BED648 /* TLInstructionsViewController.swift */,\n\t\t\t\tC0A190931ABF53A100BED648 /* TLManageAccountsViewController.swift */,\n\t\t\t\tC0A190941ABF53A100BED648 /* TLMenuViewController.swift */,\n\t\t\t\tC0A190961ABF53A100BED648 /* TLPreloadViewController.swift */,\n\t\t\t\tC0A190951ABF53A100BED648 /* TLPassPhraseViewController.swift */,\n\t\t\t\tC046DD5E1D6E271000B39580 /* TLReviewPaymentViewController.swift */,\n\t\t\t\tC0A190971ABF53A100BED648 /* TLQRCodeScannerViewController.swift */,\n\t\t\t\tC0A190981ABF53A100BED648 /* TLReceiveViewController.swift */,\n\t\t\t\tC0A190991ABF53A100BED648 /* TLSendViewController.swift */,\n\t\t\t\tC0A1909A1ABF53A100BED648 /* TLSettingsViewController.swift */,\n\t\t\t\tC0A1909B1ABF53A100BED648 /* TLTextViewViewController.swift */,\n\t\t\t\tC0C61C5D1AF15E6100F9F71F /* TransparentViewController.swift */,\n\t\t\t);\n\t\t\tpath = viewControllers;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\tC0A192FF1ABF744E00BED648 /* APIs */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\tC0D20A911D5963FF008F70F2 /* TLTxFeeAPI.swift */,\n\t\t\t\tC0A193001ABF744E00BED648 /* TLBitcoinListener.swift */,\n\t\t\t\tC0A193011ABF744E00BED648 /* TLBlockchainAPI.swift */,\n\t\t\t\tC0A193021ABF744E00BED648 /* TLBlockExplorerAPI.swift */,\n\t\t\t\tC0A193041ABF744E00BED648 /* TLExchangeRate.swift */,\n\t\t\t\tC0A193051ABF744E00BED648 /* TLInsightAPI.swift */,\n\t\t\t\tC0AD2C581AC3DE3200FEF982 /* TLBlockrAPI.swift */,\n\t\t\t\tC0A193061ABF744E00BED648 /* TLNetworking.swift */,\n\t\t\t\tC0A193071ABF744E00BED648 /* TLStealthServerAPI.swift */,\n\t\t\t\tC0A193081ABF744E00BED648 /* TLStealthWebSocket.swift */,\n\t\t\t\tC0AB0A321AC52A8400B456DB /* TLPushTxAPI.swift */,\n\t\t\t\tC0607FCC1AEEB3CD007203F8 /* TLStealthServerConfig.swift */,\n\t\t\t);\n\t\t\tpath = APIs;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\tC0AE417B1F788BD700682CDE /* InAppSettingsKit */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\tC0AE417C1F788BD700682CDE /* Controllers */,\n\t\t\t\tC0AE41861F788BD700682CDE /* Models */,\n\t\t\t\tC0AE41911F788BD700682CDE /* Resources */,\n\t\t\t\tC0AE41A21F788BD700682CDE /* Views */,\n\t\t\t);\n\t\t\tpath = InAppSettingsKit;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\tC0AE417C1F788BD700682CDE /* Controllers */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\tC0AE417D1F788BD700682CDE /* IASKAppSettingsViewController.h */,\n\t\t\t\tC0AE417E1F788BD700682CDE /* IASKAppSettingsViewController.m */,\n\t\t\t\tC0AE417F1F788BD700682CDE /* IASKAppSettingsWebViewController.h */,\n\t\t\t\tC0AE41801F788BD700682CDE /* IASKAppSettingsWebViewController.m */,\n\t\t\t\tC0AE41811F788BD700682CDE /* IASKMultipleValueSelection.h */,\n\t\t\t\tC0AE41821F788BD700682CDE /* IASKMultipleValueSelection.m */,\n\t\t\t\tC0AE41831F788BD700682CDE /* IASKSpecifierValuesViewController.h */,\n\t\t\t\tC0AE41841F788BD700682CDE /* IASKSpecifierValuesViewController.m */,\n\t\t\t\tC0AE41851F788BD700682CDE /* IASKViewController.h */,\n\t\t\t);\n\t\t\tpath = Controllers;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\tC0AE41861F788BD700682CDE /* Models */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\tC0AE41871F788BD700682CDE /* IASKSettingsReader.h */,\n\t\t\t\tC0AE41881F788BD700682CDE /* IASKSettingsReader.m */,\n\t\t\t\tC0AE41891F788BD700682CDE /* IASKSettingsStore.h */,\n\t\t\t\tC0AE418A1F788BD700682CDE /* IASKSettingsStore.m */,\n\t\t\t\tC0AE418B1F788BD700682CDE /* IASKSettingsStoreFile.h */,\n\t\t\t\tC0AE418C1F788BD700682CDE /* IASKSettingsStoreFile.m */,\n\t\t\t\tC0AE418D1F788BD700682CDE /* IASKSettingsStoreUserDefaults.h */,\n\t\t\t\tC0AE418E1F788BD700682CDE /* IASKSettingsStoreUserDefaults.m */,\n\t\t\t\tC0AE418F1F788BD700682CDE /* IASKSpecifier.h */,\n\t\t\t\tC0AE41901F788BD700682CDE /* IASKSpecifier.m */,\n\t\t\t);\n\t\t\tpath = Models;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\tC0AE41911F788BD700682CDE /* Resources */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\tC0AE41921F788BD700682CDE /* IASKLocalizable.strings */,\n\t\t\t);\n\t\t\tpath = Resources;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\tC0AE41A21F788BD700682CDE /* Views */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\tC0AE41A31F788BD700682CDE /* IASKPSSliderSpecifierViewCell.h */,\n\t\t\t\tC0AE41A41F788BD700682CDE /* IASKPSSliderSpecifierViewCell.m */,\n\t\t\t\tC0AE41A51F788BD700682CDE /* IASKPSTextFieldSpecifierViewCell.h */,\n\t\t\t\tC0AE41A61F788BD700682CDE /* IASKPSTextFieldSpecifierViewCell.m */,\n\t\t\t\tC0AE41A71F788BD700682CDE /* IASKSlider.h */,\n\t\t\t\tC0AE41A81F788BD700682CDE /* IASKSlider.m */,\n\t\t\t\tC0AE41A91F788BD700682CDE /* IASKSwitch.h */,\n\t\t\t\tC0AE41AA1F788BD700682CDE /* IASKSwitch.m */,\n\t\t\t\tC0AE41AB1F788BD700682CDE /* IASKTextField.h */,\n\t\t\t\tC0AE41AC1F788BD700682CDE /* IASKTextField.m */,\n\t\t\t\tC0AE41AD1F788BD700682CDE /* IASKTextView.h */,\n\t\t\t\tC0AE41AE1F788BD700682CDE /* IASKTextView.m */,\n\t\t\t\tC0AE41AF1F788BD700682CDE /* IASKTextViewCell.h */,\n\t\t\t\tC0AE41B01F788BD700682CDE /* IASKTextViewCell.m */,\n\t\t\t);\n\t\t\tpath = Views;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\tC0B4E7861AFAAEA200DC9B65 /* MySocketRocketExtras */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\tC0B4E7871AFAAEA200DC9B65 /* SRWebSocket+Helpers.h */,\n\t\t\t\tC0B4E7881AFAAEA200DC9B65 /* SRWebSocket+Helpers.m */,\n\t\t\t);\n\t\t\tpath = MySocketRocketExtras;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\tC0C1BE701AF92CB500B705C4 /* SocketRocket */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\tC0C1BE711AF92CB500B705C4 /* base64.c */,\n\t\t\t\tC0C1BE721AF92CB500B705C4 /* base64.h */,\n\t\t\t\tC0C1BE731AF92CB500B705C4 /* NSData+SRB64Additions.h */,\n\t\t\t\tC0C1BE741AF92CB500B705C4 /* NSData+SRB64Additions.m */,\n\t\t\t\tC0C1BE751AF92CB500B705C4 /* SocketRocket-Prefix.pch */,\n\t\t\t\tC0C1BE761AF92CB500B705C4 /* SRWebSocket.h */,\n\t\t\t\tC0C1BE771AF92CB500B705C4 /* SRWebSocket.m */,\n\t\t\t);\n\t\t\tpath = SocketRocket;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\tC0D5A60B1DD8FA1300849E2C /* tableViewCells */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\tC0649C9F1E256B52007E3965 /* walletTableViewCells */,\n\t\t\t\tC0D5A60C1DD8FA1300849E2C /* createColdWalletTableViewCells */,\n\t\t\t\tC0D5A6101DD8FA1300849E2C /* spendColdWalletTableViewCells */,\n\t\t\t);\n\t\t\tpath = tableViewCells;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\tC0D5A60C1DD8FA1300849E2C /* createColdWalletTableViewCells */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\tC0D5A60D1DD8FA1300849E2C /* TLAdvancedNewWalletTableViewCell.swift */,\n\t\t\t\tC0D5A60E1DD8FA1300849E2C /* TLColdWalletSelectWayTableViewCell.swift */,\n\t\t\t\tC0D5A60F1DD8FA1300849E2C /* TLNewWalletTableViewCell.swift */,\n\t\t\t);\n\t\t\tpath = createColdWalletTableViewCells;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\tC0D5A6101DD8FA1300849E2C /* spendColdWalletTableViewCells */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\tC0D5A6111DD8FA1300849E2C /* TLInputColdWalletKeyTableViewCell.swift */,\n\t\t\t\tC0D5A6121DD8FA1300849E2C /* TLPassSignedTxTableViewCell.swift */,\n\t\t\t\tC0D5A6131DD8FA1300849E2C /* TLScanUnsignedTxTableViewCell.swift */,\n\t\t\t);\n\t\t\tpath = spendColdWalletTableViewCells;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n/* End PBXGroup section */\n\n/* Begin PBXNativeTarget section */\n\t\tC0A18F8D1ABF51C200BED648 /* ArcBit */ = {\n\t\t\tisa = PBXNativeTarget;\n\t\t\tbuildConfigurationList = C0A18FAD1ABF51C200BED648 /* Build configuration list for PBXNativeTarget \"ArcBit\" */;\n\t\t\tbuildPhases = (\n\t\t\t\t172F38C0899F2CAA3997D54E /* [CP] Check Pods Manifest.lock */,\n\t\t\t\tC0A18F8A1ABF51C200BED648 /* Sources */,\n\t\t\t\tC0A18F8B1ABF51C200BED648 /* Frameworks */,\n\t\t\t\tC0A18F8C1ABF51C200BED648 /* Resources */,\n\t\t\t\tC0878BE81AF4A11B002A4F5A /* ShellScript */,\n\t\t\t\t6ABB43AFCFDF0A2994449960 /* [CP] Embed Pods Frameworks */,\n\t\t\t\tB6B36DF9BC602A37C9711298 /* [CP] Copy Pods Resources */,\n\t\t\t\tC0698B451CFB7D4900115062 /* ShellScript */,\n\t\t\t);\n\t\t\tbuildRules = (\n\t\t\t);\n\t\t\tdependencies = (\n\t\t\t);\n\t\t\tname = ArcBit;\n\t\t\tproductName = ArcBit;\n\t\t\tproductReference = C0A18F8E1ABF51C200BED648 /* ArcBit.app */;\n\t\t\tproductType = \"com.apple.product-type.application\";\n\t\t};\n\t\tC0A18FA21ABF51C200BED648 /* ArcBitTests */ = {\n\t\t\tisa = PBXNativeTarget;\n\t\t\tbuildConfigurationList = C0A18FB01ABF51C200BED648 /* Build configuration list for PBXNativeTarget \"ArcBitTests\" */;\n\t\t\tbuildPhases = (\n\t\t\t\t782EBA77421757A4C888700E /* [CP] Check Pods Manifest.lock */,\n\t\t\t\tC0A18F9F1ABF51C200BED648 /* Sources */,\n\t\t\t\tC0A18FA01ABF51C200BED648 /* Frameworks */,\n\t\t\t\tC0A18FA11ABF51C200BED648 /* Resources */,\n\t\t\t\t73FC12304A7AE0663DF98D3A /* [CP] Embed Pods Frameworks */,\n\t\t\t\t2AE1D86853126B8686B821A5 /* [CP] Copy Pods Resources */,\n\t\t\t);\n\t\t\tbuildRules = (\n\t\t\t);\n\t\t\tdependencies = (\n\t\t\t\tC0A18FA51ABF51C200BED648 /* PBXTargetDependency */,\n\t\t\t);\n\t\t\tname = ArcBitTests;\n\t\t\tproductName = ArcBitTests;\n\t\t\tproductReference = C0A18FA31ABF51C200BED648 /* ArcBitTests.xctest */;\n\t\t\tproductType = \"com.apple.product-type.bundle.unit-test\";\n\t\t};\n/* End PBXNativeTarget section */\n\n/* Begin PBXProject section */\n\t\tC0A18F861ABF51C200BED648 /* Project object */ = {\n\t\t\tisa = PBXProject;\n\t\t\tattributes = {\n\t\t\t\tLastSwiftMigration = 0700;\n\t\t\t\tLastSwiftUpdateCheck = 0700;\n\t\t\t\tLastUpgradeCheck = 0700;\n\t\t\t\tORGANIZATIONNAME = ArcBit;\n\t\t\t\tTargetAttributes = {\n\t\t\t\t\tC0A18F8D1ABF51C200BED648 = {\n\t\t\t\t\t\tCreatedOnToolsVersion = 6.2;\n\t\t\t\t\t\tDevelopmentTeam = 2VMT9RED95;\n\t\t\t\t\t\tLastSwiftMigration = 0800;\n\t\t\t\t\t\tSystemCapabilities = {\n\t\t\t\t\t\t\tcom.apple.iCloud = {\n\t\t\t\t\t\t\t\tenabled = 0;\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t};\n\t\t\t\t\t};\n\t\t\t\t\tC0A18FA21ABF51C200BED648 = {\n\t\t\t\t\t\tCreatedOnToolsVersion = 6.2;\n\t\t\t\t\t\tLastSwiftMigration = 0800;\n\t\t\t\t\t\tTestTargetID = C0A18F8D1ABF51C200BED648;\n\t\t\t\t\t};\n\t\t\t\t};\n\t\t\t};\n\t\t\tbuildConfigurationList = C0A18F891ABF51C200BED648 /* Build configuration list for PBXProject \"ArcBit\" */;\n\t\t\tcompatibilityVersion = \"Xcode 3.2\";\n\t\t\tdevelopmentRegion = English;\n\t\t\thasScannedForEncodings = 0;\n\t\t\tknownRegions = (\n\t\t\t\ten,\n\t\t\t\tBase,\n\t\t\t\tde,\n\t\t\t\tes,\n\t\t\t\tfr,\n\t\t\t\tja,\n\t\t\t\tro,\n\t\t\t\tru,\n\t\t\t\t\"zh-Hans-CN\",\n\t\t\t\tel,\n\t\t\t\tit,\n\t\t\t\tnl,\n\t\t\t\t\"pt-PT\",\n\t\t\t\tpt,\n\t\t\t\tsv,\n\t\t\t\tth,\n\t\t\t\ttr,\n\t\t\t\t\"zh-Hant\",\n\t\t\t);\n\t\t\tmainGroup = C0A18F851ABF51C200BED648;\n\t\t\tproductRefGroup = C0A18F8F1ABF51C200BED648 /* Products */;\n\t\t\tprojectDirPath = \"\";\n\t\t\tprojectRoot = \"\";\n\t\t\ttargets = (\n\t\t\t\tC0A18F8D1ABF51C200BED648 /* ArcBit */,\n\t\t\t\tC0A18FA21ABF51C200BED648 /* ArcBitTests */,\n\t\t\t);\n\t\t};\n/* End PBXProject section */\n\n/* Begin PBXResourcesBuildPhase section */\n\t\tC0A18F8C1ABF51C200BED648 /* Resources */ = {\n\t\t\tisa = PBXResourcesBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t\tC0A190B01ABF53A100BED648 /* settings.png in Resources */,\n\t\t\t\tC0A190A51ABF53A100BED648 /* data@2x.png in Resources */,\n\t\t\t\tC0A190AD1ABF53A100BED648 /* newspaper-alt.png in Resources */,\n\t\t\t\tC0A190A11ABF53A100BED648 /* book.png in Resources */,\n\t\t\t\tC0EE6D6B1B1B7E6000982692 /* 1200X1200logo.png in Resources */,\n\t\t\t\tC0A190A81ABF53A100BED648 /* download@2x.png in Resources */,\n\t\t\t\tC0A190AE1ABF53A100BED648 /* newspaper-alt@2x.png in Resources */,\n\t\t\t\tC0EE6D6A1B1B7E6000982692 /* 360X80logo.png in Resources */,\n\t\t\t\tC0A190DE1ABF53A100BED648 /* LTHPasscodeViewController.strings in Resources */,\n\t\t\t\tC0A190A01ABF53A100BED648 /* download2.png in Resources */,\n\t\t\t\tC0A190A91ABF53A100BED648 /* download@3x.png in Resources */,\n\t\t\t\tC0A18F9E1ABF51C200BED648 /* LaunchScreen.xib in Resources */,\n\t\t\t\tC0BD70011B4E2BE300A5788D /* Localizable.strings in Resources */,\n\t\t\t\tC0A190B41ABF53A100BED648 /* upload@2x.png in Resources */,\n\t\t\t\tC0A190A41ABF53A100BED648 /* data.png in Resources */,\n\t\t\t\tC0AE41BA1F788BD700682CDE /* IASKLocalizable.strings in Resources */,\n\t\t\t\tC0D7B2DB1B16FDA10096E599 /* live.cer in Resources */,\n\t\t\t\tC0A190AC1ABF53A100BED648 /* list@3x.png in Resources */,\n\t\t\t\tC0A190A61ABF53A100BED648 /* data@3x.png in Resources */,\n\t\t\t\tC0A190B61ABF53A100BED648 /* upload2.png in Resources */,\n\t\t\t\tC0A190B51ABF53A100BED648 /* upload@3x.png in Resources */,\n\t\t\t\tC0A1909F1ABF53A100BED648 /* arrow-right7.png in Resources */,\n\t\t\t\tC0A190B31ABF53A100BED648 /* upload.png in Resources */,\n\t\t\t\tC0A190AA1ABF53A100BED648 /* list.png in Resources */,\n\t\t\t\tC0A190A31ABF53A100BED648 /* book@3x.png in Resources */,\n\t\t\t\tC0A18F9B1ABF51C200BED648 /* Images.xcassets in Resources */,\n\t\t\t\tC0A190A71ABF53A100BED648 /* download.png in Resources */,\n\t\t\t\tC0A190AF1ABF53A100BED648 /* newspaper-alt@3x.png in Resources */,\n\t\t\t\tC0A190EC1ABF53A100BED648 /* InAppSettings.bundle in Resources */,\n\t\t\t\tC0A190B11ABF53A100BED648 /* settings@2x.png in Resources */,\n\t\t\t\tC0A192E81ABF707400BED648 /* Main.storyboard in Resources */,\n\t\t\t\tC0A190AB1ABF53A100BED648 /* list@2x.png in Resources */,\n\t\t\t\tC0A1909E1ABF53A100BED648 /* arrow-right7-original.png in Resources */,\n\t\t\t\tC0A190B21ABF53A100BED648 /* settings@3x.png in Resources */,\n\t\t\t\tC0A190A21ABF53A100BED648 /* book@2x.png in Resources */,\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n\t\tC0A18FA11ABF51C200BED648 /* Resources */ = {\n\t\t\tisa = PBXResourcesBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n/* End PBXResourcesBuildPhase section */\n\n/* Begin PBXShellScriptBuildPhase section */\n\t\t172F38C0899F2CAA3997D54E /* [CP] Check Pods Manifest.lock */ = {\n\t\t\tisa = PBXShellScriptBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t);\n\t\t\tinputPaths = (\n\t\t\t\t\"${PODS_PODFILE_DIR_PATH}/Podfile.lock\",\n\t\t\t\t\"${PODS_ROOT}/Manifest.lock\",\n\t\t\t);\n\t\t\tname = \"[CP] Check Pods Manifest.lock\";\n\t\t\toutputPaths = (\n\t\t\t\t\"$(DERIVED_FILE_DIR)/Pods-ArcBit-checkManifestLockResult.txt\",\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t\tshellPath = /bin/sh;\n\t\t\tshellScript = \"diff \\\"${PODS_PODFILE_DIR_PATH}/Podfile.lock\\\" \\\"${PODS_ROOT}/Manifest.lock\\\" > /dev/null\\nif [ $? != 0 ] ; then\\n    # print error to STDERR\\n    echo \\\"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\\\" >&2\\n    exit 1\\nfi\\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\\necho \\\"SUCCESS\\\" > \\\"${SCRIPT_OUTPUT_FILE_0}\\\"\\n\";\n\t\t\tshowEnvVarsInLog = 0;\n\t\t};\n\t\t2AE1D86853126B8686B821A5 /* [CP] Copy Pods Resources */ = {\n\t\t\tisa = PBXShellScriptBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t);\n\t\t\tinputPaths = (\n\t\t\t);\n\t\t\tname = \"[CP] Copy Pods Resources\";\n\t\t\toutputPaths = (\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t\tshellPath = /bin/sh;\n\t\t\tshellScript = \"\\\"${SRCROOT}/Pods/Target Support Files/Pods-ArcBitTests/Pods-ArcBitTests-resources.sh\\\"\\n\";\n\t\t\tshowEnvVarsInLog = 0;\n\t\t};\n\t\t6ABB43AFCFDF0A2994449960 /* [CP] Embed Pods Frameworks */ = {\n\t\t\tisa = PBXShellScriptBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t);\n\t\t\tinputPaths = (\n\t\t\t);\n\t\t\tname = \"[CP] Embed Pods Frameworks\";\n\t\t\toutputPaths = (\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t\tshellPath = /bin/sh;\n\t\t\tshellScript = \"\\\"${SRCROOT}/Pods/Target Support Files/Pods-ArcBit/Pods-ArcBit-frameworks.sh\\\"\\n\";\n\t\t\tshowEnvVarsInLog = 0;\n\t\t};\n\t\t73FC12304A7AE0663DF98D3A /* [CP] Embed Pods Frameworks */ = {\n\t\t\tisa = PBXShellScriptBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t);\n\t\t\tinputPaths = (\n\t\t\t);\n\t\t\tname = \"[CP] Embed Pods Frameworks\";\n\t\t\toutputPaths = (\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t\tshellPath = /bin/sh;\n\t\t\tshellScript = \"\\\"${SRCROOT}/Pods/Target Support Files/Pods-ArcBitTests/Pods-ArcBitTests-frameworks.sh\\\"\\n\";\n\t\t\tshowEnvVarsInLog = 0;\n\t\t};\n\t\t782EBA77421757A4C888700E /* [CP] Check Pods Manifest.lock */ = {\n\t\t\tisa = PBXShellScriptBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t);\n\t\t\tinputPaths = (\n\t\t\t\t\"${PODS_PODFILE_DIR_PATH}/Podfile.lock\",\n\t\t\t\t\"${PODS_ROOT}/Manifest.lock\",\n\t\t\t);\n\t\t\tname = \"[CP] Check Pods Manifest.lock\";\n\t\t\toutputPaths = (\n\t\t\t\t\"$(DERIVED_FILE_DIR)/Pods-ArcBitTests-checkManifestLockResult.txt\",\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t\tshellPath = /bin/sh;\n\t\t\tshellScript = \"diff \\\"${PODS_PODFILE_DIR_PATH}/Podfile.lock\\\" \\\"${PODS_ROOT}/Manifest.lock\\\" > /dev/null\\nif [ $? != 0 ] ; then\\n    # print error to STDERR\\n    echo \\\"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\\\" >&2\\n    exit 1\\nfi\\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\\necho \\\"SUCCESS\\\" > \\\"${SCRIPT_OUTPUT_FILE_0}\\\"\\n\";\n\t\t\tshowEnvVarsInLog = 0;\n\t\t};\n\t\tB6B36DF9BC602A37C9711298 /* [CP] Copy Pods Resources */ = {\n\t\t\tisa = PBXShellScriptBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t);\n\t\t\tinputPaths = (\n\t\t\t);\n\t\t\tname = \"[CP] Copy Pods Resources\";\n\t\t\toutputPaths = (\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t\tshellPath = /bin/sh;\n\t\t\tshellScript = \"\\\"${SRCROOT}/Pods/Target Support Files/Pods-ArcBit/Pods-ArcBit-resources.sh\\\"\\n\";\n\t\t\tshowEnvVarsInLog = 0;\n\t\t};\n\t\tC0698B451CFB7D4900115062 /* ShellScript */ = {\n\t\t\tisa = PBXShellScriptBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t);\n\t\t\tinputPaths = (\n\t\t\t);\n\t\t\toutputPaths = (\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t\tshellPath = /bin/sh;\n\t\t\tshellScript = \"\\\"${PODS_ROOT}/Fabric/run\\\" 24ecfd2fbad3162671908399854ab3e9ddba0710 fdc29481dd35a8aa6ec132c294cff185a7211174fff8b1803540ff4e64d5b24a\";\n\t\t};\n\t\tC0878BE81AF4A11B002A4F5A /* ShellScript */ = {\n\t\t\tisa = PBXShellScriptBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t);\n\t\t\tinputPaths = (\n\t\t\t);\n\t\t\toutputPaths = (\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t\tshellPath = /bin/sh;\n\t\t\tshellScript = \"FILE=\\\"${SRCROOT}/HockeySDK-iOS/BuildAgent\\\"\\nif [ -f \\\"$FILE\\\" ]; then\\n\\\"$FILE\\\"\\nfi\";\n\t\t};\n/* End PBXShellScriptBuildPhase section */\n\n/* Begin PBXSourcesBuildPhase section */\n\t\tC0A18F8A1ABF51C200BED648 /* Sources */ = {\n\t\t\tisa = PBXSourcesBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t\tC01681AC1DBD9ED8004D5FD7 /* TLColdWallet.swift in Sources */,\n\t\t\t\tC0AE41BB1F788BD700682CDE /* IASKPSSliderSpecifierViewCell.m in Sources */,\n\t\t\t\tC0C1BE781AF92CB500B705C4 /* base64.c in Sources */,\n\t\t\t\tC05F82E81EF5D13E0016F0FC /* SocketEngineSpec.swift in Sources */,\n\t\t\t\tC0A190F81ABF53A100BED648 /* TLSpaghettiGodSend.swift in Sources */,\n\t\t\t\tC0BD70061B4E2C4F00A5788D /* TLStringLocalized.swift in Sources */,\n\t\t\t\tC0A192ED1ABF742D00BED648 /* TLAnalytics.swift in Sources */,\n\t\t\t\tC05F82E41EF5D13E0016F0FC /* SocketEngine.swift in Sources */,\n\t\t\t\tF37072461B8F570D0026505D /* TLWalletConfig.swift in Sources */,\n\t\t\t\tC0D8A36D1DAA16C900497D31 /* TLCreateColdWalletViewController.swift in Sources */,\n\t\t\t\tC0A191251ABF53A100BED648 /* TLMenuViewController.swift in Sources */,\n\t\t\t\tC05F82EA1EF5D13E0016F0FC /* SocketEventHandler.swift in Sources */,\n\t\t\t\tC05C398B1AD0710B00AADE55 /* TLCloudDocumentSyncWrapper.m in Sources */,\n\t\t\t\tC0A190FD1ABF53A100BED648 /* TLWallet.swift in Sources */,\n\t\t\t\tC0A190DB1ABF53A100BED648 /* iToast.m in Sources */,\n\t\t\t\tF338F9561B794D1D00C02F74 /* TLWalletPassphrase.swift in Sources */,\n\t\t\t\tC0E5393D1AD454FD00651FE4 /* TLHelpDoc.swift in Sources */,\n\t\t\t\tC0AE41C01F788BD700682CDE /* IASKTextView.m in Sources */,\n\t\t\t\tC0AE41B51F788BD700682CDE /* IASKSettingsReader.m in Sources */,\n\t\t\t\tC0A190F41ABF53A100BED648 /* TLImportedAddress.swift in Sources */,\n\t\t\t\tC0A1930D1ABF744E00BED648 /* TLExchangeRate.swift in Sources */,\n\t\t\t\tC05F82F31EF5D13E0016F0FC /* SocketParsable.swift in Sources */,\n\t\t\t\tC05F82E31EF5D13E0016F0FC /* SocketClientManager.swift in Sources */,\n\t\t\t\tC0A192F71ABF744300BED648 /* TLMacros.swift in Sources */,\n\t\t\t\tC0A190E41ABF53A100BED648 /* QRCodeEncoderDemoViewController.mm in Sources */,\n\t\t\t\tC0A190E21ABF53A100BED648 /* DataMatrix.mm in Sources */,\n\t\t\t\tC0AE41BF1F788BD700682CDE /* IASKTextField.m in Sources */,\n\t\t\t\tC05F82EB1EF5D13E0016F0FC /* SocketExtensions.swift in Sources */,\n\t\t\t\tC0A190FA1ABF53A100BED648 /* TLStealthWallet.swift in Sources */,\n\t\t\t\tC0C61C5A1AF15BEF00F9F71F /* TransitionDelegate.swift in Sources */,\n\t\t\t\tC0AE41B81F788BD700682CDE /* IASKSettingsStoreUserDefaults.m in Sources */,\n\t\t\t\tC0AE41B71F788BD700682CDE /* IASKSettingsStoreFile.m in Sources */,\n\t\t\t\tC0C3BDEC1AC0F7AA001AC6CD /* TLWallet+Stealth.swift in Sources */,\n\t\t\t\tC0A190F61ABF53A100BED648 /* TLSelectedObject.swift in Sources */,\n\t\t\t\tC0A190FC1ABF53A100BED648 /* TLTxObject.swift in Sources */,\n\t\t\t\tC0A192FD1ABF744300BED648 /* TLPrompts.swift in Sources */,\n\t\t\t\tC0649CA41E256B52007E3965 /* TLAddressTableViewCell.swift in Sources */,\n\t\t\t\tC0A190C31ABF53A100BED648 /* BRTransaction.m in Sources */,\n\t\t\t\tC0A191221ABF53A100BED648 /* TLHistoryViewController.swift in Sources */,\n\t\t\t\tC0D5A6161DD8FA1300849E2C /* TLNewWalletTableViewCell.swift in Sources */,\n\t\t\t\tC0A190FF1ABF53A100BED648 /* TLWalletUtils.swift in Sources */,\n\t\t\t\tC0AE41C11F788BD700682CDE /* IASKTextViewCell.m in Sources */,\n\t\t\t\tC0A1930F1ABF744E00BED648 /* TLNetworking.swift in Sources */,\n\t\t\t\tC05F82F61EF5D13E0016F0FC /* SSLSecurity.swift in Sources */,\n\t\t\t\tC0AE41BC1F788BD700682CDE /* IASKPSTextFieldSpecifierViewCell.m in Sources */,\n\t\t\t\tC0A190FE1ABF53A100BED648 /* TLWalletJson.swift in Sources */,\n\t\t\t\tC0AB0A331AC52A8400B456DB /* TLPushTxAPI.swift in Sources */,\n\t\t\t\tC0AE41B61F788BD700682CDE /* IASKSettingsStore.m in Sources */,\n\t\t\t\tC0D8A36B1DAA126700497D31 /* TLColdWalletViewController.swift in Sources */,\n\t\t\t\tC0A190C41ABF53A100BED648 /* NSData+Bitcoin.m in Sources */,\n\t\t\t\tC0A191201ABF53A100BED648 /* TLRestoreWalletViewController.swift in Sources */,\n\t\t\t\tC0D5A6191DD8FA1300849E2C /* TLScanUnsignedTxTableViewCell.swift in Sources */,\n\t\t\t\tC05F82F21EF5D13E0016F0FC /* SocketPacket.swift in Sources */,\n\t\t\t\tC0AE41B21F788BD700682CDE /* IASKAppSettingsWebViewController.m in Sources */,\n\t\t\t\tC0A190F31ABF53A100BED648 /* TLHDWalletWrapper.swift in Sources */,\n\t\t\t\tC05F82E91EF5D13E0016F0FC /* SocketEngineWebsocket.swift in Sources */,\n\t\t\t\tC0649CA31E256B52007E3965 /* TLAccountTableViewCell.swift in Sources */,\n\t\t\t\tC05F82EC1EF5D13E0016F0FC /* SocketIOClient.swift in Sources */,\n\t\t\t\tC0D5A6141DD8FA1300849E2C /* TLAdvancedNewWalletTableViewCell.swift in Sources */,\n\t\t\t\tC05F82E21EF5D13E0016F0FC /* SocketAnyEvent.swift in Sources */,\n\t\t\t\tC0A1930A1ABF744E00BED648 /* TLBlockchainAPI.swift in Sources */,\n\t\t\t\tC05F82EE1EF5D13E0016F0FC /* SocketIOClientOption.swift in Sources */,\n\t\t\t\tC0A190DC1ABF53A100BED648 /* JNKeychain.m in Sources */,\n\t\t\t\tC0A190E11ABF53A100BED648 /* NSDate-Utilities.m in Sources */,\n\t\t\t\tC0D20A921D5963FF008F70F2 /* TLTxFeeAPI.swift in Sources */,\n\t\t\t\tC0D8A36F1DAA183D00497D31 /* TLAuthorizeColdWalletPaymentViewController.swift in Sources */,\n\t\t\t\tC05F82E01EF5D13E0016F0FC /* SocketAckEmitter.swift in Sources */,\n\t\t\t\tC0A192F81ABF744300BED648 /* TLUtils.swift in Sources */,\n\t\t\t\tC01681A21DB0B1D9004D5FD7 /* TLBrainWalletViewController.swift in Sources */,\n\t\t\t\tC0A190DD1ABF53A100BED648 /* KeychainItemWrapper.m in Sources */,\n\t\t\t\tC0A192FE1ABF744300BED648 /* TLQRImageModal.swift in Sources */,\n\t\t\t\tC0A1911F1ABF53A100BED648 /* TLAddressListViewController.swift in Sources */,\n\t\t\t\tC05F82F71EF5D13E0016F0FC /* WebSocket.swift in Sources */,\n\t\t\t\tC0A1911C1ABF53A100BED648 /* TLAccountsViewController.swift in Sources */,\n\t\t\t\tC0A1911A1ABF53A100BED648 /* UIViewController+Extras.swift in Sources */,\n\t\t\t\tC0A191191ABF53A100BED648 /* UIView+FormScroll.swift in Sources */,\n\t\t\t\tC0A190C51ABF53A100BED648 /* NSData+Hash.m in Sources */,\n\t\t\t\tC0A190C71ABF53A100BED648 /* NSString+Base58.m in Sources */,\n\t\t\t\tC0A1912B1ABF53A100BED648 /* TLSettingsViewController.swift in Sources */,\n\t\t\t\tC0C1BE791AF92CB500B705C4 /* NSData+SRB64Additions.m in Sources */,\n\t\t\t\tC0A1912A1ABF53A100BED648 /* TLSendViewController.swift in Sources */,\n\t\t\t\tC0A1930B1ABF744E00BED648 /* TLBlockExplorerAPI.swift in Sources */,\n\t\t\t\tC0A190F01ABF53A100BED648 /* TLBlockchainStatus.swift in Sources */,\n\t\t\t\tC0A190E01ABF53A100BED648 /* LTHPasscodeViewController.m in Sources */,\n\t\t\t\tC0A190C61ABF53A100BED648 /* NSMutableData+Bitcoin.m in Sources */,\n\t\t\t\tC046DD5F1D6E271000B39580 /* TLReviewPaymentViewController.swift in Sources */,\n\t\t\t\tC0A190F11ABF53A100BED648 /* TLCoin.swift in Sources */,\n\t\t\t\tC0A1911B1ABF53A100BED648 /* UIViewController+Style.swift in Sources */,\n\t\t\t\tF3BC36111B8681FF00CBB3F7 /* TLUpdateAppData.swift in Sources */,\n\t\t\t\tC0AD2C591AC3DE3200FEF982 /* TLBlockrAPI.swift in Sources */,\n\t\t\t\tC0A18F941ABF51C200BED648 /* AppDelegate.swift in Sources */,\n\t\t\t\tC004134A1ACEFAF200505F31 /* TLOperationsManager.swift in Sources */,\n\t\t\t\tC0A190C11ABF53A100BED648 /* BRKey+BIP38.m in Sources */,\n\t\t\t\tC0A191261ABF53A100BED648 /* TLPassPhraseViewController.swift in Sources */,\n\t\t\t\tC0A193091ABF744E00BED648 /* TLBitcoinListener.swift in Sources */,\n\t\t\t\tC0649CA71E256E16007E3965 /* TLDisplayStrings.swift in Sources */,\n\t\t\t\tC05F82EF1EF5D13E0016F0FC /* SocketIOClientSpec.swift in Sources */,\n\t\t\t\tC0A192F91ABF744300BED648 /* TLColors.swift in Sources */,\n\t\t\t\tC05F82ED1EF5D13E0016F0FC /* SocketIOClientConfiguration.swift in Sources */,\n\t\t\t\tC05F82E11EF5D13E0016F0FC /* SocketAckManager.swift in Sources */,\n\t\t\t\tC0A190E31ABF53A100BED648 /* QR_Encode.cpp in Sources */,\n\t\t\t\tC0AE41BD1F788BD700682CDE /* IASKSlider.m in Sources */,\n\t\t\t\tC0A6AD751C42E80F00B8C22B /* TLLinksViewController.swift in Sources */,\n\t\t\t\tC0A190E51ABF53A100BED648 /* QREncoder.mm in Sources */,\n\t\t\t\tC0A191281ABF53A100BED648 /* TLQRCodeScannerViewController.swift in Sources */,\n\t\t\t\tC0A192EC1ABF742D00BED648 /* TLAchievements.swift in Sources */,\n\t\t\t\tC0A191211ABF53A100BED648 /* TLHelpViewController.swift in Sources */,\n\t\t\t\tC0F278C81C41EA1A0013DC1A /* TLCurrencyFormat.swift in Sources */,\n\t\t\t\tC0D5A6151DD8FA1300849E2C /* TLColdWalletSelectWayTableViewCell.swift in Sources */,\n\t\t\t\tC0A190EF1ABF53A100BED648 /* TLAccounts.swift in Sources */,\n\t\t\t\tC0A190F21ABF53A100BED648 /* TLCoreBitcoinWrapper.swift in Sources */,\n\t\t\t\tC0A190EA1ABF53A100BED648 /* UINavigationBar+FixedHeightWhenStatusBarHidden.m in Sources */,\n\t\t\t\tC0A193111ABF744E00BED648 /* TLStealthWebSocket.swift in Sources */,\n\t\t\t\tC05F82E61EF5D13E0016F0FC /* SocketEnginePacketType.swift in Sources */,\n\t\t\t\tC0A1930E1ABF744E00BED648 /* TLInsightAPI.swift in Sources */,\n\t\t\t\tF338F9581B79718900C02F74 /* TLCrypto.swift in Sources */,\n\t\t\t\tC0A191181ABF53A100BED648 /* UINavigationController+StatusBarStyle.swift in Sources */,\n\t\t\t\tC0A190C81ABF53A100BED648 /* CustomIOS7AlertView.m in Sources */,\n\t\t\t\tC0A1912C1ABF53A100BED648 /* TLTextViewViewController.swift in Sources */,\n\t\t\t\tC0A1911D1ABF53A100BED648 /* TLAchievementsViewController.swift in Sources */,\n\t\t\t\tC0A192FA1ABF744300BED648 /* TLHUDWrapper.swift in Sources */,\n\t\t\t\tC0A192EE1ABF742D00BED648 /* TLPreferences.swift in Sources */,\n\t\t\t\tC0C1BE7A1AF92CB500B705C4 /* SRWebSocket.m in Sources */,\n\t\t\t\tC0A191231ABF53A100BED648 /* TLInstructionsViewController.swift in Sources */,\n\t\t\t\tC0A191271ABF53A100BED648 /* TLPreloadViewController.swift in Sources */,\n\t\t\t\tC0A190F91ABF53A100BED648 /* TLStealthAddress.swift in Sources */,\n\t\t\t\tC0AE41B31F788BD700682CDE /* IASKMultipleValueSelection.m in Sources */,\n\t\t\t\tC0A193101ABF744E00BED648 /* TLStealthServerAPI.swift in Sources */,\n\t\t\t\tC0AE41BE1F788BD700682CDE /* IASKSwitch.m in Sources */,\n\t\t\t\tC0B4E7891AFAAEA200DC9B65 /* SRWebSocket+Helpers.m in Sources */,\n\t\t\t\tC0AE41B91F788BD700682CDE /* IASKSpecifier.m in Sources */,\n\t\t\t\tC0A190C21ABF53A100BED648 /* BRKey.m in Sources */,\n\t\t\t\tC0A190EE1ABF53A100BED648 /* TLAccountObject.swift in Sources */,\n\t\t\t\tC05F82F51EF5D13E0016F0FC /* SocketTypes.swift in Sources */,\n\t\t\t\tC0D5A6171DD8FA1300849E2C /* TLInputColdWalletKeyTableViewCell.swift in Sources */,\n\t\t\t\tC0A191241ABF53A100BED648 /* TLManageAccountsViewController.swift in Sources */,\n\t\t\t\tC0A190E91ABF53A100BED648 /* UIAlertConrtoller+Blocks.m in Sources */,\n\t\t\t\tC0A191291ABF53A100BED648 /* TLReceiveViewController.swift in Sources */,\n\t\t\t\tC0C61C5E1AF15E6100F9F71F /* TransparentViewController.swift in Sources */,\n\t\t\t\tC0A192FB1ABF744300BED648 /* TLNotificationEvents.swift in Sources */,\n\t\t\t\tC05F82F11EF5D13E0016F0FC /* SocketLogger.swift in Sources */,\n\t\t\t\tC05F82F41EF5D13E0016F0FC /* SocketStringReader.swift in Sources */,\n\t\t\t\tC0D5A6181DD8FA1300849E2C /* TLPassSignedTxTableViewCell.swift in Sources */,\n\t\t\t\tC05F82E71EF5D13E0016F0FC /* SocketEnginePollable.swift in Sources */,\n\t\t\t\tC0649CA51E256B52007E3965 /* TLTransactionTableViewCell.swift in Sources */,\n\t\t\t\tF3DAAD661BB1D9EC000488F0 /* TLWalletJSONKeys.swift in Sources */,\n\t\t\t\tC05F82E51EF5D13E0016F0FC /* SocketEngineClient.swift in Sources */,\n\t\t\t\tC0AE41B41F788BD700682CDE /* IASKSpecifierValuesViewController.m in Sources */,\n\t\t\t\tC0A1911E1ABF53A100BED648 /* TLAddressBookViewController.swift in Sources */,\n\t\t\t\tC0A190F51ABF53A100BED648 /* TLImportedAddresses.swift in Sources */,\n\t\t\t\tC05F82F01EF5D13E0016F0FC /* SocketIOClientStatus.swift in Sources */,\n\t\t\t\tC0607FCD1AEEB3CD007203F8 /* TLStealthServerConfig.swift in Sources */,\n\t\t\t\tC0AE41B11F788BD700682CDE /* IASKAppSettingsViewController.m in Sources */,\n\t\t\t\tC0A190DF1ABF53A100BED648 /* LTHKeychainUtils.m in Sources */,\n\t\t\t\tC0A190FB1ABF53A100BED648 /* TLSuggestions.swift in Sources */,\n\t\t\t\tC0A190F71ABF53A100BED648 /* TLSendFormData.swift in Sources */,\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n\t\tC0A18F9F1ABF51C200BED648 /* Sources */ = {\n\t\t\tisa = PBXSourcesBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t\tC0A193281ABF82A500BED648 /* TLCoin.swift in Sources */,\n\t\t\t\tC05F830E1EF5D1710016F0FC /* SSLSecurity.swift in Sources */,\n\t\t\t\tC05F82FC1EF5D14B0016F0FC /* SocketEngine.swift in Sources */,\n\t\t\t\tC0A193221ABF829800BED648 /* TLAchievements.swift in Sources */,\n\t\t\t\tC0A1931D1ABF81D100BED648 /* TLWalletJson.swift in Sources */,\n\t\t\t\tC05F82F81EF5D1420016F0FC /* SocketAckEmitter.swift in Sources */,\n\t\t\t\tC0A1931E1ABF81DD00BED648 /* TLMacros.swift in Sources */,\n\t\t\t\tC0A193271ABF82A300BED648 /* TLBlockchainStatus.swift in Sources */,\n\t\t\t\tC0A193201ABF824800BED648 /* TLWalletUtils.swift in Sources */,\n\t\t\t\tC0A193361ABF82EA00BED648 /* TLExchangeRate.swift in Sources */,\n\t\t\t\tC004134B1ACEFCB700505F31 /* TLOperationsManager.swift in Sources */,\n\t\t\t\tC05F830D1EF5D16F0016F0FC /* SocketTypes.swift in Sources */,\n\t\t\t\tC0A193321ABF82E200BED648 /* TLBitcoinListener.swift in Sources */,\n\t\t\t\tC0A1932A1ABF82AC00BED648 /* TLImportedAddresses.swift in Sources */,\n\t\t\t\tC05F83001EF5D1530016F0FC /* SocketEngineSpec.swift in Sources */,\n\t\t\t\tC05F830A1EF5D1680016F0FC /* SocketPacket.swift in Sources */,\n\t\t\t\tC05F82FB1EF5D1490016F0FC /* SocketClientManager.swift in Sources */,\n\t\t\t\tF34D5C601B7A2C0100DF37DC /* TLCrypto.swift in Sources */,\n\t\t\t\tC0A193331ABF82E400BED648 /* TLBlockchainAPI.swift in Sources */,\n\t\t\t\tF3F1651B1BB1DB7F00F1293A /* TLWalletJSONKeys.swift in Sources */,\n\t\t\t\tC03ECBF71B54A104005D4B0F /* TLStringLocalized.swift in Sources */,\n\t\t\t\tC05F83041EF5D15B0016F0FC /* SocketIOClient.swift in Sources */,\n\t\t\t\tC05F830B1EF5D16A0016F0FC /* SocketParsable.swift in Sources */,\n\t\t\t\tC0D20A931D5966AB008F70F2 /* TLTxFeeAPI.swift in Sources */,\n\t\t\t\tC0649CA81E25969D007E3965 /* TLDisplayStrings.swift in Sources */,\n\t\t\t\tC0A1932B1ABF82AF00BED648 /* TLSelectedObject.swift in Sources */,\n\t\t\t\tC05F83071EF5D1620016F0FC /* SocketIOClientSpec.swift in Sources */,\n\t\t\t\tC09D416C1DC9B05200E2D09A /* TLColdWallet.swift in Sources */,\n\t\t\t\tC0A1932D1ABF82B300BED648 /* TLSpaghettiGodSend.swift in Sources */,\n\t\t\t\tC05F83061EF5D15F0016F0FC /* SocketIOClientOption.swift in Sources */,\n\t\t\t\tC0F278C91C41EAF90013DC1A /* TLCurrencyFormat.swift in Sources */,\n\t\t\t\tC05F83011EF5D1550016F0FC /* SocketEngineWebsocket.swift in Sources */,\n\t\t\t\tC0A1933A1ABF82F300BED648 /* TLStealthServerAPI.swift in Sources */,\n\t\t\t\tC0A193251ABF829E00BED648 /* TLAccountObject.swift in Sources */,\n\t\t\t\tC05F83051EF5D15C0016F0FC /* SocketIOClientConfiguration.swift in Sources */,\n\t\t\t\tC0607FCE1AEEB716007203F8 /* TLStealthServerConfig.swift in Sources */,\n\t\t\t\tC0A193301ABF82BB00BED648 /* TLTxObject.swift in Sources */,\n\t\t\t\tC0A193391ABF82F100BED648 /* TLStealthWebSocket.swift in Sources */,\n\t\t\t\tC0E5393E1AD4555C00651FE4 /* TLHelpDoc.swift in Sources */,\n\t\t\t\tC0A1931F1ABF822000BED648 /* TLHDWalletWrapper.swift in Sources */,\n\t\t\t\tC0A18FAA1ABF51C200BED648 /* ArcBitTests.swift in Sources */,\n\t\t\t\tC0A193241ABF829C00BED648 /* TLPreferences.swift in Sources */,\n\t\t\t\tC05F830C1EF5D16D0016F0FC /* SocketStringReader.swift in Sources */,\n\t\t\t\tC0A193381ABF82EF00BED648 /* TLNetworking.swift in Sources */,\n\t\t\t\tC0A1932E1ABF82B700BED648 /* TLStealthWallet.swift in Sources */,\n\t\t\t\tF3BC360F1B8681A300CBB3F7 /* TLWalletPassphrase.swift in Sources */,\n\t\t\t\tF37072481B8F57810026505D /* TLWalletConfig.swift in Sources */,\n\t\t\t\tC05F83091EF5D1660016F0FC /* SocketLogger.swift in Sources */,\n\t\t\t\tC05F82FA1EF5D1470016F0FC /* SocketAnyEvent.swift in Sources */,\n\t\t\t\tC05F830F1EF5D1730016F0FC /* WebSocket.swift in Sources */,\n\t\t\t\tC0C3BDED1AC11BD2001AC6CD /* TLWallet+Stealth.swift in Sources */,\n\t\t\t\tC0A1931C1ABF81CB00BED648 /* TLStealthAddress.swift in Sources */,\n\t\t\t\tC0A1931A1ABF751800BED648 /* BreadWalletTests.m in Sources */,\n\t\t\t\tC05F83021EF5D1570016F0FC /* SocketEventHandler.swift in Sources */,\n\t\t\t\tF3BC36121B8681FF00CBB3F7 /* TLUpdateAppData.swift in Sources */,\n\t\t\t\tC05F82FF1EF5D1500016F0FC /* SocketEnginePollable.swift in Sources */,\n\t\t\t\tC0A193291ABF82AA00BED648 /* TLImportedAddress.swift in Sources */,\n\t\t\t\tC0A193341ABF82E600BED648 /* TLBlockExplorerAPI.swift in Sources */,\n\t\t\t\tC05F82FE1EF5D14E0016F0FC /* SocketEnginePacketType.swift in Sources */,\n\t\t\t\tC05F82F91EF5D1450016F0FC /* SocketAckManager.swift in Sources */,\n\t\t\t\tC0AD2C5A1AC3DED100FEF982 /* TLBlockrAPI.swift in Sources */,\n\t\t\t\tC0A1933E1ABF830000BED648 /* TLNotificationEvents.swift in Sources */,\n\t\t\t\tC0A193311ABF82BD00BED648 /* TLWallet.swift in Sources */,\n\t\t\t\tC0A193261ABF82A100BED648 /* TLAccounts.swift in Sources */,\n\t\t\t\tC05C398C1AD0712B00AADE55 /* TLCloudDocumentSyncWrapper.m in Sources */,\n\t\t\t\tC05F82FD1EF5D14C0016F0FC /* SocketEngineClient.swift in Sources */,\n\t\t\t\tC0A193231ABF829A00BED648 /* TLAnalytics.swift in Sources */,\n\t\t\t\tC05F83081EF5D1640016F0FC /* SocketIOClientStatus.swift in Sources */,\n\t\t\t\tC0A1932F1ABF82B900BED648 /* TLSuggestions.swift in Sources */,\n\t\t\t\tC0A1932C1ABF82B100BED648 /* TLSendFormData.swift in Sources */,\n\t\t\t\tC05F83031EF5D1580016F0FC /* SocketExtensions.swift in Sources */,\n\t\t\t\tC0AD2C5B1AC4DF7700FEF982 /* TLUtils.swift in Sources */,\n\t\t\t\tC0A193211ABF825700BED648 /* TLCoreBitcoinWrapper.swift in Sources */,\n\t\t\t\tC0A193371ABF82EC00BED648 /* TLInsightAPI.swift in Sources */,\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n/* End PBXSourcesBuildPhase section */\n\n/* Begin PBXTargetDependency section */\n\t\tC0A18FA51ABF51C200BED648 /* PBXTargetDependency */ = {\n\t\t\tisa = PBXTargetDependency;\n\t\t\ttarget = C0A18F8D1ABF51C200BED648 /* ArcBit */;\n\t\t\ttargetProxy = C0A18FA41ABF51C200BED648 /* PBXContainerItemProxy */;\n\t\t};\n/* End PBXTargetDependency section */\n\n/* Begin PBXVariantGroup section */\n\t\tC0A18F9C1ABF51C200BED648 /* LaunchScreen.xib */ = {\n\t\t\tisa = PBXVariantGroup;\n\t\t\tchildren = (\n\t\t\t\tC0A18F9D1ABF51C200BED648 /* Base */,\n\t\t\t\tC0920A981FA82DB6008A0745 /* zh-Hant */,\n\t\t\t);\n\t\t\tname = LaunchScreen.xib;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\tC0A1902A1ABF53A100BED648 /* LTHPasscodeViewController.strings */ = {\n\t\t\tisa = PBXVariantGroup;\n\t\t\tchildren = (\n\t\t\t\tC0A1902B1ABF53A100BED648 /* de */,\n\t\t\t\tC0A1902C1ABF53A100BED648 /* en */,\n\t\t\t\tC0A1902D1ABF53A100BED648 /* es */,\n\t\t\t\tC0A1902E1ABF53A100BED648 /* fr */,\n\t\t\t\tC0A1902F1ABF53A100BED648 /* ja */,\n\t\t\t\tC0A190301ABF53A100BED648 /* ro */,\n\t\t\t\tC0A190311ABF53A100BED648 /* ru */,\n\t\t\t\tC0A190321ABF53A100BED648 /* zh-Hans-CN */,\n\t\t\t\tC0920A9A1FA82DB6008A0745 /* zh-Hant */,\n\t\t\t);\n\t\t\tname = LTHPasscodeViewController.strings;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\tC0A192E61ABF707400BED648 /* Main.storyboard */ = {\n\t\t\tisa = PBXVariantGroup;\n\t\t\tchildren = (\n\t\t\t\tC0A192E71ABF707400BED648 /* Base */,\n\t\t\t\tC01A489E1B4F9E6E004D7FA0 /* ru */,\n\t\t\t\tC0920A971FA82DB6008A0745 /* zh-Hant */,\n\t\t\t);\n\t\t\tname = Main.storyboard;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\tC0AE41921F788BD700682CDE /* IASKLocalizable.strings */ = {\n\t\t\tisa = PBXVariantGroup;\n\t\t\tchildren = (\n\t\t\t\tC0AE41931F788BD700682CDE /* Base */,\n\t\t\t\tC0AE41941F788BD700682CDE /* de */,\n\t\t\t\tC0AE41951F788BD700682CDE /* el */,\n\t\t\t\tC0AE41961F788BD700682CDE /* en */,\n\t\t\t\tC0AE41971F788BD700682CDE /* es */,\n\t\t\t\tC0AE41981F788BD700682CDE /* fr */,\n\t\t\t\tC0AE41991F788BD700682CDE /* it */,\n\t\t\t\tC0AE419A1F788BD700682CDE /* ja */,\n\t\t\t\tC0AE419B1F788BD700682CDE /* nl */,\n\t\t\t\tC0AE419C1F788BD700682CDE /* pt-PT */,\n\t\t\t\tC0AE419D1F788BD700682CDE /* pt */,\n\t\t\t\tC0AE419E1F788BD700682CDE /* ru */,\n\t\t\t\tC0AE419F1F788BD700682CDE /* sv */,\n\t\t\t\tC0AE41A01F788BD700682CDE /* th */,\n\t\t\t\tC0AE41A11F788BD700682CDE /* tr */,\n\t\t\t\tC0920A991FA82DB6008A0745 /* zh-Hant */,\n\t\t\t);\n\t\t\tname = IASKLocalizable.strings;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\tC0BD70031B4E2BE300A5788D /* Localizable.strings */ = {\n\t\t\tisa = PBXVariantGroup;\n\t\t\tchildren = (\n\t\t\t\tC0BD70021B4E2BE300A5788D /* Base */,\n\t\t\t\tC0BD70041B4E2BE600A5788D /* ru */,\n\t\t\t\tC0B56BC11F51F30B00E4CA87 /* es */,\n\t\t\t\tC0B56BC21F51F6BC00E4CA87 /* zh-Hans-CN */,\n\t\t\t\tC0920A9B1FA82DB6008A0745 /* zh-Hant */,\n\t\t\t\tC00E61361FB18C65003AD828 /* de */,\n\t\t\t);\n\t\t\tname = Localizable.strings;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n/* End PBXVariantGroup section */\n\n/* Begin XCBuildConfiguration section */\n\t\tC0A18FAB1ABF51C200BED648 /* Debug */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbuildSettings = {\n\t\t\t\tALWAYS_SEARCH_USER_PATHS = NO;\n\t\t\t\tCLANG_CXX_LANGUAGE_STANDARD = \"gnu++0x\";\n\t\t\t\tCLANG_CXX_LIBRARY = \"libc++\";\n\t\t\t\tCLANG_ENABLE_MODULES = YES;\n\t\t\t\tCLANG_ENABLE_OBJC_ARC = YES;\n\t\t\t\tCLANG_WARN_BOOL_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_CONSTANT_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;\n\t\t\t\tCLANG_WARN_EMPTY_BODY = YES;\n\t\t\t\tCLANG_WARN_ENUM_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_INT_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;\n\t\t\t\tCLANG_WARN_UNREACHABLE_CODE = YES;\n\t\t\t\tCLANG_WARN__DUPLICATE_METHOD_MATCH = YES;\n\t\t\t\t\"CODE_SIGN_IDENTITY[sdk=iphoneos*]\" = \"iPhone Developer\";\n\t\t\t\tCOPY_PHASE_STRIP = NO;\n\t\t\t\tENABLE_STRICT_OBJC_MSGSEND = YES;\n\t\t\t\tENABLE_TESTABILITY = YES;\n\t\t\t\tGCC_C_LANGUAGE_STANDARD = gnu99;\n\t\t\t\tGCC_DYNAMIC_NO_PIC = NO;\n\t\t\t\tGCC_OPTIMIZATION_LEVEL = 0;\n\t\t\t\tGCC_PREPROCESSOR_DEFINITIONS = (\n\t\t\t\t\t\"DEBUG=1\",\n\t\t\t\t\t\"$(inherited)\",\n\t\t\t\t);\n\t\t\t\tGCC_SYMBOLS_PRIVATE_EXTERN = NO;\n\t\t\t\tGCC_WARN_64_TO_32_BIT_CONVERSION = YES;\n\t\t\t\tGCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;\n\t\t\t\tGCC_WARN_UNDECLARED_SELECTOR = YES;\n\t\t\t\tGCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;\n\t\t\t\tGCC_WARN_UNUSED_FUNCTION = YES;\n\t\t\t\tGCC_WARN_UNUSED_VARIABLE = YES;\n\t\t\t\tIPHONEOS_DEPLOYMENT_TARGET = 8.2;\n\t\t\t\tMTL_ENABLE_DEBUG_INFO = YES;\n\t\t\t\tONLY_ACTIVE_ARCH = YES;\n\t\t\t\tSDKROOT = iphoneos;\n\t\t\t\tSWIFT_OPTIMIZATION_LEVEL = \"-Onone\";\n\t\t\t};\n\t\t\tname = Debug;\n\t\t};\n\t\tC0A18FAC1ABF51C200BED648 /* Release */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbuildSettings = {\n\t\t\t\tALWAYS_SEARCH_USER_PATHS = NO;\n\t\t\t\tCLANG_CXX_LANGUAGE_STANDARD = \"gnu++0x\";\n\t\t\t\tCLANG_CXX_LIBRARY = \"libc++\";\n\t\t\t\tCLANG_ENABLE_MODULES = YES;\n\t\t\t\tCLANG_ENABLE_OBJC_ARC = YES;\n\t\t\t\tCLANG_WARN_BOOL_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_CONSTANT_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;\n\t\t\t\tCLANG_WARN_EMPTY_BODY = YES;\n\t\t\t\tCLANG_WARN_ENUM_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_INT_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;\n\t\t\t\tCLANG_WARN_UNREACHABLE_CODE = YES;\n\t\t\t\tCLANG_WARN__DUPLICATE_METHOD_MATCH = YES;\n\t\t\t\t\"CODE_SIGN_IDENTITY[sdk=iphoneos*]\" = \"iPhone Developer\";\n\t\t\t\tCOPY_PHASE_STRIP = NO;\n\t\t\t\tENABLE_NS_ASSERTIONS = NO;\n\t\t\t\tENABLE_STRICT_OBJC_MSGSEND = YES;\n\t\t\t\tGCC_C_LANGUAGE_STANDARD = gnu99;\n\t\t\t\tGCC_WARN_64_TO_32_BIT_CONVERSION = YES;\n\t\t\t\tGCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;\n\t\t\t\tGCC_WARN_UNDECLARED_SELECTOR = YES;\n\t\t\t\tGCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;\n\t\t\t\tGCC_WARN_UNUSED_FUNCTION = YES;\n\t\t\t\tGCC_WARN_UNUSED_VARIABLE = YES;\n\t\t\t\tIPHONEOS_DEPLOYMENT_TARGET = 8.2;\n\t\t\t\tMTL_ENABLE_DEBUG_INFO = NO;\n\t\t\t\tSDKROOT = iphoneos;\n\t\t\t\tVALIDATE_PRODUCT = YES;\n\t\t\t};\n\t\t\tname = Release;\n\t\t};\n\t\tC0A18FAE1ABF51C200BED648 /* Debug */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbaseConfigurationReference = C4D7E88E9BE3FC3994E59767 /* Pods-ArcBit.debug.xcconfig */;\n\t\t\tbuildSettings = {\n\t\t\t\tASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;\n\t\t\t\tCODE_SIGN_IDENTITY = \"iPhone Developer\";\n\t\t\t\t\"CODE_SIGN_IDENTITY[sdk=iphoneos*]\" = \"iPhone Developer\";\n\t\t\t\tENABLE_BITCODE = NO;\n\t\t\t\tFRAMEWORK_SEARCH_PATHS = \"$(inherited)\";\n\t\t\t\tINFOPLIST_FILE = ArcBit/Info.plist;\n\t\t\t\tIPHONEOS_DEPLOYMENT_TARGET = 9.0;\n\t\t\t\tLD_RUNPATH_SEARCH_PATHS = \"$(inherited) @executable_path/Frameworks\";\n\t\t\t\tOTHER_SWIFT_FLAGS = \"-D DEBUG\";\n\t\t\t\tPRODUCT_BUNDLE_IDENTIFIER = \"com.$(PRODUCT_NAME:rfc1034identifier).app\";\n\t\t\t\tPRODUCT_NAME = ArcBit;\n\t\t\t\tPROVISIONING_PROFILE = \"\";\n\t\t\t\tSWIFT_OBJC_BRIDGING_HEADER = \"ArcBit/ArcBit-Bridging-Header.h\";\n\t\t\t\tSWIFT_VERSION = 3.0;\n\t\t\t};\n\t\t\tname = Debug;\n\t\t};\n\t\tC0A18FAF1ABF51C200BED648 /* Release */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbaseConfigurationReference = AA36D9E0C4AFE7E2A43F3C79 /* Pods-ArcBit.release.xcconfig */;\n\t\t\tbuildSettings = {\n\t\t\t\tASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;\n\t\t\t\tCODE_SIGN_IDENTITY = \"iPhone Developer\";\n\t\t\t\t\"CODE_SIGN_IDENTITY[sdk=iphoneos*]\" = \"iPhone Developer\";\n\t\t\t\tENABLE_BITCODE = NO;\n\t\t\t\tFRAMEWORK_SEARCH_PATHS = \"$(inherited)\";\n\t\t\t\tINFOPLIST_FILE = ArcBit/Info.plist;\n\t\t\t\tIPHONEOS_DEPLOYMENT_TARGET = 9.0;\n\t\t\t\tLD_RUNPATH_SEARCH_PATHS = \"$(inherited) @executable_path/Frameworks\";\n\t\t\t\tOTHER_SWIFT_FLAGS = \"\";\n\t\t\t\tPRODUCT_BUNDLE_IDENTIFIER = \"com.$(PRODUCT_NAME:rfc1034identifier).app\";\n\t\t\t\tPRODUCT_NAME = ArcBit;\n\t\t\t\tPROVISIONING_PROFILE = \"\";\n\t\t\t\tSWIFT_OBJC_BRIDGING_HEADER = \"ArcBit/ArcBit-Bridging-Header.h\";\n\t\t\t\tSWIFT_VERSION = 3.0;\n\t\t\t};\n\t\t\tname = Release;\n\t\t};\n\t\tC0A18FB11ABF51C200BED648 /* Debug */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbaseConfigurationReference = 3C7ACA9C0834D6AF891F762C /* Pods-ArcBitTests.debug.xcconfig */;\n\t\t\tbuildSettings = {\n\t\t\t\tBUNDLE_LOADER = \"$(TEST_HOST)\";\n\t\t\t\tCLANG_ENABLE_MODULES = YES;\n\t\t\t\tFRAMEWORK_SEARCH_PATHS = (\n\t\t\t\t\t\"$(SDKROOT)/Developer/Library/Frameworks\",\n\t\t\t\t\t\"$(inherited)\",\n\t\t\t\t);\n\t\t\t\tGCC_PREPROCESSOR_DEFINITIONS = (\n\t\t\t\t\t\"DEBUG=1\",\n\t\t\t\t\t\"$(inherited)\",\n\t\t\t\t);\n\t\t\t\tINFOPLIST_FILE = ArcBitTests/Info.plist;\n\t\t\t\tLD_RUNPATH_SEARCH_PATHS = \"$(inherited) @executable_path/Frameworks @loader_path/Frameworks\";\n\t\t\t\tPRODUCT_BUNDLE_IDENTIFIER = \"ArcBit.$(PRODUCT_NAME:rfc1034identifier)\";\n\t\t\t\tPRODUCT_NAME = ArcBitTests;\n\t\t\t\tSWIFT_OBJC_BRIDGING_HEADER = \"ArcBitTests/ArcBitTests-Bridging-Header.h\";\n\t\t\t\tSWIFT_OPTIMIZATION_LEVEL = \"-Onone\";\n\t\t\t\tSWIFT_VERSION = 3.0;\n\t\t\t\tTEST_HOST = \"$(BUILT_PRODUCTS_DIR)/ArcBit.app/ArcBit\";\n\t\t\t};\n\t\t\tname = Debug;\n\t\t};\n\t\tC0A18FB21ABF51C200BED648 /* Release */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbaseConfigurationReference = 173E65BB79838FECABC37B10 /* Pods-ArcBitTests.release.xcconfig */;\n\t\t\tbuildSettings = {\n\t\t\t\tBUNDLE_LOADER = \"$(TEST_HOST)\";\n\t\t\t\tCLANG_ENABLE_MODULES = YES;\n\t\t\t\tFRAMEWORK_SEARCH_PATHS = (\n\t\t\t\t\t\"$(SDKROOT)/Developer/Library/Frameworks\",\n\t\t\t\t\t\"$(inherited)\",\n\t\t\t\t);\n\t\t\t\tINFOPLIST_FILE = ArcBitTests/Info.plist;\n\t\t\t\tLD_RUNPATH_SEARCH_PATHS = \"$(inherited) @executable_path/Frameworks @loader_path/Frameworks\";\n\t\t\t\tPRODUCT_BUNDLE_IDENTIFIER = \"ArcBit.$(PRODUCT_NAME:rfc1034identifier)\";\n\t\t\t\tPRODUCT_NAME = ArcBitTests;\n\t\t\t\tSWIFT_OBJC_BRIDGING_HEADER = \"ArcBitTests/ArcBitTests-Bridging-Header.h\";\n\t\t\t\tSWIFT_VERSION = 3.0;\n\t\t\t\tTEST_HOST = \"$(BUILT_PRODUCTS_DIR)/ArcBit.app/ArcBit\";\n\t\t\t};\n\t\t\tname = Release;\n\t\t};\n/* End XCBuildConfiguration section */\n\n/* Begin XCConfigurationList section */\n\t\tC0A18F891ABF51C200BED648 /* Build configuration list for PBXProject \"ArcBit\" */ = {\n\t\t\tisa = XCConfigurationList;\n\t\t\tbuildConfigurations = (\n\t\t\t\tC0A18FAB1ABF51C200BED648 /* Debug */,\n\t\t\t\tC0A18FAC1ABF51C200BED648 /* Release */,\n\t\t\t);\n\t\t\tdefaultConfigurationIsVisible = 0;\n\t\t\tdefaultConfigurationName = Release;\n\t\t};\n\t\tC0A18FAD1ABF51C200BED648 /* Build configuration list for PBXNativeTarget \"ArcBit\" */ = {\n\t\t\tisa = XCConfigurationList;\n\t\t\tbuildConfigurations = (\n\t\t\t\tC0A18FAE1ABF51C200BED648 /* Debug */,\n\t\t\t\tC0A18FAF1ABF51C200BED648 /* Release */,\n\t\t\t);\n\t\t\tdefaultConfigurationIsVisible = 0;\n\t\t\tdefaultConfigurationName = Release;\n\t\t};\n\t\tC0A18FB01ABF51C200BED648 /* Build configuration list for PBXNativeTarget \"ArcBitTests\" */ = {\n\t\t\tisa = XCConfigurationList;\n\t\t\tbuildConfigurations = (\n\t\t\t\tC0A18FB11ABF51C200BED648 /* Debug */,\n\t\t\t\tC0A18FB21ABF51C200BED648 /* Release */,\n\t\t\t);\n\t\t\tdefaultConfigurationIsVisible = 0;\n\t\t\tdefaultConfigurationName = Release;\n\t\t};\n/* End XCConfigurationList section */\n\t};\n\trootObject = C0A18F861ABF51C200BED648 /* Project object */;\n}\n"
  },
  {
    "path": "ArcBit.xcodeproj/project.xcworkspace/contents.xcworkspacedata",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Workspace\n   version = \"1.0\">\n   <FileRef\n      location = \"self:ArcBit.xcodeproj\">\n   </FileRef>\n</Workspace>\n"
  },
  {
    "path": "ArcBit.xcworkspace/contents.xcworkspacedata",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Workspace\n   version = \"1.0\">\n   <FileRef\n      location = \"group:ArcBit.xcodeproj\">\n   </FileRef>\n   <FileRef\n      location = \"group:Pods/Pods.xcodeproj\">\n   </FileRef>\n</Workspace>\n"
  },
  {
    "path": "ArcBitTests/ArcBitTests-Bridging-Header.h",
    "content": "//\n//  Use this file to import your target's public headers that you would like to expose to Swift.\n//\n\n//\n//  Use this file to import your target's public headers that you would like to expose to Swift.\n//\n\n#import <CoreBitcoin/BTCAddress.h>\n#import <CoreBitcoin/BTCBase58.h>\n#import <CoreBitcoin/BTCBigNumber.h>\n#import <CoreBitcoin/BTCBlock.h>\n#import <CoreBitcoin/BTCBlockchainInfo.h>\n#import <CoreBitcoin/BTCBlockHeader.h>\n#import <CoreBitcoin/BTCCurvePoint.h>\n#import <CoreBitcoin/BTCData.h>\n#import <CoreBitcoin/BTCErrors.h>\n#import <CoreBitcoin/BTCKey.h>\n#import <CoreBitcoin/BTCKeychain.h>\n#import <CoreBitcoin/BTCMnemonic.h>\n#import <CoreBitcoin/BTCBlindSignature.h>\n#import <CoreBitcoin/BTCOpcode.h>\n#import <CoreBitcoin/BTCProtocolSerialization.h>\n#import <CoreBitcoin/BTCScript.h>\n#import <CoreBitcoin/BTCScriptMachine.h>\n#import <CoreBitcoin/BTCSignatureHashType.h>\n#import <CoreBitcoin/BTCTransaction.h>\n#import <CoreBitcoin/BTCTransactionInput.h>\n#import <CoreBitcoin/BTCTransactionOutput.h>\n#import <CoreBitcoin/BTCOutpoint.h>\n#import <CoreBitcoin/BTCUnitsAndLimits.h>\n#import <CoreBitcoin/NSData+BTCData.h>\n#import <CoreBitcoin/BTCKeychain.h>\n#import <CoreBitcoin/BTCData.h>\n#import <CoreBitcoin/BTCBase58.h>\n#import <CoreBitcoin/BTCKey.h>\n#import <CoreBitcoin/BTCAddress.h>\n#import \"NSMutableData+Bitcoin.h\"\n#import <SwiftTryCatch.h>\n#import \"UIAlertController+Blocks.h\"\n#import <BTCBigNumber.h>\n#import \"JNKeyChain.h\"\n#import \"MBProgressHUD.h\"\n#import <iCloud.h>\n#import \"RNCryptor/RNCryptor.h\"\n#import \"BRKey.h\"\n#import \"BRKey+BIP38.h\"\n#import \"NSString+Base58.h\"\n#import <CoreBitcoin/BTCBitcoinURL.h>\n#import \"BRTransaction.h\"\n#import \"NSData+Hash.h\"\n#import \"QREncoder.h\"\n#import \"RNEncryptor.h\"\n#import \"RNDecryptor.h\"\n#import \"NSDate-Utilities.h\"\n#import \"RNCryptor.h\"\n#import \"iToast.h\"\n#import \"AFNetworking.h\"\n#import \"SRWebSocket.h\"\n#import \"SRWebSocket+Helpers.h\"\n//#import \"SIOSocket.h\"\n#import \"CustomIOS7AlertView.h\"\n#import \"ECSlidingConstants.h\"\n#import \"IASKAppSettingsViewController.h\"\n#import \"IASKSettingsReader.h\"\n#import \"LTHPasscodeViewController.h\"\n"
  },
  {
    "path": "ArcBitTests/ArcBitTests.swift",
    "content": "//\n//  ArcBitTests.swift\n//  ArcBitTests\n//\n//  Created by Tim Lee on 3/22/15.\n//  Copyright (c) 2015 ArcBit. All rights reserved.\n//\n\nimport UIKit\nimport XCTest\n\nclass ArcBitTests: XCTestCase {\n    \n    override func setUp() {\n        super.setUp()\n        // Put setup code here. This method is called before the invocation of each test method in the class.\n    }\n    \n    override func tearDown() {\n        // Put teardown code here. This method is called after the invocation of each test method in the class.\n        super.tearDown()\n    }\n    \n    func testExample() {\n        // This is an example of a functional test case.\n        XCTAssert(true, \"Pass\")\n    }\n    \n    func testPerformanceExample() {\n        // This is an example of a performance test case.\n        self.measure() {\n            // Put the code you want to measure the time of here.\n        }\n    }\n    \n    func testSignature() {\n        let privKey = \"4e422fb1e5e1db6c1f6ab32a7706d368ceb385e7fab098e633c5c5949c3b97cd\"\n        let challenge = \"0000000000000000104424c7eda87ebd4a690b9efa09abc0ec23f2ae4c64cc4e\"\n        let key = BTCKey(privateKey: BTCDataFromHex(privKey))\n        let signature = key?.signature(forMessage: challenge)\n        NSLog(\"signature: %@\", signature!.base64EncodedString(options: NSData.Base64EncodingOptions.lineLength64Characters))\n        XCTAssertTrue((key?.isValidSignature(signature, forMessage: challenge))!, \"\")\n    }\n    func testStealthAddress() {\n        let expectedStealthAddress = \"vJmujDzf2PyDEcLQEQWyzVNthLpRAXqTi3ZencThu2WCzrRNi64eFYJP6ZyPWj53hSZBKTcUAk8J5Mb8rZC4wvGn77Sj4Z3yP7zE69\"\n        let expectedScanPublicKey = \"02a13daf6cc5ad7a1adcae59ff348a005247aa9e84453770d0e0ee96b894f8bbb1\"\n        let scanPrivateKey = \"d63e1ca7e79bafd8fdc7e568c6b3fcf8a287ad328e80376e6582af2e69943eca\"\n        let expectedSpendPublicKey = \"02c55695f16cd320fef70ff6f46601cdeed655d9198d555a533382fb81a8f6eab5\"\n        let spendPrivateKey = \"c4054001795dd20c740d5d1389e080b424a9ff2ec9503aa3182369f4b71f00ac\"\n        let ephemeralPublicKey = \"02d53b53c3cb7d6e8f4925e404ce40ec9edd81b0b03d49da950deb3c2240ca519a\"\n        let ephemeralPrivateKey = \"dc406d598685e3400a7eff2d952d47f999de9f69d5ff1295302ad7314a2cf979\"\n        let paymentAddressPublicKey = \"02da20a21ac1332edd5352306104f7a751b45e52bf4a41d4c350ccb890301d80e6\"\n        let paymentAddressPrivateKey = \"775c912899b27ee8a1f944c0e2ac90e095f63893d39c3d66d0dd0a854b799eb5\"\n        \n        let isTestNet = false\n        \n        let stealthAddress = TLStealthAddress.createStealthAddress(expectedScanPublicKey as NSString, spendPublicKey:expectedSpendPublicKey as NSString, isTestnet:isTestNet)\n        NSLog(\"stealthAddress: %@\", stealthAddress)\n        XCTAssertTrue(stealthAddress == expectedStealthAddress)\n        \n        \n        let publicKeys = TLStealthAddress.getScanPublicKeyAndSpendPublicKey(stealthAddress, isTestnet:isTestNet)\n        let scanPublicKey = publicKeys.0\n        let spendPublicKey = publicKeys.1\n        XCTAssertTrue(scanPublicKey == expectedScanPublicKey, \"scanPublicKey != scanPublicKey\")\n        XCTAssertTrue(spendPublicKey == expectedSpendPublicKey, \"spendPublicKey != spendPublicKey\")\n        \n        let nonce:UInt32 = 0xdeadbeef\n        \n        let stealthDataScriptAndPaymentAddress = TLStealthAddress.createDataScriptAndPaymentAddress(stealthAddress,\n            ephemeralPrivateKey:ephemeralPrivateKey, nonce:nonce, isTestnet:isTestNet)\n        let expectedStealthDataScript = String(format:\"%02x%02x%02x%x%@\",\n            BTCOpcode.OP_RETURN.rawValue,\n            TLStealthAddress.getStealthAddressMsgSize(),\n            TLStealthAddress.getStealthAddressTransacionVersion(),\n            nonce,\n            ephemeralPublicKey)\n        \n        XCTAssertTrue(stealthDataScriptAndPaymentAddress.0 == expectedStealthDataScript)\n        \n        let key = BTCKey(publicKey:paymentAddressPublicKey.hexToData())\n        let paymentAddress = key?.address.base58String\n        XCTAssertTrue(stealthDataScriptAndPaymentAddress.1 == paymentAddress)\n        \n        NSLog(\"stealthDataScript: %@\", stealthDataScriptAndPaymentAddress.0)\n        NSLog(\"paymentAddress: %@\", stealthDataScriptAndPaymentAddress.1)\n        \n        let stealthDataScript = stealthDataScriptAndPaymentAddress.0\n        let publicKey = TLStealthAddress.getPaymentAddressPublicKeyFromScript(stealthDataScript, scanPrivateKey:scanPrivateKey, spendPublicKey:spendPublicKey)\n        \n        XCTAssertTrue(publicKey == paymentAddressPublicKey)\n        \n        let secret = TLStealthAddress.getPaymentAddressPrivateKeySecretFromScript(stealthDataScript, scanPrivateKey:scanPrivateKey, spendPrivateKey:spendPrivateKey)\n        XCTAssertTrue(secret == paymentAddressPrivateKey)\n        \n        XCTAssertTrue(TLStealthAddress.isStealthAddress(expectedStealthAddress, isTestnet:false))\n        XCTAssertTrue(!TLStealthAddress.isStealthAddress(expectedStealthAddress, isTestnet:true))\n    }\n    \n    func testStealthAddress2() {\n        let addr = \"vJmujDzf2PyDEcLQEQWyzVNthLpRAXqTi3ZencThu2WCzrRNi64eFYJP6ZyPWj53hSZBKTcUAk8J5Mb8rZC4wvGn77Sj4Z3yP7zE69\"\n        let scanPublicKey = \"02a13daf6cc5ad7a1adcae59ff348a005247aa9e84453770d0e0ee96b894f8bbb1\"\n        let scanPrivateKey = \"d63e1ca7e79bafd8fdc7e568c6b3fcf8a287ad328e80376e6582af2e69943eca\"\n        let spendPublicKey = \"02c55695f16cd320fef70ff6f46601cdeed655d9198d555a533382fb81a8f6eab5\"\n        let spendPrivateKey = \"c4054001795dd20c740d5d1389e080b424a9ff2ec9503aa3182369f4b71f00ac\"\n        let ephemeralPublicKey = \"02d53b53c3cb7d6e8f4925e404ce40ec9edd81b0b03d49da950deb3c2240ca519a\"\n        let ephemeralPrivateKey = \"dc406d598685e3400a7eff2d952d47f999de9f69d5ff1295302ad7314a2cf979\"\n        let paymentAddressPublicKey = \"02da20a21ac1332edd5352306104f7a751b45e52bf4a41d4c350ccb890301d80e6\"\n        let paymentAddressPrivateKey = \"775c912899b27ee8a1f944c0e2ac90e095f63893d39c3d66d0dd0a854b799eb5\"\n        \n        let stealthDataScript = \"6a2606deadbeef02d53b53c3cb7d6e8f4925e404ce40ec9edd81b0b03d49da950deb3c2240ca519a\"\n        let publicKey = TLStealthAddress.getPaymentAddressPublicKeyFromScript(stealthDataScript, scanPrivateKey: scanPrivateKey, spendPublicKey: spendPublicKey)\n        XCTAssertTrue(publicKey == paymentAddressPublicKey)\n        NSLog(\"publicKey: %@\", publicKey!)\n        var key = BTCKey(publicKey:publicKey!.hexToData())\n        NSLog(\"address: %@\", key!.address.base58String)\n        XCTAssertTrue(key?.address.base58String == \"1C6gQ79qKKG21AGCA9USKYWPvu6LzoPH5h\")\n        \n        let secret = TLStealthAddress.getPaymentAddressPrivateKeySecretFromScript(stealthDataScript, scanPrivateKey:scanPrivateKey, spendPrivateKey:spendPrivateKey)\n        NSLog(\"secret: %@\", secret!)\n        key = BTCKey(privateKey: BTCDataFromHex(secret))\n        key?.isPublicKeyCompressed = true\n        \n        NSLog(\"address: %@\", key!.address.base58String)\n        \n        XCTAssertTrue(secret == paymentAddressPrivateKey)\n        XCTAssertTrue(key?.address.base58String == \"1C6gQ79qKKG21AGCA9USKYWPvu6LzoPH5h\")\n        \n        let nonce:UInt32 = 0xdeadbeef\n        let stealthDataScriptAndPaymentAddress = TLStealthAddress.createDataScriptAndPaymentAddress(addr,\n            ephemeralPrivateKey: ephemeralPrivateKey, nonce: nonce, isTestnet: false)\n        NSLog(\"stealthDataScript: %@\", stealthDataScriptAndPaymentAddress.0)\n        NSLog(\"paymentAddress: %@\", stealthDataScriptAndPaymentAddress.1)\n    }\n    \n    func testEncryptionAndDecryption() {\n        NSLog(\"testEncryptionAndDecryption\")\n        \n        var plainText = \"test\"\n        let pbk = UInt32(2000)\n        var cipherText = TLCrypto.encrypt(plainText, password:\"pass\", PBKDF2Iterations:pbk)\n        var decryptedText = TLCrypto.decrypt(cipherText, password:\"pass\", PBKDF2Iterations:pbk)\n        \n        NSLog(\"decryptedText: %@\", decryptedText!)\n        XCTAssert(plainText == decryptedText)\n        \n        \n        plainText = \"test\"\n        cipherText = TLCrypto.encrypt(\"test\", password:\"pass\")\n        decryptedText = TLCrypto.decrypt(cipherText, password:\"pass\")\n        XCTAssert(plainText == decryptedText)\n        \n        \n        plainText = \"test\"\n        cipherText = TLCrypto.encrypt(\"test\", password:\"pass1\", PBKDF2Iterations:pbk)\n        decryptedText = TLCrypto.decrypt(cipherText, password:\"pass2\", PBKDF2Iterations:pbk)\n        XCTAssert(decryptedText == nil)\n        \n        plainText = \"test\"\n        cipherText = TLCrypto.encrypt(\"test\", password:\"pass\", PBKDF2Iterations:pbk)\n        decryptedText = TLCrypto.decrypt(cipherText, password:\"pass\", PBKDF2Iterations:UInt32(1000))\n        XCTAssert(true)\n    }\n    \n    func testHDWallet() {\n        NSLog(\"testHDWallet\")\n        XCTAssertTrue(TLHDWalletWrapper.isValidExtendedPrivateKey(\"xprv9s21ZrQH143K31xYSDQpPDxsXRTUcvj2iNHm5NUtrGiGG5e2DtALGdso3pGz6ssrdK4PFmM8NSpSBHNqPqm55Qn3LqFtT2emdEXVYsCzC2U\"))\n        XCTAssertTrue(!TLHDWalletWrapper.isValidExtendedPrivateKey(\"xpub661MyMwAqRbcFW31YEwpkMuc5THy2PSt5bDMsktWQcFF8syAmRUapSCGu8ED9W6oDMSgv6Zz8idoc4a6mr8BDzTJY47LJhkJ8UB7WEGuduB\"))\n        XCTAssertTrue(TLHDWalletWrapper.isValidExtendedPublicKey(\"xpub661MyMwAqRbcFW31YEwpkMuc5THy2PSt5bDMsktWQcFF8syAmRUapSCGu8ED9W6oDMSgv6Zz8idoc4a6mr8BDzTJY47LJhkJ8UB7WEGuduB\"))\n        XCTAssertTrue(!TLHDWalletWrapper.isValidExtendedPublicKey(\"xprv9s21ZrQH143K31xYSDQpPDxsXRTUcvj2iNHm5NUtrGiGG5e2DtALGdso3pGz6ssrdK4PFmM8NSpSBHNqPqm55Qn3LqFtT2emdEXVYsCzC2U\"))\n        \n        XCTAssertTrue(!TLHDWalletWrapper.isValidExtendedPrivateKey(\"I'm sorry, Dave. I'm afraid I can't do that\"))\n        XCTAssertTrue(!TLHDWalletWrapper.isValidExtendedPublicKey(\"I'm sorry, Dave. I'm afraid I can't do that\"))\n        \n        XCTAssertTrue(!TLHDWalletWrapper.phraseIsValid(\"report age service frame aspect worry nature toward vendor jungle grit grit\"))\n        \n        let backupPassphrase = \"slogan lottery zone helmet fatigue rebuild solve best hint frown conduct ill\"\n        let masterHex = TLHDWalletWrapper.getMasterHex(backupPassphrase)\n        \n        XCTAssertTrue(TLHDWalletWrapper.phraseIsValid(backupPassphrase))\n        NSLog(\"masterHex: %@\", masterHex)\n        XCTAssertTrue(masterHex == \"ae3ff5936bf70293eda11b5ea5ee9585fe9b22c9a80b610ee37251a22120e970c75a18bbd95219a0348c7dee40eeb44a4d2480900be8f931d0cf85203f9d94ce\")\n        \n        \n        let extendPrivKey = TLHDWalletWrapper.getExtendPrivKey(masterHex, accountIdx:0)\n        NSLog(\"extendPrivKey: %@\", extendPrivKey)\n        XCTAssertTrue(\"xprv9z2LgaTwJsrjcHqwG9ZFManHWbiUQqwSMYdMvDN4Pr8i7sVf3x8Us9JSQ8FFCT8f7wBDzEVEhTFX3wJdNx2pchEZJ2HNTa4U7NKgM9uWoK6\" == extendPrivKey)\n        \n        \n        let extendPubKey = TLHDWalletWrapper.getExtendPubKey(extendPrivKey)\n        NSLog(\"extendPubKey: %@\", extendPubKey)\n        XCTAssertTrue(\"xpub6D1h65zq9FR2pmvQNB6Fiij24dYxpJfHimYxibmfxBfgzfpobVSjQwcvFPr7pTATRisprc2YwYYWiysUEvJ1u9iuAQKMNsiLn2PPSrtVFt6\" == extendPubKey)\n        \n        \n        let walletConfig = TLWalletConfig(isTestnet: false)\n        let mainAddressIndex0 = [0,0]\n        let mainAddress0 = TLHDWalletWrapper.getAddress(extendPubKey, sequence:mainAddressIndex0 as NSArray, isTestnet:walletConfig.isTestnet)\n        NSLog(\"mainAddress0: %@\", mainAddress0)\n        XCTAssertTrue(\"1K7fXZeeQydcUvbsfvkMSQmiacV5sKRYQz\" == mainAddress0)\n        TLHDWalletWrapper.getPrivateKey(extendPrivKey as NSString, sequence:mainAddressIndex0 as NSArray, isTestnet:walletConfig.isTestnet)\n        let mainPrivKey0 = TLHDWalletWrapper.getPrivateKey(extendPrivKey as NSString, sequence:mainAddressIndex0 as NSArray, isTestnet:walletConfig.isTestnet)\n        NSLog(\"mainPrivKey0: %@\", mainPrivKey0)\n        XCTAssertTrue(\"KwJhkmrjjg3AEX5gvccNAHCDcXnQLwzyZshnp5yK7vXz1mHKqDDq\" == mainPrivKey0)\n        \n        let mainAddressIndex1 = [0,1]\n        let mainAddress1 = TLHDWalletWrapper.getAddress(extendPubKey, sequence:mainAddressIndex1 as NSArray, isTestnet:walletConfig.isTestnet)\n        NSLog(\"mainAddress1: %@\", mainAddress1)\n        XCTAssertTrue(\"12eQLjACXw6XwfGF9kqBwy9U7Se8qGoBuq\" == mainAddress1)\n        TLHDWalletWrapper.getPrivateKey(extendPrivKey as NSString, sequence:mainAddressIndex0 as NSArray, isTestnet:walletConfig.isTestnet)\n        let mainPrivKey1 = TLHDWalletWrapper.getPrivateKey(extendPrivKey as NSString, sequence:mainAddressIndex1 as NSArray, isTestnet:walletConfig.isTestnet)\n        NSLog(\"mainPrivKey1: %@\", mainPrivKey1)\n        XCTAssertTrue(\"KwpCsb3wBGk7E1M9EXcZWZhRoKBoZLNc63RsSP4YspUR53Ndefyr\" == mainPrivKey1)\n        \n        \n        let changeAddressIndex0 = [1,0]\n        let changeAddress0 = TLHDWalletWrapper.getAddress(extendPubKey, sequence:changeAddressIndex0 as NSArray, isTestnet:walletConfig.isTestnet)\n        NSLog(\"changeAddress0: %@\", changeAddress0)\n        XCTAssertTrue(\"1CvpGn9VxVY1nsWWL3MSWRYaBHdNkCDbmv\" == changeAddress0)\n        TLHDWalletWrapper.getPrivateKey(extendPrivKey as NSString, sequence:changeAddressIndex0 as NSArray, isTestnet:walletConfig.isTestnet)\n        let changePrivKey0 = TLHDWalletWrapper.getPrivateKey(extendPrivKey as NSString, sequence:changeAddressIndex0 as NSArray, isTestnet:walletConfig.isTestnet)\n        NSLog(\"changePrivKey0: %@\", changePrivKey0)\n        XCTAssertTrue(\"L33guNrQHMXdpFd9jpjo2mQzddwLUgUrNzK3KqAM83D9ZU1H5NDN\" == changePrivKey0)\n        \n        let changeAddressIndex1 = [1,1]\n        let changeAddress1 = TLHDWalletWrapper.getAddress(extendPubKey, sequence:changeAddressIndex1 as NSArray, isTestnet:walletConfig.isTestnet)\n        NSLog(\"changeAddress1: %@\", changeAddress1)\n        XCTAssertTrue(\"17vnH8d1fBbjX7GZx727X2Y6dheaid2NUR\" == changeAddress1)\n        TLHDWalletWrapper.getPrivateKey(extendPrivKey as NSString, sequence:changeAddressIndex1 as NSArray, isTestnet:walletConfig.isTestnet)\n        let changePrivKey1 = TLHDWalletWrapper.getPrivateKey(extendPrivKey as NSString, sequence:changeAddressIndex1 as NSArray, isTestnet:walletConfig.isTestnet)\n        NSLog(\"changePrivKey1: %@\", changePrivKey1)\n        XCTAssertTrue(\"KwiMiFtWv1PXNN3zV67TC59tWJxPbeagMJU1SSr3uLssAC82UKhf\" == changePrivKey1)\n    }\n    \n    func testUtils() {\n        NSLog(\"testUtils\")\n        \n        let txid = \"2c441ba4920f03f37866edb5647f2626b64f57ad98b0a8e011af07da0aefcec3\"\n        \n        let txHash = TLWalletUtils.reverseHexString(txid)\n        NSLog(\"txHash: %@\", txHash)\n        XCTAssertTrue(txHash == \"c3ceef0ada07af11e0a8b098ad574fb626267f64b5ed6678f3030f92a41b442c\")\n        \n        let address = TLCoreBitcoinWrapper.getAddressFromOutputScript(\"76a9147ab89f9fae3f8043dcee5f7b5467a0f0a6e2f7e188ac\", isTestnet: false)\n        NSLog(\"address: %@\", address!)\n        XCTAssertTrue(address == \"1CBtcGivXmHQ8ZqdPgeMfcpQNJrqTrSAcG\")\n    }\n    \n    func testCreateSignedSerializeTransactionHex() {\n        NSLog(\"testCreateSignedSerializeTransactionHex\")\n        \n        let hash = TLWalletUtils.hexStringToData(TLWalletUtils.reverseHexString(\"935c6975aa65f95cb55616ace8c8bede83b010f7191c0a6d385be1c95992870d\"))!\n        let script = TLWalletUtils.hexStringToData(\"76a9149a1c78a507689f6f54b847ad1cef1e614ee23f1e88ac\")!\n        let address = \"1F3sAm6ZtwLAUnj7d38pGFxtP3RVEvtsbV\"\n        let privateKey = \"L4rK1yDtCWekvXuE6oXD9jCYfFNV2cWRpVuPLBcCU2z8TrisoyY1\"\n        let txHexAndTxHash = TLCoreBitcoinWrapper.createSignedSerializedTransactionHex([hash], inputIndexes:[0], inputScripts:[script],\n            outputAddresses:[address], outputAmounts:[2500000], privateKeys:[privateKey], outputScripts:nil, isTestnet: false)!\n        \n        let txHex = txHexAndTxHash.object(forKey: \"txHex\") as! String\n        let txHash = txHexAndTxHash.object(forKey: \"txHash\") as! String\n        let txSize = txHexAndTxHash.object(forKey: \"txSize\") as! NSNumber\n\n        NSLog(\"txHash: %@\", txHash)\n        NSLog(\"txHex: %@\", txHex)\n        NSLog(\"txSize: %@\", txSize)\n\n        XCTAssertTrue(\"121d274734c83488e2bd6a2a3a136823d6099bf5a3517f78931c3ed0b9a2c619\" == txHash)\n        XCTAssertTrue(\"01000000010d879259c9e15b386d0a1c19f710b083debec8e8ac1656b55cf965aa75695c93000000006b4830450221009ceebee12f7a6321e39e83a0d0f8ba3db33271439e98addbc2c8518e9dd4d4ab022061965b500a9b1dd154545df086c3cc44661265841c82a4db20c44304711f1a0a012103a34b99f22c790c4e36b2b3c2c35a36db06226e41c692fc82b8b56ac1c540c5bdffffffff01a0252600000000001976a9149a1c78a507689f6f54b847ad1cef1e614ee23f1e88ac00000000\" == txHex)\n        XCTAssertTrue(txSize.uintValue == 193)\n    }\n    \n    func testCreateSignedSerializedTransactionHexAndBIP69() {\n        NSLog(\"testCreateSignedSerializedTransactionHexAndBIP69\")\n        \n        var mockWalletPayload = NSMutableDictionary()\n        mockWalletPayload.setObject(\"1\", forKey: \"version\" as NSCopying)\n        var wallets = NSMutableArray()\n        var wallet = NSMutableDictionary()\n        \n        var imports = NSMutableDictionary()\n        imports.setObject(NSMutableArray(), forKey: \"imported_accounts\" as NSCopying)\n        imports.setObject(NSMutableArray(), forKey: \"imported_private_keys\" as NSCopying)\n        imports.setObject(NSMutableArray(), forKey: \"watch_only_accounts\" as NSCopying)\n        imports.setObject(NSMutableArray(), forKey: \"watch_only_addresses\" as NSCopying)\n        \n        var backupPassphrase = \"slogan lottery zone helmet fatigue rebuild solve best hint frown conduct ill\"\n        let masterHex = TLHDWalletWrapper.getMasterHex(backupPassphrase)\n        let walletConfig = TLWalletConfig(isTestnet: false)\n        \n        let extendPrivKey = TLHDWalletWrapper.getExtendPrivKey(masterHex, accountIdx:0)\n        \n        let extendPubKey = TLHDWalletWrapper.getExtendPubKey(extendPrivKey)\n        let mainAddressIndex0 = [0,0]\n        let mainAddress0 = TLHDWalletWrapper.getAddress(extendPubKey, sequence:mainAddressIndex0 as NSArray, isTestnet:walletConfig.isTestnet)\n        let fromAddress = BTCAddress(base58String: mainAddress0)\n        XCTAssertTrue(\"1K7fXZeeQydcUvbsfvkMSQmiacV5sKRYQz\" == mainAddress0)\n        let changeAddressIndex0 = [1,0]\n        let changeAddress0 = TLHDWalletWrapper.getAddress(extendPubKey, sequence:changeAddressIndex0 as NSArray, isTestnet:walletConfig.isTestnet)\n        XCTAssertTrue(\"1CvpGn9VxVY1nsWWL3MSWRYaBHdNkCDbmv\" == changeAddress0)\n\n        var hdWallets = NSMutableArray()\n        \n        var hdWallet = NSMutableDictionary()\n        hdWallet.setObject(0, forKey: \"current_account_id\" as NSCopying)\n        hdWallet.setObject(0, forKey: \"master_hex\" as NSCopying)\n        hdWallet.setObject(1, forKey: \"max_account_id_created\" as NSCopying)\n        hdWallet.setObject(\"default\", forKey: \"name\" as NSCopying)\n        hdWallet.setObject(backupPassphrase, forKey: \"passphrase\" as NSCopying)\n        \n        var accounts = NSMutableArray()\n        var accountDict = NSMutableDictionary()\n        accountDict.setObject(0, forKey: \"account_idx\" as NSCopying)\n        accountDict.setObject(extendPubKey, forKey: \"xpub\" as NSCopying)\n        accountDict.setObject(extendPrivKey, forKey: \"xpriv\" as NSCopying)\n\n        var changeAdresses = NSMutableArray()\n        var changeAdress = NSMutableDictionary()\n        changeAdress.setObject(changeAddress0, forKey: \"address\" as NSCopying)\n        changeAdress.setObject(0, forKey: \"index\" as NSCopying)\n        changeAdress.setObject(1, forKey: \"status\" as NSCopying)\n        changeAdresses.add(changeAdress)\n        accountDict.setObject(changeAdresses, forKey: \"change_addresses\" as NSCopying)\n        \n        var mainAddresses = NSMutableArray()\n        var mainAddress = NSMutableDictionary()\n        mainAddress.setObject(mainAddress0, forKey: \"address\" as NSCopying)\n        mainAddress.setObject(0, forKey: \"index\" as NSCopying)\n        mainAddress.setObject(1, forKey: \"status\" as NSCopying)\n        mainAddresses.add(mainAddress)\n        accountDict.setObject(mainAddresses, forKey: \"main_addresses\" as NSCopying)\n        \n        accountDict.setObject(0, forKey: \"min_change_address_vidx\" as NSCopying)\n        accountDict.setObject(0, forKey: \"min_main_address_idx\" as NSCopying)\n        accountDict.setObject(\"Account 1\", forKey: \"name\" as NSCopying)\n        accountDict.setObject(0, forKey: \"needs_recovering\" as NSCopying)\n        accountDict.setObject(1, forKey: \"status\" as NSCopying)\n        \n        \n        var stealthAddresses = NSMutableArray()\n        var stealthAddress = NSMutableDictionary()\n        stealthAddress.setObject(0, forKey: \"last_tx_time\" as NSCopying)\n        stealthAddress.setObject(NSMutableArray(), forKey: \"payments\" as NSCopying)\n        stealthAddress.setObject(\"NOTUSED\", forKey: \"scan_key\" as NSCopying)\n        var servers = NSMutableDictionary()\n        var watching = NSMutableDictionary()\n        watching.setObject(1, forKey: \"watching\" as NSCopying)\n        servers.setObject(watching, forKey: \"www.arcbit.net\" as NSCopying)\n        stealthAddress.setObject(servers, forKey: \"servers\" as NSCopying)\n        stealthAddress.setObject(\"NOTUSED\", forKey: \"spend_key\" as NSCopying)\n        stealthAddress.setObject(\"NOTUSED\", forKey: \"stealth_address\" as NSCopying)\n        stealthAddresses.add(stealthAddress)\n        \n        accountDict.setObject(stealthAddresses, forKey: \"stealth_addresses\" as NSCopying)\n        accounts.add(accountDict)\n        \n        accountDict.setObject(extendPrivKey, forKey: \"xprv\" as NSCopying)\n        accountDict.setObject(extendPubKey, forKey: \"xpub\" as NSCopying)\n        \n        hdWallet.setObject(accounts, forKey: \"accounts\" as NSCopying)\n        hdWallets.add(hdWallet)\n        \n        wallet.setObject(hdWallets, forKey: \"hd_wallets\" as NSCopying)\n        wallet.setObject(NSMutableArray(), forKey: \"address_book\" as NSCopying)\n        wallet.setObject(imports, forKey: \"imports\" as NSCopying)\n        wallet.setObject(NSMutableArray(), forKey: \"tx_tags\" as NSCopying)\n        \n        wallets.add(wallet)\n        var payload = NSMutableDictionary()\n        payload.setObject(wallets, forKey: \"wallets\" as NSCopying)\n        mockWalletPayload.setObject(payload, forKey: \"payload\" as NSCopying)\n        \n        let appWallet = TLWallet(walletName: \"Test Wallet\", walletConfig: walletConfig)\n        let godSend = TLSpaghettiGodSend(appWallet: appWallet)\n        appWallet.loadWalletPayload(mockWalletPayload, masterHex:masterHex)\n        \n        \n        let accountsArray = appWallet.getAccountObjectArray()\n        \n        \n        let accountObject = accountsArray.object(at: 0) as! TLAccountObject\n        godSend.setOnlyFromAccount(accountObject)\n\n        let mockUnspentOutput = { (txid: String, value: UInt64, txOutputN: Int) -> NSDictionary in\n            var unspentOutput = NSMutableDictionary()\n            unspentOutput.setObject(TLWalletUtils.reverseHexString(txid), forKey: \"tx_hash\" as NSCopying)\n            unspentOutput.setObject(txid, forKey: \"tx_hash_big_endian\" as NSCopying)\n            unspentOutput.setObject(txOutputN, forKey: \"tx_output_n\" as NSCopying)\n            unspentOutput.setObject(BTCScript(address: fromAddress).hex, forKey: \"script\" as NSCopying)\n            unspentOutput.setObject(NSNumber(value: value as UInt64), forKey: \"value\" as NSCopying)\n            unspentOutput.setObject(6, forKey: \"confirmations\" as NSCopying)\n            return unspentOutput\n        }\n        \n        func testCreateSignedSerializedTransactionHexAndBIP69_1() -> () {\n            let feeAmount = TLCoin(bitcoinAmount: \"0.00000\", bitcoinDenomination: TLBitcoinDenomination.bitcoin)\n            let toAddress = \"1KAD5EnzzLtrSo2Da2G4zzD7uZrjk8zRAv\"\n            let toAddress2 = \"1DZTzaBHUDM7T3QvUKBz4qXMRpkg8jsfB5\"\n            let toAmount = TLCoin(bitcoinAmount: \"1\", bitcoinDenomination: TLBitcoinDenomination.bitcoin)\n            let toAmount2 = TLCoin(bitcoinAmount: \"24\", bitcoinDenomination: TLBitcoinDenomination.bitcoin)\n            \n            let txid0 = \"35288d269cee1941eaebb2ea85e32b42cdb2b04284a56d8b14dcc3f5c65d6055\"\n            let txid1 = \"35288d269cee1941eaebb2ea85e32b42cdb2b04284a56d8b14dcc3f5c65d6055\"\n            \n            let unspentOutput0 = mockUnspentOutput(txid0, 100000000, 0)\n            let unspentOutput1 = mockUnspentOutput(txid1, 2400000000, 1)\n            \n            func testCreateSignedSerializedTransactionHexAndBIP69_1_1() -> () {\n                let toAddressesAndAmounts = [[\"address\": toAddress, \"amount\": toAmount], [\"address\": toAddress2, \"amount\": toAmount2]]\n                \n                accountObject.unspentOutputs = NSMutableArray(capacity: 2)\n                accountObject.unspentOutputs!.add(unspentOutput0)\n                accountObject.unspentOutputs!.add(unspentOutput1)\n                accountObject.stealthPaymentUnspentOutputs = NSMutableArray(capacity: 0)\n                \n                let ret = godSend.createSignedSerializedTransactionHex(toAddressesAndAmounts as NSArray, feeAmount: feeAmount, error: {\n                    (data: String?) in\n                })\n                \n                let txHexAndTxHash = ret.0\n                let realToAddresses = ret.1\n                let txHex = txHexAndTxHash!.object(forKey: \"txHex\") as! String\n                let txHash = txHexAndTxHash!.object(forKey: \"txHash\") as! String\n                let txSize = txHexAndTxHash!.object(forKey: \"txSize\") as! NSNumber\n                XCTAssertTrue(txHash == \"fbacfede55dc6a779782ba8fa22813860b7ef07d82c3abebb8f290b3141bf965\")\n                XCTAssertTrue(txHex == \"010000000255605dc6f5c3dc148b6da58442b0b2cd422be385eab2ebea4119ee9c268d2835000000006a4730440220449b1f95687bf469fb954bcdbbc0ae362fe9bd6ba88c5b4dd227d9a5c37eb82a02203440bf6b4178786913a197344d0999a7d98d246099dcddf4bf9b24473a4e7a9a0121027ecba9ebc4699df7f557c4e18192efb5c97b1ff4ecdcebb4e21bb7d1fed2203affffffff55605dc6f5c3dc148b6da58442b0b2cd422be385eab2ebea4119ee9c268d2835010000006a47304402201f6a4a87d0584157471210c1e126e64e52f565e950feb80045fc855829df3da4022059fd75fe51262aa7b7f214534357ed2786a9b3dcb12493112027711aebc8478a0121027ecba9ebc4699df7f557c4e18192efb5c97b1ff4ecdcebb4e21bb7d1fed2203affffffff0200e1f505000000001976a914c73015fa62d972ebb3b241fe8c936657b13fabd788ac00180d8f000000001976a91489c55a3ca6676c9f7f260a6439c83249b747380288ac00000000\")\n                XCTAssertTrue(txSize.uintValue == 376)\n\n                let transaction = BTCTransaction(hex: txHex)\n                \n                XCTAssertTrue(transaction?.inputs.count == 2)\n                let input0 = transaction?.inputs[0] as! BTCTransactionInput\n                XCTAssertTrue(input0.previousTransactionID == txid0)\n                XCTAssertTrue(input0.outpoint.index == 0)\n                let input1 = transaction?.inputs[1] as! BTCTransactionInput\n                XCTAssertTrue(input1.previousTransactionID == txid1)\n                XCTAssertTrue(input1.outpoint.index == 1)\n                \n                XCTAssertTrue(transaction?.outputs.count == 2)\n                let output0 = transaction?.outputs[0] as! BTCTransactionOutput\n                XCTAssertTrue(output0.script.hex == \"76a914c73015fa62d972ebb3b241fe8c936657b13fabd788ac\")\n                XCTAssertTrue(output0.value == 100000000)\n                XCTAssertTrue(output0.script.standardAddress.base58String == \"1KAD5EnzzLtrSo2Da2G4zzD7uZrjk8zRAv\")\n                let output1 = transaction?.outputs[1] as! BTCTransactionOutput\n                XCTAssertTrue(output1.script.hex == \"76a91489c55a3ca6676c9f7f260a6439c83249b747380288ac\")\n                XCTAssertTrue(output1.value == 2400000000)\n                XCTAssertTrue(output1.script.standardAddress.base58String == \"1DZTzaBHUDM7T3QvUKBz4qXMRpkg8jsfB5\")\n                \n                XCTAssertTrue(realToAddresses.count == 2)\n                XCTAssertTrue(realToAddresses[0] == \"1KAD5EnzzLtrSo2Da2G4zzD7uZrjk8zRAv\")\n                XCTAssertTrue(realToAddresses[1] == \"1DZTzaBHUDM7T3QvUKBz4qXMRpkg8jsfB5\")\n            }\n            \n            func testCreateSignedSerializedTransactionHexAndBIP69_1_2() -> () {\n                let toAddressesAndAmounts = [[\"address\": toAddress2, \"amount\": toAmount2], [\"address\": toAddress, \"amount\": toAmount]]\n                \n                accountObject.unspentOutputs = NSMutableArray(capacity: 2)\n                accountObject.unspentOutputs!.add(unspentOutput1)\n                accountObject.unspentOutputs!.add(unspentOutput0)\n                accountObject.stealthPaymentUnspentOutputs = NSMutableArray(capacity: 0)\n                \n                let ret = godSend.createSignedSerializedTransactionHex(toAddressesAndAmounts as NSArray, feeAmount: feeAmount, error: {\n                    (data: String?) in\n                })\n                \n                let txHexAndTxHash = ret.0\n                let realToAddresses = ret.1\n                let txHex = txHexAndTxHash!.object(forKey: \"txHex\") as! String\n                let txHash = txHexAndTxHash!.object(forKey: \"txHash\") as! String\n                let txSize = txHexAndTxHash!.object(forKey: \"txSize\") as! NSNumber\n                XCTAssertTrue(txHash == \"fbacfede55dc6a779782ba8fa22813860b7ef07d82c3abebb8f290b3141bf965\")\n                XCTAssertTrue(txHex == \"010000000255605dc6f5c3dc148b6da58442b0b2cd422be385eab2ebea4119ee9c268d2835000000006a4730440220449b1f95687bf469fb954bcdbbc0ae362fe9bd6ba88c5b4dd227d9a5c37eb82a02203440bf6b4178786913a197344d0999a7d98d246099dcddf4bf9b24473a4e7a9a0121027ecba9ebc4699df7f557c4e18192efb5c97b1ff4ecdcebb4e21bb7d1fed2203affffffff55605dc6f5c3dc148b6da58442b0b2cd422be385eab2ebea4119ee9c268d2835010000006a47304402201f6a4a87d0584157471210c1e126e64e52f565e950feb80045fc855829df3da4022059fd75fe51262aa7b7f214534357ed2786a9b3dcb12493112027711aebc8478a0121027ecba9ebc4699df7f557c4e18192efb5c97b1ff4ecdcebb4e21bb7d1fed2203affffffff0200e1f505000000001976a914c73015fa62d972ebb3b241fe8c936657b13fabd788ac00180d8f000000001976a91489c55a3ca6676c9f7f260a6439c83249b747380288ac00000000\")\n                XCTAssertTrue(txSize.uintValue == 376)\n\n                let transaction = BTCTransaction(hex: txHex)\n                \n                XCTAssertTrue(transaction?.inputs.count == 2)\n                let input0 = transaction?.inputs[0] as! BTCTransactionInput\n                XCTAssertTrue(input0.previousTransactionID == txid0)\n                XCTAssertTrue(input0.outpoint.index == 0)\n                let input1 = transaction?.inputs[1] as! BTCTransactionInput\n                XCTAssertTrue(input1.previousTransactionID == txid1)\n                XCTAssertTrue(input1.outpoint.index == 1)\n                \n                XCTAssertTrue(transaction?.outputs.count == 2)\n                let output0 = transaction?.outputs[0] as! BTCTransactionOutput\n                XCTAssertTrue(output0.script.hex == \"76a914c73015fa62d972ebb3b241fe8c936657b13fabd788ac\")\n                XCTAssertTrue(output0.value == 100000000)\n                XCTAssertTrue(output0.script.standardAddress.base58String == \"1KAD5EnzzLtrSo2Da2G4zzD7uZrjk8zRAv\")\n                let output1 = transaction?.outputs[1] as! BTCTransactionOutput\n                XCTAssertTrue(output1.script.hex == \"76a91489c55a3ca6676c9f7f260a6439c83249b747380288ac\")\n                XCTAssertTrue(output1.value == 2400000000)\n                XCTAssertTrue(output1.script.standardAddress.base58String == \"1DZTzaBHUDM7T3QvUKBz4qXMRpkg8jsfB5\")\n                \n                XCTAssertTrue(realToAddresses.count == 2)\n                XCTAssertTrue(realToAddresses[0] == \"1DZTzaBHUDM7T3QvUKBz4qXMRpkg8jsfB5\")\n                XCTAssertTrue(realToAddresses[1] == \"1KAD5EnzzLtrSo2Da2G4zzD7uZrjk8zRAv\")\n            }\n            \n            testCreateSignedSerializedTransactionHexAndBIP69_1_1()\n            testCreateSignedSerializedTransactionHexAndBIP69_1_2()\n        }\n        \n        func testCreateSignedSerializedTransactionHexAndBIP69_2() -> () {\n            let feeAmount = TLCoin(bitcoinAmount: \"0.00002735\", bitcoinDenomination: TLBitcoinDenomination.bitcoin)\n            let toAddress = \"17nFgS1YaDPnXKMPQkZVdNQqZnVqRgBwnZ\"\n            let toAddress2 = \"19Nrc2Xm226xmSbeGZ1BVtX7DUm4oCx8Pm\"\n            let toAmount = TLCoin(bitcoinAmount: \"4.00057456\", bitcoinDenomination: TLBitcoinDenomination.bitcoin)\n            let toAmount2 = TLCoin(bitcoinAmount: \"400\", bitcoinDenomination: TLBitcoinDenomination.bitcoin)\n            \n            let txid0 = \"0e53ec5dfb2cb8a71fec32dc9a634a35b7e24799295ddd5278217822e0b31f57\"\n            let txid1 = \"26aa6e6d8b9e49bb0630aac301db6757c02e3619feb4ee0eea81eb1672947024\"\n            let txid2 = \"28e0fdd185542f2c6ea19030b0796051e7772b6026dd5ddccd7a2f93b73e6fc2\"\n            let txid3 = \"381de9b9ae1a94d9c17f6a08ef9d341a5ce29e2e60c36a52d333ff6203e58d5d\"\n            let txid4 = \"3b8b2f8efceb60ba78ca8bba206a137f14cb5ea4035e761ee204302d46b98de2\"\n            let txid5 = \"402b2c02411720bf409eff60d05adad684f135838962823f3614cc657dd7bc0a\"\n            let txid6 = \"54ffff182965ed0957dba1239c27164ace5a73c9b62a660c74b7b7f15ff61e7a\"\n            let txid7 = \"643e5f4e66373a57251fb173151e838ccd27d279aca882997e005016bb53d5aa\"\n            let txid8 = \"6c1d56f31b2de4bfc6aaea28396b333102b1f600da9c6d6149e96ca43f1102b1\"\n            let txid9 = \"7a1de137cbafb5c70405455c49c5104ca3057a1f1243e6563bb9245c9c88c191\"\n            let txid10 = \"7d037ceb2ee0dc03e82f17be7935d238b35d1deabf953a892a4507bfbeeb3ba4\"\n            let txid11 = \"a5e899dddb28776ea9ddac0a502316d53a4a3fca607c72f66c470e0412e34086\"\n            let txid12 = \"b4112b8f900a7ca0c8b0e7c4dfad35c6be5f6be46b3458974988e1cdb2fa61b8\"\n            let txid13 = \"bafd65e3c7f3f9fdfdc1ddb026131b278c3be1af90a4a6ffa78c4658f9ec0c85\"\n            let txid14 = \"de0411a1e97484a2804ff1dbde260ac19de841bebad1880c782941aca883b4e9\"\n            let txid15 = \"f0a130a84912d03c1d284974f563c5949ac13f8342b8112edff52971599e6a45\"\n            let txid16 = \"f320832a9d2e2452af63154bc687493484a0e7745ebd3aaf9ca19eb80834ad60\"\n            \n            let unspentOutput0 = mockUnspentOutput(txid0, 2529937904, 0)\n            let unspentOutput1 = mockUnspentOutput(txid1, 2521656792, 1)\n            let unspentOutput2 = mockUnspentOutput(txid2, 2509683086, 0)\n            let unspentOutput3 = mockUnspentOutput(txid3, 2506060377, 1)\n            let unspentOutput4 = mockUnspentOutput(txid4, 2510645247, 0)\n            let unspentOutput5 = mockUnspentOutput(txid5, 2502325820, 1)\n            let unspentOutput6 = mockUnspentOutput(txid6, 2525953727, 1)\n            let unspentOutput7 = mockUnspentOutput(txid7, 2507302856, 0)\n            let unspentOutput8 = mockUnspentOutput(txid8, 2534185804, 1)\n            let unspentOutput9 = mockUnspentOutput(txid9, 136219905, 0)\n            let unspentOutput10 = mockUnspentOutput(txid10, 2502901118, 1)\n            let unspentOutput11 = mockUnspentOutput(txid11, 2527569363, 0)\n            let unspentOutput12 = mockUnspentOutput(txid12, 2516268302, 0)\n            let unspentOutput13 = mockUnspentOutput(txid13, 2521794404, 0)\n            let unspentOutput14 = mockUnspentOutput(txid14, 2520533680, 1)\n            let unspentOutput15 = mockUnspentOutput(txid15, 2513840095, 0)\n            let unspentOutput16 = mockUnspentOutput(txid16, 2513181711, 0)\n            \n            func testCreateSignedSerializedTransactionHexAndBIP69_2_1() -> () {\n                let toAddressesAndAmounts = [[\"address\": toAddress, \"amount\": toAmount], [\"address\": toAddress2, \"amount\": toAmount2]]\n                \n                accountObject.unspentOutputs = NSMutableArray(capacity: 17)\n                accountObject.unspentOutputs!.add(unspentOutput0)\n                accountObject.unspentOutputs!.add(unspentOutput1)\n                accountObject.unspentOutputs!.add(unspentOutput2)\n                accountObject.unspentOutputs!.add(unspentOutput3)\n                accountObject.unspentOutputs!.add(unspentOutput4)\n                accountObject.unspentOutputs!.add(unspentOutput5)\n                accountObject.unspentOutputs!.add(unspentOutput6)\n                accountObject.unspentOutputs!.add(unspentOutput7)\n                accountObject.unspentOutputs!.add(unspentOutput8)\n                accountObject.unspentOutputs!.add(unspentOutput9)\n                accountObject.unspentOutputs!.add(unspentOutput10)\n                accountObject.unspentOutputs!.add(unspentOutput11)\n                accountObject.unspentOutputs!.add(unspentOutput12)\n                accountObject.unspentOutputs!.add(unspentOutput13)\n                accountObject.unspentOutputs!.add(unspentOutput14)\n                accountObject.unspentOutputs!.add(unspentOutput15)\n                accountObject.unspentOutputs!.add(unspentOutput16)\n                \n                accountObject.stealthPaymentUnspentOutputs = NSMutableArray(capacity: 0)\n                \n                let ret = godSend.createSignedSerializedTransactionHex(toAddressesAndAmounts as NSArray, feeAmount: feeAmount, error: {\n                    (data: String?) in\n                })\n                \n                let txHexAndTxHash = ret.0\n                let realToAddresses = ret.1\n                let txHex = txHexAndTxHash!.object(forKey: \"txHex\") as! String\n                let txHash = txHexAndTxHash!.object(forKey: \"txHash\") as! String\n                let txSize = txHexAndTxHash!.object(forKey: \"txSize\") as! NSNumber\n                XCTAssertTrue(txHash == \"0656add012962ef3bdd11eaf88347b78a2c4adb08fe8b95f79a8b8a4fe862132\")\n                XCTAssertTrue(txHex == \"0100000011571fb3e02278217852dd5d299947e2b7354a639adc32ec1fa7b82cfb5dec530e000000006b483045022100b28348624779833117dc8ae73bcb649528ad6edf9d5b48018c4488dbc9b9fa3702201f8b0e1707bdfa3438d6c1353b62e3a01cb0b7b4ee5e7ef93e7b2f563ead66a30121027ecba9ebc4699df7f557c4e18192efb5c97b1ff4ecdcebb4e21bb7d1fed2203affffffff2470947216eb81ea0eeeb4fe19362ec05767db01c3aa3006bb499e8b6d6eaa26010000006a4730440220679db98b1e5b17a57acc78e7271c357130fd8b6d8d2072880429d05630c5cc2802205fb88f764053185d610ae8041907bdb85f711a51f5602bb663b744e786fd78700121027ecba9ebc4699df7f557c4e18192efb5c97b1ff4ecdcebb4e21bb7d1fed2203affffffffc26f3eb7932f7acddc5ddd26602b77e7516079b03090a16e2c2f5485d1fde028000000006a47304402205031699fc96af02637f1ed7120c0e380f65370824f6af5cd37baf391f8188f73022026f5ba7a7f31fc3590f1e4dce50f12cc2122ce3fe30d187f11c3922ce3b22d0a0121027ecba9ebc4699df7f557c4e18192efb5c97b1ff4ecdcebb4e21bb7d1fed2203affffffff5d8de50362ff33d3526ac3602e9ee25c1a349def086a7fc1d9941aaeb9e91d38010000006b483045022100fefda0743cc428b17e688c65d226e899af8b0d5a6f05d0944f9c67257fa5a15a02207baa0a95d88b98b0b669cab8342cc43bc992daf3be41c4ba40de77453ed3fb220121027ecba9ebc4699df7f557c4e18192efb5c97b1ff4ecdcebb4e21bb7d1fed2203affffffffe28db9462d3004e21e765e03a45ecb147f136a20ba8bca78ba60ebfc8e2f8b3b000000006b483045022100a54a4e0a3b476c855273a0aa6d97f5995e78a83cad59c28cda786b49a14f370602202cce0aadf128986b6448ad7f3288f95c9c5467ba01d16e94d807db587e481fe30121027ecba9ebc4699df7f557c4e18192efb5c97b1ff4ecdcebb4e21bb7d1fed2203affffffff0abcd77d65cc14363f8262898335f184d6da5ad060ff9e40bf201741022c2b40010000006a4730440220636b2a05ef164457c9b8ee0f364c308a7ef8a0f5f7b01d6633ace40803a6fd7902205f052f39e940d2b8d797a5259ee35d0596a0dbfd199799722d95a895308bd1f10121027ecba9ebc4699df7f557c4e18192efb5c97b1ff4ecdcebb4e21bb7d1fed2203affffffff7a1ef65ff1b7b7740c662ab6c9735ace4a16279c23a1db5709ed652918ffff54010000006b4830450221008e3f42e8e5d45712efe14c17ba199724e1d2bcaa2a459ede155b2df89d1b8c7902205260062b1eb6595a43180f0b40307467f4fe2f67138c2aed47d21dac739f4a770121027ecba9ebc4699df7f557c4e18192efb5c97b1ff4ecdcebb4e21bb7d1fed2203affffffffaad553bb1650007e9982a8ac79d227cd8c831e1573b11f25573a37664e5f3e64000000006a47304402204b3a8b40ea4bd092ce05ae5a55704d98ceee485b87e9d9bbc1dcc0956a2230bb022043b2660c1513b029038a3f2492c2d0d39b45c04a14b1143ede43abb6832d6f910121027ecba9ebc4699df7f557c4e18192efb5c97b1ff4ecdcebb4e21bb7d1fed2203affffffffb102113fa46ce949616d9cda00f6b10231336b3928eaaac6bfe42d1bf3561d6c010000006a4730440220651a1d62ba88ac05790bab2ead82483e99a748965cd8f1887c943c62c67786de022002bc57e36c7668c8e5d4c02e1baed3491b30d91e53633b807ca950b8bfad6fe90121027ecba9ebc4699df7f557c4e18192efb5c97b1ff4ecdcebb4e21bb7d1fed2203affffffff91c1889c5c24b93b56e643121f7a05a34c10c5495c450504c7b5afcb37e11d7a000000006b483045022100ea05603d2944228bd2231354b1a6e6d106a803d7d52e8a290232b9769629c9a502204125264bb9d2cfd2db5455044d58a7b8ea8e0c7c88870def8c0fac2c559c5cfc0121027ecba9ebc4699df7f557c4e18192efb5c97b1ff4ecdcebb4e21bb7d1fed2203affffffffa43bebbebf07452a893a95bfea1d5db338d23579be172fe803dce02eeb7c037d010000006b483045022100fe8ce378ed72b0829805dde89cb16d2f6722f8b4128ee07f6ef064eaa4b607f702206400a9816e120e3e7427f4e83518b2822f010c219bcb758560ff280aae1cbe420121027ecba9ebc4699df7f557c4e18192efb5c97b1ff4ecdcebb4e21bb7d1fed2203affffffff8640e312040e476cf6727c60ca3f4a3ad51623500aacdda96e7728dbdd99e8a5000000006a47304402203cce0a54d3314decb5adf1d9dbe5f887eb779daf6d4d2ce463435181da6cc72302206104213df446b9fc78d598c8425c82ca9b0952fab48a9edecb382ee5e68c11fe0121027ecba9ebc4699df7f557c4e18192efb5c97b1ff4ecdcebb4e21bb7d1fed2203affffffffb861fab2cde188499758346be46b5fbec635addfc4e7b0c8a07c0a908f2b11b4000000006a4730440220120d5d6672695c9ad3e72049da00be123bab74971386953b38409ff52989ce2502202b8702ba2d7fe90fc35aef52585c664865ae746d9e4242955b7ece22d89ad1ca0121027ecba9ebc4699df7f557c4e18192efb5c97b1ff4ecdcebb4e21bb7d1fed2203affffffff850cecf958468ca7ffa6a490afe13b8c271b1326b0ddc1fdfdf9f3c7e365fdba000000006a4730440220282a14909d8ed766441c4766a574af0fc20e1b587e545e1943429670457b959602207e4c7503ae3c9de83865d0972fbb18cd7c9630023347d6eba45963f0670ef7e70121027ecba9ebc4699df7f557c4e18192efb5c97b1ff4ecdcebb4e21bb7d1fed2203affffffffe9b483a8ac4129780c88d1babe41e89dc10a26dedbf14f80a28474e9a11104de010000006b483045022100ec3744090e0603690319768ef234071410224230cc32e4731e50f9e8a05a6a5802203a1a8f7380e83fd1b61f4fd775aa6410d2e87d018b820aab4e98e1a8de0715f10121027ecba9ebc4699df7f557c4e18192efb5c97b1ff4ecdcebb4e21bb7d1fed2203affffffff456a9e597129f5df2e11b842833fc19a94c563f57449281d3cd01249a830a1f0000000006a473044022060b06dcb2550beb9dd4181a45566ccf0ba41040d9003aa83c02fb63c4f9cbd8a02203c577c070c69382cfb05c74275590e3de6dcb77ce929b0d771f314ffa889f47c0121027ecba9ebc4699df7f557c4e18192efb5c97b1ff4ecdcebb4e21bb7d1fed2203affffffff60ad3408b89ea19caf3abd5e74e7a084344987c64b1563af52242e9d2a8320f3000000006b483045022100d7b08a358ce19469d369765c38d1f17ffe66151f7c9cd85757d89d4f218a9d390220418f13a4b8eb41ca471901f1ba2b1677166f90127b65b7417ad5a62d76f0b8c80121027ecba9ebc4699df7f557c4e18192efb5c97b1ff4ecdcebb4e21bb7d1fed2203affffffff027064d817000000001976a9144a5fba237213a062f6f57978f796390bdcf8d01588ac00902f50090000001976a9145be32612930b8323add2212a4ec03c1562084f8488ac00000000\")\n                XCTAssertTrue(txSize.uintValue == 2611)\n\n                let transaction = BTCTransaction(hex: txHex)\n                \n                XCTAssertTrue(transaction?.inputs.count == 17)\n                let input0 = transaction?.inputs[0] as! BTCTransactionInput\n                XCTAssertTrue(input0.previousTransactionID == txid0)\n                XCTAssertTrue(input0.outpoint.index == 0)\n                let input1 = transaction?.inputs[1] as! BTCTransactionInput\n                XCTAssertTrue(input1.previousTransactionID == txid1)\n                XCTAssertTrue(input1.outpoint.index == 1)\n                let input2 = transaction?.inputs[2] as! BTCTransactionInput\n                XCTAssertTrue(input2.previousTransactionID == txid2)\n                XCTAssertTrue(input2.outpoint.index == 0)\n                let input3 = transaction?.inputs[3] as! BTCTransactionInput\n                XCTAssertTrue(input3.previousTransactionID == txid3)\n                XCTAssertTrue(input3.outpoint.index == 1)\n                let input4 = transaction?.inputs[4] as! BTCTransactionInput\n                XCTAssertTrue(input4.previousTransactionID == txid4)\n                XCTAssertTrue(input4.outpoint.index == 0)\n                let input5 = transaction?.inputs[5] as! BTCTransactionInput\n                XCTAssertTrue(input5.previousTransactionID == txid5)\n                XCTAssertTrue(input5.outpoint.index == 1)\n                let input6 = transaction?.inputs[6] as! BTCTransactionInput\n                XCTAssertTrue(input6.previousTransactionID == txid6)\n                XCTAssertTrue(input6.outpoint.index == 1)\n                let input7 = transaction?.inputs[7] as! BTCTransactionInput\n                XCTAssertTrue(input7.previousTransactionID == txid7)\n                XCTAssertTrue(input7.outpoint.index == 0)\n                let input8 = transaction?.inputs[8] as! BTCTransactionInput\n                XCTAssertTrue(input8.previousTransactionID == txid8)\n                XCTAssertTrue(input8.outpoint.index == 1)\n                let input9 = transaction?.inputs[9] as! BTCTransactionInput\n                XCTAssertTrue(input9.previousTransactionID == txid9)\n                XCTAssertTrue(input9.outpoint.index == 0)\n                let input10 = transaction?.inputs[10] as! BTCTransactionInput\n                XCTAssertTrue(input10.previousTransactionID == txid10)\n                XCTAssertTrue(input10.outpoint.index == 1)\n                let input11 = transaction?.inputs[11] as! BTCTransactionInput\n                XCTAssertTrue(input11.previousTransactionID == txid11)\n                XCTAssertTrue(input11.outpoint.index == 0)\n                let input12 = transaction?.inputs[12] as! BTCTransactionInput\n                XCTAssertTrue(input12.previousTransactionID == txid12)\n                XCTAssertTrue(input12.outpoint.index == 0)\n                let input13 = transaction?.inputs[13] as! BTCTransactionInput\n                XCTAssertTrue(input13.previousTransactionID == txid13)\n                XCTAssertTrue(input13.outpoint.index == 0)\n                let input14 = transaction?.inputs[14] as! BTCTransactionInput\n                XCTAssertTrue(input14.previousTransactionID == txid14)\n                XCTAssertTrue(input14.outpoint.index == 1)\n                let input15 = transaction?.inputs[15] as! BTCTransactionInput\n                XCTAssertTrue(input15.previousTransactionID == txid15)\n                XCTAssertTrue(input15.outpoint.index == 0)\n                let input16 = transaction?.inputs[16] as! BTCTransactionInput\n                XCTAssertTrue(input16.previousTransactionID == txid16)\n                XCTAssertTrue(input16.outpoint.index == 0)\n                \n                XCTAssertTrue(transaction?.outputs.count == 2)\n                let output0 = transaction?.outputs[0] as! BTCTransactionOutput\n                XCTAssertTrue(output0.script.hex == \"76a9144a5fba237213a062f6f57978f796390bdcf8d01588ac\")\n                XCTAssertTrue(output0.value == 400057456)\n                XCTAssertTrue(output0.script.standardAddress.base58String == \"17nFgS1YaDPnXKMPQkZVdNQqZnVqRgBwnZ\")\n                let output1 = transaction?.outputs[1] as! BTCTransactionOutput\n                XCTAssertTrue(output1.script.hex == \"76a9145be32612930b8323add2212a4ec03c1562084f8488ac\")\n                XCTAssertTrue(output1.value == 40000000000)\n                XCTAssertTrue(output1.script.standardAddress.base58String == \"19Nrc2Xm226xmSbeGZ1BVtX7DUm4oCx8Pm\")\n                \n                XCTAssertTrue(realToAddresses.count == 2)\n                XCTAssertTrue(realToAddresses[0] == \"17nFgS1YaDPnXKMPQkZVdNQqZnVqRgBwnZ\")\n                XCTAssertTrue(realToAddresses[1] == \"19Nrc2Xm226xmSbeGZ1BVtX7DUm4oCx8Pm\")\n            }\n            \n            func testCreateSignedSerializedTransactionHexAndBIP69_2_2() -> () {\n                let toAddressesAndAmounts = [[\"address\": toAddress2, \"amount\": toAmount2], [\"address\": toAddress, \"amount\": toAmount]]\n                \n                accountObject.unspentOutputs = NSMutableArray(capacity: 17)\n                accountObject.unspentOutputs!.add(unspentOutput15)\n                accountObject.unspentOutputs!.add(unspentOutput2)\n                accountObject.unspentOutputs!.add(unspentOutput0)\n                accountObject.unspentOutputs!.add(unspentOutput1)\n                accountObject.unspentOutputs!.add(unspentOutput5)\n                accountObject.unspentOutputs!.add(unspentOutput3)\n                accountObject.unspentOutputs!.add(unspentOutput4)\n                accountObject.unspentOutputs!.add(unspentOutput6)\n                accountObject.unspentOutputs!.add(unspentOutput7)\n                accountObject.unspentOutputs!.add(unspentOutput9)\n                accountObject.unspentOutputs!.add(unspentOutput10)\n                accountObject.unspentOutputs!.add(unspentOutput8)\n                accountObject.unspentOutputs!.add(unspentOutput12)\n                accountObject.unspentOutputs!.add(unspentOutput11)\n                accountObject.unspentOutputs!.add(unspentOutput14)\n                accountObject.unspentOutputs!.add(unspentOutput16)\n                accountObject.unspentOutputs!.add(unspentOutput13)\n                \n                accountObject.stealthPaymentUnspentOutputs = NSMutableArray(capacity: 0)\n                \n                let ret = godSend.createSignedSerializedTransactionHex(toAddressesAndAmounts as NSArray, feeAmount: feeAmount, error: {\n                    (data: String?) in\n                })\n                \n                let txHexAndTxHash = ret.0\n                let realToAddresses = ret.1\n                let txHex = txHexAndTxHash!.object(forKey: \"txHex\") as! String\n                let txHash = txHexAndTxHash!.object(forKey: \"txHash\") as! String\n                let txSize = txHexAndTxHash!.object(forKey: \"txSize\") as! NSNumber\n                XCTAssertTrue(txHash == \"0656add012962ef3bdd11eaf88347b78a2c4adb08fe8b95f79a8b8a4fe862132\")\n                XCTAssertTrue(txHex == \"0100000011571fb3e02278217852dd5d299947e2b7354a639adc32ec1fa7b82cfb5dec530e000000006b483045022100b28348624779833117dc8ae73bcb649528ad6edf9d5b48018c4488dbc9b9fa3702201f8b0e1707bdfa3438d6c1353b62e3a01cb0b7b4ee5e7ef93e7b2f563ead66a30121027ecba9ebc4699df7f557c4e18192efb5c97b1ff4ecdcebb4e21bb7d1fed2203affffffff2470947216eb81ea0eeeb4fe19362ec05767db01c3aa3006bb499e8b6d6eaa26010000006a4730440220679db98b1e5b17a57acc78e7271c357130fd8b6d8d2072880429d05630c5cc2802205fb88f764053185d610ae8041907bdb85f711a51f5602bb663b744e786fd78700121027ecba9ebc4699df7f557c4e18192efb5c97b1ff4ecdcebb4e21bb7d1fed2203affffffffc26f3eb7932f7acddc5ddd26602b77e7516079b03090a16e2c2f5485d1fde028000000006a47304402205031699fc96af02637f1ed7120c0e380f65370824f6af5cd37baf391f8188f73022026f5ba7a7f31fc3590f1e4dce50f12cc2122ce3fe30d187f11c3922ce3b22d0a0121027ecba9ebc4699df7f557c4e18192efb5c97b1ff4ecdcebb4e21bb7d1fed2203affffffff5d8de50362ff33d3526ac3602e9ee25c1a349def086a7fc1d9941aaeb9e91d38010000006b483045022100fefda0743cc428b17e688c65d226e899af8b0d5a6f05d0944f9c67257fa5a15a02207baa0a95d88b98b0b669cab8342cc43bc992daf3be41c4ba40de77453ed3fb220121027ecba9ebc4699df7f557c4e18192efb5c97b1ff4ecdcebb4e21bb7d1fed2203affffffffe28db9462d3004e21e765e03a45ecb147f136a20ba8bca78ba60ebfc8e2f8b3b000000006b483045022100a54a4e0a3b476c855273a0aa6d97f5995e78a83cad59c28cda786b49a14f370602202cce0aadf128986b6448ad7f3288f95c9c5467ba01d16e94d807db587e481fe30121027ecba9ebc4699df7f557c4e18192efb5c97b1ff4ecdcebb4e21bb7d1fed2203affffffff0abcd77d65cc14363f8262898335f184d6da5ad060ff9e40bf201741022c2b40010000006a4730440220636b2a05ef164457c9b8ee0f364c308a7ef8a0f5f7b01d6633ace40803a6fd7902205f052f39e940d2b8d797a5259ee35d0596a0dbfd199799722d95a895308bd1f10121027ecba9ebc4699df7f557c4e18192efb5c97b1ff4ecdcebb4e21bb7d1fed2203affffffff7a1ef65ff1b7b7740c662ab6c9735ace4a16279c23a1db5709ed652918ffff54010000006b4830450221008e3f42e8e5d45712efe14c17ba199724e1d2bcaa2a459ede155b2df89d1b8c7902205260062b1eb6595a43180f0b40307467f4fe2f67138c2aed47d21dac739f4a770121027ecba9ebc4699df7f557c4e18192efb5c97b1ff4ecdcebb4e21bb7d1fed2203affffffffaad553bb1650007e9982a8ac79d227cd8c831e1573b11f25573a37664e5f3e64000000006a47304402204b3a8b40ea4bd092ce05ae5a55704d98ceee485b87e9d9bbc1dcc0956a2230bb022043b2660c1513b029038a3f2492c2d0d39b45c04a14b1143ede43abb6832d6f910121027ecba9ebc4699df7f557c4e18192efb5c97b1ff4ecdcebb4e21bb7d1fed2203affffffffb102113fa46ce949616d9cda00f6b10231336b3928eaaac6bfe42d1bf3561d6c010000006a4730440220651a1d62ba88ac05790bab2ead82483e99a748965cd8f1887c943c62c67786de022002bc57e36c7668c8e5d4c02e1baed3491b30d91e53633b807ca950b8bfad6fe90121027ecba9ebc4699df7f557c4e18192efb5c97b1ff4ecdcebb4e21bb7d1fed2203affffffff91c1889c5c24b93b56e643121f7a05a34c10c5495c450504c7b5afcb37e11d7a000000006b483045022100ea05603d2944228bd2231354b1a6e6d106a803d7d52e8a290232b9769629c9a502204125264bb9d2cfd2db5455044d58a7b8ea8e0c7c88870def8c0fac2c559c5cfc0121027ecba9ebc4699df7f557c4e18192efb5c97b1ff4ecdcebb4e21bb7d1fed2203affffffffa43bebbebf07452a893a95bfea1d5db338d23579be172fe803dce02eeb7c037d010000006b483045022100fe8ce378ed72b0829805dde89cb16d2f6722f8b4128ee07f6ef064eaa4b607f702206400a9816e120e3e7427f4e83518b2822f010c219bcb758560ff280aae1cbe420121027ecba9ebc4699df7f557c4e18192efb5c97b1ff4ecdcebb4e21bb7d1fed2203affffffff8640e312040e476cf6727c60ca3f4a3ad51623500aacdda96e7728dbdd99e8a5000000006a47304402203cce0a54d3314decb5adf1d9dbe5f887eb779daf6d4d2ce463435181da6cc72302206104213df446b9fc78d598c8425c82ca9b0952fab48a9edecb382ee5e68c11fe0121027ecba9ebc4699df7f557c4e18192efb5c97b1ff4ecdcebb4e21bb7d1fed2203affffffffb861fab2cde188499758346be46b5fbec635addfc4e7b0c8a07c0a908f2b11b4000000006a4730440220120d5d6672695c9ad3e72049da00be123bab74971386953b38409ff52989ce2502202b8702ba2d7fe90fc35aef52585c664865ae746d9e4242955b7ece22d89ad1ca0121027ecba9ebc4699df7f557c4e18192efb5c97b1ff4ecdcebb4e21bb7d1fed2203affffffff850cecf958468ca7ffa6a490afe13b8c271b1326b0ddc1fdfdf9f3c7e365fdba000000006a4730440220282a14909d8ed766441c4766a574af0fc20e1b587e545e1943429670457b959602207e4c7503ae3c9de83865d0972fbb18cd7c9630023347d6eba45963f0670ef7e70121027ecba9ebc4699df7f557c4e18192efb5c97b1ff4ecdcebb4e21bb7d1fed2203affffffffe9b483a8ac4129780c88d1babe41e89dc10a26dedbf14f80a28474e9a11104de010000006b483045022100ec3744090e0603690319768ef234071410224230cc32e4731e50f9e8a05a6a5802203a1a8f7380e83fd1b61f4fd775aa6410d2e87d018b820aab4e98e1a8de0715f10121027ecba9ebc4699df7f557c4e18192efb5c97b1ff4ecdcebb4e21bb7d1fed2203affffffff456a9e597129f5df2e11b842833fc19a94c563f57449281d3cd01249a830a1f0000000006a473044022060b06dcb2550beb9dd4181a45566ccf0ba41040d9003aa83c02fb63c4f9cbd8a02203c577c070c69382cfb05c74275590e3de6dcb77ce929b0d771f314ffa889f47c0121027ecba9ebc4699df7f557c4e18192efb5c97b1ff4ecdcebb4e21bb7d1fed2203affffffff60ad3408b89ea19caf3abd5e74e7a084344987c64b1563af52242e9d2a8320f3000000006b483045022100d7b08a358ce19469d369765c38d1f17ffe66151f7c9cd85757d89d4f218a9d390220418f13a4b8eb41ca471901f1ba2b1677166f90127b65b7417ad5a62d76f0b8c80121027ecba9ebc4699df7f557c4e18192efb5c97b1ff4ecdcebb4e21bb7d1fed2203affffffff027064d817000000001976a9144a5fba237213a062f6f57978f796390bdcf8d01588ac00902f50090000001976a9145be32612930b8323add2212a4ec03c1562084f8488ac00000000\")\n                XCTAssertTrue(txSize.uintValue == 2611)\n\n                let transaction = BTCTransaction(hex: txHex)\n                \n                XCTAssertTrue(transaction?.inputs.count == 17)\n                let input0 = transaction?.inputs[0] as! BTCTransactionInput\n                XCTAssertTrue(input0.previousTransactionID == txid0)\n                XCTAssertTrue(input0.outpoint.index == 0)\n                let input1 = transaction?.inputs[1] as! BTCTransactionInput\n                XCTAssertTrue(input1.previousTransactionID == txid1)\n                XCTAssertTrue(input1.outpoint.index == 1)\n                let input2 = transaction?.inputs[2] as! BTCTransactionInput\n                XCTAssertTrue(input2.previousTransactionID == txid2)\n                XCTAssertTrue(input2.outpoint.index == 0)\n                let input3 = transaction?.inputs[3] as! BTCTransactionInput\n                XCTAssertTrue(input3.previousTransactionID == txid3)\n                XCTAssertTrue(input3.outpoint.index == 1)\n                let input4 = transaction?.inputs[4] as! BTCTransactionInput\n                XCTAssertTrue(input4.previousTransactionID == txid4)\n                XCTAssertTrue(input4.outpoint.index == 0)\n                let input5 = transaction?.inputs[5] as! BTCTransactionInput\n                XCTAssertTrue(input5.previousTransactionID == txid5)\n                XCTAssertTrue(input5.outpoint.index == 1)\n                let input6 = transaction?.inputs[6] as! BTCTransactionInput\n                XCTAssertTrue(input6.previousTransactionID == txid6)\n                XCTAssertTrue(input6.outpoint.index == 1)\n                let input7 = transaction?.inputs[7] as! BTCTransactionInput\n                XCTAssertTrue(input7.previousTransactionID == txid7)\n                XCTAssertTrue(input7.outpoint.index == 0)\n                let input8 = transaction?.inputs[8] as! BTCTransactionInput\n                XCTAssertTrue(input8.previousTransactionID == txid8)\n                XCTAssertTrue(input8.outpoint.index == 1)\n                let input9 = transaction?.inputs[9] as! BTCTransactionInput\n                XCTAssertTrue(input9.previousTransactionID == txid9)\n                XCTAssertTrue(input9.outpoint.index == 0)\n                let input10 = transaction?.inputs[10] as! BTCTransactionInput\n                XCTAssertTrue(input10.previousTransactionID == txid10)\n                XCTAssertTrue(input10.outpoint.index == 1)\n                let input11 = transaction?.inputs[11] as! BTCTransactionInput\n                XCTAssertTrue(input11.previousTransactionID == txid11)\n                XCTAssertTrue(input11.outpoint.index == 0)\n                let input12 = transaction?.inputs[12] as! BTCTransactionInput\n                XCTAssertTrue(input12.previousTransactionID == txid12)\n                XCTAssertTrue(input12.outpoint.index == 0)\n                let input13 = transaction?.inputs[13] as! BTCTransactionInput\n                XCTAssertTrue(input13.previousTransactionID == txid13)\n                XCTAssertTrue(input13.outpoint.index == 0)\n                let input14 = transaction?.inputs[14] as! BTCTransactionInput\n                XCTAssertTrue(input14.previousTransactionID == txid14)\n                XCTAssertTrue(input14.outpoint.index == 1)\n                let input15 = transaction?.inputs[15] as! BTCTransactionInput\n                XCTAssertTrue(input15.previousTransactionID == txid15)\n                XCTAssertTrue(input15.outpoint.index == 0)\n                let input16 = transaction?.inputs[16] as! BTCTransactionInput\n                XCTAssertTrue(input16.previousTransactionID == txid16)\n                XCTAssertTrue(input16.outpoint.index == 0)\n                \n                \n                XCTAssertTrue(transaction?.outputs.count == 2)\n                let output0 = transaction?.outputs[0] as! BTCTransactionOutput\n                XCTAssertTrue(output0.script.hex == \"76a9144a5fba237213a062f6f57978f796390bdcf8d01588ac\")\n                XCTAssertTrue(output0.value == 400057456)\n                XCTAssertTrue(output0.script.standardAddress.base58String == \"17nFgS1YaDPnXKMPQkZVdNQqZnVqRgBwnZ\")\n                let output1 = transaction?.outputs[1] as! BTCTransactionOutput\n                XCTAssertTrue(output1.script.hex == \"76a9145be32612930b8323add2212a4ec03c1562084f8488ac\")\n                XCTAssertTrue(output1.value == 40000000000)\n                XCTAssertTrue(output1.script.standardAddress.base58String == \"19Nrc2Xm226xmSbeGZ1BVtX7DUm4oCx8Pm\")\n                \n                XCTAssertTrue(realToAddresses.count == 2)\n                XCTAssertTrue(realToAddresses[0] == \"19Nrc2Xm226xmSbeGZ1BVtX7DUm4oCx8Pm\")\n                XCTAssertTrue(realToAddresses[1] == \"17nFgS1YaDPnXKMPQkZVdNQqZnVqRgBwnZ\")\n            }\n\n            testCreateSignedSerializedTransactionHexAndBIP69_2_1()\n            testCreateSignedSerializedTransactionHexAndBIP69_2_2()\n        }\n        \n        func testCreateSignedSerializedTransactionHexAndBIP69_3() -> () {\n            let feeAmount = TLCoin(bitcoinAmount: \"0.00000\", bitcoinDenomination: TLBitcoinDenomination.bitcoin)\n            let toAddress = \"1KAD5EnzzLtrSo2Da2G4zzD7uZrjk8zRAv\"\n            let toAddress2 = \"vJmwhHhMNevDQh188gSeHd2xxxYGBQmnVuMY2yG2MmVTC31UWN5s3vaM3xsM2Q1bUremdK1W7eNVgPg1BnvbTyQuDtMKAYJanahvse\"\n            let toAmount = TLCoin(bitcoinAmount: \"1\", bitcoinDenomination: TLBitcoinDenomination.bitcoin)\n            let toAmount2 = TLCoin(bitcoinAmount: \"24\", bitcoinDenomination: TLBitcoinDenomination.bitcoin)\n            \n            let txid0 = \"35288d269cee1941eaebb2ea85e32b42cdb2b04284a56d8b14dcc3f5c65d6055\"\n            let txid1 = \"35288d269cee1941eaebb2ea85e32b42cdb2b04284a56d8b14dcc3f5c65d6055\"\n            \n            let unspentOutput0 = mockUnspentOutput(txid0, 100000000, 0)\n            let unspentOutput1 = mockUnspentOutput(txid1, 2400000000, 1)\n            let nonce:UInt32 = 123\n            let ephemeralPrivateKeyHex = \"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855\"\n            \n            func testCreateSignedSerializedTransactionHexAndBIP69_3_1() -> () {\n                let toAddressesAndAmounts = [[\"address\": toAddress, \"amount\": toAmount], [\"address\": toAddress2, \"amount\": toAmount2]]\n                \n                accountObject.unspentOutputs = NSMutableArray(capacity: 2)\n                accountObject.unspentOutputs!.add(unspentOutput0)\n                accountObject.unspentOutputs!.add(unspentOutput1)\n                accountObject.stealthPaymentUnspentOutputs = NSMutableArray(capacity: 0)\n                \n                let ret = godSend.createSignedSerializedTransactionHex(toAddressesAndAmounts as NSArray,\n                    feeAmount: feeAmount, nonce: nonce, ephemeralPrivateKeyHex: ephemeralPrivateKeyHex, error: {\n                        (data: String?) in\n                })\n                \n                let txHexAndTxHash = ret.0\n                let realToAddresses = ret.1\n                let txHex = txHexAndTxHash!.object(forKey: \"txHex\") as! String\n                let txHash = txHexAndTxHash!.object(forKey: \"txHash\") as! String\n                let txSize = txHexAndTxHash!.object(forKey: \"txSize\") as! NSNumber\n                XCTAssertTrue(txHash == \"9debd8fa98772ef4110fc3eb07a0a172e7704a148708ada788b2b5560efd445f\")\n                XCTAssertTrue(txHex == \"010000000255605dc6f5c3dc148b6da58442b0b2cd422be385eab2ebea4119ee9c268d2835000000006b483045022100bb8786c01153753ab524a4a40c4d0635489e6bd68ded28e63b06f661977fa9fc022055bcba9bd538a5bb2c375c9b76f64c8a5e65f8d609fe50413d65c71afa6d31c40121027ecba9ebc4699df7f557c4e18192efb5c97b1ff4ecdcebb4e21bb7d1fed2203affffffff55605dc6f5c3dc148b6da58442b0b2cd422be385eab2ebea4119ee9c268d2835010000006a47304402202c4c09455e0fc246617575d335194253a98bfb516943b3c0f14bb40f2676717402200af78f6591c26fc34910f4e43bde46c24538e500c71a781e2fb359b425fbca8e0121027ecba9ebc4699df7f557c4e18192efb5c97b1ff4ecdcebb4e21bb7d1fed2203affffffff030000000000000000286a26060000007b03a34b99f22c790c4e36b2b3c2c35a36db06226e41c692fc82b8b56ac1c540c5bd00e1f505000000001976a914c73015fa62d972ebb3b241fe8c936657b13fabd788ac00180d8f000000001976a914d9bbccb1b996061b735b35841d90844c263fbc7388ac00000000\")\n                XCTAssertTrue(txSize.uintValue == 410)\n\n                let transaction = BTCTransaction(hex: txHex)\n                \n                XCTAssertTrue(transaction?.inputs.count == 2)\n                let input0 = transaction?.inputs[0] as! BTCTransactionInput\n                XCTAssertTrue(input0.previousTransactionID == txid0)\n                XCTAssertTrue(input0.outpoint.index == 0)\n                let input1 = transaction?.inputs[1] as! BTCTransactionInput\n                XCTAssertTrue(input1.previousTransactionID == txid1)\n                XCTAssertTrue(input1.outpoint.index == 1)\n                \n                XCTAssertTrue(transaction?.outputs.count == 3)\n                let output0 = transaction?.outputs[0] as! BTCTransactionOutput\n                XCTAssertTrue(output0.script.hex == \"6a26060000007b03a34b99f22c790c4e36b2b3c2c35a36db06226e41c692fc82b8b56ac1c540c5bd\")\n                XCTAssertTrue(output0.value == 0)\n                XCTAssertTrue(output0.script.standardAddress == nil)\n                let output1 = transaction?.outputs[1] as! BTCTransactionOutput\n                XCTAssertTrue(output1.script.hex == \"76a914c73015fa62d972ebb3b241fe8c936657b13fabd788ac\")\n                XCTAssertTrue(output1.value == 100000000)\n                XCTAssertTrue(output1.script.standardAddress.base58String == \"1KAD5EnzzLtrSo2Da2G4zzD7uZrjk8zRAv\")\n                let output2 = transaction?.outputs[2] as! BTCTransactionOutput\n                XCTAssertTrue(output2.script.hex == \"76a914d9bbccb1b996061b735b35841d90844c263fbc7388ac\")\n                XCTAssertTrue(output2.value == 2400000000)\n                XCTAssertTrue(output2.script.standardAddress.base58String == \"1LrGcAw6WPFK4re5mt4MQfXj9xLeBYojRm\")\n                \n                XCTAssertTrue(realToAddresses.count == 2)\n                XCTAssertTrue(realToAddresses[0] == \"1KAD5EnzzLtrSo2Da2G4zzD7uZrjk8zRAv\")\n                XCTAssertTrue(realToAddresses[1] == \"1LrGcAw6WPFK4re5mt4MQfXj9xLeBYojRm\")\n            }\n            \n            func testCreateSignedSerializedTransactionHexAndBIP69_3_2() -> () {\n                let toAddressesAndAmounts = [[\"address\": toAddress2, \"amount\": toAmount2], [\"address\": toAddress, \"amount\": toAmount]]\n                \n                accountObject.unspentOutputs = NSMutableArray(capacity: 2)\n                accountObject.unspentOutputs!.add(unspentOutput1)\n                accountObject.unspentOutputs!.add(unspentOutput0)\n                accountObject.stealthPaymentUnspentOutputs = NSMutableArray(capacity: 0)\n                \n                let ret = godSend.createSignedSerializedTransactionHex(toAddressesAndAmounts as NSArray,\n                    feeAmount: feeAmount, nonce: nonce, ephemeralPrivateKeyHex: ephemeralPrivateKeyHex, error: {\n                        (data: String?) in\n                })\n                \n                let txHexAndTxHash = ret.0\n                let realToAddresses = ret.1\n                let txHex = txHexAndTxHash!.object(forKey: \"txHex\") as! String\n                let txHash = txHexAndTxHash!.object(forKey: \"txHash\") as! String\n                let txSize = txHexAndTxHash!.object(forKey: \"txSize\") as! NSNumber\n                XCTAssertTrue(txHash == \"9debd8fa98772ef4110fc3eb07a0a172e7704a148708ada788b2b5560efd445f\")\n                XCTAssertTrue(txHex == \"010000000255605dc6f5c3dc148b6da58442b0b2cd422be385eab2ebea4119ee9c268d2835000000006b483045022100bb8786c01153753ab524a4a40c4d0635489e6bd68ded28e63b06f661977fa9fc022055bcba9bd538a5bb2c375c9b76f64c8a5e65f8d609fe50413d65c71afa6d31c40121027ecba9ebc4699df7f557c4e18192efb5c97b1ff4ecdcebb4e21bb7d1fed2203affffffff55605dc6f5c3dc148b6da58442b0b2cd422be385eab2ebea4119ee9c268d2835010000006a47304402202c4c09455e0fc246617575d335194253a98bfb516943b3c0f14bb40f2676717402200af78f6591c26fc34910f4e43bde46c24538e500c71a781e2fb359b425fbca8e0121027ecba9ebc4699df7f557c4e18192efb5c97b1ff4ecdcebb4e21bb7d1fed2203affffffff030000000000000000286a26060000007b03a34b99f22c790c4e36b2b3c2c35a36db06226e41c692fc82b8b56ac1c540c5bd00e1f505000000001976a914c73015fa62d972ebb3b241fe8c936657b13fabd788ac00180d8f000000001976a914d9bbccb1b996061b735b35841d90844c263fbc7388ac00000000\")\n                XCTAssertTrue(txSize.uintValue == 410)\n\n                let transaction = BTCTransaction(hex: txHex)\n                \n                XCTAssertTrue(transaction?.inputs.count == 2)\n                let input0 = transaction?.inputs[0] as! BTCTransactionInput\n                XCTAssertTrue(input0.previousTransactionID == txid0)\n                XCTAssertTrue(input0.outpoint.index == 0)\n                let input1 = transaction?.inputs[1] as! BTCTransactionInput\n                XCTAssertTrue(input1.previousTransactionID == txid1)\n                XCTAssertTrue(input1.outpoint.index == 1)\n                \n                XCTAssertTrue(transaction?.outputs.count == 3)\n                let output0 = transaction?.outputs[0] as! BTCTransactionOutput\n                XCTAssertTrue(output0.script.hex == \"6a26060000007b03a34b99f22c790c4e36b2b3c2c35a36db06226e41c692fc82b8b56ac1c540c5bd\")\n                XCTAssertTrue(output0.value == 0)\n                XCTAssertTrue(output0.script.standardAddress == nil)\n                let output1 = transaction?.outputs[1] as! BTCTransactionOutput\n                XCTAssertTrue(output1.script.hex == \"76a914c73015fa62d972ebb3b241fe8c936657b13fabd788ac\")\n                XCTAssertTrue(output1.value == 100000000)\n                XCTAssertTrue(output1.script.standardAddress.base58String == \"1KAD5EnzzLtrSo2Da2G4zzD7uZrjk8zRAv\")\n                let output2 = transaction?.outputs[2] as! BTCTransactionOutput\n                XCTAssertTrue(output2.script.hex == \"76a914d9bbccb1b996061b735b35841d90844c263fbc7388ac\")\n                XCTAssertTrue(output2.value == 2400000000)\n                XCTAssertTrue(output2.script.standardAddress.base58String == \"1LrGcAw6WPFK4re5mt4MQfXj9xLeBYojRm\")\n                \n                XCTAssertTrue(realToAddresses.count == 2)\n                XCTAssertTrue(realToAddresses[0] == \"1LrGcAw6WPFK4re5mt4MQfXj9xLeBYojRm\")\n                XCTAssertTrue(realToAddresses[1] == \"1KAD5EnzzLtrSo2Da2G4zzD7uZrjk8zRAv\")\n            }\n            \n            testCreateSignedSerializedTransactionHexAndBIP69_3_1()\n            testCreateSignedSerializedTransactionHexAndBIP69_3_2()\n        }\n        \n        func testCreateSignedSerializedTransactionHexAndBIP69_4() -> () {\n            let feeAmount = TLCoin(bitcoinAmount: \"0.00002735\", bitcoinDenomination: TLBitcoinDenomination.bitcoin)\n            let toAddress = \"vJmwhHhMNevDQh188gSeHd2xxxYGBQmnVuMY2yG2MmVTC31UWN5s3vaM3xsM2Q1bUremdK1W7eNVgPg1BnvbTyQuDtMKAYJanahvse\"\n            let toAddress2 = \"19Nrc2Xm226xmSbeGZ1BVtX7DUm4oCx8Pm\"\n            let toAmount = TLCoin(bitcoinAmount: \"4.00057456\", bitcoinDenomination: TLBitcoinDenomination.bitcoin)\n            let toAmount2 = TLCoin(bitcoinAmount: \"400\", bitcoinDenomination: TLBitcoinDenomination.bitcoin)\n            \n            let txid0 = \"0e53ec5dfb2cb8a71fec32dc9a634a35b7e24799295ddd5278217822e0b31f57\"\n            let txid1 = \"26aa6e6d8b9e49bb0630aac301db6757c02e3619feb4ee0eea81eb1672947024\"\n            let txid2 = \"28e0fdd185542f2c6ea19030b0796051e7772b6026dd5ddccd7a2f93b73e6fc2\"\n            let txid3 = \"381de9b9ae1a94d9c17f6a08ef9d341a5ce29e2e60c36a52d333ff6203e58d5d\"\n            let txid4 = \"3b8b2f8efceb60ba78ca8bba206a137f14cb5ea4035e761ee204302d46b98de2\"\n            let txid5 = \"402b2c02411720bf409eff60d05adad684f135838962823f3614cc657dd7bc0a\"\n            let txid6 = \"54ffff182965ed0957dba1239c27164ace5a73c9b62a660c74b7b7f15ff61e7a\"\n            let txid7 = \"643e5f4e66373a57251fb173151e838ccd27d279aca882997e005016bb53d5aa\"\n            let txid8 = \"6c1d56f31b2de4bfc6aaea28396b333102b1f600da9c6d6149e96ca43f1102b1\"\n            let txid9 = \"7a1de137cbafb5c70405455c49c5104ca3057a1f1243e6563bb9245c9c88c191\"\n            let txid10 = \"7d037ceb2ee0dc03e82f17be7935d238b35d1deabf953a892a4507bfbeeb3ba4\"\n            let txid11 = \"a5e899dddb28776ea9ddac0a502316d53a4a3fca607c72f66c470e0412e34086\"\n            let txid12 = \"b4112b8f900a7ca0c8b0e7c4dfad35c6be5f6be46b3458974988e1cdb2fa61b8\"\n            let txid13 = \"bafd65e3c7f3f9fdfdc1ddb026131b278c3be1af90a4a6ffa78c4658f9ec0c85\"\n            let txid14 = \"de0411a1e97484a2804ff1dbde260ac19de841bebad1880c782941aca883b4e9\"\n            let txid15 = \"f0a130a84912d03c1d284974f563c5949ac13f8342b8112edff52971599e6a45\"\n            let txid16 = \"f320832a9d2e2452af63154bc687493484a0e7745ebd3aaf9ca19eb80834ad60\"\n\n            let unspentOutput0 = mockUnspentOutput(txid0, 2529937904, 0)\n            let unspentOutput1 = mockUnspentOutput(txid1, 2521656792, 1)\n            let unspentOutput2 = mockUnspentOutput(txid2, 2509683086, 0)\n            let unspentOutput3 = mockUnspentOutput(txid3, 2506060377, 1)\n            let unspentOutput4 = mockUnspentOutput(txid4, 2510645247, 0)\n            let unspentOutput5 = mockUnspentOutput(txid5, 2502325820, 1)\n            let unspentOutput6 = mockUnspentOutput(txid6, 2525953727, 1)\n            let unspentOutput7 = mockUnspentOutput(txid7, 2507302856, 0)\n            let unspentOutput8 = mockUnspentOutput(txid8, 2534185804, 1)\n            let unspentOutput9 = mockUnspentOutput(txid9, 136219905, 0)\n            let unspentOutput10 = mockUnspentOutput(txid10, 2502901118, 1)\n            let unspentOutput11 = mockUnspentOutput(txid11, 2527569363, 0)\n            let unspentOutput12 = mockUnspentOutput(txid12, 2516268302, 0)\n            let unspentOutput13 = mockUnspentOutput(txid13, 2521794404, 0)\n            let unspentOutput14 = mockUnspentOutput(txid14, 2520533680, 1)\n            let unspentOutput15 = mockUnspentOutput(txid15, 2513840095, 0)\n            let unspentOutput16 = mockUnspentOutput(txid16, 2513181711, 0)\n            \n            let nonce:UInt32 = 123\n            let ephemeralPrivateKeyHex = \"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855\"\n            \n            func testCreateSignedSerializedTransactionHexAndBIP69_4_1() -> () {\n                let toAddressesAndAmounts = [[\"address\": toAddress, \"amount\": toAmount], [\"address\": toAddress2, \"amount\": toAmount2]]\n                \n                accountObject.unspentOutputs = NSMutableArray(capacity: 17)\n                accountObject.unspentOutputs!.add(unspentOutput0)\n                accountObject.unspentOutputs!.add(unspentOutput1)\n                accountObject.unspentOutputs!.add(unspentOutput2)\n                accountObject.unspentOutputs!.add(unspentOutput3)\n                accountObject.unspentOutputs!.add(unspentOutput4)\n                accountObject.unspentOutputs!.add(unspentOutput5)\n                accountObject.unspentOutputs!.add(unspentOutput6)\n                accountObject.unspentOutputs!.add(unspentOutput7)\n                accountObject.unspentOutputs!.add(unspentOutput8)\n                accountObject.unspentOutputs!.add(unspentOutput9)\n                accountObject.unspentOutputs!.add(unspentOutput10)\n                accountObject.unspentOutputs!.add(unspentOutput11)\n                accountObject.unspentOutputs!.add(unspentOutput12)\n                accountObject.unspentOutputs!.add(unspentOutput13)\n                accountObject.unspentOutputs!.add(unspentOutput14)\n                accountObject.unspentOutputs!.add(unspentOutput15)\n                accountObject.unspentOutputs!.add(unspentOutput16)\n                \n                accountObject.stealthPaymentUnspentOutputs = NSMutableArray(capacity: 0)\n                \n                let ret = godSend.createSignedSerializedTransactionHex(toAddressesAndAmounts as NSArray,\n                    feeAmount: feeAmount, nonce: nonce, ephemeralPrivateKeyHex: ephemeralPrivateKeyHex, error: {\n                    (data: String?) in\n                })\n                \n                let txHexAndTxHash = ret.0\n                let realToAddresses = ret.1\n                let txHex = txHexAndTxHash!.object(forKey: \"txHex\") as! String\n                let txHash = txHexAndTxHash!.object(forKey: \"txHash\") as! String\n                let txSize = txHexAndTxHash!.object(forKey: \"txSize\") as! NSNumber\n                XCTAssertTrue(txHash == \"b982687699c5bbd6ee36b157c3b34b3d3370945e68b63c987cdf880dbe475706\")\n                XCTAssertTrue(txHex == \"0100000011571fb3e02278217852dd5d299947e2b7354a639adc32ec1fa7b82cfb5dec530e000000006b483045022100d9e6a6677e63574fd5216957f0652334acf64343192064c4f19c5c8daad1f796022041cbcc403865f92b2804e2d04cfa165dd42bd75c247055c626901507479f923c0121027ecba9ebc4699df7f557c4e18192efb5c97b1ff4ecdcebb4e21bb7d1fed2203affffffff2470947216eb81ea0eeeb4fe19362ec05767db01c3aa3006bb499e8b6d6eaa26010000006a47304402204a6451764251502cfdcac44deab397e538e5c33fdf354116bcf3dd8088b47c450220345f69761d82e03e88dce29f37e6bccdffce78e3b640d089a377079950006fba0121027ecba9ebc4699df7f557c4e18192efb5c97b1ff4ecdcebb4e21bb7d1fed2203affffffffc26f3eb7932f7acddc5ddd26602b77e7516079b03090a16e2c2f5485d1fde028000000006b48304502210080577b722d775c9ab9acba7f90b6ee0187395c65824c52ee96a83d9582b27761022063aafc98452e62ee85d99082c96d9dae4071ed0b5f822a4ab211428336e937440121027ecba9ebc4699df7f557c4e18192efb5c97b1ff4ecdcebb4e21bb7d1fed2203affffffff5d8de50362ff33d3526ac3602e9ee25c1a349def086a7fc1d9941aaeb9e91d38010000006b483045022100a2279a85d58b05822dbc1ba9cb4c22a9efaf4e3e2d0aaf4c140f6232b90339cf02202e88942afcc0defc3839e764e7358e5065e9bcc6a437f3a1f9e60a912e5cd0180121027ecba9ebc4699df7f557c4e18192efb5c97b1ff4ecdcebb4e21bb7d1fed2203affffffffe28db9462d3004e21e765e03a45ecb147f136a20ba8bca78ba60ebfc8e2f8b3b000000006b483045022100d431504d890b2acdc45f618ddc53c2a7accb01d9273afbaa31d5beb71c9bb4de02200797a199a0783d16397152db1159fc8594946ca876ef3586f06be36afc0915230121027ecba9ebc4699df7f557c4e18192efb5c97b1ff4ecdcebb4e21bb7d1fed2203affffffff0abcd77d65cc14363f8262898335f184d6da5ad060ff9e40bf201741022c2b40010000006b4830450221008424d7c4bc369a735b92c0f367f5bead679bc82b77ac3ea527002a795299e5cd02200bd017178c46caf204cd3283daed2539a525051e3a73f10f23175d4a90a6d21e0121027ecba9ebc4699df7f557c4e18192efb5c97b1ff4ecdcebb4e21bb7d1fed2203affffffff7a1ef65ff1b7b7740c662ab6c9735ace4a16279c23a1db5709ed652918ffff54010000006b483045022100bec61f4a8aa3ed122f02663d162ea8d06b65730a1400bb58586783c4155c4ecc022037ba1f6434685252902ca095317299e9facb634216e94677e444182c15d4b8dc0121027ecba9ebc4699df7f557c4e18192efb5c97b1ff4ecdcebb4e21bb7d1fed2203affffffffaad553bb1650007e9982a8ac79d227cd8c831e1573b11f25573a37664e5f3e64000000006b483045022100b090ff8248aa3f6ea9026861ecbf91e60859801d04fbc4ad54eb3f7497a482c90220128a6dcb1d2d17033aa3e002fcec7fa54b0f817f56abf14d5d37574f2dcf2d1d0121027ecba9ebc4699df7f557c4e18192efb5c97b1ff4ecdcebb4e21bb7d1fed2203affffffffb102113fa46ce949616d9cda00f6b10231336b3928eaaac6bfe42d1bf3561d6c010000006b483045022100cb8f6d41cb664bee9fe86417e6b6b61452fdcc7c652fe66c46cddae49a678fcb02201f8c040f0a034602015ad2cbf4e6c058077366633c7d3fd5df626de03a091e7b0121027ecba9ebc4699df7f557c4e18192efb5c97b1ff4ecdcebb4e21bb7d1fed2203affffffff91c1889c5c24b93b56e643121f7a05a34c10c5495c450504c7b5afcb37e11d7a000000006a47304402200cd323984290d2ef6d7ad01942102ea0cceee9b897103ef385719c6f2b57963702201d9dd8c3ea68ea02b6a3ee4a19c18f899d8b02da549f914dd917489c067e7e8e0121027ecba9ebc4699df7f557c4e18192efb5c97b1ff4ecdcebb4e21bb7d1fed2203affffffffa43bebbebf07452a893a95bfea1d5db338d23579be172fe803dce02eeb7c037d010000006b483045022100be493ef5d839eea19d68e8a3a037fc2f7eb41655d511169a4a8b653ab9d86ca30220416cb1f8dfc83a322de2617e007521dbd408d5ef776193400351c046cbde3d780121027ecba9ebc4699df7f557c4e18192efb5c97b1ff4ecdcebb4e21bb7d1fed2203affffffff8640e312040e476cf6727c60ca3f4a3ad51623500aacdda96e7728dbdd99e8a5000000006a47304402200b746b555bf44674ca15ba71ca751719311244f3ba0a5a492fe685fdf7a95dcf0220357f17f4af7a322ca18fc65ddd87580e75bb9988023a11ab00b2f4243c7b6b150121027ecba9ebc4699df7f557c4e18192efb5c97b1ff4ecdcebb4e21bb7d1fed2203affffffffb861fab2cde188499758346be46b5fbec635addfc4e7b0c8a07c0a908f2b11b4000000006b4830450221008c0b600801fed1af9c9400daf9c345f27837670a7acd0f1dcdbbbeb7925bad1f022017ef87eabf09308b2f11e63dcb15c4007a907b78afcad4931f9129355ed57b390121027ecba9ebc4699df7f557c4e18192efb5c97b1ff4ecdcebb4e21bb7d1fed2203affffffff850cecf958468ca7ffa6a490afe13b8c271b1326b0ddc1fdfdf9f3c7e365fdba000000006b483045022100bcfe32a695abde4c66996b9d38b6be73a70abfcbe09fcc564f4aa1e0c51fd93b0220579cb2061627efbf9ce1748284f9ecedbe72ccdbc9010cb673e64f2aa58c51d90121027ecba9ebc4699df7f557c4e18192efb5c97b1ff4ecdcebb4e21bb7d1fed2203affffffffe9b483a8ac4129780c88d1babe41e89dc10a26dedbf14f80a28474e9a11104de010000006a47304402204eeedb2a870d7c1f9aa74a9edc166eda1d80a63c39c5d964c9c4b92db14c1bdd02207e70e0d5740835419f82c23580fdeed491ab872c2fe8a51b4f03fdb817ebfe850121027ecba9ebc4699df7f557c4e18192efb5c97b1ff4ecdcebb4e21bb7d1fed2203affffffff456a9e597129f5df2e11b842833fc19a94c563f57449281d3cd01249a830a1f0000000006b483045022100c3c3a47e694c6e9c1d43ae89bfe97a387c45e17d99f79707a6a4df006f5561240220573c40748cc42c45038ac718963eb6385c75216b70249dfb9f8f9d67ae569b9a0121027ecba9ebc4699df7f557c4e18192efb5c97b1ff4ecdcebb4e21bb7d1fed2203affffffff60ad3408b89ea19caf3abd5e74e7a084344987c64b1563af52242e9d2a8320f3000000006a47304402202744a81ba331f89bc0f39c2eb241460a279347e070df57c60148dd7c6ae1778102200616c24bf72cd82a49e0419634388bed2516e4b95dc68dd846851742e15f3cec0121027ecba9ebc4699df7f557c4e18192efb5c97b1ff4ecdcebb4e21bb7d1fed2203affffffff030000000000000000286a26060000007b03a34b99f22c790c4e36b2b3c2c35a36db06226e41c692fc82b8b56ac1c540c5bd7064d817000000001976a914d9bbccb1b996061b735b35841d90844c263fbc7388ac00902f50090000001976a9145be32612930b8323add2212a4ec03c1562084f8488ac00000000\")\n                XCTAssertTrue(txSize.uintValue == 2645)\n\n                let transaction = BTCTransaction(hex: txHex)\n                \n                XCTAssertTrue(transaction?.inputs.count == 17)\n                let input0 = transaction?.inputs[0] as! BTCTransactionInput\n                XCTAssertTrue(input0.previousTransactionID == txid0)\n                XCTAssertTrue(input0.outpoint.index == 0)\n                let input1 = transaction?.inputs[1] as! BTCTransactionInput\n                XCTAssertTrue(input1.previousTransactionID == txid1)\n                XCTAssertTrue(input1.outpoint.index == 1)\n                let input2 = transaction?.inputs[2] as! BTCTransactionInput\n                XCTAssertTrue(input2.previousTransactionID == txid2)\n                XCTAssertTrue(input2.outpoint.index == 0)\n                let input3 = transaction?.inputs[3] as! BTCTransactionInput\n                XCTAssertTrue(input3.previousTransactionID == txid3)\n                XCTAssertTrue(input3.outpoint.index == 1)\n                let input4 = transaction?.inputs[4] as! BTCTransactionInput\n                XCTAssertTrue(input4.previousTransactionID == txid4)\n                XCTAssertTrue(input4.outpoint.index == 0)\n                let input5 = transaction?.inputs[5] as! BTCTransactionInput\n                XCTAssertTrue(input5.previousTransactionID == txid5)\n                XCTAssertTrue(input5.outpoint.index == 1)\n                let input6 = transaction?.inputs[6] as! BTCTransactionInput\n                XCTAssertTrue(input6.previousTransactionID == txid6)\n                XCTAssertTrue(input6.outpoint.index == 1)\n                let input7 = transaction?.inputs[7] as! BTCTransactionInput\n                XCTAssertTrue(input7.previousTransactionID == txid7)\n                XCTAssertTrue(input7.outpoint.index == 0)\n                let input8 = transaction?.inputs[8] as! BTCTransactionInput\n                XCTAssertTrue(input8.previousTransactionID == txid8)\n                XCTAssertTrue(input8.outpoint.index == 1)\n                let input9 = transaction?.inputs[9] as! BTCTransactionInput\n                XCTAssertTrue(input9.previousTransactionID == txid9)\n                XCTAssertTrue(input9.outpoint.index == 0)\n                let input10 = transaction?.inputs[10] as! BTCTransactionInput\n                XCTAssertTrue(input10.previousTransactionID == txid10)\n                XCTAssertTrue(input10.outpoint.index == 1)\n                let input11 = transaction?.inputs[11] as! BTCTransactionInput\n                XCTAssertTrue(input11.previousTransactionID == txid11)\n                XCTAssertTrue(input11.outpoint.index == 0)\n                let input12 = transaction?.inputs[12] as! BTCTransactionInput\n                XCTAssertTrue(input12.previousTransactionID == txid12)\n                XCTAssertTrue(input12.outpoint.index == 0)\n                let input13 = transaction?.inputs[13] as! BTCTransactionInput\n                XCTAssertTrue(input13.previousTransactionID == txid13)\n                XCTAssertTrue(input13.outpoint.index == 0)\n                let input14 = transaction?.inputs[14] as! BTCTransactionInput\n                XCTAssertTrue(input14.previousTransactionID == txid14)\n                XCTAssertTrue(input14.outpoint.index == 1)\n                let input15 = transaction?.inputs[15] as! BTCTransactionInput\n                XCTAssertTrue(input15.previousTransactionID == txid15)\n                XCTAssertTrue(input15.outpoint.index == 0)\n                let input16 = transaction?.inputs[16] as! BTCTransactionInput\n                XCTAssertTrue(input16.previousTransactionID == txid16)\n                XCTAssertTrue(input16.outpoint.index == 0)\n                \n                XCTAssertTrue(transaction?.outputs.count == 3)\n                let output0 = transaction?.outputs[0] as! BTCTransactionOutput\n                XCTAssertTrue(output0.script.hex == \"6a26060000007b03a34b99f22c790c4e36b2b3c2c35a36db06226e41c692fc82b8b56ac1c540c5bd\")\n                XCTAssertTrue(output0.value == 0)\n                XCTAssertTrue(output0.script.standardAddress == nil)\n                let output1 = transaction?.outputs[1] as! BTCTransactionOutput\n                XCTAssertTrue(output1.script.hex == \"76a914d9bbccb1b996061b735b35841d90844c263fbc7388ac\")\n                XCTAssertTrue(output1.value == 400057456)\n                XCTAssertTrue(output1.script.standardAddress.base58String == \"1LrGcAw6WPFK4re5mt4MQfXj9xLeBYojRm\")\n                let output2 = transaction?.outputs[2] as! BTCTransactionOutput\n                XCTAssertTrue(output2.script.hex == \"76a9145be32612930b8323add2212a4ec03c1562084f8488ac\")\n                XCTAssertTrue(output2.value == 40000000000)\n                XCTAssertTrue(output2.script.standardAddress.base58String == \"19Nrc2Xm226xmSbeGZ1BVtX7DUm4oCx8Pm\")\n                \n                XCTAssertTrue(realToAddresses.count == 2)\n                XCTAssertTrue(realToAddresses[0] == \"1LrGcAw6WPFK4re5mt4MQfXj9xLeBYojRm\")\n                XCTAssertTrue(realToAddresses[1] == \"19Nrc2Xm226xmSbeGZ1BVtX7DUm4oCx8Pm\")\n            }\n            \n            func testCreateSignedSerializedTransactionHexAndBIP69_4_2() -> () {\n                let toAddressesAndAmounts = [[\"address\": toAddress2, \"amount\": toAmount2], [\"address\": toAddress, \"amount\": toAmount]]\n                \n                accountObject.unspentOutputs = NSMutableArray(capacity: 17)\n                accountObject.unspentOutputs!.add(unspentOutput5)\n                accountObject.unspentOutputs!.add(unspentOutput2)\n                accountObject.unspentOutputs!.add(unspentOutput15)\n                accountObject.unspentOutputs!.add(unspentOutput0)\n                accountObject.unspentOutputs!.add(unspentOutput1)\n                accountObject.unspentOutputs!.add(unspentOutput6)\n                accountObject.unspentOutputs!.add(unspentOutput4)\n                accountObject.unspentOutputs!.add(unspentOutput7)\n                accountObject.unspentOutputs!.add(unspentOutput3)\n                accountObject.unspentOutputs!.add(unspentOutput13)\n                accountObject.unspentOutputs!.add(unspentOutput9)\n                accountObject.unspentOutputs!.add(unspentOutput10)\n                accountObject.unspentOutputs!.add(unspentOutput8)\n                accountObject.unspentOutputs!.add(unspentOutput11)\n                accountObject.unspentOutputs!.add(unspentOutput14)\n                accountObject.unspentOutputs!.add(unspentOutput12)\n                accountObject.unspentOutputs!.add(unspentOutput16)\n                \n                accountObject.stealthPaymentUnspentOutputs = NSMutableArray(capacity: 0)\n                \n                let ret = godSend.createSignedSerializedTransactionHex(toAddressesAndAmounts as NSArray,\n                    feeAmount: feeAmount, nonce: nonce, ephemeralPrivateKeyHex: ephemeralPrivateKeyHex, error: {\n                    (data: String?) in\n                })\n                \n                let txHexAndTxHash = ret.0\n                let realToAddresses = ret.1\n                let txHex = txHexAndTxHash!.object(forKey: \"txHex\") as! String\n                let txHash = txHexAndTxHash!.object(forKey: \"txHash\") as! String\n                let txSize = txHexAndTxHash!.object(forKey: \"txSize\") as! NSNumber\n                XCTAssertTrue(txHash == \"b982687699c5bbd6ee36b157c3b34b3d3370945e68b63c987cdf880dbe475706\")\n                XCTAssertTrue(txHex == \"0100000011571fb3e02278217852dd5d299947e2b7354a639adc32ec1fa7b82cfb5dec530e000000006b483045022100d9e6a6677e63574fd5216957f0652334acf64343192064c4f19c5c8daad1f796022041cbcc403865f92b2804e2d04cfa165dd42bd75c247055c626901507479f923c0121027ecba9ebc4699df7f557c4e18192efb5c97b1ff4ecdcebb4e21bb7d1fed2203affffffff2470947216eb81ea0eeeb4fe19362ec05767db01c3aa3006bb499e8b6d6eaa26010000006a47304402204a6451764251502cfdcac44deab397e538e5c33fdf354116bcf3dd8088b47c450220345f69761d82e03e88dce29f37e6bccdffce78e3b640d089a377079950006fba0121027ecba9ebc4699df7f557c4e18192efb5c97b1ff4ecdcebb4e21bb7d1fed2203affffffffc26f3eb7932f7acddc5ddd26602b77e7516079b03090a16e2c2f5485d1fde028000000006b48304502210080577b722d775c9ab9acba7f90b6ee0187395c65824c52ee96a83d9582b27761022063aafc98452e62ee85d99082c96d9dae4071ed0b5f822a4ab211428336e937440121027ecba9ebc4699df7f557c4e18192efb5c97b1ff4ecdcebb4e21bb7d1fed2203affffffff5d8de50362ff33d3526ac3602e9ee25c1a349def086a7fc1d9941aaeb9e91d38010000006b483045022100a2279a85d58b05822dbc1ba9cb4c22a9efaf4e3e2d0aaf4c140f6232b90339cf02202e88942afcc0defc3839e764e7358e5065e9bcc6a437f3a1f9e60a912e5cd0180121027ecba9ebc4699df7f557c4e18192efb5c97b1ff4ecdcebb4e21bb7d1fed2203affffffffe28db9462d3004e21e765e03a45ecb147f136a20ba8bca78ba60ebfc8e2f8b3b000000006b483045022100d431504d890b2acdc45f618ddc53c2a7accb01d9273afbaa31d5beb71c9bb4de02200797a199a0783d16397152db1159fc8594946ca876ef3586f06be36afc0915230121027ecba9ebc4699df7f557c4e18192efb5c97b1ff4ecdcebb4e21bb7d1fed2203affffffff0abcd77d65cc14363f8262898335f184d6da5ad060ff9e40bf201741022c2b40010000006b4830450221008424d7c4bc369a735b92c0f367f5bead679bc82b77ac3ea527002a795299e5cd02200bd017178c46caf204cd3283daed2539a525051e3a73f10f23175d4a90a6d21e0121027ecba9ebc4699df7f557c4e18192efb5c97b1ff4ecdcebb4e21bb7d1fed2203affffffff7a1ef65ff1b7b7740c662ab6c9735ace4a16279c23a1db5709ed652918ffff54010000006b483045022100bec61f4a8aa3ed122f02663d162ea8d06b65730a1400bb58586783c4155c4ecc022037ba1f6434685252902ca095317299e9facb634216e94677e444182c15d4b8dc0121027ecba9ebc4699df7f557c4e18192efb5c97b1ff4ecdcebb4e21bb7d1fed2203affffffffaad553bb1650007e9982a8ac79d227cd8c831e1573b11f25573a37664e5f3e64000000006b483045022100b090ff8248aa3f6ea9026861ecbf91e60859801d04fbc4ad54eb3f7497a482c90220128a6dcb1d2d17033aa3e002fcec7fa54b0f817f56abf14d5d37574f2dcf2d1d0121027ecba9ebc4699df7f557c4e18192efb5c97b1ff4ecdcebb4e21bb7d1fed2203affffffffb102113fa46ce949616d9cda00f6b10231336b3928eaaac6bfe42d1bf3561d6c010000006b483045022100cb8f6d41cb664bee9fe86417e6b6b61452fdcc7c652fe66c46cddae49a678fcb02201f8c040f0a034602015ad2cbf4e6c058077366633c7d3fd5df626de03a091e7b0121027ecba9ebc4699df7f557c4e18192efb5c97b1ff4ecdcebb4e21bb7d1fed2203affffffff91c1889c5c24b93b56e643121f7a05a34c10c5495c450504c7b5afcb37e11d7a000000006a47304402200cd323984290d2ef6d7ad01942102ea0cceee9b897103ef385719c6f2b57963702201d9dd8c3ea68ea02b6a3ee4a19c18f899d8b02da549f914dd917489c067e7e8e0121027ecba9ebc4699df7f557c4e18192efb5c97b1ff4ecdcebb4e21bb7d1fed2203affffffffa43bebbebf07452a893a95bfea1d5db338d23579be172fe803dce02eeb7c037d010000006b483045022100be493ef5d839eea19d68e8a3a037fc2f7eb41655d511169a4a8b653ab9d86ca30220416cb1f8dfc83a322de2617e007521dbd408d5ef776193400351c046cbde3d780121027ecba9ebc4699df7f557c4e18192efb5c97b1ff4ecdcebb4e21bb7d1fed2203affffffff8640e312040e476cf6727c60ca3f4a3ad51623500aacdda96e7728dbdd99e8a5000000006a47304402200b746b555bf44674ca15ba71ca751719311244f3ba0a5a492fe685fdf7a95dcf0220357f17f4af7a322ca18fc65ddd87580e75bb9988023a11ab00b2f4243c7b6b150121027ecba9ebc4699df7f557c4e18192efb5c97b1ff4ecdcebb4e21bb7d1fed2203affffffffb861fab2cde188499758346be46b5fbec635addfc4e7b0c8a07c0a908f2b11b4000000006b4830450221008c0b600801fed1af9c9400daf9c345f27837670a7acd0f1dcdbbbeb7925bad1f022017ef87eabf09308b2f11e63dcb15c4007a907b78afcad4931f9129355ed57b390121027ecba9ebc4699df7f557c4e18192efb5c97b1ff4ecdcebb4e21bb7d1fed2203affffffff850cecf958468ca7ffa6a490afe13b8c271b1326b0ddc1fdfdf9f3c7e365fdba000000006b483045022100bcfe32a695abde4c66996b9d38b6be73a70abfcbe09fcc564f4aa1e0c51fd93b0220579cb2061627efbf9ce1748284f9ecedbe72ccdbc9010cb673e64f2aa58c51d90121027ecba9ebc4699df7f557c4e18192efb5c97b1ff4ecdcebb4e21bb7d1fed2203affffffffe9b483a8ac4129780c88d1babe41e89dc10a26dedbf14f80a28474e9a11104de010000006a47304402204eeedb2a870d7c1f9aa74a9edc166eda1d80a63c39c5d964c9c4b92db14c1bdd02207e70e0d5740835419f82c23580fdeed491ab872c2fe8a51b4f03fdb817ebfe850121027ecba9ebc4699df7f557c4e18192efb5c97b1ff4ecdcebb4e21bb7d1fed2203affffffff456a9e597129f5df2e11b842833fc19a94c563f57449281d3cd01249a830a1f0000000006b483045022100c3c3a47e694c6e9c1d43ae89bfe97a387c45e17d99f79707a6a4df006f5561240220573c40748cc42c45038ac718963eb6385c75216b70249dfb9f8f9d67ae569b9a0121027ecba9ebc4699df7f557c4e18192efb5c97b1ff4ecdcebb4e21bb7d1fed2203affffffff60ad3408b89ea19caf3abd5e74e7a084344987c64b1563af52242e9d2a8320f3000000006a47304402202744a81ba331f89bc0f39c2eb241460a279347e070df57c60148dd7c6ae1778102200616c24bf72cd82a49e0419634388bed2516e4b95dc68dd846851742e15f3cec0121027ecba9ebc4699df7f557c4e18192efb5c97b1ff4ecdcebb4e21bb7d1fed2203affffffff030000000000000000286a26060000007b03a34b99f22c790c4e36b2b3c2c35a36db06226e41c692fc82b8b56ac1c540c5bd7064d817000000001976a914d9bbccb1b996061b735b35841d90844c263fbc7388ac00902f50090000001976a9145be32612930b8323add2212a4ec03c1562084f8488ac00000000\")\n                XCTAssertTrue(txSize.uintValue == 2645)\n\n                let transaction = BTCTransaction(hex: txHex)\n                \n                XCTAssertTrue(transaction?.inputs.count == 17)\n                let input0 = transaction?.inputs[0] as! BTCTransactionInput\n                XCTAssertTrue(input0.previousTransactionID == txid0)\n                XCTAssertTrue(input0.outpoint.index == 0)\n                let input1 = transaction?.inputs[1] as! BTCTransactionInput\n                XCTAssertTrue(input1.previousTransactionID == txid1)\n                XCTAssertTrue(input1.outpoint.index == 1)\n                let input2 = transaction?.inputs[2] as! BTCTransactionInput\n                XCTAssertTrue(input2.previousTransactionID == txid2)\n                XCTAssertTrue(input2.outpoint.index == 0)\n                let input3 = transaction?.inputs[3] as! BTCTransactionInput\n                XCTAssertTrue(input3.previousTransactionID == txid3)\n                XCTAssertTrue(input3.outpoint.index == 1)\n                let input4 = transaction?.inputs[4] as! BTCTransactionInput\n                XCTAssertTrue(input4.previousTransactionID == txid4)\n                XCTAssertTrue(input4.outpoint.index == 0)\n                let input5 = transaction?.inputs[5] as! BTCTransactionInput\n                XCTAssertTrue(input5.previousTransactionID == txid5)\n                XCTAssertTrue(input5.outpoint.index == 1)\n                let input6 = transaction?.inputs[6] as! BTCTransactionInput\n                XCTAssertTrue(input6.previousTransactionID == txid6)\n                XCTAssertTrue(input6.outpoint.index == 1)\n                let input7 = transaction?.inputs[7] as! BTCTransactionInput\n                XCTAssertTrue(input7.previousTransactionID == txid7)\n                XCTAssertTrue(input7.outpoint.index == 0)\n                let input8 = transaction?.inputs[8] as! BTCTransactionInput\n                XCTAssertTrue(input8.previousTransactionID == txid8)\n                XCTAssertTrue(input8.outpoint.index == 1)\n                let input9 = transaction?.inputs[9] as! BTCTransactionInput\n                XCTAssertTrue(input9.previousTransactionID == txid9)\n                XCTAssertTrue(input9.outpoint.index == 0)\n                let input10 = transaction?.inputs[10] as! BTCTransactionInput\n                XCTAssertTrue(input10.previousTransactionID == txid10)\n                XCTAssertTrue(input10.outpoint.index == 1)\n                let input11 = transaction?.inputs[11] as! BTCTransactionInput\n                XCTAssertTrue(input11.previousTransactionID == txid11)\n                XCTAssertTrue(input11.outpoint.index == 0)\n                let input12 = transaction?.inputs[12] as! BTCTransactionInput\n                XCTAssertTrue(input12.previousTransactionID == txid12)\n                XCTAssertTrue(input12.outpoint.index == 0)\n                let input13 = transaction?.inputs[13] as! BTCTransactionInput\n                XCTAssertTrue(input13.previousTransactionID == txid13)\n                XCTAssertTrue(input13.outpoint.index == 0)\n                let input14 = transaction?.inputs[14] as! BTCTransactionInput\n                XCTAssertTrue(input14.previousTransactionID == txid14)\n                XCTAssertTrue(input14.outpoint.index == 1)\n                let input15 = transaction?.inputs[15] as! BTCTransactionInput\n                XCTAssertTrue(input15.previousTransactionID == txid15)\n                XCTAssertTrue(input15.outpoint.index == 0)\n                let input16 = transaction?.inputs[16] as! BTCTransactionInput\n                XCTAssertTrue(input16.previousTransactionID == txid16)\n                XCTAssertTrue(input16.outpoint.index == 0)\n                \n                \n                XCTAssertTrue(transaction?.outputs.count == 3)\n                let output0 = transaction?.outputs[0] as! BTCTransactionOutput\n                XCTAssertTrue(output0.script.hex == \"6a26060000007b03a34b99f22c790c4e36b2b3c2c35a36db06226e41c692fc82b8b56ac1c540c5bd\")\n                XCTAssertTrue(output0.value == 0)\n                XCTAssertTrue(output0.script.standardAddress == nil)\n                let output1 = transaction?.outputs[1] as! BTCTransactionOutput\n                XCTAssertTrue(output1.script.hex == \"76a914d9bbccb1b996061b735b35841d90844c263fbc7388ac\")\n                XCTAssertTrue(output1.value == 400057456)\n                XCTAssertTrue(output1.script.standardAddress.base58String == \"1LrGcAw6WPFK4re5mt4MQfXj9xLeBYojRm\")\n                let output2 = transaction?.outputs[2] as! BTCTransactionOutput\n                XCTAssertTrue(output2.script.hex == \"76a9145be32612930b8323add2212a4ec03c1562084f8488ac\")\n                XCTAssertTrue(output2.value == 40000000000)\n                XCTAssertTrue(output2.script.standardAddress.base58String == \"19Nrc2Xm226xmSbeGZ1BVtX7DUm4oCx8Pm\")\n                \n                \n                XCTAssertTrue(realToAddresses.count == 2)\n                XCTAssertTrue(realToAddresses[0] == \"19Nrc2Xm226xmSbeGZ1BVtX7DUm4oCx8Pm\")\n                XCTAssertTrue(realToAddresses[1] == \"1LrGcAw6WPFK4re5mt4MQfXj9xLeBYojRm\")\n            }\n            \n            testCreateSignedSerializedTransactionHexAndBIP69_4_1()\n            testCreateSignedSerializedTransactionHexAndBIP69_4_2()\n        }\n        \n        func testCreateSignedSerializedTransactionHexAndBIP69_5() -> () {\n            let feeAmount = TLCoin(bitcoinAmount: \"0.00000\", bitcoinDenomination: TLBitcoinDenomination.bitcoin)\n            let toAddress = \"1KAD5EnzzLtrSo2Da2G4zzD7uZrjk8zRAv\"\n            let toAmount = TLCoin(bitcoinAmount: \"8\", bitcoinDenomination: TLBitcoinDenomination.bitcoin)\n            \n            let txid0 = \"35288d269cee1941eaebb2ea85e32b42cdb2b04284a56d8b14dcc3f5c65d6055\"\n            let txid1 = \"35288d269cee1941eaebb2ea85e32b42cdb2b04284a56d8b14dcc3f5c65d6055\"\n            \n            let unspentOutput0 = mockUnspentOutput(txid0, 700000000, 0)\n            let unspentOutput1 = mockUnspentOutput(txid1, 1000000000, 1)\n            \n            func testCreateSignedSerializedTransactionHexAndBIP69_5_1() -> () {\n                let toAddressesAndAmounts = [[\"address\": toAddress, \"amount\": toAmount]]\n                \n                accountObject.unspentOutputs = NSMutableArray(capacity: 2)\n                accountObject.unspentOutputs!.add(unspentOutput0)\n                accountObject.unspentOutputs!.add(unspentOutput1)\n                accountObject.stealthPaymentUnspentOutputs = NSMutableArray(capacity: 0)\n                \n                let ret = godSend.createSignedSerializedTransactionHex(toAddressesAndAmounts as NSArray, feeAmount: feeAmount, error: {\n                    (data: String?) in\n                })\n                \n                let txHexAndTxHash = ret.0\n                let realToAddresses = ret.1\n                let txHex = txHexAndTxHash!.object(forKey: \"txHex\") as! String\n                let txHash = txHexAndTxHash!.object(forKey: \"txHash\") as! String\n                let txSize = txHexAndTxHash!.object(forKey: \"txSize\") as! NSNumber\n                XCTAssertTrue(txHash == \"7993558323324a61028e592f8e1421ec131d48ecba09627645d7c2aec49b838e\")\n                XCTAssertTrue(txHex == \"010000000255605dc6f5c3dc148b6da58442b0b2cd422be385eab2ebea4119ee9c268d2835000000006a473044022044fb6ce5ce9ae0ef3d381f749612a993d98bf6c293e1e6bbc73979c0c7d7f88a0220749e495896ca230272d0d6e93a53019e2479b4829f09d574c26e21b5ef614da80121027ecba9ebc4699df7f557c4e18192efb5c97b1ff4ecdcebb4e21bb7d1fed2203affffffff55605dc6f5c3dc148b6da58442b0b2cd422be385eab2ebea4119ee9c268d2835010000006a473044022020573f136e62c66ba6130b1fbe7fb87ba8cfbfd9af89227fe10a878a189c3569022043f1fcf6b88cd6befee91899ae92905074fe48ef3f82206638752db6bd90201a0121027ecba9ebc4699df7f557c4e18192efb5c97b1ff4ecdcebb4e21bb7d1fed2203affffffff020008af2f000000001976a914c73015fa62d972ebb3b241fe8c936657b13fabd788ac00e9a435000000001976a91482d6e3eb4cb25dfd325b4af06948d3a2e064a5f788ac00000000\")\n                XCTAssertTrue(txSize.uintValue == 376)\n\n                let transaction = BTCTransaction(hex: txHex)\n                \n                XCTAssertTrue(transaction?.inputs.count == 2)\n                let input0 = transaction?.inputs[0] as! BTCTransactionInput\n                XCTAssertTrue(input0.previousTransactionID == txid0)\n                XCTAssertTrue(input0.outpoint.index == 0)\n                let input1 = transaction?.inputs[1] as! BTCTransactionInput\n                XCTAssertTrue(input1.previousTransactionID == txid1)\n                XCTAssertTrue(input1.outpoint.index == 1)\n                \n                XCTAssertTrue(transaction?.outputs.count == 2)\n                let output0 = transaction?.outputs[0] as! BTCTransactionOutput\n                XCTAssertTrue(output0.script.hex == \"76a914c73015fa62d972ebb3b241fe8c936657b13fabd788ac\")\n                XCTAssertTrue(output0.value == 800000000)\n                XCTAssertTrue(output0.script.standardAddress.base58String == \"1KAD5EnzzLtrSo2Da2G4zzD7uZrjk8zRAv\")\n                let output1 = transaction?.outputs[1] as! BTCTransactionOutput\n                XCTAssertTrue(output1.script.hex == \"76a91482d6e3eb4cb25dfd325b4af06948d3a2e064a5f788ac\")\n                XCTAssertTrue(output1.value == 900000000)\n                XCTAssertTrue(output1.script.standardAddress.base58String == changeAddress0)\n                \n                XCTAssertTrue(realToAddresses.count == 1)\n                XCTAssertTrue(realToAddresses[0] == \"1KAD5EnzzLtrSo2Da2G4zzD7uZrjk8zRAv\")\n            }\n            \n            func testCreateSignedSerializedTransactionHexAndBIP69_5_2() -> () {\n                let toAddressesAndAmounts = [[\"address\": toAddress, \"amount\": toAmount]]\n                \n                accountObject.unspentOutputs = NSMutableArray(capacity: 2)\n                accountObject.unspentOutputs!.add(unspentOutput1)\n                accountObject.unspentOutputs!.add(unspentOutput0)\n                accountObject.stealthPaymentUnspentOutputs = NSMutableArray(capacity: 0)\n                \n                let ret = godSend.createSignedSerializedTransactionHex(toAddressesAndAmounts as NSArray, feeAmount: feeAmount, error: {\n                    (data: String?) in\n                })\n                \n                let txHexAndTxHash = ret.0\n                let realToAddresses = ret.1\n                let txHex = txHexAndTxHash!.object(forKey: \"txHex\") as! String\n                let txHash = txHexAndTxHash!.object(forKey: \"txHash\") as! String\n                let txSize = txHexAndTxHash!.object(forKey: \"txSize\") as! NSNumber\n                XCTAssertTrue(txHash == \"9d332311d0a172ef2f875fc76ac261ddac4debbd86cbf0711d9c86a5024423dd\")\n                XCTAssertTrue(txHex == \"010000000155605dc6f5c3dc148b6da58442b0b2cd422be385eab2ebea4119ee9c268d2835010000006b483045022100b5a727e693ddc88a13e50513252a3d508757a6bfbd2f4b9b369f37fac41c28c00220392dbb2f4d99c4efd1d346513e695163b1e1564399d4cc1a9f5779b04a5f03aa0121027ecba9ebc4699df7f557c4e18192efb5c97b1ff4ecdcebb4e21bb7d1fed2203affffffff0200c2eb0b000000001976a91482d6e3eb4cb25dfd325b4af06948d3a2e064a5f788ac0008af2f000000001976a914c73015fa62d972ebb3b241fe8c936657b13fabd788ac00000000\")\n                XCTAssertTrue(txSize.uintValue == 227)\n\n                let transaction = BTCTransaction(hex: txHex)\n                \n                XCTAssertTrue(transaction?.inputs.count == 1)\n                let input0 = transaction?.inputs[0] as! BTCTransactionInput\n                XCTAssertTrue(input0.previousTransactionID == txid1)\n                XCTAssertTrue(input0.outpoint.index == 1)\n                \n                XCTAssertTrue(transaction?.outputs.count == 2)\n                let output0 = transaction?.outputs[0] as! BTCTransactionOutput\n                XCTAssertTrue(output0.script.hex == \"76a91482d6e3eb4cb25dfd325b4af06948d3a2e064a5f788ac\")\n                XCTAssertTrue(output0.value == 200000000)\n                XCTAssertTrue(output0.script.standardAddress.base58String == changeAddress0)\n                let output1 = transaction?.outputs[1] as! BTCTransactionOutput\n                XCTAssertTrue(output1.script.hex == \"76a914c73015fa62d972ebb3b241fe8c936657b13fabd788ac\")\n                XCTAssertTrue(output1.value == 800000000)\n                XCTAssertTrue(output1.script.standardAddress.base58String == \"1KAD5EnzzLtrSo2Da2G4zzD7uZrjk8zRAv\")\n                \n                XCTAssertTrue(realToAddresses.count == 1)\n                XCTAssertTrue(realToAddresses[0] == \"1KAD5EnzzLtrSo2Da2G4zzD7uZrjk8zRAv\")\n            }\n            \n            testCreateSignedSerializedTransactionHexAndBIP69_5_1()\n            testCreateSignedSerializedTransactionHexAndBIP69_5_2()\n        }\n        \n        func testCreateSignedSerializedTransactionHexAndBIP69_6() -> () {\n            let feeAmount = TLCoin(bitcoinAmount: \"0.00000\", bitcoinDenomination: TLBitcoinDenomination.bitcoin)\n            let toAddress = \"1KAD5EnzzLtrSo2Da2G4zzD7uZrjk8zRAv\"\n            let toAddress2 = \"1DZTzaBHUDM7T3QvUKBz4qXMRpkg8jsfB5\"\n            let toAmount = TLCoin(bitcoinAmount: \"1\", bitcoinDenomination: TLBitcoinDenomination.bitcoin)\n            let toAmount2 = TLCoin(bitcoinAmount: \"1\", bitcoinDenomination: TLBitcoinDenomination.bitcoin)\n            \n            let txid0 = \"35288d269cee1941eaebb2ea85e32b42cdb2b04284a56d8b14dcc3f5c65d6055\"\n            let txid1 = \"35288d269cee1941eaebb2ea85e32b42cdb2b04284a56d8b14dcc3f5c65d6055\"\n            \n            let unspentOutput0 = mockUnspentOutput(txid0, 100000000, 0)\n            let unspentOutput1 = mockUnspentOutput(txid1, 100000000, 1)\n            \n            func testCreateSignedSerializedTransactionHexAndBIP69_6_1() -> () {\n                let toAddressesAndAmounts = [[\"address\": toAddress, \"amount\": toAmount], [\"address\": toAddress2, \"amount\": toAmount2]]\n                \n                accountObject.unspentOutputs = NSMutableArray(capacity: 2)\n                accountObject.unspentOutputs!.add(unspentOutput0)\n                accountObject.unspentOutputs!.add(unspentOutput1)\n                accountObject.stealthPaymentUnspentOutputs = NSMutableArray(capacity: 0)\n                \n                let ret = godSend.createSignedSerializedTransactionHex(toAddressesAndAmounts as NSArray, feeAmount: feeAmount, error: {\n                    (data: String?) in\n                })\n                \n                let txHexAndTxHash = ret.0\n                let realToAddresses = ret.1\n                let txHex = txHexAndTxHash!.object(forKey: \"txHex\") as! String\n                let txHash = txHexAndTxHash!.object(forKey: \"txHash\") as! String\n                let txSize = txHexAndTxHash!.object(forKey: \"txSize\") as! NSNumber\n                XCTAssertTrue(txHash == \"1b27e859e51c272c6fa539e8579649cf0ba3d6ac560c38e3d93d83edd85adedc\")\n                XCTAssertTrue(txHex == \"010000000255605dc6f5c3dc148b6da58442b0b2cd422be385eab2ebea4119ee9c268d2835000000006b483045022100a24aec6b79e3907be855490f4e9e4a7c28c67181b707df50599e1b7381f578810220275c84a766f8088e92de8e01de291ce7edc50a7dc8e8afa28741fe80c0ab91860121027ecba9ebc4699df7f557c4e18192efb5c97b1ff4ecdcebb4e21bb7d1fed2203affffffff55605dc6f5c3dc148b6da58442b0b2cd422be385eab2ebea4119ee9c268d2835010000006a473044022014ed6ef24ff1048d29ec8b2ed8602299e85b4a39a98df7cc3f0ea02db11a345c022008d955f96e52fc85d2fe0d42c6f3c4b04fc6b43ef87978c4a01c10afb59041a40121027ecba9ebc4699df7f557c4e18192efb5c97b1ff4ecdcebb4e21bb7d1fed2203affffffff0200e1f505000000001976a91489c55a3ca6676c9f7f260a6439c83249b747380288ac00e1f505000000001976a914c73015fa62d972ebb3b241fe8c936657b13fabd788ac00000000\")\n                XCTAssertTrue(txSize.uintValue == 376)\n\n                let transaction = BTCTransaction(hex: txHex)\n                \n                XCTAssertTrue(transaction?.inputs.count == 2)\n                let input0 = transaction?.inputs[0] as! BTCTransactionInput\n                XCTAssertTrue(input0.previousTransactionID == txid0)\n                XCTAssertTrue(input0.outpoint.index == 0)\n                let input1 = transaction?.inputs[1] as! BTCTransactionInput\n                XCTAssertTrue(input1.previousTransactionID == txid1)\n                XCTAssertTrue(input1.outpoint.index == 1)\n                \n                XCTAssertTrue(transaction?.outputs.count == 2)\n                let output0 = transaction?.outputs[0] as! BTCTransactionOutput\n                XCTAssertTrue(output0.script.hex == \"76a91489c55a3ca6676c9f7f260a6439c83249b747380288ac\")\n                XCTAssertTrue(output0.value == 100000000)\n                XCTAssertTrue(output0.script.standardAddress.base58String == \"1DZTzaBHUDM7T3QvUKBz4qXMRpkg8jsfB5\")\n                let output1 = transaction?.outputs[1] as! BTCTransactionOutput\n                XCTAssertTrue(output1.script.hex == \"76a914c73015fa62d972ebb3b241fe8c936657b13fabd788ac\")\n                XCTAssertTrue(output1.value == 100000000)\n                XCTAssertTrue(output1.script.standardAddress.base58String == \"1KAD5EnzzLtrSo2Da2G4zzD7uZrjk8zRAv\")\n                \n                XCTAssertTrue(realToAddresses.count == 2)\n                XCTAssertTrue(realToAddresses[0] == \"1KAD5EnzzLtrSo2Da2G4zzD7uZrjk8zRAv\")\n                XCTAssertTrue(realToAddresses[1] == \"1DZTzaBHUDM7T3QvUKBz4qXMRpkg8jsfB5\")\n            }\n            \n            testCreateSignedSerializedTransactionHexAndBIP69_6_1()\n        }\n        \n        func testColdWallet_1() -> () {\n            let feeAmount = TLCoin(bitcoinAmount: \"0.00000\", bitcoinDenomination: TLBitcoinDenomination.bitcoin)\n            let toAddress = \"1KAD5EnzzLtrSo2Da2G4zzD7uZrjk8zRAv\"\n            let toAddress2 = \"1DZTzaBHUDM7T3QvUKBz4qXMRpkg8jsfB5\"\n            let toAmount = TLCoin(bitcoinAmount: \"1\", bitcoinDenomination: TLBitcoinDenomination.bitcoin)\n            let toAmount2 = TLCoin(bitcoinAmount: \"24\", bitcoinDenomination: TLBitcoinDenomination.bitcoin)\n            \n            let txid0 = \"35288d269cee1941eaebb2ea85e32b42cdb2b04284a56d8b14dcc3f5c65d6055\"\n            let txid1 = \"35288d269cee1941eaebb2ea85e32b42cdb2b04284a56d8b14dcc3f5c65d6055\"\n            \n            let unspentOutput0 = mockUnspentOutput(txid0, 100000000, 0)\n            let unspentOutput1 = mockUnspentOutput(txid1, 2400000000, 1)\n            \n            func testColdWallet_1_1() -> () {\n                let toAddressesAndAmounts = [[\"address\": toAddress, \"amount\": toAmount], [\"address\": toAddress2, \"amount\": toAmount2]]\n                \n                accountObject.unspentOutputs = NSMutableArray(capacity: 2)\n                accountObject.unspentOutputs!.add(unspentOutput0)\n                accountObject.unspentOutputs!.add(unspentOutput1)\n                accountObject.stealthPaymentUnspentOutputs = NSMutableArray(capacity: 0)\n                \n                let ret = godSend.createSignedSerializedTransactionHex(toAddressesAndAmounts as NSArray, feeAmount: feeAmount, signTx: false, error: {\n                    (data: String?) in\n                })\n                \n                let txHexAndTxHash = ret.0\n                let realToAddresses = ret.1\n                let txInputsAccountHDIdxes = ret.2\n                let unSignedTx = txHexAndTxHash!.object(forKey: \"txHex\") as! String\n                let inputScripts = txHexAndTxHash!.object(forKey: \"inputScripts\") as! NSArray\n\n                \n                let unsignedTxAirGapDataBase64 = TLColdWallet.createSerializedUnsignedTxAipGapData(unSignedTx, extendedPublicKey: extendPubKey, inputScripts: inputScripts, txInputsAccountHDIdxes: txInputsAccountHDIdxes!)\n                NSLog(\"testColdWallet_1_1 unsignedTxAirGapDataBase64 \\(unsignedTxAirGapDataBase64)\");\n                XCTAssertTrue(unsignedTxAirGapDataBase64 == \"eyJ2IjoiMSIsImFjY291bnRfcHVibGljX2tleSI6InhwdWI2RDFoNjV6cTlGUjJwbXZRTkI2RmlpajI0ZFl4cEpmSGltWXhpYm1meEJmZ3pmcG9iVlNqUXdjdkZQcjdwVEFUUmlzcHJjMll3WVlXaXlzVUV2SjF1OWl1QVFLTU5zaUxuMlBQU3J0VkZ0NiIsInVuc2lnbmVkX3R4X2Jhc2U2NCI6IkFRQUFBQUpWWUYzRzljUGNGSXR0cFlSQ3NMTE5RaXZqaGVxeTYrcEJHZTZjSm8wb05RQUFBQUFBXC9cL1wvXC9cLzFWZ1hjYjF3OXdVaTIybGhFS3dzczFDSytPRjZyTHI2a0VaN3B3bWpTZzFBUUFBQUFEXC9cL1wvXC9cL0FnRGg5UVVBQUFBQUdYYXBGTWN3RmZwaTJYTHJzN0pCXC9veVRabGV4UDZ2WGlLd0FHQTJQQUFBQUFCbDJxUlNKeFZvOHBtZHNuMzhtQ21RNXlESkp0MGM0QW9pc0FBQUFBQT09IiwidHhfaW5wdXRzX2FjY291bnRfaGRfaWR4ZXMiOlt7ImlzX2NoYW5nZSI6ZmFsc2UsImlkeCI6MH0seyJpc19jaGFuZ2UiOmZhbHNlLCJpZHgiOjB9XSwiaW5wdXRfc2NyaXB0cyI6WyI3NmE5MTRjNmI0ZWJhOTcyYzIyN2FjMDQ1OGRiYTk1MWI0ODEyMzFlNGQ1ZmQ3ODhhYyIsIjc2YTkxNGM2YjRlYmE5NzJjMjI3YWMwNDU4ZGJhOTUxYjQ4MTIzMWU0ZDVmZDc4OGFjIl19\")\n\n                \n                let unsignedTxAirGapDataBase64PartsArray = TLColdWallet.splitStringToArray(unsignedTxAirGapDataBase64!)\n                //Pass unsigned tx here ----------------------------------------------------------------------------------------\n                var passedUnsignedTxairGapDataBase64 = \"\"\n                for unsignedTxAirGapDataBase64Part in unsignedTxAirGapDataBase64PartsArray {\n                    let ret = TLColdWallet.parseScannedPart(unsignedTxAirGapDataBase64Part)\n                    let dataPart = ret.0\n                    //let partNumber = ret.1 // unused in test\n                    //let totalParts = ret.2 // unused in test\n                    passedUnsignedTxairGapDataBase64 += dataPart\n                }\n                XCTAssertTrue(passedUnsignedTxairGapDataBase64 == unsignedTxAirGapDataBase64)\n\n                do {\n                    let serializedSignedAipGapData = try TLColdWallet.createSerializedSignedTxAipGapData(passedUnsignedTxairGapDataBase64,\n                                                                                                       mnemonicOrExtendedPrivateKey: backupPassphrase,\n                                                                                                       isTestnet: false)\n                    NSLog(\"testColdWallet_1_1 serializedSignedAipGapData \\(serializedSignedAipGapData)\");\n                    XCTAssertTrue(serializedSignedAipGapData == \"eyJ0eEhleCI6IjAxMDAwMDAwMDI1NTYwNWRjNmY1YzNkYzE0OGI2ZGE1ODQ0MmIwYjJjZDQyMmJlMzg1ZWFiMmViZWE0MTE5ZWU5YzI2OGQyODM1MDAwMDAwMDA2YTQ3MzA0NDAyMjA0NDliMWY5NTY4N2JmNDY5ZmI5NTRiY2RiYmMwYWUzNjJmZTliZDZiYTg4YzViNGRkMjI3ZDlhNWMzN2ViODJhMDIyMDM0NDBiZjZiNDE3ODc4NjkxM2ExOTczNDRkMDk5OWE3ZDk4ZDI0NjA5OWRjZGRmNGJmOWIyNDQ3M2E0ZTdhOWEwMTIxMDI3ZWNiYTllYmM0Njk5ZGY3ZjU1N2M0ZTE4MTkyZWZiNWM5N2IxZmY0ZWNkY2ViYjRlMjFiYjdkMWZlZDIyMDNhZmZmZmZmZmY1NTYwNWRjNmY1YzNkYzE0OGI2ZGE1ODQ0MmIwYjJjZDQyMmJlMzg1ZWFiMmViZWE0MTE5ZWU5YzI2OGQyODM1MDEwMDAwMDA2YTQ3MzA0NDAyMjAxZjZhNGE4N2QwNTg0MTU3NDcxMjEwYzFlMTI2ZTY0ZTUyZjU2NWU5NTBmZWI4MDA0NWZjODU1ODI5ZGYzZGE0MDIyMDU5ZmQ3NWZlNTEyNjJhYTdiN2YyMTQ1MzQzNTdlZDI3ODZhOWIzZGNiMTI0OTMxMTIwMjc3MTFhZWJjODQ3OGEwMTIxMDI3ZWNiYTllYmM0Njk5ZGY3ZjU1N2M0ZTE4MTkyZWZiNWM5N2IxZmY0ZWNkY2ViYjRlMjFiYjdkMWZlZDIyMDNhZmZmZmZmZmYwMjAwZTFmNTA1MDAwMDAwMDAxOTc2YTkxNGM3MzAxNWZhNjJkOTcyZWJiM2IyNDFmZThjOTM2NjU3YjEzZmFiZDc4OGFjMDAxODBkOGYwMDAwMDAwMDE5NzZhOTE0ODljNTVhM2NhNjY3NmM5ZjdmMjYwYTY0MzljODMyNDliNzQ3MzgwMjg4YWMwMDAwMDAwMCIsInR4SGFzaCI6ImZiYWNmZWRlNTVkYzZhNzc5NzgyYmE4ZmEyMjgxMzg2MGI3ZWYwN2Q4MmMzYWJlYmI4ZjI5MGIzMTQxYmY5NjUiLCJ0eFNpemUiOjM3Nn0=\")\n                    \n                    \n                    \n                    let signedTxAirGapDataBase64PartsArray = TLColdWallet.splitStringToArray(serializedSignedAipGapData!)\n                    //Pass signed tx here ----------------------------------------------------------------------------------------\n                    var passedSignedTxairGapDataBase64 = \"\"\n                    for signedTxAirGapDataBase64Part in signedTxAirGapDataBase64PartsArray {\n                        let ret = TLColdWallet.parseScannedPart(signedTxAirGapDataBase64Part)\n                        let dataPart = ret.0\n                        //let partNumber = ret.1 // unused in test\n                        //let totalParts = ret.2 // unused in test\n                        passedSignedTxairGapDataBase64 += dataPart\n                    }\n                    XCTAssertTrue(passedSignedTxairGapDataBase64 == serializedSignedAipGapData)\n\n                    \n                    let signedTxData = TLColdWallet.getSignedTxData(passedSignedTxairGapDataBase64)\n                    let txHex = signedTxData![\"txHex\"] as! String\n                    let txHash = signedTxData![\"txHash\"] as! String\n                    let txSize = signedTxData![\"txSize\"] as! NSNumber\n                    \n                    XCTAssertTrue(txHash == \"fbacfede55dc6a779782ba8fa22813860b7ef07d82c3abebb8f290b3141bf965\")\n                    XCTAssertTrue(txHex == \"010000000255605dc6f5c3dc148b6da58442b0b2cd422be385eab2ebea4119ee9c268d2835000000006a4730440220449b1f95687bf469fb954bcdbbc0ae362fe9bd6ba88c5b4dd227d9a5c37eb82a02203440bf6b4178786913a197344d0999a7d98d246099dcddf4bf9b24473a4e7a9a0121027ecba9ebc4699df7f557c4e18192efb5c97b1ff4ecdcebb4e21bb7d1fed2203affffffff55605dc6f5c3dc148b6da58442b0b2cd422be385eab2ebea4119ee9c268d2835010000006a47304402201f6a4a87d0584157471210c1e126e64e52f565e950feb80045fc855829df3da4022059fd75fe51262aa7b7f214534357ed2786a9b3dcb12493112027711aebc8478a0121027ecba9ebc4699df7f557c4e18192efb5c97b1ff4ecdcebb4e21bb7d1fed2203affffffff0200e1f505000000001976a914c73015fa62d972ebb3b241fe8c936657b13fabd788ac00180d8f000000001976a91489c55a3ca6676c9f7f260a6439c83249b747380288ac00000000\")\n                    XCTAssertTrue(txSize.uintValue == 376)\n                    \n                    let transaction = BTCTransaction(hex: txHex)\n                    \n                    XCTAssertTrue(transaction?.inputs.count == 2)\n                    let input0 = transaction?.inputs[0] as! BTCTransactionInput\n                    XCTAssertTrue(input0.previousTransactionID == txid0)\n                    XCTAssertTrue(input0.outpoint.index == 0)\n                    let input1 = transaction?.inputs[1] as! BTCTransactionInput\n                    XCTAssertTrue(input1.previousTransactionID == txid1)\n                    XCTAssertTrue(input1.outpoint.index == 1)\n                    \n                    XCTAssertTrue(transaction?.outputs.count == 2)\n                    let output0 = transaction?.outputs[0] as! BTCTransactionOutput\n                    XCTAssertTrue(output0.script.hex == \"76a914c73015fa62d972ebb3b241fe8c936657b13fabd788ac\")\n                    XCTAssertTrue(output0.value == 100000000)\n                    XCTAssertTrue(output0.script.standardAddress.base58String == \"1KAD5EnzzLtrSo2Da2G4zzD7uZrjk8zRAv\")\n                    let output1 = transaction?.outputs[1] as! BTCTransactionOutput\n                    XCTAssertTrue(output1.script.hex == \"76a91489c55a3ca6676c9f7f260a6439c83249b747380288ac\")\n                    XCTAssertTrue(output1.value == 2400000000)\n                    XCTAssertTrue(output1.script.standardAddress.base58String == \"1DZTzaBHUDM7T3QvUKBz4qXMRpkg8jsfB5\")\n                    \n                    XCTAssertTrue(realToAddresses.count == 2)\n                    XCTAssertTrue(realToAddresses[0] == \"1KAD5EnzzLtrSo2Da2G4zzD7uZrjk8zRAv\")\n                    XCTAssertTrue(realToAddresses[1] == \"1DZTzaBHUDM7T3QvUKBz4qXMRpkg8jsfB5\")\n                    \n                    \n                    \n                } catch TLColdWallet.TLColdWalletError.InvalidKey(let error) {\n                } catch TLColdWallet.TLColdWalletError.MisMatchExtendedPublicKey(let error) {\n                } catch {\n                }\n            }\n\n            testColdWallet_1_1()\n        }\n        \n        testCreateSignedSerializedTransactionHexAndBIP69_1()\n        testCreateSignedSerializedTransactionHexAndBIP69_2()\n        testCreateSignedSerializedTransactionHexAndBIP69_3()\n        testCreateSignedSerializedTransactionHexAndBIP69_4()\n        testCreateSignedSerializedTransactionHexAndBIP69_5()\n        testCreateSignedSerializedTransactionHexAndBIP69_6()\n        testColdWallet_1()\n    }\n    \n    func testCoin() {\n        \n        var coin:TLCoin\n\n        coin = TLCurrencyFormat.bitcoinAmountStringToCoin(\"0.0\")\n        XCTAssertTrue(coin.toUInt64() == 0)\n        coin = TLCurrencyFormat.bitcoinAmountStringToCoin(\"0\")\n        XCTAssertTrue(coin.toUInt64() == 0)\n\n        coin = TLCurrencyFormat.bitcoinAmountStringToCoin(\"0.00000001\")\n        XCTAssertTrue(coin.toUInt64() == 1)\n        //coin = TLCurrencyFormat.bitcoinAmountStringToCoin(\"0.000000011\")\n        //XCTAssertTrue(coin.toUInt64() == 1)\n        //coin = TLCurrencyFormat.bitcoinAmountStringToCoin(\"0.000000015\")\n        //XCTAssertTrue(coin.toUInt64() == 2)\n        //coin = TLCurrencyFormat.bitcoinAmountStringToCoin(\"0.000000019\")\n        //XCTAssertTrue(coin.toUInt64() == 2)\n\n        coin = TLCurrencyFormat.bitcoinAmountStringToCoin(\"0.1\")\n        XCTAssertTrue(coin.toUInt64() == 10000000)\n\n        coin = TLCurrencyFormat.bitcoinAmountStringToCoin(\".99999998\")\n        XCTAssertTrue(coin.toUInt64() == 99999998)\n        //coin = TLCurrencyFormat.bitcoinAmountStringToCoin(\".999999985\")\n        //XCTAssertTrue(coin.toUInt64() == 99999998)\n        //coin = TLCurrencyFormat.bitcoinAmountStringToCoin(\".999999986\")\n        //XCTAssertTrue(coin.toUInt64() == 99999999)\n        //coin = TLCurrencyFormat.bitcoinAmountStringToCoin(\".999999989\")\n        //XCTAssertTrue(coin.toUInt64() == 99999999)\n\n        coin = TLCurrencyFormat.bitcoinAmountStringToCoin(\"0.99999999\")\n        XCTAssertTrue(coin.toUInt64() == 99999999)\n        coin = TLCurrencyFormat.bitcoinAmountStringToCoin(\".99999999\")\n        XCTAssertTrue(coin.toUInt64() == 99999999)\n\n        coin = TLCurrencyFormat.bitcoinAmountStringToCoin(\"1.00000000\")\n        XCTAssertTrue(coin.toUInt64() == 100000000)\n        coin = TLCurrencyFormat.bitcoinAmountStringToCoin(\"1\")\n        XCTAssertTrue(coin.toUInt64() == 100000000)\n\n        coin = TLCurrencyFormat.bitcoinAmountStringToCoin(\"1.00000001\")\n        XCTAssertTrue(coin.toUInt64() == 100000001)\n\n        coin = TLCurrencyFormat.bitcoinAmountStringToCoin(\"1.99999998\")\n        XCTAssertTrue(coin.toUInt64() == 199999998)\n        \n        coin = TLCurrencyFormat.bitcoinAmountStringToCoin(\"1.99999999\")\n        XCTAssertTrue(coin.toUInt64() == 199999999)\n\n        coin = TLCurrencyFormat.bitcoinAmountStringToCoin(\"2.0\")\n        XCTAssertTrue(coin.toUInt64() == 200000000)\n\n        coin = TLCurrencyFormat.bitcoinAmountStringToCoin(\"2.00000001\")\n        XCTAssertTrue(coin.toUInt64() == 200000001)\n\n        coin = TLCurrencyFormat.bitcoinAmountStringToCoin(\"31,821.95320551\")\n        XCTAssertTrue(coin.toUInt64() == 3182195320551)\n        coin = TLCurrencyFormat.bitcoinAmountStringToCoin(\"31821.95320551\")\n        XCTAssertTrue(coin.toUInt64() == 3182195320551)\n\n        coin = TLCurrencyFormat.bitcoinAmountStringToCoin(\"21,000,000\")\n        XCTAssertTrue(coin.toUInt64() == 2100000000000000)\n        coin = TLCurrencyFormat.bitcoinAmountStringToCoin(\"21000000\")\n        XCTAssertTrue(coin.toUInt64() == 2100000000000000)\n        \n        \n        let spainLocale = Locale(identifier: \"es_ES\")\n        coin = TLCurrencyFormat.bitcoinAmountStringToCoin(\"0,0\", locale: spainLocale)\n        XCTAssertTrue(coin.toUInt64() == 0)\n        coin = TLCurrencyFormat.bitcoinAmountStringToCoin(\"0\", locale: spainLocale)\n        XCTAssertTrue(coin.toUInt64() == 0)\n        \n        coin = TLCurrencyFormat.bitcoinAmountStringToCoin(\"0,00000001\", locale: spainLocale)\n        XCTAssertTrue(coin.toUInt64() == 1)\n        \n        coin = TLCurrencyFormat.bitcoinAmountStringToCoin(\"0,1\", locale: spainLocale)\n        XCTAssertTrue(coin.toUInt64() == 10000000)\n        \n        coin = TLCurrencyFormat.bitcoinAmountStringToCoin(\",99999998\", locale: spainLocale)\n        XCTAssertTrue(coin.toUInt64() == 99999998)\n        \n        coin = TLCurrencyFormat.bitcoinAmountStringToCoin(\"0,99999999\", locale: spainLocale)\n        XCTAssertTrue(coin.toUInt64() == 99999999)\n        coin = TLCurrencyFormat.bitcoinAmountStringToCoin(\",99999999\", locale: spainLocale)\n        XCTAssertTrue(coin.toUInt64() == 99999999)\n        \n        coin = TLCurrencyFormat.bitcoinAmountStringToCoin(\"1,00000000\", locale: spainLocale)\n        XCTAssertTrue(coin.toUInt64() == 100000000)\n        coin = TLCurrencyFormat.bitcoinAmountStringToCoin(\"1\", locale: spainLocale)\n        XCTAssertTrue(coin.toUInt64() == 100000000)\n        \n        coin = TLCurrencyFormat.bitcoinAmountStringToCoin(\"1,00000001\", locale: spainLocale)\n        XCTAssertTrue(coin.toUInt64() == 100000001)\n        \n        coin = TLCurrencyFormat.bitcoinAmountStringToCoin(\"1,99999998\", locale: spainLocale)\n        XCTAssertTrue(coin.toUInt64() == 199999998)\n        \n        coin = TLCurrencyFormat.bitcoinAmountStringToCoin(\"1,99999999\", locale: spainLocale)\n        XCTAssertTrue(coin.toUInt64() == 199999999)\n        \n        coin = TLCurrencyFormat.bitcoinAmountStringToCoin(\"2,0\", locale: spainLocale)\n        XCTAssertTrue(coin.toUInt64() == 200000000)\n        \n        coin = TLCurrencyFormat.bitcoinAmountStringToCoin(\"2,00000001\", locale: spainLocale)\n        XCTAssertTrue(coin.toUInt64() == 200000001)\n        \n        coin = TLCurrencyFormat.bitcoinAmountStringToCoin(\"31.821,95320551\", locale: spainLocale)\n        XCTAssertTrue(coin.toUInt64() == 3182195320551)\n        coin = TLCurrencyFormat.bitcoinAmountStringToCoin(\"31821,95320551\", locale: spainLocale)\n        XCTAssertTrue(coin.toUInt64() == 3182195320551)\n        \n        coin = TLCurrencyFormat.bitcoinAmountStringToCoin(\"21.000.000\", locale: spainLocale)\n        XCTAssertTrue(coin.toUInt64() == 2100000000000000)\n        coin = TLCurrencyFormat.bitcoinAmountStringToCoin(\"21000000\", locale: spainLocale)\n        XCTAssertTrue(coin.toUInt64() == 2100000000000000)\n        \n        \n                \n        TLPreferences.setBitcoinDisplay(\"1\")\n        coin = TLCurrencyFormat.properBitcoinAmountStringToCoin(\"1000\")\n        XCTAssertTrue(coin.toUInt64() == 100000000)\n\n        TLPreferences.setBitcoinDisplay(\"2\")\n        coin = TLCurrencyFormat.properBitcoinAmountStringToCoin(\"1000000\")\n        XCTAssertTrue(coin.toUInt64() == 100000000)\n\n        TLPreferences.setBitcoinDisplay(\"0\")\n    }\n\n    func testCoreBitcoinWrapper() {\n        let outputScript = \"76a9149a1c78a507689f6f54b847ad1cef1e614ee23f1e88ac\"\n        var address = TLCoreBitcoinWrapper.getAddressFromOutputScript(outputScript, isTestnet: false)\n        NSLog(\"address: %@\", address!)\n        XCTAssertTrue(address == \"1F3sAm6ZtwLAUnj7d38pGFxtP3RVEvtsbV\")\n        address = TLCoreBitcoinWrapper.getAddressFromOutputScript(outputScript, isTestnet: true)\n        NSLog(\"address: %@\", address!)\n        XCTAssertTrue(address == \"muZpTpBYhxmRFuCjLc7C6BBDF32C8XVJUi\")\n        \n        \n        let secret = \"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855\"\n        address = TLCoreBitcoinWrapper.getAddressFromSecret(secret, isTestnet: false)\n        NSLog(\"address: %@\", address!)\n        XCTAssertTrue(address == \"1F3sAm6ZtwLAUnj7d38pGFxtP3RVEvtsbV\")\n        address = TLCoreBitcoinWrapper.getAddressFromSecret(secret, isTestnet: true)\n        NSLog(\"address: %@\", address!)\n        XCTAssertTrue(address == \"muZpTpBYhxmRFuCjLc7C6BBDF32C8XVJUi\")\n\n        var privateKey:String\n        privateKey = TLCoreBitcoinWrapper.privateKeyFromSecret(secret, isTestnet: false)\n        NSLog(\"privateKey: %@\", privateKey)\n        XCTAssertTrue(privateKey == \"L4rK1yDtCWekvXuE6oXD9jCYfFNV2cWRpVuPLBcCU2z8TrisoyY1\")\n        privateKey = TLCoreBitcoinWrapper.privateKeyFromSecret(secret, isTestnet: true)\n        NSLog(\"privateKey: %@\", privateKey)\n        XCTAssertTrue(privateKey == \"cVDJUtDjdaM25yNVVDLLX3hcHUfth4c7tY3rSc4hy9e8ibtCuj6G\")\n\n        var pubKeyHash:String\n        pubKeyHash = TLCoreBitcoinWrapper.getStandardPubKeyHashScriptFromAddress(\"1F3sAm6ZtwLAUnj7d38pGFxtP3RVEvtsbV\", isTestnet: false)\n        NSLog(\"pubKeyHash: %@\", pubKeyHash)\n        XCTAssertTrue(pubKeyHash == \"76a9149a1c78a507689f6f54b847ad1cef1e614ee23f1e88ac\")\n        pubKeyHash = TLCoreBitcoinWrapper.getStandardPubKeyHashScriptFromAddress(\"muZpTpBYhxmRFuCjLc7C6BBDF32C8XVJUi\", isTestnet: true)\n        NSLog(\"pubKeyHash: %@\", pubKeyHash)\n        XCTAssertTrue(pubKeyHash == \"76a9149a1c78a507689f6f54b847ad1cef1e614ee23f1e88ac\")\n\n        address = TLCoreBitcoinWrapper.getAddress(\"L4rK1yDtCWekvXuE6oXD9jCYfFNV2cWRpVuPLBcCU2z8TrisoyY1\", isTestnet: false)\n        NSLog(\"address: %@\", address!)\n        XCTAssertTrue(address! == \"1F3sAm6ZtwLAUnj7d38pGFxtP3RVEvtsbV\")\n        address = TLCoreBitcoinWrapper.getAddress(\"5KYZdUEo39z3FPrtuX2QbbwGnNP5zTd7yyr2SC1j299sBCnWjss\", isTestnet: false)\n        NSLog(\"address: %@\", address!)\n        XCTAssertTrue(address! == \"1HZwkjkeaoZfTSaJxDw6aKkxp45agDiEzN\")\n        address = TLCoreBitcoinWrapper.getAddress(\"cVDJUtDjdaM25yNVVDLLX3hcHUfth4c7tY3rSc4hy9e8ibtCuj6G\", isTestnet: true)\n        NSLog(\"address: %@\", address!)\n        XCTAssertTrue(address! == \"muZpTpBYhxmRFuCjLc7C6BBDF32C8XVJUi\")\n        address = TLCoreBitcoinWrapper.getAddress(\"93KCDD4LdP4BDTNBXrvKUCVES2jo9dAKKvhyWpNEMstuxDauHty\", isTestnet: true)\n        NSLog(\"address: %@\", address!)\n        XCTAssertTrue(address! == \"mx5u3nqdPpzvEZ3vfnuUQEyHg3gHd8zrrH\")\n\n        \n        let compressedPubKey = \"03a34b99f22c790c4e36b2b3c2c35a36db06226e41c692fc82b8b56ac1c540c5bd\"\n        address = TLCoreBitcoinWrapper.getAddressFromPublicKey(compressedPubKey, isTestnet: false)\n        NSLog(\"address: %@\", address!)\n        XCTAssertTrue(address == \"1F3sAm6ZtwLAUnj7d38pGFxtP3RVEvtsbV\")\n        address = TLCoreBitcoinWrapper.getAddressFromPublicKey(compressedPubKey, isTestnet: true)\n        NSLog(\"address: %@\", address!)\n        XCTAssertTrue(address == \"muZpTpBYhxmRFuCjLc7C6BBDF32C8XVJUi\")\n        let uncompressedPubKey = \"04a34b99f22c790c4e36b2b3c2c35a36db06226e41c692fc82b8b56ac1c540c5bd5b8dec5235a0fa8722476c7709c02559e3aa73aa03918ba2d492eea75abea235\"\n        address = TLCoreBitcoinWrapper.getAddressFromPublicKey(uncompressedPubKey, isTestnet: false)\n        NSLog(\"address: %@\", address!)\n        XCTAssertTrue(address == \"1HZwkjkeaoZfTSaJxDw6aKkxp45agDiEzN\")\n        address = TLCoreBitcoinWrapper.getAddressFromPublicKey(uncompressedPubKey, isTestnet: true)\n        NSLog(\"address: %@\", address!)\n        XCTAssertTrue(address == \"mx5u3nqdPpzvEZ3vfnuUQEyHg3gHd8zrrH\")\n\n        XCTAssertTrue(TLCoreBitcoinWrapper.isAddressVersion0(\"1F3sAm6ZtwLAUnj7d38pGFxtP3RVEvtsbV\", isTestnet: false))\n        XCTAssertTrue(TLCoreBitcoinWrapper.isAddressVersion0(\"muZpTpBYhxmRFuCjLc7C6BBDF32C8XVJUi\", isTestnet: true))\n        XCTAssertTrue(TLCoreBitcoinWrapper.isAddressVersion0(\"n2MLT38EuTYgK8GcDrL2JQqbVvkSCGGf6S\", isTestnet: true))\n        XCTAssertTrue(!TLCoreBitcoinWrapper.isAddressVersion0(\"3EktnHQD7RiAE6uzMj2ZifT9YgRrkSgzQX\", isTestnet: false))\n        XCTAssertTrue(!TLCoreBitcoinWrapper.isAddressVersion0(\"2MzQwSSnBHWHqSAqtTVQ6v47XtaisrJa1Vc\", isTestnet: true))\n        \n        // address = 13adjLZo3iUEZuQEeEAkyRvw2nKKrGLuKJ password = \"murray rothbard\"\n        XCTAssertTrue(TLCoreBitcoinWrapper.isBIP38EncryptedKey(\"6PfRr3RtH3GKh7qcRUfEe5rAcFBBcKxJAvQWZPwpksfL6dxTpC9kqMctoE\", isTestnet: false))\n        // address = n1nKsF2UvyPgG3QLYupR4mwv1fQwLEJf9b password = \"murray rothbard\"\n        XCTAssertTrue(TLCoreBitcoinWrapper.isBIP38EncryptedKey(\"6PfSacWmYziVFFjHqiAHM9nvxsZDMBpDnPtWVQSNgSH9qpo1s1VCCWYEno\", isTestnet: true))\n        \n        XCTAssertTrue(TLCoreBitcoinWrapper.isValidAddress(\"1F3sAm6ZtwLAUnj7d38pGFxtP3RVEvtsbV\", isTestnet: false))\n        XCTAssertTrue(TLCoreBitcoinWrapper.isValidAddress(\"muZpTpBYhxmRFuCjLc7C6BBDF32C8XVJUi\", isTestnet: true))\n        XCTAssertTrue(TLCoreBitcoinWrapper.isValidAddress(\"3EktnHQD7RiAE6uzMj2ZifT9YgRrkSgzQX\", isTestnet: false))\n        XCTAssertTrue(TLCoreBitcoinWrapper.isValidAddress(\"2MzQwSSnBHWHqSAqtTVQ6v47XtaisrJa1Vc\", isTestnet: true))\n        XCTAssertTrue(TLCoreBitcoinWrapper.isValidAddress(\"vJmujDzf2PyDEcLQEQWyzVNthLpRAXqTi3ZencThu2WCzrRNi64eFYJP6ZyPWj53hSZBKTcUAk8J5Mb8rZC4wvGn77Sj4Z3yP7zE69\", isTestnet: false))\n        XCTAssertTrue(TLCoreBitcoinWrapper.isValidAddress(\"waPUEHTatbqyM6RKtsbdCy63fqyjwW6ksSCi5KhD1NTGdYrvAgvSAneAqDooHxVzpMAx8nZLzZTnhAGM1WxpRFvvp9zF6wFuAA7dNW\", isTestnet: true))\n\n        XCTAssertTrue(TLCoreBitcoinWrapper.isValidPrivateKey(\"L4rK1yDtCWekvXuE6oXD9jCYfFNV2cWRpVuPLBcCU2z8TrisoyY1\", isTestnet: false))\n        XCTAssertTrue(TLCoreBitcoinWrapper.isValidPrivateKey(\"cVDJUtDjdaM25yNVVDLLX3hcHUfth4c7tY3rSc4hy9e8ibtCuj6G\", isTestnet: true))\n    }\n\n    func testHDWalletWrapper() {\n        let extendPrivKey = \"xprv9z2LgaTwJsrjcHqwG9ZFManHWbiUQqwSMYdMvDN4Pr8i7sVf3x8Us9JSQ8FFCT8f7wBDzEVEhTFX3wJdNx2pchEZJ2HNTa4U7NKgM9uWoK6\"\n        let extendPubKey = \"xpub6D1h65zq9FR2pmvQNB6Fiij24dYxpJfHimYxibmfxBfgzfpobVSjQwcvFPr7pTATRisprc2YwYYWiysUEvJ1u9iuAQKMNsiLn2PPSrtVFt6\"\n\n        let mainAddressIndex0 = [0,0]\n        var mainAddress0:String\n        var walletConfig = TLWalletConfig(isTestnet: false)\n        mainAddress0 = TLHDWalletWrapper.getAddress(extendPubKey, sequence:mainAddressIndex0 as NSArray, isTestnet:walletConfig.isTestnet)\n        NSLog(\"mainAddress0: %@\", mainAddress0)\n        XCTAssertTrue(\"1K7fXZeeQydcUvbsfvkMSQmiacV5sKRYQz\" == mainAddress0)\n        var mainPrivKey0:String\n        mainPrivKey0 = TLHDWalletWrapper.getPrivateKey(extendPrivKey as NSString, sequence:mainAddressIndex0 as NSArray, isTestnet:walletConfig.isTestnet)\n        NSLog(\"mainPrivKey0: %@\", mainPrivKey0)\n        XCTAssertTrue(\"KwJhkmrjjg3AEX5gvccNAHCDcXnQLwzyZshnp5yK7vXz1mHKqDDq\" == mainPrivKey0)\n\n        walletConfig = TLWalletConfig(isTestnet: true)\n        mainAddress0 = TLHDWalletWrapper.getAddress(extendPubKey, sequence:mainAddressIndex0 as NSArray, isTestnet:walletConfig.isTestnet)\n        NSLog(\"mainAddress0: %@\", mainAddress0)\n        XCTAssertTrue(\"mydcpcjdE14sG35VPVijGKz3Sc5nsbbeo7\" == mainAddress0)\n        mainPrivKey0 = TLHDWalletWrapper.getPrivateKey(extendPrivKey as NSString, sequence:mainAddressIndex0 as NSArray, isTestnet:walletConfig.isTestnet)\n        NSLog(\"mainPrivKey0: %@\", mainPrivKey0)\n        XCTAssertTrue(\"cMfhDgrbAjjRPxYxK2RVXbhHEm5p1Q6fdurFvWRpd3BzGWQYiFw6\" == mainPrivKey0)\n    }\n}\n"
  },
  {
    "path": "ArcBitTests/BreadWalletTests.m",
    "content": "//\n//  BreadWalletTests.m\n//  ArcBit\n//\n//  Created by Tim Lee on 3/22/15.\n//  Copyright (c) 2015 ArcBit. All rights reserved.\n//\n\n#import <UIKit/UIKit.h>\n#import <XCTest/XCTest.h>\n#import <CommonCrypto/CommonDigest.h>\n#import <CoreBitcoin/BTCKey.h>\n#import <CoreBitcoin/BTCOpcode.h>\n#import <CoreBitcoin/BTCAddress.h>\n#import \"BRTransaction.h\"\n#import \"BRKey.h\"\n#import \"BRKey+BIP38.h\"\n#import \"NSMutableData+Bitcoin.h\"\n#import \"NSString+Base58.h\"\n\nBOOL isTestnet = NO;\n\n@interface BreadWalletTests : XCTestCase\n\n@end\n\n@implementation BreadWalletTests\n\n- (void)setUp {\n    [super setUp];\n    // Put setup code here. This method is called before the invocation of each test method in the class.\n}\n\n- (void)tearDown {\n    // Put teardown code here. This method is called after the invocation of each test method in the class.\n    [super tearDown];\n}\n\n- (void)testExample {\n    // This is an example of a functional test case.\n    XCTAssert(YES, @\"Pass\");\n}\n\n- (void)testPerformanceExample {\n    // This is an example of a performance test case.\n    [self measureBlock:^{\n        // Put the code you want to measure the time of here.\n    }];\n}\n\n#pragma mark - testBase58\n/*\n- (void)testBase58\n{\n    // test bad input\n    NSString *s = [NSString base58WithData:[@\"#&$@*^(*#!^\" base58ToData]];\n    \n    XCTAssertTrue(s.length == 0, @\"[NSString base58WithData:]\");\n    \n    s = [NSString base58WithData:[@\"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz\" base58ToData]];\n    XCTAssertEqualObjects(@\"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz\", s,\n                          @\"[NSString base58WithData:]\");\n}\n\n#pragma mark - testKey\n\n#if ! BITCOIN_TESTNET\n- (void)testKeyWithPrivateKey\n{\n    XCTAssertFalse([@\"S6c56bnXQiBjk9mqSYE7ykVQ7NzrRz\" isValidBitcoinPrivateKey:isTestnet],\n                   @\"[NSString+Base58 isValidBitcoinPrivateKey]\");\n    \n    XCTAssertTrue([@\"S6c56bnXQiBjk9mqSYE7ykVQ7NzrRy\" isValidBitcoinPrivateKey:isTestnet],\n                  @\"[NSString+Base58 isValidBitcoinPrivateKey]\");\n    \n    // mini private key format\n    BRKey *key = [BRKey keyWithPrivateKey:@\"S6c56bnXQiBjk9mqSYE7ykVQ7NzrRy\" isTestnet:isTestnet];\n    \n    NSLog(@\"privKey:S6c56bnXQiBjk9mqSYE7ykVQ7NzrRy = %@\", key.address);\n    XCTAssertEqualObjects(@\"1CciesT23BNionJeXrbxmjc7ywfiyM4oLW\", key.address, @\"[BRKey keyWithPrivateKey:]\");\n    XCTAssertTrue([@\"SzavMBLoXU6kDrqtUVmffv\" isValidBitcoinPrivateKey:isTestnet],\n                  @\"[NSString+Base58 isValidBitcoinPrivateKey]\");\n    \n    // old mini private key format\n    key = [BRKey keyWithPrivateKey:@\"SzavMBLoXU6kDrqtUVmffv\" isTestnet:isTestnet];\n    \n    NSLog(@\"privKey:SzavMBLoXU6kDrqtUVmffv = %@\", key.address);\n    XCTAssertEqualObjects(@\"1CC3X2gu58d6wXUWMffpuzN9JAfTUWu4Kj\", key.address, @\"[BRKey keyWithPrivateKey:]\");\n    \n    // uncompressed private key\n    key = [BRKey keyWithPrivateKey:@\"5Kb8kLf9zgWQnogidDA76MzPL6TsZZY36hWXMssSzNydYXYB9KF\" isTestnet:isTestnet];\n    \n    NSLog(@\"privKey:5Kb8kLf9zgWQnogidDA76MzPL6TsZZY36hWXMssSzNydYXYB9KF = %@\", key.address);\n    XCTAssertEqualObjects(@\"1CC3X2gu58d6wXUWMffpuzN9JAfTUWu4Kj\", key.address, @\"[BRKey keyWithPrivateKey:]\");\n    \n    // uncompressed private key export\n    NSLog(@\"privKey = %@\", key.privateKey);\n    XCTAssertEqualObjects(@\"5Kb8kLf9zgWQnogidDA76MzPL6TsZZY36hWXMssSzNydYXYB9KF\", key.privateKey,\n                          @\"[BRKey privateKey]\");\n    \n    // compressed private key\n    key = [BRKey keyWithPrivateKey:@\"KyvGbxRUoofdw3TNydWn2Z78dBHSy2odn1d3wXWN2o3SAtccFNJL\" isTestnet:isTestnet];\n    \n    NSLog(@\"privKey:KyvGbxRUoofdw3TNydWn2Z78dBHSy2odn1d3wXWN2o3SAtccFNJL = %@\", key.address);\n    XCTAssertEqualObjects(@\"1JMsC6fCtYWkTjPPdDrYX3we2aBrewuEM3\", key.address, @\"[BRKey keyWithPrivateKey:]\");\n    \n    // compressed private key export\n    NSLog(@\"privKey = %@\", key.privateKey);\n    XCTAssertEqualObjects(@\"KyvGbxRUoofdw3TNydWn2Z78dBHSy2odn1d3wXWN2o3SAtccFNJL\", key.privateKey,\n                          @\"[BRKey privateKey]\");\n}\n#endif\n\n#pragma mark - testKeyWithBIP38Key\n\n#if ! BITCOIN_TESTNET && ! SKIP_BIP38\n- (void)testKeyWithBIP38Key\n{\n    NSString *intercode, *confcode, *privkey;\n    BRKey *key;\n    \n    // non EC multiplied, uncompressed\n    key = [BRKey keyWithBIP38Key:@\"6PRVWUbkzzsbcVac2qwfssoUJAN1Xhrg6bNk8J7Nzm5H7kxEbn2Nh2ZoGg\"\n                   andPassphrase:@\"TestingOneTwoThree\" isTestnet:isTestnet];\n    NSLog(@\"privKey = %@\", key.privateKey);\n    XCTAssertEqualObjects(@\"5KN7MzqK5wt2TP1fQCYyHBtDrXdJuXbUzm4A9rKAteGu3Qi5CVR\", key.privateKey,\n                          @\"[BRKey keyWithBIP38Key:andPassphrase:]\");\n    XCTAssertEqualObjects([key BIP38KeyWithPassphrase:@\"TestingOneTwoThree\" isTestnet:isTestnet],\n                          @\"6PRVWUbkzzsbcVac2qwfssoUJAN1Xhrg6bNk8J7Nzm5H7kxEbn2Nh2ZoGg\",\n                          @\"[BRKey BIP38KeyWithPassphrase:]\");\n    \n    key = [BRKey keyWithBIP38Key:@\"6PRNFFkZc2NZ6dJqFfhRoFNMR9Lnyj7dYGrzdgXXVMXcxoKTePPX1dWByq\"\n                   andPassphrase:@\"Satoshi\" isTestnet:isTestnet];\n    NSLog(@\"privKey = %@\", key.privateKey);\n    XCTAssertEqualObjects(@\"5HtasZ6ofTHP6HCwTqTkLDuLQisYPah7aUnSKfC7h4hMUVw2gi5\", key.privateKey,\n                          @\"[BRKey keyWithBIP38Key:andPassphrase:]\");\n    XCTAssertEqualObjects([key BIP38KeyWithPassphrase:@\"Satoshi\" isTestnet:isTestnet],\n                          @\"6PRNFFkZc2NZ6dJqFfhRoFNMR9Lnyj7dYGrzdgXXVMXcxoKTePPX1dWByq\",\n                          @\"[BRKey BIP38KeyWithPassphrase:]\");\n    \n    // non EC multiplied, compressed\n    key = [BRKey keyWithBIP38Key:@\"6PYNKZ1EAgYgmQfmNVamxyXVWHzK5s6DGhwP4J5o44cvXdoY7sRzhtpUeo\"\n                   andPassphrase:@\"TestingOneTwoThree\" isTestnet:isTestnet];\n    NSLog(@\"privKey = %@\", key.privateKey);\n    XCTAssertEqualObjects(@\"L44B5gGEpqEDRS9vVPz7QT35jcBG2r3CZwSwQ4fCewXAhAhqGVpP\", key.privateKey,\n                          @\"[BRKey keyWithBIP38Key:andPassphrase:]\");\n    XCTAssertEqualObjects([key BIP38KeyWithPassphrase:@\"TestingOneTwoThree\" isTestnet:isTestnet],\n                          @\"6PYNKZ1EAgYgmQfmNVamxyXVWHzK5s6DGhwP4J5o44cvXdoY7sRzhtpUeo\",\n                          @\"[BRKey BIP38KeyWithPassphrase:]\");\n    \n    key = [BRKey keyWithBIP38Key:@\"6PYLtMnXvfG3oJde97zRyLYFZCYizPU5T3LwgdYJz1fRhh16bU7u6PPmY7\"\n                   andPassphrase:@\"Satoshi\" isTestnet:isTestnet];\n    NSLog(@\"privKey = %@\", key.privateKey);\n    XCTAssertEqualObjects(@\"KwYgW8gcxj1JWJXhPSu4Fqwzfhp5Yfi42mdYmMa4XqK7NJxXUSK7\", key.privateKey,\n                          @\"[BRKey keyWithBIP38Key:andPassphrase:]\");\n    XCTAssertEqualObjects([key BIP38KeyWithPassphrase:@\"Satoshi\" isTestnet:isTestnet],\n                          @\"6PYLtMnXvfG3oJde97zRyLYFZCYizPU5T3LwgdYJz1fRhh16bU7u6PPmY7\",\n                          @\"[BRKey BIP38KeyWithPassphrase:]\");\n    \n    // EC multiplied, uncompressed, no lot/sequence number\n    key = [BRKey keyWithBIP38Key:@\"6PfQu77ygVyJLZjfvMLyhLMQbYnu5uguoJJ4kMCLqWwPEdfpwANVS76gTX\"\n                   andPassphrase:@\"TestingOneTwoThree\" isTestnet:isTestnet];\n    NSLog(@\"privKey = %@\", key.privateKey);\n    XCTAssertEqualObjects(@\"5K4caxezwjGCGfnoPTZ8tMcJBLB7Jvyjv4xxeacadhq8nLisLR2\", key.privateKey,\n                          @\"[BRKey keyWithBIP38Key:andPassphrase:]\");\n    intercode = [BRKey BIP38IntermediateCodeWithSalt:0xa50dba6772cb9383ULL andPassphrase:@\"TestingOneTwoThree\"];\n    NSLog(@\"intercode = %@\", intercode);\n    privkey = [BRKey BIP38KeyWithIntermediateCode:intercode\n                                            seedb:@\"99241d58245c883896f80843d2846672d7312e6195ca1a6c\".hexToData compressed:NO\n                                 confirmationCode:&confcode isTestnet:isTestnet];\n    NSLog(@\"confcode = %@\", confcode);\n    XCTAssertEqualObjects(@\"6PfQu77ygVyJLZjfvMLyhLMQbYnu5uguoJJ4kMCLqWwPEdfpwANVS76gTX\", privkey,\n                          @\"[BRKey BIP38KeyWithIntermediateCode:]\");\n    XCTAssertTrue([BRKey confirmWithBIP38ConfirmationCode:confcode address:@\"1PE6TQi6HTVNz5DLwB1LcpMBALubfuN2z2\"\n                                               passphrase:@\"TestingOneTwoThree\" isTestnet:isTestnet], @\"[BRKey confirmWithBIP38ConfirmationCode:]\");\n    \n    key = [BRKey keyWithBIP38Key:@\"6PfLGnQs6VZnrNpmVKfjotbnQuaJK4KZoPFrAjx1JMJUa1Ft8gnf5WxfKd\"\n                   andPassphrase:@\"Satoshi\" isTestnet:isTestnet];\n    NSLog(@\"privKey = %@\", key.privateKey);\n    XCTAssertEqualObjects(@\"5KJ51SgxWaAYR13zd9ReMhJpwrcX47xTJh2D3fGPG9CM8vkv5sH\", key.privateKey,\n                          @\"[BRKey keyWithBIP38Key:andPassphrase:]\");\n    intercode = [BRKey BIP38IntermediateCodeWithSalt:0x67010a9573418906ULL andPassphrase:@\"Satoshi\"];\n    NSLog(@\"intercode = %@\", intercode);\n    privkey = [BRKey BIP38KeyWithIntermediateCode:intercode\n                                            seedb:@\"49111e301d94eab339ff9f6822ee99d9f49606db3b47a497\".hexToData compressed:NO\n                                 confirmationCode:&confcode isTestnet:isTestnet];\n    NSLog(@\"confcode = %@\", confcode);\n    XCTAssertEqualObjects(@\"6PfLGnQs6VZnrNpmVKfjotbnQuaJK4KZoPFrAjx1JMJUa1Ft8gnf5WxfKd\", privkey,\n                          @\"[BRKey BIP38KeyWithIntermediateCode:]\");\n    XCTAssertTrue([BRKey confirmWithBIP38ConfirmationCode:confcode address:@\"1CqzrtZC6mXSAhoxtFwVjz8LtwLJjDYU3V\"\n                                               passphrase:@\"Satoshi\" isTestnet:isTestnet], @\"[BRKey confirmWithBIP38ConfirmationCode:]\");\n    \n    // EC multiplied, uncompressed, with lot/sequence number\n    key = [BRKey keyWithBIP38Key:@\"6PgNBNNzDkKdhkT6uJntUXwwzQV8Rr2tZcbkDcuC9DZRsS6AtHts4Ypo1j\"\n                   andPassphrase:@\"MOLON LABE\" isTestnet:isTestnet];\n    NSLog(@\"privKey = %@\", key.privateKey);\n    XCTAssertEqualObjects(@\"5JLdxTtcTHcfYcmJsNVy1v2PMDx432JPoYcBTVVRHpPaxUrdtf8\", key.privateKey,\n                          @\"[BRKey keyWithBIP38Key:andPassphrase:]\");\n    intercode = [BRKey BIP38IntermediateCodeWithLot:263183 sequence:1 salt:0x4fca5a97u passphrase:@\"MOLON LABE\"];\n    NSLog(@\"intercode = %@\", intercode);\n    privkey = [BRKey BIP38KeyWithIntermediateCode:intercode\n                                            seedb:@\"87a13b07858fa753cd3ab3f1c5eafb5f12579b6c33c9a53f\".hexToData compressed:NO\n                                 confirmationCode:&confcode isTestnet:isTestnet];\n    NSLog(@\"confcode = %@\", confcode);\n    XCTAssertEqualObjects(@\"6PgNBNNzDkKdhkT6uJntUXwwzQV8Rr2tZcbkDcuC9DZRsS6AtHts4Ypo1j\", privkey,\n                          @\"[BRKey BIP38KeyWithIntermediateCode:]\");\n    XCTAssertTrue([BRKey confirmWithBIP38ConfirmationCode:confcode address:@\"1Jscj8ALrYu2y9TD8NrpvDBugPedmbj4Yh\"\n                                               passphrase:@\"MOLON LABE\" isTestnet:isTestnet], @\"[BRKey confirmWithBIP38ConfirmationCode:]\");\n    \n    key = [BRKey keyWithBIP38Key:@\"6PgGWtx25kUg8QWvwuJAgorN6k9FbE25rv5dMRwu5SKMnfpfVe5mar2ngH\"\n                   andPassphrase:@\"\\u039c\\u039f\\u039b\\u03a9\\u039d \\u039b\\u0391\\u0392\\u0395\" isTestnet:isTestnet];\n    NSLog(@\"privKey = %@\", key.privateKey);\n    XCTAssertEqualObjects(@\"5KMKKuUmAkiNbA3DazMQiLfDq47qs8MAEThm4yL8R2PhV1ov33D\", key.privateKey,\n                          @\"[BRKey keyWithBIP38Key:andPassphrase:]\");\n    intercode = [BRKey BIP38IntermediateCodeWithLot:806938 sequence:1 salt:0xc40ea76fu\n                                         passphrase:@\"\\u039c\\u039f\\u039b\\u03a9\\u039d \\u039b\\u0391\\u0392\\u0395\"];\n    NSLog(@\"intercode = %@\", intercode);\n    privkey = [BRKey BIP38KeyWithIntermediateCode:intercode\n                                            seedb:@\"03b06a1ea7f9219ae364560d7b985ab1fa27025aaa7e427a\".hexToData compressed:NO\n                                 confirmationCode:&confcode isTestnet:isTestnet];\n    NSLog(@\"confcode = %@\", confcode);\n    XCTAssertEqualObjects(@\"6PgGWtx25kUg8QWvwuJAgorN6k9FbE25rv5dMRwu5SKMnfpfVe5mar2ngH\", privkey,\n                          @\"[BRKey BIP38KeyWithIntermediateCode:]\");\n    XCTAssertTrue([BRKey confirmWithBIP38ConfirmationCode:confcode address:@\"1Lurmih3KruL4xDB5FmHof38yawNtP9oGf\"\n                                               passphrase:@\"\\u039c\\u039f\\u039b\\u03a9\\u039d \\u039b\\u0391\\u0392\\u0395\" isTestnet:isTestnet],\n                  @\"[BRKey confirmWithBIP38ConfirmationCode:]\");\n    \n    // password NFC unicode normalization test\n    key = [BRKey keyWithBIP38Key:@\"6PRW5o9FLp4gJDDVqJQKJFTpMvdsSGJxMYHtHaQBF3ooa8mwD69bapcDQn\"\n                   andPassphrase:@\"\\u03D2\\u0301\\0\\U00010400\\U0001F4A9\" isTestnet:isTestnet];\n    NSLog(@\"privKey = %@\", key.privateKey);\n    XCTAssertEqualObjects(@\"5Jajm8eQ22H3pGWLEVCXyvND8dQZhiQhoLJNKjYXk9roUFTMSZ4\", key.privateKey,\n                          @\"[BRKey keyWithBIP38Key:andPassphrase:]\");\n    \n    // incorrect password test\n    key = [BRKey keyWithBIP38Key:@\"6PRW5o9FLp4gJDDVqJQKJFTpMvdsSGJxMYHtHaQBF3ooa8mwD69bapcDQn\" andPassphrase:@\"foobar\" isTestnet:isTestnet];\n    NSLog(@\"privKey = %@\", key.privateKey);\n    XCTAssertNil(key, @\"[BRKey keyWithBIP38Key:andPassphrase:]\");\n}\n#endif\n\n#pragma mark - testTransaction\n\n- (void)testTransaction\n{\n    NSMutableData *hash = [NSMutableData dataWithLength:CC_SHA256_DIGEST_LENGTH], *script = [NSMutableData data];\n    BRKey *k = [BRKey keyWithSecret:@\"0000000000000000000000000000000000000000000000000000000000000001\".hexToData\n                         compressed:YES isTestnet:isTestnet];\n    \n    [script appendScriptPubKeyForAddress:k.address isTestnet:isTestnet];\n    \n    BRTransaction *tx = [[BRTransaction alloc] initWithInputHashes:@[hash] inputIndexes:@[@0] inputScripts:@[script]\n                                                   outputAddresses:@[k.address, k.address] outputAmounts:@[@100000000, @4900000000] isTestnet:isTestnet];\n    \n    [tx signWithPrivateKeys:@[k.privateKey] isTestnet:isTestnet];\n    \n    XCTAssertTrue([tx isSigned], @\"[BRTransaction signWithPrivateKeys:]\");\n    \n    NSUInteger height = [tx blockHeightUntilFreeForAmounts:@[@5000000000] withBlockHeights:@[@1]];\n    uint64_t priority = [tx priorityForAmounts:@[@5000000000] withAges:@[@(height - 1)]];\n    \n    NSLog(@\"height = %lu\", (unsigned long)height);\n    NSLog(@\"priority = %llu\", priority);\n    \n    XCTAssertTrue(priority >= TX_FREE_MIN_PRIORITY, @\"[BRTransaction priorityForAmounts:withAges:]\");\n    \n    NSData *d = tx.data;\n    \n    tx = [BRTransaction transactionWithMessage:d isTestnet:isTestnet];\n    \n    XCTAssertEqualObjects(d, tx.data, @\"[BRTransaction transactionWithMessage:]\");\n    \n    tx = [[BRTransaction alloc] initWithInputHashes:@[hash, hash, hash, hash, hash, hash, hash, hash, hash, hash]\n                                       inputIndexes:@[@0, @0,@0, @0, @0, @0, @0, @0, @0, @0]\n                                       inputScripts:@[script, script, script, script, script, script, script, script, script, script]\n                                    outputAddresses:@[k.address, k.address, k.address, k.address, k.address, k.address, k.address, k.address,\n                                                      k.address, k.address]\n                                      outputAmounts:@[@1000000, @1000000, @1000000, @1000000, @1000000, @1000000, @1000000, @1000000, @1000000,\n                                                      @1000000] isTestnet:isTestnet];\n    \n    [tx signWithPrivateKeys:@[k.privateKey] isTestnet:isTestnet];\n    \n    XCTAssertTrue([tx isSigned], @\"[BRTransaction signWithPrivateKeys:]\");\n    \n    height = [tx blockHeightUntilFreeForAmounts:@[@1000000, @1000000, @1000000, @1000000, @1000000, @1000000, @1000000,\n                                                  @1000000, @1000000, @1000000]\n                               withBlockHeights:@[@1, @2, @3, @4, @5, @6, @7, @8, @9, @10]];\n    priority = [tx priorityForAmounts:@[@1000000, @1000000, @1000000, @1000000, @1000000, @1000000, @1000000, @1000000,\n                                        @1000000, @1000000]\n                             withAges:@[@(height - 1), @(height - 2), @(height - 3), @(height - 4), @(height - 5), @(height - 6),\n                                        @(height - 7), @(height - 8), @(height - 9), @(height - 10)]];\n    \n    NSLog(@\"height = %lu\", (unsigned long)height);\n    NSLog(@\"priority = %llu\", priority);\n    \n    XCTAssertTrue(priority >= TX_FREE_MIN_PRIORITY, @\"[BRTransaction priorityForAmounts:withAges:]\");\n    \n    d = tx.data;\n    tx = [BRTransaction transactionWithMessage:d isTestnet:isTestnet];\n    \n    XCTAssertEqualObjects(d, tx.data, @\"[BRTransaction transactionWithMessage:]\");\n}\n//*/\n@end\n"
  },
  {
    "path": "ArcBitTests/Info.plist",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\n<plist version=\"1.0\">\n<dict>\n\t<key>CFBundleDevelopmentRegion</key>\n\t<string>en</string>\n\t<key>CFBundleExecutable</key>\n\t<string>$(EXECUTABLE_NAME)</string>\n\t<key>CFBundleIdentifier</key>\n\t<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>\n\t<key>CFBundleInfoDictionaryVersion</key>\n\t<string>6.0</string>\n\t<key>CFBundleName</key>\n\t<string>$(PRODUCT_NAME)</string>\n\t<key>CFBundlePackageType</key>\n\t<string>BNDL</string>\n\t<key>CFBundleShortVersionString</key>\n\t<string>1.0</string>\n\t<key>CFBundleSignature</key>\n\t<string>????</string>\n\t<key>CFBundleVersion</key>\n\t<string>1</string>\n</dict>\n</plist>\n"
  },
  {
    "path": "Podfile",
    "content": "# Uncomment this line to define a global platform for your project\n# platform :ios, '7.0'\n\n# ignore all warnings from all pods\ninhibit_all_warnings!\n\nsource 'https://github.com/CocoaPods/Specs.git'\n\ntarget 'ArcBit' do\npod 'AFNetworking', '2.5.3', :inhibit_warnings => true\npod 'CoreBitcoin', :podspec => 'https://raw.github.com/oleganza/CoreBitcoin/master/CoreBitcoin.podspec', :inhibit_warnings => true\npod 'MBProgressHUD', '~> 0.9', :inhibit_warnings => true\npod 'RNCryptor', '2.2', :inhibit_warnings => true\npod 'ECSlidingViewController', '~> 2.0.3', :inhibit_warnings => true\npod 'iCloudDocumentSync', :inhibit_warnings => true\npod 'SwiftTryCatch', :inhibit_warnings => true\npod 'Fabric'\npod 'Crashlytics'\nend\n\ntarget 'ArcBitTests' do\npod 'AFNetworking', '2.5.3', :inhibit_warnings => true\npod 'CoreBitcoin', :podspec => 'https://raw.github.com/oleganza/CoreBitcoin/master/CoreBitcoin.podspec', :inhibit_warnings => true\npod 'MBProgressHUD', '~> 0.9', :inhibit_warnings => true\npod 'RNCryptor', '2.2', :inhibit_warnings => true\npod 'ECSlidingViewController', '~> 2.0.3', :inhibit_warnings => true\npod 'iCloudDocumentSync', :inhibit_warnings => true\npod 'SwiftTryCatch', :inhibit_warnings => true\npod 'Fabric'\npod 'Crashlytics'\nend\n\n"
  },
  {
    "path": "Pods/AFNetworking/AFNetworking/AFHTTPRequestOperation.h",
    "content": "// AFHTTPRequestOperation.h\n//\n// Copyright (c) 2013-2015 AFNetworking (http://afnetworking.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\n#import <Foundation/Foundation.h>\n#import \"AFURLConnectionOperation.h\"\n\n/**\n `AFHTTPRequestOperation` is a subclass of `AFURLConnectionOperation` for requests using the HTTP or HTTPS protocols. It encapsulates the concept of acceptable status codes and content types, which determine the success or failure of a request.\n */\n@interface AFHTTPRequestOperation : AFURLConnectionOperation\n\n///------------------------------------------------\n/// @name Getting HTTP URL Connection Information\n///------------------------------------------------\n\n/**\n The last HTTP response received by the operation's connection.\n */\n@property (readonly, nonatomic, strong) NSHTTPURLResponse *response;\n\n/**\n Responses sent from the server in data tasks created with `dataTaskWithRequest:success:failure:` and run using the `GET` / `POST` / et al. convenience methods are automatically validated and serialized by the response serializer. By default, this property is set to an AFHTTPResponse serializer, which uses the raw data as its response object. The serializer validates the status code to be in the `2XX` range, denoting success. If the response serializer generates an error in `-responseObjectForResponse:data:error:`, the `failure` callback of the session task or request operation will be executed; otherwise, the `success` callback will be executed.\n\n @warning `responseSerializer` must not be `nil`. Setting a response serializer will clear out any cached value\n */\n@property (nonatomic, strong) AFHTTPResponseSerializer <AFURLResponseSerialization> * responseSerializer;\n\n/**\n An object constructed by the `responseSerializer` from the response and response data. Returns `nil` unless the operation `isFinished`, has a `response`, and has `responseData` with non-zero content length. If an error occurs during serialization, `nil` will be returned, and the `error` property will be populated with the serialization error.\n */\n@property (readonly, nonatomic, strong) id responseObject;\n\n///-----------------------------------------------------------\n/// @name Setting Completion Block Success / Failure Callbacks\n///-----------------------------------------------------------\n\n/**\n Sets the `completionBlock` property with a block that executes either the specified success or failure block, depending on the state of the request on completion. If `error` returns a value, which can be caused by an unacceptable status code or content type, then `failure` is executed. Otherwise, `success` is executed.\n\n This method should be overridden in subclasses in order to specify the response object passed into the success block.\n\n @param success The block to be executed on the completion of a successful request. This block has no return value and takes two arguments: the receiver operation and the object constructed from the response data of the request.\n @param failure The block to be executed on the completion of an unsuccessful request. This block has no return value and takes two arguments: the receiver operation and the error that occurred during the request.\n */\n- (void)setCompletionBlockWithSuccess:(void (^)(AFHTTPRequestOperation *operation, id responseObject))success\n                              failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error))failure;\n\n@end\n"
  },
  {
    "path": "Pods/AFNetworking/AFNetworking/AFHTTPRequestOperation.m",
    "content": "// AFHTTPRequestOperation.m\n//\n// Copyright (c) 2013-2015 AFNetworking (http://afnetworking.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\n#import \"AFHTTPRequestOperation.h\"\n\nstatic dispatch_queue_t http_request_operation_processing_queue() {\n    static dispatch_queue_t af_http_request_operation_processing_queue;\n    static dispatch_once_t onceToken;\n    dispatch_once(&onceToken, ^{\n        af_http_request_operation_processing_queue = dispatch_queue_create(\"com.alamofire.networking.http-request.processing\", DISPATCH_QUEUE_CONCURRENT);\n    });\n\n    return af_http_request_operation_processing_queue;\n}\n\nstatic dispatch_group_t http_request_operation_completion_group() {\n    static dispatch_group_t af_http_request_operation_completion_group;\n    static dispatch_once_t onceToken;\n    dispatch_once(&onceToken, ^{\n        af_http_request_operation_completion_group = dispatch_group_create();\n    });\n\n    return af_http_request_operation_completion_group;\n}\n\n#pragma mark -\n\n@interface AFURLConnectionOperation ()\n@property (readwrite, nonatomic, strong) NSURLRequest *request;\n@property (readwrite, nonatomic, strong) NSURLResponse *response;\n@end\n\n@interface AFHTTPRequestOperation ()\n@property (readwrite, nonatomic, strong) NSHTTPURLResponse *response;\n@property (readwrite, nonatomic, strong) id responseObject;\n@property (readwrite, nonatomic, strong) NSError *responseSerializationError;\n@property (readwrite, nonatomic, strong) NSRecursiveLock *lock;\n@end\n\n@implementation AFHTTPRequestOperation\n@dynamic response;\n@dynamic lock;\n\n- (instancetype)initWithRequest:(NSURLRequest *)urlRequest {\n    self = [super initWithRequest:urlRequest];\n    if (!self) {\n        return nil;\n    }\n\n    self.responseSerializer = [AFHTTPResponseSerializer serializer];\n\n    return self;\n}\n\n- (void)setResponseSerializer:(AFHTTPResponseSerializer <AFURLResponseSerialization> *)responseSerializer {\n    NSParameterAssert(responseSerializer);\n\n    [self.lock lock];\n    _responseSerializer = responseSerializer;\n    self.responseObject = nil;\n    self.responseSerializationError = nil;\n    [self.lock unlock];\n}\n\n- (id)responseObject {\n    [self.lock lock];\n    if (!_responseObject && [self isFinished] && !self.error) {\n        NSError *error = nil;\n        self.responseObject = [self.responseSerializer responseObjectForResponse:self.response data:self.responseData error:&error];\n        if (error) {\n            self.responseSerializationError = error;\n        }\n    }\n    [self.lock unlock];\n\n    return _responseObject;\n}\n\n- (NSError *)error {\n    if (_responseSerializationError) {\n        return _responseSerializationError;\n    } else {\n        return [super error];\n    }\n}\n\n#pragma mark - AFHTTPRequestOperation\n\n- (void)setCompletionBlockWithSuccess:(void (^)(AFHTTPRequestOperation *operation, id responseObject))success\n                              failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error))failure\n{\n    // completionBlock is manually nilled out in AFURLConnectionOperation to break the retain cycle.\n#pragma clang diagnostic push\n#pragma clang diagnostic ignored \"-Warc-retain-cycles\"\n#pragma clang diagnostic ignored \"-Wgnu\"\n    self.completionBlock = ^{\n        if (self.completionGroup) {\n            dispatch_group_enter(self.completionGroup);\n        }\n\n        dispatch_async(http_request_operation_processing_queue(), ^{\n            if (self.error) {\n                if (failure) {\n                    dispatch_group_async(self.completionGroup ?: http_request_operation_completion_group(), self.completionQueue ?: dispatch_get_main_queue(), ^{\n                        failure(self, self.error);\n                    });\n                }\n            } else {\n                id responseObject = self.responseObject;\n                if (self.error) {\n                    if (failure) {\n                        dispatch_group_async(self.completionGroup ?: http_request_operation_completion_group(), self.completionQueue ?: dispatch_get_main_queue(), ^{\n                            failure(self, self.error);\n                        });\n                    }\n                } else {\n                    if (success) {\n                        dispatch_group_async(self.completionGroup ?: http_request_operation_completion_group(), self.completionQueue ?: dispatch_get_main_queue(), ^{\n                            success(self, responseObject);\n                        });\n                    }\n                }\n            }\n\n            if (self.completionGroup) {\n                dispatch_group_leave(self.completionGroup);\n            }\n        });\n    };\n#pragma clang diagnostic pop\n}\n\n#pragma mark - AFURLRequestOperation\n\n- (void)pause {\n    [super pause];\n\n    u_int64_t offset = 0;\n    if ([self.outputStream propertyForKey:NSStreamFileCurrentOffsetKey]) {\n        offset = [(NSNumber *)[self.outputStream propertyForKey:NSStreamFileCurrentOffsetKey] unsignedLongLongValue];\n    } else {\n        offset = [(NSData *)[self.outputStream propertyForKey:NSStreamDataWrittenToMemoryStreamKey] length];\n    }\n\n    NSMutableURLRequest *mutableURLRequest = [self.request mutableCopy];\n    if ([self.response respondsToSelector:@selector(allHeaderFields)] && [[self.response allHeaderFields] valueForKey:@\"ETag\"]) {\n        [mutableURLRequest setValue:[[self.response allHeaderFields] valueForKey:@\"ETag\"] forHTTPHeaderField:@\"If-Range\"];\n    }\n    [mutableURLRequest setValue:[NSString stringWithFormat:@\"bytes=%llu-\", offset] forHTTPHeaderField:@\"Range\"];\n    self.request = mutableURLRequest;\n}\n\n#pragma mark - NSSecureCoding\n\n+ (BOOL)supportsSecureCoding {\n    return YES;\n}\n\n- (id)initWithCoder:(NSCoder *)decoder {\n    self = [super initWithCoder:decoder];\n    if (!self) {\n        return nil;\n    }\n\n    self.responseSerializer = [decoder decodeObjectOfClass:[AFHTTPResponseSerializer class] forKey:NSStringFromSelector(@selector(responseSerializer))];\n\n    return self;\n}\n\n- (void)encodeWithCoder:(NSCoder *)coder {\n    [super encodeWithCoder:coder];\n\n    [coder encodeObject:self.responseSerializer forKey:NSStringFromSelector(@selector(responseSerializer))];\n}\n\n#pragma mark - NSCopying\n\n- (id)copyWithZone:(NSZone *)zone {\n    AFHTTPRequestOperation *operation = [super copyWithZone:zone];\n\n    operation.responseSerializer = [self.responseSerializer copyWithZone:zone];\n    operation.completionQueue = self.completionQueue;\n    operation.completionGroup = self.completionGroup;\n\n    return operation;\n}\n\n@end\n"
  },
  {
    "path": "Pods/AFNetworking/AFNetworking/AFHTTPRequestOperationManager.h",
    "content": "// AFHTTPRequestOperationManager.h\n//\n// Copyright (c) 2013-2015 AFNetworking (http://afnetworking.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\n#import <Foundation/Foundation.h>\n#import <SystemConfiguration/SystemConfiguration.h>\n#import <Availability.h>\n\n#if __IPHONE_OS_VERSION_MIN_REQUIRED\n#import <MobileCoreServices/MobileCoreServices.h>\n#else\n#import <CoreServices/CoreServices.h>\n#endif\n\n#import \"AFHTTPRequestOperation.h\"\n#import \"AFURLResponseSerialization.h\"\n#import \"AFURLRequestSerialization.h\"\n#import \"AFSecurityPolicy.h\"\n#import \"AFNetworkReachabilityManager.h\"\n\n#ifndef NS_DESIGNATED_INITIALIZER\n#if __has_attribute(objc_designated_initializer)\n#define NS_DESIGNATED_INITIALIZER __attribute__((objc_designated_initializer))\n#else\n#define NS_DESIGNATED_INITIALIZER\n#endif\n#endif\n\n/**\n `AFHTTPRequestOperationManager` encapsulates the common patterns of communicating with a web application over HTTP, including request creation, response serialization, network reachability monitoring, and security, as well as request operation management.\n\n ## Subclassing Notes\n\n Developers targeting iOS 7 or Mac OS X 10.9 or later that deal extensively with a web service are encouraged to subclass `AFHTTPSessionManager`, providing a class method that returns a shared singleton object on which authentication and other configuration can be shared across the application.\n\n For developers targeting iOS 6 or Mac OS X 10.8 or earlier, `AFHTTPRequestOperationManager` may be used to similar effect.\n\n ## Methods to Override\n\n To change the behavior of all request operation construction for an `AFHTTPRequestOperationManager` subclass, override `HTTPRequestOperationWithRequest:success:failure`.\n\n ## Serialization\n\n Requests created by an HTTP client will contain default headers and encode parameters according to the `requestSerializer` property, which is an object conforming to `<AFURLRequestSerialization>`.\n\n Responses received from the server are automatically validated and serialized by the `responseSerializers` property, which is an object conforming to `<AFURLResponseSerialization>`\n\n ## URL Construction Using Relative Paths\n\n For HTTP convenience methods, the request serializer constructs URLs from the path relative to the `-baseURL`, using `NSURL +URLWithString:relativeToURL:`, when provided. If `baseURL` is `nil`, `path` needs to resolve to a valid `NSURL` object using `NSURL +URLWithString:`.\n\n Below are a few examples of how `baseURL` and relative paths interact:\n\n    NSURL *baseURL = [NSURL URLWithString:@\"http://example.com/v1/\"];\n    [NSURL URLWithString:@\"foo\" relativeToURL:baseURL];                  // http://example.com/v1/foo\n    [NSURL URLWithString:@\"foo?bar=baz\" relativeToURL:baseURL];          // http://example.com/v1/foo?bar=baz\n    [NSURL URLWithString:@\"/foo\" relativeToURL:baseURL];                 // http://example.com/foo\n    [NSURL URLWithString:@\"foo/\" relativeToURL:baseURL];                 // http://example.com/v1/foo\n    [NSURL URLWithString:@\"/foo/\" relativeToURL:baseURL];                // http://example.com/foo/\n    [NSURL URLWithString:@\"http://example2.com/\" relativeToURL:baseURL]; // http://example2.com/\n\n Also important to note is that a trailing slash will be added to any `baseURL` without one. This would otherwise cause unexpected behavior when constructing URLs using paths without a leading slash.\n\n ## Network Reachability Monitoring\n\n Network reachability status and change monitoring is available through the `reachabilityManager` property. Applications may choose to monitor network reachability conditions in order to prevent or suspend any outbound requests. See `AFNetworkReachabilityManager` for more details.\n\n ## NSSecureCoding & NSCopying Caveats\n\n `AFHTTPRequestOperationManager` conforms to the `NSSecureCoding` and `NSCopying` protocols, allowing operations to be archived to disk, and copied in memory, respectively. There are a few minor caveats to keep in mind, however:\n\n - Archives and copies of HTTP clients will be initialized with an empty operation queue.\n - NSSecureCoding cannot serialize / deserialize block properties, so an archive of an HTTP client will not include any reachability callback block that may be set.\n */\n@interface AFHTTPRequestOperationManager : NSObject <NSSecureCoding, NSCopying>\n\n/**\n The URL used to monitor reachability, and construct requests from relative paths in methods like `requestWithMethod:URLString:parameters:`, and the `GET` / `POST` / et al. convenience methods.\n */\n@property (readonly, nonatomic, strong) NSURL *baseURL;\n\n/**\n Requests created with `requestWithMethod:URLString:parameters:` & `multipartFormRequestWithMethod:URLString:parameters:constructingBodyWithBlock:` are constructed with a set of default headers using a parameter serialization specified by this property. By default, this is set to an instance of `AFHTTPRequestSerializer`, which serializes query string parameters for `GET`, `HEAD`, and `DELETE` requests, or otherwise URL-form-encodes HTTP message bodies.\n\n @warning `requestSerializer` must not be `nil`.\n */\n@property (nonatomic, strong) AFHTTPRequestSerializer <AFURLRequestSerialization> * requestSerializer;\n\n/**\n Responses sent from the server in data tasks created with `dataTaskWithRequest:success:failure:` and run using the `GET` / `POST` / et al. convenience methods are automatically validated and serialized by the response serializer. By default, this property is set to a JSON serializer, which serializes data from responses with a `application/json` MIME type, and falls back to the raw data object. The serializer validates the status code to be in the `2XX` range, denoting success. If the response serializer generates an error in `-responseObjectForResponse:data:error:`, the `failure` callback of the session task or request operation will be executed; otherwise, the `success` callback will be executed.\n\n @warning `responseSerializer` must not be `nil`.\n */\n@property (nonatomic, strong) AFHTTPResponseSerializer <AFURLResponseSerialization> * responseSerializer;\n\n/**\n The operation queue on which request operations are scheduled and run.\n */\n@property (nonatomic, strong) NSOperationQueue *operationQueue;\n\n///-------------------------------\n/// @name Managing URL Credentials\n///-------------------------------\n\n/**\n Whether request operations should consult the credential storage for authenticating the connection. `YES` by default.\n\n @see AFURLConnectionOperation -shouldUseCredentialStorage\n */\n@property (nonatomic, assign) BOOL shouldUseCredentialStorage;\n\n/**\n The credential used by request operations for authentication challenges.\n\n @see AFURLConnectionOperation -credential\n */\n@property (nonatomic, strong) NSURLCredential *credential;\n\n///-------------------------------\n/// @name Managing Security Policy\n///-------------------------------\n\n/**\n The security policy used by created request operations to evaluate server trust for secure connections. `AFHTTPRequestOperationManager` uses the `defaultPolicy` unless otherwise specified.\n */\n@property (nonatomic, strong) AFSecurityPolicy *securityPolicy;\n\n///------------------------------------\n/// @name Managing Network Reachability\n///------------------------------------\n\n/**\n The network reachability manager. `AFHTTPRequestOperationManager` uses the `sharedManager` by default.\n */\n@property (readwrite, nonatomic, strong) AFNetworkReachabilityManager *reachabilityManager;\n\n///-------------------------------\n/// @name Managing Callback Queues\n///-------------------------------\n\n/**\n The dispatch queue for the `completionBlock` of request operations. If `NULL` (default), the main queue is used.\n */\n#if OS_OBJECT_HAVE_OBJC_SUPPORT\n@property (nonatomic, strong) dispatch_queue_t completionQueue;\n#else\n@property (nonatomic, assign) dispatch_queue_t completionQueue;\n#endif\n\n/**\n The dispatch group for the `completionBlock` of request operations. If `NULL` (default), a private dispatch group is used.\n */\n#if OS_OBJECT_HAVE_OBJC_SUPPORT\n@property (nonatomic, strong) dispatch_group_t completionGroup;\n#else\n@property (nonatomic, assign) dispatch_group_t completionGroup;\n#endif\n\n///---------------------------------------------\n/// @name Creating and Initializing HTTP Clients\n///---------------------------------------------\n\n/**\n Creates and returns an `AFHTTPRequestOperationManager` object.\n */\n+ (instancetype)manager;\n\n/**\n Initializes an `AFHTTPRequestOperationManager` object with the specified base URL.\n\n This is the designated initializer.\n\n @param url The base URL for the HTTP client.\n\n @return The newly-initialized HTTP client\n */\n- (instancetype)initWithBaseURL:(NSURL *)url NS_DESIGNATED_INITIALIZER;\n\n///---------------------------------------\n/// @name Managing HTTP Request Operations\n///---------------------------------------\n\n/**\n Creates an `AFHTTPRequestOperation`, and sets the response serializers to that of the HTTP client.\n\n @param request The request object to be loaded asynchronously during execution of the operation.\n @param success A block object to be executed when the request operation finishes successfully. This block has no return value and takes two arguments: the created request operation and the object created from the response data of request.\n @param failure A block object to be executed when the request operation finishes unsuccessfully, or that finishes successfully, but encountered an error while parsing the response data. This block has no return value and takes two arguments:, the created request operation and the `NSError` object describing the network or parsing error that occurred.\n */\n- (AFHTTPRequestOperation *)HTTPRequestOperationWithRequest:(NSURLRequest *)request\n                                                    success:(void (^)(AFHTTPRequestOperation *operation, id responseObject))success\n                                                    failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error))failure;\n\n///---------------------------\n/// @name Making HTTP Requests\n///---------------------------\n\n/**\n Creates and runs an `AFHTTPRequestOperation` with a `GET` request.\n\n @param URLString The URL string used to create the request URL.\n @param parameters The parameters to be encoded according to the client request serializer.\n @param success A block object to be executed when the request operation finishes successfully. This block has no return value and takes two arguments: the request operation, and the response object created by the client response serializer.\n @param failure A block object to be executed when the request operation finishes unsuccessfully, or that finishes successfully, but encountered an error while parsing the response data. This block has no return value and takes a two arguments: the request operation and the error describing the network or parsing error that occurred.\n\n @see -HTTPRequestOperationWithRequest:success:failure:\n */\n- (AFHTTPRequestOperation *)GET:(NSString *)URLString\n                     parameters:(id)parameters\n                        success:(void (^)(AFHTTPRequestOperation *operation, id responseObject))success\n                        failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error))failure;\n\n/**\n Creates and runs an `AFHTTPRequestOperation` with a `HEAD` request.\n\n @param URLString The URL string used to create the request URL.\n @param parameters The parameters to be encoded according to the client request serializer.\n @param success A block object to be executed when the request operation finishes successfully. This block has no return value and takes a single arguments: the request operation.\n @param failure A block object to be executed when the request operation finishes unsuccessfully, or that finishes successfully, but encountered an error while parsing the response data. This block has no return value and takes a two arguments: the request operation and the error describing the network or parsing error that occurred.\n\n @see -HTTPRequestOperationWithRequest:success:failure:\n */\n- (AFHTTPRequestOperation *)HEAD:(NSString *)URLString\n                      parameters:(id)parameters\n                         success:(void (^)(AFHTTPRequestOperation *operation))success\n                         failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error))failure;\n\n/**\n Creates and runs an `AFHTTPRequestOperation` with a `POST` request.\n\n @param URLString The URL string used to create the request URL.\n @param parameters The parameters to be encoded according to the client request serializer.\n @param success A block object to be executed when the request operation finishes successfully. This block has no return value and takes two arguments: the request operation, and the response object created by the client response serializer.\n @param failure A block object to be executed when the request operation finishes unsuccessfully, or that finishes successfully, but encountered an error while parsing the response data. This block has no return value and takes a two arguments: the request operation and the error describing the network or parsing error that occurred.\n\n @see -HTTPRequestOperationWithRequest:success:failure:\n */\n- (AFHTTPRequestOperation *)POST:(NSString *)URLString\n                      parameters:(id)parameters\n                         success:(void (^)(AFHTTPRequestOperation *operation, id responseObject))success\n                         failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error))failure;\n\n/**\n Creates and runs an `AFHTTPRequestOperation` with a multipart `POST` request.\n\n @param URLString The URL string used to create the request URL.\n @param parameters The parameters to be encoded according to the client request serializer.\n @param block A block that takes a single argument and appends data to the HTTP body. The block argument is an object adopting the `AFMultipartFormData` protocol.\n @param success A block object to be executed when the request operation finishes successfully. This block has no return value and takes two arguments: the request operation, and the response object created by the client response serializer.\n @param failure A block object to be executed when the request operation finishes unsuccessfully, or that finishes successfully, but encountered an error while parsing the response data. This block has no return value and takes a two arguments: the request operation and the error describing the network or parsing error that occurred.\n\n @see -HTTPRequestOperationWithRequest:success:failure:\n */\n- (AFHTTPRequestOperation *)POST:(NSString *)URLString\n                      parameters:(id)parameters\n       constructingBodyWithBlock:(void (^)(id <AFMultipartFormData> formData))block\n                         success:(void (^)(AFHTTPRequestOperation *operation, id responseObject))success\n                         failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error))failure;\n\n/**\n Creates and runs an `AFHTTPRequestOperation` with a `PUT` request.\n\n @param URLString The URL string used to create the request URL.\n @param parameters The parameters to be encoded according to the client request serializer.\n @param success A block object to be executed when the request operation finishes successfully. This block has no return value and takes two arguments: the request operation, and the response object created by the client response serializer.\n @param failure A block object to be executed when the request operation finishes unsuccessfully, or that finishes successfully, but encountered an error while parsing the response data. This block has no return value and takes a two arguments: the request operation and the error describing the network or parsing error that occurred.\n\n @see -HTTPRequestOperationWithRequest:success:failure:\n */\n- (AFHTTPRequestOperation *)PUT:(NSString *)URLString\n                     parameters:(id)parameters\n                        success:(void (^)(AFHTTPRequestOperation *operation, id responseObject))success\n                        failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error))failure;\n\n/**\n Creates and runs an `AFHTTPRequestOperation` with a `PATCH` request.\n\n @param URLString The URL string used to create the request URL.\n @param parameters The parameters to be encoded according to the client request serializer.\n @param success A block object to be executed when the request operation finishes successfully. This block has no return value and takes two arguments: the request operation, and the response object created by the client response serializer.\n @param failure A block object to be executed when the request operation finishes unsuccessfully, or that finishes successfully, but encountered an error while parsing the response data. This block has no return value and takes a two arguments: the request operation and the error describing the network or parsing error that occurred.\n\n @see -HTTPRequestOperationWithRequest:success:failure:\n */\n- (AFHTTPRequestOperation *)PATCH:(NSString *)URLString\n                       parameters:(id)parameters\n                          success:(void (^)(AFHTTPRequestOperation *operation, id responseObject))success\n                          failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error))failure;\n\n/**\n Creates and runs an `AFHTTPRequestOperation` with a `DELETE` request.\n\n @param URLString The URL string used to create the request URL.\n @param parameters The parameters to be encoded according to the client request serializer.\n @param success A block object to be executed when the request operation finishes successfully. This block has no return value and takes two arguments: the request operation, and the response object created by the client response serializer.\n @param failure A block object to be executed when the request operation finishes unsuccessfully, or that finishes successfully, but encountered an error while parsing the response data. This block has no return value and takes a two arguments: the request operation and the error describing the network or parsing error that occurred.\n\n @see -HTTPRequestOperationWithRequest:success:failure:\n */\n- (AFHTTPRequestOperation *)DELETE:(NSString *)URLString\n                        parameters:(id)parameters\n                           success:(void (^)(AFHTTPRequestOperation *operation, id responseObject))success\n                           failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error))failure;\n\n@end\n\n"
  },
  {
    "path": "Pods/AFNetworking/AFNetworking/AFHTTPRequestOperationManager.m",
    "content": "// AFHTTPRequestOperationManager.m\n//\n// Copyright (c) 2013-2015 AFNetworking (http://afnetworking.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\n#import <Foundation/Foundation.h>\n\n#import \"AFHTTPRequestOperationManager.h\"\n#import \"AFHTTPRequestOperation.h\"\n\n#import <Availability.h>\n#import <Security/Security.h>\n\n#if defined(__IPHONE_OS_VERSION_MIN_REQUIRED)\n#import <UIKit/UIKit.h>\n#endif\n\n@interface AFHTTPRequestOperationManager ()\n@property (readwrite, nonatomic, strong) NSURL *baseURL;\n@end\n\n@implementation AFHTTPRequestOperationManager\n\n+ (instancetype)manager {\n    return [[self alloc] initWithBaseURL:nil];\n}\n\n- (instancetype)init {\n    return [self initWithBaseURL:nil];\n}\n\n- (instancetype)initWithBaseURL:(NSURL *)url {\n    self = [super init];\n    if (!self) {\n        return nil;\n    }\n\n    // Ensure terminal slash for baseURL path, so that NSURL +URLWithString:relativeToURL: works as expected\n    if ([[url path] length] > 0 && ![[url absoluteString] hasSuffix:@\"/\"]) {\n        url = [url URLByAppendingPathComponent:@\"\"];\n    }\n\n    self.baseURL = url;\n\n    self.requestSerializer = [AFHTTPRequestSerializer serializer];\n    self.responseSerializer = [AFJSONResponseSerializer serializer];\n\n    self.securityPolicy = [AFSecurityPolicy defaultPolicy];\n\n    self.reachabilityManager = [AFNetworkReachabilityManager sharedManager];\n\n    self.operationQueue = [[NSOperationQueue alloc] init];\n\n    self.shouldUseCredentialStorage = YES;\n\n    return self;\n}\n\n#pragma mark -\n\n#ifdef _SYSTEMCONFIGURATION_H\n#endif\n\n- (void)setRequestSerializer:(AFHTTPRequestSerializer <AFURLRequestSerialization> *)requestSerializer {\n    NSParameterAssert(requestSerializer);\n\n    _requestSerializer = requestSerializer;\n}\n\n- (void)setResponseSerializer:(AFHTTPResponseSerializer <AFURLResponseSerialization> *)responseSerializer {\n    NSParameterAssert(responseSerializer);\n\n    _responseSerializer = responseSerializer;\n}\n\n#pragma mark -\n\n- (AFHTTPRequestOperation *)HTTPRequestOperationWithHTTPMethod:(NSString *)method\n                                                     URLString:(NSString *)URLString\n                                                    parameters:(id)parameters\n                                                       success:(void (^)(AFHTTPRequestOperation *operation, id responseObject))success\n                                                       failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error))failure\n{\n    NSError *serializationError = nil;\n    NSMutableURLRequest *request = [self.requestSerializer requestWithMethod:method URLString:[[NSURL URLWithString:URLString relativeToURL:self.baseURL] absoluteString] parameters:parameters error:&serializationError];\n    if (serializationError) {\n        if (failure) {\n#pragma clang diagnostic push\n#pragma clang diagnostic ignored \"-Wgnu\"\n            dispatch_async(self.completionQueue ?: dispatch_get_main_queue(), ^{\n                failure(nil, serializationError);\n            });\n#pragma clang diagnostic pop\n        }\n\n        return nil;\n    }\n\n    return [self HTTPRequestOperationWithRequest:request success:success failure:failure];\n}\n\n- (AFHTTPRequestOperation *)HTTPRequestOperationWithRequest:(NSURLRequest *)request\n                                                    success:(void (^)(AFHTTPRequestOperation *operation, id responseObject))success\n                                                    failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error))failure\n{\n    AFHTTPRequestOperation *operation = [[AFHTTPRequestOperation alloc] initWithRequest:request];\n    operation.responseSerializer = self.responseSerializer;\n    operation.shouldUseCredentialStorage = self.shouldUseCredentialStorage;\n    operation.credential = self.credential;\n    operation.securityPolicy = self.securityPolicy;\n\n    [operation setCompletionBlockWithSuccess:success failure:failure];\n    operation.completionQueue = self.completionQueue;\n    operation.completionGroup = self.completionGroup;\n\n    return operation;\n}\n\n#pragma mark -\n\n- (AFHTTPRequestOperation *)GET:(NSString *)URLString\n                     parameters:(id)parameters\n                        success:(void (^)(AFHTTPRequestOperation *operation, id responseObject))success\n                        failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error))failure\n{\n    AFHTTPRequestOperation *operation = [self HTTPRequestOperationWithHTTPMethod:@\"GET\" URLString:URLString parameters:parameters success:success failure:failure];\n\n    [self.operationQueue addOperation:operation];\n\n    return operation;\n}\n\n- (AFHTTPRequestOperation *)HEAD:(NSString *)URLString\n                      parameters:(id)parameters\n                         success:(void (^)(AFHTTPRequestOperation *operation))success\n                         failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error))failure\n{\n    AFHTTPRequestOperation *operation = [self HTTPRequestOperationWithHTTPMethod:@\"HEAD\" URLString:URLString parameters:parameters success:^(AFHTTPRequestOperation *requestOperation, __unused id responseObject) {\n        if (success) {\n            success(requestOperation);\n        }\n    } failure:failure];\n\n    [self.operationQueue addOperation:operation];\n\n    return operation;\n}\n\n- (AFHTTPRequestOperation *)POST:(NSString *)URLString\n                      parameters:(id)parameters\n                         success:(void (^)(AFHTTPRequestOperation *operation, id responseObject))success\n                         failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error))failure\n{\n    AFHTTPRequestOperation *operation = [self HTTPRequestOperationWithHTTPMethod:@\"POST\" URLString:URLString parameters:parameters success:success failure:failure];\n\n    [self.operationQueue addOperation:operation];\n\n    return operation;\n}\n\n- (AFHTTPRequestOperation *)POST:(NSString *)URLString\n                      parameters:(id)parameters\n       constructingBodyWithBlock:(void (^)(id <AFMultipartFormData> formData))block\n                         success:(void (^)(AFHTTPRequestOperation *operation, id responseObject))success\n                         failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error))failure\n{\n    NSError *serializationError = nil;\n    NSMutableURLRequest *request = [self.requestSerializer multipartFormRequestWithMethod:@\"POST\" URLString:[[NSURL URLWithString:URLString relativeToURL:self.baseURL] absoluteString] parameters:parameters constructingBodyWithBlock:block error:&serializationError];\n    if (serializationError) {\n        if (failure) {\n#pragma clang diagnostic push\n#pragma clang diagnostic ignored \"-Wgnu\"\n            dispatch_async(self.completionQueue ?: dispatch_get_main_queue(), ^{\n                failure(nil, serializationError);\n            });\n#pragma clang diagnostic pop\n        }\n\n        return nil;\n    }\n\n    AFHTTPRequestOperation *operation = [self HTTPRequestOperationWithRequest:request success:success failure:failure];\n\n    [self.operationQueue addOperation:operation];\n\n    return operation;\n}\n\n- (AFHTTPRequestOperation *)PUT:(NSString *)URLString\n                     parameters:(id)parameters\n                        success:(void (^)(AFHTTPRequestOperation *operation, id responseObject))success\n                        failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error))failure\n{\n    AFHTTPRequestOperation *operation = [self HTTPRequestOperationWithHTTPMethod:@\"PUT\" URLString:URLString parameters:parameters success:success failure:failure];\n\n    [self.operationQueue addOperation:operation];\n\n    return operation;\n}\n\n- (AFHTTPRequestOperation *)PATCH:(NSString *)URLString\n                       parameters:(id)parameters\n                          success:(void (^)(AFHTTPRequestOperation *operation, id responseObject))success\n                          failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error))failure\n{\n    AFHTTPRequestOperation *operation = [self HTTPRequestOperationWithHTTPMethod:@\"PATCH\" URLString:URLString parameters:parameters success:success failure:failure];\n\n    [self.operationQueue addOperation:operation];\n\n    return operation;\n}\n\n- (AFHTTPRequestOperation *)DELETE:(NSString *)URLString\n                        parameters:(id)parameters\n                           success:(void (^)(AFHTTPRequestOperation *operation, id responseObject))success\n                           failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error))failure\n{\n    AFHTTPRequestOperation *operation = [self HTTPRequestOperationWithHTTPMethod:@\"DELETE\" URLString:URLString parameters:parameters success:success failure:failure];\n\n    [self.operationQueue addOperation:operation];\n\n    return operation;\n}\n\n#pragma mark - NSObject\n\n- (NSString *)description {\n    return [NSString stringWithFormat:@\"<%@: %p, baseURL: %@, operationQueue: %@>\", NSStringFromClass([self class]), self, [self.baseURL absoluteString], self.operationQueue];\n}\n\n#pragma mark - NSSecureCoding\n\n+ (BOOL)supportsSecureCoding {\n    return YES;\n}\n\n- (id)initWithCoder:(NSCoder *)decoder {\n    NSURL *baseURL = [decoder decodeObjectForKey:NSStringFromSelector(@selector(baseURL))];\n\n    self = [self initWithBaseURL:baseURL];\n    if (!self) {\n        return nil;\n    }\n\n    self.requestSerializer = [decoder decodeObjectOfClass:[AFHTTPRequestSerializer class] forKey:NSStringFromSelector(@selector(requestSerializer))];\n    self.responseSerializer = [decoder decodeObjectOfClass:[AFHTTPResponseSerializer class] forKey:NSStringFromSelector(@selector(responseSerializer))];\n\n    return self;\n}\n\n- (void)encodeWithCoder:(NSCoder *)coder {\n    [coder encodeObject:self.baseURL forKey:NSStringFromSelector(@selector(baseURL))];\n    [coder encodeObject:self.requestSerializer forKey:NSStringFromSelector(@selector(requestSerializer))];\n    [coder encodeObject:self.responseSerializer forKey:NSStringFromSelector(@selector(responseSerializer))];\n}\n\n#pragma mark - NSCopying\n\n- (id)copyWithZone:(NSZone *)zone {\n    AFHTTPRequestOperationManager *HTTPClient = [[[self class] allocWithZone:zone] initWithBaseURL:self.baseURL];\n\n    HTTPClient.requestSerializer = [self.requestSerializer copyWithZone:zone];\n    HTTPClient.responseSerializer = [self.responseSerializer copyWithZone:zone];\n\n    return HTTPClient;\n}\n\n@end\n"
  },
  {
    "path": "Pods/AFNetworking/AFNetworking/AFHTTPSessionManager.h",
    "content": "// AFHTTPSessionManager.h\n//\n// Copyright (c) 2013-2015 AFNetworking (http://afnetworking.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\n#import <Foundation/Foundation.h>\n#import <SystemConfiguration/SystemConfiguration.h>\n#import <Availability.h>\n\n#if __IPHONE_OS_VERSION_MIN_REQUIRED\n#import <MobileCoreServices/MobileCoreServices.h>\n#else\n#import <CoreServices/CoreServices.h>\n#endif\n\n#import \"AFURLSessionManager.h\"\n\n#ifndef NS_DESIGNATED_INITIALIZER\n#if __has_attribute(objc_designated_initializer)\n#define NS_DESIGNATED_INITIALIZER __attribute__((objc_designated_initializer))\n#else\n#define NS_DESIGNATED_INITIALIZER\n#endif\n#endif\n\n/**\n `AFHTTPSessionManager` is a subclass of `AFURLSessionManager` with convenience methods for making HTTP requests. When a `baseURL` is provided, requests made with the `GET` / `POST` / et al. convenience methods can be made with relative paths.\n\n ## Subclassing Notes\n\n Developers targeting iOS 7 or Mac OS X 10.9 or later that deal extensively with a web service are encouraged to subclass `AFHTTPSessionManager`, providing a class method that returns a shared singleton object on which authentication and other configuration can be shared across the application.\n\n For developers targeting iOS 6 or Mac OS X 10.8 or earlier, `AFHTTPRequestOperationManager` may be used to similar effect.\n\n ## Methods to Override\n\n To change the behavior of all data task operation construction, which is also used in the `GET` / `POST` / et al. convenience methods, override `dataTaskWithRequest:completionHandler:`.\n\n ## Serialization\n\n Requests created by an HTTP client will contain default headers and encode parameters according to the `requestSerializer` property, which is an object conforming to `<AFURLRequestSerialization>`.\n\n Responses received from the server are automatically validated and serialized by the `responseSerializers` property, which is an object conforming to `<AFURLResponseSerialization>`\n\n ## URL Construction Using Relative Paths\n\n For HTTP convenience methods, the request serializer constructs URLs from the path relative to the `-baseURL`, using `NSURL +URLWithString:relativeToURL:`, when provided. If `baseURL` is `nil`, `path` needs to resolve to a valid `NSURL` object using `NSURL +URLWithString:`.\n\n Below are a few examples of how `baseURL` and relative paths interact:\n\n    NSURL *baseURL = [NSURL URLWithString:@\"http://example.com/v1/\"];\n    [NSURL URLWithString:@\"foo\" relativeToURL:baseURL];                  // http://example.com/v1/foo\n    [NSURL URLWithString:@\"foo?bar=baz\" relativeToURL:baseURL];          // http://example.com/v1/foo?bar=baz\n    [NSURL URLWithString:@\"/foo\" relativeToURL:baseURL];                 // http://example.com/foo\n    [NSURL URLWithString:@\"foo/\" relativeToURL:baseURL];                 // http://example.com/v1/foo\n    [NSURL URLWithString:@\"/foo/\" relativeToURL:baseURL];                // http://example.com/foo/\n    [NSURL URLWithString:@\"http://example2.com/\" relativeToURL:baseURL]; // http://example2.com/\n\n Also important to note is that a trailing slash will be added to any `baseURL` without one. This would otherwise cause unexpected behavior when constructing URLs using paths without a leading slash.\n\n @warning Managers for background sessions must be owned for the duration of their use. This can be accomplished by creating an application-wide or shared singleton instance.\n */\n\n#if (defined(__IPHONE_OS_VERSION_MAX_ALLOWED) && __IPHONE_OS_VERSION_MAX_ALLOWED >= 70000) || (defined(__MAC_OS_X_VERSION_MAX_ALLOWED) && __MAC_OS_X_VERSION_MAX_ALLOWED >= 1090)\n\n@interface AFHTTPSessionManager : AFURLSessionManager <NSSecureCoding, NSCopying>\n\n/**\n The URL used to monitor reachability, and construct requests from relative paths in methods like `requestWithMethod:URLString:parameters:`, and the `GET` / `POST` / et al. convenience methods.\n */\n@property (readonly, nonatomic, strong) NSURL *baseURL;\n\n/**\n Requests created with `requestWithMethod:URLString:parameters:` & `multipartFormRequestWithMethod:URLString:parameters:constructingBodyWithBlock:` are constructed with a set of default headers using a parameter serialization specified by this property. By default, this is set to an instance of `AFHTTPRequestSerializer`, which serializes query string parameters for `GET`, `HEAD`, and `DELETE` requests, or otherwise URL-form-encodes HTTP message bodies.\n\n @warning `requestSerializer` must not be `nil`.\n */\n@property (nonatomic, strong) AFHTTPRequestSerializer <AFURLRequestSerialization> * requestSerializer;\n\n/**\n Responses sent from the server in data tasks created with `dataTaskWithRequest:success:failure:` and run using the `GET` / `POST` / et al. convenience methods are automatically validated and serialized by the response serializer. By default, this property is set to an instance of `AFJSONResponseSerializer`.\n\n @warning `responseSerializer` must not be `nil`.\n */\n@property (nonatomic, strong) AFHTTPResponseSerializer <AFURLResponseSerialization> * responseSerializer;\n\n///---------------------\n/// @name Initialization\n///---------------------\n\n/**\n Creates and returns an `AFHTTPSessionManager` object.\n */\n+ (instancetype)manager;\n\n/**\n Initializes an `AFHTTPSessionManager` object with the specified base URL.\n\n @param url The base URL for the HTTP client.\n\n @return The newly-initialized HTTP client\n */\n- (instancetype)initWithBaseURL:(NSURL *)url;\n\n/**\n Initializes an `AFHTTPSessionManager` object with the specified base URL.\n\n This is the designated initializer.\n\n @param url The base URL for the HTTP client.\n @param configuration The configuration used to create the managed session.\n\n @return The newly-initialized HTTP client\n */\n- (instancetype)initWithBaseURL:(NSURL *)url\n           sessionConfiguration:(NSURLSessionConfiguration *)configuration NS_DESIGNATED_INITIALIZER;\n\n///---------------------------\n/// @name Making HTTP Requests\n///---------------------------\n\n/**\n Creates and runs an `NSURLSessionDataTask` with a `GET` request.\n\n @param URLString The URL string used to create the request URL.\n @param parameters The parameters to be encoded according to the client request serializer.\n @param success A block object to be executed when the task finishes successfully. This block has no return value and takes two arguments: the data task, and the response object created by the client response serializer.\n @param failure A block object to be executed when the task finishes unsuccessfully, or that finishes successfully, but encountered an error while parsing the response data. This block has no return value and takes a two arguments: the data task and the error describing the network or parsing error that occurred.\n\n @see -dataTaskWithRequest:completionHandler:\n */\n- (NSURLSessionDataTask *)GET:(NSString *)URLString\n                   parameters:(id)parameters\n                      success:(void (^)(NSURLSessionDataTask *task, id responseObject))success\n                      failure:(void (^)(NSURLSessionDataTask *task, NSError *error))failure;\n\n/**\n Creates and runs an `NSURLSessionDataTask` with a `HEAD` request.\n\n @param URLString The URL string used to create the request URL.\n @param parameters The parameters to be encoded according to the client request serializer.\n @param success A block object to be executed when the task finishes successfully. This block has no return value and takes a single arguments: the data task.\n @param failure A block object to be executed when the task finishes unsuccessfully, or that finishes successfully, but encountered an error while parsing the response data. This block has no return value and takes a two arguments: the data task and the error describing the network or parsing error that occurred.\n\n @see -dataTaskWithRequest:completionHandler:\n */\n- (NSURLSessionDataTask *)HEAD:(NSString *)URLString\n                    parameters:(id)parameters\n                       success:(void (^)(NSURLSessionDataTask *task))success\n                       failure:(void (^)(NSURLSessionDataTask *task, NSError *error))failure;\n\n/**\n Creates and runs an `NSURLSessionDataTask` with a `POST` request.\n\n @param URLString The URL string used to create the request URL.\n @param parameters The parameters to be encoded according to the client request serializer.\n @param success A block object to be executed when the task finishes successfully. This block has no return value and takes two arguments: the data task, and the response object created by the client response serializer.\n @param failure A block object to be executed when the task finishes unsuccessfully, or that finishes successfully, but encountered an error while parsing the response data. This block has no return value and takes a two arguments: the data task and the error describing the network or parsing error that occurred.\n\n @see -dataTaskWithRequest:completionHandler:\n */\n- (NSURLSessionDataTask *)POST:(NSString *)URLString\n                    parameters:(id)parameters\n                       success:(void (^)(NSURLSessionDataTask *task, id responseObject))success\n                       failure:(void (^)(NSURLSessionDataTask *task, NSError *error))failure;\n\n/**\n Creates and runs an `NSURLSessionDataTask` with a multipart `POST` request.\n\n @param URLString The URL string used to create the request URL.\n @param parameters The parameters to be encoded according to the client request serializer.\n @param block A block that takes a single argument and appends data to the HTTP body. The block argument is an object adopting the `AFMultipartFormData` protocol.\n @param success A block object to be executed when the task finishes successfully. This block has no return value and takes two arguments: the data task, and the response object created by the client response serializer.\n @param failure A block object to be executed when the task finishes unsuccessfully, or that finishes successfully, but encountered an error while parsing the response data. This block has no return value and takes a two arguments: the data task and the error describing the network or parsing error that occurred.\n\n @see -dataTaskWithRequest:completionHandler:\n */\n- (NSURLSessionDataTask *)POST:(NSString *)URLString\n                    parameters:(id)parameters\n     constructingBodyWithBlock:(void (^)(id <AFMultipartFormData> formData))block\n                       success:(void (^)(NSURLSessionDataTask *task, id responseObject))success\n                       failure:(void (^)(NSURLSessionDataTask *task, NSError *error))failure;\n\n/**\n Creates and runs an `NSURLSessionDataTask` with a `PUT` request.\n\n @param URLString The URL string used to create the request URL.\n @param parameters The parameters to be encoded according to the client request serializer.\n @param success A block object to be executed when the task finishes successfully. This block has no return value and takes two arguments: the data task, and the response object created by the client response serializer.\n @param failure A block object to be executed when the task finishes unsuccessfully, or that finishes successfully, but encountered an error while parsing the response data. This block has no return value and takes a two arguments: the data task and the error describing the network or parsing error that occurred.\n\n @see -dataTaskWithRequest:completionHandler:\n */\n- (NSURLSessionDataTask *)PUT:(NSString *)URLString\n                   parameters:(id)parameters\n                      success:(void (^)(NSURLSessionDataTask *task, id responseObject))success\n                      failure:(void (^)(NSURLSessionDataTask *task, NSError *error))failure;\n\n/**\n Creates and runs an `NSURLSessionDataTask` with a `PATCH` request.\n\n @param URLString The URL string used to create the request URL.\n @param parameters The parameters to be encoded according to the client request serializer.\n @param success A block object to be executed when the task finishes successfully. This block has no return value and takes two arguments: the data task, and the response object created by the client response serializer.\n @param failure A block object to be executed when the task finishes unsuccessfully, or that finishes successfully, but encountered an error while parsing the response data. This block has no return value and takes a two arguments: the data task and the error describing the network or parsing error that occurred.\n\n @see -dataTaskWithRequest:completionHandler:\n */\n- (NSURLSessionDataTask *)PATCH:(NSString *)URLString\n                     parameters:(id)parameters\n                        success:(void (^)(NSURLSessionDataTask *task, id responseObject))success\n                        failure:(void (^)(NSURLSessionDataTask *task, NSError *error))failure;\n\n/**\n Creates and runs an `NSURLSessionDataTask` with a `DELETE` request.\n\n @param URLString The URL string used to create the request URL.\n @param parameters The parameters to be encoded according to the client request serializer.\n @param success A block object to be executed when the task finishes successfully. This block has no return value and takes two arguments: the data task, and the response object created by the client response serializer.\n @param failure A block object to be executed when the task finishes unsuccessfully, or that finishes successfully, but encountered an error while parsing the response data. This block has no return value and takes a two arguments: the data task and the error describing the network or parsing error that occurred.\n\n @see -dataTaskWithRequest:completionHandler:\n */\n- (NSURLSessionDataTask *)DELETE:(NSString *)URLString\n                      parameters:(id)parameters\n                         success:(void (^)(NSURLSessionDataTask *task, id responseObject))success\n                         failure:(void (^)(NSURLSessionDataTask *task, NSError *error))failure;\n\n@end\n\n#endif\n"
  },
  {
    "path": "Pods/AFNetworking/AFNetworking/AFHTTPSessionManager.m",
    "content": "// AFHTTPSessionManager.m\n//\n// Copyright (c) 2013-2015 AFNetworking (http://afnetworking.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\n#import \"AFHTTPSessionManager.h\"\n\n#if (defined(__IPHONE_OS_VERSION_MAX_ALLOWED) && __IPHONE_OS_VERSION_MAX_ALLOWED >= 70000) || (defined(__MAC_OS_X_VERSION_MAX_ALLOWED) && __MAC_OS_X_VERSION_MAX_ALLOWED >= 1090)\n\n#import \"AFURLRequestSerialization.h\"\n#import \"AFURLResponseSerialization.h\"\n\n#import <Availability.h>\n#import <Security/Security.h>\n\n#ifdef _SYSTEMCONFIGURATION_H\n#import <netinet/in.h>\n#import <netinet6/in6.h>\n#import <arpa/inet.h>\n#import <ifaddrs.h>\n#import <netdb.h>\n#endif\n\n#if defined(__IPHONE_OS_VERSION_MIN_REQUIRED)\n#import <UIKit/UIKit.h>\n#endif\n\n@interface AFHTTPSessionManager ()\n@property (readwrite, nonatomic, strong) NSURL *baseURL;\n@end\n\n@implementation AFHTTPSessionManager\n@dynamic responseSerializer;\n\n+ (instancetype)manager {\n    return [[[self class] alloc] initWithBaseURL:nil];\n}\n\n- (instancetype)init {\n    return [self initWithBaseURL:nil];\n}\n\n- (instancetype)initWithBaseURL:(NSURL *)url {\n    return [self initWithBaseURL:url sessionConfiguration:nil];\n}\n\n- (instancetype)initWithSessionConfiguration:(NSURLSessionConfiguration *)configuration {\n    return [self initWithBaseURL:nil sessionConfiguration:configuration];\n}\n\n- (instancetype)initWithBaseURL:(NSURL *)url\n           sessionConfiguration:(NSURLSessionConfiguration *)configuration\n{\n    self = [super initWithSessionConfiguration:configuration];\n    if (!self) {\n        return nil;\n    }\n\n    // Ensure terminal slash for baseURL path, so that NSURL +URLWithString:relativeToURL: works as expected\n    if ([[url path] length] > 0 && ![[url absoluteString] hasSuffix:@\"/\"]) {\n        url = [url URLByAppendingPathComponent:@\"\"];\n    }\n\n    self.baseURL = url;\n\n    self.requestSerializer = [AFHTTPRequestSerializer serializer];\n    self.responseSerializer = [AFJSONResponseSerializer serializer];\n\n    return self;\n}\n\n#pragma mark -\n\n#ifdef _SYSTEMCONFIGURATION_H\n#endif\n\n- (void)setRequestSerializer:(AFHTTPRequestSerializer <AFURLRequestSerialization> *)requestSerializer {\n    NSParameterAssert(requestSerializer);\n\n    _requestSerializer = requestSerializer;\n}\n\n- (void)setResponseSerializer:(AFHTTPResponseSerializer <AFURLResponseSerialization> *)responseSerializer {\n    NSParameterAssert(responseSerializer);\n\n    [super setResponseSerializer:responseSerializer];\n}\n\n#pragma mark -\n\n- (NSURLSessionDataTask *)GET:(NSString *)URLString\n                   parameters:(id)parameters\n                      success:(void (^)(NSURLSessionDataTask *task, id responseObject))success\n                      failure:(void (^)(NSURLSessionDataTask *task, NSError *error))failure\n{\n    NSURLSessionDataTask *dataTask = [self dataTaskWithHTTPMethod:@\"GET\" URLString:URLString parameters:parameters success:success failure:failure];\n\n    [dataTask resume];\n\n    return dataTask;\n}\n\n- (NSURLSessionDataTask *)HEAD:(NSString *)URLString\n                    parameters:(id)parameters\n                       success:(void (^)(NSURLSessionDataTask *task))success\n                       failure:(void (^)(NSURLSessionDataTask *task, NSError *error))failure\n{\n    NSURLSessionDataTask *dataTask = [self dataTaskWithHTTPMethod:@\"HEAD\" URLString:URLString parameters:parameters success:^(NSURLSessionDataTask *task, __unused id responseObject) {\n        if (success) {\n            success(task);\n        }\n    } failure:failure];\n\n    [dataTask resume];\n\n    return dataTask;\n}\n\n- (NSURLSessionDataTask *)POST:(NSString *)URLString\n                    parameters:(id)parameters\n                       success:(void (^)(NSURLSessionDataTask *task, id responseObject))success\n                       failure:(void (^)(NSURLSessionDataTask *task, NSError *error))failure\n{\n    NSURLSessionDataTask *dataTask = [self dataTaskWithHTTPMethod:@\"POST\" URLString:URLString parameters:parameters success:success failure:failure];\n\n    [dataTask resume];\n\n    return dataTask;\n}\n\n- (NSURLSessionDataTask *)POST:(NSString *)URLString\n                    parameters:(id)parameters\n     constructingBodyWithBlock:(void (^)(id <AFMultipartFormData> formData))block\n                       success:(void (^)(NSURLSessionDataTask *task, id responseObject))success\n                       failure:(void (^)(NSURLSessionDataTask *task, NSError *error))failure\n{\n    NSError *serializationError = nil;\n    NSMutableURLRequest *request = [self.requestSerializer multipartFormRequestWithMethod:@\"POST\" URLString:[[NSURL URLWithString:URLString relativeToURL:self.baseURL] absoluteString] parameters:parameters constructingBodyWithBlock:block error:&serializationError];\n    if (serializationError) {\n        if (failure) {\n#pragma clang diagnostic push\n#pragma clang diagnostic ignored \"-Wgnu\"\n            dispatch_async(self.completionQueue ?: dispatch_get_main_queue(), ^{\n                failure(nil, serializationError);\n            });\n#pragma clang diagnostic pop\n        }\n\n        return nil;\n    }\n\n    __block NSURLSessionDataTask *task = [self uploadTaskWithStreamedRequest:request progress:nil completionHandler:^(NSURLResponse * __unused response, id responseObject, NSError *error) {\n        if (error) {\n            if (failure) {\n                failure(task, error);\n            }\n        } else {\n            if (success) {\n                success(task, responseObject);\n            }\n        }\n    }];\n\n    [task resume];\n\n    return task;\n}\n\n- (NSURLSessionDataTask *)PUT:(NSString *)URLString\n                   parameters:(id)parameters\n                      success:(void (^)(NSURLSessionDataTask *task, id responseObject))success\n                      failure:(void (^)(NSURLSessionDataTask *task, NSError *error))failure\n{\n    NSURLSessionDataTask *dataTask = [self dataTaskWithHTTPMethod:@\"PUT\" URLString:URLString parameters:parameters success:success failure:failure];\n\n    [dataTask resume];\n\n    return dataTask;\n}\n\n- (NSURLSessionDataTask *)PATCH:(NSString *)URLString\n                     parameters:(id)parameters\n                        success:(void (^)(NSURLSessionDataTask *task, id responseObject))success\n                        failure:(void (^)(NSURLSessionDataTask *task, NSError *error))failure\n{\n    NSURLSessionDataTask *dataTask = [self dataTaskWithHTTPMethod:@\"PATCH\" URLString:URLString parameters:parameters success:success failure:failure];\n\n    [dataTask resume];\n\n    return dataTask;\n}\n\n- (NSURLSessionDataTask *)DELETE:(NSString *)URLString\n                      parameters:(id)parameters\n                         success:(void (^)(NSURLSessionDataTask *task, id responseObject))success\n                         failure:(void (^)(NSURLSessionDataTask *task, NSError *error))failure\n{\n    NSURLSessionDataTask *dataTask = [self dataTaskWithHTTPMethod:@\"DELETE\" URLString:URLString parameters:parameters success:success failure:failure];\n\n    [dataTask resume];\n\n    return dataTask;\n}\n\n- (NSURLSessionDataTask *)dataTaskWithHTTPMethod:(NSString *)method\n                                       URLString:(NSString *)URLString\n                                      parameters:(id)parameters\n                                         success:(void (^)(NSURLSessionDataTask *, id))success\n                                         failure:(void (^)(NSURLSessionDataTask *, NSError *))failure\n{\n    NSError *serializationError = nil;\n    NSMutableURLRequest *request = [self.requestSerializer requestWithMethod:method URLString:[[NSURL URLWithString:URLString relativeToURL:self.baseURL] absoluteString] parameters:parameters error:&serializationError];\n    if (serializationError) {\n        if (failure) {\n#pragma clang diagnostic push\n#pragma clang diagnostic ignored \"-Wgnu\"\n            dispatch_async(self.completionQueue ?: dispatch_get_main_queue(), ^{\n                failure(nil, serializationError);\n            });\n#pragma clang diagnostic pop\n        }\n\n        return nil;\n    }\n\n    __block NSURLSessionDataTask *dataTask = nil;\n    dataTask = [self dataTaskWithRequest:request completionHandler:^(NSURLResponse * __unused response, id responseObject, NSError *error) {\n        if (error) {\n            if (failure) {\n                failure(dataTask, error);\n            }\n        } else {\n            if (success) {\n                success(dataTask, responseObject);\n            }\n        }\n    }];\n\n    return dataTask;\n}\n\n#pragma mark - NSObject\n\n- (NSString *)description {\n    return [NSString stringWithFormat:@\"<%@: %p, baseURL: %@, session: %@, operationQueue: %@>\", NSStringFromClass([self class]), self, [self.baseURL absoluteString], self.session, self.operationQueue];\n}\n\n#pragma mark - NSSecureCoding\n\n+ (BOOL)supportsSecureCoding {\n    return YES;\n}\n\n- (id)initWithCoder:(NSCoder *)decoder {\n    NSURL *baseURL = [decoder decodeObjectOfClass:[NSURL class] forKey:NSStringFromSelector(@selector(baseURL))];\n    NSURLSessionConfiguration *configuration = [decoder decodeObjectOfClass:[NSURLSessionConfiguration class] forKey:@\"sessionConfiguration\"];\n    if (!configuration) {\n        NSString *configurationIdentifier = [decoder decodeObjectOfClass:[NSString class] forKey:@\"identifier\"];\n        if (configurationIdentifier) {\n#if (defined(__IPHONE_OS_VERSION_MIN_REQUIRED) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 80000) || (defined(__MAC_OS_X_VERSION_MIN_REQUIRED) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1100)\n            configuration = [NSURLSessionConfiguration backgroundSessionConfigurationWithIdentifier:configurationIdentifier];\n#else\n            configuration = [NSURLSessionConfiguration backgroundSessionConfiguration:configurationIdentifier];\n#endif\n        }\n    }\n\n    self = [self initWithBaseURL:baseURL sessionConfiguration:configuration];\n    if (!self) {\n        return nil;\n    }\n\n    self.requestSerializer = [decoder decodeObjectOfClass:[AFHTTPRequestSerializer class] forKey:NSStringFromSelector(@selector(requestSerializer))];\n    self.responseSerializer = [decoder decodeObjectOfClass:[AFHTTPResponseSerializer class] forKey:NSStringFromSelector(@selector(responseSerializer))];\n\n    return self;\n}\n\n- (void)encodeWithCoder:(NSCoder *)coder {\n    [super encodeWithCoder:coder];\n\n    [coder encodeObject:self.baseURL forKey:NSStringFromSelector(@selector(baseURL))];\n    if ([self.session.configuration conformsToProtocol:@protocol(NSCoding)]) {\n        [coder encodeObject:self.session.configuration forKey:@\"sessionConfiguration\"];\n    } else {\n        [coder encodeObject:self.session.configuration.identifier forKey:@\"identifier\"];\n    }\n    [coder encodeObject:self.requestSerializer forKey:NSStringFromSelector(@selector(requestSerializer))];\n    [coder encodeObject:self.responseSerializer forKey:NSStringFromSelector(@selector(responseSerializer))];\n}\n\n#pragma mark - NSCopying\n\n- (id)copyWithZone:(NSZone *)zone {\n    AFHTTPSessionManager *HTTPClient = [[[self class] allocWithZone:zone] initWithBaseURL:self.baseURL sessionConfiguration:self.session.configuration];\n\n    HTTPClient.requestSerializer = [self.requestSerializer copyWithZone:zone];\n    HTTPClient.responseSerializer = [self.responseSerializer copyWithZone:zone];\n\n    return HTTPClient;\n}\n\n@end\n\n#endif\n"
  },
  {
    "path": "Pods/AFNetworking/AFNetworking/AFNetworkReachabilityManager.h",
    "content": "// AFNetworkReachabilityManager.h\n//\n// Copyright (c) 2013-2015 AFNetworking (http://afnetworking.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\n#import <Foundation/Foundation.h>\n#import <SystemConfiguration/SystemConfiguration.h>\n\n#ifndef NS_DESIGNATED_INITIALIZER\n#if __has_attribute(objc_designated_initializer)\n#define NS_DESIGNATED_INITIALIZER __attribute__((objc_designated_initializer))\n#else\n#define NS_DESIGNATED_INITIALIZER\n#endif\n#endif\n\ntypedef NS_ENUM(NSInteger, AFNetworkReachabilityStatus) {\n    AFNetworkReachabilityStatusUnknown          = -1,\n    AFNetworkReachabilityStatusNotReachable     = 0,\n    AFNetworkReachabilityStatusReachableViaWWAN = 1,\n    AFNetworkReachabilityStatusReachableViaWiFi = 2,\n};\n\n/**\n `AFNetworkReachabilityManager` monitors the reachability of domains, and addresses for both WWAN and WiFi network interfaces.\n\n Reachability can be used to determine background information about why a network operation failed, or to trigger a network operation retrying when a connection is established. It should not be used to prevent a user from initiating a network request, as it's possible that an initial request may be required to establish reachability.\n\n See Apple's Reachability Sample Code (https://developer.apple.com/library/ios/samplecode/reachability/)\n\n @warning Instances of `AFNetworkReachabilityManager` must be started with `-startMonitoring` before reachability status can be determined.\n */\n@interface AFNetworkReachabilityManager : NSObject\n\n/**\n The current network reachability status.\n */\n@property (readonly, nonatomic, assign) AFNetworkReachabilityStatus networkReachabilityStatus;\n\n/**\n Whether or not the network is currently reachable.\n */\n@property (readonly, nonatomic, assign, getter = isReachable) BOOL reachable;\n\n/**\n Whether or not the network is currently reachable via WWAN.\n */\n@property (readonly, nonatomic, assign, getter = isReachableViaWWAN) BOOL reachableViaWWAN;\n\n/**\n Whether or not the network is currently reachable via WiFi.\n */\n@property (readonly, nonatomic, assign, getter = isReachableViaWiFi) BOOL reachableViaWiFi;\n\n///---------------------\n/// @name Initialization\n///---------------------\n\n/**\n Returns the shared network reachability manager.\n */\n+ (instancetype)sharedManager;\n\n/**\n Creates and returns a network reachability manager for the specified domain.\n\n @param domain The domain used to evaluate network reachability.\n\n @return An initialized network reachability manager, actively monitoring the specified domain.\n */\n+ (instancetype)managerForDomain:(NSString *)domain;\n\n/**\n Creates and returns a network reachability manager for the socket address.\n\n @param address The socket address (`sockaddr_in`) used to evaluate network reachability.\n\n @return An initialized network reachability manager, actively monitoring the specified socket address.\n */\n+ (instancetype)managerForAddress:(const void *)address;\n\n/**\n Initializes an instance of a network reachability manager from the specified reachability object.\n\n @param reachability The reachability object to monitor.\n\n @return An initialized network reachability manager, actively monitoring the specified reachability.\n */\n- (instancetype)initWithReachability:(SCNetworkReachabilityRef)reachability NS_DESIGNATED_INITIALIZER;\n\n///--------------------------------------------------\n/// @name Starting & Stopping Reachability Monitoring\n///--------------------------------------------------\n\n/**\n Starts monitoring for changes in network reachability status.\n */\n- (void)startMonitoring;\n\n/**\n Stops monitoring for changes in network reachability status.\n */\n- (void)stopMonitoring;\n\n///-------------------------------------------------\n/// @name Getting Localized Reachability Description\n///-------------------------------------------------\n\n/**\n Returns a localized string representation of the current network reachability status.\n */\n- (NSString *)localizedNetworkReachabilityStatusString;\n\n///---------------------------------------------------\n/// @name Setting Network Reachability Change Callback\n///---------------------------------------------------\n\n/**\n Sets a callback to be executed when the network availability of the `baseURL` host changes.\n\n @param block A block object to be executed when the network availability of the `baseURL` host changes.. This block has no return value and takes a single argument which represents the various reachability states from the device to the `baseURL`.\n */\n- (void)setReachabilityStatusChangeBlock:(void (^)(AFNetworkReachabilityStatus status))block;\n\n@end\n\n///----------------\n/// @name Constants\n///----------------\n\n/**\n ## Network Reachability\n\n The following constants are provided by `AFNetworkReachabilityManager` as possible network reachability statuses.\n\n enum {\n AFNetworkReachabilityStatusUnknown,\n AFNetworkReachabilityStatusNotReachable,\n AFNetworkReachabilityStatusReachableViaWWAN,\n AFNetworkReachabilityStatusReachableViaWiFi,\n }\n\n `AFNetworkReachabilityStatusUnknown`\n The `baseURL` host reachability is not known.\n\n `AFNetworkReachabilityStatusNotReachable`\n The `baseURL` host cannot be reached.\n\n `AFNetworkReachabilityStatusReachableViaWWAN`\n The `baseURL` host can be reached via a cellular connection, such as EDGE or GPRS.\n\n `AFNetworkReachabilityStatusReachableViaWiFi`\n The `baseURL` host can be reached via a Wi-Fi connection.\n\n ### Keys for Notification UserInfo Dictionary\n\n Strings that are used as keys in a `userInfo` dictionary in a network reachability status change notification.\n\n `AFNetworkingReachabilityNotificationStatusItem`\n A key in the userInfo dictionary in a `AFNetworkingReachabilityDidChangeNotification` notification.\n The corresponding value is an `NSNumber` object representing the `AFNetworkReachabilityStatus` value for the current reachability status.\n */\n\n///--------------------\n/// @name Notifications\n///--------------------\n\n/**\n Posted when network reachability changes.\n This notification assigns no notification object. The `userInfo` dictionary contains an `NSNumber` object under the `AFNetworkingReachabilityNotificationStatusItem` key, representing the `AFNetworkReachabilityStatus` value for the current network reachability.\n\n @warning In order for network reachability to be monitored, include the `SystemConfiguration` framework in the active target's \"Link Binary With Library\" build phase, and add `#import <SystemConfiguration/SystemConfiguration.h>` to the header prefix of the project (`Prefix.pch`).\n */\nextern NSString * const AFNetworkingReachabilityDidChangeNotification;\nextern NSString * const AFNetworkingReachabilityNotificationStatusItem;\n\n///--------------------\n/// @name Functions\n///--------------------\n\n/**\n Returns a localized string representation of an `AFNetworkReachabilityStatus` value.\n */\nextern NSString * AFStringFromNetworkReachabilityStatus(AFNetworkReachabilityStatus status);\n"
  },
  {
    "path": "Pods/AFNetworking/AFNetworking/AFNetworkReachabilityManager.m",
    "content": "// AFNetworkReachabilityManager.m\n//\n// Copyright (c) 2013-2015 AFNetworking (http://afnetworking.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\n#import \"AFNetworkReachabilityManager.h\"\n\n#import <netinet/in.h>\n#import <netinet6/in6.h>\n#import <arpa/inet.h>\n#import <ifaddrs.h>\n#import <netdb.h>\n\nNSString * const AFNetworkingReachabilityDidChangeNotification = @\"com.alamofire.networking.reachability.change\";\nNSString * const AFNetworkingReachabilityNotificationStatusItem = @\"AFNetworkingReachabilityNotificationStatusItem\";\n\ntypedef void (^AFNetworkReachabilityStatusBlock)(AFNetworkReachabilityStatus status);\n\ntypedef NS_ENUM(NSUInteger, AFNetworkReachabilityAssociation) {\n    AFNetworkReachabilityForAddress = 1,\n    AFNetworkReachabilityForAddressPair = 2,\n    AFNetworkReachabilityForName = 3,\n};\n\nNSString * AFStringFromNetworkReachabilityStatus(AFNetworkReachabilityStatus status) {\n    switch (status) {\n        case AFNetworkReachabilityStatusNotReachable:\n            return NSLocalizedStringFromTable(@\"Not Reachable\", @\"AFNetworking\", nil);\n        case AFNetworkReachabilityStatusReachableViaWWAN:\n            return NSLocalizedStringFromTable(@\"Reachable via WWAN\", @\"AFNetworking\", nil);\n        case AFNetworkReachabilityStatusReachableViaWiFi:\n            return NSLocalizedStringFromTable(@\"Reachable via WiFi\", @\"AFNetworking\", nil);\n        case AFNetworkReachabilityStatusUnknown:\n        default:\n            return NSLocalizedStringFromTable(@\"Unknown\", @\"AFNetworking\", nil);\n    }\n}\n\nstatic AFNetworkReachabilityStatus AFNetworkReachabilityStatusForFlags(SCNetworkReachabilityFlags flags) {\n    BOOL isReachable = ((flags & kSCNetworkReachabilityFlagsReachable) != 0);\n    BOOL needsConnection = ((flags & kSCNetworkReachabilityFlagsConnectionRequired) != 0);\n    BOOL canConnectionAutomatically = (((flags & kSCNetworkReachabilityFlagsConnectionOnDemand ) != 0) || ((flags & kSCNetworkReachabilityFlagsConnectionOnTraffic) != 0));\n    BOOL canConnectWithoutUserInteraction = (canConnectionAutomatically && (flags & kSCNetworkReachabilityFlagsInterventionRequired) == 0);\n    BOOL isNetworkReachable = (isReachable && (!needsConnection || canConnectWithoutUserInteraction));\n\n    AFNetworkReachabilityStatus status = AFNetworkReachabilityStatusUnknown;\n    if (isNetworkReachable == NO) {\n        status = AFNetworkReachabilityStatusNotReachable;\n    }\n#if\tTARGET_OS_IPHONE\n    else if ((flags & kSCNetworkReachabilityFlagsIsWWAN) != 0) {\n        status = AFNetworkReachabilityStatusReachableViaWWAN;\n    }\n#endif\n    else {\n        status = AFNetworkReachabilityStatusReachableViaWiFi;\n    }\n\n    return status;\n}\n\nstatic void AFNetworkReachabilityCallback(SCNetworkReachabilityRef __unused target, SCNetworkReachabilityFlags flags, void *info) {\n    AFNetworkReachabilityStatus status = AFNetworkReachabilityStatusForFlags(flags);\n    AFNetworkReachabilityStatusBlock block = (__bridge AFNetworkReachabilityStatusBlock)info;\n    if (block) {\n        block(status);\n    }\n\n\n    dispatch_async(dispatch_get_main_queue(), ^{\n        NSNotificationCenter *notificationCenter = [NSNotificationCenter defaultCenter];\n        NSDictionary *userInfo = @{ AFNetworkingReachabilityNotificationStatusItem: @(status) };\n        [notificationCenter postNotificationName:AFNetworkingReachabilityDidChangeNotification object:nil userInfo:userInfo];\n    });\n\n}\n\nstatic const void * AFNetworkReachabilityRetainCallback(const void *info) {\n    return Block_copy(info);\n}\n\nstatic void AFNetworkReachabilityReleaseCallback(const void *info) {\n    if (info) {\n        Block_release(info);\n    }\n}\n\n@interface AFNetworkReachabilityManager ()\n@property (readwrite, nonatomic, assign) SCNetworkReachabilityRef networkReachability;\n@property (readwrite, nonatomic, assign) AFNetworkReachabilityAssociation networkReachabilityAssociation;\n@property (readwrite, nonatomic, assign) AFNetworkReachabilityStatus networkReachabilityStatus;\n@property (readwrite, nonatomic, copy) AFNetworkReachabilityStatusBlock networkReachabilityStatusBlock;\n@end\n\n@implementation AFNetworkReachabilityManager\n\n+ (instancetype)sharedManager {\n    static AFNetworkReachabilityManager *_sharedManager = nil;\n    static dispatch_once_t onceToken;\n    dispatch_once(&onceToken, ^{\n        struct sockaddr_in address;\n        bzero(&address, sizeof(address));\n        address.sin_len = sizeof(address);\n        address.sin_family = AF_INET;\n\n        _sharedManager = [self managerForAddress:&address];\n    });\n\n    return _sharedManager;\n}\n\n+ (instancetype)managerForDomain:(NSString *)domain {\n    SCNetworkReachabilityRef reachability = SCNetworkReachabilityCreateWithName(kCFAllocatorDefault, [domain UTF8String]);\n\n    AFNetworkReachabilityManager *manager = [[self alloc] initWithReachability:reachability];\n    manager.networkReachabilityAssociation = AFNetworkReachabilityForName;\n\n    return manager;\n}\n\n+ (instancetype)managerForAddress:(const void *)address {\n    SCNetworkReachabilityRef reachability = SCNetworkReachabilityCreateWithAddress(kCFAllocatorDefault, (const struct sockaddr *)address);\n\n    AFNetworkReachabilityManager *manager = [[self alloc] initWithReachability:reachability];\n    manager.networkReachabilityAssociation = AFNetworkReachabilityForAddress;\n\n    return manager;\n}\n\n- (instancetype)initWithReachability:(SCNetworkReachabilityRef)reachability {\n    self = [super init];\n    if (!self) {\n        return nil;\n    }\n\n    self.networkReachability = reachability;\n    self.networkReachabilityStatus = AFNetworkReachabilityStatusUnknown;\n\n    return self;\n}\n\n- (void)dealloc {\n    [self stopMonitoring];\n\n    if (_networkReachability) {\n        CFRelease(_networkReachability);\n        _networkReachability = NULL;\n    }\n}\n\n#pragma mark -\n\n- (BOOL)isReachable {\n    return [self isReachableViaWWAN] || [self isReachableViaWiFi];\n}\n\n- (BOOL)isReachableViaWWAN {\n    return self.networkReachabilityStatus == AFNetworkReachabilityStatusReachableViaWWAN;\n}\n\n- (BOOL)isReachableViaWiFi {\n    return self.networkReachabilityStatus == AFNetworkReachabilityStatusReachableViaWiFi;\n}\n\n#pragma mark -\n\n- (void)startMonitoring {\n    [self stopMonitoring];\n\n    if (!self.networkReachability) {\n        return;\n    }\n\n    __weak __typeof(self)weakSelf = self;\n    AFNetworkReachabilityStatusBlock callback = ^(AFNetworkReachabilityStatus status) {\n        __strong __typeof(weakSelf)strongSelf = weakSelf;\n\n        strongSelf.networkReachabilityStatus = status;\n        if (strongSelf.networkReachabilityStatusBlock) {\n            strongSelf.networkReachabilityStatusBlock(status);\n        }\n\n    };\n\n    SCNetworkReachabilityContext context = {0, (__bridge void *)callback, AFNetworkReachabilityRetainCallback, AFNetworkReachabilityReleaseCallback, NULL};\n    SCNetworkReachabilitySetCallback(self.networkReachability, AFNetworkReachabilityCallback, &context);\n    SCNetworkReachabilityScheduleWithRunLoop(self.networkReachability, CFRunLoopGetMain(), kCFRunLoopCommonModes);\n\n    switch (self.networkReachabilityAssociation) {\n        case AFNetworkReachabilityForName:\n            break;\n        case AFNetworkReachabilityForAddress:\n        case AFNetworkReachabilityForAddressPair:\n        default: {\n            dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_BACKGROUND, 0),^{\n                SCNetworkReachabilityFlags flags;\n                SCNetworkReachabilityGetFlags(self.networkReachability, &flags);\n                AFNetworkReachabilityStatus status = AFNetworkReachabilityStatusForFlags(flags);\n                dispatch_async(dispatch_get_main_queue(), ^{\n                    callback(status);\n\n                    NSNotificationCenter *notificationCenter = [NSNotificationCenter defaultCenter];\n                    [notificationCenter postNotificationName:AFNetworkingReachabilityDidChangeNotification object:nil userInfo:@{ AFNetworkingReachabilityNotificationStatusItem: @(status) }];\n\n\n                });\n            });\n        }\n            break;\n    }\n}\n\n- (void)stopMonitoring {\n    if (!self.networkReachability) {\n        return;\n    }\n\n    SCNetworkReachabilityUnscheduleFromRunLoop(self.networkReachability, CFRunLoopGetMain(), kCFRunLoopCommonModes);\n}\n\n#pragma mark -\n\n- (NSString *)localizedNetworkReachabilityStatusString {\n    return AFStringFromNetworkReachabilityStatus(self.networkReachabilityStatus);\n}\n\n#pragma mark -\n\n- (void)setReachabilityStatusChangeBlock:(void (^)(AFNetworkReachabilityStatus status))block {\n    self.networkReachabilityStatusBlock = block;\n}\n\n#pragma mark - NSKeyValueObserving\n\n+ (NSSet *)keyPathsForValuesAffectingValueForKey:(NSString *)key {\n    if ([key isEqualToString:@\"reachable\"] || [key isEqualToString:@\"reachableViaWWAN\"] || [key isEqualToString:@\"reachableViaWiFi\"]) {\n        return [NSSet setWithObject:@\"networkReachabilityStatus\"];\n    }\n\n    return [super keyPathsForValuesAffectingValueForKey:key];\n}\n\n@end\n"
  },
  {
    "path": "Pods/AFNetworking/AFNetworking/AFNetworking.h",
    "content": "// AFNetworking.h\n//\n// Copyright (c) 2013 AFNetworking (http://afnetworking.com/)\n// \n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\n#import <Foundation/Foundation.h>\n#import <Availability.h>\n\n#ifndef _AFNETWORKING_\n    #define _AFNETWORKING_\n\n    #import \"AFURLRequestSerialization.h\"\n    #import \"AFURLResponseSerialization.h\"\n    #import \"AFSecurityPolicy.h\"\n    #import \"AFNetworkReachabilityManager.h\"\n\n    #import \"AFURLConnectionOperation.h\"\n    #import \"AFHTTPRequestOperation.h\"\n    #import \"AFHTTPRequestOperationManager.h\"\n\n#if ( ( defined(__MAC_OS_X_VERSION_MAX_ALLOWED) && __MAC_OS_X_VERSION_MAX_ALLOWED >= 1090) || \\\n      ( defined(__IPHONE_OS_VERSION_MAX_ALLOWED) && __IPHONE_OS_VERSION_MAX_ALLOWED >= 70000 ) )\n    #import \"AFURLSessionManager.h\"\n    #import \"AFHTTPSessionManager.h\"\n#endif\n\n#endif /* _AFNETWORKING_ */\n"
  },
  {
    "path": "Pods/AFNetworking/AFNetworking/AFSecurityPolicy.h",
    "content": "// AFSecurityPolicy.h\n//\n// Copyright (c) 2013-2015 AFNetworking (http://afnetworking.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\n#import <Foundation/Foundation.h>\n#import <Security/Security.h>\n\ntypedef NS_ENUM(NSUInteger, AFSSLPinningMode) {\n    AFSSLPinningModeNone,\n    AFSSLPinningModePublicKey,\n    AFSSLPinningModeCertificate,\n};\n\n/**\n `AFSecurityPolicy` evaluates server trust against pinned X.509 certificates and public keys over secure connections.\n\n Adding pinned SSL certificates to your app helps prevent man-in-the-middle attacks and other vulnerabilities. Applications dealing with sensitive customer data or financial information are strongly encouraged to route all communication over an HTTPS connection with SSL pinning configured and enabled.\n */\n@interface AFSecurityPolicy : NSObject\n\n/**\n The criteria by which server trust should be evaluated against the pinned SSL certificates. Defaults to `AFSSLPinningModeNone`.\n */\n@property (readonly, nonatomic, assign) AFSSLPinningMode SSLPinningMode;\n\n/**\n Whether to evaluate an entire SSL certificate chain, or just the leaf certificate. Defaults to `YES`.\n */\n@property (nonatomic, assign) BOOL validatesCertificateChain;\n\n/**\n The certificates used to evaluate server trust according to the SSL pinning mode. By default, this property is set to any (`.cer`) certificates included in the app bundle.\n */\n@property (nonatomic, strong) NSArray *pinnedCertificates;\n\n/**\n Whether or not to trust servers with an invalid or expired SSL certificates. Defaults to `NO`.\n */\n@property (nonatomic, assign) BOOL allowInvalidCertificates;\n\n/**\n Whether or not to validate the domain name in the certificate's CN field. Defaults to `YES`.\n */\n@property (nonatomic, assign) BOOL validatesDomainName;\n\n///-----------------------------------------\n/// @name Getting Specific Security Policies\n///-----------------------------------------\n\n/**\n Returns the shared default security policy, which does not allow invalid certificates, does not validate domain name, and does not validate against pinned certificates or public keys.\n\n @return The default security policy.\n */\n+ (instancetype)defaultPolicy;\n\n///---------------------\n/// @name Initialization\n///---------------------\n\n/**\n Creates and returns a security policy with the specified pinning mode.\n\n @param pinningMode The SSL pinning mode.\n\n @return A new security policy.\n */\n+ (instancetype)policyWithPinningMode:(AFSSLPinningMode)pinningMode;\n\n///------------------------------\n/// @name Evaluating Server Trust\n///------------------------------\n\n/**\n Whether or not the specified server trust should be accepted, based on the security policy.\n\n This method should be used when responding to an authentication challenge from a server.\n\n @param serverTrust The X.509 certificate trust of the server.\n\n @return Whether or not to trust the server.\n\n @warning This method has been deprecated in favor of `-evaluateServerTrust:forDomain:`.\n */\n- (BOOL)evaluateServerTrust:(SecTrustRef)serverTrust DEPRECATED_ATTRIBUTE;\n\n/**\n Whether or not the specified server trust should be accepted, based on the security policy.\n\n This method should be used when responding to an authentication challenge from a server.\n\n @param serverTrust The X.509 certificate trust of the server.\n @param domain The domain of serverTrust. If `nil`, the domain will not be validated.\n\n @return Whether or not to trust the server.\n */\n- (BOOL)evaluateServerTrust:(SecTrustRef)serverTrust\n                  forDomain:(NSString *)domain;\n\n@end\n\n///----------------\n/// @name Constants\n///----------------\n\n/**\n ## SSL Pinning Modes\n\n The following constants are provided by `AFSSLPinningMode` as possible SSL pinning modes.\n\n enum {\n AFSSLPinningModeNone,\n AFSSLPinningModePublicKey,\n AFSSLPinningModeCertificate,\n }\n\n `AFSSLPinningModeNone`\n Do not used pinned certificates to validate servers.\n\n `AFSSLPinningModePublicKey`\n Validate host certificates against public keys of pinned certificates.\n\n `AFSSLPinningModeCertificate`\n Validate host certificates against pinned certificates.\n*/\n"
  },
  {
    "path": "Pods/AFNetworking/AFNetworking/AFSecurityPolicy.m",
    "content": "// AFSecurityPolicy.m\n//\n// Copyright (c) 2013-2015 AFNetworking (http://afnetworking.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\n#import \"AFSecurityPolicy.h\"\n\n#import <AssertMacros.h>\n\n#if !defined(__IPHONE_OS_VERSION_MIN_REQUIRED)\nstatic NSData * AFSecKeyGetData(SecKeyRef key) {\n    CFDataRef data = NULL;\n\n    __Require_noErr_Quiet(SecItemExport(key, kSecFormatUnknown, kSecItemPemArmour, NULL, &data), _out);\n\n    return (__bridge_transfer NSData *)data;\n\n_out:\n    if (data) {\n        CFRelease(data);\n    }\n\n    return nil;\n}\n#endif\n\nstatic BOOL AFSecKeyIsEqualToKey(SecKeyRef key1, SecKeyRef key2) {\n#if defined(__IPHONE_OS_VERSION_MIN_REQUIRED)\n    return [(__bridge id)key1 isEqual:(__bridge id)key2];\n#else\n    return [AFSecKeyGetData(key1) isEqual:AFSecKeyGetData(key2)];\n#endif\n}\n\nstatic id AFPublicKeyForCertificate(NSData *certificate) {\n    id allowedPublicKey = nil;\n    SecCertificateRef allowedCertificate;\n    SecCertificateRef allowedCertificates[1];\n    CFArrayRef tempCertificates = nil;\n    SecPolicyRef policy = nil;\n    SecTrustRef allowedTrust = nil;\n    SecTrustResultType result;\n\n    allowedCertificate = SecCertificateCreateWithData(NULL, (__bridge CFDataRef)certificate);\n    __Require_Quiet(allowedCertificate != NULL, _out);\n\n    allowedCertificates[0] = allowedCertificate;\n    tempCertificates = CFArrayCreate(NULL, (const void **)allowedCertificates, 1, NULL);\n\n    policy = SecPolicyCreateBasicX509();\n    __Require_noErr_Quiet(SecTrustCreateWithCertificates(tempCertificates, policy, &allowedTrust), _out);\n    __Require_noErr_Quiet(SecTrustEvaluate(allowedTrust, &result), _out);\n\n    allowedPublicKey = (__bridge_transfer id)SecTrustCopyPublicKey(allowedTrust);\n\n_out:\n    if (allowedTrust) {\n        CFRelease(allowedTrust);\n    }\n\n    if (policy) {\n        CFRelease(policy);\n    }\n\n    if (tempCertificates) {\n        CFRelease(tempCertificates);\n    }\n\n    if (allowedCertificate) {\n        CFRelease(allowedCertificate);\n    }\n\n    return allowedPublicKey;\n}\n\nstatic BOOL AFServerTrustIsValid(SecTrustRef serverTrust) {\n    BOOL isValid = NO;\n    SecTrustResultType result;\n    __Require_noErr_Quiet(SecTrustEvaluate(serverTrust, &result), _out);\n\n    isValid = (result == kSecTrustResultUnspecified || result == kSecTrustResultProceed);\n\n_out:\n    return isValid;\n}\n\nstatic NSArray * AFCertificateTrustChainForServerTrust(SecTrustRef serverTrust) {\n    CFIndex certificateCount = SecTrustGetCertificateCount(serverTrust);\n    NSMutableArray *trustChain = [NSMutableArray arrayWithCapacity:(NSUInteger)certificateCount];\n\n    for (CFIndex i = 0; i < certificateCount; i++) {\n        SecCertificateRef certificate = SecTrustGetCertificateAtIndex(serverTrust, i);\n        [trustChain addObject:(__bridge_transfer NSData *)SecCertificateCopyData(certificate)];\n    }\n\n    return [NSArray arrayWithArray:trustChain];\n}\n\nstatic NSArray * AFPublicKeyTrustChainForServerTrust(SecTrustRef serverTrust) {\n    SecPolicyRef policy = SecPolicyCreateBasicX509();\n    CFIndex certificateCount = SecTrustGetCertificateCount(serverTrust);\n    NSMutableArray *trustChain = [NSMutableArray arrayWithCapacity:(NSUInteger)certificateCount];\n    for (CFIndex i = 0; i < certificateCount; i++) {\n        SecCertificateRef certificate = SecTrustGetCertificateAtIndex(serverTrust, i);\n\n        SecCertificateRef someCertificates[] = {certificate};\n        CFArrayRef certificates = CFArrayCreate(NULL, (const void **)someCertificates, 1, NULL);\n\n        SecTrustRef trust;\n        __Require_noErr_Quiet(SecTrustCreateWithCertificates(certificates, policy, &trust), _out);\n\n        SecTrustResultType result;\n        __Require_noErr_Quiet(SecTrustEvaluate(trust, &result), _out);\n\n        [trustChain addObject:(__bridge_transfer id)SecTrustCopyPublicKey(trust)];\n\n    _out:\n        if (trust) {\n            CFRelease(trust);\n        }\n\n        if (certificates) {\n            CFRelease(certificates);\n        }\n\n        continue;\n    }\n    CFRelease(policy);\n\n    return [NSArray arrayWithArray:trustChain];\n}\n\n#pragma mark -\n\n@interface AFSecurityPolicy()\n@property (readwrite, nonatomic, assign) AFSSLPinningMode SSLPinningMode;\n@property (readwrite, nonatomic, strong) NSArray *pinnedPublicKeys;\n@end\n\n@implementation AFSecurityPolicy\n\n+ (NSArray *)defaultPinnedCertificates {\n    static NSArray *_defaultPinnedCertificates = nil;\n    static dispatch_once_t onceToken;\n    dispatch_once(&onceToken, ^{\n        NSBundle *bundle = [NSBundle bundleForClass:[self class]];\n        NSArray *paths = [bundle pathsForResourcesOfType:@\"cer\" inDirectory:@\".\"];\n\n        NSMutableArray *certificates = [NSMutableArray arrayWithCapacity:[paths count]];\n        for (NSString *path in paths) {\n            NSData *certificateData = [NSData dataWithContentsOfFile:path];\n            [certificates addObject:certificateData];\n        }\n\n        _defaultPinnedCertificates = [[NSArray alloc] initWithArray:certificates];\n    });\n\n    return _defaultPinnedCertificates;\n}\n\n+ (instancetype)defaultPolicy {\n    AFSecurityPolicy *securityPolicy = [[self alloc] init];\n    securityPolicy.SSLPinningMode = AFSSLPinningModeNone;\n\n    return securityPolicy;\n}\n\n+ (instancetype)policyWithPinningMode:(AFSSLPinningMode)pinningMode {\n    AFSecurityPolicy *securityPolicy = [[self alloc] init];\n    securityPolicy.SSLPinningMode = pinningMode;\n\n    [securityPolicy setPinnedCertificates:[self defaultPinnedCertificates]];\n\n    return securityPolicy;\n}\n\n- (id)init {\n    self = [super init];\n    if (!self) {\n        return nil;\n    }\n\n    self.validatesCertificateChain = YES;\n    self.validatesDomainName = YES;\n\n    return self;\n}\n\n- (void)setPinnedCertificates:(NSArray *)pinnedCertificates {\n    _pinnedCertificates = pinnedCertificates;\n\n    if (self.pinnedCertificates) {\n        NSMutableArray *mutablePinnedPublicKeys = [NSMutableArray arrayWithCapacity:[self.pinnedCertificates count]];\n        for (NSData *certificate in self.pinnedCertificates) {\n            id publicKey = AFPublicKeyForCertificate(certificate);\n            if (!publicKey) {\n                continue;\n            }\n            [mutablePinnedPublicKeys addObject:publicKey];\n        }\n        self.pinnedPublicKeys = [NSArray arrayWithArray:mutablePinnedPublicKeys];\n    } else {\n        self.pinnedPublicKeys = nil;\n    }\n}\n\n#pragma mark -\n\n- (BOOL)evaluateServerTrust:(SecTrustRef)serverTrust {\n    return [self evaluateServerTrust:serverTrust forDomain:nil];\n}\n\n- (BOOL)evaluateServerTrust:(SecTrustRef)serverTrust\n                  forDomain:(NSString *)domain\n{\n    NSMutableArray *policies = [NSMutableArray array];\n    if (self.validatesDomainName) {\n        [policies addObject:(__bridge_transfer id)SecPolicyCreateSSL(true, (__bridge CFStringRef)domain)];\n    } else {\n        [policies addObject:(__bridge_transfer id)SecPolicyCreateBasicX509()];\n    }\n\n    SecTrustSetPolicies(serverTrust, (__bridge CFArrayRef)policies);\n\n    if (self.SSLPinningMode == AFSSLPinningModeNone) {\n        if (self.allowInvalidCertificates || AFServerTrustIsValid(serverTrust)){\n            return YES;\n        } else {\n            return NO;\n        }\n    } else if (!AFServerTrustIsValid(serverTrust) && !self.allowInvalidCertificates) {\n        return NO;\n    }\n    \n    NSArray *serverCertificates = AFCertificateTrustChainForServerTrust(serverTrust);\n    switch (self.SSLPinningMode) {\n        case AFSSLPinningModeNone:\n        default:\n            return NO;\n        case AFSSLPinningModeCertificate: {\n            NSMutableArray *pinnedCertificates = [NSMutableArray array];\n            for (NSData *certificateData in self.pinnedCertificates) {\n                [pinnedCertificates addObject:(__bridge_transfer id)SecCertificateCreateWithData(NULL, (__bridge CFDataRef)certificateData)];\n            }\n            SecTrustSetAnchorCertificates(serverTrust, (__bridge CFArrayRef)pinnedCertificates);\n\n            if (!AFServerTrustIsValid(serverTrust)) {\n                return NO;\n            }\n\n            if (!self.validatesCertificateChain) {\n                return YES;\n            }\n\n            NSUInteger trustedCertificateCount = 0;\n            for (NSData *trustChainCertificate in serverCertificates) {\n                if ([self.pinnedCertificates containsObject:trustChainCertificate]) {\n                    trustedCertificateCount++;\n                }\n            }\n\n            return trustedCertificateCount == [serverCertificates count];\n        }\n        case AFSSLPinningModePublicKey: {\n            NSUInteger trustedPublicKeyCount = 0;\n            NSArray *publicKeys = AFPublicKeyTrustChainForServerTrust(serverTrust);\n            if (!self.validatesCertificateChain && [publicKeys count] > 0) {\n                publicKeys = @[[publicKeys firstObject]];\n            }\n\n            for (id trustChainPublicKey in publicKeys) {\n                for (id pinnedPublicKey in self.pinnedPublicKeys) {\n                    if (AFSecKeyIsEqualToKey((__bridge SecKeyRef)trustChainPublicKey, (__bridge SecKeyRef)pinnedPublicKey)) {\n                        trustedPublicKeyCount += 1;\n                    }\n                }\n            }\n\n            return trustedPublicKeyCount > 0 && ((self.validatesCertificateChain && trustedPublicKeyCount == [serverCertificates count]) || (!self.validatesCertificateChain && trustedPublicKeyCount >= 1));\n        }\n    }\n\n    return NO;\n}\n\n#pragma mark - NSKeyValueObserving\n\n+ (NSSet *)keyPathsForValuesAffectingPinnedPublicKeys {\n    return [NSSet setWithObject:@\"pinnedCertificates\"];\n}\n\n@end\n"
  },
  {
    "path": "Pods/AFNetworking/AFNetworking/AFURLConnectionOperation.h",
    "content": "// AFURLConnectionOperation.h\n//\n// Copyright (c) 2013-2015 AFNetworking (http://afnetworking.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\n#import <Foundation/Foundation.h>\n\n#import <Availability.h>\n#import \"AFURLRequestSerialization.h\"\n#import \"AFURLResponseSerialization.h\"\n#import \"AFSecurityPolicy.h\"\n\n#ifndef NS_DESIGNATED_INITIALIZER\n#if __has_attribute(objc_designated_initializer)\n#define NS_DESIGNATED_INITIALIZER __attribute__((objc_designated_initializer))\n#else\n#define NS_DESIGNATED_INITIALIZER\n#endif\n#endif\n\n/**\n `AFURLConnectionOperation` is a subclass of `NSOperation` that implements `NSURLConnection` delegate methods.\n\n ## Subclassing Notes\n\n This is the base class of all network request operations. You may wish to create your own subclass in order to implement additional `NSURLConnection` delegate methods (see \"`NSURLConnection` Delegate Methods\" below), or to provide additional properties and/or class constructors.\n\n If you are creating a subclass that communicates over the HTTP or HTTPS protocols, you may want to consider subclassing `AFHTTPRequestOperation` instead, as it supports specifying acceptable content types or status codes.\n\n ## NSURLConnection Delegate Methods\n\n `AFURLConnectionOperation` implements the following `NSURLConnection` delegate methods:\n\n - `connection:didReceiveResponse:`\n - `connection:didReceiveData:`\n - `connectionDidFinishLoading:`\n - `connection:didFailWithError:`\n - `connection:didSendBodyData:totalBytesWritten:totalBytesExpectedToWrite:`\n - `connection:willCacheResponse:`\n - `connectionShouldUseCredentialStorage:`\n - `connection:needNewBodyStream:`\n - `connection:willSendRequestForAuthenticationChallenge:`\n\n If any of these methods are overridden in a subclass, they _must_ call the `super` implementation first.\n\n ## Callbacks and Completion Blocks\n\n The built-in `completionBlock` provided by `NSOperation` allows for custom behavior to be executed after the request finishes. It is a common pattern for class constructors in subclasses to take callback block parameters, and execute them conditionally in the body of its `completionBlock`. Make sure to handle cancelled operations appropriately when setting a `completionBlock` (i.e. returning early before parsing response data). See the implementation of any of the `AFHTTPRequestOperation` subclasses for an example of this.\n\n Subclasses are strongly discouraged from overriding `setCompletionBlock:`, as `AFURLConnectionOperation`'s implementation includes a workaround to mitigate retain cycles, and what Apple rather ominously refers to as [\"The Deallocation Problem\"](http://developer.apple.com/library/ios/#technotes/tn2109/).\n\n ## SSL Pinning\n\n Relying on the CA trust model to validate SSL certificates exposes your app to security vulnerabilities, such as man-in-the-middle attacks. For applications that connect to known servers, SSL certificate pinning provides an increased level of security, by checking server certificate validity against those specified in the app bundle.\n\n SSL with certificate pinning is strongly recommended for any application that transmits sensitive information to an external webservice.\n\n Connections will be validated on all matching certificates with a `.cer` extension in the bundle root.\n\n ## App Extensions\n\n When using AFNetworking in an App Extension, `#define AF_APP_EXTENSIONS` to avoid using unavailable APIs.\n\n ## NSCoding & NSCopying Conformance\n\n `AFURLConnectionOperation` conforms to the `NSCoding` and `NSCopying` protocols, allowing operations to be archived to disk, and copied in memory, respectively. However, because of the intrinsic limitations of capturing the exact state of an operation at a particular moment, there are some important caveats to keep in mind:\n\n ### NSCoding Caveats\n\n - Encoded operations do not include any block or stream properties. Be sure to set `completionBlock`, `outputStream`, and any callback blocks as necessary when using `-initWithCoder:` or `NSKeyedUnarchiver`.\n - Operations are paused on `encodeWithCoder:`. If the operation was encoded while paused or still executing, its archived state will return `YES` for `isReady`. Otherwise, the state of an operation when encoding will remain unchanged.\n\n ### NSCopying Caveats\n\n - `-copy` and `-copyWithZone:` return a new operation with the `NSURLRequest` of the original. So rather than an exact copy of the operation at that particular instant, the copying mechanism returns a completely new instance, which can be useful for retrying operations.\n - A copy of an operation will not include the `outputStream` of the original.\n - Operation copies do not include `completionBlock`, as it often strongly captures a reference to `self`, which would otherwise have the unintuitive side-effect of pointing to the _original_ operation when copied.\n */\n\n@interface AFURLConnectionOperation : NSOperation <NSURLConnectionDelegate, NSURLConnectionDataDelegate, NSSecureCoding, NSCopying>\n\n///-------------------------------\n/// @name Accessing Run Loop Modes\n///-------------------------------\n\n/**\n The run loop modes in which the operation will run on the network thread. By default, this is a single-member set containing `NSRunLoopCommonModes`.\n */\n@property (nonatomic, strong) NSSet *runLoopModes;\n\n///-----------------------------------------\n/// @name Getting URL Connection Information\n///-----------------------------------------\n\n/**\n The request used by the operation's connection.\n */\n@property (readonly, nonatomic, strong) NSURLRequest *request;\n\n/**\n The last response received by the operation's connection.\n */\n@property (readonly, nonatomic, strong) NSURLResponse *response;\n\n/**\n The error, if any, that occurred in the lifecycle of the request.\n */\n@property (readonly, nonatomic, strong) NSError *error;\n\n///----------------------------\n/// @name Getting Response Data\n///----------------------------\n\n/**\n The data received during the request.\n */\n@property (readonly, nonatomic, strong) NSData *responseData;\n\n/**\n The string representation of the response data.\n */\n@property (readonly, nonatomic, copy) NSString *responseString;\n\n/**\n The string encoding of the response.\n\n If the response does not specify a valid string encoding, `responseStringEncoding` will return `NSUTF8StringEncoding`.\n */\n@property (readonly, nonatomic, assign) NSStringEncoding responseStringEncoding;\n\n///-------------------------------\n/// @name Managing URL Credentials\n///-------------------------------\n\n/**\n Whether the URL connection should consult the credential storage for authenticating the connection. `YES` by default.\n\n This is the value that is returned in the `NSURLConnectionDelegate` method `-connectionShouldUseCredentialStorage:`.\n */\n@property (nonatomic, assign) BOOL shouldUseCredentialStorage;\n\n/**\n The credential used for authentication challenges in `-connection:didReceiveAuthenticationChallenge:`.\n\n This will be overridden by any shared credentials that exist for the username or password of the request URL, if present.\n */\n@property (nonatomic, strong) NSURLCredential *credential;\n\n///-------------------------------\n/// @name Managing Security Policy\n///-------------------------------\n\n/**\n The security policy used to evaluate server trust for secure connections.\n */\n@property (nonatomic, strong) AFSecurityPolicy *securityPolicy;\n\n///------------------------\n/// @name Accessing Streams\n///------------------------\n\n/**\n The input stream used to read data to be sent during the request.\n\n This property acts as a proxy to the `HTTPBodyStream` property of `request`.\n */\n@property (nonatomic, strong) NSInputStream *inputStream;\n\n/**\n The output stream that is used to write data received until the request is finished.\n\n By default, data is accumulated into a buffer that is stored into `responseData` upon completion of the request, with the intermediary `outputStream` property set to `nil`. When `outputStream` is set, the data will not be accumulated into an internal buffer, and as a result, the `responseData` property of the completed request will be `nil`. The output stream will be scheduled in the network thread runloop upon being set.\n */\n@property (nonatomic, strong) NSOutputStream *outputStream;\n\n///---------------------------------\n/// @name Managing Callback Queues\n///---------------------------------\n\n/**\n The dispatch queue for `completionBlock`. If `NULL` (default), the main queue is used.\n */\n#if OS_OBJECT_HAVE_OBJC_SUPPORT\n@property (nonatomic, strong) dispatch_queue_t completionQueue;\n#else\n@property (nonatomic, assign) dispatch_queue_t completionQueue;\n#endif\n\n/**\n The dispatch group for `completionBlock`. If `NULL` (default), a private dispatch group is used.\n */\n#if OS_OBJECT_HAVE_OBJC_SUPPORT\n@property (nonatomic, strong) dispatch_group_t completionGroup;\n#else\n@property (nonatomic, assign) dispatch_group_t completionGroup;\n#endif\n\n///---------------------------------------------\n/// @name Managing Request Operation Information\n///---------------------------------------------\n\n/**\n The user info dictionary for the receiver.\n */\n@property (nonatomic, strong) NSDictionary *userInfo;\n\n///------------------------------------------------------\n/// @name Initializing an AFURLConnectionOperation Object\n///------------------------------------------------------\n\n/**\n Initializes and returns a newly allocated operation object with a url connection configured with the specified url request.\n\n This is the designated initializer.\n\n @param urlRequest The request object to be used by the operation connection.\n */\n- (instancetype)initWithRequest:(NSURLRequest *)urlRequest NS_DESIGNATED_INITIALIZER;\n\n///----------------------------------\n/// @name Pausing / Resuming Requests\n///----------------------------------\n\n/**\n Pauses the execution of the request operation.\n\n A paused operation returns `NO` for `-isReady`, `-isExecuting`, and `-isFinished`. As such, it will remain in an `NSOperationQueue` until it is either cancelled or resumed. Pausing a finished, cancelled, or paused operation has no effect.\n */\n- (void)pause;\n\n/**\n Whether the request operation is currently paused.\n\n @return `YES` if the operation is currently paused, otherwise `NO`.\n */\n- (BOOL)isPaused;\n\n/**\n Resumes the execution of the paused request operation.\n\n Pause/Resume behavior varies depending on the underlying implementation for the operation class. In its base implementation, resuming a paused requests restarts the original request. However, since HTTP defines a specification for how to request a specific content range, `AFHTTPRequestOperation` will resume downloading the request from where it left off, instead of restarting the original request.\n */\n- (void)resume;\n\n///----------------------------------------------\n/// @name Configuring Backgrounding Task Behavior\n///----------------------------------------------\n\n/**\n Specifies that the operation should continue execution after the app has entered the background, and the expiration handler for that background task.\n\n @param handler A handler to be called shortly before the application’s remaining background time reaches 0. The handler is wrapped in a block that cancels the operation, and cleans up and marks the end of execution, unlike the `handler` parameter in `UIApplication -beginBackgroundTaskWithExpirationHandler:`, which expects this to be done in the handler itself. The handler is called synchronously on the main thread, thus blocking the application’s suspension momentarily while the application is notified.\n  */\n#if defined(__IPHONE_OS_VERSION_MIN_REQUIRED) && !defined(AF_APP_EXTENSIONS)\n- (void)setShouldExecuteAsBackgroundTaskWithExpirationHandler:(void (^)(void))handler;\n#endif\n\n///---------------------------------\n/// @name Setting Progress Callbacks\n///---------------------------------\n\n/**\n Sets a callback to be called when an undetermined number of bytes have been uploaded to the server.\n\n @param block A block object to be called when an undetermined number of bytes have been uploaded to the server. This block has no return value and takes three arguments: the number of bytes written since the last time the upload progress block was called, the total bytes written, and the total bytes expected to be written during the request, as initially determined by the length of the HTTP body. This block may be called multiple times, and will execute on the main thread.\n */\n- (void)setUploadProgressBlock:(void (^)(NSUInteger bytesWritten, long long totalBytesWritten, long long totalBytesExpectedToWrite))block;\n\n/**\n Sets a callback to be called when an undetermined number of bytes have been downloaded from the server.\n\n @param block A block object to be called when an undetermined number of bytes have been downloaded from the server. This block has no return value and takes three arguments: the number of bytes read since the last time the download progress block was called, the total bytes read, and the total bytes expected to be read during the request, as initially determined by the expected content size of the `NSHTTPURLResponse` object. This block may be called multiple times, and will execute on the main thread.\n */\n- (void)setDownloadProgressBlock:(void (^)(NSUInteger bytesRead, long long totalBytesRead, long long totalBytesExpectedToRead))block;\n\n///-------------------------------------------------\n/// @name Setting NSURLConnection Delegate Callbacks\n///-------------------------------------------------\n\n/**\n Sets a block to be executed when the connection will authenticate a challenge in order to download its request, as handled by the `NSURLConnectionDelegate` method `connection:willSendRequestForAuthenticationChallenge:`.\n\n @param block A block object to be executed when the connection will authenticate a challenge in order to download its request. The block has no return type and takes two arguments: the URL connection object, and the challenge that must be authenticated. This block must invoke one of the challenge-responder methods (NSURLAuthenticationChallengeSender protocol).\n\n If `allowsInvalidSSLCertificate` is set to YES, `connection:willSendRequestForAuthenticationChallenge:` will attempt to have the challenge sender use credentials with invalid SSL certificates.\n */\n- (void)setWillSendRequestForAuthenticationChallengeBlock:(void (^)(NSURLConnection *connection, NSURLAuthenticationChallenge *challenge))block;\n\n/**\n Sets a block to be executed when the server redirects the request from one URL to another URL, or when the request URL changed by the `NSURLProtocol` subclass handling the request in order to standardize its format, as handled by the `NSURLConnectionDataDelegate` method `connection:willSendRequest:redirectResponse:`.\n\n @param block A block object to be executed when the request URL was changed. The block returns an `NSURLRequest` object, the URL request to redirect, and takes three arguments: the URL connection object, the the proposed redirected request, and the URL response that caused the redirect.\n */\n- (void)setRedirectResponseBlock:(NSURLRequest * (^)(NSURLConnection *connection, NSURLRequest *request, NSURLResponse *redirectResponse))block;\n\n\n/**\n Sets a block to be executed to modify the response a connection will cache, if any, as handled by the `NSURLConnectionDelegate` method `connection:willCacheResponse:`.\n\n @param block A block object to be executed to determine what response a connection will cache, if any. The block returns an `NSCachedURLResponse` object, the cached response to store in memory or `nil` to prevent the response from being cached, and takes two arguments: the URL connection object, and the cached response provided for the request.\n */\n- (void)setCacheResponseBlock:(NSCachedURLResponse * (^)(NSURLConnection *connection, NSCachedURLResponse *cachedResponse))block;\n\n///\n\n/**\n\n */\n+ (NSArray *)batchOfRequestOperations:(NSArray *)operations\n                        progressBlock:(void (^)(NSUInteger numberOfFinishedOperations, NSUInteger totalNumberOfOperations))progressBlock\n                      completionBlock:(void (^)(NSArray *operations))completionBlock;\n\n@end\n\n///--------------------\n/// @name Notifications\n///--------------------\n\n/**\n Posted when an operation begins executing.\n */\nextern NSString * const AFNetworkingOperationDidStartNotification;\n\n/**\n Posted when an operation finishes.\n */\nextern NSString * const AFNetworkingOperationDidFinishNotification;\n"
  },
  {
    "path": "Pods/AFNetworking/AFNetworking/AFURLConnectionOperation.m",
    "content": "// AFURLConnectionOperation.m\n//\n// Copyright (c) 2013-2015 AFNetworking (http://afnetworking.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\n#import \"AFURLConnectionOperation.h\"\n\n#if defined(__IPHONE_OS_VERSION_MIN_REQUIRED)\n#import <UIKit/UIKit.h>\n#endif\n\n#if !__has_feature(objc_arc)\n#error AFNetworking must be built with ARC.\n// You can turn on ARC for only AFNetworking files by adding -fobjc-arc to the build phase for each of its files.\n#endif\n\ntypedef NS_ENUM(NSInteger, AFOperationState) {\n    AFOperationPausedState      = -1,\n    AFOperationReadyState       = 1,\n    AFOperationExecutingState   = 2,\n    AFOperationFinishedState    = 3,\n};\n\n#if defined(__IPHONE_OS_VERSION_MIN_REQUIRED) && !defined(AF_APP_EXTENSIONS)\ntypedef UIBackgroundTaskIdentifier AFBackgroundTaskIdentifier;\n#else\ntypedef id AFBackgroundTaskIdentifier;\n#endif\n\nstatic dispatch_group_t url_request_operation_completion_group() {\n    static dispatch_group_t af_url_request_operation_completion_group;\n    static dispatch_once_t onceToken;\n    dispatch_once(&onceToken, ^{\n        af_url_request_operation_completion_group = dispatch_group_create();\n    });\n\n    return af_url_request_operation_completion_group;\n}\n\nstatic dispatch_queue_t url_request_operation_completion_queue() {\n    static dispatch_queue_t af_url_request_operation_completion_queue;\n    static dispatch_once_t onceToken;\n    dispatch_once(&onceToken, ^{\n        af_url_request_operation_completion_queue = dispatch_queue_create(\"com.alamofire.networking.operation.queue\", DISPATCH_QUEUE_CONCURRENT );\n    });\n\n    return af_url_request_operation_completion_queue;\n}\n\nstatic NSString * const kAFNetworkingLockName = @\"com.alamofire.networking.operation.lock\";\n\nNSString * const AFNetworkingOperationDidStartNotification = @\"com.alamofire.networking.operation.start\";\nNSString * const AFNetworkingOperationDidFinishNotification = @\"com.alamofire.networking.operation.finish\";\n\ntypedef void (^AFURLConnectionOperationProgressBlock)(NSUInteger bytes, long long totalBytes, long long totalBytesExpected);\ntypedef void (^AFURLConnectionOperationAuthenticationChallengeBlock)(NSURLConnection *connection, NSURLAuthenticationChallenge *challenge);\ntypedef NSCachedURLResponse * (^AFURLConnectionOperationCacheResponseBlock)(NSURLConnection *connection, NSCachedURLResponse *cachedResponse);\ntypedef NSURLRequest * (^AFURLConnectionOperationRedirectResponseBlock)(NSURLConnection *connection, NSURLRequest *request, NSURLResponse *redirectResponse);\n\nstatic inline NSString * AFKeyPathFromOperationState(AFOperationState state) {\n    switch (state) {\n        case AFOperationReadyState:\n            return @\"isReady\";\n        case AFOperationExecutingState:\n            return @\"isExecuting\";\n        case AFOperationFinishedState:\n            return @\"isFinished\";\n        case AFOperationPausedState:\n            return @\"isPaused\";\n        default: {\n#pragma clang diagnostic push\n#pragma clang diagnostic ignored \"-Wunreachable-code\"\n            return @\"state\";\n#pragma clang diagnostic pop\n        }\n    }\n}\n\nstatic inline BOOL AFStateTransitionIsValid(AFOperationState fromState, AFOperationState toState, BOOL isCancelled) {\n    switch (fromState) {\n        case AFOperationReadyState:\n            switch (toState) {\n                case AFOperationPausedState:\n                case AFOperationExecutingState:\n                    return YES;\n                case AFOperationFinishedState:\n                    return isCancelled;\n                default:\n                    return NO;\n            }\n        case AFOperationExecutingState:\n            switch (toState) {\n                case AFOperationPausedState:\n                case AFOperationFinishedState:\n                    return YES;\n                default:\n                    return NO;\n            }\n        case AFOperationFinishedState:\n            return NO;\n        case AFOperationPausedState:\n            return toState == AFOperationReadyState;\n        default: {\n#pragma clang diagnostic push\n#pragma clang diagnostic ignored \"-Wunreachable-code\"\n            switch (toState) {\n                case AFOperationPausedState:\n                case AFOperationReadyState:\n                case AFOperationExecutingState:\n                case AFOperationFinishedState:\n                    return YES;\n                default:\n                    return NO;\n            }\n        }\n#pragma clang diagnostic pop\n    }\n}\n\n@interface AFURLConnectionOperation ()\n@property (readwrite, nonatomic, assign) AFOperationState state;\n@property (readwrite, nonatomic, strong) NSRecursiveLock *lock;\n@property (readwrite, nonatomic, strong) NSURLConnection *connection;\n@property (readwrite, nonatomic, strong) NSURLRequest *request;\n@property (readwrite, nonatomic, strong) NSURLResponse *response;\n@property (readwrite, nonatomic, strong) NSError *error;\n@property (readwrite, nonatomic, strong) NSData *responseData;\n@property (readwrite, nonatomic, copy) NSString *responseString;\n@property (readwrite, nonatomic, assign) NSStringEncoding responseStringEncoding;\n@property (readwrite, nonatomic, assign) long long totalBytesRead;\n@property (readwrite, nonatomic, assign) AFBackgroundTaskIdentifier backgroundTaskIdentifier;\n@property (readwrite, nonatomic, copy) AFURLConnectionOperationProgressBlock uploadProgress;\n@property (readwrite, nonatomic, copy) AFURLConnectionOperationProgressBlock downloadProgress;\n@property (readwrite, nonatomic, copy) AFURLConnectionOperationAuthenticationChallengeBlock authenticationChallenge;\n@property (readwrite, nonatomic, copy) AFURLConnectionOperationCacheResponseBlock cacheResponse;\n@property (readwrite, nonatomic, copy) AFURLConnectionOperationRedirectResponseBlock redirectResponse;\n\n- (void)operationDidStart;\n- (void)finish;\n- (void)cancelConnection;\n@end\n\n@implementation AFURLConnectionOperation\n@synthesize outputStream = _outputStream;\n\n+ (void)networkRequestThreadEntryPoint:(id)__unused object {\n    @autoreleasepool {\n        [[NSThread currentThread] setName:@\"AFNetworking\"];\n\n        NSRunLoop *runLoop = [NSRunLoop currentRunLoop];\n        [runLoop addPort:[NSMachPort port] forMode:NSDefaultRunLoopMode];\n        [runLoop run];\n    }\n}\n\n+ (NSThread *)networkRequestThread {\n    static NSThread *_networkRequestThread = nil;\n    static dispatch_once_t oncePredicate;\n    dispatch_once(&oncePredicate, ^{\n        _networkRequestThread = [[NSThread alloc] initWithTarget:self selector:@selector(networkRequestThreadEntryPoint:) object:nil];\n        [_networkRequestThread start];\n    });\n\n    return _networkRequestThread;\n}\n\n- (instancetype)initWithRequest:(NSURLRequest *)urlRequest {\n    NSParameterAssert(urlRequest);\n\n    self = [super init];\n    if (!self) {\n\t\treturn nil;\n    }\n\n    _state = AFOperationReadyState;\n\n    self.lock = [[NSRecursiveLock alloc] init];\n    self.lock.name = kAFNetworkingLockName;\n\n    self.runLoopModes = [NSSet setWithObject:NSRunLoopCommonModes];\n\n    self.request = urlRequest;\n\n    self.shouldUseCredentialStorage = YES;\n\n    self.securityPolicy = [AFSecurityPolicy defaultPolicy];\n\n    return self;\n}\n\n- (void)dealloc {\n    if (_outputStream) {\n        [_outputStream close];\n        _outputStream = nil;\n    }\n\n#if defined(__IPHONE_OS_VERSION_MIN_REQUIRED) && !defined(AF_APP_EXTENSIONS)\n    if (_backgroundTaskIdentifier) {\n        [[UIApplication sharedApplication] endBackgroundTask:_backgroundTaskIdentifier];\n        _backgroundTaskIdentifier = UIBackgroundTaskInvalid;\n    }\n#endif\n}\n\n#pragma mark -\n\n- (void)setResponseData:(NSData *)responseData {\n    [self.lock lock];\n    if (!responseData) {\n        _responseData = nil;\n    } else {\n        _responseData = [NSData dataWithBytes:responseData.bytes length:responseData.length];\n    }\n    [self.lock unlock];\n}\n\n- (NSString *)responseString {\n    [self.lock lock];\n    if (!_responseString && self.response && self.responseData) {\n        self.responseString = [[NSString alloc] initWithData:self.responseData encoding:self.responseStringEncoding];\n    }\n    [self.lock unlock];\n\n    return _responseString;\n}\n\n- (NSStringEncoding)responseStringEncoding {\n    [self.lock lock];\n    if (!_responseStringEncoding && self.response) {\n        NSStringEncoding stringEncoding = NSUTF8StringEncoding;\n        if (self.response.textEncodingName) {\n            CFStringEncoding IANAEncoding = CFStringConvertIANACharSetNameToEncoding((__bridge CFStringRef)self.response.textEncodingName);\n            if (IANAEncoding != kCFStringEncodingInvalidId) {\n                stringEncoding = CFStringConvertEncodingToNSStringEncoding(IANAEncoding);\n            }\n        }\n\n        self.responseStringEncoding = stringEncoding;\n    }\n    [self.lock unlock];\n\n    return _responseStringEncoding;\n}\n\n- (NSInputStream *)inputStream {\n    return self.request.HTTPBodyStream;\n}\n\n- (void)setInputStream:(NSInputStream *)inputStream {\n    NSMutableURLRequest *mutableRequest = [self.request mutableCopy];\n    mutableRequest.HTTPBodyStream = inputStream;\n    self.request = mutableRequest;\n}\n\n- (NSOutputStream *)outputStream {\n    if (!_outputStream) {\n        self.outputStream = [NSOutputStream outputStreamToMemory];\n    }\n\n    return _outputStream;\n}\n\n- (void)setOutputStream:(NSOutputStream *)outputStream {\n    [self.lock lock];\n    if (outputStream != _outputStream) {\n        if (_outputStream) {\n            [_outputStream close];\n        }\n\n        _outputStream = outputStream;\n    }\n    [self.lock unlock];\n}\n\n#if defined(__IPHONE_OS_VERSION_MIN_REQUIRED) && !defined(AF_APP_EXTENSIONS)\n- (void)setShouldExecuteAsBackgroundTaskWithExpirationHandler:(void (^)(void))handler {\n    [self.lock lock];\n    if (!self.backgroundTaskIdentifier) {\n        UIApplication *application = [UIApplication sharedApplication];\n        __weak __typeof(self)weakSelf = self;\n        self.backgroundTaskIdentifier = [application beginBackgroundTaskWithExpirationHandler:^{\n            __strong __typeof(weakSelf)strongSelf = weakSelf;\n\n            if (handler) {\n                handler();\n            }\n\n            if (strongSelf) {\n                [strongSelf cancel];\n\n                [application endBackgroundTask:strongSelf.backgroundTaskIdentifier];\n                strongSelf.backgroundTaskIdentifier = UIBackgroundTaskInvalid;\n            }\n        }];\n    }\n    [self.lock unlock];\n}\n#endif\n\n#pragma mark -\n\n- (void)setState:(AFOperationState)state {\n    if (!AFStateTransitionIsValid(self.state, state, [self isCancelled])) {\n        return;\n    }\n\n    [self.lock lock];\n    NSString *oldStateKey = AFKeyPathFromOperationState(self.state);\n    NSString *newStateKey = AFKeyPathFromOperationState(state);\n\n    [self willChangeValueForKey:newStateKey];\n    [self willChangeValueForKey:oldStateKey];\n    _state = state;\n    [self didChangeValueForKey:oldStateKey];\n    [self didChangeValueForKey:newStateKey];\n    [self.lock unlock];\n}\n\n- (void)pause {\n    if ([self isPaused] || [self isFinished] || [self isCancelled]) {\n        return;\n    }\n\n    [self.lock lock];\n    if ([self isExecuting]) {\n        [self performSelector:@selector(operationDidPause) onThread:[[self class] networkRequestThread] withObject:nil waitUntilDone:NO modes:[self.runLoopModes allObjects]];\n\n        dispatch_async(dispatch_get_main_queue(), ^{\n            NSNotificationCenter *notificationCenter = [NSNotificationCenter defaultCenter];\n            [notificationCenter postNotificationName:AFNetworkingOperationDidFinishNotification object:self];\n        });\n    }\n\n    self.state = AFOperationPausedState;\n    [self.lock unlock];\n}\n\n- (void)operationDidPause {\n    [self.lock lock];\n    [self.connection cancel];\n    [self.lock unlock];\n}\n\n- (BOOL)isPaused {\n    return self.state == AFOperationPausedState;\n}\n\n- (void)resume {\n    if (![self isPaused]) {\n        return;\n    }\n\n    [self.lock lock];\n    self.state = AFOperationReadyState;\n\n    [self start];\n    [self.lock unlock];\n}\n\n#pragma mark -\n\n- (void)setUploadProgressBlock:(void (^)(NSUInteger bytesWritten, long long totalBytesWritten, long long totalBytesExpectedToWrite))block {\n    self.uploadProgress = block;\n}\n\n- (void)setDownloadProgressBlock:(void (^)(NSUInteger bytesRead, long long totalBytesRead, long long totalBytesExpectedToRead))block {\n    self.downloadProgress = block;\n}\n\n- (void)setWillSendRequestForAuthenticationChallengeBlock:(void (^)(NSURLConnection *connection, NSURLAuthenticationChallenge *challenge))block {\n    self.authenticationChallenge = block;\n}\n\n- (void)setCacheResponseBlock:(NSCachedURLResponse * (^)(NSURLConnection *connection, NSCachedURLResponse *cachedResponse))block {\n    self.cacheResponse = block;\n}\n\n- (void)setRedirectResponseBlock:(NSURLRequest * (^)(NSURLConnection *connection, NSURLRequest *request, NSURLResponse *redirectResponse))block {\n    self.redirectResponse = block;\n}\n\n#pragma mark - NSOperation\n\n- (void)setCompletionBlock:(void (^)(void))block {\n    [self.lock lock];\n    if (!block) {\n        [super setCompletionBlock:nil];\n    } else {\n        __weak __typeof(self)weakSelf = self;\n        [super setCompletionBlock:^ {\n            __strong __typeof(weakSelf)strongSelf = weakSelf;\n\n#pragma clang diagnostic push\n#pragma clang diagnostic ignored \"-Wgnu\"\n            dispatch_group_t group = strongSelf.completionGroup ?: url_request_operation_completion_group();\n            dispatch_queue_t queue = strongSelf.completionQueue ?: dispatch_get_main_queue();\n#pragma clang diagnostic pop\n\n            dispatch_group_async(group, queue, ^{\n                block();\n            });\n\n            dispatch_group_notify(group, url_request_operation_completion_queue(), ^{\n                [strongSelf setCompletionBlock:nil];\n            });\n        }];\n    }\n    [self.lock unlock];\n}\n\n- (BOOL)isReady {\n    return self.state == AFOperationReadyState && [super isReady];\n}\n\n- (BOOL)isExecuting {\n    return self.state == AFOperationExecutingState;\n}\n\n- (BOOL)isFinished {\n    return self.state == AFOperationFinishedState;\n}\n\n- (BOOL)isConcurrent {\n    return YES;\n}\n\n- (void)start {\n    [self.lock lock];\n    if ([self isCancelled]) {\n        [self performSelector:@selector(cancelConnection) onThread:[[self class] networkRequestThread] withObject:nil waitUntilDone:NO modes:[self.runLoopModes allObjects]];\n    } else if ([self isReady]) {\n        self.state = AFOperationExecutingState;\n\n        [self performSelector:@selector(operationDidStart) onThread:[[self class] networkRequestThread] withObject:nil waitUntilDone:NO modes:[self.runLoopModes allObjects]];\n    }\n    [self.lock unlock];\n}\n\n- (void)operationDidStart {\n    [self.lock lock];\n    if (![self isCancelled]) {\n        self.connection = [[NSURLConnection alloc] initWithRequest:self.request delegate:self startImmediately:NO];\n\n        NSRunLoop *runLoop = [NSRunLoop currentRunLoop];\n        for (NSString *runLoopMode in self.runLoopModes) {\n            [self.connection scheduleInRunLoop:runLoop forMode:runLoopMode];\n            [self.outputStream scheduleInRunLoop:runLoop forMode:runLoopMode];\n        }\n\n        [self.outputStream open];\n        [self.connection start];\n    }\n    [self.lock unlock];\n\n    dispatch_async(dispatch_get_main_queue(), ^{\n        [[NSNotificationCenter defaultCenter] postNotificationName:AFNetworkingOperationDidStartNotification object:self];\n    });\n}\n\n- (void)finish {\n    [self.lock lock];\n    self.state = AFOperationFinishedState;\n    [self.lock unlock];\n\n    dispatch_async(dispatch_get_main_queue(), ^{\n        [[NSNotificationCenter defaultCenter] postNotificationName:AFNetworkingOperationDidFinishNotification object:self];\n    });\n}\n\n- (void)cancel {\n    [self.lock lock];\n    if (![self isFinished] && ![self isCancelled]) {\n        [super cancel];\n\n        if ([self isExecuting]) {\n            [self performSelector:@selector(cancelConnection) onThread:[[self class] networkRequestThread] withObject:nil waitUntilDone:NO modes:[self.runLoopModes allObjects]];\n        }\n    }\n    [self.lock unlock];\n}\n\n- (void)cancelConnection {\n    NSDictionary *userInfo = nil;\n    if ([self.request URL]) {\n        userInfo = [NSDictionary dictionaryWithObject:[self.request URL] forKey:NSURLErrorFailingURLErrorKey];\n    }\n    NSError *error = [NSError errorWithDomain:NSURLErrorDomain code:NSURLErrorCancelled userInfo:userInfo];\n\n    if (![self isFinished]) {\n        if (self.connection) {\n            [self.connection cancel];\n            [self performSelector:@selector(connection:didFailWithError:) withObject:self.connection withObject:error];\n        } else {\n            // Accomodate race condition where `self.connection` has not yet been set before cancellation\n            self.error = error;\n            [self finish];\n        }\n    }\n}\n\n#pragma mark -\n\n+ (NSArray *)batchOfRequestOperations:(NSArray *)operations\n                        progressBlock:(void (^)(NSUInteger numberOfFinishedOperations, NSUInteger totalNumberOfOperations))progressBlock\n                      completionBlock:(void (^)(NSArray *operations))completionBlock\n{\n    if (!operations || [operations count] == 0) {\n        return @[[NSBlockOperation blockOperationWithBlock:^{\n            dispatch_async(dispatch_get_main_queue(), ^{\n                if (completionBlock) {\n                    completionBlock(@[]);\n                }\n            });\n        }]];\n    }\n\n    __block dispatch_group_t group = dispatch_group_create();\n    NSBlockOperation *batchedOperation = [NSBlockOperation blockOperationWithBlock:^{\n        dispatch_group_notify(group, dispatch_get_main_queue(), ^{\n            if (completionBlock) {\n                completionBlock(operations);\n            }\n        });\n    }];\n\n    for (AFURLConnectionOperation *operation in operations) {\n        operation.completionGroup = group;\n        void (^originalCompletionBlock)(void) = [operation.completionBlock copy];\n        __weak __typeof(operation)weakOperation = operation;\n        operation.completionBlock = ^{\n            __strong __typeof(weakOperation)strongOperation = weakOperation;\n#pragma clang diagnostic push\n#pragma clang diagnostic ignored \"-Wgnu\"\n            dispatch_queue_t queue = strongOperation.completionQueue ?: dispatch_get_main_queue();\n#pragma clang diagnostic pop\n            dispatch_group_async(group, queue, ^{\n                if (originalCompletionBlock) {\n                    originalCompletionBlock();\n                }\n\n                NSUInteger numberOfFinishedOperations = [[operations indexesOfObjectsPassingTest:^BOOL(id op, NSUInteger __unused idx,  BOOL __unused *stop) {\n                    return [op isFinished];\n                }] count];\n\n                if (progressBlock) {\n                    progressBlock(numberOfFinishedOperations, [operations count]);\n                }\n\n                dispatch_group_leave(group);\n            });\n        };\n\n        dispatch_group_enter(group);\n        [batchedOperation addDependency:operation];\n    }\n\n    return [operations arrayByAddingObject:batchedOperation];\n}\n\n#pragma mark - NSObject\n\n- (NSString *)description {\n    [self.lock lock];\n    NSString *description = [NSString stringWithFormat:@\"<%@: %p, state: %@, cancelled: %@ request: %@, response: %@>\", NSStringFromClass([self class]), self, AFKeyPathFromOperationState(self.state), ([self isCancelled] ? @\"YES\" : @\"NO\"), self.request, self.response];\n    [self.lock unlock];\n    return description;\n}\n\n#pragma mark - NSURLConnectionDelegate\n\n- (void)connection:(NSURLConnection *)connection\nwillSendRequestForAuthenticationChallenge:(NSURLAuthenticationChallenge *)challenge\n{\n    if (self.authenticationChallenge) {\n        self.authenticationChallenge(connection, challenge);\n        return;\n    }\n\n    if ([challenge.protectionSpace.authenticationMethod isEqualToString:NSURLAuthenticationMethodServerTrust]) {\n        if ([self.securityPolicy evaluateServerTrust:challenge.protectionSpace.serverTrust forDomain:challenge.protectionSpace.host]) {\n            NSURLCredential *credential = [NSURLCredential credentialForTrust:challenge.protectionSpace.serverTrust];\n            [[challenge sender] useCredential:credential forAuthenticationChallenge:challenge];\n        } else {\n            [[challenge sender] cancelAuthenticationChallenge:challenge];\n        }\n    } else {\n        if ([challenge previousFailureCount] == 0) {\n            if (self.credential) {\n                [[challenge sender] useCredential:self.credential forAuthenticationChallenge:challenge];\n            } else {\n                [[challenge sender] continueWithoutCredentialForAuthenticationChallenge:challenge];\n            }\n        } else {\n            [[challenge sender] continueWithoutCredentialForAuthenticationChallenge:challenge];\n        }\n    }\n}\n\n- (BOOL)connectionShouldUseCredentialStorage:(NSURLConnection __unused *)connection {\n    return self.shouldUseCredentialStorage;\n}\n\n- (NSURLRequest *)connection:(NSURLConnection *)connection\n             willSendRequest:(NSURLRequest *)request\n            redirectResponse:(NSURLResponse *)redirectResponse\n{\n    if (self.redirectResponse) {\n        return self.redirectResponse(connection, request, redirectResponse);\n    } else {\n        return request;\n    }\n}\n\n- (void)connection:(NSURLConnection __unused *)connection\n   didSendBodyData:(NSInteger)bytesWritten\n totalBytesWritten:(NSInteger)totalBytesWritten\ntotalBytesExpectedToWrite:(NSInteger)totalBytesExpectedToWrite\n{\n    dispatch_async(dispatch_get_main_queue(), ^{\n        if (self.uploadProgress) {\n            self.uploadProgress((NSUInteger)bytesWritten, totalBytesWritten, totalBytesExpectedToWrite);\n        }\n    });\n}\n\n- (void)connection:(NSURLConnection __unused *)connection\ndidReceiveResponse:(NSURLResponse *)response\n{\n    self.response = response;\n}\n\n- (void)connection:(NSURLConnection __unused *)connection\n    didReceiveData:(NSData *)data\n{\n    NSUInteger length = [data length];\n    while (YES) {\n        NSInteger totalNumberOfBytesWritten = 0;\n        if ([self.outputStream hasSpaceAvailable]) {\n            const uint8_t *dataBuffer = (uint8_t *)[data bytes];\n\n            NSInteger numberOfBytesWritten = 0;\n            while (totalNumberOfBytesWritten < (NSInteger)length) {\n                numberOfBytesWritten = [self.outputStream write:&dataBuffer[(NSUInteger)totalNumberOfBytesWritten] maxLength:(length - (NSUInteger)totalNumberOfBytesWritten)];\n                if (numberOfBytesWritten == -1) {\n                    break;\n                }\n\n                totalNumberOfBytesWritten += numberOfBytesWritten;\n            }\n\n            break;\n        }\n\n        if (self.outputStream.streamError) {\n            [self.connection cancel];\n            [self performSelector:@selector(connection:didFailWithError:) withObject:self.connection withObject:self.outputStream.streamError];\n            return;\n        }\n    }\n\n    dispatch_async(dispatch_get_main_queue(), ^{\n        self.totalBytesRead += (long long)length;\n\n        if (self.downloadProgress) {\n            self.downloadProgress(length, self.totalBytesRead, self.response.expectedContentLength);\n        }\n    });\n}\n\n- (void)connectionDidFinishLoading:(NSURLConnection __unused *)connection {\n    self.responseData = [self.outputStream propertyForKey:NSStreamDataWrittenToMemoryStreamKey];\n\n    [self.outputStream close];\n    if (self.responseData) {\n       self.outputStream = nil;\n    }\n\n    self.connection = nil;\n\n    [self finish];\n}\n\n- (void)connection:(NSURLConnection __unused *)connection\n  didFailWithError:(NSError *)error\n{\n    self.error = error;\n\n    [self.outputStream close];\n    if (self.responseData) {\n        self.outputStream = nil;\n    }\n\n    self.connection = nil;\n\n    [self finish];\n}\n\n- (NSCachedURLResponse *)connection:(NSURLConnection *)connection\n                  willCacheResponse:(NSCachedURLResponse *)cachedResponse\n{\n    if (self.cacheResponse) {\n        return self.cacheResponse(connection, cachedResponse);\n    } else {\n        if ([self isCancelled]) {\n            return nil;\n        }\n\n        return cachedResponse;\n    }\n}\n\n#pragma mark - NSSecureCoding\n\n+ (BOOL)supportsSecureCoding {\n    return YES;\n}\n\n- (id)initWithCoder:(NSCoder *)decoder {\n    NSURLRequest *request = [decoder decodeObjectOfClass:[NSURLRequest class] forKey:NSStringFromSelector(@selector(request))];\n\n    self = [self initWithRequest:request];\n    if (!self) {\n        return nil;\n    }\n\n    self.state = [[decoder decodeObjectOfClass:[NSNumber class] forKey:NSStringFromSelector(@selector(state))] integerValue];\n    self.response = [decoder decodeObjectOfClass:[NSHTTPURLResponse class] forKey:NSStringFromSelector(@selector(response))];\n    self.error = [decoder decodeObjectOfClass:[NSError class] forKey:NSStringFromSelector(@selector(error))];\n    self.responseData = [decoder decodeObjectOfClass:[NSData class] forKey:NSStringFromSelector(@selector(responseData))];\n    self.totalBytesRead = [[decoder decodeObjectOfClass:[NSNumber class] forKey:NSStringFromSelector(@selector(totalBytesRead))] longLongValue];\n\n    return self;\n}\n\n- (void)encodeWithCoder:(NSCoder *)coder {\n    [self pause];\n\n    [coder encodeObject:self.request forKey:NSStringFromSelector(@selector(request))];\n\n    switch (self.state) {\n        case AFOperationExecutingState:\n        case AFOperationPausedState:\n            [coder encodeInteger:AFOperationReadyState forKey:NSStringFromSelector(@selector(state))];\n            break;\n        default:\n            [coder encodeInteger:self.state forKey:NSStringFromSelector(@selector(state))];\n            break;\n    }\n\n    [coder encodeObject:self.response forKey:NSStringFromSelector(@selector(response))];\n    [coder encodeObject:self.error forKey:NSStringFromSelector(@selector(error))];\n    [coder encodeObject:self.responseData forKey:NSStringFromSelector(@selector(responseData))];\n    [coder encodeInt64:self.totalBytesRead forKey:NSStringFromSelector(@selector(totalBytesRead))];\n}\n\n#pragma mark - NSCopying\n\n- (id)copyWithZone:(NSZone *)zone {\n    AFURLConnectionOperation *operation = [(AFURLConnectionOperation *)[[self class] allocWithZone:zone] initWithRequest:self.request];\n\n    operation.uploadProgress = self.uploadProgress;\n    operation.downloadProgress = self.downloadProgress;\n    operation.authenticationChallenge = self.authenticationChallenge;\n    operation.cacheResponse = self.cacheResponse;\n    operation.redirectResponse = self.redirectResponse;\n    operation.completionQueue = self.completionQueue;\n    operation.completionGroup = self.completionGroup;\n\n    return operation;\n}\n\n@end\n"
  },
  {
    "path": "Pods/AFNetworking/AFNetworking/AFURLRequestSerialization.h",
    "content": "// AFURLRequestSerialization.h\n//\n// Copyright (c) 2013-2015 AFNetworking (http://afnetworking.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\n#import <Foundation/Foundation.h>\n#if defined(__IPHONE_OS_VERSION_MIN_REQUIRED)\n#import <UIKit/UIKit.h>\n#endif\n\n/**\n The `AFURLRequestSerialization` protocol is adopted by an object that encodes parameters for a specified HTTP requests. Request serializers may encode parameters as query strings, HTTP bodies, setting the appropriate HTTP header fields as necessary.\n\n For example, a JSON request serializer may set the HTTP body of the request to a JSON representation, and set the `Content-Type` HTTP header field value to `application/json`.\n */\n@protocol AFURLRequestSerialization <NSObject, NSSecureCoding, NSCopying>\n\n/**\n Returns a request with the specified parameters encoded into a copy of the original request.\n\n @param request The original request.\n @param parameters The parameters to be encoded.\n @param error The error that occurred while attempting to encode the request parameters.\n\n @return A serialized request.\n */\n- (NSURLRequest *)requestBySerializingRequest:(NSURLRequest *)request\n                               withParameters:(id)parameters\n                                        error:(NSError * __autoreleasing *)error;\n\n@end\n\n#pragma mark -\n\n/**\n\n */\ntypedef NS_ENUM(NSUInteger, AFHTTPRequestQueryStringSerializationStyle) {\n    AFHTTPRequestQueryStringDefaultStyle = 0,\n};\n\n@protocol AFMultipartFormData;\n\n/**\n `AFHTTPRequestSerializer` conforms to the `AFURLRequestSerialization` & `AFURLResponseSerialization` protocols, offering a concrete base implementation of query string / URL form-encoded parameter serialization and default request headers, as well as response status code and content type validation.\n\n Any request or response serializer dealing with HTTP is encouraged to subclass `AFHTTPRequestSerializer` in order to ensure consistent default behavior.\n */\n@interface AFHTTPRequestSerializer : NSObject <AFURLRequestSerialization>\n\n/**\n The string encoding used to serialize parameters. `NSUTF8StringEncoding` by default.\n */\n@property (nonatomic, assign) NSStringEncoding stringEncoding;\n\n/**\n Whether created requests can use the device’s cellular radio (if present). `YES` by default.\n\n @see NSMutableURLRequest -setAllowsCellularAccess:\n */\n@property (nonatomic, assign) BOOL allowsCellularAccess;\n\n/**\n The cache policy of created requests. `NSURLRequestUseProtocolCachePolicy` by default.\n\n @see NSMutableURLRequest -setCachePolicy:\n */\n@property (nonatomic, assign) NSURLRequestCachePolicy cachePolicy;\n\n/**\n Whether created requests should use the default cookie handling. `YES` by default.\n\n @see NSMutableURLRequest -setHTTPShouldHandleCookies:\n */\n@property (nonatomic, assign) BOOL HTTPShouldHandleCookies;\n\n/**\n Whether created requests can continue transmitting data before receiving a response from an earlier transmission. `NO` by default\n\n @see NSMutableURLRequest -setHTTPShouldUsePipelining:\n */\n@property (nonatomic, assign) BOOL HTTPShouldUsePipelining;\n\n/**\n The network service type for created requests. `NSURLNetworkServiceTypeDefault` by default.\n\n @see NSMutableURLRequest -setNetworkServiceType:\n */\n@property (nonatomic, assign) NSURLRequestNetworkServiceType networkServiceType;\n\n/**\n The timeout interval, in seconds, for created requests. The default timeout interval is 60 seconds.\n\n @see NSMutableURLRequest -setTimeoutInterval:\n */\n@property (nonatomic, assign) NSTimeInterval timeoutInterval;\n\n///---------------------------------------\n/// @name Configuring HTTP Request Headers\n///---------------------------------------\n\n/**\n Default HTTP header field values to be applied to serialized requests. By default, these include the following:\n \n - `Accept-Language` with the contents of `NSLocale +preferredLanguages`\n - `User-Agent` with the contents of various bundle identifiers and OS designations\n \n @discussion To add or remove default request headers, use `setValue:forHTTPHeaderField:`.\n */\n@property (readonly, nonatomic, strong) NSDictionary *HTTPRequestHeaders;\n\n/**\n Creates and returns a serializer with default configuration.\n */\n+ (instancetype)serializer;\n\n/**\n Sets the value for the HTTP headers set in request objects made by the HTTP client. If `nil`, removes the existing value for that header.\n\n @param field The HTTP header to set a default value for\n @param value The value set as default for the specified header, or `nil`\n */\n- (void)setValue:(NSString *)value\nforHTTPHeaderField:(NSString *)field;\n\n/**\n Returns the value for the HTTP headers set in the request serializer.\n\n @param field The HTTP header to retrieve the default value for\n\n @return The value set as default for the specified header, or `nil`\n */\n- (NSString *)valueForHTTPHeaderField:(NSString *)field;\n\n/**\n Sets the \"Authorization\" HTTP header set in request objects made by the HTTP client to a basic authentication value with Base64-encoded username and password. This overwrites any existing value for this header.\n\n @param username The HTTP basic auth username\n @param password The HTTP basic auth password\n */\n- (void)setAuthorizationHeaderFieldWithUsername:(NSString *)username\n                                       password:(NSString *)password;\n\n/**\n @deprecated This method has been deprecated. Use -setValue:forHTTPHeaderField: instead.\n */\n- (void)setAuthorizationHeaderFieldWithToken:(NSString *)token DEPRECATED_ATTRIBUTE;\n\n\n/**\n Clears any existing value for the \"Authorization\" HTTP header.\n */\n- (void)clearAuthorizationHeader;\n\n///-------------------------------------------------------\n/// @name Configuring Query String Parameter Serialization\n///-------------------------------------------------------\n\n/**\n HTTP methods for which serialized requests will encode parameters as a query string. `GET`, `HEAD`, and `DELETE` by default.\n */\n@property (nonatomic, strong) NSSet *HTTPMethodsEncodingParametersInURI;\n\n/**\n Set the method of query string serialization according to one of the pre-defined styles.\n\n @param style The serialization style.\n\n @see AFHTTPRequestQueryStringSerializationStyle\n */\n- (void)setQueryStringSerializationWithStyle:(AFHTTPRequestQueryStringSerializationStyle)style;\n\n/**\n Set the a custom method of query string serialization according to the specified block.\n\n @param block A block that defines a process of encoding parameters into a query string. This block returns the query string and takes three arguments: the request, the parameters to encode, and the error that occurred when attempting to encode parameters for the given request.\n */\n- (void)setQueryStringSerializationWithBlock:(NSString * (^)(NSURLRequest *request, id parameters, NSError * __autoreleasing *error))block;\n\n///-------------------------------\n/// @name Creating Request Objects\n///-------------------------------\n\n/**\n @deprecated This method has been deprecated. Use -requestWithMethod:URLString:parameters:error: instead.\n */\n- (NSMutableURLRequest *)requestWithMethod:(NSString *)method\n                                 URLString:(NSString *)URLString\n                                parameters:(id)parameters DEPRECATED_ATTRIBUTE;\n\n/**\n Creates an `NSMutableURLRequest` object with the specified HTTP method and URL string.\n\n If the HTTP method is `GET`, `HEAD`, or `DELETE`, the parameters will be used to construct a url-encoded query string that is appended to the request's URL. Otherwise, the parameters will be encoded according to the value of the `parameterEncoding` property, and set as the request body.\n\n @param method The HTTP method for the request, such as `GET`, `POST`, `PUT`, or `DELETE`. This parameter must not be `nil`.\n @param URLString The URL string used to create the request URL.\n @param parameters The parameters to be either set as a query string for `GET` requests, or the request HTTP body.\n @param error The error that occured while constructing the request.\n\n @return An `NSMutableURLRequest` object.\n */\n- (NSMutableURLRequest *)requestWithMethod:(NSString *)method\n                                 URLString:(NSString *)URLString\n                                parameters:(id)parameters\n                                     error:(NSError * __autoreleasing *)error;\n\n/**\n @deprecated This method has been deprecated. Use -multipartFormRequestWithMethod:URLString:parameters:constructingBodyWithBlock:error: instead.\n */\n- (NSMutableURLRequest *)multipartFormRequestWithMethod:(NSString *)method\n                                              URLString:(NSString *)URLString\n                                             parameters:(NSDictionary *)parameters\n                              constructingBodyWithBlock:(void (^)(id <AFMultipartFormData> formData))block DEPRECATED_ATTRIBUTE;\n\n/**\n Creates an `NSMutableURLRequest` object with the specified HTTP method and URLString, and constructs a `multipart/form-data` HTTP body, using the specified parameters and multipart form data block. See http://www.w3.org/TR/html4/interact/forms.html#h-17.13.4.2\n\n Multipart form requests are automatically streamed, reading files directly from disk along with in-memory data in a single HTTP body. The resulting `NSMutableURLRequest` object has an `HTTPBodyStream` property, so refrain from setting `HTTPBodyStream` or `HTTPBody` on this request object, as it will clear out the multipart form body stream.\n\n @param method The HTTP method for the request. This parameter must not be `GET` or `HEAD`, or `nil`.\n @param URLString The URL string used to create the request URL.\n @param parameters The parameters to be encoded and set in the request HTTP body.\n @param block A block that takes a single argument and appends data to the HTTP body. The block argument is an object adopting the `AFMultipartFormData` protocol.\n @param error The error that occured while constructing the request.\n\n @return An `NSMutableURLRequest` object\n */\n- (NSMutableURLRequest *)multipartFormRequestWithMethod:(NSString *)method\n                                              URLString:(NSString *)URLString\n                                             parameters:(NSDictionary *)parameters\n                              constructingBodyWithBlock:(void (^)(id <AFMultipartFormData> formData))block\n                                                  error:(NSError * __autoreleasing *)error;\n\n/**\n Creates an `NSMutableURLRequest` by removing the `HTTPBodyStream` from a request, and asynchronously writing its contents into the specified file, invoking the completion handler when finished.\n\n @param request The multipart form request. The `HTTPBodyStream` property of `request` must not be `nil`.\n @param fileURL The file URL to write multipart form contents to.\n @param handler A handler block to execute.\n\n @discussion There is a bug in `NSURLSessionTask` that causes requests to not send a `Content-Length` header when streaming contents from an HTTP body, which is notably problematic when interacting with the Amazon S3 webservice. As a workaround, this method takes a request constructed with `multipartFormRequestWithMethod:URLString:parameters:constructingBodyWithBlock:error:`, or any other request with an `HTTPBodyStream`, writes the contents to the specified file and returns a copy of the original request with the `HTTPBodyStream` property set to `nil`. From here, the file can either be passed to `AFURLSessionManager -uploadTaskWithRequest:fromFile:progress:completionHandler:`, or have its contents read into an `NSData` that's assigned to the `HTTPBody` property of the request.\n\n @see https://github.com/AFNetworking/AFNetworking/issues/1398\n */\n- (NSMutableURLRequest *)requestWithMultipartFormRequest:(NSURLRequest *)request\n                             writingStreamContentsToFile:(NSURL *)fileURL\n                                       completionHandler:(void (^)(NSError *error))handler;\n\n@end\n\n#pragma mark -\n\n/**\n The `AFMultipartFormData` protocol defines the methods supported by the parameter in the block argument of `AFHTTPRequestSerializer -multipartFormRequestWithMethod:URLString:parameters:constructingBodyWithBlock:`.\n */\n@protocol AFMultipartFormData\n\n/**\n Appends the HTTP header `Content-Disposition: file; filename=#{generated filename}; name=#{name}\"` and `Content-Type: #{generated mimeType}`, followed by the encoded file data and the multipart form boundary.\n\n The filename and MIME type for this data in the form will be automatically generated, using the last path component of the `fileURL` and system associated MIME type for the `fileURL` extension, respectively.\n\n @param fileURL The URL corresponding to the file whose content will be appended to the form. This parameter must not be `nil`.\n @param name The name to be associated with the specified data. This parameter must not be `nil`.\n @param error If an error occurs, upon return contains an `NSError` object that describes the problem.\n\n @return `YES` if the file data was successfully appended, otherwise `NO`.\n */\n- (BOOL)appendPartWithFileURL:(NSURL *)fileURL\n                         name:(NSString *)name\n                        error:(NSError * __autoreleasing *)error;\n\n/**\n Appends the HTTP header `Content-Disposition: file; filename=#{filename}; name=#{name}\"` and `Content-Type: #{mimeType}`, followed by the encoded file data and the multipart form boundary.\n\n @param fileURL The URL corresponding to the file whose content will be appended to the form. This parameter must not be `nil`.\n @param name The name to be associated with the specified data. This parameter must not be `nil`.\n @param fileName The file name to be used in the `Content-Disposition` header. This parameter must not be `nil`.\n @param mimeType The declared MIME type of the file data. This parameter must not be `nil`.\n @param error If an error occurs, upon return contains an `NSError` object that describes the problem.\n\n @return `YES` if the file data was successfully appended otherwise `NO`.\n */\n- (BOOL)appendPartWithFileURL:(NSURL *)fileURL\n                         name:(NSString *)name\n                     fileName:(NSString *)fileName\n                     mimeType:(NSString *)mimeType\n                        error:(NSError * __autoreleasing *)error;\n\n/**\n Appends the HTTP header `Content-Disposition: file; filename=#{filename}; name=#{name}\"` and `Content-Type: #{mimeType}`, followed by the data from the input stream and the multipart form boundary.\n\n @param inputStream The input stream to be appended to the form data\n @param name The name to be associated with the specified input stream. This parameter must not be `nil`.\n @param fileName The filename to be associated with the specified input stream. This parameter must not be `nil`.\n @param length The length of the specified input stream in bytes.\n @param mimeType The MIME type of the specified data. (For example, the MIME type for a JPEG image is image/jpeg.) For a list of valid MIME types, see http://www.iana.org/assignments/media-types/. This parameter must not be `nil`.\n */\n- (void)appendPartWithInputStream:(NSInputStream *)inputStream\n                             name:(NSString *)name\n                         fileName:(NSString *)fileName\n                           length:(int64_t)length\n                         mimeType:(NSString *)mimeType;\n\n/**\n Appends the HTTP header `Content-Disposition: file; filename=#{filename}; name=#{name}\"` and `Content-Type: #{mimeType}`, followed by the encoded file data and the multipart form boundary.\n\n @param data The data to be encoded and appended to the form data.\n @param name The name to be associated with the specified data. This parameter must not be `nil`.\n @param fileName The filename to be associated with the specified data. This parameter must not be `nil`.\n @param mimeType The MIME type of the specified data. (For example, the MIME type for a JPEG image is image/jpeg.) For a list of valid MIME types, see http://www.iana.org/assignments/media-types/. This parameter must not be `nil`.\n */\n- (void)appendPartWithFileData:(NSData *)data\n                          name:(NSString *)name\n                      fileName:(NSString *)fileName\n                      mimeType:(NSString *)mimeType;\n\n/**\n Appends the HTTP headers `Content-Disposition: form-data; name=#{name}\"`, followed by the encoded data and the multipart form boundary.\n\n @param data The data to be encoded and appended to the form data.\n @param name The name to be associated with the specified data. This parameter must not be `nil`.\n */\n\n- (void)appendPartWithFormData:(NSData *)data\n                          name:(NSString *)name;\n\n\n/**\n Appends HTTP headers, followed by the encoded data and the multipart form boundary.\n\n @param headers The HTTP headers to be appended to the form data.\n @param body The data to be encoded and appended to the form data. This parameter must not be `nil`.\n */\n- (void)appendPartWithHeaders:(NSDictionary *)headers\n                         body:(NSData *)body;\n\n/**\n Throttles request bandwidth by limiting the packet size and adding a delay for each chunk read from the upload stream.\n\n When uploading over a 3G or EDGE connection, requests may fail with \"request body stream exhausted\". Setting a maximum packet size and delay according to the recommended values (`kAFUploadStream3GSuggestedPacketSize` and `kAFUploadStream3GSuggestedDelay`) lowers the risk of the input stream exceeding its allocated bandwidth. Unfortunately, there is no definite way to distinguish between a 3G, EDGE, or LTE connection over `NSURLConnection`. As such, it is not recommended that you throttle bandwidth based solely on network reachability. Instead, you should consider checking for the \"request body stream exhausted\" in a failure block, and then retrying the request with throttled bandwidth.\n\n @param numberOfBytes Maximum packet size, in number of bytes. The default packet size for an input stream is 16kb.\n @param delay Duration of delay each time a packet is read. By default, no delay is set.\n */\n- (void)throttleBandwidthWithPacketSize:(NSUInteger)numberOfBytes\n                                  delay:(NSTimeInterval)delay;\n\n@end\n\n#pragma mark -\n\n/**\n `AFJSONRequestSerializer` is a subclass of `AFHTTPRequestSerializer` that encodes parameters as JSON using `NSJSONSerialization`, setting the `Content-Type` of the encoded request to `application/json`.\n */\n@interface AFJSONRequestSerializer : AFHTTPRequestSerializer\n\n/**\n Options for writing the request JSON data from Foundation objects. For possible values, see the `NSJSONSerialization` documentation section \"NSJSONWritingOptions\". `0` by default.\n */\n@property (nonatomic, assign) NSJSONWritingOptions writingOptions;\n\n/**\n Creates and returns a JSON serializer with specified reading and writing options.\n\n @param writingOptions The specified JSON writing options.\n */\n+ (instancetype)serializerWithWritingOptions:(NSJSONWritingOptions)writingOptions;\n\n@end\n\n#pragma mark -\n\n/**\n `AFPropertyListRequestSerializer` is a subclass of `AFHTTPRequestSerializer` that encodes parameters as JSON using `NSPropertyListSerializer`, setting the `Content-Type` of the encoded request to `application/x-plist`.\n */\n@interface AFPropertyListRequestSerializer : AFHTTPRequestSerializer\n\n/**\n The property list format. Possible values are described in \"NSPropertyListFormat\".\n */\n@property (nonatomic, assign) NSPropertyListFormat format;\n\n/**\n @warning The `writeOptions` property is currently unused.\n */\n@property (nonatomic, assign) NSPropertyListWriteOptions writeOptions;\n\n/**\n Creates and returns a property list serializer with a specified format, read options, and write options.\n\n @param format The property list format.\n @param writeOptions The property list write options.\n\n @warning The `writeOptions` property is currently unused.\n */\n+ (instancetype)serializerWithFormat:(NSPropertyListFormat)format\n                        writeOptions:(NSPropertyListWriteOptions)writeOptions;\n\n@end\n\n#pragma mark -\n\n///----------------\n/// @name Constants\n///----------------\n\n/**\n ## Error Domains\n\n The following error domain is predefined.\n\n - `NSString * const AFURLRequestSerializationErrorDomain`\n\n ### Constants\n\n `AFURLRequestSerializationErrorDomain`\n AFURLRequestSerializer errors. Error codes for `AFURLRequestSerializationErrorDomain` correspond to codes in `NSURLErrorDomain`.\n */\nextern NSString * const AFURLRequestSerializationErrorDomain;\n\n/**\n ## User info dictionary keys\n\n These keys may exist in the user info dictionary, in addition to those defined for NSError.\n\n - `NSString * const AFNetworkingOperationFailingURLRequestErrorKey`\n\n ### Constants\n\n `AFNetworkingOperationFailingURLRequestErrorKey`\n The corresponding value is an `NSURLRequest` containing the request of the operation associated with an error. This key is only present in the `AFURLRequestSerializationErrorDomain`.\n */\nextern NSString * const AFNetworkingOperationFailingURLRequestErrorKey;\n\n/**\n ## Throttling Bandwidth for HTTP Request Input Streams\n\n @see -throttleBandwidthWithPacketSize:delay:\n\n ### Constants\n\n `kAFUploadStream3GSuggestedPacketSize`\n Maximum packet size, in number of bytes. Equal to 16kb.\n\n `kAFUploadStream3GSuggestedDelay`\n Duration of delay each time a packet is read. Equal to 0.2 seconds.\n */\nextern NSUInteger const kAFUploadStream3GSuggestedPacketSize;\nextern NSTimeInterval const kAFUploadStream3GSuggestedDelay;\n"
  },
  {
    "path": "Pods/AFNetworking/AFNetworking/AFURLRequestSerialization.m",
    "content": "// AFURLRequestSerialization.m\n//\n// Copyright (c) 2013-2015 AFNetworking (http://afnetworking.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\n#import \"AFURLRequestSerialization.h\"\n\n#if __IPHONE_OS_VERSION_MIN_REQUIRED\n#import <MobileCoreServices/MobileCoreServices.h>\n#else\n#import <CoreServices/CoreServices.h>\n#endif\n\nNSString * const AFURLRequestSerializationErrorDomain = @\"com.alamofire.error.serialization.request\";\nNSString * const AFNetworkingOperationFailingURLRequestErrorKey = @\"com.alamofire.serialization.request.error.response\";\n\ntypedef NSString * (^AFQueryStringSerializationBlock)(NSURLRequest *request, id parameters, NSError *__autoreleasing *error);\n\nstatic NSString * AFBase64EncodedStringFromString(NSString *string) {\n    NSData *data = [NSData dataWithBytes:[string UTF8String] length:[string lengthOfBytesUsingEncoding:NSUTF8StringEncoding]];\n    NSUInteger length = [data length];\n    NSMutableData *mutableData = [NSMutableData dataWithLength:((length + 2) / 3) * 4];\n\n    uint8_t *input = (uint8_t *)[data bytes];\n    uint8_t *output = (uint8_t *)[mutableData mutableBytes];\n\n    for (NSUInteger i = 0; i < length; i += 3) {\n        NSUInteger value = 0;\n        for (NSUInteger j = i; j < (i + 3); j++) {\n            value <<= 8;\n            if (j < length) {\n                value |= (0xFF & input[j]);\n            }\n        }\n\n        static uint8_t const kAFBase64EncodingTable[] = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\";\n\n        NSUInteger idx = (i / 3) * 4;\n        output[idx + 0] = kAFBase64EncodingTable[(value >> 18) & 0x3F];\n        output[idx + 1] = kAFBase64EncodingTable[(value >> 12) & 0x3F];\n        output[idx + 2] = (i + 1) < length ? kAFBase64EncodingTable[(value >> 6)  & 0x3F] : '=';\n        output[idx + 3] = (i + 2) < length ? kAFBase64EncodingTable[(value >> 0)  & 0x3F] : '=';\n    }\n\n    return [[NSString alloc] initWithData:mutableData encoding:NSASCIIStringEncoding];\n}\n\nstatic NSString * const kAFCharactersToBeEscapedInQueryString = @\":/?&=;+!@#$()',*\";\n\nstatic NSString * AFPercentEscapedQueryStringKeyFromStringWithEncoding(NSString *string, NSStringEncoding encoding) {\n    static NSString * const kAFCharactersToLeaveUnescapedInQueryStringPairKey = @\"[].\";\n\n\treturn (__bridge_transfer  NSString *)CFURLCreateStringByAddingPercentEscapes(kCFAllocatorDefault, (__bridge CFStringRef)string, (__bridge CFStringRef)kAFCharactersToLeaveUnescapedInQueryStringPairKey, (__bridge CFStringRef)kAFCharactersToBeEscapedInQueryString, CFStringConvertNSStringEncodingToEncoding(encoding));\n}\n\nstatic NSString * AFPercentEscapedQueryStringValueFromStringWithEncoding(NSString *string, NSStringEncoding encoding) {\n\treturn (__bridge_transfer  NSString *)CFURLCreateStringByAddingPercentEscapes(kCFAllocatorDefault, (__bridge CFStringRef)string, NULL, (__bridge CFStringRef)kAFCharactersToBeEscapedInQueryString, CFStringConvertNSStringEncodingToEncoding(encoding));\n}\n\n#pragma mark -\n\n@interface AFQueryStringPair : NSObject\n@property (readwrite, nonatomic, strong) id field;\n@property (readwrite, nonatomic, strong) id value;\n\n- (id)initWithField:(id)field value:(id)value;\n\n- (NSString *)URLEncodedStringValueWithEncoding:(NSStringEncoding)stringEncoding;\n@end\n\n@implementation AFQueryStringPair\n\n- (id)initWithField:(id)field value:(id)value {\n    self = [super init];\n    if (!self) {\n        return nil;\n    }\n\n    self.field = field;\n    self.value = value;\n\n    return self;\n}\n\n- (NSString *)URLEncodedStringValueWithEncoding:(NSStringEncoding)stringEncoding {\n    if (!self.value || [self.value isEqual:[NSNull null]]) {\n        return AFPercentEscapedQueryStringKeyFromStringWithEncoding([self.field description], stringEncoding);\n    } else {\n        return [NSString stringWithFormat:@\"%@=%@\", AFPercentEscapedQueryStringKeyFromStringWithEncoding([self.field description], stringEncoding), AFPercentEscapedQueryStringValueFromStringWithEncoding([self.value description], stringEncoding)];\n    }\n}\n\n@end\n\n#pragma mark -\n\nextern NSArray * AFQueryStringPairsFromDictionary(NSDictionary *dictionary);\nextern NSArray * AFQueryStringPairsFromKeyAndValue(NSString *key, id value);\n\nstatic NSString * AFQueryStringFromParametersWithEncoding(NSDictionary *parameters, NSStringEncoding stringEncoding) {\n    NSMutableArray *mutablePairs = [NSMutableArray array];\n    for (AFQueryStringPair *pair in AFQueryStringPairsFromDictionary(parameters)) {\n        [mutablePairs addObject:[pair URLEncodedStringValueWithEncoding:stringEncoding]];\n    }\n\n    return [mutablePairs componentsJoinedByString:@\"&\"];\n}\n\nNSArray * AFQueryStringPairsFromDictionary(NSDictionary *dictionary) {\n    return AFQueryStringPairsFromKeyAndValue(nil, dictionary);\n}\n\nNSArray * AFQueryStringPairsFromKeyAndValue(NSString *key, id value) {\n    NSMutableArray *mutableQueryStringComponents = [NSMutableArray array];\n\n    NSSortDescriptor *sortDescriptor = [NSSortDescriptor sortDescriptorWithKey:@\"description\" ascending:YES selector:@selector(compare:)];\n\n    if ([value isKindOfClass:[NSDictionary class]]) {\n        NSDictionary *dictionary = value;\n        // Sort dictionary keys to ensure consistent ordering in query string, which is important when deserializing potentially ambiguous sequences, such as an array of dictionaries\n        for (id nestedKey in [dictionary.allKeys sortedArrayUsingDescriptors:@[ sortDescriptor ]]) {\n            id nestedValue = [dictionary objectForKey:nestedKey];\n            if (nestedValue) {\n                [mutableQueryStringComponents addObjectsFromArray:AFQueryStringPairsFromKeyAndValue((key ? [NSString stringWithFormat:@\"%@[%@]\", key, nestedKey] : nestedKey), nestedValue)];\n            }\n        }\n    } else if ([value isKindOfClass:[NSArray class]]) {\n        NSArray *array = value;\n        for (id nestedValue in array) {\n            [mutableQueryStringComponents addObjectsFromArray:AFQueryStringPairsFromKeyAndValue([NSString stringWithFormat:@\"%@[]\", key], nestedValue)];\n        }\n    } else if ([value isKindOfClass:[NSSet class]]) {\n        NSSet *set = value;\n        for (id obj in [set sortedArrayUsingDescriptors:@[ sortDescriptor ]]) {\n            [mutableQueryStringComponents addObjectsFromArray:AFQueryStringPairsFromKeyAndValue(key, obj)];\n        }\n    } else {\n        [mutableQueryStringComponents addObject:[[AFQueryStringPair alloc] initWithField:key value:value]];\n    }\n\n    return mutableQueryStringComponents;\n}\n\n#pragma mark -\n\n@interface AFStreamingMultipartFormData : NSObject <AFMultipartFormData>\n- (instancetype)initWithURLRequest:(NSMutableURLRequest *)urlRequest\n                    stringEncoding:(NSStringEncoding)encoding;\n\n- (NSMutableURLRequest *)requestByFinalizingMultipartFormData;\n@end\n\n#pragma mark -\n\nstatic NSArray * AFHTTPRequestSerializerObservedKeyPaths() {\n    static NSArray *_AFHTTPRequestSerializerObservedKeyPaths = nil;\n    static dispatch_once_t onceToken;\n    dispatch_once(&onceToken, ^{\n        _AFHTTPRequestSerializerObservedKeyPaths = @[NSStringFromSelector(@selector(allowsCellularAccess)), NSStringFromSelector(@selector(cachePolicy)), NSStringFromSelector(@selector(HTTPShouldHandleCookies)), NSStringFromSelector(@selector(HTTPShouldUsePipelining)), NSStringFromSelector(@selector(networkServiceType)), NSStringFromSelector(@selector(timeoutInterval))];\n    });\n\n    return _AFHTTPRequestSerializerObservedKeyPaths;\n}\n\nstatic void *AFHTTPRequestSerializerObserverContext = &AFHTTPRequestSerializerObserverContext;\n\n@interface AFHTTPRequestSerializer ()\n@property (readwrite, nonatomic, strong) NSMutableSet *mutableObservedChangedKeyPaths;\n@property (readwrite, nonatomic, strong) NSMutableDictionary *mutableHTTPRequestHeaders;\n@property (readwrite, nonatomic, assign) AFHTTPRequestQueryStringSerializationStyle queryStringSerializationStyle;\n@property (readwrite, nonatomic, copy) AFQueryStringSerializationBlock queryStringSerialization;\n@end\n\n@implementation AFHTTPRequestSerializer\n\n+ (instancetype)serializer {\n    return [[self alloc] init];\n}\n\n- (instancetype)init {\n    self = [super init];\n    if (!self) {\n        return nil;\n    }\n\n    self.stringEncoding = NSUTF8StringEncoding;\n\n    self.mutableHTTPRequestHeaders = [NSMutableDictionary dictionary];\n\n    // Accept-Language HTTP Header; see http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.4\n    NSMutableArray *acceptLanguagesComponents = [NSMutableArray array];\n    [[NSLocale preferredLanguages] enumerateObjectsUsingBlock:^(id obj, NSUInteger idx, BOOL *stop) {\n        float q = 1.0f - (idx * 0.1f);\n        [acceptLanguagesComponents addObject:[NSString stringWithFormat:@\"%@;q=%0.1g\", obj, q]];\n        *stop = q <= 0.5f;\n    }];\n    [self setValue:[acceptLanguagesComponents componentsJoinedByString:@\", \"] forHTTPHeaderField:@\"Accept-Language\"];\n\n    NSString *userAgent = nil;\n#pragma clang diagnostic push\n#pragma clang diagnostic ignored \"-Wgnu\"\n#if defined(__IPHONE_OS_VERSION_MIN_REQUIRED)\n    // User-Agent Header; see http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.43\n    userAgent = [NSString stringWithFormat:@\"%@/%@ (%@; iOS %@; Scale/%0.2f)\", [[[NSBundle mainBundle] infoDictionary] objectForKey:(__bridge NSString *)kCFBundleExecutableKey] ?: [[[NSBundle mainBundle] infoDictionary] objectForKey:(__bridge NSString *)kCFBundleIdentifierKey], [[[NSBundle mainBundle] infoDictionary] objectForKey:@\"CFBundleShortVersionString\"] ?: [[[NSBundle mainBundle] infoDictionary] objectForKey:(__bridge NSString *)kCFBundleVersionKey], [[UIDevice currentDevice] model], [[UIDevice currentDevice] systemVersion], [[UIScreen mainScreen] scale]];\n#elif defined(__MAC_OS_X_VERSION_MIN_REQUIRED)\n    userAgent = [NSString stringWithFormat:@\"%@/%@ (Mac OS X %@)\", [[[NSBundle mainBundle] infoDictionary] objectForKey:(__bridge NSString *)kCFBundleExecutableKey] ?: [[[NSBundle mainBundle] infoDictionary] objectForKey:(__bridge NSString *)kCFBundleIdentifierKey], [[[NSBundle mainBundle] infoDictionary] objectForKey:@\"CFBundleShortVersionString\"] ?: [[[NSBundle mainBundle] infoDictionary] objectForKey:(__bridge NSString *)kCFBundleVersionKey], [[NSProcessInfo processInfo] operatingSystemVersionString]];\n#endif\n#pragma clang diagnostic pop\n    if (userAgent) {\n        if (![userAgent canBeConvertedToEncoding:NSASCIIStringEncoding]) {\n            NSMutableString *mutableUserAgent = [userAgent mutableCopy];\n            if (CFStringTransform((__bridge CFMutableStringRef)(mutableUserAgent), NULL, (__bridge CFStringRef)@\"Any-Latin; Latin-ASCII; [:^ASCII:] Remove\", false)) {\n                userAgent = mutableUserAgent;\n            }\n        }\n        [self setValue:userAgent forHTTPHeaderField:@\"User-Agent\"];\n    }\n\n    // HTTP Method Definitions; see http://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html\n    self.HTTPMethodsEncodingParametersInURI = [NSSet setWithObjects:@\"GET\", @\"HEAD\", @\"DELETE\", nil];\n\n    self.mutableObservedChangedKeyPaths = [NSMutableSet set];\n    for (NSString *keyPath in AFHTTPRequestSerializerObservedKeyPaths()) {\n        if ([self respondsToSelector:NSSelectorFromString(keyPath)]) {\n            [self addObserver:self forKeyPath:keyPath options:NSKeyValueObservingOptionNew context:AFHTTPRequestSerializerObserverContext];\n        }\n    }\n\n    return self;\n}\n\n- (void)dealloc {\n    for (NSString *keyPath in AFHTTPRequestSerializerObservedKeyPaths()) {\n        if ([self respondsToSelector:NSSelectorFromString(keyPath)]) {\n            [self removeObserver:self forKeyPath:keyPath context:AFHTTPRequestSerializerObserverContext];\n        }\n    }\n}\n\n#pragma mark -\n\n// Workarounds for crashing behavior using Key-Value Observing with XCTest\n// See https://github.com/AFNetworking/AFNetworking/issues/2523\n\n- (void)setAllowsCellularAccess:(BOOL)allowsCellularAccess {\n    [self willChangeValueForKey:NSStringFromSelector(@selector(allowsCellularAccess))];\n    _allowsCellularAccess = allowsCellularAccess;\n    [self didChangeValueForKey:NSStringFromSelector(@selector(allowsCellularAccess))];\n}\n\n- (void)setCachePolicy:(NSURLRequestCachePolicy)cachePolicy {\n    [self willChangeValueForKey:NSStringFromSelector(@selector(cachePolicy))];\n    _cachePolicy = cachePolicy;\n    [self didChangeValueForKey:NSStringFromSelector(@selector(cachePolicy))];\n}\n\n- (void)setHTTPShouldHandleCookies:(BOOL)HTTPShouldHandleCookies {\n    [self willChangeValueForKey:NSStringFromSelector(@selector(HTTPShouldHandleCookies))];\n    _HTTPShouldHandleCookies = HTTPShouldHandleCookies;\n    [self didChangeValueForKey:NSStringFromSelector(@selector(HTTPShouldHandleCookies))];\n}\n\n- (void)setHTTPShouldUsePipelining:(BOOL)HTTPShouldUsePipelining {\n    [self willChangeValueForKey:NSStringFromSelector(@selector(HTTPShouldUsePipelining))];\n    _HTTPShouldUsePipelining = HTTPShouldUsePipelining;\n    [self didChangeValueForKey:NSStringFromSelector(@selector(HTTPShouldUsePipelining))];\n}\n\n- (void)setNetworkServiceType:(NSURLRequestNetworkServiceType)networkServiceType {\n    [self willChangeValueForKey:NSStringFromSelector(@selector(networkServiceType))];\n    _networkServiceType = networkServiceType;\n    [self didChangeValueForKey:NSStringFromSelector(@selector(networkServiceType))];\n}\n\n- (void)setTimeoutInterval:(NSTimeInterval)timeoutInterval {\n    [self willChangeValueForKey:NSStringFromSelector(@selector(timeoutInterval))];\n    _timeoutInterval = timeoutInterval;\n    [self didChangeValueForKey:NSStringFromSelector(@selector(timeoutInterval))];\n}\n\n#pragma mark -\n\n- (NSDictionary *)HTTPRequestHeaders {\n    return [NSDictionary dictionaryWithDictionary:self.mutableHTTPRequestHeaders];\n}\n\n- (void)setValue:(NSString *)value\nforHTTPHeaderField:(NSString *)field\n{\n\t[self.mutableHTTPRequestHeaders setValue:value forKey:field];\n}\n\n- (NSString *)valueForHTTPHeaderField:(NSString *)field {\n    return [self.mutableHTTPRequestHeaders valueForKey:field];\n}\n\n- (void)setAuthorizationHeaderFieldWithUsername:(NSString *)username\n                                       password:(NSString *)password\n{\n\tNSString *basicAuthCredentials = [NSString stringWithFormat:@\"%@:%@\", username, password];\n    [self setValue:[NSString stringWithFormat:@\"Basic %@\", AFBase64EncodedStringFromString(basicAuthCredentials)] forHTTPHeaderField:@\"Authorization\"];\n}\n\n- (void)setAuthorizationHeaderFieldWithToken:(NSString *)token {\n    [self setValue:[NSString stringWithFormat:@\"Token token=\\\"%@\\\"\", token] forHTTPHeaderField:@\"Authorization\"];\n}\n\n- (void)clearAuthorizationHeader {\n\t[self.mutableHTTPRequestHeaders removeObjectForKey:@\"Authorization\"];\n}\n\n#pragma mark -\n\n- (void)setQueryStringSerializationWithStyle:(AFHTTPRequestQueryStringSerializationStyle)style {\n    self.queryStringSerializationStyle = style;\n    self.queryStringSerialization = nil;\n}\n\n- (void)setQueryStringSerializationWithBlock:(NSString *(^)(NSURLRequest *, id, NSError *__autoreleasing *))block {\n    self.queryStringSerialization = block;\n}\n\n#pragma mark -\n\n- (NSMutableURLRequest *)requestWithMethod:(NSString *)method\n                                 URLString:(NSString *)URLString\n                                parameters:(id)parameters\n{\n    return [self requestWithMethod:method URLString:URLString parameters:parameters error:nil];\n}\n\n- (NSMutableURLRequest *)requestWithMethod:(NSString *)method\n                                 URLString:(NSString *)URLString\n                                parameters:(id)parameters\n                                     error:(NSError *__autoreleasing *)error\n{\n    NSParameterAssert(method);\n    NSParameterAssert(URLString);\n\n    NSURL *url = [NSURL URLWithString:URLString];\n\n    NSParameterAssert(url);\n\n    NSMutableURLRequest *mutableRequest = [[NSMutableURLRequest alloc] initWithURL:url];\n    mutableRequest.HTTPMethod = method;\n\n    for (NSString *keyPath in AFHTTPRequestSerializerObservedKeyPaths()) {\n        if ([self.mutableObservedChangedKeyPaths containsObject:keyPath]) {\n            [mutableRequest setValue:[self valueForKeyPath:keyPath] forKey:keyPath];\n        }\n    }\n\n    mutableRequest = [[self requestBySerializingRequest:mutableRequest withParameters:parameters error:error] mutableCopy];\n\n\treturn mutableRequest;\n}\n\n- (NSMutableURLRequest *)multipartFormRequestWithMethod:(NSString *)method\n                                              URLString:(NSString *)URLString\n                                             parameters:(NSDictionary *)parameters\n                              constructingBodyWithBlock:(void (^)(id <AFMultipartFormData> formData))block\n{\n    return [self multipartFormRequestWithMethod:method URLString:URLString parameters:parameters constructingBodyWithBlock:block error:nil];\n}\n\n- (NSMutableURLRequest *)multipartFormRequestWithMethod:(NSString *)method\n                                              URLString:(NSString *)URLString\n                                             parameters:(NSDictionary *)parameters\n                              constructingBodyWithBlock:(void (^)(id <AFMultipartFormData> formData))block\n                                                  error:(NSError *__autoreleasing *)error\n{\n    NSParameterAssert(method);\n    NSParameterAssert(![method isEqualToString:@\"GET\"] && ![method isEqualToString:@\"HEAD\"]);\n\n    NSMutableURLRequest *mutableRequest = [self requestWithMethod:method URLString:URLString parameters:nil error:error];\n\n    __block AFStreamingMultipartFormData *formData = [[AFStreamingMultipartFormData alloc] initWithURLRequest:mutableRequest stringEncoding:NSUTF8StringEncoding];\n\n    if (parameters) {\n        for (AFQueryStringPair *pair in AFQueryStringPairsFromDictionary(parameters)) {\n            NSData *data = nil;\n            if ([pair.value isKindOfClass:[NSData class]]) {\n                data = pair.value;\n            } else if ([pair.value isEqual:[NSNull null]]) {\n                data = [NSData data];\n            } else {\n                data = [[pair.value description] dataUsingEncoding:self.stringEncoding];\n            }\n\n            if (data) {\n                [formData appendPartWithFormData:data name:[pair.field description]];\n            }\n        }\n    }\n\n    if (block) {\n        block(formData);\n    }\n\n    return [formData requestByFinalizingMultipartFormData];\n}\n\n- (NSMutableURLRequest *)requestWithMultipartFormRequest:(NSURLRequest *)request\n                             writingStreamContentsToFile:(NSURL *)fileURL\n                                       completionHandler:(void (^)(NSError *error))handler\n{\n    NSParameterAssert(request.HTTPBodyStream);\n    NSParameterAssert([fileURL isFileURL]);\n\n    NSInputStream *inputStream = request.HTTPBodyStream;\n    NSOutputStream *outputStream = [[NSOutputStream alloc] initWithURL:fileURL append:NO];\n    __block NSError *error = nil;\n\n    dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{\n        [inputStream scheduleInRunLoop:[NSRunLoop currentRunLoop] forMode:NSDefaultRunLoopMode];\n        [outputStream scheduleInRunLoop:[NSRunLoop currentRunLoop] forMode:NSDefaultRunLoopMode];\n\n        [inputStream open];\n        [outputStream open];\n\n        while ([inputStream hasBytesAvailable] && [outputStream hasSpaceAvailable]) {\n            uint8_t buffer[1024];\n\n            NSInteger bytesRead = [inputStream read:buffer maxLength:1024];\n            if (inputStream.streamError || bytesRead < 0) {\n                error = inputStream.streamError;\n                break;\n            }\n\n            NSInteger bytesWritten = [outputStream write:buffer maxLength:(NSUInteger)bytesRead];\n            if (outputStream.streamError || bytesWritten < 0) {\n                error = outputStream.streamError;\n                break;\n            }\n\n            if (bytesRead == 0 && bytesWritten == 0) {\n                break;\n            }\n        }\n\n        [outputStream close];\n        [inputStream close];\n\n        if (handler) {\n            dispatch_async(dispatch_get_main_queue(), ^{\n                handler(error);\n            });\n        }\n    });\n\n    NSMutableURLRequest *mutableRequest = [request mutableCopy];\n    mutableRequest.HTTPBodyStream = nil;\n\n    return mutableRequest;\n}\n\n#pragma mark - AFURLRequestSerialization\n\n- (NSURLRequest *)requestBySerializingRequest:(NSURLRequest *)request\n                               withParameters:(id)parameters\n                                        error:(NSError *__autoreleasing *)error\n{\n    NSParameterAssert(request);\n\n    NSMutableURLRequest *mutableRequest = [request mutableCopy];\n\n    [self.HTTPRequestHeaders enumerateKeysAndObjectsUsingBlock:^(id field, id value, BOOL * __unused stop) {\n        if (![request valueForHTTPHeaderField:field]) {\n            [mutableRequest setValue:value forHTTPHeaderField:field];\n        }\n    }];\n\n    if (parameters) {\n        NSString *query = nil;\n        if (self.queryStringSerialization) {\n            NSError *serializationError;\n            query = self.queryStringSerialization(request, parameters, &serializationError);\n\n            if (serializationError) {\n                if (error) {\n                    *error = serializationError;\n                }\n\n                return nil;\n            }\n        } else {\n            switch (self.queryStringSerializationStyle) {\n                case AFHTTPRequestQueryStringDefaultStyle:\n                    query = AFQueryStringFromParametersWithEncoding(parameters, self.stringEncoding);\n                    break;\n            }\n        }\n\n        if ([self.HTTPMethodsEncodingParametersInURI containsObject:[[request HTTPMethod] uppercaseString]]) {\n            mutableRequest.URL = [NSURL URLWithString:[[mutableRequest.URL absoluteString] stringByAppendingFormat:mutableRequest.URL.query ? @\"&%@\" : @\"?%@\", query]];\n        } else {\n            if (![mutableRequest valueForHTTPHeaderField:@\"Content-Type\"]) {\n                [mutableRequest setValue:@\"application/x-www-form-urlencoded\" forHTTPHeaderField:@\"Content-Type\"];\n            }\n            [mutableRequest setHTTPBody:[query dataUsingEncoding:self.stringEncoding]];\n        }\n    }\n\n    return mutableRequest;\n}\n\n#pragma mark - NSKeyValueObserving\n\n+ (BOOL)automaticallyNotifiesObserversForKey:(NSString *)key {\n    if ([AFHTTPRequestSerializerObservedKeyPaths() containsObject:key]) {\n        return NO;\n    }\n\n    return [super automaticallyNotifiesObserversForKey:key];\n}\n\n- (void)observeValueForKeyPath:(NSString *)keyPath\n                      ofObject:(__unused id)object\n                        change:(NSDictionary *)change\n                       context:(void *)context\n{\n    if (context == AFHTTPRequestSerializerObserverContext) {\n        if ([change[NSKeyValueChangeNewKey] isEqual:[NSNull null]]) {\n            [self.mutableObservedChangedKeyPaths removeObject:keyPath];\n        } else {\n            [self.mutableObservedChangedKeyPaths addObject:keyPath];\n        }\n    }\n}\n\n#pragma mark - NSSecureCoding\n\n+ (BOOL)supportsSecureCoding {\n    return YES;\n}\n\n- (id)initWithCoder:(NSCoder *)decoder {\n    self = [self init];\n    if (!self) {\n        return nil;\n    }\n\n    self.mutableHTTPRequestHeaders = [[decoder decodeObjectOfClass:[NSDictionary class] forKey:NSStringFromSelector(@selector(mutableHTTPRequestHeaders))] mutableCopy];\n    self.queryStringSerializationStyle = [[decoder decodeObjectOfClass:[NSNumber class] forKey:NSStringFromSelector(@selector(queryStringSerializationStyle))] unsignedIntegerValue];\n\n    return self;\n}\n\n- (void)encodeWithCoder:(NSCoder *)coder {\n    [coder encodeObject:self.mutableHTTPRequestHeaders forKey:NSStringFromSelector(@selector(mutableHTTPRequestHeaders))];\n    [coder encodeInteger:self.queryStringSerializationStyle forKey:NSStringFromSelector(@selector(queryStringSerializationStyle))];\n}\n\n#pragma mark - NSCopying\n\n- (id)copyWithZone:(NSZone *)zone {\n    AFHTTPRequestSerializer *serializer = [[[self class] allocWithZone:zone] init];\n    serializer.mutableHTTPRequestHeaders = [self.mutableHTTPRequestHeaders mutableCopyWithZone:zone];\n    serializer.queryStringSerializationStyle = self.queryStringSerializationStyle;\n    serializer.queryStringSerialization = self.queryStringSerialization;\n\n    return serializer;\n}\n\n@end\n\n#pragma mark -\n\nstatic NSString * AFCreateMultipartFormBoundary() {\n    return [NSString stringWithFormat:@\"Boundary+%08X%08X\", arc4random(), arc4random()];\n}\n\nstatic NSString * const kAFMultipartFormCRLF = @\"\\r\\n\";\n\nstatic inline NSString * AFMultipartFormInitialBoundary(NSString *boundary) {\n    return [NSString stringWithFormat:@\"--%@%@\", boundary, kAFMultipartFormCRLF];\n}\n\nstatic inline NSString * AFMultipartFormEncapsulationBoundary(NSString *boundary) {\n    return [NSString stringWithFormat:@\"%@--%@%@\", kAFMultipartFormCRLF, boundary, kAFMultipartFormCRLF];\n}\n\nstatic inline NSString * AFMultipartFormFinalBoundary(NSString *boundary) {\n    return [NSString stringWithFormat:@\"%@--%@--%@\", kAFMultipartFormCRLF, boundary, kAFMultipartFormCRLF];\n}\n\nstatic inline NSString * AFContentTypeForPathExtension(NSString *extension) {\n#ifdef __UTTYPE__\n    NSString *UTI = (__bridge_transfer NSString *)UTTypeCreatePreferredIdentifierForTag(kUTTagClassFilenameExtension, (__bridge CFStringRef)extension, NULL);\n    NSString *contentType = (__bridge_transfer NSString *)UTTypeCopyPreferredTagWithClass((__bridge CFStringRef)UTI, kUTTagClassMIMEType);\n    if (!contentType) {\n        return @\"application/octet-stream\";\n    } else {\n        return contentType;\n    }\n#else\n#pragma unused (extension)\n    return @\"application/octet-stream\";\n#endif\n}\n\nNSUInteger const kAFUploadStream3GSuggestedPacketSize = 1024 * 16;\nNSTimeInterval const kAFUploadStream3GSuggestedDelay = 0.2;\n\n@interface AFHTTPBodyPart : NSObject\n@property (nonatomic, assign) NSStringEncoding stringEncoding;\n@property (nonatomic, strong) NSDictionary *headers;\n@property (nonatomic, copy) NSString *boundary;\n@property (nonatomic, strong) id body;\n@property (nonatomic, assign) unsigned long long bodyContentLength;\n@property (nonatomic, strong) NSInputStream *inputStream;\n\n@property (nonatomic, assign) BOOL hasInitialBoundary;\n@property (nonatomic, assign) BOOL hasFinalBoundary;\n\n@property (readonly, nonatomic, assign, getter = hasBytesAvailable) BOOL bytesAvailable;\n@property (readonly, nonatomic, assign) unsigned long long contentLength;\n\n- (NSInteger)read:(uint8_t *)buffer\n        maxLength:(NSUInteger)length;\n@end\n\n@interface AFMultipartBodyStream : NSInputStream <NSStreamDelegate>\n@property (nonatomic, assign) NSUInteger numberOfBytesInPacket;\n@property (nonatomic, assign) NSTimeInterval delay;\n@property (nonatomic, strong) NSInputStream *inputStream;\n@property (readonly, nonatomic, assign) unsigned long long contentLength;\n@property (readonly, nonatomic, assign, getter = isEmpty) BOOL empty;\n\n- (id)initWithStringEncoding:(NSStringEncoding)encoding;\n- (void)setInitialAndFinalBoundaries;\n- (void)appendHTTPBodyPart:(AFHTTPBodyPart *)bodyPart;\n@end\n\n#pragma mark -\n\n@interface AFStreamingMultipartFormData ()\n@property (readwrite, nonatomic, copy) NSMutableURLRequest *request;\n@property (readwrite, nonatomic, assign) NSStringEncoding stringEncoding;\n@property (readwrite, nonatomic, copy) NSString *boundary;\n@property (readwrite, nonatomic, strong) AFMultipartBodyStream *bodyStream;\n@end\n\n@implementation AFStreamingMultipartFormData\n\n- (id)initWithURLRequest:(NSMutableURLRequest *)urlRequest\n          stringEncoding:(NSStringEncoding)encoding\n{\n    self = [super init];\n    if (!self) {\n        return nil;\n    }\n\n    self.request = urlRequest;\n    self.stringEncoding = encoding;\n    self.boundary = AFCreateMultipartFormBoundary();\n    self.bodyStream = [[AFMultipartBodyStream alloc] initWithStringEncoding:encoding];\n\n    return self;\n}\n\n- (BOOL)appendPartWithFileURL:(NSURL *)fileURL\n                         name:(NSString *)name\n                        error:(NSError * __autoreleasing *)error\n{\n    NSParameterAssert(fileURL);\n    NSParameterAssert(name);\n\n    NSString *fileName = [fileURL lastPathComponent];\n    NSString *mimeType = AFContentTypeForPathExtension([fileURL pathExtension]);\n\n    return [self appendPartWithFileURL:fileURL name:name fileName:fileName mimeType:mimeType error:error];\n}\n\n- (BOOL)appendPartWithFileURL:(NSURL *)fileURL\n                         name:(NSString *)name\n                     fileName:(NSString *)fileName\n                     mimeType:(NSString *)mimeType\n                        error:(NSError * __autoreleasing *)error\n{\n    NSParameterAssert(fileURL);\n    NSParameterAssert(name);\n    NSParameterAssert(fileName);\n    NSParameterAssert(mimeType);\n\n    if (![fileURL isFileURL]) {\n        NSDictionary *userInfo = @{NSLocalizedFailureReasonErrorKey: NSLocalizedStringFromTable(@\"Expected URL to be a file URL\", @\"AFNetworking\", nil)};\n        if (error) {\n            *error = [[NSError alloc] initWithDomain:AFURLRequestSerializationErrorDomain code:NSURLErrorBadURL userInfo:userInfo];\n        }\n\n        return NO;\n    } else if ([fileURL checkResourceIsReachableAndReturnError:error] == NO) {\n        NSDictionary *userInfo = @{NSLocalizedFailureReasonErrorKey: NSLocalizedStringFromTable(@\"File URL not reachable.\", @\"AFNetworking\", nil)};\n        if (error) {\n            *error = [[NSError alloc] initWithDomain:AFURLRequestSerializationErrorDomain code:NSURLErrorBadURL userInfo:userInfo];\n        }\n\n        return NO;\n    }\n\n    NSDictionary *fileAttributes = [[NSFileManager defaultManager] attributesOfItemAtPath:[fileURL path] error:error];\n    if (!fileAttributes) {\n        return NO;\n    }\n\n    NSMutableDictionary *mutableHeaders = [NSMutableDictionary dictionary];\n    [mutableHeaders setValue:[NSString stringWithFormat:@\"form-data; name=\\\"%@\\\"; filename=\\\"%@\\\"\", name, fileName] forKey:@\"Content-Disposition\"];\n    [mutableHeaders setValue:mimeType forKey:@\"Content-Type\"];\n\n    AFHTTPBodyPart *bodyPart = [[AFHTTPBodyPart alloc] init];\n    bodyPart.stringEncoding = self.stringEncoding;\n    bodyPart.headers = mutableHeaders;\n    bodyPart.boundary = self.boundary;\n    bodyPart.body = fileURL;\n    bodyPart.bodyContentLength = [[fileAttributes objectForKey:NSFileSize] unsignedLongLongValue];\n    [self.bodyStream appendHTTPBodyPart:bodyPart];\n\n    return YES;\n}\n\n- (void)appendPartWithInputStream:(NSInputStream *)inputStream\n                             name:(NSString *)name\n                         fileName:(NSString *)fileName\n                           length:(int64_t)length\n                         mimeType:(NSString *)mimeType\n{\n    NSParameterAssert(name);\n    NSParameterAssert(fileName);\n    NSParameterAssert(mimeType);\n\n    NSMutableDictionary *mutableHeaders = [NSMutableDictionary dictionary];\n    [mutableHeaders setValue:[NSString stringWithFormat:@\"form-data; name=\\\"%@\\\"; filename=\\\"%@\\\"\", name, fileName] forKey:@\"Content-Disposition\"];\n    [mutableHeaders setValue:mimeType forKey:@\"Content-Type\"];\n\n    AFHTTPBodyPart *bodyPart = [[AFHTTPBodyPart alloc] init];\n    bodyPart.stringEncoding = self.stringEncoding;\n    bodyPart.headers = mutableHeaders;\n    bodyPart.boundary = self.boundary;\n    bodyPart.body = inputStream;\n\n    bodyPart.bodyContentLength = (unsigned long long)length;\n\n    [self.bodyStream appendHTTPBodyPart:bodyPart];\n}\n\n- (void)appendPartWithFileData:(NSData *)data\n                          name:(NSString *)name\n                      fileName:(NSString *)fileName\n                      mimeType:(NSString *)mimeType\n{\n    NSParameterAssert(name);\n    NSParameterAssert(fileName);\n    NSParameterAssert(mimeType);\n\n    NSMutableDictionary *mutableHeaders = [NSMutableDictionary dictionary];\n    [mutableHeaders setValue:[NSString stringWithFormat:@\"form-data; name=\\\"%@\\\"; filename=\\\"%@\\\"\", name, fileName] forKey:@\"Content-Disposition\"];\n    [mutableHeaders setValue:mimeType forKey:@\"Content-Type\"];\n\n    [self appendPartWithHeaders:mutableHeaders body:data];\n}\n\n- (void)appendPartWithFormData:(NSData *)data\n                          name:(NSString *)name\n{\n    NSParameterAssert(name);\n\n    NSMutableDictionary *mutableHeaders = [NSMutableDictionary dictionary];\n    [mutableHeaders setValue:[NSString stringWithFormat:@\"form-data; name=\\\"%@\\\"\", name] forKey:@\"Content-Disposition\"];\n\n    [self appendPartWithHeaders:mutableHeaders body:data];\n}\n\n- (void)appendPartWithHeaders:(NSDictionary *)headers\n                         body:(NSData *)body\n{\n    NSParameterAssert(body);\n\n    AFHTTPBodyPart *bodyPart = [[AFHTTPBodyPart alloc] init];\n    bodyPart.stringEncoding = self.stringEncoding;\n    bodyPart.headers = headers;\n    bodyPart.boundary = self.boundary;\n    bodyPart.bodyContentLength = [body length];\n    bodyPart.body = body;\n\n    [self.bodyStream appendHTTPBodyPart:bodyPart];\n}\n\n- (void)throttleBandwidthWithPacketSize:(NSUInteger)numberOfBytes\n                                  delay:(NSTimeInterval)delay\n{\n    self.bodyStream.numberOfBytesInPacket = numberOfBytes;\n    self.bodyStream.delay = delay;\n}\n\n- (NSMutableURLRequest *)requestByFinalizingMultipartFormData {\n    if ([self.bodyStream isEmpty]) {\n        return self.request;\n    }\n\n    // Reset the initial and final boundaries to ensure correct Content-Length\n    [self.bodyStream setInitialAndFinalBoundaries];\n    [self.request setHTTPBodyStream:self.bodyStream];\n\n    [self.request setValue:[NSString stringWithFormat:@\"multipart/form-data; boundary=%@\", self.boundary] forHTTPHeaderField:@\"Content-Type\"];\n    [self.request setValue:[NSString stringWithFormat:@\"%llu\", [self.bodyStream contentLength]] forHTTPHeaderField:@\"Content-Length\"];\n\n    return self.request;\n}\n\n@end\n\n#pragma mark -\n\n@interface NSStream ()\n@property (readwrite) NSStreamStatus streamStatus;\n@property (readwrite, copy) NSError *streamError;\n@end\n\n@interface AFMultipartBodyStream () <NSCopying>\n@property (readwrite, nonatomic, assign) NSStringEncoding stringEncoding;\n@property (readwrite, nonatomic, strong) NSMutableArray *HTTPBodyParts;\n@property (readwrite, nonatomic, strong) NSEnumerator *HTTPBodyPartEnumerator;\n@property (readwrite, nonatomic, strong) AFHTTPBodyPart *currentHTTPBodyPart;\n@property (readwrite, nonatomic, strong) NSOutputStream *outputStream;\n@property (readwrite, nonatomic, strong) NSMutableData *buffer;\n@end\n\n@implementation AFMultipartBodyStream\n#pragma clang diagnostic push\n#pragma clang diagnostic ignored \"-Wimplicit-atomic-properties\"\n#if (defined(__IPHONE_OS_VERSION_MAX_ALLOWED) && __IPHONE_OS_VERSION_MAX_ALLOWED >= 80000) || (defined(__MAC_OS_X_VERSION_MAX_ALLOWED) && __MAC_OS_X_VERSION_MAX_ALLOWED >= 1100)\n@synthesize delegate;\n#endif\n@synthesize streamStatus;\n@synthesize streamError;\n#pragma clang diagnostic pop\n\n- (id)initWithStringEncoding:(NSStringEncoding)encoding {\n    self = [super init];\n    if (!self) {\n        return nil;\n    }\n\n    self.stringEncoding = encoding;\n    self.HTTPBodyParts = [NSMutableArray array];\n    self.numberOfBytesInPacket = NSIntegerMax;\n\n    return self;\n}\n\n- (void)setInitialAndFinalBoundaries {\n    if ([self.HTTPBodyParts count] > 0) {\n        for (AFHTTPBodyPart *bodyPart in self.HTTPBodyParts) {\n            bodyPart.hasInitialBoundary = NO;\n            bodyPart.hasFinalBoundary = NO;\n        }\n\n        [[self.HTTPBodyParts objectAtIndex:0] setHasInitialBoundary:YES];\n        [[self.HTTPBodyParts lastObject] setHasFinalBoundary:YES];\n    }\n}\n\n- (void)appendHTTPBodyPart:(AFHTTPBodyPart *)bodyPart {\n    [self.HTTPBodyParts addObject:bodyPart];\n}\n\n- (BOOL)isEmpty {\n    return [self.HTTPBodyParts count] == 0;\n}\n\n#pragma mark - NSInputStream\n\n- (NSInteger)read:(uint8_t *)buffer\n        maxLength:(NSUInteger)length\n{\n    if ([self streamStatus] == NSStreamStatusClosed) {\n        return 0;\n    }\n\n    NSInteger totalNumberOfBytesRead = 0;\n\n#pragma clang diagnostic push\n#pragma clang diagnostic ignored \"-Wgnu\"\n    while ((NSUInteger)totalNumberOfBytesRead < MIN(length, self.numberOfBytesInPacket)) {\n        if (!self.currentHTTPBodyPart || ![self.currentHTTPBodyPart hasBytesAvailable]) {\n            if (!(self.currentHTTPBodyPart = [self.HTTPBodyPartEnumerator nextObject])) {\n                break;\n            }\n        } else {\n            NSUInteger maxLength = length - (NSUInteger)totalNumberOfBytesRead;\n            NSInteger numberOfBytesRead = [self.currentHTTPBodyPart read:&buffer[totalNumberOfBytesRead] maxLength:maxLength];\n            if (numberOfBytesRead == -1) {\n                self.streamError = self.currentHTTPBodyPart.inputStream.streamError;\n                break;\n            } else {\n                totalNumberOfBytesRead += numberOfBytesRead;\n\n                if (self.delay > 0.0f) {\n                    [NSThread sleepForTimeInterval:self.delay];\n                }\n            }\n        }\n    }\n#pragma clang diagnostic pop\n\n    return totalNumberOfBytesRead;\n}\n\n- (BOOL)getBuffer:(__unused uint8_t **)buffer\n           length:(__unused NSUInteger *)len\n{\n    return NO;\n}\n\n- (BOOL)hasBytesAvailable {\n    return [self streamStatus] == NSStreamStatusOpen;\n}\n\n#pragma mark - NSStream\n\n- (void)open {\n    if (self.streamStatus == NSStreamStatusOpen) {\n        return;\n    }\n\n    self.streamStatus = NSStreamStatusOpen;\n\n    [self setInitialAndFinalBoundaries];\n    self.HTTPBodyPartEnumerator = [self.HTTPBodyParts objectEnumerator];\n}\n\n- (void)close {\n    self.streamStatus = NSStreamStatusClosed;\n}\n\n- (id)propertyForKey:(__unused NSString *)key {\n    return nil;\n}\n\n- (BOOL)setProperty:(__unused id)property\n             forKey:(__unused NSString *)key\n{\n    return NO;\n}\n\n- (void)scheduleInRunLoop:(__unused NSRunLoop *)aRunLoop\n                  forMode:(__unused NSString *)mode\n{}\n\n- (void)removeFromRunLoop:(__unused NSRunLoop *)aRunLoop\n                  forMode:(__unused NSString *)mode\n{}\n\n- (unsigned long long)contentLength {\n    unsigned long long length = 0;\n    for (AFHTTPBodyPart *bodyPart in self.HTTPBodyParts) {\n        length += [bodyPart contentLength];\n    }\n\n    return length;\n}\n\n#pragma mark - Undocumented CFReadStream Bridged Methods\n\n- (void)_scheduleInCFRunLoop:(__unused CFRunLoopRef)aRunLoop\n                     forMode:(__unused CFStringRef)aMode\n{}\n\n- (void)_unscheduleFromCFRunLoop:(__unused CFRunLoopRef)aRunLoop\n                         forMode:(__unused CFStringRef)aMode\n{}\n\n- (BOOL)_setCFClientFlags:(__unused CFOptionFlags)inFlags\n                 callback:(__unused CFReadStreamClientCallBack)inCallback\n                  context:(__unused CFStreamClientContext *)inContext {\n    return NO;\n}\n\n#pragma mark - NSCopying\n\n-(id)copyWithZone:(NSZone *)zone {\n    AFMultipartBodyStream *bodyStreamCopy = [[[self class] allocWithZone:zone] initWithStringEncoding:self.stringEncoding];\n\n    for (AFHTTPBodyPart *bodyPart in self.HTTPBodyParts) {\n        [bodyStreamCopy appendHTTPBodyPart:[bodyPart copy]];\n    }\n\n    [bodyStreamCopy setInitialAndFinalBoundaries];\n\n    return bodyStreamCopy;\n}\n\n@end\n\n#pragma mark -\n\ntypedef enum {\n    AFEncapsulationBoundaryPhase = 1,\n    AFHeaderPhase                = 2,\n    AFBodyPhase                  = 3,\n    AFFinalBoundaryPhase         = 4,\n} AFHTTPBodyPartReadPhase;\n\n@interface AFHTTPBodyPart () <NSCopying> {\n    AFHTTPBodyPartReadPhase _phase;\n    NSInputStream *_inputStream;\n    unsigned long long _phaseReadOffset;\n}\n\n- (BOOL)transitionToNextPhase;\n- (NSInteger)readData:(NSData *)data\n           intoBuffer:(uint8_t *)buffer\n            maxLength:(NSUInteger)length;\n@end\n\n@implementation AFHTTPBodyPart\n\n- (id)init {\n    self = [super init];\n    if (!self) {\n        return nil;\n    }\n\n    [self transitionToNextPhase];\n\n    return self;\n}\n\n- (void)dealloc {\n    if (_inputStream) {\n        [_inputStream close];\n        _inputStream = nil;\n    }\n}\n\n- (NSInputStream *)inputStream {\n    if (!_inputStream) {\n        if ([self.body isKindOfClass:[NSData class]]) {\n            _inputStream = [NSInputStream inputStreamWithData:self.body];\n        } else if ([self.body isKindOfClass:[NSURL class]]) {\n            _inputStream = [NSInputStream inputStreamWithURL:self.body];\n        } else if ([self.body isKindOfClass:[NSInputStream class]]) {\n            _inputStream = self.body;\n        } else {\n            _inputStream = [NSInputStream inputStreamWithData:[NSData data]];\n        }\n    }\n\n    return _inputStream;\n}\n\n- (NSString *)stringForHeaders {\n    NSMutableString *headerString = [NSMutableString string];\n    for (NSString *field in [self.headers allKeys]) {\n        [headerString appendString:[NSString stringWithFormat:@\"%@: %@%@\", field, [self.headers valueForKey:field], kAFMultipartFormCRLF]];\n    }\n    [headerString appendString:kAFMultipartFormCRLF];\n\n    return [NSString stringWithString:headerString];\n}\n\n- (unsigned long long)contentLength {\n    unsigned long long length = 0;\n\n    NSData *encapsulationBoundaryData = [([self hasInitialBoundary] ? AFMultipartFormInitialBoundary(self.boundary) : AFMultipartFormEncapsulationBoundary(self.boundary)) dataUsingEncoding:self.stringEncoding];\n    length += [encapsulationBoundaryData length];\n\n    NSData *headersData = [[self stringForHeaders] dataUsingEncoding:self.stringEncoding];\n    length += [headersData length];\n\n    length += _bodyContentLength;\n\n    NSData *closingBoundaryData = ([self hasFinalBoundary] ? [AFMultipartFormFinalBoundary(self.boundary) dataUsingEncoding:self.stringEncoding] : [NSData data]);\n    length += [closingBoundaryData length];\n\n    return length;\n}\n\n- (BOOL)hasBytesAvailable {\n    // Allows `read:maxLength:` to be called again if `AFMultipartFormFinalBoundary` doesn't fit into the available buffer\n    if (_phase == AFFinalBoundaryPhase) {\n        return YES;\n    }\n\n#pragma clang diagnostic push\n#pragma clang diagnostic ignored \"-Wcovered-switch-default\"\n    switch (self.inputStream.streamStatus) {\n        case NSStreamStatusNotOpen:\n        case NSStreamStatusOpening:\n        case NSStreamStatusOpen:\n        case NSStreamStatusReading:\n        case NSStreamStatusWriting:\n            return YES;\n        case NSStreamStatusAtEnd:\n        case NSStreamStatusClosed:\n        case NSStreamStatusError:\n        default:\n            return NO;\n    }\n#pragma clang diagnostic pop\n}\n\n- (NSInteger)read:(uint8_t *)buffer\n        maxLength:(NSUInteger)length\n{\n    NSInteger totalNumberOfBytesRead = 0;\n\n    if (_phase == AFEncapsulationBoundaryPhase) {\n        NSData *encapsulationBoundaryData = [([self hasInitialBoundary] ? AFMultipartFormInitialBoundary(self.boundary) : AFMultipartFormEncapsulationBoundary(self.boundary)) dataUsingEncoding:self.stringEncoding];\n        totalNumberOfBytesRead += [self readData:encapsulationBoundaryData intoBuffer:&buffer[totalNumberOfBytesRead] maxLength:(length - (NSUInteger)totalNumberOfBytesRead)];\n    }\n\n    if (_phase == AFHeaderPhase) {\n        NSData *headersData = [[self stringForHeaders] dataUsingEncoding:self.stringEncoding];\n        totalNumberOfBytesRead += [self readData:headersData intoBuffer:&buffer[totalNumberOfBytesRead] maxLength:(length - (NSUInteger)totalNumberOfBytesRead)];\n    }\n\n    if (_phase == AFBodyPhase) {\n        NSInteger numberOfBytesRead = 0;\n\n        numberOfBytesRead = [self.inputStream read:&buffer[totalNumberOfBytesRead] maxLength:(length - (NSUInteger)totalNumberOfBytesRead)];\n        if (numberOfBytesRead == -1) {\n            return -1;\n        } else {\n            totalNumberOfBytesRead += numberOfBytesRead;\n\n            if ([self.inputStream streamStatus] >= NSStreamStatusAtEnd) {\n                [self transitionToNextPhase];\n            }\n        }\n    }\n\n    if (_phase == AFFinalBoundaryPhase) {\n        NSData *closingBoundaryData = ([self hasFinalBoundary] ? [AFMultipartFormFinalBoundary(self.boundary) dataUsingEncoding:self.stringEncoding] : [NSData data]);\n        totalNumberOfBytesRead += [self readData:closingBoundaryData intoBuffer:&buffer[totalNumberOfBytesRead] maxLength:(length - (NSUInteger)totalNumberOfBytesRead)];\n    }\n\n    return totalNumberOfBytesRead;\n}\n\n- (NSInteger)readData:(NSData *)data\n           intoBuffer:(uint8_t *)buffer\n            maxLength:(NSUInteger)length\n{\n#pragma clang diagnostic push\n#pragma clang diagnostic ignored \"-Wgnu\"\n    NSRange range = NSMakeRange((NSUInteger)_phaseReadOffset, MIN([data length] - ((NSUInteger)_phaseReadOffset), length));\n    [data getBytes:buffer range:range];\n#pragma clang diagnostic pop\n\n    _phaseReadOffset += range.length;\n\n    if (((NSUInteger)_phaseReadOffset) >= [data length]) {\n        [self transitionToNextPhase];\n    }\n\n    return (NSInteger)range.length;\n}\n\n- (BOOL)transitionToNextPhase {\n    if (![[NSThread currentThread] isMainThread]) {\n        dispatch_sync(dispatch_get_main_queue(), ^{\n            [self transitionToNextPhase];\n        });\n        return YES;\n    }\n\n#pragma clang diagnostic push\n#pragma clang diagnostic ignored \"-Wcovered-switch-default\"\n    switch (_phase) {\n        case AFEncapsulationBoundaryPhase:\n            _phase = AFHeaderPhase;\n            break;\n        case AFHeaderPhase:\n            [self.inputStream scheduleInRunLoop:[NSRunLoop currentRunLoop] forMode:NSRunLoopCommonModes];\n            [self.inputStream open];\n            _phase = AFBodyPhase;\n            break;\n        case AFBodyPhase:\n            [self.inputStream close];\n            _phase = AFFinalBoundaryPhase;\n            break;\n        case AFFinalBoundaryPhase:\n        default:\n            _phase = AFEncapsulationBoundaryPhase;\n            break;\n    }\n    _phaseReadOffset = 0;\n#pragma clang diagnostic pop\n\n    return YES;\n}\n\n#pragma mark - NSCopying\n\n- (id)copyWithZone:(NSZone *)zone {\n    AFHTTPBodyPart *bodyPart = [[[self class] allocWithZone:zone] init];\n\n    bodyPart.stringEncoding = self.stringEncoding;\n    bodyPart.headers = self.headers;\n    bodyPart.bodyContentLength = self.bodyContentLength;\n    bodyPart.body = self.body;\n    bodyPart.boundary = self.boundary;\n\n    return bodyPart;\n}\n\n@end\n\n#pragma mark -\n\n@implementation AFJSONRequestSerializer\n\n+ (instancetype)serializer {\n    return [self serializerWithWritingOptions:(NSJSONWritingOptions)0];\n}\n\n+ (instancetype)serializerWithWritingOptions:(NSJSONWritingOptions)writingOptions\n{\n    AFJSONRequestSerializer *serializer = [[self alloc] init];\n    serializer.writingOptions = writingOptions;\n\n    return serializer;\n}\n\n#pragma mark - AFURLRequestSerialization\n\n- (NSURLRequest *)requestBySerializingRequest:(NSURLRequest *)request\n                               withParameters:(id)parameters\n                                        error:(NSError *__autoreleasing *)error\n{\n    NSParameterAssert(request);\n\n    if ([self.HTTPMethodsEncodingParametersInURI containsObject:[[request HTTPMethod] uppercaseString]]) {\n        return [super requestBySerializingRequest:request withParameters:parameters error:error];\n    }\n\n    NSMutableURLRequest *mutableRequest = [request mutableCopy];\n\n    [self.HTTPRequestHeaders enumerateKeysAndObjectsUsingBlock:^(id field, id value, BOOL * __unused stop) {\n        if (![request valueForHTTPHeaderField:field]) {\n            [mutableRequest setValue:value forHTTPHeaderField:field];\n        }\n    }];\n\n    if (parameters) {\n        if (![mutableRequest valueForHTTPHeaderField:@\"Content-Type\"]) {\n            [mutableRequest setValue:@\"application/json\" forHTTPHeaderField:@\"Content-Type\"];\n        }\n\n        [mutableRequest setHTTPBody:[NSJSONSerialization dataWithJSONObject:parameters options:self.writingOptions error:error]];\n    }\n\n    return mutableRequest;\n}\n\n#pragma mark - NSSecureCoding\n\n- (id)initWithCoder:(NSCoder *)decoder {\n    self = [super initWithCoder:decoder];\n    if (!self) {\n        return nil;\n    }\n\n    self.writingOptions = [[decoder decodeObjectOfClass:[NSNumber class] forKey:NSStringFromSelector(@selector(writingOptions))] unsignedIntegerValue];\n\n    return self;\n}\n\n- (void)encodeWithCoder:(NSCoder *)coder {\n    [super encodeWithCoder:coder];\n\n    [coder encodeInteger:self.writingOptions forKey:NSStringFromSelector(@selector(writingOptions))];\n}\n\n#pragma mark - NSCopying\n\n- (id)copyWithZone:(NSZone *)zone {\n    AFJSONRequestSerializer *serializer = [super copyWithZone:zone];\n    serializer.writingOptions = self.writingOptions;\n\n    return serializer;\n}\n\n@end\n\n#pragma mark -\n\n@implementation AFPropertyListRequestSerializer\n\n+ (instancetype)serializer {\n    return [self serializerWithFormat:NSPropertyListXMLFormat_v1_0 writeOptions:0];\n}\n\n+ (instancetype)serializerWithFormat:(NSPropertyListFormat)format\n                        writeOptions:(NSPropertyListWriteOptions)writeOptions\n{\n    AFPropertyListRequestSerializer *serializer = [[self alloc] init];\n    serializer.format = format;\n    serializer.writeOptions = writeOptions;\n\n    return serializer;\n}\n\n#pragma mark - AFURLRequestSerializer\n\n- (NSURLRequest *)requestBySerializingRequest:(NSURLRequest *)request\n                               withParameters:(id)parameters\n                                        error:(NSError *__autoreleasing *)error\n{\n    NSParameterAssert(request);\n\n    if ([self.HTTPMethodsEncodingParametersInURI containsObject:[[request HTTPMethod] uppercaseString]]) {\n        return [super requestBySerializingRequest:request withParameters:parameters error:error];\n    }\n\n    NSMutableURLRequest *mutableRequest = [request mutableCopy];\n\n    [self.HTTPRequestHeaders enumerateKeysAndObjectsUsingBlock:^(id field, id value, BOOL * __unused stop) {\n        if (![request valueForHTTPHeaderField:field]) {\n            [mutableRequest setValue:value forHTTPHeaderField:field];\n        }\n    }];\n\n    if (parameters) {\n        if (![mutableRequest valueForHTTPHeaderField:@\"Content-Type\"]) {\n            [mutableRequest setValue:@\"application/x-plist\" forHTTPHeaderField:@\"Content-Type\"];\n        }\n\n        [mutableRequest setHTTPBody:[NSPropertyListSerialization dataWithPropertyList:parameters format:self.format options:self.writeOptions error:error]];\n    }\n\n    return mutableRequest;\n}\n\n#pragma mark - NSSecureCoding\n\n- (id)initWithCoder:(NSCoder *)decoder {\n    self = [super initWithCoder:decoder];\n    if (!self) {\n        return nil;\n    }\n\n    self.format = [[decoder decodeObjectOfClass:[NSNumber class] forKey:NSStringFromSelector(@selector(format))] unsignedIntegerValue];\n    self.writeOptions = [[decoder decodeObjectOfClass:[NSNumber class] forKey:NSStringFromSelector(@selector(writeOptions))] unsignedIntegerValue];\n\n    return self;\n}\n\n- (void)encodeWithCoder:(NSCoder *)coder {\n    [super encodeWithCoder:coder];\n\n    [coder encodeInteger:self.format forKey:NSStringFromSelector(@selector(format))];\n    [coder encodeObject:@(self.writeOptions) forKey:NSStringFromSelector(@selector(writeOptions))];\n}\n\n#pragma mark - NSCopying\n\n- (id)copyWithZone:(NSZone *)zone {\n    AFPropertyListRequestSerializer *serializer = [super copyWithZone:zone];\n    serializer.format = self.format;\n    serializer.writeOptions = self.writeOptions;\n\n    return serializer;\n}\n\n@end\n"
  },
  {
    "path": "Pods/AFNetworking/AFNetworking/AFURLResponseSerialization.h",
    "content": "// AFURLResponseSerialization.h\n//\n// Copyright (c) 2013-2015 AFNetworking (http://afnetworking.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\n#import <Foundation/Foundation.h>\n#import <CoreGraphics/CoreGraphics.h>\n\n/**\n The `AFURLResponseSerialization` protocol is adopted by an object that decodes data into a more useful object representation, according to details in the server response. Response serializers may additionally perform validation on the incoming response and data.\n\n For example, a JSON response serializer may check for an acceptable status code (`2XX` range) and content type (`application/json`), decoding a valid JSON response into an object.\n */\n@protocol AFURLResponseSerialization <NSObject, NSSecureCoding, NSCopying>\n\n/**\n The response object decoded from the data associated with a specified response.\n\n @param response The response to be processed.\n @param data The response data to be decoded.\n @param error The error that occurred while attempting to decode the response data.\n\n @return The object decoded from the specified response data.\n */\n- (id)responseObjectForResponse:(NSURLResponse *)response\n                           data:(NSData *)data\n                          error:(NSError *__autoreleasing *)error;\n\n@end\n\n#pragma mark -\n\n/**\n `AFHTTPResponseSerializer` conforms to the `AFURLRequestSerialization` & `AFURLResponseSerialization` protocols, offering a concrete base implementation of query string / URL form-encoded parameter serialization and default request headers, as well as response status code and content type validation.\n\n Any request or response serializer dealing with HTTP is encouraged to subclass `AFHTTPResponseSerializer` in order to ensure consistent default behavior.\n */\n@interface AFHTTPResponseSerializer : NSObject <AFURLResponseSerialization>\n\n- (instancetype) init;\n\n/**\n The string encoding used to serialize data received from the server, when no string encoding is specified by the response. `NSUTF8StringEncoding` by default.\n */\n@property (nonatomic, assign) NSStringEncoding stringEncoding;\n\n/**\n Creates and returns a serializer with default configuration.\n */\n+ (instancetype)serializer;\n\n///-----------------------------------------\n/// @name Configuring Response Serialization\n///-----------------------------------------\n\n/**\n The acceptable HTTP status codes for responses. When non-`nil`, responses with status codes not contained by the set will result in an error during validation.\n\n See http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html\n */\n@property (nonatomic, copy) NSIndexSet *acceptableStatusCodes;\n\n/**\n The acceptable MIME types for responses. When non-`nil`, responses with a `Content-Type` with MIME types that do not intersect with the set will result in an error during validation.\n */\n@property (nonatomic, copy) NSSet *acceptableContentTypes;\n\n/**\n Validates the specified response and data.\n\n In its base implementation, this method checks for an acceptable status code and content type. Subclasses may wish to add other domain-specific checks.\n\n @param response The response to be validated.\n @param data The data associated with the response.\n @param error The error that occurred while attempting to validate the response.\n\n @return `YES` if the response is valid, otherwise `NO`.\n */\n- (BOOL)validateResponse:(NSHTTPURLResponse *)response\n                    data:(NSData *)data\n                   error:(NSError *__autoreleasing *)error;\n\n@end\n\n#pragma mark -\n\n\n/**\n `AFJSONResponseSerializer` is a subclass of `AFHTTPResponseSerializer` that validates and decodes JSON responses.\n\n By default, `AFJSONResponseSerializer` accepts the following MIME types, which includes the official standard, `application/json`, as well as other commonly-used types:\n\n - `application/json`\n - `text/json`\n - `text/javascript`\n */\n@interface AFJSONResponseSerializer : AFHTTPResponseSerializer\n\n- (instancetype) init;\n\n/**\n Options for reading the response JSON data and creating the Foundation objects. For possible values, see the `NSJSONSerialization` documentation section \"NSJSONReadingOptions\". `0` by default.\n */\n@property (nonatomic, assign) NSJSONReadingOptions readingOptions;\n\n/**\n Whether to remove keys with `NSNull` values from response JSON. Defaults to `NO`.\n */\n@property (nonatomic, assign) BOOL removesKeysWithNullValues;\n\n/**\n Creates and returns a JSON serializer with specified reading and writing options.\n\n @param readingOptions The specified JSON reading options.\n */\n+ (instancetype)serializerWithReadingOptions:(NSJSONReadingOptions)readingOptions;\n\n@end\n\n#pragma mark -\n\n/**\n `AFXMLParserResponseSerializer` is a subclass of `AFHTTPResponseSerializer` that validates and decodes XML responses as an `NSXMLParser` objects.\n\n By default, `AFXMLParserResponseSerializer` accepts the following MIME types, which includes the official standard, `application/xml`, as well as other commonly-used types:\n\n - `application/xml`\n - `text/xml`\n */\n@interface AFXMLParserResponseSerializer : AFHTTPResponseSerializer\n\n@end\n\n#pragma mark -\n\n#ifdef __MAC_OS_X_VERSION_MIN_REQUIRED\n\n/**\n `AFXMLDocumentResponseSerializer` is a subclass of `AFHTTPResponseSerializer` that validates and decodes XML responses as an `NSXMLDocument` objects.\n\n By default, `AFXMLDocumentResponseSerializer` accepts the following MIME types, which includes the official standard, `application/xml`, as well as other commonly-used types:\n\n - `application/xml`\n - `text/xml`\n */\n@interface AFXMLDocumentResponseSerializer : AFHTTPResponseSerializer\n\n- (instancetype) init;\n\n/**\n Input and output options specifically intended for `NSXMLDocument` objects. For possible values, see the `NSJSONSerialization` documentation section \"NSJSONReadingOptions\". `0` by default.\n */\n@property (nonatomic, assign) NSUInteger options;\n\n/**\n Creates and returns an XML document serializer with the specified options.\n\n @param mask The XML document options.\n */\n+ (instancetype)serializerWithXMLDocumentOptions:(NSUInteger)mask;\n\n@end\n\n#endif\n\n#pragma mark -\n\n/**\n `AFPropertyListResponseSerializer` is a subclass of `AFHTTPResponseSerializer` that validates and decodes XML responses as an `NSXMLDocument` objects.\n\n By default, `AFPropertyListResponseSerializer` accepts the following MIME types:\n\n - `application/x-plist`\n */\n@interface AFPropertyListResponseSerializer : AFHTTPResponseSerializer\n\n- (instancetype) init;\n\n/**\n The property list format. Possible values are described in \"NSPropertyListFormat\".\n */\n@property (nonatomic, assign) NSPropertyListFormat format;\n\n/**\n The property list reading options. Possible values are described in \"NSPropertyListMutabilityOptions.\"\n */\n@property (nonatomic, assign) NSPropertyListReadOptions readOptions;\n\n/**\n Creates and returns a property list serializer with a specified format, read options, and write options.\n\n @param format The property list format.\n @param readOptions The property list reading options.\n */\n+ (instancetype)serializerWithFormat:(NSPropertyListFormat)format\n                         readOptions:(NSPropertyListReadOptions)readOptions;\n\n@end\n\n#pragma mark -\n\n/**\n `AFImageResponseSerializer` is a subclass of `AFHTTPResponseSerializer` that validates and decodes image responses.\n\n By default, `AFImageResponseSerializer` accepts the following MIME types, which correspond to the image formats supported by UIImage or NSImage:\n\n - `image/tiff`\n - `image/jpeg`\n - `image/gif`\n - `image/png`\n - `image/ico`\n - `image/x-icon`\n - `image/bmp`\n - `image/x-bmp`\n - `image/x-xbitmap`\n - `image/x-win-bitmap`\n */\n@interface AFImageResponseSerializer : AFHTTPResponseSerializer\n\n#if defined(__IPHONE_OS_VERSION_MIN_REQUIRED)\n/**\n The scale factor used when interpreting the image data to construct `responseImage`. Specifying a scale factor of 1.0 results in an image whose size matches the pixel-based dimensions of the image. Applying a different scale factor changes the size of the image as reported by the size property. This is set to the value of scale of the main screen by default, which automatically scales images for retina displays, for instance.\n */\n@property (nonatomic, assign) CGFloat imageScale;\n\n/**\n Whether to automatically inflate response image data for compressed formats (such as PNG or JPEG). Enabling this can significantly improve drawing performance on iOS when used with `setCompletionBlockWithSuccess:failure:`, as it allows a bitmap representation to be constructed in the background rather than on the main thread. `YES` by default.\n */\n@property (nonatomic, assign) BOOL automaticallyInflatesResponseImage;\n#endif\n\n@end\n\n#pragma mark -\n\n/**\n `AFCompoundSerializer` is a subclass of `AFHTTPResponseSerializer` that delegates the response serialization to the first `AFHTTPResponseSerializer` object that returns an object for `responseObjectForResponse:data:error:`, falling back on the default behavior of `AFHTTPResponseSerializer`. This is useful for supporting multiple potential types and structures of server responses with a single serializer.\n */\n@interface AFCompoundResponseSerializer : AFHTTPResponseSerializer\n\n/**\n The component response serializers.\n */\n@property (readonly, nonatomic, copy) NSArray *responseSerializers;\n\n/**\n Creates and returns a compound serializer comprised of the specified response serializers.\n\n @warning Each response serializer specified must be a subclass of `AFHTTPResponseSerializer`, and response to `-validateResponse:data:error:`.\n */\n+ (instancetype)compoundSerializerWithResponseSerializers:(NSArray *)responseSerializers;\n\n@end\n\n///----------------\n/// @name Constants\n///----------------\n\n/**\n ## Error Domains\n\n The following error domain is predefined.\n\n - `NSString * const AFURLResponseSerializationErrorDomain`\n\n ### Constants\n\n `AFURLResponseSerializationErrorDomain`\n AFURLResponseSerializer errors. Error codes for `AFURLResponseSerializationErrorDomain` correspond to codes in `NSURLErrorDomain`.\n */\nextern NSString * const AFURLResponseSerializationErrorDomain;\n\n/**\n ## User info dictionary keys\n\n These keys may exist in the user info dictionary, in addition to those defined for NSError.\n\n - `NSString * const AFNetworkingOperationFailingURLResponseErrorKey`\n - `NSString * const AFNetworkingOperationFailingURLResponseDataErrorKey`\n\n ### Constants\n\n `AFNetworkingOperationFailingURLResponseErrorKey`\n The corresponding value is an `NSURLResponse` containing the response of the operation associated with an error. This key is only present in the `AFURLResponseSerializationErrorDomain`.\n\n `AFNetworkingOperationFailingURLResponseDataErrorKey`\n The corresponding value is an `NSData` containing the original data of the operation associated with an error. This key is only present in the `AFURLResponseSerializationErrorDomain`.\n */\nextern NSString * const AFNetworkingOperationFailingURLResponseErrorKey;\n\nextern NSString * const AFNetworkingOperationFailingURLResponseDataErrorKey;\n\n\n"
  },
  {
    "path": "Pods/AFNetworking/AFNetworking/AFURLResponseSerialization.m",
    "content": "// AFURLResponseSerialization.m\n//\n// Copyright (c) 2013-2015 AFNetworking (http://afnetworking.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\n#import \"AFURLResponseSerialization.h\"\n\n#if defined(__IPHONE_OS_VERSION_MIN_REQUIRED)\n#import <UIKit/UIKit.h>\n#elif defined(__MAC_OS_X_VERSION_MIN_REQUIRED)\n#import <Cocoa/Cocoa.h>\n#endif\n\nNSString * const AFURLResponseSerializationErrorDomain = @\"com.alamofire.error.serialization.response\";\nNSString * const AFNetworkingOperationFailingURLResponseErrorKey = @\"com.alamofire.serialization.response.error.response\";\nNSString * const AFNetworkingOperationFailingURLResponseDataErrorKey = @\"com.alamofire.serialization.response.error.data\";\n\nstatic NSError * AFErrorWithUnderlyingError(NSError *error, NSError *underlyingError) {\n    if (!error) {\n        return underlyingError;\n    }\n\n    if (!underlyingError || error.userInfo[NSUnderlyingErrorKey]) {\n        return error;\n    }\n\n    NSMutableDictionary *mutableUserInfo = [error.userInfo mutableCopy];\n    mutableUserInfo[NSUnderlyingErrorKey] = underlyingError;\n\n    return [[NSError alloc] initWithDomain:error.domain code:error.code userInfo:mutableUserInfo];\n}\n\nstatic BOOL AFErrorOrUnderlyingErrorHasCodeInDomain(NSError *error, NSInteger code, NSString *domain) {\n    if ([error.domain isEqualToString:domain] && error.code == code) {\n        return YES;\n    } else if (error.userInfo[NSUnderlyingErrorKey]) {\n        return AFErrorOrUnderlyingErrorHasCodeInDomain(error.userInfo[NSUnderlyingErrorKey], code, domain);\n    }\n\n    return NO;\n}\n\nstatic id AFJSONObjectByRemovingKeysWithNullValues(id JSONObject, NSJSONReadingOptions readingOptions) {\n    if ([JSONObject isKindOfClass:[NSArray class]]) {\n        NSMutableArray *mutableArray = [NSMutableArray arrayWithCapacity:[(NSArray *)JSONObject count]];\n        for (id value in (NSArray *)JSONObject) {\n            [mutableArray addObject:AFJSONObjectByRemovingKeysWithNullValues(value, readingOptions)];\n        }\n\n        return (readingOptions & NSJSONReadingMutableContainers) ? mutableArray : [NSArray arrayWithArray:mutableArray];\n    } else if ([JSONObject isKindOfClass:[NSDictionary class]]) {\n        NSMutableDictionary *mutableDictionary = [NSMutableDictionary dictionaryWithDictionary:JSONObject];\n        for (id <NSCopying> key in [(NSDictionary *)JSONObject allKeys]) {\n            id value = [(NSDictionary *)JSONObject objectForKey:key];\n            if (!value || [value isEqual:[NSNull null]]) {\n                [mutableDictionary removeObjectForKey:key];\n            } else if ([value isKindOfClass:[NSArray class]] || [value isKindOfClass:[NSDictionary class]]) {\n                [mutableDictionary setObject:AFJSONObjectByRemovingKeysWithNullValues(value, readingOptions) forKey:key];\n            }\n        }\n\n        return (readingOptions & NSJSONReadingMutableContainers) ? mutableDictionary : [NSDictionary dictionaryWithDictionary:mutableDictionary];\n    }\n\n    return JSONObject;\n}\n\n@implementation AFHTTPResponseSerializer\n\n+ (instancetype)serializer {\n    return [[self alloc] init];\n}\n\n- (instancetype)init {\n    self = [super init];\n    if (!self) {\n        return nil;\n    }\n\n    self.stringEncoding = NSUTF8StringEncoding;\n\n    self.acceptableStatusCodes = [NSIndexSet indexSetWithIndexesInRange:NSMakeRange(200, 100)];\n    self.acceptableContentTypes = nil;\n\n    return self;\n}\n\n#pragma mark -\n\n- (BOOL)validateResponse:(NSHTTPURLResponse *)response\n                    data:(NSData *)data\n                   error:(NSError * __autoreleasing *)error\n{\n    BOOL responseIsValid = YES;\n    NSError *validationError = nil;\n\n    if (response && [response isKindOfClass:[NSHTTPURLResponse class]]) {\n        if (self.acceptableContentTypes && ![self.acceptableContentTypes containsObject:[response MIMEType]]) {\n            if ([data length] > 0 && [response URL]) {\n                NSMutableDictionary *mutableUserInfo = [@{\n                                                          NSLocalizedDescriptionKey: [NSString stringWithFormat:NSLocalizedStringFromTable(@\"Request failed: unacceptable content-type: %@\", @\"AFNetworking\", nil), [response MIMEType]],\n                                                          NSURLErrorFailingURLErrorKey:[response URL],\n                                                          AFNetworkingOperationFailingURLResponseErrorKey: response,\n                                                        } mutableCopy];\n                if (data) {\n                    mutableUserInfo[AFNetworkingOperationFailingURLResponseDataErrorKey] = data;\n                }\n\n                validationError = AFErrorWithUnderlyingError([NSError errorWithDomain:AFURLResponseSerializationErrorDomain code:NSURLErrorCannotDecodeContentData userInfo:mutableUserInfo], validationError);\n            }\n\n            responseIsValid = NO;\n        }\n\n        if (self.acceptableStatusCodes && ![self.acceptableStatusCodes containsIndex:(NSUInteger)response.statusCode] && [response URL]) {\n            NSMutableDictionary *mutableUserInfo = [@{\n                                               NSLocalizedDescriptionKey: [NSString stringWithFormat:NSLocalizedStringFromTable(@\"Request failed: %@ (%ld)\", @\"AFNetworking\", nil), [NSHTTPURLResponse localizedStringForStatusCode:response.statusCode], (long)response.statusCode],\n                                               NSURLErrorFailingURLErrorKey:[response URL],\n                                               AFNetworkingOperationFailingURLResponseErrorKey: response,\n                                       } mutableCopy];\n\n            if (data) {\n                mutableUserInfo[AFNetworkingOperationFailingURLResponseDataErrorKey] = data;\n            }\n\n            validationError = AFErrorWithUnderlyingError([NSError errorWithDomain:AFURLResponseSerializationErrorDomain code:NSURLErrorBadServerResponse userInfo:mutableUserInfo], validationError);\n\n            responseIsValid = NO;\n        }\n    }\n\n    if (error && !responseIsValid) {\n        *error = validationError;\n    }\n\n    return responseIsValid;\n}\n\n#pragma mark - AFURLResponseSerialization\n\n- (id)responseObjectForResponse:(NSURLResponse *)response\n                           data:(NSData *)data\n                          error:(NSError *__autoreleasing *)error\n{\n    [self validateResponse:(NSHTTPURLResponse *)response data:data error:error];\n\n    return data;\n}\n\n#pragma mark - NSSecureCoding\n\n+ (BOOL)supportsSecureCoding {\n    return YES;\n}\n\n- (id)initWithCoder:(NSCoder *)decoder {\n    self = [self init];\n    if (!self) {\n        return nil;\n    }\n\n    self.acceptableStatusCodes = [decoder decodeObjectOfClass:[NSIndexSet class] forKey:NSStringFromSelector(@selector(acceptableStatusCodes))];\n    self.acceptableContentTypes = [decoder decodeObjectOfClass:[NSIndexSet class] forKey:NSStringFromSelector(@selector(acceptableContentTypes))];\n\n    return self;\n}\n\n- (void)encodeWithCoder:(NSCoder *)coder {\n    [coder encodeObject:self.acceptableStatusCodes forKey:NSStringFromSelector(@selector(acceptableStatusCodes))];\n    [coder encodeObject:self.acceptableContentTypes forKey:NSStringFromSelector(@selector(acceptableContentTypes))];\n}\n\n#pragma mark - NSCopying\n\n- (id)copyWithZone:(NSZone *)zone {\n    AFHTTPResponseSerializer *serializer = [[[self class] allocWithZone:zone] init];\n    serializer.acceptableStatusCodes = [self.acceptableStatusCodes copyWithZone:zone];\n    serializer.acceptableContentTypes = [self.acceptableContentTypes copyWithZone:zone];\n\n    return serializer;\n}\n\n@end\n\n#pragma mark -\n\n@implementation AFJSONResponseSerializer\n\n+ (instancetype)serializer {\n    return [self serializerWithReadingOptions:(NSJSONReadingOptions)0];\n}\n\n+ (instancetype)serializerWithReadingOptions:(NSJSONReadingOptions)readingOptions {\n    AFJSONResponseSerializer *serializer = [[self alloc] init];\n    serializer.readingOptions = readingOptions;\n\n    return serializer;\n}\n\n- (instancetype)init {\n    self = [super init];\n    if (!self) {\n        return nil;\n    }\n\n    self.acceptableContentTypes = [NSSet setWithObjects:@\"application/json\", @\"text/json\", @\"text/javascript\", nil];\n\n    return self;\n}\n\n#pragma mark - AFURLResponseSerialization\n\n- (id)responseObjectForResponse:(NSURLResponse *)response\n                           data:(NSData *)data\n                          error:(NSError *__autoreleasing *)error\n{\n    if (![self validateResponse:(NSHTTPURLResponse *)response data:data error:error]) {\n        if (!error || AFErrorOrUnderlyingErrorHasCodeInDomain(*error, NSURLErrorCannotDecodeContentData, AFURLResponseSerializationErrorDomain)) {\n            return nil;\n        }\n    }\n\n    // Workaround for behavior of Rails to return a single space for `head :ok` (a workaround for a bug in Safari), which is not interpreted as valid input by NSJSONSerialization.\n    // See https://github.com/rails/rails/issues/1742\n    NSStringEncoding stringEncoding = self.stringEncoding;\n    if (response.textEncodingName) {\n        CFStringEncoding encoding = CFStringConvertIANACharSetNameToEncoding((CFStringRef)response.textEncodingName);\n        if (encoding != kCFStringEncodingInvalidId) {\n            stringEncoding = CFStringConvertEncodingToNSStringEncoding(encoding);\n        }\n    }\n\n    id responseObject = nil;\n    NSError *serializationError = nil;\n    @autoreleasepool {\n        NSString *responseString = [[NSString alloc] initWithData:data encoding:stringEncoding];\n        if (responseString && ![responseString isEqualToString:@\" \"]) {\n            // Workaround for a bug in NSJSONSerialization when Unicode character escape codes are used instead of the actual character\n            // See http://stackoverflow.com/a/12843465/157142\n            data = [responseString dataUsingEncoding:NSUTF8StringEncoding];\n\n            if (data) {\n                if ([data length] > 0) {\n                    responseObject = [NSJSONSerialization JSONObjectWithData:data options:self.readingOptions error:&serializationError];\n                } else {\n                    return nil;\n                }\n            } else {\n                NSDictionary *userInfo = @{\n                                           NSLocalizedDescriptionKey: NSLocalizedStringFromTable(@\"Data failed decoding as a UTF-8 string\", @\"AFNetworking\", nil),\n                                           NSLocalizedFailureReasonErrorKey: [NSString stringWithFormat:NSLocalizedStringFromTable(@\"Could not decode string: %@\", @\"AFNetworking\", nil), responseString]\n                                           };\n\n                serializationError = [NSError errorWithDomain:AFURLResponseSerializationErrorDomain code:NSURLErrorCannotDecodeContentData userInfo:userInfo];\n            }\n        }\n    }\n\n    if (self.removesKeysWithNullValues && responseObject) {\n        responseObject = AFJSONObjectByRemovingKeysWithNullValues(responseObject, self.readingOptions);\n    }\n\n    if (error) {\n        *error = AFErrorWithUnderlyingError(serializationError, *error);\n    }\n\n    return responseObject;\n}\n\n#pragma mark - NSSecureCoding\n\n- (id)initWithCoder:(NSCoder *)decoder {\n    self = [super initWithCoder:decoder];\n    if (!self) {\n        return nil;\n    }\n\n    self.readingOptions = [[decoder decodeObjectOfClass:[NSNumber class] forKey:NSStringFromSelector(@selector(readingOptions))] unsignedIntegerValue];\n    self.removesKeysWithNullValues = [[decoder decodeObjectOfClass:[NSNumber class] forKey:NSStringFromSelector(@selector(removesKeysWithNullValues))] boolValue];\n\n    return self;\n}\n\n- (void)encodeWithCoder:(NSCoder *)coder {\n    [super encodeWithCoder:coder];\n\n    [coder encodeObject:@(self.readingOptions) forKey:NSStringFromSelector(@selector(readingOptions))];\n    [coder encodeObject:@(self.removesKeysWithNullValues) forKey:NSStringFromSelector(@selector(removesKeysWithNullValues))];\n}\n\n#pragma mark - NSCopying\n\n- (id)copyWithZone:(NSZone *)zone {\n    AFJSONResponseSerializer *serializer = [[[self class] allocWithZone:zone] init];\n    serializer.readingOptions = self.readingOptions;\n    serializer.removesKeysWithNullValues = self.removesKeysWithNullValues;\n\n    return serializer;\n}\n\n@end\n\n#pragma mark -\n\n@implementation AFXMLParserResponseSerializer\n\n+ (instancetype)serializer {\n    AFXMLParserResponseSerializer *serializer = [[self alloc] init];\n\n    return serializer;\n}\n\n- (instancetype)init {\n    self = [super init];\n    if (!self) {\n        return nil;\n    }\n\n    self.acceptableContentTypes = [[NSSet alloc] initWithObjects:@\"application/xml\", @\"text/xml\", nil];\n\n    return self;\n}\n\n#pragma mark - AFURLResponseSerialization\n\n- (id)responseObjectForResponse:(NSHTTPURLResponse *)response\n                           data:(NSData *)data\n                          error:(NSError *__autoreleasing *)error\n{\n    if (![self validateResponse:(NSHTTPURLResponse *)response data:data error:error]) {\n        if (!error || AFErrorOrUnderlyingErrorHasCodeInDomain(*error, NSURLErrorCannotDecodeContentData, AFURLResponseSerializationErrorDomain)) {\n            return nil;\n        }\n    }\n\n    return [[NSXMLParser alloc] initWithData:data];\n}\n\n@end\n\n#pragma mark -\n\n#ifdef __MAC_OS_X_VERSION_MIN_REQUIRED\n\n@implementation AFXMLDocumentResponseSerializer\n\n+ (instancetype)serializer {\n    return [self serializerWithXMLDocumentOptions:0];\n}\n\n+ (instancetype)serializerWithXMLDocumentOptions:(NSUInteger)mask {\n    AFXMLDocumentResponseSerializer *serializer = [[self alloc] init];\n    serializer.options = mask;\n\n    return serializer;\n}\n\n- (instancetype)init {\n    self = [super init];\n    if (!self) {\n        return nil;\n    }\n\n    self.acceptableContentTypes = [[NSSet alloc] initWithObjects:@\"application/xml\", @\"text/xml\", nil];\n\n    return self;\n}\n\n#pragma mark - AFURLResponseSerialization\n\n- (id)responseObjectForResponse:(NSURLResponse *)response\n                           data:(NSData *)data\n                          error:(NSError *__autoreleasing *)error\n{\n    if (![self validateResponse:(NSHTTPURLResponse *)response data:data error:error]) {\n        if (!error || AFErrorOrUnderlyingErrorHasCodeInDomain(*error, NSURLErrorCannotDecodeContentData, AFURLResponseSerializationErrorDomain)) {\n            return nil;\n        }\n    }\n\n    NSError *serializationError = nil;\n    NSXMLDocument *document = [[NSXMLDocument alloc] initWithData:data options:self.options error:&serializationError];\n\n    if (error) {\n        *error = AFErrorWithUnderlyingError(serializationError, *error);\n    }\n\n    return document;\n}\n\n#pragma mark - NSSecureCoding\n\n- (id)initWithCoder:(NSCoder *)decoder {\n    self = [super initWithCoder:decoder];\n    if (!self) {\n        return nil;\n    }\n\n    self.options = [[decoder decodeObjectOfClass:[NSNumber class] forKey:NSStringFromSelector(@selector(options))] unsignedIntegerValue];\n\n    return self;\n}\n\n- (void)encodeWithCoder:(NSCoder *)coder {\n    [super encodeWithCoder:coder];\n\n    [coder encodeObject:@(self.options) forKey:NSStringFromSelector(@selector(options))];\n}\n\n#pragma mark - NSCopying\n\n- (id)copyWithZone:(NSZone *)zone {\n    AFXMLDocumentResponseSerializer *serializer = [[[self class] allocWithZone:zone] init];\n    serializer.options = self.options;\n\n    return serializer;\n}\n\n@end\n\n#endif\n\n#pragma mark -\n\n@implementation AFPropertyListResponseSerializer\n\n+ (instancetype)serializer {\n    return [self serializerWithFormat:NSPropertyListXMLFormat_v1_0 readOptions:0];\n}\n\n+ (instancetype)serializerWithFormat:(NSPropertyListFormat)format\n                         readOptions:(NSPropertyListReadOptions)readOptions\n{\n    AFPropertyListResponseSerializer *serializer = [[self alloc] init];\n    serializer.format = format;\n    serializer.readOptions = readOptions;\n\n    return serializer;\n}\n\n- (instancetype)init {\n    self = [super init];\n    if (!self) {\n        return nil;\n    }\n\n    self.acceptableContentTypes = [[NSSet alloc] initWithObjects:@\"application/x-plist\", nil];\n\n    return self;\n}\n\n#pragma mark - AFURLResponseSerialization\n\n- (id)responseObjectForResponse:(NSURLResponse *)response\n                           data:(NSData *)data\n                          error:(NSError *__autoreleasing *)error\n{\n    if (![self validateResponse:(NSHTTPURLResponse *)response data:data error:error]) {\n        if (!error || AFErrorOrUnderlyingErrorHasCodeInDomain(*error, NSURLErrorCannotDecodeContentData, AFURLResponseSerializationErrorDomain)) {\n            return nil;\n        }\n    }\n\n    id responseObject;\n    NSError *serializationError = nil;\n\n    if (data) {\n        responseObject = [NSPropertyListSerialization propertyListWithData:data options:self.readOptions format:NULL error:&serializationError];\n    }\n\n    if (error) {\n        *error = AFErrorWithUnderlyingError(serializationError, *error);\n    }\n\n    return responseObject;\n}\n\n#pragma mark - NSSecureCoding\n\n- (id)initWithCoder:(NSCoder *)decoder {\n    self = [super initWithCoder:decoder];\n    if (!self) {\n        return nil;\n    }\n\n    self.format = [[decoder decodeObjectOfClass:[NSNumber class] forKey:NSStringFromSelector(@selector(format))] unsignedIntegerValue];\n    self.readOptions = [[decoder decodeObjectOfClass:[NSNumber class] forKey:NSStringFromSelector(@selector(readOptions))] unsignedIntegerValue];\n\n    return self;\n}\n\n- (void)encodeWithCoder:(NSCoder *)coder {\n    [super encodeWithCoder:coder];\n\n    [coder encodeObject:@(self.format) forKey:NSStringFromSelector(@selector(format))];\n    [coder encodeObject:@(self.readOptions) forKey:NSStringFromSelector(@selector(readOptions))];\n}\n\n#pragma mark - NSCopying\n\n- (id)copyWithZone:(NSZone *)zone {\n    AFPropertyListResponseSerializer *serializer = [[[self class] allocWithZone:zone] init];\n    serializer.format = self.format;\n    serializer.readOptions = self.readOptions;\n\n    return serializer;\n}\n\n@end\n\n#pragma mark -\n\n#if defined(__IPHONE_OS_VERSION_MIN_REQUIRED)\n#import <CoreGraphics/CoreGraphics.h>\n\nstatic UIImage * AFImageWithDataAtScale(NSData *data, CGFloat scale) {\n    UIImage *image = [[UIImage alloc] initWithData:data];\n    if (image.images) {\n        return image;\n    }\n    \n    return [[UIImage alloc] initWithCGImage:[image CGImage] scale:scale orientation:image.imageOrientation];\n}\n\nstatic UIImage * AFInflatedImageFromResponseWithDataAtScale(NSHTTPURLResponse *response, NSData *data, CGFloat scale) {\n    if (!data || [data length] == 0) {\n        return nil;\n    }\n\n    CGImageRef imageRef = NULL;\n    CGDataProviderRef dataProvider = CGDataProviderCreateWithCFData((__bridge CFDataRef)data);\n\n    if ([response.MIMEType isEqualToString:@\"image/png\"]) {\n        imageRef = CGImageCreateWithPNGDataProvider(dataProvider,  NULL, true, kCGRenderingIntentDefault);\n    } else if ([response.MIMEType isEqualToString:@\"image/jpeg\"]) {\n        imageRef = CGImageCreateWithJPEGDataProvider(dataProvider, NULL, true, kCGRenderingIntentDefault);\n\n        if (imageRef) {\n            CGColorSpaceRef imageColorSpace = CGImageGetColorSpace(imageRef);\n            CGColorSpaceModel imageColorSpaceModel = CGColorSpaceGetModel(imageColorSpace);\n\n            // CGImageCreateWithJPEGDataProvider does not properly handle CMKY, so fall back to AFImageWithDataAtScale\n            if (imageColorSpaceModel == kCGColorSpaceModelCMYK) {\n                CGImageRelease(imageRef);\n                imageRef = NULL;\n            }\n        }\n    }\n\n    CGDataProviderRelease(dataProvider);\n\n    UIImage *image = AFImageWithDataAtScale(data, scale);\n    if (!imageRef) {\n        if (image.images || !image) {\n            return image;\n        }\n\n        imageRef = CGImageCreateCopy([image CGImage]);\n        if (!imageRef) {\n            return nil;\n        }\n    }\n\n    size_t width = CGImageGetWidth(imageRef);\n    size_t height = CGImageGetHeight(imageRef);\n    size_t bitsPerComponent = CGImageGetBitsPerComponent(imageRef);\n\n    if (width * height > 1024 * 1024 || bitsPerComponent > 8) {\n        CGImageRelease(imageRef);\n\n        return image;\n    }\n\n    // CGImageGetBytesPerRow() calculates incorrectly in iOS 5.0, so defer to CGBitmapContextCreate\n    size_t bytesPerRow = 0;\n    CGColorSpaceRef colorSpace = CGColorSpaceCreateDeviceRGB();\n    CGColorSpaceModel colorSpaceModel = CGColorSpaceGetModel(colorSpace);\n    CGBitmapInfo bitmapInfo = CGImageGetBitmapInfo(imageRef);\n\n    if (colorSpaceModel == kCGColorSpaceModelRGB) {\n        uint32_t alpha = (bitmapInfo & kCGBitmapAlphaInfoMask);\n#pragma clang diagnostic push\n#pragma clang diagnostic ignored \"-Wassign-enum\"\n        if (alpha == kCGImageAlphaNone) {\n            bitmapInfo &= ~kCGBitmapAlphaInfoMask;\n            bitmapInfo |= kCGImageAlphaNoneSkipFirst;\n        } else if (!(alpha == kCGImageAlphaNoneSkipFirst || alpha == kCGImageAlphaNoneSkipLast)) {\n            bitmapInfo &= ~kCGBitmapAlphaInfoMask;\n            bitmapInfo |= kCGImageAlphaPremultipliedFirst;\n        }\n#pragma clang diagnostic pop\n    }\n\n    CGContextRef context = CGBitmapContextCreate(NULL, width, height, bitsPerComponent, bytesPerRow, colorSpace, bitmapInfo);\n\n    CGColorSpaceRelease(colorSpace);\n\n    if (!context) {\n        CGImageRelease(imageRef);\n\n        return image;\n    }\n\n    CGContextDrawImage(context, CGRectMake(0.0f, 0.0f, width, height), imageRef);\n    CGImageRef inflatedImageRef = CGBitmapContextCreateImage(context);\n\n    CGContextRelease(context);\n\n    UIImage *inflatedImage = [[UIImage alloc] initWithCGImage:inflatedImageRef scale:scale orientation:image.imageOrientation];\n\n    CGImageRelease(inflatedImageRef);\n    CGImageRelease(imageRef);\n\n    return inflatedImage;\n}\n#endif\n\n\n@implementation AFImageResponseSerializer\n\n- (instancetype)init {\n    self = [super init];\n    if (!self) {\n        return nil;\n    }\n\n    self.acceptableContentTypes = [[NSSet alloc] initWithObjects:@\"image/tiff\", @\"image/jpeg\", @\"image/gif\", @\"image/png\", @\"image/ico\", @\"image/x-icon\", @\"image/bmp\", @\"image/x-bmp\", @\"image/x-xbitmap\", @\"image/x-win-bitmap\", nil];\n\n#if defined(__IPHONE_OS_VERSION_MIN_REQUIRED)\n    self.imageScale = [[UIScreen mainScreen] scale];\n    self.automaticallyInflatesResponseImage = YES;\n#endif\n\n    return self;\n}\n\n#pragma mark - AFURLResponseSerializer\n\n- (id)responseObjectForResponse:(NSURLResponse *)response\n                           data:(NSData *)data\n                          error:(NSError *__autoreleasing *)error\n{\n    if (![self validateResponse:(NSHTTPURLResponse *)response data:data error:error]) {\n        if (!error || AFErrorOrUnderlyingErrorHasCodeInDomain(*error, NSURLErrorCannotDecodeContentData, AFURLResponseSerializationErrorDomain)) {\n            return nil;\n        }\n    }\n\n#if defined(__IPHONE_OS_VERSION_MIN_REQUIRED)\n    if (self.automaticallyInflatesResponseImage) {\n        return AFInflatedImageFromResponseWithDataAtScale((NSHTTPURLResponse *)response, data, self.imageScale);\n    } else {\n        return AFImageWithDataAtScale(data, self.imageScale);\n    }\n#elif defined(__MAC_OS_X_VERSION_MIN_REQUIRED)\n    // Ensure that the image is set to it's correct pixel width and height\n    NSBitmapImageRep *bitimage = [[NSBitmapImageRep alloc] initWithData:data];\n    NSImage *image = [[NSImage alloc] initWithSize:NSMakeSize([bitimage pixelsWide], [bitimage pixelsHigh])];\n    [image addRepresentation:bitimage];\n\n    return image;\n#endif\n\n    return nil;\n}\n\n#pragma mark - NSSecureCoding\n\n- (id)initWithCoder:(NSCoder *)decoder {\n    self = [super initWithCoder:decoder];\n    if (!self) {\n        return nil;\n    }\n\n#if defined(__IPHONE_OS_VERSION_MIN_REQUIRED)\n    NSNumber *imageScale = [decoder decodeObjectOfClass:[NSNumber class] forKey:NSStringFromSelector(@selector(imageScale))];\n#if CGFLOAT_IS_DOUBLE\n    self.imageScale = [imageScale doubleValue];\n#else\n    self.imageScale = [imageScale floatValue];\n#endif\n\n    self.automaticallyInflatesResponseImage = [decoder decodeBoolForKey:NSStringFromSelector(@selector(automaticallyInflatesResponseImage))];\n#endif\n\n    return self;\n}\n\n- (void)encodeWithCoder:(NSCoder *)coder {\n    [super encodeWithCoder:coder];\n\n#if defined(__IPHONE_OS_VERSION_MIN_REQUIRED)\n    [coder encodeObject:@(self.imageScale) forKey:NSStringFromSelector(@selector(imageScale))];\n    [coder encodeBool:self.automaticallyInflatesResponseImage forKey:NSStringFromSelector(@selector(automaticallyInflatesResponseImage))];\n#endif\n}\n\n#pragma mark - NSCopying\n\n- (id)copyWithZone:(NSZone *)zone {\n    AFImageResponseSerializer *serializer = [[[self class] allocWithZone:zone] init];\n\n#if defined(__IPHONE_OS_VERSION_MIN_REQUIRED)\n    serializer.imageScale = self.imageScale;\n    serializer.automaticallyInflatesResponseImage = self.automaticallyInflatesResponseImage;\n#endif\n\n    return serializer;\n}\n\n@end\n\n#pragma mark -\n\n@interface AFCompoundResponseSerializer ()\n@property (readwrite, nonatomic, copy) NSArray *responseSerializers;\n@end\n\n@implementation AFCompoundResponseSerializer\n\n+ (instancetype)compoundSerializerWithResponseSerializers:(NSArray *)responseSerializers {\n    AFCompoundResponseSerializer *serializer = [[self alloc] init];\n    serializer.responseSerializers = responseSerializers;\n\n    return serializer;\n}\n\n#pragma mark - AFURLResponseSerialization\n\n- (id)responseObjectForResponse:(NSURLResponse *)response\n                           data:(NSData *)data\n                          error:(NSError *__autoreleasing *)error\n{\n    for (id <AFURLResponseSerialization> serializer in self.responseSerializers) {\n        if (![serializer isKindOfClass:[AFHTTPResponseSerializer class]]) {\n            continue;\n        }\n\n        NSError *serializerError = nil;\n        id responseObject = [serializer responseObjectForResponse:response data:data error:&serializerError];\n        if (responseObject) {\n            if (error) {\n                *error = AFErrorWithUnderlyingError(serializerError, *error);\n            }\n\n            return responseObject;\n        }\n    }\n\n    return [super responseObjectForResponse:response data:data error:error];\n}\n\n#pragma mark - NSSecureCoding\n\n- (id)initWithCoder:(NSCoder *)decoder {\n    self = [super initWithCoder:decoder];\n    if (!self) {\n        return nil;\n    }\n\n    self.responseSerializers = [decoder decodeObjectOfClass:[NSArray class] forKey:NSStringFromSelector(@selector(responseSerializers))];\n\n    return self;\n}\n\n- (void)encodeWithCoder:(NSCoder *)coder {\n    [super encodeWithCoder:coder];\n\n    [coder encodeObject:self.responseSerializers forKey:NSStringFromSelector(@selector(responseSerializers))];\n}\n\n#pragma mark - NSCopying\n\n- (id)copyWithZone:(NSZone *)zone {\n    AFCompoundResponseSerializer *serializer = [[[self class] allocWithZone:zone] init];\n    serializer.responseSerializers = self.responseSerializers;\n\n    return serializer;\n}\n\n@end\n"
  },
  {
    "path": "Pods/AFNetworking/AFNetworking/AFURLSessionManager.h",
    "content": "// AFURLSessionManager.h\n//\n// Copyright (c) 2013-2015 AFNetworking (http://afnetworking.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\n#import <Foundation/Foundation.h>\n\n#import \"AFURLResponseSerialization.h\"\n#import \"AFURLRequestSerialization.h\"\n#import \"AFSecurityPolicy.h\"\n#import \"AFNetworkReachabilityManager.h\"\n\n#ifndef NS_DESIGNATED_INITIALIZER\n#if __has_attribute(objc_designated_initializer)\n#define NS_DESIGNATED_INITIALIZER __attribute__((objc_designated_initializer))\n#else\n#define NS_DESIGNATED_INITIALIZER\n#endif\n#endif\n\n/**\n `AFURLSessionManager` creates and manages an `NSURLSession` object based on a specified `NSURLSessionConfiguration` object, which conforms to `<NSURLSessionTaskDelegate>`, `<NSURLSessionDataDelegate>`, `<NSURLSessionDownloadDelegate>`, and `<NSURLSessionDelegate>`.\n\n ## Subclassing Notes\n\n This is the base class for `AFHTTPSessionManager`, which adds functionality specific to making HTTP requests. If you are looking to extend `AFURLSessionManager` specifically for HTTP, consider subclassing `AFHTTPSessionManager` instead.\n\n ## NSURLSession & NSURLSessionTask Delegate Methods\n\n `AFURLSessionManager` implements the following delegate methods:\n\n ### `NSURLSessionDelegate`\n\n - `URLSession:didBecomeInvalidWithError:`\n - `URLSession:didReceiveChallenge:completionHandler:`\n - `URLSessionDidFinishEventsForBackgroundURLSession:`\n\n ### `NSURLSessionTaskDelegate`\n\n - `URLSession:willPerformHTTPRedirection:newRequest:completionHandler:`\n - `URLSession:task:didReceiveChallenge:completionHandler:`\n - `URLSession:task:didSendBodyData:totalBytesSent:totalBytesExpectedToSend:`\n - `URLSession:task:didCompleteWithError:`\n\n ### `NSURLSessionDataDelegate`\n\n - `URLSession:dataTask:didReceiveResponse:completionHandler:`\n - `URLSession:dataTask:didBecomeDownloadTask:`\n - `URLSession:dataTask:didReceiveData:`\n - `URLSession:dataTask:willCacheResponse:completionHandler:`\n\n ### `NSURLSessionDownloadDelegate`\n\n - `URLSession:downloadTask:didFinishDownloadingToURL:`\n - `URLSession:downloadTask:didWriteData:totalBytesWritten:totalBytesWritten:totalBytesExpectedToWrite:`\n - `URLSession:downloadTask:didResumeAtOffset:expectedTotalBytes:`\n\n If any of these methods are overridden in a subclass, they _must_ call the `super` implementation first.\n\n ## Network Reachability Monitoring\n\n Network reachability status and change monitoring is available through the `reachabilityManager` property. Applications may choose to monitor network reachability conditions in order to prevent or suspend any outbound requests. See `AFNetworkReachabilityManager` for more details.\n\n ## NSCoding Caveats\n\n - Encoded managers do not include any block properties. Be sure to set delegate callback blocks when using `-initWithCoder:` or `NSKeyedUnarchiver`.\n\n ## NSCopying Caveats\n\n - `-copy` and `-copyWithZone:` return a new manager with a new `NSURLSession` created from the configuration of the original.\n - Operation copies do not include any delegate callback blocks, as they often strongly captures a reference to `self`, which would otherwise have the unintuitive side-effect of pointing to the _original_ session manager when copied.\n\n @warning Managers for background sessions must be owned for the duration of their use. This can be accomplished by creating an application-wide or shared singleton instance.\n */\n\n#if (defined(__IPHONE_OS_VERSION_MAX_ALLOWED) && __IPHONE_OS_VERSION_MAX_ALLOWED >= 70000) || (defined(__MAC_OS_X_VERSION_MAX_ALLOWED) && __MAC_OS_X_VERSION_MAX_ALLOWED >= 1090)\n\n@interface AFURLSessionManager : NSObject <NSURLSessionDelegate, NSURLSessionTaskDelegate, NSURLSessionDataDelegate, NSURLSessionDownloadDelegate, NSSecureCoding, NSCopying>\n\n/**\n The managed session.\n */\n@property (readonly, nonatomic, strong) NSURLSession *session;\n\n/**\n The operation queue on which delegate callbacks are run.\n */\n@property (readonly, nonatomic, strong) NSOperationQueue *operationQueue;\n\n/**\n Responses sent from the server in data tasks created with `dataTaskWithRequest:success:failure:` and run using the `GET` / `POST` / et al. convenience methods are automatically validated and serialized by the response serializer. By default, this property is set to an instance of `AFJSONResponseSerializer`.\n\n @warning `responseSerializer` must not be `nil`.\n */\n@property (nonatomic, strong) id <AFURLResponseSerialization> responseSerializer;\n\n///-------------------------------\n/// @name Managing Security Policy\n///-------------------------------\n\n/**\n The security policy used by created request operations to evaluate server trust for secure connections. `AFURLSessionManager` uses the `defaultPolicy` unless otherwise specified.\n */\n@property (nonatomic, strong) AFSecurityPolicy *securityPolicy;\n\n///--------------------------------------\n/// @name Monitoring Network Reachability\n///--------------------------------------\n\n/**\n The network reachability manager. `AFURLSessionManager` uses the `sharedManager` by default.\n */\n@property (readwrite, nonatomic, strong) AFNetworkReachabilityManager *reachabilityManager;\n\n///----------------------------\n/// @name Getting Session Tasks\n///----------------------------\n\n/**\n The data, upload, and download tasks currently run by the managed session.\n */\n@property (readonly, nonatomic, strong) NSArray *tasks;\n\n/**\n The data tasks currently run by the managed session.\n */\n@property (readonly, nonatomic, strong) NSArray *dataTasks;\n\n/**\n The upload tasks currently run by the managed session.\n */\n@property (readonly, nonatomic, strong) NSArray *uploadTasks;\n\n/**\n The download tasks currently run by the managed session.\n */\n@property (readonly, nonatomic, strong) NSArray *downloadTasks;\n\n///-------------------------------\n/// @name Managing Callback Queues\n///-------------------------------\n\n/**\n The dispatch queue for `completionBlock`. If `NULL` (default), the main queue is used.\n */\n#if OS_OBJECT_HAVE_OBJC_SUPPORT\n@property (nonatomic, strong) dispatch_queue_t completionQueue;\n#else\n@property (nonatomic, assign) dispatch_queue_t completionQueue;\n#endif\n\n/**\n The dispatch group for `completionBlock`. If `NULL` (default), a private dispatch group is used.\n */\n#if OS_OBJECT_HAVE_OBJC_SUPPORT\n@property (nonatomic, strong) dispatch_group_t completionGroup;\n#else\n@property (nonatomic, assign) dispatch_group_t completionGroup;\n#endif\n\n///---------------------------------\n/// @name Working Around System Bugs\n///---------------------------------\n\n/**\n Whether to attempt to retry creation of upload tasks for background sessions when initial call returns `nil`. `NO` by default.\n\n @bug As of iOS 7.0, there is a bug where upload tasks created for background tasks are sometimes `nil`. As a workaround, if this property is `YES`, AFNetworking will follow Apple's recommendation to try creating the task again.\n\n @see https://github.com/AFNetworking/AFNetworking/issues/1675\n */\n@property (nonatomic, assign) BOOL attemptsToRecreateUploadTasksForBackgroundSessions;\n\n///---------------------\n/// @name Initialization\n///---------------------\n\n/**\n Creates and returns a manager for a session created with the specified configuration. This is the designated initializer.\n\n @param configuration The configuration used to create the managed session.\n\n @return A manager for a newly-created session.\n */\n- (instancetype)initWithSessionConfiguration:(NSURLSessionConfiguration *)configuration NS_DESIGNATED_INITIALIZER;\n\n/**\n Invalidates the managed session, optionally canceling pending tasks.\n\n @param cancelPendingTasks Whether or not to cancel pending tasks.\n */\n- (void)invalidateSessionCancelingTasks:(BOOL)cancelPendingTasks;\n\n///-------------------------\n/// @name Running Data Tasks\n///-------------------------\n\n/**\n Creates an `NSURLSessionDataTask` with the specified request.\n\n @param request The HTTP request for the request.\n @param completionHandler A block object to be executed when the task finishes. This block has no return value and takes three arguments: the server response, the response object created by that serializer, and the error that occurred, if any.\n */\n- (NSURLSessionDataTask *)dataTaskWithRequest:(NSURLRequest *)request\n                            completionHandler:(void (^)(NSURLResponse *response, id responseObject, NSError *error))completionHandler;\n\n///---------------------------\n/// @name Running Upload Tasks\n///---------------------------\n\n/**\n Creates an `NSURLSessionUploadTask` with the specified request for a local file.\n\n @param request The HTTP request for the request.\n @param fileURL A URL to the local file to be uploaded.\n @param progress A progress object monitoring the current upload progress.\n @param completionHandler A block object to be executed when the task finishes. This block has no return value and takes three arguments: the server response, the response object created by that serializer, and the error that occurred, if any.\n\n @see `attemptsToRecreateUploadTasksForBackgroundSessions`\n */\n- (NSURLSessionUploadTask *)uploadTaskWithRequest:(NSURLRequest *)request\n                                         fromFile:(NSURL *)fileURL\n                                         progress:(NSProgress * __autoreleasing *)progress\n                                completionHandler:(void (^)(NSURLResponse *response, id responseObject, NSError *error))completionHandler;\n\n/**\n Creates an `NSURLSessionUploadTask` with the specified request for an HTTP body.\n\n @param request The HTTP request for the request.\n @param bodyData A data object containing the HTTP body to be uploaded.\n @param progress A progress object monitoring the current upload progress.\n @param completionHandler A block object to be executed when the task finishes. This block has no return value and takes three arguments: the server response, the response object created by that serializer, and the error that occurred, if any.\n */\n- (NSURLSessionUploadTask *)uploadTaskWithRequest:(NSURLRequest *)request\n                                         fromData:(NSData *)bodyData\n                                         progress:(NSProgress * __autoreleasing *)progress\n                                completionHandler:(void (^)(NSURLResponse *response, id responseObject, NSError *error))completionHandler;\n\n/**\n Creates an `NSURLSessionUploadTask` with the specified streaming request.\n\n @param request The HTTP request for the request.\n @param progress A progress object monitoring the current upload progress.\n @param completionHandler A block object to be executed when the task finishes. This block has no return value and takes three arguments: the server response, the response object created by that serializer, and the error that occurred, if any.\n */\n- (NSURLSessionUploadTask *)uploadTaskWithStreamedRequest:(NSURLRequest *)request\n                                                 progress:(NSProgress * __autoreleasing *)progress\n                                        completionHandler:(void (^)(NSURLResponse *response, id responseObject, NSError *error))completionHandler;\n\n///-----------------------------\n/// @name Running Download Tasks\n///-----------------------------\n\n/**\n Creates an `NSURLSessionDownloadTask` with the specified request.\n\n @param request The HTTP request for the request.\n @param progress A progress object monitoring the current download progress.\n @param destination A block object to be executed in order to determine the destination of the downloaded file. This block takes two arguments, the target path & the server response, and returns the desired file URL of the resulting download. The temporary file used during the download will be automatically deleted after being moved to the returned URL.\n @param completionHandler A block to be executed when a task finishes. This block has no return value and takes three arguments: the server response, the path of the downloaded file, and the error describing the network or parsing error that occurred, if any.\n\n @warning If using a background `NSURLSessionConfiguration` on iOS, these blocks will be lost when the app is terminated. Background sessions may prefer to use `-setDownloadTaskDidFinishDownloadingBlock:` to specify the URL for saving the downloaded file, rather than the destination block of this method.\n */\n- (NSURLSessionDownloadTask *)downloadTaskWithRequest:(NSURLRequest *)request\n                                             progress:(NSProgress * __autoreleasing *)progress\n                                          destination:(NSURL * (^)(NSURL *targetPath, NSURLResponse *response))destination\n                                    completionHandler:(void (^)(NSURLResponse *response, NSURL *filePath, NSError *error))completionHandler;\n\n/**\n Creates an `NSURLSessionDownloadTask` with the specified resume data.\n\n @param resumeData The data used to resume downloading.\n @param progress A progress object monitoring the current download progress.\n @param destination A block object to be executed in order to determine the destination of the downloaded file. This block takes two arguments, the target path & the server response, and returns the desired file URL of the resulting download. The temporary file used during the download will be automatically deleted after being moved to the returned URL.\n @param completionHandler A block to be executed when a task finishes. This block has no return value and takes three arguments: the server response, the path of the downloaded file, and the error describing the network or parsing error that occurred, if any.\n */\n- (NSURLSessionDownloadTask *)downloadTaskWithResumeData:(NSData *)resumeData\n                                                progress:(NSProgress * __autoreleasing *)progress\n                                             destination:(NSURL * (^)(NSURL *targetPath, NSURLResponse *response))destination\n                                       completionHandler:(void (^)(NSURLResponse *response, NSURL *filePath, NSError *error))completionHandler;\n\n///---------------------------------\n/// @name Getting Progress for Tasks\n///---------------------------------\n\n/**\n Returns the upload progress of the specified task.\n\n @param uploadTask The session upload task. Must not be `nil`.\n\n @return An `NSProgress` object reporting the upload progress of a task, or `nil` if the progress is unavailable.\n */\n- (NSProgress *)uploadProgressForTask:(NSURLSessionUploadTask *)uploadTask;\n\n/**\n Returns the download progress of the specified task.\n\n @param downloadTask The session download task. Must not be `nil`.\n\n @return An `NSProgress` object reporting the download progress of a task, or `nil` if the progress is unavailable.\n */\n- (NSProgress *)downloadProgressForTask:(NSURLSessionDownloadTask *)downloadTask;\n\n///-----------------------------------------\n/// @name Setting Session Delegate Callbacks\n///-----------------------------------------\n\n/**\n Sets a block to be executed when the managed session becomes invalid, as handled by the `NSURLSessionDelegate` method `URLSession:didBecomeInvalidWithError:`.\n\n @param block A block object to be executed when the managed session becomes invalid. The block has no return value, and takes two arguments: the session, and the error related to the cause of invalidation.\n */\n- (void)setSessionDidBecomeInvalidBlock:(void (^)(NSURLSession *session, NSError *error))block;\n\n/**\n Sets a block to be executed when a connection level authentication challenge has occurred, as handled by the `NSURLSessionDelegate` method `URLSession:didReceiveChallenge:completionHandler:`.\n\n @param block A block object to be executed when a connection level authentication challenge has occurred. The block returns the disposition of the authentication challenge, and takes three arguments: the session, the authentication challenge, and a pointer to the credential that should be used to resolve the challenge.\n */\n- (void)setSessionDidReceiveAuthenticationChallengeBlock:(NSURLSessionAuthChallengeDisposition (^)(NSURLSession *session, NSURLAuthenticationChallenge *challenge, NSURLCredential * __autoreleasing *credential))block;\n\n///--------------------------------------\n/// @name Setting Task Delegate Callbacks\n///--------------------------------------\n\n/**\n Sets a block to be executed when a task requires a new request body stream to send to the remote server, as handled by the `NSURLSessionTaskDelegate` method `URLSession:task:needNewBodyStream:`.\n\n @param block A block object to be executed when a task requires a new request body stream.\n */\n- (void)setTaskNeedNewBodyStreamBlock:(NSInputStream * (^)(NSURLSession *session, NSURLSessionTask *task))block;\n\n/**\n Sets a block to be executed when an HTTP request is attempting to perform a redirection to a different URL, as handled by the `NSURLSessionTaskDelegate` method `URLSession:willPerformHTTPRedirection:newRequest:completionHandler:`.\n\n @param block A block object to be executed when an HTTP request is attempting to perform a redirection to a different URL. The block returns the request to be made for the redirection, and takes four arguments: the session, the task, the redirection response, and the request corresponding to the redirection response.\n */\n- (void)setTaskWillPerformHTTPRedirectionBlock:(NSURLRequest * (^)(NSURLSession *session, NSURLSessionTask *task, NSURLResponse *response, NSURLRequest *request))block;\n\n/**\n Sets a block to be executed when a session task has received a request specific authentication challenge, as handled by the `NSURLSessionTaskDelegate` method `URLSession:task:didReceiveChallenge:completionHandler:`.\n\n @param block A block object to be executed when a session task has received a request specific authentication challenge. The block returns the disposition of the authentication challenge, and takes four arguments: the session, the task, the authentication challenge, and a pointer to the credential that should be used to resolve the challenge.\n */\n- (void)setTaskDidReceiveAuthenticationChallengeBlock:(NSURLSessionAuthChallengeDisposition (^)(NSURLSession *session, NSURLSessionTask *task, NSURLAuthenticationChallenge *challenge, NSURLCredential * __autoreleasing *credential))block;\n\n/**\n Sets a block to be executed periodically to track upload progress, as handled by the `NSURLSessionTaskDelegate` method `URLSession:task:didSendBodyData:totalBytesSent:totalBytesExpectedToSend:`.\n\n @param block A block object to be called when an undetermined number of bytes have been uploaded to the server. This block has no return value and takes five arguments: the session, the task, the number of bytes written since the last time the upload progress block was called, the total bytes written, and the total bytes expected to be written during the request, as initially determined by the length of the HTTP body. This block may be called multiple times, and will execute on the main thread.\n */\n- (void)setTaskDidSendBodyDataBlock:(void (^)(NSURLSession *session, NSURLSessionTask *task, int64_t bytesSent, int64_t totalBytesSent, int64_t totalBytesExpectedToSend))block;\n\n/**\n Sets a block to be executed as the last message related to a specific task, as handled by the `NSURLSessionTaskDelegate` method `URLSession:task:didCompleteWithError:`.\n\n @param block A block object to be executed when a session task is completed. The block has no return value, and takes three arguments: the session, the task, and any error that occurred in the process of executing the task.\n */\n- (void)setTaskDidCompleteBlock:(void (^)(NSURLSession *session, NSURLSessionTask *task, NSError *error))block;\n\n///-------------------------------------------\n/// @name Setting Data Task Delegate Callbacks\n///-------------------------------------------\n\n/**\n Sets a block to be executed when a data task has received a response, as handled by the `NSURLSessionDataDelegate` method `URLSession:dataTask:didReceiveResponse:completionHandler:`.\n\n @param block A block object to be executed when a data task has received a response. The block returns the disposition of the session response, and takes three arguments: the session, the data task, and the received response.\n */\n- (void)setDataTaskDidReceiveResponseBlock:(NSURLSessionResponseDisposition (^)(NSURLSession *session, NSURLSessionDataTask *dataTask, NSURLResponse *response))block;\n\n/**\n Sets a block to be executed when a data task has become a download task, as handled by the `NSURLSessionDataDelegate` method `URLSession:dataTask:didBecomeDownloadTask:`.\n\n @param block A block object to be executed when a data task has become a download task. The block has no return value, and takes three arguments: the session, the data task, and the download task it has become.\n */\n- (void)setDataTaskDidBecomeDownloadTaskBlock:(void (^)(NSURLSession *session, NSURLSessionDataTask *dataTask, NSURLSessionDownloadTask *downloadTask))block;\n\n/**\n Sets a block to be executed when a data task receives data, as handled by the `NSURLSessionDataDelegate` method `URLSession:dataTask:didReceiveData:`.\n\n @param block A block object to be called when an undetermined number of bytes have been downloaded from the server. This block has no return value and takes three arguments: the session, the data task, and the data received. This block may be called multiple times, and will execute on the session manager operation queue.\n */\n- (void)setDataTaskDidReceiveDataBlock:(void (^)(NSURLSession *session, NSURLSessionDataTask *dataTask, NSData *data))block;\n\n/**\n Sets a block to be executed to determine the caching behavior of a data task, as handled by the `NSURLSessionDataDelegate` method `URLSession:dataTask:willCacheResponse:completionHandler:`.\n\n @param block A block object to be executed to determine the caching behavior of a data task. The block returns the response to cache, and takes three arguments: the session, the data task, and the proposed cached URL response.\n */\n- (void)setDataTaskWillCacheResponseBlock:(NSCachedURLResponse * (^)(NSURLSession *session, NSURLSessionDataTask *dataTask, NSCachedURLResponse *proposedResponse))block;\n\n/**\n Sets a block to be executed once all messages enqueued for a session have been delivered, as handled by the `NSURLSessionDataDelegate` method `URLSessionDidFinishEventsForBackgroundURLSession:`.\n\n @param block A block object to be executed once all messages enqueued for a session have been delivered. The block has no return value and takes a single argument: the session.\n */\n- (void)setDidFinishEventsForBackgroundURLSessionBlock:(void (^)(NSURLSession *session))block;\n\n///-----------------------------------------------\n/// @name Setting Download Task Delegate Callbacks\n///-----------------------------------------------\n\n/**\n Sets a block to be executed when a download task has completed a download, as handled by the `NSURLSessionDownloadDelegate` method `URLSession:downloadTask:didFinishDownloadingToURL:`.\n\n @param block A block object to be executed when a download task has completed. The block returns the URL the download should be moved to, and takes three arguments: the session, the download task, and the temporary location of the downloaded file. If the file manager encounters an error while attempting to move the temporary file to the destination, an `AFURLSessionDownloadTaskDidFailToMoveFileNotification` will be posted, with the download task as its object, and the user info of the error.\n */\n- (void)setDownloadTaskDidFinishDownloadingBlock:(NSURL * (^)(NSURLSession *session, NSURLSessionDownloadTask *downloadTask, NSURL *location))block;\n\n/**\n Sets a block to be executed periodically to track download progress, as handled by the `NSURLSessionDownloadDelegate` method `URLSession:downloadTask:didWriteData:totalBytesWritten:totalBytesWritten:totalBytesExpectedToWrite:`.\n\n @param block A block object to be called when an undetermined number of bytes have been downloaded from the server. This block has no return value and takes five arguments: the session, the download task, the number of bytes read since the last time the download progress block was called, the total bytes read, and the total bytes expected to be read during the request, as initially determined by the expected content size of the `NSHTTPURLResponse` object. This block may be called multiple times, and will execute on the session manager operation queue.\n */\n- (void)setDownloadTaskDidWriteDataBlock:(void (^)(NSURLSession *session, NSURLSessionDownloadTask *downloadTask, int64_t bytesWritten, int64_t totalBytesWritten, int64_t totalBytesExpectedToWrite))block;\n\n/**\n Sets a block to be executed when a download task has been resumed, as handled by the `NSURLSessionDownloadDelegate` method `URLSession:downloadTask:didResumeAtOffset:expectedTotalBytes:`.\n\n @param block A block object to be executed when a download task has been resumed. The block has no return value and takes four arguments: the session, the download task, the file offset of the resumed download, and the total number of bytes expected to be downloaded.\n */\n- (void)setDownloadTaskDidResumeBlock:(void (^)(NSURLSession *session, NSURLSessionDownloadTask *downloadTask, int64_t fileOffset, int64_t expectedTotalBytes))block;\n\n@end\n\n#endif\n\n///--------------------\n/// @name Notifications\n///--------------------\n\n/**\n Posted when a task begins executing.\n\n @deprecated Use `AFNetworkingTaskDidResumeNotification` instead.\n */\nextern NSString * const AFNetworkingTaskDidStartNotification DEPRECATED_ATTRIBUTE;\n\n/**\n Posted when a task resumes.\n */\nextern NSString * const AFNetworkingTaskDidResumeNotification;\n\n/**\n Posted when a task finishes executing. Includes a userInfo dictionary with additional information about the task.\n\n @deprecated Use `AFNetworkingTaskDidCompleteNotification` instead.\n */\nextern NSString * const AFNetworkingTaskDidFinishNotification DEPRECATED_ATTRIBUTE;\n\n/**\n Posted when a task finishes executing. Includes a userInfo dictionary with additional information about the task.\n */\nextern NSString * const AFNetworkingTaskDidCompleteNotification;\n\n/**\n Posted when a task suspends its execution.\n */\nextern NSString * const AFNetworkingTaskDidSuspendNotification;\n\n/**\n Posted when a session is invalidated.\n */\nextern NSString * const AFURLSessionDidInvalidateNotification;\n\n/**\n Posted when a session download task encountered an error when moving the temporary download file to a specified destination.\n */\nextern NSString * const AFURLSessionDownloadTaskDidFailToMoveFileNotification;\n\n/**\n The raw response data of the task. Included in the userInfo dictionary of the `AFNetworkingTaskDidFinishNotification` if response data exists for the task.\n\n @deprecated Use `AFNetworkingTaskDidCompleteResponseDataKey` instead.\n */\nextern NSString * const AFNetworkingTaskDidFinishResponseDataKey DEPRECATED_ATTRIBUTE;\n\n/**\n The raw response data of the task. Included in the userInfo dictionary of the `AFNetworkingTaskDidFinishNotification` if response data exists for the task.\n */\nextern NSString * const AFNetworkingTaskDidCompleteResponseDataKey;\n\n/**\n The serialized response object of the task. Included in the userInfo dictionary of the `AFNetworkingTaskDidFinishNotification` if the response was serialized.\n\n @deprecated Use `AFNetworkingTaskDidCompleteSerializedResponseKey` instead.\n */\nextern NSString * const AFNetworkingTaskDidFinishSerializedResponseKey DEPRECATED_ATTRIBUTE;\n\n/**\n The serialized response object of the task. Included in the userInfo dictionary of the `AFNetworkingTaskDidFinishNotification` if the response was serialized.\n */\nextern NSString * const AFNetworkingTaskDidCompleteSerializedResponseKey;\n\n/**\n The response serializer used to serialize the response. Included in the userInfo dictionary of the `AFNetworkingTaskDidFinishNotification` if the task has an associated response serializer.\n\n @deprecated Use `AFNetworkingTaskDidCompleteResponseSerializerKey` instead.\n */\nextern NSString * const AFNetworkingTaskDidFinishResponseSerializerKey DEPRECATED_ATTRIBUTE;\n\n/**\n The response serializer used to serialize the response. Included in the userInfo dictionary of the `AFNetworkingTaskDidFinishNotification` if the task has an associated response serializer.\n */\nextern NSString * const AFNetworkingTaskDidCompleteResponseSerializerKey;\n\n/**\n The file path associated with the download task. Included in the userInfo dictionary of the `AFNetworkingTaskDidFinishNotification` if an the response data has been stored directly to disk.\n\n @deprecated Use `AFNetworkingTaskDidCompleteAssetPathKey` instead.\n */\nextern NSString * const AFNetworkingTaskDidFinishAssetPathKey DEPRECATED_ATTRIBUTE;\n\n/**\n The file path associated with the download task. Included in the userInfo dictionary of the `AFNetworkingTaskDidFinishNotification` if an the response data has been stored directly to disk.\n */\nextern NSString * const AFNetworkingTaskDidCompleteAssetPathKey;\n\n/**\n Any error associated with the task, or the serialization of the response. Included in the userInfo dictionary of the `AFNetworkingTaskDidFinishNotification` if an error exists.\n\n @deprecated Use `AFNetworkingTaskDidCompleteErrorKey` instead.\n */\nextern NSString * const AFNetworkingTaskDidFinishErrorKey DEPRECATED_ATTRIBUTE;\n\n/**\n Any error associated with the task, or the serialization of the response. Included in the userInfo dictionary of the `AFNetworkingTaskDidFinishNotification` if an error exists.\n */\nextern NSString * const AFNetworkingTaskDidCompleteErrorKey;\n"
  },
  {
    "path": "Pods/AFNetworking/AFNetworking/AFURLSessionManager.m",
    "content": "// AFURLSessionManager.m\n//\n// Copyright (c) 2013-2015 AFNetworking (http://afnetworking.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\n#import \"AFURLSessionManager.h\"\n#import <objc/runtime.h>\n\n#if (defined(__IPHONE_OS_VERSION_MAX_ALLOWED) && __IPHONE_OS_VERSION_MAX_ALLOWED >= 70000) || (defined(__MAC_OS_X_VERSION_MAX_ALLOWED) && __MAC_OS_X_VERSION_MAX_ALLOWED >= 1090)\n\nstatic dispatch_queue_t url_session_manager_creation_queue() {\n    static dispatch_queue_t af_url_session_manager_creation_queue;\n    static dispatch_once_t onceToken;\n    dispatch_once(&onceToken, ^{\n        af_url_session_manager_creation_queue = dispatch_queue_create(\"com.alamofire.networking.session.manager.creation\", DISPATCH_QUEUE_SERIAL);\n    });\n\n    return af_url_session_manager_creation_queue;\n}\n\nstatic dispatch_queue_t url_session_manager_processing_queue() {\n    static dispatch_queue_t af_url_session_manager_processing_queue;\n    static dispatch_once_t onceToken;\n    dispatch_once(&onceToken, ^{\n        af_url_session_manager_processing_queue = dispatch_queue_create(\"com.alamofire.networking.session.manager.processing\", DISPATCH_QUEUE_CONCURRENT);\n    });\n\n    return af_url_session_manager_processing_queue;\n}\n\nstatic dispatch_group_t url_session_manager_completion_group() {\n    static dispatch_group_t af_url_session_manager_completion_group;\n    static dispatch_once_t onceToken;\n    dispatch_once(&onceToken, ^{\n        af_url_session_manager_completion_group = dispatch_group_create();\n    });\n\n    return af_url_session_manager_completion_group;\n}\n\nNSString * const AFNetworkingTaskDidResumeNotification = @\"com.alamofire.networking.task.resume\";\nNSString * const AFNetworkingTaskDidCompleteNotification = @\"com.alamofire.networking.task.complete\";\nNSString * const AFNetworkingTaskDidSuspendNotification = @\"com.alamofire.networking.task.suspend\";\nNSString * const AFURLSessionDidInvalidateNotification = @\"com.alamofire.networking.session.invalidate\";\nNSString * const AFURLSessionDownloadTaskDidFailToMoveFileNotification = @\"com.alamofire.networking.session.download.file-manager-error\";\n\nNSString * const AFNetworkingTaskDidStartNotification = @\"com.alamofire.networking.task.resume\"; // Deprecated\nNSString * const AFNetworkingTaskDidFinishNotification = @\"com.alamofire.networking.task.complete\"; // Deprecated\n\nNSString * const AFNetworkingTaskDidCompleteSerializedResponseKey = @\"com.alamofire.networking.task.complete.serializedresponse\";\nNSString * const AFNetworkingTaskDidCompleteResponseSerializerKey = @\"com.alamofire.networking.task.complete.responseserializer\";\nNSString * const AFNetworkingTaskDidCompleteResponseDataKey = @\"com.alamofire.networking.complete.finish.responsedata\";\nNSString * const AFNetworkingTaskDidCompleteErrorKey = @\"com.alamofire.networking.task.complete.error\";\nNSString * const AFNetworkingTaskDidCompleteAssetPathKey = @\"com.alamofire.networking.task.complete.assetpath\";\n\nNSString * const AFNetworkingTaskDidFinishSerializedResponseKey = @\"com.alamofire.networking.task.complete.serializedresponse\"; // Deprecated\nNSString * const AFNetworkingTaskDidFinishResponseSerializerKey = @\"com.alamofire.networking.task.complete.responseserializer\"; // Deprecated\nNSString * const AFNetworkingTaskDidFinishResponseDataKey = @\"com.alamofire.networking.complete.finish.responsedata\"; // Deprecated\nNSString * const AFNetworkingTaskDidFinishErrorKey = @\"com.alamofire.networking.task.complete.error\"; // Deprecated\nNSString * const AFNetworkingTaskDidFinishAssetPathKey = @\"com.alamofire.networking.task.complete.assetpath\"; // Deprecated\n\nstatic NSString * const AFURLSessionManagerLockName = @\"com.alamofire.networking.session.manager.lock\";\n\nstatic NSUInteger const AFMaximumNumberOfAttemptsToRecreateBackgroundSessionUploadTask = 3;\n\nstatic void * AFTaskStateChangedContext = &AFTaskStateChangedContext;\n\ntypedef void (^AFURLSessionDidBecomeInvalidBlock)(NSURLSession *session, NSError *error);\ntypedef NSURLSessionAuthChallengeDisposition (^AFURLSessionDidReceiveAuthenticationChallengeBlock)(NSURLSession *session, NSURLAuthenticationChallenge *challenge, NSURLCredential * __autoreleasing *credential);\n\ntypedef NSURLRequest * (^AFURLSessionTaskWillPerformHTTPRedirectionBlock)(NSURLSession *session, NSURLSessionTask *task, NSURLResponse *response, NSURLRequest *request);\ntypedef NSURLSessionAuthChallengeDisposition (^AFURLSessionTaskDidReceiveAuthenticationChallengeBlock)(NSURLSession *session, NSURLSessionTask *task, NSURLAuthenticationChallenge *challenge, NSURLCredential * __autoreleasing *credential);\ntypedef void (^AFURLSessionDidFinishEventsForBackgroundURLSessionBlock)(NSURLSession *session);\n\ntypedef NSInputStream * (^AFURLSessionTaskNeedNewBodyStreamBlock)(NSURLSession *session, NSURLSessionTask *task);\ntypedef void (^AFURLSessionTaskDidSendBodyDataBlock)(NSURLSession *session, NSURLSessionTask *task, int64_t bytesSent, int64_t totalBytesSent, int64_t totalBytesExpectedToSend);\ntypedef void (^AFURLSessionTaskDidCompleteBlock)(NSURLSession *session, NSURLSessionTask *task, NSError *error);\n\ntypedef NSURLSessionResponseDisposition (^AFURLSessionDataTaskDidReceiveResponseBlock)(NSURLSession *session, NSURLSessionDataTask *dataTask, NSURLResponse *response);\ntypedef void (^AFURLSessionDataTaskDidBecomeDownloadTaskBlock)(NSURLSession *session, NSURLSessionDataTask *dataTask, NSURLSessionDownloadTask *downloadTask);\ntypedef void (^AFURLSessionDataTaskDidReceiveDataBlock)(NSURLSession *session, NSURLSessionDataTask *dataTask, NSData *data);\ntypedef NSCachedURLResponse * (^AFURLSessionDataTaskWillCacheResponseBlock)(NSURLSession *session, NSURLSessionDataTask *dataTask, NSCachedURLResponse *proposedResponse);\n\ntypedef NSURL * (^AFURLSessionDownloadTaskDidFinishDownloadingBlock)(NSURLSession *session, NSURLSessionDownloadTask *downloadTask, NSURL *location);\ntypedef void (^AFURLSessionDownloadTaskDidWriteDataBlock)(NSURLSession *session, NSURLSessionDownloadTask *downloadTask, int64_t bytesWritten, int64_t totalBytesWritten, int64_t totalBytesExpectedToWrite);\ntypedef void (^AFURLSessionDownloadTaskDidResumeBlock)(NSURLSession *session, NSURLSessionDownloadTask *downloadTask, int64_t fileOffset, int64_t expectedTotalBytes);\n\ntypedef void (^AFURLSessionTaskCompletionHandler)(NSURLResponse *response, id responseObject, NSError *error);\n\n#pragma mark -\n\n@interface AFURLSessionManagerTaskDelegate : NSObject <NSURLSessionTaskDelegate, NSURLSessionDataDelegate, NSURLSessionDownloadDelegate>\n@property (nonatomic, weak) AFURLSessionManager *manager;\n@property (nonatomic, strong) NSMutableData *mutableData;\n@property (nonatomic, strong) NSProgress *progress;\n@property (nonatomic, copy) NSURL *downloadFileURL;\n@property (nonatomic, copy) AFURLSessionDownloadTaskDidFinishDownloadingBlock downloadTaskDidFinishDownloading;\n@property (nonatomic, copy) AFURLSessionTaskCompletionHandler completionHandler;\n@end\n\n@implementation AFURLSessionManagerTaskDelegate\n\n- (instancetype)init {\n    self = [super init];\n    if (!self) {\n        return nil;\n    }\n\n    self.mutableData = [NSMutableData data];\n\n    self.progress = [NSProgress progressWithTotalUnitCount:0];\n\n    return self;\n}\n\n#pragma mark - NSURLSessionTaskDelegate\n\n- (void)URLSession:(__unused NSURLSession *)session\n              task:(__unused NSURLSessionTask *)task\n   didSendBodyData:(__unused int64_t)bytesSent\n    totalBytesSent:(int64_t)totalBytesSent\ntotalBytesExpectedToSend:(int64_t)totalBytesExpectedToSend\n{\n    self.progress.totalUnitCount = totalBytesExpectedToSend;\n    self.progress.completedUnitCount = totalBytesSent;\n}\n\n- (void)URLSession:(__unused NSURLSession *)session\n              task:(NSURLSessionTask *)task\ndidCompleteWithError:(NSError *)error\n{\n#pragma clang diagnostic push\n#pragma clang diagnostic ignored \"-Wgnu\"\n    __strong AFURLSessionManager *manager = self.manager;\n\n    __block id responseObject = nil;\n\n    __block NSMutableDictionary *userInfo = [NSMutableDictionary dictionary];\n    userInfo[AFNetworkingTaskDidCompleteResponseSerializerKey] = manager.responseSerializer;\n\n    if (self.downloadFileURL) {\n        userInfo[AFNetworkingTaskDidCompleteAssetPathKey] = self.downloadFileURL;\n    } else if (self.mutableData) {\n        userInfo[AFNetworkingTaskDidCompleteResponseDataKey] = [NSData dataWithData:self.mutableData];\n    }\n\n    if (error) {\n        userInfo[AFNetworkingTaskDidCompleteErrorKey] = error;\n\n        dispatch_group_async(manager.completionGroup ?: url_session_manager_completion_group(), manager.completionQueue ?: dispatch_get_main_queue(), ^{\n            if (self.completionHandler) {\n                self.completionHandler(task.response, responseObject, error);\n            }\n\n            dispatch_async(dispatch_get_main_queue(), ^{\n                [[NSNotificationCenter defaultCenter] postNotificationName:AFNetworkingTaskDidCompleteNotification object:task userInfo:userInfo];\n            });\n        });\n    } else {\n        dispatch_async(url_session_manager_processing_queue(), ^{\n            NSError *serializationError = nil;\n            responseObject = [manager.responseSerializer responseObjectForResponse:task.response data:[NSData dataWithData:self.mutableData] error:&serializationError];\n\n            if (self.downloadFileURL) {\n                responseObject = self.downloadFileURL;\n            }\n\n            if (responseObject) {\n                userInfo[AFNetworkingTaskDidCompleteSerializedResponseKey] = responseObject;\n            }\n\n            if (serializationError) {\n                userInfo[AFNetworkingTaskDidCompleteErrorKey] = serializationError;\n            }\n\n            dispatch_group_async(manager.completionGroup ?: url_session_manager_completion_group(), manager.completionQueue ?: dispatch_get_main_queue(), ^{\n                if (self.completionHandler) {\n                    self.completionHandler(task.response, responseObject, serializationError);\n                }\n\n                dispatch_async(dispatch_get_main_queue(), ^{\n                    [[NSNotificationCenter defaultCenter] postNotificationName:AFNetworkingTaskDidCompleteNotification object:task userInfo:userInfo];\n                });\n            });\n        });\n    }\n#pragma clang diagnostic pop\n}\n\n#pragma mark - NSURLSessionDataTaskDelegate\n\n- (void)URLSession:(__unused NSURLSession *)session\n          dataTask:(__unused NSURLSessionDataTask *)dataTask\n    didReceiveData:(NSData *)data\n{\n    [self.mutableData appendData:data];\n}\n\n#pragma mark - NSURLSessionDownloadTaskDelegate\n\n- (void)URLSession:(NSURLSession *)session\n      downloadTask:(NSURLSessionDownloadTask *)downloadTask\ndidFinishDownloadingToURL:(NSURL *)location\n{\n    NSError *fileManagerError = nil;\n    self.downloadFileURL = nil;\n\n    if (self.downloadTaskDidFinishDownloading) {\n        self.downloadFileURL = self.downloadTaskDidFinishDownloading(session, downloadTask, location);\n        if (self.downloadFileURL) {\n            [[NSFileManager defaultManager] moveItemAtURL:location toURL:self.downloadFileURL error:&fileManagerError];\n\n            if (fileManagerError) {\n                [[NSNotificationCenter defaultCenter] postNotificationName:AFURLSessionDownloadTaskDidFailToMoveFileNotification object:downloadTask userInfo:fileManagerError.userInfo];\n            }\n        }\n    }\n}\n\n- (void)URLSession:(__unused NSURLSession *)session\n      downloadTask:(__unused NSURLSessionDownloadTask *)downloadTask\n      didWriteData:(__unused int64_t)bytesWritten\n totalBytesWritten:(int64_t)totalBytesWritten\ntotalBytesExpectedToWrite:(int64_t)totalBytesExpectedToWrite\n{\n    self.progress.totalUnitCount = totalBytesExpectedToWrite;\n    self.progress.completedUnitCount = totalBytesWritten;\n}\n\n- (void)URLSession:(__unused NSURLSession *)session\n      downloadTask:(__unused NSURLSessionDownloadTask *)downloadTask\n didResumeAtOffset:(int64_t)fileOffset\nexpectedTotalBytes:(int64_t)expectedTotalBytes {\n    self.progress.totalUnitCount = expectedTotalBytes;\n    self.progress.completedUnitCount = fileOffset;\n}\n\n@end\n\n#pragma mark -\n\n/*\n A workaround for issues related to key-value observing the `state` of an `NSURLSessionTask`.\n\n See https://github.com/AFNetworking/AFNetworking/issues/1477\n */\n\nstatic inline void af_swizzleSelector(Class class, SEL originalSelector, SEL swizzledSelector) {\n    Method originalMethod = class_getInstanceMethod(class, originalSelector);\n    Method swizzledMethod = class_getInstanceMethod(class, swizzledSelector);\n    if (class_addMethod(class, originalSelector, method_getImplementation(swizzledMethod), method_getTypeEncoding(swizzledMethod))) {\n        class_replaceMethod(class, swizzledSelector, method_getImplementation(originalMethod), method_getTypeEncoding(originalMethod));\n    } else {\n        method_exchangeImplementations(originalMethod, swizzledMethod);\n    }\n}\n\nstatic inline void af_addMethod(Class class, SEL selector, Method method) {\n    class_addMethod(class, selector,  method_getImplementation(method),  method_getTypeEncoding(method));\n}\n\nstatic NSString * const AFNSURLSessionTaskDidResumeNotification  = @\"com.alamofire.networking.nsurlsessiontask.resume\";\nstatic NSString * const AFNSURLSessionTaskDidSuspendNotification = @\"com.alamofire.networking.nsurlsessiontask.suspend\";\n\n@interface NSURLSessionTask (_AFStateObserving)\n@end\n\n@implementation NSURLSessionTask (_AFStateObserving)\n\n+ (void)initialize {\n    if ([NSURLSessionTask class]) {\n        NSURLSessionDataTask *dataTask = [[NSURLSession sessionWithConfiguration:nil] dataTaskWithURL:nil];\n        Class taskClass = [dataTask superclass];\n\n        af_addMethod(taskClass, @selector(af_resume),  class_getInstanceMethod(self, @selector(af_resume)));\n        af_addMethod(taskClass, @selector(af_suspend), class_getInstanceMethod(self, @selector(af_suspend)));\n        af_swizzleSelector(taskClass, @selector(resume), @selector(af_resume));\n        af_swizzleSelector(taskClass, @selector(suspend), @selector(af_suspend));\n\n        [dataTask cancel];\n    }\n}\n\n#pragma mark -\n\n- (void)af_resume {\n    NSURLSessionTaskState state = self.state;\n    [self af_resume];\n\n    if (state != NSURLSessionTaskStateRunning) {\n        [[NSNotificationCenter defaultCenter] postNotificationName:AFNSURLSessionTaskDidResumeNotification object:self];\n    }\n}\n\n- (void)af_suspend {\n    NSURLSessionTaskState state = self.state;\n    [self af_suspend];\n\n    if (state != NSURLSessionTaskStateSuspended) {\n        [[NSNotificationCenter defaultCenter] postNotificationName:AFNSURLSessionTaskDidSuspendNotification object:self];\n    }\n}\n\n@end\n\n#pragma mark -\n\n@interface AFURLSessionManager ()\n@property (readwrite, nonatomic, strong) NSURLSessionConfiguration *sessionConfiguration;\n@property (readwrite, nonatomic, strong) NSOperationQueue *operationQueue;\n@property (readwrite, nonatomic, strong) NSURLSession *session;\n@property (readwrite, nonatomic, strong) NSMutableDictionary *mutableTaskDelegatesKeyedByTaskIdentifier;\n@property (readonly, nonatomic, copy) NSString *taskDescriptionForSessionTasks;\n@property (readwrite, nonatomic, strong) NSLock *lock;\n@property (readwrite, nonatomic, copy) AFURLSessionDidBecomeInvalidBlock sessionDidBecomeInvalid;\n@property (readwrite, nonatomic, copy) AFURLSessionDidReceiveAuthenticationChallengeBlock sessionDidReceiveAuthenticationChallenge;\n@property (readwrite, nonatomic, copy) AFURLSessionDidFinishEventsForBackgroundURLSessionBlock didFinishEventsForBackgroundURLSession;\n@property (readwrite, nonatomic, copy) AFURLSessionTaskWillPerformHTTPRedirectionBlock taskWillPerformHTTPRedirection;\n@property (readwrite, nonatomic, copy) AFURLSessionTaskDidReceiveAuthenticationChallengeBlock taskDidReceiveAuthenticationChallenge;\n@property (readwrite, nonatomic, copy) AFURLSessionTaskNeedNewBodyStreamBlock taskNeedNewBodyStream;\n@property (readwrite, nonatomic, copy) AFURLSessionTaskDidSendBodyDataBlock taskDidSendBodyData;\n@property (readwrite, nonatomic, copy) AFURLSessionTaskDidCompleteBlock taskDidComplete;\n@property (readwrite, nonatomic, copy) AFURLSessionDataTaskDidReceiveResponseBlock dataTaskDidReceiveResponse;\n@property (readwrite, nonatomic, copy) AFURLSessionDataTaskDidBecomeDownloadTaskBlock dataTaskDidBecomeDownloadTask;\n@property (readwrite, nonatomic, copy) AFURLSessionDataTaskDidReceiveDataBlock dataTaskDidReceiveData;\n@property (readwrite, nonatomic, copy) AFURLSessionDataTaskWillCacheResponseBlock dataTaskWillCacheResponse;\n@property (readwrite, nonatomic, copy) AFURLSessionDownloadTaskDidFinishDownloadingBlock downloadTaskDidFinishDownloading;\n@property (readwrite, nonatomic, copy) AFURLSessionDownloadTaskDidWriteDataBlock downloadTaskDidWriteData;\n@property (readwrite, nonatomic, copy) AFURLSessionDownloadTaskDidResumeBlock downloadTaskDidResume;\n@end\n\n@implementation AFURLSessionManager\n\n- (instancetype)init {\n    return [self initWithSessionConfiguration:nil];\n}\n\n- (instancetype)initWithSessionConfiguration:(NSURLSessionConfiguration *)configuration {\n    self = [super init];\n    if (!self) {\n        return nil;\n    }\n\n    if (!configuration) {\n        configuration = [NSURLSessionConfiguration defaultSessionConfiguration];\n    }\n\n    self.sessionConfiguration = configuration;\n\n    self.operationQueue = [[NSOperationQueue alloc] init];\n    self.operationQueue.maxConcurrentOperationCount = 1;\n\n    self.session = [NSURLSession sessionWithConfiguration:self.sessionConfiguration delegate:self delegateQueue:self.operationQueue];\n\n    self.responseSerializer = [AFJSONResponseSerializer serializer];\n\n    self.securityPolicy = [AFSecurityPolicy defaultPolicy];\n\n    self.reachabilityManager = [AFNetworkReachabilityManager sharedManager];\n\n    self.mutableTaskDelegatesKeyedByTaskIdentifier = [[NSMutableDictionary alloc] init];\n\n    self.lock = [[NSLock alloc] init];\n    self.lock.name = AFURLSessionManagerLockName;\n\n    [self.session getTasksWithCompletionHandler:^(NSArray *dataTasks, NSArray *uploadTasks, NSArray *downloadTasks) {\n        for (NSURLSessionDataTask *task in dataTasks) {\n            [self addDelegateForDataTask:task completionHandler:nil];\n        }\n\n        for (NSURLSessionUploadTask *uploadTask in uploadTasks) {\n            [self addDelegateForUploadTask:uploadTask progress:nil completionHandler:nil];\n        }\n\n        for (NSURLSessionDownloadTask *downloadTask in downloadTasks) {\n            [self addDelegateForDownloadTask:downloadTask progress:nil destination:nil completionHandler:nil];\n        }\n    }];\n\n    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(taskDidResume:) name:AFNSURLSessionTaskDidResumeNotification object:nil];\n    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(taskDidSuspend:) name:AFNSURLSessionTaskDidSuspendNotification object:nil];\n\n    return self;\n}\n\n- (void)dealloc {\n    [[NSNotificationCenter defaultCenter] removeObserver:self];\n}\n\n#pragma mark -\n\n- (NSString *)taskDescriptionForSessionTasks {\n    return [NSString stringWithFormat:@\"%p\", self];\n}\n\n- (void)taskDidResume:(NSNotification *)notification {\n    NSURLSessionTask *task = notification.object;\n    if ([task respondsToSelector:@selector(taskDescription)]) {\n        if ([task.taskDescription isEqualToString:self.taskDescriptionForSessionTasks]) {\n            dispatch_async(dispatch_get_main_queue(), ^{\n                [[NSNotificationCenter defaultCenter] postNotificationName:AFNetworkingTaskDidResumeNotification object:task];\n            });\n        }\n    }\n}\n\n- (void)taskDidSuspend:(NSNotification *)notification {\n    NSURLSessionTask *task = notification.object;\n    if ([task respondsToSelector:@selector(taskDescription)]) {\n        if ([task.taskDescription isEqualToString:self.taskDescriptionForSessionTasks]) {\n            dispatch_async(dispatch_get_main_queue(), ^{\n                [[NSNotificationCenter defaultCenter] postNotificationName:AFNetworkingTaskDidSuspendNotification object:task];\n            });\n        }\n    }\n}\n\n#pragma mark -\n\n- (AFURLSessionManagerTaskDelegate *)delegateForTask:(NSURLSessionTask *)task {\n    NSParameterAssert(task);\n\n    AFURLSessionManagerTaskDelegate *delegate = nil;\n    [self.lock lock];\n    delegate = self.mutableTaskDelegatesKeyedByTaskIdentifier[@(task.taskIdentifier)];\n    [self.lock unlock];\n\n    return delegate;\n}\n\n- (void)setDelegate:(AFURLSessionManagerTaskDelegate *)delegate\n            forTask:(NSURLSessionTask *)task\n{\n    NSParameterAssert(task);\n    NSParameterAssert(delegate);\n\n    [self.lock lock];\n    self.mutableTaskDelegatesKeyedByTaskIdentifier[@(task.taskIdentifier)] = delegate;\n    [self.lock unlock];\n}\n\n- (void)addDelegateForDataTask:(NSURLSessionDataTask *)dataTask\n             completionHandler:(void (^)(NSURLResponse *response, id responseObject, NSError *error))completionHandler\n{\n    AFURLSessionManagerTaskDelegate *delegate = [[AFURLSessionManagerTaskDelegate alloc] init];\n    delegate.manager = self;\n    delegate.completionHandler = completionHandler;\n\n    dataTask.taskDescription = self.taskDescriptionForSessionTasks;\n    [self setDelegate:delegate forTask:dataTask];\n}\n\n- (void)addDelegateForUploadTask:(NSURLSessionUploadTask *)uploadTask\n                        progress:(NSProgress * __autoreleasing *)progress\n               completionHandler:(void (^)(NSURLResponse *response, id responseObject, NSError *error))completionHandler\n{\n    AFURLSessionManagerTaskDelegate *delegate = [[AFURLSessionManagerTaskDelegate alloc] init];\n    delegate.manager = self;\n    delegate.completionHandler = completionHandler;\n\n    int64_t totalUnitCount = uploadTask.countOfBytesExpectedToSend;\n    if(totalUnitCount == NSURLSessionTransferSizeUnknown) {\n        NSString *contentLength = [uploadTask.originalRequest valueForHTTPHeaderField:@\"Content-Length\"];\n        if(contentLength) {\n            totalUnitCount = (int64_t)[contentLength longLongValue];\n        }\n    }\n\n    if (delegate.progress) {\n        delegate.progress.totalUnitCount = totalUnitCount;\n    } else {\n        delegate.progress = [NSProgress progressWithTotalUnitCount:totalUnitCount];\n    }\n\n    delegate.progress.pausingHandler = ^{\n        [uploadTask suspend];\n    };\n    delegate.progress.cancellationHandler = ^{\n        [uploadTask cancel];\n    };\n\n    if (progress) {\n        *progress = delegate.progress;\n    }\n\n    uploadTask.taskDescription = self.taskDescriptionForSessionTasks;\n\n    [self setDelegate:delegate forTask:uploadTask];\n}\n\n- (void)addDelegateForDownloadTask:(NSURLSessionDownloadTask *)downloadTask\n                          progress:(NSProgress * __autoreleasing *)progress\n                       destination:(NSURL * (^)(NSURL *targetPath, NSURLResponse *response))destination\n                 completionHandler:(void (^)(NSURLResponse *response, NSURL *filePath, NSError *error))completionHandler\n{\n    AFURLSessionManagerTaskDelegate *delegate = [[AFURLSessionManagerTaskDelegate alloc] init];\n    delegate.manager = self;\n    delegate.completionHandler = completionHandler;\n\n    if (destination) {\n        delegate.downloadTaskDidFinishDownloading = ^NSURL * (NSURLSession * __unused session, NSURLSessionDownloadTask *task, NSURL *location) {\n            return destination(location, task.response);\n        };\n    }\n\n    if (progress) {\n        *progress = delegate.progress;\n    }\n\n    downloadTask.taskDescription = self.taskDescriptionForSessionTasks;\n\n    [self setDelegate:delegate forTask:downloadTask];\n}\n\n- (void)removeDelegateForTask:(NSURLSessionTask *)task {\n    NSParameterAssert(task);\n\n    [self.lock lock];\n    [self.mutableTaskDelegatesKeyedByTaskIdentifier removeObjectForKey:@(task.taskIdentifier)];\n    [self.lock unlock];\n}\n\n- (void)removeAllDelegates {\n    [self.lock lock];\n    [self.mutableTaskDelegatesKeyedByTaskIdentifier removeAllObjects];\n    [self.lock unlock];\n}\n\n#pragma mark -\n\n- (NSArray *)tasksForKeyPath:(NSString *)keyPath {\n    __block NSArray *tasks = nil;\n    dispatch_semaphore_t semaphore = dispatch_semaphore_create(0);\n    [self.session getTasksWithCompletionHandler:^(NSArray *dataTasks, NSArray *uploadTasks, NSArray *downloadTasks) {\n        if ([keyPath isEqualToString:NSStringFromSelector(@selector(dataTasks))]) {\n            tasks = dataTasks;\n        } else if ([keyPath isEqualToString:NSStringFromSelector(@selector(uploadTasks))]) {\n            tasks = uploadTasks;\n        } else if ([keyPath isEqualToString:NSStringFromSelector(@selector(downloadTasks))]) {\n            tasks = downloadTasks;\n        } else if ([keyPath isEqualToString:NSStringFromSelector(@selector(tasks))]) {\n            tasks = [@[dataTasks, uploadTasks, downloadTasks] valueForKeyPath:@\"@unionOfArrays.self\"];\n        }\n\n        dispatch_semaphore_signal(semaphore);\n    }];\n\n    dispatch_semaphore_wait(semaphore, DISPATCH_TIME_FOREVER);\n\n    return tasks;\n}\n\n- (NSArray *)tasks {\n    return [self tasksForKeyPath:NSStringFromSelector(_cmd)];\n}\n\n- (NSArray *)dataTasks {\n    return [self tasksForKeyPath:NSStringFromSelector(_cmd)];\n}\n\n- (NSArray *)uploadTasks {\n    return [self tasksForKeyPath:NSStringFromSelector(_cmd)];\n}\n\n- (NSArray *)downloadTasks {\n    return [self tasksForKeyPath:NSStringFromSelector(_cmd)];\n}\n\n#pragma mark -\n\n- (void)invalidateSessionCancelingTasks:(BOOL)cancelPendingTasks {\n    dispatch_async(dispatch_get_main_queue(), ^{\n        if (cancelPendingTasks) {\n            [self.session invalidateAndCancel];\n        } else {\n            [self.session finishTasksAndInvalidate];\n        }\n    });\n}\n\n#pragma mark -\n\n- (void)setResponseSerializer:(id <AFURLResponseSerialization>)responseSerializer {\n    NSParameterAssert(responseSerializer);\n\n    _responseSerializer = responseSerializer;\n}\n\n#pragma mark -\n\n- (NSURLSessionDataTask *)dataTaskWithRequest:(NSURLRequest *)request\n                            completionHandler:(void (^)(NSURLResponse *response, id responseObject, NSError *error))completionHandler\n{\n    __block NSURLSessionDataTask *dataTask = nil;\n    dispatch_sync(url_session_manager_creation_queue(), ^{\n        dataTask = [self.session dataTaskWithRequest:request];\n    });\n\n    [self addDelegateForDataTask:dataTask completionHandler:completionHandler];\n\n    return dataTask;\n}\n\n#pragma mark -\n\n- (NSURLSessionUploadTask *)uploadTaskWithRequest:(NSURLRequest *)request\n                                         fromFile:(NSURL *)fileURL\n                                         progress:(NSProgress * __autoreleasing *)progress\n                                completionHandler:(void (^)(NSURLResponse *response, id responseObject, NSError *error))completionHandler\n{\n    __block NSURLSessionUploadTask *uploadTask = nil;\n    dispatch_sync(url_session_manager_creation_queue(), ^{\n        uploadTask = [self.session uploadTaskWithRequest:request fromFile:fileURL];\n    });\n\n    if (!uploadTask && self.attemptsToRecreateUploadTasksForBackgroundSessions && self.session.configuration.identifier) {\n        for (NSUInteger attempts = 0; !uploadTask && attempts < AFMaximumNumberOfAttemptsToRecreateBackgroundSessionUploadTask; attempts++) {\n            uploadTask = [self.session uploadTaskWithRequest:request fromFile:fileURL];\n        }\n    }\n\n    [self addDelegateForUploadTask:uploadTask progress:progress completionHandler:completionHandler];\n\n    return uploadTask;\n}\n\n- (NSURLSessionUploadTask *)uploadTaskWithRequest:(NSURLRequest *)request\n                                         fromData:(NSData *)bodyData\n                                         progress:(NSProgress * __autoreleasing *)progress\n                                completionHandler:(void (^)(NSURLResponse *response, id responseObject, NSError *error))completionHandler\n{\n    __block NSURLSessionUploadTask *uploadTask = nil;\n    dispatch_sync(url_session_manager_creation_queue(), ^{\n        uploadTask = [self.session uploadTaskWithRequest:request fromData:bodyData];\n    });\n\n    [self addDelegateForUploadTask:uploadTask progress:progress completionHandler:completionHandler];\n\n    return uploadTask;\n}\n\n- (NSURLSessionUploadTask *)uploadTaskWithStreamedRequest:(NSURLRequest *)request\n                                                 progress:(NSProgress * __autoreleasing *)progress\n                                        completionHandler:(void (^)(NSURLResponse *response, id responseObject, NSError *error))completionHandler\n{\n    __block NSURLSessionUploadTask *uploadTask = nil;\n    dispatch_sync(url_session_manager_creation_queue(), ^{\n        uploadTask = [self.session uploadTaskWithStreamedRequest:request];\n    });\n\n    [self addDelegateForUploadTask:uploadTask progress:progress completionHandler:completionHandler];\n\n    return uploadTask;\n}\n\n#pragma mark -\n\n- (NSURLSessionDownloadTask *)downloadTaskWithRequest:(NSURLRequest *)request\n                                             progress:(NSProgress * __autoreleasing *)progress\n                                          destination:(NSURL * (^)(NSURL *targetPath, NSURLResponse *response))destination\n                                    completionHandler:(void (^)(NSURLResponse *response, NSURL *filePath, NSError *error))completionHandler\n{\n    __block NSURLSessionDownloadTask *downloadTask = nil;\n    dispatch_sync(url_session_manager_creation_queue(), ^{\n        downloadTask = [self.session downloadTaskWithRequest:request];\n    });\n\n    [self addDelegateForDownloadTask:downloadTask progress:progress destination:destination completionHandler:completionHandler];\n\n    return downloadTask;\n}\n\n- (NSURLSessionDownloadTask *)downloadTaskWithResumeData:(NSData *)resumeData\n                                                progress:(NSProgress * __autoreleasing *)progress\n                                             destination:(NSURL * (^)(NSURL *targetPath, NSURLResponse *response))destination\n                                       completionHandler:(void (^)(NSURLResponse *response, NSURL *filePath, NSError *error))completionHandler\n{\n    __block NSURLSessionDownloadTask *downloadTask = nil;\n    dispatch_sync(url_session_manager_creation_queue(), ^{\n        downloadTask = [self.session downloadTaskWithResumeData:resumeData];\n    });\n\n    [self addDelegateForDownloadTask:downloadTask progress:progress destination:destination completionHandler:completionHandler];\n\n    return downloadTask;\n}\n\n#pragma mark -\n\n- (NSProgress *)uploadProgressForTask:(NSURLSessionUploadTask *)uploadTask {\n    return [[self delegateForTask:uploadTask] progress];\n}\n\n- (NSProgress *)downloadProgressForTask:(NSURLSessionDownloadTask *)downloadTask {\n    return [[self delegateForTask:downloadTask] progress];\n}\n\n#pragma mark -\n\n- (void)setSessionDidBecomeInvalidBlock:(void (^)(NSURLSession *session, NSError *error))block {\n    self.sessionDidBecomeInvalid = block;\n}\n\n- (void)setSessionDidReceiveAuthenticationChallengeBlock:(NSURLSessionAuthChallengeDisposition (^)(NSURLSession *session, NSURLAuthenticationChallenge *challenge, NSURLCredential * __autoreleasing *credential))block {\n    self.sessionDidReceiveAuthenticationChallenge = block;\n}\n\n- (void)setDidFinishEventsForBackgroundURLSessionBlock:(void (^)(NSURLSession *session))block {\n    self.didFinishEventsForBackgroundURLSession = block;\n}\n\n#pragma mark -\n\n- (void)setTaskNeedNewBodyStreamBlock:(NSInputStream * (^)(NSURLSession *session, NSURLSessionTask *task))block {\n    self.taskNeedNewBodyStream = block;\n}\n\n- (void)setTaskWillPerformHTTPRedirectionBlock:(NSURLRequest * (^)(NSURLSession *session, NSURLSessionTask *task, NSURLResponse *response, NSURLRequest *request))block {\n    self.taskWillPerformHTTPRedirection = block;\n}\n\n- (void)setTaskDidReceiveAuthenticationChallengeBlock:(NSURLSessionAuthChallengeDisposition (^)(NSURLSession *session, NSURLSessionTask *task, NSURLAuthenticationChallenge *challenge, NSURLCredential * __autoreleasing *credential))block {\n    self.taskDidReceiveAuthenticationChallenge = block;\n}\n\n- (void)setTaskDidSendBodyDataBlock:(void (^)(NSURLSession *session, NSURLSessionTask *task, int64_t bytesSent, int64_t totalBytesSent, int64_t totalBytesExpectedToSend))block {\n    self.taskDidSendBodyData = block;\n}\n\n- (void)setTaskDidCompleteBlock:(void (^)(NSURLSession *session, NSURLSessionTask *task, NSError *error))block {\n    self.taskDidComplete = block;\n}\n\n#pragma mark -\n\n- (void)setDataTaskDidReceiveResponseBlock:(NSURLSessionResponseDisposition (^)(NSURLSession *session, NSURLSessionDataTask *dataTask, NSURLResponse *response))block {\n    self.dataTaskDidReceiveResponse = block;\n}\n\n- (void)setDataTaskDidBecomeDownloadTaskBlock:(void (^)(NSURLSession *session, NSURLSessionDataTask *dataTask, NSURLSessionDownloadTask *downloadTask))block {\n    self.dataTaskDidBecomeDownloadTask = block;\n}\n\n- (void)setDataTaskDidReceiveDataBlock:(void (^)(NSURLSession *session, NSURLSessionDataTask *dataTask, NSData *data))block {\n    self.dataTaskDidReceiveData = block;\n}\n\n- (void)setDataTaskWillCacheResponseBlock:(NSCachedURLResponse * (^)(NSURLSession *session, NSURLSessionDataTask *dataTask, NSCachedURLResponse *proposedResponse))block {\n    self.dataTaskWillCacheResponse = block;\n}\n\n#pragma mark -\n\n- (void)setDownloadTaskDidFinishDownloadingBlock:(NSURL * (^)(NSURLSession *session, NSURLSessionDownloadTask *downloadTask, NSURL *location))block {\n    self.downloadTaskDidFinishDownloading = block;\n}\n\n- (void)setDownloadTaskDidWriteDataBlock:(void (^)(NSURLSession *session, NSURLSessionDownloadTask *downloadTask, int64_t bytesWritten, int64_t totalBytesWritten, int64_t totalBytesExpectedToWrite))block {\n    self.downloadTaskDidWriteData = block;\n}\n\n- (void)setDownloadTaskDidResumeBlock:(void (^)(NSURLSession *session, NSURLSessionDownloadTask *downloadTask, int64_t fileOffset, int64_t expectedTotalBytes))block {\n    self.downloadTaskDidResume = block;\n}\n\n#pragma mark - NSObject\n\n- (NSString *)description {\n    return [NSString stringWithFormat:@\"<%@: %p, session: %@, operationQueue: %@>\", NSStringFromClass([self class]), self, self.session, self.operationQueue];\n}\n\n- (BOOL)respondsToSelector:(SEL)selector {\n    if (selector == @selector(URLSession:task:willPerformHTTPRedirection:newRequest:completionHandler:)) {\n        return self.taskWillPerformHTTPRedirection != nil;\n    } else if (selector == @selector(URLSession:dataTask:didReceiveResponse:completionHandler:)) {\n        return self.dataTaskDidReceiveResponse != nil;\n    } else if (selector == @selector(URLSession:dataTask:willCacheResponse:completionHandler:)) {\n        return self.dataTaskWillCacheResponse != nil;\n    } else if (selector == @selector(URLSessionDidFinishEventsForBackgroundURLSession:)) {\n        return self.didFinishEventsForBackgroundURLSession != nil;\n    }\n\n    return [[self class] instancesRespondToSelector:selector];\n}\n\n#pragma mark - NSURLSessionDelegate\n\n- (void)URLSession:(NSURLSession *)session\ndidBecomeInvalidWithError:(NSError *)error\n{\n    if (self.sessionDidBecomeInvalid) {\n        self.sessionDidBecomeInvalid(session, error);\n    }\n\n    [self removeAllDelegates];\n    [[NSNotificationCenter defaultCenter] postNotificationName:AFURLSessionDidInvalidateNotification object:session];\n}\n\n- (void)URLSession:(NSURLSession *)session\ndidReceiveChallenge:(NSURLAuthenticationChallenge *)challenge\n completionHandler:(void (^)(NSURLSessionAuthChallengeDisposition disposition, NSURLCredential *credential))completionHandler\n{\n    NSURLSessionAuthChallengeDisposition disposition = NSURLSessionAuthChallengePerformDefaultHandling;\n    __block NSURLCredential *credential = nil;\n\n    if (self.sessionDidReceiveAuthenticationChallenge) {\n        disposition = self.sessionDidReceiveAuthenticationChallenge(session, challenge, &credential);\n    } else {\n        if ([challenge.protectionSpace.authenticationMethod isEqualToString:NSURLAuthenticationMethodServerTrust]) {\n            if ([self.securityPolicy evaluateServerTrust:challenge.protectionSpace.serverTrust forDomain:challenge.protectionSpace.host]) {\n                credential = [NSURLCredential credentialForTrust:challenge.protectionSpace.serverTrust];\n                if (credential) {\n                    disposition = NSURLSessionAuthChallengeUseCredential;\n                } else {\n                    disposition = NSURLSessionAuthChallengePerformDefaultHandling;\n                }\n            } else {\n                disposition = NSURLSessionAuthChallengeCancelAuthenticationChallenge;\n            }\n        } else {\n            disposition = NSURLSessionAuthChallengePerformDefaultHandling;\n        }\n    }\n\n    if (completionHandler) {\n        completionHandler(disposition, credential);\n    }\n}\n\n#pragma mark - NSURLSessionTaskDelegate\n\n- (void)URLSession:(NSURLSession *)session\n              task:(NSURLSessionTask *)task\nwillPerformHTTPRedirection:(NSHTTPURLResponse *)response\n        newRequest:(NSURLRequest *)request\n completionHandler:(void (^)(NSURLRequest *))completionHandler\n{\n    NSURLRequest *redirectRequest = request;\n\n    if (self.taskWillPerformHTTPRedirection) {\n        redirectRequest = self.taskWillPerformHTTPRedirection(session, task, response, request);\n    }\n\n    if (completionHandler) {\n        completionHandler(redirectRequest);\n    }\n}\n\n- (void)URLSession:(NSURLSession *)session\n              task:(NSURLSessionTask *)task\ndidReceiveChallenge:(NSURLAuthenticationChallenge *)challenge\n completionHandler:(void (^)(NSURLSessionAuthChallengeDisposition disposition, NSURLCredential *credential))completionHandler\n{\n    NSURLSessionAuthChallengeDisposition disposition = NSURLSessionAuthChallengePerformDefaultHandling;\n    __block NSURLCredential *credential = nil;\n\n    if (self.taskDidReceiveAuthenticationChallenge) {\n        disposition = self.taskDidReceiveAuthenticationChallenge(session, task, challenge, &credential);\n    } else {\n        if ([challenge.protectionSpace.authenticationMethod isEqualToString:NSURLAuthenticationMethodServerTrust]) {\n            if ([self.securityPolicy evaluateServerTrust:challenge.protectionSpace.serverTrust forDomain:challenge.protectionSpace.host]) {\n                disposition = NSURLSessionAuthChallengeUseCredential;\n                credential = [NSURLCredential credentialForTrust:challenge.protectionSpace.serverTrust];\n            } else {\n                disposition = NSURLSessionAuthChallengeCancelAuthenticationChallenge;\n            }\n        } else {\n            disposition = NSURLSessionAuthChallengePerformDefaultHandling;\n        }\n    }\n\n    if (completionHandler) {\n        completionHandler(disposition, credential);\n    }\n}\n\n- (void)URLSession:(NSURLSession *)session\n              task:(NSURLSessionTask *)task\n needNewBodyStream:(void (^)(NSInputStream *bodyStream))completionHandler\n{\n    NSInputStream *inputStream = nil;\n\n    if (self.taskNeedNewBodyStream) {\n        inputStream = self.taskNeedNewBodyStream(session, task);\n    } else if (task.originalRequest.HTTPBodyStream && [task.originalRequest.HTTPBodyStream conformsToProtocol:@protocol(NSCopying)]) {\n        inputStream = [task.originalRequest.HTTPBodyStream copy];\n    }\n\n    if (completionHandler) {\n        completionHandler(inputStream);\n    }\n}\n\n- (void)URLSession:(NSURLSession *)session\n              task:(NSURLSessionTask *)task\n   didSendBodyData:(int64_t)bytesSent\n    totalBytesSent:(int64_t)totalBytesSent\ntotalBytesExpectedToSend:(int64_t)totalBytesExpectedToSend\n{\n\n    int64_t totalUnitCount = totalBytesExpectedToSend;\n    if(totalUnitCount == NSURLSessionTransferSizeUnknown) {\n        NSString *contentLength = [task.originalRequest valueForHTTPHeaderField:@\"Content-Length\"];\n        if(contentLength) {\n            totalUnitCount = (int64_t) [contentLength longLongValue];\n        }\n    }\n\n    AFURLSessionManagerTaskDelegate *delegate = [self delegateForTask:task];\n    [delegate URLSession:session task:task didSendBodyData:bytesSent totalBytesSent:totalBytesSent totalBytesExpectedToSend:totalUnitCount];\n\n    if (self.taskDidSendBodyData) {\n        self.taskDidSendBodyData(session, task, bytesSent, totalBytesSent, totalUnitCount);\n    }\n}\n\n- (void)URLSession:(NSURLSession *)session\n              task:(NSURLSessionTask *)task\ndidCompleteWithError:(NSError *)error\n{\n    AFURLSessionManagerTaskDelegate *delegate = [self delegateForTask:task];\n\n    // delegate may be nil when completing a task in the background\n    if (delegate) {\n        [delegate URLSession:session task:task didCompleteWithError:error];\n\n        [self removeDelegateForTask:task];\n    }\n\n    if (self.taskDidComplete) {\n        self.taskDidComplete(session, task, error);\n    }\n\n}\n\n#pragma mark - NSURLSessionDataDelegate\n\n- (void)URLSession:(NSURLSession *)session\n          dataTask:(NSURLSessionDataTask *)dataTask\ndidReceiveResponse:(NSURLResponse *)response\n completionHandler:(void (^)(NSURLSessionResponseDisposition disposition))completionHandler\n{\n    NSURLSessionResponseDisposition disposition = NSURLSessionResponseAllow;\n\n    if (self.dataTaskDidReceiveResponse) {\n        disposition = self.dataTaskDidReceiveResponse(session, dataTask, response);\n    }\n\n    if (completionHandler) {\n        completionHandler(disposition);\n    }\n}\n\n- (void)URLSession:(NSURLSession *)session\n          dataTask:(NSURLSessionDataTask *)dataTask\ndidBecomeDownloadTask:(NSURLSessionDownloadTask *)downloadTask\n{\n    AFURLSessionManagerTaskDelegate *delegate = [self delegateForTask:dataTask];\n    if (delegate) {\n        [self removeDelegateForTask:dataTask];\n        [self setDelegate:delegate forTask:downloadTask];\n    }\n\n    if (self.dataTaskDidBecomeDownloadTask) {\n        self.dataTaskDidBecomeDownloadTask(session, dataTask, downloadTask);\n    }\n}\n\n- (void)URLSession:(NSURLSession *)session\n          dataTask:(NSURLSessionDataTask *)dataTask\n    didReceiveData:(NSData *)data\n{\n    AFURLSessionManagerTaskDelegate *delegate = [self delegateForTask:dataTask];\n    [delegate URLSession:session dataTask:dataTask didReceiveData:data];\n\n    if (self.dataTaskDidReceiveData) {\n        self.dataTaskDidReceiveData(session, dataTask, data);\n    }\n}\n\n- (void)URLSession:(NSURLSession *)session\n          dataTask:(NSURLSessionDataTask *)dataTask\n willCacheResponse:(NSCachedURLResponse *)proposedResponse\n completionHandler:(void (^)(NSCachedURLResponse *cachedResponse))completionHandler\n{\n    NSCachedURLResponse *cachedResponse = proposedResponse;\n\n    if (self.dataTaskWillCacheResponse) {\n        cachedResponse = self.dataTaskWillCacheResponse(session, dataTask, proposedResponse);\n    }\n\n    if (completionHandler) {\n        completionHandler(cachedResponse);\n    }\n}\n\n- (void)URLSessionDidFinishEventsForBackgroundURLSession:(NSURLSession *)session {\n    if (self.didFinishEventsForBackgroundURLSession) {\n        dispatch_async(dispatch_get_main_queue(), ^{\n            self.didFinishEventsForBackgroundURLSession(session);\n        });\n    }\n}\n\n#pragma mark - NSURLSessionDownloadDelegate\n\n- (void)URLSession:(NSURLSession *)session\n      downloadTask:(NSURLSessionDownloadTask *)downloadTask\ndidFinishDownloadingToURL:(NSURL *)location\n{\n    AFURLSessionManagerTaskDelegate *delegate = [self delegateForTask:downloadTask];\n    if (self.downloadTaskDidFinishDownloading) {\n        NSURL *fileURL = self.downloadTaskDidFinishDownloading(session, downloadTask, location);\n        if (fileURL) {\n            delegate.downloadFileURL = fileURL;\n            NSError *error = nil;\n            [[NSFileManager defaultManager] moveItemAtURL:location toURL:fileURL error:&error];\n            if (error) {\n                [[NSNotificationCenter defaultCenter] postNotificationName:AFURLSessionDownloadTaskDidFailToMoveFileNotification object:downloadTask userInfo:error.userInfo];\n            }\n\n            return;\n        }\n    }\n\n    if (delegate) {\n        [delegate URLSession:session downloadTask:downloadTask didFinishDownloadingToURL:location];\n    }\n}\n\n- (void)URLSession:(NSURLSession *)session\n      downloadTask:(NSURLSessionDownloadTask *)downloadTask\n      didWriteData:(int64_t)bytesWritten\n totalBytesWritten:(int64_t)totalBytesWritten\ntotalBytesExpectedToWrite:(int64_t)totalBytesExpectedToWrite\n{\n    AFURLSessionManagerTaskDelegate *delegate = [self delegateForTask:downloadTask];\n    [delegate URLSession:session downloadTask:downloadTask didWriteData:bytesWritten totalBytesWritten:totalBytesWritten totalBytesExpectedToWrite:totalBytesExpectedToWrite];\n\n    if (self.downloadTaskDidWriteData) {\n        self.downloadTaskDidWriteData(session, downloadTask, bytesWritten, totalBytesWritten, totalBytesExpectedToWrite);\n    }\n}\n\n- (void)URLSession:(NSURLSession *)session\n      downloadTask:(NSURLSessionDownloadTask *)downloadTask\n didResumeAtOffset:(int64_t)fileOffset\nexpectedTotalBytes:(int64_t)expectedTotalBytes\n{\n    AFURLSessionManagerTaskDelegate *delegate = [self delegateForTask:downloadTask];\n    [delegate URLSession:session downloadTask:downloadTask didResumeAtOffset:fileOffset expectedTotalBytes:expectedTotalBytes];\n\n    if (self.downloadTaskDidResume) {\n        self.downloadTaskDidResume(session, downloadTask, fileOffset, expectedTotalBytes);\n    }\n}\n\n#pragma mark - NSSecureCoding\n\n+ (BOOL)supportsSecureCoding {\n    return YES;\n}\n\n- (id)initWithCoder:(NSCoder *)decoder {\n    NSURLSessionConfiguration *configuration = [decoder decodeObjectOfClass:[NSURLSessionConfiguration class] forKey:@\"sessionConfiguration\"];\n\n    self = [self initWithSessionConfiguration:configuration];\n    if (!self) {\n        return nil;\n    }\n\n    return self;\n}\n\n- (void)encodeWithCoder:(NSCoder *)coder {\n    [coder encodeObject:self.session.configuration forKey:@\"sessionConfiguration\"];\n}\n\n#pragma mark - NSCopying\n\n- (id)copyWithZone:(NSZone *)zone {\n    return [[[self class] allocWithZone:zone] initWithSessionConfiguration:self.session.configuration];\n}\n\n@end\n\n#endif\n"
  },
  {
    "path": "Pods/AFNetworking/LICENSE",
    "content": "Copyright (c) 2013-2015 AFNetworking (http://afnetworking.com/)\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n"
  },
  {
    "path": "Pods/AFNetworking/README.md",
    "content": "<p align=\"center\" >\n  <img src=\"https://raw.github.com/AFNetworking/AFNetworking/assets/afnetworking-logo.png\" alt=\"AFNetworking\" title=\"AFNetworking\">\n</p>\n\n[![Build Status](https://travis-ci.org/AFNetworking/AFNetworking.svg)](https://travis-ci.org/AFNetworking/AFNetworking)\n\nAFNetworking is a delightful networking library for iOS and Mac OS X. It's built on top of the [Foundation URL Loading System](http://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/URLLoadingSystem/URLLoadingSystem.html), extending the powerful high-level networking abstractions built into Cocoa. It has a modular architecture with well-designed, feature-rich APIs that are a joy to use.\n\nPerhaps the most important feature of all, however, is the amazing community of developers who use and contribute to AFNetworking every day. AFNetworking powers some of the most popular and critically-acclaimed apps on the iPhone, iPad, and Mac.\n\nChoose AFNetworking for your next project, or migrate over your existing projects—you'll be happy you did!\n\n## How To Get Started\n\n- [Download AFNetworking](https://github.com/AFNetworking/AFNetworking/archive/master.zip) and try out the included Mac and iPhone example apps\n- Read the [\"Getting Started\" guide](https://github.com/AFNetworking/AFNetworking/wiki/Getting-Started-with-AFNetworking), [FAQ](https://github.com/AFNetworking/AFNetworking/wiki/AFNetworking-FAQ), or [other articles on the Wiki](https://github.com/AFNetworking/AFNetworking/wiki)\n- Check out the [documentation](http://cocoadocs.org/docsets/AFNetworking/) for a comprehensive look at all of the APIs available in AFNetworking\n- Read the [AFNetworking 2.0 Migration Guide](https://github.com/AFNetworking/AFNetworking/wiki/AFNetworking-2.0-Migration-Guide) for an overview of the architectural changes from 1.0.\n\n## Communication\n\n- If you **need help**, use [Stack Overflow](http://stackoverflow.com/questions/tagged/afnetworking). (Tag 'afnetworking')\n- If you'd like to **ask a general question**, use [Stack Overflow](http://stackoverflow.com/questions/tagged/afnetworking).\n- If you **found a bug**, _and can provide steps to reliably reproduce it_, open an issue.\n- If you **have a feature request**, open an issue.\n- If you **want to contribute**, submit a pull request.\n\n### Installation with CocoaPods\n\n[CocoaPods](http://cocoapods.org) is a dependency manager for Objective-C, which automates and simplifies the process of using 3rd-party libraries like AFNetworking in your projects. See the [\"Getting Started\" guide for more information](https://github.com/AFNetworking/AFNetworking/wiki/Getting-Started-with-AFNetworking).\n\n#### Podfile\n\n```ruby\nplatform :ios, '7.0'\npod \"AFNetworking\", \"~> 2.0\"\n```\n\n## Requirements\n\n| AFNetworking Version | Minimum iOS Target  | Minimum OS X Target  |                                   Notes                                   |\n|:--------------------:|:---------------------------:|:----------------------------:|:-------------------------------------------------------------------------:|\n|          2.x         |            iOS 6            |           OS X 10.8          | Xcode 5 is required. `NSURLSession` subspec requires iOS 7 or OS X 10.9. |\n|          [1.x](https://github.com/AFNetworking/AFNetworking/tree/1.x)         |            iOS 5            |         Mac OS X 10.7        |                                                                           |\n|        [0.10.x](https://github.com/AFNetworking/AFNetworking/tree/0.10.x)        |            iOS 4            |         Mac OS X 10.6        |                                                                           |\n\n(OS X projects must support [64-bit with modern Cocoa runtime](https://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/ObjCRuntimeGuide/Articles/ocrtVersionsPlatforms.html)).\n\n> Programming in Swift? Try [Alamofire](https://github.com/Alamofire/Alamofire) for a more conventional set of APIs.\n\n## Architecture\n\n### NSURLConnection\n\n- `AFURLConnectionOperation`\n- `AFHTTPRequestOperation`\n- `AFHTTPRequestOperationManager`\n\n### NSURLSession _(iOS 7 / Mac OS X 10.9)_\n\n- `AFURLSessionManager`\n- `AFHTTPSessionManager`\n\n### Serialization\n\n* `<AFURLRequestSerialization>`\n  - `AFHTTPRequestSerializer`\n  - `AFJSONRequestSerializer`\n  - `AFPropertyListRequestSerializer`\n* `<AFURLResponseSerialization>`\n  - `AFHTTPResponseSerializer`\n  - `AFJSONResponseSerializer`\n  - `AFXMLParserResponseSerializer`\n  - `AFXMLDocumentResponseSerializer` _(Mac OS X)_\n  - `AFPropertyListResponseSerializer`\n  - `AFImageResponseSerializer`\n  - `AFCompoundResponseSerializer`\n\n### Additional Functionality\n\n- `AFSecurityPolicy`\n- `AFNetworkReachabilityManager`\n\n## Usage\n\n### HTTP Request Operation Manager\n\n`AFHTTPRequestOperationManager` encapsulates the common patterns of communicating with a web application over HTTP, including request creation, response serialization, network reachability monitoring, and security, as well as request operation management.\n\n#### `GET` Request\n\n```objective-c\nAFHTTPRequestOperationManager *manager = [AFHTTPRequestOperationManager manager];\n[manager GET:@\"http://example.com/resources.json\" parameters:nil success:^(AFHTTPRequestOperation *operation, id responseObject) {\n    NSLog(@\"JSON: %@\", responseObject);\n} failure:^(AFHTTPRequestOperation *operation, NSError *error) {\n    NSLog(@\"Error: %@\", error);\n}];\n```\n\n#### `POST` URL-Form-Encoded Request\n\n```objective-c\nAFHTTPRequestOperationManager *manager = [AFHTTPRequestOperationManager manager];\nNSDictionary *parameters = @{@\"foo\": @\"bar\"};\n[manager POST:@\"http://example.com/resources.json\" parameters:parameters success:^(AFHTTPRequestOperation *operation, id responseObject) {\n    NSLog(@\"JSON: %@\", responseObject);\n} failure:^(AFHTTPRequestOperation *operation, NSError *error) {\n    NSLog(@\"Error: %@\", error);\n}];\n```\n\n#### `POST` Multi-Part Request\n\n```objective-c\nAFHTTPRequestOperationManager *manager = [AFHTTPRequestOperationManager manager];\nNSDictionary *parameters = @{@\"foo\": @\"bar\"};\nNSURL *filePath = [NSURL fileURLWithPath:@\"file://path/to/image.png\"];\n[manager POST:@\"http://example.com/resources.json\" parameters:parameters constructingBodyWithBlock:^(id<AFMultipartFormData> formData) {\n    [formData appendPartWithFileURL:filePath name:@\"image\" error:nil];\n} success:^(AFHTTPRequestOperation *operation, id responseObject) {\n    NSLog(@\"Success: %@\", responseObject);\n} failure:^(AFHTTPRequestOperation *operation, NSError *error) {\n    NSLog(@\"Error: %@\", error);\n}];\n```\n\n---\n\n### AFURLSessionManager\n\n`AFURLSessionManager` creates and manages an `NSURLSession` object based on a specified `NSURLSessionConfiguration` object, which conforms to `<NSURLSessionTaskDelegate>`, `<NSURLSessionDataDelegate>`, `<NSURLSessionDownloadDelegate>`, and `<NSURLSessionDelegate>`.\n\n#### Creating a Download Task\n\n```objective-c\nNSURLSessionConfiguration *configuration = [NSURLSessionConfiguration defaultSessionConfiguration];\nAFURLSessionManager *manager = [[AFURLSessionManager alloc] initWithSessionConfiguration:configuration];\n\nNSURL *URL = [NSURL URLWithString:@\"http://example.com/download.zip\"];\nNSURLRequest *request = [NSURLRequest requestWithURL:URL];\n\nNSURLSessionDownloadTask *downloadTask = [manager downloadTaskWithRequest:request progress:nil destination:^NSURL *(NSURL *targetPath, NSURLResponse *response) {\n    NSURL *documentsDirectoryURL = [[NSFileManager defaultManager] URLForDirectory:NSDocumentDirectory inDomain:NSUserDomainMask appropriateForURL:nil create:NO error:nil];\n    return [documentsDirectoryURL URLByAppendingPathComponent:[response suggestedFilename]];\n} completionHandler:^(NSURLResponse *response, NSURL *filePath, NSError *error) {\n    NSLog(@\"File downloaded to: %@\", filePath);\n}];\n[downloadTask resume];\n```\n\n#### Creating an Upload Task\n\n```objective-c\nNSURLSessionConfiguration *configuration = [NSURLSessionConfiguration defaultSessionConfiguration];\nAFURLSessionManager *manager = [[AFURLSessionManager alloc] initWithSessionConfiguration:configuration];\n\nNSURL *URL = [NSURL URLWithString:@\"http://example.com/upload\"];\nNSURLRequest *request = [NSURLRequest requestWithURL:URL];\n\nNSURL *filePath = [NSURL fileURLWithPath:@\"file://path/to/image.png\"];\nNSURLSessionUploadTask *uploadTask = [manager uploadTaskWithRequest:request fromFile:filePath progress:nil completionHandler:^(NSURLResponse *response, id responseObject, NSError *error) {\n    if (error) {\n        NSLog(@\"Error: %@\", error);\n    } else {\n        NSLog(@\"Success: %@ %@\", response, responseObject);\n    }\n}];\n[uploadTask resume];\n```\n\n#### Creating an Upload Task for a Multi-Part Request, with Progress\n\n```objective-c\nNSMutableURLRequest *request = [[AFHTTPRequestSerializer serializer] multipartFormRequestWithMethod:@\"POST\" URLString:@\"http://example.com/upload\" parameters:nil constructingBodyWithBlock:^(id<AFMultipartFormData> formData) {\n        [formData appendPartWithFileURL:[NSURL fileURLWithPath:@\"file://path/to/image.jpg\"] name:@\"file\" fileName:@\"filename.jpg\" mimeType:@\"image/jpeg\" error:nil];\n    } error:nil];\n\nAFURLSessionManager *manager = [[AFURLSessionManager alloc] initWithSessionConfiguration:[NSURLSessionConfiguration defaultSessionConfiguration]];\nNSProgress *progress = nil;\n\nNSURLSessionUploadTask *uploadTask = [manager uploadTaskWithStreamedRequest:request progress:&progress completionHandler:^(NSURLResponse *response, id responseObject, NSError *error) {\n    if (error) {\n        NSLog(@\"Error: %@\", error);\n    } else {\n        NSLog(@\"%@ %@\", response, responseObject);\n    }\n}];\n\n[uploadTask resume];\n```\n\n#### Creating a Data Task\n\n```objective-c\nNSURLSessionConfiguration *configuration = [NSURLSessionConfiguration defaultSessionConfiguration];\nAFURLSessionManager *manager = [[AFURLSessionManager alloc] initWithSessionConfiguration:configuration];\n\nNSURL *URL = [NSURL URLWithString:@\"http://example.com/upload\"];\nNSURLRequest *request = [NSURLRequest requestWithURL:URL];\n\nNSURLSessionDataTask *dataTask = [manager dataTaskWithRequest:request completionHandler:^(NSURLResponse *response, id responseObject, NSError *error) {\n    if (error) {\n        NSLog(@\"Error: %@\", error);\n    } else {\n        NSLog(@\"%@ %@\", response, responseObject);\n    }\n}];\n[dataTask resume];\n```\n\n---\n\n### Request Serialization\n\nRequest serializers create requests from URL strings, encoding parameters as either a query string or HTTP body.\n\n```objective-c\nNSString *URLString = @\"http://example.com\";\nNSDictionary *parameters = @{@\"foo\": @\"bar\", @\"baz\": @[@1, @2, @3]};\n```\n\n#### Query String Parameter Encoding\n\n```objective-c\n[[AFHTTPRequestSerializer serializer] requestWithMethod:@\"GET\" URLString:URLString parameters:parameters error:nil];\n```\n\n    GET http://example.com?foo=bar&baz[]=1&baz[]=2&baz[]=3\n\n#### URL Form Parameter Encoding\n\n```objective-c\n[[AFHTTPRequestSerializer serializer] requestWithMethod:@\"POST\" URLString:URLString parameters:parameters];\n```\n\n    POST http://example.com/\n    Content-Type: application/x-www-form-urlencoded\n\n    foo=bar&baz[]=1&baz[]=2&baz[]=3\n\n#### JSON Parameter Encoding\n\n```objective-c\n[[AFJSONRequestSerializer serializer] requestWithMethod:@\"POST\" URLString:URLString parameters:parameters];\n```\n\n    POST http://example.com/\n    Content-Type: application/json\n\n    {\"foo\": \"bar\", \"baz\": [1,2,3]}\n\n---\n\n### Network Reachability Manager\n\n`AFNetworkReachabilityManager` monitors the reachability of domains, and addresses for both WWAN and WiFi network interfaces.\n\n**Network reachability is a diagnostic tool that can be used to understand why a request might have failed. It should not be used to determine whether or not to make a request.**\n\n#### Shared Network Reachability\n\n```objective-c\n[[AFNetworkReachabilityManager sharedManager] setReachabilityStatusChangeBlock:^(AFNetworkReachabilityStatus status) {\n    NSLog(@\"Reachability: %@\", AFStringFromNetworkReachabilityStatus(status));\n}];\n```\n\n#### HTTP Manager Reachability\n\n```objective-c\nNSURL *baseURL = [NSURL URLWithString:@\"http://example.com/\"];\nAFHTTPRequestOperationManager *manager = [[AFHTTPRequestOperationManager alloc] initWithBaseURL:baseURL];\n\nNSOperationQueue *operationQueue = manager.operationQueue;\n[manager.reachabilityManager setReachabilityStatusChangeBlock:^(AFNetworkReachabilityStatus status) {\n    switch (status) {\n        case AFNetworkReachabilityStatusReachableViaWWAN:\n        case AFNetworkReachabilityStatusReachableViaWiFi:\n            [operationQueue setSuspended:NO];\n            break;\n        case AFNetworkReachabilityStatusNotReachable:\n        default:\n            [operationQueue setSuspended:YES];\n            break;\n    }\n}];\n\n[manager.reachabilityManager startMonitoring];\n```\n\n---\n\n### Security Policy\n\n`AFSecurityPolicy` evaluates server trust against pinned X.509 certificates and public keys over secure connections.\n\nAdding pinned SSL certificates to your app helps prevent man-in-the-middle attacks and other vulnerabilities. Applications dealing with sensitive customer data or financial information are strongly encouraged to route all communication over an HTTPS connection with SSL pinning configured and enabled.\n\n#### Allowing Invalid SSL Certificates\n\n```objective-c\nAFHTTPRequestOperationManager *manager = [AFHTTPRequestOperationManager manager];\nmanager.securityPolicy.allowInvalidCertificates = YES; // not recommended for production\n```\n\n---\n\n### AFHTTPRequestOperation\n\n`AFHTTPRequestOperation` is a subclass of `AFURLConnectionOperation` for requests using the HTTP or HTTPS protocols. It encapsulates the concept of acceptable status codes and content types, which determine the success or failure of a request.\n\nAlthough `AFHTTPRequestOperationManager` is usually the best way to go about making requests, `AFHTTPRequestOperation` can be used by itself.\n\n#### `GET` with `AFHTTPRequestOperation`\n\n```objective-c\nNSURL *URL = [NSURL URLWithString:@\"http://example.com/resources/123.json\"];\nNSURLRequest *request = [NSURLRequest requestWithURL:URL];\nAFHTTPRequestOperation *op = [[AFHTTPRequestOperation alloc] initWithRequest:request];\nop.responseSerializer = [AFJSONResponseSerializer serializer];\n[op setCompletionBlockWithSuccess:^(AFHTTPRequestOperation *operation, id responseObject) {\n    NSLog(@\"JSON: %@\", responseObject);\n} failure:^(AFHTTPRequestOperation *operation, NSError *error) {\n    NSLog(@\"Error: %@\", error);\n}];\n[[NSOperationQueue mainQueue] addOperation:op];\n```\n\n#### Batch of Operations\n\n```objective-c\nNSMutableArray *mutableOperations = [NSMutableArray array];\nfor (NSURL *fileURL in filesToUpload) {\n    NSURLRequest *request = [[AFHTTPRequestSerializer serializer] multipartFormRequestWithMethod:@\"POST\" URLString:@\"http://example.com/upload\" parameters:nil constructingBodyWithBlock:^(id<AFMultipartFormData> formData) {\n        [formData appendPartWithFileURL:fileURL name:@\"images[]\" error:nil];\n    }];\n\n    AFHTTPRequestOperation *operation = [[AFHTTPRequestOperation alloc] initWithRequest:request];\n\n    [mutableOperations addObject:operation];\n}\n\nNSArray *operations = [AFURLConnectionOperation batchOfRequestOperations:@[...] progressBlock:^(NSUInteger numberOfFinishedOperations, NSUInteger totalNumberOfOperations) {\n    NSLog(@\"%lu of %lu complete\", numberOfFinishedOperations, totalNumberOfOperations);\n} completionBlock:^(NSArray *operations) {\n    NSLog(@\"All operations in batch complete\");\n}];\n[[NSOperationQueue mainQueue] addOperations:operations waitUntilFinished:NO];\n```\n\n## Unit Tests\n\nAFNetworking includes a suite of unit tests within the Tests subdirectory. In order to run the unit tests, you must install the testing dependencies via [CocoaPods](http://cocoapods.org/):\n\n    $ cd Tests\n    $ pod install\n\nOnce testing dependencies are installed, you can execute the test suite via the 'iOS Tests' and 'OS X Tests' schemes within Xcode.\n\n### Running Tests from the Command Line\n\nTests can also be run from the command line or within a continuous integration environment. The [`xcpretty`](https://github.com/mneorr/xcpretty) utility needs to be installed before running the tests from the command line:\n\n    $ gem install xcpretty\n\nOnce `xcpretty` is installed, you can execute the suite via `rake test`.\n\n## Credits\n\nAFNetworking was originally created by [Scott Raymond](https://github.com/sco/) and [Mattt Thompson](https://github.com/mattt/) in the development of [Gowalla for iPhone](http://en.wikipedia.org/wiki/Gowalla).\n\nAFNetworking's logo was designed by [Alan Defibaugh](http://www.alandefibaugh.com/).\n\nAnd most of all, thanks to AFNetworking's [growing list of contributors](https://github.com/AFNetworking/AFNetworking/contributors).\n\n## Contact\n\nFollow AFNetworking on Twitter ([@AFNetworking](https://twitter.com/AFNetworking))\n\n### Maintainers\n\n- [Mattt Thompson](http://github.com/mattt) ([@mattt](https://twitter.com/mattt))\n\n## License\n\nAFNetworking is available under the MIT license. See the LICENSE file for more info.\n"
  },
  {
    "path": "Pods/AFNetworking/UIKit+AFNetworking/AFNetworkActivityIndicatorManager.h",
    "content": "// AFNetworkActivityIndicatorManager.h\n//\n// Copyright (c) 2013-2015 AFNetworking (http://afnetworking.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\n#import <Foundation/Foundation.h>\n\n#import <Availability.h>\n\n#if defined(__IPHONE_OS_VERSION_MIN_REQUIRED)\n\n#import <UIKit/UIKit.h>\n\n/**\n `AFNetworkActivityIndicatorManager` manages the state of the network activity indicator in the status bar. When enabled, it will listen for notifications indicating that a network request operation has started or finished, and start or stop animating the indicator accordingly. The number of active requests is incremented and decremented much like a stack or a semaphore, and the activity indicator will animate so long as that number is greater than zero.\n\n You should enable the shared instance of `AFNetworkActivityIndicatorManager` when your application finishes launching. In `AppDelegate application:didFinishLaunchingWithOptions:` you can do so with the following code:\n\n    [[AFNetworkActivityIndicatorManager sharedManager] setEnabled:YES];\n\n By setting `enabled` to `YES` for `sharedManager`, the network activity indicator will show and hide automatically as requests start and finish. You should not ever need to call `incrementActivityCount` or `decrementActivityCount` yourself.\n\n See the Apple Human Interface Guidelines section about the Network Activity Indicator for more information:\n http://developer.apple.com/library/iOS/#documentation/UserExperience/Conceptual/MobileHIG/UIElementGuidelines/UIElementGuidelines.html#//apple_ref/doc/uid/TP40006556-CH13-SW44\n */\n@interface AFNetworkActivityIndicatorManager : NSObject\n\n/**\n A Boolean value indicating whether the manager is enabled.\n\n If YES, the manager will change status bar network activity indicator according to network operation notifications it receives. The default value is NO.\n */\n@property (nonatomic, assign, getter = isEnabled) BOOL enabled;\n\n/**\n A Boolean value indicating whether the network activity indicator is currently displayed in the status bar.\n */\n@property (readonly, nonatomic, assign) BOOL isNetworkActivityIndicatorVisible;\n\n/**\n Returns the shared network activity indicator manager object for the system.\n\n @return The systemwide network activity indicator manager.\n */\n+ (instancetype)sharedManager;\n\n/**\n Increments the number of active network requests. If this number was zero before incrementing, this will start animating the status bar network activity indicator.\n */\n- (void)incrementActivityCount;\n\n/**\n Decrements the number of active network requests. If this number becomes zero after decrementing, this will stop animating the status bar network activity indicator.\n */\n- (void)decrementActivityCount;\n\n@end\n\n#endif\n"
  },
  {
    "path": "Pods/AFNetworking/UIKit+AFNetworking/AFNetworkActivityIndicatorManager.m",
    "content": "// AFNetworkActivityIndicatorManager.m\n//\n// Copyright (c) 2013-2015 AFNetworking (http://afnetworking.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\n#import \"AFNetworkActivityIndicatorManager.h\"\n\n#if defined(__IPHONE_OS_VERSION_MAX_ALLOWED)\n\n#import \"AFHTTPRequestOperation.h\"\n\n#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 70000\n#import \"AFURLSessionManager.h\"\n#endif\n\nstatic NSTimeInterval const kAFNetworkActivityIndicatorInvisibilityDelay = 0.17;\n\nstatic NSURLRequest * AFNetworkRequestFromNotification(NSNotification *notification) {\n    if ([[notification object] isKindOfClass:[AFURLConnectionOperation class]]) {\n        return [(AFURLConnectionOperation *)[notification object] request];\n    }\n\n#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 70000\n    if ([[notification object] respondsToSelector:@selector(originalRequest)]) {\n        return [(NSURLSessionTask *)[notification object] originalRequest];\n    }\n#endif\n\n    return nil;\n}\n\n@interface AFNetworkActivityIndicatorManager ()\n@property (readwrite, nonatomic, assign) NSInteger activityCount;\n@property (readwrite, nonatomic, strong) NSTimer *activityIndicatorVisibilityTimer;\n@property (readonly, nonatomic, getter = isNetworkActivityIndicatorVisible) BOOL networkActivityIndicatorVisible;\n\n- (void)updateNetworkActivityIndicatorVisibility;\n- (void)updateNetworkActivityIndicatorVisibilityDelayed;\n@end\n\n@implementation AFNetworkActivityIndicatorManager\n@dynamic networkActivityIndicatorVisible;\n\n+ (instancetype)sharedManager {\n    static AFNetworkActivityIndicatorManager *_sharedManager = nil;\n    static dispatch_once_t oncePredicate;\n    dispatch_once(&oncePredicate, ^{\n        _sharedManager = [[self alloc] init];\n    });\n\n    return _sharedManager;\n}\n\n+ (NSSet *)keyPathsForValuesAffectingIsNetworkActivityIndicatorVisible {\n    return [NSSet setWithObject:@\"activityCount\"];\n}\n\n- (id)init {\n    self = [super init];\n    if (!self) {\n        return nil;\n    }\n\n    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(networkRequestDidStart:) name:AFNetworkingOperationDidStartNotification object:nil];\n    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(networkRequestDidFinish:) name:AFNetworkingOperationDidFinishNotification object:nil];\n\n#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 70000\n    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(networkRequestDidStart:) name:AFNetworkingTaskDidResumeNotification object:nil];\n    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(networkRequestDidFinish:) name:AFNetworkingTaskDidSuspendNotification object:nil];\n    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(networkRequestDidFinish:) name:AFNetworkingTaskDidCompleteNotification object:nil];\n#endif\n\n    return self;\n}\n\n- (void)dealloc {\n    [[NSNotificationCenter defaultCenter] removeObserver:self];\n\n    [_activityIndicatorVisibilityTimer invalidate];\n}\n\n- (void)updateNetworkActivityIndicatorVisibilityDelayed {\n    if (self.enabled) {\n        // Delay hiding of activity indicator for a short interval, to avoid flickering\n        if (![self isNetworkActivityIndicatorVisible]) {\n            [self.activityIndicatorVisibilityTimer invalidate];\n            self.activityIndicatorVisibilityTimer = [NSTimer timerWithTimeInterval:kAFNetworkActivityIndicatorInvisibilityDelay target:self selector:@selector(updateNetworkActivityIndicatorVisibility) userInfo:nil repeats:NO];\n            [[NSRunLoop mainRunLoop] addTimer:self.activityIndicatorVisibilityTimer forMode:NSRunLoopCommonModes];\n        } else {\n            [self performSelectorOnMainThread:@selector(updateNetworkActivityIndicatorVisibility) withObject:nil waitUntilDone:NO modes:@[NSRunLoopCommonModes]];\n        }\n    }\n}\n\n- (BOOL)isNetworkActivityIndicatorVisible {\n    return self.activityCount > 0;\n}\n\n- (void)updateNetworkActivityIndicatorVisibility {\n#if !defined(AF_APP_EXTENSIONS)\n    [[UIApplication sharedApplication] setNetworkActivityIndicatorVisible:[self isNetworkActivityIndicatorVisible]];\n#endif\n}\n\n- (void)setActivityCount:(NSInteger)activityCount {\n\t@synchronized(self) {\n\t\t_activityCount = activityCount;\n\t}\n\n    dispatch_async(dispatch_get_main_queue(), ^{\n        [self updateNetworkActivityIndicatorVisibilityDelayed];\n    });\n}\n\n- (void)incrementActivityCount {\n    [self willChangeValueForKey:@\"activityCount\"];\n\t@synchronized(self) {\n\t\t_activityCount++;\n\t}\n    [self didChangeValueForKey:@\"activityCount\"];\n\n    dispatch_async(dispatch_get_main_queue(), ^{\n        [self updateNetworkActivityIndicatorVisibilityDelayed];\n    });\n}\n\n- (void)decrementActivityCount {\n    [self willChangeValueForKey:@\"activityCount\"];\n\t@synchronized(self) {\n#pragma clang diagnostic push\n#pragma clang diagnostic ignored \"-Wgnu\"\n\t\t_activityCount = MAX(_activityCount - 1, 0);\n#pragma clang diagnostic pop\n\t}\n    [self didChangeValueForKey:@\"activityCount\"];\n\n    dispatch_async(dispatch_get_main_queue(), ^{\n        [self updateNetworkActivityIndicatorVisibilityDelayed];\n    });\n}\n\n- (void)networkRequestDidStart:(NSNotification *)notification {\n    if ([AFNetworkRequestFromNotification(notification) URL]) {\n        [self incrementActivityCount];\n    }\n}\n\n- (void)networkRequestDidFinish:(NSNotification *)notification {\n    if ([AFNetworkRequestFromNotification(notification) URL]) {\n        [self decrementActivityCount];\n    }\n}\n\n@end\n\n#endif\n"
  },
  {
    "path": "Pods/AFNetworking/UIKit+AFNetworking/UIActivityIndicatorView+AFNetworking.h",
    "content": "// UIActivityIndicatorView+AFNetworking.h\n//\n// Copyright (c) 2013-2015 AFNetworking (http://afnetworking.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\n#import <Foundation/Foundation.h>\n\n#import <Availability.h>\n\n#if defined(__IPHONE_OS_VERSION_MIN_REQUIRED)\n\n#import <UIKit/UIKit.h>\n\n@class AFURLConnectionOperation;\n\n/**\n This category adds methods to the UIKit framework's `UIActivityIndicatorView` class. The methods in this category provide support for automatically starting and stopping animation depending on the loading state of a request operation or session task.\n */\n@interface UIActivityIndicatorView (AFNetworking)\n\n///----------------------------------\n/// @name Animating for Session Tasks\n///----------------------------------\n\n/**\n Binds the animating state to the state of the specified task.\n\n @param task The task. If `nil`, automatic updating from any previously specified operation will be disabled.\n */\n#if __IPHONE_OS_VERSION_MIN_REQUIRED >= 70000\n- (void)setAnimatingWithStateOfTask:(NSURLSessionTask *)task;\n#endif\n\n///---------------------------------------\n/// @name Animating for Request Operations\n///---------------------------------------\n\n/**\n Binds the animating state to the execution state of the specified operation.\n\n @param operation The operation. If `nil`, automatic updating from any previously specified operation will be disabled.\n */\n- (void)setAnimatingWithStateOfOperation:(AFURLConnectionOperation *)operation;\n\n@end\n\n#endif\n"
  },
  {
    "path": "Pods/AFNetworking/UIKit+AFNetworking/UIActivityIndicatorView+AFNetworking.m",
    "content": "// UIActivityIndicatorView+AFNetworking.m\n//\n// Copyright (c) 2013-2015 AFNetworking (http://afnetworking.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\n#import \"UIActivityIndicatorView+AFNetworking.h\"\n\n#if defined(__IPHONE_OS_VERSION_MIN_REQUIRED)\n\n#import \"AFHTTPRequestOperation.h\"\n\n#if __IPHONE_OS_VERSION_MIN_REQUIRED >= 70000\n#import \"AFURLSessionManager.h\"\n#endif\n\n@implementation UIActivityIndicatorView (AFNetworking)\n\n#if __IPHONE_OS_VERSION_MIN_REQUIRED >= 70000\n- (void)setAnimatingWithStateOfTask:(NSURLSessionTask *)task {\n    NSNotificationCenter *notificationCenter = [NSNotificationCenter defaultCenter];\n\n    [notificationCenter removeObserver:self name:AFNetworkingTaskDidResumeNotification object:nil];\n    [notificationCenter removeObserver:self name:AFNetworkingTaskDidSuspendNotification object:nil];\n    [notificationCenter removeObserver:self name:AFNetworkingTaskDidCompleteNotification object:nil];\n\n    if (task) {\n        if (task.state != NSURLSessionTaskStateCompleted) {\n            if (task.state == NSURLSessionTaskStateRunning) {\n                [self startAnimating];\n            } else {\n                [self stopAnimating];\n            }\n\n            [notificationCenter addObserver:self selector:@selector(af_startAnimating) name:AFNetworkingTaskDidResumeNotification object:task];\n            [notificationCenter addObserver:self selector:@selector(af_stopAnimating) name:AFNetworkingTaskDidCompleteNotification object:task];\n            [notificationCenter addObserver:self selector:@selector(af_stopAnimating) name:AFNetworkingTaskDidSuspendNotification object:task];\n        }\n    }\n}\n#endif\n\n#pragma mark -\n\n- (void)setAnimatingWithStateOfOperation:(AFURLConnectionOperation *)operation {\n    NSNotificationCenter *notificationCenter = [NSNotificationCenter defaultCenter];\n\n    [notificationCenter removeObserver:self name:AFNetworkingOperationDidStartNotification object:nil];\n    [notificationCenter removeObserver:self name:AFNetworkingOperationDidFinishNotification object:nil];\n\n    if (operation) {\n        if (![operation isFinished]) {\n            if ([operation isExecuting]) {\n                [self startAnimating];\n            } else {\n                [self stopAnimating];\n            }\n\n            [notificationCenter addObserver:self selector:@selector(af_startAnimating) name:AFNetworkingOperationDidStartNotification object:operation];\n            [notificationCenter addObserver:self selector:@selector(af_stopAnimating) name:AFNetworkingOperationDidFinishNotification object:operation];\n        }\n    }\n}\n\n#pragma mark -\n\n- (void)af_startAnimating {\n    dispatch_async(dispatch_get_main_queue(), ^{\n        [self startAnimating];\n    });\n}\n\n- (void)af_stopAnimating {\n    dispatch_async(dispatch_get_main_queue(), ^{\n        [self stopAnimating];\n    });\n}\n\n@end\n\n#endif\n"
  },
  {
    "path": "Pods/AFNetworking/UIKit+AFNetworking/UIAlertView+AFNetworking.h",
    "content": "// UIAlertView+AFNetworking.h\n//\n// Copyright (c) 2013-2015 AFNetworking (http://afnetworking.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\n#import <Foundation/Foundation.h>\n\n#import <Availability.h>\n\n#if defined(__IPHONE_OS_VERSION_MIN_REQUIRED) && !defined(AF_APP_EXTENSIONS)\n\n#import <UIKit/UIKit.h>\n\n@class AFURLConnectionOperation;\n\n/**\n This category adds methods to the UIKit framework's `UIAlertView` class. The methods in this category provide support for automatically showing an alert if a session task or request operation finishes with an error. Alert title and message are filled from the corresponding `localizedDescription` & `localizedRecoverySuggestion` or `localizedFailureReason` of the error.\n */\n@interface UIAlertView (AFNetworking)\n\n///-------------------------------------\n/// @name Showing Alert for Session Task\n///-------------------------------------\n\n/**\n Shows an alert view with the error of the specified session task, if any.\n\n @param task The session task.\n @param delegate The alert view delegate.\n */\n#if __IPHONE_OS_VERSION_MIN_REQUIRED >= 70000\n+ (void)showAlertViewForTaskWithErrorOnCompletion:(NSURLSessionTask *)task\n                                         delegate:(id)delegate;\n#endif\n\n/**\n Shows an alert view with the error of the specified session task, if any, with a custom cancel button title and other button titles.\n\n @param task The session task.\n @param delegate The alert view delegate.\n @param cancelButtonTitle The title of the cancel button or nil if there is no cancel button. Using this argument is equivalent to setting the cancel button index to the value returned by invoking addButtonWithTitle: specifying this title.\n @param otherButtonTitles The title of another button. Using this argument is equivalent to invoking addButtonWithTitle: with this title to add more buttons. Too many buttons can cause the alert view to scroll. For guidelines on the best ways to use an alert in an app, see \"Temporary Views\". Titles of additional buttons to add to the receiver, terminated with `nil`.\n */\n#if __IPHONE_OS_VERSION_MIN_REQUIRED >= 70000\n+ (void)showAlertViewForTaskWithErrorOnCompletion:(NSURLSessionTask *)task\n                                         delegate:(id)delegate\n                                cancelButtonTitle:(NSString *)cancelButtonTitle\n                                otherButtonTitles:(NSString *)otherButtonTitles, ... NS_REQUIRES_NIL_TERMINATION;\n#endif\n\n///------------------------------------------\n/// @name Showing Alert for Request Operation\n///------------------------------------------\n\n/**\n Shows an alert view with the error of the specified request operation, if any.\n\n @param operation The request operation.\n @param delegate The alert view delegate.\n */\n+ (void)showAlertViewForRequestOperationWithErrorOnCompletion:(AFURLConnectionOperation *)operation\n                                                     delegate:(id)delegate;\n\n/**\n Shows an alert view with the error of the specified request operation, if any, with a custom cancel button title and other button titles.\n\n @param operation The request operation.\n @param delegate The alert view delegate.\n @param cancelButtonTitle The title of the cancel button or nil if there is no cancel button. Using this argument is equivalent to setting the cancel button index to the value returned by invoking addButtonWithTitle: specifying this title.\n @param otherButtonTitles The title of another button. Using this argument is equivalent to invoking addButtonWithTitle: with this title to add more buttons. Too many buttons can cause the alert view to scroll. For guidelines on the best ways to use an alert in an app, see \"Temporary Views\". Titles of additional buttons to add to the receiver, terminated with `nil`.\n */\n+ (void)showAlertViewForRequestOperationWithErrorOnCompletion:(AFURLConnectionOperation *)operation\n                                                     delegate:(id)delegate\n                                            cancelButtonTitle:(NSString *)cancelButtonTitle\n                                            otherButtonTitles:(NSString *)otherButtonTitles, ... NS_REQUIRES_NIL_TERMINATION;\n\n@end\n\n#endif\n"
  },
  {
    "path": "Pods/AFNetworking/UIKit+AFNetworking/UIAlertView+AFNetworking.m",
    "content": "// UIAlertView+AFNetworking.m\n//\n// Copyright (c) 2013-2015 AFNetworking (http://afnetworking.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\n#import \"UIAlertView+AFNetworking.h\"\n\n#if defined(__IPHONE_OS_VERSION_MIN_REQUIRED) && !defined(AF_APP_EXTENSIONS)\n\n#import \"AFURLConnectionOperation.h\"\n\n#if __IPHONE_OS_VERSION_MIN_REQUIRED >= 70000\n#import \"AFURLSessionManager.h\"\n#endif\n\nstatic void AFGetAlertViewTitleAndMessageFromError(NSError *error, NSString * __autoreleasing *title, NSString * __autoreleasing *message) {\n    if (error.localizedDescription && (error.localizedRecoverySuggestion || error.localizedFailureReason)) {\n        *title = error.localizedDescription;\n\n        if (error.localizedRecoverySuggestion) {\n            *message = error.localizedRecoverySuggestion;\n        } else {\n            *message = error.localizedFailureReason;\n        }\n    } else if (error.localizedDescription) {\n        *title = NSLocalizedStringFromTable(@\"Error\", @\"AFNetworking\", @\"Fallback Error Description\");\n        *message = error.localizedDescription;\n    } else {\n        *title = NSLocalizedStringFromTable(@\"Error\", @\"AFNetworking\", @\"Fallback Error Description\");\n        *message = [NSString stringWithFormat:NSLocalizedStringFromTable(@\"%@ Error: %ld\", @\"AFNetworking\", @\"Fallback Error Failure Reason Format\"), error.domain, (long)error.code];\n    }\n}\n\n@implementation UIAlertView (AFNetworking)\n\n#if __IPHONE_OS_VERSION_MIN_REQUIRED >= 70000\n+ (void)showAlertViewForTaskWithErrorOnCompletion:(NSURLSessionTask *)task\n                                         delegate:(id)delegate\n{\n    [self showAlertViewForTaskWithErrorOnCompletion:task delegate:delegate cancelButtonTitle:NSLocalizedStringFromTable(@\"Dismiss\", @\"AFNetworking\", @\"UIAlertView Cancel Button Title\") otherButtonTitles:nil, nil];\n}\n\n+ (void)showAlertViewForTaskWithErrorOnCompletion:(NSURLSessionTask *)task\n                                         delegate:(id)delegate\n                                cancelButtonTitle:(NSString *)cancelButtonTitle\n                                otherButtonTitles:(NSString *)otherButtonTitles, ... NS_REQUIRES_NIL_TERMINATION\n{\n    NSMutableArray *mutableOtherTitles = [NSMutableArray array];\n    va_list otherButtonTitleList;\n    va_start(otherButtonTitleList, otherButtonTitles);\n    {\n        for (NSString *otherButtonTitle = otherButtonTitles; otherButtonTitle != nil; otherButtonTitle = va_arg(otherButtonTitleList, NSString *)) {\n            [mutableOtherTitles addObject:otherButtonTitle];\n        }\n    }\n    va_end(otherButtonTitleList);\n\n    __block __weak id<NSObject> observer = [[NSNotificationCenter defaultCenter] addObserverForName:AFNetworkingTaskDidCompleteNotification object:task queue:[NSOperationQueue mainQueue] usingBlock:^(NSNotification *notification) {\n        NSError *error = notification.userInfo[AFNetworkingTaskDidCompleteErrorKey];\n        if (error) {\n            NSString *title, *message;\n            AFGetAlertViewTitleAndMessageFromError(error, &title, &message);\n\n            UIAlertView *alertView = [[UIAlertView alloc] initWithTitle:nil message:nil delegate:delegate cancelButtonTitle:cancelButtonTitle otherButtonTitles:nil, nil];\n            for (NSString *otherButtonTitle in mutableOtherTitles) {\n                [alertView addButtonWithTitle:otherButtonTitle];\n            }\n            [alertView setTitle:title];\n            [alertView setMessage:message];\n            [alertView show];\n        }\n\n        [[NSNotificationCenter defaultCenter] removeObserver:observer];\n    }];\n}\n#endif\n\n#pragma mark -\n\n+ (void)showAlertViewForRequestOperationWithErrorOnCompletion:(AFURLConnectionOperation *)operation\n                                                     delegate:(id)delegate\n{\n    [self showAlertViewForRequestOperationWithErrorOnCompletion:operation delegate:delegate cancelButtonTitle:NSLocalizedStringFromTable(@\"Dismiss\", @\"AFNetworking\", @\"UIAlertView Cancel Button Title\") otherButtonTitles:nil, nil];\n}\n\n+ (void)showAlertViewForRequestOperationWithErrorOnCompletion:(AFURLConnectionOperation *)operation\n                                                     delegate:(id)delegate\n                                            cancelButtonTitle:(NSString *)cancelButtonTitle\n                                            otherButtonTitles:(NSString *)otherButtonTitles, ... NS_REQUIRES_NIL_TERMINATION\n{\n    NSMutableArray *mutableOtherTitles = [NSMutableArray array];\n    va_list otherButtonTitleList;\n    va_start(otherButtonTitleList, otherButtonTitles);\n    {\n        for (NSString *otherButtonTitle = otherButtonTitles; otherButtonTitle != nil; otherButtonTitle = va_arg(otherButtonTitleList, NSString *)) {\n            [mutableOtherTitles addObject:otherButtonTitle];\n        }\n    }\n    va_end(otherButtonTitleList);\n\n    __block __weak id<NSObject> observer = [[NSNotificationCenter defaultCenter] addObserverForName:AFNetworkingOperationDidFinishNotification object:operation queue:[NSOperationQueue mainQueue] usingBlock:^(NSNotification *notification) {\n\n        if (notification.object && [notification.object isKindOfClass:[AFURLConnectionOperation class]]) {\n            NSError *error = [(AFURLConnectionOperation *)notification.object error];\n            if (error) {\n                NSString *title, *message;\n                AFGetAlertViewTitleAndMessageFromError(error, &title, &message);\n\n                UIAlertView *alertView = [[UIAlertView alloc] initWithTitle:nil message:nil delegate:delegate cancelButtonTitle:cancelButtonTitle otherButtonTitles:nil, nil];\n                for (NSString *otherButtonTitle in mutableOtherTitles) {\n                    [alertView addButtonWithTitle:otherButtonTitle];\n                }\n                [alertView setTitle:title];\n                [alertView setMessage:message];\n                [alertView show];\n            }\n        }\n\n        [[NSNotificationCenter defaultCenter] removeObserver:observer];\n    }];\n}\n\n@end\n\n#endif\n"
  },
  {
    "path": "Pods/AFNetworking/UIKit+AFNetworking/UIButton+AFNetworking.h",
    "content": "// UIButton+AFNetworking.h\n//\n// Copyright (c) 2013-2015 AFNetworking (http://afnetworking.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\n#import <Foundation/Foundation.h>\n\n#import <Availability.h>\n\n#if defined(__IPHONE_OS_VERSION_MIN_REQUIRED)\n\n#import <UIKit/UIKit.h>\n\n@protocol AFURLResponseSerialization, AFImageCache;\n\n/**\n This category adds methods to the UIKit framework's `UIButton` class. The methods in this category provide support for loading remote images and background images asynchronously from a URL.\n\n @warning Compound values for control `state` (such as `UIControlStateHighlighted | UIControlStateDisabled`) are unsupported.\n */\n@interface UIButton (AFNetworking)\n\n///----------------------------\n/// @name Accessing Image Cache\n///----------------------------\n\n/**\n The image cache used to improve image loadiing performance on scroll views. By default, `UIButton` will use the `sharedImageCache` of `UIImageView`.\n */\n+ (id <AFImageCache>)sharedImageCache;\n\n/**\n Set the cache used for image loading.\n\n @param imageCache The image cache.\n */\n+ (void)setSharedImageCache:(id <AFImageCache>)imageCache;\n\n///------------------------------------\n/// @name Accessing Response Serializer\n///------------------------------------\n\n/**\n The response serializer used to create an image representation from the server response and response data. By default, this is an instance of `AFImageResponseSerializer`.\n\n @discussion Subclasses of `AFImageResponseSerializer` could be used to perform post-processing, such as color correction, face detection, or other effects. See https://github.com/AFNetworking/AFCoreImageSerializer\n */\n@property (nonatomic, strong) id <AFURLResponseSerialization> imageResponseSerializer;\n\n///--------------------\n/// @name Setting Image\n///--------------------\n\n/**\n Asynchronously downloads an image from the specified URL, and sets it as the image for the specified state once the request is finished. Any previous image request for the receiver will be cancelled.\n\n  If the image is cached locally, the image is set immediately, otherwise the specified placeholder image will be set immediately, and then the remote image will be set once the request is finished.\n\n @param state The control state.\n @param url The URL used for the image request.\n */\n- (void)setImageForState:(UIControlState)state\n                 withURL:(NSURL *)url;\n\n/**\n Asynchronously downloads an image from the specified URL, and sets it as the image for the specified state once the request is finished. Any previous image request for the receiver will be cancelled.\n\n If the image is cached locally, the image is set immediately, otherwise the specified placeholder image will be set immediately, and then the remote image will be set once the request is finished.\n\n @param state The control state.\n @param url The URL used for the image request.\n @param placeholderImage The image to be set initially, until the image request finishes. If `nil`, the button will not change its image until the image request finishes.\n */\n- (void)setImageForState:(UIControlState)state\n                 withURL:(NSURL *)url\n        placeholderImage:(UIImage *)placeholderImage;\n\n/**\n Asynchronously downloads an image from the specified URL request, and sets it as the image for the specified state once the request is finished. Any previous image request for the receiver will be cancelled.\n\n If the image is cached locally, the image is set immediately, otherwise the specified placeholder image will be set immediately, and then the remote image will be set once the request is finished.\n\n If a success block is specified, it is the responsibility of the block to set the image of the button before returning. If no success block is specified, the default behavior of setting the image with `setImage:forState:` is applied.\n\n @param state The control state.\n @param urlRequest The URL request used for the image request.\n @param placeholderImage The image to be set initially, until the image request finishes. If `nil`, the button will not change its image until the image request finishes.\n @param success A block to be executed when the image request operation finishes successfully. This block has no return value and takes two arguments: the server response and the image. If the image was returned from cache, the request and response parameters will be `nil`.\n @param failure A block object to be executed when the image request operation finishes unsuccessfully, or that finishes successfully. This block has no return value and takes a single argument: the error that occurred.\n */\n- (void)setImageForState:(UIControlState)state\n          withURLRequest:(NSURLRequest *)urlRequest\n        placeholderImage:(UIImage *)placeholderImage\n                 success:(void (^)(NSURLRequest *request, NSHTTPURLResponse *response, UIImage *image))success\n                 failure:(void (^)(NSError *error))failure;\n\n\n///-------------------------------\n/// @name Setting Background Image\n///-------------------------------\n\n/**\n Asynchronously downloads an image from the specified URL, and sets it as the background image for the specified state once the request is finished. Any previous background image request for the receiver will be cancelled.\n\n If the background image is cached locally, the background image is set immediately, otherwise the specified placeholder background image will be set immediately, and then the remote background image will be set once the request is finished.\n\n @param state The control state.\n @param url The URL used for the background image request.\n */\n- (void)setBackgroundImageForState:(UIControlState)state\n                           withURL:(NSURL *)url;\n\n/**\n Asynchronously downloads an image from the specified URL, and sets it as the background image for the specified state once the request is finished. Any previous image request for the receiver will be cancelled.\n\n If the image is cached locally, the image is set immediately, otherwise the specified placeholder image will be set immediately, and then the remote image will be set once the request is finished.\n\n @param state The control state.\n @param url The URL used for the background image request.\n @param placeholderImage The background image to be set initially, until the background image request finishes. If `nil`, the button will not change its background image until the background image request finishes.\n */\n- (void)setBackgroundImageForState:(UIControlState)state\n                           withURL:(NSURL *)url\n                  placeholderImage:(UIImage *)placeholderImage;\n\n/**\n Asynchronously downloads an image from the specified URL request, and sets it as the image for the specified state once the request is finished. Any previous image request for the receiver will be cancelled.\n\n If the image is cached locally, the image is set immediately, otherwise the specified placeholder image will be set immediately, and then the remote image will be set once the request is finished.\n\n If a success block is specified, it is the responsibility of the block to set the image of the button before returning. If no success block is specified, the default behavior of setting the image with `setBackgroundImage:forState:` is applied.\n\n @param state The control state.\n @param urlRequest The URL request used for the image request.\n @param placeholderImage The background image to be set initially, until the background image request finishes. If `nil`, the button will not change its background image until the background image request finishes.\n */\n- (void)setBackgroundImageForState:(UIControlState)state\n                    withURLRequest:(NSURLRequest *)urlRequest\n                  placeholderImage:(UIImage *)placeholderImage\n                           success:(void (^)(NSURLRequest *request, NSHTTPURLResponse *response, UIImage *image))success\n                           failure:(void (^)(NSError *error))failure;\n\n\n///------------------------------\n/// @name Canceling Image Loading\n///------------------------------\n\n/**\n Cancels any executing image operation for the specified control state of the receiver, if one exists.\n\n @param state The control state.\n */\n- (void)cancelImageRequestOperationForState:(UIControlState)state;\n\n/**\n Cancels any executing background image operation for the specified control state of the receiver, if one exists.\n\n @param state The control state.\n */\n- (void)cancelBackgroundImageRequestOperationForState:(UIControlState)state;\n\n@end\n\n#endif\n"
  },
  {
    "path": "Pods/AFNetworking/UIKit+AFNetworking/UIButton+AFNetworking.m",
    "content": "// UIButton+AFNetworking.m\n//\n// Copyright (c) 2013-2015 AFNetworking (http://afnetworking.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\n#import \"UIButton+AFNetworking.h\"\n\n#import <objc/runtime.h>\n\n#if defined(__IPHONE_OS_VERSION_MIN_REQUIRED)\n\n#import \"AFURLResponseSerialization.h\"\n#import \"AFHTTPRequestOperation.h\"\n\n#import \"UIImageView+AFNetworking.h\"\n\n@interface UIButton (_AFNetworking)\n@end\n\n@implementation UIButton (_AFNetworking)\n\n+ (NSOperationQueue *)af_sharedImageRequestOperationQueue {\n    static NSOperationQueue *_af_sharedImageRequestOperationQueue = nil;\n    static dispatch_once_t onceToken;\n    dispatch_once(&onceToken, ^{\n        _af_sharedImageRequestOperationQueue = [[NSOperationQueue alloc] init];\n        _af_sharedImageRequestOperationQueue.maxConcurrentOperationCount = NSOperationQueueDefaultMaxConcurrentOperationCount;\n    });\n\n    return _af_sharedImageRequestOperationQueue;\n}\n\n#pragma mark -\n\nstatic char AFImageRequestOperationNormal;\nstatic char AFImageRequestOperationHighlighted;\nstatic char AFImageRequestOperationSelected;\nstatic char AFImageRequestOperationDisabled;\n\nstatic const char * af_imageRequestOperationKeyForState(UIControlState state) {\n    switch (state) {\n        case UIControlStateHighlighted:\n            return &AFImageRequestOperationHighlighted;\n        case UIControlStateSelected:\n            return &AFImageRequestOperationSelected;\n        case UIControlStateDisabled:\n            return &AFImageRequestOperationDisabled;\n        case UIControlStateNormal:\n        default:\n            return &AFImageRequestOperationNormal;\n    }\n}\n\n- (AFHTTPRequestOperation *)af_imageRequestOperationForState:(UIControlState)state {\n    return (AFHTTPRequestOperation *)objc_getAssociatedObject(self, af_imageRequestOperationKeyForState(state));\n}\n\n- (void)af_setImageRequestOperation:(AFHTTPRequestOperation *)imageRequestOperation\n                           forState:(UIControlState)state\n{\n    objc_setAssociatedObject(self, af_imageRequestOperationKeyForState(state), imageRequestOperation, OBJC_ASSOCIATION_RETAIN_NONATOMIC);\n}\n\n#pragma mark -\n\nstatic char AFBackgroundImageRequestOperationNormal;\nstatic char AFBackgroundImageRequestOperationHighlighted;\nstatic char AFBackgroundImageRequestOperationSelected;\nstatic char AFBackgroundImageRequestOperationDisabled;\n\nstatic const char * af_backgroundImageRequestOperationKeyForState(UIControlState state) {\n    switch (state) {\n        case UIControlStateHighlighted:\n            return &AFBackgroundImageRequestOperationHighlighted;\n        case UIControlStateSelected:\n            return &AFBackgroundImageRequestOperationSelected;\n        case UIControlStateDisabled:\n            return &AFBackgroundImageRequestOperationDisabled;\n        case UIControlStateNormal:\n        default:\n            return &AFBackgroundImageRequestOperationNormal;\n    }\n}\n\n- (AFHTTPRequestOperation *)af_backgroundImageRequestOperationForState:(UIControlState)state {\n    return (AFHTTPRequestOperation *)objc_getAssociatedObject(self, af_backgroundImageRequestOperationKeyForState(state));\n}\n\n- (void)af_setBackgroundImageRequestOperation:(AFHTTPRequestOperation *)imageRequestOperation\n                                     forState:(UIControlState)state\n{\n    objc_setAssociatedObject(self, af_backgroundImageRequestOperationKeyForState(state), imageRequestOperation, OBJC_ASSOCIATION_RETAIN_NONATOMIC);\n}\n\n@end\n\n#pragma mark -\n\n@implementation UIButton (AFNetworking)\n\n+ (id <AFImageCache>)sharedImageCache {\n#pragma clang diagnostic push\n#pragma clang diagnostic ignored \"-Wgnu\"\n    return objc_getAssociatedObject(self, @selector(sharedImageCache)) ?: [UIImageView sharedImageCache];\n#pragma clang diagnostic pop\n}\n\n+ (void)setSharedImageCache:(id <AFImageCache>)imageCache {\n    objc_setAssociatedObject(self, @selector(sharedImageCache), imageCache, OBJC_ASSOCIATION_RETAIN_NONATOMIC);\n}\n\n#pragma mark -\n\n- (id <AFURLResponseSerialization>)imageResponseSerializer {\n    static id <AFURLResponseSerialization> _af_defaultImageResponseSerializer = nil;\n    static dispatch_once_t onceToken;\n    dispatch_once(&onceToken, ^{\n        _af_defaultImageResponseSerializer = [AFImageResponseSerializer serializer];\n    });\n\n#pragma clang diagnostic push\n#pragma clang diagnostic ignored \"-Wgnu\"\n    return objc_getAssociatedObject(self, @selector(imageResponseSerializer)) ?: _af_defaultImageResponseSerializer;\n#pragma clang diagnostic pop\n}\n\n- (void)setImageResponseSerializer:(id <AFURLResponseSerialization>)serializer {\n    objc_setAssociatedObject(self, @selector(imageResponseSerializer), serializer, OBJC_ASSOCIATION_RETAIN_NONATOMIC);\n}\n\n#pragma mark -\n\n- (void)setImageForState:(UIControlState)state\n                 withURL:(NSURL *)url\n{\n    [self setImageForState:state withURL:url placeholderImage:nil];\n}\n\n- (void)setImageForState:(UIControlState)state\n                 withURL:(NSURL *)url\n        placeholderImage:(UIImage *)placeholderImage\n{\n    NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:url];\n    [request addValue:@\"image/*\" forHTTPHeaderField:@\"Accept\"];\n\n    [self setImageForState:state withURLRequest:request placeholderImage:placeholderImage success:nil failure:nil];\n}\n\n- (void)setImageForState:(UIControlState)state\n          withURLRequest:(NSURLRequest *)urlRequest\n        placeholderImage:(UIImage *)placeholderImage\n                 success:(void (^)(NSURLRequest *request, NSHTTPURLResponse *response, UIImage *image))success\n                 failure:(void (^)(NSError *error))failure\n{\n    [self cancelImageRequestOperationForState:state];\n\n    UIImage *cachedImage = [[[self class] sharedImageCache] cachedImageForRequest:urlRequest];\n    if (cachedImage) {\n        if (success) {\n            success(nil, nil, cachedImage);\n        } else {\n            [self setImage:cachedImage forState:state];\n        }\n\n        [self af_setImageRequestOperation:nil forState:state];\n    } else {\n        if (placeholderImage) {\n            [self setImage:placeholderImage forState:state];\n        }\n\n        __weak __typeof(self)weakSelf = self;\n        AFHTTPRequestOperation *imageRequestOperation = [[AFHTTPRequestOperation alloc] initWithRequest:urlRequest];\n        imageRequestOperation.responseSerializer = self.imageResponseSerializer;\n        [imageRequestOperation setCompletionBlockWithSuccess:^(AFHTTPRequestOperation *operation, id responseObject) {\n            __strong __typeof(weakSelf)strongSelf = weakSelf;\n            if ([[urlRequest URL] isEqual:[operation.request URL]]) {\n                if (success) {\n                    success(operation.request, operation.response, responseObject);\n                } else if (responseObject) {\n                    [strongSelf setImage:responseObject forState:state];\n                }\n            }\n            [[[strongSelf class] sharedImageCache] cacheImage:responseObject forRequest:urlRequest];\n        } failure:^(AFHTTPRequestOperation *operation, NSError *error) {\n            if ([[urlRequest URL] isEqual:[operation.request URL]]) {\n                if (failure) {\n                    failure(error);\n                }\n            }\n        }];\n\n        [self af_setImageRequestOperation:imageRequestOperation forState:state];\n        [[[self class] af_sharedImageRequestOperationQueue] addOperation:imageRequestOperation];\n    }\n}\n\n#pragma mark -\n\n- (void)setBackgroundImageForState:(UIControlState)state\n                           withURL:(NSURL *)url\n{\n    [self setBackgroundImageForState:state withURL:url placeholderImage:nil];\n}\n\n- (void)setBackgroundImageForState:(UIControlState)state\n                           withURL:(NSURL *)url\n                  placeholderImage:(UIImage *)placeholderImage\n{\n    NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:url];\n    [request addValue:@\"image/*\" forHTTPHeaderField:@\"Accept\"];\n\n    [self setBackgroundImageForState:state withURLRequest:request placeholderImage:placeholderImage success:nil failure:nil];\n}\n\n- (void)setBackgroundImageForState:(UIControlState)state\n                    withURLRequest:(NSURLRequest *)urlRequest\n                  placeholderImage:(UIImage *)placeholderImage\n                           success:(void (^)(NSURLRequest *request, NSHTTPURLResponse *response, UIImage *image))success\n                           failure:(void (^)(NSError *error))failure\n{\n    [self cancelBackgroundImageRequestOperationForState:state];\n\n    UIImage *cachedImage = [[[self class] sharedImageCache] cachedImageForRequest:urlRequest];\n    if (cachedImage) {\n        if (success) {\n            success(nil, nil, cachedImage);\n        } else {\n            [self setBackgroundImage:cachedImage forState:state];\n        }\n\n        [self af_setBackgroundImageRequestOperation:nil forState:state];\n    } else {\n        if (placeholderImage) {\n            [self setBackgroundImage:placeholderImage forState:state];\n        }\n\n        __weak __typeof(self)weakSelf = self;\n        AFHTTPRequestOperation *backgroundImageRequestOperation = [[AFHTTPRequestOperation alloc] initWithRequest:urlRequest];\n        backgroundImageRequestOperation.responseSerializer = self.imageResponseSerializer;\n        [backgroundImageRequestOperation setCompletionBlockWithSuccess:^(AFHTTPRequestOperation *operation, id responseObject) {\n            __strong __typeof(weakSelf)strongSelf = weakSelf;\n            if ([[urlRequest URL] isEqual:[operation.request URL]]) {\n                if (success) {\n                    success(operation.request, operation.response, responseObject);\n                } else if (responseObject) {\n                    [strongSelf setBackgroundImage:responseObject forState:state];\n                }\n            }\n            [[[strongSelf class] sharedImageCache] cacheImage:responseObject forRequest:urlRequest];\n        } failure:^(AFHTTPRequestOperation *operation, NSError *error) {\n            if ([[urlRequest URL] isEqual:[operation.request URL]]) {\n                if (failure) {\n                    failure(error);\n                }\n            }\n        }];\n\n        [self af_setBackgroundImageRequestOperation:backgroundImageRequestOperation forState:state];\n        [[[self class] af_sharedImageRequestOperationQueue] addOperation:backgroundImageRequestOperation];\n    }\n}\n\n#pragma mark -\n\n- (void)cancelImageRequestOperationForState:(UIControlState)state {\n    [[self af_imageRequestOperationForState:state] cancel];\n    [self af_setImageRequestOperation:nil forState:state];\n}\n\n- (void)cancelBackgroundImageRequestOperationForState:(UIControlState)state {\n    [[self af_backgroundImageRequestOperationForState:state] cancel];\n    [self af_setBackgroundImageRequestOperation:nil forState:state];\n}\n\n@end\n\n#endif\n"
  },
  {
    "path": "Pods/AFNetworking/UIKit+AFNetworking/UIImageView+AFNetworking.h",
    "content": "// UIImageView+AFNetworking.h\n//\n// Copyright (c) 2013-2015 AFNetworking (http://afnetworking.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\n#import <Foundation/Foundation.h>\n\n#import <Availability.h>\n\n#if defined(__IPHONE_OS_VERSION_MIN_REQUIRED)\n\n#import <UIKit/UIKit.h>\n\n@protocol AFURLResponseSerialization, AFImageCache;\n\n/**\n This category adds methods to the UIKit framework's `UIImageView` class. The methods in this category provide support for loading remote images asynchronously from a URL.\n */\n@interface UIImageView (AFNetworking)\n\n///----------------------------\n/// @name Accessing Image Cache\n///----------------------------\n\n/**\n The image cache used to improve image loading performance on scroll views. By default, this is an `NSCache` subclass conforming to the `AFImageCache` protocol, which listens for notification warnings and evicts objects accordingly.\n*/\n+ (id <AFImageCache>)sharedImageCache;\n\n/**\n Set the cache used for image loading.\n\n @param imageCache The image cache.\n */\n+ (void)setSharedImageCache:(id <AFImageCache>)imageCache;\n\n///------------------------------------\n/// @name Accessing Response Serializer\n///------------------------------------\n\n/**\n The response serializer used to create an image representation from the server response and response data. By default, this is an instance of `AFImageResponseSerializer`.\n\n @discussion Subclasses of `AFImageResponseSerializer` could be used to perform post-processing, such as color correction, face detection, or other effects. See https://github.com/AFNetworking/AFCoreImageSerializer\n */\n@property (nonatomic, strong) id <AFURLResponseSerialization> imageResponseSerializer;\n\n///--------------------\n/// @name Setting Image\n///--------------------\n\n/**\n Asynchronously downloads an image from the specified URL, and sets it once the request is finished. Any previous image request for the receiver will be cancelled.\n\n If the image is cached locally, the image is set immediately, otherwise the specified placeholder image will be set immediately, and then the remote image will be set once the request is finished.\n\n By default, URL requests have a `Accept` header field value of \"image / *\", a cache policy of `NSURLCacheStorageAllowed` and a timeout interval of 30 seconds, and are set not handle cookies. To configure URL requests differently, use `setImageWithURLRequest:placeholderImage:success:failure:`\n\n @param url The URL used for the image request.\n */\n- (void)setImageWithURL:(NSURL *)url;\n\n/**\n Asynchronously downloads an image from the specified URL, and sets it once the request is finished. Any previous image request for the receiver will be cancelled.\n\n If the image is cached locally, the image is set immediately, otherwise the specified placeholder image will be set immediately, and then the remote image will be set once the request is finished.\n\n By default, URL requests have a `Accept` header field value of \"image / *\", a cache policy of `NSURLCacheStorageAllowed` and a timeout interval of 30 seconds, and are set not handle cookies. To configure URL requests differently, use `setImageWithURLRequest:placeholderImage:success:failure:`\n\n @param url The URL used for the image request.\n @param placeholderImage The image to be set initially, until the image request finishes. If `nil`, the image view will not change its image until the image request finishes.\n */\n- (void)setImageWithURL:(NSURL *)url\n       placeholderImage:(UIImage *)placeholderImage;\n\n/**\n Asynchronously downloads an image from the specified URL request, and sets it once the request is finished. Any previous image request for the receiver will be cancelled.\n\n If the image is cached locally, the image is set immediately, otherwise the specified placeholder image will be set immediately, and then the remote image will be set once the request is finished.\n\n If a success block is specified, it is the responsibility of the block to set the image of the image view before returning. If no success block is specified, the default behavior of setting the image with `self.image = image` is applied.\n\n @param urlRequest The URL request used for the image request.\n @param placeholderImage The image to be set initially, until the image request finishes. If `nil`, the image view will not change its image until the image request finishes.\n @param success A block to be executed when the image request operation finishes successfully. This block has no return value and takes three arguments: the request sent from the client, the response received from the server, and the image created from the response data of request. If the image was returned from cache, the request and response parameters will be `nil`.\n @param failure A block object to be executed when the image request operation finishes unsuccessfully, or that finishes successfully. This block has no return value and takes three arguments: the request sent from the client, the response received from the server, and the error object describing the network or parsing error that occurred.\n */\n- (void)setImageWithURLRequest:(NSURLRequest *)urlRequest\n              placeholderImage:(UIImage *)placeholderImage\n                       success:(void (^)(NSURLRequest *request, NSHTTPURLResponse *response, UIImage *image))success\n                       failure:(void (^)(NSURLRequest *request, NSHTTPURLResponse *response, NSError *error))failure;\n\n/**\n Cancels any executing image operation for the receiver, if one exists.\n */\n- (void)cancelImageRequestOperation;\n\n@end\n\n#pragma mark -\n\n/**\n The `AFImageCache` protocol is adopted by an object used to cache images loaded by the AFNetworking category on `UIImageView`.\n */\n@protocol AFImageCache <NSObject>\n\n/**\n Returns a cached image for the specififed request, if available.\n\n @param request The image request.\n\n @return The cached image.\n */\n- (UIImage *)cachedImageForRequest:(NSURLRequest *)request;\n\n/**\n Caches a particular image for the specified request.\n\n @param image The image to cache.\n @param request The request to be used as a cache key.\n */\n- (void)cacheImage:(UIImage *)image\n        forRequest:(NSURLRequest *)request;\n@end\n\n#endif\n"
  },
  {
    "path": "Pods/AFNetworking/UIKit+AFNetworking/UIImageView+AFNetworking.m",
    "content": "// UIImageView+AFNetworking.m\n//\n// Copyright (c) 2013-2015 AFNetworking (http://afnetworking.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\n#import \"UIImageView+AFNetworking.h\"\n\n#import <objc/runtime.h>\n\n#if defined(__IPHONE_OS_VERSION_MIN_REQUIRED)\n\n#import \"AFHTTPRequestOperation.h\"\n\n@interface AFImageCache : NSCache <AFImageCache>\n@end\n\n#pragma mark -\n\n@interface UIImageView (_AFNetworking)\n@property (readwrite, nonatomic, strong, setter = af_setImageRequestOperation:) AFHTTPRequestOperation *af_imageRequestOperation;\n@end\n\n@implementation UIImageView (_AFNetworking)\n\n+ (NSOperationQueue *)af_sharedImageRequestOperationQueue {\n    static NSOperationQueue *_af_sharedImageRequestOperationQueue = nil;\n    static dispatch_once_t onceToken;\n    dispatch_once(&onceToken, ^{\n        _af_sharedImageRequestOperationQueue = [[NSOperationQueue alloc] init];\n        _af_sharedImageRequestOperationQueue.maxConcurrentOperationCount = NSOperationQueueDefaultMaxConcurrentOperationCount;\n    });\n\n    return _af_sharedImageRequestOperationQueue;\n}\n\n- (AFHTTPRequestOperation *)af_imageRequestOperation {\n    return (AFHTTPRequestOperation *)objc_getAssociatedObject(self, @selector(af_imageRequestOperation));\n}\n\n- (void)af_setImageRequestOperation:(AFHTTPRequestOperation *)imageRequestOperation {\n    objc_setAssociatedObject(self, @selector(af_imageRequestOperation), imageRequestOperation, OBJC_ASSOCIATION_RETAIN_NONATOMIC);\n}\n\n@end\n\n#pragma mark -\n\n@implementation UIImageView (AFNetworking)\n@dynamic imageResponseSerializer;\n\n+ (id <AFImageCache>)sharedImageCache {\n    static AFImageCache *_af_defaultImageCache = nil;\n    static dispatch_once_t oncePredicate;\n    dispatch_once(&oncePredicate, ^{\n        _af_defaultImageCache = [[AFImageCache alloc] init];\n\n        [[NSNotificationCenter defaultCenter] addObserverForName:UIApplicationDidReceiveMemoryWarningNotification object:nil queue:[NSOperationQueue mainQueue] usingBlock:^(NSNotification * __unused notification) {\n            [_af_defaultImageCache removeAllObjects];\n        }];\n    });\n\n#pragma clang diagnostic push\n#pragma clang diagnostic ignored \"-Wgnu\"\n    return objc_getAssociatedObject(self, @selector(sharedImageCache)) ?: _af_defaultImageCache;\n#pragma clang diagnostic pop\n}\n\n+ (void)setSharedImageCache:(id <AFImageCache>)imageCache {\n    objc_setAssociatedObject(self, @selector(sharedImageCache), imageCache, OBJC_ASSOCIATION_RETAIN_NONATOMIC);\n}\n\n#pragma mark -\n\n- (id <AFURLResponseSerialization>)imageResponseSerializer {\n    static id <AFURLResponseSerialization> _af_defaultImageResponseSerializer = nil;\n    static dispatch_once_t onceToken;\n    dispatch_once(&onceToken, ^{\n        _af_defaultImageResponseSerializer = [AFImageResponseSerializer serializer];\n    });\n\n#pragma clang diagnostic push\n#pragma clang diagnostic ignored \"-Wgnu\"\n    return objc_getAssociatedObject(self, @selector(imageResponseSerializer)) ?: _af_defaultImageResponseSerializer;\n#pragma clang diagnostic pop\n}\n\n- (void)setImageResponseSerializer:(id <AFURLResponseSerialization>)serializer {\n    objc_setAssociatedObject(self, @selector(imageResponseSerializer), serializer, OBJC_ASSOCIATION_RETAIN_NONATOMIC);\n}\n\n#pragma mark -\n\n- (void)setImageWithURL:(NSURL *)url {\n    [self setImageWithURL:url placeholderImage:nil];\n}\n\n- (void)setImageWithURL:(NSURL *)url\n       placeholderImage:(UIImage *)placeholderImage\n{\n    NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:url];\n    [request addValue:@\"image/*\" forHTTPHeaderField:@\"Accept\"];\n\n    [self setImageWithURLRequest:request placeholderImage:placeholderImage success:nil failure:nil];\n}\n\n- (void)setImageWithURLRequest:(NSURLRequest *)urlRequest\n              placeholderImage:(UIImage *)placeholderImage\n                       success:(void (^)(NSURLRequest *request, NSHTTPURLResponse *response, UIImage *image))success\n                       failure:(void (^)(NSURLRequest *request, NSHTTPURLResponse *response, NSError *error))failure\n{\n    [self cancelImageRequestOperation];\n\n    UIImage *cachedImage = [[[self class] sharedImageCache] cachedImageForRequest:urlRequest];\n    if (cachedImage) {\n        if (success) {\n            success(nil, nil, cachedImage);\n        } else {\n            self.image = cachedImage;\n        }\n\n        self.af_imageRequestOperation = nil;\n    } else {\n        if (placeholderImage) {\n            self.image = placeholderImage;\n        }\n\n        __weak __typeof(self)weakSelf = self;\n        self.af_imageRequestOperation = [[AFHTTPRequestOperation alloc] initWithRequest:urlRequest];\n        self.af_imageRequestOperation.responseSerializer = self.imageResponseSerializer;\n        [self.af_imageRequestOperation setCompletionBlockWithSuccess:^(AFHTTPRequestOperation *operation, id responseObject) {\n            __strong __typeof(weakSelf)strongSelf = weakSelf;\n            if ([[urlRequest URL] isEqual:[strongSelf.af_imageRequestOperation.request URL]]) {\n                if (success) {\n                    success(urlRequest, operation.response, responseObject);\n                } else if (responseObject) {\n                    strongSelf.image = responseObject;\n                }\n\n                if (operation == strongSelf.af_imageRequestOperation){\n                        strongSelf.af_imageRequestOperation = nil;\n                }\n            }\n\n            [[[strongSelf class] sharedImageCache] cacheImage:responseObject forRequest:urlRequest];\n        } failure:^(AFHTTPRequestOperation *operation, NSError *error) {\n            __strong __typeof(weakSelf)strongSelf = weakSelf;\n            if ([[urlRequest URL] isEqual:[strongSelf.af_imageRequestOperation.request URL]]) {\n                if (failure) {\n                    failure(urlRequest, operation.response, error);\n                }\n\n                if (operation == strongSelf.af_imageRequestOperation){\n                        strongSelf.af_imageRequestOperation = nil;\n                }\n            }\n        }];\n\n        [[[self class] af_sharedImageRequestOperationQueue] addOperation:self.af_imageRequestOperation];\n    }\n}\n\n- (void)cancelImageRequestOperation {\n    [self.af_imageRequestOperation cancel];\n    self.af_imageRequestOperation = nil;\n}\n\n@end\n\n#pragma mark -\n\nstatic inline NSString * AFImageCacheKeyFromURLRequest(NSURLRequest *request) {\n    return [[request URL] absoluteString];\n}\n\n@implementation AFImageCache\n\n- (UIImage *)cachedImageForRequest:(NSURLRequest *)request {\n    switch ([request cachePolicy]) {\n        case NSURLRequestReloadIgnoringCacheData:\n        case NSURLRequestReloadIgnoringLocalAndRemoteCacheData:\n            return nil;\n        default:\n            break;\n    }\n\n\treturn [self objectForKey:AFImageCacheKeyFromURLRequest(request)];\n}\n\n- (void)cacheImage:(UIImage *)image\n        forRequest:(NSURLRequest *)request\n{\n    if (image && request) {\n        [self setObject:image forKey:AFImageCacheKeyFromURLRequest(request)];\n    }\n}\n\n@end\n\n#endif\n"
  },
  {
    "path": "Pods/AFNetworking/UIKit+AFNetworking/UIKit+AFNetworking.h",
    "content": "// UIKit+AFNetworking.h\n//\n// Copyright (c) 2013 AFNetworking (http://afnetworking.com/)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\n#import <UIKit/UIKit.h>\n\n#ifndef _UIKIT_AFNETWORKING_\n    #define _UIKIT_AFNETWORKING_\n\n    #import \"AFNetworkActivityIndicatorManager.h\"\n\n    #import \"UIActivityIndicatorView+AFNetworking.h\"\n    #import \"UIAlertView+AFNetworking.h\"\n    #import \"UIButton+AFNetworking.h\"\n    #import \"UIImageView+AFNetworking.h\"\n    #import \"UIKit+AFNetworking.h\"\n    #import \"UIProgressView+AFNetworking.h\"\n    #import \"UIRefreshControl+AFNetworking.h\"\n    #import \"UIWebView+AFNetworking.h\"\n#endif /* _UIKIT_AFNETWORKING_ */\n"
  },
  {
    "path": "Pods/AFNetworking/UIKit+AFNetworking/UIProgressView+AFNetworking.h",
    "content": "// UIProgressView+AFNetworking.h\n//\n// Copyright (c) 2013-2015 AFNetworking (http://afnetworking.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\n#import <Foundation/Foundation.h>\n\n#import <Availability.h>\n\n#if defined(__IPHONE_OS_VERSION_MIN_REQUIRED)\n\n#import <UIKit/UIKit.h>\n\n@class AFURLConnectionOperation;\n\n/**\n This category adds methods to the UIKit framework's `UIProgressView` class. The methods in this category provide support for binding the progress to the upload and download progress of a session task or request operation.\n */\n@interface UIProgressView (AFNetworking)\n\n///------------------------------------\n/// @name Setting Session Task Progress\n///------------------------------------\n\n/**\n Binds the progress to the upload progress of the specified session task.\n\n @param task The session task.\n @param animated `YES` if the change should be animated, `NO` if the change should happen immediately.\n */\n#if __IPHONE_OS_VERSION_MIN_REQUIRED >= 70000\n- (void)setProgressWithUploadProgressOfTask:(NSURLSessionUploadTask *)task\n                                   animated:(BOOL)animated;\n#endif\n\n/**\n Binds the progress to the download progress of the specified session task.\n\n @param task The session task.\n @param animated `YES` if the change should be animated, `NO` if the change should happen immediately.\n */\n#if __IPHONE_OS_VERSION_MIN_REQUIRED >= 70000\n- (void)setProgressWithDownloadProgressOfTask:(NSURLSessionDownloadTask *)task\n                                     animated:(BOOL)animated;\n#endif\n\n///------------------------------------\n/// @name Setting Session Task Progress\n///------------------------------------\n\n/**\n Binds the progress to the upload progress of the specified request operation.\n\n @param operation The request operation.\n @param animated `YES` if the change should be animated, `NO` if the change should happen immediately.\n */\n- (void)setProgressWithUploadProgressOfOperation:(AFURLConnectionOperation *)operation\n                                        animated:(BOOL)animated;\n\n/**\n Binds the progress to the download progress of the specified request operation.\n\n @param operation The request operation.\n @param animated `YES` if the change should be animated, `NO` if the change should happen immediately.\n */\n- (void)setProgressWithDownloadProgressOfOperation:(AFURLConnectionOperation *)operation\n                                          animated:(BOOL)animated;\n\n@end\n\n#endif\n"
  },
  {
    "path": "Pods/AFNetworking/UIKit+AFNetworking/UIProgressView+AFNetworking.m",
    "content": "// UIProgressView+AFNetworking.m\n//\n// Copyright (c) 2013-2015 AFNetworking (http://afnetworking.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\n#import \"UIProgressView+AFNetworking.h\"\n\n#import <objc/runtime.h>\n\n#if defined(__IPHONE_OS_VERSION_MIN_REQUIRED)\n\n#import \"AFURLConnectionOperation.h\"\n\n#if __IPHONE_OS_VERSION_MIN_REQUIRED >= 70000\n#import \"AFURLSessionManager.h\"\n#endif\n\nstatic void * AFTaskCountOfBytesSentContext = &AFTaskCountOfBytesSentContext;\nstatic void * AFTaskCountOfBytesReceivedContext = &AFTaskCountOfBytesReceivedContext;\n\n@interface AFURLConnectionOperation (_UIProgressView)\n@property (readwrite, nonatomic, copy) void (^uploadProgress)(NSUInteger bytes, long long totalBytes, long long totalBytesExpected);\n@property (readwrite, nonatomic, assign, setter = af_setUploadProgressAnimated:) BOOL af_uploadProgressAnimated;\n\n@property (readwrite, nonatomic, copy) void (^downloadProgress)(NSUInteger bytes, long long totalBytes, long long totalBytesExpected);\n@property (readwrite, nonatomic, assign, setter = af_setDownloadProgressAnimated:) BOOL af_downloadProgressAnimated;\n@end\n\n@implementation AFURLConnectionOperation (_UIProgressView)\n@dynamic uploadProgress; // Implemented in AFURLConnectionOperation\n@dynamic af_uploadProgressAnimated;\n\n@dynamic downloadProgress; // Implemented in AFURLConnectionOperation\n@dynamic af_downloadProgressAnimated;\n@end\n\n#pragma mark -\n\n@implementation UIProgressView (AFNetworking)\n\n- (BOOL)af_uploadProgressAnimated {\n    return [(NSNumber *)objc_getAssociatedObject(self, @selector(af_uploadProgressAnimated)) boolValue];\n}\n\n- (void)af_setUploadProgressAnimated:(BOOL)animated {\n    objc_setAssociatedObject(self, @selector(af_uploadProgressAnimated), @(animated), OBJC_ASSOCIATION_RETAIN_NONATOMIC);\n}\n\n- (BOOL)af_downloadProgressAnimated {\n    return [(NSNumber *)objc_getAssociatedObject(self, @selector(af_downloadProgressAnimated)) boolValue];\n}\n\n- (void)af_setDownloadProgressAnimated:(BOOL)animated {\n    objc_setAssociatedObject(self, @selector(af_downloadProgressAnimated), @(animated), OBJC_ASSOCIATION_RETAIN_NONATOMIC);\n}\n\n#pragma mark -\n\n#if __IPHONE_OS_VERSION_MIN_REQUIRED >= 70000\n- (void)setProgressWithUploadProgressOfTask:(NSURLSessionUploadTask *)task\n                                   animated:(BOOL)animated\n{\n    [task addObserver:self forKeyPath:@\"state\" options:(NSKeyValueObservingOptions)0 context:AFTaskCountOfBytesSentContext];\n    [task addObserver:self forKeyPath:@\"countOfBytesSent\" options:(NSKeyValueObservingOptions)0 context:AFTaskCountOfBytesSentContext];\n\n    [self af_setUploadProgressAnimated:animated];\n}\n\n- (void)setProgressWithDownloadProgressOfTask:(NSURLSessionDownloadTask *)task\n                                     animated:(BOOL)animated\n{\n    [task addObserver:self forKeyPath:@\"state\" options:(NSKeyValueObservingOptions)0 context:AFTaskCountOfBytesReceivedContext];\n    [task addObserver:self forKeyPath:@\"countOfBytesReceived\" options:(NSKeyValueObservingOptions)0 context:AFTaskCountOfBytesReceivedContext];\n\n    [self af_setDownloadProgressAnimated:animated];\n}\n#endif\n\n#pragma mark -\n\n- (void)setProgressWithUploadProgressOfOperation:(AFURLConnectionOperation *)operation\n                                        animated:(BOOL)animated\n{\n    __weak __typeof(self)weakSelf = self;\n    void (^original)(NSUInteger bytesWritten, long long totalBytesWritten, long long totalBytesExpectedToWrite) = [operation.uploadProgress copy];\n    [operation setUploadProgressBlock:^(NSUInteger bytesWritten, long long totalBytesWritten, long long totalBytesExpectedToWrite) {\n        if (original) {\n            original(bytesWritten, totalBytesWritten, totalBytesExpectedToWrite);\n        }\n\n        dispatch_async(dispatch_get_main_queue(), ^{\n            if (totalBytesExpectedToWrite > 0) {\n                __strong __typeof(weakSelf)strongSelf = weakSelf;\n                [strongSelf setProgress:(totalBytesWritten / (totalBytesExpectedToWrite * 1.0f)) animated:animated];\n            }\n        });\n    }];\n}\n\n- (void)setProgressWithDownloadProgressOfOperation:(AFURLConnectionOperation *)operation\n                                          animated:(BOOL)animated\n{\n    __weak __typeof(self)weakSelf = self;\n    void (^original)(NSUInteger bytesRead, long long totalBytesRead, long long totalBytesExpectedToRead) = [operation.downloadProgress copy];\n    [operation setDownloadProgressBlock:^(NSUInteger bytesRead, long long totalBytesRead, long long totalBytesExpectedToRead) {\n        if (original) {\n            original(bytesRead, totalBytesRead, totalBytesExpectedToRead);\n        }\n\n        dispatch_async(dispatch_get_main_queue(), ^{\n            if (totalBytesExpectedToRead > 0) {\n                __strong __typeof(weakSelf)strongSelf = weakSelf;\n                [strongSelf setProgress:(totalBytesRead / (totalBytesExpectedToRead  * 1.0f)) animated:animated];\n            }\n        });\n    }];\n}\n\n#pragma mark - NSKeyValueObserving\n\n- (void)observeValueForKeyPath:(NSString *)keyPath\n                      ofObject:(id)object\n                        change:(__unused NSDictionary *)change\n                       context:(void *)context\n{\n#if __IPHONE_OS_VERSION_MIN_REQUIRED >= 70000\n    if (context == AFTaskCountOfBytesSentContext || context == AFTaskCountOfBytesReceivedContext) {\n        if ([keyPath isEqualToString:NSStringFromSelector(@selector(countOfBytesSent))]) {\n            if ([object countOfBytesExpectedToSend] > 0) {\n                dispatch_async(dispatch_get_main_queue(), ^{\n                    [self setProgress:[object countOfBytesSent] / ([object countOfBytesExpectedToSend] * 1.0f) animated:self.af_uploadProgressAnimated];\n                });\n            }\n        }\n\n        if ([keyPath isEqualToString:NSStringFromSelector(@selector(countOfBytesReceived))]) {\n            if ([object countOfBytesExpectedToReceive] > 0) {\n                dispatch_async(dispatch_get_main_queue(), ^{\n                    [self setProgress:[object countOfBytesReceived] / ([object countOfBytesExpectedToReceive] * 1.0f) animated:self.af_downloadProgressAnimated];\n                });\n            }\n        }\n\n        if ([keyPath isEqualToString:NSStringFromSelector(@selector(state))]) {\n            if ([(NSURLSessionTask *)object state] == NSURLSessionTaskStateCompleted) {\n                @try {\n                    [object removeObserver:self forKeyPath:NSStringFromSelector(@selector(state))];\n\n                    if (context == AFTaskCountOfBytesSentContext) {\n                        [object removeObserver:self forKeyPath:NSStringFromSelector(@selector(countOfBytesSent))];\n                    }\n\n                    if (context == AFTaskCountOfBytesReceivedContext) {\n                        [object removeObserver:self forKeyPath:NSStringFromSelector(@selector(countOfBytesReceived))];\n                    }\n                }\n                @catch (NSException * __unused exception) {}\n            }\n        }\n    }\n#endif\n}\n\n@end\n\n#endif\n"
  },
  {
    "path": "Pods/AFNetworking/UIKit+AFNetworking/UIRefreshControl+AFNetworking.h",
    "content": "// UIRefreshControl+AFNetworking.m\n//\n// Copyright (c) 2014 AFNetworking (http://afnetworking.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\n#import <Foundation/Foundation.h>\n\n#import <Availability.h>\n\n#if defined(__IPHONE_OS_VERSION_MIN_REQUIRED)\n\n#import <UIKit/UIKit.h>\n\n@class AFURLConnectionOperation;\n\n/**\n This category adds methods to the UIKit framework's `UIRefreshControl` class. The methods in this category provide support for automatically begining and ending refreshing depending on the loading state of a request operation or session task.\n */\n@interface UIRefreshControl (AFNetworking)\n\n///-----------------------------------\n/// @name Refreshing for Session Tasks\n///-----------------------------------\n\n/**\n Binds the refreshing state to the state of the specified task.\n \n @param task The task. If `nil`, automatic updating from any previously specified operation will be disabled.\n */\n#if __IPHONE_OS_VERSION_MIN_REQUIRED >= 70000\n- (void)setRefreshingWithStateOfTask:(NSURLSessionTask *)task;\n#endif\n\n///----------------------------------------\n/// @name Refreshing for Request Operations\n///----------------------------------------\n\n/**\n Binds the refreshing state to the execution state of the specified operation.\n\n @param operation The operation. If `nil`, automatic updating from any previously specified operation will be disabled.\n */\n- (void)setRefreshingWithStateOfOperation:(AFURLConnectionOperation *)operation;\n\n@end\n\n#endif\n"
  },
  {
    "path": "Pods/AFNetworking/UIKit+AFNetworking/UIRefreshControl+AFNetworking.m",
    "content": "// UIRefreshControl+AFNetworking.m\n//\n// Copyright (c) 2014 AFNetworking (http://afnetworking.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\n#import \"UIRefreshControl+AFNetworking.h\"\n\n#if defined(__IPHONE_OS_VERSION_MIN_REQUIRED)\n\n#import \"AFHTTPRequestOperation.h\"\n\n#if __IPHONE_OS_VERSION_MIN_REQUIRED >= 70000\n#import \"AFURLSessionManager.h\"\n#endif\n\n@implementation UIRefreshControl (AFNetworking)\n\n#if __IPHONE_OS_VERSION_MIN_REQUIRED >= 70000\n- (void)setRefreshingWithStateOfTask:(NSURLSessionTask *)task {\n    NSNotificationCenter *notificationCenter = [NSNotificationCenter defaultCenter];\n\n    [notificationCenter removeObserver:self name:AFNetworkingTaskDidResumeNotification object:nil];\n    [notificationCenter removeObserver:self name:AFNetworkingTaskDidSuspendNotification object:nil];\n    [notificationCenter removeObserver:self name:AFNetworkingTaskDidCompleteNotification object:nil];\n\n    if (task) {\n        if (task.state == NSURLSessionTaskStateRunning) {\n            [self beginRefreshing];\n\n            [notificationCenter addObserver:self selector:@selector(af_beginRefreshing) name:AFNetworkingTaskDidResumeNotification object:task];\n            [notificationCenter addObserver:self selector:@selector(af_endRefreshing) name:AFNetworkingTaskDidCompleteNotification object:task];\n            [notificationCenter addObserver:self selector:@selector(af_endRefreshing) name:AFNetworkingTaskDidSuspendNotification object:task];\n        } else {\n            [self endRefreshing];\n        }\n    }\n}\n#endif\n\n- (void)setRefreshingWithStateOfOperation:(AFURLConnectionOperation *)operation {\n    NSNotificationCenter *notificationCenter = [NSNotificationCenter defaultCenter];\n\n    [notificationCenter removeObserver:self name:AFNetworkingOperationDidStartNotification object:nil];\n    [notificationCenter removeObserver:self name:AFNetworkingOperationDidFinishNotification object:nil];\n\n    if (operation) {\n        if (![operation isFinished]) {\n            if ([operation isExecuting]) {\n                [self beginRefreshing];\n            } else {\n                [self endRefreshing];\n            }\n\n            [notificationCenter addObserver:self selector:@selector(af_beginRefreshing) name:AFNetworkingOperationDidStartNotification object:operation];\n            [notificationCenter addObserver:self selector:@selector(af_endRefreshing) name:AFNetworkingOperationDidFinishNotification object:operation];\n        }\n    }\n}\n\n#pragma mark -\n\n- (void)af_beginRefreshing {\n    dispatch_async(dispatch_get_main_queue(), ^{\n        [self beginRefreshing];\n    });\n}\n\n- (void)af_endRefreshing {\n    dispatch_async(dispatch_get_main_queue(), ^{\n        [self endRefreshing];\n    });\n}\n\n@end\n\n#endif\n"
  },
  {
    "path": "Pods/AFNetworking/UIKit+AFNetworking/UIWebView+AFNetworking.h",
    "content": "// UIWebView+AFNetworking.h\n//\n// Copyright (c) 2013-2015 AFNetworking (http://afnetworking.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\n#import <Foundation/Foundation.h>\n\n#import <Availability.h>\n\n#if defined(__IPHONE_OS_VERSION_MIN_REQUIRED)\n\n#import <UIKit/UIKit.h>\n\n@class AFHTTPRequestSerializer, AFHTTPResponseSerializer;\n@protocol AFURLRequestSerialization, AFURLResponseSerialization;\n\n/**\n This category adds methods to the UIKit framework's `UIWebView` class. The methods in this category provide increased control over the request cycle, including progress monitoring and success / failure handling.\n\n @discussion When using these category methods, make sure to assign `delegate` for the web view, which implements `–webView:shouldStartLoadWithRequest:navigationType:` appropriately. This allows for tapped links to be loaded through AFNetworking, and can ensure that `canGoBack` & `canGoForward` update their values correctly.\n */\n@interface UIWebView (AFNetworking)\n\n/**\n The request serializer used to serialize requests made with the `-loadRequest:...` category methods. By default, this is an instance of `AFHTTPRequestSerializer`.\n */\n@property (nonatomic, strong) AFHTTPRequestSerializer <AFURLRequestSerialization> * requestSerializer;\n\n/**\n The response serializer used to serialize responses made with the `-loadRequest:...` category methods. By default, this is an instance of `AFHTTPResponseSerializer`.\n */\n@property (nonatomic, strong) AFHTTPResponseSerializer <AFURLResponseSerialization> * responseSerializer;\n\n/**\n Asynchronously loads the specified request.\n\n @param request A URL request identifying the location of the content to load. This must not be `nil`.\n @param progress A block object to be called when an undetermined number of bytes have been downloaded from the server. This block has no return value and takes three arguments: the number of bytes read since the last time the download progress block was called, the total bytes read, and the total bytes expected to be read during the request, as initially determined by the expected content size of the `NSHTTPURLResponse` object. This block may be called multiple times, and will execute on the main thread.\n @param success A block object to be executed when the request finishes loading successfully. This block returns the HTML string to be loaded by the web view, and takes two arguments: the response, and the response string.\n @param failure A block object to be executed when the request operation finishes unsuccessfully, or that finishes successfully, but encountered an error while parsing the response data. This block has no return value and takes a single argument: the error that occurred.\n */\n- (void)loadRequest:(NSURLRequest *)request\n           progress:(void (^)(NSUInteger bytesWritten, long long totalBytesWritten, long long totalBytesExpectedToWrite))progress\n            success:(NSString * (^)(NSHTTPURLResponse *response, NSString *HTML))success\n            failure:(void (^)(NSError *error))failure;\n\n/**\n Asynchronously loads the data associated with a particular request with a specified MIME type and text encoding.\n\n @param request A URL request identifying the location of the content to load. This must not be `nil`.\n @param MIMEType The MIME type of the content. Defaults to the content type of the response if not specified.\n @param textEncodingName The IANA encoding name, as in `utf-8` or `utf-16`. Defaults to the response text encoding if not specified.\n @param progress A block object to be called when an undetermined number of bytes have been downloaded from the server. This block has no return value and takes three arguments: the number of bytes read since the last time the download progress block was called, the total bytes read, and the total bytes expected to be read during the request, as initially determined by the expected content size of the `NSHTTPURLResponse` object. This block may be called multiple times, and will execute on the main thread.\n @param success A block object to be executed when the request finishes loading successfully. This block returns the data to be loaded by the web view and takes two arguments: the response, and the downloaded data.\n @param failure A block object to be executed when the request operation finishes unsuccessfully, or that finishes successfully, but encountered an error while parsing the response data. This block has no return value and takes a single argument: the error that occurred.\n */\n- (void)loadRequest:(NSURLRequest *)request\n           MIMEType:(NSString *)MIMEType\n   textEncodingName:(NSString *)textEncodingName\n           progress:(void (^)(NSUInteger bytesWritten, long long totalBytesWritten, long long totalBytesExpectedToWrite))progress\n            success:(NSData * (^)(NSHTTPURLResponse *response, NSData *data))success\n            failure:(void (^)(NSError *error))failure;\n\n@end\n\n#endif\n"
  },
  {
    "path": "Pods/AFNetworking/UIKit+AFNetworking/UIWebView+AFNetworking.m",
    "content": "// UIWebView+AFNetworking.m\n//\n// Copyright (c) 2013-2015 AFNetworking (http://afnetworking.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\n#import \"UIWebView+AFNetworking.h\"\n\n#import <objc/runtime.h>\n\n#if defined(__IPHONE_OS_VERSION_MIN_REQUIRED)\n\n#import \"AFHTTPRequestOperation.h\"\n#import \"AFURLResponseSerialization.h\"\n#import \"AFURLRequestSerialization.h\"\n\n@interface UIWebView (_AFNetworking)\n@property (readwrite, nonatomic, strong, setter = af_setHTTPRequestOperation:) AFHTTPRequestOperation *af_HTTPRequestOperation;\n@end\n\n@implementation UIWebView (_AFNetworking)\n\n- (AFHTTPRequestOperation *)af_HTTPRequestOperation {\n    return (AFHTTPRequestOperation *)objc_getAssociatedObject(self, @selector(af_HTTPRequestOperation));\n}\n\n- (void)af_setHTTPRequestOperation:(AFHTTPRequestOperation *)operation {\n    objc_setAssociatedObject(self, @selector(af_HTTPRequestOperation), operation, OBJC_ASSOCIATION_RETAIN_NONATOMIC);\n}\n\n@end\n\n#pragma mark -\n\n@implementation UIWebView (AFNetworking)\n\n- (AFHTTPRequestSerializer <AFURLRequestSerialization> *)requestSerializer {\n    static AFHTTPRequestSerializer <AFURLRequestSerialization> *_af_defaultRequestSerializer = nil;\n    static dispatch_once_t onceToken;\n    dispatch_once(&onceToken, ^{\n        _af_defaultRequestSerializer = [AFHTTPRequestSerializer serializer];\n    });\n\n#pragma clang diagnostic push\n#pragma clang diagnostic ignored \"-Wgnu\"\n    return objc_getAssociatedObject(self, @selector(requestSerializer)) ?: _af_defaultRequestSerializer;\n#pragma clang diagnostic pop\n}\n\n- (void)setRequestSerializer:(AFHTTPRequestSerializer<AFURLRequestSerialization> *)requestSerializer {\n    objc_setAssociatedObject(self, @selector(requestSerializer), requestSerializer, OBJC_ASSOCIATION_RETAIN_NONATOMIC);\n}\n\n- (AFHTTPResponseSerializer <AFURLResponseSerialization> *)responseSerializer {\n    static AFHTTPResponseSerializer <AFURLResponseSerialization> *_af_defaultResponseSerializer = nil;\n    static dispatch_once_t onceToken;\n    dispatch_once(&onceToken, ^{\n        _af_defaultResponseSerializer = [AFHTTPResponseSerializer serializer];\n    });\n\n#pragma clang diagnostic push\n#pragma clang diagnostic ignored \"-Wgnu\"\n    return objc_getAssociatedObject(self, @selector(responseSerializer)) ?: _af_defaultResponseSerializer;\n#pragma clang diagnostic pop\n}\n\n- (void)setResponseSerializer:(AFHTTPResponseSerializer<AFURLResponseSerialization> *)responseSerializer {\n    objc_setAssociatedObject(self, @selector(responseSerializer), responseSerializer, OBJC_ASSOCIATION_RETAIN_NONATOMIC);\n}\n\n#pragma mark -\n\n- (void)loadRequest:(NSURLRequest *)request\n           progress:(void (^)(NSUInteger bytesWritten, long long totalBytesWritten, long long totalBytesExpectedToWrite))progress\n            success:(NSString * (^)(NSHTTPURLResponse *response, NSString *HTML))success\n            failure:(void (^)(NSError *error))failure\n{\n    [self loadRequest:request MIMEType:nil textEncodingName:nil progress:progress success:^NSData *(NSHTTPURLResponse *response, NSData *data) {\n        NSStringEncoding stringEncoding = NSUTF8StringEncoding;\n        if (response.textEncodingName) {\n            CFStringEncoding encoding = CFStringConvertIANACharSetNameToEncoding((CFStringRef)response.textEncodingName);\n            if (encoding != kCFStringEncodingInvalidId) {\n                stringEncoding = CFStringConvertEncodingToNSStringEncoding(encoding);\n            }\n        }\n\n        NSString *string = [[NSString alloc] initWithData:data encoding:stringEncoding];\n        if (success) {\n            string = success(response, string);\n        }\n\n        return [string dataUsingEncoding:stringEncoding];\n    } failure:failure];\n}\n\n- (void)loadRequest:(NSURLRequest *)request\n           MIMEType:(NSString *)MIMEType\n   textEncodingName:(NSString *)textEncodingName\n           progress:(void (^)(NSUInteger bytesWritten, long long totalBytesWritten, long long totalBytesExpectedToWrite))progress\n            success:(NSData * (^)(NSHTTPURLResponse *response, NSData *data))success\n            failure:(void (^)(NSError *error))failure\n{\n    NSParameterAssert(request);\n\n    if (self.af_HTTPRequestOperation) {\n        [self.af_HTTPRequestOperation cancel];\n    }\n\n    request = [self.requestSerializer requestBySerializingRequest:request withParameters:nil error:nil];\n\n    self.af_HTTPRequestOperation = [[AFHTTPRequestOperation alloc] initWithRequest:request];\n    self.af_HTTPRequestOperation.responseSerializer = self.responseSerializer;\n\n    __weak __typeof(self)weakSelf = self;\n    [self.af_HTTPRequestOperation setDownloadProgressBlock:progress];\n    [self.af_HTTPRequestOperation setCompletionBlockWithSuccess:^(AFHTTPRequestOperation *operation, id __unused responseObject) {\n        NSData *data = success ? success(operation.response, operation.responseData) : operation.responseData;\n\n#pragma clang diagnostic push\n#pragma clang diagnostic ignored \"-Wgnu\"\n        __strong __typeof(weakSelf) strongSelf = weakSelf;\n        [strongSelf loadData:data MIMEType:(MIMEType ?: [operation.response MIMEType]) textEncodingName:(textEncodingName ?: [operation.response textEncodingName]) baseURL:[operation.response URL]];\n\n        if ([strongSelf.delegate respondsToSelector:@selector(webViewDidFinishLoad:)]) {\n            [strongSelf.delegate webViewDidFinishLoad:strongSelf];\n        }\n        \n#pragma clang diagnostic pop\n    } failure:^(AFHTTPRequestOperation * __unused operation, NSError *error) {\n        if (failure) {\n            failure(error);\n        }\n    }];\n\n    [self.af_HTTPRequestOperation start];\n\n    if ([self.delegate respondsToSelector:@selector(webViewDidStartLoad:)]) {\n        [self.delegate webViewDidStartLoad:self];\n    }\n}\n\n@end\n\n#endif\n"
  },
  {
    "path": "Pods/CoreBitcoin/CoreBitcoin/BTC256.h",
    "content": "// CoreBitcoin by Oleg Andreev <oleganza@gmail.com>, WTFPL.\n\n#import <Foundation/Foundation.h>\n\n// A set of ubiquitous types and functions to deal with fixed-length chunks of data\n// (160-bit, 256-bit and 512-bit). These are relevant almost always to hashes,\n// but there's no hash-specific about them.\n// The purpose of these is to avoid dynamic memory allocations via NSData when\n// we need to move exactly 32 bytes around.\n//\n// We don't call these BTCFixedData256 because these types are way too ubiquituous\n// in CoreBitcoin to have such an explicit name.\n//\n// Somewhat similar to uint256 in bitcoind, but here we don't try\n// to pretend that these are integers and then allow arithmetic on them\n// and create a mess with the byte order.\n// Use BTCBigNumber to do arithmetic on big numbers and convert\n// to bignum format explicitly.\n// BTCBigNumber has API for converting BTC256 to a big int.\n//\n// We also declare BTC160 and BTC512 for use with RIPEMD-160, SHA-1 and SHA-512 hashes.\n\n\n// 1. Fixed-length types\n\nstruct private_BTC160\n{\n    // 160 bits can't be formed with 64-bit words, so we have to use 32-bit ones instead.\n    uint32_t words32[5];\n} __attribute__((packed));\ntypedef struct private_BTC160 BTC160;\n\nstruct private_BTC256\n{\n    // Since all modern CPUs are 64-bit (ARM is 64-bit starting with iPhone 5s),\n    // we will use 64-bit words.\n    uint64_t words64[4];\n} __attribute__((aligned(1)));\ntypedef struct private_BTC256 BTC256;\n\nstruct private_BTC512\n{\n    // Since all modern CPUs are 64-bit (ARM is 64-bit starting with iPhone 5s),\n    // we will use 64-bit words.\n    uint64_t words64[8];\n} __attribute__((aligned(1)));\ntypedef struct private_BTC512 BTC512;\n\n\n// 2. Constants\n\n// All-zero constants\nextern const BTC160 BTC160Zero;\nextern const BTC256 BTC256Zero;\nextern const BTC512 BTC512Zero;\n\n// All-one constants\nextern const BTC160 BTC160Max;\nextern const BTC256 BTC256Max;\nextern const BTC512 BTC512Max;\n\n// First 160 bits of SHA512(\"CoreBitcoin/BTC160Null\")\nextern const BTC160 BTC160Null;\n\n// First 256 bits of SHA512(\"CoreBitcoin/BTC256Null\")\nextern const BTC256 BTC256Null;\n\n// Value of SHA512(\"CoreBitcoin/BTC512Null\")\nextern const BTC512 BTC512Null;\n\n\n// 3. Comparison\n\nBOOL BTC160Equal(BTC160 chunk1, BTC160 chunk2);\nBOOL BTC256Equal(BTC256 chunk1, BTC256 chunk2);\nBOOL BTC512Equal(BTC512 chunk1, BTC512 chunk2);\n\nNSComparisonResult BTC160Compare(BTC160 chunk1, BTC160 chunk2);\nNSComparisonResult BTC256Compare(BTC256 chunk1, BTC256 chunk2);\nNSComparisonResult BTC512Compare(BTC512 chunk1, BTC512 chunk2);\n\n\n// 4. Operations\n\n\n// Inverse (b = ~a)\nBTC160 BTC160Inverse(BTC160 chunk);\nBTC256 BTC256Inverse(BTC256 chunk);\nBTC512 BTC512Inverse(BTC512 chunk);\n\n// Swap byte order\nBTC160 BTC160Swap(BTC160 chunk);\nBTC256 BTC256Swap(BTC256 chunk);\nBTC512 BTC512Swap(BTC512 chunk);\n\n// Bitwise AND operation (a & b)\nBTC160 BTC160AND(BTC160 chunk1, BTC160 chunk2);\nBTC256 BTC256AND(BTC256 chunk1, BTC256 chunk2);\nBTC512 BTC512AND(BTC512 chunk1, BTC512 chunk2);\n\n// Bitwise OR operation (a | b)\nBTC160 BTC160OR(BTC160 chunk1, BTC160 chunk2);\nBTC256 BTC256OR(BTC256 chunk1, BTC256 chunk2);\nBTC512 BTC512OR(BTC512 chunk1, BTC512 chunk2);\n\n// Bitwise exclusive-OR operation (a ^ b)\nBTC160 BTC160XOR(BTC160 chunk1, BTC160 chunk2);\nBTC256 BTC256XOR(BTC256 chunk1, BTC256 chunk2);\nBTC512 BTC512XOR(BTC512 chunk1, BTC512 chunk2);\n\n// Concatenation of two 256-bit chunks\nBTC512 BTC512Concat(BTC256 chunk1, BTC256 chunk2);\n\n\n// 5. Conversion functions\n\n\n// Conversion to NSData\nNSData* NSDataFromBTC160(BTC160 chunk);\nNSData* NSDataFromBTC256(BTC256 chunk);\nNSData* NSDataFromBTC512(BTC512 chunk);\n\n// Conversion from NSData.\n// If NSData is not big enough, returns BTCHash{160,256,512}Null.\nBTC160 BTC160FromNSData(NSData* data);\nBTC256 BTC256FromNSData(NSData* data);\nBTC512 BTC512FromNSData(NSData* data);\n\n// Returns lowercase hex representation of the chunk\nNSString* NSStringFromBTC160(BTC160 chunk);\nNSString* NSStringFromBTC256(BTC256 chunk);\nNSString* NSStringFromBTC512(BTC512 chunk);\n\n// Conversion from hex NSString (lower- or uppercase).\n// If string is invalid or data is too short, returns BTCHash{160,256,512}Null.\nBTC160 BTC160FromNSString(NSString* string);\nBTC256 BTC256FromNSString(NSString* string);\nBTC512 BTC512FromNSString(NSString* string);\n\n\n\n"
  },
  {
    "path": "Pods/CoreBitcoin/CoreBitcoin/BTC256.m",
    "content": "// CoreBitcoin by Oleg Andreev <oleganza@gmail.com>, WTFPL.\n\n#import \"BTC256.h\"\n#import \"BTCData.h\"\n\n// 1. Structs are already defined in the .h file.\n\n// 2. Constants\n\nconst BTC160 BTC160Zero = {0,0,0,0,0};\nconst BTC256 BTC256Zero = {0,0,0,0};\nconst BTC512 BTC512Zero = {0,0,0,0,0,0,0,0};\n\nconst BTC160 BTC160Max = {0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff};\nconst BTC256 BTC256Max = {0xffffffffffffffffLL,0xffffffffffffffffLL,0xffffffffffffffffLL,0xffffffffffffffffLL};\nconst BTC512 BTC512Max = {0xffffffffffffffffLL,0xffffffffffffffffLL,0xffffffffffffffffLL,0xffffffffffffffffLL,\n                          0xffffffffffffffffLL,0xffffffffffffffffLL,0xffffffffffffffffLL,0xffffffffffffffffLL};\n\n// Using ints assuming little-endian platform. 160-bit chunk actually begins with 82963d5e. Same thing about the rest.\n// Digest::SHA512.hexdigest(\"CoreBitcoin/BTC160Null\")[0,2*20].scan(/.{8}/).map{|x| \"0x\" + x.scan(/../).reverse.join}.join(\",\")\n// 82963d5edd842f1e6bd2b6bc2e9a97a40a7d8652\nconst BTC160 BTC160Null = {0x5e3d9682,0x1e2f84dd,0xbcb6d26b,0xa4979a2e,0x52867d0a};\n\n// Digest::SHA512.hexdigest(\"CoreBitcoin/BTC256Null\")[0,2*32].scan(/.{16}/).map{|x| \"0x\" + x.scan(/../).reverse.join}.join(\",\")\n// d1007a1fe826e95409e21595845f44c3b9411d5285b6b5982285aabfa5999a5e\nconst BTC256 BTC256Null = {0x54e926e81f7a00d1LL,0xc3445f849515e209LL,0x98b5b685521d41b9LL,0x5e9a99a5bfaa8522LL};\n\n// Digest::SHA512.hexdigest(\"CoreBitcoin/BTC512Null\")[0,2*64].scan(/.{16}/).map{|x| \"0x\" + x.scan(/../).reverse.join}.join(\",\")\n// 62ce64dd92836e6e99d83eee3f623652f6049cf8c22272f295b262861738f0363e01b5d7a53c4a2e5a76d283f3e4a04d28ab54849c6e3e874ca31128bcb759e1\nconst BTC512 BTC512Null = {0x6e6e8392dd64ce62LL,0x5236623fee3ed899LL,0xf27222c2f89c04f6LL,0x36f038178662b295LL,0x2e4a3ca5d7b5013eLL,0x4da0e4f383d2765aLL,0x873e6e9c8454ab28LL,0xe159b7bc2811a34cLL};\n\n\n// 3. Comparison\n\nBOOL BTC160Equal(BTC160 chunk1, BTC160 chunk2) {\n// Which one is faster: memcmp or word-by-word check? The latter does not need any loop or extra checks to compare bytes.\n//    return memcmp(&chunk1, &chunk2, sizeof(chunk1)) == 0;\n    return chunk1.words32[0] == chunk2.words32[0]\n        && chunk1.words32[1] == chunk2.words32[1]\n        && chunk1.words32[2] == chunk2.words32[2]\n        && chunk1.words32[3] == chunk2.words32[3]\n        && chunk1.words32[4] == chunk2.words32[4];\n}\n\nBOOL BTC256Equal(BTC256 chunk1, BTC256 chunk2) {\n    return chunk1.words64[0] == chunk2.words64[0]\n        && chunk1.words64[1] == chunk2.words64[1]\n        && chunk1.words64[2] == chunk2.words64[2]\n        && chunk1.words64[3] == chunk2.words64[3];\n}\n\nBOOL BTC512Equal(BTC512 chunk1, BTC512 chunk2) {\n    return chunk1.words64[0] == chunk2.words64[0]\n        && chunk1.words64[1] == chunk2.words64[1]\n        && chunk1.words64[2] == chunk2.words64[2]\n        && chunk1.words64[3] == chunk2.words64[3]\n        && chunk1.words64[4] == chunk2.words64[4]\n        && chunk1.words64[5] == chunk2.words64[5]\n        && chunk1.words64[6] == chunk2.words64[6]\n        && chunk1.words64[7] == chunk2.words64[7];\n}\n\nNSComparisonResult BTC160Compare(BTC160 chunk1, BTC160 chunk2) {\n    int r = memcmp(&chunk1, &chunk2, sizeof(chunk1));\n    \n         if (r > 0) return NSOrderedDescending;\n    else if (r < 0) return NSOrderedAscending;\n    return NSOrderedSame;\n}\n\nNSComparisonResult BTC256Compare(BTC256 chunk1, BTC256 chunk2) {\n    int r = memcmp(&chunk1, &chunk2, sizeof(chunk1));\n    \n         if (r > 0) return NSOrderedDescending;\n    else if (r < 0) return NSOrderedAscending;\n    return NSOrderedSame;\n}\n\nNSComparisonResult BTC512Compare(BTC512 chunk1, BTC512 chunk2) {\n    int r = memcmp(&chunk1, &chunk2, sizeof(chunk1));\n    \n         if (r > 0) return NSOrderedDescending;\n    else if (r < 0) return NSOrderedAscending;\n    return NSOrderedSame;\n}\n\n\n\n// 4. Operations\n\n\n// Inverse (b = ~a)\nBTC160 BTC160Inverse(BTC160 chunk) {\n    chunk.words32[0] = ~chunk.words32[0];\n    chunk.words32[1] = ~chunk.words32[1];\n    chunk.words32[2] = ~chunk.words32[2];\n    chunk.words32[3] = ~chunk.words32[3];\n    chunk.words32[4] = ~chunk.words32[4];\n    return chunk;\n}\n\nBTC256 BTC256Inverse(BTC256 chunk) {\n    chunk.words64[0] = ~chunk.words64[0];\n    chunk.words64[1] = ~chunk.words64[1];\n    chunk.words64[2] = ~chunk.words64[2];\n    chunk.words64[3] = ~chunk.words64[3];\n    return chunk;\n}\n\nBTC512 BTC512Inverse(BTC512 chunk) {\n    chunk.words64[0] = ~chunk.words64[0];\n    chunk.words64[1] = ~chunk.words64[1];\n    chunk.words64[2] = ~chunk.words64[2];\n    chunk.words64[3] = ~chunk.words64[3];\n    chunk.words64[4] = ~chunk.words64[4];\n    chunk.words64[5] = ~chunk.words64[5];\n    chunk.words64[6] = ~chunk.words64[6];\n    chunk.words64[7] = ~chunk.words64[7];\n    return chunk;\n}\n\n// Swap byte order\nBTC160 BTC160Swap(BTC160 chunk) {\n    BTC160 chunk2;\n    chunk2.words32[4] = OSSwapConstInt32(chunk.words32[0]);\n    chunk2.words32[3] = OSSwapConstInt32(chunk.words32[1]);\n    chunk2.words32[2] = OSSwapConstInt32(chunk.words32[2]);\n    chunk2.words32[1] = OSSwapConstInt32(chunk.words32[3]);\n    chunk2.words32[0] = OSSwapConstInt32(chunk.words32[4]);\n    return chunk2;\n}\n\nBTC256 BTC256Swap(BTC256 chunk) {\n    BTC256 chunk2;\n    chunk2.words64[3] = OSSwapConstInt64(chunk.words64[0]);\n    chunk2.words64[2] = OSSwapConstInt64(chunk.words64[1]);\n    chunk2.words64[1] = OSSwapConstInt64(chunk.words64[2]);\n    chunk2.words64[0] = OSSwapConstInt64(chunk.words64[3]);\n    return chunk2;\n}\n\nBTC512 BTC512Swap(BTC512 chunk) {\n    BTC512 chunk2;\n    chunk2.words64[7] = OSSwapConstInt64(chunk.words64[0]);\n    chunk2.words64[6] = OSSwapConstInt64(chunk.words64[1]);\n    chunk2.words64[5] = OSSwapConstInt64(chunk.words64[2]);\n    chunk2.words64[4] = OSSwapConstInt64(chunk.words64[3]);\n    chunk2.words64[3] = OSSwapConstInt64(chunk.words64[4]);\n    chunk2.words64[2] = OSSwapConstInt64(chunk.words64[5]);\n    chunk2.words64[1] = OSSwapConstInt64(chunk.words64[6]);\n    chunk2.words64[0] = OSSwapConstInt64(chunk.words64[7]);\n    return chunk2;\n}\n\n// Bitwise AND operation (a & b)\nBTC160 BTC160AND(BTC160 chunk1, BTC160 chunk2) {\n    chunk1.words32[0] = chunk1.words32[0] & chunk2.words32[0];\n    chunk1.words32[1] = chunk1.words32[1] & chunk2.words32[1];\n    chunk1.words32[2] = chunk1.words32[2] & chunk2.words32[2];\n    chunk1.words32[3] = chunk1.words32[3] & chunk2.words32[3];\n    chunk1.words32[4] = chunk1.words32[4] & chunk2.words32[4];\n    return chunk1;\n}\n\nBTC256 BTC256AND(BTC256 chunk1, BTC256 chunk2) {\n    chunk1.words64[0] = chunk1.words64[0] & chunk2.words64[0];\n    chunk1.words64[1] = chunk1.words64[1] & chunk2.words64[1];\n    chunk1.words64[2] = chunk1.words64[2] & chunk2.words64[2];\n    chunk1.words64[3] = chunk1.words64[3] & chunk2.words64[3];\n    return chunk1;\n}\n\nBTC512 BTC512AND(BTC512 chunk1, BTC512 chunk2) {\n    chunk1.words64[0] = chunk1.words64[0] & chunk2.words64[0];\n    chunk1.words64[1] = chunk1.words64[1] & chunk2.words64[1];\n    chunk1.words64[2] = chunk1.words64[2] & chunk2.words64[2];\n    chunk1.words64[3] = chunk1.words64[3] & chunk2.words64[3];\n    chunk1.words64[4] = chunk1.words64[4] & chunk2.words64[4];\n    chunk1.words64[5] = chunk1.words64[5] & chunk2.words64[5];\n    chunk1.words64[6] = chunk1.words64[6] & chunk2.words64[6];\n    chunk1.words64[7] = chunk1.words64[7] & chunk2.words64[7];\n    return chunk1;\n}\n\n// Bitwise OR operation (a | b)\nBTC160 BTC160OR(BTC160 chunk1, BTC160 chunk2) {\n    chunk1.words32[0] = chunk1.words32[0] | chunk2.words32[0];\n    chunk1.words32[1] = chunk1.words32[1] | chunk2.words32[1];\n    chunk1.words32[2] = chunk1.words32[2] | chunk2.words32[2];\n    chunk1.words32[3] = chunk1.words32[3] | chunk2.words32[3];\n    chunk1.words32[4] = chunk1.words32[4] | chunk2.words32[4];\n    return chunk1;\n}\n\nBTC256 BTC256OR(BTC256 chunk1, BTC256 chunk2) {\n    chunk1.words64[0] = chunk1.words64[0] | chunk2.words64[0];\n    chunk1.words64[1] = chunk1.words64[1] | chunk2.words64[1];\n    chunk1.words64[2] = chunk1.words64[2] | chunk2.words64[2];\n    chunk1.words64[3] = chunk1.words64[3] | chunk2.words64[3];\n    return chunk1;\n}\n\nBTC512 BTC512OR(BTC512 chunk1, BTC512 chunk2) {\n    chunk1.words64[0] = chunk1.words64[0] | chunk2.words64[0];\n    chunk1.words64[1] = chunk1.words64[1] | chunk2.words64[1];\n    chunk1.words64[2] = chunk1.words64[2] | chunk2.words64[2];\n    chunk1.words64[3] = chunk1.words64[3] | chunk2.words64[3];\n    chunk1.words64[4] = chunk1.words64[4] | chunk2.words64[4];\n    chunk1.words64[5] = chunk1.words64[5] | chunk2.words64[5];\n    chunk1.words64[6] = chunk1.words64[6] | chunk2.words64[6];\n    chunk1.words64[7] = chunk1.words64[7] | chunk2.words64[7];\n    return chunk1;\n}\n\n// Bitwise exclusive-OR operation (a ^ b)\nBTC160 BTC160XOR(BTC160 chunk1, BTC160 chunk2) {\n    chunk1.words32[0] = chunk1.words32[0] ^ chunk2.words32[0];\n    chunk1.words32[1] = chunk1.words32[1] ^ chunk2.words32[1];\n    chunk1.words32[2] = chunk1.words32[2] ^ chunk2.words32[2];\n    chunk1.words32[3] = chunk1.words32[3] ^ chunk2.words32[3];\n    chunk1.words32[4] = chunk1.words32[4] ^ chunk2.words32[4];\n    return chunk1;\n}\n\nBTC256 BTC256XOR(BTC256 chunk1, BTC256 chunk2) {\n    chunk1.words64[0] = chunk1.words64[0] ^ chunk2.words64[0];\n    chunk1.words64[1] = chunk1.words64[1] ^ chunk2.words64[1];\n    chunk1.words64[2] = chunk1.words64[2] ^ chunk2.words64[2];\n    chunk1.words64[3] = chunk1.words64[3] ^ chunk2.words64[3];\n    return chunk1;\n}\n\nBTC512 BTC512XOR(BTC512 chunk1, BTC512 chunk2) {\n    chunk1.words64[0] = chunk1.words64[0] ^ chunk2.words64[0];\n    chunk1.words64[1] = chunk1.words64[1] ^ chunk2.words64[1];\n    chunk1.words64[2] = chunk1.words64[2] ^ chunk2.words64[2];\n    chunk1.words64[3] = chunk1.words64[3] ^ chunk2.words64[3];\n    chunk1.words64[4] = chunk1.words64[4] ^ chunk2.words64[4];\n    chunk1.words64[5] = chunk1.words64[5] ^ chunk2.words64[5];\n    chunk1.words64[6] = chunk1.words64[6] ^ chunk2.words64[6];\n    chunk1.words64[7] = chunk1.words64[7] ^ chunk2.words64[7];\n    return chunk1;\n}\n\nBTC512 BTC512Concat(BTC256 chunk1, BTC256 chunk2) {\n    BTC512 result;\n    *((BTC256*)(&result)) = chunk1;\n    *((BTC256*)(((unsigned char*)&result) + sizeof(chunk2))) = chunk2;\n    return result;\n}\n\n\n// 5. Conversion functions\n\n\n// Conversion to NSData\nNSData* NSDataFromBTC160(BTC160 chunk) {\n    return [[NSData alloc] initWithBytes:&chunk length:sizeof(chunk)];\n}\n\nNSData* NSDataFromBTC256(BTC256 chunk) {\n    return [[NSData alloc] initWithBytes:&chunk length:sizeof(chunk)];\n}\n\nNSData* NSDataFromBTC512(BTC512 chunk) {\n    return [[NSData alloc] initWithBytes:&chunk length:sizeof(chunk)];\n}\n\n// Conversion from NSData.\n// If NSData is not big enough, returns BTCHash{160,256,512}Null.\nBTC160 BTC160FromNSData(NSData* data) {\n    if (data.length < 160/8) return BTC160Null;\n    BTC160 chunk = *((BTC160*)data.bytes);\n    return chunk;\n}\n\nBTC256 BTC256FromNSData(NSData* data) {\n    if (data.length < 256/8) return BTC256Null;\n    BTC256 chunk = *((BTC256*)data.bytes);\n    return chunk;\n}\n\nBTC512 BTC512FromNSData(NSData* data) {\n    if (data.length < 512/8) return BTC512Null;\n    BTC512 chunk = *((BTC512*)data.bytes);\n    return chunk;\n}\n\n\n// Returns lowercase hex representation of the chunk\n\nNSString* NSStringFromBTC160(BTC160 chunk) {\n    const int length = 20;\n    char dest[2*length + 1];\n    const unsigned char *src = (unsigned char *)&chunk;\n    for (int i = 0; i < length; ++i) {\n        sprintf(dest + i*2, \"%02x\", (unsigned int)(src[i]));\n    }\n    return [[NSString alloc] initWithBytes:dest length:2*length encoding:NSASCIIStringEncoding];\n}\n\nNSString* NSStringFromBTC256(BTC256 chunk) {\n    const int length = 32;\n    char dest[2*length + 1];\n    const unsigned char *src = (unsigned char *)&chunk;\n    for (int i = 0; i < length; ++i) {\n        sprintf(dest + i*2, \"%02x\", (unsigned int)(src[i]));\n    }\n    return [[NSString alloc] initWithBytes:dest length:2*length encoding:NSASCIIStringEncoding];\n}\n\nNSString* NSStringFromBTC512(BTC512 chunk) {\n    const int length = 64;\n    char dest[2*length + 1];\n    const unsigned char *src = (unsigned char *)&chunk;\n    for (int i = 0; i < length; ++i) {\n        sprintf(dest + i*2, \"%02x\", (unsigned int)(src[i]));\n    }\n    return [[NSString alloc] initWithBytes:dest length:2*length encoding:NSASCIIStringEncoding];\n}\n\n// Conversion from hex NSString (lower- or uppercase).\n// If string is invalid or data is too short, returns BTCHash{160,256,512}Null.\nBTC160 BTC160FromNSString(NSString* string) {\n    return BTC160FromNSData(BTCDataFromHex(string));\n}\n\nBTC256 BTC256FromNSString(NSString* string) {\n    return BTC256FromNSData(BTCDataFromHex(string));\n}\n\nBTC512 BTC512FromNSString(NSString* string) {\n    return BTC512FromNSData(BTCDataFromHex(string));\n}\n\n\n\n"
  },
  {
    "path": "Pods/CoreBitcoin/CoreBitcoin/BTCAddress.h",
    "content": "// CoreBitcoin by Oleg Andreev <oleganza@gmail.com>, WTFPL.\n\n#import <Foundation/Foundation.h>\n\n// Addresses are Base58-encoded pieces of data representing various objects:\n//\n// 1. Public key (actually, a hash of a public key) address. Example: 19FGfswVqxNubJbh1NW8A4t51T9x9RDVWQ.\n// 2. Private key for uncompressed public key. Example: 5KQntKuhYWSRXNqp2yhdXzjekYAR7US3MT1715Mbv5CyUKV6hVe.\n// 3. Private key for compressed public key. Example: L3p8oAcQTtuokSCRHQ7i4MhjWc9zornvpJLfmg62sYpLRJF9woSu.\n// 4. Script address (P2SH). Example: 3NukJ6fYZJ5Kk8bPjycAnruZkE5Q7UW7i8.\n//\n// Testnet addresses are also supported with the following subclasses:\n//   BTCPublicKeyAddressTestnet, \n//   BTCPrivateKeyAddressTestnet, \n//   BTCScriptHashAddressTestnet.\n//\n@class BTCKey;\n@class BTCNetwork;\n@interface BTCAddress : NSObject\n\n/*!\n * Allows subclasses to be instantiated by a call to a superclass: BTCAddress(string: \"...\")\n */\n+ (void) registerAddressClass:(nonnull Class)addressClass version:(uint8_t)version;\n\n/*!\n * Returns an instance of a specific subclass depending on version number.\n * Returns nil for unsupported addresses.\n */\n+ (nullable instancetype) addressWithString:(nullable NSString*)string;\n\n/*!\n * Initializes address with raw data. Should only be used in subclasses, base class will raise exception.\n * Returns an instance of a specific subclass depending on version number.\n */\n+ (nullable instancetype) addressWithData:(nullable NSData*)data;\n\n/*!\n * Returns binary contents of an address (without checksums or version number).\n * 20 bytes for hashes, 32 bytes for private key.\n */\n@property(nonatomic, readonly, nonnull) NSData* data;\n\n/*!\n * Returns representation in base58 encoding.\n */\n@property(nonatomic, readonly, nonnull) NSString* string;\n\n/*!\n * Returns a public version of this address. By default it is a receiver itself.\n * PrivateKeyAddress returns appropriate PublicKeyAddress.\n */\n@property(nonatomic, readonly, nonnull) BTCAddress* publicAddress;\n\n/*!\n * Returns mainnet or testnet3 instance.\n */\n@property(nonatomic, readonly, nonnull) BTCNetwork* network;\n\n/*!\n * Returns YES if this address is intended for testnet.\n */\n@property(nonatomic, readonly) BOOL isTestnet;\n\n/*!\n * Clears contents of the data to prevent leaks.\n */\n- (void) clear;\n\n\n// Returns an instance of a specific subclass depending on version number.\n// Returns nil for unsupported addresses.\n// DEPRECATED! Use `-addressWithString:` instead.\n+ (nullable instancetype) addressWithBase58String:(nullable NSString*)string DEPRECATED_ATTRIBUTE;\n// Returns representation in base58 encoding.\n// DEPRECATED! Use -string instead.\n@property(nonatomic, readonly, nonnull) NSString* base58String DEPRECATED_ATTRIBUTE;\n\n@end\n\n\n// Standard public key address (19FGfswVqxNubJbh1NW8A4t51T9x9RDVWQ)\n@interface BTCPublicKeyAddress : BTCAddress\n@end\n@interface BTCPublicKeyAddressTestnet : BTCPublicKeyAddress\n@end\n\n\n// Private key in WIF format (5KQntKuhYWSRXNq... or L3p8oAcQTtuokSC..., base58-encoded)\n@interface BTCPrivateKeyAddress : BTCAddress\n// Private key itself is not compressed, but it has extra 0x01 byte to indicate\n// that derived pubkey must be compressed (as this affects the address derived from pubkey).\n@property(nonatomic, getter=isPublicKeyCompressed) BOOL publicKeyCompressed;\n\n// Returns BTCKey containing a key pair. Its public key is compressed as specified by the address.\n@property(nonatomic, readonly, nonnull) BTCKey* key;\n\n// Creates address from raw private key data. If the public key must be compressed, pass YES to publicKeyCompressed:.\n+ (nullable instancetype) addressWithData:(nullable NSData*)data publicKeyCompressed:(BOOL)compressedPubkey;\n@end\n@interface BTCPrivateKeyAddressTestnet : BTCPrivateKeyAddress\n@end\n\n// P2SH address (e.g. 3NukJ6fYZJ5Kk8bPjycAnruZkE5Q7UW7i8)\n@interface BTCScriptHashAddress : BTCAddress\n@end\n@interface BTCScriptHashAddressTestnet : BTCScriptHashAddress\n@end\n"
  },
  {
    "path": "Pods/CoreBitcoin/CoreBitcoin/BTCAddress.m",
    "content": "// Oleg Andreev <oleganza@gmail.com>\n\n#import \"BTCAddress.h\"\n#import \"BTCAddressSubclass.h\"\n#import \"BTCNetwork.h\"\n#import \"BTCData.h\"\n#import \"BTCBase58.h\"\n#import \"BTCKey.h\"\n#import <objc/runtime.h>\n\nenum\n{\n    BTCPublicKeyAddressVersion         = 0,\n    BTCPrivateKeyAddressVersion        = 128,\n    BTCScriptHashAddressVersion        = 5,\n    BTCPublicKeyAddressVersionTestnet  = 111,\n    BTCPrivateKeyAddressVersionTestnet = 239,\n    BTCScriptHashAddressVersionTestnet = 196,\n};\n\n@implementation BTCAddress {\n    char* _cstring;\n    NSData* _data;\n}\n\n- (id) init {\n    if (self = [super init]) {\n        _data = nil;\n    }\n    return self;\n}\n\n- (void) setData:(NSData *)data {\n    id d = [data copy];\n    _data = d;\n}\n\n- (NSData*) data {\n    return _data;\n}\n\n- (void) dealloc {\n    // The data may be retained by someone and should not be cleared like that.\n//    [self clear];\n    if (_cstring) free(_cstring);\n}\n\n+ (instancetype) addressWithString:(NSString*)string {\n    return [self addressWithBase58CString:[string cStringUsingEncoding:NSASCIIStringEncoding]];\n}\n\n+ (instancetype) addressWithBase58String:(NSString*)string { // DEPRECATED\n    return [self addressWithString:string];\n}\n\n// Initializes address with raw data. Should only be used in subclasses, base class will raise exception.\n+ (instancetype) addressWithData:(NSData*)data {\n    @throw [NSException exceptionWithName:@\"BTCAddress Exception\"\n                                   reason:@\"Cannot init base class with raw data. Please use specialized subclass.\" userInfo:nil];\n    return nil;\n}\n\n// prototype to make clang happy.\n+ (instancetype) addressWithComposedData:(NSData*)data cstring:(const char*)cstring version:(uint8_t)version {\n    return nil;\n}\n\n// Returns an instance of a specific subclass depending on version number.\n// Returns nil for unsupported addresses.\n+ (id) addressWithBase58CString:(const char*)cstring {\n    NSMutableData* composedData = BTCDataFromBase58CheckCString(cstring);\n    if (!composedData) return nil;\n    if (composedData.length < 2) return nil;\n    \n    uint8_t version = ((unsigned char*)composedData.bytes)[0];\n\n    NSDictionary* classes = [self registeredAddressClasses];\n    Class cls = classes[@(version)];\n    BTCAddress* address = [cls addressWithComposedData:composedData cstring:cstring version:version];\n    if (!address) {\n        NSLog(@\"BTCAddress: unknown address version: %d\", version);\n    }\n\n    // Verify that address is compatible with the class being invoked.\n    // So if someone asked to parse P2PKH address with P2SH string, they will get nil instead of P2SH instance.\n    if (![address isKindOfClass:self]) {\n        return nil;\n    }\n\n    // Securely erase decoded address data\n    BTCDataClear(composedData);\n    \n    return address;\n}\n\n- (void) setBase58CString:(const char*)cstring {\n    if (_cstring) {\n        BTCSecureClearCString(_cstring);\n        free(_cstring);\n        _cstring = NULL;\n    }\n\n    if (cstring) {\n        size_t len = strlen(cstring) + 1; // with \\0\n        _cstring = malloc(len);\n        memcpy(_cstring, cstring, len);\n    }\n}\n\n// for subclasses\n- (NSMutableData*) dataForBase58Encoding {\n    return nil;\n}\n\n- (const char*) base58CString {\n    if (!_cstring) {\n        NSMutableData* data = [self dataForBase58Encoding];\n        _cstring = BTCBase58CheckCStringWithData(data);\n        BTCDataClear(data);\n    }\n    return _cstring;\n}\n\n// Returns representation in base58 encoding.\n- (NSString*) string {\n    const char* cstr = [self base58CString];\n    if (!cstr) return nil;\n    return [NSString stringWithCString:cstr encoding:NSASCIIStringEncoding];\n}\n\n- (NSString*) base58String { // deprecated\n    return [self string];\n}\n\n- (BTCAddress*) publicAddress {\n    return self;\n}\n\n- (BTCNetwork*) network {\n    // TODO: use this as a primary source and replace isTestnet\n    return [self isTestnet] ? [BTCNetwork testnet] : [BTCNetwork mainnet];\n}\n\n- (BOOL) isTestnet {\n    // TODO: replace this method with network property exclusively.\n    return NO;\n}\n\n- (uint8_t) versionByte {\n    return [[self class] BTCVersionPrefix];\n}\n\n+ (uint8_t) BTCVersionPrefix {\n    [NSException raise:@\"BTCAddress BTCVersionPrefix must be accessed via subclasses\" format:@\"\"];\n    return 0xff;\n}\n\n- (void) clear {\n    BTCSecureClearCString(_cstring);\n    BTCDataClear(_data);\n}\n\n- (NSString*) description {\n    return [NSString stringWithFormat:@\"<%@: %@>\", [self class], self.string];\n}\n\n- (BOOL) isEqual:(BTCAddress*)other {\n    if (![other isKindOfClass:[BTCAddress class]]) return NO;\n    return [self.string isEqualToString:other.string];\n}\n\n\n// Known Addresses\n\n\n+ (NSMutableDictionary*) registeredAddressClasses {\n    static dispatch_once_t onceToken;\n    static NSMutableDictionary* registeredAddressClasses;\n    dispatch_once(&onceToken, ^{\n        registeredAddressClasses = [NSMutableDictionary dictionary];\n    });\n    return registeredAddressClasses;\n}\n\n// Registers a price source with a given name.\n+ (void) registerAddressClass:(Class)addressClass version:(uint8_t)version {\n    if (!addressClass) return;\n    [self registeredAddressClasses][@(version)] = addressClass;\n}\n\n\n@end\n\n\n@implementation BTCPublicKeyAddress\n\n+ (void) load {\n    [BTCAddress registerAddressClass:self version:[self BTCVersionPrefix]];\n}\n\n+ (uint8_t) BTCVersionPrefix {\n    return BTCPublicKeyAddressVersion;\n}\n\n#define BTCPublicKeyAddressLength 20\n\n+ (instancetype) addressWithData:(NSData*)data {\n    if (!data) return nil;\n    if (data.length != BTCPublicKeyAddressLength) {\n        NSLog(@\"+[BTCPublicKeyAddress addressWithData] cannot init with hash %d bytes long\", (int)data.length);\n        return nil;\n    }\n    BTCPublicKeyAddress* addr = [[self alloc] init];\n    addr.data = [NSMutableData dataWithData:data];\n    return addr;\n}\n\n+ (instancetype) addressWithComposedData:(NSData*)composedData cstring:(const char*)cstring version:(uint8_t)version {\n    if (composedData.length != (1 + BTCPublicKeyAddressLength)) {\n        NSLog(@\"BTCPublicKeyAddress: cannot init with %d bytes (need 20+1 bytes)\", (int)composedData.length);\n        return nil;\n    }\n    BTCPublicKeyAddress* addr = [[self alloc] init];\n    addr.data = [[NSMutableData alloc] initWithBytes:((const char*)composedData.bytes) + 1 length:composedData.length - 1];\n    addr.base58CString = cstring;\n    return addr;\n}\n\n- (NSMutableData*) dataForBase58Encoding {\n    NSMutableData* data = [NSMutableData dataWithLength:1 + BTCPublicKeyAddressLength];\n    char* buf = data.mutableBytes;\n    buf[0] = [self versionByte];\n    memcpy(buf + 1, self.data.bytes, BTCPublicKeyAddressLength);\n    return data;\n}\n\n@end\n\n@implementation BTCPublicKeyAddressTestnet\n\n+ (void) load {\n    [BTCAddress registerAddressClass:self version:[self BTCVersionPrefix]];\n}\n\n+ (uint8_t) BTCVersionPrefix {\n    return BTCPublicKeyAddressVersionTestnet;\n}\n\n- (BOOL) isTestnet {\n    return YES;\n}\n\n@end\n\n\n\n\n\n\n// Private key in Base58 format (5KQntKuhYWSRXNq... or L3p8oAcQTtuokSC...)\n@implementation BTCPrivateKeyAddress {\n    BOOL _publicKeyCompressed;\n}\n\n+ (void) load {\n    [BTCAddress registerAddressClass:self version:[self BTCVersionPrefix]];\n}\n\n+ (uint8_t) BTCVersionPrefix {\n    return BTCPrivateKeyAddressVersion;\n}\n\n#define BTCPrivateKeyAddressLength 32\n\n+ (instancetype) addressWithData:(NSData*)data {\n    return [self addressWithData:data publicKeyCompressed:NO];\n}\n\n+ (instancetype) addressWithData:(NSData*)data publicKeyCompressed:(BOOL)compressedPubkey {\n    if (!data) return nil;\n    if (data.length != BTCPrivateKeyAddressLength) {\n        NSLog(@\"+[BTCPrivateKeyAddress addressWithData] cannot init with secret of %d bytes long\", (int)data.length);\n        return nil;\n    }\n    BTCPrivateKeyAddress* addr = [[self alloc] init];\n    addr.data = [NSMutableData dataWithData:data];\n    addr.publicKeyCompressed = compressedPubkey;\n    return addr;\n}\n\n+ (id) addressWithComposedData:(NSData*)data cstring:(const char*)cstring version:(uint8_t)version {\n    if (data.length != (1 + BTCPrivateKeyAddressLength + 1) &&  data.length != (1 + BTCPrivateKeyAddressLength)) {\n        NSLog(@\"BTCPrivateKeyAddress: cannot init with %d bytes (need 1+32(+1) bytes)\", (int)data.length);\n        return nil;\n    }\n    \n    // The life is not always easy. Somehow some people added one extra byte to a private key in Base58 to\n    // let us know that the resulting public key must be compressed.\n    // Private key itself is always 32 bytes.\n    BOOL compressed = (data.length == (1+BTCPrivateKeyAddressLength+1));\n    \n    BTCPrivateKeyAddress* addr = [[self alloc] init];\n    addr.data = [NSMutableData dataWithBytes:((const char*)data.bytes) + 1 length:32];\n    addr.base58CString = cstring;\n    addr->_publicKeyCompressed = compressed;\n    return addr;\n}\n\n- (BTCKey*) key {\n    BTCKey* key = [[BTCKey alloc] initWithPrivateKey:self.data];\n    key.publicKeyCompressed = self.isPublicKeyCompressed;\n    return key;\n}\n\n- (BTCAddress*) publicAddress {\n    return [BTCPublicKeyAddress addressWithData:BTCHash160(self.key.publicKey)];\n}\n\n// Private key itself is not compressed, but it has extra 0x01 byte to indicate\n// that derived pubkey must be compressed (as this affects the pubkey address).\n- (BOOL) isPublicKeyCompressed {\n    return _publicKeyCompressed;\n}\n\n- (void) setPublicKeyCompressed:(BOOL)compressed {\n    if (_publicKeyCompressed != compressed) {\n        _publicKeyCompressed = compressed;\n        self.base58CString = NULL;\n    }\n}\n\n- (NSMutableData*) dataForBase58Encoding {\n    NSMutableData* data = [NSMutableData dataWithLength:1 + BTCPrivateKeyAddressLength + (_publicKeyCompressed ? 1 : 0)];\n    char* buf = data.mutableBytes;\n    buf[0] = [self versionByte];\n    memcpy(buf + 1, self.data.bytes, BTCPrivateKeyAddressLength);\n    if (_publicKeyCompressed) {\n        // Add extra byte 0x01 in the end.\n        buf[1 + BTCPrivateKeyAddressLength] = (unsigned char)1;\n    }\n    return data;\n}\n\n@end\n\n@implementation BTCPrivateKeyAddressTestnet\n\n+ (void) load {\n    [BTCAddress registerAddressClass:self version:[self BTCVersionPrefix]];\n}\n\n+ (uint8_t) BTCVersionPrefix {\n    return BTCPrivateKeyAddressVersionTestnet;\n}\n\n- (BTCAddress*) publicAddress {\n    return [BTCPublicKeyAddressTestnet addressWithData:BTCHash160(self.key.publicKey)];\n}\n\n- (BOOL) isTestnet {\n    return YES;\n}\n\n@end\n\n\n\n\n\n\n\n\n// P2SH address (e.g. 3NukJ6fYZJ5Kk8bPjycAnruZkE5Q7UW7i8)\n@implementation BTCScriptHashAddress\n\n+ (void) load {\n    [BTCAddress registerAddressClass:self version:[self BTCVersionPrefix]];\n}\n\n+ (uint8_t) BTCVersionPrefix {\n    return BTCScriptHashAddressVersion;\n}\n\n\n#define BTCScriptHashAddressLength 20\n\n+ (instancetype) addressWithData:(NSData*)data {\n    if (!data) return nil;\n    if (data.length != BTCScriptHashAddressLength) {\n        NSLog(@\"+[BTCScriptHashAddress addressWithData] cannot init with hash %d bytes long\", (int)data.length);\n        return nil;\n    }\n    BTCScriptHashAddress* addr = [[self alloc] init];\n    addr.data = [NSMutableData dataWithData:data];\n    return addr;\n}\n\n+ (id) addressWithComposedData:(NSData*)data cstring:(const char*)cstring version:(uint8_t)version {\n    if (data.length != (1 + BTCScriptHashAddressLength)) {\n        NSLog(@\"BTCPublicKeyAddress: cannot init with %d bytes (need 20+1 bytes)\", (int)data.length);\n        return nil;\n    }\n    BTCScriptHashAddress* addr = [[self alloc] init];\n    addr.data = [[NSMutableData dataWithBytes:((const char*)data.bytes) + 1 length:data.length - 1] copy];\n    NSLog(@\"Created P2SH data: %p (%@)\", addr.data, addr.data);\n    addr.base58CString = cstring;\n    return addr;\n}\n\n- (NSMutableData*) dataForBase58Encoding {\n    NSMutableData* data = [NSMutableData dataWithLength:1 + BTCScriptHashAddressLength];\n    char* buf = data.mutableBytes;\n    buf[0] = [self versionByte];\n    memcpy(buf + 1, self.data.bytes, BTCScriptHashAddressLength);\n    return data;\n}\n\n@end\n\n@implementation BTCScriptHashAddressTestnet\n\n+ (void) load {\n    [BTCAddress registerAddressClass:self version:[self BTCVersionPrefix]];\n}\n\n+ (uint8_t) BTCVersionPrefix {\n    return BTCScriptHashAddressVersionTestnet;\n}\n\n- (BOOL) isTestnet {\n    return YES;\n}\n\n@end"
  },
  {
    "path": "Pods/CoreBitcoin/CoreBitcoin/BTCAddressSubclass.h",
    "content": "// CoreBitcoin by Oleg Andreev <oleganza@gmail.com>, WTFPL.\n\n#ifndef CoreBitcoin_BTCAddressSubclass_h\n#define CoreBitcoin_BTCAddressSubclass_h\n\n@interface BTCAddress ()\n@property(nonatomic, readwrite) NSData* data;\n@end\n\n#endif\n"
  },
  {
    "path": "Pods/CoreBitcoin/CoreBitcoin/BTCAssetAddress.h",
    "content": "// CoreBitcoin by Oleg Andreev <oleganza@gmail.com>, WTFPL.\n\n#import \"BTCAddress.h\"\n\n@interface BTCAssetAddress : BTCAddress\n@property(nonatomic, readonly, nonnull) BTCAddress* bitcoinAddress;\n+ (nonnull instancetype) addressWithBitcoinAddress:(nonnull BTCAddress*)btcAddress;\n@end\n"
  },
  {
    "path": "Pods/CoreBitcoin/CoreBitcoin/BTCAssetAddress.m",
    "content": "// CoreBitcoin by Oleg Andreev <oleganza@gmail.com>, WTFPL.\n\n#import \"BTCAssetAddress.h\"\n#import \"BTCData.h\"\n#import \"BTCBase58.h\"\n\n@interface BTCAssetAddress ()\n@property(nonatomic, readwrite) BTCAddress* bitcoinAddress;\n@end\n\n// OpenAssets Address, e.g. akB4NBW9UuCmHuepksob6yfZs6naHtRCPNy (corresponds to 16UwLL9Risc3QfPqBUvKofHmBQ7wMtjvM)\n@implementation BTCAssetAddress\n\n#define BTCAssetAddressNamespace 0x13\n\n+ (void) load {\n    [BTCAddress registerAddressClass:self version:BTCAssetAddressNamespace];\n}\n\n+ (instancetype) addressWithBitcoinAddress:(BTCAddress*)btcAddress {\n    if (!btcAddress) return nil;\n    BTCAssetAddress* addr = [[self alloc] init];\n    addr.bitcoinAddress = btcAddress;\n    return addr;\n}\n\n+ (instancetype) addressWithString:(NSString*)string {\n    NSMutableData* composedData = BTCDataFromBase58Check(string);\n    uint8_t version = ((unsigned char*)composedData.bytes)[0];\n    return [self addressWithComposedData:composedData cstring:[string cStringUsingEncoding:NSUTF8StringEncoding] version:version];\n}\n\n+ (instancetype) addressWithComposedData:(NSData*)composedData cstring:(const char*)cstring version:(uint8_t)version {\n    if (!composedData) return nil;\n    if (composedData.length < 2) return nil;\n\n    if (version == BTCAssetAddressNamespace) { // same for testnet and mainnet\n        BTCAddress* btcAddr = [BTCAddress addressWithString:BTCBase58CheckStringWithData([composedData subdataWithRange:NSMakeRange(1, composedData.length - 1)])];\n        return [self addressWithBitcoinAddress:btcAddr];\n    } else {\n        return nil;\n    }\n}\n\n- (NSMutableData*) dataForBase58Encoding {\n    NSMutableData* data = [NSMutableData dataWithLength:1];\n    char* buf = data.mutableBytes;\n    buf[0] = BTCAssetAddressNamespace;\n    [data appendData:[(BTCAssetAddress* /* cast only to expose the method that is defined in BTCAddress anyway */)self.bitcoinAddress dataForBase58Encoding]];\n    return data;\n}\n\n- (unsigned char) versionByte {\n    return BTCAssetAddressNamespace;\n}\n\n- (BOOL) isTestnet {\n    return self.bitcoinAddress.isTestnet;\n}\n\n@end\n"
  },
  {
    "path": "Pods/CoreBitcoin/CoreBitcoin/BTCAssetID.h",
    "content": "// CoreBitcoin by Oleg Andreev <oleganza@gmail.com>, WTFPL.\n\n#import \"BTCAddress.h\"\n\n@interface BTCAssetID : BTCAddress\n\n+ (nullable instancetype) assetIDWithHash:(nullable NSData*)data;\n\n+ (nullable instancetype) assetIDWithString:(nullable NSString*)string;\n\n@end\n"
  },
  {
    "path": "Pods/CoreBitcoin/CoreBitcoin/BTCAssetID.m",
    "content": "// CoreBitcoin by Oleg Andreev <oleganza@gmail.com>, WTFPL.\n\n#import \"BTCAssetID.h\"\n#import \"BTCAddressSubclass.h\"\n\nstatic const uint8_t BTCAssetIDVersionMainnet = 23; // \"A\" prefix\nstatic const uint8_t BTCAssetIDVersionTestnet = 115;\n\n@implementation BTCAssetID\n\n+ (void) load {\n    [BTCAddress registerAddressClass:self version:BTCAssetIDVersionMainnet];\n    [BTCAddress registerAddressClass:self version:BTCAssetIDVersionTestnet];\n}\n\n#define BTCAssetIDLength 20\n\n+ (instancetype) assetIDWithString:(NSString*)string {\n    return [self addressWithString:string];\n}\n\n+ (instancetype) assetIDWithHash:(NSData*)data {\n    if (!data) return nil;\n    if (data.length != BTCAssetIDLength) {\n        NSLog(@\"+[BTCAssetID addressWithData] cannot init with hash %d bytes long\", (int)data.length);\n        return nil;\n    }\n    BTCAssetID* addr = [[self alloc] init];\n    addr.data = [NSMutableData dataWithData:data];\n    return addr;\n}\n\n+ (instancetype) addressWithComposedData:(NSData*)composedData cstring:(const char*)cstring version:(uint8_t)version {\n    if (composedData.length != (1 + BTCAssetIDLength)) {\n        NSLog(@\"BTCAssetID: cannot init with %d bytes (need 20+1 bytes)\", (int)composedData.length);\n        return nil;\n    }\n    BTCAssetID* addr = [[self alloc] init];\n    addr.data = [[NSMutableData alloc] initWithBytes:((const char*)composedData.bytes) + 1 length:composedData.length - 1];\n    return addr;\n}\n\n- (NSMutableData*) dataForBase58Encoding {\n    NSMutableData* data = [NSMutableData dataWithLength:1 + BTCAssetIDLength];\n    char* buf = data.mutableBytes;\n    buf[0] = [self versionByte];\n    memcpy(buf + 1, self.data.bytes, BTCAssetIDLength);\n    return data;\n}\n\n- (uint8_t) versionByte {\n// TODO: support testnet\n    return BTCAssetIDVersionMainnet;\n}\n\n\n@end\n"
  },
  {
    "path": "Pods/CoreBitcoin/CoreBitcoin/BTCAssetType.h",
    "content": "// CoreBitcoin by Oleg Andreev <oleganza@gmail.com>, WTFPL.\n\n#import <Foundation/Foundation.h>\n\nextern NSString* __nonnull const BTCAssetTypeBitcoin;\nextern NSString* __nonnull const BTCAssetTypeOpenAssets;\n"
  },
  {
    "path": "Pods/CoreBitcoin/CoreBitcoin/BTCAssetType.m",
    "content": "// CoreBitcoin by Oleg Andreev <oleganza@gmail.com>, WTFPL.\n\n#import \"BTCAssetType.h\"\n\nNSString* __nonnull const BTCAssetTypeBitcoin = @\"bitcoin\";\nNSString* __nonnull const BTCAssetTypeOpenAssets = @\"openassets\";\n"
  },
  {
    "path": "Pods/CoreBitcoin/CoreBitcoin/BTCBase58.h",
    "content": "// CoreBitcoin by Oleg Andreev <oleganza@gmail.com>, WTFPL.\n\n#import <Foundation/Foundation.h>\n\n// Base58 is used for compact human-friendly representation of Bitcoin addresses and private keys.\n// Typically Base58-encoded text also contains a checksum.\n// Addresses look like 19FGfswVqxNubJbh1NW8A4t51T9x9RDVWQ\n// Private keys look like 5KQntKuhYWSRXNqp2yhdXzjekYAR7US3MT1715Mbv5CyUKV6hVe\n//\n// Here is what Satoshi said about Base58:\n// Why base-58 instead of standard base-64 encoding?\n// - Don't want 0OIl characters that look the same in some fonts and\n//      could be used to create visually identical looking account numbers.\n// - A string with non-alphanumeric characters is not as easily accepted as an account number.\n// - E-mail usually won't line-break if there's no punctuation to break at.\n// - Double-clicking selects the whole number as one word if it's all alphanumeric.\n\n\n// See NS+BTCBase58.h for easy to use categories.\n\n// Returns data for a Base58 string without checksum\n// Data is mutable so you can clear sensitive information as soon as possible.\nNSMutableData* BTCDataFromBase58(NSString* string);\nNSMutableData* BTCDataFromBase58CString(const char* cstring);\n\n// Returns data for a Base58 string with checksum\nNSMutableData* BTCDataFromBase58Check(NSString* string);\nNSMutableData* BTCDataFromBase58CheckCString(const char* cstring);\n\n// String in Base58 without checksum, you need to free it yourself.\n// It's mutable so you can clear it securely yourself.\nchar* BTCBase58CStringWithData(NSData* data);\n\n// Same as above, but returns an immutable autoreleased string. Suitable for non-sensitive data.\nNSString* BTCBase58StringWithData(NSData* data);\n\n// String in Base58 with checksum, you need to free it yourself.\n// It's mutable so you can clear it securely yourself.\nchar* BTCBase58CheckCStringWithData(NSData* data);\n\n// Same as above, but returns an immutable autoreleased string. Suitable for non-sensitive data.\nNSString* BTCBase58CheckStringWithData(NSData* data);\n\n"
  },
  {
    "path": "Pods/CoreBitcoin/CoreBitcoin/BTCBase58.m",
    "content": "// Oleg Andreev <oleganza@gmail.com>\n\n#import \"BTCBase58.h\"\n#import \"BTCData.h\"\n#import <openssl/bn.h>\n\nstatic const char* BTCBase58Alphabet = \"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz\";\n\nNSMutableData* BTCDataFromBase58(NSString* string) {\n    return BTCDataFromBase58CString([string cStringUsingEncoding:NSASCIIStringEncoding]);\n}\n\nNSMutableData* BTCDataFromBase58Check(NSString* string) {\n    return BTCDataFromBase58CheckCString([string cStringUsingEncoding:NSASCIIStringEncoding]);\n}\n\nNSMutableData* BTCDataFromBase58CString(const char* cstring) {\n    if (cstring == NULL) return nil;\n    \n    // empty string -> empty data.\n    if (cstring[0] == '\\0') return [NSMutableData data];\n    \n    NSMutableData* result = nil;\n    \n    BN_CTX* pctx = BN_CTX_new();\n    __block BIGNUM bn58;   BN_init(&bn58);   BN_set_word(&bn58, 58);\n    __block BIGNUM bn;     BN_init(&bn);     BN_zero(&bn);\n    __block BIGNUM bnChar; BN_init(&bnChar);\n    \n    void(^finish)() = ^{\n        if (pctx) BN_CTX_free(pctx);\n        BN_clear_free(&bn58);\n        BN_clear_free(&bn);\n        BN_clear_free(&bnChar);\n    };\n    \n    while (isspace(*cstring)) cstring++;\n    \n    \n    // Convert big endian string to bignum\n    for (const char* p = cstring; *p; p++) {\n        const char* p1 = strchr(BTCBase58Alphabet, *p);\n        if (p1 == NULL) {\n            while (isspace(*p))\n                p++;\n            if (*p != '\\0') {\n                finish();\n                return nil;\n            }\n            break;\n        }\n        \n        BN_set_word(&bnChar, (BN_ULONG)(p1 - BTCBase58Alphabet));\n        \n        if (!BN_mul(&bn, &bn, &bn58, pctx)) {\n            finish();\n            return nil;\n        }\n        \n        if (!BN_add(&bn, &bn, &bnChar)) {\n            finish();\n            return nil;\n        }\n    }\n    \n    // Get bignum as little endian data\n    \n    NSMutableData* bndata = nil;\n    {\n        size_t bnsize = BN_bn2mpi(&bn, NULL);\n        if (bnsize <= 4) {\n            bndata = [NSMutableData data];\n        } else {\n            bndata = [NSMutableData dataWithLength:bnsize];\n            BN_bn2mpi(&bn, bndata.mutableBytes);\n            [bndata replaceBytesInRange:NSMakeRange(0, 4) withBytes:NULL length:0];\n            BTCDataReverse(bndata);\n        }\n    }\n    size_t bnsize = bndata.length;\n    \n    // Trim off sign byte if present\n    if (bnsize >= 2\n        && ((unsigned char*)bndata.bytes)[bnsize - 1] == 0\n        && ((unsigned char*)bndata.bytes)[bnsize - 2] >= 0x80) {\n        bnsize -= 1;\n        [bndata setLength:bnsize];\n    }\n    \n    // Restore leading zeros\n    int nLeadingZeros = 0;\n    for (const char* p = cstring; *p == BTCBase58Alphabet[0]; p++)\n        nLeadingZeros++;\n    \n    result = [NSMutableData dataWithLength:nLeadingZeros + bnsize];\n    \n    // Copy the bignum to the beginning of array. We'll reverse it then and zeros will become leading zeros.\n    [result replaceBytesInRange:NSMakeRange(0, bnsize) withBytes:bndata.bytes length:bnsize];\n    \n    // Convert little endian data to big endian\n    BTCDataReverse(result);\n    \n    finish();\n    \n    return result;\n}\n\nNSMutableData* BTCDataFromBase58CheckCString(const char* cstring) {\n    if (cstring == NULL) return nil;\n    \n    NSMutableData* result = BTCDataFromBase58CString(cstring);\n    size_t length = result.length;\n    if (length < 4) {\n        return nil;\n    }\n    NSData* hash = BTCHash256([result subdataWithRange:NSMakeRange(0, length - 4)]);\n    \n    // Last 4 bytes should be equal first 4 bytes of the hash.\n    if (memcmp(hash.bytes, result.bytes + length - 4, 4) != 0) {\n        return nil;\n    }\n    [result setLength:length - 4];\n    return result;\n}\n\n\nchar* BTCBase58CStringWithData(NSData* data) {\n    if (!data) return NULL;\n    \n    BN_CTX* pctx = BN_CTX_new();\n    __block BIGNUM bn58; BN_init(&bn58); BN_set_word(&bn58, 58);\n    __block BIGNUM bn0;  BN_init(&bn0);  BN_zero(&bn0);\n    __block BIGNUM bn; BN_init(&bn); BN_zero(&bn);\n    __block BIGNUM dv; BN_init(&dv); BN_zero(&dv);\n    __block BIGNUM rem; BN_init(&rem); BN_zero(&rem);\n    \n    void(^finish)() = ^{\n        if (pctx) BN_CTX_free(pctx);\n        BN_clear_free(&bn58);\n        BN_clear_free(&bn0);\n        BN_clear_free(&bn);\n        BN_clear_free(&dv);\n        BN_clear_free(&rem);\n    };\n    \n    // Convert big endian data to little endian.\n    // Extra zero at the end make sure bignum will interpret as a positive number.\n    NSMutableData* tmp = BTCReversedMutableData(data);\n    tmp.length += 1;\n    \n    // Convert little endian data to bignum\n    {\n        NSUInteger size = tmp.length;\n        NSMutableData* mdata = [tmp mutableCopy];\n        \n        // Reverse to convert to OpenSSL bignum endianess\n        BTCDataReverse(mdata);\n        \n        // BIGNUM's byte stream format expects 4 bytes of\n        // big endian size data info at the front\n        [mdata replaceBytesInRange:NSMakeRange(0, 0) withBytes:\"\\0\\0\\0\\0\" length:4];\n        unsigned char* bytes = mdata.mutableBytes;\n        bytes[0] = (size >> 24) & 0xff;\n        bytes[1] = (size >> 16) & 0xff;\n        bytes[2] = (size >> 8) & 0xff;\n        bytes[3] = (size >> 0) & 0xff;\n        \n        BN_mpi2bn(bytes, (int)mdata.length, &bn);\n    }\n    \n    // Expected size increase from base58 conversion is approximately 137%\n    // use 138% to be safe\n    NSMutableData* stringData = [NSMutableData dataWithCapacity:data.length*138/100 + 1];\n    \n    while (BN_cmp(&bn, &bn0) > 0) {\n        if (!BN_div(&dv, &rem, &bn, &bn58, pctx)) {\n            finish();\n            return nil;\n        }\n        BN_copy(&bn, &dv);\n        unsigned long c = BN_get_word(&rem);\n        [stringData appendBytes:BTCBase58Alphabet + c length:1];\n    }\n    finish();\n    \n    // Leading zeroes encoded as base58 ones (\"1\")\n    const unsigned char* pbegin = data.bytes;\n    const unsigned char* pend = data.bytes + data.length;\n    for (const unsigned char* p = pbegin; p < pend && *p == 0; p++) {\n        [stringData appendBytes:BTCBase58Alphabet + 0 length:1];\n    }\n    \n    // Convert little endian std::string to big endian\n    BTCDataReverse(stringData);\n    \n    [stringData appendBytes:\"\" length:1];\n    \n    char* r = malloc(stringData.length);\n    memcpy(r, stringData.bytes, stringData.length);\n    BTCDataClear(stringData);\n    return r;\n}\n\n// String in Base58 with checksum\nchar* BTCBase58CheckCStringWithData(NSData* immutabledata) {\n    if (!immutabledata) return NULL;\n    // add 4-byte hash check to the end\n    NSMutableData* data = [immutabledata mutableCopy];\n    NSData* checksum = BTCHash256(data);\n    [data appendBytes:checksum.bytes length:4];\n    char* result = BTCBase58CStringWithData(data);\n    BTCDataClear(data);\n    return result;\n}\n\nNSString* BTCBase58StringWithData(NSData* data) {\n    if (!data) return nil;\n    char* s = BTCBase58CStringWithData(data);\n    id r = [NSString stringWithCString:s encoding:NSASCIIStringEncoding];\n    BTCSecureClearCString(s);\n    free(s);\n    return r;\n}\n\n\nNSString* BTCBase58CheckStringWithData(NSData* data) {\n    if (!data) return nil;\n    char* s = BTCBase58CheckCStringWithData(data);\n    id r = [NSString stringWithCString:s encoding:NSASCIIStringEncoding];\n    BTCSecureClearCString(s);\n    free(s);\n    return r;\n}\n\n\n\n\n\n\n"
  },
  {
    "path": "Pods/CoreBitcoin/CoreBitcoin/BTCBigNumber.h",
    "content": "// CoreBitcoin by Oleg Andreev <oleganza@gmail.com>, WTFPL.\n\n#import <Foundation/Foundation.h>\n#import <openssl/bn.h>\n\n// Bitcoin-flavoured big number wrapping OpenSSL BIGNUM.\n// It is doing byte ordering like bitcoind does to stay compatible.\n// BTCBigNumber is immutable. BTCMutableBigNumber is its mutable counterpart.\n// -copy always returns immutable instance, like in other Cocoa containers.\n@class BTCBigNumber;\n@class BTCMutableBigNumber;\n\n@interface BTCBigNumber : NSObject <NSCopying, NSMutableCopying>\n\n@property(nonatomic, readonly) uint32_t compact; // compact representation used for the difficulty target\n@property(nonatomic, readonly) uint32_t uint32value;\n@property(nonatomic, readonly) int32_t int32value;\n@property(nonatomic, readonly) uint64_t uint64value;\n@property(nonatomic, readonly) int64_t int64value;\n@property(nonatomic, readonly) NSString* hexString;\n@property(nonatomic, readonly) NSString* decimalString;\n@property(nonatomic, readonly) NSData* signedLittleEndian;\n@property(nonatomic, readonly) NSData* unsignedBigEndian;\n\n// Deprecated. Use `-signedLittleEndian` instead.\n@property(nonatomic, readonly) NSData* littleEndianData DEPRECATED_ATTRIBUTE;\n\n// Deprecated. Use `-unsignedBigEndian` instead.\n@property(nonatomic, readonly) NSData* unsignedData DEPRECATED_ATTRIBUTE;\n\n// Pointer to an internal BIGNUM value. You should not modify it.\n// To modify, use [[bn mutableCopy] mutableBIGNUM] methods.\n@property(nonatomic, readonly) const BIGNUM* BIGNUM;\n\n@property(nonatomic, readonly) BOOL isZero;\n@property(nonatomic, readonly) BOOL isOne;\n\n\n// BTCBigNumber returns always the same object for these constants.\n// BTCMutableBigNumber returns a new object every time.\n+ (instancetype) zero;        //  0\n+ (instancetype) one;         //  1\n+ (instancetype) negativeOne; // -1\n\n- (id) init;\n- (id) initWithCompact:(uint32_t)compact;\n- (id) initWithUInt32:(uint32_t)value;\n- (id) initWithInt32:(int32_t)value;\n- (id) initWithUInt64:(uint64_t)value;\n- (id) initWithInt64:(int64_t)value;\n- (id) initWithSignedLittleEndian:(NSData*)data;\n- (id) initWithUnsignedBigEndian:(NSData*)data;\n- (id) initWithLittleEndianData:(NSData*)data DEPRECATED_ATTRIBUTE;\n- (id) initWithUnsignedData:(NSData*)data DEPRECATED_ATTRIBUTE;\n\n\n// Initialized with OpenSSL representation of bignum.\n- (id) initWithBIGNUM:(const BIGNUM*)bignum;\n\n// Inits with setString:base:\n- (id) initWithString:(NSString*)string base:(NSUInteger)base;\n\n// Same as initWithString:base:16\n- (id) initWithHexString:(NSString*)hexString DEPRECATED_ATTRIBUTE;\n\n// Same as initWithString:base:10\n- (id) initWithDecimalString:(NSString*)decimalString;\n\n- (NSString*) stringInBase:(NSUInteger)base;\n\n// Re-declared copy and mutableCopy to provide exact return type.\n- (BTCBigNumber*) copy;\n- (BTCMutableBigNumber*) mutableCopy;\n\n// TODO: maybe add support for hash, figure out what the heck is that.\n//void set_hash(hash_digest load_hash);\n//hash_digest hash() const;\n\n// Returns MIN(self, other)\n- (BTCBigNumber*) min:(BTCBigNumber*)other;\n\n// Returns MAX(self, other)\n- (BTCBigNumber*) max:(BTCBigNumber*)other;\n\n\n- (BOOL) less:(BTCBigNumber*)other;\n- (BOOL) lessOrEqual:(BTCBigNumber*)other;\n- (BOOL) greater:(BTCBigNumber*)other;\n- (BOOL) greaterOrEqual:(BTCBigNumber*)other;\n\n\n// Divides receiver by another bignum.\n// Returns an array of two new BTCBigNumber instances: @[ quotient, remainder ]\n- (NSArray*) divmod:(BTCBigNumber*)other;\n\n// Destroys sensitive data and sets the value to 0.\n// It is also called on dealloc.\n// This method is available for both mutable and immutable numbers by design.\n- (void) clear;\n\n@end\n\n\n@interface BTCMutableBigNumber : BTCBigNumber\n\n@property(nonatomic, readwrite) uint32_t compact; // compact representation used for the difficulty target\n@property(nonatomic, readwrite) uint32_t uint32value;\n@property(nonatomic, readwrite) int32_t int32value;\n@property(nonatomic, readwrite) uint64_t uint64value;\n@property(nonatomic, readwrite) int64_t int64value;\n@property(nonatomic, readwrite) NSString* hexString;\n@property(nonatomic, readwrite) NSString* decimalString;\n@property(nonatomic, readwrite) NSData* signedLittleEndian;\n@property(nonatomic, readwrite) NSData* unsignedBigEndian;\n@property(nonatomic, readwrite) NSData* littleEndianData DEPRECATED_ATTRIBUTE;\n@property(nonatomic, readwrite) NSData* unsignedData DEPRECATED_ATTRIBUTE;\n\n@property(nonatomic, readonly) BIGNUM* mutableBIGNUM;\n\n// BTCBigNumber returns always the same object for these constants.\n// BTCMutableBigNumber returns a new object every time.\n+ (instancetype) zero;        //  0\n+ (instancetype) one;         //  1\n+ (instancetype) negativeOne; // -1\n\n// Supports bases from 2 to 36. For base 2 allows optional 0b prefix, base 16 allows optional 0x prefix. Spaces are ignored.\n- (void) setString:(NSString*)string base:(NSUInteger)base;\n\n// Operators modify the receiver and return self.\n// To create a new instance z = x + y use copy method: z = [[x copy] add:y]\n- (instancetype) add:(BTCBigNumber*)other; // +=\n- (instancetype) add:(BTCBigNumber*)other mod:(BTCBigNumber*)mod;\n- (instancetype) subtract:(BTCBigNumber*)other; // -=\n- (instancetype) subtract:(BTCBigNumber*)other mod:(BTCBigNumber*)mod;\n- (instancetype) multiply:(BTCBigNumber*)other; // *=\n- (instancetype) multiply:(BTCBigNumber*)other mod:(BTCBigNumber*)mod;\n- (instancetype) divide:(BTCBigNumber*)other; // /=\n- (instancetype) mod:(BTCBigNumber*)other; // %=\n- (instancetype) lshift:(unsigned int)shift; // <<=\n- (instancetype) rshift:(unsigned int)shift; // >>=\n- (instancetype) inverseMod:(BTCBigNumber*)mod; // (a^-1) mod n\n- (instancetype) exp:(BTCBigNumber*)power;\n- (instancetype) exp:(BTCBigNumber*)power mod:(BTCBigNumber *)mod;\n\n@end\n"
  },
  {
    "path": "Pods/CoreBitcoin/CoreBitcoin/BTCBigNumber.m",
    "content": "// Oleg Andreev <oleganza@gmail.com>\n\n#import \"BTCBigNumber.h\"\n#import \"BTCData.h\"\n\n#define BTCBigNumberCompare(a, b) (BN_cmp(&(a->_bignum), &(b->_bignum)))\n\n@implementation BTCBigNumber {\n    @package\n    BIGNUM _bignum;\n    \n    // Used as a guard in case a private setter is called on immutable instance after initialization.\n    BOOL _immutable;\n}\n\n@dynamic compact;\n@dynamic uint32value;\n@dynamic int32value;\n@dynamic uint64value;\n@dynamic int64value;\n@dynamic hexString;\n@dynamic decimalString;\n@dynamic signedLittleEndian;\n@dynamic unsignedBigEndian;\n@dynamic littleEndianData; // deprecated\n@dynamic unsignedData; // deprecated\n\n+ (instancetype) zero {\n    static BTCBigNumber* bn = nil;\n    static dispatch_once_t onceToken;\n    dispatch_once(&onceToken, ^{\n        bn = [[self alloc] init];\n        BN_zero(&(bn->_bignum));\n    });\n    return bn;\n}\n\n+ (instancetype) one {\n    static BTCBigNumber* bn = nil;\n    static dispatch_once_t onceToken;\n    dispatch_once(&onceToken, ^{\n        bn = [[self alloc] init];\n        BN_one(&(bn->_bignum));\n    });\n    return bn;\n}\n\n+ (instancetype) negativeOne {\n    static BTCBigNumber* bn = nil;\n    static dispatch_once_t onceToken;\n    dispatch_once(&onceToken, ^{\n        bn = [[self alloc] initWithInt32:-1];\n    });\n    return bn;\n}\n\n- (id) init {\n    if (self = [super init]) {\n        BN_init(&_bignum);\n    }\n    return self;\n}\n\n- (void) dealloc {\n    BN_clear_free(&_bignum);\n}\n\n- (void) clear {\n    BN_clear(&_bignum);\n}\n\n- (void) throwIfImmutable {\n    if (_immutable) {\n        @throw [NSException exceptionWithName:@\"Immutable BTCBigNumber is modified\" reason:@\"\" userInfo:nil];\n    }\n}\n\n// Since we use private setters in the init* methods,\n- (id) initWithCompact:(uint32_t)value {\n    if (self = [self init]) self.compact = value;\n    _immutable = YES;\n    return self;\n}\n- (id) initWithUInt32:(uint32_t)value {\n    if (self = [self init]) self.uint32value = value;\n    _immutable = YES;\n    return self;\n}\n- (id) initWithInt32:(int32_t)value {\n    if (self = [self init]) self.int32value = value;\n    _immutable = YES;\n    return self;\n}\n- (id) initWithUInt64:(uint64_t)value {\n    if (self = [self init]) self.uint64value = value;\n    _immutable = YES;\n    return self;\n}\n- (id) initWithInt64:(int64_t)value {\n    if (self = [self init]) self.int64value = value;\n    _immutable = YES;\n    return self;\n}\n- (id) initWithSignedLittleEndian:(NSData *)data {\n    if (!data) return nil;\n    if (self = [self init]) self.signedLittleEndian = data;\n    _immutable = YES;\n    return self;\n}\n- (id) initWithUnsignedBigEndian:(NSData *)data {\n    if (!data) return nil;\n    if (self = [self init]) self.unsignedBigEndian = data;\n    _immutable = YES;\n    return self;\n}\n- (id) initWithLittleEndianData:(NSData*)data { // deprecated\n    if (!data) return nil;\n    if (self = [self init]) self.signedLittleEndian = data;\n    _immutable = YES;\n    return self;\n}\n- (id) initWithUnsignedData:(NSData *)data { // deprecated\n    if (!data) return nil;\n    if (self = [self init]) self.unsignedBigEndian = data;\n    _immutable = YES;\n    return self;\n}\n- (id) initWithString:(NSString*)string base:(NSUInteger)base {\n    if (!string) return nil;\n    if (self = [self init]) [self setString:string base:base];\n    _immutable = YES;\n    return self;\n}\n\n- (id) initWithHexString:(NSString*)hexString {\n    return [self initWithString:hexString base:16];\n}\n\n- (id) initWithDecimalString:(NSString*)decimalString {\n    return [self initWithString:decimalString base:10];\n}\n\n- (id) initWithBIGNUM:(const BIGNUM*)otherBIGNUM {\n    if (self = [self init]) {\n        BN_copy(&_bignum, otherBIGNUM);\n    }\n    return self;\n}\n\n- (const BIGNUM*) BIGNUM {\n    return &_bignum;\n}\n\n- (BOOL) isZero {\n    return BN_is_zero(&_bignum);\n}\n\n- (BOOL) isOne {\n    return BN_is_one(&_bignum);\n}\n\n\n#pragma mark - NSObject\n\n\n\n- (BTCBigNumber*) copy {\n    return [self copyWithZone:nil];\n}\n\n- (BTCMutableBigNumber*) mutableCopy {\n    return [self mutableCopyWithZone:nil];\n}\n\n- (BTCBigNumber*) copyWithZone:(NSZone *)zone {\n    BTCBigNumber* to = [[BTCBigNumber alloc] init];\n    if (BN_copy(&(to->_bignum), &_bignum)) {\n        return to;\n    }\n    return nil;\n}\n\n- (BTCMutableBigNumber*) mutableCopyWithZone:(NSZone *)zone {\n    BTCMutableBigNumber* to = [[BTCMutableBigNumber alloc] init];\n    if (BN_copy(&(to->_bignum), &_bignum)) {\n        return to;\n    }\n    return nil;\n}\n\n\n- (BOOL) isEqual:(BTCBigNumber*)other {\n    if (![other isKindOfClass:[BTCBigNumber class]]) return NO;\n    return BTCBigNumberCompare(self, other) == NSOrderedSame;\n}\n\n- (NSComparisonResult)compare:(BTCBigNumber *)other {\n    return BTCBigNumberCompare(self, other);\n}\n\n- (NSUInteger)hash {\n    return (NSUInteger)BN_get_word(&_bignum);\n}\n\n- (NSString*) description {\n    return [NSString stringWithFormat:@\"<%@:0x%p 0x%@ (%@)>\", [self class], self, [self stringInBase:16], [self stringInBase:10]];\n}\n\n\n\n\n#pragma mark - Comparison\n\n\n- (BTCBigNumber*) min:(BTCBigNumber*)other {\n    return (BTCBigNumberCompare(self, other) <= 0) ? self : other;\n}\n\n- (BTCBigNumber*) max:(BTCBigNumber*)other {\n    return (BTCBigNumberCompare(self, other) >= 0) ? self : other;\n}\n\n- (BOOL) less:(BTCBigNumber *)other           { return BTCBigNumberCompare(self, other) <  0; }\n- (BOOL) lessOrEqual:(BTCBigNumber *)other    { return BTCBigNumberCompare(self, other) <= 0; }\n- (BOOL) greater:(BTCBigNumber *)other        { return BTCBigNumberCompare(self, other) >  0; }\n- (BOOL) greaterOrEqual:(BTCBigNumber *)other { return BTCBigNumberCompare(self, other) >= 0; }\n\n\n\n\n#pragma mark - Conversion\n\n\n\n\n- (NSString*) hexString {\n    return [self stringInBase:16];\n}\n\n- (void) setHexString:(NSString *)hexString {\n    [self throwIfImmutable];\n    [self setString:hexString base:16];\n}\n\n- (NSString*) decimalString {\n    return [self stringInBase:10];\n}\n\n- (void) setDecimalString:(NSString *)decimalString {\n    [self throwIfImmutable];\n    [self setString:decimalString base:10];\n}\n\n- (void) setString:(NSString*)string base:(NSUInteger)base {\n    [self throwIfImmutable];\n    if (base > 36 || base < 2) return;\n    \n    BN_set_word(&_bignum, 0);\n    \n    if (string.length == 0) return;\n    \n    const unsigned char *psz = (const unsigned char*)[string cStringUsingEncoding:NSASCIIStringEncoding];\n    \n    while (isspace(*psz)) psz++;\n    \n    bool isNegative = false;\n    if (*psz == '-') {\n        isNegative = true;\n        psz++;\n    }\n    \n    // Strip 0x from a 16-base string and 0b from a binary string.\n    // String is null-terminated, so it's safe to check for [1] if [0] is not null\n    if (base == 16 && psz[0] == '0' && tolower(psz[1]) == 'x') psz += 2;\n    if (base == 2  && psz[0] == '0' && tolower(psz[1]) == 'b') psz += 2;\n    \n    while (isspace(*psz)) psz++;\n    \n    static const signed char digits[256] = {\n        //  0   1   2   3   4   5   6   7   8   9   A   B   C   D   E   F\n            0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,\n            0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,\n            0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,\n            0,  1,  2,  3,  4,  5,  6,  7,  8,  9,  0,  0,  0,  0,  0,  0,\n        //  @   A   B   C   D   E   F   G   H   I   J   K   L   M   N   O\n            0, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,\n        //  P   Q   R   S   T   U   V   W   X   Y   Z   [   \\   ]   ^   _\n           25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35,  0,  0,  0,  0,  0,\n        //  `   a   b   c   d   e   f   g   h   i   j   k   l   m   n   o\n            0, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,\n        //  p   q   r   s   t   u   v   w   x   y   z   {   |   }   ~   del\n           25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35,  0,  0,  0,  0,  0,\n            0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,\n            0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,\n            0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,\n            0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,\n            0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,\n            0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,\n            0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,\n            0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,\n    };\n    \n    BN_CTX* pctx = NULL;\n    BIGNUM bnBase; BN_init(&bnBase); BN_set_word(&bnBase, (BN_ULONG)base);\n    \n    while (1) {\n        unsigned char c = (unsigned char)*psz++;\n        if (c == 0) break; // break when null-terminator is hit\n        \n        if (c != 0x20) { // skip space\n        \n            int n = digits[c];\n            if (n == 0 && c != 0x30) break; // discard characters outside the 36-char range\n            if (n >= base) break; // discard character outside the base range.\n            \n            if (base == 16) {\n                BN_lshift(&_bignum, &_bignum, 4);\n            } else if (base == 8) {\n                BN_lshift(&_bignum, &_bignum, 3);\n            } else if (base == 4) {\n                BN_lshift(&_bignum, &_bignum, 2);\n            } else if (base == 2) {\n                BN_lshift(&_bignum, &_bignum, 1);\n            } else if (base == 32) {\n                BN_lshift(&_bignum, &_bignum, 5);\n            } else {\n                if (!pctx) pctx = BN_CTX_new();\n                BN_mul(&_bignum, &_bignum, &bnBase, pctx);\n            }\n            \n            BN_add_word(&_bignum, n);\n        }\n    }\n    \n    if (isNegative) {\n        BN_set_negative(&_bignum, 1);\n    }\n    \n    BN_free(&bnBase);\n    if (pctx) BN_CTX_free(pctx);\n}\n\n- (NSString*) stringInBase:(NSUInteger)base {\n    if (base > 36 || base < 2) return nil;\n    \n    NSMutableData* resultData = nil;\n    \n    BN_CTX* pctx = BN_CTX_new();\n    BIGNUM bnBase; BN_init(&bnBase); BN_set_word(&bnBase, (BN_ULONG)base);\n    BIGNUM bn0;    BN_init(&bn0);    BN_zero(&bn0);\n    BIGNUM bn;     BN_init(&bn);     BN_copy(&bn, &_bignum);\n    \n    BN_set_negative(&bn, false);\n    \n    BIGNUM dv;  BN_init(&dv);\n    BIGNUM rem; BN_init(&rem);\n    \n    if (BN_cmp(&bn, &bn0) == 0) {\n        resultData = [NSMutableData dataWithBytes:\"0\" length:1];\n    } else {\n        while (BN_cmp(&bn, &bn0) > 0) {\n            if (!BN_div(&dv, &rem, &bn, &bnBase, pctx)) {\n                NSLog(@\"BTCBigNumber: stringInBase failed to BN_div\");\n                break;\n            }\n            BN_copy(&bn, &dv);\n            BN_ULONG c = BN_get_word(&rem);\n            \n            if (!resultData) resultData = [NSMutableData data];\n            \n            // 36 characters:   0123456789 123456789 123456789 12345\n            unsigned char ch = \"0123456789abcdefghijklmnopqrstuvwxyz\"[c];\n            \n            [resultData replaceBytesInRange:NSMakeRange(0, 0) withBytes:&ch length:1];\n        }\n        if (resultData && BN_is_negative(&_bignum)) {\n            unsigned char ch = '-';\n            [resultData replaceBytesInRange:NSMakeRange(0, 0) withBytes:&ch length:1];\n        }\n    }\n    \n    BN_clear_free(&dv);\n    BN_clear_free(&rem);\n    BN_clear_free(&bn);\n    BN_free(&bn0);\n    BN_free(&bnBase);\n    BN_CTX_free(pctx);\n    return resultData ? [[NSString alloc] initWithData:resultData encoding:NSASCIIStringEncoding] : nil;\n}\n\n\n// The \"compact\" format is a representation of a whole\n// number N using an unsigned 32bit number similar to a\n// floating point format.\n// The most significant 8 bits are the unsigned exponent of base 256.\n// This exponent can be thought of as \"number of bytes of N\".\n// The lower 23 bits are the mantissa.\n// Bit number 24 (0x800000) represents the sign of N.\n// N = (-1^sign) * mantissa * 256^(exponent-3)\n//\n// Satoshi's original implementation used BN_bn2mpi() and BN_mpi2bn().\n// MPI uses the most significant bit of the first byte as sign.\n// Thus 0x1234560000 is compact (0x05123456)\n// and  0xc0de000000 is compact (0x0600c0de)\n// (0x05c0de00) would be -0x40de000000\n//\n// Bitcoin only uses this \"compact\" format for encoding difficulty\n// targets, which are unsigned 256bit quantities.  Thus, all the\n// complexities of the sign bit and using base 256 are probably an\n// implementation accident.\n//\n// This implementation directly uses shifts instead of going\n// through an intermediate MPI representation.\n- (uint32_t) compact {\n    uint32_t size = BN_num_bytes(&_bignum);\n    uint32_t result = 0;\n    if (size <= 3) {\n        result = (uint32_t)(BN_get_word(&_bignum) << 8*(3-size));\n    } else {\n        BIGNUM bn;\n        BN_init(&bn);\n        BN_rshift(&bn, &_bignum, 8*(size-3));\n        result = (uint32_t)BN_get_word(&bn);\n    }\n    // The 0x00800000 bit denotes the sign.\n    // Thus, if it is already set, divide the mantissa by 256 and increase the exponent.\n    if (result & 0x00800000) {\n        result >>= 8;\n        size++;\n    }\n    result |= size << 24;\n    result |= (BN_is_negative(&_bignum) ? 0x00800000 : 0);\n    return result;\n}\n\n- (void) setCompact:(uint32_t)value {\n    [self throwIfImmutable];\n    unsigned int size = value >> 24;\n    bool isNegative   = (value & 0x00800000) != 0;\n    unsigned int word = value & 0x007fffff;\n    if (size <= 3) {\n        word >>= 8*(3-size);\n        BN_set_word(&_bignum, word);\n    } else {\n        BN_set_word(&_bignum, word);\n        BN_lshift(&_bignum, &_bignum, 8*(size-3));\n    }\n    BN_set_negative(&_bignum, isNegative);\n}\n\n- (uint32_t) uint32value {\n    return (uint32_t)BN_get_word(&_bignum);\n}\n\n- (void) setUint32value:(uint32_t)value {\n    [self throwIfImmutable];\n    BN_set_word(&_bignum, value);\n}\n\n- (int32_t) int32value {\n    uint32_t value = [self uint32value];\n    if (!BN_is_negative(&_bignum)) {\n        if (value > INT32_MAX)\n            return INT32_MAX;\n        else\n            return value;\n    } else {\n        if (value > INT32_MAX)\n            return INT32_MIN;\n        else\n            return -value;\n    }\n}\n\n- (void) setInt32value:(int32_t)value {\n    [self throwIfImmutable];\n    if (value >= 0) {\n        self.uint32value = value;\n    } else {\n        self.int64value = value;\n    }\n}\n\n- (uint64_t) uint64value {\n    return (uint64_t)BN_get_word(&_bignum);\n}\n\n- (int64_t) int64value {\n    return (int64_t)BN_get_word(&_bignum);\n}\n\n- (void) setUint64value:(uint64_t)value {\n    [self throwIfImmutable];\n    [self setUint64valuePrivate:value negative:NO];\n}\n\n- (void) setInt64value:(int64_t)value {\n    [self throwIfImmutable];\n    bool isNegative = NO;\n    uint64_t uintValue;\n    if (value < 0) {\n        // Since the minimum signed integer cannot be represented as\n        // positive so long as its type is signed, and it's not well-defined\n        // what happens if you make it unsigned before negating it, we\n        // instead increment the negative integer by 1, convert it, then\n        // increment the (now positive) unsigned integer by 1 to compensate.\n        uintValue = -(value + 1);\n        ++uintValue;\n        isNegative = YES;\n    } else {\n        uintValue = value;\n    }\n    \n    [self setUint64valuePrivate:uintValue negative:isNegative];\n}\n\n- (void) setUint64valuePrivate:(uint64_t)value negative:(BOOL)isNegative {\n    // Numbers are represented in OpenSSL using the MPI format. 4 byte length.\n    unsigned char rawMPI[sizeof(value) + 6];\n    unsigned char* currentByte = &rawMPI[4];\n    BOOL leadingZeros = YES;\n    for (int i = 0; i < 8; ++i) {\n        uint8_t c = (value >> 56) & 0xff;\n        value <<= 8;\n        if (leadingZeros) {\n            if (c == 0) continue; // Skip beginning zeros\n            \n            if (c & 0x80) {\n                *currentByte = (isNegative ? 0x80 : 0);\n                ++currentByte;\n            } else if (isNegative) {\n                c |= 0x80;\n            }\n            leadingZeros = false;\n        }\n        *currentByte = c;\n        ++currentByte;\n    }\n    unsigned long size = currentByte - (rawMPI + 4);\n    rawMPI[0] = (size >> 24) & 0xff;\n    rawMPI[1] = (size >> 16) & 0xff;\n    rawMPI[2] = (size >> 8) & 0xff;\n    rawMPI[3] = (size) & 0xff;\n    BN_mpi2bn(rawMPI, (int)(currentByte - rawMPI), &_bignum);\n}\n\n- (NSData*) signedLittleEndian {\n    size_t size = BN_bn2mpi(&_bignum, NULL);\n    if (size <= 4) {\n        return [NSData data];\n    }\n    NSMutableData* data = [NSMutableData dataWithLength:size];\n    BN_bn2mpi(&_bignum, data.mutableBytes);\n    [data replaceBytesInRange:NSMakeRange(0, 4) withBytes:NULL length:0];\n    BTCDataReverse(data);\n    return data;\n}\n\n- (void) setSignedLittleEndian:(NSData *)data {\n    [self throwIfImmutable];\n    NSUInteger size = data.length;\n    NSMutableData* mdata = [data mutableCopy];\n    // Reverse to convert to OpenSSL bignum endianess\n    BTCDataReverse(mdata);\n    // BIGNUM's byte stream format expects 4 bytes of\n    // big endian size data info at the front\n    [mdata replaceBytesInRange:NSMakeRange(0, 0) withBytes:\"\\0\\0\\0\\0\" length:4];\n    unsigned char* bytes = mdata.mutableBytes;\n    bytes[0] = (size >> 24) & 0xff;\n    bytes[1] = (size >> 16) & 0xff;\n    bytes[2] = (size >> 8) & 0xff;\n    bytes[3] = (size >> 0) & 0xff;\n    \n    BN_mpi2bn(bytes, (int)mdata.length, &_bignum);\n}\n\n// deprecated\n- (NSData*) littleEndianData {\n    return self.signedLittleEndian;\n}\n// deprecated\n- (void) setLittleEndianData:(NSData *)data {\n    [self setSignedLittleEndian:data];\n}\n\n- (NSData*) unsignedBigEndian {\n    int num_bytes = BN_num_bytes(&_bignum);\n    NSMutableData* data = [[NSMutableData alloc] initWithLength:32]; // zeroed data\n    int copied_bytes = BN_bn2bin(&_bignum, &data.mutableBytes[32 - num_bytes]); // fill the tail of the data so it's zero-padded to the left\n    if (copied_bytes != num_bytes) return nil;\n    return data;\n}\n\n- (void) setUnsignedBigEndian:(NSData *)data {\n    [self throwIfImmutable];\n    if (!data) return;\n    if (!BN_bin2bn(data.bytes, (int)data.length, &_bignum)) {\n        return;\n    }\n}\n\n// deprecated\n- (NSData*) unsignedData {\n    return self.unsignedBigEndian;\n}\n\n// deprecated\n- (void) setUnsignedData:(NSData *)data {\n    self.unsignedBigEndian = data;\n}\n\n\n// Divides receiver by another bignum.\n// Returns an array of two new BTCBigNumber instances: @[ quotient, remainder ]\n- (NSArray*) divmod:(BTCBigNumber*)other\n{\n    BN_CTX* pctx = BN_CTX_new();\n    BTCBigNumber* r = [BTCBigNumber new];\n    BTCBigNumber* m = [BTCBigNumber new];\n    BN_div(&(r->_bignum), &(m->_bignum), &(self->_bignum), &(other->_bignum), pctx);\n    BN_CTX_free(pctx);\n    return @[r, m];\n}\n\n\n#pragma mark - Util\n\n\n\n- (void) withContext:(void(^)(BN_CTX* pctx))block\n{\n    BN_CTX* pctx = BN_CTX_new();\n    block(pctx);\n    BN_CTX_free(pctx);\n}\n\n\n\n@end\n\n\n\n\n@implementation BTCMutableBigNumber\n\n@dynamic compact;\n@dynamic uint32value;\n@dynamic int32value;\n@dynamic uint64value;\n@dynamic int64value;\n@dynamic hexString;\n@dynamic decimalString;\n@dynamic signedLittleEndian;\n@dynamic unsignedBigEndian;\n@dynamic littleEndianData;\n@dynamic unsignedData;\n\n- (BIGNUM*) mutableBIGNUM {\n    return &(self->_bignum);\n}\n\n+ (instancetype) zero {\n    return [[BTCBigNumber zero] mutableCopy];\n}\n\n+ (instancetype) one {\n    return [[BTCBigNumber one] mutableCopy];\n}\n\n+ (instancetype) negativeOne {\n    return [[BTCBigNumber negativeOne] mutableCopy];\n}\n\n// We are mutable, disable checks.\n- (void) throwIfImmutable {\n}\n\n- (void) setString:(NSString*)string base:(NSUInteger)base {\n    [super setString:string base:base];\n}\n\n\n#pragma mark - Operations\n\n\n- (instancetype) add:(BTCBigNumber*)other { // +=\n    BN_add(&(self->_bignum), &(self->_bignum), &(other->_bignum));\n    return self;\n}\n\n- (instancetype) add:(BTCBigNumber*)other mod:(BTCBigNumber*)mod {\n    BN_CTX* pctx = BN_CTX_new();\n    BN_mod_add(&(self->_bignum), &(self->_bignum), &(other->_bignum), &(mod->_bignum), pctx);\n    BN_CTX_free(pctx);\n    return self;\n}\n\n- (instancetype) subtract:(BTCBigNumber *)other { // -=\n    BN_sub(&(self->_bignum), &(self->_bignum), &(other->_bignum));\n    return self;\n}\n\n- (instancetype) subtract:(BTCBigNumber*)other mod:(BTCBigNumber*)mod {\n    BN_CTX* pctx = BN_CTX_new();\n    BN_mod_sub(&(self->_bignum), &(self->_bignum), &(other->_bignum), &(mod->_bignum), pctx);\n    BN_CTX_free(pctx);\n    return self;\n}\n\n- (instancetype) multiply:(BTCBigNumber*)other { // *=\n    BN_CTX* pctx = BN_CTX_new();\n    BN_mul(&(self->_bignum), &(self->_bignum), &(other->_bignum), pctx);\n    BN_CTX_free(pctx);\n    return self;\n}\n\n- (instancetype) multiply:(BTCBigNumber*)other mod:(BTCBigNumber *)mod {\n    BN_CTX* pctx = BN_CTX_new();\n    BN_mod_mul(&(self->_bignum), &(self->_bignum), &(other->_bignum), &(mod->_bignum), pctx);\n    BN_CTX_free(pctx);\n    return self;\n}\n\n- (instancetype) divide:(BTCBigNumber*)other { // /=\n    BN_CTX* pctx = BN_CTX_new();\n    BN_div(&(self->_bignum), NULL, &(self->_bignum), &(other->_bignum), pctx);\n    BN_CTX_free(pctx);\n    return self;\n}\n\n- (instancetype) mod:(BTCBigNumber*)other { // %=\n    BN_CTX* pctx = BN_CTX_new();\n    BN_div(NULL, &(self->_bignum), &(self->_bignum), &(other->_bignum), pctx);\n    BN_CTX_free(pctx);\n    return self;\n}\n\n- (instancetype) lshift:(unsigned int)shift { // <<=\n    BN_lshift(&(self->_bignum), &(self->_bignum), shift);\n    return self;\n}\n\n- (instancetype) rshift:(unsigned int)shift { // >>=\n    // Note: BN_rshift segfaults on 64-bit if 2^shift is greater than the number\n    //   if built on ubuntu 9.04 or 9.10, probably depends on version of OpenSSL\n    BTCMutableBigNumber* a = [BTCMutableBigNumber one];\n    [a lshift:shift];\n    if (BN_cmp(&(a->_bignum), &(self->_bignum)) > 0) {\n        BN_zero(&(self->_bignum));\n        return self;\n    }\n    \n    BN_rshift(&(self->_bignum), &(self->_bignum), shift);\n    return self;\n}\n\n- (instancetype) inverseMod:(BTCBigNumber*)mod { // (a^-1) mod n\n    BN_CTX* pctx = BN_CTX_new();\n    BN_mod_inverse(&(self->_bignum), &(self->_bignum), &(mod->_bignum), pctx);\n    BN_CTX_free(pctx);\n    return self;\n}\n\n- (instancetype) exp:(BTCBigNumber*)power { // pow(self, p)\n    BN_CTX* pctx = BN_CTX_new();\n    BN_exp(&(self->_bignum), &(self->_bignum), &(power->_bignum), pctx);\n    BN_CTX_free(pctx);\n    return self;\n}\n\n- (instancetype) exp:(BTCBigNumber*)power mod:(BTCBigNumber *)mod { // pow(self,p) % m\n    BN_CTX* pctx = BN_CTX_new();\n    BN_mod_exp(&(self->_bignum), &(self->_bignum), &(power->_bignum), &(mod->_bignum), pctx);\n    BN_CTX_free(pctx);\n    return self;\n}\n\n\n\n@end\n\n\n"
  },
  {
    "path": "Pods/CoreBitcoin/CoreBitcoin/BTCBitcoinURL.h",
    "content": "// CoreBitcoin by Oleg Andreev <oleganza@gmail.com>, WTFPL.\n\n#import <Foundation/Foundation.h>\n#import \"BTCUnitsAndLimits.h\"\n\n// TODO: support handling URL from UIApplicationDelegate.\n\n/*!\n * Class to compose and handle various Bitcoin URLs according to BIP21.\n * See: https://github.com/bitcoin/bips/blob/master/bip-0021.mediawiki\n */\n@class BTCAddress;\n@class BTCAssetID;\n@interface BTCBitcoinURL : NSObject\n\n/*!\n * Encoded address.\n */\n@property(nonatomic, nullable) BTCAddress* address;\n\n/*!\n * Amount in satoshis. Default is 0.\n */\n@property(nonatomic) BTCAmount amount;\n\n/*!\n * Asset ID for Open Assets URL.\n */\n@property(nonatomic, nullable) BTCAssetID* assetID;\n\n/*!\n * Label. Default is nil.\n */\n@property(nonatomic, nullable) NSString* label;\n\n/*!\n * Message. Default is nil.\n */\n@property(nonatomic, nullable) NSString* message;\n\n/*!\n * Query parameters. Default is nil.\n */\n@property(nonatomic, nonnull) NSDictionary* queryParameters;\n\n/*!\n * Payment request URL (r=...). Default is nil.\n */\n@property(nonatomic, nullable) NSURL* paymentRequestURL;\n\n/*!\n * Complete URL built from the individual properties.\n */\n@property(nonatomic, readonly, nonnull) NSURL* URL;\n\n/*!\n * Returns YES if it has a valid address or paymentRequestURL.\n */\n@property(nonatomic, readonly) BOOL isValid;\n\n/*!\n * Returns YES if it is a pure bitcoin URL. That does not specify asset_id and not uses openassets: scheme.\n */\n@property(nonatomic, readonly) BOOL isValidBitcoinURL;\n\n/*!\n * Returns YES if it is an Open Assets URL.\n */\n@property(nonatomic, readonly) BOOL isValidOpenAssetsURL;\n\n/*!\n * Makes a URL in form \"bitcoin:<address>?amount=1.2345&label=<label>.\n * @param address Address to be rendered in base58 format.\n * @param amount  Amount in satoshis. Note that URI scheme dictates to render this amount as a decimal number in BTC.\n * @param label   Optional label.\n */\n+ (nonnull NSURL*) URLWithAddress:(nonnull BTCAddress*)address amount:(BTCAmount)amount label:(nullable NSString*)label;\n\n/*!\n * Instantiates if URL is a valid bitcoin: URL.\n * To be valid it should either contain a valid address, or payment request URL (r=), or both.\n */\n- (nullable id) initWithURL:(nullable NSURL*)url;\n\n/*!\n * Instantiates an empty Bitcoin URL.\n * Fill in address, amount, label and other fields and use `URL` property to get a composed URL.\n */\n- (nonnull id) init;\n\n/*!\n * Object subscripting to access query parameters more conveniently\n * @param key The key in the queryParameters\n */\n- (nullable id)objectForKeyedSubscript:(nonnull id <NSCopying>)key;\n\n/*!\n * Object subscripting to set query parameter key value pairs more conveniently\n * @param obj The value to be set for key in queryParameters\n * @param key The key for value in the queryParameters\n */\n- (void)setObject:(nullable id)obj forKeyedSubscript:(nonnull id <NSCopying>)key;\n\n@end\n"
  },
  {
    "path": "Pods/CoreBitcoin/CoreBitcoin/BTCBitcoinURL.m",
    "content": "#import \"BTCBitcoinURL.h\"\n#import \"BTCAddress.h\"\n#import \"BTCAssetAddress.h\"\n#import \"BTCAssetID.h\"\n#import \"BTCNumberFormatter.h\"\n\nNSString* const BTCBitcoinURLSchemeBitcoin = @\"bitcoin\";\nNSString* const BTCBitcoinURLSchemeOpenAssets = @\"openassets\";\n\n@interface BTCBitcoinURL ()\n@property NSMutableDictionary* mutableQueryParameters;\n@property NSString* scheme;\n@end\n\n@implementation BTCBitcoinURL\n\n@synthesize amount = _amount;\n@synthesize label = _label;\n@synthesize assetID = _assetID;\n@synthesize message = _message;\n@synthesize paymentRequestURL = _paymentRequestURL;\n@synthesize queryParameters = _queryParameters;\n\n+ (NSURL*) URLWithAddress:(BTCAddress*)address amount:(BTCAmount)amount label:(NSString*)label {\n    BTCBitcoinURL* btcurl = [[self alloc] init];\n    btcurl.scheme = @\"bitcoin\";\n    btcurl.address = address;\n    btcurl.amount = amount;\n    btcurl.label = label;\n    return btcurl.URL;\n}\n\n- (id) init {\n    if (self = [super init]) {\n        self.mutableQueryParameters = [NSMutableDictionary dictionary];\n    }\n    return self;\n}\n\n- (id) initWithURL:(NSURL*)url {\n    if (!url) return nil;\n\n    NSURLComponents* comps = [[NSURLComponents alloc] initWithURL:url resolvingAgainstBaseURL:NO];\n\n    if (!comps) {\n        return nil;\n    }\n\n    NSString* scheme = [comps.scheme lowercaseString];\n\n    // We only support bitcoin: and openassets: schemes.\n    if (![scheme isEqual:BTCBitcoinURLSchemeBitcoin] &&\n        ![scheme isEqual:BTCBitcoinURLSchemeOpenAssets]) {\n        return nil;\n    }\n\n    // We allow empty address, but if it's not empty, it must be a valid address.\n    BTCAddress* address = nil;\n    if (comps.path.length > 0) {\n        address = [BTCAddress addressWithString:comps.path];\n        if (!address) {\n            return nil;\n        }\n    }\n\n    if (self = [self init]) {\n        self.address = address;\n        for (NSURLQueryItem* item in comps.queryItems) {\n            [self.mutableQueryParameters setObject:item.value forKey:item.name];\n        }\n    }\n\n    self.scheme = scheme;\n\n    return self;\n}\n\n- (BOOL) isValid {\n    return [self isValidBitcoinURL] || [self isValidOpenAssetsURL];\n}\n\n- (BOOL) isBitcoinAddress {\n    return [self.address isKindOfClass:[BTCPublicKeyAddress class]] ||\n           [self.address isKindOfClass:[BTCScriptHashAddress class]];\n}\n\n- (BOOL) isValidBitcoinURL {\n    if ([self.scheme isEqualToString:BTCBitcoinURLSchemeBitcoin]) {\n        return [self isBitcoinAddress] || (!self.address && self.paymentRequestURL);\n    }\n    return NO;\n}\n\n- (BOOL) isValidOpenAssetsURL {\n    if ([self.scheme isEqualToString:BTCBitcoinURLSchemeBitcoin] ||\n        [self.scheme isEqualToString:BTCBitcoinURLSchemeOpenAssets]) {\n\n        // We should either have an asset address with asset ID, or no address and payment request URL.\n        return ([self.address isKindOfClass:[BTCAssetAddress class]] && self.assetID) || (!self.address && !self.assetID && self.paymentRequestURL);\n    }\n    return NO;\n}\n\n- (NSURL*) URL {\n    NSMutableString* string = [NSMutableString stringWithFormat:@\"%@:%@\", self.scheme, self.address ? self.address.string : @\"\"];\n    NSMutableArray* queryItems = [NSMutableArray array];\n\n    if(self.queryParameters) {\n        NSArray* keys = self.queryParameters.allKeys;\n        for (NSString* key in keys) {\n            NSString* encodedKey = CFBridgingRelease(CFURLCreateStringByAddingPercentEscapes(NULL, (CFStringRef)key, NULL, CFSTR(\"&=\"),\n                                                                                             kCFStringEncodingUTF8));\n            NSString* encodedValue = CFBridgingRelease(CFURLCreateStringByAddingPercentEscapes(NULL, (CFStringRef)[self.queryParameters objectForKey:key], NULL, CFSTR(\"&=\"),\n                                                                                               kCFStringEncodingUTF8));\n            [queryItems addObject:[NSString stringWithFormat:@\"%@=%@\",encodedKey,encodedValue]];\n             \n        }\n    }\n\n    if (queryItems.count > 0) {\n        [string appendString:@\"?\"];\n        [string appendString:[queryItems componentsJoinedByString:@\"&\"]];\n    }\n\n    return [NSURL URLWithString:string];\n}\n\n- (id)objectForKeyedSubscript:(id <NSCopying>)key {\n    return self.mutableQueryParameters[key];\n}\n\n- (void)setObject:(id)obj forKeyedSubscript:(id <NSCopying>)key {\n    self.mutableQueryParameters[key] = obj;\n}\n\n- (NSDictionary*) queryParameters {\n    return self.mutableQueryParameters;\n}\n\n- (void) setQueryParameters:(NSDictionary *)queryParameters {\n    self.mutableQueryParameters = [NSMutableDictionary dictionaryWithDictionary:queryParameters ?: @{}];\n    //Reset cached standard query parameters\n    _amount = 0;\n    _paymentRequestURL = nil;\n    _message = nil;\n    _label = nil;\n    _assetID = nil;\n}\n\n\n\n\n#pragma mark - Standard query parameters\n\n\n- (void) setAddress:(BTCAddress *)address {\n    // Make sure to reformat amount according to the address.\n    BTCAmount amount = self.amount;\n    _address = address;\n    self.amount = amount;\n}\n\n- (BTCAmount) amount {\n    if(_amount == 0){\n        NSString* amountString = self.mutableQueryParameters[@\"amount\"];\n        if (amountString) _amount = [BTCBitcoinURL parseAmount:amountString address:self.address];\n    }\n    return _amount;\n}\n\n- (void) setAmount:(BTCAmount)amount {\n    _amount = amount;\n    if (amount > 0) {\n        NSString* amountString = [BTCBitcoinURL formatAmount:amount address:self.address];\n        self.mutableQueryParameters[@\"amount\"] = amountString;\n    } else {\n        [self.mutableQueryParameters removeObjectForKey:@\"amount\"];\n    }\n}\n\n- (BTCAssetID*) assetID {\n    return [BTCAssetID assetIDWithString:self.mutableQueryParameters[@\"asset\"]];\n}\n\n- (void) setAssetID:(BTCAssetID *)assetID {\n    if (assetID) {\n        self.mutableQueryParameters[@\"asset\"] = assetID.string;\n    } else {\n        [self.mutableQueryParameters removeObjectForKey:@\"asset\"];\n    }\n}\n\n- (NSURL*) paymentRequestURL {\n    if (!_paymentRequestURL) {\n        NSString* r = self.mutableQueryParameters[@\"r\"];\n        if (r) _paymentRequestURL = [NSURL URLWithString:r];\n    }\n    return _paymentRequestURL;\n}\n\n- (void) setPaymentRequestURL:(NSURL *)paymentRequestURL {\n    _paymentRequestURL = paymentRequestURL;\n    if(paymentRequestURL != nil) {\n        self.mutableQueryParameters[@\"r\"] = paymentRequestURL.absoluteString;\n    } else {\n        [self.mutableQueryParameters removeObjectForKey:@\"r\"];\n    }\n}\n\n- (NSString*) label {\n    if(!_label) {\n        _label = self.mutableQueryParameters[@\"label\"];\n    }\n    return _label;\n}\n\n- (void) setLabel:(NSString *)label {\n    _label = label;\n    if(label != nil) {\n        self.mutableQueryParameters[@\"label\"] = label;\n    } else {\n        [self.mutableQueryParameters removeObjectForKey:@\"label\"];\n    }\n}\n\n- (NSString*) message {\n    if(!_message) {\n        _message = self.mutableQueryParameters[@\"message\"];\n    }\n    return _message;\n}\n\n- (void) setMessage:(NSString *)message {\n    _message = message;\n    if(message != nil) {\n        self.mutableQueryParameters[@\"message\"] = message;\n    } else {\n        [self.mutableQueryParameters removeObjectForKey:@\"message\"];\n    }\n}\n\n#pragma mark - Helpers\n\n+ (NSString*) formatAmount:(BTCAmount)amount address:(BTCAddress*)address {\n    // Open Assets urls should have amount formatted as integer\n    if (address && [address isKindOfClass:[BTCAssetAddress class]]) {\n        return @(amount).stringValue;\n    }\n    return [NSString stringWithFormat:@\"%d.%08d\", (int)(amount / BTCCoin), (int)(amount % BTCCoin)];\n}\n\n+ (BTCAmount) parseAmount:(NSString*)string address:(BTCAddress*)address {\n\n    // Open Assets urls should have amount formatted as integer\n    if (address && [address isKindOfClass:[BTCAssetAddress class]]) {\n        return [string longLongValue];\n    }\n\n    NSLocale* locale = [[NSLocale localeWithLocaleIdentifier:@\"en_US\"] copy]; // uses period (\".\") as a decimal point.\n    NSAssert([[locale objectForKey:NSLocaleDecimalSeparator] isEqual:@\".\"], @\"must be point as a decimal separator\");\n    NSDecimalNumber* dn = [NSDecimalNumber decimalNumberWithString:string locale:locale];\n    // Fixes crash on URL like \"bitcoin:1shaYanre36PBhspFL9zG7nt6tfDhxQ4u?amount=#\" (https://twitter.com/sbetamc/status/581974120440700929)\n    if ([dn isEqual:[NSDecimalNumber notANumber]]) {\n        return 0;\n    }\n    if (BTCAmountFromDecimalNumber(dn) > 21000000) { // prevent overflow when multiplying by 8.\n        return 0;\n    }\n    dn = [dn decimalNumberByMultiplyingByPowerOf10:8];\n    return BTCAmountFromDecimalNumber(dn);\n}\n\n@end\n"
  },
  {
    "path": "Pods/CoreBitcoin/CoreBitcoin/BTCBlindSignature.h",
    "content": "// CoreBitcoin by Oleg Andreev <oleganza@gmail.com>, WTFPL.\n\n#import <Foundation/Foundation.h>\n\n@class BTCKey;\n@class BTCKeychain;\n@class BTCBigNumber;\n@class BTCCurvePoint;\n@interface BTCBlindSignature : NSObject\n\n// High-level API\n// This is BIP32-based API to keep track of just a single private key for multiple signatures.\n//\n// Usage:\n// 1. Bob creates his keychain and gives keychain.extendedPublicKey to Alice.\n//\n// 2. Alice creates her instance of the API:\n//    BTCBlindSignature* alice = [[BTCBlindSignature alloc] initWithClientKeychain:aliceKeychain custodianKeychain:bobPublicKeychain];\n//\n// 3. Bob creates his instance of the API:\n//    BTCBlindSignature* bob = [[BTCBlindSignature alloc] initWithCustodianKeychain:bobKeychain];\n//\n// 4. Alice generates a public key to use in a destination script (e.g. in a multisig transaction).\n//    BTCKey* pubkey = [alice publicKeyAtIndex:i];\n//\n// 5. Later, when Alice wants to redeem her funds, she prepares a redeeming transaction and computes its hash:\n//    NSData* hash = BTCHash256(...);\n//\n// 6. Alice blinds this hash and sends it to Bob:\n//    NSData* blindedHash = [alice blindedHashForHash:hash index:i];\n//\n// 7. Bob receives the blindedHash and computes blind signature for Alice (and sends it back to her).\n//    NSData* blindSig = [bob blindSignatureForBlindedHash:blindedHash index:i];\n//\n// 8. Alice receives the blind signature from Bob and computes the complete ECDSA signature ready to use in her redeeming transaction.\n//    NSData* finalSig = [alice unblindedSignatureForBlindSignature:blindSig index:i];\n//\n// Alice may verify that signature satisfies the public key: [pubkey isValidSignature:finalSig hash:hash].\n//\n// Note: the same index i must not be reused for a different transaction.\n//\n// IMPORTANT: once you published one transaction, you cannot adjust mining fees or outputs and resend a different transaction.\n//            if you do, you will expose the same nonce for two different hashes and that will allow someone to find our a matching private key\n//            and issue a doublespending transaction in attempt to steal your funds.\n//\n// Algorithm in detail:\n// 1. Alice creates an extended private key u.\n// 2. Bob creates an extended private key w and sends the corresponding extended public key W to Alice.\n// 3. Alice assigns an index i for each “blind” public key T to use in the future. Alice must use each value of i only for one message.\n// 4. Alice generates a, b, c, d using HD(u, i), a “hardened” derivation according to BIP32:\n//    a = HD(u, 4·i + 0)\n//    b = HD(u, 4·i + 1)\n//    c = HD(u, 4·i + 2)\n//    d = HD(u, 4·i + 3)\n// 5. Alice generates P and Q via ND(W, i), normal (“non-hardened”) derivation according to BIP32:\n//    P = ND(W, 2·i + 0)\n//    Q = ND(W, 2·i + 1)\n// 6. Using a, b, c, d, P and Q, Alice computes T and K and stores tuple (T, K, i) for the future,\n//    until she needs to request a signature from Bob.\n// 7. When Alice needs to sign her message, she retrieves K and i\n//    and recovers her secret parameters a, b, c, d using HD(u, i).\n// 8. Alice sends Bob a blinded hash h2 = a·h + b (mod n) and index i.\n// 9. Because P and Q are not simply the public keys of p and q,\n//    Bob needs to do extra operations to derive p and q from w and i (following BIP32 would not be enough):\n//    From\n//      P = p^-1·G = (w + x)·G (where x is a factor in ND(W, 2·i + 0))\n//    follows:\n//      p = (w + x)^-1 mod n\n//\n//    From\n//      Q = q·p^-1·G = (w + y)·G (where y is a factor in ND(W, 2·i + 1))\n//    follows:\n//      q = (w + y)·(w + x)^-1 mod n\n//\n//    Factors x and y are produced according to BIP32 as first 32 bytes of HMAC-SHA512.\n//    See [BIP32] for details.\n//\n// 10. Bob computes blinded signature s1 = p·h2 + q (mod n) and sends it to Alice (after verifying her identity).\n// 11. Alice receives the blinded signature, unblinds it and arrives at a final signature (Kx, s2).\n\n// Alice as a client needs private client keychain and public custodian keychain (provided by Bob).\n- (id) initWithClientKeychain:(BTCKeychain*)clientKeychain custodianKeychain:(BTCKeychain*)custodianKeychain;\n\n// Bob as a custodian only needs his own private keychain.\n- (id) initWithCustodianKeychain:(BTCKeychain*)custodianKeychain;\n\n// Steps 4-6: Alice generates public key to use in a transaction.\n- (BTCKey*) publicKeyAtIndex:(uint32_t)index;\n\n// Steps 7-8: Alice blinds her message and sends it to Bob.\n// Note: the index will be encoded in the blinded hash so you don't need to carry it to Bob separately.\n- (NSData*) blindedHashForHash:(NSData*)hash index:(uint32_t)index;\n\n// Step 9-10: Bob computes a signature for Alice.\n// Note: the index is encoded in the blinded hash and blind signature so we don't need to carry it back and forth.\n- (NSData*) blindSignatureForBlindedHash:(NSData*)blindedHash;\n\n// Step 11: Alice receives signature from Bob and generates final DER-encoded signature to use in transaction.\n// If optional hash is not nil, method will verify that the signature is valid for the hash and corresponding public key.\n// Note: Do not forget to add SIGHASH byte in the end when placing in a Bitcoin transaction.\n- (NSData*) unblindedSignatureForBlindSignature:(NSData*)blindSignature;\n- (NSData*) unblindedSignatureForBlindSignature:(NSData*)blindSignature verifyHash:(NSData*)hash;\n\n\n// Core Algorithm\n// Exposed as a public API for testing purposes. Use high-level API above in real applications.\n\n// Alice wants Bob to sign her transactions blindly.\n// Bob will provide Alice with blinded public keys and blinded signatures for each transaction.\n\n// 1. Alice chooses random numbers a, b, c, d within [1, n – 1].\n// 2. Bob chooses random numbers p, q within [1, n – 1]  \n//    and sends two EC points to Alice: \n//    P = (p^-1·G) and Q = (q·p^-1·G).\n// 3. Alice computes K = (c·a)^-1·P and public key T = (a·Kx)^-1·(b·G + Q + d·c^-1·P).\n//    Bob cannot know if his parameters were involved in K or T without the knowledge of a, b, c and d. \n//    Thus, Alice can safely publish T (e.g. in a Bitcoin transaction that locks funds with T).\n// 4. When time comes to sign a message (e.g. redeeming funds locked in a Bitcoin transaction), \n//    Alice computes the hash h of her message.\n// 5. Alice blinds the hash and sends h2 = a·h + b (mod n) to Bob.\n// 6. Bob verifies the identity of Alice via separate communications channel.\n// 7. Bob signs the blinded hash and returns the signature to Alice: s1 = p·h2 + q (mod n).\n// 8. Alice unblinds the signature: s2 = c·s1 + d (mod n).\n// 9. Now Alice has (Kx, s2) which is a valid ECDSA signature of hash h verifiable by public key T. \n//    If she uses it in a Bitcoin transaction, she will be able to redeem her locked funds without Bob knowing which transaction he just helped to sign.\n\n// Step 2: P and Q from Bob as blinded \"public keys\". Both P and C are BTCCurvePoint instances.\n- (NSArray*) bob_P_and_Q_for_p:(BTCBigNumber*)p q:(BTCBigNumber*)q;\n\n// 3. Alice computes K = (c·a)^-1·P and public key T = (a·Kx)^-1·(b·G + Q + d·c^-1·P).\n//    Bob cannot know if his parameters were involved in K or T without the knowledge of a, b, c and d.\n- (NSArray*) alice_K_and_T_for_a:(BTCBigNumber*)a b:(BTCBigNumber*)b c:(BTCBigNumber*)c d:(BTCBigNumber*)d P:(BTCCurvePoint*)P Q:(BTCCurvePoint*)Q;\n\n// 5. Alice blinds the hash and sends h2 = a·h + b (mod n) to Bob.\n- (BTCBigNumber*) aliceBlindedHashForHash:(BTCBigNumber*)hash a:(BTCBigNumber*)a b:(BTCBigNumber*)b;\n\n// 7. Bob signs the blinded hash and returns the signature to Alice: s1 = p·h2 + q (mod n).\n- (BTCBigNumber*) bobBlindedSignatureForHash:(BTCBigNumber*)hash p:(BTCBigNumber*)p q:(BTCBigNumber*)q;\n\n// 8. Alice unblinds the signature: s2 = c·s1 + d (mod n).\n- (BTCBigNumber*) aliceUnblindedSignatureForSignature:(BTCBigNumber*)blindSignature c:(BTCBigNumber*)c d:(BTCBigNumber*)d;\n\n// 9. Now Alice has (Kx, s2) which is a valid ECDSA signature of hash h verifiable by public key T.\n// This returns final DER-encoded ECDSA signature ready to be used in a bitcoin transaction.\n// Note: Do not forget to add SIGHASH byte in the end when placing in a Bitcoin transaction.\n- (NSData*) aliceCompleteSignatureForKx:(BTCBigNumber*)Kx unblindedSignature:(BTCBigNumber*)unblindedSignature;\n\n@end\n"
  },
  {
    "path": "Pods/CoreBitcoin/CoreBitcoin/BTCBlindSignature.m",
    "content": "// CoreBitcoin by Oleg Andreev <oleganza@gmail.com>, WTFPL.\n// Implementation of blind signatures for Bitcoin transactions:\n// http://oleganza.com/blind-ecdsa-draft-v2.pdf\n\n#import \"BTCBlindSignature.h\"\n#import \"BTCData.h\"\n#import \"BTCKey.h\"\n#import \"BTCKeychain.h\"\n#import \"BTCCurvePoint.h\"\n#import \"BTCBigNumber.h\"\n#include <openssl/ec.h>\n#include <openssl/ecdsa.h>\n#include <openssl/evp.h>\n#include <openssl/bn.h>\n\n\n@implementation BTCBlindSignature {\n    BTCKeychain* _clientKeychain;\n    BTCKeychain* _custodianKeychain;\n}\n\n// High-level API\n// This is BIP32-based API to keep track of just a single private key for multiple signatures.\n\n// Alice as a client needs private client keychain and public custodian keychain (provided by Bob).\n- (id) initWithClientKeychain:(BTCKeychain*)clientKeychain custodianKeychain:(BTCKeychain*)custodianKeychain {\n    if (!clientKeychain || !custodianKeychain) return nil;\n    \n    // Sanity check: client keychain must be private and custodian keychain must be public.\n    if (!clientKeychain.isPrivate) return nil;\n    if (custodianKeychain.isPrivate) return nil;\n\n    if (self = [super init]) {\n        _clientKeychain = clientKeychain;\n        _custodianKeychain = custodianKeychain;\n    }\n    return self;\n}\n\n// Bob as a custodian only needs his own private keychain.\n- (id) initWithCustodianKeychain:(BTCKeychain*)custodianKeychain {\n    if (!custodianKeychain) return nil;\n    \n    // Sanity check: custodian keychain must be private.\n    if (!custodianKeychain.isPrivate) return nil;\n    \n    if (self = [super init]) {\n        _custodianKeychain = custodianKeychain;\n    }\n    return self;\n}\n\n// Steps 4-6: Alice generates public key to use in a transaction.\n- (BTCKey*) publicKeyAtIndex:(uint32_t)index {\n    BTCBigNumber* a = [self privateNumberFromKeychain:_clientKeychain index:4*index + 0];\n    BTCBigNumber* b = [self privateNumberFromKeychain:_clientKeychain index:4*index + 1];\n    BTCBigNumber* c = [self privateNumberFromKeychain:_clientKeychain index:4*index + 2];\n    BTCBigNumber* d = [self privateNumberFromKeychain:_clientKeychain index:4*index + 3];\n    \n    BTCCurvePoint* P = [self pointFromKeychain:_custodianKeychain index:2*index + 0];\n    BTCCurvePoint* Q = [self pointFromKeychain:_custodianKeychain index:2*index + 1];\n    \n    NSArray* KT = [self alice_K_and_T_for_a:a b:b c:c d:d P:P Q:Q];\n    \n    BTCCurvePoint* K = KT.firstObject;\n    BTCCurvePoint* T = KT.lastObject;\n    \n    NSAssert(K, @\"sanity check\");\n    NSAssert(T, @\"sanity check\");\n    \n    BTCKey* key = [[BTCKey alloc] initWithCurvePoint:T];\n    \n    NSAssert(key, @\"sanity check\");\n    \n    [K clear];\n    [a clear];\n    [b clear];\n    [c clear];\n    [d clear];\n    [P clear];\n    [Q clear];\n    \n    return key;\n}\n\n// Steps 7-8: Alice blinds her message and sends it to Bob.\n// Note: the index will be encoded in the blinded hash so you don't need to carry it to Bob separately.\n- (NSData*) blindedHashForHash:(NSData*)hash index:(uint32_t)index {\n    if (!hash) return nil;\n    \n    BTCBigNumber* a = [self privateNumberFromKeychain:_clientKeychain index:4*index + 0];\n    BTCBigNumber* b = [self privateNumberFromKeychain:_clientKeychain index:4*index + 1];\n    \n    BTCBigNumber* h1 = [[BTCBigNumber alloc] initWithUnsignedBigEndian:hash];\n    \n    BTCBigNumber* h2 = [self aliceBlindedHashForHash:h1 a:a b:b];\n    \n    [a clear];\n    [b clear];\n    [h1 clear];\n    \n    index = OSSwapHostToBigInt32(index);\n    \n    NSMutableData* result = [NSMutableData dataWithBytes:&index length:4];\n    [result appendData:h2.unsignedBigEndian];\n    \n    return result;\n}\n\n// Step 9-10: Bob computes a signature for Alice.\n// Note: the index is encoded in the blinded hash and blind signature so we don't need to carry it back and forth.\n- (NSData*) blindSignatureForBlindedHash:(NSData*)blindedHash {\n    if (!blindedHash) return nil;\n    if (blindedHash.length != (4 + 32)) return nil; // blinded hash must contain 32-bit index and 256-bit hash.\n    \n    uint32_t index = *((uint32_t*)blindedHash.bytes);\n    index = OSSwapBigToHostInt32(index);\n    \n    BTCBigNumber* h2 = [[BTCBigNumber alloc] initWithUnsignedBigEndian:[blindedHash subdataWithRange:NSMakeRange(4, blindedHash.length - 4)]];\n    \n    //    From\n    //      P = p^-1·G = (w + x)·G (where x is a factor in ND(W, 2·i + 0))\n    //    follows:\n    //      p = (w + x)^-1 mod n\n    //\n    //    From\n    //      Q = q·p^-1·G = (w + y)·G (where y is a factor in ND(W, 2·i + 1))\n    //    follows:\n    //      q = (w + y)·(w + x)^-1 mod n = (w + y)·p mod n\n\n    BTCBigNumber* order = [BTCCurvePoint curveOrder];\n    \n    BTCBigNumber* w = [[BTCBigNumber alloc] initWithUnsignedBigEndian:_custodianKeychain.key.privateKey];\n    \n    BTCBigNumber* x = nil;\n    BTCBigNumber* y = nil;\n    \n    [_custodianKeychain derivedKeychainAtIndex:2*index + 0 hardened:NO factor:&x];\n    [_custodianKeychain derivedKeychainAtIndex:2*index + 1 hardened:NO factor:&y];\n    \n    BTCBigNumber* p = [[[w mutableCopy] add:x mod:order] inverseMod:order];\n    BTCBigNumber* q = [[[w mutableCopy] add:y mod:order] multiply:p mod:order];\n    \n    BTCBigNumber* s1 = [self bobBlindedSignatureForHash:h2 p:p q:q];\n    \n    [w clear];\n    [x clear];\n    [y clear];\n    [p clear];\n    [q clear];\n    [h2 clear];\n    \n    // Return signature with index in the front.\n    index = OSSwapHostToBigInt32(index);\n    \n    NSMutableData* result = [NSMutableData dataWithBytes:&index length:4];\n    [result appendData:s1.unsignedBigEndian];\n    \n    return result;\n}\n\n// Step 11: Alice receives signature from Bob and generates final DER-encoded signature to use in transaction.\n// Note: Do not forget to add SIGHASH byte in the end when placing in a Bitcoin transaction.\n- (NSData*) unblindedSignatureForBlindSignature:(NSData*)blindSignature {\n    return [self unblindedSignatureForBlindSignature:blindSignature verifyHash:nil];\n}\n\n- (NSData*) unblindedSignatureForBlindSignature:(NSData*)blindSignature verifyHash:(NSData*)hashToVerify {\n    if (!blindSignature) return nil;\n    if (blindSignature.length < 5) return nil;\n    \n    uint32_t index = *((uint32_t*)blindSignature.bytes);\n    index = OSSwapBigToHostInt32(index);\n\n    BTCBigNumber* s1 = [[BTCBigNumber alloc] initWithUnsignedBigEndian:[blindSignature subdataWithRange:NSMakeRange(4, blindSignature.length - 4)]];\n\n    BTCBigNumber* a = [self privateNumberFromKeychain:_clientKeychain index:4*index + 0];\n    BTCBigNumber* b = [self privateNumberFromKeychain:_clientKeychain index:4*index + 1];\n    BTCBigNumber* c = [self privateNumberFromKeychain:_clientKeychain index:4*index + 2];\n    BTCBigNumber* d = [self privateNumberFromKeychain:_clientKeychain index:4*index + 3];\n\n    BTCCurvePoint* P = [self pointFromKeychain:_custodianKeychain index:2*index + 0];\n    BTCCurvePoint* Q = [self pointFromKeychain:_custodianKeychain index:2*index + 1];\n    \n    NSArray* KT = [self alice_K_and_T_for_a:a b:b c:c d:d P:P Q:Q];\n    \n    BTCCurvePoint* K = KT.firstObject;\n    BTCCurvePoint* T = KT.lastObject;\n    \n    NSAssert(K, @\"sanity check\");\n    NSAssert(T, @\"sanity check\");\n\n    BTCBigNumber* s2 = [self aliceUnblindedSignatureForSignature:s1 c:c d:d];\n    \n    NSAssert(s2, @\"sanity check\");\n\n    NSData* sig = [self aliceCompleteSignatureForKx:K.x unblindedSignature:s2];\n\n    NSAssert(sig, @\"sanity check\");\n    \n    [K clear];\n    [T clear];\n    [s2 clear];\n    [s1 clear];\n    [a clear];\n    [b clear];\n    [c clear];\n    [d clear];\n    \n    // Verify signature\n    if (hashToVerify) {\n        BTCKey* pubkey = [self publicKeyAtIndex:index];\n    \n        if (![pubkey isValidSignature:sig hash:hashToVerify]) {\n            sig = nil;\n        }\n        \n        [pubkey clear];\n    }\n    \n    return sig;\n}\n\n\n- (BTCBigNumber*) privateNumberFromKeychain:(BTCKeychain*)keychain index:(uint32_t)index {\n    BTCKeychain* derivedKC = [keychain derivedKeychainAtIndex:index hardened:YES];\n    \n    NSAssert(derivedKC, @\"sanity check\");\n    \n    BTCKey* key = derivedKC.key;\n    \n    NSAssert(key, @\"sanity check\");\n    \n    NSMutableData* privKeyData = key.privateKey;\n    \n    NSAssert(privKeyData, @\"sanity check\");\n    \n    BTCBigNumber* bn = [[BTCBigNumber alloc] initWithUnsignedBigEndian:privKeyData];\n    \n    BTCDataClear(privKeyData);\n    [key clear];\n    [derivedKC clear];\n    \n    return bn;\n}\n\n- (BTCCurvePoint*) pointFromKeychain:(BTCKeychain*)keychain index:(uint32_t)index {\n    BTCKeychain* derivedKC = [keychain derivedKeychainAtIndex:index hardened:NO];\n    \n    NSAssert(derivedKC, @\"sanity check\");\n    \n    BTCKey* key = derivedKC.key;\n    \n    NSAssert(key, @\"sanity check\");\n    \n    BTCCurvePoint* point = [key curvePoint];\n    \n    NSAssert(point, @\"sanity check\");\n    \n    [key clear];\n    [derivedKC clear];\n    \n    return point;\n}\n\n\n// Core Algorithm\n// Exposed as a public API for testing purposes. Use less verbose high-level API above for real usage.\n\n// Alice wants Bob to sign her transactions blindly.\n// Bob will provide Alice with blinded public keys and blinded signatures for each transaction.\n\n// 1. Alice chooses random numbers a, b, c, d within [1, n – 1].\n// 2. Bob chooses random numbers p, q within [1, n – 1]\n//    and sends two EC points to Alice:\n//    P = (p^-1·G) and Q = (q·p^-1·G).\n// 3. Alice computes K = (c·a)^-1·P and public key T = (a·Kx)^-1·(b·G + Q + d·c^-1·P).\n//    Bob cannot know if his parameters were involved in K or T without the knowledge of a, b, c and d.\n//    Thus, Alice can safely publish T (e.g. in a Bitcoin transaction that locks funds with T).\n// 4. When time comes to sign a message (e.g. redeeming funds locked in a Bitcoin transaction),\n//    Alice computes the hash h of her message.\n// 5. Alice blinds the hash and sends h2 = a·h + b (mod n) to Bob.\n// 6. Bob verifies the identity of Alice via separate communications channel.\n// 7. Bob signs the blinded hash and returns the signature to Alice: s1 = p·h2 + q (mod n).\n// 8. Alice unblinds the signature: s2 = c·s1 + d (mod n).\n// 9. Now Alice has (Kx, s2) which is a valid ECDSA signature of hash h verifiable by public key T.\n//    If she uses it in a Bitcoin transaction, she will be able to redeem her locked funds without Bob knowing which transaction he just helped to sign.\n\n// Step 2: P and Q from Bob as blinded \"public keys\". Both P and C are BTCCurvePoint instances.\n- (NSArray*) bob_P_and_Q_for_p:(BTCBigNumber*)p q:(BTCBigNumber*)q {\n    if (!p || !q) return nil;\n    \n    BTCCurvePoint* P = nil;\n    BTCCurvePoint* Q = nil;\n    BTCBigNumber* invp = nil;\n    \n    invp = [[p mutableCopy] inverseMod:[BTCCurvePoint curveOrder]];\n    \n    P = [[BTCCurvePoint generator] multiply:invp];\n    Q = [[P copy] multiply:q];\n    \n    NSAssert(P, @\"P should be valid\");\n    NSAssert(Q, @\"Q should be valid\");\n    \n    [invp clear]; // clear sensitive data from temporary variable p^-1\n    \n    return @[P, Q];\n}\n\n// 3. Alice computes K = (c·a)^-1·P and public key T = (a·Kx)^-1·(b·G + Q + d·c^-1·P).\n//    Bob cannot know if his parameters were involved in K or T without the knowledge of a, b, c and d.\n- (NSArray*) alice_K_and_T_for_a:(BTCBigNumber*)a b:(BTCBigNumber*)b c:(BTCBigNumber*)c d:(BTCBigNumber*)d P:(BTCCurvePoint*)P Q:(BTCCurvePoint*)Q {\n    if (!a || !b || !c || !d || !P || !Q) return nil;\n    \n    // K = (c·a)^-1·P\n    // K = (c^-1)·(a^-1)·P\n    \n    // T = (a·Kx)^-1·(b·G + Q + d·(c^-1)·P).\n    // T = (a^-1)·(Kx^-1)·(b·G + Q + d·(c^-1)·P).\n    \n    // Temporary vars\n    BTCBigNumber* curveOrder = [BTCCurvePoint curveOrder];\n    BTCBigNumber* invc = nil;\n    BTCBigNumber* inva = nil;\n    BTCBigNumber* Kx = nil;\n    BTCBigNumber* invKx = nil;\n    \n    // Results\n    BTCCurvePoint* K = nil;\n    BTCCurvePoint* T = nil;\n    \n    inva = [[a mutableCopy] inverseMod:curveOrder];\n    invc = [[c mutableCopy] inverseMod:curveOrder];\n    \n    K = [[[P copy] multiply:inva] multiply:invc];\n    \n    NSAssert(K, @\"K should be valid\");\n    \n    Kx = K.x;\n    \n    invKx = [[Kx mutableCopy] inverseMod:curveOrder];\n    \n    T = [[[[[[[P copy] multiply:invc] multiply:d] add:Q] addGeneratorMultipliedBy:b] multiply:invKx] multiply:inva];\n    \n    NSAssert(T, @\"T should be valid\");\n    \n    // Clear temporary variables.\n    [invc clear];\n    [inva clear];\n    [Kx clear];\n    [invKx clear];\n    \n    return @[K, T];\n}\n\n// Helper for steps 5, 7, 8.\n- (BTCBigNumber*) linearTransformOfNumber:(BTCBigNumber*)number multiply:(BTCBigNumber*)a add:(BTCBigNumber*)b {\n    if (!number || !a || !b) return nil;\n    \n    BTCBigNumber* curveOrder = [BTCCurvePoint curveOrder];\n    BTCMutableBigNumber* result = [[[number mutableCopy] multiply:a mod:curveOrder] add:b mod:curveOrder];\n    return result;\n}\n\n// 5. Alice blinds the hash and sends h2 = a·h + b (mod n) to Bob.\n- (BTCBigNumber*) aliceBlindedHashForHash:(BTCBigNumber*)hash a:(BTCBigNumber*)a b:(BTCBigNumber*)b {\n    return [self linearTransformOfNumber:hash multiply:a add:b];\n}\n\n// 7. Bob signs the blinded hash and returns the signature to Alice: s1 = p·h2 + q (mod n).\n- (BTCBigNumber*) bobBlindedSignatureForHash:(BTCBigNumber*)hash p:(BTCBigNumber*)p q:(BTCBigNumber*)q {\n    return [self linearTransformOfNumber:hash multiply:p add:q];\n}\n\n// 8. Alice unblinds the signature: s2 = c·s1 + d (mod n).\n- (BTCBigNumber*) aliceUnblindedSignatureForSignature:(BTCBigNumber*)blindSignature c:(BTCBigNumber*)c d:(BTCBigNumber*)d {\n    return [self linearTransformOfNumber:blindSignature multiply:c add:d];\n}\n\n// DER signature:\n// 3045022100d21bdec190e170c6a59a91e002d3a4f26d64afecce704249484d2eb24721358d0220303f16b06e03f0719cadb001ea55f6f2d4f96807291802c2f26c09eb19ca087401\n// Segments:\n// 0x30 - prefix\n// 0x45 - remaining length (69 = 1 + 1 + 33 + 1 + 1 + 32)\n// 0x02 - prefix\n// 0x21 - r length (33)\n// 0x00d21bdec190e170c6a59a91e002d3a4f26d64afecce704249484d2eb24721358d // prefixed by 0x00 because 0xd2 is > 0x7F but the number is unsigned.\n// 0x02 - prefix\n// 0x20 - s length (32)\n// 0x303f16b06e03f0719cadb001ea55f6f2d4f96807291802c2f26c09eb19ca0874 // not prefixed by 0x00 because 0x30 is below 0x7F, so \"sign bit\" is 0.\n// 0x01 - hash type\n- (NSData*) aliceCompleteSignatureForKx:(BTCBigNumber*)Kx unblindedSignature:(BTCBigNumber*)unblindedSignature {\n    ECDSA_SIG sigValue;\n    ECDSA_SIG *sig = &sigValue;\n    \n    BIGNUM r; BN_init(&r); BN_copy(&r, Kx.BIGNUM);\n    BIGNUM s; BN_init(&s); BN_copy(&s, unblindedSignature.BIGNUM);\n    \n    sig->r = &r;\n    sig->s = &s;\n    \n    // The remaining code is taken from BTCKey where we produce a canonical signature.\n    \n    BN_CTX *ctx = BN_CTX_new();\n    BN_CTX_start(ctx);\n    \n    EC_GROUP *group = EC_GROUP_new_by_curve_name(NID_secp256k1);\n    BIGNUM *order = BN_CTX_get(ctx);\n    BIGNUM *halforder = BN_CTX_get(ctx);\n    EC_GROUP_get_order(group, order, ctx);\n    BN_rshift1(halforder, order);\n    if (BN_cmp(sig->s, halforder) > 0) {\n        // enforce low S values, by negating the value (modulo the order) if above order/2.\n        BN_sub(sig->s, order, sig->s);\n    }\n    BN_CTX_end(ctx);\n    BN_CTX_free(ctx);\n    EC_GROUP_free(group);\n    \n    unsigned int sigSize = 72; // typical size of a ECDSA signature (when both numbers are 33 bytes).\n    \n    NSMutableData* signature = [NSMutableData dataWithLength:sigSize + 16]; // Make sure it is big enough\n    \n    unsigned char *pos = (unsigned char *)signature.mutableBytes;\n    sigSize = i2d_ECDSA_SIG(sig, &pos);\n\n    // Do not free sig as its pointers belong to external parameters\n    // ECDSA_SIG_free(sig);\n    // Instead, clear individual bignums.\n    BN_clear_free(&r);\n    BN_clear_free(&s);\n    \n    // Shrink to fit actual size\n    [signature setLength:sigSize];\n    \n    return signature;\n}\n\n@end\n"
  },
  {
    "path": "Pods/CoreBitcoin/CoreBitcoin/BTCBlock.h",
    "content": "// CoreBitcoin by Oleg Andreev <oleganza@gmail.com>, WTFPL.\n\n#import <Foundation/Foundation.h>\n\n@class BTCBlockHeader;\n@interface BTCBlock : NSObject <NSCopying>\n\n@property(nonatomic, readonly) BTCBlockHeader* header;\n@property(nonatomic) NSArray* transactions;\n\n@property(nonatomic, readonly) NSData* blockHash;\n@property(nonatomic, readonly) NSString* blockID;\n@property(nonatomic, readonly) NSData* data; // serialized form of the block\n\n// Informational Properties\n// ------------------------\n// These are available via external APIs like Chain.com.\n\n// Height of the block. Default is 0.\n@property(nonatomic) NSInteger height;\n\n// Number of confirmations. Default is NSNotFound.\n@property(nonatomic) NSUInteger confirmations;\n\n// Arbitrary information attached to this instance.\n// The reference is copied when this instance is copied.\n// Default is nil.\n@property(nonatomic) NSDictionary* userInfo;\n\n\n// Computes merkle root hash from the current transaction array.\n- (NSData*) computeMerkleRootHash;\n\n// Updates header.merkleRootHash by hashing transactions.\n// Equivalent to `block.header.merkleRootHash = [block computeMerkleRootHash]`.\n- (void) updateMerkleTree;\n\n// Instantiates an empty block with a given header.\n- (id) initWithHeader:(BTCBlockHeader*)header;\n\n@end\n"
  },
  {
    "path": "Pods/CoreBitcoin/CoreBitcoin/BTCBlock.m",
    "content": "// CoreBitcoin by Oleg Andreev <oleganza@gmail.com>, WTFPL.\n\n#import \"BTCBlock.h\"\n#import \"BTCBlockHeader.h\"\n#import \"BTCHashID.h\"\n\n@interface BTCBlock ()\n@property(nonatomic, readwrite) BTCBlockHeader* header;\n@end\n\n@implementation BTCBlock\n\n- (id) init {\n    if (self = [super init]) {\n        self.header = [[BTCBlockHeader alloc] init];\n    }\n    return self;\n}\n\n- (id) initWithHeader:(BTCBlockHeader*)header {\n    if (self = [super init]) {\n        self.header = header;\n    }\n    return self;\n}\n\n- (id) initWithData:(NSData*)data {\n    if (self = [super init])\n    {\n        if (![self parseData:data]) return nil;\n    }\n    return self;\n}\n\n- (id) initWithStream:(NSInputStream*)stream {\n    if (self = [super init]) {\n        if (![self parseStream:stream]) return nil;\n    }\n    return self;\n}\n\n- (BOOL) parseData:(NSData*)data {\n\n    // TODO\n\n    return YES;\n}\n\n- (BOOL) parseStream:(NSStream*)stream {\n    // TODO\n\n    return YES;\n}\n\n- (NSData*) blockHash {\n    return self.header.blockHash;\n}\n\n- (NSString*) blockID {\n    return self.header.blockID;\n}\n\n- (NSData*) data {\n    return [self computePayload];\n}\n\n- (NSData*) computePayload {\n    NSMutableData* data = [NSMutableData data];\n\n    [data appendData:self.header.data];\n\n    // TODO: add transactions.\n\n    return data;\n}\n\n\n\n#pragma mark - Informational Properties\n\n\n- (NSInteger) height {\n    return self.header.height;\n}\n\n- (void) setHeight:(NSInteger)height {\n    self.header.height = height;\n}\n\n- (NSUInteger) confirmations {\n    return self.header.confirmations;\n}\n\n- (void) setConfirmations:(NSUInteger)confirmations {\n    self.header.confirmations = confirmations;\n}\n\n- (NSDictionary*) userInfo {\n    return self.header.userInfo;\n}\n\n- (void) setUserInfo:(NSDictionary *)userInfo {\n    self.header.userInfo = userInfo;\n}\n\n\n#pragma mark - Merkle Tree\n\n\n// Computes merkle root hash from the current transaction array.\n- (NSData*) computeMerkleRootHash {\n    // TODO\n    return nil;\n}\n\n- (void) updateMerkleTree {\n    self.header.merkleRootHash = [self computeMerkleRootHash];\n}\n\n- (id) copyWithZone:(NSZone *)zone {\n    BTCBlock* b = [[BTCBlock alloc] init];\n    b.header = [self->_header copy];\n    b.transactions = [[NSArray alloc] initWithArray:self.transactions copyItems:YES]; // so each element is copied individually\n    return b;\n}\n\n@end\n"
  },
  {
    "path": "Pods/CoreBitcoin/CoreBitcoin/BTCBlockHeader.h",
    "content": "// CoreBitcoin by Oleg Andreev <oleganza@gmail.com>, WTFPL.\n\n#import <Foundation/Foundation.h>\n\nstatic const int32_t BTCBlockCurrentVersion = 2;\n\n@interface BTCBlockHeader : NSObject <NSCopying>\n\n+ (NSUInteger) headerLength;\n\n@property(nonatomic) int32_t version;\n@property(nonatomic) NSData* previousBlockHash;\n@property(nonatomic) NSString* previousBlockID;\n@property(nonatomic) NSData* merkleRootHash;\n@property(nonatomic) uint32_t time;\n@property(nonatomic) uint32_t difficultyTarget; // aka nBits\n@property(nonatomic) uint32_t nonce;\n\n@property(nonatomic, readonly) NSData* blockHash;\n@property(nonatomic, readonly) NSString* blockID;\n@property(nonatomic, readonly) NSData* data;\n\n// Date and time of the block.\n@property(nonatomic) NSDate* date;\n\n\n// Informational Properties\n// ------------------------\n// These are available via external APIs like Chain.com.\n\n// Height of the block. Default is 0.\n@property(nonatomic) NSInteger height;\n\n// Number of confirmations. Default is NSNotFound.\n@property(nonatomic) NSUInteger confirmations;\n\n// Arbitrary information attached to this instance.\n// The reference is copied when this instance is copied.\n// Default is nil.\n@property(nonatomic) NSDictionary* userInfo;\n\n\n// Parses block from data buffer\n- (id) initWithData:(NSData*)data;\n\n// Parses input stream\n- (id) initWithStream:(NSInputStream*)stream;\n\n\n@end\n"
  },
  {
    "path": "Pods/CoreBitcoin/CoreBitcoin/BTCBlockHeader.m",
    "content": "// CoreBitcoin by Oleg Andreev <oleganza@gmail.com>, WTFPL.\n\n#import \"BTCBlockHeader.h\"\n#import \"BTCData.h\"\n#import \"BTCHashID.h\"\n\n@implementation BTCBlockHeader\n\n+ (NSUInteger) headerLength {\n    return 4 + 32 + 32 + 4 + 4 + 4;\n}\n\n- (id) init {\n    if (self = [super init]) {\n        // init default values\n        _version = BTCBlockCurrentVersion;\n        _previousBlockHash = BTCZero256();\n        _merkleRootHash = BTCZero256();\n        _time = 0;\n        _difficultyTarget = 0;\n        _nonce = 0;\n        _confirmations = NSNotFound;\n    }\n    return self;\n}\n\n- (id) initWithData:(NSData*)data {\n    if (self = [self init]) {\n        if (![self parseData:data]) return nil;\n    }\n    return self;\n}\n\n- (id) initWithStream:(NSInputStream*)stream {\n    if (self = [self init]) {\n        if (![self parseStream:stream]) return nil;\n    }\n    return self;\n}\n\n- (NSString*) previousBlockID {\n    return BTCIDFromHash(self.previousBlockHash);\n}\n\n- (void) setPreviousBlockID:(NSString *)previousBlockID {\n    self.previousBlockHash = BTCHashFromID(previousBlockID) ?: BTCZero256();\n}\n\n- (NSData*) blockHash {\n    return BTCHash256(self.data);\n}\n\n- (NSString*) blockID {\n    return BTCIDFromHash(self.blockHash);\n}\n\n- (NSDate*) date {\n    return [[NSDate alloc] initWithTimeIntervalSince1970:(NSTimeInterval)self.time];\n}\n\n- (void) setDate:(NSDate *)date {\n    _time = (uint32_t)round(date.timeIntervalSince1970);\n}\n\n- (NSData*) data {\n    return [self computePayload];\n}\n\n- (NSData*) computePayload {\n    NSMutableData* data = [NSMutableData data];\n\n    int32_t version = OSSwapHostToLittleInt32(_version);\n    [data appendBytes:&version length:sizeof(version)];\n    \n    [data appendData:self.previousBlockHash ?: BTCZero256()];\n    [data appendData:self.merkleRootHash ?: BTCZero256()];\n    \n    uint32_t time = OSSwapHostToLittleInt32(_time);\n    [data appendBytes:&time length:sizeof(time)];\n\n    uint32_t target = OSSwapHostToLittleInt32(_difficultyTarget);\n    [data appendBytes:&target length:sizeof(target)];\n\n    uint32_t nonce = OSSwapHostToLittleInt32(_nonce);\n    [data appendBytes:&nonce length:sizeof(nonce)];\n    \n    return data;\n}\n\n- (BOOL) parseData:(NSData*)data {\n    \n    // TODO\n    \n    return YES;\n}\n\n- (BOOL) parseStream:(NSStream*)stream {\n    // TODO\n    \n    return YES;\n}\n\n- (id) copyWithZone:(NSZone *)zone {\n    BTCBlockHeader* bh = [[BTCBlockHeader alloc] init];\n    bh.version = self->_version;\n    bh.previousBlockHash = [self->_previousBlockHash copy];\n    bh.merkleRootHash = [self->_merkleRootHash copy];\n    bh.time = self->_time;\n    bh.difficultyTarget = self->_difficultyTarget;\n    bh.nonce = self->_nonce;\n\n    bh.height = self->_height;\n    bh.confirmations = self->_confirmations;\n    bh.userInfo = self->_userInfo;\n    \n    return bh;\n}\n\n@end\n"
  },
  {
    "path": "Pods/CoreBitcoin/CoreBitcoin/BTCBlockchainInfo.h",
    "content": "// CoreBitcoin by Oleg Andreev <oleganza@gmail.com>, WTFPL.\n\n#import <Foundation/Foundation.h>\n\n// Collection of useful APIs for Blockchain.info\n@interface BTCBlockchainInfo : NSObject\n\n// Getting unspent outputs.\n\n// Builds a request from a list of BTCAddress objects.\n- (NSMutableURLRequest*) requestForUnspentOutputsWithAddresses:(NSArray*)addresses;\n// List of BTCTransactionOutput instances parsed from the response.\n- (NSArray*) unspentOutputsForResponseData:(NSData*)responseData error:(NSError**)errorOut;\n// Makes sync request for unspent outputs and parses the outputs.\n- (NSArray*) unspentOutputsWithAddresses:(NSArray*)addresses error:(NSError**)errorOut;\n\n\n// Broadcasting transaction\n\n// Request to broadcast a raw transaction data.\n- (NSMutableURLRequest*) requestForTransactionBroadcastWithData:(NSData*)data;\n\n@end\n\n"
  },
  {
    "path": "Pods/CoreBitcoin/CoreBitcoin/BTCBlockchainInfo.m",
    "content": "#import \"BTCBlockchainInfo.h\"\n#import \"BTCTransactionOutput.h\"\n#import \"BTCScript.h\"\n#import \"BTCData.h\"\n\n@implementation BTCBlockchainInfo\n\n// Builds a request from a list of BTCAddress objects.\n- (NSMutableURLRequest*) requestForUnspentOutputsWithAddresses:(NSArray*)addresses {\n    if (addresses.count == 0) return nil;\n    \n    NSString* urlstring = [NSString stringWithFormat:@\"https://blockchain.info/unspent?active=%@\", [[addresses valueForKey:@\"base58String\"] componentsJoinedByString:@\"%7C\"]];\n    NSMutableURLRequest* request = [[NSMutableURLRequest alloc] initWithURL:[NSURL URLWithString:urlstring]];\n    request.HTTPMethod = @\"GET\";\n    return request;\n}\n\n// List of BTCTransactionOutput instances.\n- (NSArray*) unspentOutputsForResponseData:(NSData*)responseData error:(NSError**)errorOut {\n    if (!responseData) return nil;\n    NSError* parseError = nil;\n    NSDictionary* dict = [NSJSONSerialization JSONObjectWithData:responseData options:0 error:&parseError];\n    if (!dict || ![dict isKindOfClass:[NSDictionary class]]) {\n        // Blockchain.info returns \"No free outputs to spend\" instead of a valid JSON.\n        NSString* responseString = [[NSString alloc] initWithData:responseData encoding:NSUTF8StringEncoding];\n        if (responseString && [responseString rangeOfString:@\"No free outputs to spend\"].length > 0) {\n            return @[];\n        }\n        if (errorOut) *errorOut = parseError;\n        return nil;\n    }\n    \n    NSMutableArray* outputs = [NSMutableArray array];\n    \n    for (NSDictionary* item in dict[@\"unspent_outputs\"]) {\n        BTCTransactionOutput* txout = [[BTCTransactionOutput alloc] init];\n        \n        txout.value = [item[@\"value\"] longLongValue];\n        txout.script = [[BTCScript alloc] initWithData:BTCDataFromHex(item[@\"script\"])];\n        txout.index = [item[@\"tx_output_n\"] intValue];\n        txout.confirmations = [item[@\"confirmations\"] unsignedIntegerValue];\n        txout.transactionHash = (BTCDataFromHex(item[@\"tx_hash\"])); // unlike many other APIs, here tx_hash is not reversed, but a raw hash in hex.\n        \n        [outputs addObject:txout];\n    }\n    \n    return outputs;\n    \n    /*\n     {\n\t \n         \"unspent_outputs\":[\n     \n             {\n                 \"tx_hash\":\"982051fd1e4ba744bbbe680e1fee14677ba1a3c3540bf7b1cdb606e857233e0e\",\n                 \"tx_index\":2,\n                 \"tx_output_n\": 0,\n                 \"script\":\"410496b538e853519c726a2c91e61ec11600ae1390813a627c66fb8be7947be63c52da7589379515d4e0a604f8141781e62294721166bf621e73a82cbf2342c858eeac\",\n                 \"value\": 5000000000,\n                 \"value_hex\": \"012a05f200\",\n                 \"confirmations\":281337\n             },\n             \n             {\n                 \"tx_hash\":\"520cae06673fc6950fdb2a2cba32f63b50fe99ce2d8469cfc3ddedf6cc34bed6\",\n                 \"tx_index\":668673,\n                 \"tx_output_n\": 1,\n                 \"script\":\"76a914119b098e2e980a229e139a9ed01a469e518e6f2688ac\",\n                 \"value\": 2000000,\n                 \"value_hex\": \"1e8480\",\n                 \"confirmations\":153679\n             },\n             ...\n    */\n}\n\n- (NSArray*) unspentOutputsWithAddresses:(NSArray*)addresses error:(NSError**)errorOut {\n    NSURLRequest* req = [self requestForUnspentOutputsWithAddresses:addresses];\n    NSURLResponse* response = nil;\n    NSData* data = [NSURLConnection sendSynchronousRequest:req returningResponse:&response error:errorOut];\n    if (!data) {\n        return nil;\n    }\n    return [self unspentOutputsForResponseData:data error:errorOut];\n}\n\n- (NSMutableURLRequest*) requestForTransactionBroadcastWithData:(NSData*)data {\n    if (data.length == 0) return nil;\n    \n    NSString* urlstring = @\"https://blockchain.info/pushtx\";\n    NSMutableURLRequest* request = [[NSMutableURLRequest alloc] initWithURL:[NSURL URLWithString:urlstring]];\n    request.HTTPMethod = @\"POST\";\n    NSString* form = [NSString stringWithFormat:@\"tx=%@\", BTCHexFromData(data)];\n    request.HTTPBody = [form dataUsingEncoding:NSUTF8StringEncoding];\n    return request;\n}\n\n- (BOOL) broadcastTransactionData:(NSData*)data error:(NSError**)errorOut {\n    NSURLRequest* req = [self requestForTransactionBroadcastWithData:data];\n    NSURLResponse* response = nil;\n    NSData* resultData = [NSURLConnection sendSynchronousRequest:req returningResponse:&response error:errorOut];\n    if (!resultData) {\n        return NO;\n    }\n    \n    // TODO: parse the response to determine if it was successful or not.\n    \n    return YES;\n}\n\n\n@end\n"
  },
  {
    "path": "Pods/CoreBitcoin/CoreBitcoin/BTCChainCom.h",
    "content": "// CoreBitcoin by Oleg Andreev <oleganza@gmail.com>, WTFPL.\n\n#import <Foundation/Foundation.h>\n@class BTCAddress;\n\n// Collection of APIs for Chain.con\n@interface BTCChainCom : NSObject\n\n- (id)initWithToken:(NSString *)token; // Free API Token from http://chain.com\n\n// Getting unspent outputs.\n\n// Builds a request from a list of BTCAddress objects.\n- (NSMutableURLRequest*) requestForUnspentOutputsWithAddress:(BTCAddress*)address;\n// List of BTCTransactionOutput instances parsed from the response.\n- (NSArray*) unspentOutputsForResponseData:(NSData*)responseData error:(NSError**)errorOut;\n// Makes sync request for unspent outputs and parses the outputs.\n- (NSArray*) unspentOutputsWithAddress:(BTCAddress*)addresses error:(NSError**)errorOut;\n\n\n// Broadcasting transaction\n\n// Request to broadcast a raw transaction data.\n- (NSMutableURLRequest*) requestForTransactionBroadcastWithData:(NSData*)data;\n\n@end\n"
  },
  {
    "path": "Pods/CoreBitcoin/CoreBitcoin/BTCChainCom.m",
    "content": "#import \"BTCChainCom.h\"\n#import \"BTCAddress.h\"\n#import \"BTCTransactionOutput.h\"\n#import \"BTCScript.h\"\n#import \"BTCData.h\"\n\n@interface BTCChainCom()\n@property NSString* token;\n@end\n\n@implementation BTCChainCom\n\n// Initalizes a BTCChainCom object with a free API Token from http://chain.com\n- (id)initWithToken:(NSString *)token {\n    if (self = [super init]) {\n        self.token = token;\n    }\n    return self;\n}\n\n// Builds a request from a list of BTCAddress objects.\n- (NSMutableURLRequest*) requestForUnspentOutputsWithAddress:(BTCAddress*)address {\n    NSString* pathString = [NSString stringWithFormat:@\"addresses/%@/unspents\", [address valueForKey:@\"base58String\"]];\n    NSURL* url = [self  chainURLWithV1BitcoinPath:pathString];\n    NSMutableURLRequest* request = [[NSMutableURLRequest alloc] initWithURL:url];\n    request.HTTPMethod = @\"GET\";\n    return request;\n}\n\n// List of BTCTransactionOutput instances parsed from the response.\n- (NSArray*) unspentOutputsForResponseData:(NSData*)responseData error:(NSError**)errorOut {\n    if (!responseData) return nil;\n    NSArray* array = [NSJSONSerialization JSONObjectWithData:responseData options:0 error:errorOut];\n    if (!array || ![array isKindOfClass:[NSArray class]]) return nil;\n    \n    NSMutableArray* outputs = [NSMutableArray array];\n\n    for (NSDictionary* item in array) {\n        BTCTransactionOutput* txout = [[BTCTransactionOutput alloc] init];\n\n        txout.value = [item[@\"value\"] longLongValue];\n        txout.script = [[BTCScript alloc] initWithString:item[@\"script\"]];\n        txout.index = [item[@\"output_index\"] intValue];\n        txout.transactionHash = (BTCReversedData(BTCDataFromHex(item[@\"transaction_hash\"])));\n        [outputs addObject:txout];\n    }\n    \n    return outputs;\n}\n\n// Makes sync request for unspent outputs and parses the outputs.\n- (NSArray*) unspentOutputsWithAddress:(BTCAddress*)address error:(NSError**)errorOut {\n    NSURLRequest* req = [self requestForUnspentOutputsWithAddress:address];\n    NSURLResponse* response = nil;\n    NSData* data = [NSURLConnection sendSynchronousRequest:req returningResponse:&response error:errorOut];\n    if (!data) {\n        return nil;\n    }\n    return [self unspentOutputsForResponseData:data error:errorOut];\n}\n\n\n- (NSMutableURLRequest*) requestForTransactionBroadcastWithData:(NSData*)data {\n    if (data.length == 0) return nil;\n    \n    NSString* pathString = @\"transactions\";\n    NSURL* url = [self  chainURLWithV1BitcoinPath:pathString];\n    NSMutableURLRequest* request = [[NSMutableURLRequest alloc] initWithURL:url];\n    \n    NSDictionary *requestDictionary = @{@\"hex\":BTCHexFromData(data)};\n    \n    NSError *serializationError = nil;\n    NSData *jsonData = [NSJSONSerialization dataWithJSONObject:requestDictionary options:0 error:&serializationError];\n    if (serializationError != nil) {\n        return nil;\n    }\n    \n    request.HTTPMethod = @\"PUT\";\n    request.HTTPBody = jsonData;\n    return request;\n}\n\n- (BOOL) broadcastTransactionData:(NSData*)data error:(NSError**)errorOut\n{\n    NSURLRequest* req = [self requestForTransactionBroadcastWithData:data];\n    NSURLResponse* response = nil;\n    \n    [NSURLConnection sendSynchronousRequest:req returningResponse:&response error:errorOut];\n    \n    NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *)response;\n\n    if (httpResponse.statusCode >= 200 && httpResponse.statusCode < 300) {\n        return YES;\n    }\n    \n    return NO;\n}\n\n#pragma mark -\n\n- (NSURL*) chainURLWithV1BitcoinPath:(NSString *)path\n{\n    NSString *baseURLString = @\"https://api.chain.com/v1/bitcoin\";\n    NSString *URLString = [NSString stringWithFormat:@\"%@/%@?key=%@\", baseURLString, path, self.token];\n    return [NSURL URLWithString:URLString];\n}\n\n@end\n"
  },
  {
    "path": "Pods/CoreBitcoin/CoreBitcoin/BTCCurrencyConverter.h",
    "content": "// CoreBitcoin by Oleg Andreev <oleganza@gmail.com>, WTFPL.\n\n#import <Foundation/Foundation.h>\n#import \"BTCUnitsAndLimits.h\"\n\ntypedef NS_ENUM(NSInteger, BTCCurrencyConverterMode) {\n    /*!\n     * Uses the average exchange rate to convert btc to fiat and back.\n     */\n    BTCCurrencyConverterModeAverage  = 0,\n\n    /*!\n     * Uses the buy rate to convert btc to fiat and back.\n     * Assumes \"buying bitcoins\" mode:\n     * fiat -> btc: \"How much btc will I buy for that much of fiat\"\n     * btc -> fiat: \"How much fiat should I spend to buy that much btc\"\n     */\n    BTCCurrencyConverterModeBuy      = 10,\n\n    /*!\n     * Uses the sell rate to convert btc to fiat and back.\n     * Assumes \"sell bitcoins\" mode:\n     * fiat -> btc: \"How much btc should I sell to get this much fiat\"\n     * btc -> fiat: \"How much fiat will I buy for that much of btc\"\n     */\n    BTCCurrencyConverterModeSell     = 20,\n\n    /*!\n     * Instead of using simple buy rate, \"eats\" through order book asks.\n     */\n    BTCCurrencyConverterModeBuyOrderBook = 11,\n\n    /*!\n     * Instead of using simple sell rate, \"eats\" through order book bids.\n     */\n    BTCCurrencyConverterModeSellOrderBook = 21,\n};\n\n/*!\n Currency converter allows converting according currency using various modes and sources.\n */\n@interface BTCCurrencyConverter : NSObject<NSCopying>\n\n/*!\n * Conversion mode. Depending on your needs (selling or buying bitcoin) you may set various modes.\n * Default is BTCCurrencyConverterModeAverage.\n */\n@property(nonatomic) BTCCurrencyConverterMode mode;\n\n/*!\n * Average rate. When set, overwrites buy and sell rates.\n */\n@property(nonatomic) NSDecimalNumber* averageRate;\n\n/*!\n * Buy exchange rate (price for 1 BTC when you buy BTC).\n * When set, recomputes average exchange rate using sell rate.\n * If sell rate is nil, it is set to buy rate.\n */\n@property(nonatomic) NSDecimalNumber* buyRate;\n\n/*!\n * Sell exchange rate (price for 1 BTC when you sell BTC).\n * When set, recomputes average exchange rate using buy rate.\n * If buy rate is nil, it is set to sell rate.\n */\n@property(nonatomic) NSDecimalNumber* sellRate;\n\n/*!\n * List of @[ NSNumber price-per-btc, NSNumber btcs ] pairs for order book asks.\n * When set, updates buyRate to the lowest price.\n */\n@property(nonatomic) NSArray* asks;\n\n/*!\n * List of @[ NSNumber price-per-btc, NSNumber btcs ] pairs for order book bids.\n * When set, updates sellRate to the highest price.\n */\n@property(nonatomic) NSArray* bids;\n\n/*!\n * Date of last update. It is set automatically when exchange rates are updated,\n * but you can set it manually afterwards.\n */\n@property(nonatomic) NSDate* date;\n\n/*!\n * Code of the fiat currency in which prices are expressed.\n */\n@property(nonatomic) NSString* currencyCode;\n\n/*!\n * Code of the fiat currency used by exchange natively.\n * Typically, it is the same as `currencyCode`, but may differ if,\n * for instance, prices are expressed in USD, but exchange operates in EUR.\n */\n@property(nonatomic) NSString* nativeCurrencyCode;\n\n/*!\n * Name of the exchange/market that provides this exchange rate.\n * Deprecated. Use sourceName instead.\n */\n@property(nonatomic) NSString* marketName DEPRECATED_ATTRIBUTE;\n\n/*!\n * Name of the exchange market or price index that provides this exchange rate.\n */\n@property(nonatomic) NSString* sourceName;\n\n/*!\n * Serializes state into a plist/json dictionary.\n */\n@property(nonatomic, readonly) NSDictionary* dictionary;\n\n/*!\n * Serializes state into a plist/json dictionary.\n */\n- (id) initWithDictionary:(NSDictionary*)dict;\n\n/*!\n * Converts fiat amount to bitcoin amount in satoshis using specified mode.\n */\n- (BTCAmount) bitcoinFromFiat:(NSDecimalNumber*)fiatAmount;\n\n/*!\n * Converts bitcoin amount to fiat amount using specified mode.\n */\n- (NSDecimalNumber*) fiatFromBitcoin:(BTCAmount)satoshis;\n\n\n@end\n"
  },
  {
    "path": "Pods/CoreBitcoin/CoreBitcoin/BTCCurrencyConverter.m",
    "content": "#import \"BTCCurrencyConverter.h\"\n#import \"BTCNumberFormatter.h\"\n\n@implementation BTCCurrencyConverter\n\n- (id) init {\n    if (self = [super init]) {\n        _mode = BTCCurrencyConverterModeAverage;\n    }\n    return self;\n}\n\n- (id) initWithDictionary:(NSDictionary *)dict {\n    if (!dict) return nil;\n\n    if (self = [self init]) {\n        if (dict[@\"mode\"])     _mode = [dict[@\"mode\"] unsignedIntegerValue];\n        if (dict[@\"currency\"]) _currencyCode = dict[@\"currency\"];\n        if (dict[@\"mkt\"])      _sourceName = dict[@\"mkt\"];\n        if (dict[@\"t\"])        _date = [NSDate dateWithTimeIntervalSince1970:[dict[@\"t\"] doubleValue]];\n        if (dict[@\"avg\"])      _averageRate = [NSDecimalNumber decimalNumberWithString:dict[@\"avg\"]];\n        if (dict[@\"buy\"])      _buyRate = [NSDecimalNumber decimalNumberWithString:dict[@\"buy\"]];\n        if (dict[@\"sell\"])     _buyRate = [NSDecimalNumber decimalNumberWithString:dict[@\"sell\"]];\n\n        // TODO: parse asks and bids.\n    }\n    return self;\n}\n\n- (NSDictionary*) dictionary {\n    NSMutableDictionary* dict = [NSMutableDictionary dictionary];\n\n    if (_mode)         dict[@\"mode\"] = @(_mode);\n    if (_currencyCode) dict[@\"currency\"] = _currencyCode;\n    if (_sourceName)   dict[@\"mkt\"] = _sourceName;\n    if (_date)         dict[@\"t\"] = @(_date.timeIntervalSince1970);\n    if (_averageRate)  dict[@\"avg\"] = _averageRate.stringValue;\n    if (_buyRate)      dict[@\"buy\"] = _buyRate.stringValue;\n    if (_sellRate)     dict[@\"sell\"] = _sellRate.stringValue;\n    if (_asks)         dict[@\"asks\"] = [self encodeTuples:_asks];\n    if (_bids)         dict[@\"bids\"] = [self encodeTuples:_bids];\n    return dict;\n}\n\n- (NSArray*) encodeTuples:(NSArray*)tuples {\n    NSMutableArray* arr = [NSMutableArray array];\n\n    for (NSArray* tuple in tuples) {\n        [arr addObject:@[ [tuple[0] stringValue], [tuple[1] stringValue] ]];\n    }\n\n    return arr;\n}\n\n- (void) setMarketName:(NSString *)marketName {\n    self.sourceName = marketName;\n}\n\n- (NSString*) marketName {\n    return self.sourceName;\n}\n\n- (void) setAverageRate:(NSDecimalNumber *)averageRate {\n    _averageRate = averageRate;\n    _buyRate = averageRate;\n    _sellRate = averageRate;\n    _bids = nil;\n    _asks = nil;\n    _date = [NSDate date];\n}\n\n- (void) setBuyRate:(NSDecimalNumber *)buyRate {\n    _buyRate = buyRate;\n    _sellRate = _sellRate ?: buyRate;\n    _averageRate = [[_sellRate decimalNumberByAdding:_buyRate] decimalNumberByMultiplyingBy:[NSDecimalNumber decimalNumberWithMantissa:5 exponent:-1 isNegative:NO]];\n    _bids = nil;\n    _asks = nil;\n    _date = [NSDate date];\n}\n\n- (void) setSellRate:(NSDecimalNumber *)sellRate {\n    _buyRate = _buyRate ?: sellRate;\n    _sellRate = sellRate;\n    _averageRate = [[_sellRate decimalNumberByAdding:_buyRate] decimalNumberByMultiplyingBy:[NSDecimalNumber decimalNumberWithMantissa:5 exponent:-1 isNegative:NO]];\n    _bids = nil;\n    _asks = nil;\n    _date = [NSDate date];\n}\n\n- (void) setAsks:(NSArray *)asks {\n    if (!asks || asks.count == 0) {\n        _asks = nil;\n        return;\n    }\n\n    // TODO: sort in ascending order\n    // TODO: get the lowest value as a buy rate.\n\n    _asks = asks;\n}\n\n- (void) setBids:(NSArray *)bids {\n    if (!bids || bids.count == 0) {\n        _bids = nil;\n        return;\n    }\n    // TODO: sort in descending order\n    // TODO: get the highest value as a sell rate.\n\n    _bids = bids;\n}\n\n\n- (BTCAmount) bitcoinFromFiat:(NSDecimalNumber*)fiatAmount {\n    switch (_mode) {\n        case BTCCurrencyConverterModeAverage:\n            if ([self isZero:_averageRate]) return 0;\n            return BTCAmountFromDecimalNumber([[fiatAmount decimalNumberByDividingBy:_averageRate] decimalNumberByMultiplyingByPowerOf10:8]);\n\n        case BTCCurrencyConverterModeBuy:\n            if ([self isZero:_buyRate]) return 0;\n            return BTCAmountFromDecimalNumber([[fiatAmount decimalNumberByDividingBy:_buyRate] decimalNumberByMultiplyingByPowerOf10:8]);\n\n        case BTCCurrencyConverterModeSell:\n            if ([self isZero:_sellRate]) return 0;\n            return BTCAmountFromDecimalNumber([[fiatAmount decimalNumberByDividingBy:_sellRate] decimalNumberByMultiplyingByPowerOf10:8]);\n\n            // TODO: add order book modes\n\n        default:\n            [[NSException exceptionWithName:@\"BTCCurrencyConverter Not supported Mode\" reason:@\"This mode is not supported yet\" userInfo:nil] raise];\n            break;\n    }\n\n    return 0;\n}\n\n- (NSDecimalNumber*) fiatFromBitcoin:(BTCAmount)satoshis {\n    switch (_mode) {\n        case BTCCurrencyConverterModeAverage:\n            if ([self isZero:_averageRate]) return nil;\n            return [[NSDecimalNumber decimalNumberWithMantissa:ABS(satoshis) exponent:-8 isNegative:satoshis < 0] decimalNumberByMultiplyingBy:_averageRate];\n\n        case BTCCurrencyConverterModeBuy:\n            if ([self isZero:_buyRate]) return nil;\n            return [[NSDecimalNumber decimalNumberWithMantissa:ABS(satoshis) exponent:-8 isNegative:satoshis < 0] decimalNumberByMultiplyingBy:_buyRate];\n\n        case BTCCurrencyConverterModeSell:\n            if ([self isZero:_sellRate]) return nil;\n            return [[NSDecimalNumber decimalNumberWithMantissa:ABS(satoshis) exponent:-8 isNegative:satoshis < 0] decimalNumberByMultiplyingBy:_sellRate];\n\n            // TODO: add order book modes\n\n        default:\n            [[NSException exceptionWithName:@\"BTCCurrencyConverter Not supported Mode\" reason:@\"This mode is not supported yet\" userInfo:nil] raise];\n    }\n\n    return nil;\n}\n\n- (BOOL) isZero:(NSDecimalNumber*)dn {\n    if (!dn) return YES;\n    if ([dn isEqual:[NSDecimalNumber zero]]) return YES;\n    return NO;\n}\n\n- (id) copyWithZone:(NSZone *)zone {\n    return [[BTCCurrencyConverter alloc] initWithDictionary:self.dictionary];\n}\n\n\n@end\n"
  },
  {
    "path": "Pods/CoreBitcoin/CoreBitcoin/BTCCurvePoint.h",
    "content": "// CoreBitcoin by Oleg Andreev <oleganza@gmail.com>, WTFPL.\n\n#import <Foundation/Foundation.h>\n#include <openssl/ec.h>\n\n// Represents a point on the elliptic curve secp256k1.\n// Combined with BTCBigNumber arithmetic, you can do usual EC operations to manipulate private and public keys.\n// Private key is a big integer (represented by raw NSData or BTCBigNumber).\n// Public key is a point on the curve represented by BTCCurvePoint or BTCKey.\n// BTCCurvePoint is mutable. There is no immutable counterpart.\n@class BTCKey;\n@class BTCBigNumber;\n@interface BTCCurvePoint : NSObject <NSCopying>\n\n// Serialized form of a curve point as a compressed public key (32-byte X coordinate with 1-byte prefix)\n@property(nonatomic, readonly) NSData* data;\n\n// Underlying data structure in OpenSSL.\n@property(nonatomic, readonly) const EC_POINT* EC_POINT;\n\n// Returns YES if the point is at infinity.\n@property(nonatomic, readonly) BOOL isInfinity;\n\n// Coordinates of the point\n@property(nonatomic, readonly) BTCBigNumber* x;\n@property(nonatomic, readonly) BTCBigNumber* y;\n\n// Returns the generator point. Same as [BTCCurvePoint alloc] init].\n+ (instancetype) generator;\n\n// Returns order of the secp256k1 curve (FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141).\n+ (BTCBigNumber*) curveOrder;\n\n// Initializes point with its binary representation (corresponds to -data).\n- (id) initWithData:(NSData*)data;\n\n// Initializes point with OpenSSL EC_POINT.\n- (id) initWithEC_POINT:(const EC_POINT*)ecpoint;\n\n// These modify the receiver and return self (or nil in case of error). To create another point use -copy: [[point copy] multiply:number]\n- (instancetype) multiply:(BTCBigNumber*)number;\n- (instancetype) add:(BTCCurvePoint*)point;\n\n// Efficiently adds n*G to the receiver. Equivalent to [point add:[[G copy] multiply:number]]\n- (instancetype) addGeneratorMultipliedBy:(BTCBigNumber*)number;\n\n// Re-declared `-copy` to provide exact return type.\n- (BTCCurvePoint*) copy;\n\n// Clears internal point data.\n- (void) clear;\n\n\n\n@end\n"
  },
  {
    "path": "Pods/CoreBitcoin/CoreBitcoin/BTCCurvePoint.m",
    "content": "// Oleg Andreev <oleganza@gmail.com>\n\n#import \"BTCCurvePoint.h\"\n#import \"BTCKey.h\"\n#import \"BTCData.h\"\n#import \"BTCBigNumber.h\"\n#include <openssl/bn.h>\n#include <openssl/ecdsa.h>\n#include <openssl/evp.h>\n\n@implementation BTCCurvePoint {\n    EC_GROUP* _group;\n    EC_POINT* _point;\n    BN_CTX*   _bnctx;\n}\n\n- (void) dealloc {\n    if (_point) EC_POINT_clear_free(_point);\n    _point = NULL;\n    \n    if (_group) EC_GROUP_free(_group);\n    _group = NULL;\n    \n    if (_bnctx) BN_CTX_free(_bnctx);\n    _bnctx = NULL;\n}\n\n+ (instancetype) generator {\n    return [[self alloc] init];\n}\n\n+ (BTCBigNumber*) curveOrder {\n    static BTCBigNumber* order;\n    static dispatch_once_t onceToken;\n    dispatch_once(&onceToken, ^{\n        order = [[BTCBigNumber alloc] initWithUnsignedBigEndian:BTCDataWithHexCString(\"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141\")];\n    });\n    return order;\n}\n\n- (id) initEmpty {\n    if (self = [super init]) {\n        _group = NULL;\n        _point = NULL;\n        _bnctx   = NULL;\n        \n        _group = EC_GROUP_new_by_curve_name(NID_secp256k1);\n        if (!_group) {\n            NSLog(@\"BTCCurvePoint: EC_GROUP_new_by_curve_name(NID_secp256k1) failed\");\n            goto finish;\n        }\n        \n        _point = EC_POINT_new(_group);\n        if (!_point) {\n            NSLog(@\"BTCCurvePoint: EC_POINT_new(_group) failed\");\n            goto finish;\n        }\n        \n        _bnctx = BN_CTX_new();\n        if (!_bnctx) {\n            NSLog(@\"BTCCurvePoint: BN_CTX_new() failed\");\n            goto finish;\n        }\n        \n        return self;\n        \n    finish:\n        if (_group) EC_GROUP_free(_group);\n        if (_point) EC_POINT_clear_free(_point);\n        \n        return nil;\n    }\n    return self;\n}\n\n- (id) init {\n    if (self = [self initEmpty]) {\n        if (!EC_POINT_copy(_point, EC_GROUP_get0_generator(_group))) {\n            return nil;\n        }\n    }\n    return self;\n}\n\n// Initializes point with its binary representation (corresponds to -data).\n- (id) initWithData:(NSData*)data {\n    if (self = [self initEmpty]) {\n        \n        BIGNUM* bn = BN_bin2bn(data.bytes, (int)data.length, NULL);\n        if (!bn) {\n            return nil;\n        }\n        \n        if (!EC_POINT_bn2point(_group, bn, _point, _bnctx)) {\n            if (bn) BN_clear_free(bn);\n            return nil;\n        }\n        \n        // Point is imported, only need to cleanup an intermediate BIGNUM structure.\n        if (bn) BN_clear_free(bn);\n    }\n    return self;\n}\n\n// Initializes point with OpenSSL\n- (id) initWithEC_POINT:(const EC_POINT*)ecpoint {\n    if (self = [self initEmpty]) {\n        if (!EC_POINT_copy(_point, ecpoint)) {\n            return nil;\n        }\n    }\n    return self;\n}\n\n- (NSData*) data {\n    NSMutableData* data = [NSMutableData dataWithLength:33];\n    \n    BIGNUM* bn = BN_new();\n    \n    if (!bn) {\n        return nil;\n    }\n    \n    if (!EC_POINT_point2bn(_group, _point, POINT_CONVERSION_COMPRESSED, bn, _bnctx)) {\n        if (bn) BN_clear_free(bn);\n        return nil;\n    }\n    \n    NSAssert(BN_num_bytes(bn) == 33, @\"compressed point must be 33 bytes long\");\n    \n    BN_bn2bin(bn, data.mutableBytes);\n    \n    if (bn) BN_clear_free(bn);\n    \n    return data;\n}\n\n- (const EC_POINT*) EC_POINT {\n    return _point;\n}\n\n// These modify the receiver. To create another point use -copy: [[point copy] multiply:number]\n- (instancetype) multiply:(BTCBigNumber*)number {\n    if (!number) return nil;\n    \n    if (!EC_POINT_mul(_group, _point, NULL, _point, number.BIGNUM, _bnctx)) {\n        return nil;\n    }\n    return self;\n}\n\n- (instancetype) add:(BTCCurvePoint*)otherPoint {\n    if (!otherPoint) return nil;\n    \n    if (!EC_POINT_add(_group, _point, _point, otherPoint.EC_POINT, _bnctx)) {\n        return nil;\n    }\n    return self;\n}\n\n// Efficiently adds n*G to the receiver. Equivalent to [point add:[[G copy] multiply:number]]\n- (instancetype) addGeneratorMultipliedBy:(BTCBigNumber*)number {\n    if (!number) return nil;\n    \n    if (!EC_POINT_mul(_group, _point, number.BIGNUM, _point, BN_value_one(), _bnctx)) {\n        return nil;\n    }\n    \n    return self;\n}\n\n- (BOOL) isInfinity {\n    return 1 == EC_POINT_is_at_infinity(_group, _point);\n}\n\n- (BTCBigNumber*) x {\n    BN_CTX_start(_bnctx);\n    BIGNUM* bn = BN_CTX_get(_bnctx);\n    if (!EC_POINT_get_affine_coordinates_GFp(_group, _point, bn /* x */, NULL  /* y */, _bnctx)) {\n        BN_CTX_end(_bnctx);\n        return nil;\n    }\n    BTCBigNumber* result = [[BTCBigNumber alloc] initWithBIGNUM:bn];\n    BN_CTX_end(_bnctx);\n    return result;\n}\n\n- (BTCBigNumber*) y {\n    BN_CTX_start(_bnctx);\n    BIGNUM* bn = BN_CTX_get(_bnctx);\n    if (!EC_POINT_get_affine_coordinates_GFp(_group, _point, NULL /* x */, bn  /* y */, _bnctx)) {\n        BN_CTX_end(_bnctx);\n        return nil;\n    }\n    BTCBigNumber* result = [[BTCBigNumber alloc] initWithBIGNUM:bn];\n    BN_CTX_end(_bnctx);\n    return result;\n}\n\n// Clears internal point data.\n- (void) clear {\n    if (_point) EC_POINT_clear_free(_point);\n    _point = NULL;\n}\n\n\n\n#pragma mark - NSObject & NSCopying\n\n\n// Re-declared copy to provide exact return type.\n- (BTCCurvePoint*) copy {\n    return [self copyWithZone:nil];\n}\n\n- (id) copyWithZone:(NSZone *)zone {\n    return [[BTCCurvePoint alloc] initWithEC_POINT:_point];\n}\n\n- (BOOL) isEqual:(BTCCurvePoint*)otherPoint {\n    if (![otherPoint isKindOfClass:[self class]]) return NO;\n    return 0 == EC_POINT_cmp(_group, _point, otherPoint.EC_POINT, _bnctx);\n}\n\n- (NSUInteger) hash {\n    return self.data.hash;\n}\n\n- (NSString*) description {\n    return [NSString stringWithFormat:@\"<BTCCurvePoint:0x%p %@>\", self, BTCHexFromData(self.data)];\n}\n\n\n@end\n"
  },
  {
    "path": "Pods/CoreBitcoin/CoreBitcoin/BTCData.h",
    "content": "// CoreBitcoin by Oleg Andreev <oleganza@gmail.com>, WTFPL.\n\n#import <Foundation/Foundation.h>\n\n// Change to 0 to disable code that requires OpenSSL (if you need some of these routines in your own project and you don't need OpenSSL)\n#define BTCDataRequiresOpenSSL 1\n\n// Securely overwrites memory buffer with a specified character.\nvoid *BTCSecureMemset(void *v, unsigned char c, size_t n);\n\n// Securely overwrites string with zeros.\nvoid BTCSecureClearCString(char *s);\n\n// Returns data with securely random bytes of the specified length. Uses /dev/random.\nNSMutableData* BTCRandomDataWithLength(NSUInteger length);\n\n// Returns random string with securely random bytes of the specified length. Uses /dev/random.\n// Caller should use free() to release the memory occupied by the buffer.\nvoid *BTCCreateRandomBytesOfLength(size_t length);\n\n// Returns data produced by flipping the coin as proposed by Dan Kaminsky:\n// https://gist.github.com/PaulCapestany/6148566\nNSData* BTCCoinFlipDataWithLength(NSUInteger length);\n\n// Creates data with zero-terminated string in UTF-8 encoding.\nNSData* BTCDataWithUTF8CString(const char* utf8cstring);\nNSData* BTCDataWithUTF8String(const char* utf8string) DEPRECATED_ATTRIBUTE; // will repurpose for NSString later.\n\n// Init with hex string (lower- or uppercase, with optional 0x prefix)\nNSData* BTCDataFromHex(NSString* hex);\nNSData* BTCDataWithHexString(NSString* hexString) DEPRECATED_ATTRIBUTE;\n\n// Init with zero-terminated hex string (lower- or uppercase, with optional 0x prefix)\nNSData* BTCDataWithHexCString(const char* hexString);\n\n// Converts data to a hex string\nNSString* BTCHexFromData(NSData* data);\nNSString* BTCUppercaseHexFromData(NSData* data); // more efficient than calling -uppercaseString on a lower-case result.\n\n// Deprecated. Use BTCHexFromData and BTCUppercaseHexFromData instead.\nNSString* BTCHexStringFromData(NSData* data) DEPRECATED_ATTRIBUTE;\nNSString* BTCUppercaseHexStringFromData(NSData* data) DEPRECATED_ATTRIBUTE;\n\n// Returns a copy of data with reversed byte order.\n// This is useful in Bitcoin: things get reversed here and there all the time.\nNSData* BTCReversedData(NSData* data);\n\n// Returns a reversed mutable copy so you wouldn't need to make another mutable copy from -reversedData\nNSMutableData* BTCReversedMutableData(NSData* data);\n\n// Reverses byte order in the internal buffer of mutable data object.\nvoid BTCDataReverse(NSMutableData* data);\n\n// If NSData is NSMutableData clears contents of the data to prevent leaks through swapping or buffer-overflow attacks. Returns YES.\n// If NSData is actually an immutable data, does nothing and returns NO.\nBOOL BTCDataClear(NSData* data);\n\n// Returns a subdata with a given range.\n// If range is invalid, returns nil.\nNSMutableData* BTCDataRange(NSData* data, NSRange range);\n\n// Core hash functions that we need.\n// If the argument is nil, returns nil.\nNSMutableData* BTCSHA1(NSData* data);\nNSMutableData* BTCSHA256(NSData* data);\nNSMutableData* BTCSHA512(NSData* data);\nNSMutableData* BTCSHA256Concat(NSData* data1, NSData* data2); // SHA256(data1 || data2)\nNSMutableData* BTCHash256(NSData* data); // == SHA256(SHA256(data)) (aka Hash() in BitcoinQT)\nNSMutableData* BTCHash256Concat(NSData* data1, NSData* data2);  // SHA256(SHA256(data1 || data2))\n\n// Standard HMAC-SHA256 and HMAC-SHA512 functions.\nNSMutableData* BTCHMACSHA256(NSData* key, NSData* data);\nNSMutableData* BTCHMACSHA512(NSData* key, NSData* data);\n\n#if BTCDataRequiresOpenSSL\n// RIPEMD160 today is provided only by OpenSSL. SHA1 and SHA2 are provided by CommonCrypto framework.\nNSMutableData* BTCRIPEMD160(NSData* data);\nNSMutableData* BTCHash160(NSData* data); // == RIPEMD160(SHA256(data)) (aka Hash160 in BitcoinQT)\n#endif\n\n// 160-bit zero string\nNSMutableData* BTCZero160();\n\n// 256-bit zero string\nNSMutableData* BTCZero256();\n\n// Pointer to a static array of zeros (256 bits long).\nconst unsigned char* BTCZeroString256();\n\n\n// Hashes input with salt using specified number of rounds and the minimum amount of memory (rounded up to a whole number of 256-bit blocks).\n// Actual number of hash function computations is a number of rounds multiplied by a number of 256-bit blocks.\n// So rounds=1 for 256 Mb of memory would mean 8M hash function calculations (8M blocks by 32 bytes to form 256 Mb total).\n// Uses SHA256 as an internal hash function.\n// Password and salt are hashed before being placed in the first block.\n// The whole memory region is hashed after all rounds to generate the result.\n// Based on proposal by Sergio Demian Lerner http://bitslog.files.wordpress.com/2013/12/memohash-v0-3.pdf\n// Returns a mutable data, so you can cleanup the memory when needed.\nNSMutableData* BTCMemoryHardKDF256(NSData* password, NSData* salt, unsigned int rounds, unsigned int numberOfBytes);\n\n\n// Hashes input with salt using specified number of rounds and the minimum amount of memory (rounded up to a whole number of 128-bit blocks)\nNSMutableData* BTCMemoryHardAESKDF(NSData* password, NSData* salt, unsigned int rounds, unsigned int numberOfBytes);\n\n// Probabilistic memory-hard KDF with 256-bit output and only one difficulty parameter - amount of memory.\n// Actual amount of memory is rounded to a whole number of 256-bit blocks.\n// Uses SHA512 as internal hash function.\n// Computational time is proportional to amount of memory.\n// Brutefore with half the memory raises amount of hash computations quadratically.\nNSMutableData* BTCLocustKDF128(NSData* password, NSData* salt, unsigned int numberOfBytes);\nNSMutableData* BTCLocustKDF160(NSData* password, NSData* salt, unsigned int numberOfBytes);\nNSMutableData* BTCLocustKDF256(NSData* password, NSData* salt, unsigned int numberOfBytes);\nNSMutableData* BTCLocustKDF512(NSData* password, NSData* salt, unsigned int numberOfBytes);\n\n// Makes arbitrary-length output.\nNSMutableData* BTCLocustKDF(NSData* password, NSData* salt, unsigned int numberOfBytes, unsigned int outputLength);\n"
  },
  {
    "path": "Pods/CoreBitcoin/CoreBitcoin/BTCData.m",
    "content": "// Oleg Andreev <oleganza@gmail.com>\n\n#import \"BTCData.h\"\n#import <CommonCrypto/CommonCrypto.h>\n#if BTCDataRequiresOpenSSL\n#include <openssl/ripemd.h>\n#include <openssl/evp.h>\n#endif\n\nstatic const unsigned char _BTCZeroString256[32] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};\n\n// This is designed to be not optimized out by compiler like memset\nvoid *BTCSecureMemset(void *v, unsigned char c, size_t n) {\n    if (!v) return v;\n    volatile unsigned char *p = v;\n    while (n--)\n        *p++ = c;\n    \n    return v;\n}\n\nvoid BTCSecureClearCString(char *s) {\n    if (!s) return;\n    BTCSecureMemset(s, 0, strlen(s));\n}\n\nvoid *BTCCreateRandomBytesOfLength(size_t length) {\n    FILE *fp = fopen(\"/dev/random\", \"r\");\n    if (!fp)\n    {\n        NSLog(@\"NSData+BTC: cannot fopen /dev/random\");\n        exit(-1);\n        return NULL;\n    }\n    char* bytes = (char*)malloc(length);\n    for (int i = 0; i < length; i++)\n    {\n        char c = fgetc(fp);\n        bytes[i] = c;\n    }\n    \n    fclose(fp);\n    return bytes;\n}\n\n// Returns data with securely random bytes of the specified length. Uses /dev/random.\nNSMutableData* BTCRandomDataWithLength(NSUInteger length) {\n    void *bytes = BTCCreateRandomBytesOfLength(length);\n    if (!bytes) return nil;\n    return [[NSMutableData alloc] initWithBytesNoCopy:bytes length:length];\n}\n\n// Returns data produced by flipping the coin as proposed by Dan Kaminsky:\n// https://gist.github.com/PaulCapestany/6148566\n\nstatic inline int BTCCoinFlip() {\n    __block int n = 0;\n    //int c = 0;\n    dispatch_time_t then = dispatch_time(DISPATCH_TIME_NOW, 999000ull);\n\n    // We need to increase variance of number of flips, so we force system to schedule some threads\n    dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_LOW, 0), ^{\n        while (dispatch_time(DISPATCH_TIME_NOW, 0) <= then) {\n            n = !n;\n        }\n    });\n    dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{\n        while (dispatch_time(DISPATCH_TIME_NOW, 0) <= then) {\n            n = !n;\n        }\n    });\n    dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_HIGH, 0), ^{\n        while (dispatch_time(DISPATCH_TIME_NOW, 0) <= then) {\n            n = !n;\n        }\n    });\n\n    while (dispatch_time(DISPATCH_TIME_NOW, 0) <= then) {\n        //c++;\n        n = !n; // flipping the coin\n    }\n    //NSLog(@\"Flips: %d\", c);\n    return n;\n}\n\n// Simple Von Neumann debiasing - throwing away two flips that return the same value.\nstatic inline int BTCFairCoinFlip() {\n    while(1) {\n        int a = BTCCoinFlip();\n        if (a != BTCCoinFlip()) {\n            return a;\n        }\n    }\n}\n\nNSData* BTCCoinFlipDataWithLength(NSUInteger length) {\n    NSMutableData* data = [NSMutableData dataWithLength:length];\n    unsigned char* bytes = data.mutableBytes;\n    for (int i = 0; i < length; i++) {\n        unsigned char byte = 0;\n        int bits = 8;\n        while(bits--) {\n            byte <<= 1;\n            byte |= BTCFairCoinFlip();\n        }\n        bytes[i] = byte;\n    }\n    return data;\n}\n\nNSData* BTCDataWithUTF8String(const char* utf8string) { // deprecated\n    return BTCDataWithUTF8CString(utf8string);\n}\n\n// Creates data with zero-terminated string in UTF-8 encoding.\nNSData* BTCDataWithUTF8CString(const char* utf8string) {\n    return [[NSData alloc] initWithBytes:utf8string length:strlen(utf8string)];\n}\n\nNSData* BTCDataWithHexString(NSString* hexString) { // deprecated\n    return BTCDataFromHex(hexString);\n}\n\n// Init with hex string (lower- or uppercase, with optional 0x prefix)\nNSData* BTCDataFromHex(NSString* hexString) {\n    return BTCDataWithHexCString([hexString cStringUsingEncoding:NSASCIIStringEncoding]);\n}\n\n// Init with zero-terminated hex string (lower- or uppercase, with optional 0x prefix)\nNSData* BTCDataWithHexCString(const char* hexCString) {\n    if (hexCString == NULL) return nil;\n    \n    const unsigned char *psz = (const unsigned char*)hexCString;\n    \n    while (isspace(*psz)) psz++;\n    \n    // Skip optional 0x prefix\n    if (psz[0] == '0' && tolower(psz[1]) == 'x') psz += 2;\n        \n        while (isspace(*psz)) psz++;\n    \n    size_t len = strlen((const char*)psz);\n    \n    // If the string is not full number of bytes (each byte 2 hex characters), return nil.\n    if (len % 2 != 0) return nil;\n    \n    unsigned char* buf = (unsigned char*)malloc(len/2);\n    \n    static const signed char digits[256] = {\n        -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,\n        -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,\n        -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,\n         0,  1,  2,  3,  4,  5,  6,  7,  8,  9, -1, -1, -1, -1, -1, -1,\n        -1,0xa,0xb,0xc,0xd,0xe,0xf, -1, -1, -1, -1, -1, -1, -1, -1, -1,\n        -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,\n        -1,0xa,0xb,0xc,0xd,0xe,0xf, -1, -1, -1, -1, -1, -1, -1, -1, -1,\n        -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,\n        -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,\n        -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,\n        -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,\n        -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,\n        -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,\n        -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,\n        -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,\n        -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1\n    };\n    \n    unsigned char* bufpointer = buf;\n    \n    while (1) {\n        unsigned char c1 = (unsigned char)*psz++;\n        signed char n1 = digits[c1];\n        if (n1 == (signed char)-1) break; // break when null-terminator is hit\n        \n        unsigned char c2 = (unsigned char)*psz++;\n        signed char n2 = digits[c2];\n        if (n2 == (signed char)-1) break; // break when null-terminator is hit\n        \n        *bufpointer = (unsigned char)((n1 << 4) | n2);\n        bufpointer++;\n    }\n    \n    return [[NSData alloc] initWithBytesNoCopy:buf length:len/2];\n}\n\n\nNSString* BTCHexFromDataWithFormat(NSData* data, const char* format) {\n    if (!data) return nil;\n    \n    NSUInteger length = data.length;\n    if (length == 0) return @\"\";\n    \n    NSMutableData* resultdata = [NSMutableData dataWithLength:length * 2];\n    char *dest = resultdata.mutableBytes;\n    unsigned const char *src = data.bytes;\n    for (int i = 0; i < length; ++i) {\n        sprintf(dest + i*2, format, (unsigned int)(src[i]));\n    }\n    return [[NSString alloc] initWithData:resultdata encoding:NSASCIIStringEncoding];\n}\n\nNSString* BTCHexStringFromData(NSData* data) { // deprecated\n    return BTCHexFromDataWithFormat(data, \"%02x\");\n}\n\nNSString* BTCUppercaseHexStringFromData(NSData* data) { // deprecated\n    return BTCHexFromDataWithFormat(data, \"%02X\");\n}\n\nNSString* BTCHexFromData(NSData* data) {\n    return BTCHexFromDataWithFormat(data, \"%02x\");\n}\n\nNSString* BTCUppercaseHexFromData(NSData* data) {\n    return BTCHexFromDataWithFormat(data, \"%02X\");\n}\n\n\nNSData* BTCReversedData(NSData* data) {\n    return BTCReversedMutableData(data);\n}\n\nNSMutableData* BTCReversedMutableData(NSData* data) {\n    if (!data) return nil;\n    NSMutableData* md = [NSMutableData dataWithData:data];\n    BTCDataReverse(md);\n    return md;\n}\n\nvoid BTCReverseBytesLength(void* bytes, NSUInteger length) {\n    // K&R\n    if (length <= 1) return;\n    unsigned char* buf = bytes;\n    unsigned char byte;\n    NSUInteger i, j;\n    for (i = 0, j = length - 1; i < j; i++, j--) {\n        byte = buf[i];\n        buf[i] = buf[j];\n        buf[j] = byte;\n    }\n}\n\n// Reverses byte order in the internal buffer of mutable data object.\nvoid BTCDataReverse(NSMutableData* self) {\n    BTCReverseBytesLength(self.mutableBytes, self.length);\n}\n\n// Clears contents of the data to prevent leaks through swapping or buffer-overflow attacks.\nBOOL BTCDataClear(NSData* data) {\n    if ([data isKindOfClass:[NSMutableData class]]) {\n        [(NSMutableData*)data resetBytesInRange:NSMakeRange(0, data.length)];\n        return YES;\n    }\n    return NO;\n}\n\nNSMutableData* BTCDataRange(NSData* data, NSRange range) {\n    NSCAssert(range.location != NSNotFound, @\"range location should be correct\");\n    NSCAssert(range.location + range.length <= data.length, @\"range should be within bounds of data\");\n    \n    if (range.location == NSNotFound) return nil;\n    if (range.length == 0) return [NSMutableData data];\n    if (range.location + range.length > data.length) return nil;\n    \n    return [NSMutableData dataWithBytes:((unsigned char*)data.bytes) + range.location length:range.length];\n}\n\nNSMutableData* BTCSHA1(NSData* data) {\n    if (!data) return nil;\n    unsigned char digest[CC_SHA1_DIGEST_LENGTH];\n\n    __block CC_SHA1_CTX ctx;\n    CC_SHA1_Init(&ctx);\n    [data enumerateByteRangesUsingBlock:^(const void *bytes, NSRange byteRange, BOOL *stop) {\n        CC_SHA1_Update(&ctx, bytes, (CC_LONG)byteRange.length);\n    }];\n    CC_SHA1_Final(digest, &ctx);\n\n    NSMutableData* result = [NSMutableData dataWithBytes:digest length:CC_SHA1_DIGEST_LENGTH];\n    BTCSecureMemset(digest, 0, CC_SHA1_DIGEST_LENGTH);\n    return result;\n}\n\nNSMutableData* BTCSHA256(NSData* data) {\n    if (!data) return nil;\n    unsigned char digest[CC_SHA256_DIGEST_LENGTH];\n\n    __block CC_SHA256_CTX ctx;\n    CC_SHA256_Init(&ctx);\n    [data enumerateByteRangesUsingBlock:^(const void *bytes, NSRange byteRange, BOOL *stop) {\n        CC_SHA256_Update(&ctx, bytes, (CC_LONG)byteRange.length);\n    }];\n    CC_SHA256_Final(digest, &ctx);\n\n    NSMutableData* result = [NSMutableData dataWithBytes:digest length:CC_SHA256_DIGEST_LENGTH];\n    BTCSecureMemset(digest, 0, CC_SHA256_DIGEST_LENGTH);\n    return result;\n}\n\nNSMutableData* BTCSHA512(NSData* data) {\n    if (!data) return nil;\n    unsigned char digest[CC_SHA512_DIGEST_LENGTH];\n\n    __block CC_SHA512_CTX ctx;\n    CC_SHA512_Init(&ctx);\n    [data enumerateByteRangesUsingBlock:^(const void *bytes, NSRange byteRange, BOOL *stop) {\n        CC_SHA512_Update(&ctx, bytes, (CC_LONG)byteRange.length);\n    }];\n    CC_SHA512_Final(digest, &ctx);\n\n    NSMutableData* result = [NSMutableData dataWithBytes:digest length:CC_SHA512_DIGEST_LENGTH];\n    BTCSecureMemset(digest, 0, CC_SHA512_DIGEST_LENGTH);\n    return result;\n}\n\nNSMutableData* BTCSHA256Concat(NSData* data1, NSData* data2) {\n    if (!data1 || !data2) return nil;\n    unsigned char digest[CC_SHA256_DIGEST_LENGTH];\n    \n    __block CC_SHA256_CTX ctx;\n    CC_SHA256_Init(&ctx);\n    [data1 enumerateByteRangesUsingBlock:^(const void *bytes, NSRange byteRange, BOOL *stop) {\n        CC_SHA256_Update(&ctx, bytes, (CC_LONG)byteRange.length);\n    }];\n    [data2 enumerateByteRangesUsingBlock:^(const void *bytes, NSRange byteRange, BOOL *stop) {\n        CC_SHA256_Update(&ctx, bytes, (CC_LONG)byteRange.length);\n    }];\n    CC_SHA256_Final(digest, &ctx);\n    \n    NSMutableData* result = [NSMutableData dataWithBytes:digest length:CC_SHA256_DIGEST_LENGTH];\n    BTCSecureMemset(digest, 0, CC_SHA256_DIGEST_LENGTH);\n    return result;\n}\n\nNSMutableData* BTCHash256(NSData* data) {\n    if (!data) return nil;\n    unsigned char digest1[CC_SHA256_DIGEST_LENGTH];\n    unsigned char digest2[CC_SHA256_DIGEST_LENGTH];\n    __block CC_SHA256_CTX ctx;\n    CC_SHA256_Init(&ctx);\n    [data enumerateByteRangesUsingBlock:^(const void *bytes, NSRange byteRange, BOOL *stop) {\n        CC_SHA256_Update(&ctx, bytes, (CC_LONG)byteRange.length);\n    }];\n    CC_SHA256_Final(digest1, &ctx);\n    CC_SHA256(digest1, CC_SHA256_DIGEST_LENGTH, digest2);\n    NSMutableData* result = [NSMutableData dataWithBytes:digest2 length:CC_SHA256_DIGEST_LENGTH];\n    BTCSecureMemset(digest1, 0, CC_SHA256_DIGEST_LENGTH);\n    BTCSecureMemset(digest2, 0, CC_SHA256_DIGEST_LENGTH);\n    return result;\n}\n\nNSMutableData* BTCHash256Concat(NSData* data1, NSData* data2) {\n    if (!data1 || !data2) return nil;\n    \n    unsigned char digest1[CC_SHA256_DIGEST_LENGTH];\n    unsigned char digest2[CC_SHA256_DIGEST_LENGTH];\n    \n    __block CC_SHA256_CTX ctx;\n    CC_SHA256_Init(&ctx);\n    [data1 enumerateByteRangesUsingBlock:^(const void *bytes, NSRange byteRange, BOOL *stop) {\n        CC_SHA256_Update(&ctx, bytes, (CC_LONG)byteRange.length);\n    }];\n    [data2 enumerateByteRangesUsingBlock:^(const void *bytes, NSRange byteRange, BOOL *stop) {\n        CC_SHA256_Update(&ctx, bytes, (CC_LONG)byteRange.length);\n    }];\n    CC_SHA256_Final(digest1, &ctx);\n    CC_SHA256(digest1, CC_SHA256_DIGEST_LENGTH, digest2);\n    \n    NSMutableData* result = [NSMutableData dataWithBytes:digest2 length:CC_SHA256_DIGEST_LENGTH];\n    BTCSecureMemset(digest1, 0, CC_SHA256_DIGEST_LENGTH);\n    BTCSecureMemset(digest2, 0, CC_SHA256_DIGEST_LENGTH);\n    return result;\n}\n\nNSMutableData* BTCZero160() {\n    return [NSMutableData dataWithBytes:_BTCZeroString256 length:20];\n}\n\nNSMutableData* BTCZero256() {\n    return [NSMutableData dataWithBytes:_BTCZeroString256 length:32];\n}\n\nconst unsigned char* BTCZeroString256() {\n    return _BTCZeroString256;\n}\n\nNSMutableData* BTCHMACSHA256(NSData* key, NSData* data) {\n    if (!key) return nil;\n    if (!data) return nil;\n    unsigned char digest[CC_SHA256_DIGEST_LENGTH];\n    CCHmac(kCCHmacAlgSHA256, key.bytes, key.length, data.bytes, data.length, digest);\n    NSMutableData* result = [NSMutableData dataWithBytes:digest length:CC_SHA256_DIGEST_LENGTH];\n    BTCSecureMemset(digest, 0, CC_SHA256_DIGEST_LENGTH);\n    return result;\n}\n\nNSMutableData* BTCHMACSHA512(NSData* key, NSData* data) {\n    if (!key) return nil;\n    if (!data) return nil;\n    unsigned char digest[CC_SHA512_DIGEST_LENGTH];\n    CCHmac(kCCHmacAlgSHA512, key.bytes, key.length, data.bytes, data.length, digest);\n    NSMutableData* result = [NSMutableData dataWithBytes:digest length:CC_SHA512_DIGEST_LENGTH];\n    BTCSecureMemset(digest, 0, CC_SHA512_DIGEST_LENGTH);\n    return result;\n}\n\n#if BTCDataRequiresOpenSSL\n\nNSMutableData* BTCRIPEMD160(NSData* data) {\n    if (!data) return nil;\n    unsigned char digest[RIPEMD160_DIGEST_LENGTH];\n    __block RIPEMD160_CTX ctx;\n    RIPEMD160_Init(&ctx);\n    [data enumerateByteRangesUsingBlock:^(const void *bytes, NSRange byteRange, BOOL *stop) {\n        RIPEMD160_Update(&ctx, bytes, (size_t)byteRange.length);\n    }];\n    RIPEMD160_Final(digest, &ctx);\n\n    NSMutableData* result = [NSMutableData dataWithBytes:digest length:RIPEMD160_DIGEST_LENGTH];\n    BTCSecureMemset(digest, 0, RIPEMD160_DIGEST_LENGTH);\n    return result;\n}\n\nNSMutableData* BTCHash160(NSData* data) {\n    if (!data) return nil;\n    unsigned char digest1[CC_SHA256_DIGEST_LENGTH];\n    unsigned char digest2[RIPEMD160_DIGEST_LENGTH];\n    __block CC_SHA256_CTX ctx;\n    CC_SHA256_Init(&ctx);\n    [data enumerateByteRangesUsingBlock:^(const void *bytes, NSRange byteRange, BOOL *stop) {\n        CC_SHA256_Update(&ctx, bytes, (CC_LONG)byteRange.length);\n    }];\n    CC_SHA256_Final(digest1, &ctx);\n    RIPEMD160(digest1, CC_SHA256_DIGEST_LENGTH, digest2);\n    \n    NSMutableData* result = [NSMutableData dataWithBytes:digest2 length:RIPEMD160_DIGEST_LENGTH];\n    BTCSecureMemset(digest1, 0, CC_SHA256_DIGEST_LENGTH);\n    BTCSecureMemset(digest2, 0, RIPEMD160_DIGEST_LENGTH);\n    return result;\n}\n\n#endif\n\n\n\n\n// Hashes input with salt using specified number of rounds and the minimum amount of memory (rounded up to a whole number of 256-bit blocks).\n// Actual number of hash function computations is a number of rounds multiplied by a number of 256-bit blocks.\n// So rounds=1 for 256 Mb of memory would mean 8M hash function calculations (8M blocks by 32 byte to form 256 Mb total).\n// Uses SHA256 as an internal hash function.\n// Password and salt are hashed before being placed in the first block.\n// The whole memory region is hashed after all rounds to generate the result.\n// Based on proposal by Sergio Demian Lerner http://bitslog.files.wordpress.com/2013/12/memohash-v0-3.pdf\n// Returns a mutable data, so you can cleanup the memory when needed.\nNSMutableData* BTCMemoryHardKDF256(NSData* password, NSData* salt, unsigned int rounds, unsigned int numberOfBytes) {\n    const unsigned int blockSize = CC_SHA256_DIGEST_LENGTH;\n    \n    // Will be used for intermediate hash computation\n    unsigned char block[blockSize];\n    \n    // Context for computing hashes.\n    CC_SHA256_CTX ctx;\n    \n    // Round up the required memory to integral number of blocks\n    unsigned int numberOfBlocks = numberOfBytes / blockSize;\n    if (numberOfBytes % blockSize) numberOfBlocks++;\n    numberOfBytes = numberOfBlocks * blockSize;\n    \n    // Make sure we have at least 1 round\n    rounds = rounds ? rounds : 1;\n    \n    // Allocate the required memory\n    NSMutableData* space = [NSMutableData dataWithLength:numberOfBytes];\n    unsigned char* spaceBytes = space.mutableBytes;\n    \n    // Hash the password with the salt to produce the initial seed\n    CC_SHA256_Init(&ctx);\n    CC_SHA256_Update(&ctx, password.bytes, (CC_LONG)password.length);\n    CC_SHA256_Update(&ctx, salt.bytes, (CC_LONG)salt.length);\n    CC_SHA256_Final(block, &ctx);\n\n    // Set the seed to the first block\n    memcpy(spaceBytes, block, blockSize);\n    \n    // Produce a chain of hashes to fill the memory with initial data\n    for (unsigned int  i = 1; i < numberOfBlocks; i++) {\n        // Put a hash of the previous block into the next block.\n        CC_SHA256_Init(&ctx);\n        CC_SHA256_Update(&ctx, spaceBytes + (i - 1) * blockSize, blockSize);\n        CC_SHA256_Final(block, &ctx);\n        memcpy(spaceBytes + i * blockSize, block, blockSize);\n    }\n    \n    // Each round consists of hashing the entire space block by block.\n    for (unsigned int r = 0; r < rounds; r++) {\n        // For each block, update it with the hash of the previous block\n        // mixed with the randomly shifted block around the current one.\n        for (unsigned int b = 0; b < numberOfBlocks; b++) {\n            unsigned int prevb = (numberOfBlocks + b - 1) % numberOfBlocks;\n            \n            // Interpret the previous block as an integer to provide some randomness to memory location.\n            // This reduces potential for memory access optimization.\n            // We are simplifying a task here by simply taking first 64 bits instead of full 256 bits.\n            // In theory it may give some room for optimization, but it would be equivalent to a slightly more efficient prediction of the next block,\n            // which does not remove the need to store all blocks in memory anyway.\n            // Also, this optimization would be meaningless if the amount of memory is a power of two. E.g. 16, 32, 64 or 128 Mb.\n            unsigned long long offset = (*((unsigned long long*)(spaceBytes + prevb * blockSize))) % (numberOfBlocks - 1); // (N-1) is taken to exclude prevb block.\n            \n            // Calculate actual index relative to the current block.\n            offset = (b + offset) % numberOfBlocks;\n            \n            // Mix previous block with a random one.\n            CC_SHA256_Init(&ctx);\n            CC_SHA256_Update(&ctx, spaceBytes + prevb * blockSize, blockSize); // mix previous block\n            CC_SHA256_Update(&ctx, spaceBytes + offset * blockSize, blockSize); // mix random block around the current one\n            CC_SHA256_Final(block, &ctx);\n            memcpy(spaceBytes + b * blockSize, block, blockSize);\n        }\n    }\n    \n    // Hash the whole space to arrive at a final derived key.\n    CC_SHA256_Init(&ctx);\n    for (unsigned int b = 0; b < numberOfBlocks; b++) {\n        CC_SHA256_Update(&ctx, spaceBytes + b * blockSize, blockSize);\n    }\n    CC_SHA256_Final(block, &ctx);\n    \n    NSMutableData* derivedKey = [NSMutableData dataWithBytes:block length:blockSize];\n    \n    // Clean all the buffers to leave no traces of sensitive data\n    BTCSecureMemset(&ctx, 0, sizeof(ctx));\n    BTCSecureMemset(block, 0, blockSize);\n    BTCSecureMemset(spaceBytes, 0, numberOfBytes);\n    \n    return derivedKey;\n}\n\n\n\n// Hashes input with salt using specified number of rounds and the minimum amount of memory (rounded up to a whole number of 128-bit blocks)\nNSMutableData* BTCMemoryHardAESKDF(NSData* password, NSData* salt, unsigned int rounds, unsigned int numberOfBytes) {\n    // The idea is to use a highly optimized AES implementation in CBC mode to quickly transform a lot of memory.\n    // For the first round, a SHA256(password+salt) is used as AES key and SHA256(key+salt) is used as Initialization Vector (IV).\n    // After each round, last 256 bits of space are hashed with IV to produce new IV for the next round. Key remains the same.\n    // After the final round, last 256 bits are hashed with the AES key to arrive at the resulting key.\n    // This is based on proposal by Sergio Demian Lerner http://bitslog.files.wordpress.com/2013/12/memohash-v0-3.pdf\n    // More specifically, on his SeqMemoHash where he shows that when number of rounds is equal to number of memory blocks,\n    // hash function is strictly memory hard: any less memory than N blocks will make computation impossible.\n    // If less than N number of rounds is used, execution time grows exponentially with number of rounds, thus quickly making memory/time tradeoff\n    // increasingly towards choosing an optimal amount of memory.\n    \n    // 1 round can be optimized to using just one small block of memory for block cipher operation (n = 1).\n    // 2 rounds can reduce memory to 2 blocks, but the 2nd round would need recomputation of the 1st round in parallel (n = 1 + (1 + 1) = 3).\n    // 3 rounds can reduce memory to 3 blocks, but the 3rd round would need recomputation of the 2nd round in parallel (n = 3 + (1 + 3) = 7).\n    // k-th round can reduce memory to k blocks, the k-th round would need recomputation of the (k-1)-th round in parallel (n(k) = n(k-1) + (1 + n(k-1)) = 1 + 2*n(k-1))\n    // Ultimately, k rounds with N blocks of memory would need at minimum k blocks of memory at expense of (2^k - 1) rounds.\n    \n    const unsigned int digestSize = CC_SHA256_DIGEST_LENGTH;\n    const unsigned int blockSize = 128/8;\n\n    // Round up the required memory to integral number of blocks\n    {\n        if (numberOfBytes < digestSize) numberOfBytes = digestSize;\n        unsigned int numberOfBlocks = numberOfBytes / blockSize;\n        if (numberOfBytes % blockSize) numberOfBlocks++;\n        numberOfBytes = numberOfBlocks * blockSize;\n    }\n    \n    // Make sure we have at least 3 rounds (1 round would be equivalent to using just 32 bytes of memory; 2 rounds would become 3 rounds if memory was reduced to 32 bytes)\n    if (rounds < 3) rounds = 3;\n\n    // Will be used for intermediate hash computation\n    unsigned char key[digestSize];\n    unsigned char iv[digestSize];\n\n    // Context for computing hashes.\n    CC_SHA256_CTX ctx;\n    \n    // Allocate the required memory\n    NSMutableData* space = [NSMutableData dataWithLength:numberOfBytes + blockSize]; // extra block for the cipher.\n    unsigned char* spaceBytes = space.mutableBytes;\n    \n    // key = SHA256(password + salt)\n    CC_SHA256_Init(&ctx);\n    CC_SHA256_Update(&ctx, password.bytes, (CC_LONG)password.length);\n    CC_SHA256_Update(&ctx, salt.bytes, (CC_LONG)salt.length);\n    CC_SHA256_Final(key, &ctx);\n    \n    // iv = SHA256(key + salt)\n    CC_SHA256_Init(&ctx);\n    CC_SHA256_Update(&ctx, key, (CC_LONG)digestSize);\n    CC_SHA256_Update(&ctx, salt.bytes, (CC_LONG)salt.length);\n    CC_SHA256_Final(iv, &ctx);\n    \n    // Set the space to 1010101010...\n    memset(spaceBytes, (1 + 4 + 16 + 64), numberOfBytes);\n    \n    // Each round consists of encrypting the entire space using AES-CBC\n    BOOL failed = NO;\n    for (unsigned int r = 0; r < rounds; r++) {\n        // Apple implementation - slightly faster than OpenSSL one.\n        if (1) {\n            size_t dataOutMoved = 0;\n            CCCryptorStatus cryptstatus = CCCrypt(\n                                                  kCCEncrypt,                  // CCOperation op,         /* kCCEncrypt, kCCDecrypt */\n                                                  kCCAlgorithmAES,             // CCAlgorithm alg,        /* kCCAlgorithmAES128, etc. */\n                                                  kCCOptionPKCS7Padding,       // CCOptions options,      /* kCCOptionPKCS7Padding, etc. */\n                                                  key,                         // const void *key,\n                                                  digestSize,                  // size_t keyLength,\n                                                  iv,                          // const void *iv,         /* optional initialization vector */\n                                                  spaceBytes,                  // const void *dataIn,     /* optional per op and alg */\n                                                  numberOfBytes,               // size_t dataInLength,\n                                                  spaceBytes,                  // void *dataOut,          /* data RETURNED here */\n                                                  numberOfBytes + blockSize,   // size_t dataOutAvailable,\n                                                  &dataOutMoved                // size_t *dataOutMoved\n                                                  );\n            \n            if (cryptstatus != kCCSuccess || dataOutMoved != (numberOfBytes + blockSize)) {\n                failed = YES;\n                break;\n            }\n        } else { // OpenSSL implementation\n//            EVP_CIPHER_CTX evpctx;\n//            int outlen1, outlen2;\n//            \n//            EVP_EncryptInit(&evpctx, EVP_aes_256_cbc(), key, iv);\n//            EVP_EncryptUpdate(&evpctx, spaceBytes, &outlen1, spaceBytes, (int)numberOfBytes);\n//            EVP_EncryptFinal(&evpctx, spaceBytes + outlen1, &outlen2);\n//            \n//            if (outlen1 != numberOfBytes || outlen2 != blockSize)\n//            {\n//                failed = YES;\n//                break;\n//            }\n        }\n\n        // iv2 = SHA256(iv1 + tail)\n        CC_SHA256_Init(&ctx);\n        CC_SHA256_Update(&ctx, iv, digestSize); // mix the current IV.\n        CC_SHA256_Update(&ctx, spaceBytes + numberOfBytes - digestSize, digestSize); // mix in last 256 bits.\n        CC_SHA256_Final(iv, &ctx);\n    }\n    \n    NSMutableData* derivedKey = nil;\n    \n    if (!failed) {\n        // derivedKey = SHA256(key + tail)\n        CC_SHA256_Init(&ctx);\n        CC_SHA256_Update(&ctx, key, digestSize); // mix the current key.\n        CC_SHA256_Update(&ctx, spaceBytes + numberOfBytes - digestSize, digestSize); // mix in last 256 bits.\n        CC_SHA256_Final(key, &ctx);\n\n        derivedKey = [NSMutableData dataWithBytes:key length:digestSize];\n    }\n    \n    // Clean all the buffers to leave no traces of sensitive data\n    BTCSecureMemset(&ctx,       0, sizeof(ctx));\n    BTCSecureMemset(key,        0, digestSize);\n    BTCSecureMemset(iv,         0, digestSize);\n    BTCSecureMemset(spaceBytes, 0, numberOfBytes + blockSize);\n    \n    return derivedKey;\n\n}\n\n\n\n\n\n// Probabilistic memory-hard KDF with 256-bit output and only one difficulty parameter - amount of memory.\n// Actual amount of memory is rounded to a whole number of 512-bit blocks.\n// Uses SHA512 as internal hash function.\n// Computational time is proportional to amount of memory.\n// Brutefore with half the memory raises amount of hash computations at least quadratically.\nNSMutableData* BTCLocustKDF(NSData* password, NSData* salt, unsigned int numberOfBytes, unsigned int outputLength) {\n    @autoreleasepool {\n        \n        if (outputLength == 0) return [NSMutableData data];\n        \n        const unsigned maxJumps = 4;\n        const unsigned int blockSize = CC_SHA512_DIGEST_LENGTH;\n        \n        // Round up the required memory to integral number of blocks.\n        // Minimum size is 512 bits.\n        numberOfBytes = (numberOfBytes / blockSize) * blockSize + ((numberOfBytes % blockSize) ? blockSize : 0);\n        if (numberOfBytes < 2*blockSize) numberOfBytes = 2*blockSize;\n        \n        // Cap output to the total space length.\n        outputLength = MIN(numberOfBytes, outputLength);\n        \n        // Context for computing hashes.\n        CC_SHA512_CTX ctx;\n        \n        // Allocate the required memory\n        NSMutableData* space = [NSMutableData dataWithLength:numberOfBytes];\n        unsigned char* spaceBytes = space.mutableBytes;\n        \n        // Initial two blocks:\n        // 1. SHA512(password + salt)\n        // 2. SHA512(SHA512(password + salt))\n        \n        CC_SHA512_Init(&ctx);\n        CC_SHA512_Update(&ctx, password.bytes, (CC_LONG)password.length);\n        CC_SHA512_Update(&ctx, salt.bytes, (CC_LONG)salt.length);\n        CC_SHA512_Final(spaceBytes, &ctx);\n        \n        CC_SHA512_Init(&ctx);\n        CC_SHA512_Update(&ctx, spaceBytes, blockSize);\n        CC_SHA512_Final(spaceBytes + blockSize, &ctx);\n        \n        // At each step we try to reinforce memory requirement while spending a constant amount of time.\n        // Some applications wouldn't like to waste more than 100 ms on KDF, some are okay to spend 5 sec.\n        // Yet, the more memory we can use in that period of time, the better.\n        \n        // We start with just 2 blocks of data. It's pointless to waste time filling the whole space.\n        // It's also pointless to use any of the remaining space. The only source of entropy we have is in the very beginning.\n        // We use pseudo-random locations in the initial state to produce the next block therefore forcing the attacker to keep the result around.\n        \n        // When we arrive at the end, we take the last 256 bits and return them as a result.\n        \n        uint64_t buf[8] = {0};\n        uint64_t a;\n        uint64_t b;\n        \n        for (unsigned long i = 2*blockSize; i < numberOfBytes; i += blockSize) {\n            // A = previous block (filled).\n            // A is composed of 8 64-bit numbers: {A1, A2, A3, A4, A5, A6, A7, A8}.\n            // Each number is treated as a byte pointer to a 64-bit word located between the beginning and\n            // the previous block (i.e. modulo i - blockSize - wordSize). Offset is counted in bytes, not in number\n            // of words which produces better diffusion.\n            \n            // Security analysis (work in progress):\n            // Lets say attacker wants to reduce amount of memory by a factor of 2.\n            // He will complete 50% of necessary computations with the available memory.\n            // Then he would have to overwrite some previous results with new data.\n            // One possible attack is to throw away every second block (or word). This way if the pointer arrives on a missing\n            // word, it can be quickly recomputed from the previous data. However that data will also cause touching missing words\n            // with overwhelming probability (we have 8 pseudo-random jumps K times).\n            //\n            // Amount of memory is M words.\n            // Amount of space at step N is 8*N words.\n            // Amount of pseudo-random jumps is 8*K.\n            // Probability for one jump to arrive within stored words is R = M/(8*N).\n            // Probability for 8*K jumps to arrive within stored words is R^(8*K).\n            // Probability that one will need some thrown away block is (1 - R)^(8*K)) which for K = 2 and R < 0.5 is close to 99.99%.\n            // We need to compute a probability of one specific word not being used over total N iterations.\n            // For word number n is not used until n/8 steps performed.\n            // At each step s from n/8 till N we have this probability that the word will not be used: (1 - 1/(8*s))\n            // Total probability that a specific word n won't be used throughout entire computation is ∏(1 - 1/(8*s)) over s = n/8 till N.\n            // This probability converges to a not very small probability mostly defined by the first terms.\n            // Lets for simplicity define an upper bound for this probability as 1 - 1/(8*s) and see how it goes for multiple words.\n            //\n            // The real model is when we throw away some words after X steps.\n            // We need to compute real cost for throwing these words away and prove that it'll surpass any winnings or make computation impractically slower.\n            // One approach would be like this: each miss requires some amount of temporary memory.\n            // At some number of misses amount of temporary memory may reach the amount of memory being thrown away (on average).\n            // If that so, it is not important how slower the computation becomes: memory requirement still holds.\n            \n            // B = block size of memory\n            // pi = probability of miss of a block\n            // miss_cost(n) = (B*miss_prob(n) + miss_prob(n)*miss_cost(n+1)) = miss_prob(n)*(Block + 8*miss_cost(n+1))\n            //\n            \n            uint64_t *src = (uint64_t*)(spaceBytes + i - blockSize);\n            \n            for (int w = 0; w < 8; w++) { buf[w] = *(src+w); }\n            \n            // We have several rounds of jumps to make sure it's costlier to throw away previously computed values.\n            for (int jumps = 0; jumps < maxJumps; jumps++) {\n                // At each round of jumps we split the recently computed 512-bit block in 8 words (64 bit each).\n                // Each word acts as a random offset in the space before current block.\n                // The word at which we arrive is interpreted as another offset for next round of jumps.\n                for (int w = 0; w < 8; w++) {\n                    a = buf[w];\n                    // Initial step modulo: (2*64 - 64 - 8 + 1) = 64-8 = 57. So the max offset is 56 and the whole last byte of the prev block can be consumed. This as\n                    b = *(uint64_t *)(spaceBytes + (a % (i - blockSize - 8 + 1)));\n                    \n                    // Make this jump unique so this word b does not always point to the same location.\n                    // So attacker cannot predict which blocks are less likely to be hit.\n                    // SHA512 guarantees lack of correlation between input (b) and hash value (a)\n                    // therefore XORing them should not introduce bias.\n                    buf[w] = b ^ a;\n                }\n            }\n            \n            CC_SHA512_Init(&ctx);\n            \n            // Hash all the resulting words after jumping and XORing.\n            CC_SHA512_Update(&ctx, buf, 8*sizeof(uint64_t));\n            \n            // Hash also the entire previous block.\n            // This guarantees us security level of PBKDF2 with equivalent number of rounds.\n            // Even if we have bias due to jumps at some point, this will give us a well-diffused hash value.\n            CC_SHA512_Update(&ctx, spaceBytes + i - blockSize, blockSize);\n            \n            CC_SHA512_Final(spaceBytes + i, &ctx);\n        }\n        \n        // The resulting key is simply the remaining bits of the data space.\n        \n        NSMutableData* result =  [NSMutableData dataWithBytes:spaceBytes + numberOfBytes - outputLength length:outputLength];\n        \n        // Clear sensitive data from memory.\n        \n        BTCSecureMemset(&ctx,       0, sizeof(ctx));\n        BTCSecureMemset(spaceBytes, 0, space.length);\n        BTCSecureMemset(buf,        0, sizeof(buf));\n        a = 0;\n        b = 0;\n        \n        return result;\n    }\n}\n\nNSMutableData* BTCLocustKDF128(NSData* password, NSData* salt, unsigned int numberOfBytes) {\n    return BTCLocustKDF(password, salt, numberOfBytes, 16);\n}\n\nNSMutableData* BTCLocustKDF160(NSData* password, NSData* salt, unsigned int numberOfBytes) {\n    return BTCLocustKDF(password, salt, numberOfBytes, 20);\n}\n\nNSMutableData* BTCLocustKDF256(NSData* password, NSData* salt, unsigned int numberOfBytes) {\n    return BTCLocustKDF(password, salt, numberOfBytes, 32);\n}\n\nNSMutableData* BTCLocustKDF512(NSData* password, NSData* salt, unsigned int numberOfBytes) {\n    return BTCLocustKDF(password, salt, numberOfBytes, 64);\n}\n\n\n\n\n\n\n\n"
  },
  {
    "path": "Pods/CoreBitcoin/CoreBitcoin/BTCEncryptedBackup.h",
    "content": "// CoreBitcoin by Oleg Andreev <oleganza@gmail.com>, WTFPL.\n\n// Implementation of [Automatic Encrypted Wallet Backups](https://github.com/oleganza/bitcoin-papers/blob/master/AutomaticEncryptedWalletBackups.md) scheme.\n// For test vectors, see unit tests (BTCEncryptedBackup+Tests.m).\n\n#import <Foundation/Foundation.h>\n\ntypedef NS_ENUM(unsigned char, BTCEncryptedBackupVersion) {\n    BTCEncryptedBackupVersion1 = 0x01,\n};\n\n@class BTCNetwork;\n@class BTCKey;\n@interface BTCEncryptedBackup : NSObject\n\n// Default version is BTCEncryptedBackupVersion1.\n@property(nonatomic, readonly) BTCEncryptedBackupVersion version;\n\n// Timestamp of the backup. If not specified, during encryption set to current time.\n@property(nonatomic, readonly) NSTimeInterval timestamp;\n@property(nonatomic, readonly) NSDate* date;\n\n@property(nonatomic, readonly) NSData* decryptedData;\n@property(nonatomic, readonly) NSData* encryptedData;\n\n@property(nonatomic, readonly) NSString* walletID;\n@property(nonatomic, readonly) BTCKey* authenticationKey;\n\n+ (instancetype) encrypt:(NSData*)data backupKey:(NSData*)backupKey;\n+ (instancetype) encrypt:(NSData*)data backupKey:(NSData*)backupKey timestamp:(NSTimeInterval)timestamp;\n+ (instancetype) decrypt:(NSData*)data backupKey:(NSData*)backupKey;\n\n+ (NSData*) backupKeyForNetwork:(BTCNetwork*)network masterKey:(NSData*)masterKey;\n+ (BTCKey*) authenticationKeyWithBackupKey:(NSData*)backupKey;\n+ (NSString*) walletIDWithAuthenticationKey:(NSData*)authPubkey;\n\n// For testing/audit purposes only:\n\n@property(nonatomic, readonly) NSData* encryptionKey;\n@property(nonatomic, readonly) NSData* iv;\n@property(nonatomic, readonly) NSData* merkleRoot;\n@property(nonatomic, readonly) NSData* ciphertext;\n@property(nonatomic, readonly) NSData* dataForSigning;\n@property(nonatomic, readonly) NSData* signature;\n\n@end\n"
  },
  {
    "path": "Pods/CoreBitcoin/CoreBitcoin/BTCEncryptedBackup.m",
    "content": "// CoreBitcoin by Oleg Andreev <oleganza@gmail.com>, WTFPL.\n\n#import \"BTCEncryptedBackup.h\"\n#import \"BTCData.h\"\n#import \"BTCBase58.h\"\n#import \"BTCKey.h\"\n#import \"BTCNetwork.h\"\n#import \"BTCMerkleTree.h\"\n#import \"BTCProtocolSerialization.h\"\n#import <CommonCrypto/CommonCrypto.h>\n\n@interface BTCEncryptedBackup ()\n@property(nonatomic, readwrite) BTCEncryptedBackupVersion version;\n@property(nonatomic, readwrite) NSTimeInterval timestamp;\n@property(nonatomic, readwrite) NSDate* date;\n\n@property(nonatomic, readwrite) NSData* backupKey;\n@property(nonatomic, readwrite) NSData* decryptedData;\n@property(nonatomic, readwrite) NSData* encryptedData;\n\n@property(nonatomic, readwrite) NSData* iv;\n@property(nonatomic, readwrite) NSData* ciphertext;\n@property(nonatomic, readwrite) NSData* signature;\n@end\n\n@implementation BTCEncryptedBackup\n\n- (id) initWithBackupKey:(NSData*)backupKey {\n    if (!backupKey) return nil;\n    if (self = [super init]) {\n        self.version = BTCEncryptedBackupVersion1;\n        self.date = [NSDate date];\n        self.backupKey = backupKey;\n    }\n    return self;\n}\n\n- (NSTimeInterval) timestamp {\n    return self.date.timeIntervalSince1970;\n}\n\n- (void) setTimestamp:(NSTimeInterval)timestamp {\n    if (timestamp == 0.0) {\n        self.date = nil;\n    } else {\n        self.date = [NSDate dateWithTimeIntervalSince1970:timestamp];\n    }\n}\n\n+ (instancetype) encrypt:(NSData*)data backupKey:(NSData*)backupKey {\n    return [self encrypt:data backupKey:backupKey timestamp:[NSDate date].timeIntervalSince1970];\n}\n\n+ (instancetype) encrypt:(NSData*)data backupKey:(NSData*)backupKey timestamp:(NSTimeInterval)timestamp {\n    BTCEncryptedBackup* b = [[BTCEncryptedBackup alloc] initWithBackupKey:backupKey];\n    b.timestamp = timestamp;\n    b.decryptedData = data;\n    NSData* r = [b encrypt];\n    if (r) {\n        b.encryptedData = r;\n        return b;\n    }\n    return nil;\n}\n\n+ (instancetype) decrypt:(NSData*)data backupKey:(NSData*)backupKey {\n    BTCEncryptedBackup* b = [[BTCEncryptedBackup alloc] initWithBackupKey:backupKey];\n    b.encryptedData = data;\n    NSData* r = [b decrypt];\n    if (r) {\n        b.decryptedData = r;\n        return b;\n    }\n    return nil;\n}\n\n+ (NSData*) backupKeyForNetwork:(BTCNetwork*)network masterKey:(NSData*)masterKey {\n    if (!network || network.isMainnet) {\n        return BTCHMACSHA256(masterKey, [@\"Automatic Backup Key Mainnet\" dataUsingEncoding:NSASCIIStringEncoding]);\n    } else {\n        return BTCHMACSHA256(masterKey, [@\"Automatic Backup Key Testnet\" dataUsingEncoding:NSASCIIStringEncoding]);\n    }\n}\n\n+ (BTCKey*) authenticationKeyWithBackupKey:(NSData*)backupKey {\n    BTCKey* key = [[BTCKey alloc] initWithPrivateKey:BTCHMACSHA256(backupKey, [@\"Authentication Key\" dataUsingEncoding:NSUTF8StringEncoding])];\n    key.publicKeyCompressed = YES;\n    return key;\n}\n\n+ (NSString*) walletIDWithAuthenticationKey:(NSData*)authPubkey {\n    // WalletID = Base58Check(0x49 || RIPEMD-160(SHA-256(APub)))\n    NSMutableData* data = [NSMutableData data];\n    uint8_t v = 0x49;\n    [data appendBytes:&v length:1];\n    [data appendData:BTCHash160(authPubkey)];\n    return BTCBase58CheckStringWithData(data);\n}\n\n\n- (NSData*) encryptionKey {\n    return [BTCHMACSHA256(self.backupKey, [@\"Encryption Key\" dataUsingEncoding:NSUTF8StringEncoding]) subdataWithRange:NSMakeRange(0, 16)];\n}\n\n- (NSData*) iv {\n    if (_iv) return _iv;\n    return [self ivForPlaintext:self.decryptedData ek:[self encryptionKey]];\n}\n\n- (NSData*) ciphertext {\n    if (_ciphertext) return _ciphertext;\n    return [self ciphertextForData:self.decryptedData iv:[self iv] ek:[self encryptionKey]];\n}\n\n- (NSData*) merkleRoot {\n    return [self merkleRootForCiphertext:[self ciphertext]];\n}\n\n- (NSData*) dataForSigning {\n    return [self dataForSigning:self.version timestamp:self.timestamp iv:[self iv] merkleRoot:[self merkleRoot]];\n}\n\n- (BTCKey*) authenticationKey {\n    return [[self class] authenticationKeyWithBackupKey:self.backupKey];\n}\n\n- (NSString*) walletID {\n    return [[self class] walletIDWithAuthenticationKey:self.authenticationKey.publicKey];\n}\n\n- (NSData*) signature {\n    if (_signature) return _signature;\n    return [self signatureForData:[self dataForSigning] key:[self authenticationKey]];\n}\n\n\n- (NSData*) encrypt {\n\n    NSData* plaintext = self.decryptedData;\n\n    // Result = VersionByte || Timestamp || IV || CiphertextLength || Ciphertext || SignatureLength || Signature\n    NSMutableData* result = [NSMutableData data];\n\n    uint8_t v = (uint8_t)self.version;\n    uint32_t ts = CFSwapInt32HostToLittle((uint32_t)self.timestamp);\n    BTCKey* ak = [self authenticationKey];\n    NSData* ek = [self encryptionKey];\n    NSData* iv = [self ivForPlaintext:plaintext ek:ek];\n    NSData* ciphertext = [self ciphertextForData:plaintext iv:iv ek:ek];\n    NSData* mr = [self merkleRootForCiphertext:ciphertext];\n    NSData* signature = [self signatureForData:[self dataForSigning:self.version timestamp:self.timestamp iv:iv merkleRoot:mr] key:ak];\n\n    [result appendData:[NSData dataWithBytes:&v length:1]];\n    [result appendData:[NSData dataWithBytes:&ts length:4]];\n    [result appendData:iv];\n    [result appendData:[BTCProtocolSerialization dataForVarString:ciphertext]];\n    [result appendData:[BTCProtocolSerialization dataForVarString:signature]];\n    return result;\n}\n\n- (NSData*) decrypt {\n\n    // Result = VersionByte || Timestamp || IV || CiphertextLength || Ciphertext || SignatureLength || Signature\n\n    NSData* payload = self.encryptedData;\n    if (payload.length < (1 + 4 + 16 + 2 + 60)) {\n        return nil;\n    }\n    self.version = ((uint8_t*)payload.bytes)[0];\n    uint32_t ts;\n    memcpy(&ts, [payload subdataWithRange:NSMakeRange(1, 4)].bytes, 4);\n    self.timestamp = CFSwapInt32LittleToHost(ts);\n    NSData* iv = [payload subdataWithRange:NSMakeRange(1+4, 16)];\n\n    NSInteger fixedOffset = 1+4+16;\n    NSUInteger ctlen = 0;\n    NSData* ciphertext = [BTCProtocolSerialization readVarStringFromData:[payload subdataWithRange:NSMakeRange(fixedOffset, payload.length - fixedOffset)] readBytes:&ctlen];\n\n    if (!ciphertext) {\n        return nil;\n    }\n\n    NSData* signature = [BTCProtocolSerialization readVarStringFromData:\n                         [payload subdataWithRange:NSMakeRange(fixedOffset + ctlen, payload.length - (fixedOffset + ctlen))]];\n\n    if (!signature) {\n        return nil;\n    }\n\n    self.iv = iv;\n    self.ciphertext = ciphertext;\n    self.signature = signature;\n\n    // 1. Verify signature.\n    // 2. Decrypt\n    // 3. Verify plaintext integrity via IV-as-MAC.\n\n    BTCKey* ak = [self authenticationKey];\n    NSData* ek = [self encryptionKey];\n    NSData* mr = [self merkleRootForCiphertext:ciphertext];\n    NSData* sigData = [self dataForSigning:self.version timestamp:self.timestamp iv:iv merkleRoot:mr];\n    if (![ak isValidSignature:signature hash:BTCHash256(sigData)]) {\n        return nil;\n    }\n\n    NSData* plaintext = [self plaintextFromData:ciphertext iv:iv ek:ek];\n    if (!plaintext) {\n        return nil;\n    }\n\n    NSData* mac = [self ivForPlaintext:plaintext ek:ek];\n\n    // IV acts as a MAC on plaintext. Here we check that ciphertext wasn't tail-mutated within Merkle Tree.\n    if (![mac isEqual:iv]) {\n        return nil;\n    }\n\n    return plaintext;\n}\n\n\n\n// Functional Helpers\n\n- (NSData*) ivForPlaintext:(NSData*)plaintext ek:(NSData*)ek {\n    return [BTCHMACSHA256(ek, plaintext) subdataWithRange:NSMakeRange(0, 16)];\n}\n\n- (NSData*) ciphertextForData:(NSData*)plaintext iv:(NSData*)iv ek:(NSData*)ek {\n\n    NSMutableData* ct = [NSMutableData dataWithLength:plaintext.length + 16];\n    size_t dataOutMoved = 0;\n    CCCryptorStatus cryptstatus = CCCrypt(\n                                          kCCEncrypt,                  // CCOperation op,         /* kCCEncrypt, kCCDecrypt */\n                                          kCCAlgorithmAES,             // CCAlgorithm alg,        /* kCCAlgorithmAES128, etc. */\n                                          kCCOptionPKCS7Padding,       // CCOptions options,      /* kCCOptionPKCS7Padding, etc. */\n                                          ek.bytes,                    // const void *key,\n                                          ek.length,                   // size_t keyLength,\n                                          iv.bytes,                    // const void *iv,         /* optional initialization vector */\n                                          plaintext.bytes,             // const void *dataIn,     /* optional per op and alg */\n                                          plaintext.length,            // size_t dataInLength,\n                                          ct.mutableBytes,             // void *dataOut,          /* data RETURNED here */\n                                          ct.length,                   // size_t dataOutAvailable,\n                                          &dataOutMoved                // size_t *dataOutMoved\n                                          );\n\n    if (cryptstatus != kCCSuccess) {\n        return nil;\n    }\n    [ct setLength:dataOutMoved];\n    return ct;\n}\n\n- (NSData*) plaintextFromData:(NSData*)ciphertext iv:(NSData*)iv ek:(NSData*)ek {\n\n    NSMutableData* pt = [NSMutableData dataWithLength:ciphertext.length];\n    size_t dataOutMoved = 0;\n    CCCryptorStatus cryptstatus = CCCrypt(\n                                          kCCDecrypt,                  // CCOperation op,         /* kCCEncrypt, kCCDecrypt */\n                                          kCCAlgorithmAES,             // CCAlgorithm alg,        /* kCCAlgorithmAES128, etc. */\n                                          kCCOptionPKCS7Padding,       // CCOptions options,      /* kCCOptionPKCS7Padding, etc. */\n                                          ek.bytes,                    // const void *key,\n                                          ek.length,                   // size_t keyLength,\n                                          iv.bytes,                    // const void *iv,         /* optional initialization vector */\n                                          ciphertext.bytes,            // const void *dataIn,     /* optional per op and alg */\n                                          ciphertext.length,           // size_t dataInLength,\n                                          pt.mutableBytes,             // void *dataOut,          /* data RETURNED here */\n                                          pt.length,                   // size_t dataOutAvailable,\n                                          &dataOutMoved                // size_t *dataOutMoved\n                                          );\n\n    if (cryptstatus != kCCSuccess) {\n        return nil;\n    }\n    [pt setLength:dataOutMoved];\n    return pt;\n}\n\n\n- (NSData*) merkleRootForCiphertext:(NSData*)data {\n    // Ciphertext = a (1024) || b (1024) || c (1024) || d (1024) || e (904 bytes)\n    /*\n          Merkle Root\n            /     \\\n           p       q\n          / \\     / \\\n         f   g   h   h\n        / \\ / \\ / \\\n        a b c d e e\n    */\n    NSMutableArray* dataItems = [NSMutableArray arrayWithCapacity:((data.length + 1023) / 1024)];\n    for (int i = 0; i < data.length; i += 1024) {\n        NSData* item = [data subdataWithRange:NSMakeRange(i, MIN(1024, data.length - i))];\n        [dataItems addObject:item];\n    }\n    BTCMerkleTree* mt = [[BTCMerkleTree alloc] initWithDataItems:dataItems];\n    return mt.merkleRoot;\n}\n\n- (NSData*) dataForSigning:(BTCEncryptedBackupVersion)version timestamp:(NSTimeInterval)timestamp iv:(NSData*)iv merkleRoot:(NSData*)merkleRoot {\n    // VersionByte || Timestamp || IV || MerkleRoot\n\n    NSMutableData* result = [NSMutableData data];\n\n    uint8_t v = (uint8_t)version;\n    uint32_t ts = (uint32_t)timestamp;\n\n    [result appendData:[NSData dataWithBytes:&v length:1]];\n    [result appendData:[NSData dataWithBytes:&ts length:4]];\n    [result appendData:iv];\n    [result appendData:merkleRoot];\n    return result;\n}\n\n- (NSData*) signatureForData:(NSData*)data key:(BTCKey*)key {\n\n    // Signature = ECDSA(private key: AK, hash: SHA-256(SHA-256(VersionByte || Timestamp || IV || MerkleRoot))))\n    NSData* hash = BTCHash256(data);\n    return [key signatureForHash:hash];\n}\n\n\n@end\n"
  },
  {
    "path": "Pods/CoreBitcoin/CoreBitcoin/BTCEncryptedMessage.h",
    "content": "// CoreBitcoin by Oleg Andreev <oleganza@gmail.com>, WTFPL.\n\n#import <Foundation/Foundation.h>\n\n@class BTCKey;\n\n// Implementation of [ECIES](http://en.wikipedia.org/wiki/Integrated_Encryption_Scheme)\n// compatible with [Bitcore ECIES](https://github.com/bitpay/bitcore-ecies) implementation.\n@interface BTCEncryptedMessage : NSObject\n\n// When encrypting, sender's keypair must contain a private key.\n@property(nonatomic) BTCKey* senderKey;\n\n// When decrypting, recipient's keypair must contain a private key.\n@property(nonatomic) BTCKey* recipientKey;\n\n- (NSData*) encrypt:(NSData*)plaintext;\n- (NSData*) decrypt:(NSData*)ciphertext;\n\n@end\n"
  },
  {
    "path": "Pods/CoreBitcoin/CoreBitcoin/BTCEncryptedMessage.m",
    "content": "// CoreBitcoin by Oleg Andreev <oleganza@gmail.com>, WTFPL.\n\n#import \"BTCKey.h\"\n#import \"BTCData.h\"\n#import \"BTCCurvePoint.h\"\n#import \"BTCBigNumber.h\"\n#import \"BTCEncryptedMessage.h\"\n#import <CommonCrypto/CommonCrypto.h>\n\n@implementation BTCEncryptedMessage\n\n- (NSData*) encrypt:(NSData*)plaintext {\n\n    NSData* privkey = self.senderKey.privateKey;\n    NSData* iv = [BTCHMACSHA256(privkey, plaintext) subdataWithRange:NSMakeRange(0, 16)];\n\n    BTCBigNumber* r = [[BTCBigNumber alloc] initWithUnsignedBigEndian:privkey];\n    NSData* Rbuf = self.senderKey.compressedPublicKey;\n    BTCCurvePoint* cp = self.recipientKey.curvePoint;\n    BTCCurvePoint* P = [cp multiply:r];\n    BTCBigNumber* S = P.x;\n    NSData* Sbuf = S.unsignedBigEndian; // ensures padding to 32 bytes\n    NSData* kEkM = BTCSHA512(Sbuf);\n    NSData* kE = [kEkM subdataWithRange:NSMakeRange(0, 32)];\n    NSData* kM = [kEkM subdataWithRange:NSMakeRange(32, 32)];\n\n    size_t dataOutMoved = 0;\n    NSMutableData* ivct = [NSMutableData dataWithLength:16 + plaintext.length + 16]; // IV + cipher text\n    memcpy(ivct.mutableBytes, iv.bytes, iv.length); // put IV in front, to match Bitcore-ECIES\n    CCCryptorStatus cryptstatus = CCCrypt(\n                                          kCCEncrypt,                  // CCOperation op,         /* kCCEncrypt, kCCDecrypt */\n                                          kCCAlgorithmAES,             // CCAlgorithm alg,        /* kCCAlgorithmAES128, etc. */\n                                          kCCOptionPKCS7Padding,       // CCOptions options,      /* kCCOptionPKCS7Padding, etc. */\n                                          kE.bytes,                    // const void *key,\n                                          kE.length,                   // size_t keyLength,\n                                          iv.bytes,                    // const void *iv,         /* optional initialization vector */\n                                          plaintext.bytes,             // const void *dataIn,     /* optional per op and alg */\n                                          plaintext.length,            // size_t dataInLength,\n                                          ivct.mutableBytes + iv.length,     // void *dataOut,          /* data RETURNED here */\n                                          ivct.length - iv.length,           // size_t dataOutAvailable,\n                                          &dataOutMoved                // size_t *dataOutMoved\n                                          );\n\n    if (cryptstatus != kCCSuccess) {\n        return nil;\n    }\n\n    [ivct setLength:dataOutMoved + iv.length];\n\n    NSData* d = BTCHMACSHA256(kM, ivct);\n\n    NSMutableData* result = [NSMutableData dataWithData:Rbuf];\n    [result appendData:ivct];\n    [result appendData:d];\n    return result;\n\n//    Based on Bitcore JS implementation:\n//    var r = this._privateKey.bn;\n//    var Rpubkey = this._privateKey.publicKey;\n//    var Rbuf = Rpubkey.toDER(true);\n//    var KB = this._publicKey.point;\n//    var P = KB.mul(r);\n//    var S = P.getX();\n//    var Sbuf = S.toBuffer({size: 32});\n//    var kEkM = Hash.sha512(Sbuf);\n//    var kE = kEkM.slice(0, 32);\n//    var kM = kEkM.slice(32, 64);\n//    var c = AESCBC.encryptCipherkey(message, kE, ivbuf);\n//    var d = Hash.sha256hmac(c, kM);\n//    var encbuf = Buffer.concat([Rbuf, c, d]);\n//    return encbuf;\n}\n\n- (NSData*) decrypt:(NSData*)ciphertext {\n\n    if (ciphertext.length < (33 + 16 + 16 + 32)) {\n        return nil;\n    }\n\n    NSData* privkey = self.recipientKey.privateKey;\n    BTCBigNumber* kB = [[BTCBigNumber alloc] initWithUnsignedBigEndian:privkey];\n\n    self.senderKey = [[BTCKey alloc] initWithPublicKey:[ciphertext subdataWithRange:NSMakeRange(0, 33)]];\n    BTCCurvePoint* R = self.senderKey.curvePoint;\n    BTCCurvePoint* P = [R multiply:kB];\n    BTCBigNumber* S = P.x;\n    NSData* Sbuf = S.unsignedBigEndian; // ensures padding to 32 bytes\n    NSData* kEkM = BTCSHA512(Sbuf);\n    NSData* kE = [kEkM subdataWithRange:NSMakeRange(0, 32)];\n    NSData* kM = [kEkM subdataWithRange:NSMakeRange(32, 32)];\n\n    NSData* ivct = [ciphertext subdataWithRange:NSMakeRange(33, ciphertext.length - 32 - 33)];\n    NSData* d = [ciphertext subdataWithRange:NSMakeRange(ciphertext.length - 32, 32)];\n\n    NSData* d2 = BTCHMACSHA256(kM, ivct);\n\n    if (![d isEqual:d2]) {\n        // Invalid checksum.\n        return nil;\n    }\n\n    size_t dataOutMoved = 0;\n    NSMutableData* plaintext = [NSMutableData dataWithLength:ivct.length];\n    CCCryptorStatus cryptstatus = CCCrypt(\n                                          kCCDecrypt,                  // CCOperation op,         /* kCCEncrypt, kCCDecrypt */\n                                          kCCAlgorithmAES,             // CCAlgorithm alg,        /* kCCAlgorithmAES128, etc. */\n                                          kCCOptionPKCS7Padding,       // CCOptions options,      /* kCCOptionPKCS7Padding, etc. */\n                                          kE.bytes,                    // const void *key,\n                                          kE.length,                   // size_t keyLength,\n                                          ivct.bytes,                  // const void *iv,         /* optional initialization vector */\n                                          ivct.bytes + 16,             // const void *dataIn,     /* optional per op and alg */\n                                          ivct.length - 16,            // size_t dataInLength,\n                                          plaintext.mutableBytes,      // void *dataOut,          /* data RETURNED here */\n                                          plaintext.length,            // size_t dataOutAvailable,\n                                          &dataOutMoved                // size_t *dataOutMoved\n                                          );\n\n    if (cryptstatus != kCCSuccess) {\n        return nil;\n    }\n\n    [plaintext setLength:dataOutMoved];\n    return plaintext;\n\n//    var kB = this._privateKey.bn;\n//    this._publicKey = PublicKey.fromDER(encbuf.slice(0, 33));\n//    var R = this._publicKey.point;\n//    var P = R.mul(kB);\n//    var S = P.getX();\n//\n//    var Sbuf = S.toBuffer({\n//    size: 32\n//    });\n//    var kEkM = Hash.sha512(Sbuf);\n//\n//    var kE = kEkM.slice(0, 32);\n//    var kM = kEkM.slice(32, 64);\n//\n//    var c = encbuf.slice(33, encbuf.length - 32);\n//    var d = encbuf.slice(encbuf.length - 32, encbuf.length);\n//\n//    var d2 = Hash.sha256hmac(c, kM);\n//    if (d.toString('hex') !== d2.toString('hex')) throw new Error('Invalid checksum');\n//    var messagebuf = AESCBC.decryptCipherkey(c, kE);\n\n\n}\n\n\n@end\n"
  },
  {
    "path": "Pods/CoreBitcoin/CoreBitcoin/BTCErrors.h",
    "content": "// CoreBitcoin by Oleg Andreev <oleganza@gmail.com>, WTFPL.\n\n#import <Foundation/Foundation.h>\n\nextern NSString* const BTCErrorDomain;\n\ntypedef NS_ENUM(NSUInteger, BTCErrorCode) {\n    \n    // Canonical pubkey/signature check errors\n    BTCErrorNonCanonicalPublicKey            = 4001,\n    BTCErrorNonCanonicalScriptSignature      = 4002,\n    \n    // Script verification errors\n    BTCErrorScriptError                      = 5001,\n    \n    // BTCPriceSource errors\n    BTCErrorUnsupportedCurrencyCode          = 6001,\n\n    // BIP70 Payment Protocol errors\n    BTCErrorPaymentRequestInvalidResponse    = 7001,\n    BTCErrorPaymentRequestTooBig             = 7002,\n\n    // Secret Sharing errors\n    BTCErrorIncompatibleSecret               = 10001,\n    BTCErrorInsufficientShares               = 10002,\n    BTCErrorMalformedShare                   = 10003,\n};"
  },
  {
    "path": "Pods/CoreBitcoin/CoreBitcoin/BTCErrors.m",
    "content": "#import \"BTCErrors.h\"\n\nNSString* const BTCErrorDomain = @\"com.oleganza.CoreBitcoin\";\n"
  },
  {
    "path": "Pods/CoreBitcoin/CoreBitcoin/BTCFancyEncryptedMessage.h",
    "content": "// CoreBitcoin by Oleg Andreev <oleganza@gmail.com>, WTFPL.\n\n#import <Foundation/Foundation.h>\n\n// Encrypted message is a very compact format inspired by Bitmessage.\n// Messages are encrypted with recipient's public key (Bitcoin-compatible, that is secp256k1)\n// and may contain none to full recipient information (hash of their public key) depending on your application's needs.\n// Also allows attaching an optional proof-of-work that is extremely fast to evaluate.\n//\n// Binary structure:\n// 4 bytes     version prefix (also a magic number).\n// 1 byte      proof-of-work difficulty target (similar to \"bits\" field in BTCBlockHeader). SHA512^2 of the entire encrypted message should be below target.\n// 1 byte      proof-of-work nonce. When overflown, new private key should be generated and message should be re-encrypted.\n// 4 bytes     timestamp to filter out replays. Helps preventing DoS even if you don't use PoW. Big-endian.\n// 1 byte      recipient's address length (R bits)\n// R bits      recipient's address (BTCHash160(pubkey)), from 0 to 20 bytes. Only first R bits are used.\n// 1 byte      pubkey nonce length (N) // normally - 32 bytes.\n// N bytes     pubkey nonce: a compressed public key used in a DH algorithm to establish a secret that is then used as a key in AES-CBC.\n// 1,2,3,5,9 bytes of message length (M) as 'CompactSize' variable-length integer encoding. See BTCProtocolSerialization.\n// M bytes     encrypted message\n// 16 bytes    checksum: first 16 bytes of SHA256(SHA256()) of the shared secret and the decrypted message.\n//             So the receiver can verify that the message was actually sent to him before even trying to parse it.\n//             We do not show the checksum of the message alone as it may leak the contents (e.g. when there is a limited set of possible messages).\n//             We do not add checksum of the entire message as it's a job of a transport layer.\n//             Also, a reasonably difficult proof-of-work implicitly acts as a checksum of the entire message.\n\nstatic unsigned char BTCFancyEncryptedMessageVersion[4] = {0xc1, 0xb9, 0xf0, 0xe3};\n\ntypedef NS_ENUM(uint8_t, BTCFancyEncryptedMessageAddressLength) {\n    // No address is given, recipient must attempt to decrypt the message to figure if he is indeed a recipient.\n    BTCFancyEncryptedMessageAddressLengthNone           = 0,\n    \n    // First 4 bits of the address. To route message efficiently to 6% of all users yet keeping recipient secret.\n    BTCFancyEncryptedMessageAddressLengthLightRouting   = 4,\n    \n    // First 7 bits of the address. To route message to 0.8% of the users. Good anonymity of recipient is maintained if number of users is more than 200K.\n    BTCFancyEncryptedMessageAddressLengthNormalRouting  = 7,\n    \n    // Fingerprint is a short 32-bit identifier to be compact, but yet allow fast identification like in BIP32 / BTCKeychain.\n    BTCFancyEncryptedMessageAddressLengthFingerprint    = 32,\n    \n    // Full 160-bit address fully identifying the recipient.\n    BTCFancyEncryptedMessageAddressLengthFull           = 160,\n};\n\n@class BTCKey;\n@interface BTCFancyEncryptedMessage : NSObject\n\n// Proof-of-work difficulty target.\n// Set it before encrypting the message that needs some Proof-of-Work attached.\n// Default is maximum target: 0xFFFFFFFF.\n@property(nonatomic) uint32_t difficultyTarget;\n\n// UNIX timestamp. Only needed for DoS prevention. For anonymity may be randomized within past hour (depends on application).\n@property(nonatomic) uint32_t timestamp;\n\n// Length of the address field in bits (0...160).\n@property(nonatomic) uint8_t addressLength;\n\n// The full or partial address. Note that only first 'addressLength' bits are meaningful, the rest is just a byte padding.\n// For anonymous messages this is an empty data.\n// When you instantiate unencrypted instance, addressLength is zero by default, but this property contains full address anyway.\n// When encrypted only required prefix of the address will be preserved.\n@property(nonatomic) NSData* address;\n\n// Span of timestamp randomization during -encryptedDataWithKey:seed:.\n// Randomization is done using the seed. Actual timestamp will fall in (now - variance)..now range.\n// Default value is 0.\n@property(nonatomic) uint32_t timestampVariance;\n\n\n// Encrypt\n\n\n// Instantiates unencrypted message with its content\n- (id) initWithData:(NSData*)data;\n\n// Encrypts message with a given recipient's public key and a unique seed.\n// Explicit argument allows you to control the source of entropy and produce deterministic messages.\n// Internally it is mixed with the message and its parameters to ensure uniqueness of encryption key per message.\n// When in doubt, simply use nil as a seed - we will generate a random one from system RNG.\n// If difficultyTarget is below 0xFF, finds a nonce key repeatedly to match the difficulty. (So you might want to run this on a separate thread.)\n- (NSData*) encryptedDataWithKey:(BTCKey*)recipientKey seed:(NSData*)seed;\n\n\n\n// Decrypt\n\n\n// Instantiates encrypted message with its binary representation. Checks version, checksum and proof of work.\n// To decrypt the message, use -decryptedContentsForKey:\n- (id) initWithEncryptedData:(NSData*)data;\n\n// Attempts to decrypt the message with a given private key and returns result.\n- (NSData*) decryptedDataWithKey:(BTCKey*)key error:(NSError**)errorOut;\n\n\n\n// Difficulty conversion\n\n\n// Returns 1-byte representation of a target not higher than a given one.\n// Maximum difficulty is the minimum target and vice versa.\n+ (uint8_t) compactTargetForTarget:(uint32_t)target;\n\n\n// Returns a full 32-bit target from its compact representation.\n+ (uint32_t) targetForCompactTarget:(uint8_t)compactTarget;\n\n@end\n"
  },
  {
    "path": "Pods/CoreBitcoin/CoreBitcoin/BTCFancyEncryptedMessage.m",
    "content": "// CoreBitcoin by Oleg Andreev <oleganza@gmail.com>, WTFPL.\n\n#import \"BTCErrors.h\"\n#import \"BTCFancyEncryptedMessage.h\"\n#import \"BTCData.h\"\n#import \"BTCKey.h\"\n#import \"BTCCurvePoint.h\"\n#import \"BTCBigNumber.h\"\n#import \"BTCProtocolSerialization.h\"\n#import <CommonCrypto/CommonCrypto.h>\n\n// First 16 bytes of the hash of a shared key and decrypted message appended to the end of the complete message.\n#define BTCFancyEncryptedMessageChecksumLength 16\n\nstatic uint8_t BTCEMCompactTargetForFullTarget(uint32_t fullTarget);\nstatic uint32_t BTCEMFullTargetForCompactTarget(uint8_t compactTarget);\n\n@implementation BTCFancyEncryptedMessage {\n    \n    // Decrypted message data:\n    \n    NSData* _decryptedData;\n    \n    // Encrypted message data:\n    BTCKey* _nonceKey;\n    NSData* _encryptedData;\n    NSData* _checksum; // first 16 bytes of double SHA256 of the shared secret concatenated with the decrypted message.\n}\n\n// Instantiates unencrypted message with its content\n- (id) initWithData:(NSData*)data {\n    if (!data) return nil;\n    \n    if (self = [super init]) {\n        _difficultyTarget = 0xFFFFFFFF;\n        _addressLength = BTCFancyEncryptedMessageAddressLengthNone;\n        _decryptedData = data;\n    }\n    return self;\n}\n\n- (NSData*) encryptedDataWithKey:(BTCKey*)recipientKey seed:(NSData*)seed0 {\n    // These will be used for various purposes.\n    unsigned char digest256[CC_SHA256_DIGEST_LENGTH];\n    CC_SHA256_CTX ctx256;\n    \n    NSMutableData* recipientPubKey = [recipientKey compressedPublicKey];\n    \n    self.address = BTCHash160(recipientPubKey);\n    self.addressLength = MIN(self.address.length * 8, self.addressLength);\n    \n    self.timestamp = (uint32_t)[[NSDate date] timeIntervalSince1970];\n    \n    // Transform seed into a unique per-message seed.\n    // TODO: perform raw SHA computation to be able to erase digests from memory.\n    CC_SHA256_Init(&ctx256);\n    if (seed0) {\n        CC_SHA256_Update(&ctx256, seed0.bytes, (CC_LONG)seed0.length);\n    } else {\n        // If no seed given, use random bytes.\n        void* randomBytes = BTCCreateRandomBytesOfLength(32);\n        CC_SHA256_Update(&ctx256, randomBytes, 32);\n        BTCSecureMemset(randomBytes, 0, 32);\n        free(randomBytes);\n    }\n    CC_SHA256_Update(&ctx256, _decryptedData.bytes, (CC_LONG)_decryptedData.length);\n    CC_SHA256_Update(&ctx256, recipientPubKey.bytes, (CC_LONG)recipientPubKey.length);\n    CC_SHA256_Final(digest256, &ctx256);\n\n    NSMutableData* seed = [NSMutableData dataWithBytes:digest256 length:CC_SHA256_DIGEST_LENGTH];\n    \n    BTCSecureMemset(digest256, 0, CC_SHA256_DIGEST_LENGTH);\n    BTCDataClear(recipientPubKey);\n    \n    if (self.timestampVariance > 0) {\n        NSData* varianceHash = BTCSHA256(seed); // extra hashing to not leak our seed that we'll use for private key nonce.\n        uint32_t rand = *((uint32_t*)varianceHash.bytes);\n        self.timestamp -= (rand % self.timestampVariance);\n    }\n    \n    uint8_t compactTarget = BTCEMCompactTargetForFullTarget(_difficultyTarget);\n    \n    NSMutableData* messageData = [[NSMutableData alloc] initWithCapacity:100 + _decryptedData.length];\n    \n    // NOTE: this code could be greately optimized to avoid re-creating message prefix.\n    // Also, if time variance is > 0 we can try some random values there to avoid recomputing the private key.\n    uint64_t nonce = 0;\n    do {\n        \n        BTCDataClear(messageData); // clear previous trial\n        \n        [messageData setLength:0];\n        \n        [messageData appendBytes:BTCFancyEncryptedMessageVersion length:4];\n        \n        [messageData appendBytes:&compactTarget length:1];\n        \n        uint8_t noncePlaceholder = 0;\n        [messageData appendBytes:&noncePlaceholder length:1];\n        \n        NSUInteger offsetForNonce = messageData.length;\n        \n        uint32_t ts = OSSwapHostToBigInt32(self.timestamp);\n        [messageData appendBytes:&ts length:sizeof(ts)];\n        \n        [messageData appendBytes:&_addressLength length:1];\n        \n        uint8_t partialByte = _addressLength % 8;\n        \n        [messageData appendBytes:self.address.bytes length:_addressLength / 8];\n        \n        if (partialByte > 0) {\n            // Add one more byte, but mask lower bits with zeros. (We treat address as a big endian number.)\n            \n            uint8_t lastByte = ((uint8_t*)self.address.bytes)[_addressLength/8] & (0xFF << (8 - partialByte));\n            [messageData appendBytes:&lastByte length:1];\n        }\n        \n        // Compute the private key\n        \n        CC_SHA256_Init(&ctx256);\n        CC_SHA256_Update(&ctx256, [seed bytes], (CC_LONG)[seed length]);\n        CC_SHA256_Update(&ctx256, &nonce, sizeof(nonce));\n        CC_SHA256_Final(digest256, &ctx256);\n        \n        nonce++;\n        \n        NSData* privkey = [NSData dataWithBytesNoCopy:digest256 length:CC_SHA256_DIGEST_LENGTH freeWhenDone:NO]; // not copying data as it'll be copied into bignum right away anyway.\n\n        BTCKey* nonceKey = [[BTCKey alloc] initWithPrivateKey:privkey];\n        \n        NSData* pubkey = [nonceKey compressedPublicKey];\n        \n        uint8_t pubkeyLength = pubkey.length;\n        \n        [messageData appendBytes:&pubkeyLength length:1];\n        \n        [messageData appendData:pubkey];\n        \n        \n        // Create a shared secret\n        \n        BTCBigNumber* pk = [[BTCBigNumber alloc] initWithUnsignedBigEndian:privkey];\n        \n        BTCCurvePoint* curvePoint = recipientKey.curvePoint;\n        \n        // D-H happens here. We multiply our private key (bignum) by a recipient's key (curve point).\n        // Recipient will multiply his private key (bignum) by our pubkey that we attach in the previous step.\n        [curvePoint multiply:pk];\n        \n        NSData* pointX = curvePoint.x.unsignedBigEndian;\n        \n        // Hash the x-coordinate for better diffusion.\n        CC_SHA256_Init(&ctx256);\n        CC_SHA256_Update(&ctx256, [pointX bytes], (CC_LONG)[pointX length]);\n        CC_SHA256_Final(digest256, &ctx256);\n\n        int blockSize = kCCBlockSizeAES128;\n        int encryptedDataCapacity = (int)(_decryptedData.length / blockSize + 1) * blockSize;\n        NSMutableData* encryptedData = [[NSMutableData alloc] initWithLength:encryptedDataCapacity];\n        \n        size_t dataOutMoved = 0;\n                \n        CCCryptorStatus cryptstatus = CCCrypt(\n                                              kCCEncrypt,                  // CCOperation op,         /* kCCEncrypt, kCCDecrypt */\n                                              kCCAlgorithmAES,             // CCAlgorithm alg,        /* kCCAlgorithmAES128, etc. */\n                                              kCCOptionPKCS7Padding,       // CCOptions options,      /* kCCOptionPKCS7Padding, etc. */\n                                              digest256,                   // const void *key,\n                                              CC_SHA256_DIGEST_LENGTH,     // size_t keyLength,\n                                              NULL,                        // const void *iv,         /* optional initialization vector */\n                                              [_decryptedData bytes],      // const void *dataIn,     /* optional per op and alg */\n                                              [_decryptedData length],     // size_t dataInLength,\n                                              encryptedData.mutableBytes,  // void *dataOut,          /* data RETURNED here */\n                                              encryptedDataCapacity,       // size_t dataOutAvailable,\n                                              &dataOutMoved                // size_t *dataOutMoved\n                                              );\n        \n        if (cryptstatus != kCCSuccess) {\n            BTCDataClear(encryptedData);\n            BTCSecureMemset(&ctx256, 0, sizeof(ctx256));\n            encryptedData = nil;\n        } else {\n            // Resize the result key to the correct size.\n            encryptedData.length = dataOutMoved;\n        }\n        \n        // Clear sensitive info from memory.\n        \n        if ([pointX isKindOfClass:[NSMutableData class]]) {\n            BTCDataClear((NSMutableData*)pointX);\n        }\n        [pk clear];\n        [curvePoint clear];\n        BTCSecureMemset(&ctx256, 0, sizeof(ctx256));\n        \n        if (!encryptedData) {\n            BTCDataClear(seed);\n            return nil;\n        }\n        \n        // Raw encrypted data + variable-length data length prefix.\n        [messageData appendData:[BTCProtocolSerialization dataForVarString:encryptedData]];\n\n        // Add 16-byte checksum which is SHA256^2 of the shared secret + decrypted message\n        CC_SHA256_Init(&ctx256);\n        CC_SHA256_Update(&ctx256, digest256, CC_SHA256_DIGEST_LENGTH);\n        CC_SHA256_Update(&ctx256, _decryptedData.bytes, (CC_LONG)_decryptedData.length);\n        CC_SHA256_Final(digest256, &ctx256);\n        CC_SHA256_Init(&ctx256);\n        CC_SHA256_Update(&ctx256, digest256, CC_SHA256_DIGEST_LENGTH);\n        CC_SHA256_Final(digest256, &ctx256);\n\n        [messageData appendBytes:digest256 length:BTCFancyEncryptedMessageChecksumLength];\n        \n        BTCSecureMemset(&ctx256, 0, sizeof(ctx256));\n        \n        // Do not even compute the full hash if we don't need PoW.\n        if (_difficultyTarget == 0xFFFFFFFF) {\n            BTCDataClear(seed);\n            return messageData;\n        }\n        \n        // Compute full hash for PoW.\n        unsigned char digest512[CC_SHA512_DIGEST_LENGTH];\n        CC_SHA512_CTX ctx512;\n        \n        // Iterate 256 nonces\n        \n        uint8_t nonce2 = 0;\n        uint8_t* msgbytes = (uint8_t*)messageData.mutableBytes;\n        do {\n            \n            msgbytes[offsetForNonce] = nonce2; // skip prefix and difficulty target.\n            \n            // Compute proof-of-work hash.\n            CC_SHA512_Init(&ctx512);\n            CC_SHA512_Update(&ctx512, msgbytes, (CC_LONG)messageData.length);\n            CC_SHA512_Final(digest512, &ctx512);\n            CC_SHA512_Init(&ctx512);\n            CC_SHA512_Update(&ctx512, digest512, CC_SHA512_DIGEST_LENGTH);\n            CC_SHA512_Final(digest512, &ctx512);\n            \n            // To avoid bignum math, we only check 32-bit prefixes for PoW.\n            uint32_t prefix = OSSwapBigToHostConstInt32(*((uint32_t*)digest512));\n            \n            if (prefix <= _difficultyTarget) {\n                BTCDataClear(seed);\n                return messageData;\n            }\n            \n            if (nonce2 == 255) {\n                break; // go back to main loop and try another pubkey.\n            }\n            \n            nonce2++;\n            \n        } while (1);\n    } while (1);\n}\n\n\n\n// Instantiates encrypted message with its binary representation. Checks that difficulty matches the actual proof of work.\n// To decrypt the message, use -decryptedDataWithKey:\n- (id) initWithEncryptedData:(NSData*)data {\n    if (self = [super init]) {\n        // Check for minimum length.\n        uint32_t datalength = (uint32_t)data.length;\n        \n        if (datalength < (4 + 1 + 1 + 4 + 1 + 1 + 32 + 1 + BTCFancyEncryptedMessageChecksumLength)) return nil;\n        \n        // Compute full hash for PoW.\n        unsigned char digest512[CC_SHA512_DIGEST_LENGTH];\n        CC_SHA512_CTX ctx512;\n        \n        // Iterate 256 nonces\n        \n        uint8_t nonce = 0;\n        uint8_t* msgbytes = (uint8_t*)data.bytes;\n        \n        // Check the magic prefix.\n        if (memcmp(BTCFancyEncryptedMessageVersion, msgbytes, sizeof(BTCFancyEncryptedMessageVersion)) != 0) {\n            return nil;\n        }\n        \n        nonce = msgbytes[4+1]; // skip prefix and difficulty target.\n        \n        // Proof-of-work check.\n        CC_SHA512_Init(&ctx512);\n        CC_SHA512_Update(&ctx512, data.bytes, (CC_LONG)data.length);\n        CC_SHA512_Final(digest512, &ctx512);\n        CC_SHA512_Init(&ctx512);\n        CC_SHA512_Update(&ctx512, digest512, CC_SHA512_DIGEST_LENGTH);\n        CC_SHA512_Final(digest512, &ctx512);\n        \n        // To avoid bignum math, we only check 32-bit prefixes for PoW.\n        uint32_t prefix = OSSwapBigToHostConstInt32(*((uint32_t*)digest512));\n        \n        uint32_t target = BTCEMFullTargetForCompactTarget(msgbytes[4]);\n        \n        if (prefix > target) {\n            return nil;\n        }\n        \n        // Fill in the properties.\n            \n        _difficultyTarget = target;\n        \n        _timestamp = OSSwapBigToHostConstInt32(*(uint32_t*)(msgbytes + 6));\n        \n        _addressLength = msgbytes[10];\n        \n        uint8_t realAddrLength = _addressLength/8 + (_addressLength % 8 == 0 ? 0 : 1);\n        if (_addressLength > 0) {\n            _address = [data subdataWithRange:NSMakeRange(11, realAddrLength)];\n        } else {\n            _address = [NSData data];\n        }\n        \n        uint32_t offset = 11 + realAddrLength;\n        \n        if (datalength <= offset) return nil;\n        \n        uint8_t pubkeyLength = msgbytes[offset];\n        \n        offset++;\n        \n        if (datalength <= (offset + pubkeyLength)) return nil;\n        \n        NSData* pubkeyNonceData = [NSData dataWithBytes:msgbytes + offset length:pubkeyLength];\n        \n        offset += pubkeyLength;\n        \n        if (datalength <= offset) return nil;\n\n        BTCKey* nonceKey = [[BTCKey alloc] initWithPublicKey:pubkeyNonceData];\n        \n        _nonceKey = nonceKey;\n        \n        // To reconstruct the shared secret, this nonceKey should be multiplied by our private key.\n        // This will happen in -decryptedDataWithKey\n\n        NSUInteger encodedMessageLength = 0; // contains both the encrypted message length and the length of its length prefix.\n        _encryptedData = [BTCProtocolSerialization readVarStringFromData:[data subdataWithRange:NSMakeRange(offset, datalength - offset)] readBytes:&encodedMessageLength];\n        \n        if (_encryptedData == nil) return nil;\n        \n        offset += encodedMessageLength;\n        \n        if (datalength < offset + BTCFancyEncryptedMessageChecksumLength) return nil;\n        \n        _checksum = [data subdataWithRange:NSMakeRange(offset, BTCFancyEncryptedMessageChecksumLength)];\n        \n        // Now the user must call decryptedDataWithKey: with some of his keys to see if this message is for him or not.\n    }\n    return self;\n}\n\n// Attempts to decrypt the message with a given private key and returns result.\n- (NSData*) decryptedDataWithKey:(BTCKey*)key error:(NSError**)errorOut {\n    // 1. Reconstruct a shared secret from key and _nonceKey.\n    // 2. Decrypt message.\n    // 3. Verify the checksum.\n    // 4. If valid, return the message. Otherwise, set error and return nil.\n    \n    \n    // 1. Reconstruct a shared secret from key and _nonceKey.\n    \n    BTCBigNumber* pk = [[BTCBigNumber alloc] initWithUnsignedBigEndian:key.privateKey];\n    \n    BTCCurvePoint* curvePoint = _nonceKey.curvePoint;\n    \n    // D-H happens here. We multiply our private key (bignum) by a sender's nonce key (curve point).\n    // Sender did multiply his nonce private key (bignum) by recipient's pubkey to encrypt the message.\n    [curvePoint multiply:pk];\n    \n    NSData* pointX = curvePoint.x.unsignedBigEndian;\n    \n    // These will be used for various purposes.\n    unsigned char digest256[CC_SHA256_DIGEST_LENGTH];\n    CC_SHA256_CTX ctx256;\n    \n    // Hash the x-coordinate for better diffusion.\n    CC_SHA256_Init(&ctx256);\n    CC_SHA256_Update(&ctx256, [pointX bytes], (CC_LONG)[pointX length]);\n    CC_SHA256_Final(digest256, &ctx256);\n\n    // 2. Decrypt message.\n    \n    int blockSize = kCCBlockSizeAES128;\n    int decryptedDataCapacity = (int)(_encryptedData.length / blockSize + 1) * blockSize;\n    NSMutableData* decryptedData = [[NSMutableData alloc] initWithLength:decryptedDataCapacity];\n    \n    size_t dataOutMoved = 0;\n    CCCryptorStatus cryptstatus = CCCrypt(\n                                          kCCDecrypt,                  // CCOperation op,         /* kCCEncrypt, kCCDecrypt */\n                                          kCCAlgorithmAES,             // CCAlgorithm alg,        /* kCCAlgorithmAES128, etc. */\n                                          kCCOptionPKCS7Padding,       // CCOptions options,      /* kCCOptionPKCS7Padding, etc. */\n                                          digest256,                   // const void *key,\n                                          CC_SHA256_DIGEST_LENGTH,     // size_t keyLength,\n                                          NULL,                        // const void *iv,         /* optional initialization vector */\n                                          [_encryptedData bytes],      // const void *dataIn,     /* optional per op and alg */\n                                          [_encryptedData length],     // size_t dataInLength,\n                                          decryptedData.mutableBytes,  // void *dataOut,          /* data RETURNED here */\n                                          decryptedDataCapacity,       // size_t dataOutAvailable,\n                                          &dataOutMoved                // size_t *dataOutMoved\n                                          );\n    \n    if (cryptstatus != kCCSuccess) {\n        BTCDataClear(decryptedData);\n        BTCSecureMemset(&ctx256, 0, sizeof(ctx256));\n        decryptedData = nil;\n    } else {\n        // Resize the result key to the correct size.\n        decryptedData.length = dataOutMoved;\n    }\n    \n    // Clear sensitive info from memory.\n    \n    if ([pointX isKindOfClass:[NSMutableData class]]) {\n        BTCDataClear((NSMutableData*)pointX);\n    }\n    [pk clear];\n    [curvePoint clear];\n    BTCSecureMemset(&ctx256, 0, sizeof(ctx256));\n    \n    if (!decryptedData) {\n        BTCSecureMemset(digest256, 0, CC_SHA256_DIGEST_LENGTH);\n        return nil;\n    }\n\n    // 3. Verify the checksum.\n    \n    CC_SHA256_Init(&ctx256);\n    CC_SHA256_Update(&ctx256, digest256, CC_SHA256_DIGEST_LENGTH);\n    CC_SHA256_Update(&ctx256, decryptedData.bytes, (CC_LONG)decryptedData.length);\n    CC_SHA256_Final(digest256, &ctx256);\n    CC_SHA256_Init(&ctx256);\n    CC_SHA256_Update(&ctx256, digest256, CC_SHA256_DIGEST_LENGTH);\n    CC_SHA256_Final(digest256, &ctx256);\n    \n    if (_checksum.length != BTCFancyEncryptedMessageChecksumLength) {\n        BTCSecureMemset(digest256, 0, CC_SHA256_DIGEST_LENGTH);\n        return nil;\n    }\n    \n    if (memcmp(digest256, _checksum.bytes, BTCFancyEncryptedMessageChecksumLength) != 0) {\n        BTCSecureMemset(digest256, 0, CC_SHA256_DIGEST_LENGTH);\n        return nil;\n    }\n    \n    BTCSecureMemset(digest256, 0, CC_SHA256_DIGEST_LENGTH);\n    \n    return decryptedData;\n}\n\n\n\n// Returns 1-byte representation of a target not higher than a given one.\n// Maximum difficulty is the minimum target and vice versa.\n+ (uint8_t) compactTargetForTarget:(uint32_t)target {\n    return BTCEMCompactTargetForFullTarget(target);\n}\n\n\n// Returns a full 32-bit target from its compact representation.\n+ (uint32_t) targetForCompactTarget:(uint8_t)compactTarget {\n    return BTCEMFullTargetForCompactTarget(compactTarget);\n}\n\n\n\n@end\n\n\nstatic uint8_t BTCEMCompactTargetForFullTarget(uint32_t fullTarget) {\n    // Simply find the highest target that is not greater than a given one.\n    for (uint8_t ct = 0xFF; ct >= 0; --ct) {\n        if (BTCEMFullTargetForCompactTarget(ct) <= fullTarget) {\n            uint32_t order = ct >> 3;\n            if (order == 0) return ct >> 2;\n            if (order == 1) return ct & (0xff - 1 - 2);\n            if (order == 2) return ct & (0xff - 1);\n            return ct;\n        }\n    }\n    return 0;\n}\n\nstatic uint32_t BTCEMFullTargetForCompactTarget(uint8_t compactTarget) {\n    // 8 bits: a b c d e f g h\n    // a,b,c,d,e (higher bits) are used to determine the order (2^(0..31))\n    // f,g,h are following the order bit. The rest are 1's till the lowest bit.\n    \n    uint32_t order = compactTarget >> 3;\n    uint32_t tail = compactTarget & (1 + 2 + 4);\n    \n    if (order == 0) return (tail >> 2);\n    \n    // Compose a full tail where highest 3 bits are tail and the rest is ones.\n    // Then shift it where the order says.\n    \n    // [8 bits] [8 bits] [8 bits] [5 bits] [3 tail bits]\n    tail <<= 8 + 8 + 8 + 5;\n    tail += ((1 << (8 + 8 + 8 + 5)) - 1); // trailing 1's\n    \n    tail >>= 32 - order;\n    \n    uint32_t fullTarget = (1 << order) + tail;\n    \n    return fullTarget;\n}\n\n\n\n"
  },
  {
    "path": "Pods/CoreBitcoin/CoreBitcoin/BTCHashID.h",
    "content": "// CoreBitcoin by Oleg Andreev <oleganza@gmail.com>, WTFPL.\n\n#import <Foundation/Foundation.h>\n\n/*!\n * Converts string transaction or block ID (reversed tx hash in hex format) to binary hash.\n */\nNSData* BTCHashFromID(NSString* identifier);\n\n/*!\n * Converts hash of the transaction or block to its string ID (reversed hash in hex format).\n */\nNSString* BTCIDFromHash(NSData* hash);\n"
  },
  {
    "path": "Pods/CoreBitcoin/CoreBitcoin/BTCHashID.m",
    "content": "// CoreBitcoin by Oleg Andreev <oleganza@gmail.com>, WTFPL.\n\n#import \"BTCHashID.h\"\n#import \"BTCData.h\"\n\nNSData* BTCHashFromID(NSString* identifier) {\n    return BTCReversedData(BTCDataFromHex(identifier));\n}\n\nNSString* BTCIDFromHash(NSData* hash) {\n    return BTCHexFromData(BTCReversedData(hash));\n}\n"
  },
  {
    "path": "Pods/CoreBitcoin/CoreBitcoin/BTCKey.h",
    "content": "// CoreBitcoin by Oleg Andreev <oleganza@gmail.com>, WTFPL.\n\n#import <Foundation/Foundation.h>\n#import \"BTCSignatureHashType.h\"\n\n@class BTCCurvePoint;\n@class BTCPublicKeyAddress;\n@class BTCPublicKeyAddressTestnet;\n@class BTCPrivateKeyAddress;\n@class BTCPrivateKeyAddressTestnet;\n\n// BTCKey encapsulates EC public and private keypair (or only public part) on curve secp256k1.\n// You can sign data and verify signatures.\n// When instantiated with a public key, only signature verification is possible.\n// When instantiated with a private key, all operations are available.\n@interface BTCKey : NSObject\n\n// Newly generated random key pair.\n- (id) init;\n\n// Instantiates a key without a secret counterpart.\n// You can use -isValidSignature:hash:\n- (id) initWithPublicKey:(NSData*)publicKey;\n\n// Initializes public key using a point on elliptic curve secp256k1.\n- (id) initWithCurvePoint:(BTCCurvePoint*)curvePoint;\n\n// Instantiates a key with secret parameter (32 bytes).\n- (id) initWithPrivateKey:(NSData*)privateKey;\n\n// Instantiates with a WIF-encoded private key (52 bytes like 5znkrJzL5GTFCaXWufUCUaPzDmLj2Pe2pWtAcSzg4hRUVxS2XqHa).\n// See also -initWithPrivateKeyAddress.\n- (id) initWithWIF:(NSString*)wifString;\n\n// Instantiates with a DER-encoded private key (279 bytes).\n- (id) initWithDERPrivateKey:(NSData*)DERPrivateKey;\n\n// These properties return mutable copy of data so you can clear it if needed.\n\n// publicKey is compressed if -publicKeyCompressed is YES.\n@property(nonatomic, readonly) NSMutableData* publicKey;\n\n// These are returning explicitly compressed or uncompressed copies of the public key.\n@property(nonatomic, readonly) NSMutableData* compressedPublicKey;\n@property(nonatomic, readonly) NSMutableData* uncompressedPublicKey;\n\n// 32-byte secret parameter. That's all you need to get full key pair on secp256k1\n@property(nonatomic, readonly) NSMutableData* privateKey;\n\n// DER-encoded private key (279-byte) that includes secret and all curve parameters.\n@property(nonatomic, readonly) NSMutableData* DERPrivateKey;\n\n// Base58-encoded private key (or nil if privkey is not available).\n@property(nonatomic, readonly) NSString* WIF;\n@property(nonatomic, readonly) NSString* WIFTestnet;\n\n// When you set public key, this property reflects whether it is compressed or not.\n// To set this property you must have private counterpart. Then, -publicKey will be compressed/uncompressed accordingly.\n@property(nonatomic, getter=isPublicKeyCompressed) BOOL publicKeyCompressed;\n\n// Returns public key as a point on secp256k1 curve.\n@property(nonatomic, readonly) BTCCurvePoint* curvePoint;\n\n// Verifies signature for a given hash with a public key.\n- (BOOL) isValidSignature:(NSData*)signature hash:(NSData*)hash;\n\n// Multiplies a public key of the receiver with a given private key and returns resulting curve point as BTCKey object (pubkey only).\n// Pubkey compression flag is the same as on receiver.\n- (BTCKey*) diffieHellmanWithPrivateKey:(BTCKey*)privkey;\n\n// Returns a signature data for a 256-bit hash using private key.\n// Returns nil if signing failed or a private key is not present.\n- (NSData*) signatureForHash:(NSData*)hash;\n\n// Same as above, but also appends a hash type byte to the signature.\n- (NSData*) signatureForHash:(NSData*)hash hashType:(BTCSignatureHashType)hashType;\n- (NSData*) signatureForHash:(NSData*)hash withHashType:(BTCSignatureHashType)hashType DEPRECATED_ATTRIBUTE;\n\n// [RFC6979 implementation](https://tools.ietf.org/html/rfc6979).\n// Returns 32-byte `k` nonce generated deterministically from the `hash` and the private key.\n// Returns a mutable data to make it clearable.\n- (NSMutableData*) signatureNonceForHash:(NSData*)hash;\n\n// Clears all key data from memory making receiver invalid.\n- (void) clear;\n\n\n// BTCAddress Import/Export\n\n\n// Instantiate with a private key in a form of address. Also takes care about compressing pubkey if needed.\n- (id) initWithPrivateKeyAddress:(BTCPrivateKeyAddress*)privateKeyAddress;\n\n// Public key hash.\n// IMPORTANT: resulting address depends on whether `publicKeyCompressed` is YES or NO.\n@property(nonatomic, readonly) BTCPublicKeyAddress* publicKeyAddress DEPRECATED_ATTRIBUTE;\n\n// Public key hash.\n// IMPORTANT: resulting address depends on whether `publicKeyCompressed` is YES or NO.\n@property(nonatomic, readonly) BTCPublicKeyAddress* address;\n@property(nonatomic, readonly) BTCPublicKeyAddressTestnet* addressTestnet;\n\n// Returns address for a public key (Hash160(pubkey)).\n@property(nonatomic, readonly) BTCPublicKeyAddress* uncompressedPublicKeyAddress;\n@property(nonatomic, readonly) BTCPublicKeyAddress* compressedPublicKeyAddress;\n\n// Private key encoded in sipa format (base58 with compression flag).\n@property(nonatomic, readonly) BTCPrivateKeyAddress* privateKeyAddress;\n@property(nonatomic, readonly) BTCPrivateKeyAddressTestnet* privateKeyAddressTestnet;\n\n\n\n\n\n// Compact Signature\n// 65 byte signature, which allows reconstructing the used public key.\n\n// Returns a compact signature for 256-bit hash. Aka \"CKey::SignCompact\" in BitcoinQT.\n// Initially used for signing text messages (see BTCKey+BitcoinSignedMessage).\n- (NSData*) compactSignatureForHash:(NSData*)data;\n\n// Verifies digest against given compact signature. On success returns a public key.\n+ (BTCKey*) verifyCompactSignature:(NSData*)compactSignature forHash:(NSData*)hash;\n\n// Verifies signature of the hash with its public key.\n- (BOOL) isValidCompactSignature:(NSData*)signature forHash:(NSData*)hash;\n\n\n\n\n\n// Bitcoin Signed Message\n// BitcoinQT-compatible textual message signing API\n\n\n\n// Returns a signature for message prepended with \"Bitcoin Signed Message:\\n\" line.\n- (NSData*) signatureForMessage:(NSString*)message;\n- (NSData*) signatureForBinaryMessage:(NSData*)data;\n\n// Verifies message against given signature. On success returns a public key.\n+ (BTCKey*) verifySignature:(NSData*)signature forMessage:(NSString*)message;\n+ (BTCKey*) verifySignature:(NSData*)signature forBinaryMessage:(NSData*)data;\n\n// Verifies signature of the message with its public key.\n- (BOOL) isValidSignature:(NSData*)signature forMessage:(NSString*)message;\n- (BOOL) isValidSignature:(NSData*)signature forBinaryMessage:(NSData*)data;\n\n\n// Canonical checks\n\n// Used by BitcoinQT within OP_CHECKSIG to not relay transactions with non-canonical signature or a public key.\n// Normally, signatures and pubkeys are encoded in a canonical form and majority of the transactions are good.\n// Unfortunately, sometimes OpenSSL segfaults on some garbage data in place of a signature or a pubkey.\n// Read more on that here: https://bitcointalk.org/index.php?topic=8392.80\n\n// Note: non-canonical pubkey could still be valid for EC internals of OpenSSL and thus accepted by Bitcoin nodes.\n+ (BOOL) isCanonicalPublicKey:(NSData*)data error:(NSError**)errorOut;\n\n// Checks if the script signature is canonical.\n// The signature is assumed to include hash type byte (see BTCSignatureHashType).\n+ (BOOL) isCanonicalSignatureWithHashType:(NSData*)data verifyLowerS:(BOOL)verifyLowerS error:(NSError**)errorOut;\n\n+ (BOOL) isCanonicalSignatureWithHashType:(NSData*)data verifyEvenS:(BOOL)verifyEvenS error:(NSError**)errorOut DEPRECATED_ATTRIBUTE;\n\n\n@end\n\n\n"
  },
  {
    "path": "Pods/CoreBitcoin/CoreBitcoin/BTCKey.m",
    "content": "// Oleg Andreev <oleganza@gmail.com>\n\n#import \"BTCKey.h\"\n#import \"BTCData.h\"\n#import \"BTCAddress.h\"\n#import \"BTCCurvePoint.h\"\n#import \"BTCBigNumber.h\"\n#import \"BTCProtocolSerialization.h\"\n#import \"BTCErrors.h\"\n#include <CommonCrypto/CommonCrypto.h>\n#include <openssl/ec.h>\n#include <openssl/ecdsa.h>\n#include <openssl/evp.h>\n#include <openssl/obj_mac.h>\n#include <openssl/bn.h>\n#include <openssl/rand.h>\n\n#define CHECK_IF_CLEARED if (_cleared) { [[NSException exceptionWithName:@\"BTCKey: instance was already cleared.\" reason:@\"\" userInfo:nil] raise]; }\n\n#define BTCCompressedPubkeyLength   (33)\n#define BTCUncompressedPubkeyLength (65)\n\nstatic BOOL    BTCKeyCheckPrivateKeyRange(const unsigned char *secret, size_t length);\nstatic BOOL    BTCKeyCheckSignatureElement(const unsigned char *bytes, int length, BOOL half);\nstatic int     BTCRegenerateKey(EC_KEY *eckey, BIGNUM *priv_key);\nstatic NSData* BTCSignatureHashForBinaryMessage(NSData* data);\nstatic int     ECDSA_SIG_recover_key_GFp(EC_KEY *eckey, ECDSA_SIG *ecsig, const unsigned char *msg, int msglen, int recid, int check);\n\n@interface BTCKey ()\n@end\n\n@implementation BTCKey {\n    BOOL _cleared;\n    EC_KEY* _key;\n    NSMutableData* _publicKey;\n    BOOL _publicKeyCompressed;\n}\n\n- (id) initWithNewKeyPair:(BOOL)createKeyPair {\n    if (self = [super init]) {\n        [self prepareKeyIfNeeded];\n        if (createKeyPair) [self generateKeyPair];\n    }\n    return self;\n}\n\n- (id) init {\n    return [self initWithNewKeyPair:YES];\n}\n\n- (id) initWithPublicKey:(NSData*)publicKey {\n    if (self = [super init]) {\n        if (![self isValidPubKey:publicKey]) return nil;\n        [self setPublicKey:publicKey];\n    }\n    return self;\n}\n\n- (id) initWithCurvePoint:(BTCCurvePoint*)curvePoint {\n    if (self = [super init]) {\n        if (!curvePoint) return nil;\n        [self prepareKeyIfNeeded];\n        EC_KEY_set_public_key(_key, curvePoint.EC_POINT);\n    }\n    return self;\n}\n\n- (id) initWithWIF:(NSString*)wifString {\n    BTCPrivateKeyAddress* addr = [BTCPrivateKeyAddress addressWithString:wifString];\n    if (![addr isKindOfClass:[BTCPrivateKeyAddress class]]) {\n        return nil;\n    }\n    return [self initWithPrivateKeyAddress:addr];\n}\n\n- (id) initWithDERPrivateKey:(NSData*)DERPrivateKey {\n    if (self = [super init]) {\n        [self setDERPrivateKey:DERPrivateKey];\n    }\n    return self;\n}\n\n- (id) initWithPrivateKey:(NSData*)privateKey {\n    if (self = [super init]) {\n        [self setPrivateKey:privateKey];\n    }\n    return self;\n}\n\n- (void) dealloc {\n    [self clear];\n}\n\n- (void) clear {\n    BTCDataClear(_publicKey);\n    _publicKey = nil;\n\n    // I couldn't find how to clear sensitive key data in OpenSSL,\n    // so I just replace existing key with a new one.\n    // Correct me if I'm doing it wrong.\n    if (!_cleared) [self generateKeyPair];\n\n    if (_key) EC_KEY_free(_key);\n    _key = NULL;\n\n    _cleared = YES;\n}\n\n// Verifies signature for a given hash with a public key.\n- (BOOL) isValidSignature:(NSData*)signature hash:(NSData*)hash {\n    CHECK_IF_CLEARED;\n\n    if (hash.length == 0 || signature.length == 0) return NO;\n    \n    // -1 = error, 0 = bad sig, 1 = good\n    if (ECDSA_verify(0, (unsigned char*)hash.bytes,      (int)hash.length,\n                        (unsigned char*)signature.bytes, (int)signature.length,\n                        _key) != 1)\n    {\n        return NO;\n    }\n    \n    return YES;\n}\n\n// Returns a signature data for a 256-bit hash using private key.\n- (NSData*)signatureForHash:(NSData*)hash {\n    return [self signatureForHash:hash appendHashType:NO hashType:0];\n}\n\n// Same as above, but also appends a hash type byte to the signature.\n- (NSData*)signatureForHash:(NSData*)hash hashType:(BTCSignatureHashType)hashType {\n   return [self signatureForHash:hash appendHashType:YES hashType:hashType];\n}\n\n- (NSData*)signatureForHash:(NSData*)hash withHashType:(BTCSignatureHashType)hashType {\n    return [self signatureForHash:hash appendHashType:YES hashType:hashType];\n}\n\n- (NSData*)signatureForHash:(NSData*)hash appendHashType:(BOOL)appendHashType hashType:(BTCSignatureHashType)hashType {\n    CHECK_IF_CLEARED;\n\n    // ECDSA signature is a pair of numbers: (Kx, s)\n    // Where Kx = x coordinate of k*G mod n (n is the order of secp256k1).\n    // And s = (k^-1)*(h + Kx*privkey).\n    // By default, k is chosen randomly on interval [0, n - 1].\n    // But this makes signatures harder to test and allows faulty or backdoored RNGs to leak private keys from ECDSA signatures.\n    // To avoid these issues, we'll generate k = Hash256(hash || privatekey) and make all computations by hand.\n    //\n    // Note: if one day you think it's a good idea to mix in some extra entropy as an option,\n    //       ask yourself why Hash(message || privkey) is not unpredictable enough.\n    //       IMHO, it is as predictable as privkey and making it any stronger has no point since\n    //       guessing the privkey allows anyone to do the same as guessing the k: sign any\n    //       other transaction with that key. Also, the same hash function is used for computing\n    //       the message hash and needs to be preimage resistant. If it's weak, anyone can recover the\n    //       private key from a few observed signatures. Using the same function to derive k therefore\n    //       does not make the signature any less secure.\n    //\n\n    ECDSA_SIG sigValue;\n    ECDSA_SIG *sig = NULL;\n\n    /* deterministic signature with nonce derived from message and private key */\n    sig = &sigValue;\n    \n    const BIGNUM *privkeyBIGNUM = EC_KEY_get0_private_key(_key);\n\n    BTCMutableBigNumber* privkeyBN = [[BTCMutableBigNumber alloc] initWithBIGNUM:privkeyBIGNUM];\n    BTCBigNumber* n = [BTCCurvePoint curveOrder];\n\n    NSMutableData* kdata = [self signatureNonceForHash:hash];\n    BTCMutableBigNumber* k = [[BTCMutableBigNumber alloc] initWithUnsignedBigEndian:kdata];\n    [k mod:n]; // make sure k belongs to [0, n - 1]\n\n    BTCDataClear(kdata);\n\n    BTCCurvePoint* K = [[BTCCurvePoint generator] multiply:k];\n    BTCBigNumber* Kx = K.x;\n\n    BTCBigNumber* hashBN = [[BTCBigNumber alloc] initWithUnsignedBigEndian:hash];\n\n    // Compute s = (k^-1)*(h + Kx*privkey)\n\n    BTCBigNumber* signatureBN = [[[privkeyBN multiply:Kx mod:n] add:hashBN mod:n] multiply:[k inverseMod:n] mod:n];\n\n    //NSLog(@\"ECDSA: r = %@\", Kx.hexString);\n    //NSLog(@\"ECDSA: s = %@\", signatureBN.hexString);\n    BIGNUM r; BN_init(&r); BN_copy(&r, Kx.BIGNUM);\n    BIGNUM s; BN_init(&s); BN_copy(&s, signatureBN.BIGNUM);\n\n    [privkeyBN clear];\n    [k clear];\n    [hashBN clear];\n    [K clear];\n    [Kx clear];\n    [signatureBN clear];\n\n    sig->r = &r;\n    sig->s = &s;\n\n    BN_CTX *ctx = BN_CTX_new();\n    BN_CTX_start(ctx);\n\n    const EC_GROUP *group = EC_KEY_get0_group(_key);\n    BIGNUM *order = BN_CTX_get(ctx);\n    BIGNUM *halforder = BN_CTX_get(ctx);\n    EC_GROUP_get_order(group, order, ctx);\n    BN_rshift1(halforder, order);\n    if (BN_cmp(sig->s, halforder) > 0) {\n        // enforce low S values, by negating the value (modulo the order) if above order/2.\n        BN_sub(sig->s, order, sig->s);\n    }\n    BN_CTX_end(ctx);\n    BN_CTX_free(ctx);\n    unsigned int sigSize = ECDSA_size(_key);\n\n    NSMutableData* signature = [NSMutableData dataWithLength:sigSize + 16]; // Make sure it is big enough\n\n    unsigned char *pos = (unsigned char *)signature.mutableBytes;\n    sigSize = i2d_ECDSA_SIG(sig, &pos);\n\n    [signature setLength:sigSize];  // Shrink to fit actual size\n\n    if (appendHashType) {\n        [signature appendBytes:&hashType length:sizeof(hashType)];\n    }\n\n    return signature;\n    \n    // This code is simpler but it produces random signatures and does not canonicalize S as done above.\n    // \n    //    unsigned int sigSize = ECDSA_size(_key);\n    //    NSMutableData* signature = [NSMutableData dataWithLength:sigSize];\n    //\n    //    if (!ECDSA_sign(0, (unsigned char*)hash.bytes, (int)hash.length, signature.mutableBytes, &sigSize, _key))\n    //    {\n    //        BTCDataClear(signature);\n    //        return nil;\n    //    }\n    //    [signature setLength:sigSize];\n    //    \n    //    return signature;\n}\n\n// [RFC6979 implementation](https://tools.ietf.org/html/rfc6979#section-3.2).\n// Returns 32-byte `k` nonce generated deterministically from the `hash` and the private key.\n- (NSMutableData*) signatureNonceForHash:(NSData*)hash {\n\n    NSMutableData* privkey = [self privateKey];\n    BTCBigNumber* order = [BTCCurvePoint curveOrder];\n\n    uint8_t v[32];\n    uint8_t k[32];\n    uint8_t bx[2*32];\n    uint8_t buf[32 + 1 + sizeof(bx)];\n    uint8_t t[32];\n\n    // Step 3.2.a. hash = H(message). Already performed by the caller.\n\n    // Step 3.2.b. V = 0x01 0x01 0x01 ... 0x01 (32 bytes equal 0x01)\n    memset(v, 1, sizeof(v));\n\n    // Step 3.2.c. K = 0x00 0x00 0x00 ... 0x00 (32 bytes equal 0x00)\n    memset(k, 0, sizeof(k));\n\n    // Step 3.2.d. K = HMAC-SHA256(key: K, data: V || 0x00 || int2octets(privkey) || bits2octets(hash))\n    memcpy(bx, privkey.bytes, 32);\n    BTCMutableBigNumber* hashModOrder = [[[BTCMutableBigNumber alloc] initWithUnsignedBigEndian:hash] mod:order];\n    memcpy(bx + 32, hashModOrder.unsignedBigEndian.bytes, 32);\n\n    memcpy(buf, v, sizeof(v));\n    buf[sizeof(v)] = 0x00;\n    memcpy(buf + sizeof(v) + 1, bx, 64);\n\n    CCHmac(kCCHmacAlgSHA256, k, sizeof(k), buf, sizeof(buf), k);\n\n    // Step 3.2.e. V = HMAC-SHA256(key: K, data: V)\n    CCHmac(kCCHmacAlgSHA256, k, sizeof(k), v, sizeof(v), v);\n\n    // Step 3.2.f. K = HMAC-SHA256(key: K, data: V || 0x01 || int2octets(privkey) || bits2octets(hash))\n    memcpy(buf, v, sizeof(v));\n    buf[sizeof(v)] = 0x01;\n    memcpy(buf + sizeof(v) + 1, bx, 64);\n    CCHmac(kCCHmacAlgSHA256, k, sizeof(k), buf, sizeof(buf), k);\n\n    // Step 3.2.g. V = HMAC-SHA256(key: K, data: V)\n    CCHmac(kCCHmacAlgSHA256, k, sizeof(k), v, sizeof(v), v);\n\n    // Step 3.2.h.\n    for (int i = 0; i < 10000; i++) {\n        CCHmac(kCCHmacAlgSHA256, k, sizeof(k), v, sizeof(v), t);\n\n        BTCBigNumber* bn = [[BTCBigNumber alloc] initWithUnsignedBigEndian:[NSData dataWithBytesNoCopy:t length:sizeof(t) freeWhenDone:NO]];\n        if (!bn.isZero && [bn less:order]) {\n            return [NSMutableData dataWithBytes:&t length:sizeof(t)];\n        }\n        // Note: the probability of not succeeding at the first try is about 2^-127.\n        memcpy(buf, v, sizeof(v));\n        buf[sizeof(v)] = 0x00;\n        CCHmac(kCCHmacAlgSHA256, k, sizeof(k), buf, sizeof(v) + 1, k);\n        CCHmac(kCCHmacAlgSHA256, k, sizeof(k), v, sizeof(v), v);\n    }\n    // we generated 10000 numbers, none of them is good -> fail.\n    return nil;\n}\n\n- (NSMutableData*) publicKey {\n    CHECK_IF_CLEARED;\n    return [NSMutableData dataWithData:[self publicKeyCached]];\n}\n\n- (NSMutableData*) publicKeyCached {\n    CHECK_IF_CLEARED;\n    if (!_publicKey) {\n        _publicKey = [self publicKeyWithCompression:_publicKeyCompressed];\n    }\n    return _publicKey;\n}\n\n- (NSMutableData*) compressedPublicKey {\n    return [self publicKeyWithCompression:YES];\n}\n\n- (NSMutableData*) uncompressedPublicKey {\n    return [self publicKeyWithCompression:NO];\n}\n\n\n- (NSMutableData*) publicKeyWithCompression:(BOOL)compression {\n    CHECK_IF_CLEARED;\n    if (!_key) return nil;\n    EC_KEY_set_conv_form(_key, compression ? POINT_CONVERSION_COMPRESSED : POINT_CONVERSION_UNCOMPRESSED);\n    int length = i2o_ECPublicKey(_key, NULL);\n    if (!length) return nil;\n    NSAssert(length <= 65, @\"Pubkey length must be up to 65 bytes.\");\n    NSMutableData* data = [[NSMutableData alloc] initWithLength:length];\n    unsigned char* bytes = [data mutableBytes];\n    if (i2o_ECPublicKey(_key, &bytes) != length) return nil;\n    return data;\n}\n\n- (BTCCurvePoint*) curvePoint {\n    CHECK_IF_CLEARED;\n    const EC_POINT* ecpoint = EC_KEY_get0_public_key(_key);\n    BTCCurvePoint* cp = [[BTCCurvePoint alloc] initWithEC_POINT:ecpoint];\n    return cp;\n}\n\n- (NSMutableData*) DERPrivateKey {\n    CHECK_IF_CLEARED;\n    if (!_key) return nil;\n    int length = i2d_ECPrivateKey(_key, NULL);\n    if (!length) return nil;\n    NSMutableData* data = [[NSMutableData alloc] initWithLength:length];\n    unsigned char* bytes = [data mutableBytes];\n    if (i2d_ECPrivateKey(_key, &bytes) != length) return nil;\n    return data;\n}\n\n- (NSMutableData*) privateKey {\n    CHECK_IF_CLEARED;\n    if (!_key) return nil;\n    const BIGNUM *bignum = EC_KEY_get0_private_key(_key);\n    if (!bignum) return nil;\n    int num_bytes = BN_num_bytes(bignum);\n    NSMutableData* data = [[NSMutableData alloc] initWithLength:32];\n    int copied_bytes = BN_bn2bin(bignum, &data.mutableBytes[32 - num_bytes]);\n    if (copied_bytes != num_bytes) return nil;\n    return data;\n}\n\n- (NSString*) WIF {\n    if (!self.privateKey) return nil;\n    return [self privateKeyAddress].string;\n}\n\n- (NSString*) WIFTestnet {\n    if (!self.privateKey) return nil;\n    return [self privateKeyAddressTestnet].string;\n}\n\n- (void) setPublicKey:(NSData *)publicKey {\n    CHECK_IF_CLEARED;\n    if (publicKey.length == 0) return;\n    _publicKey = [NSMutableData dataWithData:publicKey];\n    \n    _publicKeyCompressed = ([self lengthOfPubKey:_publicKey] == BTCCompressedPubkeyLength);\n    \n    [self prepareKeyIfNeeded];\n    \n    const unsigned char* bytes = publicKey.bytes;\n    if (!o2i_ECPublicKey(&_key, &bytes, publicKey.length)) {\n        _publicKey = nil;\n        _publicKeyCompressed = NO;\n    }\n}\n\n- (void) setDERPrivateKey:(NSData *)DERPrivateKey {\n    CHECK_IF_CLEARED;\n    if (!DERPrivateKey) return;\n    \n    BTCDataClear(_publicKey); _publicKey = nil;\n    [self prepareKeyIfNeeded];\n    \n    const unsigned char* bytes = DERPrivateKey.bytes;\n    if (!d2i_ECPrivateKey(&_key, &bytes, DERPrivateKey.length)) {\n        // OpenSSL failed for some weird reason. I have no idea what we should do.\n    }\n}\n\n- (void) setPrivateKey:(NSData *)privateKey {\n    CHECK_IF_CLEARED;\n    if (!privateKey) return;\n    \n    BTCDataClear(_publicKey); _publicKey = nil;\n    [self prepareKeyIfNeeded];\n\n    if (!_key) return;\n    \n    BIGNUM *bignum = BN_bin2bn(privateKey.bytes, (int)privateKey.length, BN_new());\n    \n    if (!bignum) return;\n    \n    BTCRegenerateKey(_key, bignum);\n    BN_clear_free(bignum);\n}\n\n- (BOOL) isPublicKeyCompressed {\n    CHECK_IF_CLEARED;\n    return _publicKeyCompressed;\n}\n\n- (void) setPublicKeyCompressed:(BOOL)flag {\n    CHECK_IF_CLEARED;\n    _publicKey = nil;\n    _publicKeyCompressed = flag;\n}\n\n- (void) generateKeyPair {\n    CHECK_IF_CLEARED;\n    [self prepareKeyIfNeeded];\n    NSMutableData* secret = [NSMutableData dataWithLength:32];\n    unsigned char* bytes = secret.mutableBytes;\n    do {\n        RAND_bytes(bytes, 32);\n    } while (!BTCKeyCheckPrivateKeyRange(bytes, 32));\n    [self setPrivateKey:secret];\n    BTCDataClear(secret);\n}\n\n- (void) prepareKeyIfNeeded {\n    CHECK_IF_CLEARED;\n    if (_key) return;\n    _key = EC_KEY_new_by_curve_name(NID_secp256k1);\n    if (!_key) {\n        // This should not generally happen.\n    }\n}\n\n\n\n\n#pragma mark - NSObject\n\n\n\n- (id) copy {\n    CHECK_IF_CLEARED;\n    BTCKey* newKey = [[BTCKey alloc] initWithNewKeyPair:NO];\n    if (_key) newKey->_key = EC_KEY_dup(_key);\n    return newKey;\n}\n\n- (BOOL) isEqual:(BTCKey*)otherKey {\n    CHECK_IF_CLEARED;\n    if (![otherKey isKindOfClass:[self class]]) return NO;\n    return [self.publicKeyCached isEqual:otherKey.publicKeyCached];\n}\n\n- (NSUInteger) hash {\n    CHECK_IF_CLEARED;\n    return [self.publicKeyCached hash];\n}\n\n- (NSString*) description {\n    return [NSString stringWithFormat:@\"<BTCKey:0x%p %@>\", self, BTCHexFromData(self.publicKeyCached)];\n}\n\n- (NSString*) debugDescription\n{\n    return [NSString stringWithFormat:@\"<BTCKey:0x%p pubkey:%@ privkey:%@>\", self, BTCHexFromData(self.publicKeyCached), BTCHexFromData(self.privateKey)];\n}\n\n\n\n- (NSUInteger) lengthOfPubKey:(NSData*)data {\n    if (data.length == 0) return 0;\n    \n    unsigned char header = ((const unsigned char*)data.bytes)[0];\n    if (header == 2 || header == 3)\n        return BTCCompressedPubkeyLength;\n    if (header == 4 || header == 6 || header == 7)\n        return BTCUncompressedPubkeyLength;\n    return 0;\n}\n\n- (BOOL) isValidPubKey:(NSData*)data {\n    CHECK_IF_CLEARED;\n    NSUInteger length = data.length;\n    return length > 0 && [self lengthOfPubKey:data] == length;\n}\n\n\n\n\n\n#pragma mark - BTCAddress Import/Export\n\n\n\n\n- (id) initWithPrivateKeyAddress:(BTCPrivateKeyAddress*)privateKeyAddress {\n    if (self = [self initWithNewKeyPair:NO]) {\n        [self setPrivateKey:privateKeyAddress.data];\n        [self setPublicKeyCompressed:privateKeyAddress.publicKeyCompressed];\n    }\n    return self;\n}\n\n- (BTCPublicKeyAddress*) publicKeyAddress {\n    CHECK_IF_CLEARED;\n    NSData* pubkey = [self publicKeyCached];\n    if (pubkey.length == 0) return nil;\n    return [BTCPublicKeyAddress addressWithData:BTCHash160(pubkey)];\n}\n\n- (BTCPublicKeyAddress*) address {\n    CHECK_IF_CLEARED;\n    NSData* pubkey = [self publicKeyCached];\n    if (pubkey.length == 0) return nil;\n    return [BTCPublicKeyAddress addressWithData:BTCHash160(pubkey)];\n}\n\n- (BTCPublicKeyAddressTestnet*) addressTestnet {\n    CHECK_IF_CLEARED;\n    NSData* pubkey = [self publicKeyCached];\n    if (pubkey.length == 0) return nil;\n    return [BTCPublicKeyAddressTestnet addressWithData:BTCHash160(pubkey)];\n}\n\n- (BTCPublicKeyAddress*) compressedPublicKeyAddress {\n    CHECK_IF_CLEARED;\n    NSData* pubkey = [self compressedPublicKey];\n    if (pubkey.length == 0) return nil;\n    return [BTCPublicKeyAddress addressWithData:BTCHash160(pubkey)];\n}\n\n- (BTCPublicKeyAddress*) uncompressedPublicKeyAddress {\n    CHECK_IF_CLEARED;\n    NSData* pubkey = [self uncompressedPublicKey];\n    if (pubkey.length == 0) return nil;\n    return [BTCPublicKeyAddress addressWithData:BTCHash160(pubkey)];\n}\n\n- (BTCPrivateKeyAddress*) privateKeyAddress {\n    CHECK_IF_CLEARED;\n    NSMutableData* privkey = self.privateKey;\n    if (privkey.length == 0) return nil;\n    \n    BTCPrivateKeyAddress* result = [BTCPrivateKeyAddress addressWithData:privkey publicKeyCompressed:self.isPublicKeyCompressed];\n    BTCDataClear(privkey);\n    return result;\n}\n\n\n- (BTCPrivateKeyAddressTestnet*) privateKeyAddressTestnet {\n    CHECK_IF_CLEARED;\n    NSMutableData* privkey = self.privateKey;\n    if (privkey.length == 0) return nil;\n\n    BTCPrivateKeyAddressTestnet* result = [BTCPrivateKeyAddressTestnet addressWithData:privkey publicKeyCompressed:self.isPublicKeyCompressed];\n    BTCDataClear(privkey);\n    return result;\n}\n\n\n\n\n\n\n\n#pragma mark - Compact Signature\n\n\n\n\n\n\n// Returns a compact signature for 256-bit hash. Aka \"CKey::SignCompact\" in BitcoinQT.\n// Initially used for signing text messages.\n//\n// The format is one header byte, followed by two times 32 bytes for the serialized r and s values.\n// The header byte: 0x1B = first key with even y, 0x1C = first key with odd y,\n//                  0x1D = second key with even y, 0x1E = second key with odd y,\n//                  add 0x04 for compressed keys.\n- (NSData*) compactSignatureForHash:(NSData*)hash {\n    CHECK_IF_CLEARED;\n    NSMutableData* sigdata = [NSMutableData dataWithLength:65];\n    unsigned char* sigbytes = sigdata.mutableBytes;\n    const unsigned char* hashbytes = hash.bytes;\n    int hashlength = (int)hash.length;\n    \n    int rec = -1;\n    \n    unsigned char *p64 = (sigbytes + 1); // first byte is reserved for header.\n    \n    ECDSA_SIG *sig = ECDSA_do_sign(hashbytes, hashlength, _key);\n    if (sig==NULL) {\n        return nil;\n    }\n    memset(p64, 0, 64);\n    int nBitsR = BN_num_bits(sig->r);\n    int nBitsS = BN_num_bits(sig->s);\n    if (nBitsR <= 256 && nBitsS <= 256) {\n        NSData* pubkey = [self compressedPublicKey];\n        BOOL foundMatchingPubkey = NO;\n        for (int i=0; i < 4; i++) {\n            // It will be updated via direct access to _key ivar.\n            BTCKey* key2 = [[BTCKey alloc] initWithNewKeyPair:NO];\n            if (ECDSA_SIG_recover_key_GFp(key2->_key, sig, hashbytes, hashlength, i, 1) == 1) {\n                NSData* pubkey2 = [key2 compressedPublicKey];\n                if ([pubkey isEqual:pubkey2]) {\n                    rec = i;\n                    foundMatchingPubkey = YES;\n                    break;\n                }\n            }\n        }\n        NSAssert(foundMatchingPubkey, @\"At least one signature must work.\");\n        BN_bn2bin(sig->r,&p64[32-(nBitsR+7)/8]);\n        BN_bn2bin(sig->s,&p64[64-(nBitsS+7)/8]);\n    }\n    ECDSA_SIG_free(sig);\n    \n    // First byte is a header\n    sigbytes[0] = 0x1b + rec + (self.isPublicKeyCompressed ? 4 : 0);\n    return sigdata;\n}\n\n// Verifies digest against given compact signature. On success returns a public key.\n// Reconstruct public key from a compact signature\n// This is only slightly more CPU intensive than just verifying it.\n// If this function succeeds, the recovered public key is guaranteed to be valid\n// (the signature is a valid signature of the given data for that key).\n+ (BTCKey*) verifyCompactSignature:(NSData*)compactSignature forHash:(NSData*)hash {\n    if (compactSignature.length != 65) return nil;\n    \n    const unsigned char* sigbytes = compactSignature.bytes;\n    BOOL compressedPubKey = (sigbytes[0] - 0x1b) & 4;\n    int rec = (sigbytes[0] - 0x1b) & ~4;\n    const unsigned char* p64 = sigbytes + 1;\n    \n    // It will be updated via direct access to _key ivar.\n    BTCKey* key = [[BTCKey alloc] initWithNewKeyPair:NO];\n    key.publicKeyCompressed = compressedPubKey;\n    \n    if (rec<0 || rec>=3) {\n        // Invalid variant of a pubkey.\n        return nil;\n    }\n    ECDSA_SIG *sig = ECDSA_SIG_new();\n    BN_bin2bn(&p64[0],  32, sig->r);\n    BN_bin2bn(&p64[32], 32, sig->s);\n    BOOL result = (1 == ECDSA_SIG_recover_key_GFp(key->_key, sig, (unsigned char*)hash.bytes, (int)hash.length, rec, 0));\n    ECDSA_SIG_free(sig);\n    \n    // Failed to recover a pubkey.\n    if (!result) return nil;\n    \n    return key;\n}\n\n// Verifies signature of the hash with its public key.\n- (BOOL) isValidCompactSignature:(NSData*)signature forHash:(NSData*)hash {\n    CHECK_IF_CLEARED;\n    BTCKey* key = [[self class] verifyCompactSignature:signature forHash:hash];\n    return [key isEqual:self];\n}\n\n\n// Multiplies a public key of the receiver with a given private key and returns resulting curve point as BTCKey object (pubkey only).\n// Pubkey compression flag is the same as on receiver.\n- (BTCKey*) diffieHellmanWithPrivateKey:(BTCKey*)privkey {\n\n    BTCCurvePoint* curvePoint = self.curvePoint;\n    BTCBigNumber* pk = [[BTCBigNumber alloc] initWithUnsignedBigEndian:privkey.privateKey];\n\n    NSAssert(curvePoint, @\"sanity check\");\n    NSAssert(pk, @\"sanity check\");\n\n    // D-H happens here.\n    [curvePoint multiply:pk];\n\n    BTCKey* dhKey = [[BTCKey alloc] initWithCurvePoint:curvePoint];\n    dhKey.publicKeyCompressed = self.publicKeyCompressed;\n\n    return dhKey;\n}\n\n\n\n\n\n\n\n\n\n\n\n\n\n#pragma mark - Bitcoin Signed Message\n\n\n\n\n\n// Returns a signature for a message prepended with \"Bitcoin Signed Message:\\n\" line.\n- (NSData*) signatureForMessage:(NSString*)message {\n    return [self signatureForBinaryMessage:[message dataUsingEncoding:NSASCIIStringEncoding]];\n}\n\n- (NSData*) signatureForBinaryMessage:(NSData*)data {\n    if (!data) return nil;\n    return [self compactSignatureForHash:BTCSignatureHashForBinaryMessage(data)];\n}\n\n// Verifies message against given signature. On success returns a public key.\n+ (BTCKey*) verifySignature:(NSData*)signature forMessage:(NSString*)message {\n    return [self verifySignature:signature forBinaryMessage:[message dataUsingEncoding:NSASCIIStringEncoding]];\n}\n\n+ (BTCKey*) verifySignature:(NSData*)signature forBinaryMessage:(NSData *)data {\n    if (!signature || !data) return nil;\n    return [self verifyCompactSignature:signature forHash:BTCSignatureHashForBinaryMessage(data)];\n}\n\n- (BOOL) isValidSignature:(NSData*)signature forMessage:(NSString*)message {\n    return [self isValidSignature:signature forBinaryMessage:[message dataUsingEncoding:NSASCIIStringEncoding]];\n}\n\n- (BOOL) isValidSignature:(NSData*)signature forBinaryMessage:(NSData *)data {\n    BTCKey* key = [[self class] verifySignature:signature forBinaryMessage:data];\n    return [key isEqual:self];\n}\n\n\n\n\n\n\n\n#pragma mark - Canonical Checks\n\n\n\n// Note: non-canonical pubkey could still be valid for EC internals of OpenSSL and thus accepted by Bitcoin nodes.\n+ (BOOL) isCanonicalPublicKey:(NSData*)data error:(NSError**)errorOut {\n    NSUInteger length = data.length;\n    const char* bytes = [data bytes];\n    \n    // Non-canonical public key: too short\n    if (length < 33) {\n        if (errorOut) *errorOut = [NSError errorWithDomain:BTCErrorDomain code:BTCErrorNonCanonicalPublicKey userInfo:@{NSLocalizedDescriptionKey: NSLocalizedString(@\"Non-canonical public key: too short.\", @\"\")}];\n        return NO;\n    }\n    \n    if (bytes[0] == 0x04) {\n        // Length of uncompressed key must be 65 bytes.\n        if (length == 65) return YES;\n        \n        if (errorOut) *errorOut = [NSError errorWithDomain:BTCErrorDomain code:BTCErrorNonCanonicalPublicKey userInfo:@{NSLocalizedDescriptionKey: NSLocalizedString(@\"Non-canonical public key: length of uncompressed key must be 65 bytes.\", @\"\")}];\n        \n        return NO;\n    } else if (bytes[0] == 0x02 || bytes[0] == 0x03) {\n        // Length of compressed key must be 33 bytes.\n        if (length == 33) return YES;\n        \n        if (errorOut) *errorOut = [NSError errorWithDomain:BTCErrorDomain code:BTCErrorNonCanonicalPublicKey userInfo:@{NSLocalizedDescriptionKey: NSLocalizedString(@\"Non-canonical public key: length of compressed key must be 33 bytes.\", @\"\")}];\n        \n        return NO;\n    }\n    \n    // Unknown public key format.\n    if (errorOut) *errorOut = [NSError errorWithDomain:BTCErrorDomain code:BTCErrorNonCanonicalPublicKey userInfo:@{NSLocalizedDescriptionKey: NSLocalizedString(@\"Unknown non-canonical public key.\", @\"\")}];\n    \n    return NO;\n}\n\n\n\n+ (BOOL) isCanonicalSignatureWithHashType:(NSData*)data verifyEvenS:(BOOL)verifyLowerS error:(NSError**)errorOut { // deprecated\n    return [self isCanonicalSignatureWithHashType:data verifyLowerS:verifyLowerS error:errorOut];\n}\n\n+ (BOOL) isCanonicalSignatureWithHashType:(NSData*)data verifyLowerS:(BOOL)verifyLowerS error:(NSError**)errorOut {\n    // See https://bitcointalk.org/index.php?topic=8392.msg127623#msg127623\n    // A canonical signature exists of: <30> <total len> <02> <len R> <R> <02> <len S> <S> <hashtype>\n    // Where R and S are not negative (their first byte has its highest bit not set), and not\n    // excessively padded (do not start with a 0 byte, unless an otherwise negative number follows,\n    // in which case a single 0 byte is necessary and even required).\n    \n    NSInteger length = data.length;\n    const unsigned char* bytes = data.bytes;\n    \n    // Non-canonical signature: too short\n    if (length < 9) {\n        if (errorOut) *errorOut = [NSError errorWithDomain:BTCErrorDomain code:BTCErrorNonCanonicalScriptSignature userInfo:@{NSLocalizedDescriptionKey: NSLocalizedString(@\"Non-canonical signature: too short.\", @\"\")}];\n        return NO;\n    }\n    \n    // Non-canonical signature: too long\n    if (length > 73) {\n        if (errorOut) *errorOut = [NSError errorWithDomain:BTCErrorDomain code:BTCErrorNonCanonicalScriptSignature userInfo:@{NSLocalizedDescriptionKey: NSLocalizedString(@\"Non-canonical signature: too long.\", @\"\")}];\n        return NO;\n    }\n    \n    unsigned char nHashType = bytes[length - 1] & (~(SIGHASH_ANYONECANPAY));\n    \n    if (nHashType < SIGHASH_ALL || nHashType > SIGHASH_SINGLE) {\n        if (errorOut) *errorOut = [NSError errorWithDomain:BTCErrorDomain code:BTCErrorNonCanonicalScriptSignature userInfo:@{NSLocalizedDescriptionKey: NSLocalizedString(@\"Non-canonical signature: unknown hashtype byte.\", @\"\")}];\n        return NO;\n    }\n    \n    if (bytes[0] != 0x30) {\n        if (errorOut) *errorOut = [NSError errorWithDomain:BTCErrorDomain code:BTCErrorNonCanonicalScriptSignature userInfo:@{NSLocalizedDescriptionKey: NSLocalizedString(@\"Non-canonical signature: wrong type.\", @\"\")}];\n        return NO;\n    }\n    \n    if (bytes[1] != length-3) {\n        if (errorOut) *errorOut = [NSError errorWithDomain:BTCErrorDomain code:BTCErrorNonCanonicalScriptSignature userInfo:@{NSLocalizedDescriptionKey: NSLocalizedString(@\"Non-canonical signature: wrong length marker.\", @\"\")}];\n        return NO;\n    }\n    \n    unsigned int lenR = bytes[3];\n    \n    if (5 + lenR >= length) {\n        if (errorOut) *errorOut = [NSError errorWithDomain:BTCErrorDomain code:BTCErrorNonCanonicalScriptSignature userInfo:@{NSLocalizedDescriptionKey: NSLocalizedString(@\"Non-canonical signature: S length misplaced.\", @\"\")}];\n        return NO;\n    }\n    \n    unsigned int lenS = bytes[5+lenR];\n    \n    if ((unsigned long)(lenR+lenS+7) != length) {\n        if (errorOut) *errorOut = [NSError errorWithDomain:BTCErrorDomain code:BTCErrorNonCanonicalScriptSignature userInfo:@{NSLocalizedDescriptionKey: NSLocalizedString(@\"Non-canonical signature: R+S length mismatch\", @\"\")}];\n        return NO;\n    }\n    \n    const unsigned char *R = &bytes[4];\n    if (R[-2] != 0x02) {\n        if (errorOut) *errorOut = [NSError errorWithDomain:BTCErrorDomain code:BTCErrorNonCanonicalScriptSignature userInfo:@{NSLocalizedDescriptionKey: NSLocalizedString(@\"Non-canonical signature: R value type mismatch\", @\"\")}];\n        return NO;\n    }\n    if (lenR == 0) {\n        if (errorOut) *errorOut = [NSError errorWithDomain:BTCErrorDomain code:BTCErrorNonCanonicalScriptSignature userInfo:@{NSLocalizedDescriptionKey: NSLocalizedString(@\"Non-canonical signature: R length is zero\", @\"\")}];\n        return NO;\n    }\n    \n    if (R[0] & 0x80) {\n        if (errorOut) *errorOut = [NSError errorWithDomain:BTCErrorDomain code:BTCErrorNonCanonicalScriptSignature userInfo:@{NSLocalizedDescriptionKey: NSLocalizedString(@\"Non-canonical signature: R value negative\", @\"\")}];\n        return NO;\n    }\n    \n    if (lenR > 1 && (R[0] == 0x00) && !(R[1] & 0x80)) {\n        if (errorOut) *errorOut = [NSError errorWithDomain:BTCErrorDomain code:BTCErrorNonCanonicalScriptSignature userInfo:@{NSLocalizedDescriptionKey: NSLocalizedString(@\"Non-canonical signature: R value excessively padded\", @\"\")}];\n        return NO;\n    }\n    \n    const unsigned char *S = &bytes[6+lenR];\n    if (S[-2] != 0x02) {\n        if (errorOut) *errorOut = [NSError errorWithDomain:BTCErrorDomain code:BTCErrorNonCanonicalScriptSignature userInfo:@{NSLocalizedDescriptionKey: NSLocalizedString(@\"Non-canonical signature: S value type mismatch\", @\"\")}];\n        return NO;\n    }\n    \n    if (lenS == 0) {\n        if (errorOut) *errorOut = [NSError errorWithDomain:BTCErrorDomain code:BTCErrorNonCanonicalScriptSignature userInfo:@{NSLocalizedDescriptionKey: NSLocalizedString(@\"Non-canonical signature: S length is zero\", @\"\")}];\n        return NO;\n    }\n    \n    if (S[0] & 0x80) {\n        if (errorOut) *errorOut = [NSError errorWithDomain:BTCErrorDomain code:BTCErrorNonCanonicalScriptSignature userInfo:@{NSLocalizedDescriptionKey: NSLocalizedString(@\"Non-canonical signature: S value is negative\", @\"\")}];\n        return NO;\n    }\n    \n    if (lenS > 1 && (S[0] == 0x00) && !(S[1] & 0x80)) {\n        if (errorOut) *errorOut = [NSError errorWithDomain:BTCErrorDomain code:BTCErrorNonCanonicalScriptSignature userInfo:@{NSLocalizedDescriptionKey: NSLocalizedString(@\"Non-canonical signature: S value excessively padded\", @\"\")}];\n        return NO;\n    }\n    \n    if (verifyLowerS) {\n        if (!BTCKeyCheckSignatureElement(S, lenS, YES)) {\n            if (errorOut) *errorOut = [NSError errorWithDomain:BTCErrorDomain\n                                                          code:BTCErrorNonCanonicalScriptSignature\n                                                      userInfo:@{NSLocalizedDescriptionKey:\n                                                                     NSLocalizedString(@\"Non-canonical signature: S value is unnecessarily high\", @\"\")}];\n            return NO;\n        }\n    }\n    \n    return YES;\n}\n\n@end\n\n\n\n// Order of secp256k1's generator minus 1.\nstatic const unsigned char BTCKeyMaxModOrder[32] = {\n    0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,\n    0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFE,\n    0xBA,0xAE,0xDC,0xE6,0xAF,0x48,0xA0,0x3B,\n    0xBF,0xD2,0x5E,0x8C,0xD0,0x36,0x41,0x40\n};\n\n// Half of the order of secp256k1's generator minus 1.\nstatic const unsigned char BTCKeyMaxModHalfOrder[32] = {\n    0x7F,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,\n    0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,\n    0x5D,0x57,0x6E,0x73,0x57,0xA4,0x50,0x1D,\n    0xDF,0xE9,0x2F,0x46,0x68,0x1B,0x20,0xA0\n};\n\nstatic const unsigned char BTCKeyZero[0] = {};\n\nNSComparisonResult BTCKeyCompareBigEndian(const unsigned char *c1, size_t c1len,\n                                          const unsigned char *c2, size_t c2len) {\n    while (c1len > c2len) {\n        if (*c1 > 0) return NSOrderedDescending;\n        c1++;\n        c1len--;\n    }\n    while (c2len > c1len) {\n        if (*c2 > 0) return NSOrderedAscending;\n        c2++;\n        c2len--;\n    }\n    while (c1len > 0) {\n        if (*c1 > *c2) return NSOrderedDescending;\n        if (*c2 > *c1) return NSOrderedAscending;\n        c1++;\n        c2++;\n        c1len--;\n    }\n    return NSOrderedSame;\n}\n\nstatic BOOL BTCKeyCheckPrivateKeyRange(const unsigned char *secret, size_t length) {\n    return BTCKeyCompareBigEndian(secret, length, BTCKeyZero, 0) > 0 &&\n           BTCKeyCompareBigEndian(secret, length, BTCKeyMaxModOrder, 32) <= 0;\n}\n\nstatic BOOL BTCKeyCheckSignatureElement(const unsigned char *bytes, int length, BOOL half) {\n    return BTCKeyCompareBigEndian(bytes, length, BTCKeyZero, 0) > 0 &&\n           BTCKeyCompareBigEndian(bytes, length, half ? BTCKeyMaxModHalfOrder : BTCKeyMaxModOrder, 32) <= 0;\n}\n\nstatic NSData* BTCSignatureHashForBinaryMessage(NSData* msg) {\n    NSMutableData* data = [NSMutableData data];\n    [data appendData:[BTCProtocolSerialization dataForVarString:[@\"Bitcoin Signed Message:\\n\" dataUsingEncoding:NSASCIIStringEncoding]]];\n    [data appendData:[BTCProtocolSerialization dataForVarString:msg ?: [NSData data]]];\n    return BTCHash256(data);\n}\n\n\n\nstatic int BTCRegenerateKey(EC_KEY *eckey, BIGNUM *priv_key) {\n    BN_CTX *ctx = NULL;\n    EC_POINT *pub_key = NULL;\n    \n    if (!eckey) return 0;\n    \n    const EC_GROUP *group = EC_KEY_get0_group(eckey);\n    \n    BOOL success = NO;\n    if ((ctx = BN_CTX_new())) {\n        if ((pub_key = EC_POINT_new(group))) {\n            if (EC_POINT_mul(group, pub_key, priv_key, NULL, NULL, ctx)) {\n                EC_KEY_set_private_key(eckey, priv_key);\n                EC_KEY_set_public_key(eckey, pub_key);\n                success = YES;\n            }\n        }\n    }\n    \n    if (pub_key) EC_POINT_free(pub_key);\n    if (ctx) BN_CTX_free(ctx);\n    \n    return success;\n}\n\n\n\n\n\n// Perform ECDSA key recovery (see SEC1 4.1.6) for curves over (mod p)-fields\n// recid selects which key is recovered\n// if check is non-zero, additional checks are performed\nstatic int ECDSA_SIG_recover_key_GFp(EC_KEY *eckey, ECDSA_SIG *ecsig, const unsigned char *msg, int msglen, int recid, int check) {\n    if (!eckey) return 0;\n    \n    int ret = 0;\n    BN_CTX *ctx = NULL;\n    \n    BIGNUM *x = NULL;\n    BIGNUM *e = NULL;\n    BIGNUM *order = NULL;\n    BIGNUM *sor = NULL;\n    BIGNUM *eor = NULL;\n    BIGNUM *field = NULL;\n    EC_POINT *R = NULL;\n    EC_POINT *O = NULL;\n    EC_POINT *Q = NULL;\n    BIGNUM *rr = NULL;\n    BIGNUM *zero = NULL;\n    int n = 0;\n    int i = recid / 2;\n    \n    const EC_GROUP *group = EC_KEY_get0_group(eckey);\n    if ((ctx = BN_CTX_new()) == NULL) { ret = -1; goto err; }\n    BN_CTX_start(ctx);\n    order = BN_CTX_get(ctx);\n    if (!EC_GROUP_get_order(group, order, ctx)) { ret = -2; goto err; }\n    x = BN_CTX_get(ctx);\n    if (!BN_copy(x, order)) { ret=-1; goto err; }\n    if (!BN_mul_word(x, i)) { ret=-1; goto err; }\n    if (!BN_add(x, x, ecsig->r)) { ret=-1; goto err; }\n    field = BN_CTX_get(ctx);\n    if (!EC_GROUP_get_curve_GFp(group, field, NULL, NULL, ctx)) { ret=-2; goto err; }\n    if (BN_cmp(x, field) >= 0) { ret=0; goto err; }\n    if ((R = EC_POINT_new(group)) == NULL) { ret = -2; goto err; }\n    if (!EC_POINT_set_compressed_coordinates_GFp(group, R, x, recid % 2, ctx)) { ret=0; goto err; }\n    if (check) {\n        if ((O = EC_POINT_new(group)) == NULL) { ret = -2; goto err; }\n        if (!EC_POINT_mul(group, O, NULL, R, order, ctx)) { ret=-2; goto err; }\n        if (!EC_POINT_is_at_infinity(group, O)) { ret = 0; goto err; }\n    }\n    if ((Q = EC_POINT_new(group)) == NULL) { ret = -2; goto err; }\n    n = EC_GROUP_get_degree(group);\n    e = BN_CTX_get(ctx);\n    if (!BN_bin2bn(msg, msglen, e)) { ret=-1; goto err; }\n    if (8*msglen > n) BN_rshift(e, e, 8-(n & 7));\n    zero = BN_CTX_get(ctx);\n    if (!BN_zero(zero)) { ret=-1; goto err; }\n    if (!BN_mod_sub(e, zero, e, order, ctx)) { ret=-1; goto err; }\n    rr = BN_CTX_get(ctx);\n    if (!BN_mod_inverse(rr, ecsig->r, order, ctx)) { ret=-1; goto err; }\n    sor = BN_CTX_get(ctx);\n    if (!BN_mod_mul(sor, ecsig->s, rr, order, ctx)) { ret=-1; goto err; }\n    eor = BN_CTX_get(ctx);\n    if (!BN_mod_mul(eor, e, rr, order, ctx)) { ret=-1; goto err; }\n    if (!EC_POINT_mul(group, Q, eor, R, sor, ctx)) { ret=-2; goto err; }\n    if (!EC_KEY_set_public_key(eckey, Q)) { ret=-2; goto err; }\n    \n    ret = 1;\n    \nerr:\n    if (ctx) {\n        BN_CTX_end(ctx);\n        BN_CTX_free(ctx);\n    }\n    if (R != NULL) EC_POINT_free(R);\n    if (O != NULL) EC_POINT_free(O);\n    if (Q != NULL) EC_POINT_free(Q);\n    return ret;\n}\n\n\n"
  },
  {
    "path": "Pods/CoreBitcoin/CoreBitcoin/BTCKeychain.h",
    "content": "// CoreBitcoin by Oleg Andreev <oleganza@gmail.com>, WTFPL.\n\n#import <Foundation/Foundation.h>\n\n// Implementation of BIP32 \"Hierarchical Deterministic Wallets\" (HDW)\n// https://github.com/bitcoin/bips/blob/master/bip-0032.mediawiki\n//\n// BTCKeychain encapsulates either a pair of \"extended\" keys (private and public), or only a public extended key.\n// \"Extended key\" means the key (private or public) is accompanied by extra 256 bits of entropy called \"chain code\" and\n// some metadata about it's position in a tree of keys (depth, parent fingerprint, index).\n// Keychain has two modes of operation:\n// - \"normal derivation\" which allows to derive public keys separately from the private ones (internally i below 0x80000000).\n// - \"hardened derivation\" which derives only private keys (for i >= 0x80000000).\n// Derivation can be treated as a single key or as a new branch of keychains.\n\nstatic const uint32_t BTCKeychainMaxIndex = 0x7fffffff;\n\n@class BTCKey;\n@class BTCBigNumber;\n@class BTCAddress;\n@class BTCNetwork;\n@interface BTCKeychain : NSObject<NSCopying>\n\n// Initializes master keychain from a seed. This is the \"root\" keychain of the entire hierarchy.\n// Sets the network to mainnet. To specify testnet, use `-initWithSeed:network:`\n- (id) initWithSeed:(NSData*)seed;\n\n// Initializes master keychain from a seed. This is the \"root\" keychain of the entire hierarchy.\n// Chosen network affects formatting of the extended keys.\n- (id) initWithSeed:(NSData*)seed network:(BTCNetwork*)network;\n\n// Initializes with a base58-encoded extended public or private key.\n// Inherits the network from the formatted key.\n- (id) initWithExtendedKey:(NSString*)extendedKey;\n\n// Initializes keychain with a serialized extended key.\n// Use BTCDataFromBase58Check() to convert from Base58 string.\n- (id) initWithExtendedKeyData:(NSData*)extendedKeyData DEPRECATED_ATTRIBUTE;\n\n// Clears all sensitive data from keychain (keychain becomes invalid)\n- (void) clear;\n\n// Network for formatting the extended keys (mainnet/testnet).\n// Default is mainnet.\n@property(nonatomic) BTCNetwork* network;\n\n// Deprecated because of the badly chosen name. See `-key`.\n@property(nonatomic, readonly) BTCKey* rootKey DEPRECATED_ATTRIBUTE;\n\n// Instance of BTCKey that is a \"head\" of this keychain.\n// If the keychain is public-only, key does not have a private component.\n@property(nonatomic, readonly) BTCKey* key;\n\n// Chain code associated with the key.\n@property(nonatomic, readonly) NSData* chainCode;\n\n// Base58-encoded extended public key.\n@property(nonatomic, readonly) NSString* extendedPublicKey;\n\n// Base58-encoded extended private key.\n// Returns nil if this is a public-only keychain.\n@property(nonatomic, readonly) NSString* extendedPrivateKey;\n\n// Raw binary data for serialized extended public key.\n// Use BTCBase58CheckStringWithData() to convert to Base58 form.\n@property(nonatomic, readonly) NSData* extendedPublicKeyData DEPRECATED_ATTRIBUTE;\n\n// Raw binary data for serialized extended private key.\n// Returns nil if the receiver is public-only keychain.\n// Use BTCBase58CheckStringWithData() to convert to Base58 form.\n@property(nonatomic, readonly) NSData* extendedPrivateKeyData DEPRECATED_ATTRIBUTE;\n\n// 160-bit identifier (aka \"hash\") of the keychain (RIPEMD160(SHA256(pubkey))).\n@property(nonatomic, readonly) NSData* identifier;\n\n// Fingerprint of the keychain.\n@property(nonatomic, readonly) uint32_t fingerprint;\n\n// Fingerprint of the parent keychain. For master keychain it is always 0.\n@property(nonatomic, readonly) uint32_t parentFingerprint;\n\n// Index in the parent keychain.\n// If this is a master keychain, index is 0.\n@property(nonatomic, readonly) uint32_t index;\n\n// Depth. Master keychain has depth = 0.\n@property(nonatomic, readonly) uint8_t depth;\n\n// Returns YES if the keychain can derive private keys.\n@property(nonatomic, readonly) BOOL isPrivate;\n\n// Returns YES if the keychain was derived via hardened derivation from its parent.\n// This means internally parameter i = 0x80000000 | self.index\n// For the master keychain index is zero and isHardened=NO.\n@property(nonatomic, readonly) BOOL isHardened;\n\n// Returns a copy of the keychain stripped of the private key.\n// Equivalent to [[BTCKeychain alloc] initWithExtendedKey:keychain.extendedPublicKey]\n@property(nonatomic, readonly) BTCKeychain* publicKeychain;\n\n// Returns a derived keychain.\n// If hardened = YES, uses hardened derivation (possible only when private key is present; otherwise returns nil).\n// Index must be less of equal BTCKeychainMaxIndex, otherwise throws an exception.\n// May return nil for some indexes (when hashing leads to invalid EC points) which is very rare (chance is below 2^-127), but must be expected. In such case, simply use another index.\n// By default, a normal (non-hardened) derivation is used.\n- (BTCKeychain*) derivedKeychainAtIndex:(uint32_t)index;\n- (BTCKeychain*) derivedKeychainAtIndex:(uint32_t)index hardened:(BOOL)hardened;\n\n// If factorOut is not NULL, it will contain a number that is being added to the private key.\n// This feature is used in BTCBlindSignature protocol.\n- (BTCKeychain*) derivedKeychainAtIndex:(uint32_t)index hardened:(BOOL)hardened factor:(BTCBigNumber**)factorOut;\n\n// Parses the BIP32 path and derives the chain of keychains accordingly.\n// Path syntax: (m?/)?([0-9]+'?(/[0-9]+'?)*)?\n// The following paths are valid:\n//\n// \"\" (root key)\n// \"m\" (root key)\n// \"/\" (root key)\n// \"m/0'\" (hardened child #0 of the root key)\n// \"/0'\" (hardened child #0 of the root key)\n// \"0'\" (hardened child #0 of the root key)\n// \"m/44'/1'/2'\" (BIP44 testnet account #2)\n// \"/44'/1'/2'\" (BIP44 testnet account #2)\n// \"44'/1'/2'\" (BIP44 testnet account #2)\n//\n// The following paths are invalid:\n//\n// \"m / 0 / 1\" (contains spaces)\n// \"m/b/c\" (alphabetical characters instead of numerical indexes)\n// \"m/1.2^3\" (contains illegal characters)\n- (BTCKeychain*) derivedKeychainWithPath:(NSString*)path;\n\n// Returns a derived key for a given BIP32 path.\n// Equivalent to `[keychain derivedKeychainWithPath:@\"...\"].key`\n- (BTCKey*) keyWithPath:(NSString*)path;\n\n// Returns a derived key from this keychain.\n// Equivalent to [keychain derivedKeychainAtIndex:i hardened:YES/NO].key\n// If the receiver contains a private key, child key will also contain a private key.\n// If the receiver contains only a public key, child key will only contain a public key. (Or nil will be returned if hardened = YES.)\n// By default, a normal (non-hardened) derivation is used.\n- (BTCKey*) keyAtIndex:(uint32_t)index;\n- (BTCKey*) keyAtIndex:(uint32_t)index hardened:(BOOL)hardened;\n\n\n// BIP44 methods.\n// These methods are meant to be chained like so:\n// ```\n// invoiceAddress = [[rootKeychain.bitcoinMainnetKeychain keychainForAccount:1] externalKeyAtIndex:123].address\n// ```\n\n// Returns a subchain with path m/44'/0'\n@property(nonatomic, readonly) BTCKeychain* bitcoinMainnetKeychain;\n\n// Returns a subchain with path m/44'/1'\n@property(nonatomic, readonly) BTCKeychain* bitcoinTestnetKeychain;\n\n// Returns a hardened derivation for the given account index.\n// Equivalent to [keychain derivedKeychainAtIndex:accountIndex hardened:YES]\n- (BTCKeychain*) keychainForAccount:(uint32_t)accountIndex;\n\n// Returns a key from an external chain (/0/i).\n// BTCKey may be public-only if the receiver is public-only keychain.\n- (BTCKey*) externalKeyAtIndex:(uint32_t)index;\n\n// Returns a key from an internal (change) chain (/1/i).\n// BTCKey may be public-only if the receiver is public-only keychain.\n- (BTCKey*) changeKeyAtIndex:(uint32_t)index;\n\n\n\n// Scanning methods.\n\n// Scans child keys till one is found that matches the given address.\n// Only BTCPublicKeyAddress and BTCPrivateKeyAddress are supported. For others nil is returned.\n// Limit is maximum number of keys to scan. If no key is found, returns nil.\n// Returns nil if the receiver does not contain private key.\n- (BTCKeychain*) findKeychainForAddress:(BTCAddress*)address hardened:(BOOL)hardened limit:(NSUInteger)limit;\n- (BTCKeychain*) findKeychainForAddress:(BTCAddress*)address hardened:(BOOL)hardened from:(uint32_t)startIndex limit:(NSUInteger)limit;\n\n// Scans child keys till one is found that matches the given public key.\n// Limit is maximum number of keys to scan. If no key is found, returns nil.\n// Returns nil if the receiver does not contain private key.\n- (BTCKeychain*) findKeychainForPublicKey:(BTCKey*)pubkey hardened:(BOOL)hardened limit:(NSUInteger)limit;\n- (BTCKeychain*) findKeychainForPublicKey:(BTCKey*)pubkey hardened:(BOOL)hardened from:(uint32_t)startIndex limit:(NSUInteger)limit;\n\n@end\n\n"
  },
  {
    "path": "Pods/CoreBitcoin/CoreBitcoin/BTCKeychain.m",
    "content": "// Oleg Andreev <oleganza@gmail.com>\n\n#import \"BTCKeychain.h\"\n#import \"BTCData.h\"\n#import \"BTCKey.h\"\n#import \"BTCCurvePoint.h\"\n#import \"BTCBigNumber.h\"\n#import \"BTCBase58.h\"\n#import \"BTCAddress.h\"\n#import \"BTCNetwork.h\"\n\n#define CHECK_IF_CLEARED if (_cleared) { [[NSException exceptionWithName:@\"BTCKeychain: instance was already cleared.\" reason:@\"\" userInfo:nil] raise]; }\n\n#define BTCKeychainMainnetPrivateVersion 0x0488ADE4\n#define BTCKeychainMainnetPublicVersion  0x0488B21E\n\n#define BTCKeychainTestnetPrivateVersion 0x04358394\n#define BTCKeychainTestnetPublicVersion  0x043587CF\n\n@interface BTCKeychain ()\n@property(nonatomic, readwrite) NSMutableData* chainCode;\n@property(nonatomic, readwrite) NSMutableData* extendedPublicKeyData;\n@property(nonatomic, readwrite) NSMutableData* extendedPrivateKeyData;\n@property(nonatomic, readwrite) NSData* identifier;\n@property(nonatomic, readwrite) uint32_t fingerprint;\n@property(nonatomic, readwrite) uint32_t parentFingerprint;\n@property(nonatomic, readwrite) uint32_t index;\n@property(nonatomic, readwrite) uint8_t depth;\n@property(nonatomic, readwrite) BOOL hardened;\n\n@property(nonatomic) NSMutableData* privateKey;\n@property(nonatomic) NSMutableData* publicKey;\n@end\n\n@implementation BTCKeychain {\n    BOOL _cleared;\n}\n\n- (void)dealloc {\n    [self clear];\n}\n\n- (void) clear {\n    BTCDataClear(_chainCode);\n    BTCDataClear(_extendedPublicKeyData);\n    BTCDataClear(_extendedPrivateKeyData);\n    BTCDataClear(_privateKey);\n    BTCDataClear(_publicKey);\n    _cleared = YES;\n}\n\n\n- (id) initWithSeed:(NSData*)seed {\n    return [self initWithSeed:seed network:nil];\n}\n\n- (id) initWithSeed:(NSData*)seed network:(BTCNetwork*)network {\n    if (self = [super init]) {\n        if (!seed) return nil;\n\n        NSMutableData* hmac = BTCHMACSHA512([@\"Bitcoin seed\" dataUsingEncoding:NSASCIIStringEncoding], seed);\n        _privateKey = BTCDataRange(hmac, NSMakeRange(0, 32));\n        _chainCode  = BTCDataRange(hmac, NSMakeRange(32, 32));\n        BTCDataClear(hmac);\n\n        _network = network;\n    }\n    return self;\n}\n\n- (id) initWithExtendedKey:(NSString*)extkey {\n    return [self initWithExtendedKeyDataInternal:BTCDataFromBase58Check(extkey)];\n}\n\n- (id) initWithExtendedKeyData:(NSData*)data {\n    return [self initWithExtendedKeyDataInternal:data];\n}\n\n- (id) initWithExtendedKeyDataInternal:(NSData*)extendedKeyData {\n    if (self = [super init]) {\n        if (extendedKeyData.length != 78) return nil;\n\n        const uint8_t* bytes = extendedKeyData.bytes;\n        uint32_t version = OSSwapBigToHostInt32(*((uint32_t*)bytes));\n\n        uint32_t keyprefix = bytes[45];\n        \n        if (version == BTCKeychainMainnetPrivateVersion ||\n            version == BTCKeychainTestnetPrivateVersion) {\n            // Should have 0-prefixed private key (1 + 32 bytes).\n            if (keyprefix != 0) return nil;\n            _privateKey = BTCDataRange(extendedKeyData, NSMakeRange(46, 32));\n        } else if (version == BTCKeychainMainnetPublicVersion ||\n                 version == BTCKeychainTestnetPublicVersion) {\n            // Should have a 33-byte public key with non-zero first byte.\n            if (keyprefix == 0) return nil;\n            _publicKey = BTCDataRange(extendedKeyData, NSMakeRange(45, 33));\n        } else {\n            // Unknown version.\n            return nil;\n        }\n\n        // If it's a testnet key, remember the network.\n        // Otherwise, keep it nil so we don't do extra work if it's not needed.\n        if (version == BTCKeychainTestnetPrivateVersion ||\n            version == BTCKeychainTestnetPublicVersion) {\n            _network = [BTCNetwork testnet];\n        }\n\n        _depth = *(bytes + 4);\n        _parentFingerprint = OSSwapBigToHostInt32(*((uint32_t*)(bytes + 5)));\n        _index = OSSwapBigToHostInt32(*((uint32_t*)(bytes + 9)));\n        \n        if ((0x80000000 & _index) != 0) {\n            _index = (~0x80000000) & _index;\n            _hardened = YES;\n        }\n        \n        _chainCode = BTCDataRange(extendedKeyData,NSMakeRange(13, 32));\n    }\n    return self;\n}\n\n\n#pragma mark - Properties\n\n\n- (BTCNetwork*) network {\n    if (!_network) {\n        _network = [BTCNetwork mainnet];\n    }\n    return _network;\n}\n\n// deprecated\n- (BTCKey*) rootKey {\n    return self.key;\n}\n\n- (NSString*) extendedPrivateKey {\n    CHECK_IF_CLEARED;\n    return BTCBase58CheckStringWithData([self extendedPrivateKeyDataInternal]);\n}\n\n- (NSString*) extendedPublicKey {\n    CHECK_IF_CLEARED;\n    return BTCBase58CheckStringWithData([self extendedPublicKeyDataInternal]);\n}\n\n\n- (BTCKey*) key {\n    CHECK_IF_CLEARED;\n\n    if (_privateKey) {\n        BTCKey* key = [[BTCKey alloc] initWithPrivateKey:_privateKey];\n        key.publicKeyCompressed = YES;\n        return key;\n    } else {\n        return [[BTCKey alloc] initWithPublicKey:self.publicKey];\n    }\n}\n\n- (NSData*) extendedPrivateKeyData { return [self extendedPrivateKeyDataInternal]; }\n\n- (NSData*) extendedPrivateKeyDataInternal {\n    CHECK_IF_CLEARED;\n\n    if (!_privateKey) return nil;\n    \n    if (!_extendedPrivateKeyData) {\n        uint32_t version = [self.network isMainnet] ? BTCKeychainMainnetPrivateVersion : BTCKeychainTestnetPrivateVersion;\n        NSMutableData* data = [self extendedKeyPrefixWithVersion:version];\n        \n        uint8_t padding = 0;\n        [data appendBytes:&padding length:1];\n        [data appendData:_privateKey];\n        \n        _extendedPrivateKeyData = data;\n    }\n    return _extendedPrivateKeyData;\n}\n\n- (NSData*) extendedPublicKeyData { return [self extendedPublicKeyDataInternal]; }\n\n- (NSData*) extendedPublicKeyDataInternal {\n    CHECK_IF_CLEARED;\n\n    if (!_extendedPublicKeyData) {\n        NSData* pubkey = self.publicKey;\n        \n        if (!pubkey) return nil;\n\n        uint32_t version = [self.network isMainnet] ? BTCKeychainMainnetPublicVersion : BTCKeychainTestnetPublicVersion;\n        NSMutableData* data = [self extendedKeyPrefixWithVersion:version];\n        \n        [data appendData:pubkey];\n        \n        _extendedPublicKeyData = data;\n    }\n    return _extendedPublicKeyData;\n}\n\n- (NSMutableData*) extendedKeyPrefixWithVersion:(uint32_t)version {\n    CHECK_IF_CLEARED;\n\n    NSMutableData* data = [NSMutableData data];\n    \n    version = OSSwapHostToBigInt32(version);\n    [data appendBytes:&version length:sizeof(version)];\n    \n    [data appendBytes:&_depth length:1];\n    \n    uint32_t parentfp = OSSwapHostToBigInt32(_parentFingerprint);\n    [data appendBytes:&parentfp length:sizeof(parentfp)];\n    \n    uint32_t childindex = OSSwapHostToBigInt32(_hardened ? (0x80000000 | _index) : _index);\n    [data appendBytes:&childindex length:sizeof(childindex)];\n    \n    [data appendData:_chainCode];\n    \n    return data;\n}\n\n- (NSData*) identifier {\n    CHECK_IF_CLEARED;\n\n    if (!_identifier) {\n        _identifier = BTCHash160(self.publicKey);\n    }\n    return _identifier;\n}\n\n- (uint32_t) fingerprint {\n    CHECK_IF_CLEARED;\n\n    if (_fingerprint == 0) {\n        const uint32_t* words = self.identifier.bytes;\n        _fingerprint = OSSwapBigToHostInt32(words[0]);\n    }\n    return _fingerprint;\n}\n\n- (NSData*) publicKey {\n    CHECK_IF_CLEARED;\n\n    if (!_publicKey) {\n        _publicKey = [[[BTCKey alloc] initWithPrivateKey:_privateKey] compressedPublicKey];\n    }\n    return _publicKey;\n}\n\n- (BOOL) isPrivate {\n    CHECK_IF_CLEARED;\n    return !!_privateKey;\n}\n\n- (BOOL) isHardened {\n    CHECK_IF_CLEARED;\n    return _hardened;\n}\n\n- (BTCKeychain*) derivedKeychainAtIndex:(uint32_t)index {\n    return [self derivedKeychainAtIndex:index hardened:NO];\n}\n\n- (BTCKeychain*) derivedKeychainAtIndex:(uint32_t)index hardened:(BOOL)hardened {\n    return [self derivedKeychainAtIndex:index hardened:hardened factor:NULL];\n}\n\n- (BTCKeychain*) derivedKeychainAtIndex:(uint32_t)index hardened:(BOOL)hardened factor:(BTCBigNumber**)factorOut {\n    CHECK_IF_CLEARED;\n\n    // As we use explicit parameter \"hardened\", do not allow higher bit set.\n    if ((0x80000000 & index) != 0) {\n        @throw [NSException exceptionWithName:@\"BTCKeychain Exception\"\n                                       reason:@\"Indexes >= 0x80000000 are invalid. Use hardened:YES argument instead.\" userInfo:nil];\n        return nil;\n    }\n    \n    if (!_privateKey && hardened) {\n        // Not possible to derive hardened keychain without a private key.\n        return nil;\n    }\n\n    BTCKeychain* derivedKeychain = [[BTCKeychain alloc] init];\n\n    NSMutableData* data = [NSMutableData data];\n    \n    if (hardened) {\n        uint8_t padding = 0;\n        [data appendBytes:&padding length:1];\n        [data appendData:_privateKey];\n    } else {\n        [data appendData:self.publicKey];\n    }\n    \n    uint32_t indexBE = OSSwapHostToBigInt32(hardened ? (0x80000000 | index) : index);\n    [data appendBytes:&indexBE length:sizeof(indexBE)];\n    \n    NSData* digest = BTCHMACSHA512(_chainCode, data);\n    \n    BTCBigNumber* factor = [[BTCBigNumber alloc] initWithUnsignedBigEndian:[digest subdataWithRange:NSMakeRange(0, 32)]];\n    \n    // Factor is too big, this derivation is invalid.\n    if ([factor greaterOrEqual:[BTCCurvePoint curveOrder]]) {\n        return nil;\n    }\n    \n    if (factorOut) *factorOut = factor;\n    \n    derivedKeychain.chainCode = BTCDataRange(digest, NSMakeRange(32, 32));\n    \n    if (_privateKey) {\n        BTCMutableBigNumber* pkNumber = [[BTCMutableBigNumber alloc] initWithUnsignedBigEndian:_privateKey];\n        [pkNumber add:factor mod:[BTCCurvePoint curveOrder]];\n        \n        // Check for invalid derivation.\n        if ([pkNumber isEqual:[BTCBigNumber zero]]) return nil;\n        \n        NSData* pkData = pkNumber.unsignedBigEndian;\n        derivedKeychain.privateKey = [pkData mutableCopy];\n        \n        BTCDataClear(pkData);\n        [pkNumber clear];\n    } else {\n        BTCCurvePoint* point = [[BTCCurvePoint alloc] initWithData:_publicKey];\n        [point addGeneratorMultipliedBy:factor];\n        \n        // Check for invalid derivation.\n        if ([point isInfinity]) return nil;\n        \n        NSData* pointData = point.data;\n        derivedKeychain.publicKey = [pointData mutableCopy];\n        BTCDataClear(pointData);\n        [point clear];\n    }\n    \n    derivedKeychain.depth = _depth + 1;\n    derivedKeychain.parentFingerprint = self.fingerprint;\n    derivedKeychain.index = index;\n    derivedKeychain.hardened = hardened;\n    \n    return derivedKeychain;\n}\n\n- (BTCKey*) keyAtIndex:(uint32_t)index {\n    return [self keyAtIndex:index hardened:NO];\n}\n- (BTCKey*) keyAtIndex:(uint32_t)index hardened:(BOOL)hardened {\n    return [self derivedKeychainAtIndex:index hardened:hardened].key;\n}\n\n\n// Parses the BIP32 path and derives the chain of keychains accordingly.\n// Path syntax: (m?/)?([0-9]+'?(/[0-9]+'?)*)?\n// The following paths are valid:\n//\n// \"\" (root key)\n// \"m\" (root key)\n// \"/\" (root key)\n// \"m/0'\" (hardened child #0 of the root key)\n// \"/0'\" (hardened child #0 of the root key)\n// \"0'\" (hardened child #0 of the root key)\n// \"m/44'/1'/2'\" (BIP44 testnet account #2)\n// \"/44'/1'/2'\" (BIP44 testnet account #2)\n// \"44'/1'/2'\" (BIP44 testnet account #2)\n//\n// The following paths are invalid:\n//\n// \"m / 0 / 1\" (contains spaces)\n// \"m/b/c\" (alphabetical characters instead of numerical indexes)\n// \"m/1.2^3\" (contains illegal characters)\n- (BTCKeychain*) derivedKeychainWithPath:(NSString*)path {\n\n    if (path == nil) return nil;\n\n    if ([path isEqualToString:@\"m\"] ||\n        [path isEqualToString:@\"/\"] ||\n        [path isEqualToString:@\"\"]) {\n        return self;\n    }\n\n    BTCKeychain* kc = self;\n\n    if ([path rangeOfString:@\"m/\"].location == 0) { // strip \"m/\" from the beginning.\n        path = [path substringFromIndex:2];\n    }\n    for (NSString* chunk in [path componentsSeparatedByString:@\"/\"]) {\n        if (chunk.length == 0) {\n            continue;\n        }\n        BOOL hardened = NO;\n        NSString* indexString = chunk;\n        if ([chunk rangeOfString:@\"'\"].location == chunk.length - 1) {\n            hardened = YES;\n            indexString = [chunk substringToIndex:chunk.length - 1];\n        }\n\n        // Make sure the chunk is just a number\n        NSInteger i = [indexString integerValue];\n        if (i >= 0 && [@(i).stringValue isEqualToString:indexString]) {\n            kc = [kc derivedKeychainAtIndex:(uint32_t)i hardened:hardened];\n        } else {\n            return nil;\n        }\n    }\n    return kc;\n}\n\n- (BTCKey*) keyWithPath:(NSString*)path {\n    return [self derivedKeychainWithPath:path].key;\n}\n\n- (BTCKeychain*) publicKeychain {\n    CHECK_IF_CLEARED;\n\n    BTCKeychain* keychain = [[BTCKeychain alloc] init];\n    \n    keychain.chainCode = [self.chainCode mutableCopy];\n    keychain.publicKey = [self.publicKey mutableCopy];\n    keychain.parentFingerprint = self.parentFingerprint;\n    keychain.index = self.index;\n    keychain.depth = self.depth;\n    keychain.hardened = self.hardened;\n    \n    return keychain;\n}\n\n\n\n// BIP44 methods.\n// These methods are meant to be chained like so:\n// ```\n// invoiceAddress = [[rootKeychain.bitcoinMainnetKeychain keychainForAccount:1] externalKeyAtIndex:123].address\n// ```\n\n\n// Returns a subchain with path m/44'/0'\n- (BTCKeychain*) bitcoinMainnetKeychain {\n    return [[self derivedKeychainAtIndex:44 hardened:YES] derivedKeychainAtIndex:0 hardened:YES];\n}\n\n// Returns a subchain with path m/44'/1'\n- (BTCKeychain*) bitcoinTestnetKeychain {\n    return [[self derivedKeychainAtIndex:44 hardened:YES] derivedKeychainAtIndex:1 hardened:YES];\n}\n\n// Returns a hardened derivation for the given account index.\n// Equivalent to [keychain derivedKeychainAtIndex:accountIndex hardened:YES]\n- (BTCKeychain*) keychainForAccount:(uint32_t)accountIndex {\n    return [self derivedKeychainAtIndex:accountIndex hardened:YES];\n}\n\n// Returns a key from an external chain (/0/i).\n// BTCKey may be public-only if the receiver is public-only keychain.\n- (BTCKey*) externalKeyAtIndex:(uint32_t)index {\n    return [[self derivedKeychainAtIndex:0 hardened:NO] keyAtIndex:index hardened:NO];\n}\n\n// Returns a key from an internal (change) chain (/1/i).\n// BTCKey may be public-only if the receiver is public-only keychain.\n- (BTCKey*) changeKeyAtIndex:(uint32_t)index {\n    return [[self derivedKeychainAtIndex:1 hardened:NO] keyAtIndex:index hardened:NO];\n}\n\n\n\n#pragma mark - Scanning methods.\n\n\n// Scans child keys till one is found that matches the given address.\n// Only BTCPublicKeyAddress and BTCPrivateKeyAddress are supported. For others nil is returned.\n// Limit is maximum number of keys to scan. If no key is found, returns nil.\n- (BTCKeychain*) findKeychainForAddress:(BTCAddress*)address hardened:(BOOL)hardened limit:(NSUInteger)limit {\n    return [self findKeychainForAddress:address hardened:hardened from:0 limit:limit];\n}\n\n- (BTCKeychain*) findKeychainForAddress:(BTCAddress*)address hardened:(BOOL)hardened from:(uint32_t)startIndex limit:(NSUInteger)limit {\n    CHECK_IF_CLEARED;\n\n    if (!address) return nil;\n    if (!self.isPrivate) return nil;\n    \n    if ([address isKindOfClass:[BTCPrivateKeyAddress class]]) {\n        BTCPrivateKeyAddress* privkeyAddress = (BTCPrivateKeyAddress*)address;\n        BTCKey* key = privkeyAddress.key;\n        NSMutableData* privkeyData = key.privateKey;\n        \n        BTCKeychain* result = nil;\n        \n        for (uint32_t i = startIndex; i < (startIndex + limit); i++) {\n            BTCKeychain* keychain = [self derivedKeychainAtIndex:i hardened:hardened];\n            \n            if ([keychain.privateKey isEqual:privkeyData]) {\n                result = keychain;\n                break;\n            }\n            \n            [keychain clear];\n        }\n        \n        [key clear];\n        BTCDataClear(privkeyData);\n        \n        return result;\n    }\n    \n    if ([address isKindOfClass:[BTCPublicKeyAddress class]]) {\n        NSData* hash160 = ((BTCPublicKeyAddress*)address).data;\n        \n        BTCKeychain* result = nil;\n        \n        for (uint32_t i = startIndex; i < (startIndex + limit); i++) {\n            BTCKeychain* keychain = [self derivedKeychainAtIndex:i hardened:hardened];\n            \n            if ([keychain.identifier isEqual:hash160]) {\n                result = keychain;\n                break;\n            }\n            \n            [keychain clear];\n        }\n        \n        return result;\n    }\n    \n    return nil;\n}\n\n\n// Scans child keys till one is found that matches the given public key.\n// Limit is maximum number of keys to scan. If no key is found, returns nil.\n- (BTCKeychain*) findKeychainForPublicKey:(BTCKey*)pubkey hardened:(BOOL)hardened limit:(NSUInteger)limit {\n    return [self findKeychainForPublicKey:pubkey hardened:hardened from:0 limit:limit];\n}\n\n- (BTCKeychain*) findKeychainForPublicKey:(BTCKey*)pubkey hardened:(BOOL)hardened from:(uint32_t)startIndex limit:(NSUInteger)limit {\n    CHECK_IF_CLEARED;\n\n    if (!pubkey) return nil;\n    if (!self.isPrivate) return nil;\n    \n    NSData* data = pubkey.compressedPublicKey;\n    \n    BTCKeychain* result = nil;\n    \n    for (uint32_t i = startIndex; i < (startIndex + limit); i++) {\n        BTCKeychain* keychain = [self derivedKeychainAtIndex:i hardened:hardened];\n        \n        if ([keychain.publicKey isEqual:data]) {\n            result = keychain;\n            break;\n        }\n        \n        [keychain clear];\n    }\n    \n    BTCDataClear(data);\n    \n    return result;\n}\n\n\n\n#pragma mark - NSObject\n\n\n- (id) copyWithZone:(NSZone *)zone {\n    CHECK_IF_CLEARED;\n\n    BTCKeychain* keychain = [[BTCKeychain alloc] init];\n    \n    keychain.chainCode = [self.chainCode mutableCopy];\n    keychain.privateKey = [self.privateKey mutableCopy];\n    if (!_privateKey) keychain.publicKey = [self.publicKey mutableCopy];\n    keychain.parentFingerprint = self.parentFingerprint;\n    keychain.index = self.index;\n    keychain.depth = self.depth;\n    keychain.hardened = self.hardened;\n    \n    return keychain;\n}\n\n- (BOOL) isEqual:(BTCKeychain*)other {\n    CHECK_IF_CLEARED;\n\n    if (self == other) return YES;\n    \n    if (self.isPrivate != other.isPrivate) return NO;\n    if (self.fingerprint != other.fingerprint) return NO;\n    if (self.parentFingerprint != other.parentFingerprint) return NO;\n    if (self.index != other.index) return NO;\n    if (self.hardened != other.hardened) return NO;\n    \n    if (self.isPrivate) {\n        if (![self.privateKey isEqual:other.privateKey]) return NO;\n    } else {\n        if (![self.publicKey isEqual:other.publicKey]) return NO;\n    }\n    \n    if (![self.chainCode isEqual:other.chainCode]) return NO;\n    \n    return YES;\n}\n\n- (NSUInteger) hash {\n    return self.fingerprint;\n}\n\n- (NSString*) description {\n    return [NSString stringWithFormat:@\"<%@ %@>\", [self class], self.extendedPublicKey];\n}\n\n- (NSString*) debugDescription {\n    return [NSString stringWithFormat:@\"<%@:0x%p depth:%d index:%x%@ parentFingerprint:%x fingerprint:%x privkey:%@ pubkey:%@ chainCode:%@>\", [self class], self,\n            (int)_depth,\n            _index,\n            _hardened ? @\" hardened:YES\" : @\"\",\n            _parentFingerprint,\n            self.fingerprint,\n            [BTCHexFromData(self.privateKey) substringToIndex:8],\n            [BTCHexFromData(self.publicKey) substringToIndex:8],\n            [BTCHexFromData(self.chainCode) substringToIndex:8]\n            ];\n}\n\n\n\n@end\n\n\n"
  },
  {
    "path": "Pods/CoreBitcoin/CoreBitcoin/BTCMerkleTree.h",
    "content": "// CoreBitcoin by Oleg Andreev <oleganza@gmail.com>, WTFPL.\n\n#import <Foundation/Foundation.h>\n\n@interface BTCMerkleTree : NSObject\n\n// Returns the merkle root of the tree, a 256-bit hash.\n@property(nonatomic, readonly) NSData* merkleRoot;\n\n// Returns YES if the merkle tree has duplicate items in the tail that cause merkle root collision.\n// See also CVE-2012-2459.\n@property(nonatomic, readonly) BOOL hasTailDuplicates;\n\n// Builds a merkle tree based on raw hashes.\n- (id) initWithHashes:(NSArray*)hashes;\n\n// Builds a merkle tree based on transaction hashes.\n- (id) initWithTransactions:(NSArray* /* [BTCTransaction] */)transactions;\n\n// Builds a merkle tree based on BTCHash256 hashes of each NSData item.\n- (id) initWithDataItems:(NSArray* /* [NSData] */)dataItems;\n\n@end\n"
  },
  {
    "path": "Pods/CoreBitcoin/CoreBitcoin/BTCMerkleTree.m",
    "content": "// CoreBitcoin by Oleg Andreev <oleganza@gmail.com>, WTFPL.\n\n#import \"BTCMerkleTree.h\"\n#import \"BTCData.h\"\n\n@interface BTCMerkleTree ()\n@property(nonatomic, readwrite) NSData* merkleRoot;\n@property(nonatomic, readwrite) BOOL hasTailDuplicates;\n@property(nonatomic) NSArray* hashes;\n@end\n\n@implementation BTCMerkleTree\n\n- (id) initWithHashes:(NSArray*)hashes {\n    if (hashes.count == 0) return nil;\n    if (self = [super init]) {\n        self.hashes = hashes;\n    }\n    return self;\n}\n\n- (id) initWithTransactions:(NSArray*)transactions {\n    if (transactions.count == 0) return nil;\n    return [self initWithHashes:[transactions valueForKey:@\"transactionHash\"]];\n}\n\n- (id) initWithDataItems:(NSArray* /* [NSData] */)dataItems {\n    if (dataItems.count == 0) return nil;\n    NSMutableArray* hashes = [NSMutableArray arrayWithCapacity:dataItems.count];\n    for (NSData* data in dataItems) {\n        [hashes addObject:BTCHash256(data)];\n    }\n    return [self initWithHashes:hashes];\n}\n\n- (NSData*) merkleRoot {\n    if (!_merkleRoot) {\n        _merkleRoot = [self computeMerkleRoot];\n    }\n    return _merkleRoot;\n}\n\n- (BOOL) hasTailDuplicates {\n    if (!_merkleRoot) {\n        _merkleRoot = [self computeMerkleRoot];\n    }\n    return _hasTailDuplicates;\n}\n\n- (NSData*) computeMerkleRoot {\n    // Based on original Satoshi implementation + vulnerability detection API:\n    /* WARNING! If you're reading this because you're learning about crypto\n       and/or designing a new system that will use merkle trees, keep in mind\n       that the following merkle tree algorithm has a serious flaw related to\n       duplicate txids, resulting in a vulnerability (CVE-2012-2459).\n\n       The reason is that if the number of hashes in the list at a given time\n       is odd, the last one is duplicated before computing the next level (which\n       is unusual in Merkle trees). This results in certain sequences of\n       transactions leading to the same merkle root. For example, these two\n       trees:\n\n                    A               A\n                  /  \\            /   \\\n                B     C         B       C\n               / \\    |        / \\     / \\\n              D   E   F       D   E   F   F\n             / \\ / \\ / \\     / \\ / \\ / \\ / \\\n             1 2 3 4 5 6     1 2 3 4 5 6 5 6\n\n       for transaction lists [1,2,3,4,5,6] and [1,2,3,4,5,6,5,6] (where 5 and\n       6 are repeated) result in the same root hash A (because the hash of both\n       of (F) and (F,F) is C).\n\n       The vulnerability results from being able to send a block with such a\n       transaction list, with the same merkle root, and the same block hash as\n       the original without duplication, resulting in failed validation. If the\n       receiving node proceeds to mark that block as permanently invalid\n       however, it will fail to accept further unmodified (and thus potentially\n       valid) versions of the same block. We defend against this by detecting\n       the case where we would hash two identical hashes at the end of the list\n       together, and treating that identically to the block having an invalid\n       merkle root. Assuming no double-SHA256 collisions, this will detect all\n       known ways of changing the transactions without affecting the merkle\n       root.\n    */\n    NSMutableArray* tree = [self.hashes mutableCopy];\n    _hasTailDuplicates = NO;\n    NSInteger j = 0;\n    for (NSInteger size = (NSInteger)tree.count; size > 1; size = (size + 1) / 2) {\n        for (NSInteger i = 0; i < size; i += 2) {\n            NSInteger i2 = MIN(i + 1, size - 1);\n            if (i2 == i + 1 && i2 + 1 == size && [tree[j+i] isEqual:tree[j+i2]]) {\n                // Two identical hashes at the end of the list at a particular level.\n                _hasTailDuplicates = YES;\n            }\n            NSData* hash = BTCHash256Concat(tree[j+i], tree[j+i2]);\n            [tree addObject:hash];\n        }\n        j += size;\n    }\n    return tree.lastObject;\n}\n\n@end\n"
  },
  {
    "path": "Pods/CoreBitcoin/CoreBitcoin/BTCMnemonic.h",
    "content": "// CoreBitcoin by Oleg Andreev <oleganza@gmail.com>, WTFPL.\n\n#import <Foundation/Foundation.h>\n\ntypedef NS_ENUM(int8_t, BTCMnemonicWordListType) {\n    // English wordlist specified by BIP39.\n    BTCMnemonicWordListTypeEnglish = 0,\n\n    // If this is specified when importing mnemonic, checksum can not be verified.\n    BTCMnemonicWordListTypeUnknown = -1,\n};\n\n@class BTCKeychain;\n\n// Implementation of BIP39: Mnemonic code for generating deterministic keys.\n@interface BTCMnemonic : NSObject\n\n// Type of the wordlist being used.\n@property(nonatomic, readonly) BTCMnemonicWordListType wordListType;\n\n// Raw entropy buffer used as an input.\n@property(nonatomic, readonly) NSData* entropy;\n\n// A list of words composed from the rawEntropy using the specified wordlist.\n// This wordlist can be written down by the user and used to recover the seed.\n@property(nonatomic, readonly) NSArray* words;\n\n// Optional password. If not specified, returns an empty string.\n@property(nonatomic, readonly) NSString* password;\n\n// Returns a wallet seed computed from words and password that you can use in BIP32 or alike.\n// Note: The name \"seed\" means an input for the external key derivation scheme (e.g. BIP32),\n// not to this mnemonic implementation. Input for the mnemonic is `entropy`, `password` and `wordListType`.\n@property(nonatomic, readonly) NSData* seed;\n\n// Root keychain instantiated with a given seed.\n@property(nonatomic, readonly) BTCKeychain* keychain;\n\n// Compact binary representation of the mnemonic.\n@property(nonatomic, readonly) NSData* data;\n\n// Binary representation of the mnemonic with computed seed appended (so it can be cached).\n@property(nonatomic, readonly) NSData* dataWithSeed;\n\n// Inits mnemonic with a raw entropy buffer, optional password and a wordlist.\n// If `password` is nil, it is treated as an empty string.\n// `entropy` length in bits must be divisible by 32 (128, 160, 192, 224, 256 bits).\n// Returns nil if entropy has incorrect size or wordlist is not supported.\n- (id) initWithEntropy:(NSData*)entropy password:(NSString*)password wordListType:(BTCMnemonicWordListType)wordListType;\n\n// Inits mnemonic with user's words, optional password and an optional wordlist type.\n// If `password` is nil, it is treated as an empty string.\n// If `wordListType` is BTCMnemonicWordListTypeUnknown, checksum is not verified.\n// Returns nil if checksum is invalid.\n- (id) initWithWords:(NSArray*)words password:(NSString*)password wordListType:(BTCMnemonicWordListType)wordListType;\n\n// Deserializes mnemonic from its binary representation\n// (which contains wordlist type, raw entropy, password and optional computed seed).\n// If the data was produced by `-dataWithSeed` method, seed will not be recomputed.\n- (id) initWithData:(NSData*)data;\n\n// Clears all sensitive information from memory.\n- (void) clear;\n\n@end\n"
  },
  {
    "path": "Pods/CoreBitcoin/CoreBitcoin/BTCMnemonic.m",
    "content": "// CoreBitcoin by Oleg Andreev <oleganza@gmail.com>, WTFPL.\n\n#import \"BTCMnemonic.h\"\n#import \"BTCData.h\"\n#import \"BTCKeychain.h\"\n#import \"BTCProtocolSerialization.h\"\n#include <CommonCrypto/CommonKeyDerivation.h>\n\n@interface BTCMnemonic ()\n\n@property(nonatomic, readwrite) BTCMnemonicWordListType wordListType;\n@property(nonatomic, readwrite) NSData* entropy;\n@property(nonatomic, readwrite) NSArray* words;\n@property(nonatomic, readwrite) NSString* password;\n@property(nonatomic, readwrite) NSData* seed;\n@property(nonatomic, readwrite) BTCKeychain* keychain;\n\n@end\n\nstatic inline BOOL BTCMnemonicIsBitSet(uint8_t* buf, int bitIndex) {\n    int val = ((int) buf[bitIndex / 8]) & 0xFF;\n    val = val << (bitIndex % 8);\n    val = val & 0x80;\n    return val == 0x80;\n}\n\nstatic inline void BTCMnemonicSetBit(uint8_t* buf, int bitIndex) {\n    int value = ((int) buf[bitIndex / 8]) & 0xFF;\n    value = value | (1 << (7 - (bitIndex % 8)));\n    buf[bitIndex / 8] = (uint8_t) value;\n}\n\nstatic inline void BTCMnemonicIntegerTo11Bits(uint8_t* buf, int bitIndex, int integer) {\n    for (int i = 0; i < 11; i++) {\n        if ((integer & 0x400) == 0x400) {\n            BTCMnemonicSetBit(buf, bitIndex + i);\n        }\n        integer = integer << 1;\n    }\n}\n\nstatic inline NSUInteger BTCMnemonicIntegerFrom11Bits(uint8_t* buf, int bitIndex) {\n    NSUInteger value = 0;\n    for (int i = 0; i < 11; i++) {\n        if (BTCMnemonicIsBitSet(buf, bitIndex + i)) {\n            value = (value << 1) | 0x01;\n        } else {\n            value = (value << 1);\n        }\n    }\n    return value;\n}\n\n\n\n@implementation BTCMnemonic\n\n\n- (id) initWithEntropy:(NSData*)entropy password:(NSString*)password wordListType:(BTCMnemonicWordListType)wordListType {\n    if (!entropy) return nil;\n    if (wordListType == BTCMnemonicWordListTypeUnknown) return nil;\n\n    if (self = [super init]) {\n        _entropy = entropy;\n        _password = password;\n        _wordListType = wordListType;\n    }\n    return self;\n}\n\n- (id) initWithWords:(NSArray*)words password:(NSString*)password wordListType:(BTCMnemonicWordListType)wordListType {\n    if (!words) return nil;\n\n    if (words.count != 12 &&\n        words.count != 15 &&\n        words.count != 18 &&\n        words.count != 21 &&\n        words.count != 24) {\n        // Words count should be between 12 and 24 and be divisible by 13.\n        return nil;\n    }\n\n    if (self = [super init]) {\n        _words = words;\n        _password = password ?: @\"\";\n        _wordListType = wordListType;\n\n        // If the list is given, get the entropy from it\n        if (wordListType != BTCMnemonicWordListTypeUnknown) {\n            _entropy = [self entropyFromWords:_words wordListType:wordListType];\n\n            // If failed to read entropy it's because words are malformed and/or checksum failed.\n            if (!_entropy) return nil;\n        } else {\n            // leave entropy being nil. This instance is still useful for BIP32 seed.\n        }\n    }\n    return self;\n}\n\n\n- (id) initWithData:(NSData*)data {\n    if (!data) return nil;\n\n    if (self = [super init]) {\n        NSAssert(sizeof(BTCMnemonicWordListType) == 1, @\"must be 1 byte long\");\n\n        if (data.length < sizeof(BTCMnemonicWordListType)) {\n            // Not enough bytes.\n            return nil;\n        }\n\n        NSUInteger offset = 0;\n\n        _wordListType = ((BTCMnemonicWordListType*)data.bytes)[offset];\n\n        offset += sizeof(BTCMnemonicWordListType);\n\n        if (_wordListType != BTCMnemonicWordListTypeEnglish) {\n            // Not supported list.\n            return nil;\n        }\n\n        NSUInteger encodedEntropyLength = 0;\n        _entropy = [BTCProtocolSerialization\n                    readVarStringFromData:[data subdataWithRange:NSMakeRange(offset, data.length - offset)]\n                    readBytes:&encodedEntropyLength];\n        offset += encodedEntropyLength;\n\n        if (_entropy.length != 128 / 8 &&\n            _entropy.length != 160 / 8 &&\n            _entropy.length != 192 / 8 &&\n            _entropy.length != 224 / 8 &&\n            _entropy.length != 256 / 8) {\n            // Not canonical size of the entropy.\n            return nil;\n        }\n\n        NSUInteger encodedPasswordLength = 0;\n        NSData* passwordData = [BTCProtocolSerialization\n                                readVarStringFromData:[data subdataWithRange:NSMakeRange(offset, data.length - offset)]\n                                readBytes:&encodedPasswordLength];\n        offset += encodedPasswordLength;\n\n        if (!passwordData) {\n            // Bad mnemonic encoding\n            NSLog(@\"ERROR: BTCMnemonic cannot decode password (if missing, password should be empty string with 0x00 length prefix).\");\n            return nil;\n        }\n\n        _password = [[NSString alloc] initWithData:passwordData encoding:NSUTF8StringEncoding];\n\n        if (!_password) {\n            // Bad password encoding (not representable in UTF8, wtf?)\n            NSLog(@\"ERROR: BTCMnemonic cannot convert password back to UTF8 string.\");\n            return nil;\n        }\n\n        // If we have some more data, try to read seed from there.\n        if (data.length > offset) {\n            _seed = [BTCProtocolSerialization\n                     readVarStringFromData:[data subdataWithRange:NSMakeRange(offset, data.length - offset)]\n                     readBytes:NULL];\n\n            if (!_seed) {\n                NSLog(@\"ERROR: BTCMnemonic failed to read encoded seed from mnemonic payload. Will recompute it lazily when needed.\");\n            }\n        }\n    }\n    return self;\n}\n\n\n// Lazily-computed phrase of words\n- (NSArray*) words {\n    if (!_words) {\n        _words = [self wordsForEntropy:self.entropy wordListType:self.wordListType];\n    }\n    return _words;\n}\n\n// Lazily-computed seed for BIP32\n- (NSData*) seed {\n    if (!_seed) {\n        _seed = [self seedForWords:self.words password:self.password];\n    }\n    return _seed;\n}\n\n// Root keychain instantiated with a given seed.\n- (BTCKeychain*) keychain\n{\n    if (!_keychain) {\n        _keychain = [[BTCKeychain alloc] initWithSeed:self.seed];\n    }\n    return _keychain;\n}\n\n- (NSData*) data {\n    return [self dataWithSeed:NO];\n}\n\n- (NSData*) dataWithSeed {\n    return [self dataWithSeed:YES];\n}\n\n- (NSData*) dataWithSeed:(BOOL)withSeed {\n    NSMutableData* data = [NSMutableData data];\n\n    NSAssert(sizeof(_wordListType) == 1, @\"must be 1 byte long\");\n\n    // Do not export unknown wordlist mnemonics so we don't accidentally get them back.\n    if (_wordListType == BTCMnemonicWordListTypeUnknown) return nil;\n\n    [data appendBytes:&_wordListType length:sizeof(_wordListType)];\n\n    if (!_entropy) return nil;\n\n    [data appendData:[BTCProtocolSerialization dataForVarString:_entropy]];\n\n    NSData* passwordData = [_password ?: @\"\" dataUsingEncoding:NSUTF8StringEncoding];\n\n    [data appendData:[BTCProtocolSerialization dataForVarString:passwordData]];\n\n    if (withSeed) {\n        NSData* seed = self.seed;\n\n        [data appendData:[BTCProtocolSerialization dataForVarString:seed]];\n    }\n\n    return data;\n}\n\n- (NSUInteger) hash {\n    return [self.seed hash];\n}\n\n- (BOOL) isEqual:(BTCMnemonic*)other {\n    return [self.seed isEqual:other.seed];\n}\n\n- (void) dealloc {\n    [self clear];\n}\n\n- (void) clear {\n    BTCDataClear(_entropy);\n    BTCDataClear(_seed);\n    [_keychain clear];\n    _keychain = nil;\n    _entropy = nil;\n    _seed = nil;\n}\n\n\n\n#pragma mark - Private Helpers\n\n\n- (NSData*) seedForWords:(NSArray*)words password:(NSString*)password {\n    password = password ?: @\"\";\n\n    NSData* mnemonic = [[words componentsJoinedByString:@\" \"] dataUsingEncoding:NSUTF8StringEncoding];\n    NSData* salt = [[@\"mnemonic\" stringByAppendingString:password] dataUsingEncoding:NSUTF8StringEncoding];\n\n    const NSUInteger seedLength = 64;\n    NSMutableData* seed = [NSMutableData dataWithLength:seedLength];\n\n    CCKeyDerivationPBKDF(kCCPBKDF2,\n                         mnemonic.bytes,\n                         mnemonic.length,\n                         salt.bytes,\n                         salt.length,\n                         kCCPRFHmacAlgSHA512,\n                         2048,\n                         seed.mutableBytes,\n                         seedLength);\n\n    return seed;\n}\n\n- (NSArray*) wordsForEntropy:(NSData*)entropy wordListType:(BTCMnemonicWordListType)listType {\n    if (!entropy) return nil;\n\n    NSArray* wordList = [[self class] wordListForType:listType];\n\n    if (!wordList) return nil;\n\n    NSUInteger bitLength = entropy.length * 8;\n\n    if (bitLength != 128 &&\n        bitLength != 160 &&\n        bitLength != 192 &&\n        bitLength != 224 &&\n        bitLength != 256) {\n        [[NSException exceptionWithName:@\"Bad entropy length\" reason:@\"Raw entropy must be 128, 160, 192, 224, or 256 bits\" userInfo:nil] raise];\n    }\n\n    // Calculate the checksum\n    NSUInteger checksumLength = bitLength / 32;\n    NSData* checksumHash = BTCSHA256(entropy);\n    uint8_t checksumByte = (uint8_t) (((0xFF << (8 - checksumLength)) & 0xFF) & (0xFF & ((int) ((uint8_t*)checksumHash.bytes)[0] )));\n\n    // Append the checksum to the raw entropy\n    NSMutableData* buf = [entropy mutableCopy];\n    [buf appendBytes:&checksumByte length:1];\n\n    // Turn the array of bytes into a word list where each word represents 11 bits\n    NSUInteger wordsCount = (bitLength + checksumLength) / 11;\n    NSMutableArray* words = [[NSMutableArray alloc] initWithCapacity:wordsCount];\n\n    for (int i = 0; i < wordsCount; i++) {\n        NSUInteger wordIndex = BTCMnemonicIntegerFrom11Bits((uint8_t*)buf.bytes, i * 11);\n\n        [words addObject:wordList[wordIndex]];\n    }\n    return words;\n}\n\n- (NSData*) entropyFromWords:(NSArray*)words wordListType:(BTCMnemonicWordListType)listType {\n    if (listType == BTCMnemonicWordListTypeUnknown) return nil;\n    if (!words) return nil;\n\n    if (words.count != 12 &&\n        words.count != 15 &&\n        words.count != 18 &&\n        words.count != 21 &&\n        words.count != 24) {\n        // Words count should be between 12 and 24 and be divisible by 13.\n        return nil;\n    }\n\n    NSArray* wordList = [[self class] wordListForType:listType];\n\n    int bitLength = (int)words.count * 11;\n\n    NSMutableData* buf = [NSMutableData dataWithLength:bitLength / 8 + ((bitLength % 8) > 0 ? 1 : 0)];\n\n    for (int i = 0; i < words.count; i++) {\n        NSString* word = words[i];\n        NSUInteger wordIndex = [wordList indexOfObject:word];\n\n        if (wordIndex == NSNotFound) {\n            return nil;\n        }\n\n        BTCMnemonicIntegerTo11Bits((uint8_t*)buf.mutableBytes, i * 11, (int)wordIndex);\n    }\n\n    NSData* entropy = [buf subdataWithRange:NSMakeRange(0, buf.length - 1)];\n\n    // Calculate the checksum\n    NSUInteger checksumLength = bitLength / 32;\n    NSData* checksumHash = BTCSHA256(entropy);\n    uint8_t checksumByte = (uint8_t) (((0xFF << (8 - checksumLength)) & 0xFF) & (0xFF & ((int) ((uint8_t*)checksumHash.bytes)[0] )));\n\n    uint8_t lastByte = ((uint8_t*)buf.bytes)[buf.length - 1];\n\n    // Verify the checksum\n    if (lastByte != checksumByte) {\n        return nil;\n    }\n\n    return entropy;\n}\n\n\n\n\n\n\n\n#pragma mark - Supported Word Lists\n\n\n\n\n\n+ (NSArray*) wordListForType:(BTCMnemonicWordListType)type {\n    if (type == BTCMnemonicWordListTypeEnglish) {\n        return [self englishWordList];\n    }\n\n    return nil;\n}\n\n+ (NSArray*) englishWordList {\n    static NSArray* list;\n    static dispatch_once_t onceToken;\n    dispatch_once(&onceToken, ^{\n        list = @[@\"abandon\", @\"ability\", @\"able\", @\"about\", @\"above\",\n                 @\"absent\", @\"absorb\", @\"abstract\", @\"absurd\", @\"abuse\", @\"access\", @\"accident\", @\"account\", @\"accuse\", @\"achieve\",\n                 @\"acid\", @\"acoustic\", @\"acquire\", @\"across\", @\"act\", @\"action\", @\"actor\", @\"actress\", @\"actual\", @\"adapt\", @\"add\",\n                 @\"addict\", @\"address\", @\"adjust\", @\"admit\", @\"adult\", @\"advance\", @\"advice\", @\"aerobic\", @\"affair\", @\"afford\", @\"afraid\",\n                 @\"again\", @\"age\", @\"agent\", @\"agree\", @\"ahead\", @\"aim\", @\"air\", @\"airport\", @\"aisle\", @\"alarm\", @\"album\", @\"alcohol\",\n                 @\"alert\", @\"alien\", @\"all\", @\"alley\", @\"allow\", @\"almost\", @\"alone\", @\"alpha\", @\"already\", @\"also\", @\"alter\", @\"always\",\n                 @\"amateur\", @\"amazing\", @\"among\", @\"amount\", @\"amused\", @\"analyst\", @\"anchor\", @\"ancient\", @\"anger\", @\"angle\", @\"angry\",\n                 @\"animal\", @\"ankle\", @\"announce\", @\"annual\", @\"another\", @\"answer\", @\"antenna\", @\"antique\", @\"anxiety\", @\"any\", @\"apart\",\n                 @\"apology\", @\"appear\", @\"apple\", @\"approve\", @\"april\", @\"arch\", @\"arctic\", @\"area\", @\"arena\", @\"argue\", @\"arm\", @\"armed\",\n                 @\"armor\", @\"army\", @\"around\", @\"arrange\", @\"arrest\", @\"arrive\", @\"arrow\", @\"art\", @\"artefact\", @\"artist\", @\"artwork\",\n                 @\"ask\", @\"aspect\", @\"assault\", @\"asset\", @\"assist\", @\"assume\", @\"asthma\", @\"athlete\", @\"atom\", @\"attack\", @\"attend\",\n                 @\"attitude\", @\"attract\", @\"auction\", @\"audit\", @\"august\", @\"aunt\", @\"author\", @\"auto\", @\"autumn\", @\"average\", @\"avocado\",\n                 @\"avoid\", @\"awake\", @\"aware\", @\"away\", @\"awesome\", @\"awful\", @\"awkward\", @\"axis\", @\"baby\", @\"bachelor\", @\"bacon\",\n                 @\"badge\", @\"bag\", @\"balance\", @\"balcony\", @\"ball\", @\"bamboo\", @\"banana\", @\"banner\", @\"bar\", @\"barely\", @\"bargain\",\n                 @\"barrel\", @\"base\", @\"basic\", @\"basket\", @\"battle\", @\"beach\", @\"bean\", @\"beauty\", @\"because\", @\"become\", @\"beef\",\n                 @\"before\", @\"begin\", @\"behave\", @\"behind\", @\"believe\", @\"below\", @\"belt\", @\"bench\", @\"benefit\", @\"best\", @\"betray\",\n                 @\"better\", @\"between\", @\"beyond\", @\"bicycle\", @\"bid\", @\"bike\", @\"bind\", @\"biology\", @\"bird\", @\"birth\", @\"bitter\",\n                 @\"black\", @\"blade\", @\"blame\", @\"blanket\", @\"blast\", @\"bleak\", @\"bless\", @\"blind\", @\"blood\", @\"blossom\", @\"blouse\",\n                 @\"blue\", @\"blur\", @\"blush\", @\"board\", @\"boat\", @\"body\", @\"boil\", @\"bomb\", @\"bone\", @\"bonus\", @\"book\", @\"boost\", @\"border\",\n                 @\"boring\", @\"borrow\", @\"boss\", @\"bottom\", @\"bounce\", @\"box\", @\"boy\", @\"bracket\", @\"brain\", @\"brand\", @\"brass\", @\"brave\",\n                 @\"bread\", @\"breeze\", @\"brick\", @\"bridge\", @\"brief\", @\"bright\", @\"bring\", @\"brisk\", @\"broccoli\", @\"broken\", @\"bronze\",\n                 @\"broom\", @\"brother\", @\"brown\", @\"brush\", @\"bubble\", @\"buddy\", @\"budget\", @\"buffalo\", @\"build\", @\"bulb\", @\"bulk\",\n                 @\"bullet\", @\"bundle\", @\"bunker\", @\"burden\", @\"burger\", @\"burst\", @\"bus\", @\"business\", @\"busy\", @\"butter\", @\"buyer\",\n                 @\"buzz\", @\"cabbage\", @\"cabin\", @\"cable\", @\"cactus\", @\"cage\", @\"cake\", @\"call\", @\"calm\", @\"camera\", @\"camp\", @\"can\",\n                 @\"canal\", @\"cancel\", @\"candy\", @\"cannon\", @\"canoe\", @\"canvas\", @\"canyon\", @\"capable\", @\"capital\", @\"captain\", @\"car\",\n                 @\"carbon\", @\"card\", @\"cargo\", @\"carpet\", @\"carry\", @\"cart\", @\"case\", @\"cash\", @\"casino\", @\"castle\", @\"casual\", @\"cat\",\n                 @\"catalog\", @\"catch\", @\"category\", @\"cattle\", @\"caught\", @\"cause\", @\"caution\", @\"cave\", @\"ceiling\", @\"celery\", @\"cement\",\n                 @\"census\", @\"century\", @\"cereal\", @\"certain\", @\"chair\", @\"chalk\", @\"champion\", @\"change\", @\"chaos\", @\"chapter\",\n                 @\"charge\", @\"chase\", @\"chat\", @\"cheap\", @\"check\", @\"cheese\", @\"chef\", @\"cherry\", @\"chest\", @\"chicken\", @\"chief\", @\"child\",\n                 @\"chimney\", @\"choice\", @\"choose\", @\"chronic\", @\"chuckle\", @\"chunk\", @\"churn\", @\"cigar\", @\"cinnamon\", @\"circle\",\n                 @\"citizen\", @\"city\", @\"civil\", @\"claim\", @\"clap\", @\"clarify\", @\"claw\", @\"clay\", @\"clean\", @\"clerk\", @\"clever\", @\"click\",\n                 @\"client\", @\"cliff\", @\"climb\", @\"clinic\", @\"clip\", @\"clock\", @\"clog\", @\"close\", @\"cloth\", @\"cloud\", @\"clown\", @\"club\",\n                 @\"clump\", @\"cluster\", @\"clutch\", @\"coach\", @\"coast\", @\"coconut\", @\"code\", @\"coffee\", @\"coil\", @\"coin\", @\"collect\",\n                 @\"color\", @\"column\", @\"combine\", @\"come\", @\"comfort\", @\"comic\", @\"common\", @\"company\", @\"concert\", @\"conduct\",\n                 @\"confirm\", @\"congress\", @\"connect\", @\"consider\", @\"control\", @\"convince\", @\"cook\", @\"cool\", @\"copper\", @\"copy\",\n                 @\"coral\", @\"core\", @\"corn\", @\"correct\", @\"cost\", @\"cotton\", @\"couch\", @\"country\", @\"couple\", @\"course\", @\"cousin\",\n                 @\"cover\", @\"coyote\", @\"crack\", @\"cradle\", @\"craft\", @\"cram\", @\"crane\", @\"crash\", @\"crater\", @\"crawl\", @\"crazy\", @\"cream\",\n                 @\"credit\", @\"creek\", @\"crew\", @\"cricket\", @\"crime\", @\"crisp\", @\"critic\", @\"crop\", @\"cross\", @\"crouch\", @\"crowd\",\n                 @\"crucial\", @\"cruel\", @\"cruise\", @\"crumble\", @\"crunch\", @\"crush\", @\"cry\", @\"crystal\", @\"cube\", @\"culture\", @\"cup\",\n                 @\"cupboard\", @\"curious\", @\"current\", @\"curtain\", @\"curve\", @\"cushion\", @\"custom\", @\"cute\", @\"cycle\", @\"dad\", @\"damage\",\n                 @\"damp\", @\"dance\", @\"danger\", @\"daring\", @\"dash\", @\"daughter\", @\"dawn\", @\"day\", @\"deal\", @\"debate\", @\"debris\", @\"decade\",\n                 @\"december\", @\"decide\", @\"decline\", @\"decorate\", @\"decrease\", @\"deer\", @\"defense\", @\"define\", @\"defy\", @\"degree\",\n                 @\"delay\", @\"deliver\", @\"demand\", @\"demise\", @\"denial\", @\"dentist\", @\"deny\", @\"depart\", @\"depend\", @\"deposit\", @\"depth\",\n                 @\"deputy\", @\"derive\", @\"describe\", @\"desert\", @\"design\", @\"desk\", @\"despair\", @\"destroy\", @\"detail\", @\"detect\",\n                 @\"develop\", @\"device\", @\"devote\", @\"diagram\", @\"dial\", @\"diamond\", @\"diary\", @\"dice\", @\"diesel\", @\"diet\", @\"differ\",\n                 @\"digital\", @\"dignity\", @\"dilemma\", @\"dinner\", @\"dinosaur\", @\"direct\", @\"dirt\", @\"disagree\", @\"discover\", @\"disease\",\n                 @\"dish\", @\"dismiss\", @\"disorder\", @\"display\", @\"distance\", @\"divert\", @\"divide\", @\"divorce\", @\"dizzy\", @\"doctor\",\n                 @\"document\", @\"dog\", @\"doll\", @\"dolphin\", @\"domain\", @\"donate\", @\"donkey\", @\"donor\", @\"door\", @\"dose\", @\"double\", @\"dove\",\n                 @\"draft\", @\"dragon\", @\"drama\", @\"drastic\", @\"draw\", @\"dream\", @\"dress\", @\"drift\", @\"drill\", @\"drink\", @\"drip\", @\"drive\",\n                 @\"drop\", @\"drum\", @\"dry\", @\"duck\", @\"dumb\", @\"dune\", @\"during\", @\"dust\", @\"dutch\", @\"duty\", @\"dwarf\", @\"dynamic\", @\"eager\",\n                 @\"eagle\", @\"early\", @\"earn\", @\"earth\", @\"easily\", @\"east\", @\"easy\", @\"echo\", @\"ecology\", @\"economy\", @\"edge\", @\"edit\",\n                 @\"educate\", @\"effort\", @\"egg\", @\"eight\", @\"either\", @\"elbow\", @\"elder\", @\"electric\", @\"elegant\", @\"element\", @\"elephant\",\n                 @\"elevator\", @\"elite\", @\"else\", @\"embark\", @\"embody\", @\"embrace\", @\"emerge\", @\"emotion\", @\"employ\", @\"empower\", @\"empty\",\n                 @\"enable\", @\"enact\", @\"end\", @\"endless\", @\"endorse\", @\"enemy\", @\"energy\", @\"enforce\", @\"engage\", @\"engine\", @\"enhance\",\n                 @\"enjoy\", @\"enlist\", @\"enough\", @\"enrich\", @\"enroll\", @\"ensure\", @\"enter\", @\"entire\", @\"entry\", @\"envelope\", @\"episode\",\n                 @\"equal\", @\"equip\", @\"era\", @\"erase\", @\"erode\", @\"erosion\", @\"error\", @\"erupt\", @\"escape\", @\"essay\", @\"essence\",\n                 @\"estate\", @\"eternal\", @\"ethics\", @\"evidence\", @\"evil\", @\"evoke\", @\"evolve\", @\"exact\", @\"example\", @\"excess\",\n                 @\"exchange\", @\"excite\", @\"exclude\", @\"excuse\", @\"execute\", @\"exercise\", @\"exhaust\", @\"exhibit\", @\"exile\", @\"exist\",\n                 @\"exit\", @\"exotic\", @\"expand\", @\"expect\", @\"expire\", @\"explain\", @\"expose\", @\"express\", @\"extend\", @\"extra\", @\"eye\",\n                 @\"eyebrow\", @\"fabric\", @\"face\", @\"faculty\", @\"fade\", @\"faint\", @\"faith\", @\"fall\", @\"false\", @\"fame\", @\"family\", @\"famous\",\n                 @\"fan\", @\"fancy\", @\"fantasy\", @\"farm\", @\"fashion\", @\"fat\", @\"fatal\", @\"father\", @\"fatigue\", @\"fault\", @\"favorite\",\n                 @\"feature\", @\"february\", @\"federal\", @\"fee\", @\"feed\", @\"feel\", @\"female\", @\"fence\", @\"festival\", @\"fetch\", @\"fever\",\n                 @\"few\", @\"fiber\", @\"fiction\", @\"field\", @\"figure\", @\"file\", @\"film\", @\"filter\", @\"final\", @\"find\", @\"fine\", @\"finger\",\n                 @\"finish\", @\"fire\", @\"firm\", @\"first\", @\"fiscal\", @\"fish\", @\"fit\", @\"fitness\", @\"fix\", @\"flag\", @\"flame\", @\"flash\",\n                 @\"flat\", @\"flavor\", @\"flee\", @\"flight\", @\"flip\", @\"float\", @\"flock\", @\"floor\", @\"flower\", @\"fluid\", @\"flush\", @\"fly\",\n                 @\"foam\", @\"focus\", @\"fog\", @\"foil\", @\"fold\", @\"follow\", @\"food\", @\"foot\", @\"force\", @\"forest\", @\"forget\", @\"fork\",\n                 @\"fortune\", @\"forum\", @\"forward\", @\"fossil\", @\"foster\", @\"found\", @\"fox\", @\"fragile\", @\"frame\", @\"frequent\", @\"fresh\",\n                 @\"friend\", @\"fringe\", @\"frog\", @\"front\", @\"frost\", @\"frown\", @\"frozen\", @\"fruit\", @\"fuel\", @\"fun\", @\"funny\", @\"furnace\",\n                 @\"fury\", @\"future\", @\"gadget\", @\"gain\", @\"galaxy\", @\"gallery\", @\"game\", @\"gap\", @\"garage\", @\"garbage\", @\"garden\",\n                 @\"garlic\", @\"garment\", @\"gas\", @\"gasp\", @\"gate\", @\"gather\", @\"gauge\", @\"gaze\", @\"general\", @\"genius\", @\"genre\", @\"gentle\",\n                 @\"genuine\", @\"gesture\", @\"ghost\", @\"giant\", @\"gift\", @\"giggle\", @\"ginger\", @\"giraffe\", @\"girl\", @\"give\", @\"glad\",\n                 @\"glance\", @\"glare\", @\"glass\", @\"glide\", @\"glimpse\", @\"globe\", @\"gloom\", @\"glory\", @\"glove\", @\"glow\", @\"glue\", @\"goat\",\n                 @\"goddess\", @\"gold\", @\"good\", @\"goose\", @\"gorilla\", @\"gospel\", @\"gossip\", @\"govern\", @\"gown\", @\"grab\", @\"grace\", @\"grain\",\n                 @\"grant\", @\"grape\", @\"grass\", @\"gravity\", @\"great\", @\"green\", @\"grid\", @\"grief\", @\"grit\", @\"grocery\", @\"group\", @\"grow\",\n                 @\"grunt\", @\"guard\", @\"guess\", @\"guide\", @\"guilt\", @\"guitar\", @\"gun\", @\"gym\", @\"habit\", @\"hair\", @\"half\", @\"hammer\",\n                 @\"hamster\", @\"hand\", @\"happy\", @\"harbor\", @\"hard\", @\"harsh\", @\"harvest\", @\"hat\", @\"have\", @\"hawk\", @\"hazard\", @\"head\",\n                 @\"health\", @\"heart\", @\"heavy\", @\"hedgehog\", @\"height\", @\"hello\", @\"helmet\", @\"help\", @\"hen\", @\"hero\", @\"hidden\", @\"high\",\n                 @\"hill\", @\"hint\", @\"hip\", @\"hire\", @\"history\", @\"hobby\", @\"hockey\", @\"hold\", @\"hole\", @\"holiday\", @\"hollow\", @\"home\",\n                 @\"honey\", @\"hood\", @\"hope\", @\"horn\", @\"horror\", @\"horse\", @\"hospital\", @\"host\", @\"hotel\", @\"hour\", @\"hover\", @\"hub\",\n                 @\"huge\", @\"human\", @\"humble\", @\"humor\", @\"hundred\", @\"hungry\", @\"hunt\", @\"hurdle\", @\"hurry\", @\"hurt\", @\"husband\",\n                 @\"hybrid\", @\"ice\", @\"icon\", @\"idea\", @\"identify\", @\"idle\", @\"ignore\", @\"ill\", @\"illegal\", @\"illness\", @\"image\",\n                 @\"imitate\", @\"immense\", @\"immune\", @\"impact\", @\"impose\", @\"improve\", @\"impulse\", @\"inch\", @\"include\", @\"income\",\n                 @\"increase\", @\"index\", @\"indicate\", @\"indoor\", @\"industry\", @\"infant\", @\"inflict\", @\"inform\", @\"inhale\", @\"inherit\",\n                 @\"initial\", @\"inject\", @\"injury\", @\"inmate\", @\"inner\", @\"innocent\", @\"input\", @\"inquiry\", @\"insane\", @\"insect\",\n                 @\"inside\", @\"inspire\", @\"install\", @\"intact\", @\"interest\", @\"into\", @\"invest\", @\"invite\", @\"involve\", @\"iron\", @\"island\",\n                 @\"isolate\", @\"issue\", @\"item\", @\"ivory\", @\"jacket\", @\"jaguar\", @\"jar\", @\"jazz\", @\"jealous\", @\"jeans\", @\"jelly\", @\"jewel\",\n                 @\"job\", @\"join\", @\"joke\", @\"journey\", @\"joy\", @\"judge\", @\"juice\", @\"jump\", @\"jungle\", @\"junior\", @\"junk\", @\"just\",\n                 @\"kangaroo\", @\"keen\", @\"keep\", @\"ketchup\", @\"key\", @\"kick\", @\"kid\", @\"kidney\", @\"kind\", @\"kingdom\", @\"kiss\", @\"kit\",\n                 @\"kitchen\", @\"kite\", @\"kitten\", @\"kiwi\", @\"knee\", @\"knife\", @\"knock\", @\"know\", @\"lab\", @\"label\", @\"labor\", @\"ladder\",\n                 @\"lady\", @\"lake\", @\"lamp\", @\"language\", @\"laptop\", @\"large\", @\"later\", @\"latin\", @\"laugh\", @\"laundry\", @\"lava\", @\"law\",\n                 @\"lawn\", @\"lawsuit\", @\"layer\", @\"lazy\", @\"leader\", @\"leaf\", @\"learn\", @\"leave\", @\"lecture\", @\"left\", @\"leg\", @\"legal\",\n                 @\"legend\", @\"leisure\", @\"lemon\", @\"lend\", @\"length\", @\"lens\", @\"leopard\", @\"lesson\", @\"letter\", @\"level\", @\"liar\",\n                 @\"liberty\", @\"library\", @\"license\", @\"life\", @\"lift\", @\"light\", @\"like\", @\"limb\", @\"limit\", @\"link\", @\"lion\", @\"liquid\",\n                 @\"list\", @\"little\", @\"live\", @\"lizard\", @\"load\", @\"loan\", @\"lobster\", @\"local\", @\"lock\", @\"logic\", @\"lonely\", @\"long\",\n                 @\"loop\", @\"lottery\", @\"loud\", @\"lounge\", @\"love\", @\"loyal\", @\"lucky\", @\"luggage\", @\"lumber\", @\"lunar\", @\"lunch\",\n                 @\"luxury\", @\"lyrics\", @\"machine\", @\"mad\", @\"magic\", @\"magnet\", @\"maid\", @\"mail\", @\"main\", @\"major\", @\"make\", @\"mammal\",\n                 @\"man\", @\"manage\", @\"mandate\", @\"mango\", @\"mansion\", @\"manual\", @\"maple\", @\"marble\", @\"march\", @\"margin\", @\"marine\",\n                 @\"market\", @\"marriage\", @\"mask\", @\"mass\", @\"master\", @\"match\", @\"material\", @\"math\", @\"matrix\", @\"matter\", @\"maximum\",\n                 @\"maze\", @\"meadow\", @\"mean\", @\"measure\", @\"meat\", @\"mechanic\", @\"medal\", @\"media\", @\"melody\", @\"melt\", @\"member\",\n                 @\"memory\", @\"mention\", @\"menu\", @\"mercy\", @\"merge\", @\"merit\", @\"merry\", @\"mesh\", @\"message\", @\"metal\", @\"method\",\n                 @\"middle\", @\"midnight\", @\"milk\", @\"million\", @\"mimic\", @\"mind\", @\"minimum\", @\"minor\", @\"minute\", @\"miracle\", @\"mirror\",\n                 @\"misery\", @\"miss\", @\"mistake\", @\"mix\", @\"mixed\", @\"mixture\", @\"mobile\", @\"model\", @\"modify\", @\"mom\", @\"moment\",\n                 @\"monitor\", @\"monkey\", @\"monster\", @\"month\", @\"moon\", @\"moral\", @\"more\", @\"morning\", @\"mosquito\", @\"mother\", @\"motion\",\n                 @\"motor\", @\"mountain\", @\"mouse\", @\"move\", @\"movie\", @\"much\", @\"muffin\", @\"mule\", @\"multiply\", @\"muscle\", @\"museum\",\n                 @\"mushroom\", @\"music\", @\"must\", @\"mutual\", @\"myself\", @\"mystery\", @\"myth\", @\"naive\", @\"name\", @\"napkin\", @\"narrow\",\n                 @\"nasty\", @\"nation\", @\"nature\", @\"near\", @\"neck\", @\"need\", @\"negative\", @\"neglect\", @\"neither\", @\"nephew\", @\"nerve\",\n                 @\"nest\", @\"net\", @\"network\", @\"neutral\", @\"never\", @\"news\", @\"next\", @\"nice\", @\"night\", @\"noble\", @\"noise\", @\"nominee\",\n                 @\"noodle\", @\"normal\", @\"north\", @\"nose\", @\"notable\", @\"note\", @\"nothing\", @\"notice\", @\"novel\", @\"now\", @\"nuclear\",\n                 @\"number\", @\"nurse\", @\"nut\", @\"oak\", @\"obey\", @\"object\", @\"oblige\", @\"obscure\", @\"observe\", @\"obtain\", @\"obvious\",\n                 @\"occur\", @\"ocean\", @\"october\", @\"odor\", @\"off\", @\"offer\", @\"office\", @\"often\", @\"oil\", @\"okay\", @\"old\", @\"olive\",\n                 @\"olympic\", @\"omit\", @\"once\", @\"one\", @\"onion\", @\"online\", @\"only\", @\"open\", @\"opera\", @\"opinion\", @\"oppose\", @\"option\",\n                 @\"orange\", @\"orbit\", @\"orchard\", @\"order\", @\"ordinary\", @\"organ\", @\"orient\", @\"original\", @\"orphan\", @\"ostrich\",\n                 @\"other\", @\"outdoor\", @\"outer\", @\"output\", @\"outside\", @\"oval\", @\"oven\", @\"over\", @\"own\", @\"owner\", @\"oxygen\", @\"oyster\",\n                 @\"ozone\", @\"pact\", @\"paddle\", @\"page\", @\"pair\", @\"palace\", @\"palm\", @\"panda\", @\"panel\", @\"panic\", @\"panther\", @\"paper\",\n                 @\"parade\", @\"parent\", @\"park\", @\"parrot\", @\"party\", @\"pass\", @\"patch\", @\"path\", @\"patient\", @\"patrol\", @\"pattern\",\n                 @\"pause\", @\"pave\", @\"payment\", @\"peace\", @\"peanut\", @\"pear\", @\"peasant\", @\"pelican\", @\"pen\", @\"penalty\", @\"pencil\",\n                 @\"people\", @\"pepper\", @\"perfect\", @\"permit\", @\"person\", @\"pet\", @\"phone\", @\"photo\", @\"phrase\", @\"physical\", @\"piano\",\n                 @\"picnic\", @\"picture\", @\"piece\", @\"pig\", @\"pigeon\", @\"pill\", @\"pilot\", @\"pink\", @\"pioneer\", @\"pipe\", @\"pistol\", @\"pitch\",\n                 @\"pizza\", @\"place\", @\"planet\", @\"plastic\", @\"plate\", @\"play\", @\"please\", @\"pledge\", @\"pluck\", @\"plug\", @\"plunge\", @\"poem\",\n                 @\"poet\", @\"point\", @\"polar\", @\"pole\", @\"police\", @\"pond\", @\"pony\", @\"pool\", @\"popular\", @\"portion\", @\"position\",\n                 @\"possible\", @\"post\", @\"potato\", @\"pottery\", @\"poverty\", @\"powder\", @\"power\", @\"practice\", @\"praise\", @\"predict\",\n                 @\"prefer\", @\"prepare\", @\"present\", @\"pretty\", @\"prevent\", @\"price\", @\"pride\", @\"primary\", @\"print\", @\"priority\",\n                 @\"prison\", @\"private\", @\"prize\", @\"problem\", @\"process\", @\"produce\", @\"profit\", @\"program\", @\"project\", @\"promote\",\n                 @\"proof\", @\"property\", @\"prosper\", @\"protect\", @\"proud\", @\"provide\", @\"public\", @\"pudding\", @\"pull\", @\"pulp\", @\"pulse\",\n                 @\"pumpkin\", @\"punch\", @\"pupil\", @\"puppy\", @\"purchase\", @\"purity\", @\"purpose\", @\"purse\", @\"push\", @\"put\", @\"puzzle\",\n                 @\"pyramid\", @\"quality\", @\"quantum\", @\"quarter\", @\"question\", @\"quick\", @\"quit\", @\"quiz\", @\"quote\", @\"rabbit\", @\"raccoon\",\n                 @\"race\", @\"rack\", @\"radar\", @\"radio\", @\"rail\", @\"rain\", @\"raise\", @\"rally\", @\"ramp\", @\"ranch\", @\"random\", @\"range\",\n                 @\"rapid\", @\"rare\", @\"rate\", @\"rather\", @\"raven\", @\"raw\", @\"razor\", @\"ready\", @\"real\", @\"reason\", @\"rebel\", @\"rebuild\",\n                 @\"recall\", @\"receive\", @\"recipe\", @\"record\", @\"recycle\", @\"reduce\", @\"reflect\", @\"reform\", @\"refuse\", @\"region\",\n                 @\"regret\", @\"regular\", @\"reject\", @\"relax\", @\"release\", @\"relief\", @\"rely\", @\"remain\", @\"remember\", @\"remind\", @\"remove\",\n                 @\"render\", @\"renew\", @\"rent\", @\"reopen\", @\"repair\", @\"repeat\", @\"replace\", @\"report\", @\"require\", @\"rescue\", @\"resemble\",\n                 @\"resist\", @\"resource\", @\"response\", @\"result\", @\"retire\", @\"retreat\", @\"return\", @\"reunion\", @\"reveal\", @\"review\",\n                 @\"reward\", @\"rhythm\", @\"rib\", @\"ribbon\", @\"rice\", @\"rich\", @\"ride\", @\"ridge\", @\"rifle\", @\"right\", @\"rigid\", @\"ring\",\n                 @\"riot\", @\"ripple\", @\"risk\", @\"ritual\", @\"rival\", @\"river\", @\"road\", @\"roast\", @\"robot\", @\"robust\", @\"rocket\", @\"romance\",\n                 @\"roof\", @\"rookie\", @\"room\", @\"rose\", @\"rotate\", @\"rough\", @\"round\", @\"route\", @\"royal\", @\"rubber\", @\"rude\", @\"rug\",\n                 @\"rule\", @\"run\", @\"runway\", @\"rural\", @\"sad\", @\"saddle\", @\"sadness\", @\"safe\", @\"sail\", @\"salad\", @\"salmon\", @\"salon\",\n                 @\"salt\", @\"salute\", @\"same\", @\"sample\", @\"sand\", @\"satisfy\", @\"satoshi\", @\"sauce\", @\"sausage\", @\"save\", @\"say\", @\"scale\",\n                 @\"scan\", @\"scare\", @\"scatter\", @\"scene\", @\"scheme\", @\"school\", @\"science\", @\"scissors\", @\"scorpion\", @\"scout\", @\"scrap\",\n                 @\"screen\", @\"script\", @\"scrub\", @\"sea\", @\"search\", @\"season\", @\"seat\", @\"second\", @\"secret\", @\"section\", @\"security\",\n                 @\"seed\", @\"seek\", @\"segment\", @\"select\", @\"sell\", @\"seminar\", @\"senior\", @\"sense\", @\"sentence\", @\"series\", @\"service\",\n                 @\"session\", @\"settle\", @\"setup\", @\"seven\", @\"shadow\", @\"shaft\", @\"shallow\", @\"share\", @\"shed\", @\"shell\", @\"sheriff\",\n                 @\"shield\", @\"shift\", @\"shine\", @\"ship\", @\"shiver\", @\"shock\", @\"shoe\", @\"shoot\", @\"shop\", @\"short\", @\"shoulder\", @\"shove\",\n                 @\"shrimp\", @\"shrug\", @\"shuffle\", @\"shy\", @\"sibling\", @\"sick\", @\"side\", @\"siege\", @\"sight\", @\"sign\", @\"silent\", @\"silk\",\n                 @\"silly\", @\"silver\", @\"similar\", @\"simple\", @\"since\", @\"sing\", @\"siren\", @\"sister\", @\"situate\", @\"six\", @\"size\", @\"skate\",\n                 @\"sketch\", @\"ski\", @\"skill\", @\"skin\", @\"skirt\", @\"skull\", @\"slab\", @\"slam\", @\"sleep\", @\"slender\", @\"slice\", @\"slide\",\n                 @\"slight\", @\"slim\", @\"slogan\", @\"slot\", @\"slow\", @\"slush\", @\"small\", @\"smart\", @\"smile\", @\"smoke\", @\"smooth\", @\"snack\",\n                 @\"snake\", @\"snap\", @\"sniff\", @\"snow\", @\"soap\", @\"soccer\", @\"social\", @\"sock\", @\"soda\", @\"soft\", @\"solar\", @\"soldier\",\n                 @\"solid\", @\"solution\", @\"solve\", @\"someone\", @\"song\", @\"soon\", @\"sorry\", @\"sort\", @\"soul\", @\"sound\", @\"soup\", @\"source\",\n                 @\"south\", @\"space\", @\"spare\", @\"spatial\", @\"spawn\", @\"speak\", @\"special\", @\"speed\", @\"spell\", @\"spend\", @\"sphere\",\n                 @\"spice\", @\"spider\", @\"spike\", @\"spin\", @\"spirit\", @\"split\", @\"spoil\", @\"sponsor\", @\"spoon\", @\"sport\", @\"spot\", @\"spray\",\n                 @\"spread\", @\"spring\", @\"spy\", @\"square\", @\"squeeze\", @\"squirrel\", @\"stable\", @\"stadium\", @\"staff\", @\"stage\", @\"stairs\",\n                 @\"stamp\", @\"stand\", @\"start\", @\"state\", @\"stay\", @\"steak\", @\"steel\", @\"stem\", @\"step\", @\"stereo\", @\"stick\", @\"still\",\n                 @\"sting\", @\"stock\", @\"stomach\", @\"stone\", @\"stool\", @\"story\", @\"stove\", @\"strategy\", @\"street\", @\"strike\", @\"strong\",\n                 @\"struggle\", @\"student\", @\"stuff\", @\"stumble\", @\"style\", @\"subject\", @\"submit\", @\"subway\", @\"success\", @\"such\",\n                 @\"sudden\", @\"suffer\", @\"sugar\", @\"suggest\", @\"suit\", @\"summer\", @\"sun\", @\"sunny\", @\"sunset\", @\"super\", @\"supply\",\n                 @\"supreme\", @\"sure\", @\"surface\", @\"surge\", @\"surprise\", @\"surround\", @\"survey\", @\"suspect\", @\"sustain\", @\"swallow\",\n                 @\"swamp\", @\"swap\", @\"swarm\", @\"swear\", @\"sweet\", @\"swift\", @\"swim\", @\"swing\", @\"switch\", @\"sword\", @\"symbol\", @\"symptom\",\n                 @\"syrup\", @\"system\", @\"table\", @\"tackle\", @\"tag\", @\"tail\", @\"talent\", @\"talk\", @\"tank\", @\"tape\", @\"target\", @\"task\",\n                 @\"taste\", @\"tattoo\", @\"taxi\", @\"teach\", @\"team\", @\"tell\", @\"ten\", @\"tenant\", @\"tennis\", @\"tent\", @\"term\", @\"test\", @\"text\",\n                 @\"thank\", @\"that\", @\"theme\", @\"then\", @\"theory\", @\"there\", @\"they\", @\"thing\", @\"this\", @\"thought\", @\"three\", @\"thrive\",\n                 @\"throw\", @\"thumb\", @\"thunder\", @\"ticket\", @\"tide\", @\"tiger\", @\"tilt\", @\"timber\", @\"time\", @\"tiny\", @\"tip\", @\"tired\",\n                 @\"tissue\", @\"title\", @\"toast\", @\"tobacco\", @\"today\", @\"toddler\", @\"toe\", @\"together\", @\"toilet\", @\"token\", @\"tomato\",\n                 @\"tomorrow\", @\"tone\", @\"tongue\", @\"tonight\", @\"tool\", @\"tooth\", @\"top\", @\"topic\", @\"topple\", @\"torch\", @\"tornado\",\n                 @\"tortoise\", @\"toss\", @\"total\", @\"tourist\", @\"toward\", @\"tower\", @\"town\", @\"toy\", @\"track\", @\"trade\", @\"traffic\",\n                 @\"tragic\", @\"train\", @\"transfer\", @\"trap\", @\"trash\", @\"travel\", @\"tray\", @\"treat\", @\"tree\", @\"trend\", @\"trial\", @\"tribe\",\n                 @\"trick\", @\"trigger\", @\"trim\", @\"trip\", @\"trophy\", @\"trouble\", @\"truck\", @\"true\", @\"truly\", @\"trumpet\", @\"trust\",\n                 @\"truth\", @\"try\", @\"tube\", @\"tuition\", @\"tumble\", @\"tuna\", @\"tunnel\", @\"turkey\", @\"turn\", @\"turtle\", @\"twelve\", @\"twenty\",\n                 @\"twice\", @\"twin\", @\"twist\", @\"two\", @\"type\", @\"typical\", @\"ugly\", @\"umbrella\", @\"unable\", @\"unaware\", @\"uncle\",\n                 @\"uncover\", @\"under\", @\"undo\", @\"unfair\", @\"unfold\", @\"unhappy\", @\"uniform\", @\"unique\", @\"unit\", @\"universe\", @\"unknown\",\n                 @\"unlock\", @\"until\", @\"unusual\", @\"unveil\", @\"update\", @\"upgrade\", @\"uphold\", @\"upon\", @\"upper\", @\"upset\", @\"urban\",\n                 @\"urge\", @\"usage\", @\"use\", @\"used\", @\"useful\", @\"useless\", @\"usual\", @\"utility\", @\"vacant\", @\"vacuum\", @\"vague\", @\"valid\",\n                 @\"valley\", @\"valve\", @\"van\", @\"vanish\", @\"vapor\", @\"various\", @\"vast\", @\"vault\", @\"vehicle\", @\"velvet\", @\"vendor\",\n                 @\"venture\", @\"venue\", @\"verb\", @\"verify\", @\"version\", @\"very\", @\"vessel\", @\"veteran\", @\"viable\", @\"vibrant\", @\"vicious\",\n                 @\"victory\", @\"video\", @\"view\", @\"village\", @\"vintage\", @\"violin\", @\"virtual\", @\"virus\", @\"visa\", @\"visit\", @\"visual\",\n                 @\"vital\", @\"vivid\", @\"vocal\", @\"voice\", @\"void\", @\"volcano\", @\"volume\", @\"vote\", @\"voyage\", @\"wage\", @\"wagon\", @\"wait\",\n                 @\"walk\", @\"wall\", @\"walnut\", @\"want\", @\"warfare\", @\"warm\", @\"warrior\", @\"wash\", @\"wasp\", @\"waste\", @\"water\", @\"wave\",\n                 @\"way\", @\"wealth\", @\"weapon\", @\"wear\", @\"weasel\", @\"weather\", @\"web\", @\"wedding\", @\"weekend\", @\"weird\", @\"welcome\",\n                 @\"west\", @\"wet\", @\"whale\", @\"what\", @\"wheat\", @\"wheel\", @\"when\", @\"where\", @\"whip\", @\"whisper\", @\"wide\", @\"width\", @\"wife\",\n                 @\"wild\", @\"will\", @\"win\", @\"window\", @\"wine\", @\"wing\", @\"wink\", @\"winner\", @\"winter\", @\"wire\", @\"wisdom\", @\"wise\", @\"wish\",\n                 @\"witness\", @\"wolf\", @\"woman\", @\"wonder\", @\"wood\", @\"wool\", @\"word\", @\"work\", @\"world\", @\"worry\", @\"worth\", @\"wrap\",\n                 @\"wreck\", @\"wrestle\", @\"wrist\", @\"write\", @\"wrong\", @\"yard\", @\"year\", @\"yellow\", @\"you\", @\"young\", @\"youth\", @\"zebra\",\n                 @\"zero\", @\"zone\", @\"zoo\"];\n    });\n    return list;\n}\n\n\n@end\n"
  },
  {
    "path": "Pods/CoreBitcoin/CoreBitcoin/BTCNetwork.h",
    "content": "// CoreBitcoin by Oleg Andreev <oleganza@gmail.com>, WTFPL.\n\n#import <Foundation/Foundation.h>\n#import \"BTC256.h\"\n\n@class BTCBigNumber;\n@class BTCBlock;\n@interface BTCNetwork : NSObject <NSCopying>\n\n- (id) initWithName:(NSString*)name;\n\n// Available networks\n\n// Main Bitcoin network, singleton instance.\n+ (BTCNetwork*) mainnet;\n\n// Testnet3 (current testnet), singleton instance.\n+ (BTCNetwork*) testnet;\n\n\n\n// Network Parameters\n// Note: all properties are writable so you can tweak parameters for testing purposes.\n// If you do so, you may want to use -copy.\n\n\n// Returns YES if this network is testnet3 (used to tweak certain validation rules).\n@property(nonatomic, readonly) BOOL isTestnet;\n\n// Returns opposite of `isTestnet`.\n@property(nonatomic, readonly) BOOL isMainnet;\n\n// Name of the network (\"mainnet\", \"testnet3\" etc)\n@property(nonatomic, copy) NSString* name;\n\n// Name of the network for BIP70 Payment Details (\"main\", \"test\" or some custom name used in `-initWithName:`)\n@property(nonatomic, copy) NSString* paymentProtocolName;\n\n// Hash of the genesis block.\n@property(nonatomic) NSData* genesisBlockHash;\n\n// Default port for TCP connections.\n@property(nonatomic) uint32_t defaultPort;\n\n// Maximum target for the proof of work: CBigNum(~uint256(0) >> 32) for mainnet.\n@property(nonatomic) BTCBigNumber* proofOfWorkLimit;\n\n// Array of pairs @[ @(int <height>), NSData* <hash> ] sorted by height.\n@property(nonatomic) NSArray* checkpoints;\n\n\n// Returns a checkpoint hash if it exists or BTC256Zero if there is no checkpoint at such height.\n- (NSData*) checkpointAtHeight:(int)height;\n\n// Returns height of checkpoint or -1 if there is no such checkpoint.\n- (int) heightForCheckpoint:(NSData*)checkpointHash;\n\n@end\n"
  },
  {
    "path": "Pods/CoreBitcoin/CoreBitcoin/BTCNetwork.m",
    "content": "// CoreBitcoin by Oleg Andreev <oleganza@gmail.com>, WTFPL.\n\n#import \"BTCNetwork.h\"\n#import \"BTCBigNumber.h\"\n#import \"BTCKey.h\"\n\n@implementation BTCNetwork {\n    BOOL _isMainnet;\n    BOOL _isTestnet;\n}\n\n- (id) initWithName:(NSString*)name {\n    if (self = [self initWithName:name paymentProtocolName:nil]) {\n    }\n    return self;\n}\n\n- (id) initWithName:(NSString*)name paymentProtocolName:(NSString*)ppName {\n    if (self = [super init]) {\n        _name = name;\n        _paymentProtocolName = ppName;\n    }\n    return self;\n}\n\n+ (BTCNetwork*) mainnet {\n    static BTCNetwork* network;\n    static dispatch_once_t onceToken;\n    dispatch_once(&onceToken, ^{\n        \n        network = [[BTCNetwork alloc] initWithName:@\"mainnet\" paymentProtocolName:@\"main\"];\n        network->_isMainnet = YES;\n\n        // TODO: set all parameters here.\n        \n    });\n    return network;\n}\n\n+ (BTCNetwork*) testnet {\n    static BTCNetwork* network;\n    static dispatch_once_t onceToken;\n    dispatch_once(&onceToken, ^{\n        \n        network = [[BTCNetwork alloc] initWithName:@\"testnet3\" paymentProtocolName:@\"test\"];\n        network->_isTestnet = YES;\n        \n        // TODO: set all parameters here.\n        \n    });\n    return network;\n}\n\n- (BOOL) isMainnet {\n    return _isMainnet;\n}\n\n- (BOOL) isTestnet {\n    return _isTestnet;\n}\n\n- (NSString*) paymentProtocolName {\n    return _paymentProtocolName ?: _name;\n}\n\n\n#pragma mark - Checkpoints\n\n\n// Returns a checkpoint hash if it exists or nil if there is no checkpoint at such height.\n- (NSData*) checkpointAtHeight:(int)height {\n    for (NSArray* pair in self.checkpoints) {\n        int h = [pair[0] intValue];\n        if (h == height) {\n            return pair[1];\n        }\n    }\n    return nil;\n}\n\n// Returns height of checkpoint or -1 if there is no such checkpoint.\n- (int) heightForCheckpoint:(NSData*)checkpointHash {\n    if (!checkpointHash) return -1;\n    \n    for (NSArray* pair in self.checkpoints) {\n        if ([pair[1] isEqual:checkpointHash]) {\n            return [pair[0] intValue];\n        }\n    }\n    return -1;\n}\n\n\n\n#pragma mark - NSCopying\n\n\n- (id) copyWithZone:(NSZone *)zone {\n    BTCNetwork* network = [[BTCNetwork alloc] copy];\n    \n    network->_isTestnet      = _isTestnet;\n    network.name             = self.name;\n    network.genesisBlockHash = self.genesisBlockHash;\n    network.defaultPort      = self.defaultPort;\n    network.proofOfWorkLimit = [self.proofOfWorkLimit copy];\n    network.checkpoints      = [self.checkpoints copy];\n    \n    return network;\n}\n\n@end\n"
  },
  {
    "path": "Pods/CoreBitcoin/CoreBitcoin/BTCNumberFormatter.h",
    "content": "// CoreBitcoin by Oleg Andreev <oleganza@gmail.com>, WTFPL.\n\n#import <Foundation/Foundation.h>\n#import \"BTCUnitsAndLimits.h\"\n\ntypedef NS_ENUM(NSInteger, BTCNumberFormatterUnit) {\n    BTCNumberFormatterUnitSatoshi  = 0, // satoshis = 0.00000001 BTC\n    BTCNumberFormatterUnitBit      = 2, // bits     = 0.000001 BTC\n    BTCNumberFormatterUnitMilliBTC = 5, // mBTC     = 0.001 BTC\n    BTCNumberFormatterUnitBTC      = 8, // BTC      = 100 million satoshis\n};\n\ntypedef NS_ENUM(NSInteger, BTCNumberFormatterSymbolStyle) {\n    BTCNumberFormatterSymbolStyleNone      = 0, // no suffix\n    BTCNumberFormatterSymbolStyleCode      = 1, // suffix is BTC, mBTC, Bits or SAT\n    BTCNumberFormatterSymbolStyleLowercase = 2, // suffix is btc, mbtc, bits or sat\n    BTCNumberFormatterSymbolStyleSymbol    = 3, // suffix is Ƀ, mɃ, ƀ or ṡ\n};\n\nextern NSString* const BTCNumberFormatterBitcoinCode;    // XBT\nextern NSString* const BTCNumberFormatterSymbolBTC;      // Ƀ\nextern NSString* const BTCNumberFormatterSymbolMilliBTC; // mɃ\nextern NSString* const BTCNumberFormatterSymbolBit;      // ƀ\nextern NSString* const BTCNumberFormatterSymbolSatoshi;  // ṡ\n\n/*!\n * Rounds the decimal number and returns its longLongValue.\n * Do not use NSDecimalNumber.longLongValue as it will return 0 on iOS 8.0.2 if the number is not rounded first.\n */\nBTCAmount BTCAmountFromDecimalNumber(NSNumber* num);\n\n@interface BTCNumberFormatter : NSNumberFormatter\n\n/*!\n * Instantiates and configures number formatter with given unit and suffix style.\n */\n- (id) initWithBitcoinUnit:(BTCNumberFormatterUnit)unit;\n- (id) initWithBitcoinUnit:(BTCNumberFormatterUnit)unit symbolStyle:(BTCNumberFormatterSymbolStyle)symbolStyle;\n\n/*!\n * Unit size to be displayed (regardless of how it is presented)\n */\n@property(nonatomic) BTCNumberFormatterUnit bitcoinUnit;\n\n/*!\n * Style of formatting the units regardless of the unit size.\n */\n@property(nonatomic) BTCNumberFormatterSymbolStyle symbolStyle;\n\n/*!\n * Placeholder text for the input field.\n * E.g. \"0 000 000.00\" for 'bits' and \"0.00000000\" for 'BTC'.\n */\n@property(nonatomic, readonly) NSString* placeholderText;\n\n/*!\n * Returns a matching bitcoin symbol.\n * If `symbolStyle` is BTCNumberFormatterSymbolStyleNone, returns the code (BTC, mBTC, Bits or SAT).\n */\n@property(nonatomic, readonly) NSString* standaloneSymbol;\n\n/*!\n * Returns a matching bitcoin unit code (BTC, mBTC etc) regardless of the symbol style.\n */\n@property(nonatomic, readonly) NSString* unitCode;\n\n/*!\n * Formats the amount according to units and current formatting style.\n */\n- (NSString *) stringFromAmount:(BTCAmount)amount;\n\n/*!\n * Returns 0 in case of failure to parse the string.\n * To handle that case, use `-[NSNumberFormatter numberFromString:]`, but keep in mind\n * that NSNumber* will be in specified units, not in satoshis.\n */\n- (BTCAmount) amountFromString:(NSString *)string;\n\n@end\n"
  },
  {
    "path": "Pods/CoreBitcoin/CoreBitcoin/BTCNumberFormatter.m",
    "content": "#import \"BTCNumberFormatter.h\"\n\n#define NarrowNbsp @\"\\xE2\\x80\\xAF\"\n//#define PunctSpace @\" \"\n//#define ThinSpace  @\" \"\n\nNSString* const BTCNumberFormatterBitcoinCode    = @\"XBT\";\n\nNSString* const BTCNumberFormatterSymbolBTC      = @\"Ƀ\" @\"\";\nNSString* const BTCNumberFormatterSymbolMilliBTC = @\"mɃ\";\nNSString* const BTCNumberFormatterSymbolBit      = @\"ƀ\";\nNSString* const BTCNumberFormatterSymbolSatoshi  = @\"ṡ\";\n\nBTCAmount BTCAmountFromDecimalNumber(NSNumber* num) {\n    if ([num isKindOfClass:[NSDecimalNumber class]]) {\n        NSDecimalNumber* dnum = (id)num;\n        // Starting iOS 8.0.2, the longLongValue method returns 0 for some non rounded values.\n        // Rounding the number looks like a work around.\n        NSDecimalNumberHandler *roundingBehavior = [NSDecimalNumberHandler decimalNumberHandlerWithRoundingMode:NSRoundPlain\n                                                                                                          scale:0\n                                                                                               raiseOnExactness:NO\n                                                                                                raiseOnOverflow:YES\n                                                                                               raiseOnUnderflow:NO\n                                                                                            raiseOnDivideByZero:YES];\n        num = [dnum decimalNumberByRoundingAccordingToBehavior:roundingBehavior];\n    }\n    BTCAmount sat = [num longLongValue];\n    return sat;\n}\n\n@implementation BTCNumberFormatter {\n    NSDecimalNumber* _myMultiplier; // because standard multiplier when below 1e-6 leads to a rounding no matter what the settings.\n}\n\n- (id) initWithBitcoinUnit:(BTCNumberFormatterUnit)unit {\n    return [self initWithBitcoinUnit:unit symbolStyle:BTCNumberFormatterSymbolStyleNone];\n}\n\n- (id) initWithBitcoinUnit:(BTCNumberFormatterUnit)unit symbolStyle:(BTCNumberFormatterSymbolStyle)symbolStyle {\n    if (self = [super init]) {\n        _bitcoinUnit = unit;\n        _symbolStyle = symbolStyle;\n\n        [self updateFormatterProperties];\n    }\n    return self;\n}\n\n- (void) setBitcoinUnit:(BTCNumberFormatterUnit)bitcoinUnit {\n    if (_bitcoinUnit == bitcoinUnit) return;\n    _bitcoinUnit = bitcoinUnit;\n    [self updateFormatterProperties];\n}\n\n- (void) setSymbolStyle:(BTCNumberFormatterSymbolStyle)suffixStyle {\n    if (_symbolStyle == suffixStyle) return;\n    _symbolStyle = suffixStyle;\n    [self updateFormatterProperties];\n}\n\n- (void) updateFormatterProperties {\n    // Reset formats so they are recomputed after we change properties.\n    self.positiveFormat = nil;\n    self.negativeFormat = nil;\n\n    self.lenient = YES;\n    self.generatesDecimalNumbers = YES;\n    self.numberStyle = NSNumberFormatterCurrencyStyle;\n    self.currencyCode = @\"XBT\";\n    self.groupingSize = 3;\n\n    self.currencySymbol = [self bitcoinUnitSymbol] ?: @\"\";\n\n    self.internationalCurrencySymbol = self.currencySymbol;\n\n    // On iOS 8 we have to set these *after* setting the currency symbol.\n    switch (_bitcoinUnit) {\n        case BTCNumberFormatterUnitSatoshi:\n            _myMultiplier = [NSDecimalNumber decimalNumberWithMantissa:1 exponent:0 isNegative:NO];\n            self.minimumFractionDigits = 0;\n            self.maximumFractionDigits = 0;\n            break;\n        case BTCNumberFormatterUnitBit:\n            _myMultiplier = [NSDecimalNumber decimalNumberWithMantissa:1 exponent:-2 isNegative:NO];\n            self.minimumFractionDigits = 0;\n            self.maximumFractionDigits = 2;\n            break;\n        case BTCNumberFormatterUnitMilliBTC:\n            _myMultiplier = [NSDecimalNumber decimalNumberWithMantissa:1 exponent:-5 isNegative:NO];\n            self.minimumFractionDigits = 2;\n            self.maximumFractionDigits = 5;\n            break;\n        case BTCNumberFormatterUnitBTC:\n            _myMultiplier = [NSDecimalNumber decimalNumberWithMantissa:1 exponent:-8 isNegative:NO];\n            self.minimumFractionDigits = 2;\n            self.maximumFractionDigits = 8;\n            break;\n        default:\n            [[NSException exceptionWithName:@\"BTCNumberFormatter: not supported bitcoin unit\" reason:@\"\" userInfo:nil] raise];\n    }\n\n    switch (_symbolStyle) {\n        case BTCNumberFormatterSymbolStyleNone:\n            self.minimumFractionDigits = 0;\n            self.positivePrefix = @\"\";\n            self.positiveSuffix = @\"\";\n            self.negativePrefix = @\"–\";\n            self.negativeSuffix = @\"\";\n            break;\n        case BTCNumberFormatterSymbolStyleCode:\n        case BTCNumberFormatterSymbolStyleLowercase:\n            self.positivePrefix = @\"\";\n            self.positiveSuffix = [NSString stringWithFormat:@\" %@\", self.currencySymbol]; // nobreaking space here.\n            self.negativePrefix = @\"-\";\n            self.negativeSuffix = self.positiveSuffix;\n            break;\n\n        case BTCNumberFormatterSymbolStyleSymbol:\n            // Leave positioning of the currency symbol to locale (in English it'll be prefix, in French it'll be suffix).\n            break;\n    }\n    self.maximum = @(BTC_MAX_MONEY);\n\n    // Fixup prefix symbol with a no-breaking space. When it's postfix, Foundation puts nobr space already.\n    self.positiveFormat = [self.positiveFormat stringByReplacingOccurrencesOfString:@\"¤\" withString:@\"¤\" NarrowNbsp \"#\"];\n\n    // Fixup negative format to have the same format as positive format and a minus sign in front of the first digit.\n    self.negativeFormat = [self.positiveFormat stringByReplacingCharactersInRange:[self.positiveFormat rangeOfString:@\"#\"] withString:@\"–#\"];\n}\n\n- (NSString *) standaloneSymbol {\n    NSString* sym = [self bitcoinUnitSymbol];\n    if (!sym) {\n        sym = [self bitcoinUnitSymbolForUnit:_bitcoinUnit];\n    }\n    return sym;\n}\n\n- (NSString*) bitcoinUnitSymbol {\n    return [self bitcoinUnitSymbolForStyle:_symbolStyle unit:_bitcoinUnit];\n}\n\n- (NSString*) unitCode {\n    return [self bitcoinUnitCodeForUnit:_bitcoinUnit];\n}\n\n- (NSString*) bitcoinUnitCodeForUnit:(BTCNumberFormatterUnit)unit {\n    switch (unit) {\n        case BTCNumberFormatterUnitSatoshi:\n            return NSLocalizedStringFromTable(@\"SAT\", @\"CoreBitcoin\", @\"\");\n        case BTCNumberFormatterUnitBit:\n            return NSLocalizedStringFromTable(@\"Bits\", @\"CoreBitcoin\", @\"\");\n        case BTCNumberFormatterUnitMilliBTC:\n            return NSLocalizedStringFromTable(@\"mBTC\", @\"CoreBitcoin\", @\"\");\n        case BTCNumberFormatterUnitBTC:\n            return NSLocalizedStringFromTable(@\"BTC\", @\"CoreBitcoin\", @\"\");\n        default:\n            [[NSException exceptionWithName:@\"BTCNumberFormatter: not supported bitcoin unit\" reason:@\"\" userInfo:nil] raise];\n    }\n}\n\n- (NSString*) bitcoinUnitSymbolForUnit:(BTCNumberFormatterUnit)unit {\n    switch (unit) {\n        case BTCNumberFormatterUnitSatoshi:\n            return BTCNumberFormatterSymbolSatoshi;\n        case BTCNumberFormatterUnitBit:\n            return BTCNumberFormatterSymbolBit;\n        case BTCNumberFormatterUnitMilliBTC:\n            return BTCNumberFormatterSymbolMilliBTC;\n        case BTCNumberFormatterUnitBTC:\n            return BTCNumberFormatterSymbolBTC;\n        default:\n            [[NSException exceptionWithName:@\"BTCNumberFormatter: not supported bitcoin unit\" reason:@\"\" userInfo:nil] raise];\n    }\n}\n\n- (NSString*) bitcoinUnitSymbolForStyle:(BTCNumberFormatterSymbolStyle)symbolStyle unit:(BTCNumberFormatterUnit)bitcoinUnit {\n    switch (symbolStyle) {\n        case BTCNumberFormatterSymbolStyleNone:\n            return nil;\n        case BTCNumberFormatterSymbolStyleCode:\n            return [self bitcoinUnitCodeForUnit:bitcoinUnit];\n        case BTCNumberFormatterSymbolStyleLowercase:\n            return [[self bitcoinUnitCodeForUnit:bitcoinUnit] lowercaseString];\n        case BTCNumberFormatterSymbolStyleSymbol:\n            return [self bitcoinUnitSymbolForUnit:bitcoinUnit];\n        default:\n            [[NSException exceptionWithName:@\"BTCNumberFormatter: not supported symbol style\" reason:@\"\" userInfo:nil] raise];\n    }\n    return nil;\n}\n\n- (NSString *) placeholderText {\n    //NSString* groupSeparator = self.currencyGroupingSeparator ?: @\"\";\n    NSString* decimalPoint = self.currencyDecimalSeparator ?: @\".\";\n    switch (_bitcoinUnit) {\n        case BTCNumberFormatterUnitSatoshi:\n            return @\"0\";\n        case BTCNumberFormatterUnitBit:\n            return [NSString stringWithFormat:@\"0%@00\", decimalPoint];\n        case BTCNumberFormatterUnitMilliBTC:\n            return [NSString stringWithFormat:@\"0%@00000\", decimalPoint];\n        case BTCNumberFormatterUnitBTC:\n            return [NSString stringWithFormat:@\"0%@00000000\", decimalPoint];\n        default:\n            [[NSException exceptionWithName:@\"BTCNumberFormatter: not supported bitcoin unit\" reason:@\"\" userInfo:nil] raise];\n            return nil;\n    }\n}\n\n- (NSString*) stringFromNumber:(NSNumber *)number {\n    if (![number isKindOfClass:[NSDecimalNumber class]]) {\n        number = [NSDecimalNumber decimalNumberWithDecimal:number.decimalValue];\n    }\n    return [super stringFromNumber:[(NSDecimalNumber*)number decimalNumberByMultiplyingBy:_myMultiplier]];\n}\n\n- (NSNumber*) numberFromString:(NSString *)string {\n    // self.generatesDecimalNumbers guarantees NSDecimalNumber here.\n    NSDecimalNumber* number = (NSDecimalNumber*)[super numberFromString:string];\n    return [number decimalNumberByDividingBy:_myMultiplier];\n}\n\n- (NSString *) stringFromAmount:(BTCAmount)amount {\n    return [self stringFromNumber:@(amount)];\n}\n\n- (BTCAmount) amountFromString:(NSString *)string {\n    return BTCAmountFromDecimalNumber([self numberFromString:string]);\n}\n\n- (id) copyWithZone:(NSZone *)zone {\n    return [[BTCNumberFormatter alloc] initWithBitcoinUnit:self.bitcoinUnit symbolStyle:self.symbolStyle];\n}\n\n\n@end\n"
  },
  {
    "path": "Pods/CoreBitcoin/CoreBitcoin/BTCOpcode.h",
    "content": "// CoreBitcoin by Oleg Andreev <oleganza@gmail.com>, WTFPL.\n\n#import <Foundation/Foundation.h>\n\n// See below for declarations of:\n// NSString* BTCNameForOpcode(BTCOpcode opcode);\n// BTCOpcode BTCOpcodeForName(NSString* opcodeName);\n// BTCOpcode BTCOpcodeForSmallInteger(NSInteger smallInteger);\n// NSInteger BTCSmallIntegerFromOpcode(BTCOpcode opcode);\n\n\n// Script consists of opcodes (\"operation codes\") and raw binary data.\n// Opcodes define how the data is added, removed and modified on the stack.\ntypedef NS_ENUM(unsigned char, BTCOpcode)\n{\n    // 1. Operators pushing data on stack.\n    \n    // Push 1 byte 0x00 on the stack\n    OP_0 = 0x00,\n    OP_FALSE = OP_0,\n    \n    // Any opcode with value < PUSHDATA1 is a length of the string to be pushed on the stack.\n    // So opcode 0x01 is followed by 1 byte of data, 0x09 by 9 bytes and so on up to 0x4b (75 bytes)\n    \n    // PUSHDATA<N> opcode is followed by N-byte length of the string that follows.\n    OP_PUSHDATA1 = 0x4c, // followed by a 1-byte length of the string to push (allows pushing 0..255 bytes).\n    OP_PUSHDATA2 = 0x4d, // followed by a 2-byte length of the string to push (allows pushing 0..65535 bytes).\n    OP_PUSHDATA4 = 0x4e, // followed by a 4-byte length of the string to push (allows pushing 0..4294967295 bytes).\n    OP_1NEGATE   = 0x4f, // pushes -1 number on the stack\n    OP_RESERVED  = 0x50, // Not assigned. If executed, transaction is invalid.\n    \n    // OP_<N> pushes number <N> on the stack\n    OP_1  = 0x51,\n    OP_TRUE=OP_1,\n    OP_2  = 0x52,\n    OP_3  = 0x53,\n    OP_4  = 0x54,\n    OP_5  = 0x55,\n    OP_6  = 0x56,\n    OP_7  = 0x57,\n    OP_8  = 0x58,\n    OP_9  = 0x59,\n    OP_10 = 0x5a,\n    OP_11 = 0x5b,\n    OP_12 = 0x5c,\n    OP_13 = 0x5d,\n    OP_14 = 0x5e,\n    OP_15 = 0x5f,\n    OP_16 = 0x60,\n    \n    // 2. Control flow operators\n    \n    OP_NOP      = 0x61, // Does nothing\n    OP_VER      = 0x62, // Not assigned. If executed, transaction is invalid.\n    \n    // BitcoinQT executes all operators from OP_IF to OP_ENDIF even inside \"non-executed\" branch (to keep track of nesting).\n    // Since OP_VERIF and OP_VERNOTIF are not assigned, even inside a non-executed branch they will fall in \"default:\" switch case\n    // and cause the script to fail. Some other ops like OP_VER can be present inside non-executed branch because they'll be skipped.\n    OP_IF       = 0x63, // If the top stack value is not 0, the statements are executed. The top stack value is removed.\n    OP_NOTIF    = 0x64, // If the top stack value is 0, the statements are executed. The top stack value is removed.\n    OP_VERIF    = 0x65, // Not assigned. Script is invalid with that opcode (even if inside non-executed branch).\n    OP_VERNOTIF = 0x66, // Not assigned. Script is invalid with that opcode (even if inside non-executed branch).\n    OP_ELSE     = 0x67, // Executes code if the previous OP_IF or OP_NOTIF was not executed.\n    OP_ENDIF    = 0x68, // Finishes if/else block\n    \n    OP_VERIFY   = 0x69, // Removes item from the stack if it's not 0x00 or 0x80 (negative zero). Otherwise, marks script as invalid.\n    OP_RETURN   = 0x6a, // Marks transaction as invalid.\n    \n    // Stack ops\n    OP_TOALTSTACK   = 0x6b, // Moves item from the stack to altstack\n    OP_FROMALTSTACK = 0x6c, // Moves item from the altstack to stack\n    OP_2DROP = 0x6d,\n    OP_2DUP  = 0x6e,\n    OP_3DUP  = 0x6f,\n    OP_2OVER = 0x70,\n    OP_2ROT  = 0x71,\n    OP_2SWAP = 0x72,\n    OP_IFDUP = 0x73,\n    OP_DEPTH = 0x74,\n    OP_DROP  = 0x75,\n    OP_DUP   = 0x76,\n    OP_NIP   = 0x77,\n    OP_OVER  = 0x78,\n    OP_PICK  = 0x79,\n    OP_ROLL  = 0x7a,\n    OP_ROT   = 0x7b,\n    OP_SWAP  = 0x7c,\n    OP_TUCK  = 0x7d,\n    \n    // Splice ops\n    OP_CAT    = 0x7e, // Disabled opcode. If executed, transaction is invalid.\n    OP_SUBSTR = 0x7f, // Disabled opcode. If executed, transaction is invalid.\n    OP_LEFT   = 0x80, // Disabled opcode. If executed, transaction is invalid.\n    OP_RIGHT  = 0x81, // Disabled opcode. If executed, transaction is invalid.\n    OP_SIZE   = 0x82,\n    \n    // Bit logic\n    OP_INVERT = 0x83, // Disabled opcode. If executed, transaction is invalid.\n    OP_AND    = 0x84, // Disabled opcode. If executed, transaction is invalid.\n    OP_OR     = 0x85, // Disabled opcode. If executed, transaction is invalid.\n    OP_XOR    = 0x86, // Disabled opcode. If executed, transaction is invalid.\n    \n    OP_EQUAL = 0x87,        // Last two items are removed from the stack and compared. Result (true or false) is pushed to the stack.\n    OP_EQUALVERIFY = 0x88,  // Same as OP_EQUAL, but removes the result from the stack if it's true or marks script as invalid.\n    \n    OP_RESERVED1 = 0x89, // Disabled opcode. If executed, transaction is invalid.\n    OP_RESERVED2 = 0x8a, // Disabled opcode. If executed, transaction is invalid.\n    \n    // Numeric\n    OP_1ADD      = 0x8b,  // adds 1 to last item, pops it from stack and pushes result.\n    OP_1SUB      = 0x8c,  // substracts 1 to last item, pops it from stack and pushes result.\n    OP_2MUL      = 0x8d,  // Disabled opcode. If executed, transaction is invalid.\n    OP_2DIV      = 0x8e,  // Disabled opcode. If executed, transaction is invalid.\n    OP_NEGATE    = 0x8f,  // negates the number, pops it from stack and pushes result.\n    OP_ABS       = 0x90,  // replaces number with its absolute value\n    OP_NOT       = 0x91,  // replaces number with True if it's zero, False otherwise.\n    OP_0NOTEQUAL = 0x92,  // replaces number with True if it's not zero, False otherwise.\n    \n    OP_ADD    = 0x93,  // (x y -- x+y)\n    OP_SUB    = 0x94,  // (x y -- x-y)\n    OP_MUL    = 0x95,  // Disabled opcode. If executed, transaction is invalid.\n    OP_DIV    = 0x96,  // Disabled opcode. If executed, transaction is invalid.\n    OP_MOD    = 0x97,  // Disabled opcode. If executed, transaction is invalid.\n    OP_LSHIFT = 0x98,  // Disabled opcode. If executed, transaction is invalid.\n    OP_RSHIFT = 0x99,  // Disabled opcode. If executed, transaction is invalid.\n    \n    OP_BOOLAND            = 0x9a,\n    OP_BOOLOR             = 0x9b,\n    OP_NUMEQUAL           = 0x9c,\n    OP_NUMEQUALVERIFY     = 0x9d,\n    OP_NUMNOTEQUAL        = 0x9e,\n    OP_LESSTHAN           = 0x9f,\n    OP_GREATERTHAN        = 0xa0,\n    OP_LESSTHANOREQUAL    = 0xa1,\n    OP_GREATERTHANOREQUAL = 0xa2,\n    OP_MIN                = 0xa3,\n    OP_MAX                = 0xa4,\n    \n    OP_WITHIN = 0xa5,\n    \n    // Crypto\n    OP_RIPEMD160      = 0xa6,\n    OP_SHA1           = 0xa7,\n    OP_SHA256         = 0xa8,\n    OP_HASH160        = 0xa9,\n    OP_HASH256        = 0xaa,\n    OP_CODESEPARATOR  = 0xab, // This opcode is rarely used because it's useless, but we need to support it anyway.\n    OP_CHECKSIG       = 0xac,\n    OP_CHECKSIGVERIFY = 0xad,\n    OP_CHECKMULTISIG  = 0xae,\n    OP_CHECKMULTISIGVERIFY = 0xaf,\n    \n    // Expansion\n    OP_NOP1  = 0xb0,\n    OP_NOP2  = 0xb1,\n    OP_NOP3  = 0xb2,\n    OP_NOP4  = 0xb3,\n    OP_NOP5  = 0xb4,\n    OP_NOP6  = 0xb5,\n    OP_NOP7  = 0xb6,\n    OP_NOP8  = 0xb7,\n    OP_NOP9  = 0xb8,\n    OP_NOP10 = 0xb9,\n    \n    OP_INVALIDOPCODE = 0xff,\n};\n\n\n// Returns name for opcode or @\"OP_UNKNOWN\" for unknown opcode.\nNSString* BTCNameForOpcode(BTCOpcode opcode);\n\n// Returns opcode integer for a given name. Returns OP_INVALIDOPCODE for unknown name.\nBTCOpcode BTCOpcodeForName(NSString* opcodeName);\n\n// Returns OP_1NEGATE, OP_0 .. OP_16 for ints from -1 to 16.\n// Returns OP_INVALIDOPCODE for other ints.\nBTCOpcode BTCOpcodeForSmallInteger(NSInteger smallInteger);\n\n// Converts opcode OP_<N> or OP_1NEGATE to an integer value.\n// If incorrect opcode is given, NSIntegerMax is returned.\nNSInteger BTCSmallIntegerFromOpcode(BTCOpcode opcode);\n\n\n\n\n"
  },
  {
    "path": "Pods/CoreBitcoin/CoreBitcoin/BTCOpcode.m",
    "content": "// Oleg Andreev <oleganza@gmail.com>\n\n#import \"BTCOpcode.h\"\n\nNSDictionary* BTCOpcodeForNameDictionary() {\n    static NSDictionary* dict = nil;\n    static dispatch_once_t onceToken;\n    dispatch_once(&onceToken, ^{\n        dict = @{\n                 @\"OP_0\":                   @(OP_0),\n                 @\"OP_FALSE\":               @(OP_FALSE),\n                 @\"OP_PUSHDATA1\":           @(OP_PUSHDATA1),\n                 @\"OP_PUSHDATA2\":           @(OP_PUSHDATA2),\n                 @\"OP_PUSHDATA4\":           @(OP_PUSHDATA4),\n                 @\"OP_1NEGATE\":             @(OP_1NEGATE),\n                 @\"OP_RESERVED\":            @(OP_RESERVED),\n                 @\"OP_1\":                   @(OP_1),\n                 @\"OP_TRUE\":                @(OP_TRUE),\n                 @\"OP_2\":                   @(OP_2),\n                 @\"OP_3\":                   @(OP_3),\n                 @\"OP_4\":                   @(OP_4),\n                 @\"OP_5\":                   @(OP_5),\n                 @\"OP_6\":                   @(OP_6),\n                 @\"OP_7\":                   @(OP_7),\n                 @\"OP_8\":                   @(OP_8),\n                 @\"OP_9\":                   @(OP_9),\n                 @\"OP_10\":                  @(OP_10),\n                 @\"OP_11\":                  @(OP_11),\n                 @\"OP_12\":                  @(OP_12),\n                 @\"OP_13\":                  @(OP_13),\n                 @\"OP_14\":                  @(OP_14),\n                 @\"OP_15\":                  @(OP_15),\n                 @\"OP_16\":                  @(OP_16),\n                 @\"OP_NOP\":                 @(OP_NOP),\n                 @\"OP_VER\":                 @(OP_VER),\n                 @\"OP_IF\":                  @(OP_IF),\n                 @\"OP_NOTIF\":               @(OP_NOTIF),\n                 @\"OP_VERIF\":               @(OP_VERIF),\n                 @\"OP_VERNOTIF\":            @(OP_VERNOTIF),\n                 @\"OP_ELSE\":                @(OP_ELSE),\n                 @\"OP_ENDIF\":               @(OP_ENDIF),\n                 @\"OP_VERIFY\":              @(OP_VERIFY),\n                 @\"OP_RETURN\":              @(OP_RETURN),\n                 @\"OP_TOALTSTACK\":          @(OP_TOALTSTACK),\n                 @\"OP_FROMALTSTACK\":        @(OP_FROMALTSTACK),\n                 @\"OP_2DROP\":               @(OP_2DROP),\n                 @\"OP_2DUP\":                @(OP_2DUP),\n                 @\"OP_3DUP\":                @(OP_3DUP),\n                 @\"OP_2OVER\":               @(OP_2OVER),\n                 @\"OP_2ROT\":                @(OP_2ROT),\n                 @\"OP_2SWAP\":               @(OP_2SWAP),\n                 @\"OP_IFDUP\":               @(OP_IFDUP),\n                 @\"OP_DEPTH\":               @(OP_DEPTH),\n                 @\"OP_DROP\":                @(OP_DROP),\n                 @\"OP_DUP\":                 @(OP_DUP),\n                 @\"OP_NIP\":                 @(OP_NIP),\n                 @\"OP_OVER\":                @(OP_OVER),\n                 @\"OP_PICK\":                @(OP_PICK),\n                 @\"OP_ROLL\":                @(OP_ROLL),\n                 @\"OP_ROT\":                 @(OP_ROT),\n                 @\"OP_SWAP\":                @(OP_SWAP),\n                 @\"OP_TUCK\":                @(OP_TUCK),\n                 @\"OP_CAT\":                 @(OP_CAT),\n                 @\"OP_SUBSTR\":              @(OP_SUBSTR),\n                 @\"OP_LEFT\":                @(OP_LEFT),\n                 @\"OP_RIGHT\":               @(OP_RIGHT),\n                 @\"OP_SIZE\":                @(OP_SIZE),\n                 @\"OP_INVERT\":              @(OP_INVERT),\n                 @\"OP_AND\":                 @(OP_AND),\n                 @\"OP_OR\":                  @(OP_OR),\n                 @\"OP_XOR\":                 @(OP_XOR),\n                 @\"OP_EQUAL\":               @(OP_EQUAL),\n                 @\"OP_EQUALVERIFY\":         @(OP_EQUALVERIFY),\n                 @\"OP_RESERVED1\":           @(OP_RESERVED1),\n                 @\"OP_RESERVED2\":           @(OP_RESERVED2),\n                 @\"OP_1ADD\":                @(OP_1ADD),\n                 @\"OP_1SUB\":                @(OP_1SUB),\n                 @\"OP_2MUL\":                @(OP_2MUL),\n                 @\"OP_2DIV\":                @(OP_2DIV),\n                 @\"OP_NEGATE\":              @(OP_NEGATE),\n                 @\"OP_ABS\":                 @(OP_ABS),\n                 @\"OP_NOT\":                 @(OP_NOT),\n                 @\"OP_0NOTEQUAL\":           @(OP_0NOTEQUAL),\n                 @\"OP_ADD\":                 @(OP_ADD),\n                 @\"OP_SUB\":                 @(OP_SUB),\n                 @\"OP_MUL\":                 @(OP_MUL),\n                 @\"OP_DIV\":                 @(OP_DIV),\n                 @\"OP_MOD\":                 @(OP_MOD),\n                 @\"OP_LSHIFT\":              @(OP_LSHIFT),\n                 @\"OP_RSHIFT\":              @(OP_RSHIFT),\n                 @\"OP_BOOLAND\":             @(OP_BOOLAND),\n                 @\"OP_BOOLOR\":              @(OP_BOOLOR),\n                 @\"OP_NUMEQUAL\":            @(OP_NUMEQUAL),\n                 @\"OP_NUMEQUALVERIFY\":      @(OP_NUMEQUALVERIFY),\n                 @\"OP_NUMNOTEQUAL\":         @(OP_NUMNOTEQUAL),\n                 @\"OP_LESSTHAN\":            @(OP_LESSTHAN),\n                 @\"OP_GREATERTHAN\":         @(OP_GREATERTHAN),\n                 @\"OP_LESSTHANOREQUAL\":     @(OP_LESSTHANOREQUAL),\n                 @\"OP_GREATERTHANOREQUAL\":  @(OP_GREATERTHANOREQUAL),\n                 @\"OP_MIN\":                 @(OP_MIN),\n                 @\"OP_MAX\":                 @(OP_MAX),\n                 @\"OP_WITHIN\":              @(OP_WITHIN),\n                 @\"OP_RIPEMD160\":           @(OP_RIPEMD160),\n                 @\"OP_SHA1\":                @(OP_SHA1),\n                 @\"OP_SHA256\":              @(OP_SHA256),\n                 @\"OP_HASH160\":             @(OP_HASH160),\n                 @\"OP_HASH256\":             @(OP_HASH256),\n                 @\"OP_CODESEPARATOR\":       @(OP_CODESEPARATOR),\n                 @\"OP_CHECKSIG\":            @(OP_CHECKSIG),\n                 @\"OP_CHECKSIGVERIFY\":      @(OP_CHECKSIGVERIFY),\n                 @\"OP_CHECKMULTISIG\":       @(OP_CHECKMULTISIG),\n                 @\"OP_CHECKMULTISIGVERIFY\": @(OP_CHECKMULTISIGVERIFY),\n                 @\"OP_NOP1\":                @(OP_NOP1),\n                 @\"OP_NOP2\":                @(OP_NOP2),\n                 @\"OP_NOP3\":                @(OP_NOP3),\n                 @\"OP_NOP4\":                @(OP_NOP4),\n                 @\"OP_NOP5\":                @(OP_NOP5),\n                 @\"OP_NOP6\":                @(OP_NOP6),\n                 @\"OP_NOP7\":                @(OP_NOP7),\n                 @\"OP_NOP8\":                @(OP_NOP8),\n                 @\"OP_NOP9\":                @(OP_NOP9),\n                 @\"OP_NOP10\":               @(OP_NOP10),\n                 @\"OP_INVALIDOPCODE\":       @(OP_INVALIDOPCODE),\n                 };\n    });\n    return dict;\n}\n\nNSString* BTCNameForOpcode(BTCOpcode opcode) {\n    NSDictionary* dict = BTCOpcodeForNameDictionary();\n    for (NSString* name in dict) {\n        if ([dict[name] unsignedCharValue] == opcode) return name;\n    }\n    return @\"OP_UNKNOWN\";\n}\n\nBTCOpcode BTCOpcodeForName(NSString* opcodeName) {\n    NSNumber* number = opcodeName ? BTCOpcodeForNameDictionary()[opcodeName] : nil;\n    if (!number) return OP_INVALIDOPCODE;\n    return [number unsignedCharValue];\n}\n\n// Returns OP_1NEGATE, OP_0 .. OP_16 for ints from -1 to 16.\n// Returns OP_INVALIDOPCODE for other ints.\nBTCOpcode BTCOpcodeForSmallInteger(NSInteger smallInteger) {\n    if (smallInteger == 0) return OP_0;\n    if (smallInteger == -1) return OP_1NEGATE;\n    if (smallInteger >= 1 && smallInteger <= 16) return (OP_1 + (smallInteger - 1));\n    return OP_INVALIDOPCODE;\n}\n\n// Converts opcode OP_<N> or OP_1NEGATE to an integer value.\n// If incorrect opcode is given, NSIntegerMax is returned.\nNSInteger BTCSmallIntegerFromOpcode(BTCOpcode opcode) {\n    if (opcode == OP_0) return 0;\n    if (opcode == OP_1NEGATE) return -1;\n    if (opcode >= OP_1 && opcode <= OP_16) return (int)opcode - (int)(OP_1 - 1);\n    return NSIntegerMax;\n}\n\n"
  },
  {
    "path": "Pods/CoreBitcoin/CoreBitcoin/BTCOutpoint.h",
    "content": "// CoreBitcoin by Oleg Andreev <oleganza@gmail.com>, WTFPL.\n\n#import <Foundation/Foundation.h>\n\n// Outpoint is a reference to a transaction output (byt tx hash and output index).\n// It is a part of BTCTransactionInput.\n@interface BTCOutpoint : NSObject <NSCopying>\n\n// Hash of the previous transaction.\n@property(nonatomic) NSData* txHash;\n\n// Transaction ID referenced by this input (reversed txHash in hex).\n@property(nonatomic) NSString* txID;\n\n// Index of the previous transaction's output.\n@property(nonatomic) uint32_t index;\n\n- (id) initWithHash:(NSData*)hash index:(uint32_t)index;\n\n- (id) initWithTxID:(NSString*)txid index:(uint32_t)index;\n\n@end"
  },
  {
    "path": "Pods/CoreBitcoin/CoreBitcoin/BTCOutpoint.m",
    "content": "// CoreBitcoin by Oleg Andreev <oleganza@gmail.com>, WTFPL.\n\n#import \"BTCOutpoint.h\"\n#import \"BTCTransaction.h\"\n#import \"BTCHashID.h\"\n\n@implementation BTCOutpoint\n\n- (id) initWithHash:(NSData*)hash index:(uint32_t)index {\n    if (hash.length != 32) return nil;\n    if (self = [super init]) {\n        _txHash = hash;\n        _index = index;\n    }\n    return self;\n}\n\n- (id) initWithTxID:(NSString*)txid index:(uint32_t)index {\n    NSData* hash = BTCHashFromID(txid);\n    return [self initWithHash:hash index:index];\n}\n\n- (NSString*) txID {\n    return BTCIDFromHash(self.txHash);\n}\n\n- (void) setTxID:(NSString *)txID {\n    self.txHash = BTCHashFromID(txID);\n}\n\n- (NSUInteger) hash {\n    const NSUInteger* words = _txHash.bytes;\n    return words[0] + self.index;\n}\n\n- (BOOL) isEqual:(BTCOutpoint*)object {\n    return [self.txHash isEqual:object.txHash] && self.index == object.index;\n}\n\n- (id) copyWithZone:(NSZone *)zone {\n    return [[BTCOutpoint alloc] initWithHash:_txHash index:_index];\n}\n\n@end\n"
  },
  {
    "path": "Pods/CoreBitcoin/CoreBitcoin/BTCPaymentMethod.h",
    "content": "// CoreBitcoin by Oleg Andreev <oleganza@gmail.com>, WTFPL.\n\n#import <Foundation/Foundation.h>\n#import \"BTCUnitsAndLimits.h\"\n\n@class BTCAssetID;\n@class BTCPaymentMethodItem;\n@class BTCPaymentMethodAsset;\n@class BTCPaymentMethodRejection;\n@class BTCPaymentMethodRejectedAsset;\n\n// Reply by the user: payment_method, methods per item, assets per method.\n@interface  BTCPaymentMethod : NSObject\n\n@property(nonatomic, nullable) NSData* merchantData;\n@property(nonatomic, nullable) NSArray* /* [BTCPaymentMethodItem] */ items;\n\n// Binary serialization in protocol buffer format.\n@property(nonatomic, readonly, nonnull) NSData* data;\n\n- (nullable id) initWithData:(nullable NSData*)data;\n@end\n\n\n\n\n\n// Proposed method to pay for a given item\n@interface  BTCPaymentMethodItem : NSObject\n\n@property(nonatomic, nonnull) NSString* itemType;\n@property(nonatomic, nullable) NSData* itemIdentifier;\n@property(nonatomic, nullable) NSArray* /* [BTCPaymentMethodAsset] */ assets;\n\n// Binary serialization in protocol buffer format.\n@property(nonatomic, readonly, nonnull) NSData* data;\n\n- (nullable id) initWithData:(nullable NSData*)data;\n@end\n\n\n\n\n\n// Proposed asset and amount within BTCPaymentMethodItem.\n@interface  BTCPaymentMethodAsset : NSObject\n\n@property(nonatomic, nullable) NSString* assetType; // BTCAssetTypeBitcoin or BTCAssetTypeOpenAssets\n@property(nonatomic, nullable) BTCAssetID* assetID; // nil if type is \"bitcoin\".\n@property(nonatomic) BTCAmount amount;\n\n// Binary serialization in protocol buffer format.\n@property(nonatomic, readonly, nonnull) NSData* data;\n\n- (nullable id) initWithData:(nullable NSData*)data;\n@end\n\n\n\n\n\n\n// Rejection reply by the server: rejection summary and per-asset rejection info.\n\n\n@interface  BTCPaymentMethodRejection : NSObject\n\n@property(nonatomic, nullable) NSString* memo;\n@property(nonatomic) uint64_t code;\n@property(nonatomic, nullable) NSArray* /* [BTCPaymentMethodRejectedAsset] */ rejectedAssets;\n\n// Binary serialization in protocol buffer format.\n@property(nonatomic, readonly, nonnull) NSData* data;\n\n- (nullable id) initWithData:(nullable NSData*)data;\n@end\n\n\n@interface  BTCPaymentMethodRejectedAsset : NSObject\n\n@property(nonatomic, nonnull) NSString* assetType;  // BTCAssetTypeBitcoin or BTCAssetTypeOpenAssets\n@property(nonatomic, nullable) BTCAssetID* assetID; // nil if type is \"bitcoin\".\n@property(nonatomic) uint64_t code;\n@property(nonatomic, nullable) NSString* reason;\n\n// Binary serialization in protocol buffer format.\n@property(nonatomic, readonly, nonnull) NSData* data;\n\n- (nullable id) initWithData:(nullable NSData*)data;\n@end\n\n"
  },
  {
    "path": "Pods/CoreBitcoin/CoreBitcoin/BTCPaymentMethod.m",
    "content": "// CoreBitcoin by Oleg Andreev <oleganza@gmail.com>, WTFPL.\n\n#import \"BTCPaymentMethod.h\"\n#import \"BTCProtocolBuffers.h\"\n#import \"BTCAssetID.h\"\n#import \"BTCAssetType.h\"\n\n//message PaymentMethod {\n//    optional bytes             merchant_data = 1;\n//    repeated PaymentMethodItem items         = 2;\n//}\ntypedef NS_ENUM(NSInteger, BTCPaymentMethodKey) {\n    BTCPaymentMethodKeyMerchantData = 1,\n    BTCPaymentMethodKeyItem         = 2,\n};\n\n\n@interface BTCPaymentMethod ()\n@property(nonatomic, readwrite, nonnull) NSData* data;\n@end\n\n@implementation BTCPaymentMethod\n\n- (id) initWithData:(NSData*)data {\n    if (!data) return nil;\n\n    if (self = [super init]) {\n        NSMutableArray* items = [NSMutableArray array];\n\n        NSInteger offset = 0;\n        while (offset < data.length) {\n            uint64_t integer = 0;\n            NSData* d = nil;\n\n            switch ([BTCProtocolBuffers fieldAtOffset:&offset int:&integer data:&d fromData:data]) {\n                case BTCPaymentMethodKeyMerchantData:\n                    if (d) _merchantData = d;\n                    break;\n\n                case BTCPaymentMethodKeyItem: {\n                    if (d) {\n                        BTCPaymentMethodItem* item = [[BTCPaymentMethodItem alloc] initWithData:d];\n                        [items addObject:item];\n                    }\n                    break;\n                }\n                default: break;\n            }\n        }\n\n        _items = items;\n        _data = data;\n    }\n    return self;\n}\n\n- (void) setMerchantData:(NSData * __nullable)merchantData {\n    _merchantData = merchantData;\n    _data = nil;\n}\n\n- (void) setItems:(NSArray * __nullable)items {\n    _items = items;\n    _data = nil;\n}\n\n- (NSData*) data {\n    if (!_data) {\n        NSMutableData* dst = [NSMutableData data];\n\n        if (_merchantData) {\n            [BTCProtocolBuffers writeData:_merchantData withKey:BTCPaymentMethodKeyMerchantData toData:dst];\n        }\n        for (BTCPaymentMethodItem* item in _items) {\n            [BTCProtocolBuffers writeData:item.data withKey:BTCPaymentMethodKeyItem toData:dst];\n        }\n        _data = dst;\n    }\n    return _data;\n}\n\n@end\n\n\n\n\n//message PaymentMethodItem {\n//    optional string             type                = 1 [default = \"default\"];\n//    optional bytes              item_identifier     = 2;\n//    repeated PaymentMethodAsset payment_item_assets = 3;\n//}\ntypedef NS_ENUM(NSInteger, BTCPaymentMethodItemKey) {\n    BTCPaymentMethodItemKeyItemType          = 1, // default = \"default\"\n    BTCPaymentMethodItemKeyItemIdentifier    = 2,\n    BTCPaymentMethodItemKeyAssets            = 3,\n};\n\n\n@interface BTCPaymentMethodItem ()\n\n@property(nonatomic, readwrite, nonnull) NSData* data;\n@end\n\n@implementation BTCPaymentMethodItem\n\n- (id) initWithData:(NSData*)data {\n    if (!data) return nil;\n\n    if (self = [super init]) {\n\n        NSMutableArray* assets = [NSMutableArray array];\n\n        NSInteger offset = 0;\n        while (offset < data.length) {\n            uint64_t integer = 0;\n            NSData* d = nil;\n\n            switch ([BTCProtocolBuffers fieldAtOffset:&offset int:&integer data:&d fromData:data]) {\n                case BTCPaymentMethodItemKeyItemType:\n                    if (d) _itemType = [[NSString alloc] initWithData:d encoding:NSUTF8StringEncoding];\n                    break;\n                case BTCPaymentMethodItemKeyItemIdentifier:\n                    if (d) _itemIdentifier = d;\n                    break;\n                case BTCPaymentMethodItemKeyAssets: {\n                    if (d) {\n                        BTCPaymentMethodAsset* asset = [[BTCPaymentMethodAsset alloc] initWithData:d];\n                        [assets addObject:asset];\n                    }\n                    break;\n                }\n                default: break;\n            }\n        }\n\n        _assets = assets;\n        _data = data;\n    }\n    return self;\n}\n\n- (void) setItemType:(NSString * __nonnull)itemType {\n    _itemType = itemType;\n    _data = nil;\n}\n\n- (void) setItemIdentifier:(NSData * __nullable)itemIdentifier {\n    _itemIdentifier = itemIdentifier;\n    _data = nil;\n}\n\n- (void) setAssets:(NSArray * __nullable)assets {\n    _assets = assets;\n    _data = nil;\n}\n\n- (NSData*) data {\n    if (!_data) {\n        NSMutableData* dst = [NSMutableData data];\n\n        if (_itemType) {\n            [BTCProtocolBuffers writeString:_itemType withKey:BTCPaymentMethodItemKeyItemType toData:dst];\n        }\n        if (_itemIdentifier) {\n            [BTCProtocolBuffers writeData:_itemIdentifier withKey:BTCPaymentMethodItemKeyItemIdentifier toData:dst];\n        }\n        for (BTCPaymentMethodItem* item in _assets) {\n            [BTCProtocolBuffers writeData:item.data withKey:BTCPaymentMethodItemKeyAssets toData:dst];\n        }\n        _data = dst;\n    }\n    return _data;\n}\n\n@end\n\n\n\n\n\n\n//message PaymentMethodAsset {\n//    optional string            asset_id = 1 [default = \"default\"];\n//    optional uint64            amount = 2;\n//}\ntypedef NS_ENUM(NSInteger, BTCPaymentMethodAssetKey) {\n    BTCPaymentMethodAssetKeyAssetID = 1,\n    BTCPaymentMethodAssetKeyAmount  = 2,\n};\n\n\n@interface BTCPaymentMethodAsset ()\n\n@property(nonatomic, readwrite, nonnull) NSData* data;\n@end\n\n@implementation BTCPaymentMethodAsset\n\n- (id) initWithData:(NSData*)data {\n    if (!data) return nil;\n\n    if (self = [super init]) {\n\n        NSString* assetIDString = nil;\n\n        NSInteger offset = 0;\n        while (offset < data.length) {\n            uint64_t integer = 0;\n            NSData* d = nil;\n\n            switch ([BTCProtocolBuffers fieldAtOffset:&offset int:&integer data:&d fromData:data]) {\n                case BTCPaymentMethodAssetKeyAssetID:\n                    if (d) assetIDString = [[NSString alloc] initWithData:d encoding:NSUTF8StringEncoding];\n                    break;\n                case BTCPaymentMethodAssetKeyAmount: {\n                    _amount = integer;\n                    break;\n                }\n                default: break;\n            }\n        }\n        if (!assetIDString || [assetIDString isEqual:@\"default\"]) {\n            _assetType = BTCAssetTypeBitcoin;\n            _assetID = nil;\n        } else {\n            _assetID = [BTCAssetID assetIDWithString:assetIDString];\n            if (_assetID) {\n                _assetType = BTCAssetTypeOpenAssets;\n            }\n        }\n        _data = data;\n    }\n    return self;\n}\n\n- (void) setAssetType:(NSString * __nullable)assetType {\n    _assetType = assetType;\n    _data = nil;\n}\n\n- (void) setAssetID:(BTCAssetID * __nullable)assetID {\n    _assetID = assetID;\n    _data = nil;\n}\n\n- (void) setAmount:(BTCAmount)amount {\n    _amount = amount;\n    _data = nil;\n}\n\n- (NSData*) data {\n    if (!_data) {\n        NSMutableData* dst = [NSMutableData data];\n\n        if ([_assetType isEqual:BTCAssetTypeBitcoin]) {\n            [BTCProtocolBuffers writeString:@\"default\" withKey:BTCPaymentMethodAssetKeyAssetID toData:dst];\n        } else if ([_assetType isEqual:BTCAssetTypeOpenAssets] && _assetID) {\n            [BTCProtocolBuffers writeString:_assetID.string withKey:BTCPaymentMethodAssetKeyAssetID toData:dst];\n        }\n\n        [BTCProtocolBuffers writeInt:(uint64_t)_amount withKey:BTCPaymentMethodAssetKeyAmount toData:dst];\n        _data = dst;\n    }\n    return _data;\n}\n\n@end\n\n\n\n\n//message PaymentMethodRejection {\n//    optional string memo = 1;\n//    repeated PaymentMethodRejectedAsset rejected_assets = 2;\n//}\ntypedef NS_ENUM(NSInteger, BTCPaymentMethodRejectionKey) {\n    BTCPaymentMethodRejectionKeyMemo   = 1,\n    BTCPaymentMethodRejectionKeyCode   = 2,\n    BTCPaymentMethodRejectionKeyAssets = 3,\n};\n\n\n@interface BTCPaymentMethodRejection ()\n\n@property(nonatomic, readwrite, nonnull) NSData* data;\n@end\n\n@implementation BTCPaymentMethodRejection\n\n- (id) initWithData:(NSData*)data {\n    if (!data) return nil;\n\n    if (self = [super init]) {\n\n        NSMutableArray* rejectedAssets = [NSMutableArray array];\n\n        NSInteger offset = 0;\n        while (offset < data.length) {\n            uint64_t integer = 0;\n            NSData* d = nil;\n\n            switch ([BTCProtocolBuffers fieldAtOffset:&offset int:&integer data:&d fromData:data]) {\n                case BTCPaymentMethodRejectionKeyMemo:\n                    if (d) _memo = [[NSString alloc] initWithData:d encoding:NSUTF8StringEncoding];\n                    break;\n                case BTCPaymentMethodRejectionKeyCode:\n                    _code = integer;\n                    break;\n                case BTCPaymentMethodRejectionKeyAssets: {\n                    if (d) {\n                        BTCPaymentMethodRejectedAsset* rejasset = [[BTCPaymentMethodRejectedAsset alloc] initWithData:d];\n                        [rejectedAssets addObject:rejasset];\n                    }\n                    break;\n                }\n                default: break;\n            }\n        }\n\n        _rejectedAssets = rejectedAssets;\n        _data = data;\n    }\n    return self;\n}\n\n- (void) setMemo:(NSString * __nullable)memo {\n    _memo = [memo copy];\n    _data = nil;\n}\n\n- (void) setCode:(uint64_t)code {\n    _code = code;\n    _data = nil;\n}\n\n- (void) setRejectedAssets:(NSArray * __nullable)rejectedAssets {\n    _rejectedAssets = rejectedAssets;\n    _data = nil;\n}\n\n- (NSData*) data {\n    if (!_data) {\n        NSMutableData* dst = [NSMutableData data];\n\n        if (_memo) {\n            [BTCProtocolBuffers writeString:_memo withKey:BTCPaymentMethodRejectionKeyMemo toData:dst];\n        }\n\n        [BTCProtocolBuffers writeInt:_code withKey:BTCPaymentMethodRejectionKeyCode toData:dst];\n\n        for (BTCPaymentMethodRejectedAsset* rejectedAsset in _rejectedAssets) {\n            [BTCProtocolBuffers writeData:rejectedAsset.data withKey:BTCPaymentMethodRejectionKeyAssets toData:dst];\n        }\n\n        _data = dst;\n    }\n    return _data;\n}\n\n@end\n\n\n//message PaymentMethodRejectedAsset {\n//    required string asset_id = 1;\n//    optional uint64 code     = 2;\n//    optional string reason   = 3;\n//}\ntypedef NS_ENUM(NSInteger, BTCPaymentMethodRejectedAssetKey) {\n    BTCPaymentMethodRejectedAssetKeyAssetID = 1,\n    BTCPaymentMethodRejectedAssetKeyCode    = 2,\n    BTCPaymentMethodRejectedAssetKeyReason  = 3,\n};\n\n\n@interface BTCPaymentMethodRejectedAsset ()\n\n@property(nonatomic, readwrite, nonnull) NSData* data;\n@end\n\n@implementation BTCPaymentMethodRejectedAsset\n\n- (id) initWithData:(NSData*)data {\n    if (!data) return nil;\n\n    if (self = [super init]) {\n\n        NSString* assetIDString = nil;\n\n        NSInteger offset = 0;\n        while (offset < data.length) {\n            uint64_t integer = 0;\n            NSData* d = nil;\n\n            switch ([BTCProtocolBuffers fieldAtOffset:&offset int:&integer data:&d fromData:data]) {\n                case BTCPaymentMethodRejectedAssetKeyAssetID:\n                    if (d) assetIDString = [[NSString alloc] initWithData:d encoding:NSUTF8StringEncoding];\n                    break;\n                case BTCPaymentMethodRejectionKeyCode:\n                    _code = integer;\n                    break;\n                case BTCPaymentMethodRejectedAssetKeyReason: {\n                    if (d) _reason = [[NSString alloc] initWithData:d encoding:NSUTF8StringEncoding];\n                    break;\n                }\n                default: break;\n            }\n        }\n        if (!assetIDString || [assetIDString isEqual:@\"default\"]) {\n            _assetType = BTCAssetTypeBitcoin;\n            _assetID = nil;\n        } else {\n            _assetID = [BTCAssetID assetIDWithString:assetIDString];\n            if (_assetID) {\n                _assetType = BTCAssetTypeOpenAssets;\n            }\n        }\n        _data = data;\n    }\n    return self;\n}\n\n- (void) setAssetType:(NSString * __nonnull)assetType {\n    _assetType = assetType;\n    _data = nil;\n}\n\n- (void) setAssetID:(BTCAssetID * __nullable)assetID {\n    _assetID = assetID;\n    _data = nil;\n}\n\n- (void) setCode:(uint64_t)code {\n    _code = code;\n    _data = nil;\n}\n\n- (void) setReason:(NSString * __nullable)reason {\n    _reason = reason;\n    _data = nil;\n}\n\n- (NSData*) data {\n    if (!_data) {\n        NSMutableData* dst = [NSMutableData data];\n\n        if ([_assetType isEqual:BTCAssetTypeBitcoin]) {\n            [BTCProtocolBuffers writeString:@\"default\" withKey:BTCPaymentMethodRejectedAssetKeyAssetID toData:dst];\n        } else if ([_assetType isEqual:BTCAssetTypeOpenAssets] && _assetID) {\n            [BTCProtocolBuffers writeString:_assetID.string withKey:BTCPaymentMethodRejectedAssetKeyAssetID toData:dst];\n        }\n\n        [BTCProtocolBuffers writeInt:_code withKey:BTCPaymentMethodRejectedAssetKeyCode toData:dst];\n\n        if (_reason) {\n            [BTCProtocolBuffers writeString:_reason withKey:BTCPaymentMethodRejectedAssetKeyReason toData:dst];\n        }\n\n        _data = dst;\n    }\n    return _data;\n}\n\n@end\n"
  },
  {
    "path": "Pods/CoreBitcoin/CoreBitcoin/BTCPaymentMethodDetails.h",
    "content": "// CoreBitcoin by Oleg Andreev <oleganza@gmail.com>, WTFPL.\n\n#import <Foundation/Foundation.h>\n#import \"BTCUnitsAndLimits.h\"\n\n@class BTCNetwork;\n@class BTCAssetID;\n@class BTCPaymentMethodDetailsItem;\n@class BTCPaymentMethodAcceptedAsset;\n@interface BTCPaymentMethodDetails : NSObject\n\n// Mainnet or testnet. Default is mainnet.\n@property(nonatomic, readonly, nonnull) BTCNetwork* network;\n\n// Payment items for the customer.\n@property(nonatomic, readonly, nonnull)  NSArray* /* [BTCPaymentMethodDetailsItem] */ items;\n\n// Secure location (usually https) where a PaymentMethod message (see below) may be sent to obtain a PaymentRequest.\n// The payment_url specified in the PaymentMethodDetails should remain valid at least until the PaymentMethodDetails expires\n// (or as long as possible if the PaymentMethodDetails does not expire).\n@property(nonatomic, readonly, nullable) NSURL* paymentMethodURL;\n\n// Date when the PaymentRequest was created.\n@property(nonatomic, readonly, nonnull) NSDate* date;\n\n// Date after which the PaymentRequest should be considered invalid.\n@property(nonatomic, readonly, nullable) NSDate* expirationDate;\n\n// Plain-text (no formatting) note that should be displayed to the customer, explaining what this PaymentRequest is for.\n@property(nonatomic, readonly, nullable) NSString* memo;\n\n// Arbitrary data that may be used by the merchant to identify the PaymentRequest.\n// May be omitted if the merchant does not need to associate Payments with PaymentRequest or\n// if they associate each PaymentRequest with a separate payment address.\n@property(nonatomic, readonly, nullable) NSData* merchantData;\n\n// Binary serialization in protocol buffer format.\n@property(nonatomic, readonly, nonnull) NSData* data;\n\n- (nullable id) initWithData:(nullable NSData*)data;\n\n@end\n\n\n\n@interface  BTCPaymentMethodDetailsItem : NSObject\n\n@property(nonatomic, readonly, nullable) NSString* itemType;\n@property(nonatomic, readonly) BOOL optional;\n@property(nonatomic, readonly, nullable) NSData* itemIdentifier;\n@property(nonatomic, readonly) BTCAmount amount;\n@property(nonatomic, readonly, nonnull) NSArray* /* [BTCPaymentMethodAcceptedAsset] */ acceptedAssets;\n@property(nonatomic, readonly, nullable) NSString* memo;\n\n// Binary serialization in protocol buffer format.\n@property(nonatomic, readonly, nonnull) NSData* data;\n\n- (nullable id) initWithData:(nullable NSData*)data;\n@end\n\n\n\n@interface  BTCPaymentMethodAcceptedAsset : NSObject\n\n@property(nonatomic, readonly, nullable) NSString* assetType; // BTCAssetTypeBitcoin or BTCAssetTypeOpenAssets\n@property(nonatomic, readonly, nullable) BTCAssetID* assetID; // nil if type is \"bitcoin\".\n@property(nonatomic, readonly, nullable) NSString* assetGroup;\n@property(nonatomic, readonly) double multiplier;\n@property(nonatomic, readonly) BTCAmount minAmount;\n@property(nonatomic, readonly) BTCAmount maxAmount;\n\n// Binary serialization in protocol buffer format.\n@property(nonatomic, readonly, nonnull) NSData* data;\n\n- (nullable id) initWithData:(nullable NSData*)data;\n@end\n\n\n"
  },
  {
    "path": "Pods/CoreBitcoin/CoreBitcoin/BTCPaymentMethodDetails.m",
    "content": "// CoreBitcoin by Oleg Andreev <oleganza@gmail.com>, WTFPL.\n\n#import \"BTCPaymentMethodDetails.h\"\n#import \"BTCPaymentProtocol.h\"\n#import \"BTCProtocolBuffers.h\"\n#import \"BTCNetwork.h\"\n#import \"BTCAssetType.h\"\n#import \"BTCAssetID.h\"\n\n//message PaymentMethodDetails {\n//    optional string        network            = 1 [default = \"main\"];\n//    required string        payment_method_url = 2;\n//    repeated PaymentItem   items              = 3;\n//    required uint64        time               = 4;\n//    optional uint64        expires            = 5;\n//    optional string        memo               = 6;\n//    optional bytes         merchant_data      = 7;\n//}\ntypedef NS_ENUM(NSInteger, BTCPMDetailsKey) {\n    BTCPMDetailsKeyNetwork            = 1,\n    BTCPMDetailsKeyPaymentMethodURL   = 2,\n    BTCPMDetailsKeyItems              = 3,\n    BTCPMDetailsKeyTime               = 4,\n    BTCPMDetailsKeyExpires            = 5,\n    BTCPMDetailsKeyMemo               = 6,\n    BTCPMDetailsKeyMerchantData       = 7,\n};\n\n@interface BTCPaymentMethodDetails ()\n@property(nonatomic, readwrite) BTCNetwork* network;\n@property(nonatomic, readwrite) NSArray* /* [BTCPaymentMethodRequestItem] */ items;\n@property(nonatomic, readwrite) NSURL* paymentMethodURL;\n@property(nonatomic, readwrite) NSDate* date;\n@property(nonatomic, readwrite) NSDate* expirationDate;\n@property(nonatomic, readwrite) NSString* memo;\n@property(nonatomic, readwrite) NSData* merchantData;\n@property(nonatomic, readwrite) NSData* data;\n@end\n\n@implementation BTCPaymentMethodDetails\n\n- (id) initWithData:(NSData*)data {\n    if (!data) return nil;\n\n    if (self = [super init]) {\n        NSMutableArray* items = [NSMutableArray array];\n\n        NSInteger offset = 0;\n        while (offset < data.length) {\n            uint64_t integer = 0;\n            NSData* d = nil;\n\n            switch ([BTCProtocolBuffers fieldAtOffset:&offset int:&integer data:&d fromData:data]) {\n                case BTCPMDetailsKeyNetwork:\n                    if (d) {\n                        NSString* networkName = [[NSString alloc] initWithData:d encoding:NSUTF8StringEncoding];\n                        if ([networkName isEqual:@\"main\"]) {\n                            _network = [BTCNetwork mainnet];\n                        } else if ([networkName isEqual:@\"test\"]) {\n                            _network = [BTCNetwork testnet];\n                        } else {\n                            _network = [[BTCNetwork alloc] initWithName:networkName];\n                        }\n                    }\n                    break;\n                case BTCPMDetailsKeyPaymentMethodURL:\n                    if (d) _paymentMethodURL = [NSURL URLWithString:[[NSString alloc] initWithData:d encoding:NSUTF8StringEncoding]];\n                    break;\n                case BTCPMDetailsKeyItems: {\n                    if (d) {\n                        BTCPaymentMethodDetailsItem* item = [[BTCPaymentMethodDetailsItem alloc] initWithData:d];\n                        [items addObject:item];\n                    }\n                    break;\n                }\n                case BTCPMDetailsKeyTime:\n                    if (integer) _date = [NSDate dateWithTimeIntervalSince1970:integer];\n                    break;\n                case BTCPMDetailsKeyExpires:\n                    if (integer) _expirationDate = [NSDate dateWithTimeIntervalSince1970:integer];\n                    break;\n                case BTCPMDetailsKeyMemo:\n                    if (d) _memo = [[NSString alloc] initWithData:d encoding:NSUTF8StringEncoding];\n                    break;\n                case BTCPMDetailsKeyMerchantData:\n                    if (d) _merchantData = d;\n                    break;\n                default: break;\n            }\n        }\n\n        // PMR must have at least one item\n        if (items.count == 0) return nil;\n\n        // PMR requires a creation time.\n        if (!_date) return nil;\n\n        _items = items;\n        _data = data;\n    }\n    return self;\n}\n\n- (BTCNetwork*) network {\n    return _network ?: [BTCNetwork mainnet];\n}\n\n- (NSData*) data {\n    if (!_data) {\n        NSMutableData* dst = [NSMutableData data];\n\n        if (_network) {\n            [BTCProtocolBuffers writeString:_network.paymentProtocolName withKey:BTCPMDetailsKeyNetwork toData:dst];\n        }\n        if (_paymentMethodURL) {\n            [BTCProtocolBuffers writeString:_paymentMethodURL.absoluteString withKey:BTCPMDetailsKeyPaymentMethodURL toData:dst];\n        }\n        for (BTCPaymentMethodDetailsItem* item in _items) {\n            [BTCProtocolBuffers writeData:item.data withKey:BTCPMDetailsKeyItems toData:dst];\n        }\n        if (_date) {\n            [BTCProtocolBuffers writeInt:(uint64_t)[_date timeIntervalSince1970] withKey:BTCPMDetailsKeyTime toData:dst];\n        }\n        if (_expirationDate) {\n            [BTCProtocolBuffers writeInt:(uint64_t)[_expirationDate timeIntervalSince1970] withKey:BTCPMDetailsKeyExpires toData:dst];\n        }\n        if (_memo) {\n            [BTCProtocolBuffers writeString:_memo withKey:BTCPMDetailsKeyMemo toData:dst];\n        }\n        if (_merchantData) {\n            [BTCProtocolBuffers writeData:_merchantData withKey:BTCPMDetailsKeyMerchantData toData:dst];\n        }\n        _data = dst;\n    }\n    return _data;\n}\n\n@end\n\n\n\n\n\n//message PaymentItem {\n//    optional string type                   = 1 [default = \"default\"];\n//    optional bool   optional               = 2 [default = false];\n//    optional bytes  item_identifier        = 3;\n//    optional uint64 amount                 = 4 [default = 0];\n//    repeated AcceptedAsset accepted_assets = 5;\n//    optional string memo                   = 6;\n//}\ntypedef NS_ENUM(NSInteger, BTCPMItemKey) {\n    BTCPMRItemKeyItemType           = 1,\n    BTCPMRItemKeyItemOptional       = 2,\n    BTCPMRItemKeyItemIdentifier     = 3,\n    BTCPMRItemKeyAmount             = 4,\n    BTCPMRItemKeyAcceptedAssets     = 5,\n    BTCPMRItemKeyMemo               = 6,\n};\n\n@interface BTCPaymentMethodDetailsItem ()\n@property(nonatomic, readwrite, nullable) NSString* itemType;\n@property(nonatomic, readwrite) BOOL optional;\n@property(nonatomic, readwrite, nullable) NSData* itemIdentifier;\n@property(nonatomic, readwrite) BTCAmount amount;\n@property(nonatomic, readwrite, nonnull) NSArray* /* [BTCPaymentMethodAcceptedAsset] */ acceptedAssets;\n@property(nonatomic, readwrite, nullable) NSString* memo;\n@property(nonatomic, readwrite, nonnull) NSData* data;\n@end\n\n@implementation BTCPaymentMethodDetailsItem\n\n- (id) initWithData:(NSData*)data {\n    if (!data) return nil;\n\n    if (self = [super init]) {\n        NSMutableArray* assets = [NSMutableArray array];\n\n        NSInteger offset = 0;\n        while (offset < data.length) {\n            uint64_t integer = 0;\n            NSData* d = nil;\n\n            switch ([BTCProtocolBuffers fieldAtOffset:&offset int:&integer data:&d fromData:data]) {\n                case BTCPMRItemKeyItemType:\n                    if (d) _itemType = [[NSString alloc] initWithData:d encoding:NSUTF8StringEncoding];\n                    break;\n                case BTCPMRItemKeyItemOptional:\n                    _optional = (integer != 0);\n                    break;\n                case BTCPMRItemKeyItemIdentifier:\n                    if (d) _itemIdentifier = d;\n                    break;\n\n                case BTCPMRItemKeyAmount: {\n                    _amount = integer;\n                    break;\n                }\n                case BTCPMRItemKeyAcceptedAssets: {\n                    if (d) {\n                        BTCPaymentMethodAcceptedAsset* asset = [[BTCPaymentMethodAcceptedAsset alloc] initWithData:d];\n                        [assets addObject:asset];\n                    }\n                    break;\n                }\n                case BTCPMRItemKeyMemo:\n                    if (d) _memo = [[NSString alloc] initWithData:d encoding:NSUTF8StringEncoding];\n                    break;\n                default: break;\n            }\n        }\n        _acceptedAssets = assets;\n        _data = data;\n    }\n    return self;\n}\n\n\n- (NSData*) data {\n    if (!_data) {\n        NSMutableData* dst = [NSMutableData data];\n\n        if (_itemType) {\n            [BTCProtocolBuffers writeString:_itemType withKey:BTCPMRItemKeyItemType toData:dst];\n        }\n        [BTCProtocolBuffers writeInt:_optional ? 1 : 0 withKey:BTCPMRItemKeyItemOptional toData:dst];\n        if (_itemIdentifier) {\n            [BTCProtocolBuffers writeData:_itemIdentifier withKey:BTCPMRItemKeyItemIdentifier toData:dst];\n        }\n        if (_amount > 0) {\n             [BTCProtocolBuffers writeInt:(uint64_t)_amount withKey:BTCPMRItemKeyAmount toData:dst];\n        }\n        for (BTCPaymentMethodAcceptedAsset* asset in _acceptedAssets) {\n            [BTCProtocolBuffers writeData:asset.data withKey:BTCPMRItemKeyAcceptedAssets toData:dst];\n        }\n        if (_memo) {\n            [BTCProtocolBuffers writeString:_memo withKey:BTCPMRItemKeyMemo toData:dst];\n        }\n        _data = dst;\n    }\n    return _data;\n}\n\n@end\n\n\n\n\n\n//message AcceptedAsset {\n//    optional string asset_id = 1 [default = \"default\"];\n//    optional string asset_group = 2;\n//    optional double multiplier = 3 [default = 1.0];\n//    optional uint64 min_amount = 4 [default = 0];\n//    optional uint64 max_amount = 5;\n//}\ntypedef NS_ENUM(NSInteger, BTCPMAcceptedAssetKey) {\n    BTCPMRAcceptedAssetKeyAssetID    = 1,\n    BTCPMRAcceptedAssetKeyAssetGroup = 2,\n    BTCPMRAcceptedAssetKeyMultiplier = 3,\n    BTCPMRAcceptedAssetKeyMinAmount  = 4,\n    BTCPMRAcceptedAssetKeyMaxAmount  = 5,\n};\n\n\n@interface BTCPaymentMethodAcceptedAsset ()\n@property(nonatomic, readwrite, nullable) NSString* assetType; // BTCAssetTypeBitcoin or BTCAssetTypeOpenAssets\n@property(nonatomic, readwrite, nullable) BTCAssetID* assetID;\n@property(nonatomic, readwrite, nullable) NSString* assetGroup;\n@property(nonatomic, readwrite) double multiplier; // to use as a multiplier need to multiply by that amount and divide by 1e8.\n@property(nonatomic, readwrite) BTCAmount minAmount;\n@property(nonatomic, readwrite) BTCAmount maxAmount;\n@property(nonatomic, readwrite, nonnull) NSData* data;\n@end\n\n@implementation BTCPaymentMethodAcceptedAsset\n\n\n- (id) initWithData:(NSData*)data {\n    if (!data) return nil;\n\n    if (self = [super init]) {\n\n        NSString* assetIDString = nil;\n\n        _multiplier = 1.0;\n\n        NSInteger offset = 0;\n        while (offset < data.length) {\n            uint64_t integer = 0;\n            uint64_t fixed64 = 0;\n            NSData* d = nil;\n            switch ([BTCProtocolBuffers fieldAtOffset:&offset int:&integer fixed32:NULL fixed64:&fixed64 data:&d fromData:data]) {\n                case BTCPMRAcceptedAssetKeyAssetID:\n                    if (d) assetIDString = [[NSString alloc] initWithData:d encoding:NSUTF8StringEncoding];\n                    break;\n\n                case BTCPMRAcceptedAssetKeyAssetGroup: {\n                    if (d) _assetGroup = [[NSString alloc] initWithData:d encoding:NSUTF8StringEncoding];\n                    break;\n                }\n                case BTCPMRAcceptedAssetKeyMultiplier: {\n                    _multiplier = (double)fixed64;\n                    break;\n                }\n                case BTCPMRAcceptedAssetKeyMinAmount: {\n                    _minAmount = integer;\n                    break;\n                }\n                case BTCPMRAcceptedAssetKeyMaxAmount: {\n                    _maxAmount = integer;\n                    break;\n                }\n                default: break;\n            }\n        }\n\n        if (!assetIDString || [assetIDString isEqual:@\"default\"]) {\n            _assetType = BTCAssetTypeBitcoin;\n            _assetID = nil;\n        } else {\n            _assetID = [BTCAssetID assetIDWithString:assetIDString];\n            if (_assetID) {\n                _assetType = BTCAssetTypeOpenAssets;\n            }\n        }\n        _data = data;\n    }\n    return self;\n}\n\n- (NSData*) data {\n    if (!_data) {\n        NSMutableData* dst = [NSMutableData data];\n\n        if ([_assetType isEqual:BTCAssetTypeBitcoin]) {\n            [BTCProtocolBuffers writeString:@\"default\" withKey:BTCPMRAcceptedAssetKeyAssetID toData:dst];\n        } else if ([_assetType isEqual:BTCAssetTypeOpenAssets] && _assetID) {\n            [BTCProtocolBuffers writeString:_assetID.string withKey:BTCPMRAcceptedAssetKeyAssetID toData:dst];\n        }\n        if (_assetGroup) {\n            [BTCProtocolBuffers writeString:_assetGroup withKey:BTCPMRAcceptedAssetKeyAssetGroup toData:dst];\n        }\n\n        [BTCProtocolBuffers writeFixed64:(uint64_t)_multiplier withKey:BTCPMRAcceptedAssetKeyMultiplier toData:dst];\n        [BTCProtocolBuffers writeInt:(uint64_t)_minAmount withKey:BTCPMRAcceptedAssetKeyMinAmount toData:dst];\n        [BTCProtocolBuffers writeInt:(uint64_t)_maxAmount withKey:BTCPMRAcceptedAssetKeyMaxAmount toData:dst];\n        _data = dst;\n    }\n    return _data;\n}\n\n@end\n\n"
  },
  {
    "path": "Pods/CoreBitcoin/CoreBitcoin/BTCPaymentMethodRequest.h",
    "content": "// CoreBitcoin by Oleg Andreev <oleganza@gmail.com>, WTFPL.\n\n#import <Foundation/Foundation.h>\n#import \"BTCPaymentRequest.h\"\n#import \"BTCPaymentMethodDetails.h\"\n#import \"BTCPaymentMethod.h\"\n\nextern NSInteger const BTCPaymentMethodRequestVersion1;\n\n@interface BTCPaymentMethodRequest : NSObject\n\n// Version of the payment request and payment details.\n// Default is BTCPaymentRequestVersion1.\n@property(nonatomic, readonly) NSInteger version;\n\n// Public-key infrastructure (PKI) system being used to identify the merchant.\n// All implementation should support \"none\", \"x509+sha256\" and \"x509+sha1\".\n// See BTCPaymentRequestPKIType* constants.\n@property(nonatomic, readonly, nonnull) NSString* pkiType;\n\n// PKI-system data that identifies the merchant and can be used to create a digital signature.\n// In the case of X.509 certificates, pki_data contains one or more X.509 certificates.\n// Depends on pkiType. Optional.\n@property(nonatomic, readonly, nullable) NSData* pkiData;\n\n// A BTCPaymentDetails object.\n@property(nonatomic, readonly, nonnull) BTCPaymentMethodDetails* details;\n\n// Digital signature over a hash of the protocol buffer serialized variation of\n// the PaymentRequest message, with all serialized fields serialized in numerical order\n// (all current protocol buffer implementations serialize fields in numerical order) and\n// signed using the private key that corresponds to the public key in pki_data.\n// Optional fields that are not set are not serialized (however, setting a field to its default value will cause it to be serialized and will affect the signature).\n// Before serialization, the signature field must be set to an empty value so that\n// the field is included in the signed PaymentRequest hash but contains no data.\n@property(nonatomic, readonly, nullable) NSData* signature;\n\n// Array of DER encoded certificates or nil if pkiType does offer certificates.\n// This list is extracted from raw `pkiData`.\n// If set, certificates are cerialized in X509Certificates object and set to pkiData.\n@property(nonatomic, readonly, nonnull) NSArray* certificates;\n\n// A date against which the payment request is being validated.\n// If nil, system date at the moment of validation is used.\n@property(nonatomic, nullable) NSDate* currentDate;\n\n// Returns YES if payment request is correctly signed by a trusted certificate if needed\n// and expiration date is valid.\n// Accessing this property also updates `status` and `signerName`.\n@property(nonatomic, readonly) BOOL isValid;\n\n// Human-readable name of the signer or nil if it's unsigned.\n// You should display this to the user as a name of the merchant.\n// Accessing this property also updates `status` and `isValid`.\n@property(nonatomic, readonly, nullable) NSString* signerName;\n\n// Validation status.\n// Accessing this property also updates `commonName` and `isValid`.\n@property(nonatomic, readonly) BTCPaymentRequestStatus status;\n\n// Binary serialization in protocol buffer format.\n@property(nonatomic, readonly, nonnull) NSData* data;\n\n- (nullable id) initWithData:(nullable NSData*)data;\n\n@end\n\n"
  },
  {
    "path": "Pods/CoreBitcoin/CoreBitcoin/BTCPaymentMethodRequest.m",
    "content": "// CoreBitcoin by Oleg Andreev <oleganza@gmail.com>, WTFPL.\n\n#import \"BTCPaymentRequest.h\"\n#import \"BTCPaymentMethodRequest.h\"\n#import \"BTCPaymentMethodDetails.h\"\n#import \"BTCProtocolBuffers.h\"\n\nNSInteger const BTCPaymentMethodRequestVersion1 = 1;\n\n//message PaymentMethodRequest {\n//    optional uint32 payment_details_version = 1 [default = 1];\n//    optional string pki_type = 2 [default = \"none\"];\n//    optional bytes  pki_data = 3;\n//    required bytes  serialized_payment_method_details = 4;\n//    optional bytes  signature = 5;\n//}\ntypedef NS_ENUM(NSInteger, BTCPMRKey) {\n    BTCPMRKeyVersion        = 1,\n    BTCPMRKeyPkiType        = 2,\n    BTCPMRKeyPkiData        = 3,\n    BTCPMRKeyPaymentDetails = 4,\n    BTCPMRKeySignature      = 5\n};\n\n@interface BTCPaymentMethodRequest ()\n// If you make these publicly writable, make sure to set _data to nil and _isValidated to NO.\n@property(nonatomic, readwrite) NSInteger version;\n@property(nonatomic, readwrite) NSString* pkiType;\n@property(nonatomic, readwrite) NSData* pkiData;\n@property(nonatomic, readwrite) BTCPaymentMethodDetails* details;\n@property(nonatomic, readwrite) NSData* signature;\n@property(nonatomic, readwrite) NSArray* certificates;\n@property(nonatomic, readwrite) NSData* data;\n\n@property(nonatomic) BOOL isValidated;\n@property(nonatomic, readwrite) BOOL isValid;\n@property(nonatomic, readwrite) NSString* signerName;\n@property(nonatomic, readwrite) BTCPaymentRequestStatus status;\n@end\n\n\n\n\n\n@implementation BTCPaymentMethodRequest\n\n- (id) initWithData:(NSData*)data {\n    if (!data) return nil;\n\n    // Note: we are not assigning default values here because we need to\n    // reconstruct exact data (without the signature) for signature verification.\n\n    if (self = [super init]) {\n        \n        NSInteger offset = 0;\n        while (offset < data.length) {\n            uint64_t i = 0;\n            NSData* d = nil;\n\n            switch ([BTCProtocolBuffers fieldAtOffset:&offset int:&i data:&d fromData:data]) {\n                case BTCPMRKeyVersion:\n                    if (i) _version = (uint32_t)i;\n                    break;\n                case BTCPMRKeyPkiType:\n                    if (d) _pkiType = [[NSString alloc] initWithData:d encoding:NSUTF8StringEncoding];\n                    break;\n                case BTCPMRKeyPkiData:\n                    if (d) _pkiData = d;\n                    break;\n                case BTCPMRKeyPaymentDetails:\n                    if (d) _details = [[BTCPaymentMethodDetails alloc] initWithData:d];\n                    break;\n                case BTCPMRKeySignature:\n                    if (d) _signature = d;\n                    break;\n                default: break;\n            }\n        }\n\n        // Payment details are required.\n        if (!_details) return nil;\n    }\n    return self;\n}\n\n- (NSData*) data {\n    if (!_data) {\n        _data = [self dataWithSignature:_signature];\n    }\n    return _data;\n}\n\n- (NSData*) dataForSigning {\n    return [self dataWithSignature:[NSData data]];\n}\n\n- (NSData*) dataWithSignature:(NSData*)signature {\n    NSMutableData* data = [NSMutableData data];\n\n    // Note: we should reconstruct the data exactly as it was on the input.\n    if (_version > 0) {\n        [BTCProtocolBuffers writeInt:_version withKey:BTCPMRKeyVersion toData:data];\n    }\n    if (_pkiType) {\n        [BTCProtocolBuffers writeString:_pkiType withKey:BTCPMRKeyPkiType toData:data];\n    }\n    if (_pkiData) {\n        [BTCProtocolBuffers writeData:_pkiData withKey:BTCPMRKeyPkiData toData:data];\n    }\n\n    [BTCProtocolBuffers writeData:self.details.data withKey:BTCPMRKeyPaymentDetails toData:data];\n\n    if (signature) {\n        [BTCProtocolBuffers writeData:signature withKey:BTCPMRKeySignature toData:data];\n    }\n    return data;\n}\n\n- (NSInteger) version\n{\n    return (_version > 0) ? _version : BTCPaymentMethodRequestVersion1;\n}\n\n- (NSString*) pkiType\n{\n    return _pkiType ?: BTCPaymentRequestPKITypeNone;\n}\n\n- (NSArray*) certificates {\n    if (!_certificates) {\n        _certificates = BTCParseCertificatesFromPaymentRequestPKIData(self.pkiData);\n    }\n    return _certificates;\n}\n\n- (BOOL) isValid {\n    if (!_isValidated) [self validatePaymentRequest];\n    return _isValid;\n}\n\n- (NSString*) signerName {\n    if (!_isValidated) [self validatePaymentRequest];\n    return _signerName;\n}\n\n- (BTCPaymentRequestStatus) status {\n    if (!_isValidated) [self validatePaymentRequest];\n    return _status;\n}\n\n- (void) validatePaymentRequest {\n    _isValidated = YES;\n    _isValid = NO;\n\n    // Make sure we do not accidentally send funds to a payment request that we do not support.\n    if (self.version != BTCPaymentMethodRequestVersion1) {\n        _status = BTCPaymentRequestStatusNotCompatible;\n        return;\n    }\n\n    if (self.details.expirationDate && [self.currentDate ?: [NSDate date] timeIntervalSinceDate:self.details.expirationDate] > 0.0) {\n        _status = BTCPaymentRequestStatusExpired;\n        _isValid = NO;\n        return;\n    }\n\n    __typeof(_status) status = _status;\n    __typeof(_signerName) signer = _signerName;\n    _isValid = BTCPaymentRequestVerifySignature(self.pkiType,\n                                                [self dataForSigning],\n                                                self.certificates,\n                                                _signature,\n                                                &status,\n                                                &signer);\n    _status = status;\n    _signerName = signer;\n    if (!_isValid) {\n        return;\n    }\n}\n\n@end\n\n\n\n\n\n\n\n"
  },
  {
    "path": "Pods/CoreBitcoin/CoreBitcoin/BTCPaymentProtocol.h",
    "content": "// CoreBitcoin by Oleg Andreev <oleganza@gmail.com>, WTFPL.\n\n#import <Foundation/Foundation.h>\n#import \"BTCPaymentRequest.h\"\n#import \"BTCPaymentMethodRequest.h\"\n\n// Interface to BIP70 payment protocol.\n// Spec: https://github.com/bitcoin/bips/blob/master/bip-0070.mediawiki\n//\n// * BTCPaymentProtocol implements high-level request and response API.\n// * BTCPaymentRequest object that represents \"PaymentRequest\" as described in BIP70.\n// * BTCPaymentDetails object that represents \"PaymentDetails\" as described in BIP70.\n// * BTCPayment object that represents \"Payment\" as described in BIP70.\n// * BTCPaymentACK object that represents \"PaymentACK\" as described in BIP70.\n\n@interface BTCPaymentProtocol : NSObject\n\n// List of accepted asset types.\n@property(nonnull, nonatomic, readonly) NSArray* assetTypes;\n\n// Instantiates default BIP70 protocol that supports only Bitcoin.\n- (nonnull id) init;\n\n// Instantiates protocol instance with accepted asset types. See BTCAssetType* constants.\n- (nonnull id) initWithAssetTypes:(nonnull NSArray*)assetTypes;\n\n\n// Convenience API\n\n// Loads a BTCPaymentRequest object or BTCPaymentMethodRequest from a given URL.\n// May return either PaymentMethodRequest or PaymentRequest, depending on the response from the server.\n// This method ignores `assetTypes` and allows both bitcoin and openassets types.\n- (void) loadPaymentMethodRequestFromURL:(nonnull NSURL*)paymentMethodRequestURL completionHandler:(nonnull void(^)(BTCPaymentMethodRequest* __nullable pmr, BTCPaymentRequest* __nullable pr, NSError* __nullable error))completionHandler;\n\n// Loads a BTCPaymentRequest object from a given URL.\n- (void) loadPaymentRequestFromURL:(nonnull NSURL*)paymentRequestURL completionHandler:(nonnull void(^)(BTCPaymentRequest* __nullable pr, NSError* __nullable error))completionHandler;\n\n// Posts completed payment object to a given payment URL (provided in BTCPaymentDetails) and\n// returns a PaymentACK object.\n- (void) postPayment:(nonnull BTCPayment*)payment URL:(nonnull NSURL*)paymentURL completionHandler:(nonnull void(^)(BTCPaymentACK* __nullable ack, NSError* __nullable error))completionHandler;\n\n\n// Low-level API\n// (use these if you have your own connection queue).\n\n- (nullable NSURLRequest*) requestForPaymentMethodRequestWithURL:(nonnull NSURL*)url; // default timeout is 10 sec\n- (nullable NSURLRequest*) requestForPaymentMethodRequestWithURL:(nonnull NSURL*)url timeout:(NSTimeInterval)timeout;\n- (nullable id) polymorphicPaymentRequestFromData:(nonnull NSData*)data response:(nonnull NSURLResponse*)response error:(NSError* __nullable * __nullable)errorOut;\n\n- (nullable NSURLRequest*) requestForPaymentRequestWithURL:(nonnull NSURL*)url; // default timeout is 10 sec\n- (nullable NSURLRequest*) requestForPaymentRequestWithURL:(nonnull NSURL*)url timeout:(NSTimeInterval)timeout;\n- (nullable BTCPaymentRequest*) paymentRequestFromData:(nonnull NSData*)data response:(nonnull NSURLResponse*)response error:(NSError* __nullable * __nullable)errorOut;\n\n- (nullable NSURLRequest*) requestForPayment:(nonnull BTCPayment*)payment url:(nonnull NSURL*)paymentURL; // default timeout is 10 sec\n- (nullable NSURLRequest*) requestForPayment:(nonnull BTCPayment*)payment url:(nonnull NSURL*)paymentURL timeout:(NSTimeInterval)timeout;\n- (nullable BTCPaymentACK*) paymentACKFromData:(nonnull NSData*)data response:(nonnull NSURLResponse*)response error:(NSError* __nullable * __nullable)errorOut;\n\n\n// Deprecated Methods\n\n+ (void) loadPaymentRequestFromURL:(nonnull NSURL*)paymentRequestURL completionHandler:(nonnull void(^)(BTCPaymentRequest* __nullable pr, NSError* __nullable error))completionHandler DEPRECATED_ATTRIBUTE;\n+ (void) postPayment:(nonnull BTCPayment*)payment URL:(nonnull NSURL*)paymentURL completionHandler:(nonnull void(^)(BTCPaymentACK* __nullable ack, NSError* __nullable error))completionHandler DEPRECATED_ATTRIBUTE;\n\n+ (nullable NSURLRequest*) requestForPaymentRequestWithURL:(nonnull NSURL*)paymentRequestURL DEPRECATED_ATTRIBUTE; // default timeout is 10 sec\n+ (nullable NSURLRequest*) requestForPaymentRequestWithURL:(nonnull NSURL*)paymentRequestURL timeout:(NSTimeInterval)timeout DEPRECATED_ATTRIBUTE;\n+ (nullable BTCPaymentRequest*) paymentRequestFromData:(nonnull NSData*)data response:(nonnull NSURLResponse*)response error:(NSError* __nullable * __nullable)errorOut DEPRECATED_ATTRIBUTE;\n\n+ (nullable NSURLRequest*) requestForPayment:(nonnull BTCPayment*)payment url:(nonnull NSURL*)paymentURL DEPRECATED_ATTRIBUTE; // default timeout is 10 sec\n+ (nullable NSURLRequest*) requestForPayment:(nonnull BTCPayment*)payment url:(nonnull NSURL*)paymentURL timeout:(NSTimeInterval)timeout DEPRECATED_ATTRIBUTE;\n+ (nullable BTCPaymentACK*) paymentACKFromData:(nonnull NSData*)data response:(nonnull NSURLResponse*)response error:(NSError* __nullable * __nullable)errorOut DEPRECATED_ATTRIBUTE;\n\n@end\n"
  },
  {
    "path": "Pods/CoreBitcoin/CoreBitcoin/BTCPaymentProtocol.m",
    "content": "// CoreBitcoin by Oleg Andreev <oleganza@gmail.com>, WTFPL.\n\n#import \"BTCPaymentProtocol.h\"\n#import \"BTCPaymentRequest.h\"\n#import \"BTCErrors.h\"\n#import \"BTCAssetType.h\"\n#import <Security/Security.h>\n\nstatic NSString* const BTCBitcoinPaymentRequestMimeType = @\"application/bitcoin-paymentrequest\";\nstatic NSString* const BTCOpenAssetsPaymentRequestMimeType = @\"application/oa-paymentrequest\";\nstatic NSString* const BTCOpenAssetsPaymentMethodRequestMimeType = @\"application/oa-paymentmethodrequest\";\n\n@interface BTCPaymentProtocol ()\n@property(nonnull, nonatomic, readwrite) NSArray* assetTypes;\n@property(nonnull, nonatomic) NSArray* paymentRequestMediaTypes;\n@end\n\n@implementation BTCPaymentProtocol\n\n// Instantiates default BIP70 protocol that supports only Bitcoin.\n- (nonnull id) init {\n    return [self initWithAssetTypes:@[ BTCAssetTypeBitcoin ]];\n}\n\n// Instantiates protocol instance with accepted asset types.\n- (nonnull id) initWithAssetTypes:(nonnull NSArray*)assetTypes {\n    NSParameterAssert(assetTypes);\n    NSParameterAssert(assetTypes.count > 0);\n    if (self = [super init]) {\n        self.assetTypes = assetTypes;\n    }\n    return self;\n}\n\n- (NSArray*) paymentRequestMediaTypes {\n    if (!_paymentRequestMediaTypes && self.assetTypes) {\n        NSMutableArray* arr = [NSMutableArray array];\n        for (NSString* assetType in self.assetTypes) {\n            if ([assetType isEqual:BTCAssetTypeBitcoin]) {\n                [arr addObject:BTCBitcoinPaymentRequestMimeType];\n            } else if ([assetType isEqual:BTCAssetTypeOpenAssets]) {\n                [arr addObject:BTCOpenAssetsPaymentRequestMimeType];\n            }\n        }\n        _paymentRequestMediaTypes = arr;\n    }\n    return _paymentRequestMediaTypes;\n}\n\n- (NSInteger) maxDataLength {\n    return 50000;\n}\n\n\n// Convenience API\n\n\n- (void) loadPaymentMethodRequestFromURL:(nonnull NSURL*)paymentMethodRequestURL\n                       completionHandler:(nonnull void(^)(BTCPaymentMethodRequest* __nullable pmr, BTCPaymentRequest* __nullable pr, NSError* __nullable error))completionHandler {\n\n    NSParameterAssert(paymentMethodRequestURL);\n    NSParameterAssert(completionHandler);\n\n    NSURLRequest* request = [self requestForPaymentMethodRequestWithURL:paymentMethodRequestURL];\n    dispatch_async(dispatch_get_global_queue(QOS_CLASS_DEFAULT, 0), ^{\n        NSURLResponse* response = nil;\n        NSError* error = nil;\n        NSData* data = [NSURLConnection sendSynchronousRequest:request returningResponse:&response error:&error];\n        if (!data) {\n            dispatch_async(dispatch_get_main_queue(), ^{\n                completionHandler(nil, nil, error);\n            });\n            return;\n        }\n        id prOrPmr = [self polymorphicPaymentRequestFromData:data response:response error:&error];\n        BTCPaymentRequest* pr = ([prOrPmr isKindOfClass:[BTCPaymentRequest class]] ? prOrPmr : nil);\n        BTCPaymentMethodRequest* pmr = ([prOrPmr isKindOfClass:[BTCPaymentMethodRequest class]] ? prOrPmr : nil);\n        dispatch_async(dispatch_get_main_queue(), ^{\n            completionHandler(pmr, pr, prOrPmr ? nil : error);\n        });\n    });\n}\n\n\n- (void) loadPaymentRequestFromURL:(nonnull NSURL*)paymentRequestURL completionHandler:(nonnull void(^)(BTCPaymentRequest* __nullable pr, NSError* __nullable error))completionHandler {\n    NSParameterAssert(paymentRequestURL);\n    NSParameterAssert(completionHandler);\n\n    NSURLRequest* request = [self requestForPaymentRequestWithURL:paymentRequestURL];\n    dispatch_async(dispatch_get_global_queue(QOS_CLASS_DEFAULT, 0), ^{\n        NSURLResponse* response = nil;\n        NSError* error = nil;\n        NSData* data = [NSURLConnection sendSynchronousRequest:request returningResponse:&response error:&error];\n        if (!data) {\n            dispatch_async(dispatch_get_main_queue(), ^{\n                completionHandler(nil, error);\n            });\n            return;\n        }\n        BTCPaymentRequest* pr = [self paymentRequestFromData:data response:response error:&error];\n        dispatch_async(dispatch_get_main_queue(), ^{\n            completionHandler(pr, pr ? nil : error);\n        });\n    });\n}\n\n- (void) postPayment:(nonnull BTCPayment*)payment URL:(nonnull NSURL*)paymentURL completionHandler:(nonnull void(^)(BTCPaymentACK* __nullable ack, NSError* __nullable error))completionHandler {\n    NSParameterAssert(payment);\n    NSParameterAssert(paymentURL);\n    NSParameterAssert(completionHandler);\n\n    NSURLRequest* request = [self requestForPayment:payment url:paymentURL];\n    dispatch_async(dispatch_get_global_queue(QOS_CLASS_DEFAULT, 0), ^{\n        NSURLResponse* response = nil;\n        NSError* error = nil;\n        NSData* data = [NSURLConnection sendSynchronousRequest:request returningResponse:&response error:&error];\n        if (!data) {\n            dispatch_async(dispatch_get_main_queue(), ^{\n                completionHandler(nil, error);\n            });\n            return;\n        }\n        BTCPaymentACK* ack = [self paymentACKFromData:data response:response error:&error];\n        dispatch_async(dispatch_get_main_queue(), ^{\n            completionHandler(ack, ack ? nil : error);\n        });\n    });\n}\n\n\n// Low-level API\n// (use this if you have your own connection queue).\n\n- (nullable NSURLRequest*) requestForPaymentMethodRequestWithURL:(nonnull NSURL*)url {\n    return [self requestForPaymentMethodRequestWithURL:url timeout:10];\n}\n\n- (nullable NSURLRequest*) requestForPaymentMethodRequestWithURL:(nonnull NSURL*)url timeout:(NSTimeInterval)timeout {\n    if (!url) return nil;\n    NSMutableURLRequest* request = [NSMutableURLRequest requestWithURL:url cachePolicy:NSURLRequestReloadIgnoringCacheData timeoutInterval:timeout];\n    [request addValue:BTCBitcoinPaymentRequestMimeType forHTTPHeaderField:@\"Accept\"];\n    [request addValue:BTCOpenAssetsPaymentRequestMimeType forHTTPHeaderField:@\"Accept\"];\n    [request addValue:BTCOpenAssetsPaymentMethodRequestMimeType forHTTPHeaderField:@\"Accept\"];\n    return request;\n}\n\n- (nullable id) polymorphicPaymentRequestFromData:(nonnull NSData*)data response:(nonnull NSURLResponse*)response error:(NSError* __nullable * __nullable)errorOut {\n    NSString* mime = response.MIMEType.lowercaseString;\n    BOOL isPaymentRequest = [mime isEqual:BTCBitcoinPaymentRequestMimeType] ||\n                            [mime isEqual:BTCOpenAssetsPaymentRequestMimeType];\n    BOOL isPaymentMethodRequest = [mime isEqual:BTCOpenAssetsPaymentMethodRequestMimeType];\n\n    if (!isPaymentRequest && !isPaymentMethodRequest) {\n        if (errorOut) *errorOut = [NSError errorWithDomain:BTCErrorDomain code:BTCErrorPaymentRequestInvalidResponse userInfo:@{}];\n        return nil;\n    }\n    if (data.length > [self maxDataLength]) {\n        if (errorOut) *errorOut = [NSError errorWithDomain:BTCErrorDomain code:BTCErrorPaymentRequestTooBig userInfo:@{}];\n        return nil;\n    }\n    if (isPaymentRequest) {\n        BTCPaymentRequest* pr = [[BTCPaymentRequest alloc] initWithData:data];\n        if (!pr) {\n            if (errorOut) *errorOut = [NSError errorWithDomain:BTCErrorDomain code:BTCErrorPaymentRequestInvalidResponse userInfo:@{}];\n            return nil;\n        }\n        return pr;\n    } else if (isPaymentMethodRequest) {\n        BTCPaymentMethodRequest* pmr = [[BTCPaymentMethodRequest alloc] initWithData:data];\n        if (!pmr) {\n            if (errorOut) *errorOut = [NSError errorWithDomain:BTCErrorDomain code:BTCErrorPaymentRequestInvalidResponse userInfo:@{}];\n            return nil;\n        }\n        return pmr;\n    }\n    return nil;\n\n}\n\n- (NSURLRequest*) requestForPaymentRequestWithURL:(NSURL*)paymentRequestURL {\n    return [self requestForPaymentRequestWithURL:paymentRequestURL timeout:10];\n}\n\n- (NSURLRequest*) requestForPaymentRequestWithURL:(NSURL*)paymentRequestURL timeout:(NSTimeInterval)timeout {\n    if (!paymentRequestURL) return nil;\n    NSMutableURLRequest* request = [NSMutableURLRequest requestWithURL:paymentRequestURL cachePolicy:NSURLRequestReloadIgnoringCacheData timeoutInterval:timeout];\n    for (NSString* mimeType in self.paymentRequestMediaTypes) {\n        [request addValue:mimeType forHTTPHeaderField:@\"Accept\"];\n    }\n    return request;\n}\n\n- (BTCPaymentRequest*) paymentRequestFromData:(NSData*)data response:(NSURLResponse*)response error:(NSError**)errorOut {\n\n    NSArray* mimes = self.paymentRequestMediaTypes;\n    NSString* mime = response.MIMEType.lowercaseString;\n    if (![mimes containsObject:mime]) {\n        if (errorOut) *errorOut = [NSError errorWithDomain:BTCErrorDomain code:BTCErrorPaymentRequestInvalidResponse userInfo:@{}];\n        return nil;\n    }\n    if (data.length > [self maxDataLength]) {\n        if (errorOut) *errorOut = [NSError errorWithDomain:BTCErrorDomain code:BTCErrorPaymentRequestTooBig userInfo:@{}];\n        return nil;\n    }\n    BTCPaymentRequest* pr = [[BTCPaymentRequest alloc] initWithData:data];\n    if (!pr) {\n        if (errorOut) *errorOut = [NSError errorWithDomain:BTCErrorDomain code:BTCErrorPaymentRequestInvalidResponse userInfo:@{}];\n        return nil;\n    }\n    if (pr.version == BTCPaymentRequestVersion1 && ![self.assetTypes containsObject:BTCAssetTypeBitcoin]) {\n        // Client did not want bitcoin, but received bitcoin.\n        if (errorOut) *errorOut = [NSError errorWithDomain:BTCErrorDomain code:BTCErrorPaymentRequestInvalidResponse userInfo:@{}];\n        return nil;\n    }\n    if (pr.version == BTCPaymentRequestVersionOpenAssets1 && ![self.assetTypes containsObject:BTCAssetTypeOpenAssets]) {\n        // Client did not want open assets, but received open assets.\n        if (errorOut) *errorOut = [NSError errorWithDomain:BTCErrorDomain code:BTCErrorPaymentRequestInvalidResponse userInfo:@{}];\n        return nil;\n    }\n    return pr;\n}\n\n- (NSURLRequest*) requestForPayment:(BTCPayment*)payment url:(NSURL*)paymentURL {\n    return [self requestForPayment:payment url:paymentURL timeout:10];\n}\n\n- (NSURLRequest*) requestForPayment:(BTCPayment*)payment url:(NSURL*)paymentURL timeout:(NSTimeInterval)timeout {\n    if (!payment) return nil;\n    if (!paymentURL) return nil;\n\n    NSMutableURLRequest* request = [NSMutableURLRequest requestWithURL:paymentURL cachePolicy:NSURLRequestReloadIgnoringCacheData timeoutInterval:timeout];\n\n    [request addValue:@\"application/bitcoin-payment\" forHTTPHeaderField:@\"Content-Type\"];\n    [request addValue:@\"application/bitcoin-paymentack\" forHTTPHeaderField:@\"Accept\"];\n    [request setHTTPMethod:@\"POST\"];\n    [request setHTTPBody:payment.data];\n    return request;\n}\n\n- (BTCPaymentACK*) paymentACKFromData:(NSData*)data response:(NSURLResponse*)response error:(NSError**)errorOut {\n\n    if (![response.MIMEType.lowercaseString isEqual:@\"application/bitcoin-paymentack\"]) {\n        if (errorOut) *errorOut = [NSError errorWithDomain:BTCErrorDomain code:BTCErrorPaymentRequestInvalidResponse userInfo:@{}];\n        return nil;\n    }\n    if (data.length > [self maxDataLength]) {\n        if (errorOut) *errorOut = [NSError errorWithDomain:BTCErrorDomain code:BTCErrorPaymentRequestTooBig userInfo:@{}];\n        return nil;\n    }\n\n    BTCPaymentACK* ack = [[BTCPaymentACK alloc] initWithData:data];\n\n    if (!ack) {\n        if (errorOut) *errorOut = [NSError errorWithDomain:BTCErrorDomain code:BTCErrorPaymentRequestInvalidResponse userInfo:@{}];\n        return nil;\n    }\n    \n    return ack;\n}\n\n\n\n\n// DEPRECATED METHODS\n\n+ (void) loadPaymentRequestFromURL:(NSURL*)paymentRequestURL completionHandler:(void(^)(BTCPaymentRequest* pr, NSError* error))completionHandler {\n    [[[self alloc] init] loadPaymentRequestFromURL:paymentRequestURL completionHandler:completionHandler];\n}\n+ (void) postPayment:(BTCPayment*)payment URL:(NSURL*)paymentURL completionHandler:(void(^)(BTCPaymentACK* ack, NSError* error))completionHandler {\n    [[[self alloc] init] postPayment:payment URL:paymentURL completionHandler:completionHandler];\n}\n\n+ (NSURLRequest*) requestForPaymentRequestWithURL:(NSURL*)paymentRequestURL {\n    return [self requestForPaymentRequestWithURL:paymentRequestURL timeout:10];\n}\n\n+ (NSURLRequest*) requestForPaymentRequestWithURL:(NSURL*)paymentRequestURL timeout:(NSTimeInterval)timeout {\n    return [[[self alloc] init] requestForPaymentRequestWithURL:paymentRequestURL timeout:timeout];\n}\n\n+ (BTCPaymentRequest*) paymentRequestFromData:(NSData*)data response:(NSURLResponse*)response error:(NSError**)errorOut {\n    return [[[self alloc] init] paymentRequestFromData:data response:response error:errorOut];\n}\n\n+ (NSURLRequest*) requestForPayment:(BTCPayment*)payment url:(NSURL*)paymentURL {\n    return [self requestForPayment:payment url:paymentURL timeout:10];\n}\n\n+ (NSURLRequest*) requestForPayment:(BTCPayment*)payment url:(NSURL*)paymentURL timeout:(NSTimeInterval)timeout {\n    return [[[self alloc] init] requestForPayment:payment url:paymentURL timeout:timeout];\n}\n\n+ (BTCPaymentACK*) paymentACKFromData:(NSData*)data response:(NSURLResponse*)response error:(NSError**)errorOut {\n    return [[[self alloc] init] paymentACKFromData:data response:response error:errorOut];\n}\n\n@end\n\n\n"
  },
  {
    "path": "Pods/CoreBitcoin/CoreBitcoin/BTCPaymentRequest.h",
    "content": "// CoreBitcoin by Oleg Andreev <oleganza@gmail.com>, WTFPL.\n\n#import <Foundation/Foundation.h>\n#import \"BTCUnitsAndLimits.h\"\n\n// Interface to BIP70 payment protocol.\n// Spec: https://github.com/bitcoin/bips/blob/master/bip-0070.mediawiki\n//\n// * BTCPaymentProtocol implements high-level request and response API.\n// * BTCPaymentRequest object that represents \"PaymentRequest\" as described in BIP70.\n// * BTCPaymentDetails object that represents \"PaymentDetails\" as described in BIP70.\n// * BTCPayment object that represents \"Payment\" as described in BIP70.\n// * BTCPaymentACK object that represents \"PaymentACK\" as described in BIP70.\n\nextern NSInteger const BTCPaymentRequestVersion1;\nextern NSInteger const BTCPaymentRequestVersionOpenAssets1;\n\nextern NSString* __nonnull const BTCPaymentRequestPKITypeNone;\nextern NSString* __nonnull const BTCPaymentRequestPKITypeX509SHA1;\nextern NSString* __nonnull const BTCPaymentRequestPKITypeX509SHA256;\n\n// Special value indicating that amount on the output is not specified.\nextern BTCAmount const BTCUnspecifiedPaymentAmount;\n\n// Status allows to correctly display information about security of the request to the user.\ntypedef NS_ENUM(NSInteger, BTCPaymentRequestStatus) {\n    // Payment request is valid and the user can trust it.\n    BTCPaymentRequestStatusValid                 = 0, // signed with a valid and known certificate.\n\n    BTCPaymentRequestStatusNotCompatible         = 100, // version is not supported (currently only v1 is supported)\n\n    // These allow Payment Request to be accepted with a warning to the user.\n    BTCPaymentRequestStatusUnsigned              = 101, // PKI type is \"none\"\n    BTCPaymentRequestStatusUnknown               = 102, // PKI type is unknown (for forward compatibility may allow sending or warn to upgrade).\n\n    // These generally mean we should decline the Payment Request.\n    BTCPaymentRequestStatusExpired               = 201,\n    BTCPaymentRequestStatusInvalidSignature      = 202,\n    BTCPaymentRequestStatusMissingCertificate    = 203,\n    BTCPaymentRequestStatusUntrustedCertificate  = 204,\n};\n\n@class BTCNetwork;\n@class BTCPayment;\n@class BTCPaymentACK;\n@class BTCPaymentRequest;\n@class BTCPaymentDetails;\n@class BTCTransaction;\n\nNSArray* __nullable BTCParseCertificatesFromPaymentRequestPKIData(NSData* __nullable pkiData);\n\nBOOL BTCPaymentRequestVerifySignature(NSString* __nullable pkiType,\n                                             NSData* __nullable dataToVerify,\n                                             NSArray* __nullable certificates,\n                                             NSData* __nullable signature,\n                                             BTCPaymentRequestStatus* __nullable statusOut,\n                                             NSString* __autoreleasing __nullable *  __nullable signerOut);\n\n// Payment requests are split into two messages to support future extensibility.\n// The bulk of the information is contained in the PaymentDetails message.\n// It is wrapped inside a PaymentRequest message, which contains meta-information\n// about the merchant and a digital signature.\n// message PaymentRequest {\n//     optional uint32 payment_details_version = 1 [default = 1];\n//     optional string pki_type = 2 [default = \"none\"];\n//     optional bytes pki_data = 3;\n//     required bytes serialized_payment_details = 4;\n//     optional bytes signature = 5;\n// }\n@interface BTCPaymentRequest : NSObject\n\n// Version of the payment request and payment details.\n// Default is BTCPaymentRequestVersion1.\n@property(nonatomic, readonly) NSInteger version;\n\n// Public-key infrastructure (PKI) system being used to identify the merchant.\n// All implementation should support \"none\", \"x509+sha256\" and \"x509+sha1\".\n// See BTCPaymentRequestPKIType* constants.\n@property(nonatomic, readonly, nonnull) NSString* pkiType;\n\n// PKI-system data that identifies the merchant and can be used to create a digital signature.\n// In the case of X.509 certificates, pki_data contains one or more X.509 certificates.\n// Depends on pkiType. Optional.\n@property(nonatomic, readonly, nullable) NSData* pkiData;\n\n// A BTCPaymentDetails object.\n@property(nonatomic, readonly, nonnull) BTCPaymentDetails* details;\n\n// Digital signature over a hash of the protocol buffer serialized variation of\n// the PaymentRequest message, with all serialized fields serialized in numerical order\n// (all current protocol buffer implementations serialize fields in numerical order) and\n// signed using the private key that corresponds to the public key in pki_data.\n// Optional fields that are not set are not serialized (however, setting a field to its default value will cause it to be serialized and will affect the signature).\n// Before serialization, the signature field must be set to an empty value so that\n// the field is included in the signed PaymentRequest hash but contains no data.\n@property(nonatomic, readonly, nullable) NSData* signature;\n\n// Array of DER encoded certificates or nil if pkiType does offer certificates.\n// This list is extracted from raw `pkiData`.\n// If set, certificates are cerialized in X509Certificates object and set to pkiData.\n@property(nonatomic, readonly, nonnull) NSArray* certificates;\n\n// A date against which the payment request is being validated.\n// If nil, system date at the moment of validation is used.\n@property(nonatomic, nullable) NSDate* currentDate;\n\n// Returns YES if payment request is correctly signed by a trusted certificate if needed\n// and expiration date is valid.\n// Accessing this property also updates `status` and `signerName`.\n@property(nonatomic, readonly) BOOL isValid;\n\n// Human-readable name of the signer or nil if it's unsigned.\n// You should display this to the user as a name of the merchant.\n// Accessing this property also updates `status` and `isValid`.\n@property(nonatomic, readonly, nullable) NSString* signerName;\n\n// Validation status.\n// Accessing this property also updates `commonName` and `isValid`.\n@property(nonatomic, readonly) BTCPaymentRequestStatus status;\n\n// Binary serialization in protocol buffer format.\n@property(nonatomic, readonly, nonnull) NSData* data;\n\n- (nullable id) initWithData:(nullable NSData*)data;\n\n- (nullable BTCPayment*) paymentWithTransaction:(nullable BTCTransaction*)tx;\n\n- (nullable BTCPayment*) paymentWithTransactions:(nullable  NSArray*)txs memo:(nullable NSString*)memo;\n\n@end\n\n@interface BTCPaymentDetails : NSObject\n\n// Mainnet or testnet. Default is mainnet.\n@property(nonatomic, readonly, nonnull) BTCNetwork* network;\n\n// Array of transaction outputs storing `value` in satoshis and `script` where payment should be sent.\n// Unspecified amounts are set to BTC_MAX_MONEY so you can know if zero amount was actually specified (e.g. for OP_RETURN or proof-of-burn etc).\n@property(nonatomic, readonly, nonnull) NSArray* /*[BTCTransactionOutput]*/ outputs;\n\n// Array of transaction inputs storing `previousHash` and `previousIndex`.\n// Client should include these inputs in the transaction as they constitute product offered by the merchant.\n@property(nonatomic, readonly, nonnull) NSArray* /*[BTCTransactionInput]*/ inputs;\n\n// Date when the PaymentRequest was created.\n@property(nonatomic, readonly, nonnull) NSDate* date;\n\n// Date after which the PaymentRequest should be considered invalid.\n@property(nonatomic, readonly, nullable) NSDate* expirationDate;\n\n// Plain-text (no formatting) note that should be displayed to the customer, explaining what this PaymentRequest is for.\n@property(nonatomic, readonly, nullable) NSString* memo;\n\n// Secure location (usually https) where a Payment message (see below) may be sent to obtain a PaymentACK.\n// The payment_url specified in the PaymentDetails should remain valid at least until the PaymentDetails expires\n// (or as long as possible if the PaymentDetails does not expire).\n// Note that this is irrespective of any state change in the underlying payment request;\n// for example cancellation of an order should not invalidate the payment_url,\n// as it is important that the merchant's server can record mis-payments in order to refund the payment.\n@property(nonatomic, readonly, nullable) NSURL* paymentURL;\n\n// Arbitrary data that may be used by the merchant to identify the PaymentRequest.\n// May be omitted if the merchant does not need to associate Payments with PaymentRequest or\n// if they associate each PaymentRequest with a separate payment address.\n@property(nonatomic, readonly, nullable) NSData* merchantData;\n\n// Binary serialization in protocol buffer format.\n@property(nonatomic, readonly, nonnull) NSData* data;\n\n- (nullable id) initWithData:(nullable NSData*)data;\n\n@end\n\n// Payment messages are sent after the customer has authorized payment.\n@interface BTCPayment : NSObject\n\n// Should be copied from PaymentDetails.merchant_data.\n// Merchants may use invoice numbers or any other data they require\n// to match Payments to PaymentRequests.\n@property(nonatomic, readonly, nullable) NSData* merchantData;\n\n// One or more valid, signed Bitcoin transactions that fully pay the PaymentRequest\n@property(nonatomic, readonly, nonnull) NSArray* /*[BTCTransaction]*/ transactions;\n\n// Output scripts and amounts. Amounts are optional and can be zero.\n@property(nonatomic, readonly, nonnull) NSArray* /*[BTCTransactionOutput]*/ refundOutputs;\n\n// Plain-text note from the customer to the merchant.\n@property(nonatomic, readonly, nullable) NSString* memo;\n\n// Binary serialization in protocol buffer format.\n@property(nonatomic, readonly, nonnull) NSData* data;\n\n- (nullable id) initWithData:(nullable NSData*)data;\n\n@end\n\n// PaymentACK is the final message in the payment protocol;\n// it is sent from the merchant's server to the bitcoin wallet in response to a Payment message.\n@interface BTCPaymentACK : NSObject\n\n// Copy of the Payment message that triggered this PaymentACK.\n// Clients may ignore this if they implement another way of associating Payments with PaymentACKs.\n@property(nonatomic, readonly, nonnull) BTCPayment* payment;\n\n// Note that should be displayed to the customer giving the status of the transaction\n// (e.g. \"Payment of 1 BTC for eleven tribbles accepted for processing.\")\n@property(nonatomic, readonly, nullable) NSString* memo;\n\n// Binary serialization in protocol buffer format.\n@property(nonatomic, readonly, nonnull) NSData* data;\n\n- (nullable id) initWithData:(nullable NSData*)data;\n\n@end"
  },
  {
    "path": "Pods/CoreBitcoin/CoreBitcoin/BTCPaymentRequest.m",
    "content": "// CoreBitcoin by Oleg Andreev <oleganza@gmail.com>, WTFPL.\n\n#import \"BTCPaymentRequest.h\"\n#import \"BTCProtocolBuffers.h\"\n#import \"BTCErrors.h\"\n#import \"BTCAssetType.h\"\n#import \"BTCAssetID.h\"\n#import \"BTCData.h\"\n#import \"BTCNetwork.h\"\n#import \"BTCScript.h\"\n#import \"BTCTransaction.h\"\n#import \"BTCTransactionOutput.h\"\n#import \"BTCTransactionInput.h\"\n#import <Security/Security.h>\n\nNSInteger const BTCPaymentRequestVersion1 = 1;\nNSInteger const BTCPaymentRequestVersionOpenAssets1 = 0x4f41;\n\nNSString* const BTCPaymentRequestPKITypeNone = @\"none\";\nNSString* const BTCPaymentRequestPKITypeX509SHA1 = @\"x509+sha1\";\nNSString* const BTCPaymentRequestPKITypeX509SHA256 = @\"x509+sha256\";\n\nBTCAmount const BTCUnspecifiedPaymentAmount = -1;\n\ntypedef NS_ENUM(NSInteger, BTCOutputKey) {\n    BTCOutputKeyAmount = 1,\n    BTCOutputKeyScript = 2,\n    BTCOutputKeyAssetID = 4001, // only for Open Assets PRs.\n    BTCOutputKeyAssetAmount = 4002 // only for Open Assets PRs.\n};\n\ntypedef NS_ENUM(NSInteger, BTCInputKey) {\n    BTCInputKeyTxhash = 1,\n    BTCInputKeyIndex = 2\n};\n\ntypedef NS_ENUM(NSInteger, BTCRequestKey) {\n    BTCRequestKeyVersion        = 1,\n    BTCRequestKeyPkiType        = 2,\n    BTCRequestKeyPkiData        = 3,\n    BTCRequestKeyPaymentDetails = 4,\n    BTCRequestKeySignature      = 5\n};\n\ntypedef NS_ENUM(NSInteger, BTCDetailsKey) {\n    BTCDetailsKeyNetwork      = 1,\n    BTCDetailsKeyOutputs      = 2,\n    BTCDetailsKeyTime         = 3,\n    BTCDetailsKeyExpires      = 4,\n    BTCDetailsKeyMemo         = 5,\n    BTCDetailsKeyPaymentURL   = 6,\n    BTCDetailsKeyMerchantData = 7,\n    BTCDetailsKeyInputs       = 8\n};\n\ntypedef NS_ENUM(NSInteger, BTCCertificatesKey) {\n    BTCCertificatesKeyCertificate = 1\n};\n\ntypedef NS_ENUM(NSInteger, BTCPaymentKey) {\n    BTCPaymentKeyMerchantData = 1,\n    BTCPaymentKeyTransactions = 2,\n    BTCPaymentKeyRefundTo     = 3,\n    BTCPaymentKeyMemo         = 4\n};\n\ntypedef NS_ENUM(NSInteger, BTCPaymentAckKey) {\n    BTCPaymentAckKeyPayment = 1,\n    BTCPaymentAckKeyMemo    = 2\n};\n\n\n@interface BTCPaymentRequest ()\n// If you make these publicly writable, make sure to set _data to nil and _isValidated to NO.\n@property(nonatomic, readwrite) NSInteger version;\n@property(nonatomic, readwrite) NSString* pkiType;\n@property(nonatomic, readwrite) NSData* pkiData;\n@property(nonatomic, readwrite) BTCPaymentDetails* details;\n@property(nonatomic, readwrite) NSData* signature;\n@property(nonatomic, readwrite) NSArray* certificates;\n@property(nonatomic, readwrite) NSData* data;\n\n@property(nonatomic) BOOL isValidated;\n@property(nonatomic, readwrite) BOOL isValid;\n@property(nonatomic, readwrite) NSString* signerName;\n@property(nonatomic, readwrite) BTCPaymentRequestStatus status;\n@end\n\n\n@interface BTCPaymentDetails ()\n@property(nonatomic, readwrite) BTCNetwork* network;\n@property(nonatomic, readwrite) NSArray* /*[BTCTransactionOutput]*/ outputs;\n@property(nonatomic, readwrite) NSArray* /*[BTCTransactionInput]*/ inputs;\n@property(nonatomic, readwrite) NSDate* date;\n@property(nonatomic, readwrite) NSDate* expirationDate;\n@property(nonatomic, readwrite) NSString* memo;\n@property(nonatomic, readwrite) NSURL* paymentURL;\n@property(nonatomic, readwrite) NSData* merchantData;\n@property(nonatomic, readwrite) NSData* data;\n@end\n\n\n@interface BTCPayment ()\n@property(nonatomic, readwrite) NSData* merchantData;\n@property(nonatomic, readwrite) NSArray* /*[BTCTransaction]*/ transactions;\n@property(nonatomic, readwrite) NSArray* /*[BTCTransactionOutput]*/ refundOutputs;\n@property(nonatomic, readwrite) NSString* memo;\n@property(nonatomic, readwrite) NSData* data;\n@end\n\n\n@interface BTCPaymentACK ()\n@property(nonatomic, readwrite) BTCPayment* payment;\n@property(nonatomic, readwrite) NSString* memo;\n@property(nonatomic, readwrite) NSData* data;\n@end\n\n\n\n\n\n\n\n@implementation BTCPaymentRequest\n\n- (id) initWithData:(NSData*)data {\n    if (!data) return nil;\n\n    if (self = [super init]) {\n\n        // Note: we are not assigning default values here because we need to\n        // reconstruct exact data (without the signature) for signature verification.\n\n        NSInteger offset = 0;\n        while (offset < data.length) {\n            uint64_t i = 0;\n            NSData* d = nil;\n\n            switch ([BTCProtocolBuffers fieldAtOffset:&offset int:&i data:&d fromData:data]) {\n                case BTCRequestKeyVersion:\n                    if (i) _version = (uint32_t)i;\n                    break;\n                case BTCRequestKeyPkiType:\n                    if (d) _pkiType = [[NSString alloc] initWithData:d encoding:NSUTF8StringEncoding];\n                    break;\n                case BTCRequestKeyPkiData:\n                    if (d) _pkiData = d;\n                    break;\n                case BTCRequestKeyPaymentDetails:\n                    if (d) _details = [[BTCPaymentDetails alloc] initWithData:d];\n                    break;\n                case BTCRequestKeySignature:\n                    if (d) _signature = d;\n                    break;\n                default: break;\n            }\n        }\n\n        // Payment details are required.\n        if (!_details) return nil;\n    }\n    return self;\n}\n\n- (NSData*) data {\n    if (!_data) {\n        _data = [self dataWithSignature:_signature];\n    }\n    return _data;\n}\n\n- (NSData*) dataForSigning {\n    return [self dataWithSignature:[NSData data]];\n}\n\n- (NSData*) dataWithSignature:(NSData*)signature {\n    NSMutableData* data = [NSMutableData data];\n\n    // Note: we should reconstruct the data exactly as it was on the input.\n    if (_version > 0) {\n        [BTCProtocolBuffers writeInt:_version withKey:BTCRequestKeyVersion toData:data];\n    }\n    if (_pkiType) {\n        [BTCProtocolBuffers writeString:_pkiType withKey:BTCRequestKeyPkiType toData:data];\n    }\n    if (_pkiData) {\n        [BTCProtocolBuffers writeData:_pkiData withKey:BTCRequestKeyPkiData toData:data];\n    }\n\n    [BTCProtocolBuffers writeData:self.details.data withKey:BTCRequestKeyPaymentDetails toData:data];\n\n    if (signature) {\n        [BTCProtocolBuffers writeData:signature withKey:BTCRequestKeySignature toData:data];\n    }\n    return data;\n}\n\n- (NSInteger) version\n{\n    return (_version > 0) ? _version : BTCPaymentRequestVersion1;\n}\n\n- (NSString*) pkiType\n{\n    return _pkiType ?: BTCPaymentRequestPKITypeNone;\n}\n\n- (NSArray*) certificates {\n    if (!_certificates) {\n        _certificates = BTCParseCertificatesFromPaymentRequestPKIData(self.pkiData);\n    }\n    return _certificates;\n}\n\n- (BOOL) isValid {\n    if (!_isValidated) [self validatePaymentRequest];\n    return _isValid;\n}\n\n- (NSString*) signerName {\n    if (!_isValidated) [self validatePaymentRequest];\n    return _signerName;\n}\n\n- (BTCPaymentRequestStatus) status {\n    if (!_isValidated) [self validatePaymentRequest];\n    return _status;\n}\n\n- (void) validatePaymentRequest {\n    _isValidated = YES;\n    _isValid = NO;\n\n    // Make sure we do not accidentally send funds to a payment request that we do not support.\n    if (self.version != BTCPaymentRequestVersion1 &&\n        self.version != BTCPaymentRequestVersionOpenAssets1) {\n        _status = BTCPaymentRequestStatusNotCompatible;\n        return;\n    }\n\n    __typeof(_status) status = _status;\n    __typeof(_signerName) signer = _signerName;\n    _isValid = BTCPaymentRequestVerifySignature(self.pkiType,\n                                                [self dataForSigning],\n                                                self.certificates,\n                                                _signature,\n                                                &status,\n                                                &signer);\n    _status = status;\n    _signerName = signer;\n    if (!_isValid) {\n        return;\n    }\n\n    // Signatures are valid, but PR has expired.\n    if (self.details.expirationDate && [self.currentDate ?: [NSDate date] timeIntervalSinceDate:self.details.expirationDate] > 0.0) {\n        _status = BTCPaymentRequestStatusExpired;\n        _isValid = NO;\n        return;\n    }\n}\n\n- (BTCPayment*) paymentWithTransaction:(BTCTransaction*)tx {\n    NSParameterAssert(tx);\n    return [self paymentWithTransactions:@[ tx ] memo:nil];\n}\n\n- (BTCPayment*) paymentWithTransactions:(NSArray*)txs memo:(NSString*)memo {\n    if (!txs || txs.count == 0) return nil;\n    BTCPayment* payment = [[BTCPayment alloc] init];\n    payment.merchantData = self.details.merchantData;\n    payment.transactions = txs;\n    payment.memo = memo;\n    return payment;\n}\n\n@end\n\n\nNSArray* __nullable BTCParseCertificatesFromPaymentRequestPKIData(NSData* __nullable pkiData) {\n    if (!pkiData) return nil;\n    NSMutableArray* certs = [NSMutableArray array];\n    NSInteger offset = 0;\n    while (offset < pkiData.length) {\n        NSData* d = nil;\n        NSInteger key = [BTCProtocolBuffers fieldAtOffset:&offset int:NULL data:&d fromData:pkiData];\n        if (key == BTCCertificatesKeyCertificate && d) {\n            [certs addObject:d];\n        }\n    }\n    return certs;\n}\n\n\nBOOL BTCPaymentRequestVerifySignature(NSString* __nullable pkiType,\n                                      NSData* __nullable dataToVerify,\n                                      NSArray* __nullable certificates,\n                                      NSData* __nullable signature,\n                                      BTCPaymentRequestStatus* __nullable statusOut,\n                                      NSString* __autoreleasing __nullable *  __nullable signerOut) {\n\n    if ([pkiType isEqual:BTCPaymentRequestPKITypeX509SHA1] ||\n        [pkiType isEqual:BTCPaymentRequestPKITypeX509SHA256]) {\n\n        if (!signature || !certificates || certificates.count == 0 || !dataToVerify) {\n            if (statusOut) *statusOut = BTCPaymentRequestStatusInvalidSignature;\n            return NO;\n        }\n\n        // 1. Verify chain of trust\n\n        NSMutableArray *certs = [NSMutableArray array];\n        NSArray *policies = @[CFBridgingRelease(SecPolicyCreateBasicX509())];\n        SecTrustRef trust = NULL;\n        SecTrustResultType trustResult = kSecTrustResultInvalid;\n\n        for (NSData *certData in certificates) {\n            SecCertificateRef cert = SecCertificateCreateWithData(NULL, (__bridge CFDataRef)certData);\n            if (cert) [certs addObject:CFBridgingRelease(cert)];\n        }\n\n        if (certs.count > 0) {\n            if (signerOut) *signerOut = CFBridgingRelease(SecCertificateCopySubjectSummary((__bridge SecCertificateRef)certs[0]));\n        }\n\n        SecTrustCreateWithCertificates((__bridge CFArrayRef)certs, (__bridge CFArrayRef)policies, &trust);\n        SecTrustEvaluate(trust, &trustResult); // verify certificate chain\n\n        // kSecTrustResultUnspecified indicates the evaluation succeeded\n        // and the certificate is implicitly trusted, but user intent was not\n        // explicitly specified.\n        if (trustResult != kSecTrustResultUnspecified && trustResult != kSecTrustResultProceed) {\n            if (certs.count > 0) {\n                if (statusOut) *statusOut = BTCPaymentRequestStatusUntrustedCertificate;\n            } else {\n                if (statusOut) *statusOut = BTCPaymentRequestStatusMissingCertificate;\n            }\n            return NO;\n        }\n\n        // 2. Verify signature\n\n    #if TARGET_OS_IPHONE\n        SecKeyRef pubKey = SecTrustCopyPublicKey(trust);\n        SecPadding padding = kSecPaddingPKCS1;\n        NSData* hash = nil;\n\n        if ([pkiType isEqual:BTCPaymentRequestPKITypeX509SHA256]) {\n            hash = BTCSHA256(dataToVerify);\n            padding = kSecPaddingPKCS1SHA256;\n        }\n        else if ([pkiType isEqual:BTCPaymentRequestPKITypeX509SHA1]) {\n            hash = BTCSHA1(dataToVerify);\n            padding = kSecPaddingPKCS1SHA1;\n        }\n\n        OSStatus status = SecKeyRawVerify(pubKey, padding, hash.bytes, hash.length, signature.bytes, signature.length);\n\n        CFRelease(pubKey);\n\n        if (status != errSecSuccess) {\n            if (statusOut) *statusOut = BTCPaymentRequestStatusInvalidSignature;\n            return NO;\n        }\n\n        if (statusOut) *statusOut = BTCPaymentRequestStatusValid;\n        return YES;\n\n    #else\n        // On OS X 10.10 we don't have kSecPaddingPKCS1SHA256 and SecKeyRawVerify.\n        // So we have to verify the signature using Security Transforms API.\n\n        //  Here's a draft of what needs to be done here.\n        /*\n         CFErrorRef* error = NULL;\n         verifier = SecVerifyTransformCreate(publickey, signature, &error);\n         if (!verifier) { CFShow(error); exit(-1); }\n         if (!SecTransformSetAttribute(verifier, kSecTransformInputAttributeName, dataForSigning, &error) {\n         CFShow(error);\n         exit(-1);\n         }\n         // if it's sha256, then set SHA2 digest type and 32 bytes length.\n         if (!SecTransformSetAttribute(verifier, kSecDigestTypeAttribute, kSecDigestSHA2, &error) {\n         CFShow(error);\n         exit(-1);\n         }\n         // Not sure if the length is in bytes or bits. Quinn The Eskimo says it's in bits:\n         // https://devforums.apple.com/message/1119092#1119092\n         if (!SecTransformSetAttribute(verifier, kSecDigestLengthAttribute, @(256), &error) {\n         CFShow(error);\n         exit(-1);\n         }\n\n         result = SecTransformExecute(verifier, &error);\n         if (error) {\n         CFShow(error);\n         exit(-1);\n         }\n         if (result == kCFBooleanTrue) {\n         // signature is valid\n         if (statusOut) *statusOut = BTCPaymentRequestStatusValid;\n         _isValid = YES;\n         } else {\n         // signature is invalid.\n         if (statusOut) *statusOut = BTCPaymentRequestStatusInvalidSignature;\n         _isValid = NO;\n         return NO;\n         }\n\n         // -----------------------------------------------------------------------\n\n         // From CryptoCompatibility sample code (QCCRSASHA1VerifyT.m):\n\n         BOOL                success;\n         SecTransformRef     transform;\n         CFBooleanRef        result;\n         CFErrorRef          errorCF;\n\n         result = NULL;\n         errorCF = NULL;\n\n         // Set up the transform.\n\n         transform = SecVerifyTransformCreate(self.publicKey, (__bridge CFDataRef) self.signatureData, &errorCF);\n         success = (transform != NULL);\n\n         // Note: kSecInputIsAttributeName defaults to kSecInputIsPlainText, which is what we want.\n\n         if (success) {\n         success = SecTransformSetAttribute(transform, kSecDigestTypeAttribute, kSecDigestSHA1, &errorCF) != false;\n         }\n\n         if (success) {\n         success = SecTransformSetAttribute(transform, kSecTransformInputAttributeName, (__bridge CFDataRef) self.inputData, &errorCF) != false;\n         }\n\n         // Run it.\n\n         if (success) {\n         result = SecTransformExecute(transform, &errorCF);\n         success = (result != NULL);\n         }\n\n         // Process the results.\n\n         if (success) {\n         assert(CFGetTypeID(result) == CFBooleanGetTypeID());\n         self.verified = (CFBooleanGetValue(result) != false);\n         } else {\n         assert(errorCF != NULL);\n         self.error = (__bridge NSError *) errorCF;\n         }\n\n         // Clean up.\n\n         if (result != NULL) {\n         CFRelease(result);\n         }\n         if (errorCF != NULL) {\n         CFRelease(errorCF);\n         }\n         if (transform != NULL) {\n         CFRelease(transform);\n         }\n         */\n\n        if (statusOut) *statusOut = BTCPaymentRequestStatusUnknown;\n        return NO;\n    #endif\n\n    } else {\n        // Either \"none\" PKI type or some new and unsupported PKI.\n\n        if (certificates.count > 0) {\n            // Non-standard extension to include a signer's name without actually signing request.\n            if (signerOut) *signerOut = [[NSString alloc] initWithData:certificates[0] encoding:NSUTF8StringEncoding];\n        }\n\n        if ([pkiType isEqual:BTCPaymentRequestPKITypeNone]) {\n            if (statusOut) *statusOut = BTCPaymentRequestStatusUnsigned;\n            return YES;\n        } else {\n            if (statusOut) *statusOut = BTCPaymentRequestStatusUnknown;\n            return NO;\n        }\n    }\n    return NO;\n}\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n@implementation BTCPaymentDetails\n\n- (id) initWithData:(NSData*)data {\n    if (!data) return nil;\n\n    if (self = [super init]) {\n        NSMutableArray* outputs = [NSMutableArray array];\n        NSMutableArray* inputs = [NSMutableArray array];\n\n        NSInteger offset = 0;\n        while (offset < data.length) {\n            uint64_t integer = 0;\n            NSData* d = nil;\n\n            switch ([BTCProtocolBuffers fieldAtOffset:&offset int:&integer data:&d fromData:data]) {\n                case BTCDetailsKeyNetwork:\n                    if (d) {\n                        NSString* networkName = [[NSString alloc] initWithData:d encoding:NSUTF8StringEncoding];\n                        if ([networkName isEqual:@\"main\"]) {\n                            _network = [BTCNetwork mainnet];\n                        } else if ([networkName isEqual:@\"test\"]) {\n                            _network = [BTCNetwork testnet];\n                        } else {\n                            _network = [[BTCNetwork alloc] initWithName:networkName];\n                        }\n                    }\n                    break;\n                case BTCDetailsKeyOutputs: {\n                    NSInteger offset2 = 0;\n                    BTCAmount amount = BTCUnspecifiedPaymentAmount;\n                    NSData* scriptData = nil;\n                    BTCAssetID* assetID = nil;\n                    BTCAmount assetAmount = BTCUnspecifiedPaymentAmount;\n\n                    uint64_t integer2 = 0;\n                    NSData* d2 = nil;\n                    while (offset2 < d.length) {\n                        switch ([BTCProtocolBuffers fieldAtOffset:&offset2 int:&integer2 data:&d2 fromData:d]) {\n                            case BTCOutputKeyAmount:\n                                amount = integer2;\n                                break;\n                            case BTCOutputKeyScript:\n                                scriptData = d2;\n                                break;\n                            case BTCOutputKeyAssetID:\n                                if (d2.length != 20) {\n                                    NSLog(@\"CoreBitcoin ERROR: Received invalid asset id in Payment Request Details (must be 20 bytes long): %@\", d2);\n                                    return nil;\n                                }\n                                assetID = [BTCAssetID assetIDWithHash:d2];\n                                break;\n                            case BTCOutputKeyAssetAmount:\n                                assetAmount = integer2;\n                                break;\n                            default:\n                                break;\n                        }\n                    }\n                    if (scriptData) {\n                        BTCScript* script = [[BTCScript alloc] initWithData:scriptData];\n                        if (!script) {\n                            NSLog(@\"CoreBitcoin ERROR: Received invalid script data in Payment Request Details: %@\", scriptData);\n                            return nil;\n                        }\n                        if (assetID) {\n                            if (amount != BTCUnspecifiedPaymentAmount) {\n                                NSLog(@\"CoreBitcoin ERROR: Received invalid amount specification in Payment Request Details: amount must not be specified.\");\n                                return nil;\n                            }\n                        } else {\n                            if (assetAmount != BTCUnspecifiedPaymentAmount) {\n                                NSLog(@\"CoreBitcoin ERROR: Received invalid amount specification in Payment Request Details: asset_amount must not specified without asset_id.\");\n                                return nil;\n                            }\n                        }\n                        BTCTransactionOutput* txout = [[BTCTransactionOutput alloc] initWithValue:amount script:script];\n                        NSMutableDictionary* userInfo = [NSMutableDictionary dictionary];\n\n                        if (assetID) {\n                            userInfo[@\"assetID\"] = assetID;\n                        }\n                        if (assetAmount != BTCUnspecifiedPaymentAmount) {\n                            userInfo[@\"assetAmount\"] = @(assetAmount);\n                        }\n                        txout.userInfo = userInfo;\n                        txout.index = (uint32_t)outputs.count;\n                        [outputs addObject:txout];\n                    }\n                    break;\n                }\n                case BTCDetailsKeyInputs: {\n                    NSInteger offset2 = 0;\n                    uint64_t index = BTCUnspecifiedPaymentAmount;\n                    NSData* txhash = nil;\n                    // both amount and scriptData are optional, so we try to read any of them\n                    while (offset2 < d.length) {\n                        [BTCProtocolBuffers fieldAtOffset:&offset2 int:(uint64_t*)&index data:&txhash fromData:d];\n                    }\n                    if (txhash) {\n                        if (txhash.length != 32) {\n                            NSLog(@\"CoreBitcoin ERROR: Received invalid txhash in Payment Request Input: %@\", txhash);\n                            return nil;\n                        }\n                        if (index > 0xffffffffLL) {\n                            NSLog(@\"CoreBitcoin ERROR: Received invalid prev index in Payment Request Input: %@\", @(index));\n                            return nil;\n                        }\n                        BTCTransactionInput* txin = [[BTCTransactionInput alloc] init];\n                        txin.previousHash = txhash;\n                        txin.previousIndex = (uint32_t)index;\n                        [inputs addObject:txin];\n                    }\n                    break;\n                }\n                case BTCDetailsKeyTime:\n                    if (integer) _date = [NSDate dateWithTimeIntervalSince1970:integer];\n                    break;\n                case BTCDetailsKeyExpires:\n                    if (integer) _expirationDate = [NSDate dateWithTimeIntervalSince1970:integer];\n                    break;\n                case BTCDetailsKeyMemo:\n                    if (d) _memo = [[NSString alloc] initWithData:d encoding:NSUTF8StringEncoding];\n                    break;\n                case BTCDetailsKeyPaymentURL:\n                    if (d) _paymentURL = [NSURL URLWithString:[[NSString alloc] initWithData:d encoding:NSUTF8StringEncoding]];\n                    break;\n                case BTCDetailsKeyMerchantData:\n                    if (d) _merchantData = d;\n                    break;\n                default: break;\n            }\n        }\n\n        // PR must have at least one output\n        if (outputs.count == 0) return nil;\n\n        // PR requires a creation time.\n        if (!_date) return nil;\n\n        _outputs = outputs;\n        _inputs = inputs;\n        _data = data;\n    }\n    return self;\n}\n\n- (BTCNetwork*) network {\n    return _network ?: [BTCNetwork mainnet];\n}\n\n- (NSData*) data {\n    if (!_data) {\n        NSMutableData* dst = [NSMutableData data];\n\n        // Note: we should reconstruct the data exactly as it was on the input.\n\n        if (_network) {\n            [BTCProtocolBuffers writeString:_network.paymentProtocolName withKey:BTCDetailsKeyNetwork toData:dst];\n        }\n\n        for (BTCTransactionOutput* txout in _outputs) {\n            NSMutableData* outputData = [NSMutableData data];\n\n            if (txout.value != BTCUnspecifiedPaymentAmount) {\n                [BTCProtocolBuffers writeInt:txout.value withKey:BTCOutputKeyAmount toData:outputData];\n            }\n            [BTCProtocolBuffers writeData:txout.script.data withKey:BTCOutputKeyScript toData:outputData];\n\n            if (txout.userInfo[@\"assetID\"]) {\n                BTCAssetID* aid = txout.userInfo[@\"assetID\"];\n                [BTCProtocolBuffers writeData:aid.data withKey:BTCOutputKeyAssetID toData:outputData];\n            }\n            if (txout.userInfo[@\"assetAmount\"]) {\n                BTCAmount assetAmount = [txout.userInfo[@\"assetAmount\"] longLongValue];\n                [BTCProtocolBuffers writeInt:assetAmount withKey:BTCOutputKeyAssetAmount toData:outputData];\n            }\n            [BTCProtocolBuffers writeData:outputData withKey:BTCDetailsKeyOutputs toData:dst];\n        }\n\n        for (BTCTransactionInput* txin in _inputs) {\n            NSMutableData* inputsData = [NSMutableData data];\n\n            [BTCProtocolBuffers writeData:txin.previousHash withKey:BTCInputKeyTxhash toData:inputsData];\n            [BTCProtocolBuffers writeInt:txin.previousIndex withKey:BTCInputKeyIndex toData:inputsData];\n            [BTCProtocolBuffers writeData:inputsData withKey:BTCDetailsKeyInputs toData:dst];\n        }\n\n        if (_date) {\n            [BTCProtocolBuffers writeInt:(uint64_t)[_date timeIntervalSince1970] withKey:BTCDetailsKeyTime toData:dst];\n        }\n        if (_expirationDate) {\n            [BTCProtocolBuffers writeInt:(uint64_t)[_expirationDate timeIntervalSince1970] withKey:BTCDetailsKeyExpires toData:dst];\n        }\n        if (_memo) {\n            [BTCProtocolBuffers writeString:_memo withKey:BTCDetailsKeyMemo toData:dst];\n        }\n        if (_paymentURL) {\n            [BTCProtocolBuffers writeString:_paymentURL.absoluteString withKey:BTCDetailsKeyPaymentURL toData:dst];\n        }\n        if (_merchantData) {\n            [BTCProtocolBuffers writeData:_merchantData withKey:BTCDetailsKeyMerchantData toData:dst];\n        }\n        _data = dst;\n    }\n    return _data;\n}\n\n@end\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n@implementation BTCPayment\n\n- (id) initWithData:(NSData*)data {\n    if (!data) return nil;\n\n    if (self = [super init]) {\n\n        NSInteger offset = 0;\n        NSMutableArray* txs = [NSMutableArray array];\n        NSMutableArray* outputs = [NSMutableArray array];\n\n        while (offset < data.length) {\n            uint64_t integer = 0;\n            NSData* d = nil;\n            BTCTransaction* tx = nil;\n\n            switch ([BTCProtocolBuffers fieldAtOffset:&offset int:&integer data:&d fromData:data]) {\n                case BTCPaymentKeyMerchantData:\n                    if (d) _merchantData = d;\n                    break;\n                case BTCPaymentKeyTransactions:\n                    if (d) tx = [[BTCTransaction alloc] initWithData:d];\n                    if (tx) [txs addObject:tx];\n                    break;\n                case BTCPaymentKeyRefundTo: {\n                    NSInteger offset2 = 0;\n                    BTCAmount amount = BTCUnspecifiedPaymentAmount;\n                    NSData* scriptData = nil;\n                    // both amount and scriptData are optional, so we try to read any of them\n                    while (offset2 < d.length) {\n                        [BTCProtocolBuffers fieldAtOffset:&offset2 int:(uint64_t*)&amount data:&scriptData fromData:d];\n                    }\n                    if (scriptData) {\n                        BTCScript* script = [[BTCScript alloc] initWithData:scriptData];\n                        if (!script) {\n                            NSLog(@\"CoreBitcoin ERROR: Received invalid script data in Payment Request Details: %@\", scriptData);\n                            return nil;\n                        }\n                        BTCTransactionOutput* txout = [[BTCTransactionOutput alloc] initWithValue:amount script:script];\n                        [outputs addObject:txout];\n                    }\n                    break;\n                }\n                case BTCPaymentKeyMemo:\n                    if (d) _memo = [[NSString alloc] initWithData:d encoding:NSUTF8StringEncoding];\n                    break;\n                default: break;\n            }\n\n        }\n\n        _transactions = txs;\n        _refundOutputs = outputs;\n    }\n    return self;\n}\n\n- (NSData*) data {\n\n    if (!_data) {\n        NSMutableData* dst = [NSMutableData data];\n\n        if (_merchantData) {\n            [BTCProtocolBuffers writeData:_merchantData withKey:BTCPaymentKeyMerchantData toData:dst];\n        }\n\n        for (BTCTransaction* tx in _transactions) {\n            [BTCProtocolBuffers writeData:tx.data withKey:BTCPaymentKeyTransactions toData:dst];\n        }\n\n        for (BTCTransactionOutput* txout in _refundOutputs) {\n            NSMutableData* outputData = [NSMutableData data];\n\n            if (txout.value != BTCUnspecifiedPaymentAmount) {\n                [BTCProtocolBuffers writeInt:txout.value withKey:BTCOutputKeyAmount toData:outputData];\n            }\n            [BTCProtocolBuffers writeData:txout.script.data withKey:BTCOutputKeyScript toData:outputData];\n            [BTCProtocolBuffers writeData:outputData withKey:BTCPaymentKeyRefundTo toData:dst];\n        }\n\n        if (_memo) {\n            [BTCProtocolBuffers writeString:_memo withKey:BTCPaymentKeyMemo toData:dst];\n        }\n\n        _data = dst;\n    }\n    return _data;\n}\n\n@end\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n@implementation BTCPaymentACK\n\n- (id) initWithData:(NSData*)data {\n    if (!data) return nil;\n\n    if (self = [super init]) {\n        NSInteger offset = 0;\n        while (offset < data.length) {\n            uint64_t integer = 0;\n            NSData* d = nil;\n\n            switch ([BTCProtocolBuffers fieldAtOffset:&offset int:&integer data:&d fromData:data]) {\n                case BTCPaymentAckKeyPayment:\n                    if (d) _payment = [[BTCPayment alloc] initWithData:d];\n                    break;\n                case BTCPaymentAckKeyMemo:\n                    if (d) _memo = [[NSString alloc] initWithData:d encoding:NSUTF8StringEncoding];\n                    break;\n                default: break;\n            }\n        }\n        \n        // payment object is required.\n        if (! _payment) return nil;\n    }\n    return self;\n}\n\n\n- (NSData*) data {\n    \n    if (!_data) {\n        NSMutableData* dst = [NSMutableData data];\n        \n        [BTCProtocolBuffers writeData:_payment.data withKey:BTCPaymentAckKeyPayment toData:dst];\n        \n        if (_memo) {\n            [BTCProtocolBuffers writeString:_memo withKey:BTCPaymentAckKeyMemo toData:dst];\n        }\n        \n        _data = dst;\n    }\n    return _data;\n}\n\n\n@end\n"
  },
  {
    "path": "Pods/CoreBitcoin/CoreBitcoin/BTCPriceSource.h",
    "content": "// CoreBitcoin by Oleg Andreev <oleganza@gmail.com>, WTFPL.\n\n#import <Foundation/Foundation.h>\n\n@interface BTCPriceSourceResult : NSObject\n\n/*!\n * Average price per BTC.\n */\n@property(nonatomic) NSDecimalNumber* averageRate;\n\n/*!\n * Date of last price update.\n */\n@property(nonatomic) NSDate* date;\n\n/*!\n * Code of the fiat currency in which prices are expressed.\n */\n@property(nonatomic) NSString* currencyCode;\n\n/*!\n * Code of the fiat currency used by exchange natively.\n * Typically, it is the same as `currencyCode`, but may differ if,\n * for instance, prices are expressed in EUR, but exchange operates in USD.\n */\n@property(nonatomic) NSString* nativeCurrencyCode;\n@end\n\n// Base class for specific price sources (Coinbase, Paymium, Coindesk BPI, Winkdex etc).\n@interface BTCPriceSource : NSObject\n\n// Name of the source (e.g. \"Paymium\" or \"Coindesk\").\n@property(nonatomic, readonly) NSString* name;\n\n// Supported currency codes (\"USD\", \"EUR\", \"CNY\" etc).\n@property(nonatomic, readonly) NSArray* currencyCodes;\n\n// Loads average price per BTC.\n// Override this method to fetch the average price.\n// Alternatively override the helper methods above to avoid dealing with networking and JSON parsing.\n// Default queue for completion handler is main queue.\n// These methods use `-loadPriceForCurrency:error:` internally.\n- (void) loadPriceForCurrency:(NSString*)currencyCode completionHandler:(void(^)(BTCPriceSourceResult* result, NSError* error))completionBlock;\n- (void) loadPriceForCurrency:(NSString*)currencyCode completionHandler:(void(^)(BTCPriceSourceResult* result, NSError* error))completionBlock queue:(dispatch_queue_t)queue;\n\n// Synchronous API used internally by asynchronous API.\n- (BTCPriceSourceResult*) loadPriceForCurrency:(NSString*)currencyCode error:(NSError**)errorOut;\n\n// Returns a NSURLRequest to fetch the avg price.\n- (NSURLRequest*) requestForCurrency:(NSString*)currencyCode;\n\n// Returns a NSURLRequest to fetch the avg price.\n// By default parses data as JSON and returns NSDictionary or NSArray whichever is encoded in JSON.\n// IMPORTANT: this method is called on a private background thread.\n- (id) parseData:(NSData*)data error:(NSError**)errorOut;\n\n// Returns price decoded from the parsedData (JSON by default).\n// IMPORTANT: this method is called on a private background thread.\n- (BTCPriceSourceResult*) resultFromParsedData:(id)parsedData currencyCode:(NSString*)currencyCode error:(NSError**)errorOut;\n\n// Registered sources indexed by name.\n+ (NSDictionary*) sources;\n\n// Returns a registered price source. See `+registerPriceSource:forName:`.\n+ (BTCPriceSource*) priceSourceWithName:(NSString*)name;\n\n// Registers a price source to be accessed by its name.\n+ (void) registerPriceSource:(BTCPriceSource*)priceSource;\n\n@end\n\n\n\n// Specific price sources\n\n// CoinDesk Bitcoin Price Index.\n// Supports a lot of currencies, defined here: http://api.coindesk.com/v1/bpi/supported-currencies.json\n// Native currency is always USD.\n@interface BTCPriceSourceCoindesk : BTCPriceSource\n@end\n\n// Winklevoss Bitcoin Index. USD only.\n@interface BTCPriceSourceWinkdex : BTCPriceSource\n@end\n\n// Coinbase market price. USD only.\n@interface BTCPriceSourceCoinbase : BTCPriceSource\n@end\n\n// Paymium market price. EUR only.\n@interface BTCPriceSourcePaymium : BTCPriceSource\n@end\n\n\n"
  },
  {
    "path": "Pods/CoreBitcoin/CoreBitcoin/BTCPriceSource.m",
    "content": "// CoreBitcoin by Oleg Andreev <oleganza@gmail.com>, WTFPL.\n\n#import \"BTCPriceSource.h\"\n#import \"BTCErrors.h\"\n\n\n\n@implementation BTCPriceSourceResult\n@end\n\n@implementation BTCPriceSource\n\n+ (NSMutableDictionary*) mutableSources {\n    static dispatch_once_t onceToken;\n    static NSMutableDictionary* sources;\n    dispatch_once(&onceToken, ^{\n        sources = [NSMutableDictionary dictionary];\n    });\n    return sources;\n}\n\n+ (NSDictionary*) sources {\n    return [self mutableSources];\n}\n\n// Returns a registered price source. See `+registerPriceSource:forName:`.\n+ (BTCPriceSource*) priceSourceWithName:(NSString*)name {\n    if (!name) return nil;\n    return [self mutableSources][name];\n}\n\n// Registers a price source with a given name.\n+ (void) registerPriceSource:(BTCPriceSource*)priceSource {\n    if (!priceSource) return;\n    [self mutableSources][priceSource.name] = priceSource;\n}\n\n// Name of the source (e.g. \"Paymium\" or \"Coindesk\").\n- (NSString*) name {\n    [NSException raise:@\"BTCPriceSource method not implemented\" format:@\"You must override -name method.\"];\n    return nil;\n}\n\n// Supported currency codes (\"USD\", \"EUR\", \"CNY\" etc).\n- (NSArray*) currencyCodes {\n    [NSException raise:@\"BTCPriceSource method not implemented\" format:@\"You must override -currencyCodes method.\"];\n    return nil;\n}\n\n// Returns a NSURLRequest to fetch the avg price.\n- (NSURLRequest*) requestForCurrency:(NSString*)currencyCode {\n    [NSException raise:@\"BTCPriceSource method not implemented\" format:@\"You must override either -loadPriceForCurrency:error: or -requestForCurrency:\"];\n    return nil;\n}\n\n// Returns price decoded from the parsedData (JSON by default).\n- (BTCPriceSourceResult*) resultFromParsedData:(id)parsedData currencyCode:(NSString*)currencyCode error:(NSError**)errorOut {\n    [NSException raise:@\"BTCPriceSource method not implemented\" format:@\"You must override -resultFromParsedData:currencyCode:error: method.\"];\n    return nil;\n}\n\n// Loads average price per BTC.\n// Override this method to fetch the average price.\n// Alternatively override the helper methods above to avoid dealing with networking and JSON parsing.\n- (void) loadPriceForCurrency:(NSString*)currencyCode\n            completionHandler:(void(^)(BTCPriceSourceResult* result, NSError* error))completionBlock {\n    [self loadPriceForCurrency:currencyCode\n             completionHandler:completionBlock\n                         queue:dispatch_get_main_queue()];\n}\n\n- (void) loadPriceForCurrency:(NSString*)currencyCode\n            completionHandler:(void(^)(BTCPriceSourceResult* result, NSError* error))completionBlock\n                        queue:(dispatch_queue_t)queue {\n\n    dispatch_async(dispatch_get_global_queue(QOS_CLASS_DEFAULT, 0), ^{\n        NSError* error = nil;\n        BTCPriceSourceResult* result = [self loadPriceForCurrency:currencyCode error:&error];\n\n        if (!result) {\n            dispatch_async(queue, ^{\n                completionBlock(nil, error);\n            });\n            return;\n        }\n\n        dispatch_async(queue, ^{\n            completionBlock(result, nil);\n        });\n    });\n}\n\n// Synchronous API used internally by asynchronous API.\n- (BTCPriceSourceResult*) loadPriceForCurrency:(NSString*)currencyCode error:(NSError**)errorOut {\n    NSParameterAssert(currencyCode);\n\n    if (![self.currencyCodes containsObject:currencyCode]) {\n        NSError* error = [NSError errorWithDomain:BTCErrorDomain\n                                             code:BTCErrorUnsupportedCurrencyCode\n                                         userInfo:@{}];\n        if (errorOut) *errorOut = error;\n        return nil;\n    }\n\n    NSURLRequest* request = [self requestForCurrency:currencyCode];\n\n    NSError* error = nil;\n    NSURLResponse* response = nil;\n    NSData* data = [NSURLConnection sendSynchronousRequest:request\n                                         returningResponse:&response\n                                                     error:&error];\n\n    if (!data || !response) {\n        if (errorOut) *errorOut = error;\n        return nil;\n    }\n\n    // Check for HTTP status code.\n    if ([response isKindOfClass:[NSHTTPURLResponse class]]) {\n        NSHTTPURLResponse* httpResponse = (NSHTTPURLResponse*)response;\n        if (httpResponse.statusCode < 200 || httpResponse.statusCode >= 300) {\n            error = [NSError errorWithDomain:BTCErrorDomain\n                                        code:httpResponse.statusCode\n                                    userInfo:@{}];\n            if (errorOut) *errorOut = error;\n            return nil;\n        }\n    }\n\n    id parsedData = [self parseData:data error:&error];\n\n    if (!parsedData) {\n        if (errorOut) *errorOut = error;\n        return nil;\n    }\n\n    BTCPriceSourceResult* result = [self resultFromParsedData:parsedData currencyCode:currencyCode error:&error];\n\n    if (!result) {\n        if (errorOut) *errorOut = error;\n        return nil;\n    }\n\n    return result;\n}\n\n\n// Returns a NSURLRequest to fetch the avg price.\n// By default parses data as JSON and returns NSDictionary or NSArray whichever is encoded in JSON.\n- (id) parseData:(NSData*)data error:(NSError**)errorOut {\n    if (!data) return nil;\n    return [NSJSONSerialization JSONObjectWithData:data options:NSJSONReadingAllowFragments error:errorOut];\n}\n\n@end\n\n\n@implementation BTCPriceSourceCoindesk\n\n+ (void) load {\n    [self registerPriceSource:[[self alloc] init]];\n}\n\n- (NSString*) name { return @\"Coindesk\"; }\n\n// Full list is here: http://api.coindesk.com/v1/bpi/supported-currencies.json\n- (NSArray*) currencyCodes { return @[@\"AED\", @\"AFN\", @\"ALL\", @\"AMD\", @\"ANG\", @\"AOA\", @\"ARS\", @\"AUD\", @\"AWG\", @\"AZN\", @\"BAM\", @\"BBD\", @\"BDT\", @\"BGN\", @\"BHD\", @\"BIF\", @\"BMD\", @\"BND\", @\"BOB\", @\"BRL\", @\"BSD\", @\"BTC\", @\"BTN\", @\"BWP\", @\"BYR\", @\"BZD\", @\"CAD\", @\"CDF\", @\"CHF\", @\"CLF\", @\"CLP\", @\"CNY\", @\"COP\", @\"CRC\", @\"CUP\", @\"CVE\", @\"CZK\", @\"DJF\", @\"DKK\", @\"DOP\", @\"DZD\", @\"EEK\", @\"EGP\", @\"ERN\", @\"ETB\", @\"EUR\", @\"FJD\", @\"FKP\", @\"GBP\", @\"GEL\", @\"GHS\", @\"GIP\", @\"GMD\", @\"GNF\", @\"GTQ\", @\"GYD\", @\"HKD\", @\"HNL\", @\"HRK\", @\"HTG\", @\"HUF\", @\"IDR\", @\"ILS\", @\"INR\", @\"IQD\", @\"IRR\", @\"ISK\", @\"JEP\", @\"JMD\", @\"JOD\", @\"JPY\", @\"KES\", @\"KGS\", @\"KHR\", @\"KMF\", @\"KPW\", @\"KRW\", @\"KWD\", @\"KYD\", @\"KZT\", @\"LAK\", @\"LBP\", @\"LKR\", @\"LRD\", @\"LSL\", @\"LTL\", @\"LVL\", @\"LYD\", @\"MAD\", @\"MDL\", @\"MGA\", @\"MKD\", @\"MMK\", @\"MNT\", @\"MOP\", @\"MRO\", @\"MTL\", @\"MUR\", @\"MVR\", @\"MWK\", @\"MXN\", @\"MYR\", @\"MZN\", @\"NAD\", @\"NGN\", @\"NIO\", @\"NOK\", @\"NPR\", @\"NZD\", @\"OMR\", @\"PAB\", @\"PEN\", @\"PGK\", @\"PHP\", @\"PKR\", @\"PLN\", @\"PYG\", @\"QAR\", @\"RON\", @\"RSD\", @\"RUB\", @\"RWF\", @\"SAR\", @\"SBD\", @\"SCR\", @\"SDG\", @\"SEK\", @\"SGD\", @\"SHP\", @\"SLL\", @\"SOS\", @\"SRD\", @\"STD\", @\"SVC\", @\"SYP\", @\"SZL\", @\"THB\", @\"TJS\", @\"TMT\", @\"TND\", @\"TOP\", @\"TRY\", @\"TTD\", @\"TWD\", @\"TZS\", @\"UAH\", @\"UGX\", @\"USD\", @\"UYU\", @\"UZS\", @\"VEF\", @\"VND\", @\"VUV\", @\"WST\", @\"XAF\", @\"XAG\", @\"XAU\", @\"XBT\", @\"XCD\", @\"XDR\", @\"XOF\", @\"XPF\", @\"YER\", @\"ZAR\", @\"ZMK\", @\"ZMW\", @\"ZWL\"]; }\n\n// Returns a NSURLRequest to fetch the avg price.\n- (NSURLRequest*) requestForCurrency:(NSString*)currencyCode {\n    return [NSURLRequest requestWithURL:[NSURL URLWithString:[NSString stringWithFormat:@\"https://api.coindesk.com/v1/bpi/currentprice/%@.json\", currencyCode]]];\n}\n\n- (BTCPriceSourceResult*) resultFromParsedData:(id)parsedData currencyCode:(NSString*)currencyCode error:(NSError**)errorOut {\n    // {\"time\":{\"updatedISO\":\"2015-01-07T10:59:00+00:00\",...},\"bpi\":{\"EUR\":{\"code\":\"EUR\",\"rate\":\"241.4845\",\"description\":\"Euro\",\"rate_float\":241.4845}}}\n    BTCPriceSourceResult* result = [[BTCPriceSourceResult alloc] init];\n    // Coindesk provides exact decimal numbers, but separates thousands by comma which we need to strip to make NSDecimalNumber parse it.\n    NSString* rateString = [parsedData[@\"bpi\"][currencyCode][@\"rate\"] stringByReplacingOccurrencesOfString:@\",\" withString:@\"\"];\n    result.averageRate = [NSDecimalNumber decimalNumberWithString:rateString];\n    result.currencyCode = currencyCode;\n    result.nativeCurrencyCode = @\"USD\";\n    result.date = [NSDate date];\n    // TODO: parse ISO8601 date here.\n    return result;\n}\n\n@end\n\n// Winklevoss Bitcoin Index. USD only.\n@implementation BTCPriceSourceWinkdex\n\n+ (void) load {\n    [self registerPriceSource:[[self alloc] init]];\n}\n\n- (NSString*) name { return @\"Winkdex\"; }\n\n- (NSArray*) currencyCodes { return @[@\"USD\"]; }\n\n// Returns a NSURLRequest to fetch the avg price.\n- (NSURLRequest*) requestForCurrency:(NSString*)currencyCode {\n    return [NSURLRequest requestWithURL:[NSURL URLWithString:@\"https://winkdex.com/api/v0/price\"]];\n}\n\n- (BTCPriceSourceResult*) resultFromParsedData:(id)parsedData currencyCode:(NSString*)currencyCode error:(NSError**)errorOut {\n    // {\"price\": 63984, \"timestamp\": \"2014-07-16T22:47:00Z\"}\n    BTCPriceSourceResult* result = [[BTCPriceSourceResult alloc] init];\n    result.averageRate = [[NSDecimalNumber decimalNumberWithString:[parsedData[@\"price\"] stringValue]] decimalNumberByMultiplyingByPowerOf10:-2];\n    result.currencyCode = @\"USD\";\n    result.nativeCurrencyCode = @\"USD\";\n    result.date = [NSDate date];\n    // TODO: parse ISO8601 date here.\n    return result;\n}\n\n@end\n\n// Coinbase market price. USD only.\n@implementation BTCPriceSourceCoinbase\n\n+ (void) load {\n    [self registerPriceSource:[[self alloc] init]];\n}\n\n- (NSString*) name { return @\"Coinbase\"; }\n\n- (NSArray*) currencyCodes { return @[@\"USD\"]; }\n\n// Returns a NSURLRequest to fetch the avg price.\n- (NSURLRequest*) requestForCurrency:(NSString*)currencyCode {\n    return [NSURLRequest requestWithURL:[NSURL URLWithString:@\"https://api.coinbase.com/v1/prices/spot_rate\"]];\n}\n\n- (BTCPriceSourceResult*) resultFromParsedData:(id)parsedData currencyCode:(NSString*)currencyCode error:(NSError**)errorOut {\n    // {\"amount\":\"287.54\",\"currency\":\"USD\"}\n    BTCPriceSourceResult* result = [[BTCPriceSourceResult alloc] init];\n    result.averageRate = [NSDecimalNumber decimalNumberWithString:parsedData[@\"amount\"]];\n    result.currencyCode = @\"USD\";\n    result.nativeCurrencyCode = @\"USD\";\n    result.date = [NSDate date];\n    return result;\n}\n\n@end\n\n// Paymium market price. EUR only.\n@implementation BTCPriceSourcePaymium\n\n+ (void) load {\n    [self registerPriceSource:[[self alloc] init]];\n}\n\n- (NSString*) name { return @\"Paymium\"; }\n\n- (NSArray*) currencyCodes { return @[@\"EUR\"]; }\n\n// Returns a NSURLRequest to fetch the avg price.\n- (NSURLRequest*) requestForCurrency:(NSString*)currencyCode {\n    return [NSURLRequest requestWithURL:[NSURL URLWithString:@\"https://paymium.com/api/v1/data/eur/ticker\"]];\n}\n\n- (BTCPriceSourceResult*) resultFromParsedData:(id)parsedData currencyCode:(NSString*)currencyCode error:(NSError**)errorOut {\n    // {\"high\":250.0,\"low\":229.0,\"volume\":167.60924709,\"bid\":242.0,\"ask\":246.0,\"midpoint\":244.0,\"vwap\":236.52937755,\"at\":1420623750,\"price\":242.0,\"variation\":5.6769,\"currency\":\"EUR\"}\n    BTCPriceSourceResult* result = [[BTCPriceSourceResult alloc] init];\n    result.averageRate = [NSDecimalNumber decimalNumberWithString:[parsedData[@\"price\"] stringValue]];\n    result.currencyCode = @\"EUR\";\n    result.nativeCurrencyCode = @\"EUR\";\n    result.date = [NSDate dateWithTimeIntervalSince1970:[parsedData[@\"at\"] doubleValue]];\n    return result;\n}\n\n@end\n\n\n"
  },
  {
    "path": "Pods/CoreBitcoin/CoreBitcoin/BTCProcessor.h",
    "content": "// CoreBitcoin by Oleg Andreev <oleganza@gmail.com>, WTFPL.\n\n#import <Foundation/Foundation.h>\n\n@class BTCBlock;\n@class BTCTransaction;\n@class BTCProcessor;\n@class BTCNetwork;\n\nextern NSString* const BTCProcessorErrorDomain;\n\ntypedef NS_ENUM(NSUInteger, BTCProcessorError) {\n    \n    // Block already stored in the blockchain (on mainchain or sidechain)\n    BTCProcessorErrorDuplicateBlock,\n    \n    // Block already stored as orphan\n    BTCProcessorErrorDuplicateOrphanBlock,\n    \n    // Block has timestamp below last downloaded checkpoint.\n    BTCProcessorErrorTimestampBeforeLastCheckpoint,\n    \n    // Proof of work is below the minimum possible since the last checkpoint.\n    BTCProcessorErrorBelowCheckpointProofOfWork,\n    \n};\n\n// Data source implements actual storage for blocks, block headers and transactions.\n@protocol BTCProcessorDataSource <NSObject>\n@required\n\n// Returns a block in the blockchain (mainchain or sidechain), or nil if block is missing.\n- (BTCBlock*) blockWithHash:(NSData*)hash;\n\n// Returns YES if the block exists in the blockchain (mainchain or sidechain).\n- (BOOL) blockExistsWithHash:(NSData*)hash;\n\n// Returns orphan block with the given hash (or nil if block is not stored among orphans).\n- (BTCBlock*) orphanBlockWithHash:(NSData*)hash;\n\n// Returns YES if orphan block exists.\n- (BOOL) orphanBlockExistsWithHash:(NSData*)hash;\n\n@end\n\n\n\n// Delegate allows to handle errors and selectively ignore them for testing purposes.\n@protocol BTCProcessorDelegate <NSObject>\n@optional\n\n// For some error codes, userInfo[@\"DoS\"] contains level of DoS punishment.\n// If this method returns NO, error is ignored and processing continues.\n- (BOOL) processor:(BTCProcessor*)processor shouldRejectBlock:(BTCBlock*)block withError:(NSError*)error;\n\n// Sent when processing stopped because of an error.\n- (void) processor:(BTCProcessor*)processor didRejectBlock:(BTCBlock*)block withError:(NSError*)error;\n\n@end\n\n\n\n// Processor implements validation and processing of the incoming blocks and unconfirmed transactions.\n// It defers storage to data source which takes care of storing and retrieving all objects efficiently.\n@interface BTCProcessor : NSObject\n\n// Network (mainnet/testnet) that should be used by processor.\n// Default is mainnet.\n@property(nonatomic) BTCNetwork* network;\n\n// Data source provides block headers, blocks, and transactions during the process of verification.\n// Should not be nil when processing blocks and transactions.\n@property(nonatomic, weak) id<BTCProcessorDataSource> dataSource;\n\n// Delegate allows fine-grained control of errors that happen. Can be nil.\n@property(nonatomic, weak) id<BTCProcessorDelegate> delegate;\n\n// Attempts to process the block. Returns YES on success, NO and error on failure.\n// Make sure to set dataSource before calling this method.\n// See ProcessBlock() in bitcoind.\n- (BOOL) processBlock:(BTCBlock*)block error:(NSError**)errorOut;\n\n// Attempts to add transaction to \"memory pool\" of unconfirmed transactions.\n// Make sure to set dataSource before calling this method.\n// See AcceptToMemoryPool() in bitcoind.\n- (BOOL) processTransaction:(BTCTransaction*)transaction error:(NSError**)errorOut;\n\n@end\n"
  },
  {
    "path": "Pods/CoreBitcoin/CoreBitcoin/BTCProcessor.m",
    "content": "// CoreBitcoin by Oleg Andreev <oleganza@gmail.com>, WTFPL.\n\n#import \"BTCProcessor.h\"\n#import \"BTCNetwork.h\"\n#import \"BTCBlock.h\"\n#import \"BTCBlockHeader.h\"\n#import \"BTCTransaction.h\"\n#import \"BTCTransactionInput.h\"\n#import \"BTCTransactionOutput.h\"\n\nNSString* const BTCProcessorErrorDomain = @\"BTCProcessorErrorDomain\";\n\n@implementation BTCProcessor\n\n- (id) init {\n    if (self = [super init]) {\n        self.network = [BTCNetwork mainnet];\n    }\n    return self;\n}\n\n\n// Macros to prepare NSError object and check with delegate if the error should cause failure or not.\n\n#define REJECT_BLOCK_WITH_ERROR(ERROR_CODE, MESSAGE, ...) { \\\n    NSError* error = [NSError errorWithDomain:BTCProcessorErrorDomain code:(ERROR_CODE) \\\n                                     userInfo:@{ NSLocalizedDescriptionKey: [NSString stringWithFormat:MESSAGE, __VA_ARGS__] }]; \\\n    if ([self shouldRejectBlock:block withError:error]) { \\\n        [self notifyDidRejectBlock:block withError:error]; \\\n        *errorOut = error; \\\n        return NO; \\\n    } \\\n}\n\n#define REJECT_BLOCK_WITH_DOS(ERROR_CODE, DOS_LEVEL, MESSAGE, ...) { \\\n    NSError* error = [NSError errorWithDomain:BTCProcessorErrorDomain code:ERROR_CODE \\\n                                     userInfo:@{ NSLocalizedDescriptionKey: [NSString stringWithFormat:MESSAGE, __VA_ARGS__], @\"DoS\": @(DOS_LEVEL) }]; \\\n    if ([self shouldRejectBlock:block withError:error]) { \\\n        [self notifyDidRejectBlock:block withError:error]; \\\n        *errorOut = error; \\\n        return NO; \\\n    } \\\n}\n\n\n// Attempts to process the block. Returns YES on success, NO and error on failure.\n- (BOOL) processBlock:(BTCBlock*)block error:(NSError**)errorOut {\n    if (!self.dataSource) {\n        @throw [NSException exceptionWithName:@\"Cannot process block\" reason:@\"-[BTCProcessor dataSource] is nil.\" userInfo:nil];\n    }\n    \n    // 1. Check for duplicate blocks\n    \n    NSData* hash = block.blockHash;\n    \n    if ([self.dataSource blockExistsWithHash:hash]) {\n        REJECT_BLOCK_WITH_ERROR(BTCProcessorErrorDuplicateBlock, NSLocalizedString(@\"Already have block %@\", @\"\"), hash);\n    }\n    \n    if ([self.dataSource orphanBlockExistsWithHash:hash]) {\n        REJECT_BLOCK_WITH_ERROR(BTCProcessorErrorDuplicateOrphanBlock, NSLocalizedString(@\"Already have orphan block %@\", @\"\"), hash);\n    }\n    \n    \n    \n    return YES;\n}\n\n\n// Attempts to add transaction to \"memory pool\" of unconfirmed transactions.\n- (BOOL) processTransaction:(BTCTransaction*)transaction error:(NSError**)errorOut {\n    \n    // TODO: ...\n    \n    return NO;\n}\n\n\n\n#pragma mark - Helpers\n\n\n- (BOOL) shouldRejectBlock:(BTCBlock*)block withError:(NSError*)error {\n    return (![self.delegate respondsToSelector:@selector(processor:shouldRejectBlock:withError:)] ||\n            [self.delegate processor:self shouldRejectBlock:block withError:error]);\n}\n\n- (void) notifyDidRejectBlock:(BTCBlock*)block withError:(NSError*)error {\n    if ([self.delegate respondsToSelector:@selector(processor:didRejectBlock:withError:)]) {\n        [self.delegate processor:self didRejectBlock:block withError:error];\n    }\n}\n\n\n@end\n"
  },
  {
    "path": "Pods/CoreBitcoin/CoreBitcoin/BTCProtocolBuffers.h",
    "content": "// CoreBitcoin by Oleg Andreev <oleganza@gmail.com>, WTFPL.\n\n#import <Foundation/Foundation.h>\n\n// An API to parse and encode protocol buffers.\n@interface BTCProtocolBuffers : NSObject\n\n// Reading\n\n// Returns a variable-length integer value at a given offset in source data.\n+ (uint64_t) varIntAtOffset:(NSInteger*)offset fromData:(NSData*)src;\n\n// Returns a length-delimited data at a given offset in source data.\n+ (NSData *) lenghtDelimitedDataAtOffset:(NSInteger *)offset fromData:(NSData*)src;\n\n// Returns either int or data depending on field type, and returns a field key.\n+ (NSInteger) fieldAtOffset:(NSInteger *)offset int:(uint64_t *)i data:(NSData **)d fromData:(NSData*)src;\n\n// Returns either int or fixed64 or data depending on field type, and returns a field key.\n+ (NSInteger) fieldAtOffset:(NSInteger *)offset int:(uint64_t *)i fixed32:(uint32_t *)fixed32 fixed64:(uint64_t *)fixed64 data:(NSData **)d fromData:(NSData*)src;\n\n// Writing\n\n+ (void) writeInt:(uint64_t)i withKey:(NSInteger)key toData:(NSMutableData*)dst;\n+ (void) writeFixed32:(uint32_t)i withKey:(NSInteger)key toData:(NSMutableData*)dst;\n+ (void) writeFixed64:(uint64_t)i withKey:(NSInteger)key toData:(NSMutableData*)dst;\n+ (void) writeLengthDelimitedData:(NSData*)data toData:(NSMutableData*)dst;\n+ (void) writeData:(NSData*)d withKey:(NSInteger)key toData:(NSMutableData*)dst;\n+ (void) writeString:(NSString*)string withKey:(NSInteger)key toData:(NSMutableData*)dst;\n\n@end\n"
  },
  {
    "path": "Pods/CoreBitcoin/CoreBitcoin/BTCProtocolBuffers.m",
    "content": "// CoreBitcoin by Oleg Andreev <oleganza@gmail.com>, WTFPL.\n\n#import \"BTCProtocolBuffers.h\"\n\ntypedef NS_ENUM(NSInteger, BTCProtobufType) {\n    BTCProtobufTypeVarInt          = 0, // int32, int64, uint32, uint64, sint32, sint64, bool, enum\n    BTCProtobufType64bit           = 1, // fixed64, sfixed64, double\n    BTCProtobufTypeLengthDelimited = 2, // string, bytes, embedded messages, packed repeated fields\n    BTCProtobufType32bit           = 5, // fixed32, sfixed32, float\n};\n\n@implementation BTCProtocolBuffers\n\n// Returns a variable-length integer value at a given offset in source data.\n+ (uint64_t) varIntAtOffset:(NSInteger*)offset fromData:(NSData*)src {\n    uint64_t varInt = 0;\n    uint8_t b = 0x80;\n    NSUInteger i = 0;\n    while ((b & 0x80) && *offset < src.length) {\n        b = ((const uint8_t *)src.bytes)[(*offset)++];\n        varInt += (uint64_t)(b & 0x7f) << 7*i++;\n    }\n    return varInt;\n}\n\n// Returns a length-delimited data at a given offset in source data.\n+ (NSData *) lenghtDelimitedDataAtOffset:(NSInteger *)offset fromData:(NSData*)src {\n    NSData *lengthDelimitedData = nil;\n    NSUInteger length = (NSUInteger)[self varIntAtOffset:offset fromData:src];\n    if (*offset + length <= src.length) {\n        lengthDelimitedData = [src subdataWithRange:NSMakeRange(*offset, length)];\n    }\n    *offset += length;\n    return lengthDelimitedData;\n}\n\n// Returns either int or data depending on field type, and returns a field key.\n+ (NSInteger) fieldAtOffset:(NSInteger *)offset int:(uint64_t *)i data:(NSData **)d fromData:(NSData*)src {\n    return [self fieldAtOffset:offset int:i fixed32:NULL fixed64:NULL data:d fromData:src];\n}\n\n// Returns either int or fixed64 or data depending on field type, and returns a field key.\n+ (NSInteger) fieldAtOffset:(NSInteger *)offset int:(uint64_t *)i fixed32:(uint32_t *)fixed32 fixed64:(uint64_t *)fixed64 data:(NSData **)d fromData:(NSData*)src {\n\n    NSInteger key = (NSInteger)[self varIntAtOffset:offset fromData:src];\n    uint64_t varInt = 0;\n    NSData *lengthDelimitedData = nil;\n\n    switch (key & 0x07) {\n        case BTCProtobufTypeVarInt: {\n            varInt = [self varIntAtOffset:offset fromData:src];\n            if (i) *i = varInt;\n            break;\n        }\n        case BTCProtobufType64bit: {\n            if (fixed64) {\n                const uint64_t* words = (const uint64_t*)(((const uint8_t*)src.bytes) + *offset);\n                *fixed64 = words[0];\n            }\n            *offset += sizeof(uint64_t);\n            break;\n        }\n        case BTCProtobufTypeLengthDelimited: {\n            lengthDelimitedData = [self lenghtDelimitedDataAtOffset:offset fromData:src];\n            if (d) *d = lengthDelimitedData;\n            break;\n        }\n        case BTCProtobufType32bit: {\n            if (fixed32) {\n                const uint32_t* words = (const uint32_t*)(((const uint8_t*)src.bytes) + *offset);\n                *fixed32 = words[0];\n            }\n            *offset += sizeof(uint32_t);\n            break;\n        }\n        default: break;\n    }\n\n    return key >> 3;\n}\n\n+ (void) writeRawVarInt:(uint64_t)i toData:(NSMutableData*)dst {\n    do {\n        uint8_t b = i & 0x7f;\n        i >>= 7;\n        if (i > 0) b |= 0x80;\n        [dst appendBytes:&b length:1];\n    } while (i > 0);\n}\n\n+ (void) writeInt:(uint64_t)i withKey:(NSInteger)key toData:(NSMutableData*)dst {\n    [self writeRawVarInt:(key << 3) + BTCProtobufTypeVarInt toData:dst];\n    [self writeRawVarInt:i toData:dst];\n}\n\n+ (void) writeFixed32:(uint32_t)i withKey:(NSInteger)key toData:(NSMutableData*)dst {\n    [self writeRawVarInt:(key << 3) + BTCProtobufType32bit toData:dst];\n    [dst appendBytes:&i length:sizeof(uint32_t)];\n}\n\n+ (void) writeFixed64:(uint64_t)i withKey:(NSInteger)key toData:(NSMutableData*)dst {\n    [self writeRawVarInt:(key << 3) + BTCProtobufType64bit toData:dst];\n    [dst appendBytes:&i length:sizeof(uint64_t)];\n}\n\n+ (void) writeLengthDelimitedData:(NSData*)data toData:(NSMutableData*)dst {\n    [self writeRawVarInt:data.length toData:dst];\n    [dst appendData:data];\n}\n\n+ (void) writeData:(NSData*)data withKey:(NSInteger)key toData:(NSMutableData*)dst {\n    [self writeRawVarInt:(key << 3) + BTCProtobufTypeLengthDelimited toData:dst];\n    [self writeLengthDelimitedData:data toData:dst];\n}\n\n+ (void) writeString:(NSString*)string withKey:(NSInteger)key toData:(NSMutableData*)dst {\n    [self writeData:[string dataUsingEncoding:NSUTF8StringEncoding] withKey:key toData:dst];\n}\n\n@end\n\n"
  },
  {
    "path": "Pods/CoreBitcoin/CoreBitcoin/BTCProtocolSerialization.h",
    "content": "// CoreBitcoin by Oleg Andreev <oleganza@gmail.com>, WTFPL.\n\n#import <Foundation/Foundation.h>\n\n// A collection of routines dealing with parsing and writing various protocol messages.\n@interface BTCProtocolSerialization : NSObject\n\n// This implementation of variable-length integer is known as \"CompactSize\" in Satoshi code (BitcoinQT).\n//\n//  Value           Storage length     Format\n//  < 0xfd          1                  uint8_t\n// <= 0xffff        3                  0xfd followed by the value as uint16_t\n// <= 0xffffffff    5                  0xfe followed by the value as uint32_t\n//  > 0xffffffff    9                  0xff followed by the value as uint64_t\n//\n// Note: BitcoinQT later added VarInt which is different, more compact format\n// used in block storage. VarInt is not a part of the protocol and is not implemented here.\n\n// Attempts to read integer from data and returns amount of bytes read.\n// In case of error, returns 0.\n+ (NSUInteger) readVarInt:(uint64_t*)valueOut fromData:(NSData*)data;\n+ (NSUInteger) readVarInt:(uint64_t*)valueOut fromStream:(NSInputStream*)stream;\n\n// Attempts to read string prepended by its length in varInt format.\n// On success, returns data. On failure, returns nil.\n// lengthOut is an optional out parameter that contains total bytes read (including the length prefix)\n+ (NSData*) readVarStringFromData:(NSData*)data;\n+ (NSData*) readVarStringFromData:(NSData*)data readBytes:(NSUInteger*)lengthOut;\n+ (NSData*) readVarStringFromStream:(NSInputStream*)stream;\n\n// Encodes value in a varint binary form.\n+ (NSData*) dataForVarInt:(uint64_t)value;\n\n// Prepends binary string with its length in varInt format.\n+ (NSData*) dataForVarString:(NSData*)binaryString;\n\n@end\n\n"
  },
  {
    "path": "Pods/CoreBitcoin/CoreBitcoin/BTCProtocolSerialization.m",
    "content": "// Oleg Andreev <oleganza@gmail.com>\n\n#import \"BTCProtocolSerialization.h\"\n\n@implementation BTCProtocolSerialization\n\n\n// varInt here refers to CompactSize in Satoshi code.\n// BitcoinQT later added CVarInt which is different, more compact format used in block storage.\n//  Value           Storage length     Format\n//  < 0xfd          1                  uint8_t\n// <= 0xffff        3                  0xfd followed by the value as uint16_t\n// <= 0xffffffff    5                  0xfe followed by the value as uint32_t\n//  > 0xffffffff    9                  0xff followed by the value as uint64_t\n\n+ (NSUInteger) readVarInt:(uint64_t*)valueOut fromData:(NSData*)data {\n    NSUInteger dataLength = data.length;\n    if (dataLength == 0) return 0;\n    \n    unsigned char size = ((unsigned char*)data.bytes)[0];\n    \n    if (size < 0xfd) {\n        if (valueOut) *valueOut = size;\n        return 1;\n    } else if (size == 0xfd) {\n        if (dataLength < 3) return 0;\n        if (valueOut) *valueOut = OSReadLittleInt16(data.bytes, 1);\n        return 3;\n    } else if (size == 0xfe) {\n        if (dataLength < 5) return 0;\n        if (valueOut) *valueOut = OSReadLittleInt32(data.bytes, 1);\n        return 5;\n    } else {\n        if (dataLength < 9) return 0;\n        if (valueOut) *valueOut = OSReadLittleInt64(data.bytes, 1);\n        return 9;\n    }\n    return 0;\n}\n\n+ (NSUInteger) readVarInt:(uint64_t*)valueOut fromStream:(NSInputStream*)stream {\n    if (!stream) return 0;\n    \n    unsigned char size = 0;\n    NSInteger readSize = [stream read:&size maxLength:sizeof(size)];\n    \n    if (stream.streamStatus == NSStreamStatusClosed) return 0;\n    if (stream.streamStatus == NSStreamStatusNotOpen) return 0;\n    \n    if (readSize < (NSInteger)sizeof(size)) {\n        return 0;\n    }\n    \n    if (size < 0xfd) {\n        if (valueOut) *valueOut = size;\n        return 1;\n    } else if (size == 0xfd) {\n        uint16_t value = 0;\n        NSInteger readSize = [stream read:(uint8_t*)&value maxLength:sizeof(value)];\n        if (readSize < sizeof(value)) return 0;\n        if (valueOut) *valueOut = CFSwapInt16LittleToHost(value);\n        return 1 + sizeof(value);\n    } else if (size == 0xfe) {\n        uint32_t value = 0;\n        NSInteger readSize = [stream read:(uint8_t*)&value maxLength:sizeof(value)];\n        if (readSize < sizeof(value)) return 0;\n        if (valueOut) *valueOut = CFSwapInt32LittleToHost(value);\n        return 1 + sizeof(value);\n    } else {\n        uint64_t value = 0;\n        NSInteger readSize = [stream read:(uint8_t*)&value maxLength:sizeof(value)];\n        if (readSize < sizeof(value)) return 0;\n        if (valueOut) *valueOut = CFSwapInt64LittleToHost(value);\n        return 1 + sizeof(value);\n    }\n}\n\n+ (NSData*) readVarStringFromData:(NSData*)data {\n    return [self readVarStringFromData:data readBytes:NULL];\n}\n\n+ (NSData*) readVarStringFromData:(NSData*)data readBytes:(NSUInteger*)lengthOut {\n    uint64_t length = 0;\n    NSUInteger varIntLength = [self readVarInt:&length fromData:data];\n    if (varIntLength == 0) return nil;\n    \n    if (data.length < (varIntLength + length)) return nil;\n    \n    if (lengthOut) *lengthOut = varIntLength + (NSUInteger)length;\n    \n    return [data subdataWithRange:NSMakeRange(varIntLength, (NSUInteger)length)];\n}\n\n+ (NSData*) readVarStringFromStream:(NSInputStream*)stream {\n    uint64_t length = 0;\n    NSUInteger varIntLength = [self readVarInt:&length fromStream:stream];\n    if (varIntLength == 0) return nil;\n    \n    NSMutableData* data = [NSMutableData dataWithLength:(NSUInteger)length];\n    if (length > 0) {\n        [stream read:data.mutableBytes maxLength:(NSUInteger)length];\n    }\n    return data;\n}\n\n\n+ (NSData*) dataForVarInt:(uint64_t)value\n{\n    if (value < 0xfd) {\n        unsigned char size = value;\n        return [NSData dataWithBytes:&size length:sizeof(size)];\n    } else if (value <= 0xffff) {\n        unsigned char size = 0xfd;\n        uint16_t compactValue = CFSwapInt16HostToLittle((uint16_t)value);\n        NSMutableData* data = [NSMutableData dataWithLength:1 + sizeof(compactValue)];\n        [data replaceBytesInRange:NSMakeRange(0, 1) withBytes:&size];\n        [data replaceBytesInRange:NSMakeRange(1, sizeof(compactValue)) withBytes:&compactValue];\n        return data;\n    } else if (value <= 0xffffffffUL) {\n        unsigned char size = 0xfe;\n        uint32_t compactValue = CFSwapInt32HostToLittle((uint32_t)value);\n        NSMutableData* data = [NSMutableData dataWithLength:1 + sizeof(compactValue)];\n        [data replaceBytesInRange:NSMakeRange(0, 1) withBytes:&size];\n        [data replaceBytesInRange:NSMakeRange(1, sizeof(compactValue)) withBytes:&compactValue];\n        return data;\n    } else {\n        unsigned char size = 0xff;\n        uint64_t compactValue = CFSwapInt64HostToLittle(value);\n        NSMutableData* data = [NSMutableData dataWithLength:1 + sizeof(compactValue)];\n        [data replaceBytesInRange:NSMakeRange(0, 1) withBytes:&size];\n        [data replaceBytesInRange:NSMakeRange(1, sizeof(compactValue)) withBytes:&compactValue];\n        return data;\n    }\n}\n\n// Prepends binary string with its length in varInt format.\n+ (NSData*) dataForVarString:(NSData*)binaryString {\n    if (!binaryString) return nil;\n    \n    NSMutableData* data = [[self dataForVarInt:binaryString.length] mutableCopy];\n    [data appendData:binaryString];\n    return data;\n}\n\n\n@end\n\n"
  },
  {
    "path": "Pods/CoreBitcoin/CoreBitcoin/BTCQRCode.h",
    "content": "// CoreBitcoin by Oleg Andreev <oleganza@gmail.com>, WTFPL.\n\n#import <Foundation/Foundation.h>\n#if TARGET_OS_IPHONE\n#import <UIKit/UIKit.h>\n#endif\n\n@interface BTCQRCode : NSObject\n\n#if TARGET_OS_IPHONE\n/*!\n * Returns a QR code image with a given size.\n * The `string` is typically a bitcoin address in Base58Check format.\n */\n+ (UIImage*) imageForString:(NSString*)string size:(CGSize)size scale:(CGFloat)scale;\n\n/*!\n * Returns a QR code image with a given size.\n * The `url` is typically a bitcoin payment request \"bitcoin:<address>?amount=...\"\n */\n+ (UIImage*) imageForURL:(NSURL*)url size:(CGSize)size scale:(CGFloat)scale;\n\n/*!\n * Returns a scanning view and retains a detection block.\n *\n * Block is called for every QR code detected. To stop recognition, remove view from the window.\n *\n * Block is released when view is removed from window.\n */\n+ (UIView*) scannerViewWithBlock:(void(^)(NSString* message))detectionBlock;\n\n#endif\n\n@end\n"
  },
  {
    "path": "Pods/CoreBitcoin/CoreBitcoin/BTCQRCode.m",
    "content": "#import \"BTCQRCode.h\"\n#import <AVFoundation/AVFoundation.h>\n\n#if TARGET_OS_IPHONE\n@interface BTCQRCodeScannerView : UIView <AVCaptureMetadataOutputObjectsDelegate>\n@property (nonatomic, strong) void(^detectionBlock)(NSString* message);\n@property (nonatomic, strong) AVCaptureSession *session;\n@property (nonatomic, strong) AVCaptureVideoPreviewLayer *previewLayer;\n@property (nonatomic, strong) dispatch_queue_t sessionQueue;\n- (id) initWithDetectionBlock:(void(^)(NSString* message))detectionBlock;\n@end\n#endif\n\n@implementation BTCQRCode\n\n#if TARGET_OS_IPHONE\n+ (UIImage*) imageForURL:(NSURL*)url size:(CGSize)size scale:(CGFloat)scale {\n    return [self imageForString:url.absoluteString size:size scale:scale];\n}\n\n+ (UIImage*) imageForString:(NSString*)string size:(CGSize)size scale:(CGFloat)scale {\n    CIFilter *filter = [CIFilter filterWithName:@\"CIQRCodeGenerator\"];\n\n    [filter setValue:[string dataUsingEncoding:NSISOLatin1StringEncoding] forKey:@\"inputMessage\"];\n    [filter setValue:@\"L\" forKey:@\"inputCorrectionLevel\"];\n\n    UIGraphicsBeginImageContextWithOptions(size, NO, scale);\n\n    CGContextRef context = UIGraphicsGetCurrentContext();\n    CGImageRef cgimage = [[CIContext contextWithOptions:nil] createCGImage:filter.outputImage\n                                                              fromRect:filter.outputImage.extent];\n\n    UIImage* image = nil;\n    if (context) {\n        CGContextSetInterpolationQuality(context, kCGInterpolationNone);\n        CGContextDrawImage(context, CGContextGetClipBoundingBox(context), cgimage);\n        image = [UIImage imageWithCGImage:UIGraphicsGetImageFromCurrentImageContext().CGImage\n                                                scale:scale\n                                          orientation:UIImageOrientationDownMirrored];\n    }\n\n    UIGraphicsEndImageContext();\n    CGImageRelease(cgimage);\n\n    return image;\n}\n\n+ (UIView*) scannerViewWithBlock:(void(^)(NSString* message))detectionBlock {\n    return [[BTCQRCodeScannerView alloc] initWithDetectionBlock:detectionBlock];\n}\n#endif\n\n@end\n\n\n\n#if TARGET_OS_IPHONE\n@implementation BTCQRCodeScannerView\n\n- (id) initWithDetectionBlock:(void(^)(NSString* message))detection {\n    if (self = [super initWithFrame:[UIScreen mainScreen].bounds]) {\n        self.sessionQueue = dispatch_queue_create(\"BTCQRCodeScannerView\", NULL);\n        self.detectionBlock = detection;\n        self.backgroundColor = [UIColor colorWithWhite:0.2 alpha:0.8];\n    }\n    return self;\n}\n\n- (void) cleanup {\n    [self.session removeOutput:self.session.outputs.firstObject];\n    self.sessionQueue = nil;\n    self.detectionBlock = nil;\n    self.session = nil;\n}\n\n- (void) didMoveToWindow {\n    [super didMoveToWindow];\n\n    if (!self.sessionQueue) return;\n\n    if (self.window) {\n        [self prepareScanner];\n    } else {\n        [self cleanup];\n    }\n}\n\n- (void) prepareScanner {\n    NSError *error = nil;\n    AVCaptureDevice *device = [AVCaptureDevice defaultDeviceWithMediaType:AVMediaTypeVideo];\n    AVCaptureDeviceInput *input = [AVCaptureDeviceInput deviceInputWithDevice:device error:&error];\n    AVCaptureMetadataOutput *output = [AVCaptureMetadataOutput new];\n\n    if (!input) {\n        NSLog(@\"BTCQRCodeScannerView: Failed to instantiate a video device: %@\", [error localizedDescription]);\n        return;\n    }\n\n    if ([device lockForConfiguration:&error]) {\n        if (device.isAutoFocusRangeRestrictionSupported) {\n            device.autoFocusRangeRestriction = AVCaptureAutoFocusRangeRestrictionNear;\n        }\n\n        if ([device isFocusModeSupported:AVCaptureFocusModeContinuousAutoFocus]) {\n            device.focusMode = AVCaptureFocusModeContinuousAutoFocus;\n        }\n\n        [device unlockForConfiguration];\n    } else {\n        NSLog(@\"BTCQRCodeScannerView: Failed to lock device for configuration: %@\", [error localizedDescription]);\n    }\n\n    self.session = [AVCaptureSession new];\n\n    if (input) [self.session addInput:input];\n\n    [self.session addOutput:output];\n    [output setMetadataObjectsDelegate:self queue:dispatch_get_main_queue()];\n\n    if ([output.availableMetadataObjectTypes containsObject:AVMetadataObjectTypeQRCode]) {\n        output.metadataObjectTypes = @[ AVMetadataObjectTypeQRCode ];\n    } else {\n        NSLog(@\"BTCQRCodeScannerView: QRCode not found in availableMetadataObjectTypes: %@\", output.availableMetadataObjectTypes);\n        [self cleanup];\n        return;\n    }\n\n    self.previewLayer = [[AVCaptureVideoPreviewLayer alloc] initWithSession:self.session];\n    self.previewLayer.videoGravity = AVLayerVideoGravityResizeAspectFill;\n    self.previewLayer.frame = self.layer.bounds;\n    [self.layer addSublayer:self.previewLayer];\n\n    dispatch_async(self.sessionQueue, ^{\n        [self.session startRunning];\n    });\n}\n\n- (void) layoutSubviews\n{\n    [super layoutSubviews];\n    self.previewLayer.frame = self.layer.bounds;\n}\n\n- (void)captureOutput:(AVCaptureOutput *)captureOutput didOutputMetadataObjects:(NSArray *)metadataObjects fromConnection:(AVCaptureConnection *)connection\n{\n    for (AVMetadataMachineReadableCodeObject *object in metadataObjects) {\n        // Take the first detected QR code.\n        if ([object.type isEqual:AVMetadataObjectTypeQRCode]) {\n            if (self.detectionBlock) self.detectionBlock(object.stringValue);\n\n            // Do not cleanup - the owner of this view will remove it from window if detection succeeded.\n\n            return;\n        }\n    }\n}\n\n@end\n#endif\n\n"
  },
  {
    "path": "Pods/CoreBitcoin/CoreBitcoin/BTCScript.h",
    "content": "// CoreBitcoin by Oleg Andreev <oleganza@gmail.com>, WTFPL.\n\n#import <Foundation/Foundation.h>\n#import \"BTCOpcode.h\"\n#import \"BTCSignatureHashType.h\"\n\ntypedef NS_ENUM(NSInteger, BTCScriptSimulationOptions) {\n    // Default is strict conservative simulation (uncompressed pubkeys, no P2SH interpretation)\n    BTCScriptSimulationDefault = 0,\n\n    // Use compressed pubkeys instead of uncompressed ones.\n    BTCScriptSimulationCompressedPublicKeys = 1 << 0,\n\n    // Instead of failing on P2SH, assume it is 2-of-3 multisig (the most popular one).\n    BTCScriptSimulationMultisigP2SH = 1 << 1,\n};\n\n@class BTCAddress;\n@class BTCScriptHashAddress;\n@class BTCScriptHashAddressTestnet;\n@interface BTCScriptChunk : NSObject\n\n// Return YES if it is not a pushdata chunk, that is a single byte opcode without data.\n// -data returns nil when the value is YES.\n@property(nonatomic, readonly) BOOL isOpcode;\n\n// Opcode used in the chunk. Simply a first byte of its raw data.\n@property(nonatomic, readonly) BTCOpcode opcode;\n\n// Data being pushed. Returns nil if the opcode is not OP_PUSHDATA*.\n@property(nonatomic, readonly) NSData* pushdata;\n\n@end\n\n@interface BTCScript : NSObject<NSCopying>\n\n// Initialized an empty script.\n- (id) init;\n\n// Inits with binary data. If data is empty or nil, empty script is initialized.\n// If data is invalid script (e.g. a length prefix is not followed by matching amount of data), nil is returned.\n- (id) initWithData:(NSData*)data;\n\n// Inits with data in hex.\n- (id) initWithHex:(NSString*)hex;\n\n// Initializes script with space-separated hex-encoded commands and data.\n// If script is invalid, nil is returned.\n// Note: the string may be ambigious. You are safe if it does not have 3..5-byte data or integers.\n- (id) initWithString:(NSString*)string;\n\n// Standard script redeeming to a pubkey hash (OP_DUP OP_HASH160 <addr> OP_EQUALVERIFY OP_CHECKSIG)\n// or a P2SH address (OP_HASH160 <20-byte hash> OP_EQUAL).\n- (id) initWithAddress:(BTCAddress*)address;\n\n// Initializes a multisignature script \"OP_<M> <pubkey1> ... <pubkeyN> OP_<N> OP_CHECKMULTISIG\"\n// N must be >= M, M and N should be from 1 to 16.\n// If you need a more customized transaction with OP_CHECKMULTISIG, create it using other methods.\n// publicKeys is an array of NSData objects.\n- (id) initWithPublicKeys:(NSArray*)publicKeys signaturesRequired:(NSUInteger)signaturesRequired;\n\n\n// Binary representation\n@property(nonatomic, readonly) NSData* data;\n\n// Hex representation\n@property(nonatomic, readonly) NSString* hex;\n\n// Space-separated hex-encoded commands and data.\n// Small integers (data fitting in 4 bytes) incuding OP_<N> are represented with decimal digits.\n// Other opcodes are represented with their names.\n// Other data is hex-encoded.\n// This representation is inherently ambiguous, so don't use it for anything serious.\n@property(nonatomic, readonly) NSString* string;\n\n// List of parsed chunks of the script (BTCScriptChunk)\n@property(nonatomic, readonly) NSArray* scriptChunks;\n\n// Returns YES if the script is considered standard and can be relayed and mined normally by enough nodes.\n// Non-standard scripts are still valid if appear in blocks, but default nodes and miners will reject them.\n// Some miners do mine non-standard transactions, so it's just a matter of the higher delay.\n// Today standard = isPublicKey || isHash160 || isP2SH || isStandardMultisig\n@property(nonatomic, readonly) BOOL isStandard;\n\n// Returns YES if the script is \"<pubkey> OP_CHECKSIG\".\n// This is old-style script mostly replaced by a more compact \"Hash160\" one.\n// It is used for \"send to IP\" transactions. You connect to an IP address, receive\n// a pubkey and send money to this key. However, this method is almost never used for security reasons.\n@property(nonatomic, readonly) BOOL isPublicKeyScript;\n\n// Deprecated. Use -isPayToPublicKeyHashScript instead.\n@property(nonatomic, readonly) BOOL isHash160Script DEPRECATED_ATTRIBUTE;\n\n// Returns YES if the script is \"OP_DUP OP_HASH160 <20-byte hash> OP_EQUALVERIFY OP_CHECKSIG\" (aka P2PKH)\n// This is the most popular type that is used to pay to \"addresses\" (e.g. 1CBtcGivXmHQ8ZqdPgeMfcpQNJrqTrSAcG).\n@property(nonatomic, readonly) BOOL isPayToPublicKeyHashScript;\n\n// Returns YES if the script is \"OP_HASH160 <20-byte hash> OP_EQUAL\" (aka P2SH)\n// This is later added script type that allows sender not to worry about complex redemption scripts (and not pay tx fees).\n// Recipient must provide a serialized script which matches the hash to redeem the output.\n// P2SH base58-encoded addresses start with \"3\" (e.g. \"3NukJ6fYZJ5Kk8bPjycAnruZkE5Q7UW7i8\").\n@property(nonatomic, readonly) BOOL isPayToScriptHashScript;\n\n// Returns YES if the script is \"<M> <pubkey1> ... <pubkeyN> <N> OP_CHECKMULTISIG\" where N is up to 3.\n// Scripts with up to 3 signatures are considered standard and relayed quickly, but you can create more complex ones.\n@property(nonatomic, readonly) BOOL isStandardMultisignatureScript;\n\n// Returns YES if the script is \"<M> <pubkey1> ... <pubkeyN> <N> OP_CHECKMULTISIG\" with any valid N or M.\n@property(nonatomic, readonly) BOOL isMultisignatureScript;\n\n// Returns YES if the script consists of push data operations only (including OP_<N>). Aka isPushOnly in BitcoinQT.\n// Used in BIP16 (P2SH).\n@property(nonatomic, readonly) BOOL isDataOnly;\n\n// Enumerates all available operations.\n//   opIndex - index of the current operation: 0..(N-1) where N is number of ops.\n//   opcode - an opcode or OP_INVALIDOPCODE if pushdata is not nil.\n//   pushdata - data to push. If the operation is OP_PUSHDATA<1,2,4> or OP_<N>, then this will contain data to push (opcode will be OP_INVALIDOPCODE and should be ignored)\n//   stop - if set to YES, stops iterating.\n- (void) enumerateOperations:(void(^)(NSUInteger opIndex, BTCOpcode opcode, NSData* pushdata, BOOL* stop))block;\n\n// Returns BTCPublicKeyAddress or BTCScriptHashAddress if the script is a standard output script for these addresses.\n// If the script is something different, returns nil.\n@property(nonatomic, readonly) BTCAddress* standardAddress;\n\n// Wraps the recipient into an output P2SH script (OP_HASH160 <20-byte hash of the recipient> OP_EQUAL).\n@property(nonatomic, readonly) BTCScript* scriptHashScript;\n\n// Returns BTCScriptHashAddress that hashes this script.\n// Equivalent to script.scriptHashScript.standardAddress or [BTCScriptHashAddress addressWithData:BTCHash160(script.data)]\n@property(nonatomic, readonly) BTCScriptHashAddress* scriptHashAddress;\n@property(nonatomic, readonly) BTCScriptHashAddressTestnet* scriptHashAddressTestnet;\n\n\n\n#pragma mark - Simulated Scripts\n\n\n// Returns a dummy script matching this script on the input with\n// the same size as an intended signature script.\n// Only a few standard script types are supported.\n// Returns nil if could not determine a matching script.\n- (BTCScript*) simulatedSignatureScriptWithOptions:(BTCScriptSimulationOptions)opts;\n\n// Returns a simulated signature without a hashtype byte.\n+ (NSData*) simulatedSignature;\n\n// Returns a simulated signature with a hashtype byte attached.\n+ (NSData*) simulatedSignatureWithHashType:(BTCSignatureHashType)hashtype;\n\n// Returns a dummy uncompressed pubkey (65 bytes).\n+ (NSData*) simulatedUncompressedPubkey;\n\n// Returns a dummy compressed pubkey (33 bytes).\n+ (NSData*) simulatedCompressedPubkey;\n\n// Returns a dummy script that simulates m-of-n multisig script\n+ (BTCScript*) simulatedMultisigScriptWithSignaturesCount:(NSInteger)m pubkeysCount:(NSInteger)n compressedPubkeys:(BOOL)compressedPubkeys;\n\n\n\n\n#pragma mark - Modification API\n\n\n// Adds an opcode to the script.\n// Returns self.\n- (BTCScript*) appendOpcode:(BTCOpcode)opcode;\n\n// Adds arbitrary data to the script. nil does nothing, empty data is allowed.\n// Returns self.\n- (BTCScript*) appendData:(NSData*)data;\n\n// Adds opcodes and data from another script.\n// If script is nil, does nothing.\n// Returns self.\n- (BTCScript*) appendScript:(BTCScript*)otherScript;\n\n// Removes pushdata chunks containing the specified data.\n// Returns self.\n- (BTCScript*) deleteOccurrencesOfData:(NSData*)data;\n\n// Removes chunks with an opcode.\n// Returns self.\n- (BTCScript*) deleteOccurrencesOfOpcode:(BTCOpcode)opcode;\n\n// Returns a sub-script from the specified index (inclusively).\n// Raises an exception if index is accessed out of bounds.\n// Returns an empty subscript if the index is of the last op.\n- (BTCScript*) subScriptFromIndex:(NSUInteger)index;\n\n// Returns a sub-script to the specified index (exclusively).\n// Raises an exception if index is accessed out of bounds.\n// Returns an empty subscript if the index is 0.\n- (BTCScript*) subScriptToIndex:(NSUInteger)index;\n\n// DEPRECATION WARNING: These methods were moved to BTCKey class.\n+ (BOOL) isCanonicalPublicKey:(NSData*)data error:(NSError**)errorOut DEPRECATED_ATTRIBUTE;\n+ (BOOL) isCanonicalSignature:(NSData*)data verifyEvenS:(BOOL)verifyEvenS error:(NSError**)errorOut DEPRECATED_ATTRIBUTE;\n\n\n@end\n"
  },
  {
    "path": "Pods/CoreBitcoin/CoreBitcoin/BTCScript.m",
    "content": "// Oleg Andreev <oleganza@gmail.com>\n\n#import \"BTCScript.h\"\n#import \"BTCAddress.h\"\n#import \"BTCBigNumber.h\"\n#import \"BTCErrors.h\"\n#import \"BTCData.h\"\n#import \"BTCKey.h\"\n\n\n@interface BTCScriptChunk ()\n\n// A range of scriptData represented by this chunk.\n@property(nonatomic) NSRange range;\n\n// Reference to the whole script binary data.\n@property(nonatomic) NSData* scriptData;\n\n// Portion of scriptData defined by range.\n@property(nonatomic, readonly) NSData* chunkData;\n\n// String representation of a chunk.\n// OP_1NEGATE, OP_0, OP_1..OP_16 are represented as a decimal number.\n// Most compactly represented pushdata chunks >= 128 bit is encoded as <hex string>\n// Smaller most compactly represented data is encoded as [<hex string>]\n// Non-compact pushdata (e.g. 75-byte string with PUSHDATA1) contain a decimal prefix denoting a length size before hex data in square brackets. Ex. \"1:[...]\", \"2:[...]\" or \"4:[...]\"\n// For both compat and non-compact pushdata chunks, if the data consists of all printable ASCII characters (0x20..0x7E), it is enclosed not in square brackets, but in single quotes as characters themselves. Non-compact string is prefixed with 1:, 2: or 4: like described above.\n- (NSString*) string;\n\n// Returns a chunk if parsed correctly or nil if it is invalid.\n+ (BTCScriptChunk*) parseChunkFromData:(NSData*)data offset:(NSUInteger)offset;\n\n// Returns encoded data with proper length prefix for a given raw pushdata.\n// If preferredLengthEncoding is -1, the most compact encoding is used. Other valid values: 0, 1, 2, 4.\n+ (NSData*) scriptDataForPushdata:(NSData*)data preferredLengthEncoding:(int)preferredLengthEncoding;\n\n@end\n\n\n@interface BTCScript ()\n@end\n\n@implementation BTCScript {\n    // An array of NSData objects (pushing data) or NSNumber objects (containing opcodes)\n    NSMutableArray* _chunks;\n    \n    // Cached serialized representations for -data and -string methods.\n    NSData* _data;\n    \n    NSString* _string;\n    \n    // Multisignature script attributes.\n    // If multisig script is not detected, both are NULL.\n    NSUInteger _multisigSignaturesRequired;\n    NSArray* _multisigPublicKeys;\n}\n\n- (id) init {\n    if (self = [super init]) {\n        _chunks = [NSMutableArray array];\n    }\n    return self;\n}\n\n- (id) initWithData:(NSData*)data {\n    if (self = [super init]) {\n        // It's important to keep around original data to correctly identify the size of the script for BTC_MAX_SCRIPT_SIZE check\n        // and to correctly calculate hash for the signature because in BitcoinQT scripts are not re-serialized/canonicalized.\n        _data = data ?: [NSData data];\n        _chunks = [self parseData:_data];\n        if (!_chunks) return nil;\n    }\n    return self;\n}\n\n- (id) initWithHex:(NSString*)hex {\n    return [self initWithData:BTCDataFromHex(hex)];\n}\n\n- (id) initWithString:(NSString*)string {\n    if (self = [super init]) {\n        _chunks = [self parseString:string ?: @\"\"];\n        if (!_chunks) return nil;\n    }\n    return self;\n}\n\n- (id) initWithAddress:(BTCAddress*)address {\n    // Make sure we use a public address (WIF privkey is converted to usual P2PKH address).\n    address = [address publicAddress];\n\n    if ([address isKindOfClass:[BTCPublicKeyAddress class]]) {\n        // OP_DUP OP_HASH160 <hash> OP_EQUALVERIFY OP_CHECKSIG\n        NSMutableData* resultData = [NSMutableData data];\n        \n        BTCOpcode prefix[] = {OP_DUP, OP_HASH160};\n        [resultData appendBytes:prefix length:sizeof(prefix)];\n        \n        unsigned char length = address.data.length;\n        [resultData appendBytes:&length length:sizeof(length)];\n        \n        [resultData appendData:address.data];\n        \n        BTCOpcode suffix[] = {OP_EQUALVERIFY, OP_CHECKSIG};\n        [resultData appendBytes:suffix length:sizeof(suffix)];\n        \n        return [self initWithData:resultData];\n    } else if ([address isKindOfClass:[BTCScriptHashAddress class]]) {\n        // OP_HASH160 <hash> OP_EQUAL\n        NSMutableData* resultData = [NSMutableData data];\n        \n        BTCOpcode prefix[] = {OP_HASH160};\n        [resultData appendBytes:prefix length:sizeof(prefix)];\n        \n        unsigned char length = address.data.length;\n        [resultData appendBytes:&length length:sizeof(length)];\n        \n        [resultData appendData:address.data];\n        \n        BTCOpcode suffix[] = {OP_EQUAL};\n        [resultData appendBytes:suffix length:sizeof(suffix)];\n        \n        return [self initWithData:resultData];\n    } else {\n        return nil;\n    }\n}\n\n// OP_<M> <pubkey1> ... <pubkeyN> OP_<N> OP_CHECKMULTISIG\n- (id) initWithPublicKeys:(NSArray*)publicKeys signaturesRequired:(NSUInteger)signaturesRequired {\n    // First make sure the arguments make sense.\n    \n    // We need at least one signature\n    if (signaturesRequired == 0) return nil;\n    \n    // And we cannot have more signatures than available pubkeys.\n    if (signaturesRequired > publicKeys.count) return nil;\n    \n    // Both M and N should map to OP_<1..16>\n    BTCOpcode m_opcode = BTCOpcodeForSmallInteger(signaturesRequired);\n    BTCOpcode n_opcode = BTCOpcodeForSmallInteger(publicKeys.count);\n    if (m_opcode == OP_INVALIDOPCODE) return nil;\n    if (n_opcode == OP_INVALIDOPCODE) return nil;\n    \n    // Every pubkey should be present.\n    for (NSData* pkdata in publicKeys) {\n        if (![pkdata isKindOfClass:[NSData class]] || pkdata.length == 0) return nil;\n    }\n    \n    NSMutableData* data = [NSMutableData data];\n    \n    [data appendBytes:&m_opcode length:sizeof(m_opcode)];\n    \n    for (NSData* pubkey in publicKeys) {\n        NSData* d = [BTCScriptChunk scriptDataForPushdata:pubkey preferredLengthEncoding:-1];\n        \n        if (d.length == 0) return nil; // invalid data\n        \n        [data appendData:d];\n    }\n    \n    [data appendBytes:&n_opcode length:sizeof(n_opcode)];\n    \n    BTCOpcode checkmultisig_opcode = OP_CHECKMULTISIG;\n    [data appendBytes:&checkmultisig_opcode length:sizeof(checkmultisig_opcode)];\n    \n    if (self = [self initWithData:data]) {\n        _multisigSignaturesRequired = signaturesRequired;\n        _multisigPublicKeys = publicKeys;\n    }\n    return self;\n}\n\n- (NSData*) data {\n    if (!_data) {\n        // When we calculate data from scratch, it's important to respect actual offsets in the chunks as they may have been copied or shifted in subScript* methods.\n        NSMutableData* md = [NSMutableData data];\n        for (BTCScriptChunk* chunk in _chunks) {\n            [md appendData:chunk.chunkData];\n        }\n        _data = md;\n    }\n    return _data;\n}\n\n- (NSString*) hex {\n    return BTCHexFromData(self.data);\n}\n\n- (NSString*) string {\n    if (!_string) {\n        NSMutableArray* buffer = [NSMutableArray array];\n        \n        for (BTCScriptChunk* chunk in _chunks) {\n            [buffer addObject:[chunk string]];\n        }\n        \n        _string = [buffer componentsJoinedByString:@\" \"];\n    }\n    return _string;\n}\n\n- (NSMutableArray*) parseData:(NSData*)data {\n    if (data.length == 0) return [NSMutableArray array];\n    \n    NSMutableArray* chunks = [NSMutableArray array];\n    \n    int i = 0;\n    int length = (int)data.length;\n    \n    while (i < length) {\n        BTCScriptChunk* chunk = [BTCScriptChunk parseChunkFromData:data offset:i];\n        \n        // Exit if failed to parse\n        if (!chunk) return nil;\n        \n        [chunks addObject:chunk];\n        \n        i += chunk.range.length;\n    }\n    return chunks;\n}\n\n- (NSMutableArray*) parseString:(NSString*)string {\n    if (string.length == 0) return [NSMutableArray array];\n    \n    // Accumulated data to which chunks are referring to.\n    NSMutableData* scriptData = [NSMutableData data];\n    \n    NSScanner* scanner = [NSScanner scannerWithString:string];\n    NSCharacterSet* whitespaceSet = [NSCharacterSet whitespaceAndNewlineCharacterSet];\n    while (![scanner isAtEnd]) {\n        [scanner scanCharactersFromSet:whitespaceSet intoString:NULL];\n        \n        if ([scanner isAtEnd]) break;\n        \n        // First detect 1:, 2: and 4: prefixes before pushdata (quoted, hex or in square brackets)\n        // encoding = 0 - most compact encoding for the given data\n        // encoding = 1 - 1-byte length prefix\n        // encoding = 2 - 2-byte length prefix\n        // encoding = 4 - 4-byte length prefix\n        int lengthEncoding = -1; // -1 means \"use the most compact one\".\n        BOOL mustBePushdata = NO;\n        \n        if ([scanner scanString:@\"0:\" intoString:NULL]) { // just for extra consistency, detect 0: as well (although, it's pointless to use it for real)\n            lengthEncoding = 0;\n            mustBePushdata = YES;\n        } else if ([scanner scanString:@\"1:\" intoString:NULL]) {\n            lengthEncoding = 1;\n            mustBePushdata = YES;\n        } else if ([scanner scanString:@\"2:\" intoString:NULL]) {\n            lengthEncoding = 2;\n            mustBePushdata = YES;\n        } else if ([scanner scanString:@\"4:\" intoString:NULL]) {\n            lengthEncoding = 4;\n            mustBePushdata = YES;\n        }\n        \n        // The text could be:\n        // 1. Single-quoted UTF8 string. (BitcoinQT unit tests style)\n        // 2. Arbitrary pushdata in square brackets (bitcoinj style)\n        // 3. Raw binary in hex (starts with 0x) (BitcoinQT unit tests style)\n        // 4. Opcode with and without OP_ prefix\n        // 5. Small integer\n        // 6. Big pushdata in hex\n        \n        \n        NSData* pushdata = nil;\n        NSString* word = nil;\n        \n        // 1. Detect an ASCII string in single quotes.\n        if ([scanner scanString:@\"'\" intoString:NULL]) {\n            NSMutableString* buffer = [NSMutableString string];\n            \n            while (1) {\n                NSString* portion = @\"\";\n                if ([scanner scanUpToCharactersFromSet:[NSCharacterSet characterSetWithCharactersInString:@\"\\\\'\"] intoString:&portion]) {\n                    [buffer appendString:portion];\n                }\n                \n                if ([scanner isAtEnd]) return nil; // if finished it means the string is not terminated properly\n                \n                // For simplicity, we do not support all imaginable escape sequences like in C or JavaScript (especially unicode ones).\n                // This parser will be happy to read UTF8 characters, but we do not support writing UTF8 characters in a form of single-quoted string.\n                // For unsupported characters use hex notation, not ASCII one.\n                // Backslash not in front of another backslash or single quote is a syntax error.\n                if ([scanner scanString:@\"\\\\\" intoString:NULL]) {\n                    // Escape sequence before either quote «'» or backslash «\\\\»\n                    if ([scanner scanString:@\"\\\\\" intoString:NULL]) { // escaped backslash\n                        [buffer appendString:@\"\\\\\"];\n                        continue;\n                    } else if ([scanner scanString:@\"'\" intoString:NULL]) {\n                        [buffer appendString:@\"'\"];\n                        continue;\n                    }\n                    // Something unsupported is escaped - fail.\n                    return nil;\n                } else if ([scanner scanString:@\"'\" intoString:NULL]) {\n                    // String finished.\n                    break;\n                }\n                // Syntax failed.\n                return nil;\n            }\n            \n            pushdata = [buffer dataUsingEncoding:NSUTF8StringEncoding];\n        } else if ([scanner scanString:@\"[\" intoString:NULL]) {\n        // 2. Arbitrary hex pushdata in square brackets (bitcoinj style)\n            NSString* hexstring = nil;\n            if ([scanner scanUpToString:@\"]\" intoString:&hexstring]) {\n                // Check if hex string is valid.\n                NSData* data = BTCDataFromHex(hexstring);\n                \n                if (!data) return nil; // hex string is invalid\n                \n                if (![scanner scanString:@\"]\" intoString:NULL])\n                {\n                    return nil;\n                }\n                \n                pushdata = data;\n            } else {\n                return nil;\n            }\n        } else if ([scanner scanString:@\"0x\" intoString:NULL]) {\n            // 3. Raw binary in hex (starts with 0x) (BitcoinQT unit tests style)\n            if (mustBePushdata) return nil; // Should not prepend 0x... with pushdata length prefix.\n            \n            NSString* hexstring = nil;\n            if ([scanner scanUpToCharactersFromSet:whitespaceSet intoString:&hexstring]) {\n                NSData* data = BTCDataFromHex(hexstring);\n                \n                if (!data || data.length == 0) return nil; // hex string is invalid\n                \n                [scriptData appendData:data];\n                \n                // Move back to the beginning of the loop to scan another piece of script.\n                continue;\n            } else {\n                // Should have some data after 0x\n                return nil;\n            }\n        } else if ([scanner scanUpToCharactersFromSet:whitespaceSet intoString:&word]) {\n        // Find one of these:\n        // 4. Opcode with and without OP_ prefix\n        // 5. Small integer\n        // 6. Big pushdata in hex\n            // Attempt to find an opcode name or small integer only if we don't have pushdata prefix (1:, 2:, 4:)\n            // E.g. \"12\" is a small integer OP_12, but \"1:12\" is OP_PUSHDATA1 with data 0x12\n            if (!mustBePushdata) {\n                BTCOpcode opcode = BTCOpcodeForName(word);\n                \n                // Opcode may be used without OP_ prefix.\n                if (opcode == OP_INVALIDOPCODE) opcode = BTCOpcodeForName([@\"OP_\" stringByAppendingString:word]);\n\n                // 4. Opcode with and without OP_ prefix\n                if (opcode != OP_INVALIDOPCODE) {\n                    [scriptData appendBytes:&opcode length:sizeof(opcode)];\n                    continue;\n                } else {\n                    long long decimalInteger = [word longLongValue];\n                    \n                    if ([[NSString stringWithFormat:@\"%lld\", decimalInteger] isEqualToString:word]) {\n                        // 5.1. Small Integer\n                        if (decimalInteger >= -1 && decimalInteger <= 16) {\n                            opcode = BTCOpcodeForSmallInteger((NSUInteger)decimalInteger);\n                            \n                            if (opcode == OP_INVALIDOPCODE) {\n                                @throw [NSException exceptionWithName:@\"BTCScript parser inconsistency\"\n                                                               reason:@\"Tried to parse small integer into opcode, but the opcode comes out invalid.\" userInfo:nil];\n                            }\n                            \n                            [scriptData appendBytes:&opcode length:sizeof(opcode)];\n                            continue;\n                        } else {\n                            BTCBigNumber* bn = [[BTCBigNumber alloc] initWithInt64:decimalInteger];\n                            [scriptData appendData:[BTCScriptChunk scriptDataForPushdata:bn.signedLittleEndian preferredLengthEncoding:-1]];\n                            continue;\n                        }\n                    }\n                    \n                } // opcode or small integer\n            } // if (!mustBePushdata)\n            \n            \n            \n            // 6. Big pushdata in hex\n            \n            NSData* data = BTCDataFromHex(word);\n            \n            if (!data || data.length == 0) return nil; // hex string is invalid\n            \n            pushdata = data;\n            \n        } else {\n            // Why this should ever happen?\n            @throw [NSException exceptionWithName:@\"BTCScript parser inconsistency\"\n                                           reason:@\"Unhandled code path. Should figure out why this happens.\" userInfo:nil];\n\n        }\n        \n        \n        // If we need pushdata because 1:, 2:, 4: prefix was used, fail if we don't have it.\n        if (mustBePushdata && !pushdata) {\n            return nil;\n        }\n        \n        // If it was a pushdata, encode it.\n        if (pushdata) {\n            NSData* addedScriptData = [BTCScriptChunk scriptDataForPushdata:pushdata preferredLengthEncoding:lengthEncoding];\n            \n            if (!addedScriptData) {\n                // Invalid length prefix or data is too small or too big.\n                return nil;\n            }\n                        \n            [scriptData appendData:addedScriptData];\n        } else {\n            // Why this should ever happen?\n            @throw [NSException exceptionWithName:@\"BTCScript parser inconsistency\"\n                                           reason:@\"Unhandled code path. Should figure out why this happens.\" userInfo:nil];\n\n        }\n    } // loop over chunks\n    \n    \n    return [self parseData:scriptData];\n}\n\n\n- (BOOL) isStandard {\n    return [self isPayToPublicKeyHashScript]\n        || [self isPayToScriptHashScript]\n        || [self isPublicKeyScript]\n        || [self isStandardMultisignatureScript];\n}\n\n- (BOOL) isPublicKeyScript {\n    if (_chunks.count != 2) return NO;\n    return [self pushdataAtIndex:0].length > 1\n        && [self opcodeAtIndex:1] == OP_CHECKSIG;\n}\n\n- (BOOL) isHash160Script {\n    return [self isPayToPublicKeyHashScript];\n}\n\n- (BOOL) isPayToPublicKeyHashScript {\n    if (_chunks.count != 5) return NO;\n    \n    BTCScriptChunk* dataChunk = [self chunkAtIndex:2];\n    \n    return [self opcodeAtIndex:0] == OP_DUP\n        && [self opcodeAtIndex:1] == OP_HASH160\n        && !dataChunk.isOpcode\n        && dataChunk.range.length == 21\n        && [self opcodeAtIndex:3] == OP_EQUALVERIFY\n        && [self opcodeAtIndex:4] == OP_CHECKSIG;\n}\n\n- (BOOL) isPayToScriptHashScript {\n    // TODO: check against the original serialized form instead of parsed chunks because BIP16 defines\n    // P2SH script as an exact byte template. Scripts using OP_PUSHDATA1/2/4 are not valid P2SH scripts.\n    // To do that we have to maintain original script binary data and each chunk should keep a range in that data.\n    \n    if (_chunks.count != 3) return NO;\n    \n    BTCScriptChunk* dataChunk = [self chunkAtIndex:1];\n    \n    return [self opcodeAtIndex:0] == OP_HASH160\n        && !dataChunk.isOpcode\n        && dataChunk.range.length == 21          // this is enough to match the exact byte template, any other encoding will be larger.\n        && [self opcodeAtIndex:2] == OP_EQUAL;\n}\n\n// Returns YES if the script ends with P2SH check.\n// Not used in CoreBitcoin. Similar code is used in bitcoin-ruby. I don't know if we'll ever need it.\n- (BOOL) endsWithPayToScriptHash {\n    if (_chunks.count < 3) return NO;\n    \n    return [self opcodeAtIndex:-3] == OP_HASH160\n        && [self pushdataAtIndex:-2].length == 20\n        && [self opcodeAtIndex:-1] == OP_EQUAL;\n}\n\n- (BOOL) isStandardMultisignatureScript {\n    if (![self isMultisignatureScript]) return NO;\n    return _multisigPublicKeys.count <= 3;\n}\n\n- (BOOL) isMultisignatureScript {\n    if (_multisigSignaturesRequired == 0) {\n         [self detectMultisigScript];\n    }\n    return _multisigSignaturesRequired > 0;\n}\n\n// If typical multisig tx is detected, sets two ivars:\n// _multisigSignaturesRequired, _multisigPublicKeys.\n- (void) detectMultisigScript {\n    // multisig script must have at least 4 ops (\"OP_1 <pubkey> OP_1 OP_CHECKMULTISIG\")\n    if (_chunks.count < 4) return;\n    \n    // The last op is multisig check.\n    if ([self opcodeAtIndex:-1] != OP_CHECKMULTISIG) return;\n    \n    BTCOpcode m_opcode = [self opcodeAtIndex:0];\n    BTCOpcode n_opcode = [self opcodeAtIndex:-2];\n    \n    NSInteger m = BTCSmallIntegerFromOpcode(m_opcode);\n    NSInteger n = BTCSmallIntegerFromOpcode(n_opcode);\n    if (m <= 0 || m == NSIntegerMax) return;\n    if (n <= 0 || n == NSIntegerMax || n < m) return;\n    \n    // We must have correct number of pubkeys in the script. 3 extra ops: OP_<M>, OP_<N> and OP_CHECKMULTISIG\n    if (_chunks.count != (3 + n)) return;\n    \n    NSMutableArray* list = [NSMutableArray array];\n    for (int i = 1; i <= n; i++) {\n        NSData* data = [self pushdataAtIndex:i];\n        if (!data) return;\n        [list addObject:data];\n    }\n    \n    // Now we extracted all pubkeys and verified the numbers.\n    _multisigSignaturesRequired = m;\n    _multisigPublicKeys = list;\n}\n\n- (BOOL) isDataOnly {\n    // Include both PUSHDATA ops and OP_0..OP_16 literals.\n    for (BTCScriptChunk* chunk in _chunks) {\n        if (chunk.opcode > OP_16) {\n            return NO;\n        }\n    }\n    return YES;\n}\n\n- (NSArray*) scriptChunks {\n    return [_chunks copy];\n}\n\n- (void) enumerateOperations:(void(^)(NSUInteger opIndex, BTCOpcode opcode, NSData* pushdata, BOOL* stop))block {\n    if (!block) return;\n    \n    NSUInteger opIndex = 0;\n    for (BTCScriptChunk* chunk in _chunks) {\n        if (chunk.isOpcode) {\n            BTCOpcode opcode = chunk.opcode;\n            BOOL stop = NO;\n            block(opIndex, opcode, nil, &stop);\n            if (stop) return;\n        } else {\n            NSData* data = chunk.pushdata;\n            BOOL stop = NO;\n            block(opIndex, OP_INVALIDOPCODE, data, &stop);\n            if (stop) return;\n        }\n        opIndex++;\n    }\n}\n\n\n- (BTCAddress*) standardAddress {\n    if ([self isPayToPublicKeyHashScript]) {\n        if (_chunks.count != 5) return nil;\n        \n        BTCScriptChunk* dataChunk = [self chunkAtIndex:2];\n        \n        if (!dataChunk.isOpcode && dataChunk.range.length == 21) {\n            return [BTCPublicKeyAddress addressWithData:dataChunk.pushdata];\n        }\n    } else if ([self isPayToScriptHashScript]) {\n        if (_chunks.count != 3) return nil;\n        \n        BTCScriptChunk* dataChunk = [self chunkAtIndex:1];\n        \n        if (!dataChunk.isOpcode && dataChunk.range.length == 21) {\n            return [BTCScriptHashAddress addressWithData:dataChunk.pushdata];\n        }\n    }\n    return nil;\n}\n\n\n// Wraps the recipient into an output P2SH script (OP_HASH160 <20-byte hash of the recipient> OP_EQUAL).\n- (BTCScript*) scriptHashScript {\n    return [[BTCScript alloc] initWithAddress:[self scriptHashAddress]];\n}\n\n// Returns BTCScriptHashAddress that hashes this script.\n// Equivalent to [[script scriptHashScript] standardAddress] or [BTCScriptHashAddress addressWithData:BTCHash160(script.data)]\n- (BTCScriptHashAddress*) scriptHashAddress {\n    return [BTCScriptHashAddress addressWithData:BTCHash160(self.data)];\n}\n\n- (BTCScriptHashAddressTestnet*) scriptHashAddressTestnet {\n    return [BTCScriptHashAddressTestnet addressWithData:BTCHash160(self.data)];\n}\n\n\n\n\n#pragma mark - Simulation\n\n\n\n- (BTCScript*) simulatedSignatureScriptWithOptions:(BTCScriptSimulationOptions)opts {\n    if ([self isPayToPublicKeyHashScript]) {\n        BTCScript* script = [BTCScript new];\n        [script appendData:[BTCScript simulatedSignatureWithHashType:SIGHASH_ALL]];\n        [script appendData:(opts & BTCScriptSimulationCompressedPublicKeys) ? [BTCScript simulatedCompressedPubkey] : [BTCScript simulatedUncompressedPubkey]];\n        return script;\n    } else if ([self isPublicKeyScript]) {\n        return [[BTCScript new] appendData:[BTCScript simulatedSignatureWithHashType:SIGHASH_ALL]];\n    } else if ([self isPayToScriptHashScript]) {\n        // Check if allowed to simulate input for P2SH as 2-of-3 multisig.\n        if (opts & BTCScriptSimulationMultisigP2SH) {\n            // This is a wild approximation, but works well if most p2sh scripts are 2-of-3 multisig scripts.\n            BTCScript* script = [BTCScript new];\n            [script appendOpcode:OP_0];\n            [script appendData:[BTCScript simulatedSignatureWithHashType:SIGHASH_ALL]];\n            [script appendData:[BTCScript simulatedSignatureWithHashType:SIGHASH_ALL]];\n            [script appendData:[BTCScript simulatedMultisigScriptWithSignaturesCount:2 pubkeysCount:3\n                                          compressedPubkeys:(opts & BTCScriptSimulationCompressedPublicKeys)].data];\n            return script;\n        } else {\n            // Can't figure how to simulate signature script for P2SH as it can be anything.\n            return nil;\n        }\n    } else if ([self isMultisignatureScript]) {\n        BTCScript* script = [BTCScript new];\n        [script appendOpcode:OP_0];\n        for (NSInteger i = 0; i < _multisigSignaturesRequired; i++) {\n            [script appendData:[BTCScript simulatedSignatureWithHashType:SIGHASH_ALL]];\n        }\n        return script;\n    }\n\n    // Any other type of script is not supported yet.\n    // However, it'd be fun to simulate those based on reverse-playback of the script opcodes.\n    return nil;\n}\n\n// Returns a simulated signature without a hashtype byte.\n+ (NSData*) simulatedSignature {\n    // \"\\x30\" + \"\\xff\"*71\n    NSMutableData* sig = [NSMutableData dataWithLength:1 + 71];\n    memset(sig.mutableBytes, 0x30, 1);\n    memset(sig.mutableBytes + 1, 0xFF, 71);\n    return sig;\n}\n\n// Returns a simulated signature with a hashtype byte attached.\n+ (NSData*) simulatedSignatureWithHashType:(BTCSignatureHashType)hashtype {\n    // \"\\x30\" + \"\\xff\"*71 + encode_uint8(hashtype)\n    NSMutableData* sig = [NSMutableData dataWithLength:1 + 71 + 1];\n    memset(sig.mutableBytes, 0x30, 1);\n    memset(sig.mutableBytes + 1, 0xFF, 71);\n    memset(sig.mutableBytes + 1 + 71, hashtype, 1);\n    return sig;\n}\n\n// Returns a dummy uncompressed pubkey (65 bytes).\n+ (NSData*) simulatedUncompressedPubkey {\n    // \"\\x04\" + \"\\xff\"*64\n    NSMutableData* sig = [NSMutableData dataWithLength:1 + 64];\n    memset(sig.mutableBytes, 0x04, 1);\n    memset(sig.mutableBytes + 1, 0xFF, 64);\n    return sig;\n}\n\n// Returns a dummy compressed pubkey (33 bytes).\n+ (NSData*) simulatedCompressedPubkey {\n    // \"\\x02\" + \"\\xff\"*32\n    NSMutableData* sig = [NSMutableData dataWithLength:1 + 32];\n    memset(sig.mutableBytes, 0x02, 1);\n    memset(sig.mutableBytes + 1, 0xFF, 32);\n    return sig;\n}\n\n// Returns a dummy script that simulates m-of-n multisig script\n+ (BTCScript*) simulatedMultisigScriptWithSignaturesCount:(NSInteger)m pubkeysCount:(NSInteger)n compressedPubkeys:(BOOL)compressedPubkeys {\n    /*\n     Script.new <<\n     Opcode.opcode_for_small_integer(m) <<\n     [simulated_uncompressed_pubkey]*n  << # assuming non-compressed pubkeys to be conservative\n     Opcode.opcode_for_small_integer(n) <<\n     OP_CHECKMULTISIG\n     */\n    BTCScript* multisig = [BTCScript new];\n    [multisig appendOpcode:BTCOpcodeForSmallInteger(m)];\n    NSData* pubkey = compressedPubkeys ? [BTCScript simulatedCompressedPubkey] : [BTCScript simulatedUncompressedPubkey];\n    for (NSInteger i = 0; i < n; i++) {\n        [multisig appendData:pubkey];\n    }\n    [multisig appendOpcode:BTCOpcodeForSmallInteger(n)];\n    return multisig;\n}\n\n\n\n\n\n\n#pragma mark - Modification\n\n\n\n- (void) invalidateSerialization {\n    _data = nil;\n    _string = nil;\n    _multisigSignaturesRequired = 0;\n    _multisigPublicKeys = nil;\n}\n\n- (BTCScript*) appendOpcode:(BTCOpcode)opcode {\n    NSMutableData* scriptData = [self.data mutableCopy] ?: [NSMutableData data];\n    \n    [scriptData appendBytes:&opcode length:sizeof(opcode)];\n    \n    BTCScriptChunk* chunk = [[BTCScriptChunk alloc] init];\n    chunk.scriptData = scriptData;\n    chunk.range = NSMakeRange(scriptData.length - sizeof(opcode), sizeof(opcode));\n    [_chunks addObject:chunk];\n    \n    // Update reference to a new data for all chunks.\n    for (BTCScriptChunk* chunk in _chunks) chunk.scriptData = scriptData;\n    \n    [self invalidateSerialization];\n\n    return self;\n}\n\n- (BTCScript*) appendData:(NSData*)data {\n    if (data.length == 0) return self;\n    \n    NSMutableData* scriptData = [self.data mutableCopy] ?: [NSMutableData data];\n    \n    NSData* addedScriptData = [BTCScriptChunk scriptDataForPushdata:data preferredLengthEncoding:-1];\n    [scriptData appendData:addedScriptData];\n    \n    BTCScriptChunk* chunk = [[BTCScriptChunk alloc] init];\n    chunk.scriptData = scriptData;\n    chunk.range = NSMakeRange(scriptData.length - addedScriptData.length, addedScriptData.length);\n    [_chunks addObject:chunk];\n    \n    // Update reference to a new data for all chunks.\n    for (BTCScriptChunk* chunk in _chunks) chunk.scriptData = scriptData;\n    \n    [self invalidateSerialization];\n\n    return self;\n}\n\n- (BTCScript*) appendScript:(BTCScript*)otherScript {\n    if (!otherScript) return self;\n    \n    NSMutableData* scriptData = [self.data mutableCopy] ?: [NSMutableData data];\n    \n    NSInteger offset = scriptData.length;\n    \n    [scriptData appendData:otherScript.data];\n    \n    for (BTCScriptChunk* chunk in otherScript->_chunks) {\n        BTCScriptChunk* chunk2 = [[BTCScriptChunk alloc] init];\n        chunk2.range = NSMakeRange(chunk.range.location + offset, chunk.range.length);\n        chunk2.scriptData = scriptData;\n        [_chunks addObject:chunk2];\n    }\n\n    // Update reference to a new data for all chunks.\n    for (BTCScriptChunk* chunk in _chunks) chunk.scriptData = scriptData;\n\n    [self invalidateSerialization];\n\n    return self;\n}\n\n- (BTCScript*) deleteOccurrencesOfData:(NSData*)data {\n    if (data.length == 0) return self;\n    \n    NSMutableData* md = [NSMutableData data];\n    \n    for (BTCScriptChunk* chunk in _chunks) {\n        if (![chunk.pushdata isEqual:data]) {\n            [md appendData:chunk.chunkData];\n        }\n    }\n    \n    _chunks = [self parseData:md];\n\n    return self;\n}\n\n- (BTCScript*) deleteOccurrencesOfOpcode:(BTCOpcode)opcode {\n    NSMutableData* md = [NSMutableData data];\n    \n    for (BTCScriptChunk* chunk in _chunks) {\n        if (chunk.opcode != opcode) {\n            [md appendData:chunk.chunkData];\n        }\n    }\n    \n    _chunks = [self parseData:md];\n\n    return self;\n}\n\n\n\n- (BTCScript*) subScriptFromIndex:(NSUInteger)index {\n    NSMutableData* md = [NSMutableData data];\n    for (BTCScriptChunk* chunk in [_chunks subarrayWithRange:NSMakeRange(index, _chunks.count - index)]) {\n        [md appendData:chunk.chunkData];\n    }\n    return [[BTCScript alloc] initWithData:md];\n}\n\n- (BTCScript*) subScriptToIndex:(NSUInteger)index {\n    NSMutableData* md = [NSMutableData data];\n    for (BTCScriptChunk* chunk in [_chunks subarrayWithRange:NSMakeRange(0, index)]) {\n        [md appendData:chunk.chunkData];\n    }\n    return [[BTCScript alloc] initWithData:md];\n}\n\n\n\n- (id) copyWithZone:(NSZone *)zone {\n    return [[BTCScript alloc] initWithData:self.data];\n}\n\n- (NSString*) description {\n    return [NSString stringWithFormat:@\"<%@:0x%p \\\"%@\\\">\", [self class], self, self.string];\n}\n\n\n\n#pragma mark - Utility methods\n\n\n- (BTCScriptChunk*) chunkAtIndex:(NSInteger)index {\n    BTCScriptChunk* chunk = _chunks[index < 0 ? (_chunks.count + index) : index];\n    return chunk;\n}\n\n// Returns an opcode in a chunk.\n// If the chunk is data, not an opcode, returns OP_INVALIDOPCODE\n// Raises exception if index is out of bounds.\n- (BTCOpcode) opcodeAtIndex:(NSInteger)index {\n    BTCScriptChunk* chunk = _chunks[index < 0 ? (_chunks.count + index) : index];\n    \n    if (chunk.isOpcode) return chunk.opcode;\n    \n    // If the chunk is not actually an opcode, return invalid opcode.\n    return OP_INVALIDOPCODE;\n}\n\n// Returns NSData in a chunk.\n// If chunk is actually an opcode, returns nil.\n// Raises exception if index is out of bounds.\n- (NSData*) pushdataAtIndex:(NSInteger)index {\n    BTCScriptChunk* chunk = _chunks[index < 0 ? (_chunks.count + index) : index];\n    \n    if (chunk.isOpcode) return nil;\n    \n    return chunk.pushdata;\n}\n\n// Returns bignum from pushdata or nil.\n- (BTCBigNumber*) bignumberAtIndex:(NSInteger)index {\n    NSData* data = [self pushdataAtIndex:index];\n    if (!data) return nil;\n    BTCBigNumber* bn = [[BTCBigNumber alloc] initWithSignedLittleEndian:data];\n    return bn;\n}\n\n\n\n\n\n\n#pragma mark - Canonical checks (Deprecated methods - use BTCKey API)\n\n\n+ (BOOL) isCanonicalPublicKey:(NSData*)data error:(NSError**)errorOut {\n    return [BTCKey isCanonicalPublicKey:data error:errorOut];\n}\n\n+ (BOOL) isCanonicalSignature:(NSData*)data verifyEvenS:(BOOL)verifyEvenS error:(NSError**)errorOut {\n    return [BTCKey isCanonicalSignatureWithHashType:data verifyEvenS:verifyEvenS error:errorOut];\n}\n\n\n@end\n\n\n\n\n\n\n\n\n\n\n@implementation BTCScriptChunk {\n}\n\n- (BTCOpcode) opcode {\n    return (BTCOpcode)((const unsigned char*)_scriptData.bytes)[_range.location];\n}\n\n- (BOOL) isOpcode {\n    BTCOpcode opcode = [self opcode];\n    // Pushdata opcodes are not considered a single \"opcode\".\n    // Attention: OP_0 is also \"pushdata\" code that pushes empty data.\n    if (opcode <= OP_PUSHDATA4) return NO;\n    return YES;\n}\n\n- (NSData*) chunkData {\n    return [_scriptData subdataWithRange:_range];\n}\n\n// Data being pushed. Returns nil if the opcode is not OP_PUSHDATA*.\n- (NSData*) pushdata {\n    if (self.isOpcode) return nil;\n    BTCOpcode opcode = [self opcode];\n    NSUInteger loc = 1;\n    if (opcode == OP_PUSHDATA1) {\n        loc += 1;\n    } else if (opcode == OP_PUSHDATA2) {\n        loc += 2;\n    } else if (opcode == OP_PUSHDATA4) {\n        loc += 4;\n    }\n    return [_scriptData subdataWithRange:NSMakeRange(_range.location + loc, _range.length - loc)];\n}\n\n// Returns YES if the data is represented with the most compact opcode.\n- (BOOL) isDataCompact {\n    if (self.isOpcode) return NO;\n    BTCOpcode opcode = [self opcode];\n    NSData* data = [self pushdata];\n    if (opcode < OP_PUSHDATA1) return YES; // length fits in one byte under OP_PUSHDATA1.\n    if (opcode == OP_PUSHDATA1) return data.length >= OP_PUSHDATA1; // length should be less than OP_PUSHDATA1\n    if (opcode == OP_PUSHDATA2) return data.length > 0xff; // length should not fit in one byte\n    if (opcode == OP_PUSHDATA4) return data.length > 0xffff; // length should not fit in two bytes\n    return NO;\n}\n\n// String representation of a chunk.\n// OP_1NEGATE, OP_0, OP_1..OP_16 are represented as a decimal number.\n// Most compactly represented pushdata chunks >=128 bit are encoded as <hex string>\n// Smaller most compactly represented data is encoded as [<hex string>]\n// Non-compact pushdata (e.g. 75-byte string with PUSHDATA1) contains a decimal prefix denoting a length size before hex data in square brackets. Ex. \"1:[...]\", \"2:[...]\" or \"4:[...]\"\n// For both compat and non-compact pushdata chunks, if the data consists of all printable characters (0x20..0x7E), it is enclosed not in square brackets, but in single quotes as characters themselves. Non-compact string is prefixed with 1:, 2: or 4: like described above.\n\n// Some other guys (BitcoinQT, bitcoin-ruby) encode \"small enough\" integers in decimal numbers and do that differently.\n// BitcoinQT encodes any data less than 4 bytes as a decimal number.\n// bitcoin-ruby encodes 2..16 as decimals, 0 and -1 as opcode names and the rest is in hex.\n// Now no matter which encoding you use, it can be parsed incorrectly.\n// Also: pushdata operations are typically encoded in a raw data which can be encoded in binary differently.\n// This means, you'll never be able to parse a sane-looking script into only one binary.\n// So forget about relying on parsing this thing exactly. Typically, we either have very small numbers (0..16),\n// or very big numbers (hashes and pubkeys).\n\n- (NSString*) string {\n    BTCOpcode opcode = [self opcode];\n    \n    if (self.isOpcode) {\n        if (opcode == OP_0) return @\"OP_0\";\n        if (opcode == OP_1NEGATE) return @\"OP_1NEGATE\";\n        if (opcode >= OP_1 && opcode <= OP_16) {\n            return [NSString stringWithFormat:@\"OP_%u\", ((int)opcode + 1 - (int)OP_1)];\n        } else {\n            return BTCNameForOpcode(opcode);\n        }\n    } else {\n        NSData* data = [self pushdata];\n        \n        NSString* string = nil;\n        // Empty data is encoded as OP_0.\n        if (data.length == 0) {\n            string = @\"OP_0\";\n        } else if ([self isASCIIData:data]) {\n            string = [[NSString alloc] initWithData:data encoding:NSASCIIStringEncoding];\n            \n            // Escape escapes & single quote characters.\n            string = [string stringByReplacingOccurrencesOfString:@\"\\\\\" withString:@\"\\\\\\\\\"];\n            string = [string stringByReplacingOccurrencesOfString:@\"'\" withString:@\"\\\\'\"];\n            \n            // Wrap in single quotes. Why not double? Because they are already used in JSON and we don't want to multiply the mess.\n            string = [NSString stringWithFormat:@\"'%@'\", string];\n        } else {\n            string = BTCHexFromData(data);\n            \n            // Shorter than 128-bit chunks are wrapped in square brackets to avoid ambiguity with big all-decimal numbers.\n            if (data.length < 16) {\n                string = [NSString stringWithFormat:@\"[%@]\", string];\n            }\n        }\n        \n        // Non-compact data is prefixed with an appropriate length prefix.\n        if (![self isDataCompact]) {\n            int prefix = 1;\n            if (opcode == OP_PUSHDATA2) prefix = 2;\n            if (opcode == OP_PUSHDATA4) prefix = 4;\n            string = [NSString stringWithFormat:@\"%d:%@\", prefix, string];\n        }\n        return string;\n    }\n    \n    return nil;\n}\n\n- (BOOL) isASCIIData:(NSData*)data {\n    BOOL isASCII = YES;\n    for (int i = 0; i < data.length; i++) {\n        char ch = ((const char*)data.bytes)[i];\n        if (!(ch >= 0x20 && ch <= 0x7E)) {\n            isASCII = NO;\n            break;\n        }\n    }\n    return isASCII;\n}\n\n// If encoding is -1, then the most compact will be chosen.\n// Valid values: -1, 0, 1, 2, 4.\n// Returns nil if preferredLengthEncoding can't be used for data, or data is nil or too big.\n\n+ (NSData*) scriptDataForPushdata:(NSData*)data preferredLengthEncoding:(int)preferredLengthEncoding {\n    if (!data) return nil;\n    \n    NSMutableData* scriptData = [NSMutableData data];\n    \n    if (data.length < OP_PUSHDATA1 && preferredLengthEncoding <= 0) {\n        uint8_t len = data.length;\n        [scriptData appendBytes:&len length:sizeof(len)];\n        [scriptData appendData:data];\n    } else if (data.length <= 0xff && (preferredLengthEncoding == -1 || preferredLengthEncoding == 1)) {\n        uint8_t op = OP_PUSHDATA1;\n        uint8_t len = data.length;\n        [scriptData appendBytes:&op length:sizeof(op)];\n        [scriptData appendBytes:&len length:sizeof(len)];\n        [scriptData appendData:data];\n    } else if (data.length <= 0xffff && (preferredLengthEncoding == -1 || preferredLengthEncoding == 2)) {\n        uint8_t op = OP_PUSHDATA2;\n        uint16_t len = CFSwapInt16HostToLittle((uint16_t)data.length);\n        [scriptData appendBytes:&op length:sizeof(op)];\n        [scriptData appendBytes:&len length:sizeof(len)];\n        [scriptData appendData:data];\n    } else if ((unsigned long long)data.length <= 0xffffffffull && (preferredLengthEncoding == -1 || preferredLengthEncoding == 4)) {\n        uint8_t op = OP_PUSHDATA4;\n        uint32_t len = CFSwapInt32HostToLittle((uint32_t)data.length);\n        [scriptData appendBytes:&op length:sizeof(op)];\n        [scriptData appendBytes:&len length:sizeof(len)];\n        [scriptData appendData:data];\n    } else {\n        // Invalid preferredLength encoding or data size is too big.\n        return nil;\n    }\n    \n    return scriptData;\n}\n\n+ (BTCScriptChunk*) parseChunkFromData:(NSData*)scriptData offset:(NSUInteger)offset {\n    // Data should fit at least one opcode.\n    if (scriptData.length < (offset + 1)) return nil;\n    \n    const uint8_t* bytes = ((const uint8_t*)[scriptData bytes]);\n    BTCOpcode opcode = bytes[offset];\n    \n    if (opcode <= OP_PUSHDATA4) {\n        // push data opcode\n        int length = (int)scriptData.length;\n\n        BTCScriptChunk* chunk = [[BTCScriptChunk alloc] init];\n        chunk.scriptData = scriptData;\n        \n        if (opcode < OP_PUSHDATA1) {\n            uint8_t dataLength = opcode;\n            NSUInteger chunkLength = sizeof(opcode) + dataLength;\n            \n            if (offset + chunkLength > length) return nil;\n            \n            chunk.range = NSMakeRange(offset, chunkLength);\n        } else if (opcode == OP_PUSHDATA1) {\n            uint8_t dataLength;\n            \n            if (offset + sizeof(dataLength) > length) return nil;\n            \n            memcpy(&dataLength, bytes + offset + sizeof(opcode), sizeof(dataLength));\n\n            NSUInteger chunkLength = sizeof(opcode) + sizeof(dataLength) + dataLength;\n            \n            if (offset + chunkLength > length) return nil;\n            \n            chunk.range = NSMakeRange(offset, chunkLength);\n        } else if (opcode == OP_PUSHDATA2) {\n            uint16_t dataLength;\n            \n            if (offset + sizeof(dataLength) > length) return nil;\n            \n            memcpy(&dataLength, bytes + offset + sizeof(opcode), sizeof(dataLength));\n            dataLength = CFSwapInt16LittleToHost(dataLength);\n            \n            NSUInteger chunkLength = sizeof(opcode) + sizeof(dataLength) + dataLength;\n            \n            if (offset + chunkLength > length) return nil;\n            \n            chunk.range = NSMakeRange(offset, chunkLength);\n        } else if (opcode == OP_PUSHDATA4) {\n            uint32_t dataLength;\n            \n            if (offset + sizeof(dataLength) > length) return nil;\n            \n            memcpy(&dataLength, bytes + offset + sizeof(opcode), sizeof(dataLength));\n            dataLength = CFSwapInt16LittleToHost(dataLength);\n            \n            NSUInteger chunkLength = sizeof(opcode) + sizeof(dataLength) + dataLength;\n            \n            if (offset + chunkLength > length) return nil;\n            \n            chunk.range = NSMakeRange(offset, chunkLength);\n        }\n        \n        return chunk;\n    } else {\n        // simple opcode\n        BTCScriptChunk* chunk = [[BTCScriptChunk alloc] init];\n        chunk.scriptData = scriptData;\n        chunk.range = NSMakeRange(offset, sizeof(opcode));\n        return chunk;\n    }\n    return nil;\n}\n\n\n@end\n\n\n\n\n\n\n\n\n"
  },
  {
    "path": "Pods/CoreBitcoin/CoreBitcoin/BTCScriptMachine.h",
    "content": "// CoreBitcoin by Oleg Andreev <oleganza@gmail.com>, WTFPL.\n\n#import <Foundation/Foundation.h>\n\ntypedef NS_ENUM(NSUInteger, BTCScriptVerification) {\n    BTCScriptVerificationStrictEncoding = (1U << 1), // enforce strict conformance to DER and SEC2 for signatures and pubkeys (aka SCRIPT_VERIFY_STRICTENC)\n    BTCScriptVerificationEvenS          = (1U << 2), // enforce lower S values (below curve halforder) in signatures (aka SCRIPT_VERIFY_EVEN_S, depends on STRICTENC)\n};\n\n@class BTCScript;\n@class BTCTransaction;\n\n// ScriptMachine is a stack machine (like Forth) that evaluates a predicate\n// returning a bool indicating valid or not. There are no loops.\n// You can -copy a machine which will copy all the parameters and the stack state.\n@interface BTCScriptMachine : NSObject <NSCopying>\n\n// \"To\" transaction that is signed by an inputScript.\n// Required parameter.\n@property(nonatomic) BTCTransaction* transaction;\n\n// An index of the tx input in the `transaction`.\n// Required parameter.\n@property(nonatomic) uint32_t inputIndex;\n\n// Overrides inputScript from transaction.inputs[inputIndex].\n// Useful for testing, but useless if you need to test CHECKSIG operations. In latter case you still need a full transaction.\n@property(nonatomic) BTCScript* inputScript;\n\n// A timestamp of the current block. Default is current timestamp.\n// This is used to test for P2SH scripts or other changes in the protocol that may happen in the future.\n// If not specified, defaults to current timestamp thus using the latest protocol rules.\n@property(nonatomic) uint32_t blockTimestamp;\n\n// Flags affecting verification. Default is the most liberal verification.\n// One can be stricter to not relay transactions with non-canonical signatures and pubkey (as BitcoinQT does).\n// Defaults in CoreBitcoin: be liberal in what you accept and conservative in what you send.\n// So we try to create canonical purist transactions but have no problem accepting and working with non-canonical ones.\n@property(nonatomic) BTCScriptVerification verificationFlags;\n\n// Returns a copy of a stack in its current state. Mostly used for testing.\n@property(nonatomic, copy, readonly) NSArray* stack;\n\n// Returns a copy of an altstack in its current state. Mostly used for testing.\n@property(nonatomic, copy, readonly) NSArray* altstack;\n\n// This will return nil if the transaction is nil, or inputIndex is out of bounds.\n// You can use -init if you want to run scripts without signature verification (so no transaction is needed).\n- (id) initWithTransaction:(BTCTransaction*)tx inputIndex:(uint32_t)inputIndex;\n\n// Verifies input script taken from transaction's input at `inputIndex` and if it doesn't fail,\n// on the same stack verifies the output script.\n// Returns YES if both scripts did not fail and left boolean true as a top item on the stack.\n// If any transaction or outputScript is nil, or inputIndex is out of bounds, raises and exception.\n// In case of a normal failure, sets an error object.\n// Output script is a redemption script from a previous transaction output referenced by this transaction's input.\n// Leaves stack as is after execution.\n- (BOOL) verifyWithOutputScript:(BTCScript*)outputScript error:(NSError**)errorOut;\n\n// Runs the specified script and returns YES if it does not fail.\n// Does not require transaction and inputIndex unless it hits one of signature check opcodes.\n// Leaves stack as is after execution.\n// This function is a utility function to test scripts. It is used internally by -verifyWithOutputScript:error:\n- (BOOL) runScript:(BTCScript*)script error:(NSError**)errorOut;\n\n@end\n"
  },
  {
    "path": "Pods/CoreBitcoin/CoreBitcoin/BTCScriptMachine.m",
    "content": "// Oleg Andreev <oleganza@gmail.com>\n\n#import \"BTCScriptMachine.h\"\n#import \"BTCScript.h\"\n#import \"BTCOpcode.h\"\n#import \"BTCTransaction.h\"\n#import \"BTCTransactionInput.h\"\n#import \"BTCTransactionOutput.h\"\n#import \"BTCKey.h\"\n#import \"BTCBigNumber.h\"\n#import \"BTCErrors.h\"\n#import \"BTCUnitsAndLimits.h\"\n#import \"BTCData.h\"\n\n@interface BTCScriptMachine ()\n\n// Constants\n@property(nonatomic) NSData* blobFalse;\n@property(nonatomic) NSData* blobZero;\n@property(nonatomic) NSData* blobTrue;\n@property(nonatomic) BTCBigNumber* bigNumberZero;\n@property(nonatomic) BTCBigNumber* bigNumberOne;\n@property(nonatomic) BTCBigNumber* bigNumberFalse;\n@property(nonatomic) BTCBigNumber* bigNumberTrue;\n@end\n\n// We try to match BitcoinQT code as close as possible to avoid subtle incompatibilities.\n// The design might not look optimal to everyone, but I prefer to match the behaviour first, then document it well,\n// then refactor it with even more documentation for every subtle decision.\n// Think of an independent auditor who has to read several sources to check if they are compatible in every little\n// decision they make. Proper documentation and cross-references will help this guy a lot.\n@implementation BTCScriptMachine {\n    \n    // Stack contains NSData objects that are interpreted as numbers, bignums, booleans or raw data when needed.\n    NSMutableArray* _stack;\n    \n    // Used in ALTSTACK ops.\n    NSMutableArray* _altStack;\n    \n    // Holds an array of @YES and @NO values to keep track of if/else branches.\n    NSMutableArray* _conditionStack;\n    \n    // Currently executed script.\n    BTCScript* _script;\n    \n    // Current opcode.\n    BTCOpcode _opcode;\n    \n    // Current payload for any \"push data\" operation.\n    NSData* _pushdata;\n    \n    // Current opcode index in _script.\n    NSUInteger _opIndex;\n    \n    // Index of last OP_CODESEPARATOR\n    NSUInteger _lastCodeSeparatorIndex;\n    \n    // Keeps number of executed operations to check for limit.\n    NSInteger _opCount;\n}\n\n- (id) init {\n    if (self = [super init]) {\n        // Constants used in script execution.\n        _blobFalse = [NSData data];\n        _blobZero = _blobFalse;\n        uint8_t one = 1;\n        _blobTrue = [NSData dataWithBytes:(void*)&one length:1];\n        \n        _bigNumberZero = [[BTCBigNumber alloc] initWithInt32:0];\n        _bigNumberOne = [[BTCBigNumber alloc] initWithInt32:1];\n        _bigNumberFalse = _bigNumberZero;\n        _bigNumberTrue = _bigNumberOne;\n\n        _inputIndex = 0xFFFFFFFF;\n        _blockTimestamp = (uint32_t)[[NSDate date] timeIntervalSince1970];\n        [self resetStack];\n    }\n    return self;\n}\n\n- (void) resetStack {\n    _stack = [NSMutableArray array];\n    _altStack = [NSMutableArray array];\n    _conditionStack = [NSMutableArray array];\n}\n\n- (id) initWithTransaction:(BTCTransaction*)tx inputIndex:(uint32_t)inputIndex {\n    if (!tx) return nil;\n    // BitcoinQT would crash right before VerifyScript if the input index was out of bounds.\n    // So even though it returns 1 from SignatureHash() function when checking for this condition,\n    // it never actually happens. So we too will not check for it when calculating a hash.\n    if (inputIndex >= tx.inputs.count) return nil;\n    if (self = [self init]) {\n        _transaction = tx;\n        _inputIndex = inputIndex;\n    }\n    return self;\n}\n\n- (id) copyWithZone:(NSZone *)zone {\n    BTCScriptMachine* sm = [[BTCScriptMachine alloc] init];\n    sm.transaction = self.transaction;\n    sm.inputIndex = self.inputIndex;\n    sm.blockTimestamp = self.blockTimestamp;\n    sm.verificationFlags = self.verificationFlags;\n    sm->_stack = [_stack mutableCopy];\n    return sm;\n}\n\n- (BOOL) shouldVerifyP2SH {\n    return (_blockTimestamp >= BTC_BIP16_TIMESTAMP);\n}\n\n- (BOOL) verifyWithOutputScript:(BTCScript*)outputScript error:(NSError**)errorOut {\n    // self.inputScript allows to override transaction so we can simply testing.\n    BTCScript* inputScript = self.inputScript;\n    \n    if (!inputScript) {\n        // Sanity check: transaction and its input should be consistent.\n        if (!(self.transaction && self.inputIndex < self.transaction.inputs.count)) {\n            [NSException raise:@\"BTCScriptMachineException\"  format:@\"transaction and valid inputIndex are required for script verification.\"];\n            return NO;\n        }\n        if (!outputScript) {\n            [NSException raise:@\"BTCScriptMachineException\"  format:@\"non-nil outputScript is required for script verification.\"];\n            return NO;\n        }\n\n        BTCTransactionInput* txInput = self.transaction.inputs[self.inputIndex];\n        inputScript = txInput.signatureScript;\n    }\n    \n    // First step: run the input script which typically places signatures, pubkeys and other static data needed for outputScript.\n    if (![self runScript:inputScript error:errorOut]) {\n        // errorOut is set by runScript\n        return NO;\n    }\n    \n    // Make a copy of the stack if we have P2SH script.\n    // We will run deserialized P2SH script on this stack if other verifications succeed.\n    BOOL shouldVerifyP2SH = [self shouldVerifyP2SH] && outputScript.isPayToScriptHashScript;\n    NSMutableArray* stackForP2SH = shouldVerifyP2SH ? [_stack mutableCopy] : nil;\n    \n    // Second step: run output script to see that the input satisfies all conditions laid in the output script.\n    if (![self runScript:outputScript error:errorOut]) {\n        // errorOut is set by runScript\n        return NO;\n    }\n    \n    // We need to have something on stack\n    if (_stack.count == 0) {\n        if (errorOut) *errorOut = [self scriptError:NSLocalizedString(@\"Stack is empty after script execution.\", @\"\")];\n        return NO;\n    }\n    \n    // The last value must be YES.\n    if ([self boolAtIndex:-1] == NO) {\n        if (errorOut) *errorOut = [self scriptError:NSLocalizedString(@\"Last item on the stack is boolean NO.\", @\"\")];\n        return NO;\n    }\n    \n    // Additional validation for spend-to-script-hash transactions:\n    if (shouldVerifyP2SH) {\n        // BitcoinQT: scriptSig must be literals-only\n        if (![inputScript isDataOnly]) {\n            if (errorOut) *errorOut = [self scriptError:NSLocalizedString(@\"Input script for P2SH spending must be literals-only.\", @\"\")];\n            return NO;\n        }\n        \n        if (stackForP2SH.count == 0) {\n            // stackForP2SH cannot be empty here, because if it was the\n            // P2SH  HASH <> EQUAL  scriptPubKey would be evaluated with\n            // an empty stack and the runScript: above would return NO.\n            [NSException raise:@\"BTCScriptMachineException\"  format:@\"internal inconsistency: stackForP2SH cannot be empty at this point.\"];\n            return NO;\n        }\n        \n        // Instantiate the script from the last data on the stack.\n        BTCScript* providedScript = [[BTCScript alloc] initWithData:[stackForP2SH lastObject]];\n        \n        // Remove it from the stack.\n        [stackForP2SH removeObjectAtIndex:stackForP2SH.count - 1];\n        \n        // Replace current stack with P2SH stack.\n        [self resetStack];\n        _stack = stackForP2SH;\n        \n        if (![self runScript:providedScript error:errorOut]) {\n            return NO;\n        }\n        \n        // We need to have something on stack\n        if (_stack.count == 0) {\n            if (errorOut) *errorOut = [self scriptError:NSLocalizedString(@\"Stack is empty after script execution.\", @\"\")];\n            return NO;\n        }\n        \n        // The last value must be YES.\n        if ([self boolAtIndex:-1] == NO) {\n            if (errorOut) *errorOut = [self scriptError:NSLocalizedString(@\"Last item on the stack is boolean NO.\", @\"\")];\n            return NO;\n        }\n    }\n    \n    // If nothing failed, validation passed.\n    return YES;\n}\n\n\n- (BOOL) runScript:(BTCScript*)script error:(NSError**)errorOut {\n    if (!script) {\n        [NSException raise:@\"BTCScriptMachineException\"  format:@\"non-nil script is required for -runScript:error: method.\"];\n        return NO;\n    }\n    \n    if (script.data.length > BTC_MAX_SCRIPT_SIZE) {\n        if (errorOut) *errorOut = [self scriptError:NSLocalizedString(@\"Script binary is too long.\", @\"\")];\n        return NO;\n    }\n    \n    // Altstack should be reset between script runs.\n    _altStack = [NSMutableArray array];\n    \n    _script = script;\n    _opIndex = 0;\n    _opcode = 0;\n    _pushdata = nil;\n    _lastCodeSeparatorIndex = 0;\n    _opCount = 0;\n    \n    __block BOOL opFailed = NO;\n    [script enumerateOperations:^(NSUInteger opIndex, BTCOpcode opcode, NSData *pushdata, BOOL *stop) {\n        \n        _opIndex = opIndex;\n        _opcode = opcode;\n        _pushdata = pushdata;\n        \n        if (![self executeOpcodeError:errorOut])\n        {\n            opFailed = YES;\n            *stop = YES;\n        }\n    }];\n    \n    if (opFailed) {\n        // Error is already set by executeOpcode, return immediately.\n        return NO;\n    }\n    \n    if (_conditionStack.count > 0) {\n        if (errorOut) *errorOut = [self scriptError:NSLocalizedString(@\"Condition branches not balanced.\", @\"\")];\n        return NO;\n    }\n    \n    return YES;\n}\n\n\n- (BOOL) executeOpcodeError:(NSError**)errorOut {\n    NSUInteger opcodeIndex = _opIndex;\n    BTCOpcode opcode = _opcode;\n    NSData* pushdata = _pushdata;\n    \n    if (pushdata.length > BTC_MAX_SCRIPT_ELEMENT_SIZE) {\n        if (errorOut) *errorOut = [self scriptError:NSLocalizedString(@\"Pushdata chunk size is too big.\", @\"\")];\n        return NO;\n    }\n    \n    if (opcode > OP_16 && !_pushdata && ++_opCount > BTC_MAX_OPS_PER_SCRIPT) {\n        if (errorOut) *errorOut = [self scriptError:NSLocalizedString(@\"Exceeded the allowed number of operations per script.\", @\"\")];\n        return NO;\n    }\n    \n    // Disabled opcodes\n    \n    if (opcode == OP_CAT ||\n        opcode == OP_SUBSTR ||\n        opcode == OP_LEFT ||\n        opcode == OP_RIGHT ||\n        opcode == OP_INVERT ||\n        opcode == OP_AND ||\n        opcode == OP_OR ||\n        opcode == OP_XOR ||\n        opcode == OP_2MUL ||\n        opcode == OP_2DIV ||\n        opcode == OP_MUL ||\n        opcode == OP_DIV ||\n        opcode == OP_MOD ||\n        opcode == OP_LSHIFT ||\n        opcode == OP_RSHIFT) {\n        if (errorOut) *errorOut = [self scriptError:NSLocalizedString(@\"Attempt to execute a disabled opcode.\", @\"\")];\n        return NO;\n    }\n    \n    BOOL shouldExecute = ([_conditionStack indexOfObject:@NO] == NSNotFound);\n    \n    if (shouldExecute && pushdata) {\n        [_stack addObject:pushdata];\n    } else if (shouldExecute || (OP_IF <= opcode && opcode <= OP_ENDIF)) {\n    // this basically means that OP_VERIF and OP_VERNOTIF will always fail the script, even if not executed.\n        switch (opcode) {\n            //\n            // Push value\n            //\n            case OP_1NEGATE:\n            case OP_1:\n            case OP_2:\n            case OP_3:\n            case OP_4:\n            case OP_5:\n            case OP_6:\n            case OP_7:\n            case OP_8:\n            case OP_9:\n            case OP_10:\n            case OP_11:\n            case OP_12:\n            case OP_13:\n            case OP_14:\n            case OP_15:\n            case OP_16: {\n                // ( -- value)\n                BTCBigNumber* bn = [[BTCBigNumber alloc] initWithInt64:(int)opcode - (int)(OP_1 - 1)];\n                [_stack addObject:bn.signedLittleEndian];\n            }\n            break;\n                \n                \n            //\n            // Control\n            //\n            case OP_NOP:\n            case OP_NOP1: case OP_NOP2: case OP_NOP3: case OP_NOP4: case OP_NOP5:\n            case OP_NOP6: case OP_NOP7: case OP_NOP8: case OP_NOP9: case OP_NOP10:\n            break;\n            \n            \n            case OP_IF:\n            case OP_NOTIF: {\n                // <expression> if [statements] [else [statements]] endif\n                BOOL value = NO;\n                if (shouldExecute) {\n                    if (_stack.count < 1) {\n                        if (errorOut) *errorOut = [self scriptErrorOpcodeRequiresItemsOnStack:1];\n                        return NO;\n                    }\n                    value = [self boolAtIndex:-1];\n                    if (opcode == OP_NOTIF) {\n                        value = !value;\n                    }\n                    [self popFromStack];\n                }\n                [_conditionStack addObject:@(value)];\n            }\n            break;\n            \n            case OP_ELSE: {\n                if (_conditionStack.count == 0) {\n                    if (errorOut) *errorOut = [self scriptError:NSLocalizedString(@\"Expected an OP_IF or OP_NOTIF branch before OP_ELSE.\", @\"\")];\n                    return NO;\n                }\n                \n                // Invert last condition.\n                BOOL f = [[_conditionStack lastObject] boolValue];\n                [_conditionStack removeObjectAtIndex:_conditionStack.count - 1];\n                [_conditionStack addObject:@(!f)];\n            }\n            break;\n                \n            case OP_ENDIF: {\n                if (_conditionStack.count == 0) {\n                    if (errorOut) *errorOut = [self scriptError:NSLocalizedString(@\"Expected an OP_IF or OP_NOTIF branch before OP_ENDIF.\", @\"\")];\n                    return NO;\n                }\n                [_conditionStack removeObjectAtIndex:_conditionStack.count - 1];\n            }\n            break;\n            \n            case OP_VERIFY: {\n                // (true -- ) or\n                // (false -- false) and return\n                if (_stack.count < 1) {\n                    if (errorOut) *errorOut = [self scriptErrorOpcodeRequiresItemsOnStack:1];\n                    return NO;\n                }\n\n                BOOL value = [self boolAtIndex:-1];\n                if (value) {\n                    [self popFromStack];\n                } else {\n                    if (errorOut) *errorOut = [self scriptError:NSLocalizedString(@\"OP_VERIFY failed.\", @\"\")];\n                    return NO;\n                }\n            }\n            break;\n                \n            case OP_RETURN: {\n                if (errorOut) *errorOut = [self scriptError:NSLocalizedString(@\"OP_RETURN executed.\", @\"\")];\n                return NO;\n            }\n            break;\n\n                \n            //\n            // Stack ops\n            //\n            case OP_TOALTSTACK: {\n                if (_stack.count < 1) {\n                    if (errorOut) *errorOut = [self scriptErrorOpcodeRequiresItemsOnStack:1];\n                    return NO;\n                }\n                [_altStack addObject:[self dataAtIndex:-1]];\n                [self popFromStack];\n            }\n            break;\n                \n            case OP_FROMALTSTACK: {\n                if (_altStack.count < 1) {\n                    if (errorOut) *errorOut = [self scriptError:[NSString stringWithFormat:NSLocalizedString(@\"%@ requires one item on altstack\", @\"\"), BTCNameForOpcode(opcode)]];\n                    return NO;\n                }\n                [_stack addObject:_altStack[_altStack.count - 1]];\n                [_altStack removeObjectAtIndex:_altStack.count - 1];\n            }\n            break;\n                \n            case OP_2DROP: {\n                // (x1 x2 -- )\n                if (_stack.count < 2) {\n                    if (errorOut) *errorOut = [self scriptErrorOpcodeRequiresItemsOnStack:2];\n                    return NO;\n                }\n                [self popFromStack];\n                [self popFromStack];\n            }\n            break;\n                \n            case OP_2DUP: {\n                // (x1 x2 -- x1 x2 x1 x2)\n                if (_stack.count < 2) {\n                    if (errorOut) *errorOut = [self scriptErrorOpcodeRequiresItemsOnStack:2];\n                    return NO;\n                }\n                NSData* data1 = [self dataAtIndex:-2];\n                NSData* data2 = [self dataAtIndex:-1];\n                [_stack addObject:data1];\n                [_stack addObject:data2];\n            }\n            break;\n                \n            case OP_3DUP: {\n                // (x1 x2 x3 -- x1 x2 x3 x1 x2 x3)\n                if (_stack.count < 3) {\n                    if (errorOut) *errorOut = [self scriptErrorOpcodeRequiresItemsOnStack:3];\n                    return NO;\n                }\n                NSData* data1 = [self dataAtIndex:-3];\n                NSData* data2 = [self dataAtIndex:-2];\n                NSData* data3 = [self dataAtIndex:-1];\n                [_stack addObject:data1];\n                [_stack addObject:data2];\n                [_stack addObject:data3];\n            }\n            break;\n                \n            case OP_2OVER: {\n                // (x1 x2 x3 x4 -- x1 x2 x3 x4 x1 x2)\n                if (_stack.count < 4) {\n                    if (errorOut) *errorOut = [self scriptErrorOpcodeRequiresItemsOnStack:4];\n                    return NO;\n                }\n                NSData* data1 = [self dataAtIndex:-4];\n                NSData* data2 = [self dataAtIndex:-3];\n                [_stack addObject:data1];\n                [_stack addObject:data2];\n            }\n            break;\n                \n            case OP_2ROT: {\n                // (x1 x2 x3 x4 x5 x6 -- x3 x4 x5 x6 x1 x2)\n                if (_stack.count < 6) {\n                    if (errorOut) *errorOut = [self scriptErrorOpcodeRequiresItemsOnStack:6];\n                    return NO;\n                }\n                NSData* data1 = [self dataAtIndex:-6];\n                NSData* data2 = [self dataAtIndex:-5];\n                [_stack removeObjectsInRange:NSMakeRange(_stack.count-6, 2)];\n                [_stack addObject:data1];\n                [_stack addObject:data2];\n            }\n            break;\n                \n            case OP_2SWAP: {\n                // (x1 x2 x3 x4 -- x3 x4 x1 x2)\n                if (_stack.count < 4) {\n                    if (errorOut) *errorOut = [self scriptErrorOpcodeRequiresItemsOnStack:4];\n                    return NO;\n                }\n                \n                [self swapDataAtIndex:-4 withIndex:-2]; // x1 <-> x3\n                [self swapDataAtIndex:-3 withIndex:-1]; // x2 <-> x4\n            }\n            break;\n                \n            case OP_IFDUP: {\n                // (x -- x x)\n                // (0 -- 0)\n                if (_stack.count < 1) {\n                    if (errorOut) *errorOut = [self scriptErrorOpcodeRequiresItemsOnStack:1];\n                    return NO;\n                }\n                NSData* data = [self dataAtIndex:-1];\n                if ([self boolAtIndex:-1]) {\n                    [_stack addObject:data];\n                }\n            }\n            break;\n                \n            case OP_DEPTH: {\n                // -- stacksize\n                BTCBigNumber* bn = [[BTCBigNumber alloc] initWithInt64:_stack.count];\n                [_stack addObject:bn.signedLittleEndian];\n            }\n            break;\n                \n            case OP_DROP: {\n                // (x -- )\n                if (_stack.count < 1) {\n                    if (errorOut) *errorOut = [self scriptErrorOpcodeRequiresItemsOnStack:1];\n                    return NO;\n                }\n                [self popFromStack];\n            }\n            break;\n                \n            case OP_DUP: {\n                // (x -- x x)\n                if (_stack.count < 1) {\n                    if (errorOut) *errorOut = [self scriptErrorOpcodeRequiresItemsOnStack:1];\n                    return NO;\n                }\n                NSData* data = [self dataAtIndex:-1];\n                [_stack addObject:data];\n            }\n            break;\n                \n            case OP_NIP: {\n                // (x1 x2 -- x2)\n                if (_stack.count < 2) {\n                    if (errorOut) *errorOut = [self scriptErrorOpcodeRequiresItemsOnStack:2];\n                    return NO;\n                }\n                [_stack removeObjectAtIndex:_stack.count - 2];\n            }\n            break;\n                \n            case OP_OVER: {\n                // (x1 x2 -- x1 x2 x1)\n                if (_stack.count < 2) {\n                    if (errorOut) *errorOut = [self scriptErrorOpcodeRequiresItemsOnStack:2];\n                    return NO;\n                }\n                NSData* data = [self dataAtIndex:-2];\n                [_stack addObject:data];\n            }\n            break;\n                \n            case OP_PICK:\n            case OP_ROLL: {\n                // pick: (xn ... x2 x1 x0 n -- xn ... x2 x1 x0 xn)\n                // roll: (xn ... x2 x1 x0 n --    ... x2 x1 x0 xn)\n                if (_stack.count < 2) {\n                    if (errorOut) *errorOut = [self scriptErrorOpcodeRequiresItemsOnStack:2];\n                    return NO;\n                }\n                \n                // Top item is a number of items to roll over.\n                // Take it and pop it from the stack.\n                BTCBigNumber* bn = [self bigNumberAtIndex:-1];\n                \n                if (!bn) {\n                    if (errorOut) *errorOut = [self scriptErrorInvalidBignum];\n                    return NO;\n                }\n                \n                int32_t n = [bn int32value];\n                [self popFromStack];\n                \n                if (n < 0 || n >= _stack.count) {\n                    if (errorOut) *errorOut = [self scriptError:[NSString stringWithFormat:NSLocalizedString(@\"Invalid number of items for %@: %d.\", @\"\"), BTCNameForOpcode(opcode), n]];\n                    return NO;\n                }\n                NSData* data = [self dataAtIndex: -n - 1];\n                if (opcode == OP_ROLL) {\n                    [self removeAtIndex: -n - 1];\n                }\n                [_stack addObject:data];\n            }\n            break;\n                \n            case OP_ROT: {\n                // (x1 x2 x3 -- x2 x3 x1)\n                //  x2 x1 x3  after first swap\n                //  x2 x3 x1  after second swap\n                if (_stack.count < 3) {\n                    if (errorOut) *errorOut = [self scriptErrorOpcodeRequiresItemsOnStack:3];\n                    return NO;\n                }\n                [self swapDataAtIndex:-3 withIndex:-2];\n                [self swapDataAtIndex:-2 withIndex:-1];\n            }\n            break;\n                \n            case OP_SWAP: {\n                // (x1 x2 -- x2 x1)\n                if (_stack.count < 2) {\n                    if (errorOut) *errorOut = [self scriptErrorOpcodeRequiresItemsOnStack:2];\n                    return NO;\n                }\n                [self swapDataAtIndex:-2 withIndex:-1];\n            }\n            break;\n                \n            case OP_TUCK: {\n                // (x1 x2 -- x2 x1 x2)\n                if (_stack.count < 2) {\n                    if (errorOut) *errorOut = [self scriptErrorOpcodeRequiresItemsOnStack:2];\n                    return NO;\n                }\n                NSData* data = [self dataAtIndex:-1];\n                [_stack insertObject:data atIndex:_stack.count - 2];\n            }\n            break;\n                \n                \n            case OP_SIZE: {\n                // (in -- in size)\n                if (_stack.count < 1) {\n                    if (errorOut) *errorOut = [self scriptErrorOpcodeRequiresItemsOnStack:1];\n                    return NO;\n                }\n                BTCBigNumber* bn = [[BTCBigNumber alloc] initWithUInt64:[self dataAtIndex:-1].length];\n                [_stack addObject:bn.signedLittleEndian];\n            }\n            break;\n\n\n            //\n            // Bitwise logic\n            //\n            case OP_EQUAL:\n            case OP_EQUALVERIFY: {\n                //case OP_NOTEQUAL: // use OP_NUMNOTEQUAL\n                // (x1 x2 - bool)\n                if (_stack.count < 2) {\n                    if (errorOut) *errorOut = [self scriptErrorOpcodeRequiresItemsOnStack:2];\n                    return NO;\n                }\n                NSData* x1 = [self dataAtIndex:-2];\n                NSData* x2 = [self dataAtIndex:-1];\n                BOOL equal = [x1 isEqual:x2];\n                \n                // OP_NOTEQUAL is disabled because it would be too easy to say\n                // something like n != 1 and have some wiseguy pass in 1 with extra\n                // zero bytes after it (numerically, 0x01 == 0x0001 == 0x000001)\n                //if (opcode == OP_NOTEQUAL)\n                //    equal = !equal;\n                \n                [self popFromStack];\n                [self popFromStack];\n                \n                [_stack addObject:equal ? _blobTrue : _blobFalse];\n                \n                if (opcode == OP_EQUALVERIFY) {\n                    if (equal) {\n                        [self popFromStack];\n                    } else {\n                        if (errorOut) *errorOut = [self scriptError:NSLocalizedString(@\"OP_EQUALVERIFY failed.\", @\"\")];\n                        return NO;\n                    }\n                }\n            }\n            break;\n                \n            //\n            // Numeric\n            //\n            case OP_1ADD:\n            case OP_1SUB:\n            case OP_NEGATE:\n            case OP_ABS:\n            case OP_NOT:\n            case OP_0NOTEQUAL: {\n                // (in -- out)\n                if (_stack.count < 1) {\n                    if (errorOut) *errorOut = [self scriptErrorOpcodeRequiresItemsOnStack:1];\n                    return NO;\n                }\n                \n                BTCMutableBigNumber* bn = [self bigNumberAtIndex:-1];\n                \n                if (!bn) {\n                    if (errorOut) *errorOut = [self scriptErrorInvalidBignum];\n                    return NO;\n                }\n                \n                switch (opcode) {\n                    case OP_1ADD:       [bn add:_bigNumberOne]; break;\n                    case OP_1SUB:       [bn subtract:_bigNumberOne]; break;\n                    case OP_NEGATE:     [bn multiply:[BTCBigNumber negativeOne]]; break;\n                    case OP_ABS:        if ([bn less:_bigNumberZero]) [bn multiply:[BTCBigNumber negativeOne]]; break;\n                    case OP_NOT:        bn.uint32value = (uint32_t)[bn isEqual:_bigNumberZero]; break;\n                    case OP_0NOTEQUAL:  bn.uint32value = (uint32_t)(![bn isEqual:_bigNumberZero]); break;\n                    default:            NSAssert(0, @\"Invalid opcode\"); break;\n                }\n                [self popFromStack];\n                [_stack addObject:bn.signedLittleEndian];\n            }\n            break;\n\n            case OP_ADD:\n            case OP_SUB:\n            case OP_BOOLAND:\n            case OP_BOOLOR:\n            case OP_NUMEQUAL:\n            case OP_NUMEQUALVERIFY:\n            case OP_NUMNOTEQUAL:\n            case OP_LESSTHAN:\n            case OP_GREATERTHAN:\n            case OP_LESSTHANOREQUAL:\n            case OP_GREATERTHANOREQUAL:\n            case OP_MIN:\n            case OP_MAX: {\n                // (x1 x2 -- out)\n                if (_stack.count < 2) {\n                    if (errorOut) *errorOut = [self scriptErrorOpcodeRequiresItemsOnStack:2];\n                    return NO;\n                }\n                \n                // bn1 is nil when stack is ( <00000080 00>, <> )\n\n                BTCMutableBigNumber* bn1 = [self bigNumberAtIndex:-2];\n                BTCMutableBigNumber* bn2 = [self bigNumberAtIndex:-1];\n                \n                if (!bn1 || !bn2) {\n                    if (errorOut) *errorOut = [self scriptErrorInvalidBignum];\n                    return NO;\n                }\n                \n                BTCMutableBigNumber* bn = nil;\n                \n                switch (opcode) {\n                    case OP_ADD:\n                        bn = [bn1 add:bn2];\n                        break;\n                        \n                    case OP_SUB:\n                        bn = [bn1 subtract:bn2];\n                        break;\n                        \n                    case OP_BOOLAND:             bn = [[BTCMutableBigNumber alloc] initWithInt32:![bn1 isEqual:_bigNumberZero] && ![bn2 isEqual:_bigNumberZero]]; break;\n                    case OP_BOOLOR:              bn = [[BTCMutableBigNumber alloc] initWithInt32:![bn1 isEqual:_bigNumberZero] || ![bn2 isEqual:_bigNumberZero]]; break;\n                    case OP_NUMEQUAL:            bn = [[BTCMutableBigNumber alloc] initWithInt32: [bn1 isEqual:bn2]]; break;\n                    case OP_NUMEQUALVERIFY:      bn = [[BTCMutableBigNumber alloc] initWithInt32: [bn1 isEqual:bn2]]; break;\n                    case OP_NUMNOTEQUAL:         bn = [[BTCMutableBigNumber alloc] initWithInt32:![bn1 isEqual:bn2]]; break;\n                    case OP_LESSTHAN:            bn = [[BTCMutableBigNumber alloc] initWithInt32:[bn1 less:bn2]]; break;\n                    case OP_GREATERTHAN:         bn = [[BTCMutableBigNumber alloc] initWithInt32:[bn1 greater:bn2]]; break;\n                    case OP_LESSTHANOREQUAL:     bn = [[BTCMutableBigNumber alloc] initWithInt32:[bn1 lessOrEqual:bn2]]; break;\n                    case OP_GREATERTHANOREQUAL:  bn = [[BTCMutableBigNumber alloc] initWithInt32:[bn1 greaterOrEqual:bn2]]; break;\n                    case OP_MIN:                 bn = [[bn1 min:bn2] mutableCopy]; break;\n                    case OP_MAX:                 bn = [[bn1 max:bn2] mutableCopy]; break;\n                    default:                     NSAssert(0, @\"Invalid opcode\"); break;\n                }\n                \n                [self popFromStack];\n                [self popFromStack];\n                [_stack addObject:bn.signedLittleEndian];\n                \n                if (opcode == OP_NUMEQUALVERIFY) {\n                    if ([self boolAtIndex:-1]) {\n                        [self popFromStack];\n                    } else {\n                        if (errorOut) *errorOut = [self scriptError:NSLocalizedString(@\"OP_NUMEQUALVERIFY failed.\", @\"\")];\n                        return NO;\n                    }\n                }\n            }\n            break;\n                \n            case OP_WITHIN: {\n                // (x min max -- out)\n                if (_stack.count < 3) {\n                    if (errorOut) *errorOut = [self scriptErrorOpcodeRequiresItemsOnStack:3];\n                    return NO;\n                }\n                \n                BTCMutableBigNumber* bn1 = [self bigNumberAtIndex:-3];\n                BTCMutableBigNumber* bn2 = [self bigNumberAtIndex:-2];\n                BTCMutableBigNumber* bn3 = [self bigNumberAtIndex:-1];\n                \n                if (!bn1 || !bn2 || !bn3) {\n                    if (errorOut) *errorOut = [self scriptErrorInvalidBignum];\n                    return NO;\n                }\n                \n                BOOL value = ([bn2 lessOrEqual:bn1] && [bn1 less:bn3]);\n                \n                [self popFromStack];\n                [self popFromStack];\n                [self popFromStack];\n                \n                [_stack addObject:(value ? _bigNumberTrue : _bigNumberFalse).signedLittleEndian];\n            }\n            break;\n            \n                \n            //\n            // Crypto\n            //\n            case OP_RIPEMD160:\n            case OP_SHA1:\n            case OP_SHA256:\n            case OP_HASH160:\n            case OP_HASH256: {\n                // (in -- hash)\n                if (_stack.count < 1) {\n                    if (errorOut) *errorOut = [self scriptErrorOpcodeRequiresItemsOnStack:1];\n                    return NO;\n                }\n                \n                NSData* data = [self dataAtIndex:-1];\n                NSData* hash = nil;\n                \n                if (opcode == OP_RIPEMD160) {\n                    hash = BTCRIPEMD160(data);\n                } else if (opcode == OP_SHA1) {\n                    hash = BTCSHA1(data);\n                } else if (opcode == OP_SHA256) {\n                    hash = BTCSHA256(data);\n                } else if (opcode == OP_HASH160) {\n                    hash = BTCHash160(data);\n                } else if (opcode == OP_HASH256) {\n                    hash = BTCHash256(data);\n                }\n                [self popFromStack];\n                [_stack addObject:hash];\n            }\n            break;\n            \n            \n            case OP_CODESEPARATOR: {\n                // Code separator is almost never used and no one knows why it could be useful. Maybe it's Satoshi's design mistake.\n                // It affects how OP_CHECKSIG and OP_CHECKMULTISIG compute the hash of transaction for verifying the signature.\n                // That hash should be computed after the most recent OP_CODESEPARATOR before current OP_CHECKSIG (or OP_CHECKMULTISIG).\n                // Notice how we remember the index of OP_CODESEPARATOR itself, not the position after it.\n                // Bitcoind will extract subscript *including* this codeseparator. But all codeseparators will be stripped out eventually\n                // when we compute a hash of transaction. Just to keep ourselves close to bitcoind for extra asfety, we'll do the same here.\n                _lastCodeSeparatorIndex = opcodeIndex;\n            }\n            break;\n\n            \n            case OP_CHECKSIG:\n            case OP_CHECKSIGVERIFY: {\n                // (sig pubkey -- bool)\n                if (_stack.count < 2) {\n                    if (errorOut) *errorOut = [self scriptErrorOpcodeRequiresItemsOnStack:2];\n                    return NO;\n                }\n                \n                NSData* signature = [self dataAtIndex:-2];\n                NSData* pubkeyData = [self dataAtIndex:-1];\n                \n                // Subset of script starting at the most recent OP_CODESEPARATOR (inclusive)\n                BTCScript* subscript = [_script subScriptFromIndex:_lastCodeSeparatorIndex];\n\n                // Drop the signature, since there's no way for a signature to sign itself.\n                // Normally we neither have signatures in the output scripts, nor checksig ops in the input scripts.\n                // In early days of Bitcoin (before July 2010) input and output scripts were concatenated and executed as one,\n                // so this cleanup could make sense. But the concatenation was done with OP_CODESEPARATOR in the middle,\n                // so dropping sigs still didn't make much sense - output script was still hashed separately from the input script (that contains signatures).\n                // There could have been some use case if one could put a signature\n                // right in the output script. E.g. to provably time-lock the funds.\n                // But the second tx must contain a valid hash to its parent while\n                // the parent must contain a signed hash of its child. This creates an unsolvable cycle.\n                // See https://bitcointalk.org/index.php?topic=278992.0 for more info.\n                [subscript deleteOccurrencesOfData:signature];\n\n                NSError* sigerror = nil;\n                BOOL failed = NO;\n                if (_verificationFlags & BTCScriptVerificationStrictEncoding) {\n                    if (![BTCKey isCanonicalPublicKey:pubkeyData error:&sigerror]) {\n                        failed = YES;\n                    }\n                    if (!failed && ![BTCKey isCanonicalSignatureWithHashType:signature\n                                                                 verifyLowerS:!!(_verificationFlags & BTCScriptVerificationEvenS)\n                                                                       error:&sigerror]) {\n                        failed = YES;\n                    }\n                }\n                \n                BOOL success = !failed && [self checkSignature:signature publicKey:pubkeyData subscript:subscript error:&sigerror];\n                \n                [self popFromStack];\n                [self popFromStack];\n                \n                [_stack addObject:success ? _blobTrue : _blobFalse];\n                \n                if (opcode == OP_CHECKSIGVERIFY) {\n                    if (success) {\n                        [self popFromStack];\n                    } else {\n                        if (sigerror && errorOut) *errorOut = [self scriptError:[NSString stringWithFormat:NSLocalizedString(@\"Signature check failed. %@\", @\"\"),\n                                                                                 [sigerror localizedDescription]] underlyingError:sigerror];\n                        return NO;\n                    }\n                }\n            }\n            break;\n            \n            \n            case OP_CHECKMULTISIG:\n            case OP_CHECKMULTISIGVERIFY: {\n                // ([sig ...] num_of_signatures [pubkey ...] num_of_pubkeys -- bool)\n                \n                int i = 1;\n                if (_stack.count < i) {\n                    if (errorOut) *errorOut = [self scriptErrorOpcodeRequiresItemsOnStack:i];\n                    return NO;\n                }\n                \n                BTCBigNumber* bn = [self bigNumberAtIndex:-i];\n                \n                if (!bn) {\n                    if (errorOut) *errorOut = [self scriptErrorInvalidBignum];\n                    return NO;\n                }\n\n                int32_t keysCount = bn.int32value;\n                if (keysCount < 0 || keysCount > BTC_MAX_KEYS_FOR_CHECKMULTISIG) {\n                    if (errorOut) *errorOut = [self scriptError:[NSString stringWithFormat:NSLocalizedString(@\"Invalid number of keys for %@: %d.\", @\"\"), BTCNameForOpcode(opcode), keysCount]];\n                    return NO;\n                }\n                \n                _opCount += keysCount;\n                \n                if (_opCount > BTC_MAX_OPS_PER_SCRIPT) {\n                    if (errorOut) *errorOut = [self scriptError:NSLocalizedString(@\"Exceeded allowed number of operations per script.\", @\"\")];\n                    return NO;\n                }\n                \n                // An index of the first key\n                int ikey = ++i;\n                \n                i += keysCount;\n                \n                if (_stack.count < i) {\n                    if (errorOut) *errorOut = [self scriptErrorOpcodeRequiresItemsOnStack:i];\n                    return NO;\n                }\n                \n                // Read the required number of signatures.\n                BTCBigNumber* bn2 = [self bigNumberAtIndex:-i];\n                \n                if (!bn2) {\n                    if (errorOut) *errorOut = [self scriptErrorInvalidBignum];\n                    return NO;\n                }\n\n                int sigsCount = bn2.int32value;\n                if (sigsCount < 0 || sigsCount > keysCount) {\n                    if (errorOut) *errorOut = [self scriptError:[NSString stringWithFormat:NSLocalizedString(@\"Invalid number of signatures for %@: %d.\", @\"\"), BTCNameForOpcode(opcode), keysCount]];\n                    return NO;\n                }\n                \n                // The index of the first signature\n                int isig = ++i;\n                \n                i += sigsCount;\n                \n                if (_stack.count < i) {\n                    if (errorOut) *errorOut = [self scriptErrorOpcodeRequiresItemsOnStack:i];\n                    return NO;\n                }\n                \n                // Subset of script starting at the most recent OP_CODESEPARATOR (inclusive)\n                BTCScript* subscript = [_script subScriptFromIndex:_lastCodeSeparatorIndex];\n                \n                // Drop the signatures, since there's no way for a signature to sign itself.\n                // Essentially this is noop because signatures are never present in scripts.\n                // See also a comment to a similar code in OP_CHECKSIG.\n                for (int k = 0; k < sigsCount; k++) {\n                    NSData* sig = [self dataAtIndex: - isig - k];\n                    [subscript deleteOccurrencesOfData:sig];\n                }\n                \n                BOOL success = YES;\n                NSError* firstsigerror = nil;\n\n                // Signatures must come in the same order as their keys.\n                while (success && sigsCount > 0) {\n                    NSData* signature = [self dataAtIndex:-isig];\n                    NSData* pubkeyData = [self dataAtIndex:-ikey];\n                    \n                    BOOL validMatch = YES;\n                    NSError* sigerror = nil;\n                    if (_verificationFlags & BTCScriptVerificationStrictEncoding) {\n                        if (![BTCKey isCanonicalPublicKey:pubkeyData error:&sigerror]) {\n                            validMatch = NO;\n                        }\n                        if (validMatch && ![BTCKey isCanonicalSignatureWithHashType:signature\n                                                                        verifyLowerS:!!(_verificationFlags & BTCScriptVerificationEvenS)\n                                                                              error:&sigerror]) {\n                            validMatch = NO;\n                        }\n                    }\n                    if (validMatch) {\n                        validMatch = [self checkSignature:signature publicKey:pubkeyData subscript:subscript error:&sigerror];\n                    }\n                    \n                    if (validMatch) {\n                        isig++;\n                        sigsCount--;\n                    } else {\n                        if (!firstsigerror) firstsigerror = sigerror;\n                    }\n                    ikey++;\n                    keysCount--;\n                    \n                    // If there are more signatures left than keys left,\n                    // then too many signatures have failed\n                    if (sigsCount > keysCount) {\n                        success = NO;\n                    }\n                }\n                \n                // Remove all signatures, counts and pubkeys from stack.\n                // Note: 'i' points past the signatures. Due to postfix decrement (i--) this loop will pop one extra item from the stack.\n                // We can't change this code to use prefix decrement (--i) until every node does the same.\n                // This means that to redeem multisig script you have to prepend a dummy OP_0 item before all signatures so it can be popped here.\n                while (i-- > 0) {\n                    [self popFromStack];\n                }\n                \n                [_stack addObject:success ? _blobTrue : _blobFalse];\n                \n                if (opcode == OP_CHECKMULTISIGVERIFY) {\n                    if (success) {\n                        [self popFromStack];\n                    } else {\n                        if (firstsigerror && errorOut) *errorOut =\n                            [self scriptError:[NSString stringWithFormat:NSLocalizedString(@\"Multisignature check failed. %@\", @\"\"),\n                                               [firstsigerror localizedDescription]] underlyingError:firstsigerror];\n                        return NO;\n                    }\n                }\n            }\n            break;\n\n                \n            default:\n                if (errorOut) *errorOut = [self scriptError:[NSString stringWithFormat:NSLocalizedString(@\"Unknown opcode %d (%@).\", @\"\"), opcode, BTCNameForOpcode(opcode)]];\n                return NO;\n        }\n    }\n    \n    if (_stack.count + _altStack.count > 1000) {\n        return NO;\n    }\n    \n    return YES;\n}\n\n\n- (BOOL) checkSignature:(NSData*)signature publicKey:(NSData*)pubkeyData subscript:(BTCScript*)subscript error:(NSError**)errorOut {\n    BTCKey* pubkey = [[BTCKey alloc] initWithPublicKey:pubkeyData];\n    \n    if (!pubkey) {\n        if (errorOut) *errorOut = [self scriptError:[NSString stringWithFormat:NSLocalizedString(@\"Public key is not valid: %@.\", @\"\"),\n                                                     BTCHexFromData(pubkeyData)]];\n        return NO;\n    }\n    \n    // Hash type is one byte tacked on to the end of the signature. So the signature shouldn't be empty.\n    if (signature.length == 0) {\n        if (errorOut) *errorOut = [self scriptError:NSLocalizedString(@\"Signature is empty.\", @\"\")];\n        return NO;\n    }\n    \n    // Extract hash type from the last byte of the signature.\n    BTCSignatureHashType hashType = ((unsigned char*)signature.bytes)[signature.length - 1];\n    \n    // Strip that last byte to have a pure signature.\n    signature = [signature subdataWithRange:NSMakeRange(0, signature.length - 1)];\n    \n    NSData* sighash = [_transaction signatureHashForScript:subscript inputIndex:_inputIndex hashType:hashType error:errorOut];\n    \n    //NSLog(@\"BTCScriptMachine: Hash for input %d [%d]: %@\", _inputIndex, hashType, BTCHexFromData(sighash));\n    \n    if (!sighash) {\n        // errorOut is set already.\n        return NO;\n    }\n    \n    if (![pubkey isValidSignature:signature hash:sighash]) {\n        if (errorOut) *errorOut = [self scriptError:NSLocalizedString(@\"Signature is not valid.\", @\"\")];\n        return NO;\n    }\n    \n    return YES;\n}\n\n- (NSArray*) stack {\n    return [_stack copy] ?: @[];\n}\n\n- (NSArray*) altstack {\n    return [_altStack copy] ?: @[];\n}\n\n\n\n\n#pragma mark - Error Helpers\n\n\n\n\n- (NSError*) scriptError:(NSString*)localizedString {\n    return [NSError errorWithDomain:BTCErrorDomain\n                               code:BTCErrorScriptError\n                           userInfo:@{NSLocalizedDescriptionKey: localizedString}];\n}\n\n- (NSError*) scriptError:(NSString*)localizedString underlyingError:(NSError*)underlyingError {\n    if (!underlyingError) return [self scriptError:localizedString];\n    \n    return [NSError errorWithDomain:BTCErrorDomain\n                               code:BTCErrorScriptError\n                           userInfo:@{NSLocalizedDescriptionKey: localizedString,\n                                      NSUnderlyingErrorKey: underlyingError}];\n}\n\n- (NSError*) scriptErrorOpcodeRequiresItemsOnStack:(NSUInteger)items {\n    if (items == 1) {\n        return [NSError errorWithDomain:BTCErrorDomain\n                                   code:BTCErrorScriptError\n                               userInfo:@{NSLocalizedDescriptionKey: [NSString stringWithFormat:NSLocalizedString(@\"%@ requires %d item on stack.\", @\"\"), BTCNameForOpcode(_opcode), items]}];\n    }\n    return [NSError errorWithDomain:BTCErrorDomain code:BTCErrorScriptError userInfo:@{NSLocalizedDescriptionKey: [NSString stringWithFormat:NSLocalizedString(@\"%@ requires %d items on stack.\", @\"\"), BTCNameForOpcode(_opcode), items]}];\n}\n\n- (NSError*) scriptErrorInvalidBignum {\n    return [NSError errorWithDomain:BTCErrorDomain\n                               code:BTCErrorScriptError\n                           userInfo:@{NSLocalizedDescriptionKey: NSLocalizedString(@\"Invalid bignum data.\", @\"\")}];\n}\n\n\n\n#pragma mark - Stack Utilities\n\n// 0 is the first item in stack, 1 is the second.\n// -1 is the last item, -2 is the pre-last item.\n#define BTCNormalizeIndex(list, i) (i < 0 ? (list.count + i) : i)\n\n- (NSData*) dataAtIndex:(NSInteger)index {\n    return _stack[BTCNormalizeIndex(_stack, index)];\n}\n\n- (void) swapDataAtIndex:(NSInteger)index1 withIndex:(NSInteger)index2 {\n    [_stack exchangeObjectAtIndex:BTCNormalizeIndex(_stack, index1)\n                withObjectAtIndex:BTCNormalizeIndex(_stack, index2)];\n}\n\n// Returns bignum from pushdata or nil.\n- (BTCMutableBigNumber*) bigNumberAtIndex:(NSInteger)index {\n    NSData* data = [self dataAtIndex:index];\n    if (!data) return nil;\n    \n    // BitcoinQT throws \"CastToBigNum() : overflow\" and then catches it inside EvalScript to return false.\n    // This is catched in unit test for invalid scripts: @[@\"2147483648 0 ADD\", @\"NOP\", @\"arithmetic operands must be in range @[-2^31...2^31] \"]\n    if (data.length > 4) {\n        return nil;\n    }\n\n    // Get rid of extra leading zeros like BitcoinQT does:\n    // CBigNum(CBigNum(vch).getvch());\n    // FIXME: It's a cargo cult here. I haven't checked myself when do these extra zeros appear and whether they really go away. [Oleg]\n    BTCMutableBigNumber* bn = [[BTCMutableBigNumber alloc] initWithSignedLittleEndian:[[BTCBigNumber alloc] initWithSignedLittleEndian:data].signedLittleEndian];\n    return bn;\n}\n\n- (BOOL) boolAtIndex:(NSInteger)index {\n    NSData* data = [self dataAtIndex:index];\n    if (!data) return NO;\n    \n    NSUInteger len = data.length;\n    if (len == 0) return NO;\n    \n    const unsigned char* bytes = data.bytes;\n    for (NSUInteger i = 0; i < len; i++) {\n        if (bytes[i] != 0) {\n            // Can be negative zero, also counts as NO\n            if (i == (len - 1) && bytes[i] == 0x80) {\n                return NO;\n            }\n            return YES;\n        }\n    }\n    return NO;\n}\n\n// -1 means last item\n- (void) removeAtIndex:(NSInteger)index {\n    [_stack removeObjectAtIndex:BTCNormalizeIndex(_stack, index)];\n}\n\n// -1 means last item\n- (void) popFromStack {\n    [_stack removeObjectAtIndex:BTCNormalizeIndex(_stack, -1)];\n}\n\n@end\n"
  },
  {
    "path": "Pods/CoreBitcoin/CoreBitcoin/BTCSecretSharing.h",
    "content": "// CoreBitcoin by Oleg Andreev <oleganza@gmail.com>, WTFPL.\n\n#import <Foundation/Foundation.h>\n\ntypedef NS_ENUM(NSInteger, BTCSecretSharingVersion) {\n    // Identifies configuration for compact 128-bit secrets with up to 16 shares.\n    BTCSecretSharingVersionCompact96  = 96,\n    BTCSecretSharingVersionCompact104 = 104,\n    BTCSecretSharingVersionCompact128 = 128,\n};\n\n@class BTCBigNumber;\n@interface BTCSecretSharing : NSObject\n\n@property(nonatomic, readonly) BTCSecretSharingVersion version;\n@property(nonatomic, readonly, nonnull) BTCBigNumber* order;\n@property(nonatomic, readonly) NSInteger bitlength;\n\n- (id __nonnull) initWithVersion:(BTCSecretSharingVersion)version;\n\n- (NSArray<NSData*>* __nullable) splitSecret:(NSData* __nonnull)secret threshold:(NSInteger)m shares:(NSInteger)n error:(NSError* __nullable * __nullable)errorOut;\n\n- (NSData* __nullable) joinShares:(NSArray<NSData*>* __nonnull)shares error:(NSError* __nullable * __nullable)errorOut;\n\n@end"
  },
  {
    "path": "Pods/CoreBitcoin/CoreBitcoin/BTCSecretSharing.m",
    "content": "// CoreBitcoin by Oleg Andreev <oleganza@gmail.com>, WTFPL.\n\n#import \"BTCErrors.h\"\n#import \"BTCData.h\"\n#import \"BTCBigNumber.h\"\n#import \"BTCSecretSharing.h\"\n\n@interface BTCSecretSharing ()\n@property(nonatomic, readwrite) BTCSecretSharingVersion version;\n@property(nonatomic, readwrite) BTCBigNumber* order;\n@property(nonatomic, readwrite) NSInteger bitlength;\n@end\n\n@implementation BTCSecretSharing\n\n// Returns a configuration for compact 128-bit secrets with up to 16 shares.\n- (id __nonnull) initWithVersion:(BTCSecretSharingVersion)version {\n    if (self = [super init]) {\n        self.version = version;\n        if (version == BTCSecretSharingVersionCompact96) {\n            // 0xffffffffffffffffffffffef\n            self.bitlength = 96;\n            self.order = [[BTCBigNumber alloc] initWithString:@\"ffffffffffffffffffffffef\" base:16];\n        } else if (version == BTCSecretSharingVersionCompact104) {\n            // 0xffffffffffffffffffffffffef\n            self.bitlength = 104;\n            self.order = [[BTCBigNumber alloc] initWithString:@\"ffffffffffffffffffffffffef\" base:16];\n        } else if (version == BTCSecretSharingVersionCompact128) {\n            // 0xffffffffffffffffffffffffffffff61\n            self.bitlength = 128;\n            self.order = [[BTCBigNumber alloc] initWithString:@\"ffffffffffffffffffffffffffffff61\" base:16];\n        } else {\n            [NSException raise:@\"BTCSecretSharing supports only BTCSecretSharingVersionCompact{96,104,128} versions\" format:@\"\"];\n        }\n    }\n    return self;\n}\n\n- (NSArray* __nullable) splitSecret:(NSData* __nonnull)secret threshold:(NSInteger)m shares:(NSInteger)n error:(NSError**)errorOut {\n\n    if (secret.length*8 != self.bitlength) {\n        if (errorOut) *errorOut = [NSError errorWithDomain:BTCErrorDomain code:BTCErrorIncompatibleSecret userInfo:@{NSLocalizedDescriptionKey: @\"Secret length does not match bitlength of BTCSecretSharing.\"}];\n        return nil;\n    }\n    BTCBigNumber* prime = self.order;\n    BTCBigNumber* secretNumber = [[BTCBigNumber alloc] initWithUnsignedBigEndian:secret];\n\n    if ([secretNumber greaterOrEqual:prime]) {\n        if (errorOut) *errorOut = [NSError errorWithDomain:BTCErrorDomain code:BTCErrorIncompatibleSecret userInfo:@{NSLocalizedDescriptionKey: @\"Secret as bigint must be less than prime order of BTCSecretSharing.\"}];\n        return nil;\n    }\n\n    if (!(n >= 1 && n <= 16)) {\n        if (errorOut) *errorOut = [NSError errorWithDomain:BTCErrorDomain code:BTCErrorIncompatibleSecret userInfo:@{NSLocalizedDescriptionKey: @\"Number of shares (N) must be between 1 and 16.\"}];\n        return nil;\n    }\n\n    if (!(m >= 1 && m <= n)) {\n        if (errorOut) *errorOut = [NSError errorWithDomain:BTCErrorDomain code:BTCErrorIncompatibleSecret userInfo:@{NSLocalizedDescriptionKey: @\"Threshold (M) must be between 1 and N (number of shares).\"}];\n        return nil;\n    }\n\n    NSMutableArray* shares = [NSMutableArray array];\n    NSMutableArray* coefficients = [NSMutableArray array];\n    [coefficients addObject:secretNumber];\n    for (NSInteger i = 0; i < (m-1); i++) {\n        // Generate unpredictable yet deterministic coefficients for each secret and M.\n        NSMutableData* seed = [secret mutableCopy];\n        unsigned char mbyte = m;\n        unsigned char ibyte = i;\n        [seed appendBytes:&mbyte length:1];\n        [seed appendBytes:&ibyte length:1];\n        NSData* coefdata = [self prng:seed];\n        BTCBigNumber* coef = [[BTCBigNumber alloc] initWithUnsignedBigEndian:coefdata];\n        [coefficients addObject:coef];\n    }\n    for (NSInteger i = 0; i < n; i++) {\n        BTCMutableBigNumber* x = [[BTCMutableBigNumber alloc] initWithInt64:i+1];\n        NSInteger exp = 1;\n        BTCMutableBigNumber* y = [coefficients[0] mutableCopy];\n        // while exp < m\n        //   y = (y + (coef[exp] * ((x**exp) % prime) % prime)) % prime\n        //   exp += 1\n        // end\n        while (exp < m) {\n            BTCMutableBigNumber* coef = [coefficients[exp] mutableCopy];\n            BTCMutableBigNumber* xexp = [x mutableCopy];\n            [xexp exp:[[BTCBigNumber alloc] initWithInt64:exp] mod:prime];\n            [coef multiply:xexp mod:prime];\n            [y add:coef mod:prime];\n            exp += 1;\n        }\n        NSData* share = [self encodeShareM:m X:i+1 Y:y];\n        [shares addObject:share];\n    }\n    return shares;\n}\n\n- (NSData* __nullable) joinShares:(NSArray* __nonnull)shares error:(NSError**)errorOut {\n\n    BTCBigNumber* prime = self.order;\n\n    shares = [[NSSet setWithArray:shares] allObjects]; // uniq\n    NSMutableArray* points = [NSMutableArray array];\n    for (id sh in shares) {\n        id p = [self decodeShare:sh];\n        if (p) { [points addObject:p]; }\n    }\n    if (points.count == 0) {\n        if (errorOut) *errorOut = [NSError errorWithDomain:BTCErrorDomain code:BTCErrorInsufficientShares userInfo:@{NSLocalizedDescriptionKey: @\"No shares provided.\"}];\n        return nil;\n    }\n\n    NSMutableSet* ms = [NSMutableSet set];\n    for (id p in points) {\n        [ms addObject:p[0]];\n    }\n    if (ms.count > 1) {\n        if (errorOut) *errorOut = [NSError errorWithDomain:BTCErrorDomain code:BTCErrorMalformedShare userInfo:@{NSLocalizedDescriptionKey: @\"All shares must have the same threshold (M) value.\"}];\n        return nil;\n    }\n    NSMutableSet* xs = [NSMutableSet set];\n    for (id p in points) {\n        [xs addObject:p[1]];\n    }\n    if (xs.count != points.count) {\n        if (errorOut) *errorOut = [NSError errorWithDomain:BTCErrorDomain code:BTCErrorMalformedShare userInfo:@{NSLocalizedDescriptionKey: @\"All shares must have unique indexes (X) values.\"}];\n        return nil;\n    }\n    NSInteger m = [[ms anyObject] integerValue];\n    if (points.count < m) {\n        if (errorOut) *errorOut = [NSError errorWithDomain:BTCErrorDomain code:BTCErrorInsufficientShares userInfo:@{NSLocalizedDescriptionKey: [NSString stringWithFormat:@\"Not enough shares to restore the secret (need %@)\", @(m)]}];\n        return nil;\n    }\n    BTCMutableBigNumber* y = [BTCMutableBigNumber zero];\n    for (NSInteger formula = 0; formula < m; formula++) {\n        // Multiply the numerator across the top and denominators across the bottom to do Lagrange's interpolation\n        BTCMutableBigNumber* numerator = [BTCMutableBigNumber one];\n        BTCMutableBigNumber* denominator = [BTCMutableBigNumber one];\n        for (NSInteger count = 0; count < m; count++) {\n            if (formula != count) { // skip element with i == j\n                BTCMutableBigNumber* startposition = [[[BTCBigNumber alloc] initWithInt64:[points[formula][1] longLongValue]] mutableCopy];\n                BTCBigNumber* negnextposition = [[BTCBigNumber alloc] initWithInt64:-[points[count][1] longLongValue]];\n                [numerator multiply:negnextposition mod:prime];\n                [startposition add:negnextposition];\n                [denominator multiply:startposition mod:prime];\n            }\n        }\n        BTCMutableBigNumber* value = [points[formula][2] mutableCopy];\n        [value multiply:numerator];\n        [value multiply:[denominator inverseMod:prime] mod:prime];\n        [y add:prime];\n        [y add:value mod:prime];\n    }\n    return [y.unsignedBigEndian subdataWithRange:NSMakeRange(32-self.bitlength/8, self.bitlength/8)];\n}\n\n- (NSData*) prng:(NSData*)seed {\n    /*\n     def prng(seed)\n         x = Order\n         s = nil\n         pad = \"\".b\n         while x >= Order\n             s = Digest::SHA2.digest(Digest::SHA2.digest(seed + pad))[0,16]\n             x = int_from_be(s)\n             pad = pad + \"\\x00\".b\n         end\n         s\n     end\n     */\n    BTCBigNumber* x = self.order;\n    NSData* s = nil;\n    NSMutableData* pad = [NSMutableData data];\n    while ([x greaterOrEqual:self.order]) {\n        NSMutableData* input = [seed mutableCopy];\n        [input appendData:pad];\n        s = [BTCHash256(input) subdataWithRange:NSMakeRange(0, self.bitlength/8)];\n        x = [[BTCBigNumber alloc] initWithUnsignedBigEndian:s];\n        unsigned char zero = 0;\n        [pad appendBytes:&zero length:1];\n    }\n    return s;\n}\n\n// Returns mmmmxxxx yyyyyyyy yyyyyyyy ... (N bytes of y)\n- (NSData*) encodeShareM:(NSInteger)m X:(NSInteger)x Y:(BTCBigNumber*)y {\n    m = [self toNibble:m];\n    x = [self toNibble:x];\n    unsigned char prefix = (m << 4) + x;\n    NSMutableData* data = [[NSMutableData alloc] initWithBytes:&prefix length:1];\n    [data appendData:[y.unsignedBigEndian subdataWithRange:NSMakeRange(32-self.bitlength/8, self.bitlength/8)]];\n    return data;\n}\n\n// Returns [m, x, y] where m, x - NSNumber, y - BTCBigNumber\n- (NSArray*) decodeShare:(NSData*)share {\n    if (share.length != (self.bitlength/8+1)) return nil;\n    unsigned char byte = ((unsigned char*)share.bytes)[0];\n    NSInteger m = [self fromNibble:byte >> 4];\n    NSInteger x = [self fromNibble:byte & 0x0f];\n    BTCBigNumber* y = [[BTCBigNumber alloc]initWithUnsignedBigEndian:[share subdataWithRange:NSMakeRange(1, self.bitlength/8)]];\n    return @[@(m), @(x), y];\n}\n\n// Encodes values in range 1..16 to one nibble where all values are encoded as-is,\n// except for 16 which becomes 0. This is to make strings look friendly for common cases when M,N < 16\n- (NSInteger) toNibble:(NSInteger)x {\n    return x == 16 ? 0 : x;\n}\n\n- (NSInteger) fromNibble:(NSInteger)x {\n    return x == 0 ? 16 : x;\n}\n\n@end\n"
  },
  {
    "path": "Pods/CoreBitcoin/CoreBitcoin/BTCSignatureHashType.h",
    "content": "// CoreBitcoin by Oleg Andreev <oleganza@gmail.com>, WTFPL.\n\n#ifndef CoreBitcoin_BTCSignatureHashType_h\n#define CoreBitcoin_BTCSignatureHashType_h\n\n// Hash type determines how OP_CHECKSIG hashes the transaction to create or\n// verify the signature in a transaction input.\n// Depending on hash type, transaction is modified in some way before its hash is computed.\n// Hash type is 1 byte appended to a signature in a transaction input.\ntypedef NS_ENUM(unsigned char, BTCSignatureHashType)\n{\n    // First three types are mutually exclusive (tested using \"type & 0x1F\").\n    \n    // Default. Signs all inputs and outputs.\n    // Other inputs have scripts and sequences zeroed out, current input has its script\n    // replaced by the previous transaction's output script (or, in case of P2SH,\n    // by the signatures and the redemption script).\n    // If (type & 0x1F) is not NONE or SINGLE, then this type is used.\n    SIGHASH_ALL          = 1,\n    BTCSignatureHashTypeAll = SIGHASH_ALL,\n    \n    // All outputs are removed. \"I don't care where it goes as long as others pay\".\n    // Note: this is not safe when used with ANYONECANPAY, because then anyone who relays the transaction\n    // can pick your input and use in his own transaction.\n    // It's also not safe if all inputs are SIGHASH_NONE as well (or it's the only input).\n    SIGHASH_NONE         = 2,\n    BTCSignatureHashTypeNone = SIGHASH_NONE,\n    \n    // Hash only the output with the same index as the current input.\n    // Preceding outputs are \"nullified\", other outputs are removed.\n    // Special case: if there is no matching output, hash is \"0000000000000000000000000000000000000000000000000000000000000001\" (32 bytes)\n    SIGHASH_SINGLE       = 3,\n    BTCSignatureHashTypeSingle = SIGHASH_SINGLE,\n    \n    // This mask is used to determine one of the first types independently from ANYONECANPAY option:\n    // E.g. if (type & SIGHASH_OUTPUT_MASK == SIGHASH_NONE) { blank all outputs }\n    SIGHASH_OUTPUT_MASK  = 0x1F,\n    BTCSignatureHashTypeOutputMask = SIGHASH_OUTPUT_MASK,\n    \n    // Removes all inputs except for current txin before hashing.\n    // This allows to sign the transaction outputs without knowing who and how adds other inputs.\n    // E.g. a crowdfunding transaction with 100 BTC output can be signed independently by any number of people\n    // and will become valid only when someone combines all inputs in a single transaction to make it valid.\n    // Can be used together with any of the above types.\n    SIGHASH_ANYONECANPAY = 0x80,\n    BTCSignatureHashTypeAnyoneCanPay = SIGHASH_ANYONECANPAY,\n};\n\n#endif\n"
  },
  {
    "path": "Pods/CoreBitcoin/CoreBitcoin/BTCTransaction.h",
    "content": "// CoreBitcoin by Oleg Andreev <oleganza@gmail.com>, WTFPL.\n\n#import <Foundation/Foundation.h>\n#import \"BTCUnitsAndLimits.h\"\n#import \"BTCSignatureHashType.h\"\n\nstatic const uint32_t BTCTransactionCurrentVersion = 1;\nstatic const BTCAmount BTCTransactionDefaultFeeRate = 10000; // 10K satoshis per 1000 bytes\n\n\n@class BTCScript;\n@class BTCTransactionInput;\n@class BTCTransactionOutput;\n\n/*!\n * Converts string transaction ID (reversed tx hash in hex format) to transaction hash.\n */\nNSData* BTCTransactionHashFromID(NSString* txid) DEPRECATED_ATTRIBUTE;\n\n/*!\n * Converts hash of the transaction to its string ID (reversed tx hash in hex format).\n */\nNSString* BTCTransactionIDFromHash(NSData* txhash) DEPRECATED_ATTRIBUTE;\n\n\n/*!\n * BTCTransaction represents a Bitcoin transaction structure which contains\n * inputs, outputs and additional metadata.\n */\n@interface BTCTransaction : NSObject<NSCopying>\n\n// Raw transaction hash SHA256(SHA256(payload))\n@property(nonatomic, readonly) NSData* transactionHash;\n\n/*!\n * Hex representation of reversed `-transactionHash`.\n * This property is deprecated. Use `-transactionID` instead.\n */\n@property(nonatomic, readonly) NSString* displayTransactionHash DEPRECATED_ATTRIBUTE;\n\n/*!\n * Hex representation of reversed `-transactionHash`. Also known as \"txid\".\n */\n@property(nonatomic, readonly) NSString* transactionID;\n\n// Array of BTCTransactionInput objects\n@property(nonatomic) NSArray* inputs;\n\n// Array of BTCTransactionOutput objects\n@property(nonatomic) NSArray* outputs;\n\n// Version. Default is 1.\n@property(nonatomic) uint32_t version;\n\n// Lock time. Either a block height or a unix timestamp.\n// Default is 0.\n@property(nonatomic) uint32_t lockTime; // aka \"lock_time\"\n\n// Binary representation on tx ready to be sent over the wire (aka \"payload\")\n@property(nonatomic, readonly) NSData* data;\n\n// Binary representiation in hex.\n@property(nonatomic, readonly) NSString* hex;\n\n\n// Informational properties\n// ------------------------\n// These are set by external APIs such as Chain.com.\n\n\n// Hash of the block in which transaction is included.\n// Default is nil.\n@property(nonatomic) NSData* blockHash;\n\n// ID of the block in which transaction is included.\n// Default is nil.\n@property(nonatomic) NSString* blockID;\n\n// Height of the block in which this transaction is included.\n// Unconfirmed transactions may be marked with -1 block height.\n// Default is 0.\n@property(nonatomic) NSInteger blockHeight;\n\n// Date and time of the block if specified by the API that returns this transaction.\n// Default is nil.\n@property(nonatomic) NSDate* blockDate;\n\n// Number of confirmations. Default is NSNotFound.\n@property(nonatomic) NSUInteger confirmations;\n\n// Mining fee paid by this transaction.\n// If set, `inputs_amount` is updated as (`outputs_amount` + `fee`).\n// Default is -1.\n@property(nonatomic) BTCAmount fee;\n\n// If available, returns total amount of all inputs.\n// If set, `fee` is updated as (`inputsAmount` - `outputsAmount`).\n// Default is -1.\n@property(nonatomic) BTCAmount inputsAmount;\n\n// Total amount on all outputs (not including fees).\n// Always available since outputs contain their amounts.\n@property(nonatomic, readonly) BTCAmount outputsAmount;\n\n// Arbitrary information attached to this instance.\n// The reference is copied when this instance is copied.\n// Default is nil.\n@property(nonatomic) NSDictionary* userInfo;\n\n// Returns a dictionary representation suitable for encoding in JSON or Plist.\n@property(nonatomic, readonly) NSDictionary* dictionary;\n\n- (NSDictionary*) dictionaryRepresentation DEPRECATED_ATTRIBUTE;\n\n// Parses tx from data buffer.\n- (id) initWithData:(NSData*)data;\n\n// Parses tx from hex string.\n- (id) initWithHex:(NSString*)hex;\n\n// Parses input stream (useful when parsing many transactions from a single source, e.g. a block).\n- (id) initWithStream:(NSInputStream*)stream;\n\n// Constructs transaction from its dictionary representation\n- (id) initWithDictionary:(NSDictionary*)dictionary;\n\n// Hash for signing a transaction.\n// You should supply the output script of the previous transaction, desired hash type and input index in this transaction.\n- (NSData*) signatureHashForScript:(BTCScript*)subscript inputIndex:(uint32_t)inputIndex hashType:(BTCSignatureHashType)hashType error:(NSError**)errorOut;\n\n// Adds input script\n- (void) addInput:(BTCTransactionInput*)input;\n\n// Adds output script\n- (void) addOutput:(BTCTransactionOutput*)output;\n\n// Replaces inputs with an empty array.\n- (void) removeAllInputs;\n\n// Replaces outputs with an empty array.\n- (void) removeAllOutputs;\n\n// Returns YES if this txin generates new coins.\n@property(nonatomic, readonly) BOOL isCoinbase;\n\n// Computes estimated fee for this tx size using default fee rate.\n// @see BTCTransactionDefaultFeeRate.\n@property(nonatomic, readonly) BTCAmount estimatedFee;\n\n// Computes estimated fee for this tx size using specified fee rate (satoshis per 1000 bytes).\n- (BTCAmount) estimatedFeeWithRate:(BTCAmount)feePerK;\n\n// Computes estimated fee for the given tx size using specified fee rate (satoshis per 1000 bytes).\n+ (BTCAmount) estimateFeeForSize:(NSInteger)txsize feeRate:(BTCAmount)feePerK;\n\n\n// These fee methods need to be reviewed. They are for validating incoming transactions, not for\n// calculating a fee for a new transaction.\n\n// Minimum fee to relay the transaction\n- (BTCAmount) minimumRelayFee;\n\n// Minimum fee to send the transaction\n- (BTCAmount) minimumSendFee;\n\n// Minimum base fee to send a transaction.\n+ (BTCAmount) minimumFee;\n+ (void) setMinimumFee:(BTCAmount)fee;\n\n// Minimum base fee to relay a transaction.\n+ (BTCAmount) minimumRelayFee;\n+ (void) setMinimumRelayFee:(BTCAmount)fee;\n\n\n@end\n"
  },
  {
    "path": "Pods/CoreBitcoin/CoreBitcoin/BTCTransaction.m",
    "content": "// Oleg Andreev <oleganza@gmail.com>\n\n#import \"BTCTransaction.h\"\n#import \"BTCTransactionInput.h\"\n#import \"BTCTransactionOutput.h\"\n#import \"BTCProtocolSerialization.h\"\n#import \"BTCData.h\"\n#import \"BTCScript.h\"\n#import \"BTCErrors.h\"\n#import \"BTCHashID.h\"\n\nNSData* BTCTransactionHashFromID(NSString* txid) {\n    return BTCHashFromID(txid);\n}\n\nNSString* BTCTransactionIDFromHash(NSData* txhash) {\n    return BTCIDFromHash(txhash);\n}\n\n@interface BTCTransaction ()\n@end\n\n@implementation BTCTransaction\n\n- (id) init {\n    if (self = [super init]) {\n        // init default values\n        _version = BTCTransactionCurrentVersion;\n        _lockTime = 0;\n        _inputs = @[];\n        _outputs = @[];\n        _blockHeight = 0;\n        _blockDate = nil;\n        _confirmations = NSNotFound;\n        _fee = -1;\n        _inputsAmount = -1;\n    }\n    return self;\n}\n\n// Parses tx from data buffer.\n- (id) initWithData:(NSData*)data {\n    if (self = [self init]) {\n        if (![self parseData:data]) return nil;\n    }\n    return self;\n}\n\n// Parses tx from hex string.\n- (id) initWithHex:(NSString*)hex {\n    return [self initWithData:BTCDataFromHex(hex)];\n}\n\n// Parses input stream (useful when parsing many transactions from a single source, e.g. a block).\n- (id) initWithStream:(NSInputStream*)stream {\n    if (self = [self init]) {\n        if (![self parseStream:stream]) return nil;\n    }\n    return self;\n}\n\n// Constructs transaction from dictionary representation\n- (id) initWithDictionary:(NSDictionary*)dictionary {\n    if (self = [self init]) {\n        _version = (uint32_t)[dictionary[@\"ver\"] unsignedIntegerValue];\n        _lockTime = (uint32_t)[dictionary[@\"lock_time\"] unsignedIntegerValue];\n        \n        NSMutableArray* ins = [NSMutableArray array];\n        for (id dict in dictionary[@\"in\"]) {\n            BTCTransactionInput* txin = [[BTCTransactionInput alloc] initWithDictionary:dict];\n            if (!txin) return nil;\n            [ins addObject:txin];\n        }\n        _inputs = ins;\n        \n        NSMutableArray* outs = [NSMutableArray array];\n        for (id dict in dictionary[@\"out\"]) {\n            BTCTransactionOutput* txout = [[BTCTransactionOutput alloc] initWithDictionary:dict];\n            if (!txout) return nil;\n            [outs addObject:txout];\n        }\n        _outputs = outs;\n    }\n    return self;\n}\n\n// Returns a dictionary representation suitable for encoding in JSON or Plist.\n- (NSDictionary*) dictionaryRepresentation {\n    return self.dictionary;\n}\n\n- (NSDictionary*) dictionary {\n    return @{\n      @\"hash\":      self.transactionID,\n      @\"ver\":       @(_version),\n      @\"vin_sz\":    @(_inputs.count),\n      @\"vout_sz\":   @(_outputs.count),\n      @\"lock_time\": @(_lockTime),\n      @\"size\":      @(self.data.length),\n      @\"in\":        [_inputs valueForKey:@\"dictionary\"],\n      @\"out\":       [_outputs valueForKey:@\"dictionary\"],\n    };\n}\n\n\n#pragma mark - NSObject\n\n\n\n- (BOOL) isEqual:(BTCTransaction*)object {\n    if (![object isKindOfClass:[BTCTransaction class]]) return NO;\n    return [object.transactionHash isEqual:self.transactionHash];\n}\n\n- (NSUInteger) hash {\n    if (self.transactionHash.length >= sizeof(NSUInteger)) {\n        // Interpret first bytes as a hash value\n        return *((NSUInteger*)self.transactionHash.bytes);\n    } else {\n        return 0;\n    }\n}\n\n- (id) copyWithZone:(NSZone *)zone {\n    BTCTransaction* tx = [[BTCTransaction alloc] init];\n    tx->_inputs = [[NSArray alloc] initWithArray:self.inputs copyItems:YES]; // so each element is copied individually\n    tx->_outputs = [[NSArray alloc] initWithArray:self.outputs copyItems:YES]; // so each element is copied individually\n    for (BTCTransactionInput* txin in tx.inputs) {\n        txin.transaction = self;\n    }\n    for (BTCTransactionOutput* txout in tx.outputs) {\n        txout.transaction = self;\n    }\n    tx.version = self.version;\n    tx.lockTime = self.lockTime;\n\n    // Copy informational properties as is.\n    tx.blockHash     = [_blockHash copy];\n    tx.blockHeight   = _blockHeight;\n    tx.blockDate     = _blockDate;\n    tx.confirmations = _confirmations;\n    tx.userInfo      = _userInfo;\n\n    return tx;\n}\n\n\n\n#pragma mark - Properties\n\n\n- (NSData*) transactionHash {\n    return BTCHash256(self.data);\n}\n\n- (NSString*) displayTransactionHash { // deprecated\n    return self.transactionID;\n}\n\n- (NSString*) transactionID {\n    return BTCIDFromHash(self.transactionHash);\n}\n\n- (NSString*) blockID {\n    return BTCIDFromHash(self.blockHash);\n}\n\n- (void) setBlockID:(NSString *)blockID {\n    self.blockHash = BTCHashFromID(blockID);\n}\n\n- (NSData*) data {\n    return [self computePayload];\n}\n\n- (NSString*) hex {\n    return BTCHexFromData(self.data);\n}\n\n- (NSData*) computePayload {\n    NSMutableData* payload = [NSMutableData data];\n    \n    // 4-byte version\n    uint32_t ver = _version;\n    [payload appendBytes:&ver length:4];\n    \n    // varint with number of inputs\n    [payload appendData:[BTCProtocolSerialization dataForVarInt:_inputs.count]];\n    \n    // input payloads\n    for (BTCTransactionInput* input in _inputs) {\n        [payload appendData:input.data];\n    }\n    \n    // varint with number of outputs\n    [payload appendData:[BTCProtocolSerialization dataForVarInt:_outputs.count]];\n    \n    // output payloads\n    for (BTCTransactionOutput* output in _outputs) {\n        [payload appendData:output.data];\n    }\n    \n    // 4-byte lock_time\n    uint32_t lt = _lockTime;\n    [payload appendBytes:&lt length:4];\n    \n    return payload;\n}\n\n\n#pragma mark - Methods\n\n\n// Adds input script\n- (void) addInput:(BTCTransactionInput*)input {\n    if (!input) return;\n    [self linkInput:input];\n    _inputs = [_inputs arrayByAddingObject:input];\n}\n\n- (void) linkInput:(BTCTransactionInput*)input {\n    if (!(input.transaction == nil || input.transaction == self)) {\n        @throw [NSException exceptionWithName:@\"BTCTransaction consistency error!\" reason:@\"Can't add an input to a transaction when it references another transaction.\" userInfo:nil];\n        return;\n    }\n    input.transaction = self;\n}\n\n// Adds output script\n- (void) addOutput:(BTCTransactionOutput*)output {\n    if (!output) return;\n    [self linkOutput:output];\n    _outputs = [_outputs arrayByAddingObject:output];\n}\n\n- (void) linkOutput:(BTCTransactionOutput*)output {\n    if (!(output.transaction == nil || output.transaction == self)) {\n        @throw [NSException exceptionWithName:@\"BTCTransaction consistency error!\" reason:@\"Can't add an output to a transaction when it references another transaction.\" userInfo:nil];\n        return;\n    }\n    output.index = BTCTransactionOutputIndexUnknown; // reset to be recomputed lazily later\n    output.transactionHash = nil; // can't be reliably set here because transaction may get updated.\n    output.transaction = self;\n}\n\n- (void) setInputs:(NSArray *)inputs {\n    [self removeAllInputs];\n    for (BTCTransactionInput* txin in inputs) {\n        [self addInput:txin];\n    }\n}\n\n- (void) setOutputs:(NSArray *)outputs {\n    [self removeAllOutputs];\n    for (BTCTransactionOutput* txout in outputs) {\n        [self addOutput:txout];\n    }\n}\n\n- (void) removeAllInputs {\n    for (BTCTransactionInput* txin in _inputs) {\n        txin.transaction = nil;\n    }\n    _inputs = @[];\n}\n\n- (void) removeAllOutputs {\n    for (BTCTransactionOutput* txout in _outputs) {\n        txout.transaction = nil;\n    }\n    _outputs = @[];\n}\n\n- (BOOL) isCoinbase {\n    // Coinbase transaction has one input and it must be coinbase.\n    return (_inputs.count == 1 && [(BTCTransactionInput*)_inputs[0] isCoinbase]);\n}\n\n\n#pragma mark - Serialization and parsing\n\n\n\n- (BOOL) parseData:(NSData*)data {\n    if (!data) return NO;\n    NSInputStream* stream = [NSInputStream inputStreamWithData:data];\n    [stream open];\n    BOOL result = [self parseStream:stream];\n    [stream close];\n    return result;\n}\n\n- (BOOL) parseStream:(NSInputStream*)stream {\n    if (!stream) return NO;\n    if (stream.streamStatus == NSStreamStatusClosed) return NO;\n    if (stream.streamStatus == NSStreamStatusNotOpen) return NO;\n    \n    if ([stream read:(uint8_t*)&_version maxLength:sizeof(_version)] != sizeof(_version)) return NO;\n    \n    {\n        uint64_t inputsCount = 0;\n        if ([BTCProtocolSerialization readVarInt:&inputsCount fromStream:stream] == 0) return NO;\n        \n        NSMutableArray* ins = [NSMutableArray array];\n        for (uint64_t i = 0; i < inputsCount; i++)\n        {\n            BTCTransactionInput* input = [[BTCTransactionInput alloc] initWithStream:stream];\n            if (!input) return NO;\n            [self linkInput:input];\n            [ins addObject:input];\n        }\n        _inputs = ins;\n    }\n\n    {\n        uint64_t outputsCount = 0;\n        if ([BTCProtocolSerialization readVarInt:&outputsCount fromStream:stream] == 0) return NO;\n            \n        NSMutableArray* outs = [NSMutableArray array];\n        for (uint64_t i = 0; i < outputsCount; i++)\n        {\n            BTCTransactionOutput* output = [[BTCTransactionOutput alloc] initWithStream:stream];\n            if (!output) return NO;\n            [self linkOutput:output];\n            [outs addObject:output];\n        }\n        _outputs = outs;\n    }\n    \n    if ([stream read:(uint8_t*)&_lockTime maxLength:sizeof(_lockTime)] != sizeof(_lockTime)) return NO;\n    \n    return YES;\n}\n\n\n#pragma mark - Signing a transaction\n\n\n\n// Hash for signing a transaction.\n// You should supply the output script of the previous transaction, desired hash type and input index in this transaction.\n- (NSData*) signatureHashForScript:(BTCScript*)subscript inputIndex:(uint32_t)inputIndex hashType:(BTCSignatureHashType)hashType error:(NSError**)errorOut {\n    // Create a temporary copy of the transaction to apply modifications to it.\n    BTCTransaction* tx = [self copy];\n    \n    // We may have a scriptmachine instantiated without a transaction (for testing),\n    // but it should not use signature checks then.\n    if (!tx || inputIndex == 0xFFFFFFFF) {\n        if (errorOut) *errorOut = [NSError errorWithDomain:BTCErrorDomain\n                                                      code:BTCErrorScriptError\n                                                  userInfo:@{NSLocalizedDescriptionKey: NSLocalizedString(@\"Transaction and valid input index must be provided for signature verification.\", @\"\")}];\n        return nil;\n    }\n    \n    // Note: BitcoinQT returns a 256-bit little-endian number 1 in such case, but it does not matter\n    // because it would crash before that in CScriptCheck::operator()(). We normally won't enter this condition\n    // if script machine is instantiated with initWithTransaction:inputIndex:, but if it was just -init-ed, it's better to check.\n    if (inputIndex >= tx.inputs.count) {\n        if (errorOut) *errorOut = [NSError errorWithDomain:BTCErrorDomain\n                                                      code:BTCErrorScriptError\n                                                  userInfo:@{NSLocalizedDescriptionKey:[NSString stringWithFormat:\n                                                     NSLocalizedString(@\"Input index is out of bounds for transaction: %d >= %d.\", @\"\"),\n                                                                                        (int)inputIndex, (int)tx.inputs.count]}];\n        return nil;\n    }\n    \n    // In case concatenating two scripts ends up with two codeseparators,\n    // or an extra one at the end, this prevents all those possible incompatibilities.\n    // Note: this normally never happens because there is no use for OP_CODESEPARATOR.\n    // But we have to do that cleanup anyway to not break on rare transaction that use that for lulz.\n    // Also: we modify the same subscript which is used several times for multisig check, but that's what BitcoinQT does as well.\n    [subscript deleteOccurrencesOfOpcode:OP_CODESEPARATOR];\n    \n    // Blank out other inputs' signature scripts\n    // and replace our input script with a subscript (which is typically a full output script from the previous transaction).\n    for (BTCTransactionInput* txin in tx.inputs) {\n        txin.signatureScript = [[BTCScript alloc] init];\n    }\n    ((BTCTransactionInput*)tx.inputs[inputIndex]).signatureScript = subscript;\n    \n    // Blank out some of the outputs depending on BTCSignatureHashType\n    // Default is SIGHASH_ALL - all inputs and outputs are signed.\n    if ((hashType & SIGHASH_OUTPUT_MASK) == SIGHASH_NONE) {\n        // Wildcard payee - we can pay anywhere.\n        [tx removeAllOutputs];\n        \n        // Blank out others' input sequence numbers to let others update transaction at will.\n        for (NSUInteger i = 0; i < tx.inputs.count; i++) {\n            if (i != inputIndex) {\n                ((BTCTransactionInput*)tx.inputs[i]).sequence = 0;\n            }\n        }\n    } else if ((hashType & SIGHASH_OUTPUT_MASK) == SIGHASH_SINGLE) {\n        // Single mode assumes we sign an output at the same index as an input.\n        // Outputs before the one we need are blanked out. All outputs after are simply removed.\n        // Only lock-in the txout payee at same index as txin.\n        uint32_t outputIndex = inputIndex;\n        \n        // If outputIndex is out of bounds, BitcoinQT is returning a 256-bit little-endian 0x01 instead of failing with error.\n        // We should do the same to stay compatible.\n        if (outputIndex >= tx.outputs.count) {\n            static unsigned char littleEndianOne[32] = {1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};\n            return [NSData dataWithBytes:littleEndianOne length:32];\n        }\n        \n        // All outputs before the one we need are blanked out. All outputs after are simply removed.\n        // This is equivalent to replacing outputs with (i-1) empty outputs and a i-th original one.\n        BTCTransactionOutput* myOutput = tx.outputs[outputIndex];\n        [tx removeAllOutputs];\n        for (int i = 0; i < outputIndex; i++) {\n            [tx addOutput:[[BTCTransactionOutput alloc] init]];\n        }\n        [tx addOutput:myOutput];\n        \n        // Blank out others' input sequence numbers to let others update transaction at will.\n        for (NSUInteger i = 0; i < tx.inputs.count; i++) {\n            if (i != inputIndex) {\n                ((BTCTransactionInput*)tx.inputs[i]).sequence = 0;\n            }\n        }\n    }\n    \n    // Blank out other inputs completely. This is not recommended for open transactions.\n    if (hashType & SIGHASH_ANYONECANPAY) {\n        BTCTransactionInput* input = tx.inputs[inputIndex];\n        [tx removeAllInputs];\n        [tx addInput:input];\n    }\n    \n    // Important: we have to hash transaction together with its hash type.\n    // Hash type is appended as little endian uint32 unlike 1-byte suffix of the signature.\n    NSMutableData* fulldata = [tx.data mutableCopy];\n    uint32_t hashType32 = OSSwapHostToLittleInt32((uint32_t)hashType);\n    [fulldata appendBytes:&hashType32 length:sizeof(hashType32)];\n    \n    NSData* hash = BTCHash256(fulldata);\n    \n//    NSLog(@\"\\n----------------------\\n\");\n//    NSLog(@\"TX: %@\", BTCHexFromData(fulldata));\n//    NSLog(@\"TX SUBSCRIPT: %@ (%@)\", BTCHexFromData(subscript.data), subscript);\n//    NSLog(@\"TX HASH: %@\", BTCHexFromData(hash));\n//    NSLog(@\"TX PLIST: %@\", tx.dictionary);\n    \n    return hash;\n}\n\n\n\n\n\n\n#pragma mark - Amounts and fee\n\n\n\n@synthesize fee=_fee;\n@synthesize inputsAmount=_inputsAmount;\n\n- (void) setFee:(BTCAmount)fee {\n    _fee = fee;\n    _inputsAmount = -1; // will be computed from fee or inputs.map(&:value)\n}\n\n- (BTCAmount) fee {\n    if (_fee != -1) {\n        return _fee;\n    }\n\n    BTCAmount ia = self.inputsAmount;\n    if (ia != -1) {\n        return ia - self.outputsAmount;\n    }\n\n    return -1;\n}\n\n- (void) setInputsAmount:(BTCAmount)inputsAmount {\n    _inputsAmount = inputsAmount;\n    _fee = -1; // will be computed from inputs and outputs amount on the fly.\n}\n\n- (BTCAmount) inputsAmount {\n    if (_inputsAmount != -1) {\n        return _inputsAmount;\n    }\n\n    if (_fee != -1) {\n        return _fee + self.outputsAmount;\n    }\n\n    // Try to figure the total amount from amounts on inputs.\n    // If all of them are non-nil, we have a valid amount.\n\n    BTCAmount total = 0;\n    for (BTCTransactionInput* txin in self.inputs) {\n        BTCAmount v = txin.value;\n        if (v == -1) {\n            return -1;\n        }\n        total += v;\n    }\n    return total;\n}\n\n- (BTCAmount) outputsAmount {\n    BTCAmount a = 0;\n    for (BTCTransactionOutput* txout in self.outputs) {\n        a += txout.value;\n    }\n    return a;\n}\n\n\n\n\n\n\n#pragma mark - Fees\n\n\n\n// Computes estimated fee for this tx size using default fee rate.\n// @see BTCTransactionDefaultFeeRate.\n- (BTCAmount) estimatedFee {\n    return [self estimatedFeeWithRate:BTCTransactionDefaultFeeRate];\n}\n\n// Computes estimated fee for this tx size using specified fee rate (satoshis per 1000 bytes).\n- (BTCAmount) estimatedFeeWithRate:(BTCAmount)feePerK {\n    return [BTCTransaction estimateFeeForSize:self.data.length feeRate:feePerK];\n}\n\n// Computes estimated fee for the given tx size using specified fee rate (satoshis per 1000 bytes).\n+ (BTCAmount) estimateFeeForSize:(NSInteger)txsize feeRate:(BTCAmount)feePerK {\n    if (feePerK <= 0) return 0;\n    BTCAmount fee = 0;\n    while (txsize > 0) { // add fee rate for each (even incomplete) 1K byte chunk\n        txsize -= 1000;\n        fee += feePerK;\n    }\n    return fee;\n}\n\n\n\n\n// TO BE REVIEWED:\n\n\n\n// Minimum base fee to send a transaction.\n+ (BTCAmount) minimumFee {\n    NSNumber* n = [[NSUserDefaults standardUserDefaults] objectForKey:@\"BTCTransactionMinimumFee\"];\n    if (!n) return 10000;\n    return (BTCAmount)[n longLongValue];\n}\n\n+ (void) setMinimumFee:(BTCAmount)fee {\n    fee = MIN(fee, BTC_MAX_MONEY);\n    [[NSUserDefaults standardUserDefaults] setObject:[NSNumber numberWithLongLong:fee] forKey:@\"BTCTransactionMinimumFee\"];\n}\n\n// Minimum base fee to relay a transaction.\n+ (BTCAmount) minimumRelayFee {\n    NSNumber* n = [[NSUserDefaults standardUserDefaults] objectForKey:@\"BTCTransactionMinimumRelayFee\"];\n    if (!n) return 10000;\n    return (BTCAmount)[n longLongValue];\n}\n\n+ (void) setMinimumRelayFee:(BTCAmount)fee {\n    fee = MIN(fee, BTC_MAX_MONEY);\n    [[NSUserDefaults standardUserDefaults] setObject:[NSNumber numberWithLongLong:fee] forKey:@\"BTCTransactionMinimumRelayFee\"];\n}\n\n\n// Minimum fee to relay the transaction\n- (BTCAmount) minimumRelayFee {\n    return [self minimumFeeForSending:NO];\n}\n\n// Minimum fee to send the transaction\n- (BTCAmount) minimumSendFee {\n    return [self minimumFeeForSending:YES];\n}\n\n- (BTCAmount) minimumFeeForSending:(BOOL)sending {\n    // See also CTransaction::GetMinFee in BitcoinQT and calculate_minimum_fee in bitcoin-ruby\n    \n    // BitcoinQT calculates min fee based on current block size, but it's unused and constant value is used today instead.\n    NSUInteger baseBlockSize = 1000;\n    // BitcoinQT has some complex formulas to determine when we shouldn't allow free txs. To be done later.\n    BOOL allowFree = YES;\n    \n    BTCAmount baseFee = sending ? [BTCTransaction minimumFee] : [BTCTransaction minimumRelayFee];\n    NSUInteger txSize = self.data.length;\n    NSUInteger newBlockSize = baseBlockSize + txSize;\n    BTCAmount minFee = (1 + txSize / 1000) * baseFee;\n    \n    if (allowFree) {\n        if (newBlockSize == 1) {\n            // Transactions under 10K are free\n            // (about 4500 BTC if made of 50 BTC inputs)\n            if (txSize < 10000)\n                minFee = 0;\n        } else {\n            // Free transaction area\n            if (newBlockSize < 27000)\n                minFee = 0;\n        }\n    }\n    \n    // To limit dust spam, require base fee if any output is less than 0.01\n    if (minFee < baseFee) {\n        for (BTCTransactionOutput* txout in _outputs) {\n            if (txout.value < BTCCent) {\n                minFee = baseFee;\n                break;\n            }\n        }\n    }\n    \n    // Raise the price as the block approaches full\n    if (baseBlockSize != 1 && newBlockSize >= BTC_MAX_BLOCK_SIZE_GEN/2) {\n        if (newBlockSize >= BTC_MAX_BLOCK_SIZE_GEN)\n            return BTC_MAX_MONEY;\n        minFee *= BTC_MAX_BLOCK_SIZE_GEN / (BTC_MAX_BLOCK_SIZE_GEN - newBlockSize);\n    }\n    \n    if (minFee < 0 || minFee > BTC_MAX_MONEY) minFee = BTC_MAX_MONEY;\n    \n    return minFee;\n}\n\n\n\n@end\n"
  },
  {
    "path": "Pods/CoreBitcoin/CoreBitcoin/BTCTransactionBuilder.h",
    "content": "// CoreBitcoin by Oleg Andreev <oleganza@gmail.com>, WTFPL.\n\n#import <Foundation/Foundation.h>\n#import \"BTCUnitsAndLimits.h\"\nextern NSString* const BTCTransactionBuilderErrorDomain;\n\ntypedef NS_ENUM(NSUInteger, BTCTransactionBuilderError) {\n\n    // Change address is not specified.\n    BTCTransactionBuilderChangeAddressMissing = 1,\n\n    // No unspent outputs were provided or found.\n    BTCTransactionBuilderUnspentOutputsMissing = 2,\n\n    // Unspent outputs are not sufficient to build the transaction.\n    BTCTransactionBuilderInsufficientFunds = 3,\n};\n\n@class BTCKey;\n@class BTCScript;\n@class BTCAddress;\n@class BTCTransaction;\n@class BTCTransactionInput;\n@class BTCTransactionOutput;\n@class BTCTransactionBuilder;\n@class BTCTransactionBuilderResult;\n\n@protocol BTCTransactionBuilderDataSource <NSObject>\n\n@required\n\n// Called when needs inputs to spend in a transaction.\n// BTCTransactionOutput instances must contain sensible `transactionHash` and `index` properties.\n// Reference of BTCTransactionOutput is assigned to BTCTransactionInput so you could access it to sign the inputs.\n// Unspent outputs are consumed in the same order as they are enumerated.\n// For BIP32 wallets it is recommended to sort unspents by block height (oldest first) to keep the scan window short.\n- (NSEnumerator* /* [BTCTransactionOutput] */) unspentOutputsForTransactionBuilder:(BTCTransactionBuilder*)txbuilder;\n\n@optional\n\n// Called when attempts to sign the inputs.\n// Receiver should provide a key which will be used to create a proper signature script.\n// Transaction builder will sign the input if it spends from one of the standard single-key scripts (p2pkh or p2pk, with compressed or uncompressed pubkeys).\n// Hash type SIGHASH_ALL is used.\n// Return nil if key is not available, then input will be marked as unsigned (unless signed with the next method).\n- (BTCKey*) transactionBuilder:(BTCTransactionBuilder*)txbuilder keyForUnspentOutput:(BTCTransactionOutput*)txout;\n\n// If the previous method not implemented or returns nil, or output script is not supported,\n// then this method is called to allow data source to provide custom signature script.\n// If this method not implemented or returns nil, then input is marked as unsigned.\n- (BTCScript*) transactionBuilder:(BTCTransactionBuilder*)txbuilder signatureScriptForTransaction:(BTCTransaction*)tx script:(BTCScript*)outputScript inputIndex:(NSUInteger)inputIndex;\n\n// Arbitrary data that acts as a random seed to shuffle inputs and outputs.\n// If this method returns nil, private key (if available) will be used.\n// If seed cannot be determined, then inputs and outputs are not shuffled at all to avoid matching transaction\n// with this particular application (\"default order\" is used).\n- (NSData*) shuffleSeedForTransactionBuilder:(BTCTransactionBuilder*)txbuilder;\n\n@end\n\n// Transaction builder allows you to compose a transaction with necessary parameters.\n// It takes care of picking necessary unspent outputs and singing inputs.\n@interface BTCTransactionBuilder : NSObject\n\n// Data source that provides inputs.\n// If you do not provide a dataSource, you should provide unspent outputs via `unspentOutputsEnumerator`.\n@property(weak,nonatomic) id<BTCTransactionBuilderDataSource> dataSource;\n\n// Instead of using data source, provide unspent outputs directly.\n// Unspent outputs are consumed in the same order as they are enumerated.\n// For BIP32 wallets it is recommended to sort unspents by block height (oldest first) to\n// keep the scan window short.\n@property(nonatomic) NSEnumerator* unspentOutputsEnumerator;\n\n// Optional list of outputs for which the transaction is intended.\n// If outputs is nil or empty array, will attempt to spend all input to change address (\"sweeping\").\n// If not empty, will use the least amount of inputs to cover output values and the fee.\n@property(nonatomic) NSArray* outputs;\n\n// Change address where remaining funds should be sent.\n// Either `changeAddress` or `changeScript` must not be nil.\n@property(nonatomic) BTCAddress* changeAddress;\n\n// Change script where remaining funds should be sent.\n// Must not be nil. Default value is derived from `changeAddress`.\n@property(nonatomic) BTCScript* changeScript;\n\n\n// Attempts to build and possibly sign a transaction (if sign = YES).\n// Returns a result object containing the transaction itself\n// and metadata about it (fee, input and output balances, indexes of unsigned inputs).\n// If failed to build a transaction, returns nil and sets error to one from BTCTransactionBuilderErrorDomain.\n- (BTCTransactionBuilderResult*) buildTransaction:(NSError**)errorOut;\n\n\n\n// Optional configuration properties\n// ---------------------------------\n\n// Fee per 1000 bytes. Default is BTCTransactionDefaultFeeRate.\n@property(nonatomic) BTCAmount feeRate;\n\n// Minimum amount of change below which transaction is not composed.\n// If change amount is non-zero and below this value, more unspent outputs are used.\n// If change amount is zero, change output is not even created and this property is not used.\n// Default value equals feeRate.\n@property(nonatomic) BTCAmount minimumChange;\n\n\n// Amount of change that can be forgone as a mining fee if there are no more\n// unspent outputs available. If equals zero, no amount is allowed to be forgone.\n// Default value equals minimumChange.\n// This means builder will never fail with BTCTransactionBuilderErrorInsufficientFunds just because it could not\n// find enough unspents for big enough change. In worst case (not enough unspent to bump change) it will forgo the change\n// as a part of the mining fee. Set to 0 to avoid forgoing a single satoshi.\n@property(nonatomic) BTCAmount dustChange;\n\n// Whether this builder should even attempt to sign transaction.\n// Set to NO if you want a lightweight decision if there are enough funds etc\n// (e.g. when doing on-the-fly calculation as user edits payment details).\n// Default is YES.\n@property(nonatomic) BOOL shouldSign;\n\n// Flag determining whether builder should attempt to shuffle inputs and outputs.\n// If shuffle seed is not available or private key is not provided by data source,\n// then inputs/outputs will not be shuffled to avoid matching with this app's algorithm.\n// Default is YES.\n@property(nonatomic) BOOL shouldShuffle;\n\n@end\n\n\n// Result of building a transaction. Contains a transaction itself with various metadata.\n@interface BTCTransactionBuilderResult : NSObject\n\n// Actual transaction with complete inputs and outputs.\n// If some inputs are not signed, unsignedInputsIndexes will contain their indexes.\n@property(nonatomic, readonly) BTCTransaction* transaction;\n\n// Indexes of unsigned inputs. Such inputs have BTCTransactionOutput script in place of signatureScript.\n// Also, every input has a reference to unspent BTCTransactionOutput provided by data source (or unspentOutputsEnumerator).\n@property(nonatomic, readonly) NSIndexSet* unsignedInputsIndexes;\n\n// Complete fee this transaction pays to miners.\n// Equals (inputsAmount - outputsAmount).\n@property(nonatomic, readonly) BTCAmount fee;\n\n// Complete amount on the inputs.\n@property(nonatomic, readonly) BTCAmount inputsAmount;\n\n// Complete amount on the outputs.\n@property(nonatomic, readonly) BTCAmount outputsAmount;\n\n@end\n\n"
  },
  {
    "path": "Pods/CoreBitcoin/CoreBitcoin/BTCTransactionBuilder.m",
    "content": "#import \"BTCTransactionBuilder.h\"\n#import \"BTCTransaction.h\"\n#import \"BTCTransactionOutput.h\"\n#import \"BTCTransactionInput.h\"\n#import \"BTCAddress.h\"\n#import \"BTCScript.h\"\n#import \"BTCKey.h\"\n#import \"BTCData.h\"\n\nNSString* const BTCTransactionBuilderErrorDomain = @\"com.oleganza.CoreBitcoin.TransactionBuilder\";\n\n@interface BTCTransactionBuilderResult ()\n@property(nonatomic, readwrite) BTCTransaction* transaction;\n@property(nonatomic, readwrite) NSIndexSet* unsignedInputsIndexes;\n@property(nonatomic, readwrite) BTCAmount fee;\n@property(nonatomic, readwrite) BTCAmount inputsAmount;\n@property(nonatomic, readwrite) BTCAmount outputsAmount;\n@end\n\n@implementation BTCTransactionBuilder\n\n- (id) init {\n    if (self = [super init]) {\n        _feeRate = BTCTransactionDefaultFeeRate;\n        _minimumChange = -1; // so it picks feeRate at runtime.\n        _dustChange = -1; // so it picks minimumChange at runtime.\n        _shouldSign = YES;\n        _shouldShuffle = YES;\n    }\n    return self;\n}\n\n- (BTCTransactionBuilderResult*) buildTransaction:(NSError**)errorOut {\n    if (!self.changeScript) {\n        if (errorOut) *errorOut = [NSError errorWithDomain:BTCTransactionBuilderErrorDomain code:BTCTransactionBuilderInsufficientFunds userInfo:nil];\n        return nil;\n    }\n\n    NSEnumerator* unspentsEnumerator = self.unspentOutputsEnumerator;\n\n    if (!unspentsEnumerator) {\n        if (errorOut) *errorOut = [NSError errorWithDomain:BTCTransactionBuilderErrorDomain code:BTCTransactionBuilderUnspentOutputsMissing userInfo:nil];\n        return nil;\n    }\n\n    BTCTransactionBuilderResult* result = [[BTCTransactionBuilderResult alloc] init];\n    result.transaction = [[BTCTransaction alloc] init];\n\n    // If no outputs given, try to spend all available unspents.\n    if (self.outputs.count == 0) {\n        result.inputsAmount = 0;\n\n        for (BTCTransactionOutput* utxo in unspentsEnumerator) {\n            result.inputsAmount += utxo.value;\n\n            BTCTransactionInput* txin = [self makeTransactionInputWithUnspentOutput:utxo];\n            [result.transaction addInput:txin];\n        }\n\n        if (result.transaction.inputs.count == 0) {\n            if (errorOut) *errorOut = [NSError errorWithDomain:BTCTransactionBuilderErrorDomain code:BTCTransactionBuilderUnspentOutputsMissing userInfo:nil];\n            return nil;\n        }\n\n        // Prepare a destination output.\n        // Value will be determined after computing the fee.\n        BTCTransactionOutput* changeOutput = [[BTCTransactionOutput alloc] initWithValue:BTC_MAX_MONEY script:self.changeScript];\n        [result.transaction addOutput:changeOutput];\n\n        result.fee = [self computeFeeForTransaction:result.transaction];\n        result.outputsAmount = result.inputsAmount - result.fee;\n\n        // Check if inputs cover the fees\n        if (result.outputsAmount < 0) {\n            if (errorOut) *errorOut = [NSError errorWithDomain:BTCTransactionBuilderErrorDomain code:BTCTransactionBuilderInsufficientFunds userInfo:nil];\n            return nil;\n        }\n\n        // Set the output value as needed\n        changeOutput.value = result.outputsAmount;\n\n        result.unsignedInputsIndexes = [self attemptToSignTransaction:result.transaction error:errorOut];\n        if (!result.unsignedInputsIndexes) {\n            return nil;\n        }\n\n        return result;\n\n    } // if no outputs\n\n    // We are having one or more outputs (e.g. normal payment)\n    // Need to find appropriate unspents and compose a transaction.\n\n    // Prepare all outputs\n\n    result.outputsAmount = 0; // will contain change value after all inputs are finalized\n\n    for (BTCTransactionOutput* txout in self.outputs) {\n        result.outputsAmount += txout.value;\n        [result.transaction addOutput:txout];\n    }\n\n    // We'll determine final change value depending on inputs.\n    // Setting default to MAX_MONEY will protect against a bug when we fail to update the amount and\n    // spend unexpected amount on mining fees.\n    BTCTransactionOutput* changeOutput = [[BTCTransactionOutput alloc] initWithValue:BTC_MAX_MONEY script:self.changeScript];\n    [result.transaction addOutput:changeOutput];\n\n    // We have specific outputs with specific amounts, so we need to select the best amount of coins.\n\n    result.inputsAmount = 0;\n\n    for (BTCTransactionOutput* utxo in unspentsEnumerator) {\n        result.inputsAmount += utxo.value;\n\n        BTCTransactionInput* txin = [self makeTransactionInputWithUnspentOutput:utxo];\n        [result.transaction addInput:txin];\n\n        // Before computing the fee, quick check if we have enough inputs to cover the outputs.\n        // If not, go and add one more utxo before wasting time computing fees.\n        if (result.inputsAmount < result.outputsAmount) {\n            // Try adding more unspent outputs on the next cycle.\n            continue;\n        }\n\n        BTCAmount fee = [self computeFeeForTransaction:result.transaction];\n\n        BTCAmount change = result.inputsAmount - result.outputsAmount - fee;\n\n        if (change >= self.minimumChange) {\n            // We have a big enough change, set missing values and return.\n            changeOutput.value = change;\n            result.outputsAmount += change;\n            result.fee = fee;\n\n            result.unsignedInputsIndexes = [self attemptToSignTransaction:result.transaction error:errorOut];\n            if (!result.unsignedInputsIndexes) {\n                return nil;\n            }\n            return result;\n        } else if (change > self.dustChange && change < self.minimumChange) {\n            // We have a shitty change: not small enough to forgo, not big enough to be useful.\n            // Try adding more utxos on the next cycle (or fail if no more utxos are available).\n        } else if (change >= 0 && change <= self.dustChange) {\n            // This also includes the case when change is exactly zero satoshis.\n            // Remove the change output, keep existing outputsAmount, set fee and try to sign.\n\n            NSMutableArray* txoutputs = [result.transaction.outputs mutableCopy];\n            [txoutputs removeObjectIdenticalTo:changeOutput];\n            result.transaction.outputs = txoutputs;\n            result.fee = fee;\n            result.unsignedInputsIndexes = [self attemptToSignTransaction:result.transaction error:errorOut];\n            if (!result.unsignedInputsIndexes)\n            {\n                return nil;\n            }\n            return result;\n        } else {\n            // Change is negative, we need more funds for this transaction.\n            // Try adding more utxos on the next cycle.\n        }\n    }\n\n    // If we haven't finished within the loop, then we don't have enough unspent outputs and should fail.\n\n    BTCTransactionBuilderError errorCode = BTCTransactionBuilderInsufficientFunds;\n    if (result.transaction.inputs.count == 0) {\n        errorCode = BTCTransactionBuilderUnspentOutputsMissing;\n    }\n    if (errorOut) *errorOut = [NSError errorWithDomain:BTCTransactionBuilderErrorDomain code:errorCode userInfo:nil];\n    return nil;\n}\n\n\n\n\n// Helpers\n\n\n\n- (BTCTransactionInput*) makeTransactionInputWithUnspentOutput:(BTCTransactionOutput*)utxo {\n    BTCTransactionInput* txin = [[BTCTransactionInput alloc] init];\n\n    if (!utxo.transactionHash || utxo.index == BTCTransactionOutputIndexUnknown) {\n        [[NSException exceptionWithName:@\"Incorrect unspent transaction output\" reason:@\"Unspent output must have valid -transactionHash and -index properties\" userInfo:nil] raise];\n    }\n\n    txin.previousHash = utxo.transactionHash;\n    txin.previousIndex = utxo.index;\n    txin.signatureScript = utxo.script; // put the output script here so the signer knows which key to use.\n    txin.transactionOutput = utxo;\n\n    return txin;\n}\n\n\n- (BTCAmount) computeFeeForTransaction:(BTCTransaction*)tx {\n    // Compute fees for this tx by composing a tx with properly sized dummy signatures.\n    BTCTransaction* simtx = [tx copy];\n    uint32_t i = 0;\n    for (BTCTransactionInput* txin in simtx.inputs) {\n        NSAssert(!!txin.transactionOutput, @\"must have transactionOutput\");\n        BTCScript* txoutScript = txin.transactionOutput.script;\n\n        if (![self attemptToSignTransactionInput:txin tx:simtx inputIndex:i error:NULL]) {\n            // TODO: if cannot match the simulated signature, use data source to provide one. (If signing API available, then use it.)\n            txin.signatureScript = [txoutScript simulatedSignatureScriptWithOptions:BTCScriptSimulationMultisigP2SH];\n        }\n\n        if (!txin.signatureScript) txin.signatureScript = txoutScript;\n\n        i++;\n    }\n    return [simtx estimatedFeeWithRate:self.feeRate];\n}\n\n\n// Tries to sign a transaction and returns index set of unsigned inputs.\n- (NSIndexSet*) attemptToSignTransaction:(BTCTransaction*)tx error:(NSError**)errorOut {\n    // By default, all inputs are marked to be signed.\n    NSMutableIndexSet* unsignedIndexes = [NSMutableIndexSet indexSet];\n    for (NSUInteger i = 0; i < tx.inputs.count; i++) {\n        [unsignedIndexes addIndex:i];\n    }\n\n    // Check if we can possibly sign anything. Otherwise return early.\n    if (!_shouldSign || tx.inputs.count == 0 || !self.dataSource) {\n        return unsignedIndexes;\n    }\n\n    if (_shouldShuffle && _shouldSign) {\n        // Shuffle both the inputs and outputs.\n        NSData* seed = nil;\n\n        if ([self.dataSource respondsToSelector:@selector(shuffleSeedForTransactionBuilder:)]) {\n            seed = [self.dataSource shuffleSeedForTransactionBuilder:self];\n        }\n\n        if (!seed && [self.dataSource respondsToSelector:@selector(transactionBuilder:keyForUnspentOutput:)]) {\n            // find the first key\n            for (BTCTransactionInput* txin in tx.inputs) {\n                BTCKey* k = [self.dataSource transactionBuilder:self keyForUnspentOutput:txin.transactionOutput];\n                seed = k.privateKey;\n                if (seed) break;\n            }\n        }\n\n        // If finally have something as a seed, shuffle\n        if (seed) {\n            tx.inputs = [self shuffleInputs:tx.inputs withSeed:seed];\n            tx.outputs = [self shuffleOutputs:tx.outputs withSeed:seed];\n        }\n    }\n\n    // Try to sign each input.\n    for (uint32_t i = 0; i < tx.inputs.count; i++) {\n        // We support two kinds of scripts: p2pkh (modern style) and p2pk (old style)\n        // For each of these we support compressed and uncompressed pubkeys.\n        BTCTransactionInput* txin = tx.inputs[i];\n\n        if ([self attemptToSignTransactionInput:txin tx:tx inputIndex:i error:errorOut]) {\n            [unsignedIndexes removeIndex:i];\n        }\n    } // each input\n\n    return unsignedIndexes;\n}\n\n- (NSArray*) shuffleInputs:(NSArray*)txins withSeed:(NSData*)seed {\n    return [txins sortedArrayWithOptions:NSSortStable usingComparator:^NSComparisonResult(BTCTransactionInput* a, BTCTransactionInput* b) {\n        NSData* d1 = BTCHash256Concat(a.data, seed);\n        NSData* d2 = BTCHash256Concat(b.data, seed);\n        return [d1.description compare:d2.description];\n    }];\n}\n\n- (NSArray*) shuffleOutputs:(NSArray*)txouts withSeed:(NSData*)seed {\n    return [txouts sortedArrayWithOptions:NSSortStable usingComparator:^NSComparisonResult(BTCTransactionOutput* a, BTCTransactionOutput* b) {\n        NSData* d1 = BTCHash256Concat(a.data, seed);\n        NSData* d2 = BTCHash256Concat(b.data, seed);\n        return [d1.description compare:d2.description];\n    }];\n}\n\n- (BOOL) attemptToSignTransactionInput:(BTCTransactionInput*)txin tx:(BTCTransaction*)tx inputIndex:(uint32_t)i error:(NSError**)errorOut {\n    if (!_shouldSign) return NO;\n\n    // We stored output script here earlier.\n    BTCScript* outputScript = txin.signatureScript;\n    BTCKey* key = nil;\n\n    if ([self.dataSource respondsToSelector:@selector(transactionBuilder:keyForUnspentOutput:)]) {\n        key = [self.dataSource transactionBuilder:self keyForUnspentOutput:txin.transactionOutput];\n    }\n\n    if (key) {\n        NSData* cpk = key.compressedPublicKey;\n        NSData* ucpk = key.uncompressedPublicKey;\n\n        BTCSignatureHashType hashtype = SIGHASH_ALL;\n\n        NSData* sighash = [tx signatureHashForScript:[outputScript copy] inputIndex:i hashType:hashtype error:errorOut];\n        if (!sighash) {\n            return NO;\n        }\n\n        // Most common case: P2PKH with compressed pubkey (because of BIP32)\n        BTCScript* p2cpkhScript = [[BTCScript alloc] initWithAddress:[BTCPublicKeyAddress addressWithData:BTCHash160(cpk)]];\n        if ([outputScript.data isEqual:p2cpkhScript.data]) {\n            txin.signatureScript = [[[BTCScript new] appendData:[key signatureForHash:sighash hashType:hashtype]] appendData:cpk];\n            return YES;\n        }\n\n        // Less common case: P2PKH with uncompressed pubkey (when not using BIP32)\n        BTCScript* p2ucpkhScript = [[BTCScript alloc] initWithAddress:[BTCPublicKeyAddress addressWithData:BTCHash160(ucpk)]];\n        if ([outputScript.data isEqual:p2ucpkhScript.data]) {\n            txin.signatureScript = [[[BTCScript new] appendData:[key signatureForHash:sighash hashType:hashtype]] appendData:ucpk];\n            return YES;\n        }\n\n        BTCScript* p2cpkScript = [[[BTCScript new] appendData:cpk] appendOpcode:OP_CHECKSIG];\n        BTCScript* p2ucpkScript = [[[BTCScript new] appendData:ucpk] appendOpcode:OP_CHECKSIG];\n\n        if ([outputScript.data isEqual:p2cpkScript] ||\n            [outputScript.data isEqual:p2ucpkScript]) {\n            txin.signatureScript = [[BTCScript new] appendData:[key signatureForHash:sighash hashType:hashtype]];\n            return YES;\n        } else {\n            // Not supported script type.\n            // Try custom signature.\n        }\n    } // if key\n\n    // Ask to sign the transaction input to sign this if that's some kind of special input or script.\n    if ([self.dataSource respondsToSelector:@selector(transactionBuilder:signatureScriptForTransaction:script:inputIndex:)]) {\n        BTCScript* sigScript = [self.dataSource transactionBuilder:self signatureScriptForTransaction:tx script:outputScript inputIndex:i];\n        if (sigScript) {\n            txin.signatureScript = sigScript;\n            return YES;\n        }\n    }\n\n    return NO;\n}\n\n\n\n\n// Properties\n\n\n\n- (BTCScript*) changeScript {\n    if (_changeScript) return _changeScript;\n\n    if (!self.changeAddress) return nil;\n\n    return [[BTCScript alloc] initWithAddress:self.changeAddress.publicAddress];\n}\n\n- (NSEnumerator*) unspentOutputsEnumerator {\n    if (_unspentOutputsEnumerator) return _unspentOutputsEnumerator;\n\n    if (self.dataSource) {\n        return [self.dataSource unspentOutputsForTransactionBuilder:self];\n    }\n\n    return nil;\n}\n\n- (BTCAmount) minimumChange {\n    if (_minimumChange < 0) return self.feeRate;\n    return _minimumChange;\n}\n\n- (BTCAmount) dustChange {\n    if (_dustChange < 0) return self.minimumChange;\n    return _dustChange;\n}\n\n@end\n\n\n@implementation BTCTransactionBuilderResult\n@end\n\n"
  },
  {
    "path": "Pods/CoreBitcoin/CoreBitcoin/BTCTransactionInput.h",
    "content": "// CoreBitcoin by Oleg Andreev <oleganza@gmail.com>, WTFPL.\n\n#import <Foundation/Foundation.h>\n\n@class BTCScript;\n@class BTCOutpoint;\n@class BTCTransaction;\n@class BTCTransactionOutput;\n\n// Transaction input (aka \"txin\") represents a reference to another transaction's output.\n// Reference is defined by tx hash + tx output index.\n// Signature script is used to prove ownership of the corresponding tx output.\n// Sequence is used to require different signatures when tx is updated. It is only relevant when tx lockTime > 0.\n@interface BTCTransactionInput : NSObject <NSCopying>\n\n// Hash of the previous transaction.\n@property(nonatomic) NSData* previousHash;\n\n// Transaction ID referenced by this input (reversed previousHash in hex).\n@property(nonatomic) NSString* previousTransactionID;\n\n// Index of the previous transaction's output.\n@property(nonatomic) uint32_t previousIndex;\n\n// Outpoint of this input (previous hash and output index). Corresponds to COutPoint class in bitcoind.\n@property(nonatomic) BTCOutpoint* outpoint;\n\n// Script that proves ownership of the previous transaction output.\n// This property is nil for coinbase inputs. See `coinbaseData` for raw binary data.\n@property(nonatomic) BTCScript* signatureScript;\n\n// Raw coinbase data if this input is coinbase.\n// If `coinbaseData` is not nil, then `signatureScript` is nil.\n@property(nonatomic) NSData* coinbaseData;\n\n// Input sequence. Default is maximum value 0xFFFFFFFF.\n// Sequence is used to update a timelocked tx stored in memory of the nodes. It is only relevant when tx lockTime > 0.\n// Currently, for DoS and security reasons, nodes do not store timelocked transactions making the sequence number meaningless.\n@property(nonatomic) uint32_t sequence;\n\n// Serialized binary representation of the txin.\n@property(nonatomic, readonly) NSData* data;\n\n\n// Informational properties\n// ------------------------\n// These are set by external APIs such as Chain.com.\n\n\n// Set when input is added via [tx addInput:input]\n@property(weak, nonatomic) BTCTransaction* transaction;\n\n// Optional reference to a corresponding output, typically an unspent output in a context of building a new transaction.\n@property(nonatomic) BTCTransactionOutput* transactionOutput;\n\n// Value in the corresponding output.\n// Default is transactionOutput.value or -1.\n@property(nonatomic) BTCAmount value;\n\n// Arbitrary information attached to this instance.\n// The reference is copied when this instance is copied.\n// Default is nil.\n@property(nonatomic) NSDictionary* userInfo;\n\n\n// Parses tx input from a data buffer.\n- (id) initWithData:(NSData*)data;\n\n// Read tx input from the stream.\n- (id) initWithStream:(NSInputStream*)stream;\n\n// Constructs transaction input from a dictionary representation\n- (id) initWithDictionary:(NSDictionary*)dictionary;\n\n// Returns a dictionary representation suitable for encoding in JSON or Plist.\n@property(nonatomic, readonly) NSDictionary* dictionary;\n\n// Returns YES if this txin generates new coins.\n@property(nonatomic, readonly) BOOL isCoinbase;\n\n- (NSDictionary*) dictionaryRepresentation DEPRECATED_ATTRIBUTE;\n\n@end\n\n"
  },
  {
    "path": "Pods/CoreBitcoin/CoreBitcoin/BTCTransactionInput.m",
    "content": "// Oleg Andreev <oleganza@gmail.com>\n\n#import \"BTCTransaction.h\"\n#import \"BTCTransactionInput.h\"\n#import \"BTCTransactionOutput.h\"\n#import \"BTCScript.h\"\n#import \"BTCProtocolSerialization.h\"\n#import \"BTCData.h\"\n#import \"BTCHashID.h\"\n#import \"BTCOutpoint.h\"\n\n@interface BTCTransactionInput ()\n@end\n\nstatic const uint32_t BTCInvalidIndex = 0xFFFFFFFF; // aka \"(unsigned int) -1\" in BitcoinQT.\nstatic const uint32_t BTCMaxSequence = 0xFFFFFFFF;\n\n\n@implementation BTCTransactionInput\n\n- (id) init {\n    if (self = [super init]) {\n        _previousHash = BTCZero256();\n        _previousIndex = BTCInvalidIndex;\n        _signatureScript = [[BTCScript alloc] init];\n        _sequence = BTCMaxSequence; // max\n        _value = -1;\n    }\n    return self;\n}\n\n// Parses tx input from a data buffer.\n- (id) initWithData:(NSData*)data {\n    if (self = [self init]) {\n        if (![self parseData:data]) return nil;\n    }\n    return self;\n}\n\n// Read tx input from the stream.\n- (id) initWithStream:(NSInputStream*)stream {\n    if (self = [self init]) {\n        if (![self parseStream:stream]) return nil;\n    }\n    return self;\n}\n\n// Constructs transaction input from a dictionary representation\n- (id) initWithDictionary:(NSDictionary*)dictionary {\n    if (self = [self init]) {\n        NSString* prevHashString = (dictionary[@\"prev_out\"] ?: @{})[@\"hash\"];\n        if (prevHashString) _previousHash = BTCReversedData(BTCDataFromHex(prevHashString));\n        NSNumber* prevIndexNumber = (dictionary[@\"prev_out\"] ?: @{})[@\"n\"];\n        if (prevIndexNumber) _previousIndex = prevIndexNumber.unsignedIntValue;\n        \n        if (dictionary[@\"coinbase\"]) {\n            _coinbaseData = BTCDataFromHex(dictionary[@\"coinbase\"]);\n        } else {\n            // BitcoinQT RPC creates {\"asm\": ..., \"hex\": ...} dictionary for this key instead of an ASM-like string like bitcoin-ruby and bitcoinjs.\n            id scriptSig = dictionary[@\"scriptSig\"];\n            \n            if ([scriptSig isKindOfClass:[NSString class]]) {\n                _signatureScript = [[BTCScript alloc] initWithString:scriptSig];\n            } else if ([scriptSig isKindOfClass:[NSDictionary class]]) {\n                if (scriptSig[@\"hex\"]) {\n                    _signatureScript = [[BTCScript alloc] initWithData:BTCDataFromHex(scriptSig[@\"hex\"])];\n                } else if (scriptSig[@\"asm\"]) {\n                    _signatureScript = [[BTCScript alloc] initWithString:scriptSig[@\"asm\"]];\n                }\n            }\n        }\n        \n        if (!_signatureScript) {\n            return nil;\n        }\n        \n        NSNumber* seqNumber = dictionary[@\"sequence\"];\n        if (seqNumber) _sequence = [seqNumber unsignedIntValue];\n        \n    }\n    return self;\n}\n\n- (id) copyWithZone:(NSZone *)zone {\n    BTCTransactionInput* txin = [[BTCTransactionInput alloc] init];\n    txin.previousHash = [self.previousHash copy];\n    txin.previousIndex = self.previousIndex;\n    txin.signatureScript = [self.signatureScript copy];\n    txin.sequence = self.sequence;\n\n    txin.transaction = _transaction;\n    txin.transactionOutput = _transactionOutput;\n    txin.userInfo = _userInfo;\n\n    return txin;\n}\n\n- (NSData*) data {\n    return [self computePayload];\n}\n\n- (NSData*) computePayload {\n    NSMutableData* payload = [NSMutableData data];\n    \n    [payload appendData:_previousHash];\n    [payload appendBytes:&_previousIndex length:4];\n\n    if (self.isCoinbase) {\n        [payload appendData:[BTCProtocolSerialization dataForVarInt:self.coinbaseData.length]];\n        [payload appendData:self.coinbaseData];\n    } else {\n        NSData* scriptData = _signatureScript.data;\n        [payload appendData:[BTCProtocolSerialization dataForVarInt:scriptData.length]];\n        [payload appendData:scriptData];\n    }\n    \n    [payload appendBytes:&_sequence length:4];\n    \n    return payload;\n}\n\n- (BTCOutpoint*) outpoint {\n    return [[BTCOutpoint alloc] initWithHash:self.previousHash index:self.previousIndex];\n}\n\n- (void) setOutpoint:(BTCOutpoint *)outpoint {\n    self.previousHash = outpoint.txHash;\n    self.previousIndex = outpoint.index;\n}\n\n- (NSString*) previousTransactionID {\n    return BTCIDFromHash(self.previousHash);\n}\n\n- (void) setPreviousTransactionID:(NSString *)previousTransactionID {\n    self.previousHash = BTCHashFromID(previousTransactionID);\n}\n\n// Returns a dictionary representation suitable for encoding in JSON or Plist.\n- (NSDictionary*) dictionaryRepresentation {\n    return self.dictionary;\n}\n\n- (NSDictionary*) dictionary {\n    NSMutableDictionary* dict = [NSMutableDictionary dictionary];\n    dict[@\"prev_out\"] = @{\n                        @\"hash\": BTCHexFromData(BTCReversedData(_previousHash)), // transaction hashes are reversed\n                        @\"n\": @(_previousIndex),\n                        };\n    \n    if ([self isCoinbase]) {\n        dict[@\"coinbase\"] = BTCHexFromData(_coinbaseData);\n    } else {\n        // Latest BitcoinQT does this: \"scriptSig\": {\"asm\": \"assembly-style script with spaces and literal ops\", \"hex\": \"raw script in hex\" }\n        // Here and in bitcoin-qt we use only \"asm\" style script.\n        // (But we support reading BitcoinQT style in initWithDictionary:)\n        dict[@\"scriptSig\"] = _signatureScript.string;\n    }\n    \n    if (_sequence != BTCMaxSequence) {\n        dict[@\"sequence\"] = [NSString stringWithFormat:@\"%08x\", _sequence];\n    }\n    return dict;\n}\n\n\n\n\n\n\n\n\n#pragma mark - Serialization and parsing\n\n\n\n- (BOOL) parseData:(NSData*)data {\n    if (!data) return NO;\n    NSInputStream* stream = [NSInputStream inputStreamWithData:data];\n    [stream open];\n    BOOL result = [self parseStream:stream];\n    [stream close];\n    return result;\n}\n\n- (BOOL) parseStream:(NSInputStream*)stream {\n    if (!stream) return NO;\n    if (stream.streamStatus == NSStreamStatusClosed) return NO;\n    if (stream.streamStatus == NSStreamStatusNotOpen) return NO;\n    \n    // Read previousHash\n    uint8_t hash[32] = {0};\n    if ([stream read:(uint8_t*)hash maxLength:sizeof(hash)] != sizeof(hash)) return NO;\n    _previousHash = [NSData dataWithBytes:hash length:sizeof(hash)];\n    \n    // Read previousIndex\n    if ([stream read:(uint8_t*)(&_previousIndex) maxLength:sizeof(_previousIndex)] != sizeof(_previousIndex)) return NO;\n    \n    // Read signature script\n    NSData* scriptdata = [BTCProtocolSerialization readVarStringFromStream:stream];\n    if (!scriptdata) return NO;\n\n    if ([self isCoinbase]) {\n        _coinbaseData = scriptdata;\n    } else {\n        _signatureScript = [[BTCScript alloc] initWithData:scriptdata];\n    }\n    \n    // Read sequence\n    if ([stream read:(uint8_t*)(&_sequence) maxLength:sizeof(_sequence)] != sizeof(_sequence)) return NO;\n    \n    return YES;\n}\n\n\n- (BOOL) isCoinbase {\n    return (_previousIndex == BTCInvalidIndex) &&\n            _previousHash.length == 32 &&\n            0 == memcmp(BTCZeroString256(), _previousHash.bytes, 32);\n}\n\n\n\n#pragma mark - Informational Properties\n\n\n\n- (BTCAmount) value {\n    if (_value != -1) {\n        return _value;\n    }\n    if (_transactionOutput) {\n        return _transactionOutput.value;\n    }\n    return -1;\n}\n\n\n@end\n\n"
  },
  {
    "path": "Pods/CoreBitcoin/CoreBitcoin/BTCTransactionOutput.h",
    "content": "// CoreBitcoin by Oleg Andreev <oleganza@gmail.com>, WTFPL.\n\n#import <Foundation/Foundation.h>\n#import \"BTCUnitsAndLimits.h\"\n\n@class BTCScript;\n@class BTCAddress;\n@class BTCTransaction;\n\nstatic uint32_t const BTCTransactionOutputIndexUnknown = 0xffffffff;\n\n// Transaction output (aka \"tx out\") is a value with rules attached in form of a script.\n// To spend money one need to choose a transaction output and provide an appropriate\n// input which makes the script execute with success.\n@interface BTCTransactionOutput : NSObject<NSCopying>\n\n// Serialized binary form of the output (payload)\n@property(nonatomic, readonly) NSData* data;\n\n// Value of output in satoshis.\n@property(nonatomic) BTCAmount value;\n\n// Script defining redemption rules for this output (aka scriptPubKey or pk_script)\n@property(nonatomic) BTCScript* script;\n\n// Reference to owning transaction. Set on [tx addOutput:...] and reset to nil on [tx removeAllOutputs].\n@property(weak, nonatomic) BTCTransaction* transaction;\n\n// Hash of the transaction. Default is nil.\n@property(nonatomic) NSData* transactionHash;\n\n// Identifier of the transaction. Default is nil.\n@property(nonatomic) NSString* transactionID;\n\n// Informational properties\n// ------------------------\n// These are set by external APIs such as Chain.com.\n// E.g. when loading unspent outputs from Chain, all these properties will be set.\n// index and transactionHash are kept up to date when output is added/removed from the transaction.\n\n\n// Index of this output in its transaction. Default is BTCTransactionOutputIndexUnknown\n@property(nonatomic) uint32_t index;\n\n// Hash of the block in which this transaction output is included.\n// Unconfirmed transaction outputs have nil block hash.\n// Default is transaction.blockHash or nil.\n@property(nonatomic) NSData* blockHash;\n\n// ID of the block in which this transaction output is included.\n// Unconfirmed transaction outputs have nil block ID.\n// Default is transaction.blockHash or nil.\n@property(nonatomic) NSString* blockID;\n\n// Informational property, could be set by some APIs that fetch transactions.\n// Note: unconfirmed transactions may be marked with -1 block height.\n// Default is transaction.blockHeight or 0.\n@property(nonatomic) NSInteger blockHeight;\n\n// Date and time of the block if specified by the API that returns this transaction.\n// Default is transaction.blockDate or nil.\n@property(nonatomic) NSDate* blockDate;\n\n// Number of confirmations.\n// Default is transaction.confirmations or NSNotFound.\n@property(nonatomic) NSUInteger confirmations;\n\n// If available, returns whether this output is spent (YES or NO).\n// Default is NO.\n@property(nonatomic, getter=isSpent) BOOL spent;\n\n// If this transaction is spent, contains number of confirmations of the spending transaction.\n// Returns NSNotFound if not available or output is not spent.\n// Returns 0 if spending transaction is unconfirmed.\n@property(nonatomic) NSUInteger spentConfirmations;\n\n\n// Arbitrary information attached to this instance.\n// The reference is copied when this instance is copied.\n// Default is nil.\n@property(nonatomic) NSDictionary* userInfo;\n\n// Parses tx output from a data buffer.\n- (id) initWithData:(NSData*)data;\n\n// Reads tx output from the stream.\n- (id) initWithStream:(NSInputStream*)stream;\n\n// Makes tx output from a dictionary representation\n- (id) initWithDictionary:(NSDictionary*)dictionary;\n\n// Makes tx output with a certain amount of coins on the output.\n- (id) initWithValue:(BTCAmount)value;\n\n// Makes tx output with a standard script redeeming to an address (pubkey hash or P2SH).\n- (id) initWithValue:(BTCAmount)value address:(BTCAddress*)address;\n\n// Makes tx output with a given script.\n- (id) initWithValue:(BTCAmount)value script:(BTCScript*)script;\n\n// Returns a dictionary representation suitable for encoding in JSON or Plist.\n@property(nonatomic, readonly) NSDictionary* dictionary;\n\n- (NSDictionary*) dictionaryRepresentation DEPRECATED_ATTRIBUTE;\n\n@end\n"
  },
  {
    "path": "Pods/CoreBitcoin/CoreBitcoin/BTCTransactionOutput.m",
    "content": "// Oleg Andreev <oleganza@gmail.com>\n\n#import \"BTCTransaction.h\"\n#import \"BTCTransactionOutput.h\"\n#import \"BTCScript.h\"\n#import \"BTCAddress.h\"\n#import \"BTCData.h\"\n#import \"BTCHashID.h\"\n#import \"BTCProtocolSerialization.h\"\n\n@interface BTCTransactionOutput ()\n@end\n\n@implementation BTCTransactionOutput\n\n- (id) init {\n    return [self initWithValue:-1 script:[[BTCScript alloc] init]];\n}\n\n- (id) initWithValue:(BTCAmount)value {\n    return [self initWithValue:value script:[[BTCScript alloc] init]];\n}\n\n- (id) initWithValue:(BTCAmount)value address:(BTCAddress*)address {\n    return [self initWithValue:value script:[[BTCScript alloc] initWithAddress:address]];\n}\n\n- (id) initWithValue:(BTCAmount)value script:(BTCScript*)script {\n    if (self = [super init]) {\n        _value = value;\n        _script = script;\n\n        _index = BTCTransactionOutputIndexUnknown;\n        _confirmations = NSNotFound;\n        _spent = NO;\n        _spentConfirmations = NSNotFound;\n    }\n    return self;\n}\n\n// Parses tx output from a data buffer.\n- (id) initWithData:(NSData*)data {\n    if (self = [self init]) {\n        if (![self parseData:data]) return nil;\n    }\n    return self;\n}\n\n// Reads tx output from the stream.\n- (id) initWithStream:(NSInputStream*)stream {\n    if (self = [self init]) {\n        if (![self parseStream:stream]) return nil;\n    }\n    return self;\n}\n\n// Constructs transaction input from a dictionary representation\n- (id) initWithDictionary:(NSDictionary*)dictionary {\n    if (self = [self init]) {\n        NSString* valueString = dictionary[@\"value\"];\n        if (!valueString) valueString = @\"0\";\n        \n        // Parse amount.\n        // \"12\" => 1,200,000,000 satoshis (12 BTC)\n        // \"4.5\" => 450,000,000 satoshis\n        // \"0.12000000\" => 12,000,000 satoshis\n        NSArray* comps = [valueString componentsSeparatedByString:@\".\"];\n        \n        _value = 0;\n        if (comps.count >= 1) _value += BTCCoin * [(NSString*)comps[0] integerValue];\n        if (comps.count >= 2) _value += [[(NSString*)comps[1] stringByPaddingToLength:8 withString:@\"0\" startingAtIndex:0] longLongValue];\n        \n        NSString* scriptString = dictionary[@\"scriptPubKey\"] ?: @\"\";\n        _script = [[BTCScript alloc] initWithString:scriptString];\n    }\n    return self;\n}\n\n- (id) copyWithZone:(NSZone *)zone {\n    BTCTransactionOutput* txout = [[BTCTransactionOutput alloc] init];\n    txout.value = self.value;\n    txout.script = [self.script copy];\n\n    // Copy informational properties:\n    txout.index           = _index;\n    txout.transactionHash = _transactionHash; // copy bare ivar, so we don't copy transaction.transactionHash which may be derived from _transaction.\n    txout.transaction     = _transaction;\n    txout.blockHeight     = _blockHeight;\n    txout.confirmations   = _confirmations;\n    txout.userInfo        = _userInfo;\n\n    return txout;\n}\n\n- (NSData*) data {\n    return [self computePayload];\n}\n\n- (NSData*) computePayload {\n    NSMutableData* payload = [NSMutableData data];\n    \n    [payload appendBytes:&_value length:sizeof(_value)];\n    \n    NSData* scriptData = _script.data ?: [NSData data];\n    [payload appendData:[BTCProtocolSerialization dataForVarInt:scriptData.length]];\n    [payload appendData:scriptData];\n    \n    return payload;\n}\n\n- (NSString*) description {\n    NSData* txhash = self.transactionHash;\n    return [NSString stringWithFormat:@\"<%@:0x%p%@%@ %@ BTC '%@'%@>\", [self class], self,\n            (txhash ? [NSString stringWithFormat:@\" %@\", BTCHexFromData(txhash)]: @\"\"),\n            (_index == BTCTransactionOutputIndexUnknown ? @\"\" : [NSString stringWithFormat:@\":%d\", _index]),\n            [self formattedBTCValue:_value],\n            _script.string,\n            (_confirmations == NSNotFound ? @\"\" : [NSString stringWithFormat:@\" %d confirmations\", (unsigned int)_confirmations])];\n}\n\n- (NSString*) formattedBTCValue:(BTCAmount)value {\n    return [NSString stringWithFormat:@\"%lld.%@\", value / BTCCoin, [NSString stringWithFormat:@\"%08lld\", value % BTCCoin]];\n}\n\n// Returns a dictionary representation suitable for encoding in JSON or Plist.\n- (NSDictionary*) dictionaryRepresentation {\n    return self.dictionary;\n}\n\n- (NSDictionary*) dictionary {\n    return @{\n             @\"value\": [self formattedBTCValue:_value],\n             // TODO: like in BTCTransactionInput, have an option to put both \"asm\" and \"hex\" representations of the script.\n             @\"scriptPubKey\": _script.string ?: @\"\",\n             };\n}\n\n- (uint32_t) index {\n    // Remember the index as it does not change when we add more outputs.\n    if (_transaction && _index == BTCTransactionOutputIndexUnknown) {\n        NSUInteger idx = [_transaction.outputs indexOfObject:self];\n        if (idx != NSNotFound) {\n            _index = (uint32_t)idx;\n        }\n    }\n    return _index;\n}\n\n- (NSData*) transactionHash {\n    // Do not remember transaction hash as it changes when we add another output or change some metadata of the tx.\n    if (_transactionHash) return _transactionHash;\n    if (_transaction) return _transaction.transactionHash;\n    return nil;\n}\n\n- (NSString*) transactionID {\n    return BTCIDFromHash(self.transactionHash);\n}\n\n- (void) setTransactionID:(NSString *)transactionID {\n    self.transactionHash = BTCHashFromID(transactionID);\n}\n\n\n\n#pragma mark - Serialization and parsing\n\n\n\n- (BOOL) parseData:(NSData*)data {\n    if (!data) return NO;\n    NSInputStream* stream = [NSInputStream inputStreamWithData:data];\n    [stream open];\n    BOOL result = [self parseStream:stream];\n    [stream close];\n    return result;\n}\n\n- (BOOL) parseStream:(NSInputStream*)stream {\n    if (!stream) return NO;\n    if (stream.streamStatus == NSStreamStatusClosed) return NO;\n    if (stream.streamStatus == NSStreamStatusNotOpen) return NO;\n    \n    // Read value\n    if ([stream read:(uint8_t*)(&_value) maxLength:sizeof(_value)] != sizeof(_value)) return NO;\n    \n    // Read script\n    NSData* scriptData = [BTCProtocolSerialization readVarStringFromStream:stream];\n    if (!scriptData) return NO;\n    _script = [[BTCScript alloc] initWithData:scriptData];\n    \n    return YES;\n}\n\n\n\n\n\n#pragma mark - Informational Properties\n\n\n- (NSString*) blockID {\n    return BTCIDFromHash(self.blockHash);\n}\n\n- (void) setBlockID:(NSString *)blockID {\n    self.blockHash = BTCHashFromID(blockID);\n}\n\n- (NSData*) blockHash {\n    return _blockHash ?: self.transaction.blockHash;\n}\n\n- (NSInteger) blockHeight {\n    if (_blockHeight != 0) {\n        return _blockHeight;\n    }\n    if (self.transaction) {\n        return self.transaction.blockHeight;\n    }\n    return _blockHeight;\n}\n\n- (NSDate*) blockDate {\n    return _blockDate ?: self.transaction.blockDate;\n}\n\n- (NSUInteger) confirmations {\n    if (_confirmations != NSNotFound) {\n        return _confirmations;\n    }\n    if (self.transaction) {\n        return self.transaction.confirmations;\n    }\n    return NSNotFound;\n}\n\n\n\n\n\n@end\n"
  },
  {
    "path": "Pods/CoreBitcoin/CoreBitcoin/BTCUnitsAndLimits.h",
    "content": "// CoreBitcoin by Oleg Andreev <oleganza@gmail.com>, WTFPL.\n\n#ifndef CoreBitcoin_BTCUnits_h\n#define CoreBitcoin_BTCUnits_h\n\n// The smallest unit in Bitcoin is 1 satoshi.\n// Satoshis are 64-bit signed integers.\n// The value is signed to allow special value -1 in BTCTransactionOutput.\ntypedef int64_t BTCAmount;\n\n// This is a deprecated alias to BTCAmount.\n// It was a mistake to call amount type by a value unit\n// (like using \"Kilogram\" instead of \"Mass\").\n// This will be deprecated and then reused as a constant value 1 alongside BTCCoin and BTCCent.\ntypedef int64_t BTCSatoshi DEPRECATED_ATTRIBUTE;\n\n// 100 mln satoshis is one Bitcoin\nstatic const BTCAmount BTCCoin = 100000000;\n\n// Bitcent is 0.01 BTC\nstatic const BTCAmount BTCCent = 1000000;\n\n// Bit is 0.000001 BTC (100 satoshis)\nstatic const BTCAmount BTCBit = 100;\n\n// Satoshi is the smallest unit representable in bitcoin transactions.\n// IMPORTANT: This will be uncommented when we retire BTCSatoshi type declaration above.\n// static const BTCAmount BTCSatoshi = 1;\n\n\n\n// Network Rules (changing these will result in incompatibility with other nodes)\n\n// The maximum allowed size for a serialized block, in bytes\nstatic const unsigned int BTC_MAX_BLOCK_SIZE = 1000000;\n\n// The maximum allowed number of signature check operations in a block\nstatic const unsigned int BTC_MAX_BLOCK_SIGOPS = BTC_MAX_BLOCK_SIZE/50;\n\n// No amount larger than this (in satoshi) is valid\nstatic const BTCAmount BTC_MAX_MONEY = 21000000 * BTCCoin;\n\n// Coinbase transaction outputs can only be spent after this number of new blocks\nstatic const int BTC_COINBASE_MATURITY = 100;\n\n// Threshold for -[BTCTransaction lockTime]: below this value it is interpreted as block number, otherwise as UNIX timestamp. */\nstatic const unsigned int BTC_LOCKTIME_THRESHOLD = 500000000; // Tue Nov  5 00:53:20 1985 UTC (max block number is in year ≈11521)\n\n// P2SH BIP16 didn't become active until Apr 1 2012. All txs before this timestamp should not be verified with P2SH rule.\nstatic const uint32_t BTC_BIP16_TIMESTAMP = 1333238400;\n\n// Scripts longer than 10000 bytes are invalid.\nstatic const NSUInteger BTC_MAX_SCRIPT_SIZE = 10000;\n\n// Maximum number of bytes per \"pushdata\" operation\nstatic const NSUInteger BTC_MAX_SCRIPT_ELEMENT_SIZE = 520; // bytes\n\n// Number of public keys allowed for OP_CHECKMULTISIG\nstatic const NSUInteger BTC_MAX_KEYS_FOR_CHECKMULTISIG = 20;\n\n// Maximum number of operations allowed per script (excluding pushdata operations and OP_<N>)\n// Multisig op additionally increases count by a number of pubkeys.\nstatic const NSUInteger BTC_MAX_OPS_PER_SCRIPT = 201;\n\n// Soft Rules (can bend these without becoming incompatible with everyone)\n\n// The maximum number of entries in an 'inv' protocol message\nstatic const unsigned int BTC_MAX_INV_SZ = 50000;\n\n// The maximum size for mined blocks\nstatic const unsigned int BTC_MAX_BLOCK_SIZE_GEN = BTC_MAX_BLOCK_SIZE/2;\n\n// The maximum size for transactions we're willing to relay/mine\nstatic const unsigned int BTC_MAX_STANDARD_TX_SIZE = BTC_MAX_BLOCK_SIZE_GEN/5;\n\n\n#endif\n"
  },
  {
    "path": "Pods/CoreBitcoin/CoreBitcoin/CoreBitcoin+Categories.h",
    "content": "// CoreBitcoin by Oleg Andreev <oleganza@gmail.com>, WTFPL.\n\n#import <CoreBitcoin/CoreBitcoin.h>\n#import <CoreBitcoin/NS+BTCBase58.h>\n#import <CoreBitcoin/NSData+BTCData.h>\n"
  },
  {
    "path": "Pods/CoreBitcoin/CoreBitcoin/CoreBitcoin.h",
    "content": "// CoreBitcoin by Oleg Andreev <oleganza@gmail.com>, WTFPL.\n\n#import <CoreBitcoin/BTC256.h>\n#import <CoreBitcoin/BTCAddress.h>\n#import <CoreBitcoin/BTCAddressSubclass.h>\n#import <CoreBitcoin/BTCAssetAddress.h>\n#import <CoreBitcoin/BTCAssetID.h>\n#import <CoreBitcoin/BTCAssetType.h>\n#import <CoreBitcoin/BTCBase58.h>\n#import <CoreBitcoin/BTCBigNumber.h>\n#import <CoreBitcoin/BTCBitcoinURL.h>\n#import <CoreBitcoin/BTCBlindSignature.h>\n#import <CoreBitcoin/BTCBlock.h>\n#import <CoreBitcoin/BTCBlockchainInfo.h>\n#import <CoreBitcoin/BTCBlockHeader.h>\n#import <CoreBitcoin/BTCChainCom.h>\n#import <CoreBitcoin/BTCCurrencyConverter.h>\n#import <CoreBitcoin/BTCCurvePoint.h>\n#import <CoreBitcoin/BTCData.h>\n#import <CoreBitcoin/BTCEncryptedBackup.h>\n#import <CoreBitcoin/BTCEncryptedMessage.h>\n#import <CoreBitcoin/BTCErrors.h>\n#import <CoreBitcoin/BTCFancyEncryptedMessage.h>\n#import <CoreBitcoin/BTCHashID.h>\n#import <CoreBitcoin/BTCKey.h>\n#import <CoreBitcoin/BTCKeychain.h>\n#import <CoreBitcoin/BTCMerkleTree.h>\n#import <CoreBitcoin/BTCMnemonic.h>\n#import <CoreBitcoin/BTCNetwork.h>\n#import <CoreBitcoin/BTCNumberFormatter.h>\n#import <CoreBitcoin/BTCOpcode.h>\n#import <CoreBitcoin/BTCOutpoint.h>\n#import <CoreBitcoin/BTCPaymentMethod.h>\n#import <CoreBitcoin/BTCPaymentMethodDetails.h>\n#import <CoreBitcoin/BTCPaymentMethodRequest.h>\n#import <CoreBitcoin/BTCPaymentProtocol.h>\n#import <CoreBitcoin/BTCPaymentRequest.h>\n#import <CoreBitcoin/BTCPriceSource.h>\n#import <CoreBitcoin/BTCProcessor.h>\n#import <CoreBitcoin/BTCProtocolBuffers.h>\n#import <CoreBitcoin/BTCProtocolSerialization.h>\n#import <CoreBitcoin/BTCQRCode.h>\n#import <CoreBitcoin/BTCScript.h>\n#import <CoreBitcoin/BTCScriptMachine.h>\n#import <CoreBitcoin/BTCSecretSharing.h>\n#import <CoreBitcoin/BTCSignatureHashType.h>\n#import <CoreBitcoin/BTCTransaction.h>\n#import <CoreBitcoin/BTCTransactionBuilder.h>\n#import <CoreBitcoin/BTCTransactionInput.h>\n#import <CoreBitcoin/BTCTransactionOutput.h>\n#import <CoreBitcoin/BTCUnitsAndLimits.h>\n#import <CoreBitcoin/SwiftBridgingHeader.h>\n"
  },
  {
    "path": "Pods/CoreBitcoin/CoreBitcoin/NS+BTCBase58.h",
    "content": "// CoreBitcoin by Oleg Andreev <oleganza@gmail.com>, WTFPL.\n\n#import <Foundation/Foundation.h>\n#import \"BTCBase58.h\"\n\n// These categories are optional and provided for convenience only.\n// For documentation look into BTCBase58.h.\n// They are also used in CoreBitcoin unit tests.\n@interface NSString (BTCBase58)\n\n// Returns data for Base58 string without checksum\n// Data is mutable so you can clear sensitive information as soon as possible.\n- (NSMutableData*) dataFromBase58;\n\n// Returns data for Base58 string with checksum\n- (NSMutableData*) dataFromBase58Check;\n\n@end\n\n@interface NSMutableData (BTCBase58)\n\n// Returns data for Base58 string without checksum\n// Data is mutable so you can clear sensitive information as soon as possible.\n+ (NSMutableData*) dataFromBase58CString:(const char*)cstring;\n\n// Returns data for Base58 string with checksum\n+ (NSMutableData*) dataFromBase58CheckCString:(const char*)cstring;\n\n@end\n\n@interface NSData (BTCBase58)\n\n// String in Base58 without checksum, you need to free it yourself.\n// It's mutable so you can clear it securely yourself.\n- (char*) base58CString;\n\n// String in Base58 with checksum, you need to free it yourself.\n// It's mutable so you can clear it securely yourself.\n- (char*) base58CheckCString;\n\n// String in Base58 without checksum\n- (NSString*) base58String;\n\n// String in Base58 with checksum\n- (NSString*) base58CheckString;\n\n@end\n"
  },
  {
    "path": "Pods/CoreBitcoin/CoreBitcoin/NS+BTCBase58.m",
    "content": "// Oleg Andreev <oleganza@gmail.com>\n\n#import \"NS+BTCBase58.h\"\n\n// TODO.\n\n@implementation NSString (BTCBase58)\n\n- (NSMutableData*) dataFromBase58 { return BTCDataFromBase58(self); }\n- (NSMutableData*) dataFromBase58Check { return BTCDataFromBase58Check(self); }\n@end\n\n\n@implementation NSMutableData (BTCBase58)\n\n+ (NSMutableData*) dataFromBase58CString:(const char*)cstring {\n    return BTCDataFromBase58CString(cstring);\n}\n\n+ (NSMutableData*) dataFromBase58CheckCString:(const char*)cstring {\n    return BTCDataFromBase58CheckCString(cstring);\n}\n\n@end\n\n\n@implementation NSData (BTCBase58)\n\n- (char*) base58CString {\n    return BTCBase58CStringWithData(self);\n}\n\n- (char*) base58CheckCString {\n    return BTCBase58CheckCStringWithData(self);\n}\n\n- (NSString*) base58String {\n    return BTCBase58StringWithData(self);\n}\n\n- (NSString*) base58CheckString {\n    return BTCBase58CheckStringWithData(self);\n}\n\n\n@end\n"
  },
  {
    "path": "Pods/CoreBitcoin/CoreBitcoin/NSData+BTCData.h",
    "content": "// CoreBitcoin by Oleg Andreev <oleganza@gmail.com>, WTFPL.\n\n#import <Foundation/Foundation.h>\n#import \"BTCData.h\"\n\n// This category is for user's convenience only.\n// For documentation look into BTCData.h.\n// If you link CoreBitcoin library without categories enabled, nothing will break.\n// This is also used in unit tests in CoreBitcoin.\n@interface NSData (BTCData)\n\n// Core hash functions\n- (NSData*) SHA1;\n- (NSData*) SHA256;\n- (NSData*) BTCHash256;  // SHA256(SHA256(self)) aka Hash or Hash256 in BitcoinQT\n\n#if BTCDataRequiresOpenSSL\n- (NSData*) RIPEMD160;\n- (NSData*) BTCHash160; // RIPEMD160(SHA256(self)) aka Hash160 in BitcoinQT\n#endif\n\n// Formats data as a lowercase hex string\n- (NSString*) hex;\n- (NSString*) uppercaseHex;\n\n- (NSString*) hexString DEPRECATED_ATTRIBUTE;\n- (NSString*) hexUppercaseString DEPRECATED_ATTRIBUTE;\n\n\n// Encrypts/decrypts data using the key.\n// IV should either be nil or at least 128 bits long\n+ (NSMutableData*) encryptData:(NSData*)data key:(NSData*)key iv:(NSData*)initializationVector;\n+ (NSMutableData*) decryptData:(NSData*)data key:(NSData*)key iv:(NSData*)initializationVector;\n\n@end\n"
  },
  {
    "path": "Pods/CoreBitcoin/CoreBitcoin/NSData+BTCData.m",
    "content": "// Oleg Andreev <oleganza@gmail.com>\n\n#import \"NSData+BTCData.h\"\n#import <CommonCrypto/CommonCrypto.h>\n\n@implementation NSData (BTC)\n\n\n\n#pragma mark - Hash Functions\n\n\n- (NSData*) SHA1 { return BTCSHA1(self); }\n- (NSData*) SHA256 { return BTCSHA256(self); }\n- (NSData*) BTCHash256 { return BTCHash256(self); }\n\n#if BTCDataRequiresOpenSSL\n- (NSData*) RIPEMD160 { return BTCRIPEMD160(self); }\n- (NSData*) BTCHash160 { return BTCHash160(self); }\n#endif\n\n\n\n\n#pragma mark - Formatting\n\n\n- (NSString*) hex {\n    return BTCHexFromData(self);\n}\n\n- (NSString*) uppercaseHex {\n    return BTCUppercaseHexFromData(self);\n}\n\n- (NSString*) hexString {\n    return BTCHexFromData(self);\n}\n\n- (NSString*) hexUppercaseString {\n    return BTCUppercaseHexFromData(self);\n}\n\n\n\n\n\n#pragma mark - Encryption / Decryption\n\n\n\n\n+ (NSMutableData*) encryptData:(NSData*)data key:(NSData*)key iv:(NSData*)initializationVector {\n    return [self cryptData:data key:key iv:initializationVector operation:kCCEncrypt];\n}\n\n+ (NSMutableData*) decryptData:(NSData*)data key:(NSData*)key iv:(NSData*)initializationVector {\n    return [self cryptData:data key:key iv:initializationVector operation:kCCDecrypt];\n}\n\n\n+ (NSMutableData*) cryptData:(NSData*)data key:(NSData*)key iv:(NSData*)iv operation:(CCOperation)operation {\n    if (!data || !key) return nil;\n    \n    int blockSize = kCCBlockSizeAES128;\n    int encryptedDataCapacity = (int)(data.length / blockSize + 1) * blockSize;\n    NSMutableData* encryptedData = [[NSMutableData alloc] initWithLength:encryptedDataCapacity];\n    \n    // Treat empty IV as nil\n    if (iv.length == 0) {\n        iv = nil;\n    }\n    \n    // If IV is supplied, validate it.\n    if (iv) {\n        if (iv.length == blockSize) {\n            // perfect.\n        } else if (iv.length > blockSize) {\n            // IV is bigger than the block size. CCCrypt will take only the first 16 bytes.\n        } else {\n            // IV is smaller than needed. This should not happen. It's better to crash than to leak something.\n            @throw [NSException exceptionWithName:@\"NSData+BTC IV is invalid\"\n                                           reason:[NSString stringWithFormat:@\"Invalid size of IV: %d\", (int)iv.length]\n                                         userInfo:nil];\n        }\n    }\n    \n    size_t dataOutMoved = 0;\n    CCCryptorStatus cryptstatus = CCCrypt(\n                                          operation,                   // CCOperation op,         /* kCCEncrypt, kCCDecrypt */\n                                          kCCAlgorithmAES,             // CCAlgorithm alg,        /* kCCAlgorithmAES128, etc. */\n                                          kCCOptionPKCS7Padding,       // CCOptions options,      /* kCCOptionPKCS7Padding, etc. */\n                                          key.bytes,                   // const void *key,\n                                          key.length,                  // size_t keyLength,\n                                          iv ? iv.bytes : NULL,        // const void *iv,         /* optional initialization vector */\n                                          data.bytes,                  // const void *dataIn,     /* optional per op and alg */\n                                          data.length,                 // size_t dataInLength,\n                                          encryptedData.mutableBytes,  // void *dataOut,          /* data RETURNED here */\n                                          encryptedData.length,        // size_t dataOutAvailable,\n                                          &dataOutMoved                // size_t *dataOutMoved\n                                          );\n    \n    if (cryptstatus == kCCSuccess) {\n        // Resize the result key to the correct size.\n        encryptedData.length = dataOutMoved;\n        return encryptedData;\n    } else {\n        //kCCSuccess          = 0,\n        //kCCParamError       = -4300,\n        //kCCBufferTooSmall   = -4301,\n        //kCCMemoryFailure    = -4302,\n        //kCCAlignmentError   = -4303,\n        //kCCDecodeError      = -4304,\n        //kCCUnimplemented    = -4305,\n        //kCCOverflow         = -4306\n        @throw [NSException exceptionWithName:@\"NSData+BTC CCCrypt failed\"\n                                       reason:[NSString stringWithFormat:@\"error: %d\", cryptstatus] userInfo:nil];\n        return nil;\n    }\n}\n\n\n@end"
  },
  {
    "path": "Pods/CoreBitcoin/CoreBitcoin/SwiftBridgingHeader.h",
    "content": "// CoreBitcoin by Oleg Andreev <oleganza@gmail.com>, WTFPL.\n\n//\n//  SwiftBridgingHeader.h\n//\n//\n\n#import \"CoreBitcoin.h\"\n#import \"NSData+BTCData.h\"\n#import \"NS+BTCBase58.h\"\n\n#include <CommonCrypto/CommonCrypto.h>\n#include <openssl/ec.h>\n#include <openssl/ecdsa.h>\n#include <openssl/evp.h>\n#include <openssl/obj_mac.h>\n#include <openssl/bn.h>\n#include <openssl/rand.h>"
  },
  {
    "path": "Pods/CoreBitcoin/LICENSE.txt",
    "content": "           DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE\n                   Version 2, December 2004\n\nCopyright (C) 2014 Oleg Andreev <oleganza@gmail.com>\n\nEveryone is permitted to copy and distribute verbatim or modified\ncopies of this license document, and changing it is allowed as long\nas the name is changed.\n\n           DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE\n  TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION\n\n 0. You just DO WHAT THE FUCK YOU WANT TO.\n"
  },
  {
    "path": "Pods/CoreBitcoin/README.md",
    "content": "CoreBitcoin\n===========\n\nCoreBitcoin implements Bitcoin protocol in Objective-C and provides many additional APIs to make great apps.\n\nCoreBitcoin deliberately implements as much as possible directly in Objective-C with limited dependency on OpenSSL. This gives everyone an opportunity to learn Bitcoin on a clean codebase and enables all Mac and iOS developers to extend and improve Bitcoin protocol.\n\nNote that \"Bitcoin Core\" (previously known as BitcoinQT or \"Satoshi client\") is a completely different project.\n\n\nProjects using CoreBitcoin\n--------------------------\n\n- [Chain-iOS SDK](https://github.com/chain-engineering/chain-ios) (written by Oleg Andreev)\n- [Mycelium iOS Wallet](https://itunes.apple.com/us/app/mycelium-bitcoin-wallet/id943912290) (written by Oleg Andreev)\n- [bitWallet](https://itunes.apple.com/us/app/bitwallet-bitcoin-wallet/id777634714)\n- [Yallet](https://www.yallet.com)\n- [BitStore](http://bitstoreapp.com)\n- [ArcBit](http://arcbit.io)\n\nFeatures\n--------\n\nSee also [Release Notes](ReleaseNotes.md).\n\n- Encoding/decoding addresses: P2PK, P2PKH, P2SH, WIF format ([BTCAddress](https://github.com/oleganza/CoreBitcoin/blob/master/CoreBitcoin/BTCAddress.h)).\n- Transaction building blocks: inputs, outputs, scripts ([BTCTransaction](https://github.com/oleganza/CoreBitcoin/blob/master/CoreBitcoin/BTCTransaction.h), [BTCScript](https://github.com/oleganza/CoreBitcoin/blob/master/CoreBitcoin/BTCScript.h)).\n- EC keys and signatures ([BTCKey](https://github.com/oleganza/CoreBitcoin/blob/master/CoreBitcoin/BTCKey.h)).\n- High-level convenient and safe transaction builder ([BTCTransactionBuilder](https://github.com/oleganza/CoreBitcoin/blob/master/CoreBitcoin/BTCTransactionBuilder.h)).\n- Parsing and composing bitcoin URLs and payment requests ([BTCBitcoinURL](https://github.com/oleganza/CoreBitcoin/blob/master/CoreBitcoin/BTCBitcoinURL.h)).\n- QR Code generator and scanner in a unified API (iOS only for now; [BTCQRCode](https://github.com/oleganza/CoreBitcoin/blob/master/CoreBitcoin/BTCQRCode.h)).\n- BIP32, BIP44 hierarchical deterministic wallets ([BTCKeychain](https://github.com/oleganza/CoreBitcoin/blob/master/CoreBitcoin/BTCKeychain.h)).\n- BIP39 implementation ([BTCMnemonic](https://github.com/oleganza/CoreBitcoin/blob/master/CoreBitcoin/BTCMnemonic.h)).\n- BIP70 implementation ([BTCPaymentProtocol](https://github.com/oleganza/CoreBitcoin/blob/master/CoreBitcoin/BTCPaymentProtocol.h)).\n- [Automatic Encrypted Wallet Backup](https://github.com/oleganza/bitcoin-papers/blob/master/AutomaticEncryptedWalletBackups.md) scheme ([BTCEncryptedBackup](https://github.com/oleganza/CoreBitcoin/blob/master/CoreBitcoin/BTCEncryptedBackup.h)).\n\nCurrency Tools\n--------------\n\n- Bitcoin currency formatter with support for BTC, mBTC, bits ([BTCNumberFormatter](https://github.com/oleganza/CoreBitcoin/blob/master/CoreBitcoin/BTCNumberFormatter.h)).\n- Currency converter (not linked to any exchange) with support for various methods to calculate exchange rate ([BTCCurrencyConverter](https://github.com/oleganza/CoreBitcoin/blob/master/CoreBitcoin/BTCCurrencyConverter.h)).\n- Various price sources and abstract interface for adding new ones ([BTCPriceSource](https://github.com/oleganza/CoreBitcoin/blob/master/CoreBitcoin/BTCPriceSource.h) with support for Winkdex, Coindesk, Coinbase, Paymium).\n\nAdvanced Features\n-----------------\n\n- Deterministic [RFC6979](https://tools.ietf.org/html/rfc6979#section-3.2)-compliant ECDSA signatures.\n- Script evaluation machine to actually validate individual transactions ([BTCScriptMachine](https://github.com/oleganza/CoreBitcoin/blob/master/CoreBitcoin/BTCScriptMachine.h)).\n- Blind signatures implementation ([BTCBlindSignature](https://github.com/oleganza/CoreBitcoin/blob/master/CoreBitcoin/BTCBlindSignature.h)).\n- Math on elliptic curves: big numbers, curve points, conversion between keys, numbers and points ([BTCBigNumber](https://github.com/oleganza/CoreBitcoin/blob/master/CoreBitcoin/BTCBigNumber.h), [BTCCurvePoint](https://github.com/oleganza/CoreBitcoin/blob/master/CoreBitcoin/BTCCurvePoint.h)).\n- Various cryptographic primitives like hash functions and AES encryption (see [BTCData.h](https://github.com/oleganza/CoreBitcoin/blob/master/CoreBitcoin/BTCData.h)).\n\n\nOn the roadmap\n--------------\n\nSee [all todo items](https://github.com/oleganza/CoreBitcoin/issues).\n\n- Complete support for blocks and block headers.\n- SPV mode and P2P communication with other nodes.\n- Full blockchain verification procedure and storage.\n- Importing BitcoinQT, Electrum and Blockchain.info wallets.\n- Support for [libsecp256k1](https://github.com/bitcoin/secp256k1) in addition to OpenSSL.\n- Eventual support for libconsensus as it gets more mature and feature-complete.\n\nThe goal is to implement everything useful related to Bitcoin and organize it nicely in a single powerful library. Pull requests are welcome.\n\n\nStarting points\n---------------\n\nTo encode/decode addresses see [BTCAddress](https://github.com/oleganza/CoreBitcoin/blob/master/CoreBitcoin/BTCAddress.h).\n\nTo perform cryptographic operations, use [BTCKey](https://github.com/oleganza/CoreBitcoin/blob/master/CoreBitcoin/BTCKey.h), [BTCBigNumber](https://github.com/oleganza/CoreBitcoin/blob/master/CoreBitcoin/BTCBigNumber.h) and [BTCCurvePoint](https://github.com/oleganza/CoreBitcoin/blob/master/CoreBitcoin/BTCCurvePoint). [BTCKeychain](https://github.com/oleganza/CoreBitcoin/blob/master/CoreBitcoin/BTCKeychain.h) implements BIP32 (hierarchical deterministic wallet).\n\nTo fetch unspent coins and broadcast transactions use one of the 3rd party APIs: [BTCBlockchainInfo](https://github.com/oleganza/CoreBitcoin/blob/master/CoreBitcoin/BTCBlockchainInfo.h) (blockchain.info) or [Chain-iOS](https://github.com/chain-engineering/chain-ios) (recommended).\n\nFor full wallet workflow see [BTCTransaction+Tests.m](https://github.com/oleganza/CoreBitcoin/blob/master/CoreBitcoin/BTCTransaction+Tests.m) (fetch unspent outputs, compose a transaction, sign inputs, verify and broadcast).\n\nFor multisignature scripts usage see [BTCScript+Tests.m](https://github.com/oleganza/CoreBitcoin/blob/master/CoreBitcoin/BTCScript+Tests.m): compose and unlock multisig output.\n\nAll other files with `+Tests` in their name are worth checking out as they contain useful sample code.\n\n\nUsing CoreBitcoin CocoaPod (recommended)\n----------------------------------------\n\nAdd this to your Podfile:\n\n    pod 'CoreBitcoin', :podspec => 'https://raw.github.com/oleganza/CoreBitcoin/master/CoreBitcoin.podspec'\n\nRun in Terminal:\n\n    $ pod install\n\nInclude headers:\n\n\t#import <CoreBitcoin/CoreBitcoin.h>\n\nIf you'd like to use categories, include different header:\n\n\t#import <CoreBitcoin/CoreBitcoin+Categories.h>\n\n\nUsing CoreBitcoin.framework\n---------------------------\n\nClone this repository and build all libraries:\n\n\t$ ./update_openssl.sh\n\t$ ./build_libraries.sh\n\nCopy iOS or OS X framework located in binaries/iOS or binaries/OSX to your project.\n\nInclude headers:\n\n\t#import <CoreBitcoin/CoreBitcoin.h>\n\t\nThere are also raw universal libraries (.a) with headers located in binaries/include, if you happen to need them for some reason. Frameworks and binary libraries have OpenSSL built-in. If you have different version of OpenSSL in your project, consider using CocoaPods or raw sources of CoreBitcoin.\n\n\nSwift\n-----\n\nWe love Swift and design the code to be compatible with Swift. That means using modern enums, favoring initializers over factory methods, avoiding obscure C features etc. You are welcome to try using CoreBitcoin from Swift, please file bugs if you have problems.\n\nSwift is awesome to write crypto in it (due to explicit optionals, generics and first-class structs) and we would love to rewrite the entire CoreBitcoin and even relevant portions of OpenSSL in it. Unfortunately, for a year or two it's just out of the question due to instability. And then, using Swift-only features on the API level would mean that Objective-C code wouldn't be able to use CoreBitcoin. Given that, in the medium term we will focus solely on Objective-C implementation compatible with Swift. When everyone jumps exclusively on Swift, we'll make a complete rewrite.\n\n\nContribute\n----------\n\nFeel free to open issues, drop us pull requests or contact us to discuss how to do things.\n\nFollow existing code style and use 4 spaces instead of tabs. Methods have opening braces on a new line. There's no line width limit.\n\nEmail: [oleganza@gmail.com](mailto:oleganza@gmail.com)\n\nTwitter: [@oleganza](http://twitter.com/oleganza)\n\nTo publish on CocoaPods:\n\n    $ pod trunk push --verbose --use-libraries\n\n\nDonate\n------\n\nPlease send your donations here: 1CBtcGivXmHQ8ZqdPgeMfcpQNJrqTrSAcG.\n\nAll funds will be used only for bounties.\n\nYou can also donate to a specific bounty. The amount will be reserved for that bounty and listed above. Contact [Oleg](mailto:oleganza@gmail.com) to arrange that.\n\n\nLicense\n-------\n\nReleased under [WTFPL](http://www.wtfpl.net) (except for OpenSSL). Have a nice day.\n\n"
  },
  {
    "path": "Pods/Crashlytics/Crashlytics.framework/README",
    "content": "We've now combined all our supported platforms into a single podspec. As a result, we moved our submit script to a new location for Cocoapods projects: ${PODS_ROOT}/Crashlytics/submit. To avoid breaking functionality that references the old location of the submit, we've placed this dummy script that calls to the correct location, while providing a helpful warning if it is invoked. This bridge for backwards compatibility will be removed in a future release, so please heed the warning!\n"
  },
  {
    "path": "Pods/Crashlytics/Crashlytics.framework/submit",
    "content": "if [[ -z $PODS_ROOT ]]; then\necho \"error: The submit binary delivered by cocoapods is in a new location, under '$\"{\"PODS_ROOT\"}\"/Crashlytics/submit'. This script was put in place for backwards compatibility, but it relies on PODS_ROOT, which does not have a value in your current setup. Please update the path to the submit binary to fix this issue.\"\nelse\necho \"warning: The submit script is now located at '$\"{\"PODS_ROOT\"}\"/Crashlytics/submit'. To remove this warning, update your path to point to this new location.\"\nsh \"${PODS_ROOT}/Crashlytics/submit\" \"$@\"\nfi\n"
  },
  {
    "path": "Pods/Crashlytics/README.md",
    "content": "![Crashlytics Header](https://docs.fabric.io/ios/cocoapod-readmes/cocoapods-crashlytics-header.png)\n\nPart of [Twitter Fabric](https://www.fabric.io), [Crashlytics](http://try.crashlytics.com/) offers the most powerful, yet lightest weight crash reporting solution for iOS. Crashlytics also provides real-time analytics through [Answers](https://answers.io/) and app distributions to testers using [Beta](http://try.crashlytics.com/beta/).\n\n## Setup\n\n1. Visit [https://fabric.io/sign_up](https://fabric.io/sign_up) to create your Fabric account and to download Fabric.app.\n\n1. Open Fabric.app, login and select the Crashlytics SDK.\n\n    ![Fabric Plugin](https://docs.fabric.io/ios/cocoapod-readmes/cocoapods-fabric-plugin.png)\n\n1. The Fabric app automatically detects when a project uses CocoaPods and gives you the option to install via the Podfile or Xcode.\n\n\t![Fabric Installation Options](https://docs.fabric.io/ios/cocoapod-readmes/cocoapods-pod-installation-option.png)\n\n1. Select the Podfile option and follow the installation instructions to update your Podfile. **Note:** the Crashlytics Pod includes Answers. If you have Answers included as a separate Pod it should be removed from your Podfile to avoid duplicate symbol errors.\n\n\t```\n\tpod 'Fabric'\n\tpod 'Crashlytics'\n\t```\n\n1. Run `pod install`\n\n1. Add a Run Script Build Phase and build your app.\n\n\t![Fabric Run Script Build Phase](https://docs.fabric.io/ios/cocoapod-readmes/cocoapods-rsbp.png)\n\n1. Initialize the SDK by inserting code outlined in the Fabric.app.\n\n1. Run your app to finish the installation.\n\n## Resources\n\n* [Documentation](https://docs.fabric.io/ios/crashlytics/index.html)\n* [Forums](https://twittercommunity.com/c/fabric/crashlytics)\n* [Website](http://try.crashlytics.com/)\n* Follow us on Twitter: [@fabric](https://twitter.com/fabric) and [@crashlytics](https://twitter.com/crashlytics)\n* Follow us on Periscope: [Fabric](https://periscope.tv/fabric) and [TwitterDev](https://periscope.tv/twitterdev)\n"
  },
  {
    "path": "Pods/Crashlytics/iOS/Crashlytics.framework/Headers/ANSCompatibility.h",
    "content": "//\n//  ANSCompatibility.h\n//  AnswersKit\n//\n//  Copyright (c) 2015 Crashlytics, Inc. All rights reserved.\n//\n\n#pragma once\n\n#if !__has_feature(nullability)\n#define nonnull\n#define nullable\n#define _Nullable\n#define _Nonnull\n#endif\n\n#ifndef NS_ASSUME_NONNULL_BEGIN\n#define NS_ASSUME_NONNULL_BEGIN\n#endif\n\n#ifndef NS_ASSUME_NONNULL_END\n#define NS_ASSUME_NONNULL_END\n#endif\n\n#if __has_feature(objc_generics)\n#define ANS_GENERIC_NSARRAY(type) NSArray<type>\n#define ANS_GENERIC_NSDICTIONARY(key_type,object_key) NSDictionary<key_type, object_key>\n#else\n#define ANS_GENERIC_NSARRAY(type) NSArray\n#define ANS_GENERIC_NSDICTIONARY(key_type,object_key) NSDictionary\n#endif\n"
  },
  {
    "path": "Pods/Crashlytics/iOS/Crashlytics.framework/Headers/Answers.h",
    "content": "//\n//  Answers.h\n//  Crashlytics\n//\n//  Copyright (c) 2015 Crashlytics, Inc. All rights reserved.\n//\n\n#import <Foundation/Foundation.h>\n#import \"ANSCompatibility.h\"\n\nNS_ASSUME_NONNULL_BEGIN\n\n/**\n *  This class exposes the Answers Events API, allowing you to track key \n *  user user actions and metrics in your app.\n */\n@interface Answers : NSObject\n\n/**\n *  Log a Sign Up event to see users signing up for your app in real-time, understand how\n *  many users are signing up with different methods and their success rate signing up.\n *\n *  @param signUpMethodOrNil     The method by which a user logged in, e.g. Twitter or Digits.\n *  @param signUpSucceededOrNil  The ultimate success or failure of the login\n *  @param customAttributesOrNil A dictionary of custom attributes to associate with this event.\n */\n+ (void)logSignUpWithMethod:(nullable NSString *)signUpMethodOrNil\n                    success:(nullable NSNumber *)signUpSucceededOrNil\n           customAttributes:(nullable ANS_GENERIC_NSDICTIONARY(NSString *, id) *)customAttributesOrNil;\n\n/**\n *  Log an Log In event to see users logging into your app in real-time, understand how many\n *  users are logging in with different methods and their success rate logging into your app.\n *\n *  @param loginMethodOrNil      The method by which a user logged in, e.g. email, Twitter or Digits.\n *  @param loginSucceededOrNil   The ultimate success or failure of the login\n *  @param customAttributesOrNil A dictionary of custom attributes to associate with this event.\n */\n+ (void)logLoginWithMethod:(nullable NSString *)loginMethodOrNil\n                   success:(nullable NSNumber *)loginSucceededOrNil\n          customAttributes:(nullable ANS_GENERIC_NSDICTIONARY(NSString *, id) *)customAttributesOrNil;\n\n/**\n *  Log a Share event to see users sharing from your app in real-time, letting you\n *  understand what content they're sharing from the type or genre down to the specific id.\n *\n *  @param shareMethodOrNil      The method by which a user shared, e.g. email, Twitter, SMS.\n *  @param contentNameOrNil      The human readable name for this piece of content.\n *  @param contentTypeOrNil      The type of content shared.\n *  @param contentIdOrNil        The unique identifier for this piece of content. Useful for finding the top shared item.\n *  @param customAttributesOrNil A dictionary of custom attributes to associate with this event.\n */\n+ (void)logShareWithMethod:(nullable NSString *)shareMethodOrNil\n               contentName:(nullable NSString *)contentNameOrNil\n               contentType:(nullable NSString *)contentTypeOrNil\n                 contentId:(nullable NSString *)contentIdOrNil\n          customAttributes:(nullable ANS_GENERIC_NSDICTIONARY(NSString *, id) *)customAttributesOrNil;\n\n/**\n *  Log an Invite Event to track how users are inviting other users into\n *  your application.\n *\n *  @param inviteMethodOrNil     The method of invitation, e.g. GameCenter, Twitter, email.\n *  @param customAttributesOrNil A dictionary of custom attributes to associate with this event.\n */\n+ (void)logInviteWithMethod:(nullable NSString *)inviteMethodOrNil\n           customAttributes:(nullable ANS_GENERIC_NSDICTIONARY(NSString *, id) *)customAttributesOrNil;\n\n/**\n *  Log a Purchase event to see your revenue in real-time, understand how many users are making purchases, see which\n *  items are most popular, and track plenty of other important purchase-related metrics.\n *\n *  @param itemPriceOrNil         The purchased item's price.\n *  @param currencyOrNil          The ISO4217 currency code. Example: USD\n *  @param purchaseSucceededOrNil Was the purchase succesful or unsuccesful\n *  @param itemNameOrNil          The human-readable form of the item's name. Example:\n *  @param itemTypeOrNil          The type, or genre of the item. Example: Song\n *  @param itemIdOrNil            The machine-readable, unique item identifier Example: SKU\n *  @param customAttributesOrNil  A dictionary of custom attributes to associate with this purchase.\n */\n+ (void)logPurchaseWithPrice:(nullable NSDecimalNumber *)itemPriceOrNil\n                    currency:(nullable NSString *)currencyOrNil\n                     success:(nullable NSNumber *)purchaseSucceededOrNil\n                    itemName:(nullable NSString *)itemNameOrNil\n                    itemType:(nullable NSString *)itemTypeOrNil\n                      itemId:(nullable NSString *)itemIdOrNil\n            customAttributes:(nullable ANS_GENERIC_NSDICTIONARY(NSString *, id) *)customAttributesOrNil;\n\n/**\n *  Log a Level Start Event to track where users are in your game.\n *\n *  @param levelNameOrNil        The level name\n *  @param customAttributesOrNil A dictionary of custom attributes to associate with this level start event.\n */\n+ (void)logLevelStart:(nullable NSString *)levelNameOrNil\n     customAttributes:(nullable ANS_GENERIC_NSDICTIONARY(NSString *, id) *)customAttributesOrNil;\n\n/**\n *  Log a Level End event to track how users are completing levels in your game.\n *\n *  @param levelNameOrNil                 The name of the level completed, E.G. \"1\" or \"Training\"\n *  @param scoreOrNil                     The score the user completed the level with.\n *  @param levelCompletedSuccesfullyOrNil A boolean representing whether or not the level was completed succesfully.\n *  @param customAttributesOrNil          A dictionary of custom attributes to associate with this event.\n */\n+ (void)logLevelEnd:(nullable NSString *)levelNameOrNil\n              score:(nullable NSNumber *)scoreOrNil\n            success:(nullable NSNumber *)levelCompletedSuccesfullyOrNil\n   customAttributes:(nullable ANS_GENERIC_NSDICTIONARY(NSString *, id) *)customAttributesOrNil;\n\n/**\n *  Log an Add to Cart event to see users adding items to a shopping cart in real-time, understand how\n *  many users start the purchase flow, see which items are most popular, and track plenty of other important\n *  purchase-related metrics.\n *\n *  @param itemPriceOrNil         The purchased item's price.\n *  @param currencyOrNil          The ISO4217 currency code. Example: USD\n *  @param itemNameOrNil          The human-readable form of the item's name. Example:\n *  @param itemTypeOrNil          The type, or genre of the item. Example: Song\n *  @param itemIdOrNil            The machine-readable, unique item identifier Example: SKU\n *  @param customAttributesOrNil  A dictionary of custom attributes to associate with this event.\n */\n+ (void)logAddToCartWithPrice:(nullable NSDecimalNumber *)itemPriceOrNil\n                     currency:(nullable NSString *)currencyOrNil\n                     itemName:(nullable NSString *)itemNameOrNil\n                     itemType:(nullable NSString *)itemTypeOrNil\n                       itemId:(nullable NSString *)itemIdOrNil\n             customAttributes:(nullable ANS_GENERIC_NSDICTIONARY(NSString *, id) *)customAttributesOrNil;\n\n/**\n *  Log a Start Checkout event to see users moving through the purchase funnel in real-time, understand how many\n *  users are doing this and how much they're spending per checkout, and see how it related to other important\n *  purchase-related metrics.\n *\n *  @param totalPriceOrNil        The total price of the cart.\n *  @param currencyOrNil          The ISO4217 currency code. Example: USD\n *  @param itemCountOrNil         The number of items in the cart.\n *  @param customAttributesOrNil  A dictionary of custom attributes to associate with this event.\n */\n+ (void)logStartCheckoutWithPrice:(nullable NSDecimalNumber *)totalPriceOrNil\n                         currency:(nullable NSString *)currencyOrNil\n                        itemCount:(nullable NSNumber *)itemCountOrNil\n                 customAttributes:(nullable ANS_GENERIC_NSDICTIONARY(NSString *, id) *)customAttributesOrNil;\n\n/**\n *  Log a Rating event to see users rating content within your app in real-time and understand what\n *  content is most engaging, from the type or genre down to the specific id.\n *\n *  @param ratingOrNil           The integer rating given by the user.\n *  @param contentNameOrNil      The human readable name for this piece of content.\n *  @param contentTypeOrNil      The type of content shared.\n *  @param contentIdOrNil        The unique identifier for this piece of content. Useful for finding the top shared item.\n *  @param customAttributesOrNil A dictionary of custom attributes to associate with this event.\n */\n+ (void)logRating:(nullable NSNumber *)ratingOrNil\n      contentName:(nullable NSString *)contentNameOrNil\n      contentType:(nullable NSString *)contentTypeOrNil\n        contentId:(nullable NSString *)contentIdOrNil\n customAttributes:(nullable ANS_GENERIC_NSDICTIONARY(NSString *, id) *)customAttributesOrNil;\n\n/**\n *  Log a Content View event to see users viewing content within your app in real-time and\n *  understand what content is most engaging, from the type or genre down to the specific id.\n *\n *  @param contentNameOrNil      The human readable name for this piece of content.\n *  @param contentTypeOrNil      The type of content shared.\n *  @param contentIdOrNil        The unique identifier for this piece of content. Useful for finding the top shared item.\n *  @param customAttributesOrNil A dictionary of custom attributes to associate with this event.\n */\n+ (void)logContentViewWithName:(nullable NSString *)contentNameOrNil\n                   contentType:(nullable NSString *)contentTypeOrNil\n                     contentId:(nullable NSString *)contentIdOrNil\n              customAttributes:(nullable ANS_GENERIC_NSDICTIONARY(NSString *, id) *)customAttributesOrNil;\n\n/**\n *  Log a Search event allows you to see users searching within your app in real-time and understand\n *  exactly what they're searching for.\n *\n *  @param queryOrNil            The user's query.\n *  @param customAttributesOrNil A dictionary of custom attributes to associate with this event.\n */\n+ (void)logSearchWithQuery:(nullable NSString *)queryOrNil\n          customAttributes:(nullable ANS_GENERIC_NSDICTIONARY(NSString *, id) *)customAttributesOrNil;\n\n/**\n *  Log a Custom Event to see user actions that are uniquely important for your app in real-time, to see how often\n *  they're performing these actions with breakdowns by different categories you add. Use a human-readable name for\n *  the name of the event, since this is how the event will appear in Answers.\n *\n *  @param eventName             The human-readable name for the event.\n *  @param customAttributesOrNil A dictionary of custom attributes to associate with this event. Attribute keys\n *                               must be <code>NSString</code> and and values must be <code>NSNumber</code> or <code>NSString</code>.\n *  @discussion                  How we treat <code>NSNumbers</code>:\n *                               We will provide information about the distribution of values over time.\n *\n *                               How we treat <code>NSStrings</code>:\n *                               NSStrings are used as categorical data, allowing comparison across different category values.\n *                               Strings are limited to a maximum length of 100 characters, attributes over this length will be\n *                               truncated.\n *\n *                               When tracking the Tweet views to better understand user engagement, sending the tweet's length\n *                               and the type of media present in the tweet allows you to track how tweet length and the type of media influence\n *                               engagement.\n */\n+ (void)logCustomEventWithName:(NSString *)eventName\n              customAttributes:(nullable ANS_GENERIC_NSDICTIONARY(NSString *, id) *)customAttributesOrNil;\n\n@end\n\nNS_ASSUME_NONNULL_END\n"
  },
  {
    "path": "Pods/Crashlytics/iOS/Crashlytics.framework/Headers/CLSAttributes.h",
    "content": "//\n//  CLSAttributes.h\n//  Crashlytics\n//\n//  Copyright (c) 2015 Crashlytics, Inc. All rights reserved.\n//\n\n#pragma once\n\n#define CLS_DEPRECATED(x)  __attribute__ ((deprecated(x)))\n\n#if !__has_feature(nullability)\n    #define nonnull\n    #define nullable\n    #define _Nullable\n    #define _Nonnull\n#endif\n\n#ifndef NS_ASSUME_NONNULL_BEGIN\n    #define NS_ASSUME_NONNULL_BEGIN\n#endif\n\n#ifndef NS_ASSUME_NONNULL_END\n    #define NS_ASSUME_NONNULL_END\n#endif\n\n#if __has_feature(objc_generics)\n    #define CLS_GENERIC_NSARRAY(type) NSArray<type>\n    #define CLS_GENERIC_NSDICTIONARY(key_type,object_key) NSDictionary<key_type, object_key>\n#else\n    #define CLS_GENERIC_NSARRAY(type) NSArray\n    #define CLS_GENERIC_NSDICTIONARY(key_type,object_key) NSDictionary\n#endif\n"
  },
  {
    "path": "Pods/Crashlytics/iOS/Crashlytics.framework/Headers/CLSLogging.h",
    "content": "//\n//  CLSLogging.h\n//  Crashlytics\n//\n//  Copyright (c) 2015 Crashlytics, Inc. All rights reserved.\n//\n#ifdef __OBJC__\n#import \"CLSAttributes.h\"\n#import <Foundation/Foundation.h>\n\nNS_ASSUME_NONNULL_BEGIN\n#endif\n\n\n\n/**\n *\n * The CLS_LOG macro provides as easy way to gather more information in your log messages that are\n * sent with your crash data. CLS_LOG prepends your custom log message with the function name and\n * line number where the macro was used. If your app was built with the DEBUG preprocessor macro\n * defined CLS_LOG uses the CLSNSLog function which forwards your log message to NSLog and CLSLog.\n * If the DEBUG preprocessor macro is not defined CLS_LOG uses CLSLog only.\n *\n * Example output:\n * -[AppDelegate login:] line 134 $ login start\n *\n * If you would like to change this macro, create a new header file, unset our define and then define\n * your own version. Make sure this new header file is imported after the Crashlytics header file.\n *\n * #undef CLS_LOG\n * #define CLS_LOG(__FORMAT__, ...) CLSNSLog...\n *\n **/\n#ifdef __OBJC__\n#ifdef DEBUG\n#define CLS_LOG(__FORMAT__, ...) CLSNSLog((@\"%s line %d $ \" __FORMAT__), __PRETTY_FUNCTION__, __LINE__, ##__VA_ARGS__)\n#else\n#define CLS_LOG(__FORMAT__, ...) CLSLog((@\"%s line %d $ \" __FORMAT__), __PRETTY_FUNCTION__, __LINE__, ##__VA_ARGS__)\n#endif\n#endif\n\n/**\n *\n * Add logging that will be sent with your crash data. This logging will not show up in the system.log\n * and will only be visible in your Crashlytics dashboard.\n *\n **/\n\n#ifdef __OBJC__\nOBJC_EXTERN void CLSLog(NSString *format, ...) NS_FORMAT_FUNCTION(1,2);\nOBJC_EXTERN void CLSLogv(NSString *format, va_list ap) NS_FORMAT_FUNCTION(1,0);\n\n/**\n *\n * Add logging that will be sent with your crash data. This logging will show up in the system.log\n * and your Crashlytics dashboard. It is not recommended for Release builds.\n *\n **/\nOBJC_EXTERN void CLSNSLog(NSString *format, ...) NS_FORMAT_FUNCTION(1,2);\nOBJC_EXTERN void CLSNSLogv(NSString *format, va_list ap) NS_FORMAT_FUNCTION(1,0);\n\n\nNS_ASSUME_NONNULL_END\n#endif\n"
  },
  {
    "path": "Pods/Crashlytics/iOS/Crashlytics.framework/Headers/CLSReport.h",
    "content": "//\n//  CLSReport.h\n//  Crashlytics\n//\n//  Copyright (c) 2015 Crashlytics, Inc. All rights reserved.\n//\n\n#import <Foundation/Foundation.h>\n#import \"CLSAttributes.h\"\n\nNS_ASSUME_NONNULL_BEGIN\n\n/**\n * The CLSCrashReport protocol is deprecated. See the CLSReport class and the CrashyticsDelegate changes for details.\n **/\n@protocol CLSCrashReport <NSObject>\n\n@property (nonatomic, copy, readonly) NSString *identifier;\n@property (nonatomic, copy, readonly) NSDictionary *customKeys;\n@property (nonatomic, copy, readonly) NSString *bundleVersion;\n@property (nonatomic, copy, readonly) NSString *bundleShortVersionString;\n@property (nonatomic, readonly, nullable) NSDate *crashedOnDate;\n@property (nonatomic, copy, readonly) NSString *OSVersion;\n@property (nonatomic, copy, readonly) NSString *OSBuildVersion;\n\n@end\n\n/**\n * The CLSReport exposes an interface to the phsyical report that Crashlytics has created. You can\n * use this class to get information about the event, and can also set some values after the\n * event has occured.\n **/\n@interface CLSReport : NSObject <CLSCrashReport>\n\n- (instancetype)init NS_UNAVAILABLE;\n+ (instancetype)new NS_UNAVAILABLE;\n\n/**\n * Returns the session identifier for the report.\n **/\n@property (nonatomic, copy, readonly) NSString *identifier;\n\n/**\n * Returns the custom key value data for the report.\n **/\n@property (nonatomic, copy, readonly) NSDictionary *customKeys;\n\n/**\n * Returns the CFBundleVersion of the application that generated the report.\n **/\n@property (nonatomic, copy, readonly) NSString *bundleVersion;\n\n/**\n * Returns the CFBundleShortVersionString of the application that generated the report.\n **/\n@property (nonatomic, copy, readonly) NSString *bundleShortVersionString;\n\n/**\n * Returns the date that the report was created.\n **/\n@property (nonatomic, copy, readonly) NSDate *dateCreated;\n\n/**\n * Returns the os version that the application crashed on.\n **/\n@property (nonatomic, copy, readonly) NSString *OSVersion;\n\n/**\n * Returns the os build version that the application crashed on.\n **/\n@property (nonatomic, copy, readonly) NSString *OSBuildVersion;\n\n/**\n * Returns YES if the report contains any crash information, otherwise returns NO.\n **/\n@property (nonatomic, assign, readonly) BOOL isCrash;\n\n/**\n * You can use this method to set, after the event, additional custom keys. The rules\n * and semantics for this method are the same as those documented in Crashlytics.h. Be aware\n * that the maximum size and count of custom keys is still enforced, and you can overwrite keys\n * and/or cause excess keys to be deleted by using this method.\n **/\n- (void)setObjectValue:(nullable id)value forKey:(NSString *)key;\n\n/**\n * Record an application-specific user identifier. See Crashlytics.h for details.\n **/\n@property (nonatomic, copy, nullable) NSString * userIdentifier;\n\n/**\n * Record a user name. See Crashlytics.h for details.\n **/\n@property (nonatomic, copy, nullable) NSString * userName;\n\n/**\n * Record a user email. See Crashlytics.h for details.\n **/\n@property (nonatomic, copy, nullable) NSString * userEmail;\n\n@end\n\nNS_ASSUME_NONNULL_END\n"
  },
  {
    "path": "Pods/Crashlytics/iOS/Crashlytics.framework/Headers/CLSStackFrame.h",
    "content": "//\n//  CLSStackFrame.h\n//  Crashlytics\n//\n//  Copyright 2015 Crashlytics, Inc. All rights reserved.\n//\n\n#import <Foundation/Foundation.h>\n#import \"CLSAttributes.h\"\n\nNS_ASSUME_NONNULL_BEGIN\n\n/**\n *\n * This class is used in conjunction with -[Crashlytics recordCustomExceptionName:reason:frameArray:] to\n * record information about non-ObjC/C++ exceptions. All information included here will be displayed \n * in the Crashlytics UI, and can influence crash grouping. Be particularly careful with the use of the \n * address property. If set, Crashlytics will attempt symbolication and could overwrite other properities \n * in the process.\n *\n **/\n@interface CLSStackFrame : NSObject\n\n+ (instancetype)stackFrame;\n+ (instancetype)stackFrameWithAddress:(NSUInteger)address;\n+ (instancetype)stackFrameWithSymbol:(NSString *)symbol;\n\n@property (nonatomic, copy, nullable) NSString *symbol;\n@property (nonatomic, copy, nullable) NSString *rawSymbol;\n@property (nonatomic, copy, nullable) NSString *library;\n@property (nonatomic, copy, nullable) NSString *fileName;\n@property (nonatomic, assign) uint32_t lineNumber;\n@property (nonatomic, assign) uint64_t offset;\n@property (nonatomic, assign) uint64_t address;\n\n@end\n\nNS_ASSUME_NONNULL_END\n"
  },
  {
    "path": "Pods/Crashlytics/iOS/Crashlytics.framework/Headers/Crashlytics.h",
    "content": "//\n//  Crashlytics.h\n//  Crashlytics\n//\n//  Copyright (c) 2015 Crashlytics, Inc. All rights reserved.\n//\n\n#import <Foundation/Foundation.h>\n\n#import \"CLSAttributes.h\"\n#import \"CLSLogging.h\"\n#import \"CLSReport.h\"\n#import \"CLSStackFrame.h\"\n#import \"Answers.h\"\n\nNS_ASSUME_NONNULL_BEGIN\n\n@protocol CrashlyticsDelegate;\n\n/**\n * Crashlytics. Handles configuration and initialization of Crashlytics.\n *\n * Note: The Crashlytics class cannot be subclassed. If this is causing you pain for\n * testing, we suggest using either a wrapper class or a protocol extension.\n */\n@interface Crashlytics : NSObject\n\n@property (nonatomic, readonly, copy) NSString *APIKey;\n@property (nonatomic, readonly, copy) NSString *version;\n@property (nonatomic, assign)         BOOL      debugMode;\n\n/**\n *\n * The delegate can be used to influence decisions on reporting and behavior, as well as reacting\n * to previous crashes.\n *\n * Make certain that the delegate is setup before starting Crashlytics with startWithAPIKey:... or\n * via +[Fabric with:...]. Failure to do will result in missing any delegate callbacks that occur\n * synchronously during start.\n *\n **/\n@property (nonatomic, assign, nullable) id <CrashlyticsDelegate> delegate;\n\n/**\n *  The recommended way to install Crashlytics into your application is to place a call to +startWithAPIKey: \n *  in your -application:didFinishLaunchingWithOptions: or -applicationDidFinishLaunching:\n *  method.\n *\n *  Note: Starting with 3.0, the submission process has been significantly improved. The delay parameter\n *  is no longer required to throttle submissions on launch, performance will be great without it.\n *\n *  @param apiKey The Crashlytics API Key for this app\n *\n *  @return The singleton Crashlytics instance\n */\n+ (Crashlytics *)startWithAPIKey:(NSString *)apiKey;\n+ (Crashlytics *)startWithAPIKey:(NSString *)apiKey afterDelay:(NSTimeInterval)delay CLS_DEPRECATED(\"Crashlytics no longer needs or uses the delay parameter.  Please use +startWithAPIKey: instead.\");\n\n/**\n *  If you need the functionality provided by the CrashlyticsDelegate protocol, you can use\n *  these convenience methods to activate the framework and set the delegate in one call.\n *  \n *  @param apiKey   The Crashlytics API Key for this app\n *  @param delegate A delegate object which conforms to CrashlyticsDelegate.\n *\n *  @return The singleton Crashlytics instance\n */\n+ (Crashlytics *)startWithAPIKey:(NSString *)apiKey delegate:(nullable id<CrashlyticsDelegate>)delegate;\n+ (Crashlytics *)startWithAPIKey:(NSString *)apiKey delegate:(nullable id<CrashlyticsDelegate>)delegate afterDelay:(NSTimeInterval)delay CLS_DEPRECATED(\"Crashlytics no longer needs or uses the delay parameter.  Please use +startWithAPIKey:delegate: instead.\");\n\n/**\n *  Access the singleton Crashlytics instance.\n *\n *  @return The singleton Crashlytics instance\n */\n+ (Crashlytics *)sharedInstance;\n\n/**\n *  The easiest way to cause a crash - great for testing!\n */\n- (void)crash;\n\n/**\n *  The easiest way to cause a crash with an exception - great for testing.\n */\n- (void)throwException;\n\n/**\n *  Specify a user identifier which will be visible in the Crashlytics UI.\n *\n *  Many of our customers have requested the ability to tie crashes to specific end-users of their\n *  application in order to facilitate responses to support requests or permit the ability to reach\n *  out for more information. We allow you to specify up to three separate values for display within\n *  the Crashlytics UI - but please be mindful of your end-user's privacy.\n *\n *  We recommend specifying a user identifier - an arbitrary string that ties an end-user to a record\n *  in your system. This could be a database id, hash, or other value that is meaningless to a\n *  third-party observer but can be indexed and queried by you.\n *\n *  Optionally, you may also specify the end-user's name or username, as well as email address if you\n *  do not have a system that works well with obscured identifiers.\n *\n *  Pursuant to our EULA, this data is transferred securely throughout our system and we will not\n *  disseminate end-user data unless required to by law. That said, if you choose to provide end-user\n *  contact information, we strongly recommend that you disclose this in your application's privacy\n *  policy. Data privacy is of our utmost concern.\n *\n *  @param identifier An arbitrary user identifier string which ties an end-user to a record in your system.\n */\n- (void)setUserIdentifier:(nullable NSString *)identifier;\n\n/**\n *  Specify a user name which will be visible in the Crashlytics UI.\n *  Please be mindful of your end-user's privacy and see if setUserIdentifier: can fulfil your needs.\n *  @see setUserIdentifier:\n *\n *  @param name An end user's name.\n */\n- (void)setUserName:(nullable NSString *)name;\n\n/**\n *  Specify a user email which will be visible in the Crashlytics UI.\n *  Please be mindful of your end-user's privacy and see if setUserIdentifier: can fulfil your needs.\n *  \n *  @see setUserIdentifier:\n *\n *  @param email An end user's email address.\n */\n- (void)setUserEmail:(nullable NSString *)email;\n\n+ (void)setUserIdentifier:(nullable NSString *)identifier CLS_DEPRECATED(\"Please access this method via +sharedInstance\");\n+ (void)setUserName:(nullable NSString *)name CLS_DEPRECATED(\"Please access this method via +sharedInstance\");\n+ (void)setUserEmail:(nullable NSString *)email CLS_DEPRECATED(\"Please access this method via +sharedInstance\");\n\n/**\n *  Set a value for a for a key to be associated with your crash data which will be visible in the Crashlytics UI.\n *  When setting an object value, the object is converted to a string. This is typically done by calling \n *  -[NSObject description].\n *\n *  @param value The object to be associated with the key\n *  @param key   The key with which to associate the value\n */\n- (void)setObjectValue:(nullable id)value forKey:(NSString *)key;\n\n/**\n *  Set an int value for a key to be associated with your crash data which will be visible in the Crashlytics UI.\n *\n *  @param value The integer value to be set\n *  @param key   The key with which to associate the value\n */\n- (void)setIntValue:(int)value forKey:(NSString *)key;\n\n/**\n *  Set an BOOL value for a key to be associated with your crash data which will be visible in the Crashlytics UI.\n *\n *  @param value The BOOL value to be set\n *  @param key   The key with which to associate the value\n */\n- (void)setBoolValue:(BOOL)value forKey:(NSString *)key;\n\n/**\n *  Set an float value for a key to be associated with your crash data which will be visible in the Crashlytics UI.\n *\n *  @param value The float value to be set\n *  @param key   The key with which to associate the value\n */\n- (void)setFloatValue:(float)value forKey:(NSString *)key;\n\n+ (void)setObjectValue:(nullable id)value forKey:(NSString *)key CLS_DEPRECATED(\"Please access this method via +sharedInstance\");\n+ (void)setIntValue:(int)value forKey:(NSString *)key CLS_DEPRECATED(\"Please access this method via +sharedInstance\");\n+ (void)setBoolValue:(BOOL)value forKey:(NSString *)key CLS_DEPRECATED(\"Please access this method via +sharedInstance\");\n+ (void)setFloatValue:(float)value forKey:(NSString *)key CLS_DEPRECATED(\"Please access this method via +sharedInstance\");\n\n/**\n *  This method can be used to record a single exception structure in a report. This is particularly useful\n *  when your code interacts with non-native languages like Lua, C#, or Javascript. This call can be\n *  expensive and should only be used shortly before process termination. This API is not intended be to used\n *  to log NSException objects. All safely-reportable NSExceptions are automatically captured by\n *  Crashlytics.\n *\n *  @param name       The name of the custom exception\n *  @param reason     The reason this exception occured\n *  @param frameArray An array of CLSStackFrame objects\n */\n- (void)recordCustomExceptionName:(NSString *)name reason:(nullable NSString *)reason frameArray:(CLS_GENERIC_NSARRAY(CLSStackFrame *) *)frameArray;\n\n/**\n *\n * This allows you to record a non-fatal event, described by an NSError object. These events will be grouped and\n * displayed similarly to crashes. Keep in mind that this method can be expensive. Also, the total number of\n * NSErrors that can be recorded during your app's life-cycle is limited by a fixed-size circular buffer. If the\n * buffer is overrun, the oldest data is dropped. Errors are relayed to Crashlytics on a subsequent launch\n * of your application.\n *\n * You can also use the -recordError:withAdditionalUserInfo: to include additional context not represented\n * by the NSError instance itself.\n *\n **/\n- (void)recordError:(NSError *)error;\n- (void)recordError:(NSError *)error withAdditionalUserInfo:(nullable CLS_GENERIC_NSDICTIONARY(NSString *, id) *)userInfo;\n\n- (void)logEvent:(NSString *)eventName CLS_DEPRECATED(\"Please refer to Answers +logCustomEventWithName:\");\n- (void)logEvent:(NSString *)eventName attributes:(nullable NSDictionary *) attributes CLS_DEPRECATED(\"Please refer to Answers +logCustomEventWithName:\");\n+ (void)logEvent:(NSString *)eventName CLS_DEPRECATED(\"Please refer to Answers +logCustomEventWithName:\");\n+ (void)logEvent:(NSString *)eventName attributes:(nullable NSDictionary *) attributes CLS_DEPRECATED(\"Please refer to Answers +logCustomEventWithName:\");\n\n@end\n\n/**\n *\n * The CrashlyticsDelegate protocol provides a mechanism for your application to take\n * action on events that occur in the Crashlytics crash reporting system.  You can make\n * use of these calls by assigning an object to the Crashlytics' delegate property directly,\n * or through the convenience +startWithAPIKey:delegate: method.\n *\n */\n@protocol CrashlyticsDelegate <NSObject>\n@optional\n\n\n- (void)crashlyticsDidDetectCrashDuringPreviousExecution:(Crashlytics *)crashlytics CLS_DEPRECATED(\"Please refer to -crashlyticsDidDetectReportForLastExecution:\");\n- (void)crashlytics:(Crashlytics *)crashlytics didDetectCrashDuringPreviousExecution:(id <CLSCrashReport>)crash CLS_DEPRECATED(\"Please refer to -crashlyticsDidDetectReportForLastExecution:\");\n\n/**\n *\n *  Called when a Crashlytics instance has determined that the last execution of the\n *  application resulted in a saved report.  This is called synchronously on Crashlytics\n *  initialization. Your delegate must invoke the completionHandler, but does not need to do so\n *  synchronously, or even on the main thread. Invoking completionHandler with NO will cause the\n *  detected report to be deleted and not submitted to Crashlytics. This is useful for\n *  implementing permission prompts, or other more-complex forms of logic around submitting crashes.\n *\n *  Instead of using this method, you should try to make use of -crashlyticsDidDetectReportForLastExecution: \n *  if you can.\n *\n *  @warning Failure to invoke the completionHandler will prevent submissions from being reported. Watch out.\n *\n *  @warning Just implementing this delegate method will disable all forms of synchronous report submission. This can\n *           impact the reliability of reporting crashes very early in application launch.\n *\n *  @param report            The CLSReport object representing the last detected report\n *  @param completionHandler The completion handler to call when your logic has completed.\n *\n */\n- (void)crashlyticsDidDetectReportForLastExecution:(CLSReport *)report completionHandler:(void (^)(BOOL submit))completionHandler;\n\n/**\n *\n *  Called when a Crashlytics instance has determined that the last execution of the\n *  application resulted in a saved report. This method differs from\n *  -crashlyticsDidDetectReportForLastExecution:completionHandler: in three important ways:\n *\n *    - it is not called synchronously during initialization\n *    - it does not give you the ability to prevent the report from being submitted\n *    - the report object itself is immutable\n *\n *  Thanks to these limitations, making use of this method does not impact reporting \n *  reliabilty in any way.\n *\n *  @param report The read-only CLSReport object representing the last detected report\n *\n */\n\n- (void)crashlyticsDidDetectReportForLastExecution:(CLSReport *)report;\n\n/**\n *  If your app is running on an OS that supports it (OS X 10.9+, iOS 7.0+), Crashlytics will submit\n *  most reports using out-of-process background networking operations. This results in a significant\n *  improvement in reliability of reporting, as well as power and performance wins for your users.\n *  If you don't want this functionality, you can disable by returning NO from this method.\n *\n *  @warning Background submission is not supported for extensions on iOS or OS X.\n *\n *  @param crashlytics The Crashlytics singleton instance\n *\n *  @return Return NO if you don't want out-of-process background network operations.\n *\n */\n- (BOOL)crashlyticsCanUseBackgroundSessions:(Crashlytics *)crashlytics;\n\n@end\n\n/**\n *  `CrashlyticsKit` can be used as a parameter to `[Fabric with:@[CrashlyticsKit]];` in Objective-C. In Swift, use Crashlytics.sharedInstance()\n */\n#define CrashlyticsKit [Crashlytics sharedInstance]\n\nNS_ASSUME_NONNULL_END\n"
  },
  {
    "path": "Pods/Crashlytics/iOS/Crashlytics.framework/Modules/module.modulemap",
    "content": "framework module Crashlytics {\n    header \"Crashlytics.h\"\n    header \"Answers.h\"\n    header \"ANSCompatibility.h\"\n    header \"CLSLogging.h\"\n    header \"CLSReport.h\"\n    header \"CLSStackFrame.h\"\n    header \"CLSAttributes.h\"\n\n    export *\n\n    link \"z\"\n    link \"c++\"\n}\n"
  },
  {
    "path": "Pods/Crashlytics/iOS/Crashlytics.framework/run",
    "content": "#!/bin/sh\n\n#  run\n#\n#  Copyright (c) 2015 Crashlytics. All rights reserved.\n\n#  Figure out where we're being called from\nDIR=$( cd \"$( dirname \"${BASH_SOURCE[0]}\" )\" && pwd )\n\n#  Quote path in case of spaces or special chars\nDIR=\"\\\"${DIR}\"\n\nPATH_SEP=\"/\"\nVALIDATE_COMMAND=\"uploadDSYM\\\" $@ validate run-script\"\nUPLOAD_COMMAND=\"uploadDSYM\\\" $@ run-script\"\n\n#  Ensure params are as expected, run in sync mode to validate\neval $DIR$PATH_SEP$VALIDATE_COMMAND\nreturn_code=$?\n\nif [[ $return_code != 0 ]]; then\n  exit $return_code\nfi\n\n#  Verification passed, upload dSYM in background to prevent Xcode from waiting\n#  Note: Validation is performed again before upload.\n#  Output can still be found in Console.app\neval $DIR$PATH_SEP$UPLOAD_COMMAND > /dev/null 2>&1 &\n"
  },
  {
    "path": "Pods/ECSlidingViewController/ECSlidingViewController/ECPercentDrivenInteractiveTransition.h",
    "content": "// ECPercentDrivenInteractiveTransition.h\n// ECSlidingViewController 2\n//\n// Copyright (c) 2013, Michael Enriquez (http://enriquez.me)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\n#import <Foundation/Foundation.h>\n#import <UIKit/UIKit.h>\n\n/**\n Used to create a percent-driven interactive transition. Analogous to `UIPercentDrivenInteractiveTransition` except that it is compatible with `ECSlidingViewController`.\n \n See `ECSlidingInteractiveTransition` as an example subclass that uses a panning gesture to drive the percentage.\n \n You can subclass `ECPercentDrivenInteractiveTransition`, but if you do so you must start each of your method overrides with a call to the super implementation of the method.\n */\n@interface ECPercentDrivenInteractiveTransition : NSObject <UIViewControllerInteractiveTransitioning>\n\n/**\n The animator object that will be percent-driven. The animation will be triggered when the interactive transition is triggered, but instead of playing from start to finish it will be controlled by the calls to `updateInteractiveTransition:`, `cancelInteractiveTransition`, and `finishInteractiveTransition`.\n */\n@property (nonatomic, strong) id<UIViewControllerAnimatedTransitioning> animationController;\n\n/**\n The amount of the transition (specified as a percentage of the overall duration) that is complete.\n \n The value in this property reflects the last value passed to the `updateInteractiveTransition:` method.\n */\n@property (nonatomic, assign, readonly) CGFloat percentComplete;\n\n/**\n Updates the completion percentage of the transition. In general terms, this method is used to \"scrub the playhead\" of the animation defined by the `animationController`.\n \n While tracking user events, your code should call this method regularly to update the current progress toward completing the transition. If, during tracking, the interactions cross a threshold that you consider signifies the completion or cancellation of the transition, stop tracking events and call the finishInteractiveTransition or cancelInteractiveTransition method.\n */\n- (void)updateInteractiveTransition:(CGFloat)percentComplete;\n\n/**\n Causes the animation defined by the `animationController` to play from current `percentComplete` to zero percent. You must call this method or `finishInteractiveTransition` at some point during the interaction to ensure everything ends in a consistent state.\n */\n- (void)cancelInteractiveTransition;\n\n/**\n Causes the animation defined by the `animationController` to play from current `percentComplete` to 100 percent. You must call this method or `cancelInteractiveTransition` at some point during the interaction to ensure everything ends in a consistent state.\n */\n- (void)finishInteractiveTransition;\n@end\n"
  },
  {
    "path": "Pods/ECSlidingViewController/ECSlidingViewController/ECPercentDrivenInteractiveTransition.m",
    "content": "// ECPercentDrivenInteractiveTransition.m\n// ECSlidingViewController 2\n//\n// Copyright (c) 2013, Michael Enriquez (http://enriquez.me)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\n#import \"ECPercentDrivenInteractiveTransition.h\"\n\n@interface ECPercentDrivenInteractiveTransition ()\n@property (nonatomic, assign) id<UIViewControllerContextTransitioning> transitionContext;\n@property (nonatomic, assign) BOOL isActive;\n- (void)removeAnimationsRecursively:(CALayer *)layer;\n@end\n\n@implementation ECPercentDrivenInteractiveTransition\n\n- (void)startInteractiveTransition:(id<UIViewControllerContextTransitioning>)transitionContext {\n    self.isActive = YES;\n    self.transitionContext = transitionContext;\n    \n    CALayer *containerLayer = [self.transitionContext containerView].layer;\n    [self removeAnimationsRecursively:containerLayer];\n    [self.animationController animateTransition:transitionContext];\n    [self updateInteractiveTransition:0];\n}\n\n- (void)updateInteractiveTransition:(CGFloat)percentComplete {\n    if (!self.isActive) return;\n    \n    [self.transitionContext updateInteractiveTransition:_percentComplete];\n    \n    CGFloat boundedPercentage;\n    if (percentComplete > 1.0) {\n        boundedPercentage = 1.0;\n    } else if (percentComplete < 0.0) {\n        boundedPercentage = 0.0;\n    } else {\n        boundedPercentage = percentComplete;\n    }\n    \n    _percentComplete = boundedPercentage;\n    CALayer *layer = [self.transitionContext containerView].layer;\n    CFTimeInterval pausedTime = [self.animationController transitionDuration:self.transitionContext] * _percentComplete;\n    layer.speed = 0.0;\n    layer.timeOffset = pausedTime;\n}\n\n- (void)cancelInteractiveTransition {\n    if (!self.isActive) return;\n    \n    [self.transitionContext cancelInteractiveTransition];\n    \n    CADisplayLink *displayLink = [CADisplayLink displayLinkWithTarget:self selector:@selector(reversePausedAnimation:)];\n    [displayLink addToRunLoop:[NSRunLoop mainRunLoop] forMode:NSDefaultRunLoopMode];\n}\n\n- (void)finishInteractiveTransition {\n    if (!self.isActive) return;\n    self.isActive = NO;\n    \n    [self.transitionContext finishInteractiveTransition];\n    \n    CALayer *layer = [self.transitionContext containerView].layer;\n    CFTimeInterval pausedTime = [layer timeOffset];\n    layer.speed = 1.0;\n    layer.timeOffset = 0.0;\n    layer.beginTime = 0.0;\n    CFTimeInterval timeSincePause = [layer convertTime:CACurrentMediaTime() fromLayer:nil] - pausedTime;\n    layer.beginTime = timeSincePause;\n}\n\n#pragma mark - CADisplayLink action\n\n- (void)reversePausedAnimation:(CADisplayLink *)displayLink {\n    double percentInterval = displayLink.duration / [self.animationController transitionDuration:self.transitionContext];\n    \n    _percentComplete -= percentInterval;\n    \n    if (_percentComplete <= 0.0) {\n        _percentComplete = 0.0;\n        [displayLink invalidate];\n    }\n    \n    [self updateInteractiveTransition:self.percentComplete];\n    \n    if (_percentComplete == 0.0) {\n        self.isActive = NO;\n        CALayer *layer = [self.transitionContext containerView].layer;\n        [layer removeAllAnimations];\n        layer.speed = 1.0;\n    }\n}\n\n#pragma mark - Private\n\n- (void)removeAnimationsRecursively:(CALayer *)layer {\n    if (layer.sublayers.count > 0) {\n        for (CALayer *subLayer in layer.sublayers) {\n            [subLayer removeAllAnimations];\n            [self removeAnimationsRecursively:subLayer];\n        }\n    }\n}\n\n@end\n"
  },
  {
    "path": "Pods/ECSlidingViewController/ECSlidingViewController/ECSlidingAnimationController.h",
    "content": "// ECSlidingAnimationController.h\n// ECSlidingViewController 2\n//\n// Copyright (c) 2013, Michael Enriquez (http://enriquez.me)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\n#import <Foundation/Foundation.h>\n#import <UIKit/UIKit.h>\n\n/**\n `ECSlidingAnimationController` is the default animator object used by `ECSlidingViewController`. It animates the top view by sliding it horizontally.\n \n An instance this class may be returned from a sliding view controller's delegate for `slidingViewController:animationControllerForOperation:topViewController:`. Do this if you want to use the default animation along with a custom interactive transition.\n */\n@interface ECSlidingAnimationController : NSObject <UIViewControllerAnimatedTransitioning>\n\n/**\n The default duration of the view transition.\n */\n@property (nonatomic, assign) NSTimeInterval defaultTransitionDuration;\n\n@end\n"
  },
  {
    "path": "Pods/ECSlidingViewController/ECSlidingViewController/ECSlidingAnimationController.m",
    "content": "// ECSlidingAnimationController.m\n// ECSlidingViewController 2\n//\n// Copyright (c) 2013, Michael Enriquez (http://enriquez.me)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\n#import \"ECSlidingAnimationController.h\"\n#import \"ECSlidingConstants.h\"\n\n@interface ECSlidingAnimationController ()\n@property (nonatomic, copy) void (^coordinatorAnimations)(id<UIViewControllerTransitionCoordinatorContext>context);\n@property (nonatomic, copy) void (^coordinatorCompletion)(id<UIViewControllerTransitionCoordinatorContext>context);\n@end\n\n@implementation ECSlidingAnimationController\n\n#pragma mark - UIViewControllerAnimatedTransitioning\n\n- (NSTimeInterval)transitionDuration:(id <UIViewControllerContextTransitioning>)transitionContext {\n    if (_defaultTransitionDuration) {\n        return _defaultTransitionDuration;\n    } else {\n        return 0.25;\n    }\n}\n\n- (void)animateTransition:(id <UIViewControllerContextTransitioning>)transitionContext {\n    UIViewController *topViewController = [transitionContext viewControllerForKey:ECTransitionContextTopViewControllerKey];\n    UIViewController *toViewController  = [transitionContext viewControllerForKey:UITransitionContextToViewControllerKey];\n    UIView *containerView = [transitionContext containerView];\n    CGRect topViewInitialFrame = [transitionContext initialFrameForViewController:topViewController];\n    CGRect topViewFinalFrame   = [transitionContext finalFrameForViewController:topViewController];\n    \n    topViewController.view.frame = topViewInitialFrame;\n    \n    if (topViewController != toViewController) {\n        CGRect toViewFinalFrame = [transitionContext finalFrameForViewController:toViewController];\n        toViewController.view.frame = toViewFinalFrame;\n        [containerView insertSubview:toViewController.view belowSubview:topViewController.view];\n    }\n    \n    NSTimeInterval duration = [self transitionDuration:transitionContext];\n    [UIView animateWithDuration:duration animations:^{\n        [UIView setAnimationCurve:UIViewAnimationCurveLinear];\n        if (self.coordinatorAnimations) self.coordinatorAnimations((id<UIViewControllerTransitionCoordinatorContext>)transitionContext);\n        topViewController.view.frame = topViewFinalFrame;\n    } completion:^(BOOL finished) {\n        if ([transitionContext transitionWasCancelled]) {\n            topViewController.view.frame = [transitionContext initialFrameForViewController:topViewController];\n        }\n        \n        if (self.coordinatorCompletion) self.coordinatorCompletion((id<UIViewControllerTransitionCoordinatorContext>)transitionContext);\n        [transitionContext completeTransition:finished];\n    }];\n}\n\n@end\n"
  },
  {
    "path": "Pods/ECSlidingViewController/ECSlidingViewController/ECSlidingConstants.h",
    "content": "// ECSlidingConstants.h\n// ECSlidingViewController 2\n//\n// Copyright (c) 2013, Michael Enriquez (http://enriquez.me)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\n#ifndef ECSlidingViewController_ECSlidingConstants_h\n#define ECSlidingViewController_ECSlidingConstants_h\n\n/**\n Identifies the view controller that is the sliding view controller's `topViewController`. Pass this as an argument to `viewControllerForKey:` on an object that conforms to `UIViewControllerContextTransitioning`.\n */\nstatic NSString *const ECTransitionContextTopViewControllerKey = @\"ECTransitionContextTopViewControllerKey\";\n\n/**\n Identifies the view controller that is the sliding view controller's `underLeftViewController`. Pass this as an argument to `viewControllerForKey:` on an object that conforms to `UIViewControllerContextTransitioning`.\n */\nstatic NSString *const ECTransitionContextUnderLeftControllerKey = @\"ECTransitionContextUnderLeftControllerKey\";\n\n/**\n Identifies the view controller that is the sliding view controller's `underRightViewController`. Pass this as an argument to `viewControllerForKey:` on an object that conforms to `UIViewControllerContextTransitioning`.\n */\nstatic NSString *const ECTransitionContextUnderRightControllerKey = @\"ECTransitionContextUnderRightControllerKey\";\n\n/**\n These constants define the type of sliding view controller transitions that can occur.\n */\ntypedef NS_ENUM(NSInteger, ECSlidingViewControllerOperation) {\n    /** The top view is not moving. */\n    ECSlidingViewControllerOperationNone,\n    /** The top view is moving from center to left. */\n    ECSlidingViewControllerOperationAnchorLeft,\n    /** The top view is moving from center to right. */\n    ECSlidingViewControllerOperationAnchorRight,\n    /** The top view is moving from left to center. */\n    ECSlidingViewControllerOperationResetFromLeft,\n    /** The top view is moving from right to center. */\n    ECSlidingViewControllerOperationResetFromRight\n};\n\n/**\n These constants define the position of a sliding view controller's top view.\n */\ntypedef NS_ENUM(NSInteger, ECSlidingViewControllerTopViewPosition) {\n    /** The top view is on anchored to the left */\n    ECSlidingViewControllerTopViewPositionAnchoredLeft,\n    /** The top view is on anchored to the right */\n    ECSlidingViewControllerTopViewPositionAnchoredRight,\n    /** The top view is centered */\n    ECSlidingViewControllerTopViewPositionCentered\n};\n\n/**\n Options for gestures/behaviors given to a top view while it is anchored to the left or right.\n \n All the options except `ECSlidingViewControllerAnchoredGestureNone` will create a transparent view that is placed above the top view when it is anchored. This transparent view will block all gestures that are on the top view. Choose a combination of `ECSlidingViewControllerAnchoredGesturePanning`, `ECSlidingViewControllerAnchoredGestureTapping`, and `ECSlidingViewControllerAnchoredGestureCustom` to temporarily add gestures to the transparent view.\n */\ntypedef NS_OPTIONS(NSInteger, ECSlidingViewControllerAnchoredGesture) {\n    /** Nothing is done to the top view while it is anchored. */\n    ECSlidingViewControllerAnchoredGestureNone     = 0,\n    /** The sliding view controller's `panGesture` is made available while the top view is anchored. This option is only relevant for transitions that use the default interactive transition. It is also only used if the sliding view controller's `panGesture` is enabled and added to a view. */\n    ECSlidingViewControllerAnchoredGesturePanning  = 1 << 0,\n    /** The sliding view controller's `resetTapGesture` is made available while the top view is anchored. */\n    ECSlidingViewControllerAnchoredGestureTapping  = 1 << 1,\n    /** Any gestures set on the sliding view controller's `customAnchoredGestures` property are made available while the top view is anchored. These gestures are temporarily removed from their current view. */\n    ECSlidingViewControllerAnchoredGestureCustom   = 1 << 2,\n    /** All user interactions on the top view are disabled when anchored. This takes precedence when combined with any other option. */\n    ECSlidingViewControllerAnchoredGestureDisabled = 1 << 3\n};\n\n#endif\n"
  },
  {
    "path": "Pods/ECSlidingViewController/ECSlidingViewController/ECSlidingInteractiveTransition.h",
    "content": "// ECSlidingInteractiveTransition.h\n// ECSlidingViewController 2\n//\n// Copyright (c) 2013, Michael Enriquez (http://enriquez.me)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\n#import <Foundation/Foundation.h>\n#import <UIKit/UIKit.h>\n#import \"ECPercentDrivenInteractiveTransition.h\"\n#import \"ECSlidingViewController.h\"\n\n@class ECSlidingViewController;\n\n/**\n Used internally by `ECSlidingViewController` as the default interactive transition. It uses the sliding view controller's `panGesture` to do a percent driven interaction transition. In most cases, developers will not need to use this class for anything, but it provides a good example of how to implement a percent driven transition with a gesture.\n \n Custom animation transitions take advantage of this interaction without having to create an instance of this class and returning it from the sliding view controller's delegate method `slidingViewController:interactionControllerForAnimationController:animationController:`. The sliding view controller's `panGesture` can be used to drive the custom animation.\n \n The initial direction of the panning determines the type of operation that is triggered. The reveal width represents 100 percent, and the panning distance determines values in-between the reveal width.\n */\n@interface ECSlidingInteractiveTransition : ECPercentDrivenInteractiveTransition\n- (id)initWithSlidingViewController:(ECSlidingViewController *)slidingViewController;\n- (void)updateTopViewHorizontalCenterWithRecognizer:(UIPanGestureRecognizer *)recognizer;\n@end\n"
  },
  {
    "path": "Pods/ECSlidingViewController/ECSlidingViewController/ECSlidingInteractiveTransition.m",
    "content": "// ECSlidingInteractiveTransition.m\n// ECSlidingViewController 2\n//\n// Copyright (c) 2013, Michael Enriquez (http://enriquez.me)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\n#import \"ECSlidingInteractiveTransition.h\"\n\n@interface ECSlidingInteractiveTransition ()\n@property (nonatomic, assign) ECSlidingViewController *slidingViewController;\n@property (nonatomic, assign) BOOL positiveLeftToRight;\n@property (nonatomic, assign) CGFloat fullWidth;\n@property (nonatomic, assign) CGFloat currentPercentage;\n@property (nonatomic, copy) void (^coordinatorInteractionEnded)(id<UIViewControllerTransitionCoordinatorContext>context);\n@end\n\n@implementation ECSlidingInteractiveTransition\n\n#pragma mark - Constructors\n\n- (id)initWithSlidingViewController:(ECSlidingViewController *)slidingViewController {\n    self = [super init];\n    if (self) {\n        self.slidingViewController = slidingViewController;\n    }\n    \n    return self;\n}\n\n#pragma mark - UIViewControllerInteractiveTransitioning\n\n- (void)startInteractiveTransition:(id<UIViewControllerContextTransitioning>)transitionContext {\n    [super startInteractiveTransition:transitionContext];\n    \n    UIViewController *topViewController = [transitionContext viewControllerForKey:ECTransitionContextTopViewControllerKey];\n    CGFloat finalLeftEdge = CGRectGetMinX([transitionContext finalFrameForViewController:topViewController]);\n    CGFloat initialLeftEdge = CGRectGetMinX([transitionContext initialFrameForViewController:topViewController]);\n    CGFloat fullWidth = fabsf(finalLeftEdge - initialLeftEdge);\n    \n    self.positiveLeftToRight = initialLeftEdge < finalLeftEdge;\n    self.fullWidth           = fullWidth;\n    self.currentPercentage   = 0;\n}\n\n#pragma mark - UIPanGestureRecognizer action\n\n- (void)updateTopViewHorizontalCenterWithRecognizer:(UIPanGestureRecognizer *)recognizer {\n    CGFloat translationX  = [recognizer translationInView:self.slidingViewController.view].x;\n    CGFloat velocityX     = [recognizer velocityInView:self.slidingViewController.view].x;\n\n    switch (recognizer.state) {\n        case UIGestureRecognizerStateBegan: {\n            BOOL isMovingRight = velocityX > 0;\n\n            if (self.slidingViewController.currentTopViewPosition == ECSlidingViewControllerTopViewPositionCentered && isMovingRight) {\n                [self.slidingViewController anchorTopViewToRightAnimated:YES];\n            } else if (self.slidingViewController.currentTopViewPosition == ECSlidingViewControllerTopViewPositionCentered && !isMovingRight) {\n                [self.slidingViewController anchorTopViewToLeftAnimated:YES];\n            } else if (self.slidingViewController.currentTopViewPosition == ECSlidingViewControllerTopViewPositionAnchoredLeft) {\n                [self.slidingViewController resetTopViewAnimated:YES];\n            } else if (self.slidingViewController.currentTopViewPosition == ECSlidingViewControllerTopViewPositionAnchoredRight) {\n                [self.slidingViewController resetTopViewAnimated:YES];\n            }\n            \n            break;\n        }\n        case UIGestureRecognizerStateChanged: {\n            if (!self.positiveLeftToRight) translationX = translationX * -1.0;\n            CGFloat percentComplete = (translationX / self.fullWidth);\n            if (percentComplete < 0) percentComplete = 0;\n            [self updateInteractiveTransition:percentComplete];\n            break;\n        }\n        case UIGestureRecognizerStateEnded:\n        case UIGestureRecognizerStateCancelled: {\n            BOOL isPanningRight = velocityX > 0;\n            \n            if (self.coordinatorInteractionEnded) self.coordinatorInteractionEnded((id<UIViewControllerTransitionCoordinatorContext>)self.slidingViewController);\n            \n            if (isPanningRight && self.positiveLeftToRight) {\n                [self finishInteractiveTransition];\n            } else if (isPanningRight && !self.positiveLeftToRight) {\n                [self cancelInteractiveTransition];\n            } else if (!isPanningRight && self.positiveLeftToRight) {\n                [self cancelInteractiveTransition];\n            } else if (!isPanningRight && !self.positiveLeftToRight) {\n                [self finishInteractiveTransition];\n            }\n            \n            break;\n        }\n        default:\n            break;\n    }\n}\n\n@end\n"
  },
  {
    "path": "Pods/ECSlidingViewController/ECSlidingViewController/ECSlidingSegue.h",
    "content": "// ECSlidingSegue.h\n// ECSlidingViewController 2\n//\n// Copyright (c) 2013, Michael Enriquez (http://enriquez.me)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\n#import <Foundation/Foundation.h>\n#import <UIKit/UIKit.h>\n\n/**\n A sliding segue will transition a sliding view controller from an anchored position to a reset position. A common use for this is to segue from one of the under view controllers to a top view controller.\n */\n@interface ECSlidingSegue : UIStoryboardSegue\n\n/**\n Determines whether the destination view controller should replace the top view controller. This value can be set by casting a `UIStoryboardSegue` to a `ECSlidingSegue` in your view controller's `prepareForSegue:sender:` method.\n \n If set to `NO`, the top view controller will be replaced with an instance of the segue's destination view controller. If set to `YES`, the top view controller will not be replaced, and the existing top view controller will be used. Setting this to `YES` is useful for caching the top view controller and keeping its current state. The default value is `NO`.\n */\n@property (nonatomic, assign) BOOL skipSettingTopViewController;\n@end\n"
  },
  {
    "path": "Pods/ECSlidingViewController/ECSlidingViewController/ECSlidingSegue.m",
    "content": "// ECSlidingSegue.m\n// ECSlidingViewController 2\n//\n// Copyright (c) 2013, Michael Enriquez (http://enriquez.me)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\n#import \"ECSlidingSegue.h\"\n\n#import \"UIViewController+ECSlidingViewController.h\"\n\n@interface ECSlidingSegue ()\n/** Used internally by ECSlidingViewController */\n@property (nonatomic, assign) BOOL isUnwinding;\n@end\n\n@implementation ECSlidingSegue\n\n- (id)initWithIdentifier:(NSString *)identifier source:(UIViewController *)source destination:(UIViewController *)destination {\n    self = [super initWithIdentifier:identifier source:source destination:destination];\n    if (self) {\n        self.isUnwinding = NO;\n        self.skipSettingTopViewController = NO;\n    }\n    \n    return self;\n}\n\n- (void)perform {\n    ECSlidingViewController *slidingViewController = [[self sourceViewController] slidingViewController];\n    UIViewController *destinationViewController    = [self destinationViewController];\n    \n    if (self.isUnwinding) {\n        if ([slidingViewController.underLeftViewController isMemberOfClass:[destinationViewController class]]) {\n            [slidingViewController anchorTopViewToRightAnimated:YES];\n        } else if ([slidingViewController.underRightViewController isMemberOfClass:[destinationViewController class]]) {\n            [slidingViewController anchorTopViewToLeftAnimated:YES];\n        }\n    } else {\n        if (!self.skipSettingTopViewController) {\n            slidingViewController.topViewController = destinationViewController;\n        }\n        \n        [slidingViewController resetTopViewAnimated:YES];\n    }\n}\n\n@end\n"
  },
  {
    "path": "Pods/ECSlidingViewController/ECSlidingViewController/ECSlidingViewController.h",
    "content": "// ECSlidingViewController.h\n// ECSlidingViewController 2\n//\n// Copyright (c) 2013, Michael Enriquez (http://enriquez.me)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\n#import <Foundation/Foundation.h>\n#import <UIKit/UIKit.h>\n#import \"ECSlidingConstants.h\"\n\n@class ECSlidingViewController;\n\n/**\n The `ECSlidingViewControllerLayout` protocol is adopted by an object that specifies a custom layout for the child view controllers.\n */\n@protocol ECSlidingViewControllerLayout <NSObject>\n\n/**\n Called when the sliding view controller needs to update the child views in response to a rotation or bounds change.\n \n @param slidingViewController The sliding view controller that needs to update its layout.\n @param viewController The view controller that needs a layout update.\n @param topViewPosition The position of the top view.\n \n @return A frame for the given view controller at the given top view position. Return `CGRectInfinite` to use the default layout.\n */\n- (CGRect)slidingViewController:(ECSlidingViewController *)slidingViewController\n         frameForViewController:(UIViewController *)viewController\n                topViewPosition:(ECSlidingViewControllerTopViewPosition)topViewPosition;\n@end\n\n/**\n The `ECSlidingViewControllerDelegate` protocol is adopted by an object that may customize a sliding view controller's animation transition, interactive transition, or the layout of the child views.\n */\n@protocol ECSlidingViewControllerDelegate\n\n@optional\n/**\n Called to allow the delegate to return a non-interactive animator object for use during a transition.\n \n Returning an object will disable the sliding view controller's `transitionCoordinator` animation and completion callbacks.\n \n @param slidingViewController The sliding view controller that is being transitioned.\n @param operation The type of transition that is occuring. See `ECSlidingViewControllerOperation` for a list of possible values.\n @param topViewController\n \n @return The animator object responsible for managing the transition animations, or nil if you want to use the standard sliding view controller transitions. The object you return must conform to the `UIViewControllerAnimatedTransitioning` protocol.\n */\n- (id<UIViewControllerAnimatedTransitioning>)slidingViewController:(ECSlidingViewController *)slidingViewController\n                                   animationControllerForOperation:(ECSlidingViewControllerOperation)operation\n                                                 topViewController:(UIViewController *)topViewController;\n\n/**\n Called to allow the delegate to return an interactive animator object for use during a transition.\n \n Returning an object will disable the sliding view controller's `transitionCoordinator` block given to `notifyWhenInteractionEndsUsingBlock:`\n \n @param slidingViewController The sliding view controller that is being transitioned.\n @param animationController The non-interactive animator object. This will be the same object that is returned from `slidingViewController:animationController:topViewController`.\n \n @return The animator object responsible for managing the interactive transition, or nil if you want to use the standard sliding view controller transitions. The object you return must conform to the `UIViewControllerInteractiveTransitioning` protocol.\n */\n- (id<UIViewControllerInteractiveTransitioning>)slidingViewController:(ECSlidingViewController *)slidingViewController\n                          interactionControllerForAnimationController:(id <UIViewControllerAnimatedTransitioning>)animationController;\n\n/**\n Called to allow the delegate to return a layout object to customize the layout of a sliding view controller's child views.\n \n @param slidingViewController The sliding view controller whose layout needs updated.\n @param topViewPosition The position of the top view.\n \n @return The layout object responsible for managing the layout, or nil if you want to use the standard sliding view controller layout. The object you return must conform to the `ECSlidingViewControllerLayout` protocol.\n */\n- (id<ECSlidingViewControllerLayout>)slidingViewController:(ECSlidingViewController *)slidingViewController\n                        layoutControllerForTopViewPosition:(ECSlidingViewControllerTopViewPosition)topViewPosition;\n@end\n\n/**\n `ECSlidingViewController` is a view controller container that manages a layered interface. The top layer anchors to the left or right side of the container while revealing the layer underneath it. This is most commonly known as the \"Side Menu\", \"Slide Out\", \"Hamburger Menu/Drawer/Sidebar\", etc...\n \n The top layer and the layers underneath it can be any `UIViewController`. You provide the top layer by specifying a `topViewController`. Anchoring the top layer to the right will reveal the `underLeftViewController`. Likewise, to the left it will reveal the `underRightViewController`. These view controllers may be changed at anytime, and it is common to do so.\n \n There is no interface provided for anchoring the top layer, but there are methods and a gesture available for doing so. The `topViewController` will typically have a button to animate an anchoring and/or attach the provided `panGesture` to do it interactively.\n */\n\n@interface ECSlidingViewController : UIViewController <UIViewControllerContextTransitioning,\n                                                       UIViewControllerTransitionCoordinator,\n                                                       UIViewControllerTransitionCoordinatorContext> {\n    @private\n    CGFloat _anchorLeftPeekAmount;\n    CGFloat _anchorLeftRevealAmount;\n    CGFloat _anchorRightPeekAmount;\n    CGFloat _anchorRightRevealAmount;\n    UIPanGestureRecognizer *_panGesture;\n    UITapGestureRecognizer *_resetTapGesture;\n                                                           \n    @protected\n    UIViewController *_topViewController;\n    UIViewController *_underLeftViewController;\n    UIViewController *_underRightViewController;\n}\n\n\n///----------------------------------------\n/// @name Creating Sliding View Controllers\n///----------------------------------------\n\n/**\n Creates and returns a sliding view controller with the given `topViewController`.\n \n @param topViewController The view controller that will be displayed when sliding view controller loads.\n \n @return A sliding view controller with the given `topViewController`.\n */\n+ (instancetype)slidingWithTopViewController:(UIViewController *)topViewController;\n\n/**\n Initializes and returns a newly created sliding view controller.\n \n @param topViewController The view controller that will be displayed when sliding view controller loads.\n \n @return The initialized sliding view controller.\n */\n- (instancetype)initWithTopViewController:(UIViewController *)topViewController;\n\n\n///------------------------------------\n/// @name Managing the View Controllers\n///------------------------------------\n\n/**\n The main view controller that anchors to the left or right side of the container.\n */\n@property (nonatomic, strong) UIViewController *topViewController;\n\n/**\n The view controller that is revealed when the top view anchors to the right side of the container.\n */\n@property (nonatomic, strong) UIViewController *underLeftViewController;\n\n/**\n The view controller that is revealed when the top view anchors to the left side of the container.\n */\n@property (nonatomic, strong) UIViewController *underRightViewController;\n\n\n///-----------------------------\n/// @name Configuring the Layout\n///-----------------------------\n\n/**\n The fixed distance between the left side of the container and the right edge of the top view when the top view is anchored to the left. This value remains constant duration rotation or bound changes. Setting this value will automatically calculate `anchorLeftRevealAmount`. This value is not set by default, therefore it is variable and dependent upon the default value of `anchorLeftRevealAmount`.\n \n @see anchorLeftRevealAmount\n */\n@property (nonatomic, assign) CGFloat anchorLeftPeekAmount;\n\n/**\n The fixed distance between the right edge of the top view and the right side of the container when the top view is anchored to the left. This value remains constant duration rotation or bound changes. Setting this value will automatically calculate `anchorLeftPeekAmount`. This is set to 44.0 by default.\n \n @see anchorLeftPeekAmount\n */\n@property (nonatomic, assign) CGFloat anchorLeftRevealAmount;\n\n/**\n The fixed distance between the left edge of the top view and the right side of the container when the top view is anchored to the right. This value remains constant duration rotation or bound changes. Setting this value will automatically calculate `anchorRightRevealAmount`. This value si not set by default, therefore it is variable and dependent upon the default value of `anchorRightRevealAmount`.\n \n @see anchorRightRevealAmount\n */\n@property (nonatomic, assign) CGFloat anchorRightPeekAmount;\n\n/**\n The fixed distance between the left side of the container and the left edge of the top view when the top view is anchored to the right. This value remains constant duration rotation or bound changes. Setting this value will automatically calculate `anchorRightPeekAmount`. This is set to 276.0 by default.\n \n @see anchorRightPeekAmount\n */\n@property (nonatomic, assign) CGFloat anchorRightRevealAmount;\n\n\n///---------------------------\n/// @name Moving the Top Layer\n///---------------------------\n\n/**\n Anchors the `topViewController`'s view to the right side of the container to reveal the `underLeftViewController`'s view.\n \n @param animated Specify `YES` to animate the transition or `NO` if you do not want the transition to be animated.\n */\n- (void)anchorTopViewToRightAnimated:(BOOL)animated;\n\n/**\n Anchors the `topViewController`'s view to the right side of the container to reveal the `underLeftViewController`'s view.\n \n @param animated Specify `YES` to animate the transition or `NO` if you do not want the transition to be animated.\n @param complete A completion handler.\n */\n- (void)anchorTopViewToRightAnimated:(BOOL)animated onComplete:(void (^)())complete;\n\n/**\n Anchors the `topViewController`'s view to the left side of the container to reveal the `underRightViewController`'s view.\n \n @param animated Specify `YES` to animate the transition or `NO` if you do not want the transition to be animated.\n */\n- (void)anchorTopViewToLeftAnimated:(BOOL)animated;\n\n/**\n Anchors the `topViewController`'s view to the left side of the container to reveal the `underRightViewController`'s view.\n \n @param animated Specify `YES` to animate the transition or `NO` if you do not want the transition to be animated.\n @param complete A completion handler.\n */\n- (void)anchorTopViewToLeftAnimated:(BOOL)animated onComplete:(void (^)())complete;\n\n/**\n Resets the `topViewController`'s view's position to the middle. Completely covers any view that was underneath it.\n \n @param animated Specify `YES` to animate the transition or `NO` if you do not want the transition to be animated.\n */\n- (void)resetTopViewAnimated:(BOOL)animated;\n\n/**\n Resets the `topViewController`'s view's position to the middle. Completely covers any view that was underneath it.\n \n @param animated Specify `YES` to animate the transition or `NO` if you do not want the transition to be animated.\n @param complete A completion handler.\n */\n- (void)resetTopViewAnimated:(BOOL)animated onComplete:(void(^)())complete;\n\n\n///--------------------------------------\n/// @name User Defined Runtime Attributes\n///--------------------------------------\n\n/**\n The Storyboard identifier of a view controller to be used as the `topViewController`. Set this using the Identity Inspector for the sliding view controller instance in Storyboards.\n */\n@property (nonatomic, strong) NSString *topViewControllerStoryboardId;\n\n/**\n The Storyboard identifier of a view controller to be used as the `underLeftViewController`. Set this using the Identity Inspector for the sliding view controller instance in Storyboards.\n */\n@property (nonatomic, strong) NSString *underLeftViewControllerStoryboardId;\n\n/**\n The Storyboard identifier of a view controller to be used as the `underRightViewController`. Set this using the Identity Inspector for the sliding view controller instance in Storyboards.\n */\n@property (nonatomic, strong) NSString *underRightViewControllerStoryboardId;\n\n\n///-----------------------------------\n/// @name Customizing Default Behavior\n///-----------------------------------\n\n/**\n The delegate that provides objects to customizing the transition animation, transition interaction, or layout of the child view controllers. See the `ECSlidingViewControllerDelegate` protocol for more information.\n */\n@property (nonatomic, assign) id<ECSlidingViewControllerDelegate> delegate;\n\n/**\n A mask of gestures/behaviors indicating how you want the top view to act while it is in the anchored position. Useful for customizing how you want your users to reset the top view. The default is `ECSlidingViewControllerAnchoredGestureNone`.\n */\n@property (nonatomic, assign) ECSlidingViewControllerAnchoredGesture topViewAnchoredGesture;\n\n/**\n The current position of the top view.\n */\n@property (nonatomic, assign, readonly) ECSlidingViewControllerTopViewPosition currentTopViewPosition;\n\n/**\n The gesture that triggers the default interactive transition for a horizontal swipe. This is typically added to the top view or one of the top view's subviews.\n */\n@property (nonatomic, strong, readonly) UIPanGestureRecognizer *panGesture;\n\n/**\n The gesture that triggers the top view to reset. Useful for resetting the top view when in the anchored position.\n */\n@property (nonatomic, strong, readonly) UITapGestureRecognizer *resetTapGesture;\n\n/**\n Gestures used on the top view while it is in the reset position. This is only used when the `topViewAnchoredGesture` property contains the  `ECSlidingViewControllerAnchoredGestureCustom` option.\n */\n@property (nonatomic, strong) NSArray *customAnchoredGestures;\n\n/**\n The default duration of the view transition.\n */\n@property (nonatomic, assign) NSTimeInterval defaultTransitionDuration;\n\n@end\n"
  },
  {
    "path": "Pods/ECSlidingViewController/ECSlidingViewController/ECSlidingViewController.m",
    "content": "// ECSlidingViewController.m\n// ECSlidingViewController 2\n//\n// Copyright (c) 2013, Michael Enriquez (http://enriquez.me)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\n#import \"ECSlidingViewController.h\"\n\n#import \"ECSlidingAnimationController.h\"\n#import \"ECSlidingInteractiveTransition.h\"\n#import \"ECSlidingSegue.h\"\n\n@interface ECSlidingViewController()\n@property (nonatomic, assign) ECSlidingViewControllerOperation currentOperation;\n@property (nonatomic, strong) ECSlidingAnimationController *defaultAnimationController;\n@property (nonatomic, strong) ECSlidingInteractiveTransition *defaultInteractiveTransition;\n@property (nonatomic, strong) id<UIViewControllerAnimatedTransitioning> currentAnimationController;\n@property (nonatomic, strong) id<UIViewControllerInteractiveTransitioning> currentInteractiveTransition;\n@property (nonatomic, strong) UIView *gestureView;\n@property (nonatomic, strong) NSMapTable *customAnchoredGesturesViewMap;\n@property (nonatomic, assign) CGFloat currentAnimationPercentage;\n@property (nonatomic, assign) BOOL preserveLeftPeekAmount;\n@property (nonatomic, assign) BOOL preserveRightPeekAmount;\n@property (nonatomic, assign) BOOL transitionWasCancelled;\n@property (nonatomic, assign) BOOL isAnimated;\n@property (nonatomic, assign) BOOL isInteractive;\n@property (nonatomic, assign) BOOL transitionInProgress;\n@property (nonatomic, copy) void (^animationComplete)();\n@property (nonatomic, copy) void (^coordinatorAnimations)(id<UIViewControllerTransitionCoordinatorContext>context);\n@property (nonatomic, copy) void (^coordinatorCompletion)(id<UIViewControllerTransitionCoordinatorContext>context);\n@property (nonatomic, copy) void (^coordinatorInteractionEnded)(id<UIViewControllerTransitionCoordinatorContext>context);\n- (void)setup;\n\n- (void)moveTopViewToPosition:(ECSlidingViewControllerTopViewPosition)position animated:(BOOL)animated onComplete:(void(^)())complete;\n- (CGRect)topViewCalculatedFrameForPosition:(ECSlidingViewControllerTopViewPosition)position;\n- (CGRect)underLeftViewCalculatedFrameForTopViewPosition:(ECSlidingViewControllerTopViewPosition)position;\n- (CGRect)underRightViewCalculatedFrameForTopViewPosition:(ECSlidingViewControllerTopViewPosition)position;\n- (CGRect)frameFromDelegateForViewController:(UIViewController *)viewController\n                             topViewPosition:(ECSlidingViewControllerTopViewPosition)topViewPosition;\n- (ECSlidingViewControllerOperation)operationFromPosition:(ECSlidingViewControllerTopViewPosition)fromPosition\n                                               toPosition:(ECSlidingViewControllerTopViewPosition)toPosition;\n- (void)animateOperation:(ECSlidingViewControllerOperation)operation;\n- (BOOL)operationIsValid:(ECSlidingViewControllerOperation)operation;\n- (void)beginAppearanceTransitionForOperation:(ECSlidingViewControllerOperation)operation;\n- (void)endAppearanceTransitionForOperation:(ECSlidingViewControllerOperation)operation isCancelled:(BOOL)canceled;\n- (UIViewController *)viewControllerWillAppearForSuccessfulOperation:(ECSlidingViewControllerOperation)operation;\n- (UIViewController *)viewControllerWillDisappearForSuccessfulOperation:(ECSlidingViewControllerOperation)operation;\n- (void)updateTopViewGestures;\n@end\n\n@implementation ECSlidingViewController\n\n@synthesize topViewController=_topViewController;\n@synthesize underLeftViewController=_underLeftViewController;\n@synthesize underRightViewController=_underRightViewController;\n\n#pragma mark - Constructors\n\n+ (instancetype)slidingWithTopViewController:(UIViewController *)topViewController {\n    return [[self alloc] initWithTopViewController:topViewController];\n}\n\n- (instancetype)initWithCoder:(NSCoder *)aDecoder {\n    self = [super initWithCoder:aDecoder];\n    if (self) {\n        [self setup];\n    }\n    \n    return self;\n}\n\n- (instancetype)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil {\n    self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];\n    if (self) {\n        [self setup];\n    }\n    \n    return self;\n}\n\n- (instancetype)initWithTopViewController:(UIViewController *)topViewController {\n    self = [self initWithNibName:nil bundle:nil];\n    if (self) {\n        self.topViewController = topViewController;\n    }\n    \n    return self;\n}\n\n- (void)setup {\n    self.anchorLeftPeekAmount    = 44;\n    self.anchorRightRevealAmount = 276;\n    _currentTopViewPosition = ECSlidingViewControllerTopViewPositionCentered;\n    self.transitionInProgress = NO;\n}\n\n#pragma mark - UIViewController\n\n- (void)awakeFromNib {\n    if (self.topViewControllerStoryboardId) {\n        self.topViewController = [self.storyboard instantiateViewControllerWithIdentifier:self.topViewControllerStoryboardId];\n    }\n    \n    if (self.underLeftViewControllerStoryboardId) {\n        self.underLeftViewController = [self.storyboard instantiateViewControllerWithIdentifier:self.underLeftViewControllerStoryboardId];\n    }\n    \n    if (self.underRightViewControllerStoryboardId) {\n        self.underRightViewController = [self.storyboard instantiateViewControllerWithIdentifier:self.underRightViewControllerStoryboardId];\n    }\n}\n\n- (void)viewDidLoad {\n    [super viewDidLoad];\n    if (!self.topViewController) [NSException raise:@\"Missing topViewController\"\n                                             format:@\"Set the topViewController before loading ECSlidingViewController\"];\n    self.topViewController.view.frame = [self topViewCalculatedFrameForPosition:self.currentTopViewPosition];\n    [self.view addSubview:self.topViewController.view];\n}\n\n- (void)viewWillAppear:(BOOL)animated {\n    [super viewWillAppear:animated];\n    [self.topViewController beginAppearanceTransition:YES animated:animated];\n    \n    if (self.currentTopViewPosition == ECSlidingViewControllerTopViewPositionAnchoredLeft) {\n        [self.underRightViewController beginAppearanceTransition:YES animated:animated];\n    } else if (self.currentTopViewPosition == ECSlidingViewControllerTopViewPositionAnchoredRight) {\n        [self.underLeftViewController beginAppearanceTransition:YES animated:animated];\n    }\n}\n\n- (void)viewDidAppear:(BOOL)animated {\n    [super viewDidAppear:animated];\n    [self.topViewController endAppearanceTransition];\n    \n    if (self.currentTopViewPosition == ECSlidingViewControllerTopViewPositionAnchoredLeft) {\n        [self.underRightViewController endAppearanceTransition];\n    } else if (self.currentTopViewPosition == ECSlidingViewControllerTopViewPositionAnchoredRight) {\n        [self.underLeftViewController endAppearanceTransition];\n    }\n}\n\n- (void)viewWillDisappear:(BOOL)animated {\n    [super viewWillDisappear:animated];\n    [self.topViewController beginAppearanceTransition:NO animated:animated];\n    \n    if (self.currentTopViewPosition == ECSlidingViewControllerTopViewPositionAnchoredLeft) {\n        [self.underRightViewController beginAppearanceTransition:NO animated:animated];\n    } else if (self.currentTopViewPosition == ECSlidingViewControllerTopViewPositionAnchoredRight) {\n        [self.underLeftViewController beginAppearanceTransition:NO animated:animated];\n    }\n}\n\n- (void)viewDidDisappear:(BOOL)animated {\n    [super viewDidDisappear:animated];\n    [self.topViewController endAppearanceTransition];\n    \n    if (self.currentTopViewPosition == ECSlidingViewControllerTopViewPositionAnchoredLeft) {\n        [self.underRightViewController endAppearanceTransition];\n    } else if (self.currentTopViewPosition == ECSlidingViewControllerTopViewPositionAnchoredRight) {\n        [self.underLeftViewController endAppearanceTransition];\n    }\n}\n\n- (void)viewDidLayoutSubviews {\n    if (self.currentOperation == ECSlidingViewControllerOperationNone) {\n        self.gestureView.frame = [self topViewCalculatedFrameForPosition:self.currentTopViewPosition];\n        self.topViewController.view.frame = [self topViewCalculatedFrameForPosition:self.currentTopViewPosition];\n        self.underLeftViewController.view.frame = [self underLeftViewCalculatedFrameForTopViewPosition:self.currentTopViewPosition];\n        self.underRightViewController.view.frame = [self underRightViewCalculatedFrameForTopViewPosition:self.currentTopViewPosition];\n    }\n}\n\n- (BOOL)shouldAutorotate {\n    return self.currentOperation == ECSlidingViewControllerOperationNone;\n}\n\n- (BOOL)shouldAutomaticallyForwardAppearanceMethods {\n    return NO;\n}\n\n- (BOOL)shouldAutomaticallyForwardRotationMethods {\n    return YES;\n}\n\n- (UIStoryboardSegue *)segueForUnwindingToViewController:(UIViewController *)toViewController fromViewController:(UIViewController *)fromViewController identifier:(NSString *)identifier {\n    if ([self.underLeftViewController isMemberOfClass:[toViewController class]] || [self.underRightViewController isMemberOfClass:[toViewController class]]) {\n        ECSlidingSegue *unwindSegue = [[ECSlidingSegue alloc] initWithIdentifier:identifier source:fromViewController destination:toViewController];\n        [unwindSegue setValue:@YES forKey:@\"isUnwinding\"];\n        return unwindSegue;\n    } else {\n        return [super segueForUnwindingToViewController:toViewController fromViewController:fromViewController identifier:identifier];\n    }\n}\n\n- (UIViewController *)childViewControllerForStatusBarHidden {\n    if (self.currentTopViewPosition == ECSlidingViewControllerTopViewPositionCentered) {\n        return self.topViewController;\n    } else if (self.currentTopViewPosition == ECSlidingViewControllerTopViewPositionAnchoredLeft) {\n        return self.underRightViewController;\n    } else if (self.currentTopViewPosition == ECSlidingViewControllerTopViewPositionAnchoredRight) {\n        return self.underLeftViewController;\n    } else {\n        return nil;\n    }\n}\n\n- (UIViewController *)childViewControllerForStatusBarStyle {\n    if (self.currentTopViewPosition == ECSlidingViewControllerTopViewPositionCentered) {\n        return self.topViewController;\n    } else if (self.currentTopViewPosition == ECSlidingViewControllerTopViewPositionAnchoredLeft) {\n        return self.underRightViewController;\n    } else if (self.currentTopViewPosition == ECSlidingViewControllerTopViewPositionAnchoredRight) {\n        return self.underLeftViewController;\n    } else {\n        return nil;\n    }\n}\n\n- (id<UIViewControllerTransitionCoordinator>)transitionCoordinator {\n    if (!self.transitionInProgress){\n        return [super transitionCoordinator];\n    }\n    return self;\n}\n\n#pragma mark - Properties\n\n- (void)setTopViewController:(UIViewController *)topViewController {\n    UIViewController *oldTopViewController = _topViewController;\n    \n    [oldTopViewController.view removeFromSuperview];\n    [oldTopViewController willMoveToParentViewController:nil];\n    [oldTopViewController beginAppearanceTransition:NO animated:NO];\n    [oldTopViewController removeFromParentViewController];\n    [oldTopViewController endAppearanceTransition];\n    \n    _topViewController = topViewController;\n    \n    if (_topViewController) {\n        [self addChildViewController:_topViewController];\n        [_topViewController didMoveToParentViewController:self];\n        \n        if ([self isViewLoaded]) {\n            [_topViewController beginAppearanceTransition:YES animated:NO];\n            [self.view addSubview:_topViewController.view];\n            [_topViewController endAppearanceTransition];\n        }\n    }\n}\n\n- (void)setUnderLeftViewController:(UIViewController *)underLeftViewController {\n    UIViewController *oldUnderLeftViewController = _underLeftViewController;\n    \n    [oldUnderLeftViewController.view removeFromSuperview];\n    [oldUnderLeftViewController willMoveToParentViewController:nil];\n    [oldUnderLeftViewController beginAppearanceTransition:NO animated:NO];\n    [oldUnderLeftViewController removeFromParentViewController];\n    [oldUnderLeftViewController endAppearanceTransition];\n    \n    _underLeftViewController = underLeftViewController;\n    \n    if (_underLeftViewController) {\n        [self addChildViewController:_underLeftViewController];\n        [_underLeftViewController didMoveToParentViewController:self];\n    }\n}\n\n- (void)setUnderRightViewController:(UIViewController *)underRightViewController {\n    UIViewController *oldUnderRightViewController = _underRightViewController;\n    \n    [oldUnderRightViewController.view removeFromSuperview];\n    [oldUnderRightViewController willMoveToParentViewController:nil];\n    [oldUnderRightViewController beginAppearanceTransition:NO animated:NO];\n    [oldUnderRightViewController removeFromParentViewController];\n    [oldUnderRightViewController endAppearanceTransition];\n    \n    _underRightViewController = underRightViewController;\n    \n    if (_underRightViewController) {\n        [self addChildViewController:_underRightViewController];\n        [_underRightViewController didMoveToParentViewController:self];\n    }\n}\n\n- (void)setAnchorLeftPeekAmount:(CGFloat)anchorLeftPeekAmount {\n    _anchorLeftPeekAmount   = anchorLeftPeekAmount;\n    _anchorLeftRevealAmount = CGFLOAT_MAX;\n    self.preserveLeftPeekAmount = YES;\n}\n\n- (void)setAnchorLeftRevealAmount:(CGFloat)anchorLeftRevealAmount {\n    _anchorLeftRevealAmount = anchorLeftRevealAmount;\n    _anchorLeftPeekAmount   = CGFLOAT_MAX;\n    self.preserveLeftPeekAmount = NO;\n}\n\n- (void)setAnchorRightPeekAmount:(CGFloat)anchorRightPeekAmount {\n    _anchorRightPeekAmount   = anchorRightPeekAmount;\n    _anchorRightRevealAmount = CGFLOAT_MAX;\n    self.preserveRightPeekAmount = YES;\n}\n\n- (void)setAnchorRightRevealAmount:(CGFloat)anchorRightRevealAmount {\n    _anchorRightRevealAmount = anchorRightRevealAmount;\n    _anchorRightPeekAmount   = CGFLOAT_MAX;\n    self.preserveRightPeekAmount = NO;\n}\n\n- (void)setDefaultTransitionDuration:(NSTimeInterval)defaultTransitionDuration {\n    self.defaultAnimationController.defaultTransitionDuration = defaultTransitionDuration;\n}\n\n- (CGFloat)anchorLeftPeekAmount {\n    if (_anchorLeftPeekAmount == CGFLOAT_MAX && _anchorLeftRevealAmount != CGFLOAT_MAX) {\n        return CGRectGetWidth(self.view.bounds) - _anchorLeftRevealAmount;\n    } else if (_anchorLeftPeekAmount != CGFLOAT_MAX && _anchorLeftRevealAmount == CGFLOAT_MAX) {\n        return _anchorLeftPeekAmount;\n    } else {\n        return CGFLOAT_MAX;\n    }\n}\n\n- (CGFloat)anchorLeftRevealAmount {\n    if (_anchorLeftRevealAmount == CGFLOAT_MAX && _anchorLeftPeekAmount != CGFLOAT_MAX) {\n        return CGRectGetWidth(self.view.bounds) - _anchorLeftPeekAmount;\n    } else if (_anchorLeftRevealAmount != CGFLOAT_MAX && _anchorLeftPeekAmount == CGFLOAT_MAX) {\n        return _anchorLeftRevealAmount;\n    } else {\n        return CGFLOAT_MAX;\n    }\n}\n\n- (CGFloat)anchorRightPeekAmount {\n    if (_anchorRightPeekAmount == CGFLOAT_MAX && _anchorRightRevealAmount != CGFLOAT_MAX) {\n        return CGRectGetWidth(self.view.bounds) - _anchorRightRevealAmount;\n    } else if (_anchorRightPeekAmount != CGFLOAT_MAX && _anchorRightRevealAmount == CGFLOAT_MAX) {\n        return _anchorRightPeekAmount;\n    } else {\n        return CGFLOAT_MAX;\n    }\n}\n\n- (CGFloat)anchorRightRevealAmount {\n    if (_anchorRightRevealAmount == CGFLOAT_MAX && _anchorRightPeekAmount != CGFLOAT_MAX) {\n        return CGRectGetWidth(self.view.bounds) - _anchorRightPeekAmount;\n    } else if (_anchorRightRevealAmount != CGFLOAT_MAX && _anchorRightPeekAmount == CGFLOAT_MAX) {\n        return _anchorRightRevealAmount;\n    } else {\n        return CGFLOAT_MAX;\n    }\n}\n\n- (ECSlidingAnimationController *)defaultAnimationController {\n    if (_defaultAnimationController) return _defaultAnimationController;\n    \n    _defaultAnimationController = [[ECSlidingAnimationController alloc] init];\n    \n    return _defaultAnimationController;\n}\n\n- (ECSlidingInteractiveTransition *)defaultInteractiveTransition {\n    if (_defaultInteractiveTransition) return _defaultInteractiveTransition;\n    \n    _defaultInteractiveTransition = [[ECSlidingInteractiveTransition alloc] initWithSlidingViewController:self];\n    _defaultInteractiveTransition.animationController = self.defaultAnimationController;\n    \n    return _defaultInteractiveTransition;\n}\n\n- (UIView *)gestureView {\n    if (_gestureView) return _gestureView;\n    \n    _gestureView = [[UIView alloc] initWithFrame:CGRectZero];\n    \n    return _gestureView;\n}\n\n- (NSMapTable *)customAnchoredGesturesViewMap {\n    if (_customAnchoredGesturesViewMap) return _customAnchoredGesturesViewMap;\n    \n    _customAnchoredGesturesViewMap = [NSMapTable mapTableWithKeyOptions:NSMapTableWeakMemory valueOptions:NSMapTableWeakMemory];\n    \n    return _customAnchoredGesturesViewMap;\n}\n\n- (UITapGestureRecognizer *)resetTapGesture {\n    if (_resetTapGesture) return _resetTapGesture;\n    \n    _resetTapGesture = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(resetTopViewAnimated:)];\n    \n    return _resetTapGesture;\n}\n\n- (UIPanGestureRecognizer *)panGesture {\n    if (_panGesture) return _panGesture;\n    \n    _panGesture = [[UIPanGestureRecognizer alloc] initWithTarget:self action:@selector(detectPanGestureRecognizer:)];\n    \n    return _panGesture;\n}\n\n#pragma mark - Public\n\n- (void)anchorTopViewToRightAnimated:(BOOL)animated {\n    [self anchorTopViewToRightAnimated:animated onComplete:nil];\n}\n\n- (void)anchorTopViewToLeftAnimated:(BOOL)animated {\n    [self anchorTopViewToLeftAnimated:animated onComplete:nil];\n}\n\n- (void)resetTopViewAnimated:(BOOL)animated {\n    [self resetTopViewAnimated:animated onComplete:nil];\n}\n\n- (void)anchorTopViewToRightAnimated:(BOOL)animated onComplete:(void (^)())complete {\n    [self moveTopViewToPosition:ECSlidingViewControllerTopViewPositionAnchoredRight animated:animated onComplete:complete];\n}\n\n- (void)anchorTopViewToLeftAnimated:(BOOL)animated onComplete:(void (^)())complete {\n    [self moveTopViewToPosition:ECSlidingViewControllerTopViewPositionAnchoredLeft animated:animated onComplete:complete];\n}\n\n- (void)resetTopViewAnimated:(BOOL)animated onComplete:(void(^)())complete {\n    [self moveTopViewToPosition:ECSlidingViewControllerTopViewPositionCentered animated:animated onComplete:complete];\n}\n\n#pragma mark - Private\n\n- (void)moveTopViewToPosition:(ECSlidingViewControllerTopViewPosition)position animated:(BOOL)animated onComplete:(void(^)())complete {\n    self.isAnimated = animated;\n    self.animationComplete = complete;\n    [self.view endEditing:YES];\n    ECSlidingViewControllerOperation operation = [self operationFromPosition:self.currentTopViewPosition toPosition:position];\n    [self animateOperation:operation];\n}\n\n- (CGRect)topViewCalculatedFrameForPosition:(ECSlidingViewControllerTopViewPosition)position {\n    CGRect frameFromDelegate = [self frameFromDelegateForViewController:self.topViewController\n                                                        topViewPosition:position];\n    if (!CGRectIsInfinite(frameFromDelegate)) return frameFromDelegate;\n    \n    CGRect containerViewFrame = self.view.bounds;\n    \n    if (!(self.topViewController.edgesForExtendedLayout & UIRectEdgeTop)) {\n        CGFloat topLayoutGuideLength = [self.topLayoutGuide length];\n        containerViewFrame.origin.y     = topLayoutGuideLength;\n        containerViewFrame.size.height -= topLayoutGuideLength;\n    }\n    \n    if (!(self.topViewController.edgesForExtendedLayout & UIRectEdgeBottom)) {\n        CGFloat bottomLayoutGuideLength = [self.bottomLayoutGuide length];\n        containerViewFrame.size.height -= bottomLayoutGuideLength;\n    }\n    \n    switch(position) {\n        case ECSlidingViewControllerTopViewPositionCentered:\n            return containerViewFrame;\n        case ECSlidingViewControllerTopViewPositionAnchoredLeft:\n            containerViewFrame.origin.x = -self.anchorLeftRevealAmount;\n            return containerViewFrame;\n        case ECSlidingViewControllerTopViewPositionAnchoredRight:\n            containerViewFrame.origin.x = self.anchorRightRevealAmount;\n            return containerViewFrame;\n        default:\n            return CGRectZero;\n    }\n}\n\n- (CGRect)underLeftViewCalculatedFrameForTopViewPosition:(ECSlidingViewControllerTopViewPosition)position {\n    CGRect frameFromDelegate = [self frameFromDelegateForViewController:self.underLeftViewController\n                                                        topViewPosition:position];\n    if (!CGRectIsInfinite(frameFromDelegate)) return frameFromDelegate;\n    \n    CGRect containerViewFrame = self.view.bounds;\n    \n    if (!(self.underLeftViewController.edgesForExtendedLayout & UIRectEdgeTop)) {\n        CGFloat topLayoutGuideLength    = [self.topLayoutGuide length];\n        containerViewFrame.origin.y     = topLayoutGuideLength;\n        containerViewFrame.size.height -= topLayoutGuideLength;\n    }\n    \n    if (!(self.underLeftViewController.edgesForExtendedLayout & UIRectEdgeBottom)) {\n        CGFloat bottomLayoutGuideLength = [self.bottomLayoutGuide length];\n        containerViewFrame.size.height -= bottomLayoutGuideLength;\n    }\n    \n    if (!(self.underLeftViewController.edgesForExtendedLayout & UIRectEdgeRight)) {\n        containerViewFrame.size.width = self.anchorRightRevealAmount;\n    }\n    \n    return containerViewFrame;\n}\n\n- (CGRect)underRightViewCalculatedFrameForTopViewPosition:(ECSlidingViewControllerTopViewPosition)position {\n    CGRect frameFromDelegate = [self frameFromDelegateForViewController:self.underRightViewController\n                                                        topViewPosition:position];\n    if (!CGRectIsInfinite(frameFromDelegate)) return frameFromDelegate;\n    \n    CGRect containerViewFrame = self.view.bounds;\n    \n    if (!(self.underRightViewController.edgesForExtendedLayout & UIRectEdgeTop)) {\n        CGFloat topLayoutGuideLength    = [self.topLayoutGuide length];\n        containerViewFrame.origin.y     = topLayoutGuideLength;\n        containerViewFrame.size.height -= topLayoutGuideLength;\n    }\n    \n    if (!(self.underRightViewController.edgesForExtendedLayout & UIRectEdgeBottom)) {\n        CGFloat bottomLayoutGuideLength = [self.bottomLayoutGuide length];\n        containerViewFrame.size.height -= bottomLayoutGuideLength;\n    }\n    \n    if (!(self.underRightViewController.edgesForExtendedLayout & UIRectEdgeLeft)) {\n        containerViewFrame.origin.x   = self.anchorLeftPeekAmount;\n        containerViewFrame.size.width = self.anchorLeftRevealAmount;\n    }\n    \n    return containerViewFrame;\n}\n\n- (CGRect)frameFromDelegateForViewController:(UIViewController *)viewController\n                             topViewPosition:(ECSlidingViewControllerTopViewPosition)topViewPosition {\n    CGRect frame = CGRectInfinite;\n    \n    if ([(NSObject *)self.delegate respondsToSelector:@selector(slidingViewController:layoutControllerForTopViewPosition:)]) {\n        id<ECSlidingViewControllerLayout> layoutController = [self.delegate slidingViewController:self\n                                                               layoutControllerForTopViewPosition:topViewPosition];\n        \n        if (layoutController) {\n            frame = [layoutController slidingViewController:self\n                                     frameForViewController:viewController\n                                            topViewPosition:topViewPosition];\n        }\n    }\n    \n    return frame;\n}\n\n- (ECSlidingViewControllerOperation)operationFromPosition:(ECSlidingViewControllerTopViewPosition)fromPosition\n                                               toPosition:(ECSlidingViewControllerTopViewPosition)toPosition {\n    if (fromPosition == ECSlidingViewControllerTopViewPositionCentered &&\n        toPosition   == ECSlidingViewControllerTopViewPositionAnchoredLeft) {\n        return ECSlidingViewControllerOperationAnchorLeft;\n    } else if (fromPosition == ECSlidingViewControllerTopViewPositionCentered &&\n               toPosition   == ECSlidingViewControllerTopViewPositionAnchoredRight) {\n        return ECSlidingViewControllerOperationAnchorRight;\n    } else if (fromPosition == ECSlidingViewControllerTopViewPositionAnchoredLeft &&\n               toPosition   == ECSlidingViewControllerTopViewPositionCentered) {\n        return ECSlidingViewControllerOperationResetFromLeft;\n    } else if (fromPosition == ECSlidingViewControllerTopViewPositionAnchoredRight &&\n               toPosition   == ECSlidingViewControllerTopViewPositionCentered) {\n        return ECSlidingViewControllerOperationResetFromRight;\n    } else {\n        return ECSlidingViewControllerOperationNone;\n    }\n}\n\n- (void)animateOperation:(ECSlidingViewControllerOperation)operation {\n    if (![self operationIsValid:operation]){\n        _isInteractive = NO;\n        return;\n    }\n    if (self.transitionInProgress) return;\n\n    self.view.userInteractionEnabled = NO;\n    \n    self.transitionInProgress = YES;\n    \n    self.currentOperation = operation;\n    \n    if ([(NSObject *)self.delegate respondsToSelector:@selector(slidingViewController:animationControllerForOperation:topViewController:)]) {\n        self.currentAnimationController = [self.delegate slidingViewController:self\n                                               animationControllerForOperation:operation\n                                                             topViewController:self.topViewController];\n        \n        if ([(NSObject *)self.delegate respondsToSelector:@selector(slidingViewController:interactionControllerForAnimationController:)]) {\n            self.currentInteractiveTransition = [self.delegate slidingViewController:self\n                                         interactionControllerForAnimationController:self.currentAnimationController];\n        } else {\n            self.currentInteractiveTransition = nil;\n        }\n    } else {\n        self.currentAnimationController = nil;\n    }\n    \n    if (self.currentAnimationController) {\n        if (self.currentInteractiveTransition) {\n            _isInteractive = YES;\n        } else {\n            self.defaultInteractiveTransition.animationController = self.currentAnimationController;\n            self.currentInteractiveTransition = self.defaultInteractiveTransition;\n        }\n    } else {\n        self.currentAnimationController = self.defaultAnimationController;\n        \n        self.defaultInteractiveTransition.animationController = self.currentAnimationController;\n        self.currentInteractiveTransition = self.defaultInteractiveTransition;\n    }\n    \n    [self beginAppearanceTransitionForOperation:operation];\n    \n    [self.defaultAnimationController setValue:self.coordinatorAnimations forKey:@\"coordinatorAnimations\"];\n    [self.defaultAnimationController setValue:self.coordinatorCompletion forKey:@\"coordinatorCompletion\"];\n    [self.defaultInteractiveTransition setValue:self.coordinatorInteractionEnded forKey:@\"coordinatorInteractionEnded\"];\n    \n    if ([self isInteractive]) {\n        [self.currentInteractiveTransition startInteractiveTransition:self];\n    } else {\n        [self.currentAnimationController animateTransition:self];\n    }\n}\n\n- (BOOL)operationIsValid:(ECSlidingViewControllerOperation)operation {\n    if (self.currentTopViewPosition == ECSlidingViewControllerTopViewPositionAnchoredLeft) {\n        if (operation == ECSlidingViewControllerOperationResetFromLeft) return YES;\n    } else if (self.currentTopViewPosition == ECSlidingViewControllerTopViewPositionAnchoredRight) {\n        if (operation == ECSlidingViewControllerOperationResetFromRight) return YES;\n    } else if (self.currentTopViewPosition == ECSlidingViewControllerTopViewPositionCentered) {\n        if (operation == ECSlidingViewControllerOperationAnchorLeft  && self.underRightViewController) return YES;\n        if (operation == ECSlidingViewControllerOperationAnchorRight && self.underLeftViewController)  return YES;\n    }\n    \n    return NO;\n}\n\n- (void)beginAppearanceTransitionForOperation:(ECSlidingViewControllerOperation)operation {\n    UIViewController *viewControllerWillAppear    = [self viewControllerWillAppearForSuccessfulOperation:operation];\n    UIViewController *viewControllerWillDisappear = [self viewControllerWillDisappearForSuccessfulOperation:operation];\n    \n    [viewControllerWillAppear    beginAppearanceTransition:YES animated:_isAnimated];\n    [viewControllerWillDisappear beginAppearanceTransition:NO animated:_isAnimated];\n}\n\n- (void)endAppearanceTransitionForOperation:(ECSlidingViewControllerOperation)operation isCancelled:(BOOL)canceled {\n    UIViewController *viewControllerWillAppear    = [self viewControllerWillAppearForSuccessfulOperation:operation];\n    UIViewController *viewControllerWillDisappear = [self viewControllerWillDisappearForSuccessfulOperation:operation];\n    \n    if (canceled) {\n        [viewControllerWillDisappear beginAppearanceTransition:YES animated:_isAnimated];\n        [viewControllerWillDisappear endAppearanceTransition];\n        [viewControllerWillAppear beginAppearanceTransition:NO animated:_isAnimated];\n        [viewControllerWillAppear endAppearanceTransition];\n    } else {\n        [viewControllerWillDisappear endAppearanceTransition];\n        [viewControllerWillAppear endAppearanceTransition];\n    }\n}\n\n- (UIViewController *)viewControllerWillAppearForSuccessfulOperation:(ECSlidingViewControllerOperation)operation {\n    UIViewController *viewControllerWillAppear = nil;\n    \n    if (operation == ECSlidingViewControllerOperationAnchorLeft) {\n        viewControllerWillAppear = self.underRightViewController;\n    } else if (operation == ECSlidingViewControllerOperationAnchorRight) {\n        viewControllerWillAppear = self.underLeftViewController;\n    }\n    \n    return viewControllerWillAppear;\n}\n\n- (UIViewController *)viewControllerWillDisappearForSuccessfulOperation:(ECSlidingViewControllerOperation)operation {\n    UIViewController *viewControllerWillDisappear = nil;\n    \n    if (operation == ECSlidingViewControllerOperationResetFromLeft) {\n        viewControllerWillDisappear = self.underRightViewController;\n    } else if (operation == ECSlidingViewControllerOperationResetFromRight) {\n        viewControllerWillDisappear = self.underLeftViewController;\n    }\n    \n    return viewControllerWillDisappear;\n}\n\n- (void)updateTopViewGestures {\n    BOOL topViewIsAnchored = self.currentTopViewPosition == ECSlidingViewControllerTopViewPositionAnchoredLeft ||\n                             self.currentTopViewPosition == ECSlidingViewControllerTopViewPositionAnchoredRight;\n    UIView *topView = self.topViewController.view;\n\n    if (topViewIsAnchored) {\n        if (self.topViewAnchoredGesture & ECSlidingViewControllerAnchoredGestureDisabled) {\n            topView.userInteractionEnabled = NO;\n        } else {\n            self.gestureView.frame = topView.frame;\n\n            if (self.topViewAnchoredGesture & ECSlidingViewControllerAnchoredGesturePanning &&\n                ![self.customAnchoredGesturesViewMap objectForKey:self.panGesture]) {\n                [self.customAnchoredGesturesViewMap setObject:self.panGesture.view forKey:self.panGesture];\n                [self.panGesture.view removeGestureRecognizer:self.panGesture];\n                [self.gestureView addGestureRecognizer:self.panGesture];\n                if (!self.gestureView.superview) [self.view insertSubview:self.gestureView aboveSubview:topView];\n            }\n\n            if (self.topViewAnchoredGesture & ECSlidingViewControllerAnchoredGestureTapping &&\n                ![self.customAnchoredGesturesViewMap objectForKey:self.resetTapGesture]) {\n                [self.gestureView addGestureRecognizer:self.resetTapGesture];\n                if (!self.gestureView.superview) [self.view insertSubview:self.gestureView aboveSubview:topView];\n            }\n            \n            if (self.topViewAnchoredGesture & ECSlidingViewControllerAnchoredGestureCustom) {\n                for (UIGestureRecognizer *gesture in self.customAnchoredGestures) {\n                    if (![self.customAnchoredGesturesViewMap objectForKey:gesture]) {\n                        [self.customAnchoredGesturesViewMap setObject:gesture.view forKey:gesture];\n                        [gesture.view removeGestureRecognizer:gesture];\n                        [self.gestureView addGestureRecognizer:gesture];\n                    }\n                }\n                if (!self.gestureView.superview) [self.view insertSubview:self.gestureView aboveSubview:topView];\n            }\n        }\n    } else {\n        self.topViewController.view.userInteractionEnabled = YES;\n        [self.gestureView removeFromSuperview];\n        for (UIGestureRecognizer *gesture in self.customAnchoredGestures) {\n            UIView *originalView = [self.customAnchoredGesturesViewMap objectForKey:gesture];\n            if ([originalView isDescendantOfView:self.topViewController.view]) {\n                [originalView addGestureRecognizer:gesture];\n            }\n        }\n        if ([self.customAnchoredGesturesViewMap objectForKey:self.panGesture]) {\n            UIView *view = [self.customAnchoredGesturesViewMap objectForKey:self.panGesture];\n            if ([view isDescendantOfView:self.topViewController.view]) {\n                [view addGestureRecognizer:self.panGesture];\n            }\n        }\n        [self.customAnchoredGesturesViewMap removeAllObjects];\n    }\n}\n\n#pragma mark - UIPanGestureRecognizer action\n\n- (void)detectPanGestureRecognizer:(UIPanGestureRecognizer *)recognizer {\n    if (recognizer.state == UIGestureRecognizerStateBegan) {\n        [self.view endEditing:YES];\n        _isInteractive = YES;\n    }\n    \n    [self.defaultInteractiveTransition updateTopViewHorizontalCenterWithRecognizer:recognizer];\n    _isInteractive = NO;\n}\n\n#pragma mark - UIViewControllerTransitionCoordinatorContext\n\n- (BOOL)initiallyInteractive {\n    return _isAnimated && _isInteractive;\n}\n\n- (BOOL)isCancelled {\n    return _transitionWasCancelled;\n}\n\n- (NSTimeInterval)transitionDuration {\n    return [self.currentAnimationController transitionDuration:self];\n}\n\n- (CGFloat)percentComplete {\n    return self.currentAnimationPercentage;\n}\n\n- (CGFloat)completionVelocity {\n    return 1.0;\n}\n\n- (UIViewAnimationCurve)completionCurve {\n    return UIViewAnimationCurveLinear;\n}\n\n#pragma mark - UIViewControllerContextTransitioning and UIViewControllerTransitionCoordinatorContext\n\n- (UIView *)containerView {\n    return self.view;\n}\n\n- (BOOL)isAnimated {\n    return _isAnimated;\n}\n\n- (BOOL)isInteractive {\n    return _isInteractive;\n}\n\n- (BOOL)transitionWasCancelled {\n    return _transitionWasCancelled;\n}\n\n- (UIModalPresentationStyle)presentationStyle {\n    return UIModalPresentationCustom;\n}\n\n- (void)updateInteractiveTransition:(CGFloat)percentComplete {\n    self.currentAnimationPercentage = percentComplete;\n}\n\n- (void)finishInteractiveTransition {\n    _transitionWasCancelled = NO;\n}\n\n- (void)cancelInteractiveTransition {\n    _transitionWasCancelled = YES;\n}\n\n- (void)completeTransition:(BOOL)didComplete {\n    if (self.currentOperation == ECSlidingViewControllerOperationNone) return;\n    \n    if ([self transitionWasCancelled]) {\n        if (self.currentOperation == ECSlidingViewControllerOperationAnchorLeft) {\n            _currentTopViewPosition = ECSlidingViewControllerTopViewPositionCentered;\n        } else if (self.currentOperation == ECSlidingViewControllerOperationAnchorRight) {\n            _currentTopViewPosition = ECSlidingViewControllerTopViewPositionCentered;\n        } else if (self.currentOperation == ECSlidingViewControllerOperationResetFromLeft) {\n            _currentTopViewPosition = ECSlidingViewControllerTopViewPositionAnchoredLeft;\n        } else if (self.currentOperation == ECSlidingViewControllerOperationResetFromRight) {\n            _currentTopViewPosition = ECSlidingViewControllerTopViewPositionAnchoredRight;\n        }\n    } else {\n        if (self.currentOperation == ECSlidingViewControllerOperationAnchorLeft) {\n            _currentTopViewPosition = ECSlidingViewControllerTopViewPositionAnchoredLeft;\n        } else if (self.currentOperation == ECSlidingViewControllerOperationAnchorRight) {\n            _currentTopViewPosition = ECSlidingViewControllerTopViewPositionAnchoredRight;\n        } else if (self.currentOperation == ECSlidingViewControllerOperationResetFromLeft) {\n            _currentTopViewPosition = ECSlidingViewControllerTopViewPositionCentered;\n        } else if (self.currentOperation == ECSlidingViewControllerOperationResetFromRight) {\n            _currentTopViewPosition = ECSlidingViewControllerTopViewPositionCentered;\n        }\n    }\n    \n    if ([self.currentAnimationController respondsToSelector:@selector(animationEnded:)]) {\n        [self.currentAnimationController animationEnded:didComplete];\n    }\n    \n    if (self.animationComplete) self.animationComplete();\n    self.animationComplete = nil;\n    \n    [self updateTopViewGestures];\n    [self endAppearanceTransitionForOperation:self.currentOperation isCancelled:[self transitionWasCancelled]];\n    \n    _transitionWasCancelled          = NO;\n    _isInteractive                   = NO;\n    self.coordinatorAnimations       = nil;\n    self.coordinatorCompletion       = nil;\n    self.coordinatorInteractionEnded = nil;\n    self.currentAnimationPercentage  = 0;\n    self.currentOperation            = ECSlidingViewControllerOperationNone;\n    self.transitionInProgress        = NO;\n    self.view.userInteractionEnabled = YES;\n    [UIViewController attemptRotationToDeviceOrientation];\n    [self setNeedsStatusBarAppearanceUpdate];\n}\n\n- (UIViewController *)viewControllerForKey:(NSString *)key {\n    if ([key isEqualToString:ECTransitionContextTopViewControllerKey]) {\n        return self.topViewController;\n    } else if ([key isEqualToString:ECTransitionContextUnderLeftControllerKey]) {\n        return self.underLeftViewController;\n    } else if ([key isEqualToString:ECTransitionContextUnderRightControllerKey]) {\n        return self.underRightViewController;\n    }\n    \n    if (self.currentOperation == ECSlidingViewControllerOperationAnchorLeft) {\n        if (key == UITransitionContextFromViewControllerKey) return self.topViewController;\n        if (key == UITransitionContextToViewControllerKey)   return self.underRightViewController;\n    } else if (self.currentOperation == ECSlidingViewControllerOperationAnchorRight) {\n        if (key == UITransitionContextFromViewControllerKey) return self.topViewController;\n        if (key == UITransitionContextToViewControllerKey)   return self.underLeftViewController;\n    } else if (self.currentOperation == ECSlidingViewControllerOperationResetFromLeft) {\n        if (key == UITransitionContextFromViewControllerKey) return self.underRightViewController;\n        if (key == UITransitionContextToViewControllerKey)   return self.topViewController;\n    } else if (self.currentOperation == ECSlidingViewControllerOperationResetFromRight) {\n        if (key == UITransitionContextFromViewControllerKey) return self.underLeftViewController;\n        if (key == UITransitionContextToViewControllerKey)   return self.topViewController;\n    }\n    \n    return nil;\n}\n\n- (CGRect)initialFrameForViewController:(UIViewController *)vc {\n    if (self.currentOperation == ECSlidingViewControllerOperationAnchorLeft) {\n        if ([vc isEqual:self.topViewController]) return [self topViewCalculatedFrameForPosition:ECSlidingViewControllerTopViewPositionCentered];\n    } else if (self.currentOperation == ECSlidingViewControllerOperationAnchorRight) {\n        if ([vc isEqual:self.topViewController]) return [self topViewCalculatedFrameForPosition:ECSlidingViewControllerTopViewPositionCentered];\n    } else if (self.currentOperation == ECSlidingViewControllerOperationResetFromLeft) {\n        if ([vc isEqual:self.topViewController])        return [self topViewCalculatedFrameForPosition:ECSlidingViewControllerTopViewPositionAnchoredLeft];\n        if ([vc isEqual:self.underRightViewController]) return [self underRightViewCalculatedFrameForTopViewPosition:ECSlidingViewControllerTopViewPositionAnchoredLeft];\n    } else if (self.currentOperation == ECSlidingViewControllerOperationResetFromRight) {\n        if ([vc isEqual:self.topViewController])        return [self topViewCalculatedFrameForPosition:ECSlidingViewControllerTopViewPositionAnchoredRight];\n        if ([vc isEqual:self.underLeftViewController])  return [self underLeftViewCalculatedFrameForTopViewPosition:ECSlidingViewControllerTopViewPositionAnchoredRight];\n    }\n    \n    return CGRectZero;\n}\n\n- (CGRect)finalFrameForViewController:(UIViewController *)vc {\n    if (self.currentOperation == ECSlidingViewControllerOperationAnchorLeft) {\n        if (vc == self.topViewController)        return [self topViewCalculatedFrameForPosition:ECSlidingViewControllerTopViewPositionAnchoredLeft];\n        if (vc == self.underRightViewController) return [self underRightViewCalculatedFrameForTopViewPosition:ECSlidingViewControllerTopViewPositionAnchoredLeft];\n    } else if (self.currentOperation == ECSlidingViewControllerOperationAnchorRight) {\n        if (vc == self.topViewController) return [self topViewCalculatedFrameForPosition:ECSlidingViewControllerTopViewPositionAnchoredRight];\n        if (vc == self.underLeftViewController)  return [self underLeftViewCalculatedFrameForTopViewPosition:ECSlidingViewControllerTopViewPositionAnchoredRight];\n    } else if (self.currentOperation == ECSlidingViewControllerOperationResetFromLeft) {\n        if (vc == self.topViewController) return [self topViewCalculatedFrameForPosition:ECSlidingViewControllerTopViewPositionCentered];\n    } else if (self.currentOperation == ECSlidingViewControllerOperationResetFromRight) {\n        if (vc == self.topViewController) return [self topViewCalculatedFrameForPosition:ECSlidingViewControllerTopViewPositionCentered];\n    }\n    \n    return CGRectZero;\n}\n\n#pragma mark - UIViewControllerTransitionCoordinator\n\n- (BOOL)animateAlongsideTransition:(void(^)(id<UIViewControllerTransitionCoordinatorContext>context))animation\n                        completion:(void(^)(id<UIViewControllerTransitionCoordinatorContext>context))completion {\n    self.coordinatorAnimations = animation;\n    self.coordinatorCompletion = completion;\n    return YES;\n}\n\n- (BOOL)animateAlongsideTransitionInView:(UIView *)view\n                               animation:(void(^)(id<UIViewControllerTransitionCoordinatorContext>context))animation\n                              completion:(void(^)(id<UIViewControllerTransitionCoordinatorContext>context))completion {\n    self.coordinatorAnimations = animation;\n    self.coordinatorCompletion = completion;\n    return YES;\n}\n\n- (void)notifyWhenInteractionEndsUsingBlock:(void(^)(id<UIViewControllerTransitionCoordinatorContext>context))handler {\n    self.coordinatorInteractionEnded = handler;\n}\n\n@end\n"
  },
  {
    "path": "Pods/ECSlidingViewController/ECSlidingViewController/UIViewController+ECSlidingViewController.h",
    "content": "// UIViewController+ECSlidingViewController.h\n// ECSlidingViewController 2\n//\n// Copyright (c) 2013, Michael Enriquez (http://enriquez.me)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\n#import <Foundation/Foundation.h>\n#import <UIKit/UIKit.h>\n#import \"ECSlidingViewController.h\"\n\n/**\n This category adds a convience method on `UIViewController` for accessing a sliding view controller from one of its child view controllers.\n */\n@interface UIViewController (ECSlidingViewController)\n\n/**\n The nearest ancestor in the view controller hierarchy that is a sliding view controller, or nil if the view controller is not a descendant of a sliding view controller's hierarchy.\n */\n- (ECSlidingViewController *)slidingViewController;\n@end\n"
  },
  {
    "path": "Pods/ECSlidingViewController/ECSlidingViewController/UIViewController+ECSlidingViewController.m",
    "content": "// UIViewController+ECSlidingViewController.m\n// ECSlidingViewController 2\n//\n// Copyright (c) 2013, Michael Enriquez (http://enriquez.me)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\n#import \"UIViewController+ECSlidingViewController.h\"\n\n@implementation UIViewController (ECSlidingViewController)\n\n- (ECSlidingViewController *)slidingViewController {\n    UIViewController *viewController = self.parentViewController ? self.parentViewController : self.presentingViewController;\n    while (!(viewController == nil || [viewController isKindOfClass:[ECSlidingViewController class]])) {\n        viewController = viewController.parentViewController ? viewController.parentViewController : viewController.presentingViewController;\n    }\n    \n    return (ECSlidingViewController *)viewController;\n}\n\n@end\n"
  },
  {
    "path": "Pods/ECSlidingViewController/LICENSE",
    "content": "Copyright (c) 2013 Mike Enriquez <mike@enriquez.me>\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n"
  },
  {
    "path": "Pods/ECSlidingViewController/README.md",
    "content": "# ECSlidingViewController 2\n\n`ECSlidingViewController` is a view controller container that manages a layered interface. The top layer anchors to the left or right side of the container while revealing the layer underneath it. This is most commonly known as the \"Side Menu\", \"Slide Out\", \"Hamburger Menu/Drawer/Sidebar\", etc...\n\n![iPhone and iPad Mini screenshots](http://i.imgur.com/WBHYZUf.png)\n\nSupports all screen sizes and orientations.\n\n## Features\n\nThe philosophy behind `ECSlidingViewController` is to provide simple defaults while being customizable. It may not work or look the way you want out of the box, but it doesn't get in the way when customizing it.\n\n### Well Behaved View Controller Container\n\nYour view controllers will receive the appropriate view life cycle and rotation methods at the right time. Their layouts will be appropriately updated on rotation or bound changes while respecting their `edgesForExtendedLayout` property. This means you have control over how your view controllers position themselves under or below the status bar, navigation bar, or any other container that sets a `topLayoutGuide`.\n\n`ECSlidingViewController` tries its best to feel like it is a part of the `UIKit` view controller container family, and it works when nesting any combination of them together.\n\n### Storyboards Support\n\nBasic configuration can be done by using [User Defined Runtime Attributes](http://twoshotsofcocoa.com/?p=70). `ECSlidingViewController` comes with a custom segue and supports unwind segues for transitioning between view controllers.\n\nThis feature is optional and everything can be done programmatically if you wanted. Just like any other view controller container, you will most likely use Storyboards with some programmatic customizations.\n\n### Custom Transitions\n\nIf the default sliding animation or swiping interaction to move the top view doesn't suit your needs, then you can customize them by providing your own.\n\nCustom transitions use the new protocols introduced in iOS 7 while exposing an API similar to the API that the UIKit containers expose for custom transitions. You should feel right at home if you are familiar with the custom transition API in iOS 7.\n\n## Requirements\n\n* iOS 7\n* Xcode 5\n\n**Note**: For iOS 5-7 support, `ECSlidingViewController` version 1.x is [available on this branch](https://github.com/ECSlidingViewController/ECSlidingViewController/tree/1.x).\n\n## Installation\n\nInstall with [CocoaPods](http://cocoapods.org) by adding the following to your Podfile:\n\n``` ruby\nplatform :ios, '7.0'\npod 'ECSlidingViewController', '~> 2.0.3'\n```\n\n**Note**: We follow http://semver.org for versioning the public API.\n\nOr copy the `ECSlidingViewController/` directory from this repo into your project.\n\n## Documentation\n\n### Header Files\n\nThe public API is documented in the header files. It will automatically show up in Xcode 5's quick help, or you can view it online:\n\n[ECSlidingViewController Reference at cocoadocs.org](http://cocoadocs.org/docsets/ECSlidingViewController/)\n\n### Sample Code\n\nA good way to learn how to use `ECSlidingViewController` is to go through the example apps in `Examples.xcworkspace`. Each example has a README with an explanation of how things are done.\n\n* [BasicMenu](Examples/BasicMenu/). Complete example using Storyboards with minimal code.\n* [LayoutDemo](Examples/LayoutDemo/). This is a universal app showcasing the layout.\n* [TransitionFun](Examples/TransitionFun). See how custom transitions are done.\n\n**Note**: There is a problem with the simulator flashing the animation when cancelling an interactive transition. This does NOT happen on the device.\n\n### Wiki\n\nThe wiki contains guides that go into more detail on how to use specific features of `ECSlidingViewController`.\n\n[ECSlidingViewController Wiki Homepage](http://github.com/ECSlidingViewController/ECSlidingViewController/wiki)\n\n## Getting Help\n\nIf you need help using `ECSlidingViewController`, please post a question on [StackOverflow with the \"ECSlidingViewController\" tag](http://stackoverflow.com/questions/ask?tags=ecslidingviewcontroller). Also, the more context you can provide (such as sample projects) the easier it will be for you to get help.\n\nIf you think you found a problem with `ECSlidingViewController`, please [post an issue](https://github.com/ECSlidingViewController/ECSlidingViewController/issues). A sample project or fork of any of the examples demonstrating the problem will help us fix the issue more quickly.\n\n## Credits\n\nCreated and maintained by [Mike Enriquez](http://enriquez.me).\n\n[Neo Innovation](http://neo.com) (formerly known as EdgeCase) for allowing Mike to work on `ECSlidingViewController` on company time during its inception. He is no longer with the company, but continues to maintain the project.\n\nAnd... to those of you who [contributed changes](https://github.com/ECSlidingViewController/ECSlidingViewController/graphs/contributors) or [reported issues](https://github.com/ECSlidingViewController/ECSlidingViewController/issues).\n\n## MIT License\n\nCopyright (c) 2013 Michael Enriquez (http://enriquez.me)\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n"
  },
  {
    "path": "Pods/Fabric/Fabric.framework/README",
    "content": "We've now combined all our supported platforms into a single podspec. As a result, we moved our run script to a new location for Cocoapods projects: ${PODS_ROOT}/Fabric/run. To avoid breaking builds that reference the old location of the run script, we've placed this dummy script that calls to the correct location, while providing a helpful warning in Xcode if it is invoked. This bridge for backwards compatibility will be removed in a future release, so please heed the warning!\n"
  },
  {
    "path": "Pods/Fabric/Fabric.framework/run",
    "content": "if [[ -z $PODS_ROOT ]]; then\n    echo \"error: The run binary delivered by cocoapods is in a new location, under '$\"{\"PODS_ROOT\"}\"/Fabric/run'. This script was put in place for backwards compatibility, but it relies on PODS_ROOT, which does not have a value in your current setup. Please update the path to the run binary to fix this issue.\"\nelse\n    echo \"warning: The run script is now located at '$\"{\"PODS_ROOT\"}\"/Fabric/run'. To remove this warning, update your Run Script Build Phase to point to this new location.\"\n    sh \"${PODS_ROOT}/Fabric/run\" \"$@\"\nfi\n"
  },
  {
    "path": "Pods/Fabric/README.md",
    "content": "![Fabric Header](https://docs.fabric.io/ios/cocoapod-readmes/cocoapods-fabric-header.png)\n\n# Fabric\n\n## Overview\n\n[Fabric](https://www.fabric.io) provides developers with the tools they need to build the best apps. Developed and maintained by Twitter and the team that built Crashlytics, Fabric provides an easy way to manage all your SDKs so that you’ll never have to worry about tedious configurations or juggling different accounts. We let you get right into coding and building the next big app.\n\nFor a full list of SDK provided through Fabric visit [https://fabric.io/kits](https://fabric.io/kits).\n\n## Setup\n\nThe Fabric Pod is a dependency for all Fabric SDKs and is included when installing any Fabric related Pods. General setup instructions are shown below; however, these vary depending on the selected SDK.\n\n1. Visit [https://fabric.io/sign_up](https://fabric.io/sign_up) to create your Fabric account and to download Fabric.app.\n\n1. Open Fabric.app, login and select an SDK to install.\n\n    ![Fabric Plugin](https://docs.fabric.io/ios/cocoapod-readmes/cocoapods-fabric-plugin.png)\n\n1. The Fabric app automatically detects when a project uses CocoaPods and gives you the option to install via the Podfile or Xcode.\n\n\t![Fabric Installation Options](https://docs.fabric.io/ios/cocoapod-readmes/cocoapods-pod-installation-option.png)\n\n1. Select the Podfile option and follow the installation instructions to update your Podfile. Note: the example below is for the Crashlytics SDK. The instructions will vary based on the selected SDK.\n\n\t![Fabric Podfile Instructions](https://docs.fabric.io/ios/cocoapod-readmes/cocoapods-podfile-instructions.png)\n\n1. Add a Run Script Build Phase and build your app.\n\n\t![Fabric Run Script Build Phase](https://docs.fabric.io/ios/cocoapod-readmes/cocoapods-rsbp.png)\n\n1. Initialize the SDK by inserting code outlined in Fabric.app.\n\n1. Run your app to finish the installation.\n\n## Resources\n\n* [Documentation](https://docs.fabric.io/)\n* [Forums](https://twittercommunity.com/c/fabric)\n* [Website](https://www.fabric.io)\n* Follow us on Twitter: [@fabric](https://twitter.com/fabric)\n* Follow us on Periscope: [Fabric](https://periscope.tv/fabric) and [TwitterDev](https://periscope.tv/twitterdev)\n"
  },
  {
    "path": "Pods/Fabric/iOS/Fabric.framework/Headers/FABAttributes.h",
    "content": "//\n//  FABAttributes.h\n//  Fabric\n//\n//  Copyright (C) 2015 Twitter, Inc.\n//\n//  Licensed under the Apache License, Version 2.0 (the \"License\");\n//  you may not use this file except in compliance with the License.\n//  You may obtain a copy of the License at\n//\n//  http://www.apache.org/licenses/LICENSE-2.0\n//\n//  Unless required by applicable law or agreed to in writing, software\n//  distributed under the License is distributed on an \"AS IS\" BASIS,\n//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n//  See the License for the specific language governing permissions and\n//  limitations under the License.\n//\n\n#pragma once\n\n#define FAB_UNAVAILABLE(x) __attribute__((unavailable(x)))\n\n#if !__has_feature(nullability)\n    #define nonnull\n    #define nullable\n    #define _Nullable\n    #define _Nonnull\n#endif\n\n#ifndef NS_ASSUME_NONNULL_BEGIN\n    #define NS_ASSUME_NONNULL_BEGIN\n#endif\n\n#ifndef NS_ASSUME_NONNULL_END\n    #define NS_ASSUME_NONNULL_END\n#endif\n\n\n/**\n * The following macros are defined here to provide\n * backwards compatability. If you are still using\n * them you should migrate to the native nullability\n * macros.\n */\n#define fab_nullable      nullable\n#define fab_nonnull       nonnull\n#define FAB_NONNULL       __fab_nonnull\n#define FAB_NULLABLE      __fab_nullable\n#define FAB_START_NONNULL NS_ASSUME_NONNULL_BEGIN\n#define FAB_END_NONNULL   NS_ASSUME_NONNULL_END\n"
  },
  {
    "path": "Pods/Fabric/iOS/Fabric.framework/Headers/Fabric.h",
    "content": "//\n//  Fabric.h\n//  Fabric\n//\n//  Copyright (C) 2015 Twitter, Inc.\n//\n//  Licensed under the Apache License, Version 2.0 (the \"License\");\n//  you may not use this file except in compliance with the License.\n//  You may obtain a copy of the License at\n//\n//  http://www.apache.org/licenses/LICENSE-2.0\n//\n//  Unless required by applicable law or agreed to in writing, software\n//  distributed under the License is distributed on an \"AS IS\" BASIS,\n//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n//  See the License for the specific language governing permissions and\n//  limitations under the License.\n//\n\n#import <Foundation/Foundation.h>\n#import \"FABAttributes.h\"\n\nNS_ASSUME_NONNULL_BEGIN\n\n#if TARGET_OS_IPHONE\n#if __IPHONE_OS_VERSION_MIN_REQUIRED < 60000\n    #error \"Fabric's minimum iOS version is 6.0\"\n#endif\n#else\n#if __MAC_OS_X_VERSION_MIN_REQUIRED < 1070\n    #error \"Fabric's minimum OS X version is 10.7\"\n#endif\n#endif\n\n/**\n *  Fabric Base. Coordinates configuration and starts all provided kits.\n */\n@interface Fabric : NSObject\n\n/**\n * Initialize Fabric and all provided kits. Call this method within your App Delegate's `application:didFinishLaunchingWithOptions:` and provide the kits you wish to use.\n *\n * For example, in Objective-C:\n *\n *      `[Fabric with:@[[Crashlytics class], [Twitter class], [Digits class], [MoPub class]]];`\n *\n * Swift:\n *\n *      `Fabric.with([Crashlytics.self(), Twitter.self(), Digits.self(), MoPub.self()])`\n *\n * Only the first call to this method is honored. Subsequent calls are no-ops.\n *\n * @param kitClasses An array of kit Class objects\n *\n * @return Returns the shared Fabric instance. In most cases this can be ignored.\n */\n+ (instancetype)with:(NSArray *)kitClasses;\n\n/**\n *  Returns the Fabric singleton object.\n */\n+ (instancetype)sharedSDK;\n\n/**\n *  This BOOL enables or disables debug logging, such as kit version information. The default value is NO.\n */\n@property (nonatomic, assign) BOOL debug;\n\n/**\n *  Unavailable. Use `+sharedSDK` to retrieve the shared Fabric instance.\n */\n- (id)init FAB_UNAVAILABLE(\"Use +sharedSDK to retrieve the shared Fabric instance.\");\n\n/**\n *  Unavailable. Use `+sharedSDK` to retrieve the shared Fabric instance.\n */\n+ (instancetype)new FAB_UNAVAILABLE(\"Use +sharedSDK to retrieve the shared Fabric instance.\");\n\n@end\n\nNS_ASSUME_NONNULL_END\n\n"
  },
  {
    "path": "Pods/Fabric/iOS/Fabric.framework/Modules/module.modulemap",
    "content": "framework module Fabric {\n    umbrella header \"Fabric.h\"\n\n    export *\n    module * { export * }\n}"
  },
  {
    "path": "Pods/Fabric/iOS/Fabric.framework/run",
    "content": "#!/bin/sh\n\n#  run\n#\n#  Copyright (c) 2015 Crashlytics. All rights reserved.\n\n#  Figure out where we're being called from\nDIR=$( cd \"$( dirname \"${BASH_SOURCE[0]}\" )\" && pwd )\n\n#  Quote path in case of spaces or special chars\nDIR=\"\\\"${DIR}\"\n\nPATH_SEP=\"/\"\nVALIDATE_COMMAND=\"uploadDSYM\\\" $@ validate run-script\"\nUPLOAD_COMMAND=\"uploadDSYM\\\" $@ run-script\"\n\n#  Ensure params are as expected, run in sync mode to validate\neval $DIR$PATH_SEP$VALIDATE_COMMAND\nreturn_code=$?\n\nif [[ $return_code != 0 ]]; then\n  exit $return_code\nfi\n\n#  Verification passed, upload dSYM in background to prevent Xcode from waiting\n#  Note: Validation is performed again before upload.\n#  Output can still be found in Console.app\neval $DIR$PATH_SEP$UPLOAD_COMMAND > /dev/null 2>&1 &\n"
  },
  {
    "path": "Pods/Fabric/run",
    "content": "#!/bin/sh\n\n#  run\n#\n#  Copyright (c) 2015 Crashlytics. All rights reserved.\n\n#  Figure out where we're being called from\nDIR=$( cd \"$( dirname \"${BASH_SOURCE[0]}\" )\" && pwd )\n\n#  Quote path in case of spaces or special chars\nDIR=\"\\\"${DIR}\"\n\nPATH_SEP=\"/\"\nVALIDATE_COMMAND=\"uploadDSYM\\\" $@ validate run-script\"\nUPLOAD_COMMAND=\"uploadDSYM\\\" $@ run-script\"\n\n#  Ensure params are as expected, run in sync mode to validate\neval $DIR$PATH_SEP$VALIDATE_COMMAND\nreturn_code=$?\n\nif [[ $return_code != 0 ]]; then\n  exit $return_code\nfi\n\n#  Verification passed, upload dSYM in background to prevent Xcode from waiting\n#  Note: Validation is performed again before upload.\n#  Output can still be found in Console.app\neval $DIR$PATH_SEP$UPLOAD_COMMAND > /dev/null 2>&1 &\n"
  },
  {
    "path": "Pods/ISO8601DateFormatter/ISO8601DateFormatter.h",
    "content": "/*ISO8601DateFormatter.h\n *\n *Created by Peter Hosey on 2009-04-11.\n *Copyright 2009–2016 Peter Hosey. All rights reserved.\n */\n\n#import <Foundation/Foundation.h>\n\n#if __has_feature(nullability)\n#define ISO8601_NULLABLE _Nullable\n#define ISO8601_NONNULL _Nonnull\n#else\n#define ISO8601_NULLABLE /*can be NULL*/\n#define ISO8601_NONNULL /*never NULL*/\n#endif\n\n///Which of ISO 8601's three date formats the formatter should produce.\ntypedef NS_ENUM(NSUInteger, ISO8601DateFormat) {\n\t///YYYY-MM-DD.\n\tISO8601DateFormatCalendar,\n\t///YYYY-DDD, where DDD ranges from 1 to 366; for example, 2009-32 is 2009-02-01.\n\tISO8601DateFormatOrdinal,\n\t///YYYY-Www-D, where ww ranges from 1 to 53 (the 'W' is literal) and D ranges from 1 to 7; for example, 2009-W05-07.\n\tISO8601DateFormatWeek,\n};\n\n///The default separator for time values. Currently, this is ':'.\nextern const unichar ISO8601DefaultTimeSeparatorCharacter;\n\n/*!\n *\t@brief\tThis class converts dates to and from ISO 8601 strings.\n *\n *\t@details\tTL;DR: You want to use ISO 8601 for any and all dates you send or receive over the internet, unless the spec for the protocol or format you're working with specifically tells you otherwise. See http://xkcd.com/1179/ .\n *\n * ISO 8601 is most recognizable as “year-month-date” strings, such as “2013-09-08T15:06:11-0800”. Of course, as you might expect of a formal standard, it's more sophisticated (some might say complicated) than that.\n *\n * For one thing, ISO 8601 actually defines *three* different date formats. The most common one, shown above, is called the calendar date format. The other two are week dates, where the month is replaced by a week of the year and the day is a day-of-the-week (1 being Monday) rather than day-of-month, and ordinal dates, where the middle segment is dispensed with entirely and the day component is day-of-year (1–366).\n *\n * The week format is the most bizarre of them, since 7 × 52 ≠ 365. The start and end of the year for purposes of week dates usually don't line up with the start and end of the calendar year. As a result, the first and/or last day of a year in the week-date “calendar” more often than not is on a different year from the first and/or last day of that year on the actual Gregorian calendar.\n *\n * In practice, almost all ISO 8601 dates you see in the wild will be in the calendar format.\n *\n * At any rate, this formatter can both parse and unparse dates in all three formats. (By “unparse”, I mean “produce a string from”—the reverse of parsing.)\n *\n * For a good and more detailed introduction to ISO 8601, see [“A summary of the international standard date and time notation” by Markus Kuhn](http://www.cl.cam.ac.uk/~mgk25/iso-time.html). The actual standard itself can be found in PDF format online with a well-crafted web search.\n */\n\n@interface ISO8601DateFormatter: NSFormatter\n{\n\tNSString *lastUsedFormatString;\n\tNSDateFormatter *unparsingFormatter;\n    \n\tNSCalendar *parsingCalendar, *unparsingCalendar;\n    \n\tNSTimeZone *defaultTimeZone;\n\tISO8601DateFormat format;\n\tunichar timeSeparator;\n    unichar timeZoneSeparator;\n\tBOOL includeTime;\n\tBOOL useMillisecondPrecision;\n\tBOOL parsesStrictly;\n}\n\n@property(nonatomic, retain) NSTimeZone *ISO8601_NULLABLE defaultTimeZone;\n\n#pragma mark Parsing\n/*!\n *\t@name\tParsing\n */\n\n//As a formatter, this object converts strings to dates.\n\n/*!\n *\t@brief\tDisables various leniencies in how the formatter parses strings.\n *\n *\t@details\tBy default, the parser allows these extensions to the ISO 8601 standard:\n *\n * - Whitespace is allowed before the date.\n * - Numbers don't have to be within range for a component. For example, you can have a string that refers to the 56th day of the hundredth month.\n * - Since 0.6, allows a single whitespace character before the time-zone specification. This extension provides compatibility with NSDate output (`description`) and input (`dateWithString:`).\n * - “Superfluous” hyphens in date specifications such as “`--DDD`” (where DDD is an ordinal day-of-year number and the year is implied) are allowed. (The standard recommends writing such a date as “`-DDD`”, with only a single hyphen. This is consistent with ordinal dates having only two components: the year and the day-of-year, separated by one hyphen.)\n * - The same goes for week dates such as “`--Www-DD`”. Again, the extra hyphen really is superfluous, but is allowed as an extension.\n * - Calendar dates with no separator between month and day-of-month are allowed, at least when they total four digits. (For example, 2013-0908, which would be interpreted as 2013-09-08.)\n * - Single-digit components are allowed. (If you wish to specify a date in a single-digit year with the strict parser, pad it with zeroes.)\n * - “YYYY-W” (without a week number after the 'W') is allowed, interpreted as “YYYY-W01-01”.\n *\n * Setting this property to `YES` will disable all of those extensions.\n *\n * These extensions are intended to help you process degenerate input (received from programs and services that use broken date-formatting libraries); whenever *you* create ISO 8601 strings, you should generate strictly-conforming ones.\n *\n * This property does not affect unparsing. The formatter always creates valid ISO 8601 strings. Any invalid string (loosely, any string that would require turning this property off to re-parse) should be considered a bug; please report it.\n */\n@property BOOL parsesStrictly;\n\n/*!\n *\t@brief\tParse a string into individual date components.\n *\n *\t@param\tstring\tThe string to parse. Must represent a date in one of the ISO 8601 formats.\n *\t@result\tAn NSDateComponents object containing most of the information parsed from the string, aside from the fraction of second and time zone (which are lost).\n *\t@sa\tdateComponentsFromString:timeZone:\n *\t@sa\tdateComponentsFromString:timeZone:range:fractionOfSecond:\n */\n- (NSDateComponents *ISO8601_NULLABLE) dateComponentsFromString:(NSString *ISO8601_NONNULL)string;\n/*!\n *\t@brief\tParse a string into individual date components.\n *\n *\t@param\tstring\tThe string to parse. Must represent a date in one of the ISO 8601 formats.\n *\t@param\toutTimeZone\tIf non-`NULL`, an NSTimeZone object or `nil` will be stored here, depending on whether the string specified a time zone.\n *\t@result\tAn NSDateComponents object containing most of the information parsed from the string, aside from the fraction of second (which is lost) and time zone.\n *\t@sa\tdateComponentsFromString:\n *\t@sa\tdateComponentsFromString:timeZone:range:fractionOfSecond:\n */\n- (NSDateComponents *ISO8601_NULLABLE) dateComponentsFromString:(NSString *ISO8601_NONNULL)string timeZone:(out NSTimeZone *ISO8601_NULLABLE *ISO8601_NULLABLE)outTimeZone;\n/*!\n *\t@brief\tParse a string into individual date components.\n *\n *\t@param\tstring\tThe string to parse. Must represent a date in one of the ISO 8601 formats.\n *\t@param\toutTimeZone\tIf non-`NULL`, an NSTimeZone object or `nil` will be stored here, depending on whether the string specified a time zone.\n *\t@param\toutRange\tIf non-`NULL`, an NSRange structure will be stored here, identifying the substring of `string` that specified the date.\n *\t@param\toutFractionOfSecond\tIf non-`NULL`, an NSTimeInterval value will be stored here, containing the fraction of a second, if the string specified one. If it didn't, this will be set to zero.\n *\t@result\tAn NSDateComponents object containing most of the information parsed from the string, aside from the fraction of second and time zone.\n *\t@sa\tdateComponentsFromString:\n *\t@sa\tdateComponentsFromString:timeZone:\n */\n- (NSDateComponents *ISO8601_NULLABLE) dateComponentsFromString:(NSString *ISO8601_NONNULL)string timeZone:(out NSTimeZone *ISO8601_NULLABLE *ISO8601_NULLABLE)outTimeZone range:(out NSRange *ISO8601_NULLABLE)outRange fractionOfSecond:(NSTimeInterval *ISO8601_NULLABLE)outFractionOfSecond;\n\n/*!\n *\t@brief\tParse a string.\n *\n *\t@param\tstring\tThe string to parse. Must represent a date in one of the ISO 8601 formats.\n *\t@result\tAn NSDate object containing most of the information parsed from the string, aside from the time zone (which is lost).\n *\t@details This method will use self.defaultTimeZone to resolve the components to a date if the string does not specify a time zone.\n *\t@sa\tdateComponentsFromString:\n *\t@sa\tdateFromString:timeZone:\n *\t@sa\tdateFromString:timeZone:range:\n */\n- (NSDate *ISO8601_NULLABLE) dateFromString:(NSString *ISO8601_NONNULL)string;\n/*!\n *\t@brief\tParse a string.\n *\n *\t@param\tstring\tThe string to parse. Must represent a date in one of the ISO 8601 formats.\n *\t@param\toutTimeZone\tIf non-`NULL`, an NSTimeZone object or `nil` will be stored here, depending on whether the string specified a time zone.\n *\t@result\tAn NSDate object containing most of the information parsed from the string, aside from the time zone.\n *\t@details This method will use self.defaultTimeZone to resolve the components to a date if the string does not specify a time zone.\n *\t@sa\tdateComponentsFromString:timeZone:\n *\t@sa\tdateFromString:\n *\t@sa\tdateFromString:timeZone:range:\n */\n- (NSDate *ISO8601_NULLABLE) dateFromString:(NSString *ISO8601_NONNULL)string timeZone:(out NSTimeZone *ISO8601_NULLABLE *ISO8601_NULLABLE)outTimeZone;\n/*!\n *\t@brief\tParse a string into a single date, identified by an NSDate object.\n *\n *\t@param\tstring\tThe string to parse. Must represent a date in one of the ISO 8601 formats.\n *\t@param\toutTimeZone\tIf non-`NULL`, an NSTimeZone object or `nil` will be stored here, depending on whether the string specified a time zone.\n *\t@param\toutRange\tIf non-`NULL`, an NSRange structure will be stored here, identifying the substring of `string` that specified the date.\n *\t@result\tAn NSDate object containing most of the information parsed from the string, aside from the time zone.\n *\t@details This method will use self.defaultTimeZone to resolve the components to a date if the string does not specify a time zone.\n *\t@sa\tdateComponentsFromString:timeZone:range:fractionOfSecond:\n *\t@sa\tdateFromString:\n *\t@sa\tdateFromString:timeZone:\n */\n- (NSDate *ISO8601_NULLABLE) dateFromString:(NSString *ISO8601_NONNULL)string timeZone:(out NSTimeZone *ISO8601_NULLABLE *ISO8601_NULLABLE)outTimeZone range:(out NSRange *ISO8601_NULLABLE)outRange;\n\n#pragma mark Unparsing\n/*!\n *\t@name\tUnparsing\n */\n\n/*!\n *\t@brief\tWhich ISO 8601 format to format dates in.\n *\n *\t@details\tSee ISO8601DateFormat for possible values.\n */\n@property ISO8601DateFormat format;\n/*!\n *\t@brief\tWhether strings should include time of day.\n *\n *\t@details\tIf `NO`, strings include only the date, nothing after it.\n *\n *\t@sa\ttimeSeparator\n *\t@sa\ttimeZoneSeparator\n */\n@property BOOL includeTime;\n/*!\n *\t@brief\tWhether strings should include millisecond precision time.\n *\n *\t@details\tIf `YES`, strings include three millisecond digits. Only has an effect if `includeTime` is `YES`\n *\n */\n@property BOOL useMillisecondPrecision;\n/*!\n *\t@brief\tThe character to use to separate components of the time of day.\n *\n *\t@details\tThis is used in both parsing and unparsing.\n *\n * The default value is ISO8601DefaultTimeSeparatorCharacter.\n *\n * When parsesStrictly is set to `YES`, this property is ignored. Otherwise, the parser will raise an exception if this is set to zero.\n *\n *\t@sa\tincludeTime\n *\t@sa\ttimeZoneSeparator\n */\n@property unichar timeSeparator;\n/*!\n *\t@brief\tThe character to use to separate the hour and minute in a time zone specification.\n *\n *\t@details\tThis is used in both parsing and unparsing.\n *\n * If zero, no separator is inserted into time zone specifications.\n *\n * The default value is zero (no separator).\n *\n *\t@sa\tincludeTime\n *\t@sa\ttimeSeparator\n */\n@property unichar timeZoneSeparator;\n\n/*!\n *\t@brief\tProduce a string that represents a date in UTC.\n *\n *\t@param\tdate\tThe string to parse. Must represent a date in one of the ISO 8601 formats.\n *\t@result\tA string that represents the date in UTC. Can be `nil` in some cases; see `stringFromDate:timeZone:` for details.\n *\t@sa\tstringFromDate:timeZone:\n */\n- (NSString *ISO8601_NULLABLE) stringFromDate:(NSDate *ISO8601_NONNULL)date;\n/*!\n *\t@brief\tProduce a string that represents a date.\n *\n *\t@param\tdate\tThe string to parse. Must represent a date in one of the ISO 8601 formats.\n *\t@param\ttimeZone\tAn NSTimeZone object identifying the time zone in which to specify the date.\n *\t@result\tA string that represents the date in the requested time zone, if possible.\n *\n *\t@details\tNot all dates are representable in all time zones (because of historical calendar changes, such as transitions from the Julian to the Gregorian calendar).\n *\tFor an example, see http://stackoverflow.com/questions/18663407/date-formatter-returns-nil-for-june .\n *\tThis method *should* return `nil` in such cases.\n *\n *\t@sa\tstringFromDate:\n */\n- (NSString *ISO8601_NULLABLE) stringFromDate:(NSDate *ISO8601_NONNULL)date timeZone:(NSTimeZone *ISO8601_NONNULL)timeZone;\n\n@end\n"
  },
  {
    "path": "Pods/ISO8601DateFormatter/ISO8601DateFormatter.m",
    "content": "/*ISO8601DateFormatter.m\n *\n *Created by Peter Hosey on 2009-04-11.\n *Copyright 2009–2016 Peter Hosey. All rights reserved.\n */\n\n#import <float.h>\n#import <Foundation/Foundation.h>\n#if TARGET_OS_IPHONE\n#\timport <UIKit/UIKit.h>\n#endif\n#import \"ISO8601DateFormatter.h\"\n\n#ifndef DEFAULT_TIME_SEPARATOR\n#\tdefine DEFAULT_TIME_SEPARATOR ':'\n#endif\nconst unichar ISO8601DefaultTimeSeparatorCharacter = DEFAULT_TIME_SEPARATOR;\n\n//Unicode date formats.\n#define ISO_CALENDAR_DATE_FORMAT @\"yyyy-MM-dd\"\n//#define ISO_WEEK_DATE_FORMAT @\"YYYY-'W'ww-ee\" //Doesn't actually work because NSDateComponents counts the weekday starting at 1.\n#define ISO_ORDINAL_DATE_FORMAT @\"yyyy-DDD\"\n#define ISO_TIME_FORMAT @\"HH:mm:ss\"\n#define ISO_TIME_FORMAT_MS_PRECISION @\"HH:mm:ss.SSS\"\n//printf formats.\n#define ISO_TIMEZONE_UTC_FORMAT @\"Z\"\n#define ISO_TIMEZONE_OFFSET_FORMAT_NO_SEPARATOR @\"%+.2d%.2d\"\n#define ISO_TIMEZONE_OFFSET_FORMAT_WITH_SEPARATOR @\"%+.2d%C%.2d\"\n\nstatic NSString * const ISO8601TwoCharIntegerFormat = @\"%.2d\";\n\n@interface ISO8601DateFormatter(UnparsingPrivate)\n\n- (NSString *) replaceColonsInString:(NSString *)timeFormat withTimeSeparator:(unichar)timeSep;\n\n- (NSString *) stringFromDate:(NSDate *)date formatString:(NSString *)dateFormat timeZone:(NSTimeZone *)timeZone;\n- (NSString *) weekDateStringForDate:(NSDate *)date timeZone:(NSTimeZone *)timeZone;\n\n@end\n\nstatic NSCache *timeZonesByOffset;\n\n@implementation ISO8601DateFormatter\n\n+ (void) initialize {\n    timeZonesByOffset = [[NSCache alloc] init];\n}\n\n+ (void) purgeGlobalCaches {\n    [timeZonesByOffset removeAllObjects];\n}\n\n- (NSCalendar *) makeCalendarWithDesiredConfiguration {\n\tNSCalendar *calendar = [[[NSCalendar alloc] initWithCalendarIdentifier:NSCalendarIdentifierGregorian] autorelease];\n\tcalendar.firstWeekday = 2; //Monday\n\tcalendar.timeZone = [NSTimeZone defaultTimeZone];\n\treturn calendar;\n}\n\n- (id) init {\n\tif ((self = [super init])) {\n\t\tparsingCalendar = [[self makeCalendarWithDesiredConfiguration] retain];\n\t\tunparsingCalendar = [[self makeCalendarWithDesiredConfiguration] retain];\n\n\t\tformat = ISO8601DateFormatCalendar;\n\t\ttimeSeparator = ISO8601DefaultTimeSeparatorCharacter;\n\t\tincludeTime = NO;\n\t\tparsesStrictly = NO;\n\t\tuseMillisecondPrecision = NO;\n\t}\n\treturn self;\n}\n\n- (void) dealloc {\n\t[defaultTimeZone release];\n\n\t[unparsingFormatter release];\n\t[lastUsedFormatString release];\n\t[parsingCalendar release];\n\t[unparsingCalendar release];\n\n\t[super dealloc];\n}\n\n@synthesize defaultTimeZone;\n- (void) setDefaultTimeZone:(NSTimeZone *)tz {\n\tif (defaultTimeZone != tz) {\n\t\t[defaultTimeZone release];\n\t\tdefaultTimeZone = [tz retain];\n\n\t\tunparsingCalendar.timeZone = defaultTimeZone;\n\t}\n}\n\n//The following properties are only here because GCC doesn't like @synthesize in category implementations.\n\n#pragma mark Parsing\n\n@synthesize parsesStrictly;\n\nstatic NSUInteger read_segment(const unichar *str, const unichar **next, NSUInteger *out_num_digits);\nstatic NSUInteger read_segment_4digits(const unichar *str, const unichar **next, NSUInteger *out_num_digits);\nstatic NSUInteger read_segment_2digits(const unichar *str, const unichar **next);\nstatic double read_double(const unichar *str, const unichar **next);\nstatic BOOL is_leap_year(NSUInteger year);\n\n/*Valid ISO 8601 date formats:\n *\n *YYYYMMDD\n *YYYY-MM-DD\n *YYYY-MM\n *YYYY\n *YY //century \n * //Implied century: YY is 00-99\n *  YYMMDD\n *  YY-MM-DD\n * -YYMM\n * -YY-MM\n * -YY\n * //Implied year\n *  --MMDD\n *  --MM-DD\n *  --MM\n * //Implied year and month\n *   ---DD\n * //Ordinal dates: DDD is the number of the day in the year (1-366)\n *YYYYDDD\n *YYYY-DDD\n *  YYDDD\n *  YY-DDD\n *   -DDD\n * //Week-based dates: ww is the number of the week, and d is the number (1-7) of the day in the week\n *yyyyWwwd\n *yyyy-Www-d\n *yyyyWww\n *yyyy-Www\n *yyWwwd\n *yy-Www-d\n *yyWww\n *yy-Www\n * //Year of the implied decade\n *-yWwwd\n *-y-Www-d\n *-yWww\n *-y-Www\n * //Week and day of implied year\n *  -Wwwd\n *  -Www-d\n * //Week only of implied year\n *  -Www\n * //Day only of implied week\n *  -W-d\n */\n\n- (NSDateComponents *) dateComponentsFromString:(NSString *)string {\n\treturn [self dateComponentsFromString:string timeZone:NULL];\n}\n- (NSDateComponents *) dateComponentsFromString:(NSString *)string timeZone:(out NSTimeZone **)outTimeZone {\n\treturn [self dateComponentsFromString:string timeZone:outTimeZone range:NULL fractionOfSecond:NULL];\n}\n- (NSDateComponents *) dateComponentsFromString:(NSString *)string timeZone:(out NSTimeZone **)outTimeZone range:(out NSRange *)outRange fractionOfSecond:(out NSTimeInterval *)outFractionOfSecond {\n\tif (string == nil)\n\t\treturn nil;\n\t// Bail if the string contains a slash delimiter (we don't yet support ISO 8601 intervals and we don't support slash-separated dates)\n\tif ([string rangeOfString:@\"/\"].location != NSNotFound)\n\t\treturn nil;\n\n\tNSDate *now = [NSDate date];\n\n\tNSDateComponents *components = [[[NSDateComponents alloc] init] autorelease];\n\tNSDateComponents *nowComponents = [parsingCalendar components:NSCalendarUnitYear fromDate:now];\n\n\tNSUInteger\n\t\t//Date\n\t\tyear = NSUndefinedDateComponent,\n\t\tmonth_or_week = NSUndefinedDateComponent,\n\t\tday = NSUndefinedDateComponent,\n\t\t//Time\n\t\thour = NSUndefinedDateComponent;\n\tNSTimeInterval\n\t\tminute = NAN,\n\t\tsecond = NAN;\n\t//Time zone\n\tNSInteger tz_hour = 0;\n\tNSInteger tz_minute = 0;\n\n\tenum {\n\t\tmonthAndDate,\n\t\tweek,\n\t\tdateOnly\n\t} dateSpecification = monthAndDate;\n\n\tBOOL strict = self.parsesStrictly;\n\tunichar timeSep = self.timeSeparator;\n\n\tif (strict) timeSep = ISO8601DefaultTimeSeparatorCharacter;\n\tNSAssert(timeSep != '\\0', @\"Time separator must not be NUL.\");\n\n\tBOOL isValidDate = ([string length] > 0U);\n\tNSTimeZone *timeZone = nil;\n\n\tconst unichar *ch = (const unichar *)[string cStringUsingEncoding:NSUnicodeStringEncoding];\n\n\tNSRange range = { 0U, 0U };\n\tconst unichar *start_of_date = NULL;\n\tif (strict && isspace(*ch)) {\n\t\trange.location = NSNotFound;\n\t\tisValidDate = NO;\n\t} else {\n\t\t//Skip leading whitespace.\n\t\tNSUInteger i = 0U;\n\t\twhile (isspace(ch[i]))\n\t\t\t++i;\n\n\t\trange.location = i;\n\t\tch += i;\n\t\tstart_of_date = ch;\n\n\t\tNSUInteger segment;\n\t\tNSUInteger num_leading_hyphens = 0U, num_digits = 0U;\n\n\t\tif (*ch == 'T') {\n\t\t\t//There is no date here, only a time.\n\t\t\tisValidDate = isdigit(*++ch);\n\t\t} else {\n\t\t\twhile(*ch == '-') {\n\t\t\t\t++num_leading_hyphens;\n\t\t\t\t++ch;\n\t\t\t}\n\n\t\t\tsegment = read_segment(ch, &ch, &num_digits);\n\t\t\tswitch(num_digits) {\n\t\t\t\tcase 0:\n\t\t\t\t\tif (*ch == 'W') {\n\t\t\t\t\t\tif ((ch[1] == '-') && isdigit(ch[2]) && ((num_leading_hyphens == 1U) || ((num_leading_hyphens == 2U) && !strict))) {\n\t\t\t\t\t\t\tmonth_or_week = 1U;\n\t\t\t\t\t\t\tch += 2;\n\t\t\t\t\t\t\tgoto parseDayAfterWeek;\n\t\t\t\t\t\t} else if (num_leading_hyphens == 1U) {\n\t\t\t\t\t\t\tgoto parseWeekAndDay;\n\t\t\t\t\t\t} else\n\t\t\t\t\t\t\tisValidDate = NO;\n\t\t\t\t\t} else\n\t\t\t\t\t\tisValidDate = NO;\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 8: //YYYY MM DD\n\t\t\t\t\tif (num_leading_hyphens > 0U)\n\t\t\t\t\t\tisValidDate = NO;\n\t\t\t\t\telse {\n\t\t\t\t\t\tday = segment % 100U;\n\t\t\t\t\t\tsegment /= 100U;\n\t\t\t\t\t\tmonth_or_week = segment % 100U;\n\t\t\t\t\t\tyear = segment / 100U;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 6: //YYMMDD (implicit century)\n\t\t\t\t\tif (num_leading_hyphens > 0U || strict)\n\t\t\t\t\t\tisValidDate = NO;\n\t\t\t\t\telse {\n\t\t\t\t\t\tday = segment % 100U;\n\t\t\t\t\t\tsegment /= 100U;\n\t\t\t\t\t\tmonth_or_week = segment % 100U;\n\t\t\t\t\t\tyear  = nowComponents.year;\n\t\t\t\t\t\tyear -= (year % 100U);\n\t\t\t\t\t\tyear += segment / 100U;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 4:\n\t\t\t\t\tswitch(num_leading_hyphens) {\n\t\t\t\t\t\tcase 0: //YYYY\n\t\t\t\t\t\t\tyear = segment;\n\n\t\t\t\t\t\t\tif (*ch == '-') ++ch;\n\n\t\t\t\t\t\t\tif (!isdigit(*ch)) {\n\t\t\t\t\t\t\t\tif (*ch == 'W')\n\t\t\t\t\t\t\t\t\tgoto parseWeekAndDay;\n\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\tmonth_or_week = day = 1U;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tsegment = read_segment(ch, &ch, &num_digits);\n\t\t\t\t\t\t\t\tswitch(num_digits) {\n\t\t\t\t\t\t\t\t\tcase 4: //MMDD\n\t\t\t\t\t\t\t\t\t\tif (strict)\n\t\t\t\t\t\t\t\t\t\t\tisValidDate = NO;\n\t\t\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\t\t\tday = segment % 100U;\n\t\t\t\t\t\t\t\t\t\t\tmonth_or_week = segment / 100U;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\t\t\t\tcase 2: //MM\n\t\t\t\t\t\t\t\t\t\tmonth_or_week = segment;\n\n\t\t\t\t\t\t\t\t\t\tif (*ch == '-') ++ch;\n\t\t\t\t\t\t\t\t\t\tif (!isdigit(*ch))\n\t\t\t\t\t\t\t\t\t\t\tday = 1U;\n\t\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t\t\tday = read_segment(ch, &ch, NULL);\n\t\t\t\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\t\t\t\tcase 3: //DDD\n\t\t\t\t\t\t\t\t\t\tday = segment % 1000U;\n\t\t\t\t\t\t\t\t\t\tdateSpecification = dateOnly;\n\t\t\t\t\t\t\t\t\t\tif (strict && (day > (365U + is_leap_year(year))))\n\t\t\t\t\t\t\t\t\t\t\tisValidDate = NO;\n\t\t\t\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t\t\t\tisValidDate = NO;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tcase 1: //YYMM\n\t\t\t\t\t\t\tmonth_or_week = segment % 100U;\n\t\t\t\t\t\t\tyear = segment / 100U;\n\n\t\t\t\t\t\t\tif (*ch == '-') ++ch;\n\t\t\t\t\t\t\tif (!isdigit(*ch))\n\t\t\t\t\t\t\t\tday = 1U;\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\tday = read_segment(ch, &ch, NULL);\n\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tcase 2: //MMDD\n\t\t\t\t\t\t\tday = segment % 100U;\n\t\t\t\t\t\t\tmonth_or_week = segment / 100U;\n\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\tisValidDate = NO;\n\t\t\t\t\t} //switch(num_leading_hyphens) (4 digits)\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 1:\n\t\t\t\t\tif (strict) {\n\t\t\t\t\t\t//Two digits only - never just one.\n\t\t\t\t\t\tif (num_leading_hyphens == 1U) {\n\t\t\t\t\t\t\tif (*ch == '-') ++ch;\n\t\t\t\t\t\t\tif (*++ch == 'W') {\n\t\t\t\t\t\t\t\tyear  = nowComponents.year;\n\t\t\t\t\t\t\t\tyear -= (year % 10U);\n\t\t\t\t\t\t\t\tyear += segment;\n\t\t\t\t\t\t\t\tgoto parseWeekAndDay;\n\t\t\t\t\t\t\t} else\n\t\t\t\t\t\t\t\tisValidDate = NO;\n\t\t\t\t\t\t} else\n\t\t\t\t\t\t\tisValidDate = NO;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\tcase 2:\n\t\t\t\t\tswitch(num_leading_hyphens) {\n\t\t\t\t\t\tcase 0:\n\t\t\t\t\t\t\tif (*ch == '-') {\n\t\t\t\t\t\t\t\t//Implicit century\n\t\t\t\t\t\t\t\tyear  = nowComponents.year;\n\t\t\t\t\t\t\t\tyear -= (year % 100U);\n\t\t\t\t\t\t\t\tyear += segment;\n\n\t\t\t\t\t\t\t\tif (*++ch == 'W')\n\t\t\t\t\t\t\t\t\tgoto parseWeekAndDay;\n\t\t\t\t\t\t\t\telse if (!isdigit(*ch)) {\n\t\t\t\t\t\t\t\t\tgoto centuryOnly;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t//Get month and/or date.\n\t\t\t\t\t\t\t\t\tsegment = read_segment_4digits(ch, &ch, &num_digits);\n\t\t\t\t\t\t\t\t\tNSLog(@\"(%@) parsing month; segment is %lu and ch is %@\", string, (unsigned long)segment, [NSString stringWithCString:(const char *)ch encoding:NSUnicodeStringEncoding]);\n\t\t\t\t\t\t\t\t\tswitch(num_digits) {\n\t\t\t\t\t\t\t\t\t\tcase 4: //YY-MMDD\n\t\t\t\t\t\t\t\t\t\t\tday = segment % 100U;\n\t\t\t\t\t\t\t\t\t\t\tmonth_or_week = segment / 100U;\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\t\t\t\t\tcase 1: //YY-M; YY-M-DD (extension)\n\t\t\t\t\t\t\t\t\t\t\tif (strict) {\n\t\t\t\t\t\t\t\t\t\t\t\tisValidDate = NO;\n\t\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tcase 2: //YY-MM; YY-MM-DD\n\t\t\t\t\t\t\t\t\t\t\tmonth_or_week = segment;\n\t\t\t\t\t\t\t\t\t\t\tif (*ch == '-') {\n\t\t\t\t\t\t\t\t\t\t\t\tif (isdigit(*++ch))\n\t\t\t\t\t\t\t\t\t\t\t\t\tday = read_segment_2digits(ch, &ch);\n\t\t\t\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t\t\t\t\tday = 1U;\n\t\t\t\t\t\t\t\t\t\t\t} else\n\t\t\t\t\t\t\t\t\t\t\t\tday = 1U;\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\t\t\t\t\tcase 3: //Ordinal date.\n\t\t\t\t\t\t\t\t\t\t\tday = segment;\n\t\t\t\t\t\t\t\t\t\t\tdateSpecification = dateOnly;\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else if (*ch == 'W') {\n\t\t\t\t\t\t\t\tyear  = nowComponents.year;\n\t\t\t\t\t\t\t\tyear -= (year % 100U);\n\t\t\t\t\t\t\t\tyear += segment;\n\n\t\t\t\t\t\t\tparseWeekAndDay: //*ch should be 'W' here.\n\t\t\t\t\t\t\t\tif (!isdigit(*++ch)) {\n\t\t\t\t\t\t\t\t\t//Not really a week-based date; just a year followed by '-W'.\n\t\t\t\t\t\t\t\t\tif (strict)\n\t\t\t\t\t\t\t\t\t\tisValidDate = NO;\n\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t\tmonth_or_week = day = 1U;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tmonth_or_week = read_segment_2digits(ch, &ch);\n\t\t\t\t\t\t\t\t\tif (*ch == '-') ++ch;\n\t\t\t\t\t\t\t\tparseDayAfterWeek:\n\t\t\t\t\t\t\t\t\tday = isdigit(*ch) ? read_segment_2digits(ch, &ch) : 1U;\n\t\t\t\t\t\t\t\t\tdateSpecification = week;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t//Century only. Assume current year.\n\t\t\t\t\t\t\tcenturyOnly:\n\t\t\t\t\t\t\t\tyear = segment * 100U + nowComponents.year % 100U;\n\t\t\t\t\t\t\t\tmonth_or_week = day = 1U;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tcase 1:; //-YY; -YY-MM (implicit century)\n\t\t\t\t\t\t\tNSLog(@\"(%@) found %lu digits and one hyphen, so this is either -YY or -YY-MM; segment (year) is %lu\", string, (unsigned long)num_digits, (unsigned long)segment);\n\t\t\t\t\t\t\tNSUInteger current_year = nowComponents.year;\n\t\t\t\t\t\t\tNSUInteger current_century = (current_year % 100U);\n\t\t\t\t\t\t\tyear = segment + (current_year - current_century);\n\t\t\t\t\t\t\tif (num_digits == 1U) //implied decade\n\t\t\t\t\t\t\t\tyear += current_century - (current_year % 10U);\n\n\t\t\t\t\t\t\tif (*ch == '-') {\n\t\t\t\t\t\t\t\t++ch;\n\t\t\t\t\t\t\t\tmonth_or_week = read_segment_2digits(ch, &ch);\n\t\t\t\t\t\t\t\tNSLog(@\"(%@) month is %lu\", string, (unsigned long)month_or_week);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tday = 1U;\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tcase 2: //--MM; --MM-DD\n\t\t\t\t\t\t\tmonth_or_week = segment;\n\t\t\t\t\t\t\tif (*ch == '-') {\n\t\t\t\t\t\t\t\t++ch;\n\t\t\t\t\t\t\t\tday = read_segment_2digits(ch, &ch);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tcase 3: //---DD\n\t\t\t\t\t\t\tday = segment;\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\tisValidDate = NO;\n\t\t\t\t\t} //switch(num_leading_hyphens) (2 digits)\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 7: //YYYY DDD (ordinal date)\n\t\t\t\t\tif (num_leading_hyphens > 0U)\n\t\t\t\t\t\tisValidDate = NO;\n\t\t\t\t\telse {\n\t\t\t\t\t\tday = segment % 1000U;\n\t\t\t\t\t\tyear = segment / 1000U;\n\t\t\t\t\t\tdateSpecification = dateOnly;\n\t\t\t\t\t\tif (strict && (day > (365U + is_leap_year(year))))\n\t\t\t\t\t\t\tisValidDate = NO;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 3: //--DDD (ordinal date, implicit year)\n\t\t\t\t\t//Technically, the standard only allows one hyphen. But it says that two hyphens is the logical implementation, and one was dropped for brevity. So I have chosen to allow the missing hyphen.\n\t\t\t\t\tif ((num_leading_hyphens < 1U) || ((num_leading_hyphens > 2U) && !strict))\n\t\t\t\t\t\tisValidDate = NO;\n\t\t\t\t\telse {\n\t\t\t\t\t\tday = segment;\n\t\t\t\t\t\tdateSpecification = dateOnly;\n\t\t\t\t\t\tif (strict && (day > (365U + is_leap_year(year))))\n\t\t\t\t\t\t\tisValidDate = NO;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\n\t\t\t\tdefault:\n\t\t\t\t\tisValidDate = NO;\n\t\t\t}\n\t\t}\n\n\t\tif (isValidDate) {\n\t\t\tif (isspace(*ch) || (*ch == 'T')) ++ch;\n\n\t\t\tif (isdigit(*ch)) {\n\t\t\t\thour = read_segment_2digits(ch, &ch);\n\t\t\t\tif (*ch == timeSep) {\n\t\t\t\t\t++ch;\n\t\t\t\t\tif ((timeSep == ',') || (timeSep == '.')) {\n\t\t\t\t\t\t//We can't do fractional minutes when '.' is the segment separator.\n\t\t\t\t\t\t//Only allow whole minutes and whole seconds.\n\t\t\t\t\t\tminute = read_segment_2digits(ch, &ch);\n\t\t\t\t\t\tif (*ch == timeSep) {\n\t\t\t\t\t\t\t++ch;\n\t\t\t\t\t\t\tsecond = read_segment_2digits(ch, &ch);\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\t//Allow a fractional minute.\n\t\t\t\t\t\t//If we don't get a fraction, look for a seconds segment.\n\t\t\t\t\t\t//Otherwise, the fraction of a minute is the seconds.\n\t\t\t\t\t\tminute = read_double(ch, &ch);\n\t\t\t\t\t\tsecond = modf(minute, &minute);\n\t\t\t\t\t\tif (second > DBL_EPSILON)\n\t\t\t\t\t\t\tsecond *= 60.0; //Convert fraction (e.g. .5) into seconds (e.g. 30).\n\t\t\t\t\t\telse if (*ch == timeSep) {\n\t\t\t\t\t\t\t++ch;\n\t\t\t\t\t\t\tsecond = read_double(ch, &ch);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tsecond = NAN;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (!strict) {\n\t\t\t\t\tif (isspace(*ch)) ++ch;\n\t\t\t\t}\n\n\t\t\t\tswitch(*ch) {\n\t\t\t\t\tcase 'Z':\n\t\t\t\t\t\ttimeZone = [NSTimeZone timeZoneWithAbbreviation:@\"UTC\"];\n\t\t\t\t\t\t++ch; //So that the Z is included in the range.\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase '+':\n\t\t\t\t\tcase '-':;\n\t\t\t\t\t\tBOOL negative = (*ch == '-');\n\t\t\t\t\t\tif (isdigit(*++ch)) {\n\t\t\t\t\t\t\t//Read hour offset.\n\t\t\t\t\t\t\tsegment = *ch - '0';\n\t\t\t\t\t\t\tif (isdigit(*++ch)) {\n\t\t\t\t\t\t\t\tsegment *= 10U;\n\t\t\t\t\t\t\t\tsegment += *(ch++) - '0';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\ttz_hour = (NSInteger)segment;\n\t\t\t\t\t\t\tif (negative) tz_hour = -tz_hour;\n\n\t\t\t\t\t\t\t//Optional separator.\n\t\t\t\t\t\t\tif (*ch == self.timeZoneSeparator) ++ch;\n\n\t\t\t\t\t\t\tif (isdigit(*ch)) {\n\t\t\t\t\t\t\t\t//Read minute offset.\n\t\t\t\t\t\t\t\tsegment = *ch - '0';\n\t\t\t\t\t\t\t\tif (isdigit(*++ch)) {\n\t\t\t\t\t\t\t\t\tsegment *= 10U;\n\t\t\t\t\t\t\t\t\tsegment += *ch - '0';\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\ttz_minute = segment;\n\t\t\t\t\t\t\t\tif (negative) tz_minute = -tz_minute;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tNSInteger timeZoneOffset = (tz_hour * 3600) + (tz_minute * 60);\n\t\t\t\t\t\t\tNSNumber *offsetNum = [NSNumber numberWithInteger:timeZoneOffset];\n\t\t\t\t\t\t\ttimeZone = [timeZonesByOffset objectForKey:offsetNum];\n\t\t\t\t\t\t\tif (!timeZone) {\n\t\t\t\t\t\t\t\ttimeZone = [NSTimeZone timeZoneForSecondsFromGMT:timeZoneOffset];\n\t\t\t\t\t\t\t\tif (timeZone) {\n                                    [timeZonesByOffset setObject:timeZone forKey:offsetNum];\n                                }\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (isValidDate) {\n\t\t\tcomponents.year = year;\n\t\t\tcomponents.day = day;\n\t\t\tcomponents.hour = hour;\n\t\t\tcomponents.minute = isnan(minute) ? NSUndefinedDateComponent : (NSInteger)minute;\n\t\t\tcomponents.second = isnan(second) ? NSUndefinedDateComponent : (NSInteger)second;\n\n\t\t\tif (outFractionOfSecond != NULL) {\n\t\t\t\tNSTimeInterval fractionOfSecond = second - (NSInteger)second;\n\t\t\t\tif (fractionOfSecond > 0.0) {\n\t\t\t\t\t*outFractionOfSecond = fractionOfSecond;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tswitch(dateSpecification) {\n\t\t\t\tcase monthAndDate:\n\t\t\t\t\tcomponents.month = month_or_week;\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase week:;\n\t\t\t\t\t//Adapted from <http://personal.ecu.edu/mccartyr/ISOwdALG.txt>.\n\t\t\t\t\t//This works by converting the week date into an ordinal date, then letting the next case handle it.\n\t\t\t\t\tNSUInteger prevYear = year - 1U;\n\t\t\t\t\tNSUInteger YY = prevYear % 100U;\n\t\t\t\t\tNSUInteger C = prevYear - YY;\n\t\t\t\t\tNSUInteger G = YY + YY / 4U;\n\t\t\t\t\tNSUInteger isLeapYear = (((C / 100U) % 4U) * 5U);\n\t\t\t\t\tNSUInteger Jan1Weekday = (isLeapYear + G) % 7U;\n\t\t\t\t\tenum { monday, tuesday, wednesday, thursday/*, friday, saturday, sunday*/ };\n\t\t\t\t\tcomponents.day = ((8U - Jan1Weekday) + (7U * (Jan1Weekday > thursday))) + (day - 1U) + (7U * (month_or_week - 2));\n\n\t\t\t\tcase dateOnly: //An \"ordinal date\".\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t} //if (!(strict && isdigit(ch[0])))\n\n\tif (outRange) {\n\t\tif (isValidDate)\n\t\t\trange.length = ch - start_of_date;\n\t\telse\n\t\t\trange.location = NSNotFound;\n\n\t\t*outRange = range;\n\t}\n\tif (outTimeZone) {\n\t\t*outTimeZone = timeZone;\n\t}\n\n\treturn isValidDate ? components : nil;\n}\n\n- (NSDate *) dateFromString:(NSString *)string {\n\treturn [self dateFromString:string timeZone:NULL];\n}\n- (NSDate *) dateFromString:(NSString *)string timeZone:(out NSTimeZone **)outTimeZone {\n\treturn [self dateFromString:string timeZone:outTimeZone range:NULL];\n}\n- (NSDate *) dateFromString:(NSString *)string timeZone:(out NSTimeZone **)outTimeZone range:(out NSRange *)outRange {\n\tNSTimeZone *timeZone = nil;\n\tNSTimeInterval parsedFractionOfSecond = 0.0;\n  \n\tNSDateComponents *components = [self dateComponentsFromString:string timeZone:&timeZone range:outRange fractionOfSecond:&parsedFractionOfSecond];\n\n\tif (outTimeZone)\n\t\t*outTimeZone = timeZone;\n\tif (components == nil)\n\t\treturn nil;\n\n\tif (!timeZone) timeZone = self.defaultTimeZone;\n\n\tparsingCalendar.timeZone = timeZone;\n\tif ([components respondsToSelector:@selector(setTimeZone:)])\n\t\tcomponents.timeZone = timeZone;\n\tif ([components respondsToSelector:@selector(setCalendar:)])\n\t\tcomponents.calendar = parsingCalendar;\n\n\tNSDate *parsedDate = [parsingCalendar dateFromComponents:components];\n\n\tif (parsedFractionOfSecond > 0.0) {\n\t\tparsedDate = [parsedDate dateByAddingTimeInterval:parsedFractionOfSecond];\n\t}\n  \n  return parsedDate;\n}\n\n- (BOOL)getObjectValue:(id *)outValue forString:(NSString *)string errorDescription:(NSString **)error {\n\tNSDate *date = [self dateFromString:string];\n\tif (outValue)\n\t\t*outValue = date;\n\treturn (date != nil);\n}\n\n#pragma mark Unparsing\n\n@synthesize format;\n@synthesize includeTime;\n@synthesize useMillisecondPrecision;\n@synthesize timeSeparator;\n@synthesize timeZoneSeparator;\n\n- (NSString *) replaceColonsInString:(NSString *)timeFormat withTimeSeparator:(unichar)timeSep {\n\tif (timeSep != ':') {\n\t\tNSMutableString *timeFormatMutable = [[timeFormat mutableCopy] autorelease];\n\t\t[timeFormatMutable replaceOccurrencesOfString:@\":\"\n\t\t                               \t   withString:[NSString stringWithCharacters:&timeSep length:1U]\n\t                                      \t  options:NSBackwardsSearch | NSLiteralSearch\n\t                                        \trange:(NSRange){ 0UL, [timeFormat length] }];\n\t\ttimeFormat = timeFormatMutable;\n\t}\n\treturn timeFormat;\n}\n\n- (NSString *) stringFromDate:(NSDate *)date {\n\tNSTimeZone *timeZone = self.defaultTimeZone;\n\tif (!timeZone) timeZone = [NSTimeZone defaultTimeZone];\n\treturn [self stringFromDate:date timeZone:timeZone];\n}\n\n- (NSString *) stringFromDate:(NSDate *)date timeZone:(NSTimeZone *)timeZone {\n\tswitch (self.format) {\n\t\tcase ISO8601DateFormatCalendar:\n\t\t\treturn [self stringFromDate:date formatString:ISO_CALENDAR_DATE_FORMAT timeZone:timeZone];\n\t\tcase ISO8601DateFormatWeek:\n\t\t\treturn [self weekDateStringForDate:date timeZone:timeZone];\n\t\tcase ISO8601DateFormatOrdinal:\n\t\t\treturn [self stringFromDate:date formatString:ISO_ORDINAL_DATE_FORMAT timeZone:timeZone];\n\t\tdefault:\n\t\t\t[NSException raise:NSInternalInconsistencyException format:@\"self.format was %tu, not calendar (%tu), week (%tu), or ordinal (%tu)\", self.format, ISO8601DateFormatCalendar, ISO8601DateFormatWeek, ISO8601DateFormatOrdinal];\n\t\t\treturn nil;\n\t}\n}\n\n- (NSString *) stringFromDate:(NSDate *)date formatString:(NSString *)dateFormat timeZone:(NSTimeZone *)timeZone {\n\tif (includeTime){\n\t\tNSString *timeFormat = self.useMillisecondPrecision ? ISO_TIME_FORMAT_MS_PRECISION : ISO_TIME_FORMAT;\n\t\tdateFormat = [dateFormat stringByAppendingFormat:@\"'T'%@\", [self replaceColonsInString:timeFormat withTimeSeparator:self.timeSeparator]];\n\t}\n\t\n\n\tif ([dateFormat isEqualToString:lastUsedFormatString] == NO) {\n\t\t[unparsingFormatter release];\n\t\tunparsingFormatter = nil;\n\n\t\t[lastUsedFormatString release];\n\t\tlastUsedFormatString = [dateFormat retain];\n\t}\n\n\tif (!unparsingFormatter) {\n\t\tunparsingFormatter = [[NSDateFormatter alloc] init];\n\t\tunparsingFormatter.formatterBehavior = NSDateFormatterBehavior10_4;\n\t\tunparsingFormatter.dateFormat = dateFormat;\n\t\tunparsingFormatter.calendar = unparsingCalendar;\n\t\tunparsingFormatter.locale = [[[NSLocale alloc] initWithLocaleIdentifier:@\"en_US_POSIX\"] autorelease];\n\t}\n\n\tNSTimeZone *_Nonnull const savedCalendarTimeZone = unparsingCalendar.timeZone;\n\tNSTimeZone *_Nonnull const savedFormatterTimeZone = unparsingFormatter.timeZone;\n\n\tunparsingCalendar.timeZone = timeZone;\n\tunparsingFormatter.timeZone = timeZone;\n\tNSString *str = [unparsingFormatter stringForObjectValue:date];\n\n\tif (includeTime) {\n\t\tNSInteger offset = [timeZone secondsFromGMTForDate:date];\n\t\toffset /= 60;  //bring down to minutes\n\t\tif (offset == 0)\n\t\t\tstr = [str stringByAppendingString:ISO_TIMEZONE_UTC_FORMAT];\n\t\telse {\n\t\t\tint timeZoneOffsetHour = abs((int)(offset / 60));\n\t\t\tint timeZoneOffsetMinute = abs((int)(offset % 60));\n            \n            if (offset > 0) str = [str stringByAppendingString:@\"+\"];\n            else str = [str stringByAppendingString:@\"-\"];\n            \n            str = [str stringByAppendingFormat:ISO8601TwoCharIntegerFormat, timeZoneOffsetHour];\n            \n            if (self.timeZoneSeparator) str = [str stringByAppendingFormat:@\"%C\", self.timeZoneSeparator];\n            \n            str = [str stringByAppendingFormat:ISO8601TwoCharIntegerFormat, timeZoneOffsetMinute];\n\t\t}\n\t}\n\n\t//Undo the change we made earlier\n\tunparsingCalendar.timeZone = self.defaultTimeZone ?: savedCalendarTimeZone;\n\tunparsingFormatter.timeZone = self.defaultTimeZone ?: savedFormatterTimeZone;\n\n\treturn str;\n}\n\n- (NSString *) stringForObjectValue:(id)value {\n\tif ( ! [value isKindOfClass:[NSDate class]]) {\n\t\tNSLog(@\"%s: Can only format NSDate objects, not objects like %@\", __func__, value);\n\t\treturn nil;\n\t}\n\n\treturn [self stringFromDate:(NSDate *)value];\n}\n\n/*Adapted from:\n *\tAlgorithm for Converting Gregorian Dates to ISO 8601 Week Date\n *\tRick McCarty, 1999\n *\thttp://personal.ecu.edu/mccartyr/ISOwdALG.txt\n */\n- (NSString *) weekDateStringForDate:(NSDate *)date timeZone:(NSTimeZone *)timeZone {\n\tunparsingCalendar.timeZone = timeZone;\n\tNSDateComponents *components = [unparsingCalendar components:NSCalendarUnitYear | NSCalendarUnitWeekday | NSCalendarUnitDay fromDate:date];\n\n\t//Determine the ordinal date.\n\tNSDateComponents *startOfYearComponents = [unparsingCalendar components:NSCalendarUnitYear fromDate:date];\n\tstartOfYearComponents.month = 1;\n\tstartOfYearComponents.day = 1;\n\tNSDateComponents *ordinalComponents = [unparsingCalendar components:NSCalendarUnitDay fromDate:[unparsingCalendar dateFromComponents:startOfYearComponents] toDate:date options:0];\n\tordinalComponents.day += 1;\n\n\tenum {\n\t\tmonday, tuesday, wednesday, thursday, friday, saturday, sunday\n\t};\n\tenum {\n\t\tjanuary = 1, february, march,\n\t\tapril, may, june,\n\t\tjuly, august, september,\n\t\toctober, november, december\n\t};\n\n\tNSInteger year = components.year;\n\tNSInteger week = 0;\n\t//The old unparser added 6 to [calendarDate dayOfWeek], which was zero-based; components.weekday is one-based, so we now add only 5.\n\tNSInteger dayOfWeek = (components.weekday + 5) % 7;\n\tNSInteger dayOfYear = ordinalComponents.day;\n\n\tNSInteger prevYear = year - 1;\n\n\tBOOL yearIsLeapYear = is_leap_year(year);\n\tBOOL prevYearIsLeapYear = is_leap_year(prevYear);\n\n\tNSInteger YY = prevYear % 100;\n\tNSInteger C = prevYear - YY;\n\tNSInteger G = YY + YY / 4;\n\tNSInteger Jan1Weekday = (((((C / 100) % 4) * 5) + G) % 7);\n\n\tNSInteger weekday = ((dayOfYear + Jan1Weekday) - 1) % 7;\n\n\tif((dayOfYear <= (7 - Jan1Weekday)) && (Jan1Weekday > thursday)) {\n\t\tweek = 52 + ((Jan1Weekday == friday) || ((Jan1Weekday == saturday) && prevYearIsLeapYear));\n\t\t--year;\n\t} else {\n\t\tNSInteger lengthOfYear = 365 + yearIsLeapYear;\n\t\tif((lengthOfYear - dayOfYear) < (thursday - weekday)) {\n\t\t\t++year;\n\t\t\tweek = 1;\n\t\t} else {\n\t\t\tNSInteger J = dayOfYear + (sunday - weekday) + Jan1Weekday;\n\t\t\tweek = J / 7 - (Jan1Weekday > thursday);\n\t\t}\n\t}\n\n\tNSString *string = [NSString stringWithFormat:@\"%lu-W%02lu-%02lu\", (unsigned long)year, (unsigned long)week, ((unsigned long)dayOfWeek) + 1U];\n\n\tNSString *timeString;\n\tif(includeTime) {\n\t\tNSDateFormatter *formatter = [[NSDateFormatter alloc] init];\n\t\tunichar timeSep = self.timeSeparator;\n\t\tif (!timeSep) timeSep = ISO8601DefaultTimeSeparatorCharacter;\n\t\t\n\t\tNSString *timeFormat = self.useMillisecondPrecision ? ISO_TIME_FORMAT_MS_PRECISION : ISO_TIME_FORMAT;\n\t\tformatter.dateFormat = [self replaceColonsInString:timeFormat withTimeSeparator:timeSep];\n\t\tformatter.locale = [[[NSLocale alloc] initWithLocaleIdentifier:@\"en_US_POSIX\"] autorelease];\n\t\tformatter.timeZone = timeZone;\n\n\t\ttimeString = [formatter stringForObjectValue:date];\n\n\t\t[formatter release];\n\n\t\t//TODO: This is copied from the calendar-date code. It should be isolated in a method.\n\t\tNSInteger offset = [timeZone secondsFromGMTForDate:date];\n\t\toffset /= 60;  //bring down to minutes\n\t\tif (offset == 0)\n\t\t\ttimeString = [timeString stringByAppendingString:ISO_TIMEZONE_UTC_FORMAT];\n\t\telse {\n\t\t\tint timeZoneOffsetHour = (int)(offset / 60);\n\t\t\tint timeZoneOffsetMinute = (int)(offset % 60);\n\t\t\tif (self.timeZoneSeparator)\n\t\t\t\ttimeString = [timeString stringByAppendingFormat:ISO_TIMEZONE_OFFSET_FORMAT_WITH_SEPARATOR,\n\t\t\t\t                                                 timeZoneOffsetHour, self.timeZoneSeparator,\n\t\t\t\t                                                 timeZoneOffsetMinute];\n\t\t\telse\n\t\t\t\ttimeString = [timeString stringByAppendingFormat:ISO_TIMEZONE_OFFSET_FORMAT_NO_SEPARATOR,\n\t\t\t\t                                                 timeZoneOffsetHour, timeZoneOffsetMinute];\n\t\t}\n\n\t\tstring = [string stringByAppendingFormat:@\"T%@\", timeString];\n\t}\n\n\treturn string;\n}\n\n@end\n\nstatic NSUInteger read_segment(const unichar *str, const unichar **next, NSUInteger *out_num_digits) {\n\tNSUInteger num_digits = 0U;\n\tNSUInteger value = 0U;\n\n\twhile(isdigit(*str)) {\n\t\tvalue *= 10U;\n\t\tvalue += *str - '0';\n\t\t++num_digits;\n\t\t++str;\n\t}\n\n\tif (next) *next = str;\n\tif (out_num_digits) *out_num_digits = num_digits;\n\n\treturn value;\n}\nstatic NSUInteger read_segment_4digits(const unichar *str, const unichar **next, NSUInteger *out_num_digits) {\n\tNSUInteger num_digits = 0U;\n\tNSUInteger value = 0U;\n\n\tif (isdigit(*str)) {\n\t\tvalue += *(str++) - '0';\n\t\t++num_digits;\n\t}\n\n\tif (isdigit(*str)) {\n\t\tvalue *= 10U;\n\t\tvalue += *(str++) - '0';\n\t\t++num_digits;\n\t}\n\n\tif (isdigit(*str)) {\n\t\tvalue *= 10U;\n\t\tvalue += *(str++) - '0';\n\t\t++num_digits;\n\t}\n\n\tif (isdigit(*str)) {\n\t\tvalue *= 10U;\n\t\tvalue += *(str++) - '0';\n\t\t++num_digits;\n\t}\n\n\tif (next) *next = str;\n\tif (out_num_digits) *out_num_digits = num_digits;\n\n\treturn value;\n}\nstatic NSUInteger read_segment_2digits(const unichar *str, const unichar **next) {\n\tNSUInteger value = 0U;\n\n\tif (isdigit(*str))\n\t\tvalue += *str - '0';\n\n\tif (isdigit(*++str)) {\n\t\tvalue *= 10U;\n\t\tvalue += *(str++) - '0';\n\t}\n\n\tif (next) *next = str;\n\n\treturn value;\n}\n\n//strtod doesn't support ',' as a separator. This does.\nstatic double read_double(const unichar *str, const unichar **next) {\n\tdouble value = 0.0;\n\n\tif (str) {\n\t\tNSUInteger int_value = 0;\n\n\t\twhile(isdigit(*str)) {\n\t\t\tint_value *= 10U;\n\t\t\tint_value += (*(str++) - '0');\n\t\t}\n\t\tvalue = int_value;\n\n\t\tif (((*str == ',') || (*str == '.'))) {\n\t\t\t++str;\n\n\t\t\tregister double multiplier, multiplier_multiplier;\n\t\t\tmultiplier = multiplier_multiplier = 0.1;\n\n\t\t\twhile(isdigit(*str)) {\n\t\t\t\tvalue += (*(str++) - '0') * multiplier;\n\t\t\t\tmultiplier *= multiplier_multiplier;\n\t\t\t}\n\t\t}\n\t}\n\n\tif (next) *next = str;\n\n\treturn value;\n}\n\nstatic BOOL is_leap_year(NSUInteger year) {\n\treturn \\\n\t    ((year %   4U) == 0U)\n\t&& (((year % 100U) != 0U)\n\t||  ((year % 400U) == 0U));\n}\n"
  },
  {
    "path": "Pods/ISO8601DateFormatter/LICENSE.txt",
    "content": "Copyright © 2006–2013 Peter Hosey\n All rights reserved.\n\nRedistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:\nRedistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.\nRedistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.\nNeither the name of Peter Hosey nor the names of his contributors may be used to endorse or promote products derived from this software without specific prior written permission.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n"
  },
  {
    "path": "Pods/ISO8601DateFormatter/README.md",
    "content": "# ISO 8601: The only date format worth using\n\n[![Image: Status of most recent build and test attempt.](https://travis-ci.org/boredzo/iso-8601-date-formatter.png?branch=master)](https://travis-ci.org/boredzo/iso-8601-date-formatter)\n[![Image: Test code coverage percentage.](https://coveralls.io/repos/boredzo/iso-8601-date-formatter/badge.png?branch=master)](https://coveralls.io/r/boredzo/iso-8601-date-formatter?branch=master)\n\nObligatory relevant [xkcd](http://xkcd.com/):\n\n[![Seriously now. “ISO 8601 was published on 06/05/88 and most recently amended on 12/01/04.”](http://imgs.xkcd.com/comics/iso_8601.png)](http://xkcd.com/1179/)\n\n## How to use this code in your program\n\nAdd the source files to your project.\n\n### Parsing\n\nCreate an ISO 8601 date formatter, then call `[formatter dateFromString:myString]`. The method will return either an NSDate or `nil`.\n\nThere are a total of six parser methods. The one that contains the actual parser is `-[ISO8601DateFormatter dateComponentsFromString:timeZone:range:]`. The other five are based on this one.\n\nThe “`outTimeZone`” parameter, when not set to `NULL`, is a pointer to an `NSTimeZone *`variable. If the string specified a time zone, you'll receive the time zone object in that variable. If the string didn't specify a time zone, you'll receive `nil`.\n\nThe “`outRange`” parameter, when not set to `NULL`, is a pointer to `NSRange` storage. You will receive the range of the parsed substring in that storage.\n\n### Unparsing\n\nCreate an ISO 8601 date formatter, then call `[formatter stringFromDate:myDate]`. The method will return a string.\n\nThe formatter has several properties that control its behavior:\n\n* You can set the format of the resulting strings. By default, the formatter will generate calendar-date strings; your other options are week dates and ordinal dates.\n* You can set a default time zone; by default, it will use `[NSTimeZone defaultTimeZone]`.\n* You can enable a strict mode, wherein the formatter enforces sanity checks on the string. By default, the parser will afford you quite a bit of leeway.\n* You can set whether to include the time in the string, and if so, what hour-minute separator to use (default `':'`).\n\n## How to test that this code works\n\nUPDATE from the year 2013: Conversion from the old make-based test monsters to modern OCUnit-based tests is underway. Contributions of new and old test cases will be greatly appreciated.\n\n'make test' will perform all tests. If you want to perform only *some* tests:\n\n### Parsing\n\nType 'make parser-test'. make will build the test program (testparser), then invoke testparser.sh.py to generate testparser.sh. Then make will invoke testparser.sh, which will invoke the test program with various dates.\n\nIf you don't want to use my tests, 'make testparser' will create the test program without running it. You can then invoke testparser yourself with any date you want to. If it doesn't give you the result you expected, contact me, making sure to provide me with both the input and the output.\n\n### Unparsing\n\nType 'make unparser-test'. make will build the test programs, then invoke testunparser.sh. This shell script invokes each test program for -01-01 of every year from 1991 to 2010, writing the output to a file, and then runs diff -qs between that file (testunparser.out) and a file (testunparser-expected.out) containing known correct output. diff should report that the files are identical.\n\nThree test programs are included: unparse-date, unparse-weekdate, and unparse-ordinal date. If you don't want to use my tests, you can make these test programs separately. Each takes a date specified by ISO 8601 (parsed with my own ISO 8601 parser), and outputs a string that should represent the same date.\n\n## Notes\n\n### Version history\n\nThis version is 0.8. Changes from 0.7:\n\n- watchOS is now officially supported. ba5cbc3 de905a1 45ab5eb (Thanks, Neil Daniels!)\n- tvOS is now officially supported. b56be72 (Thanks, Boris Bügling!)\n- Carthage is now officially supported. da460bf (Thanks, Agnes Vasarhelyi!)\n- Added support for millisecond precision. 065612a (Thanks, Rob Keniger!)\n- Fixed bug that could insert the sign character into the middle of time zone specifications. 7b189ae 5ceb8d6 (Thanks, Hector Zarate!)\n- Improved thread safety of time zone cache. 98bf9cb (Thanks, Peter Steinberger!)\n- Tests now use XCTest. 3cb3921 591ca75\n- API now declares nullability. 40ba01d\n- Header documentation should now be parseable by Xcode. a76f42c 54136ac\n- Updated link to Rick McCarty's week dates algorithm. 58f3d26 (Thanks, Christopher Bowns!)\n- Begun the move to newer API names. 446b9f3 (Thanks, William Kent!)\n- Maintained support for legacy runtime (i386 Mac) targets. c02cffe 01ea541 (Thanks, Mike Abdullah!)\n- Fixed a build error that was introduced by SDK changes. 6d01598 (Thanks, Kyle Fuller!)\n- Fixed an uninitialized variable. 1b09a6a (Thanks, Marcel Jackwerth!)\n\nThis version is 0.7. Changes from 0.6:\n\n- Cocoa Touch is now officially supported. 4bc0a08 5d95233\n- Added an Xcode project with static library targets. c847ddb 4bc0a08\n- `stringFromObjectValue:` now logs to the Console when you hand it a value that isn't an NSDate. Check your Console output after upgrading—you might have had a bug all this time without knowing! 4e05978\n- Added proper documentation in the header, compatible with [appledoc](http://gentlebytes.com/appledoc/). f17713f\n- Fixed nonsense date components/dates being returned when the input is not a valid date string. 288f757 93bb9df 0cb6442\n- Fixed a bug in unparsing where the time zone was wrong (#3). 0e355ee 8f8a2c3 (Thanks, Carl Lindberg)\n- Fixed a DST bug in unparsing where the time zone offset was computed in general rather than for the date being unparsed (#6). 5665132 (Thanks, Zachary West) 9e835c8 0d36057\n- Fixed AM/PM (or local equivalent) appearing in some locales on iOS devices (#15). 4bc0a08 3f697b5 249b3df (Thanks, Matthias Bauch)\n- Fixed another NSDateFormatter-rewriting-formats-to-12-hour-in-some-locales bug. 7c9907f (Thanks, Carl Lindberg)\n- (iOS) The class now purges its time zone cache automatically in response to a memory warning. You don't need to do that yourself, anymore, so the method to purge the caches is no longer public. 138e186 3224b32 a9b6973 3f3c3b8\n- Added support for strings that specify a fraction of a second. 1d3194b 0b0b1ea (Thanks, Luke Redpath)\n- Added support for non-ASCII time separator characters. 47d5035\n- Added support for a time zone separator. 8198f1b 3bd0c07 17c15ed (Thanks to Daniel Tull for the suggestion.)\n- Fixed the parser's response to being passed `nil`. 3c12abc 4980ee6\n- Fixed (I think) #5: dates being formatted with DST applied when they shouldn't. 7368fe8\n- Fixed `stringFromObjectValue:` to behave as NSFormatter's documentation says it should. 3846f80 9754438\n- Added real unit tests based on OCUnit. c847ddb aa1c2cb daf3cc9 9029991 d92aeb6 b412326 (Thanks, Luke Redpath) 45af6bd cfedd75 af0b93c 6a7fd88 9e835c8 9e835c8 0d36057 7368fe8 4bc0a08 3f697b5 8f8a2c3 51c1130 e888681 13a872d f49193c 10ed166 d5fdf51 4980ee6 3846f80 288f757 93bb9df daa45fb 2d61bd0 9f35c4a 8f95099 d62777a 138e186 2a63718\n- Fixed range computation for strings where the date portion ends with a 'Z'. 8f95099 efa095e 808e8c4\n- Fixed some formats with missing hyphens being wrongly accepted when strict mode is on. 9f35c4a c4e0f15\n- Fixed week date strings not having a 'T' between date and time. 7b6fd9f 6a1b66b\n- Fixed week date strings having wrong time zones. 9f6af7c\n- Strings that specify intervals (as specified by ISO 8601) are now explicitly rejected, at least for now (#20). 6d539db 51c1130 bf6a2db 6aef760 (Thanks, Blake Watters)\n- `ISO8601DefaultTimeSeparatorCharacter` is now declared as `const`. I hope none of you were relying on changing that. db9877c\n- Upgraded this README to Markdown. 103f666 fbd34b2 ebbf65a c0b9609\n- Added the above xkcd comic. fbd34b2 63ba50a da3ed65\n- Some light modernization (#25, #28). cdec3e9 8df32fd bb7c5c9\n\nChanges in 0.6 from 0.5:\n\n* When not set to strict parsing, allow a space before the time-zone specification, for greater compatibility with NSDate output (`description`) and input (`dateWithString:`). 27603efc8a77\n* Bug fix: We no longer try to format the formatter. 83415de9f527\n* Bug fix: Hours are now zero-padded correctly ([#4](https://bitbucket.org/boredzo/iso-8601-parser-unparser/issue/4/time-zones-are-emitted-without-leading)). a5608e189ebe af0c6b397428\n* Fixed many various compiler warnings. Some fixes contributed by Sparks. 8be3d6f7c6f2 78ae31de2170 68dc351e9fdb e7ea87db8621 873f499ae6db\n* Now 75 times faster. 6a023812bd2b 05dc35d6b505 3b2225e0ce8c d59720ad015a 10f526956963 297b8dae4095 796be11aa596 cadf0f0c8199 61d2959c6921\n* iOS users can now tell the ISO 8601 date formatter class to drop its caches (which you should do when you receive a memory warning). 2bb1725914b1\n* Added a couple of command-line options to the calendar-format-unparser test tool. c644aadb2b14\n* The parser test tool now displays parsed dates in GMT rather than the local time zone. 788c1455ecb1\n* Added a test tool to test unparsing with the time included. a89a9a8b3d61\n* You can now “make analysis” to run the Clang Static Analyzer on the date formatter. b3dd33841f42\n* The test tools are now built using Clang. 0723d3aa6596\n\nChanges in 0.5 from 0.4:\n\n* Rewrote as an NSFormatter subclass using NSCalendar.\n  * Making it a formatter makes it much easier to use with Bindings.\n  * Using NSCalendar means we're no longer using NSCalendarDate, which Apple has said they will deprecate at some point.\n* Fixed a bug in week date generation: One subtraction could give a negative result, which was a problem because my implementation of the algorithm used unsigned integers. I've changed it to use signed integers, so the result truly is negative now. I also added a test case for this.\n\nChanges in 0.4 from 0.3:\n\n* Added the ability to use a time separator other than ':'.\n\nChanges in 0.3 from 0.2:\n\n* Colin Barrett noticed that I used `%m` instead of `%M` when creating the time strings. Oops.\n* Colin also noticed that I had the `?:` in `ISO8601DateStringWithTime:` the wrong way around. Oops again.\n\nChanges in 0.2 from 0.1:\n\n* The unparser is new. The  has been munged to allow both components together, \n* The parser has not changed.\n\n## Implementation details\n### Parsing\n\nWhitespace before a date, and anything after a date, is ignored. Thus, \"    T23 and all's well\" is a valid date for the purpose of this method. (Yes, T23 is a valid ISO 8601 date. It means 23:00:00, or 11 PM.)\n\nAll of the frills of ISO 8601 are supported, except for extended dates (years longer than 4 digits). Specifically, you can use week-based dates (2006-W2 for the second week of 2006), ordinal dates (2006-365 for December 31), decimal minutes (11:30.5 == 11:30:30), and decimal seconds (11:30:10.5). All methods of specifying a time zone are supported.\n\nISO 8601 leaves quite a bit up to the parties exchanging dates. I hope I've chosen reasonable defaults. For example (note that I'm writing this on 2006-02-24):\n\n* If the month or month and date are missing, 1 is assumed. \"2006\" == \"2006-01-01\".\n* If the year or year and month are missing, the current ones are assumed. \"--02-01\" == \"2006-02-01\". \"---28\" == \"2006-02-28\".\n* In the case of week-based dates, with  the day missing, this implementation returns the first day of that week: 2006-W1 is 2006-01-01, 2006-W2 is 2006-01-08, etc.\n* For any date without a time, midnight on that date is used.\n* ISO 8601 permits the choice of either T0 or T24 for midnight. This implementation uses T0. T24 will get you T0 on the following day.\n* If no time-zone is specified, local time (as returned by [NSTimeZone localTimeZone]) is used.\n\nNone of the above defaults apply if you're using the NSDateComponents-based API.\n\nWhen a date is parsed that has a year but no century, this implementation adds the current century.\n\nThe implementation is tolerant of out-of-range numbers. For example, \"2005-13-40T24:62:89\" == 1:02 AM on 2006-02-10. Notice that the month (13 > 12), date (40 > 31), hour (24 > 23), minute (62 > 59), and second (89 > 59) are all out-of-range.\n\nAs mentioned above, there is a \"strict\" mode that enforces sanity checks. In particular, the date must be the entire contents of the string, and numbers are range-checked. If you have any suggestions on how to make this mode more strict, please file an enhancement request in the Issues section.\n\n### Unparsing\n\nI use [Rick McCarty's algorithm for converting calendar dates to week dates](http://lachy.id.au/dev/script/examples/datetime/ISOwdALG.txt), slightly tweaked.\n\n## Bugs\n\n### Parsing\n\n* This method won't extract a date from just anywhere in a string, only immediately after the start of the string (or any leading whitespace). There are two solutions: either require you to invoke the parser on a string that is only an ISO 8601 date, with nothing before or after (bad for parsing purposes), or make the parser able to find an ISO 8601 date as a substring. I won't do the first one, and barring a patch, I probably won't do the second one either.\n\n* Date ranges (also specified by ISO 8601) are not supported; this method will only return one date. To handle ranges would require at least one more method.\n\n* There is no method to analyze a date string and tell you what was found in it (year, month, week, day, ordinal day, etc.). Feel free to submit a patch.\n\n## Copyright\n\nThis code is copyright 2006–2016 Peter Hosey. It is under the BSD license; see LICENSE.txt for the full text of the license.\n"
  },
  {
    "path": "Pods/Local Podspecs/CoreBitcoin.podspec.json",
    "content": "{\n  \"name\": \"CoreBitcoin\",\n  \"version\": \"0.6.8.1\",\n  \"summary\": \"CoreBitcoin is an implementation of Bitcoin protocol in Objective-C.\",\n  \"description\": \"CoreBitcoin is a complete toolkit to work with Bitcoin data structures.\",\n  \"homepage\": \"https://github.com/oleganza/CoreBitcoin\",\n  \"license\": \"WTFPL\",\n  \"authors\": {\n    \"Oleg Andreev\": \"oleganza@gmail.com\"\n  },\n  \"platforms\": {\n    \"ios\": \"7.0\",\n    \"osx\": \"10.9\"\n  },\n  \"source\": {\n    \"git\": \"https://github.com/oleganza/CoreBitcoin.git\",\n    \"tag\": \"0.6.8.1\"\n  },\n  \"source_files\": \"CoreBitcoin\",\n  \"exclude_files\": [\n    \"CoreBitcoin/**/*+Tests.{h,m}\",\n    \"CoreBitcoin/BTCScriptTestData.h\"\n  ],\n  \"requires_arc\": true,\n  \"frameworks\": \"Foundation\",\n  \"ios\": {\n    \"frameworks\": \"UIKit\"\n  },\n  \"osx\": {\n    \"frameworks\": \"AppKit\"\n  },\n  \"dependencies\": {\n    \"OpenSSL-Universal\": [\n      \"1.0.1.16\"\n    ],\n    \"ISO8601DateFormatter\": [\n\n    ]\n  }\n}\n"
  },
  {
    "path": "Pods/MBProgressHUD/LICENSE",
    "content": "Copyright (c) 2009-2015 Matej Bukovinski\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE."
  },
  {
    "path": "Pods/MBProgressHUD/MBProgressHUD.h",
    "content": "//\n//  MBProgressHUD.h\n//  Version 0.9.2\n//  Created by Matej Bukovinski on 2.4.09.\n//\n\n// This code is distributed under the terms and conditions of the MIT license. \n\n// Copyright (c) 2009-2015 Matej Bukovinski\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\n#import <Foundation/Foundation.h>\n#import <UIKit/UIKit.h>\n#import <CoreGraphics/CoreGraphics.h>\n\n@protocol MBProgressHUDDelegate;\n\n\ntypedef NS_ENUM(NSInteger, MBProgressHUDMode) {\n\t/** Progress is shown using an UIActivityIndicatorView. This is the default. */\n\tMBProgressHUDModeIndeterminate,\n\t/** Progress is shown using a round, pie-chart like, progress view. */\n\tMBProgressHUDModeDeterminate,\n\t/** Progress is shown using a horizontal progress bar */\n\tMBProgressHUDModeDeterminateHorizontalBar,\n\t/** Progress is shown using a ring-shaped progress view. */\n\tMBProgressHUDModeAnnularDeterminate,\n\t/** Shows a custom view */\n\tMBProgressHUDModeCustomView,\n\t/** Shows only labels */\n\tMBProgressHUDModeText\n};\n\ntypedef NS_ENUM(NSInteger, MBProgressHUDAnimation) {\n\t/** Opacity animation */\n\tMBProgressHUDAnimationFade,\n\t/** Opacity + scale animation */\n\tMBProgressHUDAnimationZoom,\n\tMBProgressHUDAnimationZoomOut = MBProgressHUDAnimationZoom,\n\tMBProgressHUDAnimationZoomIn\n};\n\n\n#ifndef MB_INSTANCETYPE\n#if __has_feature(objc_instancetype)\n\t#define MB_INSTANCETYPE instancetype\n#else\n\t#define MB_INSTANCETYPE id\n#endif\n#endif\n\n#ifndef MB_STRONG\n#if __has_feature(objc_arc)\n\t#define MB_STRONG strong\n#else\n\t#define MB_STRONG retain\n#endif\n#endif\n\n#ifndef MB_WEAK\n#if __has_feature(objc_arc_weak)\n\t#define MB_WEAK weak\n#elif __has_feature(objc_arc)\n\t#define MB_WEAK unsafe_unretained\n#else\n\t#define MB_WEAK assign\n#endif\n#endif\n\n#if NS_BLOCKS_AVAILABLE\ntypedef void (^MBProgressHUDCompletionBlock)();\n#endif\n\n\n/** \n * Displays a simple HUD window containing a progress indicator and two optional labels for short messages.\n *\n * This is a simple drop-in class for displaying a progress HUD view similar to Apple's private UIProgressHUD class.\n * The MBProgressHUD window spans over the entire space given to it by the initWithFrame constructor and catches all\n * user input on this region, thereby preventing the user operations on components below the view. The HUD itself is\n * drawn centered as a rounded semi-transparent view which resizes depending on the user specified content.\n *\n * This view supports four modes of operation:\n *  - MBProgressHUDModeIndeterminate - shows a UIActivityIndicatorView\n *  - MBProgressHUDModeDeterminate - shows a custom round progress indicator\n *  - MBProgressHUDModeAnnularDeterminate - shows a custom annular progress indicator\n *  - MBProgressHUDModeCustomView - shows an arbitrary, user specified view (see `customView`)\n *\n * All three modes can have optional labels assigned:\n *  - If the labelText property is set and non-empty then a label containing the provided content is placed below the\n *    indicator view.\n *  - If also the detailsLabelText property is set then another label is placed below the first label.\n */\n@interface MBProgressHUD : UIView\n\n/**\n * Creates a new HUD, adds it to provided view and shows it. The counterpart to this method is hideHUDForView:animated:.\n *\n * @note This method sets `removeFromSuperViewOnHide`. The HUD will automatically be removed from the view hierarchy when hidden.\n *\n * @param view The view that the HUD will be added to\n * @param animated If set to YES the HUD will appear using the current animationType. If set to NO the HUD will not use\n * animations while appearing.\n * @return A reference to the created HUD.\n *\n * @see hideHUDForView:animated:\n * @see animationType\n */\n+ (MB_INSTANCETYPE)showHUDAddedTo:(UIView *)view animated:(BOOL)animated;\n\n/**\n * Finds the top-most HUD subview and hides it. The counterpart to this method is showHUDAddedTo:animated:.\n *\n * @note This method sets `removeFromSuperViewOnHide`. The HUD will automatically be removed from the view hierarchy when hidden.\n *\n * @param view The view that is going to be searched for a HUD subview.\n * @param animated If set to YES the HUD will disappear using the current animationType. If set to NO the HUD will not use\n * animations while disappearing.\n * @return YES if a HUD was found and removed, NO otherwise.\n *\n * @see showHUDAddedTo:animated:\n * @see animationType\n */\n+ (BOOL)hideHUDForView:(UIView *)view animated:(BOOL)animated;\n\n/**\n * Finds all the HUD subviews and hides them. \n *\n * @note This method sets `removeFromSuperViewOnHide`. The HUDs will automatically be removed from the view hierarchy when hidden.\n *\n * @param view The view that is going to be searched for HUD subviews.\n * @param animated If set to YES the HUDs will disappear using the current animationType. If set to NO the HUDs will not use\n * animations while disappearing.\n * @return the number of HUDs found and removed.\n *\n * @see hideHUDForView:animated:\n * @see animationType\n */\n+ (NSUInteger)hideAllHUDsForView:(UIView *)view animated:(BOOL)animated;\n\n/**\n * Finds the top-most HUD subview and returns it. \n *\n * @param view The view that is going to be searched.\n * @return A reference to the last HUD subview discovered.\n */\n+ (MB_INSTANCETYPE)HUDForView:(UIView *)view;\n\n/**\n * Finds all HUD subviews and returns them.\n *\n * @param view The view that is going to be searched.\n * @return All found HUD views (array of MBProgressHUD objects).\n */\n+ (NSArray *)allHUDsForView:(UIView *)view;\n\n/**\n * A convenience constructor that initializes the HUD with the window's bounds. Calls the designated constructor with\n * window.bounds as the parameter.\n *\n * @param window The window instance that will provide the bounds for the HUD. Should be the same instance as\n * the HUD's superview (i.e., the window that the HUD will be added to).\n */\n- (id)initWithWindow:(UIWindow *)window;\n\n/**\n * A convenience constructor that initializes the HUD with the view's bounds. Calls the designated constructor with\n * view.bounds as the parameter\n *\n * @param view The view instance that will provide the bounds for the HUD. Should be the same instance as\n * the HUD's superview (i.e., the view that the HUD will be added to).\n */\n- (id)initWithView:(UIView *)view;\n\n/** \n * Display the HUD. You need to make sure that the main thread completes its run loop soon after this method call so\n * the user interface can be updated. Call this method when your task is already set-up to be executed in a new thread\n * (e.g., when using something like NSOperation or calling an asynchronous call like NSURLRequest).\n *\n * @param animated If set to YES the HUD will appear using the current animationType. If set to NO the HUD will not use\n * animations while appearing.\n *\n * @see animationType\n */\n- (void)show:(BOOL)animated;\n\n/** \n * Hide the HUD. This still calls the hudWasHidden: delegate. This is the counterpart of the show: method. Use it to\n * hide the HUD when your task completes.\n *\n * @param animated If set to YES the HUD will disappear using the current animationType. If set to NO the HUD will not use\n * animations while disappearing.\n *\n * @see animationType\n */\n- (void)hide:(BOOL)animated;\n\n/** \n * Hide the HUD after a delay. This still calls the hudWasHidden: delegate. This is the counterpart of the show: method. Use it to\n * hide the HUD when your task completes.\n *\n * @param animated If set to YES the HUD will disappear using the current animationType. If set to NO the HUD will not use\n * animations while disappearing.\n * @param delay Delay in seconds until the HUD is hidden.\n *\n * @see animationType\n */\n- (void)hide:(BOOL)animated afterDelay:(NSTimeInterval)delay;\n\n/** \n * Shows the HUD while a background task is executing in a new thread, then hides the HUD.\n *\n * This method also takes care of autorelease pools so your method does not have to be concerned with setting up a\n * pool.\n *\n * @param method The method to be executed while the HUD is shown. This method will be executed in a new thread.\n * @param target The object that the target method belongs to.\n * @param object An optional object to be passed to the method.\n * @param animated If set to YES the HUD will (dis)appear using the current animationType. If set to NO the HUD will not use\n * animations while (dis)appearing.\n */\n- (void)showWhileExecuting:(SEL)method onTarget:(id)target withObject:(id)object animated:(BOOL)animated;\n\n#if NS_BLOCKS_AVAILABLE\n\n/**\n * Shows the HUD while a block is executing on a background queue, then hides the HUD.\n *\n * @see showAnimated:whileExecutingBlock:onQueue:completionBlock:\n */\n- (void)showAnimated:(BOOL)animated whileExecutingBlock:(dispatch_block_t)block;\n\n/**\n * Shows the HUD while a block is executing on a background queue, then hides the HUD.\n *\n * @see showAnimated:whileExecutingBlock:onQueue:completionBlock:\n */\n- (void)showAnimated:(BOOL)animated whileExecutingBlock:(dispatch_block_t)block completionBlock:(MBProgressHUDCompletionBlock)completion;\n\n/**\n * Shows the HUD while a block is executing on the specified dispatch queue, then hides the HUD.\n *\n * @see showAnimated:whileExecutingBlock:onQueue:completionBlock:\n */\n- (void)showAnimated:(BOOL)animated whileExecutingBlock:(dispatch_block_t)block onQueue:(dispatch_queue_t)queue;\n\n/** \n * Shows the HUD while a block is executing on the specified dispatch queue, executes completion block on the main queue, and then hides the HUD.\n *\n * @param animated If set to YES the HUD will (dis)appear using the current animationType. If set to NO the HUD will\n * not use animations while (dis)appearing.\n * @param block The block to be executed while the HUD is shown.\n * @param queue The dispatch queue on which the block should be executed.\n * @param completion The block to be executed on completion.\n *\n * @see completionBlock\n */\n- (void)showAnimated:(BOOL)animated whileExecutingBlock:(dispatch_block_t)block onQueue:(dispatch_queue_t)queue\n\t\t  completionBlock:(MBProgressHUDCompletionBlock)completion;\n\n/**\n * A block that gets called after the HUD was completely hidden.\n */\n@property (copy) MBProgressHUDCompletionBlock completionBlock;\n\n#endif\n\n/** \n * MBProgressHUD operation mode. The default is MBProgressHUDModeIndeterminate.\n *\n * @see MBProgressHUDMode\n */\n@property (assign) MBProgressHUDMode mode;\n\n/**\n * The animation type that should be used when the HUD is shown and hidden. \n *\n * @see MBProgressHUDAnimation\n */\n@property (assign) MBProgressHUDAnimation animationType;\n\n/**\n * The UIView (e.g., a UIImageView) to be shown when the HUD is in MBProgressHUDModeCustomView.\n * For best results use a 37 by 37 pixel view (so the bounds match the built in indicator bounds). \n */\n@property (MB_STRONG) UIView *customView;\n\n/** \n * The HUD delegate object. \n *\n * @see MBProgressHUDDelegate\n */\n@property (MB_WEAK) id<MBProgressHUDDelegate> delegate;\n\n/** \n * An optional short message to be displayed below the activity indicator. The HUD is automatically resized to fit\n * the entire text. If the text is too long it will get clipped by displaying \"...\" at the end. If left unchanged or\n * set to @\"\", then no message is displayed.\n */\n@property (copy) NSString *labelText;\n\n/** \n * An optional details message displayed below the labelText message. This message is displayed only if the labelText\n * property is also set and is different from an empty string (@\"\"). The details text can span multiple lines. \n */\n@property (copy) NSString *detailsLabelText;\n\n/** \n * The opacity of the HUD window. Defaults to 0.8 (80% opacity). \n */\n@property (assign) float opacity;\n\n/**\n * The color of the HUD window. Defaults to black. If this property is set, color is set using\n * this UIColor and the opacity property is not used.  using retain because performing copy on\n * UIColor base colors (like [UIColor greenColor]) cause problems with the copyZone.\n */\n@property (MB_STRONG) UIColor *color;\n\n/** \n * The x-axis offset of the HUD relative to the centre of the superview. \n */\n@property (assign) float xOffset;\n\n/** \n * The y-axis offset of the HUD relative to the centre of the superview. \n */\n@property (assign) float yOffset;\n\n/**\n * The amount of space between the HUD edge and the HUD elements (labels, indicators or custom views). \n * Defaults to 20.0\n */\n@property (assign) float margin;\n\n/**\n * The corner radius for the HUD\n * Defaults to 10.0\n */\n@property (assign) float cornerRadius;\n\n/** \n * Cover the HUD background view with a radial gradient. \n */\n@property (assign) BOOL dimBackground;\n\n/*\n * Grace period is the time (in seconds) that the invoked method may be run without \n * showing the HUD. If the task finishes before the grace time runs out, the HUD will\n * not be shown at all. \n * This may be used to prevent HUD display for very short tasks.\n * Defaults to 0 (no grace time).\n * Grace time functionality is only supported when the task status is known!\n * @see taskInProgress\n */\n@property (assign) float graceTime;\n\n/**\n * The minimum time (in seconds) that the HUD is shown. \n * This avoids the problem of the HUD being shown and than instantly hidden.\n * Defaults to 0 (no minimum show time).\n */\n@property (assign) float minShowTime;\n\n/**\n * Indicates that the executed operation is in progress. Needed for correct graceTime operation.\n * If you don't set a graceTime (different than 0.0) this does nothing.\n * This property is automatically set when using showWhileExecuting:onTarget:withObject:animated:.\n * When threading is done outside of the HUD (i.e., when the show: and hide: methods are used directly),\n * you need to set this property when your task starts and completes in order to have normal graceTime \n * functionality.\n */\n@property (assign) BOOL taskInProgress;\n\n/**\n * Removes the HUD from its parent view when hidden. \n * Defaults to NO. \n */\n@property (assign) BOOL removeFromSuperViewOnHide;\n\n/** \n * Font to be used for the main label. Set this property if the default is not adequate. \n */\n@property (MB_STRONG) UIFont* labelFont;\n\n/**\n * Color to be used for the main label. Set this property if the default is not adequate.\n */\n@property (MB_STRONG) UIColor* labelColor;\n\n/**\n * Font to be used for the details label. Set this property if the default is not adequate.\n */\n@property (MB_STRONG) UIFont* detailsLabelFont;\n\n/** \n * Color to be used for the details label. Set this property if the default is not adequate.\n */\n@property (MB_STRONG) UIColor* detailsLabelColor;\n\n/**\n * The color of the activity indicator. Defaults to [UIColor whiteColor]\n * Does nothing on pre iOS 5.\n */\n@property (MB_STRONG) UIColor *activityIndicatorColor;\n\n/** \n * The progress of the progress indicator, from 0.0 to 1.0. Defaults to 0.0. \n */\n@property (assign) float progress;\n\n/**\n * The minimum size of the HUD bezel. Defaults to CGSizeZero (no minimum size).\n */\n@property (assign) CGSize minSize;\n\n\n/**\n * The actual size of the HUD bezel.\n * You can use this to limit touch handling on the bezel area only.\n * @see https://github.com/jdg/MBProgressHUD/pull/200\n */\n@property (atomic, assign, readonly) CGSize size;\n\n\n/**\n * Force the HUD dimensions to be equal if possible. \n */\n@property (assign, getter = isSquare) BOOL square;\n\n@end\n\n\n@protocol MBProgressHUDDelegate <NSObject>\n\n@optional\n\n/** \n * Called after the HUD was fully hidden from the screen. \n */\n- (void)hudWasHidden:(MBProgressHUD *)hud;\n\n@end\n\n\n/**\n * A progress view for showing definite progress by filling up a circle (pie chart).\n */\n@interface MBRoundProgressView : UIView \n\n/**\n * Progress (0.0 to 1.0)\n */\n@property (nonatomic, assign) float progress;\n\n/**\n * Indicator progress color.\n * Defaults to white [UIColor whiteColor]\n */\n@property (nonatomic, MB_STRONG) UIColor *progressTintColor;\n\n/**\n * Indicator background (non-progress) color.\n * Defaults to translucent white (alpha 0.1)\n */\n@property (nonatomic, MB_STRONG) UIColor *backgroundTintColor;\n\n/*\n * Display mode - NO = round or YES = annular. Defaults to round.\n */\n@property (nonatomic, assign, getter = isAnnular) BOOL annular;\n\n@end\n\n\n/**\n * A flat bar progress view. \n */\n@interface MBBarProgressView : UIView\n\n/**\n * Progress (0.0 to 1.0)\n */\n@property (nonatomic, assign) float progress;\n\n/**\n * Bar border line color.\n * Defaults to white [UIColor whiteColor].\n */\n@property (nonatomic, MB_STRONG) UIColor *lineColor;\n\n/**\n * Bar background color.\n * Defaults to clear [UIColor clearColor];\n */\n@property (nonatomic, MB_STRONG) UIColor *progressRemainingColor;\n\n/**\n * Bar progress color.\n * Defaults to white [UIColor whiteColor].\n */\n@property (nonatomic, MB_STRONG) UIColor *progressColor;\n\n@end\n"
  },
  {
    "path": "Pods/MBProgressHUD/MBProgressHUD.m",
    "content": "//\n// MBProgressHUD.m\n// Version 0.9.2\n// Created by Matej Bukovinski on 2.4.09.\n//\n\n#import \"MBProgressHUD.h\"\n#import <tgmath.h>\n\n\n#if __has_feature(objc_arc)\n\t#define MB_AUTORELEASE(exp) exp\n\t#define MB_RELEASE(exp) exp\n\t#define MB_RETAIN(exp) exp\n#else\n\t#define MB_AUTORELEASE(exp) [exp autorelease]\n\t#define MB_RELEASE(exp) [exp release]\n\t#define MB_RETAIN(exp) [exp retain]\n#endif\n\n#if __IPHONE_OS_VERSION_MIN_REQUIRED >= 60000\n    #define MBLabelAlignmentCenter NSTextAlignmentCenter\n#else\n    #define MBLabelAlignmentCenter UITextAlignmentCenter\n#endif\n\n#if __IPHONE_OS_VERSION_MIN_REQUIRED >= 70000\n\t#define MB_TEXTSIZE(text, font) [text length] > 0 ? [text \\\n\t\tsizeWithAttributes:@{NSFontAttributeName:font}] : CGSizeZero;\n#else\n\t#define MB_TEXTSIZE(text, font) [text length] > 0 ? [text sizeWithFont:font] : CGSizeZero;\n#endif\n\n#if __IPHONE_OS_VERSION_MIN_REQUIRED >= 70000\n\t#define MB_MULTILINE_TEXTSIZE(text, font, maxSize, mode) [text length] > 0 ? [text \\\n\t\tboundingRectWithSize:maxSize options:(NSStringDrawingUsesLineFragmentOrigin) \\\n\t\tattributes:@{NSFontAttributeName:font} context:nil].size : CGSizeZero;\n#else\n\t#define MB_MULTILINE_TEXTSIZE(text, font, maxSize, mode) [text length] > 0 ? [text \\\n\t\tsizeWithFont:font constrainedToSize:maxSize lineBreakMode:mode] : CGSizeZero;\n#endif\n\n#ifndef kCFCoreFoundationVersionNumber_iOS_7_0\n\t#define kCFCoreFoundationVersionNumber_iOS_7_0 847.20\n#endif\n\n#ifndef kCFCoreFoundationVersionNumber_iOS_8_0\n\t#define kCFCoreFoundationVersionNumber_iOS_8_0 1129.15\n#endif\n\n\nstatic const CGFloat kPadding = 4.f;\nstatic const CGFloat kLabelFontSize = 16.f;\nstatic const CGFloat kDetailsLabelFontSize = 12.f;\n\n\n@interface MBProgressHUD () {\n\tBOOL useAnimation;\n\tSEL methodForExecution;\n\tid targetForExecution;\n\tid objectForExecution;\n\tUILabel *label;\n\tUILabel *detailsLabel;\n\tBOOL isFinished;\n\tCGAffineTransform rotationTransform;\n}\n\n@property (atomic, MB_STRONG) UIView *indicator;\n@property (atomic, MB_STRONG) NSTimer *graceTimer;\n@property (atomic, MB_STRONG) NSTimer *minShowTimer;\n@property (atomic, MB_STRONG) NSDate *showStarted;\n\n@end\n\n\n@implementation MBProgressHUD\n\n#pragma mark - Properties\n\n@synthesize animationType;\n@synthesize delegate;\n@synthesize opacity;\n@synthesize color;\n@synthesize labelFont;\n@synthesize labelColor;\n@synthesize detailsLabelFont;\n@synthesize detailsLabelColor;\n@synthesize indicator;\n@synthesize xOffset;\n@synthesize yOffset;\n@synthesize minSize;\n@synthesize square;\n@synthesize margin;\n@synthesize dimBackground;\n@synthesize graceTime;\n@synthesize minShowTime;\n@synthesize graceTimer;\n@synthesize minShowTimer;\n@synthesize taskInProgress;\n@synthesize removeFromSuperViewOnHide;\n@synthesize customView;\n@synthesize showStarted;\n@synthesize mode;\n@synthesize labelText;\n@synthesize detailsLabelText;\n@synthesize progress;\n@synthesize size;\n@synthesize activityIndicatorColor;\n#if NS_BLOCKS_AVAILABLE\n@synthesize completionBlock;\n#endif\n\n#pragma mark - Class methods\n\n+ (MB_INSTANCETYPE)showHUDAddedTo:(UIView *)view animated:(BOOL)animated {\n\tMBProgressHUD *hud = [[self alloc] initWithView:view];\n\thud.removeFromSuperViewOnHide = YES;\n\t[view addSubview:hud];\n\t[hud show:animated];\n\treturn MB_AUTORELEASE(hud);\n}\n\n+ (BOOL)hideHUDForView:(UIView *)view animated:(BOOL)animated {\n\tMBProgressHUD *hud = [self HUDForView:view];\n\tif (hud != nil) {\n\t\thud.removeFromSuperViewOnHide = YES;\n\t\t[hud hide:animated];\n\t\treturn YES;\n\t}\n\treturn NO;\n}\n\n+ (NSUInteger)hideAllHUDsForView:(UIView *)view animated:(BOOL)animated {\n\tNSArray *huds = [MBProgressHUD allHUDsForView:view];\n\tfor (MBProgressHUD *hud in huds) {\n\t\thud.removeFromSuperViewOnHide = YES;\n\t\t[hud hide:animated];\n\t}\n\treturn [huds count];\n}\n\n+ (MB_INSTANCETYPE)HUDForView:(UIView *)view {\n\tNSEnumerator *subviewsEnum = [view.subviews reverseObjectEnumerator];\n\tfor (UIView *subview in subviewsEnum) {\n\t\tif ([subview isKindOfClass:self]) {\n\t\t\treturn (MBProgressHUD *)subview;\n\t\t}\n\t}\n\treturn nil;\n}\n\n+ (NSArray *)allHUDsForView:(UIView *)view {\n\tNSMutableArray *huds = [NSMutableArray array];\n\tNSArray *subviews = view.subviews;\n\tfor (UIView *aView in subviews) {\n\t\tif ([aView isKindOfClass:self]) {\n\t\t\t[huds addObject:aView];\n\t\t}\n\t}\n\treturn [NSArray arrayWithArray:huds];\n}\n\n#pragma mark - Lifecycle\n\n- (id)initWithFrame:(CGRect)frame {\n\tself = [super initWithFrame:frame];\n\tif (self) {\n\t\t// Set default values for properties\n\t\tself.animationType = MBProgressHUDAnimationFade;\n\t\tself.mode = MBProgressHUDModeIndeterminate;\n\t\tself.labelText = nil;\n\t\tself.detailsLabelText = nil;\n\t\tself.opacity = 0.8f;\n\t\tself.color = nil;\n\t\tself.labelFont = [UIFont boldSystemFontOfSize:kLabelFontSize];\n\t\tself.labelColor = [UIColor whiteColor];\n\t\tself.detailsLabelFont = [UIFont boldSystemFontOfSize:kDetailsLabelFontSize];\n\t\tself.detailsLabelColor = [UIColor whiteColor];\n\t\tself.activityIndicatorColor = [UIColor whiteColor];\n\t\tself.xOffset = 0.0f;\n\t\tself.yOffset = 0.0f;\n\t\tself.dimBackground = NO;\n\t\tself.margin = 20.0f;\n\t\tself.cornerRadius = 10.0f;\n\t\tself.graceTime = 0.0f;\n\t\tself.minShowTime = 0.0f;\n\t\tself.removeFromSuperViewOnHide = NO;\n\t\tself.minSize = CGSizeZero;\n\t\tself.square = NO;\n\t\tself.contentMode = UIViewContentModeCenter;\n\t\tself.autoresizingMask = UIViewAutoresizingFlexibleTopMargin | UIViewAutoresizingFlexibleBottomMargin\n\t\t\t\t\t\t\t\t| UIViewAutoresizingFlexibleLeftMargin | UIViewAutoresizingFlexibleRightMargin;\n\n\t\t// Transparent background\n\t\tself.opaque = NO;\n\t\tself.backgroundColor = [UIColor clearColor];\n\t\t// Make it invisible for now\n\t\tself.alpha = 0.0f;\n\t\t\n\t\ttaskInProgress = NO;\n\t\trotationTransform = CGAffineTransformIdentity;\n\t\t\n\t\t[self setupLabels];\n\t\t[self updateIndicators];\n\t\t[self registerForKVO];\n\t\t[self registerForNotifications];\n\t}\n\treturn self;\n}\n\n- (id)initWithView:(UIView *)view {\n\tNSAssert(view, @\"View must not be nil.\");\n\treturn [self initWithFrame:view.bounds];\n}\n\n- (id)initWithWindow:(UIWindow *)window {\n\treturn [self initWithView:window];\n}\n\n- (void)dealloc {\n\t[self unregisterFromNotifications];\n\t[self unregisterFromKVO];\n#if !__has_feature(objc_arc)\n\t[color release];\n\t[indicator release];\n\t[label release];\n\t[detailsLabel release];\n\t[labelText release];\n\t[detailsLabelText release];\n\t[graceTimer release];\n\t[minShowTimer release];\n\t[showStarted release];\n\t[customView release];\n\t[labelFont release];\n\t[labelColor release];\n\t[detailsLabelFont release];\n\t[detailsLabelColor release];\n#if NS_BLOCKS_AVAILABLE\n\t[completionBlock release];\n#endif\n\t[super dealloc];\n#endif\n}\n\n#pragma mark - Show & hide\n\n- (void)show:(BOOL)animated {\n    NSAssert([NSThread isMainThread], @\"MBProgressHUD needs to be accessed on the main thread.\");\n\tuseAnimation = animated;\n\t// If the grace time is set postpone the HUD display\n\tif (self.graceTime > 0.0) {\n        NSTimer *newGraceTimer = [NSTimer timerWithTimeInterval:self.graceTime target:self selector:@selector(handleGraceTimer:) userInfo:nil repeats:NO];\n        [[NSRunLoop currentRunLoop] addTimer:newGraceTimer forMode:NSRunLoopCommonModes];\n        self.graceTimer = newGraceTimer;\n\t} \n\t// ... otherwise show the HUD imediately \n\telse {\n\t\t[self showUsingAnimation:useAnimation];\n\t}\n}\n\n- (void)hide:(BOOL)animated {\n    NSAssert([NSThread isMainThread], @\"MBProgressHUD needs to be accessed on the main thread.\");\n\tuseAnimation = animated;\n\t// If the minShow time is set, calculate how long the hud was shown,\n\t// and pospone the hiding operation if necessary\n\tif (self.minShowTime > 0.0 && showStarted) {\n\t\tNSTimeInterval interv = [[NSDate date] timeIntervalSinceDate:showStarted];\n\t\tif (interv < self.minShowTime) {\n\t\t\tself.minShowTimer = [NSTimer scheduledTimerWithTimeInterval:(self.minShowTime - interv) target:self \n\t\t\t\t\t\t\t\tselector:@selector(handleMinShowTimer:) userInfo:nil repeats:NO];\n\t\t\treturn;\n\t\t} \n\t}\n\t// ... otherwise hide the HUD immediately\n\t[self hideUsingAnimation:useAnimation];\n}\n\n- (void)hide:(BOOL)animated afterDelay:(NSTimeInterval)delay {\n\t[self performSelector:@selector(hideDelayed:) withObject:[NSNumber numberWithBool:animated] afterDelay:delay];\n}\n\n- (void)hideDelayed:(NSNumber *)animated {\n\t[self hide:[animated boolValue]];\n}\n\n#pragma mark - Timer callbacks\n\n- (void)handleGraceTimer:(NSTimer *)theTimer {\n\t// Show the HUD only if the task is still running\n\tif (taskInProgress) {\n\t\t[self showUsingAnimation:useAnimation];\n\t}\n}\n\n- (void)handleMinShowTimer:(NSTimer *)theTimer {\n\t[self hideUsingAnimation:useAnimation];\n}\n\n#pragma mark - View Hierrarchy\n\n- (void)didMoveToSuperview {\n    [self updateForCurrentOrientationAnimated:NO];\n}\n\n#pragma mark - Internal show & hide operations\n\n- (void)showUsingAnimation:(BOOL)animated {\n    // Cancel any scheduled hideDelayed: calls\n    [NSObject cancelPreviousPerformRequestsWithTarget:self];\n    [self setNeedsDisplay];\n\n\tif (animated && animationType == MBProgressHUDAnimationZoomIn) {\n\t\tself.transform = CGAffineTransformConcat(rotationTransform, CGAffineTransformMakeScale(0.5f, 0.5f));\n\t} else if (animated && animationType == MBProgressHUDAnimationZoomOut) {\n\t\tself.transform = CGAffineTransformConcat(rotationTransform, CGAffineTransformMakeScale(1.5f, 1.5f));\n\t}\n\tself.showStarted = [NSDate date];\n\t// Fade in\n\tif (animated) {\n\t\t[UIView beginAnimations:nil context:NULL];\n\t\t[UIView setAnimationDuration:0.30];\n\t\tself.alpha = 1.0f;\n\t\tif (animationType == MBProgressHUDAnimationZoomIn || animationType == MBProgressHUDAnimationZoomOut) {\n\t\t\tself.transform = rotationTransform;\n\t\t}\n\t\t[UIView commitAnimations];\n\t}\n\telse {\n\t\tself.alpha = 1.0f;\n\t}\n}\n\n- (void)hideUsingAnimation:(BOOL)animated {\n\t// Fade out\n\tif (animated && showStarted) {\n\t\t[UIView beginAnimations:nil context:NULL];\n\t\t[UIView setAnimationDuration:0.30];\n\t\t[UIView setAnimationDelegate:self];\n\t\t[UIView setAnimationDidStopSelector:@selector(animationFinished:finished:context:)];\n\t\t// 0.02 prevents the hud from passing through touches during the animation the hud will get completely hidden\n\t\t// in the done method\n\t\tif (animationType == MBProgressHUDAnimationZoomIn) {\n\t\t\tself.transform = CGAffineTransformConcat(rotationTransform, CGAffineTransformMakeScale(1.5f, 1.5f));\n\t\t} else if (animationType == MBProgressHUDAnimationZoomOut) {\n\t\t\tself.transform = CGAffineTransformConcat(rotationTransform, CGAffineTransformMakeScale(0.5f, 0.5f));\n\t\t}\n\n\t\tself.alpha = 0.02f;\n\t\t[UIView commitAnimations];\n\t}\n\telse {\n\t\tself.alpha = 0.0f;\n\t\t[self done];\n\t}\n\tself.showStarted = nil;\n}\n\n- (void)animationFinished:(NSString *)animationID finished:(BOOL)finished context:(void*)context {\n\t[self done];\n}\n\n- (void)done {\n\t[NSObject cancelPreviousPerformRequestsWithTarget:self];\n\tisFinished = YES;\n\tself.alpha = 0.0f;\n\tif (removeFromSuperViewOnHide) {\n\t\t[self removeFromSuperview];\n\t}\n#if NS_BLOCKS_AVAILABLE\n\tif (self.completionBlock) {\n\t\tself.completionBlock();\n\t\tself.completionBlock = NULL;\n\t}\n#endif\n\tif ([delegate respondsToSelector:@selector(hudWasHidden:)]) {\n\t\t[delegate performSelector:@selector(hudWasHidden:) withObject:self];\n\t}\n}\n\n#pragma mark - Threading\n\n- (void)showWhileExecuting:(SEL)method onTarget:(id)target withObject:(id)object animated:(BOOL)animated {\n\tmethodForExecution = method;\n\ttargetForExecution = MB_RETAIN(target);\n\tobjectForExecution = MB_RETAIN(object);\t\n\t// Launch execution in new thread\n\tself.taskInProgress = YES;\n\t[NSThread detachNewThreadSelector:@selector(launchExecution) toTarget:self withObject:nil];\n\t// Show HUD view\n\t[self show:animated];\n}\n\n#if NS_BLOCKS_AVAILABLE\n\n- (void)showAnimated:(BOOL)animated whileExecutingBlock:(dispatch_block_t)block {\n\tdispatch_queue_t queue = dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0);\n\t[self showAnimated:animated whileExecutingBlock:block onQueue:queue completionBlock:NULL];\n}\n\n- (void)showAnimated:(BOOL)animated whileExecutingBlock:(dispatch_block_t)block completionBlock:(void (^)())completion {\n\tdispatch_queue_t queue = dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0);\n\t[self showAnimated:animated whileExecutingBlock:block onQueue:queue completionBlock:completion];\n}\n\n- (void)showAnimated:(BOOL)animated whileExecutingBlock:(dispatch_block_t)block onQueue:(dispatch_queue_t)queue {\n\t[self showAnimated:animated whileExecutingBlock:block onQueue:queue\tcompletionBlock:NULL];\n}\n\n- (void)showAnimated:(BOOL)animated whileExecutingBlock:(dispatch_block_t)block onQueue:(dispatch_queue_t)queue\n\t completionBlock:(MBProgressHUDCompletionBlock)completion {\n\tself.taskInProgress = YES;\n\tself.completionBlock = completion;\n\tdispatch_async(queue, ^(void) {\n\t\tblock();\n\t\tdispatch_async(dispatch_get_main_queue(), ^(void) {\n\t\t\t[self cleanUp];\n\t\t});\n\t});\n\t[self show:animated];\n}\n\n#endif\n\n- (void)launchExecution {\n\t@autoreleasepool {\n#pragma clang diagnostic push\n#pragma clang diagnostic ignored \"-Warc-performSelector-leaks\"\n\t\t// Start executing the requested task\n\t\t[targetForExecution performSelector:methodForExecution withObject:objectForExecution];\n#pragma clang diagnostic pop\n\t\t// Task completed, update view in main thread (note: view operations should\n\t\t// be done only in the main thread)\n\t\t[self performSelectorOnMainThread:@selector(cleanUp) withObject:nil waitUntilDone:NO];\n\t}\n}\n\n- (void)cleanUp {\n\ttaskInProgress = NO;\n#if !__has_feature(objc_arc)\n\t[targetForExecution release];\n\t[objectForExecution release];\n#else\n\ttargetForExecution = nil;\n\tobjectForExecution = nil;\n#endif\n\t[self hide:useAnimation];\n}\n\n#pragma mark - UI\n\n- (void)setupLabels {\n\tlabel = [[UILabel alloc] initWithFrame:self.bounds];\n\tlabel.adjustsFontSizeToFitWidth = NO;\n\tlabel.textAlignment = MBLabelAlignmentCenter;\n\tlabel.opaque = NO;\n\tlabel.backgroundColor = [UIColor clearColor];\n\tlabel.textColor = self.labelColor;\n\tlabel.font = self.labelFont;\n\tlabel.text = self.labelText;\n\t[self addSubview:label];\n\t\n\tdetailsLabel = [[UILabel alloc] initWithFrame:self.bounds];\n\tdetailsLabel.font = self.detailsLabelFont;\n\tdetailsLabel.adjustsFontSizeToFitWidth = NO;\n\tdetailsLabel.textAlignment = MBLabelAlignmentCenter;\n\tdetailsLabel.opaque = NO;\n\tdetailsLabel.backgroundColor = [UIColor clearColor];\n\tdetailsLabel.textColor = self.detailsLabelColor;\n\tdetailsLabel.numberOfLines = 0;\n\tdetailsLabel.font = self.detailsLabelFont;\n\tdetailsLabel.text = self.detailsLabelText;\n\t[self addSubview:detailsLabel];\n}\n\n- (void)updateIndicators {\n\t\n\tBOOL isActivityIndicator = [indicator isKindOfClass:[UIActivityIndicatorView class]];\n\tBOOL isRoundIndicator = [indicator isKindOfClass:[MBRoundProgressView class]];\n\t\n\tif (mode == MBProgressHUDModeIndeterminate) {\n\t\tif (!isActivityIndicator) {\n\t\t\t// Update to indeterminate indicator\n\t\t\t[indicator removeFromSuperview];\n\t\t\tself.indicator = MB_AUTORELEASE([[UIActivityIndicatorView alloc]\n\t\t\t\t\t\t\t\t\t\t\t initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleWhiteLarge]);\n\t\t\t[(UIActivityIndicatorView *)indicator startAnimating];\n\t\t\t[self addSubview:indicator];\n\t\t}\n#if __IPHONE_OS_VERSION_MIN_REQUIRED >= 50000\n\t\t[(UIActivityIndicatorView *)indicator setColor:self.activityIndicatorColor];\n#endif\n\t}\n\telse if (mode == MBProgressHUDModeDeterminateHorizontalBar) {\n\t\t// Update to bar determinate indicator\n\t\t[indicator removeFromSuperview];\n\t\tself.indicator = MB_AUTORELEASE([[MBBarProgressView alloc] init]);\n\t\t[self addSubview:indicator];\n\t}\n\telse if (mode == MBProgressHUDModeDeterminate || mode == MBProgressHUDModeAnnularDeterminate) {\n\t\tif (!isRoundIndicator) {\n\t\t\t// Update to determinante indicator\n\t\t\t[indicator removeFromSuperview];\n\t\t\tself.indicator = MB_AUTORELEASE([[MBRoundProgressView alloc] init]);\n\t\t\t[self addSubview:indicator];\n\t\t}\n\t\tif (mode == MBProgressHUDModeAnnularDeterminate) {\n\t\t\t[(MBRoundProgressView *)indicator setAnnular:YES];\n\t\t}\n\t\t[(MBRoundProgressView *)indicator setProgressTintColor:self.activityIndicatorColor];\n\t\t[(MBRoundProgressView *)indicator setBackgroundTintColor:[self.activityIndicatorColor colorWithAlphaComponent:0.1f]];\n\t}\n\telse if (mode == MBProgressHUDModeCustomView && customView != indicator) {\n\t\t// Update custom view indicator\n\t\t[indicator removeFromSuperview];\n\t\tself.indicator = customView;\n\t\t[self addSubview:indicator];\n\t} else if (mode == MBProgressHUDModeText) {\n\t\t[indicator removeFromSuperview];\n\t\tself.indicator = nil;\n\t}\n}\n\n#pragma mark - Layout\n\n- (void)layoutSubviews {\n\t[super layoutSubviews];\n\t\n\t// Entirely cover the parent view\n\tUIView *parent = self.superview;\n\tif (parent) {\n\t\tself.frame = parent.bounds;\n\t}\n\tCGRect bounds = self.bounds;\n\t\n\t// Determine the total width and height needed\n\tCGFloat maxWidth = bounds.size.width - 4 * margin;\n\tCGSize totalSize = CGSizeZero;\n\t\n\tCGRect indicatorF = indicator.bounds;\n\tindicatorF.size.width = MIN(indicatorF.size.width, maxWidth);\n\ttotalSize.width = MAX(totalSize.width, indicatorF.size.width);\n\ttotalSize.height += indicatorF.size.height;\n\t\n\tCGSize labelSize = MB_TEXTSIZE(label.text, label.font);\n\tlabelSize.width = MIN(labelSize.width, maxWidth);\n\ttotalSize.width = MAX(totalSize.width, labelSize.width);\n\ttotalSize.height += labelSize.height;\n\tif (labelSize.height > 0.f && indicatorF.size.height > 0.f) {\n\t\ttotalSize.height += kPadding;\n\t}\n\n\tCGFloat remainingHeight = bounds.size.height - totalSize.height - kPadding - 4 * margin; \n\tCGSize maxSize = CGSizeMake(maxWidth, remainingHeight);\n\tCGSize detailsLabelSize = MB_MULTILINE_TEXTSIZE(detailsLabel.text, detailsLabel.font, maxSize, detailsLabel.lineBreakMode);\n\ttotalSize.width = MAX(totalSize.width, detailsLabelSize.width);\n\ttotalSize.height += detailsLabelSize.height;\n\tif (detailsLabelSize.height > 0.f && (indicatorF.size.height > 0.f || labelSize.height > 0.f)) {\n\t\ttotalSize.height += kPadding;\n\t}\n\t\n\ttotalSize.width += 2 * margin;\n\ttotalSize.height += 2 * margin;\n\t\n\t// Position elements\n\tCGFloat yPos = round(((bounds.size.height - totalSize.height) / 2)) + margin + yOffset;\n\tCGFloat xPos = xOffset;\n\tindicatorF.origin.y = yPos;\n\tindicatorF.origin.x = round((bounds.size.width - indicatorF.size.width) / 2) + xPos;\n\tindicator.frame = indicatorF;\n\tyPos += indicatorF.size.height;\n\t\n\tif (labelSize.height > 0.f && indicatorF.size.height > 0.f) {\n\t\tyPos += kPadding;\n\t}\n\tCGRect labelF;\n\tlabelF.origin.y = yPos;\n\tlabelF.origin.x = round((bounds.size.width - labelSize.width) / 2) + xPos;\n\tlabelF.size = labelSize;\n\tlabel.frame = labelF;\n\tyPos += labelF.size.height;\n\t\n\tif (detailsLabelSize.height > 0.f && (indicatorF.size.height > 0.f || labelSize.height > 0.f)) {\n\t\tyPos += kPadding;\n\t}\n\tCGRect detailsLabelF;\n\tdetailsLabelF.origin.y = yPos;\n\tdetailsLabelF.origin.x = round((bounds.size.width - detailsLabelSize.width) / 2) + xPos;\n\tdetailsLabelF.size = detailsLabelSize;\n\tdetailsLabel.frame = detailsLabelF;\n\t\n\t// Enforce minsize and quare rules\n\tif (square) {\n\t\tCGFloat max = MAX(totalSize.width, totalSize.height);\n\t\tif (max <= bounds.size.width - 2 * margin) {\n\t\t\ttotalSize.width = max;\n\t\t}\n\t\tif (max <= bounds.size.height - 2 * margin) {\n\t\t\ttotalSize.height = max;\n\t\t}\n\t}\n\tif (totalSize.width < minSize.width) {\n\t\ttotalSize.width = minSize.width;\n\t} \n\tif (totalSize.height < minSize.height) {\n\t\ttotalSize.height = minSize.height;\n\t}\n\t\n\tsize = totalSize;\n}\n\n#pragma mark BG Drawing\n\n- (void)drawRect:(CGRect)rect {\n\t\n\tCGContextRef context = UIGraphicsGetCurrentContext();\n\tUIGraphicsPushContext(context);\n\n\tif (self.dimBackground) {\n\t\t//Gradient colours\n\t\tsize_t gradLocationsNum = 2;\n\t\tCGFloat gradLocations[2] = {0.0f, 1.0f};\n\t\tCGFloat gradColors[8] = {0.0f,0.0f,0.0f,0.0f,0.0f,0.0f,0.0f,0.75f}; \n\t\tCGColorSpaceRef colorSpace = CGColorSpaceCreateDeviceRGB();\n\t\tCGGradientRef gradient = CGGradientCreateWithColorComponents(colorSpace, gradColors, gradLocations, gradLocationsNum);\n\t\tCGColorSpaceRelease(colorSpace);\n\t\t//Gradient center\n\t\tCGPoint gradCenter= CGPointMake(self.bounds.size.width/2, self.bounds.size.height/2);\n\t\t//Gradient radius\n\t\tfloat gradRadius = MIN(self.bounds.size.width , self.bounds.size.height) ;\n\t\t//Gradient draw\n\t\tCGContextDrawRadialGradient (context, gradient, gradCenter,\n\t\t\t\t\t\t\t\t\t 0, gradCenter, gradRadius,\n\t\t\t\t\t\t\t\t\t kCGGradientDrawsAfterEndLocation);\n\t\tCGGradientRelease(gradient);\n\t}\n\n\t// Set background rect color\n\tif (self.color) {\n\t\tCGContextSetFillColorWithColor(context, self.color.CGColor);\n\t} else {\n\t\tCGContextSetGrayFillColor(context, 0.0f, self.opacity);\n\t}\n\n\t\n\t// Center HUD\n\tCGRect allRect = self.bounds;\n\t// Draw rounded HUD backgroud rect\n\tCGRect boxRect = CGRectMake(round((allRect.size.width - size.width) / 2) + self.xOffset,\n\t\t\t\t\t\t\t\tround((allRect.size.height - size.height) / 2) + self.yOffset, size.width, size.height);\n\tfloat radius = self.cornerRadius;\n\tCGContextBeginPath(context);\n\tCGContextMoveToPoint(context, CGRectGetMinX(boxRect) + radius, CGRectGetMinY(boxRect));\n\tCGContextAddArc(context, CGRectGetMaxX(boxRect) - radius, CGRectGetMinY(boxRect) + radius, radius, 3 * (float)M_PI / 2, 0, 0);\n\tCGContextAddArc(context, CGRectGetMaxX(boxRect) - radius, CGRectGetMaxY(boxRect) - radius, radius, 0, (float)M_PI / 2, 0);\n\tCGContextAddArc(context, CGRectGetMinX(boxRect) + radius, CGRectGetMaxY(boxRect) - radius, radius, (float)M_PI / 2, (float)M_PI, 0);\n\tCGContextAddArc(context, CGRectGetMinX(boxRect) + radius, CGRectGetMinY(boxRect) + radius, radius, (float)M_PI, 3 * (float)M_PI / 2, 0);\n\tCGContextClosePath(context);\n\tCGContextFillPath(context);\n\n\tUIGraphicsPopContext();\n}\n\n#pragma mark - KVO\n\n- (void)registerForKVO {\n\tfor (NSString *keyPath in [self observableKeypaths]) {\n\t\t[self addObserver:self forKeyPath:keyPath options:NSKeyValueObservingOptionNew context:NULL];\n\t}\n}\n\n- (void)unregisterFromKVO {\n\tfor (NSString *keyPath in [self observableKeypaths]) {\n\t\t[self removeObserver:self forKeyPath:keyPath];\n\t}\n}\n\n- (NSArray *)observableKeypaths {\n\treturn [NSArray arrayWithObjects:@\"mode\", @\"customView\", @\"labelText\", @\"labelFont\", @\"labelColor\",\n\t\t\t@\"detailsLabelText\", @\"detailsLabelFont\", @\"detailsLabelColor\", @\"progress\", @\"activityIndicatorColor\", nil];\n}\n\n- (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary *)change context:(void *)context {\n\tif (![NSThread isMainThread]) {\n\t\t[self performSelectorOnMainThread:@selector(updateUIForKeypath:) withObject:keyPath waitUntilDone:NO];\n\t} else {\n\t\t[self updateUIForKeypath:keyPath];\n\t}\n}\n\n- (void)updateUIForKeypath:(NSString *)keyPath {\n\tif ([keyPath isEqualToString:@\"mode\"] || [keyPath isEqualToString:@\"customView\"] ||\n\t\t[keyPath isEqualToString:@\"activityIndicatorColor\"]) {\n\t\t[self updateIndicators];\n\t} else if ([keyPath isEqualToString:@\"labelText\"]) {\n\t\tlabel.text = self.labelText;\n\t} else if ([keyPath isEqualToString:@\"labelFont\"]) {\n\t\tlabel.font = self.labelFont;\n\t} else if ([keyPath isEqualToString:@\"labelColor\"]) {\n\t\tlabel.textColor = self.labelColor;\n\t} else if ([keyPath isEqualToString:@\"detailsLabelText\"]) {\n\t\tdetailsLabel.text = self.detailsLabelText;\n\t} else if ([keyPath isEqualToString:@\"detailsLabelFont\"]) {\n\t\tdetailsLabel.font = self.detailsLabelFont;\n\t} else if ([keyPath isEqualToString:@\"detailsLabelColor\"]) {\n\t\tdetailsLabel.textColor = self.detailsLabelColor;\n\t} else if ([keyPath isEqualToString:@\"progress\"]) {\n\t\tif ([indicator respondsToSelector:@selector(setProgress:)]) {\n\t\t\t[(id)indicator setValue:@(progress) forKey:@\"progress\"];\n\t\t}\n\t\treturn;\n\t}\n\t[self setNeedsLayout];\n\t[self setNeedsDisplay];\n}\n\n#pragma mark - Notifications\n\n- (void)registerForNotifications {\n#if !TARGET_OS_TV\n\tNSNotificationCenter *nc = [NSNotificationCenter defaultCenter];\n\n\t[nc addObserver:self selector:@selector(statusBarOrientationDidChange:)\n               name:UIApplicationDidChangeStatusBarOrientationNotification object:nil];\n#endif\n}\n\n- (void)unregisterFromNotifications {\n#if !TARGET_OS_TV\n\tNSNotificationCenter *nc = [NSNotificationCenter defaultCenter];\n    [nc removeObserver:self name:UIApplicationDidChangeStatusBarOrientationNotification object:nil];\n#endif\n}\n\n#if !TARGET_OS_TV\n- (void)statusBarOrientationDidChange:(NSNotification *)notification {\n\tUIView *superview = self.superview;\n\tif (!superview) {\n\t\treturn;\n\t} else {\n\t\t[self updateForCurrentOrientationAnimated:YES];\n\t}\n}\n#endif\n\n- (void)updateForCurrentOrientationAnimated:(BOOL)animated {\n    // Stay in sync with the superview in any case\n    if (self.superview) {\n        self.bounds = self.superview.bounds;\n        [self setNeedsDisplay];\n    }\n\n    // Not needed on iOS 8+, compile out when the deployment target allows,\n    // to avoid sharedApplication problems on extension targets\n#if __IPHONE_OS_VERSION_MIN_REQUIRED < 80000\n    // Only needed pre iOS 7 when added to a window\n    BOOL iOS8OrLater = kCFCoreFoundationVersionNumber >= kCFCoreFoundationVersionNumber_iOS_8_0;\n    if (iOS8OrLater || ![self.superview isKindOfClass:[UIWindow class]]) return;\n\n\tUIInterfaceOrientation orientation = [UIApplication sharedApplication].statusBarOrientation;\n\tCGFloat radians = 0;\n\tif (UIInterfaceOrientationIsLandscape(orientation)) {\n\t\tif (orientation == UIInterfaceOrientationLandscapeLeft) { radians = -(CGFloat)M_PI_2; } \n\t\telse { radians = (CGFloat)M_PI_2; }\n\t\t// Window coordinates differ!\n\t\tself.bounds = CGRectMake(0, 0, self.bounds.size.height, self.bounds.size.width);\n\t} else {\n\t\tif (orientation == UIInterfaceOrientationPortraitUpsideDown) { radians = (CGFloat)M_PI; } \n\t\telse { radians = 0; }\n\t}\n\trotationTransform = CGAffineTransformMakeRotation(radians);\n\t\n\tif (animated) {\n\t\t[UIView beginAnimations:nil context:nil];\n\t\t[UIView setAnimationDuration:0.3];\n\t}\n\t[self setTransform:rotationTransform];\n\tif (animated) {\n\t\t[UIView commitAnimations];\n\t}\n#endif\n}\n\n@end\n\n\n@implementation MBRoundProgressView\n\n#pragma mark - Lifecycle\n\n- (id)init {\n\treturn [self initWithFrame:CGRectMake(0.f, 0.f, 37.f, 37.f)];\n}\n\n- (id)initWithFrame:(CGRect)frame {\n\tself = [super initWithFrame:frame];\n\tif (self) {\n\t\tself.backgroundColor = [UIColor clearColor];\n\t\tself.opaque = NO;\n\t\t_progress = 0.f;\n\t\t_annular = NO;\n\t\t_progressTintColor = [[UIColor alloc] initWithWhite:1.f alpha:1.f];\n\t\t_backgroundTintColor = [[UIColor alloc] initWithWhite:1.f alpha:.1f];\n\t\t[self registerForKVO];\n\t}\n\treturn self;\n}\n\n- (void)dealloc {\n\t[self unregisterFromKVO];\n#if !__has_feature(objc_arc)\n\t[_progressTintColor release];\n\t[_backgroundTintColor release];\n\t[super dealloc];\n#endif\n}\n\n#pragma mark - Drawing\n\n- (void)drawRect:(CGRect)rect {\n\t\n\tCGRect allRect = self.bounds;\n\tCGRect circleRect = CGRectInset(allRect, 2.0f, 2.0f);\n\tCGContextRef context = UIGraphicsGetCurrentContext();\n\t\n\tif (_annular) {\n\t\t// Draw background\n\t\tBOOL isPreiOS7 = kCFCoreFoundationVersionNumber < kCFCoreFoundationVersionNumber_iOS_7_0;\n\t\tCGFloat lineWidth = isPreiOS7 ? 5.f : 2.f;\n\t\tUIBezierPath *processBackgroundPath = [UIBezierPath bezierPath];\n\t\tprocessBackgroundPath.lineWidth = lineWidth;\n\t\tprocessBackgroundPath.lineCapStyle = kCGLineCapButt;\n\t\tCGPoint center = CGPointMake(self.bounds.size.width/2, self.bounds.size.height/2);\n\t\tCGFloat radius = (self.bounds.size.width - lineWidth)/2;\n\t\tCGFloat startAngle = - ((float)M_PI / 2); // 90 degrees\n\t\tCGFloat endAngle = (2 * (float)M_PI) + startAngle;\n\t\t[processBackgroundPath addArcWithCenter:center radius:radius startAngle:startAngle endAngle:endAngle clockwise:YES];\n\t\t[_backgroundTintColor set];\n\t\t[processBackgroundPath stroke];\n\t\t// Draw progress\n\t\tUIBezierPath *processPath = [UIBezierPath bezierPath];\n\t\tprocessPath.lineCapStyle = isPreiOS7 ? kCGLineCapRound : kCGLineCapSquare;\n\t\tprocessPath.lineWidth = lineWidth;\n\t\tendAngle = (self.progress * 2 * (float)M_PI) + startAngle;\n\t\t[processPath addArcWithCenter:center radius:radius startAngle:startAngle endAngle:endAngle clockwise:YES];\n\t\t[_progressTintColor set];\n\t\t[processPath stroke];\n\t} else {\n\t\t// Draw background\n\t\t[_progressTintColor setStroke];\n\t\t[_backgroundTintColor setFill];\n\t\tCGContextSetLineWidth(context, 2.0f);\n\t\tCGContextFillEllipseInRect(context, circleRect);\n\t\tCGContextStrokeEllipseInRect(context, circleRect);\n\t\t// Draw progress\n\t\tCGPoint center = CGPointMake(allRect.size.width / 2, allRect.size.height / 2);\n\t\tCGFloat radius = (allRect.size.width - 4) / 2;\n\t\tCGFloat startAngle = - ((float)M_PI / 2); // 90 degrees\n\t\tCGFloat endAngle = (self.progress * 2 * (float)M_PI) + startAngle;\n\t\t[_progressTintColor setFill];\n\t\tCGContextMoveToPoint(context, center.x, center.y);\n\t\tCGContextAddArc(context, center.x, center.y, radius, startAngle, endAngle, 0);\n\t\tCGContextClosePath(context);\n\t\tCGContextFillPath(context);\n\t}\n}\n\n#pragma mark - KVO\n\n- (void)registerForKVO {\n\tfor (NSString *keyPath in [self observableKeypaths]) {\n\t\t[self addObserver:self forKeyPath:keyPath options:NSKeyValueObservingOptionNew context:NULL];\n\t}\n}\n\n- (void)unregisterFromKVO {\n\tfor (NSString *keyPath in [self observableKeypaths]) {\n\t\t[self removeObserver:self forKeyPath:keyPath];\n\t}\n}\n\n- (NSArray *)observableKeypaths {\n\treturn [NSArray arrayWithObjects:@\"progressTintColor\", @\"backgroundTintColor\", @\"progress\", @\"annular\", nil];\n}\n\n- (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary *)change context:(void *)context {\n\t[self setNeedsDisplay];\n}\n\n@end\n\n\n@implementation MBBarProgressView\n\n#pragma mark - Lifecycle\n\n- (id)init {\n\treturn [self initWithFrame:CGRectMake(.0f, .0f, 120.0f, 20.0f)];\n}\n\n- (id)initWithFrame:(CGRect)frame {\n\tself = [super initWithFrame:frame];\n\tif (self) {\n\t\t_progress = 0.f;\n\t\t_lineColor = [UIColor whiteColor];\n\t\t_progressColor = [UIColor whiteColor];\n\t\t_progressRemainingColor = [UIColor clearColor];\n\t\tself.backgroundColor = [UIColor clearColor];\n\t\tself.opaque = NO;\n\t\t[self registerForKVO];\n\t}\n\treturn self;\n}\n\n- (void)dealloc {\n\t[self unregisterFromKVO];\n#if !__has_feature(objc_arc)\n\t[_lineColor release];\n\t[_progressColor release];\n\t[_progressRemainingColor release];\n\t[super dealloc];\n#endif\n}\n\n#pragma mark - Drawing\n\n- (void)drawRect:(CGRect)rect {\n\tCGContextRef context = UIGraphicsGetCurrentContext();\n\t\n\tCGContextSetLineWidth(context, 2);\n\tCGContextSetStrokeColorWithColor(context,[_lineColor CGColor]);\n\tCGContextSetFillColorWithColor(context, [_progressRemainingColor CGColor]);\n\t\n\t// Draw background\n\tfloat radius = (rect.size.height / 2) - 2;\n\tCGContextMoveToPoint(context, 2, rect.size.height/2);\n\tCGContextAddArcToPoint(context, 2, 2, radius + 2, 2, radius);\n\tCGContextAddLineToPoint(context, rect.size.width - radius - 2, 2);\n\tCGContextAddArcToPoint(context, rect.size.width - 2, 2, rect.size.width - 2, rect.size.height / 2, radius);\n\tCGContextAddArcToPoint(context, rect.size.width - 2, rect.size.height - 2, rect.size.width - radius - 2, rect.size.height - 2, radius);\n\tCGContextAddLineToPoint(context, radius + 2, rect.size.height - 2);\n\tCGContextAddArcToPoint(context, 2, rect.size.height - 2, 2, rect.size.height/2, radius);\n\tCGContextFillPath(context);\n\t\n\t// Draw border\n\tCGContextMoveToPoint(context, 2, rect.size.height/2);\n\tCGContextAddArcToPoint(context, 2, 2, radius + 2, 2, radius);\n\tCGContextAddLineToPoint(context, rect.size.width - radius - 2, 2);\n\tCGContextAddArcToPoint(context, rect.size.width - 2, 2, rect.size.width - 2, rect.size.height / 2, radius);\n\tCGContextAddArcToPoint(context, rect.size.width - 2, rect.size.height - 2, rect.size.width - radius - 2, rect.size.height - 2, radius);\n\tCGContextAddLineToPoint(context, radius + 2, rect.size.height - 2);\n\tCGContextAddArcToPoint(context, 2, rect.size.height - 2, 2, rect.size.height/2, radius);\n\tCGContextStrokePath(context);\n\t\n\tCGContextSetFillColorWithColor(context, [_progressColor CGColor]);\n\tradius = radius - 2;\n\tfloat amount = self.progress * rect.size.width;\n\t\n\t// Progress in the middle area\n\tif (amount >= radius + 4 && amount <= (rect.size.width - radius - 4)) {\n\t\tCGContextMoveToPoint(context, 4, rect.size.height/2);\n\t\tCGContextAddArcToPoint(context, 4, 4, radius + 4, 4, radius);\n\t\tCGContextAddLineToPoint(context, amount, 4);\n\t\tCGContextAddLineToPoint(context, amount, radius + 4);\n\t\t\n\t\tCGContextMoveToPoint(context, 4, rect.size.height/2);\n\t\tCGContextAddArcToPoint(context, 4, rect.size.height - 4, radius + 4, rect.size.height - 4, radius);\n\t\tCGContextAddLineToPoint(context, amount, rect.size.height - 4);\n\t\tCGContextAddLineToPoint(context, amount, radius + 4);\n\t\t\n\t\tCGContextFillPath(context);\n\t}\n\t\n\t// Progress in the right arc\n\telse if (amount > radius + 4) {\n\t\tfloat x = amount - (rect.size.width - radius - 4);\n\n\t\tCGContextMoveToPoint(context, 4, rect.size.height/2);\n\t\tCGContextAddArcToPoint(context, 4, 4, radius + 4, 4, radius);\n\t\tCGContextAddLineToPoint(context, rect.size.width - radius - 4, 4);\n\t\tfloat angle = -acos(x/radius);\n\t\tif (isnan(angle)) angle = 0;\n\t\tCGContextAddArc(context, rect.size.width - radius - 4, rect.size.height/2, radius, M_PI, angle, 0);\n\t\tCGContextAddLineToPoint(context, amount, rect.size.height/2);\n\n\t\tCGContextMoveToPoint(context, 4, rect.size.height/2);\n\t\tCGContextAddArcToPoint(context, 4, rect.size.height - 4, radius + 4, rect.size.height - 4, radius);\n\t\tCGContextAddLineToPoint(context, rect.size.width - radius - 4, rect.size.height - 4);\n\t\tangle = acos(x/radius);\n\t\tif (isnan(angle)) angle = 0;\n\t\tCGContextAddArc(context, rect.size.width - radius - 4, rect.size.height/2, radius, -M_PI, angle, 1);\n\t\tCGContextAddLineToPoint(context, amount, rect.size.height/2);\n\t\t\n\t\tCGContextFillPath(context);\n\t}\n\t\n\t// Progress is in the left arc\n\telse if (amount < radius + 4 && amount > 0) {\n\t\tCGContextMoveToPoint(context, 4, rect.size.height/2);\n\t\tCGContextAddArcToPoint(context, 4, 4, radius + 4, 4, radius);\n\t\tCGContextAddLineToPoint(context, radius + 4, rect.size.height/2);\n\n\t\tCGContextMoveToPoint(context, 4, rect.size.height/2);\n\t\tCGContextAddArcToPoint(context, 4, rect.size.height - 4, radius + 4, rect.size.height - 4, radius);\n\t\tCGContextAddLineToPoint(context, radius + 4, rect.size.height/2);\n\t\t\n\t\tCGContextFillPath(context);\n\t}\n}\n\n#pragma mark - KVO\n\n- (void)registerForKVO {\n\tfor (NSString *keyPath in [self observableKeypaths]) {\n\t\t[self addObserver:self forKeyPath:keyPath options:NSKeyValueObservingOptionNew context:NULL];\n\t}\n}\n\n- (void)unregisterFromKVO {\n\tfor (NSString *keyPath in [self observableKeypaths]) {\n\t\t[self removeObserver:self forKeyPath:keyPath];\n\t}\n}\n\n- (NSArray *)observableKeypaths {\n\treturn [NSArray arrayWithObjects:@\"lineColor\", @\"progressRemainingColor\", @\"progressColor\", @\"progress\", nil];\n}\n\n- (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary *)change context:(void *)context {\n\t[self setNeedsDisplay];\n}\n\n@end\n"
  },
  {
    "path": "Pods/MBProgressHUD/README.mdown",
    "content": "# MBProgressHUD [![Build Status](https://travis-ci.org/matej/MBProgressHUD.svg?branch=master)](https://travis-ci.org/matej/MBProgressHUD)\n\nMBProgressHUD is an iOS drop-in class that displays a translucent HUD with an indicator and/or labels while work is being done in a background thread. The HUD is meant as a replacement for the undocumented, private UIKit UIProgressHUD with some additional features. \n\n[![](http://dl.dropbox.com/u/378729/MBProgressHUD/1-thumb.png)](http://dl.dropbox.com/u/378729/MBProgressHUD/1.png)\n[![](http://dl.dropbox.com/u/378729/MBProgressHUD/2-thumb.png)](http://dl.dropbox.com/u/378729/MBProgressHUD/2.png)\n[![](http://dl.dropbox.com/u/378729/MBProgressHUD/3-thumb.png)](http://dl.dropbox.com/u/378729/MBProgressHUD/3.png)\n[![](http://dl.dropbox.com/u/378729/MBProgressHUD/4-thumb.png)](http://dl.dropbox.com/u/378729/MBProgressHUD/4.png)\n[![](http://dl.dropbox.com/u/378729/MBProgressHUD/5-thumb.png)](http://dl.dropbox.com/u/378729/MBProgressHUD/5.png)\n[![](http://dl.dropbox.com/u/378729/MBProgressHUD/6-thumb.png)](http://dl.dropbox.com/u/378729/MBProgressHUD/6.png)\n[![](http://dl.dropbox.com/u/378729/MBProgressHUD/7-thumb.png)](http://dl.dropbox.com/u/378729/MBProgressHUD/7.png)\n\n## Requirements\n\nMBProgressHUD works on any iOS version and is compatible with both ARC and non-ARC projects. It depends on the following Apple frameworks, which should already be included with most Xcode templates:\n\n* Foundation.framework\n* UIKit.framework\n* CoreGraphics.framework\n\nYou will need the latest developer tools in order to build MBProgressHUD. Old Xcode versions might work, but compatibility will not be explicitly maintained.\n\n## Adding MBProgressHUD to your project\n\n### Cocoapods\n\n[CocoaPods](http://cocoapods.org) is the recommended way to add MBProgressHUD to your project.\n\n1. Add a pod entry for MBProgressHUD to your Podfile `pod 'MBProgressHUD', '~> 0.9.2'`\n2. Install the pod(s) by running `pod install`.\n3. Include MBProgressHUD wherever you need it with `#import \"MBProgressHUD.h\"`.\n\n### Source files\n\nAlternatively you can directly add the `MBProgressHUD.h` and `MBProgressHUD.m` source files to your project.\n\n1. Download the [latest code version](https://github.com/matej/MBProgressHUD/archive/master.zip) or add the repository as a git submodule to your git-tracked project. \n2. Open your project in Xcode, then drag and drop `MBProgressHUD.h` and `MBProgressHUD.m` onto your project (use the \"Product Navigator view\"). Make sure to select Copy items when asked if you extracted the code archive outside of your project. \n3. Include MBProgressHUD wherever you need it with `#import \"MBProgressHUD.h\"`.\n\n### Static library\n\nYou can also add MBProgressHUD as a static library to your project or workspace. \n\n1. Download the [latest code version](https://github.com/matej/MBProgressHUD/downloads) or add the repository as a git submodule to your git-tracked project. \n2. Open your project in Xcode, then drag and drop `MBProgressHUD.xcodeproj` onto your project or workspace (use the \"Product Navigator view\"). \n3. Select your target and go to the Build phases tab. In the Link Binary With Libraries section select the add button. On the sheet find and add `libMBProgressHUD.a`. You might also need to add `MBProgressHUD` to the Target Dependencies list. \n4. Include MBProgressHUD wherever you need it with `#import <MBProgressHUD/MBProgressHUD.h>`.\n\n## Usage\n\nThe main guideline you need to follow when dealing with MBProgressHUD while running long-running tasks is keeping the main thread work-free, so the UI can be updated promptly. The recommended way of using MBProgressHUD is therefore to set it up on the main thread and then spinning the task, that you want to perform, off onto a new thread. \n\n```objective-c\n[MBProgressHUD showHUDAddedTo:self.view animated:YES];\ndispatch_async(dispatch_get_global_queue( DISPATCH_QUEUE_PRIORITY_LOW, 0), ^{\n\t// Do something...\n\tdispatch_async(dispatch_get_main_queue(), ^{\n\t\t[MBProgressHUD hideHUDForView:self.view animated:YES];\n\t});\n});\n```\n\nIf you need to configure the HUD you can do this by using the MBProgressHUD reference that showHUDAddedTo:animated: returns. \n\n```objective-c\nMBProgressHUD *hud = [MBProgressHUD showHUDAddedTo:self.view animated:YES];\nhud.mode = MBProgressHUDModeAnnularDeterminate;\nhud.labelText = @\"Loading\";\n[self doSomethingInBackgroundWithProgressCallback:^(float progress) {\n\thud.progress = progress;\n} completionCallback:^{\n\t[hud hide:YES];\n}];\n```\n\nUI updates should always be done on the main thread. Some MBProgressHUD setters are however considered \"thread safe\" and can be called from background threads. Those also include `setMode:`, `setCustomView:`, `setLabelText:`, `setLabelFont:`, `setDetailsLabelText:`, `setDetailsLabelFont:` and `setProgress:`.\n\nIf you need to run your long-running task in the main thread, you should perform it with a slight delay, so UIKit will have enough time to update the UI (i.e., draw the HUD) before you block the main thread with your task.\n\n```objective-c\n[MBProgressHUD showHUDAddedTo:self.view animated:YES];\ndispatch_time_t popTime = dispatch_time(DISPATCH_TIME_NOW, 0.01 * NSEC_PER_SEC);\ndispatch_after(popTime, dispatch_get_main_queue(), ^(void){\n\t// Do something...\n\t[MBProgressHUD hideHUDForView:self.view animated:YES];\n});\n```\n\nYou should be aware that any HUD updates issued inside the above block won't be displayed until the block completes.\n\nFor more examples, including how to use MBProgressHUD with asynchronous operations such as NSURLConnection, take a look at the bundled demo project. Extensive API documentation is provided in the header file (MBProgressHUD.h).\n\n\n## License\n\nThis code is distributed under the terms and conditions of the [MIT license](LICENSE). \n\n## Change-log\n\nA brief summary of each MBProgressHUD release can be found on the [wiki](https://github.com/matej/MBProgressHUD/wiki/Change-log). \n"
  },
  {
    "path": "Pods/OpenSSL-Universal/LICENSE.txt",
    "content": "\n  LICENSE ISSUES\n  ==============\n\n  The OpenSSL toolkit stays under a dual license, i.e. both the conditions of\n  the OpenSSL License and the original SSLeay license apply to the toolkit.\n  See below for the actual license texts. Actually both licenses are BSD-style\n  Open Source licenses. In case of any license issues related to OpenSSL\n  please contact openssl-core@openssl.org.\n\n  OpenSSL License\n  ---------------\n\n/* ====================================================================\n * Copyright (c) 1998-2008 The OpenSSL Project.  All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n *\n * 1. Redistributions of source code must retain the above copyright\n *    notice, this list of conditions and the following disclaimer. \n *\n * 2. Redistributions in binary form must reproduce the above copyright\n *    notice, this list of conditions and the following disclaimer in\n *    the documentation and/or other materials provided with the\n *    distribution.\n *\n * 3. All advertising materials mentioning features or use of this\n *    software must display the following acknowledgment:\n *    \"This product includes software developed by the OpenSSL Project\n *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)\"\n *\n * 4. The names \"OpenSSL Toolkit\" and \"OpenSSL Project\" must not be used to\n *    endorse or promote products derived from this software without\n *    prior written permission. For written permission, please contact\n *    openssl-core@openssl.org.\n *\n * 5. Products derived from this software may not be called \"OpenSSL\"\n *    nor may \"OpenSSL\" appear in their names without prior written\n *    permission of the OpenSSL Project.\n *\n * 6. Redistributions of any form whatsoever must retain the following\n *    acknowledgment:\n *    \"This product includes software developed by the OpenSSL Project\n *    for use in the OpenSSL Toolkit (http://www.openssl.org/)\"\n *\n * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY\n * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\n * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR\n * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,\n * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED\n * OF THE POSSIBILITY OF SUCH DAMAGE.\n * ====================================================================\n *\n * This product includes cryptographic software written by Eric Young\n * (eay@cryptsoft.com).  This product includes software written by Tim\n * Hudson (tjh@cryptsoft.com).\n *\n */\n\n Original SSLeay License\n -----------------------\n\n/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)\n * All rights reserved.\n *\n * This package is an SSL implementation written\n * by Eric Young (eay@cryptsoft.com).\n * The implementation was written so as to conform with Netscapes SSL.\n * \n * This library is free for commercial and non-commercial use as long as\n * the following conditions are aheared to.  The following conditions\n * apply to all code found in this distribution, be it the RC4, RSA,\n * lhash, DES, etc., code; not just the SSL code.  The SSL documentation\n * included with this distribution is covered by the same copyright terms\n * except that the holder is Tim Hudson (tjh@cryptsoft.com).\n * \n * Copyright remains Eric Young's, and as such any Copyright notices in\n * the code are not to be removed.\n * If this package is used in a product, Eric Young should be given attribution\n * as the author of the parts of the library used.\n * This can be in the form of a textual message at program startup or\n * in documentation (online or textual) provided with the package.\n * \n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n * 1. Redistributions of source code must retain the copyright\n *    notice, this list of conditions and the following disclaimer.\n * 2. Redistributions in binary form must reproduce the above copyright\n *    notice, this list of conditions and the following disclaimer in the\n *    documentation and/or other materials provided with the distribution.\n * 3. All advertising materials mentioning features or use of this software\n *    must display the following acknowledgement:\n *    \"This product includes cryptographic software written by\n *     Eric Young (eay@cryptsoft.com)\"\n *    The word 'cryptographic' can be left out if the rouines from the library\n *    being used are not cryptographic related :-).\n * 4. If you include any Windows specific code (or a derivative thereof) from \n *    the apps directory (application code) you must include an acknowledgement:\n *    \"This product includes software written by Tim Hudson (tjh@cryptsoft.com)\"\n * \n * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND\n * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE\n * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n * SUCH DAMAGE.\n * \n * The licence and distribution terms for any publically available version or\n * derivative of this code cannot be changed.  i.e. this code cannot simply be\n * copied and put under another distribution licence\n * [including the GNU Public Licence.]\n */\n\n"
  },
  {
    "path": "Pods/OpenSSL-Universal/README.md",
    "content": "OpenSSL-Universal\n=======\n\nOpenSSL CocoaPod for iOS and OSX. Complete solution to OpenSSL on iOS and OSX. Package came with precompiled libraries, and include script to build newer version if necessary.\n\nCurrent version contains binaries build with SDK iOS 8.0 (target 5.1.1), and SDK OSX 10.9 (target 10.8) for all supported architectures.\n\n**Architectures**\n\n- iOS with architectures: armv7, armv7s, arm64 + simulator (i386, x86_64)\n- OSX with architectures: i386, x86_64\n\n**Why?**\n\n[Apple says](https://developer.apple.com/library/mac/documentation/security/Conceptual/cryptoservices/GeneralPurposeCrypto/GeneralPurposeCrypto.html):\n\"Although OpenSSL is commonly used in the open source community, OpenSSL does not provide a stable API from version to version. For this reason, although OS X provides OpenSSL libraries, the OpenSSL libraries in OS X are deprecated, and OpenSSL has never been provided as part of iOS.\"\n\n**Installation**\n\n````\npod 'OpenSSL-Universal', '1.0.1.q'\n````\n\nOr always latest version\n\n````\npod 'OpenSSL-Universal', :git => 'https://github.com/krzyzanowskim/OpenSSL.git', :branch => :master\n````\n\n**Authors**\n\n[Marcin Krzyżanowski](https://twitter.com/krzyzanowskim)\n"
  },
  {
    "path": "Pods/OpenSSL-Universal/include-ios/openssl/aes.h",
    "content": "/* crypto/aes/aes.h -*- mode:C; c-file-style: \"eay\" -*- */\n/* ====================================================================\n * Copyright (c) 1998-2002 The OpenSSL Project.  All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n *\n * 1. Redistributions of source code must retain the above copyright\n *    notice, this list of conditions and the following disclaimer.\n *\n * 2. Redistributions in binary form must reproduce the above copyright\n *    notice, this list of conditions and the following disclaimer in\n *    the documentation and/or other materials provided with the\n *    distribution.\n *\n * 3. All advertising materials mentioning features or use of this\n *    software must display the following acknowledgment:\n *    \"This product includes software developed by the OpenSSL Project\n *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)\"\n *\n * 4. The names \"OpenSSL Toolkit\" and \"OpenSSL Project\" must not be used to\n *    endorse or promote products derived from this software without\n *    prior written permission. For written permission, please contact\n *    openssl-core@openssl.org.\n *\n * 5. Products derived from this software may not be called \"OpenSSL\"\n *    nor may \"OpenSSL\" appear in their names without prior written\n *    permission of the OpenSSL Project.\n *\n * 6. Redistributions of any form whatsoever must retain the following\n *    acknowledgment:\n *    \"This product includes software developed by the OpenSSL Project\n *    for use in the OpenSSL Toolkit (http://www.openssl.org/)\"\n *\n * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY\n * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\n * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR\n * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,\n * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED\n * OF THE POSSIBILITY OF SUCH DAMAGE.\n * ====================================================================\n *\n */\n\n#ifndef HEADER_AES_H\n# define HEADER_AES_H\n\n# include <openssl/opensslconf.h>\n\n# ifdef OPENSSL_NO_AES\n#  error AES is disabled.\n# endif\n\n# include <stddef.h>\n\n# define AES_ENCRYPT     1\n# define AES_DECRYPT     0\n\n/*\n * Because array size can't be a const in C, the following two are macros.\n * Both sizes are in bytes.\n */\n# define AES_MAXNR 14\n# define AES_BLOCK_SIZE 16\n\n#ifdef  __cplusplus\nextern \"C\" {\n#endif\n\n/* This should be a hidden type, but EVP requires that the size be known */\nstruct aes_key_st {\n# ifdef AES_LONG\n    unsigned long rd_key[4 * (AES_MAXNR + 1)];\n# else\n    unsigned int rd_key[4 * (AES_MAXNR + 1)];\n# endif\n    int rounds;\n};\ntypedef struct aes_key_st AES_KEY;\n\nconst char *AES_options(void);\n\nint AES_set_encrypt_key(const unsigned char *userKey, const int bits,\n                        AES_KEY *key);\nint AES_set_decrypt_key(const unsigned char *userKey, const int bits,\n                        AES_KEY *key);\n\nint private_AES_set_encrypt_key(const unsigned char *userKey, const int bits,\n                                AES_KEY *key);\nint private_AES_set_decrypt_key(const unsigned char *userKey, const int bits,\n                                AES_KEY *key);\n\nvoid AES_encrypt(const unsigned char *in, unsigned char *out,\n                 const AES_KEY *key);\nvoid AES_decrypt(const unsigned char *in, unsigned char *out,\n                 const AES_KEY *key);\n\nvoid AES_ecb_encrypt(const unsigned char *in, unsigned char *out,\n                     const AES_KEY *key, const int enc);\nvoid AES_cbc_encrypt(const unsigned char *in, unsigned char *out,\n                     size_t length, const AES_KEY *key,\n                     unsigned char *ivec, const int enc);\nvoid AES_cfb128_encrypt(const unsigned char *in, unsigned char *out,\n                        size_t length, const AES_KEY *key,\n                        unsigned char *ivec, int *num, const int enc);\nvoid AES_cfb1_encrypt(const unsigned char *in, unsigned char *out,\n                      size_t length, const AES_KEY *key,\n                      unsigned char *ivec, int *num, const int enc);\nvoid AES_cfb8_encrypt(const unsigned char *in, unsigned char *out,\n                      size_t length, const AES_KEY *key,\n                      unsigned char *ivec, int *num, const int enc);\nvoid AES_ofb128_encrypt(const unsigned char *in, unsigned char *out,\n                        size_t length, const AES_KEY *key,\n                        unsigned char *ivec, int *num);\nvoid AES_ctr128_encrypt(const unsigned char *in, unsigned char *out,\n                        size_t length, const AES_KEY *key,\n                        unsigned char ivec[AES_BLOCK_SIZE],\n                        unsigned char ecount_buf[AES_BLOCK_SIZE],\n                        unsigned int *num);\n/* NB: the IV is _two_ blocks long */\nvoid AES_ige_encrypt(const unsigned char *in, unsigned char *out,\n                     size_t length, const AES_KEY *key,\n                     unsigned char *ivec, const int enc);\n/* NB: the IV is _four_ blocks long */\nvoid AES_bi_ige_encrypt(const unsigned char *in, unsigned char *out,\n                        size_t length, const AES_KEY *key,\n                        const AES_KEY *key2, const unsigned char *ivec,\n                        const int enc);\n\nint AES_wrap_key(AES_KEY *key, const unsigned char *iv,\n                 unsigned char *out,\n                 const unsigned char *in, unsigned int inlen);\nint AES_unwrap_key(AES_KEY *key, const unsigned char *iv,\n                   unsigned char *out,\n                   const unsigned char *in, unsigned int inlen);\n\n\n#ifdef  __cplusplus\n}\n#endif\n\n#endif                          /* !HEADER_AES_H */\n"
  },
  {
    "path": "Pods/OpenSSL-Universal/include-ios/openssl/asn1.h",
    "content": "/* crypto/asn1/asn1.h */\n/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)\n * All rights reserved.\n *\n * This package is an SSL implementation written\n * by Eric Young (eay@cryptsoft.com).\n * The implementation was written so as to conform with Netscapes SSL.\n *\n * This library is free for commercial and non-commercial use as long as\n * the following conditions are aheared to.  The following conditions\n * apply to all code found in this distribution, be it the RC4, RSA,\n * lhash, DES, etc., code; not just the SSL code.  The SSL documentation\n * included with this distribution is covered by the same copyright terms\n * except that the holder is Tim Hudson (tjh@cryptsoft.com).\n *\n * Copyright remains Eric Young's, and as such any Copyright notices in\n * the code are not to be removed.\n * If this package is used in a product, Eric Young should be given attribution\n * as the author of the parts of the library used.\n * This can be in the form of a textual message at program startup or\n * in documentation (online or textual) provided with the package.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n * 1. Redistributions of source code must retain the copyright\n *    notice, this list of conditions and the following disclaimer.\n * 2. Redistributions in binary form must reproduce the above copyright\n *    notice, this list of conditions and the following disclaimer in the\n *    documentation and/or other materials provided with the distribution.\n * 3. All advertising materials mentioning features or use of this software\n *    must display the following acknowledgement:\n *    \"This product includes cryptographic software written by\n *     Eric Young (eay@cryptsoft.com)\"\n *    The word 'cryptographic' can be left out if the rouines from the library\n *    being used are not cryptographic related :-).\n * 4. If you include any Windows specific code (or a derivative thereof) from\n *    the apps directory (application code) you must include an acknowledgement:\n *    \"This product includes software written by Tim Hudson (tjh@cryptsoft.com)\"\n *\n * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND\n * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE\n * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n * SUCH DAMAGE.\n *\n * The licence and distribution terms for any publically available version or\n * derivative of this code cannot be changed.  i.e. this code cannot simply be\n * copied and put under another distribution licence\n * [including the GNU Public Licence.]\n */\n\n#ifndef HEADER_ASN1_H\n# define HEADER_ASN1_H\n\n# include <time.h>\n# include <openssl/e_os2.h>\n# ifndef OPENSSL_NO_BIO\n#  include <openssl/bio.h>\n# endif\n# include <openssl/stack.h>\n# include <openssl/safestack.h>\n\n# include <openssl/symhacks.h>\n\n# include <openssl/ossl_typ.h>\n# ifndef OPENSSL_NO_DEPRECATED\n#  include <openssl/bn.h>\n# endif\n\n# ifdef OPENSSL_BUILD_SHLIBCRYPTO\n#  undef OPENSSL_EXTERN\n#  define OPENSSL_EXTERN OPENSSL_EXPORT\n# endif\n\n#ifdef  __cplusplus\nextern \"C\" {\n#endif\n\n# define V_ASN1_UNIVERSAL                0x00\n# define V_ASN1_APPLICATION              0x40\n# define V_ASN1_CONTEXT_SPECIFIC         0x80\n# define V_ASN1_PRIVATE                  0xc0\n\n# define V_ASN1_CONSTRUCTED              0x20\n# define V_ASN1_PRIMITIVE_TAG            0x1f\n# define V_ASN1_PRIMATIVE_TAG            0x1f\n\n# define V_ASN1_APP_CHOOSE               -2/* let the recipient choose */\n# define V_ASN1_OTHER                    -3/* used in ASN1_TYPE */\n# define V_ASN1_ANY                      -4/* used in ASN1 template code */\n\n# define V_ASN1_NEG                      0x100/* negative flag */\n\n# define V_ASN1_UNDEF                    -1\n# define V_ASN1_EOC                      0\n# define V_ASN1_BOOLEAN                  1 /**/\n# define V_ASN1_INTEGER                  2\n# define V_ASN1_NEG_INTEGER              (2 | V_ASN1_NEG)\n# define V_ASN1_BIT_STRING               3\n# define V_ASN1_OCTET_STRING             4\n# define V_ASN1_NULL                     5\n# define V_ASN1_OBJECT                   6\n# define V_ASN1_OBJECT_DESCRIPTOR        7\n# define V_ASN1_EXTERNAL                 8\n# define V_ASN1_REAL                     9\n# define V_ASN1_ENUMERATED               10\n# define V_ASN1_NEG_ENUMERATED           (10 | V_ASN1_NEG)\n# define V_ASN1_UTF8STRING               12\n# define V_ASN1_SEQUENCE                 16\n# define V_ASN1_SET                      17\n# define V_ASN1_NUMERICSTRING            18 /**/\n# define V_ASN1_PRINTABLESTRING          19\n# define V_ASN1_T61STRING                20\n# define V_ASN1_TELETEXSTRING            20/* alias */\n# define V_ASN1_VIDEOTEXSTRING           21 /**/\n# define V_ASN1_IA5STRING                22\n# define V_ASN1_UTCTIME                  23\n# define V_ASN1_GENERALIZEDTIME          24 /**/\n# define V_ASN1_GRAPHICSTRING            25 /**/\n# define V_ASN1_ISO64STRING              26 /**/\n# define V_ASN1_VISIBLESTRING            26/* alias */\n# define V_ASN1_GENERALSTRING            27 /**/\n# define V_ASN1_UNIVERSALSTRING          28 /**/\n# define V_ASN1_BMPSTRING                30\n/* For use with d2i_ASN1_type_bytes() */\n# define B_ASN1_NUMERICSTRING    0x0001\n# define B_ASN1_PRINTABLESTRING  0x0002\n# define B_ASN1_T61STRING        0x0004\n# define B_ASN1_TELETEXSTRING    0x0004\n# define B_ASN1_VIDEOTEXSTRING   0x0008\n# define B_ASN1_IA5STRING        0x0010\n# define B_ASN1_GRAPHICSTRING    0x0020\n# define B_ASN1_ISO64STRING      0x0040\n# define B_ASN1_VISIBLESTRING    0x0040\n# define B_ASN1_GENERALSTRING    0x0080\n# define B_ASN1_UNIVERSALSTRING  0x0100\n# define B_ASN1_OCTET_STRING     0x0200\n# define B_ASN1_BIT_STRING       0x0400\n# define B_ASN1_BMPSTRING        0x0800\n# define B_ASN1_UNKNOWN          0x1000\n# define B_ASN1_UTF8STRING       0x2000\n# define B_ASN1_UTCTIME          0x4000\n# define B_ASN1_GENERALIZEDTIME  0x8000\n# define B_ASN1_SEQUENCE         0x10000\n/* For use with ASN1_mbstring_copy() */\n# define MBSTRING_FLAG           0x1000\n# define MBSTRING_UTF8           (MBSTRING_FLAG)\n# define MBSTRING_ASC            (MBSTRING_FLAG|1)\n# define MBSTRING_BMP            (MBSTRING_FLAG|2)\n# define MBSTRING_UNIV           (MBSTRING_FLAG|4)\n# define SMIME_OLDMIME           0x400\n# define SMIME_CRLFEOL           0x800\n# define SMIME_STREAM            0x1000\n    struct X509_algor_st;\nDECLARE_STACK_OF(X509_ALGOR)\n\n# define DECLARE_ASN1_SET_OF(type)/* filled in by mkstack.pl */\n# define IMPLEMENT_ASN1_SET_OF(type)/* nothing, no longer needed */\n\n/*\n * We MUST make sure that, except for constness, asn1_ctx_st and\n * asn1_const_ctx are exactly the same.  Fortunately, as soon as the old ASN1\n * parsing macros are gone, we can throw this away as well...\n */\ntypedef struct asn1_ctx_st {\n    unsigned char *p;           /* work char pointer */\n    int eos;                    /* end of sequence read for indefinite\n                                 * encoding */\n    int error;                  /* error code to use when returning an error */\n    int inf;                    /* constructed if 0x20, indefinite is 0x21 */\n    int tag;                    /* tag from last 'get object' */\n    int xclass;                 /* class from last 'get object' */\n    long slen;                  /* length of last 'get object' */\n    unsigned char *max;         /* largest value of p allowed */\n    unsigned char *q;           /* temporary variable */\n    unsigned char **pp;         /* variable */\n    int line;                   /* used in error processing */\n} ASN1_CTX;\n\ntypedef struct asn1_const_ctx_st {\n    const unsigned char *p;     /* work char pointer */\n    int eos;                    /* end of sequence read for indefinite\n                                 * encoding */\n    int error;                  /* error code to use when returning an error */\n    int inf;                    /* constructed if 0x20, indefinite is 0x21 */\n    int tag;                    /* tag from last 'get object' */\n    int xclass;                 /* class from last 'get object' */\n    long slen;                  /* length of last 'get object' */\n    const unsigned char *max;   /* largest value of p allowed */\n    const unsigned char *q;     /* temporary variable */\n    const unsigned char **pp;   /* variable */\n    int line;                   /* used in error processing */\n} ASN1_const_CTX;\n\n/*\n * These are used internally in the ASN1_OBJECT to keep track of whether the\n * names and data need to be free()ed\n */\n# define ASN1_OBJECT_FLAG_DYNAMIC         0x01/* internal use */\n# define ASN1_OBJECT_FLAG_CRITICAL        0x02/* critical x509v3 object id */\n# define ASN1_OBJECT_FLAG_DYNAMIC_STRINGS 0x04/* internal use */\n# define ASN1_OBJECT_FLAG_DYNAMIC_DATA    0x08/* internal use */\ntypedef struct asn1_object_st {\n    const char *sn, *ln;\n    int nid;\n    int length;\n    const unsigned char *data;  /* data remains const after init */\n    int flags;                  /* Should we free this one */\n} ASN1_OBJECT;\n\n# define ASN1_STRING_FLAG_BITS_LEFT 0x08/* Set if 0x07 has bits left value */\n/*\n * This indicates that the ASN1_STRING is not a real value but just a place\n * holder for the location where indefinite length constructed data should be\n * inserted in the memory buffer\n */\n# define ASN1_STRING_FLAG_NDEF 0x010\n\n/*\n * This flag is used by the CMS code to indicate that a string is not\n * complete and is a place holder for content when it had all been accessed.\n * The flag will be reset when content has been written to it.\n */\n\n# define ASN1_STRING_FLAG_CONT 0x020\n/*\n * This flag is used by ASN1 code to indicate an ASN1_STRING is an MSTRING\n * type.\n */\n# define ASN1_STRING_FLAG_MSTRING 0x040\n/* This is the base type that holds just about everything :-) */\nstruct asn1_string_st {\n    int length;\n    int type;\n    unsigned char *data;\n    /*\n     * The value of the following field depends on the type being held.  It\n     * is mostly being used for BIT_STRING so if the input data has a\n     * non-zero 'unused bits' value, it will be handled correctly\n     */\n    long flags;\n};\n\n/*\n * ASN1_ENCODING structure: this is used to save the received encoding of an\n * ASN1 type. This is useful to get round problems with invalid encodings\n * which can break signatures.\n */\n\ntypedef struct ASN1_ENCODING_st {\n    unsigned char *enc;         /* DER encoding */\n    long len;                   /* Length of encoding */\n    int modified;               /* set to 1 if 'enc' is invalid */\n} ASN1_ENCODING;\n\n/* Used with ASN1 LONG type: if a long is set to this it is omitted */\n# define ASN1_LONG_UNDEF 0x7fffffffL\n\n# define STABLE_FLAGS_MALLOC     0x01\n# define STABLE_NO_MASK          0x02\n# define DIRSTRING_TYPE  \\\n (B_ASN1_PRINTABLESTRING|B_ASN1_T61STRING|B_ASN1_BMPSTRING|B_ASN1_UTF8STRING)\n# define PKCS9STRING_TYPE (DIRSTRING_TYPE|B_ASN1_IA5STRING)\n\ntypedef struct asn1_string_table_st {\n    int nid;\n    long minsize;\n    long maxsize;\n    unsigned long mask;\n    unsigned long flags;\n} ASN1_STRING_TABLE;\n\nDECLARE_STACK_OF(ASN1_STRING_TABLE)\n\n/* size limits: this stuff is taken straight from RFC2459 */\n\n# define ub_name                         32768\n# define ub_common_name                  64\n# define ub_locality_name                128\n# define ub_state_name                   128\n# define ub_organization_name            64\n# define ub_organization_unit_name       64\n# define ub_title                        64\n# define ub_email_address                128\n\n/*\n * Declarations for template structures: for full definitions see asn1t.h\n */\ntypedef struct ASN1_TEMPLATE_st ASN1_TEMPLATE;\ntypedef struct ASN1_TLC_st ASN1_TLC;\n/* This is just an opaque pointer */\ntypedef struct ASN1_VALUE_st ASN1_VALUE;\n\n/* Declare ASN1 functions: the implement macro in in asn1t.h */\n\n# define DECLARE_ASN1_FUNCTIONS(type) DECLARE_ASN1_FUNCTIONS_name(type, type)\n\n# define DECLARE_ASN1_ALLOC_FUNCTIONS(type) \\\n        DECLARE_ASN1_ALLOC_FUNCTIONS_name(type, type)\n\n# define DECLARE_ASN1_FUNCTIONS_name(type, name) \\\n        DECLARE_ASN1_ALLOC_FUNCTIONS_name(type, name) \\\n        DECLARE_ASN1_ENCODE_FUNCTIONS(type, name, name)\n\n# define DECLARE_ASN1_FUNCTIONS_fname(type, itname, name) \\\n        DECLARE_ASN1_ALLOC_FUNCTIONS_name(type, name) \\\n        DECLARE_ASN1_ENCODE_FUNCTIONS(type, itname, name)\n\n# define DECLARE_ASN1_ENCODE_FUNCTIONS(type, itname, name) \\\n        type *d2i_##name(type **a, const unsigned char **in, long len); \\\n        int i2d_##name(type *a, unsigned char **out); \\\n        DECLARE_ASN1_ITEM(itname)\n\n# define DECLARE_ASN1_ENCODE_FUNCTIONS_const(type, name) \\\n        type *d2i_##name(type **a, const unsigned char **in, long len); \\\n        int i2d_##name(const type *a, unsigned char **out); \\\n        DECLARE_ASN1_ITEM(name)\n\n# define DECLARE_ASN1_NDEF_FUNCTION(name) \\\n        int i2d_##name##_NDEF(name *a, unsigned char **out);\n\n# define DECLARE_ASN1_FUNCTIONS_const(name) \\\n        DECLARE_ASN1_ALLOC_FUNCTIONS(name) \\\n        DECLARE_ASN1_ENCODE_FUNCTIONS_const(name, name)\n\n# define DECLARE_ASN1_ALLOC_FUNCTIONS_name(type, name) \\\n        type *name##_new(void); \\\n        void name##_free(type *a);\n\n# define DECLARE_ASN1_PRINT_FUNCTION(stname) \\\n        DECLARE_ASN1_PRINT_FUNCTION_fname(stname, stname)\n\n# define DECLARE_ASN1_PRINT_FUNCTION_fname(stname, fname) \\\n        int fname##_print_ctx(BIO *out, stname *x, int indent, \\\n                                         const ASN1_PCTX *pctx);\n\n# define D2I_OF(type) type *(*)(type **,const unsigned char **,long)\n# define I2D_OF(type) int (*)(type *,unsigned char **)\n# define I2D_OF_const(type) int (*)(const type *,unsigned char **)\n\n# define CHECKED_D2I_OF(type, d2i) \\\n    ((d2i_of_void*) (1 ? d2i : ((D2I_OF(type))0)))\n# define CHECKED_I2D_OF(type, i2d) \\\n    ((i2d_of_void*) (1 ? i2d : ((I2D_OF(type))0)))\n# define CHECKED_NEW_OF(type, xnew) \\\n    ((void *(*)(void)) (1 ? xnew : ((type *(*)(void))0)))\n# define CHECKED_PTR_OF(type, p) \\\n    ((void*) (1 ? p : (type*)0))\n# define CHECKED_PPTR_OF(type, p) \\\n    ((void**) (1 ? p : (type**)0))\n\n# define TYPEDEF_D2I_OF(type) typedef type *d2i_of_##type(type **,const unsigned char **,long)\n# define TYPEDEF_I2D_OF(type) typedef int i2d_of_##type(type *,unsigned char **)\n# define TYPEDEF_D2I2D_OF(type) TYPEDEF_D2I_OF(type); TYPEDEF_I2D_OF(type)\n\nTYPEDEF_D2I2D_OF(void);\n\n/*-\n * The following macros and typedefs allow an ASN1_ITEM\n * to be embedded in a structure and referenced. Since\n * the ASN1_ITEM pointers need to be globally accessible\n * (possibly from shared libraries) they may exist in\n * different forms. On platforms that support it the\n * ASN1_ITEM structure itself will be globally exported.\n * Other platforms will export a function that returns\n * an ASN1_ITEM pointer.\n *\n * To handle both cases transparently the macros below\n * should be used instead of hard coding an ASN1_ITEM\n * pointer in a structure.\n *\n * The structure will look like this:\n *\n * typedef struct SOMETHING_st {\n *      ...\n *      ASN1_ITEM_EXP *iptr;\n *      ...\n * } SOMETHING;\n *\n * It would be initialised as e.g.:\n *\n * SOMETHING somevar = {...,ASN1_ITEM_ref(X509),...};\n *\n * and the actual pointer extracted with:\n *\n * const ASN1_ITEM *it = ASN1_ITEM_ptr(somevar.iptr);\n *\n * Finally an ASN1_ITEM pointer can be extracted from an\n * appropriate reference with: ASN1_ITEM_rptr(X509). This\n * would be used when a function takes an ASN1_ITEM * argument.\n *\n */\n\n# ifndef OPENSSL_EXPORT_VAR_AS_FUNCTION\n\n/* ASN1_ITEM pointer exported type */\ntypedef const ASN1_ITEM ASN1_ITEM_EXP;\n\n/* Macro to obtain ASN1_ITEM pointer from exported type */\n#  define ASN1_ITEM_ptr(iptr) (iptr)\n\n/* Macro to include ASN1_ITEM pointer from base type */\n#  define ASN1_ITEM_ref(iptr) (&(iptr##_it))\n\n#  define ASN1_ITEM_rptr(ref) (&(ref##_it))\n\n#  define DECLARE_ASN1_ITEM(name) \\\n        OPENSSL_EXTERN const ASN1_ITEM name##_it;\n\n# else\n\n/*\n * Platforms that can't easily handle shared global variables are declared as\n * functions returning ASN1_ITEM pointers.\n */\n\n/* ASN1_ITEM pointer exported type */\ntypedef const ASN1_ITEM *ASN1_ITEM_EXP (void);\n\n/* Macro to obtain ASN1_ITEM pointer from exported type */\n#  define ASN1_ITEM_ptr(iptr) (iptr())\n\n/* Macro to include ASN1_ITEM pointer from base type */\n#  define ASN1_ITEM_ref(iptr) (iptr##_it)\n\n#  define ASN1_ITEM_rptr(ref) (ref##_it())\n\n#  define DECLARE_ASN1_ITEM(name) \\\n        const ASN1_ITEM * name##_it(void);\n\n# endif\n\n/* Parameters used by ASN1_STRING_print_ex() */\n\n/*\n * These determine which characters to escape: RFC2253 special characters,\n * control characters and MSB set characters\n */\n\n# define ASN1_STRFLGS_ESC_2253           1\n# define ASN1_STRFLGS_ESC_CTRL           2\n# define ASN1_STRFLGS_ESC_MSB            4\n\n/*\n * This flag determines how we do escaping: normally RC2253 backslash only,\n * set this to use backslash and quote.\n */\n\n# define ASN1_STRFLGS_ESC_QUOTE          8\n\n/* These three flags are internal use only. */\n\n/* Character is a valid PrintableString character */\n# define CHARTYPE_PRINTABLESTRING        0x10\n/* Character needs escaping if it is the first character */\n# define CHARTYPE_FIRST_ESC_2253         0x20\n/* Character needs escaping if it is the last character */\n# define CHARTYPE_LAST_ESC_2253          0x40\n\n/*\n * NB the internal flags are safely reused below by flags handled at the top\n * level.\n */\n\n/*\n * If this is set we convert all character strings to UTF8 first\n */\n\n# define ASN1_STRFLGS_UTF8_CONVERT       0x10\n\n/*\n * If this is set we don't attempt to interpret content: just assume all\n * strings are 1 byte per character. This will produce some pretty odd\n * looking output!\n */\n\n# define ASN1_STRFLGS_IGNORE_TYPE        0x20\n\n/* If this is set we include the string type in the output */\n# define ASN1_STRFLGS_SHOW_TYPE          0x40\n\n/*\n * This determines which strings to display and which to 'dump' (hex dump of\n * content octets or DER encoding). We can only dump non character strings or\n * everything. If we don't dump 'unknown' they are interpreted as character\n * strings with 1 octet per character and are subject to the usual escaping\n * options.\n */\n\n# define ASN1_STRFLGS_DUMP_ALL           0x80\n# define ASN1_STRFLGS_DUMP_UNKNOWN       0x100\n\n/*\n * These determine what 'dumping' does, we can dump the content octets or the\n * DER encoding: both use the RFC2253 #XXXXX notation.\n */\n\n# define ASN1_STRFLGS_DUMP_DER           0x200\n\n/*\n * All the string flags consistent with RFC2253, escaping control characters\n * isn't essential in RFC2253 but it is advisable anyway.\n */\n\n# define ASN1_STRFLGS_RFC2253    (ASN1_STRFLGS_ESC_2253 | \\\n                                ASN1_STRFLGS_ESC_CTRL | \\\n                                ASN1_STRFLGS_ESC_MSB | \\\n                                ASN1_STRFLGS_UTF8_CONVERT | \\\n                                ASN1_STRFLGS_DUMP_UNKNOWN | \\\n                                ASN1_STRFLGS_DUMP_DER)\n\nDECLARE_STACK_OF(ASN1_INTEGER)\nDECLARE_ASN1_SET_OF(ASN1_INTEGER)\n\nDECLARE_STACK_OF(ASN1_GENERALSTRING)\n\ntypedef struct asn1_type_st {\n    int type;\n    union {\n        char *ptr;\n        ASN1_BOOLEAN boolean;\n        ASN1_STRING *asn1_string;\n        ASN1_OBJECT *object;\n        ASN1_INTEGER *integer;\n        ASN1_ENUMERATED *enumerated;\n        ASN1_BIT_STRING *bit_string;\n        ASN1_OCTET_STRING *octet_string;\n        ASN1_PRINTABLESTRING *printablestring;\n        ASN1_T61STRING *t61string;\n        ASN1_IA5STRING *ia5string;\n        ASN1_GENERALSTRING *generalstring;\n        ASN1_BMPSTRING *bmpstring;\n        ASN1_UNIVERSALSTRING *universalstring;\n        ASN1_UTCTIME *utctime;\n        ASN1_GENERALIZEDTIME *generalizedtime;\n        ASN1_VISIBLESTRING *visiblestring;\n        ASN1_UTF8STRING *utf8string;\n        /*\n         * set and sequence are left complete and still contain the set or\n         * sequence bytes\n         */\n        ASN1_STRING *set;\n        ASN1_STRING *sequence;\n        ASN1_VALUE *asn1_value;\n    } value;\n} ASN1_TYPE;\n\nDECLARE_STACK_OF(ASN1_TYPE)\nDECLARE_ASN1_SET_OF(ASN1_TYPE)\n\ntypedef STACK_OF(ASN1_TYPE) ASN1_SEQUENCE_ANY;\n\nDECLARE_ASN1_ENCODE_FUNCTIONS_const(ASN1_SEQUENCE_ANY, ASN1_SEQUENCE_ANY)\nDECLARE_ASN1_ENCODE_FUNCTIONS_const(ASN1_SEQUENCE_ANY, ASN1_SET_ANY)\n\ntypedef struct NETSCAPE_X509_st {\n    ASN1_OCTET_STRING *header;\n    X509 *cert;\n} NETSCAPE_X509;\n\n/* This is used to contain a list of bit names */\ntypedef struct BIT_STRING_BITNAME_st {\n    int bitnum;\n    const char *lname;\n    const char *sname;\n} BIT_STRING_BITNAME;\n\n# define M_ASN1_STRING_length(x) ((x)->length)\n# define M_ASN1_STRING_length_set(x, n)  ((x)->length = (n))\n# define M_ASN1_STRING_type(x)   ((x)->type)\n# define M_ASN1_STRING_data(x)   ((x)->data)\n\n/* Macros for string operations */\n# define M_ASN1_BIT_STRING_new() (ASN1_BIT_STRING *)\\\n                ASN1_STRING_type_new(V_ASN1_BIT_STRING)\n# define M_ASN1_BIT_STRING_free(a)       ASN1_STRING_free((ASN1_STRING *)a)\n# define M_ASN1_BIT_STRING_dup(a) (ASN1_BIT_STRING *)\\\n                ASN1_STRING_dup((const ASN1_STRING *)a)\n# define M_ASN1_BIT_STRING_cmp(a,b) ASN1_STRING_cmp(\\\n                (const ASN1_STRING *)a,(const ASN1_STRING *)b)\n# define M_ASN1_BIT_STRING_set(a,b,c) ASN1_STRING_set((ASN1_STRING *)a,b,c)\n\n# define M_ASN1_INTEGER_new()    (ASN1_INTEGER *)\\\n                ASN1_STRING_type_new(V_ASN1_INTEGER)\n# define M_ASN1_INTEGER_free(a)          ASN1_STRING_free((ASN1_STRING *)a)\n# define M_ASN1_INTEGER_dup(a) (ASN1_INTEGER *)\\\n                ASN1_STRING_dup((const ASN1_STRING *)a)\n# define M_ASN1_INTEGER_cmp(a,b) ASN1_STRING_cmp(\\\n                (const ASN1_STRING *)a,(const ASN1_STRING *)b)\n\n# define M_ASN1_ENUMERATED_new() (ASN1_ENUMERATED *)\\\n                ASN1_STRING_type_new(V_ASN1_ENUMERATED)\n# define M_ASN1_ENUMERATED_free(a)       ASN1_STRING_free((ASN1_STRING *)a)\n# define M_ASN1_ENUMERATED_dup(a) (ASN1_ENUMERATED *)\\\n                ASN1_STRING_dup((const ASN1_STRING *)a)\n# define M_ASN1_ENUMERATED_cmp(a,b)      ASN1_STRING_cmp(\\\n                (const ASN1_STRING *)a,(const ASN1_STRING *)b)\n\n# define M_ASN1_OCTET_STRING_new()       (ASN1_OCTET_STRING *)\\\n                ASN1_STRING_type_new(V_ASN1_OCTET_STRING)\n# define M_ASN1_OCTET_STRING_free(a)     ASN1_STRING_free((ASN1_STRING *)a)\n# define M_ASN1_OCTET_STRING_dup(a) (ASN1_OCTET_STRING *)\\\n                ASN1_STRING_dup((const ASN1_STRING *)a)\n# define M_ASN1_OCTET_STRING_cmp(a,b) ASN1_STRING_cmp(\\\n                (const ASN1_STRING *)a,(const ASN1_STRING *)b)\n# define M_ASN1_OCTET_STRING_set(a,b,c)  ASN1_STRING_set((ASN1_STRING *)a,b,c)\n# define M_ASN1_OCTET_STRING_print(a,b)  ASN1_STRING_print(a,(ASN1_STRING *)b)\n# define M_i2d_ASN1_OCTET_STRING(a,pp) \\\n                i2d_ASN1_bytes((ASN1_STRING *)a,pp,V_ASN1_OCTET_STRING,\\\n                V_ASN1_UNIVERSAL)\n\n# define B_ASN1_TIME \\\n                        B_ASN1_UTCTIME | \\\n                        B_ASN1_GENERALIZEDTIME\n\n# define B_ASN1_PRINTABLE \\\n                        B_ASN1_NUMERICSTRING| \\\n                        B_ASN1_PRINTABLESTRING| \\\n                        B_ASN1_T61STRING| \\\n                        B_ASN1_IA5STRING| \\\n                        B_ASN1_BIT_STRING| \\\n                        B_ASN1_UNIVERSALSTRING|\\\n                        B_ASN1_BMPSTRING|\\\n                        B_ASN1_UTF8STRING|\\\n                        B_ASN1_SEQUENCE|\\\n                        B_ASN1_UNKNOWN\n\n# define B_ASN1_DIRECTORYSTRING \\\n                        B_ASN1_PRINTABLESTRING| \\\n                        B_ASN1_TELETEXSTRING|\\\n                        B_ASN1_BMPSTRING|\\\n                        B_ASN1_UNIVERSALSTRING|\\\n                        B_ASN1_UTF8STRING\n\n# define B_ASN1_DISPLAYTEXT \\\n                        B_ASN1_IA5STRING| \\\n                        B_ASN1_VISIBLESTRING| \\\n                        B_ASN1_BMPSTRING|\\\n                        B_ASN1_UTF8STRING\n\n# define M_ASN1_PRINTABLE_new()  ASN1_STRING_type_new(V_ASN1_T61STRING)\n# define M_ASN1_PRINTABLE_free(a)        ASN1_STRING_free((ASN1_STRING *)a)\n# define M_i2d_ASN1_PRINTABLE(a,pp) i2d_ASN1_bytes((ASN1_STRING *)a,\\\n                pp,a->type,V_ASN1_UNIVERSAL)\n# define M_d2i_ASN1_PRINTABLE(a,pp,l) \\\n                d2i_ASN1_type_bytes((ASN1_STRING **)a,pp,l, \\\n                        B_ASN1_PRINTABLE)\n\n# define M_DIRECTORYSTRING_new() ASN1_STRING_type_new(V_ASN1_PRINTABLESTRING)\n# define M_DIRECTORYSTRING_free(a)       ASN1_STRING_free((ASN1_STRING *)a)\n# define M_i2d_DIRECTORYSTRING(a,pp) i2d_ASN1_bytes((ASN1_STRING *)a,\\\n                                                pp,a->type,V_ASN1_UNIVERSAL)\n# define M_d2i_DIRECTORYSTRING(a,pp,l) \\\n                d2i_ASN1_type_bytes((ASN1_STRING **)a,pp,l, \\\n                        B_ASN1_DIRECTORYSTRING)\n\n# define M_DISPLAYTEXT_new() ASN1_STRING_type_new(V_ASN1_VISIBLESTRING)\n# define M_DISPLAYTEXT_free(a) ASN1_STRING_free((ASN1_STRING *)a)\n# define M_i2d_DISPLAYTEXT(a,pp) i2d_ASN1_bytes((ASN1_STRING *)a,\\\n                                                pp,a->type,V_ASN1_UNIVERSAL)\n# define M_d2i_DISPLAYTEXT(a,pp,l) \\\n                d2i_ASN1_type_bytes((ASN1_STRING **)a,pp,l, \\\n                        B_ASN1_DISPLAYTEXT)\n\n# define M_ASN1_PRINTABLESTRING_new() (ASN1_PRINTABLESTRING *)\\\n                ASN1_STRING_type_new(V_ASN1_PRINTABLESTRING)\n# define M_ASN1_PRINTABLESTRING_free(a)  ASN1_STRING_free((ASN1_STRING *)a)\n# define M_i2d_ASN1_PRINTABLESTRING(a,pp) \\\n                i2d_ASN1_bytes((ASN1_STRING *)a,pp,V_ASN1_PRINTABLESTRING,\\\n                V_ASN1_UNIVERSAL)\n# define M_d2i_ASN1_PRINTABLESTRING(a,pp,l) \\\n                (ASN1_PRINTABLESTRING *)d2i_ASN1_type_bytes\\\n                ((ASN1_STRING **)a,pp,l,B_ASN1_PRINTABLESTRING)\n\n# define M_ASN1_T61STRING_new()  (ASN1_T61STRING *)\\\n                ASN1_STRING_type_new(V_ASN1_T61STRING)\n# define M_ASN1_T61STRING_free(a)        ASN1_STRING_free((ASN1_STRING *)a)\n# define M_i2d_ASN1_T61STRING(a,pp) \\\n                i2d_ASN1_bytes((ASN1_STRING *)a,pp,V_ASN1_T61STRING,\\\n                V_ASN1_UNIVERSAL)\n# define M_d2i_ASN1_T61STRING(a,pp,l) \\\n                (ASN1_T61STRING *)d2i_ASN1_type_bytes\\\n                ((ASN1_STRING **)a,pp,l,B_ASN1_T61STRING)\n\n# define M_ASN1_IA5STRING_new()  (ASN1_IA5STRING *)\\\n                ASN1_STRING_type_new(V_ASN1_IA5STRING)\n# define M_ASN1_IA5STRING_free(a)        ASN1_STRING_free((ASN1_STRING *)a)\n# define M_ASN1_IA5STRING_dup(a) \\\n                (ASN1_IA5STRING *)ASN1_STRING_dup((const ASN1_STRING *)a)\n# define M_i2d_ASN1_IA5STRING(a,pp) \\\n                i2d_ASN1_bytes((ASN1_STRING *)a,pp,V_ASN1_IA5STRING,\\\n                        V_ASN1_UNIVERSAL)\n# define M_d2i_ASN1_IA5STRING(a,pp,l) \\\n                (ASN1_IA5STRING *)d2i_ASN1_type_bytes((ASN1_STRING **)a,pp,l,\\\n                        B_ASN1_IA5STRING)\n\n# define M_ASN1_UTCTIME_new()    (ASN1_UTCTIME *)\\\n                ASN1_STRING_type_new(V_ASN1_UTCTIME)\n# define M_ASN1_UTCTIME_free(a)  ASN1_STRING_free((ASN1_STRING *)a)\n# define M_ASN1_UTCTIME_dup(a) (ASN1_UTCTIME *)\\\n                ASN1_STRING_dup((const ASN1_STRING *)a)\n\n# define M_ASN1_GENERALIZEDTIME_new()    (ASN1_GENERALIZEDTIME *)\\\n                ASN1_STRING_type_new(V_ASN1_GENERALIZEDTIME)\n# define M_ASN1_GENERALIZEDTIME_free(a)  ASN1_STRING_free((ASN1_STRING *)a)\n# define M_ASN1_GENERALIZEDTIME_dup(a) (ASN1_GENERALIZEDTIME *)ASN1_STRING_dup(\\\n        (const ASN1_STRING *)a)\n\n# define M_ASN1_TIME_new()       (ASN1_TIME *)\\\n                ASN1_STRING_type_new(V_ASN1_UTCTIME)\n# define M_ASN1_TIME_free(a)     ASN1_STRING_free((ASN1_STRING *)a)\n# define M_ASN1_TIME_dup(a) (ASN1_TIME *)\\\n        ASN1_STRING_dup((const ASN1_STRING *)a)\n\n# define M_ASN1_GENERALSTRING_new()      (ASN1_GENERALSTRING *)\\\n                ASN1_STRING_type_new(V_ASN1_GENERALSTRING)\n# define M_ASN1_GENERALSTRING_free(a)    ASN1_STRING_free((ASN1_STRING *)a)\n# define M_i2d_ASN1_GENERALSTRING(a,pp) \\\n                i2d_ASN1_bytes((ASN1_STRING *)a,pp,V_ASN1_GENERALSTRING,\\\n                        V_ASN1_UNIVERSAL)\n# define M_d2i_ASN1_GENERALSTRING(a,pp,l) \\\n                (ASN1_GENERALSTRING *)d2i_ASN1_type_bytes\\\n                ((ASN1_STRING **)a,pp,l,B_ASN1_GENERALSTRING)\n\n# define M_ASN1_UNIVERSALSTRING_new()    (ASN1_UNIVERSALSTRING *)\\\n                ASN1_STRING_type_new(V_ASN1_UNIVERSALSTRING)\n# define M_ASN1_UNIVERSALSTRING_free(a)  ASN1_STRING_free((ASN1_STRING *)a)\n# define M_i2d_ASN1_UNIVERSALSTRING(a,pp) \\\n                i2d_ASN1_bytes((ASN1_STRING *)a,pp,V_ASN1_UNIVERSALSTRING,\\\n                        V_ASN1_UNIVERSAL)\n# define M_d2i_ASN1_UNIVERSALSTRING(a,pp,l) \\\n                (ASN1_UNIVERSALSTRING *)d2i_ASN1_type_bytes\\\n                ((ASN1_STRING **)a,pp,l,B_ASN1_UNIVERSALSTRING)\n\n# define M_ASN1_BMPSTRING_new()  (ASN1_BMPSTRING *)\\\n                ASN1_STRING_type_new(V_ASN1_BMPSTRING)\n# define M_ASN1_BMPSTRING_free(a)        ASN1_STRING_free((ASN1_STRING *)a)\n# define M_i2d_ASN1_BMPSTRING(a,pp) \\\n                i2d_ASN1_bytes((ASN1_STRING *)a,pp,V_ASN1_BMPSTRING,\\\n                        V_ASN1_UNIVERSAL)\n# define M_d2i_ASN1_BMPSTRING(a,pp,l) \\\n                (ASN1_BMPSTRING *)d2i_ASN1_type_bytes\\\n                ((ASN1_STRING **)a,pp,l,B_ASN1_BMPSTRING)\n\n# define M_ASN1_VISIBLESTRING_new()      (ASN1_VISIBLESTRING *)\\\n                ASN1_STRING_type_new(V_ASN1_VISIBLESTRING)\n# define M_ASN1_VISIBLESTRING_free(a)    ASN1_STRING_free((ASN1_STRING *)a)\n# define M_i2d_ASN1_VISIBLESTRING(a,pp) \\\n                i2d_ASN1_bytes((ASN1_STRING *)a,pp,V_ASN1_VISIBLESTRING,\\\n                        V_ASN1_UNIVERSAL)\n# define M_d2i_ASN1_VISIBLESTRING(a,pp,l) \\\n                (ASN1_VISIBLESTRING *)d2i_ASN1_type_bytes\\\n                ((ASN1_STRING **)a,pp,l,B_ASN1_VISIBLESTRING)\n\n# define M_ASN1_UTF8STRING_new() (ASN1_UTF8STRING *)\\\n                ASN1_STRING_type_new(V_ASN1_UTF8STRING)\n# define M_ASN1_UTF8STRING_free(a)       ASN1_STRING_free((ASN1_STRING *)a)\n# define M_i2d_ASN1_UTF8STRING(a,pp) \\\n                i2d_ASN1_bytes((ASN1_STRING *)a,pp,V_ASN1_UTF8STRING,\\\n                        V_ASN1_UNIVERSAL)\n# define M_d2i_ASN1_UTF8STRING(a,pp,l) \\\n                (ASN1_UTF8STRING *)d2i_ASN1_type_bytes\\\n                ((ASN1_STRING **)a,pp,l,B_ASN1_UTF8STRING)\n\n  /* for the is_set parameter to i2d_ASN1_SET */\n# define IS_SEQUENCE     0\n# define IS_SET          1\n\nDECLARE_ASN1_FUNCTIONS_fname(ASN1_TYPE, ASN1_ANY, ASN1_TYPE)\n\nint ASN1_TYPE_get(ASN1_TYPE *a);\nvoid ASN1_TYPE_set(ASN1_TYPE *a, int type, void *value);\nint ASN1_TYPE_set1(ASN1_TYPE *a, int type, const void *value);\nint ASN1_TYPE_cmp(const ASN1_TYPE *a, const ASN1_TYPE *b);\n\nASN1_OBJECT *ASN1_OBJECT_new(void);\nvoid ASN1_OBJECT_free(ASN1_OBJECT *a);\nint i2d_ASN1_OBJECT(ASN1_OBJECT *a, unsigned char **pp);\nASN1_OBJECT *c2i_ASN1_OBJECT(ASN1_OBJECT **a, const unsigned char **pp,\n                             long length);\nASN1_OBJECT *d2i_ASN1_OBJECT(ASN1_OBJECT **a, const unsigned char **pp,\n                             long length);\n\nDECLARE_ASN1_ITEM(ASN1_OBJECT)\n\nDECLARE_STACK_OF(ASN1_OBJECT)\nDECLARE_ASN1_SET_OF(ASN1_OBJECT)\n\nASN1_STRING *ASN1_STRING_new(void);\nvoid ASN1_STRING_free(ASN1_STRING *a);\nvoid ASN1_STRING_clear_free(ASN1_STRING *a);\nint ASN1_STRING_copy(ASN1_STRING *dst, const ASN1_STRING *str);\nASN1_STRING *ASN1_STRING_dup(const ASN1_STRING *a);\nASN1_STRING *ASN1_STRING_type_new(int type);\nint ASN1_STRING_cmp(const ASN1_STRING *a, const ASN1_STRING *b);\n  /*\n   * Since this is used to store all sorts of things, via macros, for now,\n   * make its data void *\n   */\nint ASN1_STRING_set(ASN1_STRING *str, const void *data, int len);\nvoid ASN1_STRING_set0(ASN1_STRING *str, void *data, int len);\nint ASN1_STRING_length(const ASN1_STRING *x);\nvoid ASN1_STRING_length_set(ASN1_STRING *x, int n);\nint ASN1_STRING_type(ASN1_STRING *x);\nunsigned char *ASN1_STRING_data(ASN1_STRING *x);\n\nDECLARE_ASN1_FUNCTIONS(ASN1_BIT_STRING)\nint i2c_ASN1_BIT_STRING(ASN1_BIT_STRING *a, unsigned char **pp);\nASN1_BIT_STRING *c2i_ASN1_BIT_STRING(ASN1_BIT_STRING **a,\n                                     const unsigned char **pp, long length);\nint ASN1_BIT_STRING_set(ASN1_BIT_STRING *a, unsigned char *d, int length);\nint ASN1_BIT_STRING_set_bit(ASN1_BIT_STRING *a, int n, int value);\nint ASN1_BIT_STRING_get_bit(ASN1_BIT_STRING *a, int n);\nint ASN1_BIT_STRING_check(ASN1_BIT_STRING *a,\n                          unsigned char *flags, int flags_len);\n\n# ifndef OPENSSL_NO_BIO\nint ASN1_BIT_STRING_name_print(BIO *out, ASN1_BIT_STRING *bs,\n                               BIT_STRING_BITNAME *tbl, int indent);\n# endif\nint ASN1_BIT_STRING_num_asc(char *name, BIT_STRING_BITNAME *tbl);\nint ASN1_BIT_STRING_set_asc(ASN1_BIT_STRING *bs, char *name, int value,\n                            BIT_STRING_BITNAME *tbl);\n\nint i2d_ASN1_BOOLEAN(int a, unsigned char **pp);\nint d2i_ASN1_BOOLEAN(int *a, const unsigned char **pp, long length);\n\nDECLARE_ASN1_FUNCTIONS(ASN1_INTEGER)\nint i2c_ASN1_INTEGER(ASN1_INTEGER *a, unsigned char **pp);\nASN1_INTEGER *c2i_ASN1_INTEGER(ASN1_INTEGER **a, const unsigned char **pp,\n                               long length);\nASN1_INTEGER *d2i_ASN1_UINTEGER(ASN1_INTEGER **a, const unsigned char **pp,\n                                long length);\nASN1_INTEGER *ASN1_INTEGER_dup(const ASN1_INTEGER *x);\nint ASN1_INTEGER_cmp(const ASN1_INTEGER *x, const ASN1_INTEGER *y);\n\nDECLARE_ASN1_FUNCTIONS(ASN1_ENUMERATED)\n\nint ASN1_UTCTIME_check(ASN1_UTCTIME *a);\nASN1_UTCTIME *ASN1_UTCTIME_set(ASN1_UTCTIME *s, time_t t);\nASN1_UTCTIME *ASN1_UTCTIME_adj(ASN1_UTCTIME *s, time_t t,\n                               int offset_day, long offset_sec);\nint ASN1_UTCTIME_set_string(ASN1_UTCTIME *s, const char *str);\nint ASN1_UTCTIME_cmp_time_t(const ASN1_UTCTIME *s, time_t t);\n# if 0\ntime_t ASN1_UTCTIME_get(const ASN1_UTCTIME *s);\n# endif\n\nint ASN1_GENERALIZEDTIME_check(ASN1_GENERALIZEDTIME *a);\nASN1_GENERALIZEDTIME *ASN1_GENERALIZEDTIME_set(ASN1_GENERALIZEDTIME *s,\n                                               time_t t);\nASN1_GENERALIZEDTIME *ASN1_GENERALIZEDTIME_adj(ASN1_GENERALIZEDTIME *s,\n                                               time_t t, int offset_day,\n                                               long offset_sec);\nint ASN1_GENERALIZEDTIME_set_string(ASN1_GENERALIZEDTIME *s, const char *str);\n\nDECLARE_ASN1_FUNCTIONS(ASN1_OCTET_STRING)\nASN1_OCTET_STRING *ASN1_OCTET_STRING_dup(const ASN1_OCTET_STRING *a);\nint ASN1_OCTET_STRING_cmp(const ASN1_OCTET_STRING *a,\n                          const ASN1_OCTET_STRING *b);\nint ASN1_OCTET_STRING_set(ASN1_OCTET_STRING *str, const unsigned char *data,\n                          int len);\n\nDECLARE_ASN1_FUNCTIONS(ASN1_VISIBLESTRING)\nDECLARE_ASN1_FUNCTIONS(ASN1_UNIVERSALSTRING)\nDECLARE_ASN1_FUNCTIONS(ASN1_UTF8STRING)\nDECLARE_ASN1_FUNCTIONS(ASN1_NULL)\nDECLARE_ASN1_FUNCTIONS(ASN1_BMPSTRING)\n\nint UTF8_getc(const unsigned char *str, int len, unsigned long *val);\nint UTF8_putc(unsigned char *str, int len, unsigned long value);\n\nDECLARE_ASN1_FUNCTIONS_name(ASN1_STRING, ASN1_PRINTABLE)\n\nDECLARE_ASN1_FUNCTIONS_name(ASN1_STRING, DIRECTORYSTRING)\nDECLARE_ASN1_FUNCTIONS_name(ASN1_STRING, DISPLAYTEXT)\nDECLARE_ASN1_FUNCTIONS(ASN1_PRINTABLESTRING)\nDECLARE_ASN1_FUNCTIONS(ASN1_T61STRING)\nDECLARE_ASN1_FUNCTIONS(ASN1_IA5STRING)\nDECLARE_ASN1_FUNCTIONS(ASN1_GENERALSTRING)\nDECLARE_ASN1_FUNCTIONS(ASN1_UTCTIME)\nDECLARE_ASN1_FUNCTIONS(ASN1_GENERALIZEDTIME)\nDECLARE_ASN1_FUNCTIONS(ASN1_TIME)\n\nDECLARE_ASN1_ITEM(ASN1_OCTET_STRING_NDEF)\n\nASN1_TIME *ASN1_TIME_set(ASN1_TIME *s, time_t t);\nASN1_TIME *ASN1_TIME_adj(ASN1_TIME *s, time_t t,\n                         int offset_day, long offset_sec);\nint ASN1_TIME_check(ASN1_TIME *t);\nASN1_GENERALIZEDTIME *ASN1_TIME_to_generalizedtime(ASN1_TIME *t, ASN1_GENERALIZEDTIME\n                                                   **out);\nint ASN1_TIME_set_string(ASN1_TIME *s, const char *str);\n\nint i2d_ASN1_SET(STACK_OF(OPENSSL_BLOCK) *a, unsigned char **pp,\n                 i2d_of_void *i2d, int ex_tag, int ex_class, int is_set);\nSTACK_OF(OPENSSL_BLOCK) *d2i_ASN1_SET(STACK_OF(OPENSSL_BLOCK) **a,\n                                      const unsigned char **pp,\n                                      long length, d2i_of_void *d2i,\n                                      void (*free_func) (OPENSSL_BLOCK),\n                                      int ex_tag, int ex_class);\n\n# ifndef OPENSSL_NO_BIO\nint i2a_ASN1_INTEGER(BIO *bp, ASN1_INTEGER *a);\nint a2i_ASN1_INTEGER(BIO *bp, ASN1_INTEGER *bs, char *buf, int size);\nint i2a_ASN1_ENUMERATED(BIO *bp, ASN1_ENUMERATED *a);\nint a2i_ASN1_ENUMERATED(BIO *bp, ASN1_ENUMERATED *bs, char *buf, int size);\nint i2a_ASN1_OBJECT(BIO *bp, ASN1_OBJECT *a);\nint a2i_ASN1_STRING(BIO *bp, ASN1_STRING *bs, char *buf, int size);\nint i2a_ASN1_STRING(BIO *bp, ASN1_STRING *a, int type);\n# endif\nint i2t_ASN1_OBJECT(char *buf, int buf_len, ASN1_OBJECT *a);\n\nint a2d_ASN1_OBJECT(unsigned char *out, int olen, const char *buf, int num);\nASN1_OBJECT *ASN1_OBJECT_create(int nid, unsigned char *data, int len,\n                                const char *sn, const char *ln);\n\nint ASN1_INTEGER_set(ASN1_INTEGER *a, long v);\nlong ASN1_INTEGER_get(const ASN1_INTEGER *a);\nASN1_INTEGER *BN_to_ASN1_INTEGER(const BIGNUM *bn, ASN1_INTEGER *ai);\nBIGNUM *ASN1_INTEGER_to_BN(const ASN1_INTEGER *ai, BIGNUM *bn);\n\nint ASN1_ENUMERATED_set(ASN1_ENUMERATED *a, long v);\nlong ASN1_ENUMERATED_get(ASN1_ENUMERATED *a);\nASN1_ENUMERATED *BN_to_ASN1_ENUMERATED(BIGNUM *bn, ASN1_ENUMERATED *ai);\nBIGNUM *ASN1_ENUMERATED_to_BN(ASN1_ENUMERATED *ai, BIGNUM *bn);\n\n/* General */\n/* given a string, return the correct type, max is the maximum length */\nint ASN1_PRINTABLE_type(const unsigned char *s, int max);\n\nint i2d_ASN1_bytes(ASN1_STRING *a, unsigned char **pp, int tag, int xclass);\nASN1_STRING *d2i_ASN1_bytes(ASN1_STRING **a, const unsigned char **pp,\n                            long length, int Ptag, int Pclass);\nunsigned long ASN1_tag2bit(int tag);\n/* type is one or more of the B_ASN1_ values. */\nASN1_STRING *d2i_ASN1_type_bytes(ASN1_STRING **a, const unsigned char **pp,\n                                 long length, int type);\n\n/* PARSING */\nint asn1_Finish(ASN1_CTX *c);\nint asn1_const_Finish(ASN1_const_CTX *c);\n\n/* SPECIALS */\nint ASN1_get_object(const unsigned char **pp, long *plength, int *ptag,\n                    int *pclass, long omax);\nint ASN1_check_infinite_end(unsigned char **p, long len);\nint ASN1_const_check_infinite_end(const unsigned char **p, long len);\nvoid ASN1_put_object(unsigned char **pp, int constructed, int length,\n                     int tag, int xclass);\nint ASN1_put_eoc(unsigned char **pp);\nint ASN1_object_size(int constructed, int length, int tag);\n\n/* Used to implement other functions */\nvoid *ASN1_dup(i2d_of_void *i2d, d2i_of_void *d2i, void *x);\n\n# define ASN1_dup_of(type,i2d,d2i,x) \\\n    ((type*)ASN1_dup(CHECKED_I2D_OF(type, i2d), \\\n                     CHECKED_D2I_OF(type, d2i), \\\n                     CHECKED_PTR_OF(type, x)))\n\n# define ASN1_dup_of_const(type,i2d,d2i,x) \\\n    ((type*)ASN1_dup(CHECKED_I2D_OF(const type, i2d), \\\n                     CHECKED_D2I_OF(type, d2i), \\\n                     CHECKED_PTR_OF(const type, x)))\n\nvoid *ASN1_item_dup(const ASN1_ITEM *it, void *x);\n\n/* ASN1 alloc/free macros for when a type is only used internally */\n\n# define M_ASN1_new_of(type) (type *)ASN1_item_new(ASN1_ITEM_rptr(type))\n# define M_ASN1_free_of(x, type) \\\n                ASN1_item_free(CHECKED_PTR_OF(type, x), ASN1_ITEM_rptr(type))\n\n# ifndef OPENSSL_NO_FP_API\nvoid *ASN1_d2i_fp(void *(*xnew) (void), d2i_of_void *d2i, FILE *in, void **x);\n\n#  define ASN1_d2i_fp_of(type,xnew,d2i,in,x) \\\n    ((type*)ASN1_d2i_fp(CHECKED_NEW_OF(type, xnew), \\\n                        CHECKED_D2I_OF(type, d2i), \\\n                        in, \\\n                        CHECKED_PPTR_OF(type, x)))\n\nvoid *ASN1_item_d2i_fp(const ASN1_ITEM *it, FILE *in, void *x);\nint ASN1_i2d_fp(i2d_of_void *i2d, FILE *out, void *x);\n\n#  define ASN1_i2d_fp_of(type,i2d,out,x) \\\n    (ASN1_i2d_fp(CHECKED_I2D_OF(type, i2d), \\\n                 out, \\\n                 CHECKED_PTR_OF(type, x)))\n\n#  define ASN1_i2d_fp_of_const(type,i2d,out,x) \\\n    (ASN1_i2d_fp(CHECKED_I2D_OF(const type, i2d), \\\n                 out, \\\n                 CHECKED_PTR_OF(const type, x)))\n\nint ASN1_item_i2d_fp(const ASN1_ITEM *it, FILE *out, void *x);\nint ASN1_STRING_print_ex_fp(FILE *fp, ASN1_STRING *str, unsigned long flags);\n# endif\n\nint ASN1_STRING_to_UTF8(unsigned char **out, ASN1_STRING *in);\n\n# ifndef OPENSSL_NO_BIO\nvoid *ASN1_d2i_bio(void *(*xnew) (void), d2i_of_void *d2i, BIO *in, void **x);\n\n#  define ASN1_d2i_bio_of(type,xnew,d2i,in,x) \\\n    ((type*)ASN1_d2i_bio( CHECKED_NEW_OF(type, xnew), \\\n                          CHECKED_D2I_OF(type, d2i), \\\n                          in, \\\n                          CHECKED_PPTR_OF(type, x)))\n\nvoid *ASN1_item_d2i_bio(const ASN1_ITEM *it, BIO *in, void *x);\nint ASN1_i2d_bio(i2d_of_void *i2d, BIO *out, unsigned char *x);\n\n#  define ASN1_i2d_bio_of(type,i2d,out,x) \\\n    (ASN1_i2d_bio(CHECKED_I2D_OF(type, i2d), \\\n                  out, \\\n                  CHECKED_PTR_OF(type, x)))\n\n#  define ASN1_i2d_bio_of_const(type,i2d,out,x) \\\n    (ASN1_i2d_bio(CHECKED_I2D_OF(const type, i2d), \\\n                  out, \\\n                  CHECKED_PTR_OF(const type, x)))\n\nint ASN1_item_i2d_bio(const ASN1_ITEM *it, BIO *out, void *x);\nint ASN1_UTCTIME_print(BIO *fp, const ASN1_UTCTIME *a);\nint ASN1_GENERALIZEDTIME_print(BIO *fp, const ASN1_GENERALIZEDTIME *a);\nint ASN1_TIME_print(BIO *fp, const ASN1_TIME *a);\nint ASN1_STRING_print(BIO *bp, const ASN1_STRING *v);\nint ASN1_STRING_print_ex(BIO *out, ASN1_STRING *str, unsigned long flags);\nint ASN1_bn_print(BIO *bp, const char *number, const BIGNUM *num,\n                  unsigned char *buf, int off);\nint ASN1_parse(BIO *bp, const unsigned char *pp, long len, int indent);\nint ASN1_parse_dump(BIO *bp, const unsigned char *pp, long len, int indent,\n                    int dump);\n# endif\nconst char *ASN1_tag2str(int tag);\n\n/* Used to load and write netscape format cert */\n\nDECLARE_ASN1_FUNCTIONS(NETSCAPE_X509)\n\nint ASN1_UNIVERSALSTRING_to_string(ASN1_UNIVERSALSTRING *s);\n\nint ASN1_TYPE_set_octetstring(ASN1_TYPE *a, unsigned char *data, int len);\nint ASN1_TYPE_get_octetstring(ASN1_TYPE *a, unsigned char *data, int max_len);\nint ASN1_TYPE_set_int_octetstring(ASN1_TYPE *a, long num,\n                                  unsigned char *data, int len);\nint ASN1_TYPE_get_int_octetstring(ASN1_TYPE *a, long *num,\n                                  unsigned char *data, int max_len);\n\nSTACK_OF(OPENSSL_BLOCK) *ASN1_seq_unpack(const unsigned char *buf, int len,\n                                         d2i_of_void *d2i,\n                                         void (*free_func) (OPENSSL_BLOCK));\nunsigned char *ASN1_seq_pack(STACK_OF(OPENSSL_BLOCK) *safes, i2d_of_void *i2d,\n                             unsigned char **buf, int *len);\nvoid *ASN1_unpack_string(ASN1_STRING *oct, d2i_of_void *d2i);\nvoid *ASN1_item_unpack(ASN1_STRING *oct, const ASN1_ITEM *it);\nASN1_STRING *ASN1_pack_string(void *obj, i2d_of_void *i2d,\n                              ASN1_OCTET_STRING **oct);\n\n# define ASN1_pack_string_of(type,obj,i2d,oct) \\\n    (ASN1_pack_string(CHECKED_PTR_OF(type, obj), \\\n                      CHECKED_I2D_OF(type, i2d), \\\n                      oct))\n\nASN1_STRING *ASN1_item_pack(void *obj, const ASN1_ITEM *it,\n                            ASN1_OCTET_STRING **oct);\n\nvoid ASN1_STRING_set_default_mask(unsigned long mask);\nint ASN1_STRING_set_default_mask_asc(const char *p);\nunsigned long ASN1_STRING_get_default_mask(void);\nint ASN1_mbstring_copy(ASN1_STRING **out, const unsigned char *in, int len,\n                       int inform, unsigned long mask);\nint ASN1_mbstring_ncopy(ASN1_STRING **out, const unsigned char *in, int len,\n                        int inform, unsigned long mask,\n                        long minsize, long maxsize);\n\nASN1_STRING *ASN1_STRING_set_by_NID(ASN1_STRING **out,\n                                    const unsigned char *in, int inlen,\n                                    int inform, int nid);\nASN1_STRING_TABLE *ASN1_STRING_TABLE_get(int nid);\nint ASN1_STRING_TABLE_add(int, long, long, unsigned long, unsigned long);\nvoid ASN1_STRING_TABLE_cleanup(void);\n\n/* ASN1 template functions */\n\n/* Old API compatible functions */\nASN1_VALUE *ASN1_item_new(const ASN1_ITEM *it);\nvoid ASN1_item_free(ASN1_VALUE *val, const ASN1_ITEM *it);\nASN1_VALUE *ASN1_item_d2i(ASN1_VALUE **val, const unsigned char **in,\n                          long len, const ASN1_ITEM *it);\nint ASN1_item_i2d(ASN1_VALUE *val, unsigned char **out, const ASN1_ITEM *it);\nint ASN1_item_ndef_i2d(ASN1_VALUE *val, unsigned char **out,\n                       const ASN1_ITEM *it);\n\nvoid ASN1_add_oid_module(void);\n\nASN1_TYPE *ASN1_generate_nconf(char *str, CONF *nconf);\nASN1_TYPE *ASN1_generate_v3(char *str, X509V3_CTX *cnf);\n\n/* ASN1 Print flags */\n\n/* Indicate missing OPTIONAL fields */\n# define ASN1_PCTX_FLAGS_SHOW_ABSENT             0x001\n/* Mark start and end of SEQUENCE */\n# define ASN1_PCTX_FLAGS_SHOW_SEQUENCE           0x002\n/* Mark start and end of SEQUENCE/SET OF */\n# define ASN1_PCTX_FLAGS_SHOW_SSOF               0x004\n/* Show the ASN1 type of primitives */\n# define ASN1_PCTX_FLAGS_SHOW_TYPE               0x008\n/* Don't show ASN1 type of ANY */\n# define ASN1_PCTX_FLAGS_NO_ANY_TYPE             0x010\n/* Don't show ASN1 type of MSTRINGs */\n# define ASN1_PCTX_FLAGS_NO_MSTRING_TYPE         0x020\n/* Don't show field names in SEQUENCE */\n# define ASN1_PCTX_FLAGS_NO_FIELD_NAME           0x040\n/* Show structure names of each SEQUENCE field */\n# define ASN1_PCTX_FLAGS_SHOW_FIELD_STRUCT_NAME  0x080\n/* Don't show structure name even at top level */\n# define ASN1_PCTX_FLAGS_NO_STRUCT_NAME          0x100\n\nint ASN1_item_print(BIO *out, ASN1_VALUE *ifld, int indent,\n                    const ASN1_ITEM *it, const ASN1_PCTX *pctx);\nASN1_PCTX *ASN1_PCTX_new(void);\nvoid ASN1_PCTX_free(ASN1_PCTX *p);\nunsigned long ASN1_PCTX_get_flags(ASN1_PCTX *p);\nvoid ASN1_PCTX_set_flags(ASN1_PCTX *p, unsigned long flags);\nunsigned long ASN1_PCTX_get_nm_flags(ASN1_PCTX *p);\nvoid ASN1_PCTX_set_nm_flags(ASN1_PCTX *p, unsigned long flags);\nunsigned long ASN1_PCTX_get_cert_flags(ASN1_PCTX *p);\nvoid ASN1_PCTX_set_cert_flags(ASN1_PCTX *p, unsigned long flags);\nunsigned long ASN1_PCTX_get_oid_flags(ASN1_PCTX *p);\nvoid ASN1_PCTX_set_oid_flags(ASN1_PCTX *p, unsigned long flags);\nunsigned long ASN1_PCTX_get_str_flags(ASN1_PCTX *p);\nvoid ASN1_PCTX_set_str_flags(ASN1_PCTX *p, unsigned long flags);\n\nBIO_METHOD *BIO_f_asn1(void);\n\nBIO *BIO_new_NDEF(BIO *out, ASN1_VALUE *val, const ASN1_ITEM *it);\n\nint i2d_ASN1_bio_stream(BIO *out, ASN1_VALUE *val, BIO *in, int flags,\n                        const ASN1_ITEM *it);\nint PEM_write_bio_ASN1_stream(BIO *out, ASN1_VALUE *val, BIO *in, int flags,\n                              const char *hdr, const ASN1_ITEM *it);\nint SMIME_write_ASN1(BIO *bio, ASN1_VALUE *val, BIO *data, int flags,\n                     int ctype_nid, int econt_nid,\n                     STACK_OF(X509_ALGOR) *mdalgs, const ASN1_ITEM *it);\nASN1_VALUE *SMIME_read_ASN1(BIO *bio, BIO **bcont, const ASN1_ITEM *it);\nint SMIME_crlf_copy(BIO *in, BIO *out, int flags);\nint SMIME_text(BIO *in, BIO *out);\n\n/* BEGIN ERROR CODES */\n/*\n * The following lines are auto generated by the script mkerr.pl. Any changes\n * made after this point may be overwritten when the script is next run.\n */\nvoid ERR_load_ASN1_strings(void);\n\n/* Error codes for the ASN1 functions. */\n\n/* Function codes. */\n# define ASN1_F_A2D_ASN1_OBJECT                           100\n# define ASN1_F_A2I_ASN1_ENUMERATED                       101\n# define ASN1_F_A2I_ASN1_INTEGER                          102\n# define ASN1_F_A2I_ASN1_STRING                           103\n# define ASN1_F_APPEND_EXP                                176\n# define ASN1_F_ASN1_BIT_STRING_SET_BIT                   183\n# define ASN1_F_ASN1_CB                                   177\n# define ASN1_F_ASN1_CHECK_TLEN                           104\n# define ASN1_F_ASN1_COLLATE_PRIMITIVE                    105\n# define ASN1_F_ASN1_COLLECT                              106\n# define ASN1_F_ASN1_D2I_EX_PRIMITIVE                     108\n# define ASN1_F_ASN1_D2I_FP                               109\n# define ASN1_F_ASN1_D2I_READ_BIO                         107\n# define ASN1_F_ASN1_DIGEST                               184\n# define ASN1_F_ASN1_DO_ADB                               110\n# define ASN1_F_ASN1_DUP                                  111\n# define ASN1_F_ASN1_ENUMERATED_SET                       112\n# define ASN1_F_ASN1_ENUMERATED_TO_BN                     113\n# define ASN1_F_ASN1_EX_C2I                               204\n# define ASN1_F_ASN1_FIND_END                             190\n# define ASN1_F_ASN1_GENERALIZEDTIME_ADJ                  216\n# define ASN1_F_ASN1_GENERALIZEDTIME_SET                  185\n# define ASN1_F_ASN1_GENERATE_V3                          178\n# define ASN1_F_ASN1_GET_OBJECT                           114\n# define ASN1_F_ASN1_HEADER_NEW                           115\n# define ASN1_F_ASN1_I2D_BIO                              116\n# define ASN1_F_ASN1_I2D_FP                               117\n# define ASN1_F_ASN1_INTEGER_SET                          118\n# define ASN1_F_ASN1_INTEGER_TO_BN                        119\n# define ASN1_F_ASN1_ITEM_D2I_FP                          206\n# define ASN1_F_ASN1_ITEM_DUP                             191\n# define ASN1_F_ASN1_ITEM_EX_COMBINE_NEW                  121\n# define ASN1_F_ASN1_ITEM_EX_D2I                          120\n# define ASN1_F_ASN1_ITEM_I2D_BIO                         192\n# define ASN1_F_ASN1_ITEM_I2D_FP                          193\n# define ASN1_F_ASN1_ITEM_PACK                            198\n# define ASN1_F_ASN1_ITEM_SIGN                            195\n# define ASN1_F_ASN1_ITEM_SIGN_CTX                        220\n# define ASN1_F_ASN1_ITEM_UNPACK                          199\n# define ASN1_F_ASN1_ITEM_VERIFY                          197\n# define ASN1_F_ASN1_MBSTRING_NCOPY                       122\n# define ASN1_F_ASN1_OBJECT_NEW                           123\n# define ASN1_F_ASN1_OUTPUT_DATA                          214\n# define ASN1_F_ASN1_PACK_STRING                          124\n# define ASN1_F_ASN1_PCTX_NEW                             205\n# define ASN1_F_ASN1_PKCS5_PBE_SET                        125\n# define ASN1_F_ASN1_SEQ_PACK                             126\n# define ASN1_F_ASN1_SEQ_UNPACK                           127\n# define ASN1_F_ASN1_SIGN                                 128\n# define ASN1_F_ASN1_STR2TYPE                             179\n# define ASN1_F_ASN1_STRING_SET                           186\n# define ASN1_F_ASN1_STRING_TABLE_ADD                     129\n# define ASN1_F_ASN1_STRING_TYPE_NEW                      130\n# define ASN1_F_ASN1_TEMPLATE_EX_D2I                      132\n# define ASN1_F_ASN1_TEMPLATE_NEW                         133\n# define ASN1_F_ASN1_TEMPLATE_NOEXP_D2I                   131\n# define ASN1_F_ASN1_TIME_ADJ                             217\n# define ASN1_F_ASN1_TIME_SET                             175\n# define ASN1_F_ASN1_TYPE_GET_INT_OCTETSTRING             134\n# define ASN1_F_ASN1_TYPE_GET_OCTETSTRING                 135\n# define ASN1_F_ASN1_UNPACK_STRING                        136\n# define ASN1_F_ASN1_UTCTIME_ADJ                          218\n# define ASN1_F_ASN1_UTCTIME_SET                          187\n# define ASN1_F_ASN1_VERIFY                               137\n# define ASN1_F_B64_READ_ASN1                             209\n# define ASN1_F_B64_WRITE_ASN1                            210\n# define ASN1_F_BIO_NEW_NDEF                              208\n# define ASN1_F_BITSTR_CB                                 180\n# define ASN1_F_BN_TO_ASN1_ENUMERATED                     138\n# define ASN1_F_BN_TO_ASN1_INTEGER                        139\n# define ASN1_F_C2I_ASN1_BIT_STRING                       189\n# define ASN1_F_C2I_ASN1_INTEGER                          194\n# define ASN1_F_C2I_ASN1_OBJECT                           196\n# define ASN1_F_COLLECT_DATA                              140\n# define ASN1_F_D2I_ASN1_BIT_STRING                       141\n# define ASN1_F_D2I_ASN1_BOOLEAN                          142\n# define ASN1_F_D2I_ASN1_BYTES                            143\n# define ASN1_F_D2I_ASN1_GENERALIZEDTIME                  144\n# define ASN1_F_D2I_ASN1_HEADER                           145\n# define ASN1_F_D2I_ASN1_INTEGER                          146\n# define ASN1_F_D2I_ASN1_OBJECT                           147\n# define ASN1_F_D2I_ASN1_SET                              148\n# define ASN1_F_D2I_ASN1_TYPE_BYTES                       149\n# define ASN1_F_D2I_ASN1_UINTEGER                         150\n# define ASN1_F_D2I_ASN1_UTCTIME                          151\n# define ASN1_F_D2I_AUTOPRIVATEKEY                        207\n# define ASN1_F_D2I_NETSCAPE_RSA                          152\n# define ASN1_F_D2I_NETSCAPE_RSA_2                        153\n# define ASN1_F_D2I_PRIVATEKEY                            154\n# define ASN1_F_D2I_PUBLICKEY                             155\n# define ASN1_F_D2I_RSA_NET                               200\n# define ASN1_F_D2I_RSA_NET_2                             201\n# define ASN1_F_D2I_X509                                  156\n# define ASN1_F_D2I_X509_CINF                             157\n# define ASN1_F_D2I_X509_PKEY                             159\n# define ASN1_F_I2D_ASN1_BIO_STREAM                       211\n# define ASN1_F_I2D_ASN1_SET                              188\n# define ASN1_F_I2D_ASN1_TIME                             160\n# define ASN1_F_I2D_DSA_PUBKEY                            161\n# define ASN1_F_I2D_EC_PUBKEY                             181\n# define ASN1_F_I2D_PRIVATEKEY                            163\n# define ASN1_F_I2D_PUBLICKEY                             164\n# define ASN1_F_I2D_RSA_NET                               162\n# define ASN1_F_I2D_RSA_PUBKEY                            165\n# define ASN1_F_LONG_C2I                                  166\n# define ASN1_F_OID_MODULE_INIT                           174\n# define ASN1_F_PARSE_TAGGING                             182\n# define ASN1_F_PKCS5_PBE2_SET_IV                         167\n# define ASN1_F_PKCS5_PBE_SET                             202\n# define ASN1_F_PKCS5_PBE_SET0_ALGOR                      215\n# define ASN1_F_PKCS5_PBKDF2_SET                          219\n# define ASN1_F_SMIME_READ_ASN1                           212\n# define ASN1_F_SMIME_TEXT                                213\n# define ASN1_F_X509_CINF_NEW                             168\n# define ASN1_F_X509_CRL_ADD0_REVOKED                     169\n# define ASN1_F_X509_INFO_NEW                             170\n# define ASN1_F_X509_NAME_ENCODE                          203\n# define ASN1_F_X509_NAME_EX_D2I                          158\n# define ASN1_F_X509_NAME_EX_NEW                          171\n# define ASN1_F_X509_NEW                                  172\n# define ASN1_F_X509_PKEY_NEW                             173\n\n/* Reason codes. */\n# define ASN1_R_ADDING_OBJECT                             171\n# define ASN1_R_ASN1_PARSE_ERROR                          203\n# define ASN1_R_ASN1_SIG_PARSE_ERROR                      204\n# define ASN1_R_AUX_ERROR                                 100\n# define ASN1_R_BAD_CLASS                                 101\n# define ASN1_R_BAD_OBJECT_HEADER                         102\n# define ASN1_R_BAD_PASSWORD_READ                         103\n# define ASN1_R_BAD_TAG                                   104\n# define ASN1_R_BMPSTRING_IS_WRONG_LENGTH                 214\n# define ASN1_R_BN_LIB                                    105\n# define ASN1_R_BOOLEAN_IS_WRONG_LENGTH                   106\n# define ASN1_R_BUFFER_TOO_SMALL                          107\n# define ASN1_R_CIPHER_HAS_NO_OBJECT_IDENTIFIER           108\n# define ASN1_R_CONTEXT_NOT_INITIALISED                   217\n# define ASN1_R_DATA_IS_WRONG                             109\n# define ASN1_R_DECODE_ERROR                              110\n# define ASN1_R_DECODING_ERROR                            111\n# define ASN1_R_DEPTH_EXCEEDED                            174\n# define ASN1_R_DIGEST_AND_KEY_TYPE_NOT_SUPPORTED         198\n# define ASN1_R_ENCODE_ERROR                              112\n# define ASN1_R_ERROR_GETTING_TIME                        173\n# define ASN1_R_ERROR_LOADING_SECTION                     172\n# define ASN1_R_ERROR_PARSING_SET_ELEMENT                 113\n# define ASN1_R_ERROR_SETTING_CIPHER_PARAMS               114\n# define ASN1_R_EXPECTING_AN_INTEGER                      115\n# define ASN1_R_EXPECTING_AN_OBJECT                       116\n# define ASN1_R_EXPECTING_A_BOOLEAN                       117\n# define ASN1_R_EXPECTING_A_TIME                          118\n# define ASN1_R_EXPLICIT_LENGTH_MISMATCH                  119\n# define ASN1_R_EXPLICIT_TAG_NOT_CONSTRUCTED              120\n# define ASN1_R_FIELD_MISSING                             121\n# define ASN1_R_FIRST_NUM_TOO_LARGE                       122\n# define ASN1_R_HEADER_TOO_LONG                           123\n# define ASN1_R_ILLEGAL_BITSTRING_FORMAT                  175\n# define ASN1_R_ILLEGAL_BOOLEAN                           176\n# define ASN1_R_ILLEGAL_CHARACTERS                        124\n# define ASN1_R_ILLEGAL_FORMAT                            177\n# define ASN1_R_ILLEGAL_HEX                               178\n# define ASN1_R_ILLEGAL_IMPLICIT_TAG                      179\n# define ASN1_R_ILLEGAL_INTEGER                           180\n# define ASN1_R_ILLEGAL_NESTED_TAGGING                    181\n# define ASN1_R_ILLEGAL_NULL                              125\n# define ASN1_R_ILLEGAL_NULL_VALUE                        182\n# define ASN1_R_ILLEGAL_OBJECT                            183\n# define ASN1_R_ILLEGAL_OPTIONAL_ANY                      126\n# define ASN1_R_ILLEGAL_OPTIONS_ON_ITEM_TEMPLATE          170\n# define ASN1_R_ILLEGAL_TAGGED_ANY                        127\n# define ASN1_R_ILLEGAL_TIME_VALUE                        184\n# define ASN1_R_INTEGER_NOT_ASCII_FORMAT                  185\n# define ASN1_R_INTEGER_TOO_LARGE_FOR_LONG                128\n# define ASN1_R_INVALID_BIT_STRING_BITS_LEFT              220\n# define ASN1_R_INVALID_BMPSTRING_LENGTH                  129\n# define ASN1_R_INVALID_DIGIT                             130\n# define ASN1_R_INVALID_MIME_TYPE                         205\n# define ASN1_R_INVALID_MODIFIER                          186\n# define ASN1_R_INVALID_NUMBER                            187\n# define ASN1_R_INVALID_OBJECT_ENCODING                   216\n# define ASN1_R_INVALID_SEPARATOR                         131\n# define ASN1_R_INVALID_TIME_FORMAT                       132\n# define ASN1_R_INVALID_UNIVERSALSTRING_LENGTH            133\n# define ASN1_R_INVALID_UTF8STRING                        134\n# define ASN1_R_IV_TOO_LARGE                              135\n# define ASN1_R_LENGTH_ERROR                              136\n# define ASN1_R_LIST_ERROR                                188\n# define ASN1_R_MIME_NO_CONTENT_TYPE                      206\n# define ASN1_R_MIME_PARSE_ERROR                          207\n# define ASN1_R_MIME_SIG_PARSE_ERROR                      208\n# define ASN1_R_MISSING_EOC                               137\n# define ASN1_R_MISSING_SECOND_NUMBER                     138\n# define ASN1_R_MISSING_VALUE                             189\n# define ASN1_R_MSTRING_NOT_UNIVERSAL                     139\n# define ASN1_R_MSTRING_WRONG_TAG                         140\n# define ASN1_R_NESTED_ASN1_STRING                        197\n# define ASN1_R_NON_HEX_CHARACTERS                        141\n# define ASN1_R_NOT_ASCII_FORMAT                          190\n# define ASN1_R_NOT_ENOUGH_DATA                           142\n# define ASN1_R_NO_CONTENT_TYPE                           209\n# define ASN1_R_NO_DEFAULT_DIGEST                         201\n# define ASN1_R_NO_MATCHING_CHOICE_TYPE                   143\n# define ASN1_R_NO_MULTIPART_BODY_FAILURE                 210\n# define ASN1_R_NO_MULTIPART_BOUNDARY                     211\n# define ASN1_R_NO_SIG_CONTENT_TYPE                       212\n# define ASN1_R_NULL_IS_WRONG_LENGTH                      144\n# define ASN1_R_OBJECT_NOT_ASCII_FORMAT                   191\n# define ASN1_R_ODD_NUMBER_OF_CHARS                       145\n# define ASN1_R_PRIVATE_KEY_HEADER_MISSING                146\n# define ASN1_R_SECOND_NUMBER_TOO_LARGE                   147\n# define ASN1_R_SEQUENCE_LENGTH_MISMATCH                  148\n# define ASN1_R_SEQUENCE_NOT_CONSTRUCTED                  149\n# define ASN1_R_SEQUENCE_OR_SET_NEEDS_CONFIG              192\n# define ASN1_R_SHORT_LINE                                150\n# define ASN1_R_SIG_INVALID_MIME_TYPE                     213\n# define ASN1_R_STREAMING_NOT_SUPPORTED                   202\n# define ASN1_R_STRING_TOO_LONG                           151\n# define ASN1_R_STRING_TOO_SHORT                          152\n# define ASN1_R_TAG_VALUE_TOO_HIGH                        153\n# define ASN1_R_THE_ASN1_OBJECT_IDENTIFIER_IS_NOT_KNOWN_FOR_THIS_MD 154\n# define ASN1_R_TIME_NOT_ASCII_FORMAT                     193\n# define ASN1_R_TOO_LONG                                  155\n# define ASN1_R_TYPE_NOT_CONSTRUCTED                      156\n# define ASN1_R_TYPE_NOT_PRIMITIVE                        218\n# define ASN1_R_UNABLE_TO_DECODE_RSA_KEY                  157\n# define ASN1_R_UNABLE_TO_DECODE_RSA_PRIVATE_KEY          158\n# define ASN1_R_UNEXPECTED_EOC                            159\n# define ASN1_R_UNIVERSALSTRING_IS_WRONG_LENGTH           215\n# define ASN1_R_UNKNOWN_FORMAT                            160\n# define ASN1_R_UNKNOWN_MESSAGE_DIGEST_ALGORITHM          161\n# define ASN1_R_UNKNOWN_OBJECT_TYPE                       162\n# define ASN1_R_UNKNOWN_PUBLIC_KEY_TYPE                   163\n# define ASN1_R_UNKNOWN_SIGNATURE_ALGORITHM               199\n# define ASN1_R_UNKNOWN_TAG                               194\n# define ASN1_R_UNKOWN_FORMAT                             195\n# define ASN1_R_UNSUPPORTED_ANY_DEFINED_BY_TYPE           164\n# define ASN1_R_UNSUPPORTED_CIPHER                        165\n# define ASN1_R_UNSUPPORTED_ENCRYPTION_ALGORITHM          166\n# define ASN1_R_UNSUPPORTED_PUBLIC_KEY_TYPE               167\n# define ASN1_R_UNSUPPORTED_TYPE                          196\n# define ASN1_R_WRONG_PUBLIC_KEY_TYPE                     200\n# define ASN1_R_WRONG_TAG                                 168\n# define ASN1_R_WRONG_TYPE                                169\n\n#ifdef  __cplusplus\n}\n#endif\n#endif\n"
  },
  {
    "path": "Pods/OpenSSL-Universal/include-ios/openssl/asn1_mac.h",
    "content": "/* crypto/asn1/asn1_mac.h */\n/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)\n * All rights reserved.\n *\n * This package is an SSL implementation written\n * by Eric Young (eay@cryptsoft.com).\n * The implementation was written so as to conform with Netscapes SSL.\n *\n * This library is free for commercial and non-commercial use as long as\n * the following conditions are aheared to.  The following conditions\n * apply to all code found in this distribution, be it the RC4, RSA,\n * lhash, DES, etc., code; not just the SSL code.  The SSL documentation\n * included with this distribution is covered by the same copyright terms\n * except that the holder is Tim Hudson (tjh@cryptsoft.com).\n *\n * Copyright remains Eric Young's, and as such any Copyright notices in\n * the code are not to be removed.\n * If this package is used in a product, Eric Young should be given attribution\n * as the author of the parts of the library used.\n * This can be in the form of a textual message at program startup or\n * in documentation (online or textual) provided with the package.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n * 1. Redistributions of source code must retain the copyright\n *    notice, this list of conditions and the following disclaimer.\n * 2. Redistributions in binary form must reproduce the above copyright\n *    notice, this list of conditions and the following disclaimer in the\n *    documentation and/or other materials provided with the distribution.\n * 3. All advertising materials mentioning features or use of this software\n *    must display the following acknowledgement:\n *    \"This product includes cryptographic software written by\n *     Eric Young (eay@cryptsoft.com)\"\n *    The word 'cryptographic' can be left out if the rouines from the library\n *    being used are not cryptographic related :-).\n * 4. If you include any Windows specific code (or a derivative thereof) from\n *    the apps directory (application code) you must include an acknowledgement:\n *    \"This product includes software written by Tim Hudson (tjh@cryptsoft.com)\"\n *\n * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND\n * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE\n * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n * SUCH DAMAGE.\n *\n * The licence and distribution terms for any publically available version or\n * derivative of this code cannot be changed.  i.e. this code cannot simply be\n * copied and put under another distribution licence\n * [including the GNU Public Licence.]\n */\n\n#ifndef HEADER_ASN1_MAC_H\n# define HEADER_ASN1_MAC_H\n\n# include <openssl/asn1.h>\n\n#ifdef  __cplusplus\nextern \"C\" {\n#endif\n\n# ifndef ASN1_MAC_ERR_LIB\n#  define ASN1_MAC_ERR_LIB        ERR_LIB_ASN1\n# endif\n\n# define ASN1_MAC_H_err(f,r,line) \\\n        ERR_PUT_error(ASN1_MAC_ERR_LIB,(f),(r),__FILE__,(line))\n\n# define M_ASN1_D2I_vars(a,type,func) \\\n        ASN1_const_CTX c; \\\n        type ret=NULL; \\\n        \\\n        c.pp=(const unsigned char **)pp; \\\n        c.q= *(const unsigned char **)pp; \\\n        c.error=ERR_R_NESTED_ASN1_ERROR; \\\n        if ((a == NULL) || ((*a) == NULL)) \\\n                { if ((ret=(type)func()) == NULL) \\\n                        { c.line=__LINE__; goto err; } } \\\n        else    ret=(*a);\n\n# define M_ASN1_D2I_Init() \\\n        c.p= *(const unsigned char **)pp; \\\n        c.max=(length == 0)?0:(c.p+length);\n\n# define M_ASN1_D2I_Finish_2(a) \\\n        if (!asn1_const_Finish(&c)) \\\n                { c.line=__LINE__; goto err; } \\\n        *(const unsigned char **)pp=c.p; \\\n        if (a != NULL) (*a)=ret; \\\n        return(ret);\n\n# define M_ASN1_D2I_Finish(a,func,e) \\\n        M_ASN1_D2I_Finish_2(a); \\\nerr:\\\n        ASN1_MAC_H_err((e),c.error,c.line); \\\n        asn1_add_error(*(const unsigned char **)pp,(int)(c.q- *pp)); \\\n        if ((ret != NULL) && ((a == NULL) || (*a != ret))) func(ret); \\\n        return(NULL)\n\n# define M_ASN1_D2I_start_sequence() \\\n        if (!asn1_GetSequence(&c,&length)) \\\n                { c.line=__LINE__; goto err; }\n/* Begin reading ASN1 without a surrounding sequence */\n# define M_ASN1_D2I_begin() \\\n        c.slen = length;\n\n/* End reading ASN1 with no check on length */\n# define M_ASN1_D2I_Finish_nolen(a, func, e) \\\n        *pp=c.p; \\\n        if (a != NULL) (*a)=ret; \\\n        return(ret); \\\nerr:\\\n        ASN1_MAC_H_err((e),c.error,c.line); \\\n        asn1_add_error(*pp,(int)(c.q- *pp)); \\\n        if ((ret != NULL) && ((a == NULL) || (*a != ret))) func(ret); \\\n        return(NULL)\n\n# define M_ASN1_D2I_end_sequence() \\\n        (((c.inf&1) == 0)?(c.slen <= 0): \\\n                (c.eos=ASN1_const_check_infinite_end(&c.p,c.slen)))\n\n/* Don't use this with d2i_ASN1_BOOLEAN() */\n# define M_ASN1_D2I_get(b, func) \\\n        c.q=c.p; \\\n        if (func(&(b),&c.p,c.slen) == NULL) \\\n                {c.line=__LINE__; goto err; } \\\n        c.slen-=(c.p-c.q);\n\n/* Don't use this with d2i_ASN1_BOOLEAN() */\n# define M_ASN1_D2I_get_x(type,b,func) \\\n        c.q=c.p; \\\n        if (((D2I_OF(type))func)(&(b),&c.p,c.slen) == NULL) \\\n                {c.line=__LINE__; goto err; } \\\n        c.slen-=(c.p-c.q);\n\n/* use this instead () */\n# define M_ASN1_D2I_get_int(b,func) \\\n        c.q=c.p; \\\n        if (func(&(b),&c.p,c.slen) < 0) \\\n                {c.line=__LINE__; goto err; } \\\n        c.slen-=(c.p-c.q);\n\n# define M_ASN1_D2I_get_opt(b,func,type) \\\n        if ((c.slen != 0) && ((M_ASN1_next & (~V_ASN1_CONSTRUCTED)) \\\n                == (V_ASN1_UNIVERSAL|(type)))) \\\n                { \\\n                M_ASN1_D2I_get(b,func); \\\n                }\n\n# define M_ASN1_D2I_get_int_opt(b,func,type) \\\n        if ((c.slen != 0) && ((M_ASN1_next & (~V_ASN1_CONSTRUCTED)) \\\n                == (V_ASN1_UNIVERSAL|(type)))) \\\n                { \\\n                M_ASN1_D2I_get_int(b,func); \\\n                }\n\n# define M_ASN1_D2I_get_imp(b,func, type) \\\n        M_ASN1_next=(_tmp& V_ASN1_CONSTRUCTED)|type; \\\n        c.q=c.p; \\\n        if (func(&(b),&c.p,c.slen) == NULL) \\\n                {c.line=__LINE__; M_ASN1_next_prev = _tmp; goto err; } \\\n        c.slen-=(c.p-c.q);\\\n        M_ASN1_next_prev=_tmp;\n\n# define M_ASN1_D2I_get_IMP_opt(b,func,tag,type) \\\n        if ((c.slen != 0) && ((M_ASN1_next & (~V_ASN1_CONSTRUCTED)) == \\\n                (V_ASN1_CONTEXT_SPECIFIC|(tag)))) \\\n                { \\\n                unsigned char _tmp = M_ASN1_next; \\\n                M_ASN1_D2I_get_imp(b,func, type);\\\n                }\n\n# define M_ASN1_D2I_get_set(r,func,free_func) \\\n                M_ASN1_D2I_get_imp_set(r,func,free_func, \\\n                        V_ASN1_SET,V_ASN1_UNIVERSAL);\n\n# define M_ASN1_D2I_get_set_type(type,r,func,free_func) \\\n                M_ASN1_D2I_get_imp_set_type(type,r,func,free_func, \\\n                        V_ASN1_SET,V_ASN1_UNIVERSAL);\n\n# define M_ASN1_D2I_get_set_opt(r,func,free_func) \\\n        if ((c.slen != 0) && (M_ASN1_next == (V_ASN1_UNIVERSAL| \\\n                V_ASN1_CONSTRUCTED|V_ASN1_SET)))\\\n                { M_ASN1_D2I_get_set(r,func,free_func); }\n\n# define M_ASN1_D2I_get_set_opt_type(type,r,func,free_func) \\\n        if ((c.slen != 0) && (M_ASN1_next == (V_ASN1_UNIVERSAL| \\\n                V_ASN1_CONSTRUCTED|V_ASN1_SET)))\\\n                { M_ASN1_D2I_get_set_type(type,r,func,free_func); }\n\n# define M_ASN1_I2D_len_SET_opt(a,f) \\\n        if ((a != NULL) && (sk_num(a) != 0)) \\\n                M_ASN1_I2D_len_SET(a,f);\n\n# define M_ASN1_I2D_put_SET_opt(a,f) \\\n        if ((a != NULL) && (sk_num(a) != 0)) \\\n                M_ASN1_I2D_put_SET(a,f);\n\n# define M_ASN1_I2D_put_SEQUENCE_opt(a,f) \\\n        if ((a != NULL) && (sk_num(a) != 0)) \\\n                M_ASN1_I2D_put_SEQUENCE(a,f);\n\n# define M_ASN1_I2D_put_SEQUENCE_opt_type(type,a,f) \\\n        if ((a != NULL) && (sk_##type##_num(a) != 0)) \\\n                M_ASN1_I2D_put_SEQUENCE_type(type,a,f);\n\n# define M_ASN1_D2I_get_IMP_set_opt(b,func,free_func,tag) \\\n        if ((c.slen != 0) && \\\n                (M_ASN1_next == \\\n                (V_ASN1_CONTEXT_SPECIFIC|V_ASN1_CONSTRUCTED|(tag))))\\\n                { \\\n                M_ASN1_D2I_get_imp_set(b,func,free_func,\\\n                        tag,V_ASN1_CONTEXT_SPECIFIC); \\\n                }\n\n# define M_ASN1_D2I_get_IMP_set_opt_type(type,b,func,free_func,tag) \\\n        if ((c.slen != 0) && \\\n                (M_ASN1_next == \\\n                (V_ASN1_CONTEXT_SPECIFIC|V_ASN1_CONSTRUCTED|(tag))))\\\n                { \\\n                M_ASN1_D2I_get_imp_set_type(type,b,func,free_func,\\\n                        tag,V_ASN1_CONTEXT_SPECIFIC); \\\n                }\n\n# define M_ASN1_D2I_get_seq(r,func,free_func) \\\n                M_ASN1_D2I_get_imp_set(r,func,free_func,\\\n                        V_ASN1_SEQUENCE,V_ASN1_UNIVERSAL);\n\n# define M_ASN1_D2I_get_seq_type(type,r,func,free_func) \\\n                M_ASN1_D2I_get_imp_set_type(type,r,func,free_func,\\\n                                            V_ASN1_SEQUENCE,V_ASN1_UNIVERSAL)\n\n# define M_ASN1_D2I_get_seq_opt(r,func,free_func) \\\n        if ((c.slen != 0) && (M_ASN1_next == (V_ASN1_UNIVERSAL| \\\n                V_ASN1_CONSTRUCTED|V_ASN1_SEQUENCE)))\\\n                { M_ASN1_D2I_get_seq(r,func,free_func); }\n\n# define M_ASN1_D2I_get_seq_opt_type(type,r,func,free_func) \\\n        if ((c.slen != 0) && (M_ASN1_next == (V_ASN1_UNIVERSAL| \\\n                V_ASN1_CONSTRUCTED|V_ASN1_SEQUENCE)))\\\n                { M_ASN1_D2I_get_seq_type(type,r,func,free_func); }\n\n# define M_ASN1_D2I_get_IMP_set(r,func,free_func,x) \\\n                M_ASN1_D2I_get_imp_set(r,func,free_func,\\\n                        x,V_ASN1_CONTEXT_SPECIFIC);\n\n# define M_ASN1_D2I_get_IMP_set_type(type,r,func,free_func,x) \\\n                M_ASN1_D2I_get_imp_set_type(type,r,func,free_func,\\\n                        x,V_ASN1_CONTEXT_SPECIFIC);\n\n# define M_ASN1_D2I_get_imp_set(r,func,free_func,a,b) \\\n        c.q=c.p; \\\n        if (d2i_ASN1_SET(&(r),&c.p,c.slen,(char *(*)())func,\\\n                (void (*)())free_func,a,b) == NULL) \\\n                { c.line=__LINE__; goto err; } \\\n        c.slen-=(c.p-c.q);\n\n# define M_ASN1_D2I_get_imp_set_type(type,r,func,free_func,a,b) \\\n        c.q=c.p; \\\n        if (d2i_ASN1_SET_OF_##type(&(r),&c.p,c.slen,func,\\\n                                   free_func,a,b) == NULL) \\\n                { c.line=__LINE__; goto err; } \\\n        c.slen-=(c.p-c.q);\n\n# define M_ASN1_D2I_get_set_strings(r,func,a,b) \\\n        c.q=c.p; \\\n        if (d2i_ASN1_STRING_SET(&(r),&c.p,c.slen,a,b) == NULL) \\\n                { c.line=__LINE__; goto err; } \\\n        c.slen-=(c.p-c.q);\n\n# define M_ASN1_D2I_get_EXP_opt(r,func,tag) \\\n        if ((c.slen != 0L) && (M_ASN1_next == \\\n                (V_ASN1_CONSTRUCTED|V_ASN1_CONTEXT_SPECIFIC|tag))) \\\n                { \\\n                int Tinf,Ttag,Tclass; \\\n                long Tlen; \\\n                \\\n                c.q=c.p; \\\n                Tinf=ASN1_get_object(&c.p,&Tlen,&Ttag,&Tclass,c.slen); \\\n                if (Tinf & 0x80) \\\n                        { c.error=ERR_R_BAD_ASN1_OBJECT_HEADER; \\\n                        c.line=__LINE__; goto err; } \\\n                if (Tinf == (V_ASN1_CONSTRUCTED+1)) \\\n                                        Tlen = c.slen - (c.p - c.q) - 2; \\\n                if (func(&(r),&c.p,Tlen) == NULL) \\\n                        { c.line=__LINE__; goto err; } \\\n                if (Tinf == (V_ASN1_CONSTRUCTED+1)) { \\\n                        Tlen = c.slen - (c.p - c.q); \\\n                        if(!ASN1_const_check_infinite_end(&c.p, Tlen)) \\\n                                { c.error=ERR_R_MISSING_ASN1_EOS; \\\n                                c.line=__LINE__; goto err; } \\\n                }\\\n                c.slen-=(c.p-c.q); \\\n                }\n\n# define M_ASN1_D2I_get_EXP_set_opt(r,func,free_func,tag,b) \\\n        if ((c.slen != 0) && (M_ASN1_next == \\\n                (V_ASN1_CONSTRUCTED|V_ASN1_CONTEXT_SPECIFIC|tag))) \\\n                { \\\n                int Tinf,Ttag,Tclass; \\\n                long Tlen; \\\n                \\\n                c.q=c.p; \\\n                Tinf=ASN1_get_object(&c.p,&Tlen,&Ttag,&Tclass,c.slen); \\\n                if (Tinf & 0x80) \\\n                        { c.error=ERR_R_BAD_ASN1_OBJECT_HEADER; \\\n                        c.line=__LINE__; goto err; } \\\n                if (Tinf == (V_ASN1_CONSTRUCTED+1)) \\\n                                        Tlen = c.slen - (c.p - c.q) - 2; \\\n                if (d2i_ASN1_SET(&(r),&c.p,Tlen,(char *(*)())func, \\\n                        (void (*)())free_func, \\\n                        b,V_ASN1_UNIVERSAL) == NULL) \\\n                        { c.line=__LINE__; goto err; } \\\n                if (Tinf == (V_ASN1_CONSTRUCTED+1)) { \\\n                        Tlen = c.slen - (c.p - c.q); \\\n                        if(!ASN1_check_infinite_end(&c.p, Tlen)) \\\n                                { c.error=ERR_R_MISSING_ASN1_EOS; \\\n                                c.line=__LINE__; goto err; } \\\n                }\\\n                c.slen-=(c.p-c.q); \\\n                }\n\n# define M_ASN1_D2I_get_EXP_set_opt_type(type,r,func,free_func,tag,b) \\\n        if ((c.slen != 0) && (M_ASN1_next == \\\n                (V_ASN1_CONSTRUCTED|V_ASN1_CONTEXT_SPECIFIC|tag))) \\\n                { \\\n                int Tinf,Ttag,Tclass; \\\n                long Tlen; \\\n                \\\n                c.q=c.p; \\\n                Tinf=ASN1_get_object(&c.p,&Tlen,&Ttag,&Tclass,c.slen); \\\n                if (Tinf & 0x80) \\\n                        { c.error=ERR_R_BAD_ASN1_OBJECT_HEADER; \\\n                        c.line=__LINE__; goto err; } \\\n                if (Tinf == (V_ASN1_CONSTRUCTED+1)) \\\n                                        Tlen = c.slen - (c.p - c.q) - 2; \\\n                if (d2i_ASN1_SET_OF_##type(&(r),&c.p,Tlen,func, \\\n                        free_func,b,V_ASN1_UNIVERSAL) == NULL) \\\n                        { c.line=__LINE__; goto err; } \\\n                if (Tinf == (V_ASN1_CONSTRUCTED+1)) { \\\n                        Tlen = c.slen - (c.p - c.q); \\\n                        if(!ASN1_check_infinite_end(&c.p, Tlen)) \\\n                                { c.error=ERR_R_MISSING_ASN1_EOS; \\\n                                c.line=__LINE__; goto err; } \\\n                }\\\n                c.slen-=(c.p-c.q); \\\n                }\n\n/* New macros */\n# define M_ASN1_New_Malloc(ret,type) \\\n        if ((ret=(type *)OPENSSL_malloc(sizeof(type))) == NULL) \\\n                { c.line=__LINE__; goto err2; }\n\n# define M_ASN1_New(arg,func) \\\n        if (((arg)=func()) == NULL) return(NULL)\n\n# define M_ASN1_New_Error(a) \\\n/*-     err:    ASN1_MAC_H_err((a),ERR_R_NESTED_ASN1_ERROR,c.line); \\\n                return(NULL);*/ \\\n        err2:   ASN1_MAC_H_err((a),ERR_R_MALLOC_FAILURE,c.line); \\\n                return(NULL)\n\n/*\n * BIG UGLY WARNING! This is so damn ugly I wanna puke.  Unfortunately, some\n * macros that use ASN1_const_CTX still insist on writing in the input\n * stream.  ARGH! ARGH! ARGH! Let's get rid of this macro package. Please? --\n * Richard Levitte\n */\n# define M_ASN1_next             (*((unsigned char *)(c.p)))\n# define M_ASN1_next_prev        (*((unsigned char *)(c.q)))\n\n/*************************************************/\n\n# define M_ASN1_I2D_vars(a)      int r=0,ret=0; \\\n                                unsigned char *p; \\\n                                if (a == NULL) return(0)\n\n/* Length Macros */\n# define M_ASN1_I2D_len(a,f)     ret+=f(a,NULL)\n# define M_ASN1_I2D_len_IMP_opt(a,f)     if (a != NULL) M_ASN1_I2D_len(a,f)\n\n# define M_ASN1_I2D_len_SET(a,f) \\\n                ret+=i2d_ASN1_SET(a,NULL,f,V_ASN1_SET,V_ASN1_UNIVERSAL,IS_SET);\n\n# define M_ASN1_I2D_len_SET_type(type,a,f) \\\n                ret+=i2d_ASN1_SET_OF_##type(a,NULL,f,V_ASN1_SET, \\\n                                            V_ASN1_UNIVERSAL,IS_SET);\n\n# define M_ASN1_I2D_len_SEQUENCE(a,f) \\\n                ret+=i2d_ASN1_SET(a,NULL,f,V_ASN1_SEQUENCE,V_ASN1_UNIVERSAL, \\\n                                  IS_SEQUENCE);\n\n# define M_ASN1_I2D_len_SEQUENCE_type(type,a,f) \\\n                ret+=i2d_ASN1_SET_OF_##type(a,NULL,f,V_ASN1_SEQUENCE, \\\n                                            V_ASN1_UNIVERSAL,IS_SEQUENCE)\n\n# define M_ASN1_I2D_len_SEQUENCE_opt(a,f) \\\n                if ((a != NULL) && (sk_num(a) != 0)) \\\n                        M_ASN1_I2D_len_SEQUENCE(a,f);\n\n# define M_ASN1_I2D_len_SEQUENCE_opt_type(type,a,f) \\\n                if ((a != NULL) && (sk_##type##_num(a) != 0)) \\\n                        M_ASN1_I2D_len_SEQUENCE_type(type,a,f);\n\n# define M_ASN1_I2D_len_IMP_SET(a,f,x) \\\n                ret+=i2d_ASN1_SET(a,NULL,f,x,V_ASN1_CONTEXT_SPECIFIC,IS_SET);\n\n# define M_ASN1_I2D_len_IMP_SET_type(type,a,f,x) \\\n                ret+=i2d_ASN1_SET_OF_##type(a,NULL,f,x, \\\n                                            V_ASN1_CONTEXT_SPECIFIC,IS_SET);\n\n# define M_ASN1_I2D_len_IMP_SET_opt(a,f,x) \\\n                if ((a != NULL) && (sk_num(a) != 0)) \\\n                        ret+=i2d_ASN1_SET(a,NULL,f,x,V_ASN1_CONTEXT_SPECIFIC, \\\n                                          IS_SET);\n\n# define M_ASN1_I2D_len_IMP_SET_opt_type(type,a,f,x) \\\n                if ((a != NULL) && (sk_##type##_num(a) != 0)) \\\n                        ret+=i2d_ASN1_SET_OF_##type(a,NULL,f,x, \\\n                                               V_ASN1_CONTEXT_SPECIFIC,IS_SET);\n\n# define M_ASN1_I2D_len_IMP_SEQUENCE(a,f,x) \\\n                ret+=i2d_ASN1_SET(a,NULL,f,x,V_ASN1_CONTEXT_SPECIFIC, \\\n                                  IS_SEQUENCE);\n\n# define M_ASN1_I2D_len_IMP_SEQUENCE_opt(a,f,x) \\\n                if ((a != NULL) && (sk_num(a) != 0)) \\\n                        ret+=i2d_ASN1_SET(a,NULL,f,x,V_ASN1_CONTEXT_SPECIFIC, \\\n                                          IS_SEQUENCE);\n\n# define M_ASN1_I2D_len_IMP_SEQUENCE_opt_type(type,a,f,x) \\\n                if ((a != NULL) && (sk_##type##_num(a) != 0)) \\\n                        ret+=i2d_ASN1_SET_OF_##type(a,NULL,f,x, \\\n                                                    V_ASN1_CONTEXT_SPECIFIC, \\\n                                                    IS_SEQUENCE);\n\n# define M_ASN1_I2D_len_EXP_opt(a,f,mtag,v) \\\n                if (a != NULL)\\\n                        { \\\n                        v=f(a,NULL); \\\n                        ret+=ASN1_object_size(1,v,mtag); \\\n                        }\n\n# define M_ASN1_I2D_len_EXP_SET_opt(a,f,mtag,tag,v) \\\n                if ((a != NULL) && (sk_num(a) != 0))\\\n                        { \\\n                        v=i2d_ASN1_SET(a,NULL,f,tag,V_ASN1_UNIVERSAL,IS_SET); \\\n                        ret+=ASN1_object_size(1,v,mtag); \\\n                        }\n\n# define M_ASN1_I2D_len_EXP_SEQUENCE_opt(a,f,mtag,tag,v) \\\n                if ((a != NULL) && (sk_num(a) != 0))\\\n                        { \\\n                        v=i2d_ASN1_SET(a,NULL,f,tag,V_ASN1_UNIVERSAL, \\\n                                       IS_SEQUENCE); \\\n                        ret+=ASN1_object_size(1,v,mtag); \\\n                        }\n\n# define M_ASN1_I2D_len_EXP_SEQUENCE_opt_type(type,a,f,mtag,tag,v) \\\n                if ((a != NULL) && (sk_##type##_num(a) != 0))\\\n                        { \\\n                        v=i2d_ASN1_SET_OF_##type(a,NULL,f,tag, \\\n                                                 V_ASN1_UNIVERSAL, \\\n                                                 IS_SEQUENCE); \\\n                        ret+=ASN1_object_size(1,v,mtag); \\\n                        }\n\n/* Put Macros */\n# define M_ASN1_I2D_put(a,f)     f(a,&p)\n\n# define M_ASN1_I2D_put_IMP_opt(a,f,t)   \\\n                if (a != NULL) \\\n                        { \\\n                        unsigned char *q=p; \\\n                        f(a,&p); \\\n                        *q=(V_ASN1_CONTEXT_SPECIFIC|t|(*q&V_ASN1_CONSTRUCTED));\\\n                        }\n\n# define M_ASN1_I2D_put_SET(a,f) i2d_ASN1_SET(a,&p,f,V_ASN1_SET,\\\n                        V_ASN1_UNIVERSAL,IS_SET)\n# define M_ASN1_I2D_put_SET_type(type,a,f) \\\n     i2d_ASN1_SET_OF_##type(a,&p,f,V_ASN1_SET,V_ASN1_UNIVERSAL,IS_SET)\n# define M_ASN1_I2D_put_IMP_SET(a,f,x) i2d_ASN1_SET(a,&p,f,x,\\\n                        V_ASN1_CONTEXT_SPECIFIC,IS_SET)\n# define M_ASN1_I2D_put_IMP_SET_type(type,a,f,x) \\\n     i2d_ASN1_SET_OF_##type(a,&p,f,x,V_ASN1_CONTEXT_SPECIFIC,IS_SET)\n# define M_ASN1_I2D_put_IMP_SEQUENCE(a,f,x) i2d_ASN1_SET(a,&p,f,x,\\\n                        V_ASN1_CONTEXT_SPECIFIC,IS_SEQUENCE)\n\n# define M_ASN1_I2D_put_SEQUENCE(a,f) i2d_ASN1_SET(a,&p,f,V_ASN1_SEQUENCE,\\\n                                             V_ASN1_UNIVERSAL,IS_SEQUENCE)\n\n# define M_ASN1_I2D_put_SEQUENCE_type(type,a,f) \\\n     i2d_ASN1_SET_OF_##type(a,&p,f,V_ASN1_SEQUENCE,V_ASN1_UNIVERSAL, \\\n                            IS_SEQUENCE)\n\n# define M_ASN1_I2D_put_SEQUENCE_opt(a,f) \\\n                if ((a != NULL) && (sk_num(a) != 0)) \\\n                        M_ASN1_I2D_put_SEQUENCE(a,f);\n\n# define M_ASN1_I2D_put_IMP_SET_opt(a,f,x) \\\n                if ((a != NULL) && (sk_num(a) != 0)) \\\n                        { i2d_ASN1_SET(a,&p,f,x,V_ASN1_CONTEXT_SPECIFIC, \\\n                                       IS_SET); }\n\n# define M_ASN1_I2D_put_IMP_SET_opt_type(type,a,f,x) \\\n                if ((a != NULL) && (sk_##type##_num(a) != 0)) \\\n                        { i2d_ASN1_SET_OF_##type(a,&p,f,x, \\\n                                                 V_ASN1_CONTEXT_SPECIFIC, \\\n                                                 IS_SET); }\n\n# define M_ASN1_I2D_put_IMP_SEQUENCE_opt(a,f,x) \\\n                if ((a != NULL) && (sk_num(a) != 0)) \\\n                        { i2d_ASN1_SET(a,&p,f,x,V_ASN1_CONTEXT_SPECIFIC, \\\n                                       IS_SEQUENCE); }\n\n# define M_ASN1_I2D_put_IMP_SEQUENCE_opt_type(type,a,f,x) \\\n                if ((a != NULL) && (sk_##type##_num(a) != 0)) \\\n                        { i2d_ASN1_SET_OF_##type(a,&p,f,x, \\\n                                                 V_ASN1_CONTEXT_SPECIFIC, \\\n                                                 IS_SEQUENCE); }\n\n# define M_ASN1_I2D_put_EXP_opt(a,f,tag,v) \\\n                if (a != NULL) \\\n                        { \\\n                        ASN1_put_object(&p,1,v,tag,V_ASN1_CONTEXT_SPECIFIC); \\\n                        f(a,&p); \\\n                        }\n\n# define M_ASN1_I2D_put_EXP_SET_opt(a,f,mtag,tag,v) \\\n                if ((a != NULL) && (sk_num(a) != 0)) \\\n                        { \\\n                        ASN1_put_object(&p,1,v,mtag,V_ASN1_CONTEXT_SPECIFIC); \\\n                        i2d_ASN1_SET(a,&p,f,tag,V_ASN1_UNIVERSAL,IS_SET); \\\n                        }\n\n# define M_ASN1_I2D_put_EXP_SEQUENCE_opt(a,f,mtag,tag,v) \\\n                if ((a != NULL) && (sk_num(a) != 0)) \\\n                        { \\\n                        ASN1_put_object(&p,1,v,mtag,V_ASN1_CONTEXT_SPECIFIC); \\\n                        i2d_ASN1_SET(a,&p,f,tag,V_ASN1_UNIVERSAL,IS_SEQUENCE); \\\n                        }\n\n# define M_ASN1_I2D_put_EXP_SEQUENCE_opt_type(type,a,f,mtag,tag,v) \\\n                if ((a != NULL) && (sk_##type##_num(a) != 0)) \\\n                        { \\\n                        ASN1_put_object(&p,1,v,mtag,V_ASN1_CONTEXT_SPECIFIC); \\\n                        i2d_ASN1_SET_OF_##type(a,&p,f,tag,V_ASN1_UNIVERSAL, \\\n                                               IS_SEQUENCE); \\\n                        }\n\n# define M_ASN1_I2D_seq_total() \\\n                r=ASN1_object_size(1,ret,V_ASN1_SEQUENCE); \\\n                if (pp == NULL) return(r); \\\n                p= *pp; \\\n                ASN1_put_object(&p,1,ret,V_ASN1_SEQUENCE,V_ASN1_UNIVERSAL)\n\n# define M_ASN1_I2D_INF_seq_start(tag,ctx) \\\n                *(p++)=(V_ASN1_CONSTRUCTED|(tag)|(ctx)); \\\n                *(p++)=0x80\n\n# define M_ASN1_I2D_INF_seq_end() *(p++)=0x00; *(p++)=0x00\n\n# define M_ASN1_I2D_finish()     *pp=p; \\\n                                return(r);\n\nint asn1_GetSequence(ASN1_const_CTX *c, long *length);\nvoid asn1_add_error(const unsigned char *address, int offset);\n#ifdef  __cplusplus\n}\n#endif\n\n#endif\n"
  },
  {
    "path": "Pods/OpenSSL-Universal/include-ios/openssl/asn1t.h",
    "content": "/* asn1t.h */\n/*\n * Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL project\n * 2000.\n */\n/* ====================================================================\n * Copyright (c) 2000-2005 The OpenSSL Project.  All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n *\n * 1. Redistributions of source code must retain the above copyright\n *    notice, this list of conditions and the following disclaimer.\n *\n * 2. Redistributions in binary form must reproduce the above copyright\n *    notice, this list of conditions and the following disclaimer in\n *    the documentation and/or other materials provided with the\n *    distribution.\n *\n * 3. All advertising materials mentioning features or use of this\n *    software must display the following acknowledgment:\n *    \"This product includes software developed by the OpenSSL Project\n *    for use in the OpenSSL Toolkit. (http://www.OpenSSL.org/)\"\n *\n * 4. The names \"OpenSSL Toolkit\" and \"OpenSSL Project\" must not be used to\n *    endorse or promote products derived from this software without\n *    prior written permission. For written permission, please contact\n *    licensing@OpenSSL.org.\n *\n * 5. Products derived from this software may not be called \"OpenSSL\"\n *    nor may \"OpenSSL\" appear in their names without prior written\n *    permission of the OpenSSL Project.\n *\n * 6. Redistributions of any form whatsoever must retain the following\n *    acknowledgment:\n *    \"This product includes software developed by the OpenSSL Project\n *    for use in the OpenSSL Toolkit (http://www.OpenSSL.org/)\"\n *\n * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY\n * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\n * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR\n * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,\n * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED\n * OF THE POSSIBILITY OF SUCH DAMAGE.\n * ====================================================================\n *\n * This product includes cryptographic software written by Eric Young\n * (eay@cryptsoft.com).  This product includes software written by Tim\n * Hudson (tjh@cryptsoft.com).\n *\n */\n#ifndef HEADER_ASN1T_H\n# define HEADER_ASN1T_H\n\n# include <stddef.h>\n# include <openssl/e_os2.h>\n# include <openssl/asn1.h>\n\n# ifdef OPENSSL_BUILD_SHLIBCRYPTO\n#  undef OPENSSL_EXTERN\n#  define OPENSSL_EXTERN OPENSSL_EXPORT\n# endif\n\n/* ASN1 template defines, structures and functions */\n\n#ifdef  __cplusplus\nextern \"C\" {\n#endif\n\n# ifndef OPENSSL_EXPORT_VAR_AS_FUNCTION\n\n/* Macro to obtain ASN1_ADB pointer from a type (only used internally) */\n#  define ASN1_ADB_ptr(iptr) ((const ASN1_ADB *)(iptr))\n\n/* Macros for start and end of ASN1_ITEM definition */\n\n#  define ASN1_ITEM_start(itname) \\\n        OPENSSL_GLOBAL const ASN1_ITEM itname##_it = {\n\n#  define ASN1_ITEM_end(itname) \\\n                };\n\n# else\n\n/* Macro to obtain ASN1_ADB pointer from a type (only used internally) */\n#  define ASN1_ADB_ptr(iptr) ((const ASN1_ADB *)(iptr()))\n\n/* Macros for start and end of ASN1_ITEM definition */\n\n#  define ASN1_ITEM_start(itname) \\\n        const ASN1_ITEM * itname##_it(void) \\\n        { \\\n                static const ASN1_ITEM local_it = {\n\n#  define ASN1_ITEM_end(itname) \\\n                }; \\\n        return &local_it; \\\n        }\n\n# endif\n\n/* Macros to aid ASN1 template writing */\n\n# define ASN1_ITEM_TEMPLATE(tname) \\\n        static const ASN1_TEMPLATE tname##_item_tt\n\n# define ASN1_ITEM_TEMPLATE_END(tname) \\\n        ;\\\n        ASN1_ITEM_start(tname) \\\n                ASN1_ITYPE_PRIMITIVE,\\\n                -1,\\\n                &tname##_item_tt,\\\n                0,\\\n                NULL,\\\n                0,\\\n                #tname \\\n        ASN1_ITEM_end(tname)\n\n/* This is a ASN1 type which just embeds a template */\n\n/*-\n * This pair helps declare a SEQUENCE. We can do:\n *\n *      ASN1_SEQUENCE(stname) = {\n *              ... SEQUENCE components ...\n *      } ASN1_SEQUENCE_END(stname)\n *\n *      This will produce an ASN1_ITEM called stname_it\n *      for a structure called stname.\n *\n *      If you want the same structure but a different\n *      name then use:\n *\n *      ASN1_SEQUENCE(itname) = {\n *              ... SEQUENCE components ...\n *      } ASN1_SEQUENCE_END_name(stname, itname)\n *\n *      This will create an item called itname_it using\n *      a structure called stname.\n */\n\n# define ASN1_SEQUENCE(tname) \\\n        static const ASN1_TEMPLATE tname##_seq_tt[]\n\n# define ASN1_SEQUENCE_END(stname) ASN1_SEQUENCE_END_name(stname, stname)\n\n# define ASN1_SEQUENCE_END_name(stname, tname) \\\n        ;\\\n        ASN1_ITEM_start(tname) \\\n                ASN1_ITYPE_SEQUENCE,\\\n                V_ASN1_SEQUENCE,\\\n                tname##_seq_tt,\\\n                sizeof(tname##_seq_tt) / sizeof(ASN1_TEMPLATE),\\\n                NULL,\\\n                sizeof(stname),\\\n                #stname \\\n        ASN1_ITEM_end(tname)\n\n# define ASN1_NDEF_SEQUENCE(tname) \\\n        ASN1_SEQUENCE(tname)\n\n# define ASN1_NDEF_SEQUENCE_cb(tname, cb) \\\n        ASN1_SEQUENCE_cb(tname, cb)\n\n# define ASN1_SEQUENCE_cb(tname, cb) \\\n        static const ASN1_AUX tname##_aux = {NULL, 0, 0, 0, cb, 0}; \\\n        ASN1_SEQUENCE(tname)\n\n# define ASN1_BROKEN_SEQUENCE(tname) \\\n        static const ASN1_AUX tname##_aux = {NULL, ASN1_AFLG_BROKEN, 0, 0, 0, 0}; \\\n        ASN1_SEQUENCE(tname)\n\n# define ASN1_SEQUENCE_ref(tname, cb, lck) \\\n        static const ASN1_AUX tname##_aux = {NULL, ASN1_AFLG_REFCOUNT, offsetof(tname, references), lck, cb, 0}; \\\n        ASN1_SEQUENCE(tname)\n\n# define ASN1_SEQUENCE_enc(tname, enc, cb) \\\n        static const ASN1_AUX tname##_aux = {NULL, ASN1_AFLG_ENCODING, 0, 0, cb, offsetof(tname, enc)}; \\\n        ASN1_SEQUENCE(tname)\n\n# define ASN1_NDEF_SEQUENCE_END(tname) \\\n        ;\\\n        ASN1_ITEM_start(tname) \\\n                ASN1_ITYPE_NDEF_SEQUENCE,\\\n                V_ASN1_SEQUENCE,\\\n                tname##_seq_tt,\\\n                sizeof(tname##_seq_tt) / sizeof(ASN1_TEMPLATE),\\\n                NULL,\\\n                sizeof(tname),\\\n                #tname \\\n        ASN1_ITEM_end(tname)\n\n# define ASN1_BROKEN_SEQUENCE_END(stname) ASN1_SEQUENCE_END_ref(stname, stname)\n\n# define ASN1_SEQUENCE_END_enc(stname, tname) ASN1_SEQUENCE_END_ref(stname, tname)\n\n# define ASN1_SEQUENCE_END_cb(stname, tname) ASN1_SEQUENCE_END_ref(stname, tname)\n\n# define ASN1_SEQUENCE_END_ref(stname, tname) \\\n        ;\\\n        ASN1_ITEM_start(tname) \\\n                ASN1_ITYPE_SEQUENCE,\\\n                V_ASN1_SEQUENCE,\\\n                tname##_seq_tt,\\\n                sizeof(tname##_seq_tt) / sizeof(ASN1_TEMPLATE),\\\n                &tname##_aux,\\\n                sizeof(stname),\\\n                #stname \\\n        ASN1_ITEM_end(tname)\n\n# define ASN1_NDEF_SEQUENCE_END_cb(stname, tname) \\\n        ;\\\n        ASN1_ITEM_start(tname) \\\n                ASN1_ITYPE_NDEF_SEQUENCE,\\\n                V_ASN1_SEQUENCE,\\\n                tname##_seq_tt,\\\n                sizeof(tname##_seq_tt) / sizeof(ASN1_TEMPLATE),\\\n                &tname##_aux,\\\n                sizeof(stname),\\\n                #stname \\\n        ASN1_ITEM_end(tname)\n\n/*-\n * This pair helps declare a CHOICE type. We can do:\n *\n *      ASN1_CHOICE(chname) = {\n *              ... CHOICE options ...\n *      ASN1_CHOICE_END(chname)\n *\n *      This will produce an ASN1_ITEM called chname_it\n *      for a structure called chname. The structure\n *      definition must look like this:\n *      typedef struct {\n *              int type;\n *              union {\n *                      ASN1_SOMETHING *opt1;\n *                      ASN1_SOMEOTHER *opt2;\n *              } value;\n *      } chname;\n *\n *      the name of the selector must be 'type'.\n *      to use an alternative selector name use the\n *      ASN1_CHOICE_END_selector() version.\n */\n\n# define ASN1_CHOICE(tname) \\\n        static const ASN1_TEMPLATE tname##_ch_tt[]\n\n# define ASN1_CHOICE_cb(tname, cb) \\\n        static const ASN1_AUX tname##_aux = {NULL, 0, 0, 0, cb, 0}; \\\n        ASN1_CHOICE(tname)\n\n# define ASN1_CHOICE_END(stname) ASN1_CHOICE_END_name(stname, stname)\n\n# define ASN1_CHOICE_END_name(stname, tname) ASN1_CHOICE_END_selector(stname, tname, type)\n\n# define ASN1_CHOICE_END_selector(stname, tname, selname) \\\n        ;\\\n        ASN1_ITEM_start(tname) \\\n                ASN1_ITYPE_CHOICE,\\\n                offsetof(stname,selname) ,\\\n                tname##_ch_tt,\\\n                sizeof(tname##_ch_tt) / sizeof(ASN1_TEMPLATE),\\\n                NULL,\\\n                sizeof(stname),\\\n                #stname \\\n        ASN1_ITEM_end(tname)\n\n# define ASN1_CHOICE_END_cb(stname, tname, selname) \\\n        ;\\\n        ASN1_ITEM_start(tname) \\\n                ASN1_ITYPE_CHOICE,\\\n                offsetof(stname,selname) ,\\\n                tname##_ch_tt,\\\n                sizeof(tname##_ch_tt) / sizeof(ASN1_TEMPLATE),\\\n                &tname##_aux,\\\n                sizeof(stname),\\\n                #stname \\\n        ASN1_ITEM_end(tname)\n\n/* This helps with the template wrapper form of ASN1_ITEM */\n\n# define ASN1_EX_TEMPLATE_TYPE(flags, tag, name, type) { \\\n        (flags), (tag), 0,\\\n        #name, ASN1_ITEM_ref(type) }\n\n/* These help with SEQUENCE or CHOICE components */\n\n/* used to declare other types */\n\n# define ASN1_EX_TYPE(flags, tag, stname, field, type) { \\\n        (flags), (tag), offsetof(stname, field),\\\n        #field, ASN1_ITEM_ref(type) }\n\n/* used when the structure is combined with the parent */\n\n# define ASN1_EX_COMBINE(flags, tag, type) { \\\n        (flags)|ASN1_TFLG_COMBINE, (tag), 0, NULL, ASN1_ITEM_ref(type) }\n\n/* implicit and explicit helper macros */\n\n# define ASN1_IMP_EX(stname, field, type, tag, ex) \\\n                ASN1_EX_TYPE(ASN1_TFLG_IMPLICIT | ex, tag, stname, field, type)\n\n# define ASN1_EXP_EX(stname, field, type, tag, ex) \\\n                ASN1_EX_TYPE(ASN1_TFLG_EXPLICIT | ex, tag, stname, field, type)\n\n/* Any defined by macros: the field used is in the table itself */\n\n# ifndef OPENSSL_EXPORT_VAR_AS_FUNCTION\n#  define ASN1_ADB_OBJECT(tblname) { ASN1_TFLG_ADB_OID, -1, 0, #tblname, (const ASN1_ITEM *)&(tblname##_adb) }\n#  define ASN1_ADB_INTEGER(tblname) { ASN1_TFLG_ADB_INT, -1, 0, #tblname, (const ASN1_ITEM *)&(tblname##_adb) }\n# else\n#  define ASN1_ADB_OBJECT(tblname) { ASN1_TFLG_ADB_OID, -1, 0, #tblname, tblname##_adb }\n#  define ASN1_ADB_INTEGER(tblname) { ASN1_TFLG_ADB_INT, -1, 0, #tblname, tblname##_adb }\n# endif\n/* Plain simple type */\n# define ASN1_SIMPLE(stname, field, type) ASN1_EX_TYPE(0,0, stname, field, type)\n\n/* OPTIONAL simple type */\n# define ASN1_OPT(stname, field, type) ASN1_EX_TYPE(ASN1_TFLG_OPTIONAL, 0, stname, field, type)\n\n/* IMPLICIT tagged simple type */\n# define ASN1_IMP(stname, field, type, tag) ASN1_IMP_EX(stname, field, type, tag, 0)\n\n/* IMPLICIT tagged OPTIONAL simple type */\n# define ASN1_IMP_OPT(stname, field, type, tag) ASN1_IMP_EX(stname, field, type, tag, ASN1_TFLG_OPTIONAL)\n\n/* Same as above but EXPLICIT */\n\n# define ASN1_EXP(stname, field, type, tag) ASN1_EXP_EX(stname, field, type, tag, 0)\n# define ASN1_EXP_OPT(stname, field, type, tag) ASN1_EXP_EX(stname, field, type, tag, ASN1_TFLG_OPTIONAL)\n\n/* SEQUENCE OF type */\n# define ASN1_SEQUENCE_OF(stname, field, type) \\\n                ASN1_EX_TYPE(ASN1_TFLG_SEQUENCE_OF, 0, stname, field, type)\n\n/* OPTIONAL SEQUENCE OF */\n# define ASN1_SEQUENCE_OF_OPT(stname, field, type) \\\n                ASN1_EX_TYPE(ASN1_TFLG_SEQUENCE_OF|ASN1_TFLG_OPTIONAL, 0, stname, field, type)\n\n/* Same as above but for SET OF */\n\n# define ASN1_SET_OF(stname, field, type) \\\n                ASN1_EX_TYPE(ASN1_TFLG_SET_OF, 0, stname, field, type)\n\n# define ASN1_SET_OF_OPT(stname, field, type) \\\n                ASN1_EX_TYPE(ASN1_TFLG_SET_OF|ASN1_TFLG_OPTIONAL, 0, stname, field, type)\n\n/* Finally compound types of SEQUENCE, SET, IMPLICIT, EXPLICIT and OPTIONAL */\n\n# define ASN1_IMP_SET_OF(stname, field, type, tag) \\\n                        ASN1_IMP_EX(stname, field, type, tag, ASN1_TFLG_SET_OF)\n\n# define ASN1_EXP_SET_OF(stname, field, type, tag) \\\n                        ASN1_EXP_EX(stname, field, type, tag, ASN1_TFLG_SET_OF)\n\n# define ASN1_IMP_SET_OF_OPT(stname, field, type, tag) \\\n                        ASN1_IMP_EX(stname, field, type, tag, ASN1_TFLG_SET_OF|ASN1_TFLG_OPTIONAL)\n\n# define ASN1_EXP_SET_OF_OPT(stname, field, type, tag) \\\n                        ASN1_EXP_EX(stname, field, type, tag, ASN1_TFLG_SET_OF|ASN1_TFLG_OPTIONAL)\n\n# define ASN1_IMP_SEQUENCE_OF(stname, field, type, tag) \\\n                        ASN1_IMP_EX(stname, field, type, tag, ASN1_TFLG_SEQUENCE_OF)\n\n# define ASN1_IMP_SEQUENCE_OF_OPT(stname, field, type, tag) \\\n                        ASN1_IMP_EX(stname, field, type, tag, ASN1_TFLG_SEQUENCE_OF|ASN1_TFLG_OPTIONAL)\n\n# define ASN1_EXP_SEQUENCE_OF(stname, field, type, tag) \\\n                        ASN1_EXP_EX(stname, field, type, tag, ASN1_TFLG_SEQUENCE_OF)\n\n# define ASN1_EXP_SEQUENCE_OF_OPT(stname, field, type, tag) \\\n                        ASN1_EXP_EX(stname, field, type, tag, ASN1_TFLG_SEQUENCE_OF|ASN1_TFLG_OPTIONAL)\n\n/* EXPLICIT using indefinite length constructed form */\n# define ASN1_NDEF_EXP(stname, field, type, tag) \\\n                        ASN1_EXP_EX(stname, field, type, tag, ASN1_TFLG_NDEF)\n\n/* EXPLICIT OPTIONAL using indefinite length constructed form */\n# define ASN1_NDEF_EXP_OPT(stname, field, type, tag) \\\n                        ASN1_EXP_EX(stname, field, type, tag, ASN1_TFLG_OPTIONAL|ASN1_TFLG_NDEF)\n\n/* Macros for the ASN1_ADB structure */\n\n# define ASN1_ADB(name) \\\n        static const ASN1_ADB_TABLE name##_adbtbl[]\n\n# ifndef OPENSSL_EXPORT_VAR_AS_FUNCTION\n\n#  define ASN1_ADB_END(name, flags, field, app_table, def, none) \\\n        ;\\\n        static const ASN1_ADB name##_adb = {\\\n                flags,\\\n                offsetof(name, field),\\\n                app_table,\\\n                name##_adbtbl,\\\n                sizeof(name##_adbtbl) / sizeof(ASN1_ADB_TABLE),\\\n                def,\\\n                none\\\n        }\n\n# else\n\n#  define ASN1_ADB_END(name, flags, field, app_table, def, none) \\\n        ;\\\n        static const ASN1_ITEM *name##_adb(void) \\\n        { \\\n        static const ASN1_ADB internal_adb = \\\n                {\\\n                flags,\\\n                offsetof(name, field),\\\n                app_table,\\\n                name##_adbtbl,\\\n                sizeof(name##_adbtbl) / sizeof(ASN1_ADB_TABLE),\\\n                def,\\\n                none\\\n                }; \\\n                return (const ASN1_ITEM *) &internal_adb; \\\n        } \\\n        void dummy_function(void)\n\n# endif\n\n# define ADB_ENTRY(val, template) {val, template}\n\n# define ASN1_ADB_TEMPLATE(name) \\\n        static const ASN1_TEMPLATE name##_tt\n\n/*\n * This is the ASN1 template structure that defines a wrapper round the\n * actual type. It determines the actual position of the field in the value\n * structure, various flags such as OPTIONAL and the field name.\n */\n\nstruct ASN1_TEMPLATE_st {\n    unsigned long flags;        /* Various flags */\n    long tag;                   /* tag, not used if no tagging */\n    unsigned long offset;       /* Offset of this field in structure */\n# ifndef NO_ASN1_FIELD_NAMES\n    const char *field_name;     /* Field name */\n# endif\n    ASN1_ITEM_EXP *item;        /* Relevant ASN1_ITEM or ASN1_ADB */\n};\n\n/* Macro to extract ASN1_ITEM and ASN1_ADB pointer from ASN1_TEMPLATE */\n\n# define ASN1_TEMPLATE_item(t) (t->item_ptr)\n# define ASN1_TEMPLATE_adb(t) (t->item_ptr)\n\ntypedef struct ASN1_ADB_TABLE_st ASN1_ADB_TABLE;\ntypedef struct ASN1_ADB_st ASN1_ADB;\n\nstruct ASN1_ADB_st {\n    unsigned long flags;        /* Various flags */\n    unsigned long offset;       /* Offset of selector field */\n    STACK_OF(ASN1_ADB_TABLE) **app_items; /* Application defined items */\n    const ASN1_ADB_TABLE *tbl;  /* Table of possible types */\n    long tblcount;              /* Number of entries in tbl */\n    const ASN1_TEMPLATE *default_tt; /* Type to use if no match */\n    const ASN1_TEMPLATE *null_tt; /* Type to use if selector is NULL */\n};\n\nstruct ASN1_ADB_TABLE_st {\n    long value;                 /* NID for an object or value for an int */\n    const ASN1_TEMPLATE tt;     /* item for this value */\n};\n\n/* template flags */\n\n/* Field is optional */\n# define ASN1_TFLG_OPTIONAL      (0x1)\n\n/* Field is a SET OF */\n# define ASN1_TFLG_SET_OF        (0x1 << 1)\n\n/* Field is a SEQUENCE OF */\n# define ASN1_TFLG_SEQUENCE_OF   (0x2 << 1)\n\n/*\n * Special case: this refers to a SET OF that will be sorted into DER order\n * when encoded *and* the corresponding STACK will be modified to match the\n * new order.\n */\n# define ASN1_TFLG_SET_ORDER     (0x3 << 1)\n\n/* Mask for SET OF or SEQUENCE OF */\n# define ASN1_TFLG_SK_MASK       (0x3 << 1)\n\n/*\n * These flags mean the tag should be taken from the tag field. If EXPLICIT\n * then the underlying type is used for the inner tag.\n */\n\n/* IMPLICIT tagging */\n# define ASN1_TFLG_IMPTAG        (0x1 << 3)\n\n/* EXPLICIT tagging, inner tag from underlying type */\n# define ASN1_TFLG_EXPTAG        (0x2 << 3)\n\n# define ASN1_TFLG_TAG_MASK      (0x3 << 3)\n\n/* context specific IMPLICIT */\n# define ASN1_TFLG_IMPLICIT      ASN1_TFLG_IMPTAG|ASN1_TFLG_CONTEXT\n\n/* context specific EXPLICIT */\n# define ASN1_TFLG_EXPLICIT      ASN1_TFLG_EXPTAG|ASN1_TFLG_CONTEXT\n\n/*\n * If tagging is in force these determine the type of tag to use. Otherwise\n * the tag is determined by the underlying type. These values reflect the\n * actual octet format.\n */\n\n/* Universal tag */\n# define ASN1_TFLG_UNIVERSAL     (0x0<<6)\n/* Application tag */\n# define ASN1_TFLG_APPLICATION   (0x1<<6)\n/* Context specific tag */\n# define ASN1_TFLG_CONTEXT       (0x2<<6)\n/* Private tag */\n# define ASN1_TFLG_PRIVATE       (0x3<<6)\n\n# define ASN1_TFLG_TAG_CLASS     (0x3<<6)\n\n/*\n * These are for ANY DEFINED BY type. In this case the 'item' field points to\n * an ASN1_ADB structure which contains a table of values to decode the\n * relevant type\n */\n\n# define ASN1_TFLG_ADB_MASK      (0x3<<8)\n\n# define ASN1_TFLG_ADB_OID       (0x1<<8)\n\n# define ASN1_TFLG_ADB_INT       (0x1<<9)\n\n/*\n * This flag means a parent structure is passed instead of the field: this is\n * useful is a SEQUENCE is being combined with a CHOICE for example. Since\n * this means the structure and item name will differ we need to use the\n * ASN1_CHOICE_END_name() macro for example.\n */\n\n# define ASN1_TFLG_COMBINE       (0x1<<10)\n\n/*\n * This flag when present in a SEQUENCE OF, SET OF or EXPLICIT causes\n * indefinite length constructed encoding to be used if required.\n */\n\n# define ASN1_TFLG_NDEF          (0x1<<11)\n\n/* This is the actual ASN1 item itself */\n\nstruct ASN1_ITEM_st {\n    char itype;                 /* The item type, primitive, SEQUENCE, CHOICE\n                                 * or extern */\n    long utype;                 /* underlying type */\n    const ASN1_TEMPLATE *templates; /* If SEQUENCE or CHOICE this contains\n                                     * the contents */\n    long tcount;                /* Number of templates if SEQUENCE or CHOICE */\n    const void *funcs;          /* functions that handle this type */\n    long size;                  /* Structure size (usually) */\n# ifndef NO_ASN1_FIELD_NAMES\n    const char *sname;          /* Structure name */\n# endif\n};\n\n/*-\n * These are values for the itype field and\n * determine how the type is interpreted.\n *\n * For PRIMITIVE types the underlying type\n * determines the behaviour if items is NULL.\n *\n * Otherwise templates must contain a single\n * template and the type is treated in the\n * same way as the type specified in the template.\n *\n * For SEQUENCE types the templates field points\n * to the members, the size field is the\n * structure size.\n *\n * For CHOICE types the templates field points\n * to each possible member (typically a union)\n * and the 'size' field is the offset of the\n * selector.\n *\n * The 'funcs' field is used for application\n * specific functions.\n *\n * For COMPAT types the funcs field gives a\n * set of functions that handle this type, this\n * supports the old d2i, i2d convention.\n *\n * The EXTERN type uses a new style d2i/i2d.\n * The new style should be used where possible\n * because it avoids things like the d2i IMPLICIT\n * hack.\n *\n * MSTRING is a multiple string type, it is used\n * for a CHOICE of character strings where the\n * actual strings all occupy an ASN1_STRING\n * structure. In this case the 'utype' field\n * has a special meaning, it is used as a mask\n * of acceptable types using the B_ASN1 constants.\n *\n * NDEF_SEQUENCE is the same as SEQUENCE except\n * that it will use indefinite length constructed\n * encoding if requested.\n *\n */\n\n# define ASN1_ITYPE_PRIMITIVE            0x0\n\n# define ASN1_ITYPE_SEQUENCE             0x1\n\n# define ASN1_ITYPE_CHOICE               0x2\n\n# define ASN1_ITYPE_COMPAT               0x3\n\n# define ASN1_ITYPE_EXTERN               0x4\n\n# define ASN1_ITYPE_MSTRING              0x5\n\n# define ASN1_ITYPE_NDEF_SEQUENCE        0x6\n\n/*\n * Cache for ASN1 tag and length, so we don't keep re-reading it for things\n * like CHOICE\n */\n\nstruct ASN1_TLC_st {\n    char valid;                 /* Values below are valid */\n    int ret;                    /* return value */\n    long plen;                  /* length */\n    int ptag;                   /* class value */\n    int pclass;                 /* class value */\n    int hdrlen;                 /* header length */\n};\n\n/* Typedefs for ASN1 function pointers */\n\ntypedef ASN1_VALUE *ASN1_new_func(void);\ntypedef void ASN1_free_func(ASN1_VALUE *a);\ntypedef ASN1_VALUE *ASN1_d2i_func(ASN1_VALUE **a, const unsigned char **in,\n                                  long length);\ntypedef int ASN1_i2d_func(ASN1_VALUE *a, unsigned char **in);\n\ntypedef int ASN1_ex_d2i(ASN1_VALUE **pval, const unsigned char **in, long len,\n                        const ASN1_ITEM *it, int tag, int aclass, char opt,\n                        ASN1_TLC *ctx);\n\ntypedef int ASN1_ex_i2d(ASN1_VALUE **pval, unsigned char **out,\n                        const ASN1_ITEM *it, int tag, int aclass);\ntypedef int ASN1_ex_new_func(ASN1_VALUE **pval, const ASN1_ITEM *it);\ntypedef void ASN1_ex_free_func(ASN1_VALUE **pval, const ASN1_ITEM *it);\n\ntypedef int ASN1_ex_print_func(BIO *out, ASN1_VALUE **pval,\n                               int indent, const char *fname,\n                               const ASN1_PCTX *pctx);\n\ntypedef int ASN1_primitive_i2c(ASN1_VALUE **pval, unsigned char *cont,\n                               int *putype, const ASN1_ITEM *it);\ntypedef int ASN1_primitive_c2i(ASN1_VALUE **pval, const unsigned char *cont,\n                               int len, int utype, char *free_cont,\n                               const ASN1_ITEM *it);\ntypedef int ASN1_primitive_print(BIO *out, ASN1_VALUE **pval,\n                                 const ASN1_ITEM *it, int indent,\n                                 const ASN1_PCTX *pctx);\n\ntypedef struct ASN1_COMPAT_FUNCS_st {\n    ASN1_new_func *asn1_new;\n    ASN1_free_func *asn1_free;\n    ASN1_d2i_func *asn1_d2i;\n    ASN1_i2d_func *asn1_i2d;\n} ASN1_COMPAT_FUNCS;\n\ntypedef struct ASN1_EXTERN_FUNCS_st {\n    void *app_data;\n    ASN1_ex_new_func *asn1_ex_new;\n    ASN1_ex_free_func *asn1_ex_free;\n    ASN1_ex_free_func *asn1_ex_clear;\n    ASN1_ex_d2i *asn1_ex_d2i;\n    ASN1_ex_i2d *asn1_ex_i2d;\n    ASN1_ex_print_func *asn1_ex_print;\n} ASN1_EXTERN_FUNCS;\n\ntypedef struct ASN1_PRIMITIVE_FUNCS_st {\n    void *app_data;\n    unsigned long flags;\n    ASN1_ex_new_func *prim_new;\n    ASN1_ex_free_func *prim_free;\n    ASN1_ex_free_func *prim_clear;\n    ASN1_primitive_c2i *prim_c2i;\n    ASN1_primitive_i2c *prim_i2c;\n    ASN1_primitive_print *prim_print;\n} ASN1_PRIMITIVE_FUNCS;\n\n/*\n * This is the ASN1_AUX structure: it handles various miscellaneous\n * requirements. For example the use of reference counts and an informational\n * callback. The \"informational callback\" is called at various points during\n * the ASN1 encoding and decoding. It can be used to provide minor\n * customisation of the structures used. This is most useful where the\n * supplied routines *almost* do the right thing but need some extra help at\n * a few points. If the callback returns zero then it is assumed a fatal\n * error has occurred and the main operation should be abandoned. If major\n * changes in the default behaviour are required then an external type is\n * more appropriate.\n */\n\ntypedef int ASN1_aux_cb(int operation, ASN1_VALUE **in, const ASN1_ITEM *it,\n                        void *exarg);\n\ntypedef struct ASN1_AUX_st {\n    void *app_data;\n    int flags;\n    int ref_offset;             /* Offset of reference value */\n    int ref_lock;               /* Lock type to use */\n    ASN1_aux_cb *asn1_cb;\n    int enc_offset;             /* Offset of ASN1_ENCODING structure */\n} ASN1_AUX;\n\n/* For print related callbacks exarg points to this structure */\ntypedef struct ASN1_PRINT_ARG_st {\n    BIO *out;\n    int indent;\n    const ASN1_PCTX *pctx;\n} ASN1_PRINT_ARG;\n\n/* For streaming related callbacks exarg points to this structure */\ntypedef struct ASN1_STREAM_ARG_st {\n    /* BIO to stream through */\n    BIO *out;\n    /* BIO with filters appended */\n    BIO *ndef_bio;\n    /* Streaming I/O boundary */\n    unsigned char **boundary;\n} ASN1_STREAM_ARG;\n\n/* Flags in ASN1_AUX */\n\n/* Use a reference count */\n# define ASN1_AFLG_REFCOUNT      1\n/* Save the encoding of structure (useful for signatures) */\n# define ASN1_AFLG_ENCODING      2\n/* The Sequence length is invalid */\n# define ASN1_AFLG_BROKEN        4\n\n/* operation values for asn1_cb */\n\n# define ASN1_OP_NEW_PRE         0\n# define ASN1_OP_NEW_POST        1\n# define ASN1_OP_FREE_PRE        2\n# define ASN1_OP_FREE_POST       3\n# define ASN1_OP_D2I_PRE         4\n# define ASN1_OP_D2I_POST        5\n# define ASN1_OP_I2D_PRE         6\n# define ASN1_OP_I2D_POST        7\n# define ASN1_OP_PRINT_PRE       8\n# define ASN1_OP_PRINT_POST      9\n# define ASN1_OP_STREAM_PRE      10\n# define ASN1_OP_STREAM_POST     11\n# define ASN1_OP_DETACHED_PRE    12\n# define ASN1_OP_DETACHED_POST   13\n\n/* Macro to implement a primitive type */\n# define IMPLEMENT_ASN1_TYPE(stname) IMPLEMENT_ASN1_TYPE_ex(stname, stname, 0)\n# define IMPLEMENT_ASN1_TYPE_ex(itname, vname, ex) \\\n                                ASN1_ITEM_start(itname) \\\n                                        ASN1_ITYPE_PRIMITIVE, V_##vname, NULL, 0, NULL, ex, #itname \\\n                                ASN1_ITEM_end(itname)\n\n/* Macro to implement a multi string type */\n# define IMPLEMENT_ASN1_MSTRING(itname, mask) \\\n                                ASN1_ITEM_start(itname) \\\n                                        ASN1_ITYPE_MSTRING, mask, NULL, 0, NULL, sizeof(ASN1_STRING), #itname \\\n                                ASN1_ITEM_end(itname)\n\n/* Macro to implement an ASN1_ITEM in terms of old style funcs */\n\n# define IMPLEMENT_COMPAT_ASN1(sname) IMPLEMENT_COMPAT_ASN1_type(sname, V_ASN1_SEQUENCE)\n\n# define IMPLEMENT_COMPAT_ASN1_type(sname, tag) \\\n        static const ASN1_COMPAT_FUNCS sname##_ff = { \\\n                (ASN1_new_func *)sname##_new, \\\n                (ASN1_free_func *)sname##_free, \\\n                (ASN1_d2i_func *)d2i_##sname, \\\n                (ASN1_i2d_func *)i2d_##sname, \\\n        }; \\\n        ASN1_ITEM_start(sname) \\\n                ASN1_ITYPE_COMPAT, \\\n                tag, \\\n                NULL, \\\n                0, \\\n                &sname##_ff, \\\n                0, \\\n                #sname \\\n        ASN1_ITEM_end(sname)\n\n# define IMPLEMENT_EXTERN_ASN1(sname, tag, fptrs) \\\n        ASN1_ITEM_start(sname) \\\n                ASN1_ITYPE_EXTERN, \\\n                tag, \\\n                NULL, \\\n                0, \\\n                &fptrs, \\\n                0, \\\n                #sname \\\n        ASN1_ITEM_end(sname)\n\n/* Macro to implement standard functions in terms of ASN1_ITEM structures */\n\n# define IMPLEMENT_ASN1_FUNCTIONS(stname) IMPLEMENT_ASN1_FUNCTIONS_fname(stname, stname, stname)\n\n# define IMPLEMENT_ASN1_FUNCTIONS_name(stname, itname) IMPLEMENT_ASN1_FUNCTIONS_fname(stname, itname, itname)\n\n# define IMPLEMENT_ASN1_FUNCTIONS_ENCODE_name(stname, itname) \\\n                        IMPLEMENT_ASN1_FUNCTIONS_ENCODE_fname(stname, itname, itname)\n\n# define IMPLEMENT_STATIC_ASN1_ALLOC_FUNCTIONS(stname) \\\n                IMPLEMENT_ASN1_ALLOC_FUNCTIONS_pfname(static, stname, stname, stname)\n\n# define IMPLEMENT_ASN1_ALLOC_FUNCTIONS(stname) \\\n                IMPLEMENT_ASN1_ALLOC_FUNCTIONS_fname(stname, stname, stname)\n\n# define IMPLEMENT_ASN1_ALLOC_FUNCTIONS_pfname(pre, stname, itname, fname) \\\n        pre stname *fname##_new(void) \\\n        { \\\n                return (stname *)ASN1_item_new(ASN1_ITEM_rptr(itname)); \\\n        } \\\n        pre void fname##_free(stname *a) \\\n        { \\\n                ASN1_item_free((ASN1_VALUE *)a, ASN1_ITEM_rptr(itname)); \\\n        }\n\n# define IMPLEMENT_ASN1_ALLOC_FUNCTIONS_fname(stname, itname, fname) \\\n        stname *fname##_new(void) \\\n        { \\\n                return (stname *)ASN1_item_new(ASN1_ITEM_rptr(itname)); \\\n        } \\\n        void fname##_free(stname *a) \\\n        { \\\n                ASN1_item_free((ASN1_VALUE *)a, ASN1_ITEM_rptr(itname)); \\\n        }\n\n# define IMPLEMENT_ASN1_FUNCTIONS_fname(stname, itname, fname) \\\n        IMPLEMENT_ASN1_ENCODE_FUNCTIONS_fname(stname, itname, fname) \\\n        IMPLEMENT_ASN1_ALLOC_FUNCTIONS_fname(stname, itname, fname)\n\n# define IMPLEMENT_ASN1_ENCODE_FUNCTIONS_fname(stname, itname, fname) \\\n        stname *d2i_##fname(stname **a, const unsigned char **in, long len) \\\n        { \\\n                return (stname *)ASN1_item_d2i((ASN1_VALUE **)a, in, len, ASN1_ITEM_rptr(itname));\\\n        } \\\n        int i2d_##fname(stname *a, unsigned char **out) \\\n        { \\\n                return ASN1_item_i2d((ASN1_VALUE *)a, out, ASN1_ITEM_rptr(itname));\\\n        }\n\n# define IMPLEMENT_ASN1_NDEF_FUNCTION(stname) \\\n        int i2d_##stname##_NDEF(stname *a, unsigned char **out) \\\n        { \\\n                return ASN1_item_ndef_i2d((ASN1_VALUE *)a, out, ASN1_ITEM_rptr(stname));\\\n        }\n\n/*\n * This includes evil casts to remove const: they will go away when full ASN1\n * constification is done.\n */\n# define IMPLEMENT_ASN1_ENCODE_FUNCTIONS_const_fname(stname, itname, fname) \\\n        stname *d2i_##fname(stname **a, const unsigned char **in, long len) \\\n        { \\\n                return (stname *)ASN1_item_d2i((ASN1_VALUE **)a, in, len, ASN1_ITEM_rptr(itname));\\\n        } \\\n        int i2d_##fname(const stname *a, unsigned char **out) \\\n        { \\\n                return ASN1_item_i2d((ASN1_VALUE *)a, out, ASN1_ITEM_rptr(itname));\\\n        }\n\n# define IMPLEMENT_ASN1_DUP_FUNCTION(stname) \\\n        stname * stname##_dup(stname *x) \\\n        { \\\n        return ASN1_item_dup(ASN1_ITEM_rptr(stname), x); \\\n        }\n\n# define IMPLEMENT_ASN1_PRINT_FUNCTION(stname) \\\n        IMPLEMENT_ASN1_PRINT_FUNCTION_fname(stname, stname, stname)\n\n# define IMPLEMENT_ASN1_PRINT_FUNCTION_fname(stname, itname, fname) \\\n        int fname##_print_ctx(BIO *out, stname *x, int indent, \\\n                                                const ASN1_PCTX *pctx) \\\n        { \\\n                return ASN1_item_print(out, (ASN1_VALUE *)x, indent, \\\n                        ASN1_ITEM_rptr(itname), pctx); \\\n        }\n\n# define IMPLEMENT_ASN1_FUNCTIONS_const(name) \\\n                IMPLEMENT_ASN1_FUNCTIONS_const_fname(name, name, name)\n\n# define IMPLEMENT_ASN1_FUNCTIONS_const_fname(stname, itname, fname) \\\n        IMPLEMENT_ASN1_ENCODE_FUNCTIONS_const_fname(stname, itname, fname) \\\n        IMPLEMENT_ASN1_ALLOC_FUNCTIONS_fname(stname, itname, fname)\n\n/* external definitions for primitive types */\n\nDECLARE_ASN1_ITEM(ASN1_BOOLEAN)\nDECLARE_ASN1_ITEM(ASN1_TBOOLEAN)\nDECLARE_ASN1_ITEM(ASN1_FBOOLEAN)\nDECLARE_ASN1_ITEM(ASN1_SEQUENCE)\nDECLARE_ASN1_ITEM(CBIGNUM)\nDECLARE_ASN1_ITEM(BIGNUM)\nDECLARE_ASN1_ITEM(LONG)\nDECLARE_ASN1_ITEM(ZLONG)\n\nDECLARE_STACK_OF(ASN1_VALUE)\n\n/* Functions used internally by the ASN1 code */\n\nint ASN1_item_ex_new(ASN1_VALUE **pval, const ASN1_ITEM *it);\nvoid ASN1_item_ex_free(ASN1_VALUE **pval, const ASN1_ITEM *it);\nint ASN1_template_new(ASN1_VALUE **pval, const ASN1_TEMPLATE *tt);\nint ASN1_primitive_new(ASN1_VALUE **pval, const ASN1_ITEM *it);\n\nvoid ASN1_template_free(ASN1_VALUE **pval, const ASN1_TEMPLATE *tt);\nint ASN1_template_d2i(ASN1_VALUE **pval, const unsigned char **in, long len,\n                      const ASN1_TEMPLATE *tt);\nint ASN1_item_ex_d2i(ASN1_VALUE **pval, const unsigned char **in, long len,\n                     const ASN1_ITEM *it, int tag, int aclass, char opt,\n                     ASN1_TLC *ctx);\n\nint ASN1_item_ex_i2d(ASN1_VALUE **pval, unsigned char **out,\n                     const ASN1_ITEM *it, int tag, int aclass);\nint ASN1_template_i2d(ASN1_VALUE **pval, unsigned char **out,\n                      const ASN1_TEMPLATE *tt);\nvoid ASN1_primitive_free(ASN1_VALUE **pval, const ASN1_ITEM *it);\n\nint asn1_ex_i2c(ASN1_VALUE **pval, unsigned char *cont, int *putype,\n                const ASN1_ITEM *it);\nint asn1_ex_c2i(ASN1_VALUE **pval, const unsigned char *cont, int len,\n                int utype, char *free_cont, const ASN1_ITEM *it);\n\nint asn1_get_choice_selector(ASN1_VALUE **pval, const ASN1_ITEM *it);\nint asn1_set_choice_selector(ASN1_VALUE **pval, int value,\n                             const ASN1_ITEM *it);\n\nASN1_VALUE **asn1_get_field_ptr(ASN1_VALUE **pval, const ASN1_TEMPLATE *tt);\n\nconst ASN1_TEMPLATE *asn1_do_adb(ASN1_VALUE **pval, const ASN1_TEMPLATE *tt,\n                                 int nullerr);\n\nint asn1_do_lock(ASN1_VALUE **pval, int op, const ASN1_ITEM *it);\n\nvoid asn1_enc_init(ASN1_VALUE **pval, const ASN1_ITEM *it);\nvoid asn1_enc_free(ASN1_VALUE **pval, const ASN1_ITEM *it);\nint asn1_enc_restore(int *len, unsigned char **out, ASN1_VALUE **pval,\n                     const ASN1_ITEM *it);\nint asn1_enc_save(ASN1_VALUE **pval, const unsigned char *in, int inlen,\n                  const ASN1_ITEM *it);\n\n#ifdef  __cplusplus\n}\n#endif\n#endif\n"
  },
  {
    "path": "Pods/OpenSSL-Universal/include-ios/openssl/bio.h",
    "content": "/* crypto/bio/bio.h */\n/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)\n * All rights reserved.\n *\n * This package is an SSL implementation written\n * by Eric Young (eay@cryptsoft.com).\n * The implementation was written so as to conform with Netscapes SSL.\n *\n * This library is free for commercial and non-commercial use as long as\n * the following conditions are aheared to.  The following conditions\n * apply to all code found in this distribution, be it the RC4, RSA,\n * lhash, DES, etc., code; not just the SSL code.  The SSL documentation\n * included with this distribution is covered by the same copyright terms\n * except that the holder is Tim Hudson (tjh@cryptsoft.com).\n *\n * Copyright remains Eric Young's, and as such any Copyright notices in\n * the code are not to be removed.\n * If this package is used in a product, Eric Young should be given attribution\n * as the author of the parts of the library used.\n * This can be in the form of a textual message at program startup or\n * in documentation (online or textual) provided with the package.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n * 1. Redistributions of source code must retain the copyright\n *    notice, this list of conditions and the following disclaimer.\n * 2. Redistributions in binary form must reproduce the above copyright\n *    notice, this list of conditions and the following disclaimer in the\n *    documentation and/or other materials provided with the distribution.\n * 3. All advertising materials mentioning features or use of this software\n *    must display the following acknowledgement:\n *    \"This product includes cryptographic software written by\n *     Eric Young (eay@cryptsoft.com)\"\n *    The word 'cryptographic' can be left out if the rouines from the library\n *    being used are not cryptographic related :-).\n * 4. If you include any Windows specific code (or a derivative thereof) from\n *    the apps directory (application code) you must include an acknowledgement:\n *    \"This product includes software written by Tim Hudson (tjh@cryptsoft.com)\"\n *\n * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND\n * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE\n * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n * SUCH DAMAGE.\n *\n * The licence and distribution terms for any publically available version or\n * derivative of this code cannot be changed.  i.e. this code cannot simply be\n * copied and put under another distribution licence\n * [including the GNU Public Licence.]\n */\n\n#ifndef HEADER_BIO_H\n# define HEADER_BIO_H\n\n# include <openssl/e_os2.h>\n\n# ifndef OPENSSL_NO_FP_API\n#  include <stdio.h>\n# endif\n# include <stdarg.h>\n\n# include <openssl/crypto.h>\n\n# ifndef OPENSSL_NO_SCTP\n#  ifndef OPENSSL_SYS_VMS\n#   include <stdint.h>\n#  else\n#   include <inttypes.h>\n#  endif\n# endif\n\n#ifdef  __cplusplus\nextern \"C\" {\n#endif\n\n/* These are the 'types' of BIOs */\n# define BIO_TYPE_NONE           0\n# define BIO_TYPE_MEM            (1|0x0400)\n# define BIO_TYPE_FILE           (2|0x0400)\n\n# define BIO_TYPE_FD             (4|0x0400|0x0100)\n# define BIO_TYPE_SOCKET         (5|0x0400|0x0100)\n# define BIO_TYPE_NULL           (6|0x0400)\n# define BIO_TYPE_SSL            (7|0x0200)\n# define BIO_TYPE_MD             (8|0x0200)/* passive filter */\n# define BIO_TYPE_BUFFER         (9|0x0200)/* filter */\n# define BIO_TYPE_CIPHER         (10|0x0200)/* filter */\n# define BIO_TYPE_BASE64         (11|0x0200)/* filter */\n# define BIO_TYPE_CONNECT        (12|0x0400|0x0100)/* socket - connect */\n# define BIO_TYPE_ACCEPT         (13|0x0400|0x0100)/* socket for accept */\n# define BIO_TYPE_PROXY_CLIENT   (14|0x0200)/* client proxy BIO */\n# define BIO_TYPE_PROXY_SERVER   (15|0x0200)/* server proxy BIO */\n# define BIO_TYPE_NBIO_TEST      (16|0x0200)/* server proxy BIO */\n# define BIO_TYPE_NULL_FILTER    (17|0x0200)\n# define BIO_TYPE_BER            (18|0x0200)/* BER -> bin filter */\n# define BIO_TYPE_BIO            (19|0x0400)/* (half a) BIO pair */\n# define BIO_TYPE_LINEBUFFER     (20|0x0200)/* filter */\n# define BIO_TYPE_DGRAM          (21|0x0400|0x0100)\n# ifndef OPENSSL_NO_SCTP\n#  define BIO_TYPE_DGRAM_SCTP     (24|0x0400|0x0100)\n# endif\n# define BIO_TYPE_ASN1           (22|0x0200)/* filter */\n# define BIO_TYPE_COMP           (23|0x0200)/* filter */\n\n# define BIO_TYPE_DESCRIPTOR     0x0100/* socket, fd, connect or accept */\n# define BIO_TYPE_FILTER         0x0200\n# define BIO_TYPE_SOURCE_SINK    0x0400\n\n/*\n * BIO_FILENAME_READ|BIO_CLOSE to open or close on free.\n * BIO_set_fp(in,stdin,BIO_NOCLOSE);\n */\n# define BIO_NOCLOSE             0x00\n# define BIO_CLOSE               0x01\n\n/*\n * These are used in the following macros and are passed to BIO_ctrl()\n */\n# define BIO_CTRL_RESET          1/* opt - rewind/zero etc */\n# define BIO_CTRL_EOF            2/* opt - are we at the eof */\n# define BIO_CTRL_INFO           3/* opt - extra tit-bits */\n# define BIO_CTRL_SET            4/* man - set the 'IO' type */\n# define BIO_CTRL_GET            5/* man - get the 'IO' type */\n# define BIO_CTRL_PUSH           6/* opt - internal, used to signify change */\n# define BIO_CTRL_POP            7/* opt - internal, used to signify change */\n# define BIO_CTRL_GET_CLOSE      8/* man - set the 'close' on free */\n# define BIO_CTRL_SET_CLOSE      9/* man - set the 'close' on free */\n# define BIO_CTRL_PENDING        10/* opt - is their more data buffered */\n# define BIO_CTRL_FLUSH          11/* opt - 'flush' buffered output */\n# define BIO_CTRL_DUP            12/* man - extra stuff for 'duped' BIO */\n# define BIO_CTRL_WPENDING       13/* opt - number of bytes still to write */\n/* callback is int cb(BIO *bio,state,ret); */\n# define BIO_CTRL_SET_CALLBACK   14/* opt - set callback function */\n# define BIO_CTRL_GET_CALLBACK   15/* opt - set callback function */\n\n# define BIO_CTRL_SET_FILENAME   30/* BIO_s_file special */\n\n/* dgram BIO stuff */\n# define BIO_CTRL_DGRAM_CONNECT       31/* BIO dgram special */\n# define BIO_CTRL_DGRAM_SET_CONNECTED 32/* allow for an externally connected\n                                         * socket to be passed in */\n# define BIO_CTRL_DGRAM_SET_RECV_TIMEOUT 33/* setsockopt, essentially */\n# define BIO_CTRL_DGRAM_GET_RECV_TIMEOUT 34/* getsockopt, essentially */\n# define BIO_CTRL_DGRAM_SET_SEND_TIMEOUT 35/* setsockopt, essentially */\n# define BIO_CTRL_DGRAM_GET_SEND_TIMEOUT 36/* getsockopt, essentially */\n\n# define BIO_CTRL_DGRAM_GET_RECV_TIMER_EXP 37/* flag whether the last */\n# define BIO_CTRL_DGRAM_GET_SEND_TIMER_EXP 38/* I/O operation tiemd out */\n\n/* #ifdef IP_MTU_DISCOVER */\n# define BIO_CTRL_DGRAM_MTU_DISCOVER       39/* set DF bit on egress packets */\n/* #endif */\n\n# define BIO_CTRL_DGRAM_QUERY_MTU          40/* as kernel for current MTU */\n# define BIO_CTRL_DGRAM_GET_FALLBACK_MTU   47\n# define BIO_CTRL_DGRAM_GET_MTU            41/* get cached value for MTU */\n# define BIO_CTRL_DGRAM_SET_MTU            42/* set cached value for MTU.\n                                              * want to use this if asking\n                                              * the kernel fails */\n\n# define BIO_CTRL_DGRAM_MTU_EXCEEDED       43/* check whether the MTU was\n                                              * exceed in the previous write\n                                              * operation */\n\n# define BIO_CTRL_DGRAM_GET_PEER           46\n# define BIO_CTRL_DGRAM_SET_PEER           44/* Destination for the data */\n\n# define BIO_CTRL_DGRAM_SET_NEXT_TIMEOUT   45/* Next DTLS handshake timeout\n                                              * to adjust socket timeouts */\n\n# define BIO_CTRL_DGRAM_GET_MTU_OVERHEAD   49\n\n# ifndef OPENSSL_NO_SCTP\n/* SCTP stuff */\n#  define BIO_CTRL_DGRAM_SCTP_SET_IN_HANDSHAKE    50\n#  define BIO_CTRL_DGRAM_SCTP_ADD_AUTH_KEY                51\n#  define BIO_CTRL_DGRAM_SCTP_NEXT_AUTH_KEY               52\n#  define BIO_CTRL_DGRAM_SCTP_AUTH_CCS_RCVD               53\n#  define BIO_CTRL_DGRAM_SCTP_GET_SNDINFO         60\n#  define BIO_CTRL_DGRAM_SCTP_SET_SNDINFO         61\n#  define BIO_CTRL_DGRAM_SCTP_GET_RCVINFO         62\n#  define BIO_CTRL_DGRAM_SCTP_SET_RCVINFO         63\n#  define BIO_CTRL_DGRAM_SCTP_GET_PRINFO                  64\n#  define BIO_CTRL_DGRAM_SCTP_SET_PRINFO                  65\n#  define BIO_CTRL_DGRAM_SCTP_SAVE_SHUTDOWN               70\n# endif\n\n/* modifiers */\n# define BIO_FP_READ             0x02\n# define BIO_FP_WRITE            0x04\n# define BIO_FP_APPEND           0x08\n# define BIO_FP_TEXT             0x10\n\n# define BIO_FLAGS_READ          0x01\n# define BIO_FLAGS_WRITE         0x02\n# define BIO_FLAGS_IO_SPECIAL    0x04\n# define BIO_FLAGS_RWS (BIO_FLAGS_READ|BIO_FLAGS_WRITE|BIO_FLAGS_IO_SPECIAL)\n# define BIO_FLAGS_SHOULD_RETRY  0x08\n# ifndef BIO_FLAGS_UPLINK\n/*\n * \"UPLINK\" flag denotes file descriptors provided by application. It\n * defaults to 0, as most platforms don't require UPLINK interface.\n */\n#  define BIO_FLAGS_UPLINK        0\n# endif\n\n/* Used in BIO_gethostbyname() */\n# define BIO_GHBN_CTRL_HITS              1\n# define BIO_GHBN_CTRL_MISSES            2\n# define BIO_GHBN_CTRL_CACHE_SIZE        3\n# define BIO_GHBN_CTRL_GET_ENTRY         4\n# define BIO_GHBN_CTRL_FLUSH             5\n\n/* Mostly used in the SSL BIO */\n/*-\n * Not used anymore\n * #define BIO_FLAGS_PROTOCOL_DELAYED_READ 0x10\n * #define BIO_FLAGS_PROTOCOL_DELAYED_WRITE 0x20\n * #define BIO_FLAGS_PROTOCOL_STARTUP   0x40\n */\n\n# define BIO_FLAGS_BASE64_NO_NL  0x100\n\n/*\n * This is used with memory BIOs: it means we shouldn't free up or change the\n * data in any way.\n */\n# define BIO_FLAGS_MEM_RDONLY    0x200\n\ntypedef struct bio_st BIO;\n\nvoid BIO_set_flags(BIO *b, int flags);\nint BIO_test_flags(const BIO *b, int flags);\nvoid BIO_clear_flags(BIO *b, int flags);\n\n# define BIO_get_flags(b) BIO_test_flags(b, ~(0x0))\n# define BIO_set_retry_special(b) \\\n                BIO_set_flags(b, (BIO_FLAGS_IO_SPECIAL|BIO_FLAGS_SHOULD_RETRY))\n# define BIO_set_retry_read(b) \\\n                BIO_set_flags(b, (BIO_FLAGS_READ|BIO_FLAGS_SHOULD_RETRY))\n# define BIO_set_retry_write(b) \\\n                BIO_set_flags(b, (BIO_FLAGS_WRITE|BIO_FLAGS_SHOULD_RETRY))\n\n/* These are normally used internally in BIOs */\n# define BIO_clear_retry_flags(b) \\\n                BIO_clear_flags(b, (BIO_FLAGS_RWS|BIO_FLAGS_SHOULD_RETRY))\n# define BIO_get_retry_flags(b) \\\n                BIO_test_flags(b, (BIO_FLAGS_RWS|BIO_FLAGS_SHOULD_RETRY))\n\n/* These should be used by the application to tell why we should retry */\n# define BIO_should_read(a)              BIO_test_flags(a, BIO_FLAGS_READ)\n# define BIO_should_write(a)             BIO_test_flags(a, BIO_FLAGS_WRITE)\n# define BIO_should_io_special(a)        BIO_test_flags(a, BIO_FLAGS_IO_SPECIAL)\n# define BIO_retry_type(a)               BIO_test_flags(a, BIO_FLAGS_RWS)\n# define BIO_should_retry(a)             BIO_test_flags(a, BIO_FLAGS_SHOULD_RETRY)\n\n/*\n * The next three are used in conjunction with the BIO_should_io_special()\n * condition.  After this returns true, BIO *BIO_get_retry_BIO(BIO *bio, int\n * *reason); will walk the BIO stack and return the 'reason' for the special\n * and the offending BIO. Given a BIO, BIO_get_retry_reason(bio) will return\n * the code.\n */\n/*\n * Returned from the SSL bio when the certificate retrieval code had an error\n */\n# define BIO_RR_SSL_X509_LOOKUP          0x01\n/* Returned from the connect BIO when a connect would have blocked */\n# define BIO_RR_CONNECT                  0x02\n/* Returned from the accept BIO when an accept would have blocked */\n# define BIO_RR_ACCEPT                   0x03\n\n/* These are passed by the BIO callback */\n# define BIO_CB_FREE     0x01\n# define BIO_CB_READ     0x02\n# define BIO_CB_WRITE    0x03\n# define BIO_CB_PUTS     0x04\n# define BIO_CB_GETS     0x05\n# define BIO_CB_CTRL     0x06\n\n/*\n * The callback is called before and after the underling operation, The\n * BIO_CB_RETURN flag indicates if it is after the call\n */\n# define BIO_CB_RETURN   0x80\n# define BIO_CB_return(a) ((a)|BIO_CB_RETURN)\n# define BIO_cb_pre(a)   (!((a)&BIO_CB_RETURN))\n# define BIO_cb_post(a)  ((a)&BIO_CB_RETURN)\n\nlong (*BIO_get_callback(const BIO *b)) (struct bio_st *, int, const char *,\n                                        int, long, long);\nvoid BIO_set_callback(BIO *b,\n                      long (*callback) (struct bio_st *, int, const char *,\n                                        int, long, long));\nchar *BIO_get_callback_arg(const BIO *b);\nvoid BIO_set_callback_arg(BIO *b, char *arg);\n\nconst char *BIO_method_name(const BIO *b);\nint BIO_method_type(const BIO *b);\n\ntypedef void bio_info_cb (struct bio_st *, int, const char *, int, long,\n                          long);\n\ntypedef struct bio_method_st {\n    int type;\n    const char *name;\n    int (*bwrite) (BIO *, const char *, int);\n    int (*bread) (BIO *, char *, int);\n    int (*bputs) (BIO *, const char *);\n    int (*bgets) (BIO *, char *, int);\n    long (*ctrl) (BIO *, int, long, void *);\n    int (*create) (BIO *);\n    int (*destroy) (BIO *);\n    long (*callback_ctrl) (BIO *, int, bio_info_cb *);\n} BIO_METHOD;\n\nstruct bio_st {\n    BIO_METHOD *method;\n    /* bio, mode, argp, argi, argl, ret */\n    long (*callback) (struct bio_st *, int, const char *, int, long, long);\n    char *cb_arg;               /* first argument for the callback */\n    int init;\n    int shutdown;\n    int flags;                  /* extra storage */\n    int retry_reason;\n    int num;\n    void *ptr;\n    struct bio_st *next_bio;    /* used by filter BIOs */\n    struct bio_st *prev_bio;    /* used by filter BIOs */\n    int references;\n    unsigned long num_read;\n    unsigned long num_write;\n    CRYPTO_EX_DATA ex_data;\n};\n\nDECLARE_STACK_OF(BIO)\n\ntypedef struct bio_f_buffer_ctx_struct {\n    /*-\n     * Buffers are setup like this:\n     *\n     * <---------------------- size ----------------------->\n     * +---------------------------------------------------+\n     * | consumed | remaining          | free space        |\n     * +---------------------------------------------------+\n     * <-- off --><------- len ------->\n     */\n    /*- BIO *bio; *//*\n     * this is now in the BIO struct\n     */\n    int ibuf_size;              /* how big is the input buffer */\n    int obuf_size;              /* how big is the output buffer */\n    char *ibuf;                 /* the char array */\n    int ibuf_len;               /* how many bytes are in it */\n    int ibuf_off;               /* write/read offset */\n    char *obuf;                 /* the char array */\n    int obuf_len;               /* how many bytes are in it */\n    int obuf_off;               /* write/read offset */\n} BIO_F_BUFFER_CTX;\n\n/* Prefix and suffix callback in ASN1 BIO */\ntypedef int asn1_ps_func (BIO *b, unsigned char **pbuf, int *plen,\n                          void *parg);\n\n# ifndef OPENSSL_NO_SCTP\n/* SCTP parameter structs */\nstruct bio_dgram_sctp_sndinfo {\n    uint16_t snd_sid;\n    uint16_t snd_flags;\n    uint32_t snd_ppid;\n    uint32_t snd_context;\n};\n\nstruct bio_dgram_sctp_rcvinfo {\n    uint16_t rcv_sid;\n    uint16_t rcv_ssn;\n    uint16_t rcv_flags;\n    uint32_t rcv_ppid;\n    uint32_t rcv_tsn;\n    uint32_t rcv_cumtsn;\n    uint32_t rcv_context;\n};\n\nstruct bio_dgram_sctp_prinfo {\n    uint16_t pr_policy;\n    uint32_t pr_value;\n};\n# endif\n\n/* connect BIO stuff */\n# define BIO_CONN_S_BEFORE               1\n# define BIO_CONN_S_GET_IP               2\n# define BIO_CONN_S_GET_PORT             3\n# define BIO_CONN_S_CREATE_SOCKET        4\n# define BIO_CONN_S_CONNECT              5\n# define BIO_CONN_S_OK                   6\n# define BIO_CONN_S_BLOCKED_CONNECT      7\n# define BIO_CONN_S_NBIO                 8\n/*\n * #define BIO_CONN_get_param_hostname BIO_ctrl\n */\n\n# define BIO_C_SET_CONNECT                       100\n# define BIO_C_DO_STATE_MACHINE                  101\n# define BIO_C_SET_NBIO                          102\n# define BIO_C_SET_PROXY_PARAM                   103\n# define BIO_C_SET_FD                            104\n# define BIO_C_GET_FD                            105\n# define BIO_C_SET_FILE_PTR                      106\n# define BIO_C_GET_FILE_PTR                      107\n# define BIO_C_SET_FILENAME                      108\n# define BIO_C_SET_SSL                           109\n# define BIO_C_GET_SSL                           110\n# define BIO_C_SET_MD                            111\n# define BIO_C_GET_MD                            112\n# define BIO_C_GET_CIPHER_STATUS                 113\n# define BIO_C_SET_BUF_MEM                       114\n# define BIO_C_GET_BUF_MEM_PTR                   115\n# define BIO_C_GET_BUFF_NUM_LINES                116\n# define BIO_C_SET_BUFF_SIZE                     117\n# define BIO_C_SET_ACCEPT                        118\n# define BIO_C_SSL_MODE                          119\n# define BIO_C_GET_MD_CTX                        120\n# define BIO_C_GET_PROXY_PARAM                   121\n# define BIO_C_SET_BUFF_READ_DATA                122/* data to read first */\n# define BIO_C_GET_CONNECT                       123\n# define BIO_C_GET_ACCEPT                        124\n# define BIO_C_SET_SSL_RENEGOTIATE_BYTES         125\n# define BIO_C_GET_SSL_NUM_RENEGOTIATES          126\n# define BIO_C_SET_SSL_RENEGOTIATE_TIMEOUT       127\n# define BIO_C_FILE_SEEK                         128\n# define BIO_C_GET_CIPHER_CTX                    129\n# define BIO_C_SET_BUF_MEM_EOF_RETURN            130/* return end of input\n                                                     * value */\n# define BIO_C_SET_BIND_MODE                     131\n# define BIO_C_GET_BIND_MODE                     132\n# define BIO_C_FILE_TELL                         133\n# define BIO_C_GET_SOCKS                         134\n# define BIO_C_SET_SOCKS                         135\n\n# define BIO_C_SET_WRITE_BUF_SIZE                136/* for BIO_s_bio */\n# define BIO_C_GET_WRITE_BUF_SIZE                137\n# define BIO_C_MAKE_BIO_PAIR                     138\n# define BIO_C_DESTROY_BIO_PAIR                  139\n# define BIO_C_GET_WRITE_GUARANTEE               140\n# define BIO_C_GET_READ_REQUEST                  141\n# define BIO_C_SHUTDOWN_WR                       142\n# define BIO_C_NREAD0                            143\n# define BIO_C_NREAD                             144\n# define BIO_C_NWRITE0                           145\n# define BIO_C_NWRITE                            146\n# define BIO_C_RESET_READ_REQUEST                147\n# define BIO_C_SET_MD_CTX                        148\n\n# define BIO_C_SET_PREFIX                        149\n# define BIO_C_GET_PREFIX                        150\n# define BIO_C_SET_SUFFIX                        151\n# define BIO_C_GET_SUFFIX                        152\n\n# define BIO_C_SET_EX_ARG                        153\n# define BIO_C_GET_EX_ARG                        154\n\n# define BIO_set_app_data(s,arg)         BIO_set_ex_data(s,0,arg)\n# define BIO_get_app_data(s)             BIO_get_ex_data(s,0)\n\n/* BIO_s_connect() and BIO_s_socks4a_connect() */\n# define BIO_set_conn_hostname(b,name) BIO_ctrl(b,BIO_C_SET_CONNECT,0,(char *)name)\n# define BIO_set_conn_port(b,port) BIO_ctrl(b,BIO_C_SET_CONNECT,1,(char *)port)\n# define BIO_set_conn_ip(b,ip)     BIO_ctrl(b,BIO_C_SET_CONNECT,2,(char *)ip)\n# define BIO_set_conn_int_port(b,port) BIO_ctrl(b,BIO_C_SET_CONNECT,3,(char *)port)\n# define BIO_get_conn_hostname(b)  BIO_ptr_ctrl(b,BIO_C_GET_CONNECT,0)\n# define BIO_get_conn_port(b)      BIO_ptr_ctrl(b,BIO_C_GET_CONNECT,1)\n# define BIO_get_conn_ip(b)               BIO_ptr_ctrl(b,BIO_C_GET_CONNECT,2)\n# define BIO_get_conn_int_port(b) BIO_int_ctrl(b,BIO_C_GET_CONNECT,3,0)\n\n# define BIO_set_nbio(b,n)       BIO_ctrl(b,BIO_C_SET_NBIO,(n),NULL)\n\n/* BIO_s_accept_socket() */\n# define BIO_set_accept_port(b,name) BIO_ctrl(b,BIO_C_SET_ACCEPT,0,(char *)name)\n# define BIO_get_accept_port(b)  BIO_ptr_ctrl(b,BIO_C_GET_ACCEPT,0)\n/* #define BIO_set_nbio(b,n)    BIO_ctrl(b,BIO_C_SET_NBIO,(n),NULL) */\n# define BIO_set_nbio_accept(b,n) BIO_ctrl(b,BIO_C_SET_ACCEPT,1,(n)?(void *)\"a\":NULL)\n# define BIO_set_accept_bios(b,bio) BIO_ctrl(b,BIO_C_SET_ACCEPT,2,(char *)bio)\n\n# define BIO_BIND_NORMAL                 0\n# define BIO_BIND_REUSEADDR_IF_UNUSED    1\n# define BIO_BIND_REUSEADDR              2\n# define BIO_set_bind_mode(b,mode) BIO_ctrl(b,BIO_C_SET_BIND_MODE,mode,NULL)\n# define BIO_get_bind_mode(b,mode) BIO_ctrl(b,BIO_C_GET_BIND_MODE,0,NULL)\n\n# define BIO_do_connect(b)       BIO_do_handshake(b)\n# define BIO_do_accept(b)        BIO_do_handshake(b)\n# define BIO_do_handshake(b)     BIO_ctrl(b,BIO_C_DO_STATE_MACHINE,0,NULL)\n\n/* BIO_s_proxy_client() */\n# define BIO_set_url(b,url)      BIO_ctrl(b,BIO_C_SET_PROXY_PARAM,0,(char *)(url))\n# define BIO_set_proxies(b,p)    BIO_ctrl(b,BIO_C_SET_PROXY_PARAM,1,(char *)(p))\n/* BIO_set_nbio(b,n) */\n# define BIO_set_filter_bio(b,s) BIO_ctrl(b,BIO_C_SET_PROXY_PARAM,2,(char *)(s))\n/* BIO *BIO_get_filter_bio(BIO *bio); */\n# define BIO_set_proxy_cb(b,cb) BIO_callback_ctrl(b,BIO_C_SET_PROXY_PARAM,3,(void *(*cb)()))\n# define BIO_set_proxy_header(b,sk) BIO_ctrl(b,BIO_C_SET_PROXY_PARAM,4,(char *)sk)\n# define BIO_set_no_connect_return(b,bool) BIO_int_ctrl(b,BIO_C_SET_PROXY_PARAM,5,bool)\n\n# define BIO_get_proxy_header(b,skp) BIO_ctrl(b,BIO_C_GET_PROXY_PARAM,0,(char *)skp)\n# define BIO_get_proxies(b,pxy_p) BIO_ctrl(b,BIO_C_GET_PROXY_PARAM,1,(char *)(pxy_p))\n# define BIO_get_url(b,url)      BIO_ctrl(b,BIO_C_GET_PROXY_PARAM,2,(char *)(url))\n# define BIO_get_no_connect_return(b)    BIO_ctrl(b,BIO_C_GET_PROXY_PARAM,5,NULL)\n\n# define BIO_set_fd(b,fd,c)      BIO_int_ctrl(b,BIO_C_SET_FD,c,fd)\n# define BIO_get_fd(b,c)         BIO_ctrl(b,BIO_C_GET_FD,0,(char *)c)\n\n# define BIO_set_fp(b,fp,c)      BIO_ctrl(b,BIO_C_SET_FILE_PTR,c,(char *)fp)\n# define BIO_get_fp(b,fpp)       BIO_ctrl(b,BIO_C_GET_FILE_PTR,0,(char *)fpp)\n\n# define BIO_seek(b,ofs) (int)BIO_ctrl(b,BIO_C_FILE_SEEK,ofs,NULL)\n# define BIO_tell(b)     (int)BIO_ctrl(b,BIO_C_FILE_TELL,0,NULL)\n\n/*\n * name is cast to lose const, but might be better to route through a\n * function so we can do it safely\n */\n# ifdef CONST_STRICT\n/*\n * If you are wondering why this isn't defined, its because CONST_STRICT is\n * purely a compile-time kludge to allow const to be checked.\n */\nint BIO_read_filename(BIO *b, const char *name);\n# else\n#  define BIO_read_filename(b,name) BIO_ctrl(b,BIO_C_SET_FILENAME, \\\n                BIO_CLOSE|BIO_FP_READ,(char *)name)\n# endif\n# define BIO_write_filename(b,name) BIO_ctrl(b,BIO_C_SET_FILENAME, \\\n                BIO_CLOSE|BIO_FP_WRITE,name)\n# define BIO_append_filename(b,name) BIO_ctrl(b,BIO_C_SET_FILENAME, \\\n                BIO_CLOSE|BIO_FP_APPEND,name)\n# define BIO_rw_filename(b,name) BIO_ctrl(b,BIO_C_SET_FILENAME, \\\n                BIO_CLOSE|BIO_FP_READ|BIO_FP_WRITE,name)\n\n/*\n * WARNING WARNING, this ups the reference count on the read bio of the SSL\n * structure.  This is because the ssl read BIO is now pointed to by the\n * next_bio field in the bio.  So when you free the BIO, make sure you are\n * doing a BIO_free_all() to catch the underlying BIO.\n */\n# define BIO_set_ssl(b,ssl,c)    BIO_ctrl(b,BIO_C_SET_SSL,c,(char *)ssl)\n# define BIO_get_ssl(b,sslp)     BIO_ctrl(b,BIO_C_GET_SSL,0,(char *)sslp)\n# define BIO_set_ssl_mode(b,client)      BIO_ctrl(b,BIO_C_SSL_MODE,client,NULL)\n# define BIO_set_ssl_renegotiate_bytes(b,num) \\\n        BIO_ctrl(b,BIO_C_SET_SSL_RENEGOTIATE_BYTES,num,NULL);\n# define BIO_get_num_renegotiates(b) \\\n        BIO_ctrl(b,BIO_C_GET_SSL_NUM_RENEGOTIATES,0,NULL);\n# define BIO_set_ssl_renegotiate_timeout(b,seconds) \\\n        BIO_ctrl(b,BIO_C_SET_SSL_RENEGOTIATE_TIMEOUT,seconds,NULL);\n\n/* defined in evp.h */\n/* #define BIO_set_md(b,md)     BIO_ctrl(b,BIO_C_SET_MD,1,(char *)md) */\n\n# define BIO_get_mem_data(b,pp)  BIO_ctrl(b,BIO_CTRL_INFO,0,(char *)pp)\n# define BIO_set_mem_buf(b,bm,c) BIO_ctrl(b,BIO_C_SET_BUF_MEM,c,(char *)bm)\n# define BIO_get_mem_ptr(b,pp)   BIO_ctrl(b,BIO_C_GET_BUF_MEM_PTR,0,(char *)pp)\n# define BIO_set_mem_eof_return(b,v) \\\n                                BIO_ctrl(b,BIO_C_SET_BUF_MEM_EOF_RETURN,v,NULL)\n\n/* For the BIO_f_buffer() type */\n# define BIO_get_buffer_num_lines(b)     BIO_ctrl(b,BIO_C_GET_BUFF_NUM_LINES,0,NULL)\n# define BIO_set_buffer_size(b,size)     BIO_ctrl(b,BIO_C_SET_BUFF_SIZE,size,NULL)\n# define BIO_set_read_buffer_size(b,size) BIO_int_ctrl(b,BIO_C_SET_BUFF_SIZE,size,0)\n# define BIO_set_write_buffer_size(b,size) BIO_int_ctrl(b,BIO_C_SET_BUFF_SIZE,size,1)\n# define BIO_set_buffer_read_data(b,buf,num) BIO_ctrl(b,BIO_C_SET_BUFF_READ_DATA,num,buf)\n\n/* Don't use the next one unless you know what you are doing :-) */\n# define BIO_dup_state(b,ret)    BIO_ctrl(b,BIO_CTRL_DUP,0,(char *)(ret))\n\n# define BIO_reset(b)            (int)BIO_ctrl(b,BIO_CTRL_RESET,0,NULL)\n# define BIO_eof(b)              (int)BIO_ctrl(b,BIO_CTRL_EOF,0,NULL)\n# define BIO_set_close(b,c)      (int)BIO_ctrl(b,BIO_CTRL_SET_CLOSE,(c),NULL)\n# define BIO_get_close(b)        (int)BIO_ctrl(b,BIO_CTRL_GET_CLOSE,0,NULL)\n# define BIO_pending(b)          (int)BIO_ctrl(b,BIO_CTRL_PENDING,0,NULL)\n# define BIO_wpending(b)         (int)BIO_ctrl(b,BIO_CTRL_WPENDING,0,NULL)\n/* ...pending macros have inappropriate return type */\nsize_t BIO_ctrl_pending(BIO *b);\nsize_t BIO_ctrl_wpending(BIO *b);\n# define BIO_flush(b)            (int)BIO_ctrl(b,BIO_CTRL_FLUSH,0,NULL)\n# define BIO_get_info_callback(b,cbp) (int)BIO_ctrl(b,BIO_CTRL_GET_CALLBACK,0, \\\n                                                   cbp)\n# define BIO_set_info_callback(b,cb) (int)BIO_callback_ctrl(b,BIO_CTRL_SET_CALLBACK,cb)\n\n/* For the BIO_f_buffer() type */\n# define BIO_buffer_get_num_lines(b) BIO_ctrl(b,BIO_CTRL_GET,0,NULL)\n\n/* For BIO_s_bio() */\n# define BIO_set_write_buf_size(b,size) (int)BIO_ctrl(b,BIO_C_SET_WRITE_BUF_SIZE,size,NULL)\n# define BIO_get_write_buf_size(b,size) (size_t)BIO_ctrl(b,BIO_C_GET_WRITE_BUF_SIZE,size,NULL)\n# define BIO_make_bio_pair(b1,b2)   (int)BIO_ctrl(b1,BIO_C_MAKE_BIO_PAIR,0,b2)\n# define BIO_destroy_bio_pair(b)    (int)BIO_ctrl(b,BIO_C_DESTROY_BIO_PAIR,0,NULL)\n# define BIO_shutdown_wr(b) (int)BIO_ctrl(b, BIO_C_SHUTDOWN_WR, 0, NULL)\n/* macros with inappropriate type -- but ...pending macros use int too: */\n# define BIO_get_write_guarantee(b) (int)BIO_ctrl(b,BIO_C_GET_WRITE_GUARANTEE,0,NULL)\n# define BIO_get_read_request(b)    (int)BIO_ctrl(b,BIO_C_GET_READ_REQUEST,0,NULL)\nsize_t BIO_ctrl_get_write_guarantee(BIO *b);\nsize_t BIO_ctrl_get_read_request(BIO *b);\nint BIO_ctrl_reset_read_request(BIO *b);\n\n/* ctrl macros for dgram */\n# define BIO_ctrl_dgram_connect(b,peer)  \\\n                     (int)BIO_ctrl(b,BIO_CTRL_DGRAM_CONNECT,0, (char *)peer)\n# define BIO_ctrl_set_connected(b, state, peer) \\\n         (int)BIO_ctrl(b, BIO_CTRL_DGRAM_SET_CONNECTED, state, (char *)peer)\n# define BIO_dgram_recv_timedout(b) \\\n         (int)BIO_ctrl(b, BIO_CTRL_DGRAM_GET_RECV_TIMER_EXP, 0, NULL)\n# define BIO_dgram_send_timedout(b) \\\n         (int)BIO_ctrl(b, BIO_CTRL_DGRAM_GET_SEND_TIMER_EXP, 0, NULL)\n# define BIO_dgram_get_peer(b,peer) \\\n         (int)BIO_ctrl(b, BIO_CTRL_DGRAM_GET_PEER, 0, (char *)peer)\n# define BIO_dgram_set_peer(b,peer) \\\n         (int)BIO_ctrl(b, BIO_CTRL_DGRAM_SET_PEER, 0, (char *)peer)\n# define BIO_dgram_get_mtu_overhead(b) \\\n         (unsigned int)BIO_ctrl((b), BIO_CTRL_DGRAM_GET_MTU_OVERHEAD, 0, NULL)\n\n/* These two aren't currently implemented */\n/* int BIO_get_ex_num(BIO *bio); */\n/* void BIO_set_ex_free_func(BIO *bio,int idx,void (*cb)()); */\nint BIO_set_ex_data(BIO *bio, int idx, void *data);\nvoid *BIO_get_ex_data(BIO *bio, int idx);\nint BIO_get_ex_new_index(long argl, void *argp, CRYPTO_EX_new *new_func,\n                         CRYPTO_EX_dup *dup_func, CRYPTO_EX_free *free_func);\nunsigned long BIO_number_read(BIO *bio);\nunsigned long BIO_number_written(BIO *bio);\n\n/* For BIO_f_asn1() */\nint BIO_asn1_set_prefix(BIO *b, asn1_ps_func *prefix,\n                        asn1_ps_func *prefix_free);\nint BIO_asn1_get_prefix(BIO *b, asn1_ps_func **pprefix,\n                        asn1_ps_func **pprefix_free);\nint BIO_asn1_set_suffix(BIO *b, asn1_ps_func *suffix,\n                        asn1_ps_func *suffix_free);\nint BIO_asn1_get_suffix(BIO *b, asn1_ps_func **psuffix,\n                        asn1_ps_func **psuffix_free);\n\n# ifndef OPENSSL_NO_FP_API\nBIO_METHOD *BIO_s_file(void);\nBIO *BIO_new_file(const char *filename, const char *mode);\nBIO *BIO_new_fp(FILE *stream, int close_flag);\n#  define BIO_s_file_internal    BIO_s_file\n# endif\nBIO *BIO_new(BIO_METHOD *type);\nint BIO_set(BIO *a, BIO_METHOD *type);\nint BIO_free(BIO *a);\nvoid BIO_vfree(BIO *a);\nint BIO_read(BIO *b, void *data, int len);\nint BIO_gets(BIO *bp, char *buf, int size);\nint BIO_write(BIO *b, const void *data, int len);\nint BIO_puts(BIO *bp, const char *buf);\nint BIO_indent(BIO *b, int indent, int max);\nlong BIO_ctrl(BIO *bp, int cmd, long larg, void *parg);\nlong BIO_callback_ctrl(BIO *b, int cmd,\n                       void (*fp) (struct bio_st *, int, const char *, int,\n                                   long, long));\nchar *BIO_ptr_ctrl(BIO *bp, int cmd, long larg);\nlong BIO_int_ctrl(BIO *bp, int cmd, long larg, int iarg);\nBIO *BIO_push(BIO *b, BIO *append);\nBIO *BIO_pop(BIO *b);\nvoid BIO_free_all(BIO *a);\nBIO *BIO_find_type(BIO *b, int bio_type);\nBIO *BIO_next(BIO *b);\nBIO *BIO_get_retry_BIO(BIO *bio, int *reason);\nint BIO_get_retry_reason(BIO *bio);\nBIO *BIO_dup_chain(BIO *in);\n\nint BIO_nread0(BIO *bio, char **buf);\nint BIO_nread(BIO *bio, char **buf, int num);\nint BIO_nwrite0(BIO *bio, char **buf);\nint BIO_nwrite(BIO *bio, char **buf, int num);\n\nlong BIO_debug_callback(BIO *bio, int cmd, const char *argp, int argi,\n                        long argl, long ret);\n\nBIO_METHOD *BIO_s_mem(void);\nBIO *BIO_new_mem_buf(void *buf, int len);\nBIO_METHOD *BIO_s_socket(void);\nBIO_METHOD *BIO_s_connect(void);\nBIO_METHOD *BIO_s_accept(void);\nBIO_METHOD *BIO_s_fd(void);\n# ifndef OPENSSL_SYS_OS2\nBIO_METHOD *BIO_s_log(void);\n# endif\nBIO_METHOD *BIO_s_bio(void);\nBIO_METHOD *BIO_s_null(void);\nBIO_METHOD *BIO_f_null(void);\nBIO_METHOD *BIO_f_buffer(void);\n# ifdef OPENSSL_SYS_VMS\nBIO_METHOD *BIO_f_linebuffer(void);\n# endif\nBIO_METHOD *BIO_f_nbio_test(void);\n# ifndef OPENSSL_NO_DGRAM\nBIO_METHOD *BIO_s_datagram(void);\n#  ifndef OPENSSL_NO_SCTP\nBIO_METHOD *BIO_s_datagram_sctp(void);\n#  endif\n# endif\n\n/* BIO_METHOD *BIO_f_ber(void); */\n\nint BIO_sock_should_retry(int i);\nint BIO_sock_non_fatal_error(int error);\nint BIO_dgram_non_fatal_error(int error);\n\nint BIO_fd_should_retry(int i);\nint BIO_fd_non_fatal_error(int error);\nint BIO_dump_cb(int (*cb) (const void *data, size_t len, void *u),\n                void *u, const char *s, int len);\nint BIO_dump_indent_cb(int (*cb) (const void *data, size_t len, void *u),\n                       void *u, const char *s, int len, int indent);\nint BIO_dump(BIO *b, const char *bytes, int len);\nint BIO_dump_indent(BIO *b, const char *bytes, int len, int indent);\n# ifndef OPENSSL_NO_FP_API\nint BIO_dump_fp(FILE *fp, const char *s, int len);\nint BIO_dump_indent_fp(FILE *fp, const char *s, int len, int indent);\n# endif\nstruct hostent *BIO_gethostbyname(const char *name);\n/*-\n * We might want a thread-safe interface too:\n * struct hostent *BIO_gethostbyname_r(const char *name,\n *     struct hostent *result, void *buffer, size_t buflen);\n * or something similar (caller allocates a struct hostent,\n * pointed to by \"result\", and additional buffer space for the various\n * substructures; if the buffer does not suffice, NULL is returned\n * and an appropriate error code is set).\n */\nint BIO_sock_error(int sock);\nint BIO_socket_ioctl(int fd, long type, void *arg);\nint BIO_socket_nbio(int fd, int mode);\nint BIO_get_port(const char *str, unsigned short *port_ptr);\nint BIO_get_host_ip(const char *str, unsigned char *ip);\nint BIO_get_accept_socket(char *host_port, int mode);\nint BIO_accept(int sock, char **ip_port);\nint BIO_sock_init(void);\nvoid BIO_sock_cleanup(void);\nint BIO_set_tcp_ndelay(int sock, int turn_on);\n\nBIO *BIO_new_socket(int sock, int close_flag);\nBIO *BIO_new_dgram(int fd, int close_flag);\n# ifndef OPENSSL_NO_SCTP\nBIO *BIO_new_dgram_sctp(int fd, int close_flag);\nint BIO_dgram_is_sctp(BIO *bio);\nint BIO_dgram_sctp_notification_cb(BIO *b,\n                                   void (*handle_notifications) (BIO *bio,\n                                                                 void\n                                                                 *context,\n                                                                 void *buf),\n                                   void *context);\nint BIO_dgram_sctp_wait_for_dry(BIO *b);\nint BIO_dgram_sctp_msg_waiting(BIO *b);\n# endif\nBIO *BIO_new_fd(int fd, int close_flag);\nBIO *BIO_new_connect(char *host_port);\nBIO *BIO_new_accept(char *host_port);\n\nint BIO_new_bio_pair(BIO **bio1, size_t writebuf1,\n                     BIO **bio2, size_t writebuf2);\n/*\n * If successful, returns 1 and in *bio1, *bio2 two BIO pair endpoints.\n * Otherwise returns 0 and sets *bio1 and *bio2 to NULL. Size 0 uses default\n * value.\n */\n\nvoid BIO_copy_next_retry(BIO *b);\n\n/*\n * long BIO_ghbn_ctrl(int cmd,int iarg,char *parg);\n */\n\n# ifdef __GNUC__\n#  define __bio_h__attr__ __attribute__\n# else\n#  define __bio_h__attr__(x)\n# endif\nint BIO_printf(BIO *bio, const char *format, ...)\n__bio_h__attr__((__format__(__printf__, 2, 3)));\nint BIO_vprintf(BIO *bio, const char *format, va_list args)\n__bio_h__attr__((__format__(__printf__, 2, 0)));\nint BIO_snprintf(char *buf, size_t n, const char *format, ...)\n__bio_h__attr__((__format__(__printf__, 3, 4)));\nint BIO_vsnprintf(char *buf, size_t n, const char *format, va_list args)\n__bio_h__attr__((__format__(__printf__, 3, 0)));\n# undef __bio_h__attr__\n\n/* BEGIN ERROR CODES */\n/*\n * The following lines are auto generated by the script mkerr.pl. Any changes\n * made after this point may be overwritten when the script is next run.\n */\nvoid ERR_load_BIO_strings(void);\n\n/* Error codes for the BIO functions. */\n\n/* Function codes. */\n# define BIO_F_ACPT_STATE                                 100\n# define BIO_F_BIO_ACCEPT                                 101\n# define BIO_F_BIO_BER_GET_HEADER                         102\n# define BIO_F_BIO_CALLBACK_CTRL                          131\n# define BIO_F_BIO_CTRL                                   103\n# define BIO_F_BIO_GETHOSTBYNAME                          120\n# define BIO_F_BIO_GETS                                   104\n# define BIO_F_BIO_GET_ACCEPT_SOCKET                      105\n# define BIO_F_BIO_GET_HOST_IP                            106\n# define BIO_F_BIO_GET_PORT                               107\n# define BIO_F_BIO_MAKE_PAIR                              121\n# define BIO_F_BIO_NEW                                    108\n# define BIO_F_BIO_NEW_FILE                               109\n# define BIO_F_BIO_NEW_MEM_BUF                            126\n# define BIO_F_BIO_NREAD                                  123\n# define BIO_F_BIO_NREAD0                                 124\n# define BIO_F_BIO_NWRITE                                 125\n# define BIO_F_BIO_NWRITE0                                122\n# define BIO_F_BIO_PUTS                                   110\n# define BIO_F_BIO_READ                                   111\n# define BIO_F_BIO_SOCK_INIT                              112\n# define BIO_F_BIO_WRITE                                  113\n# define BIO_F_BUFFER_CTRL                                114\n# define BIO_F_CONN_CTRL                                  127\n# define BIO_F_CONN_STATE                                 115\n# define BIO_F_DGRAM_SCTP_READ                            132\n# define BIO_F_DGRAM_SCTP_WRITE                           133\n# define BIO_F_FILE_CTRL                                  116\n# define BIO_F_FILE_READ                                  130\n# define BIO_F_LINEBUFFER_CTRL                            129\n# define BIO_F_MEM_READ                                   128\n# define BIO_F_MEM_WRITE                                  117\n# define BIO_F_SSL_NEW                                    118\n# define BIO_F_WSASTARTUP                                 119\n\n/* Reason codes. */\n# define BIO_R_ACCEPT_ERROR                               100\n# define BIO_R_BAD_FOPEN_MODE                             101\n# define BIO_R_BAD_HOSTNAME_LOOKUP                        102\n# define BIO_R_BROKEN_PIPE                                124\n# define BIO_R_CONNECT_ERROR                              103\n# define BIO_R_EOF_ON_MEMORY_BIO                          127\n# define BIO_R_ERROR_SETTING_NBIO                         104\n# define BIO_R_ERROR_SETTING_NBIO_ON_ACCEPTED_SOCKET      105\n# define BIO_R_ERROR_SETTING_NBIO_ON_ACCEPT_SOCKET        106\n# define BIO_R_GETHOSTBYNAME_ADDR_IS_NOT_AF_INET          107\n# define BIO_R_INVALID_ARGUMENT                           125\n# define BIO_R_INVALID_IP_ADDRESS                         108\n# define BIO_R_IN_USE                                     123\n# define BIO_R_KEEPALIVE                                  109\n# define BIO_R_NBIO_CONNECT_ERROR                         110\n# define BIO_R_NO_ACCEPT_PORT_SPECIFIED                   111\n# define BIO_R_NO_HOSTNAME_SPECIFIED                      112\n# define BIO_R_NO_PORT_DEFINED                            113\n# define BIO_R_NO_PORT_SPECIFIED                          114\n# define BIO_R_NO_SUCH_FILE                               128\n# define BIO_R_NULL_PARAMETER                             115\n# define BIO_R_TAG_MISMATCH                               116\n# define BIO_R_UNABLE_TO_BIND_SOCKET                      117\n# define BIO_R_UNABLE_TO_CREATE_SOCKET                    118\n# define BIO_R_UNABLE_TO_LISTEN_SOCKET                    119\n# define BIO_R_UNINITIALIZED                              120\n# define BIO_R_UNSUPPORTED_METHOD                         121\n# define BIO_R_WRITE_TO_READ_ONLY_BIO                     126\n# define BIO_R_WSASTARTUP                                 122\n\n#ifdef  __cplusplus\n}\n#endif\n#endif\n"
  },
  {
    "path": "Pods/OpenSSL-Universal/include-ios/openssl/blowfish.h",
    "content": "/* crypto/bf/blowfish.h */\n/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)\n * All rights reserved.\n *\n * This package is an SSL implementation written\n * by Eric Young (eay@cryptsoft.com).\n * The implementation was written so as to conform with Netscapes SSL.\n *\n * This library is free for commercial and non-commercial use as long as\n * the following conditions are aheared to.  The following conditions\n * apply to all code found in this distribution, be it the RC4, RSA,\n * lhash, DES, etc., code; not just the SSL code.  The SSL documentation\n * included with this distribution is covered by the same copyright terms\n * except that the holder is Tim Hudson (tjh@cryptsoft.com).\n *\n * Copyright remains Eric Young's, and as such any Copyright notices in\n * the code are not to be removed.\n * If this package is used in a product, Eric Young should be given attribution\n * as the author of the parts of the library used.\n * This can be in the form of a textual message at program startup or\n * in documentation (online or textual) provided with the package.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n * 1. Redistributions of source code must retain the copyright\n *    notice, this list of conditions and the following disclaimer.\n * 2. Redistributions in binary form must reproduce the above copyright\n *    notice, this list of conditions and the following disclaimer in the\n *    documentation and/or other materials provided with the distribution.\n * 3. All advertising materials mentioning features or use of this software\n *    must display the following acknowledgement:\n *    \"This product includes cryptographic software written by\n *     Eric Young (eay@cryptsoft.com)\"\n *    The word 'cryptographic' can be left out if the rouines from the library\n *    being used are not cryptographic related :-).\n * 4. If you include any Windows specific code (or a derivative thereof) from\n *    the apps directory (application code) you must include an acknowledgement:\n *    \"This product includes software written by Tim Hudson (tjh@cryptsoft.com)\"\n *\n * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND\n * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE\n * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n * SUCH DAMAGE.\n *\n * The licence and distribution terms for any publically available version or\n * derivative of this code cannot be changed.  i.e. this code cannot simply be\n * copied and put under another distribution licence\n * [including the GNU Public Licence.]\n */\n\n#ifndef HEADER_BLOWFISH_H\n# define HEADER_BLOWFISH_H\n\n# include <openssl/e_os2.h>\n\n#ifdef  __cplusplus\nextern \"C\" {\n#endif\n\n# ifdef OPENSSL_NO_BF\n#  error BF is disabled.\n# endif\n\n# define BF_ENCRYPT      1\n# define BF_DECRYPT      0\n\n/*-\n * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n * ! BF_LONG has to be at least 32 bits wide. If it's wider, then !\n * ! BF_LONG_LOG2 has to be defined along.                        !\n * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n */\n\n# if defined(__LP32__)\n#  define BF_LONG unsigned long\n# elif defined(OPENSSL_SYS_CRAY) || defined(__ILP64__)\n#  define BF_LONG unsigned long\n#  define BF_LONG_LOG2 3\n/*\n * _CRAY note. I could declare short, but I have no idea what impact\n * does it have on performance on none-T3E machines. I could declare\n * int, but at least on C90 sizeof(int) can be chosen at compile time.\n * So I've chosen long...\n *                                      <appro@fy.chalmers.se>\n */\n# else\n#  define BF_LONG unsigned int\n# endif\n\n# define BF_ROUNDS       16\n# define BF_BLOCK        8\n\ntypedef struct bf_key_st {\n    BF_LONG P[BF_ROUNDS + 2];\n    BF_LONG S[4 * 256];\n} BF_KEY;\n\n# ifdef OPENSSL_FIPS\nvoid private_BF_set_key(BF_KEY *key, int len, const unsigned char *data);\n# endif\nvoid BF_set_key(BF_KEY *key, int len, const unsigned char *data);\n\nvoid BF_encrypt(BF_LONG *data, const BF_KEY *key);\nvoid BF_decrypt(BF_LONG *data, const BF_KEY *key);\n\nvoid BF_ecb_encrypt(const unsigned char *in, unsigned char *out,\n                    const BF_KEY *key, int enc);\nvoid BF_cbc_encrypt(const unsigned char *in, unsigned char *out, long length,\n                    const BF_KEY *schedule, unsigned char *ivec, int enc);\nvoid BF_cfb64_encrypt(const unsigned char *in, unsigned char *out,\n                      long length, const BF_KEY *schedule,\n                      unsigned char *ivec, int *num, int enc);\nvoid BF_ofb64_encrypt(const unsigned char *in, unsigned char *out,\n                      long length, const BF_KEY *schedule,\n                      unsigned char *ivec, int *num);\nconst char *BF_options(void);\n\n#ifdef  __cplusplus\n}\n#endif\n\n#endif\n"
  },
  {
    "path": "Pods/OpenSSL-Universal/include-ios/openssl/bn.h",
    "content": "/* crypto/bn/bn.h */\n/* Copyright (C) 1995-1997 Eric Young (eay@cryptsoft.com)\n * All rights reserved.\n *\n * This package is an SSL implementation written\n * by Eric Young (eay@cryptsoft.com).\n * The implementation was written so as to conform with Netscapes SSL.\n *\n * This library is free for commercial and non-commercial use as long as\n * the following conditions are aheared to.  The following conditions\n * apply to all code found in this distribution, be it the RC4, RSA,\n * lhash, DES, etc., code; not just the SSL code.  The SSL documentation\n * included with this distribution is covered by the same copyright terms\n * except that the holder is Tim Hudson (tjh@cryptsoft.com).\n *\n * Copyright remains Eric Young's, and as such any Copyright notices in\n * the code are not to be removed.\n * If this package is used in a product, Eric Young should be given attribution\n * as the author of the parts of the library used.\n * This can be in the form of a textual message at program startup or\n * in documentation (online or textual) provided with the package.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n * 1. Redistributions of source code must retain the copyright\n *    notice, this list of conditions and the following disclaimer.\n * 2. Redistributions in binary form must reproduce the above copyright\n *    notice, this list of conditions and the following disclaimer in the\n *    documentation and/or other materials provided with the distribution.\n * 3. All advertising materials mentioning features or use of this software\n *    must display the following acknowledgement:\n *    \"This product includes cryptographic software written by\n *     Eric Young (eay@cryptsoft.com)\"\n *    The word 'cryptographic' can be left out if the rouines from the library\n *    being used are not cryptographic related :-).\n * 4. If you include any Windows specific code (or a derivative thereof) from\n *    the apps directory (application code) you must include an acknowledgement:\n *    \"This product includes software written by Tim Hudson (tjh@cryptsoft.com)\"\n *\n * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND\n * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE\n * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n * SUCH DAMAGE.\n *\n * The licence and distribution terms for any publically available version or\n * derivative of this code cannot be changed.  i.e. this code cannot simply be\n * copied and put under another distribution licence\n * [including the GNU Public Licence.]\n */\n/* ====================================================================\n * Copyright (c) 1998-2006 The OpenSSL Project.  All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n *\n * 1. Redistributions of source code must retain the above copyright\n *    notice, this list of conditions and the following disclaimer.\n *\n * 2. Redistributions in binary form must reproduce the above copyright\n *    notice, this list of conditions and the following disclaimer in\n *    the documentation and/or other materials provided with the\n *    distribution.\n *\n * 3. All advertising materials mentioning features or use of this\n *    software must display the following acknowledgment:\n *    \"This product includes software developed by the OpenSSL Project\n *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)\"\n *\n * 4. The names \"OpenSSL Toolkit\" and \"OpenSSL Project\" must not be used to\n *    endorse or promote products derived from this software without\n *    prior written permission. For written permission, please contact\n *    openssl-core@openssl.org.\n *\n * 5. Products derived from this software may not be called \"OpenSSL\"\n *    nor may \"OpenSSL\" appear in their names without prior written\n *    permission of the OpenSSL Project.\n *\n * 6. Redistributions of any form whatsoever must retain the following\n *    acknowledgment:\n *    \"This product includes software developed by the OpenSSL Project\n *    for use in the OpenSSL Toolkit (http://www.openssl.org/)\"\n *\n * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY\n * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\n * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR\n * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,\n * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED\n * OF THE POSSIBILITY OF SUCH DAMAGE.\n * ====================================================================\n *\n * This product includes cryptographic software written by Eric Young\n * (eay@cryptsoft.com).  This product includes software written by Tim\n * Hudson (tjh@cryptsoft.com).\n *\n */\n/* ====================================================================\n * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED.\n *\n * Portions of the attached software (\"Contribution\") are developed by\n * SUN MICROSYSTEMS, INC., and are contributed to the OpenSSL project.\n *\n * The Contribution is licensed pursuant to the Eric Young open source\n * license provided above.\n *\n * The binary polynomial arithmetic software is originally written by\n * Sheueling Chang Shantz and Douglas Stebila of Sun Microsystems Laboratories.\n *\n */\n\n#ifndef HEADER_BN_H\n# define HEADER_BN_H\n\n# include <openssl/e_os2.h>\n# ifndef OPENSSL_NO_FP_API\n#  include <stdio.h>            /* FILE */\n# endif\n# include <openssl/ossl_typ.h>\n# include <openssl/crypto.h>\n\n#ifdef  __cplusplus\nextern \"C\" {\n#endif\n\n/*\n * These preprocessor symbols control various aspects of the bignum headers\n * and library code. They're not defined by any \"normal\" configuration, as\n * they are intended for development and testing purposes. NB: defining all\n * three can be useful for debugging application code as well as openssl\n * itself. BN_DEBUG - turn on various debugging alterations to the bignum\n * code BN_DEBUG_RAND - uses random poisoning of unused words to trip up\n * mismanagement of bignum internals. You must also define BN_DEBUG.\n */\n/* #define BN_DEBUG */\n/* #define BN_DEBUG_RAND */\n\n# ifndef OPENSSL_SMALL_FOOTPRINT\n#  define BN_MUL_COMBA\n#  define BN_SQR_COMBA\n#  define BN_RECURSION\n# endif\n\n/*\n * This next option uses the C libraries (2 word)/(1 word) function. If it is\n * not defined, I use my C version (which is slower). The reason for this\n * flag is that when the particular C compiler library routine is used, and\n * the library is linked with a different compiler, the library is missing.\n * This mostly happens when the library is built with gcc and then linked\n * using normal cc.  This would be a common occurrence because gcc normally\n * produces code that is 2 times faster than system compilers for the big\n * number stuff. For machines with only one compiler (or shared libraries),\n * this should be on.  Again this in only really a problem on machines using\n * \"long long's\", are 32bit, and are not using my assembler code.\n */\n# if defined(OPENSSL_SYS_MSDOS) || defined(OPENSSL_SYS_WINDOWS) || \\\n    defined(OPENSSL_SYS_WIN32) || defined(linux)\n#  ifndef BN_DIV2W\n#   define BN_DIV2W\n#  endif\n# endif\n\n/*\n * assuming long is 64bit - this is the DEC Alpha unsigned long long is only\n * 64 bits :-(, don't define BN_LLONG for the DEC Alpha\n */\n# ifdef SIXTY_FOUR_BIT_LONG\n#  define BN_ULLONG       unsigned long long\n#  define BN_ULONG        unsigned long\n#  define BN_LONG         long\n#  define BN_BITS         128\n#  define BN_BYTES        8\n#  define BN_BITS2        64\n#  define BN_BITS4        32\n#  define BN_MASK         (0xffffffffffffffffffffffffffffffffLL)\n#  define BN_MASK2        (0xffffffffffffffffL)\n#  define BN_MASK2l       (0xffffffffL)\n#  define BN_MASK2h       (0xffffffff00000000L)\n#  define BN_MASK2h1      (0xffffffff80000000L)\n#  define BN_TBIT         (0x8000000000000000L)\n#  define BN_DEC_CONV     (10000000000000000000UL)\n#  define BN_DEC_FMT1     \"%lu\"\n#  define BN_DEC_FMT2     \"%019lu\"\n#  define BN_DEC_NUM      19\n#  define BN_HEX_FMT1     \"%lX\"\n#  define BN_HEX_FMT2     \"%016lX\"\n# endif\n\n/*\n * This is where the long long data type is 64 bits, but long is 32. For\n * machines where there are 64bit registers, this is the mode to use. IRIX,\n * on R4000 and above should use this mode, along with the relevant assembler\n * code :-).  Do NOT define BN_LLONG.\n */\n# ifdef SIXTY_FOUR_BIT\n#  undef BN_LLONG\n#  undef BN_ULLONG\n#  define BN_ULONG        unsigned long long\n#  define BN_LONG         long long\n#  define BN_BITS         128\n#  define BN_BYTES        8\n#  define BN_BITS2        64\n#  define BN_BITS4        32\n#  define BN_MASK2        (0xffffffffffffffffLL)\n#  define BN_MASK2l       (0xffffffffL)\n#  define BN_MASK2h       (0xffffffff00000000LL)\n#  define BN_MASK2h1      (0xffffffff80000000LL)\n#  define BN_TBIT         (0x8000000000000000LL)\n#  define BN_DEC_CONV     (10000000000000000000ULL)\n#  define BN_DEC_FMT1     \"%llu\"\n#  define BN_DEC_FMT2     \"%019llu\"\n#  define BN_DEC_NUM      19\n#  define BN_HEX_FMT1     \"%llX\"\n#  define BN_HEX_FMT2     \"%016llX\"\n# endif\n\n# ifdef THIRTY_TWO_BIT\n#  ifdef BN_LLONG\n#   if defined(_WIN32) && !defined(__GNUC__)\n#    define BN_ULLONG     unsigned __int64\n#    define BN_MASK       (0xffffffffffffffffI64)\n#   else\n#    define BN_ULLONG     unsigned long long\n#    define BN_MASK       (0xffffffffffffffffLL)\n#   endif\n#  endif\n#  define BN_ULONG        unsigned int\n#  define BN_LONG         int\n#  define BN_BITS         64\n#  define BN_BYTES        4\n#  define BN_BITS2        32\n#  define BN_BITS4        16\n#  define BN_MASK2        (0xffffffffL)\n#  define BN_MASK2l       (0xffff)\n#  define BN_MASK2h1      (0xffff8000L)\n#  define BN_MASK2h       (0xffff0000L)\n#  define BN_TBIT         (0x80000000L)\n#  define BN_DEC_CONV     (1000000000L)\n#  define BN_DEC_FMT1     \"%u\"\n#  define BN_DEC_FMT2     \"%09u\"\n#  define BN_DEC_NUM      9\n#  define BN_HEX_FMT1     \"%X\"\n#  define BN_HEX_FMT2     \"%08X\"\n# endif\n\n/*\n * 2011-02-22 SMS. In various places, a size_t variable or a type cast to\n * size_t was used to perform integer-only operations on pointers.  This\n * failed on VMS with 64-bit pointers (CC /POINTER_SIZE = 64) because size_t\n * is still only 32 bits.  What's needed in these cases is an integer type\n * with the same size as a pointer, which size_t is not certain to be. The\n * only fix here is VMS-specific.\n */\n# if defined(OPENSSL_SYS_VMS)\n#  if __INITIAL_POINTER_SIZE == 64\n#   define PTR_SIZE_INT long long\n#  else                         /* __INITIAL_POINTER_SIZE == 64 */\n#   define PTR_SIZE_INT int\n#  endif                        /* __INITIAL_POINTER_SIZE == 64 [else] */\n# else                          /* defined(OPENSSL_SYS_VMS) */\n#  define PTR_SIZE_INT size_t\n# endif                         /* defined(OPENSSL_SYS_VMS) [else] */\n\n# define BN_DEFAULT_BITS 1280\n\n# define BN_FLG_MALLOCED         0x01\n# define BN_FLG_STATIC_DATA      0x02\n\n/*\n * avoid leaking exponent information through timing,\n * BN_mod_exp_mont() will call BN_mod_exp_mont_consttime,\n * BN_div() will call BN_div_no_branch,\n * BN_mod_inverse() will call BN_mod_inverse_no_branch.\n */\n# define BN_FLG_CONSTTIME        0x04\n\n# ifdef OPENSSL_NO_DEPRECATED\n/* deprecated name for the flag */\n#  define BN_FLG_EXP_CONSTTIME BN_FLG_CONSTTIME\n/*\n * avoid leaking exponent information through timings\n * (BN_mod_exp_mont() will call BN_mod_exp_mont_consttime)\n */\n# endif\n\n# ifndef OPENSSL_NO_DEPRECATED\n#  define BN_FLG_FREE             0x8000\n                                       /* used for debuging */\n# endif\n# define BN_set_flags(b,n)       ((b)->flags|=(n))\n# define BN_get_flags(b,n)       ((b)->flags&(n))\n\n/*\n * get a clone of a BIGNUM with changed flags, for *temporary* use only (the\n * two BIGNUMs cannot not be used in parallel!)\n */\n# define BN_with_flags(dest,b,n)  ((dest)->d=(b)->d, \\\n                                  (dest)->top=(b)->top, \\\n                                  (dest)->dmax=(b)->dmax, \\\n                                  (dest)->neg=(b)->neg, \\\n                                  (dest)->flags=(((dest)->flags & BN_FLG_MALLOCED) \\\n                                                 |  ((b)->flags & ~BN_FLG_MALLOCED) \\\n                                                 |  BN_FLG_STATIC_DATA \\\n                                                 |  (n)))\n\n/* Already declared in ossl_typ.h */\n# if 0\ntypedef struct bignum_st BIGNUM;\n/* Used for temp variables (declaration hidden in bn_lcl.h) */\ntypedef struct bignum_ctx BN_CTX;\ntypedef struct bn_blinding_st BN_BLINDING;\ntypedef struct bn_mont_ctx_st BN_MONT_CTX;\ntypedef struct bn_recp_ctx_st BN_RECP_CTX;\ntypedef struct bn_gencb_st BN_GENCB;\n# endif\n\nstruct bignum_st {\n    BN_ULONG *d;                /* Pointer to an array of 'BN_BITS2' bit\n                                 * chunks. */\n    int top;                    /* Index of last used d +1. */\n    /* The next are internal book keeping for bn_expand. */\n    int dmax;                   /* Size of the d array. */\n    int neg;                    /* one if the number is negative */\n    int flags;\n};\n\n/* Used for montgomery multiplication */\nstruct bn_mont_ctx_st {\n    int ri;                     /* number of bits in R */\n    BIGNUM RR;                  /* used to convert to montgomery form */\n    BIGNUM N;                   /* The modulus */\n    BIGNUM Ni;                  /* R*(1/R mod N) - N*Ni = 1 (Ni is only\n                                 * stored for bignum algorithm) */\n    BN_ULONG n0[2];             /* least significant word(s) of Ni; (type\n                                 * changed with 0.9.9, was \"BN_ULONG n0;\"\n                                 * before) */\n    int flags;\n};\n\n/*\n * Used for reciprocal division/mod functions It cannot be shared between\n * threads\n */\nstruct bn_recp_ctx_st {\n    BIGNUM N;                   /* the divisor */\n    BIGNUM Nr;                  /* the reciprocal */\n    int num_bits;\n    int shift;\n    int flags;\n};\n\n/* Used for slow \"generation\" functions. */\nstruct bn_gencb_st {\n    unsigned int ver;           /* To handle binary (in)compatibility */\n    void *arg;                  /* callback-specific data */\n    union {\n        /* if(ver==1) - handles old style callbacks */\n        void (*cb_1) (int, int, void *);\n        /* if(ver==2) - new callback style */\n        int (*cb_2) (int, int, BN_GENCB *);\n    } cb;\n};\n/* Wrapper function to make using BN_GENCB easier,  */\nint BN_GENCB_call(BN_GENCB *cb, int a, int b);\n/* Macro to populate a BN_GENCB structure with an \"old\"-style callback */\n# define BN_GENCB_set_old(gencb, callback, cb_arg) { \\\n                BN_GENCB *tmp_gencb = (gencb); \\\n                tmp_gencb->ver = 1; \\\n                tmp_gencb->arg = (cb_arg); \\\n                tmp_gencb->cb.cb_1 = (callback); }\n/* Macro to populate a BN_GENCB structure with a \"new\"-style callback */\n# define BN_GENCB_set(gencb, callback, cb_arg) { \\\n                BN_GENCB *tmp_gencb = (gencb); \\\n                tmp_gencb->ver = 2; \\\n                tmp_gencb->arg = (cb_arg); \\\n                tmp_gencb->cb.cb_2 = (callback); }\n\n# define BN_prime_checks 0      /* default: select number of iterations based\n                                 * on the size of the number */\n\n/*\n * number of Miller-Rabin iterations for an error rate of less than 2^-80 for\n * random 'b'-bit input, b >= 100 (taken from table 4.4 in the Handbook of\n * Applied Cryptography [Menezes, van Oorschot, Vanstone; CRC Press 1996];\n * original paper: Damgaard, Landrock, Pomerance: Average case error\n * estimates for the strong probable prime test. -- Math. Comp. 61 (1993)\n * 177-194)\n */\n# define BN_prime_checks_for_size(b) ((b) >= 1300 ?  2 : \\\n                                (b) >=  850 ?  3 : \\\n                                (b) >=  650 ?  4 : \\\n                                (b) >=  550 ?  5 : \\\n                                (b) >=  450 ?  6 : \\\n                                (b) >=  400 ?  7 : \\\n                                (b) >=  350 ?  8 : \\\n                                (b) >=  300 ?  9 : \\\n                                (b) >=  250 ? 12 : \\\n                                (b) >=  200 ? 15 : \\\n                                (b) >=  150 ? 18 : \\\n                                /* b >= 100 */ 27)\n\n# define BN_num_bytes(a) ((BN_num_bits(a)+7)/8)\n\n/* Note that BN_abs_is_word didn't work reliably for w == 0 until 0.9.8 */\n# define BN_abs_is_word(a,w) ((((a)->top == 1) && ((a)->d[0] == (BN_ULONG)(w))) || \\\n                                (((w) == 0) && ((a)->top == 0)))\n# define BN_is_zero(a)       ((a)->top == 0)\n# define BN_is_one(a)        (BN_abs_is_word((a),1) && !(a)->neg)\n# define BN_is_word(a,w)     (BN_abs_is_word((a),(w)) && (!(w) || !(a)->neg))\n# define BN_is_odd(a)        (((a)->top > 0) && ((a)->d[0] & 1))\n\n# define BN_one(a)       (BN_set_word((a),1))\n# define BN_zero_ex(a) \\\n        do { \\\n                BIGNUM *_tmp_bn = (a); \\\n                _tmp_bn->top = 0; \\\n                _tmp_bn->neg = 0; \\\n        } while(0)\n# ifdef OPENSSL_NO_DEPRECATED\n#  define BN_zero(a)      BN_zero_ex(a)\n# else\n#  define BN_zero(a)      (BN_set_word((a),0))\n# endif\n\nconst BIGNUM *BN_value_one(void);\nchar *BN_options(void);\nBN_CTX *BN_CTX_new(void);\n# ifndef OPENSSL_NO_DEPRECATED\nvoid BN_CTX_init(BN_CTX *c);\n# endif\nvoid BN_CTX_free(BN_CTX *c);\nvoid BN_CTX_start(BN_CTX *ctx);\nBIGNUM *BN_CTX_get(BN_CTX *ctx);\nvoid BN_CTX_end(BN_CTX *ctx);\nint BN_rand(BIGNUM *rnd, int bits, int top, int bottom);\nint BN_pseudo_rand(BIGNUM *rnd, int bits, int top, int bottom);\nint BN_rand_range(BIGNUM *rnd, const BIGNUM *range);\nint BN_pseudo_rand_range(BIGNUM *rnd, const BIGNUM *range);\nint BN_num_bits(const BIGNUM *a);\nint BN_num_bits_word(BN_ULONG);\nBIGNUM *BN_new(void);\nvoid BN_init(BIGNUM *);\nvoid BN_clear_free(BIGNUM *a);\nBIGNUM *BN_copy(BIGNUM *a, const BIGNUM *b);\nvoid BN_swap(BIGNUM *a, BIGNUM *b);\nBIGNUM *BN_bin2bn(const unsigned char *s, int len, BIGNUM *ret);\nint BN_bn2bin(const BIGNUM *a, unsigned char *to);\nBIGNUM *BN_mpi2bn(const unsigned char *s, int len, BIGNUM *ret);\nint BN_bn2mpi(const BIGNUM *a, unsigned char *to);\nint BN_sub(BIGNUM *r, const BIGNUM *a, const BIGNUM *b);\nint BN_usub(BIGNUM *r, const BIGNUM *a, const BIGNUM *b);\nint BN_uadd(BIGNUM *r, const BIGNUM *a, const BIGNUM *b);\nint BN_add(BIGNUM *r, const BIGNUM *a, const BIGNUM *b);\nint BN_mul(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, BN_CTX *ctx);\nint BN_sqr(BIGNUM *r, const BIGNUM *a, BN_CTX *ctx);\n/** BN_set_negative sets sign of a BIGNUM\n * \\param  b  pointer to the BIGNUM object\n * \\param  n  0 if the BIGNUM b should be positive and a value != 0 otherwise\n */\nvoid BN_set_negative(BIGNUM *b, int n);\n/** BN_is_negative returns 1 if the BIGNUM is negative\n * \\param  a  pointer to the BIGNUM object\n * \\return 1 if a < 0 and 0 otherwise\n */\n# define BN_is_negative(a) ((a)->neg != 0)\n\nint BN_div(BIGNUM *dv, BIGNUM *rem, const BIGNUM *m, const BIGNUM *d,\n           BN_CTX *ctx);\n# define BN_mod(rem,m,d,ctx) BN_div(NULL,(rem),(m),(d),(ctx))\nint BN_nnmod(BIGNUM *r, const BIGNUM *m, const BIGNUM *d, BN_CTX *ctx);\nint BN_mod_add(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, const BIGNUM *m,\n               BN_CTX *ctx);\nint BN_mod_add_quick(BIGNUM *r, const BIGNUM *a, const BIGNUM *b,\n                     const BIGNUM *m);\nint BN_mod_sub(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, const BIGNUM *m,\n               BN_CTX *ctx);\nint BN_mod_sub_quick(BIGNUM *r, const BIGNUM *a, const BIGNUM *b,\n                     const BIGNUM *m);\nint BN_mod_mul(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, const BIGNUM *m,\n               BN_CTX *ctx);\nint BN_mod_sqr(BIGNUM *r, const BIGNUM *a, const BIGNUM *m, BN_CTX *ctx);\nint BN_mod_lshift1(BIGNUM *r, const BIGNUM *a, const BIGNUM *m, BN_CTX *ctx);\nint BN_mod_lshift1_quick(BIGNUM *r, const BIGNUM *a, const BIGNUM *m);\nint BN_mod_lshift(BIGNUM *r, const BIGNUM *a, int n, const BIGNUM *m,\n                  BN_CTX *ctx);\nint BN_mod_lshift_quick(BIGNUM *r, const BIGNUM *a, int n, const BIGNUM *m);\n\nBN_ULONG BN_mod_word(const BIGNUM *a, BN_ULONG w);\nBN_ULONG BN_div_word(BIGNUM *a, BN_ULONG w);\nint BN_mul_word(BIGNUM *a, BN_ULONG w);\nint BN_add_word(BIGNUM *a, BN_ULONG w);\nint BN_sub_word(BIGNUM *a, BN_ULONG w);\nint BN_set_word(BIGNUM *a, BN_ULONG w);\nBN_ULONG BN_get_word(const BIGNUM *a);\n\nint BN_cmp(const BIGNUM *a, const BIGNUM *b);\nvoid BN_free(BIGNUM *a);\nint BN_is_bit_set(const BIGNUM *a, int n);\nint BN_lshift(BIGNUM *r, const BIGNUM *a, int n);\nint BN_lshift1(BIGNUM *r, const BIGNUM *a);\nint BN_exp(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx);\n\nint BN_mod_exp(BIGNUM *r, const BIGNUM *a, const BIGNUM *p,\n               const BIGNUM *m, BN_CTX *ctx);\nint BN_mod_exp_mont(BIGNUM *r, const BIGNUM *a, const BIGNUM *p,\n                    const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *m_ctx);\nint BN_mod_exp_mont_consttime(BIGNUM *rr, const BIGNUM *a, const BIGNUM *p,\n                              const BIGNUM *m, BN_CTX *ctx,\n                              BN_MONT_CTX *in_mont);\nint BN_mod_exp_mont_word(BIGNUM *r, BN_ULONG a, const BIGNUM *p,\n                         const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *m_ctx);\nint BN_mod_exp2_mont(BIGNUM *r, const BIGNUM *a1, const BIGNUM *p1,\n                     const BIGNUM *a2, const BIGNUM *p2, const BIGNUM *m,\n                     BN_CTX *ctx, BN_MONT_CTX *m_ctx);\nint BN_mod_exp_simple(BIGNUM *r, const BIGNUM *a, const BIGNUM *p,\n                      const BIGNUM *m, BN_CTX *ctx);\n\nint BN_mask_bits(BIGNUM *a, int n);\n# ifndef OPENSSL_NO_FP_API\nint BN_print_fp(FILE *fp, const BIGNUM *a);\n# endif\n# ifdef HEADER_BIO_H\nint BN_print(BIO *fp, const BIGNUM *a);\n# else\nint BN_print(void *fp, const BIGNUM *a);\n# endif\nint BN_reciprocal(BIGNUM *r, const BIGNUM *m, int len, BN_CTX *ctx);\nint BN_rshift(BIGNUM *r, const BIGNUM *a, int n);\nint BN_rshift1(BIGNUM *r, const BIGNUM *a);\nvoid BN_clear(BIGNUM *a);\nBIGNUM *BN_dup(const BIGNUM *a);\nint BN_ucmp(const BIGNUM *a, const BIGNUM *b);\nint BN_set_bit(BIGNUM *a, int n);\nint BN_clear_bit(BIGNUM *a, int n);\nchar *BN_bn2hex(const BIGNUM *a);\nchar *BN_bn2dec(const BIGNUM *a);\nint BN_hex2bn(BIGNUM **a, const char *str);\nint BN_dec2bn(BIGNUM **a, const char *str);\nint BN_asc2bn(BIGNUM **a, const char *str);\nint BN_gcd(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, BN_CTX *ctx);\nint BN_kronecker(const BIGNUM *a, const BIGNUM *b, BN_CTX *ctx); /* returns\n                                                                  * -2 for\n                                                                  * error */\nBIGNUM *BN_mod_inverse(BIGNUM *ret,\n                       const BIGNUM *a, const BIGNUM *n, BN_CTX *ctx);\nBIGNUM *BN_mod_sqrt(BIGNUM *ret,\n                    const BIGNUM *a, const BIGNUM *n, BN_CTX *ctx);\n\nvoid BN_consttime_swap(BN_ULONG swap, BIGNUM *a, BIGNUM *b, int nwords);\n\n/* Deprecated versions */\n# ifndef OPENSSL_NO_DEPRECATED\nBIGNUM *BN_generate_prime(BIGNUM *ret, int bits, int safe,\n                          const BIGNUM *add, const BIGNUM *rem,\n                          void (*callback) (int, int, void *), void *cb_arg);\nint BN_is_prime(const BIGNUM *p, int nchecks,\n                void (*callback) (int, int, void *),\n                BN_CTX *ctx, void *cb_arg);\nint BN_is_prime_fasttest(const BIGNUM *p, int nchecks,\n                         void (*callback) (int, int, void *), BN_CTX *ctx,\n                         void *cb_arg, int do_trial_division);\n# endif                         /* !defined(OPENSSL_NO_DEPRECATED) */\n\n/* Newer versions */\nint BN_generate_prime_ex(BIGNUM *ret, int bits, int safe, const BIGNUM *add,\n                         const BIGNUM *rem, BN_GENCB *cb);\nint BN_is_prime_ex(const BIGNUM *p, int nchecks, BN_CTX *ctx, BN_GENCB *cb);\nint BN_is_prime_fasttest_ex(const BIGNUM *p, int nchecks, BN_CTX *ctx,\n                            int do_trial_division, BN_GENCB *cb);\n\nint BN_X931_generate_Xpq(BIGNUM *Xp, BIGNUM *Xq, int nbits, BN_CTX *ctx);\n\nint BN_X931_derive_prime_ex(BIGNUM *p, BIGNUM *p1, BIGNUM *p2,\n                            const BIGNUM *Xp, const BIGNUM *Xp1,\n                            const BIGNUM *Xp2, const BIGNUM *e, BN_CTX *ctx,\n                            BN_GENCB *cb);\nint BN_X931_generate_prime_ex(BIGNUM *p, BIGNUM *p1, BIGNUM *p2, BIGNUM *Xp1,\n                              BIGNUM *Xp2, const BIGNUM *Xp, const BIGNUM *e,\n                              BN_CTX *ctx, BN_GENCB *cb);\n\nBN_MONT_CTX *BN_MONT_CTX_new(void);\nvoid BN_MONT_CTX_init(BN_MONT_CTX *ctx);\nint BN_mod_mul_montgomery(BIGNUM *r, const BIGNUM *a, const BIGNUM *b,\n                          BN_MONT_CTX *mont, BN_CTX *ctx);\n# define BN_to_montgomery(r,a,mont,ctx)  BN_mod_mul_montgomery(\\\n        (r),(a),&((mont)->RR),(mont),(ctx))\nint BN_from_montgomery(BIGNUM *r, const BIGNUM *a,\n                       BN_MONT_CTX *mont, BN_CTX *ctx);\nvoid BN_MONT_CTX_free(BN_MONT_CTX *mont);\nint BN_MONT_CTX_set(BN_MONT_CTX *mont, const BIGNUM *mod, BN_CTX *ctx);\nBN_MONT_CTX *BN_MONT_CTX_copy(BN_MONT_CTX *to, BN_MONT_CTX *from);\nBN_MONT_CTX *BN_MONT_CTX_set_locked(BN_MONT_CTX **pmont, int lock,\n                                    const BIGNUM *mod, BN_CTX *ctx);\n\n/* BN_BLINDING flags */\n# define BN_BLINDING_NO_UPDATE   0x00000001\n# define BN_BLINDING_NO_RECREATE 0x00000002\n\nBN_BLINDING *BN_BLINDING_new(const BIGNUM *A, const BIGNUM *Ai, BIGNUM *mod);\nvoid BN_BLINDING_free(BN_BLINDING *b);\nint BN_BLINDING_update(BN_BLINDING *b, BN_CTX *ctx);\nint BN_BLINDING_convert(BIGNUM *n, BN_BLINDING *b, BN_CTX *ctx);\nint BN_BLINDING_invert(BIGNUM *n, BN_BLINDING *b, BN_CTX *ctx);\nint BN_BLINDING_convert_ex(BIGNUM *n, BIGNUM *r, BN_BLINDING *b, BN_CTX *);\nint BN_BLINDING_invert_ex(BIGNUM *n, const BIGNUM *r, BN_BLINDING *b,\n                          BN_CTX *);\n# ifndef OPENSSL_NO_DEPRECATED\nunsigned long BN_BLINDING_get_thread_id(const BN_BLINDING *);\nvoid BN_BLINDING_set_thread_id(BN_BLINDING *, unsigned long);\n# endif\nCRYPTO_THREADID *BN_BLINDING_thread_id(BN_BLINDING *);\nunsigned long BN_BLINDING_get_flags(const BN_BLINDING *);\nvoid BN_BLINDING_set_flags(BN_BLINDING *, unsigned long);\nBN_BLINDING *BN_BLINDING_create_param(BN_BLINDING *b,\n                                      const BIGNUM *e, BIGNUM *m, BN_CTX *ctx,\n                                      int (*bn_mod_exp) (BIGNUM *r,\n                                                         const BIGNUM *a,\n                                                         const BIGNUM *p,\n                                                         const BIGNUM *m,\n                                                         BN_CTX *ctx,\n                                                         BN_MONT_CTX *m_ctx),\n                                      BN_MONT_CTX *m_ctx);\n\n# ifndef OPENSSL_NO_DEPRECATED\nvoid BN_set_params(int mul, int high, int low, int mont);\nint BN_get_params(int which);   /* 0, mul, 1 high, 2 low, 3 mont */\n# endif\n\nvoid BN_RECP_CTX_init(BN_RECP_CTX *recp);\nBN_RECP_CTX *BN_RECP_CTX_new(void);\nvoid BN_RECP_CTX_free(BN_RECP_CTX *recp);\nint BN_RECP_CTX_set(BN_RECP_CTX *recp, const BIGNUM *rdiv, BN_CTX *ctx);\nint BN_mod_mul_reciprocal(BIGNUM *r, const BIGNUM *x, const BIGNUM *y,\n                          BN_RECP_CTX *recp, BN_CTX *ctx);\nint BN_mod_exp_recp(BIGNUM *r, const BIGNUM *a, const BIGNUM *p,\n                    const BIGNUM *m, BN_CTX *ctx);\nint BN_div_recp(BIGNUM *dv, BIGNUM *rem, const BIGNUM *m,\n                BN_RECP_CTX *recp, BN_CTX *ctx);\n\n# ifndef OPENSSL_NO_EC2M\n\n/*\n * Functions for arithmetic over binary polynomials represented by BIGNUMs.\n * The BIGNUM::neg property of BIGNUMs representing binary polynomials is\n * ignored. Note that input arguments are not const so that their bit arrays\n * can be expanded to the appropriate size if needed.\n */\n\n/*\n * r = a + b\n */\nint BN_GF2m_add(BIGNUM *r, const BIGNUM *a, const BIGNUM *b);\n#  define BN_GF2m_sub(r, a, b) BN_GF2m_add(r, a, b)\n/*\n * r=a mod p\n */\nint BN_GF2m_mod(BIGNUM *r, const BIGNUM *a, const BIGNUM *p);\n/* r = (a * b) mod p */\nint BN_GF2m_mod_mul(BIGNUM *r, const BIGNUM *a, const BIGNUM *b,\n                    const BIGNUM *p, BN_CTX *ctx);\n/* r = (a * a) mod p */\nint BN_GF2m_mod_sqr(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx);\n/* r = (1 / b) mod p */\nint BN_GF2m_mod_inv(BIGNUM *r, const BIGNUM *b, const BIGNUM *p, BN_CTX *ctx);\n/* r = (a / b) mod p */\nint BN_GF2m_mod_div(BIGNUM *r, const BIGNUM *a, const BIGNUM *b,\n                    const BIGNUM *p, BN_CTX *ctx);\n/* r = (a ^ b) mod p */\nint BN_GF2m_mod_exp(BIGNUM *r, const BIGNUM *a, const BIGNUM *b,\n                    const BIGNUM *p, BN_CTX *ctx);\n/* r = sqrt(a) mod p */\nint BN_GF2m_mod_sqrt(BIGNUM *r, const BIGNUM *a, const BIGNUM *p,\n                     BN_CTX *ctx);\n/* r^2 + r = a mod p */\nint BN_GF2m_mod_solve_quad(BIGNUM *r, const BIGNUM *a, const BIGNUM *p,\n                           BN_CTX *ctx);\n#  define BN_GF2m_cmp(a, b) BN_ucmp((a), (b))\n/*-\n * Some functions allow for representation of the irreducible polynomials\n * as an unsigned int[], say p.  The irreducible f(t) is then of the form:\n *     t^p[0] + t^p[1] + ... + t^p[k]\n * where m = p[0] > p[1] > ... > p[k] = 0.\n */\n/* r = a mod p */\nint BN_GF2m_mod_arr(BIGNUM *r, const BIGNUM *a, const int p[]);\n/* r = (a * b) mod p */\nint BN_GF2m_mod_mul_arr(BIGNUM *r, const BIGNUM *a, const BIGNUM *b,\n                        const int p[], BN_CTX *ctx);\n/* r = (a * a) mod p */\nint BN_GF2m_mod_sqr_arr(BIGNUM *r, const BIGNUM *a, const int p[],\n                        BN_CTX *ctx);\n/* r = (1 / b) mod p */\nint BN_GF2m_mod_inv_arr(BIGNUM *r, const BIGNUM *b, const int p[],\n                        BN_CTX *ctx);\n/* r = (a / b) mod p */\nint BN_GF2m_mod_div_arr(BIGNUM *r, const BIGNUM *a, const BIGNUM *b,\n                        const int p[], BN_CTX *ctx);\n/* r = (a ^ b) mod p */\nint BN_GF2m_mod_exp_arr(BIGNUM *r, const BIGNUM *a, const BIGNUM *b,\n                        const int p[], BN_CTX *ctx);\n/* r = sqrt(a) mod p */\nint BN_GF2m_mod_sqrt_arr(BIGNUM *r, const BIGNUM *a,\n                         const int p[], BN_CTX *ctx);\n/* r^2 + r = a mod p */\nint BN_GF2m_mod_solve_quad_arr(BIGNUM *r, const BIGNUM *a,\n                               const int p[], BN_CTX *ctx);\nint BN_GF2m_poly2arr(const BIGNUM *a, int p[], int max);\nint BN_GF2m_arr2poly(const int p[], BIGNUM *a);\n\n# endif\n\n/*\n * faster mod functions for the 'NIST primes' 0 <= a < p^2\n */\nint BN_nist_mod_192(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx);\nint BN_nist_mod_224(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx);\nint BN_nist_mod_256(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx);\nint BN_nist_mod_384(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx);\nint BN_nist_mod_521(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx);\n\nconst BIGNUM *BN_get0_nist_prime_192(void);\nconst BIGNUM *BN_get0_nist_prime_224(void);\nconst BIGNUM *BN_get0_nist_prime_256(void);\nconst BIGNUM *BN_get0_nist_prime_384(void);\nconst BIGNUM *BN_get0_nist_prime_521(void);\n\n/* library internal functions */\n\n# define bn_expand(a,bits) ((((((bits+BN_BITS2-1))/BN_BITS2)) <= (a)->dmax)?\\\n        (a):bn_expand2((a),(bits+BN_BITS2-1)/BN_BITS2))\n# define bn_wexpand(a,words) (((words) <= (a)->dmax)?(a):bn_expand2((a),(words)))\nBIGNUM *bn_expand2(BIGNUM *a, int words);\n# ifndef OPENSSL_NO_DEPRECATED\nBIGNUM *bn_dup_expand(const BIGNUM *a, int words); /* unused */\n# endif\n\n/*-\n * Bignum consistency macros\n * There is one \"API\" macro, bn_fix_top(), for stripping leading zeroes from\n * bignum data after direct manipulations on the data. There is also an\n * \"internal\" macro, bn_check_top(), for verifying that there are no leading\n * zeroes. Unfortunately, some auditing is required due to the fact that\n * bn_fix_top() has become an overabused duct-tape because bignum data is\n * occasionally passed around in an inconsistent state. So the following\n * changes have been made to sort this out;\n * - bn_fix_top()s implementation has been moved to bn_correct_top()\n * - if BN_DEBUG isn't defined, bn_fix_top() maps to bn_correct_top(), and\n *   bn_check_top() is as before.\n * - if BN_DEBUG *is* defined;\n *   - bn_check_top() tries to pollute unused words even if the bignum 'top' is\n *     consistent. (ed: only if BN_DEBUG_RAND is defined)\n *   - bn_fix_top() maps to bn_check_top() rather than \"fixing\" anything.\n * The idea is to have debug builds flag up inconsistent bignums when they\n * occur. If that occurs in a bn_fix_top(), we examine the code in question; if\n * the use of bn_fix_top() was appropriate (ie. it follows directly after code\n * that manipulates the bignum) it is converted to bn_correct_top(), and if it\n * was not appropriate, we convert it permanently to bn_check_top() and track\n * down the cause of the bug. Eventually, no internal code should be using the\n * bn_fix_top() macro. External applications and libraries should try this with\n * their own code too, both in terms of building against the openssl headers\n * with BN_DEBUG defined *and* linking with a version of OpenSSL built with it\n * defined. This not only improves external code, it provides more test\n * coverage for openssl's own code.\n */\n\n# ifdef BN_DEBUG\n\n/* We only need assert() when debugging */\n#  include <assert.h>\n\n#  ifdef BN_DEBUG_RAND\n/* To avoid \"make update\" cvs wars due to BN_DEBUG, use some tricks */\n#   ifndef RAND_pseudo_bytes\nint RAND_pseudo_bytes(unsigned char *buf, int num);\n#    define BN_DEBUG_TRIX\n#   endif\n#   define bn_pollute(a) \\\n        do { \\\n                const BIGNUM *_bnum1 = (a); \\\n                if(_bnum1->top < _bnum1->dmax) { \\\n                        unsigned char _tmp_char; \\\n                        /* We cast away const without the compiler knowing, any \\\n                         * *genuinely* constant variables that aren't mutable \\\n                         * wouldn't be constructed with top!=dmax. */ \\\n                        BN_ULONG *_not_const; \\\n                        memcpy(&_not_const, &_bnum1->d, sizeof(BN_ULONG*)); \\\n                        /* Debug only - safe to ignore error return */ \\\n                        RAND_pseudo_bytes(&_tmp_char, 1); \\\n                        memset((unsigned char *)(_not_const + _bnum1->top), _tmp_char, \\\n                                (_bnum1->dmax - _bnum1->top) * sizeof(BN_ULONG)); \\\n                } \\\n        } while(0)\n#   ifdef BN_DEBUG_TRIX\n#    undef RAND_pseudo_bytes\n#   endif\n#  else\n#   define bn_pollute(a)\n#  endif\n#  define bn_check_top(a) \\\n        do { \\\n                const BIGNUM *_bnum2 = (a); \\\n                if (_bnum2 != NULL) { \\\n                        assert((_bnum2->top == 0) || \\\n                                (_bnum2->d[_bnum2->top - 1] != 0)); \\\n                        bn_pollute(_bnum2); \\\n                } \\\n        } while(0)\n\n#  define bn_fix_top(a)           bn_check_top(a)\n\n#  define bn_check_size(bn, bits) bn_wcheck_size(bn, ((bits+BN_BITS2-1))/BN_BITS2)\n#  define bn_wcheck_size(bn, words) \\\n        do { \\\n                const BIGNUM *_bnum2 = (bn); \\\n                assert((words) <= (_bnum2)->dmax && (words) >= (_bnum2)->top); \\\n                /* avoid unused variable warning with NDEBUG */ \\\n                (void)(_bnum2); \\\n        } while(0)\n\n# else                          /* !BN_DEBUG */\n\n#  define bn_pollute(a)\n#  define bn_check_top(a)\n#  define bn_fix_top(a)           bn_correct_top(a)\n#  define bn_check_size(bn, bits)\n#  define bn_wcheck_size(bn, words)\n\n# endif\n\n# define bn_correct_top(a) \\\n        { \\\n        BN_ULONG *ftl; \\\n        int tmp_top = (a)->top; \\\n        if (tmp_top > 0) \\\n                { \\\n                for (ftl= &((a)->d[tmp_top-1]); tmp_top > 0; tmp_top--) \\\n                        if (*(ftl--)) break; \\\n                (a)->top = tmp_top; \\\n                } \\\n        bn_pollute(a); \\\n        }\n\nBN_ULONG bn_mul_add_words(BN_ULONG *rp, const BN_ULONG *ap, int num,\n                          BN_ULONG w);\nBN_ULONG bn_mul_words(BN_ULONG *rp, const BN_ULONG *ap, int num, BN_ULONG w);\nvoid bn_sqr_words(BN_ULONG *rp, const BN_ULONG *ap, int num);\nBN_ULONG bn_div_words(BN_ULONG h, BN_ULONG l, BN_ULONG d);\nBN_ULONG bn_add_words(BN_ULONG *rp, const BN_ULONG *ap, const BN_ULONG *bp,\n                      int num);\nBN_ULONG bn_sub_words(BN_ULONG *rp, const BN_ULONG *ap, const BN_ULONG *bp,\n                      int num);\n\n/* Primes from RFC 2409 */\nBIGNUM *get_rfc2409_prime_768(BIGNUM *bn);\nBIGNUM *get_rfc2409_prime_1024(BIGNUM *bn);\n\n/* Primes from RFC 3526 */\nBIGNUM *get_rfc3526_prime_1536(BIGNUM *bn);\nBIGNUM *get_rfc3526_prime_2048(BIGNUM *bn);\nBIGNUM *get_rfc3526_prime_3072(BIGNUM *bn);\nBIGNUM *get_rfc3526_prime_4096(BIGNUM *bn);\nBIGNUM *get_rfc3526_prime_6144(BIGNUM *bn);\nBIGNUM *get_rfc3526_prime_8192(BIGNUM *bn);\n\nint BN_bntest_rand(BIGNUM *rnd, int bits, int top, int bottom);\n\n/* BEGIN ERROR CODES */\n/*\n * The following lines are auto generated by the script mkerr.pl. Any changes\n * made after this point may be overwritten when the script is next run.\n */\nvoid ERR_load_BN_strings(void);\n\n/* Error codes for the BN functions. */\n\n/* Function codes. */\n# define BN_F_BNRAND                                      127\n# define BN_F_BN_BLINDING_CONVERT_EX                      100\n# define BN_F_BN_BLINDING_CREATE_PARAM                    128\n# define BN_F_BN_BLINDING_INVERT_EX                       101\n# define BN_F_BN_BLINDING_NEW                             102\n# define BN_F_BN_BLINDING_UPDATE                          103\n# define BN_F_BN_BN2DEC                                   104\n# define BN_F_BN_BN2HEX                                   105\n# define BN_F_BN_CTX_GET                                  116\n# define BN_F_BN_CTX_NEW                                  106\n# define BN_F_BN_CTX_START                                129\n# define BN_F_BN_DIV                                      107\n# define BN_F_BN_DIV_NO_BRANCH                            138\n# define BN_F_BN_DIV_RECP                                 130\n# define BN_F_BN_EXP                                      123\n# define BN_F_BN_EXPAND2                                  108\n# define BN_F_BN_EXPAND_INTERNAL                          120\n# define BN_F_BN_GF2M_MOD                                 131\n# define BN_F_BN_GF2M_MOD_EXP                             132\n# define BN_F_BN_GF2M_MOD_MUL                             133\n# define BN_F_BN_GF2M_MOD_SOLVE_QUAD                      134\n# define BN_F_BN_GF2M_MOD_SOLVE_QUAD_ARR                  135\n# define BN_F_BN_GF2M_MOD_SQR                             136\n# define BN_F_BN_GF2M_MOD_SQRT                            137\n# define BN_F_BN_LSHIFT                                   145\n# define BN_F_BN_MOD_EXP2_MONT                            118\n# define BN_F_BN_MOD_EXP_MONT                             109\n# define BN_F_BN_MOD_EXP_MONT_CONSTTIME                   124\n# define BN_F_BN_MOD_EXP_MONT_WORD                        117\n# define BN_F_BN_MOD_EXP_RECP                             125\n# define BN_F_BN_MOD_EXP_SIMPLE                           126\n# define BN_F_BN_MOD_INVERSE                              110\n# define BN_F_BN_MOD_INVERSE_NO_BRANCH                    139\n# define BN_F_BN_MOD_LSHIFT_QUICK                         119\n# define BN_F_BN_MOD_MUL_RECIPROCAL                       111\n# define BN_F_BN_MOD_SQRT                                 121\n# define BN_F_BN_MPI2BN                                   112\n# define BN_F_BN_NEW                                      113\n# define BN_F_BN_RAND                                     114\n# define BN_F_BN_RAND_RANGE                               122\n# define BN_F_BN_RSHIFT                                   146\n# define BN_F_BN_USUB                                     115\n\n/* Reason codes. */\n# define BN_R_ARG2_LT_ARG3                                100\n# define BN_R_BAD_RECIPROCAL                              101\n# define BN_R_BIGNUM_TOO_LONG                             114\n# define BN_R_BITS_TOO_SMALL                              118\n# define BN_R_CALLED_WITH_EVEN_MODULUS                    102\n# define BN_R_DIV_BY_ZERO                                 103\n# define BN_R_ENCODING_ERROR                              104\n# define BN_R_EXPAND_ON_STATIC_BIGNUM_DATA                105\n# define BN_R_INPUT_NOT_REDUCED                           110\n# define BN_R_INVALID_LENGTH                              106\n# define BN_R_INVALID_RANGE                               115\n# define BN_R_INVALID_SHIFT                               119\n# define BN_R_NOT_A_SQUARE                                111\n# define BN_R_NOT_INITIALIZED                             107\n# define BN_R_NO_INVERSE                                  108\n# define BN_R_NO_SOLUTION                                 116\n# define BN_R_P_IS_NOT_PRIME                              112\n# define BN_R_TOO_MANY_ITERATIONS                         113\n# define BN_R_TOO_MANY_TEMPORARY_VARIABLES                109\n\n#ifdef  __cplusplus\n}\n#endif\n#endif\n"
  },
  {
    "path": "Pods/OpenSSL-Universal/include-ios/openssl/buffer.h",
    "content": "/* crypto/buffer/buffer.h */\n/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)\n * All rights reserved.\n *\n * This package is an SSL implementation written\n * by Eric Young (eay@cryptsoft.com).\n * The implementation was written so as to conform with Netscapes SSL.\n *\n * This library is free for commercial and non-commercial use as long as\n * the following conditions are aheared to.  The following conditions\n * apply to all code found in this distribution, be it the RC4, RSA,\n * lhash, DES, etc., code; not just the SSL code.  The SSL documentation\n * included with this distribution is covered by the same copyright terms\n * except that the holder is Tim Hudson (tjh@cryptsoft.com).\n *\n * Copyright remains Eric Young's, and as such any Copyright notices in\n * the code are not to be removed.\n * If this package is used in a product, Eric Young should be given attribution\n * as the author of the parts of the library used.\n * This can be in the form of a textual message at program startup or\n * in documentation (online or textual) provided with the package.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n * 1. Redistributions of source code must retain the copyright\n *    notice, this list of conditions and the following disclaimer.\n * 2. Redistributions in binary form must reproduce the above copyright\n *    notice, this list of conditions and the following disclaimer in the\n *    documentation and/or other materials provided with the distribution.\n * 3. All advertising materials mentioning features or use of this software\n *    must display the following acknowledgement:\n *    \"This product includes cryptographic software written by\n *     Eric Young (eay@cryptsoft.com)\"\n *    The word 'cryptographic' can be left out if the rouines from the library\n *    being used are not cryptographic related :-).\n * 4. If you include any Windows specific code (or a derivative thereof) from\n *    the apps directory (application code) you must include an acknowledgement:\n *    \"This product includes software written by Tim Hudson (tjh@cryptsoft.com)\"\n *\n * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND\n * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE\n * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n * SUCH DAMAGE.\n *\n * The licence and distribution terms for any publically available version or\n * derivative of this code cannot be changed.  i.e. this code cannot simply be\n * copied and put under another distribution licence\n * [including the GNU Public Licence.]\n */\n\n#ifndef HEADER_BUFFER_H\n# define HEADER_BUFFER_H\n\n# include <openssl/ossl_typ.h>\n\n#ifdef  __cplusplus\nextern \"C\" {\n#endif\n\n# include <stddef.h>\n\n# if !defined(NO_SYS_TYPES_H)\n#  include <sys/types.h>\n# endif\n\n/* Already declared in ossl_typ.h */\n/* typedef struct buf_mem_st BUF_MEM; */\n\nstruct buf_mem_st {\n    size_t length;              /* current number of bytes */\n    char *data;\n    size_t max;                 /* size of buffer */\n};\n\nBUF_MEM *BUF_MEM_new(void);\nvoid BUF_MEM_free(BUF_MEM *a);\nint BUF_MEM_grow(BUF_MEM *str, size_t len);\nint BUF_MEM_grow_clean(BUF_MEM *str, size_t len);\nchar *BUF_strdup(const char *str);\n\n/*\n * Like strndup, but in addition, explicitly guarantees to never read past the\n * first |siz| bytes of |str|.\n */\nchar *BUF_strndup(const char *str, size_t siz);\n\nvoid *BUF_memdup(const void *data, size_t siz);\nvoid BUF_reverse(unsigned char *out, const unsigned char *in, size_t siz);\n\n/* safe string functions */\nsize_t BUF_strlcpy(char *dst, const char *src, size_t siz);\nsize_t BUF_strlcat(char *dst, const char *src, size_t siz);\n\n/* BEGIN ERROR CODES */\n/*\n * The following lines are auto generated by the script mkerr.pl. Any changes\n * made after this point may be overwritten when the script is next run.\n */\nvoid ERR_load_BUF_strings(void);\n\n/* Error codes for the BUF functions. */\n\n/* Function codes. */\n# define BUF_F_BUF_MEMDUP                                 103\n# define BUF_F_BUF_MEM_GROW                               100\n# define BUF_F_BUF_MEM_GROW_CLEAN                         105\n# define BUF_F_BUF_MEM_NEW                                101\n# define BUF_F_BUF_STRDUP                                 102\n# define BUF_F_BUF_STRNDUP                                104\n\n/* Reason codes. */\n\n#ifdef  __cplusplus\n}\n#endif\n#endif\n"
  },
  {
    "path": "Pods/OpenSSL-Universal/include-ios/openssl/camellia.h",
    "content": "/* crypto/camellia/camellia.h -*- mode:C; c-file-style: \"eay\" -*- */\n/* ====================================================================\n * Copyright (c) 2006 The OpenSSL Project.  All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n *\n * 1. Redistributions of source code must retain the above copyright\n *    notice, this list of conditions and the following disclaimer.\n *\n * 2. Redistributions in binary form must reproduce the above copyright\n *    notice, this list of conditions and the following disclaimer in\n *    the documentation and/or other materials provided with the\n *    distribution.\n *\n * 3. All advertising materials mentioning features or use of this\n *    software must display the following acknowledgment:\n *    \"This product includes software developed by the OpenSSL Project\n *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)\"\n *\n * 4. The names \"OpenSSL Toolkit\" and \"OpenSSL Project\" must not be used to\n *    endorse or promote products derived from this software without\n *    prior written permission. For written permission, please contact\n *    openssl-core@openssl.org.\n *\n * 5. Products derived from this software may not be called \"OpenSSL\"\n *    nor may \"OpenSSL\" appear in their names without prior written\n *    permission of the OpenSSL Project.\n *\n * 6. Redistributions of any form whatsoever must retain the following\n *    acknowledgment:\n *    \"This product includes software developed by the OpenSSL Project\n *    for use in the OpenSSL Toolkit (http://www.openssl.org/)\"\n *\n * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY\n * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\n * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR\n * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,\n * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED\n * OF THE POSSIBILITY OF SUCH DAMAGE.\n * ====================================================================\n *\n */\n\n#ifndef HEADER_CAMELLIA_H\n# define HEADER_CAMELLIA_H\n\n# include <openssl/opensslconf.h>\n\n# ifdef OPENSSL_NO_CAMELLIA\n#  error CAMELLIA is disabled.\n# endif\n\n# include <stddef.h>\n\n# define CAMELLIA_ENCRYPT        1\n# define CAMELLIA_DECRYPT        0\n\n/*\n * Because array size can't be a const in C, the following two are macros.\n * Both sizes are in bytes.\n */\n\n#ifdef  __cplusplus\nextern \"C\" {\n#endif\n\n/* This should be a hidden type, but EVP requires that the size be known */\n\n# define CAMELLIA_BLOCK_SIZE 16\n# define CAMELLIA_TABLE_BYTE_LEN 272\n# define CAMELLIA_TABLE_WORD_LEN (CAMELLIA_TABLE_BYTE_LEN / 4)\n\ntypedef unsigned int KEY_TABLE_TYPE[CAMELLIA_TABLE_WORD_LEN]; /* to match\n                                                               * with WORD */\n\nstruct camellia_key_st {\n    union {\n        double d;               /* ensures 64-bit align */\n        KEY_TABLE_TYPE rd_key;\n    } u;\n    int grand_rounds;\n};\ntypedef struct camellia_key_st CAMELLIA_KEY;\n\n# ifdef OPENSSL_FIPS\nint private_Camellia_set_key(const unsigned char *userKey, const int bits,\n                             CAMELLIA_KEY *key);\n# endif\nint Camellia_set_key(const unsigned char *userKey, const int bits,\n                     CAMELLIA_KEY *key);\n\nvoid Camellia_encrypt(const unsigned char *in, unsigned char *out,\n                      const CAMELLIA_KEY *key);\nvoid Camellia_decrypt(const unsigned char *in, unsigned char *out,\n                      const CAMELLIA_KEY *key);\n\nvoid Camellia_ecb_encrypt(const unsigned char *in, unsigned char *out,\n                          const CAMELLIA_KEY *key, const int enc);\nvoid Camellia_cbc_encrypt(const unsigned char *in, unsigned char *out,\n                          size_t length, const CAMELLIA_KEY *key,\n                          unsigned char *ivec, const int enc);\nvoid Camellia_cfb128_encrypt(const unsigned char *in, unsigned char *out,\n                             size_t length, const CAMELLIA_KEY *key,\n                             unsigned char *ivec, int *num, const int enc);\nvoid Camellia_cfb1_encrypt(const unsigned char *in, unsigned char *out,\n                           size_t length, const CAMELLIA_KEY *key,\n                           unsigned char *ivec, int *num, const int enc);\nvoid Camellia_cfb8_encrypt(const unsigned char *in, unsigned char *out,\n                           size_t length, const CAMELLIA_KEY *key,\n                           unsigned char *ivec, int *num, const int enc);\nvoid Camellia_ofb128_encrypt(const unsigned char *in, unsigned char *out,\n                             size_t length, const CAMELLIA_KEY *key,\n                             unsigned char *ivec, int *num);\nvoid Camellia_ctr128_encrypt(const unsigned char *in, unsigned char *out,\n                             size_t length, const CAMELLIA_KEY *key,\n                             unsigned char ivec[CAMELLIA_BLOCK_SIZE],\n                             unsigned char ecount_buf[CAMELLIA_BLOCK_SIZE],\n                             unsigned int *num);\n\n#ifdef  __cplusplus\n}\n#endif\n\n#endif                          /* !HEADER_Camellia_H */\n"
  },
  {
    "path": "Pods/OpenSSL-Universal/include-ios/openssl/cast.h",
    "content": "/* crypto/cast/cast.h */\n/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)\n * All rights reserved.\n *\n * This package is an SSL implementation written\n * by Eric Young (eay@cryptsoft.com).\n * The implementation was written so as to conform with Netscapes SSL.\n *\n * This library is free for commercial and non-commercial use as long as\n * the following conditions are aheared to.  The following conditions\n * apply to all code found in this distribution, be it the RC4, RSA,\n * lhash, DES, etc., code; not just the SSL code.  The SSL documentation\n * included with this distribution is covered by the same copyright terms\n * except that the holder is Tim Hudson (tjh@cryptsoft.com).\n *\n * Copyright remains Eric Young's, and as such any Copyright notices in\n * the code are not to be removed.\n * If this package is used in a product, Eric Young should be given attribution\n * as the author of the parts of the library used.\n * This can be in the form of a textual message at program startup or\n * in documentation (online or textual) provided with the package.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n * 1. Redistributions of source code must retain the copyright\n *    notice, this list of conditions and the following disclaimer.\n * 2. Redistributions in binary form must reproduce the above copyright\n *    notice, this list of conditions and the following disclaimer in the\n *    documentation and/or other materials provided with the distribution.\n * 3. All advertising materials mentioning features or use of this software\n *    must display the following acknowledgement:\n *    \"This product includes cryptographic software written by\n *     Eric Young (eay@cryptsoft.com)\"\n *    The word 'cryptographic' can be left out if the rouines from the library\n *    being used are not cryptographic related :-).\n * 4. If you include any Windows specific code (or a derivative thereof) from\n *    the apps directory (application code) you must include an acknowledgement:\n *    \"This product includes software written by Tim Hudson (tjh@cryptsoft.com)\"\n *\n * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND\n * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE\n * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n * SUCH DAMAGE.\n *\n * The licence and distribution terms for any publically available version or\n * derivative of this code cannot be changed.  i.e. this code cannot simply be\n * copied and put under another distribution licence\n * [including the GNU Public Licence.]\n */\n\n#ifndef HEADER_CAST_H\n# define HEADER_CAST_H\n\n#ifdef  __cplusplus\nextern \"C\" {\n#endif\n\n# include <openssl/opensslconf.h>\n\n# ifdef OPENSSL_NO_CAST\n#  error CAST is disabled.\n# endif\n\n# define CAST_ENCRYPT    1\n# define CAST_DECRYPT    0\n\n# define CAST_LONG unsigned int\n\n# define CAST_BLOCK      8\n# define CAST_KEY_LENGTH 16\n\ntypedef struct cast_key_st {\n    CAST_LONG data[32];\n    int short_key;              /* Use reduced rounds for short key */\n} CAST_KEY;\n\n# ifdef OPENSSL_FIPS\nvoid private_CAST_set_key(CAST_KEY *key, int len, const unsigned char *data);\n# endif\nvoid CAST_set_key(CAST_KEY *key, int len, const unsigned char *data);\nvoid CAST_ecb_encrypt(const unsigned char *in, unsigned char *out,\n                      const CAST_KEY *key, int enc);\nvoid CAST_encrypt(CAST_LONG *data, const CAST_KEY *key);\nvoid CAST_decrypt(CAST_LONG *data, const CAST_KEY *key);\nvoid CAST_cbc_encrypt(const unsigned char *in, unsigned char *out,\n                      long length, const CAST_KEY *ks, unsigned char *iv,\n                      int enc);\nvoid CAST_cfb64_encrypt(const unsigned char *in, unsigned char *out,\n                        long length, const CAST_KEY *schedule,\n                        unsigned char *ivec, int *num, int enc);\nvoid CAST_ofb64_encrypt(const unsigned char *in, unsigned char *out,\n                        long length, const CAST_KEY *schedule,\n                        unsigned char *ivec, int *num);\n\n#ifdef  __cplusplus\n}\n#endif\n\n#endif\n"
  },
  {
    "path": "Pods/OpenSSL-Universal/include-ios/openssl/cmac.h",
    "content": "/* crypto/cmac/cmac.h */\n/*\n * Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL\n * project.\n */\n/* ====================================================================\n * Copyright (c) 2010 The OpenSSL Project.  All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n *\n * 1. Redistributions of source code must retain the above copyright\n *    notice, this list of conditions and the following disclaimer.\n *\n * 2. Redistributions in binary form must reproduce the above copyright\n *    notice, this list of conditions and the following disclaimer in\n *    the documentation and/or other materials provided with the\n *    distribution.\n *\n * 3. All advertising materials mentioning features or use of this\n *    software must display the following acknowledgment:\n *    \"This product includes software developed by the OpenSSL Project\n *    for use in the OpenSSL Toolkit. (http://www.OpenSSL.org/)\"\n *\n * 4. The names \"OpenSSL Toolkit\" and \"OpenSSL Project\" must not be used to\n *    endorse or promote products derived from this software without\n *    prior written permission. For written permission, please contact\n *    licensing@OpenSSL.org.\n *\n * 5. Products derived from this software may not be called \"OpenSSL\"\n *    nor may \"OpenSSL\" appear in their names without prior written\n *    permission of the OpenSSL Project.\n *\n * 6. Redistributions of any form whatsoever must retain the following\n *    acknowledgment:\n *    \"This product includes software developed by the OpenSSL Project\n *    for use in the OpenSSL Toolkit (http://www.OpenSSL.org/)\"\n *\n * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY\n * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\n * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR\n * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,\n * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED\n * OF THE POSSIBILITY OF SUCH DAMAGE.\n * ====================================================================\n */\n\n#ifndef HEADER_CMAC_H\n# define HEADER_CMAC_H\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n# include <openssl/evp.h>\n\n/* Opaque */\ntypedef struct CMAC_CTX_st CMAC_CTX;\n\nCMAC_CTX *CMAC_CTX_new(void);\nvoid CMAC_CTX_cleanup(CMAC_CTX *ctx);\nvoid CMAC_CTX_free(CMAC_CTX *ctx);\nEVP_CIPHER_CTX *CMAC_CTX_get0_cipher_ctx(CMAC_CTX *ctx);\nint CMAC_CTX_copy(CMAC_CTX *out, const CMAC_CTX *in);\n\nint CMAC_Init(CMAC_CTX *ctx, const void *key, size_t keylen,\n              const EVP_CIPHER *cipher, ENGINE *impl);\nint CMAC_Update(CMAC_CTX *ctx, const void *data, size_t dlen);\nint CMAC_Final(CMAC_CTX *ctx, unsigned char *out, size_t *poutlen);\nint CMAC_resume(CMAC_CTX *ctx);\n\n#ifdef  __cplusplus\n}\n#endif\n#endif\n"
  },
  {
    "path": "Pods/OpenSSL-Universal/include-ios/openssl/cms.h",
    "content": "/* crypto/cms/cms.h */\n/*\n * Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL\n * project.\n */\n/* ====================================================================\n * Copyright (c) 2008 The OpenSSL Project.  All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n *\n * 1. Redistributions of source code must retain the above copyright\n *    notice, this list of conditions and the following disclaimer.\n *\n * 2. Redistributions in binary form must reproduce the above copyright\n *    notice, this list of conditions and the following disclaimer in\n *    the documentation and/or other materials provided with the\n *    distribution.\n *\n * 3. All advertising materials mentioning features or use of this\n *    software must display the following acknowledgment:\n *    \"This product includes software developed by the OpenSSL Project\n *    for use in the OpenSSL Toolkit. (http://www.OpenSSL.org/)\"\n *\n * 4. The names \"OpenSSL Toolkit\" and \"OpenSSL Project\" must not be used to\n *    endorse or promote products derived from this software without\n *    prior written permission. For written permission, please contact\n *    licensing@OpenSSL.org.\n *\n * 5. Products derived from this software may not be called \"OpenSSL\"\n *    nor may \"OpenSSL\" appear in their names without prior written\n *    permission of the OpenSSL Project.\n *\n * 6. Redistributions of any form whatsoever must retain the following\n *    acknowledgment:\n *    \"This product includes software developed by the OpenSSL Project\n *    for use in the OpenSSL Toolkit (http://www.OpenSSL.org/)\"\n *\n * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY\n * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\n * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR\n * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,\n * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED\n * OF THE POSSIBILITY OF SUCH DAMAGE.\n * ====================================================================\n */\n\n#ifndef HEADER_CMS_H\n# define HEADER_CMS_H\n\n# include <openssl/x509.h>\n\n# ifdef OPENSSL_NO_CMS\n#  error CMS is disabled.\n# endif\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\ntypedef struct CMS_ContentInfo_st CMS_ContentInfo;\ntypedef struct CMS_SignerInfo_st CMS_SignerInfo;\ntypedef struct CMS_CertificateChoices CMS_CertificateChoices;\ntypedef struct CMS_RevocationInfoChoice_st CMS_RevocationInfoChoice;\ntypedef struct CMS_RecipientInfo_st CMS_RecipientInfo;\ntypedef struct CMS_ReceiptRequest_st CMS_ReceiptRequest;\ntypedef struct CMS_Receipt_st CMS_Receipt;\n\nDECLARE_STACK_OF(CMS_SignerInfo)\nDECLARE_STACK_OF(GENERAL_NAMES)\nDECLARE_ASN1_FUNCTIONS(CMS_ContentInfo)\nDECLARE_ASN1_FUNCTIONS(CMS_ReceiptRequest)\nDECLARE_ASN1_PRINT_FUNCTION(CMS_ContentInfo)\n\n# define CMS_SIGNERINFO_ISSUER_SERIAL    0\n# define CMS_SIGNERINFO_KEYIDENTIFIER    1\n\n# define CMS_RECIPINFO_TRANS             0\n# define CMS_RECIPINFO_AGREE             1\n# define CMS_RECIPINFO_KEK               2\n# define CMS_RECIPINFO_PASS              3\n# define CMS_RECIPINFO_OTHER             4\n\n/* S/MIME related flags */\n\n# define CMS_TEXT                        0x1\n# define CMS_NOCERTS                     0x2\n# define CMS_NO_CONTENT_VERIFY           0x4\n# define CMS_NO_ATTR_VERIFY              0x8\n# define CMS_NOSIGS                      \\\n                        (CMS_NO_CONTENT_VERIFY|CMS_NO_ATTR_VERIFY)\n# define CMS_NOINTERN                    0x10\n# define CMS_NO_SIGNER_CERT_VERIFY       0x20\n# define CMS_NOVERIFY                    0x20\n# define CMS_DETACHED                    0x40\n# define CMS_BINARY                      0x80\n# define CMS_NOATTR                      0x100\n# define CMS_NOSMIMECAP                  0x200\n# define CMS_NOOLDMIMETYPE               0x400\n# define CMS_CRLFEOL                     0x800\n# define CMS_STREAM                      0x1000\n# define CMS_NOCRL                       0x2000\n# define CMS_PARTIAL                     0x4000\n# define CMS_REUSE_DIGEST                0x8000\n# define CMS_USE_KEYID                   0x10000\n# define CMS_DEBUG_DECRYPT               0x20000\n\nconst ASN1_OBJECT *CMS_get0_type(CMS_ContentInfo *cms);\n\nBIO *CMS_dataInit(CMS_ContentInfo *cms, BIO *icont);\nint CMS_dataFinal(CMS_ContentInfo *cms, BIO *bio);\n\nASN1_OCTET_STRING **CMS_get0_content(CMS_ContentInfo *cms);\nint CMS_is_detached(CMS_ContentInfo *cms);\nint CMS_set_detached(CMS_ContentInfo *cms, int detached);\n\n# ifdef HEADER_PEM_H\nDECLARE_PEM_rw_const(CMS, CMS_ContentInfo)\n# endif\nint CMS_stream(unsigned char ***boundary, CMS_ContentInfo *cms);\nCMS_ContentInfo *d2i_CMS_bio(BIO *bp, CMS_ContentInfo **cms);\nint i2d_CMS_bio(BIO *bp, CMS_ContentInfo *cms);\n\nBIO *BIO_new_CMS(BIO *out, CMS_ContentInfo *cms);\nint i2d_CMS_bio_stream(BIO *out, CMS_ContentInfo *cms, BIO *in, int flags);\nint PEM_write_bio_CMS_stream(BIO *out, CMS_ContentInfo *cms, BIO *in,\n                             int flags);\nCMS_ContentInfo *SMIME_read_CMS(BIO *bio, BIO **bcont);\nint SMIME_write_CMS(BIO *bio, CMS_ContentInfo *cms, BIO *data, int flags);\n\nint CMS_final(CMS_ContentInfo *cms, BIO *data, BIO *dcont,\n              unsigned int flags);\n\nCMS_ContentInfo *CMS_sign(X509 *signcert, EVP_PKEY *pkey,\n                          STACK_OF(X509) *certs, BIO *data,\n                          unsigned int flags);\n\nCMS_ContentInfo *CMS_sign_receipt(CMS_SignerInfo *si,\n                                  X509 *signcert, EVP_PKEY *pkey,\n                                  STACK_OF(X509) *certs, unsigned int flags);\n\nint CMS_data(CMS_ContentInfo *cms, BIO *out, unsigned int flags);\nCMS_ContentInfo *CMS_data_create(BIO *in, unsigned int flags);\n\nint CMS_digest_verify(CMS_ContentInfo *cms, BIO *dcont, BIO *out,\n                      unsigned int flags);\nCMS_ContentInfo *CMS_digest_create(BIO *in, const EVP_MD *md,\n                                   unsigned int flags);\n\nint CMS_EncryptedData_decrypt(CMS_ContentInfo *cms,\n                              const unsigned char *key, size_t keylen,\n                              BIO *dcont, BIO *out, unsigned int flags);\n\nCMS_ContentInfo *CMS_EncryptedData_encrypt(BIO *in, const EVP_CIPHER *cipher,\n                                           const unsigned char *key,\n                                           size_t keylen, unsigned int flags);\n\nint CMS_EncryptedData_set1_key(CMS_ContentInfo *cms, const EVP_CIPHER *ciph,\n                               const unsigned char *key, size_t keylen);\n\nint CMS_verify(CMS_ContentInfo *cms, STACK_OF(X509) *certs,\n               X509_STORE *store, BIO *dcont, BIO *out, unsigned int flags);\n\nint CMS_verify_receipt(CMS_ContentInfo *rcms, CMS_ContentInfo *ocms,\n                       STACK_OF(X509) *certs,\n                       X509_STORE *store, unsigned int flags);\n\nSTACK_OF(X509) *CMS_get0_signers(CMS_ContentInfo *cms);\n\nCMS_ContentInfo *CMS_encrypt(STACK_OF(X509) *certs, BIO *in,\n                             const EVP_CIPHER *cipher, unsigned int flags);\n\nint CMS_decrypt(CMS_ContentInfo *cms, EVP_PKEY *pkey, X509 *cert,\n                BIO *dcont, BIO *out, unsigned int flags);\n\nint CMS_decrypt_set1_pkey(CMS_ContentInfo *cms, EVP_PKEY *pk, X509 *cert);\nint CMS_decrypt_set1_key(CMS_ContentInfo *cms,\n                         unsigned char *key, size_t keylen,\n                         unsigned char *id, size_t idlen);\nint CMS_decrypt_set1_password(CMS_ContentInfo *cms,\n                              unsigned char *pass, ossl_ssize_t passlen);\n\nSTACK_OF(CMS_RecipientInfo) *CMS_get0_RecipientInfos(CMS_ContentInfo *cms);\nint CMS_RecipientInfo_type(CMS_RecipientInfo *ri);\nCMS_ContentInfo *CMS_EnvelopedData_create(const EVP_CIPHER *cipher);\nCMS_RecipientInfo *CMS_add1_recipient_cert(CMS_ContentInfo *cms,\n                                           X509 *recip, unsigned int flags);\nint CMS_RecipientInfo_set0_pkey(CMS_RecipientInfo *ri, EVP_PKEY *pkey);\nint CMS_RecipientInfo_ktri_cert_cmp(CMS_RecipientInfo *ri, X509 *cert);\nint CMS_RecipientInfo_ktri_get0_algs(CMS_RecipientInfo *ri,\n                                     EVP_PKEY **pk, X509 **recip,\n                                     X509_ALGOR **palg);\nint CMS_RecipientInfo_ktri_get0_signer_id(CMS_RecipientInfo *ri,\n                                          ASN1_OCTET_STRING **keyid,\n                                          X509_NAME **issuer,\n                                          ASN1_INTEGER **sno);\n\nCMS_RecipientInfo *CMS_add0_recipient_key(CMS_ContentInfo *cms, int nid,\n                                          unsigned char *key, size_t keylen,\n                                          unsigned char *id, size_t idlen,\n                                          ASN1_GENERALIZEDTIME *date,\n                                          ASN1_OBJECT *otherTypeId,\n                                          ASN1_TYPE *otherType);\n\nint CMS_RecipientInfo_kekri_get0_id(CMS_RecipientInfo *ri,\n                                    X509_ALGOR **palg,\n                                    ASN1_OCTET_STRING **pid,\n                                    ASN1_GENERALIZEDTIME **pdate,\n                                    ASN1_OBJECT **potherid,\n                                    ASN1_TYPE **pothertype);\n\nint CMS_RecipientInfo_set0_key(CMS_RecipientInfo *ri,\n                               unsigned char *key, size_t keylen);\n\nint CMS_RecipientInfo_kekri_id_cmp(CMS_RecipientInfo *ri,\n                                   const unsigned char *id, size_t idlen);\n\nint CMS_RecipientInfo_set0_password(CMS_RecipientInfo *ri,\n                                    unsigned char *pass,\n                                    ossl_ssize_t passlen);\n\nCMS_RecipientInfo *CMS_add0_recipient_password(CMS_ContentInfo *cms,\n                                               int iter, int wrap_nid,\n                                               int pbe_nid,\n                                               unsigned char *pass,\n                                               ossl_ssize_t passlen,\n                                               const EVP_CIPHER *kekciph);\n\nint CMS_RecipientInfo_decrypt(CMS_ContentInfo *cms, CMS_RecipientInfo *ri);\n\nint CMS_uncompress(CMS_ContentInfo *cms, BIO *dcont, BIO *out,\n                   unsigned int flags);\nCMS_ContentInfo *CMS_compress(BIO *in, int comp_nid, unsigned int flags);\n\nint CMS_set1_eContentType(CMS_ContentInfo *cms, const ASN1_OBJECT *oid);\nconst ASN1_OBJECT *CMS_get0_eContentType(CMS_ContentInfo *cms);\n\nCMS_CertificateChoices *CMS_add0_CertificateChoices(CMS_ContentInfo *cms);\nint CMS_add0_cert(CMS_ContentInfo *cms, X509 *cert);\nint CMS_add1_cert(CMS_ContentInfo *cms, X509 *cert);\nSTACK_OF(X509) *CMS_get1_certs(CMS_ContentInfo *cms);\n\nCMS_RevocationInfoChoice *CMS_add0_RevocationInfoChoice(CMS_ContentInfo *cms);\nint CMS_add0_crl(CMS_ContentInfo *cms, X509_CRL *crl);\nint CMS_add1_crl(CMS_ContentInfo *cms, X509_CRL *crl);\nSTACK_OF(X509_CRL) *CMS_get1_crls(CMS_ContentInfo *cms);\n\nint CMS_SignedData_init(CMS_ContentInfo *cms);\nCMS_SignerInfo *CMS_add1_signer(CMS_ContentInfo *cms,\n                                X509 *signer, EVP_PKEY *pk, const EVP_MD *md,\n                                unsigned int flags);\nSTACK_OF(CMS_SignerInfo) *CMS_get0_SignerInfos(CMS_ContentInfo *cms);\n\nvoid CMS_SignerInfo_set1_signer_cert(CMS_SignerInfo *si, X509 *signer);\nint CMS_SignerInfo_get0_signer_id(CMS_SignerInfo *si,\n                                  ASN1_OCTET_STRING **keyid,\n                                  X509_NAME **issuer, ASN1_INTEGER **sno);\nint CMS_SignerInfo_cert_cmp(CMS_SignerInfo *si, X509 *cert);\nint CMS_set1_signers_certs(CMS_ContentInfo *cms, STACK_OF(X509) *certs,\n                           unsigned int flags);\nvoid CMS_SignerInfo_get0_algs(CMS_SignerInfo *si, EVP_PKEY **pk,\n                              X509 **signer, X509_ALGOR **pdig,\n                              X509_ALGOR **psig);\nint CMS_SignerInfo_sign(CMS_SignerInfo *si);\nint CMS_SignerInfo_verify(CMS_SignerInfo *si);\nint CMS_SignerInfo_verify_content(CMS_SignerInfo *si, BIO *chain);\n\nint CMS_add_smimecap(CMS_SignerInfo *si, STACK_OF(X509_ALGOR) *algs);\nint CMS_add_simple_smimecap(STACK_OF(X509_ALGOR) **algs,\n                            int algnid, int keysize);\nint CMS_add_standard_smimecap(STACK_OF(X509_ALGOR) **smcap);\n\nint CMS_signed_get_attr_count(const CMS_SignerInfo *si);\nint CMS_signed_get_attr_by_NID(const CMS_SignerInfo *si, int nid,\n                               int lastpos);\nint CMS_signed_get_attr_by_OBJ(const CMS_SignerInfo *si, ASN1_OBJECT *obj,\n                               int lastpos);\nX509_ATTRIBUTE *CMS_signed_get_attr(const CMS_SignerInfo *si, int loc);\nX509_ATTRIBUTE *CMS_signed_delete_attr(CMS_SignerInfo *si, int loc);\nint CMS_signed_add1_attr(CMS_SignerInfo *si, X509_ATTRIBUTE *attr);\nint CMS_signed_add1_attr_by_OBJ(CMS_SignerInfo *si,\n                                const ASN1_OBJECT *obj, int type,\n                                const void *bytes, int len);\nint CMS_signed_add1_attr_by_NID(CMS_SignerInfo *si,\n                                int nid, int type,\n                                const void *bytes, int len);\nint CMS_signed_add1_attr_by_txt(CMS_SignerInfo *si,\n                                const char *attrname, int type,\n                                const void *bytes, int len);\nvoid *CMS_signed_get0_data_by_OBJ(CMS_SignerInfo *si, ASN1_OBJECT *oid,\n                                  int lastpos, int type);\n\nint CMS_unsigned_get_attr_count(const CMS_SignerInfo *si);\nint CMS_unsigned_get_attr_by_NID(const CMS_SignerInfo *si, int nid,\n                                 int lastpos);\nint CMS_unsigned_get_attr_by_OBJ(const CMS_SignerInfo *si, ASN1_OBJECT *obj,\n                                 int lastpos);\nX509_ATTRIBUTE *CMS_unsigned_get_attr(const CMS_SignerInfo *si, int loc);\nX509_ATTRIBUTE *CMS_unsigned_delete_attr(CMS_SignerInfo *si, int loc);\nint CMS_unsigned_add1_attr(CMS_SignerInfo *si, X509_ATTRIBUTE *attr);\nint CMS_unsigned_add1_attr_by_OBJ(CMS_SignerInfo *si,\n                                  const ASN1_OBJECT *obj, int type,\n                                  const void *bytes, int len);\nint CMS_unsigned_add1_attr_by_NID(CMS_SignerInfo *si,\n                                  int nid, int type,\n                                  const void *bytes, int len);\nint CMS_unsigned_add1_attr_by_txt(CMS_SignerInfo *si,\n                                  const char *attrname, int type,\n                                  const void *bytes, int len);\nvoid *CMS_unsigned_get0_data_by_OBJ(CMS_SignerInfo *si, ASN1_OBJECT *oid,\n                                    int lastpos, int type);\n\n# ifdef HEADER_X509V3_H\n\nint CMS_get1_ReceiptRequest(CMS_SignerInfo *si, CMS_ReceiptRequest **prr);\nCMS_ReceiptRequest *CMS_ReceiptRequest_create0(unsigned char *id, int idlen,\n                                               int allorfirst,\n                                               STACK_OF(GENERAL_NAMES)\n                                               *receiptList, STACK_OF(GENERAL_NAMES)\n                                               *receiptsTo);\nint CMS_add1_ReceiptRequest(CMS_SignerInfo *si, CMS_ReceiptRequest *rr);\nvoid CMS_ReceiptRequest_get0_values(CMS_ReceiptRequest *rr,\n                                    ASN1_STRING **pcid,\n                                    int *pallorfirst,\n                                    STACK_OF(GENERAL_NAMES) **plist,\n                                    STACK_OF(GENERAL_NAMES) **prto);\n\n# endif\n\n/* BEGIN ERROR CODES */\n/*\n * The following lines are auto generated by the script mkerr.pl. Any changes\n * made after this point may be overwritten when the script is next run.\n */\nvoid ERR_load_CMS_strings(void);\n\n/* Error codes for the CMS functions. */\n\n/* Function codes. */\n# define CMS_F_CHECK_CONTENT                              99\n# define CMS_F_CMS_ADD0_CERT                              164\n# define CMS_F_CMS_ADD0_RECIPIENT_KEY                     100\n# define CMS_F_CMS_ADD0_RECIPIENT_PASSWORD                165\n# define CMS_F_CMS_ADD1_RECEIPTREQUEST                    158\n# define CMS_F_CMS_ADD1_RECIPIENT_CERT                    101\n# define CMS_F_CMS_ADD1_SIGNER                            102\n# define CMS_F_CMS_ADD1_SIGNINGTIME                       103\n# define CMS_F_CMS_COMPRESS                               104\n# define CMS_F_CMS_COMPRESSEDDATA_CREATE                  105\n# define CMS_F_CMS_COMPRESSEDDATA_INIT_BIO                106\n# define CMS_F_CMS_COPY_CONTENT                           107\n# define CMS_F_CMS_COPY_MESSAGEDIGEST                     108\n# define CMS_F_CMS_DATA                                   109\n# define CMS_F_CMS_DATAFINAL                              110\n# define CMS_F_CMS_DATAINIT                               111\n# define CMS_F_CMS_DECRYPT                                112\n# define CMS_F_CMS_DECRYPT_SET1_KEY                       113\n# define CMS_F_CMS_DECRYPT_SET1_PASSWORD                  166\n# define CMS_F_CMS_DECRYPT_SET1_PKEY                      114\n# define CMS_F_CMS_DIGESTALGORITHM_FIND_CTX               115\n# define CMS_F_CMS_DIGESTALGORITHM_INIT_BIO               116\n# define CMS_F_CMS_DIGESTEDDATA_DO_FINAL                  117\n# define CMS_F_CMS_DIGEST_VERIFY                          118\n# define CMS_F_CMS_ENCODE_RECEIPT                         161\n# define CMS_F_CMS_ENCRYPT                                119\n# define CMS_F_CMS_ENCRYPTEDCONTENT_INIT_BIO              120\n# define CMS_F_CMS_ENCRYPTEDDATA_DECRYPT                  121\n# define CMS_F_CMS_ENCRYPTEDDATA_ENCRYPT                  122\n# define CMS_F_CMS_ENCRYPTEDDATA_SET1_KEY                 123\n# define CMS_F_CMS_ENVELOPEDDATA_CREATE                   124\n# define CMS_F_CMS_ENVELOPEDDATA_INIT_BIO                 125\n# define CMS_F_CMS_ENVELOPED_DATA_INIT                    126\n# define CMS_F_CMS_FINAL                                  127\n# define CMS_F_CMS_GET0_CERTIFICATE_CHOICES               128\n# define CMS_F_CMS_GET0_CONTENT                           129\n# define CMS_F_CMS_GET0_ECONTENT_TYPE                     130\n# define CMS_F_CMS_GET0_ENVELOPED                         131\n# define CMS_F_CMS_GET0_REVOCATION_CHOICES                132\n# define CMS_F_CMS_GET0_SIGNED                            133\n# define CMS_F_CMS_MSGSIGDIGEST_ADD1                      162\n# define CMS_F_CMS_RECEIPTREQUEST_CREATE0                 159\n# define CMS_F_CMS_RECEIPT_VERIFY                         160\n# define CMS_F_CMS_RECIPIENTINFO_DECRYPT                  134\n# define CMS_F_CMS_RECIPIENTINFO_KEKRI_DECRYPT            135\n# define CMS_F_CMS_RECIPIENTINFO_KEKRI_ENCRYPT            136\n# define CMS_F_CMS_RECIPIENTINFO_KEKRI_GET0_ID            137\n# define CMS_F_CMS_RECIPIENTINFO_KEKRI_ID_CMP             138\n# define CMS_F_CMS_RECIPIENTINFO_KTRI_CERT_CMP            139\n# define CMS_F_CMS_RECIPIENTINFO_KTRI_DECRYPT             140\n# define CMS_F_CMS_RECIPIENTINFO_KTRI_ENCRYPT             141\n# define CMS_F_CMS_RECIPIENTINFO_KTRI_GET0_ALGS           142\n# define CMS_F_CMS_RECIPIENTINFO_KTRI_GET0_SIGNER_ID      143\n# define CMS_F_CMS_RECIPIENTINFO_PWRI_CRYPT               167\n# define CMS_F_CMS_RECIPIENTINFO_SET0_KEY                 144\n# define CMS_F_CMS_RECIPIENTINFO_SET0_PASSWORD            168\n# define CMS_F_CMS_RECIPIENTINFO_SET0_PKEY                145\n# define CMS_F_CMS_SET1_SIGNERIDENTIFIER                  146\n# define CMS_F_CMS_SET_DETACHED                           147\n# define CMS_F_CMS_SIGN                                   148\n# define CMS_F_CMS_SIGNED_DATA_INIT                       149\n# define CMS_F_CMS_SIGNERINFO_CONTENT_SIGN                150\n# define CMS_F_CMS_SIGNERINFO_SIGN                        151\n# define CMS_F_CMS_SIGNERINFO_VERIFY                      152\n# define CMS_F_CMS_SIGNERINFO_VERIFY_CERT                 153\n# define CMS_F_CMS_SIGNERINFO_VERIFY_CONTENT              154\n# define CMS_F_CMS_SIGN_RECEIPT                           163\n# define CMS_F_CMS_STREAM                                 155\n# define CMS_F_CMS_UNCOMPRESS                             156\n# define CMS_F_CMS_VERIFY                                 157\n\n/* Reason codes. */\n# define CMS_R_ADD_SIGNER_ERROR                           99\n# define CMS_R_CERTIFICATE_ALREADY_PRESENT                175\n# define CMS_R_CERTIFICATE_HAS_NO_KEYID                   160\n# define CMS_R_CERTIFICATE_VERIFY_ERROR                   100\n# define CMS_R_CIPHER_INITIALISATION_ERROR                101\n# define CMS_R_CIPHER_PARAMETER_INITIALISATION_ERROR      102\n# define CMS_R_CMS_DATAFINAL_ERROR                        103\n# define CMS_R_CMS_LIB                                    104\n# define CMS_R_CONTENTIDENTIFIER_MISMATCH                 170\n# define CMS_R_CONTENT_NOT_FOUND                          105\n# define CMS_R_CONTENT_TYPE_MISMATCH                      171\n# define CMS_R_CONTENT_TYPE_NOT_COMPRESSED_DATA           106\n# define CMS_R_CONTENT_TYPE_NOT_ENVELOPED_DATA            107\n# define CMS_R_CONTENT_TYPE_NOT_SIGNED_DATA               108\n# define CMS_R_CONTENT_VERIFY_ERROR                       109\n# define CMS_R_CTRL_ERROR                                 110\n# define CMS_R_CTRL_FAILURE                               111\n# define CMS_R_DECRYPT_ERROR                              112\n# define CMS_R_DIGEST_ERROR                               161\n# define CMS_R_ERROR_GETTING_PUBLIC_KEY                   113\n# define CMS_R_ERROR_READING_MESSAGEDIGEST_ATTRIBUTE      114\n# define CMS_R_ERROR_SETTING_KEY                          115\n# define CMS_R_ERROR_SETTING_RECIPIENTINFO                116\n# define CMS_R_INVALID_ENCRYPTED_KEY_LENGTH               117\n# define CMS_R_INVALID_KEY_ENCRYPTION_PARAMETER           176\n# define CMS_R_INVALID_KEY_LENGTH                         118\n# define CMS_R_MD_BIO_INIT_ERROR                          119\n# define CMS_R_MESSAGEDIGEST_ATTRIBUTE_WRONG_LENGTH       120\n# define CMS_R_MESSAGEDIGEST_WRONG_LENGTH                 121\n# define CMS_R_MSGSIGDIGEST_ERROR                         172\n# define CMS_R_MSGSIGDIGEST_VERIFICATION_FAILURE          162\n# define CMS_R_MSGSIGDIGEST_WRONG_LENGTH                  163\n# define CMS_R_NEED_ONE_SIGNER                            164\n# define CMS_R_NOT_A_SIGNED_RECEIPT                       165\n# define CMS_R_NOT_ENCRYPTED_DATA                         122\n# define CMS_R_NOT_KEK                                    123\n# define CMS_R_NOT_KEY_TRANSPORT                          124\n# define CMS_R_NOT_PWRI                                   177\n# define CMS_R_NOT_SUPPORTED_FOR_THIS_KEY_TYPE            125\n# define CMS_R_NO_CIPHER                                  126\n# define CMS_R_NO_CONTENT                                 127\n# define CMS_R_NO_CONTENT_TYPE                            173\n# define CMS_R_NO_DEFAULT_DIGEST                          128\n# define CMS_R_NO_DIGEST_SET                              129\n# define CMS_R_NO_KEY                                     130\n# define CMS_R_NO_KEY_OR_CERT                             174\n# define CMS_R_NO_MATCHING_DIGEST                         131\n# define CMS_R_NO_MATCHING_RECIPIENT                      132\n# define CMS_R_NO_MATCHING_SIGNATURE                      166\n# define CMS_R_NO_MSGSIGDIGEST                            167\n# define CMS_R_NO_PASSWORD                                178\n# define CMS_R_NO_PRIVATE_KEY                             133\n# define CMS_R_NO_PUBLIC_KEY                              134\n# define CMS_R_NO_RECEIPT_REQUEST                         168\n# define CMS_R_NO_SIGNERS                                 135\n# define CMS_R_PRIVATE_KEY_DOES_NOT_MATCH_CERTIFICATE     136\n# define CMS_R_RECEIPT_DECODE_ERROR                       169\n# define CMS_R_RECIPIENT_ERROR                            137\n# define CMS_R_SIGNER_CERTIFICATE_NOT_FOUND               138\n# define CMS_R_SIGNFINAL_ERROR                            139\n# define CMS_R_SMIME_TEXT_ERROR                           140\n# define CMS_R_STORE_INIT_ERROR                           141\n# define CMS_R_TYPE_NOT_COMPRESSED_DATA                   142\n# define CMS_R_TYPE_NOT_DATA                              143\n# define CMS_R_TYPE_NOT_DIGESTED_DATA                     144\n# define CMS_R_TYPE_NOT_ENCRYPTED_DATA                    145\n# define CMS_R_TYPE_NOT_ENVELOPED_DATA                    146\n# define CMS_R_UNABLE_TO_FINALIZE_CONTEXT                 147\n# define CMS_R_UNKNOWN_CIPHER                             148\n# define CMS_R_UNKNOWN_DIGEST_ALGORIHM                    149\n# define CMS_R_UNKNOWN_ID                                 150\n# define CMS_R_UNSUPPORTED_COMPRESSION_ALGORITHM          151\n# define CMS_R_UNSUPPORTED_CONTENT_TYPE                   152\n# define CMS_R_UNSUPPORTED_KEK_ALGORITHM                  153\n# define CMS_R_UNSUPPORTED_KEY_ENCRYPTION_ALGORITHM       179\n# define CMS_R_UNSUPPORTED_RECIPIENT_TYPE                 154\n# define CMS_R_UNSUPPORTED_RECPIENTINFO_TYPE              155\n# define CMS_R_UNSUPPORTED_TYPE                           156\n# define CMS_R_UNWRAP_ERROR                               157\n# define CMS_R_UNWRAP_FAILURE                             180\n# define CMS_R_VERIFICATION_FAILURE                       158\n# define CMS_R_WRAP_ERROR                                 159\n\n#ifdef  __cplusplus\n}\n#endif\n#endif\n"
  },
  {
    "path": "Pods/OpenSSL-Universal/include-ios/openssl/comp.h",
    "content": "\n#ifndef HEADER_COMP_H\n# define HEADER_COMP_H\n\n# include <openssl/crypto.h>\n\n#ifdef  __cplusplus\nextern \"C\" {\n#endif\n\ntypedef struct comp_ctx_st COMP_CTX;\n\ntypedef struct comp_method_st {\n    int type;                   /* NID for compression library */\n    const char *name;           /* A text string to identify the library */\n    int (*init) (COMP_CTX *ctx);\n    void (*finish) (COMP_CTX *ctx);\n    int (*compress) (COMP_CTX *ctx,\n                     unsigned char *out, unsigned int olen,\n                     unsigned char *in, unsigned int ilen);\n    int (*expand) (COMP_CTX *ctx,\n                   unsigned char *out, unsigned int olen,\n                   unsigned char *in, unsigned int ilen);\n    /*\n     * The following two do NOTHING, but are kept for backward compatibility\n     */\n    long (*ctrl) (void);\n    long (*callback_ctrl) (void);\n} COMP_METHOD;\n\nstruct comp_ctx_st {\n    COMP_METHOD *meth;\n    unsigned long compress_in;\n    unsigned long compress_out;\n    unsigned long expand_in;\n    unsigned long expand_out;\n    CRYPTO_EX_DATA ex_data;\n};\n\nCOMP_CTX *COMP_CTX_new(COMP_METHOD *meth);\nvoid COMP_CTX_free(COMP_CTX *ctx);\nint COMP_compress_block(COMP_CTX *ctx, unsigned char *out, int olen,\n                        unsigned char *in, int ilen);\nint COMP_expand_block(COMP_CTX *ctx, unsigned char *out, int olen,\n                      unsigned char *in, int ilen);\nCOMP_METHOD *COMP_rle(void);\nCOMP_METHOD *COMP_zlib(void);\nvoid COMP_zlib_cleanup(void);\n\n# ifdef HEADER_BIO_H\n#  ifdef ZLIB\nBIO_METHOD *BIO_f_zlib(void);\n#  endif\n# endif\n\n/* BEGIN ERROR CODES */\n/*\n * The following lines are auto generated by the script mkerr.pl. Any changes\n * made after this point may be overwritten when the script is next run.\n */\nvoid ERR_load_COMP_strings(void);\n\n/* Error codes for the COMP functions. */\n\n/* Function codes. */\n# define COMP_F_BIO_ZLIB_FLUSH                            99\n# define COMP_F_BIO_ZLIB_NEW                              100\n# define COMP_F_BIO_ZLIB_READ                             101\n# define COMP_F_BIO_ZLIB_WRITE                            102\n\n/* Reason codes. */\n# define COMP_R_ZLIB_DEFLATE_ERROR                        99\n# define COMP_R_ZLIB_INFLATE_ERROR                        100\n# define COMP_R_ZLIB_NOT_SUPPORTED                        101\n\n#ifdef  __cplusplus\n}\n#endif\n#endif\n"
  },
  {
    "path": "Pods/OpenSSL-Universal/include-ios/openssl/conf.h",
    "content": "/* crypto/conf/conf.h */\n/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)\n * All rights reserved.\n *\n * This package is an SSL implementation written\n * by Eric Young (eay@cryptsoft.com).\n * The implementation was written so as to conform with Netscapes SSL.\n *\n * This library is free for commercial and non-commercial use as long as\n * the following conditions are aheared to.  The following conditions\n * apply to all code found in this distribution, be it the RC4, RSA,\n * lhash, DES, etc., code; not just the SSL code.  The SSL documentation\n * included with this distribution is covered by the same copyright terms\n * except that the holder is Tim Hudson (tjh@cryptsoft.com).\n *\n * Copyright remains Eric Young's, and as such any Copyright notices in\n * the code are not to be removed.\n * If this package is used in a product, Eric Young should be given attribution\n * as the author of the parts of the library used.\n * This can be in the form of a textual message at program startup or\n * in documentation (online or textual) provided with the package.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n * 1. Redistributions of source code must retain the copyright\n *    notice, this list of conditions and the following disclaimer.\n * 2. Redistributions in binary form must reproduce the above copyright\n *    notice, this list of conditions and the following disclaimer in the\n *    documentation and/or other materials provided with the distribution.\n * 3. All advertising materials mentioning features or use of this software\n *    must display the following acknowledgement:\n *    \"This product includes cryptographic software written by\n *     Eric Young (eay@cryptsoft.com)\"\n *    The word 'cryptographic' can be left out if the rouines from the library\n *    being used are not cryptographic related :-).\n * 4. If you include any Windows specific code (or a derivative thereof) from\n *    the apps directory (application code) you must include an acknowledgement:\n *    \"This product includes software written by Tim Hudson (tjh@cryptsoft.com)\"\n *\n * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND\n * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE\n * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n * SUCH DAMAGE.\n *\n * The licence and distribution terms for any publically available version or\n * derivative of this code cannot be changed.  i.e. this code cannot simply be\n * copied and put under another distribution licence\n * [including the GNU Public Licence.]\n */\n\n#ifndef  HEADER_CONF_H\n# define HEADER_CONF_H\n\n# include <openssl/bio.h>\n# include <openssl/lhash.h>\n# include <openssl/stack.h>\n# include <openssl/safestack.h>\n# include <openssl/e_os2.h>\n\n# include <openssl/ossl_typ.h>\n\n#ifdef  __cplusplus\nextern \"C\" {\n#endif\n\ntypedef struct {\n    char *section;\n    char *name;\n    char *value;\n} CONF_VALUE;\n\nDECLARE_STACK_OF(CONF_VALUE)\nDECLARE_LHASH_OF(CONF_VALUE);\n\nstruct conf_st;\nstruct conf_method_st;\ntypedef struct conf_method_st CONF_METHOD;\n\nstruct conf_method_st {\n    const char *name;\n    CONF *(*create) (CONF_METHOD *meth);\n    int (*init) (CONF *conf);\n    int (*destroy) (CONF *conf);\n    int (*destroy_data) (CONF *conf);\n    int (*load_bio) (CONF *conf, BIO *bp, long *eline);\n    int (*dump) (const CONF *conf, BIO *bp);\n    int (*is_number) (const CONF *conf, char c);\n    int (*to_int) (const CONF *conf, char c);\n    int (*load) (CONF *conf, const char *name, long *eline);\n};\n\n/* Module definitions */\n\ntypedef struct conf_imodule_st CONF_IMODULE;\ntypedef struct conf_module_st CONF_MODULE;\n\nDECLARE_STACK_OF(CONF_MODULE)\nDECLARE_STACK_OF(CONF_IMODULE)\n\n/* DSO module function typedefs */\ntypedef int conf_init_func (CONF_IMODULE *md, const CONF *cnf);\ntypedef void conf_finish_func (CONF_IMODULE *md);\n\n# define CONF_MFLAGS_IGNORE_ERRORS       0x1\n# define CONF_MFLAGS_IGNORE_RETURN_CODES 0x2\n# define CONF_MFLAGS_SILENT              0x4\n# define CONF_MFLAGS_NO_DSO              0x8\n# define CONF_MFLAGS_IGNORE_MISSING_FILE 0x10\n# define CONF_MFLAGS_DEFAULT_SECTION     0x20\n\nint CONF_set_default_method(CONF_METHOD *meth);\nvoid CONF_set_nconf(CONF *conf, LHASH_OF(CONF_VALUE) *hash);\nLHASH_OF(CONF_VALUE) *CONF_load(LHASH_OF(CONF_VALUE) *conf, const char *file,\n                                long *eline);\n# ifndef OPENSSL_NO_FP_API\nLHASH_OF(CONF_VALUE) *CONF_load_fp(LHASH_OF(CONF_VALUE) *conf, FILE *fp,\n                                   long *eline);\n# endif\nLHASH_OF(CONF_VALUE) *CONF_load_bio(LHASH_OF(CONF_VALUE) *conf, BIO *bp,\n                                    long *eline);\nSTACK_OF(CONF_VALUE) *CONF_get_section(LHASH_OF(CONF_VALUE) *conf,\n                                       const char *section);\nchar *CONF_get_string(LHASH_OF(CONF_VALUE) *conf, const char *group,\n                      const char *name);\nlong CONF_get_number(LHASH_OF(CONF_VALUE) *conf, const char *group,\n                     const char *name);\nvoid CONF_free(LHASH_OF(CONF_VALUE) *conf);\nint CONF_dump_fp(LHASH_OF(CONF_VALUE) *conf, FILE *out);\nint CONF_dump_bio(LHASH_OF(CONF_VALUE) *conf, BIO *out);\n\nvoid OPENSSL_config(const char *config_name);\nvoid OPENSSL_no_config(void);\n\n/*\n * New conf code.  The semantics are different from the functions above. If\n * that wasn't the case, the above functions would have been replaced\n */\n\nstruct conf_st {\n    CONF_METHOD *meth;\n    void *meth_data;\n    LHASH_OF(CONF_VALUE) *data;\n};\n\nCONF *NCONF_new(CONF_METHOD *meth);\nCONF_METHOD *NCONF_default(void);\nCONF_METHOD *NCONF_WIN32(void);\n# if 0                          /* Just to give you an idea of what I have in\n                                 * mind */\nCONF_METHOD *NCONF_XML(void);\n# endif\nvoid NCONF_free(CONF *conf);\nvoid NCONF_free_data(CONF *conf);\n\nint NCONF_load(CONF *conf, const char *file, long *eline);\n# ifndef OPENSSL_NO_FP_API\nint NCONF_load_fp(CONF *conf, FILE *fp, long *eline);\n# endif\nint NCONF_load_bio(CONF *conf, BIO *bp, long *eline);\nSTACK_OF(CONF_VALUE) *NCONF_get_section(const CONF *conf,\n                                        const char *section);\nchar *NCONF_get_string(const CONF *conf, const char *group, const char *name);\nint NCONF_get_number_e(const CONF *conf, const char *group, const char *name,\n                       long *result);\nint NCONF_dump_fp(const CONF *conf, FILE *out);\nint NCONF_dump_bio(const CONF *conf, BIO *out);\n\n# if 0                          /* The following function has no error\n                                 * checking, and should therefore be avoided */\nlong NCONF_get_number(CONF *conf, char *group, char *name);\n# else\n#  define NCONF_get_number(c,g,n,r) NCONF_get_number_e(c,g,n,r)\n# endif\n\n/* Module functions */\n\nint CONF_modules_load(const CONF *cnf, const char *appname,\n                      unsigned long flags);\nint CONF_modules_load_file(const char *filename, const char *appname,\n                           unsigned long flags);\nvoid CONF_modules_unload(int all);\nvoid CONF_modules_finish(void);\nvoid CONF_modules_free(void);\nint CONF_module_add(const char *name, conf_init_func *ifunc,\n                    conf_finish_func *ffunc);\n\nconst char *CONF_imodule_get_name(const CONF_IMODULE *md);\nconst char *CONF_imodule_get_value(const CONF_IMODULE *md);\nvoid *CONF_imodule_get_usr_data(const CONF_IMODULE *md);\nvoid CONF_imodule_set_usr_data(CONF_IMODULE *md, void *usr_data);\nCONF_MODULE *CONF_imodule_get_module(const CONF_IMODULE *md);\nunsigned long CONF_imodule_get_flags(const CONF_IMODULE *md);\nvoid CONF_imodule_set_flags(CONF_IMODULE *md, unsigned long flags);\nvoid *CONF_module_get_usr_data(CONF_MODULE *pmod);\nvoid CONF_module_set_usr_data(CONF_MODULE *pmod, void *usr_data);\n\nchar *CONF_get1_default_config_file(void);\n\nint CONF_parse_list(const char *list, int sep, int nospc,\n                    int (*list_cb) (const char *elem, int len, void *usr),\n                    void *arg);\n\nvoid OPENSSL_load_builtin_modules(void);\n\n/* BEGIN ERROR CODES */\n/*\n * The following lines are auto generated by the script mkerr.pl. Any changes\n * made after this point may be overwritten when the script is next run.\n */\nvoid ERR_load_CONF_strings(void);\n\n/* Error codes for the CONF functions. */\n\n/* Function codes. */\n# define CONF_F_CONF_DUMP_FP                              104\n# define CONF_F_CONF_LOAD                                 100\n# define CONF_F_CONF_LOAD_BIO                             102\n# define CONF_F_CONF_LOAD_FP                              103\n# define CONF_F_CONF_MODULES_LOAD                         116\n# define CONF_F_CONF_PARSE_LIST                           119\n# define CONF_F_DEF_LOAD                                  120\n# define CONF_F_DEF_LOAD_BIO                              121\n# define CONF_F_MODULE_INIT                               115\n# define CONF_F_MODULE_LOAD_DSO                           117\n# define CONF_F_MODULE_RUN                                118\n# define CONF_F_NCONF_DUMP_BIO                            105\n# define CONF_F_NCONF_DUMP_FP                             106\n# define CONF_F_NCONF_GET_NUMBER                          107\n# define CONF_F_NCONF_GET_NUMBER_E                        112\n# define CONF_F_NCONF_GET_SECTION                         108\n# define CONF_F_NCONF_GET_STRING                          109\n# define CONF_F_NCONF_LOAD                                113\n# define CONF_F_NCONF_LOAD_BIO                            110\n# define CONF_F_NCONF_LOAD_FP                             114\n# define CONF_F_NCONF_NEW                                 111\n# define CONF_F_STR_COPY                                  101\n\n/* Reason codes. */\n# define CONF_R_ERROR_LOADING_DSO                         110\n# define CONF_R_LIST_CANNOT_BE_NULL                       115\n# define CONF_R_MISSING_CLOSE_SQUARE_BRACKET              100\n# define CONF_R_MISSING_EQUAL_SIGN                        101\n# define CONF_R_MISSING_FINISH_FUNCTION                   111\n# define CONF_R_MISSING_INIT_FUNCTION                     112\n# define CONF_R_MODULE_INITIALIZATION_ERROR               109\n# define CONF_R_NO_CLOSE_BRACE                            102\n# define CONF_R_NO_CONF                                   105\n# define CONF_R_NO_CONF_OR_ENVIRONMENT_VARIABLE           106\n# define CONF_R_NO_SECTION                                107\n# define CONF_R_NO_SUCH_FILE                              114\n# define CONF_R_NO_VALUE                                  108\n# define CONF_R_UNABLE_TO_CREATE_NEW_SECTION              103\n# define CONF_R_UNKNOWN_MODULE_NAME                       113\n# define CONF_R_VARIABLE_HAS_NO_VALUE                     104\n\n#ifdef  __cplusplus\n}\n#endif\n#endif\n"
  },
  {
    "path": "Pods/OpenSSL-Universal/include-ios/openssl/conf_api.h",
    "content": "/* conf_api.h */\n/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)\n * All rights reserved.\n *\n * This package is an SSL implementation written\n * by Eric Young (eay@cryptsoft.com).\n * The implementation was written so as to conform with Netscapes SSL.\n *\n * This library is free for commercial and non-commercial use as long as\n * the following conditions are aheared to.  The following conditions\n * apply to all code found in this distribution, be it the RC4, RSA,\n * lhash, DES, etc., code; not just the SSL code.  The SSL documentation\n * included with this distribution is covered by the same copyright terms\n * except that the holder is Tim Hudson (tjh@cryptsoft.com).\n *\n * Copyright remains Eric Young's, and as such any Copyright notices in\n * the code are not to be removed.\n * If this package is used in a product, Eric Young should be given attribution\n * as the author of the parts of the library used.\n * This can be in the form of a textual message at program startup or\n * in documentation (online or textual) provided with the package.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n * 1. Redistributions of source code must retain the copyright\n *    notice, this list of conditions and the following disclaimer.\n * 2. Redistributions in binary form must reproduce the above copyright\n *    notice, this list of conditions and the following disclaimer in the\n *    documentation and/or other materials provided with the distribution.\n * 3. All advertising materials mentioning features or use of this software\n *    must display the following acknowledgement:\n *    \"This product includes cryptographic software written by\n *     Eric Young (eay@cryptsoft.com)\"\n *    The word 'cryptographic' can be left out if the rouines from the library\n *    being used are not cryptographic related :-).\n * 4. If you include any Windows specific code (or a derivative thereof) from\n *    the apps directory (application code) you must include an acknowledgement:\n *    \"This product includes software written by Tim Hudson (tjh@cryptsoft.com)\"\n *\n * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND\n * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE\n * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n * SUCH DAMAGE.\n *\n * The licence and distribution terms for any publically available version or\n * derivative of this code cannot be changed.  i.e. this code cannot simply be\n * copied and put under another distribution licence\n * [including the GNU Public Licence.]\n */\n\n#ifndef  HEADER_CONF_API_H\n# define HEADER_CONF_API_H\n\n# include <openssl/lhash.h>\n# include <openssl/conf.h>\n\n#ifdef  __cplusplus\nextern \"C\" {\n#endif\n\n/* Up until OpenSSL 0.9.5a, this was new_section */\nCONF_VALUE *_CONF_new_section(CONF *conf, const char *section);\n/* Up until OpenSSL 0.9.5a, this was get_section */\nCONF_VALUE *_CONF_get_section(const CONF *conf, const char *section);\n/* Up until OpenSSL 0.9.5a, this was CONF_get_section */\nSTACK_OF(CONF_VALUE) *_CONF_get_section_values(const CONF *conf,\n                                               const char *section);\n\nint _CONF_add_string(CONF *conf, CONF_VALUE *section, CONF_VALUE *value);\nchar *_CONF_get_string(const CONF *conf, const char *section,\n                       const char *name);\nlong _CONF_get_number(const CONF *conf, const char *section,\n                      const char *name);\n\nint _CONF_new_data(CONF *conf);\nvoid _CONF_free_data(CONF *conf);\n\n#ifdef  __cplusplus\n}\n#endif\n#endif\n"
  },
  {
    "path": "Pods/OpenSSL-Universal/include-ios/openssl/crypto.h",
    "content": "/* crypto/crypto.h */\n/* ====================================================================\n * Copyright (c) 1998-2006 The OpenSSL Project.  All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n *\n * 1. Redistributions of source code must retain the above copyright\n *    notice, this list of conditions and the following disclaimer.\n *\n * 2. Redistributions in binary form must reproduce the above copyright\n *    notice, this list of conditions and the following disclaimer in\n *    the documentation and/or other materials provided with the\n *    distribution.\n *\n * 3. All advertising materials mentioning features or use of this\n *    software must display the following acknowledgment:\n *    \"This product includes software developed by the OpenSSL Project\n *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)\"\n *\n * 4. The names \"OpenSSL Toolkit\" and \"OpenSSL Project\" must not be used to\n *    endorse or promote products derived from this software without\n *    prior written permission. For written permission, please contact\n *    openssl-core@openssl.org.\n *\n * 5. Products derived from this software may not be called \"OpenSSL\"\n *    nor may \"OpenSSL\" appear in their names without prior written\n *    permission of the OpenSSL Project.\n *\n * 6. Redistributions of any form whatsoever must retain the following\n *    acknowledgment:\n *    \"This product includes software developed by the OpenSSL Project\n *    for use in the OpenSSL Toolkit (http://www.openssl.org/)\"\n *\n * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY\n * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\n * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR\n * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,\n * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED\n * OF THE POSSIBILITY OF SUCH DAMAGE.\n * ====================================================================\n *\n * This product includes cryptographic software written by Eric Young\n * (eay@cryptsoft.com).  This product includes software written by Tim\n * Hudson (tjh@cryptsoft.com).\n *\n */\n/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)\n * All rights reserved.\n *\n * This package is an SSL implementation written\n * by Eric Young (eay@cryptsoft.com).\n * The implementation was written so as to conform with Netscapes SSL.\n *\n * This library is free for commercial and non-commercial use as long as\n * the following conditions are aheared to.  The following conditions\n * apply to all code found in this distribution, be it the RC4, RSA,\n * lhash, DES, etc., code; not just the SSL code.  The SSL documentation\n * included with this distribution is covered by the same copyright terms\n * except that the holder is Tim Hudson (tjh@cryptsoft.com).\n *\n * Copyright remains Eric Young's, and as such any Copyright notices in\n * the code are not to be removed.\n * If this package is used in a product, Eric Young should be given attribution\n * as the author of the parts of the library used.\n * This can be in the form of a textual message at program startup or\n * in documentation (online or textual) provided with the package.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n * 1. Redistributions of source code must retain the copyright\n *    notice, this list of conditions and the following disclaimer.\n * 2. Redistributions in binary form must reproduce the above copyright\n *    notice, this list of conditions and the following disclaimer in the\n *    documentation and/or other materials provided with the distribution.\n * 3. All advertising materials mentioning features or use of this software\n *    must display the following acknowledgement:\n *    \"This product includes cryptographic software written by\n *     Eric Young (eay@cryptsoft.com)\"\n *    The word 'cryptographic' can be left out if the rouines from the library\n *    being used are not cryptographic related :-).\n * 4. If you include any Windows specific code (or a derivative thereof) from\n *    the apps directory (application code) you must include an acknowledgement:\n *    \"This product includes software written by Tim Hudson (tjh@cryptsoft.com)\"\n *\n * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND\n * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE\n * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n * SUCH DAMAGE.\n *\n * The licence and distribution terms for any publically available version or\n * derivative of this code cannot be changed.  i.e. this code cannot simply be\n * copied and put under another distribution licence\n * [including the GNU Public Licence.]\n */\n/* ====================================================================\n * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED.\n * ECDH support in OpenSSL originally developed by\n * SUN MICROSYSTEMS, INC., and contributed to the OpenSSL project.\n */\n\n#ifndef HEADER_CRYPTO_H\n# define HEADER_CRYPTO_H\n\n# include <stdlib.h>\n\n# include <openssl/e_os2.h>\n\n# ifndef OPENSSL_NO_FP_API\n#  include <stdio.h>\n# endif\n\n# include <openssl/stack.h>\n# include <openssl/safestack.h>\n# include <openssl/opensslv.h>\n# include <openssl/ossl_typ.h>\n\n# ifdef CHARSET_EBCDIC\n#  include <openssl/ebcdic.h>\n# endif\n\n/*\n * Resolve problems on some operating systems with symbol names that clash\n * one way or another\n */\n# include <openssl/symhacks.h>\n\n#ifdef  __cplusplus\nextern \"C\" {\n#endif\n\n/* Backward compatibility to SSLeay */\n/*\n * This is more to be used to check the correct DLL is being used in the MS\n * world.\n */\n# define SSLEAY_VERSION_NUMBER   OPENSSL_VERSION_NUMBER\n# define SSLEAY_VERSION          0\n/* #define SSLEAY_OPTIONS       1 no longer supported */\n# define SSLEAY_CFLAGS           2\n# define SSLEAY_BUILT_ON         3\n# define SSLEAY_PLATFORM         4\n# define SSLEAY_DIR              5\n\n/* Already declared in ossl_typ.h */\n# if 0\ntypedef struct crypto_ex_data_st CRYPTO_EX_DATA;\n/* Called when a new object is created */\ntypedef int CRYPTO_EX_new (void *parent, void *ptr, CRYPTO_EX_DATA *ad,\n                           int idx, long argl, void *argp);\n/* Called when an object is free()ed */\ntypedef void CRYPTO_EX_free (void *parent, void *ptr, CRYPTO_EX_DATA *ad,\n                             int idx, long argl, void *argp);\n/* Called when we need to dup an object */\ntypedef int CRYPTO_EX_dup (CRYPTO_EX_DATA *to, CRYPTO_EX_DATA *from,\n                           void *from_d, int idx, long argl, void *argp);\n# endif\n\n/* A generic structure to pass assorted data in a expandable way */\ntypedef struct openssl_item_st {\n    int code;\n    void *value;                /* Not used for flag attributes */\n    size_t value_size;          /* Max size of value for output, length for\n                                 * input */\n    size_t *value_length;       /* Returned length of value for output */\n} OPENSSL_ITEM;\n\n/*\n * When changing the CRYPTO_LOCK_* list, be sure to maintin the text lock\n * names in cryptlib.c\n */\n\n# define CRYPTO_LOCK_ERR                 1\n# define CRYPTO_LOCK_EX_DATA             2\n# define CRYPTO_LOCK_X509                3\n# define CRYPTO_LOCK_X509_INFO           4\n# define CRYPTO_LOCK_X509_PKEY           5\n# define CRYPTO_LOCK_X509_CRL            6\n# define CRYPTO_LOCK_X509_REQ            7\n# define CRYPTO_LOCK_DSA                 8\n# define CRYPTO_LOCK_RSA                 9\n# define CRYPTO_LOCK_EVP_PKEY            10\n# define CRYPTO_LOCK_X509_STORE          11\n# define CRYPTO_LOCK_SSL_CTX             12\n# define CRYPTO_LOCK_SSL_CERT            13\n# define CRYPTO_LOCK_SSL_SESSION         14\n# define CRYPTO_LOCK_SSL_SESS_CERT       15\n# define CRYPTO_LOCK_SSL                 16\n# define CRYPTO_LOCK_SSL_METHOD          17\n# define CRYPTO_LOCK_RAND                18\n# define CRYPTO_LOCK_RAND2               19\n# define CRYPTO_LOCK_MALLOC              20\n# define CRYPTO_LOCK_BIO                 21\n# define CRYPTO_LOCK_GETHOSTBYNAME       22\n# define CRYPTO_LOCK_GETSERVBYNAME       23\n# define CRYPTO_LOCK_READDIR             24\n# define CRYPTO_LOCK_RSA_BLINDING        25\n# define CRYPTO_LOCK_DH                  26\n# define CRYPTO_LOCK_MALLOC2             27\n# define CRYPTO_LOCK_DSO                 28\n# define CRYPTO_LOCK_DYNLOCK             29\n# define CRYPTO_LOCK_ENGINE              30\n# define CRYPTO_LOCK_UI                  31\n# define CRYPTO_LOCK_ECDSA               32\n# define CRYPTO_LOCK_EC                  33\n# define CRYPTO_LOCK_ECDH                34\n# define CRYPTO_LOCK_BN                  35\n# define CRYPTO_LOCK_EC_PRE_COMP         36\n# define CRYPTO_LOCK_STORE               37\n# define CRYPTO_LOCK_COMP                38\n# define CRYPTO_LOCK_FIPS                39\n# define CRYPTO_LOCK_FIPS2               40\n# define CRYPTO_NUM_LOCKS                41\n\n# define CRYPTO_LOCK             1\n# define CRYPTO_UNLOCK           2\n# define CRYPTO_READ             4\n# define CRYPTO_WRITE            8\n\n# ifndef OPENSSL_NO_LOCKING\n#  ifndef CRYPTO_w_lock\n#   define CRYPTO_w_lock(type)     \\\n        CRYPTO_lock(CRYPTO_LOCK|CRYPTO_WRITE,type,__FILE__,__LINE__)\n#   define CRYPTO_w_unlock(type)   \\\n        CRYPTO_lock(CRYPTO_UNLOCK|CRYPTO_WRITE,type,__FILE__,__LINE__)\n#   define CRYPTO_r_lock(type)     \\\n        CRYPTO_lock(CRYPTO_LOCK|CRYPTO_READ,type,__FILE__,__LINE__)\n#   define CRYPTO_r_unlock(type)   \\\n        CRYPTO_lock(CRYPTO_UNLOCK|CRYPTO_READ,type,__FILE__,__LINE__)\n#   define CRYPTO_add(addr,amount,type)    \\\n        CRYPTO_add_lock(addr,amount,type,__FILE__,__LINE__)\n#  endif\n# else\n#  define CRYPTO_w_lock(a)\n#  define CRYPTO_w_unlock(a)\n#  define CRYPTO_r_lock(a)\n#  define CRYPTO_r_unlock(a)\n#  define CRYPTO_add(a,b,c)       ((*(a))+=(b))\n# endif\n\n/*\n * Some applications as well as some parts of OpenSSL need to allocate and\n * deallocate locks in a dynamic fashion.  The following typedef makes this\n * possible in a type-safe manner.\n */\n/* struct CRYPTO_dynlock_value has to be defined by the application. */\ntypedef struct {\n    int references;\n    struct CRYPTO_dynlock_value *data;\n} CRYPTO_dynlock;\n\n/*\n * The following can be used to detect memory leaks in the SSLeay library. It\n * used, it turns on malloc checking\n */\n\n# define CRYPTO_MEM_CHECK_OFF    0x0/* an enume */\n# define CRYPTO_MEM_CHECK_ON     0x1/* a bit */\n# define CRYPTO_MEM_CHECK_ENABLE 0x2/* a bit */\n# define CRYPTO_MEM_CHECK_DISABLE 0x3/* an enume */\n\n/*\n * The following are bit values to turn on or off options connected to the\n * malloc checking functionality\n */\n\n/* Adds time to the memory checking information */\n# define V_CRYPTO_MDEBUG_TIME    0x1/* a bit */\n/* Adds thread number to the memory checking information */\n# define V_CRYPTO_MDEBUG_THREAD  0x2/* a bit */\n\n# define V_CRYPTO_MDEBUG_ALL (V_CRYPTO_MDEBUG_TIME | V_CRYPTO_MDEBUG_THREAD)\n\n/* predec of the BIO type */\ntypedef struct bio_st BIO_dummy;\n\nstruct crypto_ex_data_st {\n    STACK_OF(void) *sk;\n    /* gcc is screwing up this data structure :-( */\n    int dummy;\n};\nDECLARE_STACK_OF(void)\n\n/*\n * This stuff is basically class callback functions The current classes are\n * SSL_CTX, SSL, SSL_SESSION, and a few more\n */\n\ntypedef struct crypto_ex_data_func_st {\n    long argl;                  /* Arbitary long */\n    void *argp;                 /* Arbitary void * */\n    CRYPTO_EX_new *new_func;\n    CRYPTO_EX_free *free_func;\n    CRYPTO_EX_dup *dup_func;\n} CRYPTO_EX_DATA_FUNCS;\n\nDECLARE_STACK_OF(CRYPTO_EX_DATA_FUNCS)\n\n/*\n * Per class, we have a STACK of CRYPTO_EX_DATA_FUNCS for each CRYPTO_EX_DATA\n * entry.\n */\n\n# define CRYPTO_EX_INDEX_BIO             0\n# define CRYPTO_EX_INDEX_SSL             1\n# define CRYPTO_EX_INDEX_SSL_CTX         2\n# define CRYPTO_EX_INDEX_SSL_SESSION     3\n# define CRYPTO_EX_INDEX_X509_STORE      4\n# define CRYPTO_EX_INDEX_X509_STORE_CTX  5\n# define CRYPTO_EX_INDEX_RSA             6\n# define CRYPTO_EX_INDEX_DSA             7\n# define CRYPTO_EX_INDEX_DH              8\n# define CRYPTO_EX_INDEX_ENGINE          9\n# define CRYPTO_EX_INDEX_X509            10\n# define CRYPTO_EX_INDEX_UI              11\n# define CRYPTO_EX_INDEX_ECDSA           12\n# define CRYPTO_EX_INDEX_ECDH            13\n# define CRYPTO_EX_INDEX_COMP            14\n# define CRYPTO_EX_INDEX_STORE           15\n\n/*\n * Dynamically assigned indexes start from this value (don't use directly,\n * use via CRYPTO_ex_data_new_class).\n */\n# define CRYPTO_EX_INDEX_USER            100\n\n/*\n * This is the default callbacks, but we can have others as well: this is\n * needed in Win32 where the application malloc and the library malloc may\n * not be the same.\n */\n# define CRYPTO_malloc_init()    CRYPTO_set_mem_functions(\\\n        malloc, realloc, free)\n\n# if defined CRYPTO_MDEBUG_ALL || defined CRYPTO_MDEBUG_TIME || defined CRYPTO_MDEBUG_THREAD\n#  ifndef CRYPTO_MDEBUG         /* avoid duplicate #define */\n#   define CRYPTO_MDEBUG\n#  endif\n# endif\n\n/*\n * Set standard debugging functions (not done by default unless CRYPTO_MDEBUG\n * is defined)\n */\n# define CRYPTO_malloc_debug_init()      do {\\\n        CRYPTO_set_mem_debug_functions(\\\n                CRYPTO_dbg_malloc,\\\n                CRYPTO_dbg_realloc,\\\n                CRYPTO_dbg_free,\\\n                CRYPTO_dbg_set_options,\\\n                CRYPTO_dbg_get_options);\\\n        } while(0)\n\nint CRYPTO_mem_ctrl(int mode);\nint CRYPTO_is_mem_check_on(void);\n\n/* for applications */\n# define MemCheck_start() CRYPTO_mem_ctrl(CRYPTO_MEM_CHECK_ON)\n# define MemCheck_stop() CRYPTO_mem_ctrl(CRYPTO_MEM_CHECK_OFF)\n\n/* for library-internal use */\n# define MemCheck_on()   CRYPTO_mem_ctrl(CRYPTO_MEM_CHECK_ENABLE)\n# define MemCheck_off()  CRYPTO_mem_ctrl(CRYPTO_MEM_CHECK_DISABLE)\n# define is_MemCheck_on() CRYPTO_is_mem_check_on()\n\n# define OPENSSL_malloc(num)     CRYPTO_malloc((int)num,__FILE__,__LINE__)\n# define OPENSSL_strdup(str)     CRYPTO_strdup((str),__FILE__,__LINE__)\n# define OPENSSL_realloc(addr,num) \\\n        CRYPTO_realloc((char *)addr,(int)num,__FILE__,__LINE__)\n# define OPENSSL_realloc_clean(addr,old_num,num) \\\n        CRYPTO_realloc_clean(addr,old_num,num,__FILE__,__LINE__)\n# define OPENSSL_remalloc(addr,num) \\\n        CRYPTO_remalloc((char **)addr,(int)num,__FILE__,__LINE__)\n# define OPENSSL_freeFunc        CRYPTO_free\n# define OPENSSL_free(addr)      CRYPTO_free(addr)\n\n# define OPENSSL_malloc_locked(num) \\\n        CRYPTO_malloc_locked((int)num,__FILE__,__LINE__)\n# define OPENSSL_free_locked(addr) CRYPTO_free_locked(addr)\n\nconst char *SSLeay_version(int type);\nunsigned long SSLeay(void);\n\nint OPENSSL_issetugid(void);\n\n/* An opaque type representing an implementation of \"ex_data\" support */\ntypedef struct st_CRYPTO_EX_DATA_IMPL CRYPTO_EX_DATA_IMPL;\n/* Return an opaque pointer to the current \"ex_data\" implementation */\nconst CRYPTO_EX_DATA_IMPL *CRYPTO_get_ex_data_implementation(void);\n/* Sets the \"ex_data\" implementation to be used (if it's not too late) */\nint CRYPTO_set_ex_data_implementation(const CRYPTO_EX_DATA_IMPL *i);\n/* Get a new \"ex_data\" class, and return the corresponding \"class_index\" */\nint CRYPTO_ex_data_new_class(void);\n/* Within a given class, get/register a new index */\nint CRYPTO_get_ex_new_index(int class_index, long argl, void *argp,\n                            CRYPTO_EX_new *new_func, CRYPTO_EX_dup *dup_func,\n                            CRYPTO_EX_free *free_func);\n/*\n * Initialise/duplicate/free CRYPTO_EX_DATA variables corresponding to a\n * given class (invokes whatever per-class callbacks are applicable)\n */\nint CRYPTO_new_ex_data(int class_index, void *obj, CRYPTO_EX_DATA *ad);\nint CRYPTO_dup_ex_data(int class_index, CRYPTO_EX_DATA *to,\n                       CRYPTO_EX_DATA *from);\nvoid CRYPTO_free_ex_data(int class_index, void *obj, CRYPTO_EX_DATA *ad);\n/*\n * Get/set data in a CRYPTO_EX_DATA variable corresponding to a particular\n * index (relative to the class type involved)\n */\nint CRYPTO_set_ex_data(CRYPTO_EX_DATA *ad, int idx, void *val);\nvoid *CRYPTO_get_ex_data(const CRYPTO_EX_DATA *ad, int idx);\n/*\n * This function cleans up all \"ex_data\" state. It mustn't be called under\n * potential race-conditions.\n */\nvoid CRYPTO_cleanup_all_ex_data(void);\n\nint CRYPTO_get_new_lockid(char *name);\n\nint CRYPTO_num_locks(void);     /* return CRYPTO_NUM_LOCKS (shared libs!) */\nvoid CRYPTO_lock(int mode, int type, const char *file, int line);\nvoid CRYPTO_set_locking_callback(void (*func) (int mode, int type,\n                                               const char *file, int line));\nvoid (*CRYPTO_get_locking_callback(void)) (int mode, int type,\n                                           const char *file, int line);\nvoid CRYPTO_set_add_lock_callback(int (*func)\n                                   (int *num, int mount, int type,\n                                    const char *file, int line));\nint (*CRYPTO_get_add_lock_callback(void)) (int *num, int mount, int type,\n                                           const char *file, int line);\n\n/* Don't use this structure directly. */\ntypedef struct crypto_threadid_st {\n    void *ptr;\n    unsigned long val;\n} CRYPTO_THREADID;\n/* Only use CRYPTO_THREADID_set_[numeric|pointer]() within callbacks */\nvoid CRYPTO_THREADID_set_numeric(CRYPTO_THREADID *id, unsigned long val);\nvoid CRYPTO_THREADID_set_pointer(CRYPTO_THREADID *id, void *ptr);\nint CRYPTO_THREADID_set_callback(void (*threadid_func) (CRYPTO_THREADID *));\nvoid (*CRYPTO_THREADID_get_callback(void)) (CRYPTO_THREADID *);\nvoid CRYPTO_THREADID_current(CRYPTO_THREADID *id);\nint CRYPTO_THREADID_cmp(const CRYPTO_THREADID *a, const CRYPTO_THREADID *b);\nvoid CRYPTO_THREADID_cpy(CRYPTO_THREADID *dest, const CRYPTO_THREADID *src);\nunsigned long CRYPTO_THREADID_hash(const CRYPTO_THREADID *id);\n# ifndef OPENSSL_NO_DEPRECATED\nvoid CRYPTO_set_id_callback(unsigned long (*func) (void));\nunsigned long (*CRYPTO_get_id_callback(void)) (void);\nunsigned long CRYPTO_thread_id(void);\n# endif\n\nconst char *CRYPTO_get_lock_name(int type);\nint CRYPTO_add_lock(int *pointer, int amount, int type, const char *file,\n                    int line);\n\nint CRYPTO_get_new_dynlockid(void);\nvoid CRYPTO_destroy_dynlockid(int i);\nstruct CRYPTO_dynlock_value *CRYPTO_get_dynlock_value(int i);\nvoid CRYPTO_set_dynlock_create_callback(struct CRYPTO_dynlock_value\n                                        *(*dyn_create_function) (const char\n                                                                 *file,\n                                                                 int line));\nvoid CRYPTO_set_dynlock_lock_callback(void (*dyn_lock_function)\n                                       (int mode,\n                                        struct CRYPTO_dynlock_value *l,\n                                        const char *file, int line));\nvoid CRYPTO_set_dynlock_destroy_callback(void (*dyn_destroy_function)\n                                          (struct CRYPTO_dynlock_value *l,\n                                           const char *file, int line));\nstruct CRYPTO_dynlock_value\n*(*CRYPTO_get_dynlock_create_callback(void)) (const char *file, int line);\nvoid (*CRYPTO_get_dynlock_lock_callback(void)) (int mode,\n                                                struct CRYPTO_dynlock_value\n                                                *l, const char *file,\n                                                int line);\nvoid (*CRYPTO_get_dynlock_destroy_callback(void)) (struct CRYPTO_dynlock_value\n                                                   *l, const char *file,\n                                                   int line);\n\n/*\n * CRYPTO_set_mem_functions includes CRYPTO_set_locked_mem_functions -- call\n * the latter last if you need different functions\n */\nint CRYPTO_set_mem_functions(void *(*m) (size_t), void *(*r) (void *, size_t),\n                             void (*f) (void *));\nint CRYPTO_set_locked_mem_functions(void *(*m) (size_t),\n                                    void (*free_func) (void *));\nint CRYPTO_set_mem_ex_functions(void *(*m) (size_t, const char *, int),\n                                void *(*r) (void *, size_t, const char *,\n                                            int), void (*f) (void *));\nint CRYPTO_set_locked_mem_ex_functions(void *(*m) (size_t, const char *, int),\n                                       void (*free_func) (void *));\nint CRYPTO_set_mem_debug_functions(void (*m)\n                                    (void *, int, const char *, int, int),\n                                   void (*r) (void *, void *, int,\n                                              const char *, int, int),\n                                   void (*f) (void *, int), void (*so) (long),\n                                   long (*go) (void));\nvoid CRYPTO_get_mem_functions(void *(**m) (size_t),\n                              void *(**r) (void *, size_t),\n                              void (**f) (void *));\nvoid CRYPTO_get_locked_mem_functions(void *(**m) (size_t),\n                                     void (**f) (void *));\nvoid CRYPTO_get_mem_ex_functions(void *(**m) (size_t, const char *, int),\n                                 void *(**r) (void *, size_t, const char *,\n                                              int), void (**f) (void *));\nvoid CRYPTO_get_locked_mem_ex_functions(void\n                                        *(**m) (size_t, const char *, int),\n                                        void (**f) (void *));\nvoid CRYPTO_get_mem_debug_functions(void (**m)\n                                     (void *, int, const char *, int, int),\n                                    void (**r) (void *, void *, int,\n                                                const char *, int, int),\n                                    void (**f) (void *, int),\n                                    void (**so) (long), long (**go) (void));\n\nvoid *CRYPTO_malloc_locked(int num, const char *file, int line);\nvoid CRYPTO_free_locked(void *ptr);\nvoid *CRYPTO_malloc(int num, const char *file, int line);\nchar *CRYPTO_strdup(const char *str, const char *file, int line);\nvoid CRYPTO_free(void *ptr);\nvoid *CRYPTO_realloc(void *addr, int num, const char *file, int line);\nvoid *CRYPTO_realloc_clean(void *addr, int old_num, int num, const char *file,\n                           int line);\nvoid *CRYPTO_remalloc(void *addr, int num, const char *file, int line);\n\nvoid OPENSSL_cleanse(void *ptr, size_t len);\n\nvoid CRYPTO_set_mem_debug_options(long bits);\nlong CRYPTO_get_mem_debug_options(void);\n\n# define CRYPTO_push_info(info) \\\n        CRYPTO_push_info_(info, __FILE__, __LINE__);\nint CRYPTO_push_info_(const char *info, const char *file, int line);\nint CRYPTO_pop_info(void);\nint CRYPTO_remove_all_info(void);\n\n/*\n * Default debugging functions (enabled by CRYPTO_malloc_debug_init() macro;\n * used as default in CRYPTO_MDEBUG compilations):\n */\n/*-\n * The last argument has the following significance:\n *\n * 0:   called before the actual memory allocation has taken place\n * 1:   called after the actual memory allocation has taken place\n */\nvoid CRYPTO_dbg_malloc(void *addr, int num, const char *file, int line,\n                       int before_p);\nvoid CRYPTO_dbg_realloc(void *addr1, void *addr2, int num, const char *file,\n                        int line, int before_p);\nvoid CRYPTO_dbg_free(void *addr, int before_p);\n/*-\n * Tell the debugging code about options.  By default, the following values\n * apply:\n *\n * 0:                           Clear all options.\n * V_CRYPTO_MDEBUG_TIME (1):    Set the \"Show Time\" option.\n * V_CRYPTO_MDEBUG_THREAD (2):  Set the \"Show Thread Number\" option.\n * V_CRYPTO_MDEBUG_ALL (3):     1 + 2\n */\nvoid CRYPTO_dbg_set_options(long bits);\nlong CRYPTO_dbg_get_options(void);\n\n# ifndef OPENSSL_NO_FP_API\nvoid CRYPTO_mem_leaks_fp(FILE *);\n# endif\nvoid CRYPTO_mem_leaks(struct bio_st *bio);\n/* unsigned long order, char *file, int line, int num_bytes, char *addr */\ntypedef void *CRYPTO_MEM_LEAK_CB (unsigned long, const char *, int, int,\n                                  void *);\nvoid CRYPTO_mem_leaks_cb(CRYPTO_MEM_LEAK_CB *cb);\n\n/* die if we have to */\nvoid OpenSSLDie(const char *file, int line, const char *assertion);\n# define OPENSSL_assert(e)       (void)((e) ? 0 : (OpenSSLDie(__FILE__, __LINE__, #e),1))\n\nunsigned long *OPENSSL_ia32cap_loc(void);\n# define OPENSSL_ia32cap (*(OPENSSL_ia32cap_loc()))\nint OPENSSL_isservice(void);\n\nint FIPS_mode(void);\nint FIPS_mode_set(int r);\n\nvoid OPENSSL_init(void);\n\n# define fips_md_init(alg) fips_md_init_ctx(alg, alg)\n\n# ifdef OPENSSL_FIPS\n#  define fips_md_init_ctx(alg, cx) \\\n        int alg##_Init(cx##_CTX *c) \\\n        { \\\n        if (FIPS_mode()) OpenSSLDie(__FILE__, __LINE__, \\\n                \"Low level API call to digest \" #alg \" forbidden in FIPS mode!\"); \\\n        return private_##alg##_Init(c); \\\n        } \\\n        int private_##alg##_Init(cx##_CTX *c)\n\n#  define fips_cipher_abort(alg) \\\n        if (FIPS_mode()) OpenSSLDie(__FILE__, __LINE__, \\\n                \"Low level API call to cipher \" #alg \" forbidden in FIPS mode!\")\n\n# else\n#  define fips_md_init_ctx(alg, cx) \\\n        int alg##_Init(cx##_CTX *c)\n#  define fips_cipher_abort(alg) while(0)\n# endif\n\n/*\n * CRYPTO_memcmp returns zero iff the |len| bytes at |a| and |b| are equal.\n * It takes an amount of time dependent on |len|, but independent of the\n * contents of |a| and |b|. Unlike memcmp, it cannot be used to put elements\n * into a defined order as the return value when a != b is undefined, other\n * than to be non-zero.\n */\nint CRYPTO_memcmp(const void *a, const void *b, size_t len);\n\n/* BEGIN ERROR CODES */\n/*\n * The following lines are auto generated by the script mkerr.pl. Any changes\n * made after this point may be overwritten when the script is next run.\n */\nvoid ERR_load_CRYPTO_strings(void);\n\n/* Error codes for the CRYPTO functions. */\n\n/* Function codes. */\n# define CRYPTO_F_CRYPTO_GET_EX_NEW_INDEX                 100\n# define CRYPTO_F_CRYPTO_GET_NEW_DYNLOCKID                103\n# define CRYPTO_F_CRYPTO_GET_NEW_LOCKID                   101\n# define CRYPTO_F_CRYPTO_SET_EX_DATA                      102\n# define CRYPTO_F_DEF_ADD_INDEX                           104\n# define CRYPTO_F_DEF_GET_CLASS                           105\n# define CRYPTO_F_FIPS_MODE_SET                           109\n# define CRYPTO_F_INT_DUP_EX_DATA                         106\n# define CRYPTO_F_INT_FREE_EX_DATA                        107\n# define CRYPTO_F_INT_NEW_EX_DATA                         108\n\n/* Reason codes. */\n# define CRYPTO_R_FIPS_MODE_NOT_SUPPORTED                 101\n# define CRYPTO_R_NO_DYNLOCK_CREATE_CALLBACK              100\n\n#ifdef  __cplusplus\n}\n#endif\n#endif\n"
  },
  {
    "path": "Pods/OpenSSL-Universal/include-ios/openssl/des.h",
    "content": "/* crypto/des/des.h */\n/* Copyright (C) 1995-1997 Eric Young (eay@cryptsoft.com)\n * All rights reserved.\n *\n * This package is an SSL implementation written\n * by Eric Young (eay@cryptsoft.com).\n * The implementation was written so as to conform with Netscapes SSL.\n *\n * This library is free for commercial and non-commercial use as long as\n * the following conditions are aheared to.  The following conditions\n * apply to all code found in this distribution, be it the RC4, RSA,\n * lhash, DES, etc., code; not just the SSL code.  The SSL documentation\n * included with this distribution is covered by the same copyright terms\n * except that the holder is Tim Hudson (tjh@cryptsoft.com).\n *\n * Copyright remains Eric Young's, and as such any Copyright notices in\n * the code are not to be removed.\n * If this package is used in a product, Eric Young should be given attribution\n * as the author of the parts of the library used.\n * This can be in the form of a textual message at program startup or\n * in documentation (online or textual) provided with the package.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n * 1. Redistributions of source code must retain the copyright\n *    notice, this list of conditions and the following disclaimer.\n * 2. Redistributions in binary form must reproduce the above copyright\n *    notice, this list of conditions and the following disclaimer in the\n *    documentation and/or other materials provided with the distribution.\n * 3. All advertising materials mentioning features or use of this software\n *    must display the following acknowledgement:\n *    \"This product includes cryptographic software written by\n *     Eric Young (eay@cryptsoft.com)\"\n *    The word 'cryptographic' can be left out if the rouines from the library\n *    being used are not cryptographic related :-).\n * 4. If you include any Windows specific code (or a derivative thereof) from\n *    the apps directory (application code) you must include an acknowledgement:\n *    \"This product includes software written by Tim Hudson (tjh@cryptsoft.com)\"\n *\n * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND\n * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE\n * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n * SUCH DAMAGE.\n *\n * The licence and distribution terms for any publically available version or\n * derivative of this code cannot be changed.  i.e. this code cannot simply be\n * copied and put under another distribution licence\n * [including the GNU Public Licence.]\n */\n\n#ifndef HEADER_NEW_DES_H\n# define HEADER_NEW_DES_H\n\n# include <openssl/e_os2.h>     /* OPENSSL_EXTERN, OPENSSL_NO_DES, DES_LONG\n                                 * (via openssl/opensslconf.h */\n\n# ifdef OPENSSL_NO_DES\n#  error DES is disabled.\n# endif\n\n# ifdef OPENSSL_BUILD_SHLIBCRYPTO\n#  undef OPENSSL_EXTERN\n#  define OPENSSL_EXTERN OPENSSL_EXPORT\n# endif\n\n#ifdef  __cplusplus\nextern \"C\" {\n#endif\n\ntypedef unsigned char DES_cblock[8];\ntypedef /* const */ unsigned char const_DES_cblock[8];\n/*\n * With \"const\", gcc 2.8.1 on Solaris thinks that DES_cblock * and\n * const_DES_cblock * are incompatible pointer types.\n */\n\ntypedef struct DES_ks {\n    union {\n        DES_cblock cblock;\n        /*\n         * make sure things are correct size on machines with 8 byte longs\n         */\n        DES_LONG deslong[2];\n    } ks[16];\n} DES_key_schedule;\n\n# ifndef OPENSSL_DISABLE_OLD_DES_SUPPORT\n#  ifndef OPENSSL_ENABLE_OLD_DES_SUPPORT\n#   define OPENSSL_ENABLE_OLD_DES_SUPPORT\n#  endif\n# endif\n\n# ifdef OPENSSL_ENABLE_OLD_DES_SUPPORT\n#  include <openssl/des_old.h>\n# endif\n\n# define DES_KEY_SZ      (sizeof(DES_cblock))\n# define DES_SCHEDULE_SZ (sizeof(DES_key_schedule))\n\n# define DES_ENCRYPT     1\n# define DES_DECRYPT     0\n\n# define DES_CBC_MODE    0\n# define DES_PCBC_MODE   1\n\n# define DES_ecb2_encrypt(i,o,k1,k2,e) \\\n        DES_ecb3_encrypt((i),(o),(k1),(k2),(k1),(e))\n\n# define DES_ede2_cbc_encrypt(i,o,l,k1,k2,iv,e) \\\n        DES_ede3_cbc_encrypt((i),(o),(l),(k1),(k2),(k1),(iv),(e))\n\n# define DES_ede2_cfb64_encrypt(i,o,l,k1,k2,iv,n,e) \\\n        DES_ede3_cfb64_encrypt((i),(o),(l),(k1),(k2),(k1),(iv),(n),(e))\n\n# define DES_ede2_ofb64_encrypt(i,o,l,k1,k2,iv,n) \\\n        DES_ede3_ofb64_encrypt((i),(o),(l),(k1),(k2),(k1),(iv),(n))\n\nOPENSSL_DECLARE_GLOBAL(int, DES_check_key); /* defaults to false */\n# define DES_check_key OPENSSL_GLOBAL_REF(DES_check_key)\nOPENSSL_DECLARE_GLOBAL(int, DES_rw_mode); /* defaults to DES_PCBC_MODE */\n# define DES_rw_mode OPENSSL_GLOBAL_REF(DES_rw_mode)\n\nconst char *DES_options(void);\nvoid DES_ecb3_encrypt(const_DES_cblock *input, DES_cblock *output,\n                      DES_key_schedule *ks1, DES_key_schedule *ks2,\n                      DES_key_schedule *ks3, int enc);\nDES_LONG DES_cbc_cksum(const unsigned char *input, DES_cblock *output,\n                       long length, DES_key_schedule *schedule,\n                       const_DES_cblock *ivec);\n/* DES_cbc_encrypt does not update the IV!  Use DES_ncbc_encrypt instead. */\nvoid DES_cbc_encrypt(const unsigned char *input, unsigned char *output,\n                     long length, DES_key_schedule *schedule,\n                     DES_cblock *ivec, int enc);\nvoid DES_ncbc_encrypt(const unsigned char *input, unsigned char *output,\n                      long length, DES_key_schedule *schedule,\n                      DES_cblock *ivec, int enc);\nvoid DES_xcbc_encrypt(const unsigned char *input, unsigned char *output,\n                      long length, DES_key_schedule *schedule,\n                      DES_cblock *ivec, const_DES_cblock *inw,\n                      const_DES_cblock *outw, int enc);\nvoid DES_cfb_encrypt(const unsigned char *in, unsigned char *out, int numbits,\n                     long length, DES_key_schedule *schedule,\n                     DES_cblock *ivec, int enc);\nvoid DES_ecb_encrypt(const_DES_cblock *input, DES_cblock *output,\n                     DES_key_schedule *ks, int enc);\n\n/*\n * This is the DES encryption function that gets called by just about every\n * other DES routine in the library.  You should not use this function except\n * to implement 'modes' of DES.  I say this because the functions that call\n * this routine do the conversion from 'char *' to long, and this needs to be\n * done to make sure 'non-aligned' memory access do not occur.  The\n * characters are loaded 'little endian'. Data is a pointer to 2 unsigned\n * long's and ks is the DES_key_schedule to use.  enc, is non zero specifies\n * encryption, zero if decryption.\n */\nvoid DES_encrypt1(DES_LONG *data, DES_key_schedule *ks, int enc);\n\n/*\n * This functions is the same as DES_encrypt1() except that the DES initial\n * permutation (IP) and final permutation (FP) have been left out.  As for\n * DES_encrypt1(), you should not use this function. It is used by the\n * routines in the library that implement triple DES. IP() DES_encrypt2()\n * DES_encrypt2() DES_encrypt2() FP() is the same as DES_encrypt1()\n * DES_encrypt1() DES_encrypt1() except faster :-).\n */\nvoid DES_encrypt2(DES_LONG *data, DES_key_schedule *ks, int enc);\n\nvoid DES_encrypt3(DES_LONG *data, DES_key_schedule *ks1,\n                  DES_key_schedule *ks2, DES_key_schedule *ks3);\nvoid DES_decrypt3(DES_LONG *data, DES_key_schedule *ks1,\n                  DES_key_schedule *ks2, DES_key_schedule *ks3);\nvoid DES_ede3_cbc_encrypt(const unsigned char *input, unsigned char *output,\n                          long length,\n                          DES_key_schedule *ks1, DES_key_schedule *ks2,\n                          DES_key_schedule *ks3, DES_cblock *ivec, int enc);\nvoid DES_ede3_cbcm_encrypt(const unsigned char *in, unsigned char *out,\n                           long length,\n                           DES_key_schedule *ks1, DES_key_schedule *ks2,\n                           DES_key_schedule *ks3,\n                           DES_cblock *ivec1, DES_cblock *ivec2, int enc);\nvoid DES_ede3_cfb64_encrypt(const unsigned char *in, unsigned char *out,\n                            long length, DES_key_schedule *ks1,\n                            DES_key_schedule *ks2, DES_key_schedule *ks3,\n                            DES_cblock *ivec, int *num, int enc);\nvoid DES_ede3_cfb_encrypt(const unsigned char *in, unsigned char *out,\n                          int numbits, long length, DES_key_schedule *ks1,\n                          DES_key_schedule *ks2, DES_key_schedule *ks3,\n                          DES_cblock *ivec, int enc);\nvoid DES_ede3_ofb64_encrypt(const unsigned char *in, unsigned char *out,\n                            long length, DES_key_schedule *ks1,\n                            DES_key_schedule *ks2, DES_key_schedule *ks3,\n                            DES_cblock *ivec, int *num);\n# if 0\nvoid DES_xwhite_in2out(const_DES_cblock *DES_key, const_DES_cblock *in_white,\n                       DES_cblock *out_white);\n# endif\n\nint DES_enc_read(int fd, void *buf, int len, DES_key_schedule *sched,\n                 DES_cblock *iv);\nint DES_enc_write(int fd, const void *buf, int len, DES_key_schedule *sched,\n                  DES_cblock *iv);\nchar *DES_fcrypt(const char *buf, const char *salt, char *ret);\nchar *DES_crypt(const char *buf, const char *salt);\nvoid DES_ofb_encrypt(const unsigned char *in, unsigned char *out, int numbits,\n                     long length, DES_key_schedule *schedule,\n                     DES_cblock *ivec);\nvoid DES_pcbc_encrypt(const unsigned char *input, unsigned char *output,\n                      long length, DES_key_schedule *schedule,\n                      DES_cblock *ivec, int enc);\nDES_LONG DES_quad_cksum(const unsigned char *input, DES_cblock output[],\n                        long length, int out_count, DES_cblock *seed);\nint DES_random_key(DES_cblock *ret);\nvoid DES_set_odd_parity(DES_cblock *key);\nint DES_check_key_parity(const_DES_cblock *key);\nint DES_is_weak_key(const_DES_cblock *key);\n/*\n * DES_set_key (= set_key = DES_key_sched = key_sched) calls\n * DES_set_key_checked if global variable DES_check_key is set,\n * DES_set_key_unchecked otherwise.\n */\nint DES_set_key(const_DES_cblock *key, DES_key_schedule *schedule);\nint DES_key_sched(const_DES_cblock *key, DES_key_schedule *schedule);\nint DES_set_key_checked(const_DES_cblock *key, DES_key_schedule *schedule);\nvoid DES_set_key_unchecked(const_DES_cblock *key, DES_key_schedule *schedule);\n# ifdef OPENSSL_FIPS\nvoid private_DES_set_key_unchecked(const_DES_cblock *key,\n                                   DES_key_schedule *schedule);\n# endif\nvoid DES_string_to_key(const char *str, DES_cblock *key);\nvoid DES_string_to_2keys(const char *str, DES_cblock *key1, DES_cblock *key2);\nvoid DES_cfb64_encrypt(const unsigned char *in, unsigned char *out,\n                       long length, DES_key_schedule *schedule,\n                       DES_cblock *ivec, int *num, int enc);\nvoid DES_ofb64_encrypt(const unsigned char *in, unsigned char *out,\n                       long length, DES_key_schedule *schedule,\n                       DES_cblock *ivec, int *num);\n\nint DES_read_password(DES_cblock *key, const char *prompt, int verify);\nint DES_read_2passwords(DES_cblock *key1, DES_cblock *key2,\n                        const char *prompt, int verify);\n\n# define DES_fixup_key_parity DES_set_odd_parity\n\n#ifdef  __cplusplus\n}\n#endif\n\n#endif\n"
  },
  {
    "path": "Pods/OpenSSL-Universal/include-ios/openssl/des_old.h",
    "content": "/* crypto/des/des_old.h -*- mode:C; c-file-style: \"eay\" -*- */\n\n/*-\n * WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING\n *\n * The function names in here are deprecated and are only present to\n * provide an interface compatible with openssl 0.9.6 and older as\n * well as libdes.  OpenSSL now provides functions where \"des_\" has\n * been replaced with \"DES_\" in the names, to make it possible to\n * make incompatible changes that are needed for C type security and\n * other stuff.\n *\n * This include files has two compatibility modes:\n *\n *   - If OPENSSL_DES_LIBDES_COMPATIBILITY is defined, you get an API\n *     that is compatible with libdes and SSLeay.\n *   - If OPENSSL_DES_LIBDES_COMPATIBILITY isn't defined, you get an\n *     API that is compatible with OpenSSL 0.9.5x to 0.9.6x.\n *\n * Note that these modes break earlier snapshots of OpenSSL, where\n * libdes compatibility was the only available mode or (later on) the\n * prefered compatibility mode.  However, after much consideration\n * (and more or less violent discussions with external parties), it\n * was concluded that OpenSSL should be compatible with earlier versions\n * of itself before anything else.  Also, in all honesty, libdes is\n * an old beast that shouldn't really be used any more.\n *\n * Please consider starting to use the DES_ functions rather than the\n * des_ ones.  The des_ functions will disappear completely before\n * OpenSSL 1.0!\n *\n * WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING\n */\n\n/*\n * Written by Richard Levitte (richard@levitte.org) for the OpenSSL project\n * 2001.\n */\n/* ====================================================================\n * Copyright (c) 1998-2002 The OpenSSL Project.  All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n *\n * 1. Redistributions of source code must retain the above copyright\n *    notice, this list of conditions and the following disclaimer.\n *\n * 2. Redistributions in binary form must reproduce the above copyright\n *    notice, this list of conditions and the following disclaimer in\n *    the documentation and/or other materials provided with the\n *    distribution.\n *\n * 3. All advertising materials mentioning features or use of this\n *    software must display the following acknowledgment:\n *    \"This product includes software developed by the OpenSSL Project\n *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)\"\n *\n * 4. The names \"OpenSSL Toolkit\" and \"OpenSSL Project\" must not be used to\n *    endorse or promote products derived from this software without\n *    prior written permission. For written permission, please contact\n *    openssl-core@openssl.org.\n *\n * 5. Products derived from this software may not be called \"OpenSSL\"\n *    nor may \"OpenSSL\" appear in their names without prior written\n *    permission of the OpenSSL Project.\n *\n * 6. Redistributions of any form whatsoever must retain the following\n *    acknowledgment:\n *    \"This product includes software developed by the OpenSSL Project\n *    for use in the OpenSSL Toolkit (http://www.openssl.org/)\"\n *\n * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY\n * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\n * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR\n * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,\n * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED\n * OF THE POSSIBILITY OF SUCH DAMAGE.\n * ====================================================================\n *\n * This product includes cryptographic software written by Eric Young\n * (eay@cryptsoft.com).  This product includes software written by Tim\n * Hudson (tjh@cryptsoft.com).\n *\n */\n\n#ifndef HEADER_DES_H\n# define HEADER_DES_H\n\n# include <openssl/e_os2.h>     /* OPENSSL_EXTERN, OPENSSL_NO_DES, DES_LONG */\n\n# ifdef OPENSSL_NO_DES\n#  error DES is disabled.\n# endif\n\n# ifndef HEADER_NEW_DES_H\n#  error You must include des.h, not des_old.h directly.\n# endif\n\n# ifdef _KERBEROS_DES_H\n#  error <openssl/des_old.h> replaces <kerberos/des.h>.\n# endif\n\n# include <openssl/symhacks.h>\n\n# ifdef OPENSSL_BUILD_SHLIBCRYPTO\n#  undef OPENSSL_EXTERN\n#  define OPENSSL_EXTERN OPENSSL_EXPORT\n# endif\n\n#ifdef  __cplusplus\nextern \"C\" {\n#endif\n\n# ifdef _\n#  undef _\n# endif\n\ntypedef unsigned char _ossl_old_des_cblock[8];\ntypedef struct _ossl_old_des_ks_struct {\n    union {\n        _ossl_old_des_cblock _;\n        /*\n         * make sure things are correct size on machines with 8 byte longs\n         */\n        DES_LONG pad[2];\n    } ks;\n} _ossl_old_des_key_schedule[16];\n\n# ifndef OPENSSL_DES_LIBDES_COMPATIBILITY\n#  define des_cblock DES_cblock\n#  define const_des_cblock const_DES_cblock\n#  define des_key_schedule DES_key_schedule\n#  define des_ecb3_encrypt(i,o,k1,k2,k3,e)\\\n        DES_ecb3_encrypt((i),(o),&(k1),&(k2),&(k3),(e))\n#  define des_ede3_cbc_encrypt(i,o,l,k1,k2,k3,iv,e)\\\n        DES_ede3_cbc_encrypt((i),(o),(l),&(k1),&(k2),&(k3),(iv),(e))\n#  define des_ede3_cbcm_encrypt(i,o,l,k1,k2,k3,iv1,iv2,e)\\\n        DES_ede3_cbcm_encrypt((i),(o),(l),&(k1),&(k2),&(k3),(iv1),(iv2),(e))\n#  define des_ede3_cfb64_encrypt(i,o,l,k1,k2,k3,iv,n,e)\\\n        DES_ede3_cfb64_encrypt((i),(o),(l),&(k1),&(k2),&(k3),(iv),(n),(e))\n#  define des_ede3_ofb64_encrypt(i,o,l,k1,k2,k3,iv,n)\\\n        DES_ede3_ofb64_encrypt((i),(o),(l),&(k1),&(k2),&(k3),(iv),(n))\n#  define des_options()\\\n        DES_options()\n#  define des_cbc_cksum(i,o,l,k,iv)\\\n        DES_cbc_cksum((i),(o),(l),&(k),(iv))\n#  define des_cbc_encrypt(i,o,l,k,iv,e)\\\n        DES_cbc_encrypt((i),(o),(l),&(k),(iv),(e))\n#  define des_ncbc_encrypt(i,o,l,k,iv,e)\\\n        DES_ncbc_encrypt((i),(o),(l),&(k),(iv),(e))\n#  define des_xcbc_encrypt(i,o,l,k,iv,inw,outw,e)\\\n        DES_xcbc_encrypt((i),(o),(l),&(k),(iv),(inw),(outw),(e))\n#  define des_cfb_encrypt(i,o,n,l,k,iv,e)\\\n        DES_cfb_encrypt((i),(o),(n),(l),&(k),(iv),(e))\n#  define des_ecb_encrypt(i,o,k,e)\\\n        DES_ecb_encrypt((i),(o),&(k),(e))\n#  define des_encrypt1(d,k,e)\\\n        DES_encrypt1((d),&(k),(e))\n#  define des_encrypt2(d,k,e)\\\n        DES_encrypt2((d),&(k),(e))\n#  define des_encrypt3(d,k1,k2,k3)\\\n        DES_encrypt3((d),&(k1),&(k2),&(k3))\n#  define des_decrypt3(d,k1,k2,k3)\\\n        DES_decrypt3((d),&(k1),&(k2),&(k3))\n#  define des_xwhite_in2out(k,i,o)\\\n        DES_xwhite_in2out((k),(i),(o))\n#  define des_enc_read(f,b,l,k,iv)\\\n        DES_enc_read((f),(b),(l),&(k),(iv))\n#  define des_enc_write(f,b,l,k,iv)\\\n        DES_enc_write((f),(b),(l),&(k),(iv))\n#  define des_fcrypt(b,s,r)\\\n        DES_fcrypt((b),(s),(r))\n#  if 0\n#   define des_crypt(b,s)\\\n        DES_crypt((b),(s))\n#   if !defined(PERL5) && !defined(__FreeBSD__) && !defined(NeXT) && !defined(__OpenBSD__)\n#    define crypt(b,s)\\\n        DES_crypt((b),(s))\n#   endif\n#  endif\n#  define des_ofb_encrypt(i,o,n,l,k,iv)\\\n        DES_ofb_encrypt((i),(o),(n),(l),&(k),(iv))\n#  define des_pcbc_encrypt(i,o,l,k,iv,e)\\\n        DES_pcbc_encrypt((i),(o),(l),&(k),(iv),(e))\n#  define des_quad_cksum(i,o,l,c,s)\\\n        DES_quad_cksum((i),(o),(l),(c),(s))\n#  define des_random_seed(k)\\\n        _ossl_096_des_random_seed((k))\n#  define des_random_key(r)\\\n        DES_random_key((r))\n#  define des_read_password(k,p,v) \\\n        DES_read_password((k),(p),(v))\n#  define des_read_2passwords(k1,k2,p,v) \\\n        DES_read_2passwords((k1),(k2),(p),(v))\n#  define des_set_odd_parity(k)\\\n        DES_set_odd_parity((k))\n#  define des_check_key_parity(k)\\\n        DES_check_key_parity((k))\n#  define des_is_weak_key(k)\\\n        DES_is_weak_key((k))\n#  define des_set_key(k,ks)\\\n        DES_set_key((k),&(ks))\n#  define des_key_sched(k,ks)\\\n        DES_key_sched((k),&(ks))\n#  define des_set_key_checked(k,ks)\\\n        DES_set_key_checked((k),&(ks))\n#  define des_set_key_unchecked(k,ks)\\\n        DES_set_key_unchecked((k),&(ks))\n#  define des_string_to_key(s,k)\\\n        DES_string_to_key((s),(k))\n#  define des_string_to_2keys(s,k1,k2)\\\n        DES_string_to_2keys((s),(k1),(k2))\n#  define des_cfb64_encrypt(i,o,l,ks,iv,n,e)\\\n        DES_cfb64_encrypt((i),(o),(l),&(ks),(iv),(n),(e))\n#  define des_ofb64_encrypt(i,o,l,ks,iv,n)\\\n        DES_ofb64_encrypt((i),(o),(l),&(ks),(iv),(n))\n\n#  define des_ecb2_encrypt(i,o,k1,k2,e) \\\n        des_ecb3_encrypt((i),(o),(k1),(k2),(k1),(e))\n\n#  define des_ede2_cbc_encrypt(i,o,l,k1,k2,iv,e) \\\n        des_ede3_cbc_encrypt((i),(o),(l),(k1),(k2),(k1),(iv),(e))\n\n#  define des_ede2_cfb64_encrypt(i,o,l,k1,k2,iv,n,e) \\\n        des_ede3_cfb64_encrypt((i),(o),(l),(k1),(k2),(k1),(iv),(n),(e))\n\n#  define des_ede2_ofb64_encrypt(i,o,l,k1,k2,iv,n) \\\n        des_ede3_ofb64_encrypt((i),(o),(l),(k1),(k2),(k1),(iv),(n))\n\n#  define des_check_key DES_check_key\n#  define des_rw_mode DES_rw_mode\n# else                          /* libdes compatibility */\n/*\n * Map all symbol names to _ossl_old_des_* form, so we avoid all clashes with\n * libdes\n */\n#  define des_cblock _ossl_old_des_cblock\n#  define des_key_schedule _ossl_old_des_key_schedule\n#  define des_ecb3_encrypt(i,o,k1,k2,k3,e)\\\n        _ossl_old_des_ecb3_encrypt((i),(o),(k1),(k2),(k3),(e))\n#  define des_ede3_cbc_encrypt(i,o,l,k1,k2,k3,iv,e)\\\n        _ossl_old_des_ede3_cbc_encrypt((i),(o),(l),(k1),(k2),(k3),(iv),(e))\n#  define des_ede3_cfb64_encrypt(i,o,l,k1,k2,k3,iv,n,e)\\\n        _ossl_old_des_ede3_cfb64_encrypt((i),(o),(l),(k1),(k2),(k3),(iv),(n),(e))\n#  define des_ede3_ofb64_encrypt(i,o,l,k1,k2,k3,iv,n)\\\n        _ossl_old_des_ede3_ofb64_encrypt((i),(o),(l),(k1),(k2),(k3),(iv),(n))\n#  define des_options()\\\n        _ossl_old_des_options()\n#  define des_cbc_cksum(i,o,l,k,iv)\\\n        _ossl_old_des_cbc_cksum((i),(o),(l),(k),(iv))\n#  define des_cbc_encrypt(i,o,l,k,iv,e)\\\n        _ossl_old_des_cbc_encrypt((i),(o),(l),(k),(iv),(e))\n#  define des_ncbc_encrypt(i,o,l,k,iv,e)\\\n        _ossl_old_des_ncbc_encrypt((i),(o),(l),(k),(iv),(e))\n#  define des_xcbc_encrypt(i,o,l,k,iv,inw,outw,e)\\\n        _ossl_old_des_xcbc_encrypt((i),(o),(l),(k),(iv),(inw),(outw),(e))\n#  define des_cfb_encrypt(i,o,n,l,k,iv,e)\\\n        _ossl_old_des_cfb_encrypt((i),(o),(n),(l),(k),(iv),(e))\n#  define des_ecb_encrypt(i,o,k,e)\\\n        _ossl_old_des_ecb_encrypt((i),(o),(k),(e))\n#  define des_encrypt(d,k,e)\\\n        _ossl_old_des_encrypt((d),(k),(e))\n#  define des_encrypt2(d,k,e)\\\n        _ossl_old_des_encrypt2((d),(k),(e))\n#  define des_encrypt3(d,k1,k2,k3)\\\n        _ossl_old_des_encrypt3((d),(k1),(k2),(k3))\n#  define des_decrypt3(d,k1,k2,k3)\\\n        _ossl_old_des_decrypt3((d),(k1),(k2),(k3))\n#  define des_xwhite_in2out(k,i,o)\\\n        _ossl_old_des_xwhite_in2out((k),(i),(o))\n#  define des_enc_read(f,b,l,k,iv)\\\n        _ossl_old_des_enc_read((f),(b),(l),(k),(iv))\n#  define des_enc_write(f,b,l,k,iv)\\\n        _ossl_old_des_enc_write((f),(b),(l),(k),(iv))\n#  define des_fcrypt(b,s,r)\\\n        _ossl_old_des_fcrypt((b),(s),(r))\n#  define des_crypt(b,s)\\\n        _ossl_old_des_crypt((b),(s))\n#  if 0\n#   define crypt(b,s)\\\n        _ossl_old_crypt((b),(s))\n#  endif\n#  define des_ofb_encrypt(i,o,n,l,k,iv)\\\n        _ossl_old_des_ofb_encrypt((i),(o),(n),(l),(k),(iv))\n#  define des_pcbc_encrypt(i,o,l,k,iv,e)\\\n        _ossl_old_des_pcbc_encrypt((i),(o),(l),(k),(iv),(e))\n#  define des_quad_cksum(i,o,l,c,s)\\\n        _ossl_old_des_quad_cksum((i),(o),(l),(c),(s))\n#  define des_random_seed(k)\\\n        _ossl_old_des_random_seed((k))\n#  define des_random_key(r)\\\n        _ossl_old_des_random_key((r))\n#  define des_read_password(k,p,v) \\\n        _ossl_old_des_read_password((k),(p),(v))\n#  define des_read_2passwords(k1,k2,p,v) \\\n        _ossl_old_des_read_2passwords((k1),(k2),(p),(v))\n#  define des_set_odd_parity(k)\\\n        _ossl_old_des_set_odd_parity((k))\n#  define des_is_weak_key(k)\\\n        _ossl_old_des_is_weak_key((k))\n#  define des_set_key(k,ks)\\\n        _ossl_old_des_set_key((k),(ks))\n#  define des_key_sched(k,ks)\\\n        _ossl_old_des_key_sched((k),(ks))\n#  define des_string_to_key(s,k)\\\n        _ossl_old_des_string_to_key((s),(k))\n#  define des_string_to_2keys(s,k1,k2)\\\n        _ossl_old_des_string_to_2keys((s),(k1),(k2))\n#  define des_cfb64_encrypt(i,o,l,ks,iv,n,e)\\\n        _ossl_old_des_cfb64_encrypt((i),(o),(l),(ks),(iv),(n),(e))\n#  define des_ofb64_encrypt(i,o,l,ks,iv,n)\\\n        _ossl_old_des_ofb64_encrypt((i),(o),(l),(ks),(iv),(n))\n\n#  define des_ecb2_encrypt(i,o,k1,k2,e) \\\n        des_ecb3_encrypt((i),(o),(k1),(k2),(k1),(e))\n\n#  define des_ede2_cbc_encrypt(i,o,l,k1,k2,iv,e) \\\n        des_ede3_cbc_encrypt((i),(o),(l),(k1),(k2),(k1),(iv),(e))\n\n#  define des_ede2_cfb64_encrypt(i,o,l,k1,k2,iv,n,e) \\\n        des_ede3_cfb64_encrypt((i),(o),(l),(k1),(k2),(k1),(iv),(n),(e))\n\n#  define des_ede2_ofb64_encrypt(i,o,l,k1,k2,iv,n) \\\n        des_ede3_ofb64_encrypt((i),(o),(l),(k1),(k2),(k1),(iv),(n))\n\n#  define des_check_key DES_check_key\n#  define des_rw_mode DES_rw_mode\n# endif\n\nconst char *_ossl_old_des_options(void);\nvoid _ossl_old_des_ecb3_encrypt(_ossl_old_des_cblock *input,\n                                _ossl_old_des_cblock *output,\n                                _ossl_old_des_key_schedule ks1,\n                                _ossl_old_des_key_schedule ks2,\n                                _ossl_old_des_key_schedule ks3, int enc);\nDES_LONG _ossl_old_des_cbc_cksum(_ossl_old_des_cblock *input,\n                                 _ossl_old_des_cblock *output, long length,\n                                 _ossl_old_des_key_schedule schedule,\n                                 _ossl_old_des_cblock *ivec);\nvoid _ossl_old_des_cbc_encrypt(_ossl_old_des_cblock *input,\n                               _ossl_old_des_cblock *output, long length,\n                               _ossl_old_des_key_schedule schedule,\n                               _ossl_old_des_cblock *ivec, int enc);\nvoid _ossl_old_des_ncbc_encrypt(_ossl_old_des_cblock *input,\n                                _ossl_old_des_cblock *output, long length,\n                                _ossl_old_des_key_schedule schedule,\n                                _ossl_old_des_cblock *ivec, int enc);\nvoid _ossl_old_des_xcbc_encrypt(_ossl_old_des_cblock *input,\n                                _ossl_old_des_cblock *output, long length,\n                                _ossl_old_des_key_schedule schedule,\n                                _ossl_old_des_cblock *ivec,\n                                _ossl_old_des_cblock *inw,\n                                _ossl_old_des_cblock *outw, int enc);\nvoid _ossl_old_des_cfb_encrypt(unsigned char *in, unsigned char *out,\n                               int numbits, long length,\n                               _ossl_old_des_key_schedule schedule,\n                               _ossl_old_des_cblock *ivec, int enc);\nvoid _ossl_old_des_ecb_encrypt(_ossl_old_des_cblock *input,\n                               _ossl_old_des_cblock *output,\n                               _ossl_old_des_key_schedule ks, int enc);\nvoid _ossl_old_des_encrypt(DES_LONG *data, _ossl_old_des_key_schedule ks,\n                           int enc);\nvoid _ossl_old_des_encrypt2(DES_LONG *data, _ossl_old_des_key_schedule ks,\n                            int enc);\nvoid _ossl_old_des_encrypt3(DES_LONG *data, _ossl_old_des_key_schedule ks1,\n                            _ossl_old_des_key_schedule ks2,\n                            _ossl_old_des_key_schedule ks3);\nvoid _ossl_old_des_decrypt3(DES_LONG *data, _ossl_old_des_key_schedule ks1,\n                            _ossl_old_des_key_schedule ks2,\n                            _ossl_old_des_key_schedule ks3);\nvoid _ossl_old_des_ede3_cbc_encrypt(_ossl_old_des_cblock *input,\n                                    _ossl_old_des_cblock *output, long length,\n                                    _ossl_old_des_key_schedule ks1,\n                                    _ossl_old_des_key_schedule ks2,\n                                    _ossl_old_des_key_schedule ks3,\n                                    _ossl_old_des_cblock *ivec, int enc);\nvoid _ossl_old_des_ede3_cfb64_encrypt(unsigned char *in, unsigned char *out,\n                                      long length,\n                                      _ossl_old_des_key_schedule ks1,\n                                      _ossl_old_des_key_schedule ks2,\n                                      _ossl_old_des_key_schedule ks3,\n                                      _ossl_old_des_cblock *ivec, int *num,\n                                      int enc);\nvoid _ossl_old_des_ede3_ofb64_encrypt(unsigned char *in, unsigned char *out,\n                                      long length,\n                                      _ossl_old_des_key_schedule ks1,\n                                      _ossl_old_des_key_schedule ks2,\n                                      _ossl_old_des_key_schedule ks3,\n                                      _ossl_old_des_cblock *ivec, int *num);\n# if 0\nvoid _ossl_old_des_xwhite_in2out(_ossl_old_des_cblock (*des_key),\n                                 _ossl_old_des_cblock (*in_white),\n                                 _ossl_old_des_cblock (*out_white));\n# endif\n\nint _ossl_old_des_enc_read(int fd, char *buf, int len,\n                           _ossl_old_des_key_schedule sched,\n                           _ossl_old_des_cblock *iv);\nint _ossl_old_des_enc_write(int fd, char *buf, int len,\n                            _ossl_old_des_key_schedule sched,\n                            _ossl_old_des_cblock *iv);\nchar *_ossl_old_des_fcrypt(const char *buf, const char *salt, char *ret);\nchar *_ossl_old_des_crypt(const char *buf, const char *salt);\n# if !defined(PERL5) && !defined(NeXT)\nchar *_ossl_old_crypt(const char *buf, const char *salt);\n# endif\nvoid _ossl_old_des_ofb_encrypt(unsigned char *in, unsigned char *out,\n                               int numbits, long length,\n                               _ossl_old_des_key_schedule schedule,\n                               _ossl_old_des_cblock *ivec);\nvoid _ossl_old_des_pcbc_encrypt(_ossl_old_des_cblock *input,\n                                _ossl_old_des_cblock *output, long length,\n                                _ossl_old_des_key_schedule schedule,\n                                _ossl_old_des_cblock *ivec, int enc);\nDES_LONG _ossl_old_des_quad_cksum(_ossl_old_des_cblock *input,\n                                  _ossl_old_des_cblock *output, long length,\n                                  int out_count, _ossl_old_des_cblock *seed);\nvoid _ossl_old_des_random_seed(_ossl_old_des_cblock key);\nvoid _ossl_old_des_random_key(_ossl_old_des_cblock ret);\nint _ossl_old_des_read_password(_ossl_old_des_cblock *key, const char *prompt,\n                                int verify);\nint _ossl_old_des_read_2passwords(_ossl_old_des_cblock *key1,\n                                  _ossl_old_des_cblock *key2,\n                                  const char *prompt, int verify);\nvoid _ossl_old_des_set_odd_parity(_ossl_old_des_cblock *key);\nint _ossl_old_des_is_weak_key(_ossl_old_des_cblock *key);\nint _ossl_old_des_set_key(_ossl_old_des_cblock *key,\n                          _ossl_old_des_key_schedule schedule);\nint _ossl_old_des_key_sched(_ossl_old_des_cblock *key,\n                            _ossl_old_des_key_schedule schedule);\nvoid _ossl_old_des_string_to_key(char *str, _ossl_old_des_cblock *key);\nvoid _ossl_old_des_string_to_2keys(char *str, _ossl_old_des_cblock *key1,\n                                   _ossl_old_des_cblock *key2);\nvoid _ossl_old_des_cfb64_encrypt(unsigned char *in, unsigned char *out,\n                                 long length,\n                                 _ossl_old_des_key_schedule schedule,\n                                 _ossl_old_des_cblock *ivec, int *num,\n                                 int enc);\nvoid _ossl_old_des_ofb64_encrypt(unsigned char *in, unsigned char *out,\n                                 long length,\n                                 _ossl_old_des_key_schedule schedule,\n                                 _ossl_old_des_cblock *ivec, int *num);\n\nvoid _ossl_096_des_random_seed(des_cblock *key);\n\n/*\n * The following definitions provide compatibility with the MIT Kerberos\n * library. The _ossl_old_des_key_schedule structure is not binary\n * compatible.\n */\n\n# define _KERBEROS_DES_H\n\n# define KRBDES_ENCRYPT DES_ENCRYPT\n# define KRBDES_DECRYPT DES_DECRYPT\n\n# ifdef KERBEROS\n#  define ENCRYPT DES_ENCRYPT\n#  define DECRYPT DES_DECRYPT\n# endif\n\n# ifndef NCOMPAT\n#  define C_Block des_cblock\n#  define Key_schedule des_key_schedule\n#  define KEY_SZ DES_KEY_SZ\n#  define string_to_key des_string_to_key\n#  define read_pw_string des_read_pw_string\n#  define random_key des_random_key\n#  define pcbc_encrypt des_pcbc_encrypt\n#  define set_key des_set_key\n#  define key_sched des_key_sched\n#  define ecb_encrypt des_ecb_encrypt\n#  define cbc_encrypt des_cbc_encrypt\n#  define ncbc_encrypt des_ncbc_encrypt\n#  define xcbc_encrypt des_xcbc_encrypt\n#  define cbc_cksum des_cbc_cksum\n#  define quad_cksum des_quad_cksum\n#  define check_parity des_check_key_parity\n# endif\n\n# define des_fixup_key_parity DES_fixup_key_parity\n\n#ifdef  __cplusplus\n}\n#endif\n\n/* for DES_read_pw_string et al */\n# include <openssl/ui_compat.h>\n\n#endif\n"
  },
  {
    "path": "Pods/OpenSSL-Universal/include-ios/openssl/dh.h",
    "content": "/* crypto/dh/dh.h */\n/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)\n * All rights reserved.\n *\n * This package is an SSL implementation written\n * by Eric Young (eay@cryptsoft.com).\n * The implementation was written so as to conform with Netscapes SSL.\n *\n * This library is free for commercial and non-commercial use as long as\n * the following conditions are aheared to.  The following conditions\n * apply to all code found in this distribution, be it the RC4, RSA,\n * lhash, DES, etc., code; not just the SSL code.  The SSL documentation\n * included with this distribution is covered by the same copyright terms\n * except that the holder is Tim Hudson (tjh@cryptsoft.com).\n *\n * Copyright remains Eric Young's, and as such any Copyright notices in\n * the code are not to be removed.\n * If this package is used in a product, Eric Young should be given attribution\n * as the author of the parts of the library used.\n * This can be in the form of a textual message at program startup or\n * in documentation (online or textual) provided with the package.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n * 1. Redistributions of source code must retain the copyright\n *    notice, this list of conditions and the following disclaimer.\n * 2. Redistributions in binary form must reproduce the above copyright\n *    notice, this list of conditions and the following disclaimer in the\n *    documentation and/or other materials provided with the distribution.\n * 3. All advertising materials mentioning features or use of this software\n *    must display the following acknowledgement:\n *    \"This product includes cryptographic software written by\n *     Eric Young (eay@cryptsoft.com)\"\n *    The word 'cryptographic' can be left out if the rouines from the library\n *    being used are not cryptographic related :-).\n * 4. If you include any Windows specific code (or a derivative thereof) from\n *    the apps directory (application code) you must include an acknowledgement:\n *    \"This product includes software written by Tim Hudson (tjh@cryptsoft.com)\"\n *\n * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND\n * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE\n * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n * SUCH DAMAGE.\n *\n * The licence and distribution terms for any publically available version or\n * derivative of this code cannot be changed.  i.e. this code cannot simply be\n * copied and put under another distribution licence\n * [including the GNU Public Licence.]\n */\n\n#ifndef HEADER_DH_H\n# define HEADER_DH_H\n\n# include <openssl/e_os2.h>\n\n# ifdef OPENSSL_NO_DH\n#  error DH is disabled.\n# endif\n\n# ifndef OPENSSL_NO_BIO\n#  include <openssl/bio.h>\n# endif\n# include <openssl/ossl_typ.h>\n# ifndef OPENSSL_NO_DEPRECATED\n#  include <openssl/bn.h>\n# endif\n\n# ifndef OPENSSL_DH_MAX_MODULUS_BITS\n#  define OPENSSL_DH_MAX_MODULUS_BITS    10000\n# endif\n\n# define DH_FLAG_CACHE_MONT_P     0x01\n\n/*\n * new with 0.9.7h; the built-in DH\n * implementation now uses constant time\n * modular exponentiation for secret exponents\n * by default. This flag causes the\n * faster variable sliding window method to\n * be used for all exponents.\n */\n# define DH_FLAG_NO_EXP_CONSTTIME 0x02\n\n/*\n * If this flag is set the DH method is FIPS compliant and can be used in\n * FIPS mode. This is set in the validated module method. If an application\n * sets this flag in its own methods it is its reposibility to ensure the\n * result is compliant.\n */\n\n# define DH_FLAG_FIPS_METHOD                     0x0400\n\n/*\n * If this flag is set the operations normally disabled in FIPS mode are\n * permitted it is then the applications responsibility to ensure that the\n * usage is compliant.\n */\n\n# define DH_FLAG_NON_FIPS_ALLOW                  0x0400\n\n#ifdef  __cplusplus\nextern \"C\" {\n#endif\n\n/* Already defined in ossl_typ.h */\n/* typedef struct dh_st DH; */\n/* typedef struct dh_method DH_METHOD; */\n\nstruct dh_method {\n    const char *name;\n    /* Methods here */\n    int (*generate_key) (DH *dh);\n    int (*compute_key) (unsigned char *key, const BIGNUM *pub_key, DH *dh);\n    /* Can be null */\n    int (*bn_mod_exp) (const DH *dh, BIGNUM *r, const BIGNUM *a,\n                       const BIGNUM *p, const BIGNUM *m, BN_CTX *ctx,\n                       BN_MONT_CTX *m_ctx);\n    int (*init) (DH *dh);\n    int (*finish) (DH *dh);\n    int flags;\n    char *app_data;\n    /* If this is non-NULL, it will be used to generate parameters */\n    int (*generate_params) (DH *dh, int prime_len, int generator,\n                            BN_GENCB *cb);\n};\n\nstruct dh_st {\n    /*\n     * This first argument is used to pick up errors when a DH is passed\n     * instead of a EVP_PKEY\n     */\n    int pad;\n    int version;\n    BIGNUM *p;\n    BIGNUM *g;\n    long length;                /* optional */\n    BIGNUM *pub_key;            /* g^x */\n    BIGNUM *priv_key;           /* x */\n    int flags;\n    BN_MONT_CTX *method_mont_p;\n    /* Place holders if we want to do X9.42 DH */\n    BIGNUM *q;\n    BIGNUM *j;\n    unsigned char *seed;\n    int seedlen;\n    BIGNUM *counter;\n    int references;\n    CRYPTO_EX_DATA ex_data;\n    const DH_METHOD *meth;\n    ENGINE *engine;\n};\n\n# define DH_GENERATOR_2          2\n/* #define DH_GENERATOR_3       3 */\n# define DH_GENERATOR_5          5\n\n/* DH_check error codes */\n# define DH_CHECK_P_NOT_PRIME            0x01\n# define DH_CHECK_P_NOT_SAFE_PRIME       0x02\n# define DH_UNABLE_TO_CHECK_GENERATOR    0x04\n# define DH_NOT_SUITABLE_GENERATOR       0x08\n\n/* DH_check_pub_key error codes */\n# define DH_CHECK_PUBKEY_TOO_SMALL       0x01\n# define DH_CHECK_PUBKEY_TOO_LARGE       0x02\n\n/*\n * primes p where (p-1)/2 is prime too are called \"safe\"; we define this for\n * backward compatibility:\n */\n# define DH_CHECK_P_NOT_STRONG_PRIME     DH_CHECK_P_NOT_SAFE_PRIME\n\n# define d2i_DHparams_fp(fp,x) (DH *)ASN1_d2i_fp((char *(*)())DH_new, \\\n                (char *(*)())d2i_DHparams,(fp),(unsigned char **)(x))\n# define i2d_DHparams_fp(fp,x) ASN1_i2d_fp(i2d_DHparams,(fp), \\\n                (unsigned char *)(x))\n# define d2i_DHparams_bio(bp,x) ASN1_d2i_bio_of(DH,DH_new,d2i_DHparams,bp,x)\n# define i2d_DHparams_bio(bp,x) ASN1_i2d_bio_of_const(DH,i2d_DHparams,bp,x)\n\nDH *DHparams_dup(DH *);\n\nconst DH_METHOD *DH_OpenSSL(void);\n\nvoid DH_set_default_method(const DH_METHOD *meth);\nconst DH_METHOD *DH_get_default_method(void);\nint DH_set_method(DH *dh, const DH_METHOD *meth);\nDH *DH_new_method(ENGINE *engine);\n\nDH *DH_new(void);\nvoid DH_free(DH *dh);\nint DH_up_ref(DH *dh);\nint DH_size(const DH *dh);\nint DH_get_ex_new_index(long argl, void *argp, CRYPTO_EX_new *new_func,\n                        CRYPTO_EX_dup *dup_func, CRYPTO_EX_free *free_func);\nint DH_set_ex_data(DH *d, int idx, void *arg);\nvoid *DH_get_ex_data(DH *d, int idx);\n\n/* Deprecated version */\n# ifndef OPENSSL_NO_DEPRECATED\nDH *DH_generate_parameters(int prime_len, int generator,\n                           void (*callback) (int, int, void *), void *cb_arg);\n# endif                         /* !defined(OPENSSL_NO_DEPRECATED) */\n\n/* New version */\nint DH_generate_parameters_ex(DH *dh, int prime_len, int generator,\n                              BN_GENCB *cb);\n\nint DH_check(const DH *dh, int *codes);\nint DH_check_pub_key(const DH *dh, const BIGNUM *pub_key, int *codes);\nint DH_generate_key(DH *dh);\nint DH_compute_key(unsigned char *key, const BIGNUM *pub_key, DH *dh);\nDH *d2i_DHparams(DH **a, const unsigned char **pp, long length);\nint i2d_DHparams(const DH *a, unsigned char **pp);\n# ifndef OPENSSL_NO_FP_API\nint DHparams_print_fp(FILE *fp, const DH *x);\n# endif\n# ifndef OPENSSL_NO_BIO\nint DHparams_print(BIO *bp, const DH *x);\n# else\nint DHparams_print(char *bp, const DH *x);\n# endif\n\n# define EVP_PKEY_CTX_set_dh_paramgen_prime_len(ctx, len) \\\n        EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_DH, EVP_PKEY_OP_PARAMGEN, \\\n                        EVP_PKEY_CTRL_DH_PARAMGEN_PRIME_LEN, len, NULL)\n\n# define EVP_PKEY_CTX_set_dh_paramgen_generator(ctx, gen) \\\n        EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_DH, EVP_PKEY_OP_PARAMGEN, \\\n                        EVP_PKEY_CTRL_DH_PARAMGEN_GENERATOR, gen, NULL)\n\n# define EVP_PKEY_CTRL_DH_PARAMGEN_PRIME_LEN     (EVP_PKEY_ALG_CTRL + 1)\n# define EVP_PKEY_CTRL_DH_PARAMGEN_GENERATOR     (EVP_PKEY_ALG_CTRL + 2)\n\n/* BEGIN ERROR CODES */\n/*\n * The following lines are auto generated by the script mkerr.pl. Any changes\n * made after this point may be overwritten when the script is next run.\n */\nvoid ERR_load_DH_strings(void);\n\n/* Error codes for the DH functions. */\n\n/* Function codes. */\n# define DH_F_COMPUTE_KEY                                 102\n# define DH_F_DHPARAMS_PRINT_FP                           101\n# define DH_F_DH_BUILTIN_GENPARAMS                        106\n# define DH_F_DH_COMPUTE_KEY                              114\n# define DH_F_DH_GENERATE_KEY                             115\n# define DH_F_DH_GENERATE_PARAMETERS_EX                   116\n# define DH_F_DH_NEW_METHOD                               105\n# define DH_F_DH_PARAM_DECODE                             107\n# define DH_F_DH_PRIV_DECODE                              110\n# define DH_F_DH_PRIV_ENCODE                              111\n# define DH_F_DH_PUB_DECODE                               108\n# define DH_F_DH_PUB_ENCODE                               109\n# define DH_F_DO_DH_PRINT                                 100\n# define DH_F_GENERATE_KEY                                103\n# define DH_F_GENERATE_PARAMETERS                         104\n# define DH_F_PKEY_DH_DERIVE                              112\n# define DH_F_PKEY_DH_KEYGEN                              113\n\n/* Reason codes. */\n# define DH_R_BAD_GENERATOR                               101\n# define DH_R_BN_DECODE_ERROR                             109\n# define DH_R_BN_ERROR                                    106\n# define DH_R_DECODE_ERROR                                104\n# define DH_R_INVALID_PUBKEY                              102\n# define DH_R_KEYS_NOT_SET                                108\n# define DH_R_KEY_SIZE_TOO_SMALL                          110\n# define DH_R_MODULUS_TOO_LARGE                           103\n# define DH_R_NON_FIPS_METHOD                             111\n# define DH_R_NO_PARAMETERS_SET                           107\n# define DH_R_NO_PRIVATE_VALUE                            100\n# define DH_R_PARAMETER_ENCODING_ERROR                    105\n\n#ifdef  __cplusplus\n}\n#endif\n#endif\n"
  },
  {
    "path": "Pods/OpenSSL-Universal/include-ios/openssl/dsa.h",
    "content": "/* crypto/dsa/dsa.h */\n/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)\n * All rights reserved.\n *\n * This package is an SSL implementation written\n * by Eric Young (eay@cryptsoft.com).\n * The implementation was written so as to conform with Netscapes SSL.\n *\n * This library is free for commercial and non-commercial use as long as\n * the following conditions are aheared to.  The following conditions\n * apply to all code found in this distribution, be it the RC4, RSA,\n * lhash, DES, etc., code; not just the SSL code.  The SSL documentation\n * included with this distribution is covered by the same copyright terms\n * except that the holder is Tim Hudson (tjh@cryptsoft.com).\n *\n * Copyright remains Eric Young's, and as such any Copyright notices in\n * the code are not to be removed.\n * If this package is used in a product, Eric Young should be given attribution\n * as the author of the parts of the library used.\n * This can be in the form of a textual message at program startup or\n * in documentation (online or textual) provided with the package.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n * 1. Redistributions of source code must retain the copyright\n *    notice, this list of conditions and the following disclaimer.\n * 2. Redistributions in binary form must reproduce the above copyright\n *    notice, this list of conditions and the following disclaimer in the\n *    documentation and/or other materials provided with the distribution.\n * 3. All advertising materials mentioning features or use of this software\n *    must display the following acknowledgement:\n *    \"This product includes cryptographic software written by\n *     Eric Young (eay@cryptsoft.com)\"\n *    The word 'cryptographic' can be left out if the rouines from the library\n *    being used are not cryptographic related :-).\n * 4. If you include any Windows specific code (or a derivative thereof) from\n *    the apps directory (application code) you must include an acknowledgement:\n *    \"This product includes software written by Tim Hudson (tjh@cryptsoft.com)\"\n *\n * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND\n * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE\n * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n * SUCH DAMAGE.\n *\n * The licence and distribution terms for any publically available version or\n * derivative of this code cannot be changed.  i.e. this code cannot simply be\n * copied and put under another distribution licence\n * [including the GNU Public Licence.]\n */\n\n/*\n * The DSS routines are based on patches supplied by\n * Steven Schoch <schoch@sheba.arc.nasa.gov>.  He basically did the\n * work and I have just tweaked them a little to fit into my\n * stylistic vision for SSLeay :-) */\n\n#ifndef HEADER_DSA_H\n# define HEADER_DSA_H\n\n# include <openssl/e_os2.h>\n\n# ifdef OPENSSL_NO_DSA\n#  error DSA is disabled.\n# endif\n\n# ifndef OPENSSL_NO_BIO\n#  include <openssl/bio.h>\n# endif\n# include <openssl/crypto.h>\n# include <openssl/ossl_typ.h>\n\n# ifndef OPENSSL_NO_DEPRECATED\n#  include <openssl/bn.h>\n#  ifndef OPENSSL_NO_DH\n#   include <openssl/dh.h>\n#  endif\n# endif\n\n# ifndef OPENSSL_DSA_MAX_MODULUS_BITS\n#  define OPENSSL_DSA_MAX_MODULUS_BITS   10000\n# endif\n\n# define DSA_FLAG_CACHE_MONT_P   0x01\n/*\n * new with 0.9.7h; the built-in DSA implementation now uses constant time\n * modular exponentiation for secret exponents by default. This flag causes\n * the faster variable sliding window method to be used for all exponents.\n */\n# define DSA_FLAG_NO_EXP_CONSTTIME       0x02\n\n/*\n * If this flag is set the DSA method is FIPS compliant and can be used in\n * FIPS mode. This is set in the validated module method. If an application\n * sets this flag in its own methods it is its reposibility to ensure the\n * result is compliant.\n */\n\n# define DSA_FLAG_FIPS_METHOD                    0x0400\n\n/*\n * If this flag is set the operations normally disabled in FIPS mode are\n * permitted it is then the applications responsibility to ensure that the\n * usage is compliant.\n */\n\n# define DSA_FLAG_NON_FIPS_ALLOW                 0x0400\n\n#ifdef  __cplusplus\nextern \"C\" {\n#endif\n\n/* Already defined in ossl_typ.h */\n/* typedef struct dsa_st DSA; */\n/* typedef struct dsa_method DSA_METHOD; */\n\ntypedef struct DSA_SIG_st {\n    BIGNUM *r;\n    BIGNUM *s;\n} DSA_SIG;\n\nstruct dsa_method {\n    const char *name;\n    DSA_SIG *(*dsa_do_sign) (const unsigned char *dgst, int dlen, DSA *dsa);\n    int (*dsa_sign_setup) (DSA *dsa, BN_CTX *ctx_in, BIGNUM **kinvp,\n                           BIGNUM **rp);\n    int (*dsa_do_verify) (const unsigned char *dgst, int dgst_len,\n                          DSA_SIG *sig, DSA *dsa);\n    int (*dsa_mod_exp) (DSA *dsa, BIGNUM *rr, BIGNUM *a1, BIGNUM *p1,\n                        BIGNUM *a2, BIGNUM *p2, BIGNUM *m, BN_CTX *ctx,\n                        BN_MONT_CTX *in_mont);\n    /* Can be null */\n    int (*bn_mod_exp) (DSA *dsa, BIGNUM *r, BIGNUM *a, const BIGNUM *p,\n                       const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *m_ctx);\n    int (*init) (DSA *dsa);\n    int (*finish) (DSA *dsa);\n    int flags;\n    char *app_data;\n    /* If this is non-NULL, it is used to generate DSA parameters */\n    int (*dsa_paramgen) (DSA *dsa, int bits,\n                         const unsigned char *seed, int seed_len,\n                         int *counter_ret, unsigned long *h_ret,\n                         BN_GENCB *cb);\n    /* If this is non-NULL, it is used to generate DSA keys */\n    int (*dsa_keygen) (DSA *dsa);\n};\n\nstruct dsa_st {\n    /*\n     * This first variable is used to pick up errors where a DSA is passed\n     * instead of of a EVP_PKEY\n     */\n    int pad;\n    long version;\n    int write_params;\n    BIGNUM *p;\n    BIGNUM *q;                  /* == 20 */\n    BIGNUM *g;\n    BIGNUM *pub_key;            /* y public key */\n    BIGNUM *priv_key;           /* x private key */\n    BIGNUM *kinv;               /* Signing pre-calc */\n    BIGNUM *r;                  /* Signing pre-calc */\n    int flags;\n    /* Normally used to cache montgomery values */\n    BN_MONT_CTX *method_mont_p;\n    int references;\n    CRYPTO_EX_DATA ex_data;\n    const DSA_METHOD *meth;\n    /* functional reference if 'meth' is ENGINE-provided */\n    ENGINE *engine;\n};\n\n# define d2i_DSAparams_fp(fp,x) (DSA *)ASN1_d2i_fp((char *(*)())DSA_new, \\\n                (char *(*)())d2i_DSAparams,(fp),(unsigned char **)(x))\n# define i2d_DSAparams_fp(fp,x) ASN1_i2d_fp(i2d_DSAparams,(fp), \\\n                (unsigned char *)(x))\n# define d2i_DSAparams_bio(bp,x) ASN1_d2i_bio_of(DSA,DSA_new,d2i_DSAparams,bp,x)\n# define i2d_DSAparams_bio(bp,x) ASN1_i2d_bio_of_const(DSA,i2d_DSAparams,bp,x)\n\nDSA *DSAparams_dup(DSA *x);\nDSA_SIG *DSA_SIG_new(void);\nvoid DSA_SIG_free(DSA_SIG *a);\nint i2d_DSA_SIG(const DSA_SIG *a, unsigned char **pp);\nDSA_SIG *d2i_DSA_SIG(DSA_SIG **v, const unsigned char **pp, long length);\n\nDSA_SIG *DSA_do_sign(const unsigned char *dgst, int dlen, DSA *dsa);\nint DSA_do_verify(const unsigned char *dgst, int dgst_len,\n                  DSA_SIG *sig, DSA *dsa);\n\nconst DSA_METHOD *DSA_OpenSSL(void);\n\nvoid DSA_set_default_method(const DSA_METHOD *);\nconst DSA_METHOD *DSA_get_default_method(void);\nint DSA_set_method(DSA *dsa, const DSA_METHOD *);\n\nDSA *DSA_new(void);\nDSA *DSA_new_method(ENGINE *engine);\nvoid DSA_free(DSA *r);\n/* \"up\" the DSA object's reference count */\nint DSA_up_ref(DSA *r);\nint DSA_size(const DSA *);\n        /* next 4 return -1 on error */\nint DSA_sign_setup(DSA *dsa, BN_CTX *ctx_in, BIGNUM **kinvp, BIGNUM **rp);\nint DSA_sign(int type, const unsigned char *dgst, int dlen,\n             unsigned char *sig, unsigned int *siglen, DSA *dsa);\nint DSA_verify(int type, const unsigned char *dgst, int dgst_len,\n               const unsigned char *sigbuf, int siglen, DSA *dsa);\nint DSA_get_ex_new_index(long argl, void *argp, CRYPTO_EX_new *new_func,\n                         CRYPTO_EX_dup *dup_func, CRYPTO_EX_free *free_func);\nint DSA_set_ex_data(DSA *d, int idx, void *arg);\nvoid *DSA_get_ex_data(DSA *d, int idx);\n\nDSA *d2i_DSAPublicKey(DSA **a, const unsigned char **pp, long length);\nDSA *d2i_DSAPrivateKey(DSA **a, const unsigned char **pp, long length);\nDSA *d2i_DSAparams(DSA **a, const unsigned char **pp, long length);\n\n/* Deprecated version */\n# ifndef OPENSSL_NO_DEPRECATED\nDSA *DSA_generate_parameters(int bits,\n                             unsigned char *seed, int seed_len,\n                             int *counter_ret, unsigned long *h_ret, void\n                              (*callback) (int, int, void *), void *cb_arg);\n# endif                         /* !defined(OPENSSL_NO_DEPRECATED) */\n\n/* New version */\nint DSA_generate_parameters_ex(DSA *dsa, int bits,\n                               const unsigned char *seed, int seed_len,\n                               int *counter_ret, unsigned long *h_ret,\n                               BN_GENCB *cb);\n\nint DSA_generate_key(DSA *a);\nint i2d_DSAPublicKey(const DSA *a, unsigned char **pp);\nint i2d_DSAPrivateKey(const DSA *a, unsigned char **pp);\nint i2d_DSAparams(const DSA *a, unsigned char **pp);\n\n# ifndef OPENSSL_NO_BIO\nint DSAparams_print(BIO *bp, const DSA *x);\nint DSA_print(BIO *bp, const DSA *x, int off);\n# endif\n# ifndef OPENSSL_NO_FP_API\nint DSAparams_print_fp(FILE *fp, const DSA *x);\nint DSA_print_fp(FILE *bp, const DSA *x, int off);\n# endif\n\n# define DSS_prime_checks 50\n/*\n * Primality test according to FIPS PUB 186[-1], Appendix 2.1: 50 rounds of\n * Rabin-Miller\n */\n# define DSA_is_prime(n, callback, cb_arg) \\\n        BN_is_prime(n, DSS_prime_checks, callback, NULL, cb_arg)\n\n# ifndef OPENSSL_NO_DH\n/*\n * Convert DSA structure (key or just parameters) into DH structure (be\n * careful to avoid small subgroup attacks when using this!)\n */\nDH *DSA_dup_DH(const DSA *r);\n# endif\n\n# define EVP_PKEY_CTX_set_dsa_paramgen_bits(ctx, nbits) \\\n        EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_DSA, EVP_PKEY_OP_PARAMGEN, \\\n                                EVP_PKEY_CTRL_DSA_PARAMGEN_BITS, nbits, NULL)\n\n# define EVP_PKEY_CTRL_DSA_PARAMGEN_BITS         (EVP_PKEY_ALG_CTRL + 1)\n# define EVP_PKEY_CTRL_DSA_PARAMGEN_Q_BITS       (EVP_PKEY_ALG_CTRL + 2)\n# define EVP_PKEY_CTRL_DSA_PARAMGEN_MD           (EVP_PKEY_ALG_CTRL + 3)\n\n/* BEGIN ERROR CODES */\n/*\n * The following lines are auto generated by the script mkerr.pl. Any changes\n * made after this point may be overwritten when the script is next run.\n */\nvoid ERR_load_DSA_strings(void);\n\n/* Error codes for the DSA functions. */\n\n/* Function codes. */\n# define DSA_F_D2I_DSA_SIG                                110\n# define DSA_F_DO_DSA_PRINT                               104\n# define DSA_F_DSAPARAMS_PRINT                            100\n# define DSA_F_DSAPARAMS_PRINT_FP                         101\n# define DSA_F_DSA_DO_SIGN                                112\n# define DSA_F_DSA_DO_VERIFY                              113\n# define DSA_F_DSA_GENERATE_KEY                           124\n# define DSA_F_DSA_GENERATE_PARAMETERS_EX                 123\n# define DSA_F_DSA_NEW_METHOD                             103\n# define DSA_F_DSA_PARAM_DECODE                           119\n# define DSA_F_DSA_PRINT_FP                               105\n# define DSA_F_DSA_PRIV_DECODE                            115\n# define DSA_F_DSA_PRIV_ENCODE                            116\n# define DSA_F_DSA_PUB_DECODE                             117\n# define DSA_F_DSA_PUB_ENCODE                             118\n# define DSA_F_DSA_SIGN                                   106\n# define DSA_F_DSA_SIGN_SETUP                             107\n# define DSA_F_DSA_SIG_NEW                                109\n# define DSA_F_DSA_SIG_PRINT                              125\n# define DSA_F_DSA_VERIFY                                 108\n# define DSA_F_I2D_DSA_SIG                                111\n# define DSA_F_OLD_DSA_PRIV_DECODE                        122\n# define DSA_F_PKEY_DSA_CTRL                              120\n# define DSA_F_PKEY_DSA_KEYGEN                            121\n# define DSA_F_SIG_CB                                     114\n\n/* Reason codes. */\n# define DSA_R_BAD_Q_VALUE                                102\n# define DSA_R_BN_DECODE_ERROR                            108\n# define DSA_R_BN_ERROR                                   109\n# define DSA_R_DATA_TOO_LARGE_FOR_KEY_SIZE                100\n# define DSA_R_DECODE_ERROR                               104\n# define DSA_R_INVALID_DIGEST_TYPE                        106\n# define DSA_R_MISSING_PARAMETERS                         101\n# define DSA_R_MODULUS_TOO_LARGE                          103\n# define DSA_R_NEED_NEW_SETUP_VALUES                      110\n# define DSA_R_NON_FIPS_DSA_METHOD                        111\n# define DSA_R_NO_PARAMETERS_SET                          107\n# define DSA_R_PARAMETER_ENCODING_ERROR                   105\n\n#ifdef  __cplusplus\n}\n#endif\n#endif\n"
  },
  {
    "path": "Pods/OpenSSL-Universal/include-ios/openssl/dso.h",
    "content": "/* dso.h -*- mode:C; c-file-style: \"eay\" -*- */\n/*\n * Written by Geoff Thorpe (geoff@geoffthorpe.net) for the OpenSSL project\n * 2000.\n */\n/* ====================================================================\n * Copyright (c) 2000 The OpenSSL Project.  All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n *\n * 1. Redistributions of source code must retain the above copyright\n *    notice, this list of conditions and the following disclaimer.\n *\n * 2. Redistributions in binary form must reproduce the above copyright\n *    notice, this list of conditions and the following disclaimer in\n *    the documentation and/or other materials provided with the\n *    distribution.\n *\n * 3. All advertising materials mentioning features or use of this\n *    software must display the following acknowledgment:\n *    \"This product includes software developed by the OpenSSL Project\n *    for use in the OpenSSL Toolkit. (http://www.OpenSSL.org/)\"\n *\n * 4. The names \"OpenSSL Toolkit\" and \"OpenSSL Project\" must not be used to\n *    endorse or promote products derived from this software without\n *    prior written permission. For written permission, please contact\n *    licensing@OpenSSL.org.\n *\n * 5. Products derived from this software may not be called \"OpenSSL\"\n *    nor may \"OpenSSL\" appear in their names without prior written\n *    permission of the OpenSSL Project.\n *\n * 6. Redistributions of any form whatsoever must retain the following\n *    acknowledgment:\n *    \"This product includes software developed by the OpenSSL Project\n *    for use in the OpenSSL Toolkit (http://www.OpenSSL.org/)\"\n *\n * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY\n * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\n * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR\n * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,\n * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED\n * OF THE POSSIBILITY OF SUCH DAMAGE.\n * ====================================================================\n *\n * This product includes cryptographic software written by Eric Young\n * (eay@cryptsoft.com).  This product includes software written by Tim\n * Hudson (tjh@cryptsoft.com).\n *\n */\n\n#ifndef HEADER_DSO_H\n# define HEADER_DSO_H\n\n# include <openssl/crypto.h>\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n/* These values are used as commands to DSO_ctrl() */\n# define DSO_CTRL_GET_FLAGS      1\n# define DSO_CTRL_SET_FLAGS      2\n# define DSO_CTRL_OR_FLAGS       3\n\n/*\n * By default, DSO_load() will translate the provided filename into a form\n * typical for the platform (more specifically the DSO_METHOD) using the\n * dso_name_converter function of the method. Eg. win32 will transform \"blah\"\n * into \"blah.dll\", and dlfcn will transform it into \"libblah.so\". The\n * behaviour can be overriden by setting the name_converter callback in the\n * DSO object (using DSO_set_name_converter()). This callback could even\n * utilise the DSO_METHOD's converter too if it only wants to override\n * behaviour for one or two possible DSO methods. However, the following flag\n * can be set in a DSO to prevent *any* native name-translation at all - eg.\n * if the caller has prompted the user for a path to a driver library so the\n * filename should be interpreted as-is.\n */\n# define DSO_FLAG_NO_NAME_TRANSLATION            0x01\n/*\n * An extra flag to give if only the extension should be added as\n * translation.  This is obviously only of importance on Unix and other\n * operating systems where the translation also may prefix the name with\n * something, like 'lib', and ignored everywhere else. This flag is also\n * ignored if DSO_FLAG_NO_NAME_TRANSLATION is used at the same time.\n */\n# define DSO_FLAG_NAME_TRANSLATION_EXT_ONLY      0x02\n\n/*\n * The following flag controls the translation of symbol names to upper case.\n * This is currently only being implemented for OpenVMS.\n */\n# define DSO_FLAG_UPCASE_SYMBOL                  0x10\n\n/*\n * This flag loads the library with public symbols. Meaning: The exported\n * symbols of this library are public to all libraries loaded after this\n * library. At the moment only implemented in unix.\n */\n# define DSO_FLAG_GLOBAL_SYMBOLS                 0x20\n\ntypedef void (*DSO_FUNC_TYPE) (void);\n\ntypedef struct dso_st DSO;\n\n/*\n * The function prototype used for method functions (or caller-provided\n * callbacks) that transform filenames. They are passed a DSO structure\n * pointer (or NULL if they are to be used independantly of a DSO object) and\n * a filename to transform. They should either return NULL (if there is an\n * error condition) or a newly allocated string containing the transformed\n * form that the caller will need to free with OPENSSL_free() when done.\n */\ntypedef char *(*DSO_NAME_CONVERTER_FUNC)(DSO *, const char *);\n/*\n * The function prototype used for method functions (or caller-provided\n * callbacks) that merge two file specifications. They are passed a DSO\n * structure pointer (or NULL if they are to be used independantly of a DSO\n * object) and two file specifications to merge. They should either return\n * NULL (if there is an error condition) or a newly allocated string\n * containing the result of merging that the caller will need to free with\n * OPENSSL_free() when done. Here, merging means that bits and pieces are\n * taken from each of the file specifications and added together in whatever\n * fashion that is sensible for the DSO method in question.  The only rule\n * that really applies is that if the two specification contain pieces of the\n * same type, the copy from the first string takes priority.  One could see\n * it as the first specification is the one given by the user and the second\n * being a bunch of defaults to add on if they're missing in the first.\n */\ntypedef char *(*DSO_MERGER_FUNC)(DSO *, const char *, const char *);\n\ntypedef struct dso_meth_st {\n    const char *name;\n    /*\n     * Loads a shared library, NB: new DSO_METHODs must ensure that a\n     * successful load populates the loaded_filename field, and likewise a\n     * successful unload OPENSSL_frees and NULLs it out.\n     */\n    int (*dso_load) (DSO *dso);\n    /* Unloads a shared library */\n    int (*dso_unload) (DSO *dso);\n    /* Binds a variable */\n    void *(*dso_bind_var) (DSO *dso, const char *symname);\n    /*\n     * Binds a function - assumes a return type of DSO_FUNC_TYPE. This should\n     * be cast to the real function prototype by the caller. Platforms that\n     * don't have compatible representations for different prototypes (this\n     * is possible within ANSI C) are highly unlikely to have shared\n     * libraries at all, let alone a DSO_METHOD implemented for them.\n     */\n    DSO_FUNC_TYPE (*dso_bind_func) (DSO *dso, const char *symname);\n/* I don't think this would actually be used in any circumstances. */\n# if 0\n    /* Unbinds a variable */\n    int (*dso_unbind_var) (DSO *dso, char *symname, void *symptr);\n    /* Unbinds a function */\n    int (*dso_unbind_func) (DSO *dso, char *symname, DSO_FUNC_TYPE symptr);\n# endif\n    /*\n     * The generic (yuck) \"ctrl()\" function. NB: Negative return values\n     * (rather than zero) indicate errors.\n     */\n    long (*dso_ctrl) (DSO *dso, int cmd, long larg, void *parg);\n    /*\n     * The default DSO_METHOD-specific function for converting filenames to a\n     * canonical native form.\n     */\n    DSO_NAME_CONVERTER_FUNC dso_name_converter;\n    /*\n     * The default DSO_METHOD-specific function for converting filenames to a\n     * canonical native form.\n     */\n    DSO_MERGER_FUNC dso_merger;\n    /* [De]Initialisation handlers. */\n    int (*init) (DSO *dso);\n    int (*finish) (DSO *dso);\n    /* Return pathname of the module containing location */\n    int (*pathbyaddr) (void *addr, char *path, int sz);\n    /* Perform global symbol lookup, i.e. among *all* modules */\n    void *(*globallookup) (const char *symname);\n} DSO_METHOD;\n\n/**********************************************************************/\n/* The low-level handle type used to refer to a loaded shared library */\n\nstruct dso_st {\n    DSO_METHOD *meth;\n    /*\n     * Standard dlopen uses a (void *). Win32 uses a HANDLE. VMS doesn't use\n     * anything but will need to cache the filename for use in the dso_bind\n     * handler. All in all, let each method control its own destiny.\n     * \"Handles\" and such go in a STACK.\n     */\n    STACK_OF(void) *meth_data;\n    int references;\n    int flags;\n    /*\n     * For use by applications etc ... use this for your bits'n'pieces, don't\n     * touch meth_data!\n     */\n    CRYPTO_EX_DATA ex_data;\n    /*\n     * If this callback function pointer is set to non-NULL, then it will be\n     * used in DSO_load() in place of meth->dso_name_converter. NB: This\n     * should normally set using DSO_set_name_converter().\n     */\n    DSO_NAME_CONVERTER_FUNC name_converter;\n    /*\n     * If this callback function pointer is set to non-NULL, then it will be\n     * used in DSO_load() in place of meth->dso_merger. NB: This should\n     * normally set using DSO_set_merger().\n     */\n    DSO_MERGER_FUNC merger;\n    /*\n     * This is populated with (a copy of) the platform-independant filename\n     * used for this DSO.\n     */\n    char *filename;\n    /*\n     * This is populated with (a copy of) the translated filename by which\n     * the DSO was actually loaded. It is NULL iff the DSO is not currently\n     * loaded. NB: This is here because the filename translation process may\n     * involve a callback being invoked more than once not only to convert to\n     * a platform-specific form, but also to try different filenames in the\n     * process of trying to perform a load. As such, this variable can be\n     * used to indicate (a) whether this DSO structure corresponds to a\n     * loaded library or not, and (b) the filename with which it was actually\n     * loaded.\n     */\n    char *loaded_filename;\n};\n\nDSO *DSO_new(void);\nDSO *DSO_new_method(DSO_METHOD *method);\nint DSO_free(DSO *dso);\nint DSO_flags(DSO *dso);\nint DSO_up_ref(DSO *dso);\nlong DSO_ctrl(DSO *dso, int cmd, long larg, void *parg);\n\n/*\n * This function sets the DSO's name_converter callback. If it is non-NULL,\n * then it will be used instead of the associated DSO_METHOD's function. If\n * oldcb is non-NULL then it is set to the function pointer value being\n * replaced. Return value is non-zero for success.\n */\nint DSO_set_name_converter(DSO *dso, DSO_NAME_CONVERTER_FUNC cb,\n                           DSO_NAME_CONVERTER_FUNC *oldcb);\n/*\n * These functions can be used to get/set the platform-independant filename\n * used for a DSO. NB: set will fail if the DSO is already loaded.\n */\nconst char *DSO_get_filename(DSO *dso);\nint DSO_set_filename(DSO *dso, const char *filename);\n/*\n * This function will invoke the DSO's name_converter callback to translate a\n * filename, or if the callback isn't set it will instead use the DSO_METHOD's\n * converter. If \"filename\" is NULL, the \"filename\" in the DSO itself will be\n * used. If the DSO_FLAG_NO_NAME_TRANSLATION flag is set, then the filename is\n * simply duplicated. NB: This function is usually called from within a\n * DSO_METHOD during the processing of a DSO_load() call, and is exposed so\n * that caller-created DSO_METHODs can do the same thing. A non-NULL return\n * value will need to be OPENSSL_free()'d.\n */\nchar *DSO_convert_filename(DSO *dso, const char *filename);\n/*\n * This function will invoke the DSO's merger callback to merge two file\n * specifications, or if the callback isn't set it will instead use the\n * DSO_METHOD's merger.  A non-NULL return value will need to be\n * OPENSSL_free()'d.\n */\nchar *DSO_merge(DSO *dso, const char *filespec1, const char *filespec2);\n/*\n * If the DSO is currently loaded, this returns the filename that it was\n * loaded under, otherwise it returns NULL. So it is also useful as a test as\n * to whether the DSO is currently loaded. NB: This will not necessarily\n * return the same value as DSO_convert_filename(dso, dso->filename), because\n * the DSO_METHOD's load function may have tried a variety of filenames (with\n * and/or without the aid of the converters) before settling on the one it\n * actually loaded.\n */\nconst char *DSO_get_loaded_filename(DSO *dso);\n\nvoid DSO_set_default_method(DSO_METHOD *meth);\nDSO_METHOD *DSO_get_default_method(void);\nDSO_METHOD *DSO_get_method(DSO *dso);\nDSO_METHOD *DSO_set_method(DSO *dso, DSO_METHOD *meth);\n\n/*\n * The all-singing all-dancing load function, you normally pass NULL for the\n * first and third parameters. Use DSO_up and DSO_free for subsequent\n * reference count handling. Any flags passed in will be set in the\n * constructed DSO after its init() function but before the load operation.\n * If 'dso' is non-NULL, 'flags' is ignored.\n */\nDSO *DSO_load(DSO *dso, const char *filename, DSO_METHOD *meth, int flags);\n\n/* This function binds to a variable inside a shared library. */\nvoid *DSO_bind_var(DSO *dso, const char *symname);\n\n/* This function binds to a function inside a shared library. */\nDSO_FUNC_TYPE DSO_bind_func(DSO *dso, const char *symname);\n\n/*\n * This method is the default, but will beg, borrow, or steal whatever method\n * should be the default on any particular platform (including\n * DSO_METH_null() if necessary).\n */\nDSO_METHOD *DSO_METHOD_openssl(void);\n\n/*\n * This method is defined for all platforms - if a platform has no DSO\n * support then this will be the only method!\n */\nDSO_METHOD *DSO_METHOD_null(void);\n\n/*\n * If DSO_DLFCN is defined, the standard dlfcn.h-style functions (dlopen,\n * dlclose, dlsym, etc) will be used and incorporated into this method. If\n * not, this method will return NULL.\n */\nDSO_METHOD *DSO_METHOD_dlfcn(void);\n\n/*\n * If DSO_DL is defined, the standard dl.h-style functions (shl_load,\n * shl_unload, shl_findsym, etc) will be used and incorporated into this\n * method. If not, this method will return NULL.\n */\nDSO_METHOD *DSO_METHOD_dl(void);\n\n/* If WIN32 is defined, use DLLs. If not, return NULL. */\nDSO_METHOD *DSO_METHOD_win32(void);\n\n/* If VMS is defined, use shared images. If not, return NULL. */\nDSO_METHOD *DSO_METHOD_vms(void);\n\n/*\n * This function writes null-terminated pathname of DSO module containing\n * 'addr' into 'sz' large caller-provided 'path' and returns the number of\n * characters [including trailing zero] written to it. If 'sz' is 0 or\n * negative, 'path' is ignored and required amount of charachers [including\n * trailing zero] to accomodate pathname is returned. If 'addr' is NULL, then\n * pathname of cryptolib itself is returned. Negative or zero return value\n * denotes error.\n */\nint DSO_pathbyaddr(void *addr, char *path, int sz);\n\n/*\n * This function should be used with caution! It looks up symbols in *all*\n * loaded modules and if module gets unloaded by somebody else attempt to\n * dereference the pointer is doomed to have fatal consequences. Primary\n * usage for this function is to probe *core* system functionality, e.g.\n * check if getnameinfo(3) is available at run-time without bothering about\n * OS-specific details such as libc.so.versioning or where does it actually\n * reside: in libc itself or libsocket.\n */\nvoid *DSO_global_lookup(const char *name);\n\n/* If BeOS is defined, use shared images. If not, return NULL. */\nDSO_METHOD *DSO_METHOD_beos(void);\n\n/* BEGIN ERROR CODES */\n/*\n * The following lines are auto generated by the script mkerr.pl. Any changes\n * made after this point may be overwritten when the script is next run.\n */\nvoid ERR_load_DSO_strings(void);\n\n/* Error codes for the DSO functions. */\n\n/* Function codes. */\n# define DSO_F_BEOS_BIND_FUNC                             144\n# define DSO_F_BEOS_BIND_VAR                              145\n# define DSO_F_BEOS_LOAD                                  146\n# define DSO_F_BEOS_NAME_CONVERTER                        147\n# define DSO_F_BEOS_UNLOAD                                148\n# define DSO_F_DLFCN_BIND_FUNC                            100\n# define DSO_F_DLFCN_BIND_VAR                             101\n# define DSO_F_DLFCN_LOAD                                 102\n# define DSO_F_DLFCN_MERGER                               130\n# define DSO_F_DLFCN_NAME_CONVERTER                       123\n# define DSO_F_DLFCN_UNLOAD                               103\n# define DSO_F_DL_BIND_FUNC                               104\n# define DSO_F_DL_BIND_VAR                                105\n# define DSO_F_DL_LOAD                                    106\n# define DSO_F_DL_MERGER                                  131\n# define DSO_F_DL_NAME_CONVERTER                          124\n# define DSO_F_DL_UNLOAD                                  107\n# define DSO_F_DSO_BIND_FUNC                              108\n# define DSO_F_DSO_BIND_VAR                               109\n# define DSO_F_DSO_CONVERT_FILENAME                       126\n# define DSO_F_DSO_CTRL                                   110\n# define DSO_F_DSO_FREE                                   111\n# define DSO_F_DSO_GET_FILENAME                           127\n# define DSO_F_DSO_GET_LOADED_FILENAME                    128\n# define DSO_F_DSO_GLOBAL_LOOKUP                          139\n# define DSO_F_DSO_LOAD                                   112\n# define DSO_F_DSO_MERGE                                  132\n# define DSO_F_DSO_NEW_METHOD                             113\n# define DSO_F_DSO_PATHBYADDR                             140\n# define DSO_F_DSO_SET_FILENAME                           129\n# define DSO_F_DSO_SET_NAME_CONVERTER                     122\n# define DSO_F_DSO_UP_REF                                 114\n# define DSO_F_GLOBAL_LOOKUP_FUNC                         138\n# define DSO_F_PATHBYADDR                                 137\n# define DSO_F_VMS_BIND_SYM                               115\n# define DSO_F_VMS_LOAD                                   116\n# define DSO_F_VMS_MERGER                                 133\n# define DSO_F_VMS_UNLOAD                                 117\n# define DSO_F_WIN32_BIND_FUNC                            118\n# define DSO_F_WIN32_BIND_VAR                             119\n# define DSO_F_WIN32_GLOBALLOOKUP                         142\n# define DSO_F_WIN32_GLOBALLOOKUP_FUNC                    143\n# define DSO_F_WIN32_JOINER                               135\n# define DSO_F_WIN32_LOAD                                 120\n# define DSO_F_WIN32_MERGER                               134\n# define DSO_F_WIN32_NAME_CONVERTER                       125\n# define DSO_F_WIN32_PATHBYADDR                           141\n# define DSO_F_WIN32_SPLITTER                             136\n# define DSO_F_WIN32_UNLOAD                               121\n\n/* Reason codes. */\n# define DSO_R_CTRL_FAILED                                100\n# define DSO_R_DSO_ALREADY_LOADED                         110\n# define DSO_R_EMPTY_FILE_STRUCTURE                       113\n# define DSO_R_FAILURE                                    114\n# define DSO_R_FILENAME_TOO_BIG                           101\n# define DSO_R_FINISH_FAILED                              102\n# define DSO_R_INCORRECT_FILE_SYNTAX                      115\n# define DSO_R_LOAD_FAILED                                103\n# define DSO_R_NAME_TRANSLATION_FAILED                    109\n# define DSO_R_NO_FILENAME                                111\n# define DSO_R_NO_FILE_SPECIFICATION                      116\n# define DSO_R_NULL_HANDLE                                104\n# define DSO_R_SET_FILENAME_FAILED                        112\n# define DSO_R_STACK_ERROR                                105\n# define DSO_R_SYM_FAILURE                                106\n# define DSO_R_UNLOAD_FAILED                              107\n# define DSO_R_UNSUPPORTED                                108\n\n#ifdef  __cplusplus\n}\n#endif\n#endif\n"
  },
  {
    "path": "Pods/OpenSSL-Universal/include-ios/openssl/dtls1.h",
    "content": "/* ssl/dtls1.h */\n/*\n * DTLS implementation written by Nagendra Modadugu\n * (nagendra@cs.stanford.edu) for the OpenSSL project 2005.\n */\n/* ====================================================================\n * Copyright (c) 1999-2005 The OpenSSL Project.  All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n *\n * 1. Redistributions of source code must retain the above copyright\n *    notice, this list of conditions and the following disclaimer.\n *\n * 2. Redistributions in binary form must reproduce the above copyright\n *    notice, this list of conditions and the following disclaimer in\n *    the documentation and/or other materials provided with the\n *    distribution.\n *\n * 3. All advertising materials mentioning features or use of this\n *    software must display the following acknowledgment:\n *    \"This product includes software developed by the OpenSSL Project\n *    for use in the OpenSSL Toolkit. (http://www.OpenSSL.org/)\"\n *\n * 4. The names \"OpenSSL Toolkit\" and \"OpenSSL Project\" must not be used to\n *    endorse or promote products derived from this software without\n *    prior written permission. For written permission, please contact\n *    openssl-core@OpenSSL.org.\n *\n * 5. Products derived from this software may not be called \"OpenSSL\"\n *    nor may \"OpenSSL\" appear in their names without prior written\n *    permission of the OpenSSL Project.\n *\n * 6. Redistributions of any form whatsoever must retain the following\n *    acknowledgment:\n *    \"This product includes software developed by the OpenSSL Project\n *    for use in the OpenSSL Toolkit (http://www.OpenSSL.org/)\"\n *\n * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY\n * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\n * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR\n * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,\n * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED\n * OF THE POSSIBILITY OF SUCH DAMAGE.\n * ====================================================================\n *\n * This product includes cryptographic software written by Eric Young\n * (eay@cryptsoft.com).  This product includes software written by Tim\n * Hudson (tjh@cryptsoft.com).\n *\n */\n\n#ifndef HEADER_DTLS1_H\n# define HEADER_DTLS1_H\n\n# include <openssl/buffer.h>\n# include <openssl/pqueue.h>\n# ifdef OPENSSL_SYS_VMS\n#  include <resource.h>\n#  include <sys/timeb.h>\n# endif\n# ifdef OPENSSL_SYS_WIN32\n/* Needed for struct timeval */\n#  include <winsock.h>\n# elif defined(OPENSSL_SYS_NETWARE) && !defined(_WINSOCK2API_)\n#  include <sys/timeval.h>\n# else\n#  if defined(OPENSSL_SYS_VXWORKS)\n#   include <sys/times.h>\n#  else\n#   include <sys/time.h>\n#  endif\n# endif\n\n#ifdef  __cplusplus\nextern \"C\" {\n#endif\n\n# define DTLS1_VERSION                   0xFEFF\n# define DTLS_MAX_VERSION                DTLS1_VERSION\n# define DTLS1_VERSION_MAJOR             0xFE\n\n# define DTLS1_BAD_VER                   0x0100\n\n# if 0\n/* this alert description is not specified anywhere... */\n#  define DTLS1_AD_MISSING_HANDSHAKE_MESSAGE    110\n# endif\n\n/* lengths of messages */\n# define DTLS1_COOKIE_LENGTH                     256\n\n# define DTLS1_RT_HEADER_LENGTH                  13\n\n# define DTLS1_HM_HEADER_LENGTH                  12\n\n# define DTLS1_HM_BAD_FRAGMENT                   -2\n# define DTLS1_HM_FRAGMENT_RETRY                 -3\n\n# define DTLS1_CCS_HEADER_LENGTH                  1\n\n# ifdef DTLS1_AD_MISSING_HANDSHAKE_MESSAGE\n#  define DTLS1_AL_HEADER_LENGTH                   7\n# else\n#  define DTLS1_AL_HEADER_LENGTH                   2\n# endif\n\n# ifndef OPENSSL_NO_SSL_INTERN\n\n#  ifndef OPENSSL_NO_SCTP\n#   define DTLS1_SCTP_AUTH_LABEL   \"EXPORTER_DTLS_OVER_SCTP\"\n#  endif\n\n/* Max MTU overhead we know about so far is 40 for IPv6 + 8 for UDP */\n#  define DTLS1_MAX_MTU_OVERHEAD                   48\n\ntypedef struct dtls1_bitmap_st {\n    unsigned long map;          /* track 32 packets on 32-bit systems and 64\n                                 * - on 64-bit systems */\n    unsigned char max_seq_num[8]; /* max record number seen so far, 64-bit\n                                   * value in big-endian encoding */\n} DTLS1_BITMAP;\n\nstruct dtls1_retransmit_state {\n    EVP_CIPHER_CTX *enc_write_ctx; /* cryptographic state */\n    EVP_MD_CTX *write_hash;     /* used for mac generation */\n#  ifndef OPENSSL_NO_COMP\n    COMP_CTX *compress;         /* compression */\n#  else\n    char *compress;\n#  endif\n    SSL_SESSION *session;\n    unsigned short epoch;\n};\n\nstruct hm_header_st {\n    unsigned char type;\n    unsigned long msg_len;\n    unsigned short seq;\n    unsigned long frag_off;\n    unsigned long frag_len;\n    unsigned int is_ccs;\n    struct dtls1_retransmit_state saved_retransmit_state;\n};\n\nstruct ccs_header_st {\n    unsigned char type;\n    unsigned short seq;\n};\n\nstruct dtls1_timeout_st {\n    /* Number of read timeouts so far */\n    unsigned int read_timeouts;\n    /* Number of write timeouts so far */\n    unsigned int write_timeouts;\n    /* Number of alerts received so far */\n    unsigned int num_alerts;\n};\n\ntypedef struct record_pqueue_st {\n    unsigned short epoch;\n    pqueue q;\n} record_pqueue;\n\ntypedef struct hm_fragment_st {\n    struct hm_header_st msg_header;\n    unsigned char *fragment;\n    unsigned char *reassembly;\n} hm_fragment;\n\ntypedef struct dtls1_state_st {\n    unsigned int send_cookie;\n    unsigned char cookie[DTLS1_COOKIE_LENGTH];\n    unsigned char rcvd_cookie[DTLS1_COOKIE_LENGTH];\n    unsigned int cookie_len;\n    /*\n     * The current data and handshake epoch.  This is initially\n     * undefined, and starts at zero once the initial handshake is\n     * completed\n     */\n    unsigned short r_epoch;\n    unsigned short w_epoch;\n    /* records being received in the current epoch */\n    DTLS1_BITMAP bitmap;\n    /* renegotiation starts a new set of sequence numbers */\n    DTLS1_BITMAP next_bitmap;\n    /* handshake message numbers */\n    unsigned short handshake_write_seq;\n    unsigned short next_handshake_write_seq;\n    unsigned short handshake_read_seq;\n    /* save last sequence number for retransmissions */\n    unsigned char last_write_sequence[8];\n    /* Received handshake records (processed and unprocessed) */\n    record_pqueue unprocessed_rcds;\n    record_pqueue processed_rcds;\n    /* Buffered handshake messages */\n    pqueue buffered_messages;\n    /* Buffered (sent) handshake records */\n    pqueue sent_messages;\n    /*\n     * Buffered application records. Only for records between CCS and\n     * Finished to prevent either protocol violation or unnecessary message\n     * loss.\n     */\n    record_pqueue buffered_app_data;\n    /* Is set when listening for new connections with dtls1_listen() */\n    unsigned int listen;\n    unsigned int link_mtu;      /* max on-the-wire DTLS packet size */\n    unsigned int mtu;           /* max DTLS packet size */\n    struct hm_header_st w_msg_hdr;\n    struct hm_header_st r_msg_hdr;\n    struct dtls1_timeout_st timeout;\n    /*\n     * Indicates when the last handshake msg or heartbeat sent will timeout\n     */\n    struct timeval next_timeout;\n    /* Timeout duration */\n    unsigned short timeout_duration;\n    /*\n     * storage for Alert/Handshake protocol data received but not yet\n     * processed by ssl3_read_bytes:\n     */\n    unsigned char alert_fragment[DTLS1_AL_HEADER_LENGTH];\n    unsigned int alert_fragment_len;\n    unsigned char handshake_fragment[DTLS1_HM_HEADER_LENGTH];\n    unsigned int handshake_fragment_len;\n    unsigned int retransmitting;\n    /*\n     * Set when the handshake is ready to process peer's ChangeCipherSpec message.\n     * Cleared after the message has been processed.\n     */\n    unsigned int change_cipher_spec_ok;\n#  ifndef OPENSSL_NO_SCTP\n    /* used when SSL_ST_XX_FLUSH is entered */\n    int next_state;\n    int shutdown_received;\n#  endif\n} DTLS1_STATE;\n\ntypedef struct dtls1_record_data_st {\n    unsigned char *packet;\n    unsigned int packet_length;\n    SSL3_BUFFER rbuf;\n    SSL3_RECORD rrec;\n#  ifndef OPENSSL_NO_SCTP\n    struct bio_dgram_sctp_rcvinfo recordinfo;\n#  endif\n} DTLS1_RECORD_DATA;\n\n# endif\n\n/* Timeout multipliers (timeout slice is defined in apps/timeouts.h */\n# define DTLS1_TMO_READ_COUNT                      2\n# define DTLS1_TMO_WRITE_COUNT                     2\n\n# define DTLS1_TMO_ALERT_COUNT                     12\n\n#ifdef  __cplusplus\n}\n#endif\n#endif\n"
  },
  {
    "path": "Pods/OpenSSL-Universal/include-ios/openssl/e_os2.h",
    "content": "/* e_os2.h */\n/* ====================================================================\n * Copyright (c) 1998-2000 The OpenSSL Project.  All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n *\n * 1. Redistributions of source code must retain the above copyright\n *    notice, this list of conditions and the following disclaimer.\n *\n * 2. Redistributions in binary form must reproduce the above copyright\n *    notice, this list of conditions and the following disclaimer in\n *    the documentation and/or other materials provided with the\n *    distribution.\n *\n * 3. All advertising materials mentioning features or use of this\n *    software must display the following acknowledgment:\n *    \"This product includes software developed by the OpenSSL Project\n *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)\"\n *\n * 4. The names \"OpenSSL Toolkit\" and \"OpenSSL Project\" must not be used to\n *    endorse or promote products derived from this software without\n *    prior written permission. For written permission, please contact\n *    openssl-core@openssl.org.\n *\n * 5. Products derived from this software may not be called \"OpenSSL\"\n *    nor may \"OpenSSL\" appear in their names without prior written\n *    permission of the OpenSSL Project.\n *\n * 6. Redistributions of any form whatsoever must retain the following\n *    acknowledgment:\n *    \"This product includes software developed by the OpenSSL Project\n *    for use in the OpenSSL Toolkit (http://www.openssl.org/)\"\n *\n * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY\n * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\n * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR\n * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,\n * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED\n * OF THE POSSIBILITY OF SUCH DAMAGE.\n * ====================================================================\n *\n * This product includes cryptographic software written by Eric Young\n * (eay@cryptsoft.com).  This product includes software written by Tim\n * Hudson (tjh@cryptsoft.com).\n *\n */\n\n#include <openssl/opensslconf.h>\n\n#ifndef HEADER_E_OS2_H\n# define HEADER_E_OS2_H\n\n#ifdef  __cplusplus\nextern \"C\" {\n#endif\n\n/******************************************************************************\n * Detect operating systems.  This probably needs completing.\n * The result is that at least one OPENSSL_SYS_os macro should be defined.\n * However, if none is defined, Unix is assumed.\n **/\n\n# define OPENSSL_SYS_UNIX\n\n/* ---------------------- Macintosh, before MacOS X ----------------------- */\n# if defined(__MWERKS__) && defined(macintosh) || defined(OPENSSL_SYSNAME_MAC)\n#  undef OPENSSL_SYS_UNIX\n#  define OPENSSL_SYS_MACINTOSH_CLASSIC\n# endif\n\n/* ---------------------- NetWare ----------------------------------------- */\n# if defined(NETWARE) || defined(OPENSSL_SYSNAME_NETWARE)\n#  undef OPENSSL_SYS_UNIX\n#  define OPENSSL_SYS_NETWARE\n# endif\n\n/* --------------------- Microsoft operating systems ---------------------- */\n\n/*\n * Note that MSDOS actually denotes 32-bit environments running on top of\n * MS-DOS, such as DJGPP one.\n */\n# if defined(OPENSSL_SYSNAME_MSDOS)\n#  undef OPENSSL_SYS_UNIX\n#  define OPENSSL_SYS_MSDOS\n# endif\n\n/*\n * For 32 bit environment, there seems to be the CygWin environment and then\n * all the others that try to do the same thing Microsoft does...\n */\n# if defined(OPENSSL_SYSNAME_UWIN)\n#  undef OPENSSL_SYS_UNIX\n#  define OPENSSL_SYS_WIN32_UWIN\n# else\n#  if defined(__CYGWIN32__) || defined(OPENSSL_SYSNAME_CYGWIN32)\n#   undef OPENSSL_SYS_UNIX\n#   define OPENSSL_SYS_WIN32_CYGWIN\n#  else\n#   if defined(_WIN32) || defined(OPENSSL_SYSNAME_WIN32)\n#    undef OPENSSL_SYS_UNIX\n#    define OPENSSL_SYS_WIN32\n#   endif\n#   if defined(_WIN64) || defined(OPENSSL_SYSNAME_WIN64)\n#    undef OPENSSL_SYS_UNIX\n#    if !defined(OPENSSL_SYS_WIN64)\n#     define OPENSSL_SYS_WIN64\n#    endif\n#   endif\n#   if defined(OPENSSL_SYSNAME_WINNT)\n#    undef OPENSSL_SYS_UNIX\n#    define OPENSSL_SYS_WINNT\n#   endif\n#   if defined(OPENSSL_SYSNAME_WINCE)\n#    undef OPENSSL_SYS_UNIX\n#    define OPENSSL_SYS_WINCE\n#   endif\n#  endif\n# endif\n\n/* Anything that tries to look like Microsoft is \"Windows\" */\n# if defined(OPENSSL_SYS_WIN32) || defined(OPENSSL_SYS_WIN64) || defined(OPENSSL_SYS_WINNT) || defined(OPENSSL_SYS_WINCE)\n#  undef OPENSSL_SYS_UNIX\n#  define OPENSSL_SYS_WINDOWS\n#  ifndef OPENSSL_SYS_MSDOS\n#   define OPENSSL_SYS_MSDOS\n#  endif\n# endif\n\n/*\n * DLL settings.  This part is a bit tough, because it's up to the\n * application implementor how he or she will link the application, so it\n * requires some macro to be used.\n */\n# ifdef OPENSSL_SYS_WINDOWS\n#  ifndef OPENSSL_OPT_WINDLL\n#   if defined(_WINDLL)         /* This is used when building OpenSSL to\n                                 * indicate that DLL linkage should be used */\n#    define OPENSSL_OPT_WINDLL\n#   endif\n#  endif\n# endif\n\n/* ------------------------------- OpenVMS -------------------------------- */\n# if defined(__VMS) || defined(VMS) || defined(OPENSSL_SYSNAME_VMS)\n#  undef OPENSSL_SYS_UNIX\n#  define OPENSSL_SYS_VMS\n#  if defined(__DECC)\n#   define OPENSSL_SYS_VMS_DECC\n#  elif defined(__DECCXX)\n#   define OPENSSL_SYS_VMS_DECC\n#   define OPENSSL_SYS_VMS_DECCXX\n#  else\n#   define OPENSSL_SYS_VMS_NODECC\n#  endif\n# endif\n\n/* -------------------------------- OS/2 ---------------------------------- */\n# if defined(__EMX__) || defined(__OS2__)\n#  undef OPENSSL_SYS_UNIX\n#  define OPENSSL_SYS_OS2\n# endif\n\n/* -------------------------------- Unix ---------------------------------- */\n# ifdef OPENSSL_SYS_UNIX\n#  if defined(linux) || defined(__linux__) || defined(OPENSSL_SYSNAME_LINUX)\n#   define OPENSSL_SYS_LINUX\n#  endif\n#  ifdef OPENSSL_SYSNAME_MPE\n#   define OPENSSL_SYS_MPE\n#  endif\n#  ifdef OPENSSL_SYSNAME_SNI\n#   define OPENSSL_SYS_SNI\n#  endif\n#  ifdef OPENSSL_SYSNAME_ULTRASPARC\n#   define OPENSSL_SYS_ULTRASPARC\n#  endif\n#  ifdef OPENSSL_SYSNAME_NEWS4\n#   define OPENSSL_SYS_NEWS4\n#  endif\n#  ifdef OPENSSL_SYSNAME_MACOSX\n#   define OPENSSL_SYS_MACOSX\n#  endif\n#  ifdef OPENSSL_SYSNAME_MACOSX_RHAPSODY\n#   define OPENSSL_SYS_MACOSX_RHAPSODY\n#   define OPENSSL_SYS_MACOSX\n#  endif\n#  ifdef OPENSSL_SYSNAME_SUNOS\n#   define OPENSSL_SYS_SUNOS\n#  endif\n#  if defined(_CRAY) || defined(OPENSSL_SYSNAME_CRAY)\n#   define OPENSSL_SYS_CRAY\n#  endif\n#  if defined(_AIX) || defined(OPENSSL_SYSNAME_AIX)\n#   define OPENSSL_SYS_AIX\n#  endif\n# endif\n\n/* -------------------------------- VOS ----------------------------------- */\n# if defined(__VOS__) || defined(OPENSSL_SYSNAME_VOS)\n#  define OPENSSL_SYS_VOS\n#  ifdef __HPPA__\n#   define OPENSSL_SYS_VOS_HPPA\n#  endif\n#  ifdef __IA32__\n#   define OPENSSL_SYS_VOS_IA32\n#  endif\n# endif\n\n/* ------------------------------ VxWorks --------------------------------- */\n# ifdef OPENSSL_SYSNAME_VXWORKS\n#  define OPENSSL_SYS_VXWORKS\n# endif\n\n/* -------------------------------- BeOS ---------------------------------- */\n# if defined(__BEOS__)\n#  define OPENSSL_SYS_BEOS\n#  include <sys/socket.h>\n#  if defined(BONE_VERSION)\n#   define OPENSSL_SYS_BEOS_BONE\n#  else\n#   define OPENSSL_SYS_BEOS_R5\n#  endif\n# endif\n\n/**\n * That's it for OS-specific stuff\n *****************************************************************************/\n\n/* Specials for I/O an exit */\n# ifdef OPENSSL_SYS_MSDOS\n#  define OPENSSL_UNISTD_IO <io.h>\n#  define OPENSSL_DECLARE_EXIT extern void exit(int);\n# else\n#  define OPENSSL_UNISTD_IO OPENSSL_UNISTD\n#  define OPENSSL_DECLARE_EXIT  /* declared in unistd.h */\n# endif\n\n/*-\n * Definitions of OPENSSL_GLOBAL and OPENSSL_EXTERN, to define and declare\n * certain global symbols that, with some compilers under VMS, have to be\n * defined and declared explicitely with globaldef and globalref.\n * Definitions of OPENSSL_EXPORT and OPENSSL_IMPORT, to define and declare\n * DLL exports and imports for compilers under Win32.  These are a little\n * more complicated to use.  Basically, for any library that exports some\n * global variables, the following code must be present in the header file\n * that declares them, before OPENSSL_EXTERN is used:\n *\n * #ifdef SOME_BUILD_FLAG_MACRO\n * # undef OPENSSL_EXTERN\n * # define OPENSSL_EXTERN OPENSSL_EXPORT\n * #endif\n *\n * The default is to have OPENSSL_EXPORT, OPENSSL_IMPORT and OPENSSL_GLOBAL\n * have some generally sensible values, and for OPENSSL_EXTERN to have the\n * value OPENSSL_IMPORT.\n */\n\n# if defined(OPENSSL_SYS_VMS_NODECC)\n#  define OPENSSL_EXPORT globalref\n#  define OPENSSL_IMPORT globalref\n#  define OPENSSL_GLOBAL globaldef\n# elif defined(OPENSSL_SYS_WINDOWS) && defined(OPENSSL_OPT_WINDLL)\n#  define OPENSSL_EXPORT extern __declspec(dllexport)\n#  define OPENSSL_IMPORT extern __declspec(dllimport)\n#  define OPENSSL_GLOBAL\n# else\n#  define OPENSSL_EXPORT extern\n#  define OPENSSL_IMPORT extern\n#  define OPENSSL_GLOBAL\n# endif\n# define OPENSSL_EXTERN OPENSSL_IMPORT\n\n/*-\n * Macros to allow global variables to be reached through function calls when\n * required (if a shared library version requires it, for example.\n * The way it's done allows definitions like this:\n *\n *      // in foobar.c\n *      OPENSSL_IMPLEMENT_GLOBAL(int,foobar,0)\n *      // in foobar.h\n *      OPENSSL_DECLARE_GLOBAL(int,foobar);\n *      #define foobar OPENSSL_GLOBAL_REF(foobar)\n */\n# ifdef OPENSSL_EXPORT_VAR_AS_FUNCTION\n#  define OPENSSL_IMPLEMENT_GLOBAL(type,name,value)                      \\\n        type *_shadow_##name(void)                                      \\\n        { static type _hide_##name=value; return &_hide_##name; }\n#  define OPENSSL_DECLARE_GLOBAL(type,name) type *_shadow_##name(void)\n#  define OPENSSL_GLOBAL_REF(name) (*(_shadow_##name()))\n# else\n#  define OPENSSL_IMPLEMENT_GLOBAL(type,name,value) OPENSSL_GLOBAL type _shadow_##name=value;\n#  define OPENSSL_DECLARE_GLOBAL(type,name) OPENSSL_EXPORT type _shadow_##name\n#  define OPENSSL_GLOBAL_REF(name) _shadow_##name\n# endif\n\n# if defined(OPENSSL_SYS_MACINTOSH_CLASSIC) && macintosh==1 && !defined(MAC_OS_GUSI_SOURCE)\n#  define ossl_ssize_t long\n# endif\n\n# ifdef OPENSSL_SYS_MSDOS\n#  define ossl_ssize_t long\n# endif\n\n# if defined(NeXT) || defined(OPENSSL_SYS_NEWS4) || defined(OPENSSL_SYS_SUNOS)\n#  define ssize_t int\n# endif\n\n# if defined(__ultrix) && !defined(ssize_t)\n#  define ossl_ssize_t int\n# endif\n\n# ifndef ossl_ssize_t\n#  define ossl_ssize_t ssize_t\n# endif\n\n#ifdef  __cplusplus\n}\n#endif\n#endif\n"
  },
  {
    "path": "Pods/OpenSSL-Universal/include-ios/openssl/ebcdic.h",
    "content": "/* crypto/ebcdic.h */\n\n#ifndef HEADER_EBCDIC_H\n# define HEADER_EBCDIC_H\n\n# include <sys/types.h>\n\n#ifdef  __cplusplus\nextern \"C\" {\n#endif\n\n/* Avoid name clashes with other applications */\n# define os_toascii   _openssl_os_toascii\n# define os_toebcdic  _openssl_os_toebcdic\n# define ebcdic2ascii _openssl_ebcdic2ascii\n# define ascii2ebcdic _openssl_ascii2ebcdic\n\nextern const unsigned char os_toascii[256];\nextern const unsigned char os_toebcdic[256];\nvoid *ebcdic2ascii(void *dest, const void *srce, size_t count);\nvoid *ascii2ebcdic(void *dest, const void *srce, size_t count);\n\n#ifdef  __cplusplus\n}\n#endif\n#endif\n"
  },
  {
    "path": "Pods/OpenSSL-Universal/include-ios/openssl/ec.h",
    "content": "/* crypto/ec/ec.h */\n/*\n * Originally written by Bodo Moeller for the OpenSSL project.\n */\n/**\n * \\file crypto/ec/ec.h Include file for the OpenSSL EC functions\n * \\author Originally written by Bodo Moeller for the OpenSSL project\n */\n/* ====================================================================\n * Copyright (c) 1998-2005 The OpenSSL Project.  All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n *\n * 1. Redistributions of source code must retain the above copyright\n *    notice, this list of conditions and the following disclaimer.\n *\n * 2. Redistributions in binary form must reproduce the above copyright\n *    notice, this list of conditions and the following disclaimer in\n *    the documentation and/or other materials provided with the\n *    distribution.\n *\n * 3. All advertising materials mentioning features or use of this\n *    software must display the following acknowledgment:\n *    \"This product includes software developed by the OpenSSL Project\n *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)\"\n *\n * 4. The names \"OpenSSL Toolkit\" and \"OpenSSL Project\" must not be used to\n *    endorse or promote products derived from this software without\n *    prior written permission. For written permission, please contact\n *    openssl-core@openssl.org.\n *\n * 5. Products derived from this software may not be called \"OpenSSL\"\n *    nor may \"OpenSSL\" appear in their names without prior written\n *    permission of the OpenSSL Project.\n *\n * 6. Redistributions of any form whatsoever must retain the following\n *    acknowledgment:\n *    \"This product includes software developed by the OpenSSL Project\n *    for use in the OpenSSL Toolkit (http://www.openssl.org/)\"\n *\n * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY\n * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\n * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR\n * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,\n * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED\n * OF THE POSSIBILITY OF SUCH DAMAGE.\n * ====================================================================\n *\n * This product includes cryptographic software written by Eric Young\n * (eay@cryptsoft.com).  This product includes software written by Tim\n * Hudson (tjh@cryptsoft.com).\n *\n */\n/* ====================================================================\n * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED.\n *\n * Portions of the attached software (\"Contribution\") are developed by\n * SUN MICROSYSTEMS, INC., and are contributed to the OpenSSL project.\n *\n * The Contribution is licensed pursuant to the OpenSSL open source\n * license provided above.\n *\n * The elliptic curve binary polynomial software is originally written by\n * Sheueling Chang Shantz and Douglas Stebila of Sun Microsystems Laboratories.\n *\n */\n\n#ifndef HEADER_EC_H\n# define HEADER_EC_H\n\n# include <openssl/opensslconf.h>\n\n# ifdef OPENSSL_NO_EC\n#  error EC is disabled.\n# endif\n\n# include <openssl/asn1.h>\n# include <openssl/symhacks.h>\n# ifndef OPENSSL_NO_DEPRECATED\n#  include <openssl/bn.h>\n# endif\n\n# ifdef  __cplusplus\nextern \"C\" {\n# elif defined(__SUNPRO_C)\n#  if __SUNPRO_C >= 0x520\n#   pragma error_messages (off,E_ARRAY_OF_INCOMPLETE_NONAME,E_ARRAY_OF_INCOMPLETE)\n#  endif\n# endif\n\n# ifndef OPENSSL_ECC_MAX_FIELD_BITS\n#  define OPENSSL_ECC_MAX_FIELD_BITS 661\n# endif\n\n/** Enum for the point conversion form as defined in X9.62 (ECDSA)\n *  for the encoding of a elliptic curve point (x,y) */\ntypedef enum {\n        /** the point is encoded as z||x, where the octet z specifies\n         *  which solution of the quadratic equation y is  */\n    POINT_CONVERSION_COMPRESSED = 2,\n        /** the point is encoded as z||x||y, where z is the octet 0x04  */\n    POINT_CONVERSION_UNCOMPRESSED = 4,\n        /** the point is encoded as z||x||y, where the octet z specifies\n         *  which solution of the quadratic equation y is  */\n    POINT_CONVERSION_HYBRID = 6\n} point_conversion_form_t;\n\ntypedef struct ec_method_st EC_METHOD;\n\ntypedef struct ec_group_st\n    /*-\n     EC_METHOD *meth;\n     -- field definition\n     -- curve coefficients\n     -- optional generator with associated information (order, cofactor)\n     -- optional extra data (precomputed table for fast computation of multiples of generator)\n     -- ASN1 stuff\n    */\n    EC_GROUP;\n\ntypedef struct ec_point_st EC_POINT;\n\n/********************************************************************/\n/*               EC_METHODs for curves over GF(p)                   */\n/********************************************************************/\n\n/** Returns the basic GFp ec methods which provides the basis for the\n *  optimized methods.\n *  \\return  EC_METHOD object\n */\nconst EC_METHOD *EC_GFp_simple_method(void);\n\n/** Returns GFp methods using montgomery multiplication.\n *  \\return  EC_METHOD object\n */\nconst EC_METHOD *EC_GFp_mont_method(void);\n\n/** Returns GFp methods using optimized methods for NIST recommended curves\n *  \\return  EC_METHOD object\n */\nconst EC_METHOD *EC_GFp_nist_method(void);\n\n# ifndef OPENSSL_NO_EC_NISTP_64_GCC_128\n/** Returns 64-bit optimized methods for nistp224\n *  \\return  EC_METHOD object\n */\nconst EC_METHOD *EC_GFp_nistp224_method(void);\n\n/** Returns 64-bit optimized methods for nistp256\n *  \\return  EC_METHOD object\n */\nconst EC_METHOD *EC_GFp_nistp256_method(void);\n\n/** Returns 64-bit optimized methods for nistp521\n *  \\return  EC_METHOD object\n */\nconst EC_METHOD *EC_GFp_nistp521_method(void);\n# endif\n\n# ifndef OPENSSL_NO_EC2M\n/********************************************************************/\n/*           EC_METHOD for curves over GF(2^m)                      */\n/********************************************************************/\n\n/** Returns the basic GF2m ec method\n *  \\return  EC_METHOD object\n */\nconst EC_METHOD *EC_GF2m_simple_method(void);\n\n# endif\n\n/********************************************************************/\n/*                   EC_GROUP functions                             */\n/********************************************************************/\n\n/** Creates a new EC_GROUP object\n *  \\param   meth  EC_METHOD to use\n *  \\return  newly created EC_GROUP object or NULL in case of an error.\n */\nEC_GROUP *EC_GROUP_new(const EC_METHOD *meth);\n\n/** Frees a EC_GROUP object\n *  \\param  group  EC_GROUP object to be freed.\n */\nvoid EC_GROUP_free(EC_GROUP *group);\n\n/** Clears and frees a EC_GROUP object\n *  \\param  group  EC_GROUP object to be cleared and freed.\n */\nvoid EC_GROUP_clear_free(EC_GROUP *group);\n\n/** Copies EC_GROUP objects. Note: both EC_GROUPs must use the same EC_METHOD.\n *  \\param  dst  destination EC_GROUP object\n *  \\param  src  source EC_GROUP object\n *  \\return 1 on success and 0 if an error occurred.\n */\nint EC_GROUP_copy(EC_GROUP *dst, const EC_GROUP *src);\n\n/** Creates a new EC_GROUP object and copies the copies the content\n *  form src to the newly created EC_KEY object\n *  \\param  src  source EC_GROUP object\n *  \\return newly created EC_GROUP object or NULL in case of an error.\n */\nEC_GROUP *EC_GROUP_dup(const EC_GROUP *src);\n\n/** Returns the EC_METHOD of the EC_GROUP object.\n *  \\param  group  EC_GROUP object\n *  \\return EC_METHOD used in this EC_GROUP object.\n */\nconst EC_METHOD *EC_GROUP_method_of(const EC_GROUP *group);\n\n/** Returns the field type of the EC_METHOD.\n *  \\param  meth  EC_METHOD object\n *  \\return NID of the underlying field type OID.\n */\nint EC_METHOD_get_field_type(const EC_METHOD *meth);\n\n/** Sets the generator and it's order/cofactor of a EC_GROUP object.\n *  \\param  group      EC_GROUP object\n *  \\param  generator  EC_POINT object with the generator.\n *  \\param  order      the order of the group generated by the generator.\n *  \\param  cofactor   the index of the sub-group generated by the generator\n *                     in the group of all points on the elliptic curve.\n *  \\return 1 on success and 0 if an error occured\n */\nint EC_GROUP_set_generator(EC_GROUP *group, const EC_POINT *generator,\n                           const BIGNUM *order, const BIGNUM *cofactor);\n\n/** Returns the generator of a EC_GROUP object.\n *  \\param  group  EC_GROUP object\n *  \\return the currently used generator (possibly NULL).\n */\nconst EC_POINT *EC_GROUP_get0_generator(const EC_GROUP *group);\n\n/** Gets the order of a EC_GROUP\n *  \\param  group  EC_GROUP object\n *  \\param  order  BIGNUM to which the order is copied\n *  \\param  ctx    BN_CTX object (optional)\n *  \\return 1 on success and 0 if an error occured\n */\nint EC_GROUP_get_order(const EC_GROUP *group, BIGNUM *order, BN_CTX *ctx);\n\n/** Gets the cofactor of a EC_GROUP\n *  \\param  group     EC_GROUP object\n *  \\param  cofactor  BIGNUM to which the cofactor is copied\n *  \\param  ctx       BN_CTX object (optional)\n *  \\return 1 on success and 0 if an error occured\n */\nint EC_GROUP_get_cofactor(const EC_GROUP *group, BIGNUM *cofactor,\n                          BN_CTX *ctx);\n\n/** Sets the name of a EC_GROUP object\n *  \\param  group  EC_GROUP object\n *  \\param  nid    NID of the curve name OID\n */\nvoid EC_GROUP_set_curve_name(EC_GROUP *group, int nid);\n\n/** Returns the curve name of a EC_GROUP object\n *  \\param  group  EC_GROUP object\n *  \\return NID of the curve name OID or 0 if not set.\n */\nint EC_GROUP_get_curve_name(const EC_GROUP *group);\n\nvoid EC_GROUP_set_asn1_flag(EC_GROUP *group, int flag);\nint EC_GROUP_get_asn1_flag(const EC_GROUP *group);\n\nvoid EC_GROUP_set_point_conversion_form(EC_GROUP *group,\n                                        point_conversion_form_t form);\npoint_conversion_form_t EC_GROUP_get_point_conversion_form(const EC_GROUP *);\n\nunsigned char *EC_GROUP_get0_seed(const EC_GROUP *x);\nsize_t EC_GROUP_get_seed_len(const EC_GROUP *);\nsize_t EC_GROUP_set_seed(EC_GROUP *, const unsigned char *, size_t len);\n\n/** Sets the parameter of a ec over GFp defined by y^2 = x^3 + a*x + b\n *  \\param  group  EC_GROUP object\n *  \\param  p      BIGNUM with the prime number\n *  \\param  a      BIGNUM with parameter a of the equation\n *  \\param  b      BIGNUM with parameter b of the equation\n *  \\param  ctx    BN_CTX object (optional)\n *  \\return 1 on success and 0 if an error occured\n */\nint EC_GROUP_set_curve_GFp(EC_GROUP *group, const BIGNUM *p, const BIGNUM *a,\n                           const BIGNUM *b, BN_CTX *ctx);\n\n/** Gets the parameter of the ec over GFp defined by y^2 = x^3 + a*x + b\n *  \\param  group  EC_GROUP object\n *  \\param  p      BIGNUM for the prime number\n *  \\param  a      BIGNUM for parameter a of the equation\n *  \\param  b      BIGNUM for parameter b of the equation\n *  \\param  ctx    BN_CTX object (optional)\n *  \\return 1 on success and 0 if an error occured\n */\nint EC_GROUP_get_curve_GFp(const EC_GROUP *group, BIGNUM *p, BIGNUM *a,\n                           BIGNUM *b, BN_CTX *ctx);\n\n# ifndef OPENSSL_NO_EC2M\n/** Sets the parameter of a ec over GF2m defined by y^2 + x*y = x^3 + a*x^2 + b\n *  \\param  group  EC_GROUP object\n *  \\param  p      BIGNUM with the polynomial defining the underlying field\n *  \\param  a      BIGNUM with parameter a of the equation\n *  \\param  b      BIGNUM with parameter b of the equation\n *  \\param  ctx    BN_CTX object (optional)\n *  \\return 1 on success and 0 if an error occured\n */\nint EC_GROUP_set_curve_GF2m(EC_GROUP *group, const BIGNUM *p, const BIGNUM *a,\n                            const BIGNUM *b, BN_CTX *ctx);\n\n/** Gets the parameter of the ec over GF2m defined by y^2 + x*y = x^3 + a*x^2 + b\n *  \\param  group  EC_GROUP object\n *  \\param  p      BIGNUM for the polynomial defining the underlying field\n *  \\param  a      BIGNUM for parameter a of the equation\n *  \\param  b      BIGNUM for parameter b of the equation\n *  \\param  ctx    BN_CTX object (optional)\n *  \\return 1 on success and 0 if an error occured\n */\nint EC_GROUP_get_curve_GF2m(const EC_GROUP *group, BIGNUM *p, BIGNUM *a,\n                            BIGNUM *b, BN_CTX *ctx);\n# endif\n/** Returns the number of bits needed to represent a field element\n *  \\param  group  EC_GROUP object\n *  \\return number of bits needed to represent a field element\n */\nint EC_GROUP_get_degree(const EC_GROUP *group);\n\n/** Checks whether the parameter in the EC_GROUP define a valid ec group\n *  \\param  group  EC_GROUP object\n *  \\param  ctx    BN_CTX object (optional)\n *  \\return 1 if group is a valid ec group and 0 otherwise\n */\nint EC_GROUP_check(const EC_GROUP *group, BN_CTX *ctx);\n\n/** Checks whether the discriminant of the elliptic curve is zero or not\n *  \\param  group  EC_GROUP object\n *  \\param  ctx    BN_CTX object (optional)\n *  \\return 1 if the discriminant is not zero and 0 otherwise\n */\nint EC_GROUP_check_discriminant(const EC_GROUP *group, BN_CTX *ctx);\n\n/** Compares two EC_GROUP objects\n *  \\param  a    first EC_GROUP object\n *  \\param  b    second EC_GROUP object\n *  \\param  ctx  BN_CTX object (optional)\n *  \\return 0 if both groups are equal and 1 otherwise\n */\nint EC_GROUP_cmp(const EC_GROUP *a, const EC_GROUP *b, BN_CTX *ctx);\n\n/*\n * EC_GROUP_new_GF*() calls EC_GROUP_new() and EC_GROUP_set_GF*() after\n * choosing an appropriate EC_METHOD\n */\n\n/** Creates a new EC_GROUP object with the specified parameters defined\n *  over GFp (defined by the equation y^2 = x^3 + a*x + b)\n *  \\param  p    BIGNUM with the prime number\n *  \\param  a    BIGNUM with the parameter a of the equation\n *  \\param  b    BIGNUM with the parameter b of the equation\n *  \\param  ctx  BN_CTX object (optional)\n *  \\return newly created EC_GROUP object with the specified parameters\n */\nEC_GROUP *EC_GROUP_new_curve_GFp(const BIGNUM *p, const BIGNUM *a,\n                                 const BIGNUM *b, BN_CTX *ctx);\n# ifndef OPENSSL_NO_EC2M\n/** Creates a new EC_GROUP object with the specified parameters defined\n *  over GF2m (defined by the equation y^2 + x*y = x^3 + a*x^2 + b)\n *  \\param  p    BIGNUM with the polynomial defining the underlying field\n *  \\param  a    BIGNUM with the parameter a of the equation\n *  \\param  b    BIGNUM with the parameter b of the equation\n *  \\param  ctx  BN_CTX object (optional)\n *  \\return newly created EC_GROUP object with the specified parameters\n */\nEC_GROUP *EC_GROUP_new_curve_GF2m(const BIGNUM *p, const BIGNUM *a,\n                                  const BIGNUM *b, BN_CTX *ctx);\n# endif\n/** Creates a EC_GROUP object with a curve specified by a NID\n *  \\param  nid  NID of the OID of the curve name\n *  \\return newly created EC_GROUP object with specified curve or NULL\n *          if an error occurred\n */\nEC_GROUP *EC_GROUP_new_by_curve_name(int nid);\n\n/********************************************************************/\n/*               handling of internal curves                        */\n/********************************************************************/\n\ntypedef struct {\n    int nid;\n    const char *comment;\n} EC_builtin_curve;\n\n/*\n * EC_builtin_curves(EC_builtin_curve *r, size_t size) returns number of all\n * available curves or zero if a error occurred. In case r ist not zero\n * nitems EC_builtin_curve structures are filled with the data of the first\n * nitems internal groups\n */\nsize_t EC_get_builtin_curves(EC_builtin_curve *r, size_t nitems);\n\n/********************************************************************/\n/*                    EC_POINT functions                            */\n/********************************************************************/\n\n/** Creates a new EC_POINT object for the specified EC_GROUP\n *  \\param  group  EC_GROUP the underlying EC_GROUP object\n *  \\return newly created EC_POINT object or NULL if an error occurred\n */\nEC_POINT *EC_POINT_new(const EC_GROUP *group);\n\n/** Frees a EC_POINT object\n *  \\param  point  EC_POINT object to be freed\n */\nvoid EC_POINT_free(EC_POINT *point);\n\n/** Clears and frees a EC_POINT object\n *  \\param  point  EC_POINT object to be cleared and freed\n */\nvoid EC_POINT_clear_free(EC_POINT *point);\n\n/** Copies EC_POINT object\n *  \\param  dst  destination EC_POINT object\n *  \\param  src  source EC_POINT object\n *  \\return 1 on success and 0 if an error occured\n */\nint EC_POINT_copy(EC_POINT *dst, const EC_POINT *src);\n\n/** Creates a new EC_POINT object and copies the content of the supplied\n *  EC_POINT\n *  \\param  src    source EC_POINT object\n *  \\param  group  underlying the EC_GROUP object\n *  \\return newly created EC_POINT object or NULL if an error occurred\n */\nEC_POINT *EC_POINT_dup(const EC_POINT *src, const EC_GROUP *group);\n\n/** Returns the EC_METHOD used in EC_POINT object\n *  \\param  point  EC_POINT object\n *  \\return the EC_METHOD used\n */\nconst EC_METHOD *EC_POINT_method_of(const EC_POINT *point);\n\n/** Sets a point to infinity (neutral element)\n *  \\param  group  underlying EC_GROUP object\n *  \\param  point  EC_POINT to set to infinity\n *  \\return 1 on success and 0 if an error occured\n */\nint EC_POINT_set_to_infinity(const EC_GROUP *group, EC_POINT *point);\n\n/** Sets the jacobian projective coordinates of a EC_POINT over GFp\n *  \\param  group  underlying EC_GROUP object\n *  \\param  p      EC_POINT object\n *  \\param  x      BIGNUM with the x-coordinate\n *  \\param  y      BIGNUM with the y-coordinate\n *  \\param  z      BIGNUM with the z-coordinate\n *  \\param  ctx    BN_CTX object (optional)\n *  \\return 1 on success and 0 if an error occured\n */\nint EC_POINT_set_Jprojective_coordinates_GFp(const EC_GROUP *group,\n                                             EC_POINT *p, const BIGNUM *x,\n                                             const BIGNUM *y, const BIGNUM *z,\n                                             BN_CTX *ctx);\n\n/** Gets the jacobian projective coordinates of a EC_POINT over GFp\n *  \\param  group  underlying EC_GROUP object\n *  \\param  p      EC_POINT object\n *  \\param  x      BIGNUM for the x-coordinate\n *  \\param  y      BIGNUM for the y-coordinate\n *  \\param  z      BIGNUM for the z-coordinate\n *  \\param  ctx    BN_CTX object (optional)\n *  \\return 1 on success and 0 if an error occured\n */\nint EC_POINT_get_Jprojective_coordinates_GFp(const EC_GROUP *group,\n                                             const EC_POINT *p, BIGNUM *x,\n                                             BIGNUM *y, BIGNUM *z,\n                                             BN_CTX *ctx);\n\n/** Sets the affine coordinates of a EC_POINT over GFp\n *  \\param  group  underlying EC_GROUP object\n *  \\param  p      EC_POINT object\n *  \\param  x      BIGNUM with the x-coordinate\n *  \\param  y      BIGNUM with the y-coordinate\n *  \\param  ctx    BN_CTX object (optional)\n *  \\return 1 on success and 0 if an error occured\n */\nint EC_POINT_set_affine_coordinates_GFp(const EC_GROUP *group, EC_POINT *p,\n                                        const BIGNUM *x, const BIGNUM *y,\n                                        BN_CTX *ctx);\n\n/** Gets the affine coordinates of a EC_POINT over GFp\n *  \\param  group  underlying EC_GROUP object\n *  \\param  p      EC_POINT object\n *  \\param  x      BIGNUM for the x-coordinate\n *  \\param  y      BIGNUM for the y-coordinate\n *  \\param  ctx    BN_CTX object (optional)\n *  \\return 1 on success and 0 if an error occured\n */\nint EC_POINT_get_affine_coordinates_GFp(const EC_GROUP *group,\n                                        const EC_POINT *p, BIGNUM *x,\n                                        BIGNUM *y, BN_CTX *ctx);\n\n/** Sets the x9.62 compressed coordinates of a EC_POINT over GFp\n *  \\param  group  underlying EC_GROUP object\n *  \\param  p      EC_POINT object\n *  \\param  x      BIGNUM with x-coordinate\n *  \\param  y_bit  integer with the y-Bit (either 0 or 1)\n *  \\param  ctx    BN_CTX object (optional)\n *  \\return 1 on success and 0 if an error occured\n */\nint EC_POINT_set_compressed_coordinates_GFp(const EC_GROUP *group,\n                                            EC_POINT *p, const BIGNUM *x,\n                                            int y_bit, BN_CTX *ctx);\n# ifndef OPENSSL_NO_EC2M\n/** Sets the affine coordinates of a EC_POINT over GF2m\n *  \\param  group  underlying EC_GROUP object\n *  \\param  p      EC_POINT object\n *  \\param  x      BIGNUM with the x-coordinate\n *  \\param  y      BIGNUM with the y-coordinate\n *  \\param  ctx    BN_CTX object (optional)\n *  \\return 1 on success and 0 if an error occured\n */\nint EC_POINT_set_affine_coordinates_GF2m(const EC_GROUP *group, EC_POINT *p,\n                                         const BIGNUM *x, const BIGNUM *y,\n                                         BN_CTX *ctx);\n\n/** Gets the affine coordinates of a EC_POINT over GF2m\n *  \\param  group  underlying EC_GROUP object\n *  \\param  p      EC_POINT object\n *  \\param  x      BIGNUM for the x-coordinate\n *  \\param  y      BIGNUM for the y-coordinate\n *  \\param  ctx    BN_CTX object (optional)\n *  \\return 1 on success and 0 if an error occured\n */\nint EC_POINT_get_affine_coordinates_GF2m(const EC_GROUP *group,\n                                         const EC_POINT *p, BIGNUM *x,\n                                         BIGNUM *y, BN_CTX *ctx);\n\n/** Sets the x9.62 compressed coordinates of a EC_POINT over GF2m\n *  \\param  group  underlying EC_GROUP object\n *  \\param  p      EC_POINT object\n *  \\param  x      BIGNUM with x-coordinate\n *  \\param  y_bit  integer with the y-Bit (either 0 or 1)\n *  \\param  ctx    BN_CTX object (optional)\n *  \\return 1 on success and 0 if an error occured\n */\nint EC_POINT_set_compressed_coordinates_GF2m(const EC_GROUP *group,\n                                             EC_POINT *p, const BIGNUM *x,\n                                             int y_bit, BN_CTX *ctx);\n# endif\n/** Encodes a EC_POINT object to a octet string\n *  \\param  group  underlying EC_GROUP object\n *  \\param  p      EC_POINT object\n *  \\param  form   point conversion form\n *  \\param  buf    memory buffer for the result. If NULL the function returns\n *                 required buffer size.\n *  \\param  len    length of the memory buffer\n *  \\param  ctx    BN_CTX object (optional)\n *  \\return the length of the encoded octet string or 0 if an error occurred\n */\nsize_t EC_POINT_point2oct(const EC_GROUP *group, const EC_POINT *p,\n                          point_conversion_form_t form,\n                          unsigned char *buf, size_t len, BN_CTX *ctx);\n\n/** Decodes a EC_POINT from a octet string\n *  \\param  group  underlying EC_GROUP object\n *  \\param  p      EC_POINT object\n *  \\param  buf    memory buffer with the encoded ec point\n *  \\param  len    length of the encoded ec point\n *  \\param  ctx    BN_CTX object (optional)\n *  \\return 1 on success and 0 if an error occured\n */\nint EC_POINT_oct2point(const EC_GROUP *group, EC_POINT *p,\n                       const unsigned char *buf, size_t len, BN_CTX *ctx);\n\n/* other interfaces to point2oct/oct2point: */\nBIGNUM *EC_POINT_point2bn(const EC_GROUP *, const EC_POINT *,\n                          point_conversion_form_t form, BIGNUM *, BN_CTX *);\nEC_POINT *EC_POINT_bn2point(const EC_GROUP *, const BIGNUM *,\n                            EC_POINT *, BN_CTX *);\nchar *EC_POINT_point2hex(const EC_GROUP *, const EC_POINT *,\n                         point_conversion_form_t form, BN_CTX *);\nEC_POINT *EC_POINT_hex2point(const EC_GROUP *, const char *,\n                             EC_POINT *, BN_CTX *);\n\n/********************************************************************/\n/*         functions for doing EC_POINT arithmetic                  */\n/********************************************************************/\n\n/** Computes the sum of two EC_POINT\n *  \\param  group  underlying EC_GROUP object\n *  \\param  r      EC_POINT object for the result (r = a + b)\n *  \\param  a      EC_POINT object with the first summand\n *  \\param  b      EC_POINT object with the second summand\n *  \\param  ctx    BN_CTX object (optional)\n *  \\return 1 on success and 0 if an error occured\n */\nint EC_POINT_add(const EC_GROUP *group, EC_POINT *r, const EC_POINT *a,\n                 const EC_POINT *b, BN_CTX *ctx);\n\n/** Computes the double of a EC_POINT\n *  \\param  group  underlying EC_GROUP object\n *  \\param  r      EC_POINT object for the result (r = 2 * a)\n *  \\param  a      EC_POINT object\n *  \\param  ctx    BN_CTX object (optional)\n *  \\return 1 on success and 0 if an error occured\n */\nint EC_POINT_dbl(const EC_GROUP *group, EC_POINT *r, const EC_POINT *a,\n                 BN_CTX *ctx);\n\n/** Computes the inverse of a EC_POINT\n *  \\param  group  underlying EC_GROUP object\n *  \\param  a      EC_POINT object to be inverted (it's used for the result as well)\n *  \\param  ctx    BN_CTX object (optional)\n *  \\return 1 on success and 0 if an error occured\n */\nint EC_POINT_invert(const EC_GROUP *group, EC_POINT *a, BN_CTX *ctx);\n\n/** Checks whether the point is the neutral element of the group\n *  \\param  group  the underlying EC_GROUP object\n *  \\param  p      EC_POINT object\n *  \\return 1 if the point is the neutral element and 0 otherwise\n */\nint EC_POINT_is_at_infinity(const EC_GROUP *group, const EC_POINT *p);\n\n/** Checks whether the point is on the curve\n *  \\param  group  underlying EC_GROUP object\n *  \\param  point  EC_POINT object to check\n *  \\param  ctx    BN_CTX object (optional)\n *  \\return 1 if point if on the curve and 0 otherwise\n */\nint EC_POINT_is_on_curve(const EC_GROUP *group, const EC_POINT *point,\n                         BN_CTX *ctx);\n\n/** Compares two EC_POINTs\n *  \\param  group  underlying EC_GROUP object\n *  \\param  a      first EC_POINT object\n *  \\param  b      second EC_POINT object\n *  \\param  ctx    BN_CTX object (optional)\n *  \\return 0 if both points are equal and a value != 0 otherwise\n */\nint EC_POINT_cmp(const EC_GROUP *group, const EC_POINT *a, const EC_POINT *b,\n                 BN_CTX *ctx);\n\nint EC_POINT_make_affine(const EC_GROUP *group, EC_POINT *point, BN_CTX *ctx);\nint EC_POINTs_make_affine(const EC_GROUP *group, size_t num,\n                          EC_POINT *points[], BN_CTX *ctx);\n\n/** Computes r = generator * n sum_{i=0}^{num-1} p[i] * m[i]\n *  \\param  group  underlying EC_GROUP object\n *  \\param  r      EC_POINT object for the result\n *  \\param  n      BIGNUM with the multiplier for the group generator (optional)\n *  \\param  num    number futher summands\n *  \\param  p      array of size num of EC_POINT objects\n *  \\param  m      array of size num of BIGNUM objects\n *  \\param  ctx    BN_CTX object (optional)\n *  \\return 1 on success and 0 if an error occured\n */\nint EC_POINTs_mul(const EC_GROUP *group, EC_POINT *r, const BIGNUM *n,\n                  size_t num, const EC_POINT *p[], const BIGNUM *m[],\n                  BN_CTX *ctx);\n\n/** Computes r = generator * n + q * m\n *  \\param  group  underlying EC_GROUP object\n *  \\param  r      EC_POINT object for the result\n *  \\param  n      BIGNUM with the multiplier for the group generator (optional)\n *  \\param  q      EC_POINT object with the first factor of the second summand\n *  \\param  m      BIGNUM with the second factor of the second summand\n *  \\param  ctx    BN_CTX object (optional)\n *  \\return 1 on success and 0 if an error occured\n */\nint EC_POINT_mul(const EC_GROUP *group, EC_POINT *r, const BIGNUM *n,\n                 const EC_POINT *q, const BIGNUM *m, BN_CTX *ctx);\n\n/** Stores multiples of generator for faster point multiplication\n *  \\param  group  EC_GROUP object\n *  \\param  ctx    BN_CTX object (optional)\n *  \\return 1 on success and 0 if an error occured\n */\nint EC_GROUP_precompute_mult(EC_GROUP *group, BN_CTX *ctx);\n\n/** Reports whether a precomputation has been done\n *  \\param  group  EC_GROUP object\n *  \\return 1 if a pre-computation has been done and 0 otherwise\n */\nint EC_GROUP_have_precompute_mult(const EC_GROUP *group);\n\n/********************************************************************/\n/*                       ASN1 stuff                                 */\n/********************************************************************/\n\n/*\n * EC_GROUP_get_basis_type() returns the NID of the basis type used to\n * represent the field elements\n */\nint EC_GROUP_get_basis_type(const EC_GROUP *);\n# ifndef OPENSSL_NO_EC2M\nint EC_GROUP_get_trinomial_basis(const EC_GROUP *, unsigned int *k);\nint EC_GROUP_get_pentanomial_basis(const EC_GROUP *, unsigned int *k1,\n                                   unsigned int *k2, unsigned int *k3);\n# endif\n\n# define OPENSSL_EC_NAMED_CURVE  0x001\n\ntypedef struct ecpk_parameters_st ECPKPARAMETERS;\n\nEC_GROUP *d2i_ECPKParameters(EC_GROUP **, const unsigned char **in, long len);\nint i2d_ECPKParameters(const EC_GROUP *, unsigned char **out);\n\n# define d2i_ECPKParameters_bio(bp,x) ASN1_d2i_bio_of(EC_GROUP,NULL,d2i_ECPKParameters,bp,x)\n# define i2d_ECPKParameters_bio(bp,x) ASN1_i2d_bio_of_const(EC_GROUP,i2d_ECPKParameters,bp,x)\n# define d2i_ECPKParameters_fp(fp,x) (EC_GROUP *)ASN1_d2i_fp(NULL, \\\n                (char *(*)())d2i_ECPKParameters,(fp),(unsigned char **)(x))\n# define i2d_ECPKParameters_fp(fp,x) ASN1_i2d_fp(i2d_ECPKParameters,(fp), \\\n                (unsigned char *)(x))\n\n# ifndef OPENSSL_NO_BIO\nint ECPKParameters_print(BIO *bp, const EC_GROUP *x, int off);\n# endif\n# ifndef OPENSSL_NO_FP_API\nint ECPKParameters_print_fp(FILE *fp, const EC_GROUP *x, int off);\n# endif\n\n/********************************************************************/\n/*                      EC_KEY functions                            */\n/********************************************************************/\n\ntypedef struct ec_key_st EC_KEY;\n\n/* some values for the encoding_flag */\n# define EC_PKEY_NO_PARAMETERS   0x001\n# define EC_PKEY_NO_PUBKEY       0x002\n\n/* some values for the flags field */\n# define EC_FLAG_NON_FIPS_ALLOW  0x1\n# define EC_FLAG_FIPS_CHECKED    0x2\n\n/** Creates a new EC_KEY object.\n *  \\return EC_KEY object or NULL if an error occurred.\n */\nEC_KEY *EC_KEY_new(void);\n\nint EC_KEY_get_flags(const EC_KEY *key);\n\nvoid EC_KEY_set_flags(EC_KEY *key, int flags);\n\nvoid EC_KEY_clear_flags(EC_KEY *key, int flags);\n\n/** Creates a new EC_KEY object using a named curve as underlying\n *  EC_GROUP object.\n *  \\param  nid  NID of the named curve.\n *  \\return EC_KEY object or NULL if an error occurred.\n */\nEC_KEY *EC_KEY_new_by_curve_name(int nid);\n\n/** Frees a EC_KEY object.\n *  \\param  key  EC_KEY object to be freed.\n */\nvoid EC_KEY_free(EC_KEY *key);\n\n/** Copies a EC_KEY object.\n *  \\param  dst  destination EC_KEY object\n *  \\param  src  src EC_KEY object\n *  \\return dst or NULL if an error occurred.\n */\nEC_KEY *EC_KEY_copy(EC_KEY *dst, const EC_KEY *src);\n\n/** Creates a new EC_KEY object and copies the content from src to it.\n *  \\param  src  the source EC_KEY object\n *  \\return newly created EC_KEY object or NULL if an error occurred.\n */\nEC_KEY *EC_KEY_dup(const EC_KEY *src);\n\n/** Increases the internal reference count of a EC_KEY object.\n *  \\param  key  EC_KEY object\n *  \\return 1 on success and 0 if an error occurred.\n */\nint EC_KEY_up_ref(EC_KEY *key);\n\n/** Returns the EC_GROUP object of a EC_KEY object\n *  \\param  key  EC_KEY object\n *  \\return the EC_GROUP object (possibly NULL).\n */\nconst EC_GROUP *EC_KEY_get0_group(const EC_KEY *key);\n\n/** Sets the EC_GROUP of a EC_KEY object.\n *  \\param  key    EC_KEY object\n *  \\param  group  EC_GROUP to use in the EC_KEY object (note: the EC_KEY\n *                 object will use an own copy of the EC_GROUP).\n *  \\return 1 on success and 0 if an error occurred.\n */\nint EC_KEY_set_group(EC_KEY *key, const EC_GROUP *group);\n\n/** Returns the private key of a EC_KEY object.\n *  \\param  key  EC_KEY object\n *  \\return a BIGNUM with the private key (possibly NULL).\n */\nconst BIGNUM *EC_KEY_get0_private_key(const EC_KEY *key);\n\n/** Sets the private key of a EC_KEY object.\n *  \\param  key  EC_KEY object\n *  \\param  prv  BIGNUM with the private key (note: the EC_KEY object\n *               will use an own copy of the BIGNUM).\n *  \\return 1 on success and 0 if an error occurred.\n */\nint EC_KEY_set_private_key(EC_KEY *key, const BIGNUM *prv);\n\n/** Returns the public key of a EC_KEY object.\n *  \\param  key  the EC_KEY object\n *  \\return a EC_POINT object with the public key (possibly NULL)\n */\nconst EC_POINT *EC_KEY_get0_public_key(const EC_KEY *key);\n\n/** Sets the public key of a EC_KEY object.\n *  \\param  key  EC_KEY object\n *  \\param  pub  EC_POINT object with the public key (note: the EC_KEY object\n *               will use an own copy of the EC_POINT object).\n *  \\return 1 on success and 0 if an error occurred.\n */\nint EC_KEY_set_public_key(EC_KEY *key, const EC_POINT *pub);\n\nunsigned EC_KEY_get_enc_flags(const EC_KEY *key);\nvoid EC_KEY_set_enc_flags(EC_KEY *eckey, unsigned int flags);\npoint_conversion_form_t EC_KEY_get_conv_form(const EC_KEY *key);\nvoid EC_KEY_set_conv_form(EC_KEY *eckey, point_conversion_form_t cform);\n/* functions to set/get method specific data  */\nvoid *EC_KEY_get_key_method_data(EC_KEY *key,\n                                 void *(*dup_func) (void *),\n                                 void (*free_func) (void *),\n                                 void (*clear_free_func) (void *));\n/** Sets the key method data of an EC_KEY object, if none has yet been set.\n *  \\param  key              EC_KEY object\n *  \\param  data             opaque data to install.\n *  \\param  dup_func         a function that duplicates |data|.\n *  \\param  free_func        a function that frees |data|.\n *  \\param  clear_free_func  a function that wipes and frees |data|.\n *  \\return the previously set data pointer, or NULL if |data| was inserted.\n */\nvoid *EC_KEY_insert_key_method_data(EC_KEY *key, void *data,\n                                    void *(*dup_func) (void *),\n                                    void (*free_func) (void *),\n                                    void (*clear_free_func) (void *));\n/* wrapper functions for the underlying EC_GROUP object */\nvoid EC_KEY_set_asn1_flag(EC_KEY *eckey, int asn1_flag);\n\n/** Creates a table of pre-computed multiples of the generator to\n *  accelerate further EC_KEY operations.\n *  \\param  key  EC_KEY object\n *  \\param  ctx  BN_CTX object (optional)\n *  \\return 1 on success and 0 if an error occurred.\n */\nint EC_KEY_precompute_mult(EC_KEY *key, BN_CTX *ctx);\n\n/** Creates a new ec private (and optional a new public) key.\n *  \\param  key  EC_KEY object\n *  \\return 1 on success and 0 if an error occurred.\n */\nint EC_KEY_generate_key(EC_KEY *key);\n\n/** Verifies that a private and/or public key is valid.\n *  \\param  key  the EC_KEY object\n *  \\return 1 on success and 0 otherwise.\n */\nint EC_KEY_check_key(const EC_KEY *key);\n\n/** Sets a public key from affine coordindates performing\n *  neccessary NIST PKV tests.\n *  \\param  key  the EC_KEY object\n *  \\param  x    public key x coordinate\n *  \\param  y    public key y coordinate\n *  \\return 1 on success and 0 otherwise.\n */\nint EC_KEY_set_public_key_affine_coordinates(EC_KEY *key, BIGNUM *x,\n                                             BIGNUM *y);\n\n/********************************************************************/\n/*        de- and encoding functions for SEC1 ECPrivateKey          */\n/********************************************************************/\n\n/** Decodes a private key from a memory buffer.\n *  \\param  key  a pointer to a EC_KEY object which should be used (or NULL)\n *  \\param  in   pointer to memory with the DER encoded private key\n *  \\param  len  length of the DER encoded private key\n *  \\return the decoded private key or NULL if an error occurred.\n */\nEC_KEY *d2i_ECPrivateKey(EC_KEY **key, const unsigned char **in, long len);\n\n/** Encodes a private key object and stores the result in a buffer.\n *  \\param  key  the EC_KEY object to encode\n *  \\param  out  the buffer for the result (if NULL the function returns number\n *               of bytes needed).\n *  \\return 1 on success and 0 if an error occurred.\n */\nint i2d_ECPrivateKey(EC_KEY *key, unsigned char **out);\n\n/********************************************************************/\n/*        de- and encoding functions for EC parameters              */\n/********************************************************************/\n\n/** Decodes ec parameter from a memory buffer.\n *  \\param  key  a pointer to a EC_KEY object which should be used (or NULL)\n *  \\param  in   pointer to memory with the DER encoded ec parameters\n *  \\param  len  length of the DER encoded ec parameters\n *  \\return a EC_KEY object with the decoded parameters or NULL if an error\n *          occurred.\n */\nEC_KEY *d2i_ECParameters(EC_KEY **key, const unsigned char **in, long len);\n\n/** Encodes ec parameter and stores the result in a buffer.\n *  \\param  key  the EC_KEY object with ec paramters to encode\n *  \\param  out  the buffer for the result (if NULL the function returns number\n *               of bytes needed).\n *  \\return 1 on success and 0 if an error occurred.\n */\nint i2d_ECParameters(EC_KEY *key, unsigned char **out);\n\n/********************************************************************/\n/*         de- and encoding functions for EC public key             */\n/*         (octet string, not DER -- hence 'o2i' and 'i2o')         */\n/********************************************************************/\n\n/** Decodes a ec public key from a octet string.\n *  \\param  key  a pointer to a EC_KEY object which should be used\n *  \\param  in   memory buffer with the encoded public key\n *  \\param  len  length of the encoded public key\n *  \\return EC_KEY object with decoded public key or NULL if an error\n *          occurred.\n */\nEC_KEY *o2i_ECPublicKey(EC_KEY **key, const unsigned char **in, long len);\n\n/** Encodes a ec public key in an octet string.\n *  \\param  key  the EC_KEY object with the public key\n *  \\param  out  the buffer for the result (if NULL the function returns number\n *               of bytes needed).\n *  \\return 1 on success and 0 if an error occurred\n */\nint i2o_ECPublicKey(EC_KEY *key, unsigned char **out);\n\n# ifndef OPENSSL_NO_BIO\n/** Prints out the ec parameters on human readable form.\n *  \\param  bp   BIO object to which the information is printed\n *  \\param  key  EC_KEY object\n *  \\return 1 on success and 0 if an error occurred\n */\nint ECParameters_print(BIO *bp, const EC_KEY *key);\n\n/** Prints out the contents of a EC_KEY object\n *  \\param  bp   BIO object to which the information is printed\n *  \\param  key  EC_KEY object\n *  \\param  off  line offset\n *  \\return 1 on success and 0 if an error occurred\n */\nint EC_KEY_print(BIO *bp, const EC_KEY *key, int off);\n\n# endif\n# ifndef OPENSSL_NO_FP_API\n/** Prints out the ec parameters on human readable form.\n *  \\param  fp   file descriptor to which the information is printed\n *  \\param  key  EC_KEY object\n *  \\return 1 on success and 0 if an error occurred\n */\nint ECParameters_print_fp(FILE *fp, const EC_KEY *key);\n\n/** Prints out the contents of a EC_KEY object\n *  \\param  fp   file descriptor to which the information is printed\n *  \\param  key  EC_KEY object\n *  \\param  off  line offset\n *  \\return 1 on success and 0 if an error occurred\n */\nint EC_KEY_print_fp(FILE *fp, const EC_KEY *key, int off);\n\n# endif\n\n# define ECParameters_dup(x) ASN1_dup_of(EC_KEY,i2d_ECParameters,d2i_ECParameters,x)\n\n# ifndef __cplusplus\n#  if defined(__SUNPRO_C)\n#   if __SUNPRO_C >= 0x520\n#    pragma error_messages (default,E_ARRAY_OF_INCOMPLETE_NONAME,E_ARRAY_OF_INCOMPLETE)\n#   endif\n#  endif\n# endif\n\n# define EVP_PKEY_CTX_set_ec_paramgen_curve_nid(ctx, nid) \\\n        EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_EC, EVP_PKEY_OP_PARAMGEN, \\\n                                EVP_PKEY_CTRL_EC_PARAMGEN_CURVE_NID, nid, NULL)\n\n# define EVP_PKEY_CTRL_EC_PARAMGEN_CURVE_NID             (EVP_PKEY_ALG_CTRL + 1)\n\n/* BEGIN ERROR CODES */\n/*\n * The following lines are auto generated by the script mkerr.pl. Any changes\n * made after this point may be overwritten when the script is next run.\n */\nvoid ERR_load_EC_strings(void);\n\n/* Error codes for the EC functions. */\n\n/* Function codes. */\n# define EC_F_BN_TO_FELEM                                 224\n# define EC_F_COMPUTE_WNAF                                143\n# define EC_F_D2I_ECPARAMETERS                            144\n# define EC_F_D2I_ECPKPARAMETERS                          145\n# define EC_F_D2I_ECPRIVATEKEY                            146\n# define EC_F_DO_EC_KEY_PRINT                             221\n# define EC_F_ECKEY_PARAM2TYPE                            223\n# define EC_F_ECKEY_PARAM_DECODE                          212\n# define EC_F_ECKEY_PRIV_DECODE                           213\n# define EC_F_ECKEY_PRIV_ENCODE                           214\n# define EC_F_ECKEY_PUB_DECODE                            215\n# define EC_F_ECKEY_PUB_ENCODE                            216\n# define EC_F_ECKEY_TYPE2PARAM                            220\n# define EC_F_ECPARAMETERS_PRINT                          147\n# define EC_F_ECPARAMETERS_PRINT_FP                       148\n# define EC_F_ECPKPARAMETERS_PRINT                        149\n# define EC_F_ECPKPARAMETERS_PRINT_FP                     150\n# define EC_F_ECP_NIST_MOD_192                            203\n# define EC_F_ECP_NIST_MOD_224                            204\n# define EC_F_ECP_NIST_MOD_256                            205\n# define EC_F_ECP_NIST_MOD_521                            206\n# define EC_F_EC_ASN1_GROUP2CURVE                         153\n# define EC_F_EC_ASN1_GROUP2FIELDID                       154\n# define EC_F_EC_ASN1_GROUP2PARAMETERS                    155\n# define EC_F_EC_ASN1_GROUP2PKPARAMETERS                  156\n# define EC_F_EC_ASN1_PARAMETERS2GROUP                    157\n# define EC_F_EC_ASN1_PKPARAMETERS2GROUP                  158\n# define EC_F_EC_EX_DATA_SET_DATA                         211\n# define EC_F_EC_GF2M_MONTGOMERY_POINT_MULTIPLY           208\n# define EC_F_EC_GF2M_SIMPLE_GROUP_CHECK_DISCRIMINANT     159\n# define EC_F_EC_GF2M_SIMPLE_GROUP_SET_CURVE              195\n# define EC_F_EC_GF2M_SIMPLE_OCT2POINT                    160\n# define EC_F_EC_GF2M_SIMPLE_POINT2OCT                    161\n# define EC_F_EC_GF2M_SIMPLE_POINT_GET_AFFINE_COORDINATES 162\n# define EC_F_EC_GF2M_SIMPLE_POINT_SET_AFFINE_COORDINATES 163\n# define EC_F_EC_GF2M_SIMPLE_SET_COMPRESSED_COORDINATES   164\n# define EC_F_EC_GFP_MONT_FIELD_DECODE                    133\n# define EC_F_EC_GFP_MONT_FIELD_ENCODE                    134\n# define EC_F_EC_GFP_MONT_FIELD_MUL                       131\n# define EC_F_EC_GFP_MONT_FIELD_SET_TO_ONE                209\n# define EC_F_EC_GFP_MONT_FIELD_SQR                       132\n# define EC_F_EC_GFP_MONT_GROUP_SET_CURVE                 189\n# define EC_F_EC_GFP_MONT_GROUP_SET_CURVE_GFP             135\n# define EC_F_EC_GFP_NISTP224_GROUP_SET_CURVE             225\n# define EC_F_EC_GFP_NISTP224_POINTS_MUL                  228\n# define EC_F_EC_GFP_NISTP224_POINT_GET_AFFINE_COORDINATES 226\n# define EC_F_EC_GFP_NISTP256_GROUP_SET_CURVE             230\n# define EC_F_EC_GFP_NISTP256_POINTS_MUL                  231\n# define EC_F_EC_GFP_NISTP256_POINT_GET_AFFINE_COORDINATES 232\n# define EC_F_EC_GFP_NISTP521_GROUP_SET_CURVE             233\n# define EC_F_EC_GFP_NISTP521_POINTS_MUL                  234\n# define EC_F_EC_GFP_NISTP521_POINT_GET_AFFINE_COORDINATES 235\n# define EC_F_EC_GFP_NIST_FIELD_MUL                       200\n# define EC_F_EC_GFP_NIST_FIELD_SQR                       201\n# define EC_F_EC_GFP_NIST_GROUP_SET_CURVE                 202\n# define EC_F_EC_GFP_SIMPLE_GROUP_CHECK_DISCRIMINANT      165\n# define EC_F_EC_GFP_SIMPLE_GROUP_SET_CURVE               166\n# define EC_F_EC_GFP_SIMPLE_GROUP_SET_CURVE_GFP           100\n# define EC_F_EC_GFP_SIMPLE_GROUP_SET_GENERATOR           101\n# define EC_F_EC_GFP_SIMPLE_MAKE_AFFINE                   102\n# define EC_F_EC_GFP_SIMPLE_OCT2POINT                     103\n# define EC_F_EC_GFP_SIMPLE_POINT2OCT                     104\n# define EC_F_EC_GFP_SIMPLE_POINTS_MAKE_AFFINE            137\n# define EC_F_EC_GFP_SIMPLE_POINT_GET_AFFINE_COORDINATES  167\n# define EC_F_EC_GFP_SIMPLE_POINT_GET_AFFINE_COORDINATES_GFP 105\n# define EC_F_EC_GFP_SIMPLE_POINT_SET_AFFINE_COORDINATES  168\n# define EC_F_EC_GFP_SIMPLE_POINT_SET_AFFINE_COORDINATES_GFP 128\n# define EC_F_EC_GFP_SIMPLE_SET_COMPRESSED_COORDINATES    169\n# define EC_F_EC_GFP_SIMPLE_SET_COMPRESSED_COORDINATES_GFP 129\n# define EC_F_EC_GROUP_CHECK                              170\n# define EC_F_EC_GROUP_CHECK_DISCRIMINANT                 171\n# define EC_F_EC_GROUP_COPY                               106\n# define EC_F_EC_GROUP_GET0_GENERATOR                     139\n# define EC_F_EC_GROUP_GET_COFACTOR                       140\n# define EC_F_EC_GROUP_GET_CURVE_GF2M                     172\n# define EC_F_EC_GROUP_GET_CURVE_GFP                      130\n# define EC_F_EC_GROUP_GET_DEGREE                         173\n# define EC_F_EC_GROUP_GET_ORDER                          141\n# define EC_F_EC_GROUP_GET_PENTANOMIAL_BASIS              193\n# define EC_F_EC_GROUP_GET_TRINOMIAL_BASIS                194\n# define EC_F_EC_GROUP_NEW                                108\n# define EC_F_EC_GROUP_NEW_BY_CURVE_NAME                  174\n# define EC_F_EC_GROUP_NEW_FROM_DATA                      175\n# define EC_F_EC_GROUP_PRECOMPUTE_MULT                    142\n# define EC_F_EC_GROUP_SET_CURVE_GF2M                     176\n# define EC_F_EC_GROUP_SET_CURVE_GFP                      109\n# define EC_F_EC_GROUP_SET_EXTRA_DATA                     110\n# define EC_F_EC_GROUP_SET_GENERATOR                      111\n# define EC_F_EC_KEY_CHECK_KEY                            177\n# define EC_F_EC_KEY_COPY                                 178\n# define EC_F_EC_KEY_GENERATE_KEY                         179\n# define EC_F_EC_KEY_NEW                                  182\n# define EC_F_EC_KEY_PRINT                                180\n# define EC_F_EC_KEY_PRINT_FP                             181\n# define EC_F_EC_KEY_SET_PUBLIC_KEY_AFFINE_COORDINATES    229\n# define EC_F_EC_POINTS_MAKE_AFFINE                       136\n# define EC_F_EC_POINT_ADD                                112\n# define EC_F_EC_POINT_CMP                                113\n# define EC_F_EC_POINT_COPY                               114\n# define EC_F_EC_POINT_DBL                                115\n# define EC_F_EC_POINT_GET_AFFINE_COORDINATES_GF2M        183\n# define EC_F_EC_POINT_GET_AFFINE_COORDINATES_GFP         116\n# define EC_F_EC_POINT_GET_JPROJECTIVE_COORDINATES_GFP    117\n# define EC_F_EC_POINT_INVERT                             210\n# define EC_F_EC_POINT_IS_AT_INFINITY                     118\n# define EC_F_EC_POINT_IS_ON_CURVE                        119\n# define EC_F_EC_POINT_MAKE_AFFINE                        120\n# define EC_F_EC_POINT_MUL                                184\n# define EC_F_EC_POINT_NEW                                121\n# define EC_F_EC_POINT_OCT2POINT                          122\n# define EC_F_EC_POINT_POINT2OCT                          123\n# define EC_F_EC_POINT_SET_AFFINE_COORDINATES_GF2M        185\n# define EC_F_EC_POINT_SET_AFFINE_COORDINATES_GFP         124\n# define EC_F_EC_POINT_SET_COMPRESSED_COORDINATES_GF2M    186\n# define EC_F_EC_POINT_SET_COMPRESSED_COORDINATES_GFP     125\n# define EC_F_EC_POINT_SET_JPROJECTIVE_COORDINATES_GFP    126\n# define EC_F_EC_POINT_SET_TO_INFINITY                    127\n# define EC_F_EC_PRE_COMP_DUP                             207\n# define EC_F_EC_PRE_COMP_NEW                             196\n# define EC_F_EC_WNAF_MUL                                 187\n# define EC_F_EC_WNAF_PRECOMPUTE_MULT                     188\n# define EC_F_I2D_ECPARAMETERS                            190\n# define EC_F_I2D_ECPKPARAMETERS                          191\n# define EC_F_I2D_ECPRIVATEKEY                            192\n# define EC_F_I2O_ECPUBLICKEY                             151\n# define EC_F_NISTP224_PRE_COMP_NEW                       227\n# define EC_F_NISTP256_PRE_COMP_NEW                       236\n# define EC_F_NISTP521_PRE_COMP_NEW                       237\n# define EC_F_O2I_ECPUBLICKEY                             152\n# define EC_F_OLD_EC_PRIV_DECODE                          222\n# define EC_F_PKEY_EC_CTRL                                197\n# define EC_F_PKEY_EC_CTRL_STR                            198\n# define EC_F_PKEY_EC_DERIVE                              217\n# define EC_F_PKEY_EC_KEYGEN                              199\n# define EC_F_PKEY_EC_PARAMGEN                            219\n# define EC_F_PKEY_EC_SIGN                                218\n\n/* Reason codes. */\n# define EC_R_ASN1_ERROR                                  115\n# define EC_R_ASN1_UNKNOWN_FIELD                          116\n# define EC_R_BIGNUM_OUT_OF_RANGE                         144\n# define EC_R_BUFFER_TOO_SMALL                            100\n# define EC_R_COORDINATES_OUT_OF_RANGE                    146\n# define EC_R_D2I_ECPKPARAMETERS_FAILURE                  117\n# define EC_R_DECODE_ERROR                                142\n# define EC_R_DISCRIMINANT_IS_ZERO                        118\n# define EC_R_EC_GROUP_NEW_BY_NAME_FAILURE                119\n# define EC_R_FIELD_TOO_LARGE                             143\n# define EC_R_GF2M_NOT_SUPPORTED                          147\n# define EC_R_GROUP2PKPARAMETERS_FAILURE                  120\n# define EC_R_I2D_ECPKPARAMETERS_FAILURE                  121\n# define EC_R_INCOMPATIBLE_OBJECTS                        101\n# define EC_R_INVALID_ARGUMENT                            112\n# define EC_R_INVALID_COMPRESSED_POINT                    110\n# define EC_R_INVALID_COMPRESSION_BIT                     109\n# define EC_R_INVALID_CURVE                               141\n# define EC_R_INVALID_DIGEST_TYPE                         138\n# define EC_R_INVALID_ENCODING                            102\n# define EC_R_INVALID_FIELD                               103\n# define EC_R_INVALID_FORM                                104\n# define EC_R_INVALID_GROUP_ORDER                         122\n# define EC_R_INVALID_PENTANOMIAL_BASIS                   132\n# define EC_R_INVALID_PRIVATE_KEY                         123\n# define EC_R_INVALID_TRINOMIAL_BASIS                     137\n# define EC_R_KEYS_NOT_SET                                140\n# define EC_R_MISSING_PARAMETERS                          124\n# define EC_R_MISSING_PRIVATE_KEY                         125\n# define EC_R_NOT_A_NIST_PRIME                            135\n# define EC_R_NOT_A_SUPPORTED_NIST_PRIME                  136\n# define EC_R_NOT_IMPLEMENTED                             126\n# define EC_R_NOT_INITIALIZED                             111\n# define EC_R_NO_FIELD_MOD                                133\n# define EC_R_NO_PARAMETERS_SET                           139\n# define EC_R_PASSED_NULL_PARAMETER                       134\n# define EC_R_PKPARAMETERS2GROUP_FAILURE                  127\n# define EC_R_POINT_AT_INFINITY                           106\n# define EC_R_POINT_IS_NOT_ON_CURVE                       107\n# define EC_R_SLOT_FULL                                   108\n# define EC_R_UNDEFINED_GENERATOR                         113\n# define EC_R_UNDEFINED_ORDER                             128\n# define EC_R_UNKNOWN_GROUP                               129\n# define EC_R_UNKNOWN_ORDER                               114\n# define EC_R_UNSUPPORTED_FIELD                           131\n# define EC_R_WRONG_CURVE_PARAMETERS                      145\n# define EC_R_WRONG_ORDER                                 130\n\n#ifdef  __cplusplus\n}\n#endif\n#endif\n"
  },
  {
    "path": "Pods/OpenSSL-Universal/include-ios/openssl/ecdh.h",
    "content": "/* crypto/ecdh/ecdh.h */\n/* ====================================================================\n * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED.\n *\n * The Elliptic Curve Public-Key Crypto Library (ECC Code) included\n * herein is developed by SUN MICROSYSTEMS, INC., and is contributed\n * to the OpenSSL project.\n *\n * The ECC Code is licensed pursuant to the OpenSSL open source\n * license provided below.\n *\n * The ECDH software is originally written by Douglas Stebila of\n * Sun Microsystems Laboratories.\n *\n */\n/* ====================================================================\n * Copyright (c) 2000-2002 The OpenSSL Project.  All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n *\n * 1. Redistributions of source code must retain the above copyright\n *    notice, this list of conditions and the following disclaimer.\n *\n * 2. Redistributions in binary form must reproduce the above copyright\n *    notice, this list of conditions and the following disclaimer in\n *    the documentation and/or other materials provided with the\n *    distribution.\n *\n * 3. All advertising materials mentioning features or use of this\n *    software must display the following acknowledgment:\n *    \"This product includes software developed by the OpenSSL Project\n *    for use in the OpenSSL Toolkit. (http://www.OpenSSL.org/)\"\n *\n * 4. The names \"OpenSSL Toolkit\" and \"OpenSSL Project\" must not be used to\n *    endorse or promote products derived from this software without\n *    prior written permission. For written permission, please contact\n *    licensing@OpenSSL.org.\n *\n * 5. Products derived from this software may not be called \"OpenSSL\"\n *    nor may \"OpenSSL\" appear in their names without prior written\n *    permission of the OpenSSL Project.\n *\n * 6. Redistributions of any form whatsoever must retain the following\n *    acknowledgment:\n *    \"This product includes software developed by the OpenSSL Project\n *    for use in the OpenSSL Toolkit (http://www.OpenSSL.org/)\"\n *\n * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY\n * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\n * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR\n * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,\n * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED\n * OF THE POSSIBILITY OF SUCH DAMAGE.\n * ====================================================================\n *\n * This product includes cryptographic software written by Eric Young\n * (eay@cryptsoft.com).  This product includes software written by Tim\n * Hudson (tjh@cryptsoft.com).\n *\n */\n#ifndef HEADER_ECDH_H\n# define HEADER_ECDH_H\n\n# include <openssl/opensslconf.h>\n\n# ifdef OPENSSL_NO_ECDH\n#  error ECDH is disabled.\n# endif\n\n# include <openssl/ec.h>\n# include <openssl/ossl_typ.h>\n# ifndef OPENSSL_NO_DEPRECATED\n#  include <openssl/bn.h>\n# endif\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\nconst ECDH_METHOD *ECDH_OpenSSL(void);\n\nvoid ECDH_set_default_method(const ECDH_METHOD *);\nconst ECDH_METHOD *ECDH_get_default_method(void);\nint ECDH_set_method(EC_KEY *, const ECDH_METHOD *);\n\nint ECDH_compute_key(void *out, size_t outlen, const EC_POINT *pub_key,\n                     EC_KEY *ecdh, void *(*KDF) (const void *in, size_t inlen,\n                                                 void *out, size_t *outlen));\n\nint ECDH_get_ex_new_index(long argl, void *argp, CRYPTO_EX_new\n                          *new_func, CRYPTO_EX_dup *dup_func,\n                          CRYPTO_EX_free *free_func);\nint ECDH_set_ex_data(EC_KEY *d, int idx, void *arg);\nvoid *ECDH_get_ex_data(EC_KEY *d, int idx);\n\n/* BEGIN ERROR CODES */\n/*\n * The following lines are auto generated by the script mkerr.pl. Any changes\n * made after this point may be overwritten when the script is next run.\n */\nvoid ERR_load_ECDH_strings(void);\n\n/* Error codes for the ECDH functions. */\n\n/* Function codes. */\n# define ECDH_F_ECDH_CHECK                                102\n# define ECDH_F_ECDH_COMPUTE_KEY                          100\n# define ECDH_F_ECDH_DATA_NEW_METHOD                      101\n\n/* Reason codes. */\n# define ECDH_R_KDF_FAILED                                102\n# define ECDH_R_NON_FIPS_METHOD                           103\n# define ECDH_R_NO_PRIVATE_VALUE                          100\n# define ECDH_R_POINT_ARITHMETIC_FAILURE                  101\n\n#ifdef  __cplusplus\n}\n#endif\n#endif\n"
  },
  {
    "path": "Pods/OpenSSL-Universal/include-ios/openssl/ecdsa.h",
    "content": "/* crypto/ecdsa/ecdsa.h */\n/**\n * \\file   crypto/ecdsa/ecdsa.h Include file for the OpenSSL ECDSA functions\n * \\author Written by Nils Larsch for the OpenSSL project\n */\n/* ====================================================================\n * Copyright (c) 2000-2005 The OpenSSL Project.  All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n *\n * 1. Redistributions of source code must retain the above copyright\n *    notice, this list of conditions and the following disclaimer.\n *\n * 2. Redistributions in binary form must reproduce the above copyright\n *    notice, this list of conditions and the following disclaimer in\n *    the documentation and/or other materials provided with the\n *    distribution.\n *\n * 3. All advertising materials mentioning features or use of this\n *    software must display the following acknowledgment:\n *    \"This product includes software developed by the OpenSSL Project\n *    for use in the OpenSSL Toolkit. (http://www.OpenSSL.org/)\"\n *\n * 4. The names \"OpenSSL Toolkit\" and \"OpenSSL Project\" must not be used to\n *    endorse or promote products derived from this software without\n *    prior written permission. For written permission, please contact\n *    licensing@OpenSSL.org.\n *\n * 5. Products derived from this software may not be called \"OpenSSL\"\n *    nor may \"OpenSSL\" appear in their names without prior written\n *    permission of the OpenSSL Project.\n *\n * 6. Redistributions of any form whatsoever must retain the following\n *    acknowledgment:\n *    \"This product includes software developed by the OpenSSL Project\n *    for use in the OpenSSL Toolkit (http://www.OpenSSL.org/)\"\n *\n * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY\n * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\n * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR\n * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,\n * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED\n * OF THE POSSIBILITY OF SUCH DAMAGE.\n * ====================================================================\n *\n * This product includes cryptographic software written by Eric Young\n * (eay@cryptsoft.com).  This product includes software written by Tim\n * Hudson (tjh@cryptsoft.com).\n *\n */\n#ifndef HEADER_ECDSA_H\n# define HEADER_ECDSA_H\n\n# include <openssl/opensslconf.h>\n\n# ifdef OPENSSL_NO_ECDSA\n#  error ECDSA is disabled.\n# endif\n\n# include <openssl/ec.h>\n# include <openssl/ossl_typ.h>\n# ifndef OPENSSL_NO_DEPRECATED\n#  include <openssl/bn.h>\n# endif\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\ntypedef struct ECDSA_SIG_st {\n    BIGNUM *r;\n    BIGNUM *s;\n} ECDSA_SIG;\n\n/** Allocates and initialize a ECDSA_SIG structure\n *  \\return pointer to a ECDSA_SIG structure or NULL if an error occurred\n */\nECDSA_SIG *ECDSA_SIG_new(void);\n\n/** frees a ECDSA_SIG structure\n *  \\param  sig  pointer to the ECDSA_SIG structure\n */\nvoid ECDSA_SIG_free(ECDSA_SIG *sig);\n\n/** DER encode content of ECDSA_SIG object (note: this function modifies *pp\n *  (*pp += length of the DER encoded signature)).\n *  \\param  sig  pointer to the ECDSA_SIG object\n *  \\param  pp   pointer to a unsigned char pointer for the output or NULL\n *  \\return the length of the DER encoded ECDSA_SIG object or 0\n */\nint i2d_ECDSA_SIG(const ECDSA_SIG *sig, unsigned char **pp);\n\n/** Decodes a DER encoded ECDSA signature (note: this function changes *pp\n *  (*pp += len)).\n *  \\param  sig  pointer to ECDSA_SIG pointer (may be NULL)\n *  \\param  pp   memory buffer with the DER encoded signature\n *  \\param  len  length of the buffer\n *  \\return pointer to the decoded ECDSA_SIG structure (or NULL)\n */\nECDSA_SIG *d2i_ECDSA_SIG(ECDSA_SIG **sig, const unsigned char **pp, long len);\n\n/** Computes the ECDSA signature of the given hash value using\n *  the supplied private key and returns the created signature.\n *  \\param  dgst      pointer to the hash value\n *  \\param  dgst_len  length of the hash value\n *  \\param  eckey     EC_KEY object containing a private EC key\n *  \\return pointer to a ECDSA_SIG structure or NULL if an error occurred\n */\nECDSA_SIG *ECDSA_do_sign(const unsigned char *dgst, int dgst_len,\n                         EC_KEY *eckey);\n\n/** Computes ECDSA signature of a given hash value using the supplied\n *  private key (note: sig must point to ECDSA_size(eckey) bytes of memory).\n *  \\param  dgst     pointer to the hash value to sign\n *  \\param  dgstlen  length of the hash value\n *  \\param  kinv     BIGNUM with a pre-computed inverse k (optional)\n *  \\param  rp       BIGNUM with a pre-computed rp value (optioanl),\n *                   see ECDSA_sign_setup\n *  \\param  eckey    EC_KEY object containing a private EC key\n *  \\return pointer to a ECDSA_SIG structure or NULL if an error occurred\n */\nECDSA_SIG *ECDSA_do_sign_ex(const unsigned char *dgst, int dgstlen,\n                            const BIGNUM *kinv, const BIGNUM *rp,\n                            EC_KEY *eckey);\n\n/** Verifies that the supplied signature is a valid ECDSA\n *  signature of the supplied hash value using the supplied public key.\n *  \\param  dgst      pointer to the hash value\n *  \\param  dgst_len  length of the hash value\n *  \\param  sig       ECDSA_SIG structure\n *  \\param  eckey     EC_KEY object containing a public EC key\n *  \\return 1 if the signature is valid, 0 if the signature is invalid\n *          and -1 on error\n */\nint ECDSA_do_verify(const unsigned char *dgst, int dgst_len,\n                    const ECDSA_SIG *sig, EC_KEY *eckey);\n\nconst ECDSA_METHOD *ECDSA_OpenSSL(void);\n\n/** Sets the default ECDSA method\n *  \\param  meth  new default ECDSA_METHOD\n */\nvoid ECDSA_set_default_method(const ECDSA_METHOD *meth);\n\n/** Returns the default ECDSA method\n *  \\return pointer to ECDSA_METHOD structure containing the default method\n */\nconst ECDSA_METHOD *ECDSA_get_default_method(void);\n\n/** Sets method to be used for the ECDSA operations\n *  \\param  eckey  EC_KEY object\n *  \\param  meth   new method\n *  \\return 1 on success and 0 otherwise\n */\nint ECDSA_set_method(EC_KEY *eckey, const ECDSA_METHOD *meth);\n\n/** Returns the maximum length of the DER encoded signature\n *  \\param  eckey  EC_KEY object\n *  \\return numbers of bytes required for the DER encoded signature\n */\nint ECDSA_size(const EC_KEY *eckey);\n\n/** Precompute parts of the signing operation\n *  \\param  eckey  EC_KEY object containing a private EC key\n *  \\param  ctx    BN_CTX object (optional)\n *  \\param  kinv   BIGNUM pointer for the inverse of k\n *  \\param  rp     BIGNUM pointer for x coordinate of k * generator\n *  \\return 1 on success and 0 otherwise\n */\nint ECDSA_sign_setup(EC_KEY *eckey, BN_CTX *ctx, BIGNUM **kinv, BIGNUM **rp);\n\n/** Computes ECDSA signature of a given hash value using the supplied\n *  private key (note: sig must point to ECDSA_size(eckey) bytes of memory).\n *  \\param  type     this parameter is ignored\n *  \\param  dgst     pointer to the hash value to sign\n *  \\param  dgstlen  length of the hash value\n *  \\param  sig      memory for the DER encoded created signature\n *  \\param  siglen   pointer to the length of the returned signature\n *  \\param  eckey    EC_KEY object containing a private EC key\n *  \\return 1 on success and 0 otherwise\n */\nint ECDSA_sign(int type, const unsigned char *dgst, int dgstlen,\n               unsigned char *sig, unsigned int *siglen, EC_KEY *eckey);\n\n/** Computes ECDSA signature of a given hash value using the supplied\n *  private key (note: sig must point to ECDSA_size(eckey) bytes of memory).\n *  \\param  type     this parameter is ignored\n *  \\param  dgst     pointer to the hash value to sign\n *  \\param  dgstlen  length of the hash value\n *  \\param  sig      buffer to hold the DER encoded signature\n *  \\param  siglen   pointer to the length of the returned signature\n *  \\param  kinv     BIGNUM with a pre-computed inverse k (optional)\n *  \\param  rp       BIGNUM with a pre-computed rp value (optioanl),\n *                   see ECDSA_sign_setup\n *  \\param  eckey    EC_KEY object containing a private EC key\n *  \\return 1 on success and 0 otherwise\n */\nint ECDSA_sign_ex(int type, const unsigned char *dgst, int dgstlen,\n                  unsigned char *sig, unsigned int *siglen,\n                  const BIGNUM *kinv, const BIGNUM *rp, EC_KEY *eckey);\n\n/** Verifies that the given signature is valid ECDSA signature\n *  of the supplied hash value using the specified public key.\n *  \\param  type     this parameter is ignored\n *  \\param  dgst     pointer to the hash value\n *  \\param  dgstlen  length of the hash value\n *  \\param  sig      pointer to the DER encoded signature\n *  \\param  siglen   length of the DER encoded signature\n *  \\param  eckey    EC_KEY object containing a public EC key\n *  \\return 1 if the signature is valid, 0 if the signature is invalid\n *          and -1 on error\n */\nint ECDSA_verify(int type, const unsigned char *dgst, int dgstlen,\n                 const unsigned char *sig, int siglen, EC_KEY *eckey);\n\n/* the standard ex_data functions */\nint ECDSA_get_ex_new_index(long argl, void *argp, CRYPTO_EX_new\n                           *new_func, CRYPTO_EX_dup *dup_func,\n                           CRYPTO_EX_free *free_func);\nint ECDSA_set_ex_data(EC_KEY *d, int idx, void *arg);\nvoid *ECDSA_get_ex_data(EC_KEY *d, int idx);\n\n/* BEGIN ERROR CODES */\n/*\n * The following lines are auto generated by the script mkerr.pl. Any changes\n * made after this point may be overwritten when the script is next run.\n */\nvoid ERR_load_ECDSA_strings(void);\n\n/* Error codes for the ECDSA functions. */\n\n/* Function codes. */\n# define ECDSA_F_ECDSA_CHECK                              104\n# define ECDSA_F_ECDSA_DATA_NEW_METHOD                    100\n# define ECDSA_F_ECDSA_DO_SIGN                            101\n# define ECDSA_F_ECDSA_DO_VERIFY                          102\n# define ECDSA_F_ECDSA_SIGN_SETUP                         103\n\n/* Reason codes. */\n# define ECDSA_R_BAD_SIGNATURE                            100\n# define ECDSA_R_DATA_TOO_LARGE_FOR_KEY_SIZE              101\n# define ECDSA_R_ERR_EC_LIB                               102\n# define ECDSA_R_MISSING_PARAMETERS                       103\n# define ECDSA_R_NEED_NEW_SETUP_VALUES                    106\n# define ECDSA_R_NON_FIPS_METHOD                          107\n# define ECDSA_R_RANDOM_NUMBER_GENERATION_FAILED          104\n# define ECDSA_R_SIGNATURE_MALLOC_FAILED                  105\n\n#ifdef  __cplusplus\n}\n#endif\n#endif\n"
  },
  {
    "path": "Pods/OpenSSL-Universal/include-ios/openssl/engine.h",
    "content": "/* openssl/engine.h */\n/*\n * Written by Geoff Thorpe (geoff@geoffthorpe.net) for the OpenSSL project\n * 2000.\n */\n/* ====================================================================\n * Copyright (c) 1999-2004 The OpenSSL Project.  All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n *\n * 1. Redistributions of source code must retain the above copyright\n *    notice, this list of conditions and the following disclaimer.\n *\n * 2. Redistributions in binary form must reproduce the above copyright\n *    notice, this list of conditions and the following disclaimer in\n *    the documentation and/or other materials provided with the\n *    distribution.\n *\n * 3. All advertising materials mentioning features or use of this\n *    software must display the following acknowledgment:\n *    \"This product includes software developed by the OpenSSL Project\n *    for use in the OpenSSL Toolkit. (http://www.OpenSSL.org/)\"\n *\n * 4. The names \"OpenSSL Toolkit\" and \"OpenSSL Project\" must not be used to\n *    endorse or promote products derived from this software without\n *    prior written permission. For written permission, please contact\n *    licensing@OpenSSL.org.\n *\n * 5. Products derived from this software may not be called \"OpenSSL\"\n *    nor may \"OpenSSL\" appear in their names without prior written\n *    permission of the OpenSSL Project.\n *\n * 6. Redistributions of any form whatsoever must retain the following\n *    acknowledgment:\n *    \"This product includes software developed by the OpenSSL Project\n *    for use in the OpenSSL Toolkit (http://www.OpenSSL.org/)\"\n *\n * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY\n * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\n * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR\n * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,\n * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED\n * OF THE POSSIBILITY OF SUCH DAMAGE.\n * ====================================================================\n *\n * This product includes cryptographic software written by Eric Young\n * (eay@cryptsoft.com).  This product includes software written by Tim\n * Hudson (tjh@cryptsoft.com).\n *\n */\n/* ====================================================================\n * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED.\n * ECDH support in OpenSSL originally developed by\n * SUN MICROSYSTEMS, INC., and contributed to the OpenSSL project.\n */\n\n#ifndef HEADER_ENGINE_H\n# define HEADER_ENGINE_H\n\n# include <openssl/opensslconf.h>\n\n# ifdef OPENSSL_NO_ENGINE\n#  error ENGINE is disabled.\n# endif\n\n# ifndef OPENSSL_NO_DEPRECATED\n#  include <openssl/bn.h>\n#  ifndef OPENSSL_NO_RSA\n#   include <openssl/rsa.h>\n#  endif\n#  ifndef OPENSSL_NO_DSA\n#   include <openssl/dsa.h>\n#  endif\n#  ifndef OPENSSL_NO_DH\n#   include <openssl/dh.h>\n#  endif\n#  ifndef OPENSSL_NO_ECDH\n#   include <openssl/ecdh.h>\n#  endif\n#  ifndef OPENSSL_NO_ECDSA\n#   include <openssl/ecdsa.h>\n#  endif\n#  include <openssl/rand.h>\n#  include <openssl/ui.h>\n#  include <openssl/err.h>\n# endif\n\n# include <openssl/ossl_typ.h>\n# include <openssl/symhacks.h>\n\n# include <openssl/x509.h>\n\n#ifdef  __cplusplus\nextern \"C\" {\n#endif\n\n/*\n * These flags are used to control combinations of algorithm (methods) by\n * bitwise \"OR\"ing.\n */\n# define ENGINE_METHOD_RSA               (unsigned int)0x0001\n# define ENGINE_METHOD_DSA               (unsigned int)0x0002\n# define ENGINE_METHOD_DH                (unsigned int)0x0004\n# define ENGINE_METHOD_RAND              (unsigned int)0x0008\n# define ENGINE_METHOD_ECDH              (unsigned int)0x0010\n# define ENGINE_METHOD_ECDSA             (unsigned int)0x0020\n# define ENGINE_METHOD_CIPHERS           (unsigned int)0x0040\n# define ENGINE_METHOD_DIGESTS           (unsigned int)0x0080\n# define ENGINE_METHOD_STORE             (unsigned int)0x0100\n# define ENGINE_METHOD_PKEY_METHS        (unsigned int)0x0200\n# define ENGINE_METHOD_PKEY_ASN1_METHS   (unsigned int)0x0400\n/* Obvious all-or-nothing cases. */\n# define ENGINE_METHOD_ALL               (unsigned int)0xFFFF\n# define ENGINE_METHOD_NONE              (unsigned int)0x0000\n\n/*\n * This(ese) flag(s) controls behaviour of the ENGINE_TABLE mechanism used\n * internally to control registration of ENGINE implementations, and can be\n * set by ENGINE_set_table_flags(). The \"NOINIT\" flag prevents attempts to\n * initialise registered ENGINEs if they are not already initialised.\n */\n# define ENGINE_TABLE_FLAG_NOINIT        (unsigned int)0x0001\n\n/* ENGINE flags that can be set by ENGINE_set_flags(). */\n/* Not used */\n/* #define ENGINE_FLAGS_MALLOCED        0x0001 */\n\n/*\n * This flag is for ENGINEs that wish to handle the various 'CMD'-related\n * control commands on their own. Without this flag, ENGINE_ctrl() handles\n * these control commands on behalf of the ENGINE using their \"cmd_defns\"\n * data.\n */\n# define ENGINE_FLAGS_MANUAL_CMD_CTRL    (int)0x0002\n\n/*\n * This flag is for ENGINEs who return new duplicate structures when found\n * via \"ENGINE_by_id()\". When an ENGINE must store state (eg. if\n * ENGINE_ctrl() commands are called in sequence as part of some stateful\n * process like key-generation setup and execution), it can set this flag -\n * then each attempt to obtain the ENGINE will result in it being copied into\n * a new structure. Normally, ENGINEs don't declare this flag so\n * ENGINE_by_id() just increments the existing ENGINE's structural reference\n * count.\n */\n# define ENGINE_FLAGS_BY_ID_COPY         (int)0x0004\n\n/*\n * This flag if for an ENGINE that does not want its methods registered as\n * part of ENGINE_register_all_complete() for example if the methods are not\n * usable as default methods.\n */\n\n# define ENGINE_FLAGS_NO_REGISTER_ALL    (int)0x0008\n\n/*\n * ENGINEs can support their own command types, and these flags are used in\n * ENGINE_CTRL_GET_CMD_FLAGS to indicate to the caller what kind of input\n * each command expects. Currently only numeric and string input is\n * supported. If a control command supports none of the _NUMERIC, _STRING, or\n * _NO_INPUT options, then it is regarded as an \"internal\" control command -\n * and not for use in config setting situations. As such, they're not\n * available to the ENGINE_ctrl_cmd_string() function, only raw ENGINE_ctrl()\n * access. Changes to this list of 'command types' should be reflected\n * carefully in ENGINE_cmd_is_executable() and ENGINE_ctrl_cmd_string().\n */\n\n/* accepts a 'long' input value (3rd parameter to ENGINE_ctrl) */\n# define ENGINE_CMD_FLAG_NUMERIC         (unsigned int)0x0001\n/*\n * accepts string input (cast from 'void*' to 'const char *', 4th parameter\n * to ENGINE_ctrl)\n */\n# define ENGINE_CMD_FLAG_STRING          (unsigned int)0x0002\n/*\n * Indicates that the control command takes *no* input. Ie. the control\n * command is unparameterised.\n */\n# define ENGINE_CMD_FLAG_NO_INPUT        (unsigned int)0x0004\n/*\n * Indicates that the control command is internal. This control command won't\n * be shown in any output, and is only usable through the ENGINE_ctrl_cmd()\n * function.\n */\n# define ENGINE_CMD_FLAG_INTERNAL        (unsigned int)0x0008\n\n/*\n * NB: These 3 control commands are deprecated and should not be used.\n * ENGINEs relying on these commands should compile conditional support for\n * compatibility (eg. if these symbols are defined) but should also migrate\n * the same functionality to their own ENGINE-specific control functions that\n * can be \"discovered\" by calling applications. The fact these control\n * commands wouldn't be \"executable\" (ie. usable by text-based config)\n * doesn't change the fact that application code can find and use them\n * without requiring per-ENGINE hacking.\n */\n\n/*\n * These flags are used to tell the ctrl function what should be done. All\n * command numbers are shared between all engines, even if some don't make\n * sense to some engines.  In such a case, they do nothing but return the\n * error ENGINE_R_CTRL_COMMAND_NOT_IMPLEMENTED.\n */\n# define ENGINE_CTRL_SET_LOGSTREAM               1\n# define ENGINE_CTRL_SET_PASSWORD_CALLBACK       2\n# define ENGINE_CTRL_HUP                         3/* Close and reinitialise\n                                                   * any handles/connections\n                                                   * etc. */\n# define ENGINE_CTRL_SET_USER_INTERFACE          4/* Alternative to callback */\n# define ENGINE_CTRL_SET_CALLBACK_DATA           5/* User-specific data, used\n                                                   * when calling the password\n                                                   * callback and the user\n                                                   * interface */\n# define ENGINE_CTRL_LOAD_CONFIGURATION          6/* Load a configuration,\n                                                   * given a string that\n                                                   * represents a file name\n                                                   * or so */\n# define ENGINE_CTRL_LOAD_SECTION                7/* Load data from a given\n                                                   * section in the already\n                                                   * loaded configuration */\n\n/*\n * These control commands allow an application to deal with an arbitrary\n * engine in a dynamic way. Warn: Negative return values indicate errors FOR\n * THESE COMMANDS because zero is used to indicate 'end-of-list'. Other\n * commands, including ENGINE-specific command types, return zero for an\n * error. An ENGINE can choose to implement these ctrl functions, and can\n * internally manage things however it chooses - it does so by setting the\n * ENGINE_FLAGS_MANUAL_CMD_CTRL flag (using ENGINE_set_flags()). Otherwise\n * the ENGINE_ctrl() code handles this on the ENGINE's behalf using the\n * cmd_defns data (set using ENGINE_set_cmd_defns()). This means an ENGINE's\n * ctrl() handler need only implement its own commands - the above \"meta\"\n * commands will be taken care of.\n */\n\n/*\n * Returns non-zero if the supplied ENGINE has a ctrl() handler. If \"not\",\n * then all the remaining control commands will return failure, so it is\n * worth checking this first if the caller is trying to \"discover\" the\n * engine's capabilities and doesn't want errors generated unnecessarily.\n */\n# define ENGINE_CTRL_HAS_CTRL_FUNCTION           10\n/*\n * Returns a positive command number for the first command supported by the\n * engine. Returns zero if no ctrl commands are supported.\n */\n# define ENGINE_CTRL_GET_FIRST_CMD_TYPE          11\n/*\n * The 'long' argument specifies a command implemented by the engine, and the\n * return value is the next command supported, or zero if there are no more.\n */\n# define ENGINE_CTRL_GET_NEXT_CMD_TYPE           12\n/*\n * The 'void*' argument is a command name (cast from 'const char *'), and the\n * return value is the command that corresponds to it.\n */\n# define ENGINE_CTRL_GET_CMD_FROM_NAME           13\n/*\n * The next two allow a command to be converted into its corresponding string\n * form. In each case, the 'long' argument supplies the command. In the\n * NAME_LEN case, the return value is the length of the command name (not\n * counting a trailing EOL). In the NAME case, the 'void*' argument must be a\n * string buffer large enough, and it will be populated with the name of the\n * command (WITH a trailing EOL).\n */\n# define ENGINE_CTRL_GET_NAME_LEN_FROM_CMD       14\n# define ENGINE_CTRL_GET_NAME_FROM_CMD           15\n/* The next two are similar but give a \"short description\" of a command. */\n# define ENGINE_CTRL_GET_DESC_LEN_FROM_CMD       16\n# define ENGINE_CTRL_GET_DESC_FROM_CMD           17\n/*\n * With this command, the return value is the OR'd combination of\n * ENGINE_CMD_FLAG_*** values that indicate what kind of input a given\n * engine-specific ctrl command expects.\n */\n# define ENGINE_CTRL_GET_CMD_FLAGS               18\n\n/*\n * ENGINE implementations should start the numbering of their own control\n * commands from this value. (ie. ENGINE_CMD_BASE, ENGINE_CMD_BASE + 1, etc).\n */\n# define ENGINE_CMD_BASE                         200\n\n/*\n * NB: These 2 nCipher \"chil\" control commands are deprecated, and their\n * functionality is now available through ENGINE-specific control commands\n * (exposed through the above-mentioned 'CMD'-handling). Code using these 2\n * commands should be migrated to the more general command handling before\n * these are removed.\n */\n\n/* Flags specific to the nCipher \"chil\" engine */\n# define ENGINE_CTRL_CHIL_SET_FORKCHECK          100\n        /*\n         * Depending on the value of the (long)i argument, this sets or\n         * unsets the SimpleForkCheck flag in the CHIL API to enable or\n         * disable checking and workarounds for applications that fork().\n         */\n# define ENGINE_CTRL_CHIL_NO_LOCKING             101\n        /*\n         * This prevents the initialisation function from providing mutex\n         * callbacks to the nCipher library.\n         */\n\n/*\n * If an ENGINE supports its own specific control commands and wishes the\n * framework to handle the above 'ENGINE_CMD_***'-manipulation commands on\n * its behalf, it should supply a null-terminated array of ENGINE_CMD_DEFN\n * entries to ENGINE_set_cmd_defns(). It should also implement a ctrl()\n * handler that supports the stated commands (ie. the \"cmd_num\" entries as\n * described by the array). NB: The array must be ordered in increasing order\n * of cmd_num. \"null-terminated\" means that the last ENGINE_CMD_DEFN element\n * has cmd_num set to zero and/or cmd_name set to NULL.\n */\ntypedef struct ENGINE_CMD_DEFN_st {\n    unsigned int cmd_num;       /* The command number */\n    const char *cmd_name;       /* The command name itself */\n    const char *cmd_desc;       /* A short description of the command */\n    unsigned int cmd_flags;     /* The input the command expects */\n} ENGINE_CMD_DEFN;\n\n/* Generic function pointer */\ntypedef int (*ENGINE_GEN_FUNC_PTR) (void);\n/* Generic function pointer taking no arguments */\ntypedef int (*ENGINE_GEN_INT_FUNC_PTR) (ENGINE *);\n/* Specific control function pointer */\ntypedef int (*ENGINE_CTRL_FUNC_PTR) (ENGINE *, int, long, void *,\n                                     void (*f) (void));\n/* Generic load_key function pointer */\ntypedef EVP_PKEY *(*ENGINE_LOAD_KEY_PTR)(ENGINE *, const char *,\n                                         UI_METHOD *ui_method,\n                                         void *callback_data);\ntypedef int (*ENGINE_SSL_CLIENT_CERT_PTR) (ENGINE *, SSL *ssl,\n                                           STACK_OF(X509_NAME) *ca_dn,\n                                           X509 **pcert, EVP_PKEY **pkey,\n                                           STACK_OF(X509) **pother,\n                                           UI_METHOD *ui_method,\n                                           void *callback_data);\n/*-\n * These callback types are for an ENGINE's handler for cipher and digest logic.\n * These handlers have these prototypes;\n *   int foo(ENGINE *e, const EVP_CIPHER **cipher, const int **nids, int nid);\n *   int foo(ENGINE *e, const EVP_MD **digest, const int **nids, int nid);\n * Looking at how to implement these handlers in the case of cipher support, if\n * the framework wants the EVP_CIPHER for 'nid', it will call;\n *   foo(e, &p_evp_cipher, NULL, nid);    (return zero for failure)\n * If the framework wants a list of supported 'nid's, it will call;\n *   foo(e, NULL, &p_nids, 0); (returns number of 'nids' or -1 for error)\n */\n/*\n * Returns to a pointer to the array of supported cipher 'nid's. If the\n * second parameter is non-NULL it is set to the size of the returned array.\n */\ntypedef int (*ENGINE_CIPHERS_PTR) (ENGINE *, const EVP_CIPHER **,\n                                   const int **, int);\ntypedef int (*ENGINE_DIGESTS_PTR) (ENGINE *, const EVP_MD **, const int **,\n                                   int);\ntypedef int (*ENGINE_PKEY_METHS_PTR) (ENGINE *, EVP_PKEY_METHOD **,\n                                      const int **, int);\ntypedef int (*ENGINE_PKEY_ASN1_METHS_PTR) (ENGINE *, EVP_PKEY_ASN1_METHOD **,\n                                           const int **, int);\n/*\n * STRUCTURE functions ... all of these functions deal with pointers to\n * ENGINE structures where the pointers have a \"structural reference\". This\n * means that their reference is to allowed access to the structure but it\n * does not imply that the structure is functional. To simply increment or\n * decrement the structural reference count, use ENGINE_by_id and\n * ENGINE_free. NB: This is not required when iterating using ENGINE_get_next\n * as it will automatically decrement the structural reference count of the\n * \"current\" ENGINE and increment the structural reference count of the\n * ENGINE it returns (unless it is NULL).\n */\n\n/* Get the first/last \"ENGINE\" type available. */\nENGINE *ENGINE_get_first(void);\nENGINE *ENGINE_get_last(void);\n/* Iterate to the next/previous \"ENGINE\" type (NULL = end of the list). */\nENGINE *ENGINE_get_next(ENGINE *e);\nENGINE *ENGINE_get_prev(ENGINE *e);\n/* Add another \"ENGINE\" type into the array. */\nint ENGINE_add(ENGINE *e);\n/* Remove an existing \"ENGINE\" type from the array. */\nint ENGINE_remove(ENGINE *e);\n/* Retrieve an engine from the list by its unique \"id\" value. */\nENGINE *ENGINE_by_id(const char *id);\n/* Add all the built-in engines. */\nvoid ENGINE_load_openssl(void);\nvoid ENGINE_load_dynamic(void);\n# ifndef OPENSSL_NO_STATIC_ENGINE\nvoid ENGINE_load_4758cca(void);\nvoid ENGINE_load_aep(void);\nvoid ENGINE_load_atalla(void);\nvoid ENGINE_load_chil(void);\nvoid ENGINE_load_cswift(void);\nvoid ENGINE_load_nuron(void);\nvoid ENGINE_load_sureware(void);\nvoid ENGINE_load_ubsec(void);\nvoid ENGINE_load_padlock(void);\nvoid ENGINE_load_capi(void);\n#  ifndef OPENSSL_NO_GMP\nvoid ENGINE_load_gmp(void);\n#  endif\n#  ifndef OPENSSL_NO_GOST\nvoid ENGINE_load_gost(void);\n#  endif\n# endif\nvoid ENGINE_load_cryptodev(void);\nvoid ENGINE_load_rsax(void);\nvoid ENGINE_load_rdrand(void);\nvoid ENGINE_load_builtin_engines(void);\n\n/*\n * Get and set global flags (ENGINE_TABLE_FLAG_***) for the implementation\n * \"registry\" handling.\n */\nunsigned int ENGINE_get_table_flags(void);\nvoid ENGINE_set_table_flags(unsigned int flags);\n\n/*- Manage registration of ENGINEs per \"table\". For each type, there are 3\n * functions;\n *   ENGINE_register_***(e) - registers the implementation from 'e' (if it has one)\n *   ENGINE_unregister_***(e) - unregister the implementation from 'e'\n *   ENGINE_register_all_***() - call ENGINE_register_***() for each 'e' in the list\n * Cleanup is automatically registered from each table when required, so\n * ENGINE_cleanup() will reverse any \"register\" operations.\n */\n\nint ENGINE_register_RSA(ENGINE *e);\nvoid ENGINE_unregister_RSA(ENGINE *e);\nvoid ENGINE_register_all_RSA(void);\n\nint ENGINE_register_DSA(ENGINE *e);\nvoid ENGINE_unregister_DSA(ENGINE *e);\nvoid ENGINE_register_all_DSA(void);\n\nint ENGINE_register_ECDH(ENGINE *e);\nvoid ENGINE_unregister_ECDH(ENGINE *e);\nvoid ENGINE_register_all_ECDH(void);\n\nint ENGINE_register_ECDSA(ENGINE *e);\nvoid ENGINE_unregister_ECDSA(ENGINE *e);\nvoid ENGINE_register_all_ECDSA(void);\n\nint ENGINE_register_DH(ENGINE *e);\nvoid ENGINE_unregister_DH(ENGINE *e);\nvoid ENGINE_register_all_DH(void);\n\nint ENGINE_register_RAND(ENGINE *e);\nvoid ENGINE_unregister_RAND(ENGINE *e);\nvoid ENGINE_register_all_RAND(void);\n\nint ENGINE_register_STORE(ENGINE *e);\nvoid ENGINE_unregister_STORE(ENGINE *e);\nvoid ENGINE_register_all_STORE(void);\n\nint ENGINE_register_ciphers(ENGINE *e);\nvoid ENGINE_unregister_ciphers(ENGINE *e);\nvoid ENGINE_register_all_ciphers(void);\n\nint ENGINE_register_digests(ENGINE *e);\nvoid ENGINE_unregister_digests(ENGINE *e);\nvoid ENGINE_register_all_digests(void);\n\nint ENGINE_register_pkey_meths(ENGINE *e);\nvoid ENGINE_unregister_pkey_meths(ENGINE *e);\nvoid ENGINE_register_all_pkey_meths(void);\n\nint ENGINE_register_pkey_asn1_meths(ENGINE *e);\nvoid ENGINE_unregister_pkey_asn1_meths(ENGINE *e);\nvoid ENGINE_register_all_pkey_asn1_meths(void);\n\n/*\n * These functions register all support from the above categories. Note, use\n * of these functions can result in static linkage of code your application\n * may not need. If you only need a subset of functionality, consider using\n * more selective initialisation.\n */\nint ENGINE_register_complete(ENGINE *e);\nint ENGINE_register_all_complete(void);\n\n/*\n * Send parametrised control commands to the engine. The possibilities to\n * send down an integer, a pointer to data or a function pointer are\n * provided. Any of the parameters may or may not be NULL, depending on the\n * command number. In actuality, this function only requires a structural\n * (rather than functional) reference to an engine, but many control commands\n * may require the engine be functional. The caller should be aware of trying\n * commands that require an operational ENGINE, and only use functional\n * references in such situations.\n */\nint ENGINE_ctrl(ENGINE *e, int cmd, long i, void *p, void (*f) (void));\n\n/*\n * This function tests if an ENGINE-specific command is usable as a\n * \"setting\". Eg. in an application's config file that gets processed through\n * ENGINE_ctrl_cmd_string(). If this returns zero, it is not available to\n * ENGINE_ctrl_cmd_string(), only ENGINE_ctrl().\n */\nint ENGINE_cmd_is_executable(ENGINE *e, int cmd);\n\n/*\n * This function works like ENGINE_ctrl() with the exception of taking a\n * command name instead of a command number, and can handle optional\n * commands. See the comment on ENGINE_ctrl_cmd_string() for an explanation\n * on how to use the cmd_name and cmd_optional.\n */\nint ENGINE_ctrl_cmd(ENGINE *e, const char *cmd_name,\n                    long i, void *p, void (*f) (void), int cmd_optional);\n\n/*\n * This function passes a command-name and argument to an ENGINE. The\n * cmd_name is converted to a command number and the control command is\n * called using 'arg' as an argument (unless the ENGINE doesn't support such\n * a command, in which case no control command is called). The command is\n * checked for input flags, and if necessary the argument will be converted\n * to a numeric value. If cmd_optional is non-zero, then if the ENGINE\n * doesn't support the given cmd_name the return value will be success\n * anyway. This function is intended for applications to use so that users\n * (or config files) can supply engine-specific config data to the ENGINE at\n * run-time to control behaviour of specific engines. As such, it shouldn't\n * be used for calling ENGINE_ctrl() functions that return data, deal with\n * binary data, or that are otherwise supposed to be used directly through\n * ENGINE_ctrl() in application code. Any \"return\" data from an ENGINE_ctrl()\n * operation in this function will be lost - the return value is interpreted\n * as failure if the return value is zero, success otherwise, and this\n * function returns a boolean value as a result. In other words, vendors of\n * 'ENGINE'-enabled devices should write ENGINE implementations with\n * parameterisations that work in this scheme, so that compliant ENGINE-based\n * applications can work consistently with the same configuration for the\n * same ENGINE-enabled devices, across applications.\n */\nint ENGINE_ctrl_cmd_string(ENGINE *e, const char *cmd_name, const char *arg,\n                           int cmd_optional);\n\n/*\n * These functions are useful for manufacturing new ENGINE structures. They\n * don't address reference counting at all - one uses them to populate an\n * ENGINE structure with personalised implementations of things prior to\n * using it directly or adding it to the builtin ENGINE list in OpenSSL.\n * These are also here so that the ENGINE structure doesn't have to be\n * exposed and break binary compatibility!\n */\nENGINE *ENGINE_new(void);\nint ENGINE_free(ENGINE *e);\nint ENGINE_up_ref(ENGINE *e);\nint ENGINE_set_id(ENGINE *e, const char *id);\nint ENGINE_set_name(ENGINE *e, const char *name);\nint ENGINE_set_RSA(ENGINE *e, const RSA_METHOD *rsa_meth);\nint ENGINE_set_DSA(ENGINE *e, const DSA_METHOD *dsa_meth);\nint ENGINE_set_ECDH(ENGINE *e, const ECDH_METHOD *ecdh_meth);\nint ENGINE_set_ECDSA(ENGINE *e, const ECDSA_METHOD *ecdsa_meth);\nint ENGINE_set_DH(ENGINE *e, const DH_METHOD *dh_meth);\nint ENGINE_set_RAND(ENGINE *e, const RAND_METHOD *rand_meth);\nint ENGINE_set_STORE(ENGINE *e, const STORE_METHOD *store_meth);\nint ENGINE_set_destroy_function(ENGINE *e, ENGINE_GEN_INT_FUNC_PTR destroy_f);\nint ENGINE_set_init_function(ENGINE *e, ENGINE_GEN_INT_FUNC_PTR init_f);\nint ENGINE_set_finish_function(ENGINE *e, ENGINE_GEN_INT_FUNC_PTR finish_f);\nint ENGINE_set_ctrl_function(ENGINE *e, ENGINE_CTRL_FUNC_PTR ctrl_f);\nint ENGINE_set_load_privkey_function(ENGINE *e,\n                                     ENGINE_LOAD_KEY_PTR loadpriv_f);\nint ENGINE_set_load_pubkey_function(ENGINE *e, ENGINE_LOAD_KEY_PTR loadpub_f);\nint ENGINE_set_load_ssl_client_cert_function(ENGINE *e,\n                                             ENGINE_SSL_CLIENT_CERT_PTR\n                                             loadssl_f);\nint ENGINE_set_ciphers(ENGINE *e, ENGINE_CIPHERS_PTR f);\nint ENGINE_set_digests(ENGINE *e, ENGINE_DIGESTS_PTR f);\nint ENGINE_set_pkey_meths(ENGINE *e, ENGINE_PKEY_METHS_PTR f);\nint ENGINE_set_pkey_asn1_meths(ENGINE *e, ENGINE_PKEY_ASN1_METHS_PTR f);\nint ENGINE_set_flags(ENGINE *e, int flags);\nint ENGINE_set_cmd_defns(ENGINE *e, const ENGINE_CMD_DEFN *defns);\n/* These functions allow control over any per-structure ENGINE data. */\nint ENGINE_get_ex_new_index(long argl, void *argp, CRYPTO_EX_new *new_func,\n                            CRYPTO_EX_dup *dup_func,\n                            CRYPTO_EX_free *free_func);\nint ENGINE_set_ex_data(ENGINE *e, int idx, void *arg);\nvoid *ENGINE_get_ex_data(const ENGINE *e, int idx);\n\n/*\n * This function cleans up anything that needs it. Eg. the ENGINE_add()\n * function automatically ensures the list cleanup function is registered to\n * be called from ENGINE_cleanup(). Similarly, all ENGINE_register_***\n * functions ensure ENGINE_cleanup() will clean up after them.\n */\nvoid ENGINE_cleanup(void);\n\n/*\n * These return values from within the ENGINE structure. These can be useful\n * with functional references as well as structural references - it depends\n * which you obtained. Using the result for functional purposes if you only\n * obtained a structural reference may be problematic!\n */\nconst char *ENGINE_get_id(const ENGINE *e);\nconst char *ENGINE_get_name(const ENGINE *e);\nconst RSA_METHOD *ENGINE_get_RSA(const ENGINE *e);\nconst DSA_METHOD *ENGINE_get_DSA(const ENGINE *e);\nconst ECDH_METHOD *ENGINE_get_ECDH(const ENGINE *e);\nconst ECDSA_METHOD *ENGINE_get_ECDSA(const ENGINE *e);\nconst DH_METHOD *ENGINE_get_DH(const ENGINE *e);\nconst RAND_METHOD *ENGINE_get_RAND(const ENGINE *e);\nconst STORE_METHOD *ENGINE_get_STORE(const ENGINE *e);\nENGINE_GEN_INT_FUNC_PTR ENGINE_get_destroy_function(const ENGINE *e);\nENGINE_GEN_INT_FUNC_PTR ENGINE_get_init_function(const ENGINE *e);\nENGINE_GEN_INT_FUNC_PTR ENGINE_get_finish_function(const ENGINE *e);\nENGINE_CTRL_FUNC_PTR ENGINE_get_ctrl_function(const ENGINE *e);\nENGINE_LOAD_KEY_PTR ENGINE_get_load_privkey_function(const ENGINE *e);\nENGINE_LOAD_KEY_PTR ENGINE_get_load_pubkey_function(const ENGINE *e);\nENGINE_SSL_CLIENT_CERT_PTR ENGINE_get_ssl_client_cert_function(const ENGINE\n                                                               *e);\nENGINE_CIPHERS_PTR ENGINE_get_ciphers(const ENGINE *e);\nENGINE_DIGESTS_PTR ENGINE_get_digests(const ENGINE *e);\nENGINE_PKEY_METHS_PTR ENGINE_get_pkey_meths(const ENGINE *e);\nENGINE_PKEY_ASN1_METHS_PTR ENGINE_get_pkey_asn1_meths(const ENGINE *e);\nconst EVP_CIPHER *ENGINE_get_cipher(ENGINE *e, int nid);\nconst EVP_MD *ENGINE_get_digest(ENGINE *e, int nid);\nconst EVP_PKEY_METHOD *ENGINE_get_pkey_meth(ENGINE *e, int nid);\nconst EVP_PKEY_ASN1_METHOD *ENGINE_get_pkey_asn1_meth(ENGINE *e, int nid);\nconst EVP_PKEY_ASN1_METHOD *ENGINE_get_pkey_asn1_meth_str(ENGINE *e,\n                                                          const char *str,\n                                                          int len);\nconst EVP_PKEY_ASN1_METHOD *ENGINE_pkey_asn1_find_str(ENGINE **pe,\n                                                      const char *str,\n                                                      int len);\nconst ENGINE_CMD_DEFN *ENGINE_get_cmd_defns(const ENGINE *e);\nint ENGINE_get_flags(const ENGINE *e);\n\n/*\n * FUNCTIONAL functions. These functions deal with ENGINE structures that\n * have (or will) be initialised for use. Broadly speaking, the structural\n * functions are useful for iterating the list of available engine types,\n * creating new engine types, and other \"list\" operations. These functions\n * actually deal with ENGINEs that are to be used. As such these functions\n * can fail (if applicable) when particular engines are unavailable - eg. if\n * a hardware accelerator is not attached or not functioning correctly. Each\n * ENGINE has 2 reference counts; structural and functional. Every time a\n * functional reference is obtained or released, a corresponding structural\n * reference is automatically obtained or released too.\n */\n\n/*\n * Initialise a engine type for use (or up its reference count if it's\n * already in use). This will fail if the engine is not currently operational\n * and cannot initialise.\n */\nint ENGINE_init(ENGINE *e);\n/*\n * Free a functional reference to a engine type. This does not require a\n * corresponding call to ENGINE_free as it also releases a structural\n * reference.\n */\nint ENGINE_finish(ENGINE *e);\n\n/*\n * The following functions handle keys that are stored in some secondary\n * location, handled by the engine.  The storage may be on a card or\n * whatever.\n */\nEVP_PKEY *ENGINE_load_private_key(ENGINE *e, const char *key_id,\n                                  UI_METHOD *ui_method, void *callback_data);\nEVP_PKEY *ENGINE_load_public_key(ENGINE *e, const char *key_id,\n                                 UI_METHOD *ui_method, void *callback_data);\nint ENGINE_load_ssl_client_cert(ENGINE *e, SSL *s,\n                                STACK_OF(X509_NAME) *ca_dn, X509 **pcert,\n                                EVP_PKEY **ppkey, STACK_OF(X509) **pother,\n                                UI_METHOD *ui_method, void *callback_data);\n\n/*\n * This returns a pointer for the current ENGINE structure that is (by\n * default) performing any RSA operations. The value returned is an\n * incremented reference, so it should be free'd (ENGINE_finish) before it is\n * discarded.\n */\nENGINE *ENGINE_get_default_RSA(void);\n/* Same for the other \"methods\" */\nENGINE *ENGINE_get_default_DSA(void);\nENGINE *ENGINE_get_default_ECDH(void);\nENGINE *ENGINE_get_default_ECDSA(void);\nENGINE *ENGINE_get_default_DH(void);\nENGINE *ENGINE_get_default_RAND(void);\n/*\n * These functions can be used to get a functional reference to perform\n * ciphering or digesting corresponding to \"nid\".\n */\nENGINE *ENGINE_get_cipher_engine(int nid);\nENGINE *ENGINE_get_digest_engine(int nid);\nENGINE *ENGINE_get_pkey_meth_engine(int nid);\nENGINE *ENGINE_get_pkey_asn1_meth_engine(int nid);\n\n/*\n * This sets a new default ENGINE structure for performing RSA operations. If\n * the result is non-zero (success) then the ENGINE structure will have had\n * its reference count up'd so the caller should still free their own\n * reference 'e'.\n */\nint ENGINE_set_default_RSA(ENGINE *e);\nint ENGINE_set_default_string(ENGINE *e, const char *def_list);\n/* Same for the other \"methods\" */\nint ENGINE_set_default_DSA(ENGINE *e);\nint ENGINE_set_default_ECDH(ENGINE *e);\nint ENGINE_set_default_ECDSA(ENGINE *e);\nint ENGINE_set_default_DH(ENGINE *e);\nint ENGINE_set_default_RAND(ENGINE *e);\nint ENGINE_set_default_ciphers(ENGINE *e);\nint ENGINE_set_default_digests(ENGINE *e);\nint ENGINE_set_default_pkey_meths(ENGINE *e);\nint ENGINE_set_default_pkey_asn1_meths(ENGINE *e);\n\n/*\n * The combination \"set\" - the flags are bitwise \"OR\"d from the\n * ENGINE_METHOD_*** defines above. As with the \"ENGINE_register_complete()\"\n * function, this function can result in unnecessary static linkage. If your\n * application requires only specific functionality, consider using more\n * selective functions.\n */\nint ENGINE_set_default(ENGINE *e, unsigned int flags);\n\nvoid ENGINE_add_conf_module(void);\n\n/* Deprecated functions ... */\n/* int ENGINE_clear_defaults(void); */\n\n/**************************/\n/* DYNAMIC ENGINE SUPPORT */\n/**************************/\n\n/* Binary/behaviour compatibility levels */\n# define OSSL_DYNAMIC_VERSION            (unsigned long)0x00020000\n/*\n * Binary versions older than this are too old for us (whether we're a loader\n * or a loadee)\n */\n# define OSSL_DYNAMIC_OLDEST             (unsigned long)0x00020000\n\n/*\n * When compiling an ENGINE entirely as an external shared library, loadable\n * by the \"dynamic\" ENGINE, these types are needed. The 'dynamic_fns'\n * structure type provides the calling application's (or library's) error\n * functionality and memory management function pointers to the loaded\n * library. These should be used/set in the loaded library code so that the\n * loading application's 'state' will be used/changed in all operations. The\n * 'static_state' pointer allows the loaded library to know if it shares the\n * same static data as the calling application (or library), and thus whether\n * these callbacks need to be set or not.\n */\ntypedef void *(*dyn_MEM_malloc_cb) (size_t);\ntypedef void *(*dyn_MEM_realloc_cb) (void *, size_t);\ntypedef void (*dyn_MEM_free_cb) (void *);\ntypedef struct st_dynamic_MEM_fns {\n    dyn_MEM_malloc_cb malloc_cb;\n    dyn_MEM_realloc_cb realloc_cb;\n    dyn_MEM_free_cb free_cb;\n} dynamic_MEM_fns;\n/*\n * FIXME: Perhaps the memory and locking code (crypto.h) should declare and\n * use these types so we (and any other dependant code) can simplify a bit??\n */\ntypedef void (*dyn_lock_locking_cb) (int, int, const char *, int);\ntypedef int (*dyn_lock_add_lock_cb) (int *, int, int, const char *, int);\ntypedef struct CRYPTO_dynlock_value *(*dyn_dynlock_create_cb) (const char *,\n                                                               int);\ntypedef void (*dyn_dynlock_lock_cb) (int, struct CRYPTO_dynlock_value *,\n                                     const char *, int);\ntypedef void (*dyn_dynlock_destroy_cb) (struct CRYPTO_dynlock_value *,\n                                        const char *, int);\ntypedef struct st_dynamic_LOCK_fns {\n    dyn_lock_locking_cb lock_locking_cb;\n    dyn_lock_add_lock_cb lock_add_lock_cb;\n    dyn_dynlock_create_cb dynlock_create_cb;\n    dyn_dynlock_lock_cb dynlock_lock_cb;\n    dyn_dynlock_destroy_cb dynlock_destroy_cb;\n} dynamic_LOCK_fns;\n/* The top-level structure */\ntypedef struct st_dynamic_fns {\n    void *static_state;\n    const ERR_FNS *err_fns;\n    const CRYPTO_EX_DATA_IMPL *ex_data_fns;\n    dynamic_MEM_fns mem_fns;\n    dynamic_LOCK_fns lock_fns;\n} dynamic_fns;\n\n/*\n * The version checking function should be of this prototype. NB: The\n * ossl_version value passed in is the OSSL_DYNAMIC_VERSION of the loading\n * code. If this function returns zero, it indicates a (potential) version\n * incompatibility and the loaded library doesn't believe it can proceed.\n * Otherwise, the returned value is the (latest) version supported by the\n * loading library. The loader may still decide that the loaded code's\n * version is unsatisfactory and could veto the load. The function is\n * expected to be implemented with the symbol name \"v_check\", and a default\n * implementation can be fully instantiated with\n * IMPLEMENT_DYNAMIC_CHECK_FN().\n */\ntypedef unsigned long (*dynamic_v_check_fn) (unsigned long ossl_version);\n# define IMPLEMENT_DYNAMIC_CHECK_FN() \\\n        OPENSSL_EXPORT unsigned long v_check(unsigned long v); \\\n        OPENSSL_EXPORT unsigned long v_check(unsigned long v) { \\\n                if(v >= OSSL_DYNAMIC_OLDEST) return OSSL_DYNAMIC_VERSION; \\\n                return 0; }\n\n/*\n * This function is passed the ENGINE structure to initialise with its own\n * function and command settings. It should not adjust the structural or\n * functional reference counts. If this function returns zero, (a) the load\n * will be aborted, (b) the previous ENGINE state will be memcpy'd back onto\n * the structure, and (c) the shared library will be unloaded. So\n * implementations should do their own internal cleanup in failure\n * circumstances otherwise they could leak. The 'id' parameter, if non-NULL,\n * represents the ENGINE id that the loader is looking for. If this is NULL,\n * the shared library can choose to return failure or to initialise a\n * 'default' ENGINE. If non-NULL, the shared library must initialise only an\n * ENGINE matching the passed 'id'. The function is expected to be\n * implemented with the symbol name \"bind_engine\". A standard implementation\n * can be instantiated with IMPLEMENT_DYNAMIC_BIND_FN(fn) where the parameter\n * 'fn' is a callback function that populates the ENGINE structure and\n * returns an int value (zero for failure). 'fn' should have prototype;\n * [static] int fn(ENGINE *e, const char *id);\n */\ntypedef int (*dynamic_bind_engine) (ENGINE *e, const char *id,\n                                    const dynamic_fns *fns);\n# define IMPLEMENT_DYNAMIC_BIND_FN(fn) \\\n        OPENSSL_EXPORT \\\n        int bind_engine(ENGINE *e, const char *id, const dynamic_fns *fns); \\\n        OPENSSL_EXPORT \\\n        int bind_engine(ENGINE *e, const char *id, const dynamic_fns *fns) { \\\n                if(ENGINE_get_static_state() == fns->static_state) goto skip_cbs; \\\n                if(!CRYPTO_set_mem_functions(fns->mem_fns.malloc_cb, \\\n                        fns->mem_fns.realloc_cb, fns->mem_fns.free_cb)) \\\n                        return 0; \\\n                CRYPTO_set_locking_callback(fns->lock_fns.lock_locking_cb); \\\n                CRYPTO_set_add_lock_callback(fns->lock_fns.lock_add_lock_cb); \\\n                CRYPTO_set_dynlock_create_callback(fns->lock_fns.dynlock_create_cb); \\\n                CRYPTO_set_dynlock_lock_callback(fns->lock_fns.dynlock_lock_cb); \\\n                CRYPTO_set_dynlock_destroy_callback(fns->lock_fns.dynlock_destroy_cb); \\\n                if(!CRYPTO_set_ex_data_implementation(fns->ex_data_fns)) \\\n                        return 0; \\\n                if(!ERR_set_implementation(fns->err_fns)) return 0; \\\n        skip_cbs: \\\n                if(!fn(e,id)) return 0; \\\n                return 1; }\n\n/*\n * If the loading application (or library) and the loaded ENGINE library\n * share the same static data (eg. they're both dynamically linked to the\n * same libcrypto.so) we need a way to avoid trying to set system callbacks -\n * this would fail, and for the same reason that it's unnecessary to try. If\n * the loaded ENGINE has (or gets from through the loader) its own copy of\n * the libcrypto static data, we will need to set the callbacks. The easiest\n * way to detect this is to have a function that returns a pointer to some\n * static data and let the loading application and loaded ENGINE compare\n * their respective values.\n */\nvoid *ENGINE_get_static_state(void);\n\n# if defined(__OpenBSD__) || defined(__FreeBSD__) || defined(HAVE_CRYPTODEV)\nvoid ENGINE_setup_bsd_cryptodev(void);\n# endif\n\n/* BEGIN ERROR CODES */\n/*\n * The following lines are auto generated by the script mkerr.pl. Any changes\n * made after this point may be overwritten when the script is next run.\n */\nvoid ERR_load_ENGINE_strings(void);\n\n/* Error codes for the ENGINE functions. */\n\n/* Function codes. */\n# define ENGINE_F_DYNAMIC_CTRL                            180\n# define ENGINE_F_DYNAMIC_GET_DATA_CTX                    181\n# define ENGINE_F_DYNAMIC_LOAD                            182\n# define ENGINE_F_DYNAMIC_SET_DATA_CTX                    183\n# define ENGINE_F_ENGINE_ADD                              105\n# define ENGINE_F_ENGINE_BY_ID                            106\n# define ENGINE_F_ENGINE_CMD_IS_EXECUTABLE                170\n# define ENGINE_F_ENGINE_CTRL                             142\n# define ENGINE_F_ENGINE_CTRL_CMD                         178\n# define ENGINE_F_ENGINE_CTRL_CMD_STRING                  171\n# define ENGINE_F_ENGINE_FINISH                           107\n# define ENGINE_F_ENGINE_FREE_UTIL                        108\n# define ENGINE_F_ENGINE_GET_CIPHER                       185\n# define ENGINE_F_ENGINE_GET_DEFAULT_TYPE                 177\n# define ENGINE_F_ENGINE_GET_DIGEST                       186\n# define ENGINE_F_ENGINE_GET_NEXT                         115\n# define ENGINE_F_ENGINE_GET_PKEY_ASN1_METH               193\n# define ENGINE_F_ENGINE_GET_PKEY_METH                    192\n# define ENGINE_F_ENGINE_GET_PREV                         116\n# define ENGINE_F_ENGINE_INIT                             119\n# define ENGINE_F_ENGINE_LIST_ADD                         120\n# define ENGINE_F_ENGINE_LIST_REMOVE                      121\n# define ENGINE_F_ENGINE_LOAD_PRIVATE_KEY                 150\n# define ENGINE_F_ENGINE_LOAD_PUBLIC_KEY                  151\n# define ENGINE_F_ENGINE_LOAD_SSL_CLIENT_CERT             194\n# define ENGINE_F_ENGINE_NEW                              122\n# define ENGINE_F_ENGINE_REMOVE                           123\n# define ENGINE_F_ENGINE_SET_DEFAULT_STRING               189\n# define ENGINE_F_ENGINE_SET_DEFAULT_TYPE                 126\n# define ENGINE_F_ENGINE_SET_ID                           129\n# define ENGINE_F_ENGINE_SET_NAME                         130\n# define ENGINE_F_ENGINE_TABLE_REGISTER                   184\n# define ENGINE_F_ENGINE_UNLOAD_KEY                       152\n# define ENGINE_F_ENGINE_UNLOCKED_FINISH                  191\n# define ENGINE_F_ENGINE_UP_REF                           190\n# define ENGINE_F_INT_CTRL_HELPER                         172\n# define ENGINE_F_INT_ENGINE_CONFIGURE                    188\n# define ENGINE_F_INT_ENGINE_MODULE_INIT                  187\n# define ENGINE_F_LOG_MESSAGE                             141\n\n/* Reason codes. */\n# define ENGINE_R_ALREADY_LOADED                          100\n# define ENGINE_R_ARGUMENT_IS_NOT_A_NUMBER                133\n# define ENGINE_R_CMD_NOT_EXECUTABLE                      134\n# define ENGINE_R_COMMAND_TAKES_INPUT                     135\n# define ENGINE_R_COMMAND_TAKES_NO_INPUT                  136\n# define ENGINE_R_CONFLICTING_ENGINE_ID                   103\n# define ENGINE_R_CTRL_COMMAND_NOT_IMPLEMENTED            119\n# define ENGINE_R_DH_NOT_IMPLEMENTED                      139\n# define ENGINE_R_DSA_NOT_IMPLEMENTED                     140\n# define ENGINE_R_DSO_FAILURE                             104\n# define ENGINE_R_DSO_NOT_FOUND                           132\n# define ENGINE_R_ENGINES_SECTION_ERROR                   148\n# define ENGINE_R_ENGINE_CONFIGURATION_ERROR              102\n# define ENGINE_R_ENGINE_IS_NOT_IN_LIST                   105\n# define ENGINE_R_ENGINE_SECTION_ERROR                    149\n# define ENGINE_R_FAILED_LOADING_PRIVATE_KEY              128\n# define ENGINE_R_FAILED_LOADING_PUBLIC_KEY               129\n# define ENGINE_R_FINISH_FAILED                           106\n# define ENGINE_R_GET_HANDLE_FAILED                       107\n# define ENGINE_R_ID_OR_NAME_MISSING                      108\n# define ENGINE_R_INIT_FAILED                             109\n# define ENGINE_R_INTERNAL_LIST_ERROR                     110\n# define ENGINE_R_INVALID_ARGUMENT                        143\n# define ENGINE_R_INVALID_CMD_NAME                        137\n# define ENGINE_R_INVALID_CMD_NUMBER                      138\n# define ENGINE_R_INVALID_INIT_VALUE                      151\n# define ENGINE_R_INVALID_STRING                          150\n# define ENGINE_R_NOT_INITIALISED                         117\n# define ENGINE_R_NOT_LOADED                              112\n# define ENGINE_R_NO_CONTROL_FUNCTION                     120\n# define ENGINE_R_NO_INDEX                                144\n# define ENGINE_R_NO_LOAD_FUNCTION                        125\n# define ENGINE_R_NO_REFERENCE                            130\n# define ENGINE_R_NO_SUCH_ENGINE                          116\n# define ENGINE_R_NO_UNLOAD_FUNCTION                      126\n# define ENGINE_R_PROVIDE_PARAMETERS                      113\n# define ENGINE_R_RSA_NOT_IMPLEMENTED                     141\n# define ENGINE_R_UNIMPLEMENTED_CIPHER                    146\n# define ENGINE_R_UNIMPLEMENTED_DIGEST                    147\n# define ENGINE_R_UNIMPLEMENTED_PUBLIC_KEY_METHOD         101\n# define ENGINE_R_VERSION_INCOMPATIBILITY                 145\n\n#ifdef  __cplusplus\n}\n#endif\n#endif\n"
  },
  {
    "path": "Pods/OpenSSL-Universal/include-ios/openssl/err.h",
    "content": "/* crypto/err/err.h */\n/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)\n * All rights reserved.\n *\n * This package is an SSL implementation written\n * by Eric Young (eay@cryptsoft.com).\n * The implementation was written so as to conform with Netscapes SSL.\n *\n * This library is free for commercial and non-commercial use as long as\n * the following conditions are aheared to.  The following conditions\n * apply to all code found in this distribution, be it the RC4, RSA,\n * lhash, DES, etc., code; not just the SSL code.  The SSL documentation\n * included with this distribution is covered by the same copyright terms\n * except that the holder is Tim Hudson (tjh@cryptsoft.com).\n *\n * Copyright remains Eric Young's, and as such any Copyright notices in\n * the code are not to be removed.\n * If this package is used in a product, Eric Young should be given attribution\n * as the author of the parts of the library used.\n * This can be in the form of a textual message at program startup or\n * in documentation (online or textual) provided with the package.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n * 1. Redistributions of source code must retain the copyright\n *    notice, this list of conditions and the following disclaimer.\n * 2. Redistributions in binary form must reproduce the above copyright\n *    notice, this list of conditions and the following disclaimer in the\n *    documentation and/or other materials provided with the distribution.\n * 3. All advertising materials mentioning features or use of this software\n *    must display the following acknowledgement:\n *    \"This product includes cryptographic software written by\n *     Eric Young (eay@cryptsoft.com)\"\n *    The word 'cryptographic' can be left out if the rouines from the library\n *    being used are not cryptographic related :-).\n * 4. If you include any Windows specific code (or a derivative thereof) from\n *    the apps directory (application code) you must include an acknowledgement:\n *    \"This product includes software written by Tim Hudson (tjh@cryptsoft.com)\"\n *\n * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND\n * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE\n * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n * SUCH DAMAGE.\n *\n * The licence and distribution terms for any publically available version or\n * derivative of this code cannot be changed.  i.e. this code cannot simply be\n * copied and put under another distribution licence\n * [including the GNU Public Licence.]\n */\n/* ====================================================================\n * Copyright (c) 1998-2006 The OpenSSL Project.  All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n *\n * 1. Redistributions of source code must retain the above copyright\n *    notice, this list of conditions and the following disclaimer.\n *\n * 2. Redistributions in binary form must reproduce the above copyright\n *    notice, this list of conditions and the following disclaimer in\n *    the documentation and/or other materials provided with the\n *    distribution.\n *\n * 3. All advertising materials mentioning features or use of this\n *    software must display the following acknowledgment:\n *    \"This product includes software developed by the OpenSSL Project\n *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)\"\n *\n * 4. The names \"OpenSSL Toolkit\" and \"OpenSSL Project\" must not be used to\n *    endorse or promote products derived from this software without\n *    prior written permission. For written permission, please contact\n *    openssl-core@openssl.org.\n *\n * 5. Products derived from this software may not be called \"OpenSSL\"\n *    nor may \"OpenSSL\" appear in their names without prior written\n *    permission of the OpenSSL Project.\n *\n * 6. Redistributions of any form whatsoever must retain the following\n *    acknowledgment:\n *    \"This product includes software developed by the OpenSSL Project\n *    for use in the OpenSSL Toolkit (http://www.openssl.org/)\"\n *\n * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY\n * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\n * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR\n * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,\n * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED\n * OF THE POSSIBILITY OF SUCH DAMAGE.\n * ====================================================================\n *\n * This product includes cryptographic software written by Eric Young\n * (eay@cryptsoft.com).  This product includes software written by Tim\n * Hudson (tjh@cryptsoft.com).\n *\n */\n\n#ifndef HEADER_ERR_H\n# define HEADER_ERR_H\n\n# include <openssl/e_os2.h>\n\n# ifndef OPENSSL_NO_FP_API\n#  include <stdio.h>\n#  include <stdlib.h>\n# endif\n\n# include <openssl/ossl_typ.h>\n# ifndef OPENSSL_NO_BIO\n#  include <openssl/bio.h>\n# endif\n# ifndef OPENSSL_NO_LHASH\n#  include <openssl/lhash.h>\n# endif\n\n#ifdef  __cplusplus\nextern \"C\" {\n#endif\n\n# ifndef OPENSSL_NO_ERR\n#  define ERR_PUT_error(a,b,c,d,e)        ERR_put_error(a,b,c,d,e)\n# else\n#  define ERR_PUT_error(a,b,c,d,e)        ERR_put_error(a,b,c,NULL,0)\n# endif\n\n# include <errno.h>\n\n# define ERR_TXT_MALLOCED        0x01\n# define ERR_TXT_STRING          0x02\n\n# define ERR_FLAG_MARK           0x01\n\n# define ERR_NUM_ERRORS  16\ntypedef struct err_state_st {\n    CRYPTO_THREADID tid;\n    int err_flags[ERR_NUM_ERRORS];\n    unsigned long err_buffer[ERR_NUM_ERRORS];\n    char *err_data[ERR_NUM_ERRORS];\n    int err_data_flags[ERR_NUM_ERRORS];\n    const char *err_file[ERR_NUM_ERRORS];\n    int err_line[ERR_NUM_ERRORS];\n    int top, bottom;\n} ERR_STATE;\n\n/* library */\n# define ERR_LIB_NONE            1\n# define ERR_LIB_SYS             2\n# define ERR_LIB_BN              3\n# define ERR_LIB_RSA             4\n# define ERR_LIB_DH              5\n# define ERR_LIB_EVP             6\n# define ERR_LIB_BUF             7\n# define ERR_LIB_OBJ             8\n# define ERR_LIB_PEM             9\n# define ERR_LIB_DSA             10\n# define ERR_LIB_X509            11\n/* #define ERR_LIB_METH         12 */\n# define ERR_LIB_ASN1            13\n# define ERR_LIB_CONF            14\n# define ERR_LIB_CRYPTO          15\n# define ERR_LIB_EC              16\n# define ERR_LIB_SSL             20\n/* #define ERR_LIB_SSL23        21 */\n/* #define ERR_LIB_SSL2         22 */\n/* #define ERR_LIB_SSL3         23 */\n/* #define ERR_LIB_RSAREF       30 */\n/* #define ERR_LIB_PROXY        31 */\n# define ERR_LIB_BIO             32\n# define ERR_LIB_PKCS7           33\n# define ERR_LIB_X509V3          34\n# define ERR_LIB_PKCS12          35\n# define ERR_LIB_RAND            36\n# define ERR_LIB_DSO             37\n# define ERR_LIB_ENGINE          38\n# define ERR_LIB_OCSP            39\n# define ERR_LIB_UI              40\n# define ERR_LIB_COMP            41\n# define ERR_LIB_ECDSA           42\n# define ERR_LIB_ECDH            43\n# define ERR_LIB_STORE           44\n# define ERR_LIB_FIPS            45\n# define ERR_LIB_CMS             46\n# define ERR_LIB_TS              47\n# define ERR_LIB_HMAC            48\n# define ERR_LIB_JPAKE           49\n\n# define ERR_LIB_USER            128\n\n# define SYSerr(f,r)  ERR_PUT_error(ERR_LIB_SYS,(f),(r),__FILE__,__LINE__)\n# define BNerr(f,r)   ERR_PUT_error(ERR_LIB_BN,(f),(r),__FILE__,__LINE__)\n# define RSAerr(f,r)  ERR_PUT_error(ERR_LIB_RSA,(f),(r),__FILE__,__LINE__)\n# define DHerr(f,r)   ERR_PUT_error(ERR_LIB_DH,(f),(r),__FILE__,__LINE__)\n# define EVPerr(f,r)  ERR_PUT_error(ERR_LIB_EVP,(f),(r),__FILE__,__LINE__)\n# define BUFerr(f,r)  ERR_PUT_error(ERR_LIB_BUF,(f),(r),__FILE__,__LINE__)\n# define OBJerr(f,r)  ERR_PUT_error(ERR_LIB_OBJ,(f),(r),__FILE__,__LINE__)\n# define PEMerr(f,r)  ERR_PUT_error(ERR_LIB_PEM,(f),(r),__FILE__,__LINE__)\n# define DSAerr(f,r)  ERR_PUT_error(ERR_LIB_DSA,(f),(r),__FILE__,__LINE__)\n# define X509err(f,r) ERR_PUT_error(ERR_LIB_X509,(f),(r),__FILE__,__LINE__)\n# define ASN1err(f,r) ERR_PUT_error(ERR_LIB_ASN1,(f),(r),__FILE__,__LINE__)\n# define CONFerr(f,r) ERR_PUT_error(ERR_LIB_CONF,(f),(r),__FILE__,__LINE__)\n# define CRYPTOerr(f,r) ERR_PUT_error(ERR_LIB_CRYPTO,(f),(r),__FILE__,__LINE__)\n# define ECerr(f,r)   ERR_PUT_error(ERR_LIB_EC,(f),(r),__FILE__,__LINE__)\n# define SSLerr(f,r)  ERR_PUT_error(ERR_LIB_SSL,(f),(r),__FILE__,__LINE__)\n# define BIOerr(f,r)  ERR_PUT_error(ERR_LIB_BIO,(f),(r),__FILE__,__LINE__)\n# define PKCS7err(f,r) ERR_PUT_error(ERR_LIB_PKCS7,(f),(r),__FILE__,__LINE__)\n# define X509V3err(f,r) ERR_PUT_error(ERR_LIB_X509V3,(f),(r),__FILE__,__LINE__)\n# define PKCS12err(f,r) ERR_PUT_error(ERR_LIB_PKCS12,(f),(r),__FILE__,__LINE__)\n# define RANDerr(f,r) ERR_PUT_error(ERR_LIB_RAND,(f),(r),__FILE__,__LINE__)\n# define DSOerr(f,r) ERR_PUT_error(ERR_LIB_DSO,(f),(r),__FILE__,__LINE__)\n# define ENGINEerr(f,r) ERR_PUT_error(ERR_LIB_ENGINE,(f),(r),__FILE__,__LINE__)\n# define OCSPerr(f,r) ERR_PUT_error(ERR_LIB_OCSP,(f),(r),__FILE__,__LINE__)\n# define UIerr(f,r) ERR_PUT_error(ERR_LIB_UI,(f),(r),__FILE__,__LINE__)\n# define COMPerr(f,r) ERR_PUT_error(ERR_LIB_COMP,(f),(r),__FILE__,__LINE__)\n# define ECDSAerr(f,r)  ERR_PUT_error(ERR_LIB_ECDSA,(f),(r),__FILE__,__LINE__)\n# define ECDHerr(f,r)  ERR_PUT_error(ERR_LIB_ECDH,(f),(r),__FILE__,__LINE__)\n# define STOREerr(f,r) ERR_PUT_error(ERR_LIB_STORE,(f),(r),__FILE__,__LINE__)\n# define FIPSerr(f,r) ERR_PUT_error(ERR_LIB_FIPS,(f),(r),__FILE__,__LINE__)\n# define CMSerr(f,r) ERR_PUT_error(ERR_LIB_CMS,(f),(r),__FILE__,__LINE__)\n# define TSerr(f,r) ERR_PUT_error(ERR_LIB_TS,(f),(r),__FILE__,__LINE__)\n# define HMACerr(f,r) ERR_PUT_error(ERR_LIB_HMAC,(f),(r),__FILE__,__LINE__)\n# define JPAKEerr(f,r) ERR_PUT_error(ERR_LIB_JPAKE,(f),(r),__FILE__,__LINE__)\n\n/*\n * Borland C seems too stupid to be able to shift and do longs in the\n * pre-processor :-(\n */\n# define ERR_PACK(l,f,r)         (((((unsigned long)l)&0xffL)*0x1000000)| \\\n                                ((((unsigned long)f)&0xfffL)*0x1000)| \\\n                                ((((unsigned long)r)&0xfffL)))\n# define ERR_GET_LIB(l)          (int)((((unsigned long)l)>>24L)&0xffL)\n# define ERR_GET_FUNC(l)         (int)((((unsigned long)l)>>12L)&0xfffL)\n# define ERR_GET_REASON(l)       (int)((l)&0xfffL)\n# define ERR_FATAL_ERROR(l)      (int)((l)&ERR_R_FATAL)\n\n/* OS functions */\n# define SYS_F_FOPEN             1\n# define SYS_F_CONNECT           2\n# define SYS_F_GETSERVBYNAME     3\n# define SYS_F_SOCKET            4\n# define SYS_F_IOCTLSOCKET       5\n# define SYS_F_BIND              6\n# define SYS_F_LISTEN            7\n# define SYS_F_ACCEPT            8\n# define SYS_F_WSASTARTUP        9/* Winsock stuff */\n# define SYS_F_OPENDIR           10\n# define SYS_F_FREAD             11\n\n/* reasons */\n# define ERR_R_SYS_LIB   ERR_LIB_SYS/* 2 */\n# define ERR_R_BN_LIB    ERR_LIB_BN/* 3 */\n# define ERR_R_RSA_LIB   ERR_LIB_RSA/* 4 */\n# define ERR_R_DH_LIB    ERR_LIB_DH/* 5 */\n# define ERR_R_EVP_LIB   ERR_LIB_EVP/* 6 */\n# define ERR_R_BUF_LIB   ERR_LIB_BUF/* 7 */\n# define ERR_R_OBJ_LIB   ERR_LIB_OBJ/* 8 */\n# define ERR_R_PEM_LIB   ERR_LIB_PEM/* 9 */\n# define ERR_R_DSA_LIB   ERR_LIB_DSA/* 10 */\n# define ERR_R_X509_LIB  ERR_LIB_X509/* 11 */\n# define ERR_R_ASN1_LIB  ERR_LIB_ASN1/* 13 */\n# define ERR_R_CONF_LIB  ERR_LIB_CONF/* 14 */\n# define ERR_R_CRYPTO_LIB ERR_LIB_CRYPTO/* 15 */\n# define ERR_R_EC_LIB    ERR_LIB_EC/* 16 */\n# define ERR_R_SSL_LIB   ERR_LIB_SSL/* 20 */\n# define ERR_R_BIO_LIB   ERR_LIB_BIO/* 32 */\n# define ERR_R_PKCS7_LIB ERR_LIB_PKCS7/* 33 */\n# define ERR_R_X509V3_LIB ERR_LIB_X509V3/* 34 */\n# define ERR_R_PKCS12_LIB ERR_LIB_PKCS12/* 35 */\n# define ERR_R_RAND_LIB  ERR_LIB_RAND/* 36 */\n# define ERR_R_DSO_LIB   ERR_LIB_DSO/* 37 */\n# define ERR_R_ENGINE_LIB ERR_LIB_ENGINE/* 38 */\n# define ERR_R_OCSP_LIB  ERR_LIB_OCSP/* 39 */\n# define ERR_R_UI_LIB    ERR_LIB_UI/* 40 */\n# define ERR_R_COMP_LIB  ERR_LIB_COMP/* 41 */\n# define ERR_R_ECDSA_LIB ERR_LIB_ECDSA/* 42 */\n# define ERR_R_ECDH_LIB  ERR_LIB_ECDH/* 43 */\n# define ERR_R_STORE_LIB ERR_LIB_STORE/* 44 */\n# define ERR_R_TS_LIB    ERR_LIB_TS/* 45 */\n\n# define ERR_R_NESTED_ASN1_ERROR                 58\n# define ERR_R_BAD_ASN1_OBJECT_HEADER            59\n# define ERR_R_BAD_GET_ASN1_OBJECT_CALL          60\n# define ERR_R_EXPECTING_AN_ASN1_SEQUENCE        61\n# define ERR_R_ASN1_LENGTH_MISMATCH              62\n# define ERR_R_MISSING_ASN1_EOS                  63\n\n/* fatal error */\n# define ERR_R_FATAL                             64\n# define ERR_R_MALLOC_FAILURE                    (1|ERR_R_FATAL)\n# define ERR_R_SHOULD_NOT_HAVE_BEEN_CALLED       (2|ERR_R_FATAL)\n# define ERR_R_PASSED_NULL_PARAMETER             (3|ERR_R_FATAL)\n# define ERR_R_INTERNAL_ERROR                    (4|ERR_R_FATAL)\n# define ERR_R_DISABLED                          (5|ERR_R_FATAL)\n\n/*\n * 99 is the maximum possible ERR_R_... code, higher values are reserved for\n * the individual libraries\n */\n\ntypedef struct ERR_string_data_st {\n    unsigned long error;\n    const char *string;\n} ERR_STRING_DATA;\n\nvoid ERR_put_error(int lib, int func, int reason, const char *file, int line);\nvoid ERR_set_error_data(char *data, int flags);\n\nunsigned long ERR_get_error(void);\nunsigned long ERR_get_error_line(const char **file, int *line);\nunsigned long ERR_get_error_line_data(const char **file, int *line,\n                                      const char **data, int *flags);\nunsigned long ERR_peek_error(void);\nunsigned long ERR_peek_error_line(const char **file, int *line);\nunsigned long ERR_peek_error_line_data(const char **file, int *line,\n                                       const char **data, int *flags);\nunsigned long ERR_peek_last_error(void);\nunsigned long ERR_peek_last_error_line(const char **file, int *line);\nunsigned long ERR_peek_last_error_line_data(const char **file, int *line,\n                                            const char **data, int *flags);\nvoid ERR_clear_error(void);\nchar *ERR_error_string(unsigned long e, char *buf);\nvoid ERR_error_string_n(unsigned long e, char *buf, size_t len);\nconst char *ERR_lib_error_string(unsigned long e);\nconst char *ERR_func_error_string(unsigned long e);\nconst char *ERR_reason_error_string(unsigned long e);\nvoid ERR_print_errors_cb(int (*cb) (const char *str, size_t len, void *u),\n                         void *u);\n# ifndef OPENSSL_NO_FP_API\nvoid ERR_print_errors_fp(FILE *fp);\n# endif\n# ifndef OPENSSL_NO_BIO\nvoid ERR_print_errors(BIO *bp);\n# endif\nvoid ERR_add_error_data(int num, ...);\nvoid ERR_add_error_vdata(int num, va_list args);\nvoid ERR_load_strings(int lib, ERR_STRING_DATA str[]);\nvoid ERR_unload_strings(int lib, ERR_STRING_DATA str[]);\nvoid ERR_load_ERR_strings(void);\nvoid ERR_load_crypto_strings(void);\nvoid ERR_free_strings(void);\n\nvoid ERR_remove_thread_state(const CRYPTO_THREADID *tid);\n# ifndef OPENSSL_NO_DEPRECATED\nvoid ERR_remove_state(unsigned long pid); /* if zero we look it up */\n# endif\nERR_STATE *ERR_get_state(void);\n\n# ifndef OPENSSL_NO_LHASH\nLHASH_OF(ERR_STRING_DATA) *ERR_get_string_table(void);\nLHASH_OF(ERR_STATE) *ERR_get_err_state_table(void);\nvoid ERR_release_err_state_table(LHASH_OF(ERR_STATE) **hash);\n# endif\n\nint ERR_get_next_error_library(void);\n\nint ERR_set_mark(void);\nint ERR_pop_to_mark(void);\n\n/* Already defined in ossl_typ.h */\n/* typedef struct st_ERR_FNS ERR_FNS; */\n/*\n * An application can use this function and provide the return value to\n * loaded modules that should use the application's ERR state/functionality\n */\nconst ERR_FNS *ERR_get_implementation(void);\n/*\n * A loaded module should call this function prior to any ERR operations\n * using the application's \"ERR_FNS\".\n */\nint ERR_set_implementation(const ERR_FNS *fns);\n\n#ifdef  __cplusplus\n}\n#endif\n\n#endif\n"
  },
  {
    "path": "Pods/OpenSSL-Universal/include-ios/openssl/evp.h",
    "content": "/* crypto/evp/evp.h */\n/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)\n * All rights reserved.\n *\n * This package is an SSL implementation written\n * by Eric Young (eay@cryptsoft.com).\n * The implementation was written so as to conform with Netscapes SSL.\n *\n * This library is free for commercial and non-commercial use as long as\n * the following conditions are aheared to.  The following conditions\n * apply to all code found in this distribution, be it the RC4, RSA,\n * lhash, DES, etc., code; not just the SSL code.  The SSL documentation\n * included with this distribution is covered by the same copyright terms\n * except that the holder is Tim Hudson (tjh@cryptsoft.com).\n *\n * Copyright remains Eric Young's, and as such any Copyright notices in\n * the code are not to be removed.\n * If this package is used in a product, Eric Young should be given attribution\n * as the author of the parts of the library used.\n * This can be in the form of a textual message at program startup or\n * in documentation (online or textual) provided with the package.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n * 1. Redistributions of source code must retain the copyright\n *    notice, this list of conditions and the following disclaimer.\n * 2. Redistributions in binary form must reproduce the above copyright\n *    notice, this list of conditions and the following disclaimer in the\n *    documentation and/or other materials provided with the distribution.\n * 3. All advertising materials mentioning features or use of this software\n *    must display the following acknowledgement:\n *    \"This product includes cryptographic software written by\n *     Eric Young (eay@cryptsoft.com)\"\n *    The word 'cryptographic' can be left out if the rouines from the library\n *    being used are not cryptographic related :-).\n * 4. If you include any Windows specific code (or a derivative thereof) from\n *    the apps directory (application code) you must include an acknowledgement:\n *    \"This product includes software written by Tim Hudson (tjh@cryptsoft.com)\"\n *\n * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND\n * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE\n * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n * SUCH DAMAGE.\n *\n * The licence and distribution terms for any publically available version or\n * derivative of this code cannot be changed.  i.e. this code cannot simply be\n * copied and put under another distribution licence\n * [including the GNU Public Licence.]\n */\n\n#ifndef HEADER_ENVELOPE_H\n# define HEADER_ENVELOPE_H\n\n# ifdef OPENSSL_ALGORITHM_DEFINES\n#  include <openssl/opensslconf.h>\n# else\n#  define OPENSSL_ALGORITHM_DEFINES\n#  include <openssl/opensslconf.h>\n#  undef OPENSSL_ALGORITHM_DEFINES\n# endif\n\n# include <openssl/ossl_typ.h>\n\n# include <openssl/symhacks.h>\n\n# ifndef OPENSSL_NO_BIO\n#  include <openssl/bio.h>\n# endif\n\n/*-\n#define EVP_RC2_KEY_SIZE                16\n#define EVP_RC4_KEY_SIZE                16\n#define EVP_BLOWFISH_KEY_SIZE           16\n#define EVP_CAST5_KEY_SIZE              16\n#define EVP_RC5_32_12_16_KEY_SIZE       16\n*/\n# define EVP_MAX_MD_SIZE                 64/* longest known is SHA512 */\n# define EVP_MAX_KEY_LENGTH              64\n# define EVP_MAX_IV_LENGTH               16\n# define EVP_MAX_BLOCK_LENGTH            32\n\n# define PKCS5_SALT_LEN                  8\n/* Default PKCS#5 iteration count */\n# define PKCS5_DEFAULT_ITER              2048\n\n# include <openssl/objects.h>\n\n# define EVP_PK_RSA      0x0001\n# define EVP_PK_DSA      0x0002\n# define EVP_PK_DH       0x0004\n# define EVP_PK_EC       0x0008\n# define EVP_PKT_SIGN    0x0010\n# define EVP_PKT_ENC     0x0020\n# define EVP_PKT_EXCH    0x0040\n# define EVP_PKS_RSA     0x0100\n# define EVP_PKS_DSA     0x0200\n# define EVP_PKS_EC      0x0400\n\n# define EVP_PKEY_NONE   NID_undef\n# define EVP_PKEY_RSA    NID_rsaEncryption\n# define EVP_PKEY_RSA2   NID_rsa\n# define EVP_PKEY_DSA    NID_dsa\n# define EVP_PKEY_DSA1   NID_dsa_2\n# define EVP_PKEY_DSA2   NID_dsaWithSHA\n# define EVP_PKEY_DSA3   NID_dsaWithSHA1\n# define EVP_PKEY_DSA4   NID_dsaWithSHA1_2\n# define EVP_PKEY_DH     NID_dhKeyAgreement\n# define EVP_PKEY_EC     NID_X9_62_id_ecPublicKey\n# define EVP_PKEY_HMAC   NID_hmac\n# define EVP_PKEY_CMAC   NID_cmac\n\n#ifdef  __cplusplus\nextern \"C\" {\n#endif\n\n/*\n * Type needs to be a bit field Sub-type needs to be for variations on the\n * method, as in, can it do arbitrary encryption....\n */\nstruct evp_pkey_st {\n    int type;\n    int save_type;\n    int references;\n    const EVP_PKEY_ASN1_METHOD *ameth;\n    ENGINE *engine;\n    union {\n        char *ptr;\n# ifndef OPENSSL_NO_RSA\n        struct rsa_st *rsa;     /* RSA */\n# endif\n# ifndef OPENSSL_NO_DSA\n        struct dsa_st *dsa;     /* DSA */\n# endif\n# ifndef OPENSSL_NO_DH\n        struct dh_st *dh;       /* DH */\n# endif\n# ifndef OPENSSL_NO_EC\n        struct ec_key_st *ec;   /* ECC */\n# endif\n    } pkey;\n    int save_parameters;\n    STACK_OF(X509_ATTRIBUTE) *attributes; /* [ 0 ] */\n} /* EVP_PKEY */ ;\n\n# define EVP_PKEY_MO_SIGN        0x0001\n# define EVP_PKEY_MO_VERIFY      0x0002\n# define EVP_PKEY_MO_ENCRYPT     0x0004\n# define EVP_PKEY_MO_DECRYPT     0x0008\n\n# ifndef EVP_MD\nstruct env_md_st {\n    int type;\n    int pkey_type;\n    int md_size;\n    unsigned long flags;\n    int (*init) (EVP_MD_CTX *ctx);\n    int (*update) (EVP_MD_CTX *ctx, const void *data, size_t count);\n    int (*final) (EVP_MD_CTX *ctx, unsigned char *md);\n    int (*copy) (EVP_MD_CTX *to, const EVP_MD_CTX *from);\n    int (*cleanup) (EVP_MD_CTX *ctx);\n    /* FIXME: prototype these some day */\n    int (*sign) (int type, const unsigned char *m, unsigned int m_length,\n                 unsigned char *sigret, unsigned int *siglen, void *key);\n    int (*verify) (int type, const unsigned char *m, unsigned int m_length,\n                   const unsigned char *sigbuf, unsigned int siglen,\n                   void *key);\n    int required_pkey_type[5];  /* EVP_PKEY_xxx */\n    int block_size;\n    int ctx_size;               /* how big does the ctx->md_data need to be */\n    /* control function */\n    int (*md_ctrl) (EVP_MD_CTX *ctx, int cmd, int p1, void *p2);\n} /* EVP_MD */ ;\n\ntypedef int evp_sign_method(int type, const unsigned char *m,\n                            unsigned int m_length, unsigned char *sigret,\n                            unsigned int *siglen, void *key);\ntypedef int evp_verify_method(int type, const unsigned char *m,\n                              unsigned int m_length,\n                              const unsigned char *sigbuf,\n                              unsigned int siglen, void *key);\n\n/* digest can only handle a single block */\n#  define EVP_MD_FLAG_ONESHOT     0x0001\n\n/*\n * digest is a \"clone\" digest used\n * which is a copy of an existing\n * one for a specific public key type.\n * EVP_dss1() etc\n */\n#  define EVP_MD_FLAG_PKEY_DIGEST 0x0002\n\n/* Digest uses EVP_PKEY_METHOD for signing instead of MD specific signing */\n\n#  define EVP_MD_FLAG_PKEY_METHOD_SIGNATURE       0x0004\n\n/* DigestAlgorithmIdentifier flags... */\n\n#  define EVP_MD_FLAG_DIGALGID_MASK               0x0018\n\n/* NULL or absent parameter accepted. Use NULL */\n\n#  define EVP_MD_FLAG_DIGALGID_NULL               0x0000\n\n/* NULL or absent parameter accepted. Use NULL for PKCS#1 otherwise absent */\n\n#  define EVP_MD_FLAG_DIGALGID_ABSENT             0x0008\n\n/* Custom handling via ctrl */\n\n#  define EVP_MD_FLAG_DIGALGID_CUSTOM             0x0018\n\n/* Note if suitable for use in FIPS mode */\n#  define EVP_MD_FLAG_FIPS        0x0400\n\n/* Digest ctrls */\n\n#  define EVP_MD_CTRL_DIGALGID                    0x1\n#  define EVP_MD_CTRL_MICALG                      0x2\n\n/* Minimum Algorithm specific ctrl value */\n\n#  define EVP_MD_CTRL_ALG_CTRL                    0x1000\n\n#  define EVP_PKEY_NULL_method    NULL,NULL,{0,0,0,0}\n\n#  ifndef OPENSSL_NO_DSA\n#   define EVP_PKEY_DSA_method     (evp_sign_method *)DSA_sign, \\\n                                (evp_verify_method *)DSA_verify, \\\n                                {EVP_PKEY_DSA,EVP_PKEY_DSA2,EVP_PKEY_DSA3, \\\n                                        EVP_PKEY_DSA4,0}\n#  else\n#   define EVP_PKEY_DSA_method     EVP_PKEY_NULL_method\n#  endif\n\n#  ifndef OPENSSL_NO_ECDSA\n#   define EVP_PKEY_ECDSA_method   (evp_sign_method *)ECDSA_sign, \\\n                                (evp_verify_method *)ECDSA_verify, \\\n                                 {EVP_PKEY_EC,0,0,0}\n#  else\n#   define EVP_PKEY_ECDSA_method   EVP_PKEY_NULL_method\n#  endif\n\n#  ifndef OPENSSL_NO_RSA\n#   define EVP_PKEY_RSA_method     (evp_sign_method *)RSA_sign, \\\n                                (evp_verify_method *)RSA_verify, \\\n                                {EVP_PKEY_RSA,EVP_PKEY_RSA2,0,0}\n#   define EVP_PKEY_RSA_ASN1_OCTET_STRING_method \\\n                                (evp_sign_method *)RSA_sign_ASN1_OCTET_STRING, \\\n                                (evp_verify_method *)RSA_verify_ASN1_OCTET_STRING, \\\n                                {EVP_PKEY_RSA,EVP_PKEY_RSA2,0,0}\n#  else\n#   define EVP_PKEY_RSA_method     EVP_PKEY_NULL_method\n#   define EVP_PKEY_RSA_ASN1_OCTET_STRING_method EVP_PKEY_NULL_method\n#  endif\n\n# endif                         /* !EVP_MD */\n\nstruct env_md_ctx_st {\n    const EVP_MD *digest;\n    ENGINE *engine;             /* functional reference if 'digest' is\n                                 * ENGINE-provided */\n    unsigned long flags;\n    void *md_data;\n    /* Public key context for sign/verify */\n    EVP_PKEY_CTX *pctx;\n    /* Update function: usually copied from EVP_MD */\n    int (*update) (EVP_MD_CTX *ctx, const void *data, size_t count);\n} /* EVP_MD_CTX */ ;\n\n/* values for EVP_MD_CTX flags */\n\n# define EVP_MD_CTX_FLAG_ONESHOT         0x0001/* digest update will be\n                                                * called once only */\n# define EVP_MD_CTX_FLAG_CLEANED         0x0002/* context has already been\n                                                * cleaned */\n# define EVP_MD_CTX_FLAG_REUSE           0x0004/* Don't free up ctx->md_data\n                                                * in EVP_MD_CTX_cleanup */\n/*\n * FIPS and pad options are ignored in 1.0.0, definitions are here so we\n * don't accidentally reuse the values for other purposes.\n */\n\n# define EVP_MD_CTX_FLAG_NON_FIPS_ALLOW  0x0008/* Allow use of non FIPS\n                                                * digest in FIPS mode */\n\n/*\n * The following PAD options are also currently ignored in 1.0.0, digest\n * parameters are handled through EVP_DigestSign*() and EVP_DigestVerify*()\n * instead.\n */\n# define EVP_MD_CTX_FLAG_PAD_MASK        0xF0/* RSA mode to use */\n# define EVP_MD_CTX_FLAG_PAD_PKCS1       0x00/* PKCS#1 v1.5 mode */\n# define EVP_MD_CTX_FLAG_PAD_X931        0x10/* X9.31 mode */\n# define EVP_MD_CTX_FLAG_PAD_PSS         0x20/* PSS mode */\n\n# define EVP_MD_CTX_FLAG_NO_INIT         0x0100/* Don't initialize md_data */\n\nstruct evp_cipher_st {\n    int nid;\n    int block_size;\n    /* Default value for variable length ciphers */\n    int key_len;\n    int iv_len;\n    /* Various flags */\n    unsigned long flags;\n    /* init key */\n    int (*init) (EVP_CIPHER_CTX *ctx, const unsigned char *key,\n                 const unsigned char *iv, int enc);\n    /* encrypt/decrypt data */\n    int (*do_cipher) (EVP_CIPHER_CTX *ctx, unsigned char *out,\n                      const unsigned char *in, size_t inl);\n    /* cleanup ctx */\n    int (*cleanup) (EVP_CIPHER_CTX *);\n    /* how big ctx->cipher_data needs to be */\n    int ctx_size;\n    /* Populate a ASN1_TYPE with parameters */\n    int (*set_asn1_parameters) (EVP_CIPHER_CTX *, ASN1_TYPE *);\n    /* Get parameters from a ASN1_TYPE */\n    int (*get_asn1_parameters) (EVP_CIPHER_CTX *, ASN1_TYPE *);\n    /* Miscellaneous operations */\n    int (*ctrl) (EVP_CIPHER_CTX *, int type, int arg, void *ptr);\n    /* Application data */\n    void *app_data;\n} /* EVP_CIPHER */ ;\n\n/* Values for cipher flags */\n\n/* Modes for ciphers */\n\n# define         EVP_CIPH_STREAM_CIPHER          0x0\n# define         EVP_CIPH_ECB_MODE               0x1\n# define         EVP_CIPH_CBC_MODE               0x2\n# define         EVP_CIPH_CFB_MODE               0x3\n# define         EVP_CIPH_OFB_MODE               0x4\n# define         EVP_CIPH_CTR_MODE               0x5\n# define         EVP_CIPH_GCM_MODE               0x6\n# define         EVP_CIPH_CCM_MODE               0x7\n# define         EVP_CIPH_XTS_MODE               0x10001\n# define         EVP_CIPH_MODE                   0xF0007\n/* Set if variable length cipher */\n# define         EVP_CIPH_VARIABLE_LENGTH        0x8\n/* Set if the iv handling should be done by the cipher itself */\n# define         EVP_CIPH_CUSTOM_IV              0x10\n/* Set if the cipher's init() function should be called if key is NULL */\n# define         EVP_CIPH_ALWAYS_CALL_INIT       0x20\n/* Call ctrl() to init cipher parameters */\n# define         EVP_CIPH_CTRL_INIT              0x40\n/* Don't use standard key length function */\n# define         EVP_CIPH_CUSTOM_KEY_LENGTH      0x80\n/* Don't use standard block padding */\n# define         EVP_CIPH_NO_PADDING             0x100\n/* cipher handles random key generation */\n# define         EVP_CIPH_RAND_KEY               0x200\n/* cipher has its own additional copying logic */\n# define         EVP_CIPH_CUSTOM_COPY            0x400\n/* Allow use default ASN1 get/set iv */\n# define         EVP_CIPH_FLAG_DEFAULT_ASN1      0x1000\n/* Buffer length in bits not bytes: CFB1 mode only */\n# define         EVP_CIPH_FLAG_LENGTH_BITS       0x2000\n/* Note if suitable for use in FIPS mode */\n# define         EVP_CIPH_FLAG_FIPS              0x4000\n/* Allow non FIPS cipher in FIPS mode */\n# define         EVP_CIPH_FLAG_NON_FIPS_ALLOW    0x8000\n/*\n * Cipher handles any and all padding logic as well as finalisation.\n */\n# define         EVP_CIPH_FLAG_CUSTOM_CIPHER     0x100000\n# define         EVP_CIPH_FLAG_AEAD_CIPHER       0x200000\n\n/* ctrl() values */\n\n# define         EVP_CTRL_INIT                   0x0\n# define         EVP_CTRL_SET_KEY_LENGTH         0x1\n# define         EVP_CTRL_GET_RC2_KEY_BITS       0x2\n# define         EVP_CTRL_SET_RC2_KEY_BITS       0x3\n# define         EVP_CTRL_GET_RC5_ROUNDS         0x4\n# define         EVP_CTRL_SET_RC5_ROUNDS         0x5\n# define         EVP_CTRL_RAND_KEY               0x6\n# define         EVP_CTRL_PBE_PRF_NID            0x7\n# define         EVP_CTRL_COPY                   0x8\n# define         EVP_CTRL_GCM_SET_IVLEN          0x9\n# define         EVP_CTRL_GCM_GET_TAG            0x10\n# define         EVP_CTRL_GCM_SET_TAG            0x11\n# define         EVP_CTRL_GCM_SET_IV_FIXED       0x12\n# define         EVP_CTRL_GCM_IV_GEN             0x13\n# define         EVP_CTRL_CCM_SET_IVLEN          EVP_CTRL_GCM_SET_IVLEN\n# define         EVP_CTRL_CCM_GET_TAG            EVP_CTRL_GCM_GET_TAG\n# define         EVP_CTRL_CCM_SET_TAG            EVP_CTRL_GCM_SET_TAG\n# define         EVP_CTRL_CCM_SET_L              0x14\n# define         EVP_CTRL_CCM_SET_MSGLEN         0x15\n/*\n * AEAD cipher deduces payload length and returns number of bytes required to\n * store MAC and eventual padding. Subsequent call to EVP_Cipher even\n * appends/verifies MAC.\n */\n# define         EVP_CTRL_AEAD_TLS1_AAD          0x16\n/* Used by composite AEAD ciphers, no-op in GCM, CCM... */\n# define         EVP_CTRL_AEAD_SET_MAC_KEY       0x17\n/* Set the GCM invocation field, decrypt only */\n# define         EVP_CTRL_GCM_SET_IV_INV         0x18\n\n/* RFC 5246 defines additional data to be 13 bytes in length */\n# define         EVP_AEAD_TLS1_AAD_LEN           13\n\n/* GCM TLS constants */\n/* Length of fixed part of IV derived from PRF */\n# define EVP_GCM_TLS_FIXED_IV_LEN                        4\n/* Length of explicit part of IV part of TLS records */\n# define EVP_GCM_TLS_EXPLICIT_IV_LEN                     8\n/* Length of tag for TLS */\n# define EVP_GCM_TLS_TAG_LEN                             16\n\ntypedef struct evp_cipher_info_st {\n    const EVP_CIPHER *cipher;\n    unsigned char iv[EVP_MAX_IV_LENGTH];\n} EVP_CIPHER_INFO;\n\nstruct evp_cipher_ctx_st {\n    const EVP_CIPHER *cipher;\n    ENGINE *engine;             /* functional reference if 'cipher' is\n                                 * ENGINE-provided */\n    int encrypt;                /* encrypt or decrypt */\n    int buf_len;                /* number we have left */\n    unsigned char oiv[EVP_MAX_IV_LENGTH]; /* original iv */\n    unsigned char iv[EVP_MAX_IV_LENGTH]; /* working iv */\n    unsigned char buf[EVP_MAX_BLOCK_LENGTH]; /* saved partial block */\n    int num;                    /* used by cfb/ofb/ctr mode */\n    void *app_data;             /* application stuff */\n    int key_len;                /* May change for variable length cipher */\n    unsigned long flags;        /* Various flags */\n    void *cipher_data;          /* per EVP data */\n    int final_used;\n    int block_mask;\n    unsigned char final[EVP_MAX_BLOCK_LENGTH]; /* possible final block */\n} /* EVP_CIPHER_CTX */ ;\n\ntypedef struct evp_Encode_Ctx_st {\n    /* number saved in a partial encode/decode */\n    int num;\n    /*\n     * The length is either the output line length (in input bytes) or the\n     * shortest input line length that is ok.  Once decoding begins, the\n     * length is adjusted up each time a longer line is decoded\n     */\n    int length;\n    /* data to encode */\n    unsigned char enc_data[80];\n    /* number read on current line */\n    int line_num;\n    int expect_nl;\n} EVP_ENCODE_CTX;\n\n/* Password based encryption function */\ntypedef int (EVP_PBE_KEYGEN) (EVP_CIPHER_CTX *ctx, const char *pass,\n                              int passlen, ASN1_TYPE *param,\n                              const EVP_CIPHER *cipher, const EVP_MD *md,\n                              int en_de);\n\n# ifndef OPENSSL_NO_RSA\n#  define EVP_PKEY_assign_RSA(pkey,rsa) EVP_PKEY_assign((pkey),EVP_PKEY_RSA,\\\n                                        (char *)(rsa))\n# endif\n\n# ifndef OPENSSL_NO_DSA\n#  define EVP_PKEY_assign_DSA(pkey,dsa) EVP_PKEY_assign((pkey),EVP_PKEY_DSA,\\\n                                        (char *)(dsa))\n# endif\n\n# ifndef OPENSSL_NO_DH\n#  define EVP_PKEY_assign_DH(pkey,dh) EVP_PKEY_assign((pkey),EVP_PKEY_DH,\\\n                                        (char *)(dh))\n# endif\n\n# ifndef OPENSSL_NO_EC\n#  define EVP_PKEY_assign_EC_KEY(pkey,eckey) EVP_PKEY_assign((pkey),EVP_PKEY_EC,\\\n                                        (char *)(eckey))\n# endif\n\n/* Add some extra combinations */\n# define EVP_get_digestbynid(a) EVP_get_digestbyname(OBJ_nid2sn(a))\n# define EVP_get_digestbyobj(a) EVP_get_digestbynid(OBJ_obj2nid(a))\n# define EVP_get_cipherbynid(a) EVP_get_cipherbyname(OBJ_nid2sn(a))\n# define EVP_get_cipherbyobj(a) EVP_get_cipherbynid(OBJ_obj2nid(a))\n\nint EVP_MD_type(const EVP_MD *md);\n# define EVP_MD_nid(e)                   EVP_MD_type(e)\n# define EVP_MD_name(e)                  OBJ_nid2sn(EVP_MD_nid(e))\nint EVP_MD_pkey_type(const EVP_MD *md);\nint EVP_MD_size(const EVP_MD *md);\nint EVP_MD_block_size(const EVP_MD *md);\nunsigned long EVP_MD_flags(const EVP_MD *md);\n\nconst EVP_MD *EVP_MD_CTX_md(const EVP_MD_CTX *ctx);\n# define EVP_MD_CTX_size(e)              EVP_MD_size(EVP_MD_CTX_md(e))\n# define EVP_MD_CTX_block_size(e)        EVP_MD_block_size(EVP_MD_CTX_md(e))\n# define EVP_MD_CTX_type(e)              EVP_MD_type(EVP_MD_CTX_md(e))\n\nint EVP_CIPHER_nid(const EVP_CIPHER *cipher);\n# define EVP_CIPHER_name(e)              OBJ_nid2sn(EVP_CIPHER_nid(e))\nint EVP_CIPHER_block_size(const EVP_CIPHER *cipher);\nint EVP_CIPHER_key_length(const EVP_CIPHER *cipher);\nint EVP_CIPHER_iv_length(const EVP_CIPHER *cipher);\nunsigned long EVP_CIPHER_flags(const EVP_CIPHER *cipher);\n# define EVP_CIPHER_mode(e)              (EVP_CIPHER_flags(e) & EVP_CIPH_MODE)\n\nconst EVP_CIPHER *EVP_CIPHER_CTX_cipher(const EVP_CIPHER_CTX *ctx);\nint EVP_CIPHER_CTX_nid(const EVP_CIPHER_CTX *ctx);\nint EVP_CIPHER_CTX_block_size(const EVP_CIPHER_CTX *ctx);\nint EVP_CIPHER_CTX_key_length(const EVP_CIPHER_CTX *ctx);\nint EVP_CIPHER_CTX_iv_length(const EVP_CIPHER_CTX *ctx);\nint EVP_CIPHER_CTX_copy(EVP_CIPHER_CTX *out, const EVP_CIPHER_CTX *in);\nvoid *EVP_CIPHER_CTX_get_app_data(const EVP_CIPHER_CTX *ctx);\nvoid EVP_CIPHER_CTX_set_app_data(EVP_CIPHER_CTX *ctx, void *data);\n# define EVP_CIPHER_CTX_type(c)         EVP_CIPHER_type(EVP_CIPHER_CTX_cipher(c))\nunsigned long EVP_CIPHER_CTX_flags(const EVP_CIPHER_CTX *ctx);\n# define EVP_CIPHER_CTX_mode(e)          (EVP_CIPHER_CTX_flags(e) & EVP_CIPH_MODE)\n\n# define EVP_ENCODE_LENGTH(l)    (((l+2)/3*4)+(l/48+1)*2+80)\n# define EVP_DECODE_LENGTH(l)    ((l+3)/4*3+80)\n\n# define EVP_SignInit_ex(a,b,c)          EVP_DigestInit_ex(a,b,c)\n# define EVP_SignInit(a,b)               EVP_DigestInit(a,b)\n# define EVP_SignUpdate(a,b,c)           EVP_DigestUpdate(a,b,c)\n# define EVP_VerifyInit_ex(a,b,c)        EVP_DigestInit_ex(a,b,c)\n# define EVP_VerifyInit(a,b)             EVP_DigestInit(a,b)\n# define EVP_VerifyUpdate(a,b,c)         EVP_DigestUpdate(a,b,c)\n# define EVP_OpenUpdate(a,b,c,d,e)       EVP_DecryptUpdate(a,b,c,d,e)\n# define EVP_SealUpdate(a,b,c,d,e)       EVP_EncryptUpdate(a,b,c,d,e)\n# define EVP_DigestSignUpdate(a,b,c)     EVP_DigestUpdate(a,b,c)\n# define EVP_DigestVerifyUpdate(a,b,c)   EVP_DigestUpdate(a,b,c)\n\n# ifdef CONST_STRICT\nvoid BIO_set_md(BIO *, const EVP_MD *md);\n# else\n#  define BIO_set_md(b,md)               BIO_ctrl(b,BIO_C_SET_MD,0,(char *)md)\n# endif\n# define BIO_get_md(b,mdp)               BIO_ctrl(b,BIO_C_GET_MD,0,(char *)mdp)\n# define BIO_get_md_ctx(b,mdcp)     BIO_ctrl(b,BIO_C_GET_MD_CTX,0,(char *)mdcp)\n# define BIO_set_md_ctx(b,mdcp)     BIO_ctrl(b,BIO_C_SET_MD_CTX,0,(char *)mdcp)\n# define BIO_get_cipher_status(b)        BIO_ctrl(b,BIO_C_GET_CIPHER_STATUS,0,NULL)\n# define BIO_get_cipher_ctx(b,c_pp)      BIO_ctrl(b,BIO_C_GET_CIPHER_CTX,0,(char *)c_pp)\n\nint EVP_Cipher(EVP_CIPHER_CTX *c,\n               unsigned char *out, const unsigned char *in, unsigned int inl);\n\n# define EVP_add_cipher_alias(n,alias) \\\n        OBJ_NAME_add((alias),OBJ_NAME_TYPE_CIPHER_METH|OBJ_NAME_ALIAS,(n))\n# define EVP_add_digest_alias(n,alias) \\\n        OBJ_NAME_add((alias),OBJ_NAME_TYPE_MD_METH|OBJ_NAME_ALIAS,(n))\n# define EVP_delete_cipher_alias(alias) \\\n        OBJ_NAME_remove(alias,OBJ_NAME_TYPE_CIPHER_METH|OBJ_NAME_ALIAS);\n# define EVP_delete_digest_alias(alias) \\\n        OBJ_NAME_remove(alias,OBJ_NAME_TYPE_MD_METH|OBJ_NAME_ALIAS);\n\nvoid EVP_MD_CTX_init(EVP_MD_CTX *ctx);\nint EVP_MD_CTX_cleanup(EVP_MD_CTX *ctx);\nEVP_MD_CTX *EVP_MD_CTX_create(void);\nvoid EVP_MD_CTX_destroy(EVP_MD_CTX *ctx);\nint EVP_MD_CTX_copy_ex(EVP_MD_CTX *out, const EVP_MD_CTX *in);\nvoid EVP_MD_CTX_set_flags(EVP_MD_CTX *ctx, int flags);\nvoid EVP_MD_CTX_clear_flags(EVP_MD_CTX *ctx, int flags);\nint EVP_MD_CTX_test_flags(const EVP_MD_CTX *ctx, int flags);\nint EVP_DigestInit_ex(EVP_MD_CTX *ctx, const EVP_MD *type, ENGINE *impl);\nint EVP_DigestUpdate(EVP_MD_CTX *ctx, const void *d, size_t cnt);\nint EVP_DigestFinal_ex(EVP_MD_CTX *ctx, unsigned char *md, unsigned int *s);\nint EVP_Digest(const void *data, size_t count,\n               unsigned char *md, unsigned int *size, const EVP_MD *type,\n               ENGINE *impl);\n\nint EVP_MD_CTX_copy(EVP_MD_CTX *out, const EVP_MD_CTX *in);\nint EVP_DigestInit(EVP_MD_CTX *ctx, const EVP_MD *type);\nint EVP_DigestFinal(EVP_MD_CTX *ctx, unsigned char *md, unsigned int *s);\n\nint EVP_read_pw_string(char *buf, int length, const char *prompt, int verify);\nint EVP_read_pw_string_min(char *buf, int minlen, int maxlen,\n                           const char *prompt, int verify);\nvoid EVP_set_pw_prompt(const char *prompt);\nchar *EVP_get_pw_prompt(void);\n\nint EVP_BytesToKey(const EVP_CIPHER *type, const EVP_MD *md,\n                   const unsigned char *salt, const unsigned char *data,\n                   int datal, int count, unsigned char *key,\n                   unsigned char *iv);\n\nvoid EVP_CIPHER_CTX_set_flags(EVP_CIPHER_CTX *ctx, int flags);\nvoid EVP_CIPHER_CTX_clear_flags(EVP_CIPHER_CTX *ctx, int flags);\nint EVP_CIPHER_CTX_test_flags(const EVP_CIPHER_CTX *ctx, int flags);\n\nint EVP_EncryptInit(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher,\n                    const unsigned char *key, const unsigned char *iv);\nint EVP_EncryptInit_ex(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher,\n                       ENGINE *impl, const unsigned char *key,\n                       const unsigned char *iv);\nint EVP_EncryptUpdate(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl,\n                      const unsigned char *in, int inl);\nint EVP_EncryptFinal_ex(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl);\nint EVP_EncryptFinal(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl);\n\nint EVP_DecryptInit(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher,\n                    const unsigned char *key, const unsigned char *iv);\nint EVP_DecryptInit_ex(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher,\n                       ENGINE *impl, const unsigned char *key,\n                       const unsigned char *iv);\nint EVP_DecryptUpdate(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl,\n                      const unsigned char *in, int inl);\nint EVP_DecryptFinal(EVP_CIPHER_CTX *ctx, unsigned char *outm, int *outl);\nint EVP_DecryptFinal_ex(EVP_CIPHER_CTX *ctx, unsigned char *outm, int *outl);\n\nint EVP_CipherInit(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher,\n                   const unsigned char *key, const unsigned char *iv,\n                   int enc);\nint EVP_CipherInit_ex(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher,\n                      ENGINE *impl, const unsigned char *key,\n                      const unsigned char *iv, int enc);\nint EVP_CipherUpdate(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl,\n                     const unsigned char *in, int inl);\nint EVP_CipherFinal(EVP_CIPHER_CTX *ctx, unsigned char *outm, int *outl);\nint EVP_CipherFinal_ex(EVP_CIPHER_CTX *ctx, unsigned char *outm, int *outl);\n\nint EVP_SignFinal(EVP_MD_CTX *ctx, unsigned char *md, unsigned int *s,\n                  EVP_PKEY *pkey);\n\nint EVP_VerifyFinal(EVP_MD_CTX *ctx, const unsigned char *sigbuf,\n                    unsigned int siglen, EVP_PKEY *pkey);\n\nint EVP_DigestSignInit(EVP_MD_CTX *ctx, EVP_PKEY_CTX **pctx,\n                       const EVP_MD *type, ENGINE *e, EVP_PKEY *pkey);\nint EVP_DigestSignFinal(EVP_MD_CTX *ctx,\n                        unsigned char *sigret, size_t *siglen);\n\nint EVP_DigestVerifyInit(EVP_MD_CTX *ctx, EVP_PKEY_CTX **pctx,\n                         const EVP_MD *type, ENGINE *e, EVP_PKEY *pkey);\nint EVP_DigestVerifyFinal(EVP_MD_CTX *ctx, unsigned char *sig, size_t siglen);\n\nint EVP_OpenInit(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *type,\n                 const unsigned char *ek, int ekl, const unsigned char *iv,\n                 EVP_PKEY *priv);\nint EVP_OpenFinal(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl);\n\nint EVP_SealInit(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *type,\n                 unsigned char **ek, int *ekl, unsigned char *iv,\n                 EVP_PKEY **pubk, int npubk);\nint EVP_SealFinal(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl);\n\nvoid EVP_EncodeInit(EVP_ENCODE_CTX *ctx);\nvoid EVP_EncodeUpdate(EVP_ENCODE_CTX *ctx, unsigned char *out, int *outl,\n                      const unsigned char *in, int inl);\nvoid EVP_EncodeFinal(EVP_ENCODE_CTX *ctx, unsigned char *out, int *outl);\nint EVP_EncodeBlock(unsigned char *t, const unsigned char *f, int n);\n\nvoid EVP_DecodeInit(EVP_ENCODE_CTX *ctx);\nint EVP_DecodeUpdate(EVP_ENCODE_CTX *ctx, unsigned char *out, int *outl,\n                     const unsigned char *in, int inl);\nint EVP_DecodeFinal(EVP_ENCODE_CTX *ctx, unsigned\n                    char *out, int *outl);\nint EVP_DecodeBlock(unsigned char *t, const unsigned char *f, int n);\n\nvoid EVP_CIPHER_CTX_init(EVP_CIPHER_CTX *a);\nint EVP_CIPHER_CTX_cleanup(EVP_CIPHER_CTX *a);\nEVP_CIPHER_CTX *EVP_CIPHER_CTX_new(void);\nvoid EVP_CIPHER_CTX_free(EVP_CIPHER_CTX *a);\nint EVP_CIPHER_CTX_set_key_length(EVP_CIPHER_CTX *x, int keylen);\nint EVP_CIPHER_CTX_set_padding(EVP_CIPHER_CTX *c, int pad);\nint EVP_CIPHER_CTX_ctrl(EVP_CIPHER_CTX *ctx, int type, int arg, void *ptr);\nint EVP_CIPHER_CTX_rand_key(EVP_CIPHER_CTX *ctx, unsigned char *key);\n\n# ifndef OPENSSL_NO_BIO\nBIO_METHOD *BIO_f_md(void);\nBIO_METHOD *BIO_f_base64(void);\nBIO_METHOD *BIO_f_cipher(void);\nBIO_METHOD *BIO_f_reliable(void);\nvoid BIO_set_cipher(BIO *b, const EVP_CIPHER *c, const unsigned char *k,\n                    const unsigned char *i, int enc);\n# endif\n\nconst EVP_MD *EVP_md_null(void);\n# ifndef OPENSSL_NO_MD2\nconst EVP_MD *EVP_md2(void);\n# endif\n# ifndef OPENSSL_NO_MD4\nconst EVP_MD *EVP_md4(void);\n# endif\n# ifndef OPENSSL_NO_MD5\nconst EVP_MD *EVP_md5(void);\n# endif\n# ifndef OPENSSL_NO_SHA\nconst EVP_MD *EVP_sha(void);\nconst EVP_MD *EVP_sha1(void);\nconst EVP_MD *EVP_dss(void);\nconst EVP_MD *EVP_dss1(void);\nconst EVP_MD *EVP_ecdsa(void);\n# endif\n# ifndef OPENSSL_NO_SHA256\nconst EVP_MD *EVP_sha224(void);\nconst EVP_MD *EVP_sha256(void);\n# endif\n# ifndef OPENSSL_NO_SHA512\nconst EVP_MD *EVP_sha384(void);\nconst EVP_MD *EVP_sha512(void);\n# endif\n# ifndef OPENSSL_NO_MDC2\nconst EVP_MD *EVP_mdc2(void);\n# endif\n# ifndef OPENSSL_NO_RIPEMD\nconst EVP_MD *EVP_ripemd160(void);\n# endif\n# ifndef OPENSSL_NO_WHIRLPOOL\nconst EVP_MD *EVP_whirlpool(void);\n# endif\nconst EVP_CIPHER *EVP_enc_null(void); /* does nothing :-) */\n# ifndef OPENSSL_NO_DES\nconst EVP_CIPHER *EVP_des_ecb(void);\nconst EVP_CIPHER *EVP_des_ede(void);\nconst EVP_CIPHER *EVP_des_ede3(void);\nconst EVP_CIPHER *EVP_des_ede_ecb(void);\nconst EVP_CIPHER *EVP_des_ede3_ecb(void);\nconst EVP_CIPHER *EVP_des_cfb64(void);\n#  define EVP_des_cfb EVP_des_cfb64\nconst EVP_CIPHER *EVP_des_cfb1(void);\nconst EVP_CIPHER *EVP_des_cfb8(void);\nconst EVP_CIPHER *EVP_des_ede_cfb64(void);\n#  define EVP_des_ede_cfb EVP_des_ede_cfb64\n#  if 0\nconst EVP_CIPHER *EVP_des_ede_cfb1(void);\nconst EVP_CIPHER *EVP_des_ede_cfb8(void);\n#  endif\nconst EVP_CIPHER *EVP_des_ede3_cfb64(void);\n#  define EVP_des_ede3_cfb EVP_des_ede3_cfb64\nconst EVP_CIPHER *EVP_des_ede3_cfb1(void);\nconst EVP_CIPHER *EVP_des_ede3_cfb8(void);\nconst EVP_CIPHER *EVP_des_ofb(void);\nconst EVP_CIPHER *EVP_des_ede_ofb(void);\nconst EVP_CIPHER *EVP_des_ede3_ofb(void);\nconst EVP_CIPHER *EVP_des_cbc(void);\nconst EVP_CIPHER *EVP_des_ede_cbc(void);\nconst EVP_CIPHER *EVP_des_ede3_cbc(void);\nconst EVP_CIPHER *EVP_desx_cbc(void);\n/*\n * This should now be supported through the dev_crypto ENGINE. But also, why\n * are rc4 and md5 declarations made here inside a \"NO_DES\" precompiler\n * branch?\n */\n#  if 0\n#   ifdef OPENSSL_OPENBSD_DEV_CRYPTO\nconst EVP_CIPHER *EVP_dev_crypto_des_ede3_cbc(void);\nconst EVP_CIPHER *EVP_dev_crypto_rc4(void);\nconst EVP_MD *EVP_dev_crypto_md5(void);\n#   endif\n#  endif\n# endif\n# ifndef OPENSSL_NO_RC4\nconst EVP_CIPHER *EVP_rc4(void);\nconst EVP_CIPHER *EVP_rc4_40(void);\n#  ifndef OPENSSL_NO_MD5\nconst EVP_CIPHER *EVP_rc4_hmac_md5(void);\n#  endif\n# endif\n# ifndef OPENSSL_NO_IDEA\nconst EVP_CIPHER *EVP_idea_ecb(void);\nconst EVP_CIPHER *EVP_idea_cfb64(void);\n#  define EVP_idea_cfb EVP_idea_cfb64\nconst EVP_CIPHER *EVP_idea_ofb(void);\nconst EVP_CIPHER *EVP_idea_cbc(void);\n# endif\n# ifndef OPENSSL_NO_RC2\nconst EVP_CIPHER *EVP_rc2_ecb(void);\nconst EVP_CIPHER *EVP_rc2_cbc(void);\nconst EVP_CIPHER *EVP_rc2_40_cbc(void);\nconst EVP_CIPHER *EVP_rc2_64_cbc(void);\nconst EVP_CIPHER *EVP_rc2_cfb64(void);\n#  define EVP_rc2_cfb EVP_rc2_cfb64\nconst EVP_CIPHER *EVP_rc2_ofb(void);\n# endif\n# ifndef OPENSSL_NO_BF\nconst EVP_CIPHER *EVP_bf_ecb(void);\nconst EVP_CIPHER *EVP_bf_cbc(void);\nconst EVP_CIPHER *EVP_bf_cfb64(void);\n#  define EVP_bf_cfb EVP_bf_cfb64\nconst EVP_CIPHER *EVP_bf_ofb(void);\n# endif\n# ifndef OPENSSL_NO_CAST\nconst EVP_CIPHER *EVP_cast5_ecb(void);\nconst EVP_CIPHER *EVP_cast5_cbc(void);\nconst EVP_CIPHER *EVP_cast5_cfb64(void);\n#  define EVP_cast5_cfb EVP_cast5_cfb64\nconst EVP_CIPHER *EVP_cast5_ofb(void);\n# endif\n# ifndef OPENSSL_NO_RC5\nconst EVP_CIPHER *EVP_rc5_32_12_16_cbc(void);\nconst EVP_CIPHER *EVP_rc5_32_12_16_ecb(void);\nconst EVP_CIPHER *EVP_rc5_32_12_16_cfb64(void);\n#  define EVP_rc5_32_12_16_cfb EVP_rc5_32_12_16_cfb64\nconst EVP_CIPHER *EVP_rc5_32_12_16_ofb(void);\n# endif\n# ifndef OPENSSL_NO_AES\nconst EVP_CIPHER *EVP_aes_128_ecb(void);\nconst EVP_CIPHER *EVP_aes_128_cbc(void);\nconst EVP_CIPHER *EVP_aes_128_cfb1(void);\nconst EVP_CIPHER *EVP_aes_128_cfb8(void);\nconst EVP_CIPHER *EVP_aes_128_cfb128(void);\n#  define EVP_aes_128_cfb EVP_aes_128_cfb128\nconst EVP_CIPHER *EVP_aes_128_ofb(void);\nconst EVP_CIPHER *EVP_aes_128_ctr(void);\nconst EVP_CIPHER *EVP_aes_128_ccm(void);\nconst EVP_CIPHER *EVP_aes_128_gcm(void);\nconst EVP_CIPHER *EVP_aes_128_xts(void);\nconst EVP_CIPHER *EVP_aes_192_ecb(void);\nconst EVP_CIPHER *EVP_aes_192_cbc(void);\nconst EVP_CIPHER *EVP_aes_192_cfb1(void);\nconst EVP_CIPHER *EVP_aes_192_cfb8(void);\nconst EVP_CIPHER *EVP_aes_192_cfb128(void);\n#  define EVP_aes_192_cfb EVP_aes_192_cfb128\nconst EVP_CIPHER *EVP_aes_192_ofb(void);\nconst EVP_CIPHER *EVP_aes_192_ctr(void);\nconst EVP_CIPHER *EVP_aes_192_ccm(void);\nconst EVP_CIPHER *EVP_aes_192_gcm(void);\nconst EVP_CIPHER *EVP_aes_256_ecb(void);\nconst EVP_CIPHER *EVP_aes_256_cbc(void);\nconst EVP_CIPHER *EVP_aes_256_cfb1(void);\nconst EVP_CIPHER *EVP_aes_256_cfb8(void);\nconst EVP_CIPHER *EVP_aes_256_cfb128(void);\n#  define EVP_aes_256_cfb EVP_aes_256_cfb128\nconst EVP_CIPHER *EVP_aes_256_ofb(void);\nconst EVP_CIPHER *EVP_aes_256_ctr(void);\nconst EVP_CIPHER *EVP_aes_256_ccm(void);\nconst EVP_CIPHER *EVP_aes_256_gcm(void);\nconst EVP_CIPHER *EVP_aes_256_xts(void);\n#  if !defined(OPENSSL_NO_SHA) && !defined(OPENSSL_NO_SHA1)\nconst EVP_CIPHER *EVP_aes_128_cbc_hmac_sha1(void);\nconst EVP_CIPHER *EVP_aes_256_cbc_hmac_sha1(void);\n#  endif\n# endif\n# ifndef OPENSSL_NO_CAMELLIA\nconst EVP_CIPHER *EVP_camellia_128_ecb(void);\nconst EVP_CIPHER *EVP_camellia_128_cbc(void);\nconst EVP_CIPHER *EVP_camellia_128_cfb1(void);\nconst EVP_CIPHER *EVP_camellia_128_cfb8(void);\nconst EVP_CIPHER *EVP_camellia_128_cfb128(void);\n#  define EVP_camellia_128_cfb EVP_camellia_128_cfb128\nconst EVP_CIPHER *EVP_camellia_128_ofb(void);\nconst EVP_CIPHER *EVP_camellia_192_ecb(void);\nconst EVP_CIPHER *EVP_camellia_192_cbc(void);\nconst EVP_CIPHER *EVP_camellia_192_cfb1(void);\nconst EVP_CIPHER *EVP_camellia_192_cfb8(void);\nconst EVP_CIPHER *EVP_camellia_192_cfb128(void);\n#  define EVP_camellia_192_cfb EVP_camellia_192_cfb128\nconst EVP_CIPHER *EVP_camellia_192_ofb(void);\nconst EVP_CIPHER *EVP_camellia_256_ecb(void);\nconst EVP_CIPHER *EVP_camellia_256_cbc(void);\nconst EVP_CIPHER *EVP_camellia_256_cfb1(void);\nconst EVP_CIPHER *EVP_camellia_256_cfb8(void);\nconst EVP_CIPHER *EVP_camellia_256_cfb128(void);\n#  define EVP_camellia_256_cfb EVP_camellia_256_cfb128\nconst EVP_CIPHER *EVP_camellia_256_ofb(void);\n# endif\n\n# ifndef OPENSSL_NO_SEED\nconst EVP_CIPHER *EVP_seed_ecb(void);\nconst EVP_CIPHER *EVP_seed_cbc(void);\nconst EVP_CIPHER *EVP_seed_cfb128(void);\n#  define EVP_seed_cfb EVP_seed_cfb128\nconst EVP_CIPHER *EVP_seed_ofb(void);\n# endif\n\nvoid OPENSSL_add_all_algorithms_noconf(void);\nvoid OPENSSL_add_all_algorithms_conf(void);\n\n# ifdef OPENSSL_LOAD_CONF\n#  define OpenSSL_add_all_algorithms() \\\n                OPENSSL_add_all_algorithms_conf()\n# else\n#  define OpenSSL_add_all_algorithms() \\\n                OPENSSL_add_all_algorithms_noconf()\n# endif\n\nvoid OpenSSL_add_all_ciphers(void);\nvoid OpenSSL_add_all_digests(void);\n# define SSLeay_add_all_algorithms() OpenSSL_add_all_algorithms()\n# define SSLeay_add_all_ciphers() OpenSSL_add_all_ciphers()\n# define SSLeay_add_all_digests() OpenSSL_add_all_digests()\n\nint EVP_add_cipher(const EVP_CIPHER *cipher);\nint EVP_add_digest(const EVP_MD *digest);\n\nconst EVP_CIPHER *EVP_get_cipherbyname(const char *name);\nconst EVP_MD *EVP_get_digestbyname(const char *name);\nvoid EVP_cleanup(void);\n\nvoid EVP_CIPHER_do_all(void (*fn) (const EVP_CIPHER *ciph,\n                                   const char *from, const char *to, void *x),\n                       void *arg);\nvoid EVP_CIPHER_do_all_sorted(void (*fn)\n                               (const EVP_CIPHER *ciph, const char *from,\n                                const char *to, void *x), void *arg);\n\nvoid EVP_MD_do_all(void (*fn) (const EVP_MD *ciph,\n                               const char *from, const char *to, void *x),\n                   void *arg);\nvoid EVP_MD_do_all_sorted(void (*fn)\n                           (const EVP_MD *ciph, const char *from,\n                            const char *to, void *x), void *arg);\n\nint EVP_PKEY_decrypt_old(unsigned char *dec_key,\n                         const unsigned char *enc_key, int enc_key_len,\n                         EVP_PKEY *private_key);\nint EVP_PKEY_encrypt_old(unsigned char *enc_key,\n                         const unsigned char *key, int key_len,\n                         EVP_PKEY *pub_key);\nint EVP_PKEY_type(int type);\nint EVP_PKEY_id(const EVP_PKEY *pkey);\nint EVP_PKEY_base_id(const EVP_PKEY *pkey);\nint EVP_PKEY_bits(EVP_PKEY *pkey);\nint EVP_PKEY_size(EVP_PKEY *pkey);\nint EVP_PKEY_set_type(EVP_PKEY *pkey, int type);\nint EVP_PKEY_set_type_str(EVP_PKEY *pkey, const char *str, int len);\nint EVP_PKEY_assign(EVP_PKEY *pkey, int type, void *key);\nvoid *EVP_PKEY_get0(EVP_PKEY *pkey);\n\n# ifndef OPENSSL_NO_RSA\nstruct rsa_st;\nint EVP_PKEY_set1_RSA(EVP_PKEY *pkey, struct rsa_st *key);\nstruct rsa_st *EVP_PKEY_get1_RSA(EVP_PKEY *pkey);\n# endif\n# ifndef OPENSSL_NO_DSA\nstruct dsa_st;\nint EVP_PKEY_set1_DSA(EVP_PKEY *pkey, struct dsa_st *key);\nstruct dsa_st *EVP_PKEY_get1_DSA(EVP_PKEY *pkey);\n# endif\n# ifndef OPENSSL_NO_DH\nstruct dh_st;\nint EVP_PKEY_set1_DH(EVP_PKEY *pkey, struct dh_st *key);\nstruct dh_st *EVP_PKEY_get1_DH(EVP_PKEY *pkey);\n# endif\n# ifndef OPENSSL_NO_EC\nstruct ec_key_st;\nint EVP_PKEY_set1_EC_KEY(EVP_PKEY *pkey, struct ec_key_st *key);\nstruct ec_key_st *EVP_PKEY_get1_EC_KEY(EVP_PKEY *pkey);\n# endif\n\nEVP_PKEY *EVP_PKEY_new(void);\nvoid EVP_PKEY_free(EVP_PKEY *pkey);\n\nEVP_PKEY *d2i_PublicKey(int type, EVP_PKEY **a, const unsigned char **pp,\n                        long length);\nint i2d_PublicKey(EVP_PKEY *a, unsigned char **pp);\n\nEVP_PKEY *d2i_PrivateKey(int type, EVP_PKEY **a, const unsigned char **pp,\n                         long length);\nEVP_PKEY *d2i_AutoPrivateKey(EVP_PKEY **a, const unsigned char **pp,\n                             long length);\nint i2d_PrivateKey(EVP_PKEY *a, unsigned char **pp);\n\nint EVP_PKEY_copy_parameters(EVP_PKEY *to, const EVP_PKEY *from);\nint EVP_PKEY_missing_parameters(const EVP_PKEY *pkey);\nint EVP_PKEY_save_parameters(EVP_PKEY *pkey, int mode);\nint EVP_PKEY_cmp_parameters(const EVP_PKEY *a, const EVP_PKEY *b);\n\nint EVP_PKEY_cmp(const EVP_PKEY *a, const EVP_PKEY *b);\n\nint EVP_PKEY_print_public(BIO *out, const EVP_PKEY *pkey,\n                          int indent, ASN1_PCTX *pctx);\nint EVP_PKEY_print_private(BIO *out, const EVP_PKEY *pkey,\n                           int indent, ASN1_PCTX *pctx);\nint EVP_PKEY_print_params(BIO *out, const EVP_PKEY *pkey,\n                          int indent, ASN1_PCTX *pctx);\n\nint EVP_PKEY_get_default_digest_nid(EVP_PKEY *pkey, int *pnid);\n\nint EVP_CIPHER_type(const EVP_CIPHER *ctx);\n\n/* calls methods */\nint EVP_CIPHER_param_to_asn1(EVP_CIPHER_CTX *c, ASN1_TYPE *type);\nint EVP_CIPHER_asn1_to_param(EVP_CIPHER_CTX *c, ASN1_TYPE *type);\n\n/* These are used by EVP_CIPHER methods */\nint EVP_CIPHER_set_asn1_iv(EVP_CIPHER_CTX *c, ASN1_TYPE *type);\nint EVP_CIPHER_get_asn1_iv(EVP_CIPHER_CTX *c, ASN1_TYPE *type);\n\n/* PKCS5 password based encryption */\nint PKCS5_PBE_keyivgen(EVP_CIPHER_CTX *ctx, const char *pass, int passlen,\n                       ASN1_TYPE *param, const EVP_CIPHER *cipher,\n                       const EVP_MD *md, int en_de);\nint PKCS5_PBKDF2_HMAC_SHA1(const char *pass, int passlen,\n                           const unsigned char *salt, int saltlen, int iter,\n                           int keylen, unsigned char *out);\nint PKCS5_PBKDF2_HMAC(const char *pass, int passlen,\n                      const unsigned char *salt, int saltlen, int iter,\n                      const EVP_MD *digest, int keylen, unsigned char *out);\nint PKCS5_v2_PBE_keyivgen(EVP_CIPHER_CTX *ctx, const char *pass, int passlen,\n                          ASN1_TYPE *param, const EVP_CIPHER *cipher,\n                          const EVP_MD *md, int en_de);\n\nvoid PKCS5_PBE_add(void);\n\nint EVP_PBE_CipherInit(ASN1_OBJECT *pbe_obj, const char *pass, int passlen,\n                       ASN1_TYPE *param, EVP_CIPHER_CTX *ctx, int en_de);\n\n/* PBE type */\n\n/* Can appear as the outermost AlgorithmIdentifier */\n# define EVP_PBE_TYPE_OUTER      0x0\n/* Is an PRF type OID */\n# define EVP_PBE_TYPE_PRF        0x1\n\nint EVP_PBE_alg_add_type(int pbe_type, int pbe_nid, int cipher_nid,\n                         int md_nid, EVP_PBE_KEYGEN *keygen);\nint EVP_PBE_alg_add(int nid, const EVP_CIPHER *cipher, const EVP_MD *md,\n                    EVP_PBE_KEYGEN *keygen);\nint EVP_PBE_find(int type, int pbe_nid, int *pcnid, int *pmnid,\n                 EVP_PBE_KEYGEN **pkeygen);\nvoid EVP_PBE_cleanup(void);\n\n# define ASN1_PKEY_ALIAS         0x1\n# define ASN1_PKEY_DYNAMIC       0x2\n# define ASN1_PKEY_SIGPARAM_NULL 0x4\n\n# define ASN1_PKEY_CTRL_PKCS7_SIGN       0x1\n# define ASN1_PKEY_CTRL_PKCS7_ENCRYPT    0x2\n# define ASN1_PKEY_CTRL_DEFAULT_MD_NID   0x3\n# define ASN1_PKEY_CTRL_CMS_SIGN         0x5\n# define ASN1_PKEY_CTRL_CMS_ENVELOPE     0x7\n\nint EVP_PKEY_asn1_get_count(void);\nconst EVP_PKEY_ASN1_METHOD *EVP_PKEY_asn1_get0(int idx);\nconst EVP_PKEY_ASN1_METHOD *EVP_PKEY_asn1_find(ENGINE **pe, int type);\nconst EVP_PKEY_ASN1_METHOD *EVP_PKEY_asn1_find_str(ENGINE **pe,\n                                                   const char *str, int len);\nint EVP_PKEY_asn1_add0(const EVP_PKEY_ASN1_METHOD *ameth);\nint EVP_PKEY_asn1_add_alias(int to, int from);\nint EVP_PKEY_asn1_get0_info(int *ppkey_id, int *pkey_base_id,\n                            int *ppkey_flags, const char **pinfo,\n                            const char **ppem_str,\n                            const EVP_PKEY_ASN1_METHOD *ameth);\n\nconst EVP_PKEY_ASN1_METHOD *EVP_PKEY_get0_asn1(EVP_PKEY *pkey);\nEVP_PKEY_ASN1_METHOD *EVP_PKEY_asn1_new(int id, int flags,\n                                        const char *pem_str,\n                                        const char *info);\nvoid EVP_PKEY_asn1_copy(EVP_PKEY_ASN1_METHOD *dst,\n                        const EVP_PKEY_ASN1_METHOD *src);\nvoid EVP_PKEY_asn1_free(EVP_PKEY_ASN1_METHOD *ameth);\nvoid EVP_PKEY_asn1_set_public(EVP_PKEY_ASN1_METHOD *ameth,\n                              int (*pub_decode) (EVP_PKEY *pk,\n                                                 X509_PUBKEY *pub),\n                              int (*pub_encode) (X509_PUBKEY *pub,\n                                                 const EVP_PKEY *pk),\n                              int (*pub_cmp) (const EVP_PKEY *a,\n                                              const EVP_PKEY *b),\n                              int (*pub_print) (BIO *out,\n                                                const EVP_PKEY *pkey,\n                                                int indent, ASN1_PCTX *pctx),\n                              int (*pkey_size) (const EVP_PKEY *pk),\n                              int (*pkey_bits) (const EVP_PKEY *pk));\nvoid EVP_PKEY_asn1_set_private(EVP_PKEY_ASN1_METHOD *ameth,\n                               int (*priv_decode) (EVP_PKEY *pk,\n                                                   PKCS8_PRIV_KEY_INFO\n                                                   *p8inf),\n                               int (*priv_encode) (PKCS8_PRIV_KEY_INFO *p8,\n                                                   const EVP_PKEY *pk),\n                               int (*priv_print) (BIO *out,\n                                                  const EVP_PKEY *pkey,\n                                                  int indent,\n                                                  ASN1_PCTX *pctx));\nvoid EVP_PKEY_asn1_set_param(EVP_PKEY_ASN1_METHOD *ameth,\n                             int (*param_decode) (EVP_PKEY *pkey,\n                                                  const unsigned char **pder,\n                                                  int derlen),\n                             int (*param_encode) (const EVP_PKEY *pkey,\n                                                  unsigned char **pder),\n                             int (*param_missing) (const EVP_PKEY *pk),\n                             int (*param_copy) (EVP_PKEY *to,\n                                                const EVP_PKEY *from),\n                             int (*param_cmp) (const EVP_PKEY *a,\n                                               const EVP_PKEY *b),\n                             int (*param_print) (BIO *out,\n                                                 const EVP_PKEY *pkey,\n                                                 int indent,\n                                                 ASN1_PCTX *pctx));\n\nvoid EVP_PKEY_asn1_set_free(EVP_PKEY_ASN1_METHOD *ameth,\n                            void (*pkey_free) (EVP_PKEY *pkey));\nvoid EVP_PKEY_asn1_set_ctrl(EVP_PKEY_ASN1_METHOD *ameth,\n                            int (*pkey_ctrl) (EVP_PKEY *pkey, int op,\n                                              long arg1, void *arg2));\n\n# define EVP_PKEY_OP_UNDEFINED           0\n# define EVP_PKEY_OP_PARAMGEN            (1<<1)\n# define EVP_PKEY_OP_KEYGEN              (1<<2)\n# define EVP_PKEY_OP_SIGN                (1<<3)\n# define EVP_PKEY_OP_VERIFY              (1<<4)\n# define EVP_PKEY_OP_VERIFYRECOVER       (1<<5)\n# define EVP_PKEY_OP_SIGNCTX             (1<<6)\n# define EVP_PKEY_OP_VERIFYCTX           (1<<7)\n# define EVP_PKEY_OP_ENCRYPT             (1<<8)\n# define EVP_PKEY_OP_DECRYPT             (1<<9)\n# define EVP_PKEY_OP_DERIVE              (1<<10)\n\n# define EVP_PKEY_OP_TYPE_SIG    \\\n        (EVP_PKEY_OP_SIGN | EVP_PKEY_OP_VERIFY | EVP_PKEY_OP_VERIFYRECOVER \\\n                | EVP_PKEY_OP_SIGNCTX | EVP_PKEY_OP_VERIFYCTX)\n\n# define EVP_PKEY_OP_TYPE_CRYPT \\\n        (EVP_PKEY_OP_ENCRYPT | EVP_PKEY_OP_DECRYPT)\n\n# define EVP_PKEY_OP_TYPE_NOGEN \\\n        (EVP_PKEY_OP_SIG | EVP_PKEY_OP_CRYPT | EVP_PKEY_OP_DERIVE)\n\n# define EVP_PKEY_OP_TYPE_GEN \\\n                (EVP_PKEY_OP_PARAMGEN | EVP_PKEY_OP_KEYGEN)\n\n# define  EVP_PKEY_CTX_set_signature_md(ctx, md) \\\n                EVP_PKEY_CTX_ctrl(ctx, -1, EVP_PKEY_OP_TYPE_SIG,  \\\n                                        EVP_PKEY_CTRL_MD, 0, (void *)md)\n\n# define EVP_PKEY_CTRL_MD                1\n# define EVP_PKEY_CTRL_PEER_KEY          2\n\n# define EVP_PKEY_CTRL_PKCS7_ENCRYPT     3\n# define EVP_PKEY_CTRL_PKCS7_DECRYPT     4\n\n# define EVP_PKEY_CTRL_PKCS7_SIGN        5\n\n# define EVP_PKEY_CTRL_SET_MAC_KEY       6\n\n# define EVP_PKEY_CTRL_DIGESTINIT        7\n\n/* Used by GOST key encryption in TLS */\n# define EVP_PKEY_CTRL_SET_IV            8\n\n# define EVP_PKEY_CTRL_CMS_ENCRYPT       9\n# define EVP_PKEY_CTRL_CMS_DECRYPT       10\n# define EVP_PKEY_CTRL_CMS_SIGN          11\n\n# define EVP_PKEY_CTRL_CIPHER            12\n\n# define EVP_PKEY_ALG_CTRL               0x1000\n\n# define EVP_PKEY_FLAG_AUTOARGLEN        2\n/*\n * Method handles all operations: don't assume any digest related defaults.\n */\n# define EVP_PKEY_FLAG_SIGCTX_CUSTOM     4\n\nconst EVP_PKEY_METHOD *EVP_PKEY_meth_find(int type);\nEVP_PKEY_METHOD *EVP_PKEY_meth_new(int id, int flags);\nvoid EVP_PKEY_meth_get0_info(int *ppkey_id, int *pflags,\n                             const EVP_PKEY_METHOD *meth);\nvoid EVP_PKEY_meth_copy(EVP_PKEY_METHOD *dst, const EVP_PKEY_METHOD *src);\nvoid EVP_PKEY_meth_free(EVP_PKEY_METHOD *pmeth);\nint EVP_PKEY_meth_add0(const EVP_PKEY_METHOD *pmeth);\n\nEVP_PKEY_CTX *EVP_PKEY_CTX_new(EVP_PKEY *pkey, ENGINE *e);\nEVP_PKEY_CTX *EVP_PKEY_CTX_new_id(int id, ENGINE *e);\nEVP_PKEY_CTX *EVP_PKEY_CTX_dup(EVP_PKEY_CTX *ctx);\nvoid EVP_PKEY_CTX_free(EVP_PKEY_CTX *ctx);\n\nint EVP_PKEY_CTX_ctrl(EVP_PKEY_CTX *ctx, int keytype, int optype,\n                      int cmd, int p1, void *p2);\nint EVP_PKEY_CTX_ctrl_str(EVP_PKEY_CTX *ctx, const char *type,\n                          const char *value);\n\nint EVP_PKEY_CTX_get_operation(EVP_PKEY_CTX *ctx);\nvoid EVP_PKEY_CTX_set0_keygen_info(EVP_PKEY_CTX *ctx, int *dat, int datlen);\n\nEVP_PKEY *EVP_PKEY_new_mac_key(int type, ENGINE *e,\n                               const unsigned char *key, int keylen);\n\nvoid EVP_PKEY_CTX_set_data(EVP_PKEY_CTX *ctx, void *data);\nvoid *EVP_PKEY_CTX_get_data(EVP_PKEY_CTX *ctx);\nEVP_PKEY *EVP_PKEY_CTX_get0_pkey(EVP_PKEY_CTX *ctx);\n\nEVP_PKEY *EVP_PKEY_CTX_get0_peerkey(EVP_PKEY_CTX *ctx);\n\nvoid EVP_PKEY_CTX_set_app_data(EVP_PKEY_CTX *ctx, void *data);\nvoid *EVP_PKEY_CTX_get_app_data(EVP_PKEY_CTX *ctx);\n\nint EVP_PKEY_sign_init(EVP_PKEY_CTX *ctx);\nint EVP_PKEY_sign(EVP_PKEY_CTX *ctx,\n                  unsigned char *sig, size_t *siglen,\n                  const unsigned char *tbs, size_t tbslen);\nint EVP_PKEY_verify_init(EVP_PKEY_CTX *ctx);\nint EVP_PKEY_verify(EVP_PKEY_CTX *ctx,\n                    const unsigned char *sig, size_t siglen,\n                    const unsigned char *tbs, size_t tbslen);\nint EVP_PKEY_verify_recover_init(EVP_PKEY_CTX *ctx);\nint EVP_PKEY_verify_recover(EVP_PKEY_CTX *ctx,\n                            unsigned char *rout, size_t *routlen,\n                            const unsigned char *sig, size_t siglen);\nint EVP_PKEY_encrypt_init(EVP_PKEY_CTX *ctx);\nint EVP_PKEY_encrypt(EVP_PKEY_CTX *ctx,\n                     unsigned char *out, size_t *outlen,\n                     const unsigned char *in, size_t inlen);\nint EVP_PKEY_decrypt_init(EVP_PKEY_CTX *ctx);\nint EVP_PKEY_decrypt(EVP_PKEY_CTX *ctx,\n                     unsigned char *out, size_t *outlen,\n                     const unsigned char *in, size_t inlen);\n\nint EVP_PKEY_derive_init(EVP_PKEY_CTX *ctx);\nint EVP_PKEY_derive_set_peer(EVP_PKEY_CTX *ctx, EVP_PKEY *peer);\nint EVP_PKEY_derive(EVP_PKEY_CTX *ctx, unsigned char *key, size_t *keylen);\n\ntypedef int EVP_PKEY_gen_cb (EVP_PKEY_CTX *ctx);\n\nint EVP_PKEY_paramgen_init(EVP_PKEY_CTX *ctx);\nint EVP_PKEY_paramgen(EVP_PKEY_CTX *ctx, EVP_PKEY **ppkey);\nint EVP_PKEY_keygen_init(EVP_PKEY_CTX *ctx);\nint EVP_PKEY_keygen(EVP_PKEY_CTX *ctx, EVP_PKEY **ppkey);\n\nvoid EVP_PKEY_CTX_set_cb(EVP_PKEY_CTX *ctx, EVP_PKEY_gen_cb *cb);\nEVP_PKEY_gen_cb *EVP_PKEY_CTX_get_cb(EVP_PKEY_CTX *ctx);\n\nint EVP_PKEY_CTX_get_keygen_info(EVP_PKEY_CTX *ctx, int idx);\n\nvoid EVP_PKEY_meth_set_init(EVP_PKEY_METHOD *pmeth,\n                            int (*init) (EVP_PKEY_CTX *ctx));\n\nvoid EVP_PKEY_meth_set_copy(EVP_PKEY_METHOD *pmeth,\n                            int (*copy) (EVP_PKEY_CTX *dst,\n                                         EVP_PKEY_CTX *src));\n\nvoid EVP_PKEY_meth_set_cleanup(EVP_PKEY_METHOD *pmeth,\n                               void (*cleanup) (EVP_PKEY_CTX *ctx));\n\nvoid EVP_PKEY_meth_set_paramgen(EVP_PKEY_METHOD *pmeth,\n                                int (*paramgen_init) (EVP_PKEY_CTX *ctx),\n                                int (*paramgen) (EVP_PKEY_CTX *ctx,\n                                                 EVP_PKEY *pkey));\n\nvoid EVP_PKEY_meth_set_keygen(EVP_PKEY_METHOD *pmeth,\n                              int (*keygen_init) (EVP_PKEY_CTX *ctx),\n                              int (*keygen) (EVP_PKEY_CTX *ctx,\n                                             EVP_PKEY *pkey));\n\nvoid EVP_PKEY_meth_set_sign(EVP_PKEY_METHOD *pmeth,\n                            int (*sign_init) (EVP_PKEY_CTX *ctx),\n                            int (*sign) (EVP_PKEY_CTX *ctx,\n                                         unsigned char *sig, size_t *siglen,\n                                         const unsigned char *tbs,\n                                         size_t tbslen));\n\nvoid EVP_PKEY_meth_set_verify(EVP_PKEY_METHOD *pmeth,\n                              int (*verify_init) (EVP_PKEY_CTX *ctx),\n                              int (*verify) (EVP_PKEY_CTX *ctx,\n                                             const unsigned char *sig,\n                                             size_t siglen,\n                                             const unsigned char *tbs,\n                                             size_t tbslen));\n\nvoid EVP_PKEY_meth_set_verify_recover(EVP_PKEY_METHOD *pmeth,\n                                      int (*verify_recover_init) (EVP_PKEY_CTX\n                                                                  *ctx),\n                                      int (*verify_recover) (EVP_PKEY_CTX\n                                                             *ctx,\n                                                             unsigned char\n                                                             *sig,\n                                                             size_t *siglen,\n                                                             const unsigned\n                                                             char *tbs,\n                                                             size_t tbslen));\n\nvoid EVP_PKEY_meth_set_signctx(EVP_PKEY_METHOD *pmeth,\n                               int (*signctx_init) (EVP_PKEY_CTX *ctx,\n                                                    EVP_MD_CTX *mctx),\n                               int (*signctx) (EVP_PKEY_CTX *ctx,\n                                               unsigned char *sig,\n                                               size_t *siglen,\n                                               EVP_MD_CTX *mctx));\n\nvoid EVP_PKEY_meth_set_verifyctx(EVP_PKEY_METHOD *pmeth,\n                                 int (*verifyctx_init) (EVP_PKEY_CTX *ctx,\n                                                        EVP_MD_CTX *mctx),\n                                 int (*verifyctx) (EVP_PKEY_CTX *ctx,\n                                                   const unsigned char *sig,\n                                                   int siglen,\n                                                   EVP_MD_CTX *mctx));\n\nvoid EVP_PKEY_meth_set_encrypt(EVP_PKEY_METHOD *pmeth,\n                               int (*encrypt_init) (EVP_PKEY_CTX *ctx),\n                               int (*encryptfn) (EVP_PKEY_CTX *ctx,\n                                                 unsigned char *out,\n                                                 size_t *outlen,\n                                                 const unsigned char *in,\n                                                 size_t inlen));\n\nvoid EVP_PKEY_meth_set_decrypt(EVP_PKEY_METHOD *pmeth,\n                               int (*decrypt_init) (EVP_PKEY_CTX *ctx),\n                               int (*decrypt) (EVP_PKEY_CTX *ctx,\n                                               unsigned char *out,\n                                               size_t *outlen,\n                                               const unsigned char *in,\n                                               size_t inlen));\n\nvoid EVP_PKEY_meth_set_derive(EVP_PKEY_METHOD *pmeth,\n                              int (*derive_init) (EVP_PKEY_CTX *ctx),\n                              int (*derive) (EVP_PKEY_CTX *ctx,\n                                             unsigned char *key,\n                                             size_t *keylen));\n\nvoid EVP_PKEY_meth_set_ctrl(EVP_PKEY_METHOD *pmeth,\n                            int (*ctrl) (EVP_PKEY_CTX *ctx, int type, int p1,\n                                         void *p2),\n                            int (*ctrl_str) (EVP_PKEY_CTX *ctx,\n                                             const char *type,\n                                             const char *value));\n\nvoid EVP_add_alg_module(void);\n\n/* BEGIN ERROR CODES */\n/*\n * The following lines are auto generated by the script mkerr.pl. Any changes\n * made after this point may be overwritten when the script is next run.\n */\nvoid ERR_load_EVP_strings(void);\n\n/* Error codes for the EVP functions. */\n\n/* Function codes. */\n# define EVP_F_AESNI_INIT_KEY                             165\n# define EVP_F_AESNI_XTS_CIPHER                           176\n# define EVP_F_AES_INIT_KEY                               133\n# define EVP_F_AES_XTS                                    172\n# define EVP_F_AES_XTS_CIPHER                             175\n# define EVP_F_ALG_MODULE_INIT                            177\n# define EVP_F_CAMELLIA_INIT_KEY                          159\n# define EVP_F_CMAC_INIT                                  173\n# define EVP_F_D2I_PKEY                                   100\n# define EVP_F_DO_SIGVER_INIT                             161\n# define EVP_F_DSAPKEY2PKCS8                              134\n# define EVP_F_DSA_PKEY2PKCS8                             135\n# define EVP_F_ECDSA_PKEY2PKCS8                           129\n# define EVP_F_ECKEY_PKEY2PKCS8                           132\n# define EVP_F_EVP_CIPHERINIT_EX                          123\n# define EVP_F_EVP_CIPHER_CTX_COPY                        163\n# define EVP_F_EVP_CIPHER_CTX_CTRL                        124\n# define EVP_F_EVP_CIPHER_CTX_SET_KEY_LENGTH              122\n# define EVP_F_EVP_DECRYPTFINAL_EX                        101\n# define EVP_F_EVP_DIGESTINIT_EX                          128\n# define EVP_F_EVP_ENCRYPTFINAL_EX                        127\n# define EVP_F_EVP_MD_CTX_COPY_EX                         110\n# define EVP_F_EVP_MD_SIZE                                162\n# define EVP_F_EVP_OPENINIT                               102\n# define EVP_F_EVP_PBE_ALG_ADD                            115\n# define EVP_F_EVP_PBE_ALG_ADD_TYPE                       160\n# define EVP_F_EVP_PBE_CIPHERINIT                         116\n# define EVP_F_EVP_PKCS82PKEY                             111\n# define EVP_F_EVP_PKCS82PKEY_BROKEN                      136\n# define EVP_F_EVP_PKEY2PKCS8_BROKEN                      113\n# define EVP_F_EVP_PKEY_COPY_PARAMETERS                   103\n# define EVP_F_EVP_PKEY_CTX_CTRL                          137\n# define EVP_F_EVP_PKEY_CTX_CTRL_STR                      150\n# define EVP_F_EVP_PKEY_CTX_DUP                           156\n# define EVP_F_EVP_PKEY_DECRYPT                           104\n# define EVP_F_EVP_PKEY_DECRYPT_INIT                      138\n# define EVP_F_EVP_PKEY_DECRYPT_OLD                       151\n# define EVP_F_EVP_PKEY_DERIVE                            153\n# define EVP_F_EVP_PKEY_DERIVE_INIT                       154\n# define EVP_F_EVP_PKEY_DERIVE_SET_PEER                   155\n# define EVP_F_EVP_PKEY_ENCRYPT                           105\n# define EVP_F_EVP_PKEY_ENCRYPT_INIT                      139\n# define EVP_F_EVP_PKEY_ENCRYPT_OLD                       152\n# define EVP_F_EVP_PKEY_GET1_DH                           119\n# define EVP_F_EVP_PKEY_GET1_DSA                          120\n# define EVP_F_EVP_PKEY_GET1_ECDSA                        130\n# define EVP_F_EVP_PKEY_GET1_EC_KEY                       131\n# define EVP_F_EVP_PKEY_GET1_RSA                          121\n# define EVP_F_EVP_PKEY_KEYGEN                            146\n# define EVP_F_EVP_PKEY_KEYGEN_INIT                       147\n# define EVP_F_EVP_PKEY_NEW                               106\n# define EVP_F_EVP_PKEY_PARAMGEN                          148\n# define EVP_F_EVP_PKEY_PARAMGEN_INIT                     149\n# define EVP_F_EVP_PKEY_SIGN                              140\n# define EVP_F_EVP_PKEY_SIGN_INIT                         141\n# define EVP_F_EVP_PKEY_VERIFY                            142\n# define EVP_F_EVP_PKEY_VERIFY_INIT                       143\n# define EVP_F_EVP_PKEY_VERIFY_RECOVER                    144\n# define EVP_F_EVP_PKEY_VERIFY_RECOVER_INIT               145\n# define EVP_F_EVP_RIJNDAEL                               126\n# define EVP_F_EVP_SIGNFINAL                              107\n# define EVP_F_EVP_VERIFYFINAL                            108\n# define EVP_F_FIPS_CIPHERINIT                            166\n# define EVP_F_FIPS_CIPHER_CTX_COPY                       170\n# define EVP_F_FIPS_CIPHER_CTX_CTRL                       167\n# define EVP_F_FIPS_CIPHER_CTX_SET_KEY_LENGTH             171\n# define EVP_F_FIPS_DIGESTINIT                            168\n# define EVP_F_FIPS_MD_CTX_COPY                           169\n# define EVP_F_HMAC_INIT_EX                               174\n# define EVP_F_INT_CTX_NEW                                157\n# define EVP_F_PKCS5_PBE_KEYIVGEN                         117\n# define EVP_F_PKCS5_V2_PBE_KEYIVGEN                      118\n# define EVP_F_PKCS5_V2_PBKDF2_KEYIVGEN                   164\n# define EVP_F_PKCS8_SET_BROKEN                           112\n# define EVP_F_PKEY_SET_TYPE                              158\n# define EVP_F_RC2_MAGIC_TO_METH                          109\n# define EVP_F_RC5_CTRL                                   125\n\n/* Reason codes. */\n# define EVP_R_AES_IV_SETUP_FAILED                        162\n# define EVP_R_AES_KEY_SETUP_FAILED                       143\n# define EVP_R_ASN1_LIB                                   140\n# define EVP_R_BAD_BLOCK_LENGTH                           136\n# define EVP_R_BAD_DECRYPT                                100\n# define EVP_R_BAD_KEY_LENGTH                             137\n# define EVP_R_BN_DECODE_ERROR                            112\n# define EVP_R_BN_PUBKEY_ERROR                            113\n# define EVP_R_BUFFER_TOO_SMALL                           155\n# define EVP_R_CAMELLIA_KEY_SETUP_FAILED                  157\n# define EVP_R_CIPHER_PARAMETER_ERROR                     122\n# define EVP_R_COMMAND_NOT_SUPPORTED                      147\n# define EVP_R_CTRL_NOT_IMPLEMENTED                       132\n# define EVP_R_CTRL_OPERATION_NOT_IMPLEMENTED             133\n# define EVP_R_DATA_NOT_MULTIPLE_OF_BLOCK_LENGTH          138\n# define EVP_R_DECODE_ERROR                               114\n# define EVP_R_DIFFERENT_KEY_TYPES                        101\n# define EVP_R_DIFFERENT_PARAMETERS                       153\n# define EVP_R_DISABLED_FOR_FIPS                          163\n# define EVP_R_ENCODE_ERROR                               115\n# define EVP_R_ERROR_LOADING_SECTION                      165\n# define EVP_R_ERROR_SETTING_FIPS_MODE                    166\n# define EVP_R_EVP_PBE_CIPHERINIT_ERROR                   119\n# define EVP_R_EXPECTING_AN_RSA_KEY                       127\n# define EVP_R_EXPECTING_A_DH_KEY                         128\n# define EVP_R_EXPECTING_A_DSA_KEY                        129\n# define EVP_R_EXPECTING_A_ECDSA_KEY                      141\n# define EVP_R_EXPECTING_A_EC_KEY                         142\n# define EVP_R_FIPS_MODE_NOT_SUPPORTED                    167\n# define EVP_R_INITIALIZATION_ERROR                       134\n# define EVP_R_INPUT_NOT_INITIALIZED                      111\n# define EVP_R_INVALID_DIGEST                             152\n# define EVP_R_INVALID_FIPS_MODE                          168\n# define EVP_R_INVALID_KEY_LENGTH                         130\n# define EVP_R_INVALID_OPERATION                          148\n# define EVP_R_IV_TOO_LARGE                               102\n# define EVP_R_KEYGEN_FAILURE                             120\n# define EVP_R_MESSAGE_DIGEST_IS_NULL                     159\n# define EVP_R_METHOD_NOT_SUPPORTED                       144\n# define EVP_R_MISSING_PARAMETERS                         103\n# define EVP_R_NO_CIPHER_SET                              131\n# define EVP_R_NO_DEFAULT_DIGEST                          158\n# define EVP_R_NO_DIGEST_SET                              139\n# define EVP_R_NO_DSA_PARAMETERS                          116\n# define EVP_R_NO_KEY_SET                                 154\n# define EVP_R_NO_OPERATION_SET                           149\n# define EVP_R_NO_SIGN_FUNCTION_CONFIGURED                104\n# define EVP_R_NO_VERIFY_FUNCTION_CONFIGURED              105\n# define EVP_R_OPERATION_NOT_SUPPORTED_FOR_THIS_KEYTYPE   150\n# define EVP_R_OPERATON_NOT_INITIALIZED                   151\n# define EVP_R_PKCS8_UNKNOWN_BROKEN_TYPE                  117\n# define EVP_R_PRIVATE_KEY_DECODE_ERROR                   145\n# define EVP_R_PRIVATE_KEY_ENCODE_ERROR                   146\n# define EVP_R_PUBLIC_KEY_NOT_RSA                         106\n# define EVP_R_TOO_LARGE                                  164\n# define EVP_R_UNKNOWN_CIPHER                             160\n# define EVP_R_UNKNOWN_DIGEST                             161\n# define EVP_R_UNKNOWN_OPTION                             169\n# define EVP_R_UNKNOWN_PBE_ALGORITHM                      121\n# define EVP_R_UNSUPORTED_NUMBER_OF_ROUNDS                135\n# define EVP_R_UNSUPPORTED_ALGORITHM                      156\n# define EVP_R_UNSUPPORTED_CIPHER                         107\n# define EVP_R_UNSUPPORTED_KEYLENGTH                      123\n# define EVP_R_UNSUPPORTED_KEY_DERIVATION_FUNCTION        124\n# define EVP_R_UNSUPPORTED_KEY_SIZE                       108\n# define EVP_R_UNSUPPORTED_PRF                            125\n# define EVP_R_UNSUPPORTED_PRIVATE_KEY_ALGORITHM          118\n# define EVP_R_UNSUPPORTED_SALT_TYPE                      126\n# define EVP_R_WRONG_FINAL_BLOCK_LENGTH                   109\n# define EVP_R_WRONG_PUBLIC_KEY_TYPE                      110\n\n#ifdef  __cplusplus\n}\n#endif\n#endif\n"
  },
  {
    "path": "Pods/OpenSSL-Universal/include-ios/openssl/hmac.h",
    "content": "/* crypto/hmac/hmac.h */\n/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)\n * All rights reserved.\n *\n * This package is an SSL implementation written\n * by Eric Young (eay@cryptsoft.com).\n * The implementation was written so as to conform with Netscapes SSL.\n *\n * This library is free for commercial and non-commercial use as long as\n * the following conditions are aheared to.  The following conditions\n * apply to all code found in this distribution, be it the RC4, RSA,\n * lhash, DES, etc., code; not just the SSL code.  The SSL documentation\n * included with this distribution is covered by the same copyright terms\n * except that the holder is Tim Hudson (tjh@cryptsoft.com).\n *\n * Copyright remains Eric Young's, and as such any Copyright notices in\n * the code are not to be removed.\n * If this package is used in a product, Eric Young should be given attribution\n * as the author of the parts of the library used.\n * This can be in the form of a textual message at program startup or\n * in documentation (online or textual) provided with the package.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n * 1. Redistributions of source code must retain the copyright\n *    notice, this list of conditions and the following disclaimer.\n * 2. Redistributions in binary form must reproduce the above copyright\n *    notice, this list of conditions and the following disclaimer in the\n *    documentation and/or other materials provided with the distribution.\n * 3. All advertising materials mentioning features or use of this software\n *    must display the following acknowledgement:\n *    \"This product includes cryptographic software written by\n *     Eric Young (eay@cryptsoft.com)\"\n *    The word 'cryptographic' can be left out if the rouines from the library\n *    being used are not cryptographic related :-).\n * 4. If you include any Windows specific code (or a derivative thereof) from\n *    the apps directory (application code) you must include an acknowledgement:\n *    \"This product includes software written by Tim Hudson (tjh@cryptsoft.com)\"\n *\n * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND\n * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE\n * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n * SUCH DAMAGE.\n *\n * The licence and distribution terms for any publically available version or\n * derivative of this code cannot be changed.  i.e. this code cannot simply be\n * copied and put under another distribution licence\n * [including the GNU Public Licence.]\n */\n#ifndef HEADER_HMAC_H\n# define HEADER_HMAC_H\n\n# include <openssl/opensslconf.h>\n\n# ifdef OPENSSL_NO_HMAC\n#  error HMAC is disabled.\n# endif\n\n# include <openssl/evp.h>\n\n# define HMAC_MAX_MD_CBLOCK      128/* largest known is SHA512 */\n\n#ifdef  __cplusplus\nextern \"C\" {\n#endif\n\ntypedef struct hmac_ctx_st {\n    const EVP_MD *md;\n    EVP_MD_CTX md_ctx;\n    EVP_MD_CTX i_ctx;\n    EVP_MD_CTX o_ctx;\n    unsigned int key_length;\n    unsigned char key[HMAC_MAX_MD_CBLOCK];\n} HMAC_CTX;\n\n# define HMAC_size(e)    (EVP_MD_size((e)->md))\n\nvoid HMAC_CTX_init(HMAC_CTX *ctx);\nvoid HMAC_CTX_cleanup(HMAC_CTX *ctx);\n\n/* deprecated */\n# define HMAC_cleanup(ctx) HMAC_CTX_cleanup(ctx)\n\n/* deprecated */\nint HMAC_Init(HMAC_CTX *ctx, const void *key, int len, const EVP_MD *md);\nint HMAC_Init_ex(HMAC_CTX *ctx, const void *key, int len,\n                 const EVP_MD *md, ENGINE *impl);\nint HMAC_Update(HMAC_CTX *ctx, const unsigned char *data, size_t len);\nint HMAC_Final(HMAC_CTX *ctx, unsigned char *md, unsigned int *len);\nunsigned char *HMAC(const EVP_MD *evp_md, const void *key, int key_len,\n                    const unsigned char *d, size_t n, unsigned char *md,\n                    unsigned int *md_len);\nint HMAC_CTX_copy(HMAC_CTX *dctx, HMAC_CTX *sctx);\n\nvoid HMAC_CTX_set_flags(HMAC_CTX *ctx, unsigned long flags);\n\n#ifdef  __cplusplus\n}\n#endif\n\n#endif\n"
  },
  {
    "path": "Pods/OpenSSL-Universal/include-ios/openssl/idea.h",
    "content": "/* crypto/idea/idea.h */\n/* Copyright (C) 1995-1997 Eric Young (eay@cryptsoft.com)\n * All rights reserved.\n *\n * This package is an SSL implementation written\n * by Eric Young (eay@cryptsoft.com).\n * The implementation was written so as to conform with Netscapes SSL.\n *\n * This library is free for commercial and non-commercial use as long as\n * the following conditions are aheared to.  The following conditions\n * apply to all code found in this distribution, be it the RC4, RSA,\n * lhash, DES, etc., code; not just the SSL code.  The SSL documentation\n * included with this distribution is covered by the same copyright terms\n * except that the holder is Tim Hudson (tjh@cryptsoft.com).\n *\n * Copyright remains Eric Young's, and as such any Copyright notices in\n * the code are not to be removed.\n * If this package is used in a product, Eric Young should be given attribution\n * as the author of the parts of the library used.\n * This can be in the form of a textual message at program startup or\n * in documentation (online or textual) provided with the package.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n * 1. Redistributions of source code must retain the copyright\n *    notice, this list of conditions and the following disclaimer.\n * 2. Redistributions in binary form must reproduce the above copyright\n *    notice, this list of conditions and the following disclaimer in the\n *    documentation and/or other materials provided with the distribution.\n * 3. All advertising materials mentioning features or use of this software\n *    must display the following acknowledgement:\n *    \"This product includes cryptographic software written by\n *     Eric Young (eay@cryptsoft.com)\"\n *    The word 'cryptographic' can be left out if the rouines from the library\n *    being used are not cryptographic related :-).\n * 4. If you include any Windows specific code (or a derivative thereof) from\n *    the apps directory (application code) you must include an acknowledgement:\n *    \"This product includes software written by Tim Hudson (tjh@cryptsoft.com)\"\n *\n * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND\n * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE\n * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n * SUCH DAMAGE.\n *\n * The licence and distribution terms for any publically available version or\n * derivative of this code cannot be changed.  i.e. this code cannot simply be\n * copied and put under another distribution licence\n * [including the GNU Public Licence.]\n */\n\n#ifndef HEADER_IDEA_H\n# define HEADER_IDEA_H\n\n# include <openssl/opensslconf.h>/* IDEA_INT, OPENSSL_NO_IDEA */\n\n# ifdef OPENSSL_NO_IDEA\n#  error IDEA is disabled.\n# endif\n\n# define IDEA_ENCRYPT    1\n# define IDEA_DECRYPT    0\n\n# define IDEA_BLOCK      8\n# define IDEA_KEY_LENGTH 16\n\n#ifdef  __cplusplus\nextern \"C\" {\n#endif\n\ntypedef struct idea_key_st {\n    IDEA_INT data[9][6];\n} IDEA_KEY_SCHEDULE;\n\nconst char *idea_options(void);\nvoid idea_ecb_encrypt(const unsigned char *in, unsigned char *out,\n                      IDEA_KEY_SCHEDULE *ks);\n# ifdef OPENSSL_FIPS\nvoid private_idea_set_encrypt_key(const unsigned char *key,\n                                  IDEA_KEY_SCHEDULE *ks);\n# endif\nvoid idea_set_encrypt_key(const unsigned char *key, IDEA_KEY_SCHEDULE *ks);\nvoid idea_set_decrypt_key(IDEA_KEY_SCHEDULE *ek, IDEA_KEY_SCHEDULE *dk);\nvoid idea_cbc_encrypt(const unsigned char *in, unsigned char *out,\n                      long length, IDEA_KEY_SCHEDULE *ks, unsigned char *iv,\n                      int enc);\nvoid idea_cfb64_encrypt(const unsigned char *in, unsigned char *out,\n                        long length, IDEA_KEY_SCHEDULE *ks, unsigned char *iv,\n                        int *num, int enc);\nvoid idea_ofb64_encrypt(const unsigned char *in, unsigned char *out,\n                        long length, IDEA_KEY_SCHEDULE *ks, unsigned char *iv,\n                        int *num);\nvoid idea_encrypt(unsigned long *in, IDEA_KEY_SCHEDULE *ks);\n#ifdef  __cplusplus\n}\n#endif\n\n#endif\n"
  },
  {
    "path": "Pods/OpenSSL-Universal/include-ios/openssl/krb5_asn.h",
    "content": "/* krb5_asn.h */\n/*\n * Written by Vern Staats <staatsvr@asc.hpc.mil> for the OpenSSL project, **\n * using ocsp/{*.h,*asn*.c} as a starting point\n */\n\n/* ====================================================================\n * Copyright (c) 1998-2000 The OpenSSL Project.  All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n *\n * 1. Redistributions of source code must retain the above copyright\n *    notice, this list of conditions and the following disclaimer.\n *\n * 2. Redistributions in binary form must reproduce the above copyright\n *    notice, this list of conditions and the following disclaimer in\n *    the documentation and/or other materials provided with the\n *    distribution.\n *\n * 3. All advertising materials mentioning features or use of this\n *    software must display the following acknowledgment:\n *    \"This product includes software developed by the OpenSSL Project\n *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)\"\n *\n * 4. The names \"OpenSSL Toolkit\" and \"OpenSSL Project\" must not be used to\n *    endorse or promote products derived from this software without\n *    prior written permission. For written permission, please contact\n *    openssl-core@openssl.org.\n *\n * 5. Products derived from this software may not be called \"OpenSSL\"\n *    nor may \"OpenSSL\" appear in their names without prior written\n *    permission of the OpenSSL Project.\n *\n * 6. Redistributions of any form whatsoever must retain the following\n *    acknowledgment:\n *    \"This product includes software developed by the OpenSSL Project\n *    for use in the OpenSSL Toolkit (http://www.openssl.org/)\"\n *\n * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY\n * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\n * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR\n * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,\n * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED\n * OF THE POSSIBILITY OF SUCH DAMAGE.\n * ====================================================================\n *\n * This product includes cryptographic software written by Eric Young\n * (eay@cryptsoft.com).  This product includes software written by Tim\n * Hudson (tjh@cryptsoft.com).\n *\n */\n\n#ifndef HEADER_KRB5_ASN_H\n# define HEADER_KRB5_ASN_H\n\n/*\n * #include <krb5.h>\n */\n# include <openssl/safestack.h>\n\n#ifdef  __cplusplus\nextern \"C\" {\n#endif\n\n/*\n * ASN.1 from Kerberos RFC 1510\n */\n\n/*-     EncryptedData ::=   SEQUENCE {\n *              etype[0]                      INTEGER, -- EncryptionType\n *              kvno[1]                       INTEGER OPTIONAL,\n *              cipher[2]                     OCTET STRING -- ciphertext\n *      }\n */\ntypedef struct krb5_encdata_st {\n    ASN1_INTEGER *etype;\n    ASN1_INTEGER *kvno;\n    ASN1_OCTET_STRING *cipher;\n} KRB5_ENCDATA;\n\nDECLARE_STACK_OF(KRB5_ENCDATA)\n\n/*-     PrincipalName ::=   SEQUENCE {\n *              name-type[0]                  INTEGER,\n *              name-string[1]                SEQUENCE OF GeneralString\n *      }\n */\ntypedef struct krb5_princname_st {\n    ASN1_INTEGER *nametype;\n    STACK_OF(ASN1_GENERALSTRING) *namestring;\n} KRB5_PRINCNAME;\n\nDECLARE_STACK_OF(KRB5_PRINCNAME)\n\n/*-     Ticket ::=      [APPLICATION 1] SEQUENCE {\n *              tkt-vno[0]                    INTEGER,\n *              realm[1]                      Realm,\n *              sname[2]                      PrincipalName,\n *              enc-part[3]                   EncryptedData\n *      }\n */\ntypedef struct krb5_tktbody_st {\n    ASN1_INTEGER *tktvno;\n    ASN1_GENERALSTRING *realm;\n    KRB5_PRINCNAME *sname;\n    KRB5_ENCDATA *encdata;\n} KRB5_TKTBODY;\n\ntypedef STACK_OF(KRB5_TKTBODY) KRB5_TICKET;\nDECLARE_STACK_OF(KRB5_TKTBODY)\n\n/*-     AP-REQ ::=      [APPLICATION 14] SEQUENCE {\n *              pvno[0]                       INTEGER,\n *              msg-type[1]                   INTEGER,\n *              ap-options[2]                 APOptions,\n *              ticket[3]                     Ticket,\n *              authenticator[4]              EncryptedData\n *      }\n *\n *      APOptions ::=   BIT STRING {\n *              reserved(0), use-session-key(1), mutual-required(2) }\n */\ntypedef struct krb5_ap_req_st {\n    ASN1_INTEGER *pvno;\n    ASN1_INTEGER *msgtype;\n    ASN1_BIT_STRING *apoptions;\n    KRB5_TICKET *ticket;\n    KRB5_ENCDATA *authenticator;\n} KRB5_APREQBODY;\n\ntypedef STACK_OF(KRB5_APREQBODY) KRB5_APREQ;\nDECLARE_STACK_OF(KRB5_APREQBODY)\n\n/*      Authenticator Stuff     */\n\n/*-     Checksum ::=   SEQUENCE {\n *              cksumtype[0]                  INTEGER,\n *              checksum[1]                   OCTET STRING\n *      }\n */\ntypedef struct krb5_checksum_st {\n    ASN1_INTEGER *ctype;\n    ASN1_OCTET_STRING *checksum;\n} KRB5_CHECKSUM;\n\nDECLARE_STACK_OF(KRB5_CHECKSUM)\n\n/*-     EncryptionKey ::=   SEQUENCE {\n *              keytype[0]                    INTEGER,\n *              keyvalue[1]                   OCTET STRING\n *      }\n */\ntypedef struct krb5_encryptionkey_st {\n    ASN1_INTEGER *ktype;\n    ASN1_OCTET_STRING *keyvalue;\n} KRB5_ENCKEY;\n\nDECLARE_STACK_OF(KRB5_ENCKEY)\n\n/*-     AuthorizationData ::=   SEQUENCE OF SEQUENCE {\n *              ad-type[0]                    INTEGER,\n *              ad-data[1]                    OCTET STRING\n *      }\n */\ntypedef struct krb5_authorization_st {\n    ASN1_INTEGER *adtype;\n    ASN1_OCTET_STRING *addata;\n} KRB5_AUTHDATA;\n\nDECLARE_STACK_OF(KRB5_AUTHDATA)\n\n/*-     -- Unencrypted authenticator\n *      Authenticator ::=    [APPLICATION 2] SEQUENCE    {\n *              authenticator-vno[0]          INTEGER,\n *              crealm[1]                     Realm,\n *              cname[2]                      PrincipalName,\n *              cksum[3]                      Checksum OPTIONAL,\n *              cusec[4]                      INTEGER,\n *              ctime[5]                      KerberosTime,\n *              subkey[6]                     EncryptionKey OPTIONAL,\n *              seq-number[7]                 INTEGER OPTIONAL,\n *              authorization-data[8]         AuthorizationData OPTIONAL\n *      }\n */\ntypedef struct krb5_authenticator_st {\n    ASN1_INTEGER *avno;\n    ASN1_GENERALSTRING *crealm;\n    KRB5_PRINCNAME *cname;\n    KRB5_CHECKSUM *cksum;\n    ASN1_INTEGER *cusec;\n    ASN1_GENERALIZEDTIME *ctime;\n    KRB5_ENCKEY *subkey;\n    ASN1_INTEGER *seqnum;\n    KRB5_AUTHDATA *authorization;\n} KRB5_AUTHENTBODY;\n\ntypedef STACK_OF(KRB5_AUTHENTBODY) KRB5_AUTHENT;\nDECLARE_STACK_OF(KRB5_AUTHENTBODY)\n\n/*-  DECLARE_ASN1_FUNCTIONS(type) = DECLARE_ASN1_FUNCTIONS_name(type, type) =\n *      type *name##_new(void);\n *      void name##_free(type *a);\n *      DECLARE_ASN1_ENCODE_FUNCTIONS(type, name, name) =\n *       DECLARE_ASN1_ENCODE_FUNCTIONS(type, itname, name) =\n *        type *d2i_##name(type **a, const unsigned char **in, long len);\n *        int i2d_##name(type *a, unsigned char **out);\n *        DECLARE_ASN1_ITEM(itname) = OPENSSL_EXTERN const ASN1_ITEM itname##_it\n */\n\nDECLARE_ASN1_FUNCTIONS(KRB5_ENCDATA)\nDECLARE_ASN1_FUNCTIONS(KRB5_PRINCNAME)\nDECLARE_ASN1_FUNCTIONS(KRB5_TKTBODY)\nDECLARE_ASN1_FUNCTIONS(KRB5_APREQBODY)\nDECLARE_ASN1_FUNCTIONS(KRB5_TICKET)\nDECLARE_ASN1_FUNCTIONS(KRB5_APREQ)\n\nDECLARE_ASN1_FUNCTIONS(KRB5_CHECKSUM)\nDECLARE_ASN1_FUNCTIONS(KRB5_ENCKEY)\nDECLARE_ASN1_FUNCTIONS(KRB5_AUTHDATA)\nDECLARE_ASN1_FUNCTIONS(KRB5_AUTHENTBODY)\nDECLARE_ASN1_FUNCTIONS(KRB5_AUTHENT)\n\n/* BEGIN ERROR CODES */\n/*\n * The following lines are auto generated by the script mkerr.pl. Any changes\n * made after this point may be overwritten when the script is next run.\n */\n\n#ifdef  __cplusplus\n}\n#endif\n#endif\n"
  },
  {
    "path": "Pods/OpenSSL-Universal/include-ios/openssl/kssl.h",
    "content": "/* ssl/kssl.h -*- mode: C; c-file-style: \"eay\" -*- */\n/*\n * Written by Vern Staats <staatsvr@asc.hpc.mil> for the OpenSSL project\n * 2000. project 2000.\n */\n/* ====================================================================\n * Copyright (c) 2000 The OpenSSL Project.  All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n *\n * 1. Redistributions of source code must retain the above copyright\n *    notice, this list of conditions and the following disclaimer.\n *\n * 2. Redistributions in binary form must reproduce the above copyright\n *    notice, this list of conditions and the following disclaimer in\n *    the documentation and/or other materials provided with the\n *    distribution.\n *\n * 3. All advertising materials mentioning features or use of this\n *    software must display the following acknowledgment:\n *    \"This product includes software developed by the OpenSSL Project\n *    for use in the OpenSSL Toolkit. (http://www.OpenSSL.org/)\"\n *\n * 4. The names \"OpenSSL Toolkit\" and \"OpenSSL Project\" must not be used to\n *    endorse or promote products derived from this software without\n *    prior written permission. For written permission, please contact\n *    licensing@OpenSSL.org.\n *\n * 5. Products derived from this software may not be called \"OpenSSL\"\n *    nor may \"OpenSSL\" appear in their names without prior written\n *    permission of the OpenSSL Project.\n *\n * 6. Redistributions of any form whatsoever must retain the following\n *    acknowledgment:\n *    \"This product includes software developed by the OpenSSL Project\n *    for use in the OpenSSL Toolkit (http://www.OpenSSL.org/)\"\n *\n * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY\n * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\n * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR\n * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,\n * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED\n * OF THE POSSIBILITY OF SUCH DAMAGE.\n * ====================================================================\n *\n * This product includes cryptographic software written by Eric Young\n * (eay@cryptsoft.com).  This product includes software written by Tim\n * Hudson (tjh@cryptsoft.com).\n *\n */\n\n/*\n **      19990701        VRS     Started.\n */\n\n#ifndef KSSL_H\n# define KSSL_H\n\n# include <openssl/opensslconf.h>\n\n# ifndef OPENSSL_NO_KRB5\n\n#  include <stdio.h>\n#  include <ctype.h>\n#  include <krb5.h>\n#  ifdef OPENSSL_SYS_WIN32\n/*\n * These can sometimes get redefined indirectly by krb5 header files after\n * they get undefed in ossl_typ.h\n */\n#   undef X509_NAME\n#   undef X509_EXTENSIONS\n#   undef OCSP_REQUEST\n#   undef OCSP_RESPONSE\n#  endif\n\n#ifdef  __cplusplus\nextern \"C\" {\n#endif\n\n/*\n *      Depending on which KRB5 implementation used, some types from\n *      the other may be missing.  Resolve that here and now\n */\n#  ifdef KRB5_HEIMDAL\ntypedef unsigned char krb5_octet;\n#   define FAR\n#  else\n\n#   ifndef FAR\n#    define FAR\n#   endif\n\n#  endif\n\n/*-\n *      Uncomment this to debug kssl problems or\n *      to trace usage of the Kerberos session key\n *\n *      #define         KSSL_DEBUG\n */\n\n#  ifndef KRB5SVC\n#   define KRB5SVC \"host\"\n#  endif\n\n#  ifndef KRB5KEYTAB\n#   define KRB5KEYTAB      \"/etc/krb5.keytab\"\n#  endif\n\n#  ifndef KRB5SENDAUTH\n#   define KRB5SENDAUTH    1\n#  endif\n\n#  ifndef KRB5CHECKAUTH\n#   define KRB5CHECKAUTH   1\n#  endif\n\n#  ifndef KSSL_CLOCKSKEW\n#   define KSSL_CLOCKSKEW  300;\n#  endif\n\n#  define KSSL_ERR_MAX    255\ntypedef struct kssl_err_st {\n    int reason;\n    char text[KSSL_ERR_MAX + 1];\n} KSSL_ERR;\n\n/*-     Context for passing\n *              (1) Kerberos session key to SSL, and\n *              (2)     Config data between application and SSL lib\n */\ntypedef struct kssl_ctx_st {\n    /*      used by:    disposition:            */\n    char *service_name;         /* C,S default ok (kssl) */\n    char *service_host;         /* C input, REQUIRED */\n    char *client_princ;         /* S output from krb5 ticket */\n    char *keytab_file;          /* S NULL (/etc/krb5.keytab) */\n    char *cred_cache;           /* C NULL (default) */\n    krb5_enctype enctype;\n    int length;\n    krb5_octet FAR *key;\n} KSSL_CTX;\n\n#  define KSSL_CLIENT     1\n#  define KSSL_SERVER     2\n#  define KSSL_SERVICE    3\n#  define KSSL_KEYTAB     4\n\n#  define KSSL_CTX_OK     0\n#  define KSSL_CTX_ERR    1\n#  define KSSL_NOMEM      2\n\n/* Public (for use by applications that use OpenSSL with Kerberos 5 support */\nkrb5_error_code kssl_ctx_setstring(KSSL_CTX *kssl_ctx, int which, char *text);\nKSSL_CTX *kssl_ctx_new(void);\nKSSL_CTX *kssl_ctx_free(KSSL_CTX *kssl_ctx);\nvoid kssl_ctx_show(KSSL_CTX *kssl_ctx);\nkrb5_error_code kssl_ctx_setprinc(KSSL_CTX *kssl_ctx, int which,\n                                  krb5_data *realm, krb5_data *entity,\n                                  int nentities);\nkrb5_error_code kssl_cget_tkt(KSSL_CTX *kssl_ctx, krb5_data **enc_tktp,\n                              krb5_data *authenp, KSSL_ERR *kssl_err);\nkrb5_error_code kssl_sget_tkt(KSSL_CTX *kssl_ctx, krb5_data *indata,\n                              krb5_ticket_times *ttimes, KSSL_ERR *kssl_err);\nkrb5_error_code kssl_ctx_setkey(KSSL_CTX *kssl_ctx, krb5_keyblock *session);\nvoid kssl_err_set(KSSL_ERR *kssl_err, int reason, char *text);\nvoid kssl_krb5_free_data_contents(krb5_context context, krb5_data *data);\nkrb5_error_code kssl_build_principal_2(krb5_context context,\n                                       krb5_principal *princ, int rlen,\n                                       const char *realm, int slen,\n                                       const char *svc, int hlen,\n                                       const char *host);\nkrb5_error_code kssl_validate_times(krb5_timestamp atime,\n                                    krb5_ticket_times *ttimes);\nkrb5_error_code kssl_check_authent(KSSL_CTX *kssl_ctx, krb5_data *authentp,\n                                   krb5_timestamp *atimep,\n                                   KSSL_ERR *kssl_err);\nunsigned char *kssl_skip_confound(krb5_enctype enctype, unsigned char *authn);\n\nvoid SSL_set0_kssl_ctx(SSL *s, KSSL_CTX *kctx);\nKSSL_CTX *SSL_get0_kssl_ctx(SSL *s);\nchar *kssl_ctx_get0_client_princ(KSSL_CTX *kctx);\n\n#ifdef  __cplusplus\n}\n#endif\n# endif                         /* OPENSSL_NO_KRB5 */\n#endif                          /* KSSL_H */\n"
  },
  {
    "path": "Pods/OpenSSL-Universal/include-ios/openssl/lhash.h",
    "content": "/* crypto/lhash/lhash.h */\n/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)\n * All rights reserved.\n *\n * This package is an SSL implementation written\n * by Eric Young (eay@cryptsoft.com).\n * The implementation was written so as to conform with Netscapes SSL.\n *\n * This library is free for commercial and non-commercial use as long as\n * the following conditions are aheared to.  The following conditions\n * apply to all code found in this distribution, be it the RC4, RSA,\n * lhash, DES, etc., code; not just the SSL code.  The SSL documentation\n * included with this distribution is covered by the same copyright terms\n * except that the holder is Tim Hudson (tjh@cryptsoft.com).\n *\n * Copyright remains Eric Young's, and as such any Copyright notices in\n * the code are not to be removed.\n * If this package is used in a product, Eric Young should be given attribution\n * as the author of the parts of the library used.\n * This can be in the form of a textual message at program startup or\n * in documentation (online or textual) provided with the package.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n * 1. Redistributions of source code must retain the copyright\n *    notice, this list of conditions and the following disclaimer.\n * 2. Redistributions in binary form must reproduce the above copyright\n *    notice, this list of conditions and the following disclaimer in the\n *    documentation and/or other materials provided with the distribution.\n * 3. All advertising materials mentioning features or use of this software\n *    must display the following acknowledgement:\n *    \"This product includes cryptographic software written by\n *     Eric Young (eay@cryptsoft.com)\"\n *    The word 'cryptographic' can be left out if the rouines from the library\n *    being used are not cryptographic related :-).\n * 4. If you include any Windows specific code (or a derivative thereof) from\n *    the apps directory (application code) you must include an acknowledgement:\n *    \"This product includes software written by Tim Hudson (tjh@cryptsoft.com)\"\n *\n * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND\n * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE\n * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n * SUCH DAMAGE.\n *\n * The licence and distribution terms for any publically available version or\n * derivative of this code cannot be changed.  i.e. this code cannot simply be\n * copied and put under another distribution licence\n * [including the GNU Public Licence.]\n */\n\n/*\n * Header for dynamic hash table routines Author - Eric Young\n */\n\n#ifndef HEADER_LHASH_H\n# define HEADER_LHASH_H\n\n# include <openssl/e_os2.h>\n# ifndef OPENSSL_NO_FP_API\n#  include <stdio.h>\n# endif\n\n# ifndef OPENSSL_NO_BIO\n#  include <openssl/bio.h>\n# endif\n\n#ifdef  __cplusplus\nextern \"C\" {\n#endif\n\ntypedef struct lhash_node_st {\n    void *data;\n    struct lhash_node_st *next;\n# ifndef OPENSSL_NO_HASH_COMP\n    unsigned long hash;\n# endif\n} LHASH_NODE;\n\ntypedef int (*LHASH_COMP_FN_TYPE) (const void *, const void *);\ntypedef unsigned long (*LHASH_HASH_FN_TYPE) (const void *);\ntypedef void (*LHASH_DOALL_FN_TYPE) (void *);\ntypedef void (*LHASH_DOALL_ARG_FN_TYPE) (void *, void *);\n\n/*\n * Macros for declaring and implementing type-safe wrappers for LHASH\n * callbacks. This way, callbacks can be provided to LHASH structures without\n * function pointer casting and the macro-defined callbacks provide\n * per-variable casting before deferring to the underlying type-specific\n * callbacks. NB: It is possible to place a \"static\" in front of both the\n * DECLARE and IMPLEMENT macros if the functions are strictly internal.\n */\n\n/* First: \"hash\" functions */\n# define DECLARE_LHASH_HASH_FN(name, o_type) \\\n        unsigned long name##_LHASH_HASH(const void *);\n# define IMPLEMENT_LHASH_HASH_FN(name, o_type) \\\n        unsigned long name##_LHASH_HASH(const void *arg) { \\\n                const o_type *a = arg; \\\n                return name##_hash(a); }\n# define LHASH_HASH_FN(name) name##_LHASH_HASH\n\n/* Second: \"compare\" functions */\n# define DECLARE_LHASH_COMP_FN(name, o_type) \\\n        int name##_LHASH_COMP(const void *, const void *);\n# define IMPLEMENT_LHASH_COMP_FN(name, o_type) \\\n        int name##_LHASH_COMP(const void *arg1, const void *arg2) { \\\n                const o_type *a = arg1;             \\\n                const o_type *b = arg2; \\\n                return name##_cmp(a,b); }\n# define LHASH_COMP_FN(name) name##_LHASH_COMP\n\n/* Third: \"doall\" functions */\n# define DECLARE_LHASH_DOALL_FN(name, o_type) \\\n        void name##_LHASH_DOALL(void *);\n# define IMPLEMENT_LHASH_DOALL_FN(name, o_type) \\\n        void name##_LHASH_DOALL(void *arg) { \\\n                o_type *a = arg; \\\n                name##_doall(a); }\n# define LHASH_DOALL_FN(name) name##_LHASH_DOALL\n\n/* Fourth: \"doall_arg\" functions */\n# define DECLARE_LHASH_DOALL_ARG_FN(name, o_type, a_type) \\\n        void name##_LHASH_DOALL_ARG(void *, void *);\n# define IMPLEMENT_LHASH_DOALL_ARG_FN(name, o_type, a_type) \\\n        void name##_LHASH_DOALL_ARG(void *arg1, void *arg2) { \\\n                o_type *a = arg1; \\\n                a_type *b = arg2; \\\n                name##_doall_arg(a, b); }\n# define LHASH_DOALL_ARG_FN(name) name##_LHASH_DOALL_ARG\n\ntypedef struct lhash_st {\n    LHASH_NODE **b;\n    LHASH_COMP_FN_TYPE comp;\n    LHASH_HASH_FN_TYPE hash;\n    unsigned int num_nodes;\n    unsigned int num_alloc_nodes;\n    unsigned int p;\n    unsigned int pmax;\n    unsigned long up_load;      /* load times 256 */\n    unsigned long down_load;    /* load times 256 */\n    unsigned long num_items;\n    unsigned long num_expands;\n    unsigned long num_expand_reallocs;\n    unsigned long num_contracts;\n    unsigned long num_contract_reallocs;\n    unsigned long num_hash_calls;\n    unsigned long num_comp_calls;\n    unsigned long num_insert;\n    unsigned long num_replace;\n    unsigned long num_delete;\n    unsigned long num_no_delete;\n    unsigned long num_retrieve;\n    unsigned long num_retrieve_miss;\n    unsigned long num_hash_comps;\n    int error;\n} _LHASH;                       /* Do not use _LHASH directly, use LHASH_OF\n                                 * and friends */\n\n# define LH_LOAD_MULT    256\n\n/*\n * Indicates a malloc() error in the last call, this is only bad in\n * lh_insert().\n */\n# define lh_error(lh)    ((lh)->error)\n\n_LHASH *lh_new(LHASH_HASH_FN_TYPE h, LHASH_COMP_FN_TYPE c);\nvoid lh_free(_LHASH *lh);\nvoid *lh_insert(_LHASH *lh, void *data);\nvoid *lh_delete(_LHASH *lh, const void *data);\nvoid *lh_retrieve(_LHASH *lh, const void *data);\nvoid lh_doall(_LHASH *lh, LHASH_DOALL_FN_TYPE func);\nvoid lh_doall_arg(_LHASH *lh, LHASH_DOALL_ARG_FN_TYPE func, void *arg);\nunsigned long lh_strhash(const char *c);\nunsigned long lh_num_items(const _LHASH *lh);\n\n# ifndef OPENSSL_NO_FP_API\nvoid lh_stats(const _LHASH *lh, FILE *out);\nvoid lh_node_stats(const _LHASH *lh, FILE *out);\nvoid lh_node_usage_stats(const _LHASH *lh, FILE *out);\n# endif\n\n# ifndef OPENSSL_NO_BIO\nvoid lh_stats_bio(const _LHASH *lh, BIO *out);\nvoid lh_node_stats_bio(const _LHASH *lh, BIO *out);\nvoid lh_node_usage_stats_bio(const _LHASH *lh, BIO *out);\n# endif\n\n/* Type checking... */\n\n# define LHASH_OF(type) struct lhash_st_##type\n\n# define DECLARE_LHASH_OF(type) LHASH_OF(type) { int dummy; }\n\n# define CHECKED_LHASH_OF(type,lh) \\\n  ((_LHASH *)CHECKED_PTR_OF(LHASH_OF(type),lh))\n\n/* Define wrapper functions. */\n# define LHM_lh_new(type, name) \\\n  ((LHASH_OF(type) *)lh_new(LHASH_HASH_FN(name), LHASH_COMP_FN(name)))\n# define LHM_lh_error(type, lh) \\\n  lh_error(CHECKED_LHASH_OF(type,lh))\n# define LHM_lh_insert(type, lh, inst) \\\n  ((type *)lh_insert(CHECKED_LHASH_OF(type, lh), \\\n                     CHECKED_PTR_OF(type, inst)))\n# define LHM_lh_retrieve(type, lh, inst) \\\n  ((type *)lh_retrieve(CHECKED_LHASH_OF(type, lh), \\\n                       CHECKED_PTR_OF(type, inst)))\n# define LHM_lh_delete(type, lh, inst) \\\n  ((type *)lh_delete(CHECKED_LHASH_OF(type, lh),                        \\\n                     CHECKED_PTR_OF(type, inst)))\n# define LHM_lh_doall(type, lh,fn) lh_doall(CHECKED_LHASH_OF(type, lh), fn)\n# define LHM_lh_doall_arg(type, lh, fn, arg_type, arg) \\\n  lh_doall_arg(CHECKED_LHASH_OF(type, lh), fn, CHECKED_PTR_OF(arg_type, arg))\n# define LHM_lh_num_items(type, lh) lh_num_items(CHECKED_LHASH_OF(type, lh))\n# define LHM_lh_down_load(type, lh) (CHECKED_LHASH_OF(type, lh)->down_load)\n# define LHM_lh_node_stats_bio(type, lh, out) \\\n  lh_node_stats_bio(CHECKED_LHASH_OF(type, lh), out)\n# define LHM_lh_node_usage_stats_bio(type, lh, out) \\\n  lh_node_usage_stats_bio(CHECKED_LHASH_OF(type, lh), out)\n# define LHM_lh_stats_bio(type, lh, out) \\\n  lh_stats_bio(CHECKED_LHASH_OF(type, lh), out)\n# define LHM_lh_free(type, lh) lh_free(CHECKED_LHASH_OF(type, lh))\n\nDECLARE_LHASH_OF(OPENSSL_STRING);\nDECLARE_LHASH_OF(OPENSSL_CSTRING);\n\n#ifdef  __cplusplus\n}\n#endif\n\n#endif\n"
  },
  {
    "path": "Pods/OpenSSL-Universal/include-ios/openssl/md4.h",
    "content": "/* crypto/md4/md4.h */\n/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)\n * All rights reserved.\n *\n * This package is an SSL implementation written\n * by Eric Young (eay@cryptsoft.com).\n * The implementation was written so as to conform with Netscapes SSL.\n *\n * This library is free for commercial and non-commercial use as long as\n * the following conditions are aheared to.  The following conditions\n * apply to all code found in this distribution, be it the RC4, RSA,\n * lhash, DES, etc., code; not just the SSL code.  The SSL documentation\n * included with this distribution is covered by the same copyright terms\n * except that the holder is Tim Hudson (tjh@cryptsoft.com).\n *\n * Copyright remains Eric Young's, and as such any Copyright notices in\n * the code are not to be removed.\n * If this package is used in a product, Eric Young should be given attribution\n * as the author of the parts of the library used.\n * This can be in the form of a textual message at program startup or\n * in documentation (online or textual) provided with the package.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n * 1. Redistributions of source code must retain the copyright\n *    notice, this list of conditions and the following disclaimer.\n * 2. Redistributions in binary form must reproduce the above copyright\n *    notice, this list of conditions and the following disclaimer in the\n *    documentation and/or other materials provided with the distribution.\n * 3. All advertising materials mentioning features or use of this software\n *    must display the following acknowledgement:\n *    \"This product includes cryptographic software written by\n *     Eric Young (eay@cryptsoft.com)\"\n *    The word 'cryptographic' can be left out if the rouines from the library\n *    being used are not cryptographic related :-).\n * 4. If you include any Windows specific code (or a derivative thereof) from\n *    the apps directory (application code) you must include an acknowledgement:\n *    \"This product includes software written by Tim Hudson (tjh@cryptsoft.com)\"\n *\n * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND\n * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE\n * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n * SUCH DAMAGE.\n *\n * The licence and distribution terms for any publically available version or\n * derivative of this code cannot be changed.  i.e. this code cannot simply be\n * copied and put under another distribution licence\n * [including the GNU Public Licence.]\n */\n\n#ifndef HEADER_MD4_H\n# define HEADER_MD4_H\n\n# include <openssl/e_os2.h>\n# include <stddef.h>\n\n#ifdef  __cplusplus\nextern \"C\" {\n#endif\n\n# ifdef OPENSSL_NO_MD4\n#  error MD4 is disabled.\n# endif\n\n/*-\n * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n * ! MD4_LONG has to be at least 32 bits wide. If it's wider, then !\n * ! MD4_LONG_LOG2 has to be defined along.                        !\n * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n */\n\n# if defined(__LP32__)\n#  define MD4_LONG unsigned long\n# elif defined(OPENSSL_SYS_CRAY) || defined(__ILP64__)\n#  define MD4_LONG unsigned long\n#  define MD4_LONG_LOG2 3\n/*\n * _CRAY note. I could declare short, but I have no idea what impact\n * does it have on performance on none-T3E machines. I could declare\n * int, but at least on C90 sizeof(int) can be chosen at compile time.\n * So I've chosen long...\n *                                      <appro@fy.chalmers.se>\n */\n# else\n#  define MD4_LONG unsigned int\n# endif\n\n# define MD4_CBLOCK      64\n# define MD4_LBLOCK      (MD4_CBLOCK/4)\n# define MD4_DIGEST_LENGTH 16\n\ntypedef struct MD4state_st {\n    MD4_LONG A, B, C, D;\n    MD4_LONG Nl, Nh;\n    MD4_LONG data[MD4_LBLOCK];\n    unsigned int num;\n} MD4_CTX;\n\n# ifdef OPENSSL_FIPS\nint private_MD4_Init(MD4_CTX *c);\n# endif\nint MD4_Init(MD4_CTX *c);\nint MD4_Update(MD4_CTX *c, const void *data, size_t len);\nint MD4_Final(unsigned char *md, MD4_CTX *c);\nunsigned char *MD4(const unsigned char *d, size_t n, unsigned char *md);\nvoid MD4_Transform(MD4_CTX *c, const unsigned char *b);\n#ifdef  __cplusplus\n}\n#endif\n\n#endif\n"
  },
  {
    "path": "Pods/OpenSSL-Universal/include-ios/openssl/md5.h",
    "content": "/* crypto/md5/md5.h */\n/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)\n * All rights reserved.\n *\n * This package is an SSL implementation written\n * by Eric Young (eay@cryptsoft.com).\n * The implementation was written so as to conform with Netscapes SSL.\n *\n * This library is free for commercial and non-commercial use as long as\n * the following conditions are aheared to.  The following conditions\n * apply to all code found in this distribution, be it the RC4, RSA,\n * lhash, DES, etc., code; not just the SSL code.  The SSL documentation\n * included with this distribution is covered by the same copyright terms\n * except that the holder is Tim Hudson (tjh@cryptsoft.com).\n *\n * Copyright remains Eric Young's, and as such any Copyright notices in\n * the code are not to be removed.\n * If this package is used in a product, Eric Young should be given attribution\n * as the author of the parts of the library used.\n * This can be in the form of a textual message at program startup or\n * in documentation (online or textual) provided with the package.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n * 1. Redistributions of source code must retain the copyright\n *    notice, this list of conditions and the following disclaimer.\n * 2. Redistributions in binary form must reproduce the above copyright\n *    notice, this list of conditions and the following disclaimer in the\n *    documentation and/or other materials provided with the distribution.\n * 3. All advertising materials mentioning features or use of this software\n *    must display the following acknowledgement:\n *    \"This product includes cryptographic software written by\n *     Eric Young (eay@cryptsoft.com)\"\n *    The word 'cryptographic' can be left out if the rouines from the library\n *    being used are not cryptographic related :-).\n * 4. If you include any Windows specific code (or a derivative thereof) from\n *    the apps directory (application code) you must include an acknowledgement:\n *    \"This product includes software written by Tim Hudson (tjh@cryptsoft.com)\"\n *\n * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND\n * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE\n * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n * SUCH DAMAGE.\n *\n * The licence and distribution terms for any publically available version or\n * derivative of this code cannot be changed.  i.e. this code cannot simply be\n * copied and put under another distribution licence\n * [including the GNU Public Licence.]\n */\n\n#ifndef HEADER_MD5_H\n# define HEADER_MD5_H\n\n# include <openssl/e_os2.h>\n# include <stddef.h>\n\n#ifdef  __cplusplus\nextern \"C\" {\n#endif\n\n# ifdef OPENSSL_NO_MD5\n#  error MD5 is disabled.\n# endif\n\n/*\n * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n * ! MD5_LONG has to be at least 32 bits wide. If it's wider, then !\n * ! MD5_LONG_LOG2 has to be defined along.                        !\n * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n */\n\n# if defined(__LP32__)\n#  define MD5_LONG unsigned long\n# elif defined(OPENSSL_SYS_CRAY) || defined(__ILP64__)\n#  define MD5_LONG unsigned long\n#  define MD5_LONG_LOG2 3\n/*\n * _CRAY note. I could declare short, but I have no idea what impact\n * does it have on performance on none-T3E machines. I could declare\n * int, but at least on C90 sizeof(int) can be chosen at compile time.\n * So I've chosen long...\n *                                      <appro@fy.chalmers.se>\n */\n# else\n#  define MD5_LONG unsigned int\n# endif\n\n# define MD5_CBLOCK      64\n# define MD5_LBLOCK      (MD5_CBLOCK/4)\n# define MD5_DIGEST_LENGTH 16\n\ntypedef struct MD5state_st {\n    MD5_LONG A, B, C, D;\n    MD5_LONG Nl, Nh;\n    MD5_LONG data[MD5_LBLOCK];\n    unsigned int num;\n} MD5_CTX;\n\n# ifdef OPENSSL_FIPS\nint private_MD5_Init(MD5_CTX *c);\n# endif\nint MD5_Init(MD5_CTX *c);\nint MD5_Update(MD5_CTX *c, const void *data, size_t len);\nint MD5_Final(unsigned char *md, MD5_CTX *c);\nunsigned char *MD5(const unsigned char *d, size_t n, unsigned char *md);\nvoid MD5_Transform(MD5_CTX *c, const unsigned char *b);\n#ifdef  __cplusplus\n}\n#endif\n\n#endif\n"
  },
  {
    "path": "Pods/OpenSSL-Universal/include-ios/openssl/mdc2.h",
    "content": "/* crypto/mdc2/mdc2.h */\n/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)\n * All rights reserved.\n *\n * This package is an SSL implementation written\n * by Eric Young (eay@cryptsoft.com).\n * The implementation was written so as to conform with Netscapes SSL.\n *\n * This library is free for commercial and non-commercial use as long as\n * the following conditions are aheared to.  The following conditions\n * apply to all code found in this distribution, be it the RC4, RSA,\n * lhash, DES, etc., code; not just the SSL code.  The SSL documentation\n * included with this distribution is covered by the same copyright terms\n * except that the holder is Tim Hudson (tjh@cryptsoft.com).\n *\n * Copyright remains Eric Young's, and as such any Copyright notices in\n * the code are not to be removed.\n * If this package is used in a product, Eric Young should be given attribution\n * as the author of the parts of the library used.\n * This can be in the form of a textual message at program startup or\n * in documentation (online or textual) provided with the package.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n * 1. Redistributions of source code must retain the copyright\n *    notice, this list of conditions and the following disclaimer.\n * 2. Redistributions in binary form must reproduce the above copyright\n *    notice, this list of conditions and the following disclaimer in the\n *    documentation and/or other materials provided with the distribution.\n * 3. All advertising materials mentioning features or use of this software\n *    must display the following acknowledgement:\n *    \"This product includes cryptographic software written by\n *     Eric Young (eay@cryptsoft.com)\"\n *    The word 'cryptographic' can be left out if the rouines from the library\n *    being used are not cryptographic related :-).\n * 4. If you include any Windows specific code (or a derivative thereof) from\n *    the apps directory (application code) you must include an acknowledgement:\n *    \"This product includes software written by Tim Hudson (tjh@cryptsoft.com)\"\n *\n * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND\n * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE\n * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n * SUCH DAMAGE.\n *\n * The licence and distribution terms for any publically available version or\n * derivative of this code cannot be changed.  i.e. this code cannot simply be\n * copied and put under another distribution licence\n * [including the GNU Public Licence.]\n */\n\n#ifndef HEADER_MDC2_H\n# define HEADER_MDC2_H\n\n# include <openssl/des.h>\n\n#ifdef  __cplusplus\nextern \"C\" {\n#endif\n\n# ifdef OPENSSL_NO_MDC2\n#  error MDC2 is disabled.\n# endif\n\n# define MDC2_BLOCK              8\n# define MDC2_DIGEST_LENGTH      16\n\ntypedef struct mdc2_ctx_st {\n    unsigned int num;\n    unsigned char data[MDC2_BLOCK];\n    DES_cblock h, hh;\n    int pad_type;               /* either 1 or 2, default 1 */\n} MDC2_CTX;\n\n# ifdef OPENSSL_FIPS\nint private_MDC2_Init(MDC2_CTX *c);\n# endif\nint MDC2_Init(MDC2_CTX *c);\nint MDC2_Update(MDC2_CTX *c, const unsigned char *data, size_t len);\nint MDC2_Final(unsigned char *md, MDC2_CTX *c);\nunsigned char *MDC2(const unsigned char *d, size_t n, unsigned char *md);\n\n#ifdef  __cplusplus\n}\n#endif\n\n#endif\n"
  },
  {
    "path": "Pods/OpenSSL-Universal/include-ios/openssl/modes.h",
    "content": "/* ====================================================================\n * Copyright (c) 2008 The OpenSSL Project. All rights reserved.\n *\n * Rights for redistribution and usage in source and binary\n * forms are granted according to the OpenSSL license.\n */\n\n#include <stddef.h>\n\n#ifdef  __cplusplus\nextern \"C\" {\n#endif\ntypedef void (*block128_f) (const unsigned char in[16],\n                            unsigned char out[16], const void *key);\n\ntypedef void (*cbc128_f) (const unsigned char *in, unsigned char *out,\n                          size_t len, const void *key,\n                          unsigned char ivec[16], int enc);\n\ntypedef void (*ctr128_f) (const unsigned char *in, unsigned char *out,\n                          size_t blocks, const void *key,\n                          const unsigned char ivec[16]);\n\ntypedef void (*ccm128_f) (const unsigned char *in, unsigned char *out,\n                          size_t blocks, const void *key,\n                          const unsigned char ivec[16],\n                          unsigned char cmac[16]);\n\nvoid CRYPTO_cbc128_encrypt(const unsigned char *in, unsigned char *out,\n                           size_t len, const void *key,\n                           unsigned char ivec[16], block128_f block);\nvoid CRYPTO_cbc128_decrypt(const unsigned char *in, unsigned char *out,\n                           size_t len, const void *key,\n                           unsigned char ivec[16], block128_f block);\n\nvoid CRYPTO_ctr128_encrypt(const unsigned char *in, unsigned char *out,\n                           size_t len, const void *key,\n                           unsigned char ivec[16],\n                           unsigned char ecount_buf[16], unsigned int *num,\n                           block128_f block);\n\nvoid CRYPTO_ctr128_encrypt_ctr32(const unsigned char *in, unsigned char *out,\n                                 size_t len, const void *key,\n                                 unsigned char ivec[16],\n                                 unsigned char ecount_buf[16],\n                                 unsigned int *num, ctr128_f ctr);\n\nvoid CRYPTO_ofb128_encrypt(const unsigned char *in, unsigned char *out,\n                           size_t len, const void *key,\n                           unsigned char ivec[16], int *num,\n                           block128_f block);\n\nvoid CRYPTO_cfb128_encrypt(const unsigned char *in, unsigned char *out,\n                           size_t len, const void *key,\n                           unsigned char ivec[16], int *num,\n                           int enc, block128_f block);\nvoid CRYPTO_cfb128_8_encrypt(const unsigned char *in, unsigned char *out,\n                             size_t length, const void *key,\n                             unsigned char ivec[16], int *num,\n                             int enc, block128_f block);\nvoid CRYPTO_cfb128_1_encrypt(const unsigned char *in, unsigned char *out,\n                             size_t bits, const void *key,\n                             unsigned char ivec[16], int *num,\n                             int enc, block128_f block);\n\nsize_t CRYPTO_cts128_encrypt_block(const unsigned char *in,\n                                   unsigned char *out, size_t len,\n                                   const void *key, unsigned char ivec[16],\n                                   block128_f block);\nsize_t CRYPTO_cts128_encrypt(const unsigned char *in, unsigned char *out,\n                             size_t len, const void *key,\n                             unsigned char ivec[16], cbc128_f cbc);\nsize_t CRYPTO_cts128_decrypt_block(const unsigned char *in,\n                                   unsigned char *out, size_t len,\n                                   const void *key, unsigned char ivec[16],\n                                   block128_f block);\nsize_t CRYPTO_cts128_decrypt(const unsigned char *in, unsigned char *out,\n                             size_t len, const void *key,\n                             unsigned char ivec[16], cbc128_f cbc);\n\nsize_t CRYPTO_nistcts128_encrypt_block(const unsigned char *in,\n                                       unsigned char *out, size_t len,\n                                       const void *key,\n                                       unsigned char ivec[16],\n                                       block128_f block);\nsize_t CRYPTO_nistcts128_encrypt(const unsigned char *in, unsigned char *out,\n                                 size_t len, const void *key,\n                                 unsigned char ivec[16], cbc128_f cbc);\nsize_t CRYPTO_nistcts128_decrypt_block(const unsigned char *in,\n                                       unsigned char *out, size_t len,\n                                       const void *key,\n                                       unsigned char ivec[16],\n                                       block128_f block);\nsize_t CRYPTO_nistcts128_decrypt(const unsigned char *in, unsigned char *out,\n                                 size_t len, const void *key,\n                                 unsigned char ivec[16], cbc128_f cbc);\n\ntypedef struct gcm128_context GCM128_CONTEXT;\n\nGCM128_CONTEXT *CRYPTO_gcm128_new(void *key, block128_f block);\nvoid CRYPTO_gcm128_init(GCM128_CONTEXT *ctx, void *key, block128_f block);\nvoid CRYPTO_gcm128_setiv(GCM128_CONTEXT *ctx, const unsigned char *iv,\n                         size_t len);\nint CRYPTO_gcm128_aad(GCM128_CONTEXT *ctx, const unsigned char *aad,\n                      size_t len);\nint CRYPTO_gcm128_encrypt(GCM128_CONTEXT *ctx,\n                          const unsigned char *in, unsigned char *out,\n                          size_t len);\nint CRYPTO_gcm128_decrypt(GCM128_CONTEXT *ctx,\n                          const unsigned char *in, unsigned char *out,\n                          size_t len);\nint CRYPTO_gcm128_encrypt_ctr32(GCM128_CONTEXT *ctx,\n                                const unsigned char *in, unsigned char *out,\n                                size_t len, ctr128_f stream);\nint CRYPTO_gcm128_decrypt_ctr32(GCM128_CONTEXT *ctx,\n                                const unsigned char *in, unsigned char *out,\n                                size_t len, ctr128_f stream);\nint CRYPTO_gcm128_finish(GCM128_CONTEXT *ctx, const unsigned char *tag,\n                         size_t len);\nvoid CRYPTO_gcm128_tag(GCM128_CONTEXT *ctx, unsigned char *tag, size_t len);\nvoid CRYPTO_gcm128_release(GCM128_CONTEXT *ctx);\n\ntypedef struct ccm128_context CCM128_CONTEXT;\n\nvoid CRYPTO_ccm128_init(CCM128_CONTEXT *ctx,\n                        unsigned int M, unsigned int L, void *key,\n                        block128_f block);\nint CRYPTO_ccm128_setiv(CCM128_CONTEXT *ctx, const unsigned char *nonce,\n                        size_t nlen, size_t mlen);\nvoid CRYPTO_ccm128_aad(CCM128_CONTEXT *ctx, const unsigned char *aad,\n                       size_t alen);\nint CRYPTO_ccm128_encrypt(CCM128_CONTEXT *ctx, const unsigned char *inp,\n                          unsigned char *out, size_t len);\nint CRYPTO_ccm128_decrypt(CCM128_CONTEXT *ctx, const unsigned char *inp,\n                          unsigned char *out, size_t len);\nint CRYPTO_ccm128_encrypt_ccm64(CCM128_CONTEXT *ctx, const unsigned char *inp,\n                                unsigned char *out, size_t len,\n                                ccm128_f stream);\nint CRYPTO_ccm128_decrypt_ccm64(CCM128_CONTEXT *ctx, const unsigned char *inp,\n                                unsigned char *out, size_t len,\n                                ccm128_f stream);\nsize_t CRYPTO_ccm128_tag(CCM128_CONTEXT *ctx, unsigned char *tag, size_t len);\n\ntypedef struct xts128_context XTS128_CONTEXT;\n\nint CRYPTO_xts128_encrypt(const XTS128_CONTEXT *ctx,\n                          const unsigned char iv[16],\n                          const unsigned char *inp, unsigned char *out,\n                          size_t len, int enc);\n\n#ifdef  __cplusplus\n}\n#endif\n"
  },
  {
    "path": "Pods/OpenSSL-Universal/include-ios/openssl/obj_mac.h",
    "content": "/* crypto/objects/obj_mac.h */\n\n/*\n * THIS FILE IS GENERATED FROM objects.txt by objects.pl via the following\n * command: perl objects.pl objects.txt obj_mac.num obj_mac.h\n */\n\n/* Copyright (C) 1995-1997 Eric Young (eay@cryptsoft.com)\n * All rights reserved.\n *\n * This package is an SSL implementation written\n * by Eric Young (eay@cryptsoft.com).\n * The implementation was written so as to conform with Netscapes SSL.\n *\n * This library is free for commercial and non-commercial use as long as\n * the following conditions are aheared to.  The following conditions\n * apply to all code found in this distribution, be it the RC4, RSA,\n * lhash, DES, etc., code; not just the SSL code.  The SSL documentation\n * included with this distribution is covered by the same copyright terms\n * except that the holder is Tim Hudson (tjh@cryptsoft.com).\n *\n * Copyright remains Eric Young's, and as such any Copyright notices in\n * the code are not to be removed.\n * If this package is used in a product, Eric Young should be given attribution\n * as the author of the parts of the library used.\n * This can be in the form of a textual message at program startup or\n * in documentation (online or textual) provided with the package.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n * 1. Redistributions of source code must retain the copyright\n *    notice, this list of conditions and the following disclaimer.\n * 2. Redistributions in binary form must reproduce the above copyright\n *    notice, this list of conditions and the following disclaimer in the\n *    documentation and/or other materials provided with the distribution.\n * 3. All advertising materials mentioning features or use of this software\n *    must display the following acknowledgement:\n *    \"This product includes cryptographic software written by\n *     Eric Young (eay@cryptsoft.com)\"\n *    The word 'cryptographic' can be left out if the rouines from the library\n *    being used are not cryptographic related :-).\n * 4. If you include any Windows specific code (or a derivative thereof) from\n *    the apps directory (application code) you must include an acknowledgement:\n *    \"This product includes software written by Tim Hudson (tjh@cryptsoft.com)\"\n *\n * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND\n * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE\n * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n * SUCH DAMAGE.\n *\n * The licence and distribution terms for any publically available version or\n * derivative of this code cannot be changed.  i.e. this code cannot simply be\n * copied and put under another distribution licence\n * [including the GNU Public Licence.]\n */\n\n#define SN_undef                        \"UNDEF\"\n#define LN_undef                        \"undefined\"\n#define NID_undef                       0\n#define OBJ_undef                       0L\n\n#define SN_itu_t                \"ITU-T\"\n#define LN_itu_t                \"itu-t\"\n#define NID_itu_t               645\n#define OBJ_itu_t               0L\n\n#define NID_ccitt               404\n#define OBJ_ccitt               OBJ_itu_t\n\n#define SN_iso          \"ISO\"\n#define LN_iso          \"iso\"\n#define NID_iso         181\n#define OBJ_iso         1L\n\n#define SN_joint_iso_itu_t              \"JOINT-ISO-ITU-T\"\n#define LN_joint_iso_itu_t              \"joint-iso-itu-t\"\n#define NID_joint_iso_itu_t             646\n#define OBJ_joint_iso_itu_t             2L\n\n#define NID_joint_iso_ccitt             393\n#define OBJ_joint_iso_ccitt             OBJ_joint_iso_itu_t\n\n#define SN_member_body          \"member-body\"\n#define LN_member_body          \"ISO Member Body\"\n#define NID_member_body         182\n#define OBJ_member_body         OBJ_iso,2L\n\n#define SN_identified_organization              \"identified-organization\"\n#define NID_identified_organization             676\n#define OBJ_identified_organization             OBJ_iso,3L\n\n#define SN_hmac_md5             \"HMAC-MD5\"\n#define LN_hmac_md5             \"hmac-md5\"\n#define NID_hmac_md5            780\n#define OBJ_hmac_md5            OBJ_identified_organization,6L,1L,5L,5L,8L,1L,1L\n\n#define SN_hmac_sha1            \"HMAC-SHA1\"\n#define LN_hmac_sha1            \"hmac-sha1\"\n#define NID_hmac_sha1           781\n#define OBJ_hmac_sha1           OBJ_identified_organization,6L,1L,5L,5L,8L,1L,2L\n\n#define SN_certicom_arc         \"certicom-arc\"\n#define NID_certicom_arc                677\n#define OBJ_certicom_arc                OBJ_identified_organization,132L\n\n#define SN_international_organizations          \"international-organizations\"\n#define LN_international_organizations          \"International Organizations\"\n#define NID_international_organizations         647\n#define OBJ_international_organizations         OBJ_joint_iso_itu_t,23L\n\n#define SN_wap          \"wap\"\n#define NID_wap         678\n#define OBJ_wap         OBJ_international_organizations,43L\n\n#define SN_wap_wsg              \"wap-wsg\"\n#define NID_wap_wsg             679\n#define OBJ_wap_wsg             OBJ_wap,1L\n\n#define SN_selected_attribute_types             \"selected-attribute-types\"\n#define LN_selected_attribute_types             \"Selected Attribute Types\"\n#define NID_selected_attribute_types            394\n#define OBJ_selected_attribute_types            OBJ_joint_iso_itu_t,5L,1L,5L\n\n#define SN_clearance            \"clearance\"\n#define NID_clearance           395\n#define OBJ_clearance           OBJ_selected_attribute_types,55L\n\n#define SN_ISO_US               \"ISO-US\"\n#define LN_ISO_US               \"ISO US Member Body\"\n#define NID_ISO_US              183\n#define OBJ_ISO_US              OBJ_member_body,840L\n\n#define SN_X9_57                \"X9-57\"\n#define LN_X9_57                \"X9.57\"\n#define NID_X9_57               184\n#define OBJ_X9_57               OBJ_ISO_US,10040L\n\n#define SN_X9cm         \"X9cm\"\n#define LN_X9cm         \"X9.57 CM ?\"\n#define NID_X9cm                185\n#define OBJ_X9cm                OBJ_X9_57,4L\n\n#define SN_dsa          \"DSA\"\n#define LN_dsa          \"dsaEncryption\"\n#define NID_dsa         116\n#define OBJ_dsa         OBJ_X9cm,1L\n\n#define SN_dsaWithSHA1          \"DSA-SHA1\"\n#define LN_dsaWithSHA1          \"dsaWithSHA1\"\n#define NID_dsaWithSHA1         113\n#define OBJ_dsaWithSHA1         OBJ_X9cm,3L\n\n#define SN_ansi_X9_62           \"ansi-X9-62\"\n#define LN_ansi_X9_62           \"ANSI X9.62\"\n#define NID_ansi_X9_62          405\n#define OBJ_ansi_X9_62          OBJ_ISO_US,10045L\n\n#define OBJ_X9_62_id_fieldType          OBJ_ansi_X9_62,1L\n\n#define SN_X9_62_prime_field            \"prime-field\"\n#define NID_X9_62_prime_field           406\n#define OBJ_X9_62_prime_field           OBJ_X9_62_id_fieldType,1L\n\n#define SN_X9_62_characteristic_two_field               \"characteristic-two-field\"\n#define NID_X9_62_characteristic_two_field              407\n#define OBJ_X9_62_characteristic_two_field              OBJ_X9_62_id_fieldType,2L\n\n#define SN_X9_62_id_characteristic_two_basis            \"id-characteristic-two-basis\"\n#define NID_X9_62_id_characteristic_two_basis           680\n#define OBJ_X9_62_id_characteristic_two_basis           OBJ_X9_62_characteristic_two_field,3L\n\n#define SN_X9_62_onBasis                \"onBasis\"\n#define NID_X9_62_onBasis               681\n#define OBJ_X9_62_onBasis               OBJ_X9_62_id_characteristic_two_basis,1L\n\n#define SN_X9_62_tpBasis                \"tpBasis\"\n#define NID_X9_62_tpBasis               682\n#define OBJ_X9_62_tpBasis               OBJ_X9_62_id_characteristic_two_basis,2L\n\n#define SN_X9_62_ppBasis                \"ppBasis\"\n#define NID_X9_62_ppBasis               683\n#define OBJ_X9_62_ppBasis               OBJ_X9_62_id_characteristic_two_basis,3L\n\n#define OBJ_X9_62_id_publicKeyType              OBJ_ansi_X9_62,2L\n\n#define SN_X9_62_id_ecPublicKey         \"id-ecPublicKey\"\n#define NID_X9_62_id_ecPublicKey                408\n#define OBJ_X9_62_id_ecPublicKey                OBJ_X9_62_id_publicKeyType,1L\n\n#define OBJ_X9_62_ellipticCurve         OBJ_ansi_X9_62,3L\n\n#define OBJ_X9_62_c_TwoCurve            OBJ_X9_62_ellipticCurve,0L\n\n#define SN_X9_62_c2pnb163v1             \"c2pnb163v1\"\n#define NID_X9_62_c2pnb163v1            684\n#define OBJ_X9_62_c2pnb163v1            OBJ_X9_62_c_TwoCurve,1L\n\n#define SN_X9_62_c2pnb163v2             \"c2pnb163v2\"\n#define NID_X9_62_c2pnb163v2            685\n#define OBJ_X9_62_c2pnb163v2            OBJ_X9_62_c_TwoCurve,2L\n\n#define SN_X9_62_c2pnb163v3             \"c2pnb163v3\"\n#define NID_X9_62_c2pnb163v3            686\n#define OBJ_X9_62_c2pnb163v3            OBJ_X9_62_c_TwoCurve,3L\n\n#define SN_X9_62_c2pnb176v1             \"c2pnb176v1\"\n#define NID_X9_62_c2pnb176v1            687\n#define OBJ_X9_62_c2pnb176v1            OBJ_X9_62_c_TwoCurve,4L\n\n#define SN_X9_62_c2tnb191v1             \"c2tnb191v1\"\n#define NID_X9_62_c2tnb191v1            688\n#define OBJ_X9_62_c2tnb191v1            OBJ_X9_62_c_TwoCurve,5L\n\n#define SN_X9_62_c2tnb191v2             \"c2tnb191v2\"\n#define NID_X9_62_c2tnb191v2            689\n#define OBJ_X9_62_c2tnb191v2            OBJ_X9_62_c_TwoCurve,6L\n\n#define SN_X9_62_c2tnb191v3             \"c2tnb191v3\"\n#define NID_X9_62_c2tnb191v3            690\n#define OBJ_X9_62_c2tnb191v3            OBJ_X9_62_c_TwoCurve,7L\n\n#define SN_X9_62_c2onb191v4             \"c2onb191v4\"\n#define NID_X9_62_c2onb191v4            691\n#define OBJ_X9_62_c2onb191v4            OBJ_X9_62_c_TwoCurve,8L\n\n#define SN_X9_62_c2onb191v5             \"c2onb191v5\"\n#define NID_X9_62_c2onb191v5            692\n#define OBJ_X9_62_c2onb191v5            OBJ_X9_62_c_TwoCurve,9L\n\n#define SN_X9_62_c2pnb208w1             \"c2pnb208w1\"\n#define NID_X9_62_c2pnb208w1            693\n#define OBJ_X9_62_c2pnb208w1            OBJ_X9_62_c_TwoCurve,10L\n\n#define SN_X9_62_c2tnb239v1             \"c2tnb239v1\"\n#define NID_X9_62_c2tnb239v1            694\n#define OBJ_X9_62_c2tnb239v1            OBJ_X9_62_c_TwoCurve,11L\n\n#define SN_X9_62_c2tnb239v2             \"c2tnb239v2\"\n#define NID_X9_62_c2tnb239v2            695\n#define OBJ_X9_62_c2tnb239v2            OBJ_X9_62_c_TwoCurve,12L\n\n#define SN_X9_62_c2tnb239v3             \"c2tnb239v3\"\n#define NID_X9_62_c2tnb239v3            696\n#define OBJ_X9_62_c2tnb239v3            OBJ_X9_62_c_TwoCurve,13L\n\n#define SN_X9_62_c2onb239v4             \"c2onb239v4\"\n#define NID_X9_62_c2onb239v4            697\n#define OBJ_X9_62_c2onb239v4            OBJ_X9_62_c_TwoCurve,14L\n\n#define SN_X9_62_c2onb239v5             \"c2onb239v5\"\n#define NID_X9_62_c2onb239v5            698\n#define OBJ_X9_62_c2onb239v5            OBJ_X9_62_c_TwoCurve,15L\n\n#define SN_X9_62_c2pnb272w1             \"c2pnb272w1\"\n#define NID_X9_62_c2pnb272w1            699\n#define OBJ_X9_62_c2pnb272w1            OBJ_X9_62_c_TwoCurve,16L\n\n#define SN_X9_62_c2pnb304w1             \"c2pnb304w1\"\n#define NID_X9_62_c2pnb304w1            700\n#define OBJ_X9_62_c2pnb304w1            OBJ_X9_62_c_TwoCurve,17L\n\n#define SN_X9_62_c2tnb359v1             \"c2tnb359v1\"\n#define NID_X9_62_c2tnb359v1            701\n#define OBJ_X9_62_c2tnb359v1            OBJ_X9_62_c_TwoCurve,18L\n\n#define SN_X9_62_c2pnb368w1             \"c2pnb368w1\"\n#define NID_X9_62_c2pnb368w1            702\n#define OBJ_X9_62_c2pnb368w1            OBJ_X9_62_c_TwoCurve,19L\n\n#define SN_X9_62_c2tnb431r1             \"c2tnb431r1\"\n#define NID_X9_62_c2tnb431r1            703\n#define OBJ_X9_62_c2tnb431r1            OBJ_X9_62_c_TwoCurve,20L\n\n#define OBJ_X9_62_primeCurve            OBJ_X9_62_ellipticCurve,1L\n\n#define SN_X9_62_prime192v1             \"prime192v1\"\n#define NID_X9_62_prime192v1            409\n#define OBJ_X9_62_prime192v1            OBJ_X9_62_primeCurve,1L\n\n#define SN_X9_62_prime192v2             \"prime192v2\"\n#define NID_X9_62_prime192v2            410\n#define OBJ_X9_62_prime192v2            OBJ_X9_62_primeCurve,2L\n\n#define SN_X9_62_prime192v3             \"prime192v3\"\n#define NID_X9_62_prime192v3            411\n#define OBJ_X9_62_prime192v3            OBJ_X9_62_primeCurve,3L\n\n#define SN_X9_62_prime239v1             \"prime239v1\"\n#define NID_X9_62_prime239v1            412\n#define OBJ_X9_62_prime239v1            OBJ_X9_62_primeCurve,4L\n\n#define SN_X9_62_prime239v2             \"prime239v2\"\n#define NID_X9_62_prime239v2            413\n#define OBJ_X9_62_prime239v2            OBJ_X9_62_primeCurve,5L\n\n#define SN_X9_62_prime239v3             \"prime239v3\"\n#define NID_X9_62_prime239v3            414\n#define OBJ_X9_62_prime239v3            OBJ_X9_62_primeCurve,6L\n\n#define SN_X9_62_prime256v1             \"prime256v1\"\n#define NID_X9_62_prime256v1            415\n#define OBJ_X9_62_prime256v1            OBJ_X9_62_primeCurve,7L\n\n#define OBJ_X9_62_id_ecSigType          OBJ_ansi_X9_62,4L\n\n#define SN_ecdsa_with_SHA1              \"ecdsa-with-SHA1\"\n#define NID_ecdsa_with_SHA1             416\n#define OBJ_ecdsa_with_SHA1             OBJ_X9_62_id_ecSigType,1L\n\n#define SN_ecdsa_with_Recommended               \"ecdsa-with-Recommended\"\n#define NID_ecdsa_with_Recommended              791\n#define OBJ_ecdsa_with_Recommended              OBJ_X9_62_id_ecSigType,2L\n\n#define SN_ecdsa_with_Specified         \"ecdsa-with-Specified\"\n#define NID_ecdsa_with_Specified                792\n#define OBJ_ecdsa_with_Specified                OBJ_X9_62_id_ecSigType,3L\n\n#define SN_ecdsa_with_SHA224            \"ecdsa-with-SHA224\"\n#define NID_ecdsa_with_SHA224           793\n#define OBJ_ecdsa_with_SHA224           OBJ_ecdsa_with_Specified,1L\n\n#define SN_ecdsa_with_SHA256            \"ecdsa-with-SHA256\"\n#define NID_ecdsa_with_SHA256           794\n#define OBJ_ecdsa_with_SHA256           OBJ_ecdsa_with_Specified,2L\n\n#define SN_ecdsa_with_SHA384            \"ecdsa-with-SHA384\"\n#define NID_ecdsa_with_SHA384           795\n#define OBJ_ecdsa_with_SHA384           OBJ_ecdsa_with_Specified,3L\n\n#define SN_ecdsa_with_SHA512            \"ecdsa-with-SHA512\"\n#define NID_ecdsa_with_SHA512           796\n#define OBJ_ecdsa_with_SHA512           OBJ_ecdsa_with_Specified,4L\n\n#define OBJ_secg_ellipticCurve          OBJ_certicom_arc,0L\n\n#define SN_secp112r1            \"secp112r1\"\n#define NID_secp112r1           704\n#define OBJ_secp112r1           OBJ_secg_ellipticCurve,6L\n\n#define SN_secp112r2            \"secp112r2\"\n#define NID_secp112r2           705\n#define OBJ_secp112r2           OBJ_secg_ellipticCurve,7L\n\n#define SN_secp128r1            \"secp128r1\"\n#define NID_secp128r1           706\n#define OBJ_secp128r1           OBJ_secg_ellipticCurve,28L\n\n#define SN_secp128r2            \"secp128r2\"\n#define NID_secp128r2           707\n#define OBJ_secp128r2           OBJ_secg_ellipticCurve,29L\n\n#define SN_secp160k1            \"secp160k1\"\n#define NID_secp160k1           708\n#define OBJ_secp160k1           OBJ_secg_ellipticCurve,9L\n\n#define SN_secp160r1            \"secp160r1\"\n#define NID_secp160r1           709\n#define OBJ_secp160r1           OBJ_secg_ellipticCurve,8L\n\n#define SN_secp160r2            \"secp160r2\"\n#define NID_secp160r2           710\n#define OBJ_secp160r2           OBJ_secg_ellipticCurve,30L\n\n#define SN_secp192k1            \"secp192k1\"\n#define NID_secp192k1           711\n#define OBJ_secp192k1           OBJ_secg_ellipticCurve,31L\n\n#define SN_secp224k1            \"secp224k1\"\n#define NID_secp224k1           712\n#define OBJ_secp224k1           OBJ_secg_ellipticCurve,32L\n\n#define SN_secp224r1            \"secp224r1\"\n#define NID_secp224r1           713\n#define OBJ_secp224r1           OBJ_secg_ellipticCurve,33L\n\n#define SN_secp256k1            \"secp256k1\"\n#define NID_secp256k1           714\n#define OBJ_secp256k1           OBJ_secg_ellipticCurve,10L\n\n#define SN_secp384r1            \"secp384r1\"\n#define NID_secp384r1           715\n#define OBJ_secp384r1           OBJ_secg_ellipticCurve,34L\n\n#define SN_secp521r1            \"secp521r1\"\n#define NID_secp521r1           716\n#define OBJ_secp521r1           OBJ_secg_ellipticCurve,35L\n\n#define SN_sect113r1            \"sect113r1\"\n#define NID_sect113r1           717\n#define OBJ_sect113r1           OBJ_secg_ellipticCurve,4L\n\n#define SN_sect113r2            \"sect113r2\"\n#define NID_sect113r2           718\n#define OBJ_sect113r2           OBJ_secg_ellipticCurve,5L\n\n#define SN_sect131r1            \"sect131r1\"\n#define NID_sect131r1           719\n#define OBJ_sect131r1           OBJ_secg_ellipticCurve,22L\n\n#define SN_sect131r2            \"sect131r2\"\n#define NID_sect131r2           720\n#define OBJ_sect131r2           OBJ_secg_ellipticCurve,23L\n\n#define SN_sect163k1            \"sect163k1\"\n#define NID_sect163k1           721\n#define OBJ_sect163k1           OBJ_secg_ellipticCurve,1L\n\n#define SN_sect163r1            \"sect163r1\"\n#define NID_sect163r1           722\n#define OBJ_sect163r1           OBJ_secg_ellipticCurve,2L\n\n#define SN_sect163r2            \"sect163r2\"\n#define NID_sect163r2           723\n#define OBJ_sect163r2           OBJ_secg_ellipticCurve,15L\n\n#define SN_sect193r1            \"sect193r1\"\n#define NID_sect193r1           724\n#define OBJ_sect193r1           OBJ_secg_ellipticCurve,24L\n\n#define SN_sect193r2            \"sect193r2\"\n#define NID_sect193r2           725\n#define OBJ_sect193r2           OBJ_secg_ellipticCurve,25L\n\n#define SN_sect233k1            \"sect233k1\"\n#define NID_sect233k1           726\n#define OBJ_sect233k1           OBJ_secg_ellipticCurve,26L\n\n#define SN_sect233r1            \"sect233r1\"\n#define NID_sect233r1           727\n#define OBJ_sect233r1           OBJ_secg_ellipticCurve,27L\n\n#define SN_sect239k1            \"sect239k1\"\n#define NID_sect239k1           728\n#define OBJ_sect239k1           OBJ_secg_ellipticCurve,3L\n\n#define SN_sect283k1            \"sect283k1\"\n#define NID_sect283k1           729\n#define OBJ_sect283k1           OBJ_secg_ellipticCurve,16L\n\n#define SN_sect283r1            \"sect283r1\"\n#define NID_sect283r1           730\n#define OBJ_sect283r1           OBJ_secg_ellipticCurve,17L\n\n#define SN_sect409k1            \"sect409k1\"\n#define NID_sect409k1           731\n#define OBJ_sect409k1           OBJ_secg_ellipticCurve,36L\n\n#define SN_sect409r1            \"sect409r1\"\n#define NID_sect409r1           732\n#define OBJ_sect409r1           OBJ_secg_ellipticCurve,37L\n\n#define SN_sect571k1            \"sect571k1\"\n#define NID_sect571k1           733\n#define OBJ_sect571k1           OBJ_secg_ellipticCurve,38L\n\n#define SN_sect571r1            \"sect571r1\"\n#define NID_sect571r1           734\n#define OBJ_sect571r1           OBJ_secg_ellipticCurve,39L\n\n#define OBJ_wap_wsg_idm_ecid            OBJ_wap_wsg,4L\n\n#define SN_wap_wsg_idm_ecid_wtls1               \"wap-wsg-idm-ecid-wtls1\"\n#define NID_wap_wsg_idm_ecid_wtls1              735\n#define OBJ_wap_wsg_idm_ecid_wtls1              OBJ_wap_wsg_idm_ecid,1L\n\n#define SN_wap_wsg_idm_ecid_wtls3               \"wap-wsg-idm-ecid-wtls3\"\n#define NID_wap_wsg_idm_ecid_wtls3              736\n#define OBJ_wap_wsg_idm_ecid_wtls3              OBJ_wap_wsg_idm_ecid,3L\n\n#define SN_wap_wsg_idm_ecid_wtls4               \"wap-wsg-idm-ecid-wtls4\"\n#define NID_wap_wsg_idm_ecid_wtls4              737\n#define OBJ_wap_wsg_idm_ecid_wtls4              OBJ_wap_wsg_idm_ecid,4L\n\n#define SN_wap_wsg_idm_ecid_wtls5               \"wap-wsg-idm-ecid-wtls5\"\n#define NID_wap_wsg_idm_ecid_wtls5              738\n#define OBJ_wap_wsg_idm_ecid_wtls5              OBJ_wap_wsg_idm_ecid,5L\n\n#define SN_wap_wsg_idm_ecid_wtls6               \"wap-wsg-idm-ecid-wtls6\"\n#define NID_wap_wsg_idm_ecid_wtls6              739\n#define OBJ_wap_wsg_idm_ecid_wtls6              OBJ_wap_wsg_idm_ecid,6L\n\n#define SN_wap_wsg_idm_ecid_wtls7               \"wap-wsg-idm-ecid-wtls7\"\n#define NID_wap_wsg_idm_ecid_wtls7              740\n#define OBJ_wap_wsg_idm_ecid_wtls7              OBJ_wap_wsg_idm_ecid,7L\n\n#define SN_wap_wsg_idm_ecid_wtls8               \"wap-wsg-idm-ecid-wtls8\"\n#define NID_wap_wsg_idm_ecid_wtls8              741\n#define OBJ_wap_wsg_idm_ecid_wtls8              OBJ_wap_wsg_idm_ecid,8L\n\n#define SN_wap_wsg_idm_ecid_wtls9               \"wap-wsg-idm-ecid-wtls9\"\n#define NID_wap_wsg_idm_ecid_wtls9              742\n#define OBJ_wap_wsg_idm_ecid_wtls9              OBJ_wap_wsg_idm_ecid,9L\n\n#define SN_wap_wsg_idm_ecid_wtls10              \"wap-wsg-idm-ecid-wtls10\"\n#define NID_wap_wsg_idm_ecid_wtls10             743\n#define OBJ_wap_wsg_idm_ecid_wtls10             OBJ_wap_wsg_idm_ecid,10L\n\n#define SN_wap_wsg_idm_ecid_wtls11              \"wap-wsg-idm-ecid-wtls11\"\n#define NID_wap_wsg_idm_ecid_wtls11             744\n#define OBJ_wap_wsg_idm_ecid_wtls11             OBJ_wap_wsg_idm_ecid,11L\n\n#define SN_wap_wsg_idm_ecid_wtls12              \"wap-wsg-idm-ecid-wtls12\"\n#define NID_wap_wsg_idm_ecid_wtls12             745\n#define OBJ_wap_wsg_idm_ecid_wtls12             OBJ_wap_wsg_idm_ecid,12L\n\n#define SN_cast5_cbc            \"CAST5-CBC\"\n#define LN_cast5_cbc            \"cast5-cbc\"\n#define NID_cast5_cbc           108\n#define OBJ_cast5_cbc           OBJ_ISO_US,113533L,7L,66L,10L\n\n#define SN_cast5_ecb            \"CAST5-ECB\"\n#define LN_cast5_ecb            \"cast5-ecb\"\n#define NID_cast5_ecb           109\n\n#define SN_cast5_cfb64          \"CAST5-CFB\"\n#define LN_cast5_cfb64          \"cast5-cfb\"\n#define NID_cast5_cfb64         110\n\n#define SN_cast5_ofb64          \"CAST5-OFB\"\n#define LN_cast5_ofb64          \"cast5-ofb\"\n#define NID_cast5_ofb64         111\n\n#define LN_pbeWithMD5AndCast5_CBC               \"pbeWithMD5AndCast5CBC\"\n#define NID_pbeWithMD5AndCast5_CBC              112\n#define OBJ_pbeWithMD5AndCast5_CBC              OBJ_ISO_US,113533L,7L,66L,12L\n\n#define SN_id_PasswordBasedMAC          \"id-PasswordBasedMAC\"\n#define LN_id_PasswordBasedMAC          \"password based MAC\"\n#define NID_id_PasswordBasedMAC         782\n#define OBJ_id_PasswordBasedMAC         OBJ_ISO_US,113533L,7L,66L,13L\n\n#define SN_id_DHBasedMac                \"id-DHBasedMac\"\n#define LN_id_DHBasedMac                \"Diffie-Hellman based MAC\"\n#define NID_id_DHBasedMac               783\n#define OBJ_id_DHBasedMac               OBJ_ISO_US,113533L,7L,66L,30L\n\n#define SN_rsadsi               \"rsadsi\"\n#define LN_rsadsi               \"RSA Data Security, Inc.\"\n#define NID_rsadsi              1\n#define OBJ_rsadsi              OBJ_ISO_US,113549L\n\n#define SN_pkcs         \"pkcs\"\n#define LN_pkcs         \"RSA Data Security, Inc. PKCS\"\n#define NID_pkcs                2\n#define OBJ_pkcs                OBJ_rsadsi,1L\n\n#define SN_pkcs1                \"pkcs1\"\n#define NID_pkcs1               186\n#define OBJ_pkcs1               OBJ_pkcs,1L\n\n#define LN_rsaEncryption                \"rsaEncryption\"\n#define NID_rsaEncryption               6\n#define OBJ_rsaEncryption               OBJ_pkcs1,1L\n\n#define SN_md2WithRSAEncryption         \"RSA-MD2\"\n#define LN_md2WithRSAEncryption         \"md2WithRSAEncryption\"\n#define NID_md2WithRSAEncryption                7\n#define OBJ_md2WithRSAEncryption                OBJ_pkcs1,2L\n\n#define SN_md4WithRSAEncryption         \"RSA-MD4\"\n#define LN_md4WithRSAEncryption         \"md4WithRSAEncryption\"\n#define NID_md4WithRSAEncryption                396\n#define OBJ_md4WithRSAEncryption                OBJ_pkcs1,3L\n\n#define SN_md5WithRSAEncryption         \"RSA-MD5\"\n#define LN_md5WithRSAEncryption         \"md5WithRSAEncryption\"\n#define NID_md5WithRSAEncryption                8\n#define OBJ_md5WithRSAEncryption                OBJ_pkcs1,4L\n\n#define SN_sha1WithRSAEncryption                \"RSA-SHA1\"\n#define LN_sha1WithRSAEncryption                \"sha1WithRSAEncryption\"\n#define NID_sha1WithRSAEncryption               65\n#define OBJ_sha1WithRSAEncryption               OBJ_pkcs1,5L\n\n#define SN_rsaesOaep            \"RSAES-OAEP\"\n#define LN_rsaesOaep            \"rsaesOaep\"\n#define NID_rsaesOaep           919\n#define OBJ_rsaesOaep           OBJ_pkcs1,7L\n\n#define SN_mgf1         \"MGF1\"\n#define LN_mgf1         \"mgf1\"\n#define NID_mgf1                911\n#define OBJ_mgf1                OBJ_pkcs1,8L\n\n#define SN_rsassaPss            \"RSASSA-PSS\"\n#define LN_rsassaPss            \"rsassaPss\"\n#define NID_rsassaPss           912\n#define OBJ_rsassaPss           OBJ_pkcs1,10L\n\n#define SN_sha256WithRSAEncryption              \"RSA-SHA256\"\n#define LN_sha256WithRSAEncryption              \"sha256WithRSAEncryption\"\n#define NID_sha256WithRSAEncryption             668\n#define OBJ_sha256WithRSAEncryption             OBJ_pkcs1,11L\n\n#define SN_sha384WithRSAEncryption              \"RSA-SHA384\"\n#define LN_sha384WithRSAEncryption              \"sha384WithRSAEncryption\"\n#define NID_sha384WithRSAEncryption             669\n#define OBJ_sha384WithRSAEncryption             OBJ_pkcs1,12L\n\n#define SN_sha512WithRSAEncryption              \"RSA-SHA512\"\n#define LN_sha512WithRSAEncryption              \"sha512WithRSAEncryption\"\n#define NID_sha512WithRSAEncryption             670\n#define OBJ_sha512WithRSAEncryption             OBJ_pkcs1,13L\n\n#define SN_sha224WithRSAEncryption              \"RSA-SHA224\"\n#define LN_sha224WithRSAEncryption              \"sha224WithRSAEncryption\"\n#define NID_sha224WithRSAEncryption             671\n#define OBJ_sha224WithRSAEncryption             OBJ_pkcs1,14L\n\n#define SN_pkcs3                \"pkcs3\"\n#define NID_pkcs3               27\n#define OBJ_pkcs3               OBJ_pkcs,3L\n\n#define LN_dhKeyAgreement               \"dhKeyAgreement\"\n#define NID_dhKeyAgreement              28\n#define OBJ_dhKeyAgreement              OBJ_pkcs3,1L\n\n#define SN_pkcs5                \"pkcs5\"\n#define NID_pkcs5               187\n#define OBJ_pkcs5               OBJ_pkcs,5L\n\n#define SN_pbeWithMD2AndDES_CBC         \"PBE-MD2-DES\"\n#define LN_pbeWithMD2AndDES_CBC         \"pbeWithMD2AndDES-CBC\"\n#define NID_pbeWithMD2AndDES_CBC                9\n#define OBJ_pbeWithMD2AndDES_CBC                OBJ_pkcs5,1L\n\n#define SN_pbeWithMD5AndDES_CBC         \"PBE-MD5-DES\"\n#define LN_pbeWithMD5AndDES_CBC         \"pbeWithMD5AndDES-CBC\"\n#define NID_pbeWithMD5AndDES_CBC                10\n#define OBJ_pbeWithMD5AndDES_CBC                OBJ_pkcs5,3L\n\n#define SN_pbeWithMD2AndRC2_CBC         \"PBE-MD2-RC2-64\"\n#define LN_pbeWithMD2AndRC2_CBC         \"pbeWithMD2AndRC2-CBC\"\n#define NID_pbeWithMD2AndRC2_CBC                168\n#define OBJ_pbeWithMD2AndRC2_CBC                OBJ_pkcs5,4L\n\n#define SN_pbeWithMD5AndRC2_CBC         \"PBE-MD5-RC2-64\"\n#define LN_pbeWithMD5AndRC2_CBC         \"pbeWithMD5AndRC2-CBC\"\n#define NID_pbeWithMD5AndRC2_CBC                169\n#define OBJ_pbeWithMD5AndRC2_CBC                OBJ_pkcs5,6L\n\n#define SN_pbeWithSHA1AndDES_CBC                \"PBE-SHA1-DES\"\n#define LN_pbeWithSHA1AndDES_CBC                \"pbeWithSHA1AndDES-CBC\"\n#define NID_pbeWithSHA1AndDES_CBC               170\n#define OBJ_pbeWithSHA1AndDES_CBC               OBJ_pkcs5,10L\n\n#define SN_pbeWithSHA1AndRC2_CBC                \"PBE-SHA1-RC2-64\"\n#define LN_pbeWithSHA1AndRC2_CBC                \"pbeWithSHA1AndRC2-CBC\"\n#define NID_pbeWithSHA1AndRC2_CBC               68\n#define OBJ_pbeWithSHA1AndRC2_CBC               OBJ_pkcs5,11L\n\n#define LN_id_pbkdf2            \"PBKDF2\"\n#define NID_id_pbkdf2           69\n#define OBJ_id_pbkdf2           OBJ_pkcs5,12L\n\n#define LN_pbes2                \"PBES2\"\n#define NID_pbes2               161\n#define OBJ_pbes2               OBJ_pkcs5,13L\n\n#define LN_pbmac1               \"PBMAC1\"\n#define NID_pbmac1              162\n#define OBJ_pbmac1              OBJ_pkcs5,14L\n\n#define SN_pkcs7                \"pkcs7\"\n#define NID_pkcs7               20\n#define OBJ_pkcs7               OBJ_pkcs,7L\n\n#define LN_pkcs7_data           \"pkcs7-data\"\n#define NID_pkcs7_data          21\n#define OBJ_pkcs7_data          OBJ_pkcs7,1L\n\n#define LN_pkcs7_signed         \"pkcs7-signedData\"\n#define NID_pkcs7_signed                22\n#define OBJ_pkcs7_signed                OBJ_pkcs7,2L\n\n#define LN_pkcs7_enveloped              \"pkcs7-envelopedData\"\n#define NID_pkcs7_enveloped             23\n#define OBJ_pkcs7_enveloped             OBJ_pkcs7,3L\n\n#define LN_pkcs7_signedAndEnveloped             \"pkcs7-signedAndEnvelopedData\"\n#define NID_pkcs7_signedAndEnveloped            24\n#define OBJ_pkcs7_signedAndEnveloped            OBJ_pkcs7,4L\n\n#define LN_pkcs7_digest         \"pkcs7-digestData\"\n#define NID_pkcs7_digest                25\n#define OBJ_pkcs7_digest                OBJ_pkcs7,5L\n\n#define LN_pkcs7_encrypted              \"pkcs7-encryptedData\"\n#define NID_pkcs7_encrypted             26\n#define OBJ_pkcs7_encrypted             OBJ_pkcs7,6L\n\n#define SN_pkcs9                \"pkcs9\"\n#define NID_pkcs9               47\n#define OBJ_pkcs9               OBJ_pkcs,9L\n\n#define LN_pkcs9_emailAddress           \"emailAddress\"\n#define NID_pkcs9_emailAddress          48\n#define OBJ_pkcs9_emailAddress          OBJ_pkcs9,1L\n\n#define LN_pkcs9_unstructuredName               \"unstructuredName\"\n#define NID_pkcs9_unstructuredName              49\n#define OBJ_pkcs9_unstructuredName              OBJ_pkcs9,2L\n\n#define LN_pkcs9_contentType            \"contentType\"\n#define NID_pkcs9_contentType           50\n#define OBJ_pkcs9_contentType           OBJ_pkcs9,3L\n\n#define LN_pkcs9_messageDigest          \"messageDigest\"\n#define NID_pkcs9_messageDigest         51\n#define OBJ_pkcs9_messageDigest         OBJ_pkcs9,4L\n\n#define LN_pkcs9_signingTime            \"signingTime\"\n#define NID_pkcs9_signingTime           52\n#define OBJ_pkcs9_signingTime           OBJ_pkcs9,5L\n\n#define LN_pkcs9_countersignature               \"countersignature\"\n#define NID_pkcs9_countersignature              53\n#define OBJ_pkcs9_countersignature              OBJ_pkcs9,6L\n\n#define LN_pkcs9_challengePassword              \"challengePassword\"\n#define NID_pkcs9_challengePassword             54\n#define OBJ_pkcs9_challengePassword             OBJ_pkcs9,7L\n\n#define LN_pkcs9_unstructuredAddress            \"unstructuredAddress\"\n#define NID_pkcs9_unstructuredAddress           55\n#define OBJ_pkcs9_unstructuredAddress           OBJ_pkcs9,8L\n\n#define LN_pkcs9_extCertAttributes              \"extendedCertificateAttributes\"\n#define NID_pkcs9_extCertAttributes             56\n#define OBJ_pkcs9_extCertAttributes             OBJ_pkcs9,9L\n\n#define SN_ext_req              \"extReq\"\n#define LN_ext_req              \"Extension Request\"\n#define NID_ext_req             172\n#define OBJ_ext_req             OBJ_pkcs9,14L\n\n#define SN_SMIMECapabilities            \"SMIME-CAPS\"\n#define LN_SMIMECapabilities            \"S/MIME Capabilities\"\n#define NID_SMIMECapabilities           167\n#define OBJ_SMIMECapabilities           OBJ_pkcs9,15L\n\n#define SN_SMIME                \"SMIME\"\n#define LN_SMIME                \"S/MIME\"\n#define NID_SMIME               188\n#define OBJ_SMIME               OBJ_pkcs9,16L\n\n#define SN_id_smime_mod         \"id-smime-mod\"\n#define NID_id_smime_mod                189\n#define OBJ_id_smime_mod                OBJ_SMIME,0L\n\n#define SN_id_smime_ct          \"id-smime-ct\"\n#define NID_id_smime_ct         190\n#define OBJ_id_smime_ct         OBJ_SMIME,1L\n\n#define SN_id_smime_aa          \"id-smime-aa\"\n#define NID_id_smime_aa         191\n#define OBJ_id_smime_aa         OBJ_SMIME,2L\n\n#define SN_id_smime_alg         \"id-smime-alg\"\n#define NID_id_smime_alg                192\n#define OBJ_id_smime_alg                OBJ_SMIME,3L\n\n#define SN_id_smime_cd          \"id-smime-cd\"\n#define NID_id_smime_cd         193\n#define OBJ_id_smime_cd         OBJ_SMIME,4L\n\n#define SN_id_smime_spq         \"id-smime-spq\"\n#define NID_id_smime_spq                194\n#define OBJ_id_smime_spq                OBJ_SMIME,5L\n\n#define SN_id_smime_cti         \"id-smime-cti\"\n#define NID_id_smime_cti                195\n#define OBJ_id_smime_cti                OBJ_SMIME,6L\n\n#define SN_id_smime_mod_cms             \"id-smime-mod-cms\"\n#define NID_id_smime_mod_cms            196\n#define OBJ_id_smime_mod_cms            OBJ_id_smime_mod,1L\n\n#define SN_id_smime_mod_ess             \"id-smime-mod-ess\"\n#define NID_id_smime_mod_ess            197\n#define OBJ_id_smime_mod_ess            OBJ_id_smime_mod,2L\n\n#define SN_id_smime_mod_oid             \"id-smime-mod-oid\"\n#define NID_id_smime_mod_oid            198\n#define OBJ_id_smime_mod_oid            OBJ_id_smime_mod,3L\n\n#define SN_id_smime_mod_msg_v3          \"id-smime-mod-msg-v3\"\n#define NID_id_smime_mod_msg_v3         199\n#define OBJ_id_smime_mod_msg_v3         OBJ_id_smime_mod,4L\n\n#define SN_id_smime_mod_ets_eSignature_88               \"id-smime-mod-ets-eSignature-88\"\n#define NID_id_smime_mod_ets_eSignature_88              200\n#define OBJ_id_smime_mod_ets_eSignature_88              OBJ_id_smime_mod,5L\n\n#define SN_id_smime_mod_ets_eSignature_97               \"id-smime-mod-ets-eSignature-97\"\n#define NID_id_smime_mod_ets_eSignature_97              201\n#define OBJ_id_smime_mod_ets_eSignature_97              OBJ_id_smime_mod,6L\n\n#define SN_id_smime_mod_ets_eSigPolicy_88               \"id-smime-mod-ets-eSigPolicy-88\"\n#define NID_id_smime_mod_ets_eSigPolicy_88              202\n#define OBJ_id_smime_mod_ets_eSigPolicy_88              OBJ_id_smime_mod,7L\n\n#define SN_id_smime_mod_ets_eSigPolicy_97               \"id-smime-mod-ets-eSigPolicy-97\"\n#define NID_id_smime_mod_ets_eSigPolicy_97              203\n#define OBJ_id_smime_mod_ets_eSigPolicy_97              OBJ_id_smime_mod,8L\n\n#define SN_id_smime_ct_receipt          \"id-smime-ct-receipt\"\n#define NID_id_smime_ct_receipt         204\n#define OBJ_id_smime_ct_receipt         OBJ_id_smime_ct,1L\n\n#define SN_id_smime_ct_authData         \"id-smime-ct-authData\"\n#define NID_id_smime_ct_authData                205\n#define OBJ_id_smime_ct_authData                OBJ_id_smime_ct,2L\n\n#define SN_id_smime_ct_publishCert              \"id-smime-ct-publishCert\"\n#define NID_id_smime_ct_publishCert             206\n#define OBJ_id_smime_ct_publishCert             OBJ_id_smime_ct,3L\n\n#define SN_id_smime_ct_TSTInfo          \"id-smime-ct-TSTInfo\"\n#define NID_id_smime_ct_TSTInfo         207\n#define OBJ_id_smime_ct_TSTInfo         OBJ_id_smime_ct,4L\n\n#define SN_id_smime_ct_TDTInfo          \"id-smime-ct-TDTInfo\"\n#define NID_id_smime_ct_TDTInfo         208\n#define OBJ_id_smime_ct_TDTInfo         OBJ_id_smime_ct,5L\n\n#define SN_id_smime_ct_contentInfo              \"id-smime-ct-contentInfo\"\n#define NID_id_smime_ct_contentInfo             209\n#define OBJ_id_smime_ct_contentInfo             OBJ_id_smime_ct,6L\n\n#define SN_id_smime_ct_DVCSRequestData          \"id-smime-ct-DVCSRequestData\"\n#define NID_id_smime_ct_DVCSRequestData         210\n#define OBJ_id_smime_ct_DVCSRequestData         OBJ_id_smime_ct,7L\n\n#define SN_id_smime_ct_DVCSResponseData         \"id-smime-ct-DVCSResponseData\"\n#define NID_id_smime_ct_DVCSResponseData                211\n#define OBJ_id_smime_ct_DVCSResponseData                OBJ_id_smime_ct,8L\n\n#define SN_id_smime_ct_compressedData           \"id-smime-ct-compressedData\"\n#define NID_id_smime_ct_compressedData          786\n#define OBJ_id_smime_ct_compressedData          OBJ_id_smime_ct,9L\n\n#define SN_id_ct_asciiTextWithCRLF              \"id-ct-asciiTextWithCRLF\"\n#define NID_id_ct_asciiTextWithCRLF             787\n#define OBJ_id_ct_asciiTextWithCRLF             OBJ_id_smime_ct,27L\n\n#define SN_id_smime_aa_receiptRequest           \"id-smime-aa-receiptRequest\"\n#define NID_id_smime_aa_receiptRequest          212\n#define OBJ_id_smime_aa_receiptRequest          OBJ_id_smime_aa,1L\n\n#define SN_id_smime_aa_securityLabel            \"id-smime-aa-securityLabel\"\n#define NID_id_smime_aa_securityLabel           213\n#define OBJ_id_smime_aa_securityLabel           OBJ_id_smime_aa,2L\n\n#define SN_id_smime_aa_mlExpandHistory          \"id-smime-aa-mlExpandHistory\"\n#define NID_id_smime_aa_mlExpandHistory         214\n#define OBJ_id_smime_aa_mlExpandHistory         OBJ_id_smime_aa,3L\n\n#define SN_id_smime_aa_contentHint              \"id-smime-aa-contentHint\"\n#define NID_id_smime_aa_contentHint             215\n#define OBJ_id_smime_aa_contentHint             OBJ_id_smime_aa,4L\n\n#define SN_id_smime_aa_msgSigDigest             \"id-smime-aa-msgSigDigest\"\n#define NID_id_smime_aa_msgSigDigest            216\n#define OBJ_id_smime_aa_msgSigDigest            OBJ_id_smime_aa,5L\n\n#define SN_id_smime_aa_encapContentType         \"id-smime-aa-encapContentType\"\n#define NID_id_smime_aa_encapContentType                217\n#define OBJ_id_smime_aa_encapContentType                OBJ_id_smime_aa,6L\n\n#define SN_id_smime_aa_contentIdentifier                \"id-smime-aa-contentIdentifier\"\n#define NID_id_smime_aa_contentIdentifier               218\n#define OBJ_id_smime_aa_contentIdentifier               OBJ_id_smime_aa,7L\n\n#define SN_id_smime_aa_macValue         \"id-smime-aa-macValue\"\n#define NID_id_smime_aa_macValue                219\n#define OBJ_id_smime_aa_macValue                OBJ_id_smime_aa,8L\n\n#define SN_id_smime_aa_equivalentLabels         \"id-smime-aa-equivalentLabels\"\n#define NID_id_smime_aa_equivalentLabels                220\n#define OBJ_id_smime_aa_equivalentLabels                OBJ_id_smime_aa,9L\n\n#define SN_id_smime_aa_contentReference         \"id-smime-aa-contentReference\"\n#define NID_id_smime_aa_contentReference                221\n#define OBJ_id_smime_aa_contentReference                OBJ_id_smime_aa,10L\n\n#define SN_id_smime_aa_encrypKeyPref            \"id-smime-aa-encrypKeyPref\"\n#define NID_id_smime_aa_encrypKeyPref           222\n#define OBJ_id_smime_aa_encrypKeyPref           OBJ_id_smime_aa,11L\n\n#define SN_id_smime_aa_signingCertificate               \"id-smime-aa-signingCertificate\"\n#define NID_id_smime_aa_signingCertificate              223\n#define OBJ_id_smime_aa_signingCertificate              OBJ_id_smime_aa,12L\n\n#define SN_id_smime_aa_smimeEncryptCerts                \"id-smime-aa-smimeEncryptCerts\"\n#define NID_id_smime_aa_smimeEncryptCerts               224\n#define OBJ_id_smime_aa_smimeEncryptCerts               OBJ_id_smime_aa,13L\n\n#define SN_id_smime_aa_timeStampToken           \"id-smime-aa-timeStampToken\"\n#define NID_id_smime_aa_timeStampToken          225\n#define OBJ_id_smime_aa_timeStampToken          OBJ_id_smime_aa,14L\n\n#define SN_id_smime_aa_ets_sigPolicyId          \"id-smime-aa-ets-sigPolicyId\"\n#define NID_id_smime_aa_ets_sigPolicyId         226\n#define OBJ_id_smime_aa_ets_sigPolicyId         OBJ_id_smime_aa,15L\n\n#define SN_id_smime_aa_ets_commitmentType               \"id-smime-aa-ets-commitmentType\"\n#define NID_id_smime_aa_ets_commitmentType              227\n#define OBJ_id_smime_aa_ets_commitmentType              OBJ_id_smime_aa,16L\n\n#define SN_id_smime_aa_ets_signerLocation               \"id-smime-aa-ets-signerLocation\"\n#define NID_id_smime_aa_ets_signerLocation              228\n#define OBJ_id_smime_aa_ets_signerLocation              OBJ_id_smime_aa,17L\n\n#define SN_id_smime_aa_ets_signerAttr           \"id-smime-aa-ets-signerAttr\"\n#define NID_id_smime_aa_ets_signerAttr          229\n#define OBJ_id_smime_aa_ets_signerAttr          OBJ_id_smime_aa,18L\n\n#define SN_id_smime_aa_ets_otherSigCert         \"id-smime-aa-ets-otherSigCert\"\n#define NID_id_smime_aa_ets_otherSigCert                230\n#define OBJ_id_smime_aa_ets_otherSigCert                OBJ_id_smime_aa,19L\n\n#define SN_id_smime_aa_ets_contentTimestamp             \"id-smime-aa-ets-contentTimestamp\"\n#define NID_id_smime_aa_ets_contentTimestamp            231\n#define OBJ_id_smime_aa_ets_contentTimestamp            OBJ_id_smime_aa,20L\n\n#define SN_id_smime_aa_ets_CertificateRefs              \"id-smime-aa-ets-CertificateRefs\"\n#define NID_id_smime_aa_ets_CertificateRefs             232\n#define OBJ_id_smime_aa_ets_CertificateRefs             OBJ_id_smime_aa,21L\n\n#define SN_id_smime_aa_ets_RevocationRefs               \"id-smime-aa-ets-RevocationRefs\"\n#define NID_id_smime_aa_ets_RevocationRefs              233\n#define OBJ_id_smime_aa_ets_RevocationRefs              OBJ_id_smime_aa,22L\n\n#define SN_id_smime_aa_ets_certValues           \"id-smime-aa-ets-certValues\"\n#define NID_id_smime_aa_ets_certValues          234\n#define OBJ_id_smime_aa_ets_certValues          OBJ_id_smime_aa,23L\n\n#define SN_id_smime_aa_ets_revocationValues             \"id-smime-aa-ets-revocationValues\"\n#define NID_id_smime_aa_ets_revocationValues            235\n#define OBJ_id_smime_aa_ets_revocationValues            OBJ_id_smime_aa,24L\n\n#define SN_id_smime_aa_ets_escTimeStamp         \"id-smime-aa-ets-escTimeStamp\"\n#define NID_id_smime_aa_ets_escTimeStamp                236\n#define OBJ_id_smime_aa_ets_escTimeStamp                OBJ_id_smime_aa,25L\n\n#define SN_id_smime_aa_ets_certCRLTimestamp             \"id-smime-aa-ets-certCRLTimestamp\"\n#define NID_id_smime_aa_ets_certCRLTimestamp            237\n#define OBJ_id_smime_aa_ets_certCRLTimestamp            OBJ_id_smime_aa,26L\n\n#define SN_id_smime_aa_ets_archiveTimeStamp             \"id-smime-aa-ets-archiveTimeStamp\"\n#define NID_id_smime_aa_ets_archiveTimeStamp            238\n#define OBJ_id_smime_aa_ets_archiveTimeStamp            OBJ_id_smime_aa,27L\n\n#define SN_id_smime_aa_signatureType            \"id-smime-aa-signatureType\"\n#define NID_id_smime_aa_signatureType           239\n#define OBJ_id_smime_aa_signatureType           OBJ_id_smime_aa,28L\n\n#define SN_id_smime_aa_dvcs_dvc         \"id-smime-aa-dvcs-dvc\"\n#define NID_id_smime_aa_dvcs_dvc                240\n#define OBJ_id_smime_aa_dvcs_dvc                OBJ_id_smime_aa,29L\n\n#define SN_id_smime_alg_ESDHwith3DES            \"id-smime-alg-ESDHwith3DES\"\n#define NID_id_smime_alg_ESDHwith3DES           241\n#define OBJ_id_smime_alg_ESDHwith3DES           OBJ_id_smime_alg,1L\n\n#define SN_id_smime_alg_ESDHwithRC2             \"id-smime-alg-ESDHwithRC2\"\n#define NID_id_smime_alg_ESDHwithRC2            242\n#define OBJ_id_smime_alg_ESDHwithRC2            OBJ_id_smime_alg,2L\n\n#define SN_id_smime_alg_3DESwrap                \"id-smime-alg-3DESwrap\"\n#define NID_id_smime_alg_3DESwrap               243\n#define OBJ_id_smime_alg_3DESwrap               OBJ_id_smime_alg,3L\n\n#define SN_id_smime_alg_RC2wrap         \"id-smime-alg-RC2wrap\"\n#define NID_id_smime_alg_RC2wrap                244\n#define OBJ_id_smime_alg_RC2wrap                OBJ_id_smime_alg,4L\n\n#define SN_id_smime_alg_ESDH            \"id-smime-alg-ESDH\"\n#define NID_id_smime_alg_ESDH           245\n#define OBJ_id_smime_alg_ESDH           OBJ_id_smime_alg,5L\n\n#define SN_id_smime_alg_CMS3DESwrap             \"id-smime-alg-CMS3DESwrap\"\n#define NID_id_smime_alg_CMS3DESwrap            246\n#define OBJ_id_smime_alg_CMS3DESwrap            OBJ_id_smime_alg,6L\n\n#define SN_id_smime_alg_CMSRC2wrap              \"id-smime-alg-CMSRC2wrap\"\n#define NID_id_smime_alg_CMSRC2wrap             247\n#define OBJ_id_smime_alg_CMSRC2wrap             OBJ_id_smime_alg,7L\n\n#define SN_id_alg_PWRI_KEK              \"id-alg-PWRI-KEK\"\n#define NID_id_alg_PWRI_KEK             893\n#define OBJ_id_alg_PWRI_KEK             OBJ_id_smime_alg,9L\n\n#define SN_id_smime_cd_ldap             \"id-smime-cd-ldap\"\n#define NID_id_smime_cd_ldap            248\n#define OBJ_id_smime_cd_ldap            OBJ_id_smime_cd,1L\n\n#define SN_id_smime_spq_ets_sqt_uri             \"id-smime-spq-ets-sqt-uri\"\n#define NID_id_smime_spq_ets_sqt_uri            249\n#define OBJ_id_smime_spq_ets_sqt_uri            OBJ_id_smime_spq,1L\n\n#define SN_id_smime_spq_ets_sqt_unotice         \"id-smime-spq-ets-sqt-unotice\"\n#define NID_id_smime_spq_ets_sqt_unotice                250\n#define OBJ_id_smime_spq_ets_sqt_unotice                OBJ_id_smime_spq,2L\n\n#define SN_id_smime_cti_ets_proofOfOrigin               \"id-smime-cti-ets-proofOfOrigin\"\n#define NID_id_smime_cti_ets_proofOfOrigin              251\n#define OBJ_id_smime_cti_ets_proofOfOrigin              OBJ_id_smime_cti,1L\n\n#define SN_id_smime_cti_ets_proofOfReceipt              \"id-smime-cti-ets-proofOfReceipt\"\n#define NID_id_smime_cti_ets_proofOfReceipt             252\n#define OBJ_id_smime_cti_ets_proofOfReceipt             OBJ_id_smime_cti,2L\n\n#define SN_id_smime_cti_ets_proofOfDelivery             \"id-smime-cti-ets-proofOfDelivery\"\n#define NID_id_smime_cti_ets_proofOfDelivery            253\n#define OBJ_id_smime_cti_ets_proofOfDelivery            OBJ_id_smime_cti,3L\n\n#define SN_id_smime_cti_ets_proofOfSender               \"id-smime-cti-ets-proofOfSender\"\n#define NID_id_smime_cti_ets_proofOfSender              254\n#define OBJ_id_smime_cti_ets_proofOfSender              OBJ_id_smime_cti,4L\n\n#define SN_id_smime_cti_ets_proofOfApproval             \"id-smime-cti-ets-proofOfApproval\"\n#define NID_id_smime_cti_ets_proofOfApproval            255\n#define OBJ_id_smime_cti_ets_proofOfApproval            OBJ_id_smime_cti,5L\n\n#define SN_id_smime_cti_ets_proofOfCreation             \"id-smime-cti-ets-proofOfCreation\"\n#define NID_id_smime_cti_ets_proofOfCreation            256\n#define OBJ_id_smime_cti_ets_proofOfCreation            OBJ_id_smime_cti,6L\n\n#define LN_friendlyName         \"friendlyName\"\n#define NID_friendlyName                156\n#define OBJ_friendlyName                OBJ_pkcs9,20L\n\n#define LN_localKeyID           \"localKeyID\"\n#define NID_localKeyID          157\n#define OBJ_localKeyID          OBJ_pkcs9,21L\n\n#define SN_ms_csp_name          \"CSPName\"\n#define LN_ms_csp_name          \"Microsoft CSP Name\"\n#define NID_ms_csp_name         417\n#define OBJ_ms_csp_name         1L,3L,6L,1L,4L,1L,311L,17L,1L\n\n#define SN_LocalKeySet          \"LocalKeySet\"\n#define LN_LocalKeySet          \"Microsoft Local Key set\"\n#define NID_LocalKeySet         856\n#define OBJ_LocalKeySet         1L,3L,6L,1L,4L,1L,311L,17L,2L\n\n#define OBJ_certTypes           OBJ_pkcs9,22L\n\n#define LN_x509Certificate              \"x509Certificate\"\n#define NID_x509Certificate             158\n#define OBJ_x509Certificate             OBJ_certTypes,1L\n\n#define LN_sdsiCertificate              \"sdsiCertificate\"\n#define NID_sdsiCertificate             159\n#define OBJ_sdsiCertificate             OBJ_certTypes,2L\n\n#define OBJ_crlTypes            OBJ_pkcs9,23L\n\n#define LN_x509Crl              \"x509Crl\"\n#define NID_x509Crl             160\n#define OBJ_x509Crl             OBJ_crlTypes,1L\n\n#define OBJ_pkcs12              OBJ_pkcs,12L\n\n#define OBJ_pkcs12_pbeids               OBJ_pkcs12,1L\n\n#define SN_pbe_WithSHA1And128BitRC4             \"PBE-SHA1-RC4-128\"\n#define LN_pbe_WithSHA1And128BitRC4             \"pbeWithSHA1And128BitRC4\"\n#define NID_pbe_WithSHA1And128BitRC4            144\n#define OBJ_pbe_WithSHA1And128BitRC4            OBJ_pkcs12_pbeids,1L\n\n#define SN_pbe_WithSHA1And40BitRC4              \"PBE-SHA1-RC4-40\"\n#define LN_pbe_WithSHA1And40BitRC4              \"pbeWithSHA1And40BitRC4\"\n#define NID_pbe_WithSHA1And40BitRC4             145\n#define OBJ_pbe_WithSHA1And40BitRC4             OBJ_pkcs12_pbeids,2L\n\n#define SN_pbe_WithSHA1And3_Key_TripleDES_CBC           \"PBE-SHA1-3DES\"\n#define LN_pbe_WithSHA1And3_Key_TripleDES_CBC           \"pbeWithSHA1And3-KeyTripleDES-CBC\"\n#define NID_pbe_WithSHA1And3_Key_TripleDES_CBC          146\n#define OBJ_pbe_WithSHA1And3_Key_TripleDES_CBC          OBJ_pkcs12_pbeids,3L\n\n#define SN_pbe_WithSHA1And2_Key_TripleDES_CBC           \"PBE-SHA1-2DES\"\n#define LN_pbe_WithSHA1And2_Key_TripleDES_CBC           \"pbeWithSHA1And2-KeyTripleDES-CBC\"\n#define NID_pbe_WithSHA1And2_Key_TripleDES_CBC          147\n#define OBJ_pbe_WithSHA1And2_Key_TripleDES_CBC          OBJ_pkcs12_pbeids,4L\n\n#define SN_pbe_WithSHA1And128BitRC2_CBC         \"PBE-SHA1-RC2-128\"\n#define LN_pbe_WithSHA1And128BitRC2_CBC         \"pbeWithSHA1And128BitRC2-CBC\"\n#define NID_pbe_WithSHA1And128BitRC2_CBC                148\n#define OBJ_pbe_WithSHA1And128BitRC2_CBC                OBJ_pkcs12_pbeids,5L\n\n#define SN_pbe_WithSHA1And40BitRC2_CBC          \"PBE-SHA1-RC2-40\"\n#define LN_pbe_WithSHA1And40BitRC2_CBC          \"pbeWithSHA1And40BitRC2-CBC\"\n#define NID_pbe_WithSHA1And40BitRC2_CBC         149\n#define OBJ_pbe_WithSHA1And40BitRC2_CBC         OBJ_pkcs12_pbeids,6L\n\n#define OBJ_pkcs12_Version1             OBJ_pkcs12,10L\n\n#define OBJ_pkcs12_BagIds               OBJ_pkcs12_Version1,1L\n\n#define LN_keyBag               \"keyBag\"\n#define NID_keyBag              150\n#define OBJ_keyBag              OBJ_pkcs12_BagIds,1L\n\n#define LN_pkcs8ShroudedKeyBag          \"pkcs8ShroudedKeyBag\"\n#define NID_pkcs8ShroudedKeyBag         151\n#define OBJ_pkcs8ShroudedKeyBag         OBJ_pkcs12_BagIds,2L\n\n#define LN_certBag              \"certBag\"\n#define NID_certBag             152\n#define OBJ_certBag             OBJ_pkcs12_BagIds,3L\n\n#define LN_crlBag               \"crlBag\"\n#define NID_crlBag              153\n#define OBJ_crlBag              OBJ_pkcs12_BagIds,4L\n\n#define LN_secretBag            \"secretBag\"\n#define NID_secretBag           154\n#define OBJ_secretBag           OBJ_pkcs12_BagIds,5L\n\n#define LN_safeContentsBag              \"safeContentsBag\"\n#define NID_safeContentsBag             155\n#define OBJ_safeContentsBag             OBJ_pkcs12_BagIds,6L\n\n#define SN_md2          \"MD2\"\n#define LN_md2          \"md2\"\n#define NID_md2         3\n#define OBJ_md2         OBJ_rsadsi,2L,2L\n\n#define SN_md4          \"MD4\"\n#define LN_md4          \"md4\"\n#define NID_md4         257\n#define OBJ_md4         OBJ_rsadsi,2L,4L\n\n#define SN_md5          \"MD5\"\n#define LN_md5          \"md5\"\n#define NID_md5         4\n#define OBJ_md5         OBJ_rsadsi,2L,5L\n\n#define SN_md5_sha1             \"MD5-SHA1\"\n#define LN_md5_sha1             \"md5-sha1\"\n#define NID_md5_sha1            114\n\n#define LN_hmacWithMD5          \"hmacWithMD5\"\n#define NID_hmacWithMD5         797\n#define OBJ_hmacWithMD5         OBJ_rsadsi,2L,6L\n\n#define LN_hmacWithSHA1         \"hmacWithSHA1\"\n#define NID_hmacWithSHA1                163\n#define OBJ_hmacWithSHA1                OBJ_rsadsi,2L,7L\n\n#define LN_hmacWithSHA224               \"hmacWithSHA224\"\n#define NID_hmacWithSHA224              798\n#define OBJ_hmacWithSHA224              OBJ_rsadsi,2L,8L\n\n#define LN_hmacWithSHA256               \"hmacWithSHA256\"\n#define NID_hmacWithSHA256              799\n#define OBJ_hmacWithSHA256              OBJ_rsadsi,2L,9L\n\n#define LN_hmacWithSHA384               \"hmacWithSHA384\"\n#define NID_hmacWithSHA384              800\n#define OBJ_hmacWithSHA384              OBJ_rsadsi,2L,10L\n\n#define LN_hmacWithSHA512               \"hmacWithSHA512\"\n#define NID_hmacWithSHA512              801\n#define OBJ_hmacWithSHA512              OBJ_rsadsi,2L,11L\n\n#define SN_rc2_cbc              \"RC2-CBC\"\n#define LN_rc2_cbc              \"rc2-cbc\"\n#define NID_rc2_cbc             37\n#define OBJ_rc2_cbc             OBJ_rsadsi,3L,2L\n\n#define SN_rc2_ecb              \"RC2-ECB\"\n#define LN_rc2_ecb              \"rc2-ecb\"\n#define NID_rc2_ecb             38\n\n#define SN_rc2_cfb64            \"RC2-CFB\"\n#define LN_rc2_cfb64            \"rc2-cfb\"\n#define NID_rc2_cfb64           39\n\n#define SN_rc2_ofb64            \"RC2-OFB\"\n#define LN_rc2_ofb64            \"rc2-ofb\"\n#define NID_rc2_ofb64           40\n\n#define SN_rc2_40_cbc           \"RC2-40-CBC\"\n#define LN_rc2_40_cbc           \"rc2-40-cbc\"\n#define NID_rc2_40_cbc          98\n\n#define SN_rc2_64_cbc           \"RC2-64-CBC\"\n#define LN_rc2_64_cbc           \"rc2-64-cbc\"\n#define NID_rc2_64_cbc          166\n\n#define SN_rc4          \"RC4\"\n#define LN_rc4          \"rc4\"\n#define NID_rc4         5\n#define OBJ_rc4         OBJ_rsadsi,3L,4L\n\n#define SN_rc4_40               \"RC4-40\"\n#define LN_rc4_40               \"rc4-40\"\n#define NID_rc4_40              97\n\n#define SN_des_ede3_cbc         \"DES-EDE3-CBC\"\n#define LN_des_ede3_cbc         \"des-ede3-cbc\"\n#define NID_des_ede3_cbc                44\n#define OBJ_des_ede3_cbc                OBJ_rsadsi,3L,7L\n\n#define SN_rc5_cbc              \"RC5-CBC\"\n#define LN_rc5_cbc              \"rc5-cbc\"\n#define NID_rc5_cbc             120\n#define OBJ_rc5_cbc             OBJ_rsadsi,3L,8L\n\n#define SN_rc5_ecb              \"RC5-ECB\"\n#define LN_rc5_ecb              \"rc5-ecb\"\n#define NID_rc5_ecb             121\n\n#define SN_rc5_cfb64            \"RC5-CFB\"\n#define LN_rc5_cfb64            \"rc5-cfb\"\n#define NID_rc5_cfb64           122\n\n#define SN_rc5_ofb64            \"RC5-OFB\"\n#define LN_rc5_ofb64            \"rc5-ofb\"\n#define NID_rc5_ofb64           123\n\n#define SN_ms_ext_req           \"msExtReq\"\n#define LN_ms_ext_req           \"Microsoft Extension Request\"\n#define NID_ms_ext_req          171\n#define OBJ_ms_ext_req          1L,3L,6L,1L,4L,1L,311L,2L,1L,14L\n\n#define SN_ms_code_ind          \"msCodeInd\"\n#define LN_ms_code_ind          \"Microsoft Individual Code Signing\"\n#define NID_ms_code_ind         134\n#define OBJ_ms_code_ind         1L,3L,6L,1L,4L,1L,311L,2L,1L,21L\n\n#define SN_ms_code_com          \"msCodeCom\"\n#define LN_ms_code_com          \"Microsoft Commercial Code Signing\"\n#define NID_ms_code_com         135\n#define OBJ_ms_code_com         1L,3L,6L,1L,4L,1L,311L,2L,1L,22L\n\n#define SN_ms_ctl_sign          \"msCTLSign\"\n#define LN_ms_ctl_sign          \"Microsoft Trust List Signing\"\n#define NID_ms_ctl_sign         136\n#define OBJ_ms_ctl_sign         1L,3L,6L,1L,4L,1L,311L,10L,3L,1L\n\n#define SN_ms_sgc               \"msSGC\"\n#define LN_ms_sgc               \"Microsoft Server Gated Crypto\"\n#define NID_ms_sgc              137\n#define OBJ_ms_sgc              1L,3L,6L,1L,4L,1L,311L,10L,3L,3L\n\n#define SN_ms_efs               \"msEFS\"\n#define LN_ms_efs               \"Microsoft Encrypted File System\"\n#define NID_ms_efs              138\n#define OBJ_ms_efs              1L,3L,6L,1L,4L,1L,311L,10L,3L,4L\n\n#define SN_ms_smartcard_login           \"msSmartcardLogin\"\n#define LN_ms_smartcard_login           \"Microsoft Smartcardlogin\"\n#define NID_ms_smartcard_login          648\n#define OBJ_ms_smartcard_login          1L,3L,6L,1L,4L,1L,311L,20L,2L,2L\n\n#define SN_ms_upn               \"msUPN\"\n#define LN_ms_upn               \"Microsoft Universal Principal Name\"\n#define NID_ms_upn              649\n#define OBJ_ms_upn              1L,3L,6L,1L,4L,1L,311L,20L,2L,3L\n\n#define SN_idea_cbc             \"IDEA-CBC\"\n#define LN_idea_cbc             \"idea-cbc\"\n#define NID_idea_cbc            34\n#define OBJ_idea_cbc            1L,3L,6L,1L,4L,1L,188L,7L,1L,1L,2L\n\n#define SN_idea_ecb             \"IDEA-ECB\"\n#define LN_idea_ecb             \"idea-ecb\"\n#define NID_idea_ecb            36\n\n#define SN_idea_cfb64           \"IDEA-CFB\"\n#define LN_idea_cfb64           \"idea-cfb\"\n#define NID_idea_cfb64          35\n\n#define SN_idea_ofb64           \"IDEA-OFB\"\n#define LN_idea_ofb64           \"idea-ofb\"\n#define NID_idea_ofb64          46\n\n#define SN_bf_cbc               \"BF-CBC\"\n#define LN_bf_cbc               \"bf-cbc\"\n#define NID_bf_cbc              91\n#define OBJ_bf_cbc              1L,3L,6L,1L,4L,1L,3029L,1L,2L\n\n#define SN_bf_ecb               \"BF-ECB\"\n#define LN_bf_ecb               \"bf-ecb\"\n#define NID_bf_ecb              92\n\n#define SN_bf_cfb64             \"BF-CFB\"\n#define LN_bf_cfb64             \"bf-cfb\"\n#define NID_bf_cfb64            93\n\n#define SN_bf_ofb64             \"BF-OFB\"\n#define LN_bf_ofb64             \"bf-ofb\"\n#define NID_bf_ofb64            94\n\n#define SN_id_pkix              \"PKIX\"\n#define NID_id_pkix             127\n#define OBJ_id_pkix             1L,3L,6L,1L,5L,5L,7L\n\n#define SN_id_pkix_mod          \"id-pkix-mod\"\n#define NID_id_pkix_mod         258\n#define OBJ_id_pkix_mod         OBJ_id_pkix,0L\n\n#define SN_id_pe                \"id-pe\"\n#define NID_id_pe               175\n#define OBJ_id_pe               OBJ_id_pkix,1L\n\n#define SN_id_qt                \"id-qt\"\n#define NID_id_qt               259\n#define OBJ_id_qt               OBJ_id_pkix,2L\n\n#define SN_id_kp                \"id-kp\"\n#define NID_id_kp               128\n#define OBJ_id_kp               OBJ_id_pkix,3L\n\n#define SN_id_it                \"id-it\"\n#define NID_id_it               260\n#define OBJ_id_it               OBJ_id_pkix,4L\n\n#define SN_id_pkip              \"id-pkip\"\n#define NID_id_pkip             261\n#define OBJ_id_pkip             OBJ_id_pkix,5L\n\n#define SN_id_alg               \"id-alg\"\n#define NID_id_alg              262\n#define OBJ_id_alg              OBJ_id_pkix,6L\n\n#define SN_id_cmc               \"id-cmc\"\n#define NID_id_cmc              263\n#define OBJ_id_cmc              OBJ_id_pkix,7L\n\n#define SN_id_on                \"id-on\"\n#define NID_id_on               264\n#define OBJ_id_on               OBJ_id_pkix,8L\n\n#define SN_id_pda               \"id-pda\"\n#define NID_id_pda              265\n#define OBJ_id_pda              OBJ_id_pkix,9L\n\n#define SN_id_aca               \"id-aca\"\n#define NID_id_aca              266\n#define OBJ_id_aca              OBJ_id_pkix,10L\n\n#define SN_id_qcs               \"id-qcs\"\n#define NID_id_qcs              267\n#define OBJ_id_qcs              OBJ_id_pkix,11L\n\n#define SN_id_cct               \"id-cct\"\n#define NID_id_cct              268\n#define OBJ_id_cct              OBJ_id_pkix,12L\n\n#define SN_id_ppl               \"id-ppl\"\n#define NID_id_ppl              662\n#define OBJ_id_ppl              OBJ_id_pkix,21L\n\n#define SN_id_ad                \"id-ad\"\n#define NID_id_ad               176\n#define OBJ_id_ad               OBJ_id_pkix,48L\n\n#define SN_id_pkix1_explicit_88         \"id-pkix1-explicit-88\"\n#define NID_id_pkix1_explicit_88                269\n#define OBJ_id_pkix1_explicit_88                OBJ_id_pkix_mod,1L\n\n#define SN_id_pkix1_implicit_88         \"id-pkix1-implicit-88\"\n#define NID_id_pkix1_implicit_88                270\n#define OBJ_id_pkix1_implicit_88                OBJ_id_pkix_mod,2L\n\n#define SN_id_pkix1_explicit_93         \"id-pkix1-explicit-93\"\n#define NID_id_pkix1_explicit_93                271\n#define OBJ_id_pkix1_explicit_93                OBJ_id_pkix_mod,3L\n\n#define SN_id_pkix1_implicit_93         \"id-pkix1-implicit-93\"\n#define NID_id_pkix1_implicit_93                272\n#define OBJ_id_pkix1_implicit_93                OBJ_id_pkix_mod,4L\n\n#define SN_id_mod_crmf          \"id-mod-crmf\"\n#define NID_id_mod_crmf         273\n#define OBJ_id_mod_crmf         OBJ_id_pkix_mod,5L\n\n#define SN_id_mod_cmc           \"id-mod-cmc\"\n#define NID_id_mod_cmc          274\n#define OBJ_id_mod_cmc          OBJ_id_pkix_mod,6L\n\n#define SN_id_mod_kea_profile_88                \"id-mod-kea-profile-88\"\n#define NID_id_mod_kea_profile_88               275\n#define OBJ_id_mod_kea_profile_88               OBJ_id_pkix_mod,7L\n\n#define SN_id_mod_kea_profile_93                \"id-mod-kea-profile-93\"\n#define NID_id_mod_kea_profile_93               276\n#define OBJ_id_mod_kea_profile_93               OBJ_id_pkix_mod,8L\n\n#define SN_id_mod_cmp           \"id-mod-cmp\"\n#define NID_id_mod_cmp          277\n#define OBJ_id_mod_cmp          OBJ_id_pkix_mod,9L\n\n#define SN_id_mod_qualified_cert_88             \"id-mod-qualified-cert-88\"\n#define NID_id_mod_qualified_cert_88            278\n#define OBJ_id_mod_qualified_cert_88            OBJ_id_pkix_mod,10L\n\n#define SN_id_mod_qualified_cert_93             \"id-mod-qualified-cert-93\"\n#define NID_id_mod_qualified_cert_93            279\n#define OBJ_id_mod_qualified_cert_93            OBJ_id_pkix_mod,11L\n\n#define SN_id_mod_attribute_cert                \"id-mod-attribute-cert\"\n#define NID_id_mod_attribute_cert               280\n#define OBJ_id_mod_attribute_cert               OBJ_id_pkix_mod,12L\n\n#define SN_id_mod_timestamp_protocol            \"id-mod-timestamp-protocol\"\n#define NID_id_mod_timestamp_protocol           281\n#define OBJ_id_mod_timestamp_protocol           OBJ_id_pkix_mod,13L\n\n#define SN_id_mod_ocsp          \"id-mod-ocsp\"\n#define NID_id_mod_ocsp         282\n#define OBJ_id_mod_ocsp         OBJ_id_pkix_mod,14L\n\n#define SN_id_mod_dvcs          \"id-mod-dvcs\"\n#define NID_id_mod_dvcs         283\n#define OBJ_id_mod_dvcs         OBJ_id_pkix_mod,15L\n\n#define SN_id_mod_cmp2000               \"id-mod-cmp2000\"\n#define NID_id_mod_cmp2000              284\n#define OBJ_id_mod_cmp2000              OBJ_id_pkix_mod,16L\n\n#define SN_info_access          \"authorityInfoAccess\"\n#define LN_info_access          \"Authority Information Access\"\n#define NID_info_access         177\n#define OBJ_info_access         OBJ_id_pe,1L\n\n#define SN_biometricInfo                \"biometricInfo\"\n#define LN_biometricInfo                \"Biometric Info\"\n#define NID_biometricInfo               285\n#define OBJ_biometricInfo               OBJ_id_pe,2L\n\n#define SN_qcStatements         \"qcStatements\"\n#define NID_qcStatements                286\n#define OBJ_qcStatements                OBJ_id_pe,3L\n\n#define SN_ac_auditEntity               \"ac-auditEntity\"\n#define NID_ac_auditEntity              287\n#define OBJ_ac_auditEntity              OBJ_id_pe,4L\n\n#define SN_ac_targeting         \"ac-targeting\"\n#define NID_ac_targeting                288\n#define OBJ_ac_targeting                OBJ_id_pe,5L\n\n#define SN_aaControls           \"aaControls\"\n#define NID_aaControls          289\n#define OBJ_aaControls          OBJ_id_pe,6L\n\n#define SN_sbgp_ipAddrBlock             \"sbgp-ipAddrBlock\"\n#define NID_sbgp_ipAddrBlock            290\n#define OBJ_sbgp_ipAddrBlock            OBJ_id_pe,7L\n\n#define SN_sbgp_autonomousSysNum                \"sbgp-autonomousSysNum\"\n#define NID_sbgp_autonomousSysNum               291\n#define OBJ_sbgp_autonomousSysNum               OBJ_id_pe,8L\n\n#define SN_sbgp_routerIdentifier                \"sbgp-routerIdentifier\"\n#define NID_sbgp_routerIdentifier               292\n#define OBJ_sbgp_routerIdentifier               OBJ_id_pe,9L\n\n#define SN_ac_proxying          \"ac-proxying\"\n#define NID_ac_proxying         397\n#define OBJ_ac_proxying         OBJ_id_pe,10L\n\n#define SN_sinfo_access         \"subjectInfoAccess\"\n#define LN_sinfo_access         \"Subject Information Access\"\n#define NID_sinfo_access                398\n#define OBJ_sinfo_access                OBJ_id_pe,11L\n\n#define SN_proxyCertInfo                \"proxyCertInfo\"\n#define LN_proxyCertInfo                \"Proxy Certificate Information\"\n#define NID_proxyCertInfo               663\n#define OBJ_proxyCertInfo               OBJ_id_pe,14L\n\n#define SN_id_qt_cps            \"id-qt-cps\"\n#define LN_id_qt_cps            \"Policy Qualifier CPS\"\n#define NID_id_qt_cps           164\n#define OBJ_id_qt_cps           OBJ_id_qt,1L\n\n#define SN_id_qt_unotice                \"id-qt-unotice\"\n#define LN_id_qt_unotice                \"Policy Qualifier User Notice\"\n#define NID_id_qt_unotice               165\n#define OBJ_id_qt_unotice               OBJ_id_qt,2L\n\n#define SN_textNotice           \"textNotice\"\n#define NID_textNotice          293\n#define OBJ_textNotice          OBJ_id_qt,3L\n\n#define SN_server_auth          \"serverAuth\"\n#define LN_server_auth          \"TLS Web Server Authentication\"\n#define NID_server_auth         129\n#define OBJ_server_auth         OBJ_id_kp,1L\n\n#define SN_client_auth          \"clientAuth\"\n#define LN_client_auth          \"TLS Web Client Authentication\"\n#define NID_client_auth         130\n#define OBJ_client_auth         OBJ_id_kp,2L\n\n#define SN_code_sign            \"codeSigning\"\n#define LN_code_sign            \"Code Signing\"\n#define NID_code_sign           131\n#define OBJ_code_sign           OBJ_id_kp,3L\n\n#define SN_email_protect                \"emailProtection\"\n#define LN_email_protect                \"E-mail Protection\"\n#define NID_email_protect               132\n#define OBJ_email_protect               OBJ_id_kp,4L\n\n#define SN_ipsecEndSystem               \"ipsecEndSystem\"\n#define LN_ipsecEndSystem               \"IPSec End System\"\n#define NID_ipsecEndSystem              294\n#define OBJ_ipsecEndSystem              OBJ_id_kp,5L\n\n#define SN_ipsecTunnel          \"ipsecTunnel\"\n#define LN_ipsecTunnel          \"IPSec Tunnel\"\n#define NID_ipsecTunnel         295\n#define OBJ_ipsecTunnel         OBJ_id_kp,6L\n\n#define SN_ipsecUser            \"ipsecUser\"\n#define LN_ipsecUser            \"IPSec User\"\n#define NID_ipsecUser           296\n#define OBJ_ipsecUser           OBJ_id_kp,7L\n\n#define SN_time_stamp           \"timeStamping\"\n#define LN_time_stamp           \"Time Stamping\"\n#define NID_time_stamp          133\n#define OBJ_time_stamp          OBJ_id_kp,8L\n\n#define SN_OCSP_sign            \"OCSPSigning\"\n#define LN_OCSP_sign            \"OCSP Signing\"\n#define NID_OCSP_sign           180\n#define OBJ_OCSP_sign           OBJ_id_kp,9L\n\n#define SN_dvcs         \"DVCS\"\n#define LN_dvcs         \"dvcs\"\n#define NID_dvcs                297\n#define OBJ_dvcs                OBJ_id_kp,10L\n\n#define SN_id_it_caProtEncCert          \"id-it-caProtEncCert\"\n#define NID_id_it_caProtEncCert         298\n#define OBJ_id_it_caProtEncCert         OBJ_id_it,1L\n\n#define SN_id_it_signKeyPairTypes               \"id-it-signKeyPairTypes\"\n#define NID_id_it_signKeyPairTypes              299\n#define OBJ_id_it_signKeyPairTypes              OBJ_id_it,2L\n\n#define SN_id_it_encKeyPairTypes                \"id-it-encKeyPairTypes\"\n#define NID_id_it_encKeyPairTypes               300\n#define OBJ_id_it_encKeyPairTypes               OBJ_id_it,3L\n\n#define SN_id_it_preferredSymmAlg               \"id-it-preferredSymmAlg\"\n#define NID_id_it_preferredSymmAlg              301\n#define OBJ_id_it_preferredSymmAlg              OBJ_id_it,4L\n\n#define SN_id_it_caKeyUpdateInfo                \"id-it-caKeyUpdateInfo\"\n#define NID_id_it_caKeyUpdateInfo               302\n#define OBJ_id_it_caKeyUpdateInfo               OBJ_id_it,5L\n\n#define SN_id_it_currentCRL             \"id-it-currentCRL\"\n#define NID_id_it_currentCRL            303\n#define OBJ_id_it_currentCRL            OBJ_id_it,6L\n\n#define SN_id_it_unsupportedOIDs                \"id-it-unsupportedOIDs\"\n#define NID_id_it_unsupportedOIDs               304\n#define OBJ_id_it_unsupportedOIDs               OBJ_id_it,7L\n\n#define SN_id_it_subscriptionRequest            \"id-it-subscriptionRequest\"\n#define NID_id_it_subscriptionRequest           305\n#define OBJ_id_it_subscriptionRequest           OBJ_id_it,8L\n\n#define SN_id_it_subscriptionResponse           \"id-it-subscriptionResponse\"\n#define NID_id_it_subscriptionResponse          306\n#define OBJ_id_it_subscriptionResponse          OBJ_id_it,9L\n\n#define SN_id_it_keyPairParamReq                \"id-it-keyPairParamReq\"\n#define NID_id_it_keyPairParamReq               307\n#define OBJ_id_it_keyPairParamReq               OBJ_id_it,10L\n\n#define SN_id_it_keyPairParamRep                \"id-it-keyPairParamRep\"\n#define NID_id_it_keyPairParamRep               308\n#define OBJ_id_it_keyPairParamRep               OBJ_id_it,11L\n\n#define SN_id_it_revPassphrase          \"id-it-revPassphrase\"\n#define NID_id_it_revPassphrase         309\n#define OBJ_id_it_revPassphrase         OBJ_id_it,12L\n\n#define SN_id_it_implicitConfirm                \"id-it-implicitConfirm\"\n#define NID_id_it_implicitConfirm               310\n#define OBJ_id_it_implicitConfirm               OBJ_id_it,13L\n\n#define SN_id_it_confirmWaitTime                \"id-it-confirmWaitTime\"\n#define NID_id_it_confirmWaitTime               311\n#define OBJ_id_it_confirmWaitTime               OBJ_id_it,14L\n\n#define SN_id_it_origPKIMessage         \"id-it-origPKIMessage\"\n#define NID_id_it_origPKIMessage                312\n#define OBJ_id_it_origPKIMessage                OBJ_id_it,15L\n\n#define SN_id_it_suppLangTags           \"id-it-suppLangTags\"\n#define NID_id_it_suppLangTags          784\n#define OBJ_id_it_suppLangTags          OBJ_id_it,16L\n\n#define SN_id_regCtrl           \"id-regCtrl\"\n#define NID_id_regCtrl          313\n#define OBJ_id_regCtrl          OBJ_id_pkip,1L\n\n#define SN_id_regInfo           \"id-regInfo\"\n#define NID_id_regInfo          314\n#define OBJ_id_regInfo          OBJ_id_pkip,2L\n\n#define SN_id_regCtrl_regToken          \"id-regCtrl-regToken\"\n#define NID_id_regCtrl_regToken         315\n#define OBJ_id_regCtrl_regToken         OBJ_id_regCtrl,1L\n\n#define SN_id_regCtrl_authenticator             \"id-regCtrl-authenticator\"\n#define NID_id_regCtrl_authenticator            316\n#define OBJ_id_regCtrl_authenticator            OBJ_id_regCtrl,2L\n\n#define SN_id_regCtrl_pkiPublicationInfo                \"id-regCtrl-pkiPublicationInfo\"\n#define NID_id_regCtrl_pkiPublicationInfo               317\n#define OBJ_id_regCtrl_pkiPublicationInfo               OBJ_id_regCtrl,3L\n\n#define SN_id_regCtrl_pkiArchiveOptions         \"id-regCtrl-pkiArchiveOptions\"\n#define NID_id_regCtrl_pkiArchiveOptions                318\n#define OBJ_id_regCtrl_pkiArchiveOptions                OBJ_id_regCtrl,4L\n\n#define SN_id_regCtrl_oldCertID         \"id-regCtrl-oldCertID\"\n#define NID_id_regCtrl_oldCertID                319\n#define OBJ_id_regCtrl_oldCertID                OBJ_id_regCtrl,5L\n\n#define SN_id_regCtrl_protocolEncrKey           \"id-regCtrl-protocolEncrKey\"\n#define NID_id_regCtrl_protocolEncrKey          320\n#define OBJ_id_regCtrl_protocolEncrKey          OBJ_id_regCtrl,6L\n\n#define SN_id_regInfo_utf8Pairs         \"id-regInfo-utf8Pairs\"\n#define NID_id_regInfo_utf8Pairs                321\n#define OBJ_id_regInfo_utf8Pairs                OBJ_id_regInfo,1L\n\n#define SN_id_regInfo_certReq           \"id-regInfo-certReq\"\n#define NID_id_regInfo_certReq          322\n#define OBJ_id_regInfo_certReq          OBJ_id_regInfo,2L\n\n#define SN_id_alg_des40         \"id-alg-des40\"\n#define NID_id_alg_des40                323\n#define OBJ_id_alg_des40                OBJ_id_alg,1L\n\n#define SN_id_alg_noSignature           \"id-alg-noSignature\"\n#define NID_id_alg_noSignature          324\n#define OBJ_id_alg_noSignature          OBJ_id_alg,2L\n\n#define SN_id_alg_dh_sig_hmac_sha1              \"id-alg-dh-sig-hmac-sha1\"\n#define NID_id_alg_dh_sig_hmac_sha1             325\n#define OBJ_id_alg_dh_sig_hmac_sha1             OBJ_id_alg,3L\n\n#define SN_id_alg_dh_pop                \"id-alg-dh-pop\"\n#define NID_id_alg_dh_pop               326\n#define OBJ_id_alg_dh_pop               OBJ_id_alg,4L\n\n#define SN_id_cmc_statusInfo            \"id-cmc-statusInfo\"\n#define NID_id_cmc_statusInfo           327\n#define OBJ_id_cmc_statusInfo           OBJ_id_cmc,1L\n\n#define SN_id_cmc_identification                \"id-cmc-identification\"\n#define NID_id_cmc_identification               328\n#define OBJ_id_cmc_identification               OBJ_id_cmc,2L\n\n#define SN_id_cmc_identityProof         \"id-cmc-identityProof\"\n#define NID_id_cmc_identityProof                329\n#define OBJ_id_cmc_identityProof                OBJ_id_cmc,3L\n\n#define SN_id_cmc_dataReturn            \"id-cmc-dataReturn\"\n#define NID_id_cmc_dataReturn           330\n#define OBJ_id_cmc_dataReturn           OBJ_id_cmc,4L\n\n#define SN_id_cmc_transactionId         \"id-cmc-transactionId\"\n#define NID_id_cmc_transactionId                331\n#define OBJ_id_cmc_transactionId                OBJ_id_cmc,5L\n\n#define SN_id_cmc_senderNonce           \"id-cmc-senderNonce\"\n#define NID_id_cmc_senderNonce          332\n#define OBJ_id_cmc_senderNonce          OBJ_id_cmc,6L\n\n#define SN_id_cmc_recipientNonce                \"id-cmc-recipientNonce\"\n#define NID_id_cmc_recipientNonce               333\n#define OBJ_id_cmc_recipientNonce               OBJ_id_cmc,7L\n\n#define SN_id_cmc_addExtensions         \"id-cmc-addExtensions\"\n#define NID_id_cmc_addExtensions                334\n#define OBJ_id_cmc_addExtensions                OBJ_id_cmc,8L\n\n#define SN_id_cmc_encryptedPOP          \"id-cmc-encryptedPOP\"\n#define NID_id_cmc_encryptedPOP         335\n#define OBJ_id_cmc_encryptedPOP         OBJ_id_cmc,9L\n\n#define SN_id_cmc_decryptedPOP          \"id-cmc-decryptedPOP\"\n#define NID_id_cmc_decryptedPOP         336\n#define OBJ_id_cmc_decryptedPOP         OBJ_id_cmc,10L\n\n#define SN_id_cmc_lraPOPWitness         \"id-cmc-lraPOPWitness\"\n#define NID_id_cmc_lraPOPWitness                337\n#define OBJ_id_cmc_lraPOPWitness                OBJ_id_cmc,11L\n\n#define SN_id_cmc_getCert               \"id-cmc-getCert\"\n#define NID_id_cmc_getCert              338\n#define OBJ_id_cmc_getCert              OBJ_id_cmc,15L\n\n#define SN_id_cmc_getCRL                \"id-cmc-getCRL\"\n#define NID_id_cmc_getCRL               339\n#define OBJ_id_cmc_getCRL               OBJ_id_cmc,16L\n\n#define SN_id_cmc_revokeRequest         \"id-cmc-revokeRequest\"\n#define NID_id_cmc_revokeRequest                340\n#define OBJ_id_cmc_revokeRequest                OBJ_id_cmc,17L\n\n#define SN_id_cmc_regInfo               \"id-cmc-regInfo\"\n#define NID_id_cmc_regInfo              341\n#define OBJ_id_cmc_regInfo              OBJ_id_cmc,18L\n\n#define SN_id_cmc_responseInfo          \"id-cmc-responseInfo\"\n#define NID_id_cmc_responseInfo         342\n#define OBJ_id_cmc_responseInfo         OBJ_id_cmc,19L\n\n#define SN_id_cmc_queryPending          \"id-cmc-queryPending\"\n#define NID_id_cmc_queryPending         343\n#define OBJ_id_cmc_queryPending         OBJ_id_cmc,21L\n\n#define SN_id_cmc_popLinkRandom         \"id-cmc-popLinkRandom\"\n#define NID_id_cmc_popLinkRandom                344\n#define OBJ_id_cmc_popLinkRandom                OBJ_id_cmc,22L\n\n#define SN_id_cmc_popLinkWitness                \"id-cmc-popLinkWitness\"\n#define NID_id_cmc_popLinkWitness               345\n#define OBJ_id_cmc_popLinkWitness               OBJ_id_cmc,23L\n\n#define SN_id_cmc_confirmCertAcceptance         \"id-cmc-confirmCertAcceptance\"\n#define NID_id_cmc_confirmCertAcceptance                346\n#define OBJ_id_cmc_confirmCertAcceptance                OBJ_id_cmc,24L\n\n#define SN_id_on_personalData           \"id-on-personalData\"\n#define NID_id_on_personalData          347\n#define OBJ_id_on_personalData          OBJ_id_on,1L\n\n#define SN_id_on_permanentIdentifier            \"id-on-permanentIdentifier\"\n#define LN_id_on_permanentIdentifier            \"Permanent Identifier\"\n#define NID_id_on_permanentIdentifier           858\n#define OBJ_id_on_permanentIdentifier           OBJ_id_on,3L\n\n#define SN_id_pda_dateOfBirth           \"id-pda-dateOfBirth\"\n#define NID_id_pda_dateOfBirth          348\n#define OBJ_id_pda_dateOfBirth          OBJ_id_pda,1L\n\n#define SN_id_pda_placeOfBirth          \"id-pda-placeOfBirth\"\n#define NID_id_pda_placeOfBirth         349\n#define OBJ_id_pda_placeOfBirth         OBJ_id_pda,2L\n\n#define SN_id_pda_gender                \"id-pda-gender\"\n#define NID_id_pda_gender               351\n#define OBJ_id_pda_gender               OBJ_id_pda,3L\n\n#define SN_id_pda_countryOfCitizenship          \"id-pda-countryOfCitizenship\"\n#define NID_id_pda_countryOfCitizenship         352\n#define OBJ_id_pda_countryOfCitizenship         OBJ_id_pda,4L\n\n#define SN_id_pda_countryOfResidence            \"id-pda-countryOfResidence\"\n#define NID_id_pda_countryOfResidence           353\n#define OBJ_id_pda_countryOfResidence           OBJ_id_pda,5L\n\n#define SN_id_aca_authenticationInfo            \"id-aca-authenticationInfo\"\n#define NID_id_aca_authenticationInfo           354\n#define OBJ_id_aca_authenticationInfo           OBJ_id_aca,1L\n\n#define SN_id_aca_accessIdentity                \"id-aca-accessIdentity\"\n#define NID_id_aca_accessIdentity               355\n#define OBJ_id_aca_accessIdentity               OBJ_id_aca,2L\n\n#define SN_id_aca_chargingIdentity              \"id-aca-chargingIdentity\"\n#define NID_id_aca_chargingIdentity             356\n#define OBJ_id_aca_chargingIdentity             OBJ_id_aca,3L\n\n#define SN_id_aca_group         \"id-aca-group\"\n#define NID_id_aca_group                357\n#define OBJ_id_aca_group                OBJ_id_aca,4L\n\n#define SN_id_aca_role          \"id-aca-role\"\n#define NID_id_aca_role         358\n#define OBJ_id_aca_role         OBJ_id_aca,5L\n\n#define SN_id_aca_encAttrs              \"id-aca-encAttrs\"\n#define NID_id_aca_encAttrs             399\n#define OBJ_id_aca_encAttrs             OBJ_id_aca,6L\n\n#define SN_id_qcs_pkixQCSyntax_v1               \"id-qcs-pkixQCSyntax-v1\"\n#define NID_id_qcs_pkixQCSyntax_v1              359\n#define OBJ_id_qcs_pkixQCSyntax_v1              OBJ_id_qcs,1L\n\n#define SN_id_cct_crs           \"id-cct-crs\"\n#define NID_id_cct_crs          360\n#define OBJ_id_cct_crs          OBJ_id_cct,1L\n\n#define SN_id_cct_PKIData               \"id-cct-PKIData\"\n#define NID_id_cct_PKIData              361\n#define OBJ_id_cct_PKIData              OBJ_id_cct,2L\n\n#define SN_id_cct_PKIResponse           \"id-cct-PKIResponse\"\n#define NID_id_cct_PKIResponse          362\n#define OBJ_id_cct_PKIResponse          OBJ_id_cct,3L\n\n#define SN_id_ppl_anyLanguage           \"id-ppl-anyLanguage\"\n#define LN_id_ppl_anyLanguage           \"Any language\"\n#define NID_id_ppl_anyLanguage          664\n#define OBJ_id_ppl_anyLanguage          OBJ_id_ppl,0L\n\n#define SN_id_ppl_inheritAll            \"id-ppl-inheritAll\"\n#define LN_id_ppl_inheritAll            \"Inherit all\"\n#define NID_id_ppl_inheritAll           665\n#define OBJ_id_ppl_inheritAll           OBJ_id_ppl,1L\n\n#define SN_Independent          \"id-ppl-independent\"\n#define LN_Independent          \"Independent\"\n#define NID_Independent         667\n#define OBJ_Independent         OBJ_id_ppl,2L\n\n#define SN_ad_OCSP              \"OCSP\"\n#define LN_ad_OCSP              \"OCSP\"\n#define NID_ad_OCSP             178\n#define OBJ_ad_OCSP             OBJ_id_ad,1L\n\n#define SN_ad_ca_issuers                \"caIssuers\"\n#define LN_ad_ca_issuers                \"CA Issuers\"\n#define NID_ad_ca_issuers               179\n#define OBJ_ad_ca_issuers               OBJ_id_ad,2L\n\n#define SN_ad_timeStamping              \"ad_timestamping\"\n#define LN_ad_timeStamping              \"AD Time Stamping\"\n#define NID_ad_timeStamping             363\n#define OBJ_ad_timeStamping             OBJ_id_ad,3L\n\n#define SN_ad_dvcs              \"AD_DVCS\"\n#define LN_ad_dvcs              \"ad dvcs\"\n#define NID_ad_dvcs             364\n#define OBJ_ad_dvcs             OBJ_id_ad,4L\n\n#define SN_caRepository         \"caRepository\"\n#define LN_caRepository         \"CA Repository\"\n#define NID_caRepository                785\n#define OBJ_caRepository                OBJ_id_ad,5L\n\n#define OBJ_id_pkix_OCSP                OBJ_ad_OCSP\n\n#define SN_id_pkix_OCSP_basic           \"basicOCSPResponse\"\n#define LN_id_pkix_OCSP_basic           \"Basic OCSP Response\"\n#define NID_id_pkix_OCSP_basic          365\n#define OBJ_id_pkix_OCSP_basic          OBJ_id_pkix_OCSP,1L\n\n#define SN_id_pkix_OCSP_Nonce           \"Nonce\"\n#define LN_id_pkix_OCSP_Nonce           \"OCSP Nonce\"\n#define NID_id_pkix_OCSP_Nonce          366\n#define OBJ_id_pkix_OCSP_Nonce          OBJ_id_pkix_OCSP,2L\n\n#define SN_id_pkix_OCSP_CrlID           \"CrlID\"\n#define LN_id_pkix_OCSP_CrlID           \"OCSP CRL ID\"\n#define NID_id_pkix_OCSP_CrlID          367\n#define OBJ_id_pkix_OCSP_CrlID          OBJ_id_pkix_OCSP,3L\n\n#define SN_id_pkix_OCSP_acceptableResponses             \"acceptableResponses\"\n#define LN_id_pkix_OCSP_acceptableResponses             \"Acceptable OCSP Responses\"\n#define NID_id_pkix_OCSP_acceptableResponses            368\n#define OBJ_id_pkix_OCSP_acceptableResponses            OBJ_id_pkix_OCSP,4L\n\n#define SN_id_pkix_OCSP_noCheck         \"noCheck\"\n#define LN_id_pkix_OCSP_noCheck         \"OCSP No Check\"\n#define NID_id_pkix_OCSP_noCheck                369\n#define OBJ_id_pkix_OCSP_noCheck                OBJ_id_pkix_OCSP,5L\n\n#define SN_id_pkix_OCSP_archiveCutoff           \"archiveCutoff\"\n#define LN_id_pkix_OCSP_archiveCutoff           \"OCSP Archive Cutoff\"\n#define NID_id_pkix_OCSP_archiveCutoff          370\n#define OBJ_id_pkix_OCSP_archiveCutoff          OBJ_id_pkix_OCSP,6L\n\n#define SN_id_pkix_OCSP_serviceLocator          \"serviceLocator\"\n#define LN_id_pkix_OCSP_serviceLocator          \"OCSP Service Locator\"\n#define NID_id_pkix_OCSP_serviceLocator         371\n#define OBJ_id_pkix_OCSP_serviceLocator         OBJ_id_pkix_OCSP,7L\n\n#define SN_id_pkix_OCSP_extendedStatus          \"extendedStatus\"\n#define LN_id_pkix_OCSP_extendedStatus          \"Extended OCSP Status\"\n#define NID_id_pkix_OCSP_extendedStatus         372\n#define OBJ_id_pkix_OCSP_extendedStatus         OBJ_id_pkix_OCSP,8L\n\n#define SN_id_pkix_OCSP_valid           \"valid\"\n#define NID_id_pkix_OCSP_valid          373\n#define OBJ_id_pkix_OCSP_valid          OBJ_id_pkix_OCSP,9L\n\n#define SN_id_pkix_OCSP_path            \"path\"\n#define NID_id_pkix_OCSP_path           374\n#define OBJ_id_pkix_OCSP_path           OBJ_id_pkix_OCSP,10L\n\n#define SN_id_pkix_OCSP_trustRoot               \"trustRoot\"\n#define LN_id_pkix_OCSP_trustRoot               \"Trust Root\"\n#define NID_id_pkix_OCSP_trustRoot              375\n#define OBJ_id_pkix_OCSP_trustRoot              OBJ_id_pkix_OCSP,11L\n\n#define SN_algorithm            \"algorithm\"\n#define LN_algorithm            \"algorithm\"\n#define NID_algorithm           376\n#define OBJ_algorithm           1L,3L,14L,3L,2L\n\n#define SN_md5WithRSA           \"RSA-NP-MD5\"\n#define LN_md5WithRSA           \"md5WithRSA\"\n#define NID_md5WithRSA          104\n#define OBJ_md5WithRSA          OBJ_algorithm,3L\n\n#define SN_des_ecb              \"DES-ECB\"\n#define LN_des_ecb              \"des-ecb\"\n#define NID_des_ecb             29\n#define OBJ_des_ecb             OBJ_algorithm,6L\n\n#define SN_des_cbc              \"DES-CBC\"\n#define LN_des_cbc              \"des-cbc\"\n#define NID_des_cbc             31\n#define OBJ_des_cbc             OBJ_algorithm,7L\n\n#define SN_des_ofb64            \"DES-OFB\"\n#define LN_des_ofb64            \"des-ofb\"\n#define NID_des_ofb64           45\n#define OBJ_des_ofb64           OBJ_algorithm,8L\n\n#define SN_des_cfb64            \"DES-CFB\"\n#define LN_des_cfb64            \"des-cfb\"\n#define NID_des_cfb64           30\n#define OBJ_des_cfb64           OBJ_algorithm,9L\n\n#define SN_rsaSignature         \"rsaSignature\"\n#define NID_rsaSignature                377\n#define OBJ_rsaSignature                OBJ_algorithm,11L\n\n#define SN_dsa_2                \"DSA-old\"\n#define LN_dsa_2                \"dsaEncryption-old\"\n#define NID_dsa_2               67\n#define OBJ_dsa_2               OBJ_algorithm,12L\n\n#define SN_dsaWithSHA           \"DSA-SHA\"\n#define LN_dsaWithSHA           \"dsaWithSHA\"\n#define NID_dsaWithSHA          66\n#define OBJ_dsaWithSHA          OBJ_algorithm,13L\n\n#define SN_shaWithRSAEncryption         \"RSA-SHA\"\n#define LN_shaWithRSAEncryption         \"shaWithRSAEncryption\"\n#define NID_shaWithRSAEncryption                42\n#define OBJ_shaWithRSAEncryption                OBJ_algorithm,15L\n\n#define SN_des_ede_ecb          \"DES-EDE\"\n#define LN_des_ede_ecb          \"des-ede\"\n#define NID_des_ede_ecb         32\n#define OBJ_des_ede_ecb         OBJ_algorithm,17L\n\n#define SN_des_ede3_ecb         \"DES-EDE3\"\n#define LN_des_ede3_ecb         \"des-ede3\"\n#define NID_des_ede3_ecb                33\n\n#define SN_des_ede_cbc          \"DES-EDE-CBC\"\n#define LN_des_ede_cbc          \"des-ede-cbc\"\n#define NID_des_ede_cbc         43\n\n#define SN_des_ede_cfb64                \"DES-EDE-CFB\"\n#define LN_des_ede_cfb64                \"des-ede-cfb\"\n#define NID_des_ede_cfb64               60\n\n#define SN_des_ede3_cfb64               \"DES-EDE3-CFB\"\n#define LN_des_ede3_cfb64               \"des-ede3-cfb\"\n#define NID_des_ede3_cfb64              61\n\n#define SN_des_ede_ofb64                \"DES-EDE-OFB\"\n#define LN_des_ede_ofb64                \"des-ede-ofb\"\n#define NID_des_ede_ofb64               62\n\n#define SN_des_ede3_ofb64               \"DES-EDE3-OFB\"\n#define LN_des_ede3_ofb64               \"des-ede3-ofb\"\n#define NID_des_ede3_ofb64              63\n\n#define SN_desx_cbc             \"DESX-CBC\"\n#define LN_desx_cbc             \"desx-cbc\"\n#define NID_desx_cbc            80\n\n#define SN_sha          \"SHA\"\n#define LN_sha          \"sha\"\n#define NID_sha         41\n#define OBJ_sha         OBJ_algorithm,18L\n\n#define SN_sha1         \"SHA1\"\n#define LN_sha1         \"sha1\"\n#define NID_sha1                64\n#define OBJ_sha1                OBJ_algorithm,26L\n\n#define SN_dsaWithSHA1_2                \"DSA-SHA1-old\"\n#define LN_dsaWithSHA1_2                \"dsaWithSHA1-old\"\n#define NID_dsaWithSHA1_2               70\n#define OBJ_dsaWithSHA1_2               OBJ_algorithm,27L\n\n#define SN_sha1WithRSA          \"RSA-SHA1-2\"\n#define LN_sha1WithRSA          \"sha1WithRSA\"\n#define NID_sha1WithRSA         115\n#define OBJ_sha1WithRSA         OBJ_algorithm,29L\n\n#define SN_ripemd160            \"RIPEMD160\"\n#define LN_ripemd160            \"ripemd160\"\n#define NID_ripemd160           117\n#define OBJ_ripemd160           1L,3L,36L,3L,2L,1L\n\n#define SN_ripemd160WithRSA             \"RSA-RIPEMD160\"\n#define LN_ripemd160WithRSA             \"ripemd160WithRSA\"\n#define NID_ripemd160WithRSA            119\n#define OBJ_ripemd160WithRSA            1L,3L,36L,3L,3L,1L,2L\n\n#define SN_sxnet                \"SXNetID\"\n#define LN_sxnet                \"Strong Extranet ID\"\n#define NID_sxnet               143\n#define OBJ_sxnet               1L,3L,101L,1L,4L,1L\n\n#define SN_X500         \"X500\"\n#define LN_X500         \"directory services (X.500)\"\n#define NID_X500                11\n#define OBJ_X500                2L,5L\n\n#define SN_X509         \"X509\"\n#define NID_X509                12\n#define OBJ_X509                OBJ_X500,4L\n\n#define SN_commonName           \"CN\"\n#define LN_commonName           \"commonName\"\n#define NID_commonName          13\n#define OBJ_commonName          OBJ_X509,3L\n\n#define SN_surname              \"SN\"\n#define LN_surname              \"surname\"\n#define NID_surname             100\n#define OBJ_surname             OBJ_X509,4L\n\n#define LN_serialNumber         \"serialNumber\"\n#define NID_serialNumber                105\n#define OBJ_serialNumber                OBJ_X509,5L\n\n#define SN_countryName          \"C\"\n#define LN_countryName          \"countryName\"\n#define NID_countryName         14\n#define OBJ_countryName         OBJ_X509,6L\n\n#define SN_localityName         \"L\"\n#define LN_localityName         \"localityName\"\n#define NID_localityName                15\n#define OBJ_localityName                OBJ_X509,7L\n\n#define SN_stateOrProvinceName          \"ST\"\n#define LN_stateOrProvinceName          \"stateOrProvinceName\"\n#define NID_stateOrProvinceName         16\n#define OBJ_stateOrProvinceName         OBJ_X509,8L\n\n#define SN_streetAddress                \"street\"\n#define LN_streetAddress                \"streetAddress\"\n#define NID_streetAddress               660\n#define OBJ_streetAddress               OBJ_X509,9L\n\n#define SN_organizationName             \"O\"\n#define LN_organizationName             \"organizationName\"\n#define NID_organizationName            17\n#define OBJ_organizationName            OBJ_X509,10L\n\n#define SN_organizationalUnitName               \"OU\"\n#define LN_organizationalUnitName               \"organizationalUnitName\"\n#define NID_organizationalUnitName              18\n#define OBJ_organizationalUnitName              OBJ_X509,11L\n\n#define SN_title                \"title\"\n#define LN_title                \"title\"\n#define NID_title               106\n#define OBJ_title               OBJ_X509,12L\n\n#define LN_description          \"description\"\n#define NID_description         107\n#define OBJ_description         OBJ_X509,13L\n\n#define LN_searchGuide          \"searchGuide\"\n#define NID_searchGuide         859\n#define OBJ_searchGuide         OBJ_X509,14L\n\n#define LN_businessCategory             \"businessCategory\"\n#define NID_businessCategory            860\n#define OBJ_businessCategory            OBJ_X509,15L\n\n#define LN_postalAddress                \"postalAddress\"\n#define NID_postalAddress               861\n#define OBJ_postalAddress               OBJ_X509,16L\n\n#define LN_postalCode           \"postalCode\"\n#define NID_postalCode          661\n#define OBJ_postalCode          OBJ_X509,17L\n\n#define LN_postOfficeBox                \"postOfficeBox\"\n#define NID_postOfficeBox               862\n#define OBJ_postOfficeBox               OBJ_X509,18L\n\n#define LN_physicalDeliveryOfficeName           \"physicalDeliveryOfficeName\"\n#define NID_physicalDeliveryOfficeName          863\n#define OBJ_physicalDeliveryOfficeName          OBJ_X509,19L\n\n#define LN_telephoneNumber              \"telephoneNumber\"\n#define NID_telephoneNumber             864\n#define OBJ_telephoneNumber             OBJ_X509,20L\n\n#define LN_telexNumber          \"telexNumber\"\n#define NID_telexNumber         865\n#define OBJ_telexNumber         OBJ_X509,21L\n\n#define LN_teletexTerminalIdentifier            \"teletexTerminalIdentifier\"\n#define NID_teletexTerminalIdentifier           866\n#define OBJ_teletexTerminalIdentifier           OBJ_X509,22L\n\n#define LN_facsimileTelephoneNumber             \"facsimileTelephoneNumber\"\n#define NID_facsimileTelephoneNumber            867\n#define OBJ_facsimileTelephoneNumber            OBJ_X509,23L\n\n#define LN_x121Address          \"x121Address\"\n#define NID_x121Address         868\n#define OBJ_x121Address         OBJ_X509,24L\n\n#define LN_internationaliSDNNumber              \"internationaliSDNNumber\"\n#define NID_internationaliSDNNumber             869\n#define OBJ_internationaliSDNNumber             OBJ_X509,25L\n\n#define LN_registeredAddress            \"registeredAddress\"\n#define NID_registeredAddress           870\n#define OBJ_registeredAddress           OBJ_X509,26L\n\n#define LN_destinationIndicator         \"destinationIndicator\"\n#define NID_destinationIndicator                871\n#define OBJ_destinationIndicator                OBJ_X509,27L\n\n#define LN_preferredDeliveryMethod              \"preferredDeliveryMethod\"\n#define NID_preferredDeliveryMethod             872\n#define OBJ_preferredDeliveryMethod             OBJ_X509,28L\n\n#define LN_presentationAddress          \"presentationAddress\"\n#define NID_presentationAddress         873\n#define OBJ_presentationAddress         OBJ_X509,29L\n\n#define LN_supportedApplicationContext          \"supportedApplicationContext\"\n#define NID_supportedApplicationContext         874\n#define OBJ_supportedApplicationContext         OBJ_X509,30L\n\n#define SN_member               \"member\"\n#define NID_member              875\n#define OBJ_member              OBJ_X509,31L\n\n#define SN_owner                \"owner\"\n#define NID_owner               876\n#define OBJ_owner               OBJ_X509,32L\n\n#define LN_roleOccupant         \"roleOccupant\"\n#define NID_roleOccupant                877\n#define OBJ_roleOccupant                OBJ_X509,33L\n\n#define SN_seeAlso              \"seeAlso\"\n#define NID_seeAlso             878\n#define OBJ_seeAlso             OBJ_X509,34L\n\n#define LN_userPassword         \"userPassword\"\n#define NID_userPassword                879\n#define OBJ_userPassword                OBJ_X509,35L\n\n#define LN_userCertificate              \"userCertificate\"\n#define NID_userCertificate             880\n#define OBJ_userCertificate             OBJ_X509,36L\n\n#define LN_cACertificate                \"cACertificate\"\n#define NID_cACertificate               881\n#define OBJ_cACertificate               OBJ_X509,37L\n\n#define LN_authorityRevocationList              \"authorityRevocationList\"\n#define NID_authorityRevocationList             882\n#define OBJ_authorityRevocationList             OBJ_X509,38L\n\n#define LN_certificateRevocationList            \"certificateRevocationList\"\n#define NID_certificateRevocationList           883\n#define OBJ_certificateRevocationList           OBJ_X509,39L\n\n#define LN_crossCertificatePair         \"crossCertificatePair\"\n#define NID_crossCertificatePair                884\n#define OBJ_crossCertificatePair                OBJ_X509,40L\n\n#define SN_name         \"name\"\n#define LN_name         \"name\"\n#define NID_name                173\n#define OBJ_name                OBJ_X509,41L\n\n#define SN_givenName            \"GN\"\n#define LN_givenName            \"givenName\"\n#define NID_givenName           99\n#define OBJ_givenName           OBJ_X509,42L\n\n#define SN_initials             \"initials\"\n#define LN_initials             \"initials\"\n#define NID_initials            101\n#define OBJ_initials            OBJ_X509,43L\n\n#define LN_generationQualifier          \"generationQualifier\"\n#define NID_generationQualifier         509\n#define OBJ_generationQualifier         OBJ_X509,44L\n\n#define LN_x500UniqueIdentifier         \"x500UniqueIdentifier\"\n#define NID_x500UniqueIdentifier                503\n#define OBJ_x500UniqueIdentifier                OBJ_X509,45L\n\n#define SN_dnQualifier          \"dnQualifier\"\n#define LN_dnQualifier          \"dnQualifier\"\n#define NID_dnQualifier         174\n#define OBJ_dnQualifier         OBJ_X509,46L\n\n#define LN_enhancedSearchGuide          \"enhancedSearchGuide\"\n#define NID_enhancedSearchGuide         885\n#define OBJ_enhancedSearchGuide         OBJ_X509,47L\n\n#define LN_protocolInformation          \"protocolInformation\"\n#define NID_protocolInformation         886\n#define OBJ_protocolInformation         OBJ_X509,48L\n\n#define LN_distinguishedName            \"distinguishedName\"\n#define NID_distinguishedName           887\n#define OBJ_distinguishedName           OBJ_X509,49L\n\n#define LN_uniqueMember         \"uniqueMember\"\n#define NID_uniqueMember                888\n#define OBJ_uniqueMember                OBJ_X509,50L\n\n#define LN_houseIdentifier              \"houseIdentifier\"\n#define NID_houseIdentifier             889\n#define OBJ_houseIdentifier             OBJ_X509,51L\n\n#define LN_supportedAlgorithms          \"supportedAlgorithms\"\n#define NID_supportedAlgorithms         890\n#define OBJ_supportedAlgorithms         OBJ_X509,52L\n\n#define LN_deltaRevocationList          \"deltaRevocationList\"\n#define NID_deltaRevocationList         891\n#define OBJ_deltaRevocationList         OBJ_X509,53L\n\n#define SN_dmdName              \"dmdName\"\n#define NID_dmdName             892\n#define OBJ_dmdName             OBJ_X509,54L\n\n#define LN_pseudonym            \"pseudonym\"\n#define NID_pseudonym           510\n#define OBJ_pseudonym           OBJ_X509,65L\n\n#define SN_role         \"role\"\n#define LN_role         \"role\"\n#define NID_role                400\n#define OBJ_role                OBJ_X509,72L\n\n#define SN_X500algorithms               \"X500algorithms\"\n#define LN_X500algorithms               \"directory services - algorithms\"\n#define NID_X500algorithms              378\n#define OBJ_X500algorithms              OBJ_X500,8L\n\n#define SN_rsa          \"RSA\"\n#define LN_rsa          \"rsa\"\n#define NID_rsa         19\n#define OBJ_rsa         OBJ_X500algorithms,1L,1L\n\n#define SN_mdc2WithRSA          \"RSA-MDC2\"\n#define LN_mdc2WithRSA          \"mdc2WithRSA\"\n#define NID_mdc2WithRSA         96\n#define OBJ_mdc2WithRSA         OBJ_X500algorithms,3L,100L\n\n#define SN_mdc2         \"MDC2\"\n#define LN_mdc2         \"mdc2\"\n#define NID_mdc2                95\n#define OBJ_mdc2                OBJ_X500algorithms,3L,101L\n\n#define SN_id_ce                \"id-ce\"\n#define NID_id_ce               81\n#define OBJ_id_ce               OBJ_X500,29L\n\n#define SN_subject_directory_attributes         \"subjectDirectoryAttributes\"\n#define LN_subject_directory_attributes         \"X509v3 Subject Directory Attributes\"\n#define NID_subject_directory_attributes                769\n#define OBJ_subject_directory_attributes                OBJ_id_ce,9L\n\n#define SN_subject_key_identifier               \"subjectKeyIdentifier\"\n#define LN_subject_key_identifier               \"X509v3 Subject Key Identifier\"\n#define NID_subject_key_identifier              82\n#define OBJ_subject_key_identifier              OBJ_id_ce,14L\n\n#define SN_key_usage            \"keyUsage\"\n#define LN_key_usage            \"X509v3 Key Usage\"\n#define NID_key_usage           83\n#define OBJ_key_usage           OBJ_id_ce,15L\n\n#define SN_private_key_usage_period             \"privateKeyUsagePeriod\"\n#define LN_private_key_usage_period             \"X509v3 Private Key Usage Period\"\n#define NID_private_key_usage_period            84\n#define OBJ_private_key_usage_period            OBJ_id_ce,16L\n\n#define SN_subject_alt_name             \"subjectAltName\"\n#define LN_subject_alt_name             \"X509v3 Subject Alternative Name\"\n#define NID_subject_alt_name            85\n#define OBJ_subject_alt_name            OBJ_id_ce,17L\n\n#define SN_issuer_alt_name              \"issuerAltName\"\n#define LN_issuer_alt_name              \"X509v3 Issuer Alternative Name\"\n#define NID_issuer_alt_name             86\n#define OBJ_issuer_alt_name             OBJ_id_ce,18L\n\n#define SN_basic_constraints            \"basicConstraints\"\n#define LN_basic_constraints            \"X509v3 Basic Constraints\"\n#define NID_basic_constraints           87\n#define OBJ_basic_constraints           OBJ_id_ce,19L\n\n#define SN_crl_number           \"crlNumber\"\n#define LN_crl_number           \"X509v3 CRL Number\"\n#define NID_crl_number          88\n#define OBJ_crl_number          OBJ_id_ce,20L\n\n#define SN_crl_reason           \"CRLReason\"\n#define LN_crl_reason           \"X509v3 CRL Reason Code\"\n#define NID_crl_reason          141\n#define OBJ_crl_reason          OBJ_id_ce,21L\n\n#define SN_invalidity_date              \"invalidityDate\"\n#define LN_invalidity_date              \"Invalidity Date\"\n#define NID_invalidity_date             142\n#define OBJ_invalidity_date             OBJ_id_ce,24L\n\n#define SN_delta_crl            \"deltaCRL\"\n#define LN_delta_crl            \"X509v3 Delta CRL Indicator\"\n#define NID_delta_crl           140\n#define OBJ_delta_crl           OBJ_id_ce,27L\n\n#define SN_issuing_distribution_point           \"issuingDistributionPoint\"\n#define LN_issuing_distribution_point           \"X509v3 Issuing Distrubution Point\"\n#define NID_issuing_distribution_point          770\n#define OBJ_issuing_distribution_point          OBJ_id_ce,28L\n\n#define SN_certificate_issuer           \"certificateIssuer\"\n#define LN_certificate_issuer           \"X509v3 Certificate Issuer\"\n#define NID_certificate_issuer          771\n#define OBJ_certificate_issuer          OBJ_id_ce,29L\n\n#define SN_name_constraints             \"nameConstraints\"\n#define LN_name_constraints             \"X509v3 Name Constraints\"\n#define NID_name_constraints            666\n#define OBJ_name_constraints            OBJ_id_ce,30L\n\n#define SN_crl_distribution_points              \"crlDistributionPoints\"\n#define LN_crl_distribution_points              \"X509v3 CRL Distribution Points\"\n#define NID_crl_distribution_points             103\n#define OBJ_crl_distribution_points             OBJ_id_ce,31L\n\n#define SN_certificate_policies         \"certificatePolicies\"\n#define LN_certificate_policies         \"X509v3 Certificate Policies\"\n#define NID_certificate_policies                89\n#define OBJ_certificate_policies                OBJ_id_ce,32L\n\n#define SN_any_policy           \"anyPolicy\"\n#define LN_any_policy           \"X509v3 Any Policy\"\n#define NID_any_policy          746\n#define OBJ_any_policy          OBJ_certificate_policies,0L\n\n#define SN_policy_mappings              \"policyMappings\"\n#define LN_policy_mappings              \"X509v3 Policy Mappings\"\n#define NID_policy_mappings             747\n#define OBJ_policy_mappings             OBJ_id_ce,33L\n\n#define SN_authority_key_identifier             \"authorityKeyIdentifier\"\n#define LN_authority_key_identifier             \"X509v3 Authority Key Identifier\"\n#define NID_authority_key_identifier            90\n#define OBJ_authority_key_identifier            OBJ_id_ce,35L\n\n#define SN_policy_constraints           \"policyConstraints\"\n#define LN_policy_constraints           \"X509v3 Policy Constraints\"\n#define NID_policy_constraints          401\n#define OBJ_policy_constraints          OBJ_id_ce,36L\n\n#define SN_ext_key_usage                \"extendedKeyUsage\"\n#define LN_ext_key_usage                \"X509v3 Extended Key Usage\"\n#define NID_ext_key_usage               126\n#define OBJ_ext_key_usage               OBJ_id_ce,37L\n\n#define SN_freshest_crl         \"freshestCRL\"\n#define LN_freshest_crl         \"X509v3 Freshest CRL\"\n#define NID_freshest_crl                857\n#define OBJ_freshest_crl                OBJ_id_ce,46L\n\n#define SN_inhibit_any_policy           \"inhibitAnyPolicy\"\n#define LN_inhibit_any_policy           \"X509v3 Inhibit Any Policy\"\n#define NID_inhibit_any_policy          748\n#define OBJ_inhibit_any_policy          OBJ_id_ce,54L\n\n#define SN_target_information           \"targetInformation\"\n#define LN_target_information           \"X509v3 AC Targeting\"\n#define NID_target_information          402\n#define OBJ_target_information          OBJ_id_ce,55L\n\n#define SN_no_rev_avail         \"noRevAvail\"\n#define LN_no_rev_avail         \"X509v3 No Revocation Available\"\n#define NID_no_rev_avail                403\n#define OBJ_no_rev_avail                OBJ_id_ce,56L\n\n#define SN_anyExtendedKeyUsage          \"anyExtendedKeyUsage\"\n#define LN_anyExtendedKeyUsage          \"Any Extended Key Usage\"\n#define NID_anyExtendedKeyUsage         910\n#define OBJ_anyExtendedKeyUsage         OBJ_ext_key_usage,0L\n\n#define SN_netscape             \"Netscape\"\n#define LN_netscape             \"Netscape Communications Corp.\"\n#define NID_netscape            57\n#define OBJ_netscape            2L,16L,840L,1L,113730L\n\n#define SN_netscape_cert_extension              \"nsCertExt\"\n#define LN_netscape_cert_extension              \"Netscape Certificate Extension\"\n#define NID_netscape_cert_extension             58\n#define OBJ_netscape_cert_extension             OBJ_netscape,1L\n\n#define SN_netscape_data_type           \"nsDataType\"\n#define LN_netscape_data_type           \"Netscape Data Type\"\n#define NID_netscape_data_type          59\n#define OBJ_netscape_data_type          OBJ_netscape,2L\n\n#define SN_netscape_cert_type           \"nsCertType\"\n#define LN_netscape_cert_type           \"Netscape Cert Type\"\n#define NID_netscape_cert_type          71\n#define OBJ_netscape_cert_type          OBJ_netscape_cert_extension,1L\n\n#define SN_netscape_base_url            \"nsBaseUrl\"\n#define LN_netscape_base_url            \"Netscape Base Url\"\n#define NID_netscape_base_url           72\n#define OBJ_netscape_base_url           OBJ_netscape_cert_extension,2L\n\n#define SN_netscape_revocation_url              \"nsRevocationUrl\"\n#define LN_netscape_revocation_url              \"Netscape Revocation Url\"\n#define NID_netscape_revocation_url             73\n#define OBJ_netscape_revocation_url             OBJ_netscape_cert_extension,3L\n\n#define SN_netscape_ca_revocation_url           \"nsCaRevocationUrl\"\n#define LN_netscape_ca_revocation_url           \"Netscape CA Revocation Url\"\n#define NID_netscape_ca_revocation_url          74\n#define OBJ_netscape_ca_revocation_url          OBJ_netscape_cert_extension,4L\n\n#define SN_netscape_renewal_url         \"nsRenewalUrl\"\n#define LN_netscape_renewal_url         \"Netscape Renewal Url\"\n#define NID_netscape_renewal_url                75\n#define OBJ_netscape_renewal_url                OBJ_netscape_cert_extension,7L\n\n#define SN_netscape_ca_policy_url               \"nsCaPolicyUrl\"\n#define LN_netscape_ca_policy_url               \"Netscape CA Policy Url\"\n#define NID_netscape_ca_policy_url              76\n#define OBJ_netscape_ca_policy_url              OBJ_netscape_cert_extension,8L\n\n#define SN_netscape_ssl_server_name             \"nsSslServerName\"\n#define LN_netscape_ssl_server_name             \"Netscape SSL Server Name\"\n#define NID_netscape_ssl_server_name            77\n#define OBJ_netscape_ssl_server_name            OBJ_netscape_cert_extension,12L\n\n#define SN_netscape_comment             \"nsComment\"\n#define LN_netscape_comment             \"Netscape Comment\"\n#define NID_netscape_comment            78\n#define OBJ_netscape_comment            OBJ_netscape_cert_extension,13L\n\n#define SN_netscape_cert_sequence               \"nsCertSequence\"\n#define LN_netscape_cert_sequence               \"Netscape Certificate Sequence\"\n#define NID_netscape_cert_sequence              79\n#define OBJ_netscape_cert_sequence              OBJ_netscape_data_type,5L\n\n#define SN_ns_sgc               \"nsSGC\"\n#define LN_ns_sgc               \"Netscape Server Gated Crypto\"\n#define NID_ns_sgc              139\n#define OBJ_ns_sgc              OBJ_netscape,4L,1L\n\n#define SN_org          \"ORG\"\n#define LN_org          \"org\"\n#define NID_org         379\n#define OBJ_org         OBJ_iso,3L\n\n#define SN_dod          \"DOD\"\n#define LN_dod          \"dod\"\n#define NID_dod         380\n#define OBJ_dod         OBJ_org,6L\n\n#define SN_iana         \"IANA\"\n#define LN_iana         \"iana\"\n#define NID_iana                381\n#define OBJ_iana                OBJ_dod,1L\n\n#define OBJ_internet            OBJ_iana\n\n#define SN_Directory            \"directory\"\n#define LN_Directory            \"Directory\"\n#define NID_Directory           382\n#define OBJ_Directory           OBJ_internet,1L\n\n#define SN_Management           \"mgmt\"\n#define LN_Management           \"Management\"\n#define NID_Management          383\n#define OBJ_Management          OBJ_internet,2L\n\n#define SN_Experimental         \"experimental\"\n#define LN_Experimental         \"Experimental\"\n#define NID_Experimental                384\n#define OBJ_Experimental                OBJ_internet,3L\n\n#define SN_Private              \"private\"\n#define LN_Private              \"Private\"\n#define NID_Private             385\n#define OBJ_Private             OBJ_internet,4L\n\n#define SN_Security             \"security\"\n#define LN_Security             \"Security\"\n#define NID_Security            386\n#define OBJ_Security            OBJ_internet,5L\n\n#define SN_SNMPv2               \"snmpv2\"\n#define LN_SNMPv2               \"SNMPv2\"\n#define NID_SNMPv2              387\n#define OBJ_SNMPv2              OBJ_internet,6L\n\n#define LN_Mail         \"Mail\"\n#define NID_Mail                388\n#define OBJ_Mail                OBJ_internet,7L\n\n#define SN_Enterprises          \"enterprises\"\n#define LN_Enterprises          \"Enterprises\"\n#define NID_Enterprises         389\n#define OBJ_Enterprises         OBJ_Private,1L\n\n#define SN_dcObject             \"dcobject\"\n#define LN_dcObject             \"dcObject\"\n#define NID_dcObject            390\n#define OBJ_dcObject            OBJ_Enterprises,1466L,344L\n\n#define SN_mime_mhs             \"mime-mhs\"\n#define LN_mime_mhs             \"MIME MHS\"\n#define NID_mime_mhs            504\n#define OBJ_mime_mhs            OBJ_Mail,1L\n\n#define SN_mime_mhs_headings            \"mime-mhs-headings\"\n#define LN_mime_mhs_headings            \"mime-mhs-headings\"\n#define NID_mime_mhs_headings           505\n#define OBJ_mime_mhs_headings           OBJ_mime_mhs,1L\n\n#define SN_mime_mhs_bodies              \"mime-mhs-bodies\"\n#define LN_mime_mhs_bodies              \"mime-mhs-bodies\"\n#define NID_mime_mhs_bodies             506\n#define OBJ_mime_mhs_bodies             OBJ_mime_mhs,2L\n\n#define SN_id_hex_partial_message               \"id-hex-partial-message\"\n#define LN_id_hex_partial_message               \"id-hex-partial-message\"\n#define NID_id_hex_partial_message              507\n#define OBJ_id_hex_partial_message              OBJ_mime_mhs_headings,1L\n\n#define SN_id_hex_multipart_message             \"id-hex-multipart-message\"\n#define LN_id_hex_multipart_message             \"id-hex-multipart-message\"\n#define NID_id_hex_multipart_message            508\n#define OBJ_id_hex_multipart_message            OBJ_mime_mhs_headings,2L\n\n#define SN_rle_compression              \"RLE\"\n#define LN_rle_compression              \"run length compression\"\n#define NID_rle_compression             124\n#define OBJ_rle_compression             1L,1L,1L,1L,666L,1L\n\n#define SN_zlib_compression             \"ZLIB\"\n#define LN_zlib_compression             \"zlib compression\"\n#define NID_zlib_compression            125\n#define OBJ_zlib_compression            OBJ_id_smime_alg,8L\n\n#define OBJ_csor                2L,16L,840L,1L,101L,3L\n\n#define OBJ_nistAlgorithms              OBJ_csor,4L\n\n#define OBJ_aes         OBJ_nistAlgorithms,1L\n\n#define SN_aes_128_ecb          \"AES-128-ECB\"\n#define LN_aes_128_ecb          \"aes-128-ecb\"\n#define NID_aes_128_ecb         418\n#define OBJ_aes_128_ecb         OBJ_aes,1L\n\n#define SN_aes_128_cbc          \"AES-128-CBC\"\n#define LN_aes_128_cbc          \"aes-128-cbc\"\n#define NID_aes_128_cbc         419\n#define OBJ_aes_128_cbc         OBJ_aes,2L\n\n#define SN_aes_128_ofb128               \"AES-128-OFB\"\n#define LN_aes_128_ofb128               \"aes-128-ofb\"\n#define NID_aes_128_ofb128              420\n#define OBJ_aes_128_ofb128              OBJ_aes,3L\n\n#define SN_aes_128_cfb128               \"AES-128-CFB\"\n#define LN_aes_128_cfb128               \"aes-128-cfb\"\n#define NID_aes_128_cfb128              421\n#define OBJ_aes_128_cfb128              OBJ_aes,4L\n\n#define SN_id_aes128_wrap               \"id-aes128-wrap\"\n#define NID_id_aes128_wrap              788\n#define OBJ_id_aes128_wrap              OBJ_aes,5L\n\n#define SN_aes_128_gcm          \"id-aes128-GCM\"\n#define LN_aes_128_gcm          \"aes-128-gcm\"\n#define NID_aes_128_gcm         895\n#define OBJ_aes_128_gcm         OBJ_aes,6L\n\n#define SN_aes_128_ccm          \"id-aes128-CCM\"\n#define LN_aes_128_ccm          \"aes-128-ccm\"\n#define NID_aes_128_ccm         896\n#define OBJ_aes_128_ccm         OBJ_aes,7L\n\n#define SN_id_aes128_wrap_pad           \"id-aes128-wrap-pad\"\n#define NID_id_aes128_wrap_pad          897\n#define OBJ_id_aes128_wrap_pad          OBJ_aes,8L\n\n#define SN_aes_192_ecb          \"AES-192-ECB\"\n#define LN_aes_192_ecb          \"aes-192-ecb\"\n#define NID_aes_192_ecb         422\n#define OBJ_aes_192_ecb         OBJ_aes,21L\n\n#define SN_aes_192_cbc          \"AES-192-CBC\"\n#define LN_aes_192_cbc          \"aes-192-cbc\"\n#define NID_aes_192_cbc         423\n#define OBJ_aes_192_cbc         OBJ_aes,22L\n\n#define SN_aes_192_ofb128               \"AES-192-OFB\"\n#define LN_aes_192_ofb128               \"aes-192-ofb\"\n#define NID_aes_192_ofb128              424\n#define OBJ_aes_192_ofb128              OBJ_aes,23L\n\n#define SN_aes_192_cfb128               \"AES-192-CFB\"\n#define LN_aes_192_cfb128               \"aes-192-cfb\"\n#define NID_aes_192_cfb128              425\n#define OBJ_aes_192_cfb128              OBJ_aes,24L\n\n#define SN_id_aes192_wrap               \"id-aes192-wrap\"\n#define NID_id_aes192_wrap              789\n#define OBJ_id_aes192_wrap              OBJ_aes,25L\n\n#define SN_aes_192_gcm          \"id-aes192-GCM\"\n#define LN_aes_192_gcm          \"aes-192-gcm\"\n#define NID_aes_192_gcm         898\n#define OBJ_aes_192_gcm         OBJ_aes,26L\n\n#define SN_aes_192_ccm          \"id-aes192-CCM\"\n#define LN_aes_192_ccm          \"aes-192-ccm\"\n#define NID_aes_192_ccm         899\n#define OBJ_aes_192_ccm         OBJ_aes,27L\n\n#define SN_id_aes192_wrap_pad           \"id-aes192-wrap-pad\"\n#define NID_id_aes192_wrap_pad          900\n#define OBJ_id_aes192_wrap_pad          OBJ_aes,28L\n\n#define SN_aes_256_ecb          \"AES-256-ECB\"\n#define LN_aes_256_ecb          \"aes-256-ecb\"\n#define NID_aes_256_ecb         426\n#define OBJ_aes_256_ecb         OBJ_aes,41L\n\n#define SN_aes_256_cbc          \"AES-256-CBC\"\n#define LN_aes_256_cbc          \"aes-256-cbc\"\n#define NID_aes_256_cbc         427\n#define OBJ_aes_256_cbc         OBJ_aes,42L\n\n#define SN_aes_256_ofb128               \"AES-256-OFB\"\n#define LN_aes_256_ofb128               \"aes-256-ofb\"\n#define NID_aes_256_ofb128              428\n#define OBJ_aes_256_ofb128              OBJ_aes,43L\n\n#define SN_aes_256_cfb128               \"AES-256-CFB\"\n#define LN_aes_256_cfb128               \"aes-256-cfb\"\n#define NID_aes_256_cfb128              429\n#define OBJ_aes_256_cfb128              OBJ_aes,44L\n\n#define SN_id_aes256_wrap               \"id-aes256-wrap\"\n#define NID_id_aes256_wrap              790\n#define OBJ_id_aes256_wrap              OBJ_aes,45L\n\n#define SN_aes_256_gcm          \"id-aes256-GCM\"\n#define LN_aes_256_gcm          \"aes-256-gcm\"\n#define NID_aes_256_gcm         901\n#define OBJ_aes_256_gcm         OBJ_aes,46L\n\n#define SN_aes_256_ccm          \"id-aes256-CCM\"\n#define LN_aes_256_ccm          \"aes-256-ccm\"\n#define NID_aes_256_ccm         902\n#define OBJ_aes_256_ccm         OBJ_aes,47L\n\n#define SN_id_aes256_wrap_pad           \"id-aes256-wrap-pad\"\n#define NID_id_aes256_wrap_pad          903\n#define OBJ_id_aes256_wrap_pad          OBJ_aes,48L\n\n#define SN_aes_128_cfb1         \"AES-128-CFB1\"\n#define LN_aes_128_cfb1         \"aes-128-cfb1\"\n#define NID_aes_128_cfb1                650\n\n#define SN_aes_192_cfb1         \"AES-192-CFB1\"\n#define LN_aes_192_cfb1         \"aes-192-cfb1\"\n#define NID_aes_192_cfb1                651\n\n#define SN_aes_256_cfb1         \"AES-256-CFB1\"\n#define LN_aes_256_cfb1         \"aes-256-cfb1\"\n#define NID_aes_256_cfb1                652\n\n#define SN_aes_128_cfb8         \"AES-128-CFB8\"\n#define LN_aes_128_cfb8         \"aes-128-cfb8\"\n#define NID_aes_128_cfb8                653\n\n#define SN_aes_192_cfb8         \"AES-192-CFB8\"\n#define LN_aes_192_cfb8         \"aes-192-cfb8\"\n#define NID_aes_192_cfb8                654\n\n#define SN_aes_256_cfb8         \"AES-256-CFB8\"\n#define LN_aes_256_cfb8         \"aes-256-cfb8\"\n#define NID_aes_256_cfb8                655\n\n#define SN_aes_128_ctr          \"AES-128-CTR\"\n#define LN_aes_128_ctr          \"aes-128-ctr\"\n#define NID_aes_128_ctr         904\n\n#define SN_aes_192_ctr          \"AES-192-CTR\"\n#define LN_aes_192_ctr          \"aes-192-ctr\"\n#define NID_aes_192_ctr         905\n\n#define SN_aes_256_ctr          \"AES-256-CTR\"\n#define LN_aes_256_ctr          \"aes-256-ctr\"\n#define NID_aes_256_ctr         906\n\n#define SN_aes_128_xts          \"AES-128-XTS\"\n#define LN_aes_128_xts          \"aes-128-xts\"\n#define NID_aes_128_xts         913\n\n#define SN_aes_256_xts          \"AES-256-XTS\"\n#define LN_aes_256_xts          \"aes-256-xts\"\n#define NID_aes_256_xts         914\n\n#define SN_des_cfb1             \"DES-CFB1\"\n#define LN_des_cfb1             \"des-cfb1\"\n#define NID_des_cfb1            656\n\n#define SN_des_cfb8             \"DES-CFB8\"\n#define LN_des_cfb8             \"des-cfb8\"\n#define NID_des_cfb8            657\n\n#define SN_des_ede3_cfb1                \"DES-EDE3-CFB1\"\n#define LN_des_ede3_cfb1                \"des-ede3-cfb1\"\n#define NID_des_ede3_cfb1               658\n\n#define SN_des_ede3_cfb8                \"DES-EDE3-CFB8\"\n#define LN_des_ede3_cfb8                \"des-ede3-cfb8\"\n#define NID_des_ede3_cfb8               659\n\n#define OBJ_nist_hashalgs               OBJ_nistAlgorithms,2L\n\n#define SN_sha256               \"SHA256\"\n#define LN_sha256               \"sha256\"\n#define NID_sha256              672\n#define OBJ_sha256              OBJ_nist_hashalgs,1L\n\n#define SN_sha384               \"SHA384\"\n#define LN_sha384               \"sha384\"\n#define NID_sha384              673\n#define OBJ_sha384              OBJ_nist_hashalgs,2L\n\n#define SN_sha512               \"SHA512\"\n#define LN_sha512               \"sha512\"\n#define NID_sha512              674\n#define OBJ_sha512              OBJ_nist_hashalgs,3L\n\n#define SN_sha224               \"SHA224\"\n#define LN_sha224               \"sha224\"\n#define NID_sha224              675\n#define OBJ_sha224              OBJ_nist_hashalgs,4L\n\n#define OBJ_dsa_with_sha2               OBJ_nistAlgorithms,3L\n\n#define SN_dsa_with_SHA224              \"dsa_with_SHA224\"\n#define NID_dsa_with_SHA224             802\n#define OBJ_dsa_with_SHA224             OBJ_dsa_with_sha2,1L\n\n#define SN_dsa_with_SHA256              \"dsa_with_SHA256\"\n#define NID_dsa_with_SHA256             803\n#define OBJ_dsa_with_SHA256             OBJ_dsa_with_sha2,2L\n\n#define SN_hold_instruction_code                \"holdInstructionCode\"\n#define LN_hold_instruction_code                \"Hold Instruction Code\"\n#define NID_hold_instruction_code               430\n#define OBJ_hold_instruction_code               OBJ_id_ce,23L\n\n#define OBJ_holdInstruction             OBJ_X9_57,2L\n\n#define SN_hold_instruction_none                \"holdInstructionNone\"\n#define LN_hold_instruction_none                \"Hold Instruction None\"\n#define NID_hold_instruction_none               431\n#define OBJ_hold_instruction_none               OBJ_holdInstruction,1L\n\n#define SN_hold_instruction_call_issuer         \"holdInstructionCallIssuer\"\n#define LN_hold_instruction_call_issuer         \"Hold Instruction Call Issuer\"\n#define NID_hold_instruction_call_issuer                432\n#define OBJ_hold_instruction_call_issuer                OBJ_holdInstruction,2L\n\n#define SN_hold_instruction_reject              \"holdInstructionReject\"\n#define LN_hold_instruction_reject              \"Hold Instruction Reject\"\n#define NID_hold_instruction_reject             433\n#define OBJ_hold_instruction_reject             OBJ_holdInstruction,3L\n\n#define SN_data         \"data\"\n#define NID_data                434\n#define OBJ_data                OBJ_itu_t,9L\n\n#define SN_pss          \"pss\"\n#define NID_pss         435\n#define OBJ_pss         OBJ_data,2342L\n\n#define SN_ucl          \"ucl\"\n#define NID_ucl         436\n#define OBJ_ucl         OBJ_pss,19200300L\n\n#define SN_pilot                \"pilot\"\n#define NID_pilot               437\n#define OBJ_pilot               OBJ_ucl,100L\n\n#define LN_pilotAttributeType           \"pilotAttributeType\"\n#define NID_pilotAttributeType          438\n#define OBJ_pilotAttributeType          OBJ_pilot,1L\n\n#define LN_pilotAttributeSyntax         \"pilotAttributeSyntax\"\n#define NID_pilotAttributeSyntax                439\n#define OBJ_pilotAttributeSyntax                OBJ_pilot,3L\n\n#define LN_pilotObjectClass             \"pilotObjectClass\"\n#define NID_pilotObjectClass            440\n#define OBJ_pilotObjectClass            OBJ_pilot,4L\n\n#define LN_pilotGroups          \"pilotGroups\"\n#define NID_pilotGroups         441\n#define OBJ_pilotGroups         OBJ_pilot,10L\n\n#define LN_iA5StringSyntax              \"iA5StringSyntax\"\n#define NID_iA5StringSyntax             442\n#define OBJ_iA5StringSyntax             OBJ_pilotAttributeSyntax,4L\n\n#define LN_caseIgnoreIA5StringSyntax            \"caseIgnoreIA5StringSyntax\"\n#define NID_caseIgnoreIA5StringSyntax           443\n#define OBJ_caseIgnoreIA5StringSyntax           OBJ_pilotAttributeSyntax,5L\n\n#define LN_pilotObject          \"pilotObject\"\n#define NID_pilotObject         444\n#define OBJ_pilotObject         OBJ_pilotObjectClass,3L\n\n#define LN_pilotPerson          \"pilotPerson\"\n#define NID_pilotPerson         445\n#define OBJ_pilotPerson         OBJ_pilotObjectClass,4L\n\n#define SN_account              \"account\"\n#define NID_account             446\n#define OBJ_account             OBJ_pilotObjectClass,5L\n\n#define SN_document             \"document\"\n#define NID_document            447\n#define OBJ_document            OBJ_pilotObjectClass,6L\n\n#define SN_room         \"room\"\n#define NID_room                448\n#define OBJ_room                OBJ_pilotObjectClass,7L\n\n#define LN_documentSeries               \"documentSeries\"\n#define NID_documentSeries              449\n#define OBJ_documentSeries              OBJ_pilotObjectClass,9L\n\n#define SN_Domain               \"domain\"\n#define LN_Domain               \"Domain\"\n#define NID_Domain              392\n#define OBJ_Domain              OBJ_pilotObjectClass,13L\n\n#define LN_rFC822localPart              \"rFC822localPart\"\n#define NID_rFC822localPart             450\n#define OBJ_rFC822localPart             OBJ_pilotObjectClass,14L\n\n#define LN_dNSDomain            \"dNSDomain\"\n#define NID_dNSDomain           451\n#define OBJ_dNSDomain           OBJ_pilotObjectClass,15L\n\n#define LN_domainRelatedObject          \"domainRelatedObject\"\n#define NID_domainRelatedObject         452\n#define OBJ_domainRelatedObject         OBJ_pilotObjectClass,17L\n\n#define LN_friendlyCountry              \"friendlyCountry\"\n#define NID_friendlyCountry             453\n#define OBJ_friendlyCountry             OBJ_pilotObjectClass,18L\n\n#define LN_simpleSecurityObject         \"simpleSecurityObject\"\n#define NID_simpleSecurityObject                454\n#define OBJ_simpleSecurityObject                OBJ_pilotObjectClass,19L\n\n#define LN_pilotOrganization            \"pilotOrganization\"\n#define NID_pilotOrganization           455\n#define OBJ_pilotOrganization           OBJ_pilotObjectClass,20L\n\n#define LN_pilotDSA             \"pilotDSA\"\n#define NID_pilotDSA            456\n#define OBJ_pilotDSA            OBJ_pilotObjectClass,21L\n\n#define LN_qualityLabelledData          \"qualityLabelledData\"\n#define NID_qualityLabelledData         457\n#define OBJ_qualityLabelledData         OBJ_pilotObjectClass,22L\n\n#define SN_userId               \"UID\"\n#define LN_userId               \"userId\"\n#define NID_userId              458\n#define OBJ_userId              OBJ_pilotAttributeType,1L\n\n#define LN_textEncodedORAddress         \"textEncodedORAddress\"\n#define NID_textEncodedORAddress                459\n#define OBJ_textEncodedORAddress                OBJ_pilotAttributeType,2L\n\n#define SN_rfc822Mailbox                \"mail\"\n#define LN_rfc822Mailbox                \"rfc822Mailbox\"\n#define NID_rfc822Mailbox               460\n#define OBJ_rfc822Mailbox               OBJ_pilotAttributeType,3L\n\n#define SN_info         \"info\"\n#define NID_info                461\n#define OBJ_info                OBJ_pilotAttributeType,4L\n\n#define LN_favouriteDrink               \"favouriteDrink\"\n#define NID_favouriteDrink              462\n#define OBJ_favouriteDrink              OBJ_pilotAttributeType,5L\n\n#define LN_roomNumber           \"roomNumber\"\n#define NID_roomNumber          463\n#define OBJ_roomNumber          OBJ_pilotAttributeType,6L\n\n#define SN_photo                \"photo\"\n#define NID_photo               464\n#define OBJ_photo               OBJ_pilotAttributeType,7L\n\n#define LN_userClass            \"userClass\"\n#define NID_userClass           465\n#define OBJ_userClass           OBJ_pilotAttributeType,8L\n\n#define SN_host         \"host\"\n#define NID_host                466\n#define OBJ_host                OBJ_pilotAttributeType,9L\n\n#define SN_manager              \"manager\"\n#define NID_manager             467\n#define OBJ_manager             OBJ_pilotAttributeType,10L\n\n#define LN_documentIdentifier           \"documentIdentifier\"\n#define NID_documentIdentifier          468\n#define OBJ_documentIdentifier          OBJ_pilotAttributeType,11L\n\n#define LN_documentTitle                \"documentTitle\"\n#define NID_documentTitle               469\n#define OBJ_documentTitle               OBJ_pilotAttributeType,12L\n\n#define LN_documentVersion              \"documentVersion\"\n#define NID_documentVersion             470\n#define OBJ_documentVersion             OBJ_pilotAttributeType,13L\n\n#define LN_documentAuthor               \"documentAuthor\"\n#define NID_documentAuthor              471\n#define OBJ_documentAuthor              OBJ_pilotAttributeType,14L\n\n#define LN_documentLocation             \"documentLocation\"\n#define NID_documentLocation            472\n#define OBJ_documentLocation            OBJ_pilotAttributeType,15L\n\n#define LN_homeTelephoneNumber          \"homeTelephoneNumber\"\n#define NID_homeTelephoneNumber         473\n#define OBJ_homeTelephoneNumber         OBJ_pilotAttributeType,20L\n\n#define SN_secretary            \"secretary\"\n#define NID_secretary           474\n#define OBJ_secretary           OBJ_pilotAttributeType,21L\n\n#define LN_otherMailbox         \"otherMailbox\"\n#define NID_otherMailbox                475\n#define OBJ_otherMailbox                OBJ_pilotAttributeType,22L\n\n#define LN_lastModifiedTime             \"lastModifiedTime\"\n#define NID_lastModifiedTime            476\n#define OBJ_lastModifiedTime            OBJ_pilotAttributeType,23L\n\n#define LN_lastModifiedBy               \"lastModifiedBy\"\n#define NID_lastModifiedBy              477\n#define OBJ_lastModifiedBy              OBJ_pilotAttributeType,24L\n\n#define SN_domainComponent              \"DC\"\n#define LN_domainComponent              \"domainComponent\"\n#define NID_domainComponent             391\n#define OBJ_domainComponent             OBJ_pilotAttributeType,25L\n\n#define LN_aRecord              \"aRecord\"\n#define NID_aRecord             478\n#define OBJ_aRecord             OBJ_pilotAttributeType,26L\n\n#define LN_pilotAttributeType27         \"pilotAttributeType27\"\n#define NID_pilotAttributeType27                479\n#define OBJ_pilotAttributeType27                OBJ_pilotAttributeType,27L\n\n#define LN_mXRecord             \"mXRecord\"\n#define NID_mXRecord            480\n#define OBJ_mXRecord            OBJ_pilotAttributeType,28L\n\n#define LN_nSRecord             \"nSRecord\"\n#define NID_nSRecord            481\n#define OBJ_nSRecord            OBJ_pilotAttributeType,29L\n\n#define LN_sOARecord            \"sOARecord\"\n#define NID_sOARecord           482\n#define OBJ_sOARecord           OBJ_pilotAttributeType,30L\n\n#define LN_cNAMERecord          \"cNAMERecord\"\n#define NID_cNAMERecord         483\n#define OBJ_cNAMERecord         OBJ_pilotAttributeType,31L\n\n#define LN_associatedDomain             \"associatedDomain\"\n#define NID_associatedDomain            484\n#define OBJ_associatedDomain            OBJ_pilotAttributeType,37L\n\n#define LN_associatedName               \"associatedName\"\n#define NID_associatedName              485\n#define OBJ_associatedName              OBJ_pilotAttributeType,38L\n\n#define LN_homePostalAddress            \"homePostalAddress\"\n#define NID_homePostalAddress           486\n#define OBJ_homePostalAddress           OBJ_pilotAttributeType,39L\n\n#define LN_personalTitle                \"personalTitle\"\n#define NID_personalTitle               487\n#define OBJ_personalTitle               OBJ_pilotAttributeType,40L\n\n#define LN_mobileTelephoneNumber                \"mobileTelephoneNumber\"\n#define NID_mobileTelephoneNumber               488\n#define OBJ_mobileTelephoneNumber               OBJ_pilotAttributeType,41L\n\n#define LN_pagerTelephoneNumber         \"pagerTelephoneNumber\"\n#define NID_pagerTelephoneNumber                489\n#define OBJ_pagerTelephoneNumber                OBJ_pilotAttributeType,42L\n\n#define LN_friendlyCountryName          \"friendlyCountryName\"\n#define NID_friendlyCountryName         490\n#define OBJ_friendlyCountryName         OBJ_pilotAttributeType,43L\n\n#define LN_organizationalStatus         \"organizationalStatus\"\n#define NID_organizationalStatus                491\n#define OBJ_organizationalStatus                OBJ_pilotAttributeType,45L\n\n#define LN_janetMailbox         \"janetMailbox\"\n#define NID_janetMailbox                492\n#define OBJ_janetMailbox                OBJ_pilotAttributeType,46L\n\n#define LN_mailPreferenceOption         \"mailPreferenceOption\"\n#define NID_mailPreferenceOption                493\n#define OBJ_mailPreferenceOption                OBJ_pilotAttributeType,47L\n\n#define LN_buildingName         \"buildingName\"\n#define NID_buildingName                494\n#define OBJ_buildingName                OBJ_pilotAttributeType,48L\n\n#define LN_dSAQuality           \"dSAQuality\"\n#define NID_dSAQuality          495\n#define OBJ_dSAQuality          OBJ_pilotAttributeType,49L\n\n#define LN_singleLevelQuality           \"singleLevelQuality\"\n#define NID_singleLevelQuality          496\n#define OBJ_singleLevelQuality          OBJ_pilotAttributeType,50L\n\n#define LN_subtreeMinimumQuality                \"subtreeMinimumQuality\"\n#define NID_subtreeMinimumQuality               497\n#define OBJ_subtreeMinimumQuality               OBJ_pilotAttributeType,51L\n\n#define LN_subtreeMaximumQuality                \"subtreeMaximumQuality\"\n#define NID_subtreeMaximumQuality               498\n#define OBJ_subtreeMaximumQuality               OBJ_pilotAttributeType,52L\n\n#define LN_personalSignature            \"personalSignature\"\n#define NID_personalSignature           499\n#define OBJ_personalSignature           OBJ_pilotAttributeType,53L\n\n#define LN_dITRedirect          \"dITRedirect\"\n#define NID_dITRedirect         500\n#define OBJ_dITRedirect         OBJ_pilotAttributeType,54L\n\n#define SN_audio                \"audio\"\n#define NID_audio               501\n#define OBJ_audio               OBJ_pilotAttributeType,55L\n\n#define LN_documentPublisher            \"documentPublisher\"\n#define NID_documentPublisher           502\n#define OBJ_documentPublisher           OBJ_pilotAttributeType,56L\n\n#define SN_id_set               \"id-set\"\n#define LN_id_set               \"Secure Electronic Transactions\"\n#define NID_id_set              512\n#define OBJ_id_set              OBJ_international_organizations,42L\n\n#define SN_set_ctype            \"set-ctype\"\n#define LN_set_ctype            \"content types\"\n#define NID_set_ctype           513\n#define OBJ_set_ctype           OBJ_id_set,0L\n\n#define SN_set_msgExt           \"set-msgExt\"\n#define LN_set_msgExt           \"message extensions\"\n#define NID_set_msgExt          514\n#define OBJ_set_msgExt          OBJ_id_set,1L\n\n#define SN_set_attr             \"set-attr\"\n#define NID_set_attr            515\n#define OBJ_set_attr            OBJ_id_set,3L\n\n#define SN_set_policy           \"set-policy\"\n#define NID_set_policy          516\n#define OBJ_set_policy          OBJ_id_set,5L\n\n#define SN_set_certExt          \"set-certExt\"\n#define LN_set_certExt          \"certificate extensions\"\n#define NID_set_certExt         517\n#define OBJ_set_certExt         OBJ_id_set,7L\n\n#define SN_set_brand            \"set-brand\"\n#define NID_set_brand           518\n#define OBJ_set_brand           OBJ_id_set,8L\n\n#define SN_setct_PANData                \"setct-PANData\"\n#define NID_setct_PANData               519\n#define OBJ_setct_PANData               OBJ_set_ctype,0L\n\n#define SN_setct_PANToken               \"setct-PANToken\"\n#define NID_setct_PANToken              520\n#define OBJ_setct_PANToken              OBJ_set_ctype,1L\n\n#define SN_setct_PANOnly                \"setct-PANOnly\"\n#define NID_setct_PANOnly               521\n#define OBJ_setct_PANOnly               OBJ_set_ctype,2L\n\n#define SN_setct_OIData         \"setct-OIData\"\n#define NID_setct_OIData                522\n#define OBJ_setct_OIData                OBJ_set_ctype,3L\n\n#define SN_setct_PI             \"setct-PI\"\n#define NID_setct_PI            523\n#define OBJ_setct_PI            OBJ_set_ctype,4L\n\n#define SN_setct_PIData         \"setct-PIData\"\n#define NID_setct_PIData                524\n#define OBJ_setct_PIData                OBJ_set_ctype,5L\n\n#define SN_setct_PIDataUnsigned         \"setct-PIDataUnsigned\"\n#define NID_setct_PIDataUnsigned                525\n#define OBJ_setct_PIDataUnsigned                OBJ_set_ctype,6L\n\n#define SN_setct_HODInput               \"setct-HODInput\"\n#define NID_setct_HODInput              526\n#define OBJ_setct_HODInput              OBJ_set_ctype,7L\n\n#define SN_setct_AuthResBaggage         \"setct-AuthResBaggage\"\n#define NID_setct_AuthResBaggage                527\n#define OBJ_setct_AuthResBaggage                OBJ_set_ctype,8L\n\n#define SN_setct_AuthRevReqBaggage              \"setct-AuthRevReqBaggage\"\n#define NID_setct_AuthRevReqBaggage             528\n#define OBJ_setct_AuthRevReqBaggage             OBJ_set_ctype,9L\n\n#define SN_setct_AuthRevResBaggage              \"setct-AuthRevResBaggage\"\n#define NID_setct_AuthRevResBaggage             529\n#define OBJ_setct_AuthRevResBaggage             OBJ_set_ctype,10L\n\n#define SN_setct_CapTokenSeq            \"setct-CapTokenSeq\"\n#define NID_setct_CapTokenSeq           530\n#define OBJ_setct_CapTokenSeq           OBJ_set_ctype,11L\n\n#define SN_setct_PInitResData           \"setct-PInitResData\"\n#define NID_setct_PInitResData          531\n#define OBJ_setct_PInitResData          OBJ_set_ctype,12L\n\n#define SN_setct_PI_TBS         \"setct-PI-TBS\"\n#define NID_setct_PI_TBS                532\n#define OBJ_setct_PI_TBS                OBJ_set_ctype,13L\n\n#define SN_setct_PResData               \"setct-PResData\"\n#define NID_setct_PResData              533\n#define OBJ_setct_PResData              OBJ_set_ctype,14L\n\n#define SN_setct_AuthReqTBS             \"setct-AuthReqTBS\"\n#define NID_setct_AuthReqTBS            534\n#define OBJ_setct_AuthReqTBS            OBJ_set_ctype,16L\n\n#define SN_setct_AuthResTBS             \"setct-AuthResTBS\"\n#define NID_setct_AuthResTBS            535\n#define OBJ_setct_AuthResTBS            OBJ_set_ctype,17L\n\n#define SN_setct_AuthResTBSX            \"setct-AuthResTBSX\"\n#define NID_setct_AuthResTBSX           536\n#define OBJ_setct_AuthResTBSX           OBJ_set_ctype,18L\n\n#define SN_setct_AuthTokenTBS           \"setct-AuthTokenTBS\"\n#define NID_setct_AuthTokenTBS          537\n#define OBJ_setct_AuthTokenTBS          OBJ_set_ctype,19L\n\n#define SN_setct_CapTokenData           \"setct-CapTokenData\"\n#define NID_setct_CapTokenData          538\n#define OBJ_setct_CapTokenData          OBJ_set_ctype,20L\n\n#define SN_setct_CapTokenTBS            \"setct-CapTokenTBS\"\n#define NID_setct_CapTokenTBS           539\n#define OBJ_setct_CapTokenTBS           OBJ_set_ctype,21L\n\n#define SN_setct_AcqCardCodeMsg         \"setct-AcqCardCodeMsg\"\n#define NID_setct_AcqCardCodeMsg                540\n#define OBJ_setct_AcqCardCodeMsg                OBJ_set_ctype,22L\n\n#define SN_setct_AuthRevReqTBS          \"setct-AuthRevReqTBS\"\n#define NID_setct_AuthRevReqTBS         541\n#define OBJ_setct_AuthRevReqTBS         OBJ_set_ctype,23L\n\n#define SN_setct_AuthRevResData         \"setct-AuthRevResData\"\n#define NID_setct_AuthRevResData                542\n#define OBJ_setct_AuthRevResData                OBJ_set_ctype,24L\n\n#define SN_setct_AuthRevResTBS          \"setct-AuthRevResTBS\"\n#define NID_setct_AuthRevResTBS         543\n#define OBJ_setct_AuthRevResTBS         OBJ_set_ctype,25L\n\n#define SN_setct_CapReqTBS              \"setct-CapReqTBS\"\n#define NID_setct_CapReqTBS             544\n#define OBJ_setct_CapReqTBS             OBJ_set_ctype,26L\n\n#define SN_setct_CapReqTBSX             \"setct-CapReqTBSX\"\n#define NID_setct_CapReqTBSX            545\n#define OBJ_setct_CapReqTBSX            OBJ_set_ctype,27L\n\n#define SN_setct_CapResData             \"setct-CapResData\"\n#define NID_setct_CapResData            546\n#define OBJ_setct_CapResData            OBJ_set_ctype,28L\n\n#define SN_setct_CapRevReqTBS           \"setct-CapRevReqTBS\"\n#define NID_setct_CapRevReqTBS          547\n#define OBJ_setct_CapRevReqTBS          OBJ_set_ctype,29L\n\n#define SN_setct_CapRevReqTBSX          \"setct-CapRevReqTBSX\"\n#define NID_setct_CapRevReqTBSX         548\n#define OBJ_setct_CapRevReqTBSX         OBJ_set_ctype,30L\n\n#define SN_setct_CapRevResData          \"setct-CapRevResData\"\n#define NID_setct_CapRevResData         549\n#define OBJ_setct_CapRevResData         OBJ_set_ctype,31L\n\n#define SN_setct_CredReqTBS             \"setct-CredReqTBS\"\n#define NID_setct_CredReqTBS            550\n#define OBJ_setct_CredReqTBS            OBJ_set_ctype,32L\n\n#define SN_setct_CredReqTBSX            \"setct-CredReqTBSX\"\n#define NID_setct_CredReqTBSX           551\n#define OBJ_setct_CredReqTBSX           OBJ_set_ctype,33L\n\n#define SN_setct_CredResData            \"setct-CredResData\"\n#define NID_setct_CredResData           552\n#define OBJ_setct_CredResData           OBJ_set_ctype,34L\n\n#define SN_setct_CredRevReqTBS          \"setct-CredRevReqTBS\"\n#define NID_setct_CredRevReqTBS         553\n#define OBJ_setct_CredRevReqTBS         OBJ_set_ctype,35L\n\n#define SN_setct_CredRevReqTBSX         \"setct-CredRevReqTBSX\"\n#define NID_setct_CredRevReqTBSX                554\n#define OBJ_setct_CredRevReqTBSX                OBJ_set_ctype,36L\n\n#define SN_setct_CredRevResData         \"setct-CredRevResData\"\n#define NID_setct_CredRevResData                555\n#define OBJ_setct_CredRevResData                OBJ_set_ctype,37L\n\n#define SN_setct_PCertReqData           \"setct-PCertReqData\"\n#define NID_setct_PCertReqData          556\n#define OBJ_setct_PCertReqData          OBJ_set_ctype,38L\n\n#define SN_setct_PCertResTBS            \"setct-PCertResTBS\"\n#define NID_setct_PCertResTBS           557\n#define OBJ_setct_PCertResTBS           OBJ_set_ctype,39L\n\n#define SN_setct_BatchAdminReqData              \"setct-BatchAdminReqData\"\n#define NID_setct_BatchAdminReqData             558\n#define OBJ_setct_BatchAdminReqData             OBJ_set_ctype,40L\n\n#define SN_setct_BatchAdminResData              \"setct-BatchAdminResData\"\n#define NID_setct_BatchAdminResData             559\n#define OBJ_setct_BatchAdminResData             OBJ_set_ctype,41L\n\n#define SN_setct_CardCInitResTBS                \"setct-CardCInitResTBS\"\n#define NID_setct_CardCInitResTBS               560\n#define OBJ_setct_CardCInitResTBS               OBJ_set_ctype,42L\n\n#define SN_setct_MeAqCInitResTBS                \"setct-MeAqCInitResTBS\"\n#define NID_setct_MeAqCInitResTBS               561\n#define OBJ_setct_MeAqCInitResTBS               OBJ_set_ctype,43L\n\n#define SN_setct_RegFormResTBS          \"setct-RegFormResTBS\"\n#define NID_setct_RegFormResTBS         562\n#define OBJ_setct_RegFormResTBS         OBJ_set_ctype,44L\n\n#define SN_setct_CertReqData            \"setct-CertReqData\"\n#define NID_setct_CertReqData           563\n#define OBJ_setct_CertReqData           OBJ_set_ctype,45L\n\n#define SN_setct_CertReqTBS             \"setct-CertReqTBS\"\n#define NID_setct_CertReqTBS            564\n#define OBJ_setct_CertReqTBS            OBJ_set_ctype,46L\n\n#define SN_setct_CertResData            \"setct-CertResData\"\n#define NID_setct_CertResData           565\n#define OBJ_setct_CertResData           OBJ_set_ctype,47L\n\n#define SN_setct_CertInqReqTBS          \"setct-CertInqReqTBS\"\n#define NID_setct_CertInqReqTBS         566\n#define OBJ_setct_CertInqReqTBS         OBJ_set_ctype,48L\n\n#define SN_setct_ErrorTBS               \"setct-ErrorTBS\"\n#define NID_setct_ErrorTBS              567\n#define OBJ_setct_ErrorTBS              OBJ_set_ctype,49L\n\n#define SN_setct_PIDualSignedTBE                \"setct-PIDualSignedTBE\"\n#define NID_setct_PIDualSignedTBE               568\n#define OBJ_setct_PIDualSignedTBE               OBJ_set_ctype,50L\n\n#define SN_setct_PIUnsignedTBE          \"setct-PIUnsignedTBE\"\n#define NID_setct_PIUnsignedTBE         569\n#define OBJ_setct_PIUnsignedTBE         OBJ_set_ctype,51L\n\n#define SN_setct_AuthReqTBE             \"setct-AuthReqTBE\"\n#define NID_setct_AuthReqTBE            570\n#define OBJ_setct_AuthReqTBE            OBJ_set_ctype,52L\n\n#define SN_setct_AuthResTBE             \"setct-AuthResTBE\"\n#define NID_setct_AuthResTBE            571\n#define OBJ_setct_AuthResTBE            OBJ_set_ctype,53L\n\n#define SN_setct_AuthResTBEX            \"setct-AuthResTBEX\"\n#define NID_setct_AuthResTBEX           572\n#define OBJ_setct_AuthResTBEX           OBJ_set_ctype,54L\n\n#define SN_setct_AuthTokenTBE           \"setct-AuthTokenTBE\"\n#define NID_setct_AuthTokenTBE          573\n#define OBJ_setct_AuthTokenTBE          OBJ_set_ctype,55L\n\n#define SN_setct_CapTokenTBE            \"setct-CapTokenTBE\"\n#define NID_setct_CapTokenTBE           574\n#define OBJ_setct_CapTokenTBE           OBJ_set_ctype,56L\n\n#define SN_setct_CapTokenTBEX           \"setct-CapTokenTBEX\"\n#define NID_setct_CapTokenTBEX          575\n#define OBJ_setct_CapTokenTBEX          OBJ_set_ctype,57L\n\n#define SN_setct_AcqCardCodeMsgTBE              \"setct-AcqCardCodeMsgTBE\"\n#define NID_setct_AcqCardCodeMsgTBE             576\n#define OBJ_setct_AcqCardCodeMsgTBE             OBJ_set_ctype,58L\n\n#define SN_setct_AuthRevReqTBE          \"setct-AuthRevReqTBE\"\n#define NID_setct_AuthRevReqTBE         577\n#define OBJ_setct_AuthRevReqTBE         OBJ_set_ctype,59L\n\n#define SN_setct_AuthRevResTBE          \"setct-AuthRevResTBE\"\n#define NID_setct_AuthRevResTBE         578\n#define OBJ_setct_AuthRevResTBE         OBJ_set_ctype,60L\n\n#define SN_setct_AuthRevResTBEB         \"setct-AuthRevResTBEB\"\n#define NID_setct_AuthRevResTBEB                579\n#define OBJ_setct_AuthRevResTBEB                OBJ_set_ctype,61L\n\n#define SN_setct_CapReqTBE              \"setct-CapReqTBE\"\n#define NID_setct_CapReqTBE             580\n#define OBJ_setct_CapReqTBE             OBJ_set_ctype,62L\n\n#define SN_setct_CapReqTBEX             \"setct-CapReqTBEX\"\n#define NID_setct_CapReqTBEX            581\n#define OBJ_setct_CapReqTBEX            OBJ_set_ctype,63L\n\n#define SN_setct_CapResTBE              \"setct-CapResTBE\"\n#define NID_setct_CapResTBE             582\n#define OBJ_setct_CapResTBE             OBJ_set_ctype,64L\n\n#define SN_setct_CapRevReqTBE           \"setct-CapRevReqTBE\"\n#define NID_setct_CapRevReqTBE          583\n#define OBJ_setct_CapRevReqTBE          OBJ_set_ctype,65L\n\n#define SN_setct_CapRevReqTBEX          \"setct-CapRevReqTBEX\"\n#define NID_setct_CapRevReqTBEX         584\n#define OBJ_setct_CapRevReqTBEX         OBJ_set_ctype,66L\n\n#define SN_setct_CapRevResTBE           \"setct-CapRevResTBE\"\n#define NID_setct_CapRevResTBE          585\n#define OBJ_setct_CapRevResTBE          OBJ_set_ctype,67L\n\n#define SN_setct_CredReqTBE             \"setct-CredReqTBE\"\n#define NID_setct_CredReqTBE            586\n#define OBJ_setct_CredReqTBE            OBJ_set_ctype,68L\n\n#define SN_setct_CredReqTBEX            \"setct-CredReqTBEX\"\n#define NID_setct_CredReqTBEX           587\n#define OBJ_setct_CredReqTBEX           OBJ_set_ctype,69L\n\n#define SN_setct_CredResTBE             \"setct-CredResTBE\"\n#define NID_setct_CredResTBE            588\n#define OBJ_setct_CredResTBE            OBJ_set_ctype,70L\n\n#define SN_setct_CredRevReqTBE          \"setct-CredRevReqTBE\"\n#define NID_setct_CredRevReqTBE         589\n#define OBJ_setct_CredRevReqTBE         OBJ_set_ctype,71L\n\n#define SN_setct_CredRevReqTBEX         \"setct-CredRevReqTBEX\"\n#define NID_setct_CredRevReqTBEX                590\n#define OBJ_setct_CredRevReqTBEX                OBJ_set_ctype,72L\n\n#define SN_setct_CredRevResTBE          \"setct-CredRevResTBE\"\n#define NID_setct_CredRevResTBE         591\n#define OBJ_setct_CredRevResTBE         OBJ_set_ctype,73L\n\n#define SN_setct_BatchAdminReqTBE               \"setct-BatchAdminReqTBE\"\n#define NID_setct_BatchAdminReqTBE              592\n#define OBJ_setct_BatchAdminReqTBE              OBJ_set_ctype,74L\n\n#define SN_setct_BatchAdminResTBE               \"setct-BatchAdminResTBE\"\n#define NID_setct_BatchAdminResTBE              593\n#define OBJ_setct_BatchAdminResTBE              OBJ_set_ctype,75L\n\n#define SN_setct_RegFormReqTBE          \"setct-RegFormReqTBE\"\n#define NID_setct_RegFormReqTBE         594\n#define OBJ_setct_RegFormReqTBE         OBJ_set_ctype,76L\n\n#define SN_setct_CertReqTBE             \"setct-CertReqTBE\"\n#define NID_setct_CertReqTBE            595\n#define OBJ_setct_CertReqTBE            OBJ_set_ctype,77L\n\n#define SN_setct_CertReqTBEX            \"setct-CertReqTBEX\"\n#define NID_setct_CertReqTBEX           596\n#define OBJ_setct_CertReqTBEX           OBJ_set_ctype,78L\n\n#define SN_setct_CertResTBE             \"setct-CertResTBE\"\n#define NID_setct_CertResTBE            597\n#define OBJ_setct_CertResTBE            OBJ_set_ctype,79L\n\n#define SN_setct_CRLNotificationTBS             \"setct-CRLNotificationTBS\"\n#define NID_setct_CRLNotificationTBS            598\n#define OBJ_setct_CRLNotificationTBS            OBJ_set_ctype,80L\n\n#define SN_setct_CRLNotificationResTBS          \"setct-CRLNotificationResTBS\"\n#define NID_setct_CRLNotificationResTBS         599\n#define OBJ_setct_CRLNotificationResTBS         OBJ_set_ctype,81L\n\n#define SN_setct_BCIDistributionTBS             \"setct-BCIDistributionTBS\"\n#define NID_setct_BCIDistributionTBS            600\n#define OBJ_setct_BCIDistributionTBS            OBJ_set_ctype,82L\n\n#define SN_setext_genCrypt              \"setext-genCrypt\"\n#define LN_setext_genCrypt              \"generic cryptogram\"\n#define NID_setext_genCrypt             601\n#define OBJ_setext_genCrypt             OBJ_set_msgExt,1L\n\n#define SN_setext_miAuth                \"setext-miAuth\"\n#define LN_setext_miAuth                \"merchant initiated auth\"\n#define NID_setext_miAuth               602\n#define OBJ_setext_miAuth               OBJ_set_msgExt,3L\n\n#define SN_setext_pinSecure             \"setext-pinSecure\"\n#define NID_setext_pinSecure            603\n#define OBJ_setext_pinSecure            OBJ_set_msgExt,4L\n\n#define SN_setext_pinAny                \"setext-pinAny\"\n#define NID_setext_pinAny               604\n#define OBJ_setext_pinAny               OBJ_set_msgExt,5L\n\n#define SN_setext_track2                \"setext-track2\"\n#define NID_setext_track2               605\n#define OBJ_setext_track2               OBJ_set_msgExt,7L\n\n#define SN_setext_cv            \"setext-cv\"\n#define LN_setext_cv            \"additional verification\"\n#define NID_setext_cv           606\n#define OBJ_setext_cv           OBJ_set_msgExt,8L\n\n#define SN_set_policy_root              \"set-policy-root\"\n#define NID_set_policy_root             607\n#define OBJ_set_policy_root             OBJ_set_policy,0L\n\n#define SN_setCext_hashedRoot           \"setCext-hashedRoot\"\n#define NID_setCext_hashedRoot          608\n#define OBJ_setCext_hashedRoot          OBJ_set_certExt,0L\n\n#define SN_setCext_certType             \"setCext-certType\"\n#define NID_setCext_certType            609\n#define OBJ_setCext_certType            OBJ_set_certExt,1L\n\n#define SN_setCext_merchData            \"setCext-merchData\"\n#define NID_setCext_merchData           610\n#define OBJ_setCext_merchData           OBJ_set_certExt,2L\n\n#define SN_setCext_cCertRequired                \"setCext-cCertRequired\"\n#define NID_setCext_cCertRequired               611\n#define OBJ_setCext_cCertRequired               OBJ_set_certExt,3L\n\n#define SN_setCext_tunneling            \"setCext-tunneling\"\n#define NID_setCext_tunneling           612\n#define OBJ_setCext_tunneling           OBJ_set_certExt,4L\n\n#define SN_setCext_setExt               \"setCext-setExt\"\n#define NID_setCext_setExt              613\n#define OBJ_setCext_setExt              OBJ_set_certExt,5L\n\n#define SN_setCext_setQualf             \"setCext-setQualf\"\n#define NID_setCext_setQualf            614\n#define OBJ_setCext_setQualf            OBJ_set_certExt,6L\n\n#define SN_setCext_PGWYcapabilities             \"setCext-PGWYcapabilities\"\n#define NID_setCext_PGWYcapabilities            615\n#define OBJ_setCext_PGWYcapabilities            OBJ_set_certExt,7L\n\n#define SN_setCext_TokenIdentifier              \"setCext-TokenIdentifier\"\n#define NID_setCext_TokenIdentifier             616\n#define OBJ_setCext_TokenIdentifier             OBJ_set_certExt,8L\n\n#define SN_setCext_Track2Data           \"setCext-Track2Data\"\n#define NID_setCext_Track2Data          617\n#define OBJ_setCext_Track2Data          OBJ_set_certExt,9L\n\n#define SN_setCext_TokenType            \"setCext-TokenType\"\n#define NID_setCext_TokenType           618\n#define OBJ_setCext_TokenType           OBJ_set_certExt,10L\n\n#define SN_setCext_IssuerCapabilities           \"setCext-IssuerCapabilities\"\n#define NID_setCext_IssuerCapabilities          619\n#define OBJ_setCext_IssuerCapabilities          OBJ_set_certExt,11L\n\n#define SN_setAttr_Cert         \"setAttr-Cert\"\n#define NID_setAttr_Cert                620\n#define OBJ_setAttr_Cert                OBJ_set_attr,0L\n\n#define SN_setAttr_PGWYcap              \"setAttr-PGWYcap\"\n#define LN_setAttr_PGWYcap              \"payment gateway capabilities\"\n#define NID_setAttr_PGWYcap             621\n#define OBJ_setAttr_PGWYcap             OBJ_set_attr,1L\n\n#define SN_setAttr_TokenType            \"setAttr-TokenType\"\n#define NID_setAttr_TokenType           622\n#define OBJ_setAttr_TokenType           OBJ_set_attr,2L\n\n#define SN_setAttr_IssCap               \"setAttr-IssCap\"\n#define LN_setAttr_IssCap               \"issuer capabilities\"\n#define NID_setAttr_IssCap              623\n#define OBJ_setAttr_IssCap              OBJ_set_attr,3L\n\n#define SN_set_rootKeyThumb             \"set-rootKeyThumb\"\n#define NID_set_rootKeyThumb            624\n#define OBJ_set_rootKeyThumb            OBJ_setAttr_Cert,0L\n\n#define SN_set_addPolicy                \"set-addPolicy\"\n#define NID_set_addPolicy               625\n#define OBJ_set_addPolicy               OBJ_setAttr_Cert,1L\n\n#define SN_setAttr_Token_EMV            \"setAttr-Token-EMV\"\n#define NID_setAttr_Token_EMV           626\n#define OBJ_setAttr_Token_EMV           OBJ_setAttr_TokenType,1L\n\n#define SN_setAttr_Token_B0Prime                \"setAttr-Token-B0Prime\"\n#define NID_setAttr_Token_B0Prime               627\n#define OBJ_setAttr_Token_B0Prime               OBJ_setAttr_TokenType,2L\n\n#define SN_setAttr_IssCap_CVM           \"setAttr-IssCap-CVM\"\n#define NID_setAttr_IssCap_CVM          628\n#define OBJ_setAttr_IssCap_CVM          OBJ_setAttr_IssCap,3L\n\n#define SN_setAttr_IssCap_T2            \"setAttr-IssCap-T2\"\n#define NID_setAttr_IssCap_T2           629\n#define OBJ_setAttr_IssCap_T2           OBJ_setAttr_IssCap,4L\n\n#define SN_setAttr_IssCap_Sig           \"setAttr-IssCap-Sig\"\n#define NID_setAttr_IssCap_Sig          630\n#define OBJ_setAttr_IssCap_Sig          OBJ_setAttr_IssCap,5L\n\n#define SN_setAttr_GenCryptgrm          \"setAttr-GenCryptgrm\"\n#define LN_setAttr_GenCryptgrm          \"generate cryptogram\"\n#define NID_setAttr_GenCryptgrm         631\n#define OBJ_setAttr_GenCryptgrm         OBJ_setAttr_IssCap_CVM,1L\n\n#define SN_setAttr_T2Enc                \"setAttr-T2Enc\"\n#define LN_setAttr_T2Enc                \"encrypted track 2\"\n#define NID_setAttr_T2Enc               632\n#define OBJ_setAttr_T2Enc               OBJ_setAttr_IssCap_T2,1L\n\n#define SN_setAttr_T2cleartxt           \"setAttr-T2cleartxt\"\n#define LN_setAttr_T2cleartxt           \"cleartext track 2\"\n#define NID_setAttr_T2cleartxt          633\n#define OBJ_setAttr_T2cleartxt          OBJ_setAttr_IssCap_T2,2L\n\n#define SN_setAttr_TokICCsig            \"setAttr-TokICCsig\"\n#define LN_setAttr_TokICCsig            \"ICC or token signature\"\n#define NID_setAttr_TokICCsig           634\n#define OBJ_setAttr_TokICCsig           OBJ_setAttr_IssCap_Sig,1L\n\n#define SN_setAttr_SecDevSig            \"setAttr-SecDevSig\"\n#define LN_setAttr_SecDevSig            \"secure device signature\"\n#define NID_setAttr_SecDevSig           635\n#define OBJ_setAttr_SecDevSig           OBJ_setAttr_IssCap_Sig,2L\n\n#define SN_set_brand_IATA_ATA           \"set-brand-IATA-ATA\"\n#define NID_set_brand_IATA_ATA          636\n#define OBJ_set_brand_IATA_ATA          OBJ_set_brand,1L\n\n#define SN_set_brand_Diners             \"set-brand-Diners\"\n#define NID_set_brand_Diners            637\n#define OBJ_set_brand_Diners            OBJ_set_brand,30L\n\n#define SN_set_brand_AmericanExpress            \"set-brand-AmericanExpress\"\n#define NID_set_brand_AmericanExpress           638\n#define OBJ_set_brand_AmericanExpress           OBJ_set_brand,34L\n\n#define SN_set_brand_JCB                \"set-brand-JCB\"\n#define NID_set_brand_JCB               639\n#define OBJ_set_brand_JCB               OBJ_set_brand,35L\n\n#define SN_set_brand_Visa               \"set-brand-Visa\"\n#define NID_set_brand_Visa              640\n#define OBJ_set_brand_Visa              OBJ_set_brand,4L\n\n#define SN_set_brand_MasterCard         \"set-brand-MasterCard\"\n#define NID_set_brand_MasterCard                641\n#define OBJ_set_brand_MasterCard                OBJ_set_brand,5L\n\n#define SN_set_brand_Novus              \"set-brand-Novus\"\n#define NID_set_brand_Novus             642\n#define OBJ_set_brand_Novus             OBJ_set_brand,6011L\n\n#define SN_des_cdmf             \"DES-CDMF\"\n#define LN_des_cdmf             \"des-cdmf\"\n#define NID_des_cdmf            643\n#define OBJ_des_cdmf            OBJ_rsadsi,3L,10L\n\n#define SN_rsaOAEPEncryptionSET         \"rsaOAEPEncryptionSET\"\n#define NID_rsaOAEPEncryptionSET                644\n#define OBJ_rsaOAEPEncryptionSET                OBJ_rsadsi,1L,1L,6L\n\n#define SN_ipsec3               \"Oakley-EC2N-3\"\n#define LN_ipsec3               \"ipsec3\"\n#define NID_ipsec3              749\n\n#define SN_ipsec4               \"Oakley-EC2N-4\"\n#define LN_ipsec4               \"ipsec4\"\n#define NID_ipsec4              750\n\n#define SN_whirlpool            \"whirlpool\"\n#define NID_whirlpool           804\n#define OBJ_whirlpool           OBJ_iso,0L,10118L,3L,0L,55L\n\n#define SN_cryptopro            \"cryptopro\"\n#define NID_cryptopro           805\n#define OBJ_cryptopro           OBJ_member_body,643L,2L,2L\n\n#define SN_cryptocom            \"cryptocom\"\n#define NID_cryptocom           806\n#define OBJ_cryptocom           OBJ_member_body,643L,2L,9L\n\n#define SN_id_GostR3411_94_with_GostR3410_2001          \"id-GostR3411-94-with-GostR3410-2001\"\n#define LN_id_GostR3411_94_with_GostR3410_2001          \"GOST R 34.11-94 with GOST R 34.10-2001\"\n#define NID_id_GostR3411_94_with_GostR3410_2001         807\n#define OBJ_id_GostR3411_94_with_GostR3410_2001         OBJ_cryptopro,3L\n\n#define SN_id_GostR3411_94_with_GostR3410_94            \"id-GostR3411-94-with-GostR3410-94\"\n#define LN_id_GostR3411_94_with_GostR3410_94            \"GOST R 34.11-94 with GOST R 34.10-94\"\n#define NID_id_GostR3411_94_with_GostR3410_94           808\n#define OBJ_id_GostR3411_94_with_GostR3410_94           OBJ_cryptopro,4L\n\n#define SN_id_GostR3411_94              \"md_gost94\"\n#define LN_id_GostR3411_94              \"GOST R 34.11-94\"\n#define NID_id_GostR3411_94             809\n#define OBJ_id_GostR3411_94             OBJ_cryptopro,9L\n\n#define SN_id_HMACGostR3411_94          \"id-HMACGostR3411-94\"\n#define LN_id_HMACGostR3411_94          \"HMAC GOST 34.11-94\"\n#define NID_id_HMACGostR3411_94         810\n#define OBJ_id_HMACGostR3411_94         OBJ_cryptopro,10L\n\n#define SN_id_GostR3410_2001            \"gost2001\"\n#define LN_id_GostR3410_2001            \"GOST R 34.10-2001\"\n#define NID_id_GostR3410_2001           811\n#define OBJ_id_GostR3410_2001           OBJ_cryptopro,19L\n\n#define SN_id_GostR3410_94              \"gost94\"\n#define LN_id_GostR3410_94              \"GOST R 34.10-94\"\n#define NID_id_GostR3410_94             812\n#define OBJ_id_GostR3410_94             OBJ_cryptopro,20L\n\n#define SN_id_Gost28147_89              \"gost89\"\n#define LN_id_Gost28147_89              \"GOST 28147-89\"\n#define NID_id_Gost28147_89             813\n#define OBJ_id_Gost28147_89             OBJ_cryptopro,21L\n\n#define SN_gost89_cnt           \"gost89-cnt\"\n#define NID_gost89_cnt          814\n\n#define SN_id_Gost28147_89_MAC          \"gost-mac\"\n#define LN_id_Gost28147_89_MAC          \"GOST 28147-89 MAC\"\n#define NID_id_Gost28147_89_MAC         815\n#define OBJ_id_Gost28147_89_MAC         OBJ_cryptopro,22L\n\n#define SN_id_GostR3411_94_prf          \"prf-gostr3411-94\"\n#define LN_id_GostR3411_94_prf          \"GOST R 34.11-94 PRF\"\n#define NID_id_GostR3411_94_prf         816\n#define OBJ_id_GostR3411_94_prf         OBJ_cryptopro,23L\n\n#define SN_id_GostR3410_2001DH          \"id-GostR3410-2001DH\"\n#define LN_id_GostR3410_2001DH          \"GOST R 34.10-2001 DH\"\n#define NID_id_GostR3410_2001DH         817\n#define OBJ_id_GostR3410_2001DH         OBJ_cryptopro,98L\n\n#define SN_id_GostR3410_94DH            \"id-GostR3410-94DH\"\n#define LN_id_GostR3410_94DH            \"GOST R 34.10-94 DH\"\n#define NID_id_GostR3410_94DH           818\n#define OBJ_id_GostR3410_94DH           OBJ_cryptopro,99L\n\n#define SN_id_Gost28147_89_CryptoPro_KeyMeshing         \"id-Gost28147-89-CryptoPro-KeyMeshing\"\n#define NID_id_Gost28147_89_CryptoPro_KeyMeshing                819\n#define OBJ_id_Gost28147_89_CryptoPro_KeyMeshing                OBJ_cryptopro,14L,1L\n\n#define SN_id_Gost28147_89_None_KeyMeshing              \"id-Gost28147-89-None-KeyMeshing\"\n#define NID_id_Gost28147_89_None_KeyMeshing             820\n#define OBJ_id_Gost28147_89_None_KeyMeshing             OBJ_cryptopro,14L,0L\n\n#define SN_id_GostR3411_94_TestParamSet         \"id-GostR3411-94-TestParamSet\"\n#define NID_id_GostR3411_94_TestParamSet                821\n#define OBJ_id_GostR3411_94_TestParamSet                OBJ_cryptopro,30L,0L\n\n#define SN_id_GostR3411_94_CryptoProParamSet            \"id-GostR3411-94-CryptoProParamSet\"\n#define NID_id_GostR3411_94_CryptoProParamSet           822\n#define OBJ_id_GostR3411_94_CryptoProParamSet           OBJ_cryptopro,30L,1L\n\n#define SN_id_Gost28147_89_TestParamSet         \"id-Gost28147-89-TestParamSet\"\n#define NID_id_Gost28147_89_TestParamSet                823\n#define OBJ_id_Gost28147_89_TestParamSet                OBJ_cryptopro,31L,0L\n\n#define SN_id_Gost28147_89_CryptoPro_A_ParamSet         \"id-Gost28147-89-CryptoPro-A-ParamSet\"\n#define NID_id_Gost28147_89_CryptoPro_A_ParamSet                824\n#define OBJ_id_Gost28147_89_CryptoPro_A_ParamSet                OBJ_cryptopro,31L,1L\n\n#define SN_id_Gost28147_89_CryptoPro_B_ParamSet         \"id-Gost28147-89-CryptoPro-B-ParamSet\"\n#define NID_id_Gost28147_89_CryptoPro_B_ParamSet                825\n#define OBJ_id_Gost28147_89_CryptoPro_B_ParamSet                OBJ_cryptopro,31L,2L\n\n#define SN_id_Gost28147_89_CryptoPro_C_ParamSet         \"id-Gost28147-89-CryptoPro-C-ParamSet\"\n#define NID_id_Gost28147_89_CryptoPro_C_ParamSet                826\n#define OBJ_id_Gost28147_89_CryptoPro_C_ParamSet                OBJ_cryptopro,31L,3L\n\n#define SN_id_Gost28147_89_CryptoPro_D_ParamSet         \"id-Gost28147-89-CryptoPro-D-ParamSet\"\n#define NID_id_Gost28147_89_CryptoPro_D_ParamSet                827\n#define OBJ_id_Gost28147_89_CryptoPro_D_ParamSet                OBJ_cryptopro,31L,4L\n\n#define SN_id_Gost28147_89_CryptoPro_Oscar_1_1_ParamSet         \"id-Gost28147-89-CryptoPro-Oscar-1-1-ParamSet\"\n#define NID_id_Gost28147_89_CryptoPro_Oscar_1_1_ParamSet                828\n#define OBJ_id_Gost28147_89_CryptoPro_Oscar_1_1_ParamSet                OBJ_cryptopro,31L,5L\n\n#define SN_id_Gost28147_89_CryptoPro_Oscar_1_0_ParamSet         \"id-Gost28147-89-CryptoPro-Oscar-1-0-ParamSet\"\n#define NID_id_Gost28147_89_CryptoPro_Oscar_1_0_ParamSet                829\n#define OBJ_id_Gost28147_89_CryptoPro_Oscar_1_0_ParamSet                OBJ_cryptopro,31L,6L\n\n#define SN_id_Gost28147_89_CryptoPro_RIC_1_ParamSet             \"id-Gost28147-89-CryptoPro-RIC-1-ParamSet\"\n#define NID_id_Gost28147_89_CryptoPro_RIC_1_ParamSet            830\n#define OBJ_id_Gost28147_89_CryptoPro_RIC_1_ParamSet            OBJ_cryptopro,31L,7L\n\n#define SN_id_GostR3410_94_TestParamSet         \"id-GostR3410-94-TestParamSet\"\n#define NID_id_GostR3410_94_TestParamSet                831\n#define OBJ_id_GostR3410_94_TestParamSet                OBJ_cryptopro,32L,0L\n\n#define SN_id_GostR3410_94_CryptoPro_A_ParamSet         \"id-GostR3410-94-CryptoPro-A-ParamSet\"\n#define NID_id_GostR3410_94_CryptoPro_A_ParamSet                832\n#define OBJ_id_GostR3410_94_CryptoPro_A_ParamSet                OBJ_cryptopro,32L,2L\n\n#define SN_id_GostR3410_94_CryptoPro_B_ParamSet         \"id-GostR3410-94-CryptoPro-B-ParamSet\"\n#define NID_id_GostR3410_94_CryptoPro_B_ParamSet                833\n#define OBJ_id_GostR3410_94_CryptoPro_B_ParamSet                OBJ_cryptopro,32L,3L\n\n#define SN_id_GostR3410_94_CryptoPro_C_ParamSet         \"id-GostR3410-94-CryptoPro-C-ParamSet\"\n#define NID_id_GostR3410_94_CryptoPro_C_ParamSet                834\n#define OBJ_id_GostR3410_94_CryptoPro_C_ParamSet                OBJ_cryptopro,32L,4L\n\n#define SN_id_GostR3410_94_CryptoPro_D_ParamSet         \"id-GostR3410-94-CryptoPro-D-ParamSet\"\n#define NID_id_GostR3410_94_CryptoPro_D_ParamSet                835\n#define OBJ_id_GostR3410_94_CryptoPro_D_ParamSet                OBJ_cryptopro,32L,5L\n\n#define SN_id_GostR3410_94_CryptoPro_XchA_ParamSet              \"id-GostR3410-94-CryptoPro-XchA-ParamSet\"\n#define NID_id_GostR3410_94_CryptoPro_XchA_ParamSet             836\n#define OBJ_id_GostR3410_94_CryptoPro_XchA_ParamSet             OBJ_cryptopro,33L,1L\n\n#define SN_id_GostR3410_94_CryptoPro_XchB_ParamSet              \"id-GostR3410-94-CryptoPro-XchB-ParamSet\"\n#define NID_id_GostR3410_94_CryptoPro_XchB_ParamSet             837\n#define OBJ_id_GostR3410_94_CryptoPro_XchB_ParamSet             OBJ_cryptopro,33L,2L\n\n#define SN_id_GostR3410_94_CryptoPro_XchC_ParamSet              \"id-GostR3410-94-CryptoPro-XchC-ParamSet\"\n#define NID_id_GostR3410_94_CryptoPro_XchC_ParamSet             838\n#define OBJ_id_GostR3410_94_CryptoPro_XchC_ParamSet             OBJ_cryptopro,33L,3L\n\n#define SN_id_GostR3410_2001_TestParamSet               \"id-GostR3410-2001-TestParamSet\"\n#define NID_id_GostR3410_2001_TestParamSet              839\n#define OBJ_id_GostR3410_2001_TestParamSet              OBJ_cryptopro,35L,0L\n\n#define SN_id_GostR3410_2001_CryptoPro_A_ParamSet               \"id-GostR3410-2001-CryptoPro-A-ParamSet\"\n#define NID_id_GostR3410_2001_CryptoPro_A_ParamSet              840\n#define OBJ_id_GostR3410_2001_CryptoPro_A_ParamSet              OBJ_cryptopro,35L,1L\n\n#define SN_id_GostR3410_2001_CryptoPro_B_ParamSet               \"id-GostR3410-2001-CryptoPro-B-ParamSet\"\n#define NID_id_GostR3410_2001_CryptoPro_B_ParamSet              841\n#define OBJ_id_GostR3410_2001_CryptoPro_B_ParamSet              OBJ_cryptopro,35L,2L\n\n#define SN_id_GostR3410_2001_CryptoPro_C_ParamSet               \"id-GostR3410-2001-CryptoPro-C-ParamSet\"\n#define NID_id_GostR3410_2001_CryptoPro_C_ParamSet              842\n#define OBJ_id_GostR3410_2001_CryptoPro_C_ParamSet              OBJ_cryptopro,35L,3L\n\n#define SN_id_GostR3410_2001_CryptoPro_XchA_ParamSet            \"id-GostR3410-2001-CryptoPro-XchA-ParamSet\"\n#define NID_id_GostR3410_2001_CryptoPro_XchA_ParamSet           843\n#define OBJ_id_GostR3410_2001_CryptoPro_XchA_ParamSet           OBJ_cryptopro,36L,0L\n\n#define SN_id_GostR3410_2001_CryptoPro_XchB_ParamSet            \"id-GostR3410-2001-CryptoPro-XchB-ParamSet\"\n#define NID_id_GostR3410_2001_CryptoPro_XchB_ParamSet           844\n#define OBJ_id_GostR3410_2001_CryptoPro_XchB_ParamSet           OBJ_cryptopro,36L,1L\n\n#define SN_id_GostR3410_94_a            \"id-GostR3410-94-a\"\n#define NID_id_GostR3410_94_a           845\n#define OBJ_id_GostR3410_94_a           OBJ_id_GostR3410_94,1L\n\n#define SN_id_GostR3410_94_aBis         \"id-GostR3410-94-aBis\"\n#define NID_id_GostR3410_94_aBis                846\n#define OBJ_id_GostR3410_94_aBis                OBJ_id_GostR3410_94,2L\n\n#define SN_id_GostR3410_94_b            \"id-GostR3410-94-b\"\n#define NID_id_GostR3410_94_b           847\n#define OBJ_id_GostR3410_94_b           OBJ_id_GostR3410_94,3L\n\n#define SN_id_GostR3410_94_bBis         \"id-GostR3410-94-bBis\"\n#define NID_id_GostR3410_94_bBis                848\n#define OBJ_id_GostR3410_94_bBis                OBJ_id_GostR3410_94,4L\n\n#define SN_id_Gost28147_89_cc           \"id-Gost28147-89-cc\"\n#define LN_id_Gost28147_89_cc           \"GOST 28147-89 Cryptocom ParamSet\"\n#define NID_id_Gost28147_89_cc          849\n#define OBJ_id_Gost28147_89_cc          OBJ_cryptocom,1L,6L,1L\n\n#define SN_id_GostR3410_94_cc           \"gost94cc\"\n#define LN_id_GostR3410_94_cc           \"GOST 34.10-94 Cryptocom\"\n#define NID_id_GostR3410_94_cc          850\n#define OBJ_id_GostR3410_94_cc          OBJ_cryptocom,1L,5L,3L\n\n#define SN_id_GostR3410_2001_cc         \"gost2001cc\"\n#define LN_id_GostR3410_2001_cc         \"GOST 34.10-2001 Cryptocom\"\n#define NID_id_GostR3410_2001_cc                851\n#define OBJ_id_GostR3410_2001_cc                OBJ_cryptocom,1L,5L,4L\n\n#define SN_id_GostR3411_94_with_GostR3410_94_cc         \"id-GostR3411-94-with-GostR3410-94-cc\"\n#define LN_id_GostR3411_94_with_GostR3410_94_cc         \"GOST R 34.11-94 with GOST R 34.10-94 Cryptocom\"\n#define NID_id_GostR3411_94_with_GostR3410_94_cc                852\n#define OBJ_id_GostR3411_94_with_GostR3410_94_cc                OBJ_cryptocom,1L,3L,3L\n\n#define SN_id_GostR3411_94_with_GostR3410_2001_cc               \"id-GostR3411-94-with-GostR3410-2001-cc\"\n#define LN_id_GostR3411_94_with_GostR3410_2001_cc               \"GOST R 34.11-94 with GOST R 34.10-2001 Cryptocom\"\n#define NID_id_GostR3411_94_with_GostR3410_2001_cc              853\n#define OBJ_id_GostR3411_94_with_GostR3410_2001_cc              OBJ_cryptocom,1L,3L,4L\n\n#define SN_id_GostR3410_2001_ParamSet_cc                \"id-GostR3410-2001-ParamSet-cc\"\n#define LN_id_GostR3410_2001_ParamSet_cc                \"GOST R 3410-2001 Parameter Set Cryptocom\"\n#define NID_id_GostR3410_2001_ParamSet_cc               854\n#define OBJ_id_GostR3410_2001_ParamSet_cc               OBJ_cryptocom,1L,8L,1L\n\n#define SN_camellia_128_cbc             \"CAMELLIA-128-CBC\"\n#define LN_camellia_128_cbc             \"camellia-128-cbc\"\n#define NID_camellia_128_cbc            751\n#define OBJ_camellia_128_cbc            1L,2L,392L,200011L,61L,1L,1L,1L,2L\n\n#define SN_camellia_192_cbc             \"CAMELLIA-192-CBC\"\n#define LN_camellia_192_cbc             \"camellia-192-cbc\"\n#define NID_camellia_192_cbc            752\n#define OBJ_camellia_192_cbc            1L,2L,392L,200011L,61L,1L,1L,1L,3L\n\n#define SN_camellia_256_cbc             \"CAMELLIA-256-CBC\"\n#define LN_camellia_256_cbc             \"camellia-256-cbc\"\n#define NID_camellia_256_cbc            753\n#define OBJ_camellia_256_cbc            1L,2L,392L,200011L,61L,1L,1L,1L,4L\n\n#define SN_id_camellia128_wrap          \"id-camellia128-wrap\"\n#define NID_id_camellia128_wrap         907\n#define OBJ_id_camellia128_wrap         1L,2L,392L,200011L,61L,1L,1L,3L,2L\n\n#define SN_id_camellia192_wrap          \"id-camellia192-wrap\"\n#define NID_id_camellia192_wrap         908\n#define OBJ_id_camellia192_wrap         1L,2L,392L,200011L,61L,1L,1L,3L,3L\n\n#define SN_id_camellia256_wrap          \"id-camellia256-wrap\"\n#define NID_id_camellia256_wrap         909\n#define OBJ_id_camellia256_wrap         1L,2L,392L,200011L,61L,1L,1L,3L,4L\n\n#define OBJ_ntt_ds              0L,3L,4401L,5L\n\n#define OBJ_camellia            OBJ_ntt_ds,3L,1L,9L\n\n#define SN_camellia_128_ecb             \"CAMELLIA-128-ECB\"\n#define LN_camellia_128_ecb             \"camellia-128-ecb\"\n#define NID_camellia_128_ecb            754\n#define OBJ_camellia_128_ecb            OBJ_camellia,1L\n\n#define SN_camellia_128_ofb128          \"CAMELLIA-128-OFB\"\n#define LN_camellia_128_ofb128          \"camellia-128-ofb\"\n#define NID_camellia_128_ofb128         766\n#define OBJ_camellia_128_ofb128         OBJ_camellia,3L\n\n#define SN_camellia_128_cfb128          \"CAMELLIA-128-CFB\"\n#define LN_camellia_128_cfb128          \"camellia-128-cfb\"\n#define NID_camellia_128_cfb128         757\n#define OBJ_camellia_128_cfb128         OBJ_camellia,4L\n\n#define SN_camellia_192_ecb             \"CAMELLIA-192-ECB\"\n#define LN_camellia_192_ecb             \"camellia-192-ecb\"\n#define NID_camellia_192_ecb            755\n#define OBJ_camellia_192_ecb            OBJ_camellia,21L\n\n#define SN_camellia_192_ofb128          \"CAMELLIA-192-OFB\"\n#define LN_camellia_192_ofb128          \"camellia-192-ofb\"\n#define NID_camellia_192_ofb128         767\n#define OBJ_camellia_192_ofb128         OBJ_camellia,23L\n\n#define SN_camellia_192_cfb128          \"CAMELLIA-192-CFB\"\n#define LN_camellia_192_cfb128          \"camellia-192-cfb\"\n#define NID_camellia_192_cfb128         758\n#define OBJ_camellia_192_cfb128         OBJ_camellia,24L\n\n#define SN_camellia_256_ecb             \"CAMELLIA-256-ECB\"\n#define LN_camellia_256_ecb             \"camellia-256-ecb\"\n#define NID_camellia_256_ecb            756\n#define OBJ_camellia_256_ecb            OBJ_camellia,41L\n\n#define SN_camellia_256_ofb128          \"CAMELLIA-256-OFB\"\n#define LN_camellia_256_ofb128          \"camellia-256-ofb\"\n#define NID_camellia_256_ofb128         768\n#define OBJ_camellia_256_ofb128         OBJ_camellia,43L\n\n#define SN_camellia_256_cfb128          \"CAMELLIA-256-CFB\"\n#define LN_camellia_256_cfb128          \"camellia-256-cfb\"\n#define NID_camellia_256_cfb128         759\n#define OBJ_camellia_256_cfb128         OBJ_camellia,44L\n\n#define SN_camellia_128_cfb1            \"CAMELLIA-128-CFB1\"\n#define LN_camellia_128_cfb1            \"camellia-128-cfb1\"\n#define NID_camellia_128_cfb1           760\n\n#define SN_camellia_192_cfb1            \"CAMELLIA-192-CFB1\"\n#define LN_camellia_192_cfb1            \"camellia-192-cfb1\"\n#define NID_camellia_192_cfb1           761\n\n#define SN_camellia_256_cfb1            \"CAMELLIA-256-CFB1\"\n#define LN_camellia_256_cfb1            \"camellia-256-cfb1\"\n#define NID_camellia_256_cfb1           762\n\n#define SN_camellia_128_cfb8            \"CAMELLIA-128-CFB8\"\n#define LN_camellia_128_cfb8            \"camellia-128-cfb8\"\n#define NID_camellia_128_cfb8           763\n\n#define SN_camellia_192_cfb8            \"CAMELLIA-192-CFB8\"\n#define LN_camellia_192_cfb8            \"camellia-192-cfb8\"\n#define NID_camellia_192_cfb8           764\n\n#define SN_camellia_256_cfb8            \"CAMELLIA-256-CFB8\"\n#define LN_camellia_256_cfb8            \"camellia-256-cfb8\"\n#define NID_camellia_256_cfb8           765\n\n#define SN_kisa         \"KISA\"\n#define LN_kisa         \"kisa\"\n#define NID_kisa                773\n#define OBJ_kisa                OBJ_member_body,410L,200004L\n\n#define SN_seed_ecb             \"SEED-ECB\"\n#define LN_seed_ecb             \"seed-ecb\"\n#define NID_seed_ecb            776\n#define OBJ_seed_ecb            OBJ_kisa,1L,3L\n\n#define SN_seed_cbc             \"SEED-CBC\"\n#define LN_seed_cbc             \"seed-cbc\"\n#define NID_seed_cbc            777\n#define OBJ_seed_cbc            OBJ_kisa,1L,4L\n\n#define SN_seed_cfb128          \"SEED-CFB\"\n#define LN_seed_cfb128          \"seed-cfb\"\n#define NID_seed_cfb128         779\n#define OBJ_seed_cfb128         OBJ_kisa,1L,5L\n\n#define SN_seed_ofb128          \"SEED-OFB\"\n#define LN_seed_ofb128          \"seed-ofb\"\n#define NID_seed_ofb128         778\n#define OBJ_seed_ofb128         OBJ_kisa,1L,6L\n\n#define SN_hmac         \"HMAC\"\n#define LN_hmac         \"hmac\"\n#define NID_hmac                855\n\n#define SN_cmac         \"CMAC\"\n#define LN_cmac         \"cmac\"\n#define NID_cmac                894\n\n#define SN_rc4_hmac_md5         \"RC4-HMAC-MD5\"\n#define LN_rc4_hmac_md5         \"rc4-hmac-md5\"\n#define NID_rc4_hmac_md5                915\n\n#define SN_aes_128_cbc_hmac_sha1                \"AES-128-CBC-HMAC-SHA1\"\n#define LN_aes_128_cbc_hmac_sha1                \"aes-128-cbc-hmac-sha1\"\n#define NID_aes_128_cbc_hmac_sha1               916\n\n#define SN_aes_192_cbc_hmac_sha1                \"AES-192-CBC-HMAC-SHA1\"\n#define LN_aes_192_cbc_hmac_sha1                \"aes-192-cbc-hmac-sha1\"\n#define NID_aes_192_cbc_hmac_sha1               917\n\n#define SN_aes_256_cbc_hmac_sha1                \"AES-256-CBC-HMAC-SHA1\"\n#define LN_aes_256_cbc_hmac_sha1                \"aes-256-cbc-hmac-sha1\"\n#define NID_aes_256_cbc_hmac_sha1               918\n"
  },
  {
    "path": "Pods/OpenSSL-Universal/include-ios/openssl/objects.h",
    "content": "/* crypto/objects/objects.h */\n/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)\n * All rights reserved.\n *\n * This package is an SSL implementation written\n * by Eric Young (eay@cryptsoft.com).\n * The implementation was written so as to conform with Netscapes SSL.\n *\n * This library is free for commercial and non-commercial use as long as\n * the following conditions are aheared to.  The following conditions\n * apply to all code found in this distribution, be it the RC4, RSA,\n * lhash, DES, etc., code; not just the SSL code.  The SSL documentation\n * included with this distribution is covered by the same copyright terms\n * except that the holder is Tim Hudson (tjh@cryptsoft.com).\n *\n * Copyright remains Eric Young's, and as such any Copyright notices in\n * the code are not to be removed.\n * If this package is used in a product, Eric Young should be given attribution\n * as the author of the parts of the library used.\n * This can be in the form of a textual message at program startup or\n * in documentation (online or textual) provided with the package.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n * 1. Redistributions of source code must retain the copyright\n *    notice, this list of conditions and the following disclaimer.\n * 2. Redistributions in binary form must reproduce the above copyright\n *    notice, this list of conditions and the following disclaimer in the\n *    documentation and/or other materials provided with the distribution.\n * 3. All advertising materials mentioning features or use of this software\n *    must display the following acknowledgement:\n *    \"This product includes cryptographic software written by\n *     Eric Young (eay@cryptsoft.com)\"\n *    The word 'cryptographic' can be left out if the rouines from the library\n *    being used are not cryptographic related :-).\n * 4. If you include any Windows specific code (or a derivative thereof) from\n *    the apps directory (application code) you must include an acknowledgement:\n *    \"This product includes software written by Tim Hudson (tjh@cryptsoft.com)\"\n *\n * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND\n * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE\n * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n * SUCH DAMAGE.\n *\n * The licence and distribution terms for any publically available version or\n * derivative of this code cannot be changed.  i.e. this code cannot simply be\n * copied and put under another distribution licence\n * [including the GNU Public Licence.]\n */\n\n#ifndef HEADER_OBJECTS_H\n# define HEADER_OBJECTS_H\n\n# define USE_OBJ_MAC\n\n# ifdef USE_OBJ_MAC\n#  include <openssl/obj_mac.h>\n# else\n#  define SN_undef                        \"UNDEF\"\n#  define LN_undef                        \"undefined\"\n#  define NID_undef                       0\n#  define OBJ_undef                       0L\n\n#  define SN_Algorithm                    \"Algorithm\"\n#  define LN_algorithm                    \"algorithm\"\n#  define NID_algorithm                   38\n#  define OBJ_algorithm                   1L,3L,14L,3L,2L\n\n#  define LN_rsadsi                       \"rsadsi\"\n#  define NID_rsadsi                      1\n#  define OBJ_rsadsi                      1L,2L,840L,113549L\n\n#  define LN_pkcs                         \"pkcs\"\n#  define NID_pkcs                        2\n#  define OBJ_pkcs                        OBJ_rsadsi,1L\n\n#  define SN_md2                          \"MD2\"\n#  define LN_md2                          \"md2\"\n#  define NID_md2                         3\n#  define OBJ_md2                         OBJ_rsadsi,2L,2L\n\n#  define SN_md5                          \"MD5\"\n#  define LN_md5                          \"md5\"\n#  define NID_md5                         4\n#  define OBJ_md5                         OBJ_rsadsi,2L,5L\n\n#  define SN_rc4                          \"RC4\"\n#  define LN_rc4                          \"rc4\"\n#  define NID_rc4                         5\n#  define OBJ_rc4                         OBJ_rsadsi,3L,4L\n\n#  define LN_rsaEncryption                \"rsaEncryption\"\n#  define NID_rsaEncryption               6\n#  define OBJ_rsaEncryption               OBJ_pkcs,1L,1L\n\n#  define SN_md2WithRSAEncryption         \"RSA-MD2\"\n#  define LN_md2WithRSAEncryption         \"md2WithRSAEncryption\"\n#  define NID_md2WithRSAEncryption        7\n#  define OBJ_md2WithRSAEncryption        OBJ_pkcs,1L,2L\n\n#  define SN_md5WithRSAEncryption         \"RSA-MD5\"\n#  define LN_md5WithRSAEncryption         \"md5WithRSAEncryption\"\n#  define NID_md5WithRSAEncryption        8\n#  define OBJ_md5WithRSAEncryption        OBJ_pkcs,1L,4L\n\n#  define SN_pbeWithMD2AndDES_CBC         \"PBE-MD2-DES\"\n#  define LN_pbeWithMD2AndDES_CBC         \"pbeWithMD2AndDES-CBC\"\n#  define NID_pbeWithMD2AndDES_CBC        9\n#  define OBJ_pbeWithMD2AndDES_CBC        OBJ_pkcs,5L,1L\n\n#  define SN_pbeWithMD5AndDES_CBC         \"PBE-MD5-DES\"\n#  define LN_pbeWithMD5AndDES_CBC         \"pbeWithMD5AndDES-CBC\"\n#  define NID_pbeWithMD5AndDES_CBC        10\n#  define OBJ_pbeWithMD5AndDES_CBC        OBJ_pkcs,5L,3L\n\n#  define LN_X500                         \"X500\"\n#  define NID_X500                        11\n#  define OBJ_X500                        2L,5L\n\n#  define LN_X509                         \"X509\"\n#  define NID_X509                        12\n#  define OBJ_X509                        OBJ_X500,4L\n\n#  define SN_commonName                   \"CN\"\n#  define LN_commonName                   \"commonName\"\n#  define NID_commonName                  13\n#  define OBJ_commonName                  OBJ_X509,3L\n\n#  define SN_countryName                  \"C\"\n#  define LN_countryName                  \"countryName\"\n#  define NID_countryName                 14\n#  define OBJ_countryName                 OBJ_X509,6L\n\n#  define SN_localityName                 \"L\"\n#  define LN_localityName                 \"localityName\"\n#  define NID_localityName                15\n#  define OBJ_localityName                OBJ_X509,7L\n\n/* Postal Address? PA */\n\n/* should be \"ST\" (rfc1327) but MS uses 'S' */\n#  define SN_stateOrProvinceName          \"ST\"\n#  define LN_stateOrProvinceName          \"stateOrProvinceName\"\n#  define NID_stateOrProvinceName         16\n#  define OBJ_stateOrProvinceName         OBJ_X509,8L\n\n#  define SN_organizationName             \"O\"\n#  define LN_organizationName             \"organizationName\"\n#  define NID_organizationName            17\n#  define OBJ_organizationName            OBJ_X509,10L\n\n#  define SN_organizationalUnitName       \"OU\"\n#  define LN_organizationalUnitName       \"organizationalUnitName\"\n#  define NID_organizationalUnitName      18\n#  define OBJ_organizationalUnitName      OBJ_X509,11L\n\n#  define SN_rsa                          \"RSA\"\n#  define LN_rsa                          \"rsa\"\n#  define NID_rsa                         19\n#  define OBJ_rsa                         OBJ_X500,8L,1L,1L\n\n#  define LN_pkcs7                        \"pkcs7\"\n#  define NID_pkcs7                       20\n#  define OBJ_pkcs7                       OBJ_pkcs,7L\n\n#  define LN_pkcs7_data                   \"pkcs7-data\"\n#  define NID_pkcs7_data                  21\n#  define OBJ_pkcs7_data                  OBJ_pkcs7,1L\n\n#  define LN_pkcs7_signed                 \"pkcs7-signedData\"\n#  define NID_pkcs7_signed                22\n#  define OBJ_pkcs7_signed                OBJ_pkcs7,2L\n\n#  define LN_pkcs7_enveloped              \"pkcs7-envelopedData\"\n#  define NID_pkcs7_enveloped             23\n#  define OBJ_pkcs7_enveloped             OBJ_pkcs7,3L\n\n#  define LN_pkcs7_signedAndEnveloped     \"pkcs7-signedAndEnvelopedData\"\n#  define NID_pkcs7_signedAndEnveloped    24\n#  define OBJ_pkcs7_signedAndEnveloped    OBJ_pkcs7,4L\n\n#  define LN_pkcs7_digest                 \"pkcs7-digestData\"\n#  define NID_pkcs7_digest                25\n#  define OBJ_pkcs7_digest                OBJ_pkcs7,5L\n\n#  define LN_pkcs7_encrypted              \"pkcs7-encryptedData\"\n#  define NID_pkcs7_encrypted             26\n#  define OBJ_pkcs7_encrypted             OBJ_pkcs7,6L\n\n#  define LN_pkcs3                        \"pkcs3\"\n#  define NID_pkcs3                       27\n#  define OBJ_pkcs3                       OBJ_pkcs,3L\n\n#  define LN_dhKeyAgreement               \"dhKeyAgreement\"\n#  define NID_dhKeyAgreement              28\n#  define OBJ_dhKeyAgreement              OBJ_pkcs3,1L\n\n#  define SN_des_ecb                      \"DES-ECB\"\n#  define LN_des_ecb                      \"des-ecb\"\n#  define NID_des_ecb                     29\n#  define OBJ_des_ecb                     OBJ_algorithm,6L\n\n#  define SN_des_cfb64                    \"DES-CFB\"\n#  define LN_des_cfb64                    \"des-cfb\"\n#  define NID_des_cfb64                   30\n/* IV + num */\n#  define OBJ_des_cfb64                   OBJ_algorithm,9L\n\n#  define SN_des_cbc                      \"DES-CBC\"\n#  define LN_des_cbc                      \"des-cbc\"\n#  define NID_des_cbc                     31\n/* IV */\n#  define OBJ_des_cbc                     OBJ_algorithm,7L\n\n#  define SN_des_ede                      \"DES-EDE\"\n#  define LN_des_ede                      \"des-ede\"\n#  define NID_des_ede                     32\n/* ?? */\n#  define OBJ_des_ede                     OBJ_algorithm,17L\n\n#  define SN_des_ede3                     \"DES-EDE3\"\n#  define LN_des_ede3                     \"des-ede3\"\n#  define NID_des_ede3                    33\n\n#  define SN_idea_cbc                     \"IDEA-CBC\"\n#  define LN_idea_cbc                     \"idea-cbc\"\n#  define NID_idea_cbc                    34\n#  define OBJ_idea_cbc                    1L,3L,6L,1L,4L,1L,188L,7L,1L,1L,2L\n\n#  define SN_idea_cfb64                   \"IDEA-CFB\"\n#  define LN_idea_cfb64                   \"idea-cfb\"\n#  define NID_idea_cfb64                  35\n\n#  define SN_idea_ecb                     \"IDEA-ECB\"\n#  define LN_idea_ecb                     \"idea-ecb\"\n#  define NID_idea_ecb                    36\n\n#  define SN_rc2_cbc                      \"RC2-CBC\"\n#  define LN_rc2_cbc                      \"rc2-cbc\"\n#  define NID_rc2_cbc                     37\n#  define OBJ_rc2_cbc                     OBJ_rsadsi,3L,2L\n\n#  define SN_rc2_ecb                      \"RC2-ECB\"\n#  define LN_rc2_ecb                      \"rc2-ecb\"\n#  define NID_rc2_ecb                     38\n\n#  define SN_rc2_cfb64                    \"RC2-CFB\"\n#  define LN_rc2_cfb64                    \"rc2-cfb\"\n#  define NID_rc2_cfb64                   39\n\n#  define SN_rc2_ofb64                    \"RC2-OFB\"\n#  define LN_rc2_ofb64                    \"rc2-ofb\"\n#  define NID_rc2_ofb64                   40\n\n#  define SN_sha                          \"SHA\"\n#  define LN_sha                          \"sha\"\n#  define NID_sha                         41\n#  define OBJ_sha                         OBJ_algorithm,18L\n\n#  define SN_shaWithRSAEncryption         \"RSA-SHA\"\n#  define LN_shaWithRSAEncryption         \"shaWithRSAEncryption\"\n#  define NID_shaWithRSAEncryption        42\n#  define OBJ_shaWithRSAEncryption        OBJ_algorithm,15L\n\n#  define SN_des_ede_cbc                  \"DES-EDE-CBC\"\n#  define LN_des_ede_cbc                  \"des-ede-cbc\"\n#  define NID_des_ede_cbc                 43\n\n#  define SN_des_ede3_cbc                 \"DES-EDE3-CBC\"\n#  define LN_des_ede3_cbc                 \"des-ede3-cbc\"\n#  define NID_des_ede3_cbc                44\n#  define OBJ_des_ede3_cbc                OBJ_rsadsi,3L,7L\n\n#  define SN_des_ofb64                    \"DES-OFB\"\n#  define LN_des_ofb64                    \"des-ofb\"\n#  define NID_des_ofb64                   45\n#  define OBJ_des_ofb64                   OBJ_algorithm,8L\n\n#  define SN_idea_ofb64                   \"IDEA-OFB\"\n#  define LN_idea_ofb64                   \"idea-ofb\"\n#  define NID_idea_ofb64                  46\n\n#  define LN_pkcs9                        \"pkcs9\"\n#  define NID_pkcs9                       47\n#  define OBJ_pkcs9                       OBJ_pkcs,9L\n\n#  define SN_pkcs9_emailAddress           \"Email\"\n#  define LN_pkcs9_emailAddress           \"emailAddress\"\n#  define NID_pkcs9_emailAddress          48\n#  define OBJ_pkcs9_emailAddress          OBJ_pkcs9,1L\n\n#  define LN_pkcs9_unstructuredName       \"unstructuredName\"\n#  define NID_pkcs9_unstructuredName      49\n#  define OBJ_pkcs9_unstructuredName      OBJ_pkcs9,2L\n\n#  define LN_pkcs9_contentType            \"contentType\"\n#  define NID_pkcs9_contentType           50\n#  define OBJ_pkcs9_contentType           OBJ_pkcs9,3L\n\n#  define LN_pkcs9_messageDigest          \"messageDigest\"\n#  define NID_pkcs9_messageDigest         51\n#  define OBJ_pkcs9_messageDigest         OBJ_pkcs9,4L\n\n#  define LN_pkcs9_signingTime            \"signingTime\"\n#  define NID_pkcs9_signingTime           52\n#  define OBJ_pkcs9_signingTime           OBJ_pkcs9,5L\n\n#  define LN_pkcs9_countersignature       \"countersignature\"\n#  define NID_pkcs9_countersignature      53\n#  define OBJ_pkcs9_countersignature      OBJ_pkcs9,6L\n\n#  define LN_pkcs9_challengePassword      \"challengePassword\"\n#  define NID_pkcs9_challengePassword     54\n#  define OBJ_pkcs9_challengePassword     OBJ_pkcs9,7L\n\n#  define LN_pkcs9_unstructuredAddress    \"unstructuredAddress\"\n#  define NID_pkcs9_unstructuredAddress   55\n#  define OBJ_pkcs9_unstructuredAddress   OBJ_pkcs9,8L\n\n#  define LN_pkcs9_extCertAttributes      \"extendedCertificateAttributes\"\n#  define NID_pkcs9_extCertAttributes     56\n#  define OBJ_pkcs9_extCertAttributes     OBJ_pkcs9,9L\n\n#  define SN_netscape                     \"Netscape\"\n#  define LN_netscape                     \"Netscape Communications Corp.\"\n#  define NID_netscape                    57\n#  define OBJ_netscape                    2L,16L,840L,1L,113730L\n\n#  define SN_netscape_cert_extension      \"nsCertExt\"\n#  define LN_netscape_cert_extension      \"Netscape Certificate Extension\"\n#  define NID_netscape_cert_extension     58\n#  define OBJ_netscape_cert_extension     OBJ_netscape,1L\n\n#  define SN_netscape_data_type           \"nsDataType\"\n#  define LN_netscape_data_type           \"Netscape Data Type\"\n#  define NID_netscape_data_type          59\n#  define OBJ_netscape_data_type          OBJ_netscape,2L\n\n#  define SN_des_ede_cfb64                \"DES-EDE-CFB\"\n#  define LN_des_ede_cfb64                \"des-ede-cfb\"\n#  define NID_des_ede_cfb64               60\n\n#  define SN_des_ede3_cfb64               \"DES-EDE3-CFB\"\n#  define LN_des_ede3_cfb64               \"des-ede3-cfb\"\n#  define NID_des_ede3_cfb64              61\n\n#  define SN_des_ede_ofb64                \"DES-EDE-OFB\"\n#  define LN_des_ede_ofb64                \"des-ede-ofb\"\n#  define NID_des_ede_ofb64               62\n\n#  define SN_des_ede3_ofb64               \"DES-EDE3-OFB\"\n#  define LN_des_ede3_ofb64               \"des-ede3-ofb\"\n#  define NID_des_ede3_ofb64              63\n\n/* I'm not sure about the object ID */\n#  define SN_sha1                         \"SHA1\"\n#  define LN_sha1                         \"sha1\"\n#  define NID_sha1                        64\n#  define OBJ_sha1                        OBJ_algorithm,26L\n/* 28 Jun 1996 - eay */\n/* #define OBJ_sha1                     1L,3L,14L,2L,26L,05L <- wrong */\n\n#  define SN_sha1WithRSAEncryption        \"RSA-SHA1\"\n#  define LN_sha1WithRSAEncryption        \"sha1WithRSAEncryption\"\n#  define NID_sha1WithRSAEncryption       65\n#  define OBJ_sha1WithRSAEncryption       OBJ_pkcs,1L,5L\n\n#  define SN_dsaWithSHA                   \"DSA-SHA\"\n#  define LN_dsaWithSHA                   \"dsaWithSHA\"\n#  define NID_dsaWithSHA                  66\n#  define OBJ_dsaWithSHA                  OBJ_algorithm,13L\n\n#  define SN_dsa_2                        \"DSA-old\"\n#  define LN_dsa_2                        \"dsaEncryption-old\"\n#  define NID_dsa_2                       67\n#  define OBJ_dsa_2                       OBJ_algorithm,12L\n\n/* proposed by microsoft to RSA */\n#  define SN_pbeWithSHA1AndRC2_CBC        \"PBE-SHA1-RC2-64\"\n#  define LN_pbeWithSHA1AndRC2_CBC        \"pbeWithSHA1AndRC2-CBC\"\n#  define NID_pbeWithSHA1AndRC2_CBC       68\n#  define OBJ_pbeWithSHA1AndRC2_CBC       OBJ_pkcs,5L,11L\n\n/*\n * proposed by microsoft to RSA as pbeWithSHA1AndRC4: it is now defined\n * explicitly in PKCS#5 v2.0 as id-PBKDF2 which is something completely\n * different.\n */\n#  define LN_id_pbkdf2                    \"PBKDF2\"\n#  define NID_id_pbkdf2                   69\n#  define OBJ_id_pbkdf2                   OBJ_pkcs,5L,12L\n\n#  define SN_dsaWithSHA1_2                \"DSA-SHA1-old\"\n#  define LN_dsaWithSHA1_2                \"dsaWithSHA1-old\"\n#  define NID_dsaWithSHA1_2               70\n/* Got this one from 'sdn706r20.pdf' which is actually an NSA document :-) */\n#  define OBJ_dsaWithSHA1_2               OBJ_algorithm,27L\n\n#  define SN_netscape_cert_type           \"nsCertType\"\n#  define LN_netscape_cert_type           \"Netscape Cert Type\"\n#  define NID_netscape_cert_type          71\n#  define OBJ_netscape_cert_type          OBJ_netscape_cert_extension,1L\n\n#  define SN_netscape_base_url            \"nsBaseUrl\"\n#  define LN_netscape_base_url            \"Netscape Base Url\"\n#  define NID_netscape_base_url           72\n#  define OBJ_netscape_base_url           OBJ_netscape_cert_extension,2L\n\n#  define SN_netscape_revocation_url      \"nsRevocationUrl\"\n#  define LN_netscape_revocation_url      \"Netscape Revocation Url\"\n#  define NID_netscape_revocation_url     73\n#  define OBJ_netscape_revocation_url     OBJ_netscape_cert_extension,3L\n\n#  define SN_netscape_ca_revocation_url   \"nsCaRevocationUrl\"\n#  define LN_netscape_ca_revocation_url   \"Netscape CA Revocation Url\"\n#  define NID_netscape_ca_revocation_url  74\n#  define OBJ_netscape_ca_revocation_url  OBJ_netscape_cert_extension,4L\n\n#  define SN_netscape_renewal_url         \"nsRenewalUrl\"\n#  define LN_netscape_renewal_url         \"Netscape Renewal Url\"\n#  define NID_netscape_renewal_url        75\n#  define OBJ_netscape_renewal_url        OBJ_netscape_cert_extension,7L\n\n#  define SN_netscape_ca_policy_url       \"nsCaPolicyUrl\"\n#  define LN_netscape_ca_policy_url       \"Netscape CA Policy Url\"\n#  define NID_netscape_ca_policy_url      76\n#  define OBJ_netscape_ca_policy_url      OBJ_netscape_cert_extension,8L\n\n#  define SN_netscape_ssl_server_name     \"nsSslServerName\"\n#  define LN_netscape_ssl_server_name     \"Netscape SSL Server Name\"\n#  define NID_netscape_ssl_server_name    77\n#  define OBJ_netscape_ssl_server_name    OBJ_netscape_cert_extension,12L\n\n#  define SN_netscape_comment             \"nsComment\"\n#  define LN_netscape_comment             \"Netscape Comment\"\n#  define NID_netscape_comment            78\n#  define OBJ_netscape_comment            OBJ_netscape_cert_extension,13L\n\n#  define SN_netscape_cert_sequence       \"nsCertSequence\"\n#  define LN_netscape_cert_sequence       \"Netscape Certificate Sequence\"\n#  define NID_netscape_cert_sequence      79\n#  define OBJ_netscape_cert_sequence      OBJ_netscape_data_type,5L\n\n#  define SN_desx_cbc                     \"DESX-CBC\"\n#  define LN_desx_cbc                     \"desx-cbc\"\n#  define NID_desx_cbc                    80\n\n#  define SN_id_ce                        \"id-ce\"\n#  define NID_id_ce                       81\n#  define OBJ_id_ce                       2L,5L,29L\n\n#  define SN_subject_key_identifier       \"subjectKeyIdentifier\"\n#  define LN_subject_key_identifier       \"X509v3 Subject Key Identifier\"\n#  define NID_subject_key_identifier      82\n#  define OBJ_subject_key_identifier      OBJ_id_ce,14L\n\n#  define SN_key_usage                    \"keyUsage\"\n#  define LN_key_usage                    \"X509v3 Key Usage\"\n#  define NID_key_usage                   83\n#  define OBJ_key_usage                   OBJ_id_ce,15L\n\n#  define SN_private_key_usage_period     \"privateKeyUsagePeriod\"\n#  define LN_private_key_usage_period     \"X509v3 Private Key Usage Period\"\n#  define NID_private_key_usage_period    84\n#  define OBJ_private_key_usage_period    OBJ_id_ce,16L\n\n#  define SN_subject_alt_name             \"subjectAltName\"\n#  define LN_subject_alt_name             \"X509v3 Subject Alternative Name\"\n#  define NID_subject_alt_name            85\n#  define OBJ_subject_alt_name            OBJ_id_ce,17L\n\n#  define SN_issuer_alt_name              \"issuerAltName\"\n#  define LN_issuer_alt_name              \"X509v3 Issuer Alternative Name\"\n#  define NID_issuer_alt_name             86\n#  define OBJ_issuer_alt_name             OBJ_id_ce,18L\n\n#  define SN_basic_constraints            \"basicConstraints\"\n#  define LN_basic_constraints            \"X509v3 Basic Constraints\"\n#  define NID_basic_constraints           87\n#  define OBJ_basic_constraints           OBJ_id_ce,19L\n\n#  define SN_crl_number                   \"crlNumber\"\n#  define LN_crl_number                   \"X509v3 CRL Number\"\n#  define NID_crl_number                  88\n#  define OBJ_crl_number                  OBJ_id_ce,20L\n\n#  define SN_certificate_policies         \"certificatePolicies\"\n#  define LN_certificate_policies         \"X509v3 Certificate Policies\"\n#  define NID_certificate_policies        89\n#  define OBJ_certificate_policies        OBJ_id_ce,32L\n\n#  define SN_authority_key_identifier     \"authorityKeyIdentifier\"\n#  define LN_authority_key_identifier     \"X509v3 Authority Key Identifier\"\n#  define NID_authority_key_identifier    90\n#  define OBJ_authority_key_identifier    OBJ_id_ce,35L\n\n#  define SN_bf_cbc                       \"BF-CBC\"\n#  define LN_bf_cbc                       \"bf-cbc\"\n#  define NID_bf_cbc                      91\n#  define OBJ_bf_cbc                      1L,3L,6L,1L,4L,1L,3029L,1L,2L\n\n#  define SN_bf_ecb                       \"BF-ECB\"\n#  define LN_bf_ecb                       \"bf-ecb\"\n#  define NID_bf_ecb                      92\n\n#  define SN_bf_cfb64                     \"BF-CFB\"\n#  define LN_bf_cfb64                     \"bf-cfb\"\n#  define NID_bf_cfb64                    93\n\n#  define SN_bf_ofb64                     \"BF-OFB\"\n#  define LN_bf_ofb64                     \"bf-ofb\"\n#  define NID_bf_ofb64                    94\n\n#  define SN_mdc2                         \"MDC2\"\n#  define LN_mdc2                         \"mdc2\"\n#  define NID_mdc2                        95\n#  define OBJ_mdc2                        2L,5L,8L,3L,101L\n/* An alternative?                      1L,3L,14L,3L,2L,19L */\n\n#  define SN_mdc2WithRSA                  \"RSA-MDC2\"\n#  define LN_mdc2WithRSA                  \"mdc2withRSA\"\n#  define NID_mdc2WithRSA                 96\n#  define OBJ_mdc2WithRSA                 2L,5L,8L,3L,100L\n\n#  define SN_rc4_40                       \"RC4-40\"\n#  define LN_rc4_40                       \"rc4-40\"\n#  define NID_rc4_40                      97\n\n#  define SN_rc2_40_cbc                   \"RC2-40-CBC\"\n#  define LN_rc2_40_cbc                   \"rc2-40-cbc\"\n#  define NID_rc2_40_cbc                  98\n\n#  define SN_givenName                    \"G\"\n#  define LN_givenName                    \"givenName\"\n#  define NID_givenName                   99\n#  define OBJ_givenName                   OBJ_X509,42L\n\n#  define SN_surname                      \"S\"\n#  define LN_surname                      \"surname\"\n#  define NID_surname                     100\n#  define OBJ_surname                     OBJ_X509,4L\n\n#  define SN_initials                     \"I\"\n#  define LN_initials                     \"initials\"\n#  define NID_initials                    101\n#  define OBJ_initials                    OBJ_X509,43L\n\n#  define SN_uniqueIdentifier             \"UID\"\n#  define LN_uniqueIdentifier             \"uniqueIdentifier\"\n#  define NID_uniqueIdentifier            102\n#  define OBJ_uniqueIdentifier            OBJ_X509,45L\n\n#  define SN_crl_distribution_points      \"crlDistributionPoints\"\n#  define LN_crl_distribution_points      \"X509v3 CRL Distribution Points\"\n#  define NID_crl_distribution_points     103\n#  define OBJ_crl_distribution_points     OBJ_id_ce,31L\n\n#  define SN_md5WithRSA                   \"RSA-NP-MD5\"\n#  define LN_md5WithRSA                   \"md5WithRSA\"\n#  define NID_md5WithRSA                  104\n#  define OBJ_md5WithRSA                  OBJ_algorithm,3L\n\n#  define SN_serialNumber                 \"SN\"\n#  define LN_serialNumber                 \"serialNumber\"\n#  define NID_serialNumber                105\n#  define OBJ_serialNumber                OBJ_X509,5L\n\n#  define SN_title                        \"T\"\n#  define LN_title                        \"title\"\n#  define NID_title                       106\n#  define OBJ_title                       OBJ_X509,12L\n\n#  define SN_description                  \"D\"\n#  define LN_description                  \"description\"\n#  define NID_description                 107\n#  define OBJ_description                 OBJ_X509,13L\n\n/* CAST5 is CAST-128, I'm just sticking with the documentation */\n#  define SN_cast5_cbc                    \"CAST5-CBC\"\n#  define LN_cast5_cbc                    \"cast5-cbc\"\n#  define NID_cast5_cbc                   108\n#  define OBJ_cast5_cbc                   1L,2L,840L,113533L,7L,66L,10L\n\n#  define SN_cast5_ecb                    \"CAST5-ECB\"\n#  define LN_cast5_ecb                    \"cast5-ecb\"\n#  define NID_cast5_ecb                   109\n\n#  define SN_cast5_cfb64                  \"CAST5-CFB\"\n#  define LN_cast5_cfb64                  \"cast5-cfb\"\n#  define NID_cast5_cfb64                 110\n\n#  define SN_cast5_ofb64                  \"CAST5-OFB\"\n#  define LN_cast5_ofb64                  \"cast5-ofb\"\n#  define NID_cast5_ofb64                 111\n\n#  define LN_pbeWithMD5AndCast5_CBC       \"pbeWithMD5AndCast5CBC\"\n#  define NID_pbeWithMD5AndCast5_CBC      112\n#  define OBJ_pbeWithMD5AndCast5_CBC      1L,2L,840L,113533L,7L,66L,12L\n\n/*-\n * This is one sun will soon be using :-(\n * id-dsa-with-sha1 ID  ::= {\n *   iso(1) member-body(2) us(840) x9-57 (10040) x9cm(4) 3 }\n */\n#  define SN_dsaWithSHA1                  \"DSA-SHA1\"\n#  define LN_dsaWithSHA1                  \"dsaWithSHA1\"\n#  define NID_dsaWithSHA1                 113\n#  define OBJ_dsaWithSHA1                 1L,2L,840L,10040L,4L,3L\n\n#  define NID_md5_sha1                    114\n#  define SN_md5_sha1                     \"MD5-SHA1\"\n#  define LN_md5_sha1                     \"md5-sha1\"\n\n#  define SN_sha1WithRSA                  \"RSA-SHA1-2\"\n#  define LN_sha1WithRSA                  \"sha1WithRSA\"\n#  define NID_sha1WithRSA                 115\n#  define OBJ_sha1WithRSA                 OBJ_algorithm,29L\n\n#  define SN_dsa                          \"DSA\"\n#  define LN_dsa                          \"dsaEncryption\"\n#  define NID_dsa                         116\n#  define OBJ_dsa                         1L,2L,840L,10040L,4L,1L\n\n#  define SN_ripemd160                    \"RIPEMD160\"\n#  define LN_ripemd160                    \"ripemd160\"\n#  define NID_ripemd160                   117\n#  define OBJ_ripemd160                   1L,3L,36L,3L,2L,1L\n\n/*\n * The name should actually be rsaSignatureWithripemd160, but I'm going to\n * continue using the convention I'm using with the other ciphers\n */\n#  define SN_ripemd160WithRSA             \"RSA-RIPEMD160\"\n#  define LN_ripemd160WithRSA             \"ripemd160WithRSA\"\n#  define NID_ripemd160WithRSA            119\n#  define OBJ_ripemd160WithRSA            1L,3L,36L,3L,3L,1L,2L\n\n/*-\n * Taken from rfc2040\n *  RC5_CBC_Parameters ::= SEQUENCE {\n *      version           INTEGER (v1_0(16)),\n *      rounds            INTEGER (8..127),\n *      blockSizeInBits   INTEGER (64, 128),\n *      iv                OCTET STRING OPTIONAL\n *      }\n */\n#  define SN_rc5_cbc                      \"RC5-CBC\"\n#  define LN_rc5_cbc                      \"rc5-cbc\"\n#  define NID_rc5_cbc                     120\n#  define OBJ_rc5_cbc                     OBJ_rsadsi,3L,8L\n\n#  define SN_rc5_ecb                      \"RC5-ECB\"\n#  define LN_rc5_ecb                      \"rc5-ecb\"\n#  define NID_rc5_ecb                     121\n\n#  define SN_rc5_cfb64                    \"RC5-CFB\"\n#  define LN_rc5_cfb64                    \"rc5-cfb\"\n#  define NID_rc5_cfb64                   122\n\n#  define SN_rc5_ofb64                    \"RC5-OFB\"\n#  define LN_rc5_ofb64                    \"rc5-ofb\"\n#  define NID_rc5_ofb64                   123\n\n#  define SN_rle_compression              \"RLE\"\n#  define LN_rle_compression              \"run length compression\"\n#  define NID_rle_compression             124\n#  define OBJ_rle_compression             1L,1L,1L,1L,666L,1L\n\n#  define SN_zlib_compression             \"ZLIB\"\n#  define LN_zlib_compression             \"zlib compression\"\n#  define NID_zlib_compression            125\n#  define OBJ_zlib_compression            1L,1L,1L,1L,666L,2L\n\n#  define SN_ext_key_usage                \"extendedKeyUsage\"\n#  define LN_ext_key_usage                \"X509v3 Extended Key Usage\"\n#  define NID_ext_key_usage               126\n#  define OBJ_ext_key_usage               OBJ_id_ce,37\n\n#  define SN_id_pkix                      \"PKIX\"\n#  define NID_id_pkix                     127\n#  define OBJ_id_pkix                     1L,3L,6L,1L,5L,5L,7L\n\n#  define SN_id_kp                        \"id-kp\"\n#  define NID_id_kp                       128\n#  define OBJ_id_kp                       OBJ_id_pkix,3L\n\n/* PKIX extended key usage OIDs */\n\n#  define SN_server_auth                  \"serverAuth\"\n#  define LN_server_auth                  \"TLS Web Server Authentication\"\n#  define NID_server_auth                 129\n#  define OBJ_server_auth                 OBJ_id_kp,1L\n\n#  define SN_client_auth                  \"clientAuth\"\n#  define LN_client_auth                  \"TLS Web Client Authentication\"\n#  define NID_client_auth                 130\n#  define OBJ_client_auth                 OBJ_id_kp,2L\n\n#  define SN_code_sign                    \"codeSigning\"\n#  define LN_code_sign                    \"Code Signing\"\n#  define NID_code_sign                   131\n#  define OBJ_code_sign                   OBJ_id_kp,3L\n\n#  define SN_email_protect                \"emailProtection\"\n#  define LN_email_protect                \"E-mail Protection\"\n#  define NID_email_protect               132\n#  define OBJ_email_protect               OBJ_id_kp,4L\n\n#  define SN_time_stamp                   \"timeStamping\"\n#  define LN_time_stamp                   \"Time Stamping\"\n#  define NID_time_stamp                  133\n#  define OBJ_time_stamp                  OBJ_id_kp,8L\n\n/* Additional extended key usage OIDs: Microsoft */\n\n#  define SN_ms_code_ind                  \"msCodeInd\"\n#  define LN_ms_code_ind                  \"Microsoft Individual Code Signing\"\n#  define NID_ms_code_ind                 134\n#  define OBJ_ms_code_ind                 1L,3L,6L,1L,4L,1L,311L,2L,1L,21L\n\n#  define SN_ms_code_com                  \"msCodeCom\"\n#  define LN_ms_code_com                  \"Microsoft Commercial Code Signing\"\n#  define NID_ms_code_com                 135\n#  define OBJ_ms_code_com                 1L,3L,6L,1L,4L,1L,311L,2L,1L,22L\n\n#  define SN_ms_ctl_sign                  \"msCTLSign\"\n#  define LN_ms_ctl_sign                  \"Microsoft Trust List Signing\"\n#  define NID_ms_ctl_sign                 136\n#  define OBJ_ms_ctl_sign                 1L,3L,6L,1L,4L,1L,311L,10L,3L,1L\n\n#  define SN_ms_sgc                       \"msSGC\"\n#  define LN_ms_sgc                       \"Microsoft Server Gated Crypto\"\n#  define NID_ms_sgc                      137\n#  define OBJ_ms_sgc                      1L,3L,6L,1L,4L,1L,311L,10L,3L,3L\n\n#  define SN_ms_efs                       \"msEFS\"\n#  define LN_ms_efs                       \"Microsoft Encrypted File System\"\n#  define NID_ms_efs                      138\n#  define OBJ_ms_efs                      1L,3L,6L,1L,4L,1L,311L,10L,3L,4L\n\n/* Additional usage: Netscape */\n\n#  define SN_ns_sgc                       \"nsSGC\"\n#  define LN_ns_sgc                       \"Netscape Server Gated Crypto\"\n#  define NID_ns_sgc                      139\n#  define OBJ_ns_sgc                      OBJ_netscape,4L,1L\n\n#  define SN_delta_crl                    \"deltaCRL\"\n#  define LN_delta_crl                    \"X509v3 Delta CRL Indicator\"\n#  define NID_delta_crl                   140\n#  define OBJ_delta_crl                   OBJ_id_ce,27L\n\n#  define SN_crl_reason                   \"CRLReason\"\n#  define LN_crl_reason                   \"CRL Reason Code\"\n#  define NID_crl_reason                  141\n#  define OBJ_crl_reason                  OBJ_id_ce,21L\n\n#  define SN_invalidity_date              \"invalidityDate\"\n#  define LN_invalidity_date              \"Invalidity Date\"\n#  define NID_invalidity_date             142\n#  define OBJ_invalidity_date             OBJ_id_ce,24L\n\n#  define SN_sxnet                        \"SXNetID\"\n#  define LN_sxnet                        \"Strong Extranet ID\"\n#  define NID_sxnet                       143\n#  define OBJ_sxnet                       1L,3L,101L,1L,4L,1L\n\n/* PKCS12 and related OBJECT IDENTIFIERS */\n\n#  define OBJ_pkcs12                      OBJ_pkcs,12L\n#  define OBJ_pkcs12_pbeids               OBJ_pkcs12, 1\n\n#  define SN_pbe_WithSHA1And128BitRC4     \"PBE-SHA1-RC4-128\"\n#  define LN_pbe_WithSHA1And128BitRC4     \"pbeWithSHA1And128BitRC4\"\n#  define NID_pbe_WithSHA1And128BitRC4    144\n#  define OBJ_pbe_WithSHA1And128BitRC4    OBJ_pkcs12_pbeids, 1L\n\n#  define SN_pbe_WithSHA1And40BitRC4      \"PBE-SHA1-RC4-40\"\n#  define LN_pbe_WithSHA1And40BitRC4      \"pbeWithSHA1And40BitRC4\"\n#  define NID_pbe_WithSHA1And40BitRC4     145\n#  define OBJ_pbe_WithSHA1And40BitRC4     OBJ_pkcs12_pbeids, 2L\n\n#  define SN_pbe_WithSHA1And3_Key_TripleDES_CBC   \"PBE-SHA1-3DES\"\n#  define LN_pbe_WithSHA1And3_Key_TripleDES_CBC   \"pbeWithSHA1And3-KeyTripleDES-CBC\"\n#  define NID_pbe_WithSHA1And3_Key_TripleDES_CBC  146\n#  define OBJ_pbe_WithSHA1And3_Key_TripleDES_CBC  OBJ_pkcs12_pbeids, 3L\n\n#  define SN_pbe_WithSHA1And2_Key_TripleDES_CBC   \"PBE-SHA1-2DES\"\n#  define LN_pbe_WithSHA1And2_Key_TripleDES_CBC   \"pbeWithSHA1And2-KeyTripleDES-CBC\"\n#  define NID_pbe_WithSHA1And2_Key_TripleDES_CBC  147\n#  define OBJ_pbe_WithSHA1And2_Key_TripleDES_CBC  OBJ_pkcs12_pbeids, 4L\n\n#  define SN_pbe_WithSHA1And128BitRC2_CBC         \"PBE-SHA1-RC2-128\"\n#  define LN_pbe_WithSHA1And128BitRC2_CBC         \"pbeWithSHA1And128BitRC2-CBC\"\n#  define NID_pbe_WithSHA1And128BitRC2_CBC        148\n#  define OBJ_pbe_WithSHA1And128BitRC2_CBC        OBJ_pkcs12_pbeids, 5L\n\n#  define SN_pbe_WithSHA1And40BitRC2_CBC  \"PBE-SHA1-RC2-40\"\n#  define LN_pbe_WithSHA1And40BitRC2_CBC  \"pbeWithSHA1And40BitRC2-CBC\"\n#  define NID_pbe_WithSHA1And40BitRC2_CBC 149\n#  define OBJ_pbe_WithSHA1And40BitRC2_CBC OBJ_pkcs12_pbeids, 6L\n\n#  define OBJ_pkcs12_Version1     OBJ_pkcs12, 10L\n\n#  define OBJ_pkcs12_BagIds       OBJ_pkcs12_Version1, 1L\n\n#  define LN_keyBag               \"keyBag\"\n#  define NID_keyBag              150\n#  define OBJ_keyBag              OBJ_pkcs12_BagIds, 1L\n\n#  define LN_pkcs8ShroudedKeyBag  \"pkcs8ShroudedKeyBag\"\n#  define NID_pkcs8ShroudedKeyBag 151\n#  define OBJ_pkcs8ShroudedKeyBag OBJ_pkcs12_BagIds, 2L\n\n#  define LN_certBag              \"certBag\"\n#  define NID_certBag             152\n#  define OBJ_certBag             OBJ_pkcs12_BagIds, 3L\n\n#  define LN_crlBag               \"crlBag\"\n#  define NID_crlBag              153\n#  define OBJ_crlBag              OBJ_pkcs12_BagIds, 4L\n\n#  define LN_secretBag            \"secretBag\"\n#  define NID_secretBag           154\n#  define OBJ_secretBag           OBJ_pkcs12_BagIds, 5L\n\n#  define LN_safeContentsBag      \"safeContentsBag\"\n#  define NID_safeContentsBag     155\n#  define OBJ_safeContentsBag     OBJ_pkcs12_BagIds, 6L\n\n#  define LN_friendlyName         \"friendlyName\"\n#  define NID_friendlyName        156\n#  define OBJ_friendlyName        OBJ_pkcs9, 20L\n\n#  define LN_localKeyID           \"localKeyID\"\n#  define NID_localKeyID          157\n#  define OBJ_localKeyID          OBJ_pkcs9, 21L\n\n#  define OBJ_certTypes           OBJ_pkcs9, 22L\n\n#  define LN_x509Certificate      \"x509Certificate\"\n#  define NID_x509Certificate     158\n#  define OBJ_x509Certificate     OBJ_certTypes, 1L\n\n#  define LN_sdsiCertificate      \"sdsiCertificate\"\n#  define NID_sdsiCertificate     159\n#  define OBJ_sdsiCertificate     OBJ_certTypes, 2L\n\n#  define OBJ_crlTypes            OBJ_pkcs9, 23L\n\n#  define LN_x509Crl              \"x509Crl\"\n#  define NID_x509Crl             160\n#  define OBJ_x509Crl             OBJ_crlTypes, 1L\n\n/* PKCS#5 v2 OIDs */\n\n#  define LN_pbes2                \"PBES2\"\n#  define NID_pbes2               161\n#  define OBJ_pbes2               OBJ_pkcs,5L,13L\n\n#  define LN_pbmac1               \"PBMAC1\"\n#  define NID_pbmac1              162\n#  define OBJ_pbmac1              OBJ_pkcs,5L,14L\n\n#  define LN_hmacWithSHA1         \"hmacWithSHA1\"\n#  define NID_hmacWithSHA1        163\n#  define OBJ_hmacWithSHA1        OBJ_rsadsi,2L,7L\n\n/* Policy Qualifier Ids */\n\n#  define LN_id_qt_cps            \"Policy Qualifier CPS\"\n#  define SN_id_qt_cps            \"id-qt-cps\"\n#  define NID_id_qt_cps           164\n#  define OBJ_id_qt_cps           OBJ_id_pkix,2L,1L\n\n#  define LN_id_qt_unotice        \"Policy Qualifier User Notice\"\n#  define SN_id_qt_unotice        \"id-qt-unotice\"\n#  define NID_id_qt_unotice       165\n#  define OBJ_id_qt_unotice       OBJ_id_pkix,2L,2L\n\n#  define SN_rc2_64_cbc                   \"RC2-64-CBC\"\n#  define LN_rc2_64_cbc                   \"rc2-64-cbc\"\n#  define NID_rc2_64_cbc                  166\n\n#  define SN_SMIMECapabilities            \"SMIME-CAPS\"\n#  define LN_SMIMECapabilities            \"S/MIME Capabilities\"\n#  define NID_SMIMECapabilities           167\n#  define OBJ_SMIMECapabilities           OBJ_pkcs9,15L\n\n#  define SN_pbeWithMD2AndRC2_CBC         \"PBE-MD2-RC2-64\"\n#  define LN_pbeWithMD2AndRC2_CBC         \"pbeWithMD2AndRC2-CBC\"\n#  define NID_pbeWithMD2AndRC2_CBC        168\n#  define OBJ_pbeWithMD2AndRC2_CBC        OBJ_pkcs,5L,4L\n\n#  define SN_pbeWithMD5AndRC2_CBC         \"PBE-MD5-RC2-64\"\n#  define LN_pbeWithMD5AndRC2_CBC         \"pbeWithMD5AndRC2-CBC\"\n#  define NID_pbeWithMD5AndRC2_CBC        169\n#  define OBJ_pbeWithMD5AndRC2_CBC        OBJ_pkcs,5L,6L\n\n#  define SN_pbeWithSHA1AndDES_CBC        \"PBE-SHA1-DES\"\n#  define LN_pbeWithSHA1AndDES_CBC        \"pbeWithSHA1AndDES-CBC\"\n#  define NID_pbeWithSHA1AndDES_CBC       170\n#  define OBJ_pbeWithSHA1AndDES_CBC       OBJ_pkcs,5L,10L\n\n/* Extension request OIDs */\n\n#  define LN_ms_ext_req                   \"Microsoft Extension Request\"\n#  define SN_ms_ext_req                   \"msExtReq\"\n#  define NID_ms_ext_req                  171\n#  define OBJ_ms_ext_req                  1L,3L,6L,1L,4L,1L,311L,2L,1L,14L\n\n#  define LN_ext_req                      \"Extension Request\"\n#  define SN_ext_req                      \"extReq\"\n#  define NID_ext_req                     172\n#  define OBJ_ext_req                     OBJ_pkcs9,14L\n\n#  define SN_name                         \"name\"\n#  define LN_name                         \"name\"\n#  define NID_name                        173\n#  define OBJ_name                        OBJ_X509,41L\n\n#  define SN_dnQualifier                  \"dnQualifier\"\n#  define LN_dnQualifier                  \"dnQualifier\"\n#  define NID_dnQualifier                 174\n#  define OBJ_dnQualifier                 OBJ_X509,46L\n\n#  define SN_id_pe                        \"id-pe\"\n#  define NID_id_pe                       175\n#  define OBJ_id_pe                       OBJ_id_pkix,1L\n\n#  define SN_id_ad                        \"id-ad\"\n#  define NID_id_ad                       176\n#  define OBJ_id_ad                       OBJ_id_pkix,48L\n\n#  define SN_info_access                  \"authorityInfoAccess\"\n#  define LN_info_access                  \"Authority Information Access\"\n#  define NID_info_access                 177\n#  define OBJ_info_access                 OBJ_id_pe,1L\n\n#  define SN_ad_OCSP                      \"OCSP\"\n#  define LN_ad_OCSP                      \"OCSP\"\n#  define NID_ad_OCSP                     178\n#  define OBJ_ad_OCSP                     OBJ_id_ad,1L\n\n#  define SN_ad_ca_issuers                \"caIssuers\"\n#  define LN_ad_ca_issuers                \"CA Issuers\"\n#  define NID_ad_ca_issuers               179\n#  define OBJ_ad_ca_issuers               OBJ_id_ad,2L\n\n#  define SN_OCSP_sign                    \"OCSPSigning\"\n#  define LN_OCSP_sign                    \"OCSP Signing\"\n#  define NID_OCSP_sign                   180\n#  define OBJ_OCSP_sign                   OBJ_id_kp,9L\n# endif                         /* USE_OBJ_MAC */\n\n# include <openssl/bio.h>\n# include <openssl/asn1.h>\n\n# define OBJ_NAME_TYPE_UNDEF             0x00\n# define OBJ_NAME_TYPE_MD_METH           0x01\n# define OBJ_NAME_TYPE_CIPHER_METH       0x02\n# define OBJ_NAME_TYPE_PKEY_METH         0x03\n# define OBJ_NAME_TYPE_COMP_METH         0x04\n# define OBJ_NAME_TYPE_NUM               0x05\n\n# define OBJ_NAME_ALIAS                  0x8000\n\n# define OBJ_BSEARCH_VALUE_ON_NOMATCH            0x01\n# define OBJ_BSEARCH_FIRST_VALUE_ON_MATCH        0x02\n\n\n#ifdef  __cplusplus\nextern \"C\" {\n#endif\n\ntypedef struct obj_name_st {\n    int type;\n    int alias;\n    const char *name;\n    const char *data;\n} OBJ_NAME;\n\n# define         OBJ_create_and_add_object(a,b,c) OBJ_create(a,b,c)\n\nint OBJ_NAME_init(void);\nint OBJ_NAME_new_index(unsigned long (*hash_func) (const char *),\n                       int (*cmp_func) (const char *, const char *),\n                       void (*free_func) (const char *, int, const char *));\nconst char *OBJ_NAME_get(const char *name, int type);\nint OBJ_NAME_add(const char *name, int type, const char *data);\nint OBJ_NAME_remove(const char *name, int type);\nvoid OBJ_NAME_cleanup(int type); /* -1 for everything */\nvoid OBJ_NAME_do_all(int type, void (*fn) (const OBJ_NAME *, void *arg),\n                     void *arg);\nvoid OBJ_NAME_do_all_sorted(int type,\n                            void (*fn) (const OBJ_NAME *, void *arg),\n                            void *arg);\n\nASN1_OBJECT *OBJ_dup(const ASN1_OBJECT *o);\nASN1_OBJECT *OBJ_nid2obj(int n);\nconst char *OBJ_nid2ln(int n);\nconst char *OBJ_nid2sn(int n);\nint OBJ_obj2nid(const ASN1_OBJECT *o);\nASN1_OBJECT *OBJ_txt2obj(const char *s, int no_name);\nint OBJ_obj2txt(char *buf, int buf_len, const ASN1_OBJECT *a, int no_name);\nint OBJ_txt2nid(const char *s);\nint OBJ_ln2nid(const char *s);\nint OBJ_sn2nid(const char *s);\nint OBJ_cmp(const ASN1_OBJECT *a, const ASN1_OBJECT *b);\nconst void *OBJ_bsearch_(const void *key, const void *base, int num, int size,\n                         int (*cmp) (const void *, const void *));\nconst void *OBJ_bsearch_ex_(const void *key, const void *base, int num,\n                            int size,\n                            int (*cmp) (const void *, const void *),\n                            int flags);\n\n# define _DECLARE_OBJ_BSEARCH_CMP_FN(scope, type1, type2, nm)    \\\n  static int nm##_cmp_BSEARCH_CMP_FN(const void *, const void *); \\\n  static int nm##_cmp(type1 const *, type2 const *); \\\n  scope type2 * OBJ_bsearch_##nm(type1 *key, type2 const *base, int num)\n\n# define DECLARE_OBJ_BSEARCH_CMP_FN(type1, type2, cmp)   \\\n  _DECLARE_OBJ_BSEARCH_CMP_FN(static, type1, type2, cmp)\n# define DECLARE_OBJ_BSEARCH_GLOBAL_CMP_FN(type1, type2, nm)     \\\n  type2 * OBJ_bsearch_##nm(type1 *key, type2 const *base, int num)\n\n/*-\n * Unsolved problem: if a type is actually a pointer type, like\n * nid_triple is, then its impossible to get a const where you need\n * it. Consider:\n *\n * typedef int nid_triple[3];\n * const void *a_;\n * const nid_triple const *a = a_;\n *\n * The assignement discards a const because what you really want is:\n *\n * const int const * const *a = a_;\n *\n * But if you do that, you lose the fact that a is an array of 3 ints,\n * which breaks comparison functions.\n *\n * Thus we end up having to cast, sadly, or unpack the\n * declarations. Or, as I finally did in this case, delcare nid_triple\n * to be a struct, which it should have been in the first place.\n *\n * Ben, August 2008.\n *\n * Also, strictly speaking not all types need be const, but handling\n * the non-constness means a lot of complication, and in practice\n * comparison routines do always not touch their arguments.\n */\n\n# define IMPLEMENT_OBJ_BSEARCH_CMP_FN(type1, type2, nm)  \\\n  static int nm##_cmp_BSEARCH_CMP_FN(const void *a_, const void *b_)    \\\n      { \\\n      type1 const *a = a_; \\\n      type2 const *b = b_; \\\n      return nm##_cmp(a,b); \\\n      } \\\n  static type2 *OBJ_bsearch_##nm(type1 *key, type2 const *base, int num) \\\n      { \\\n      return (type2 *)OBJ_bsearch_(key, base, num, sizeof(type2), \\\n                                        nm##_cmp_BSEARCH_CMP_FN); \\\n      } \\\n      extern void dummy_prototype(void)\n\n# define IMPLEMENT_OBJ_BSEARCH_GLOBAL_CMP_FN(type1, type2, nm)   \\\n  static int nm##_cmp_BSEARCH_CMP_FN(const void *a_, const void *b_)    \\\n      { \\\n      type1 const *a = a_; \\\n      type2 const *b = b_; \\\n      return nm##_cmp(a,b); \\\n      } \\\n  type2 *OBJ_bsearch_##nm(type1 *key, type2 const *base, int num) \\\n      { \\\n      return (type2 *)OBJ_bsearch_(key, base, num, sizeof(type2), \\\n                                        nm##_cmp_BSEARCH_CMP_FN); \\\n      } \\\n      extern void dummy_prototype(void)\n\n# define OBJ_bsearch(type1,key,type2,base,num,cmp)                              \\\n  ((type2 *)OBJ_bsearch_(CHECKED_PTR_OF(type1,key),CHECKED_PTR_OF(type2,base), \\\n                         num,sizeof(type2),                             \\\n                         ((void)CHECKED_PTR_OF(type1,cmp##_type_1),     \\\n                          (void)CHECKED_PTR_OF(type2,cmp##_type_2),     \\\n                          cmp##_BSEARCH_CMP_FN)))\n\n# define OBJ_bsearch_ex(type1,key,type2,base,num,cmp,flags)                      \\\n  ((type2 *)OBJ_bsearch_ex_(CHECKED_PTR_OF(type1,key),CHECKED_PTR_OF(type2,base), \\\n                         num,sizeof(type2),                             \\\n                         ((void)CHECKED_PTR_OF(type1,cmp##_type_1),     \\\n                          (void)type_2=CHECKED_PTR_OF(type2,cmp##_type_2), \\\n                          cmp##_BSEARCH_CMP_FN)),flags)\n\nint OBJ_new_nid(int num);\nint OBJ_add_object(const ASN1_OBJECT *obj);\nint OBJ_create(const char *oid, const char *sn, const char *ln);\nvoid OBJ_cleanup(void);\nint OBJ_create_objects(BIO *in);\n\nint OBJ_find_sigid_algs(int signid, int *pdig_nid, int *ppkey_nid);\nint OBJ_find_sigid_by_algs(int *psignid, int dig_nid, int pkey_nid);\nint OBJ_add_sigid(int signid, int dig_id, int pkey_id);\nvoid OBJ_sigid_free(void);\n\nextern int obj_cleanup_defer;\nvoid check_defer(int nid);\n\n/* BEGIN ERROR CODES */\n/*\n * The following lines are auto generated by the script mkerr.pl. Any changes\n * made after this point may be overwritten when the script is next run.\n */\nvoid ERR_load_OBJ_strings(void);\n\n/* Error codes for the OBJ functions. */\n\n/* Function codes. */\n# define OBJ_F_OBJ_ADD_OBJECT                             105\n# define OBJ_F_OBJ_CREATE                                 100\n# define OBJ_F_OBJ_DUP                                    101\n# define OBJ_F_OBJ_NAME_NEW_INDEX                         106\n# define OBJ_F_OBJ_NID2LN                                 102\n# define OBJ_F_OBJ_NID2OBJ                                103\n# define OBJ_F_OBJ_NID2SN                                 104\n\n/* Reason codes. */\n# define OBJ_R_MALLOC_FAILURE                             100\n# define OBJ_R_UNKNOWN_NID                                101\n\n#ifdef  __cplusplus\n}\n#endif\n#endif\n"
  },
  {
    "path": "Pods/OpenSSL-Universal/include-ios/openssl/ocsp.h",
    "content": "/* ocsp.h */\n/*\n * Written by Tom Titchener <Tom_Titchener@groove.net> for the OpenSSL\n * project.\n */\n\n/*\n * History: This file was transfered to Richard Levitte from CertCo by Kathy\n * Weinhold in mid-spring 2000 to be included in OpenSSL or released as a\n * patch kit.\n */\n\n/* ====================================================================\n * Copyright (c) 1998-2000 The OpenSSL Project.  All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n *\n * 1. Redistributions of source code must retain the above copyright\n *    notice, this list of conditions and the following disclaimer.\n *\n * 2. Redistributions in binary form must reproduce the above copyright\n *    notice, this list of conditions and the following disclaimer in\n *    the documentation and/or other materials provided with the\n *    distribution.\n *\n * 3. All advertising materials mentioning features or use of this\n *    software must display the following acknowledgment:\n *    \"This product includes software developed by the OpenSSL Project\n *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)\"\n *\n * 4. The names \"OpenSSL Toolkit\" and \"OpenSSL Project\" must not be used to\n *    endorse or promote products derived from this software without\n *    prior written permission. For written permission, please contact\n *    openssl-core@openssl.org.\n *\n * 5. Products derived from this software may not be called \"OpenSSL\"\n *    nor may \"OpenSSL\" appear in their names without prior written\n *    permission of the OpenSSL Project.\n *\n * 6. Redistributions of any form whatsoever must retain the following\n *    acknowledgment:\n *    \"This product includes software developed by the OpenSSL Project\n *    for use in the OpenSSL Toolkit (http://www.openssl.org/)\"\n *\n * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY\n * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\n * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR\n * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,\n * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED\n * OF THE POSSIBILITY OF SUCH DAMAGE.\n * ====================================================================\n *\n * This product includes cryptographic software written by Eric Young\n * (eay@cryptsoft.com).  This product includes software written by Tim\n * Hudson (tjh@cryptsoft.com).\n *\n */\n\n#ifndef HEADER_OCSP_H\n# define HEADER_OCSP_H\n\n# include <openssl/ossl_typ.h>\n# include <openssl/x509.h>\n# include <openssl/x509v3.h>\n# include <openssl/safestack.h>\n\n#ifdef  __cplusplus\nextern \"C\" {\n#endif\n\n/* Various flags and values */\n\n# define OCSP_DEFAULT_NONCE_LENGTH       16\n\n# define OCSP_NOCERTS                    0x1\n# define OCSP_NOINTERN                   0x2\n# define OCSP_NOSIGS                     0x4\n# define OCSP_NOCHAIN                    0x8\n# define OCSP_NOVERIFY                   0x10\n# define OCSP_NOEXPLICIT                 0x20\n# define OCSP_NOCASIGN                   0x40\n# define OCSP_NODELEGATED                0x80\n# define OCSP_NOCHECKS                   0x100\n# define OCSP_TRUSTOTHER                 0x200\n# define OCSP_RESPID_KEY                 0x400\n# define OCSP_NOTIME                     0x800\n\n/*-  CertID ::= SEQUENCE {\n *       hashAlgorithm            AlgorithmIdentifier,\n *       issuerNameHash     OCTET STRING, -- Hash of Issuer's DN\n *       issuerKeyHash      OCTET STRING, -- Hash of Issuers public key (excluding the tag & length fields)\n *       serialNumber       CertificateSerialNumber }\n */\ntypedef struct ocsp_cert_id_st {\n    X509_ALGOR *hashAlgorithm;\n    ASN1_OCTET_STRING *issuerNameHash;\n    ASN1_OCTET_STRING *issuerKeyHash;\n    ASN1_INTEGER *serialNumber;\n} OCSP_CERTID;\n\nDECLARE_STACK_OF(OCSP_CERTID)\n\n/*-  Request ::=     SEQUENCE {\n *       reqCert                    CertID,\n *       singleRequestExtensions    [0] EXPLICIT Extensions OPTIONAL }\n */\ntypedef struct ocsp_one_request_st {\n    OCSP_CERTID *reqCert;\n    STACK_OF(X509_EXTENSION) *singleRequestExtensions;\n} OCSP_ONEREQ;\n\nDECLARE_STACK_OF(OCSP_ONEREQ)\nDECLARE_ASN1_SET_OF(OCSP_ONEREQ)\n\n/*-  TBSRequest      ::=     SEQUENCE {\n *       version             [0] EXPLICIT Version DEFAULT v1,\n *       requestorName       [1] EXPLICIT GeneralName OPTIONAL,\n *       requestList             SEQUENCE OF Request,\n *       requestExtensions   [2] EXPLICIT Extensions OPTIONAL }\n */\ntypedef struct ocsp_req_info_st {\n    ASN1_INTEGER *version;\n    GENERAL_NAME *requestorName;\n    STACK_OF(OCSP_ONEREQ) *requestList;\n    STACK_OF(X509_EXTENSION) *requestExtensions;\n} OCSP_REQINFO;\n\n/*-  Signature       ::=     SEQUENCE {\n *       signatureAlgorithm   AlgorithmIdentifier,\n *       signature            BIT STRING,\n *       certs                [0] EXPLICIT SEQUENCE OF Certificate OPTIONAL }\n */\ntypedef struct ocsp_signature_st {\n    X509_ALGOR *signatureAlgorithm;\n    ASN1_BIT_STRING *signature;\n    STACK_OF(X509) *certs;\n} OCSP_SIGNATURE;\n\n/*-  OCSPRequest     ::=     SEQUENCE {\n *       tbsRequest                  TBSRequest,\n *       optionalSignature   [0]     EXPLICIT Signature OPTIONAL }\n */\ntypedef struct ocsp_request_st {\n    OCSP_REQINFO *tbsRequest;\n    OCSP_SIGNATURE *optionalSignature; /* OPTIONAL */\n} OCSP_REQUEST;\n\n/*-  OCSPResponseStatus ::= ENUMERATED {\n *       successful            (0),      --Response has valid confirmations\n *       malformedRequest      (1),      --Illegal confirmation request\n *       internalError         (2),      --Internal error in issuer\n *       tryLater              (3),      --Try again later\n *                                       --(4) is not used\n *       sigRequired           (5),      --Must sign the request\n *       unauthorized          (6)       --Request unauthorized\n *   }\n */\n# define OCSP_RESPONSE_STATUS_SUCCESSFUL          0\n# define OCSP_RESPONSE_STATUS_MALFORMEDREQUEST     1\n# define OCSP_RESPONSE_STATUS_INTERNALERROR        2\n# define OCSP_RESPONSE_STATUS_TRYLATER             3\n# define OCSP_RESPONSE_STATUS_SIGREQUIRED          5\n# define OCSP_RESPONSE_STATUS_UNAUTHORIZED         6\n\n/*-  ResponseBytes ::=       SEQUENCE {\n *       responseType   OBJECT IDENTIFIER,\n *       response       OCTET STRING }\n */\ntypedef struct ocsp_resp_bytes_st {\n    ASN1_OBJECT *responseType;\n    ASN1_OCTET_STRING *response;\n} OCSP_RESPBYTES;\n\n/*-  OCSPResponse ::= SEQUENCE {\n *      responseStatus         OCSPResponseStatus,\n *      responseBytes          [0] EXPLICIT ResponseBytes OPTIONAL }\n */\nstruct ocsp_response_st {\n    ASN1_ENUMERATED *responseStatus;\n    OCSP_RESPBYTES *responseBytes;\n};\n\n/*-  ResponderID ::= CHOICE {\n *      byName   [1] Name,\n *      byKey    [2] KeyHash }\n */\n# define V_OCSP_RESPID_NAME 0\n# define V_OCSP_RESPID_KEY  1\nstruct ocsp_responder_id_st {\n    int type;\n    union {\n        X509_NAME *byName;\n        ASN1_OCTET_STRING *byKey;\n    } value;\n};\n\nDECLARE_STACK_OF(OCSP_RESPID)\nDECLARE_ASN1_FUNCTIONS(OCSP_RESPID)\n\n/*-  KeyHash ::= OCTET STRING --SHA-1 hash of responder's public key\n *                            --(excluding the tag and length fields)\n */\n\n/*-  RevokedInfo ::= SEQUENCE {\n *       revocationTime              GeneralizedTime,\n *       revocationReason    [0]     EXPLICIT CRLReason OPTIONAL }\n */\ntypedef struct ocsp_revoked_info_st {\n    ASN1_GENERALIZEDTIME *revocationTime;\n    ASN1_ENUMERATED *revocationReason;\n} OCSP_REVOKEDINFO;\n\n/*-  CertStatus ::= CHOICE {\n *       good                [0]     IMPLICIT NULL,\n *       revoked             [1]     IMPLICIT RevokedInfo,\n *       unknown             [2]     IMPLICIT UnknownInfo }\n */\n# define V_OCSP_CERTSTATUS_GOOD    0\n# define V_OCSP_CERTSTATUS_REVOKED 1\n# define V_OCSP_CERTSTATUS_UNKNOWN 2\ntypedef struct ocsp_cert_status_st {\n    int type;\n    union {\n        ASN1_NULL *good;\n        OCSP_REVOKEDINFO *revoked;\n        ASN1_NULL *unknown;\n    } value;\n} OCSP_CERTSTATUS;\n\n/*-  SingleResponse ::= SEQUENCE {\n *      certID                       CertID,\n *      certStatus                   CertStatus,\n *      thisUpdate                   GeneralizedTime,\n *      nextUpdate           [0]     EXPLICIT GeneralizedTime OPTIONAL,\n *      singleExtensions     [1]     EXPLICIT Extensions OPTIONAL }\n */\ntypedef struct ocsp_single_response_st {\n    OCSP_CERTID *certId;\n    OCSP_CERTSTATUS *certStatus;\n    ASN1_GENERALIZEDTIME *thisUpdate;\n    ASN1_GENERALIZEDTIME *nextUpdate;\n    STACK_OF(X509_EXTENSION) *singleExtensions;\n} OCSP_SINGLERESP;\n\nDECLARE_STACK_OF(OCSP_SINGLERESP)\nDECLARE_ASN1_SET_OF(OCSP_SINGLERESP)\n\n/*-  ResponseData ::= SEQUENCE {\n *      version              [0] EXPLICIT Version DEFAULT v1,\n *      responderID              ResponderID,\n *      producedAt               GeneralizedTime,\n *      responses                SEQUENCE OF SingleResponse,\n *      responseExtensions   [1] EXPLICIT Extensions OPTIONAL }\n */\ntypedef struct ocsp_response_data_st {\n    ASN1_INTEGER *version;\n    OCSP_RESPID *responderId;\n    ASN1_GENERALIZEDTIME *producedAt;\n    STACK_OF(OCSP_SINGLERESP) *responses;\n    STACK_OF(X509_EXTENSION) *responseExtensions;\n} OCSP_RESPDATA;\n\n/*-  BasicOCSPResponse       ::= SEQUENCE {\n *      tbsResponseData      ResponseData,\n *      signatureAlgorithm   AlgorithmIdentifier,\n *      signature            BIT STRING,\n *      certs                [0] EXPLICIT SEQUENCE OF Certificate OPTIONAL }\n */\n  /*\n   * Note 1: The value for \"signature\" is specified in the OCSP rfc2560 as\n   * follows: \"The value for the signature SHALL be computed on the hash of\n   * the DER encoding ResponseData.\" This means that you must hash the\n   * DER-encoded tbsResponseData, and then run it through a crypto-signing\n   * function, which will (at least w/RSA) do a hash-'n'-private-encrypt\n   * operation.  This seems a bit odd, but that's the spec.  Also note that\n   * the data structures do not leave anywhere to independently specify the\n   * algorithm used for the initial hash. So, we look at the\n   * signature-specification algorithm, and try to do something intelligent.\n   * -- Kathy Weinhold, CertCo\n   */\n  /*\n   * Note 2: It seems that the mentioned passage from RFC 2560 (section\n   * 4.2.1) is open for interpretation.  I've done tests against another\n   * responder, and found that it doesn't do the double hashing that the RFC\n   * seems to say one should.  Therefore, all relevant functions take a flag\n   * saying which variant should be used.  -- Richard Levitte, OpenSSL team\n   * and CeloCom\n   */\ntypedef struct ocsp_basic_response_st {\n    OCSP_RESPDATA *tbsResponseData;\n    X509_ALGOR *signatureAlgorithm;\n    ASN1_BIT_STRING *signature;\n    STACK_OF(X509) *certs;\n} OCSP_BASICRESP;\n\n/*-\n *   CRLReason ::= ENUMERATED {\n *        unspecified             (0),\n *        keyCompromise           (1),\n *        cACompromise            (2),\n *        affiliationChanged      (3),\n *        superseded              (4),\n *        cessationOfOperation    (5),\n *        certificateHold         (6),\n *        removeFromCRL           (8) }\n */\n# define OCSP_REVOKED_STATUS_NOSTATUS               -1\n# define OCSP_REVOKED_STATUS_UNSPECIFIED             0\n# define OCSP_REVOKED_STATUS_KEYCOMPROMISE           1\n# define OCSP_REVOKED_STATUS_CACOMPROMISE            2\n# define OCSP_REVOKED_STATUS_AFFILIATIONCHANGED      3\n# define OCSP_REVOKED_STATUS_SUPERSEDED              4\n# define OCSP_REVOKED_STATUS_CESSATIONOFOPERATION    5\n# define OCSP_REVOKED_STATUS_CERTIFICATEHOLD         6\n# define OCSP_REVOKED_STATUS_REMOVEFROMCRL           8\n\n/*-\n * CrlID ::= SEQUENCE {\n *     crlUrl               [0]     EXPLICIT IA5String OPTIONAL,\n *     crlNum               [1]     EXPLICIT INTEGER OPTIONAL,\n *     crlTime              [2]     EXPLICIT GeneralizedTime OPTIONAL }\n */\ntypedef struct ocsp_crl_id_st {\n    ASN1_IA5STRING *crlUrl;\n    ASN1_INTEGER *crlNum;\n    ASN1_GENERALIZEDTIME *crlTime;\n} OCSP_CRLID;\n\n/*-\n * ServiceLocator ::= SEQUENCE {\n *      issuer    Name,\n *      locator   AuthorityInfoAccessSyntax OPTIONAL }\n */\ntypedef struct ocsp_service_locator_st {\n    X509_NAME *issuer;\n    STACK_OF(ACCESS_DESCRIPTION) *locator;\n} OCSP_SERVICELOC;\n\n# define PEM_STRING_OCSP_REQUEST \"OCSP REQUEST\"\n# define PEM_STRING_OCSP_RESPONSE \"OCSP RESPONSE\"\n\n# define d2i_OCSP_REQUEST_bio(bp,p) ASN1_d2i_bio_of(OCSP_REQUEST,OCSP_REQUEST_new,d2i_OCSP_REQUEST,bp,p)\n\n# define d2i_OCSP_RESPONSE_bio(bp,p) ASN1_d2i_bio_of(OCSP_RESPONSE,OCSP_RESPONSE_new,d2i_OCSP_RESPONSE,bp,p)\n\n# define PEM_read_bio_OCSP_REQUEST(bp,x,cb) (OCSP_REQUEST *)PEM_ASN1_read_bio( \\\n     (char *(*)())d2i_OCSP_REQUEST,PEM_STRING_OCSP_REQUEST,bp,(char **)x,cb,NULL)\n\n# define PEM_read_bio_OCSP_RESPONSE(bp,x,cb)(OCSP_RESPONSE *)PEM_ASN1_read_bio(\\\n     (char *(*)())d2i_OCSP_RESPONSE,PEM_STRING_OCSP_RESPONSE,bp,(char **)x,cb,NULL)\n\n# define PEM_write_bio_OCSP_REQUEST(bp,o) \\\n    PEM_ASN1_write_bio((int (*)())i2d_OCSP_REQUEST,PEM_STRING_OCSP_REQUEST,\\\n                        bp,(char *)o, NULL,NULL,0,NULL,NULL)\n\n# define PEM_write_bio_OCSP_RESPONSE(bp,o) \\\n    PEM_ASN1_write_bio((int (*)())i2d_OCSP_RESPONSE,PEM_STRING_OCSP_RESPONSE,\\\n                        bp,(char *)o, NULL,NULL,0,NULL,NULL)\n\n# define i2d_OCSP_RESPONSE_bio(bp,o) ASN1_i2d_bio_of(OCSP_RESPONSE,i2d_OCSP_RESPONSE,bp,o)\n\n# define i2d_OCSP_REQUEST_bio(bp,o) ASN1_i2d_bio_of(OCSP_REQUEST,i2d_OCSP_REQUEST,bp,o)\n\n# define OCSP_REQUEST_sign(o,pkey,md) \\\n        ASN1_item_sign(ASN1_ITEM_rptr(OCSP_REQINFO),\\\n                o->optionalSignature->signatureAlgorithm,NULL,\\\n                o->optionalSignature->signature,o->tbsRequest,pkey,md)\n\n# define OCSP_BASICRESP_sign(o,pkey,md,d) \\\n        ASN1_item_sign(ASN1_ITEM_rptr(OCSP_RESPDATA),o->signatureAlgorithm,NULL,\\\n                o->signature,o->tbsResponseData,pkey,md)\n\n# define OCSP_REQUEST_verify(a,r) ASN1_item_verify(ASN1_ITEM_rptr(OCSP_REQINFO),\\\n        a->optionalSignature->signatureAlgorithm,\\\n        a->optionalSignature->signature,a->tbsRequest,r)\n\n# define OCSP_BASICRESP_verify(a,r,d) ASN1_item_verify(ASN1_ITEM_rptr(OCSP_RESPDATA),\\\n        a->signatureAlgorithm,a->signature,a->tbsResponseData,r)\n\n# define ASN1_BIT_STRING_digest(data,type,md,len) \\\n        ASN1_item_digest(ASN1_ITEM_rptr(ASN1_BIT_STRING),type,data,md,len)\n\n# define OCSP_CERTSTATUS_dup(cs)\\\n                (OCSP_CERTSTATUS*)ASN1_dup((int(*)())i2d_OCSP_CERTSTATUS,\\\n                (char *(*)())d2i_OCSP_CERTSTATUS,(char *)(cs))\n\nOCSP_CERTID *OCSP_CERTID_dup(OCSP_CERTID *id);\n\nOCSP_RESPONSE *OCSP_sendreq_bio(BIO *b, char *path, OCSP_REQUEST *req);\nOCSP_REQ_CTX *OCSP_sendreq_new(BIO *io, char *path, OCSP_REQUEST *req,\n                               int maxline);\nint OCSP_sendreq_nbio(OCSP_RESPONSE **presp, OCSP_REQ_CTX *rctx);\nvoid OCSP_REQ_CTX_free(OCSP_REQ_CTX *rctx);\nint OCSP_REQ_CTX_set1_req(OCSP_REQ_CTX *rctx, OCSP_REQUEST *req);\nint OCSP_REQ_CTX_add1_header(OCSP_REQ_CTX *rctx,\n                             const char *name, const char *value);\n\nOCSP_CERTID *OCSP_cert_to_id(const EVP_MD *dgst, X509 *subject, X509 *issuer);\n\nOCSP_CERTID *OCSP_cert_id_new(const EVP_MD *dgst,\n                              X509_NAME *issuerName,\n                              ASN1_BIT_STRING *issuerKey,\n                              ASN1_INTEGER *serialNumber);\n\nOCSP_ONEREQ *OCSP_request_add0_id(OCSP_REQUEST *req, OCSP_CERTID *cid);\n\nint OCSP_request_add1_nonce(OCSP_REQUEST *req, unsigned char *val, int len);\nint OCSP_basic_add1_nonce(OCSP_BASICRESP *resp, unsigned char *val, int len);\nint OCSP_check_nonce(OCSP_REQUEST *req, OCSP_BASICRESP *bs);\nint OCSP_copy_nonce(OCSP_BASICRESP *resp, OCSP_REQUEST *req);\n\nint OCSP_request_set1_name(OCSP_REQUEST *req, X509_NAME *nm);\nint OCSP_request_add1_cert(OCSP_REQUEST *req, X509 *cert);\n\nint OCSP_request_sign(OCSP_REQUEST *req,\n                      X509 *signer,\n                      EVP_PKEY *key,\n                      const EVP_MD *dgst,\n                      STACK_OF(X509) *certs, unsigned long flags);\n\nint OCSP_response_status(OCSP_RESPONSE *resp);\nOCSP_BASICRESP *OCSP_response_get1_basic(OCSP_RESPONSE *resp);\n\nint OCSP_resp_count(OCSP_BASICRESP *bs);\nOCSP_SINGLERESP *OCSP_resp_get0(OCSP_BASICRESP *bs, int idx);\nint OCSP_resp_find(OCSP_BASICRESP *bs, OCSP_CERTID *id, int last);\nint OCSP_single_get0_status(OCSP_SINGLERESP *single, int *reason,\n                            ASN1_GENERALIZEDTIME **revtime,\n                            ASN1_GENERALIZEDTIME **thisupd,\n                            ASN1_GENERALIZEDTIME **nextupd);\nint OCSP_resp_find_status(OCSP_BASICRESP *bs, OCSP_CERTID *id, int *status,\n                          int *reason,\n                          ASN1_GENERALIZEDTIME **revtime,\n                          ASN1_GENERALIZEDTIME **thisupd,\n                          ASN1_GENERALIZEDTIME **nextupd);\nint OCSP_check_validity(ASN1_GENERALIZEDTIME *thisupd,\n                        ASN1_GENERALIZEDTIME *nextupd, long sec, long maxsec);\n\nint OCSP_request_verify(OCSP_REQUEST *req, STACK_OF(X509) *certs,\n                        X509_STORE *store, unsigned long flags);\n\nint OCSP_parse_url(char *url, char **phost, char **pport, char **ppath,\n                   int *pssl);\n\nint OCSP_id_issuer_cmp(OCSP_CERTID *a, OCSP_CERTID *b);\nint OCSP_id_cmp(OCSP_CERTID *a, OCSP_CERTID *b);\n\nint OCSP_request_onereq_count(OCSP_REQUEST *req);\nOCSP_ONEREQ *OCSP_request_onereq_get0(OCSP_REQUEST *req, int i);\nOCSP_CERTID *OCSP_onereq_get0_id(OCSP_ONEREQ *one);\nint OCSP_id_get0_info(ASN1_OCTET_STRING **piNameHash, ASN1_OBJECT **pmd,\n                      ASN1_OCTET_STRING **pikeyHash,\n                      ASN1_INTEGER **pserial, OCSP_CERTID *cid);\nint OCSP_request_is_signed(OCSP_REQUEST *req);\nOCSP_RESPONSE *OCSP_response_create(int status, OCSP_BASICRESP *bs);\nOCSP_SINGLERESP *OCSP_basic_add1_status(OCSP_BASICRESP *rsp,\n                                        OCSP_CERTID *cid,\n                                        int status, int reason,\n                                        ASN1_TIME *revtime,\n                                        ASN1_TIME *thisupd,\n                                        ASN1_TIME *nextupd);\nint OCSP_basic_add1_cert(OCSP_BASICRESP *resp, X509 *cert);\nint OCSP_basic_sign(OCSP_BASICRESP *brsp,\n                    X509 *signer, EVP_PKEY *key, const EVP_MD *dgst,\n                    STACK_OF(X509) *certs, unsigned long flags);\n\nX509_EXTENSION *OCSP_crlID_new(char *url, long *n, char *tim);\n\nX509_EXTENSION *OCSP_accept_responses_new(char **oids);\n\nX509_EXTENSION *OCSP_archive_cutoff_new(char *tim);\n\nX509_EXTENSION *OCSP_url_svcloc_new(X509_NAME *issuer, char **urls);\n\nint OCSP_REQUEST_get_ext_count(OCSP_REQUEST *x);\nint OCSP_REQUEST_get_ext_by_NID(OCSP_REQUEST *x, int nid, int lastpos);\nint OCSP_REQUEST_get_ext_by_OBJ(OCSP_REQUEST *x, ASN1_OBJECT *obj,\n                                int lastpos);\nint OCSP_REQUEST_get_ext_by_critical(OCSP_REQUEST *x, int crit, int lastpos);\nX509_EXTENSION *OCSP_REQUEST_get_ext(OCSP_REQUEST *x, int loc);\nX509_EXTENSION *OCSP_REQUEST_delete_ext(OCSP_REQUEST *x, int loc);\nvoid *OCSP_REQUEST_get1_ext_d2i(OCSP_REQUEST *x, int nid, int *crit,\n                                int *idx);\nint OCSP_REQUEST_add1_ext_i2d(OCSP_REQUEST *x, int nid, void *value, int crit,\n                              unsigned long flags);\nint OCSP_REQUEST_add_ext(OCSP_REQUEST *x, X509_EXTENSION *ex, int loc);\n\nint OCSP_ONEREQ_get_ext_count(OCSP_ONEREQ *x);\nint OCSP_ONEREQ_get_ext_by_NID(OCSP_ONEREQ *x, int nid, int lastpos);\nint OCSP_ONEREQ_get_ext_by_OBJ(OCSP_ONEREQ *x, ASN1_OBJECT *obj, int lastpos);\nint OCSP_ONEREQ_get_ext_by_critical(OCSP_ONEREQ *x, int crit, int lastpos);\nX509_EXTENSION *OCSP_ONEREQ_get_ext(OCSP_ONEREQ *x, int loc);\nX509_EXTENSION *OCSP_ONEREQ_delete_ext(OCSP_ONEREQ *x, int loc);\nvoid *OCSP_ONEREQ_get1_ext_d2i(OCSP_ONEREQ *x, int nid, int *crit, int *idx);\nint OCSP_ONEREQ_add1_ext_i2d(OCSP_ONEREQ *x, int nid, void *value, int crit,\n                             unsigned long flags);\nint OCSP_ONEREQ_add_ext(OCSP_ONEREQ *x, X509_EXTENSION *ex, int loc);\n\nint OCSP_BASICRESP_get_ext_count(OCSP_BASICRESP *x);\nint OCSP_BASICRESP_get_ext_by_NID(OCSP_BASICRESP *x, int nid, int lastpos);\nint OCSP_BASICRESP_get_ext_by_OBJ(OCSP_BASICRESP *x, ASN1_OBJECT *obj,\n                                  int lastpos);\nint OCSP_BASICRESP_get_ext_by_critical(OCSP_BASICRESP *x, int crit,\n                                       int lastpos);\nX509_EXTENSION *OCSP_BASICRESP_get_ext(OCSP_BASICRESP *x, int loc);\nX509_EXTENSION *OCSP_BASICRESP_delete_ext(OCSP_BASICRESP *x, int loc);\nvoid *OCSP_BASICRESP_get1_ext_d2i(OCSP_BASICRESP *x, int nid, int *crit,\n                                  int *idx);\nint OCSP_BASICRESP_add1_ext_i2d(OCSP_BASICRESP *x, int nid, void *value,\n                                int crit, unsigned long flags);\nint OCSP_BASICRESP_add_ext(OCSP_BASICRESP *x, X509_EXTENSION *ex, int loc);\n\nint OCSP_SINGLERESP_get_ext_count(OCSP_SINGLERESP *x);\nint OCSP_SINGLERESP_get_ext_by_NID(OCSP_SINGLERESP *x, int nid, int lastpos);\nint OCSP_SINGLERESP_get_ext_by_OBJ(OCSP_SINGLERESP *x, ASN1_OBJECT *obj,\n                                   int lastpos);\nint OCSP_SINGLERESP_get_ext_by_critical(OCSP_SINGLERESP *x, int crit,\n                                        int lastpos);\nX509_EXTENSION *OCSP_SINGLERESP_get_ext(OCSP_SINGLERESP *x, int loc);\nX509_EXTENSION *OCSP_SINGLERESP_delete_ext(OCSP_SINGLERESP *x, int loc);\nvoid *OCSP_SINGLERESP_get1_ext_d2i(OCSP_SINGLERESP *x, int nid, int *crit,\n                                   int *idx);\nint OCSP_SINGLERESP_add1_ext_i2d(OCSP_SINGLERESP *x, int nid, void *value,\n                                 int crit, unsigned long flags);\nint OCSP_SINGLERESP_add_ext(OCSP_SINGLERESP *x, X509_EXTENSION *ex, int loc);\n\nDECLARE_ASN1_FUNCTIONS(OCSP_SINGLERESP)\nDECLARE_ASN1_FUNCTIONS(OCSP_CERTSTATUS)\nDECLARE_ASN1_FUNCTIONS(OCSP_REVOKEDINFO)\nDECLARE_ASN1_FUNCTIONS(OCSP_BASICRESP)\nDECLARE_ASN1_FUNCTIONS(OCSP_RESPDATA)\nDECLARE_ASN1_FUNCTIONS(OCSP_RESPID)\nDECLARE_ASN1_FUNCTIONS(OCSP_RESPONSE)\nDECLARE_ASN1_FUNCTIONS(OCSP_RESPBYTES)\nDECLARE_ASN1_FUNCTIONS(OCSP_ONEREQ)\nDECLARE_ASN1_FUNCTIONS(OCSP_CERTID)\nDECLARE_ASN1_FUNCTIONS(OCSP_REQUEST)\nDECLARE_ASN1_FUNCTIONS(OCSP_SIGNATURE)\nDECLARE_ASN1_FUNCTIONS(OCSP_REQINFO)\nDECLARE_ASN1_FUNCTIONS(OCSP_CRLID)\nDECLARE_ASN1_FUNCTIONS(OCSP_SERVICELOC)\n\nconst char *OCSP_response_status_str(long s);\nconst char *OCSP_cert_status_str(long s);\nconst char *OCSP_crl_reason_str(long s);\n\nint OCSP_REQUEST_print(BIO *bp, OCSP_REQUEST *a, unsigned long flags);\nint OCSP_RESPONSE_print(BIO *bp, OCSP_RESPONSE *o, unsigned long flags);\n\nint OCSP_basic_verify(OCSP_BASICRESP *bs, STACK_OF(X509) *certs,\n                      X509_STORE *st, unsigned long flags);\n\n/* BEGIN ERROR CODES */\n/*\n * The following lines are auto generated by the script mkerr.pl. Any changes\n * made after this point may be overwritten when the script is next run.\n */\nvoid ERR_load_OCSP_strings(void);\n\n/* Error codes for the OCSP functions. */\n\n/* Function codes. */\n# define OCSP_F_ASN1_STRING_ENCODE                        100\n# define OCSP_F_D2I_OCSP_NONCE                            102\n# define OCSP_F_OCSP_BASIC_ADD1_STATUS                    103\n# define OCSP_F_OCSP_BASIC_SIGN                           104\n# define OCSP_F_OCSP_BASIC_VERIFY                         105\n# define OCSP_F_OCSP_CERT_ID_NEW                          101\n# define OCSP_F_OCSP_CHECK_DELEGATED                      106\n# define OCSP_F_OCSP_CHECK_IDS                            107\n# define OCSP_F_OCSP_CHECK_ISSUER                         108\n# define OCSP_F_OCSP_CHECK_VALIDITY                       115\n# define OCSP_F_OCSP_MATCH_ISSUERID                       109\n# define OCSP_F_OCSP_PARSE_URL                            114\n# define OCSP_F_OCSP_REQUEST_SIGN                         110\n# define OCSP_F_OCSP_REQUEST_VERIFY                       116\n# define OCSP_F_OCSP_RESPONSE_GET1_BASIC                  111\n# define OCSP_F_OCSP_SENDREQ_BIO                          112\n# define OCSP_F_OCSP_SENDREQ_NBIO                         117\n# define OCSP_F_PARSE_HTTP_LINE1                          118\n# define OCSP_F_REQUEST_VERIFY                            113\n\n/* Reason codes. */\n# define OCSP_R_BAD_DATA                                  100\n# define OCSP_R_CERTIFICATE_VERIFY_ERROR                  101\n# define OCSP_R_DIGEST_ERR                                102\n# define OCSP_R_ERROR_IN_NEXTUPDATE_FIELD                 122\n# define OCSP_R_ERROR_IN_THISUPDATE_FIELD                 123\n# define OCSP_R_ERROR_PARSING_URL                         121\n# define OCSP_R_MISSING_OCSPSIGNING_USAGE                 103\n# define OCSP_R_NEXTUPDATE_BEFORE_THISUPDATE              124\n# define OCSP_R_NOT_BASIC_RESPONSE                        104\n# define OCSP_R_NO_CERTIFICATES_IN_CHAIN                  105\n# define OCSP_R_NO_CONTENT                                106\n# define OCSP_R_NO_PUBLIC_KEY                             107\n# define OCSP_R_NO_RESPONSE_DATA                          108\n# define OCSP_R_NO_REVOKED_TIME                           109\n# define OCSP_R_PRIVATE_KEY_DOES_NOT_MATCH_CERTIFICATE    110\n# define OCSP_R_REQUEST_NOT_SIGNED                        128\n# define OCSP_R_RESPONSE_CONTAINS_NO_REVOCATION_DATA      111\n# define OCSP_R_ROOT_CA_NOT_TRUSTED                       112\n# define OCSP_R_SERVER_READ_ERROR                         113\n# define OCSP_R_SERVER_RESPONSE_ERROR                     114\n# define OCSP_R_SERVER_RESPONSE_PARSE_ERROR               115\n# define OCSP_R_SERVER_WRITE_ERROR                        116\n# define OCSP_R_SIGNATURE_FAILURE                         117\n# define OCSP_R_SIGNER_CERTIFICATE_NOT_FOUND              118\n# define OCSP_R_STATUS_EXPIRED                            125\n# define OCSP_R_STATUS_NOT_YET_VALID                      126\n# define OCSP_R_STATUS_TOO_OLD                            127\n# define OCSP_R_UNKNOWN_MESSAGE_DIGEST                    119\n# define OCSP_R_UNKNOWN_NID                               120\n# define OCSP_R_UNSUPPORTED_REQUESTORNAME_TYPE            129\n\n#ifdef  __cplusplus\n}\n#endif\n#endif\n"
  },
  {
    "path": "Pods/OpenSSL-Universal/include-ios/openssl/opensslconf.h",
    "content": "/* opensslconf.h */\n/* WARNING: Generated automatically from opensslconf.h.in by Configure. */\n\n#ifdef  __cplusplus\nextern \"C\" {\n#endif\n/* OpenSSL was configured with the following options: */\n#ifndef OPENSSL_SYSNAME_iOS\n# define OPENSSL_SYSNAME_iOS\n#endif\n#ifndef OPENSSL_DOING_MAKEDEPEND\n\n\n#ifndef OPENSSL_NO_EC_NISTP_64_GCC_128\n# define OPENSSL_NO_EC_NISTP_64_GCC_128\n#endif\n#ifndef OPENSSL_NO_GMP\n# define OPENSSL_NO_GMP\n#endif\n#ifndef OPENSSL_NO_JPAKE\n# define OPENSSL_NO_JPAKE\n#endif\n#ifndef OPENSSL_NO_KRB5\n# define OPENSSL_NO_KRB5\n#endif\n#ifndef OPENSSL_NO_MD2\n# define OPENSSL_NO_MD2\n#endif\n#ifndef OPENSSL_NO_RC5\n# define OPENSSL_NO_RC5\n#endif\n#ifndef OPENSSL_NO_RFC3779\n# define OPENSSL_NO_RFC3779\n#endif\n#ifndef OPENSSL_NO_SCTP\n# define OPENSSL_NO_SCTP\n#endif\n#ifndef OPENSSL_NO_STORE\n# define OPENSSL_NO_STORE\n#endif\n#ifndef OPENSSL_NO_UNIT_TEST\n# define OPENSSL_NO_UNIT_TEST\n#endif\n\n#endif /* OPENSSL_DOING_MAKEDEPEND */\n\n#ifndef OPENSSL_THREADS\n# define OPENSSL_THREADS\n#endif\n#ifndef OPENSSL_NO_ASM\n# define OPENSSL_NO_ASM\n#endif\n#ifndef OPENSSL_NO_DYNAMIC_ENGINE\n# define OPENSSL_NO_DYNAMIC_ENGINE\n#endif\n\n/* The OPENSSL_NO_* macros are also defined as NO_* if the application\n   asks for it.  This is a transient feature that is provided for those\n   who haven't had the time to do the appropriate changes in their\n   applications.  */\n#ifdef OPENSSL_ALGORITHM_DEFINES\n# if defined(OPENSSL_NO_EC_NISTP_64_GCC_128) && !defined(NO_EC_NISTP_64_GCC_128)\n#  define NO_EC_NISTP_64_GCC_128\n# endif\n# if defined(OPENSSL_NO_GMP) && !defined(NO_GMP)\n#  define NO_GMP\n# endif\n# if defined(OPENSSL_NO_JPAKE) && !defined(NO_JPAKE)\n#  define NO_JPAKE\n# endif\n# if defined(OPENSSL_NO_KRB5) && !defined(NO_KRB5)\n#  define NO_KRB5\n# endif\n# if defined(OPENSSL_NO_MD2) && !defined(NO_MD2)\n#  define NO_MD2\n# endif\n# if defined(OPENSSL_NO_RC5) && !defined(NO_RC5)\n#  define NO_RC5\n# endif\n# if defined(OPENSSL_NO_RFC3779) && !defined(NO_RFC3779)\n#  define NO_RFC3779\n# endif\n# if defined(OPENSSL_NO_SCTP) && !defined(NO_SCTP)\n#  define NO_SCTP\n# endif\n# if defined(OPENSSL_NO_STORE) && !defined(NO_STORE)\n#  define NO_STORE\n# endif\n# if defined(OPENSSL_NO_UNIT_TEST) && !defined(NO_UNIT_TEST)\n#  define NO_UNIT_TEST\n# endif\n#endif\n\n/* crypto/opensslconf.h.in */\n\n/* Generate 80386 code? */\n#undef I386_ONLY\n\n#if !(defined(VMS) || defined(__VMS)) /* VMS uses logical names instead */\n#if defined(HEADER_CRYPTLIB_H) && !defined(OPENSSLDIR)\n#define ENGINESDIR \"/tmp/openssl-1.0.1q-arm64/lib/engines\"\n#define OPENSSLDIR \"/tmp/openssl-1.0.1q-arm64\"\n#endif\n#endif\n\n#undef OPENSSL_UNISTD\n#define OPENSSL_UNISTD <unistd.h>\n\n#undef OPENSSL_EXPORT_VAR_AS_FUNCTION\n\n#if defined(HEADER_IDEA_H) && !defined(IDEA_INT)\n#define IDEA_INT unsigned int\n#endif\n\n#if defined(HEADER_MD2_H) && !defined(MD2_INT)\n#define MD2_INT unsigned int\n#endif\n\n#if defined(HEADER_RC2_H) && !defined(RC2_INT)\n/* I need to put in a mod for the alpha - eay */\n#define RC2_INT unsigned int\n#endif\n\n#if defined(HEADER_RC4_H)\n#if !defined(RC4_INT)\n/* using int types make the structure larger but make the code faster\n * on most boxes I have tested - up to %20 faster. */\n/*\n * I don't know what does \"most\" mean, but declaring \"int\" is a must on:\n * - Intel P6 because partial register stalls are very expensive;\n * - elder Alpha because it lacks byte load/store instructions;\n */\n#define RC4_INT unsigned char\n#endif\n#if !defined(RC4_CHUNK)\n/*\n * This enables code handling data aligned at natural CPU word\n * boundary. See crypto/rc4/rc4_enc.c for further details.\n */\n#define RC4_CHUNK unsigned long\n#endif\n#endif\n\n#if (defined(HEADER_NEW_DES_H) || defined(HEADER_DES_H)) && !defined(DES_LONG)\n/* If this is set to 'unsigned int' on a DEC Alpha, this gives about a\n * %20 speed up (longs are 8 bytes, int's are 4). */\n#ifndef DES_LONG\n#define DES_LONG unsigned long\n#endif\n#endif\n\n#if defined(HEADER_BN_H) && !defined(CONFIG_HEADER_BN_H)\n#define CONFIG_HEADER_BN_H\n#define BN_LLONG\n\n/* Should we define BN_DIV2W here? */\n\n/* Only one for the following should be defined */\n#undef SIXTY_FOUR_BIT_LONG\n#undef SIXTY_FOUR_BIT\n#define THIRTY_TWO_BIT\n#endif\n\n#if defined(HEADER_RC4_LOCL_H) && !defined(CONFIG_HEADER_RC4_LOCL_H)\n#define CONFIG_HEADER_RC4_LOCL_H\n/* if this is defined data[i] is used instead of *data, this is a %20\n * speedup on x86 */\n#undef RC4_INDEX\n#endif\n\n#if defined(HEADER_BF_LOCL_H) && !defined(CONFIG_HEADER_BF_LOCL_H)\n#define CONFIG_HEADER_BF_LOCL_H\n#define BF_PTR\n#endif /* HEADER_BF_LOCL_H */\n\n#if defined(HEADER_DES_LOCL_H) && !defined(CONFIG_HEADER_DES_LOCL_H)\n#define CONFIG_HEADER_DES_LOCL_H\n#ifndef DES_DEFAULT_OPTIONS\n/* the following is tweaked from a config script, that is why it is a\n * protected undef/define */\n#ifndef DES_PTR\n#undef DES_PTR\n#endif\n\n/* This helps C compiler generate the correct code for multiple functional\n * units.  It reduces register dependancies at the expense of 2 more\n * registers */\n#ifndef DES_RISC1\n#undef DES_RISC1\n#endif\n\n#ifndef DES_RISC2\n#undef DES_RISC2\n#endif\n\n#if defined(DES_RISC1) && defined(DES_RISC2)\n#error YOU SHOULD NOT HAVE BOTH DES_RISC1 AND DES_RISC2 DEFINED!!!!!\n#endif\n\n/* Unroll the inner loop, this sometimes helps, sometimes hinders.\n * Very mucy CPU dependant */\n#ifndef DES_UNROLL\n#define DES_UNROLL\n#endif\n\n/* These default values were supplied by\n * Peter Gutman <pgut001@cs.auckland.ac.nz>\n * They are only used if nothing else has been defined */\n#if !defined(DES_PTR) && !defined(DES_RISC1) && !defined(DES_RISC2) && !defined(DES_UNROLL)\n/* Special defines which change the way the code is built depending on the\n   CPU and OS.  For SGI machines you can use _MIPS_SZLONG (32 or 64) to find\n   even newer MIPS CPU's, but at the moment one size fits all for\n   optimization options.  Older Sparc's work better with only UNROLL, but\n   there's no way to tell at compile time what it is you're running on */\n \n#if defined( __sun ) || defined ( sun )\t\t/* Newer Sparc's */\n#  define DES_PTR\n#  define DES_RISC1\n#  define DES_UNROLL\n#elif defined( __ultrix )\t/* Older MIPS */\n#  define DES_PTR\n#  define DES_RISC2\n#  define DES_UNROLL\n#elif defined( __osf1__ )\t/* Alpha */\n#  define DES_PTR\n#  define DES_RISC2\n#elif defined ( _AIX )\t\t/* RS6000 */\n  /* Unknown */\n#elif defined( __hpux )\t\t/* HP-PA */\n  /* Unknown */\n#elif defined( __aux )\t\t/* 68K */\n  /* Unknown */\n#elif defined( __dgux )\t\t/* 88K (but P6 in latest boxes) */\n#  define DES_UNROLL\n#elif defined( __sgi )\t\t/* Newer MIPS */\n#  define DES_PTR\n#  define DES_RISC2\n#  define DES_UNROLL\n#elif defined(i386) || defined(__i386__)\t/* x86 boxes, should be gcc */\n#  define DES_PTR\n#  define DES_RISC1\n#  define DES_UNROLL\n#endif /* Systems-specific speed defines */\n#endif\n\n#endif /* DES_DEFAULT_OPTIONS */\n#endif /* HEADER_DES_LOCL_H */\n#ifdef  __cplusplus\n}\n#endif\n"
  },
  {
    "path": "Pods/OpenSSL-Universal/include-ios/openssl/opensslv.h",
    "content": "#ifndef HEADER_OPENSSLV_H\n# define HEADER_OPENSSLV_H\n\n#ifdef  __cplusplus\nextern \"C\" {\n#endif\n\n/*-\n * Numeric release version identifier:\n * MNNFFPPS: major minor fix patch status\n * The status nibble has one of the values 0 for development, 1 to e for betas\n * 1 to 14, and f for release.  The patch level is exactly that.\n * For example:\n * 0.9.3-dev      0x00903000\n * 0.9.3-beta1    0x00903001\n * 0.9.3-beta2-dev 0x00903002\n * 0.9.3-beta2    0x00903002 (same as ...beta2-dev)\n * 0.9.3          0x0090300f\n * 0.9.3a         0x0090301f\n * 0.9.4          0x0090400f\n * 1.2.3z         0x102031af\n *\n * For continuity reasons (because 0.9.5 is already out, and is coded\n * 0x00905100), between 0.9.5 and 0.9.6 the coding of the patch level\n * part is slightly different, by setting the highest bit.  This means\n * that 0.9.5a looks like this: 0x0090581f.  At 0.9.6, we can start\n * with 0x0090600S...\n *\n * (Prior to 0.9.3-dev a different scheme was used: 0.9.2b is 0x0922.)\n * (Prior to 0.9.5a beta1, a different scheme was used: MMNNFFRBB for\n *  major minor fix final patch/beta)\n */\n# define OPENSSL_VERSION_NUMBER  0x1000111fL\n# ifdef OPENSSL_FIPS\n#  define OPENSSL_VERSION_TEXT    \"OpenSSL 1.0.1q-fips 3 Dec 2015\"\n# else\n#  define OPENSSL_VERSION_TEXT    \"OpenSSL 1.0.1q 3 Dec 2015\"\n# endif\n# define OPENSSL_VERSION_PTEXT   \" part of \" OPENSSL_VERSION_TEXT\n\n/*-\n * The macros below are to be used for shared library (.so, .dll, ...)\n * versioning.  That kind of versioning works a bit differently between\n * operating systems.  The most usual scheme is to set a major and a minor\n * number, and have the runtime loader check that the major number is equal\n * to what it was at application link time, while the minor number has to\n * be greater or equal to what it was at application link time.  With this\n * scheme, the version number is usually part of the file name, like this:\n *\n *      libcrypto.so.0.9\n *\n * Some unixen also make a softlink with the major verson number only:\n *\n *      libcrypto.so.0\n *\n * On Tru64 and IRIX 6.x it works a little bit differently.  There, the\n * shared library version is stored in the file, and is actually a series\n * of versions, separated by colons.  The rightmost version present in the\n * library when linking an application is stored in the application to be\n * matched at run time.  When the application is run, a check is done to\n * see if the library version stored in the application matches any of the\n * versions in the version string of the library itself.\n * This version string can be constructed in any way, depending on what\n * kind of matching is desired.  However, to implement the same scheme as\n * the one used in the other unixen, all compatible versions, from lowest\n * to highest, should be part of the string.  Consecutive builds would\n * give the following versions strings:\n *\n *      3.0\n *      3.0:3.1\n *      3.0:3.1:3.2\n *      4.0\n *      4.0:4.1\n *\n * Notice how version 4 is completely incompatible with version, and\n * therefore give the breach you can see.\n *\n * There may be other schemes as well that I haven't yet discovered.\n *\n * So, here's the way it works here: first of all, the library version\n * number doesn't need at all to match the overall OpenSSL version.\n * However, it's nice and more understandable if it actually does.\n * The current library version is stored in the macro SHLIB_VERSION_NUMBER,\n * which is just a piece of text in the format \"M.m.e\" (Major, minor, edit).\n * For the sake of Tru64, IRIX, and any other OS that behaves in similar ways,\n * we need to keep a history of version numbers, which is done in the\n * macro SHLIB_VERSION_HISTORY.  The numbers are separated by colons and\n * should only keep the versions that are binary compatible with the current.\n */\n# define SHLIB_VERSION_HISTORY \"\"\n# define SHLIB_VERSION_NUMBER \"1.0.0\"\n\n\n#ifdef  __cplusplus\n}\n#endif\n#endif                          /* HEADER_OPENSSLV_H */\n"
  },
  {
    "path": "Pods/OpenSSL-Universal/include-ios/openssl/ossl_typ.h",
    "content": "/* ====================================================================\n * Copyright (c) 1998-2001 The OpenSSL Project.  All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n *\n * 1. Redistributions of source code must retain the above copyright\n *    notice, this list of conditions and the following disclaimer.\n *\n * 2. Redistributions in binary form must reproduce the above copyright\n *    notice, this list of conditions and the following disclaimer in\n *    the documentation and/or other materials provided with the\n *    distribution.\n *\n * 3. All advertising materials mentioning features or use of this\n *    software must display the following acknowledgment:\n *    \"This product includes software developed by the OpenSSL Project\n *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)\"\n *\n * 4. The names \"OpenSSL Toolkit\" and \"OpenSSL Project\" must not be used to\n *    endorse or promote products derived from this software without\n *    prior written permission. For written permission, please contact\n *    openssl-core@openssl.org.\n *\n * 5. Products derived from this software may not be called \"OpenSSL\"\n *    nor may \"OpenSSL\" appear in their names without prior written\n *    permission of the OpenSSL Project.\n *\n * 6. Redistributions of any form whatsoever must retain the following\n *    acknowledgment:\n *    \"This product includes software developed by the OpenSSL Project\n *    for use in the OpenSSL Toolkit (http://www.openssl.org/)\"\n *\n * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY\n * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\n * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR\n * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,\n * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED\n * OF THE POSSIBILITY OF SUCH DAMAGE.\n * ====================================================================\n *\n * This product includes cryptographic software written by Eric Young\n * (eay@cryptsoft.com).  This product includes software written by Tim\n * Hudson (tjh@cryptsoft.com).\n *\n */\n\n#ifndef HEADER_OPENSSL_TYPES_H\n# define HEADER_OPENSSL_TYPES_H\n\n#ifdef  __cplusplus\nextern \"C\" {\n#endif\n\n# include <openssl/e_os2.h>\n\n# ifdef NO_ASN1_TYPEDEFS\n#  define ASN1_INTEGER            ASN1_STRING\n#  define ASN1_ENUMERATED         ASN1_STRING\n#  define ASN1_BIT_STRING         ASN1_STRING\n#  define ASN1_OCTET_STRING       ASN1_STRING\n#  define ASN1_PRINTABLESTRING    ASN1_STRING\n#  define ASN1_T61STRING          ASN1_STRING\n#  define ASN1_IA5STRING          ASN1_STRING\n#  define ASN1_UTCTIME            ASN1_STRING\n#  define ASN1_GENERALIZEDTIME    ASN1_STRING\n#  define ASN1_TIME               ASN1_STRING\n#  define ASN1_GENERALSTRING      ASN1_STRING\n#  define ASN1_UNIVERSALSTRING    ASN1_STRING\n#  define ASN1_BMPSTRING          ASN1_STRING\n#  define ASN1_VISIBLESTRING      ASN1_STRING\n#  define ASN1_UTF8STRING         ASN1_STRING\n#  define ASN1_BOOLEAN            int\n#  define ASN1_NULL               int\n# else\ntypedef struct asn1_string_st ASN1_INTEGER;\ntypedef struct asn1_string_st ASN1_ENUMERATED;\ntypedef struct asn1_string_st ASN1_BIT_STRING;\ntypedef struct asn1_string_st ASN1_OCTET_STRING;\ntypedef struct asn1_string_st ASN1_PRINTABLESTRING;\ntypedef struct asn1_string_st ASN1_T61STRING;\ntypedef struct asn1_string_st ASN1_IA5STRING;\ntypedef struct asn1_string_st ASN1_GENERALSTRING;\ntypedef struct asn1_string_st ASN1_UNIVERSALSTRING;\ntypedef struct asn1_string_st ASN1_BMPSTRING;\ntypedef struct asn1_string_st ASN1_UTCTIME;\ntypedef struct asn1_string_st ASN1_TIME;\ntypedef struct asn1_string_st ASN1_GENERALIZEDTIME;\ntypedef struct asn1_string_st ASN1_VISIBLESTRING;\ntypedef struct asn1_string_st ASN1_UTF8STRING;\ntypedef struct asn1_string_st ASN1_STRING;\ntypedef int ASN1_BOOLEAN;\ntypedef int ASN1_NULL;\n# endif\n\ntypedef struct ASN1_ITEM_st ASN1_ITEM;\ntypedef struct asn1_pctx_st ASN1_PCTX;\n\n# ifdef OPENSSL_SYS_WIN32\n#  undef X509_NAME\n#  undef X509_EXTENSIONS\n#  undef X509_CERT_PAIR\n#  undef PKCS7_ISSUER_AND_SERIAL\n#  undef OCSP_REQUEST\n#  undef OCSP_RESPONSE\n# endif\n\n# ifdef BIGNUM\n#  undef BIGNUM\n# endif\ntypedef struct bignum_st BIGNUM;\ntypedef struct bignum_ctx BN_CTX;\ntypedef struct bn_blinding_st BN_BLINDING;\ntypedef struct bn_mont_ctx_st BN_MONT_CTX;\ntypedef struct bn_recp_ctx_st BN_RECP_CTX;\ntypedef struct bn_gencb_st BN_GENCB;\n\ntypedef struct buf_mem_st BUF_MEM;\n\ntypedef struct evp_cipher_st EVP_CIPHER;\ntypedef struct evp_cipher_ctx_st EVP_CIPHER_CTX;\ntypedef struct env_md_st EVP_MD;\ntypedef struct env_md_ctx_st EVP_MD_CTX;\ntypedef struct evp_pkey_st EVP_PKEY;\n\ntypedef struct evp_pkey_asn1_method_st EVP_PKEY_ASN1_METHOD;\n\ntypedef struct evp_pkey_method_st EVP_PKEY_METHOD;\ntypedef struct evp_pkey_ctx_st EVP_PKEY_CTX;\n\ntypedef struct dh_st DH;\ntypedef struct dh_method DH_METHOD;\n\ntypedef struct dsa_st DSA;\ntypedef struct dsa_method DSA_METHOD;\n\ntypedef struct rsa_st RSA;\ntypedef struct rsa_meth_st RSA_METHOD;\n\ntypedef struct rand_meth_st RAND_METHOD;\n\ntypedef struct ecdh_method ECDH_METHOD;\ntypedef struct ecdsa_method ECDSA_METHOD;\n\ntypedef struct x509_st X509;\ntypedef struct X509_algor_st X509_ALGOR;\ntypedef struct X509_crl_st X509_CRL;\ntypedef struct x509_crl_method_st X509_CRL_METHOD;\ntypedef struct x509_revoked_st X509_REVOKED;\ntypedef struct X509_name_st X509_NAME;\ntypedef struct X509_pubkey_st X509_PUBKEY;\ntypedef struct x509_store_st X509_STORE;\ntypedef struct x509_store_ctx_st X509_STORE_CTX;\n\ntypedef struct pkcs8_priv_key_info_st PKCS8_PRIV_KEY_INFO;\n\ntypedef struct v3_ext_ctx X509V3_CTX;\ntypedef struct conf_st CONF;\n\ntypedef struct store_st STORE;\ntypedef struct store_method_st STORE_METHOD;\n\ntypedef struct ui_st UI;\ntypedef struct ui_method_st UI_METHOD;\n\ntypedef struct st_ERR_FNS ERR_FNS;\n\ntypedef struct engine_st ENGINE;\ntypedef struct ssl_st SSL;\ntypedef struct ssl_ctx_st SSL_CTX;\n\ntypedef struct X509_POLICY_NODE_st X509_POLICY_NODE;\ntypedef struct X509_POLICY_LEVEL_st X509_POLICY_LEVEL;\ntypedef struct X509_POLICY_TREE_st X509_POLICY_TREE;\ntypedef struct X509_POLICY_CACHE_st X509_POLICY_CACHE;\n\ntypedef struct AUTHORITY_KEYID_st AUTHORITY_KEYID;\ntypedef struct DIST_POINT_st DIST_POINT;\ntypedef struct ISSUING_DIST_POINT_st ISSUING_DIST_POINT;\ntypedef struct NAME_CONSTRAINTS_st NAME_CONSTRAINTS;\n\n  /* If placed in pkcs12.h, we end up with a circular depency with pkcs7.h */\n# define DECLARE_PKCS12_STACK_OF(type)/* Nothing */\n# define IMPLEMENT_PKCS12_STACK_OF(type)/* Nothing */\n\ntypedef struct crypto_ex_data_st CRYPTO_EX_DATA;\n/* Callback types for crypto.h */\ntypedef int CRYPTO_EX_new (void *parent, void *ptr, CRYPTO_EX_DATA *ad,\n                           int idx, long argl, void *argp);\ntypedef void CRYPTO_EX_free (void *parent, void *ptr, CRYPTO_EX_DATA *ad,\n                             int idx, long argl, void *argp);\ntypedef int CRYPTO_EX_dup (CRYPTO_EX_DATA *to, CRYPTO_EX_DATA *from,\n                           void *from_d, int idx, long argl, void *argp);\n\ntypedef struct ocsp_req_ctx_st OCSP_REQ_CTX;\ntypedef struct ocsp_response_st OCSP_RESPONSE;\ntypedef struct ocsp_responder_id_st OCSP_RESPID;\n\n#ifdef  __cplusplus\n}\n#endif\n#endif                          /* def HEADER_OPENSSL_TYPES_H */\n"
  },
  {
    "path": "Pods/OpenSSL-Universal/include-ios/openssl/pem.h",
    "content": "/* crypto/pem/pem.h */\n/* Copyright (C) 1995-1997 Eric Young (eay@cryptsoft.com)\n * All rights reserved.\n *\n * This package is an SSL implementation written\n * by Eric Young (eay@cryptsoft.com).\n * The implementation was written so as to conform with Netscapes SSL.\n *\n * This library is free for commercial and non-commercial use as long as\n * the following conditions are aheared to.  The following conditions\n * apply to all code found in this distribution, be it the RC4, RSA,\n * lhash, DES, etc., code; not just the SSL code.  The SSL documentation\n * included with this distribution is covered by the same copyright terms\n * except that the holder is Tim Hudson (tjh@cryptsoft.com).\n *\n * Copyright remains Eric Young's, and as such any Copyright notices in\n * the code are not to be removed.\n * If this package is used in a product, Eric Young should be given attribution\n * as the author of the parts of the library used.\n * This can be in the form of a textual message at program startup or\n * in documentation (online or textual) provided with the package.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n * 1. Redistributions of source code must retain the copyright\n *    notice, this list of conditions and the following disclaimer.\n * 2. Redistributions in binary form must reproduce the above copyright\n *    notice, this list of conditions and the following disclaimer in the\n *    documentation and/or other materials provided with the distribution.\n * 3. All advertising materials mentioning features or use of this software\n *    must display the following acknowledgement:\n *    \"This product includes cryptographic software written by\n *     Eric Young (eay@cryptsoft.com)\"\n *    The word 'cryptographic' can be left out if the rouines from the library\n *    being used are not cryptographic related :-).\n * 4. If you include any Windows specific code (or a derivative thereof) from\n *    the apps directory (application code) you must include an acknowledgement:\n *    \"This product includes software written by Tim Hudson (tjh@cryptsoft.com)\"\n *\n * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND\n * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE\n * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n * SUCH DAMAGE.\n *\n * The licence and distribution terms for any publically available version or\n * derivative of this code cannot be changed.  i.e. this code cannot simply be\n * copied and put under another distribution licence\n * [including the GNU Public Licence.]\n */\n\n#ifndef HEADER_PEM_H\n# define HEADER_PEM_H\n\n# include <openssl/e_os2.h>\n# ifndef OPENSSL_NO_BIO\n#  include <openssl/bio.h>\n# endif\n# ifndef OPENSSL_NO_STACK\n#  include <openssl/stack.h>\n# endif\n# include <openssl/evp.h>\n# include <openssl/x509.h>\n# include <openssl/pem2.h>\n\n#ifdef  __cplusplus\nextern \"C\" {\n#endif\n\n# define PEM_BUFSIZE             1024\n\n# define PEM_OBJ_UNDEF           0\n# define PEM_OBJ_X509            1\n# define PEM_OBJ_X509_REQ        2\n# define PEM_OBJ_CRL             3\n# define PEM_OBJ_SSL_SESSION     4\n# define PEM_OBJ_PRIV_KEY        10\n# define PEM_OBJ_PRIV_RSA        11\n# define PEM_OBJ_PRIV_DSA        12\n# define PEM_OBJ_PRIV_DH         13\n# define PEM_OBJ_PUB_RSA         14\n# define PEM_OBJ_PUB_DSA         15\n# define PEM_OBJ_PUB_DH          16\n# define PEM_OBJ_DHPARAMS        17\n# define PEM_OBJ_DSAPARAMS       18\n# define PEM_OBJ_PRIV_RSA_PUBLIC 19\n# define PEM_OBJ_PRIV_ECDSA      20\n# define PEM_OBJ_PUB_ECDSA       21\n# define PEM_OBJ_ECPARAMETERS    22\n\n# define PEM_ERROR               30\n# define PEM_DEK_DES_CBC         40\n# define PEM_DEK_IDEA_CBC        45\n# define PEM_DEK_DES_EDE         50\n# define PEM_DEK_DES_ECB         60\n# define PEM_DEK_RSA             70\n# define PEM_DEK_RSA_MD2         80\n# define PEM_DEK_RSA_MD5         90\n\n# define PEM_MD_MD2              NID_md2\n# define PEM_MD_MD5              NID_md5\n# define PEM_MD_SHA              NID_sha\n# define PEM_MD_MD2_RSA          NID_md2WithRSAEncryption\n# define PEM_MD_MD5_RSA          NID_md5WithRSAEncryption\n# define PEM_MD_SHA_RSA          NID_sha1WithRSAEncryption\n\n# define PEM_STRING_X509_OLD     \"X509 CERTIFICATE\"\n# define PEM_STRING_X509         \"CERTIFICATE\"\n# define PEM_STRING_X509_PAIR    \"CERTIFICATE PAIR\"\n# define PEM_STRING_X509_TRUSTED \"TRUSTED CERTIFICATE\"\n# define PEM_STRING_X509_REQ_OLD \"NEW CERTIFICATE REQUEST\"\n# define PEM_STRING_X509_REQ     \"CERTIFICATE REQUEST\"\n# define PEM_STRING_X509_CRL     \"X509 CRL\"\n# define PEM_STRING_EVP_PKEY     \"ANY PRIVATE KEY\"\n# define PEM_STRING_PUBLIC       \"PUBLIC KEY\"\n# define PEM_STRING_RSA          \"RSA PRIVATE KEY\"\n# define PEM_STRING_RSA_PUBLIC   \"RSA PUBLIC KEY\"\n# define PEM_STRING_DSA          \"DSA PRIVATE KEY\"\n# define PEM_STRING_DSA_PUBLIC   \"DSA PUBLIC KEY\"\n# define PEM_STRING_PKCS7        \"PKCS7\"\n# define PEM_STRING_PKCS7_SIGNED \"PKCS #7 SIGNED DATA\"\n# define PEM_STRING_PKCS8        \"ENCRYPTED PRIVATE KEY\"\n# define PEM_STRING_PKCS8INF     \"PRIVATE KEY\"\n# define PEM_STRING_DHPARAMS     \"DH PARAMETERS\"\n# define PEM_STRING_SSL_SESSION  \"SSL SESSION PARAMETERS\"\n# define PEM_STRING_DSAPARAMS    \"DSA PARAMETERS\"\n# define PEM_STRING_ECDSA_PUBLIC \"ECDSA PUBLIC KEY\"\n# define PEM_STRING_ECPARAMETERS \"EC PARAMETERS\"\n# define PEM_STRING_ECPRIVATEKEY \"EC PRIVATE KEY\"\n# define PEM_STRING_PARAMETERS   \"PARAMETERS\"\n# define PEM_STRING_CMS          \"CMS\"\n\n  /*\n   * Note that this structure is initialised by PEM_SealInit and cleaned up\n   * by PEM_SealFinal (at least for now)\n   */\ntypedef struct PEM_Encode_Seal_st {\n    EVP_ENCODE_CTX encode;\n    EVP_MD_CTX md;\n    EVP_CIPHER_CTX cipher;\n} PEM_ENCODE_SEAL_CTX;\n\n/* enc_type is one off */\n# define PEM_TYPE_ENCRYPTED      10\n# define PEM_TYPE_MIC_ONLY       20\n# define PEM_TYPE_MIC_CLEAR      30\n# define PEM_TYPE_CLEAR          40\n\ntypedef struct pem_recip_st {\n    char *name;\n    X509_NAME *dn;\n    int cipher;\n    int key_enc;\n    /*      char iv[8]; unused and wrong size */\n} PEM_USER;\n\ntypedef struct pem_ctx_st {\n    int type;                   /* what type of object */\n    struct {\n        int version;\n        int mode;\n    } proc_type;\n\n    char *domain;\n\n    struct {\n        int cipher;\n        /*-\n        unused, and wrong size\n        unsigned char iv[8]; */\n    } DEK_info;\n\n    PEM_USER *originator;\n\n    int num_recipient;\n    PEM_USER **recipient;\n\n/*-\n    XXX(ben): don#t think this is used!\n        STACK *x509_chain;      / * certificate chain */\n    EVP_MD *md;                 /* signature type */\n\n    int md_enc;                 /* is the md encrypted or not? */\n    int md_len;                 /* length of md_data */\n    char *md_data;              /* message digest, could be pkey encrypted */\n\n    EVP_CIPHER *dec;            /* date encryption cipher */\n    int key_len;                /* key length */\n    unsigned char *key;         /* key */\n  /*-\n    unused, and wrong size\n    unsigned char iv[8]; */\n\n    int data_enc;               /* is the data encrypted */\n    int data_len;\n    unsigned char *data;\n} PEM_CTX;\n\n/*\n * These macros make the PEM_read/PEM_write functions easier to maintain and\n * write. Now they are all implemented with either: IMPLEMENT_PEM_rw(...) or\n * IMPLEMENT_PEM_rw_cb(...)\n */\n\n# ifdef OPENSSL_NO_FP_API\n\n#  define IMPLEMENT_PEM_read_fp(name, type, str, asn1) /**/\n#  define IMPLEMENT_PEM_write_fp(name, type, str, asn1) /**/\n#  define IMPLEMENT_PEM_write_fp_const(name, type, str, asn1) /**/\n#  define IMPLEMENT_PEM_write_cb_fp(name, type, str, asn1) /**/\n#  define IMPLEMENT_PEM_write_cb_fp_const(name, type, str, asn1) /**/\n# else\n\n#  define IMPLEMENT_PEM_read_fp(name, type, str, asn1) \\\ntype *PEM_read_##name(FILE *fp, type **x, pem_password_cb *cb, void *u)\\\n{ \\\nreturn PEM_ASN1_read((d2i_of_void *)d2i_##asn1, str,fp,(void **)x,cb,u); \\\n}\n\n#  define IMPLEMENT_PEM_write_fp(name, type, str, asn1) \\\nint PEM_write_##name(FILE *fp, type *x) \\\n{ \\\nreturn PEM_ASN1_write((i2d_of_void *)i2d_##asn1,str,fp,x,NULL,NULL,0,NULL,NULL); \\\n}\n\n#  define IMPLEMENT_PEM_write_fp_const(name, type, str, asn1) \\\nint PEM_write_##name(FILE *fp, const type *x) \\\n{ \\\nreturn PEM_ASN1_write((i2d_of_void *)i2d_##asn1,str,fp,(void *)x,NULL,NULL,0,NULL,NULL); \\\n}\n\n#  define IMPLEMENT_PEM_write_cb_fp(name, type, str, asn1) \\\nint PEM_write_##name(FILE *fp, type *x, const EVP_CIPHER *enc, \\\n             unsigned char *kstr, int klen, pem_password_cb *cb, \\\n                  void *u) \\\n        { \\\n        return PEM_ASN1_write((i2d_of_void *)i2d_##asn1,str,fp,x,enc,kstr,klen,cb,u); \\\n        }\n\n#  define IMPLEMENT_PEM_write_cb_fp_const(name, type, str, asn1) \\\nint PEM_write_##name(FILE *fp, type *x, const EVP_CIPHER *enc, \\\n             unsigned char *kstr, int klen, pem_password_cb *cb, \\\n                  void *u) \\\n        { \\\n        return PEM_ASN1_write((i2d_of_void *)i2d_##asn1,str,fp,x,enc,kstr,klen,cb,u); \\\n        }\n\n# endif\n\n# define IMPLEMENT_PEM_read_bio(name, type, str, asn1) \\\ntype *PEM_read_bio_##name(BIO *bp, type **x, pem_password_cb *cb, void *u)\\\n{ \\\nreturn PEM_ASN1_read_bio((d2i_of_void *)d2i_##asn1, str,bp,(void **)x,cb,u); \\\n}\n\n# define IMPLEMENT_PEM_write_bio(name, type, str, asn1) \\\nint PEM_write_bio_##name(BIO *bp, type *x) \\\n{ \\\nreturn PEM_ASN1_write_bio((i2d_of_void *)i2d_##asn1,str,bp,x,NULL,NULL,0,NULL,NULL); \\\n}\n\n# define IMPLEMENT_PEM_write_bio_const(name, type, str, asn1) \\\nint PEM_write_bio_##name(BIO *bp, const type *x) \\\n{ \\\nreturn PEM_ASN1_write_bio((i2d_of_void *)i2d_##asn1,str,bp,(void *)x,NULL,NULL,0,NULL,NULL); \\\n}\n\n# define IMPLEMENT_PEM_write_cb_bio(name, type, str, asn1) \\\nint PEM_write_bio_##name(BIO *bp, type *x, const EVP_CIPHER *enc, \\\n             unsigned char *kstr, int klen, pem_password_cb *cb, void *u) \\\n        { \\\n        return PEM_ASN1_write_bio((i2d_of_void *)i2d_##asn1,str,bp,x,enc,kstr,klen,cb,u); \\\n        }\n\n# define IMPLEMENT_PEM_write_cb_bio_const(name, type, str, asn1) \\\nint PEM_write_bio_##name(BIO *bp, type *x, const EVP_CIPHER *enc, \\\n             unsigned char *kstr, int klen, pem_password_cb *cb, void *u) \\\n        { \\\n        return PEM_ASN1_write_bio((i2d_of_void *)i2d_##asn1,str,bp,(void *)x,enc,kstr,klen,cb,u); \\\n        }\n\n# define IMPLEMENT_PEM_write(name, type, str, asn1) \\\n        IMPLEMENT_PEM_write_bio(name, type, str, asn1) \\\n        IMPLEMENT_PEM_write_fp(name, type, str, asn1)\n\n# define IMPLEMENT_PEM_write_const(name, type, str, asn1) \\\n        IMPLEMENT_PEM_write_bio_const(name, type, str, asn1) \\\n        IMPLEMENT_PEM_write_fp_const(name, type, str, asn1)\n\n# define IMPLEMENT_PEM_write_cb(name, type, str, asn1) \\\n        IMPLEMENT_PEM_write_cb_bio(name, type, str, asn1) \\\n        IMPLEMENT_PEM_write_cb_fp(name, type, str, asn1)\n\n# define IMPLEMENT_PEM_write_cb_const(name, type, str, asn1) \\\n        IMPLEMENT_PEM_write_cb_bio_const(name, type, str, asn1) \\\n        IMPLEMENT_PEM_write_cb_fp_const(name, type, str, asn1)\n\n# define IMPLEMENT_PEM_read(name, type, str, asn1) \\\n        IMPLEMENT_PEM_read_bio(name, type, str, asn1) \\\n        IMPLEMENT_PEM_read_fp(name, type, str, asn1)\n\n# define IMPLEMENT_PEM_rw(name, type, str, asn1) \\\n        IMPLEMENT_PEM_read(name, type, str, asn1) \\\n        IMPLEMENT_PEM_write(name, type, str, asn1)\n\n# define IMPLEMENT_PEM_rw_const(name, type, str, asn1) \\\n        IMPLEMENT_PEM_read(name, type, str, asn1) \\\n        IMPLEMENT_PEM_write_const(name, type, str, asn1)\n\n# define IMPLEMENT_PEM_rw_cb(name, type, str, asn1) \\\n        IMPLEMENT_PEM_read(name, type, str, asn1) \\\n        IMPLEMENT_PEM_write_cb(name, type, str, asn1)\n\n/* These are the same except they are for the declarations */\n\n# if defined(OPENSSL_NO_FP_API)\n\n#  define DECLARE_PEM_read_fp(name, type) /**/\n#  define DECLARE_PEM_write_fp(name, type) /**/\n#  define DECLARE_PEM_write_cb_fp(name, type) /**/\n# else\n\n#  define DECLARE_PEM_read_fp(name, type) \\\n        type *PEM_read_##name(FILE *fp, type **x, pem_password_cb *cb, void *u);\n\n#  define DECLARE_PEM_write_fp(name, type) \\\n        int PEM_write_##name(FILE *fp, type *x);\n\n#  define DECLARE_PEM_write_fp_const(name, type) \\\n        int PEM_write_##name(FILE *fp, const type *x);\n\n#  define DECLARE_PEM_write_cb_fp(name, type) \\\n        int PEM_write_##name(FILE *fp, type *x, const EVP_CIPHER *enc, \\\n             unsigned char *kstr, int klen, pem_password_cb *cb, void *u);\n\n# endif\n\n# ifndef OPENSSL_NO_BIO\n#  define DECLARE_PEM_read_bio(name, type) \\\n        type *PEM_read_bio_##name(BIO *bp, type **x, pem_password_cb *cb, void *u);\n\n#  define DECLARE_PEM_write_bio(name, type) \\\n        int PEM_write_bio_##name(BIO *bp, type *x);\n\n#  define DECLARE_PEM_write_bio_const(name, type) \\\n        int PEM_write_bio_##name(BIO *bp, const type *x);\n\n#  define DECLARE_PEM_write_cb_bio(name, type) \\\n        int PEM_write_bio_##name(BIO *bp, type *x, const EVP_CIPHER *enc, \\\n             unsigned char *kstr, int klen, pem_password_cb *cb, void *u);\n\n# else\n\n#  define DECLARE_PEM_read_bio(name, type) /**/\n#  define DECLARE_PEM_write_bio(name, type) /**/\n#  define DECLARE_PEM_write_bio_const(name, type) /**/\n#  define DECLARE_PEM_write_cb_bio(name, type) /**/\n# endif\n# define DECLARE_PEM_write(name, type) \\\n        DECLARE_PEM_write_bio(name, type) \\\n        DECLARE_PEM_write_fp(name, type)\n# define DECLARE_PEM_write_const(name, type) \\\n        DECLARE_PEM_write_bio_const(name, type) \\\n        DECLARE_PEM_write_fp_const(name, type)\n# define DECLARE_PEM_write_cb(name, type) \\\n        DECLARE_PEM_write_cb_bio(name, type) \\\n        DECLARE_PEM_write_cb_fp(name, type)\n# define DECLARE_PEM_read(name, type) \\\n        DECLARE_PEM_read_bio(name, type) \\\n        DECLARE_PEM_read_fp(name, type)\n# define DECLARE_PEM_rw(name, type) \\\n        DECLARE_PEM_read(name, type) \\\n        DECLARE_PEM_write(name, type)\n# define DECLARE_PEM_rw_const(name, type) \\\n        DECLARE_PEM_read(name, type) \\\n        DECLARE_PEM_write_const(name, type)\n# define DECLARE_PEM_rw_cb(name, type) \\\n        DECLARE_PEM_read(name, type) \\\n        DECLARE_PEM_write_cb(name, type)\n# if 1\n/* \"userdata\": new with OpenSSL 0.9.4 */\ntypedef int pem_password_cb (char *buf, int size, int rwflag, void *userdata);\n# else\n/* OpenSSL 0.9.3, 0.9.3a */\ntypedef int pem_password_cb (char *buf, int size, int rwflag);\n# endif\n\nint PEM_get_EVP_CIPHER_INFO(char *header, EVP_CIPHER_INFO *cipher);\nint PEM_do_header(EVP_CIPHER_INFO *cipher, unsigned char *data, long *len,\n                  pem_password_cb *callback, void *u);\n\n# ifndef OPENSSL_NO_BIO\nint PEM_read_bio(BIO *bp, char **name, char **header,\n                 unsigned char **data, long *len);\nint PEM_write_bio(BIO *bp, const char *name, char *hdr, unsigned char *data,\n                  long len);\nint PEM_bytes_read_bio(unsigned char **pdata, long *plen, char **pnm,\n                       const char *name, BIO *bp, pem_password_cb *cb,\n                       void *u);\nvoid *PEM_ASN1_read_bio(d2i_of_void *d2i, const char *name, BIO *bp, void **x,\n                        pem_password_cb *cb, void *u);\nint PEM_ASN1_write_bio(i2d_of_void *i2d, const char *name, BIO *bp, void *x,\n                       const EVP_CIPHER *enc, unsigned char *kstr, int klen,\n                       pem_password_cb *cb, void *u);\n\nSTACK_OF(X509_INFO) *PEM_X509_INFO_read_bio(BIO *bp, STACK_OF(X509_INFO) *sk,\n                                            pem_password_cb *cb, void *u);\nint PEM_X509_INFO_write_bio(BIO *bp, X509_INFO *xi, EVP_CIPHER *enc,\n                            unsigned char *kstr, int klen,\n                            pem_password_cb *cd, void *u);\n# endif\n\nint PEM_read(FILE *fp, char **name, char **header,\n             unsigned char **data, long *len);\nint PEM_write(FILE *fp, char *name, char *hdr, unsigned char *data, long len);\nvoid *PEM_ASN1_read(d2i_of_void *d2i, const char *name, FILE *fp, void **x,\n                    pem_password_cb *cb, void *u);\nint PEM_ASN1_write(i2d_of_void *i2d, const char *name, FILE *fp,\n                   void *x, const EVP_CIPHER *enc, unsigned char *kstr,\n                   int klen, pem_password_cb *callback, void *u);\nSTACK_OF(X509_INFO) *PEM_X509_INFO_read(FILE *fp, STACK_OF(X509_INFO) *sk,\n                                        pem_password_cb *cb, void *u);\n\nint PEM_SealInit(PEM_ENCODE_SEAL_CTX *ctx, EVP_CIPHER *type,\n                 EVP_MD *md_type, unsigned char **ek, int *ekl,\n                 unsigned char *iv, EVP_PKEY **pubk, int npubk);\nvoid PEM_SealUpdate(PEM_ENCODE_SEAL_CTX *ctx, unsigned char *out, int *outl,\n                    unsigned char *in, int inl);\nint PEM_SealFinal(PEM_ENCODE_SEAL_CTX *ctx, unsigned char *sig, int *sigl,\n                  unsigned char *out, int *outl, EVP_PKEY *priv);\n\nvoid PEM_SignInit(EVP_MD_CTX *ctx, EVP_MD *type);\nvoid PEM_SignUpdate(EVP_MD_CTX *ctx, unsigned char *d, unsigned int cnt);\nint PEM_SignFinal(EVP_MD_CTX *ctx, unsigned char *sigret,\n                  unsigned int *siglen, EVP_PKEY *pkey);\n\nint PEM_def_callback(char *buf, int num, int w, void *key);\nvoid PEM_proc_type(char *buf, int type);\nvoid PEM_dek_info(char *buf, const char *type, int len, char *str);\n\n# include <openssl/symhacks.h>\n\nDECLARE_PEM_rw(X509, X509)\nDECLARE_PEM_rw(X509_AUX, X509)\nDECLARE_PEM_rw(X509_CERT_PAIR, X509_CERT_PAIR)\nDECLARE_PEM_rw(X509_REQ, X509_REQ)\nDECLARE_PEM_write(X509_REQ_NEW, X509_REQ)\nDECLARE_PEM_rw(X509_CRL, X509_CRL)\nDECLARE_PEM_rw(PKCS7, PKCS7)\nDECLARE_PEM_rw(NETSCAPE_CERT_SEQUENCE, NETSCAPE_CERT_SEQUENCE)\nDECLARE_PEM_rw(PKCS8, X509_SIG)\nDECLARE_PEM_rw(PKCS8_PRIV_KEY_INFO, PKCS8_PRIV_KEY_INFO)\n# ifndef OPENSSL_NO_RSA\nDECLARE_PEM_rw_cb(RSAPrivateKey, RSA)\nDECLARE_PEM_rw_const(RSAPublicKey, RSA)\nDECLARE_PEM_rw(RSA_PUBKEY, RSA)\n# endif\n# ifndef OPENSSL_NO_DSA\nDECLARE_PEM_rw_cb(DSAPrivateKey, DSA)\nDECLARE_PEM_rw(DSA_PUBKEY, DSA)\nDECLARE_PEM_rw_const(DSAparams, DSA)\n# endif\n# ifndef OPENSSL_NO_EC\nDECLARE_PEM_rw_const(ECPKParameters, EC_GROUP)\nDECLARE_PEM_rw_cb(ECPrivateKey, EC_KEY)\nDECLARE_PEM_rw(EC_PUBKEY, EC_KEY)\n# endif\n# ifndef OPENSSL_NO_DH\nDECLARE_PEM_rw_const(DHparams, DH)\n# endif\nDECLARE_PEM_rw_cb(PrivateKey, EVP_PKEY)\nDECLARE_PEM_rw(PUBKEY, EVP_PKEY)\n\nint PEM_write_bio_PKCS8PrivateKey_nid(BIO *bp, EVP_PKEY *x, int nid,\n                                      char *kstr, int klen,\n                                      pem_password_cb *cb, void *u);\nint PEM_write_bio_PKCS8PrivateKey(BIO *, EVP_PKEY *, const EVP_CIPHER *,\n                                  char *, int, pem_password_cb *, void *);\nint i2d_PKCS8PrivateKey_bio(BIO *bp, EVP_PKEY *x, const EVP_CIPHER *enc,\n                            char *kstr, int klen,\n                            pem_password_cb *cb, void *u);\nint i2d_PKCS8PrivateKey_nid_bio(BIO *bp, EVP_PKEY *x, int nid,\n                                char *kstr, int klen,\n                                pem_password_cb *cb, void *u);\nEVP_PKEY *d2i_PKCS8PrivateKey_bio(BIO *bp, EVP_PKEY **x, pem_password_cb *cb,\n                                  void *u);\n\nint i2d_PKCS8PrivateKey_fp(FILE *fp, EVP_PKEY *x, const EVP_CIPHER *enc,\n                           char *kstr, int klen,\n                           pem_password_cb *cb, void *u);\nint i2d_PKCS8PrivateKey_nid_fp(FILE *fp, EVP_PKEY *x, int nid,\n                               char *kstr, int klen,\n                               pem_password_cb *cb, void *u);\nint PEM_write_PKCS8PrivateKey_nid(FILE *fp, EVP_PKEY *x, int nid,\n                                  char *kstr, int klen,\n                                  pem_password_cb *cb, void *u);\n\nEVP_PKEY *d2i_PKCS8PrivateKey_fp(FILE *fp, EVP_PKEY **x, pem_password_cb *cb,\n                                 void *u);\n\nint PEM_write_PKCS8PrivateKey(FILE *fp, EVP_PKEY *x, const EVP_CIPHER *enc,\n                              char *kstr, int klen, pem_password_cb *cd,\n                              void *u);\n\nEVP_PKEY *PEM_read_bio_Parameters(BIO *bp, EVP_PKEY **x);\nint PEM_write_bio_Parameters(BIO *bp, EVP_PKEY *x);\n\nEVP_PKEY *b2i_PrivateKey(const unsigned char **in, long length);\nEVP_PKEY *b2i_PublicKey(const unsigned char **in, long length);\nEVP_PKEY *b2i_PrivateKey_bio(BIO *in);\nEVP_PKEY *b2i_PublicKey_bio(BIO *in);\nint i2b_PrivateKey_bio(BIO *out, EVP_PKEY *pk);\nint i2b_PublicKey_bio(BIO *out, EVP_PKEY *pk);\n# ifndef OPENSSL_NO_RC4\nEVP_PKEY *b2i_PVK_bio(BIO *in, pem_password_cb *cb, void *u);\nint i2b_PVK_bio(BIO *out, EVP_PKEY *pk, int enclevel,\n                pem_password_cb *cb, void *u);\n# endif\n\n/* BEGIN ERROR CODES */\n/*\n * The following lines are auto generated by the script mkerr.pl. Any changes\n * made after this point may be overwritten when the script is next run.\n */\nvoid ERR_load_PEM_strings(void);\n\n/* Error codes for the PEM functions. */\n\n/* Function codes. */\n# define PEM_F_B2I_DSS                                    127\n# define PEM_F_B2I_PVK_BIO                                128\n# define PEM_F_B2I_RSA                                    129\n# define PEM_F_CHECK_BITLEN_DSA                           130\n# define PEM_F_CHECK_BITLEN_RSA                           131\n# define PEM_F_D2I_PKCS8PRIVATEKEY_BIO                    120\n# define PEM_F_D2I_PKCS8PRIVATEKEY_FP                     121\n# define PEM_F_DO_B2I                                     132\n# define PEM_F_DO_B2I_BIO                                 133\n# define PEM_F_DO_BLOB_HEADER                             134\n# define PEM_F_DO_PK8PKEY                                 126\n# define PEM_F_DO_PK8PKEY_FP                              125\n# define PEM_F_DO_PVK_BODY                                135\n# define PEM_F_DO_PVK_HEADER                              136\n# define PEM_F_I2B_PVK                                    137\n# define PEM_F_I2B_PVK_BIO                                138\n# define PEM_F_LOAD_IV                                    101\n# define PEM_F_PEM_ASN1_READ                              102\n# define PEM_F_PEM_ASN1_READ_BIO                          103\n# define PEM_F_PEM_ASN1_WRITE                             104\n# define PEM_F_PEM_ASN1_WRITE_BIO                         105\n# define PEM_F_PEM_DEF_CALLBACK                           100\n# define PEM_F_PEM_DO_HEADER                              106\n# define PEM_F_PEM_F_PEM_WRITE_PKCS8PRIVATEKEY            118\n# define PEM_F_PEM_GET_EVP_CIPHER_INFO                    107\n# define PEM_F_PEM_PK8PKEY                                119\n# define PEM_F_PEM_READ                                   108\n# define PEM_F_PEM_READ_BIO                               109\n# define PEM_F_PEM_READ_BIO_PARAMETERS                    140\n# define PEM_F_PEM_READ_BIO_PRIVATEKEY                    123\n# define PEM_F_PEM_READ_PRIVATEKEY                        124\n# define PEM_F_PEM_SEALFINAL                              110\n# define PEM_F_PEM_SEALINIT                               111\n# define PEM_F_PEM_SIGNFINAL                              112\n# define PEM_F_PEM_WRITE                                  113\n# define PEM_F_PEM_WRITE_BIO                              114\n# define PEM_F_PEM_WRITE_PRIVATEKEY                       139\n# define PEM_F_PEM_X509_INFO_READ                         115\n# define PEM_F_PEM_X509_INFO_READ_BIO                     116\n# define PEM_F_PEM_X509_INFO_WRITE_BIO                    117\n\n/* Reason codes. */\n# define PEM_R_BAD_BASE64_DECODE                          100\n# define PEM_R_BAD_DECRYPT                                101\n# define PEM_R_BAD_END_LINE                               102\n# define PEM_R_BAD_IV_CHARS                               103\n# define PEM_R_BAD_MAGIC_NUMBER                           116\n# define PEM_R_BAD_PASSWORD_READ                          104\n# define PEM_R_BAD_VERSION_NUMBER                         117\n# define PEM_R_BIO_WRITE_FAILURE                          118\n# define PEM_R_CIPHER_IS_NULL                             127\n# define PEM_R_ERROR_CONVERTING_PRIVATE_KEY               115\n# define PEM_R_EXPECTING_PRIVATE_KEY_BLOB                 119\n# define PEM_R_EXPECTING_PUBLIC_KEY_BLOB                  120\n# define PEM_R_INCONSISTENT_HEADER                        121\n# define PEM_R_KEYBLOB_HEADER_PARSE_ERROR                 122\n# define PEM_R_KEYBLOB_TOO_SHORT                          123\n# define PEM_R_NOT_DEK_INFO                               105\n# define PEM_R_NOT_ENCRYPTED                              106\n# define PEM_R_NOT_PROC_TYPE                              107\n# define PEM_R_NO_START_LINE                              108\n# define PEM_R_PROBLEMS_GETTING_PASSWORD                  109\n# define PEM_R_PUBLIC_KEY_NO_RSA                          110\n# define PEM_R_PVK_DATA_TOO_SHORT                         124\n# define PEM_R_PVK_TOO_SHORT                              125\n# define PEM_R_READ_KEY                                   111\n# define PEM_R_SHORT_HEADER                               112\n# define PEM_R_UNSUPPORTED_CIPHER                         113\n# define PEM_R_UNSUPPORTED_ENCRYPTION                     114\n# define PEM_R_UNSUPPORTED_KEY_COMPONENTS                 126\n\n#ifdef  __cplusplus\n}\n#endif\n#endif\n"
  },
  {
    "path": "Pods/OpenSSL-Universal/include-ios/openssl/pem2.h",
    "content": "/* ====================================================================\n * Copyright (c) 1999 The OpenSSL Project.  All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n *\n * 1. Redistributions of source code must retain the above copyright\n *    notice, this list of conditions and the following disclaimer.\n *\n * 2. Redistributions in binary form must reproduce the above copyright\n *    notice, this list of conditions and the following disclaimer in\n *    the documentation and/or other materials provided with the\n *    distribution.\n *\n * 3. All advertising materials mentioning features or use of this\n *    software must display the following acknowledgment:\n *    \"This product includes software developed by the OpenSSL Project\n *    for use in the OpenSSL Toolkit. (http://www.OpenSSL.org/)\"\n *\n * 4. The names \"OpenSSL Toolkit\" and \"OpenSSL Project\" must not be used to\n *    endorse or promote products derived from this software without\n *    prior written permission. For written permission, please contact\n *    licensing@OpenSSL.org.\n *\n * 5. Products derived from this software may not be called \"OpenSSL\"\n *    nor may \"OpenSSL\" appear in their names without prior written\n *    permission of the OpenSSL Project.\n *\n * 6. Redistributions of any form whatsoever must retain the following\n *    acknowledgment:\n *    \"This product includes software developed by the OpenSSL Project\n *    for use in the OpenSSL Toolkit (http://www.OpenSSL.org/)\"\n *\n * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY\n * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\n * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR\n * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,\n * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED\n * OF THE POSSIBILITY OF SUCH DAMAGE.\n * ====================================================================\n *\n * This product includes cryptographic software written by Eric Young\n * (eay@cryptsoft.com).  This product includes software written by Tim\n * Hudson (tjh@cryptsoft.com).\n *\n */\n\n/*\n * This header only exists to break a circular dependency between pem and err\n * Ben 30 Jan 1999.\n */\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n#ifndef HEADER_PEM_H\nvoid ERR_load_PEM_strings(void);\n#endif\n\n#ifdef __cplusplus\n}\n#endif\n"
  },
  {
    "path": "Pods/OpenSSL-Universal/include-ios/openssl/pkcs12.h",
    "content": "/* pkcs12.h */\n/*\n * Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL project\n * 1999.\n */\n/* ====================================================================\n * Copyright (c) 1999 The OpenSSL Project.  All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n *\n * 1. Redistributions of source code must retain the above copyright\n *    notice, this list of conditions and the following disclaimer.\n *\n * 2. Redistributions in binary form must reproduce the above copyright\n *    notice, this list of conditions and the following disclaimer in\n *    the documentation and/or other materials provided with the\n *    distribution.\n *\n * 3. All advertising materials mentioning features or use of this\n *    software must display the following acknowledgment:\n *    \"This product includes software developed by the OpenSSL Project\n *    for use in the OpenSSL Toolkit. (http://www.OpenSSL.org/)\"\n *\n * 4. The names \"OpenSSL Toolkit\" and \"OpenSSL Project\" must not be used to\n *    endorse or promote products derived from this software without\n *    prior written permission. For written permission, please contact\n *    licensing@OpenSSL.org.\n *\n * 5. Products derived from this software may not be called \"OpenSSL\"\n *    nor may \"OpenSSL\" appear in their names without prior written\n *    permission of the OpenSSL Project.\n *\n * 6. Redistributions of any form whatsoever must retain the following\n *    acknowledgment:\n *    \"This product includes software developed by the OpenSSL Project\n *    for use in the OpenSSL Toolkit (http://www.OpenSSL.org/)\"\n *\n * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY\n * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\n * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR\n * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,\n * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED\n * OF THE POSSIBILITY OF SUCH DAMAGE.\n * ====================================================================\n *\n * This product includes cryptographic software written by Eric Young\n * (eay@cryptsoft.com).  This product includes software written by Tim\n * Hudson (tjh@cryptsoft.com).\n *\n */\n\n#ifndef HEADER_PKCS12_H\n# define HEADER_PKCS12_H\n\n# include <openssl/bio.h>\n# include <openssl/x509.h>\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n# define PKCS12_KEY_ID   1\n# define PKCS12_IV_ID    2\n# define PKCS12_MAC_ID   3\n\n/* Default iteration count */\n# ifndef PKCS12_DEFAULT_ITER\n#  define PKCS12_DEFAULT_ITER     PKCS5_DEFAULT_ITER\n# endif\n\n# define PKCS12_MAC_KEY_LENGTH 20\n\n# define PKCS12_SALT_LEN 8\n\n/* Uncomment out next line for unicode password and names, otherwise ASCII */\n\n/*\n * #define PBE_UNICODE\n */\n\n# ifdef PBE_UNICODE\n#  define PKCS12_key_gen PKCS12_key_gen_uni\n#  define PKCS12_add_friendlyname PKCS12_add_friendlyname_uni\n# else\n#  define PKCS12_key_gen PKCS12_key_gen_asc\n#  define PKCS12_add_friendlyname PKCS12_add_friendlyname_asc\n# endif\n\n/* MS key usage constants */\n\n# define KEY_EX  0x10\n# define KEY_SIG 0x80\n\ntypedef struct {\n    X509_SIG *dinfo;\n    ASN1_OCTET_STRING *salt;\n    ASN1_INTEGER *iter;         /* defaults to 1 */\n} PKCS12_MAC_DATA;\n\ntypedef struct {\n    ASN1_INTEGER *version;\n    PKCS12_MAC_DATA *mac;\n    PKCS7 *authsafes;\n} PKCS12;\n\ntypedef struct {\n    ASN1_OBJECT *type;\n    union {\n        struct pkcs12_bag_st *bag; /* secret, crl and certbag */\n        struct pkcs8_priv_key_info_st *keybag; /* keybag */\n        X509_SIG *shkeybag;     /* shrouded key bag */\n        STACK_OF(PKCS12_SAFEBAG) *safes;\n        ASN1_TYPE *other;\n    } value;\n    STACK_OF(X509_ATTRIBUTE) *attrib;\n} PKCS12_SAFEBAG;\n\nDECLARE_STACK_OF(PKCS12_SAFEBAG)\nDECLARE_ASN1_SET_OF(PKCS12_SAFEBAG)\nDECLARE_PKCS12_STACK_OF(PKCS12_SAFEBAG)\n\ntypedef struct pkcs12_bag_st {\n    ASN1_OBJECT *type;\n    union {\n        ASN1_OCTET_STRING *x509cert;\n        ASN1_OCTET_STRING *x509crl;\n        ASN1_OCTET_STRING *octet;\n        ASN1_IA5STRING *sdsicert;\n        ASN1_TYPE *other;       /* Secret or other bag */\n    } value;\n} PKCS12_BAGS;\n\n# define PKCS12_ERROR    0\n# define PKCS12_OK       1\n\n/* Compatibility macros */\n\n# define M_PKCS12_x5092certbag PKCS12_x5092certbag\n# define M_PKCS12_x509crl2certbag PKCS12_x509crl2certbag\n\n# define M_PKCS12_certbag2x509 PKCS12_certbag2x509\n# define M_PKCS12_certbag2x509crl PKCS12_certbag2x509crl\n\n# define M_PKCS12_unpack_p7data PKCS12_unpack_p7data\n# define M_PKCS12_pack_authsafes PKCS12_pack_authsafes\n# define M_PKCS12_unpack_authsafes PKCS12_unpack_authsafes\n# define M_PKCS12_unpack_p7encdata PKCS12_unpack_p7encdata\n\n# define M_PKCS12_decrypt_skey PKCS12_decrypt_skey\n# define M_PKCS8_decrypt PKCS8_decrypt\n\n# define M_PKCS12_bag_type(bg) OBJ_obj2nid((bg)->type)\n# define M_PKCS12_cert_bag_type(bg) OBJ_obj2nid((bg)->value.bag->type)\n# define M_PKCS12_crl_bag_type M_PKCS12_cert_bag_type\n\n# define PKCS12_get_attr(bag, attr_nid) \\\n                         PKCS12_get_attr_gen(bag->attrib, attr_nid)\n\n# define PKCS8_get_attr(p8, attr_nid) \\\n                PKCS12_get_attr_gen(p8->attributes, attr_nid)\n\n# define PKCS12_mac_present(p12) ((p12)->mac ? 1 : 0)\n\nPKCS12_SAFEBAG *PKCS12_x5092certbag(X509 *x509);\nPKCS12_SAFEBAG *PKCS12_x509crl2certbag(X509_CRL *crl);\nX509 *PKCS12_certbag2x509(PKCS12_SAFEBAG *bag);\nX509_CRL *PKCS12_certbag2x509crl(PKCS12_SAFEBAG *bag);\n\nPKCS12_SAFEBAG *PKCS12_item_pack_safebag(void *obj, const ASN1_ITEM *it,\n                                         int nid1, int nid2);\nPKCS12_SAFEBAG *PKCS12_MAKE_KEYBAG(PKCS8_PRIV_KEY_INFO *p8);\nPKCS8_PRIV_KEY_INFO *PKCS8_decrypt(X509_SIG *p8, const char *pass,\n                                   int passlen);\nPKCS8_PRIV_KEY_INFO *PKCS12_decrypt_skey(PKCS12_SAFEBAG *bag,\n                                         const char *pass, int passlen);\nX509_SIG *PKCS8_encrypt(int pbe_nid, const EVP_CIPHER *cipher,\n                        const char *pass, int passlen, unsigned char *salt,\n                        int saltlen, int iter, PKCS8_PRIV_KEY_INFO *p8);\nPKCS12_SAFEBAG *PKCS12_MAKE_SHKEYBAG(int pbe_nid, const char *pass,\n                                     int passlen, unsigned char *salt,\n                                     int saltlen, int iter,\n                                     PKCS8_PRIV_KEY_INFO *p8);\nPKCS7 *PKCS12_pack_p7data(STACK_OF(PKCS12_SAFEBAG) *sk);\nSTACK_OF(PKCS12_SAFEBAG) *PKCS12_unpack_p7data(PKCS7 *p7);\nPKCS7 *PKCS12_pack_p7encdata(int pbe_nid, const char *pass, int passlen,\n                             unsigned char *salt, int saltlen, int iter,\n                             STACK_OF(PKCS12_SAFEBAG) *bags);\nSTACK_OF(PKCS12_SAFEBAG) *PKCS12_unpack_p7encdata(PKCS7 *p7, const char *pass,\n                                                  int passlen);\n\nint PKCS12_pack_authsafes(PKCS12 *p12, STACK_OF(PKCS7) *safes);\nSTACK_OF(PKCS7) *PKCS12_unpack_authsafes(PKCS12 *p12);\n\nint PKCS12_add_localkeyid(PKCS12_SAFEBAG *bag, unsigned char *name,\n                          int namelen);\nint PKCS12_add_friendlyname_asc(PKCS12_SAFEBAG *bag, const char *name,\n                                int namelen);\nint PKCS12_add_CSPName_asc(PKCS12_SAFEBAG *bag, const char *name,\n                           int namelen);\nint PKCS12_add_friendlyname_uni(PKCS12_SAFEBAG *bag,\n                                const unsigned char *name, int namelen);\nint PKCS8_add_keyusage(PKCS8_PRIV_KEY_INFO *p8, int usage);\nASN1_TYPE *PKCS12_get_attr_gen(STACK_OF(X509_ATTRIBUTE) *attrs, int attr_nid);\nchar *PKCS12_get_friendlyname(PKCS12_SAFEBAG *bag);\nunsigned char *PKCS12_pbe_crypt(X509_ALGOR *algor, const char *pass,\n                                int passlen, unsigned char *in, int inlen,\n                                unsigned char **data, int *datalen,\n                                int en_de);\nvoid *PKCS12_item_decrypt_d2i(X509_ALGOR *algor, const ASN1_ITEM *it,\n                              const char *pass, int passlen,\n                              ASN1_OCTET_STRING *oct, int zbuf);\nASN1_OCTET_STRING *PKCS12_item_i2d_encrypt(X509_ALGOR *algor,\n                                           const ASN1_ITEM *it,\n                                           const char *pass, int passlen,\n                                           void *obj, int zbuf);\nPKCS12 *PKCS12_init(int mode);\nint PKCS12_key_gen_asc(const char *pass, int passlen, unsigned char *salt,\n                       int saltlen, int id, int iter, int n,\n                       unsigned char *out, const EVP_MD *md_type);\nint PKCS12_key_gen_uni(unsigned char *pass, int passlen, unsigned char *salt,\n                       int saltlen, int id, int iter, int n,\n                       unsigned char *out, const EVP_MD *md_type);\nint PKCS12_PBE_keyivgen(EVP_CIPHER_CTX *ctx, const char *pass, int passlen,\n                        ASN1_TYPE *param, const EVP_CIPHER *cipher,\n                        const EVP_MD *md_type, int en_de);\nint PKCS12_gen_mac(PKCS12 *p12, const char *pass, int passlen,\n                   unsigned char *mac, unsigned int *maclen);\nint PKCS12_verify_mac(PKCS12 *p12, const char *pass, int passlen);\nint PKCS12_set_mac(PKCS12 *p12, const char *pass, int passlen,\n                   unsigned char *salt, int saltlen, int iter,\n                   const EVP_MD *md_type);\nint PKCS12_setup_mac(PKCS12 *p12, int iter, unsigned char *salt,\n                     int saltlen, const EVP_MD *md_type);\nunsigned char *OPENSSL_asc2uni(const char *asc, int asclen,\n                               unsigned char **uni, int *unilen);\nchar *OPENSSL_uni2asc(unsigned char *uni, int unilen);\n\nDECLARE_ASN1_FUNCTIONS(PKCS12)\nDECLARE_ASN1_FUNCTIONS(PKCS12_MAC_DATA)\nDECLARE_ASN1_FUNCTIONS(PKCS12_SAFEBAG)\nDECLARE_ASN1_FUNCTIONS(PKCS12_BAGS)\n\nDECLARE_ASN1_ITEM(PKCS12_SAFEBAGS)\nDECLARE_ASN1_ITEM(PKCS12_AUTHSAFES)\n\nvoid PKCS12_PBE_add(void);\nint PKCS12_parse(PKCS12 *p12, const char *pass, EVP_PKEY **pkey, X509 **cert,\n                 STACK_OF(X509) **ca);\nPKCS12 *PKCS12_create(char *pass, char *name, EVP_PKEY *pkey, X509 *cert,\n                      STACK_OF(X509) *ca, int nid_key, int nid_cert, int iter,\n                      int mac_iter, int keytype);\n\nPKCS12_SAFEBAG *PKCS12_add_cert(STACK_OF(PKCS12_SAFEBAG) **pbags, X509 *cert);\nPKCS12_SAFEBAG *PKCS12_add_key(STACK_OF(PKCS12_SAFEBAG) **pbags,\n                               EVP_PKEY *key, int key_usage, int iter,\n                               int key_nid, char *pass);\nint PKCS12_add_safe(STACK_OF(PKCS7) **psafes, STACK_OF(PKCS12_SAFEBAG) *bags,\n                    int safe_nid, int iter, char *pass);\nPKCS12 *PKCS12_add_safes(STACK_OF(PKCS7) *safes, int p7_nid);\n\nint i2d_PKCS12_bio(BIO *bp, PKCS12 *p12);\nint i2d_PKCS12_fp(FILE *fp, PKCS12 *p12);\nPKCS12 *d2i_PKCS12_bio(BIO *bp, PKCS12 **p12);\nPKCS12 *d2i_PKCS12_fp(FILE *fp, PKCS12 **p12);\nint PKCS12_newpass(PKCS12 *p12, char *oldpass, char *newpass);\n\n/* BEGIN ERROR CODES */\n/*\n * The following lines are auto generated by the script mkerr.pl. Any changes\n * made after this point may be overwritten when the script is next run.\n */\nvoid ERR_load_PKCS12_strings(void);\n\n/* Error codes for the PKCS12 functions. */\n\n/* Function codes. */\n# define PKCS12_F_PARSE_BAG                               129\n# define PKCS12_F_PARSE_BAGS                              103\n# define PKCS12_F_PKCS12_ADD_FRIENDLYNAME                 100\n# define PKCS12_F_PKCS12_ADD_FRIENDLYNAME_ASC             127\n# define PKCS12_F_PKCS12_ADD_FRIENDLYNAME_UNI             102\n# define PKCS12_F_PKCS12_ADD_LOCALKEYID                   104\n# define PKCS12_F_PKCS12_CREATE                           105\n# define PKCS12_F_PKCS12_GEN_MAC                          107\n# define PKCS12_F_PKCS12_INIT                             109\n# define PKCS12_F_PKCS12_ITEM_DECRYPT_D2I                 106\n# define PKCS12_F_PKCS12_ITEM_I2D_ENCRYPT                 108\n# define PKCS12_F_PKCS12_ITEM_PACK_SAFEBAG                117\n# define PKCS12_F_PKCS12_KEY_GEN_ASC                      110\n# define PKCS12_F_PKCS12_KEY_GEN_UNI                      111\n# define PKCS12_F_PKCS12_MAKE_KEYBAG                      112\n# define PKCS12_F_PKCS12_MAKE_SHKEYBAG                    113\n# define PKCS12_F_PKCS12_NEWPASS                          128\n# define PKCS12_F_PKCS12_PACK_P7DATA                      114\n# define PKCS12_F_PKCS12_PACK_P7ENCDATA                   115\n# define PKCS12_F_PKCS12_PARSE                            118\n# define PKCS12_F_PKCS12_PBE_CRYPT                        119\n# define PKCS12_F_PKCS12_PBE_KEYIVGEN                     120\n# define PKCS12_F_PKCS12_SETUP_MAC                        122\n# define PKCS12_F_PKCS12_SET_MAC                          123\n# define PKCS12_F_PKCS12_UNPACK_AUTHSAFES                 130\n# define PKCS12_F_PKCS12_UNPACK_P7DATA                    131\n# define PKCS12_F_PKCS12_VERIFY_MAC                       126\n# define PKCS12_F_PKCS8_ADD_KEYUSAGE                      124\n# define PKCS12_F_PKCS8_ENCRYPT                           125\n\n/* Reason codes. */\n# define PKCS12_R_CANT_PACK_STRUCTURE                     100\n# define PKCS12_R_CONTENT_TYPE_NOT_DATA                   121\n# define PKCS12_R_DECODE_ERROR                            101\n# define PKCS12_R_ENCODE_ERROR                            102\n# define PKCS12_R_ENCRYPT_ERROR                           103\n# define PKCS12_R_ERROR_SETTING_ENCRYPTED_DATA_TYPE       120\n# define PKCS12_R_INVALID_NULL_ARGUMENT                   104\n# define PKCS12_R_INVALID_NULL_PKCS12_POINTER             105\n# define PKCS12_R_IV_GEN_ERROR                            106\n# define PKCS12_R_KEY_GEN_ERROR                           107\n# define PKCS12_R_MAC_ABSENT                              108\n# define PKCS12_R_MAC_GENERATION_ERROR                    109\n# define PKCS12_R_MAC_SETUP_ERROR                         110\n# define PKCS12_R_MAC_STRING_SET_ERROR                    111\n# define PKCS12_R_MAC_VERIFY_ERROR                        112\n# define PKCS12_R_MAC_VERIFY_FAILURE                      113\n# define PKCS12_R_PARSE_ERROR                             114\n# define PKCS12_R_PKCS12_ALGOR_CIPHERINIT_ERROR           115\n# define PKCS12_R_PKCS12_CIPHERFINAL_ERROR                116\n# define PKCS12_R_PKCS12_PBE_CRYPT_ERROR                  117\n# define PKCS12_R_UNKNOWN_DIGEST_ALGORITHM                118\n# define PKCS12_R_UNSUPPORTED_PKCS12_MODE                 119\n\n#ifdef  __cplusplus\n}\n#endif\n#endif\n"
  },
  {
    "path": "Pods/OpenSSL-Universal/include-ios/openssl/pkcs7.h",
    "content": "/* crypto/pkcs7/pkcs7.h */\n/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)\n * All rights reserved.\n *\n * This package is an SSL implementation written\n * by Eric Young (eay@cryptsoft.com).\n * The implementation was written so as to conform with Netscapes SSL.\n *\n * This library is free for commercial and non-commercial use as long as\n * the following conditions are aheared to.  The following conditions\n * apply to all code found in this distribution, be it the RC4, RSA,\n * lhash, DES, etc., code; not just the SSL code.  The SSL documentation\n * included with this distribution is covered by the same copyright terms\n * except that the holder is Tim Hudson (tjh@cryptsoft.com).\n *\n * Copyright remains Eric Young's, and as such any Copyright notices in\n * the code are not to be removed.\n * If this package is used in a product, Eric Young should be given attribution\n * as the author of the parts of the library used.\n * This can be in the form of a textual message at program startup or\n * in documentation (online or textual) provided with the package.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n * 1. Redistributions of source code must retain the copyright\n *    notice, this list of conditions and the following disclaimer.\n * 2. Redistributions in binary form must reproduce the above copyright\n *    notice, this list of conditions and the following disclaimer in the\n *    documentation and/or other materials provided with the distribution.\n * 3. All advertising materials mentioning features or use of this software\n *    must display the following acknowledgement:\n *    \"This product includes cryptographic software written by\n *     Eric Young (eay@cryptsoft.com)\"\n *    The word 'cryptographic' can be left out if the rouines from the library\n *    being used are not cryptographic related :-).\n * 4. If you include any Windows specific code (or a derivative thereof) from\n *    the apps directory (application code) you must include an acknowledgement:\n *    \"This product includes software written by Tim Hudson (tjh@cryptsoft.com)\"\n *\n * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND\n * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE\n * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n * SUCH DAMAGE.\n *\n * The licence and distribution terms for any publically available version or\n * derivative of this code cannot be changed.  i.e. this code cannot simply be\n * copied and put under another distribution licence\n * [including the GNU Public Licence.]\n */\n\n#ifndef HEADER_PKCS7_H\n# define HEADER_PKCS7_H\n\n# include <openssl/asn1.h>\n# include <openssl/bio.h>\n# include <openssl/e_os2.h>\n\n# include <openssl/symhacks.h>\n# include <openssl/ossl_typ.h>\n\n#ifdef  __cplusplus\nextern \"C\" {\n#endif\n\n# ifdef OPENSSL_SYS_WIN32\n/* Under Win32 thes are defined in wincrypt.h */\n#  undef PKCS7_ISSUER_AND_SERIAL\n#  undef PKCS7_SIGNER_INFO\n# endif\n\n/*-\nEncryption_ID           DES-CBC\nDigest_ID               MD5\nDigest_Encryption_ID    rsaEncryption\nKey_Encryption_ID       rsaEncryption\n*/\n\ntypedef struct pkcs7_issuer_and_serial_st {\n    X509_NAME *issuer;\n    ASN1_INTEGER *serial;\n} PKCS7_ISSUER_AND_SERIAL;\n\ntypedef struct pkcs7_signer_info_st {\n    ASN1_INTEGER *version;      /* version 1 */\n    PKCS7_ISSUER_AND_SERIAL *issuer_and_serial;\n    X509_ALGOR *digest_alg;\n    STACK_OF(X509_ATTRIBUTE) *auth_attr; /* [ 0 ] */\n    X509_ALGOR *digest_enc_alg;\n    ASN1_OCTET_STRING *enc_digest;\n    STACK_OF(X509_ATTRIBUTE) *unauth_attr; /* [ 1 ] */\n    /* The private key to sign with */\n    EVP_PKEY *pkey;\n} PKCS7_SIGNER_INFO;\n\nDECLARE_STACK_OF(PKCS7_SIGNER_INFO)\nDECLARE_ASN1_SET_OF(PKCS7_SIGNER_INFO)\n\ntypedef struct pkcs7_recip_info_st {\n    ASN1_INTEGER *version;      /* version 0 */\n    PKCS7_ISSUER_AND_SERIAL *issuer_and_serial;\n    X509_ALGOR *key_enc_algor;\n    ASN1_OCTET_STRING *enc_key;\n    X509 *cert;                 /* get the pub-key from this */\n} PKCS7_RECIP_INFO;\n\nDECLARE_STACK_OF(PKCS7_RECIP_INFO)\nDECLARE_ASN1_SET_OF(PKCS7_RECIP_INFO)\n\ntypedef struct pkcs7_signed_st {\n    ASN1_INTEGER *version;      /* version 1 */\n    STACK_OF(X509_ALGOR) *md_algs; /* md used */\n    STACK_OF(X509) *cert;       /* [ 0 ] */\n    STACK_OF(X509_CRL) *crl;    /* [ 1 ] */\n    STACK_OF(PKCS7_SIGNER_INFO) *signer_info;\n    struct pkcs7_st *contents;\n} PKCS7_SIGNED;\n/*\n * The above structure is very very similar to PKCS7_SIGN_ENVELOPE. How about\n * merging the two\n */\n\ntypedef struct pkcs7_enc_content_st {\n    ASN1_OBJECT *content_type;\n    X509_ALGOR *algorithm;\n    ASN1_OCTET_STRING *enc_data; /* [ 0 ] */\n    const EVP_CIPHER *cipher;\n} PKCS7_ENC_CONTENT;\n\ntypedef struct pkcs7_enveloped_st {\n    ASN1_INTEGER *version;      /* version 0 */\n    STACK_OF(PKCS7_RECIP_INFO) *recipientinfo;\n    PKCS7_ENC_CONTENT *enc_data;\n} PKCS7_ENVELOPE;\n\ntypedef struct pkcs7_signedandenveloped_st {\n    ASN1_INTEGER *version;      /* version 1 */\n    STACK_OF(X509_ALGOR) *md_algs; /* md used */\n    STACK_OF(X509) *cert;       /* [ 0 ] */\n    STACK_OF(X509_CRL) *crl;    /* [ 1 ] */\n    STACK_OF(PKCS7_SIGNER_INFO) *signer_info;\n    PKCS7_ENC_CONTENT *enc_data;\n    STACK_OF(PKCS7_RECIP_INFO) *recipientinfo;\n} PKCS7_SIGN_ENVELOPE;\n\ntypedef struct pkcs7_digest_st {\n    ASN1_INTEGER *version;      /* version 0 */\n    X509_ALGOR *md;             /* md used */\n    struct pkcs7_st *contents;\n    ASN1_OCTET_STRING *digest;\n} PKCS7_DIGEST;\n\ntypedef struct pkcs7_encrypted_st {\n    ASN1_INTEGER *version;      /* version 0 */\n    PKCS7_ENC_CONTENT *enc_data;\n} PKCS7_ENCRYPT;\n\ntypedef struct pkcs7_st {\n    /*\n     * The following is non NULL if it contains ASN1 encoding of this\n     * structure\n     */\n    unsigned char *asn1;\n    long length;\n# define PKCS7_S_HEADER  0\n# define PKCS7_S_BODY    1\n# define PKCS7_S_TAIL    2\n    int state;                  /* used during processing */\n    int detached;\n    ASN1_OBJECT *type;\n    /* content as defined by the type */\n    /*\n     * all encryption/message digests are applied to the 'contents', leaving\n     * out the 'type' field.\n     */\n    union {\n        char *ptr;\n        /* NID_pkcs7_data */\n        ASN1_OCTET_STRING *data;\n        /* NID_pkcs7_signed */\n        PKCS7_SIGNED *sign;\n        /* NID_pkcs7_enveloped */\n        PKCS7_ENVELOPE *enveloped;\n        /* NID_pkcs7_signedAndEnveloped */\n        PKCS7_SIGN_ENVELOPE *signed_and_enveloped;\n        /* NID_pkcs7_digest */\n        PKCS7_DIGEST *digest;\n        /* NID_pkcs7_encrypted */\n        PKCS7_ENCRYPT *encrypted;\n        /* Anything else */\n        ASN1_TYPE *other;\n    } d;\n} PKCS7;\n\nDECLARE_STACK_OF(PKCS7)\nDECLARE_ASN1_SET_OF(PKCS7)\nDECLARE_PKCS12_STACK_OF(PKCS7)\n\n# define PKCS7_OP_SET_DETACHED_SIGNATURE 1\n# define PKCS7_OP_GET_DETACHED_SIGNATURE 2\n\n# define PKCS7_get_signed_attributes(si) ((si)->auth_attr)\n# define PKCS7_get_attributes(si)        ((si)->unauth_attr)\n\n# define PKCS7_type_is_signed(a) (OBJ_obj2nid((a)->type) == NID_pkcs7_signed)\n# define PKCS7_type_is_encrypted(a) (OBJ_obj2nid((a)->type) == NID_pkcs7_encrypted)\n# define PKCS7_type_is_enveloped(a) (OBJ_obj2nid((a)->type) == NID_pkcs7_enveloped)\n# define PKCS7_type_is_signedAndEnveloped(a) \\\n                (OBJ_obj2nid((a)->type) == NID_pkcs7_signedAndEnveloped)\n# define PKCS7_type_is_data(a)   (OBJ_obj2nid((a)->type) == NID_pkcs7_data)\n# define PKCS7_type_is_digest(a)   (OBJ_obj2nid((a)->type) == NID_pkcs7_digest)\n\n# define PKCS7_set_detached(p,v) \\\n                PKCS7_ctrl(p,PKCS7_OP_SET_DETACHED_SIGNATURE,v,NULL)\n# define PKCS7_get_detached(p) \\\n                PKCS7_ctrl(p,PKCS7_OP_GET_DETACHED_SIGNATURE,0,NULL)\n\n# define PKCS7_is_detached(p7) (PKCS7_type_is_signed(p7) && PKCS7_get_detached(p7))\n\n/* S/MIME related flags */\n\n# define PKCS7_TEXT              0x1\n# define PKCS7_NOCERTS           0x2\n# define PKCS7_NOSIGS            0x4\n# define PKCS7_NOCHAIN           0x8\n# define PKCS7_NOINTERN          0x10\n# define PKCS7_NOVERIFY          0x20\n# define PKCS7_DETACHED          0x40\n# define PKCS7_BINARY            0x80\n# define PKCS7_NOATTR            0x100\n# define PKCS7_NOSMIMECAP        0x200\n# define PKCS7_NOOLDMIMETYPE     0x400\n# define PKCS7_CRLFEOL           0x800\n# define PKCS7_STREAM            0x1000\n# define PKCS7_NOCRL             0x2000\n# define PKCS7_PARTIAL           0x4000\n# define PKCS7_REUSE_DIGEST      0x8000\n\n/* Flags: for compatibility with older code */\n\n# define SMIME_TEXT      PKCS7_TEXT\n# define SMIME_NOCERTS   PKCS7_NOCERTS\n# define SMIME_NOSIGS    PKCS7_NOSIGS\n# define SMIME_NOCHAIN   PKCS7_NOCHAIN\n# define SMIME_NOINTERN  PKCS7_NOINTERN\n# define SMIME_NOVERIFY  PKCS7_NOVERIFY\n# define SMIME_DETACHED  PKCS7_DETACHED\n# define SMIME_BINARY    PKCS7_BINARY\n# define SMIME_NOATTR    PKCS7_NOATTR\n\nDECLARE_ASN1_FUNCTIONS(PKCS7_ISSUER_AND_SERIAL)\n\nint PKCS7_ISSUER_AND_SERIAL_digest(PKCS7_ISSUER_AND_SERIAL *data,\n                                   const EVP_MD *type, unsigned char *md,\n                                   unsigned int *len);\n# ifndef OPENSSL_NO_FP_API\nPKCS7 *d2i_PKCS7_fp(FILE *fp, PKCS7 **p7);\nint i2d_PKCS7_fp(FILE *fp, PKCS7 *p7);\n# endif\nPKCS7 *PKCS7_dup(PKCS7 *p7);\nPKCS7 *d2i_PKCS7_bio(BIO *bp, PKCS7 **p7);\nint i2d_PKCS7_bio(BIO *bp, PKCS7 *p7);\nint i2d_PKCS7_bio_stream(BIO *out, PKCS7 *p7, BIO *in, int flags);\nint PEM_write_bio_PKCS7_stream(BIO *out, PKCS7 *p7, BIO *in, int flags);\n\nDECLARE_ASN1_FUNCTIONS(PKCS7_SIGNER_INFO)\nDECLARE_ASN1_FUNCTIONS(PKCS7_RECIP_INFO)\nDECLARE_ASN1_FUNCTIONS(PKCS7_SIGNED)\nDECLARE_ASN1_FUNCTIONS(PKCS7_ENC_CONTENT)\nDECLARE_ASN1_FUNCTIONS(PKCS7_ENVELOPE)\nDECLARE_ASN1_FUNCTIONS(PKCS7_SIGN_ENVELOPE)\nDECLARE_ASN1_FUNCTIONS(PKCS7_DIGEST)\nDECLARE_ASN1_FUNCTIONS(PKCS7_ENCRYPT)\nDECLARE_ASN1_FUNCTIONS(PKCS7)\n\nDECLARE_ASN1_ITEM(PKCS7_ATTR_SIGN)\nDECLARE_ASN1_ITEM(PKCS7_ATTR_VERIFY)\n\nDECLARE_ASN1_NDEF_FUNCTION(PKCS7)\nDECLARE_ASN1_PRINT_FUNCTION(PKCS7)\n\nlong PKCS7_ctrl(PKCS7 *p7, int cmd, long larg, char *parg);\n\nint PKCS7_set_type(PKCS7 *p7, int type);\nint PKCS7_set0_type_other(PKCS7 *p7, int type, ASN1_TYPE *other);\nint PKCS7_set_content(PKCS7 *p7, PKCS7 *p7_data);\nint PKCS7_SIGNER_INFO_set(PKCS7_SIGNER_INFO *p7i, X509 *x509, EVP_PKEY *pkey,\n                          const EVP_MD *dgst);\nint PKCS7_SIGNER_INFO_sign(PKCS7_SIGNER_INFO *si);\nint PKCS7_add_signer(PKCS7 *p7, PKCS7_SIGNER_INFO *p7i);\nint PKCS7_add_certificate(PKCS7 *p7, X509 *x509);\nint PKCS7_add_crl(PKCS7 *p7, X509_CRL *x509);\nint PKCS7_content_new(PKCS7 *p7, int nid);\nint PKCS7_dataVerify(X509_STORE *cert_store, X509_STORE_CTX *ctx,\n                     BIO *bio, PKCS7 *p7, PKCS7_SIGNER_INFO *si);\nint PKCS7_signatureVerify(BIO *bio, PKCS7 *p7, PKCS7_SIGNER_INFO *si,\n                          X509 *x509);\n\nBIO *PKCS7_dataInit(PKCS7 *p7, BIO *bio);\nint PKCS7_dataFinal(PKCS7 *p7, BIO *bio);\nBIO *PKCS7_dataDecode(PKCS7 *p7, EVP_PKEY *pkey, BIO *in_bio, X509 *pcert);\n\nPKCS7_SIGNER_INFO *PKCS7_add_signature(PKCS7 *p7, X509 *x509,\n                                       EVP_PKEY *pkey, const EVP_MD *dgst);\nX509 *PKCS7_cert_from_signer_info(PKCS7 *p7, PKCS7_SIGNER_INFO *si);\nint PKCS7_set_digest(PKCS7 *p7, const EVP_MD *md);\nSTACK_OF(PKCS7_SIGNER_INFO) *PKCS7_get_signer_info(PKCS7 *p7);\n\nPKCS7_RECIP_INFO *PKCS7_add_recipient(PKCS7 *p7, X509 *x509);\nvoid PKCS7_SIGNER_INFO_get0_algs(PKCS7_SIGNER_INFO *si, EVP_PKEY **pk,\n                                 X509_ALGOR **pdig, X509_ALGOR **psig);\nvoid PKCS7_RECIP_INFO_get0_alg(PKCS7_RECIP_INFO *ri, X509_ALGOR **penc);\nint PKCS7_add_recipient_info(PKCS7 *p7, PKCS7_RECIP_INFO *ri);\nint PKCS7_RECIP_INFO_set(PKCS7_RECIP_INFO *p7i, X509 *x509);\nint PKCS7_set_cipher(PKCS7 *p7, const EVP_CIPHER *cipher);\nint PKCS7_stream(unsigned char ***boundary, PKCS7 *p7);\n\nPKCS7_ISSUER_AND_SERIAL *PKCS7_get_issuer_and_serial(PKCS7 *p7, int idx);\nASN1_OCTET_STRING *PKCS7_digest_from_attributes(STACK_OF(X509_ATTRIBUTE) *sk);\nint PKCS7_add_signed_attribute(PKCS7_SIGNER_INFO *p7si, int nid, int type,\n                               void *data);\nint PKCS7_add_attribute(PKCS7_SIGNER_INFO *p7si, int nid, int atrtype,\n                        void *value);\nASN1_TYPE *PKCS7_get_attribute(PKCS7_SIGNER_INFO *si, int nid);\nASN1_TYPE *PKCS7_get_signed_attribute(PKCS7_SIGNER_INFO *si, int nid);\nint PKCS7_set_signed_attributes(PKCS7_SIGNER_INFO *p7si,\n                                STACK_OF(X509_ATTRIBUTE) *sk);\nint PKCS7_set_attributes(PKCS7_SIGNER_INFO *p7si,\n                         STACK_OF(X509_ATTRIBUTE) *sk);\n\nPKCS7 *PKCS7_sign(X509 *signcert, EVP_PKEY *pkey, STACK_OF(X509) *certs,\n                  BIO *data, int flags);\n\nPKCS7_SIGNER_INFO *PKCS7_sign_add_signer(PKCS7 *p7,\n                                         X509 *signcert, EVP_PKEY *pkey,\n                                         const EVP_MD *md, int flags);\n\nint PKCS7_final(PKCS7 *p7, BIO *data, int flags);\nint PKCS7_verify(PKCS7 *p7, STACK_OF(X509) *certs, X509_STORE *store,\n                 BIO *indata, BIO *out, int flags);\nSTACK_OF(X509) *PKCS7_get0_signers(PKCS7 *p7, STACK_OF(X509) *certs,\n                                   int flags);\nPKCS7 *PKCS7_encrypt(STACK_OF(X509) *certs, BIO *in, const EVP_CIPHER *cipher,\n                     int flags);\nint PKCS7_decrypt(PKCS7 *p7, EVP_PKEY *pkey, X509 *cert, BIO *data,\n                  int flags);\n\nint PKCS7_add_attrib_smimecap(PKCS7_SIGNER_INFO *si,\n                              STACK_OF(X509_ALGOR) *cap);\nSTACK_OF(X509_ALGOR) *PKCS7_get_smimecap(PKCS7_SIGNER_INFO *si);\nint PKCS7_simple_smimecap(STACK_OF(X509_ALGOR) *sk, int nid, int arg);\n\nint PKCS7_add_attrib_content_type(PKCS7_SIGNER_INFO *si, ASN1_OBJECT *coid);\nint PKCS7_add0_attrib_signing_time(PKCS7_SIGNER_INFO *si, ASN1_TIME *t);\nint PKCS7_add1_attrib_digest(PKCS7_SIGNER_INFO *si,\n                             const unsigned char *md, int mdlen);\n\nint SMIME_write_PKCS7(BIO *bio, PKCS7 *p7, BIO *data, int flags);\nPKCS7 *SMIME_read_PKCS7(BIO *bio, BIO **bcont);\n\nBIO *BIO_new_PKCS7(BIO *out, PKCS7 *p7);\n\n/* BEGIN ERROR CODES */\n/*\n * The following lines are auto generated by the script mkerr.pl. Any changes\n * made after this point may be overwritten when the script is next run.\n */\nvoid ERR_load_PKCS7_strings(void);\n\n/* Error codes for the PKCS7 functions. */\n\n/* Function codes. */\n# define PKCS7_F_B64_READ_PKCS7                           120\n# define PKCS7_F_B64_WRITE_PKCS7                          121\n# define PKCS7_F_DO_PKCS7_SIGNED_ATTRIB                   136\n# define PKCS7_F_I2D_PKCS7_BIO_STREAM                     140\n# define PKCS7_F_PKCS7_ADD0_ATTRIB_SIGNING_TIME           135\n# define PKCS7_F_PKCS7_ADD_ATTRIB_SMIMECAP                118\n# define PKCS7_F_PKCS7_ADD_CERTIFICATE                    100\n# define PKCS7_F_PKCS7_ADD_CRL                            101\n# define PKCS7_F_PKCS7_ADD_RECIPIENT_INFO                 102\n# define PKCS7_F_PKCS7_ADD_SIGNATURE                      131\n# define PKCS7_F_PKCS7_ADD_SIGNER                         103\n# define PKCS7_F_PKCS7_BIO_ADD_DIGEST                     125\n# define PKCS7_F_PKCS7_COPY_EXISTING_DIGEST               138\n# define PKCS7_F_PKCS7_CTRL                               104\n# define PKCS7_F_PKCS7_DATADECODE                         112\n# define PKCS7_F_PKCS7_DATAFINAL                          128\n# define PKCS7_F_PKCS7_DATAINIT                           105\n# define PKCS7_F_PKCS7_DATASIGN                           106\n# define PKCS7_F_PKCS7_DATAVERIFY                         107\n# define PKCS7_F_PKCS7_DECRYPT                            114\n# define PKCS7_F_PKCS7_DECRYPT_RINFO                      133\n# define PKCS7_F_PKCS7_ENCODE_RINFO                       132\n# define PKCS7_F_PKCS7_ENCRYPT                            115\n# define PKCS7_F_PKCS7_FINAL                              134\n# define PKCS7_F_PKCS7_FIND_DIGEST                        127\n# define PKCS7_F_PKCS7_GET0_SIGNERS                       124\n# define PKCS7_F_PKCS7_RECIP_INFO_SET                     130\n# define PKCS7_F_PKCS7_SET_CIPHER                         108\n# define PKCS7_F_PKCS7_SET_CONTENT                        109\n# define PKCS7_F_PKCS7_SET_DIGEST                         126\n# define PKCS7_F_PKCS7_SET_TYPE                           110\n# define PKCS7_F_PKCS7_SIGN                               116\n# define PKCS7_F_PKCS7_SIGNATUREVERIFY                    113\n# define PKCS7_F_PKCS7_SIGNER_INFO_SET                    129\n# define PKCS7_F_PKCS7_SIGNER_INFO_SIGN                   139\n# define PKCS7_F_PKCS7_SIGN_ADD_SIGNER                    137\n# define PKCS7_F_PKCS7_SIMPLE_SMIMECAP                    119\n# define PKCS7_F_PKCS7_VERIFY                             117\n# define PKCS7_F_SMIME_READ_PKCS7                         122\n# define PKCS7_F_SMIME_TEXT                               123\n\n/* Reason codes. */\n# define PKCS7_R_CERTIFICATE_VERIFY_ERROR                 117\n# define PKCS7_R_CIPHER_HAS_NO_OBJECT_IDENTIFIER          144\n# define PKCS7_R_CIPHER_NOT_INITIALIZED                   116\n# define PKCS7_R_CONTENT_AND_DATA_PRESENT                 118\n# define PKCS7_R_CTRL_ERROR                               152\n# define PKCS7_R_DECODE_ERROR                             130\n# define PKCS7_R_DECRYPTED_KEY_IS_WRONG_LENGTH            100\n# define PKCS7_R_DECRYPT_ERROR                            119\n# define PKCS7_R_DIGEST_FAILURE                           101\n# define PKCS7_R_ENCRYPTION_CTRL_FAILURE                  149\n# define PKCS7_R_ENCRYPTION_NOT_SUPPORTED_FOR_THIS_KEY_TYPE 150\n# define PKCS7_R_ERROR_ADDING_RECIPIENT                   120\n# define PKCS7_R_ERROR_SETTING_CIPHER                     121\n# define PKCS7_R_INVALID_MIME_TYPE                        131\n# define PKCS7_R_INVALID_NULL_POINTER                     143\n# define PKCS7_R_INVALID_SIGNED_DATA_TYPE                 155\n# define PKCS7_R_MIME_NO_CONTENT_TYPE                     132\n# define PKCS7_R_MIME_PARSE_ERROR                         133\n# define PKCS7_R_MIME_SIG_PARSE_ERROR                     134\n# define PKCS7_R_MISSING_CERIPEND_INFO                    103\n# define PKCS7_R_NO_CONTENT                               122\n# define PKCS7_R_NO_CONTENT_TYPE                          135\n# define PKCS7_R_NO_DEFAULT_DIGEST                        151\n# define PKCS7_R_NO_MATCHING_DIGEST_TYPE_FOUND            154\n# define PKCS7_R_NO_MULTIPART_BODY_FAILURE                136\n# define PKCS7_R_NO_MULTIPART_BOUNDARY                    137\n# define PKCS7_R_NO_RECIPIENT_MATCHES_CERTIFICATE         115\n# define PKCS7_R_NO_RECIPIENT_MATCHES_KEY                 146\n# define PKCS7_R_NO_SIGNATURES_ON_DATA                    123\n# define PKCS7_R_NO_SIGNERS                               142\n# define PKCS7_R_NO_SIG_CONTENT_TYPE                      138\n# define PKCS7_R_OPERATION_NOT_SUPPORTED_ON_THIS_TYPE     104\n# define PKCS7_R_PKCS7_ADD_SIGNATURE_ERROR                124\n# define PKCS7_R_PKCS7_ADD_SIGNER_ERROR                   153\n# define PKCS7_R_PKCS7_DATAFINAL                          126\n# define PKCS7_R_PKCS7_DATAFINAL_ERROR                    125\n# define PKCS7_R_PKCS7_DATASIGN                           145\n# define PKCS7_R_PKCS7_PARSE_ERROR                        139\n# define PKCS7_R_PKCS7_SIG_PARSE_ERROR                    140\n# define PKCS7_R_PRIVATE_KEY_DOES_NOT_MATCH_CERTIFICATE   127\n# define PKCS7_R_SIGNATURE_FAILURE                        105\n# define PKCS7_R_SIGNER_CERTIFICATE_NOT_FOUND             128\n# define PKCS7_R_SIGNING_CTRL_FAILURE                     147\n# define PKCS7_R_SIGNING_NOT_SUPPORTED_FOR_THIS_KEY_TYPE  148\n# define PKCS7_R_SIG_INVALID_MIME_TYPE                    141\n# define PKCS7_R_SMIME_TEXT_ERROR                         129\n# define PKCS7_R_UNABLE_TO_FIND_CERTIFICATE               106\n# define PKCS7_R_UNABLE_TO_FIND_MEM_BIO                   107\n# define PKCS7_R_UNABLE_TO_FIND_MESSAGE_DIGEST            108\n# define PKCS7_R_UNKNOWN_DIGEST_TYPE                      109\n# define PKCS7_R_UNKNOWN_OPERATION                        110\n# define PKCS7_R_UNSUPPORTED_CIPHER_TYPE                  111\n# define PKCS7_R_UNSUPPORTED_CONTENT_TYPE                 112\n# define PKCS7_R_WRONG_CONTENT_TYPE                       113\n# define PKCS7_R_WRONG_PKCS7_TYPE                         114\n\n#ifdef  __cplusplus\n}\n#endif\n#endif\n"
  },
  {
    "path": "Pods/OpenSSL-Universal/include-ios/openssl/pqueue.h",
    "content": "/* crypto/pqueue/pqueue.h */\n/*\n * DTLS implementation written by Nagendra Modadugu\n * (nagendra@cs.stanford.edu) for the OpenSSL project 2005.\n */\n/* ====================================================================\n * Copyright (c) 1999-2005 The OpenSSL Project.  All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n *\n * 1. Redistributions of source code must retain the above copyright\n *    notice, this list of conditions and the following disclaimer.\n *\n * 2. Redistributions in binary form must reproduce the above copyright\n *    notice, this list of conditions and the following disclaimer in\n *    the documentation and/or other materials provided with the\n *    distribution.\n *\n * 3. All advertising materials mentioning features or use of this\n *    software must display the following acknowledgment:\n *    \"This product includes software developed by the OpenSSL Project\n *    for use in the OpenSSL Toolkit. (http://www.OpenSSL.org/)\"\n *\n * 4. The names \"OpenSSL Toolkit\" and \"OpenSSL Project\" must not be used to\n *    endorse or promote products derived from this software without\n *    prior written permission. For written permission, please contact\n *    openssl-core@OpenSSL.org.\n *\n * 5. Products derived from this software may not be called \"OpenSSL\"\n *    nor may \"OpenSSL\" appear in their names without prior written\n *    permission of the OpenSSL Project.\n *\n * 6. Redistributions of any form whatsoever must retain the following\n *    acknowledgment:\n *    \"This product includes software developed by the OpenSSL Project\n *    for use in the OpenSSL Toolkit (http://www.OpenSSL.org/)\"\n *\n * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY\n * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\n * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR\n * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,\n * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED\n * OF THE POSSIBILITY OF SUCH DAMAGE.\n * ====================================================================\n *\n * This product includes cryptographic software written by Eric Young\n * (eay@cryptsoft.com).  This product includes software written by Tim\n * Hudson (tjh@cryptsoft.com).\n *\n */\n\n#ifndef HEADER_PQUEUE_H\n# define HEADER_PQUEUE_H\n\n# include <stdio.h>\n# include <stdlib.h>\n# include <string.h>\n\n#ifdef  __cplusplus\nextern \"C\" {\n#endif\ntypedef struct _pqueue *pqueue;\n\ntypedef struct _pitem {\n    unsigned char priority[8];  /* 64-bit value in big-endian encoding */\n    void *data;\n    struct _pitem *next;\n} pitem;\n\ntypedef struct _pitem *piterator;\n\npitem *pitem_new(unsigned char *prio64be, void *data);\nvoid pitem_free(pitem *item);\n\npqueue pqueue_new(void);\nvoid pqueue_free(pqueue pq);\n\npitem *pqueue_insert(pqueue pq, pitem *item);\npitem *pqueue_peek(pqueue pq);\npitem *pqueue_pop(pqueue pq);\npitem *pqueue_find(pqueue pq, unsigned char *prio64be);\npitem *pqueue_iterator(pqueue pq);\npitem *pqueue_next(piterator *iter);\n\nvoid pqueue_print(pqueue pq);\nint pqueue_size(pqueue pq);\n\n#ifdef  __cplusplus\n}\n#endif\n#endif                          /* ! HEADER_PQUEUE_H */\n"
  },
  {
    "path": "Pods/OpenSSL-Universal/include-ios/openssl/rand.h",
    "content": "/* crypto/rand/rand.h */\n/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)\n * All rights reserved.\n *\n * This package is an SSL implementation written\n * by Eric Young (eay@cryptsoft.com).\n * The implementation was written so as to conform with Netscapes SSL.\n *\n * This library is free for commercial and non-commercial use as long as\n * the following conditions are aheared to.  The following conditions\n * apply to all code found in this distribution, be it the RC4, RSA,\n * lhash, DES, etc., code; not just the SSL code.  The SSL documentation\n * included with this distribution is covered by the same copyright terms\n * except that the holder is Tim Hudson (tjh@cryptsoft.com).\n *\n * Copyright remains Eric Young's, and as such any Copyright notices in\n * the code are not to be removed.\n * If this package is used in a product, Eric Young should be given attribution\n * as the author of the parts of the library used.\n * This can be in the form of a textual message at program startup or\n * in documentation (online or textual) provided with the package.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n * 1. Redistributions of source code must retain the copyright\n *    notice, this list of conditions and the following disclaimer.\n * 2. Redistributions in binary form must reproduce the above copyright\n *    notice, this list of conditions and the following disclaimer in the\n *    documentation and/or other materials provided with the distribution.\n * 3. All advertising materials mentioning features or use of this software\n *    must display the following acknowledgement:\n *    \"This product includes cryptographic software written by\n *     Eric Young (eay@cryptsoft.com)\"\n *    The word 'cryptographic' can be left out if the rouines from the library\n *    being used are not cryptographic related :-).\n * 4. If you include any Windows specific code (or a derivative thereof) from\n *    the apps directory (application code) you must include an acknowledgement:\n *    \"This product includes software written by Tim Hudson (tjh@cryptsoft.com)\"\n *\n * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND\n * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE\n * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n * SUCH DAMAGE.\n *\n * The licence and distribution terms for any publically available version or\n * derivative of this code cannot be changed.  i.e. this code cannot simply be\n * copied and put under another distribution licence\n * [including the GNU Public Licence.]\n */\n\n#ifndef HEADER_RAND_H\n# define HEADER_RAND_H\n\n# include <stdlib.h>\n# include <openssl/ossl_typ.h>\n# include <openssl/e_os2.h>\n\n# if defined(OPENSSL_SYS_WINDOWS)\n#  include <windows.h>\n# endif\n\n#ifdef  __cplusplus\nextern \"C\" {\n#endif\n\n# if defined(OPENSSL_FIPS)\n#  define FIPS_RAND_SIZE_T size_t\n# endif\n\n/* Already defined in ossl_typ.h */\n/* typedef struct rand_meth_st RAND_METHOD; */\n\nstruct rand_meth_st {\n    void (*seed) (const void *buf, int num);\n    int (*bytes) (unsigned char *buf, int num);\n    void (*cleanup) (void);\n    void (*add) (const void *buf, int num, double entropy);\n    int (*pseudorand) (unsigned char *buf, int num);\n    int (*status) (void);\n};\n\n# ifdef BN_DEBUG\nextern int rand_predictable;\n# endif\n\nint RAND_set_rand_method(const RAND_METHOD *meth);\nconst RAND_METHOD *RAND_get_rand_method(void);\n# ifndef OPENSSL_NO_ENGINE\nint RAND_set_rand_engine(ENGINE *engine);\n# endif\nRAND_METHOD *RAND_SSLeay(void);\nvoid RAND_cleanup(void);\nint RAND_bytes(unsigned char *buf, int num);\nint RAND_pseudo_bytes(unsigned char *buf, int num);\nvoid RAND_seed(const void *buf, int num);\nvoid RAND_add(const void *buf, int num, double entropy);\nint RAND_load_file(const char *file, long max_bytes);\nint RAND_write_file(const char *file);\nconst char *RAND_file_name(char *file, size_t num);\nint RAND_status(void);\nint RAND_query_egd_bytes(const char *path, unsigned char *buf, int bytes);\nint RAND_egd(const char *path);\nint RAND_egd_bytes(const char *path, int bytes);\nint RAND_poll(void);\n\n# if defined(OPENSSL_SYS_WINDOWS) || defined(OPENSSL_SYS_WIN32)\n\nvoid RAND_screen(void);\nint RAND_event(UINT, WPARAM, LPARAM);\n\n# endif\n\n# ifdef OPENSSL_FIPS\nvoid RAND_set_fips_drbg_type(int type, int flags);\nint RAND_init_fips(void);\n# endif\n\n/* BEGIN ERROR CODES */\n/*\n * The following lines are auto generated by the script mkerr.pl. Any changes\n * made after this point may be overwritten when the script is next run.\n */\nvoid ERR_load_RAND_strings(void);\n\n/* Error codes for the RAND functions. */\n\n/* Function codes. */\n# define RAND_F_RAND_GET_RAND_METHOD                      101\n# define RAND_F_RAND_INIT_FIPS                            102\n# define RAND_F_SSLEAY_RAND_BYTES                         100\n\n/* Reason codes. */\n# define RAND_R_DUAL_EC_DRBG_DISABLED                     104\n# define RAND_R_ERROR_INITIALISING_DRBG                   102\n# define RAND_R_ERROR_INSTANTIATING_DRBG                  103\n# define RAND_R_NO_FIPS_RANDOM_METHOD_SET                 101\n# define RAND_R_PRNG_NOT_SEEDED                           100\n\n#ifdef  __cplusplus\n}\n#endif\n#endif\n"
  },
  {
    "path": "Pods/OpenSSL-Universal/include-ios/openssl/rc2.h",
    "content": "/* crypto/rc2/rc2.h */\n/* Copyright (C) 1995-1997 Eric Young (eay@cryptsoft.com)\n * All rights reserved.\n *\n * This package is an SSL implementation written\n * by Eric Young (eay@cryptsoft.com).\n * The implementation was written so as to conform with Netscapes SSL.\n *\n * This library is free for commercial and non-commercial use as long as\n * the following conditions are aheared to.  The following conditions\n * apply to all code found in this distribution, be it the RC4, RSA,\n * lhash, DES, etc., code; not just the SSL code.  The SSL documentation\n * included with this distribution is covered by the same copyright terms\n * except that the holder is Tim Hudson (tjh@cryptsoft.com).\n *\n * Copyright remains Eric Young's, and as such any Copyright notices in\n * the code are not to be removed.\n * If this package is used in a product, Eric Young should be given attribution\n * as the author of the parts of the library used.\n * This can be in the form of a textual message at program startup or\n * in documentation (online or textual) provided with the package.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n * 1. Redistributions of source code must retain the copyright\n *    notice, this list of conditions and the following disclaimer.\n * 2. Redistributions in binary form must reproduce the above copyright\n *    notice, this list of conditions and the following disclaimer in the\n *    documentation and/or other materials provided with the distribution.\n * 3. All advertising materials mentioning features or use of this software\n *    must display the following acknowledgement:\n *    \"This product includes cryptographic software written by\n *     Eric Young (eay@cryptsoft.com)\"\n *    The word 'cryptographic' can be left out if the rouines from the library\n *    being used are not cryptographic related :-).\n * 4. If you include any Windows specific code (or a derivative thereof) from\n *    the apps directory (application code) you must include an acknowledgement:\n *    \"This product includes software written by Tim Hudson (tjh@cryptsoft.com)\"\n *\n * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND\n * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE\n * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n * SUCH DAMAGE.\n *\n * The licence and distribution terms for any publically available version or\n * derivative of this code cannot be changed.  i.e. this code cannot simply be\n * copied and put under another distribution licence\n * [including the GNU Public Licence.]\n */\n\n#ifndef HEADER_RC2_H\n# define HEADER_RC2_H\n\n# include <openssl/opensslconf.h>/* OPENSSL_NO_RC2, RC2_INT */\n# ifdef OPENSSL_NO_RC2\n#  error RC2 is disabled.\n# endif\n\n# define RC2_ENCRYPT     1\n# define RC2_DECRYPT     0\n\n# define RC2_BLOCK       8\n# define RC2_KEY_LENGTH  16\n\n#ifdef  __cplusplus\nextern \"C\" {\n#endif\n\ntypedef struct rc2_key_st {\n    RC2_INT data[64];\n} RC2_KEY;\n\n# ifdef OPENSSL_FIPS\nvoid private_RC2_set_key(RC2_KEY *key, int len, const unsigned char *data,\n                         int bits);\n# endif\nvoid RC2_set_key(RC2_KEY *key, int len, const unsigned char *data, int bits);\nvoid RC2_ecb_encrypt(const unsigned char *in, unsigned char *out,\n                     RC2_KEY *key, int enc);\nvoid RC2_encrypt(unsigned long *data, RC2_KEY *key);\nvoid RC2_decrypt(unsigned long *data, RC2_KEY *key);\nvoid RC2_cbc_encrypt(const unsigned char *in, unsigned char *out, long length,\n                     RC2_KEY *ks, unsigned char *iv, int enc);\nvoid RC2_cfb64_encrypt(const unsigned char *in, unsigned char *out,\n                       long length, RC2_KEY *schedule, unsigned char *ivec,\n                       int *num, int enc);\nvoid RC2_ofb64_encrypt(const unsigned char *in, unsigned char *out,\n                       long length, RC2_KEY *schedule, unsigned char *ivec,\n                       int *num);\n\n#ifdef  __cplusplus\n}\n#endif\n\n#endif\n"
  },
  {
    "path": "Pods/OpenSSL-Universal/include-ios/openssl/rc4.h",
    "content": "/* crypto/rc4/rc4.h */\n/* Copyright (C) 1995-1997 Eric Young (eay@cryptsoft.com)\n * All rights reserved.\n *\n * This package is an SSL implementation written\n * by Eric Young (eay@cryptsoft.com).\n * The implementation was written so as to conform with Netscapes SSL.\n *\n * This library is free for commercial and non-commercial use as long as\n * the following conditions are aheared to.  The following conditions\n * apply to all code found in this distribution, be it the RC4, RSA,\n * lhash, DES, etc., code; not just the SSL code.  The SSL documentation\n * included with this distribution is covered by the same copyright terms\n * except that the holder is Tim Hudson (tjh@cryptsoft.com).\n *\n * Copyright remains Eric Young's, and as such any Copyright notices in\n * the code are not to be removed.\n * If this package is used in a product, Eric Young should be given attribution\n * as the author of the parts of the library used.\n * This can be in the form of a textual message at program startup or\n * in documentation (online or textual) provided with the package.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n * 1. Redistributions of source code must retain the copyright\n *    notice, this list of conditions and the following disclaimer.\n * 2. Redistributions in binary form must reproduce the above copyright\n *    notice, this list of conditions and the following disclaimer in the\n *    documentation and/or other materials provided with the distribution.\n * 3. All advertising materials mentioning features or use of this software\n *    must display the following acknowledgement:\n *    \"This product includes cryptographic software written by\n *     Eric Young (eay@cryptsoft.com)\"\n *    The word 'cryptographic' can be left out if the rouines from the library\n *    being used are not cryptographic related :-).\n * 4. If you include any Windows specific code (or a derivative thereof) from\n *    the apps directory (application code) you must include an acknowledgement:\n *    \"This product includes software written by Tim Hudson (tjh@cryptsoft.com)\"\n *\n * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND\n * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE\n * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n * SUCH DAMAGE.\n *\n * The licence and distribution terms for any publically available version or\n * derivative of this code cannot be changed.  i.e. this code cannot simply be\n * copied and put under another distribution licence\n * [including the GNU Public Licence.]\n */\n\n#ifndef HEADER_RC4_H\n# define HEADER_RC4_H\n\n# include <openssl/opensslconf.h>/* OPENSSL_NO_RC4, RC4_INT */\n# ifdef OPENSSL_NO_RC4\n#  error RC4 is disabled.\n# endif\n\n# include <stddef.h>\n\n#ifdef  __cplusplus\nextern \"C\" {\n#endif\n\ntypedef struct rc4_key_st {\n    RC4_INT x, y;\n    RC4_INT data[256];\n} RC4_KEY;\n\nconst char *RC4_options(void);\nvoid RC4_set_key(RC4_KEY *key, int len, const unsigned char *data);\nvoid private_RC4_set_key(RC4_KEY *key, int len, const unsigned char *data);\nvoid RC4(RC4_KEY *key, size_t len, const unsigned char *indata,\n         unsigned char *outdata);\n\n#ifdef  __cplusplus\n}\n#endif\n\n#endif\n"
  },
  {
    "path": "Pods/OpenSSL-Universal/include-ios/openssl/ripemd.h",
    "content": "/* crypto/ripemd/ripemd.h */\n/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)\n * All rights reserved.\n *\n * This package is an SSL implementation written\n * by Eric Young (eay@cryptsoft.com).\n * The implementation was written so as to conform with Netscapes SSL.\n *\n * This library is free for commercial and non-commercial use as long as\n * the following conditions are aheared to.  The following conditions\n * apply to all code found in this distribution, be it the RC4, RSA,\n * lhash, DES, etc., code; not just the SSL code.  The SSL documentation\n * included with this distribution is covered by the same copyright terms\n * except that the holder is Tim Hudson (tjh@cryptsoft.com).\n *\n * Copyright remains Eric Young's, and as such any Copyright notices in\n * the code are not to be removed.\n * If this package is used in a product, Eric Young should be given attribution\n * as the author of the parts of the library used.\n * This can be in the form of a textual message at program startup or\n * in documentation (online or textual) provided with the package.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n * 1. Redistributions of source code must retain the copyright\n *    notice, this list of conditions and the following disclaimer.\n * 2. Redistributions in binary form must reproduce the above copyright\n *    notice, this list of conditions and the following disclaimer in the\n *    documentation and/or other materials provided with the distribution.\n * 3. All advertising materials mentioning features or use of this software\n *    must display the following acknowledgement:\n *    \"This product includes cryptographic software written by\n *     Eric Young (eay@cryptsoft.com)\"\n *    The word 'cryptographic' can be left out if the rouines from the library\n *    being used are not cryptographic related :-).\n * 4. If you include any Windows specific code (or a derivative thereof) from\n *    the apps directory (application code) you must include an acknowledgement:\n *    \"This product includes software written by Tim Hudson (tjh@cryptsoft.com)\"\n *\n * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND\n * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE\n * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n * SUCH DAMAGE.\n *\n * The licence and distribution terms for any publically available version or\n * derivative of this code cannot be changed.  i.e. this code cannot simply be\n * copied and put under another distribution licence\n * [including the GNU Public Licence.]\n */\n\n#ifndef HEADER_RIPEMD_H\n# define HEADER_RIPEMD_H\n\n# include <openssl/e_os2.h>\n# include <stddef.h>\n\n#ifdef  __cplusplus\nextern \"C\" {\n#endif\n\n# ifdef OPENSSL_NO_RIPEMD\n#  error RIPEMD is disabled.\n# endif\n\n# if defined(__LP32__)\n#  define RIPEMD160_LONG unsigned long\n# elif defined(OPENSSL_SYS_CRAY) || defined(__ILP64__)\n#  define RIPEMD160_LONG unsigned long\n#  define RIPEMD160_LONG_LOG2 3\n# else\n#  define RIPEMD160_LONG unsigned int\n# endif\n\n# define RIPEMD160_CBLOCK        64\n# define RIPEMD160_LBLOCK        (RIPEMD160_CBLOCK/4)\n# define RIPEMD160_DIGEST_LENGTH 20\n\ntypedef struct RIPEMD160state_st {\n    RIPEMD160_LONG A, B, C, D, E;\n    RIPEMD160_LONG Nl, Nh;\n    RIPEMD160_LONG data[RIPEMD160_LBLOCK];\n    unsigned int num;\n} RIPEMD160_CTX;\n\n# ifdef OPENSSL_FIPS\nint private_RIPEMD160_Init(RIPEMD160_CTX *c);\n# endif\nint RIPEMD160_Init(RIPEMD160_CTX *c);\nint RIPEMD160_Update(RIPEMD160_CTX *c, const void *data, size_t len);\nint RIPEMD160_Final(unsigned char *md, RIPEMD160_CTX *c);\nunsigned char *RIPEMD160(const unsigned char *d, size_t n, unsigned char *md);\nvoid RIPEMD160_Transform(RIPEMD160_CTX *c, const unsigned char *b);\n#ifdef  __cplusplus\n}\n#endif\n\n#endif\n"
  },
  {
    "path": "Pods/OpenSSL-Universal/include-ios/openssl/rsa.h",
    "content": "/* crypto/rsa/rsa.h */\n/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)\n * All rights reserved.\n *\n * This package is an SSL implementation written\n * by Eric Young (eay@cryptsoft.com).\n * The implementation was written so as to conform with Netscapes SSL.\n *\n * This library is free for commercial and non-commercial use as long as\n * the following conditions are aheared to.  The following conditions\n * apply to all code found in this distribution, be it the RC4, RSA,\n * lhash, DES, etc., code; not just the SSL code.  The SSL documentation\n * included with this distribution is covered by the same copyright terms\n * except that the holder is Tim Hudson (tjh@cryptsoft.com).\n *\n * Copyright remains Eric Young's, and as such any Copyright notices in\n * the code are not to be removed.\n * If this package is used in a product, Eric Young should be given attribution\n * as the author of the parts of the library used.\n * This can be in the form of a textual message at program startup or\n * in documentation (online or textual) provided with the package.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n * 1. Redistributions of source code must retain the copyright\n *    notice, this list of conditions and the following disclaimer.\n * 2. Redistributions in binary form must reproduce the above copyright\n *    notice, this list of conditions and the following disclaimer in the\n *    documentation and/or other materials provided with the distribution.\n * 3. All advertising materials mentioning features or use of this software\n *    must display the following acknowledgement:\n *    \"This product includes cryptographic software written by\n *     Eric Young (eay@cryptsoft.com)\"\n *    The word 'cryptographic' can be left out if the rouines from the library\n *    being used are not cryptographic related :-).\n * 4. If you include any Windows specific code (or a derivative thereof) from\n *    the apps directory (application code) you must include an acknowledgement:\n *    \"This product includes software written by Tim Hudson (tjh@cryptsoft.com)\"\n *\n * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND\n * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE\n * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n * SUCH DAMAGE.\n *\n * The licence and distribution terms for any publically available version or\n * derivative of this code cannot be changed.  i.e. this code cannot simply be\n * copied and put under another distribution licence\n * [including the GNU Public Licence.]\n */\n\n#ifndef HEADER_RSA_H\n# define HEADER_RSA_H\n\n# include <openssl/asn1.h>\n\n# ifndef OPENSSL_NO_BIO\n#  include <openssl/bio.h>\n# endif\n# include <openssl/crypto.h>\n# include <openssl/ossl_typ.h>\n# ifndef OPENSSL_NO_DEPRECATED\n#  include <openssl/bn.h>\n# endif\n\n# ifdef OPENSSL_NO_RSA\n#  error RSA is disabled.\n# endif\n\n#ifdef  __cplusplus\nextern \"C\" {\n#endif\n\n/* Declared already in ossl_typ.h */\n/* typedef struct rsa_st RSA; */\n/* typedef struct rsa_meth_st RSA_METHOD; */\n\nstruct rsa_meth_st {\n    const char *name;\n    int (*rsa_pub_enc) (int flen, const unsigned char *from,\n                        unsigned char *to, RSA *rsa, int padding);\n    int (*rsa_pub_dec) (int flen, const unsigned char *from,\n                        unsigned char *to, RSA *rsa, int padding);\n    int (*rsa_priv_enc) (int flen, const unsigned char *from,\n                         unsigned char *to, RSA *rsa, int padding);\n    int (*rsa_priv_dec) (int flen, const unsigned char *from,\n                         unsigned char *to, RSA *rsa, int padding);\n    /* Can be null */\n    int (*rsa_mod_exp) (BIGNUM *r0, const BIGNUM *i, RSA *rsa, BN_CTX *ctx);\n    /* Can be null */\n    int (*bn_mod_exp) (BIGNUM *r, const BIGNUM *a, const BIGNUM *p,\n                       const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *m_ctx);\n    /* called at new */\n    int (*init) (RSA *rsa);\n    /* called at free */\n    int (*finish) (RSA *rsa);\n    /* RSA_METHOD_FLAG_* things */\n    int flags;\n    /* may be needed! */\n    char *app_data;\n    /*\n     * New sign and verify functions: some libraries don't allow arbitrary\n     * data to be signed/verified: this allows them to be used. Note: for\n     * this to work the RSA_public_decrypt() and RSA_private_encrypt() should\n     * *NOT* be used RSA_sign(), RSA_verify() should be used instead. Note:\n     * for backwards compatibility this functionality is only enabled if the\n     * RSA_FLAG_SIGN_VER option is set in 'flags'.\n     */\n    int (*rsa_sign) (int type,\n                     const unsigned char *m, unsigned int m_length,\n                     unsigned char *sigret, unsigned int *siglen,\n                     const RSA *rsa);\n    int (*rsa_verify) (int dtype, const unsigned char *m,\n                       unsigned int m_length, const unsigned char *sigbuf,\n                       unsigned int siglen, const RSA *rsa);\n    /*\n     * If this callback is NULL, the builtin software RSA key-gen will be\n     * used. This is for behavioural compatibility whilst the code gets\n     * rewired, but one day it would be nice to assume there are no such\n     * things as \"builtin software\" implementations.\n     */\n    int (*rsa_keygen) (RSA *rsa, int bits, BIGNUM *e, BN_GENCB *cb);\n};\n\nstruct rsa_st {\n    /*\n     * The first parameter is used to pickup errors where this is passed\n     * instead of aEVP_PKEY, it is set to 0\n     */\n    int pad;\n    long version;\n    const RSA_METHOD *meth;\n    /* functional reference if 'meth' is ENGINE-provided */\n    ENGINE *engine;\n    BIGNUM *n;\n    BIGNUM *e;\n    BIGNUM *d;\n    BIGNUM *p;\n    BIGNUM *q;\n    BIGNUM *dmp1;\n    BIGNUM *dmq1;\n    BIGNUM *iqmp;\n    /* be careful using this if the RSA structure is shared */\n    CRYPTO_EX_DATA ex_data;\n    int references;\n    int flags;\n    /* Used to cache montgomery values */\n    BN_MONT_CTX *_method_mod_n;\n    BN_MONT_CTX *_method_mod_p;\n    BN_MONT_CTX *_method_mod_q;\n    /*\n     * all BIGNUM values are actually in the following data, if it is not\n     * NULL\n     */\n    char *bignum_data;\n    BN_BLINDING *blinding;\n    BN_BLINDING *mt_blinding;\n};\n\n# ifndef OPENSSL_RSA_MAX_MODULUS_BITS\n#  define OPENSSL_RSA_MAX_MODULUS_BITS   16384\n# endif\n\n# ifndef OPENSSL_RSA_SMALL_MODULUS_BITS\n#  define OPENSSL_RSA_SMALL_MODULUS_BITS 3072\n# endif\n# ifndef OPENSSL_RSA_MAX_PUBEXP_BITS\n\n/* exponent limit enforced for \"large\" modulus only */\n#  define OPENSSL_RSA_MAX_PUBEXP_BITS    64\n# endif\n\n# define RSA_3   0x3L\n# define RSA_F4  0x10001L\n\n# define RSA_METHOD_FLAG_NO_CHECK        0x0001/* don't check pub/private\n                                                * match */\n\n# define RSA_FLAG_CACHE_PUBLIC           0x0002\n# define RSA_FLAG_CACHE_PRIVATE          0x0004\n# define RSA_FLAG_BLINDING               0x0008\n# define RSA_FLAG_THREAD_SAFE            0x0010\n/*\n * This flag means the private key operations will be handled by rsa_mod_exp\n * and that they do not depend on the private key components being present:\n * for example a key stored in external hardware. Without this flag\n * bn_mod_exp gets called when private key components are absent.\n */\n# define RSA_FLAG_EXT_PKEY               0x0020\n\n/*\n * This flag in the RSA_METHOD enables the new rsa_sign, rsa_verify\n * functions.\n */\n# define RSA_FLAG_SIGN_VER               0x0040\n\n/*\n * new with 0.9.6j and 0.9.7b; the built-in\n * RSA implementation now uses blinding by\n * default (ignoring RSA_FLAG_BLINDING),\n * but other engines might not need it\n */\n# define RSA_FLAG_NO_BLINDING            0x0080\n/*\n * new with 0.9.8f; the built-in RSA\n * implementation now uses constant time\n * operations by default in private key operations,\n * e.g., constant time modular exponentiation,\n * modular inverse without leaking branches,\n * division without leaking branches. This\n * flag disables these constant time\n * operations and results in faster RSA\n * private key operations.\n */\n# define RSA_FLAG_NO_CONSTTIME           0x0100\n# ifdef OPENSSL_USE_DEPRECATED\n/* deprecated name for the flag*/\n/*\n * new with 0.9.7h; the built-in RSA\n * implementation now uses constant time\n * modular exponentiation for secret exponents\n * by default. This flag causes the\n * faster variable sliding window method to\n * be used for all exponents.\n */\n#  define RSA_FLAG_NO_EXP_CONSTTIME RSA_FLAG_NO_CONSTTIME\n# endif\n\n# define EVP_PKEY_CTX_set_rsa_padding(ctx, pad) \\\n        EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_RSA, -1, EVP_PKEY_CTRL_RSA_PADDING, \\\n                                pad, NULL)\n\n# define EVP_PKEY_CTX_get_rsa_padding(ctx, ppad) \\\n        EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_RSA, -1, \\\n                                EVP_PKEY_CTRL_GET_RSA_PADDING, 0, ppad)\n\n# define EVP_PKEY_CTX_set_rsa_pss_saltlen(ctx, len) \\\n        EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_RSA, \\\n                                (EVP_PKEY_OP_SIGN|EVP_PKEY_OP_VERIFY), \\\n                                EVP_PKEY_CTRL_RSA_PSS_SALTLEN, \\\n                                len, NULL)\n\n# define EVP_PKEY_CTX_get_rsa_pss_saltlen(ctx, plen) \\\n        EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_RSA, \\\n                                (EVP_PKEY_OP_SIGN|EVP_PKEY_OP_VERIFY), \\\n                                EVP_PKEY_CTRL_GET_RSA_PSS_SALTLEN, \\\n                                0, plen)\n\n# define EVP_PKEY_CTX_set_rsa_keygen_bits(ctx, bits) \\\n        EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_RSA, EVP_PKEY_OP_KEYGEN, \\\n                                EVP_PKEY_CTRL_RSA_KEYGEN_BITS, bits, NULL)\n\n# define EVP_PKEY_CTX_set_rsa_keygen_pubexp(ctx, pubexp) \\\n        EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_RSA, EVP_PKEY_OP_KEYGEN, \\\n                                EVP_PKEY_CTRL_RSA_KEYGEN_PUBEXP, 0, pubexp)\n\n# define  EVP_PKEY_CTX_set_rsa_mgf1_md(ctx, md)  \\\n                EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_RSA, EVP_PKEY_OP_TYPE_SIG,  \\\n                                EVP_PKEY_CTRL_RSA_MGF1_MD, 0, (void *)md)\n\n# define  EVP_PKEY_CTX_get_rsa_mgf1_md(ctx, pmd) \\\n                EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_RSA, EVP_PKEY_OP_TYPE_SIG,  \\\n                                EVP_PKEY_CTRL_GET_RSA_MGF1_MD, 0, (void *)pmd)\n\n# define EVP_PKEY_CTRL_RSA_PADDING       (EVP_PKEY_ALG_CTRL + 1)\n# define EVP_PKEY_CTRL_RSA_PSS_SALTLEN   (EVP_PKEY_ALG_CTRL + 2)\n\n# define EVP_PKEY_CTRL_RSA_KEYGEN_BITS   (EVP_PKEY_ALG_CTRL + 3)\n# define EVP_PKEY_CTRL_RSA_KEYGEN_PUBEXP (EVP_PKEY_ALG_CTRL + 4)\n# define EVP_PKEY_CTRL_RSA_MGF1_MD       (EVP_PKEY_ALG_CTRL + 5)\n\n# define EVP_PKEY_CTRL_GET_RSA_PADDING           (EVP_PKEY_ALG_CTRL + 6)\n# define EVP_PKEY_CTRL_GET_RSA_PSS_SALTLEN       (EVP_PKEY_ALG_CTRL + 7)\n# define EVP_PKEY_CTRL_GET_RSA_MGF1_MD           (EVP_PKEY_ALG_CTRL + 8)\n\n# define RSA_PKCS1_PADDING       1\n# define RSA_SSLV23_PADDING      2\n# define RSA_NO_PADDING          3\n# define RSA_PKCS1_OAEP_PADDING  4\n# define RSA_X931_PADDING        5\n/* EVP_PKEY_ only */\n# define RSA_PKCS1_PSS_PADDING   6\n\n# define RSA_PKCS1_PADDING_SIZE  11\n\n# define RSA_set_app_data(s,arg)         RSA_set_ex_data(s,0,arg)\n# define RSA_get_app_data(s)             RSA_get_ex_data(s,0)\n\nRSA *RSA_new(void);\nRSA *RSA_new_method(ENGINE *engine);\nint RSA_size(const RSA *rsa);\n\n/* Deprecated version */\n# ifndef OPENSSL_NO_DEPRECATED\nRSA *RSA_generate_key(int bits, unsigned long e, void\n                       (*callback) (int, int, void *), void *cb_arg);\n# endif                         /* !defined(OPENSSL_NO_DEPRECATED) */\n\n/* New version */\nint RSA_generate_key_ex(RSA *rsa, int bits, BIGNUM *e, BN_GENCB *cb);\n\nint RSA_check_key(const RSA *);\n        /* next 4 return -1 on error */\nint RSA_public_encrypt(int flen, const unsigned char *from,\n                       unsigned char *to, RSA *rsa, int padding);\nint RSA_private_encrypt(int flen, const unsigned char *from,\n                        unsigned char *to, RSA *rsa, int padding);\nint RSA_public_decrypt(int flen, const unsigned char *from,\n                       unsigned char *to, RSA *rsa, int padding);\nint RSA_private_decrypt(int flen, const unsigned char *from,\n                        unsigned char *to, RSA *rsa, int padding);\nvoid RSA_free(RSA *r);\n/* \"up\" the RSA object's reference count */\nint RSA_up_ref(RSA *r);\n\nint RSA_flags(const RSA *r);\n\nvoid RSA_set_default_method(const RSA_METHOD *meth);\nconst RSA_METHOD *RSA_get_default_method(void);\nconst RSA_METHOD *RSA_get_method(const RSA *rsa);\nint RSA_set_method(RSA *rsa, const RSA_METHOD *meth);\n\n/* This function needs the memory locking malloc callbacks to be installed */\nint RSA_memory_lock(RSA *r);\n\n/* these are the actual SSLeay RSA functions */\nconst RSA_METHOD *RSA_PKCS1_SSLeay(void);\n\nconst RSA_METHOD *RSA_null_method(void);\n\nDECLARE_ASN1_ENCODE_FUNCTIONS_const(RSA, RSAPublicKey)\nDECLARE_ASN1_ENCODE_FUNCTIONS_const(RSA, RSAPrivateKey)\n\ntypedef struct rsa_pss_params_st {\n    X509_ALGOR *hashAlgorithm;\n    X509_ALGOR *maskGenAlgorithm;\n    ASN1_INTEGER *saltLength;\n    ASN1_INTEGER *trailerField;\n} RSA_PSS_PARAMS;\n\nDECLARE_ASN1_FUNCTIONS(RSA_PSS_PARAMS)\n\n# ifndef OPENSSL_NO_FP_API\nint RSA_print_fp(FILE *fp, const RSA *r, int offset);\n# endif\n\n# ifndef OPENSSL_NO_BIO\nint RSA_print(BIO *bp, const RSA *r, int offset);\n# endif\n\n# ifndef OPENSSL_NO_RC4\nint i2d_RSA_NET(const RSA *a, unsigned char **pp,\n                int (*cb) (char *buf, int len, const char *prompt,\n                           int verify), int sgckey);\nRSA *d2i_RSA_NET(RSA **a, const unsigned char **pp, long length,\n                 int (*cb) (char *buf, int len, const char *prompt,\n                            int verify), int sgckey);\n\nint i2d_Netscape_RSA(const RSA *a, unsigned char **pp,\n                     int (*cb) (char *buf, int len, const char *prompt,\n                                int verify));\nRSA *d2i_Netscape_RSA(RSA **a, const unsigned char **pp, long length,\n                      int (*cb) (char *buf, int len, const char *prompt,\n                                 int verify));\n# endif\n\n/*\n * The following 2 functions sign and verify a X509_SIG ASN1 object inside\n * PKCS#1 padded RSA encryption\n */\nint RSA_sign(int type, const unsigned char *m, unsigned int m_length,\n             unsigned char *sigret, unsigned int *siglen, RSA *rsa);\nint RSA_verify(int type, const unsigned char *m, unsigned int m_length,\n               const unsigned char *sigbuf, unsigned int siglen, RSA *rsa);\n\n/*\n * The following 2 function sign and verify a ASN1_OCTET_STRING object inside\n * PKCS#1 padded RSA encryption\n */\nint RSA_sign_ASN1_OCTET_STRING(int type,\n                               const unsigned char *m, unsigned int m_length,\n                               unsigned char *sigret, unsigned int *siglen,\n                               RSA *rsa);\nint RSA_verify_ASN1_OCTET_STRING(int type, const unsigned char *m,\n                                 unsigned int m_length, unsigned char *sigbuf,\n                                 unsigned int siglen, RSA *rsa);\n\nint RSA_blinding_on(RSA *rsa, BN_CTX *ctx);\nvoid RSA_blinding_off(RSA *rsa);\nBN_BLINDING *RSA_setup_blinding(RSA *rsa, BN_CTX *ctx);\n\nint RSA_padding_add_PKCS1_type_1(unsigned char *to, int tlen,\n                                 const unsigned char *f, int fl);\nint RSA_padding_check_PKCS1_type_1(unsigned char *to, int tlen,\n                                   const unsigned char *f, int fl,\n                                   int rsa_len);\nint RSA_padding_add_PKCS1_type_2(unsigned char *to, int tlen,\n                                 const unsigned char *f, int fl);\nint RSA_padding_check_PKCS1_type_2(unsigned char *to, int tlen,\n                                   const unsigned char *f, int fl,\n                                   int rsa_len);\nint PKCS1_MGF1(unsigned char *mask, long len, const unsigned char *seed,\n               long seedlen, const EVP_MD *dgst);\nint RSA_padding_add_PKCS1_OAEP(unsigned char *to, int tlen,\n                               const unsigned char *f, int fl,\n                               const unsigned char *p, int pl);\nint RSA_padding_check_PKCS1_OAEP(unsigned char *to, int tlen,\n                                 const unsigned char *f, int fl, int rsa_len,\n                                 const unsigned char *p, int pl);\nint RSA_padding_add_SSLv23(unsigned char *to, int tlen,\n                           const unsigned char *f, int fl);\nint RSA_padding_check_SSLv23(unsigned char *to, int tlen,\n                             const unsigned char *f, int fl, int rsa_len);\nint RSA_padding_add_none(unsigned char *to, int tlen, const unsigned char *f,\n                         int fl);\nint RSA_padding_check_none(unsigned char *to, int tlen,\n                           const unsigned char *f, int fl, int rsa_len);\nint RSA_padding_add_X931(unsigned char *to, int tlen, const unsigned char *f,\n                         int fl);\nint RSA_padding_check_X931(unsigned char *to, int tlen,\n                           const unsigned char *f, int fl, int rsa_len);\nint RSA_X931_hash_id(int nid);\n\nint RSA_verify_PKCS1_PSS(RSA *rsa, const unsigned char *mHash,\n                         const EVP_MD *Hash, const unsigned char *EM,\n                         int sLen);\nint RSA_padding_add_PKCS1_PSS(RSA *rsa, unsigned char *EM,\n                              const unsigned char *mHash, const EVP_MD *Hash,\n                              int sLen);\n\nint RSA_verify_PKCS1_PSS_mgf1(RSA *rsa, const unsigned char *mHash,\n                              const EVP_MD *Hash, const EVP_MD *mgf1Hash,\n                              const unsigned char *EM, int sLen);\n\nint RSA_padding_add_PKCS1_PSS_mgf1(RSA *rsa, unsigned char *EM,\n                                   const unsigned char *mHash,\n                                   const EVP_MD *Hash, const EVP_MD *mgf1Hash,\n                                   int sLen);\n\nint RSA_get_ex_new_index(long argl, void *argp, CRYPTO_EX_new *new_func,\n                         CRYPTO_EX_dup *dup_func, CRYPTO_EX_free *free_func);\nint RSA_set_ex_data(RSA *r, int idx, void *arg);\nvoid *RSA_get_ex_data(const RSA *r, int idx);\n\nRSA *RSAPublicKey_dup(RSA *rsa);\nRSA *RSAPrivateKey_dup(RSA *rsa);\n\n/*\n * If this flag is set the RSA method is FIPS compliant and can be used in\n * FIPS mode. This is set in the validated module method. If an application\n * sets this flag in its own methods it is its responsibility to ensure the\n * result is compliant.\n */\n\n# define RSA_FLAG_FIPS_METHOD                    0x0400\n\n/*\n * If this flag is set the operations normally disabled in FIPS mode are\n * permitted it is then the applications responsibility to ensure that the\n * usage is compliant.\n */\n\n# define RSA_FLAG_NON_FIPS_ALLOW                 0x0400\n/*\n * Application has decided PRNG is good enough to generate a key: don't\n * check.\n */\n# define RSA_FLAG_CHECKED                        0x0800\n\n/* BEGIN ERROR CODES */\n/*\n * The following lines are auto generated by the script mkerr.pl. Any changes\n * made after this point may be overwritten when the script is next run.\n */\nvoid ERR_load_RSA_strings(void);\n\n/* Error codes for the RSA functions. */\n\n/* Function codes. */\n# define RSA_F_CHECK_PADDING_MD                           140\n# define RSA_F_DO_RSA_PRINT                               146\n# define RSA_F_INT_RSA_VERIFY                             145\n# define RSA_F_MEMORY_LOCK                                100\n# define RSA_F_OLD_RSA_PRIV_DECODE                        147\n# define RSA_F_PKEY_RSA_CTRL                              143\n# define RSA_F_PKEY_RSA_CTRL_STR                          144\n# define RSA_F_PKEY_RSA_SIGN                              142\n# define RSA_F_PKEY_RSA_VERIFY                            154\n# define RSA_F_PKEY_RSA_VERIFYRECOVER                     141\n# define RSA_F_RSA_BUILTIN_KEYGEN                         129\n# define RSA_F_RSA_CHECK_KEY                              123\n# define RSA_F_RSA_EAY_PRIVATE_DECRYPT                    101\n# define RSA_F_RSA_EAY_PRIVATE_ENCRYPT                    102\n# define RSA_F_RSA_EAY_PUBLIC_DECRYPT                     103\n# define RSA_F_RSA_EAY_PUBLIC_ENCRYPT                     104\n# define RSA_F_RSA_GENERATE_KEY                           105\n# define RSA_F_RSA_GENERATE_KEY_EX                        155\n# define RSA_F_RSA_ITEM_VERIFY                            156\n# define RSA_F_RSA_MEMORY_LOCK                            130\n# define RSA_F_RSA_NEW_METHOD                             106\n# define RSA_F_RSA_NULL                                   124\n# define RSA_F_RSA_NULL_MOD_EXP                           131\n# define RSA_F_RSA_NULL_PRIVATE_DECRYPT                   132\n# define RSA_F_RSA_NULL_PRIVATE_ENCRYPT                   133\n# define RSA_F_RSA_NULL_PUBLIC_DECRYPT                    134\n# define RSA_F_RSA_NULL_PUBLIC_ENCRYPT                    135\n# define RSA_F_RSA_PADDING_ADD_NONE                       107\n# define RSA_F_RSA_PADDING_ADD_PKCS1_OAEP                 121\n# define RSA_F_RSA_PADDING_ADD_PKCS1_PSS                  125\n# define RSA_F_RSA_PADDING_ADD_PKCS1_PSS_MGF1             148\n# define RSA_F_RSA_PADDING_ADD_PKCS1_TYPE_1               108\n# define RSA_F_RSA_PADDING_ADD_PKCS1_TYPE_2               109\n# define RSA_F_RSA_PADDING_ADD_SSLV23                     110\n# define RSA_F_RSA_PADDING_ADD_X931                       127\n# define RSA_F_RSA_PADDING_CHECK_NONE                     111\n# define RSA_F_RSA_PADDING_CHECK_PKCS1_OAEP               122\n# define RSA_F_RSA_PADDING_CHECK_PKCS1_TYPE_1             112\n# define RSA_F_RSA_PADDING_CHECK_PKCS1_TYPE_2             113\n# define RSA_F_RSA_PADDING_CHECK_SSLV23                   114\n# define RSA_F_RSA_PADDING_CHECK_X931                     128\n# define RSA_F_RSA_PRINT                                  115\n# define RSA_F_RSA_PRINT_FP                               116\n# define RSA_F_RSA_PRIVATE_DECRYPT                        150\n# define RSA_F_RSA_PRIVATE_ENCRYPT                        151\n# define RSA_F_RSA_PRIV_DECODE                            137\n# define RSA_F_RSA_PRIV_ENCODE                            138\n# define RSA_F_RSA_PUBLIC_DECRYPT                         152\n# define RSA_F_RSA_PUBLIC_ENCRYPT                         153\n# define RSA_F_RSA_PUB_DECODE                             139\n# define RSA_F_RSA_SETUP_BLINDING                         136\n# define RSA_F_RSA_SIGN                                   117\n# define RSA_F_RSA_SIGN_ASN1_OCTET_STRING                 118\n# define RSA_F_RSA_VERIFY                                 119\n# define RSA_F_RSA_VERIFY_ASN1_OCTET_STRING               120\n# define RSA_F_RSA_VERIFY_PKCS1_PSS                       126\n# define RSA_F_RSA_VERIFY_PKCS1_PSS_MGF1                  149\n\n/* Reason codes. */\n# define RSA_R_ALGORITHM_MISMATCH                         100\n# define RSA_R_BAD_E_VALUE                                101\n# define RSA_R_BAD_FIXED_HEADER_DECRYPT                   102\n# define RSA_R_BAD_PAD_BYTE_COUNT                         103\n# define RSA_R_BAD_SIGNATURE                              104\n# define RSA_R_BLOCK_TYPE_IS_NOT_01                       106\n# define RSA_R_BLOCK_TYPE_IS_NOT_02                       107\n# define RSA_R_DATA_GREATER_THAN_MOD_LEN                  108\n# define RSA_R_DATA_TOO_LARGE                             109\n# define RSA_R_DATA_TOO_LARGE_FOR_KEY_SIZE                110\n# define RSA_R_DATA_TOO_LARGE_FOR_MODULUS                 132\n# define RSA_R_DATA_TOO_SMALL                             111\n# define RSA_R_DATA_TOO_SMALL_FOR_KEY_SIZE                122\n# define RSA_R_DIGEST_TOO_BIG_FOR_RSA_KEY                 112\n# define RSA_R_DMP1_NOT_CONGRUENT_TO_D                    124\n# define RSA_R_DMQ1_NOT_CONGRUENT_TO_D                    125\n# define RSA_R_D_E_NOT_CONGRUENT_TO_1                     123\n# define RSA_R_FIRST_OCTET_INVALID                        133\n# define RSA_R_ILLEGAL_OR_UNSUPPORTED_PADDING_MODE        144\n# define RSA_R_INVALID_DIGEST_LENGTH                      143\n# define RSA_R_INVALID_HEADER                             137\n# define RSA_R_INVALID_KEYBITS                            145\n# define RSA_R_INVALID_MESSAGE_LENGTH                     131\n# define RSA_R_INVALID_MGF1_MD                            156\n# define RSA_R_INVALID_PADDING                            138\n# define RSA_R_INVALID_PADDING_MODE                       141\n# define RSA_R_INVALID_PSS_PARAMETERS                     149\n# define RSA_R_INVALID_PSS_SALTLEN                        146\n# define RSA_R_INVALID_SALT_LENGTH                        150\n# define RSA_R_INVALID_TRAILER                            139\n# define RSA_R_INVALID_X931_DIGEST                        142\n# define RSA_R_IQMP_NOT_INVERSE_OF_Q                      126\n# define RSA_R_KEY_SIZE_TOO_SMALL                         120\n# define RSA_R_LAST_OCTET_INVALID                         134\n# define RSA_R_MODULUS_TOO_LARGE                          105\n# define RSA_R_NON_FIPS_RSA_METHOD                        157\n# define RSA_R_NO_PUBLIC_EXPONENT                         140\n# define RSA_R_NULL_BEFORE_BLOCK_MISSING                  113\n# define RSA_R_N_DOES_NOT_EQUAL_P_Q                       127\n# define RSA_R_OAEP_DECODING_ERROR                        121\n# define RSA_R_OPERATION_NOT_ALLOWED_IN_FIPS_MODE         158\n# define RSA_R_OPERATION_NOT_SUPPORTED_FOR_THIS_KEYTYPE   148\n# define RSA_R_PADDING_CHECK_FAILED                       114\n# define RSA_R_PKCS_DECODING_ERROR                        159\n# define RSA_R_P_NOT_PRIME                                128\n# define RSA_R_Q_NOT_PRIME                                129\n# define RSA_R_RSA_OPERATIONS_NOT_SUPPORTED               130\n# define RSA_R_SLEN_CHECK_FAILED                          136\n# define RSA_R_SLEN_RECOVERY_FAILED                       135\n# define RSA_R_SSLV3_ROLLBACK_ATTACK                      115\n# define RSA_R_THE_ASN1_OBJECT_IDENTIFIER_IS_NOT_KNOWN_FOR_THIS_MD 116\n# define RSA_R_UNKNOWN_ALGORITHM_TYPE                     117\n# define RSA_R_UNKNOWN_MASK_DIGEST                        151\n# define RSA_R_UNKNOWN_PADDING_TYPE                       118\n# define RSA_R_UNKNOWN_PSS_DIGEST                         152\n# define RSA_R_UNSUPPORTED_MASK_ALGORITHM                 153\n# define RSA_R_UNSUPPORTED_MASK_PARAMETER                 154\n# define RSA_R_UNSUPPORTED_SIGNATURE_TYPE                 155\n# define RSA_R_VALUE_MISSING                              147\n# define RSA_R_WRONG_SIGNATURE_LENGTH                     119\n\n#ifdef  __cplusplus\n}\n#endif\n#endif\n"
  },
  {
    "path": "Pods/OpenSSL-Universal/include-ios/openssl/safestack.h",
    "content": "/* ====================================================================\n * Copyright (c) 1999 The OpenSSL Project.  All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n *\n * 1. Redistributions of source code must retain the above copyright\n *    notice, this list of conditions and the following disclaimer.\n *\n * 2. Redistributions in binary form must reproduce the above copyright\n *    notice, this list of conditions and the following disclaimer in\n *    the documentation and/or other materials provided with the\n *    distribution.\n *\n * 3. All advertising materials mentioning features or use of this\n *    software must display the following acknowledgment:\n *    \"This product includes software developed by the OpenSSL Project\n *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)\"\n *\n * 4. The names \"OpenSSL Toolkit\" and \"OpenSSL Project\" must not be used to\n *    endorse or promote products derived from this software without\n *    prior written permission. For written permission, please contact\n *    openssl-core@openssl.org.\n *\n * 5. Products derived from this software may not be called \"OpenSSL\"\n *    nor may \"OpenSSL\" appear in their names without prior written\n *    permission of the OpenSSL Project.\n *\n * 6. Redistributions of any form whatsoever must retain the following\n *    acknowledgment:\n *    \"This product includes software developed by the OpenSSL Project\n *    for use in the OpenSSL Toolkit (http://www.openssl.org/)\"\n *\n * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY\n * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\n * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR\n * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,\n * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED\n * OF THE POSSIBILITY OF SUCH DAMAGE.\n * ====================================================================\n *\n * This product includes cryptographic software written by Eric Young\n * (eay@cryptsoft.com).  This product includes software written by Tim\n * Hudson (tjh@cryptsoft.com).\n *\n */\n\n#ifndef HEADER_SAFESTACK_H\n# define HEADER_SAFESTACK_H\n\n# include <openssl/stack.h>\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n# ifndef CHECKED_PTR_OF\n#  define CHECKED_PTR_OF(type, p) \\\n    ((void*) (1 ? p : (type*)0))\n# endif\n\n/*\n * In C++ we get problems because an explicit cast is needed from (void *) we\n * use CHECKED_STACK_OF to ensure the correct type is passed in the macros\n * below.\n */\n\n# define CHECKED_STACK_OF(type, p) \\\n    ((_STACK*) (1 ? p : (STACK_OF(type)*)0))\n\n# define CHECKED_SK_FREE_FUNC(type, p) \\\n    ((void (*)(void *)) ((1 ? p : (void (*)(type *))0)))\n\n# define CHECKED_SK_FREE_FUNC2(type, p) \\\n    ((void (*)(void *)) ((1 ? p : (void (*)(type))0)))\n\n# define CHECKED_SK_CMP_FUNC(type, p) \\\n    ((int (*)(const void *, const void *)) \\\n        ((1 ? p : (int (*)(const type * const *, const type * const *))0)))\n\n# define STACK_OF(type) struct stack_st_##type\n# define PREDECLARE_STACK_OF(type) STACK_OF(type);\n\n# define DECLARE_STACK_OF(type) \\\nSTACK_OF(type) \\\n    { \\\n    _STACK stack; \\\n    };\n# define DECLARE_SPECIAL_STACK_OF(type, type2) \\\nSTACK_OF(type) \\\n    { \\\n    _STACK stack; \\\n    };\n\n/* nada (obsolete in new safestack approach)*/\n# define IMPLEMENT_STACK_OF(type)\n\n/*-\n * Strings are special: normally an lhash entry will point to a single\n * (somewhat) mutable object. In the case of strings:\n *\n * a) Instead of a single char, there is an array of chars, NUL-terminated.\n * b) The string may have be immutable.\n *\n * So, they need their own declarations. Especially important for\n * type-checking tools, such as Deputy.\n *\n * In practice, however, it appears to be hard to have a const\n * string. For now, I'm settling for dealing with the fact it is a\n * string at all.\n */\ntypedef char *OPENSSL_STRING;\n\ntypedef const char *OPENSSL_CSTRING;\n\n/*\n * Confusingly, LHASH_OF(STRING) deals with char ** throughout, but\n * STACK_OF(STRING) is really more like STACK_OF(char), only, as mentioned\n * above, instead of a single char each entry is a NUL-terminated array of\n * chars. So, we have to implement STRING specially for STACK_OF. This is\n * dealt with in the autogenerated macros below.\n */\n\nDECLARE_SPECIAL_STACK_OF(OPENSSL_STRING, char)\n\n/*\n * Similarly, we sometimes use a block of characters, NOT nul-terminated.\n * These should also be distinguished from \"normal\" stacks.\n */\ntypedef void *OPENSSL_BLOCK;\nDECLARE_SPECIAL_STACK_OF(OPENSSL_BLOCK, void)\n\n/*\n * SKM_sk_... stack macros are internal to safestack.h: never use them\n * directly, use sk_<type>_... instead\n */\n# define SKM_sk_new(type, cmp) \\\n        ((STACK_OF(type) *)sk_new(CHECKED_SK_CMP_FUNC(type, cmp)))\n# define SKM_sk_new_null(type) \\\n        ((STACK_OF(type) *)sk_new_null())\n# define SKM_sk_free(type, st) \\\n        sk_free(CHECKED_STACK_OF(type, st))\n# define SKM_sk_num(type, st) \\\n        sk_num(CHECKED_STACK_OF(type, st))\n# define SKM_sk_value(type, st,i) \\\n        ((type *)sk_value(CHECKED_STACK_OF(type, st), i))\n# define SKM_sk_set(type, st,i,val) \\\n        sk_set(CHECKED_STACK_OF(type, st), i, CHECKED_PTR_OF(type, val))\n# define SKM_sk_zero(type, st) \\\n        sk_zero(CHECKED_STACK_OF(type, st))\n# define SKM_sk_push(type, st, val) \\\n        sk_push(CHECKED_STACK_OF(type, st), CHECKED_PTR_OF(type, val))\n# define SKM_sk_unshift(type, st, val) \\\n        sk_unshift(CHECKED_STACK_OF(type, st), CHECKED_PTR_OF(type, val))\n# define SKM_sk_find(type, st, val) \\\n        sk_find(CHECKED_STACK_OF(type, st), CHECKED_PTR_OF(type, val))\n# define SKM_sk_find_ex(type, st, val) \\\n        sk_find_ex(CHECKED_STACK_OF(type, st), \\\n                   CHECKED_PTR_OF(type, val))\n# define SKM_sk_delete(type, st, i) \\\n        (type *)sk_delete(CHECKED_STACK_OF(type, st), i)\n# define SKM_sk_delete_ptr(type, st, ptr) \\\n        (type *)sk_delete_ptr(CHECKED_STACK_OF(type, st), CHECKED_PTR_OF(type, ptr))\n# define SKM_sk_insert(type, st,val, i) \\\n        sk_insert(CHECKED_STACK_OF(type, st), CHECKED_PTR_OF(type, val), i)\n# define SKM_sk_set_cmp_func(type, st, cmp) \\\n        ((int (*)(const type * const *,const type * const *)) \\\n        sk_set_cmp_func(CHECKED_STACK_OF(type, st), CHECKED_SK_CMP_FUNC(type, cmp)))\n# define SKM_sk_dup(type, st) \\\n        (STACK_OF(type) *)sk_dup(CHECKED_STACK_OF(type, st))\n# define SKM_sk_pop_free(type, st, free_func) \\\n        sk_pop_free(CHECKED_STACK_OF(type, st), CHECKED_SK_FREE_FUNC(type, free_func))\n# define SKM_sk_shift(type, st) \\\n        (type *)sk_shift(CHECKED_STACK_OF(type, st))\n# define SKM_sk_pop(type, st) \\\n        (type *)sk_pop(CHECKED_STACK_OF(type, st))\n# define SKM_sk_sort(type, st) \\\n        sk_sort(CHECKED_STACK_OF(type, st))\n# define SKM_sk_is_sorted(type, st) \\\n        sk_is_sorted(CHECKED_STACK_OF(type, st))\n# define SKM_ASN1_SET_OF_d2i(type, st, pp, length, d2i_func, free_func, ex_tag, ex_class) \\\n  (STACK_OF(type) *)d2i_ASN1_SET( \\\n                                (STACK_OF(OPENSSL_BLOCK) **)CHECKED_PTR_OF(STACK_OF(type)*, st), \\\n                                pp, length, \\\n                                CHECKED_D2I_OF(type, d2i_func), \\\n                                CHECKED_SK_FREE_FUNC(type, free_func), \\\n                                ex_tag, ex_class)\n# define SKM_ASN1_SET_OF_i2d(type, st, pp, i2d_func, ex_tag, ex_class, is_set) \\\n  i2d_ASN1_SET((STACK_OF(OPENSSL_BLOCK) *)CHECKED_STACK_OF(type, st), pp, \\\n                                CHECKED_I2D_OF(type, i2d_func), \\\n                                ex_tag, ex_class, is_set)\n# define SKM_ASN1_seq_pack(type, st, i2d_func, buf, len) \\\n        ASN1_seq_pack(CHECKED_PTR_OF(STACK_OF(type), st), \\\n                        CHECKED_I2D_OF(type, i2d_func), buf, len)\n# define SKM_ASN1_seq_unpack(type, buf, len, d2i_func, free_func) \\\n        (STACK_OF(type) *)ASN1_seq_unpack(buf, len, CHECKED_D2I_OF(type, d2i_func), CHECKED_SK_FREE_FUNC(type, free_func))\n# define SKM_PKCS12_decrypt_d2i(type, algor, d2i_func, free_func, pass, passlen, oct, seq) \\\n        (STACK_OF(type) *)PKCS12_decrypt_d2i(algor, \\\n                                CHECKED_D2I_OF(type, d2i_func), \\\n                                CHECKED_SK_FREE_FUNC(type, free_func), \\\n                                pass, passlen, oct, seq)\n/*\n * This block of defines is updated by util/mkstack.pl, please do not touch!\n */\n# define sk_ACCESS_DESCRIPTION_new(cmp) SKM_sk_new(ACCESS_DESCRIPTION, (cmp))\n# define sk_ACCESS_DESCRIPTION_new_null() SKM_sk_new_null(ACCESS_DESCRIPTION)\n# define sk_ACCESS_DESCRIPTION_free(st) SKM_sk_free(ACCESS_DESCRIPTION, (st))\n# define sk_ACCESS_DESCRIPTION_num(st) SKM_sk_num(ACCESS_DESCRIPTION, (st))\n# define sk_ACCESS_DESCRIPTION_value(st, i) SKM_sk_value(ACCESS_DESCRIPTION, (st), (i))\n# define sk_ACCESS_DESCRIPTION_set(st, i, val) SKM_sk_set(ACCESS_DESCRIPTION, (st), (i), (val))\n# define sk_ACCESS_DESCRIPTION_zero(st) SKM_sk_zero(ACCESS_DESCRIPTION, (st))\n# define sk_ACCESS_DESCRIPTION_push(st, val) SKM_sk_push(ACCESS_DESCRIPTION, (st), (val))\n# define sk_ACCESS_DESCRIPTION_unshift(st, val) SKM_sk_unshift(ACCESS_DESCRIPTION, (st), (val))\n# define sk_ACCESS_DESCRIPTION_find(st, val) SKM_sk_find(ACCESS_DESCRIPTION, (st), (val))\n# define sk_ACCESS_DESCRIPTION_find_ex(st, val) SKM_sk_find_ex(ACCESS_DESCRIPTION, (st), (val))\n# define sk_ACCESS_DESCRIPTION_delete(st, i) SKM_sk_delete(ACCESS_DESCRIPTION, (st), (i))\n# define sk_ACCESS_DESCRIPTION_delete_ptr(st, ptr) SKM_sk_delete_ptr(ACCESS_DESCRIPTION, (st), (ptr))\n# define sk_ACCESS_DESCRIPTION_insert(st, val, i) SKM_sk_insert(ACCESS_DESCRIPTION, (st), (val), (i))\n# define sk_ACCESS_DESCRIPTION_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(ACCESS_DESCRIPTION, (st), (cmp))\n# define sk_ACCESS_DESCRIPTION_dup(st) SKM_sk_dup(ACCESS_DESCRIPTION, st)\n# define sk_ACCESS_DESCRIPTION_pop_free(st, free_func) SKM_sk_pop_free(ACCESS_DESCRIPTION, (st), (free_func))\n# define sk_ACCESS_DESCRIPTION_shift(st) SKM_sk_shift(ACCESS_DESCRIPTION, (st))\n# define sk_ACCESS_DESCRIPTION_pop(st) SKM_sk_pop(ACCESS_DESCRIPTION, (st))\n# define sk_ACCESS_DESCRIPTION_sort(st) SKM_sk_sort(ACCESS_DESCRIPTION, (st))\n# define sk_ACCESS_DESCRIPTION_is_sorted(st) SKM_sk_is_sorted(ACCESS_DESCRIPTION, (st))\n# define sk_ASIdOrRange_new(cmp) SKM_sk_new(ASIdOrRange, (cmp))\n# define sk_ASIdOrRange_new_null() SKM_sk_new_null(ASIdOrRange)\n# define sk_ASIdOrRange_free(st) SKM_sk_free(ASIdOrRange, (st))\n# define sk_ASIdOrRange_num(st) SKM_sk_num(ASIdOrRange, (st))\n# define sk_ASIdOrRange_value(st, i) SKM_sk_value(ASIdOrRange, (st), (i))\n# define sk_ASIdOrRange_set(st, i, val) SKM_sk_set(ASIdOrRange, (st), (i), (val))\n# define sk_ASIdOrRange_zero(st) SKM_sk_zero(ASIdOrRange, (st))\n# define sk_ASIdOrRange_push(st, val) SKM_sk_push(ASIdOrRange, (st), (val))\n# define sk_ASIdOrRange_unshift(st, val) SKM_sk_unshift(ASIdOrRange, (st), (val))\n# define sk_ASIdOrRange_find(st, val) SKM_sk_find(ASIdOrRange, (st), (val))\n# define sk_ASIdOrRange_find_ex(st, val) SKM_sk_find_ex(ASIdOrRange, (st), (val))\n# define sk_ASIdOrRange_delete(st, i) SKM_sk_delete(ASIdOrRange, (st), (i))\n# define sk_ASIdOrRange_delete_ptr(st, ptr) SKM_sk_delete_ptr(ASIdOrRange, (st), (ptr))\n# define sk_ASIdOrRange_insert(st, val, i) SKM_sk_insert(ASIdOrRange, (st), (val), (i))\n# define sk_ASIdOrRange_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(ASIdOrRange, (st), (cmp))\n# define sk_ASIdOrRange_dup(st) SKM_sk_dup(ASIdOrRange, st)\n# define sk_ASIdOrRange_pop_free(st, free_func) SKM_sk_pop_free(ASIdOrRange, (st), (free_func))\n# define sk_ASIdOrRange_shift(st) SKM_sk_shift(ASIdOrRange, (st))\n# define sk_ASIdOrRange_pop(st) SKM_sk_pop(ASIdOrRange, (st))\n# define sk_ASIdOrRange_sort(st) SKM_sk_sort(ASIdOrRange, (st))\n# define sk_ASIdOrRange_is_sorted(st) SKM_sk_is_sorted(ASIdOrRange, (st))\n# define sk_ASN1_GENERALSTRING_new(cmp) SKM_sk_new(ASN1_GENERALSTRING, (cmp))\n# define sk_ASN1_GENERALSTRING_new_null() SKM_sk_new_null(ASN1_GENERALSTRING)\n# define sk_ASN1_GENERALSTRING_free(st) SKM_sk_free(ASN1_GENERALSTRING, (st))\n# define sk_ASN1_GENERALSTRING_num(st) SKM_sk_num(ASN1_GENERALSTRING, (st))\n# define sk_ASN1_GENERALSTRING_value(st, i) SKM_sk_value(ASN1_GENERALSTRING, (st), (i))\n# define sk_ASN1_GENERALSTRING_set(st, i, val) SKM_sk_set(ASN1_GENERALSTRING, (st), (i), (val))\n# define sk_ASN1_GENERALSTRING_zero(st) SKM_sk_zero(ASN1_GENERALSTRING, (st))\n# define sk_ASN1_GENERALSTRING_push(st, val) SKM_sk_push(ASN1_GENERALSTRING, (st), (val))\n# define sk_ASN1_GENERALSTRING_unshift(st, val) SKM_sk_unshift(ASN1_GENERALSTRING, (st), (val))\n# define sk_ASN1_GENERALSTRING_find(st, val) SKM_sk_find(ASN1_GENERALSTRING, (st), (val))\n# define sk_ASN1_GENERALSTRING_find_ex(st, val) SKM_sk_find_ex(ASN1_GENERALSTRING, (st), (val))\n# define sk_ASN1_GENERALSTRING_delete(st, i) SKM_sk_delete(ASN1_GENERALSTRING, (st), (i))\n# define sk_ASN1_GENERALSTRING_delete_ptr(st, ptr) SKM_sk_delete_ptr(ASN1_GENERALSTRING, (st), (ptr))\n# define sk_ASN1_GENERALSTRING_insert(st, val, i) SKM_sk_insert(ASN1_GENERALSTRING, (st), (val), (i))\n# define sk_ASN1_GENERALSTRING_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(ASN1_GENERALSTRING, (st), (cmp))\n# define sk_ASN1_GENERALSTRING_dup(st) SKM_sk_dup(ASN1_GENERALSTRING, st)\n# define sk_ASN1_GENERALSTRING_pop_free(st, free_func) SKM_sk_pop_free(ASN1_GENERALSTRING, (st), (free_func))\n# define sk_ASN1_GENERALSTRING_shift(st) SKM_sk_shift(ASN1_GENERALSTRING, (st))\n# define sk_ASN1_GENERALSTRING_pop(st) SKM_sk_pop(ASN1_GENERALSTRING, (st))\n# define sk_ASN1_GENERALSTRING_sort(st) SKM_sk_sort(ASN1_GENERALSTRING, (st))\n# define sk_ASN1_GENERALSTRING_is_sorted(st) SKM_sk_is_sorted(ASN1_GENERALSTRING, (st))\n# define sk_ASN1_INTEGER_new(cmp) SKM_sk_new(ASN1_INTEGER, (cmp))\n# define sk_ASN1_INTEGER_new_null() SKM_sk_new_null(ASN1_INTEGER)\n# define sk_ASN1_INTEGER_free(st) SKM_sk_free(ASN1_INTEGER, (st))\n# define sk_ASN1_INTEGER_num(st) SKM_sk_num(ASN1_INTEGER, (st))\n# define sk_ASN1_INTEGER_value(st, i) SKM_sk_value(ASN1_INTEGER, (st), (i))\n# define sk_ASN1_INTEGER_set(st, i, val) SKM_sk_set(ASN1_INTEGER, (st), (i), (val))\n# define sk_ASN1_INTEGER_zero(st) SKM_sk_zero(ASN1_INTEGER, (st))\n# define sk_ASN1_INTEGER_push(st, val) SKM_sk_push(ASN1_INTEGER, (st), (val))\n# define sk_ASN1_INTEGER_unshift(st, val) SKM_sk_unshift(ASN1_INTEGER, (st), (val))\n# define sk_ASN1_INTEGER_find(st, val) SKM_sk_find(ASN1_INTEGER, (st), (val))\n# define sk_ASN1_INTEGER_find_ex(st, val) SKM_sk_find_ex(ASN1_INTEGER, (st), (val))\n# define sk_ASN1_INTEGER_delete(st, i) SKM_sk_delete(ASN1_INTEGER, (st), (i))\n# define sk_ASN1_INTEGER_delete_ptr(st, ptr) SKM_sk_delete_ptr(ASN1_INTEGER, (st), (ptr))\n# define sk_ASN1_INTEGER_insert(st, val, i) SKM_sk_insert(ASN1_INTEGER, (st), (val), (i))\n# define sk_ASN1_INTEGER_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(ASN1_INTEGER, (st), (cmp))\n# define sk_ASN1_INTEGER_dup(st) SKM_sk_dup(ASN1_INTEGER, st)\n# define sk_ASN1_INTEGER_pop_free(st, free_func) SKM_sk_pop_free(ASN1_INTEGER, (st), (free_func))\n# define sk_ASN1_INTEGER_shift(st) SKM_sk_shift(ASN1_INTEGER, (st))\n# define sk_ASN1_INTEGER_pop(st) SKM_sk_pop(ASN1_INTEGER, (st))\n# define sk_ASN1_INTEGER_sort(st) SKM_sk_sort(ASN1_INTEGER, (st))\n# define sk_ASN1_INTEGER_is_sorted(st) SKM_sk_is_sorted(ASN1_INTEGER, (st))\n# define sk_ASN1_OBJECT_new(cmp) SKM_sk_new(ASN1_OBJECT, (cmp))\n# define sk_ASN1_OBJECT_new_null() SKM_sk_new_null(ASN1_OBJECT)\n# define sk_ASN1_OBJECT_free(st) SKM_sk_free(ASN1_OBJECT, (st))\n# define sk_ASN1_OBJECT_num(st) SKM_sk_num(ASN1_OBJECT, (st))\n# define sk_ASN1_OBJECT_value(st, i) SKM_sk_value(ASN1_OBJECT, (st), (i))\n# define sk_ASN1_OBJECT_set(st, i, val) SKM_sk_set(ASN1_OBJECT, (st), (i), (val))\n# define sk_ASN1_OBJECT_zero(st) SKM_sk_zero(ASN1_OBJECT, (st))\n# define sk_ASN1_OBJECT_push(st, val) SKM_sk_push(ASN1_OBJECT, (st), (val))\n# define sk_ASN1_OBJECT_unshift(st, val) SKM_sk_unshift(ASN1_OBJECT, (st), (val))\n# define sk_ASN1_OBJECT_find(st, val) SKM_sk_find(ASN1_OBJECT, (st), (val))\n# define sk_ASN1_OBJECT_find_ex(st, val) SKM_sk_find_ex(ASN1_OBJECT, (st), (val))\n# define sk_ASN1_OBJECT_delete(st, i) SKM_sk_delete(ASN1_OBJECT, (st), (i))\n# define sk_ASN1_OBJECT_delete_ptr(st, ptr) SKM_sk_delete_ptr(ASN1_OBJECT, (st), (ptr))\n# define sk_ASN1_OBJECT_insert(st, val, i) SKM_sk_insert(ASN1_OBJECT, (st), (val), (i))\n# define sk_ASN1_OBJECT_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(ASN1_OBJECT, (st), (cmp))\n# define sk_ASN1_OBJECT_dup(st) SKM_sk_dup(ASN1_OBJECT, st)\n# define sk_ASN1_OBJECT_pop_free(st, free_func) SKM_sk_pop_free(ASN1_OBJECT, (st), (free_func))\n# define sk_ASN1_OBJECT_shift(st) SKM_sk_shift(ASN1_OBJECT, (st))\n# define sk_ASN1_OBJECT_pop(st) SKM_sk_pop(ASN1_OBJECT, (st))\n# define sk_ASN1_OBJECT_sort(st) SKM_sk_sort(ASN1_OBJECT, (st))\n# define sk_ASN1_OBJECT_is_sorted(st) SKM_sk_is_sorted(ASN1_OBJECT, (st))\n# define sk_ASN1_STRING_TABLE_new(cmp) SKM_sk_new(ASN1_STRING_TABLE, (cmp))\n# define sk_ASN1_STRING_TABLE_new_null() SKM_sk_new_null(ASN1_STRING_TABLE)\n# define sk_ASN1_STRING_TABLE_free(st) SKM_sk_free(ASN1_STRING_TABLE, (st))\n# define sk_ASN1_STRING_TABLE_num(st) SKM_sk_num(ASN1_STRING_TABLE, (st))\n# define sk_ASN1_STRING_TABLE_value(st, i) SKM_sk_value(ASN1_STRING_TABLE, (st), (i))\n# define sk_ASN1_STRING_TABLE_set(st, i, val) SKM_sk_set(ASN1_STRING_TABLE, (st), (i), (val))\n# define sk_ASN1_STRING_TABLE_zero(st) SKM_sk_zero(ASN1_STRING_TABLE, (st))\n# define sk_ASN1_STRING_TABLE_push(st, val) SKM_sk_push(ASN1_STRING_TABLE, (st), (val))\n# define sk_ASN1_STRING_TABLE_unshift(st, val) SKM_sk_unshift(ASN1_STRING_TABLE, (st), (val))\n# define sk_ASN1_STRING_TABLE_find(st, val) SKM_sk_find(ASN1_STRING_TABLE, (st), (val))\n# define sk_ASN1_STRING_TABLE_find_ex(st, val) SKM_sk_find_ex(ASN1_STRING_TABLE, (st), (val))\n# define sk_ASN1_STRING_TABLE_delete(st, i) SKM_sk_delete(ASN1_STRING_TABLE, (st), (i))\n# define sk_ASN1_STRING_TABLE_delete_ptr(st, ptr) SKM_sk_delete_ptr(ASN1_STRING_TABLE, (st), (ptr))\n# define sk_ASN1_STRING_TABLE_insert(st, val, i) SKM_sk_insert(ASN1_STRING_TABLE, (st), (val), (i))\n# define sk_ASN1_STRING_TABLE_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(ASN1_STRING_TABLE, (st), (cmp))\n# define sk_ASN1_STRING_TABLE_dup(st) SKM_sk_dup(ASN1_STRING_TABLE, st)\n# define sk_ASN1_STRING_TABLE_pop_free(st, free_func) SKM_sk_pop_free(ASN1_STRING_TABLE, (st), (free_func))\n# define sk_ASN1_STRING_TABLE_shift(st) SKM_sk_shift(ASN1_STRING_TABLE, (st))\n# define sk_ASN1_STRING_TABLE_pop(st) SKM_sk_pop(ASN1_STRING_TABLE, (st))\n# define sk_ASN1_STRING_TABLE_sort(st) SKM_sk_sort(ASN1_STRING_TABLE, (st))\n# define sk_ASN1_STRING_TABLE_is_sorted(st) SKM_sk_is_sorted(ASN1_STRING_TABLE, (st))\n# define sk_ASN1_TYPE_new(cmp) SKM_sk_new(ASN1_TYPE, (cmp))\n# define sk_ASN1_TYPE_new_null() SKM_sk_new_null(ASN1_TYPE)\n# define sk_ASN1_TYPE_free(st) SKM_sk_free(ASN1_TYPE, (st))\n# define sk_ASN1_TYPE_num(st) SKM_sk_num(ASN1_TYPE, (st))\n# define sk_ASN1_TYPE_value(st, i) SKM_sk_value(ASN1_TYPE, (st), (i))\n# define sk_ASN1_TYPE_set(st, i, val) SKM_sk_set(ASN1_TYPE, (st), (i), (val))\n# define sk_ASN1_TYPE_zero(st) SKM_sk_zero(ASN1_TYPE, (st))\n# define sk_ASN1_TYPE_push(st, val) SKM_sk_push(ASN1_TYPE, (st), (val))\n# define sk_ASN1_TYPE_unshift(st, val) SKM_sk_unshift(ASN1_TYPE, (st), (val))\n# define sk_ASN1_TYPE_find(st, val) SKM_sk_find(ASN1_TYPE, (st), (val))\n# define sk_ASN1_TYPE_find_ex(st, val) SKM_sk_find_ex(ASN1_TYPE, (st), (val))\n# define sk_ASN1_TYPE_delete(st, i) SKM_sk_delete(ASN1_TYPE, (st), (i))\n# define sk_ASN1_TYPE_delete_ptr(st, ptr) SKM_sk_delete_ptr(ASN1_TYPE, (st), (ptr))\n# define sk_ASN1_TYPE_insert(st, val, i) SKM_sk_insert(ASN1_TYPE, (st), (val), (i))\n# define sk_ASN1_TYPE_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(ASN1_TYPE, (st), (cmp))\n# define sk_ASN1_TYPE_dup(st) SKM_sk_dup(ASN1_TYPE, st)\n# define sk_ASN1_TYPE_pop_free(st, free_func) SKM_sk_pop_free(ASN1_TYPE, (st), (free_func))\n# define sk_ASN1_TYPE_shift(st) SKM_sk_shift(ASN1_TYPE, (st))\n# define sk_ASN1_TYPE_pop(st) SKM_sk_pop(ASN1_TYPE, (st))\n# define sk_ASN1_TYPE_sort(st) SKM_sk_sort(ASN1_TYPE, (st))\n# define sk_ASN1_TYPE_is_sorted(st) SKM_sk_is_sorted(ASN1_TYPE, (st))\n# define sk_ASN1_UTF8STRING_new(cmp) SKM_sk_new(ASN1_UTF8STRING, (cmp))\n# define sk_ASN1_UTF8STRING_new_null() SKM_sk_new_null(ASN1_UTF8STRING)\n# define sk_ASN1_UTF8STRING_free(st) SKM_sk_free(ASN1_UTF8STRING, (st))\n# define sk_ASN1_UTF8STRING_num(st) SKM_sk_num(ASN1_UTF8STRING, (st))\n# define sk_ASN1_UTF8STRING_value(st, i) SKM_sk_value(ASN1_UTF8STRING, (st), (i))\n# define sk_ASN1_UTF8STRING_set(st, i, val) SKM_sk_set(ASN1_UTF8STRING, (st), (i), (val))\n# define sk_ASN1_UTF8STRING_zero(st) SKM_sk_zero(ASN1_UTF8STRING, (st))\n# define sk_ASN1_UTF8STRING_push(st, val) SKM_sk_push(ASN1_UTF8STRING, (st), (val))\n# define sk_ASN1_UTF8STRING_unshift(st, val) SKM_sk_unshift(ASN1_UTF8STRING, (st), (val))\n# define sk_ASN1_UTF8STRING_find(st, val) SKM_sk_find(ASN1_UTF8STRING, (st), (val))\n# define sk_ASN1_UTF8STRING_find_ex(st, val) SKM_sk_find_ex(ASN1_UTF8STRING, (st), (val))\n# define sk_ASN1_UTF8STRING_delete(st, i) SKM_sk_delete(ASN1_UTF8STRING, (st), (i))\n# define sk_ASN1_UTF8STRING_delete_ptr(st, ptr) SKM_sk_delete_ptr(ASN1_UTF8STRING, (st), (ptr))\n# define sk_ASN1_UTF8STRING_insert(st, val, i) SKM_sk_insert(ASN1_UTF8STRING, (st), (val), (i))\n# define sk_ASN1_UTF8STRING_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(ASN1_UTF8STRING, (st), (cmp))\n# define sk_ASN1_UTF8STRING_dup(st) SKM_sk_dup(ASN1_UTF8STRING, st)\n# define sk_ASN1_UTF8STRING_pop_free(st, free_func) SKM_sk_pop_free(ASN1_UTF8STRING, (st), (free_func))\n# define sk_ASN1_UTF8STRING_shift(st) SKM_sk_shift(ASN1_UTF8STRING, (st))\n# define sk_ASN1_UTF8STRING_pop(st) SKM_sk_pop(ASN1_UTF8STRING, (st))\n# define sk_ASN1_UTF8STRING_sort(st) SKM_sk_sort(ASN1_UTF8STRING, (st))\n# define sk_ASN1_UTF8STRING_is_sorted(st) SKM_sk_is_sorted(ASN1_UTF8STRING, (st))\n# define sk_ASN1_VALUE_new(cmp) SKM_sk_new(ASN1_VALUE, (cmp))\n# define sk_ASN1_VALUE_new_null() SKM_sk_new_null(ASN1_VALUE)\n# define sk_ASN1_VALUE_free(st) SKM_sk_free(ASN1_VALUE, (st))\n# define sk_ASN1_VALUE_num(st) SKM_sk_num(ASN1_VALUE, (st))\n# define sk_ASN1_VALUE_value(st, i) SKM_sk_value(ASN1_VALUE, (st), (i))\n# define sk_ASN1_VALUE_set(st, i, val) SKM_sk_set(ASN1_VALUE, (st), (i), (val))\n# define sk_ASN1_VALUE_zero(st) SKM_sk_zero(ASN1_VALUE, (st))\n# define sk_ASN1_VALUE_push(st, val) SKM_sk_push(ASN1_VALUE, (st), (val))\n# define sk_ASN1_VALUE_unshift(st, val) SKM_sk_unshift(ASN1_VALUE, (st), (val))\n# define sk_ASN1_VALUE_find(st, val) SKM_sk_find(ASN1_VALUE, (st), (val))\n# define sk_ASN1_VALUE_find_ex(st, val) SKM_sk_find_ex(ASN1_VALUE, (st), (val))\n# define sk_ASN1_VALUE_delete(st, i) SKM_sk_delete(ASN1_VALUE, (st), (i))\n# define sk_ASN1_VALUE_delete_ptr(st, ptr) SKM_sk_delete_ptr(ASN1_VALUE, (st), (ptr))\n# define sk_ASN1_VALUE_insert(st, val, i) SKM_sk_insert(ASN1_VALUE, (st), (val), (i))\n# define sk_ASN1_VALUE_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(ASN1_VALUE, (st), (cmp))\n# define sk_ASN1_VALUE_dup(st) SKM_sk_dup(ASN1_VALUE, st)\n# define sk_ASN1_VALUE_pop_free(st, free_func) SKM_sk_pop_free(ASN1_VALUE, (st), (free_func))\n# define sk_ASN1_VALUE_shift(st) SKM_sk_shift(ASN1_VALUE, (st))\n# define sk_ASN1_VALUE_pop(st) SKM_sk_pop(ASN1_VALUE, (st))\n# define sk_ASN1_VALUE_sort(st) SKM_sk_sort(ASN1_VALUE, (st))\n# define sk_ASN1_VALUE_is_sorted(st) SKM_sk_is_sorted(ASN1_VALUE, (st))\n# define sk_BIO_new(cmp) SKM_sk_new(BIO, (cmp))\n# define sk_BIO_new_null() SKM_sk_new_null(BIO)\n# define sk_BIO_free(st) SKM_sk_free(BIO, (st))\n# define sk_BIO_num(st) SKM_sk_num(BIO, (st))\n# define sk_BIO_value(st, i) SKM_sk_value(BIO, (st), (i))\n# define sk_BIO_set(st, i, val) SKM_sk_set(BIO, (st), (i), (val))\n# define sk_BIO_zero(st) SKM_sk_zero(BIO, (st))\n# define sk_BIO_push(st, val) SKM_sk_push(BIO, (st), (val))\n# define sk_BIO_unshift(st, val) SKM_sk_unshift(BIO, (st), (val))\n# define sk_BIO_find(st, val) SKM_sk_find(BIO, (st), (val))\n# define sk_BIO_find_ex(st, val) SKM_sk_find_ex(BIO, (st), (val))\n# define sk_BIO_delete(st, i) SKM_sk_delete(BIO, (st), (i))\n# define sk_BIO_delete_ptr(st, ptr) SKM_sk_delete_ptr(BIO, (st), (ptr))\n# define sk_BIO_insert(st, val, i) SKM_sk_insert(BIO, (st), (val), (i))\n# define sk_BIO_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(BIO, (st), (cmp))\n# define sk_BIO_dup(st) SKM_sk_dup(BIO, st)\n# define sk_BIO_pop_free(st, free_func) SKM_sk_pop_free(BIO, (st), (free_func))\n# define sk_BIO_shift(st) SKM_sk_shift(BIO, (st))\n# define sk_BIO_pop(st) SKM_sk_pop(BIO, (st))\n# define sk_BIO_sort(st) SKM_sk_sort(BIO, (st))\n# define sk_BIO_is_sorted(st) SKM_sk_is_sorted(BIO, (st))\n# define sk_BY_DIR_ENTRY_new(cmp) SKM_sk_new(BY_DIR_ENTRY, (cmp))\n# define sk_BY_DIR_ENTRY_new_null() SKM_sk_new_null(BY_DIR_ENTRY)\n# define sk_BY_DIR_ENTRY_free(st) SKM_sk_free(BY_DIR_ENTRY, (st))\n# define sk_BY_DIR_ENTRY_num(st) SKM_sk_num(BY_DIR_ENTRY, (st))\n# define sk_BY_DIR_ENTRY_value(st, i) SKM_sk_value(BY_DIR_ENTRY, (st), (i))\n# define sk_BY_DIR_ENTRY_set(st, i, val) SKM_sk_set(BY_DIR_ENTRY, (st), (i), (val))\n# define sk_BY_DIR_ENTRY_zero(st) SKM_sk_zero(BY_DIR_ENTRY, (st))\n# define sk_BY_DIR_ENTRY_push(st, val) SKM_sk_push(BY_DIR_ENTRY, (st), (val))\n# define sk_BY_DIR_ENTRY_unshift(st, val) SKM_sk_unshift(BY_DIR_ENTRY, (st), (val))\n# define sk_BY_DIR_ENTRY_find(st, val) SKM_sk_find(BY_DIR_ENTRY, (st), (val))\n# define sk_BY_DIR_ENTRY_find_ex(st, val) SKM_sk_find_ex(BY_DIR_ENTRY, (st), (val))\n# define sk_BY_DIR_ENTRY_delete(st, i) SKM_sk_delete(BY_DIR_ENTRY, (st), (i))\n# define sk_BY_DIR_ENTRY_delete_ptr(st, ptr) SKM_sk_delete_ptr(BY_DIR_ENTRY, (st), (ptr))\n# define sk_BY_DIR_ENTRY_insert(st, val, i) SKM_sk_insert(BY_DIR_ENTRY, (st), (val), (i))\n# define sk_BY_DIR_ENTRY_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(BY_DIR_ENTRY, (st), (cmp))\n# define sk_BY_DIR_ENTRY_dup(st) SKM_sk_dup(BY_DIR_ENTRY, st)\n# define sk_BY_DIR_ENTRY_pop_free(st, free_func) SKM_sk_pop_free(BY_DIR_ENTRY, (st), (free_func))\n# define sk_BY_DIR_ENTRY_shift(st) SKM_sk_shift(BY_DIR_ENTRY, (st))\n# define sk_BY_DIR_ENTRY_pop(st) SKM_sk_pop(BY_DIR_ENTRY, (st))\n# define sk_BY_DIR_ENTRY_sort(st) SKM_sk_sort(BY_DIR_ENTRY, (st))\n# define sk_BY_DIR_ENTRY_is_sorted(st) SKM_sk_is_sorted(BY_DIR_ENTRY, (st))\n# define sk_BY_DIR_HASH_new(cmp) SKM_sk_new(BY_DIR_HASH, (cmp))\n# define sk_BY_DIR_HASH_new_null() SKM_sk_new_null(BY_DIR_HASH)\n# define sk_BY_DIR_HASH_free(st) SKM_sk_free(BY_DIR_HASH, (st))\n# define sk_BY_DIR_HASH_num(st) SKM_sk_num(BY_DIR_HASH, (st))\n# define sk_BY_DIR_HASH_value(st, i) SKM_sk_value(BY_DIR_HASH, (st), (i))\n# define sk_BY_DIR_HASH_set(st, i, val) SKM_sk_set(BY_DIR_HASH, (st), (i), (val))\n# define sk_BY_DIR_HASH_zero(st) SKM_sk_zero(BY_DIR_HASH, (st))\n# define sk_BY_DIR_HASH_push(st, val) SKM_sk_push(BY_DIR_HASH, (st), (val))\n# define sk_BY_DIR_HASH_unshift(st, val) SKM_sk_unshift(BY_DIR_HASH, (st), (val))\n# define sk_BY_DIR_HASH_find(st, val) SKM_sk_find(BY_DIR_HASH, (st), (val))\n# define sk_BY_DIR_HASH_find_ex(st, val) SKM_sk_find_ex(BY_DIR_HASH, (st), (val))\n# define sk_BY_DIR_HASH_delete(st, i) SKM_sk_delete(BY_DIR_HASH, (st), (i))\n# define sk_BY_DIR_HASH_delete_ptr(st, ptr) SKM_sk_delete_ptr(BY_DIR_HASH, (st), (ptr))\n# define sk_BY_DIR_HASH_insert(st, val, i) SKM_sk_insert(BY_DIR_HASH, (st), (val), (i))\n# define sk_BY_DIR_HASH_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(BY_DIR_HASH, (st), (cmp))\n# define sk_BY_DIR_HASH_dup(st) SKM_sk_dup(BY_DIR_HASH, st)\n# define sk_BY_DIR_HASH_pop_free(st, free_func) SKM_sk_pop_free(BY_DIR_HASH, (st), (free_func))\n# define sk_BY_DIR_HASH_shift(st) SKM_sk_shift(BY_DIR_HASH, (st))\n# define sk_BY_DIR_HASH_pop(st) SKM_sk_pop(BY_DIR_HASH, (st))\n# define sk_BY_DIR_HASH_sort(st) SKM_sk_sort(BY_DIR_HASH, (st))\n# define sk_BY_DIR_HASH_is_sorted(st) SKM_sk_is_sorted(BY_DIR_HASH, (st))\n# define sk_CMS_CertificateChoices_new(cmp) SKM_sk_new(CMS_CertificateChoices, (cmp))\n# define sk_CMS_CertificateChoices_new_null() SKM_sk_new_null(CMS_CertificateChoices)\n# define sk_CMS_CertificateChoices_free(st) SKM_sk_free(CMS_CertificateChoices, (st))\n# define sk_CMS_CertificateChoices_num(st) SKM_sk_num(CMS_CertificateChoices, (st))\n# define sk_CMS_CertificateChoices_value(st, i) SKM_sk_value(CMS_CertificateChoices, (st), (i))\n# define sk_CMS_CertificateChoices_set(st, i, val) SKM_sk_set(CMS_CertificateChoices, (st), (i), (val))\n# define sk_CMS_CertificateChoices_zero(st) SKM_sk_zero(CMS_CertificateChoices, (st))\n# define sk_CMS_CertificateChoices_push(st, val) SKM_sk_push(CMS_CertificateChoices, (st), (val))\n# define sk_CMS_CertificateChoices_unshift(st, val) SKM_sk_unshift(CMS_CertificateChoices, (st), (val))\n# define sk_CMS_CertificateChoices_find(st, val) SKM_sk_find(CMS_CertificateChoices, (st), (val))\n# define sk_CMS_CertificateChoices_find_ex(st, val) SKM_sk_find_ex(CMS_CertificateChoices, (st), (val))\n# define sk_CMS_CertificateChoices_delete(st, i) SKM_sk_delete(CMS_CertificateChoices, (st), (i))\n# define sk_CMS_CertificateChoices_delete_ptr(st, ptr) SKM_sk_delete_ptr(CMS_CertificateChoices, (st), (ptr))\n# define sk_CMS_CertificateChoices_insert(st, val, i) SKM_sk_insert(CMS_CertificateChoices, (st), (val), (i))\n# define sk_CMS_CertificateChoices_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(CMS_CertificateChoices, (st), (cmp))\n# define sk_CMS_CertificateChoices_dup(st) SKM_sk_dup(CMS_CertificateChoices, st)\n# define sk_CMS_CertificateChoices_pop_free(st, free_func) SKM_sk_pop_free(CMS_CertificateChoices, (st), (free_func))\n# define sk_CMS_CertificateChoices_shift(st) SKM_sk_shift(CMS_CertificateChoices, (st))\n# define sk_CMS_CertificateChoices_pop(st) SKM_sk_pop(CMS_CertificateChoices, (st))\n# define sk_CMS_CertificateChoices_sort(st) SKM_sk_sort(CMS_CertificateChoices, (st))\n# define sk_CMS_CertificateChoices_is_sorted(st) SKM_sk_is_sorted(CMS_CertificateChoices, (st))\n# define sk_CMS_RecipientInfo_new(cmp) SKM_sk_new(CMS_RecipientInfo, (cmp))\n# define sk_CMS_RecipientInfo_new_null() SKM_sk_new_null(CMS_RecipientInfo)\n# define sk_CMS_RecipientInfo_free(st) SKM_sk_free(CMS_RecipientInfo, (st))\n# define sk_CMS_RecipientInfo_num(st) SKM_sk_num(CMS_RecipientInfo, (st))\n# define sk_CMS_RecipientInfo_value(st, i) SKM_sk_value(CMS_RecipientInfo, (st), (i))\n# define sk_CMS_RecipientInfo_set(st, i, val) SKM_sk_set(CMS_RecipientInfo, (st), (i), (val))\n# define sk_CMS_RecipientInfo_zero(st) SKM_sk_zero(CMS_RecipientInfo, (st))\n# define sk_CMS_RecipientInfo_push(st, val) SKM_sk_push(CMS_RecipientInfo, (st), (val))\n# define sk_CMS_RecipientInfo_unshift(st, val) SKM_sk_unshift(CMS_RecipientInfo, (st), (val))\n# define sk_CMS_RecipientInfo_find(st, val) SKM_sk_find(CMS_RecipientInfo, (st), (val))\n# define sk_CMS_RecipientInfo_find_ex(st, val) SKM_sk_find_ex(CMS_RecipientInfo, (st), (val))\n# define sk_CMS_RecipientInfo_delete(st, i) SKM_sk_delete(CMS_RecipientInfo, (st), (i))\n# define sk_CMS_RecipientInfo_delete_ptr(st, ptr) SKM_sk_delete_ptr(CMS_RecipientInfo, (st), (ptr))\n# define sk_CMS_RecipientInfo_insert(st, val, i) SKM_sk_insert(CMS_RecipientInfo, (st), (val), (i))\n# define sk_CMS_RecipientInfo_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(CMS_RecipientInfo, (st), (cmp))\n# define sk_CMS_RecipientInfo_dup(st) SKM_sk_dup(CMS_RecipientInfo, st)\n# define sk_CMS_RecipientInfo_pop_free(st, free_func) SKM_sk_pop_free(CMS_RecipientInfo, (st), (free_func))\n# define sk_CMS_RecipientInfo_shift(st) SKM_sk_shift(CMS_RecipientInfo, (st))\n# define sk_CMS_RecipientInfo_pop(st) SKM_sk_pop(CMS_RecipientInfo, (st))\n# define sk_CMS_RecipientInfo_sort(st) SKM_sk_sort(CMS_RecipientInfo, (st))\n# define sk_CMS_RecipientInfo_is_sorted(st) SKM_sk_is_sorted(CMS_RecipientInfo, (st))\n# define sk_CMS_RevocationInfoChoice_new(cmp) SKM_sk_new(CMS_RevocationInfoChoice, (cmp))\n# define sk_CMS_RevocationInfoChoice_new_null() SKM_sk_new_null(CMS_RevocationInfoChoice)\n# define sk_CMS_RevocationInfoChoice_free(st) SKM_sk_free(CMS_RevocationInfoChoice, (st))\n# define sk_CMS_RevocationInfoChoice_num(st) SKM_sk_num(CMS_RevocationInfoChoice, (st))\n# define sk_CMS_RevocationInfoChoice_value(st, i) SKM_sk_value(CMS_RevocationInfoChoice, (st), (i))\n# define sk_CMS_RevocationInfoChoice_set(st, i, val) SKM_sk_set(CMS_RevocationInfoChoice, (st), (i), (val))\n# define sk_CMS_RevocationInfoChoice_zero(st) SKM_sk_zero(CMS_RevocationInfoChoice, (st))\n# define sk_CMS_RevocationInfoChoice_push(st, val) SKM_sk_push(CMS_RevocationInfoChoice, (st), (val))\n# define sk_CMS_RevocationInfoChoice_unshift(st, val) SKM_sk_unshift(CMS_RevocationInfoChoice, (st), (val))\n# define sk_CMS_RevocationInfoChoice_find(st, val) SKM_sk_find(CMS_RevocationInfoChoice, (st), (val))\n# define sk_CMS_RevocationInfoChoice_find_ex(st, val) SKM_sk_find_ex(CMS_RevocationInfoChoice, (st), (val))\n# define sk_CMS_RevocationInfoChoice_delete(st, i) SKM_sk_delete(CMS_RevocationInfoChoice, (st), (i))\n# define sk_CMS_RevocationInfoChoice_delete_ptr(st, ptr) SKM_sk_delete_ptr(CMS_RevocationInfoChoice, (st), (ptr))\n# define sk_CMS_RevocationInfoChoice_insert(st, val, i) SKM_sk_insert(CMS_RevocationInfoChoice, (st), (val), (i))\n# define sk_CMS_RevocationInfoChoice_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(CMS_RevocationInfoChoice, (st), (cmp))\n# define sk_CMS_RevocationInfoChoice_dup(st) SKM_sk_dup(CMS_RevocationInfoChoice, st)\n# define sk_CMS_RevocationInfoChoice_pop_free(st, free_func) SKM_sk_pop_free(CMS_RevocationInfoChoice, (st), (free_func))\n# define sk_CMS_RevocationInfoChoice_shift(st) SKM_sk_shift(CMS_RevocationInfoChoice, (st))\n# define sk_CMS_RevocationInfoChoice_pop(st) SKM_sk_pop(CMS_RevocationInfoChoice, (st))\n# define sk_CMS_RevocationInfoChoice_sort(st) SKM_sk_sort(CMS_RevocationInfoChoice, (st))\n# define sk_CMS_RevocationInfoChoice_is_sorted(st) SKM_sk_is_sorted(CMS_RevocationInfoChoice, (st))\n# define sk_CMS_SignerInfo_new(cmp) SKM_sk_new(CMS_SignerInfo, (cmp))\n# define sk_CMS_SignerInfo_new_null() SKM_sk_new_null(CMS_SignerInfo)\n# define sk_CMS_SignerInfo_free(st) SKM_sk_free(CMS_SignerInfo, (st))\n# define sk_CMS_SignerInfo_num(st) SKM_sk_num(CMS_SignerInfo, (st))\n# define sk_CMS_SignerInfo_value(st, i) SKM_sk_value(CMS_SignerInfo, (st), (i))\n# define sk_CMS_SignerInfo_set(st, i, val) SKM_sk_set(CMS_SignerInfo, (st), (i), (val))\n# define sk_CMS_SignerInfo_zero(st) SKM_sk_zero(CMS_SignerInfo, (st))\n# define sk_CMS_SignerInfo_push(st, val) SKM_sk_push(CMS_SignerInfo, (st), (val))\n# define sk_CMS_SignerInfo_unshift(st, val) SKM_sk_unshift(CMS_SignerInfo, (st), (val))\n# define sk_CMS_SignerInfo_find(st, val) SKM_sk_find(CMS_SignerInfo, (st), (val))\n# define sk_CMS_SignerInfo_find_ex(st, val) SKM_sk_find_ex(CMS_SignerInfo, (st), (val))\n# define sk_CMS_SignerInfo_delete(st, i) SKM_sk_delete(CMS_SignerInfo, (st), (i))\n# define sk_CMS_SignerInfo_delete_ptr(st, ptr) SKM_sk_delete_ptr(CMS_SignerInfo, (st), (ptr))\n# define sk_CMS_SignerInfo_insert(st, val, i) SKM_sk_insert(CMS_SignerInfo, (st), (val), (i))\n# define sk_CMS_SignerInfo_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(CMS_SignerInfo, (st), (cmp))\n# define sk_CMS_SignerInfo_dup(st) SKM_sk_dup(CMS_SignerInfo, st)\n# define sk_CMS_SignerInfo_pop_free(st, free_func) SKM_sk_pop_free(CMS_SignerInfo, (st), (free_func))\n# define sk_CMS_SignerInfo_shift(st) SKM_sk_shift(CMS_SignerInfo, (st))\n# define sk_CMS_SignerInfo_pop(st) SKM_sk_pop(CMS_SignerInfo, (st))\n# define sk_CMS_SignerInfo_sort(st) SKM_sk_sort(CMS_SignerInfo, (st))\n# define sk_CMS_SignerInfo_is_sorted(st) SKM_sk_is_sorted(CMS_SignerInfo, (st))\n# define sk_CONF_IMODULE_new(cmp) SKM_sk_new(CONF_IMODULE, (cmp))\n# define sk_CONF_IMODULE_new_null() SKM_sk_new_null(CONF_IMODULE)\n# define sk_CONF_IMODULE_free(st) SKM_sk_free(CONF_IMODULE, (st))\n# define sk_CONF_IMODULE_num(st) SKM_sk_num(CONF_IMODULE, (st))\n# define sk_CONF_IMODULE_value(st, i) SKM_sk_value(CONF_IMODULE, (st), (i))\n# define sk_CONF_IMODULE_set(st, i, val) SKM_sk_set(CONF_IMODULE, (st), (i), (val))\n# define sk_CONF_IMODULE_zero(st) SKM_sk_zero(CONF_IMODULE, (st))\n# define sk_CONF_IMODULE_push(st, val) SKM_sk_push(CONF_IMODULE, (st), (val))\n# define sk_CONF_IMODULE_unshift(st, val) SKM_sk_unshift(CONF_IMODULE, (st), (val))\n# define sk_CONF_IMODULE_find(st, val) SKM_sk_find(CONF_IMODULE, (st), (val))\n# define sk_CONF_IMODULE_find_ex(st, val) SKM_sk_find_ex(CONF_IMODULE, (st), (val))\n# define sk_CONF_IMODULE_delete(st, i) SKM_sk_delete(CONF_IMODULE, (st), (i))\n# define sk_CONF_IMODULE_delete_ptr(st, ptr) SKM_sk_delete_ptr(CONF_IMODULE, (st), (ptr))\n# define sk_CONF_IMODULE_insert(st, val, i) SKM_sk_insert(CONF_IMODULE, (st), (val), (i))\n# define sk_CONF_IMODULE_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(CONF_IMODULE, (st), (cmp))\n# define sk_CONF_IMODULE_dup(st) SKM_sk_dup(CONF_IMODULE, st)\n# define sk_CONF_IMODULE_pop_free(st, free_func) SKM_sk_pop_free(CONF_IMODULE, (st), (free_func))\n# define sk_CONF_IMODULE_shift(st) SKM_sk_shift(CONF_IMODULE, (st))\n# define sk_CONF_IMODULE_pop(st) SKM_sk_pop(CONF_IMODULE, (st))\n# define sk_CONF_IMODULE_sort(st) SKM_sk_sort(CONF_IMODULE, (st))\n# define sk_CONF_IMODULE_is_sorted(st) SKM_sk_is_sorted(CONF_IMODULE, (st))\n# define sk_CONF_MODULE_new(cmp) SKM_sk_new(CONF_MODULE, (cmp))\n# define sk_CONF_MODULE_new_null() SKM_sk_new_null(CONF_MODULE)\n# define sk_CONF_MODULE_free(st) SKM_sk_free(CONF_MODULE, (st))\n# define sk_CONF_MODULE_num(st) SKM_sk_num(CONF_MODULE, (st))\n# define sk_CONF_MODULE_value(st, i) SKM_sk_value(CONF_MODULE, (st), (i))\n# define sk_CONF_MODULE_set(st, i, val) SKM_sk_set(CONF_MODULE, (st), (i), (val))\n# define sk_CONF_MODULE_zero(st) SKM_sk_zero(CONF_MODULE, (st))\n# define sk_CONF_MODULE_push(st, val) SKM_sk_push(CONF_MODULE, (st), (val))\n# define sk_CONF_MODULE_unshift(st, val) SKM_sk_unshift(CONF_MODULE, (st), (val))\n# define sk_CONF_MODULE_find(st, val) SKM_sk_find(CONF_MODULE, (st), (val))\n# define sk_CONF_MODULE_find_ex(st, val) SKM_sk_find_ex(CONF_MODULE, (st), (val))\n# define sk_CONF_MODULE_delete(st, i) SKM_sk_delete(CONF_MODULE, (st), (i))\n# define sk_CONF_MODULE_delete_ptr(st, ptr) SKM_sk_delete_ptr(CONF_MODULE, (st), (ptr))\n# define sk_CONF_MODULE_insert(st, val, i) SKM_sk_insert(CONF_MODULE, (st), (val), (i))\n# define sk_CONF_MODULE_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(CONF_MODULE, (st), (cmp))\n# define sk_CONF_MODULE_dup(st) SKM_sk_dup(CONF_MODULE, st)\n# define sk_CONF_MODULE_pop_free(st, free_func) SKM_sk_pop_free(CONF_MODULE, (st), (free_func))\n# define sk_CONF_MODULE_shift(st) SKM_sk_shift(CONF_MODULE, (st))\n# define sk_CONF_MODULE_pop(st) SKM_sk_pop(CONF_MODULE, (st))\n# define sk_CONF_MODULE_sort(st) SKM_sk_sort(CONF_MODULE, (st))\n# define sk_CONF_MODULE_is_sorted(st) SKM_sk_is_sorted(CONF_MODULE, (st))\n# define sk_CONF_VALUE_new(cmp) SKM_sk_new(CONF_VALUE, (cmp))\n# define sk_CONF_VALUE_new_null() SKM_sk_new_null(CONF_VALUE)\n# define sk_CONF_VALUE_free(st) SKM_sk_free(CONF_VALUE, (st))\n# define sk_CONF_VALUE_num(st) SKM_sk_num(CONF_VALUE, (st))\n# define sk_CONF_VALUE_value(st, i) SKM_sk_value(CONF_VALUE, (st), (i))\n# define sk_CONF_VALUE_set(st, i, val) SKM_sk_set(CONF_VALUE, (st), (i), (val))\n# define sk_CONF_VALUE_zero(st) SKM_sk_zero(CONF_VALUE, (st))\n# define sk_CONF_VALUE_push(st, val) SKM_sk_push(CONF_VALUE, (st), (val))\n# define sk_CONF_VALUE_unshift(st, val) SKM_sk_unshift(CONF_VALUE, (st), (val))\n# define sk_CONF_VALUE_find(st, val) SKM_sk_find(CONF_VALUE, (st), (val))\n# define sk_CONF_VALUE_find_ex(st, val) SKM_sk_find_ex(CONF_VALUE, (st), (val))\n# define sk_CONF_VALUE_delete(st, i) SKM_sk_delete(CONF_VALUE, (st), (i))\n# define sk_CONF_VALUE_delete_ptr(st, ptr) SKM_sk_delete_ptr(CONF_VALUE, (st), (ptr))\n# define sk_CONF_VALUE_insert(st, val, i) SKM_sk_insert(CONF_VALUE, (st), (val), (i))\n# define sk_CONF_VALUE_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(CONF_VALUE, (st), (cmp))\n# define sk_CONF_VALUE_dup(st) SKM_sk_dup(CONF_VALUE, st)\n# define sk_CONF_VALUE_pop_free(st, free_func) SKM_sk_pop_free(CONF_VALUE, (st), (free_func))\n# define sk_CONF_VALUE_shift(st) SKM_sk_shift(CONF_VALUE, (st))\n# define sk_CONF_VALUE_pop(st) SKM_sk_pop(CONF_VALUE, (st))\n# define sk_CONF_VALUE_sort(st) SKM_sk_sort(CONF_VALUE, (st))\n# define sk_CONF_VALUE_is_sorted(st) SKM_sk_is_sorted(CONF_VALUE, (st))\n# define sk_CRYPTO_EX_DATA_FUNCS_new(cmp) SKM_sk_new(CRYPTO_EX_DATA_FUNCS, (cmp))\n# define sk_CRYPTO_EX_DATA_FUNCS_new_null() SKM_sk_new_null(CRYPTO_EX_DATA_FUNCS)\n# define sk_CRYPTO_EX_DATA_FUNCS_free(st) SKM_sk_free(CRYPTO_EX_DATA_FUNCS, (st))\n# define sk_CRYPTO_EX_DATA_FUNCS_num(st) SKM_sk_num(CRYPTO_EX_DATA_FUNCS, (st))\n# define sk_CRYPTO_EX_DATA_FUNCS_value(st, i) SKM_sk_value(CRYPTO_EX_DATA_FUNCS, (st), (i))\n# define sk_CRYPTO_EX_DATA_FUNCS_set(st, i, val) SKM_sk_set(CRYPTO_EX_DATA_FUNCS, (st), (i), (val))\n# define sk_CRYPTO_EX_DATA_FUNCS_zero(st) SKM_sk_zero(CRYPTO_EX_DATA_FUNCS, (st))\n# define sk_CRYPTO_EX_DATA_FUNCS_push(st, val) SKM_sk_push(CRYPTO_EX_DATA_FUNCS, (st), (val))\n# define sk_CRYPTO_EX_DATA_FUNCS_unshift(st, val) SKM_sk_unshift(CRYPTO_EX_DATA_FUNCS, (st), (val))\n# define sk_CRYPTO_EX_DATA_FUNCS_find(st, val) SKM_sk_find(CRYPTO_EX_DATA_FUNCS, (st), (val))\n# define sk_CRYPTO_EX_DATA_FUNCS_find_ex(st, val) SKM_sk_find_ex(CRYPTO_EX_DATA_FUNCS, (st), (val))\n# define sk_CRYPTO_EX_DATA_FUNCS_delete(st, i) SKM_sk_delete(CRYPTO_EX_DATA_FUNCS, (st), (i))\n# define sk_CRYPTO_EX_DATA_FUNCS_delete_ptr(st, ptr) SKM_sk_delete_ptr(CRYPTO_EX_DATA_FUNCS, (st), (ptr))\n# define sk_CRYPTO_EX_DATA_FUNCS_insert(st, val, i) SKM_sk_insert(CRYPTO_EX_DATA_FUNCS, (st), (val), (i))\n# define sk_CRYPTO_EX_DATA_FUNCS_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(CRYPTO_EX_DATA_FUNCS, (st), (cmp))\n# define sk_CRYPTO_EX_DATA_FUNCS_dup(st) SKM_sk_dup(CRYPTO_EX_DATA_FUNCS, st)\n# define sk_CRYPTO_EX_DATA_FUNCS_pop_free(st, free_func) SKM_sk_pop_free(CRYPTO_EX_DATA_FUNCS, (st), (free_func))\n# define sk_CRYPTO_EX_DATA_FUNCS_shift(st) SKM_sk_shift(CRYPTO_EX_DATA_FUNCS, (st))\n# define sk_CRYPTO_EX_DATA_FUNCS_pop(st) SKM_sk_pop(CRYPTO_EX_DATA_FUNCS, (st))\n# define sk_CRYPTO_EX_DATA_FUNCS_sort(st) SKM_sk_sort(CRYPTO_EX_DATA_FUNCS, (st))\n# define sk_CRYPTO_EX_DATA_FUNCS_is_sorted(st) SKM_sk_is_sorted(CRYPTO_EX_DATA_FUNCS, (st))\n# define sk_CRYPTO_dynlock_new(cmp) SKM_sk_new(CRYPTO_dynlock, (cmp))\n# define sk_CRYPTO_dynlock_new_null() SKM_sk_new_null(CRYPTO_dynlock)\n# define sk_CRYPTO_dynlock_free(st) SKM_sk_free(CRYPTO_dynlock, (st))\n# define sk_CRYPTO_dynlock_num(st) SKM_sk_num(CRYPTO_dynlock, (st))\n# define sk_CRYPTO_dynlock_value(st, i) SKM_sk_value(CRYPTO_dynlock, (st), (i))\n# define sk_CRYPTO_dynlock_set(st, i, val) SKM_sk_set(CRYPTO_dynlock, (st), (i), (val))\n# define sk_CRYPTO_dynlock_zero(st) SKM_sk_zero(CRYPTO_dynlock, (st))\n# define sk_CRYPTO_dynlock_push(st, val) SKM_sk_push(CRYPTO_dynlock, (st), (val))\n# define sk_CRYPTO_dynlock_unshift(st, val) SKM_sk_unshift(CRYPTO_dynlock, (st), (val))\n# define sk_CRYPTO_dynlock_find(st, val) SKM_sk_find(CRYPTO_dynlock, (st), (val))\n# define sk_CRYPTO_dynlock_find_ex(st, val) SKM_sk_find_ex(CRYPTO_dynlock, (st), (val))\n# define sk_CRYPTO_dynlock_delete(st, i) SKM_sk_delete(CRYPTO_dynlock, (st), (i))\n# define sk_CRYPTO_dynlock_delete_ptr(st, ptr) SKM_sk_delete_ptr(CRYPTO_dynlock, (st), (ptr))\n# define sk_CRYPTO_dynlock_insert(st, val, i) SKM_sk_insert(CRYPTO_dynlock, (st), (val), (i))\n# define sk_CRYPTO_dynlock_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(CRYPTO_dynlock, (st), (cmp))\n# define sk_CRYPTO_dynlock_dup(st) SKM_sk_dup(CRYPTO_dynlock, st)\n# define sk_CRYPTO_dynlock_pop_free(st, free_func) SKM_sk_pop_free(CRYPTO_dynlock, (st), (free_func))\n# define sk_CRYPTO_dynlock_shift(st) SKM_sk_shift(CRYPTO_dynlock, (st))\n# define sk_CRYPTO_dynlock_pop(st) SKM_sk_pop(CRYPTO_dynlock, (st))\n# define sk_CRYPTO_dynlock_sort(st) SKM_sk_sort(CRYPTO_dynlock, (st))\n# define sk_CRYPTO_dynlock_is_sorted(st) SKM_sk_is_sorted(CRYPTO_dynlock, (st))\n# define sk_DIST_POINT_new(cmp) SKM_sk_new(DIST_POINT, (cmp))\n# define sk_DIST_POINT_new_null() SKM_sk_new_null(DIST_POINT)\n# define sk_DIST_POINT_free(st) SKM_sk_free(DIST_POINT, (st))\n# define sk_DIST_POINT_num(st) SKM_sk_num(DIST_POINT, (st))\n# define sk_DIST_POINT_value(st, i) SKM_sk_value(DIST_POINT, (st), (i))\n# define sk_DIST_POINT_set(st, i, val) SKM_sk_set(DIST_POINT, (st), (i), (val))\n# define sk_DIST_POINT_zero(st) SKM_sk_zero(DIST_POINT, (st))\n# define sk_DIST_POINT_push(st, val) SKM_sk_push(DIST_POINT, (st), (val))\n# define sk_DIST_POINT_unshift(st, val) SKM_sk_unshift(DIST_POINT, (st), (val))\n# define sk_DIST_POINT_find(st, val) SKM_sk_find(DIST_POINT, (st), (val))\n# define sk_DIST_POINT_find_ex(st, val) SKM_sk_find_ex(DIST_POINT, (st), (val))\n# define sk_DIST_POINT_delete(st, i) SKM_sk_delete(DIST_POINT, (st), (i))\n# define sk_DIST_POINT_delete_ptr(st, ptr) SKM_sk_delete_ptr(DIST_POINT, (st), (ptr))\n# define sk_DIST_POINT_insert(st, val, i) SKM_sk_insert(DIST_POINT, (st), (val), (i))\n# define sk_DIST_POINT_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(DIST_POINT, (st), (cmp))\n# define sk_DIST_POINT_dup(st) SKM_sk_dup(DIST_POINT, st)\n# define sk_DIST_POINT_pop_free(st, free_func) SKM_sk_pop_free(DIST_POINT, (st), (free_func))\n# define sk_DIST_POINT_shift(st) SKM_sk_shift(DIST_POINT, (st))\n# define sk_DIST_POINT_pop(st) SKM_sk_pop(DIST_POINT, (st))\n# define sk_DIST_POINT_sort(st) SKM_sk_sort(DIST_POINT, (st))\n# define sk_DIST_POINT_is_sorted(st) SKM_sk_is_sorted(DIST_POINT, (st))\n# define sk_ENGINE_new(cmp) SKM_sk_new(ENGINE, (cmp))\n# define sk_ENGINE_new_null() SKM_sk_new_null(ENGINE)\n# define sk_ENGINE_free(st) SKM_sk_free(ENGINE, (st))\n# define sk_ENGINE_num(st) SKM_sk_num(ENGINE, (st))\n# define sk_ENGINE_value(st, i) SKM_sk_value(ENGINE, (st), (i))\n# define sk_ENGINE_set(st, i, val) SKM_sk_set(ENGINE, (st), (i), (val))\n# define sk_ENGINE_zero(st) SKM_sk_zero(ENGINE, (st))\n# define sk_ENGINE_push(st, val) SKM_sk_push(ENGINE, (st), (val))\n# define sk_ENGINE_unshift(st, val) SKM_sk_unshift(ENGINE, (st), (val))\n# define sk_ENGINE_find(st, val) SKM_sk_find(ENGINE, (st), (val))\n# define sk_ENGINE_find_ex(st, val) SKM_sk_find_ex(ENGINE, (st), (val))\n# define sk_ENGINE_delete(st, i) SKM_sk_delete(ENGINE, (st), (i))\n# define sk_ENGINE_delete_ptr(st, ptr) SKM_sk_delete_ptr(ENGINE, (st), (ptr))\n# define sk_ENGINE_insert(st, val, i) SKM_sk_insert(ENGINE, (st), (val), (i))\n# define sk_ENGINE_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(ENGINE, (st), (cmp))\n# define sk_ENGINE_dup(st) SKM_sk_dup(ENGINE, st)\n# define sk_ENGINE_pop_free(st, free_func) SKM_sk_pop_free(ENGINE, (st), (free_func))\n# define sk_ENGINE_shift(st) SKM_sk_shift(ENGINE, (st))\n# define sk_ENGINE_pop(st) SKM_sk_pop(ENGINE, (st))\n# define sk_ENGINE_sort(st) SKM_sk_sort(ENGINE, (st))\n# define sk_ENGINE_is_sorted(st) SKM_sk_is_sorted(ENGINE, (st))\n# define sk_ENGINE_CLEANUP_ITEM_new(cmp) SKM_sk_new(ENGINE_CLEANUP_ITEM, (cmp))\n# define sk_ENGINE_CLEANUP_ITEM_new_null() SKM_sk_new_null(ENGINE_CLEANUP_ITEM)\n# define sk_ENGINE_CLEANUP_ITEM_free(st) SKM_sk_free(ENGINE_CLEANUP_ITEM, (st))\n# define sk_ENGINE_CLEANUP_ITEM_num(st) SKM_sk_num(ENGINE_CLEANUP_ITEM, (st))\n# define sk_ENGINE_CLEANUP_ITEM_value(st, i) SKM_sk_value(ENGINE_CLEANUP_ITEM, (st), (i))\n# define sk_ENGINE_CLEANUP_ITEM_set(st, i, val) SKM_sk_set(ENGINE_CLEANUP_ITEM, (st), (i), (val))\n# define sk_ENGINE_CLEANUP_ITEM_zero(st) SKM_sk_zero(ENGINE_CLEANUP_ITEM, (st))\n# define sk_ENGINE_CLEANUP_ITEM_push(st, val) SKM_sk_push(ENGINE_CLEANUP_ITEM, (st), (val))\n# define sk_ENGINE_CLEANUP_ITEM_unshift(st, val) SKM_sk_unshift(ENGINE_CLEANUP_ITEM, (st), (val))\n# define sk_ENGINE_CLEANUP_ITEM_find(st, val) SKM_sk_find(ENGINE_CLEANUP_ITEM, (st), (val))\n# define sk_ENGINE_CLEANUP_ITEM_find_ex(st, val) SKM_sk_find_ex(ENGINE_CLEANUP_ITEM, (st), (val))\n# define sk_ENGINE_CLEANUP_ITEM_delete(st, i) SKM_sk_delete(ENGINE_CLEANUP_ITEM, (st), (i))\n# define sk_ENGINE_CLEANUP_ITEM_delete_ptr(st, ptr) SKM_sk_delete_ptr(ENGINE_CLEANUP_ITEM, (st), (ptr))\n# define sk_ENGINE_CLEANUP_ITEM_insert(st, val, i) SKM_sk_insert(ENGINE_CLEANUP_ITEM, (st), (val), (i))\n# define sk_ENGINE_CLEANUP_ITEM_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(ENGINE_CLEANUP_ITEM, (st), (cmp))\n# define sk_ENGINE_CLEANUP_ITEM_dup(st) SKM_sk_dup(ENGINE_CLEANUP_ITEM, st)\n# define sk_ENGINE_CLEANUP_ITEM_pop_free(st, free_func) SKM_sk_pop_free(ENGINE_CLEANUP_ITEM, (st), (free_func))\n# define sk_ENGINE_CLEANUP_ITEM_shift(st) SKM_sk_shift(ENGINE_CLEANUP_ITEM, (st))\n# define sk_ENGINE_CLEANUP_ITEM_pop(st) SKM_sk_pop(ENGINE_CLEANUP_ITEM, (st))\n# define sk_ENGINE_CLEANUP_ITEM_sort(st) SKM_sk_sort(ENGINE_CLEANUP_ITEM, (st))\n# define sk_ENGINE_CLEANUP_ITEM_is_sorted(st) SKM_sk_is_sorted(ENGINE_CLEANUP_ITEM, (st))\n# define sk_ESS_CERT_ID_new(cmp) SKM_sk_new(ESS_CERT_ID, (cmp))\n# define sk_ESS_CERT_ID_new_null() SKM_sk_new_null(ESS_CERT_ID)\n# define sk_ESS_CERT_ID_free(st) SKM_sk_free(ESS_CERT_ID, (st))\n# define sk_ESS_CERT_ID_num(st) SKM_sk_num(ESS_CERT_ID, (st))\n# define sk_ESS_CERT_ID_value(st, i) SKM_sk_value(ESS_CERT_ID, (st), (i))\n# define sk_ESS_CERT_ID_set(st, i, val) SKM_sk_set(ESS_CERT_ID, (st), (i), (val))\n# define sk_ESS_CERT_ID_zero(st) SKM_sk_zero(ESS_CERT_ID, (st))\n# define sk_ESS_CERT_ID_push(st, val) SKM_sk_push(ESS_CERT_ID, (st), (val))\n# define sk_ESS_CERT_ID_unshift(st, val) SKM_sk_unshift(ESS_CERT_ID, (st), (val))\n# define sk_ESS_CERT_ID_find(st, val) SKM_sk_find(ESS_CERT_ID, (st), (val))\n# define sk_ESS_CERT_ID_find_ex(st, val) SKM_sk_find_ex(ESS_CERT_ID, (st), (val))\n# define sk_ESS_CERT_ID_delete(st, i) SKM_sk_delete(ESS_CERT_ID, (st), (i))\n# define sk_ESS_CERT_ID_delete_ptr(st, ptr) SKM_sk_delete_ptr(ESS_CERT_ID, (st), (ptr))\n# define sk_ESS_CERT_ID_insert(st, val, i) SKM_sk_insert(ESS_CERT_ID, (st), (val), (i))\n# define sk_ESS_CERT_ID_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(ESS_CERT_ID, (st), (cmp))\n# define sk_ESS_CERT_ID_dup(st) SKM_sk_dup(ESS_CERT_ID, st)\n# define sk_ESS_CERT_ID_pop_free(st, free_func) SKM_sk_pop_free(ESS_CERT_ID, (st), (free_func))\n# define sk_ESS_CERT_ID_shift(st) SKM_sk_shift(ESS_CERT_ID, (st))\n# define sk_ESS_CERT_ID_pop(st) SKM_sk_pop(ESS_CERT_ID, (st))\n# define sk_ESS_CERT_ID_sort(st) SKM_sk_sort(ESS_CERT_ID, (st))\n# define sk_ESS_CERT_ID_is_sorted(st) SKM_sk_is_sorted(ESS_CERT_ID, (st))\n# define sk_EVP_MD_new(cmp) SKM_sk_new(EVP_MD, (cmp))\n# define sk_EVP_MD_new_null() SKM_sk_new_null(EVP_MD)\n# define sk_EVP_MD_free(st) SKM_sk_free(EVP_MD, (st))\n# define sk_EVP_MD_num(st) SKM_sk_num(EVP_MD, (st))\n# define sk_EVP_MD_value(st, i) SKM_sk_value(EVP_MD, (st), (i))\n# define sk_EVP_MD_set(st, i, val) SKM_sk_set(EVP_MD, (st), (i), (val))\n# define sk_EVP_MD_zero(st) SKM_sk_zero(EVP_MD, (st))\n# define sk_EVP_MD_push(st, val) SKM_sk_push(EVP_MD, (st), (val))\n# define sk_EVP_MD_unshift(st, val) SKM_sk_unshift(EVP_MD, (st), (val))\n# define sk_EVP_MD_find(st, val) SKM_sk_find(EVP_MD, (st), (val))\n# define sk_EVP_MD_find_ex(st, val) SKM_sk_find_ex(EVP_MD, (st), (val))\n# define sk_EVP_MD_delete(st, i) SKM_sk_delete(EVP_MD, (st), (i))\n# define sk_EVP_MD_delete_ptr(st, ptr) SKM_sk_delete_ptr(EVP_MD, (st), (ptr))\n# define sk_EVP_MD_insert(st, val, i) SKM_sk_insert(EVP_MD, (st), (val), (i))\n# define sk_EVP_MD_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(EVP_MD, (st), (cmp))\n# define sk_EVP_MD_dup(st) SKM_sk_dup(EVP_MD, st)\n# define sk_EVP_MD_pop_free(st, free_func) SKM_sk_pop_free(EVP_MD, (st), (free_func))\n# define sk_EVP_MD_shift(st) SKM_sk_shift(EVP_MD, (st))\n# define sk_EVP_MD_pop(st) SKM_sk_pop(EVP_MD, (st))\n# define sk_EVP_MD_sort(st) SKM_sk_sort(EVP_MD, (st))\n# define sk_EVP_MD_is_sorted(st) SKM_sk_is_sorted(EVP_MD, (st))\n# define sk_EVP_PBE_CTL_new(cmp) SKM_sk_new(EVP_PBE_CTL, (cmp))\n# define sk_EVP_PBE_CTL_new_null() SKM_sk_new_null(EVP_PBE_CTL)\n# define sk_EVP_PBE_CTL_free(st) SKM_sk_free(EVP_PBE_CTL, (st))\n# define sk_EVP_PBE_CTL_num(st) SKM_sk_num(EVP_PBE_CTL, (st))\n# define sk_EVP_PBE_CTL_value(st, i) SKM_sk_value(EVP_PBE_CTL, (st), (i))\n# define sk_EVP_PBE_CTL_set(st, i, val) SKM_sk_set(EVP_PBE_CTL, (st), (i), (val))\n# define sk_EVP_PBE_CTL_zero(st) SKM_sk_zero(EVP_PBE_CTL, (st))\n# define sk_EVP_PBE_CTL_push(st, val) SKM_sk_push(EVP_PBE_CTL, (st), (val))\n# define sk_EVP_PBE_CTL_unshift(st, val) SKM_sk_unshift(EVP_PBE_CTL, (st), (val))\n# define sk_EVP_PBE_CTL_find(st, val) SKM_sk_find(EVP_PBE_CTL, (st), (val))\n# define sk_EVP_PBE_CTL_find_ex(st, val) SKM_sk_find_ex(EVP_PBE_CTL, (st), (val))\n# define sk_EVP_PBE_CTL_delete(st, i) SKM_sk_delete(EVP_PBE_CTL, (st), (i))\n# define sk_EVP_PBE_CTL_delete_ptr(st, ptr) SKM_sk_delete_ptr(EVP_PBE_CTL, (st), (ptr))\n# define sk_EVP_PBE_CTL_insert(st, val, i) SKM_sk_insert(EVP_PBE_CTL, (st), (val), (i))\n# define sk_EVP_PBE_CTL_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(EVP_PBE_CTL, (st), (cmp))\n# define sk_EVP_PBE_CTL_dup(st) SKM_sk_dup(EVP_PBE_CTL, st)\n# define sk_EVP_PBE_CTL_pop_free(st, free_func) SKM_sk_pop_free(EVP_PBE_CTL, (st), (free_func))\n# define sk_EVP_PBE_CTL_shift(st) SKM_sk_shift(EVP_PBE_CTL, (st))\n# define sk_EVP_PBE_CTL_pop(st) SKM_sk_pop(EVP_PBE_CTL, (st))\n# define sk_EVP_PBE_CTL_sort(st) SKM_sk_sort(EVP_PBE_CTL, (st))\n# define sk_EVP_PBE_CTL_is_sorted(st) SKM_sk_is_sorted(EVP_PBE_CTL, (st))\n# define sk_EVP_PKEY_ASN1_METHOD_new(cmp) SKM_sk_new(EVP_PKEY_ASN1_METHOD, (cmp))\n# define sk_EVP_PKEY_ASN1_METHOD_new_null() SKM_sk_new_null(EVP_PKEY_ASN1_METHOD)\n# define sk_EVP_PKEY_ASN1_METHOD_free(st) SKM_sk_free(EVP_PKEY_ASN1_METHOD, (st))\n# define sk_EVP_PKEY_ASN1_METHOD_num(st) SKM_sk_num(EVP_PKEY_ASN1_METHOD, (st))\n# define sk_EVP_PKEY_ASN1_METHOD_value(st, i) SKM_sk_value(EVP_PKEY_ASN1_METHOD, (st), (i))\n# define sk_EVP_PKEY_ASN1_METHOD_set(st, i, val) SKM_sk_set(EVP_PKEY_ASN1_METHOD, (st), (i), (val))\n# define sk_EVP_PKEY_ASN1_METHOD_zero(st) SKM_sk_zero(EVP_PKEY_ASN1_METHOD, (st))\n# define sk_EVP_PKEY_ASN1_METHOD_push(st, val) SKM_sk_push(EVP_PKEY_ASN1_METHOD, (st), (val))\n# define sk_EVP_PKEY_ASN1_METHOD_unshift(st, val) SKM_sk_unshift(EVP_PKEY_ASN1_METHOD, (st), (val))\n# define sk_EVP_PKEY_ASN1_METHOD_find(st, val) SKM_sk_find(EVP_PKEY_ASN1_METHOD, (st), (val))\n# define sk_EVP_PKEY_ASN1_METHOD_find_ex(st, val) SKM_sk_find_ex(EVP_PKEY_ASN1_METHOD, (st), (val))\n# define sk_EVP_PKEY_ASN1_METHOD_delete(st, i) SKM_sk_delete(EVP_PKEY_ASN1_METHOD, (st), (i))\n# define sk_EVP_PKEY_ASN1_METHOD_delete_ptr(st, ptr) SKM_sk_delete_ptr(EVP_PKEY_ASN1_METHOD, (st), (ptr))\n# define sk_EVP_PKEY_ASN1_METHOD_insert(st, val, i) SKM_sk_insert(EVP_PKEY_ASN1_METHOD, (st), (val), (i))\n# define sk_EVP_PKEY_ASN1_METHOD_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(EVP_PKEY_ASN1_METHOD, (st), (cmp))\n# define sk_EVP_PKEY_ASN1_METHOD_dup(st) SKM_sk_dup(EVP_PKEY_ASN1_METHOD, st)\n# define sk_EVP_PKEY_ASN1_METHOD_pop_free(st, free_func) SKM_sk_pop_free(EVP_PKEY_ASN1_METHOD, (st), (free_func))\n# define sk_EVP_PKEY_ASN1_METHOD_shift(st) SKM_sk_shift(EVP_PKEY_ASN1_METHOD, (st))\n# define sk_EVP_PKEY_ASN1_METHOD_pop(st) SKM_sk_pop(EVP_PKEY_ASN1_METHOD, (st))\n# define sk_EVP_PKEY_ASN1_METHOD_sort(st) SKM_sk_sort(EVP_PKEY_ASN1_METHOD, (st))\n# define sk_EVP_PKEY_ASN1_METHOD_is_sorted(st) SKM_sk_is_sorted(EVP_PKEY_ASN1_METHOD, (st))\n# define sk_EVP_PKEY_METHOD_new(cmp) SKM_sk_new(EVP_PKEY_METHOD, (cmp))\n# define sk_EVP_PKEY_METHOD_new_null() SKM_sk_new_null(EVP_PKEY_METHOD)\n# define sk_EVP_PKEY_METHOD_free(st) SKM_sk_free(EVP_PKEY_METHOD, (st))\n# define sk_EVP_PKEY_METHOD_num(st) SKM_sk_num(EVP_PKEY_METHOD, (st))\n# define sk_EVP_PKEY_METHOD_value(st, i) SKM_sk_value(EVP_PKEY_METHOD, (st), (i))\n# define sk_EVP_PKEY_METHOD_set(st, i, val) SKM_sk_set(EVP_PKEY_METHOD, (st), (i), (val))\n# define sk_EVP_PKEY_METHOD_zero(st) SKM_sk_zero(EVP_PKEY_METHOD, (st))\n# define sk_EVP_PKEY_METHOD_push(st, val) SKM_sk_push(EVP_PKEY_METHOD, (st), (val))\n# define sk_EVP_PKEY_METHOD_unshift(st, val) SKM_sk_unshift(EVP_PKEY_METHOD, (st), (val))\n# define sk_EVP_PKEY_METHOD_find(st, val) SKM_sk_find(EVP_PKEY_METHOD, (st), (val))\n# define sk_EVP_PKEY_METHOD_find_ex(st, val) SKM_sk_find_ex(EVP_PKEY_METHOD, (st), (val))\n# define sk_EVP_PKEY_METHOD_delete(st, i) SKM_sk_delete(EVP_PKEY_METHOD, (st), (i))\n# define sk_EVP_PKEY_METHOD_delete_ptr(st, ptr) SKM_sk_delete_ptr(EVP_PKEY_METHOD, (st), (ptr))\n# define sk_EVP_PKEY_METHOD_insert(st, val, i) SKM_sk_insert(EVP_PKEY_METHOD, (st), (val), (i))\n# define sk_EVP_PKEY_METHOD_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(EVP_PKEY_METHOD, (st), (cmp))\n# define sk_EVP_PKEY_METHOD_dup(st) SKM_sk_dup(EVP_PKEY_METHOD, st)\n# define sk_EVP_PKEY_METHOD_pop_free(st, free_func) SKM_sk_pop_free(EVP_PKEY_METHOD, (st), (free_func))\n# define sk_EVP_PKEY_METHOD_shift(st) SKM_sk_shift(EVP_PKEY_METHOD, (st))\n# define sk_EVP_PKEY_METHOD_pop(st) SKM_sk_pop(EVP_PKEY_METHOD, (st))\n# define sk_EVP_PKEY_METHOD_sort(st) SKM_sk_sort(EVP_PKEY_METHOD, (st))\n# define sk_EVP_PKEY_METHOD_is_sorted(st) SKM_sk_is_sorted(EVP_PKEY_METHOD, (st))\n# define sk_GENERAL_NAME_new(cmp) SKM_sk_new(GENERAL_NAME, (cmp))\n# define sk_GENERAL_NAME_new_null() SKM_sk_new_null(GENERAL_NAME)\n# define sk_GENERAL_NAME_free(st) SKM_sk_free(GENERAL_NAME, (st))\n# define sk_GENERAL_NAME_num(st) SKM_sk_num(GENERAL_NAME, (st))\n# define sk_GENERAL_NAME_value(st, i) SKM_sk_value(GENERAL_NAME, (st), (i))\n# define sk_GENERAL_NAME_set(st, i, val) SKM_sk_set(GENERAL_NAME, (st), (i), (val))\n# define sk_GENERAL_NAME_zero(st) SKM_sk_zero(GENERAL_NAME, (st))\n# define sk_GENERAL_NAME_push(st, val) SKM_sk_push(GENERAL_NAME, (st), (val))\n# define sk_GENERAL_NAME_unshift(st, val) SKM_sk_unshift(GENERAL_NAME, (st), (val))\n# define sk_GENERAL_NAME_find(st, val) SKM_sk_find(GENERAL_NAME, (st), (val))\n# define sk_GENERAL_NAME_find_ex(st, val) SKM_sk_find_ex(GENERAL_NAME, (st), (val))\n# define sk_GENERAL_NAME_delete(st, i) SKM_sk_delete(GENERAL_NAME, (st), (i))\n# define sk_GENERAL_NAME_delete_ptr(st, ptr) SKM_sk_delete_ptr(GENERAL_NAME, (st), (ptr))\n# define sk_GENERAL_NAME_insert(st, val, i) SKM_sk_insert(GENERAL_NAME, (st), (val), (i))\n# define sk_GENERAL_NAME_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(GENERAL_NAME, (st), (cmp))\n# define sk_GENERAL_NAME_dup(st) SKM_sk_dup(GENERAL_NAME, st)\n# define sk_GENERAL_NAME_pop_free(st, free_func) SKM_sk_pop_free(GENERAL_NAME, (st), (free_func))\n# define sk_GENERAL_NAME_shift(st) SKM_sk_shift(GENERAL_NAME, (st))\n# define sk_GENERAL_NAME_pop(st) SKM_sk_pop(GENERAL_NAME, (st))\n# define sk_GENERAL_NAME_sort(st) SKM_sk_sort(GENERAL_NAME, (st))\n# define sk_GENERAL_NAME_is_sorted(st) SKM_sk_is_sorted(GENERAL_NAME, (st))\n# define sk_GENERAL_NAMES_new(cmp) SKM_sk_new(GENERAL_NAMES, (cmp))\n# define sk_GENERAL_NAMES_new_null() SKM_sk_new_null(GENERAL_NAMES)\n# define sk_GENERAL_NAMES_free(st) SKM_sk_free(GENERAL_NAMES, (st))\n# define sk_GENERAL_NAMES_num(st) SKM_sk_num(GENERAL_NAMES, (st))\n# define sk_GENERAL_NAMES_value(st, i) SKM_sk_value(GENERAL_NAMES, (st), (i))\n# define sk_GENERAL_NAMES_set(st, i, val) SKM_sk_set(GENERAL_NAMES, (st), (i), (val))\n# define sk_GENERAL_NAMES_zero(st) SKM_sk_zero(GENERAL_NAMES, (st))\n# define sk_GENERAL_NAMES_push(st, val) SKM_sk_push(GENERAL_NAMES, (st), (val))\n# define sk_GENERAL_NAMES_unshift(st, val) SKM_sk_unshift(GENERAL_NAMES, (st), (val))\n# define sk_GENERAL_NAMES_find(st, val) SKM_sk_find(GENERAL_NAMES, (st), (val))\n# define sk_GENERAL_NAMES_find_ex(st, val) SKM_sk_find_ex(GENERAL_NAMES, (st), (val))\n# define sk_GENERAL_NAMES_delete(st, i) SKM_sk_delete(GENERAL_NAMES, (st), (i))\n# define sk_GENERAL_NAMES_delete_ptr(st, ptr) SKM_sk_delete_ptr(GENERAL_NAMES, (st), (ptr))\n# define sk_GENERAL_NAMES_insert(st, val, i) SKM_sk_insert(GENERAL_NAMES, (st), (val), (i))\n# define sk_GENERAL_NAMES_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(GENERAL_NAMES, (st), (cmp))\n# define sk_GENERAL_NAMES_dup(st) SKM_sk_dup(GENERAL_NAMES, st)\n# define sk_GENERAL_NAMES_pop_free(st, free_func) SKM_sk_pop_free(GENERAL_NAMES, (st), (free_func))\n# define sk_GENERAL_NAMES_shift(st) SKM_sk_shift(GENERAL_NAMES, (st))\n# define sk_GENERAL_NAMES_pop(st) SKM_sk_pop(GENERAL_NAMES, (st))\n# define sk_GENERAL_NAMES_sort(st) SKM_sk_sort(GENERAL_NAMES, (st))\n# define sk_GENERAL_NAMES_is_sorted(st) SKM_sk_is_sorted(GENERAL_NAMES, (st))\n# define sk_GENERAL_SUBTREE_new(cmp) SKM_sk_new(GENERAL_SUBTREE, (cmp))\n# define sk_GENERAL_SUBTREE_new_null() SKM_sk_new_null(GENERAL_SUBTREE)\n# define sk_GENERAL_SUBTREE_free(st) SKM_sk_free(GENERAL_SUBTREE, (st))\n# define sk_GENERAL_SUBTREE_num(st) SKM_sk_num(GENERAL_SUBTREE, (st))\n# define sk_GENERAL_SUBTREE_value(st, i) SKM_sk_value(GENERAL_SUBTREE, (st), (i))\n# define sk_GENERAL_SUBTREE_set(st, i, val) SKM_sk_set(GENERAL_SUBTREE, (st), (i), (val))\n# define sk_GENERAL_SUBTREE_zero(st) SKM_sk_zero(GENERAL_SUBTREE, (st))\n# define sk_GENERAL_SUBTREE_push(st, val) SKM_sk_push(GENERAL_SUBTREE, (st), (val))\n# define sk_GENERAL_SUBTREE_unshift(st, val) SKM_sk_unshift(GENERAL_SUBTREE, (st), (val))\n# define sk_GENERAL_SUBTREE_find(st, val) SKM_sk_find(GENERAL_SUBTREE, (st), (val))\n# define sk_GENERAL_SUBTREE_find_ex(st, val) SKM_sk_find_ex(GENERAL_SUBTREE, (st), (val))\n# define sk_GENERAL_SUBTREE_delete(st, i) SKM_sk_delete(GENERAL_SUBTREE, (st), (i))\n# define sk_GENERAL_SUBTREE_delete_ptr(st, ptr) SKM_sk_delete_ptr(GENERAL_SUBTREE, (st), (ptr))\n# define sk_GENERAL_SUBTREE_insert(st, val, i) SKM_sk_insert(GENERAL_SUBTREE, (st), (val), (i))\n# define sk_GENERAL_SUBTREE_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(GENERAL_SUBTREE, (st), (cmp))\n# define sk_GENERAL_SUBTREE_dup(st) SKM_sk_dup(GENERAL_SUBTREE, st)\n# define sk_GENERAL_SUBTREE_pop_free(st, free_func) SKM_sk_pop_free(GENERAL_SUBTREE, (st), (free_func))\n# define sk_GENERAL_SUBTREE_shift(st) SKM_sk_shift(GENERAL_SUBTREE, (st))\n# define sk_GENERAL_SUBTREE_pop(st) SKM_sk_pop(GENERAL_SUBTREE, (st))\n# define sk_GENERAL_SUBTREE_sort(st) SKM_sk_sort(GENERAL_SUBTREE, (st))\n# define sk_GENERAL_SUBTREE_is_sorted(st) SKM_sk_is_sorted(GENERAL_SUBTREE, (st))\n# define sk_IPAddressFamily_new(cmp) SKM_sk_new(IPAddressFamily, (cmp))\n# define sk_IPAddressFamily_new_null() SKM_sk_new_null(IPAddressFamily)\n# define sk_IPAddressFamily_free(st) SKM_sk_free(IPAddressFamily, (st))\n# define sk_IPAddressFamily_num(st) SKM_sk_num(IPAddressFamily, (st))\n# define sk_IPAddressFamily_value(st, i) SKM_sk_value(IPAddressFamily, (st), (i))\n# define sk_IPAddressFamily_set(st, i, val) SKM_sk_set(IPAddressFamily, (st), (i), (val))\n# define sk_IPAddressFamily_zero(st) SKM_sk_zero(IPAddressFamily, (st))\n# define sk_IPAddressFamily_push(st, val) SKM_sk_push(IPAddressFamily, (st), (val))\n# define sk_IPAddressFamily_unshift(st, val) SKM_sk_unshift(IPAddressFamily, (st), (val))\n# define sk_IPAddressFamily_find(st, val) SKM_sk_find(IPAddressFamily, (st), (val))\n# define sk_IPAddressFamily_find_ex(st, val) SKM_sk_find_ex(IPAddressFamily, (st), (val))\n# define sk_IPAddressFamily_delete(st, i) SKM_sk_delete(IPAddressFamily, (st), (i))\n# define sk_IPAddressFamily_delete_ptr(st, ptr) SKM_sk_delete_ptr(IPAddressFamily, (st), (ptr))\n# define sk_IPAddressFamily_insert(st, val, i) SKM_sk_insert(IPAddressFamily, (st), (val), (i))\n# define sk_IPAddressFamily_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(IPAddressFamily, (st), (cmp))\n# define sk_IPAddressFamily_dup(st) SKM_sk_dup(IPAddressFamily, st)\n# define sk_IPAddressFamily_pop_free(st, free_func) SKM_sk_pop_free(IPAddressFamily, (st), (free_func))\n# define sk_IPAddressFamily_shift(st) SKM_sk_shift(IPAddressFamily, (st))\n# define sk_IPAddressFamily_pop(st) SKM_sk_pop(IPAddressFamily, (st))\n# define sk_IPAddressFamily_sort(st) SKM_sk_sort(IPAddressFamily, (st))\n# define sk_IPAddressFamily_is_sorted(st) SKM_sk_is_sorted(IPAddressFamily, (st))\n# define sk_IPAddressOrRange_new(cmp) SKM_sk_new(IPAddressOrRange, (cmp))\n# define sk_IPAddressOrRange_new_null() SKM_sk_new_null(IPAddressOrRange)\n# define sk_IPAddressOrRange_free(st) SKM_sk_free(IPAddressOrRange, (st))\n# define sk_IPAddressOrRange_num(st) SKM_sk_num(IPAddressOrRange, (st))\n# define sk_IPAddressOrRange_value(st, i) SKM_sk_value(IPAddressOrRange, (st), (i))\n# define sk_IPAddressOrRange_set(st, i, val) SKM_sk_set(IPAddressOrRange, (st), (i), (val))\n# define sk_IPAddressOrRange_zero(st) SKM_sk_zero(IPAddressOrRange, (st))\n# define sk_IPAddressOrRange_push(st, val) SKM_sk_push(IPAddressOrRange, (st), (val))\n# define sk_IPAddressOrRange_unshift(st, val) SKM_sk_unshift(IPAddressOrRange, (st), (val))\n# define sk_IPAddressOrRange_find(st, val) SKM_sk_find(IPAddressOrRange, (st), (val))\n# define sk_IPAddressOrRange_find_ex(st, val) SKM_sk_find_ex(IPAddressOrRange, (st), (val))\n# define sk_IPAddressOrRange_delete(st, i) SKM_sk_delete(IPAddressOrRange, (st), (i))\n# define sk_IPAddressOrRange_delete_ptr(st, ptr) SKM_sk_delete_ptr(IPAddressOrRange, (st), (ptr))\n# define sk_IPAddressOrRange_insert(st, val, i) SKM_sk_insert(IPAddressOrRange, (st), (val), (i))\n# define sk_IPAddressOrRange_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(IPAddressOrRange, (st), (cmp))\n# define sk_IPAddressOrRange_dup(st) SKM_sk_dup(IPAddressOrRange, st)\n# define sk_IPAddressOrRange_pop_free(st, free_func) SKM_sk_pop_free(IPAddressOrRange, (st), (free_func))\n# define sk_IPAddressOrRange_shift(st) SKM_sk_shift(IPAddressOrRange, (st))\n# define sk_IPAddressOrRange_pop(st) SKM_sk_pop(IPAddressOrRange, (st))\n# define sk_IPAddressOrRange_sort(st) SKM_sk_sort(IPAddressOrRange, (st))\n# define sk_IPAddressOrRange_is_sorted(st) SKM_sk_is_sorted(IPAddressOrRange, (st))\n# define sk_KRB5_APREQBODY_new(cmp) SKM_sk_new(KRB5_APREQBODY, (cmp))\n# define sk_KRB5_APREQBODY_new_null() SKM_sk_new_null(KRB5_APREQBODY)\n# define sk_KRB5_APREQBODY_free(st) SKM_sk_free(KRB5_APREQBODY, (st))\n# define sk_KRB5_APREQBODY_num(st) SKM_sk_num(KRB5_APREQBODY, (st))\n# define sk_KRB5_APREQBODY_value(st, i) SKM_sk_value(KRB5_APREQBODY, (st), (i))\n# define sk_KRB5_APREQBODY_set(st, i, val) SKM_sk_set(KRB5_APREQBODY, (st), (i), (val))\n# define sk_KRB5_APREQBODY_zero(st) SKM_sk_zero(KRB5_APREQBODY, (st))\n# define sk_KRB5_APREQBODY_push(st, val) SKM_sk_push(KRB5_APREQBODY, (st), (val))\n# define sk_KRB5_APREQBODY_unshift(st, val) SKM_sk_unshift(KRB5_APREQBODY, (st), (val))\n# define sk_KRB5_APREQBODY_find(st, val) SKM_sk_find(KRB5_APREQBODY, (st), (val))\n# define sk_KRB5_APREQBODY_find_ex(st, val) SKM_sk_find_ex(KRB5_APREQBODY, (st), (val))\n# define sk_KRB5_APREQBODY_delete(st, i) SKM_sk_delete(KRB5_APREQBODY, (st), (i))\n# define sk_KRB5_APREQBODY_delete_ptr(st, ptr) SKM_sk_delete_ptr(KRB5_APREQBODY, (st), (ptr))\n# define sk_KRB5_APREQBODY_insert(st, val, i) SKM_sk_insert(KRB5_APREQBODY, (st), (val), (i))\n# define sk_KRB5_APREQBODY_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(KRB5_APREQBODY, (st), (cmp))\n# define sk_KRB5_APREQBODY_dup(st) SKM_sk_dup(KRB5_APREQBODY, st)\n# define sk_KRB5_APREQBODY_pop_free(st, free_func) SKM_sk_pop_free(KRB5_APREQBODY, (st), (free_func))\n# define sk_KRB5_APREQBODY_shift(st) SKM_sk_shift(KRB5_APREQBODY, (st))\n# define sk_KRB5_APREQBODY_pop(st) SKM_sk_pop(KRB5_APREQBODY, (st))\n# define sk_KRB5_APREQBODY_sort(st) SKM_sk_sort(KRB5_APREQBODY, (st))\n# define sk_KRB5_APREQBODY_is_sorted(st) SKM_sk_is_sorted(KRB5_APREQBODY, (st))\n# define sk_KRB5_AUTHDATA_new(cmp) SKM_sk_new(KRB5_AUTHDATA, (cmp))\n# define sk_KRB5_AUTHDATA_new_null() SKM_sk_new_null(KRB5_AUTHDATA)\n# define sk_KRB5_AUTHDATA_free(st) SKM_sk_free(KRB5_AUTHDATA, (st))\n# define sk_KRB5_AUTHDATA_num(st) SKM_sk_num(KRB5_AUTHDATA, (st))\n# define sk_KRB5_AUTHDATA_value(st, i) SKM_sk_value(KRB5_AUTHDATA, (st), (i))\n# define sk_KRB5_AUTHDATA_set(st, i, val) SKM_sk_set(KRB5_AUTHDATA, (st), (i), (val))\n# define sk_KRB5_AUTHDATA_zero(st) SKM_sk_zero(KRB5_AUTHDATA, (st))\n# define sk_KRB5_AUTHDATA_push(st, val) SKM_sk_push(KRB5_AUTHDATA, (st), (val))\n# define sk_KRB5_AUTHDATA_unshift(st, val) SKM_sk_unshift(KRB5_AUTHDATA, (st), (val))\n# define sk_KRB5_AUTHDATA_find(st, val) SKM_sk_find(KRB5_AUTHDATA, (st), (val))\n# define sk_KRB5_AUTHDATA_find_ex(st, val) SKM_sk_find_ex(KRB5_AUTHDATA, (st), (val))\n# define sk_KRB5_AUTHDATA_delete(st, i) SKM_sk_delete(KRB5_AUTHDATA, (st), (i))\n# define sk_KRB5_AUTHDATA_delete_ptr(st, ptr) SKM_sk_delete_ptr(KRB5_AUTHDATA, (st), (ptr))\n# define sk_KRB5_AUTHDATA_insert(st, val, i) SKM_sk_insert(KRB5_AUTHDATA, (st), (val), (i))\n# define sk_KRB5_AUTHDATA_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(KRB5_AUTHDATA, (st), (cmp))\n# define sk_KRB5_AUTHDATA_dup(st) SKM_sk_dup(KRB5_AUTHDATA, st)\n# define sk_KRB5_AUTHDATA_pop_free(st, free_func) SKM_sk_pop_free(KRB5_AUTHDATA, (st), (free_func))\n# define sk_KRB5_AUTHDATA_shift(st) SKM_sk_shift(KRB5_AUTHDATA, (st))\n# define sk_KRB5_AUTHDATA_pop(st) SKM_sk_pop(KRB5_AUTHDATA, (st))\n# define sk_KRB5_AUTHDATA_sort(st) SKM_sk_sort(KRB5_AUTHDATA, (st))\n# define sk_KRB5_AUTHDATA_is_sorted(st) SKM_sk_is_sorted(KRB5_AUTHDATA, (st))\n# define sk_KRB5_AUTHENTBODY_new(cmp) SKM_sk_new(KRB5_AUTHENTBODY, (cmp))\n# define sk_KRB5_AUTHENTBODY_new_null() SKM_sk_new_null(KRB5_AUTHENTBODY)\n# define sk_KRB5_AUTHENTBODY_free(st) SKM_sk_free(KRB5_AUTHENTBODY, (st))\n# define sk_KRB5_AUTHENTBODY_num(st) SKM_sk_num(KRB5_AUTHENTBODY, (st))\n# define sk_KRB5_AUTHENTBODY_value(st, i) SKM_sk_value(KRB5_AUTHENTBODY, (st), (i))\n# define sk_KRB5_AUTHENTBODY_set(st, i, val) SKM_sk_set(KRB5_AUTHENTBODY, (st), (i), (val))\n# define sk_KRB5_AUTHENTBODY_zero(st) SKM_sk_zero(KRB5_AUTHENTBODY, (st))\n# define sk_KRB5_AUTHENTBODY_push(st, val) SKM_sk_push(KRB5_AUTHENTBODY, (st), (val))\n# define sk_KRB5_AUTHENTBODY_unshift(st, val) SKM_sk_unshift(KRB5_AUTHENTBODY, (st), (val))\n# define sk_KRB5_AUTHENTBODY_find(st, val) SKM_sk_find(KRB5_AUTHENTBODY, (st), (val))\n# define sk_KRB5_AUTHENTBODY_find_ex(st, val) SKM_sk_find_ex(KRB5_AUTHENTBODY, (st), (val))\n# define sk_KRB5_AUTHENTBODY_delete(st, i) SKM_sk_delete(KRB5_AUTHENTBODY, (st), (i))\n# define sk_KRB5_AUTHENTBODY_delete_ptr(st, ptr) SKM_sk_delete_ptr(KRB5_AUTHENTBODY, (st), (ptr))\n# define sk_KRB5_AUTHENTBODY_insert(st, val, i) SKM_sk_insert(KRB5_AUTHENTBODY, (st), (val), (i))\n# define sk_KRB5_AUTHENTBODY_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(KRB5_AUTHENTBODY, (st), (cmp))\n# define sk_KRB5_AUTHENTBODY_dup(st) SKM_sk_dup(KRB5_AUTHENTBODY, st)\n# define sk_KRB5_AUTHENTBODY_pop_free(st, free_func) SKM_sk_pop_free(KRB5_AUTHENTBODY, (st), (free_func))\n# define sk_KRB5_AUTHENTBODY_shift(st) SKM_sk_shift(KRB5_AUTHENTBODY, (st))\n# define sk_KRB5_AUTHENTBODY_pop(st) SKM_sk_pop(KRB5_AUTHENTBODY, (st))\n# define sk_KRB5_AUTHENTBODY_sort(st) SKM_sk_sort(KRB5_AUTHENTBODY, (st))\n# define sk_KRB5_AUTHENTBODY_is_sorted(st) SKM_sk_is_sorted(KRB5_AUTHENTBODY, (st))\n# define sk_KRB5_CHECKSUM_new(cmp) SKM_sk_new(KRB5_CHECKSUM, (cmp))\n# define sk_KRB5_CHECKSUM_new_null() SKM_sk_new_null(KRB5_CHECKSUM)\n# define sk_KRB5_CHECKSUM_free(st) SKM_sk_free(KRB5_CHECKSUM, (st))\n# define sk_KRB5_CHECKSUM_num(st) SKM_sk_num(KRB5_CHECKSUM, (st))\n# define sk_KRB5_CHECKSUM_value(st, i) SKM_sk_value(KRB5_CHECKSUM, (st), (i))\n# define sk_KRB5_CHECKSUM_set(st, i, val) SKM_sk_set(KRB5_CHECKSUM, (st), (i), (val))\n# define sk_KRB5_CHECKSUM_zero(st) SKM_sk_zero(KRB5_CHECKSUM, (st))\n# define sk_KRB5_CHECKSUM_push(st, val) SKM_sk_push(KRB5_CHECKSUM, (st), (val))\n# define sk_KRB5_CHECKSUM_unshift(st, val) SKM_sk_unshift(KRB5_CHECKSUM, (st), (val))\n# define sk_KRB5_CHECKSUM_find(st, val) SKM_sk_find(KRB5_CHECKSUM, (st), (val))\n# define sk_KRB5_CHECKSUM_find_ex(st, val) SKM_sk_find_ex(KRB5_CHECKSUM, (st), (val))\n# define sk_KRB5_CHECKSUM_delete(st, i) SKM_sk_delete(KRB5_CHECKSUM, (st), (i))\n# define sk_KRB5_CHECKSUM_delete_ptr(st, ptr) SKM_sk_delete_ptr(KRB5_CHECKSUM, (st), (ptr))\n# define sk_KRB5_CHECKSUM_insert(st, val, i) SKM_sk_insert(KRB5_CHECKSUM, (st), (val), (i))\n# define sk_KRB5_CHECKSUM_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(KRB5_CHECKSUM, (st), (cmp))\n# define sk_KRB5_CHECKSUM_dup(st) SKM_sk_dup(KRB5_CHECKSUM, st)\n# define sk_KRB5_CHECKSUM_pop_free(st, free_func) SKM_sk_pop_free(KRB5_CHECKSUM, (st), (free_func))\n# define sk_KRB5_CHECKSUM_shift(st) SKM_sk_shift(KRB5_CHECKSUM, (st))\n# define sk_KRB5_CHECKSUM_pop(st) SKM_sk_pop(KRB5_CHECKSUM, (st))\n# define sk_KRB5_CHECKSUM_sort(st) SKM_sk_sort(KRB5_CHECKSUM, (st))\n# define sk_KRB5_CHECKSUM_is_sorted(st) SKM_sk_is_sorted(KRB5_CHECKSUM, (st))\n# define sk_KRB5_ENCDATA_new(cmp) SKM_sk_new(KRB5_ENCDATA, (cmp))\n# define sk_KRB5_ENCDATA_new_null() SKM_sk_new_null(KRB5_ENCDATA)\n# define sk_KRB5_ENCDATA_free(st) SKM_sk_free(KRB5_ENCDATA, (st))\n# define sk_KRB5_ENCDATA_num(st) SKM_sk_num(KRB5_ENCDATA, (st))\n# define sk_KRB5_ENCDATA_value(st, i) SKM_sk_value(KRB5_ENCDATA, (st), (i))\n# define sk_KRB5_ENCDATA_set(st, i, val) SKM_sk_set(KRB5_ENCDATA, (st), (i), (val))\n# define sk_KRB5_ENCDATA_zero(st) SKM_sk_zero(KRB5_ENCDATA, (st))\n# define sk_KRB5_ENCDATA_push(st, val) SKM_sk_push(KRB5_ENCDATA, (st), (val))\n# define sk_KRB5_ENCDATA_unshift(st, val) SKM_sk_unshift(KRB5_ENCDATA, (st), (val))\n# define sk_KRB5_ENCDATA_find(st, val) SKM_sk_find(KRB5_ENCDATA, (st), (val))\n# define sk_KRB5_ENCDATA_find_ex(st, val) SKM_sk_find_ex(KRB5_ENCDATA, (st), (val))\n# define sk_KRB5_ENCDATA_delete(st, i) SKM_sk_delete(KRB5_ENCDATA, (st), (i))\n# define sk_KRB5_ENCDATA_delete_ptr(st, ptr) SKM_sk_delete_ptr(KRB5_ENCDATA, (st), (ptr))\n# define sk_KRB5_ENCDATA_insert(st, val, i) SKM_sk_insert(KRB5_ENCDATA, (st), (val), (i))\n# define sk_KRB5_ENCDATA_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(KRB5_ENCDATA, (st), (cmp))\n# define sk_KRB5_ENCDATA_dup(st) SKM_sk_dup(KRB5_ENCDATA, st)\n# define sk_KRB5_ENCDATA_pop_free(st, free_func) SKM_sk_pop_free(KRB5_ENCDATA, (st), (free_func))\n# define sk_KRB5_ENCDATA_shift(st) SKM_sk_shift(KRB5_ENCDATA, (st))\n# define sk_KRB5_ENCDATA_pop(st) SKM_sk_pop(KRB5_ENCDATA, (st))\n# define sk_KRB5_ENCDATA_sort(st) SKM_sk_sort(KRB5_ENCDATA, (st))\n# define sk_KRB5_ENCDATA_is_sorted(st) SKM_sk_is_sorted(KRB5_ENCDATA, (st))\n# define sk_KRB5_ENCKEY_new(cmp) SKM_sk_new(KRB5_ENCKEY, (cmp))\n# define sk_KRB5_ENCKEY_new_null() SKM_sk_new_null(KRB5_ENCKEY)\n# define sk_KRB5_ENCKEY_free(st) SKM_sk_free(KRB5_ENCKEY, (st))\n# define sk_KRB5_ENCKEY_num(st) SKM_sk_num(KRB5_ENCKEY, (st))\n# define sk_KRB5_ENCKEY_value(st, i) SKM_sk_value(KRB5_ENCKEY, (st), (i))\n# define sk_KRB5_ENCKEY_set(st, i, val) SKM_sk_set(KRB5_ENCKEY, (st), (i), (val))\n# define sk_KRB5_ENCKEY_zero(st) SKM_sk_zero(KRB5_ENCKEY, (st))\n# define sk_KRB5_ENCKEY_push(st, val) SKM_sk_push(KRB5_ENCKEY, (st), (val))\n# define sk_KRB5_ENCKEY_unshift(st, val) SKM_sk_unshift(KRB5_ENCKEY, (st), (val))\n# define sk_KRB5_ENCKEY_find(st, val) SKM_sk_find(KRB5_ENCKEY, (st), (val))\n# define sk_KRB5_ENCKEY_find_ex(st, val) SKM_sk_find_ex(KRB5_ENCKEY, (st), (val))\n# define sk_KRB5_ENCKEY_delete(st, i) SKM_sk_delete(KRB5_ENCKEY, (st), (i))\n# define sk_KRB5_ENCKEY_delete_ptr(st, ptr) SKM_sk_delete_ptr(KRB5_ENCKEY, (st), (ptr))\n# define sk_KRB5_ENCKEY_insert(st, val, i) SKM_sk_insert(KRB5_ENCKEY, (st), (val), (i))\n# define sk_KRB5_ENCKEY_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(KRB5_ENCKEY, (st), (cmp))\n# define sk_KRB5_ENCKEY_dup(st) SKM_sk_dup(KRB5_ENCKEY, st)\n# define sk_KRB5_ENCKEY_pop_free(st, free_func) SKM_sk_pop_free(KRB5_ENCKEY, (st), (free_func))\n# define sk_KRB5_ENCKEY_shift(st) SKM_sk_shift(KRB5_ENCKEY, (st))\n# define sk_KRB5_ENCKEY_pop(st) SKM_sk_pop(KRB5_ENCKEY, (st))\n# define sk_KRB5_ENCKEY_sort(st) SKM_sk_sort(KRB5_ENCKEY, (st))\n# define sk_KRB5_ENCKEY_is_sorted(st) SKM_sk_is_sorted(KRB5_ENCKEY, (st))\n# define sk_KRB5_PRINCNAME_new(cmp) SKM_sk_new(KRB5_PRINCNAME, (cmp))\n# define sk_KRB5_PRINCNAME_new_null() SKM_sk_new_null(KRB5_PRINCNAME)\n# define sk_KRB5_PRINCNAME_free(st) SKM_sk_free(KRB5_PRINCNAME, (st))\n# define sk_KRB5_PRINCNAME_num(st) SKM_sk_num(KRB5_PRINCNAME, (st))\n# define sk_KRB5_PRINCNAME_value(st, i) SKM_sk_value(KRB5_PRINCNAME, (st), (i))\n# define sk_KRB5_PRINCNAME_set(st, i, val) SKM_sk_set(KRB5_PRINCNAME, (st), (i), (val))\n# define sk_KRB5_PRINCNAME_zero(st) SKM_sk_zero(KRB5_PRINCNAME, (st))\n# define sk_KRB5_PRINCNAME_push(st, val) SKM_sk_push(KRB5_PRINCNAME, (st), (val))\n# define sk_KRB5_PRINCNAME_unshift(st, val) SKM_sk_unshift(KRB5_PRINCNAME, (st), (val))\n# define sk_KRB5_PRINCNAME_find(st, val) SKM_sk_find(KRB5_PRINCNAME, (st), (val))\n# define sk_KRB5_PRINCNAME_find_ex(st, val) SKM_sk_find_ex(KRB5_PRINCNAME, (st), (val))\n# define sk_KRB5_PRINCNAME_delete(st, i) SKM_sk_delete(KRB5_PRINCNAME, (st), (i))\n# define sk_KRB5_PRINCNAME_delete_ptr(st, ptr) SKM_sk_delete_ptr(KRB5_PRINCNAME, (st), (ptr))\n# define sk_KRB5_PRINCNAME_insert(st, val, i) SKM_sk_insert(KRB5_PRINCNAME, (st), (val), (i))\n# define sk_KRB5_PRINCNAME_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(KRB5_PRINCNAME, (st), (cmp))\n# define sk_KRB5_PRINCNAME_dup(st) SKM_sk_dup(KRB5_PRINCNAME, st)\n# define sk_KRB5_PRINCNAME_pop_free(st, free_func) SKM_sk_pop_free(KRB5_PRINCNAME, (st), (free_func))\n# define sk_KRB5_PRINCNAME_shift(st) SKM_sk_shift(KRB5_PRINCNAME, (st))\n# define sk_KRB5_PRINCNAME_pop(st) SKM_sk_pop(KRB5_PRINCNAME, (st))\n# define sk_KRB5_PRINCNAME_sort(st) SKM_sk_sort(KRB5_PRINCNAME, (st))\n# define sk_KRB5_PRINCNAME_is_sorted(st) SKM_sk_is_sorted(KRB5_PRINCNAME, (st))\n# define sk_KRB5_TKTBODY_new(cmp) SKM_sk_new(KRB5_TKTBODY, (cmp))\n# define sk_KRB5_TKTBODY_new_null() SKM_sk_new_null(KRB5_TKTBODY)\n# define sk_KRB5_TKTBODY_free(st) SKM_sk_free(KRB5_TKTBODY, (st))\n# define sk_KRB5_TKTBODY_num(st) SKM_sk_num(KRB5_TKTBODY, (st))\n# define sk_KRB5_TKTBODY_value(st, i) SKM_sk_value(KRB5_TKTBODY, (st), (i))\n# define sk_KRB5_TKTBODY_set(st, i, val) SKM_sk_set(KRB5_TKTBODY, (st), (i), (val))\n# define sk_KRB5_TKTBODY_zero(st) SKM_sk_zero(KRB5_TKTBODY, (st))\n# define sk_KRB5_TKTBODY_push(st, val) SKM_sk_push(KRB5_TKTBODY, (st), (val))\n# define sk_KRB5_TKTBODY_unshift(st, val) SKM_sk_unshift(KRB5_TKTBODY, (st), (val))\n# define sk_KRB5_TKTBODY_find(st, val) SKM_sk_find(KRB5_TKTBODY, (st), (val))\n# define sk_KRB5_TKTBODY_find_ex(st, val) SKM_sk_find_ex(KRB5_TKTBODY, (st), (val))\n# define sk_KRB5_TKTBODY_delete(st, i) SKM_sk_delete(KRB5_TKTBODY, (st), (i))\n# define sk_KRB5_TKTBODY_delete_ptr(st, ptr) SKM_sk_delete_ptr(KRB5_TKTBODY, (st), (ptr))\n# define sk_KRB5_TKTBODY_insert(st, val, i) SKM_sk_insert(KRB5_TKTBODY, (st), (val), (i))\n# define sk_KRB5_TKTBODY_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(KRB5_TKTBODY, (st), (cmp))\n# define sk_KRB5_TKTBODY_dup(st) SKM_sk_dup(KRB5_TKTBODY, st)\n# define sk_KRB5_TKTBODY_pop_free(st, free_func) SKM_sk_pop_free(KRB5_TKTBODY, (st), (free_func))\n# define sk_KRB5_TKTBODY_shift(st) SKM_sk_shift(KRB5_TKTBODY, (st))\n# define sk_KRB5_TKTBODY_pop(st) SKM_sk_pop(KRB5_TKTBODY, (st))\n# define sk_KRB5_TKTBODY_sort(st) SKM_sk_sort(KRB5_TKTBODY, (st))\n# define sk_KRB5_TKTBODY_is_sorted(st) SKM_sk_is_sorted(KRB5_TKTBODY, (st))\n# define sk_MEM_OBJECT_DATA_new(cmp) SKM_sk_new(MEM_OBJECT_DATA, (cmp))\n# define sk_MEM_OBJECT_DATA_new_null() SKM_sk_new_null(MEM_OBJECT_DATA)\n# define sk_MEM_OBJECT_DATA_free(st) SKM_sk_free(MEM_OBJECT_DATA, (st))\n# define sk_MEM_OBJECT_DATA_num(st) SKM_sk_num(MEM_OBJECT_DATA, (st))\n# define sk_MEM_OBJECT_DATA_value(st, i) SKM_sk_value(MEM_OBJECT_DATA, (st), (i))\n# define sk_MEM_OBJECT_DATA_set(st, i, val) SKM_sk_set(MEM_OBJECT_DATA, (st), (i), (val))\n# define sk_MEM_OBJECT_DATA_zero(st) SKM_sk_zero(MEM_OBJECT_DATA, (st))\n# define sk_MEM_OBJECT_DATA_push(st, val) SKM_sk_push(MEM_OBJECT_DATA, (st), (val))\n# define sk_MEM_OBJECT_DATA_unshift(st, val) SKM_sk_unshift(MEM_OBJECT_DATA, (st), (val))\n# define sk_MEM_OBJECT_DATA_find(st, val) SKM_sk_find(MEM_OBJECT_DATA, (st), (val))\n# define sk_MEM_OBJECT_DATA_find_ex(st, val) SKM_sk_find_ex(MEM_OBJECT_DATA, (st), (val))\n# define sk_MEM_OBJECT_DATA_delete(st, i) SKM_sk_delete(MEM_OBJECT_DATA, (st), (i))\n# define sk_MEM_OBJECT_DATA_delete_ptr(st, ptr) SKM_sk_delete_ptr(MEM_OBJECT_DATA, (st), (ptr))\n# define sk_MEM_OBJECT_DATA_insert(st, val, i) SKM_sk_insert(MEM_OBJECT_DATA, (st), (val), (i))\n# define sk_MEM_OBJECT_DATA_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(MEM_OBJECT_DATA, (st), (cmp))\n# define sk_MEM_OBJECT_DATA_dup(st) SKM_sk_dup(MEM_OBJECT_DATA, st)\n# define sk_MEM_OBJECT_DATA_pop_free(st, free_func) SKM_sk_pop_free(MEM_OBJECT_DATA, (st), (free_func))\n# define sk_MEM_OBJECT_DATA_shift(st) SKM_sk_shift(MEM_OBJECT_DATA, (st))\n# define sk_MEM_OBJECT_DATA_pop(st) SKM_sk_pop(MEM_OBJECT_DATA, (st))\n# define sk_MEM_OBJECT_DATA_sort(st) SKM_sk_sort(MEM_OBJECT_DATA, (st))\n# define sk_MEM_OBJECT_DATA_is_sorted(st) SKM_sk_is_sorted(MEM_OBJECT_DATA, (st))\n# define sk_MIME_HEADER_new(cmp) SKM_sk_new(MIME_HEADER, (cmp))\n# define sk_MIME_HEADER_new_null() SKM_sk_new_null(MIME_HEADER)\n# define sk_MIME_HEADER_free(st) SKM_sk_free(MIME_HEADER, (st))\n# define sk_MIME_HEADER_num(st) SKM_sk_num(MIME_HEADER, (st))\n# define sk_MIME_HEADER_value(st, i) SKM_sk_value(MIME_HEADER, (st), (i))\n# define sk_MIME_HEADER_set(st, i, val) SKM_sk_set(MIME_HEADER, (st), (i), (val))\n# define sk_MIME_HEADER_zero(st) SKM_sk_zero(MIME_HEADER, (st))\n# define sk_MIME_HEADER_push(st, val) SKM_sk_push(MIME_HEADER, (st), (val))\n# define sk_MIME_HEADER_unshift(st, val) SKM_sk_unshift(MIME_HEADER, (st), (val))\n# define sk_MIME_HEADER_find(st, val) SKM_sk_find(MIME_HEADER, (st), (val))\n# define sk_MIME_HEADER_find_ex(st, val) SKM_sk_find_ex(MIME_HEADER, (st), (val))\n# define sk_MIME_HEADER_delete(st, i) SKM_sk_delete(MIME_HEADER, (st), (i))\n# define sk_MIME_HEADER_delete_ptr(st, ptr) SKM_sk_delete_ptr(MIME_HEADER, (st), (ptr))\n# define sk_MIME_HEADER_insert(st, val, i) SKM_sk_insert(MIME_HEADER, (st), (val), (i))\n# define sk_MIME_HEADER_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(MIME_HEADER, (st), (cmp))\n# define sk_MIME_HEADER_dup(st) SKM_sk_dup(MIME_HEADER, st)\n# define sk_MIME_HEADER_pop_free(st, free_func) SKM_sk_pop_free(MIME_HEADER, (st), (free_func))\n# define sk_MIME_HEADER_shift(st) SKM_sk_shift(MIME_HEADER, (st))\n# define sk_MIME_HEADER_pop(st) SKM_sk_pop(MIME_HEADER, (st))\n# define sk_MIME_HEADER_sort(st) SKM_sk_sort(MIME_HEADER, (st))\n# define sk_MIME_HEADER_is_sorted(st) SKM_sk_is_sorted(MIME_HEADER, (st))\n# define sk_MIME_PARAM_new(cmp) SKM_sk_new(MIME_PARAM, (cmp))\n# define sk_MIME_PARAM_new_null() SKM_sk_new_null(MIME_PARAM)\n# define sk_MIME_PARAM_free(st) SKM_sk_free(MIME_PARAM, (st))\n# define sk_MIME_PARAM_num(st) SKM_sk_num(MIME_PARAM, (st))\n# define sk_MIME_PARAM_value(st, i) SKM_sk_value(MIME_PARAM, (st), (i))\n# define sk_MIME_PARAM_set(st, i, val) SKM_sk_set(MIME_PARAM, (st), (i), (val))\n# define sk_MIME_PARAM_zero(st) SKM_sk_zero(MIME_PARAM, (st))\n# define sk_MIME_PARAM_push(st, val) SKM_sk_push(MIME_PARAM, (st), (val))\n# define sk_MIME_PARAM_unshift(st, val) SKM_sk_unshift(MIME_PARAM, (st), (val))\n# define sk_MIME_PARAM_find(st, val) SKM_sk_find(MIME_PARAM, (st), (val))\n# define sk_MIME_PARAM_find_ex(st, val) SKM_sk_find_ex(MIME_PARAM, (st), (val))\n# define sk_MIME_PARAM_delete(st, i) SKM_sk_delete(MIME_PARAM, (st), (i))\n# define sk_MIME_PARAM_delete_ptr(st, ptr) SKM_sk_delete_ptr(MIME_PARAM, (st), (ptr))\n# define sk_MIME_PARAM_insert(st, val, i) SKM_sk_insert(MIME_PARAM, (st), (val), (i))\n# define sk_MIME_PARAM_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(MIME_PARAM, (st), (cmp))\n# define sk_MIME_PARAM_dup(st) SKM_sk_dup(MIME_PARAM, st)\n# define sk_MIME_PARAM_pop_free(st, free_func) SKM_sk_pop_free(MIME_PARAM, (st), (free_func))\n# define sk_MIME_PARAM_shift(st) SKM_sk_shift(MIME_PARAM, (st))\n# define sk_MIME_PARAM_pop(st) SKM_sk_pop(MIME_PARAM, (st))\n# define sk_MIME_PARAM_sort(st) SKM_sk_sort(MIME_PARAM, (st))\n# define sk_MIME_PARAM_is_sorted(st) SKM_sk_is_sorted(MIME_PARAM, (st))\n# define sk_NAME_FUNCS_new(cmp) SKM_sk_new(NAME_FUNCS, (cmp))\n# define sk_NAME_FUNCS_new_null() SKM_sk_new_null(NAME_FUNCS)\n# define sk_NAME_FUNCS_free(st) SKM_sk_free(NAME_FUNCS, (st))\n# define sk_NAME_FUNCS_num(st) SKM_sk_num(NAME_FUNCS, (st))\n# define sk_NAME_FUNCS_value(st, i) SKM_sk_value(NAME_FUNCS, (st), (i))\n# define sk_NAME_FUNCS_set(st, i, val) SKM_sk_set(NAME_FUNCS, (st), (i), (val))\n# define sk_NAME_FUNCS_zero(st) SKM_sk_zero(NAME_FUNCS, (st))\n# define sk_NAME_FUNCS_push(st, val) SKM_sk_push(NAME_FUNCS, (st), (val))\n# define sk_NAME_FUNCS_unshift(st, val) SKM_sk_unshift(NAME_FUNCS, (st), (val))\n# define sk_NAME_FUNCS_find(st, val) SKM_sk_find(NAME_FUNCS, (st), (val))\n# define sk_NAME_FUNCS_find_ex(st, val) SKM_sk_find_ex(NAME_FUNCS, (st), (val))\n# define sk_NAME_FUNCS_delete(st, i) SKM_sk_delete(NAME_FUNCS, (st), (i))\n# define sk_NAME_FUNCS_delete_ptr(st, ptr) SKM_sk_delete_ptr(NAME_FUNCS, (st), (ptr))\n# define sk_NAME_FUNCS_insert(st, val, i) SKM_sk_insert(NAME_FUNCS, (st), (val), (i))\n# define sk_NAME_FUNCS_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(NAME_FUNCS, (st), (cmp))\n# define sk_NAME_FUNCS_dup(st) SKM_sk_dup(NAME_FUNCS, st)\n# define sk_NAME_FUNCS_pop_free(st, free_func) SKM_sk_pop_free(NAME_FUNCS, (st), (free_func))\n# define sk_NAME_FUNCS_shift(st) SKM_sk_shift(NAME_FUNCS, (st))\n# define sk_NAME_FUNCS_pop(st) SKM_sk_pop(NAME_FUNCS, (st))\n# define sk_NAME_FUNCS_sort(st) SKM_sk_sort(NAME_FUNCS, (st))\n# define sk_NAME_FUNCS_is_sorted(st) SKM_sk_is_sorted(NAME_FUNCS, (st))\n# define sk_OCSP_CERTID_new(cmp) SKM_sk_new(OCSP_CERTID, (cmp))\n# define sk_OCSP_CERTID_new_null() SKM_sk_new_null(OCSP_CERTID)\n# define sk_OCSP_CERTID_free(st) SKM_sk_free(OCSP_CERTID, (st))\n# define sk_OCSP_CERTID_num(st) SKM_sk_num(OCSP_CERTID, (st))\n# define sk_OCSP_CERTID_value(st, i) SKM_sk_value(OCSP_CERTID, (st), (i))\n# define sk_OCSP_CERTID_set(st, i, val) SKM_sk_set(OCSP_CERTID, (st), (i), (val))\n# define sk_OCSP_CERTID_zero(st) SKM_sk_zero(OCSP_CERTID, (st))\n# define sk_OCSP_CERTID_push(st, val) SKM_sk_push(OCSP_CERTID, (st), (val))\n# define sk_OCSP_CERTID_unshift(st, val) SKM_sk_unshift(OCSP_CERTID, (st), (val))\n# define sk_OCSP_CERTID_find(st, val) SKM_sk_find(OCSP_CERTID, (st), (val))\n# define sk_OCSP_CERTID_find_ex(st, val) SKM_sk_find_ex(OCSP_CERTID, (st), (val))\n# define sk_OCSP_CERTID_delete(st, i) SKM_sk_delete(OCSP_CERTID, (st), (i))\n# define sk_OCSP_CERTID_delete_ptr(st, ptr) SKM_sk_delete_ptr(OCSP_CERTID, (st), (ptr))\n# define sk_OCSP_CERTID_insert(st, val, i) SKM_sk_insert(OCSP_CERTID, (st), (val), (i))\n# define sk_OCSP_CERTID_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(OCSP_CERTID, (st), (cmp))\n# define sk_OCSP_CERTID_dup(st) SKM_sk_dup(OCSP_CERTID, st)\n# define sk_OCSP_CERTID_pop_free(st, free_func) SKM_sk_pop_free(OCSP_CERTID, (st), (free_func))\n# define sk_OCSP_CERTID_shift(st) SKM_sk_shift(OCSP_CERTID, (st))\n# define sk_OCSP_CERTID_pop(st) SKM_sk_pop(OCSP_CERTID, (st))\n# define sk_OCSP_CERTID_sort(st) SKM_sk_sort(OCSP_CERTID, (st))\n# define sk_OCSP_CERTID_is_sorted(st) SKM_sk_is_sorted(OCSP_CERTID, (st))\n# define sk_OCSP_ONEREQ_new(cmp) SKM_sk_new(OCSP_ONEREQ, (cmp))\n# define sk_OCSP_ONEREQ_new_null() SKM_sk_new_null(OCSP_ONEREQ)\n# define sk_OCSP_ONEREQ_free(st) SKM_sk_free(OCSP_ONEREQ, (st))\n# define sk_OCSP_ONEREQ_num(st) SKM_sk_num(OCSP_ONEREQ, (st))\n# define sk_OCSP_ONEREQ_value(st, i) SKM_sk_value(OCSP_ONEREQ, (st), (i))\n# define sk_OCSP_ONEREQ_set(st, i, val) SKM_sk_set(OCSP_ONEREQ, (st), (i), (val))\n# define sk_OCSP_ONEREQ_zero(st) SKM_sk_zero(OCSP_ONEREQ, (st))\n# define sk_OCSP_ONEREQ_push(st, val) SKM_sk_push(OCSP_ONEREQ, (st), (val))\n# define sk_OCSP_ONEREQ_unshift(st, val) SKM_sk_unshift(OCSP_ONEREQ, (st), (val))\n# define sk_OCSP_ONEREQ_find(st, val) SKM_sk_find(OCSP_ONEREQ, (st), (val))\n# define sk_OCSP_ONEREQ_find_ex(st, val) SKM_sk_find_ex(OCSP_ONEREQ, (st), (val))\n# define sk_OCSP_ONEREQ_delete(st, i) SKM_sk_delete(OCSP_ONEREQ, (st), (i))\n# define sk_OCSP_ONEREQ_delete_ptr(st, ptr) SKM_sk_delete_ptr(OCSP_ONEREQ, (st), (ptr))\n# define sk_OCSP_ONEREQ_insert(st, val, i) SKM_sk_insert(OCSP_ONEREQ, (st), (val), (i))\n# define sk_OCSP_ONEREQ_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(OCSP_ONEREQ, (st), (cmp))\n# define sk_OCSP_ONEREQ_dup(st) SKM_sk_dup(OCSP_ONEREQ, st)\n# define sk_OCSP_ONEREQ_pop_free(st, free_func) SKM_sk_pop_free(OCSP_ONEREQ, (st), (free_func))\n# define sk_OCSP_ONEREQ_shift(st) SKM_sk_shift(OCSP_ONEREQ, (st))\n# define sk_OCSP_ONEREQ_pop(st) SKM_sk_pop(OCSP_ONEREQ, (st))\n# define sk_OCSP_ONEREQ_sort(st) SKM_sk_sort(OCSP_ONEREQ, (st))\n# define sk_OCSP_ONEREQ_is_sorted(st) SKM_sk_is_sorted(OCSP_ONEREQ, (st))\n# define sk_OCSP_RESPID_new(cmp) SKM_sk_new(OCSP_RESPID, (cmp))\n# define sk_OCSP_RESPID_new_null() SKM_sk_new_null(OCSP_RESPID)\n# define sk_OCSP_RESPID_free(st) SKM_sk_free(OCSP_RESPID, (st))\n# define sk_OCSP_RESPID_num(st) SKM_sk_num(OCSP_RESPID, (st))\n# define sk_OCSP_RESPID_value(st, i) SKM_sk_value(OCSP_RESPID, (st), (i))\n# define sk_OCSP_RESPID_set(st, i, val) SKM_sk_set(OCSP_RESPID, (st), (i), (val))\n# define sk_OCSP_RESPID_zero(st) SKM_sk_zero(OCSP_RESPID, (st))\n# define sk_OCSP_RESPID_push(st, val) SKM_sk_push(OCSP_RESPID, (st), (val))\n# define sk_OCSP_RESPID_unshift(st, val) SKM_sk_unshift(OCSP_RESPID, (st), (val))\n# define sk_OCSP_RESPID_find(st, val) SKM_sk_find(OCSP_RESPID, (st), (val))\n# define sk_OCSP_RESPID_find_ex(st, val) SKM_sk_find_ex(OCSP_RESPID, (st), (val))\n# define sk_OCSP_RESPID_delete(st, i) SKM_sk_delete(OCSP_RESPID, (st), (i))\n# define sk_OCSP_RESPID_delete_ptr(st, ptr) SKM_sk_delete_ptr(OCSP_RESPID, (st), (ptr))\n# define sk_OCSP_RESPID_insert(st, val, i) SKM_sk_insert(OCSP_RESPID, (st), (val), (i))\n# define sk_OCSP_RESPID_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(OCSP_RESPID, (st), (cmp))\n# define sk_OCSP_RESPID_dup(st) SKM_sk_dup(OCSP_RESPID, st)\n# define sk_OCSP_RESPID_pop_free(st, free_func) SKM_sk_pop_free(OCSP_RESPID, (st), (free_func))\n# define sk_OCSP_RESPID_shift(st) SKM_sk_shift(OCSP_RESPID, (st))\n# define sk_OCSP_RESPID_pop(st) SKM_sk_pop(OCSP_RESPID, (st))\n# define sk_OCSP_RESPID_sort(st) SKM_sk_sort(OCSP_RESPID, (st))\n# define sk_OCSP_RESPID_is_sorted(st) SKM_sk_is_sorted(OCSP_RESPID, (st))\n# define sk_OCSP_SINGLERESP_new(cmp) SKM_sk_new(OCSP_SINGLERESP, (cmp))\n# define sk_OCSP_SINGLERESP_new_null() SKM_sk_new_null(OCSP_SINGLERESP)\n# define sk_OCSP_SINGLERESP_free(st) SKM_sk_free(OCSP_SINGLERESP, (st))\n# define sk_OCSP_SINGLERESP_num(st) SKM_sk_num(OCSP_SINGLERESP, (st))\n# define sk_OCSP_SINGLERESP_value(st, i) SKM_sk_value(OCSP_SINGLERESP, (st), (i))\n# define sk_OCSP_SINGLERESP_set(st, i, val) SKM_sk_set(OCSP_SINGLERESP, (st), (i), (val))\n# define sk_OCSP_SINGLERESP_zero(st) SKM_sk_zero(OCSP_SINGLERESP, (st))\n# define sk_OCSP_SINGLERESP_push(st, val) SKM_sk_push(OCSP_SINGLERESP, (st), (val))\n# define sk_OCSP_SINGLERESP_unshift(st, val) SKM_sk_unshift(OCSP_SINGLERESP, (st), (val))\n# define sk_OCSP_SINGLERESP_find(st, val) SKM_sk_find(OCSP_SINGLERESP, (st), (val))\n# define sk_OCSP_SINGLERESP_find_ex(st, val) SKM_sk_find_ex(OCSP_SINGLERESP, (st), (val))\n# define sk_OCSP_SINGLERESP_delete(st, i) SKM_sk_delete(OCSP_SINGLERESP, (st), (i))\n# define sk_OCSP_SINGLERESP_delete_ptr(st, ptr) SKM_sk_delete_ptr(OCSP_SINGLERESP, (st), (ptr))\n# define sk_OCSP_SINGLERESP_insert(st, val, i) SKM_sk_insert(OCSP_SINGLERESP, (st), (val), (i))\n# define sk_OCSP_SINGLERESP_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(OCSP_SINGLERESP, (st), (cmp))\n# define sk_OCSP_SINGLERESP_dup(st) SKM_sk_dup(OCSP_SINGLERESP, st)\n# define sk_OCSP_SINGLERESP_pop_free(st, free_func) SKM_sk_pop_free(OCSP_SINGLERESP, (st), (free_func))\n# define sk_OCSP_SINGLERESP_shift(st) SKM_sk_shift(OCSP_SINGLERESP, (st))\n# define sk_OCSP_SINGLERESP_pop(st) SKM_sk_pop(OCSP_SINGLERESP, (st))\n# define sk_OCSP_SINGLERESP_sort(st) SKM_sk_sort(OCSP_SINGLERESP, (st))\n# define sk_OCSP_SINGLERESP_is_sorted(st) SKM_sk_is_sorted(OCSP_SINGLERESP, (st))\n# define sk_PKCS12_SAFEBAG_new(cmp) SKM_sk_new(PKCS12_SAFEBAG, (cmp))\n# define sk_PKCS12_SAFEBAG_new_null() SKM_sk_new_null(PKCS12_SAFEBAG)\n# define sk_PKCS12_SAFEBAG_free(st) SKM_sk_free(PKCS12_SAFEBAG, (st))\n# define sk_PKCS12_SAFEBAG_num(st) SKM_sk_num(PKCS12_SAFEBAG, (st))\n# define sk_PKCS12_SAFEBAG_value(st, i) SKM_sk_value(PKCS12_SAFEBAG, (st), (i))\n# define sk_PKCS12_SAFEBAG_set(st, i, val) SKM_sk_set(PKCS12_SAFEBAG, (st), (i), (val))\n# define sk_PKCS12_SAFEBAG_zero(st) SKM_sk_zero(PKCS12_SAFEBAG, (st))\n# define sk_PKCS12_SAFEBAG_push(st, val) SKM_sk_push(PKCS12_SAFEBAG, (st), (val))\n# define sk_PKCS12_SAFEBAG_unshift(st, val) SKM_sk_unshift(PKCS12_SAFEBAG, (st), (val))\n# define sk_PKCS12_SAFEBAG_find(st, val) SKM_sk_find(PKCS12_SAFEBAG, (st), (val))\n# define sk_PKCS12_SAFEBAG_find_ex(st, val) SKM_sk_find_ex(PKCS12_SAFEBAG, (st), (val))\n# define sk_PKCS12_SAFEBAG_delete(st, i) SKM_sk_delete(PKCS12_SAFEBAG, (st), (i))\n# define sk_PKCS12_SAFEBAG_delete_ptr(st, ptr) SKM_sk_delete_ptr(PKCS12_SAFEBAG, (st), (ptr))\n# define sk_PKCS12_SAFEBAG_insert(st, val, i) SKM_sk_insert(PKCS12_SAFEBAG, (st), (val), (i))\n# define sk_PKCS12_SAFEBAG_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(PKCS12_SAFEBAG, (st), (cmp))\n# define sk_PKCS12_SAFEBAG_dup(st) SKM_sk_dup(PKCS12_SAFEBAG, st)\n# define sk_PKCS12_SAFEBAG_pop_free(st, free_func) SKM_sk_pop_free(PKCS12_SAFEBAG, (st), (free_func))\n# define sk_PKCS12_SAFEBAG_shift(st) SKM_sk_shift(PKCS12_SAFEBAG, (st))\n# define sk_PKCS12_SAFEBAG_pop(st) SKM_sk_pop(PKCS12_SAFEBAG, (st))\n# define sk_PKCS12_SAFEBAG_sort(st) SKM_sk_sort(PKCS12_SAFEBAG, (st))\n# define sk_PKCS12_SAFEBAG_is_sorted(st) SKM_sk_is_sorted(PKCS12_SAFEBAG, (st))\n# define sk_PKCS7_new(cmp) SKM_sk_new(PKCS7, (cmp))\n# define sk_PKCS7_new_null() SKM_sk_new_null(PKCS7)\n# define sk_PKCS7_free(st) SKM_sk_free(PKCS7, (st))\n# define sk_PKCS7_num(st) SKM_sk_num(PKCS7, (st))\n# define sk_PKCS7_value(st, i) SKM_sk_value(PKCS7, (st), (i))\n# define sk_PKCS7_set(st, i, val) SKM_sk_set(PKCS7, (st), (i), (val))\n# define sk_PKCS7_zero(st) SKM_sk_zero(PKCS7, (st))\n# define sk_PKCS7_push(st, val) SKM_sk_push(PKCS7, (st), (val))\n# define sk_PKCS7_unshift(st, val) SKM_sk_unshift(PKCS7, (st), (val))\n# define sk_PKCS7_find(st, val) SKM_sk_find(PKCS7, (st), (val))\n# define sk_PKCS7_find_ex(st, val) SKM_sk_find_ex(PKCS7, (st), (val))\n# define sk_PKCS7_delete(st, i) SKM_sk_delete(PKCS7, (st), (i))\n# define sk_PKCS7_delete_ptr(st, ptr) SKM_sk_delete_ptr(PKCS7, (st), (ptr))\n# define sk_PKCS7_insert(st, val, i) SKM_sk_insert(PKCS7, (st), (val), (i))\n# define sk_PKCS7_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(PKCS7, (st), (cmp))\n# define sk_PKCS7_dup(st) SKM_sk_dup(PKCS7, st)\n# define sk_PKCS7_pop_free(st, free_func) SKM_sk_pop_free(PKCS7, (st), (free_func))\n# define sk_PKCS7_shift(st) SKM_sk_shift(PKCS7, (st))\n# define sk_PKCS7_pop(st) SKM_sk_pop(PKCS7, (st))\n# define sk_PKCS7_sort(st) SKM_sk_sort(PKCS7, (st))\n# define sk_PKCS7_is_sorted(st) SKM_sk_is_sorted(PKCS7, (st))\n# define sk_PKCS7_RECIP_INFO_new(cmp) SKM_sk_new(PKCS7_RECIP_INFO, (cmp))\n# define sk_PKCS7_RECIP_INFO_new_null() SKM_sk_new_null(PKCS7_RECIP_INFO)\n# define sk_PKCS7_RECIP_INFO_free(st) SKM_sk_free(PKCS7_RECIP_INFO, (st))\n# define sk_PKCS7_RECIP_INFO_num(st) SKM_sk_num(PKCS7_RECIP_INFO, (st))\n# define sk_PKCS7_RECIP_INFO_value(st, i) SKM_sk_value(PKCS7_RECIP_INFO, (st), (i))\n# define sk_PKCS7_RECIP_INFO_set(st, i, val) SKM_sk_set(PKCS7_RECIP_INFO, (st), (i), (val))\n# define sk_PKCS7_RECIP_INFO_zero(st) SKM_sk_zero(PKCS7_RECIP_INFO, (st))\n# define sk_PKCS7_RECIP_INFO_push(st, val) SKM_sk_push(PKCS7_RECIP_INFO, (st), (val))\n# define sk_PKCS7_RECIP_INFO_unshift(st, val) SKM_sk_unshift(PKCS7_RECIP_INFO, (st), (val))\n# define sk_PKCS7_RECIP_INFO_find(st, val) SKM_sk_find(PKCS7_RECIP_INFO, (st), (val))\n# define sk_PKCS7_RECIP_INFO_find_ex(st, val) SKM_sk_find_ex(PKCS7_RECIP_INFO, (st), (val))\n# define sk_PKCS7_RECIP_INFO_delete(st, i) SKM_sk_delete(PKCS7_RECIP_INFO, (st), (i))\n# define sk_PKCS7_RECIP_INFO_delete_ptr(st, ptr) SKM_sk_delete_ptr(PKCS7_RECIP_INFO, (st), (ptr))\n# define sk_PKCS7_RECIP_INFO_insert(st, val, i) SKM_sk_insert(PKCS7_RECIP_INFO, (st), (val), (i))\n# define sk_PKCS7_RECIP_INFO_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(PKCS7_RECIP_INFO, (st), (cmp))\n# define sk_PKCS7_RECIP_INFO_dup(st) SKM_sk_dup(PKCS7_RECIP_INFO, st)\n# define sk_PKCS7_RECIP_INFO_pop_free(st, free_func) SKM_sk_pop_free(PKCS7_RECIP_INFO, (st), (free_func))\n# define sk_PKCS7_RECIP_INFO_shift(st) SKM_sk_shift(PKCS7_RECIP_INFO, (st))\n# define sk_PKCS7_RECIP_INFO_pop(st) SKM_sk_pop(PKCS7_RECIP_INFO, (st))\n# define sk_PKCS7_RECIP_INFO_sort(st) SKM_sk_sort(PKCS7_RECIP_INFO, (st))\n# define sk_PKCS7_RECIP_INFO_is_sorted(st) SKM_sk_is_sorted(PKCS7_RECIP_INFO, (st))\n# define sk_PKCS7_SIGNER_INFO_new(cmp) SKM_sk_new(PKCS7_SIGNER_INFO, (cmp))\n# define sk_PKCS7_SIGNER_INFO_new_null() SKM_sk_new_null(PKCS7_SIGNER_INFO)\n# define sk_PKCS7_SIGNER_INFO_free(st) SKM_sk_free(PKCS7_SIGNER_INFO, (st))\n# define sk_PKCS7_SIGNER_INFO_num(st) SKM_sk_num(PKCS7_SIGNER_INFO, (st))\n# define sk_PKCS7_SIGNER_INFO_value(st, i) SKM_sk_value(PKCS7_SIGNER_INFO, (st), (i))\n# define sk_PKCS7_SIGNER_INFO_set(st, i, val) SKM_sk_set(PKCS7_SIGNER_INFO, (st), (i), (val))\n# define sk_PKCS7_SIGNER_INFO_zero(st) SKM_sk_zero(PKCS7_SIGNER_INFO, (st))\n# define sk_PKCS7_SIGNER_INFO_push(st, val) SKM_sk_push(PKCS7_SIGNER_INFO, (st), (val))\n# define sk_PKCS7_SIGNER_INFO_unshift(st, val) SKM_sk_unshift(PKCS7_SIGNER_INFO, (st), (val))\n# define sk_PKCS7_SIGNER_INFO_find(st, val) SKM_sk_find(PKCS7_SIGNER_INFO, (st), (val))\n# define sk_PKCS7_SIGNER_INFO_find_ex(st, val) SKM_sk_find_ex(PKCS7_SIGNER_INFO, (st), (val))\n# define sk_PKCS7_SIGNER_INFO_delete(st, i) SKM_sk_delete(PKCS7_SIGNER_INFO, (st), (i))\n# define sk_PKCS7_SIGNER_INFO_delete_ptr(st, ptr) SKM_sk_delete_ptr(PKCS7_SIGNER_INFO, (st), (ptr))\n# define sk_PKCS7_SIGNER_INFO_insert(st, val, i) SKM_sk_insert(PKCS7_SIGNER_INFO, (st), (val), (i))\n# define sk_PKCS7_SIGNER_INFO_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(PKCS7_SIGNER_INFO, (st), (cmp))\n# define sk_PKCS7_SIGNER_INFO_dup(st) SKM_sk_dup(PKCS7_SIGNER_INFO, st)\n# define sk_PKCS7_SIGNER_INFO_pop_free(st, free_func) SKM_sk_pop_free(PKCS7_SIGNER_INFO, (st), (free_func))\n# define sk_PKCS7_SIGNER_INFO_shift(st) SKM_sk_shift(PKCS7_SIGNER_INFO, (st))\n# define sk_PKCS7_SIGNER_INFO_pop(st) SKM_sk_pop(PKCS7_SIGNER_INFO, (st))\n# define sk_PKCS7_SIGNER_INFO_sort(st) SKM_sk_sort(PKCS7_SIGNER_INFO, (st))\n# define sk_PKCS7_SIGNER_INFO_is_sorted(st) SKM_sk_is_sorted(PKCS7_SIGNER_INFO, (st))\n# define sk_POLICYINFO_new(cmp) SKM_sk_new(POLICYINFO, (cmp))\n# define sk_POLICYINFO_new_null() SKM_sk_new_null(POLICYINFO)\n# define sk_POLICYINFO_free(st) SKM_sk_free(POLICYINFO, (st))\n# define sk_POLICYINFO_num(st) SKM_sk_num(POLICYINFO, (st))\n# define sk_POLICYINFO_value(st, i) SKM_sk_value(POLICYINFO, (st), (i))\n# define sk_POLICYINFO_set(st, i, val) SKM_sk_set(POLICYINFO, (st), (i), (val))\n# define sk_POLICYINFO_zero(st) SKM_sk_zero(POLICYINFO, (st))\n# define sk_POLICYINFO_push(st, val) SKM_sk_push(POLICYINFO, (st), (val))\n# define sk_POLICYINFO_unshift(st, val) SKM_sk_unshift(POLICYINFO, (st), (val))\n# define sk_POLICYINFO_find(st, val) SKM_sk_find(POLICYINFO, (st), (val))\n# define sk_POLICYINFO_find_ex(st, val) SKM_sk_find_ex(POLICYINFO, (st), (val))\n# define sk_POLICYINFO_delete(st, i) SKM_sk_delete(POLICYINFO, (st), (i))\n# define sk_POLICYINFO_delete_ptr(st, ptr) SKM_sk_delete_ptr(POLICYINFO, (st), (ptr))\n# define sk_POLICYINFO_insert(st, val, i) SKM_sk_insert(POLICYINFO, (st), (val), (i))\n# define sk_POLICYINFO_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(POLICYINFO, (st), (cmp))\n# define sk_POLICYINFO_dup(st) SKM_sk_dup(POLICYINFO, st)\n# define sk_POLICYINFO_pop_free(st, free_func) SKM_sk_pop_free(POLICYINFO, (st), (free_func))\n# define sk_POLICYINFO_shift(st) SKM_sk_shift(POLICYINFO, (st))\n# define sk_POLICYINFO_pop(st) SKM_sk_pop(POLICYINFO, (st))\n# define sk_POLICYINFO_sort(st) SKM_sk_sort(POLICYINFO, (st))\n# define sk_POLICYINFO_is_sorted(st) SKM_sk_is_sorted(POLICYINFO, (st))\n# define sk_POLICYQUALINFO_new(cmp) SKM_sk_new(POLICYQUALINFO, (cmp))\n# define sk_POLICYQUALINFO_new_null() SKM_sk_new_null(POLICYQUALINFO)\n# define sk_POLICYQUALINFO_free(st) SKM_sk_free(POLICYQUALINFO, (st))\n# define sk_POLICYQUALINFO_num(st) SKM_sk_num(POLICYQUALINFO, (st))\n# define sk_POLICYQUALINFO_value(st, i) SKM_sk_value(POLICYQUALINFO, (st), (i))\n# define sk_POLICYQUALINFO_set(st, i, val) SKM_sk_set(POLICYQUALINFO, (st), (i), (val))\n# define sk_POLICYQUALINFO_zero(st) SKM_sk_zero(POLICYQUALINFO, (st))\n# define sk_POLICYQUALINFO_push(st, val) SKM_sk_push(POLICYQUALINFO, (st), (val))\n# define sk_POLICYQUALINFO_unshift(st, val) SKM_sk_unshift(POLICYQUALINFO, (st), (val))\n# define sk_POLICYQUALINFO_find(st, val) SKM_sk_find(POLICYQUALINFO, (st), (val))\n# define sk_POLICYQUALINFO_find_ex(st, val) SKM_sk_find_ex(POLICYQUALINFO, (st), (val))\n# define sk_POLICYQUALINFO_delete(st, i) SKM_sk_delete(POLICYQUALINFO, (st), (i))\n# define sk_POLICYQUALINFO_delete_ptr(st, ptr) SKM_sk_delete_ptr(POLICYQUALINFO, (st), (ptr))\n# define sk_POLICYQUALINFO_insert(st, val, i) SKM_sk_insert(POLICYQUALINFO, (st), (val), (i))\n# define sk_POLICYQUALINFO_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(POLICYQUALINFO, (st), (cmp))\n# define sk_POLICYQUALINFO_dup(st) SKM_sk_dup(POLICYQUALINFO, st)\n# define sk_POLICYQUALINFO_pop_free(st, free_func) SKM_sk_pop_free(POLICYQUALINFO, (st), (free_func))\n# define sk_POLICYQUALINFO_shift(st) SKM_sk_shift(POLICYQUALINFO, (st))\n# define sk_POLICYQUALINFO_pop(st) SKM_sk_pop(POLICYQUALINFO, (st))\n# define sk_POLICYQUALINFO_sort(st) SKM_sk_sort(POLICYQUALINFO, (st))\n# define sk_POLICYQUALINFO_is_sorted(st) SKM_sk_is_sorted(POLICYQUALINFO, (st))\n# define sk_POLICY_MAPPING_new(cmp) SKM_sk_new(POLICY_MAPPING, (cmp))\n# define sk_POLICY_MAPPING_new_null() SKM_sk_new_null(POLICY_MAPPING)\n# define sk_POLICY_MAPPING_free(st) SKM_sk_free(POLICY_MAPPING, (st))\n# define sk_POLICY_MAPPING_num(st) SKM_sk_num(POLICY_MAPPING, (st))\n# define sk_POLICY_MAPPING_value(st, i) SKM_sk_value(POLICY_MAPPING, (st), (i))\n# define sk_POLICY_MAPPING_set(st, i, val) SKM_sk_set(POLICY_MAPPING, (st), (i), (val))\n# define sk_POLICY_MAPPING_zero(st) SKM_sk_zero(POLICY_MAPPING, (st))\n# define sk_POLICY_MAPPING_push(st, val) SKM_sk_push(POLICY_MAPPING, (st), (val))\n# define sk_POLICY_MAPPING_unshift(st, val) SKM_sk_unshift(POLICY_MAPPING, (st), (val))\n# define sk_POLICY_MAPPING_find(st, val) SKM_sk_find(POLICY_MAPPING, (st), (val))\n# define sk_POLICY_MAPPING_find_ex(st, val) SKM_sk_find_ex(POLICY_MAPPING, (st), (val))\n# define sk_POLICY_MAPPING_delete(st, i) SKM_sk_delete(POLICY_MAPPING, (st), (i))\n# define sk_POLICY_MAPPING_delete_ptr(st, ptr) SKM_sk_delete_ptr(POLICY_MAPPING, (st), (ptr))\n# define sk_POLICY_MAPPING_insert(st, val, i) SKM_sk_insert(POLICY_MAPPING, (st), (val), (i))\n# define sk_POLICY_MAPPING_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(POLICY_MAPPING, (st), (cmp))\n# define sk_POLICY_MAPPING_dup(st) SKM_sk_dup(POLICY_MAPPING, st)\n# define sk_POLICY_MAPPING_pop_free(st, free_func) SKM_sk_pop_free(POLICY_MAPPING, (st), (free_func))\n# define sk_POLICY_MAPPING_shift(st) SKM_sk_shift(POLICY_MAPPING, (st))\n# define sk_POLICY_MAPPING_pop(st) SKM_sk_pop(POLICY_MAPPING, (st))\n# define sk_POLICY_MAPPING_sort(st) SKM_sk_sort(POLICY_MAPPING, (st))\n# define sk_POLICY_MAPPING_is_sorted(st) SKM_sk_is_sorted(POLICY_MAPPING, (st))\n# define sk_SRP_gN_new(cmp) SKM_sk_new(SRP_gN, (cmp))\n# define sk_SRP_gN_new_null() SKM_sk_new_null(SRP_gN)\n# define sk_SRP_gN_free(st) SKM_sk_free(SRP_gN, (st))\n# define sk_SRP_gN_num(st) SKM_sk_num(SRP_gN, (st))\n# define sk_SRP_gN_value(st, i) SKM_sk_value(SRP_gN, (st), (i))\n# define sk_SRP_gN_set(st, i, val) SKM_sk_set(SRP_gN, (st), (i), (val))\n# define sk_SRP_gN_zero(st) SKM_sk_zero(SRP_gN, (st))\n# define sk_SRP_gN_push(st, val) SKM_sk_push(SRP_gN, (st), (val))\n# define sk_SRP_gN_unshift(st, val) SKM_sk_unshift(SRP_gN, (st), (val))\n# define sk_SRP_gN_find(st, val) SKM_sk_find(SRP_gN, (st), (val))\n# define sk_SRP_gN_find_ex(st, val) SKM_sk_find_ex(SRP_gN, (st), (val))\n# define sk_SRP_gN_delete(st, i) SKM_sk_delete(SRP_gN, (st), (i))\n# define sk_SRP_gN_delete_ptr(st, ptr) SKM_sk_delete_ptr(SRP_gN, (st), (ptr))\n# define sk_SRP_gN_insert(st, val, i) SKM_sk_insert(SRP_gN, (st), (val), (i))\n# define sk_SRP_gN_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(SRP_gN, (st), (cmp))\n# define sk_SRP_gN_dup(st) SKM_sk_dup(SRP_gN, st)\n# define sk_SRP_gN_pop_free(st, free_func) SKM_sk_pop_free(SRP_gN, (st), (free_func))\n# define sk_SRP_gN_shift(st) SKM_sk_shift(SRP_gN, (st))\n# define sk_SRP_gN_pop(st) SKM_sk_pop(SRP_gN, (st))\n# define sk_SRP_gN_sort(st) SKM_sk_sort(SRP_gN, (st))\n# define sk_SRP_gN_is_sorted(st) SKM_sk_is_sorted(SRP_gN, (st))\n# define sk_SRP_gN_cache_new(cmp) SKM_sk_new(SRP_gN_cache, (cmp))\n# define sk_SRP_gN_cache_new_null() SKM_sk_new_null(SRP_gN_cache)\n# define sk_SRP_gN_cache_free(st) SKM_sk_free(SRP_gN_cache, (st))\n# define sk_SRP_gN_cache_num(st) SKM_sk_num(SRP_gN_cache, (st))\n# define sk_SRP_gN_cache_value(st, i) SKM_sk_value(SRP_gN_cache, (st), (i))\n# define sk_SRP_gN_cache_set(st, i, val) SKM_sk_set(SRP_gN_cache, (st), (i), (val))\n# define sk_SRP_gN_cache_zero(st) SKM_sk_zero(SRP_gN_cache, (st))\n# define sk_SRP_gN_cache_push(st, val) SKM_sk_push(SRP_gN_cache, (st), (val))\n# define sk_SRP_gN_cache_unshift(st, val) SKM_sk_unshift(SRP_gN_cache, (st), (val))\n# define sk_SRP_gN_cache_find(st, val) SKM_sk_find(SRP_gN_cache, (st), (val))\n# define sk_SRP_gN_cache_find_ex(st, val) SKM_sk_find_ex(SRP_gN_cache, (st), (val))\n# define sk_SRP_gN_cache_delete(st, i) SKM_sk_delete(SRP_gN_cache, (st), (i))\n# define sk_SRP_gN_cache_delete_ptr(st, ptr) SKM_sk_delete_ptr(SRP_gN_cache, (st), (ptr))\n# define sk_SRP_gN_cache_insert(st, val, i) SKM_sk_insert(SRP_gN_cache, (st), (val), (i))\n# define sk_SRP_gN_cache_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(SRP_gN_cache, (st), (cmp))\n# define sk_SRP_gN_cache_dup(st) SKM_sk_dup(SRP_gN_cache, st)\n# define sk_SRP_gN_cache_pop_free(st, free_func) SKM_sk_pop_free(SRP_gN_cache, (st), (free_func))\n# define sk_SRP_gN_cache_shift(st) SKM_sk_shift(SRP_gN_cache, (st))\n# define sk_SRP_gN_cache_pop(st) SKM_sk_pop(SRP_gN_cache, (st))\n# define sk_SRP_gN_cache_sort(st) SKM_sk_sort(SRP_gN_cache, (st))\n# define sk_SRP_gN_cache_is_sorted(st) SKM_sk_is_sorted(SRP_gN_cache, (st))\n# define sk_SRP_user_pwd_new(cmp) SKM_sk_new(SRP_user_pwd, (cmp))\n# define sk_SRP_user_pwd_new_null() SKM_sk_new_null(SRP_user_pwd)\n# define sk_SRP_user_pwd_free(st) SKM_sk_free(SRP_user_pwd, (st))\n# define sk_SRP_user_pwd_num(st) SKM_sk_num(SRP_user_pwd, (st))\n# define sk_SRP_user_pwd_value(st, i) SKM_sk_value(SRP_user_pwd, (st), (i))\n# define sk_SRP_user_pwd_set(st, i, val) SKM_sk_set(SRP_user_pwd, (st), (i), (val))\n# define sk_SRP_user_pwd_zero(st) SKM_sk_zero(SRP_user_pwd, (st))\n# define sk_SRP_user_pwd_push(st, val) SKM_sk_push(SRP_user_pwd, (st), (val))\n# define sk_SRP_user_pwd_unshift(st, val) SKM_sk_unshift(SRP_user_pwd, (st), (val))\n# define sk_SRP_user_pwd_find(st, val) SKM_sk_find(SRP_user_pwd, (st), (val))\n# define sk_SRP_user_pwd_find_ex(st, val) SKM_sk_find_ex(SRP_user_pwd, (st), (val))\n# define sk_SRP_user_pwd_delete(st, i) SKM_sk_delete(SRP_user_pwd, (st), (i))\n# define sk_SRP_user_pwd_delete_ptr(st, ptr) SKM_sk_delete_ptr(SRP_user_pwd, (st), (ptr))\n# define sk_SRP_user_pwd_insert(st, val, i) SKM_sk_insert(SRP_user_pwd, (st), (val), (i))\n# define sk_SRP_user_pwd_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(SRP_user_pwd, (st), (cmp))\n# define sk_SRP_user_pwd_dup(st) SKM_sk_dup(SRP_user_pwd, st)\n# define sk_SRP_user_pwd_pop_free(st, free_func) SKM_sk_pop_free(SRP_user_pwd, (st), (free_func))\n# define sk_SRP_user_pwd_shift(st) SKM_sk_shift(SRP_user_pwd, (st))\n# define sk_SRP_user_pwd_pop(st) SKM_sk_pop(SRP_user_pwd, (st))\n# define sk_SRP_user_pwd_sort(st) SKM_sk_sort(SRP_user_pwd, (st))\n# define sk_SRP_user_pwd_is_sorted(st) SKM_sk_is_sorted(SRP_user_pwd, (st))\n# define sk_SRTP_PROTECTION_PROFILE_new(cmp) SKM_sk_new(SRTP_PROTECTION_PROFILE, (cmp))\n# define sk_SRTP_PROTECTION_PROFILE_new_null() SKM_sk_new_null(SRTP_PROTECTION_PROFILE)\n# define sk_SRTP_PROTECTION_PROFILE_free(st) SKM_sk_free(SRTP_PROTECTION_PROFILE, (st))\n# define sk_SRTP_PROTECTION_PROFILE_num(st) SKM_sk_num(SRTP_PROTECTION_PROFILE, (st))\n# define sk_SRTP_PROTECTION_PROFILE_value(st, i) SKM_sk_value(SRTP_PROTECTION_PROFILE, (st), (i))\n# define sk_SRTP_PROTECTION_PROFILE_set(st, i, val) SKM_sk_set(SRTP_PROTECTION_PROFILE, (st), (i), (val))\n# define sk_SRTP_PROTECTION_PROFILE_zero(st) SKM_sk_zero(SRTP_PROTECTION_PROFILE, (st))\n# define sk_SRTP_PROTECTION_PROFILE_push(st, val) SKM_sk_push(SRTP_PROTECTION_PROFILE, (st), (val))\n# define sk_SRTP_PROTECTION_PROFILE_unshift(st, val) SKM_sk_unshift(SRTP_PROTECTION_PROFILE, (st), (val))\n# define sk_SRTP_PROTECTION_PROFILE_find(st, val) SKM_sk_find(SRTP_PROTECTION_PROFILE, (st), (val))\n# define sk_SRTP_PROTECTION_PROFILE_find_ex(st, val) SKM_sk_find_ex(SRTP_PROTECTION_PROFILE, (st), (val))\n# define sk_SRTP_PROTECTION_PROFILE_delete(st, i) SKM_sk_delete(SRTP_PROTECTION_PROFILE, (st), (i))\n# define sk_SRTP_PROTECTION_PROFILE_delete_ptr(st, ptr) SKM_sk_delete_ptr(SRTP_PROTECTION_PROFILE, (st), (ptr))\n# define sk_SRTP_PROTECTION_PROFILE_insert(st, val, i) SKM_sk_insert(SRTP_PROTECTION_PROFILE, (st), (val), (i))\n# define sk_SRTP_PROTECTION_PROFILE_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(SRTP_PROTECTION_PROFILE, (st), (cmp))\n# define sk_SRTP_PROTECTION_PROFILE_dup(st) SKM_sk_dup(SRTP_PROTECTION_PROFILE, st)\n# define sk_SRTP_PROTECTION_PROFILE_pop_free(st, free_func) SKM_sk_pop_free(SRTP_PROTECTION_PROFILE, (st), (free_func))\n# define sk_SRTP_PROTECTION_PROFILE_shift(st) SKM_sk_shift(SRTP_PROTECTION_PROFILE, (st))\n# define sk_SRTP_PROTECTION_PROFILE_pop(st) SKM_sk_pop(SRTP_PROTECTION_PROFILE, (st))\n# define sk_SRTP_PROTECTION_PROFILE_sort(st) SKM_sk_sort(SRTP_PROTECTION_PROFILE, (st))\n# define sk_SRTP_PROTECTION_PROFILE_is_sorted(st) SKM_sk_is_sorted(SRTP_PROTECTION_PROFILE, (st))\n# define sk_SSL_CIPHER_new(cmp) SKM_sk_new(SSL_CIPHER, (cmp))\n# define sk_SSL_CIPHER_new_null() SKM_sk_new_null(SSL_CIPHER)\n# define sk_SSL_CIPHER_free(st) SKM_sk_free(SSL_CIPHER, (st))\n# define sk_SSL_CIPHER_num(st) SKM_sk_num(SSL_CIPHER, (st))\n# define sk_SSL_CIPHER_value(st, i) SKM_sk_value(SSL_CIPHER, (st), (i))\n# define sk_SSL_CIPHER_set(st, i, val) SKM_sk_set(SSL_CIPHER, (st), (i), (val))\n# define sk_SSL_CIPHER_zero(st) SKM_sk_zero(SSL_CIPHER, (st))\n# define sk_SSL_CIPHER_push(st, val) SKM_sk_push(SSL_CIPHER, (st), (val))\n# define sk_SSL_CIPHER_unshift(st, val) SKM_sk_unshift(SSL_CIPHER, (st), (val))\n# define sk_SSL_CIPHER_find(st, val) SKM_sk_find(SSL_CIPHER, (st), (val))\n# define sk_SSL_CIPHER_find_ex(st, val) SKM_sk_find_ex(SSL_CIPHER, (st), (val))\n# define sk_SSL_CIPHER_delete(st, i) SKM_sk_delete(SSL_CIPHER, (st), (i))\n# define sk_SSL_CIPHER_delete_ptr(st, ptr) SKM_sk_delete_ptr(SSL_CIPHER, (st), (ptr))\n# define sk_SSL_CIPHER_insert(st, val, i) SKM_sk_insert(SSL_CIPHER, (st), (val), (i))\n# define sk_SSL_CIPHER_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(SSL_CIPHER, (st), (cmp))\n# define sk_SSL_CIPHER_dup(st) SKM_sk_dup(SSL_CIPHER, st)\n# define sk_SSL_CIPHER_pop_free(st, free_func) SKM_sk_pop_free(SSL_CIPHER, (st), (free_func))\n# define sk_SSL_CIPHER_shift(st) SKM_sk_shift(SSL_CIPHER, (st))\n# define sk_SSL_CIPHER_pop(st) SKM_sk_pop(SSL_CIPHER, (st))\n# define sk_SSL_CIPHER_sort(st) SKM_sk_sort(SSL_CIPHER, (st))\n# define sk_SSL_CIPHER_is_sorted(st) SKM_sk_is_sorted(SSL_CIPHER, (st))\n# define sk_SSL_COMP_new(cmp) SKM_sk_new(SSL_COMP, (cmp))\n# define sk_SSL_COMP_new_null() SKM_sk_new_null(SSL_COMP)\n# define sk_SSL_COMP_free(st) SKM_sk_free(SSL_COMP, (st))\n# define sk_SSL_COMP_num(st) SKM_sk_num(SSL_COMP, (st))\n# define sk_SSL_COMP_value(st, i) SKM_sk_value(SSL_COMP, (st), (i))\n# define sk_SSL_COMP_set(st, i, val) SKM_sk_set(SSL_COMP, (st), (i), (val))\n# define sk_SSL_COMP_zero(st) SKM_sk_zero(SSL_COMP, (st))\n# define sk_SSL_COMP_push(st, val) SKM_sk_push(SSL_COMP, (st), (val))\n# define sk_SSL_COMP_unshift(st, val) SKM_sk_unshift(SSL_COMP, (st), (val))\n# define sk_SSL_COMP_find(st, val) SKM_sk_find(SSL_COMP, (st), (val))\n# define sk_SSL_COMP_find_ex(st, val) SKM_sk_find_ex(SSL_COMP, (st), (val))\n# define sk_SSL_COMP_delete(st, i) SKM_sk_delete(SSL_COMP, (st), (i))\n# define sk_SSL_COMP_delete_ptr(st, ptr) SKM_sk_delete_ptr(SSL_COMP, (st), (ptr))\n# define sk_SSL_COMP_insert(st, val, i) SKM_sk_insert(SSL_COMP, (st), (val), (i))\n# define sk_SSL_COMP_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(SSL_COMP, (st), (cmp))\n# define sk_SSL_COMP_dup(st) SKM_sk_dup(SSL_COMP, st)\n# define sk_SSL_COMP_pop_free(st, free_func) SKM_sk_pop_free(SSL_COMP, (st), (free_func))\n# define sk_SSL_COMP_shift(st) SKM_sk_shift(SSL_COMP, (st))\n# define sk_SSL_COMP_pop(st) SKM_sk_pop(SSL_COMP, (st))\n# define sk_SSL_COMP_sort(st) SKM_sk_sort(SSL_COMP, (st))\n# define sk_SSL_COMP_is_sorted(st) SKM_sk_is_sorted(SSL_COMP, (st))\n# define sk_STACK_OF_X509_NAME_ENTRY_new(cmp) SKM_sk_new(STACK_OF_X509_NAME_ENTRY, (cmp))\n# define sk_STACK_OF_X509_NAME_ENTRY_new_null() SKM_sk_new_null(STACK_OF_X509_NAME_ENTRY)\n# define sk_STACK_OF_X509_NAME_ENTRY_free(st) SKM_sk_free(STACK_OF_X509_NAME_ENTRY, (st))\n# define sk_STACK_OF_X509_NAME_ENTRY_num(st) SKM_sk_num(STACK_OF_X509_NAME_ENTRY, (st))\n# define sk_STACK_OF_X509_NAME_ENTRY_value(st, i) SKM_sk_value(STACK_OF_X509_NAME_ENTRY, (st), (i))\n# define sk_STACK_OF_X509_NAME_ENTRY_set(st, i, val) SKM_sk_set(STACK_OF_X509_NAME_ENTRY, (st), (i), (val))\n# define sk_STACK_OF_X509_NAME_ENTRY_zero(st) SKM_sk_zero(STACK_OF_X509_NAME_ENTRY, (st))\n# define sk_STACK_OF_X509_NAME_ENTRY_push(st, val) SKM_sk_push(STACK_OF_X509_NAME_ENTRY, (st), (val))\n# define sk_STACK_OF_X509_NAME_ENTRY_unshift(st, val) SKM_sk_unshift(STACK_OF_X509_NAME_ENTRY, (st), (val))\n# define sk_STACK_OF_X509_NAME_ENTRY_find(st, val) SKM_sk_find(STACK_OF_X509_NAME_ENTRY, (st), (val))\n# define sk_STACK_OF_X509_NAME_ENTRY_find_ex(st, val) SKM_sk_find_ex(STACK_OF_X509_NAME_ENTRY, (st), (val))\n# define sk_STACK_OF_X509_NAME_ENTRY_delete(st, i) SKM_sk_delete(STACK_OF_X509_NAME_ENTRY, (st), (i))\n# define sk_STACK_OF_X509_NAME_ENTRY_delete_ptr(st, ptr) SKM_sk_delete_ptr(STACK_OF_X509_NAME_ENTRY, (st), (ptr))\n# define sk_STACK_OF_X509_NAME_ENTRY_insert(st, val, i) SKM_sk_insert(STACK_OF_X509_NAME_ENTRY, (st), (val), (i))\n# define sk_STACK_OF_X509_NAME_ENTRY_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(STACK_OF_X509_NAME_ENTRY, (st), (cmp))\n# define sk_STACK_OF_X509_NAME_ENTRY_dup(st) SKM_sk_dup(STACK_OF_X509_NAME_ENTRY, st)\n# define sk_STACK_OF_X509_NAME_ENTRY_pop_free(st, free_func) SKM_sk_pop_free(STACK_OF_X509_NAME_ENTRY, (st), (free_func))\n# define sk_STACK_OF_X509_NAME_ENTRY_shift(st) SKM_sk_shift(STACK_OF_X509_NAME_ENTRY, (st))\n# define sk_STACK_OF_X509_NAME_ENTRY_pop(st) SKM_sk_pop(STACK_OF_X509_NAME_ENTRY, (st))\n# define sk_STACK_OF_X509_NAME_ENTRY_sort(st) SKM_sk_sort(STACK_OF_X509_NAME_ENTRY, (st))\n# define sk_STACK_OF_X509_NAME_ENTRY_is_sorted(st) SKM_sk_is_sorted(STACK_OF_X509_NAME_ENTRY, (st))\n# define sk_STORE_ATTR_INFO_new(cmp) SKM_sk_new(STORE_ATTR_INFO, (cmp))\n# define sk_STORE_ATTR_INFO_new_null() SKM_sk_new_null(STORE_ATTR_INFO)\n# define sk_STORE_ATTR_INFO_free(st) SKM_sk_free(STORE_ATTR_INFO, (st))\n# define sk_STORE_ATTR_INFO_num(st) SKM_sk_num(STORE_ATTR_INFO, (st))\n# define sk_STORE_ATTR_INFO_value(st, i) SKM_sk_value(STORE_ATTR_INFO, (st), (i))\n# define sk_STORE_ATTR_INFO_set(st, i, val) SKM_sk_set(STORE_ATTR_INFO, (st), (i), (val))\n# define sk_STORE_ATTR_INFO_zero(st) SKM_sk_zero(STORE_ATTR_INFO, (st))\n# define sk_STORE_ATTR_INFO_push(st, val) SKM_sk_push(STORE_ATTR_INFO, (st), (val))\n# define sk_STORE_ATTR_INFO_unshift(st, val) SKM_sk_unshift(STORE_ATTR_INFO, (st), (val))\n# define sk_STORE_ATTR_INFO_find(st, val) SKM_sk_find(STORE_ATTR_INFO, (st), (val))\n# define sk_STORE_ATTR_INFO_find_ex(st, val) SKM_sk_find_ex(STORE_ATTR_INFO, (st), (val))\n# define sk_STORE_ATTR_INFO_delete(st, i) SKM_sk_delete(STORE_ATTR_INFO, (st), (i))\n# define sk_STORE_ATTR_INFO_delete_ptr(st, ptr) SKM_sk_delete_ptr(STORE_ATTR_INFO, (st), (ptr))\n# define sk_STORE_ATTR_INFO_insert(st, val, i) SKM_sk_insert(STORE_ATTR_INFO, (st), (val), (i))\n# define sk_STORE_ATTR_INFO_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(STORE_ATTR_INFO, (st), (cmp))\n# define sk_STORE_ATTR_INFO_dup(st) SKM_sk_dup(STORE_ATTR_INFO, st)\n# define sk_STORE_ATTR_INFO_pop_free(st, free_func) SKM_sk_pop_free(STORE_ATTR_INFO, (st), (free_func))\n# define sk_STORE_ATTR_INFO_shift(st) SKM_sk_shift(STORE_ATTR_INFO, (st))\n# define sk_STORE_ATTR_INFO_pop(st) SKM_sk_pop(STORE_ATTR_INFO, (st))\n# define sk_STORE_ATTR_INFO_sort(st) SKM_sk_sort(STORE_ATTR_INFO, (st))\n# define sk_STORE_ATTR_INFO_is_sorted(st) SKM_sk_is_sorted(STORE_ATTR_INFO, (st))\n# define sk_STORE_OBJECT_new(cmp) SKM_sk_new(STORE_OBJECT, (cmp))\n# define sk_STORE_OBJECT_new_null() SKM_sk_new_null(STORE_OBJECT)\n# define sk_STORE_OBJECT_free(st) SKM_sk_free(STORE_OBJECT, (st))\n# define sk_STORE_OBJECT_num(st) SKM_sk_num(STORE_OBJECT, (st))\n# define sk_STORE_OBJECT_value(st, i) SKM_sk_value(STORE_OBJECT, (st), (i))\n# define sk_STORE_OBJECT_set(st, i, val) SKM_sk_set(STORE_OBJECT, (st), (i), (val))\n# define sk_STORE_OBJECT_zero(st) SKM_sk_zero(STORE_OBJECT, (st))\n# define sk_STORE_OBJECT_push(st, val) SKM_sk_push(STORE_OBJECT, (st), (val))\n# define sk_STORE_OBJECT_unshift(st, val) SKM_sk_unshift(STORE_OBJECT, (st), (val))\n# define sk_STORE_OBJECT_find(st, val) SKM_sk_find(STORE_OBJECT, (st), (val))\n# define sk_STORE_OBJECT_find_ex(st, val) SKM_sk_find_ex(STORE_OBJECT, (st), (val))\n# define sk_STORE_OBJECT_delete(st, i) SKM_sk_delete(STORE_OBJECT, (st), (i))\n# define sk_STORE_OBJECT_delete_ptr(st, ptr) SKM_sk_delete_ptr(STORE_OBJECT, (st), (ptr))\n# define sk_STORE_OBJECT_insert(st, val, i) SKM_sk_insert(STORE_OBJECT, (st), (val), (i))\n# define sk_STORE_OBJECT_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(STORE_OBJECT, (st), (cmp))\n# define sk_STORE_OBJECT_dup(st) SKM_sk_dup(STORE_OBJECT, st)\n# define sk_STORE_OBJECT_pop_free(st, free_func) SKM_sk_pop_free(STORE_OBJECT, (st), (free_func))\n# define sk_STORE_OBJECT_shift(st) SKM_sk_shift(STORE_OBJECT, (st))\n# define sk_STORE_OBJECT_pop(st) SKM_sk_pop(STORE_OBJECT, (st))\n# define sk_STORE_OBJECT_sort(st) SKM_sk_sort(STORE_OBJECT, (st))\n# define sk_STORE_OBJECT_is_sorted(st) SKM_sk_is_sorted(STORE_OBJECT, (st))\n# define sk_SXNETID_new(cmp) SKM_sk_new(SXNETID, (cmp))\n# define sk_SXNETID_new_null() SKM_sk_new_null(SXNETID)\n# define sk_SXNETID_free(st) SKM_sk_free(SXNETID, (st))\n# define sk_SXNETID_num(st) SKM_sk_num(SXNETID, (st))\n# define sk_SXNETID_value(st, i) SKM_sk_value(SXNETID, (st), (i))\n# define sk_SXNETID_set(st, i, val) SKM_sk_set(SXNETID, (st), (i), (val))\n# define sk_SXNETID_zero(st) SKM_sk_zero(SXNETID, (st))\n# define sk_SXNETID_push(st, val) SKM_sk_push(SXNETID, (st), (val))\n# define sk_SXNETID_unshift(st, val) SKM_sk_unshift(SXNETID, (st), (val))\n# define sk_SXNETID_find(st, val) SKM_sk_find(SXNETID, (st), (val))\n# define sk_SXNETID_find_ex(st, val) SKM_sk_find_ex(SXNETID, (st), (val))\n# define sk_SXNETID_delete(st, i) SKM_sk_delete(SXNETID, (st), (i))\n# define sk_SXNETID_delete_ptr(st, ptr) SKM_sk_delete_ptr(SXNETID, (st), (ptr))\n# define sk_SXNETID_insert(st, val, i) SKM_sk_insert(SXNETID, (st), (val), (i))\n# define sk_SXNETID_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(SXNETID, (st), (cmp))\n# define sk_SXNETID_dup(st) SKM_sk_dup(SXNETID, st)\n# define sk_SXNETID_pop_free(st, free_func) SKM_sk_pop_free(SXNETID, (st), (free_func))\n# define sk_SXNETID_shift(st) SKM_sk_shift(SXNETID, (st))\n# define sk_SXNETID_pop(st) SKM_sk_pop(SXNETID, (st))\n# define sk_SXNETID_sort(st) SKM_sk_sort(SXNETID, (st))\n# define sk_SXNETID_is_sorted(st) SKM_sk_is_sorted(SXNETID, (st))\n# define sk_UI_STRING_new(cmp) SKM_sk_new(UI_STRING, (cmp))\n# define sk_UI_STRING_new_null() SKM_sk_new_null(UI_STRING)\n# define sk_UI_STRING_free(st) SKM_sk_free(UI_STRING, (st))\n# define sk_UI_STRING_num(st) SKM_sk_num(UI_STRING, (st))\n# define sk_UI_STRING_value(st, i) SKM_sk_value(UI_STRING, (st), (i))\n# define sk_UI_STRING_set(st, i, val) SKM_sk_set(UI_STRING, (st), (i), (val))\n# define sk_UI_STRING_zero(st) SKM_sk_zero(UI_STRING, (st))\n# define sk_UI_STRING_push(st, val) SKM_sk_push(UI_STRING, (st), (val))\n# define sk_UI_STRING_unshift(st, val) SKM_sk_unshift(UI_STRING, (st), (val))\n# define sk_UI_STRING_find(st, val) SKM_sk_find(UI_STRING, (st), (val))\n# define sk_UI_STRING_find_ex(st, val) SKM_sk_find_ex(UI_STRING, (st), (val))\n# define sk_UI_STRING_delete(st, i) SKM_sk_delete(UI_STRING, (st), (i))\n# define sk_UI_STRING_delete_ptr(st, ptr) SKM_sk_delete_ptr(UI_STRING, (st), (ptr))\n# define sk_UI_STRING_insert(st, val, i) SKM_sk_insert(UI_STRING, (st), (val), (i))\n# define sk_UI_STRING_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(UI_STRING, (st), (cmp))\n# define sk_UI_STRING_dup(st) SKM_sk_dup(UI_STRING, st)\n# define sk_UI_STRING_pop_free(st, free_func) SKM_sk_pop_free(UI_STRING, (st), (free_func))\n# define sk_UI_STRING_shift(st) SKM_sk_shift(UI_STRING, (st))\n# define sk_UI_STRING_pop(st) SKM_sk_pop(UI_STRING, (st))\n# define sk_UI_STRING_sort(st) SKM_sk_sort(UI_STRING, (st))\n# define sk_UI_STRING_is_sorted(st) SKM_sk_is_sorted(UI_STRING, (st))\n# define sk_X509_new(cmp) SKM_sk_new(X509, (cmp))\n# define sk_X509_new_null() SKM_sk_new_null(X509)\n# define sk_X509_free(st) SKM_sk_free(X509, (st))\n# define sk_X509_num(st) SKM_sk_num(X509, (st))\n# define sk_X509_value(st, i) SKM_sk_value(X509, (st), (i))\n# define sk_X509_set(st, i, val) SKM_sk_set(X509, (st), (i), (val))\n# define sk_X509_zero(st) SKM_sk_zero(X509, (st))\n# define sk_X509_push(st, val) SKM_sk_push(X509, (st), (val))\n# define sk_X509_unshift(st, val) SKM_sk_unshift(X509, (st), (val))\n# define sk_X509_find(st, val) SKM_sk_find(X509, (st), (val))\n# define sk_X509_find_ex(st, val) SKM_sk_find_ex(X509, (st), (val))\n# define sk_X509_delete(st, i) SKM_sk_delete(X509, (st), (i))\n# define sk_X509_delete_ptr(st, ptr) SKM_sk_delete_ptr(X509, (st), (ptr))\n# define sk_X509_insert(st, val, i) SKM_sk_insert(X509, (st), (val), (i))\n# define sk_X509_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(X509, (st), (cmp))\n# define sk_X509_dup(st) SKM_sk_dup(X509, st)\n# define sk_X509_pop_free(st, free_func) SKM_sk_pop_free(X509, (st), (free_func))\n# define sk_X509_shift(st) SKM_sk_shift(X509, (st))\n# define sk_X509_pop(st) SKM_sk_pop(X509, (st))\n# define sk_X509_sort(st) SKM_sk_sort(X509, (st))\n# define sk_X509_is_sorted(st) SKM_sk_is_sorted(X509, (st))\n# define sk_X509V3_EXT_METHOD_new(cmp) SKM_sk_new(X509V3_EXT_METHOD, (cmp))\n# define sk_X509V3_EXT_METHOD_new_null() SKM_sk_new_null(X509V3_EXT_METHOD)\n# define sk_X509V3_EXT_METHOD_free(st) SKM_sk_free(X509V3_EXT_METHOD, (st))\n# define sk_X509V3_EXT_METHOD_num(st) SKM_sk_num(X509V3_EXT_METHOD, (st))\n# define sk_X509V3_EXT_METHOD_value(st, i) SKM_sk_value(X509V3_EXT_METHOD, (st), (i))\n# define sk_X509V3_EXT_METHOD_set(st, i, val) SKM_sk_set(X509V3_EXT_METHOD, (st), (i), (val))\n# define sk_X509V3_EXT_METHOD_zero(st) SKM_sk_zero(X509V3_EXT_METHOD, (st))\n# define sk_X509V3_EXT_METHOD_push(st, val) SKM_sk_push(X509V3_EXT_METHOD, (st), (val))\n# define sk_X509V3_EXT_METHOD_unshift(st, val) SKM_sk_unshift(X509V3_EXT_METHOD, (st), (val))\n# define sk_X509V3_EXT_METHOD_find(st, val) SKM_sk_find(X509V3_EXT_METHOD, (st), (val))\n# define sk_X509V3_EXT_METHOD_find_ex(st, val) SKM_sk_find_ex(X509V3_EXT_METHOD, (st), (val))\n# define sk_X509V3_EXT_METHOD_delete(st, i) SKM_sk_delete(X509V3_EXT_METHOD, (st), (i))\n# define sk_X509V3_EXT_METHOD_delete_ptr(st, ptr) SKM_sk_delete_ptr(X509V3_EXT_METHOD, (st), (ptr))\n# define sk_X509V3_EXT_METHOD_insert(st, val, i) SKM_sk_insert(X509V3_EXT_METHOD, (st), (val), (i))\n# define sk_X509V3_EXT_METHOD_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(X509V3_EXT_METHOD, (st), (cmp))\n# define sk_X509V3_EXT_METHOD_dup(st) SKM_sk_dup(X509V3_EXT_METHOD, st)\n# define sk_X509V3_EXT_METHOD_pop_free(st, free_func) SKM_sk_pop_free(X509V3_EXT_METHOD, (st), (free_func))\n# define sk_X509V3_EXT_METHOD_shift(st) SKM_sk_shift(X509V3_EXT_METHOD, (st))\n# define sk_X509V3_EXT_METHOD_pop(st) SKM_sk_pop(X509V3_EXT_METHOD, (st))\n# define sk_X509V3_EXT_METHOD_sort(st) SKM_sk_sort(X509V3_EXT_METHOD, (st))\n# define sk_X509V3_EXT_METHOD_is_sorted(st) SKM_sk_is_sorted(X509V3_EXT_METHOD, (st))\n# define sk_X509_ALGOR_new(cmp) SKM_sk_new(X509_ALGOR, (cmp))\n# define sk_X509_ALGOR_new_null() SKM_sk_new_null(X509_ALGOR)\n# define sk_X509_ALGOR_free(st) SKM_sk_free(X509_ALGOR, (st))\n# define sk_X509_ALGOR_num(st) SKM_sk_num(X509_ALGOR, (st))\n# define sk_X509_ALGOR_value(st, i) SKM_sk_value(X509_ALGOR, (st), (i))\n# define sk_X509_ALGOR_set(st, i, val) SKM_sk_set(X509_ALGOR, (st), (i), (val))\n# define sk_X509_ALGOR_zero(st) SKM_sk_zero(X509_ALGOR, (st))\n# define sk_X509_ALGOR_push(st, val) SKM_sk_push(X509_ALGOR, (st), (val))\n# define sk_X509_ALGOR_unshift(st, val) SKM_sk_unshift(X509_ALGOR, (st), (val))\n# define sk_X509_ALGOR_find(st, val) SKM_sk_find(X509_ALGOR, (st), (val))\n# define sk_X509_ALGOR_find_ex(st, val) SKM_sk_find_ex(X509_ALGOR, (st), (val))\n# define sk_X509_ALGOR_delete(st, i) SKM_sk_delete(X509_ALGOR, (st), (i))\n# define sk_X509_ALGOR_delete_ptr(st, ptr) SKM_sk_delete_ptr(X509_ALGOR, (st), (ptr))\n# define sk_X509_ALGOR_insert(st, val, i) SKM_sk_insert(X509_ALGOR, (st), (val), (i))\n# define sk_X509_ALGOR_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(X509_ALGOR, (st), (cmp))\n# define sk_X509_ALGOR_dup(st) SKM_sk_dup(X509_ALGOR, st)\n# define sk_X509_ALGOR_pop_free(st, free_func) SKM_sk_pop_free(X509_ALGOR, (st), (free_func))\n# define sk_X509_ALGOR_shift(st) SKM_sk_shift(X509_ALGOR, (st))\n# define sk_X509_ALGOR_pop(st) SKM_sk_pop(X509_ALGOR, (st))\n# define sk_X509_ALGOR_sort(st) SKM_sk_sort(X509_ALGOR, (st))\n# define sk_X509_ALGOR_is_sorted(st) SKM_sk_is_sorted(X509_ALGOR, (st))\n# define sk_X509_ATTRIBUTE_new(cmp) SKM_sk_new(X509_ATTRIBUTE, (cmp))\n# define sk_X509_ATTRIBUTE_new_null() SKM_sk_new_null(X509_ATTRIBUTE)\n# define sk_X509_ATTRIBUTE_free(st) SKM_sk_free(X509_ATTRIBUTE, (st))\n# define sk_X509_ATTRIBUTE_num(st) SKM_sk_num(X509_ATTRIBUTE, (st))\n# define sk_X509_ATTRIBUTE_value(st, i) SKM_sk_value(X509_ATTRIBUTE, (st), (i))\n# define sk_X509_ATTRIBUTE_set(st, i, val) SKM_sk_set(X509_ATTRIBUTE, (st), (i), (val))\n# define sk_X509_ATTRIBUTE_zero(st) SKM_sk_zero(X509_ATTRIBUTE, (st))\n# define sk_X509_ATTRIBUTE_push(st, val) SKM_sk_push(X509_ATTRIBUTE, (st), (val))\n# define sk_X509_ATTRIBUTE_unshift(st, val) SKM_sk_unshift(X509_ATTRIBUTE, (st), (val))\n# define sk_X509_ATTRIBUTE_find(st, val) SKM_sk_find(X509_ATTRIBUTE, (st), (val))\n# define sk_X509_ATTRIBUTE_find_ex(st, val) SKM_sk_find_ex(X509_ATTRIBUTE, (st), (val))\n# define sk_X509_ATTRIBUTE_delete(st, i) SKM_sk_delete(X509_ATTRIBUTE, (st), (i))\n# define sk_X509_ATTRIBUTE_delete_ptr(st, ptr) SKM_sk_delete_ptr(X509_ATTRIBUTE, (st), (ptr))\n# define sk_X509_ATTRIBUTE_insert(st, val, i) SKM_sk_insert(X509_ATTRIBUTE, (st), (val), (i))\n# define sk_X509_ATTRIBUTE_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(X509_ATTRIBUTE, (st), (cmp))\n# define sk_X509_ATTRIBUTE_dup(st) SKM_sk_dup(X509_ATTRIBUTE, st)\n# define sk_X509_ATTRIBUTE_pop_free(st, free_func) SKM_sk_pop_free(X509_ATTRIBUTE, (st), (free_func))\n# define sk_X509_ATTRIBUTE_shift(st) SKM_sk_shift(X509_ATTRIBUTE, (st))\n# define sk_X509_ATTRIBUTE_pop(st) SKM_sk_pop(X509_ATTRIBUTE, (st))\n# define sk_X509_ATTRIBUTE_sort(st) SKM_sk_sort(X509_ATTRIBUTE, (st))\n# define sk_X509_ATTRIBUTE_is_sorted(st) SKM_sk_is_sorted(X509_ATTRIBUTE, (st))\n# define sk_X509_CRL_new(cmp) SKM_sk_new(X509_CRL, (cmp))\n# define sk_X509_CRL_new_null() SKM_sk_new_null(X509_CRL)\n# define sk_X509_CRL_free(st) SKM_sk_free(X509_CRL, (st))\n# define sk_X509_CRL_num(st) SKM_sk_num(X509_CRL, (st))\n# define sk_X509_CRL_value(st, i) SKM_sk_value(X509_CRL, (st), (i))\n# define sk_X509_CRL_set(st, i, val) SKM_sk_set(X509_CRL, (st), (i), (val))\n# define sk_X509_CRL_zero(st) SKM_sk_zero(X509_CRL, (st))\n# define sk_X509_CRL_push(st, val) SKM_sk_push(X509_CRL, (st), (val))\n# define sk_X509_CRL_unshift(st, val) SKM_sk_unshift(X509_CRL, (st), (val))\n# define sk_X509_CRL_find(st, val) SKM_sk_find(X509_CRL, (st), (val))\n# define sk_X509_CRL_find_ex(st, val) SKM_sk_find_ex(X509_CRL, (st), (val))\n# define sk_X509_CRL_delete(st, i) SKM_sk_delete(X509_CRL, (st), (i))\n# define sk_X509_CRL_delete_ptr(st, ptr) SKM_sk_delete_ptr(X509_CRL, (st), (ptr))\n# define sk_X509_CRL_insert(st, val, i) SKM_sk_insert(X509_CRL, (st), (val), (i))\n# define sk_X509_CRL_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(X509_CRL, (st), (cmp))\n# define sk_X509_CRL_dup(st) SKM_sk_dup(X509_CRL, st)\n# define sk_X509_CRL_pop_free(st, free_func) SKM_sk_pop_free(X509_CRL, (st), (free_func))\n# define sk_X509_CRL_shift(st) SKM_sk_shift(X509_CRL, (st))\n# define sk_X509_CRL_pop(st) SKM_sk_pop(X509_CRL, (st))\n# define sk_X509_CRL_sort(st) SKM_sk_sort(X509_CRL, (st))\n# define sk_X509_CRL_is_sorted(st) SKM_sk_is_sorted(X509_CRL, (st))\n# define sk_X509_EXTENSION_new(cmp) SKM_sk_new(X509_EXTENSION, (cmp))\n# define sk_X509_EXTENSION_new_null() SKM_sk_new_null(X509_EXTENSION)\n# define sk_X509_EXTENSION_free(st) SKM_sk_free(X509_EXTENSION, (st))\n# define sk_X509_EXTENSION_num(st) SKM_sk_num(X509_EXTENSION, (st))\n# define sk_X509_EXTENSION_value(st, i) SKM_sk_value(X509_EXTENSION, (st), (i))\n# define sk_X509_EXTENSION_set(st, i, val) SKM_sk_set(X509_EXTENSION, (st), (i), (val))\n# define sk_X509_EXTENSION_zero(st) SKM_sk_zero(X509_EXTENSION, (st))\n# define sk_X509_EXTENSION_push(st, val) SKM_sk_push(X509_EXTENSION, (st), (val))\n# define sk_X509_EXTENSION_unshift(st, val) SKM_sk_unshift(X509_EXTENSION, (st), (val))\n# define sk_X509_EXTENSION_find(st, val) SKM_sk_find(X509_EXTENSION, (st), (val))\n# define sk_X509_EXTENSION_find_ex(st, val) SKM_sk_find_ex(X509_EXTENSION, (st), (val))\n# define sk_X509_EXTENSION_delete(st, i) SKM_sk_delete(X509_EXTENSION, (st), (i))\n# define sk_X509_EXTENSION_delete_ptr(st, ptr) SKM_sk_delete_ptr(X509_EXTENSION, (st), (ptr))\n# define sk_X509_EXTENSION_insert(st, val, i) SKM_sk_insert(X509_EXTENSION, (st), (val), (i))\n# define sk_X509_EXTENSION_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(X509_EXTENSION, (st), (cmp))\n# define sk_X509_EXTENSION_dup(st) SKM_sk_dup(X509_EXTENSION, st)\n# define sk_X509_EXTENSION_pop_free(st, free_func) SKM_sk_pop_free(X509_EXTENSION, (st), (free_func))\n# define sk_X509_EXTENSION_shift(st) SKM_sk_shift(X509_EXTENSION, (st))\n# define sk_X509_EXTENSION_pop(st) SKM_sk_pop(X509_EXTENSION, (st))\n# define sk_X509_EXTENSION_sort(st) SKM_sk_sort(X509_EXTENSION, (st))\n# define sk_X509_EXTENSION_is_sorted(st) SKM_sk_is_sorted(X509_EXTENSION, (st))\n# define sk_X509_INFO_new(cmp) SKM_sk_new(X509_INFO, (cmp))\n# define sk_X509_INFO_new_null() SKM_sk_new_null(X509_INFO)\n# define sk_X509_INFO_free(st) SKM_sk_free(X509_INFO, (st))\n# define sk_X509_INFO_num(st) SKM_sk_num(X509_INFO, (st))\n# define sk_X509_INFO_value(st, i) SKM_sk_value(X509_INFO, (st), (i))\n# define sk_X509_INFO_set(st, i, val) SKM_sk_set(X509_INFO, (st), (i), (val))\n# define sk_X509_INFO_zero(st) SKM_sk_zero(X509_INFO, (st))\n# define sk_X509_INFO_push(st, val) SKM_sk_push(X509_INFO, (st), (val))\n# define sk_X509_INFO_unshift(st, val) SKM_sk_unshift(X509_INFO, (st), (val))\n# define sk_X509_INFO_find(st, val) SKM_sk_find(X509_INFO, (st), (val))\n# define sk_X509_INFO_find_ex(st, val) SKM_sk_find_ex(X509_INFO, (st), (val))\n# define sk_X509_INFO_delete(st, i) SKM_sk_delete(X509_INFO, (st), (i))\n# define sk_X509_INFO_delete_ptr(st, ptr) SKM_sk_delete_ptr(X509_INFO, (st), (ptr))\n# define sk_X509_INFO_insert(st, val, i) SKM_sk_insert(X509_INFO, (st), (val), (i))\n# define sk_X509_INFO_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(X509_INFO, (st), (cmp))\n# define sk_X509_INFO_dup(st) SKM_sk_dup(X509_INFO, st)\n# define sk_X509_INFO_pop_free(st, free_func) SKM_sk_pop_free(X509_INFO, (st), (free_func))\n# define sk_X509_INFO_shift(st) SKM_sk_shift(X509_INFO, (st))\n# define sk_X509_INFO_pop(st) SKM_sk_pop(X509_INFO, (st))\n# define sk_X509_INFO_sort(st) SKM_sk_sort(X509_INFO, (st))\n# define sk_X509_INFO_is_sorted(st) SKM_sk_is_sorted(X509_INFO, (st))\n# define sk_X509_LOOKUP_new(cmp) SKM_sk_new(X509_LOOKUP, (cmp))\n# define sk_X509_LOOKUP_new_null() SKM_sk_new_null(X509_LOOKUP)\n# define sk_X509_LOOKUP_free(st) SKM_sk_free(X509_LOOKUP, (st))\n# define sk_X509_LOOKUP_num(st) SKM_sk_num(X509_LOOKUP, (st))\n# define sk_X509_LOOKUP_value(st, i) SKM_sk_value(X509_LOOKUP, (st), (i))\n# define sk_X509_LOOKUP_set(st, i, val) SKM_sk_set(X509_LOOKUP, (st), (i), (val))\n# define sk_X509_LOOKUP_zero(st) SKM_sk_zero(X509_LOOKUP, (st))\n# define sk_X509_LOOKUP_push(st, val) SKM_sk_push(X509_LOOKUP, (st), (val))\n# define sk_X509_LOOKUP_unshift(st, val) SKM_sk_unshift(X509_LOOKUP, (st), (val))\n# define sk_X509_LOOKUP_find(st, val) SKM_sk_find(X509_LOOKUP, (st), (val))\n# define sk_X509_LOOKUP_find_ex(st, val) SKM_sk_find_ex(X509_LOOKUP, (st), (val))\n# define sk_X509_LOOKUP_delete(st, i) SKM_sk_delete(X509_LOOKUP, (st), (i))\n# define sk_X509_LOOKUP_delete_ptr(st, ptr) SKM_sk_delete_ptr(X509_LOOKUP, (st), (ptr))\n# define sk_X509_LOOKUP_insert(st, val, i) SKM_sk_insert(X509_LOOKUP, (st), (val), (i))\n# define sk_X509_LOOKUP_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(X509_LOOKUP, (st), (cmp))\n# define sk_X509_LOOKUP_dup(st) SKM_sk_dup(X509_LOOKUP, st)\n# define sk_X509_LOOKUP_pop_free(st, free_func) SKM_sk_pop_free(X509_LOOKUP, (st), (free_func))\n# define sk_X509_LOOKUP_shift(st) SKM_sk_shift(X509_LOOKUP, (st))\n# define sk_X509_LOOKUP_pop(st) SKM_sk_pop(X509_LOOKUP, (st))\n# define sk_X509_LOOKUP_sort(st) SKM_sk_sort(X509_LOOKUP, (st))\n# define sk_X509_LOOKUP_is_sorted(st) SKM_sk_is_sorted(X509_LOOKUP, (st))\n# define sk_X509_NAME_new(cmp) SKM_sk_new(X509_NAME, (cmp))\n# define sk_X509_NAME_new_null() SKM_sk_new_null(X509_NAME)\n# define sk_X509_NAME_free(st) SKM_sk_free(X509_NAME, (st))\n# define sk_X509_NAME_num(st) SKM_sk_num(X509_NAME, (st))\n# define sk_X509_NAME_value(st, i) SKM_sk_value(X509_NAME, (st), (i))\n# define sk_X509_NAME_set(st, i, val) SKM_sk_set(X509_NAME, (st), (i), (val))\n# define sk_X509_NAME_zero(st) SKM_sk_zero(X509_NAME, (st))\n# define sk_X509_NAME_push(st, val) SKM_sk_push(X509_NAME, (st), (val))\n# define sk_X509_NAME_unshift(st, val) SKM_sk_unshift(X509_NAME, (st), (val))\n# define sk_X509_NAME_find(st, val) SKM_sk_find(X509_NAME, (st), (val))\n# define sk_X509_NAME_find_ex(st, val) SKM_sk_find_ex(X509_NAME, (st), (val))\n# define sk_X509_NAME_delete(st, i) SKM_sk_delete(X509_NAME, (st), (i))\n# define sk_X509_NAME_delete_ptr(st, ptr) SKM_sk_delete_ptr(X509_NAME, (st), (ptr))\n# define sk_X509_NAME_insert(st, val, i) SKM_sk_insert(X509_NAME, (st), (val), (i))\n# define sk_X509_NAME_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(X509_NAME, (st), (cmp))\n# define sk_X509_NAME_dup(st) SKM_sk_dup(X509_NAME, st)\n# define sk_X509_NAME_pop_free(st, free_func) SKM_sk_pop_free(X509_NAME, (st), (free_func))\n# define sk_X509_NAME_shift(st) SKM_sk_shift(X509_NAME, (st))\n# define sk_X509_NAME_pop(st) SKM_sk_pop(X509_NAME, (st))\n# define sk_X509_NAME_sort(st) SKM_sk_sort(X509_NAME, (st))\n# define sk_X509_NAME_is_sorted(st) SKM_sk_is_sorted(X509_NAME, (st))\n# define sk_X509_NAME_ENTRY_new(cmp) SKM_sk_new(X509_NAME_ENTRY, (cmp))\n# define sk_X509_NAME_ENTRY_new_null() SKM_sk_new_null(X509_NAME_ENTRY)\n# define sk_X509_NAME_ENTRY_free(st) SKM_sk_free(X509_NAME_ENTRY, (st))\n# define sk_X509_NAME_ENTRY_num(st) SKM_sk_num(X509_NAME_ENTRY, (st))\n# define sk_X509_NAME_ENTRY_value(st, i) SKM_sk_value(X509_NAME_ENTRY, (st), (i))\n# define sk_X509_NAME_ENTRY_set(st, i, val) SKM_sk_set(X509_NAME_ENTRY, (st), (i), (val))\n# define sk_X509_NAME_ENTRY_zero(st) SKM_sk_zero(X509_NAME_ENTRY, (st))\n# define sk_X509_NAME_ENTRY_push(st, val) SKM_sk_push(X509_NAME_ENTRY, (st), (val))\n# define sk_X509_NAME_ENTRY_unshift(st, val) SKM_sk_unshift(X509_NAME_ENTRY, (st), (val))\n# define sk_X509_NAME_ENTRY_find(st, val) SKM_sk_find(X509_NAME_ENTRY, (st), (val))\n# define sk_X509_NAME_ENTRY_find_ex(st, val) SKM_sk_find_ex(X509_NAME_ENTRY, (st), (val))\n# define sk_X509_NAME_ENTRY_delete(st, i) SKM_sk_delete(X509_NAME_ENTRY, (st), (i))\n# define sk_X509_NAME_ENTRY_delete_ptr(st, ptr) SKM_sk_delete_ptr(X509_NAME_ENTRY, (st), (ptr))\n# define sk_X509_NAME_ENTRY_insert(st, val, i) SKM_sk_insert(X509_NAME_ENTRY, (st), (val), (i))\n# define sk_X509_NAME_ENTRY_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(X509_NAME_ENTRY, (st), (cmp))\n# define sk_X509_NAME_ENTRY_dup(st) SKM_sk_dup(X509_NAME_ENTRY, st)\n# define sk_X509_NAME_ENTRY_pop_free(st, free_func) SKM_sk_pop_free(X509_NAME_ENTRY, (st), (free_func))\n# define sk_X509_NAME_ENTRY_shift(st) SKM_sk_shift(X509_NAME_ENTRY, (st))\n# define sk_X509_NAME_ENTRY_pop(st) SKM_sk_pop(X509_NAME_ENTRY, (st))\n# define sk_X509_NAME_ENTRY_sort(st) SKM_sk_sort(X509_NAME_ENTRY, (st))\n# define sk_X509_NAME_ENTRY_is_sorted(st) SKM_sk_is_sorted(X509_NAME_ENTRY, (st))\n# define sk_X509_OBJECT_new(cmp) SKM_sk_new(X509_OBJECT, (cmp))\n# define sk_X509_OBJECT_new_null() SKM_sk_new_null(X509_OBJECT)\n# define sk_X509_OBJECT_free(st) SKM_sk_free(X509_OBJECT, (st))\n# define sk_X509_OBJECT_num(st) SKM_sk_num(X509_OBJECT, (st))\n# define sk_X509_OBJECT_value(st, i) SKM_sk_value(X509_OBJECT, (st), (i))\n# define sk_X509_OBJECT_set(st, i, val) SKM_sk_set(X509_OBJECT, (st), (i), (val))\n# define sk_X509_OBJECT_zero(st) SKM_sk_zero(X509_OBJECT, (st))\n# define sk_X509_OBJECT_push(st, val) SKM_sk_push(X509_OBJECT, (st), (val))\n# define sk_X509_OBJECT_unshift(st, val) SKM_sk_unshift(X509_OBJECT, (st), (val))\n# define sk_X509_OBJECT_find(st, val) SKM_sk_find(X509_OBJECT, (st), (val))\n# define sk_X509_OBJECT_find_ex(st, val) SKM_sk_find_ex(X509_OBJECT, (st), (val))\n# define sk_X509_OBJECT_delete(st, i) SKM_sk_delete(X509_OBJECT, (st), (i))\n# define sk_X509_OBJECT_delete_ptr(st, ptr) SKM_sk_delete_ptr(X509_OBJECT, (st), (ptr))\n# define sk_X509_OBJECT_insert(st, val, i) SKM_sk_insert(X509_OBJECT, (st), (val), (i))\n# define sk_X509_OBJECT_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(X509_OBJECT, (st), (cmp))\n# define sk_X509_OBJECT_dup(st) SKM_sk_dup(X509_OBJECT, st)\n# define sk_X509_OBJECT_pop_free(st, free_func) SKM_sk_pop_free(X509_OBJECT, (st), (free_func))\n# define sk_X509_OBJECT_shift(st) SKM_sk_shift(X509_OBJECT, (st))\n# define sk_X509_OBJECT_pop(st) SKM_sk_pop(X509_OBJECT, (st))\n# define sk_X509_OBJECT_sort(st) SKM_sk_sort(X509_OBJECT, (st))\n# define sk_X509_OBJECT_is_sorted(st) SKM_sk_is_sorted(X509_OBJECT, (st))\n# define sk_X509_POLICY_DATA_new(cmp) SKM_sk_new(X509_POLICY_DATA, (cmp))\n# define sk_X509_POLICY_DATA_new_null() SKM_sk_new_null(X509_POLICY_DATA)\n# define sk_X509_POLICY_DATA_free(st) SKM_sk_free(X509_POLICY_DATA, (st))\n# define sk_X509_POLICY_DATA_num(st) SKM_sk_num(X509_POLICY_DATA, (st))\n# define sk_X509_POLICY_DATA_value(st, i) SKM_sk_value(X509_POLICY_DATA, (st), (i))\n# define sk_X509_POLICY_DATA_set(st, i, val) SKM_sk_set(X509_POLICY_DATA, (st), (i), (val))\n# define sk_X509_POLICY_DATA_zero(st) SKM_sk_zero(X509_POLICY_DATA, (st))\n# define sk_X509_POLICY_DATA_push(st, val) SKM_sk_push(X509_POLICY_DATA, (st), (val))\n# define sk_X509_POLICY_DATA_unshift(st, val) SKM_sk_unshift(X509_POLICY_DATA, (st), (val))\n# define sk_X509_POLICY_DATA_find(st, val) SKM_sk_find(X509_POLICY_DATA, (st), (val))\n# define sk_X509_POLICY_DATA_find_ex(st, val) SKM_sk_find_ex(X509_POLICY_DATA, (st), (val))\n# define sk_X509_POLICY_DATA_delete(st, i) SKM_sk_delete(X509_POLICY_DATA, (st), (i))\n# define sk_X509_POLICY_DATA_delete_ptr(st, ptr) SKM_sk_delete_ptr(X509_POLICY_DATA, (st), (ptr))\n# define sk_X509_POLICY_DATA_insert(st, val, i) SKM_sk_insert(X509_POLICY_DATA, (st), (val), (i))\n# define sk_X509_POLICY_DATA_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(X509_POLICY_DATA, (st), (cmp))\n# define sk_X509_POLICY_DATA_dup(st) SKM_sk_dup(X509_POLICY_DATA, st)\n# define sk_X509_POLICY_DATA_pop_free(st, free_func) SKM_sk_pop_free(X509_POLICY_DATA, (st), (free_func))\n# define sk_X509_POLICY_DATA_shift(st) SKM_sk_shift(X509_POLICY_DATA, (st))\n# define sk_X509_POLICY_DATA_pop(st) SKM_sk_pop(X509_POLICY_DATA, (st))\n# define sk_X509_POLICY_DATA_sort(st) SKM_sk_sort(X509_POLICY_DATA, (st))\n# define sk_X509_POLICY_DATA_is_sorted(st) SKM_sk_is_sorted(X509_POLICY_DATA, (st))\n# define sk_X509_POLICY_NODE_new(cmp) SKM_sk_new(X509_POLICY_NODE, (cmp))\n# define sk_X509_POLICY_NODE_new_null() SKM_sk_new_null(X509_POLICY_NODE)\n# define sk_X509_POLICY_NODE_free(st) SKM_sk_free(X509_POLICY_NODE, (st))\n# define sk_X509_POLICY_NODE_num(st) SKM_sk_num(X509_POLICY_NODE, (st))\n# define sk_X509_POLICY_NODE_value(st, i) SKM_sk_value(X509_POLICY_NODE, (st), (i))\n# define sk_X509_POLICY_NODE_set(st, i, val) SKM_sk_set(X509_POLICY_NODE, (st), (i), (val))\n# define sk_X509_POLICY_NODE_zero(st) SKM_sk_zero(X509_POLICY_NODE, (st))\n# define sk_X509_POLICY_NODE_push(st, val) SKM_sk_push(X509_POLICY_NODE, (st), (val))\n# define sk_X509_POLICY_NODE_unshift(st, val) SKM_sk_unshift(X509_POLICY_NODE, (st), (val))\n# define sk_X509_POLICY_NODE_find(st, val) SKM_sk_find(X509_POLICY_NODE, (st), (val))\n# define sk_X509_POLICY_NODE_find_ex(st, val) SKM_sk_find_ex(X509_POLICY_NODE, (st), (val))\n# define sk_X509_POLICY_NODE_delete(st, i) SKM_sk_delete(X509_POLICY_NODE, (st), (i))\n# define sk_X509_POLICY_NODE_delete_ptr(st, ptr) SKM_sk_delete_ptr(X509_POLICY_NODE, (st), (ptr))\n# define sk_X509_POLICY_NODE_insert(st, val, i) SKM_sk_insert(X509_POLICY_NODE, (st), (val), (i))\n# define sk_X509_POLICY_NODE_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(X509_POLICY_NODE, (st), (cmp))\n# define sk_X509_POLICY_NODE_dup(st) SKM_sk_dup(X509_POLICY_NODE, st)\n# define sk_X509_POLICY_NODE_pop_free(st, free_func) SKM_sk_pop_free(X509_POLICY_NODE, (st), (free_func))\n# define sk_X509_POLICY_NODE_shift(st) SKM_sk_shift(X509_POLICY_NODE, (st))\n# define sk_X509_POLICY_NODE_pop(st) SKM_sk_pop(X509_POLICY_NODE, (st))\n# define sk_X509_POLICY_NODE_sort(st) SKM_sk_sort(X509_POLICY_NODE, (st))\n# define sk_X509_POLICY_NODE_is_sorted(st) SKM_sk_is_sorted(X509_POLICY_NODE, (st))\n# define sk_X509_PURPOSE_new(cmp) SKM_sk_new(X509_PURPOSE, (cmp))\n# define sk_X509_PURPOSE_new_null() SKM_sk_new_null(X509_PURPOSE)\n# define sk_X509_PURPOSE_free(st) SKM_sk_free(X509_PURPOSE, (st))\n# define sk_X509_PURPOSE_num(st) SKM_sk_num(X509_PURPOSE, (st))\n# define sk_X509_PURPOSE_value(st, i) SKM_sk_value(X509_PURPOSE, (st), (i))\n# define sk_X509_PURPOSE_set(st, i, val) SKM_sk_set(X509_PURPOSE, (st), (i), (val))\n# define sk_X509_PURPOSE_zero(st) SKM_sk_zero(X509_PURPOSE, (st))\n# define sk_X509_PURPOSE_push(st, val) SKM_sk_push(X509_PURPOSE, (st), (val))\n# define sk_X509_PURPOSE_unshift(st, val) SKM_sk_unshift(X509_PURPOSE, (st), (val))\n# define sk_X509_PURPOSE_find(st, val) SKM_sk_find(X509_PURPOSE, (st), (val))\n# define sk_X509_PURPOSE_find_ex(st, val) SKM_sk_find_ex(X509_PURPOSE, (st), (val))\n# define sk_X509_PURPOSE_delete(st, i) SKM_sk_delete(X509_PURPOSE, (st), (i))\n# define sk_X509_PURPOSE_delete_ptr(st, ptr) SKM_sk_delete_ptr(X509_PURPOSE, (st), (ptr))\n# define sk_X509_PURPOSE_insert(st, val, i) SKM_sk_insert(X509_PURPOSE, (st), (val), (i))\n# define sk_X509_PURPOSE_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(X509_PURPOSE, (st), (cmp))\n# define sk_X509_PURPOSE_dup(st) SKM_sk_dup(X509_PURPOSE, st)\n# define sk_X509_PURPOSE_pop_free(st, free_func) SKM_sk_pop_free(X509_PURPOSE, (st), (free_func))\n# define sk_X509_PURPOSE_shift(st) SKM_sk_shift(X509_PURPOSE, (st))\n# define sk_X509_PURPOSE_pop(st) SKM_sk_pop(X509_PURPOSE, (st))\n# define sk_X509_PURPOSE_sort(st) SKM_sk_sort(X509_PURPOSE, (st))\n# define sk_X509_PURPOSE_is_sorted(st) SKM_sk_is_sorted(X509_PURPOSE, (st))\n# define sk_X509_REVOKED_new(cmp) SKM_sk_new(X509_REVOKED, (cmp))\n# define sk_X509_REVOKED_new_null() SKM_sk_new_null(X509_REVOKED)\n# define sk_X509_REVOKED_free(st) SKM_sk_free(X509_REVOKED, (st))\n# define sk_X509_REVOKED_num(st) SKM_sk_num(X509_REVOKED, (st))\n# define sk_X509_REVOKED_value(st, i) SKM_sk_value(X509_REVOKED, (st), (i))\n# define sk_X509_REVOKED_set(st, i, val) SKM_sk_set(X509_REVOKED, (st), (i), (val))\n# define sk_X509_REVOKED_zero(st) SKM_sk_zero(X509_REVOKED, (st))\n# define sk_X509_REVOKED_push(st, val) SKM_sk_push(X509_REVOKED, (st), (val))\n# define sk_X509_REVOKED_unshift(st, val) SKM_sk_unshift(X509_REVOKED, (st), (val))\n# define sk_X509_REVOKED_find(st, val) SKM_sk_find(X509_REVOKED, (st), (val))\n# define sk_X509_REVOKED_find_ex(st, val) SKM_sk_find_ex(X509_REVOKED, (st), (val))\n# define sk_X509_REVOKED_delete(st, i) SKM_sk_delete(X509_REVOKED, (st), (i))\n# define sk_X509_REVOKED_delete_ptr(st, ptr) SKM_sk_delete_ptr(X509_REVOKED, (st), (ptr))\n# define sk_X509_REVOKED_insert(st, val, i) SKM_sk_insert(X509_REVOKED, (st), (val), (i))\n# define sk_X509_REVOKED_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(X509_REVOKED, (st), (cmp))\n# define sk_X509_REVOKED_dup(st) SKM_sk_dup(X509_REVOKED, st)\n# define sk_X509_REVOKED_pop_free(st, free_func) SKM_sk_pop_free(X509_REVOKED, (st), (free_func))\n# define sk_X509_REVOKED_shift(st) SKM_sk_shift(X509_REVOKED, (st))\n# define sk_X509_REVOKED_pop(st) SKM_sk_pop(X509_REVOKED, (st))\n# define sk_X509_REVOKED_sort(st) SKM_sk_sort(X509_REVOKED, (st))\n# define sk_X509_REVOKED_is_sorted(st) SKM_sk_is_sorted(X509_REVOKED, (st))\n# define sk_X509_TRUST_new(cmp) SKM_sk_new(X509_TRUST, (cmp))\n# define sk_X509_TRUST_new_null() SKM_sk_new_null(X509_TRUST)\n# define sk_X509_TRUST_free(st) SKM_sk_free(X509_TRUST, (st))\n# define sk_X509_TRUST_num(st) SKM_sk_num(X509_TRUST, (st))\n# define sk_X509_TRUST_value(st, i) SKM_sk_value(X509_TRUST, (st), (i))\n# define sk_X509_TRUST_set(st, i, val) SKM_sk_set(X509_TRUST, (st), (i), (val))\n# define sk_X509_TRUST_zero(st) SKM_sk_zero(X509_TRUST, (st))\n# define sk_X509_TRUST_push(st, val) SKM_sk_push(X509_TRUST, (st), (val))\n# define sk_X509_TRUST_unshift(st, val) SKM_sk_unshift(X509_TRUST, (st), (val))\n# define sk_X509_TRUST_find(st, val) SKM_sk_find(X509_TRUST, (st), (val))\n# define sk_X509_TRUST_find_ex(st, val) SKM_sk_find_ex(X509_TRUST, (st), (val))\n# define sk_X509_TRUST_delete(st, i) SKM_sk_delete(X509_TRUST, (st), (i))\n# define sk_X509_TRUST_delete_ptr(st, ptr) SKM_sk_delete_ptr(X509_TRUST, (st), (ptr))\n# define sk_X509_TRUST_insert(st, val, i) SKM_sk_insert(X509_TRUST, (st), (val), (i))\n# define sk_X509_TRUST_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(X509_TRUST, (st), (cmp))\n# define sk_X509_TRUST_dup(st) SKM_sk_dup(X509_TRUST, st)\n# define sk_X509_TRUST_pop_free(st, free_func) SKM_sk_pop_free(X509_TRUST, (st), (free_func))\n# define sk_X509_TRUST_shift(st) SKM_sk_shift(X509_TRUST, (st))\n# define sk_X509_TRUST_pop(st) SKM_sk_pop(X509_TRUST, (st))\n# define sk_X509_TRUST_sort(st) SKM_sk_sort(X509_TRUST, (st))\n# define sk_X509_TRUST_is_sorted(st) SKM_sk_is_sorted(X509_TRUST, (st))\n# define sk_X509_VERIFY_PARAM_new(cmp) SKM_sk_new(X509_VERIFY_PARAM, (cmp))\n# define sk_X509_VERIFY_PARAM_new_null() SKM_sk_new_null(X509_VERIFY_PARAM)\n# define sk_X509_VERIFY_PARAM_free(st) SKM_sk_free(X509_VERIFY_PARAM, (st))\n# define sk_X509_VERIFY_PARAM_num(st) SKM_sk_num(X509_VERIFY_PARAM, (st))\n# define sk_X509_VERIFY_PARAM_value(st, i) SKM_sk_value(X509_VERIFY_PARAM, (st), (i))\n# define sk_X509_VERIFY_PARAM_set(st, i, val) SKM_sk_set(X509_VERIFY_PARAM, (st), (i), (val))\n# define sk_X509_VERIFY_PARAM_zero(st) SKM_sk_zero(X509_VERIFY_PARAM, (st))\n# define sk_X509_VERIFY_PARAM_push(st, val) SKM_sk_push(X509_VERIFY_PARAM, (st), (val))\n# define sk_X509_VERIFY_PARAM_unshift(st, val) SKM_sk_unshift(X509_VERIFY_PARAM, (st), (val))\n# define sk_X509_VERIFY_PARAM_find(st, val) SKM_sk_find(X509_VERIFY_PARAM, (st), (val))\n# define sk_X509_VERIFY_PARAM_find_ex(st, val) SKM_sk_find_ex(X509_VERIFY_PARAM, (st), (val))\n# define sk_X509_VERIFY_PARAM_delete(st, i) SKM_sk_delete(X509_VERIFY_PARAM, (st), (i))\n# define sk_X509_VERIFY_PARAM_delete_ptr(st, ptr) SKM_sk_delete_ptr(X509_VERIFY_PARAM, (st), (ptr))\n# define sk_X509_VERIFY_PARAM_insert(st, val, i) SKM_sk_insert(X509_VERIFY_PARAM, (st), (val), (i))\n# define sk_X509_VERIFY_PARAM_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(X509_VERIFY_PARAM, (st), (cmp))\n# define sk_X509_VERIFY_PARAM_dup(st) SKM_sk_dup(X509_VERIFY_PARAM, st)\n# define sk_X509_VERIFY_PARAM_pop_free(st, free_func) SKM_sk_pop_free(X509_VERIFY_PARAM, (st), (free_func))\n# define sk_X509_VERIFY_PARAM_shift(st) SKM_sk_shift(X509_VERIFY_PARAM, (st))\n# define sk_X509_VERIFY_PARAM_pop(st) SKM_sk_pop(X509_VERIFY_PARAM, (st))\n# define sk_X509_VERIFY_PARAM_sort(st) SKM_sk_sort(X509_VERIFY_PARAM, (st))\n# define sk_X509_VERIFY_PARAM_is_sorted(st) SKM_sk_is_sorted(X509_VERIFY_PARAM, (st))\n# define sk_nid_triple_new(cmp) SKM_sk_new(nid_triple, (cmp))\n# define sk_nid_triple_new_null() SKM_sk_new_null(nid_triple)\n# define sk_nid_triple_free(st) SKM_sk_free(nid_triple, (st))\n# define sk_nid_triple_num(st) SKM_sk_num(nid_triple, (st))\n# define sk_nid_triple_value(st, i) SKM_sk_value(nid_triple, (st), (i))\n# define sk_nid_triple_set(st, i, val) SKM_sk_set(nid_triple, (st), (i), (val))\n# define sk_nid_triple_zero(st) SKM_sk_zero(nid_triple, (st))\n# define sk_nid_triple_push(st, val) SKM_sk_push(nid_triple, (st), (val))\n# define sk_nid_triple_unshift(st, val) SKM_sk_unshift(nid_triple, (st), (val))\n# define sk_nid_triple_find(st, val) SKM_sk_find(nid_triple, (st), (val))\n# define sk_nid_triple_find_ex(st, val) SKM_sk_find_ex(nid_triple, (st), (val))\n# define sk_nid_triple_delete(st, i) SKM_sk_delete(nid_triple, (st), (i))\n# define sk_nid_triple_delete_ptr(st, ptr) SKM_sk_delete_ptr(nid_triple, (st), (ptr))\n# define sk_nid_triple_insert(st, val, i) SKM_sk_insert(nid_triple, (st), (val), (i))\n# define sk_nid_triple_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(nid_triple, (st), (cmp))\n# define sk_nid_triple_dup(st) SKM_sk_dup(nid_triple, st)\n# define sk_nid_triple_pop_free(st, free_func) SKM_sk_pop_free(nid_triple, (st), (free_func))\n# define sk_nid_triple_shift(st) SKM_sk_shift(nid_triple, (st))\n# define sk_nid_triple_pop(st) SKM_sk_pop(nid_triple, (st))\n# define sk_nid_triple_sort(st) SKM_sk_sort(nid_triple, (st))\n# define sk_nid_triple_is_sorted(st) SKM_sk_is_sorted(nid_triple, (st))\n# define sk_void_new(cmp) SKM_sk_new(void, (cmp))\n# define sk_void_new_null() SKM_sk_new_null(void)\n# define sk_void_free(st) SKM_sk_free(void, (st))\n# define sk_void_num(st) SKM_sk_num(void, (st))\n# define sk_void_value(st, i) SKM_sk_value(void, (st), (i))\n# define sk_void_set(st, i, val) SKM_sk_set(void, (st), (i), (val))\n# define sk_void_zero(st) SKM_sk_zero(void, (st))\n# define sk_void_push(st, val) SKM_sk_push(void, (st), (val))\n# define sk_void_unshift(st, val) SKM_sk_unshift(void, (st), (val))\n# define sk_void_find(st, val) SKM_sk_find(void, (st), (val))\n# define sk_void_find_ex(st, val) SKM_sk_find_ex(void, (st), (val))\n# define sk_void_delete(st, i) SKM_sk_delete(void, (st), (i))\n# define sk_void_delete_ptr(st, ptr) SKM_sk_delete_ptr(void, (st), (ptr))\n# define sk_void_insert(st, val, i) SKM_sk_insert(void, (st), (val), (i))\n# define sk_void_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(void, (st), (cmp))\n# define sk_void_dup(st) SKM_sk_dup(void, st)\n# define sk_void_pop_free(st, free_func) SKM_sk_pop_free(void, (st), (free_func))\n# define sk_void_shift(st) SKM_sk_shift(void, (st))\n# define sk_void_pop(st) SKM_sk_pop(void, (st))\n# define sk_void_sort(st) SKM_sk_sort(void, (st))\n# define sk_void_is_sorted(st) SKM_sk_is_sorted(void, (st))\n# define sk_OPENSSL_STRING_new(cmp) ((STACK_OF(OPENSSL_STRING) *)sk_new(CHECKED_SK_CMP_FUNC(char, cmp)))\n# define sk_OPENSSL_STRING_new_null() ((STACK_OF(OPENSSL_STRING) *)sk_new_null())\n# define sk_OPENSSL_STRING_push(st, val) sk_push(CHECKED_STACK_OF(OPENSSL_STRING, st), CHECKED_PTR_OF(char, val))\n# define sk_OPENSSL_STRING_find(st, val) sk_find(CHECKED_STACK_OF(OPENSSL_STRING, st), CHECKED_PTR_OF(char, val))\n# define sk_OPENSSL_STRING_value(st, i) ((OPENSSL_STRING)sk_value(CHECKED_STACK_OF(OPENSSL_STRING, st), i))\n# define sk_OPENSSL_STRING_num(st) SKM_sk_num(OPENSSL_STRING, st)\n# define sk_OPENSSL_STRING_pop_free(st, free_func) sk_pop_free(CHECKED_STACK_OF(OPENSSL_STRING, st), CHECKED_SK_FREE_FUNC2(OPENSSL_STRING, free_func))\n# define sk_OPENSSL_STRING_insert(st, val, i) sk_insert(CHECKED_STACK_OF(OPENSSL_STRING, st), CHECKED_PTR_OF(char, val), i)\n# define sk_OPENSSL_STRING_free(st) SKM_sk_free(OPENSSL_STRING, st)\n# define sk_OPENSSL_STRING_set(st, i, val) sk_set(CHECKED_STACK_OF(OPENSSL_STRING, st), i, CHECKED_PTR_OF(char, val))\n# define sk_OPENSSL_STRING_zero(st) SKM_sk_zero(OPENSSL_STRING, (st))\n# define sk_OPENSSL_STRING_unshift(st, val) sk_unshift(CHECKED_STACK_OF(OPENSSL_STRING, st), CHECKED_PTR_OF(char, val))\n# define sk_OPENSSL_STRING_find_ex(st, val) sk_find_ex((_STACK *)CHECKED_CONST_PTR_OF(STACK_OF(OPENSSL_STRING), st), CHECKED_CONST_PTR_OF(char, val))\n# define sk_OPENSSL_STRING_delete(st, i) SKM_sk_delete(OPENSSL_STRING, (st), (i))\n# define sk_OPENSSL_STRING_delete_ptr(st, ptr) (OPENSSL_STRING *)sk_delete_ptr(CHECKED_STACK_OF(OPENSSL_STRING, st), CHECKED_PTR_OF(char, ptr))\n# define sk_OPENSSL_STRING_set_cmp_func(st, cmp)  \\\n        ((int (*)(const char * const *,const char * const *)) \\\n        sk_set_cmp_func(CHECKED_STACK_OF(OPENSSL_STRING, st), CHECKED_SK_CMP_FUNC(char, cmp)))\n# define sk_OPENSSL_STRING_dup(st) SKM_sk_dup(OPENSSL_STRING, st)\n# define sk_OPENSSL_STRING_shift(st) SKM_sk_shift(OPENSSL_STRING, (st))\n# define sk_OPENSSL_STRING_pop(st) (char *)sk_pop(CHECKED_STACK_OF(OPENSSL_STRING, st))\n# define sk_OPENSSL_STRING_sort(st) SKM_sk_sort(OPENSSL_STRING, (st))\n# define sk_OPENSSL_STRING_is_sorted(st) SKM_sk_is_sorted(OPENSSL_STRING, (st))\n# define sk_OPENSSL_BLOCK_new(cmp) ((STACK_OF(OPENSSL_BLOCK) *)sk_new(CHECKED_SK_CMP_FUNC(void, cmp)))\n# define sk_OPENSSL_BLOCK_new_null() ((STACK_OF(OPENSSL_BLOCK) *)sk_new_null())\n# define sk_OPENSSL_BLOCK_push(st, val) sk_push(CHECKED_STACK_OF(OPENSSL_BLOCK, st), CHECKED_PTR_OF(void, val))\n# define sk_OPENSSL_BLOCK_find(st, val) sk_find(CHECKED_STACK_OF(OPENSSL_BLOCK, st), CHECKED_PTR_OF(void, val))\n# define sk_OPENSSL_BLOCK_value(st, i) ((OPENSSL_BLOCK)sk_value(CHECKED_STACK_OF(OPENSSL_BLOCK, st), i))\n# define sk_OPENSSL_BLOCK_num(st) SKM_sk_num(OPENSSL_BLOCK, st)\n# define sk_OPENSSL_BLOCK_pop_free(st, free_func) sk_pop_free(CHECKED_STACK_OF(OPENSSL_BLOCK, st), CHECKED_SK_FREE_FUNC2(OPENSSL_BLOCK, free_func))\n# define sk_OPENSSL_BLOCK_insert(st, val, i) sk_insert(CHECKED_STACK_OF(OPENSSL_BLOCK, st), CHECKED_PTR_OF(void, val), i)\n# define sk_OPENSSL_BLOCK_free(st) SKM_sk_free(OPENSSL_BLOCK, st)\n# define sk_OPENSSL_BLOCK_set(st, i, val) sk_set(CHECKED_STACK_OF(OPENSSL_BLOCK, st), i, CHECKED_PTR_OF(void, val))\n# define sk_OPENSSL_BLOCK_zero(st) SKM_sk_zero(OPENSSL_BLOCK, (st))\n# define sk_OPENSSL_BLOCK_unshift(st, val) sk_unshift(CHECKED_STACK_OF(OPENSSL_BLOCK, st), CHECKED_PTR_OF(void, val))\n# define sk_OPENSSL_BLOCK_find_ex(st, val) sk_find_ex((_STACK *)CHECKED_CONST_PTR_OF(STACK_OF(OPENSSL_BLOCK), st), CHECKED_CONST_PTR_OF(void, val))\n# define sk_OPENSSL_BLOCK_delete(st, i) SKM_sk_delete(OPENSSL_BLOCK, (st), (i))\n# define sk_OPENSSL_BLOCK_delete_ptr(st, ptr) (OPENSSL_BLOCK *)sk_delete_ptr(CHECKED_STACK_OF(OPENSSL_BLOCK, st), CHECKED_PTR_OF(void, ptr))\n# define sk_OPENSSL_BLOCK_set_cmp_func(st, cmp)  \\\n        ((int (*)(const void * const *,const void * const *)) \\\n        sk_set_cmp_func(CHECKED_STACK_OF(OPENSSL_BLOCK, st), CHECKED_SK_CMP_FUNC(void, cmp)))\n# define sk_OPENSSL_BLOCK_dup(st) SKM_sk_dup(OPENSSL_BLOCK, st)\n# define sk_OPENSSL_BLOCK_shift(st) SKM_sk_shift(OPENSSL_BLOCK, (st))\n# define sk_OPENSSL_BLOCK_pop(st) (void *)sk_pop(CHECKED_STACK_OF(OPENSSL_BLOCK, st))\n# define sk_OPENSSL_BLOCK_sort(st) SKM_sk_sort(OPENSSL_BLOCK, (st))\n# define sk_OPENSSL_BLOCK_is_sorted(st) SKM_sk_is_sorted(OPENSSL_BLOCK, (st))\n# define sk_OPENSSL_PSTRING_new(cmp) ((STACK_OF(OPENSSL_PSTRING) *)sk_new(CHECKED_SK_CMP_FUNC(OPENSSL_STRING, cmp)))\n# define sk_OPENSSL_PSTRING_new_null() ((STACK_OF(OPENSSL_PSTRING) *)sk_new_null())\n# define sk_OPENSSL_PSTRING_push(st, val) sk_push(CHECKED_STACK_OF(OPENSSL_PSTRING, st), CHECKED_PTR_OF(OPENSSL_STRING, val))\n# define sk_OPENSSL_PSTRING_find(st, val) sk_find(CHECKED_STACK_OF(OPENSSL_PSTRING, st), CHECKED_PTR_OF(OPENSSL_STRING, val))\n# define sk_OPENSSL_PSTRING_value(st, i) ((OPENSSL_PSTRING)sk_value(CHECKED_STACK_OF(OPENSSL_PSTRING, st), i))\n# define sk_OPENSSL_PSTRING_num(st) SKM_sk_num(OPENSSL_PSTRING, st)\n# define sk_OPENSSL_PSTRING_pop_free(st, free_func) sk_pop_free(CHECKED_STACK_OF(OPENSSL_PSTRING, st), CHECKED_SK_FREE_FUNC2(OPENSSL_PSTRING, free_func))\n# define sk_OPENSSL_PSTRING_insert(st, val, i) sk_insert(CHECKED_STACK_OF(OPENSSL_PSTRING, st), CHECKED_PTR_OF(OPENSSL_STRING, val), i)\n# define sk_OPENSSL_PSTRING_free(st) SKM_sk_free(OPENSSL_PSTRING, st)\n# define sk_OPENSSL_PSTRING_set(st, i, val) sk_set(CHECKED_STACK_OF(OPENSSL_PSTRING, st), i, CHECKED_PTR_OF(OPENSSL_STRING, val))\n# define sk_OPENSSL_PSTRING_zero(st) SKM_sk_zero(OPENSSL_PSTRING, (st))\n# define sk_OPENSSL_PSTRING_unshift(st, val) sk_unshift(CHECKED_STACK_OF(OPENSSL_PSTRING, st), CHECKED_PTR_OF(OPENSSL_STRING, val))\n# define sk_OPENSSL_PSTRING_find_ex(st, val) sk_find_ex((_STACK *)CHECKED_CONST_PTR_OF(STACK_OF(OPENSSL_PSTRING), st), CHECKED_CONST_PTR_OF(OPENSSL_STRING, val))\n# define sk_OPENSSL_PSTRING_delete(st, i) SKM_sk_delete(OPENSSL_PSTRING, (st), (i))\n# define sk_OPENSSL_PSTRING_delete_ptr(st, ptr) (OPENSSL_PSTRING *)sk_delete_ptr(CHECKED_STACK_OF(OPENSSL_PSTRING, st), CHECKED_PTR_OF(OPENSSL_STRING, ptr))\n# define sk_OPENSSL_PSTRING_set_cmp_func(st, cmp)  \\\n        ((int (*)(const OPENSSL_STRING * const *,const OPENSSL_STRING * const *)) \\\n        sk_set_cmp_func(CHECKED_STACK_OF(OPENSSL_PSTRING, st), CHECKED_SK_CMP_FUNC(OPENSSL_STRING, cmp)))\n# define sk_OPENSSL_PSTRING_dup(st) SKM_sk_dup(OPENSSL_PSTRING, st)\n# define sk_OPENSSL_PSTRING_shift(st) SKM_sk_shift(OPENSSL_PSTRING, (st))\n# define sk_OPENSSL_PSTRING_pop(st) (OPENSSL_STRING *)sk_pop(CHECKED_STACK_OF(OPENSSL_PSTRING, st))\n# define sk_OPENSSL_PSTRING_sort(st) SKM_sk_sort(OPENSSL_PSTRING, (st))\n# define sk_OPENSSL_PSTRING_is_sorted(st) SKM_sk_is_sorted(OPENSSL_PSTRING, (st))\n# define d2i_ASN1_SET_OF_ACCESS_DESCRIPTION(st, pp, length, d2i_func, free_func, ex_tag, ex_class) \\\n        SKM_ASN1_SET_OF_d2i(ACCESS_DESCRIPTION, (st), (pp), (length), (d2i_func), (free_func), (ex_tag), (ex_class))\n# define i2d_ASN1_SET_OF_ACCESS_DESCRIPTION(st, pp, i2d_func, ex_tag, ex_class, is_set) \\\n        SKM_ASN1_SET_OF_i2d(ACCESS_DESCRIPTION, (st), (pp), (i2d_func), (ex_tag), (ex_class), (is_set))\n# define ASN1_seq_pack_ACCESS_DESCRIPTION(st, i2d_func, buf, len) \\\n        SKM_ASN1_seq_pack(ACCESS_DESCRIPTION, (st), (i2d_func), (buf), (len))\n# define ASN1_seq_unpack_ACCESS_DESCRIPTION(buf, len, d2i_func, free_func) \\\n        SKM_ASN1_seq_unpack(ACCESS_DESCRIPTION, (buf), (len), (d2i_func), (free_func))\n# define d2i_ASN1_SET_OF_ASN1_INTEGER(st, pp, length, d2i_func, free_func, ex_tag, ex_class) \\\n        SKM_ASN1_SET_OF_d2i(ASN1_INTEGER, (st), (pp), (length), (d2i_func), (free_func), (ex_tag), (ex_class))\n# define i2d_ASN1_SET_OF_ASN1_INTEGER(st, pp, i2d_func, ex_tag, ex_class, is_set) \\\n        SKM_ASN1_SET_OF_i2d(ASN1_INTEGER, (st), (pp), (i2d_func), (ex_tag), (ex_class), (is_set))\n# define ASN1_seq_pack_ASN1_INTEGER(st, i2d_func, buf, len) \\\n        SKM_ASN1_seq_pack(ASN1_INTEGER, (st), (i2d_func), (buf), (len))\n# define ASN1_seq_unpack_ASN1_INTEGER(buf, len, d2i_func, free_func) \\\n        SKM_ASN1_seq_unpack(ASN1_INTEGER, (buf), (len), (d2i_func), (free_func))\n# define d2i_ASN1_SET_OF_ASN1_OBJECT(st, pp, length, d2i_func, free_func, ex_tag, ex_class) \\\n        SKM_ASN1_SET_OF_d2i(ASN1_OBJECT, (st), (pp), (length), (d2i_func), (free_func), (ex_tag), (ex_class))\n# define i2d_ASN1_SET_OF_ASN1_OBJECT(st, pp, i2d_func, ex_tag, ex_class, is_set) \\\n        SKM_ASN1_SET_OF_i2d(ASN1_OBJECT, (st), (pp), (i2d_func), (ex_tag), (ex_class), (is_set))\n# define ASN1_seq_pack_ASN1_OBJECT(st, i2d_func, buf, len) \\\n        SKM_ASN1_seq_pack(ASN1_OBJECT, (st), (i2d_func), (buf), (len))\n# define ASN1_seq_unpack_ASN1_OBJECT(buf, len, d2i_func, free_func) \\\n        SKM_ASN1_seq_unpack(ASN1_OBJECT, (buf), (len), (d2i_func), (free_func))\n# define d2i_ASN1_SET_OF_ASN1_TYPE(st, pp, length, d2i_func, free_func, ex_tag, ex_class) \\\n        SKM_ASN1_SET_OF_d2i(ASN1_TYPE, (st), (pp), (length), (d2i_func), (free_func), (ex_tag), (ex_class))\n# define i2d_ASN1_SET_OF_ASN1_TYPE(st, pp, i2d_func, ex_tag, ex_class, is_set) \\\n        SKM_ASN1_SET_OF_i2d(ASN1_TYPE, (st), (pp), (i2d_func), (ex_tag), (ex_class), (is_set))\n# define ASN1_seq_pack_ASN1_TYPE(st, i2d_func, buf, len) \\\n        SKM_ASN1_seq_pack(ASN1_TYPE, (st), (i2d_func), (buf), (len))\n# define ASN1_seq_unpack_ASN1_TYPE(buf, len, d2i_func, free_func) \\\n        SKM_ASN1_seq_unpack(ASN1_TYPE, (buf), (len), (d2i_func), (free_func))\n# define d2i_ASN1_SET_OF_ASN1_UTF8STRING(st, pp, length, d2i_func, free_func, ex_tag, ex_class) \\\n        SKM_ASN1_SET_OF_d2i(ASN1_UTF8STRING, (st), (pp), (length), (d2i_func), (free_func), (ex_tag), (ex_class))\n# define i2d_ASN1_SET_OF_ASN1_UTF8STRING(st, pp, i2d_func, ex_tag, ex_class, is_set) \\\n        SKM_ASN1_SET_OF_i2d(ASN1_UTF8STRING, (st), (pp), (i2d_func), (ex_tag), (ex_class), (is_set))\n# define ASN1_seq_pack_ASN1_UTF8STRING(st, i2d_func, buf, len) \\\n        SKM_ASN1_seq_pack(ASN1_UTF8STRING, (st), (i2d_func), (buf), (len))\n# define ASN1_seq_unpack_ASN1_UTF8STRING(buf, len, d2i_func, free_func) \\\n        SKM_ASN1_seq_unpack(ASN1_UTF8STRING, (buf), (len), (d2i_func), (free_func))\n# define d2i_ASN1_SET_OF_DIST_POINT(st, pp, length, d2i_func, free_func, ex_tag, ex_class) \\\n        SKM_ASN1_SET_OF_d2i(DIST_POINT, (st), (pp), (length), (d2i_func), (free_func), (ex_tag), (ex_class))\n# define i2d_ASN1_SET_OF_DIST_POINT(st, pp, i2d_func, ex_tag, ex_class, is_set) \\\n        SKM_ASN1_SET_OF_i2d(DIST_POINT, (st), (pp), (i2d_func), (ex_tag), (ex_class), (is_set))\n# define ASN1_seq_pack_DIST_POINT(st, i2d_func, buf, len) \\\n        SKM_ASN1_seq_pack(DIST_POINT, (st), (i2d_func), (buf), (len))\n# define ASN1_seq_unpack_DIST_POINT(buf, len, d2i_func, free_func) \\\n        SKM_ASN1_seq_unpack(DIST_POINT, (buf), (len), (d2i_func), (free_func))\n# define d2i_ASN1_SET_OF_ESS_CERT_ID(st, pp, length, d2i_func, free_func, ex_tag, ex_class) \\\n        SKM_ASN1_SET_OF_d2i(ESS_CERT_ID, (st), (pp), (length), (d2i_func), (free_func), (ex_tag), (ex_class))\n# define i2d_ASN1_SET_OF_ESS_CERT_ID(st, pp, i2d_func, ex_tag, ex_class, is_set) \\\n        SKM_ASN1_SET_OF_i2d(ESS_CERT_ID, (st), (pp), (i2d_func), (ex_tag), (ex_class), (is_set))\n# define ASN1_seq_pack_ESS_CERT_ID(st, i2d_func, buf, len) \\\n        SKM_ASN1_seq_pack(ESS_CERT_ID, (st), (i2d_func), (buf), (len))\n# define ASN1_seq_unpack_ESS_CERT_ID(buf, len, d2i_func, free_func) \\\n        SKM_ASN1_seq_unpack(ESS_CERT_ID, (buf), (len), (d2i_func), (free_func))\n# define d2i_ASN1_SET_OF_EVP_MD(st, pp, length, d2i_func, free_func, ex_tag, ex_class) \\\n        SKM_ASN1_SET_OF_d2i(EVP_MD, (st), (pp), (length), (d2i_func), (free_func), (ex_tag), (ex_class))\n# define i2d_ASN1_SET_OF_EVP_MD(st, pp, i2d_func, ex_tag, ex_class, is_set) \\\n        SKM_ASN1_SET_OF_i2d(EVP_MD, (st), (pp), (i2d_func), (ex_tag), (ex_class), (is_set))\n# define ASN1_seq_pack_EVP_MD(st, i2d_func, buf, len) \\\n        SKM_ASN1_seq_pack(EVP_MD, (st), (i2d_func), (buf), (len))\n# define ASN1_seq_unpack_EVP_MD(buf, len, d2i_func, free_func) \\\n        SKM_ASN1_seq_unpack(EVP_MD, (buf), (len), (d2i_func), (free_func))\n# define d2i_ASN1_SET_OF_GENERAL_NAME(st, pp, length, d2i_func, free_func, ex_tag, ex_class) \\\n        SKM_ASN1_SET_OF_d2i(GENERAL_NAME, (st), (pp), (length), (d2i_func), (free_func), (ex_tag), (ex_class))\n# define i2d_ASN1_SET_OF_GENERAL_NAME(st, pp, i2d_func, ex_tag, ex_class, is_set) \\\n        SKM_ASN1_SET_OF_i2d(GENERAL_NAME, (st), (pp), (i2d_func), (ex_tag), (ex_class), (is_set))\n# define ASN1_seq_pack_GENERAL_NAME(st, i2d_func, buf, len) \\\n        SKM_ASN1_seq_pack(GENERAL_NAME, (st), (i2d_func), (buf), (len))\n# define ASN1_seq_unpack_GENERAL_NAME(buf, len, d2i_func, free_func) \\\n        SKM_ASN1_seq_unpack(GENERAL_NAME, (buf), (len), (d2i_func), (free_func))\n# define d2i_ASN1_SET_OF_OCSP_ONEREQ(st, pp, length, d2i_func, free_func, ex_tag, ex_class) \\\n        SKM_ASN1_SET_OF_d2i(OCSP_ONEREQ, (st), (pp), (length), (d2i_func), (free_func), (ex_tag), (ex_class))\n# define i2d_ASN1_SET_OF_OCSP_ONEREQ(st, pp, i2d_func, ex_tag, ex_class, is_set) \\\n        SKM_ASN1_SET_OF_i2d(OCSP_ONEREQ, (st), (pp), (i2d_func), (ex_tag), (ex_class), (is_set))\n# define ASN1_seq_pack_OCSP_ONEREQ(st, i2d_func, buf, len) \\\n        SKM_ASN1_seq_pack(OCSP_ONEREQ, (st), (i2d_func), (buf), (len))\n# define ASN1_seq_unpack_OCSP_ONEREQ(buf, len, d2i_func, free_func) \\\n        SKM_ASN1_seq_unpack(OCSP_ONEREQ, (buf), (len), (d2i_func), (free_func))\n# define d2i_ASN1_SET_OF_OCSP_SINGLERESP(st, pp, length, d2i_func, free_func, ex_tag, ex_class) \\\n        SKM_ASN1_SET_OF_d2i(OCSP_SINGLERESP, (st), (pp), (length), (d2i_func), (free_func), (ex_tag), (ex_class))\n# define i2d_ASN1_SET_OF_OCSP_SINGLERESP(st, pp, i2d_func, ex_tag, ex_class, is_set) \\\n        SKM_ASN1_SET_OF_i2d(OCSP_SINGLERESP, (st), (pp), (i2d_func), (ex_tag), (ex_class), (is_set))\n# define ASN1_seq_pack_OCSP_SINGLERESP(st, i2d_func, buf, len) \\\n        SKM_ASN1_seq_pack(OCSP_SINGLERESP, (st), (i2d_func), (buf), (len))\n# define ASN1_seq_unpack_OCSP_SINGLERESP(buf, len, d2i_func, free_func) \\\n        SKM_ASN1_seq_unpack(OCSP_SINGLERESP, (buf), (len), (d2i_func), (free_func))\n# define d2i_ASN1_SET_OF_PKCS12_SAFEBAG(st, pp, length, d2i_func, free_func, ex_tag, ex_class) \\\n        SKM_ASN1_SET_OF_d2i(PKCS12_SAFEBAG, (st), (pp), (length), (d2i_func), (free_func), (ex_tag), (ex_class))\n# define i2d_ASN1_SET_OF_PKCS12_SAFEBAG(st, pp, i2d_func, ex_tag, ex_class, is_set) \\\n        SKM_ASN1_SET_OF_i2d(PKCS12_SAFEBAG, (st), (pp), (i2d_func), (ex_tag), (ex_class), (is_set))\n# define ASN1_seq_pack_PKCS12_SAFEBAG(st, i2d_func, buf, len) \\\n        SKM_ASN1_seq_pack(PKCS12_SAFEBAG, (st), (i2d_func), (buf), (len))\n# define ASN1_seq_unpack_PKCS12_SAFEBAG(buf, len, d2i_func, free_func) \\\n        SKM_ASN1_seq_unpack(PKCS12_SAFEBAG, (buf), (len), (d2i_func), (free_func))\n# define d2i_ASN1_SET_OF_PKCS7(st, pp, length, d2i_func, free_func, ex_tag, ex_class) \\\n        SKM_ASN1_SET_OF_d2i(PKCS7, (st), (pp), (length), (d2i_func), (free_func), (ex_tag), (ex_class))\n# define i2d_ASN1_SET_OF_PKCS7(st, pp, i2d_func, ex_tag, ex_class, is_set) \\\n        SKM_ASN1_SET_OF_i2d(PKCS7, (st), (pp), (i2d_func), (ex_tag), (ex_class), (is_set))\n# define ASN1_seq_pack_PKCS7(st, i2d_func, buf, len) \\\n        SKM_ASN1_seq_pack(PKCS7, (st), (i2d_func), (buf), (len))\n# define ASN1_seq_unpack_PKCS7(buf, len, d2i_func, free_func) \\\n        SKM_ASN1_seq_unpack(PKCS7, (buf), (len), (d2i_func), (free_func))\n# define d2i_ASN1_SET_OF_PKCS7_RECIP_INFO(st, pp, length, d2i_func, free_func, ex_tag, ex_class) \\\n        SKM_ASN1_SET_OF_d2i(PKCS7_RECIP_INFO, (st), (pp), (length), (d2i_func), (free_func), (ex_tag), (ex_class))\n# define i2d_ASN1_SET_OF_PKCS7_RECIP_INFO(st, pp, i2d_func, ex_tag, ex_class, is_set) \\\n        SKM_ASN1_SET_OF_i2d(PKCS7_RECIP_INFO, (st), (pp), (i2d_func), (ex_tag), (ex_class), (is_set))\n# define ASN1_seq_pack_PKCS7_RECIP_INFO(st, i2d_func, buf, len) \\\n        SKM_ASN1_seq_pack(PKCS7_RECIP_INFO, (st), (i2d_func), (buf), (len))\n# define ASN1_seq_unpack_PKCS7_RECIP_INFO(buf, len, d2i_func, free_func) \\\n        SKM_ASN1_seq_unpack(PKCS7_RECIP_INFO, (buf), (len), (d2i_func), (free_func))\n# define d2i_ASN1_SET_OF_PKCS7_SIGNER_INFO(st, pp, length, d2i_func, free_func, ex_tag, ex_class) \\\n        SKM_ASN1_SET_OF_d2i(PKCS7_SIGNER_INFO, (st), (pp), (length), (d2i_func), (free_func), (ex_tag), (ex_class))\n# define i2d_ASN1_SET_OF_PKCS7_SIGNER_INFO(st, pp, i2d_func, ex_tag, ex_class, is_set) \\\n        SKM_ASN1_SET_OF_i2d(PKCS7_SIGNER_INFO, (st), (pp), (i2d_func), (ex_tag), (ex_class), (is_set))\n# define ASN1_seq_pack_PKCS7_SIGNER_INFO(st, i2d_func, buf, len) \\\n        SKM_ASN1_seq_pack(PKCS7_SIGNER_INFO, (st), (i2d_func), (buf), (len))\n# define ASN1_seq_unpack_PKCS7_SIGNER_INFO(buf, len, d2i_func, free_func) \\\n        SKM_ASN1_seq_unpack(PKCS7_SIGNER_INFO, (buf), (len), (d2i_func), (free_func))\n# define d2i_ASN1_SET_OF_POLICYINFO(st, pp, length, d2i_func, free_func, ex_tag, ex_class) \\\n        SKM_ASN1_SET_OF_d2i(POLICYINFO, (st), (pp), (length), (d2i_func), (free_func), (ex_tag), (ex_class))\n# define i2d_ASN1_SET_OF_POLICYINFO(st, pp, i2d_func, ex_tag, ex_class, is_set) \\\n        SKM_ASN1_SET_OF_i2d(POLICYINFO, (st), (pp), (i2d_func), (ex_tag), (ex_class), (is_set))\n# define ASN1_seq_pack_POLICYINFO(st, i2d_func, buf, len) \\\n        SKM_ASN1_seq_pack(POLICYINFO, (st), (i2d_func), (buf), (len))\n# define ASN1_seq_unpack_POLICYINFO(buf, len, d2i_func, free_func) \\\n        SKM_ASN1_seq_unpack(POLICYINFO, (buf), (len), (d2i_func), (free_func))\n# define d2i_ASN1_SET_OF_POLICYQUALINFO(st, pp, length, d2i_func, free_func, ex_tag, ex_class) \\\n        SKM_ASN1_SET_OF_d2i(POLICYQUALINFO, (st), (pp), (length), (d2i_func), (free_func), (ex_tag), (ex_class))\n# define i2d_ASN1_SET_OF_POLICYQUALINFO(st, pp, i2d_func, ex_tag, ex_class, is_set) \\\n        SKM_ASN1_SET_OF_i2d(POLICYQUALINFO, (st), (pp), (i2d_func), (ex_tag), (ex_class), (is_set))\n# define ASN1_seq_pack_POLICYQUALINFO(st, i2d_func, buf, len) \\\n        SKM_ASN1_seq_pack(POLICYQUALINFO, (st), (i2d_func), (buf), (len))\n# define ASN1_seq_unpack_POLICYQUALINFO(buf, len, d2i_func, free_func) \\\n        SKM_ASN1_seq_unpack(POLICYQUALINFO, (buf), (len), (d2i_func), (free_func))\n# define d2i_ASN1_SET_OF_SXNETID(st, pp, length, d2i_func, free_func, ex_tag, ex_class) \\\n        SKM_ASN1_SET_OF_d2i(SXNETID, (st), (pp), (length), (d2i_func), (free_func), (ex_tag), (ex_class))\n# define i2d_ASN1_SET_OF_SXNETID(st, pp, i2d_func, ex_tag, ex_class, is_set) \\\n        SKM_ASN1_SET_OF_i2d(SXNETID, (st), (pp), (i2d_func), (ex_tag), (ex_class), (is_set))\n# define ASN1_seq_pack_SXNETID(st, i2d_func, buf, len) \\\n        SKM_ASN1_seq_pack(SXNETID, (st), (i2d_func), (buf), (len))\n# define ASN1_seq_unpack_SXNETID(buf, len, d2i_func, free_func) \\\n        SKM_ASN1_seq_unpack(SXNETID, (buf), (len), (d2i_func), (free_func))\n# define d2i_ASN1_SET_OF_X509(st, pp, length, d2i_func, free_func, ex_tag, ex_class) \\\n        SKM_ASN1_SET_OF_d2i(X509, (st), (pp), (length), (d2i_func), (free_func), (ex_tag), (ex_class))\n# define i2d_ASN1_SET_OF_X509(st, pp, i2d_func, ex_tag, ex_class, is_set) \\\n        SKM_ASN1_SET_OF_i2d(X509, (st), (pp), (i2d_func), (ex_tag), (ex_class), (is_set))\n# define ASN1_seq_pack_X509(st, i2d_func, buf, len) \\\n        SKM_ASN1_seq_pack(X509, (st), (i2d_func), (buf), (len))\n# define ASN1_seq_unpack_X509(buf, len, d2i_func, free_func) \\\n        SKM_ASN1_seq_unpack(X509, (buf), (len), (d2i_func), (free_func))\n# define d2i_ASN1_SET_OF_X509_ALGOR(st, pp, length, d2i_func, free_func, ex_tag, ex_class) \\\n        SKM_ASN1_SET_OF_d2i(X509_ALGOR, (st), (pp), (length), (d2i_func), (free_func), (ex_tag), (ex_class))\n# define i2d_ASN1_SET_OF_X509_ALGOR(st, pp, i2d_func, ex_tag, ex_class, is_set) \\\n        SKM_ASN1_SET_OF_i2d(X509_ALGOR, (st), (pp), (i2d_func), (ex_tag), (ex_class), (is_set))\n# define ASN1_seq_pack_X509_ALGOR(st, i2d_func, buf, len) \\\n        SKM_ASN1_seq_pack(X509_ALGOR, (st), (i2d_func), (buf), (len))\n# define ASN1_seq_unpack_X509_ALGOR(buf, len, d2i_func, free_func) \\\n        SKM_ASN1_seq_unpack(X509_ALGOR, (buf), (len), (d2i_func), (free_func))\n# define d2i_ASN1_SET_OF_X509_ATTRIBUTE(st, pp, length, d2i_func, free_func, ex_tag, ex_class) \\\n        SKM_ASN1_SET_OF_d2i(X509_ATTRIBUTE, (st), (pp), (length), (d2i_func), (free_func), (ex_tag), (ex_class))\n# define i2d_ASN1_SET_OF_X509_ATTRIBUTE(st, pp, i2d_func, ex_tag, ex_class, is_set) \\\n        SKM_ASN1_SET_OF_i2d(X509_ATTRIBUTE, (st), (pp), (i2d_func), (ex_tag), (ex_class), (is_set))\n# define ASN1_seq_pack_X509_ATTRIBUTE(st, i2d_func, buf, len) \\\n        SKM_ASN1_seq_pack(X509_ATTRIBUTE, (st), (i2d_func), (buf), (len))\n# define ASN1_seq_unpack_X509_ATTRIBUTE(buf, len, d2i_func, free_func) \\\n        SKM_ASN1_seq_unpack(X509_ATTRIBUTE, (buf), (len), (d2i_func), (free_func))\n# define d2i_ASN1_SET_OF_X509_CRL(st, pp, length, d2i_func, free_func, ex_tag, ex_class) \\\n        SKM_ASN1_SET_OF_d2i(X509_CRL, (st), (pp), (length), (d2i_func), (free_func), (ex_tag), (ex_class))\n# define i2d_ASN1_SET_OF_X509_CRL(st, pp, i2d_func, ex_tag, ex_class, is_set) \\\n        SKM_ASN1_SET_OF_i2d(X509_CRL, (st), (pp), (i2d_func), (ex_tag), (ex_class), (is_set))\n# define ASN1_seq_pack_X509_CRL(st, i2d_func, buf, len) \\\n        SKM_ASN1_seq_pack(X509_CRL, (st), (i2d_func), (buf), (len))\n# define ASN1_seq_unpack_X509_CRL(buf, len, d2i_func, free_func) \\\n        SKM_ASN1_seq_unpack(X509_CRL, (buf), (len), (d2i_func), (free_func))\n# define d2i_ASN1_SET_OF_X509_EXTENSION(st, pp, length, d2i_func, free_func, ex_tag, ex_class) \\\n        SKM_ASN1_SET_OF_d2i(X509_EXTENSION, (st), (pp), (length), (d2i_func), (free_func), (ex_tag), (ex_class))\n# define i2d_ASN1_SET_OF_X509_EXTENSION(st, pp, i2d_func, ex_tag, ex_class, is_set) \\\n        SKM_ASN1_SET_OF_i2d(X509_EXTENSION, (st), (pp), (i2d_func), (ex_tag), (ex_class), (is_set))\n# define ASN1_seq_pack_X509_EXTENSION(st, i2d_func, buf, len) \\\n        SKM_ASN1_seq_pack(X509_EXTENSION, (st), (i2d_func), (buf), (len))\n# define ASN1_seq_unpack_X509_EXTENSION(buf, len, d2i_func, free_func) \\\n        SKM_ASN1_seq_unpack(X509_EXTENSION, (buf), (len), (d2i_func), (free_func))\n# define d2i_ASN1_SET_OF_X509_NAME_ENTRY(st, pp, length, d2i_func, free_func, ex_tag, ex_class) \\\n        SKM_ASN1_SET_OF_d2i(X509_NAME_ENTRY, (st), (pp), (length), (d2i_func), (free_func), (ex_tag), (ex_class))\n# define i2d_ASN1_SET_OF_X509_NAME_ENTRY(st, pp, i2d_func, ex_tag, ex_class, is_set) \\\n        SKM_ASN1_SET_OF_i2d(X509_NAME_ENTRY, (st), (pp), (i2d_func), (ex_tag), (ex_class), (is_set))\n# define ASN1_seq_pack_X509_NAME_ENTRY(st, i2d_func, buf, len) \\\n        SKM_ASN1_seq_pack(X509_NAME_ENTRY, (st), (i2d_func), (buf), (len))\n# define ASN1_seq_unpack_X509_NAME_ENTRY(buf, len, d2i_func, free_func) \\\n        SKM_ASN1_seq_unpack(X509_NAME_ENTRY, (buf), (len), (d2i_func), (free_func))\n# define d2i_ASN1_SET_OF_X509_REVOKED(st, pp, length, d2i_func, free_func, ex_tag, ex_class) \\\n        SKM_ASN1_SET_OF_d2i(X509_REVOKED, (st), (pp), (length), (d2i_func), (free_func), (ex_tag), (ex_class))\n# define i2d_ASN1_SET_OF_X509_REVOKED(st, pp, i2d_func, ex_tag, ex_class, is_set) \\\n        SKM_ASN1_SET_OF_i2d(X509_REVOKED, (st), (pp), (i2d_func), (ex_tag), (ex_class), (is_set))\n# define ASN1_seq_pack_X509_REVOKED(st, i2d_func, buf, len) \\\n        SKM_ASN1_seq_pack(X509_REVOKED, (st), (i2d_func), (buf), (len))\n# define ASN1_seq_unpack_X509_REVOKED(buf, len, d2i_func, free_func) \\\n        SKM_ASN1_seq_unpack(X509_REVOKED, (buf), (len), (d2i_func), (free_func))\n# define PKCS12_decrypt_d2i_PKCS12_SAFEBAG(algor, d2i_func, free_func, pass, passlen, oct, seq) \\\n        SKM_PKCS12_decrypt_d2i(PKCS12_SAFEBAG, (algor), (d2i_func), (free_func), (pass), (passlen), (oct), (seq))\n# define PKCS12_decrypt_d2i_PKCS7(algor, d2i_func, free_func, pass, passlen, oct, seq) \\\n        SKM_PKCS12_decrypt_d2i(PKCS7, (algor), (d2i_func), (free_func), (pass), (passlen), (oct), (seq))\n# define lh_ADDED_OBJ_new() LHM_lh_new(ADDED_OBJ,added_obj)\n# define lh_ADDED_OBJ_insert(lh,inst) LHM_lh_insert(ADDED_OBJ,lh,inst)\n# define lh_ADDED_OBJ_retrieve(lh,inst) LHM_lh_retrieve(ADDED_OBJ,lh,inst)\n# define lh_ADDED_OBJ_delete(lh,inst) LHM_lh_delete(ADDED_OBJ,lh,inst)\n# define lh_ADDED_OBJ_doall(lh,fn) LHM_lh_doall(ADDED_OBJ,lh,fn)\n# define lh_ADDED_OBJ_doall_arg(lh,fn,arg_type,arg) \\\n  LHM_lh_doall_arg(ADDED_OBJ,lh,fn,arg_type,arg)\n# define lh_ADDED_OBJ_error(lh) LHM_lh_error(ADDED_OBJ,lh)\n# define lh_ADDED_OBJ_num_items(lh) LHM_lh_num_items(ADDED_OBJ,lh)\n# define lh_ADDED_OBJ_down_load(lh) LHM_lh_down_load(ADDED_OBJ,lh)\n# define lh_ADDED_OBJ_node_stats_bio(lh,out) \\\n  LHM_lh_node_stats_bio(ADDED_OBJ,lh,out)\n# define lh_ADDED_OBJ_node_usage_stats_bio(lh,out) \\\n  LHM_lh_node_usage_stats_bio(ADDED_OBJ,lh,out)\n# define lh_ADDED_OBJ_stats_bio(lh,out) \\\n  LHM_lh_stats_bio(ADDED_OBJ,lh,out)\n# define lh_ADDED_OBJ_free(lh) LHM_lh_free(ADDED_OBJ,lh)\n# define lh_APP_INFO_new() LHM_lh_new(APP_INFO,app_info)\n# define lh_APP_INFO_insert(lh,inst) LHM_lh_insert(APP_INFO,lh,inst)\n# define lh_APP_INFO_retrieve(lh,inst) LHM_lh_retrieve(APP_INFO,lh,inst)\n# define lh_APP_INFO_delete(lh,inst) LHM_lh_delete(APP_INFO,lh,inst)\n# define lh_APP_INFO_doall(lh,fn) LHM_lh_doall(APP_INFO,lh,fn)\n# define lh_APP_INFO_doall_arg(lh,fn,arg_type,arg) \\\n  LHM_lh_doall_arg(APP_INFO,lh,fn,arg_type,arg)\n# define lh_APP_INFO_error(lh) LHM_lh_error(APP_INFO,lh)\n# define lh_APP_INFO_num_items(lh) LHM_lh_num_items(APP_INFO,lh)\n# define lh_APP_INFO_down_load(lh) LHM_lh_down_load(APP_INFO,lh)\n# define lh_APP_INFO_node_stats_bio(lh,out) \\\n  LHM_lh_node_stats_bio(APP_INFO,lh,out)\n# define lh_APP_INFO_node_usage_stats_bio(lh,out) \\\n  LHM_lh_node_usage_stats_bio(APP_INFO,lh,out)\n# define lh_APP_INFO_stats_bio(lh,out) \\\n  LHM_lh_stats_bio(APP_INFO,lh,out)\n# define lh_APP_INFO_free(lh) LHM_lh_free(APP_INFO,lh)\n# define lh_CONF_VALUE_new() LHM_lh_new(CONF_VALUE,conf_value)\n# define lh_CONF_VALUE_insert(lh,inst) LHM_lh_insert(CONF_VALUE,lh,inst)\n# define lh_CONF_VALUE_retrieve(lh,inst) LHM_lh_retrieve(CONF_VALUE,lh,inst)\n# define lh_CONF_VALUE_delete(lh,inst) LHM_lh_delete(CONF_VALUE,lh,inst)\n# define lh_CONF_VALUE_doall(lh,fn) LHM_lh_doall(CONF_VALUE,lh,fn)\n# define lh_CONF_VALUE_doall_arg(lh,fn,arg_type,arg) \\\n  LHM_lh_doall_arg(CONF_VALUE,lh,fn,arg_type,arg)\n# define lh_CONF_VALUE_error(lh) LHM_lh_error(CONF_VALUE,lh)\n# define lh_CONF_VALUE_num_items(lh) LHM_lh_num_items(CONF_VALUE,lh)\n# define lh_CONF_VALUE_down_load(lh) LHM_lh_down_load(CONF_VALUE,lh)\n# define lh_CONF_VALUE_node_stats_bio(lh,out) \\\n  LHM_lh_node_stats_bio(CONF_VALUE,lh,out)\n# define lh_CONF_VALUE_node_usage_stats_bio(lh,out) \\\n  LHM_lh_node_usage_stats_bio(CONF_VALUE,lh,out)\n# define lh_CONF_VALUE_stats_bio(lh,out) \\\n  LHM_lh_stats_bio(CONF_VALUE,lh,out)\n# define lh_CONF_VALUE_free(lh) LHM_lh_free(CONF_VALUE,lh)\n# define lh_ENGINE_PILE_new() LHM_lh_new(ENGINE_PILE,engine_pile)\n# define lh_ENGINE_PILE_insert(lh,inst) LHM_lh_insert(ENGINE_PILE,lh,inst)\n# define lh_ENGINE_PILE_retrieve(lh,inst) LHM_lh_retrieve(ENGINE_PILE,lh,inst)\n# define lh_ENGINE_PILE_delete(lh,inst) LHM_lh_delete(ENGINE_PILE,lh,inst)\n# define lh_ENGINE_PILE_doall(lh,fn) LHM_lh_doall(ENGINE_PILE,lh,fn)\n# define lh_ENGINE_PILE_doall_arg(lh,fn,arg_type,arg) \\\n  LHM_lh_doall_arg(ENGINE_PILE,lh,fn,arg_type,arg)\n# define lh_ENGINE_PILE_error(lh) LHM_lh_error(ENGINE_PILE,lh)\n# define lh_ENGINE_PILE_num_items(lh) LHM_lh_num_items(ENGINE_PILE,lh)\n# define lh_ENGINE_PILE_down_load(lh) LHM_lh_down_load(ENGINE_PILE,lh)\n# define lh_ENGINE_PILE_node_stats_bio(lh,out) \\\n  LHM_lh_node_stats_bio(ENGINE_PILE,lh,out)\n# define lh_ENGINE_PILE_node_usage_stats_bio(lh,out) \\\n  LHM_lh_node_usage_stats_bio(ENGINE_PILE,lh,out)\n# define lh_ENGINE_PILE_stats_bio(lh,out) \\\n  LHM_lh_stats_bio(ENGINE_PILE,lh,out)\n# define lh_ENGINE_PILE_free(lh) LHM_lh_free(ENGINE_PILE,lh)\n# define lh_ERR_STATE_new() LHM_lh_new(ERR_STATE,err_state)\n# define lh_ERR_STATE_insert(lh,inst) LHM_lh_insert(ERR_STATE,lh,inst)\n# define lh_ERR_STATE_retrieve(lh,inst) LHM_lh_retrieve(ERR_STATE,lh,inst)\n# define lh_ERR_STATE_delete(lh,inst) LHM_lh_delete(ERR_STATE,lh,inst)\n# define lh_ERR_STATE_doall(lh,fn) LHM_lh_doall(ERR_STATE,lh,fn)\n# define lh_ERR_STATE_doall_arg(lh,fn,arg_type,arg) \\\n  LHM_lh_doall_arg(ERR_STATE,lh,fn,arg_type,arg)\n# define lh_ERR_STATE_error(lh) LHM_lh_error(ERR_STATE,lh)\n# define lh_ERR_STATE_num_items(lh) LHM_lh_num_items(ERR_STATE,lh)\n# define lh_ERR_STATE_down_load(lh) LHM_lh_down_load(ERR_STATE,lh)\n# define lh_ERR_STATE_node_stats_bio(lh,out) \\\n  LHM_lh_node_stats_bio(ERR_STATE,lh,out)\n# define lh_ERR_STATE_node_usage_stats_bio(lh,out) \\\n  LHM_lh_node_usage_stats_bio(ERR_STATE,lh,out)\n# define lh_ERR_STATE_stats_bio(lh,out) \\\n  LHM_lh_stats_bio(ERR_STATE,lh,out)\n# define lh_ERR_STATE_free(lh) LHM_lh_free(ERR_STATE,lh)\n# define lh_ERR_STRING_DATA_new() LHM_lh_new(ERR_STRING_DATA,err_string_data)\n# define lh_ERR_STRING_DATA_insert(lh,inst) LHM_lh_insert(ERR_STRING_DATA,lh,inst)\n# define lh_ERR_STRING_DATA_retrieve(lh,inst) LHM_lh_retrieve(ERR_STRING_DATA,lh,inst)\n# define lh_ERR_STRING_DATA_delete(lh,inst) LHM_lh_delete(ERR_STRING_DATA,lh,inst)\n# define lh_ERR_STRING_DATA_doall(lh,fn) LHM_lh_doall(ERR_STRING_DATA,lh,fn)\n# define lh_ERR_STRING_DATA_doall_arg(lh,fn,arg_type,arg) \\\n  LHM_lh_doall_arg(ERR_STRING_DATA,lh,fn,arg_type,arg)\n# define lh_ERR_STRING_DATA_error(lh) LHM_lh_error(ERR_STRING_DATA,lh)\n# define lh_ERR_STRING_DATA_num_items(lh) LHM_lh_num_items(ERR_STRING_DATA,lh)\n# define lh_ERR_STRING_DATA_down_load(lh) LHM_lh_down_load(ERR_STRING_DATA,lh)\n# define lh_ERR_STRING_DATA_node_stats_bio(lh,out) \\\n  LHM_lh_node_stats_bio(ERR_STRING_DATA,lh,out)\n# define lh_ERR_STRING_DATA_node_usage_stats_bio(lh,out) \\\n  LHM_lh_node_usage_stats_bio(ERR_STRING_DATA,lh,out)\n# define lh_ERR_STRING_DATA_stats_bio(lh,out) \\\n  LHM_lh_stats_bio(ERR_STRING_DATA,lh,out)\n# define lh_ERR_STRING_DATA_free(lh) LHM_lh_free(ERR_STRING_DATA,lh)\n# define lh_EX_CLASS_ITEM_new() LHM_lh_new(EX_CLASS_ITEM,ex_class_item)\n# define lh_EX_CLASS_ITEM_insert(lh,inst) LHM_lh_insert(EX_CLASS_ITEM,lh,inst)\n# define lh_EX_CLASS_ITEM_retrieve(lh,inst) LHM_lh_retrieve(EX_CLASS_ITEM,lh,inst)\n# define lh_EX_CLASS_ITEM_delete(lh,inst) LHM_lh_delete(EX_CLASS_ITEM,lh,inst)\n# define lh_EX_CLASS_ITEM_doall(lh,fn) LHM_lh_doall(EX_CLASS_ITEM,lh,fn)\n# define lh_EX_CLASS_ITEM_doall_arg(lh,fn,arg_type,arg) \\\n  LHM_lh_doall_arg(EX_CLASS_ITEM,lh,fn,arg_type,arg)\n# define lh_EX_CLASS_ITEM_error(lh) LHM_lh_error(EX_CLASS_ITEM,lh)\n# define lh_EX_CLASS_ITEM_num_items(lh) LHM_lh_num_items(EX_CLASS_ITEM,lh)\n# define lh_EX_CLASS_ITEM_down_load(lh) LHM_lh_down_load(EX_CLASS_ITEM,lh)\n# define lh_EX_CLASS_ITEM_node_stats_bio(lh,out) \\\n  LHM_lh_node_stats_bio(EX_CLASS_ITEM,lh,out)\n# define lh_EX_CLASS_ITEM_node_usage_stats_bio(lh,out) \\\n  LHM_lh_node_usage_stats_bio(EX_CLASS_ITEM,lh,out)\n# define lh_EX_CLASS_ITEM_stats_bio(lh,out) \\\n  LHM_lh_stats_bio(EX_CLASS_ITEM,lh,out)\n# define lh_EX_CLASS_ITEM_free(lh) LHM_lh_free(EX_CLASS_ITEM,lh)\n# define lh_FUNCTION_new() LHM_lh_new(FUNCTION,function)\n# define lh_FUNCTION_insert(lh,inst) LHM_lh_insert(FUNCTION,lh,inst)\n# define lh_FUNCTION_retrieve(lh,inst) LHM_lh_retrieve(FUNCTION,lh,inst)\n# define lh_FUNCTION_delete(lh,inst) LHM_lh_delete(FUNCTION,lh,inst)\n# define lh_FUNCTION_doall(lh,fn) LHM_lh_doall(FUNCTION,lh,fn)\n# define lh_FUNCTION_doall_arg(lh,fn,arg_type,arg) \\\n  LHM_lh_doall_arg(FUNCTION,lh,fn,arg_type,arg)\n# define lh_FUNCTION_error(lh) LHM_lh_error(FUNCTION,lh)\n# define lh_FUNCTION_num_items(lh) LHM_lh_num_items(FUNCTION,lh)\n# define lh_FUNCTION_down_load(lh) LHM_lh_down_load(FUNCTION,lh)\n# define lh_FUNCTION_node_stats_bio(lh,out) \\\n  LHM_lh_node_stats_bio(FUNCTION,lh,out)\n# define lh_FUNCTION_node_usage_stats_bio(lh,out) \\\n  LHM_lh_node_usage_stats_bio(FUNCTION,lh,out)\n# define lh_FUNCTION_stats_bio(lh,out) \\\n  LHM_lh_stats_bio(FUNCTION,lh,out)\n# define lh_FUNCTION_free(lh) LHM_lh_free(FUNCTION,lh)\n# define lh_MEM_new() LHM_lh_new(MEM,mem)\n# define lh_MEM_insert(lh,inst) LHM_lh_insert(MEM,lh,inst)\n# define lh_MEM_retrieve(lh,inst) LHM_lh_retrieve(MEM,lh,inst)\n# define lh_MEM_delete(lh,inst) LHM_lh_delete(MEM,lh,inst)\n# define lh_MEM_doall(lh,fn) LHM_lh_doall(MEM,lh,fn)\n# define lh_MEM_doall_arg(lh,fn,arg_type,arg) \\\n  LHM_lh_doall_arg(MEM,lh,fn,arg_type,arg)\n# define lh_MEM_error(lh) LHM_lh_error(MEM,lh)\n# define lh_MEM_num_items(lh) LHM_lh_num_items(MEM,lh)\n# define lh_MEM_down_load(lh) LHM_lh_down_load(MEM,lh)\n# define lh_MEM_node_stats_bio(lh,out) \\\n  LHM_lh_node_stats_bio(MEM,lh,out)\n# define lh_MEM_node_usage_stats_bio(lh,out) \\\n  LHM_lh_node_usage_stats_bio(MEM,lh,out)\n# define lh_MEM_stats_bio(lh,out) \\\n  LHM_lh_stats_bio(MEM,lh,out)\n# define lh_MEM_free(lh) LHM_lh_free(MEM,lh)\n# define lh_OBJ_NAME_new() LHM_lh_new(OBJ_NAME,obj_name)\n# define lh_OBJ_NAME_insert(lh,inst) LHM_lh_insert(OBJ_NAME,lh,inst)\n# define lh_OBJ_NAME_retrieve(lh,inst) LHM_lh_retrieve(OBJ_NAME,lh,inst)\n# define lh_OBJ_NAME_delete(lh,inst) LHM_lh_delete(OBJ_NAME,lh,inst)\n# define lh_OBJ_NAME_doall(lh,fn) LHM_lh_doall(OBJ_NAME,lh,fn)\n# define lh_OBJ_NAME_doall_arg(lh,fn,arg_type,arg) \\\n  LHM_lh_doall_arg(OBJ_NAME,lh,fn,arg_type,arg)\n# define lh_OBJ_NAME_error(lh) LHM_lh_error(OBJ_NAME,lh)\n# define lh_OBJ_NAME_num_items(lh) LHM_lh_num_items(OBJ_NAME,lh)\n# define lh_OBJ_NAME_down_load(lh) LHM_lh_down_load(OBJ_NAME,lh)\n# define lh_OBJ_NAME_node_stats_bio(lh,out) \\\n  LHM_lh_node_stats_bio(OBJ_NAME,lh,out)\n# define lh_OBJ_NAME_node_usage_stats_bio(lh,out) \\\n  LHM_lh_node_usage_stats_bio(OBJ_NAME,lh,out)\n# define lh_OBJ_NAME_stats_bio(lh,out) \\\n  LHM_lh_stats_bio(OBJ_NAME,lh,out)\n# define lh_OBJ_NAME_free(lh) LHM_lh_free(OBJ_NAME,lh)\n# define lh_OPENSSL_CSTRING_new() LHM_lh_new(OPENSSL_CSTRING,openssl_cstring)\n# define lh_OPENSSL_CSTRING_insert(lh,inst) LHM_lh_insert(OPENSSL_CSTRING,lh,inst)\n# define lh_OPENSSL_CSTRING_retrieve(lh,inst) LHM_lh_retrieve(OPENSSL_CSTRING,lh,inst)\n# define lh_OPENSSL_CSTRING_delete(lh,inst) LHM_lh_delete(OPENSSL_CSTRING,lh,inst)\n# define lh_OPENSSL_CSTRING_doall(lh,fn) LHM_lh_doall(OPENSSL_CSTRING,lh,fn)\n# define lh_OPENSSL_CSTRING_doall_arg(lh,fn,arg_type,arg) \\\n  LHM_lh_doall_arg(OPENSSL_CSTRING,lh,fn,arg_type,arg)\n# define lh_OPENSSL_CSTRING_error(lh) LHM_lh_error(OPENSSL_CSTRING,lh)\n# define lh_OPENSSL_CSTRING_num_items(lh) LHM_lh_num_items(OPENSSL_CSTRING,lh)\n# define lh_OPENSSL_CSTRING_down_load(lh) LHM_lh_down_load(OPENSSL_CSTRING,lh)\n# define lh_OPENSSL_CSTRING_node_stats_bio(lh,out) \\\n  LHM_lh_node_stats_bio(OPENSSL_CSTRING,lh,out)\n# define lh_OPENSSL_CSTRING_node_usage_stats_bio(lh,out) \\\n  LHM_lh_node_usage_stats_bio(OPENSSL_CSTRING,lh,out)\n# define lh_OPENSSL_CSTRING_stats_bio(lh,out) \\\n  LHM_lh_stats_bio(OPENSSL_CSTRING,lh,out)\n# define lh_OPENSSL_CSTRING_free(lh) LHM_lh_free(OPENSSL_CSTRING,lh)\n# define lh_OPENSSL_STRING_new() LHM_lh_new(OPENSSL_STRING,openssl_string)\n# define lh_OPENSSL_STRING_insert(lh,inst) LHM_lh_insert(OPENSSL_STRING,lh,inst)\n# define lh_OPENSSL_STRING_retrieve(lh,inst) LHM_lh_retrieve(OPENSSL_STRING,lh,inst)\n# define lh_OPENSSL_STRING_delete(lh,inst) LHM_lh_delete(OPENSSL_STRING,lh,inst)\n# define lh_OPENSSL_STRING_doall(lh,fn) LHM_lh_doall(OPENSSL_STRING,lh,fn)\n# define lh_OPENSSL_STRING_doall_arg(lh,fn,arg_type,arg) \\\n  LHM_lh_doall_arg(OPENSSL_STRING,lh,fn,arg_type,arg)\n# define lh_OPENSSL_STRING_error(lh) LHM_lh_error(OPENSSL_STRING,lh)\n# define lh_OPENSSL_STRING_num_items(lh) LHM_lh_num_items(OPENSSL_STRING,lh)\n# define lh_OPENSSL_STRING_down_load(lh) LHM_lh_down_load(OPENSSL_STRING,lh)\n# define lh_OPENSSL_STRING_node_stats_bio(lh,out) \\\n  LHM_lh_node_stats_bio(OPENSSL_STRING,lh,out)\n# define lh_OPENSSL_STRING_node_usage_stats_bio(lh,out) \\\n  LHM_lh_node_usage_stats_bio(OPENSSL_STRING,lh,out)\n# define lh_OPENSSL_STRING_stats_bio(lh,out) \\\n  LHM_lh_stats_bio(OPENSSL_STRING,lh,out)\n# define lh_OPENSSL_STRING_free(lh) LHM_lh_free(OPENSSL_STRING,lh)\n# define lh_SSL_SESSION_new() LHM_lh_new(SSL_SESSION,ssl_session)\n# define lh_SSL_SESSION_insert(lh,inst) LHM_lh_insert(SSL_SESSION,lh,inst)\n# define lh_SSL_SESSION_retrieve(lh,inst) LHM_lh_retrieve(SSL_SESSION,lh,inst)\n# define lh_SSL_SESSION_delete(lh,inst) LHM_lh_delete(SSL_SESSION,lh,inst)\n# define lh_SSL_SESSION_doall(lh,fn) LHM_lh_doall(SSL_SESSION,lh,fn)\n# define lh_SSL_SESSION_doall_arg(lh,fn,arg_type,arg) \\\n  LHM_lh_doall_arg(SSL_SESSION,lh,fn,arg_type,arg)\n# define lh_SSL_SESSION_error(lh) LHM_lh_error(SSL_SESSION,lh)\n# define lh_SSL_SESSION_num_items(lh) LHM_lh_num_items(SSL_SESSION,lh)\n# define lh_SSL_SESSION_down_load(lh) LHM_lh_down_load(SSL_SESSION,lh)\n# define lh_SSL_SESSION_node_stats_bio(lh,out) \\\n  LHM_lh_node_stats_bio(SSL_SESSION,lh,out)\n# define lh_SSL_SESSION_node_usage_stats_bio(lh,out) \\\n  LHM_lh_node_usage_stats_bio(SSL_SESSION,lh,out)\n# define lh_SSL_SESSION_stats_bio(lh,out) \\\n  LHM_lh_stats_bio(SSL_SESSION,lh,out)\n# define lh_SSL_SESSION_free(lh) LHM_lh_free(SSL_SESSION,lh)\n#ifdef  __cplusplus\n}\n#endif\n#endif                          /* !defined HEADER_SAFESTACK_H */\n"
  },
  {
    "path": "Pods/OpenSSL-Universal/include-ios/openssl/seed.h",
    "content": "/*\n * Copyright (c) 2007 KISA(Korea Information Security Agency). All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n * 1. Redistributions of source code must retain the above copyright\n *    notice, this list of conditions and the following disclaimer.\n * 2. Neither the name of author nor the names of its contributors may\n *    be used to endorse or promote products derived from this software\n *    without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND\n * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n * ARE DISCLAIMED.  IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE\n * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n * SUCH DAMAGE.\n *\n */\n/* ====================================================================\n * Copyright (c) 1998-2007 The OpenSSL Project.  All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n *\n * 1. Redistributions of source code must retain the above copyright\n *    notice, this list of conditions and the following disclaimer.\n *\n * 2. Redistributions in binary form must reproduce the above copyright\n *    notice, this list of conditions and the following disclaimer in\n *    the documentation and/or other materials provided with the\n *    distribution.\n *\n * 3. All advertising materials mentioning features or use of this\n *    software must display the following acknowledgment:\n *    \"This product includes software developed by the OpenSSL Project\n *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)\"\n *\n * 4. The names \"OpenSSL Toolkit\" and \"OpenSSL Project\" must not be used to\n *    endorse or promote products derived from this software without\n *    prior written permission. For written permission, please contact\n *    openssl-core@openssl.org.\n *\n * 5. Products derived from this software may not be called \"OpenSSL\"\n *    nor may \"OpenSSL\" appear in their names without prior written\n *    permission of the OpenSSL Project.\n *\n * 6. Redistributions of any form whatsoever must retain the following\n *    acknowledgment:\n *    \"This product includes software developed by the OpenSSL Project\n *    for use in the OpenSSL Toolkit (http://www.openssl.org/)\"\n *\n * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY\n * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\n * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR\n * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,\n * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED\n * OF THE POSSIBILITY OF SUCH DAMAGE.\n * ====================================================================\n *\n * This product includes cryptographic software written by Eric Young\n * (eay@cryptsoft.com).  This product includes software written by Tim\n * Hudson (tjh@cryptsoft.com).\n *\n */\n\n#ifndef HEADER_SEED_H\n# define HEADER_SEED_H\n\n# include <openssl/opensslconf.h>\n# include <openssl/e_os2.h>\n# include <openssl/crypto.h>\n\n# ifdef OPENSSL_NO_SEED\n#  error SEED is disabled.\n# endif\n\n/* look whether we need 'long' to get 32 bits */\n# ifdef AES_LONG\n#  ifndef SEED_LONG\n#   define SEED_LONG 1\n#  endif\n# endif\n\n# if !defined(NO_SYS_TYPES_H)\n#  include <sys/types.h>\n# endif\n\n# define SEED_BLOCK_SIZE 16\n# define SEED_KEY_LENGTH 16\n\n\n#ifdef  __cplusplus\nextern \"C\" {\n#endif\n\ntypedef struct seed_key_st {\n# ifdef SEED_LONG\n    unsigned long data[32];\n# else\n    unsigned int data[32];\n# endif\n} SEED_KEY_SCHEDULE;\n\n# ifdef OPENSSL_FIPS\nvoid private_SEED_set_key(const unsigned char rawkey[SEED_KEY_LENGTH],\n                          SEED_KEY_SCHEDULE *ks);\n# endif\nvoid SEED_set_key(const unsigned char rawkey[SEED_KEY_LENGTH],\n                  SEED_KEY_SCHEDULE *ks);\n\nvoid SEED_encrypt(const unsigned char s[SEED_BLOCK_SIZE],\n                  unsigned char d[SEED_BLOCK_SIZE],\n                  const SEED_KEY_SCHEDULE *ks);\nvoid SEED_decrypt(const unsigned char s[SEED_BLOCK_SIZE],\n                  unsigned char d[SEED_BLOCK_SIZE],\n                  const SEED_KEY_SCHEDULE *ks);\n\nvoid SEED_ecb_encrypt(const unsigned char *in, unsigned char *out,\n                      const SEED_KEY_SCHEDULE *ks, int enc);\nvoid SEED_cbc_encrypt(const unsigned char *in, unsigned char *out, size_t len,\n                      const SEED_KEY_SCHEDULE *ks,\n                      unsigned char ivec[SEED_BLOCK_SIZE], int enc);\nvoid SEED_cfb128_encrypt(const unsigned char *in, unsigned char *out,\n                         size_t len, const SEED_KEY_SCHEDULE *ks,\n                         unsigned char ivec[SEED_BLOCK_SIZE], int *num,\n                         int enc);\nvoid SEED_ofb128_encrypt(const unsigned char *in, unsigned char *out,\n                         size_t len, const SEED_KEY_SCHEDULE *ks,\n                         unsigned char ivec[SEED_BLOCK_SIZE], int *num);\n\n#ifdef  __cplusplus\n}\n#endif\n\n#endif                          /* HEADER_SEED_H */\n"
  },
  {
    "path": "Pods/OpenSSL-Universal/include-ios/openssl/sha.h",
    "content": "/* crypto/sha/sha.h */\n/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)\n * All rights reserved.\n *\n * This package is an SSL implementation written\n * by Eric Young (eay@cryptsoft.com).\n * The implementation was written so as to conform with Netscapes SSL.\n *\n * This library is free for commercial and non-commercial use as long as\n * the following conditions are aheared to.  The following conditions\n * apply to all code found in this distribution, be it the RC4, RSA,\n * lhash, DES, etc., code; not just the SSL code.  The SSL documentation\n * included with this distribution is covered by the same copyright terms\n * except that the holder is Tim Hudson (tjh@cryptsoft.com).\n *\n * Copyright remains Eric Young's, and as such any Copyright notices in\n * the code are not to be removed.\n * If this package is used in a product, Eric Young should be given attribution\n * as the author of the parts of the library used.\n * This can be in the form of a textual message at program startup or\n * in documentation (online or textual) provided with the package.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n * 1. Redistributions of source code must retain the copyright\n *    notice, this list of conditions and the following disclaimer.\n * 2. Redistributions in binary form must reproduce the above copyright\n *    notice, this list of conditions and the following disclaimer in the\n *    documentation and/or other materials provided with the distribution.\n * 3. All advertising materials mentioning features or use of this software\n *    must display the following acknowledgement:\n *    \"This product includes cryptographic software written by\n *     Eric Young (eay@cryptsoft.com)\"\n *    The word 'cryptographic' can be left out if the rouines from the library\n *    being used are not cryptographic related :-).\n * 4. If you include any Windows specific code (or a derivative thereof) from\n *    the apps directory (application code) you must include an acknowledgement:\n *    \"This product includes software written by Tim Hudson (tjh@cryptsoft.com)\"\n *\n * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND\n * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE\n * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n * SUCH DAMAGE.\n *\n * The licence and distribution terms for any publically available version or\n * derivative of this code cannot be changed.  i.e. this code cannot simply be\n * copied and put under another distribution licence\n * [including the GNU Public Licence.]\n */\n\n#ifndef HEADER_SHA_H\n# define HEADER_SHA_H\n\n# include <openssl/e_os2.h>\n# include <stddef.h>\n\n#ifdef  __cplusplus\nextern \"C\" {\n#endif\n\n# if defined(OPENSSL_NO_SHA) || (defined(OPENSSL_NO_SHA0) && defined(OPENSSL_NO_SHA1))\n#  error SHA is disabled.\n# endif\n\n# if defined(OPENSSL_FIPS)\n#  define FIPS_SHA_SIZE_T size_t\n# endif\n\n/*-\n * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n * ! SHA_LONG has to be at least 32 bits wide. If it's wider, then !\n * ! SHA_LONG_LOG2 has to be defined along.                        !\n * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n */\n\n# if defined(__LP32__)\n#  define SHA_LONG unsigned long\n# elif defined(OPENSSL_SYS_CRAY) || defined(__ILP64__)\n#  define SHA_LONG unsigned long\n#  define SHA_LONG_LOG2 3\n# else\n#  define SHA_LONG unsigned int\n# endif\n\n# define SHA_LBLOCK      16\n# define SHA_CBLOCK      (SHA_LBLOCK*4)/* SHA treats input data as a\n                                        * contiguous array of 32 bit wide\n                                        * big-endian values. */\n# define SHA_LAST_BLOCK  (SHA_CBLOCK-8)\n# define SHA_DIGEST_LENGTH 20\n\ntypedef struct SHAstate_st {\n    SHA_LONG h0, h1, h2, h3, h4;\n    SHA_LONG Nl, Nh;\n    SHA_LONG data[SHA_LBLOCK];\n    unsigned int num;\n} SHA_CTX;\n\n# ifndef OPENSSL_NO_SHA0\n#  ifdef OPENSSL_FIPS\nint private_SHA_Init(SHA_CTX *c);\n#  endif\nint SHA_Init(SHA_CTX *c);\nint SHA_Update(SHA_CTX *c, const void *data, size_t len);\nint SHA_Final(unsigned char *md, SHA_CTX *c);\nunsigned char *SHA(const unsigned char *d, size_t n, unsigned char *md);\nvoid SHA_Transform(SHA_CTX *c, const unsigned char *data);\n# endif\n# ifndef OPENSSL_NO_SHA1\n#  ifdef OPENSSL_FIPS\nint private_SHA1_Init(SHA_CTX *c);\n#  endif\nint SHA1_Init(SHA_CTX *c);\nint SHA1_Update(SHA_CTX *c, const void *data, size_t len);\nint SHA1_Final(unsigned char *md, SHA_CTX *c);\nunsigned char *SHA1(const unsigned char *d, size_t n, unsigned char *md);\nvoid SHA1_Transform(SHA_CTX *c, const unsigned char *data);\n# endif\n\n# define SHA256_CBLOCK   (SHA_LBLOCK*4)/* SHA-256 treats input data as a\n                                        * contiguous array of 32 bit wide\n                                        * big-endian values. */\n# define SHA224_DIGEST_LENGTH    28\n# define SHA256_DIGEST_LENGTH    32\n\ntypedef struct SHA256state_st {\n    SHA_LONG h[8];\n    SHA_LONG Nl, Nh;\n    SHA_LONG data[SHA_LBLOCK];\n    unsigned int num, md_len;\n} SHA256_CTX;\n\n# ifndef OPENSSL_NO_SHA256\n#  ifdef OPENSSL_FIPS\nint private_SHA224_Init(SHA256_CTX *c);\nint private_SHA256_Init(SHA256_CTX *c);\n#  endif\nint SHA224_Init(SHA256_CTX *c);\nint SHA224_Update(SHA256_CTX *c, const void *data, size_t len);\nint SHA224_Final(unsigned char *md, SHA256_CTX *c);\nunsigned char *SHA224(const unsigned char *d, size_t n, unsigned char *md);\nint SHA256_Init(SHA256_CTX *c);\nint SHA256_Update(SHA256_CTX *c, const void *data, size_t len);\nint SHA256_Final(unsigned char *md, SHA256_CTX *c);\nunsigned char *SHA256(const unsigned char *d, size_t n, unsigned char *md);\nvoid SHA256_Transform(SHA256_CTX *c, const unsigned char *data);\n# endif\n\n# define SHA384_DIGEST_LENGTH    48\n# define SHA512_DIGEST_LENGTH    64\n\n# ifndef OPENSSL_NO_SHA512\n/*\n * Unlike 32-bit digest algorithms, SHA-512 *relies* on SHA_LONG64\n * being exactly 64-bit wide. See Implementation Notes in sha512.c\n * for further details.\n */\n/*\n * SHA-512 treats input data as a\n * contiguous array of 64 bit\n * wide big-endian values.\n */\n#  define SHA512_CBLOCK   (SHA_LBLOCK*8)\n#  if (defined(_WIN32) || defined(_WIN64)) && !defined(__MINGW32__)\n#   define SHA_LONG64 unsigned __int64\n#   define U64(C)     C##UI64\n#  elif defined(__arch64__)\n#   define SHA_LONG64 unsigned long\n#   define U64(C)     C##UL\n#  else\n#   define SHA_LONG64 unsigned long long\n#   define U64(C)     C##ULL\n#  endif\n\ntypedef struct SHA512state_st {\n    SHA_LONG64 h[8];\n    SHA_LONG64 Nl, Nh;\n    union {\n        SHA_LONG64 d[SHA_LBLOCK];\n        unsigned char p[SHA512_CBLOCK];\n    } u;\n    unsigned int num, md_len;\n} SHA512_CTX;\n# endif\n\n# ifndef OPENSSL_NO_SHA512\n#  ifdef OPENSSL_FIPS\nint private_SHA384_Init(SHA512_CTX *c);\nint private_SHA512_Init(SHA512_CTX *c);\n#  endif\nint SHA384_Init(SHA512_CTX *c);\nint SHA384_Update(SHA512_CTX *c, const void *data, size_t len);\nint SHA384_Final(unsigned char *md, SHA512_CTX *c);\nunsigned char *SHA384(const unsigned char *d, size_t n, unsigned char *md);\nint SHA512_Init(SHA512_CTX *c);\nint SHA512_Update(SHA512_CTX *c, const void *data, size_t len);\nint SHA512_Final(unsigned char *md, SHA512_CTX *c);\nunsigned char *SHA512(const unsigned char *d, size_t n, unsigned char *md);\nvoid SHA512_Transform(SHA512_CTX *c, const unsigned char *data);\n# endif\n\n#ifdef  __cplusplus\n}\n#endif\n\n#endif\n"
  },
  {
    "path": "Pods/OpenSSL-Universal/include-ios/openssl/srp.h",
    "content": "/* crypto/srp/srp.h */\n/*\n * Written by Christophe Renou (christophe.renou@edelweb.fr) with the\n * precious help of Peter Sylvester (peter.sylvester@edelweb.fr) for the\n * EdelKey project and contributed to the OpenSSL project 2004.\n */\n/* ====================================================================\n * Copyright (c) 2004 The OpenSSL Project.  All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n *\n * 1. Redistributions of source code must retain the above copyright\n *    notice, this list of conditions and the following disclaimer.\n *\n * 2. Redistributions in binary form must reproduce the above copyright\n *    notice, this list of conditions and the following disclaimer in\n *    the documentation and/or other materials provided with the\n *    distribution.\n *\n * 3. All advertising materials mentioning features or use of this\n *    software must display the following acknowledgment:\n *    \"This product includes software developed by the OpenSSL Project\n *    for use in the OpenSSL Toolkit. (http://www.OpenSSL.org/)\"\n *\n * 4. The names \"OpenSSL Toolkit\" and \"OpenSSL Project\" must not be used to\n *    endorse or promote products derived from this software without\n *    prior written permission. For written permission, please contact\n *    licensing@OpenSSL.org.\n *\n * 5. Products derived from this software may not be called \"OpenSSL\"\n *    nor may \"OpenSSL\" appear in their names without prior written\n *    permission of the OpenSSL Project.\n *\n * 6. Redistributions of any form whatsoever must retain the following\n *    acknowledgment:\n *    \"This product includes software developed by the OpenSSL Project\n *    for use in the OpenSSL Toolkit (http://www.OpenSSL.org/)\"\n *\n * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY\n * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\n * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR\n * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,\n * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED\n * OF THE POSSIBILITY OF SUCH DAMAGE.\n * ====================================================================\n *\n * This product includes cryptographic software written by Eric Young\n * (eay@cryptsoft.com).  This product includes software written by Tim\n * Hudson (tjh@cryptsoft.com).\n *\n */\n#ifndef __SRP_H__\n# define __SRP_H__\n\n# ifndef OPENSSL_NO_SRP\n\n#  include <stdio.h>\n#  include <string.h>\n\n#ifdef  __cplusplus\nextern \"C\" {\n#endif\n\n#  include <openssl/safestack.h>\n#  include <openssl/bn.h>\n#  include <openssl/crypto.h>\n\ntypedef struct SRP_gN_cache_st {\n    char *b64_bn;\n    BIGNUM *bn;\n} SRP_gN_cache;\n\n\nDECLARE_STACK_OF(SRP_gN_cache)\n\ntypedef struct SRP_user_pwd_st {\n    char *id;\n    BIGNUM *s;\n    BIGNUM *v;\n    const BIGNUM *g;\n    const BIGNUM *N;\n    char *info;\n} SRP_user_pwd;\n\nDECLARE_STACK_OF(SRP_user_pwd)\n\ntypedef struct SRP_VBASE_st {\n    STACK_OF(SRP_user_pwd) *users_pwd;\n    STACK_OF(SRP_gN_cache) *gN_cache;\n/* to simulate a user */\n    char *seed_key;\n    BIGNUM *default_g;\n    BIGNUM *default_N;\n} SRP_VBASE;\n\n/*\n * Structure interne pour retenir les couples N et g\n */\ntypedef struct SRP_gN_st {\n    char *id;\n    BIGNUM *g;\n    BIGNUM *N;\n} SRP_gN;\n\nDECLARE_STACK_OF(SRP_gN)\n\nSRP_VBASE *SRP_VBASE_new(char *seed_key);\nint SRP_VBASE_free(SRP_VBASE *vb);\nint SRP_VBASE_init(SRP_VBASE *vb, char *verifier_file);\nSRP_user_pwd *SRP_VBASE_get_by_user(SRP_VBASE *vb, char *username);\nchar *SRP_create_verifier(const char *user, const char *pass, char **salt,\n                          char **verifier, const char *N, const char *g);\nint SRP_create_verifier_BN(const char *user, const char *pass, BIGNUM **salt,\n                           BIGNUM **verifier, BIGNUM *N, BIGNUM *g);\n\n#  define SRP_NO_ERROR 0\n#  define SRP_ERR_VBASE_INCOMPLETE_FILE 1\n#  define SRP_ERR_VBASE_BN_LIB 2\n#  define SRP_ERR_OPEN_FILE 3\n#  define SRP_ERR_MEMORY 4\n\n#  define DB_srptype      0\n#  define DB_srpverifier  1\n#  define DB_srpsalt      2\n#  define DB_srpid        3\n#  define DB_srpgN        4\n#  define DB_srpinfo      5\n#  undef  DB_NUMBER\n#  define DB_NUMBER       6\n\n#  define DB_SRP_INDEX    'I'\n#  define DB_SRP_VALID    'V'\n#  define DB_SRP_REVOKED  'R'\n#  define DB_SRP_MODIF    'v'\n\n/* see srp.c */\nchar *SRP_check_known_gN_param(BIGNUM *g, BIGNUM *N);\nSRP_gN *SRP_get_default_gN(const char *id);\n\n/* server side .... */\nBIGNUM *SRP_Calc_server_key(BIGNUM *A, BIGNUM *v, BIGNUM *u, BIGNUM *b,\n                            BIGNUM *N);\nBIGNUM *SRP_Calc_B(BIGNUM *b, BIGNUM *N, BIGNUM *g, BIGNUM *v);\nint SRP_Verify_A_mod_N(BIGNUM *A, BIGNUM *N);\nBIGNUM *SRP_Calc_u(BIGNUM *A, BIGNUM *B, BIGNUM *N);\n\n/* client side .... */\nBIGNUM *SRP_Calc_x(BIGNUM *s, const char *user, const char *pass);\nBIGNUM *SRP_Calc_A(BIGNUM *a, BIGNUM *N, BIGNUM *g);\nBIGNUM *SRP_Calc_client_key(BIGNUM *N, BIGNUM *B, BIGNUM *g, BIGNUM *x,\n                            BIGNUM *a, BIGNUM *u);\nint SRP_Verify_B_mod_N(BIGNUM *B, BIGNUM *N);\n\n#  define SRP_MINIMAL_N 1024\n\n#ifdef  __cplusplus\n}\n#endif\n\n# endif\n#endif\n"
  },
  {
    "path": "Pods/OpenSSL-Universal/include-ios/openssl/srtp.h",
    "content": "/* ssl/srtp.h */\n/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)\n * All rights reserved.\n *\n * This package is an SSL implementation written\n * by Eric Young (eay@cryptsoft.com).\n * The implementation was written so as to conform with Netscapes SSL.\n *\n * This library is free for commercial and non-commercial use as long as\n * the following conditions are aheared to.  The following conditions\n * apply to all code found in this distribution, be it the RC4, RSA,\n * lhash, DES, etc., code; not just the SSL code.  The SSL documentation\n * included with this distribution is covered by the same copyright terms\n * except that the holder is Tim Hudson (tjh@cryptsoft.com).\n *\n * Copyright remains Eric Young's, and as such any Copyright notices in\n * the code are not to be removed.\n * If this package is used in a product, Eric Young should be given attribution\n * as the author of the parts of the library used.\n * This can be in the form of a textual message at program startup or\n * in documentation (online or textual) provided with the package.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n * 1. Redistributions of source code must retain the copyright\n *    notice, this list of conditions and the following disclaimer.\n * 2. Redistributions in binary form must reproduce the above copyright\n *    notice, this list of conditions and the following disclaimer in the\n *    documentation and/or other materials provided with the distribution.\n * 3. All advertising materials mentioning features or use of this software\n *    must display the following acknowledgement:\n *    \"This product includes cryptographic software written by\n *     Eric Young (eay@cryptsoft.com)\"\n *    The word 'cryptographic' can be left out if the rouines from the library\n *    being used are not cryptographic related :-).\n * 4. If you include any Windows specific code (or a derivative thereof) from\n *    the apps directory (application code) you must include an acknowledgement:\n *    \"This product includes software written by Tim Hudson (tjh@cryptsoft.com)\"\n *\n * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND\n * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE\n * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n * SUCH DAMAGE.\n *\n * The licence and distribution terms for any publically available version or\n * derivative of this code cannot be changed.  i.e. this code cannot simply be\n * copied and put under another distribution licence\n * [including the GNU Public Licence.]\n */\n/* ====================================================================\n * Copyright (c) 1998-2006 The OpenSSL Project.  All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n *\n * 1. Redistributions of source code must retain the above copyright\n *    notice, this list of conditions and the following disclaimer.\n *\n * 2. Redistributions in binary form must reproduce the above copyright\n *    notice, this list of conditions and the following disclaimer in\n *    the documentation and/or other materials provided with the\n *    distribution.\n *\n * 3. All advertising materials mentioning features or use of this\n *    software must display the following acknowledgment:\n *    \"This product includes software developed by the OpenSSL Project\n *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)\"\n *\n * 4. The names \"OpenSSL Toolkit\" and \"OpenSSL Project\" must not be used to\n *    endorse or promote products derived from this software without\n *    prior written permission. For written permission, please contact\n *    openssl-core@openssl.org.\n *\n * 5. Products derived from this software may not be called \"OpenSSL\"\n *    nor may \"OpenSSL\" appear in their names without prior written\n *    permission of the OpenSSL Project.\n *\n * 6. Redistributions of any form whatsoever must retain the following\n *    acknowledgment:\n *    \"This product includes software developed by the OpenSSL Project\n *    for use in the OpenSSL Toolkit (http://www.openssl.org/)\"\n *\n * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY\n * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\n * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR\n * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,\n * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED\n * OF THE POSSIBILITY OF SUCH DAMAGE.\n * ====================================================================\n *\n * This product includes cryptographic software written by Eric Young\n * (eay@cryptsoft.com).  This product includes software written by Tim\n * Hudson (tjh@cryptsoft.com).\n *\n */\n/*\n * DTLS code by Eric Rescorla <ekr@rtfm.com>\n *\n * Copyright (C) 2006, Network Resonance, Inc. Copyright (C) 2011, RTFM, Inc.\n */\n\n#ifndef HEADER_D1_SRTP_H\n# define HEADER_D1_SRTP_H\n\n# include <openssl/ssl.h>\n\n#ifdef  __cplusplus\nextern \"C\" {\n#endif\n\n# define SRTP_AES128_CM_SHA1_80 0x0001\n# define SRTP_AES128_CM_SHA1_32 0x0002\n# define SRTP_AES128_F8_SHA1_80 0x0003\n# define SRTP_AES128_F8_SHA1_32 0x0004\n# define SRTP_NULL_SHA1_80      0x0005\n# define SRTP_NULL_SHA1_32      0x0006\n\n# ifndef OPENSSL_NO_SRTP\n\nint SSL_CTX_set_tlsext_use_srtp(SSL_CTX *ctx, const char *profiles);\nint SSL_set_tlsext_use_srtp(SSL *ctx, const char *profiles);\nSRTP_PROTECTION_PROFILE *SSL_get_selected_srtp_profile(SSL *s);\n\nSTACK_OF(SRTP_PROTECTION_PROFILE) *SSL_get_srtp_profiles(SSL *ssl);\nSRTP_PROTECTION_PROFILE *SSL_get_selected_srtp_profile(SSL *s);\n\n# endif\n\n#ifdef  __cplusplus\n}\n#endif\n\n#endif\n"
  },
  {
    "path": "Pods/OpenSSL-Universal/include-ios/openssl/ssl.h",
    "content": "/* ssl/ssl.h */\n/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)\n * All rights reserved.\n *\n * This package is an SSL implementation written\n * by Eric Young (eay@cryptsoft.com).\n * The implementation was written so as to conform with Netscapes SSL.\n *\n * This library is free for commercial and non-commercial use as long as\n * the following conditions are aheared to.  The following conditions\n * apply to all code found in this distribution, be it the RC4, RSA,\n * lhash, DES, etc., code; not just the SSL code.  The SSL documentation\n * included with this distribution is covered by the same copyright terms\n * except that the holder is Tim Hudson (tjh@cryptsoft.com).\n *\n * Copyright remains Eric Young's, and as such any Copyright notices in\n * the code are not to be removed.\n * If this package is used in a product, Eric Young should be given attribution\n * as the author of the parts of the library used.\n * This can be in the form of a textual message at program startup or\n * in documentation (online or textual) provided with the package.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n * 1. Redistributions of source code must retain the copyright\n *    notice, this list of conditions and the following disclaimer.\n * 2. Redistributions in binary form must reproduce the above copyright\n *    notice, this list of conditions and the following disclaimer in the\n *    documentation and/or other materials provided with the distribution.\n * 3. All advertising materials mentioning features or use of this software\n *    must display the following acknowledgement:\n *    \"This product includes cryptographic software written by\n *     Eric Young (eay@cryptsoft.com)\"\n *    The word 'cryptographic' can be left out if the rouines from the library\n *    being used are not cryptographic related :-).\n * 4. If you include any Windows specific code (or a derivative thereof) from\n *    the apps directory (application code) you must include an acknowledgement:\n *    \"This product includes software written by Tim Hudson (tjh@cryptsoft.com)\"\n *\n * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND\n * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE\n * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n * SUCH DAMAGE.\n *\n * The licence and distribution terms for any publically available version or\n * derivative of this code cannot be changed.  i.e. this code cannot simply be\n * copied and put under another distribution licence\n * [including the GNU Public Licence.]\n */\n/* ====================================================================\n * Copyright (c) 1998-2007 The OpenSSL Project.  All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n *\n * 1. Redistributions of source code must retain the above copyright\n *    notice, this list of conditions and the following disclaimer.\n *\n * 2. Redistributions in binary form must reproduce the above copyright\n *    notice, this list of conditions and the following disclaimer in\n *    the documentation and/or other materials provided with the\n *    distribution.\n *\n * 3. All advertising materials mentioning features or use of this\n *    software must display the following acknowledgment:\n *    \"This product includes software developed by the OpenSSL Project\n *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)\"\n *\n * 4. The names \"OpenSSL Toolkit\" and \"OpenSSL Project\" must not be used to\n *    endorse or promote products derived from this software without\n *    prior written permission. For written permission, please contact\n *    openssl-core@openssl.org.\n *\n * 5. Products derived from this software may not be called \"OpenSSL\"\n *    nor may \"OpenSSL\" appear in their names without prior written\n *    permission of the OpenSSL Project.\n *\n * 6. Redistributions of any form whatsoever must retain the following\n *    acknowledgment:\n *    \"This product includes software developed by the OpenSSL Project\n *    for use in the OpenSSL Toolkit (http://www.openssl.org/)\"\n *\n * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY\n * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\n * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR\n * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,\n * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED\n * OF THE POSSIBILITY OF SUCH DAMAGE.\n * ====================================================================\n *\n * This product includes cryptographic software written by Eric Young\n * (eay@cryptsoft.com).  This product includes software written by Tim\n * Hudson (tjh@cryptsoft.com).\n *\n */\n/* ====================================================================\n * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED.\n * ECC cipher suite support in OpenSSL originally developed by\n * SUN MICROSYSTEMS, INC., and contributed to the OpenSSL project.\n */\n/* ====================================================================\n * Copyright 2005 Nokia. All rights reserved.\n *\n * The portions of the attached software (\"Contribution\") is developed by\n * Nokia Corporation and is licensed pursuant to the OpenSSL open source\n * license.\n *\n * The Contribution, originally written by Mika Kousa and Pasi Eronen of\n * Nokia Corporation, consists of the \"PSK\" (Pre-Shared Key) ciphersuites\n * support (see RFC 4279) to OpenSSL.\n *\n * No patent licenses or other rights except those expressly stated in\n * the OpenSSL open source license shall be deemed granted or received\n * expressly, by implication, estoppel, or otherwise.\n *\n * No assurances are provided by Nokia that the Contribution does not\n * infringe the patent or other intellectual property rights of any third\n * party or that the license provides you with all the necessary rights\n * to make use of the Contribution.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\" WITHOUT WARRANTY OF ANY KIND. IN\n * ADDITION TO THE DISCLAIMERS INCLUDED IN THE LICENSE, NOKIA\n * SPECIFICALLY DISCLAIMS ANY LIABILITY FOR CLAIMS BROUGHT BY YOU OR ANY\n * OTHER ENTITY BASED ON INFRINGEMENT OF INTELLECTUAL PROPERTY RIGHTS OR\n * OTHERWISE.\n */\n\n#ifndef HEADER_SSL_H\n# define HEADER_SSL_H\n\n# include <openssl/e_os2.h>\n\n# ifndef OPENSSL_NO_COMP\n#  include <openssl/comp.h>\n# endif\n# ifndef OPENSSL_NO_BIO\n#  include <openssl/bio.h>\n# endif\n# ifndef OPENSSL_NO_DEPRECATED\n#  ifndef OPENSSL_NO_X509\n#   include <openssl/x509.h>\n#  endif\n#  include <openssl/crypto.h>\n#  include <openssl/lhash.h>\n#  include <openssl/buffer.h>\n# endif\n# include <openssl/pem.h>\n# include <openssl/hmac.h>\n\n# include <openssl/kssl.h>\n# include <openssl/safestack.h>\n# include <openssl/symhacks.h>\n\n#ifdef  __cplusplus\nextern \"C\" {\n#endif\n\n/* SSLeay version number for ASN.1 encoding of the session information */\n/*-\n * Version 0 - initial version\n * Version 1 - added the optional peer certificate\n */\n# define SSL_SESSION_ASN1_VERSION 0x0001\n\n/* text strings for the ciphers */\n# define SSL_TXT_NULL_WITH_MD5           SSL2_TXT_NULL_WITH_MD5\n# define SSL_TXT_RC4_128_WITH_MD5        SSL2_TXT_RC4_128_WITH_MD5\n# define SSL_TXT_RC4_128_EXPORT40_WITH_MD5 SSL2_TXT_RC4_128_EXPORT40_WITH_MD5\n# define SSL_TXT_RC2_128_CBC_WITH_MD5    SSL2_TXT_RC2_128_CBC_WITH_MD5\n# define SSL_TXT_RC2_128_CBC_EXPORT40_WITH_MD5 SSL2_TXT_RC2_128_CBC_EXPORT40_WITH_MD5\n# define SSL_TXT_IDEA_128_CBC_WITH_MD5   SSL2_TXT_IDEA_128_CBC_WITH_MD5\n# define SSL_TXT_DES_64_CBC_WITH_MD5     SSL2_TXT_DES_64_CBC_WITH_MD5\n# define SSL_TXT_DES_64_CBC_WITH_SHA     SSL2_TXT_DES_64_CBC_WITH_SHA\n# define SSL_TXT_DES_192_EDE3_CBC_WITH_MD5 SSL2_TXT_DES_192_EDE3_CBC_WITH_MD5\n# define SSL_TXT_DES_192_EDE3_CBC_WITH_SHA SSL2_TXT_DES_192_EDE3_CBC_WITH_SHA\n\n/*\n * VRS Additional Kerberos5 entries\n */\n# define SSL_TXT_KRB5_DES_64_CBC_SHA   SSL3_TXT_KRB5_DES_64_CBC_SHA\n# define SSL_TXT_KRB5_DES_192_CBC3_SHA SSL3_TXT_KRB5_DES_192_CBC3_SHA\n# define SSL_TXT_KRB5_RC4_128_SHA      SSL3_TXT_KRB5_RC4_128_SHA\n# define SSL_TXT_KRB5_IDEA_128_CBC_SHA SSL3_TXT_KRB5_IDEA_128_CBC_SHA\n# define SSL_TXT_KRB5_DES_64_CBC_MD5   SSL3_TXT_KRB5_DES_64_CBC_MD5\n# define SSL_TXT_KRB5_DES_192_CBC3_MD5 SSL3_TXT_KRB5_DES_192_CBC3_MD5\n# define SSL_TXT_KRB5_RC4_128_MD5      SSL3_TXT_KRB5_RC4_128_MD5\n# define SSL_TXT_KRB5_IDEA_128_CBC_MD5 SSL3_TXT_KRB5_IDEA_128_CBC_MD5\n\n# define SSL_TXT_KRB5_DES_40_CBC_SHA   SSL3_TXT_KRB5_DES_40_CBC_SHA\n# define SSL_TXT_KRB5_RC2_40_CBC_SHA   SSL3_TXT_KRB5_RC2_40_CBC_SHA\n# define SSL_TXT_KRB5_RC4_40_SHA       SSL3_TXT_KRB5_RC4_40_SHA\n# define SSL_TXT_KRB5_DES_40_CBC_MD5   SSL3_TXT_KRB5_DES_40_CBC_MD5\n# define SSL_TXT_KRB5_RC2_40_CBC_MD5   SSL3_TXT_KRB5_RC2_40_CBC_MD5\n# define SSL_TXT_KRB5_RC4_40_MD5       SSL3_TXT_KRB5_RC4_40_MD5\n\n# define SSL_TXT_KRB5_DES_40_CBC_SHA   SSL3_TXT_KRB5_DES_40_CBC_SHA\n# define SSL_TXT_KRB5_DES_40_CBC_MD5   SSL3_TXT_KRB5_DES_40_CBC_MD5\n# define SSL_TXT_KRB5_DES_64_CBC_SHA   SSL3_TXT_KRB5_DES_64_CBC_SHA\n# define SSL_TXT_KRB5_DES_64_CBC_MD5   SSL3_TXT_KRB5_DES_64_CBC_MD5\n# define SSL_TXT_KRB5_DES_192_CBC3_SHA SSL3_TXT_KRB5_DES_192_CBC3_SHA\n# define SSL_TXT_KRB5_DES_192_CBC3_MD5 SSL3_TXT_KRB5_DES_192_CBC3_MD5\n# define SSL_MAX_KRB5_PRINCIPAL_LENGTH  256\n\n# define SSL_MAX_SSL_SESSION_ID_LENGTH           32\n# define SSL_MAX_SID_CTX_LENGTH                  32\n\n# define SSL_MIN_RSA_MODULUS_LENGTH_IN_BYTES     (512/8)\n# define SSL_MAX_KEY_ARG_LENGTH                  8\n# define SSL_MAX_MASTER_KEY_LENGTH               48\n\n/* These are used to specify which ciphers to use and not to use */\n\n# define SSL_TXT_EXP40           \"EXPORT40\"\n# define SSL_TXT_EXP56           \"EXPORT56\"\n# define SSL_TXT_LOW             \"LOW\"\n# define SSL_TXT_MEDIUM          \"MEDIUM\"\n# define SSL_TXT_HIGH            \"HIGH\"\n# define SSL_TXT_FIPS            \"FIPS\"\n\n# define SSL_TXT_kFZA            \"kFZA\"/* unused! */\n# define SSL_TXT_aFZA            \"aFZA\"/* unused! */\n# define SSL_TXT_eFZA            \"eFZA\"/* unused! */\n# define SSL_TXT_FZA             \"FZA\"/* unused! */\n\n# define SSL_TXT_aNULL           \"aNULL\"\n# define SSL_TXT_eNULL           \"eNULL\"\n# define SSL_TXT_NULL            \"NULL\"\n\n# define SSL_TXT_kRSA            \"kRSA\"\n# define SSL_TXT_kDHr            \"kDHr\"/* no such ciphersuites supported! */\n# define SSL_TXT_kDHd            \"kDHd\"/* no such ciphersuites supported! */\n# define SSL_TXT_kDH             \"kDH\"/* no such ciphersuites supported! */\n# define SSL_TXT_kEDH            \"kEDH\"\n# define SSL_TXT_kKRB5           \"kKRB5\"\n# define SSL_TXT_kECDHr          \"kECDHr\"\n# define SSL_TXT_kECDHe          \"kECDHe\"\n# define SSL_TXT_kECDH           \"kECDH\"\n# define SSL_TXT_kEECDH          \"kEECDH\"\n# define SSL_TXT_kPSK            \"kPSK\"\n# define SSL_TXT_kGOST           \"kGOST\"\n# define SSL_TXT_kSRP            \"kSRP\"\n\n# define SSL_TXT_aRSA            \"aRSA\"\n# define SSL_TXT_aDSS            \"aDSS\"\n# define SSL_TXT_aDH             \"aDH\"/* no such ciphersuites supported! */\n# define SSL_TXT_aECDH           \"aECDH\"\n# define SSL_TXT_aKRB5           \"aKRB5\"\n# define SSL_TXT_aECDSA          \"aECDSA\"\n# define SSL_TXT_aPSK            \"aPSK\"\n# define SSL_TXT_aGOST94 \"aGOST94\"\n# define SSL_TXT_aGOST01 \"aGOST01\"\n# define SSL_TXT_aGOST  \"aGOST\"\n# define SSL_TXT_aSRP            \"aSRP\"\n\n# define SSL_TXT_DSS             \"DSS\"\n# define SSL_TXT_DH              \"DH\"\n# define SSL_TXT_EDH             \"EDH\"/* same as \"kEDH:-ADH\" */\n# define SSL_TXT_ADH             \"ADH\"\n# define SSL_TXT_RSA             \"RSA\"\n# define SSL_TXT_ECDH            \"ECDH\"\n# define SSL_TXT_EECDH           \"EECDH\"/* same as \"kEECDH:-AECDH\" */\n# define SSL_TXT_AECDH           \"AECDH\"\n# define SSL_TXT_ECDSA           \"ECDSA\"\n# define SSL_TXT_KRB5            \"KRB5\"\n# define SSL_TXT_PSK             \"PSK\"\n# define SSL_TXT_SRP             \"SRP\"\n\n# define SSL_TXT_DES             \"DES\"\n# define SSL_TXT_3DES            \"3DES\"\n# define SSL_TXT_RC4             \"RC4\"\n# define SSL_TXT_RC2             \"RC2\"\n# define SSL_TXT_IDEA            \"IDEA\"\n# define SSL_TXT_SEED            \"SEED\"\n# define SSL_TXT_AES128          \"AES128\"\n# define SSL_TXT_AES256          \"AES256\"\n# define SSL_TXT_AES             \"AES\"\n# define SSL_TXT_AES_GCM         \"AESGCM\"\n# define SSL_TXT_CAMELLIA128     \"CAMELLIA128\"\n# define SSL_TXT_CAMELLIA256     \"CAMELLIA256\"\n# define SSL_TXT_CAMELLIA        \"CAMELLIA\"\n\n# define SSL_TXT_MD5             \"MD5\"\n# define SSL_TXT_SHA1            \"SHA1\"\n# define SSL_TXT_SHA             \"SHA\"/* same as \"SHA1\" */\n# define SSL_TXT_GOST94          \"GOST94\"\n# define SSL_TXT_GOST89MAC               \"GOST89MAC\"\n# define SSL_TXT_SHA256          \"SHA256\"\n# define SSL_TXT_SHA384          \"SHA384\"\n\n# define SSL_TXT_SSLV2           \"SSLv2\"\n# define SSL_TXT_SSLV3           \"SSLv3\"\n# define SSL_TXT_TLSV1           \"TLSv1\"\n# define SSL_TXT_TLSV1_1         \"TLSv1.1\"\n# define SSL_TXT_TLSV1_2         \"TLSv1.2\"\n\n# define SSL_TXT_EXP             \"EXP\"\n# define SSL_TXT_EXPORT          \"EXPORT\"\n\n# define SSL_TXT_ALL             \"ALL\"\n\n/*-\n * COMPLEMENTOF* definitions. These identifiers are used to (de-select)\n * ciphers normally not being used.\n * Example: \"RC4\" will activate all ciphers using RC4 including ciphers\n * without authentication, which would normally disabled by DEFAULT (due\n * the \"!ADH\" being part of default). Therefore \"RC4:!COMPLEMENTOFDEFAULT\"\n * will make sure that it is also disabled in the specific selection.\n * COMPLEMENTOF* identifiers are portable between version, as adjustments\n * to the default cipher setup will also be included here.\n *\n * COMPLEMENTOFDEFAULT does not experience the same special treatment that\n * DEFAULT gets, as only selection is being done and no sorting as needed\n * for DEFAULT.\n */\n# define SSL_TXT_CMPALL          \"COMPLEMENTOFALL\"\n# define SSL_TXT_CMPDEF          \"COMPLEMENTOFDEFAULT\"\n\n/*\n * The following cipher list is used by default. It also is substituted when\n * an application-defined cipher list string starts with 'DEFAULT'.\n */\n# define SSL_DEFAULT_CIPHER_LIST \"ALL:!EXPORT:!aNULL:!eNULL:!SSLv2\"\n/*\n * As of OpenSSL 1.0.0, ssl_create_cipher_list() in ssl/ssl_ciph.c always\n * starts with a reasonable order, and all we have to do for DEFAULT is\n * throwing out anonymous and unencrypted ciphersuites! (The latter are not\n * actually enabled by ALL, but \"ALL:RSA\" would enable some of them.)\n */\n\n/* Used in SSL_set_shutdown()/SSL_get_shutdown(); */\n# define SSL_SENT_SHUTDOWN       1\n# define SSL_RECEIVED_SHUTDOWN   2\n\n#ifdef __cplusplus\n}\n#endif\n\n#ifdef  __cplusplus\nextern \"C\" {\n#endif\n\n# if (defined(OPENSSL_NO_RSA) || defined(OPENSSL_NO_MD5)) && !defined(OPENSSL_NO_SSL2)\n#  define OPENSSL_NO_SSL2\n# endif\n\n# define SSL_FILETYPE_ASN1       X509_FILETYPE_ASN1\n# define SSL_FILETYPE_PEM        X509_FILETYPE_PEM\n\n/*\n * This is needed to stop compilers complaining about the 'struct ssl_st *'\n * function parameters used to prototype callbacks in SSL_CTX.\n */\ntypedef struct ssl_st *ssl_crock_st;\ntypedef struct tls_session_ticket_ext_st TLS_SESSION_TICKET_EXT;\ntypedef struct ssl_method_st SSL_METHOD;\ntypedef struct ssl_cipher_st SSL_CIPHER;\ntypedef struct ssl_session_st SSL_SESSION;\n\nDECLARE_STACK_OF(SSL_CIPHER)\n\n/* SRTP protection profiles for use with the use_srtp extension (RFC 5764)*/\ntypedef struct srtp_protection_profile_st {\n    const char *name;\n    unsigned long id;\n} SRTP_PROTECTION_PROFILE;\n\nDECLARE_STACK_OF(SRTP_PROTECTION_PROFILE)\n\ntypedef int (*tls_session_ticket_ext_cb_fn) (SSL *s,\n                                             const unsigned char *data,\n                                             int len, void *arg);\ntypedef int (*tls_session_secret_cb_fn) (SSL *s, void *secret,\n                                         int *secret_len,\n                                         STACK_OF(SSL_CIPHER) *peer_ciphers,\n                                         SSL_CIPHER **cipher, void *arg);\n\n# ifndef OPENSSL_NO_SSL_INTERN\n\n/* used to hold info on the particular ciphers used */\nstruct ssl_cipher_st {\n    int valid;\n    const char *name;           /* text name */\n    unsigned long id;           /* id, 4 bytes, first is version */\n    /*\n     * changed in 0.9.9: these four used to be portions of a single value\n     * 'algorithms'\n     */\n    unsigned long algorithm_mkey; /* key exchange algorithm */\n    unsigned long algorithm_auth; /* server authentication */\n    unsigned long algorithm_enc; /* symmetric encryption */\n    unsigned long algorithm_mac; /* symmetric authentication */\n    unsigned long algorithm_ssl; /* (major) protocol version */\n    unsigned long algo_strength; /* strength and export flags */\n    unsigned long algorithm2;   /* Extra flags */\n    int strength_bits;          /* Number of bits really used */\n    int alg_bits;               /* Number of bits for algorithm */\n};\n\n/* Used to hold functions for SSLv2 or SSLv3/TLSv1 functions */\nstruct ssl_method_st {\n    int version;\n    int (*ssl_new) (SSL *s);\n    void (*ssl_clear) (SSL *s);\n    void (*ssl_free) (SSL *s);\n    int (*ssl_accept) (SSL *s);\n    int (*ssl_connect) (SSL *s);\n    int (*ssl_read) (SSL *s, void *buf, int len);\n    int (*ssl_peek) (SSL *s, void *buf, int len);\n    int (*ssl_write) (SSL *s, const void *buf, int len);\n    int (*ssl_shutdown) (SSL *s);\n    int (*ssl_renegotiate) (SSL *s);\n    int (*ssl_renegotiate_check) (SSL *s);\n    long (*ssl_get_message) (SSL *s, int st1, int stn, int mt, long\n                             max, int *ok);\n    int (*ssl_read_bytes) (SSL *s, int type, unsigned char *buf, int len,\n                           int peek);\n    int (*ssl_write_bytes) (SSL *s, int type, const void *buf_, int len);\n    int (*ssl_dispatch_alert) (SSL *s);\n    long (*ssl_ctrl) (SSL *s, int cmd, long larg, void *parg);\n    long (*ssl_ctx_ctrl) (SSL_CTX *ctx, int cmd, long larg, void *parg);\n    const SSL_CIPHER *(*get_cipher_by_char) (const unsigned char *ptr);\n    int (*put_cipher_by_char) (const SSL_CIPHER *cipher, unsigned char *ptr);\n    int (*ssl_pending) (const SSL *s);\n    int (*num_ciphers) (void);\n    const SSL_CIPHER *(*get_cipher) (unsigned ncipher);\n    const struct ssl_method_st *(*get_ssl_method) (int version);\n    long (*get_timeout) (void);\n    struct ssl3_enc_method *ssl3_enc; /* Extra SSLv3/TLS stuff */\n    int (*ssl_version) (void);\n    long (*ssl_callback_ctrl) (SSL *s, int cb_id, void (*fp) (void));\n    long (*ssl_ctx_callback_ctrl) (SSL_CTX *s, int cb_id, void (*fp) (void));\n};\n\n/*-\n * Lets make this into an ASN.1 type structure as follows\n * SSL_SESSION_ID ::= SEQUENCE {\n *      version                 INTEGER,        -- structure version number\n *      SSLversion              INTEGER,        -- SSL version number\n *      Cipher                  OCTET STRING,   -- the 3 byte cipher ID\n *      Session_ID              OCTET STRING,   -- the Session ID\n *      Master_key              OCTET STRING,   -- the master key\n *      KRB5_principal          OCTET STRING    -- optional Kerberos principal\n *      Key_Arg [ 0 ] IMPLICIT  OCTET STRING,   -- the optional Key argument\n *      Time [ 1 ] EXPLICIT     INTEGER,        -- optional Start Time\n *      Timeout [ 2 ] EXPLICIT  INTEGER,        -- optional Timeout ins seconds\n *      Peer [ 3 ] EXPLICIT     X509,           -- optional Peer Certificate\n *      Session_ID_context [ 4 ] EXPLICIT OCTET STRING,   -- the Session ID context\n *      Verify_result [ 5 ] EXPLICIT INTEGER,   -- X509_V_... code for `Peer'\n *      HostName [ 6 ] EXPLICIT OCTET STRING,   -- optional HostName from servername TLS extension\n *      PSK_identity_hint [ 7 ] EXPLICIT OCTET STRING, -- optional PSK identity hint\n *      PSK_identity [ 8 ] EXPLICIT OCTET STRING,  -- optional PSK identity\n *      Ticket_lifetime_hint [9] EXPLICIT INTEGER, -- server's lifetime hint for session ticket\n *      Ticket [10]             EXPLICIT OCTET STRING, -- session ticket (clients only)\n *      Compression_meth [11]   EXPLICIT OCTET STRING, -- optional compression method\n *      SRP_username [ 12 ] EXPLICIT OCTET STRING -- optional SRP username\n *      }\n * Look in ssl/ssl_asn1.c for more details\n * I'm using EXPLICIT tags so I can read the damn things using asn1parse :-).\n */\nstruct ssl_session_st {\n    int ssl_version;            /* what ssl version session info is being\n                                 * kept in here? */\n    /* only really used in SSLv2 */\n    unsigned int key_arg_length;\n    unsigned char key_arg[SSL_MAX_KEY_ARG_LENGTH];\n    int master_key_length;\n    unsigned char master_key[SSL_MAX_MASTER_KEY_LENGTH];\n    /* session_id - valid? */\n    unsigned int session_id_length;\n    unsigned char session_id[SSL_MAX_SSL_SESSION_ID_LENGTH];\n    /*\n     * this is used to determine whether the session is being reused in the\n     * appropriate context. It is up to the application to set this, via\n     * SSL_new\n     */\n    unsigned int sid_ctx_length;\n    unsigned char sid_ctx[SSL_MAX_SID_CTX_LENGTH];\n#  ifndef OPENSSL_NO_KRB5\n    unsigned int krb5_client_princ_len;\n    unsigned char krb5_client_princ[SSL_MAX_KRB5_PRINCIPAL_LENGTH];\n#  endif                        /* OPENSSL_NO_KRB5 */\n#  ifndef OPENSSL_NO_PSK\n    char *psk_identity_hint;\n    char *psk_identity;\n#  endif\n    /*\n     * Used to indicate that session resumption is not allowed. Applications\n     * can also set this bit for a new session via not_resumable_session_cb\n     * to disable session caching and tickets.\n     */\n    int not_resumable;\n    /* The cert is the certificate used to establish this connection */\n    struct sess_cert_st /* SESS_CERT */ *sess_cert;\n    /*\n     * This is the cert for the other end. On clients, it will be the same as\n     * sess_cert->peer_key->x509 (the latter is not enough as sess_cert is\n     * not retained in the external representation of sessions, see\n     * ssl_asn1.c).\n     */\n    X509 *peer;\n    /*\n     * when app_verify_callback accepts a session where the peer's\n     * certificate is not ok, we must remember the error for session reuse:\n     */\n    long verify_result;         /* only for servers */\n    int references;\n    long timeout;\n    long time;\n    unsigned int compress_meth; /* Need to lookup the method */\n    const SSL_CIPHER *cipher;\n    unsigned long cipher_id;    /* when ASN.1 loaded, this needs to be used\n                                 * to load the 'cipher' structure */\n    STACK_OF(SSL_CIPHER) *ciphers; /* shared ciphers? */\n    CRYPTO_EX_DATA ex_data;     /* application specific data */\n    /*\n     * These are used to make removal of session-ids more efficient and to\n     * implement a maximum cache size.\n     */\n    struct ssl_session_st *prev, *next;\n#  ifndef OPENSSL_NO_TLSEXT\n    char *tlsext_hostname;\n#   ifndef OPENSSL_NO_EC\n    size_t tlsext_ecpointformatlist_length;\n    unsigned char *tlsext_ecpointformatlist; /* peer's list */\n    size_t tlsext_ellipticcurvelist_length;\n    unsigned char *tlsext_ellipticcurvelist; /* peer's list */\n#   endif                       /* OPENSSL_NO_EC */\n    /* RFC4507 info */\n    unsigned char *tlsext_tick; /* Session ticket */\n    size_t tlsext_ticklen;      /* Session ticket length */\n    long tlsext_tick_lifetime_hint; /* Session lifetime hint in seconds */\n#  endif\n#  ifndef OPENSSL_NO_SRP\n    char *srp_username;\n#  endif\n};\n\n# endif\n\n# define SSL_OP_MICROSOFT_SESS_ID_BUG                    0x00000001L\n# define SSL_OP_NETSCAPE_CHALLENGE_BUG                   0x00000002L\n/* Allow initial connection to servers that don't support RI */\n# define SSL_OP_LEGACY_SERVER_CONNECT                    0x00000004L\n# define SSL_OP_NETSCAPE_REUSE_CIPHER_CHANGE_BUG         0x00000008L\n# define SSL_OP_TLSEXT_PADDING                           0x00000010L\n# define SSL_OP_MICROSOFT_BIG_SSLV3_BUFFER               0x00000020L\n# define SSL_OP_SAFARI_ECDHE_ECDSA_BUG                   0x00000040L\n# define SSL_OP_SSLEAY_080_CLIENT_DH_BUG                 0x00000080L\n# define SSL_OP_TLS_D5_BUG                               0x00000100L\n# define SSL_OP_TLS_BLOCK_PADDING_BUG                    0x00000200L\n\n/* Hasn't done anything since OpenSSL 0.9.7h, retained for compatibility */\n# define SSL_OP_MSIE_SSLV2_RSA_PADDING                   0x0\n/* Refers to ancient SSLREF and SSLv2, retained for compatibility */\n# define SSL_OP_SSLREF2_REUSE_CERT_TYPE_BUG              0x0\n\n/*\n * Disable SSL 3.0/TLS 1.0 CBC vulnerability workaround that was added in\n * OpenSSL 0.9.6d.  Usually (depending on the application protocol) the\n * workaround is not needed.  Unfortunately some broken SSL/TLS\n * implementations cannot handle it at all, which is why we include it in\n * SSL_OP_ALL.\n */\n/* added in 0.9.6e */\n# define SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS              0x00000800L\n\n/*\n * SSL_OP_ALL: various bug workarounds that should be rather harmless.  This\n * used to be 0x000FFFFFL before 0.9.7.\n */\n# define SSL_OP_ALL                                      0x80000BFFL\n\n/* DTLS options */\n# define SSL_OP_NO_QUERY_MTU                 0x00001000L\n/* Turn on Cookie Exchange (on relevant for servers) */\n# define SSL_OP_COOKIE_EXCHANGE              0x00002000L\n/* Don't use RFC4507 ticket extension */\n# define SSL_OP_NO_TICKET                    0x00004000L\n/* Use Cisco's \"speshul\" version of DTLS_BAD_VER (as client)  */\n# define SSL_OP_CISCO_ANYCONNECT             0x00008000L\n\n/* As server, disallow session resumption on renegotiation */\n# define SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION   0x00010000L\n/* Don't use compression even if supported */\n# define SSL_OP_NO_COMPRESSION                           0x00020000L\n/* Permit unsafe legacy renegotiation */\n# define SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION        0x00040000L\n/* If set, always create a new key when using tmp_ecdh parameters */\n# define SSL_OP_SINGLE_ECDH_USE                          0x00080000L\n/* If set, always create a new key when using tmp_dh parameters */\n# define SSL_OP_SINGLE_DH_USE                            0x00100000L\n/* Does nothing: retained for compatibiity */\n# define SSL_OP_EPHEMERAL_RSA                            0x0\n/*\n * Set on servers to choose the cipher according to the server's preferences\n */\n# define SSL_OP_CIPHER_SERVER_PREFERENCE                 0x00400000L\n/*\n * If set, a server will allow a client to issue a SSLv3.0 version number as\n * latest version supported in the premaster secret, even when TLSv1.0\n * (version 3.1) was announced in the client hello. Normally this is\n * forbidden to prevent version rollback attacks.\n */\n# define SSL_OP_TLS_ROLLBACK_BUG                         0x00800000L\n\n# define SSL_OP_NO_SSLv2                                 0x01000000L\n# define SSL_OP_NO_SSLv3                                 0x02000000L\n# define SSL_OP_NO_TLSv1                                 0x04000000L\n# define SSL_OP_NO_TLSv1_2                               0x08000000L\n# define SSL_OP_NO_TLSv1_1                               0x10000000L\n\n/*\n * These next two were never actually used for anything since SSLeay zap so\n * we have some more flags.\n */\n/*\n * The next flag deliberately changes the ciphertest, this is a check for the\n * PKCS#1 attack\n */\n# define SSL_OP_PKCS1_CHECK_1                            0x0\n# define SSL_OP_PKCS1_CHECK_2                            0x0\n\n# define SSL_OP_NETSCAPE_CA_DN_BUG                       0x20000000L\n# define SSL_OP_NETSCAPE_DEMO_CIPHER_CHANGE_BUG          0x40000000L\n/*\n * Make server add server-hello extension from early version of cryptopro\n * draft, when GOST ciphersuite is negotiated. Required for interoperability\n * with CryptoPro CSP 3.x\n */\n# define SSL_OP_CRYPTOPRO_TLSEXT_BUG                     0x80000000L\n\n/*\n * Allow SSL_write(..., n) to return r with 0 < r < n (i.e. report success\n * when just a single record has been written):\n */\n# define SSL_MODE_ENABLE_PARTIAL_WRITE       0x00000001L\n/*\n * Make it possible to retry SSL_write() with changed buffer location (buffer\n * contents must stay the same!); this is not the default to avoid the\n * misconception that non-blocking SSL_write() behaves like non-blocking\n * write():\n */\n# define SSL_MODE_ACCEPT_MOVING_WRITE_BUFFER 0x00000002L\n/*\n * Never bother the application with retries if the transport is blocking:\n */\n# define SSL_MODE_AUTO_RETRY 0x00000004L\n/* Don't attempt to automatically build certificate chain */\n# define SSL_MODE_NO_AUTO_CHAIN 0x00000008L\n/*\n * Save RAM by releasing read and write buffers when they're empty. (SSL3 and\n * TLS only.) \"Released\" buffers are put onto a free-list in the context or\n * just freed (depending on the context's setting for freelist_max_len).\n */\n# define SSL_MODE_RELEASE_BUFFERS 0x00000010L\n/*\n * Send the current time in the Random fields of the ClientHello and\n * ServerHello records for compatibility with hypothetical implementations\n * that require it.\n */\n# define SSL_MODE_SEND_CLIENTHELLO_TIME 0x00000020L\n# define SSL_MODE_SEND_SERVERHELLO_TIME 0x00000040L\n/*\n * Send TLS_FALLBACK_SCSV in the ClientHello. To be set only by applications\n * that reconnect with a downgraded protocol version; see\n * draft-ietf-tls-downgrade-scsv-00 for details. DO NOT ENABLE THIS if your\n * application attempts a normal handshake. Only use this in explicit\n * fallback retries, following the guidance in\n * draft-ietf-tls-downgrade-scsv-00.\n */\n# define SSL_MODE_SEND_FALLBACK_SCSV 0x00000080L\n\n/*\n * Note: SSL[_CTX]_set_{options,mode} use |= op on the previous value, they\n * cannot be used to clear bits.\n */\n\n# define SSL_CTX_set_options(ctx,op) \\\n        SSL_CTX_ctrl((ctx),SSL_CTRL_OPTIONS,(op),NULL)\n# define SSL_CTX_clear_options(ctx,op) \\\n        SSL_CTX_ctrl((ctx),SSL_CTRL_CLEAR_OPTIONS,(op),NULL)\n# define SSL_CTX_get_options(ctx) \\\n        SSL_CTX_ctrl((ctx),SSL_CTRL_OPTIONS,0,NULL)\n# define SSL_set_options(ssl,op) \\\n        SSL_ctrl((ssl),SSL_CTRL_OPTIONS,(op),NULL)\n# define SSL_clear_options(ssl,op) \\\n        SSL_ctrl((ssl),SSL_CTRL_CLEAR_OPTIONS,(op),NULL)\n# define SSL_get_options(ssl) \\\n        SSL_ctrl((ssl),SSL_CTRL_OPTIONS,0,NULL)\n\n# define SSL_CTX_set_mode(ctx,op) \\\n        SSL_CTX_ctrl((ctx),SSL_CTRL_MODE,(op),NULL)\n# define SSL_CTX_clear_mode(ctx,op) \\\n        SSL_CTX_ctrl((ctx),SSL_CTRL_CLEAR_MODE,(op),NULL)\n# define SSL_CTX_get_mode(ctx) \\\n        SSL_CTX_ctrl((ctx),SSL_CTRL_MODE,0,NULL)\n# define SSL_clear_mode(ssl,op) \\\n        SSL_ctrl((ssl),SSL_CTRL_CLEAR_MODE,(op),NULL)\n# define SSL_set_mode(ssl,op) \\\n        SSL_ctrl((ssl),SSL_CTRL_MODE,(op),NULL)\n# define SSL_get_mode(ssl) \\\n        SSL_ctrl((ssl),SSL_CTRL_MODE,0,NULL)\n# define SSL_set_mtu(ssl, mtu) \\\n        SSL_ctrl((ssl),SSL_CTRL_SET_MTU,(mtu),NULL)\n# define DTLS_set_link_mtu(ssl, mtu) \\\n        SSL_ctrl((ssl),DTLS_CTRL_SET_LINK_MTU,(mtu),NULL)\n# define DTLS_get_link_min_mtu(ssl) \\\n        SSL_ctrl((ssl),DTLS_CTRL_GET_LINK_MIN_MTU,0,NULL)\n\n# define SSL_get_secure_renegotiation_support(ssl) \\\n        SSL_ctrl((ssl), SSL_CTRL_GET_RI_SUPPORT, 0, NULL)\n\n# ifndef OPENSSL_NO_HEARTBEATS\n#  define SSL_heartbeat(ssl) \\\n        SSL_ctrl((ssl),SSL_CTRL_TLS_EXT_SEND_HEARTBEAT,0,NULL)\n# endif\n\nvoid SSL_CTX_set_msg_callback(SSL_CTX *ctx,\n                              void (*cb) (int write_p, int version,\n                                          int content_type, const void *buf,\n                                          size_t len, SSL *ssl, void *arg));\nvoid SSL_set_msg_callback(SSL *ssl,\n                          void (*cb) (int write_p, int version,\n                                      int content_type, const void *buf,\n                                      size_t len, SSL *ssl, void *arg));\n# define SSL_CTX_set_msg_callback_arg(ctx, arg) SSL_CTX_ctrl((ctx), SSL_CTRL_SET_MSG_CALLBACK_ARG, 0, (arg))\n# define SSL_set_msg_callback_arg(ssl, arg) SSL_ctrl((ssl), SSL_CTRL_SET_MSG_CALLBACK_ARG, 0, (arg))\n\n# ifndef OPENSSL_NO_SRP\n\n#  ifndef OPENSSL_NO_SSL_INTERN\n\ntypedef struct srp_ctx_st {\n    /* param for all the callbacks */\n    void *SRP_cb_arg;\n    /* set client Hello login callback */\n    int (*TLS_ext_srp_username_callback) (SSL *, int *, void *);\n    /* set SRP N/g param callback for verification */\n    int (*SRP_verify_param_callback) (SSL *, void *);\n    /* set SRP client passwd callback */\n    char *(*SRP_give_srp_client_pwd_callback) (SSL *, void *);\n    char *login;\n    BIGNUM *N, *g, *s, *B, *A;\n    BIGNUM *a, *b, *v;\n    char *info;\n    int strength;\n    unsigned long srp_Mask;\n} SRP_CTX;\n\n#  endif\n\n/* see tls_srp.c */\nint SSL_SRP_CTX_init(SSL *s);\nint SSL_CTX_SRP_CTX_init(SSL_CTX *ctx);\nint SSL_SRP_CTX_free(SSL *ctx);\nint SSL_CTX_SRP_CTX_free(SSL_CTX *ctx);\nint SSL_srp_server_param_with_username(SSL *s, int *ad);\nint SRP_generate_server_master_secret(SSL *s, unsigned char *master_key);\nint SRP_Calc_A_param(SSL *s);\nint SRP_generate_client_master_secret(SSL *s, unsigned char *master_key);\n\n# endif\n\n# if defined(OPENSSL_SYS_MSDOS) && !defined(OPENSSL_SYS_WIN32)\n#  define SSL_MAX_CERT_LIST_DEFAULT 1024*30\n                                          /* 30k max cert list :-) */\n# else\n#  define SSL_MAX_CERT_LIST_DEFAULT 1024*100\n                                           /* 100k max cert list :-) */\n# endif\n\n# define SSL_SESSION_CACHE_MAX_SIZE_DEFAULT      (1024*20)\n\n/*\n * This callback type is used inside SSL_CTX, SSL, and in the functions that\n * set them. It is used to override the generation of SSL/TLS session IDs in\n * a server. Return value should be zero on an error, non-zero to proceed.\n * Also, callbacks should themselves check if the id they generate is unique\n * otherwise the SSL handshake will fail with an error - callbacks can do\n * this using the 'ssl' value they're passed by;\n * SSL_has_matching_session_id(ssl, id, *id_len) The length value passed in\n * is set at the maximum size the session ID can be. In SSLv2 this is 16\n * bytes, whereas SSLv3/TLSv1 it is 32 bytes. The callback can alter this\n * length to be less if desired, but under SSLv2 session IDs are supposed to\n * be fixed at 16 bytes so the id will be padded after the callback returns\n * in this case. It is also an error for the callback to set the size to\n * zero.\n */\ntypedef int (*GEN_SESSION_CB) (const SSL *ssl, unsigned char *id,\n                               unsigned int *id_len);\n\ntypedef struct ssl_comp_st SSL_COMP;\n\n# ifndef OPENSSL_NO_SSL_INTERN\n\nstruct ssl_comp_st {\n    int id;\n    const char *name;\n#  ifndef OPENSSL_NO_COMP\n    COMP_METHOD *method;\n#  else\n    char *method;\n#  endif\n};\n\nDECLARE_STACK_OF(SSL_COMP)\nDECLARE_LHASH_OF(SSL_SESSION);\n\nstruct ssl_ctx_st {\n    const SSL_METHOD *method;\n    STACK_OF(SSL_CIPHER) *cipher_list;\n    /* same as above but sorted for lookup */\n    STACK_OF(SSL_CIPHER) *cipher_list_by_id;\n    struct x509_store_st /* X509_STORE */ *cert_store;\n    LHASH_OF(SSL_SESSION) *sessions;\n    /*\n     * Most session-ids that will be cached, default is\n     * SSL_SESSION_CACHE_MAX_SIZE_DEFAULT. 0 is unlimited.\n     */\n    unsigned long session_cache_size;\n    struct ssl_session_st *session_cache_head;\n    struct ssl_session_st *session_cache_tail;\n    /*\n     * This can have one of 2 values, ored together, SSL_SESS_CACHE_CLIENT,\n     * SSL_SESS_CACHE_SERVER, Default is SSL_SESSION_CACHE_SERVER, which\n     * means only SSL_accept which cache SSL_SESSIONS.\n     */\n    int session_cache_mode;\n    /*\n     * If timeout is not 0, it is the default timeout value set when\n     * SSL_new() is called.  This has been put in to make life easier to set\n     * things up\n     */\n    long session_timeout;\n    /*\n     * If this callback is not null, it will be called each time a session id\n     * is added to the cache.  If this function returns 1, it means that the\n     * callback will do a SSL_SESSION_free() when it has finished using it.\n     * Otherwise, on 0, it means the callback has finished with it. If\n     * remove_session_cb is not null, it will be called when a session-id is\n     * removed from the cache.  After the call, OpenSSL will\n     * SSL_SESSION_free() it.\n     */\n    int (*new_session_cb) (struct ssl_st *ssl, SSL_SESSION *sess);\n    void (*remove_session_cb) (struct ssl_ctx_st *ctx, SSL_SESSION *sess);\n    SSL_SESSION *(*get_session_cb) (struct ssl_st *ssl,\n                                    unsigned char *data, int len, int *copy);\n    struct {\n        int sess_connect;       /* SSL new conn - started */\n        int sess_connect_renegotiate; /* SSL reneg - requested */\n        int sess_connect_good;  /* SSL new conne/reneg - finished */\n        int sess_accept;        /* SSL new accept - started */\n        int sess_accept_renegotiate; /* SSL reneg - requested */\n        int sess_accept_good;   /* SSL accept/reneg - finished */\n        int sess_miss;          /* session lookup misses */\n        int sess_timeout;       /* reuse attempt on timeouted session */\n        int sess_cache_full;    /* session removed due to full cache */\n        int sess_hit;           /* session reuse actually done */\n        int sess_cb_hit;        /* session-id that was not in the cache was\n                                 * passed back via the callback.  This\n                                 * indicates that the application is\n                                 * supplying session-id's from other\n                                 * processes - spooky :-) */\n    } stats;\n\n    int references;\n\n    /* if defined, these override the X509_verify_cert() calls */\n    int (*app_verify_callback) (X509_STORE_CTX *, void *);\n    void *app_verify_arg;\n    /*\n     * before OpenSSL 0.9.7, 'app_verify_arg' was ignored\n     * ('app_verify_callback' was called with just one argument)\n     */\n\n    /* Default password callback. */\n    pem_password_cb *default_passwd_callback;\n\n    /* Default password callback user data. */\n    void *default_passwd_callback_userdata;\n\n    /* get client cert callback */\n    int (*client_cert_cb) (SSL *ssl, X509 **x509, EVP_PKEY **pkey);\n\n    /* cookie generate callback */\n    int (*app_gen_cookie_cb) (SSL *ssl, unsigned char *cookie,\n                              unsigned int *cookie_len);\n\n    /* verify cookie callback */\n    int (*app_verify_cookie_cb) (SSL *ssl, unsigned char *cookie,\n                                 unsigned int cookie_len);\n\n    CRYPTO_EX_DATA ex_data;\n\n    const EVP_MD *rsa_md5;      /* For SSLv2 - name is 'ssl2-md5' */\n    const EVP_MD *md5;          /* For SSLv3/TLSv1 'ssl3-md5' */\n    const EVP_MD *sha1;         /* For SSLv3/TLSv1 'ssl3->sha1' */\n\n    STACK_OF(X509) *extra_certs;\n    STACK_OF(SSL_COMP) *comp_methods; /* stack of SSL_COMP, SSLv3/TLSv1 */\n\n    /* Default values used when no per-SSL value is defined follow */\n\n    /* used if SSL's info_callback is NULL */\n    void (*info_callback) (const SSL *ssl, int type, int val);\n\n    /* what we put in client cert requests */\n    STACK_OF(X509_NAME) *client_CA;\n\n    /*\n     * Default values to use in SSL structures follow (these are copied by\n     * SSL_new)\n     */\n\n    unsigned long options;\n    unsigned long mode;\n    long max_cert_list;\n\n    struct cert_st /* CERT */ *cert;\n    int read_ahead;\n\n    /* callback that allows applications to peek at protocol messages */\n    void (*msg_callback) (int write_p, int version, int content_type,\n                          const void *buf, size_t len, SSL *ssl, void *arg);\n    void *msg_callback_arg;\n\n    int verify_mode;\n    unsigned int sid_ctx_length;\n    unsigned char sid_ctx[SSL_MAX_SID_CTX_LENGTH];\n    /* called 'verify_callback' in the SSL */\n    int (*default_verify_callback) (int ok, X509_STORE_CTX *ctx);\n\n    /* Default generate session ID callback. */\n    GEN_SESSION_CB generate_session_id;\n\n    X509_VERIFY_PARAM *param;\n\n#  if 0\n    int purpose;                /* Purpose setting */\n    int trust;                  /* Trust setting */\n#  endif\n\n    int quiet_shutdown;\n\n    /*\n     * Maximum amount of data to send in one fragment. actual record size can\n     * be more than this due to padding and MAC overheads.\n     */\n    unsigned int max_send_fragment;\n\n#  ifndef OPENSSL_NO_ENGINE\n    /*\n     * Engine to pass requests for client certs to\n     */\n    ENGINE *client_cert_engine;\n#  endif\n\n#  ifndef OPENSSL_NO_TLSEXT\n    /* TLS extensions servername callback */\n    int (*tlsext_servername_callback) (SSL *, int *, void *);\n    void *tlsext_servername_arg;\n    /* RFC 4507 session ticket keys */\n    unsigned char tlsext_tick_key_name[16];\n    unsigned char tlsext_tick_hmac_key[16];\n    unsigned char tlsext_tick_aes_key[16];\n    /* Callback to support customisation of ticket key setting */\n    int (*tlsext_ticket_key_cb) (SSL *ssl,\n                                 unsigned char *name, unsigned char *iv,\n                                 EVP_CIPHER_CTX *ectx,\n                                 HMAC_CTX *hctx, int enc);\n\n    /* certificate status request info */\n    /* Callback for status request */\n    int (*tlsext_status_cb) (SSL *ssl, void *arg);\n    void *tlsext_status_arg;\n\n    /* draft-rescorla-tls-opaque-prf-input-00.txt information */\n    int (*tlsext_opaque_prf_input_callback) (SSL *, void *peerinput,\n                                             size_t len, void *arg);\n    void *tlsext_opaque_prf_input_callback_arg;\n#  endif\n\n#  ifndef OPENSSL_NO_PSK\n    char *psk_identity_hint;\n    unsigned int (*psk_client_callback) (SSL *ssl, const char *hint,\n                                         char *identity,\n                                         unsigned int max_identity_len,\n                                         unsigned char *psk,\n                                         unsigned int max_psk_len);\n    unsigned int (*psk_server_callback) (SSL *ssl, const char *identity,\n                                         unsigned char *psk,\n                                         unsigned int max_psk_len);\n#  endif\n\n#  ifndef OPENSSL_NO_BUF_FREELISTS\n#   define SSL_MAX_BUF_FREELIST_LEN_DEFAULT 32\n    unsigned int freelist_max_len;\n    struct ssl3_buf_freelist_st *wbuf_freelist;\n    struct ssl3_buf_freelist_st *rbuf_freelist;\n#  endif\n#  ifndef OPENSSL_NO_SRP\n    SRP_CTX srp_ctx;            /* ctx for SRP authentication */\n#  endif\n\n#  ifndef OPENSSL_NO_TLSEXT\n\n#   ifndef OPENSSL_NO_NEXTPROTONEG\n    /* Next protocol negotiation information */\n    /* (for experimental NPN extension). */\n\n    /*\n     * For a server, this contains a callback function by which the set of\n     * advertised protocols can be provided.\n     */\n    int (*next_protos_advertised_cb) (SSL *s, const unsigned char **buf,\n                                      unsigned int *len, void *arg);\n    void *next_protos_advertised_cb_arg;\n    /*\n     * For a client, this contains a callback function that selects the next\n     * protocol from the list provided by the server.\n     */\n    int (*next_proto_select_cb) (SSL *s, unsigned char **out,\n                                 unsigned char *outlen,\n                                 const unsigned char *in,\n                                 unsigned int inlen, void *arg);\n    void *next_proto_select_cb_arg;\n#   endif\n    /* SRTP profiles we are willing to do from RFC 5764 */\n    STACK_OF(SRTP_PROTECTION_PROFILE) *srtp_profiles;\n#  endif\n};\n\n# endif\n\n# define SSL_SESS_CACHE_OFF                      0x0000\n# define SSL_SESS_CACHE_CLIENT                   0x0001\n# define SSL_SESS_CACHE_SERVER                   0x0002\n# define SSL_SESS_CACHE_BOTH     (SSL_SESS_CACHE_CLIENT|SSL_SESS_CACHE_SERVER)\n# define SSL_SESS_CACHE_NO_AUTO_CLEAR            0x0080\n/* enough comments already ... see SSL_CTX_set_session_cache_mode(3) */\n# define SSL_SESS_CACHE_NO_INTERNAL_LOOKUP       0x0100\n# define SSL_SESS_CACHE_NO_INTERNAL_STORE        0x0200\n# define SSL_SESS_CACHE_NO_INTERNAL \\\n        (SSL_SESS_CACHE_NO_INTERNAL_LOOKUP|SSL_SESS_CACHE_NO_INTERNAL_STORE)\n\nLHASH_OF(SSL_SESSION) *SSL_CTX_sessions(SSL_CTX *ctx);\n# define SSL_CTX_sess_number(ctx) \\\n        SSL_CTX_ctrl(ctx,SSL_CTRL_SESS_NUMBER,0,NULL)\n# define SSL_CTX_sess_connect(ctx) \\\n        SSL_CTX_ctrl(ctx,SSL_CTRL_SESS_CONNECT,0,NULL)\n# define SSL_CTX_sess_connect_good(ctx) \\\n        SSL_CTX_ctrl(ctx,SSL_CTRL_SESS_CONNECT_GOOD,0,NULL)\n# define SSL_CTX_sess_connect_renegotiate(ctx) \\\n        SSL_CTX_ctrl(ctx,SSL_CTRL_SESS_CONNECT_RENEGOTIATE,0,NULL)\n# define SSL_CTX_sess_accept(ctx) \\\n        SSL_CTX_ctrl(ctx,SSL_CTRL_SESS_ACCEPT,0,NULL)\n# define SSL_CTX_sess_accept_renegotiate(ctx) \\\n        SSL_CTX_ctrl(ctx,SSL_CTRL_SESS_ACCEPT_RENEGOTIATE,0,NULL)\n# define SSL_CTX_sess_accept_good(ctx) \\\n        SSL_CTX_ctrl(ctx,SSL_CTRL_SESS_ACCEPT_GOOD,0,NULL)\n# define SSL_CTX_sess_hits(ctx) \\\n        SSL_CTX_ctrl(ctx,SSL_CTRL_SESS_HIT,0,NULL)\n# define SSL_CTX_sess_cb_hits(ctx) \\\n        SSL_CTX_ctrl(ctx,SSL_CTRL_SESS_CB_HIT,0,NULL)\n# define SSL_CTX_sess_misses(ctx) \\\n        SSL_CTX_ctrl(ctx,SSL_CTRL_SESS_MISSES,0,NULL)\n# define SSL_CTX_sess_timeouts(ctx) \\\n        SSL_CTX_ctrl(ctx,SSL_CTRL_SESS_TIMEOUTS,0,NULL)\n# define SSL_CTX_sess_cache_full(ctx) \\\n        SSL_CTX_ctrl(ctx,SSL_CTRL_SESS_CACHE_FULL,0,NULL)\n\nvoid SSL_CTX_sess_set_new_cb(SSL_CTX *ctx,\n                             int (*new_session_cb) (struct ssl_st *ssl,\n                                                    SSL_SESSION *sess));\nint (*SSL_CTX_sess_get_new_cb(SSL_CTX *ctx)) (struct ssl_st *ssl,\n                                              SSL_SESSION *sess);\nvoid SSL_CTX_sess_set_remove_cb(SSL_CTX *ctx,\n                                void (*remove_session_cb) (struct ssl_ctx_st\n                                                           *ctx,\n                                                           SSL_SESSION\n                                                           *sess));\nvoid (*SSL_CTX_sess_get_remove_cb(SSL_CTX *ctx)) (struct ssl_ctx_st *ctx,\n                                                  SSL_SESSION *sess);\nvoid SSL_CTX_sess_set_get_cb(SSL_CTX *ctx,\n                             SSL_SESSION *(*get_session_cb) (struct ssl_st\n                                                             *ssl,\n                                                             unsigned char\n                                                             *data, int len,\n                                                             int *copy));\nSSL_SESSION *(*SSL_CTX_sess_get_get_cb(SSL_CTX *ctx)) (struct ssl_st *ssl,\n                                                       unsigned char *Data,\n                                                       int len, int *copy);\nvoid SSL_CTX_set_info_callback(SSL_CTX *ctx,\n                               void (*cb) (const SSL *ssl, int type,\n                                           int val));\nvoid (*SSL_CTX_get_info_callback(SSL_CTX *ctx)) (const SSL *ssl, int type,\n                                                 int val);\nvoid SSL_CTX_set_client_cert_cb(SSL_CTX *ctx,\n                                int (*client_cert_cb) (SSL *ssl, X509 **x509,\n                                                       EVP_PKEY **pkey));\nint (*SSL_CTX_get_client_cert_cb(SSL_CTX *ctx)) (SSL *ssl, X509 **x509,\n                                                 EVP_PKEY **pkey);\n# ifndef OPENSSL_NO_ENGINE\nint SSL_CTX_set_client_cert_engine(SSL_CTX *ctx, ENGINE *e);\n# endif\nvoid SSL_CTX_set_cookie_generate_cb(SSL_CTX *ctx,\n                                    int (*app_gen_cookie_cb) (SSL *ssl,\n                                                              unsigned char\n                                                              *cookie,\n                                                              unsigned int\n                                                              *cookie_len));\nvoid SSL_CTX_set_cookie_verify_cb(SSL_CTX *ctx,\n                                  int (*app_verify_cookie_cb) (SSL *ssl,\n                                                               unsigned char\n                                                               *cookie,\n                                                               unsigned int\n                                                               cookie_len));\n# ifndef OPENSSL_NO_NEXTPROTONEG\nvoid SSL_CTX_set_next_protos_advertised_cb(SSL_CTX *s,\n                                           int (*cb) (SSL *ssl,\n                                                      const unsigned char\n                                                      **out,\n                                                      unsigned int *outlen,\n                                                      void *arg), void *arg);\nvoid SSL_CTX_set_next_proto_select_cb(SSL_CTX *s,\n                                      int (*cb) (SSL *ssl,\n                                                 unsigned char **out,\n                                                 unsigned char *outlen,\n                                                 const unsigned char *in,\n                                                 unsigned int inlen,\n                                                 void *arg), void *arg);\n\nint SSL_select_next_proto(unsigned char **out, unsigned char *outlen,\n                          const unsigned char *in, unsigned int inlen,\n                          const unsigned char *client,\n                          unsigned int client_len);\nvoid SSL_get0_next_proto_negotiated(const SSL *s, const unsigned char **data,\n                                    unsigned *len);\n\n#  define OPENSSL_NPN_UNSUPPORTED 0\n#  define OPENSSL_NPN_NEGOTIATED  1\n#  define OPENSSL_NPN_NO_OVERLAP  2\n# endif\n\n# ifndef OPENSSL_NO_PSK\n/*\n * the maximum length of the buffer given to callbacks containing the\n * resulting identity/psk\n */\n#  define PSK_MAX_IDENTITY_LEN 128\n#  define PSK_MAX_PSK_LEN 256\nvoid SSL_CTX_set_psk_client_callback(SSL_CTX *ctx,\n                                     unsigned int (*psk_client_callback) (SSL\n                                                                          *ssl,\n                                                                          const\n                                                                          char\n                                                                          *hint,\n                                                                          char\n                                                                          *identity,\n                                                                          unsigned\n                                                                          int\n                                                                          max_identity_len,\n                                                                          unsigned\n                                                                          char\n                                                                          *psk,\n                                                                          unsigned\n                                                                          int\n                                                                          max_psk_len));\nvoid SSL_set_psk_client_callback(SSL *ssl,\n                                 unsigned int (*psk_client_callback) (SSL\n                                                                      *ssl,\n                                                                      const\n                                                                      char\n                                                                      *hint,\n                                                                      char\n                                                                      *identity,\n                                                                      unsigned\n                                                                      int\n                                                                      max_identity_len,\n                                                                      unsigned\n                                                                      char\n                                                                      *psk,\n                                                                      unsigned\n                                                                      int\n                                                                      max_psk_len));\nvoid SSL_CTX_set_psk_server_callback(SSL_CTX *ctx,\n                                     unsigned int (*psk_server_callback) (SSL\n                                                                          *ssl,\n                                                                          const\n                                                                          char\n                                                                          *identity,\n                                                                          unsigned\n                                                                          char\n                                                                          *psk,\n                                                                          unsigned\n                                                                          int\n                                                                          max_psk_len));\nvoid SSL_set_psk_server_callback(SSL *ssl,\n                                 unsigned int (*psk_server_callback) (SSL\n                                                                      *ssl,\n                                                                      const\n                                                                      char\n                                                                      *identity,\n                                                                      unsigned\n                                                                      char\n                                                                      *psk,\n                                                                      unsigned\n                                                                      int\n                                                                      max_psk_len));\nint SSL_CTX_use_psk_identity_hint(SSL_CTX *ctx, const char *identity_hint);\nint SSL_use_psk_identity_hint(SSL *s, const char *identity_hint);\nconst char *SSL_get_psk_identity_hint(const SSL *s);\nconst char *SSL_get_psk_identity(const SSL *s);\n# endif\n\n# define SSL_NOTHING     1\n# define SSL_WRITING     2\n# define SSL_READING     3\n# define SSL_X509_LOOKUP 4\n\n/* These will only be used when doing non-blocking IO */\n# define SSL_want_nothing(s)     (SSL_want(s) == SSL_NOTHING)\n# define SSL_want_read(s)        (SSL_want(s) == SSL_READING)\n# define SSL_want_write(s)       (SSL_want(s) == SSL_WRITING)\n# define SSL_want_x509_lookup(s) (SSL_want(s) == SSL_X509_LOOKUP)\n\n# define SSL_MAC_FLAG_READ_MAC_STREAM 1\n# define SSL_MAC_FLAG_WRITE_MAC_STREAM 2\n\n# ifndef OPENSSL_NO_SSL_INTERN\n\nstruct ssl_st {\n    /*\n     * protocol version (one of SSL2_VERSION, SSL3_VERSION, TLS1_VERSION,\n     * DTLS1_VERSION)\n     */\n    int version;\n    /* SSL_ST_CONNECT or SSL_ST_ACCEPT */\n    int type;\n    /* SSLv3 */\n    const SSL_METHOD *method;\n    /*\n     * There are 2 BIO's even though they are normally both the same.  This\n     * is so data can be read and written to different handlers\n     */\n#  ifndef OPENSSL_NO_BIO\n    /* used by SSL_read */\n    BIO *rbio;\n    /* used by SSL_write */\n    BIO *wbio;\n    /* used during session-id reuse to concatenate messages */\n    BIO *bbio;\n#  else\n    /* used by SSL_read */\n    char *rbio;\n    /* used by SSL_write */\n    char *wbio;\n    char *bbio;\n#  endif\n    /*\n     * This holds a variable that indicates what we were doing when a 0 or -1\n     * is returned.  This is needed for non-blocking IO so we know what\n     * request needs re-doing when in SSL_accept or SSL_connect\n     */\n    int rwstate;\n    /* true when we are actually in SSL_accept() or SSL_connect() */\n    int in_handshake;\n    int (*handshake_func) (SSL *);\n    /*\n     * Imagine that here's a boolean member \"init\" that is switched as soon\n     * as SSL_set_{accept/connect}_state is called for the first time, so\n     * that \"state\" and \"handshake_func\" are properly initialized.  But as\n     * handshake_func is == 0 until then, we use this test instead of an\n     * \"init\" member.\n     */\n    /* are we the server side? - mostly used by SSL_clear */\n    int server;\n    /*\n     * Generate a new session or reuse an old one.\n     * NB: For servers, the 'new' session may actually be a previously\n     * cached session or even the previous session unless\n     * SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION is set\n     */\n    int new_session;\n    /* don't send shutdown packets */\n    int quiet_shutdown;\n    /* we have shut things down, 0x01 sent, 0x02 for received */\n    int shutdown;\n    /* where we are */\n    int state;\n    /* where we are when reading */\n    int rstate;\n    BUF_MEM *init_buf;          /* buffer used during init */\n    void *init_msg;             /* pointer to handshake message body, set by\n                                 * ssl3_get_message() */\n    int init_num;               /* amount read/written */\n    int init_off;               /* amount read/written */\n    /* used internally to point at a raw packet */\n    unsigned char *packet;\n    unsigned int packet_length;\n    struct ssl2_state_st *s2;   /* SSLv2 variables */\n    struct ssl3_state_st *s3;   /* SSLv3 variables */\n    struct dtls1_state_st *d1;  /* DTLSv1 variables */\n    int read_ahead;             /* Read as many input bytes as possible (for\n                                 * non-blocking reads) */\n    /* callback that allows applications to peek at protocol messages */\n    void (*msg_callback) (int write_p, int version, int content_type,\n                          const void *buf, size_t len, SSL *ssl, void *arg);\n    void *msg_callback_arg;\n    int hit;                    /* reusing a previous session */\n    X509_VERIFY_PARAM *param;\n#  if 0\n    int purpose;                /* Purpose setting */\n    int trust;                  /* Trust setting */\n#  endif\n    /* crypto */\n    STACK_OF(SSL_CIPHER) *cipher_list;\n    STACK_OF(SSL_CIPHER) *cipher_list_by_id;\n    /*\n     * These are the ones being used, the ones in SSL_SESSION are the ones to\n     * be 'copied' into these ones\n     */\n    int mac_flags;\n    EVP_CIPHER_CTX *enc_read_ctx; /* cryptographic state */\n    EVP_MD_CTX *read_hash;      /* used for mac generation */\n#  ifndef OPENSSL_NO_COMP\n    COMP_CTX *expand;           /* uncompress */\n#  else\n    char *expand;\n#  endif\n    EVP_CIPHER_CTX *enc_write_ctx; /* cryptographic state */\n    EVP_MD_CTX *write_hash;     /* used for mac generation */\n#  ifndef OPENSSL_NO_COMP\n    COMP_CTX *compress;         /* compression */\n#  else\n    char *compress;\n#  endif\n    /* session info */\n    /* client cert? */\n    /* This is used to hold the server certificate used */\n    struct cert_st /* CERT */ *cert;\n    /*\n     * the session_id_context is used to ensure sessions are only reused in\n     * the appropriate context\n     */\n    unsigned int sid_ctx_length;\n    unsigned char sid_ctx[SSL_MAX_SID_CTX_LENGTH];\n    /* This can also be in the session once a session is established */\n    SSL_SESSION *session;\n    /* Default generate session ID callback. */\n    GEN_SESSION_CB generate_session_id;\n    /* Used in SSL2 and SSL3 */\n    /*\n     * 0 don't care about verify failure.\n     * 1 fail if verify fails\n     */\n    int verify_mode;\n    /* fail if callback returns 0 */\n    int (*verify_callback) (int ok, X509_STORE_CTX *ctx);\n    /* optional informational callback */\n    void (*info_callback) (const SSL *ssl, int type, int val);\n    /* error bytes to be written */\n    int error;\n    /* actual code */\n    int error_code;\n#  ifndef OPENSSL_NO_KRB5\n    /* Kerberos 5 context */\n    KSSL_CTX *kssl_ctx;\n#  endif                        /* OPENSSL_NO_KRB5 */\n#  ifndef OPENSSL_NO_PSK\n    unsigned int (*psk_client_callback) (SSL *ssl, const char *hint,\n                                         char *identity,\n                                         unsigned int max_identity_len,\n                                         unsigned char *psk,\n                                         unsigned int max_psk_len);\n    unsigned int (*psk_server_callback) (SSL *ssl, const char *identity,\n                                         unsigned char *psk,\n                                         unsigned int max_psk_len);\n#  endif\n    SSL_CTX *ctx;\n    /*\n     * set this flag to 1 and a sleep(1) is put into all SSL_read() and\n     * SSL_write() calls, good for nbio debuging :-)\n     */\n    int debug;\n    /* extra application data */\n    long verify_result;\n    CRYPTO_EX_DATA ex_data;\n    /* for server side, keep the list of CA_dn we can use */\n    STACK_OF(X509_NAME) *client_CA;\n    int references;\n    /* protocol behaviour */\n    unsigned long options;\n    /* API behaviour */\n    unsigned long mode;\n    long max_cert_list;\n    int first_packet;\n    /* what was passed, used for SSLv3/TLS rollback check */\n    int client_version;\n    unsigned int max_send_fragment;\n#  ifndef OPENSSL_NO_TLSEXT\n    /* TLS extension debug callback */\n    void (*tlsext_debug_cb) (SSL *s, int client_server, int type,\n                             unsigned char *data, int len, void *arg);\n    void *tlsext_debug_arg;\n    char *tlsext_hostname;\n    /*-\n     * no further mod of servername\n     * 0 : call the servername extension callback.\n     * 1 : prepare 2, allow last ack just after in server callback.\n     * 2 : don't call servername callback, no ack in server hello\n     */\n    int servername_done;\n    /* certificate status request info */\n    /* Status type or -1 if no status type */\n    int tlsext_status_type;\n    /* Expect OCSP CertificateStatus message */\n    int tlsext_status_expected;\n    /* OCSP status request only */\n    STACK_OF(OCSP_RESPID) *tlsext_ocsp_ids;\n    X509_EXTENSIONS *tlsext_ocsp_exts;\n    /* OCSP response received or to be sent */\n    unsigned char *tlsext_ocsp_resp;\n    int tlsext_ocsp_resplen;\n    /* RFC4507 session ticket expected to be received or sent */\n    int tlsext_ticket_expected;\n#   ifndef OPENSSL_NO_EC\n    size_t tlsext_ecpointformatlist_length;\n    /* our list */\n    unsigned char *tlsext_ecpointformatlist;\n    size_t tlsext_ellipticcurvelist_length;\n    /* our list */\n    unsigned char *tlsext_ellipticcurvelist;\n#   endif                       /* OPENSSL_NO_EC */\n    /*\n     * draft-rescorla-tls-opaque-prf-input-00.txt information to be used for\n     * handshakes\n     */\n    void *tlsext_opaque_prf_input;\n    size_t tlsext_opaque_prf_input_len;\n    /* TLS Session Ticket extension override */\n    TLS_SESSION_TICKET_EXT *tlsext_session_ticket;\n    /* TLS Session Ticket extension callback */\n    tls_session_ticket_ext_cb_fn tls_session_ticket_ext_cb;\n    void *tls_session_ticket_ext_cb_arg;\n    /* TLS pre-shared secret session resumption */\n    tls_session_secret_cb_fn tls_session_secret_cb;\n    void *tls_session_secret_cb_arg;\n    SSL_CTX *initial_ctx;       /* initial ctx, used to store sessions */\n#   ifndef OPENSSL_NO_NEXTPROTONEG\n    /*\n     * Next protocol negotiation. For the client, this is the protocol that\n     * we sent in NextProtocol and is set when handling ServerHello\n     * extensions. For a server, this is the client's selected_protocol from\n     * NextProtocol and is set when handling the NextProtocol message, before\n     * the Finished message.\n     */\n    unsigned char *next_proto_negotiated;\n    unsigned char next_proto_negotiated_len;\n#   endif\n#   define session_ctx initial_ctx\n    /* What we'll do */\n    STACK_OF(SRTP_PROTECTION_PROFILE) *srtp_profiles;\n    /* What's been chosen */\n    SRTP_PROTECTION_PROFILE *srtp_profile;\n        /*-\n         * Is use of the Heartbeat extension negotiated?\n         * 0: disabled\n         * 1: enabled\n         * 2: enabled, but not allowed to send Requests\n         */\n    unsigned int tlsext_heartbeat;\n    /* Indicates if a HeartbeatRequest is in flight */\n    unsigned int tlsext_hb_pending;\n    /* HeartbeatRequest sequence number */\n    unsigned int tlsext_hb_seq;\n#  else\n#   define session_ctx ctx\n#  endif                        /* OPENSSL_NO_TLSEXT */\n    /*-\n     * 1 if we are renegotiating.\n     * 2 if we are a server and are inside a handshake\n     * (i.e. not just sending a HelloRequest)\n     */\n    int renegotiate;\n#  ifndef OPENSSL_NO_SRP\n    /* ctx for SRP authentication */\n    SRP_CTX srp_ctx;\n#  endif\n};\n\n# endif\n\n#ifdef __cplusplus\n}\n#endif\n\n# include <openssl/ssl2.h>\n# include <openssl/ssl3.h>\n# include <openssl/tls1.h>      /* This is mostly sslv3 with a few tweaks */\n# include <openssl/dtls1.h>     /* Datagram TLS */\n# include <openssl/ssl23.h>\n# include <openssl/srtp.h>      /* Support for the use_srtp extension */\n\n#ifdef  __cplusplus\nextern \"C\" {\n#endif\n\n/* compatibility */\n# define SSL_set_app_data(s,arg)         (SSL_set_ex_data(s,0,(char *)arg))\n# define SSL_get_app_data(s)             (SSL_get_ex_data(s,0))\n# define SSL_SESSION_set_app_data(s,a)   (SSL_SESSION_set_ex_data(s,0,(char *)a))\n# define SSL_SESSION_get_app_data(s)     (SSL_SESSION_get_ex_data(s,0))\n# define SSL_CTX_get_app_data(ctx)       (SSL_CTX_get_ex_data(ctx,0))\n# define SSL_CTX_set_app_data(ctx,arg)   (SSL_CTX_set_ex_data(ctx,0,(char *)arg))\n\n/*\n * The following are the possible values for ssl->state are are used to\n * indicate where we are up to in the SSL connection establishment. The\n * macros that follow are about the only things you should need to use and\n * even then, only when using non-blocking IO. It can also be useful to work\n * out where you were when the connection failed\n */\n\n# define SSL_ST_CONNECT                  0x1000\n# define SSL_ST_ACCEPT                   0x2000\n# define SSL_ST_MASK                     0x0FFF\n# define SSL_ST_INIT                     (SSL_ST_CONNECT|SSL_ST_ACCEPT)\n# define SSL_ST_BEFORE                   0x4000\n# define SSL_ST_OK                       0x03\n# define SSL_ST_RENEGOTIATE              (0x04|SSL_ST_INIT)\n# define SSL_ST_ERR                      0x05\n\n# define SSL_CB_LOOP                     0x01\n# define SSL_CB_EXIT                     0x02\n# define SSL_CB_READ                     0x04\n# define SSL_CB_WRITE                    0x08\n# define SSL_CB_ALERT                    0x4000/* used in callback */\n# define SSL_CB_READ_ALERT               (SSL_CB_ALERT|SSL_CB_READ)\n# define SSL_CB_WRITE_ALERT              (SSL_CB_ALERT|SSL_CB_WRITE)\n# define SSL_CB_ACCEPT_LOOP              (SSL_ST_ACCEPT|SSL_CB_LOOP)\n# define SSL_CB_ACCEPT_EXIT              (SSL_ST_ACCEPT|SSL_CB_EXIT)\n# define SSL_CB_CONNECT_LOOP             (SSL_ST_CONNECT|SSL_CB_LOOP)\n# define SSL_CB_CONNECT_EXIT             (SSL_ST_CONNECT|SSL_CB_EXIT)\n# define SSL_CB_HANDSHAKE_START          0x10\n# define SSL_CB_HANDSHAKE_DONE           0x20\n\n/* Is the SSL_connection established? */\n# define SSL_get_state(a)                SSL_state(a)\n# define SSL_is_init_finished(a)         (SSL_state(a) == SSL_ST_OK)\n# define SSL_in_init(a)                  (SSL_state(a)&SSL_ST_INIT)\n# define SSL_in_before(a)                (SSL_state(a)&SSL_ST_BEFORE)\n# define SSL_in_connect_init(a)          (SSL_state(a)&SSL_ST_CONNECT)\n# define SSL_in_accept_init(a)           (SSL_state(a)&SSL_ST_ACCEPT)\n\n/*\n * The following 2 states are kept in ssl->rstate when reads fail, you should\n * not need these\n */\n# define SSL_ST_READ_HEADER                      0xF0\n# define SSL_ST_READ_BODY                        0xF1\n# define SSL_ST_READ_DONE                        0xF2\n\n/*-\n * Obtain latest Finished message\n *   -- that we sent (SSL_get_finished)\n *   -- that we expected from peer (SSL_get_peer_finished).\n * Returns length (0 == no Finished so far), copies up to 'count' bytes.\n */\nsize_t SSL_get_finished(const SSL *s, void *buf, size_t count);\nsize_t SSL_get_peer_finished(const SSL *s, void *buf, size_t count);\n\n/*\n * use either SSL_VERIFY_NONE or SSL_VERIFY_PEER, the last 2 options are\n * 'ored' with SSL_VERIFY_PEER if they are desired\n */\n# define SSL_VERIFY_NONE                 0x00\n# define SSL_VERIFY_PEER                 0x01\n# define SSL_VERIFY_FAIL_IF_NO_PEER_CERT 0x02\n# define SSL_VERIFY_CLIENT_ONCE          0x04\n\n# define OpenSSL_add_ssl_algorithms()    SSL_library_init()\n# define SSLeay_add_ssl_algorithms()     SSL_library_init()\n\n/* this is for backward compatibility */\n# if 0                          /* NEW_SSLEAY */\n#  define SSL_CTX_set_default_verify(a,b,c) SSL_CTX_set_verify(a,b,c)\n#  define SSL_set_pref_cipher(c,n)        SSL_set_cipher_list(c,n)\n#  define SSL_add_session(a,b)            SSL_CTX_add_session((a),(b))\n#  define SSL_remove_session(a,b)         SSL_CTX_remove_session((a),(b))\n#  define SSL_flush_sessions(a,b)         SSL_CTX_flush_sessions((a),(b))\n# endif\n/* More backward compatibility */\n# define SSL_get_cipher(s) \\\n                SSL_CIPHER_get_name(SSL_get_current_cipher(s))\n# define SSL_get_cipher_bits(s,np) \\\n                SSL_CIPHER_get_bits(SSL_get_current_cipher(s),np)\n# define SSL_get_cipher_version(s) \\\n                SSL_CIPHER_get_version(SSL_get_current_cipher(s))\n# define SSL_get_cipher_name(s) \\\n                SSL_CIPHER_get_name(SSL_get_current_cipher(s))\n# define SSL_get_time(a)         SSL_SESSION_get_time(a)\n# define SSL_set_time(a,b)       SSL_SESSION_set_time((a),(b))\n# define SSL_get_timeout(a)      SSL_SESSION_get_timeout(a)\n# define SSL_set_timeout(a,b)    SSL_SESSION_set_timeout((a),(b))\n\n# define d2i_SSL_SESSION_bio(bp,s_id) ASN1_d2i_bio_of(SSL_SESSION,SSL_SESSION_new,d2i_SSL_SESSION,bp,s_id)\n# define i2d_SSL_SESSION_bio(bp,s_id) ASN1_i2d_bio_of(SSL_SESSION,i2d_SSL_SESSION,bp,s_id)\n\nDECLARE_PEM_rw(SSL_SESSION, SSL_SESSION)\n# define SSL_AD_REASON_OFFSET            1000/* offset to get SSL_R_... value\n                                              * from SSL_AD_... */\n/* These alert types are for SSLv3 and TLSv1 */\n# define SSL_AD_CLOSE_NOTIFY             SSL3_AD_CLOSE_NOTIFY\n/* fatal */\n# define SSL_AD_UNEXPECTED_MESSAGE       SSL3_AD_UNEXPECTED_MESSAGE\n/* fatal */\n# define SSL_AD_BAD_RECORD_MAC           SSL3_AD_BAD_RECORD_MAC\n# define SSL_AD_DECRYPTION_FAILED        TLS1_AD_DECRYPTION_FAILED\n# define SSL_AD_RECORD_OVERFLOW          TLS1_AD_RECORD_OVERFLOW\n/* fatal */\n# define SSL_AD_DECOMPRESSION_FAILURE    SSL3_AD_DECOMPRESSION_FAILURE\n/* fatal */\n# define SSL_AD_HANDSHAKE_FAILURE        SSL3_AD_HANDSHAKE_FAILURE\n/* Not for TLS */\n# define SSL_AD_NO_CERTIFICATE           SSL3_AD_NO_CERTIFICATE\n# define SSL_AD_BAD_CERTIFICATE          SSL3_AD_BAD_CERTIFICATE\n# define SSL_AD_UNSUPPORTED_CERTIFICATE  SSL3_AD_UNSUPPORTED_CERTIFICATE\n# define SSL_AD_CERTIFICATE_REVOKED      SSL3_AD_CERTIFICATE_REVOKED\n# define SSL_AD_CERTIFICATE_EXPIRED      SSL3_AD_CERTIFICATE_EXPIRED\n# define SSL_AD_CERTIFICATE_UNKNOWN      SSL3_AD_CERTIFICATE_UNKNOWN\n/* fatal */\n# define SSL_AD_ILLEGAL_PARAMETER        SSL3_AD_ILLEGAL_PARAMETER\n/* fatal */\n# define SSL_AD_UNKNOWN_CA               TLS1_AD_UNKNOWN_CA\n/* fatal */\n# define SSL_AD_ACCESS_DENIED            TLS1_AD_ACCESS_DENIED\n/* fatal */\n# define SSL_AD_DECODE_ERROR             TLS1_AD_DECODE_ERROR\n# define SSL_AD_DECRYPT_ERROR            TLS1_AD_DECRYPT_ERROR\n/* fatal */\n# define SSL_AD_EXPORT_RESTRICTION       TLS1_AD_EXPORT_RESTRICTION\n/* fatal */\n# define SSL_AD_PROTOCOL_VERSION         TLS1_AD_PROTOCOL_VERSION\n/* fatal */\n# define SSL_AD_INSUFFICIENT_SECURITY    TLS1_AD_INSUFFICIENT_SECURITY\n/* fatal */\n# define SSL_AD_INTERNAL_ERROR           TLS1_AD_INTERNAL_ERROR\n# define SSL_AD_USER_CANCELLED           TLS1_AD_USER_CANCELLED\n# define SSL_AD_NO_RENEGOTIATION         TLS1_AD_NO_RENEGOTIATION\n# define SSL_AD_UNSUPPORTED_EXTENSION    TLS1_AD_UNSUPPORTED_EXTENSION\n# define SSL_AD_CERTIFICATE_UNOBTAINABLE TLS1_AD_CERTIFICATE_UNOBTAINABLE\n# define SSL_AD_UNRECOGNIZED_NAME        TLS1_AD_UNRECOGNIZED_NAME\n# define SSL_AD_BAD_CERTIFICATE_STATUS_RESPONSE TLS1_AD_BAD_CERTIFICATE_STATUS_RESPONSE\n# define SSL_AD_BAD_CERTIFICATE_HASH_VALUE TLS1_AD_BAD_CERTIFICATE_HASH_VALUE\n/* fatal */\n# define SSL_AD_UNKNOWN_PSK_IDENTITY     TLS1_AD_UNKNOWN_PSK_IDENTITY\n/* fatal */\n# define SSL_AD_INAPPROPRIATE_FALLBACK   TLS1_AD_INAPPROPRIATE_FALLBACK\n# define SSL_ERROR_NONE                  0\n# define SSL_ERROR_SSL                   1\n# define SSL_ERROR_WANT_READ             2\n# define SSL_ERROR_WANT_WRITE            3\n# define SSL_ERROR_WANT_X509_LOOKUP      4\n# define SSL_ERROR_SYSCALL               5/* look at error stack/return\n                                           * value/errno */\n# define SSL_ERROR_ZERO_RETURN           6\n# define SSL_ERROR_WANT_CONNECT          7\n# define SSL_ERROR_WANT_ACCEPT           8\n# define SSL_CTRL_NEED_TMP_RSA                   1\n# define SSL_CTRL_SET_TMP_RSA                    2\n# define SSL_CTRL_SET_TMP_DH                     3\n# define SSL_CTRL_SET_TMP_ECDH                   4\n# define SSL_CTRL_SET_TMP_RSA_CB                 5\n# define SSL_CTRL_SET_TMP_DH_CB                  6\n# define SSL_CTRL_SET_TMP_ECDH_CB                7\n# define SSL_CTRL_GET_SESSION_REUSED             8\n# define SSL_CTRL_GET_CLIENT_CERT_REQUEST        9\n# define SSL_CTRL_GET_NUM_RENEGOTIATIONS         10\n# define SSL_CTRL_CLEAR_NUM_RENEGOTIATIONS       11\n# define SSL_CTRL_GET_TOTAL_RENEGOTIATIONS       12\n# define SSL_CTRL_GET_FLAGS                      13\n# define SSL_CTRL_EXTRA_CHAIN_CERT               14\n# define SSL_CTRL_SET_MSG_CALLBACK               15\n# define SSL_CTRL_SET_MSG_CALLBACK_ARG           16\n/* only applies to datagram connections */\n# define SSL_CTRL_SET_MTU                17\n/* Stats */\n# define SSL_CTRL_SESS_NUMBER                    20\n# define SSL_CTRL_SESS_CONNECT                   21\n# define SSL_CTRL_SESS_CONNECT_GOOD              22\n# define SSL_CTRL_SESS_CONNECT_RENEGOTIATE       23\n# define SSL_CTRL_SESS_ACCEPT                    24\n# define SSL_CTRL_SESS_ACCEPT_GOOD               25\n# define SSL_CTRL_SESS_ACCEPT_RENEGOTIATE        26\n# define SSL_CTRL_SESS_HIT                       27\n# define SSL_CTRL_SESS_CB_HIT                    28\n# define SSL_CTRL_SESS_MISSES                    29\n# define SSL_CTRL_SESS_TIMEOUTS                  30\n# define SSL_CTRL_SESS_CACHE_FULL                31\n# define SSL_CTRL_OPTIONS                        32\n# define SSL_CTRL_MODE                           33\n# define SSL_CTRL_GET_READ_AHEAD                 40\n# define SSL_CTRL_SET_READ_AHEAD                 41\n# define SSL_CTRL_SET_SESS_CACHE_SIZE            42\n# define SSL_CTRL_GET_SESS_CACHE_SIZE            43\n# define SSL_CTRL_SET_SESS_CACHE_MODE            44\n# define SSL_CTRL_GET_SESS_CACHE_MODE            45\n# define SSL_CTRL_GET_MAX_CERT_LIST              50\n# define SSL_CTRL_SET_MAX_CERT_LIST              51\n# define SSL_CTRL_SET_MAX_SEND_FRAGMENT          52\n/* see tls1.h for macros based on these */\n# ifndef OPENSSL_NO_TLSEXT\n#  define SSL_CTRL_SET_TLSEXT_SERVERNAME_CB       53\n#  define SSL_CTRL_SET_TLSEXT_SERVERNAME_ARG      54\n#  define SSL_CTRL_SET_TLSEXT_HOSTNAME            55\n#  define SSL_CTRL_SET_TLSEXT_DEBUG_CB            56\n#  define SSL_CTRL_SET_TLSEXT_DEBUG_ARG           57\n#  define SSL_CTRL_GET_TLSEXT_TICKET_KEYS         58\n#  define SSL_CTRL_SET_TLSEXT_TICKET_KEYS         59\n#  define SSL_CTRL_SET_TLSEXT_OPAQUE_PRF_INPUT    60\n#  define SSL_CTRL_SET_TLSEXT_OPAQUE_PRF_INPUT_CB 61\n#  define SSL_CTRL_SET_TLSEXT_OPAQUE_PRF_INPUT_CB_ARG 62\n#  define SSL_CTRL_SET_TLSEXT_STATUS_REQ_CB       63\n#  define SSL_CTRL_SET_TLSEXT_STATUS_REQ_CB_ARG   64\n#  define SSL_CTRL_SET_TLSEXT_STATUS_REQ_TYPE     65\n#  define SSL_CTRL_GET_TLSEXT_STATUS_REQ_EXTS     66\n#  define SSL_CTRL_SET_TLSEXT_STATUS_REQ_EXTS     67\n#  define SSL_CTRL_GET_TLSEXT_STATUS_REQ_IDS      68\n#  define SSL_CTRL_SET_TLSEXT_STATUS_REQ_IDS      69\n#  define SSL_CTRL_GET_TLSEXT_STATUS_REQ_OCSP_RESP        70\n#  define SSL_CTRL_SET_TLSEXT_STATUS_REQ_OCSP_RESP        71\n#  define SSL_CTRL_SET_TLSEXT_TICKET_KEY_CB       72\n#  define SSL_CTRL_SET_TLS_EXT_SRP_USERNAME_CB    75\n#  define SSL_CTRL_SET_SRP_VERIFY_PARAM_CB                76\n#  define SSL_CTRL_SET_SRP_GIVE_CLIENT_PWD_CB             77\n#  define SSL_CTRL_SET_SRP_ARG            78\n#  define SSL_CTRL_SET_TLS_EXT_SRP_USERNAME               79\n#  define SSL_CTRL_SET_TLS_EXT_SRP_STRENGTH               80\n#  define SSL_CTRL_SET_TLS_EXT_SRP_PASSWORD               81\n#  ifndef OPENSSL_NO_HEARTBEATS\n#   define SSL_CTRL_TLS_EXT_SEND_HEARTBEAT                         85\n#   define SSL_CTRL_GET_TLS_EXT_HEARTBEAT_PENDING          86\n#   define SSL_CTRL_SET_TLS_EXT_HEARTBEAT_NO_REQUESTS      87\n#  endif\n# endif\n# define DTLS_CTRL_GET_TIMEOUT           73\n# define DTLS_CTRL_HANDLE_TIMEOUT        74\n# define DTLS_CTRL_LISTEN                        75\n# define SSL_CTRL_GET_RI_SUPPORT                 76\n# define SSL_CTRL_CLEAR_OPTIONS                  77\n# define SSL_CTRL_CLEAR_MODE                     78\n# define SSL_CTRL_GET_EXTRA_CHAIN_CERTS          82\n# define SSL_CTRL_CLEAR_EXTRA_CHAIN_CERTS        83\n# define SSL_CTRL_CHECK_PROTO_VERSION            119\n# define DTLS_CTRL_SET_LINK_MTU                  120\n# define DTLS_CTRL_GET_LINK_MIN_MTU              121\n# define DTLSv1_get_timeout(ssl, arg) \\\n        SSL_ctrl(ssl,DTLS_CTRL_GET_TIMEOUT,0, (void *)arg)\n# define DTLSv1_handle_timeout(ssl) \\\n        SSL_ctrl(ssl,DTLS_CTRL_HANDLE_TIMEOUT,0, NULL)\n# define DTLSv1_listen(ssl, peer) \\\n        SSL_ctrl(ssl,DTLS_CTRL_LISTEN,0, (void *)peer)\n# define SSL_session_reused(ssl) \\\n        SSL_ctrl((ssl),SSL_CTRL_GET_SESSION_REUSED,0,NULL)\n# define SSL_num_renegotiations(ssl) \\\n        SSL_ctrl((ssl),SSL_CTRL_GET_NUM_RENEGOTIATIONS,0,NULL)\n# define SSL_clear_num_renegotiations(ssl) \\\n        SSL_ctrl((ssl),SSL_CTRL_CLEAR_NUM_RENEGOTIATIONS,0,NULL)\n# define SSL_total_renegotiations(ssl) \\\n        SSL_ctrl((ssl),SSL_CTRL_GET_TOTAL_RENEGOTIATIONS,0,NULL)\n# define SSL_CTX_need_tmp_RSA(ctx) \\\n        SSL_CTX_ctrl(ctx,SSL_CTRL_NEED_TMP_RSA,0,NULL)\n# define SSL_CTX_set_tmp_rsa(ctx,rsa) \\\n        SSL_CTX_ctrl(ctx,SSL_CTRL_SET_TMP_RSA,0,(char *)rsa)\n# define SSL_CTX_set_tmp_dh(ctx,dh) \\\n        SSL_CTX_ctrl(ctx,SSL_CTRL_SET_TMP_DH,0,(char *)dh)\n# define SSL_CTX_set_tmp_ecdh(ctx,ecdh) \\\n        SSL_CTX_ctrl(ctx,SSL_CTRL_SET_TMP_ECDH,0,(char *)ecdh)\n# define SSL_need_tmp_RSA(ssl) \\\n        SSL_ctrl(ssl,SSL_CTRL_NEED_TMP_RSA,0,NULL)\n# define SSL_set_tmp_rsa(ssl,rsa) \\\n        SSL_ctrl(ssl,SSL_CTRL_SET_TMP_RSA,0,(char *)rsa)\n# define SSL_set_tmp_dh(ssl,dh) \\\n        SSL_ctrl(ssl,SSL_CTRL_SET_TMP_DH,0,(char *)dh)\n# define SSL_set_tmp_ecdh(ssl,ecdh) \\\n        SSL_ctrl(ssl,SSL_CTRL_SET_TMP_ECDH,0,(char *)ecdh)\n# define SSL_CTX_add_extra_chain_cert(ctx,x509) \\\n        SSL_CTX_ctrl(ctx,SSL_CTRL_EXTRA_CHAIN_CERT,0,(char *)x509)\n# define SSL_CTX_get_extra_chain_certs(ctx,px509) \\\n        SSL_CTX_ctrl(ctx,SSL_CTRL_GET_EXTRA_CHAIN_CERTS,0,px509)\n# define SSL_CTX_clear_extra_chain_certs(ctx) \\\n        SSL_CTX_ctrl(ctx,SSL_CTRL_CLEAR_EXTRA_CHAIN_CERTS,0,NULL)\n# ifndef OPENSSL_NO_BIO\nBIO_METHOD *BIO_f_ssl(void);\nBIO *BIO_new_ssl(SSL_CTX *ctx, int client);\nBIO *BIO_new_ssl_connect(SSL_CTX *ctx);\nBIO *BIO_new_buffer_ssl_connect(SSL_CTX *ctx);\nint BIO_ssl_copy_session_id(BIO *to, BIO *from);\nvoid BIO_ssl_shutdown(BIO *ssl_bio);\n\n# endif\n\nint SSL_CTX_set_cipher_list(SSL_CTX *, const char *str);\nSSL_CTX *SSL_CTX_new(const SSL_METHOD *meth);\nvoid SSL_CTX_free(SSL_CTX *);\nlong SSL_CTX_set_timeout(SSL_CTX *ctx, long t);\nlong SSL_CTX_get_timeout(const SSL_CTX *ctx);\nX509_STORE *SSL_CTX_get_cert_store(const SSL_CTX *);\nvoid SSL_CTX_set_cert_store(SSL_CTX *, X509_STORE *);\nint SSL_want(const SSL *s);\nint SSL_clear(SSL *s);\n\nvoid SSL_CTX_flush_sessions(SSL_CTX *ctx, long tm);\n\nconst SSL_CIPHER *SSL_get_current_cipher(const SSL *s);\nint SSL_CIPHER_get_bits(const SSL_CIPHER *c, int *alg_bits);\nchar *SSL_CIPHER_get_version(const SSL_CIPHER *c);\nconst char *SSL_CIPHER_get_name(const SSL_CIPHER *c);\nunsigned long SSL_CIPHER_get_id(const SSL_CIPHER *c);\n\nint SSL_get_fd(const SSL *s);\nint SSL_get_rfd(const SSL *s);\nint SSL_get_wfd(const SSL *s);\nconst char *SSL_get_cipher_list(const SSL *s, int n);\nchar *SSL_get_shared_ciphers(const SSL *s, char *buf, int len);\nint SSL_get_read_ahead(const SSL *s);\nint SSL_pending(const SSL *s);\n# ifndef OPENSSL_NO_SOCK\nint SSL_set_fd(SSL *s, int fd);\nint SSL_set_rfd(SSL *s, int fd);\nint SSL_set_wfd(SSL *s, int fd);\n# endif\n# ifndef OPENSSL_NO_BIO\nvoid SSL_set_bio(SSL *s, BIO *rbio, BIO *wbio);\nBIO *SSL_get_rbio(const SSL *s);\nBIO *SSL_get_wbio(const SSL *s);\n# endif\nint SSL_set_cipher_list(SSL *s, const char *str);\nvoid SSL_set_read_ahead(SSL *s, int yes);\nint SSL_get_verify_mode(const SSL *s);\nint SSL_get_verify_depth(const SSL *s);\nint (*SSL_get_verify_callback(const SSL *s)) (int, X509_STORE_CTX *);\nvoid SSL_set_verify(SSL *s, int mode,\n                    int (*callback) (int ok, X509_STORE_CTX *ctx));\nvoid SSL_set_verify_depth(SSL *s, int depth);\n# ifndef OPENSSL_NO_RSA\nint SSL_use_RSAPrivateKey(SSL *ssl, RSA *rsa);\n# endif\nint SSL_use_RSAPrivateKey_ASN1(SSL *ssl, unsigned char *d, long len);\nint SSL_use_PrivateKey(SSL *ssl, EVP_PKEY *pkey);\nint SSL_use_PrivateKey_ASN1(int pk, SSL *ssl, const unsigned char *d,\n                            long len);\nint SSL_use_certificate(SSL *ssl, X509 *x);\nint SSL_use_certificate_ASN1(SSL *ssl, const unsigned char *d, int len);\n\n# ifndef OPENSSL_NO_STDIO\nint SSL_use_RSAPrivateKey_file(SSL *ssl, const char *file, int type);\nint SSL_use_PrivateKey_file(SSL *ssl, const char *file, int type);\nint SSL_use_certificate_file(SSL *ssl, const char *file, int type);\nint SSL_CTX_use_RSAPrivateKey_file(SSL_CTX *ctx, const char *file, int type);\nint SSL_CTX_use_PrivateKey_file(SSL_CTX *ctx, const char *file, int type);\nint SSL_CTX_use_certificate_file(SSL_CTX *ctx, const char *file, int type);\n/* PEM type */\nint SSL_CTX_use_certificate_chain_file(SSL_CTX *ctx, const char *file);\nSTACK_OF(X509_NAME) *SSL_load_client_CA_file(const char *file);\nint SSL_add_file_cert_subjects_to_stack(STACK_OF(X509_NAME) *stackCAs,\n                                        const char *file);\n#  ifndef OPENSSL_SYS_VMS\n/* XXXXX: Better scheme needed! [was: #ifndef MAC_OS_pre_X] */\n#   ifndef OPENSSL_SYS_MACINTOSH_CLASSIC\nint SSL_add_dir_cert_subjects_to_stack(STACK_OF(X509_NAME) *stackCAs,\n                                       const char *dir);\n#   endif\n#  endif\n\n# endif\n\nvoid SSL_load_error_strings(void);\nconst char *SSL_state_string(const SSL *s);\nconst char *SSL_rstate_string(const SSL *s);\nconst char *SSL_state_string_long(const SSL *s);\nconst char *SSL_rstate_string_long(const SSL *s);\nlong SSL_SESSION_get_time(const SSL_SESSION *s);\nlong SSL_SESSION_set_time(SSL_SESSION *s, long t);\nlong SSL_SESSION_get_timeout(const SSL_SESSION *s);\nlong SSL_SESSION_set_timeout(SSL_SESSION *s, long t);\nvoid SSL_copy_session_id(SSL *to, const SSL *from);\nX509 *SSL_SESSION_get0_peer(SSL_SESSION *s);\nint SSL_SESSION_set1_id_context(SSL_SESSION *s, const unsigned char *sid_ctx,\n                                unsigned int sid_ctx_len);\n\nSSL_SESSION *SSL_SESSION_new(void);\nconst unsigned char *SSL_SESSION_get_id(const SSL_SESSION *s,\n                                        unsigned int *len);\nunsigned int SSL_SESSION_get_compress_id(const SSL_SESSION *s);\n# ifndef OPENSSL_NO_FP_API\nint SSL_SESSION_print_fp(FILE *fp, const SSL_SESSION *ses);\n# endif\n# ifndef OPENSSL_NO_BIO\nint SSL_SESSION_print(BIO *fp, const SSL_SESSION *ses);\n# endif\nvoid SSL_SESSION_free(SSL_SESSION *ses);\nint i2d_SSL_SESSION(SSL_SESSION *in, unsigned char **pp);\nint SSL_set_session(SSL *to, SSL_SESSION *session);\nint SSL_CTX_add_session(SSL_CTX *s, SSL_SESSION *c);\nint SSL_CTX_remove_session(SSL_CTX *, SSL_SESSION *c);\nint SSL_CTX_set_generate_session_id(SSL_CTX *, GEN_SESSION_CB);\nint SSL_set_generate_session_id(SSL *, GEN_SESSION_CB);\nint SSL_has_matching_session_id(const SSL *ssl, const unsigned char *id,\n                                unsigned int id_len);\nSSL_SESSION *d2i_SSL_SESSION(SSL_SESSION **a, const unsigned char **pp,\n                             long length);\n\n# ifdef HEADER_X509_H\nX509 *SSL_get_peer_certificate(const SSL *s);\n# endif\n\nSTACK_OF(X509) *SSL_get_peer_cert_chain(const SSL *s);\n\nint SSL_CTX_get_verify_mode(const SSL_CTX *ctx);\nint SSL_CTX_get_verify_depth(const SSL_CTX *ctx);\nint (*SSL_CTX_get_verify_callback(const SSL_CTX *ctx)) (int,\n                                                        X509_STORE_CTX *);\nvoid SSL_CTX_set_verify(SSL_CTX *ctx, int mode,\n                        int (*callback) (int, X509_STORE_CTX *));\nvoid SSL_CTX_set_verify_depth(SSL_CTX *ctx, int depth);\nvoid SSL_CTX_set_cert_verify_callback(SSL_CTX *ctx,\n                                      int (*cb) (X509_STORE_CTX *, void *),\n                                      void *arg);\n# ifndef OPENSSL_NO_RSA\nint SSL_CTX_use_RSAPrivateKey(SSL_CTX *ctx, RSA *rsa);\n# endif\nint SSL_CTX_use_RSAPrivateKey_ASN1(SSL_CTX *ctx, const unsigned char *d,\n                                   long len);\nint SSL_CTX_use_PrivateKey(SSL_CTX *ctx, EVP_PKEY *pkey);\nint SSL_CTX_use_PrivateKey_ASN1(int pk, SSL_CTX *ctx,\n                                const unsigned char *d, long len);\nint SSL_CTX_use_certificate(SSL_CTX *ctx, X509 *x);\nint SSL_CTX_use_certificate_ASN1(SSL_CTX *ctx, int len,\n                                 const unsigned char *d);\n\nvoid SSL_CTX_set_default_passwd_cb(SSL_CTX *ctx, pem_password_cb *cb);\nvoid SSL_CTX_set_default_passwd_cb_userdata(SSL_CTX *ctx, void *u);\n\nint SSL_CTX_check_private_key(const SSL_CTX *ctx);\nint SSL_check_private_key(const SSL *ctx);\n\nint SSL_CTX_set_session_id_context(SSL_CTX *ctx, const unsigned char *sid_ctx,\n                                   unsigned int sid_ctx_len);\n\nSSL *SSL_new(SSL_CTX *ctx);\nint SSL_set_session_id_context(SSL *ssl, const unsigned char *sid_ctx,\n                               unsigned int sid_ctx_len);\n\nint SSL_CTX_set_purpose(SSL_CTX *s, int purpose);\nint SSL_set_purpose(SSL *s, int purpose);\nint SSL_CTX_set_trust(SSL_CTX *s, int trust);\nint SSL_set_trust(SSL *s, int trust);\n\nint SSL_CTX_set1_param(SSL_CTX *ctx, X509_VERIFY_PARAM *vpm);\nint SSL_set1_param(SSL *ssl, X509_VERIFY_PARAM *vpm);\n\n# ifndef OPENSSL_NO_SRP\nint SSL_CTX_set_srp_username(SSL_CTX *ctx, char *name);\nint SSL_CTX_set_srp_password(SSL_CTX *ctx, char *password);\nint SSL_CTX_set_srp_strength(SSL_CTX *ctx, int strength);\nint SSL_CTX_set_srp_client_pwd_callback(SSL_CTX *ctx,\n                                        char *(*cb) (SSL *, void *));\nint SSL_CTX_set_srp_verify_param_callback(SSL_CTX *ctx,\n                                          int (*cb) (SSL *, void *));\nint SSL_CTX_set_srp_username_callback(SSL_CTX *ctx,\n                                      int (*cb) (SSL *, int *, void *));\nint SSL_CTX_set_srp_cb_arg(SSL_CTX *ctx, void *arg);\n\nint SSL_set_srp_server_param(SSL *s, const BIGNUM *N, const BIGNUM *g,\n                             BIGNUM *sa, BIGNUM *v, char *info);\nint SSL_set_srp_server_param_pw(SSL *s, const char *user, const char *pass,\n                                const char *grp);\n\nBIGNUM *SSL_get_srp_g(SSL *s);\nBIGNUM *SSL_get_srp_N(SSL *s);\n\nchar *SSL_get_srp_username(SSL *s);\nchar *SSL_get_srp_userinfo(SSL *s);\n# endif\n\nvoid SSL_free(SSL *ssl);\nint SSL_accept(SSL *ssl);\nint SSL_connect(SSL *ssl);\nint SSL_read(SSL *ssl, void *buf, int num);\nint SSL_peek(SSL *ssl, void *buf, int num);\nint SSL_write(SSL *ssl, const void *buf, int num);\nlong SSL_ctrl(SSL *ssl, int cmd, long larg, void *parg);\nlong SSL_callback_ctrl(SSL *, int, void (*)(void));\nlong SSL_CTX_ctrl(SSL_CTX *ctx, int cmd, long larg, void *parg);\nlong SSL_CTX_callback_ctrl(SSL_CTX *, int, void (*)(void));\n\nint SSL_get_error(const SSL *s, int ret_code);\nconst char *SSL_get_version(const SSL *s);\n\n/* This sets the 'default' SSL version that SSL_new() will create */\nint SSL_CTX_set_ssl_version(SSL_CTX *ctx, const SSL_METHOD *meth);\n\n# ifndef OPENSSL_NO_SSL2\nconst SSL_METHOD *SSLv2_method(void); /* SSLv2 */\nconst SSL_METHOD *SSLv2_server_method(void); /* SSLv2 */\nconst SSL_METHOD *SSLv2_client_method(void); /* SSLv2 */\n# endif\n\n# ifndef OPENSSL_NO_SSL3_METHOD\nconst SSL_METHOD *SSLv3_method(void); /* SSLv3 */\nconst SSL_METHOD *SSLv3_server_method(void); /* SSLv3 */\nconst SSL_METHOD *SSLv3_client_method(void); /* SSLv3 */\n# endif\n\nconst SSL_METHOD *SSLv23_method(void); /* Negotiate highest available SSL/TLS\n                                        * version */\nconst SSL_METHOD *SSLv23_server_method(void); /* Negotiate highest available\n                                               * SSL/TLS version */\nconst SSL_METHOD *SSLv23_client_method(void); /* Negotiate highest available\n                                               * SSL/TLS version */\n\nconst SSL_METHOD *TLSv1_method(void); /* TLSv1.0 */\nconst SSL_METHOD *TLSv1_server_method(void); /* TLSv1.0 */\nconst SSL_METHOD *TLSv1_client_method(void); /* TLSv1.0 */\n\nconst SSL_METHOD *TLSv1_1_method(void); /* TLSv1.1 */\nconst SSL_METHOD *TLSv1_1_server_method(void); /* TLSv1.1 */\nconst SSL_METHOD *TLSv1_1_client_method(void); /* TLSv1.1 */\n\nconst SSL_METHOD *TLSv1_2_method(void); /* TLSv1.2 */\nconst SSL_METHOD *TLSv1_2_server_method(void); /* TLSv1.2 */\nconst SSL_METHOD *TLSv1_2_client_method(void); /* TLSv1.2 */\n\nconst SSL_METHOD *DTLSv1_method(void); /* DTLSv1.0 */\nconst SSL_METHOD *DTLSv1_server_method(void); /* DTLSv1.0 */\nconst SSL_METHOD *DTLSv1_client_method(void); /* DTLSv1.0 */\n\nSTACK_OF(SSL_CIPHER) *SSL_get_ciphers(const SSL *s);\n\nint SSL_do_handshake(SSL *s);\nint SSL_renegotiate(SSL *s);\nint SSL_renegotiate_abbreviated(SSL *s);\nint SSL_renegotiate_pending(SSL *s);\nint SSL_shutdown(SSL *s);\n\nconst SSL_METHOD *SSL_get_ssl_method(SSL *s);\nint SSL_set_ssl_method(SSL *s, const SSL_METHOD *method);\nconst char *SSL_alert_type_string_long(int value);\nconst char *SSL_alert_type_string(int value);\nconst char *SSL_alert_desc_string_long(int value);\nconst char *SSL_alert_desc_string(int value);\n\nvoid SSL_set_client_CA_list(SSL *s, STACK_OF(X509_NAME) *name_list);\nvoid SSL_CTX_set_client_CA_list(SSL_CTX *ctx, STACK_OF(X509_NAME) *name_list);\nSTACK_OF(X509_NAME) *SSL_get_client_CA_list(const SSL *s);\nSTACK_OF(X509_NAME) *SSL_CTX_get_client_CA_list(const SSL_CTX *s);\nint SSL_add_client_CA(SSL *ssl, X509 *x);\nint SSL_CTX_add_client_CA(SSL_CTX *ctx, X509 *x);\n\nvoid SSL_set_connect_state(SSL *s);\nvoid SSL_set_accept_state(SSL *s);\n\nlong SSL_get_default_timeout(const SSL *s);\n\nint SSL_library_init(void);\n\nchar *SSL_CIPHER_description(const SSL_CIPHER *, char *buf, int size);\nSTACK_OF(X509_NAME) *SSL_dup_CA_list(STACK_OF(X509_NAME) *sk);\n\nSSL *SSL_dup(SSL *ssl);\n\nX509 *SSL_get_certificate(const SSL *ssl);\n/*\n * EVP_PKEY\n */ struct evp_pkey_st *SSL_get_privatekey(SSL *ssl);\n\nvoid SSL_CTX_set_quiet_shutdown(SSL_CTX *ctx, int mode);\nint SSL_CTX_get_quiet_shutdown(const SSL_CTX *ctx);\nvoid SSL_set_quiet_shutdown(SSL *ssl, int mode);\nint SSL_get_quiet_shutdown(const SSL *ssl);\nvoid SSL_set_shutdown(SSL *ssl, int mode);\nint SSL_get_shutdown(const SSL *ssl);\nint SSL_version(const SSL *ssl);\nint SSL_CTX_set_default_verify_paths(SSL_CTX *ctx);\nint SSL_CTX_load_verify_locations(SSL_CTX *ctx, const char *CAfile,\n                                  const char *CApath);\n# define SSL_get0_session SSL_get_session/* just peek at pointer */\nSSL_SESSION *SSL_get_session(const SSL *ssl);\nSSL_SESSION *SSL_get1_session(SSL *ssl); /* obtain a reference count */\nSSL_CTX *SSL_get_SSL_CTX(const SSL *ssl);\nSSL_CTX *SSL_set_SSL_CTX(SSL *ssl, SSL_CTX *ctx);\nvoid SSL_set_info_callback(SSL *ssl,\n                           void (*cb) (const SSL *ssl, int type, int val));\nvoid (*SSL_get_info_callback(const SSL *ssl)) (const SSL *ssl, int type,\n                                               int val);\nint SSL_state(const SSL *ssl);\nvoid SSL_set_state(SSL *ssl, int state);\n\nvoid SSL_set_verify_result(SSL *ssl, long v);\nlong SSL_get_verify_result(const SSL *ssl);\n\nint SSL_set_ex_data(SSL *ssl, int idx, void *data);\nvoid *SSL_get_ex_data(const SSL *ssl, int idx);\nint SSL_get_ex_new_index(long argl, void *argp, CRYPTO_EX_new *new_func,\n                         CRYPTO_EX_dup *dup_func, CRYPTO_EX_free *free_func);\n\nint SSL_SESSION_set_ex_data(SSL_SESSION *ss, int idx, void *data);\nvoid *SSL_SESSION_get_ex_data(const SSL_SESSION *ss, int idx);\nint SSL_SESSION_get_ex_new_index(long argl, void *argp,\n                                 CRYPTO_EX_new *new_func,\n                                 CRYPTO_EX_dup *dup_func,\n                                 CRYPTO_EX_free *free_func);\n\nint SSL_CTX_set_ex_data(SSL_CTX *ssl, int idx, void *data);\nvoid *SSL_CTX_get_ex_data(const SSL_CTX *ssl, int idx);\nint SSL_CTX_get_ex_new_index(long argl, void *argp, CRYPTO_EX_new *new_func,\n                             CRYPTO_EX_dup *dup_func,\n                             CRYPTO_EX_free *free_func);\n\nint SSL_get_ex_data_X509_STORE_CTX_idx(void);\n\n# define SSL_CTX_sess_set_cache_size(ctx,t) \\\n        SSL_CTX_ctrl(ctx,SSL_CTRL_SET_SESS_CACHE_SIZE,t,NULL)\n# define SSL_CTX_sess_get_cache_size(ctx) \\\n        SSL_CTX_ctrl(ctx,SSL_CTRL_GET_SESS_CACHE_SIZE,0,NULL)\n# define SSL_CTX_set_session_cache_mode(ctx,m) \\\n        SSL_CTX_ctrl(ctx,SSL_CTRL_SET_SESS_CACHE_MODE,m,NULL)\n# define SSL_CTX_get_session_cache_mode(ctx) \\\n        SSL_CTX_ctrl(ctx,SSL_CTRL_GET_SESS_CACHE_MODE,0,NULL)\n\n# define SSL_CTX_get_default_read_ahead(ctx) SSL_CTX_get_read_ahead(ctx)\n# define SSL_CTX_set_default_read_ahead(ctx,m) SSL_CTX_set_read_ahead(ctx,m)\n# define SSL_CTX_get_read_ahead(ctx) \\\n        SSL_CTX_ctrl(ctx,SSL_CTRL_GET_READ_AHEAD,0,NULL)\n# define SSL_CTX_set_read_ahead(ctx,m) \\\n        SSL_CTX_ctrl(ctx,SSL_CTRL_SET_READ_AHEAD,m,NULL)\n# define SSL_CTX_get_max_cert_list(ctx) \\\n        SSL_CTX_ctrl(ctx,SSL_CTRL_GET_MAX_CERT_LIST,0,NULL)\n# define SSL_CTX_set_max_cert_list(ctx,m) \\\n        SSL_CTX_ctrl(ctx,SSL_CTRL_SET_MAX_CERT_LIST,m,NULL)\n# define SSL_get_max_cert_list(ssl) \\\n        SSL_ctrl(ssl,SSL_CTRL_GET_MAX_CERT_LIST,0,NULL)\n# define SSL_set_max_cert_list(ssl,m) \\\n        SSL_ctrl(ssl,SSL_CTRL_SET_MAX_CERT_LIST,m,NULL)\n\n# define SSL_CTX_set_max_send_fragment(ctx,m) \\\n        SSL_CTX_ctrl(ctx,SSL_CTRL_SET_MAX_SEND_FRAGMENT,m,NULL)\n# define SSL_set_max_send_fragment(ssl,m) \\\n        SSL_ctrl(ssl,SSL_CTRL_SET_MAX_SEND_FRAGMENT,m,NULL)\n\n     /* NB: the keylength is only applicable when is_export is true */\n# ifndef OPENSSL_NO_RSA\nvoid SSL_CTX_set_tmp_rsa_callback(SSL_CTX *ctx,\n                                  RSA *(*cb) (SSL *ssl, int is_export,\n                                              int keylength));\n\nvoid SSL_set_tmp_rsa_callback(SSL *ssl,\n                              RSA *(*cb) (SSL *ssl, int is_export,\n                                          int keylength));\n# endif\n# ifndef OPENSSL_NO_DH\nvoid SSL_CTX_set_tmp_dh_callback(SSL_CTX *ctx,\n                                 DH *(*dh) (SSL *ssl, int is_export,\n                                            int keylength));\nvoid SSL_set_tmp_dh_callback(SSL *ssl,\n                             DH *(*dh) (SSL *ssl, int is_export,\n                                        int keylength));\n# endif\n# ifndef OPENSSL_NO_ECDH\nvoid SSL_CTX_set_tmp_ecdh_callback(SSL_CTX *ctx,\n                                   EC_KEY *(*ecdh) (SSL *ssl, int is_export,\n                                                    int keylength));\nvoid SSL_set_tmp_ecdh_callback(SSL *ssl,\n                               EC_KEY *(*ecdh) (SSL *ssl, int is_export,\n                                                int keylength));\n# endif\n\n# ifndef OPENSSL_NO_COMP\nconst COMP_METHOD *SSL_get_current_compression(SSL *s);\nconst COMP_METHOD *SSL_get_current_expansion(SSL *s);\nconst char *SSL_COMP_get_name(const COMP_METHOD *comp);\nSTACK_OF(SSL_COMP) *SSL_COMP_get_compression_methods(void);\nint SSL_COMP_add_compression_method(int id, COMP_METHOD *cm);\n# else\nconst void *SSL_get_current_compression(SSL *s);\nconst void *SSL_get_current_expansion(SSL *s);\nconst char *SSL_COMP_get_name(const void *comp);\nvoid *SSL_COMP_get_compression_methods(void);\nint SSL_COMP_add_compression_method(int id, void *cm);\n# endif\n\n/* TLS extensions functions */\nint SSL_set_session_ticket_ext(SSL *s, void *ext_data, int ext_len);\n\nint SSL_set_session_ticket_ext_cb(SSL *s, tls_session_ticket_ext_cb_fn cb,\n                                  void *arg);\n\n/* Pre-shared secret session resumption functions */\nint SSL_set_session_secret_cb(SSL *s,\n                              tls_session_secret_cb_fn tls_session_secret_cb,\n                              void *arg);\n\nvoid SSL_set_debug(SSL *s, int debug);\nint SSL_cache_hit(SSL *s);\n\n# ifndef OPENSSL_NO_UNIT_TEST\nconst struct openssl_ssl_test_functions *SSL_test_functions(void);\n# endif\n\n/* BEGIN ERROR CODES */\n/*\n * The following lines are auto generated by the script mkerr.pl. Any changes\n * made after this point may be overwritten when the script is next run.\n */\nvoid ERR_load_SSL_strings(void);\n\n/* Error codes for the SSL functions. */\n\n/* Function codes. */\n# define SSL_F_CLIENT_CERTIFICATE                         100\n# define SSL_F_CLIENT_FINISHED                            167\n# define SSL_F_CLIENT_HELLO                               101\n# define SSL_F_CLIENT_MASTER_KEY                          102\n# define SSL_F_D2I_SSL_SESSION                            103\n# define SSL_F_DO_DTLS1_WRITE                             245\n# define SSL_F_DO_SSL3_WRITE                              104\n# define SSL_F_DTLS1_ACCEPT                               246\n# define SSL_F_DTLS1_ADD_CERT_TO_BUF                      295\n# define SSL_F_DTLS1_BUFFER_RECORD                        247\n# define SSL_F_DTLS1_CHECK_TIMEOUT_NUM                    316\n# define SSL_F_DTLS1_CLIENT_HELLO                         248\n# define SSL_F_DTLS1_CONNECT                              249\n# define SSL_F_DTLS1_ENC                                  250\n# define SSL_F_DTLS1_GET_HELLO_VERIFY                     251\n# define SSL_F_DTLS1_GET_MESSAGE                          252\n# define SSL_F_DTLS1_GET_MESSAGE_FRAGMENT                 253\n# define SSL_F_DTLS1_GET_RECORD                           254\n# define SSL_F_DTLS1_HANDLE_TIMEOUT                       297\n# define SSL_F_DTLS1_HEARTBEAT                            305\n# define SSL_F_DTLS1_OUTPUT_CERT_CHAIN                    255\n# define SSL_F_DTLS1_PREPROCESS_FRAGMENT                  288\n# define SSL_F_DTLS1_PROCESS_OUT_OF_SEQ_MESSAGE           256\n# define SSL_F_DTLS1_PROCESS_RECORD                       257\n# define SSL_F_DTLS1_READ_BYTES                           258\n# define SSL_F_DTLS1_READ_FAILED                          259\n# define SSL_F_DTLS1_SEND_CERTIFICATE_REQUEST             260\n# define SSL_F_DTLS1_SEND_CLIENT_CERTIFICATE              261\n# define SSL_F_DTLS1_SEND_CLIENT_KEY_EXCHANGE             262\n# define SSL_F_DTLS1_SEND_CLIENT_VERIFY                   263\n# define SSL_F_DTLS1_SEND_HELLO_VERIFY_REQUEST            264\n# define SSL_F_DTLS1_SEND_SERVER_CERTIFICATE              265\n# define SSL_F_DTLS1_SEND_SERVER_HELLO                    266\n# define SSL_F_DTLS1_SEND_SERVER_KEY_EXCHANGE             267\n# define SSL_F_DTLS1_WRITE_APP_DATA_BYTES                 268\n# define SSL_F_GET_CLIENT_FINISHED                        105\n# define SSL_F_GET_CLIENT_HELLO                           106\n# define SSL_F_GET_CLIENT_MASTER_KEY                      107\n# define SSL_F_GET_SERVER_FINISHED                        108\n# define SSL_F_GET_SERVER_HELLO                           109\n# define SSL_F_GET_SERVER_VERIFY                          110\n# define SSL_F_I2D_SSL_SESSION                            111\n# define SSL_F_READ_N                                     112\n# define SSL_F_REQUEST_CERTIFICATE                        113\n# define SSL_F_SERVER_FINISH                              239\n# define SSL_F_SERVER_HELLO                               114\n# define SSL_F_SERVER_VERIFY                              240\n# define SSL_F_SSL23_ACCEPT                               115\n# define SSL_F_SSL23_CLIENT_HELLO                         116\n# define SSL_F_SSL23_CONNECT                              117\n# define SSL_F_SSL23_GET_CLIENT_HELLO                     118\n# define SSL_F_SSL23_GET_SERVER_HELLO                     119\n# define SSL_F_SSL23_PEEK                                 237\n# define SSL_F_SSL23_READ                                 120\n# define SSL_F_SSL23_WRITE                                121\n# define SSL_F_SSL2_ACCEPT                                122\n# define SSL_F_SSL2_CONNECT                               123\n# define SSL_F_SSL2_ENC_INIT                              124\n# define SSL_F_SSL2_GENERATE_KEY_MATERIAL                 241\n# define SSL_F_SSL2_PEEK                                  234\n# define SSL_F_SSL2_READ                                  125\n# define SSL_F_SSL2_READ_INTERNAL                         236\n# define SSL_F_SSL2_SET_CERTIFICATE                       126\n# define SSL_F_SSL2_WRITE                                 127\n# define SSL_F_SSL3_ACCEPT                                128\n# define SSL_F_SSL3_ADD_CERT_TO_BUF                       296\n# define SSL_F_SSL3_CALLBACK_CTRL                         233\n# define SSL_F_SSL3_CHANGE_CIPHER_STATE                   129\n# define SSL_F_SSL3_CHECK_CERT_AND_ALGORITHM              130\n# define SSL_F_SSL3_CHECK_CLIENT_HELLO                    304\n# define SSL_F_SSL3_CHECK_FINISHED                        339\n# define SSL_F_SSL3_CLIENT_HELLO                          131\n# define SSL_F_SSL3_CONNECT                               132\n# define SSL_F_SSL3_CTRL                                  213\n# define SSL_F_SSL3_CTX_CTRL                              133\n# define SSL_F_SSL3_DIGEST_CACHED_RECORDS                 293\n# define SSL_F_SSL3_DO_CHANGE_CIPHER_SPEC                 292\n# define SSL_F_SSL3_ENC                                   134\n# define SSL_F_SSL3_GENERATE_KEY_BLOCK                    238\n# define SSL_F_SSL3_GENERATE_MASTER_SECRET                388\n# define SSL_F_SSL3_GET_CERTIFICATE_REQUEST               135\n# define SSL_F_SSL3_GET_CERT_STATUS                       289\n# define SSL_F_SSL3_GET_CERT_VERIFY                       136\n# define SSL_F_SSL3_GET_CLIENT_CERTIFICATE                137\n# define SSL_F_SSL3_GET_CLIENT_HELLO                      138\n# define SSL_F_SSL3_GET_CLIENT_KEY_EXCHANGE               139\n# define SSL_F_SSL3_GET_FINISHED                          140\n# define SSL_F_SSL3_GET_KEY_EXCHANGE                      141\n# define SSL_F_SSL3_GET_MESSAGE                           142\n# define SSL_F_SSL3_GET_NEW_SESSION_TICKET                283\n# define SSL_F_SSL3_GET_NEXT_PROTO                        306\n# define SSL_F_SSL3_GET_RECORD                            143\n# define SSL_F_SSL3_GET_SERVER_CERTIFICATE                144\n# define SSL_F_SSL3_GET_SERVER_DONE                       145\n# define SSL_F_SSL3_GET_SERVER_HELLO                      146\n# define SSL_F_SSL3_HANDSHAKE_MAC                         285\n# define SSL_F_SSL3_NEW_SESSION_TICKET                    287\n# define SSL_F_SSL3_OUTPUT_CERT_CHAIN                     147\n# define SSL_F_SSL3_PEEK                                  235\n# define SSL_F_SSL3_READ_BYTES                            148\n# define SSL_F_SSL3_READ_N                                149\n# define SSL_F_SSL3_SEND_CERTIFICATE_REQUEST              150\n# define SSL_F_SSL3_SEND_CLIENT_CERTIFICATE               151\n# define SSL_F_SSL3_SEND_CLIENT_KEY_EXCHANGE              152\n# define SSL_F_SSL3_SEND_CLIENT_VERIFY                    153\n# define SSL_F_SSL3_SEND_SERVER_CERTIFICATE               154\n# define SSL_F_SSL3_SEND_SERVER_HELLO                     242\n# define SSL_F_SSL3_SEND_SERVER_KEY_EXCHANGE              155\n# define SSL_F_SSL3_SETUP_KEY_BLOCK                       157\n# define SSL_F_SSL3_SETUP_READ_BUFFER                     156\n# define SSL_F_SSL3_SETUP_WRITE_BUFFER                    291\n# define SSL_F_SSL3_WRITE_BYTES                           158\n# define SSL_F_SSL3_WRITE_PENDING                         159\n# define SSL_F_SSL_ADD_CLIENTHELLO_RENEGOTIATE_EXT        298\n# define SSL_F_SSL_ADD_CLIENTHELLO_TLSEXT                 277\n# define SSL_F_SSL_ADD_CLIENTHELLO_USE_SRTP_EXT           307\n# define SSL_F_SSL_ADD_DIR_CERT_SUBJECTS_TO_STACK         215\n# define SSL_F_SSL_ADD_FILE_CERT_SUBJECTS_TO_STACK        216\n# define SSL_F_SSL_ADD_SERVERHELLO_RENEGOTIATE_EXT        299\n# define SSL_F_SSL_ADD_SERVERHELLO_TLSEXT                 278\n# define SSL_F_SSL_ADD_SERVERHELLO_USE_SRTP_EXT           308\n# define SSL_F_SSL_BAD_METHOD                             160\n# define SSL_F_SSL_BYTES_TO_CIPHER_LIST                   161\n# define SSL_F_SSL_CERT_DUP                               221\n# define SSL_F_SSL_CERT_INST                              222\n# define SSL_F_SSL_CERT_INSTANTIATE                       214\n# define SSL_F_SSL_CERT_NEW                               162\n# define SSL_F_SSL_CHECK_PRIVATE_KEY                      163\n# define SSL_F_SSL_CHECK_SERVERHELLO_TLSEXT               280\n# define SSL_F_SSL_CHECK_SRVR_ECC_CERT_AND_ALG            279\n# define SSL_F_SSL_CIPHER_PROCESS_RULESTR                 230\n# define SSL_F_SSL_CIPHER_STRENGTH_SORT                   231\n# define SSL_F_SSL_CLEAR                                  164\n# define SSL_F_SSL_COMP_ADD_COMPRESSION_METHOD            165\n# define SSL_F_SSL_CREATE_CIPHER_LIST                     166\n# define SSL_F_SSL_CTRL                                   232\n# define SSL_F_SSL_CTX_CHECK_PRIVATE_KEY                  168\n# define SSL_F_SSL_CTX_MAKE_PROFILES                      309\n# define SSL_F_SSL_CTX_NEW                                169\n# define SSL_F_SSL_CTX_SET_CIPHER_LIST                    269\n# define SSL_F_SSL_CTX_SET_CLIENT_CERT_ENGINE             290\n# define SSL_F_SSL_CTX_SET_PURPOSE                        226\n# define SSL_F_SSL_CTX_SET_SESSION_ID_CONTEXT             219\n# define SSL_F_SSL_CTX_SET_SSL_VERSION                    170\n# define SSL_F_SSL_CTX_SET_TRUST                          229\n# define SSL_F_SSL_CTX_USE_CERTIFICATE                    171\n# define SSL_F_SSL_CTX_USE_CERTIFICATE_ASN1               172\n# define SSL_F_SSL_CTX_USE_CERTIFICATE_CHAIN_FILE         220\n# define SSL_F_SSL_CTX_USE_CERTIFICATE_FILE               173\n# define SSL_F_SSL_CTX_USE_PRIVATEKEY                     174\n# define SSL_F_SSL_CTX_USE_PRIVATEKEY_ASN1                175\n# define SSL_F_SSL_CTX_USE_PRIVATEKEY_FILE                176\n# define SSL_F_SSL_CTX_USE_PSK_IDENTITY_HINT              272\n# define SSL_F_SSL_CTX_USE_RSAPRIVATEKEY                  177\n# define SSL_F_SSL_CTX_USE_RSAPRIVATEKEY_ASN1             178\n# define SSL_F_SSL_CTX_USE_RSAPRIVATEKEY_FILE             179\n# define SSL_F_SSL_DO_HANDSHAKE                           180\n# define SSL_F_SSL_GET_NEW_SESSION                        181\n# define SSL_F_SSL_GET_PREV_SESSION                       217\n# define SSL_F_SSL_GET_SERVER_SEND_CERT                   182\n# define SSL_F_SSL_GET_SERVER_SEND_PKEY                   317\n# define SSL_F_SSL_GET_SIGN_PKEY                          183\n# define SSL_F_SSL_INIT_WBIO_BUFFER                       184\n# define SSL_F_SSL_LOAD_CLIENT_CA_FILE                    185\n# define SSL_F_SSL_NEW                                    186\n# define SSL_F_SSL_PARSE_CLIENTHELLO_RENEGOTIATE_EXT      300\n# define SSL_F_SSL_PARSE_CLIENTHELLO_TLSEXT               302\n# define SSL_F_SSL_PARSE_CLIENTHELLO_USE_SRTP_EXT         310\n# define SSL_F_SSL_PARSE_SERVERHELLO_RENEGOTIATE_EXT      301\n# define SSL_F_SSL_PARSE_SERVERHELLO_TLSEXT               303\n# define SSL_F_SSL_PARSE_SERVERHELLO_USE_SRTP_EXT         311\n# define SSL_F_SSL_PEEK                                   270\n# define SSL_F_SSL_PREPARE_CLIENTHELLO_TLSEXT             281\n# define SSL_F_SSL_PREPARE_SERVERHELLO_TLSEXT             282\n# define SSL_F_SSL_READ                                   223\n# define SSL_F_SSL_RSA_PRIVATE_DECRYPT                    187\n# define SSL_F_SSL_RSA_PUBLIC_ENCRYPT                     188\n# define SSL_F_SSL_SESSION_DUP                            348\n# define SSL_F_SSL_SESSION_NEW                            189\n# define SSL_F_SSL_SESSION_PRINT_FP                       190\n# define SSL_F_SSL_SESSION_SET1_ID_CONTEXT                312\n# define SSL_F_SSL_SESS_CERT_NEW                          225\n# define SSL_F_SSL_SET_CERT                               191\n# define SSL_F_SSL_SET_CIPHER_LIST                        271\n# define SSL_F_SSL_SET_FD                                 192\n# define SSL_F_SSL_SET_PKEY                               193\n# define SSL_F_SSL_SET_PURPOSE                            227\n# define SSL_F_SSL_SET_RFD                                194\n# define SSL_F_SSL_SET_SESSION                            195\n# define SSL_F_SSL_SET_SESSION_ID_CONTEXT                 218\n# define SSL_F_SSL_SET_SESSION_TICKET_EXT                 294\n# define SSL_F_SSL_SET_TRUST                              228\n# define SSL_F_SSL_SET_WFD                                196\n# define SSL_F_SSL_SHUTDOWN                               224\n# define SSL_F_SSL_SRP_CTX_INIT                           313\n# define SSL_F_SSL_UNDEFINED_CONST_FUNCTION               243\n# define SSL_F_SSL_UNDEFINED_FUNCTION                     197\n# define SSL_F_SSL_UNDEFINED_VOID_FUNCTION                244\n# define SSL_F_SSL_USE_CERTIFICATE                        198\n# define SSL_F_SSL_USE_CERTIFICATE_ASN1                   199\n# define SSL_F_SSL_USE_CERTIFICATE_FILE                   200\n# define SSL_F_SSL_USE_PRIVATEKEY                         201\n# define SSL_F_SSL_USE_PRIVATEKEY_ASN1                    202\n# define SSL_F_SSL_USE_PRIVATEKEY_FILE                    203\n# define SSL_F_SSL_USE_PSK_IDENTITY_HINT                  273\n# define SSL_F_SSL_USE_RSAPRIVATEKEY                      204\n# define SSL_F_SSL_USE_RSAPRIVATEKEY_ASN1                 205\n# define SSL_F_SSL_USE_RSAPRIVATEKEY_FILE                 206\n# define SSL_F_SSL_VERIFY_CERT_CHAIN                      207\n# define SSL_F_SSL_WRITE                                  208\n# define SSL_F_TLS1_CERT_VERIFY_MAC                       286\n# define SSL_F_TLS1_CHANGE_CIPHER_STATE                   209\n# define SSL_F_TLS1_CHECK_SERVERHELLO_TLSEXT              274\n# define SSL_F_TLS1_ENC                                   210\n# define SSL_F_TLS1_EXPORT_KEYING_MATERIAL                314\n# define SSL_F_TLS1_HEARTBEAT                             315\n# define SSL_F_TLS1_PREPARE_CLIENTHELLO_TLSEXT            275\n# define SSL_F_TLS1_PREPARE_SERVERHELLO_TLSEXT            276\n# define SSL_F_TLS1_PRF                                   284\n# define SSL_F_TLS1_SETUP_KEY_BLOCK                       211\n# define SSL_F_WRITE_PENDING                              212\n\n/* Reason codes. */\n# define SSL_R_APP_DATA_IN_HANDSHAKE                      100\n# define SSL_R_ATTEMPT_TO_REUSE_SESSION_IN_DIFFERENT_CONTEXT 272\n# define SSL_R_BAD_ALERT_RECORD                           101\n# define SSL_R_BAD_AUTHENTICATION_TYPE                    102\n# define SSL_R_BAD_CHANGE_CIPHER_SPEC                     103\n# define SSL_R_BAD_CHECKSUM                               104\n# define SSL_R_BAD_DATA_RETURNED_BY_CALLBACK              106\n# define SSL_R_BAD_DECOMPRESSION                          107\n# define SSL_R_BAD_DH_G_LENGTH                            108\n# define SSL_R_BAD_DH_G_VALUE                             375\n# define SSL_R_BAD_DH_PUB_KEY_LENGTH                      109\n# define SSL_R_BAD_DH_PUB_KEY_VALUE                       393\n# define SSL_R_BAD_DH_P_LENGTH                            110\n# define SSL_R_BAD_DH_P_VALUE                             395\n# define SSL_R_BAD_DIGEST_LENGTH                          111\n# define SSL_R_BAD_DSA_SIGNATURE                          112\n# define SSL_R_BAD_ECC_CERT                               304\n# define SSL_R_BAD_ECDSA_SIGNATURE                        305\n# define SSL_R_BAD_ECPOINT                                306\n# define SSL_R_BAD_HANDSHAKE_LENGTH                       332\n# define SSL_R_BAD_HELLO_REQUEST                          105\n# define SSL_R_BAD_LENGTH                                 271\n# define SSL_R_BAD_MAC_DECODE                             113\n# define SSL_R_BAD_MAC_LENGTH                             333\n# define SSL_R_BAD_MESSAGE_TYPE                           114\n# define SSL_R_BAD_PACKET_LENGTH                          115\n# define SSL_R_BAD_PROTOCOL_VERSION_NUMBER                116\n# define SSL_R_BAD_PSK_IDENTITY_HINT_LENGTH               316\n# define SSL_R_BAD_RESPONSE_ARGUMENT                      117\n# define SSL_R_BAD_RSA_DECRYPT                            118\n# define SSL_R_BAD_RSA_ENCRYPT                            119\n# define SSL_R_BAD_RSA_E_LENGTH                           120\n# define SSL_R_BAD_RSA_MODULUS_LENGTH                     121\n# define SSL_R_BAD_RSA_SIGNATURE                          122\n# define SSL_R_BAD_SIGNATURE                              123\n# define SSL_R_BAD_SRP_A_LENGTH                           347\n# define SSL_R_BAD_SRP_B_LENGTH                           348\n# define SSL_R_BAD_SRP_G_LENGTH                           349\n# define SSL_R_BAD_SRP_N_LENGTH                           350\n# define SSL_R_BAD_SRP_PARAMETERS                         371\n# define SSL_R_BAD_SRP_S_LENGTH                           351\n# define SSL_R_BAD_SRTP_MKI_VALUE                         352\n# define SSL_R_BAD_SRTP_PROTECTION_PROFILE_LIST           353\n# define SSL_R_BAD_SSL_FILETYPE                           124\n# define SSL_R_BAD_SSL_SESSION_ID_LENGTH                  125\n# define SSL_R_BAD_STATE                                  126\n# define SSL_R_BAD_WRITE_RETRY                            127\n# define SSL_R_BIO_NOT_SET                                128\n# define SSL_R_BLOCK_CIPHER_PAD_IS_WRONG                  129\n# define SSL_R_BN_LIB                                     130\n# define SSL_R_CA_DN_LENGTH_MISMATCH                      131\n# define SSL_R_CA_DN_TOO_LONG                             132\n# define SSL_R_CCS_RECEIVED_EARLY                         133\n# define SSL_R_CERTIFICATE_VERIFY_FAILED                  134\n# define SSL_R_CERT_LENGTH_MISMATCH                       135\n# define SSL_R_CHALLENGE_IS_DIFFERENT                     136\n# define SSL_R_CIPHER_CODE_WRONG_LENGTH                   137\n# define SSL_R_CIPHER_OR_HASH_UNAVAILABLE                 138\n# define SSL_R_CIPHER_TABLE_SRC_ERROR                     139\n# define SSL_R_CLIENTHELLO_TLSEXT                         226\n# define SSL_R_COMPRESSED_LENGTH_TOO_LONG                 140\n# define SSL_R_COMPRESSION_DISABLED                       343\n# define SSL_R_COMPRESSION_FAILURE                        141\n# define SSL_R_COMPRESSION_ID_NOT_WITHIN_PRIVATE_RANGE    307\n# define SSL_R_COMPRESSION_LIBRARY_ERROR                  142\n# define SSL_R_CONNECTION_ID_IS_DIFFERENT                 143\n# define SSL_R_CONNECTION_TYPE_NOT_SET                    144\n# define SSL_R_COOKIE_MISMATCH                            308\n# define SSL_R_DATA_BETWEEN_CCS_AND_FINISHED              145\n# define SSL_R_DATA_LENGTH_TOO_LONG                       146\n# define SSL_R_DECRYPTION_FAILED                          147\n# define SSL_R_DECRYPTION_FAILED_OR_BAD_RECORD_MAC        281\n# define SSL_R_DH_KEY_TOO_SMALL                           372\n# define SSL_R_DH_PUBLIC_VALUE_LENGTH_IS_WRONG            148\n# define SSL_R_DIGEST_CHECK_FAILED                        149\n# define SSL_R_DTLS_MESSAGE_TOO_BIG                       334\n# define SSL_R_DUPLICATE_COMPRESSION_ID                   309\n# define SSL_R_ECC_CERT_NOT_FOR_KEY_AGREEMENT             317\n# define SSL_R_ECC_CERT_NOT_FOR_SIGNING                   318\n# define SSL_R_ECC_CERT_SHOULD_HAVE_RSA_SIGNATURE         322\n# define SSL_R_ECC_CERT_SHOULD_HAVE_SHA1_SIGNATURE        323\n# define SSL_R_ECGROUP_TOO_LARGE_FOR_CIPHER               310\n# define SSL_R_EMPTY_SRTP_PROTECTION_PROFILE_LIST         354\n# define SSL_R_ENCRYPTED_LENGTH_TOO_LONG                  150\n# define SSL_R_ERROR_GENERATING_TMP_RSA_KEY               282\n# define SSL_R_ERROR_IN_RECEIVED_CIPHER_LIST              151\n# define SSL_R_EXCESSIVE_MESSAGE_SIZE                     152\n# define SSL_R_EXTRA_DATA_IN_MESSAGE                      153\n# define SSL_R_GOT_A_FIN_BEFORE_A_CCS                     154\n# define SSL_R_GOT_NEXT_PROTO_BEFORE_A_CCS                355\n# define SSL_R_GOT_NEXT_PROTO_WITHOUT_EXTENSION           356\n# define SSL_R_HTTPS_PROXY_REQUEST                        155\n# define SSL_R_HTTP_REQUEST                               156\n# define SSL_R_ILLEGAL_PADDING                            283\n# define SSL_R_INAPPROPRIATE_FALLBACK                     373\n# define SSL_R_INCONSISTENT_COMPRESSION                   340\n# define SSL_R_INVALID_CHALLENGE_LENGTH                   158\n# define SSL_R_INVALID_COMMAND                            280\n# define SSL_R_INVALID_COMPRESSION_ALGORITHM              341\n# define SSL_R_INVALID_PURPOSE                            278\n# define SSL_R_INVALID_SRP_USERNAME                       357\n# define SSL_R_INVALID_STATUS_RESPONSE                    328\n# define SSL_R_INVALID_TICKET_KEYS_LENGTH                 325\n# define SSL_R_INVALID_TRUST                              279\n# define SSL_R_KEY_ARG_TOO_LONG                           284\n# define SSL_R_KRB5                                       285\n# define SSL_R_KRB5_C_CC_PRINC                            286\n# define SSL_R_KRB5_C_GET_CRED                            287\n# define SSL_R_KRB5_C_INIT                                288\n# define SSL_R_KRB5_C_MK_REQ                              289\n# define SSL_R_KRB5_S_BAD_TICKET                          290\n# define SSL_R_KRB5_S_INIT                                291\n# define SSL_R_KRB5_S_RD_REQ                              292\n# define SSL_R_KRB5_S_TKT_EXPIRED                         293\n# define SSL_R_KRB5_S_TKT_NYV                             294\n# define SSL_R_KRB5_S_TKT_SKEW                            295\n# define SSL_R_LENGTH_MISMATCH                            159\n# define SSL_R_LENGTH_TOO_SHORT                           160\n# define SSL_R_LIBRARY_BUG                                274\n# define SSL_R_LIBRARY_HAS_NO_CIPHERS                     161\n# define SSL_R_MESSAGE_TOO_LONG                           296\n# define SSL_R_MISSING_DH_DSA_CERT                        162\n# define SSL_R_MISSING_DH_KEY                             163\n# define SSL_R_MISSING_DH_RSA_CERT                        164\n# define SSL_R_MISSING_DSA_SIGNING_CERT                   165\n# define SSL_R_MISSING_EXPORT_TMP_DH_KEY                  166\n# define SSL_R_MISSING_EXPORT_TMP_RSA_KEY                 167\n# define SSL_R_MISSING_RSA_CERTIFICATE                    168\n# define SSL_R_MISSING_RSA_ENCRYPTING_CERT                169\n# define SSL_R_MISSING_RSA_SIGNING_CERT                   170\n# define SSL_R_MISSING_SRP_PARAM                          358\n# define SSL_R_MISSING_TMP_DH_KEY                         171\n# define SSL_R_MISSING_TMP_ECDH_KEY                       311\n# define SSL_R_MISSING_TMP_RSA_KEY                        172\n# define SSL_R_MISSING_TMP_RSA_PKEY                       173\n# define SSL_R_MISSING_VERIFY_MESSAGE                     174\n# define SSL_R_MULTIPLE_SGC_RESTARTS                      346\n# define SSL_R_NON_SSLV2_INITIAL_PACKET                   175\n# define SSL_R_NO_CERTIFICATES_RETURNED                   176\n# define SSL_R_NO_CERTIFICATE_ASSIGNED                    177\n# define SSL_R_NO_CERTIFICATE_RETURNED                    178\n# define SSL_R_NO_CERTIFICATE_SET                         179\n# define SSL_R_NO_CERTIFICATE_SPECIFIED                   180\n# define SSL_R_NO_CIPHERS_AVAILABLE                       181\n# define SSL_R_NO_CIPHERS_PASSED                          182\n# define SSL_R_NO_CIPHERS_SPECIFIED                       183\n# define SSL_R_NO_CIPHER_LIST                             184\n# define SSL_R_NO_CIPHER_MATCH                            185\n# define SSL_R_NO_CLIENT_CERT_METHOD                      331\n# define SSL_R_NO_CLIENT_CERT_RECEIVED                    186\n# define SSL_R_NO_COMPRESSION_SPECIFIED                   187\n# define SSL_R_NO_GOST_CERTIFICATE_SENT_BY_PEER           330\n# define SSL_R_NO_METHOD_SPECIFIED                        188\n# define SSL_R_NO_PRIVATEKEY                              189\n# define SSL_R_NO_PRIVATE_KEY_ASSIGNED                    190\n# define SSL_R_NO_PROTOCOLS_AVAILABLE                     191\n# define SSL_R_NO_PUBLICKEY                               192\n# define SSL_R_NO_RENEGOTIATION                           339\n# define SSL_R_NO_REQUIRED_DIGEST                         324\n# define SSL_R_NO_SHARED_CIPHER                           193\n# define SSL_R_NO_SRTP_PROFILES                           359\n# define SSL_R_NO_VERIFY_CALLBACK                         194\n# define SSL_R_NULL_SSL_CTX                               195\n# define SSL_R_NULL_SSL_METHOD_PASSED                     196\n# define SSL_R_OLD_SESSION_CIPHER_NOT_RETURNED            197\n# define SSL_R_OLD_SESSION_COMPRESSION_ALGORITHM_NOT_RETURNED 344\n# define SSL_R_ONLY_TLS_ALLOWED_IN_FIPS_MODE              297\n# define SSL_R_OPAQUE_PRF_INPUT_TOO_LONG                  327\n# define SSL_R_PACKET_LENGTH_TOO_LONG                     198\n# define SSL_R_PARSE_TLSEXT                               227\n# define SSL_R_PATH_TOO_LONG                              270\n# define SSL_R_PEER_DID_NOT_RETURN_A_CERTIFICATE          199\n# define SSL_R_PEER_ERROR                                 200\n# define SSL_R_PEER_ERROR_CERTIFICATE                     201\n# define SSL_R_PEER_ERROR_NO_CERTIFICATE                  202\n# define SSL_R_PEER_ERROR_NO_CIPHER                       203\n# define SSL_R_PEER_ERROR_UNSUPPORTED_CERTIFICATE_TYPE    204\n# define SSL_R_PRE_MAC_LENGTH_TOO_LONG                    205\n# define SSL_R_PROBLEMS_MAPPING_CIPHER_FUNCTIONS          206\n# define SSL_R_PROTOCOL_IS_SHUTDOWN                       207\n# define SSL_R_PSK_IDENTITY_NOT_FOUND                     223\n# define SSL_R_PSK_NO_CLIENT_CB                           224\n# define SSL_R_PSK_NO_SERVER_CB                           225\n# define SSL_R_PUBLIC_KEY_ENCRYPT_ERROR                   208\n# define SSL_R_PUBLIC_KEY_IS_NOT_RSA                      209\n# define SSL_R_PUBLIC_KEY_NOT_RSA                         210\n# define SSL_R_READ_BIO_NOT_SET                           211\n# define SSL_R_READ_TIMEOUT_EXPIRED                       312\n# define SSL_R_READ_WRONG_PACKET_TYPE                     212\n# define SSL_R_RECORD_LENGTH_MISMATCH                     213\n# define SSL_R_RECORD_TOO_LARGE                           214\n# define SSL_R_RECORD_TOO_SMALL                           298\n# define SSL_R_RENEGOTIATE_EXT_TOO_LONG                   335\n# define SSL_R_RENEGOTIATION_ENCODING_ERR                 336\n# define SSL_R_RENEGOTIATION_MISMATCH                     337\n# define SSL_R_REQUIRED_CIPHER_MISSING                    215\n# define SSL_R_REQUIRED_COMPRESSSION_ALGORITHM_MISSING    342\n# define SSL_R_REUSE_CERT_LENGTH_NOT_ZERO                 216\n# define SSL_R_REUSE_CERT_TYPE_NOT_ZERO                   217\n# define SSL_R_REUSE_CIPHER_LIST_NOT_ZERO                 218\n# define SSL_R_SCSV_RECEIVED_WHEN_RENEGOTIATING           345\n# define SSL_R_SERVERHELLO_TLSEXT                         275\n# define SSL_R_SESSION_ID_CONTEXT_UNINITIALIZED           277\n# define SSL_R_SHORT_READ                                 219\n# define SSL_R_SIGNATURE_ALGORITHMS_ERROR                 360\n# define SSL_R_SIGNATURE_FOR_NON_SIGNING_CERTIFICATE      220\n# define SSL_R_SRP_A_CALC                                 361\n# define SSL_R_SRTP_COULD_NOT_ALLOCATE_PROFILES           362\n# define SSL_R_SRTP_PROTECTION_PROFILE_LIST_TOO_LONG      363\n# define SSL_R_SRTP_UNKNOWN_PROTECTION_PROFILE            364\n# define SSL_R_SSL23_DOING_SESSION_ID_REUSE               221\n# define SSL_R_SSL2_CONNECTION_ID_TOO_LONG                299\n# define SSL_R_SSL3_EXT_INVALID_ECPOINTFORMAT             321\n# define SSL_R_SSL3_EXT_INVALID_SERVERNAME                319\n# define SSL_R_SSL3_EXT_INVALID_SERVERNAME_TYPE           320\n# define SSL_R_SSL3_SESSION_ID_TOO_LONG                   300\n# define SSL_R_SSL3_SESSION_ID_TOO_SHORT                  222\n# define SSL_R_SSLV3_ALERT_BAD_CERTIFICATE                1042\n# define SSL_R_SSLV3_ALERT_BAD_RECORD_MAC                 1020\n# define SSL_R_SSLV3_ALERT_CERTIFICATE_EXPIRED            1045\n# define SSL_R_SSLV3_ALERT_CERTIFICATE_REVOKED            1044\n# define SSL_R_SSLV3_ALERT_CERTIFICATE_UNKNOWN            1046\n# define SSL_R_SSLV3_ALERT_DECOMPRESSION_FAILURE          1030\n# define SSL_R_SSLV3_ALERT_HANDSHAKE_FAILURE              1040\n# define SSL_R_SSLV3_ALERT_ILLEGAL_PARAMETER              1047\n# define SSL_R_SSLV3_ALERT_NO_CERTIFICATE                 1041\n# define SSL_R_SSLV3_ALERT_UNEXPECTED_MESSAGE             1010\n# define SSL_R_SSLV3_ALERT_UNSUPPORTED_CERTIFICATE        1043\n# define SSL_R_SSL_CTX_HAS_NO_DEFAULT_SSL_VERSION         228\n# define SSL_R_SSL_HANDSHAKE_FAILURE                      229\n# define SSL_R_SSL_LIBRARY_HAS_NO_CIPHERS                 230\n# define SSL_R_SSL_SESSION_ID_CALLBACK_FAILED             301\n# define SSL_R_SSL_SESSION_ID_CONFLICT                    302\n# define SSL_R_SSL_SESSION_ID_CONTEXT_TOO_LONG            273\n# define SSL_R_SSL_SESSION_ID_HAS_BAD_LENGTH              303\n# define SSL_R_SSL_SESSION_ID_IS_DIFFERENT                231\n# define SSL_R_TLSV1_ALERT_ACCESS_DENIED                  1049\n# define SSL_R_TLSV1_ALERT_DECODE_ERROR                   1050\n# define SSL_R_TLSV1_ALERT_DECRYPTION_FAILED              1021\n# define SSL_R_TLSV1_ALERT_DECRYPT_ERROR                  1051\n# define SSL_R_TLSV1_ALERT_EXPORT_RESTRICTION             1060\n# define SSL_R_TLSV1_ALERT_INAPPROPRIATE_FALLBACK         1086\n# define SSL_R_TLSV1_ALERT_INSUFFICIENT_SECURITY          1071\n# define SSL_R_TLSV1_ALERT_INTERNAL_ERROR                 1080\n# define SSL_R_TLSV1_ALERT_NO_RENEGOTIATION               1100\n# define SSL_R_TLSV1_ALERT_PROTOCOL_VERSION               1070\n# define SSL_R_TLSV1_ALERT_RECORD_OVERFLOW                1022\n# define SSL_R_TLSV1_ALERT_UNKNOWN_CA                     1048\n# define SSL_R_TLSV1_ALERT_USER_CANCELLED                 1090\n# define SSL_R_TLSV1_BAD_CERTIFICATE_HASH_VALUE           1114\n# define SSL_R_TLSV1_BAD_CERTIFICATE_STATUS_RESPONSE      1113\n# define SSL_R_TLSV1_CERTIFICATE_UNOBTAINABLE             1111\n# define SSL_R_TLSV1_UNRECOGNIZED_NAME                    1112\n# define SSL_R_TLSV1_UNSUPPORTED_EXTENSION                1110\n# define SSL_R_TLS_CLIENT_CERT_REQ_WITH_ANON_CIPHER       232\n# define SSL_R_TLS_HEARTBEAT_PEER_DOESNT_ACCEPT           365\n# define SSL_R_TLS_HEARTBEAT_PENDING                      366\n# define SSL_R_TLS_ILLEGAL_EXPORTER_LABEL                 367\n# define SSL_R_TLS_INVALID_ECPOINTFORMAT_LIST             157\n# define SSL_R_TLS_PEER_DID_NOT_RESPOND_WITH_CERTIFICATE_LIST 233\n# define SSL_R_TLS_RSA_ENCRYPTED_VALUE_LENGTH_IS_WRONG    234\n# define SSL_R_TRIED_TO_USE_UNSUPPORTED_CIPHER            235\n# define SSL_R_UNABLE_TO_DECODE_DH_CERTS                  236\n# define SSL_R_UNABLE_TO_DECODE_ECDH_CERTS                313\n# define SSL_R_UNABLE_TO_EXTRACT_PUBLIC_KEY               237\n# define SSL_R_UNABLE_TO_FIND_DH_PARAMETERS               238\n# define SSL_R_UNABLE_TO_FIND_ECDH_PARAMETERS             314\n# define SSL_R_UNABLE_TO_FIND_PUBLIC_KEY_PARAMETERS       239\n# define SSL_R_UNABLE_TO_FIND_SSL_METHOD                  240\n# define SSL_R_UNABLE_TO_LOAD_SSL2_MD5_ROUTINES           241\n# define SSL_R_UNABLE_TO_LOAD_SSL3_MD5_ROUTINES           242\n# define SSL_R_UNABLE_TO_LOAD_SSL3_SHA1_ROUTINES          243\n# define SSL_R_UNEXPECTED_MESSAGE                         244\n# define SSL_R_UNEXPECTED_RECORD                          245\n# define SSL_R_UNINITIALIZED                              276\n# define SSL_R_UNKNOWN_ALERT_TYPE                         246\n# define SSL_R_UNKNOWN_CERTIFICATE_TYPE                   247\n# define SSL_R_UNKNOWN_CIPHER_RETURNED                    248\n# define SSL_R_UNKNOWN_CIPHER_TYPE                        249\n# define SSL_R_UNKNOWN_DIGEST                             368\n# define SSL_R_UNKNOWN_KEY_EXCHANGE_TYPE                  250\n# define SSL_R_UNKNOWN_PKEY_TYPE                          251\n# define SSL_R_UNKNOWN_PROTOCOL                           252\n# define SSL_R_UNKNOWN_REMOTE_ERROR_TYPE                  253\n# define SSL_R_UNKNOWN_SSL_VERSION                        254\n# define SSL_R_UNKNOWN_STATE                              255\n# define SSL_R_UNSAFE_LEGACY_RENEGOTIATION_DISABLED       338\n# define SSL_R_UNSUPPORTED_CIPHER                         256\n# define SSL_R_UNSUPPORTED_COMPRESSION_ALGORITHM          257\n# define SSL_R_UNSUPPORTED_DIGEST_TYPE                    326\n# define SSL_R_UNSUPPORTED_ELLIPTIC_CURVE                 315\n# define SSL_R_UNSUPPORTED_PROTOCOL                       258\n# define SSL_R_UNSUPPORTED_SSL_VERSION                    259\n# define SSL_R_UNSUPPORTED_STATUS_TYPE                    329\n# define SSL_R_USE_SRTP_NOT_NEGOTIATED                    369\n# define SSL_R_WRITE_BIO_NOT_SET                          260\n# define SSL_R_WRONG_CIPHER_RETURNED                      261\n# define SSL_R_WRONG_MESSAGE_TYPE                         262\n# define SSL_R_WRONG_NUMBER_OF_KEY_BITS                   263\n# define SSL_R_WRONG_SIGNATURE_LENGTH                     264\n# define SSL_R_WRONG_SIGNATURE_SIZE                       265\n# define SSL_R_WRONG_SIGNATURE_TYPE                       370\n# define SSL_R_WRONG_SSL_VERSION                          266\n# define SSL_R_WRONG_VERSION_NUMBER                       267\n# define SSL_R_X509_LIB                                   268\n# define SSL_R_X509_VERIFICATION_SETUP_PROBLEMS           269\n\n#ifdef  __cplusplus\n}\n#endif\n#endif\n"
  },
  {
    "path": "Pods/OpenSSL-Universal/include-ios/openssl/ssl2.h",
    "content": "/* ssl/ssl2.h */\n/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)\n * All rights reserved.\n *\n * This package is an SSL implementation written\n * by Eric Young (eay@cryptsoft.com).\n * The implementation was written so as to conform with Netscapes SSL.\n *\n * This library is free for commercial and non-commercial use as long as\n * the following conditions are aheared to.  The following conditions\n * apply to all code found in this distribution, be it the RC4, RSA,\n * lhash, DES, etc., code; not just the SSL code.  The SSL documentation\n * included with this distribution is covered by the same copyright terms\n * except that the holder is Tim Hudson (tjh@cryptsoft.com).\n *\n * Copyright remains Eric Young's, and as such any Copyright notices in\n * the code are not to be removed.\n * If this package is used in a product, Eric Young should be given attribution\n * as the author of the parts of the library used.\n * This can be in the form of a textual message at program startup or\n * in documentation (online or textual) provided with the package.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n * 1. Redistributions of source code must retain the copyright\n *    notice, this list of conditions and the following disclaimer.\n * 2. Redistributions in binary form must reproduce the above copyright\n *    notice, this list of conditions and the following disclaimer in the\n *    documentation and/or other materials provided with the distribution.\n * 3. All advertising materials mentioning features or use of this software\n *    must display the following acknowledgement:\n *    \"This product includes cryptographic software written by\n *     Eric Young (eay@cryptsoft.com)\"\n *    The word 'cryptographic' can be left out if the rouines from the library\n *    being used are not cryptographic related :-).\n * 4. If you include any Windows specific code (or a derivative thereof) from\n *    the apps directory (application code) you must include an acknowledgement:\n *    \"This product includes software written by Tim Hudson (tjh@cryptsoft.com)\"\n *\n * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND\n * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE\n * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n * SUCH DAMAGE.\n *\n * The licence and distribution terms for any publically available version or\n * derivative of this code cannot be changed.  i.e. this code cannot simply be\n * copied and put under another distribution licence\n * [including the GNU Public Licence.]\n */\n\n#ifndef HEADER_SSL2_H\n# define HEADER_SSL2_H\n\n#ifdef  __cplusplus\nextern \"C\" {\n#endif\n\n/* Protocol Version Codes */\n# define SSL2_VERSION            0x0002\n# define SSL2_VERSION_MAJOR      0x00\n# define SSL2_VERSION_MINOR      0x02\n/* #define SSL2_CLIENT_VERSION  0x0002 */\n/* #define SSL2_SERVER_VERSION  0x0002 */\n\n/* Protocol Message Codes */\n# define SSL2_MT_ERROR                   0\n# define SSL2_MT_CLIENT_HELLO            1\n# define SSL2_MT_CLIENT_MASTER_KEY       2\n# define SSL2_MT_CLIENT_FINISHED         3\n# define SSL2_MT_SERVER_HELLO            4\n# define SSL2_MT_SERVER_VERIFY           5\n# define SSL2_MT_SERVER_FINISHED         6\n# define SSL2_MT_REQUEST_CERTIFICATE     7\n# define SSL2_MT_CLIENT_CERTIFICATE      8\n\n/* Error Message Codes */\n# define SSL2_PE_UNDEFINED_ERROR         0x0000\n# define SSL2_PE_NO_CIPHER               0x0001\n# define SSL2_PE_NO_CERTIFICATE          0x0002\n# define SSL2_PE_BAD_CERTIFICATE         0x0004\n# define SSL2_PE_UNSUPPORTED_CERTIFICATE_TYPE 0x0006\n\n/* Cipher Kind Values */\n# define SSL2_CK_NULL_WITH_MD5                   0x02000000/* v3 */\n# define SSL2_CK_RC4_128_WITH_MD5                0x02010080\n# define SSL2_CK_RC4_128_EXPORT40_WITH_MD5       0x02020080\n# define SSL2_CK_RC2_128_CBC_WITH_MD5            0x02030080\n# define SSL2_CK_RC2_128_CBC_EXPORT40_WITH_MD5   0x02040080\n# define SSL2_CK_IDEA_128_CBC_WITH_MD5           0x02050080\n# define SSL2_CK_DES_64_CBC_WITH_MD5             0x02060040\n# define SSL2_CK_DES_64_CBC_WITH_SHA             0x02060140/* v3 */\n# define SSL2_CK_DES_192_EDE3_CBC_WITH_MD5       0x020700c0\n# define SSL2_CK_DES_192_EDE3_CBC_WITH_SHA       0x020701c0/* v3 */\n# define SSL2_CK_RC4_64_WITH_MD5                 0x02080080/* MS hack */\n\n# define SSL2_CK_DES_64_CFB64_WITH_MD5_1         0x02ff0800/* SSLeay */\n# define SSL2_CK_NULL                            0x02ff0810/* SSLeay */\n\n# define SSL2_TXT_DES_64_CFB64_WITH_MD5_1        \"DES-CFB-M1\"\n# define SSL2_TXT_NULL_WITH_MD5                  \"NULL-MD5\"\n# define SSL2_TXT_RC4_128_WITH_MD5               \"RC4-MD5\"\n# define SSL2_TXT_RC4_128_EXPORT40_WITH_MD5      \"EXP-RC4-MD5\"\n# define SSL2_TXT_RC2_128_CBC_WITH_MD5           \"RC2-CBC-MD5\"\n# define SSL2_TXT_RC2_128_CBC_EXPORT40_WITH_MD5  \"EXP-RC2-CBC-MD5\"\n# define SSL2_TXT_IDEA_128_CBC_WITH_MD5          \"IDEA-CBC-MD5\"\n# define SSL2_TXT_DES_64_CBC_WITH_MD5            \"DES-CBC-MD5\"\n# define SSL2_TXT_DES_64_CBC_WITH_SHA            \"DES-CBC-SHA\"\n# define SSL2_TXT_DES_192_EDE3_CBC_WITH_MD5      \"DES-CBC3-MD5\"\n# define SSL2_TXT_DES_192_EDE3_CBC_WITH_SHA      \"DES-CBC3-SHA\"\n# define SSL2_TXT_RC4_64_WITH_MD5                \"RC4-64-MD5\"\n\n# define SSL2_TXT_NULL                           \"NULL\"\n\n/* Flags for the SSL_CIPHER.algorithm2 field */\n# define SSL2_CF_5_BYTE_ENC                      0x01\n# define SSL2_CF_8_BYTE_ENC                      0x02\n\n/* Certificate Type Codes */\n# define SSL2_CT_X509_CERTIFICATE                0x01\n\n/* Authentication Type Code */\n# define SSL2_AT_MD5_WITH_RSA_ENCRYPTION         0x01\n\n# define SSL2_MAX_SSL_SESSION_ID_LENGTH          32\n\n/* Upper/Lower Bounds */\n# define SSL2_MAX_MASTER_KEY_LENGTH_IN_BITS      256\n# ifdef OPENSSL_SYS_MPE\n#  define SSL2_MAX_RECORD_LENGTH_2_BYTE_HEADER    29998u\n# else\n#  define SSL2_MAX_RECORD_LENGTH_2_BYTE_HEADER    32767u\n                                                       /* 2^15-1 */\n# endif\n# define SSL2_MAX_RECORD_LENGTH_3_BYTE_HEADER    16383/* 2^14-1 */\n\n# define SSL2_CHALLENGE_LENGTH   16\n/*\n * #define SSL2_CHALLENGE_LENGTH 32\n */\n# define SSL2_MIN_CHALLENGE_LENGTH       16\n# define SSL2_MAX_CHALLENGE_LENGTH       32\n# define SSL2_CONNECTION_ID_LENGTH       16\n# define SSL2_MAX_CONNECTION_ID_LENGTH   16\n# define SSL2_SSL_SESSION_ID_LENGTH      16\n# define SSL2_MAX_CERT_CHALLENGE_LENGTH  32\n# define SSL2_MIN_CERT_CHALLENGE_LENGTH  16\n# define SSL2_MAX_KEY_MATERIAL_LENGTH    24\n\n# ifndef HEADER_SSL_LOCL_H\n#  define  CERT           char\n# endif\n\n# ifndef OPENSSL_NO_SSL_INTERN\n\ntypedef struct ssl2_state_st {\n    int three_byte_header;\n    int clear_text;             /* clear text */\n    int escape;                 /* not used in SSLv2 */\n    int ssl2_rollback;          /* used if SSLv23 rolled back to SSLv2 */\n    /*\n     * non-blocking io info, used to make sure the same args were passwd\n     */\n    unsigned int wnum;          /* number of bytes sent so far */\n    int wpend_tot;\n    const unsigned char *wpend_buf;\n    int wpend_off;              /* offset to data to write */\n    int wpend_len;              /* number of bytes passwd to write */\n    int wpend_ret;              /* number of bytes to return to caller */\n    /* buffer raw data */\n    int rbuf_left;\n    int rbuf_offs;\n    unsigned char *rbuf;\n    unsigned char *wbuf;\n    unsigned char *write_ptr;   /* used to point to the start due to 2/3 byte\n                                 * header. */\n    unsigned int padding;\n    unsigned int rlength;       /* passed to ssl2_enc */\n    int ract_data_length;       /* Set when things are encrypted. */\n    unsigned int wlength;       /* passed to ssl2_enc */\n    int wact_data_length;       /* Set when things are decrypted. */\n    unsigned char *ract_data;\n    unsigned char *wact_data;\n    unsigned char *mac_data;\n    unsigned char *read_key;\n    unsigned char *write_key;\n    /* Stuff specifically to do with this SSL session */\n    unsigned int challenge_length;\n    unsigned char challenge[SSL2_MAX_CHALLENGE_LENGTH];\n    unsigned int conn_id_length;\n    unsigned char conn_id[SSL2_MAX_CONNECTION_ID_LENGTH];\n    unsigned int key_material_length;\n    unsigned char key_material[SSL2_MAX_KEY_MATERIAL_LENGTH * 2];\n    unsigned long read_sequence;\n    unsigned long write_sequence;\n    struct {\n        unsigned int conn_id_length;\n        unsigned int cert_type;\n        unsigned int cert_length;\n        unsigned int csl;\n        unsigned int clear;\n        unsigned int enc;\n        unsigned char ccl[SSL2_MAX_CERT_CHALLENGE_LENGTH];\n        unsigned int cipher_spec_length;\n        unsigned int session_id_length;\n        unsigned int clen;\n        unsigned int rlen;\n    } tmp;\n} SSL2_STATE;\n\n# endif\n\n/* SSLv2 */\n/* client */\n# define SSL2_ST_SEND_CLIENT_HELLO_A             (0x10|SSL_ST_CONNECT)\n# define SSL2_ST_SEND_CLIENT_HELLO_B             (0x11|SSL_ST_CONNECT)\n# define SSL2_ST_GET_SERVER_HELLO_A              (0x20|SSL_ST_CONNECT)\n# define SSL2_ST_GET_SERVER_HELLO_B              (0x21|SSL_ST_CONNECT)\n# define SSL2_ST_SEND_CLIENT_MASTER_KEY_A        (0x30|SSL_ST_CONNECT)\n# define SSL2_ST_SEND_CLIENT_MASTER_KEY_B        (0x31|SSL_ST_CONNECT)\n# define SSL2_ST_SEND_CLIENT_FINISHED_A          (0x40|SSL_ST_CONNECT)\n# define SSL2_ST_SEND_CLIENT_FINISHED_B          (0x41|SSL_ST_CONNECT)\n# define SSL2_ST_SEND_CLIENT_CERTIFICATE_A       (0x50|SSL_ST_CONNECT)\n# define SSL2_ST_SEND_CLIENT_CERTIFICATE_B       (0x51|SSL_ST_CONNECT)\n# define SSL2_ST_SEND_CLIENT_CERTIFICATE_C       (0x52|SSL_ST_CONNECT)\n# define SSL2_ST_SEND_CLIENT_CERTIFICATE_D       (0x53|SSL_ST_CONNECT)\n# define SSL2_ST_GET_SERVER_VERIFY_A             (0x60|SSL_ST_CONNECT)\n# define SSL2_ST_GET_SERVER_VERIFY_B             (0x61|SSL_ST_CONNECT)\n# define SSL2_ST_GET_SERVER_FINISHED_A           (0x70|SSL_ST_CONNECT)\n# define SSL2_ST_GET_SERVER_FINISHED_B           (0x71|SSL_ST_CONNECT)\n# define SSL2_ST_CLIENT_START_ENCRYPTION         (0x80|SSL_ST_CONNECT)\n# define SSL2_ST_X509_GET_CLIENT_CERTIFICATE     (0x90|SSL_ST_CONNECT)\n/* server */\n# define SSL2_ST_GET_CLIENT_HELLO_A              (0x10|SSL_ST_ACCEPT)\n# define SSL2_ST_GET_CLIENT_HELLO_B              (0x11|SSL_ST_ACCEPT)\n# define SSL2_ST_GET_CLIENT_HELLO_C              (0x12|SSL_ST_ACCEPT)\n# define SSL2_ST_SEND_SERVER_HELLO_A             (0x20|SSL_ST_ACCEPT)\n# define SSL2_ST_SEND_SERVER_HELLO_B             (0x21|SSL_ST_ACCEPT)\n# define SSL2_ST_GET_CLIENT_MASTER_KEY_A         (0x30|SSL_ST_ACCEPT)\n# define SSL2_ST_GET_CLIENT_MASTER_KEY_B         (0x31|SSL_ST_ACCEPT)\n# define SSL2_ST_SEND_SERVER_VERIFY_A            (0x40|SSL_ST_ACCEPT)\n# define SSL2_ST_SEND_SERVER_VERIFY_B            (0x41|SSL_ST_ACCEPT)\n# define SSL2_ST_SEND_SERVER_VERIFY_C            (0x42|SSL_ST_ACCEPT)\n# define SSL2_ST_GET_CLIENT_FINISHED_A           (0x50|SSL_ST_ACCEPT)\n# define SSL2_ST_GET_CLIENT_FINISHED_B           (0x51|SSL_ST_ACCEPT)\n# define SSL2_ST_SEND_SERVER_FINISHED_A          (0x60|SSL_ST_ACCEPT)\n# define SSL2_ST_SEND_SERVER_FINISHED_B          (0x61|SSL_ST_ACCEPT)\n# define SSL2_ST_SEND_REQUEST_CERTIFICATE_A      (0x70|SSL_ST_ACCEPT)\n# define SSL2_ST_SEND_REQUEST_CERTIFICATE_B      (0x71|SSL_ST_ACCEPT)\n# define SSL2_ST_SEND_REQUEST_CERTIFICATE_C      (0x72|SSL_ST_ACCEPT)\n# define SSL2_ST_SEND_REQUEST_CERTIFICATE_D      (0x73|SSL_ST_ACCEPT)\n# define SSL2_ST_SERVER_START_ENCRYPTION         (0x80|SSL_ST_ACCEPT)\n# define SSL2_ST_X509_GET_SERVER_CERTIFICATE     (0x90|SSL_ST_ACCEPT)\n\n#ifdef  __cplusplus\n}\n#endif\n#endif\n"
  },
  {
    "path": "Pods/OpenSSL-Universal/include-ios/openssl/ssl23.h",
    "content": "/* ssl/ssl23.h */\n/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)\n * All rights reserved.\n *\n * This package is an SSL implementation written\n * by Eric Young (eay@cryptsoft.com).\n * The implementation was written so as to conform with Netscapes SSL.\n *\n * This library is free for commercial and non-commercial use as long as\n * the following conditions are aheared to.  The following conditions\n * apply to all code found in this distribution, be it the RC4, RSA,\n * lhash, DES, etc., code; not just the SSL code.  The SSL documentation\n * included with this distribution is covered by the same copyright terms\n * except that the holder is Tim Hudson (tjh@cryptsoft.com).\n *\n * Copyright remains Eric Young's, and as such any Copyright notices in\n * the code are not to be removed.\n * If this package is used in a product, Eric Young should be given attribution\n * as the author of the parts of the library used.\n * This can be in the form of a textual message at program startup or\n * in documentation (online or textual) provided with the package.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n * 1. Redistributions of source code must retain the copyright\n *    notice, this list of conditions and the following disclaimer.\n * 2. Redistributions in binary form must reproduce the above copyright\n *    notice, this list of conditions and the following disclaimer in the\n *    documentation and/or other materials provided with the distribution.\n * 3. All advertising materials mentioning features or use of this software\n *    must display the following acknowledgement:\n *    \"This product includes cryptographic software written by\n *     Eric Young (eay@cryptsoft.com)\"\n *    The word 'cryptographic' can be left out if the rouines from the library\n *    being used are not cryptographic related :-).\n * 4. If you include any Windows specific code (or a derivative thereof) from\n *    the apps directory (application code) you must include an acknowledgement:\n *    \"This product includes software written by Tim Hudson (tjh@cryptsoft.com)\"\n *\n * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND\n * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE\n * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n * SUCH DAMAGE.\n *\n * The licence and distribution terms for any publically available version or\n * derivative of this code cannot be changed.  i.e. this code cannot simply be\n * copied and put under another distribution licence\n * [including the GNU Public Licence.]\n */\n\n#ifndef HEADER_SSL23_H\n# define HEADER_SSL23_H\n\n#ifdef  __cplusplus\nextern \"C\" {\n#endif\n\n/*\n * client\n */\n/* write to server */\n# define SSL23_ST_CW_CLNT_HELLO_A        (0x210|SSL_ST_CONNECT)\n# define SSL23_ST_CW_CLNT_HELLO_B        (0x211|SSL_ST_CONNECT)\n/* read from server */\n# define SSL23_ST_CR_SRVR_HELLO_A        (0x220|SSL_ST_CONNECT)\n# define SSL23_ST_CR_SRVR_HELLO_B        (0x221|SSL_ST_CONNECT)\n\n/* server */\n/* read from client */\n# define SSL23_ST_SR_CLNT_HELLO_A        (0x210|SSL_ST_ACCEPT)\n# define SSL23_ST_SR_CLNT_HELLO_B        (0x211|SSL_ST_ACCEPT)\n\n#ifdef  __cplusplus\n}\n#endif\n#endif\n"
  },
  {
    "path": "Pods/OpenSSL-Universal/include-ios/openssl/ssl3.h",
    "content": "/* ssl/ssl3.h */\n/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)\n * All rights reserved.\n *\n * This package is an SSL implementation written\n * by Eric Young (eay@cryptsoft.com).\n * The implementation was written so as to conform with Netscapes SSL.\n *\n * This library is free for commercial and non-commercial use as long as\n * the following conditions are aheared to.  The following conditions\n * apply to all code found in this distribution, be it the RC4, RSA,\n * lhash, DES, etc., code; not just the SSL code.  The SSL documentation\n * included with this distribution is covered by the same copyright terms\n * except that the holder is Tim Hudson (tjh@cryptsoft.com).\n *\n * Copyright remains Eric Young's, and as such any Copyright notices in\n * the code are not to be removed.\n * If this package is used in a product, Eric Young should be given attribution\n * as the author of the parts of the library used.\n * This can be in the form of a textual message at program startup or\n * in documentation (online or textual) provided with the package.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n * 1. Redistributions of source code must retain the copyright\n *    notice, this list of conditions and the following disclaimer.\n * 2. Redistributions in binary form must reproduce the above copyright\n *    notice, this list of conditions and the following disclaimer in the\n *    documentation and/or other materials provided with the distribution.\n * 3. All advertising materials mentioning features or use of this software\n *    must display the following acknowledgement:\n *    \"This product includes cryptographic software written by\n *     Eric Young (eay@cryptsoft.com)\"\n *    The word 'cryptographic' can be left out if the rouines from the library\n *    being used are not cryptographic related :-).\n * 4. If you include any Windows specific code (or a derivative thereof) from\n *    the apps directory (application code) you must include an acknowledgement:\n *    \"This product includes software written by Tim Hudson (tjh@cryptsoft.com)\"\n *\n * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND\n * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE\n * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n * SUCH DAMAGE.\n *\n * The licence and distribution terms for any publically available version or\n * derivative of this code cannot be changed.  i.e. this code cannot simply be\n * copied and put under another distribution licence\n * [including the GNU Public Licence.]\n */\n/* ====================================================================\n * Copyright (c) 1998-2002 The OpenSSL Project.  All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n *\n * 1. Redistributions of source code must retain the above copyright\n *    notice, this list of conditions and the following disclaimer.\n *\n * 2. Redistributions in binary form must reproduce the above copyright\n *    notice, this list of conditions and the following disclaimer in\n *    the documentation and/or other materials provided with the\n *    distribution.\n *\n * 3. All advertising materials mentioning features or use of this\n *    software must display the following acknowledgment:\n *    \"This product includes software developed by the OpenSSL Project\n *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)\"\n *\n * 4. The names \"OpenSSL Toolkit\" and \"OpenSSL Project\" must not be used to\n *    endorse or promote products derived from this software without\n *    prior written permission. For written permission, please contact\n *    openssl-core@openssl.org.\n *\n * 5. Products derived from this software may not be called \"OpenSSL\"\n *    nor may \"OpenSSL\" appear in their names without prior written\n *    permission of the OpenSSL Project.\n *\n * 6. Redistributions of any form whatsoever must retain the following\n *    acknowledgment:\n *    \"This product includes software developed by the OpenSSL Project\n *    for use in the OpenSSL Toolkit (http://www.openssl.org/)\"\n *\n * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY\n * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\n * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR\n * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,\n * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED\n * OF THE POSSIBILITY OF SUCH DAMAGE.\n * ====================================================================\n *\n * This product includes cryptographic software written by Eric Young\n * (eay@cryptsoft.com).  This product includes software written by Tim\n * Hudson (tjh@cryptsoft.com).\n *\n */\n/* ====================================================================\n * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED.\n * ECC cipher suite support in OpenSSL originally developed by\n * SUN MICROSYSTEMS, INC., and contributed to the OpenSSL project.\n */\n\n#ifndef HEADER_SSL3_H\n# define HEADER_SSL3_H\n\n# ifndef OPENSSL_NO_COMP\n#  include <openssl/comp.h>\n# endif\n# include <openssl/buffer.h>\n# include <openssl/evp.h>\n# include <openssl/ssl.h>\n\n#ifdef  __cplusplus\nextern \"C\" {\n#endif\n\n/*\n * Signalling cipher suite value from RFC 5746\n * (TLS_EMPTY_RENEGOTIATION_INFO_SCSV)\n */\n# define SSL3_CK_SCSV                            0x030000FF\n\n/*\n * Signalling cipher suite value from draft-ietf-tls-downgrade-scsv-00\n * (TLS_FALLBACK_SCSV)\n */\n# define SSL3_CK_FALLBACK_SCSV                   0x03005600\n\n# define SSL3_CK_RSA_NULL_MD5                    0x03000001\n# define SSL3_CK_RSA_NULL_SHA                    0x03000002\n# define SSL3_CK_RSA_RC4_40_MD5                  0x03000003\n# define SSL3_CK_RSA_RC4_128_MD5                 0x03000004\n# define SSL3_CK_RSA_RC4_128_SHA                 0x03000005\n# define SSL3_CK_RSA_RC2_40_MD5                  0x03000006\n# define SSL3_CK_RSA_IDEA_128_SHA                0x03000007\n# define SSL3_CK_RSA_DES_40_CBC_SHA              0x03000008\n# define SSL3_CK_RSA_DES_64_CBC_SHA              0x03000009\n# define SSL3_CK_RSA_DES_192_CBC3_SHA            0x0300000A\n\n# define SSL3_CK_DH_DSS_DES_40_CBC_SHA           0x0300000B\n# define SSL3_CK_DH_DSS_DES_64_CBC_SHA           0x0300000C\n# define SSL3_CK_DH_DSS_DES_192_CBC3_SHA         0x0300000D\n# define SSL3_CK_DH_RSA_DES_40_CBC_SHA           0x0300000E\n# define SSL3_CK_DH_RSA_DES_64_CBC_SHA           0x0300000F\n# define SSL3_CK_DH_RSA_DES_192_CBC3_SHA         0x03000010\n\n# define SSL3_CK_EDH_DSS_DES_40_CBC_SHA          0x03000011\n# define SSL3_CK_EDH_DSS_DES_64_CBC_SHA          0x03000012\n# define SSL3_CK_EDH_DSS_DES_192_CBC3_SHA        0x03000013\n# define SSL3_CK_EDH_RSA_DES_40_CBC_SHA          0x03000014\n# define SSL3_CK_EDH_RSA_DES_64_CBC_SHA          0x03000015\n# define SSL3_CK_EDH_RSA_DES_192_CBC3_SHA        0x03000016\n\n# define SSL3_CK_ADH_RC4_40_MD5                  0x03000017\n# define SSL3_CK_ADH_RC4_128_MD5                 0x03000018\n# define SSL3_CK_ADH_DES_40_CBC_SHA              0x03000019\n# define SSL3_CK_ADH_DES_64_CBC_SHA              0x0300001A\n# define SSL3_CK_ADH_DES_192_CBC_SHA             0x0300001B\n\n# if 0\n#  define SSL3_CK_FZA_DMS_NULL_SHA                0x0300001C\n#  define SSL3_CK_FZA_DMS_FZA_SHA                 0x0300001D\n#  if 0                         /* Because it clashes with KRB5, is never\n                                 * used any more, and is safe to remove\n                                 * according to David Hopwood\n                                 * <david.hopwood@zetnet.co.uk> of the\n                                 * ietf-tls list */\n#   define SSL3_CK_FZA_DMS_RC4_SHA                 0x0300001E\n#  endif\n# endif\n\n/*\n * VRS Additional Kerberos5 entries\n */\n# define SSL3_CK_KRB5_DES_64_CBC_SHA             0x0300001E\n# define SSL3_CK_KRB5_DES_192_CBC3_SHA           0x0300001F\n# define SSL3_CK_KRB5_RC4_128_SHA                0x03000020\n# define SSL3_CK_KRB5_IDEA_128_CBC_SHA           0x03000021\n# define SSL3_CK_KRB5_DES_64_CBC_MD5             0x03000022\n# define SSL3_CK_KRB5_DES_192_CBC3_MD5           0x03000023\n# define SSL3_CK_KRB5_RC4_128_MD5                0x03000024\n# define SSL3_CK_KRB5_IDEA_128_CBC_MD5           0x03000025\n\n# define SSL3_CK_KRB5_DES_40_CBC_SHA             0x03000026\n# define SSL3_CK_KRB5_RC2_40_CBC_SHA             0x03000027\n# define SSL3_CK_KRB5_RC4_40_SHA                 0x03000028\n# define SSL3_CK_KRB5_DES_40_CBC_MD5             0x03000029\n# define SSL3_CK_KRB5_RC2_40_CBC_MD5             0x0300002A\n# define SSL3_CK_KRB5_RC4_40_MD5                 0x0300002B\n\n# define SSL3_TXT_RSA_NULL_MD5                   \"NULL-MD5\"\n# define SSL3_TXT_RSA_NULL_SHA                   \"NULL-SHA\"\n# define SSL3_TXT_RSA_RC4_40_MD5                 \"EXP-RC4-MD5\"\n# define SSL3_TXT_RSA_RC4_128_MD5                \"RC4-MD5\"\n# define SSL3_TXT_RSA_RC4_128_SHA                \"RC4-SHA\"\n# define SSL3_TXT_RSA_RC2_40_MD5                 \"EXP-RC2-CBC-MD5\"\n# define SSL3_TXT_RSA_IDEA_128_SHA               \"IDEA-CBC-SHA\"\n# define SSL3_TXT_RSA_DES_40_CBC_SHA             \"EXP-DES-CBC-SHA\"\n# define SSL3_TXT_RSA_DES_64_CBC_SHA             \"DES-CBC-SHA\"\n# define SSL3_TXT_RSA_DES_192_CBC3_SHA           \"DES-CBC3-SHA\"\n\n# define SSL3_TXT_DH_DSS_DES_40_CBC_SHA          \"EXP-DH-DSS-DES-CBC-SHA\"\n# define SSL3_TXT_DH_DSS_DES_64_CBC_SHA          \"DH-DSS-DES-CBC-SHA\"\n# define SSL3_TXT_DH_DSS_DES_192_CBC3_SHA        \"DH-DSS-DES-CBC3-SHA\"\n# define SSL3_TXT_DH_RSA_DES_40_CBC_SHA          \"EXP-DH-RSA-DES-CBC-SHA\"\n# define SSL3_TXT_DH_RSA_DES_64_CBC_SHA          \"DH-RSA-DES-CBC-SHA\"\n# define SSL3_TXT_DH_RSA_DES_192_CBC3_SHA        \"DH-RSA-DES-CBC3-SHA\"\n\n# define SSL3_TXT_EDH_DSS_DES_40_CBC_SHA         \"EXP-EDH-DSS-DES-CBC-SHA\"\n# define SSL3_TXT_EDH_DSS_DES_64_CBC_SHA         \"EDH-DSS-DES-CBC-SHA\"\n# define SSL3_TXT_EDH_DSS_DES_192_CBC3_SHA       \"EDH-DSS-DES-CBC3-SHA\"\n# define SSL3_TXT_EDH_RSA_DES_40_CBC_SHA         \"EXP-EDH-RSA-DES-CBC-SHA\"\n# define SSL3_TXT_EDH_RSA_DES_64_CBC_SHA         \"EDH-RSA-DES-CBC-SHA\"\n# define SSL3_TXT_EDH_RSA_DES_192_CBC3_SHA       \"EDH-RSA-DES-CBC3-SHA\"\n\n# define SSL3_TXT_ADH_RC4_40_MD5                 \"EXP-ADH-RC4-MD5\"\n# define SSL3_TXT_ADH_RC4_128_MD5                \"ADH-RC4-MD5\"\n# define SSL3_TXT_ADH_DES_40_CBC_SHA             \"EXP-ADH-DES-CBC-SHA\"\n# define SSL3_TXT_ADH_DES_64_CBC_SHA             \"ADH-DES-CBC-SHA\"\n# define SSL3_TXT_ADH_DES_192_CBC_SHA            \"ADH-DES-CBC3-SHA\"\n\n# if 0\n#  define SSL3_TXT_FZA_DMS_NULL_SHA               \"FZA-NULL-SHA\"\n#  define SSL3_TXT_FZA_DMS_FZA_SHA                \"FZA-FZA-CBC-SHA\"\n#  define SSL3_TXT_FZA_DMS_RC4_SHA                \"FZA-RC4-SHA\"\n# endif\n\n# define SSL3_TXT_KRB5_DES_64_CBC_SHA            \"KRB5-DES-CBC-SHA\"\n# define SSL3_TXT_KRB5_DES_192_CBC3_SHA          \"KRB5-DES-CBC3-SHA\"\n# define SSL3_TXT_KRB5_RC4_128_SHA               \"KRB5-RC4-SHA\"\n# define SSL3_TXT_KRB5_IDEA_128_CBC_SHA          \"KRB5-IDEA-CBC-SHA\"\n# define SSL3_TXT_KRB5_DES_64_CBC_MD5            \"KRB5-DES-CBC-MD5\"\n# define SSL3_TXT_KRB5_DES_192_CBC3_MD5          \"KRB5-DES-CBC3-MD5\"\n# define SSL3_TXT_KRB5_RC4_128_MD5               \"KRB5-RC4-MD5\"\n# define SSL3_TXT_KRB5_IDEA_128_CBC_MD5          \"KRB5-IDEA-CBC-MD5\"\n\n# define SSL3_TXT_KRB5_DES_40_CBC_SHA            \"EXP-KRB5-DES-CBC-SHA\"\n# define SSL3_TXT_KRB5_RC2_40_CBC_SHA            \"EXP-KRB5-RC2-CBC-SHA\"\n# define SSL3_TXT_KRB5_RC4_40_SHA                \"EXP-KRB5-RC4-SHA\"\n# define SSL3_TXT_KRB5_DES_40_CBC_MD5            \"EXP-KRB5-DES-CBC-MD5\"\n# define SSL3_TXT_KRB5_RC2_40_CBC_MD5            \"EXP-KRB5-RC2-CBC-MD5\"\n# define SSL3_TXT_KRB5_RC4_40_MD5                \"EXP-KRB5-RC4-MD5\"\n\n# define SSL3_SSL_SESSION_ID_LENGTH              32\n# define SSL3_MAX_SSL_SESSION_ID_LENGTH          32\n\n# define SSL3_MASTER_SECRET_SIZE                 48\n# define SSL3_RANDOM_SIZE                        32\n# define SSL3_SESSION_ID_SIZE                    32\n# define SSL3_RT_HEADER_LENGTH                   5\n\n# define SSL3_HM_HEADER_LENGTH                   4\n\n# ifndef SSL3_ALIGN_PAYLOAD\n /*\n  * Some will argue that this increases memory footprint, but it's not\n  * actually true. Point is that malloc has to return at least 64-bit aligned\n  * pointers, meaning that allocating 5 bytes wastes 3 bytes in either case.\n  * Suggested pre-gaping simply moves these wasted bytes from the end of\n  * allocated region to its front, but makes data payload aligned, which\n  * improves performance:-)\n  */\n#  define SSL3_ALIGN_PAYLOAD                     8\n# else\n#  if (SSL3_ALIGN_PAYLOAD&(SSL3_ALIGN_PAYLOAD-1))!=0\n#   error \"insane SSL3_ALIGN_PAYLOAD\"\n#   undef SSL3_ALIGN_PAYLOAD\n#  endif\n# endif\n\n/*\n * This is the maximum MAC (digest) size used by the SSL library. Currently\n * maximum of 20 is used by SHA1, but we reserve for future extension for\n * 512-bit hashes.\n */\n\n# define SSL3_RT_MAX_MD_SIZE                     64\n\n/*\n * Maximum block size used in all ciphersuites. Currently 16 for AES.\n */\n\n# define SSL_RT_MAX_CIPHER_BLOCK_SIZE            16\n\n# define SSL3_RT_MAX_EXTRA                       (16384)\n\n/* Maximum plaintext length: defined by SSL/TLS standards */\n# define SSL3_RT_MAX_PLAIN_LENGTH                16384\n/* Maximum compression overhead: defined by SSL/TLS standards */\n# define SSL3_RT_MAX_COMPRESSED_OVERHEAD         1024\n\n/*\n * The standards give a maximum encryption overhead of 1024 bytes. In\n * practice the value is lower than this. The overhead is the maximum number\n * of padding bytes (256) plus the mac size.\n */\n# define SSL3_RT_MAX_ENCRYPTED_OVERHEAD  (256 + SSL3_RT_MAX_MD_SIZE)\n\n/*\n * OpenSSL currently only uses a padding length of at most one block so the\n * send overhead is smaller.\n */\n\n# define SSL3_RT_SEND_MAX_ENCRYPTED_OVERHEAD \\\n                        (SSL_RT_MAX_CIPHER_BLOCK_SIZE + SSL3_RT_MAX_MD_SIZE)\n\n/* If compression isn't used don't include the compression overhead */\n\n# ifdef OPENSSL_NO_COMP\n#  define SSL3_RT_MAX_COMPRESSED_LENGTH           SSL3_RT_MAX_PLAIN_LENGTH\n# else\n#  define SSL3_RT_MAX_COMPRESSED_LENGTH   \\\n                (SSL3_RT_MAX_PLAIN_LENGTH+SSL3_RT_MAX_COMPRESSED_OVERHEAD)\n# endif\n# define SSL3_RT_MAX_ENCRYPTED_LENGTH    \\\n                (SSL3_RT_MAX_ENCRYPTED_OVERHEAD+SSL3_RT_MAX_COMPRESSED_LENGTH)\n# define SSL3_RT_MAX_PACKET_SIZE         \\\n                (SSL3_RT_MAX_ENCRYPTED_LENGTH+SSL3_RT_HEADER_LENGTH)\n\n# define SSL3_MD_CLIENT_FINISHED_CONST   \"\\x43\\x4C\\x4E\\x54\"\n# define SSL3_MD_SERVER_FINISHED_CONST   \"\\x53\\x52\\x56\\x52\"\n\n# define SSL3_VERSION                    0x0300\n# define SSL3_VERSION_MAJOR              0x03\n# define SSL3_VERSION_MINOR              0x00\n\n# define SSL3_RT_CHANGE_CIPHER_SPEC      20\n# define SSL3_RT_ALERT                   21\n# define SSL3_RT_HANDSHAKE               22\n# define SSL3_RT_APPLICATION_DATA        23\n# define TLS1_RT_HEARTBEAT               24\n\n# define SSL3_AL_WARNING                 1\n# define SSL3_AL_FATAL                   2\n\n# define SSL3_AD_CLOSE_NOTIFY             0\n# define SSL3_AD_UNEXPECTED_MESSAGE      10/* fatal */\n# define SSL3_AD_BAD_RECORD_MAC          20/* fatal */\n# define SSL3_AD_DECOMPRESSION_FAILURE   30/* fatal */\n# define SSL3_AD_HANDSHAKE_FAILURE       40/* fatal */\n# define SSL3_AD_NO_CERTIFICATE          41\n# define SSL3_AD_BAD_CERTIFICATE         42\n# define SSL3_AD_UNSUPPORTED_CERTIFICATE 43\n# define SSL3_AD_CERTIFICATE_REVOKED     44\n# define SSL3_AD_CERTIFICATE_EXPIRED     45\n# define SSL3_AD_CERTIFICATE_UNKNOWN     46\n# define SSL3_AD_ILLEGAL_PARAMETER       47/* fatal */\n\n# define TLS1_HB_REQUEST         1\n# define TLS1_HB_RESPONSE        2\n\n# ifndef OPENSSL_NO_SSL_INTERN\n\ntypedef struct ssl3_record_st {\n    /* type of record */\n    /*\n     * r\n     */ int type;\n    /* How many bytes available */\n    /*\n     * rw\n     */ unsigned int length;\n    /* read/write offset into 'buf' */\n    /*\n     * r\n     */ unsigned int off;\n    /* pointer to the record data */\n    /*\n     * rw\n     */ unsigned char *data;\n    /* where the decode bytes are */\n    /*\n     * rw\n     */ unsigned char *input;\n    /* only used with decompression - malloc()ed */\n    /*\n     * r\n     */ unsigned char *comp;\n    /* epoch number, needed by DTLS1 */\n    /*\n     * r\n     */ unsigned long epoch;\n    /* sequence number, needed by DTLS1 */\n    /*\n     * r\n     */ unsigned char seq_num[8];\n} SSL3_RECORD;\n\ntypedef struct ssl3_buffer_st {\n    /* at least SSL3_RT_MAX_PACKET_SIZE bytes, see ssl3_setup_buffers() */\n    unsigned char *buf;\n    /* buffer size */\n    size_t len;\n    /* where to 'copy from' */\n    int offset;\n    /* how many bytes left */\n    int left;\n} SSL3_BUFFER;\n\n# endif\n\n# define SSL3_CT_RSA_SIGN                        1\n# define SSL3_CT_DSS_SIGN                        2\n# define SSL3_CT_RSA_FIXED_DH                    3\n# define SSL3_CT_DSS_FIXED_DH                    4\n# define SSL3_CT_RSA_EPHEMERAL_DH                5\n# define SSL3_CT_DSS_EPHEMERAL_DH                6\n# define SSL3_CT_FORTEZZA_DMS                    20\n/*\n * SSL3_CT_NUMBER is used to size arrays and it must be large enough to\n * contain all of the cert types defined either for SSLv3 and TLSv1.\n */\n# define SSL3_CT_NUMBER                  9\n\n# define SSL3_FLAGS_NO_RENEGOTIATE_CIPHERS       0x0001\n# define SSL3_FLAGS_DELAY_CLIENT_FINISHED        0x0002\n# define SSL3_FLAGS_POP_BUFFER                   0x0004\n# define TLS1_FLAGS_TLS_PADDING_BUG              0x0008\n# define TLS1_FLAGS_SKIP_CERT_VERIFY             0x0010\n# define TLS1_FLAGS_KEEP_HANDSHAKE               0x0020\n/*\n * Set when the handshake is ready to process peer's ChangeCipherSpec message.\n * Cleared after the message has been processed.\n */\n# define SSL3_FLAGS_CCS_OK                       0x0080\n\n/*\n * SSL3_FLAGS_SGC_RESTART_DONE is set when we restart a handshake because of\n * MS SGC and so prevents us from restarting the handshake in a loop. It's\n * reset on a renegotiation, so effectively limits the client to one restart\n * per negotiation. This limits the possibility of a DDoS attack where the\n * client handshakes in a loop using SGC to restart. Servers which permit\n * renegotiation can still be effected, but we can't prevent that.\n */\n# define SSL3_FLAGS_SGC_RESTART_DONE             0x0040\n\n# ifndef OPENSSL_NO_SSL_INTERN\n\ntypedef struct ssl3_state_st {\n    long flags;\n    int delay_buf_pop_ret;\n    unsigned char read_sequence[8];\n    int read_mac_secret_size;\n    unsigned char read_mac_secret[EVP_MAX_MD_SIZE];\n    unsigned char write_sequence[8];\n    int write_mac_secret_size;\n    unsigned char write_mac_secret[EVP_MAX_MD_SIZE];\n    unsigned char server_random[SSL3_RANDOM_SIZE];\n    unsigned char client_random[SSL3_RANDOM_SIZE];\n    /* flags for countermeasure against known-IV weakness */\n    int need_empty_fragments;\n    int empty_fragment_done;\n    /* The value of 'extra' when the buffers were initialized */\n    int init_extra;\n    SSL3_BUFFER rbuf;           /* read IO goes into here */\n    SSL3_BUFFER wbuf;           /* write IO goes into here */\n    SSL3_RECORD rrec;           /* each decoded record goes in here */\n    SSL3_RECORD wrec;           /* goes out from here */\n    /*\n     * storage for Alert/Handshake protocol data received but not yet\n     * processed by ssl3_read_bytes:\n     */\n    unsigned char alert_fragment[2];\n    unsigned int alert_fragment_len;\n    unsigned char handshake_fragment[4];\n    unsigned int handshake_fragment_len;\n    /* partial write - check the numbers match */\n    unsigned int wnum;          /* number of bytes sent so far */\n    int wpend_tot;              /* number bytes written */\n    int wpend_type;\n    int wpend_ret;              /* number of bytes submitted */\n    const unsigned char *wpend_buf;\n    /* used during startup, digest all incoming/outgoing packets */\n    BIO *handshake_buffer;\n    /*\n     * When set of handshake digests is determined, buffer is hashed and\n     * freed and MD_CTX-es for all required digests are stored in this array\n     */\n    EVP_MD_CTX **handshake_dgst;\n    /*\n     * Set whenever an expected ChangeCipherSpec message is processed.\n     * Unset when the peer's Finished message is received.\n     * Unexpected ChangeCipherSpec messages trigger a fatal alert.\n     */\n    int change_cipher_spec;\n    int warn_alert;\n    int fatal_alert;\n    /*\n     * we allow one fatal and one warning alert to be outstanding, send close\n     * alert via the warning alert\n     */\n    int alert_dispatch;\n    unsigned char send_alert[2];\n    /*\n     * This flag is set when we should renegotiate ASAP, basically when there\n     * is no more data in the read or write buffers\n     */\n    int renegotiate;\n    int total_renegotiations;\n    int num_renegotiations;\n    int in_read_app_data;\n    /*\n     * Opaque PRF input as used for the current handshake. These fields are\n     * used only if TLSEXT_TYPE_opaque_prf_input is defined (otherwise, they\n     * are merely present to improve binary compatibility)\n     */\n    void *client_opaque_prf_input;\n    size_t client_opaque_prf_input_len;\n    void *server_opaque_prf_input;\n    size_t server_opaque_prf_input_len;\n    struct {\n        /* actually only needs to be 16+20 */\n        unsigned char cert_verify_md[EVP_MAX_MD_SIZE * 2];\n        /* actually only need to be 16+20 for SSLv3 and 12 for TLS */\n        unsigned char finish_md[EVP_MAX_MD_SIZE * 2];\n        int finish_md_len;\n        unsigned char peer_finish_md[EVP_MAX_MD_SIZE * 2];\n        int peer_finish_md_len;\n        unsigned long message_size;\n        int message_type;\n        /* used to hold the new cipher we are going to use */\n        const SSL_CIPHER *new_cipher;\n#  ifndef OPENSSL_NO_DH\n        DH *dh;\n#  endif\n#  ifndef OPENSSL_NO_ECDH\n        EC_KEY *ecdh;           /* holds short lived ECDH key */\n#  endif\n        /* used when SSL_ST_FLUSH_DATA is entered */\n        int next_state;\n        int reuse_message;\n        /* used for certificate requests */\n        int cert_req;\n        int ctype_num;\n        char ctype[SSL3_CT_NUMBER];\n        STACK_OF(X509_NAME) *ca_names;\n        int use_rsa_tmp;\n        int key_block_length;\n        unsigned char *key_block;\n        const EVP_CIPHER *new_sym_enc;\n        const EVP_MD *new_hash;\n        int new_mac_pkey_type;\n        int new_mac_secret_size;\n#  ifndef OPENSSL_NO_COMP\n        const SSL_COMP *new_compression;\n#  else\n        char *new_compression;\n#  endif\n        int cert_request;\n    } tmp;\n\n    /* Connection binding to prevent renegotiation attacks */\n    unsigned char previous_client_finished[EVP_MAX_MD_SIZE];\n    unsigned char previous_client_finished_len;\n    unsigned char previous_server_finished[EVP_MAX_MD_SIZE];\n    unsigned char previous_server_finished_len;\n    int send_connection_binding; /* TODOEKR */\n\n#  ifndef OPENSSL_NO_NEXTPROTONEG\n    /*\n     * Set if we saw the Next Protocol Negotiation extension from our peer.\n     */\n    int next_proto_neg_seen;\n#  endif\n\n#  ifndef OPENSSL_NO_TLSEXT\n#   ifndef OPENSSL_NO_EC\n    /*\n     * This is set to true if we believe that this is a version of Safari\n     * running on OS X 10.6 or newer. We wish to know this because Safari on\n     * 10.8 .. 10.8.3 has broken ECDHE-ECDSA support.\n     */\n    char is_probably_safari;\n#   endif                       /* !OPENSSL_NO_EC */\n#  endif                        /* !OPENSSL_NO_TLSEXT */\n} SSL3_STATE;\n\n# endif\n\n/* SSLv3 */\n/*\n * client\n */\n/* extra state */\n# define SSL3_ST_CW_FLUSH                (0x100|SSL_ST_CONNECT)\n# ifndef OPENSSL_NO_SCTP\n#  define DTLS1_SCTP_ST_CW_WRITE_SOCK                     (0x310|SSL_ST_CONNECT)\n#  define DTLS1_SCTP_ST_CR_READ_SOCK                      (0x320|SSL_ST_CONNECT)\n# endif\n/* write to server */\n# define SSL3_ST_CW_CLNT_HELLO_A         (0x110|SSL_ST_CONNECT)\n# define SSL3_ST_CW_CLNT_HELLO_B         (0x111|SSL_ST_CONNECT)\n/* read from server */\n# define SSL3_ST_CR_SRVR_HELLO_A         (0x120|SSL_ST_CONNECT)\n# define SSL3_ST_CR_SRVR_HELLO_B         (0x121|SSL_ST_CONNECT)\n# define DTLS1_ST_CR_HELLO_VERIFY_REQUEST_A (0x126|SSL_ST_CONNECT)\n# define DTLS1_ST_CR_HELLO_VERIFY_REQUEST_B (0x127|SSL_ST_CONNECT)\n# define SSL3_ST_CR_CERT_A               (0x130|SSL_ST_CONNECT)\n# define SSL3_ST_CR_CERT_B               (0x131|SSL_ST_CONNECT)\n# define SSL3_ST_CR_KEY_EXCH_A           (0x140|SSL_ST_CONNECT)\n# define SSL3_ST_CR_KEY_EXCH_B           (0x141|SSL_ST_CONNECT)\n# define SSL3_ST_CR_CERT_REQ_A           (0x150|SSL_ST_CONNECT)\n# define SSL3_ST_CR_CERT_REQ_B           (0x151|SSL_ST_CONNECT)\n# define SSL3_ST_CR_SRVR_DONE_A          (0x160|SSL_ST_CONNECT)\n# define SSL3_ST_CR_SRVR_DONE_B          (0x161|SSL_ST_CONNECT)\n/* write to server */\n# define SSL3_ST_CW_CERT_A               (0x170|SSL_ST_CONNECT)\n# define SSL3_ST_CW_CERT_B               (0x171|SSL_ST_CONNECT)\n# define SSL3_ST_CW_CERT_C               (0x172|SSL_ST_CONNECT)\n# define SSL3_ST_CW_CERT_D               (0x173|SSL_ST_CONNECT)\n# define SSL3_ST_CW_KEY_EXCH_A           (0x180|SSL_ST_CONNECT)\n# define SSL3_ST_CW_KEY_EXCH_B           (0x181|SSL_ST_CONNECT)\n# define SSL3_ST_CW_CERT_VRFY_A          (0x190|SSL_ST_CONNECT)\n# define SSL3_ST_CW_CERT_VRFY_B          (0x191|SSL_ST_CONNECT)\n# define SSL3_ST_CW_CHANGE_A             (0x1A0|SSL_ST_CONNECT)\n# define SSL3_ST_CW_CHANGE_B             (0x1A1|SSL_ST_CONNECT)\n# ifndef OPENSSL_NO_NEXTPROTONEG\n#  define SSL3_ST_CW_NEXT_PROTO_A         (0x200|SSL_ST_CONNECT)\n#  define SSL3_ST_CW_NEXT_PROTO_B         (0x201|SSL_ST_CONNECT)\n# endif\n# define SSL3_ST_CW_FINISHED_A           (0x1B0|SSL_ST_CONNECT)\n# define SSL3_ST_CW_FINISHED_B           (0x1B1|SSL_ST_CONNECT)\n/* read from server */\n# define SSL3_ST_CR_CHANGE_A             (0x1C0|SSL_ST_CONNECT)\n# define SSL3_ST_CR_CHANGE_B             (0x1C1|SSL_ST_CONNECT)\n# define SSL3_ST_CR_FINISHED_A           (0x1D0|SSL_ST_CONNECT)\n# define SSL3_ST_CR_FINISHED_B           (0x1D1|SSL_ST_CONNECT)\n# define SSL3_ST_CR_SESSION_TICKET_A     (0x1E0|SSL_ST_CONNECT)\n# define SSL3_ST_CR_SESSION_TICKET_B     (0x1E1|SSL_ST_CONNECT)\n# define SSL3_ST_CR_CERT_STATUS_A        (0x1F0|SSL_ST_CONNECT)\n# define SSL3_ST_CR_CERT_STATUS_B        (0x1F1|SSL_ST_CONNECT)\n\n/* server */\n/* extra state */\n# define SSL3_ST_SW_FLUSH                (0x100|SSL_ST_ACCEPT)\n# ifndef OPENSSL_NO_SCTP\n#  define DTLS1_SCTP_ST_SW_WRITE_SOCK                     (0x310|SSL_ST_ACCEPT)\n#  define DTLS1_SCTP_ST_SR_READ_SOCK                      (0x320|SSL_ST_ACCEPT)\n# endif\n/* read from client */\n/* Do not change the number values, they do matter */\n# define SSL3_ST_SR_CLNT_HELLO_A         (0x110|SSL_ST_ACCEPT)\n# define SSL3_ST_SR_CLNT_HELLO_B         (0x111|SSL_ST_ACCEPT)\n# define SSL3_ST_SR_CLNT_HELLO_C         (0x112|SSL_ST_ACCEPT)\n/* write to client */\n# define DTLS1_ST_SW_HELLO_VERIFY_REQUEST_A (0x113|SSL_ST_ACCEPT)\n# define DTLS1_ST_SW_HELLO_VERIFY_REQUEST_B (0x114|SSL_ST_ACCEPT)\n# define SSL3_ST_SW_HELLO_REQ_A          (0x120|SSL_ST_ACCEPT)\n# define SSL3_ST_SW_HELLO_REQ_B          (0x121|SSL_ST_ACCEPT)\n# define SSL3_ST_SW_HELLO_REQ_C          (0x122|SSL_ST_ACCEPT)\n# define SSL3_ST_SW_SRVR_HELLO_A         (0x130|SSL_ST_ACCEPT)\n# define SSL3_ST_SW_SRVR_HELLO_B         (0x131|SSL_ST_ACCEPT)\n# define SSL3_ST_SW_CERT_A               (0x140|SSL_ST_ACCEPT)\n# define SSL3_ST_SW_CERT_B               (0x141|SSL_ST_ACCEPT)\n# define SSL3_ST_SW_KEY_EXCH_A           (0x150|SSL_ST_ACCEPT)\n# define SSL3_ST_SW_KEY_EXCH_B           (0x151|SSL_ST_ACCEPT)\n# define SSL3_ST_SW_CERT_REQ_A           (0x160|SSL_ST_ACCEPT)\n# define SSL3_ST_SW_CERT_REQ_B           (0x161|SSL_ST_ACCEPT)\n# define SSL3_ST_SW_SRVR_DONE_A          (0x170|SSL_ST_ACCEPT)\n# define SSL3_ST_SW_SRVR_DONE_B          (0x171|SSL_ST_ACCEPT)\n/* read from client */\n# define SSL3_ST_SR_CERT_A               (0x180|SSL_ST_ACCEPT)\n# define SSL3_ST_SR_CERT_B               (0x181|SSL_ST_ACCEPT)\n# define SSL3_ST_SR_KEY_EXCH_A           (0x190|SSL_ST_ACCEPT)\n# define SSL3_ST_SR_KEY_EXCH_B           (0x191|SSL_ST_ACCEPT)\n# define SSL3_ST_SR_CERT_VRFY_A          (0x1A0|SSL_ST_ACCEPT)\n# define SSL3_ST_SR_CERT_VRFY_B          (0x1A1|SSL_ST_ACCEPT)\n# define SSL3_ST_SR_CHANGE_A             (0x1B0|SSL_ST_ACCEPT)\n# define SSL3_ST_SR_CHANGE_B             (0x1B1|SSL_ST_ACCEPT)\n# ifndef OPENSSL_NO_NEXTPROTONEG\n#  define SSL3_ST_SR_NEXT_PROTO_A         (0x210|SSL_ST_ACCEPT)\n#  define SSL3_ST_SR_NEXT_PROTO_B         (0x211|SSL_ST_ACCEPT)\n# endif\n# define SSL3_ST_SR_FINISHED_A           (0x1C0|SSL_ST_ACCEPT)\n# define SSL3_ST_SR_FINISHED_B           (0x1C1|SSL_ST_ACCEPT)\n/* write to client */\n# define SSL3_ST_SW_CHANGE_A             (0x1D0|SSL_ST_ACCEPT)\n# define SSL3_ST_SW_CHANGE_B             (0x1D1|SSL_ST_ACCEPT)\n# define SSL3_ST_SW_FINISHED_A           (0x1E0|SSL_ST_ACCEPT)\n# define SSL3_ST_SW_FINISHED_B           (0x1E1|SSL_ST_ACCEPT)\n# define SSL3_ST_SW_SESSION_TICKET_A     (0x1F0|SSL_ST_ACCEPT)\n# define SSL3_ST_SW_SESSION_TICKET_B     (0x1F1|SSL_ST_ACCEPT)\n# define SSL3_ST_SW_CERT_STATUS_A        (0x200|SSL_ST_ACCEPT)\n# define SSL3_ST_SW_CERT_STATUS_B        (0x201|SSL_ST_ACCEPT)\n\n# define SSL3_MT_HELLO_REQUEST                   0\n# define SSL3_MT_CLIENT_HELLO                    1\n# define SSL3_MT_SERVER_HELLO                    2\n# define SSL3_MT_NEWSESSION_TICKET               4\n# define SSL3_MT_CERTIFICATE                     11\n# define SSL3_MT_SERVER_KEY_EXCHANGE             12\n# define SSL3_MT_CERTIFICATE_REQUEST             13\n# define SSL3_MT_SERVER_DONE                     14\n# define SSL3_MT_CERTIFICATE_VERIFY              15\n# define SSL3_MT_CLIENT_KEY_EXCHANGE             16\n# define SSL3_MT_FINISHED                        20\n# define SSL3_MT_CERTIFICATE_STATUS              22\n# ifndef OPENSSL_NO_NEXTPROTONEG\n#  define SSL3_MT_NEXT_PROTO                      67\n# endif\n# define DTLS1_MT_HELLO_VERIFY_REQUEST    3\n\n# define SSL3_MT_CCS                             1\n\n/* These are used when changing over to a new cipher */\n# define SSL3_CC_READ            0x01\n# define SSL3_CC_WRITE           0x02\n# define SSL3_CC_CLIENT          0x10\n# define SSL3_CC_SERVER          0x20\n# define SSL3_CHANGE_CIPHER_CLIENT_WRITE (SSL3_CC_CLIENT|SSL3_CC_WRITE)\n# define SSL3_CHANGE_CIPHER_SERVER_READ  (SSL3_CC_SERVER|SSL3_CC_READ)\n# define SSL3_CHANGE_CIPHER_CLIENT_READ  (SSL3_CC_CLIENT|SSL3_CC_READ)\n# define SSL3_CHANGE_CIPHER_SERVER_WRITE (SSL3_CC_SERVER|SSL3_CC_WRITE)\n\n#ifdef  __cplusplus\n}\n#endif\n#endif\n"
  },
  {
    "path": "Pods/OpenSSL-Universal/include-ios/openssl/stack.h",
    "content": "/* crypto/stack/stack.h */\n/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)\n * All rights reserved.\n *\n * This package is an SSL implementation written\n * by Eric Young (eay@cryptsoft.com).\n * The implementation was written so as to conform with Netscapes SSL.\n *\n * This library is free for commercial and non-commercial use as long as\n * the following conditions are aheared to.  The following conditions\n * apply to all code found in this distribution, be it the RC4, RSA,\n * lhash, DES, etc., code; not just the SSL code.  The SSL documentation\n * included with this distribution is covered by the same copyright terms\n * except that the holder is Tim Hudson (tjh@cryptsoft.com).\n *\n * Copyright remains Eric Young's, and as such any Copyright notices in\n * the code are not to be removed.\n * If this package is used in a product, Eric Young should be given attribution\n * as the author of the parts of the library used.\n * This can be in the form of a textual message at program startup or\n * in documentation (online or textual) provided with the package.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n * 1. Redistributions of source code must retain the copyright\n *    notice, this list of conditions and the following disclaimer.\n * 2. Redistributions in binary form must reproduce the above copyright\n *    notice, this list of conditions and the following disclaimer in the\n *    documentation and/or other materials provided with the distribution.\n * 3. All advertising materials mentioning features or use of this software\n *    must display the following acknowledgement:\n *    \"This product includes cryptographic software written by\n *     Eric Young (eay@cryptsoft.com)\"\n *    The word 'cryptographic' can be left out if the rouines from the library\n *    being used are not cryptographic related :-).\n * 4. If you include any Windows specific code (or a derivative thereof) from\n *    the apps directory (application code) you must include an acknowledgement:\n *    \"This product includes software written by Tim Hudson (tjh@cryptsoft.com)\"\n *\n * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND\n * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE\n * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n * SUCH DAMAGE.\n *\n * The licence and distribution terms for any publically available version or\n * derivative of this code cannot be changed.  i.e. this code cannot simply be\n * copied and put under another distribution licence\n * [including the GNU Public Licence.]\n */\n\n#ifndef HEADER_STACK_H\n# define HEADER_STACK_H\n\n#ifdef  __cplusplus\nextern \"C\" {\n#endif\n\ntypedef struct stack_st {\n    int num;\n    char **data;\n    int sorted;\n    int num_alloc;\n    int (*comp) (const void *, const void *);\n} _STACK;                       /* Use STACK_OF(...) instead */\n\n# define M_sk_num(sk)            ((sk) ? (sk)->num:-1)\n# define M_sk_value(sk,n)        ((sk) ? (sk)->data[n] : NULL)\n\nint sk_num(const _STACK *);\nvoid *sk_value(const _STACK *, int);\n\nvoid *sk_set(_STACK *, int, void *);\n\n_STACK *sk_new(int (*cmp) (const void *, const void *));\n_STACK *sk_new_null(void);\nvoid sk_free(_STACK *);\nvoid sk_pop_free(_STACK *st, void (*func) (void *));\nint sk_insert(_STACK *sk, void *data, int where);\nvoid *sk_delete(_STACK *st, int loc);\nvoid *sk_delete_ptr(_STACK *st, void *p);\nint sk_find(_STACK *st, void *data);\nint sk_find_ex(_STACK *st, void *data);\nint sk_push(_STACK *st, void *data);\nint sk_unshift(_STACK *st, void *data);\nvoid *sk_shift(_STACK *st);\nvoid *sk_pop(_STACK *st);\nvoid sk_zero(_STACK *st);\nint (*sk_set_cmp_func(_STACK *sk, int (*c) (const void *, const void *)))\n (const void *, const void *);\n_STACK *sk_dup(_STACK *st);\nvoid sk_sort(_STACK *st);\nint sk_is_sorted(const _STACK *st);\n\n#ifdef  __cplusplus\n}\n#endif\n\n#endif\n"
  },
  {
    "path": "Pods/OpenSSL-Universal/include-ios/openssl/symhacks.h",
    "content": "/* ====================================================================\n * Copyright (c) 1999 The OpenSSL Project.  All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n *\n * 1. Redistributions of source code must retain the above copyright\n *    notice, this list of conditions and the following disclaimer.\n *\n * 2. Redistributions in binary form must reproduce the above copyright\n *    notice, this list of conditions and the following disclaimer in\n *    the documentation and/or other materials provided with the\n *    distribution.\n *\n * 3. All advertising materials mentioning features or use of this\n *    software must display the following acknowledgment:\n *    \"This product includes software developed by the OpenSSL Project\n *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)\"\n *\n * 4. The names \"OpenSSL Toolkit\" and \"OpenSSL Project\" must not be used to\n *    endorse or promote products derived from this software without\n *    prior written permission. For written permission, please contact\n *    openssl-core@openssl.org.\n *\n * 5. Products derived from this software may not be called \"OpenSSL\"\n *    nor may \"OpenSSL\" appear in their names without prior written\n *    permission of the OpenSSL Project.\n *\n * 6. Redistributions of any form whatsoever must retain the following\n *    acknowledgment:\n *    \"This product includes software developed by the OpenSSL Project\n *    for use in the OpenSSL Toolkit (http://www.openssl.org/)\"\n *\n * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY\n * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\n * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR\n * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,\n * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED\n * OF THE POSSIBILITY OF SUCH DAMAGE.\n * ====================================================================\n *\n * This product includes cryptographic software written by Eric Young\n * (eay@cryptsoft.com).  This product includes software written by Tim\n * Hudson (tjh@cryptsoft.com).\n *\n */\n\n#ifndef HEADER_SYMHACKS_H\n# define HEADER_SYMHACKS_H\n\n# include <openssl/e_os2.h>\n\n/*\n * Hacks to solve the problem with linkers incapable of handling very long\n * symbol names.  In the case of VMS, the limit is 31 characters on VMS for\n * VAX.\n */\n/*\n * Note that this affects util/libeay.num and util/ssleay.num...  you may\n * change those manually, but that's not recommended, as those files are\n * controlled centrally and updated on Unix, and the central definition may\n * disagree with yours, which in turn may come with shareable library\n * incompatibilities.\n */\n# ifdef OPENSSL_SYS_VMS\n\n/* Hack a long name in crypto/ex_data.c */\n#  undef CRYPTO_get_ex_data_implementation\n#  define CRYPTO_get_ex_data_implementation       CRYPTO_get_ex_data_impl\n#  undef CRYPTO_set_ex_data_implementation\n#  define CRYPTO_set_ex_data_implementation       CRYPTO_set_ex_data_impl\n\n/* Hack a long name in crypto/asn1/a_mbstr.c */\n#  undef ASN1_STRING_set_default_mask_asc\n#  define ASN1_STRING_set_default_mask_asc        ASN1_STRING_set_def_mask_asc\n\n#  if 0                         /* No longer needed, since safestack macro\n                                 * magic does the job */\n/* Hack the names created with DECLARE_ASN1_SET_OF(PKCS7_SIGNER_INFO) */\n#   undef i2d_ASN1_SET_OF_PKCS7_SIGNER_INFO\n#   define i2d_ASN1_SET_OF_PKCS7_SIGNER_INFO       i2d_ASN1_SET_OF_PKCS7_SIGINF\n#   undef d2i_ASN1_SET_OF_PKCS7_SIGNER_INFO\n#   define d2i_ASN1_SET_OF_PKCS7_SIGNER_INFO       d2i_ASN1_SET_OF_PKCS7_SIGINF\n#  endif\n\n#  if 0                         /* No longer needed, since safestack macro\n                                 * magic does the job */\n/* Hack the names created with DECLARE_ASN1_SET_OF(PKCS7_RECIP_INFO) */\n#   undef i2d_ASN1_SET_OF_PKCS7_RECIP_INFO\n#   define i2d_ASN1_SET_OF_PKCS7_RECIP_INFO        i2d_ASN1_SET_OF_PKCS7_RECINF\n#   undef d2i_ASN1_SET_OF_PKCS7_RECIP_INFO\n#   define d2i_ASN1_SET_OF_PKCS7_RECIP_INFO        d2i_ASN1_SET_OF_PKCS7_RECINF\n#  endif\n\n#  if 0                         /* No longer needed, since safestack macro\n                                 * magic does the job */\n/* Hack the names created with DECLARE_ASN1_SET_OF(ACCESS_DESCRIPTION) */\n#   undef i2d_ASN1_SET_OF_ACCESS_DESCRIPTION\n#   define i2d_ASN1_SET_OF_ACCESS_DESCRIPTION      i2d_ASN1_SET_OF_ACC_DESC\n#   undef d2i_ASN1_SET_OF_ACCESS_DESCRIPTION\n#   define d2i_ASN1_SET_OF_ACCESS_DESCRIPTION      d2i_ASN1_SET_OF_ACC_DESC\n#  endif\n\n/* Hack the names created with DECLARE_PEM_rw(NETSCAPE_CERT_SEQUENCE) */\n#  undef PEM_read_NETSCAPE_CERT_SEQUENCE\n#  define PEM_read_NETSCAPE_CERT_SEQUENCE         PEM_read_NS_CERT_SEQ\n#  undef PEM_write_NETSCAPE_CERT_SEQUENCE\n#  define PEM_write_NETSCAPE_CERT_SEQUENCE        PEM_write_NS_CERT_SEQ\n#  undef PEM_read_bio_NETSCAPE_CERT_SEQUENCE\n#  define PEM_read_bio_NETSCAPE_CERT_SEQUENCE     PEM_read_bio_NS_CERT_SEQ\n#  undef PEM_write_bio_NETSCAPE_CERT_SEQUENCE\n#  define PEM_write_bio_NETSCAPE_CERT_SEQUENCE    PEM_write_bio_NS_CERT_SEQ\n#  undef PEM_write_cb_bio_NETSCAPE_CERT_SEQUENCE\n#  define PEM_write_cb_bio_NETSCAPE_CERT_SEQUENCE PEM_write_cb_bio_NS_CERT_SEQ\n\n/* Hack the names created with DECLARE_PEM_rw(PKCS8_PRIV_KEY_INFO) */\n#  undef PEM_read_PKCS8_PRIV_KEY_INFO\n#  define PEM_read_PKCS8_PRIV_KEY_INFO            PEM_read_P8_PRIV_KEY_INFO\n#  undef PEM_write_PKCS8_PRIV_KEY_INFO\n#  define PEM_write_PKCS8_PRIV_KEY_INFO           PEM_write_P8_PRIV_KEY_INFO\n#  undef PEM_read_bio_PKCS8_PRIV_KEY_INFO\n#  define PEM_read_bio_PKCS8_PRIV_KEY_INFO        PEM_read_bio_P8_PRIV_KEY_INFO\n#  undef PEM_write_bio_PKCS8_PRIV_KEY_INFO\n#  define PEM_write_bio_PKCS8_PRIV_KEY_INFO       PEM_write_bio_P8_PRIV_KEY_INFO\n#  undef PEM_write_cb_bio_PKCS8_PRIV_KEY_INFO\n#  define PEM_write_cb_bio_PKCS8_PRIV_KEY_INFO    PEM_wrt_cb_bio_P8_PRIV_KEY_INFO\n\n/* Hack other PEM names */\n#  undef PEM_write_bio_PKCS8PrivateKey_nid\n#  define PEM_write_bio_PKCS8PrivateKey_nid       PEM_write_bio_PKCS8PrivKey_nid\n\n/* Hack some long X509 names */\n#  undef X509_REVOKED_get_ext_by_critical\n#  define X509_REVOKED_get_ext_by_critical        X509_REVOKED_get_ext_by_critic\n#  undef X509_policy_tree_get0_user_policies\n#  define X509_policy_tree_get0_user_policies     X509_pcy_tree_get0_usr_policies\n#  undef X509_policy_node_get0_qualifiers\n#  define X509_policy_node_get0_qualifiers        X509_pcy_node_get0_qualifiers\n#  undef X509_STORE_CTX_get_explicit_policy\n#  define X509_STORE_CTX_get_explicit_policy      X509_STORE_CTX_get_expl_policy\n#  undef X509_STORE_CTX_get0_current_issuer\n#  define X509_STORE_CTX_get0_current_issuer      X509_STORE_CTX_get0_cur_issuer\n\n/* Hack some long CRYPTO names */\n#  undef CRYPTO_set_dynlock_destroy_callback\n#  define CRYPTO_set_dynlock_destroy_callback     CRYPTO_set_dynlock_destroy_cb\n#  undef CRYPTO_set_dynlock_create_callback\n#  define CRYPTO_set_dynlock_create_callback      CRYPTO_set_dynlock_create_cb\n#  undef CRYPTO_set_dynlock_lock_callback\n#  define CRYPTO_set_dynlock_lock_callback        CRYPTO_set_dynlock_lock_cb\n#  undef CRYPTO_get_dynlock_lock_callback\n#  define CRYPTO_get_dynlock_lock_callback        CRYPTO_get_dynlock_lock_cb\n#  undef CRYPTO_get_dynlock_destroy_callback\n#  define CRYPTO_get_dynlock_destroy_callback     CRYPTO_get_dynlock_destroy_cb\n#  undef CRYPTO_get_dynlock_create_callback\n#  define CRYPTO_get_dynlock_create_callback      CRYPTO_get_dynlock_create_cb\n#  undef CRYPTO_set_locked_mem_ex_functions\n#  define CRYPTO_set_locked_mem_ex_functions      CRYPTO_set_locked_mem_ex_funcs\n#  undef CRYPTO_get_locked_mem_ex_functions\n#  define CRYPTO_get_locked_mem_ex_functions      CRYPTO_get_locked_mem_ex_funcs\n\n/* Hack some long SSL names */\n#  undef SSL_CTX_set_default_verify_paths\n#  define SSL_CTX_set_default_verify_paths        SSL_CTX_set_def_verify_paths\n#  undef SSL_get_ex_data_X509_STORE_CTX_idx\n#  define SSL_get_ex_data_X509_STORE_CTX_idx      SSL_get_ex_d_X509_STORE_CTX_idx\n#  undef SSL_add_file_cert_subjects_to_stack\n#  define SSL_add_file_cert_subjects_to_stack     SSL_add_file_cert_subjs_to_stk\n#  undef SSL_add_dir_cert_subjects_to_stack\n#  define SSL_add_dir_cert_subjects_to_stack      SSL_add_dir_cert_subjs_to_stk\n#  undef SSL_CTX_use_certificate_chain_file\n#  define SSL_CTX_use_certificate_chain_file      SSL_CTX_use_cert_chain_file\n#  undef SSL_CTX_set_cert_verify_callback\n#  define SSL_CTX_set_cert_verify_callback        SSL_CTX_set_cert_verify_cb\n#  undef SSL_CTX_set_default_passwd_cb_userdata\n#  define SSL_CTX_set_default_passwd_cb_userdata  SSL_CTX_set_def_passwd_cb_ud\n#  undef SSL_COMP_get_compression_methods\n#  define SSL_COMP_get_compression_methods        SSL_COMP_get_compress_methods\n#  undef ssl_add_clienthello_renegotiate_ext\n#  define ssl_add_clienthello_renegotiate_ext     ssl_add_clienthello_reneg_ext\n#  undef ssl_add_serverhello_renegotiate_ext\n#  define ssl_add_serverhello_renegotiate_ext     ssl_add_serverhello_reneg_ext\n#  undef ssl_parse_clienthello_renegotiate_ext\n#  define ssl_parse_clienthello_renegotiate_ext   ssl_parse_clienthello_reneg_ext\n#  undef ssl_parse_serverhello_renegotiate_ext\n#  define ssl_parse_serverhello_renegotiate_ext   ssl_parse_serverhello_reneg_ext\n#  undef SSL_srp_server_param_with_username\n#  define SSL_srp_server_param_with_username      SSL_srp_server_param_with_un\n#  undef SSL_CTX_set_srp_client_pwd_callback\n#  define SSL_CTX_set_srp_client_pwd_callback     SSL_CTX_set_srp_client_pwd_cb\n#  undef SSL_CTX_set_srp_verify_param_callback\n#  define SSL_CTX_set_srp_verify_param_callback   SSL_CTX_set_srp_vfy_param_cb\n#  undef SSL_CTX_set_srp_username_callback\n#  define SSL_CTX_set_srp_username_callback       SSL_CTX_set_srp_un_cb\n#  undef ssl_add_clienthello_use_srtp_ext\n#  define ssl_add_clienthello_use_srtp_ext        ssl_add_clihello_use_srtp_ext\n#  undef ssl_add_serverhello_use_srtp_ext\n#  define ssl_add_serverhello_use_srtp_ext        ssl_add_serhello_use_srtp_ext\n#  undef ssl_parse_clienthello_use_srtp_ext\n#  define ssl_parse_clienthello_use_srtp_ext      ssl_parse_clihello_use_srtp_ext\n#  undef ssl_parse_serverhello_use_srtp_ext\n#  define ssl_parse_serverhello_use_srtp_ext      ssl_parse_serhello_use_srtp_ext\n#  undef SSL_CTX_set_next_protos_advertised_cb\n#  define SSL_CTX_set_next_protos_advertised_cb   SSL_CTX_set_next_protos_adv_cb\n#  undef SSL_CTX_set_next_proto_select_cb\n#  define SSL_CTX_set_next_proto_select_cb        SSL_CTX_set_next_proto_sel_cb\n#  undef ssl3_cbc_record_digest_supported\n#  define ssl3_cbc_record_digest_supported        ssl3_cbc_record_digest_support\n#  undef ssl_check_clienthello_tlsext_late\n#  define ssl_check_clienthello_tlsext_late       ssl_check_clihello_tlsext_late\n#  undef ssl_check_clienthello_tlsext_early\n#  define ssl_check_clienthello_tlsext_early      ssl_check_clihello_tlsext_early\n\n/* Hack some long ENGINE names */\n#  undef ENGINE_get_default_BN_mod_exp_crt\n#  define ENGINE_get_default_BN_mod_exp_crt       ENGINE_get_def_BN_mod_exp_crt\n#  undef ENGINE_set_default_BN_mod_exp_crt\n#  define ENGINE_set_default_BN_mod_exp_crt       ENGINE_set_def_BN_mod_exp_crt\n#  undef ENGINE_set_load_privkey_function\n#  define ENGINE_set_load_privkey_function        ENGINE_set_load_privkey_fn\n#  undef ENGINE_get_load_privkey_function\n#  define ENGINE_get_load_privkey_function        ENGINE_get_load_privkey_fn\n#  undef ENGINE_unregister_pkey_asn1_meths\n#  define ENGINE_unregister_pkey_asn1_meths       ENGINE_unreg_pkey_asn1_meths\n#  undef ENGINE_register_all_pkey_asn1_meths\n#  define ENGINE_register_all_pkey_asn1_meths     ENGINE_reg_all_pkey_asn1_meths\n#  undef ENGINE_set_default_pkey_asn1_meths\n#  define ENGINE_set_default_pkey_asn1_meths      ENGINE_set_def_pkey_asn1_meths\n#  undef ENGINE_get_pkey_asn1_meth_engine\n#  define ENGINE_get_pkey_asn1_meth_engine        ENGINE_get_pkey_asn1_meth_eng\n#  undef ENGINE_set_load_ssl_client_cert_function\n#  define ENGINE_set_load_ssl_client_cert_function \\\n                                                ENGINE_set_ld_ssl_clnt_cert_fn\n#  undef ENGINE_get_ssl_client_cert_function\n#  define ENGINE_get_ssl_client_cert_function     ENGINE_get_ssl_client_cert_fn\n\n/* Hack some long OCSP names */\n#  undef OCSP_REQUEST_get_ext_by_critical\n#  define OCSP_REQUEST_get_ext_by_critical        OCSP_REQUEST_get_ext_by_crit\n#  undef OCSP_BASICRESP_get_ext_by_critical\n#  define OCSP_BASICRESP_get_ext_by_critical      OCSP_BASICRESP_get_ext_by_crit\n#  undef OCSP_SINGLERESP_get_ext_by_critical\n#  define OCSP_SINGLERESP_get_ext_by_critical     OCSP_SINGLERESP_get_ext_by_crit\n\n/* Hack some long DES names */\n#  undef _ossl_old_des_ede3_cfb64_encrypt\n#  define _ossl_old_des_ede3_cfb64_encrypt        _ossl_odes_ede3_cfb64_encrypt\n#  undef _ossl_old_des_ede3_ofb64_encrypt\n#  define _ossl_old_des_ede3_ofb64_encrypt        _ossl_odes_ede3_ofb64_encrypt\n\n/* Hack some long EVP names */\n#  undef OPENSSL_add_all_algorithms_noconf\n#  define OPENSSL_add_all_algorithms_noconf       OPENSSL_add_all_algo_noconf\n#  undef OPENSSL_add_all_algorithms_conf\n#  define OPENSSL_add_all_algorithms_conf         OPENSSL_add_all_algo_conf\n#  undef EVP_PKEY_meth_set_verify_recover\n#  define EVP_PKEY_meth_set_verify_recover        EVP_PKEY_meth_set_vrfy_recover\n\n/* Hack some long EC names */\n#  undef EC_GROUP_set_point_conversion_form\n#  define EC_GROUP_set_point_conversion_form      EC_GROUP_set_point_conv_form\n#  undef EC_GROUP_get_point_conversion_form\n#  define EC_GROUP_get_point_conversion_form      EC_GROUP_get_point_conv_form\n#  undef EC_GROUP_clear_free_all_extra_data\n#  define EC_GROUP_clear_free_all_extra_data      EC_GROUP_clr_free_all_xtra_data\n#  undef EC_KEY_set_public_key_affine_coordinates\n#  define EC_KEY_set_public_key_affine_coordinates \\\n                                                EC_KEY_set_pub_key_aff_coords\n#  undef EC_POINT_set_Jprojective_coordinates_GFp\n#  define EC_POINT_set_Jprojective_coordinates_GFp \\\n                                                EC_POINT_set_Jproj_coords_GFp\n#  undef EC_POINT_get_Jprojective_coordinates_GFp\n#  define EC_POINT_get_Jprojective_coordinates_GFp \\\n                                                EC_POINT_get_Jproj_coords_GFp\n#  undef EC_POINT_set_affine_coordinates_GFp\n#  define EC_POINT_set_affine_coordinates_GFp     EC_POINT_set_affine_coords_GFp\n#  undef EC_POINT_get_affine_coordinates_GFp\n#  define EC_POINT_get_affine_coordinates_GFp     EC_POINT_get_affine_coords_GFp\n#  undef EC_POINT_set_compressed_coordinates_GFp\n#  define EC_POINT_set_compressed_coordinates_GFp EC_POINT_set_compr_coords_GFp\n#  undef EC_POINT_set_affine_coordinates_GF2m\n#  define EC_POINT_set_affine_coordinates_GF2m    EC_POINT_set_affine_coords_GF2m\n#  undef EC_POINT_get_affine_coordinates_GF2m\n#  define EC_POINT_get_affine_coordinates_GF2m    EC_POINT_get_affine_coords_GF2m\n#  undef EC_POINT_set_compressed_coordinates_GF2m\n#  define EC_POINT_set_compressed_coordinates_GF2m \\\n                                                EC_POINT_set_compr_coords_GF2m\n#  undef ec_GF2m_simple_group_clear_finish\n#  define ec_GF2m_simple_group_clear_finish       ec_GF2m_simple_grp_clr_finish\n#  undef ec_GF2m_simple_group_check_discriminant\n#  define ec_GF2m_simple_group_check_discriminant ec_GF2m_simple_grp_chk_discrim\n#  undef ec_GF2m_simple_point_clear_finish\n#  define ec_GF2m_simple_point_clear_finish       ec_GF2m_simple_pt_clr_finish\n#  undef ec_GF2m_simple_point_set_to_infinity\n#  define ec_GF2m_simple_point_set_to_infinity    ec_GF2m_simple_pt_set_to_inf\n#  undef ec_GF2m_simple_points_make_affine\n#  define ec_GF2m_simple_points_make_affine       ec_GF2m_simple_pts_make_affine\n#  undef ec_GF2m_simple_point_set_affine_coordinates\n#  define ec_GF2m_simple_point_set_affine_coordinates \\\n                                                ec_GF2m_smp_pt_set_af_coords\n#  undef ec_GF2m_simple_point_get_affine_coordinates\n#  define ec_GF2m_simple_point_get_affine_coordinates \\\n                                                ec_GF2m_smp_pt_get_af_coords\n#  undef ec_GF2m_simple_set_compressed_coordinates\n#  define ec_GF2m_simple_set_compressed_coordinates \\\n                                                ec_GF2m_smp_set_compr_coords\n#  undef ec_GFp_simple_group_set_curve_GFp\n#  define ec_GFp_simple_group_set_curve_GFp       ec_GFp_simple_grp_set_curve_GFp\n#  undef ec_GFp_simple_group_get_curve_GFp\n#  define ec_GFp_simple_group_get_curve_GFp       ec_GFp_simple_grp_get_curve_GFp\n#  undef ec_GFp_simple_group_clear_finish\n#  define ec_GFp_simple_group_clear_finish        ec_GFp_simple_grp_clear_finish\n#  undef ec_GFp_simple_group_set_generator\n#  define ec_GFp_simple_group_set_generator       ec_GFp_simple_grp_set_generator\n#  undef ec_GFp_simple_group_get0_generator\n#  define ec_GFp_simple_group_get0_generator      ec_GFp_simple_grp_gt0_generator\n#  undef ec_GFp_simple_group_get_cofactor\n#  define ec_GFp_simple_group_get_cofactor        ec_GFp_simple_grp_get_cofactor\n#  undef ec_GFp_simple_point_clear_finish\n#  define ec_GFp_simple_point_clear_finish        ec_GFp_simple_pt_clear_finish\n#  undef ec_GFp_simple_point_set_to_infinity\n#  define ec_GFp_simple_point_set_to_infinity     ec_GFp_simple_pt_set_to_inf\n#  undef ec_GFp_simple_points_make_affine\n#  define ec_GFp_simple_points_make_affine        ec_GFp_simple_pts_make_affine\n#  undef ec_GFp_simple_set_Jprojective_coordinates_GFp\n#  define ec_GFp_simple_set_Jprojective_coordinates_GFp \\\n                                                ec_GFp_smp_set_Jproj_coords_GFp\n#  undef ec_GFp_simple_get_Jprojective_coordinates_GFp\n#  define ec_GFp_simple_get_Jprojective_coordinates_GFp \\\n                                                ec_GFp_smp_get_Jproj_coords_GFp\n#  undef ec_GFp_simple_point_set_affine_coordinates_GFp\n#  define ec_GFp_simple_point_set_affine_coordinates_GFp \\\n                                                ec_GFp_smp_pt_set_af_coords_GFp\n#  undef ec_GFp_simple_point_get_affine_coordinates_GFp\n#  define ec_GFp_simple_point_get_affine_coordinates_GFp \\\n                                                ec_GFp_smp_pt_get_af_coords_GFp\n#  undef ec_GFp_simple_set_compressed_coordinates_GFp\n#  define ec_GFp_simple_set_compressed_coordinates_GFp \\\n                                                ec_GFp_smp_set_compr_coords_GFp\n#  undef ec_GFp_simple_point_set_affine_coordinates\n#  define ec_GFp_simple_point_set_affine_coordinates \\\n                                                ec_GFp_smp_pt_set_af_coords\n#  undef ec_GFp_simple_point_get_affine_coordinates\n#  define ec_GFp_simple_point_get_affine_coordinates \\\n                                                ec_GFp_smp_pt_get_af_coords\n#  undef ec_GFp_simple_set_compressed_coordinates\n#  define ec_GFp_simple_set_compressed_coordinates \\\n                                                ec_GFp_smp_set_compr_coords\n#  undef ec_GFp_simple_group_check_discriminant\n#  define ec_GFp_simple_group_check_discriminant  ec_GFp_simple_grp_chk_discrim\n\n/* Hack som long STORE names */\n#  undef STORE_method_set_initialise_function\n#  define STORE_method_set_initialise_function    STORE_meth_set_initialise_fn\n#  undef STORE_method_set_cleanup_function\n#  define STORE_method_set_cleanup_function       STORE_meth_set_cleanup_fn\n#  undef STORE_method_set_generate_function\n#  define STORE_method_set_generate_function      STORE_meth_set_generate_fn\n#  undef STORE_method_set_modify_function\n#  define STORE_method_set_modify_function        STORE_meth_set_modify_fn\n#  undef STORE_method_set_revoke_function\n#  define STORE_method_set_revoke_function        STORE_meth_set_revoke_fn\n#  undef STORE_method_set_delete_function\n#  define STORE_method_set_delete_function        STORE_meth_set_delete_fn\n#  undef STORE_method_set_list_start_function\n#  define STORE_method_set_list_start_function    STORE_meth_set_list_start_fn\n#  undef STORE_method_set_list_next_function\n#  define STORE_method_set_list_next_function     STORE_meth_set_list_next_fn\n#  undef STORE_method_set_list_end_function\n#  define STORE_method_set_list_end_function      STORE_meth_set_list_end_fn\n#  undef STORE_method_set_update_store_function\n#  define STORE_method_set_update_store_function  STORE_meth_set_update_store_fn\n#  undef STORE_method_set_lock_store_function\n#  define STORE_method_set_lock_store_function    STORE_meth_set_lock_store_fn\n#  undef STORE_method_set_unlock_store_function\n#  define STORE_method_set_unlock_store_function  STORE_meth_set_unlock_store_fn\n#  undef STORE_method_get_initialise_function\n#  define STORE_method_get_initialise_function    STORE_meth_get_initialise_fn\n#  undef STORE_method_get_cleanup_function\n#  define STORE_method_get_cleanup_function       STORE_meth_get_cleanup_fn\n#  undef STORE_method_get_generate_function\n#  define STORE_method_get_generate_function      STORE_meth_get_generate_fn\n#  undef STORE_method_get_modify_function\n#  define STORE_method_get_modify_function        STORE_meth_get_modify_fn\n#  undef STORE_method_get_revoke_function\n#  define STORE_method_get_revoke_function        STORE_meth_get_revoke_fn\n#  undef STORE_method_get_delete_function\n#  define STORE_method_get_delete_function        STORE_meth_get_delete_fn\n#  undef STORE_method_get_list_start_function\n#  define STORE_method_get_list_start_function    STORE_meth_get_list_start_fn\n#  undef STORE_method_get_list_next_function\n#  define STORE_method_get_list_next_function     STORE_meth_get_list_next_fn\n#  undef STORE_method_get_list_end_function\n#  define STORE_method_get_list_end_function      STORE_meth_get_list_end_fn\n#  undef STORE_method_get_update_store_function\n#  define STORE_method_get_update_store_function  STORE_meth_get_update_store_fn\n#  undef STORE_method_get_lock_store_function\n#  define STORE_method_get_lock_store_function    STORE_meth_get_lock_store_fn\n#  undef STORE_method_get_unlock_store_function\n#  define STORE_method_get_unlock_store_function  STORE_meth_get_unlock_store_fn\n\n/* Hack some long TS names */\n#  undef TS_RESP_CTX_set_status_info_cond\n#  define TS_RESP_CTX_set_status_info_cond        TS_RESP_CTX_set_stat_info_cond\n#  undef TS_RESP_CTX_set_clock_precision_digits\n#  define TS_RESP_CTX_set_clock_precision_digits  TS_RESP_CTX_set_clk_prec_digits\n#  undef TS_CONF_set_clock_precision_digits\n#  define TS_CONF_set_clock_precision_digits      TS_CONF_set_clk_prec_digits\n\n/* Hack some long CMS names */\n#  undef CMS_RecipientInfo_ktri_get0_algs\n#  define CMS_RecipientInfo_ktri_get0_algs        CMS_RecipInfo_ktri_get0_algs\n#  undef CMS_RecipientInfo_ktri_get0_signer_id\n#  define CMS_RecipientInfo_ktri_get0_signer_id   CMS_RecipInfo_ktri_get0_sigr_id\n#  undef CMS_OtherRevocationInfoFormat_it\n#  define CMS_OtherRevocationInfoFormat_it        CMS_OtherRevocInfoFormat_it\n#  undef CMS_KeyAgreeRecipientIdentifier_it\n#  define CMS_KeyAgreeRecipientIdentifier_it      CMS_KeyAgreeRecipIdentifier_it\n#  undef CMS_OriginatorIdentifierOrKey_it\n#  define CMS_OriginatorIdentifierOrKey_it        CMS_OriginatorIdOrKey_it\n#  undef cms_SignerIdentifier_get0_signer_id\n#  define cms_SignerIdentifier_get0_signer_id     cms_SignerId_get0_signer_id\n\n/* Hack some long DTLS1 names */\n#  undef dtls1_retransmit_buffered_messages\n#  define dtls1_retransmit_buffered_messages      dtls1_retransmit_buffered_msgs\n\n/* Hack some long SRP names */\n#  undef SRP_generate_server_master_secret\n#  define SRP_generate_server_master_secret       SRP_gen_server_master_secret\n#  undef SRP_generate_client_master_secret\n#  define SRP_generate_client_master_secret       SRP_gen_client_master_secret\n\n/* Hack some long UI names */\n#  undef UI_method_get_prompt_constructor\n#  define UI_method_get_prompt_constructor        UI_method_get_prompt_constructr\n#  undef UI_method_set_prompt_constructor\n#  define UI_method_set_prompt_constructor        UI_method_set_prompt_constructr\n\n# endif                         /* defined OPENSSL_SYS_VMS */\n\n/* Case insensitive linking causes problems.... */\n# if defined(OPENSSL_SYS_VMS) || defined(OPENSSL_SYS_OS2)\n#  undef ERR_load_CRYPTO_strings\n#  define ERR_load_CRYPTO_strings                 ERR_load_CRYPTOlib_strings\n#  undef OCSP_crlID_new\n#  define OCSP_crlID_new                          OCSP_crlID2_new\n\n#  undef d2i_ECPARAMETERS\n#  define d2i_ECPARAMETERS                        d2i_UC_ECPARAMETERS\n#  undef i2d_ECPARAMETERS\n#  define i2d_ECPARAMETERS                        i2d_UC_ECPARAMETERS\n#  undef d2i_ECPKPARAMETERS\n#  define d2i_ECPKPARAMETERS                      d2i_UC_ECPKPARAMETERS\n#  undef i2d_ECPKPARAMETERS\n#  define i2d_ECPKPARAMETERS                      i2d_UC_ECPKPARAMETERS\n\n/*\n * These functions do not seem to exist! However, I'm paranoid... Original\n * command in x509v3.h: These functions are being redefined in another\n * directory, and clash when the linker is case-insensitive, so let's hide\n * them a little, by giving them an extra 'o' at the beginning of the name...\n */\n#  undef X509v3_cleanup_extensions\n#  define X509v3_cleanup_extensions               oX509v3_cleanup_extensions\n#  undef X509v3_add_extension\n#  define X509v3_add_extension                    oX509v3_add_extension\n#  undef X509v3_add_netscape_extensions\n#  define X509v3_add_netscape_extensions          oX509v3_add_netscape_extensions\n#  undef X509v3_add_standard_extensions\n#  define X509v3_add_standard_extensions          oX509v3_add_standard_extensions\n\n/* This one clashes with CMS_data_create */\n#  undef cms_Data_create\n#  define cms_Data_create                         priv_cms_Data_create\n\n# endif\n\n#endif                          /* ! defined HEADER_VMS_IDHACKS_H */\n"
  },
  {
    "path": "Pods/OpenSSL-Universal/include-ios/openssl/tls1.h",
    "content": "/* ssl/tls1.h */\n/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)\n * All rights reserved.\n *\n * This package is an SSL implementation written\n * by Eric Young (eay@cryptsoft.com).\n * The implementation was written so as to conform with Netscapes SSL.\n *\n * This library is free for commercial and non-commercial use as long as\n * the following conditions are aheared to.  The following conditions\n * apply to all code found in this distribution, be it the RC4, RSA,\n * lhash, DES, etc., code; not just the SSL code.  The SSL documentation\n * included with this distribution is covered by the same copyright terms\n * except that the holder is Tim Hudson (tjh@cryptsoft.com).\n *\n * Copyright remains Eric Young's, and as such any Copyright notices in\n * the code are not to be removed.\n * If this package is used in a product, Eric Young should be given attribution\n * as the author of the parts of the library used.\n * This can be in the form of a textual message at program startup or\n * in documentation (online or textual) provided with the package.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n * 1. Redistributions of source code must retain the copyright\n *    notice, this list of conditions and the following disclaimer.\n * 2. Redistributions in binary form must reproduce the above copyright\n *    notice, this list of conditions and the following disclaimer in the\n *    documentation and/or other materials provided with the distribution.\n * 3. All advertising materials mentioning features or use of this software\n *    must display the following acknowledgement:\n *    \"This product includes cryptographic software written by\n *     Eric Young (eay@cryptsoft.com)\"\n *    The word 'cryptographic' can be left out if the rouines from the library\n *    being used are not cryptographic related :-).\n * 4. If you include any Windows specific code (or a derivative thereof) from\n *    the apps directory (application code) you must include an acknowledgement:\n *    \"This product includes software written by Tim Hudson (tjh@cryptsoft.com)\"\n *\n * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND\n * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE\n * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n * SUCH DAMAGE.\n *\n * The licence and distribution terms for any publically available version or\n * derivative of this code cannot be changed.  i.e. this code cannot simply be\n * copied and put under another distribution licence\n * [including the GNU Public Licence.]\n */\n/* ====================================================================\n * Copyright (c) 1998-2006 The OpenSSL Project.  All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n *\n * 1. Redistributions of source code must retain the above copyright\n *    notice, this list of conditions and the following disclaimer.\n *\n * 2. Redistributions in binary form must reproduce the above copyright\n *    notice, this list of conditions and the following disclaimer in\n *    the documentation and/or other materials provided with the\n *    distribution.\n *\n * 3. All advertising materials mentioning features or use of this\n *    software must display the following acknowledgment:\n *    \"This product includes software developed by the OpenSSL Project\n *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)\"\n *\n * 4. The names \"OpenSSL Toolkit\" and \"OpenSSL Project\" must not be used to\n *    endorse or promote products derived from this software without\n *    prior written permission. For written permission, please contact\n *    openssl-core@openssl.org.\n *\n * 5. Products derived from this software may not be called \"OpenSSL\"\n *    nor may \"OpenSSL\" appear in their names without prior written\n *    permission of the OpenSSL Project.\n *\n * 6. Redistributions of any form whatsoever must retain the following\n *    acknowledgment:\n *    \"This product includes software developed by the OpenSSL Project\n *    for use in the OpenSSL Toolkit (http://www.openssl.org/)\"\n *\n * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY\n * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\n * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR\n * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,\n * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED\n * OF THE POSSIBILITY OF SUCH DAMAGE.\n * ====================================================================\n *\n * This product includes cryptographic software written by Eric Young\n * (eay@cryptsoft.com).  This product includes software written by Tim\n * Hudson (tjh@cryptsoft.com).\n *\n */\n/* ====================================================================\n * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED.\n *\n * Portions of the attached software (\"Contribution\") are developed by\n * SUN MICROSYSTEMS, INC., and are contributed to the OpenSSL project.\n *\n * The Contribution is licensed pursuant to the OpenSSL open source\n * license provided above.\n *\n * ECC cipher suite support in OpenSSL originally written by\n * Vipul Gupta and Sumit Gupta of Sun Microsystems Laboratories.\n *\n */\n/* ====================================================================\n * Copyright 2005 Nokia. All rights reserved.\n *\n * The portions of the attached software (\"Contribution\") is developed by\n * Nokia Corporation and is licensed pursuant to the OpenSSL open source\n * license.\n *\n * The Contribution, originally written by Mika Kousa and Pasi Eronen of\n * Nokia Corporation, consists of the \"PSK\" (Pre-Shared Key) ciphersuites\n * support (see RFC 4279) to OpenSSL.\n *\n * No patent licenses or other rights except those expressly stated in\n * the OpenSSL open source license shall be deemed granted or received\n * expressly, by implication, estoppel, or otherwise.\n *\n * No assurances are provided by Nokia that the Contribution does not\n * infringe the patent or other intellectual property rights of any third\n * party or that the license provides you with all the necessary rights\n * to make use of the Contribution.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\" WITHOUT WARRANTY OF ANY KIND. IN\n * ADDITION TO THE DISCLAIMERS INCLUDED IN THE LICENSE, NOKIA\n * SPECIFICALLY DISCLAIMS ANY LIABILITY FOR CLAIMS BROUGHT BY YOU OR ANY\n * OTHER ENTITY BASED ON INFRINGEMENT OF INTELLECTUAL PROPERTY RIGHTS OR\n * OTHERWISE.\n */\n\n#ifndef HEADER_TLS1_H\n# define HEADER_TLS1_H\n\n# include <openssl/buffer.h>\n\n#ifdef  __cplusplus\nextern \"C\" {\n#endif\n\n# define TLS1_ALLOW_EXPERIMENTAL_CIPHERSUITES    0\n\n# define TLS1_VERSION                    0x0301\n# define TLS1_1_VERSION                  0x0302\n# define TLS1_2_VERSION                  0x0303\n# define TLS_MAX_VERSION                 TLS1_2_VERSION\n\n# define TLS1_VERSION_MAJOR              0x03\n# define TLS1_VERSION_MINOR              0x01\n\n# define TLS1_1_VERSION_MAJOR            0x03\n# define TLS1_1_VERSION_MINOR            0x02\n\n# define TLS1_2_VERSION_MAJOR            0x03\n# define TLS1_2_VERSION_MINOR            0x03\n\n# define TLS1_get_version(s) \\\n                ((s->version >> 8) == TLS1_VERSION_MAJOR ? s->version : 0)\n\n# define TLS1_get_client_version(s) \\\n                ((s->client_version >> 8) == TLS1_VERSION_MAJOR ? s->client_version : 0)\n\n# define TLS1_AD_DECRYPTION_FAILED       21\n# define TLS1_AD_RECORD_OVERFLOW         22\n# define TLS1_AD_UNKNOWN_CA              48/* fatal */\n# define TLS1_AD_ACCESS_DENIED           49/* fatal */\n# define TLS1_AD_DECODE_ERROR            50/* fatal */\n# define TLS1_AD_DECRYPT_ERROR           51\n# define TLS1_AD_EXPORT_RESTRICTION      60/* fatal */\n# define TLS1_AD_PROTOCOL_VERSION        70/* fatal */\n# define TLS1_AD_INSUFFICIENT_SECURITY   71/* fatal */\n# define TLS1_AD_INTERNAL_ERROR          80/* fatal */\n# define TLS1_AD_INAPPROPRIATE_FALLBACK  86/* fatal */\n# define TLS1_AD_USER_CANCELLED          90\n# define TLS1_AD_NO_RENEGOTIATION        100\n/* codes 110-114 are from RFC3546 */\n# define TLS1_AD_UNSUPPORTED_EXTENSION   110\n# define TLS1_AD_CERTIFICATE_UNOBTAINABLE 111\n# define TLS1_AD_UNRECOGNIZED_NAME       112\n# define TLS1_AD_BAD_CERTIFICATE_STATUS_RESPONSE 113\n# define TLS1_AD_BAD_CERTIFICATE_HASH_VALUE 114\n# define TLS1_AD_UNKNOWN_PSK_IDENTITY    115/* fatal */\n\n/* ExtensionType values from RFC3546 / RFC4366 / RFC6066 */\n# define TLSEXT_TYPE_server_name                 0\n# define TLSEXT_TYPE_max_fragment_length         1\n# define TLSEXT_TYPE_client_certificate_url      2\n# define TLSEXT_TYPE_trusted_ca_keys             3\n# define TLSEXT_TYPE_truncated_hmac              4\n# define TLSEXT_TYPE_status_request              5\n/* ExtensionType values from RFC4681 */\n# define TLSEXT_TYPE_user_mapping                6\n\n/* ExtensionType values from RFC5878 */\n# define TLSEXT_TYPE_client_authz                7\n# define TLSEXT_TYPE_server_authz                8\n\n/* ExtensionType values from RFC6091 */\n# define TLSEXT_TYPE_cert_type           9\n\n/* ExtensionType values from RFC4492 */\n# define TLSEXT_TYPE_elliptic_curves             10\n# define TLSEXT_TYPE_ec_point_formats            11\n\n/* ExtensionType value from RFC5054 */\n# define TLSEXT_TYPE_srp                         12\n\n/* ExtensionType values from RFC5246 */\n# define TLSEXT_TYPE_signature_algorithms        13\n\n/* ExtensionType value from RFC5764 */\n# define TLSEXT_TYPE_use_srtp    14\n\n/* ExtensionType value from RFC5620 */\n# define TLSEXT_TYPE_heartbeat   15\n\n/*\n * ExtensionType value for TLS padding extension.\n * http://tools.ietf.org/html/draft-agl-tls-padding\n */\n# define TLSEXT_TYPE_padding     21\n\n/* ExtensionType value from RFC4507 */\n# define TLSEXT_TYPE_session_ticket              35\n\n/* ExtensionType value from draft-rescorla-tls-opaque-prf-input-00.txt */\n# if 0\n/*\n * will have to be provided externally for now ,\n * i.e. build with -DTLSEXT_TYPE_opaque_prf_input=38183\n * using whatever extension number you'd like to try\n */\n#  define TLSEXT_TYPE_opaque_prf_input           ?? */\n# endif\n\n/* Temporary extension type */\n# define TLSEXT_TYPE_renegotiate                 0xff01\n\n# ifndef OPENSSL_NO_NEXTPROTONEG\n/* This is not an IANA defined extension number */\n#  define TLSEXT_TYPE_next_proto_neg              13172\n# endif\n\n/* NameType value from RFC3546 */\n# define TLSEXT_NAMETYPE_host_name 0\n/* status request value from RFC3546 */\n# define TLSEXT_STATUSTYPE_ocsp 1\n\n/* ECPointFormat values from RFC4492 */\n# define TLSEXT_ECPOINTFORMAT_first                      0\n# define TLSEXT_ECPOINTFORMAT_uncompressed               0\n# define TLSEXT_ECPOINTFORMAT_ansiX962_compressed_prime  1\n# define TLSEXT_ECPOINTFORMAT_ansiX962_compressed_char2  2\n# define TLSEXT_ECPOINTFORMAT_last                       2\n\n/* Signature and hash algorithms from RFC5246 */\n# define TLSEXT_signature_anonymous                      0\n# define TLSEXT_signature_rsa                            1\n# define TLSEXT_signature_dsa                            2\n# define TLSEXT_signature_ecdsa                          3\n\n# define TLSEXT_hash_none                                0\n# define TLSEXT_hash_md5                                 1\n# define TLSEXT_hash_sha1                                2\n# define TLSEXT_hash_sha224                              3\n# define TLSEXT_hash_sha256                              4\n# define TLSEXT_hash_sha384                              5\n# define TLSEXT_hash_sha512                              6\n\n# ifndef OPENSSL_NO_TLSEXT\n\n#  define TLSEXT_MAXLEN_host_name 255\n\nconst char *SSL_get_servername(const SSL *s, const int type);\nint SSL_get_servername_type(const SSL *s);\n/*\n * SSL_export_keying_material exports a value derived from the master secret,\n * as specified in RFC 5705. It writes |olen| bytes to |out| given a label and\n * optional context. (Since a zero length context is allowed, the |use_context|\n * flag controls whether a context is included.) It returns 1 on success and\n * zero otherwise.\n */\nint SSL_export_keying_material(SSL *s, unsigned char *out, size_t olen,\n                               const char *label, size_t llen,\n                               const unsigned char *p, size_t plen,\n                               int use_context);\n\n#  define SSL_set_tlsext_host_name(s,name) \\\nSSL_ctrl(s,SSL_CTRL_SET_TLSEXT_HOSTNAME,TLSEXT_NAMETYPE_host_name,(char *)name)\n\n#  define SSL_set_tlsext_debug_callback(ssl, cb) \\\nSSL_callback_ctrl(ssl,SSL_CTRL_SET_TLSEXT_DEBUG_CB,(void (*)(void))cb)\n\n#  define SSL_set_tlsext_debug_arg(ssl, arg) \\\nSSL_ctrl(ssl,SSL_CTRL_SET_TLSEXT_DEBUG_ARG,0, (void *)arg)\n\n#  define SSL_set_tlsext_status_type(ssl, type) \\\nSSL_ctrl(ssl,SSL_CTRL_SET_TLSEXT_STATUS_REQ_TYPE,type, NULL)\n\n#  define SSL_get_tlsext_status_exts(ssl, arg) \\\nSSL_ctrl(ssl,SSL_CTRL_GET_TLSEXT_STATUS_REQ_EXTS,0, (void *)arg)\n\n#  define SSL_set_tlsext_status_exts(ssl, arg) \\\nSSL_ctrl(ssl,SSL_CTRL_SET_TLSEXT_STATUS_REQ_EXTS,0, (void *)arg)\n\n#  define SSL_get_tlsext_status_ids(ssl, arg) \\\nSSL_ctrl(ssl,SSL_CTRL_GET_TLSEXT_STATUS_REQ_IDS,0, (void *)arg)\n\n#  define SSL_set_tlsext_status_ids(ssl, arg) \\\nSSL_ctrl(ssl,SSL_CTRL_SET_TLSEXT_STATUS_REQ_IDS,0, (void *)arg)\n\n#  define SSL_get_tlsext_status_ocsp_resp(ssl, arg) \\\nSSL_ctrl(ssl,SSL_CTRL_GET_TLSEXT_STATUS_REQ_OCSP_RESP,0, (void *)arg)\n\n#  define SSL_set_tlsext_status_ocsp_resp(ssl, arg, arglen) \\\nSSL_ctrl(ssl,SSL_CTRL_SET_TLSEXT_STATUS_REQ_OCSP_RESP,arglen, (void *)arg)\n\n#  define SSL_CTX_set_tlsext_servername_callback(ctx, cb) \\\nSSL_CTX_callback_ctrl(ctx,SSL_CTRL_SET_TLSEXT_SERVERNAME_CB,(void (*)(void))cb)\n\n#  define SSL_TLSEXT_ERR_OK 0\n#  define SSL_TLSEXT_ERR_ALERT_WARNING 1\n#  define SSL_TLSEXT_ERR_ALERT_FATAL 2\n#  define SSL_TLSEXT_ERR_NOACK 3\n\n#  define SSL_CTX_set_tlsext_servername_arg(ctx, arg) \\\nSSL_CTX_ctrl(ctx,SSL_CTRL_SET_TLSEXT_SERVERNAME_ARG,0, (void *)arg)\n\n#  define SSL_CTX_get_tlsext_ticket_keys(ctx, keys, keylen) \\\n        SSL_CTX_ctrl((ctx),SSL_CTRL_GET_TLSEXT_TICKET_KEYS,(keylen),(keys))\n#  define SSL_CTX_set_tlsext_ticket_keys(ctx, keys, keylen) \\\n        SSL_CTX_ctrl((ctx),SSL_CTRL_SET_TLSEXT_TICKET_KEYS,(keylen),(keys))\n\n#  define SSL_CTX_set_tlsext_status_cb(ssl, cb) \\\nSSL_CTX_callback_ctrl(ssl,SSL_CTRL_SET_TLSEXT_STATUS_REQ_CB,(void (*)(void))cb)\n\n#  define SSL_CTX_set_tlsext_status_arg(ssl, arg) \\\nSSL_CTX_ctrl(ssl,SSL_CTRL_SET_TLSEXT_STATUS_REQ_CB_ARG,0, (void *)arg)\n\n#  define SSL_set_tlsext_opaque_prf_input(s, src, len) \\\nSSL_ctrl(s,SSL_CTRL_SET_TLSEXT_OPAQUE_PRF_INPUT, len, src)\n#  define SSL_CTX_set_tlsext_opaque_prf_input_callback(ctx, cb) \\\nSSL_CTX_callback_ctrl(ctx,SSL_CTRL_SET_TLSEXT_OPAQUE_PRF_INPUT_CB, (void (*)(void))cb)\n#  define SSL_CTX_set_tlsext_opaque_prf_input_callback_arg(ctx, arg) \\\nSSL_CTX_ctrl(ctx,SSL_CTRL_SET_TLSEXT_OPAQUE_PRF_INPUT_CB_ARG, 0, arg)\n\n#  define SSL_CTX_set_tlsext_ticket_key_cb(ssl, cb) \\\nSSL_CTX_callback_ctrl(ssl,SSL_CTRL_SET_TLSEXT_TICKET_KEY_CB,(void (*)(void))cb)\n\n#  ifndef OPENSSL_NO_HEARTBEATS\n#   define SSL_TLSEXT_HB_ENABLED                           0x01\n#   define SSL_TLSEXT_HB_DONT_SEND_REQUESTS        0x02\n#   define SSL_TLSEXT_HB_DONT_RECV_REQUESTS        0x04\n\n#   define SSL_get_tlsext_heartbeat_pending(ssl) \\\n        SSL_ctrl((ssl),SSL_CTRL_GET_TLS_EXT_HEARTBEAT_PENDING,0,NULL)\n#   define SSL_set_tlsext_heartbeat_no_requests(ssl, arg) \\\n        SSL_ctrl((ssl),SSL_CTRL_SET_TLS_EXT_HEARTBEAT_NO_REQUESTS,arg,NULL)\n#  endif\n# endif\n\n/* PSK ciphersuites from 4279 */\n# define TLS1_CK_PSK_WITH_RC4_128_SHA                    0x0300008A\n# define TLS1_CK_PSK_WITH_3DES_EDE_CBC_SHA               0x0300008B\n# define TLS1_CK_PSK_WITH_AES_128_CBC_SHA                0x0300008C\n# define TLS1_CK_PSK_WITH_AES_256_CBC_SHA                0x0300008D\n\n/*\n * Additional TLS ciphersuites from expired Internet Draft\n * draft-ietf-tls-56-bit-ciphersuites-01.txt (available if\n * TLS1_ALLOW_EXPERIMENTAL_CIPHERSUITES is defined, see s3_lib.c).  We\n * actually treat them like SSL 3.0 ciphers, which we probably shouldn't.\n * Note that the first two are actually not in the IDs.\n */\n# define TLS1_CK_RSA_EXPORT1024_WITH_RC4_56_MD5          0x03000060/* not in\n                                                                    * ID */\n# define TLS1_CK_RSA_EXPORT1024_WITH_RC2_CBC_56_MD5      0x03000061/* not in\n                                                                    * ID */\n# define TLS1_CK_RSA_EXPORT1024_WITH_DES_CBC_SHA         0x03000062\n# define TLS1_CK_DHE_DSS_EXPORT1024_WITH_DES_CBC_SHA     0x03000063\n# define TLS1_CK_RSA_EXPORT1024_WITH_RC4_56_SHA          0x03000064\n# define TLS1_CK_DHE_DSS_EXPORT1024_WITH_RC4_56_SHA      0x03000065\n# define TLS1_CK_DHE_DSS_WITH_RC4_128_SHA                0x03000066\n\n/* AES ciphersuites from RFC3268 */\n# define TLS1_CK_RSA_WITH_AES_128_SHA                    0x0300002F\n# define TLS1_CK_DH_DSS_WITH_AES_128_SHA                 0x03000030\n# define TLS1_CK_DH_RSA_WITH_AES_128_SHA                 0x03000031\n# define TLS1_CK_DHE_DSS_WITH_AES_128_SHA                0x03000032\n# define TLS1_CK_DHE_RSA_WITH_AES_128_SHA                0x03000033\n# define TLS1_CK_ADH_WITH_AES_128_SHA                    0x03000034\n\n# define TLS1_CK_RSA_WITH_AES_256_SHA                    0x03000035\n# define TLS1_CK_DH_DSS_WITH_AES_256_SHA                 0x03000036\n# define TLS1_CK_DH_RSA_WITH_AES_256_SHA                 0x03000037\n# define TLS1_CK_DHE_DSS_WITH_AES_256_SHA                0x03000038\n# define TLS1_CK_DHE_RSA_WITH_AES_256_SHA                0x03000039\n# define TLS1_CK_ADH_WITH_AES_256_SHA                    0x0300003A\n\n/* TLS v1.2 ciphersuites */\n# define TLS1_CK_RSA_WITH_NULL_SHA256                    0x0300003B\n# define TLS1_CK_RSA_WITH_AES_128_SHA256                 0x0300003C\n# define TLS1_CK_RSA_WITH_AES_256_SHA256                 0x0300003D\n# define TLS1_CK_DH_DSS_WITH_AES_128_SHA256              0x0300003E\n# define TLS1_CK_DH_RSA_WITH_AES_128_SHA256              0x0300003F\n# define TLS1_CK_DHE_DSS_WITH_AES_128_SHA256             0x03000040\n\n/* Camellia ciphersuites from RFC4132 */\n# define TLS1_CK_RSA_WITH_CAMELLIA_128_CBC_SHA           0x03000041\n# define TLS1_CK_DH_DSS_WITH_CAMELLIA_128_CBC_SHA        0x03000042\n# define TLS1_CK_DH_RSA_WITH_CAMELLIA_128_CBC_SHA        0x03000043\n# define TLS1_CK_DHE_DSS_WITH_CAMELLIA_128_CBC_SHA       0x03000044\n# define TLS1_CK_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA       0x03000045\n# define TLS1_CK_ADH_WITH_CAMELLIA_128_CBC_SHA           0x03000046\n\n/* TLS v1.2 ciphersuites */\n# define TLS1_CK_DHE_RSA_WITH_AES_128_SHA256             0x03000067\n# define TLS1_CK_DH_DSS_WITH_AES_256_SHA256              0x03000068\n# define TLS1_CK_DH_RSA_WITH_AES_256_SHA256              0x03000069\n# define TLS1_CK_DHE_DSS_WITH_AES_256_SHA256             0x0300006A\n# define TLS1_CK_DHE_RSA_WITH_AES_256_SHA256             0x0300006B\n# define TLS1_CK_ADH_WITH_AES_128_SHA256                 0x0300006C\n# define TLS1_CK_ADH_WITH_AES_256_SHA256                 0x0300006D\n\n/* Camellia ciphersuites from RFC4132 */\n# define TLS1_CK_RSA_WITH_CAMELLIA_256_CBC_SHA           0x03000084\n# define TLS1_CK_DH_DSS_WITH_CAMELLIA_256_CBC_SHA        0x03000085\n# define TLS1_CK_DH_RSA_WITH_CAMELLIA_256_CBC_SHA        0x03000086\n# define TLS1_CK_DHE_DSS_WITH_CAMELLIA_256_CBC_SHA       0x03000087\n# define TLS1_CK_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA       0x03000088\n# define TLS1_CK_ADH_WITH_CAMELLIA_256_CBC_SHA           0x03000089\n\n/* SEED ciphersuites from RFC4162 */\n# define TLS1_CK_RSA_WITH_SEED_SHA                       0x03000096\n# define TLS1_CK_DH_DSS_WITH_SEED_SHA                    0x03000097\n# define TLS1_CK_DH_RSA_WITH_SEED_SHA                    0x03000098\n# define TLS1_CK_DHE_DSS_WITH_SEED_SHA                   0x03000099\n# define TLS1_CK_DHE_RSA_WITH_SEED_SHA                   0x0300009A\n# define TLS1_CK_ADH_WITH_SEED_SHA                       0x0300009B\n\n/* TLS v1.2 GCM ciphersuites from RFC5288 */\n# define TLS1_CK_RSA_WITH_AES_128_GCM_SHA256             0x0300009C\n# define TLS1_CK_RSA_WITH_AES_256_GCM_SHA384             0x0300009D\n# define TLS1_CK_DHE_RSA_WITH_AES_128_GCM_SHA256         0x0300009E\n# define TLS1_CK_DHE_RSA_WITH_AES_256_GCM_SHA384         0x0300009F\n# define TLS1_CK_DH_RSA_WITH_AES_128_GCM_SHA256          0x030000A0\n# define TLS1_CK_DH_RSA_WITH_AES_256_GCM_SHA384          0x030000A1\n# define TLS1_CK_DHE_DSS_WITH_AES_128_GCM_SHA256         0x030000A2\n# define TLS1_CK_DHE_DSS_WITH_AES_256_GCM_SHA384         0x030000A3\n# define TLS1_CK_DH_DSS_WITH_AES_128_GCM_SHA256          0x030000A4\n# define TLS1_CK_DH_DSS_WITH_AES_256_GCM_SHA384          0x030000A5\n# define TLS1_CK_ADH_WITH_AES_128_GCM_SHA256             0x030000A6\n# define TLS1_CK_ADH_WITH_AES_256_GCM_SHA384             0x030000A7\n\n/*\n * ECC ciphersuites from draft-ietf-tls-ecc-12.txt with changes soon to be in\n * draft 13\n */\n# define TLS1_CK_ECDH_ECDSA_WITH_NULL_SHA                0x0300C001\n# define TLS1_CK_ECDH_ECDSA_WITH_RC4_128_SHA             0x0300C002\n# define TLS1_CK_ECDH_ECDSA_WITH_DES_192_CBC3_SHA        0x0300C003\n# define TLS1_CK_ECDH_ECDSA_WITH_AES_128_CBC_SHA         0x0300C004\n# define TLS1_CK_ECDH_ECDSA_WITH_AES_256_CBC_SHA         0x0300C005\n\n# define TLS1_CK_ECDHE_ECDSA_WITH_NULL_SHA               0x0300C006\n# define TLS1_CK_ECDHE_ECDSA_WITH_RC4_128_SHA            0x0300C007\n# define TLS1_CK_ECDHE_ECDSA_WITH_DES_192_CBC3_SHA       0x0300C008\n# define TLS1_CK_ECDHE_ECDSA_WITH_AES_128_CBC_SHA        0x0300C009\n# define TLS1_CK_ECDHE_ECDSA_WITH_AES_256_CBC_SHA        0x0300C00A\n\n# define TLS1_CK_ECDH_RSA_WITH_NULL_SHA                  0x0300C00B\n# define TLS1_CK_ECDH_RSA_WITH_RC4_128_SHA               0x0300C00C\n# define TLS1_CK_ECDH_RSA_WITH_DES_192_CBC3_SHA          0x0300C00D\n# define TLS1_CK_ECDH_RSA_WITH_AES_128_CBC_SHA           0x0300C00E\n# define TLS1_CK_ECDH_RSA_WITH_AES_256_CBC_SHA           0x0300C00F\n\n# define TLS1_CK_ECDHE_RSA_WITH_NULL_SHA                 0x0300C010\n# define TLS1_CK_ECDHE_RSA_WITH_RC4_128_SHA              0x0300C011\n# define TLS1_CK_ECDHE_RSA_WITH_DES_192_CBC3_SHA         0x0300C012\n# define TLS1_CK_ECDHE_RSA_WITH_AES_128_CBC_SHA          0x0300C013\n# define TLS1_CK_ECDHE_RSA_WITH_AES_256_CBC_SHA          0x0300C014\n\n# define TLS1_CK_ECDH_anon_WITH_NULL_SHA                 0x0300C015\n# define TLS1_CK_ECDH_anon_WITH_RC4_128_SHA              0x0300C016\n# define TLS1_CK_ECDH_anon_WITH_DES_192_CBC3_SHA         0x0300C017\n# define TLS1_CK_ECDH_anon_WITH_AES_128_CBC_SHA          0x0300C018\n# define TLS1_CK_ECDH_anon_WITH_AES_256_CBC_SHA          0x0300C019\n\n/* SRP ciphersuites from RFC 5054 */\n# define TLS1_CK_SRP_SHA_WITH_3DES_EDE_CBC_SHA           0x0300C01A\n# define TLS1_CK_SRP_SHA_RSA_WITH_3DES_EDE_CBC_SHA       0x0300C01B\n# define TLS1_CK_SRP_SHA_DSS_WITH_3DES_EDE_CBC_SHA       0x0300C01C\n# define TLS1_CK_SRP_SHA_WITH_AES_128_CBC_SHA            0x0300C01D\n# define TLS1_CK_SRP_SHA_RSA_WITH_AES_128_CBC_SHA        0x0300C01E\n# define TLS1_CK_SRP_SHA_DSS_WITH_AES_128_CBC_SHA        0x0300C01F\n# define TLS1_CK_SRP_SHA_WITH_AES_256_CBC_SHA            0x0300C020\n# define TLS1_CK_SRP_SHA_RSA_WITH_AES_256_CBC_SHA        0x0300C021\n# define TLS1_CK_SRP_SHA_DSS_WITH_AES_256_CBC_SHA        0x0300C022\n\n/* ECDH HMAC based ciphersuites from RFC5289 */\n\n# define TLS1_CK_ECDHE_ECDSA_WITH_AES_128_SHA256         0x0300C023\n# define TLS1_CK_ECDHE_ECDSA_WITH_AES_256_SHA384         0x0300C024\n# define TLS1_CK_ECDH_ECDSA_WITH_AES_128_SHA256          0x0300C025\n# define TLS1_CK_ECDH_ECDSA_WITH_AES_256_SHA384          0x0300C026\n# define TLS1_CK_ECDHE_RSA_WITH_AES_128_SHA256           0x0300C027\n# define TLS1_CK_ECDHE_RSA_WITH_AES_256_SHA384           0x0300C028\n# define TLS1_CK_ECDH_RSA_WITH_AES_128_SHA256            0x0300C029\n# define TLS1_CK_ECDH_RSA_WITH_AES_256_SHA384            0x0300C02A\n\n/* ECDH GCM based ciphersuites from RFC5289 */\n# define TLS1_CK_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256     0x0300C02B\n# define TLS1_CK_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384     0x0300C02C\n# define TLS1_CK_ECDH_ECDSA_WITH_AES_128_GCM_SHA256      0x0300C02D\n# define TLS1_CK_ECDH_ECDSA_WITH_AES_256_GCM_SHA384      0x0300C02E\n# define TLS1_CK_ECDHE_RSA_WITH_AES_128_GCM_SHA256       0x0300C02F\n# define TLS1_CK_ECDHE_RSA_WITH_AES_256_GCM_SHA384       0x0300C030\n# define TLS1_CK_ECDH_RSA_WITH_AES_128_GCM_SHA256        0x0300C031\n# define TLS1_CK_ECDH_RSA_WITH_AES_256_GCM_SHA384        0x0300C032\n\n/*\n * XXX Inconsistency alert: The OpenSSL names of ciphers with ephemeral DH\n * here include the string \"DHE\", while elsewhere it has always been \"EDH\".\n * (The alias for the list of all such ciphers also is \"EDH\".) The\n * specifications speak of \"EDH\"; maybe we should allow both forms for\n * everything.\n */\n# define TLS1_TXT_RSA_EXPORT1024_WITH_RC4_56_MD5         \"EXP1024-RC4-MD5\"\n# define TLS1_TXT_RSA_EXPORT1024_WITH_RC2_CBC_56_MD5     \"EXP1024-RC2-CBC-MD5\"\n# define TLS1_TXT_RSA_EXPORT1024_WITH_DES_CBC_SHA        \"EXP1024-DES-CBC-SHA\"\n# define TLS1_TXT_DHE_DSS_EXPORT1024_WITH_DES_CBC_SHA    \"EXP1024-DHE-DSS-DES-CBC-SHA\"\n# define TLS1_TXT_RSA_EXPORT1024_WITH_RC4_56_SHA         \"EXP1024-RC4-SHA\"\n# define TLS1_TXT_DHE_DSS_EXPORT1024_WITH_RC4_56_SHA     \"EXP1024-DHE-DSS-RC4-SHA\"\n# define TLS1_TXT_DHE_DSS_WITH_RC4_128_SHA               \"DHE-DSS-RC4-SHA\"\n\n/* AES ciphersuites from RFC3268 */\n# define TLS1_TXT_RSA_WITH_AES_128_SHA                   \"AES128-SHA\"\n# define TLS1_TXT_DH_DSS_WITH_AES_128_SHA                \"DH-DSS-AES128-SHA\"\n# define TLS1_TXT_DH_RSA_WITH_AES_128_SHA                \"DH-RSA-AES128-SHA\"\n# define TLS1_TXT_DHE_DSS_WITH_AES_128_SHA               \"DHE-DSS-AES128-SHA\"\n# define TLS1_TXT_DHE_RSA_WITH_AES_128_SHA               \"DHE-RSA-AES128-SHA\"\n# define TLS1_TXT_ADH_WITH_AES_128_SHA                   \"ADH-AES128-SHA\"\n\n# define TLS1_TXT_RSA_WITH_AES_256_SHA                   \"AES256-SHA\"\n# define TLS1_TXT_DH_DSS_WITH_AES_256_SHA                \"DH-DSS-AES256-SHA\"\n# define TLS1_TXT_DH_RSA_WITH_AES_256_SHA                \"DH-RSA-AES256-SHA\"\n# define TLS1_TXT_DHE_DSS_WITH_AES_256_SHA               \"DHE-DSS-AES256-SHA\"\n# define TLS1_TXT_DHE_RSA_WITH_AES_256_SHA               \"DHE-RSA-AES256-SHA\"\n# define TLS1_TXT_ADH_WITH_AES_256_SHA                   \"ADH-AES256-SHA\"\n\n/* ECC ciphersuites from RFC4492 */\n# define TLS1_TXT_ECDH_ECDSA_WITH_NULL_SHA               \"ECDH-ECDSA-NULL-SHA\"\n# define TLS1_TXT_ECDH_ECDSA_WITH_RC4_128_SHA            \"ECDH-ECDSA-RC4-SHA\"\n# define TLS1_TXT_ECDH_ECDSA_WITH_DES_192_CBC3_SHA       \"ECDH-ECDSA-DES-CBC3-SHA\"\n# define TLS1_TXT_ECDH_ECDSA_WITH_AES_128_CBC_SHA        \"ECDH-ECDSA-AES128-SHA\"\n# define TLS1_TXT_ECDH_ECDSA_WITH_AES_256_CBC_SHA        \"ECDH-ECDSA-AES256-SHA\"\n\n# define TLS1_TXT_ECDHE_ECDSA_WITH_NULL_SHA              \"ECDHE-ECDSA-NULL-SHA\"\n# define TLS1_TXT_ECDHE_ECDSA_WITH_RC4_128_SHA           \"ECDHE-ECDSA-RC4-SHA\"\n# define TLS1_TXT_ECDHE_ECDSA_WITH_DES_192_CBC3_SHA      \"ECDHE-ECDSA-DES-CBC3-SHA\"\n# define TLS1_TXT_ECDHE_ECDSA_WITH_AES_128_CBC_SHA       \"ECDHE-ECDSA-AES128-SHA\"\n# define TLS1_TXT_ECDHE_ECDSA_WITH_AES_256_CBC_SHA       \"ECDHE-ECDSA-AES256-SHA\"\n\n# define TLS1_TXT_ECDH_RSA_WITH_NULL_SHA                 \"ECDH-RSA-NULL-SHA\"\n# define TLS1_TXT_ECDH_RSA_WITH_RC4_128_SHA              \"ECDH-RSA-RC4-SHA\"\n# define TLS1_TXT_ECDH_RSA_WITH_DES_192_CBC3_SHA         \"ECDH-RSA-DES-CBC3-SHA\"\n# define TLS1_TXT_ECDH_RSA_WITH_AES_128_CBC_SHA          \"ECDH-RSA-AES128-SHA\"\n# define TLS1_TXT_ECDH_RSA_WITH_AES_256_CBC_SHA          \"ECDH-RSA-AES256-SHA\"\n\n# define TLS1_TXT_ECDHE_RSA_WITH_NULL_SHA                \"ECDHE-RSA-NULL-SHA\"\n# define TLS1_TXT_ECDHE_RSA_WITH_RC4_128_SHA             \"ECDHE-RSA-RC4-SHA\"\n# define TLS1_TXT_ECDHE_RSA_WITH_DES_192_CBC3_SHA        \"ECDHE-RSA-DES-CBC3-SHA\"\n# define TLS1_TXT_ECDHE_RSA_WITH_AES_128_CBC_SHA         \"ECDHE-RSA-AES128-SHA\"\n# define TLS1_TXT_ECDHE_RSA_WITH_AES_256_CBC_SHA         \"ECDHE-RSA-AES256-SHA\"\n\n# define TLS1_TXT_ECDH_anon_WITH_NULL_SHA                \"AECDH-NULL-SHA\"\n# define TLS1_TXT_ECDH_anon_WITH_RC4_128_SHA             \"AECDH-RC4-SHA\"\n# define TLS1_TXT_ECDH_anon_WITH_DES_192_CBC3_SHA        \"AECDH-DES-CBC3-SHA\"\n# define TLS1_TXT_ECDH_anon_WITH_AES_128_CBC_SHA         \"AECDH-AES128-SHA\"\n# define TLS1_TXT_ECDH_anon_WITH_AES_256_CBC_SHA         \"AECDH-AES256-SHA\"\n\n/* PSK ciphersuites from RFC 4279 */\n# define TLS1_TXT_PSK_WITH_RC4_128_SHA                   \"PSK-RC4-SHA\"\n# define TLS1_TXT_PSK_WITH_3DES_EDE_CBC_SHA              \"PSK-3DES-EDE-CBC-SHA\"\n# define TLS1_TXT_PSK_WITH_AES_128_CBC_SHA               \"PSK-AES128-CBC-SHA\"\n# define TLS1_TXT_PSK_WITH_AES_256_CBC_SHA               \"PSK-AES256-CBC-SHA\"\n\n/* SRP ciphersuite from RFC 5054 */\n# define TLS1_TXT_SRP_SHA_WITH_3DES_EDE_CBC_SHA          \"SRP-3DES-EDE-CBC-SHA\"\n# define TLS1_TXT_SRP_SHA_RSA_WITH_3DES_EDE_CBC_SHA      \"SRP-RSA-3DES-EDE-CBC-SHA\"\n# define TLS1_TXT_SRP_SHA_DSS_WITH_3DES_EDE_CBC_SHA      \"SRP-DSS-3DES-EDE-CBC-SHA\"\n# define TLS1_TXT_SRP_SHA_WITH_AES_128_CBC_SHA           \"SRP-AES-128-CBC-SHA\"\n# define TLS1_TXT_SRP_SHA_RSA_WITH_AES_128_CBC_SHA       \"SRP-RSA-AES-128-CBC-SHA\"\n# define TLS1_TXT_SRP_SHA_DSS_WITH_AES_128_CBC_SHA       \"SRP-DSS-AES-128-CBC-SHA\"\n# define TLS1_TXT_SRP_SHA_WITH_AES_256_CBC_SHA           \"SRP-AES-256-CBC-SHA\"\n# define TLS1_TXT_SRP_SHA_RSA_WITH_AES_256_CBC_SHA       \"SRP-RSA-AES-256-CBC-SHA\"\n# define TLS1_TXT_SRP_SHA_DSS_WITH_AES_256_CBC_SHA       \"SRP-DSS-AES-256-CBC-SHA\"\n\n/* Camellia ciphersuites from RFC4132 */\n# define TLS1_TXT_RSA_WITH_CAMELLIA_128_CBC_SHA          \"CAMELLIA128-SHA\"\n# define TLS1_TXT_DH_DSS_WITH_CAMELLIA_128_CBC_SHA       \"DH-DSS-CAMELLIA128-SHA\"\n# define TLS1_TXT_DH_RSA_WITH_CAMELLIA_128_CBC_SHA       \"DH-RSA-CAMELLIA128-SHA\"\n# define TLS1_TXT_DHE_DSS_WITH_CAMELLIA_128_CBC_SHA      \"DHE-DSS-CAMELLIA128-SHA\"\n# define TLS1_TXT_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA      \"DHE-RSA-CAMELLIA128-SHA\"\n# define TLS1_TXT_ADH_WITH_CAMELLIA_128_CBC_SHA          \"ADH-CAMELLIA128-SHA\"\n\n# define TLS1_TXT_RSA_WITH_CAMELLIA_256_CBC_SHA          \"CAMELLIA256-SHA\"\n# define TLS1_TXT_DH_DSS_WITH_CAMELLIA_256_CBC_SHA       \"DH-DSS-CAMELLIA256-SHA\"\n# define TLS1_TXT_DH_RSA_WITH_CAMELLIA_256_CBC_SHA       \"DH-RSA-CAMELLIA256-SHA\"\n# define TLS1_TXT_DHE_DSS_WITH_CAMELLIA_256_CBC_SHA      \"DHE-DSS-CAMELLIA256-SHA\"\n# define TLS1_TXT_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA      \"DHE-RSA-CAMELLIA256-SHA\"\n# define TLS1_TXT_ADH_WITH_CAMELLIA_256_CBC_SHA          \"ADH-CAMELLIA256-SHA\"\n\n/* SEED ciphersuites from RFC4162 */\n# define TLS1_TXT_RSA_WITH_SEED_SHA                      \"SEED-SHA\"\n# define TLS1_TXT_DH_DSS_WITH_SEED_SHA                   \"DH-DSS-SEED-SHA\"\n# define TLS1_TXT_DH_RSA_WITH_SEED_SHA                   \"DH-RSA-SEED-SHA\"\n# define TLS1_TXT_DHE_DSS_WITH_SEED_SHA                  \"DHE-DSS-SEED-SHA\"\n# define TLS1_TXT_DHE_RSA_WITH_SEED_SHA                  \"DHE-RSA-SEED-SHA\"\n# define TLS1_TXT_ADH_WITH_SEED_SHA                      \"ADH-SEED-SHA\"\n\n/* TLS v1.2 ciphersuites */\n# define TLS1_TXT_RSA_WITH_NULL_SHA256                   \"NULL-SHA256\"\n# define TLS1_TXT_RSA_WITH_AES_128_SHA256                \"AES128-SHA256\"\n# define TLS1_TXT_RSA_WITH_AES_256_SHA256                \"AES256-SHA256\"\n# define TLS1_TXT_DH_DSS_WITH_AES_128_SHA256             \"DH-DSS-AES128-SHA256\"\n# define TLS1_TXT_DH_RSA_WITH_AES_128_SHA256             \"DH-RSA-AES128-SHA256\"\n# define TLS1_TXT_DHE_DSS_WITH_AES_128_SHA256            \"DHE-DSS-AES128-SHA256\"\n# define TLS1_TXT_DHE_RSA_WITH_AES_128_SHA256            \"DHE-RSA-AES128-SHA256\"\n# define TLS1_TXT_DH_DSS_WITH_AES_256_SHA256             \"DH-DSS-AES256-SHA256\"\n# define TLS1_TXT_DH_RSA_WITH_AES_256_SHA256             \"DH-RSA-AES256-SHA256\"\n# define TLS1_TXT_DHE_DSS_WITH_AES_256_SHA256            \"DHE-DSS-AES256-SHA256\"\n# define TLS1_TXT_DHE_RSA_WITH_AES_256_SHA256            \"DHE-RSA-AES256-SHA256\"\n# define TLS1_TXT_ADH_WITH_AES_128_SHA256                \"ADH-AES128-SHA256\"\n# define TLS1_TXT_ADH_WITH_AES_256_SHA256                \"ADH-AES256-SHA256\"\n\n/* TLS v1.2 GCM ciphersuites from RFC5288 */\n# define TLS1_TXT_RSA_WITH_AES_128_GCM_SHA256            \"AES128-GCM-SHA256\"\n# define TLS1_TXT_RSA_WITH_AES_256_GCM_SHA384            \"AES256-GCM-SHA384\"\n# define TLS1_TXT_DHE_RSA_WITH_AES_128_GCM_SHA256        \"DHE-RSA-AES128-GCM-SHA256\"\n# define TLS1_TXT_DHE_RSA_WITH_AES_256_GCM_SHA384        \"DHE-RSA-AES256-GCM-SHA384\"\n# define TLS1_TXT_DH_RSA_WITH_AES_128_GCM_SHA256         \"DH-RSA-AES128-GCM-SHA256\"\n# define TLS1_TXT_DH_RSA_WITH_AES_256_GCM_SHA384         \"DH-RSA-AES256-GCM-SHA384\"\n# define TLS1_TXT_DHE_DSS_WITH_AES_128_GCM_SHA256        \"DHE-DSS-AES128-GCM-SHA256\"\n# define TLS1_TXT_DHE_DSS_WITH_AES_256_GCM_SHA384        \"DHE-DSS-AES256-GCM-SHA384\"\n# define TLS1_TXT_DH_DSS_WITH_AES_128_GCM_SHA256         \"DH-DSS-AES128-GCM-SHA256\"\n# define TLS1_TXT_DH_DSS_WITH_AES_256_GCM_SHA384         \"DH-DSS-AES256-GCM-SHA384\"\n# define TLS1_TXT_ADH_WITH_AES_128_GCM_SHA256            \"ADH-AES128-GCM-SHA256\"\n# define TLS1_TXT_ADH_WITH_AES_256_GCM_SHA384            \"ADH-AES256-GCM-SHA384\"\n\n/* ECDH HMAC based ciphersuites from RFC5289 */\n\n# define TLS1_TXT_ECDHE_ECDSA_WITH_AES_128_SHA256    \"ECDHE-ECDSA-AES128-SHA256\"\n# define TLS1_TXT_ECDHE_ECDSA_WITH_AES_256_SHA384    \"ECDHE-ECDSA-AES256-SHA384\"\n# define TLS1_TXT_ECDH_ECDSA_WITH_AES_128_SHA256     \"ECDH-ECDSA-AES128-SHA256\"\n# define TLS1_TXT_ECDH_ECDSA_WITH_AES_256_SHA384     \"ECDH-ECDSA-AES256-SHA384\"\n# define TLS1_TXT_ECDHE_RSA_WITH_AES_128_SHA256      \"ECDHE-RSA-AES128-SHA256\"\n# define TLS1_TXT_ECDHE_RSA_WITH_AES_256_SHA384      \"ECDHE-RSA-AES256-SHA384\"\n# define TLS1_TXT_ECDH_RSA_WITH_AES_128_SHA256       \"ECDH-RSA-AES128-SHA256\"\n# define TLS1_TXT_ECDH_RSA_WITH_AES_256_SHA384       \"ECDH-RSA-AES256-SHA384\"\n\n/* ECDH GCM based ciphersuites from RFC5289 */\n# define TLS1_TXT_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256    \"ECDHE-ECDSA-AES128-GCM-SHA256\"\n# define TLS1_TXT_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384    \"ECDHE-ECDSA-AES256-GCM-SHA384\"\n# define TLS1_TXT_ECDH_ECDSA_WITH_AES_128_GCM_SHA256     \"ECDH-ECDSA-AES128-GCM-SHA256\"\n# define TLS1_TXT_ECDH_ECDSA_WITH_AES_256_GCM_SHA384     \"ECDH-ECDSA-AES256-GCM-SHA384\"\n# define TLS1_TXT_ECDHE_RSA_WITH_AES_128_GCM_SHA256      \"ECDHE-RSA-AES128-GCM-SHA256\"\n# define TLS1_TXT_ECDHE_RSA_WITH_AES_256_GCM_SHA384      \"ECDHE-RSA-AES256-GCM-SHA384\"\n# define TLS1_TXT_ECDH_RSA_WITH_AES_128_GCM_SHA256       \"ECDH-RSA-AES128-GCM-SHA256\"\n# define TLS1_TXT_ECDH_RSA_WITH_AES_256_GCM_SHA384       \"ECDH-RSA-AES256-GCM-SHA384\"\n\n# define TLS_CT_RSA_SIGN                 1\n# define TLS_CT_DSS_SIGN                 2\n# define TLS_CT_RSA_FIXED_DH             3\n# define TLS_CT_DSS_FIXED_DH             4\n# define TLS_CT_ECDSA_SIGN               64\n# define TLS_CT_RSA_FIXED_ECDH           65\n# define TLS_CT_ECDSA_FIXED_ECDH         66\n# define TLS_CT_GOST94_SIGN              21\n# define TLS_CT_GOST01_SIGN              22\n/*\n * when correcting this number, correct also SSL3_CT_NUMBER in ssl3.h (see\n * comment there)\n */\n# define TLS_CT_NUMBER                   9\n\n# define TLS1_FINISH_MAC_LENGTH          12\n\n# define TLS_MD_MAX_CONST_SIZE                   20\n# define TLS_MD_CLIENT_FINISH_CONST              \"client finished\"\n# define TLS_MD_CLIENT_FINISH_CONST_SIZE         15\n# define TLS_MD_SERVER_FINISH_CONST              \"server finished\"\n# define TLS_MD_SERVER_FINISH_CONST_SIZE         15\n# define TLS_MD_SERVER_WRITE_KEY_CONST           \"server write key\"\n# define TLS_MD_SERVER_WRITE_KEY_CONST_SIZE      16\n# define TLS_MD_KEY_EXPANSION_CONST              \"key expansion\"\n# define TLS_MD_KEY_EXPANSION_CONST_SIZE         13\n# define TLS_MD_CLIENT_WRITE_KEY_CONST           \"client write key\"\n# define TLS_MD_CLIENT_WRITE_KEY_CONST_SIZE      16\n# define TLS_MD_SERVER_WRITE_KEY_CONST           \"server write key\"\n# define TLS_MD_SERVER_WRITE_KEY_CONST_SIZE      16\n# define TLS_MD_IV_BLOCK_CONST                   \"IV block\"\n# define TLS_MD_IV_BLOCK_CONST_SIZE              8\n# define TLS_MD_MASTER_SECRET_CONST              \"master secret\"\n# define TLS_MD_MASTER_SECRET_CONST_SIZE         13\n\n# ifdef CHARSET_EBCDIC\n#  undef TLS_MD_CLIENT_FINISH_CONST\n/*\n * client finished\n */\n#  define TLS_MD_CLIENT_FINISH_CONST    \"\\x63\\x6c\\x69\\x65\\x6e\\x74\\x20\\x66\\x69\\x6e\\x69\\x73\\x68\\x65\\x64\"\n\n#  undef TLS_MD_SERVER_FINISH_CONST\n/*\n * server finished\n */\n#  define TLS_MD_SERVER_FINISH_CONST    \"\\x73\\x65\\x72\\x76\\x65\\x72\\x20\\x66\\x69\\x6e\\x69\\x73\\x68\\x65\\x64\"\n\n#  undef TLS_MD_SERVER_WRITE_KEY_CONST\n/*\n * server write key\n */\n#  define TLS_MD_SERVER_WRITE_KEY_CONST \"\\x73\\x65\\x72\\x76\\x65\\x72\\x20\\x77\\x72\\x69\\x74\\x65\\x20\\x6b\\x65\\x79\"\n\n#  undef TLS_MD_KEY_EXPANSION_CONST\n/*\n * key expansion\n */\n#  define TLS_MD_KEY_EXPANSION_CONST    \"\\x6b\\x65\\x79\\x20\\x65\\x78\\x70\\x61\\x6e\\x73\\x69\\x6f\\x6e\"\n\n#  undef TLS_MD_CLIENT_WRITE_KEY_CONST\n/*\n * client write key\n */\n#  define TLS_MD_CLIENT_WRITE_KEY_CONST \"\\x63\\x6c\\x69\\x65\\x6e\\x74\\x20\\x77\\x72\\x69\\x74\\x65\\x20\\x6b\\x65\\x79\"\n\n#  undef TLS_MD_SERVER_WRITE_KEY_CONST\n/*\n * server write key\n */\n#  define TLS_MD_SERVER_WRITE_KEY_CONST \"\\x73\\x65\\x72\\x76\\x65\\x72\\x20\\x77\\x72\\x69\\x74\\x65\\x20\\x6b\\x65\\x79\"\n\n#  undef TLS_MD_IV_BLOCK_CONST\n/*\n * IV block\n */\n#  define TLS_MD_IV_BLOCK_CONST         \"\\x49\\x56\\x20\\x62\\x6c\\x6f\\x63\\x6b\"\n\n#  undef TLS_MD_MASTER_SECRET_CONST\n/*\n * master secret\n */\n#  define TLS_MD_MASTER_SECRET_CONST    \"\\x6d\\x61\\x73\\x74\\x65\\x72\\x20\\x73\\x65\\x63\\x72\\x65\\x74\"\n# endif\n\n/* TLS Session Ticket extension struct */\nstruct tls_session_ticket_ext_st {\n    unsigned short length;\n    void *data;\n};\n\n#ifdef  __cplusplus\n}\n#endif\n#endif\n"
  },
  {
    "path": "Pods/OpenSSL-Universal/include-ios/openssl/ts.h",
    "content": "/* crypto/ts/ts.h */\n/*\n * Written by Zoltan Glozik (zglozik@opentsa.org) for the OpenSSL project\n * 2002, 2003, 2004.\n */\n/* ====================================================================\n * Copyright (c) 2006 The OpenSSL Project.  All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n *\n * 1. Redistributions of source code must retain the above copyright\n *    notice, this list of conditions and the following disclaimer.\n *\n * 2. Redistributions in binary form must reproduce the above copyright\n *    notice, this list of conditions and the following disclaimer in\n *    the documentation and/or other materials provided with the\n *    distribution.\n *\n * 3. All advertising materials mentioning features or use of this\n *    software must display the following acknowledgment:\n *    \"This product includes software developed by the OpenSSL Project\n *    for use in the OpenSSL Toolkit. (http://www.OpenSSL.org/)\"\n *\n * 4. The names \"OpenSSL Toolkit\" and \"OpenSSL Project\" must not be used to\n *    endorse or promote products derived from this software without\n *    prior written permission. For written permission, please contact\n *    licensing@OpenSSL.org.\n *\n * 5. Products derived from this software may not be called \"OpenSSL\"\n *    nor may \"OpenSSL\" appear in their names without prior written\n *    permission of the OpenSSL Project.\n *\n * 6. Redistributions of any form whatsoever must retain the following\n *    acknowledgment:\n *    \"This product includes software developed by the OpenSSL Project\n *    for use in the OpenSSL Toolkit (http://www.OpenSSL.org/)\"\n *\n * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY\n * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\n * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR\n * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,\n * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED\n * OF THE POSSIBILITY OF SUCH DAMAGE.\n * ====================================================================\n *\n * This product includes cryptographic software written by Eric Young\n * (eay@cryptsoft.com).  This product includes software written by Tim\n * Hudson (tjh@cryptsoft.com).\n *\n */\n\n#ifndef HEADER_TS_H\n# define HEADER_TS_H\n\n# include <openssl/opensslconf.h>\n# include <openssl/symhacks.h>\n# ifndef OPENSSL_NO_BUFFER\n#  include <openssl/buffer.h>\n# endif\n# ifndef OPENSSL_NO_EVP\n#  include <openssl/evp.h>\n# endif\n# ifndef OPENSSL_NO_BIO\n#  include <openssl/bio.h>\n# endif\n# include <openssl/stack.h>\n# include <openssl/asn1.h>\n# include <openssl/safestack.h>\n\n# ifndef OPENSSL_NO_RSA\n#  include <openssl/rsa.h>\n# endif\n\n# ifndef OPENSSL_NO_DSA\n#  include <openssl/dsa.h>\n# endif\n\n# ifndef OPENSSL_NO_DH\n#  include <openssl/dh.h>\n# endif\n\n#ifdef  __cplusplus\nextern \"C\" {\n#endif\n\n# ifdef WIN32\n/* Under Win32 this is defined in wincrypt.h */\n#  undef X509_NAME\n# endif\n\n# include <openssl/x509.h>\n# include <openssl/x509v3.h>\n\n/*-\nMessageImprint ::= SEQUENCE  {\n     hashAlgorithm                AlgorithmIdentifier,\n     hashedMessage                OCTET STRING  }\n*/\n\ntypedef struct TS_msg_imprint_st {\n    X509_ALGOR *hash_algo;\n    ASN1_OCTET_STRING *hashed_msg;\n} TS_MSG_IMPRINT;\n\n/*-\nTimeStampReq ::= SEQUENCE  {\n   version                  INTEGER  { v1(1) },\n   messageImprint           MessageImprint,\n     --a hash algorithm OID and the hash value of the data to be\n     --time-stamped\n   reqPolicy                TSAPolicyId                OPTIONAL,\n   nonce                    INTEGER                    OPTIONAL,\n   certReq                  BOOLEAN                    DEFAULT FALSE,\n   extensions               [0] IMPLICIT Extensions    OPTIONAL  }\n*/\n\ntypedef struct TS_req_st {\n    ASN1_INTEGER *version;\n    TS_MSG_IMPRINT *msg_imprint;\n    ASN1_OBJECT *policy_id;     /* OPTIONAL */\n    ASN1_INTEGER *nonce;        /* OPTIONAL */\n    ASN1_BOOLEAN cert_req;      /* DEFAULT FALSE */\n    STACK_OF(X509_EXTENSION) *extensions; /* [0] OPTIONAL */\n} TS_REQ;\n\n/*-\nAccuracy ::= SEQUENCE {\n                seconds        INTEGER           OPTIONAL,\n                millis     [0] INTEGER  (1..999) OPTIONAL,\n                micros     [1] INTEGER  (1..999) OPTIONAL  }\n*/\n\ntypedef struct TS_accuracy_st {\n    ASN1_INTEGER *seconds;\n    ASN1_INTEGER *millis;\n    ASN1_INTEGER *micros;\n} TS_ACCURACY;\n\n/*-\nTSTInfo ::= SEQUENCE  {\n    version                      INTEGER  { v1(1) },\n    policy                       TSAPolicyId,\n    messageImprint               MessageImprint,\n      -- MUST have the same value as the similar field in\n      -- TimeStampReq\n    serialNumber                 INTEGER,\n     -- Time-Stamping users MUST be ready to accommodate integers\n     -- up to 160 bits.\n    genTime                      GeneralizedTime,\n    accuracy                     Accuracy                 OPTIONAL,\n    ordering                     BOOLEAN             DEFAULT FALSE,\n    nonce                        INTEGER                  OPTIONAL,\n      -- MUST be present if the similar field was present\n      -- in TimeStampReq.  In that case it MUST have the same value.\n    tsa                          [0] GeneralName          OPTIONAL,\n    extensions                   [1] IMPLICIT Extensions  OPTIONAL   }\n*/\n\ntypedef struct TS_tst_info_st {\n    ASN1_INTEGER *version;\n    ASN1_OBJECT *policy_id;\n    TS_MSG_IMPRINT *msg_imprint;\n    ASN1_INTEGER *serial;\n    ASN1_GENERALIZEDTIME *time;\n    TS_ACCURACY *accuracy;\n    ASN1_BOOLEAN ordering;\n    ASN1_INTEGER *nonce;\n    GENERAL_NAME *tsa;\n    STACK_OF(X509_EXTENSION) *extensions;\n} TS_TST_INFO;\n\n/*-\nPKIStatusInfo ::= SEQUENCE {\n    status        PKIStatus,\n    statusString  PKIFreeText     OPTIONAL,\n    failInfo      PKIFailureInfo  OPTIONAL  }\n\nFrom RFC 1510 - section 3.1.1:\nPKIFreeText ::= SEQUENCE SIZE (1..MAX) OF UTF8String\n        -- text encoded as UTF-8 String (note:  each UTF8String SHOULD\n        -- include an RFC 1766 language tag to indicate the language\n        -- of the contained text)\n*/\n\n/* Possible values for status. See ts_resp_print.c && ts_resp_verify.c. */\n\n# define TS_STATUS_GRANTED                       0\n# define TS_STATUS_GRANTED_WITH_MODS             1\n# define TS_STATUS_REJECTION                     2\n# define TS_STATUS_WAITING                       3\n# define TS_STATUS_REVOCATION_WARNING            4\n# define TS_STATUS_REVOCATION_NOTIFICATION       5\n\n/*\n * Possible values for failure_info. See ts_resp_print.c && ts_resp_verify.c\n */\n\n# define TS_INFO_BAD_ALG                 0\n# define TS_INFO_BAD_REQUEST             2\n# define TS_INFO_BAD_DATA_FORMAT         5\n# define TS_INFO_TIME_NOT_AVAILABLE      14\n# define TS_INFO_UNACCEPTED_POLICY       15\n# define TS_INFO_UNACCEPTED_EXTENSION    16\n# define TS_INFO_ADD_INFO_NOT_AVAILABLE  17\n# define TS_INFO_SYSTEM_FAILURE          25\n\ntypedef struct TS_status_info_st {\n    ASN1_INTEGER *status;\n    STACK_OF(ASN1_UTF8STRING) *text;\n    ASN1_BIT_STRING *failure_info;\n} TS_STATUS_INFO;\n\nDECLARE_STACK_OF(ASN1_UTF8STRING)\nDECLARE_ASN1_SET_OF(ASN1_UTF8STRING)\n\n/*-\nTimeStampResp ::= SEQUENCE  {\n     status                  PKIStatusInfo,\n     timeStampToken          TimeStampToken     OPTIONAL }\n*/\n\ntypedef struct TS_resp_st {\n    TS_STATUS_INFO *status_info;\n    PKCS7 *token;\n    TS_TST_INFO *tst_info;\n} TS_RESP;\n\n/* The structure below would belong to the ESS component. */\n\n/*-\nIssuerSerial ::= SEQUENCE {\n        issuer                   GeneralNames,\n        serialNumber             CertificateSerialNumber\n        }\n*/\n\ntypedef struct ESS_issuer_serial {\n    STACK_OF(GENERAL_NAME) *issuer;\n    ASN1_INTEGER *serial;\n} ESS_ISSUER_SERIAL;\n\n/*-\nESSCertID ::=  SEQUENCE {\n        certHash                 Hash,\n        issuerSerial             IssuerSerial OPTIONAL\n}\n*/\n\ntypedef struct ESS_cert_id {\n    ASN1_OCTET_STRING *hash;    /* Always SHA-1 digest. */\n    ESS_ISSUER_SERIAL *issuer_serial;\n} ESS_CERT_ID;\n\nDECLARE_STACK_OF(ESS_CERT_ID)\nDECLARE_ASN1_SET_OF(ESS_CERT_ID)\n\n/*-\nSigningCertificate ::=  SEQUENCE {\n       certs        SEQUENCE OF ESSCertID,\n       policies     SEQUENCE OF PolicyInformation OPTIONAL\n}\n*/\n\ntypedef struct ESS_signing_cert {\n    STACK_OF(ESS_CERT_ID) *cert_ids;\n    STACK_OF(POLICYINFO) *policy_info;\n} ESS_SIGNING_CERT;\n\nTS_REQ *TS_REQ_new(void);\nvoid TS_REQ_free(TS_REQ *a);\nint i2d_TS_REQ(const TS_REQ *a, unsigned char **pp);\nTS_REQ *d2i_TS_REQ(TS_REQ **a, const unsigned char **pp, long length);\n\nTS_REQ *TS_REQ_dup(TS_REQ *a);\n\nTS_REQ *d2i_TS_REQ_fp(FILE *fp, TS_REQ **a);\nint i2d_TS_REQ_fp(FILE *fp, TS_REQ *a);\nTS_REQ *d2i_TS_REQ_bio(BIO *fp, TS_REQ **a);\nint i2d_TS_REQ_bio(BIO *fp, TS_REQ *a);\n\nTS_MSG_IMPRINT *TS_MSG_IMPRINT_new(void);\nvoid TS_MSG_IMPRINT_free(TS_MSG_IMPRINT *a);\nint i2d_TS_MSG_IMPRINT(const TS_MSG_IMPRINT *a, unsigned char **pp);\nTS_MSG_IMPRINT *d2i_TS_MSG_IMPRINT(TS_MSG_IMPRINT **a,\n                                   const unsigned char **pp, long length);\n\nTS_MSG_IMPRINT *TS_MSG_IMPRINT_dup(TS_MSG_IMPRINT *a);\n\nTS_MSG_IMPRINT *d2i_TS_MSG_IMPRINT_fp(FILE *fp, TS_MSG_IMPRINT **a);\nint i2d_TS_MSG_IMPRINT_fp(FILE *fp, TS_MSG_IMPRINT *a);\nTS_MSG_IMPRINT *d2i_TS_MSG_IMPRINT_bio(BIO *fp, TS_MSG_IMPRINT **a);\nint i2d_TS_MSG_IMPRINT_bio(BIO *fp, TS_MSG_IMPRINT *a);\n\nTS_RESP *TS_RESP_new(void);\nvoid TS_RESP_free(TS_RESP *a);\nint i2d_TS_RESP(const TS_RESP *a, unsigned char **pp);\nTS_RESP *d2i_TS_RESP(TS_RESP **a, const unsigned char **pp, long length);\nTS_TST_INFO *PKCS7_to_TS_TST_INFO(PKCS7 *token);\nTS_RESP *TS_RESP_dup(TS_RESP *a);\n\nTS_RESP *d2i_TS_RESP_fp(FILE *fp, TS_RESP **a);\nint i2d_TS_RESP_fp(FILE *fp, TS_RESP *a);\nTS_RESP *d2i_TS_RESP_bio(BIO *fp, TS_RESP **a);\nint i2d_TS_RESP_bio(BIO *fp, TS_RESP *a);\n\nTS_STATUS_INFO *TS_STATUS_INFO_new(void);\nvoid TS_STATUS_INFO_free(TS_STATUS_INFO *a);\nint i2d_TS_STATUS_INFO(const TS_STATUS_INFO *a, unsigned char **pp);\nTS_STATUS_INFO *d2i_TS_STATUS_INFO(TS_STATUS_INFO **a,\n                                   const unsigned char **pp, long length);\nTS_STATUS_INFO *TS_STATUS_INFO_dup(TS_STATUS_INFO *a);\n\nTS_TST_INFO *TS_TST_INFO_new(void);\nvoid TS_TST_INFO_free(TS_TST_INFO *a);\nint i2d_TS_TST_INFO(const TS_TST_INFO *a, unsigned char **pp);\nTS_TST_INFO *d2i_TS_TST_INFO(TS_TST_INFO **a, const unsigned char **pp,\n                             long length);\nTS_TST_INFO *TS_TST_INFO_dup(TS_TST_INFO *a);\n\nTS_TST_INFO *d2i_TS_TST_INFO_fp(FILE *fp, TS_TST_INFO **a);\nint i2d_TS_TST_INFO_fp(FILE *fp, TS_TST_INFO *a);\nTS_TST_INFO *d2i_TS_TST_INFO_bio(BIO *fp, TS_TST_INFO **a);\nint i2d_TS_TST_INFO_bio(BIO *fp, TS_TST_INFO *a);\n\nTS_ACCURACY *TS_ACCURACY_new(void);\nvoid TS_ACCURACY_free(TS_ACCURACY *a);\nint i2d_TS_ACCURACY(const TS_ACCURACY *a, unsigned char **pp);\nTS_ACCURACY *d2i_TS_ACCURACY(TS_ACCURACY **a, const unsigned char **pp,\n                             long length);\nTS_ACCURACY *TS_ACCURACY_dup(TS_ACCURACY *a);\n\nESS_ISSUER_SERIAL *ESS_ISSUER_SERIAL_new(void);\nvoid ESS_ISSUER_SERIAL_free(ESS_ISSUER_SERIAL *a);\nint i2d_ESS_ISSUER_SERIAL(const ESS_ISSUER_SERIAL *a, unsigned char **pp);\nESS_ISSUER_SERIAL *d2i_ESS_ISSUER_SERIAL(ESS_ISSUER_SERIAL **a,\n                                         const unsigned char **pp,\n                                         long length);\nESS_ISSUER_SERIAL *ESS_ISSUER_SERIAL_dup(ESS_ISSUER_SERIAL *a);\n\nESS_CERT_ID *ESS_CERT_ID_new(void);\nvoid ESS_CERT_ID_free(ESS_CERT_ID *a);\nint i2d_ESS_CERT_ID(const ESS_CERT_ID *a, unsigned char **pp);\nESS_CERT_ID *d2i_ESS_CERT_ID(ESS_CERT_ID **a, const unsigned char **pp,\n                             long length);\nESS_CERT_ID *ESS_CERT_ID_dup(ESS_CERT_ID *a);\n\nESS_SIGNING_CERT *ESS_SIGNING_CERT_new(void);\nvoid ESS_SIGNING_CERT_free(ESS_SIGNING_CERT *a);\nint i2d_ESS_SIGNING_CERT(const ESS_SIGNING_CERT *a, unsigned char **pp);\nESS_SIGNING_CERT *d2i_ESS_SIGNING_CERT(ESS_SIGNING_CERT **a,\n                                       const unsigned char **pp, long length);\nESS_SIGNING_CERT *ESS_SIGNING_CERT_dup(ESS_SIGNING_CERT *a);\n\nvoid ERR_load_TS_strings(void);\n\nint TS_REQ_set_version(TS_REQ *a, long version);\nlong TS_REQ_get_version(const TS_REQ *a);\n\nint TS_REQ_set_msg_imprint(TS_REQ *a, TS_MSG_IMPRINT *msg_imprint);\nTS_MSG_IMPRINT *TS_REQ_get_msg_imprint(TS_REQ *a);\n\nint TS_MSG_IMPRINT_set_algo(TS_MSG_IMPRINT *a, X509_ALGOR *alg);\nX509_ALGOR *TS_MSG_IMPRINT_get_algo(TS_MSG_IMPRINT *a);\n\nint TS_MSG_IMPRINT_set_msg(TS_MSG_IMPRINT *a, unsigned char *d, int len);\nASN1_OCTET_STRING *TS_MSG_IMPRINT_get_msg(TS_MSG_IMPRINT *a);\n\nint TS_REQ_set_policy_id(TS_REQ *a, ASN1_OBJECT *policy);\nASN1_OBJECT *TS_REQ_get_policy_id(TS_REQ *a);\n\nint TS_REQ_set_nonce(TS_REQ *a, const ASN1_INTEGER *nonce);\nconst ASN1_INTEGER *TS_REQ_get_nonce(const TS_REQ *a);\n\nint TS_REQ_set_cert_req(TS_REQ *a, int cert_req);\nint TS_REQ_get_cert_req(const TS_REQ *a);\n\nSTACK_OF(X509_EXTENSION) *TS_REQ_get_exts(TS_REQ *a);\nvoid TS_REQ_ext_free(TS_REQ *a);\nint TS_REQ_get_ext_count(TS_REQ *a);\nint TS_REQ_get_ext_by_NID(TS_REQ *a, int nid, int lastpos);\nint TS_REQ_get_ext_by_OBJ(TS_REQ *a, ASN1_OBJECT *obj, int lastpos);\nint TS_REQ_get_ext_by_critical(TS_REQ *a, int crit, int lastpos);\nX509_EXTENSION *TS_REQ_get_ext(TS_REQ *a, int loc);\nX509_EXTENSION *TS_REQ_delete_ext(TS_REQ *a, int loc);\nint TS_REQ_add_ext(TS_REQ *a, X509_EXTENSION *ex, int loc);\nvoid *TS_REQ_get_ext_d2i(TS_REQ *a, int nid, int *crit, int *idx);\n\n/* Function declarations for TS_REQ defined in ts/ts_req_print.c */\n\nint TS_REQ_print_bio(BIO *bio, TS_REQ *a);\n\n/* Function declarations for TS_RESP defined in ts/ts_resp_utils.c */\n\nint TS_RESP_set_status_info(TS_RESP *a, TS_STATUS_INFO *info);\nTS_STATUS_INFO *TS_RESP_get_status_info(TS_RESP *a);\n\n/* Caller loses ownership of PKCS7 and TS_TST_INFO objects. */\nvoid TS_RESP_set_tst_info(TS_RESP *a, PKCS7 *p7, TS_TST_INFO *tst_info);\nPKCS7 *TS_RESP_get_token(TS_RESP *a);\nTS_TST_INFO *TS_RESP_get_tst_info(TS_RESP *a);\n\nint TS_TST_INFO_set_version(TS_TST_INFO *a, long version);\nlong TS_TST_INFO_get_version(const TS_TST_INFO *a);\n\nint TS_TST_INFO_set_policy_id(TS_TST_INFO *a, ASN1_OBJECT *policy_id);\nASN1_OBJECT *TS_TST_INFO_get_policy_id(TS_TST_INFO *a);\n\nint TS_TST_INFO_set_msg_imprint(TS_TST_INFO *a, TS_MSG_IMPRINT *msg_imprint);\nTS_MSG_IMPRINT *TS_TST_INFO_get_msg_imprint(TS_TST_INFO *a);\n\nint TS_TST_INFO_set_serial(TS_TST_INFO *a, const ASN1_INTEGER *serial);\nconst ASN1_INTEGER *TS_TST_INFO_get_serial(const TS_TST_INFO *a);\n\nint TS_TST_INFO_set_time(TS_TST_INFO *a, const ASN1_GENERALIZEDTIME *gtime);\nconst ASN1_GENERALIZEDTIME *TS_TST_INFO_get_time(const TS_TST_INFO *a);\n\nint TS_TST_INFO_set_accuracy(TS_TST_INFO *a, TS_ACCURACY *accuracy);\nTS_ACCURACY *TS_TST_INFO_get_accuracy(TS_TST_INFO *a);\n\nint TS_ACCURACY_set_seconds(TS_ACCURACY *a, const ASN1_INTEGER *seconds);\nconst ASN1_INTEGER *TS_ACCURACY_get_seconds(const TS_ACCURACY *a);\n\nint TS_ACCURACY_set_millis(TS_ACCURACY *a, const ASN1_INTEGER *millis);\nconst ASN1_INTEGER *TS_ACCURACY_get_millis(const TS_ACCURACY *a);\n\nint TS_ACCURACY_set_micros(TS_ACCURACY *a, const ASN1_INTEGER *micros);\nconst ASN1_INTEGER *TS_ACCURACY_get_micros(const TS_ACCURACY *a);\n\nint TS_TST_INFO_set_ordering(TS_TST_INFO *a, int ordering);\nint TS_TST_INFO_get_ordering(const TS_TST_INFO *a);\n\nint TS_TST_INFO_set_nonce(TS_TST_INFO *a, const ASN1_INTEGER *nonce);\nconst ASN1_INTEGER *TS_TST_INFO_get_nonce(const TS_TST_INFO *a);\n\nint TS_TST_INFO_set_tsa(TS_TST_INFO *a, GENERAL_NAME *tsa);\nGENERAL_NAME *TS_TST_INFO_get_tsa(TS_TST_INFO *a);\n\nSTACK_OF(X509_EXTENSION) *TS_TST_INFO_get_exts(TS_TST_INFO *a);\nvoid TS_TST_INFO_ext_free(TS_TST_INFO *a);\nint TS_TST_INFO_get_ext_count(TS_TST_INFO *a);\nint TS_TST_INFO_get_ext_by_NID(TS_TST_INFO *a, int nid, int lastpos);\nint TS_TST_INFO_get_ext_by_OBJ(TS_TST_INFO *a, ASN1_OBJECT *obj, int lastpos);\nint TS_TST_INFO_get_ext_by_critical(TS_TST_INFO *a, int crit, int lastpos);\nX509_EXTENSION *TS_TST_INFO_get_ext(TS_TST_INFO *a, int loc);\nX509_EXTENSION *TS_TST_INFO_delete_ext(TS_TST_INFO *a, int loc);\nint TS_TST_INFO_add_ext(TS_TST_INFO *a, X509_EXTENSION *ex, int loc);\nvoid *TS_TST_INFO_get_ext_d2i(TS_TST_INFO *a, int nid, int *crit, int *idx);\n\n/*\n * Declarations related to response generation, defined in ts/ts_resp_sign.c.\n */\n\n/* Optional flags for response generation. */\n\n/* Don't include the TSA name in response. */\n# define TS_TSA_NAME             0x01\n\n/* Set ordering to true in response. */\n# define TS_ORDERING             0x02\n\n/*\n * Include the signer certificate and the other specified certificates in\n * the ESS signing certificate attribute beside the PKCS7 signed data.\n * Only the signer certificates is included by default.\n */\n# define TS_ESS_CERT_ID_CHAIN    0x04\n\n/* Forward declaration. */\nstruct TS_resp_ctx;\n\n/* This must return a unique number less than 160 bits long. */\ntypedef ASN1_INTEGER *(*TS_serial_cb) (struct TS_resp_ctx *, void *);\n\n/*\n * This must return the seconds and microseconds since Jan 1, 1970 in the sec\n * and usec variables allocated by the caller. Return non-zero for success\n * and zero for failure.\n */\ntypedef int (*TS_time_cb) (struct TS_resp_ctx *, void *, long *sec,\n                           long *usec);\n\n/*\n * This must process the given extension. It can modify the TS_TST_INFO\n * object of the context. Return values: !0 (processed), 0 (error, it must\n * set the status info/failure info of the response).\n */\ntypedef int (*TS_extension_cb) (struct TS_resp_ctx *, X509_EXTENSION *,\n                                void *);\n\ntypedef struct TS_resp_ctx {\n    X509 *signer_cert;\n    EVP_PKEY *signer_key;\n    STACK_OF(X509) *certs;      /* Certs to include in signed data. */\n    STACK_OF(ASN1_OBJECT) *policies; /* Acceptable policies. */\n    ASN1_OBJECT *default_policy; /* It may appear in policies, too. */\n    STACK_OF(EVP_MD) *mds;      /* Acceptable message digests. */\n    ASN1_INTEGER *seconds;      /* accuracy, 0 means not specified. */\n    ASN1_INTEGER *millis;       /* accuracy, 0 means not specified. */\n    ASN1_INTEGER *micros;       /* accuracy, 0 means not specified. */\n    unsigned clock_precision_digits; /* fraction of seconds in time stamp\n                                      * token. */\n    unsigned flags;             /* Optional info, see values above. */\n    /* Callback functions. */\n    TS_serial_cb serial_cb;\n    void *serial_cb_data;       /* User data for serial_cb. */\n    TS_time_cb time_cb;\n    void *time_cb_data;         /* User data for time_cb. */\n    TS_extension_cb extension_cb;\n    void *extension_cb_data;    /* User data for extension_cb. */\n    /* These members are used only while creating the response. */\n    TS_REQ *request;\n    TS_RESP *response;\n    TS_TST_INFO *tst_info;\n} TS_RESP_CTX;\n\nDECLARE_STACK_OF(EVP_MD)\nDECLARE_ASN1_SET_OF(EVP_MD)\n\n/* Creates a response context that can be used for generating responses. */\nTS_RESP_CTX *TS_RESP_CTX_new(void);\nvoid TS_RESP_CTX_free(TS_RESP_CTX *ctx);\n\n/* This parameter must be set. */\nint TS_RESP_CTX_set_signer_cert(TS_RESP_CTX *ctx, X509 *signer);\n\n/* This parameter must be set. */\nint TS_RESP_CTX_set_signer_key(TS_RESP_CTX *ctx, EVP_PKEY *key);\n\n/* This parameter must be set. */\nint TS_RESP_CTX_set_def_policy(TS_RESP_CTX *ctx, ASN1_OBJECT *def_policy);\n\n/* No additional certs are included in the response by default. */\nint TS_RESP_CTX_set_certs(TS_RESP_CTX *ctx, STACK_OF(X509) *certs);\n\n/*\n * Adds a new acceptable policy, only the default policy is accepted by\n * default.\n */\nint TS_RESP_CTX_add_policy(TS_RESP_CTX *ctx, ASN1_OBJECT *policy);\n\n/*\n * Adds a new acceptable message digest. Note that no message digests are\n * accepted by default. The md argument is shared with the caller.\n */\nint TS_RESP_CTX_add_md(TS_RESP_CTX *ctx, const EVP_MD *md);\n\n/* Accuracy is not included by default. */\nint TS_RESP_CTX_set_accuracy(TS_RESP_CTX *ctx,\n                             int secs, int millis, int micros);\n\n/*\n * Clock precision digits, i.e. the number of decimal digits: '0' means sec,\n * '3' msec, '6' usec, and so on. Default is 0.\n */\nint TS_RESP_CTX_set_clock_precision_digits(TS_RESP_CTX *ctx,\n                                           unsigned clock_precision_digits);\n/* At most we accept usec precision. */\n# define TS_MAX_CLOCK_PRECISION_DIGITS   6\n\n/* No flags are set by default. */\nvoid TS_RESP_CTX_add_flags(TS_RESP_CTX *ctx, int flags);\n\n/* Default callback always returns a constant. */\nvoid TS_RESP_CTX_set_serial_cb(TS_RESP_CTX *ctx, TS_serial_cb cb, void *data);\n\n/* Default callback uses the gettimeofday() and gmtime() system calls. */\nvoid TS_RESP_CTX_set_time_cb(TS_RESP_CTX *ctx, TS_time_cb cb, void *data);\n\n/*\n * Default callback rejects all extensions. The extension callback is called\n * when the TS_TST_INFO object is already set up and not signed yet.\n */\n/* FIXME: extension handling is not tested yet. */\nvoid TS_RESP_CTX_set_extension_cb(TS_RESP_CTX *ctx,\n                                  TS_extension_cb cb, void *data);\n\n/* The following methods can be used in the callbacks. */\nint TS_RESP_CTX_set_status_info(TS_RESP_CTX *ctx,\n                                int status, const char *text);\n\n/* Sets the status info only if it is still TS_STATUS_GRANTED. */\nint TS_RESP_CTX_set_status_info_cond(TS_RESP_CTX *ctx,\n                                     int status, const char *text);\n\nint TS_RESP_CTX_add_failure_info(TS_RESP_CTX *ctx, int failure);\n\n/* The get methods below can be used in the extension callback. */\nTS_REQ *TS_RESP_CTX_get_request(TS_RESP_CTX *ctx);\n\nTS_TST_INFO *TS_RESP_CTX_get_tst_info(TS_RESP_CTX *ctx);\n\n/*\n * Creates the signed TS_TST_INFO and puts it in TS_RESP.\n * In case of errors it sets the status info properly.\n * Returns NULL only in case of memory allocation/fatal error.\n */\nTS_RESP *TS_RESP_create_response(TS_RESP_CTX *ctx, BIO *req_bio);\n\n/*\n * Declarations related to response verification,\n * they are defined in ts/ts_resp_verify.c.\n */\n\nint TS_RESP_verify_signature(PKCS7 *token, STACK_OF(X509) *certs,\n                             X509_STORE *store, X509 **signer_out);\n\n/* Context structure for the generic verify method. */\n\n/* Verify the signer's certificate and the signature of the response. */\n# define TS_VFY_SIGNATURE        (1u << 0)\n/* Verify the version number of the response. */\n# define TS_VFY_VERSION          (1u << 1)\n/* Verify if the policy supplied by the user matches the policy of the TSA. */\n# define TS_VFY_POLICY           (1u << 2)\n/*\n * Verify the message imprint provided by the user. This flag should not be\n * specified with TS_VFY_DATA.\n */\n# define TS_VFY_IMPRINT          (1u << 3)\n/*\n * Verify the message imprint computed by the verify method from the user\n * provided data and the MD algorithm of the response. This flag should not\n * be specified with TS_VFY_IMPRINT.\n */\n# define TS_VFY_DATA             (1u << 4)\n/* Verify the nonce value. */\n# define TS_VFY_NONCE            (1u << 5)\n/* Verify if the TSA name field matches the signer certificate. */\n# define TS_VFY_SIGNER           (1u << 6)\n/* Verify if the TSA name field equals to the user provided name. */\n# define TS_VFY_TSA_NAME         (1u << 7)\n\n/* You can use the following convenience constants. */\n# define TS_VFY_ALL_IMPRINT      (TS_VFY_SIGNATURE       \\\n                                 | TS_VFY_VERSION       \\\n                                 | TS_VFY_POLICY        \\\n                                 | TS_VFY_IMPRINT       \\\n                                 | TS_VFY_NONCE         \\\n                                 | TS_VFY_SIGNER        \\\n                                 | TS_VFY_TSA_NAME)\n# define TS_VFY_ALL_DATA         (TS_VFY_SIGNATURE       \\\n                                 | TS_VFY_VERSION       \\\n                                 | TS_VFY_POLICY        \\\n                                 | TS_VFY_DATA          \\\n                                 | TS_VFY_NONCE         \\\n                                 | TS_VFY_SIGNER        \\\n                                 | TS_VFY_TSA_NAME)\n\ntypedef struct TS_verify_ctx {\n    /* Set this to the union of TS_VFY_... flags you want to carry out. */\n    unsigned flags;\n    /* Must be set only with TS_VFY_SIGNATURE. certs is optional. */\n    X509_STORE *store;\n    STACK_OF(X509) *certs;\n    /* Must be set only with TS_VFY_POLICY. */\n    ASN1_OBJECT *policy;\n    /*\n     * Must be set only with TS_VFY_IMPRINT. If md_alg is NULL, the\n     * algorithm from the response is used.\n     */\n    X509_ALGOR *md_alg;\n    unsigned char *imprint;\n    unsigned imprint_len;\n    /* Must be set only with TS_VFY_DATA. */\n    BIO *data;\n    /* Must be set only with TS_VFY_TSA_NAME. */\n    ASN1_INTEGER *nonce;\n    /* Must be set only with TS_VFY_TSA_NAME. */\n    GENERAL_NAME *tsa_name;\n} TS_VERIFY_CTX;\n\nint TS_RESP_verify_response(TS_VERIFY_CTX *ctx, TS_RESP *response);\nint TS_RESP_verify_token(TS_VERIFY_CTX *ctx, PKCS7 *token);\n\n/*\n * Declarations related to response verification context,\n * they are defined in ts/ts_verify_ctx.c.\n */\n\n/* Set all fields to zero. */\nTS_VERIFY_CTX *TS_VERIFY_CTX_new(void);\nvoid TS_VERIFY_CTX_init(TS_VERIFY_CTX *ctx);\nvoid TS_VERIFY_CTX_free(TS_VERIFY_CTX *ctx);\nvoid TS_VERIFY_CTX_cleanup(TS_VERIFY_CTX *ctx);\n\n/*-\n * If ctx is NULL, it allocates and returns a new object, otherwise\n * it returns ctx. It initialises all the members as follows:\n * flags = TS_VFY_ALL_IMPRINT & ~(TS_VFY_TSA_NAME | TS_VFY_SIGNATURE)\n * certs = NULL\n * store = NULL\n * policy = policy from the request or NULL if absent (in this case\n *      TS_VFY_POLICY is cleared from flags as well)\n * md_alg = MD algorithm from request\n * imprint, imprint_len = imprint from request\n * data = NULL\n * nonce, nonce_len = nonce from the request or NULL if absent (in this case\n *      TS_VFY_NONCE is cleared from flags as well)\n * tsa_name = NULL\n * Important: after calling this method TS_VFY_SIGNATURE should be added!\n */\nTS_VERIFY_CTX *TS_REQ_to_TS_VERIFY_CTX(TS_REQ *req, TS_VERIFY_CTX *ctx);\n\n/* Function declarations for TS_RESP defined in ts/ts_resp_print.c */\n\nint TS_RESP_print_bio(BIO *bio, TS_RESP *a);\nint TS_STATUS_INFO_print_bio(BIO *bio, TS_STATUS_INFO *a);\nint TS_TST_INFO_print_bio(BIO *bio, TS_TST_INFO *a);\n\n/* Common utility functions defined in ts/ts_lib.c */\n\nint TS_ASN1_INTEGER_print_bio(BIO *bio, const ASN1_INTEGER *num);\nint TS_OBJ_print_bio(BIO *bio, const ASN1_OBJECT *obj);\nint TS_ext_print_bio(BIO *bio, const STACK_OF(X509_EXTENSION) *extensions);\nint TS_X509_ALGOR_print_bio(BIO *bio, const X509_ALGOR *alg);\nint TS_MSG_IMPRINT_print_bio(BIO *bio, TS_MSG_IMPRINT *msg);\n\n/*\n * Function declarations for handling configuration options, defined in\n * ts/ts_conf.c\n */\n\nX509 *TS_CONF_load_cert(const char *file);\nSTACK_OF(X509) *TS_CONF_load_certs(const char *file);\nEVP_PKEY *TS_CONF_load_key(const char *file, const char *pass);\nconst char *TS_CONF_get_tsa_section(CONF *conf, const char *section);\nint TS_CONF_set_serial(CONF *conf, const char *section, TS_serial_cb cb,\n                       TS_RESP_CTX *ctx);\nint TS_CONF_set_crypto_device(CONF *conf, const char *section,\n                              const char *device);\nint TS_CONF_set_default_engine(const char *name);\nint TS_CONF_set_signer_cert(CONF *conf, const char *section,\n                            const char *cert, TS_RESP_CTX *ctx);\nint TS_CONF_set_certs(CONF *conf, const char *section, const char *certs,\n                      TS_RESP_CTX *ctx);\nint TS_CONF_set_signer_key(CONF *conf, const char *section,\n                           const char *key, const char *pass,\n                           TS_RESP_CTX *ctx);\nint TS_CONF_set_def_policy(CONF *conf, const char *section,\n                           const char *policy, TS_RESP_CTX *ctx);\nint TS_CONF_set_policies(CONF *conf, const char *section, TS_RESP_CTX *ctx);\nint TS_CONF_set_digests(CONF *conf, const char *section, TS_RESP_CTX *ctx);\nint TS_CONF_set_accuracy(CONF *conf, const char *section, TS_RESP_CTX *ctx);\nint TS_CONF_set_clock_precision_digits(CONF *conf, const char *section,\n                                       TS_RESP_CTX *ctx);\nint TS_CONF_set_ordering(CONF *conf, const char *section, TS_RESP_CTX *ctx);\nint TS_CONF_set_tsa_name(CONF *conf, const char *section, TS_RESP_CTX *ctx);\nint TS_CONF_set_ess_cert_id_chain(CONF *conf, const char *section,\n                                  TS_RESP_CTX *ctx);\n\n/* -------------------------------------------------- */\n/* BEGIN ERROR CODES */\n/*\n * The following lines are auto generated by the script mkerr.pl. Any changes\n * made after this point may be overwritten when the script is next run.\n */\nvoid ERR_load_TS_strings(void);\n\n/* Error codes for the TS functions. */\n\n/* Function codes. */\n# define TS_F_D2I_TS_RESP                                 147\n# define TS_F_DEF_SERIAL_CB                               110\n# define TS_F_DEF_TIME_CB                                 111\n# define TS_F_ESS_ADD_SIGNING_CERT                        112\n# define TS_F_ESS_CERT_ID_NEW_INIT                        113\n# define TS_F_ESS_SIGNING_CERT_NEW_INIT                   114\n# define TS_F_INT_TS_RESP_VERIFY_TOKEN                    149\n# define TS_F_PKCS7_TO_TS_TST_INFO                        148\n# define TS_F_TS_ACCURACY_SET_MICROS                      115\n# define TS_F_TS_ACCURACY_SET_MILLIS                      116\n# define TS_F_TS_ACCURACY_SET_SECONDS                     117\n# define TS_F_TS_CHECK_IMPRINTS                           100\n# define TS_F_TS_CHECK_NONCES                             101\n# define TS_F_TS_CHECK_POLICY                             102\n# define TS_F_TS_CHECK_SIGNING_CERTS                      103\n# define TS_F_TS_CHECK_STATUS_INFO                        104\n# define TS_F_TS_COMPUTE_IMPRINT                          145\n# define TS_F_TS_CONF_SET_DEFAULT_ENGINE                  146\n# define TS_F_TS_GET_STATUS_TEXT                          105\n# define TS_F_TS_MSG_IMPRINT_SET_ALGO                     118\n# define TS_F_TS_REQ_SET_MSG_IMPRINT                      119\n# define TS_F_TS_REQ_SET_NONCE                            120\n# define TS_F_TS_REQ_SET_POLICY_ID                        121\n# define TS_F_TS_RESP_CREATE_RESPONSE                     122\n# define TS_F_TS_RESP_CREATE_TST_INFO                     123\n# define TS_F_TS_RESP_CTX_ADD_FAILURE_INFO                124\n# define TS_F_TS_RESP_CTX_ADD_MD                          125\n# define TS_F_TS_RESP_CTX_ADD_POLICY                      126\n# define TS_F_TS_RESP_CTX_NEW                             127\n# define TS_F_TS_RESP_CTX_SET_ACCURACY                    128\n# define TS_F_TS_RESP_CTX_SET_CERTS                       129\n# define TS_F_TS_RESP_CTX_SET_DEF_POLICY                  130\n# define TS_F_TS_RESP_CTX_SET_SIGNER_CERT                 131\n# define TS_F_TS_RESP_CTX_SET_STATUS_INFO                 132\n# define TS_F_TS_RESP_GET_POLICY                          133\n# define TS_F_TS_RESP_SET_GENTIME_WITH_PRECISION          134\n# define TS_F_TS_RESP_SET_STATUS_INFO                     135\n# define TS_F_TS_RESP_SET_TST_INFO                        150\n# define TS_F_TS_RESP_SIGN                                136\n# define TS_F_TS_RESP_VERIFY_SIGNATURE                    106\n# define TS_F_TS_RESP_VERIFY_TOKEN                        107\n# define TS_F_TS_TST_INFO_SET_ACCURACY                    137\n# define TS_F_TS_TST_INFO_SET_MSG_IMPRINT                 138\n# define TS_F_TS_TST_INFO_SET_NONCE                       139\n# define TS_F_TS_TST_INFO_SET_POLICY_ID                   140\n# define TS_F_TS_TST_INFO_SET_SERIAL                      141\n# define TS_F_TS_TST_INFO_SET_TIME                        142\n# define TS_F_TS_TST_INFO_SET_TSA                         143\n# define TS_F_TS_VERIFY                                   108\n# define TS_F_TS_VERIFY_CERT                              109\n# define TS_F_TS_VERIFY_CTX_NEW                           144\n\n/* Reason codes. */\n# define TS_R_BAD_PKCS7_TYPE                              132\n# define TS_R_BAD_TYPE                                    133\n# define TS_R_CERTIFICATE_VERIFY_ERROR                    100\n# define TS_R_COULD_NOT_SET_ENGINE                        127\n# define TS_R_COULD_NOT_SET_TIME                          115\n# define TS_R_D2I_TS_RESP_INT_FAILED                      128\n# define TS_R_DETACHED_CONTENT                            134\n# define TS_R_ESS_ADD_SIGNING_CERT_ERROR                  116\n# define TS_R_ESS_SIGNING_CERTIFICATE_ERROR               101\n# define TS_R_INVALID_NULL_POINTER                        102\n# define TS_R_INVALID_SIGNER_CERTIFICATE_PURPOSE          117\n# define TS_R_MESSAGE_IMPRINT_MISMATCH                    103\n# define TS_R_NONCE_MISMATCH                              104\n# define TS_R_NONCE_NOT_RETURNED                          105\n# define TS_R_NO_CONTENT                                  106\n# define TS_R_NO_TIME_STAMP_TOKEN                         107\n# define TS_R_PKCS7_ADD_SIGNATURE_ERROR                   118\n# define TS_R_PKCS7_ADD_SIGNED_ATTR_ERROR                 119\n# define TS_R_PKCS7_TO_TS_TST_INFO_FAILED                 129\n# define TS_R_POLICY_MISMATCH                             108\n# define TS_R_PRIVATE_KEY_DOES_NOT_MATCH_CERTIFICATE      120\n# define TS_R_RESPONSE_SETUP_ERROR                        121\n# define TS_R_SIGNATURE_FAILURE                           109\n# define TS_R_THERE_MUST_BE_ONE_SIGNER                    110\n# define TS_R_TIME_SYSCALL_ERROR                          122\n# define TS_R_TOKEN_NOT_PRESENT                           130\n# define TS_R_TOKEN_PRESENT                               131\n# define TS_R_TSA_NAME_MISMATCH                           111\n# define TS_R_TSA_UNTRUSTED                               112\n# define TS_R_TST_INFO_SETUP_ERROR                        123\n# define TS_R_TS_DATASIGN                                 124\n# define TS_R_UNACCEPTABLE_POLICY                         125\n# define TS_R_UNSUPPORTED_MD_ALGORITHM                    126\n# define TS_R_UNSUPPORTED_VERSION                         113\n# define TS_R_WRONG_CONTENT_TYPE                          114\n\n#ifdef  __cplusplus\n}\n#endif\n#endif\n"
  },
  {
    "path": "Pods/OpenSSL-Universal/include-ios/openssl/txt_db.h",
    "content": "/* crypto/txt_db/txt_db.h */\n/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)\n * All rights reserved.\n *\n * This package is an SSL implementation written\n * by Eric Young (eay@cryptsoft.com).\n * The implementation was written so as to conform with Netscapes SSL.\n *\n * This library is free for commercial and non-commercial use as long as\n * the following conditions are aheared to.  The following conditions\n * apply to all code found in this distribution, be it the RC4, RSA,\n * lhash, DES, etc., code; not just the SSL code.  The SSL documentation\n * included with this distribution is covered by the same copyright terms\n * except that the holder is Tim Hudson (tjh@cryptsoft.com).\n *\n * Copyright remains Eric Young's, and as such any Copyright notices in\n * the code are not to be removed.\n * If this package is used in a product, Eric Young should be given attribution\n * as the author of the parts of the library used.\n * This can be in the form of a textual message at program startup or\n * in documentation (online or textual) provided with the package.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n * 1. Redistributions of source code must retain the copyright\n *    notice, this list of conditions and the following disclaimer.\n * 2. Redistributions in binary form must reproduce the above copyright\n *    notice, this list of conditions and the following disclaimer in the\n *    documentation and/or other materials provided with the distribution.\n * 3. All advertising materials mentioning features or use of this software\n *    must display the following acknowledgement:\n *    \"This product includes cryptographic software written by\n *     Eric Young (eay@cryptsoft.com)\"\n *    The word 'cryptographic' can be left out if the rouines from the library\n *    being used are not cryptographic related :-).\n * 4. If you include any Windows specific code (or a derivative thereof) from\n *    the apps directory (application code) you must include an acknowledgement:\n *    \"This product includes software written by Tim Hudson (tjh@cryptsoft.com)\"\n *\n * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND\n * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE\n * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n * SUCH DAMAGE.\n *\n * The licence and distribution terms for any publically available version or\n * derivative of this code cannot be changed.  i.e. this code cannot simply be\n * copied and put under another distribution licence\n * [including the GNU Public Licence.]\n */\n\n#ifndef HEADER_TXT_DB_H\n# define HEADER_TXT_DB_H\n\n# include <openssl/opensslconf.h>\n# ifndef OPENSSL_NO_BIO\n#  include <openssl/bio.h>\n# endif\n# include <openssl/stack.h>\n# include <openssl/lhash.h>\n\n# define DB_ERROR_OK                     0\n# define DB_ERROR_MALLOC                 1\n# define DB_ERROR_INDEX_CLASH            2\n# define DB_ERROR_INDEX_OUT_OF_RANGE     3\n# define DB_ERROR_NO_INDEX               4\n# define DB_ERROR_INSERT_INDEX_CLASH     5\n\n#ifdef  __cplusplus\nextern \"C\" {\n#endif\n\ntypedef OPENSSL_STRING *OPENSSL_PSTRING;\nDECLARE_SPECIAL_STACK_OF(OPENSSL_PSTRING, OPENSSL_STRING)\n\ntypedef struct txt_db_st {\n    int num_fields;\n    STACK_OF(OPENSSL_PSTRING) *data;\n    LHASH_OF(OPENSSL_STRING) **index;\n    int (**qual) (OPENSSL_STRING *);\n    long error;\n    long arg1;\n    long arg2;\n    OPENSSL_STRING *arg_row;\n} TXT_DB;\n\n# ifndef OPENSSL_NO_BIO\nTXT_DB *TXT_DB_read(BIO *in, int num);\nlong TXT_DB_write(BIO *out, TXT_DB *db);\n# else\nTXT_DB *TXT_DB_read(char *in, int num);\nlong TXT_DB_write(char *out, TXT_DB *db);\n# endif\nint TXT_DB_create_index(TXT_DB *db, int field, int (*qual) (OPENSSL_STRING *),\n                        LHASH_HASH_FN_TYPE hash, LHASH_COMP_FN_TYPE cmp);\nvoid TXT_DB_free(TXT_DB *db);\nOPENSSL_STRING *TXT_DB_get_by_index(TXT_DB *db, int idx,\n                                    OPENSSL_STRING *value);\nint TXT_DB_insert(TXT_DB *db, OPENSSL_STRING *value);\n\n#ifdef  __cplusplus\n}\n#endif\n\n#endif\n"
  },
  {
    "path": "Pods/OpenSSL-Universal/include-ios/openssl/ui.h",
    "content": "/* crypto/ui/ui.h -*- mode:C; c-file-style: \"eay\" -*- */\n/*\n * Written by Richard Levitte (richard@levitte.org) for the OpenSSL project\n * 2001.\n */\n/* ====================================================================\n * Copyright (c) 2001 The OpenSSL Project.  All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n *\n * 1. Redistributions of source code must retain the above copyright\n *    notice, this list of conditions and the following disclaimer.\n *\n * 2. Redistributions in binary form must reproduce the above copyright\n *    notice, this list of conditions and the following disclaimer in\n *    the documentation and/or other materials provided with the\n *    distribution.\n *\n * 3. All advertising materials mentioning features or use of this\n *    software must display the following acknowledgment:\n *    \"This product includes software developed by the OpenSSL Project\n *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)\"\n *\n * 4. The names \"OpenSSL Toolkit\" and \"OpenSSL Project\" must not be used to\n *    endorse or promote products derived from this software without\n *    prior written permission. For written permission, please contact\n *    openssl-core@openssl.org.\n *\n * 5. Products derived from this software may not be called \"OpenSSL\"\n *    nor may \"OpenSSL\" appear in their names without prior written\n *    permission of the OpenSSL Project.\n *\n * 6. Redistributions of any form whatsoever must retain the following\n *    acknowledgment:\n *    \"This product includes software developed by the OpenSSL Project\n *    for use in the OpenSSL Toolkit (http://www.openssl.org/)\"\n *\n * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY\n * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\n * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR\n * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,\n * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED\n * OF THE POSSIBILITY OF SUCH DAMAGE.\n * ====================================================================\n *\n * This product includes cryptographic software written by Eric Young\n * (eay@cryptsoft.com).  This product includes software written by Tim\n * Hudson (tjh@cryptsoft.com).\n *\n */\n\n#ifndef HEADER_UI_H\n# define HEADER_UI_H\n\n# ifndef OPENSSL_NO_DEPRECATED\n#  include <openssl/crypto.h>\n# endif\n# include <openssl/safestack.h>\n# include <openssl/ossl_typ.h>\n\n#ifdef  __cplusplus\nextern \"C\" {\n#endif\n\n/* Declared already in ossl_typ.h */\n/* typedef struct ui_st UI; */\n/* typedef struct ui_method_st UI_METHOD; */\n\n/*\n * All the following functions return -1 or NULL on error and in some cases\n * (UI_process()) -2 if interrupted or in some other way cancelled. When\n * everything is fine, they return 0, a positive value or a non-NULL pointer,\n * all depending on their purpose.\n */\n\n/* Creators and destructor.   */\nUI *UI_new(void);\nUI *UI_new_method(const UI_METHOD *method);\nvoid UI_free(UI *ui);\n\n/*-\n   The following functions are used to add strings to be printed and prompt\n   strings to prompt for data.  The names are UI_{add,dup}_<function>_string\n   and UI_{add,dup}_input_boolean.\n\n   UI_{add,dup}_<function>_string have the following meanings:\n        add     add a text or prompt string.  The pointers given to these\n                functions are used verbatim, no copying is done.\n        dup     make a copy of the text or prompt string, then add the copy\n                to the collection of strings in the user interface.\n        <function>\n                The function is a name for the functionality that the given\n                string shall be used for.  It can be one of:\n                        input   use the string as data prompt.\n                        verify  use the string as verification prompt.  This\n                                is used to verify a previous input.\n                        info    use the string for informational output.\n                        error   use the string for error output.\n   Honestly, there's currently no difference between info and error for the\n   moment.\n\n   UI_{add,dup}_input_boolean have the same semantics for \"add\" and \"dup\",\n   and are typically used when one wants to prompt for a yes/no response.\n\n   All of the functions in this group take a UI and a prompt string.\n   The string input and verify addition functions also take a flag argument,\n   a buffer for the result to end up with, a minimum input size and a maximum\n   input size (the result buffer MUST be large enough to be able to contain\n   the maximum number of characters).  Additionally, the verify addition\n   functions takes another buffer to compare the result against.\n   The boolean input functions take an action description string (which should\n   be safe to ignore if the expected user action is obvious, for example with\n   a dialog box with an OK button and a Cancel button), a string of acceptable\n   characters to mean OK and to mean Cancel.  The two last strings are checked\n   to make sure they don't have common characters.  Additionally, the same\n   flag argument as for the string input is taken, as well as a result buffer.\n   The result buffer is required to be at least one byte long.  Depending on\n   the answer, the first character from the OK or the Cancel character strings\n   will be stored in the first byte of the result buffer.  No NUL will be\n   added, so the result is *not* a string.\n\n   On success, the all return an index of the added information.  That index\n   is usefull when retrieving results with UI_get0_result(). */\nint UI_add_input_string(UI *ui, const char *prompt, int flags,\n                        char *result_buf, int minsize, int maxsize);\nint UI_dup_input_string(UI *ui, const char *prompt, int flags,\n                        char *result_buf, int minsize, int maxsize);\nint UI_add_verify_string(UI *ui, const char *prompt, int flags,\n                         char *result_buf, int minsize, int maxsize,\n                         const char *test_buf);\nint UI_dup_verify_string(UI *ui, const char *prompt, int flags,\n                         char *result_buf, int minsize, int maxsize,\n                         const char *test_buf);\nint UI_add_input_boolean(UI *ui, const char *prompt, const char *action_desc,\n                         const char *ok_chars, const char *cancel_chars,\n                         int flags, char *result_buf);\nint UI_dup_input_boolean(UI *ui, const char *prompt, const char *action_desc,\n                         const char *ok_chars, const char *cancel_chars,\n                         int flags, char *result_buf);\nint UI_add_info_string(UI *ui, const char *text);\nint UI_dup_info_string(UI *ui, const char *text);\nint UI_add_error_string(UI *ui, const char *text);\nint UI_dup_error_string(UI *ui, const char *text);\n\n/* These are the possible flags.  They can be or'ed together. */\n/* Use to have echoing of input */\n# define UI_INPUT_FLAG_ECHO              0x01\n/*\n * Use a default password.  Where that password is found is completely up to\n * the application, it might for example be in the user data set with\n * UI_add_user_data().  It is not recommended to have more than one input in\n * each UI being marked with this flag, or the application might get\n * confused.\n */\n# define UI_INPUT_FLAG_DEFAULT_PWD       0x02\n\n/*-\n * The user of these routines may want to define flags of their own.  The core\n * UI won't look at those, but will pass them on to the method routines.  They\n * must use higher bits so they don't get confused with the UI bits above.\n * UI_INPUT_FLAG_USER_BASE tells which is the lowest bit to use.  A good\n * example of use is this:\n *\n *    #define MY_UI_FLAG1       (0x01 << UI_INPUT_FLAG_USER_BASE)\n *\n*/\n# define UI_INPUT_FLAG_USER_BASE 16\n\n/*-\n * The following function helps construct a prompt.  object_desc is a\n * textual short description of the object, for example \"pass phrase\",\n * and object_name is the name of the object (might be a card name or\n * a file name.\n * The returned string shall always be allocated on the heap with\n * OPENSSL_malloc(), and need to be free'd with OPENSSL_free().\n *\n * If the ui_method doesn't contain a pointer to a user-defined prompt\n * constructor, a default string is built, looking like this:\n *\n *       \"Enter {object_desc} for {object_name}:\"\n *\n * So, if object_desc has the value \"pass phrase\" and object_name has\n * the value \"foo.key\", the resulting string is:\n *\n *       \"Enter pass phrase for foo.key:\"\n*/\nchar *UI_construct_prompt(UI *ui_method,\n                          const char *object_desc, const char *object_name);\n\n/*\n * The following function is used to store a pointer to user-specific data.\n * Any previous such pointer will be returned and replaced.\n *\n * For callback purposes, this function makes a lot more sense than using\n * ex_data, since the latter requires that different parts of OpenSSL or\n * applications share the same ex_data index.\n *\n * Note that the UI_OpenSSL() method completely ignores the user data. Other\n * methods may not, however.\n */\nvoid *UI_add_user_data(UI *ui, void *user_data);\n/* We need a user data retrieving function as well.  */\nvoid *UI_get0_user_data(UI *ui);\n\n/* Return the result associated with a prompt given with the index i. */\nconst char *UI_get0_result(UI *ui, int i);\n\n/* When all strings have been added, process the whole thing. */\nint UI_process(UI *ui);\n\n/*\n * Give a user interface parametrised control commands.  This can be used to\n * send down an integer, a data pointer or a function pointer, as well as be\n * used to get information from a UI.\n */\nint UI_ctrl(UI *ui, int cmd, long i, void *p, void (*f) (void));\n\n/* The commands */\n/*\n * Use UI_CONTROL_PRINT_ERRORS with the value 1 to have UI_process print the\n * OpenSSL error stack before printing any info or added error messages and\n * before any prompting.\n */\n# define UI_CTRL_PRINT_ERRORS            1\n/*\n * Check if a UI_process() is possible to do again with the same instance of\n * a user interface.  This makes UI_ctrl() return 1 if it is redoable, and 0\n * if not.\n */\n# define UI_CTRL_IS_REDOABLE             2\n\n/* Some methods may use extra data */\n# define UI_set_app_data(s,arg)         UI_set_ex_data(s,0,arg)\n# define UI_get_app_data(s)             UI_get_ex_data(s,0)\nint UI_get_ex_new_index(long argl, void *argp, CRYPTO_EX_new *new_func,\n                        CRYPTO_EX_dup *dup_func, CRYPTO_EX_free *free_func);\nint UI_set_ex_data(UI *r, int idx, void *arg);\nvoid *UI_get_ex_data(UI *r, int idx);\n\n/* Use specific methods instead of the built-in one */\nvoid UI_set_default_method(const UI_METHOD *meth);\nconst UI_METHOD *UI_get_default_method(void);\nconst UI_METHOD *UI_get_method(UI *ui);\nconst UI_METHOD *UI_set_method(UI *ui, const UI_METHOD *meth);\n\n/* The method with all the built-in thingies */\nUI_METHOD *UI_OpenSSL(void);\n\n/* ---------- For method writers ---------- */\n/*-\n   A method contains a number of functions that implement the low level\n   of the User Interface.  The functions are:\n\n        an opener       This function starts a session, maybe by opening\n                        a channel to a tty, or by opening a window.\n        a writer        This function is called to write a given string,\n                        maybe to the tty, maybe as a field label in a\n                        window.\n        a flusher       This function is called to flush everything that\n                        has been output so far.  It can be used to actually\n                        display a dialog box after it has been built.\n        a reader        This function is called to read a given prompt,\n                        maybe from the tty, maybe from a field in a\n                        window.  Note that it's called wth all string\n                        structures, not only the prompt ones, so it must\n                        check such things itself.\n        a closer        This function closes the session, maybe by closing\n                        the channel to the tty, or closing the window.\n\n   All these functions are expected to return:\n\n        0       on error.\n        1       on success.\n        -1      on out-of-band events, for example if some prompting has\n                been canceled (by pressing Ctrl-C, for example).  This is\n                only checked when returned by the flusher or the reader.\n\n   The way this is used, the opener is first called, then the writer for all\n   strings, then the flusher, then the reader for all strings and finally the\n   closer.  Note that if you want to prompt from a terminal or other command\n   line interface, the best is to have the reader also write the prompts\n   instead of having the writer do it.  If you want to prompt from a dialog\n   box, the writer can be used to build up the contents of the box, and the\n   flusher to actually display the box and run the event loop until all data\n   has been given, after which the reader only grabs the given data and puts\n   them back into the UI strings.\n\n   All method functions take a UI as argument.  Additionally, the writer and\n   the reader take a UI_STRING.\n*/\n\n/*\n * The UI_STRING type is the data structure that contains all the needed info\n * about a string or a prompt, including test data for a verification prompt.\n */\ntypedef struct ui_string_st UI_STRING;\nDECLARE_STACK_OF(UI_STRING)\n\n/*\n * The different types of strings that are currently supported. This is only\n * needed by method authors.\n */\nenum UI_string_types {\n    UIT_NONE = 0,\n    UIT_PROMPT,                 /* Prompt for a string */\n    UIT_VERIFY,                 /* Prompt for a string and verify */\n    UIT_BOOLEAN,                /* Prompt for a yes/no response */\n    UIT_INFO,                   /* Send info to the user */\n    UIT_ERROR                   /* Send an error message to the user */\n};\n\n/* Create and manipulate methods */\nUI_METHOD *UI_create_method(char *name);\nvoid UI_destroy_method(UI_METHOD *ui_method);\nint UI_method_set_opener(UI_METHOD *method, int (*opener) (UI *ui));\nint UI_method_set_writer(UI_METHOD *method,\n                         int (*writer) (UI *ui, UI_STRING *uis));\nint UI_method_set_flusher(UI_METHOD *method, int (*flusher) (UI *ui));\nint UI_method_set_reader(UI_METHOD *method,\n                         int (*reader) (UI *ui, UI_STRING *uis));\nint UI_method_set_closer(UI_METHOD *method, int (*closer) (UI *ui));\nint UI_method_set_prompt_constructor(UI_METHOD *method,\n                                     char *(*prompt_constructor) (UI *ui,\n                                                                  const char\n                                                                  *object_desc,\n                                                                  const char\n                                                                  *object_name));\nint (*UI_method_get_opener(UI_METHOD *method)) (UI *);\nint (*UI_method_get_writer(UI_METHOD *method)) (UI *, UI_STRING *);\nint (*UI_method_get_flusher(UI_METHOD *method)) (UI *);\nint (*UI_method_get_reader(UI_METHOD *method)) (UI *, UI_STRING *);\nint (*UI_method_get_closer(UI_METHOD *method)) (UI *);\nchar *(*UI_method_get_prompt_constructor(UI_METHOD *method)) (UI *,\n                                                              const char *,\n                                                              const char *);\n\n/*\n * The following functions are helpers for method writers to access relevant\n * data from a UI_STRING.\n */\n\n/* Return type of the UI_STRING */\nenum UI_string_types UI_get_string_type(UI_STRING *uis);\n/* Return input flags of the UI_STRING */\nint UI_get_input_flags(UI_STRING *uis);\n/* Return the actual string to output (the prompt, info or error) */\nconst char *UI_get0_output_string(UI_STRING *uis);\n/*\n * Return the optional action string to output (the boolean promtp\n * instruction)\n */\nconst char *UI_get0_action_string(UI_STRING *uis);\n/* Return the result of a prompt */\nconst char *UI_get0_result_string(UI_STRING *uis);\n/*\n * Return the string to test the result against.  Only useful with verifies.\n */\nconst char *UI_get0_test_string(UI_STRING *uis);\n/* Return the required minimum size of the result */\nint UI_get_result_minsize(UI_STRING *uis);\n/* Return the required maximum size of the result */\nint UI_get_result_maxsize(UI_STRING *uis);\n/* Set the result of a UI_STRING. */\nint UI_set_result(UI *ui, UI_STRING *uis, const char *result);\n\n/* A couple of popular utility functions */\nint UI_UTIL_read_pw_string(char *buf, int length, const char *prompt,\n                           int verify);\nint UI_UTIL_read_pw(char *buf, char *buff, int size, const char *prompt,\n                    int verify);\n\n/* BEGIN ERROR CODES */\n/*\n * The following lines are auto generated by the script mkerr.pl. Any changes\n * made after this point may be overwritten when the script is next run.\n */\nvoid ERR_load_UI_strings(void);\n\n/* Error codes for the UI functions. */\n\n/* Function codes. */\n# define UI_F_GENERAL_ALLOCATE_BOOLEAN                    108\n# define UI_F_GENERAL_ALLOCATE_PROMPT                     109\n# define UI_F_GENERAL_ALLOCATE_STRING                     100\n# define UI_F_UI_CTRL                                     111\n# define UI_F_UI_DUP_ERROR_STRING                         101\n# define UI_F_UI_DUP_INFO_STRING                          102\n# define UI_F_UI_DUP_INPUT_BOOLEAN                        110\n# define UI_F_UI_DUP_INPUT_STRING                         103\n# define UI_F_UI_DUP_VERIFY_STRING                        106\n# define UI_F_UI_GET0_RESULT                              107\n# define UI_F_UI_NEW_METHOD                               104\n# define UI_F_UI_SET_RESULT                               105\n\n/* Reason codes. */\n# define UI_R_COMMON_OK_AND_CANCEL_CHARACTERS             104\n# define UI_R_INDEX_TOO_LARGE                             102\n# define UI_R_INDEX_TOO_SMALL                             103\n# define UI_R_NO_RESULT_BUFFER                            105\n# define UI_R_RESULT_TOO_LARGE                            100\n# define UI_R_RESULT_TOO_SMALL                            101\n# define UI_R_UNKNOWN_CONTROL_COMMAND                     106\n\n#ifdef  __cplusplus\n}\n#endif\n#endif\n"
  },
  {
    "path": "Pods/OpenSSL-Universal/include-ios/openssl/ui_compat.h",
    "content": "/* crypto/ui/ui.h -*- mode:C; c-file-style: \"eay\" -*- */\n/*\n * Written by Richard Levitte (richard@levitte.org) for the OpenSSL project\n * 2001.\n */\n/* ====================================================================\n * Copyright (c) 2001 The OpenSSL Project.  All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n *\n * 1. Redistributions of source code must retain the above copyright\n *    notice, this list of conditions and the following disclaimer.\n *\n * 2. Redistributions in binary form must reproduce the above copyright\n *    notice, this list of conditions and the following disclaimer in\n *    the documentation and/or other materials provided with the\n *    distribution.\n *\n * 3. All advertising materials mentioning features or use of this\n *    software must display the following acknowledgment:\n *    \"This product includes software developed by the OpenSSL Project\n *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)\"\n *\n * 4. The names \"OpenSSL Toolkit\" and \"OpenSSL Project\" must not be used to\n *    endorse or promote products derived from this software without\n *    prior written permission. For written permission, please contact\n *    openssl-core@openssl.org.\n *\n * 5. Products derived from this software may not be called \"OpenSSL\"\n *    nor may \"OpenSSL\" appear in their names without prior written\n *    permission of the OpenSSL Project.\n *\n * 6. Redistributions of any form whatsoever must retain the following\n *    acknowledgment:\n *    \"This product includes software developed by the OpenSSL Project\n *    for use in the OpenSSL Toolkit (http://www.openssl.org/)\"\n *\n * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY\n * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\n * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR\n * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,\n * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED\n * OF THE POSSIBILITY OF SUCH DAMAGE.\n * ====================================================================\n *\n * This product includes cryptographic software written by Eric Young\n * (eay@cryptsoft.com).  This product includes software written by Tim\n * Hudson (tjh@cryptsoft.com).\n *\n */\n\n#ifndef HEADER_UI_COMPAT_H\n# define HEADER_UI_COMPAT_H\n\n# include <openssl/opensslconf.h>\n# include <openssl/ui.h>\n\n#ifdef  __cplusplus\nextern \"C\" {\n#endif\n\n/*\n * The following functions were previously part of the DES section, and are\n * provided here for backward compatibility reasons.\n */\n\n# define des_read_pw_string(b,l,p,v) \\\n        _ossl_old_des_read_pw_string((b),(l),(p),(v))\n# define des_read_pw(b,bf,s,p,v) \\\n        _ossl_old_des_read_pw((b),(bf),(s),(p),(v))\n\nint _ossl_old_des_read_pw_string(char *buf, int length, const char *prompt,\n                                 int verify);\nint _ossl_old_des_read_pw(char *buf, char *buff, int size, const char *prompt,\n                          int verify);\n\n#ifdef  __cplusplus\n}\n#endif\n#endif\n"
  },
  {
    "path": "Pods/OpenSSL-Universal/include-ios/openssl/whrlpool.h",
    "content": "#ifndef HEADER_WHRLPOOL_H\n# define HEADER_WHRLPOOL_H\n\n# include <openssl/e_os2.h>\n# include <stddef.h>\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n# define WHIRLPOOL_DIGEST_LENGTH (512/8)\n# define WHIRLPOOL_BBLOCK        512\n# define WHIRLPOOL_COUNTER       (256/8)\n\ntypedef struct {\n    union {\n        unsigned char c[WHIRLPOOL_DIGEST_LENGTH];\n        /* double q is here to ensure 64-bit alignment */\n        double q[WHIRLPOOL_DIGEST_LENGTH / sizeof(double)];\n    } H;\n    unsigned char data[WHIRLPOOL_BBLOCK / 8];\n    unsigned int bitoff;\n    size_t bitlen[WHIRLPOOL_COUNTER / sizeof(size_t)];\n} WHIRLPOOL_CTX;\n\n# ifndef OPENSSL_NO_WHIRLPOOL\n#  ifdef OPENSSL_FIPS\nint private_WHIRLPOOL_Init(WHIRLPOOL_CTX *c);\n#  endif\nint WHIRLPOOL_Init(WHIRLPOOL_CTX *c);\nint WHIRLPOOL_Update(WHIRLPOOL_CTX *c, const void *inp, size_t bytes);\nvoid WHIRLPOOL_BitUpdate(WHIRLPOOL_CTX *c, const void *inp, size_t bits);\nint WHIRLPOOL_Final(unsigned char *md, WHIRLPOOL_CTX *c);\nunsigned char *WHIRLPOOL(const void *inp, size_t bytes, unsigned char *md);\n# endif\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif\n"
  },
  {
    "path": "Pods/OpenSSL-Universal/include-ios/openssl/x509.h",
    "content": "/* crypto/x509/x509.h */\n/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)\n * All rights reserved.\n *\n * This package is an SSL implementation written\n * by Eric Young (eay@cryptsoft.com).\n * The implementation was written so as to conform with Netscapes SSL.\n *\n * This library is free for commercial and non-commercial use as long as\n * the following conditions are aheared to.  The following conditions\n * apply to all code found in this distribution, be it the RC4, RSA,\n * lhash, DES, etc., code; not just the SSL code.  The SSL documentation\n * included with this distribution is covered by the same copyright terms\n * except that the holder is Tim Hudson (tjh@cryptsoft.com).\n *\n * Copyright remains Eric Young's, and as such any Copyright notices in\n * the code are not to be removed.\n * If this package is used in a product, Eric Young should be given attribution\n * as the author of the parts of the library used.\n * This can be in the form of a textual message at program startup or\n * in documentation (online or textual) provided with the package.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n * 1. Redistributions of source code must retain the copyright\n *    notice, this list of conditions and the following disclaimer.\n * 2. Redistributions in binary form must reproduce the above copyright\n *    notice, this list of conditions and the following disclaimer in the\n *    documentation and/or other materials provided with the distribution.\n * 3. All advertising materials mentioning features or use of this software\n *    must display the following acknowledgement:\n *    \"This product includes cryptographic software written by\n *     Eric Young (eay@cryptsoft.com)\"\n *    The word 'cryptographic' can be left out if the rouines from the library\n *    being used are not cryptographic related :-).\n * 4. If you include any Windows specific code (or a derivative thereof) from\n *    the apps directory (application code) you must include an acknowledgement:\n *    \"This product includes software written by Tim Hudson (tjh@cryptsoft.com)\"\n *\n * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND\n * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE\n * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n * SUCH DAMAGE.\n *\n * The licence and distribution terms for any publically available version or\n * derivative of this code cannot be changed.  i.e. this code cannot simply be\n * copied and put under another distribution licence\n * [including the GNU Public Licence.]\n */\n/* ====================================================================\n * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED.\n * ECDH support in OpenSSL originally developed by\n * SUN MICROSYSTEMS, INC., and contributed to the OpenSSL project.\n */\n\n#ifndef HEADER_X509_H\n# define HEADER_X509_H\n\n# include <openssl/e_os2.h>\n# include <openssl/symhacks.h>\n# ifndef OPENSSL_NO_BUFFER\n#  include <openssl/buffer.h>\n# endif\n# ifndef OPENSSL_NO_EVP\n#  include <openssl/evp.h>\n# endif\n# ifndef OPENSSL_NO_BIO\n#  include <openssl/bio.h>\n# endif\n# include <openssl/stack.h>\n# include <openssl/asn1.h>\n# include <openssl/safestack.h>\n\n# ifndef OPENSSL_NO_EC\n#  include <openssl/ec.h>\n# endif\n\n# ifndef OPENSSL_NO_ECDSA\n#  include <openssl/ecdsa.h>\n# endif\n\n# ifndef OPENSSL_NO_ECDH\n#  include <openssl/ecdh.h>\n# endif\n\n# ifndef OPENSSL_NO_DEPRECATED\n#  ifndef OPENSSL_NO_RSA\n#   include <openssl/rsa.h>\n#  endif\n#  ifndef OPENSSL_NO_DSA\n#   include <openssl/dsa.h>\n#  endif\n#  ifndef OPENSSL_NO_DH\n#   include <openssl/dh.h>\n#  endif\n# endif\n\n# ifndef OPENSSL_NO_SHA\n#  include <openssl/sha.h>\n# endif\n# include <openssl/ossl_typ.h>\n\n#ifdef  __cplusplus\nextern \"C\" {\n#endif\n\n# ifdef OPENSSL_SYS_WIN32\n/* Under Win32 these are defined in wincrypt.h */\n#  undef X509_NAME\n#  undef X509_CERT_PAIR\n#  undef X509_EXTENSIONS\n# endif\n\n# define X509_FILETYPE_PEM       1\n# define X509_FILETYPE_ASN1      2\n# define X509_FILETYPE_DEFAULT   3\n\n# define X509v3_KU_DIGITAL_SIGNATURE     0x0080\n# define X509v3_KU_NON_REPUDIATION       0x0040\n# define X509v3_KU_KEY_ENCIPHERMENT      0x0020\n# define X509v3_KU_DATA_ENCIPHERMENT     0x0010\n# define X509v3_KU_KEY_AGREEMENT         0x0008\n# define X509v3_KU_KEY_CERT_SIGN         0x0004\n# define X509v3_KU_CRL_SIGN              0x0002\n# define X509v3_KU_ENCIPHER_ONLY         0x0001\n# define X509v3_KU_DECIPHER_ONLY         0x8000\n# define X509v3_KU_UNDEF                 0xffff\n\ntypedef struct X509_objects_st {\n    int nid;\n    int (*a2i) (void);\n    int (*i2a) (void);\n} X509_OBJECTS;\n\nstruct X509_algor_st {\n    ASN1_OBJECT *algorithm;\n    ASN1_TYPE *parameter;\n} /* X509_ALGOR */ ;\n\nDECLARE_ASN1_SET_OF(X509_ALGOR)\n\ntypedef STACK_OF(X509_ALGOR) X509_ALGORS;\n\ntypedef struct X509_val_st {\n    ASN1_TIME *notBefore;\n    ASN1_TIME *notAfter;\n} X509_VAL;\n\nstruct X509_pubkey_st {\n    X509_ALGOR *algor;\n    ASN1_BIT_STRING *public_key;\n    EVP_PKEY *pkey;\n};\n\ntypedef struct X509_sig_st {\n    X509_ALGOR *algor;\n    ASN1_OCTET_STRING *digest;\n} X509_SIG;\n\ntypedef struct X509_name_entry_st {\n    ASN1_OBJECT *object;\n    ASN1_STRING *value;\n    int set;\n    int size;                   /* temp variable */\n} X509_NAME_ENTRY;\n\nDECLARE_STACK_OF(X509_NAME_ENTRY)\nDECLARE_ASN1_SET_OF(X509_NAME_ENTRY)\n\n/* we always keep X509_NAMEs in 2 forms. */\nstruct X509_name_st {\n    STACK_OF(X509_NAME_ENTRY) *entries;\n    int modified;               /* true if 'bytes' needs to be built */\n# ifndef OPENSSL_NO_BUFFER\n    BUF_MEM *bytes;\n# else\n    char *bytes;\n# endif\n/*      unsigned long hash; Keep the hash around for lookups */\n    unsigned char *canon_enc;\n    int canon_enclen;\n} /* X509_NAME */ ;\n\nDECLARE_STACK_OF(X509_NAME)\n\n# define X509_EX_V_NETSCAPE_HACK         0x8000\n# define X509_EX_V_INIT                  0x0001\ntypedef struct X509_extension_st {\n    ASN1_OBJECT *object;\n    ASN1_BOOLEAN critical;\n    ASN1_OCTET_STRING *value;\n} X509_EXTENSION;\n\ntypedef STACK_OF(X509_EXTENSION) X509_EXTENSIONS;\n\nDECLARE_STACK_OF(X509_EXTENSION)\nDECLARE_ASN1_SET_OF(X509_EXTENSION)\n\n/* a sequence of these are used */\ntypedef struct x509_attributes_st {\n    ASN1_OBJECT *object;\n    int single;                 /* 0 for a set, 1 for a single item (which is\n                                 * wrong) */\n    union {\n        char *ptr;\n        /*\n         * 0\n         */ STACK_OF(ASN1_TYPE) *set;\n        /*\n         * 1\n         */ ASN1_TYPE *single;\n    } value;\n} X509_ATTRIBUTE;\n\nDECLARE_STACK_OF(X509_ATTRIBUTE)\nDECLARE_ASN1_SET_OF(X509_ATTRIBUTE)\n\ntypedef struct X509_req_info_st {\n    ASN1_ENCODING enc;\n    ASN1_INTEGER *version;\n    X509_NAME *subject;\n    X509_PUBKEY *pubkey;\n    /*  d=2 hl=2 l=  0 cons: cont: 00 */\n    STACK_OF(X509_ATTRIBUTE) *attributes; /* [ 0 ] */\n} X509_REQ_INFO;\n\ntypedef struct X509_req_st {\n    X509_REQ_INFO *req_info;\n    X509_ALGOR *sig_alg;\n    ASN1_BIT_STRING *signature;\n    int references;\n} X509_REQ;\n\ntypedef struct x509_cinf_st {\n    ASN1_INTEGER *version;      /* [ 0 ] default of v1 */\n    ASN1_INTEGER *serialNumber;\n    X509_ALGOR *signature;\n    X509_NAME *issuer;\n    X509_VAL *validity;\n    X509_NAME *subject;\n    X509_PUBKEY *key;\n    ASN1_BIT_STRING *issuerUID; /* [ 1 ] optional in v2 */\n    ASN1_BIT_STRING *subjectUID; /* [ 2 ] optional in v2 */\n    STACK_OF(X509_EXTENSION) *extensions; /* [ 3 ] optional in v3 */\n    ASN1_ENCODING enc;\n} X509_CINF;\n\n/*\n * This stuff is certificate \"auxiliary info\" it contains details which are\n * useful in certificate stores and databases. When used this is tagged onto\n * the end of the certificate itself\n */\n\ntypedef struct x509_cert_aux_st {\n    STACK_OF(ASN1_OBJECT) *trust; /* trusted uses */\n    STACK_OF(ASN1_OBJECT) *reject; /* rejected uses */\n    ASN1_UTF8STRING *alias;     /* \"friendly name\" */\n    ASN1_OCTET_STRING *keyid;   /* key id of private key */\n    STACK_OF(X509_ALGOR) *other; /* other unspecified info */\n} X509_CERT_AUX;\n\nstruct x509_st {\n    X509_CINF *cert_info;\n    X509_ALGOR *sig_alg;\n    ASN1_BIT_STRING *signature;\n    int valid;\n    int references;\n    char *name;\n    CRYPTO_EX_DATA ex_data;\n    /* These contain copies of various extension values */\n    long ex_pathlen;\n    long ex_pcpathlen;\n    unsigned long ex_flags;\n    unsigned long ex_kusage;\n    unsigned long ex_xkusage;\n    unsigned long ex_nscert;\n    ASN1_OCTET_STRING *skid;\n    AUTHORITY_KEYID *akid;\n    X509_POLICY_CACHE *policy_cache;\n    STACK_OF(DIST_POINT) *crldp;\n    STACK_OF(GENERAL_NAME) *altname;\n    NAME_CONSTRAINTS *nc;\n# ifndef OPENSSL_NO_RFC3779\n    STACK_OF(IPAddressFamily) *rfc3779_addr;\n    struct ASIdentifiers_st *rfc3779_asid;\n# endif\n# ifndef OPENSSL_NO_SHA\n    unsigned char sha1_hash[SHA_DIGEST_LENGTH];\n# endif\n    X509_CERT_AUX *aux;\n} /* X509 */ ;\n\nDECLARE_STACK_OF(X509)\nDECLARE_ASN1_SET_OF(X509)\n\n/* This is used for a table of trust checking functions */\n\ntypedef struct x509_trust_st {\n    int trust;\n    int flags;\n    int (*check_trust) (struct x509_trust_st *, X509 *, int);\n    char *name;\n    int arg1;\n    void *arg2;\n} X509_TRUST;\n\nDECLARE_STACK_OF(X509_TRUST)\n\ntypedef struct x509_cert_pair_st {\n    X509 *forward;\n    X509 *reverse;\n} X509_CERT_PAIR;\n\n/* standard trust ids */\n\n# define X509_TRUST_DEFAULT      -1/* Only valid in purpose settings */\n\n# define X509_TRUST_COMPAT       1\n# define X509_TRUST_SSL_CLIENT   2\n# define X509_TRUST_SSL_SERVER   3\n# define X509_TRUST_EMAIL        4\n# define X509_TRUST_OBJECT_SIGN  5\n# define X509_TRUST_OCSP_SIGN    6\n# define X509_TRUST_OCSP_REQUEST 7\n# define X509_TRUST_TSA          8\n\n/* Keep these up to date! */\n# define X509_TRUST_MIN          1\n# define X509_TRUST_MAX          8\n\n/* trust_flags values */\n# define X509_TRUST_DYNAMIC      1\n# define X509_TRUST_DYNAMIC_NAME 2\n\n/* check_trust return codes */\n\n# define X509_TRUST_TRUSTED      1\n# define X509_TRUST_REJECTED     2\n# define X509_TRUST_UNTRUSTED    3\n\n/* Flags for X509_print_ex() */\n\n# define X509_FLAG_COMPAT                0\n# define X509_FLAG_NO_HEADER             1L\n# define X509_FLAG_NO_VERSION            (1L << 1)\n# define X509_FLAG_NO_SERIAL             (1L << 2)\n# define X509_FLAG_NO_SIGNAME            (1L << 3)\n# define X509_FLAG_NO_ISSUER             (1L << 4)\n# define X509_FLAG_NO_VALIDITY           (1L << 5)\n# define X509_FLAG_NO_SUBJECT            (1L << 6)\n# define X509_FLAG_NO_PUBKEY             (1L << 7)\n# define X509_FLAG_NO_EXTENSIONS         (1L << 8)\n# define X509_FLAG_NO_SIGDUMP            (1L << 9)\n# define X509_FLAG_NO_AUX                (1L << 10)\n# define X509_FLAG_NO_ATTRIBUTES         (1L << 11)\n\n/* Flags specific to X509_NAME_print_ex() */\n\n/* The field separator information */\n\n# define XN_FLAG_SEP_MASK        (0xf << 16)\n\n# define XN_FLAG_COMPAT          0/* Traditional SSLeay: use old\n                                   * X509_NAME_print */\n# define XN_FLAG_SEP_COMMA_PLUS  (1 << 16)/* RFC2253 ,+ */\n# define XN_FLAG_SEP_CPLUS_SPC   (2 << 16)/* ,+ spaced: more readable */\n# define XN_FLAG_SEP_SPLUS_SPC   (3 << 16)/* ;+ spaced */\n# define XN_FLAG_SEP_MULTILINE   (4 << 16)/* One line per field */\n\n# define XN_FLAG_DN_REV          (1 << 20)/* Reverse DN order */\n\n/* How the field name is shown */\n\n# define XN_FLAG_FN_MASK         (0x3 << 21)\n\n# define XN_FLAG_FN_SN           0/* Object short name */\n# define XN_FLAG_FN_LN           (1 << 21)/* Object long name */\n# define XN_FLAG_FN_OID          (2 << 21)/* Always use OIDs */\n# define XN_FLAG_FN_NONE         (3 << 21)/* No field names */\n\n# define XN_FLAG_SPC_EQ          (1 << 23)/* Put spaces round '=' */\n\n/*\n * This determines if we dump fields we don't recognise: RFC2253 requires\n * this.\n */\n\n# define XN_FLAG_DUMP_UNKNOWN_FIELDS (1 << 24)\n\n# define XN_FLAG_FN_ALIGN        (1 << 25)/* Align field names to 20\n                                           * characters */\n\n/* Complete set of RFC2253 flags */\n\n# define XN_FLAG_RFC2253 (ASN1_STRFLGS_RFC2253 | \\\n                        XN_FLAG_SEP_COMMA_PLUS | \\\n                        XN_FLAG_DN_REV | \\\n                        XN_FLAG_FN_SN | \\\n                        XN_FLAG_DUMP_UNKNOWN_FIELDS)\n\n/* readable oneline form */\n\n# define XN_FLAG_ONELINE (ASN1_STRFLGS_RFC2253 | \\\n                        ASN1_STRFLGS_ESC_QUOTE | \\\n                        XN_FLAG_SEP_CPLUS_SPC | \\\n                        XN_FLAG_SPC_EQ | \\\n                        XN_FLAG_FN_SN)\n\n/* readable multiline form */\n\n# define XN_FLAG_MULTILINE (ASN1_STRFLGS_ESC_CTRL | \\\n                        ASN1_STRFLGS_ESC_MSB | \\\n                        XN_FLAG_SEP_MULTILINE | \\\n                        XN_FLAG_SPC_EQ | \\\n                        XN_FLAG_FN_LN | \\\n                        XN_FLAG_FN_ALIGN)\n\nstruct x509_revoked_st {\n    ASN1_INTEGER *serialNumber;\n    ASN1_TIME *revocationDate;\n    STACK_OF(X509_EXTENSION) /* optional */ *extensions;\n    /* Set up if indirect CRL */\n    STACK_OF(GENERAL_NAME) *issuer;\n    /* Revocation reason */\n    int reason;\n    int sequence;               /* load sequence */\n};\n\nDECLARE_STACK_OF(X509_REVOKED)\nDECLARE_ASN1_SET_OF(X509_REVOKED)\n\ntypedef struct X509_crl_info_st {\n    ASN1_INTEGER *version;\n    X509_ALGOR *sig_alg;\n    X509_NAME *issuer;\n    ASN1_TIME *lastUpdate;\n    ASN1_TIME *nextUpdate;\n    STACK_OF(X509_REVOKED) *revoked;\n    STACK_OF(X509_EXTENSION) /* [0] */ *extensions;\n    ASN1_ENCODING enc;\n} X509_CRL_INFO;\n\nstruct X509_crl_st {\n    /* actual signature */\n    X509_CRL_INFO *crl;\n    X509_ALGOR *sig_alg;\n    ASN1_BIT_STRING *signature;\n    int references;\n    int flags;\n    /* Copies of various extensions */\n    AUTHORITY_KEYID *akid;\n    ISSUING_DIST_POINT *idp;\n    /* Convenient breakdown of IDP */\n    int idp_flags;\n    int idp_reasons;\n    /* CRL and base CRL numbers for delta processing */\n    ASN1_INTEGER *crl_number;\n    ASN1_INTEGER *base_crl_number;\n# ifndef OPENSSL_NO_SHA\n    unsigned char sha1_hash[SHA_DIGEST_LENGTH];\n# endif\n    STACK_OF(GENERAL_NAMES) *issuers;\n    const X509_CRL_METHOD *meth;\n    void *meth_data;\n} /* X509_CRL */ ;\n\nDECLARE_STACK_OF(X509_CRL)\nDECLARE_ASN1_SET_OF(X509_CRL)\n\ntypedef struct private_key_st {\n    int version;\n    /* The PKCS#8 data types */\n    X509_ALGOR *enc_algor;\n    ASN1_OCTET_STRING *enc_pkey; /* encrypted pub key */\n    /* When decrypted, the following will not be NULL */\n    EVP_PKEY *dec_pkey;\n    /* used to encrypt and decrypt */\n    int key_length;\n    char *key_data;\n    int key_free;               /* true if we should auto free key_data */\n    /* expanded version of 'enc_algor' */\n    EVP_CIPHER_INFO cipher;\n    int references;\n} X509_PKEY;\n\n# ifndef OPENSSL_NO_EVP\ntypedef struct X509_info_st {\n    X509 *x509;\n    X509_CRL *crl;\n    X509_PKEY *x_pkey;\n    EVP_CIPHER_INFO enc_cipher;\n    int enc_len;\n    char *enc_data;\n    int references;\n} X509_INFO;\n\nDECLARE_STACK_OF(X509_INFO)\n# endif\n\n/*\n * The next 2 structures and their 8 routines were sent to me by Pat Richard\n * <patr@x509.com> and are used to manipulate Netscapes spki structures -\n * useful if you are writing a CA web page\n */\ntypedef struct Netscape_spkac_st {\n    X509_PUBKEY *pubkey;\n    ASN1_IA5STRING *challenge;  /* challenge sent in atlas >= PR2 */\n} NETSCAPE_SPKAC;\n\ntypedef struct Netscape_spki_st {\n    NETSCAPE_SPKAC *spkac;      /* signed public key and challenge */\n    X509_ALGOR *sig_algor;\n    ASN1_BIT_STRING *signature;\n} NETSCAPE_SPKI;\n\n/* Netscape certificate sequence structure */\ntypedef struct Netscape_certificate_sequence {\n    ASN1_OBJECT *type;\n    STACK_OF(X509) *certs;\n} NETSCAPE_CERT_SEQUENCE;\n\n/*- Unused (and iv length is wrong)\ntypedef struct CBCParameter_st\n        {\n        unsigned char iv[8];\n        } CBC_PARAM;\n*/\n\n/* Password based encryption structure */\n\ntypedef struct PBEPARAM_st {\n    ASN1_OCTET_STRING *salt;\n    ASN1_INTEGER *iter;\n} PBEPARAM;\n\n/* Password based encryption V2 structures */\n\ntypedef struct PBE2PARAM_st {\n    X509_ALGOR *keyfunc;\n    X509_ALGOR *encryption;\n} PBE2PARAM;\n\ntypedef struct PBKDF2PARAM_st {\n/* Usually OCTET STRING but could be anything */\n    ASN1_TYPE *salt;\n    ASN1_INTEGER *iter;\n    ASN1_INTEGER *keylength;\n    X509_ALGOR *prf;\n} PBKDF2PARAM;\n\n/* PKCS#8 private key info structure */\n\nstruct pkcs8_priv_key_info_st {\n    /* Flag for various broken formats */\n    int broken;\n# define PKCS8_OK                0\n# define PKCS8_NO_OCTET          1\n# define PKCS8_EMBEDDED_PARAM    2\n# define PKCS8_NS_DB             3\n# define PKCS8_NEG_PRIVKEY       4\n    ASN1_INTEGER *version;\n    X509_ALGOR *pkeyalg;\n    /* Should be OCTET STRING but some are broken */\n    ASN1_TYPE *pkey;\n    STACK_OF(X509_ATTRIBUTE) *attributes;\n};\n\n#ifdef  __cplusplus\n}\n#endif\n\n# include <openssl/x509_vfy.h>\n# include <openssl/pkcs7.h>\n\n#ifdef  __cplusplus\nextern \"C\" {\n#endif\n\n# define X509_EXT_PACK_UNKNOWN   1\n# define X509_EXT_PACK_STRING    2\n\n# define         X509_get_version(x) ASN1_INTEGER_get((x)->cert_info->version)\n/* #define      X509_get_serialNumber(x) ((x)->cert_info->serialNumber) */\n# define         X509_get_notBefore(x) ((x)->cert_info->validity->notBefore)\n# define         X509_get_notAfter(x) ((x)->cert_info->validity->notAfter)\n# define         X509_extract_key(x)     X509_get_pubkey(x)/*****/\n# define         X509_REQ_get_version(x) ASN1_INTEGER_get((x)->req_info->version)\n# define         X509_REQ_get_subject_name(x) ((x)->req_info->subject)\n# define         X509_REQ_extract_key(a) X509_REQ_get_pubkey(a)\n# define         X509_name_cmp(a,b)      X509_NAME_cmp((a),(b))\n# define         X509_get_signature_type(x) EVP_PKEY_type(OBJ_obj2nid((x)->sig_alg->algorithm))\n\n# define         X509_CRL_get_version(x) ASN1_INTEGER_get((x)->crl->version)\n# define         X509_CRL_get_lastUpdate(x) ((x)->crl->lastUpdate)\n# define         X509_CRL_get_nextUpdate(x) ((x)->crl->nextUpdate)\n# define         X509_CRL_get_issuer(x) ((x)->crl->issuer)\n# define         X509_CRL_get_REVOKED(x) ((x)->crl->revoked)\n\nvoid X509_CRL_set_default_method(const X509_CRL_METHOD *meth);\nX509_CRL_METHOD *X509_CRL_METHOD_new(int (*crl_init) (X509_CRL *crl),\n                                     int (*crl_free) (X509_CRL *crl),\n                                     int (*crl_lookup) (X509_CRL *crl,\n                                                        X509_REVOKED **ret,\n                                                        ASN1_INTEGER *ser,\n                                                        X509_NAME *issuer),\n                                     int (*crl_verify) (X509_CRL *crl,\n                                                        EVP_PKEY *pk));\nvoid X509_CRL_METHOD_free(X509_CRL_METHOD *m);\n\nvoid X509_CRL_set_meth_data(X509_CRL *crl, void *dat);\nvoid *X509_CRL_get_meth_data(X509_CRL *crl);\n\n/*\n * This one is only used so that a binary form can output, as in\n * i2d_X509_NAME(X509_get_X509_PUBKEY(x),&buf)\n */\n# define         X509_get_X509_PUBKEY(x) ((x)->cert_info->key)\n\nconst char *X509_verify_cert_error_string(long n);\n\n# ifndef OPENSSL_NO_EVP\nint X509_verify(X509 *a, EVP_PKEY *r);\n\nint X509_REQ_verify(X509_REQ *a, EVP_PKEY *r);\nint X509_CRL_verify(X509_CRL *a, EVP_PKEY *r);\nint NETSCAPE_SPKI_verify(NETSCAPE_SPKI *a, EVP_PKEY *r);\n\nNETSCAPE_SPKI *NETSCAPE_SPKI_b64_decode(const char *str, int len);\nchar *NETSCAPE_SPKI_b64_encode(NETSCAPE_SPKI *x);\nEVP_PKEY *NETSCAPE_SPKI_get_pubkey(NETSCAPE_SPKI *x);\nint NETSCAPE_SPKI_set_pubkey(NETSCAPE_SPKI *x, EVP_PKEY *pkey);\n\nint NETSCAPE_SPKI_print(BIO *out, NETSCAPE_SPKI *spki);\n\nint X509_signature_dump(BIO *bp, const ASN1_STRING *sig, int indent);\nint X509_signature_print(BIO *bp, X509_ALGOR *alg, ASN1_STRING *sig);\n\nint X509_sign(X509 *x, EVP_PKEY *pkey, const EVP_MD *md);\nint X509_sign_ctx(X509 *x, EVP_MD_CTX *ctx);\nint X509_REQ_sign(X509_REQ *x, EVP_PKEY *pkey, const EVP_MD *md);\nint X509_REQ_sign_ctx(X509_REQ *x, EVP_MD_CTX *ctx);\nint X509_CRL_sign(X509_CRL *x, EVP_PKEY *pkey, const EVP_MD *md);\nint X509_CRL_sign_ctx(X509_CRL *x, EVP_MD_CTX *ctx);\nint NETSCAPE_SPKI_sign(NETSCAPE_SPKI *x, EVP_PKEY *pkey, const EVP_MD *md);\n\nint X509_pubkey_digest(const X509 *data, const EVP_MD *type,\n                       unsigned char *md, unsigned int *len);\nint X509_digest(const X509 *data, const EVP_MD *type,\n                unsigned char *md, unsigned int *len);\nint X509_CRL_digest(const X509_CRL *data, const EVP_MD *type,\n                    unsigned char *md, unsigned int *len);\nint X509_REQ_digest(const X509_REQ *data, const EVP_MD *type,\n                    unsigned char *md, unsigned int *len);\nint X509_NAME_digest(const X509_NAME *data, const EVP_MD *type,\n                     unsigned char *md, unsigned int *len);\n# endif\n\n# ifndef OPENSSL_NO_FP_API\nX509 *d2i_X509_fp(FILE *fp, X509 **x509);\nint i2d_X509_fp(FILE *fp, X509 *x509);\nX509_CRL *d2i_X509_CRL_fp(FILE *fp, X509_CRL **crl);\nint i2d_X509_CRL_fp(FILE *fp, X509_CRL *crl);\nX509_REQ *d2i_X509_REQ_fp(FILE *fp, X509_REQ **req);\nint i2d_X509_REQ_fp(FILE *fp, X509_REQ *req);\n#  ifndef OPENSSL_NO_RSA\nRSA *d2i_RSAPrivateKey_fp(FILE *fp, RSA **rsa);\nint i2d_RSAPrivateKey_fp(FILE *fp, RSA *rsa);\nRSA *d2i_RSAPublicKey_fp(FILE *fp, RSA **rsa);\nint i2d_RSAPublicKey_fp(FILE *fp, RSA *rsa);\nRSA *d2i_RSA_PUBKEY_fp(FILE *fp, RSA **rsa);\nint i2d_RSA_PUBKEY_fp(FILE *fp, RSA *rsa);\n#  endif\n#  ifndef OPENSSL_NO_DSA\nDSA *d2i_DSA_PUBKEY_fp(FILE *fp, DSA **dsa);\nint i2d_DSA_PUBKEY_fp(FILE *fp, DSA *dsa);\nDSA *d2i_DSAPrivateKey_fp(FILE *fp, DSA **dsa);\nint i2d_DSAPrivateKey_fp(FILE *fp, DSA *dsa);\n#  endif\n#  ifndef OPENSSL_NO_EC\nEC_KEY *d2i_EC_PUBKEY_fp(FILE *fp, EC_KEY **eckey);\nint i2d_EC_PUBKEY_fp(FILE *fp, EC_KEY *eckey);\nEC_KEY *d2i_ECPrivateKey_fp(FILE *fp, EC_KEY **eckey);\nint i2d_ECPrivateKey_fp(FILE *fp, EC_KEY *eckey);\n#  endif\nX509_SIG *d2i_PKCS8_fp(FILE *fp, X509_SIG **p8);\nint i2d_PKCS8_fp(FILE *fp, X509_SIG *p8);\nPKCS8_PRIV_KEY_INFO *d2i_PKCS8_PRIV_KEY_INFO_fp(FILE *fp,\n                                                PKCS8_PRIV_KEY_INFO **p8inf);\nint i2d_PKCS8_PRIV_KEY_INFO_fp(FILE *fp, PKCS8_PRIV_KEY_INFO *p8inf);\nint i2d_PKCS8PrivateKeyInfo_fp(FILE *fp, EVP_PKEY *key);\nint i2d_PrivateKey_fp(FILE *fp, EVP_PKEY *pkey);\nEVP_PKEY *d2i_PrivateKey_fp(FILE *fp, EVP_PKEY **a);\nint i2d_PUBKEY_fp(FILE *fp, EVP_PKEY *pkey);\nEVP_PKEY *d2i_PUBKEY_fp(FILE *fp, EVP_PKEY **a);\n# endif\n\n# ifndef OPENSSL_NO_BIO\nX509 *d2i_X509_bio(BIO *bp, X509 **x509);\nint i2d_X509_bio(BIO *bp, X509 *x509);\nX509_CRL *d2i_X509_CRL_bio(BIO *bp, X509_CRL **crl);\nint i2d_X509_CRL_bio(BIO *bp, X509_CRL *crl);\nX509_REQ *d2i_X509_REQ_bio(BIO *bp, X509_REQ **req);\nint i2d_X509_REQ_bio(BIO *bp, X509_REQ *req);\n#  ifndef OPENSSL_NO_RSA\nRSA *d2i_RSAPrivateKey_bio(BIO *bp, RSA **rsa);\nint i2d_RSAPrivateKey_bio(BIO *bp, RSA *rsa);\nRSA *d2i_RSAPublicKey_bio(BIO *bp, RSA **rsa);\nint i2d_RSAPublicKey_bio(BIO *bp, RSA *rsa);\nRSA *d2i_RSA_PUBKEY_bio(BIO *bp, RSA **rsa);\nint i2d_RSA_PUBKEY_bio(BIO *bp, RSA *rsa);\n#  endif\n#  ifndef OPENSSL_NO_DSA\nDSA *d2i_DSA_PUBKEY_bio(BIO *bp, DSA **dsa);\nint i2d_DSA_PUBKEY_bio(BIO *bp, DSA *dsa);\nDSA *d2i_DSAPrivateKey_bio(BIO *bp, DSA **dsa);\nint i2d_DSAPrivateKey_bio(BIO *bp, DSA *dsa);\n#  endif\n#  ifndef OPENSSL_NO_EC\nEC_KEY *d2i_EC_PUBKEY_bio(BIO *bp, EC_KEY **eckey);\nint i2d_EC_PUBKEY_bio(BIO *bp, EC_KEY *eckey);\nEC_KEY *d2i_ECPrivateKey_bio(BIO *bp, EC_KEY **eckey);\nint i2d_ECPrivateKey_bio(BIO *bp, EC_KEY *eckey);\n#  endif\nX509_SIG *d2i_PKCS8_bio(BIO *bp, X509_SIG **p8);\nint i2d_PKCS8_bio(BIO *bp, X509_SIG *p8);\nPKCS8_PRIV_KEY_INFO *d2i_PKCS8_PRIV_KEY_INFO_bio(BIO *bp,\n                                                 PKCS8_PRIV_KEY_INFO **p8inf);\nint i2d_PKCS8_PRIV_KEY_INFO_bio(BIO *bp, PKCS8_PRIV_KEY_INFO *p8inf);\nint i2d_PKCS8PrivateKeyInfo_bio(BIO *bp, EVP_PKEY *key);\nint i2d_PrivateKey_bio(BIO *bp, EVP_PKEY *pkey);\nEVP_PKEY *d2i_PrivateKey_bio(BIO *bp, EVP_PKEY **a);\nint i2d_PUBKEY_bio(BIO *bp, EVP_PKEY *pkey);\nEVP_PKEY *d2i_PUBKEY_bio(BIO *bp, EVP_PKEY **a);\n# endif\n\nX509 *X509_dup(X509 *x509);\nX509_ATTRIBUTE *X509_ATTRIBUTE_dup(X509_ATTRIBUTE *xa);\nX509_EXTENSION *X509_EXTENSION_dup(X509_EXTENSION *ex);\nX509_CRL *X509_CRL_dup(X509_CRL *crl);\nX509_REQ *X509_REQ_dup(X509_REQ *req);\nX509_ALGOR *X509_ALGOR_dup(X509_ALGOR *xn);\nint X509_ALGOR_set0(X509_ALGOR *alg, ASN1_OBJECT *aobj, int ptype,\n                    void *pval);\nvoid X509_ALGOR_get0(ASN1_OBJECT **paobj, int *pptype, void **ppval,\n                     X509_ALGOR *algor);\nvoid X509_ALGOR_set_md(X509_ALGOR *alg, const EVP_MD *md);\nint X509_ALGOR_cmp(const X509_ALGOR *a, const X509_ALGOR *b);\n\nX509_NAME *X509_NAME_dup(X509_NAME *xn);\nX509_NAME_ENTRY *X509_NAME_ENTRY_dup(X509_NAME_ENTRY *ne);\n\nint X509_cmp_time(const ASN1_TIME *s, time_t *t);\nint X509_cmp_current_time(const ASN1_TIME *s);\nASN1_TIME *X509_time_adj(ASN1_TIME *s, long adj, time_t *t);\nASN1_TIME *X509_time_adj_ex(ASN1_TIME *s,\n                            int offset_day, long offset_sec, time_t *t);\nASN1_TIME *X509_gmtime_adj(ASN1_TIME *s, long adj);\n\nconst char *X509_get_default_cert_area(void);\nconst char *X509_get_default_cert_dir(void);\nconst char *X509_get_default_cert_file(void);\nconst char *X509_get_default_cert_dir_env(void);\nconst char *X509_get_default_cert_file_env(void);\nconst char *X509_get_default_private_dir(void);\n\nX509_REQ *X509_to_X509_REQ(X509 *x, EVP_PKEY *pkey, const EVP_MD *md);\nX509 *X509_REQ_to_X509(X509_REQ *r, int days, EVP_PKEY *pkey);\n\nDECLARE_ASN1_FUNCTIONS(X509_ALGOR)\nDECLARE_ASN1_ENCODE_FUNCTIONS(X509_ALGORS, X509_ALGORS, X509_ALGORS)\nDECLARE_ASN1_FUNCTIONS(X509_VAL)\n\nDECLARE_ASN1_FUNCTIONS(X509_PUBKEY)\n\nint X509_PUBKEY_set(X509_PUBKEY **x, EVP_PKEY *pkey);\nEVP_PKEY *X509_PUBKEY_get(X509_PUBKEY *key);\nint X509_get_pubkey_parameters(EVP_PKEY *pkey, STACK_OF(X509) *chain);\nint i2d_PUBKEY(EVP_PKEY *a, unsigned char **pp);\nEVP_PKEY *d2i_PUBKEY(EVP_PKEY **a, const unsigned char **pp, long length);\n# ifndef OPENSSL_NO_RSA\nint i2d_RSA_PUBKEY(RSA *a, unsigned char **pp);\nRSA *d2i_RSA_PUBKEY(RSA **a, const unsigned char **pp, long length);\n# endif\n# ifndef OPENSSL_NO_DSA\nint i2d_DSA_PUBKEY(DSA *a, unsigned char **pp);\nDSA *d2i_DSA_PUBKEY(DSA **a, const unsigned char **pp, long length);\n# endif\n# ifndef OPENSSL_NO_EC\nint i2d_EC_PUBKEY(EC_KEY *a, unsigned char **pp);\nEC_KEY *d2i_EC_PUBKEY(EC_KEY **a, const unsigned char **pp, long length);\n# endif\n\nDECLARE_ASN1_FUNCTIONS(X509_SIG)\nDECLARE_ASN1_FUNCTIONS(X509_REQ_INFO)\nDECLARE_ASN1_FUNCTIONS(X509_REQ)\n\nDECLARE_ASN1_FUNCTIONS(X509_ATTRIBUTE)\nX509_ATTRIBUTE *X509_ATTRIBUTE_create(int nid, int atrtype, void *value);\n\nDECLARE_ASN1_FUNCTIONS(X509_EXTENSION)\nDECLARE_ASN1_ENCODE_FUNCTIONS(X509_EXTENSIONS, X509_EXTENSIONS, X509_EXTENSIONS)\n\nDECLARE_ASN1_FUNCTIONS(X509_NAME_ENTRY)\n\nDECLARE_ASN1_FUNCTIONS(X509_NAME)\n\nint X509_NAME_set(X509_NAME **xn, X509_NAME *name);\n\nDECLARE_ASN1_FUNCTIONS(X509_CINF)\n\nDECLARE_ASN1_FUNCTIONS(X509)\nDECLARE_ASN1_FUNCTIONS(X509_CERT_AUX)\n\nDECLARE_ASN1_FUNCTIONS(X509_CERT_PAIR)\n\nint X509_get_ex_new_index(long argl, void *argp, CRYPTO_EX_new *new_func,\n                          CRYPTO_EX_dup *dup_func, CRYPTO_EX_free *free_func);\nint X509_set_ex_data(X509 *r, int idx, void *arg);\nvoid *X509_get_ex_data(X509 *r, int idx);\nint i2d_X509_AUX(X509 *a, unsigned char **pp);\nX509 *d2i_X509_AUX(X509 **a, const unsigned char **pp, long length);\n\nint X509_alias_set1(X509 *x, unsigned char *name, int len);\nint X509_keyid_set1(X509 *x, unsigned char *id, int len);\nunsigned char *X509_alias_get0(X509 *x, int *len);\nunsigned char *X509_keyid_get0(X509 *x, int *len);\nint (*X509_TRUST_set_default(int (*trust) (int, X509 *, int))) (int, X509 *,\n                                                                int);\nint X509_TRUST_set(int *t, int trust);\nint X509_add1_trust_object(X509 *x, ASN1_OBJECT *obj);\nint X509_add1_reject_object(X509 *x, ASN1_OBJECT *obj);\nvoid X509_trust_clear(X509 *x);\nvoid X509_reject_clear(X509 *x);\n\nDECLARE_ASN1_FUNCTIONS(X509_REVOKED)\nDECLARE_ASN1_FUNCTIONS(X509_CRL_INFO)\nDECLARE_ASN1_FUNCTIONS(X509_CRL)\n\nint X509_CRL_add0_revoked(X509_CRL *crl, X509_REVOKED *rev);\nint X509_CRL_get0_by_serial(X509_CRL *crl,\n                            X509_REVOKED **ret, ASN1_INTEGER *serial);\nint X509_CRL_get0_by_cert(X509_CRL *crl, X509_REVOKED **ret, X509 *x);\n\nX509_PKEY *X509_PKEY_new(void);\nvoid X509_PKEY_free(X509_PKEY *a);\nint i2d_X509_PKEY(X509_PKEY *a, unsigned char **pp);\nX509_PKEY *d2i_X509_PKEY(X509_PKEY **a, const unsigned char **pp,\n                         long length);\n\nDECLARE_ASN1_FUNCTIONS(NETSCAPE_SPKI)\nDECLARE_ASN1_FUNCTIONS(NETSCAPE_SPKAC)\nDECLARE_ASN1_FUNCTIONS(NETSCAPE_CERT_SEQUENCE)\n\n# ifndef OPENSSL_NO_EVP\nX509_INFO *X509_INFO_new(void);\nvoid X509_INFO_free(X509_INFO *a);\nchar *X509_NAME_oneline(X509_NAME *a, char *buf, int size);\n\nint ASN1_verify(i2d_of_void *i2d, X509_ALGOR *algor1,\n                ASN1_BIT_STRING *signature, char *data, EVP_PKEY *pkey);\n\nint ASN1_digest(i2d_of_void *i2d, const EVP_MD *type, char *data,\n                unsigned char *md, unsigned int *len);\n\nint ASN1_sign(i2d_of_void *i2d, X509_ALGOR *algor1,\n              X509_ALGOR *algor2, ASN1_BIT_STRING *signature,\n              char *data, EVP_PKEY *pkey, const EVP_MD *type);\n\nint ASN1_item_digest(const ASN1_ITEM *it, const EVP_MD *type, void *data,\n                     unsigned char *md, unsigned int *len);\n\nint ASN1_item_verify(const ASN1_ITEM *it, X509_ALGOR *algor1,\n                     ASN1_BIT_STRING *signature, void *data, EVP_PKEY *pkey);\n\nint ASN1_item_sign(const ASN1_ITEM *it, X509_ALGOR *algor1,\n                   X509_ALGOR *algor2, ASN1_BIT_STRING *signature, void *data,\n                   EVP_PKEY *pkey, const EVP_MD *type);\nint ASN1_item_sign_ctx(const ASN1_ITEM *it, X509_ALGOR *algor1,\n                       X509_ALGOR *algor2, ASN1_BIT_STRING *signature,\n                       void *asn, EVP_MD_CTX *ctx);\n# endif\n\nint X509_set_version(X509 *x, long version);\nint X509_set_serialNumber(X509 *x, ASN1_INTEGER *serial);\nASN1_INTEGER *X509_get_serialNumber(X509 *x);\nint X509_set_issuer_name(X509 *x, X509_NAME *name);\nX509_NAME *X509_get_issuer_name(X509 *a);\nint X509_set_subject_name(X509 *x, X509_NAME *name);\nX509_NAME *X509_get_subject_name(X509 *a);\nint X509_set_notBefore(X509 *x, const ASN1_TIME *tm);\nint X509_set_notAfter(X509 *x, const ASN1_TIME *tm);\nint X509_set_pubkey(X509 *x, EVP_PKEY *pkey);\nEVP_PKEY *X509_get_pubkey(X509 *x);\nASN1_BIT_STRING *X509_get0_pubkey_bitstr(const X509 *x);\nint X509_certificate_type(X509 *x, EVP_PKEY *pubkey /* optional */ );\n\nint X509_REQ_set_version(X509_REQ *x, long version);\nint X509_REQ_set_subject_name(X509_REQ *req, X509_NAME *name);\nint X509_REQ_set_pubkey(X509_REQ *x, EVP_PKEY *pkey);\nEVP_PKEY *X509_REQ_get_pubkey(X509_REQ *req);\nint X509_REQ_extension_nid(int nid);\nint *X509_REQ_get_extension_nids(void);\nvoid X509_REQ_set_extension_nids(int *nids);\nSTACK_OF(X509_EXTENSION) *X509_REQ_get_extensions(X509_REQ *req);\nint X509_REQ_add_extensions_nid(X509_REQ *req, STACK_OF(X509_EXTENSION) *exts,\n                                int nid);\nint X509_REQ_add_extensions(X509_REQ *req, STACK_OF(X509_EXTENSION) *exts);\nint X509_REQ_get_attr_count(const X509_REQ *req);\nint X509_REQ_get_attr_by_NID(const X509_REQ *req, int nid, int lastpos);\nint X509_REQ_get_attr_by_OBJ(const X509_REQ *req, ASN1_OBJECT *obj,\n                             int lastpos);\nX509_ATTRIBUTE *X509_REQ_get_attr(const X509_REQ *req, int loc);\nX509_ATTRIBUTE *X509_REQ_delete_attr(X509_REQ *req, int loc);\nint X509_REQ_add1_attr(X509_REQ *req, X509_ATTRIBUTE *attr);\nint X509_REQ_add1_attr_by_OBJ(X509_REQ *req,\n                              const ASN1_OBJECT *obj, int type,\n                              const unsigned char *bytes, int len);\nint X509_REQ_add1_attr_by_NID(X509_REQ *req,\n                              int nid, int type,\n                              const unsigned char *bytes, int len);\nint X509_REQ_add1_attr_by_txt(X509_REQ *req,\n                              const char *attrname, int type,\n                              const unsigned char *bytes, int len);\n\nint X509_CRL_set_version(X509_CRL *x, long version);\nint X509_CRL_set_issuer_name(X509_CRL *x, X509_NAME *name);\nint X509_CRL_set_lastUpdate(X509_CRL *x, const ASN1_TIME *tm);\nint X509_CRL_set_nextUpdate(X509_CRL *x, const ASN1_TIME *tm);\nint X509_CRL_sort(X509_CRL *crl);\n\nint X509_REVOKED_set_serialNumber(X509_REVOKED *x, ASN1_INTEGER *serial);\nint X509_REVOKED_set_revocationDate(X509_REVOKED *r, ASN1_TIME *tm);\n\nint X509_REQ_check_private_key(X509_REQ *x509, EVP_PKEY *pkey);\n\nint X509_check_private_key(X509 *x509, EVP_PKEY *pkey);\n\nint X509_issuer_and_serial_cmp(const X509 *a, const X509 *b);\nunsigned long X509_issuer_and_serial_hash(X509 *a);\n\nint X509_issuer_name_cmp(const X509 *a, const X509 *b);\nunsigned long X509_issuer_name_hash(X509 *a);\n\nint X509_subject_name_cmp(const X509 *a, const X509 *b);\nunsigned long X509_subject_name_hash(X509 *x);\n\n# ifndef OPENSSL_NO_MD5\nunsigned long X509_issuer_name_hash_old(X509 *a);\nunsigned long X509_subject_name_hash_old(X509 *x);\n# endif\n\nint X509_cmp(const X509 *a, const X509 *b);\nint X509_NAME_cmp(const X509_NAME *a, const X509_NAME *b);\nunsigned long X509_NAME_hash(X509_NAME *x);\nunsigned long X509_NAME_hash_old(X509_NAME *x);\n\nint X509_CRL_cmp(const X509_CRL *a, const X509_CRL *b);\nint X509_CRL_match(const X509_CRL *a, const X509_CRL *b);\n# ifndef OPENSSL_NO_FP_API\nint X509_print_ex_fp(FILE *bp, X509 *x, unsigned long nmflag,\n                     unsigned long cflag);\nint X509_print_fp(FILE *bp, X509 *x);\nint X509_CRL_print_fp(FILE *bp, X509_CRL *x);\nint X509_REQ_print_fp(FILE *bp, X509_REQ *req);\nint X509_NAME_print_ex_fp(FILE *fp, X509_NAME *nm, int indent,\n                          unsigned long flags);\n# endif\n\n# ifndef OPENSSL_NO_BIO\nint X509_NAME_print(BIO *bp, X509_NAME *name, int obase);\nint X509_NAME_print_ex(BIO *out, X509_NAME *nm, int indent,\n                       unsigned long flags);\nint X509_print_ex(BIO *bp, X509 *x, unsigned long nmflag,\n                  unsigned long cflag);\nint X509_print(BIO *bp, X509 *x);\nint X509_ocspid_print(BIO *bp, X509 *x);\nint X509_CERT_AUX_print(BIO *bp, X509_CERT_AUX *x, int indent);\nint X509_CRL_print(BIO *bp, X509_CRL *x);\nint X509_REQ_print_ex(BIO *bp, X509_REQ *x, unsigned long nmflag,\n                      unsigned long cflag);\nint X509_REQ_print(BIO *bp, X509_REQ *req);\n# endif\n\nint X509_NAME_entry_count(X509_NAME *name);\nint X509_NAME_get_text_by_NID(X509_NAME *name, int nid, char *buf, int len);\nint X509_NAME_get_text_by_OBJ(X509_NAME *name, ASN1_OBJECT *obj,\n                              char *buf, int len);\n\n/*\n * NOTE: you should be passsing -1, not 0 as lastpos.  The functions that use\n * lastpos, search after that position on.\n */\nint X509_NAME_get_index_by_NID(X509_NAME *name, int nid, int lastpos);\nint X509_NAME_get_index_by_OBJ(X509_NAME *name, ASN1_OBJECT *obj,\n                               int lastpos);\nX509_NAME_ENTRY *X509_NAME_get_entry(X509_NAME *name, int loc);\nX509_NAME_ENTRY *X509_NAME_delete_entry(X509_NAME *name, int loc);\nint X509_NAME_add_entry(X509_NAME *name, X509_NAME_ENTRY *ne,\n                        int loc, int set);\nint X509_NAME_add_entry_by_OBJ(X509_NAME *name, ASN1_OBJECT *obj, int type,\n                               unsigned char *bytes, int len, int loc,\n                               int set);\nint X509_NAME_add_entry_by_NID(X509_NAME *name, int nid, int type,\n                               unsigned char *bytes, int len, int loc,\n                               int set);\nX509_NAME_ENTRY *X509_NAME_ENTRY_create_by_txt(X509_NAME_ENTRY **ne,\n                                               const char *field, int type,\n                                               const unsigned char *bytes,\n                                               int len);\nX509_NAME_ENTRY *X509_NAME_ENTRY_create_by_NID(X509_NAME_ENTRY **ne, int nid,\n                                               int type, unsigned char *bytes,\n                                               int len);\nint X509_NAME_add_entry_by_txt(X509_NAME *name, const char *field, int type,\n                               const unsigned char *bytes, int len, int loc,\n                               int set);\nX509_NAME_ENTRY *X509_NAME_ENTRY_create_by_OBJ(X509_NAME_ENTRY **ne,\n                                               ASN1_OBJECT *obj, int type,\n                                               const unsigned char *bytes,\n                                               int len);\nint X509_NAME_ENTRY_set_object(X509_NAME_ENTRY *ne, ASN1_OBJECT *obj);\nint X509_NAME_ENTRY_set_data(X509_NAME_ENTRY *ne, int type,\n                             const unsigned char *bytes, int len);\nASN1_OBJECT *X509_NAME_ENTRY_get_object(X509_NAME_ENTRY *ne);\nASN1_STRING *X509_NAME_ENTRY_get_data(X509_NAME_ENTRY *ne);\n\nint X509v3_get_ext_count(const STACK_OF(X509_EXTENSION) *x);\nint X509v3_get_ext_by_NID(const STACK_OF(X509_EXTENSION) *x,\n                          int nid, int lastpos);\nint X509v3_get_ext_by_OBJ(const STACK_OF(X509_EXTENSION) *x,\n                          ASN1_OBJECT *obj, int lastpos);\nint X509v3_get_ext_by_critical(const STACK_OF(X509_EXTENSION) *x,\n                               int crit, int lastpos);\nX509_EXTENSION *X509v3_get_ext(const STACK_OF(X509_EXTENSION) *x, int loc);\nX509_EXTENSION *X509v3_delete_ext(STACK_OF(X509_EXTENSION) *x, int loc);\nSTACK_OF(X509_EXTENSION) *X509v3_add_ext(STACK_OF(X509_EXTENSION) **x,\n                                         X509_EXTENSION *ex, int loc);\n\nint X509_get_ext_count(X509 *x);\nint X509_get_ext_by_NID(X509 *x, int nid, int lastpos);\nint X509_get_ext_by_OBJ(X509 *x, ASN1_OBJECT *obj, int lastpos);\nint X509_get_ext_by_critical(X509 *x, int crit, int lastpos);\nX509_EXTENSION *X509_get_ext(X509 *x, int loc);\nX509_EXTENSION *X509_delete_ext(X509 *x, int loc);\nint X509_add_ext(X509 *x, X509_EXTENSION *ex, int loc);\nvoid *X509_get_ext_d2i(X509 *x, int nid, int *crit, int *idx);\nint X509_add1_ext_i2d(X509 *x, int nid, void *value, int crit,\n                      unsigned long flags);\n\nint X509_CRL_get_ext_count(X509_CRL *x);\nint X509_CRL_get_ext_by_NID(X509_CRL *x, int nid, int lastpos);\nint X509_CRL_get_ext_by_OBJ(X509_CRL *x, ASN1_OBJECT *obj, int lastpos);\nint X509_CRL_get_ext_by_critical(X509_CRL *x, int crit, int lastpos);\nX509_EXTENSION *X509_CRL_get_ext(X509_CRL *x, int loc);\nX509_EXTENSION *X509_CRL_delete_ext(X509_CRL *x, int loc);\nint X509_CRL_add_ext(X509_CRL *x, X509_EXTENSION *ex, int loc);\nvoid *X509_CRL_get_ext_d2i(X509_CRL *x, int nid, int *crit, int *idx);\nint X509_CRL_add1_ext_i2d(X509_CRL *x, int nid, void *value, int crit,\n                          unsigned long flags);\n\nint X509_REVOKED_get_ext_count(X509_REVOKED *x);\nint X509_REVOKED_get_ext_by_NID(X509_REVOKED *x, int nid, int lastpos);\nint X509_REVOKED_get_ext_by_OBJ(X509_REVOKED *x, ASN1_OBJECT *obj,\n                                int lastpos);\nint X509_REVOKED_get_ext_by_critical(X509_REVOKED *x, int crit, int lastpos);\nX509_EXTENSION *X509_REVOKED_get_ext(X509_REVOKED *x, int loc);\nX509_EXTENSION *X509_REVOKED_delete_ext(X509_REVOKED *x, int loc);\nint X509_REVOKED_add_ext(X509_REVOKED *x, X509_EXTENSION *ex, int loc);\nvoid *X509_REVOKED_get_ext_d2i(X509_REVOKED *x, int nid, int *crit, int *idx);\nint X509_REVOKED_add1_ext_i2d(X509_REVOKED *x, int nid, void *value, int crit,\n                              unsigned long flags);\n\nX509_EXTENSION *X509_EXTENSION_create_by_NID(X509_EXTENSION **ex,\n                                             int nid, int crit,\n                                             ASN1_OCTET_STRING *data);\nX509_EXTENSION *X509_EXTENSION_create_by_OBJ(X509_EXTENSION **ex,\n                                             ASN1_OBJECT *obj, int crit,\n                                             ASN1_OCTET_STRING *data);\nint X509_EXTENSION_set_object(X509_EXTENSION *ex, ASN1_OBJECT *obj);\nint X509_EXTENSION_set_critical(X509_EXTENSION *ex, int crit);\nint X509_EXTENSION_set_data(X509_EXTENSION *ex, ASN1_OCTET_STRING *data);\nASN1_OBJECT *X509_EXTENSION_get_object(X509_EXTENSION *ex);\nASN1_OCTET_STRING *X509_EXTENSION_get_data(X509_EXTENSION *ne);\nint X509_EXTENSION_get_critical(X509_EXTENSION *ex);\n\nint X509at_get_attr_count(const STACK_OF(X509_ATTRIBUTE) *x);\nint X509at_get_attr_by_NID(const STACK_OF(X509_ATTRIBUTE) *x, int nid,\n                           int lastpos);\nint X509at_get_attr_by_OBJ(const STACK_OF(X509_ATTRIBUTE) *sk,\n                           ASN1_OBJECT *obj, int lastpos);\nX509_ATTRIBUTE *X509at_get_attr(const STACK_OF(X509_ATTRIBUTE) *x, int loc);\nX509_ATTRIBUTE *X509at_delete_attr(STACK_OF(X509_ATTRIBUTE) *x, int loc);\nSTACK_OF(X509_ATTRIBUTE) *X509at_add1_attr(STACK_OF(X509_ATTRIBUTE) **x,\n                                           X509_ATTRIBUTE *attr);\nSTACK_OF(X509_ATTRIBUTE) *X509at_add1_attr_by_OBJ(STACK_OF(X509_ATTRIBUTE)\n                                                  **x, const ASN1_OBJECT *obj,\n                                                  int type,\n                                                  const unsigned char *bytes,\n                                                  int len);\nSTACK_OF(X509_ATTRIBUTE) *X509at_add1_attr_by_NID(STACK_OF(X509_ATTRIBUTE)\n                                                  **x, int nid, int type,\n                                                  const unsigned char *bytes,\n                                                  int len);\nSTACK_OF(X509_ATTRIBUTE) *X509at_add1_attr_by_txt(STACK_OF(X509_ATTRIBUTE)\n                                                  **x, const char *attrname,\n                                                  int type,\n                                                  const unsigned char *bytes,\n                                                  int len);\nvoid *X509at_get0_data_by_OBJ(STACK_OF(X509_ATTRIBUTE) *x, ASN1_OBJECT *obj,\n                              int lastpos, int type);\nX509_ATTRIBUTE *X509_ATTRIBUTE_create_by_NID(X509_ATTRIBUTE **attr, int nid,\n                                             int atrtype, const void *data,\n                                             int len);\nX509_ATTRIBUTE *X509_ATTRIBUTE_create_by_OBJ(X509_ATTRIBUTE **attr,\n                                             const ASN1_OBJECT *obj,\n                                             int atrtype, const void *data,\n                                             int len);\nX509_ATTRIBUTE *X509_ATTRIBUTE_create_by_txt(X509_ATTRIBUTE **attr,\n                                             const char *atrname, int type,\n                                             const unsigned char *bytes,\n                                             int len);\nint X509_ATTRIBUTE_set1_object(X509_ATTRIBUTE *attr, const ASN1_OBJECT *obj);\nint X509_ATTRIBUTE_set1_data(X509_ATTRIBUTE *attr, int attrtype,\n                             const void *data, int len);\nvoid *X509_ATTRIBUTE_get0_data(X509_ATTRIBUTE *attr, int idx, int atrtype,\n                               void *data);\nint X509_ATTRIBUTE_count(X509_ATTRIBUTE *attr);\nASN1_OBJECT *X509_ATTRIBUTE_get0_object(X509_ATTRIBUTE *attr);\nASN1_TYPE *X509_ATTRIBUTE_get0_type(X509_ATTRIBUTE *attr, int idx);\n\nint EVP_PKEY_get_attr_count(const EVP_PKEY *key);\nint EVP_PKEY_get_attr_by_NID(const EVP_PKEY *key, int nid, int lastpos);\nint EVP_PKEY_get_attr_by_OBJ(const EVP_PKEY *key, ASN1_OBJECT *obj,\n                             int lastpos);\nX509_ATTRIBUTE *EVP_PKEY_get_attr(const EVP_PKEY *key, int loc);\nX509_ATTRIBUTE *EVP_PKEY_delete_attr(EVP_PKEY *key, int loc);\nint EVP_PKEY_add1_attr(EVP_PKEY *key, X509_ATTRIBUTE *attr);\nint EVP_PKEY_add1_attr_by_OBJ(EVP_PKEY *key,\n                              const ASN1_OBJECT *obj, int type,\n                              const unsigned char *bytes, int len);\nint EVP_PKEY_add1_attr_by_NID(EVP_PKEY *key,\n                              int nid, int type,\n                              const unsigned char *bytes, int len);\nint EVP_PKEY_add1_attr_by_txt(EVP_PKEY *key,\n                              const char *attrname, int type,\n                              const unsigned char *bytes, int len);\n\nint X509_verify_cert(X509_STORE_CTX *ctx);\n\n/* lookup a cert from a X509 STACK */\nX509 *X509_find_by_issuer_and_serial(STACK_OF(X509) *sk, X509_NAME *name,\n                                     ASN1_INTEGER *serial);\nX509 *X509_find_by_subject(STACK_OF(X509) *sk, X509_NAME *name);\n\nDECLARE_ASN1_FUNCTIONS(PBEPARAM)\nDECLARE_ASN1_FUNCTIONS(PBE2PARAM)\nDECLARE_ASN1_FUNCTIONS(PBKDF2PARAM)\n\nint PKCS5_pbe_set0_algor(X509_ALGOR *algor, int alg, int iter,\n                         const unsigned char *salt, int saltlen);\n\nX509_ALGOR *PKCS5_pbe_set(int alg, int iter,\n                          const unsigned char *salt, int saltlen);\nX509_ALGOR *PKCS5_pbe2_set(const EVP_CIPHER *cipher, int iter,\n                           unsigned char *salt, int saltlen);\nX509_ALGOR *PKCS5_pbe2_set_iv(const EVP_CIPHER *cipher, int iter,\n                              unsigned char *salt, int saltlen,\n                              unsigned char *aiv, int prf_nid);\n\nX509_ALGOR *PKCS5_pbkdf2_set(int iter, unsigned char *salt, int saltlen,\n                             int prf_nid, int keylen);\n\n/* PKCS#8 utilities */\n\nDECLARE_ASN1_FUNCTIONS(PKCS8_PRIV_KEY_INFO)\n\nEVP_PKEY *EVP_PKCS82PKEY(PKCS8_PRIV_KEY_INFO *p8);\nPKCS8_PRIV_KEY_INFO *EVP_PKEY2PKCS8(EVP_PKEY *pkey);\nPKCS8_PRIV_KEY_INFO *EVP_PKEY2PKCS8_broken(EVP_PKEY *pkey, int broken);\nPKCS8_PRIV_KEY_INFO *PKCS8_set_broken(PKCS8_PRIV_KEY_INFO *p8, int broken);\n\nint PKCS8_pkey_set0(PKCS8_PRIV_KEY_INFO *priv, ASN1_OBJECT *aobj,\n                    int version, int ptype, void *pval,\n                    unsigned char *penc, int penclen);\nint PKCS8_pkey_get0(ASN1_OBJECT **ppkalg,\n                    const unsigned char **pk, int *ppklen,\n                    X509_ALGOR **pa, PKCS8_PRIV_KEY_INFO *p8);\n\nint X509_PUBKEY_set0_param(X509_PUBKEY *pub, ASN1_OBJECT *aobj,\n                           int ptype, void *pval,\n                           unsigned char *penc, int penclen);\nint X509_PUBKEY_get0_param(ASN1_OBJECT **ppkalg,\n                           const unsigned char **pk, int *ppklen,\n                           X509_ALGOR **pa, X509_PUBKEY *pub);\n\nint X509_check_trust(X509 *x, int id, int flags);\nint X509_TRUST_get_count(void);\nX509_TRUST *X509_TRUST_get0(int idx);\nint X509_TRUST_get_by_id(int id);\nint X509_TRUST_add(int id, int flags, int (*ck) (X509_TRUST *, X509 *, int),\n                   char *name, int arg1, void *arg2);\nvoid X509_TRUST_cleanup(void);\nint X509_TRUST_get_flags(X509_TRUST *xp);\nchar *X509_TRUST_get0_name(X509_TRUST *xp);\nint X509_TRUST_get_trust(X509_TRUST *xp);\n\n/* BEGIN ERROR CODES */\n/*\n * The following lines are auto generated by the script mkerr.pl. Any changes\n * made after this point may be overwritten when the script is next run.\n */\nvoid ERR_load_X509_strings(void);\n\n/* Error codes for the X509 functions. */\n\n/* Function codes. */\n# define X509_F_ADD_CERT_DIR                              100\n# define X509_F_BY_FILE_CTRL                              101\n# define X509_F_CHECK_POLICY                              145\n# define X509_F_DIR_CTRL                                  102\n# define X509_F_GET_CERT_BY_SUBJECT                       103\n# define X509_F_NETSCAPE_SPKI_B64_DECODE                  129\n# define X509_F_NETSCAPE_SPKI_B64_ENCODE                  130\n# define X509_F_X509AT_ADD1_ATTR                          135\n# define X509_F_X509V3_ADD_EXT                            104\n# define X509_F_X509_ATTRIBUTE_CREATE_BY_NID              136\n# define X509_F_X509_ATTRIBUTE_CREATE_BY_OBJ              137\n# define X509_F_X509_ATTRIBUTE_CREATE_BY_TXT              140\n# define X509_F_X509_ATTRIBUTE_GET0_DATA                  139\n# define X509_F_X509_ATTRIBUTE_SET1_DATA                  138\n# define X509_F_X509_CHECK_PRIVATE_KEY                    128\n# define X509_F_X509_CRL_PRINT_FP                         147\n# define X509_F_X509_EXTENSION_CREATE_BY_NID              108\n# define X509_F_X509_EXTENSION_CREATE_BY_OBJ              109\n# define X509_F_X509_GET_PUBKEY_PARAMETERS                110\n# define X509_F_X509_LOAD_CERT_CRL_FILE                   132\n# define X509_F_X509_LOAD_CERT_FILE                       111\n# define X509_F_X509_LOAD_CRL_FILE                        112\n# define X509_F_X509_NAME_ADD_ENTRY                       113\n# define X509_F_X509_NAME_ENTRY_CREATE_BY_NID             114\n# define X509_F_X509_NAME_ENTRY_CREATE_BY_TXT             131\n# define X509_F_X509_NAME_ENTRY_SET_OBJECT                115\n# define X509_F_X509_NAME_ONELINE                         116\n# define X509_F_X509_NAME_PRINT                           117\n# define X509_F_X509_PRINT_EX_FP                          118\n# define X509_F_X509_PUBKEY_GET                           119\n# define X509_F_X509_PUBKEY_SET                           120\n# define X509_F_X509_REQ_CHECK_PRIVATE_KEY                144\n# define X509_F_X509_REQ_PRINT_EX                         121\n# define X509_F_X509_REQ_PRINT_FP                         122\n# define X509_F_X509_REQ_TO_X509                          123\n# define X509_F_X509_STORE_ADD_CERT                       124\n# define X509_F_X509_STORE_ADD_CRL                        125\n# define X509_F_X509_STORE_CTX_GET1_ISSUER                146\n# define X509_F_X509_STORE_CTX_INIT                       143\n# define X509_F_X509_STORE_CTX_NEW                        142\n# define X509_F_X509_STORE_CTX_PURPOSE_INHERIT            134\n# define X509_F_X509_TO_X509_REQ                          126\n# define X509_F_X509_TRUST_ADD                            133\n# define X509_F_X509_TRUST_SET                            141\n# define X509_F_X509_VERIFY_CERT                          127\n\n/* Reason codes. */\n# define X509_R_BAD_X509_FILETYPE                         100\n# define X509_R_BASE64_DECODE_ERROR                       118\n# define X509_R_CANT_CHECK_DH_KEY                         114\n# define X509_R_CERT_ALREADY_IN_HASH_TABLE                101\n# define X509_R_ERR_ASN1_LIB                              102\n# define X509_R_INVALID_DIRECTORY                         113\n# define X509_R_INVALID_FIELD_NAME                        119\n# define X509_R_INVALID_TRUST                             123\n# define X509_R_KEY_TYPE_MISMATCH                         115\n# define X509_R_KEY_VALUES_MISMATCH                       116\n# define X509_R_LOADING_CERT_DIR                          103\n# define X509_R_LOADING_DEFAULTS                          104\n# define X509_R_METHOD_NOT_SUPPORTED                      124\n# define X509_R_NO_CERT_SET_FOR_US_TO_VERIFY              105\n# define X509_R_PUBLIC_KEY_DECODE_ERROR                   125\n# define X509_R_PUBLIC_KEY_ENCODE_ERROR                   126\n# define X509_R_SHOULD_RETRY                              106\n# define X509_R_UNABLE_TO_FIND_PARAMETERS_IN_CHAIN        107\n# define X509_R_UNABLE_TO_GET_CERTS_PUBLIC_KEY            108\n# define X509_R_UNKNOWN_KEY_TYPE                          117\n# define X509_R_UNKNOWN_NID                               109\n# define X509_R_UNKNOWN_PURPOSE_ID                        121\n# define X509_R_UNKNOWN_TRUST_ID                          120\n# define X509_R_UNSUPPORTED_ALGORITHM                     111\n# define X509_R_WRONG_LOOKUP_TYPE                         112\n# define X509_R_WRONG_TYPE                                122\n\n#ifdef  __cplusplus\n}\n#endif\n#endif\n"
  },
  {
    "path": "Pods/OpenSSL-Universal/include-ios/openssl/x509_vfy.h",
    "content": "/* crypto/x509/x509_vfy.h */\n/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)\n * All rights reserved.\n *\n * This package is an SSL implementation written\n * by Eric Young (eay@cryptsoft.com).\n * The implementation was written so as to conform with Netscapes SSL.\n *\n * This library is free for commercial and non-commercial use as long as\n * the following conditions are aheared to.  The following conditions\n * apply to all code found in this distribution, be it the RC4, RSA,\n * lhash, DES, etc., code; not just the SSL code.  The SSL documentation\n * included with this distribution is covered by the same copyright terms\n * except that the holder is Tim Hudson (tjh@cryptsoft.com).\n *\n * Copyright remains Eric Young's, and as such any Copyright notices in\n * the code are not to be removed.\n * If this package is used in a product, Eric Young should be given attribution\n * as the author of the parts of the library used.\n * This can be in the form of a textual message at program startup or\n * in documentation (online or textual) provided with the package.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n * 1. Redistributions of source code must retain the copyright\n *    notice, this list of conditions and the following disclaimer.\n * 2. Redistributions in binary form must reproduce the above copyright\n *    notice, this list of conditions and the following disclaimer in the\n *    documentation and/or other materials provided with the distribution.\n * 3. All advertising materials mentioning features or use of this software\n *    must display the following acknowledgement:\n *    \"This product includes cryptographic software written by\n *     Eric Young (eay@cryptsoft.com)\"\n *    The word 'cryptographic' can be left out if the rouines from the library\n *    being used are not cryptographic related :-).\n * 4. If you include any Windows specific code (or a derivative thereof) from\n *    the apps directory (application code) you must include an acknowledgement:\n *    \"This product includes software written by Tim Hudson (tjh@cryptsoft.com)\"\n *\n * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND\n * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE\n * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n * SUCH DAMAGE.\n *\n * The licence and distribution terms for any publically available version or\n * derivative of this code cannot be changed.  i.e. this code cannot simply be\n * copied and put under another distribution licence\n * [including the GNU Public Licence.]\n */\n\n#ifndef HEADER_X509_H\n# include <openssl/x509.h>\n/*\n * openssl/x509.h ends up #include-ing this file at about the only\n * appropriate moment.\n */\n#endif\n\n#ifndef HEADER_X509_VFY_H\n# define HEADER_X509_VFY_H\n\n# include <openssl/opensslconf.h>\n# ifndef OPENSSL_NO_LHASH\n#  include <openssl/lhash.h>\n# endif\n# include <openssl/bio.h>\n# include <openssl/crypto.h>\n# include <openssl/symhacks.h>\n\n#ifdef  __cplusplus\nextern \"C\" {\n#endif\n\n# if 0\n/* Outer object */\ntypedef struct x509_hash_dir_st {\n    int num_dirs;\n    char **dirs;\n    int *dirs_type;\n    int num_dirs_alloced;\n} X509_HASH_DIR_CTX;\n# endif\n\ntypedef struct x509_file_st {\n    int num_paths;              /* number of paths to files or directories */\n    int num_alloced;\n    char **paths;               /* the list of paths or directories */\n    int *path_type;\n} X509_CERT_FILE_CTX;\n\n/*******************************/\n/*-\nSSL_CTX -> X509_STORE\n                -> X509_LOOKUP\n                        ->X509_LOOKUP_METHOD\n                -> X509_LOOKUP\n                        ->X509_LOOKUP_METHOD\n\nSSL     -> X509_STORE_CTX\n                ->X509_STORE\n\nThe X509_STORE holds the tables etc for verification stuff.\nA X509_STORE_CTX is used while validating a single certificate.\nThe X509_STORE has X509_LOOKUPs for looking up certs.\nThe X509_STORE then calls a function to actually verify the\ncertificate chain.\n*/\n\n# define X509_LU_RETRY           -1\n# define X509_LU_FAIL            0\n# define X509_LU_X509            1\n# define X509_LU_CRL             2\n# define X509_LU_PKEY            3\n\ntypedef struct x509_object_st {\n    /* one of the above types */\n    int type;\n    union {\n        char *ptr;\n        X509 *x509;\n        X509_CRL *crl;\n        EVP_PKEY *pkey;\n    } data;\n} X509_OBJECT;\n\ntypedef struct x509_lookup_st X509_LOOKUP;\n\nDECLARE_STACK_OF(X509_LOOKUP)\nDECLARE_STACK_OF(X509_OBJECT)\n\n/* This is a static that defines the function interface */\ntypedef struct x509_lookup_method_st {\n    const char *name;\n    int (*new_item) (X509_LOOKUP *ctx);\n    void (*free) (X509_LOOKUP *ctx);\n    int (*init) (X509_LOOKUP *ctx);\n    int (*shutdown) (X509_LOOKUP *ctx);\n    int (*ctrl) (X509_LOOKUP *ctx, int cmd, const char *argc, long argl,\n                 char **ret);\n    int (*get_by_subject) (X509_LOOKUP *ctx, int type, X509_NAME *name,\n                           X509_OBJECT *ret);\n    int (*get_by_issuer_serial) (X509_LOOKUP *ctx, int type, X509_NAME *name,\n                                 ASN1_INTEGER *serial, X509_OBJECT *ret);\n    int (*get_by_fingerprint) (X509_LOOKUP *ctx, int type,\n                               unsigned char *bytes, int len,\n                               X509_OBJECT *ret);\n    int (*get_by_alias) (X509_LOOKUP *ctx, int type, char *str, int len,\n                         X509_OBJECT *ret);\n} X509_LOOKUP_METHOD;\n\n/*\n * This structure hold all parameters associated with a verify operation by\n * including an X509_VERIFY_PARAM structure in related structures the\n * parameters used can be customized\n */\n\ntypedef struct X509_VERIFY_PARAM_st {\n    char *name;\n    time_t check_time;          /* Time to use */\n    unsigned long inh_flags;    /* Inheritance flags */\n    unsigned long flags;        /* Various verify flags */\n    int purpose;                /* purpose to check untrusted certificates */\n    int trust;                  /* trust setting to check */\n    int depth;                  /* Verify depth */\n    STACK_OF(ASN1_OBJECT) *policies; /* Permissible policies */\n} X509_VERIFY_PARAM;\n\nDECLARE_STACK_OF(X509_VERIFY_PARAM)\n\n/*\n * This is used to hold everything.  It is used for all certificate\n * validation.  Once we have a certificate chain, the 'verify' function is\n * then called to actually check the cert chain.\n */\nstruct x509_store_st {\n    /* The following is a cache of trusted certs */\n    int cache;                  /* if true, stash any hits */\n    STACK_OF(X509_OBJECT) *objs; /* Cache of all objects */\n    /* These are external lookup methods */\n    STACK_OF(X509_LOOKUP) *get_cert_methods;\n    X509_VERIFY_PARAM *param;\n    /* Callbacks for various operations */\n    /* called to verify a certificate */\n    int (*verify) (X509_STORE_CTX *ctx);\n    /* error callback */\n    int (*verify_cb) (int ok, X509_STORE_CTX *ctx);\n    /* get issuers cert from ctx */\n    int (*get_issuer) (X509 **issuer, X509_STORE_CTX *ctx, X509 *x);\n    /* check issued */\n    int (*check_issued) (X509_STORE_CTX *ctx, X509 *x, X509 *issuer);\n    /* Check revocation status of chain */\n    int (*check_revocation) (X509_STORE_CTX *ctx);\n    /* retrieve CRL */\n    int (*get_crl) (X509_STORE_CTX *ctx, X509_CRL **crl, X509 *x);\n    /* Check CRL validity */\n    int (*check_crl) (X509_STORE_CTX *ctx, X509_CRL *crl);\n    /* Check certificate against CRL */\n    int (*cert_crl) (X509_STORE_CTX *ctx, X509_CRL *crl, X509 *x);\n    STACK_OF(X509) *(*lookup_certs) (X509_STORE_CTX *ctx, X509_NAME *nm);\n    STACK_OF(X509_CRL) *(*lookup_crls) (X509_STORE_CTX *ctx, X509_NAME *nm);\n    int (*cleanup) (X509_STORE_CTX *ctx);\n    CRYPTO_EX_DATA ex_data;\n    int references;\n} /* X509_STORE */ ;\n\nint X509_STORE_set_depth(X509_STORE *store, int depth);\n\n# define X509_STORE_set_verify_cb_func(ctx,func) ((ctx)->verify_cb=(func))\n# define X509_STORE_set_verify_func(ctx,func)    ((ctx)->verify=(func))\n\n/* This is the functions plus an instance of the local variables. */\nstruct x509_lookup_st {\n    int init;                   /* have we been started */\n    int skip;                   /* don't use us. */\n    X509_LOOKUP_METHOD *method; /* the functions */\n    char *method_data;          /* method data */\n    X509_STORE *store_ctx;      /* who owns us */\n} /* X509_LOOKUP */ ;\n\n/*\n * This is a used when verifying cert chains.  Since the gathering of the\n * cert chain can take some time (and have to be 'retried', this needs to be\n * kept and passed around.\n */\nstruct x509_store_ctx_st {      /* X509_STORE_CTX */\n    X509_STORE *ctx;\n    /* used when looking up certs */\n    int current_method;\n    /* The following are set by the caller */\n    /* The cert to check */\n    X509 *cert;\n    /* chain of X509s - untrusted - passed in */\n    STACK_OF(X509) *untrusted;\n    /* set of CRLs passed in */\n    STACK_OF(X509_CRL) *crls;\n    X509_VERIFY_PARAM *param;\n    /* Other info for use with get_issuer() */\n    void *other_ctx;\n    /* Callbacks for various operations */\n    /* called to verify a certificate */\n    int (*verify) (X509_STORE_CTX *ctx);\n    /* error callback */\n    int (*verify_cb) (int ok, X509_STORE_CTX *ctx);\n    /* get issuers cert from ctx */\n    int (*get_issuer) (X509 **issuer, X509_STORE_CTX *ctx, X509 *x);\n    /* check issued */\n    int (*check_issued) (X509_STORE_CTX *ctx, X509 *x, X509 *issuer);\n    /* Check revocation status of chain */\n    int (*check_revocation) (X509_STORE_CTX *ctx);\n    /* retrieve CRL */\n    int (*get_crl) (X509_STORE_CTX *ctx, X509_CRL **crl, X509 *x);\n    /* Check CRL validity */\n    int (*check_crl) (X509_STORE_CTX *ctx, X509_CRL *crl);\n    /* Check certificate against CRL */\n    int (*cert_crl) (X509_STORE_CTX *ctx, X509_CRL *crl, X509 *x);\n    int (*check_policy) (X509_STORE_CTX *ctx);\n    STACK_OF(X509) *(*lookup_certs) (X509_STORE_CTX *ctx, X509_NAME *nm);\n    STACK_OF(X509_CRL) *(*lookup_crls) (X509_STORE_CTX *ctx, X509_NAME *nm);\n    int (*cleanup) (X509_STORE_CTX *ctx);\n    /* The following is built up */\n    /* if 0, rebuild chain */\n    int valid;\n    /* index of last untrusted cert */\n    int last_untrusted;\n    /* chain of X509s - built up and trusted */\n    STACK_OF(X509) *chain;\n    /* Valid policy tree */\n    X509_POLICY_TREE *tree;\n    /* Require explicit policy value */\n    int explicit_policy;\n    /* When something goes wrong, this is why */\n    int error_depth;\n    int error;\n    X509 *current_cert;\n    /* cert currently being tested as valid issuer */\n    X509 *current_issuer;\n    /* current CRL */\n    X509_CRL *current_crl;\n    /* score of current CRL */\n    int current_crl_score;\n    /* Reason mask */\n    unsigned int current_reasons;\n    /* For CRL path validation: parent context */\n    X509_STORE_CTX *parent;\n    CRYPTO_EX_DATA ex_data;\n} /* X509_STORE_CTX */ ;\n\nvoid X509_STORE_CTX_set_depth(X509_STORE_CTX *ctx, int depth);\n\n# define X509_STORE_CTX_set_app_data(ctx,data) \\\n        X509_STORE_CTX_set_ex_data(ctx,0,data)\n# define X509_STORE_CTX_get_app_data(ctx) \\\n        X509_STORE_CTX_get_ex_data(ctx,0)\n\n# define X509_L_FILE_LOAD        1\n# define X509_L_ADD_DIR          2\n\n# define X509_LOOKUP_load_file(x,name,type) \\\n                X509_LOOKUP_ctrl((x),X509_L_FILE_LOAD,(name),(long)(type),NULL)\n\n# define X509_LOOKUP_add_dir(x,name,type) \\\n                X509_LOOKUP_ctrl((x),X509_L_ADD_DIR,(name),(long)(type),NULL)\n\n# define         X509_V_OK                                       0\n/* illegal error (for uninitialized values, to avoid X509_V_OK): 1 */\n\n# define         X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT            2\n# define         X509_V_ERR_UNABLE_TO_GET_CRL                    3\n# define         X509_V_ERR_UNABLE_TO_DECRYPT_CERT_SIGNATURE     4\n# define         X509_V_ERR_UNABLE_TO_DECRYPT_CRL_SIGNATURE      5\n# define         X509_V_ERR_UNABLE_TO_DECODE_ISSUER_PUBLIC_KEY   6\n# define         X509_V_ERR_CERT_SIGNATURE_FAILURE               7\n# define         X509_V_ERR_CRL_SIGNATURE_FAILURE                8\n# define         X509_V_ERR_CERT_NOT_YET_VALID                   9\n# define         X509_V_ERR_CERT_HAS_EXPIRED                     10\n# define         X509_V_ERR_CRL_NOT_YET_VALID                    11\n# define         X509_V_ERR_CRL_HAS_EXPIRED                      12\n# define         X509_V_ERR_ERROR_IN_CERT_NOT_BEFORE_FIELD       13\n# define         X509_V_ERR_ERROR_IN_CERT_NOT_AFTER_FIELD        14\n# define         X509_V_ERR_ERROR_IN_CRL_LAST_UPDATE_FIELD       15\n# define         X509_V_ERR_ERROR_IN_CRL_NEXT_UPDATE_FIELD       16\n# define         X509_V_ERR_OUT_OF_MEM                           17\n# define         X509_V_ERR_DEPTH_ZERO_SELF_SIGNED_CERT          18\n# define         X509_V_ERR_SELF_SIGNED_CERT_IN_CHAIN            19\n# define         X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT_LOCALLY    20\n# define         X509_V_ERR_UNABLE_TO_VERIFY_LEAF_SIGNATURE      21\n# define         X509_V_ERR_CERT_CHAIN_TOO_LONG                  22\n# define         X509_V_ERR_CERT_REVOKED                         23\n# define         X509_V_ERR_INVALID_CA                           24\n# define         X509_V_ERR_PATH_LENGTH_EXCEEDED                 25\n# define         X509_V_ERR_INVALID_PURPOSE                      26\n# define         X509_V_ERR_CERT_UNTRUSTED                       27\n# define         X509_V_ERR_CERT_REJECTED                        28\n/* These are 'informational' when looking for issuer cert */\n# define         X509_V_ERR_SUBJECT_ISSUER_MISMATCH              29\n# define         X509_V_ERR_AKID_SKID_MISMATCH                   30\n# define         X509_V_ERR_AKID_ISSUER_SERIAL_MISMATCH          31\n# define         X509_V_ERR_KEYUSAGE_NO_CERTSIGN                 32\n\n# define         X509_V_ERR_UNABLE_TO_GET_CRL_ISSUER             33\n# define         X509_V_ERR_UNHANDLED_CRITICAL_EXTENSION         34\n# define         X509_V_ERR_KEYUSAGE_NO_CRL_SIGN                 35\n# define         X509_V_ERR_UNHANDLED_CRITICAL_CRL_EXTENSION     36\n# define         X509_V_ERR_INVALID_NON_CA                       37\n# define         X509_V_ERR_PROXY_PATH_LENGTH_EXCEEDED           38\n# define         X509_V_ERR_KEYUSAGE_NO_DIGITAL_SIGNATURE        39\n# define         X509_V_ERR_PROXY_CERTIFICATES_NOT_ALLOWED       40\n\n# define         X509_V_ERR_INVALID_EXTENSION                    41\n# define         X509_V_ERR_INVALID_POLICY_EXTENSION             42\n# define         X509_V_ERR_NO_EXPLICIT_POLICY                   43\n# define         X509_V_ERR_DIFFERENT_CRL_SCOPE                  44\n# define         X509_V_ERR_UNSUPPORTED_EXTENSION_FEATURE        45\n\n# define         X509_V_ERR_UNNESTED_RESOURCE                    46\n\n# define         X509_V_ERR_PERMITTED_VIOLATION                  47\n# define         X509_V_ERR_EXCLUDED_VIOLATION                   48\n# define         X509_V_ERR_SUBTREE_MINMAX                       49\n# define         X509_V_ERR_UNSUPPORTED_CONSTRAINT_TYPE          51\n# define         X509_V_ERR_UNSUPPORTED_CONSTRAINT_SYNTAX        52\n# define         X509_V_ERR_UNSUPPORTED_NAME_SYNTAX              53\n# define         X509_V_ERR_CRL_PATH_VALIDATION_ERROR            54\n\n/* The application is not happy */\n# define         X509_V_ERR_APPLICATION_VERIFICATION             50\n\n/* Certificate verify flags */\n\n/* Send issuer+subject checks to verify_cb */\n# define X509_V_FLAG_CB_ISSUER_CHECK             0x1\n/* Use check time instead of current time */\n# define X509_V_FLAG_USE_CHECK_TIME              0x2\n/* Lookup CRLs */\n# define X509_V_FLAG_CRL_CHECK                   0x4\n/* Lookup CRLs for whole chain */\n# define X509_V_FLAG_CRL_CHECK_ALL               0x8\n/* Ignore unhandled critical extensions */\n# define X509_V_FLAG_IGNORE_CRITICAL             0x10\n/* Disable workarounds for broken certificates */\n# define X509_V_FLAG_X509_STRICT                 0x20\n/* Enable proxy certificate validation */\n# define X509_V_FLAG_ALLOW_PROXY_CERTS           0x40\n/* Enable policy checking */\n# define X509_V_FLAG_POLICY_CHECK                0x80\n/* Policy variable require-explicit-policy */\n# define X509_V_FLAG_EXPLICIT_POLICY             0x100\n/* Policy variable inhibit-any-policy */\n# define X509_V_FLAG_INHIBIT_ANY                 0x200\n/* Policy variable inhibit-policy-mapping */\n# define X509_V_FLAG_INHIBIT_MAP                 0x400\n/* Notify callback that policy is OK */\n# define X509_V_FLAG_NOTIFY_POLICY               0x800\n/* Extended CRL features such as indirect CRLs, alternate CRL signing keys */\n# define X509_V_FLAG_EXTENDED_CRL_SUPPORT        0x1000\n/* Delta CRL support */\n# define X509_V_FLAG_USE_DELTAS                  0x2000\n/* Check selfsigned CA signature */\n# define X509_V_FLAG_CHECK_SS_SIGNATURE          0x4000\n/*\n * If the initial chain is not trusted, do not attempt to build an alternative\n * chain. Alternate chain checking was introduced in 1.0.1n/1.0.2b. Setting\n * this flag will force the behaviour to match that of previous versions.\n */\n# define X509_V_FLAG_NO_ALT_CHAINS               0x100000\n\n# define X509_VP_FLAG_DEFAULT                    0x1\n# define X509_VP_FLAG_OVERWRITE                  0x2\n# define X509_VP_FLAG_RESET_FLAGS                0x4\n# define X509_VP_FLAG_LOCKED                     0x8\n# define X509_VP_FLAG_ONCE                       0x10\n\n/* Internal use: mask of policy related options */\n# define X509_V_FLAG_POLICY_MASK (X509_V_FLAG_POLICY_CHECK \\\n                                | X509_V_FLAG_EXPLICIT_POLICY \\\n                                | X509_V_FLAG_INHIBIT_ANY \\\n                                | X509_V_FLAG_INHIBIT_MAP)\n\nint X509_OBJECT_idx_by_subject(STACK_OF(X509_OBJECT) *h, int type,\n                               X509_NAME *name);\nX509_OBJECT *X509_OBJECT_retrieve_by_subject(STACK_OF(X509_OBJECT) *h,\n                                             int type, X509_NAME *name);\nX509_OBJECT *X509_OBJECT_retrieve_match(STACK_OF(X509_OBJECT) *h,\n                                        X509_OBJECT *x);\nvoid X509_OBJECT_up_ref_count(X509_OBJECT *a);\nvoid X509_OBJECT_free_contents(X509_OBJECT *a);\nX509_STORE *X509_STORE_new(void);\nvoid X509_STORE_free(X509_STORE *v);\n\nSTACK_OF(X509) *X509_STORE_get1_certs(X509_STORE_CTX *st, X509_NAME *nm);\nSTACK_OF(X509_CRL) *X509_STORE_get1_crls(X509_STORE_CTX *st, X509_NAME *nm);\nint X509_STORE_set_flags(X509_STORE *ctx, unsigned long flags);\nint X509_STORE_set_purpose(X509_STORE *ctx, int purpose);\nint X509_STORE_set_trust(X509_STORE *ctx, int trust);\nint X509_STORE_set1_param(X509_STORE *ctx, X509_VERIFY_PARAM *pm);\n\nvoid X509_STORE_set_verify_cb(X509_STORE *ctx,\n                              int (*verify_cb) (int, X509_STORE_CTX *));\n\nX509_STORE_CTX *X509_STORE_CTX_new(void);\n\nint X509_STORE_CTX_get1_issuer(X509 **issuer, X509_STORE_CTX *ctx, X509 *x);\n\nvoid X509_STORE_CTX_free(X509_STORE_CTX *ctx);\nint X509_STORE_CTX_init(X509_STORE_CTX *ctx, X509_STORE *store,\n                        X509 *x509, STACK_OF(X509) *chain);\nvoid X509_STORE_CTX_trusted_stack(X509_STORE_CTX *ctx, STACK_OF(X509) *sk);\nvoid X509_STORE_CTX_cleanup(X509_STORE_CTX *ctx);\n\nX509_LOOKUP *X509_STORE_add_lookup(X509_STORE *v, X509_LOOKUP_METHOD *m);\n\nX509_LOOKUP_METHOD *X509_LOOKUP_hash_dir(void);\nX509_LOOKUP_METHOD *X509_LOOKUP_file(void);\n\nint X509_STORE_add_cert(X509_STORE *ctx, X509 *x);\nint X509_STORE_add_crl(X509_STORE *ctx, X509_CRL *x);\n\nint X509_STORE_get_by_subject(X509_STORE_CTX *vs, int type, X509_NAME *name,\n                              X509_OBJECT *ret);\n\nint X509_LOOKUP_ctrl(X509_LOOKUP *ctx, int cmd, const char *argc,\n                     long argl, char **ret);\n\n# ifndef OPENSSL_NO_STDIO\nint X509_load_cert_file(X509_LOOKUP *ctx, const char *file, int type);\nint X509_load_crl_file(X509_LOOKUP *ctx, const char *file, int type);\nint X509_load_cert_crl_file(X509_LOOKUP *ctx, const char *file, int type);\n# endif\n\nX509_LOOKUP *X509_LOOKUP_new(X509_LOOKUP_METHOD *method);\nvoid X509_LOOKUP_free(X509_LOOKUP *ctx);\nint X509_LOOKUP_init(X509_LOOKUP *ctx);\nint X509_LOOKUP_by_subject(X509_LOOKUP *ctx, int type, X509_NAME *name,\n                           X509_OBJECT *ret);\nint X509_LOOKUP_by_issuer_serial(X509_LOOKUP *ctx, int type, X509_NAME *name,\n                                 ASN1_INTEGER *serial, X509_OBJECT *ret);\nint X509_LOOKUP_by_fingerprint(X509_LOOKUP *ctx, int type,\n                               unsigned char *bytes, int len,\n                               X509_OBJECT *ret);\nint X509_LOOKUP_by_alias(X509_LOOKUP *ctx, int type, char *str, int len,\n                         X509_OBJECT *ret);\nint X509_LOOKUP_shutdown(X509_LOOKUP *ctx);\n\n# ifndef OPENSSL_NO_STDIO\nint X509_STORE_load_locations(X509_STORE *ctx,\n                              const char *file, const char *dir);\nint X509_STORE_set_default_paths(X509_STORE *ctx);\n# endif\n\nint X509_STORE_CTX_get_ex_new_index(long argl, void *argp,\n                                    CRYPTO_EX_new *new_func,\n                                    CRYPTO_EX_dup *dup_func,\n                                    CRYPTO_EX_free *free_func);\nint X509_STORE_CTX_set_ex_data(X509_STORE_CTX *ctx, int idx, void *data);\nvoid *X509_STORE_CTX_get_ex_data(X509_STORE_CTX *ctx, int idx);\nint X509_STORE_CTX_get_error(X509_STORE_CTX *ctx);\nvoid X509_STORE_CTX_set_error(X509_STORE_CTX *ctx, int s);\nint X509_STORE_CTX_get_error_depth(X509_STORE_CTX *ctx);\nX509 *X509_STORE_CTX_get_current_cert(X509_STORE_CTX *ctx);\nX509 *X509_STORE_CTX_get0_current_issuer(X509_STORE_CTX *ctx);\nX509_CRL *X509_STORE_CTX_get0_current_crl(X509_STORE_CTX *ctx);\nX509_STORE_CTX *X509_STORE_CTX_get0_parent_ctx(X509_STORE_CTX *ctx);\nSTACK_OF(X509) *X509_STORE_CTX_get_chain(X509_STORE_CTX *ctx);\nSTACK_OF(X509) *X509_STORE_CTX_get1_chain(X509_STORE_CTX *ctx);\nvoid X509_STORE_CTX_set_cert(X509_STORE_CTX *c, X509 *x);\nvoid X509_STORE_CTX_set_chain(X509_STORE_CTX *c, STACK_OF(X509) *sk);\nvoid X509_STORE_CTX_set0_crls(X509_STORE_CTX *c, STACK_OF(X509_CRL) *sk);\nint X509_STORE_CTX_set_purpose(X509_STORE_CTX *ctx, int purpose);\nint X509_STORE_CTX_set_trust(X509_STORE_CTX *ctx, int trust);\nint X509_STORE_CTX_purpose_inherit(X509_STORE_CTX *ctx, int def_purpose,\n                                   int purpose, int trust);\nvoid X509_STORE_CTX_set_flags(X509_STORE_CTX *ctx, unsigned long flags);\nvoid X509_STORE_CTX_set_time(X509_STORE_CTX *ctx, unsigned long flags,\n                             time_t t);\nvoid X509_STORE_CTX_set_verify_cb(X509_STORE_CTX *ctx,\n                                  int (*verify_cb) (int, X509_STORE_CTX *));\n\nX509_POLICY_TREE *X509_STORE_CTX_get0_policy_tree(X509_STORE_CTX *ctx);\nint X509_STORE_CTX_get_explicit_policy(X509_STORE_CTX *ctx);\n\nX509_VERIFY_PARAM *X509_STORE_CTX_get0_param(X509_STORE_CTX *ctx);\nvoid X509_STORE_CTX_set0_param(X509_STORE_CTX *ctx, X509_VERIFY_PARAM *param);\nint X509_STORE_CTX_set_default(X509_STORE_CTX *ctx, const char *name);\n\n/* X509_VERIFY_PARAM functions */\n\nX509_VERIFY_PARAM *X509_VERIFY_PARAM_new(void);\nvoid X509_VERIFY_PARAM_free(X509_VERIFY_PARAM *param);\nint X509_VERIFY_PARAM_inherit(X509_VERIFY_PARAM *to,\n                              const X509_VERIFY_PARAM *from);\nint X509_VERIFY_PARAM_set1(X509_VERIFY_PARAM *to,\n                           const X509_VERIFY_PARAM *from);\nint X509_VERIFY_PARAM_set1_name(X509_VERIFY_PARAM *param, const char *name);\nint X509_VERIFY_PARAM_set_flags(X509_VERIFY_PARAM *param,\n                                unsigned long flags);\nint X509_VERIFY_PARAM_clear_flags(X509_VERIFY_PARAM *param,\n                                  unsigned long flags);\nunsigned long X509_VERIFY_PARAM_get_flags(X509_VERIFY_PARAM *param);\nint X509_VERIFY_PARAM_set_purpose(X509_VERIFY_PARAM *param, int purpose);\nint X509_VERIFY_PARAM_set_trust(X509_VERIFY_PARAM *param, int trust);\nvoid X509_VERIFY_PARAM_set_depth(X509_VERIFY_PARAM *param, int depth);\nvoid X509_VERIFY_PARAM_set_time(X509_VERIFY_PARAM *param, time_t t);\nint X509_VERIFY_PARAM_add0_policy(X509_VERIFY_PARAM *param,\n                                  ASN1_OBJECT *policy);\nint X509_VERIFY_PARAM_set1_policies(X509_VERIFY_PARAM *param,\n                                    STACK_OF(ASN1_OBJECT) *policies);\nint X509_VERIFY_PARAM_get_depth(const X509_VERIFY_PARAM *param);\n\nint X509_VERIFY_PARAM_add0_table(X509_VERIFY_PARAM *param);\nconst X509_VERIFY_PARAM *X509_VERIFY_PARAM_lookup(const char *name);\nvoid X509_VERIFY_PARAM_table_cleanup(void);\n\nint X509_policy_check(X509_POLICY_TREE **ptree, int *pexplicit_policy,\n                      STACK_OF(X509) *certs,\n                      STACK_OF(ASN1_OBJECT) *policy_oids, unsigned int flags);\n\nvoid X509_policy_tree_free(X509_POLICY_TREE *tree);\n\nint X509_policy_tree_level_count(const X509_POLICY_TREE *tree);\nX509_POLICY_LEVEL *X509_policy_tree_get0_level(const X509_POLICY_TREE *tree,\n                                               int i);\n\nSTACK_OF(X509_POLICY_NODE) *X509_policy_tree_get0_policies(const\n                                                           X509_POLICY_TREE\n                                                           *tree);\n\nSTACK_OF(X509_POLICY_NODE) *X509_policy_tree_get0_user_policies(const\n                                                                X509_POLICY_TREE\n                                                                *tree);\n\nint X509_policy_level_node_count(X509_POLICY_LEVEL *level);\n\nX509_POLICY_NODE *X509_policy_level_get0_node(X509_POLICY_LEVEL *level,\n                                              int i);\n\nconst ASN1_OBJECT *X509_policy_node_get0_policy(const X509_POLICY_NODE *node);\n\nSTACK_OF(POLICYQUALINFO) *X509_policy_node_get0_qualifiers(const\n                                                           X509_POLICY_NODE\n                                                           *node);\nconst X509_POLICY_NODE *X509_policy_node_get0_parent(const X509_POLICY_NODE\n                                                     *node);\n\n#ifdef  __cplusplus\n}\n#endif\n#endif\n"
  },
  {
    "path": "Pods/OpenSSL-Universal/include-ios/openssl/x509v3.h",
    "content": "/* x509v3.h */\n/*\n * Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL project\n * 1999.\n */\n/* ====================================================================\n * Copyright (c) 1999-2004 The OpenSSL Project.  All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n *\n * 1. Redistributions of source code must retain the above copyright\n *    notice, this list of conditions and the following disclaimer.\n *\n * 2. Redistributions in binary form must reproduce the above copyright\n *    notice, this list of conditions and the following disclaimer in\n *    the documentation and/or other materials provided with the\n *    distribution.\n *\n * 3. All advertising materials mentioning features or use of this\n *    software must display the following acknowledgment:\n *    \"This product includes software developed by the OpenSSL Project\n *    for use in the OpenSSL Toolkit. (http://www.OpenSSL.org/)\"\n *\n * 4. The names \"OpenSSL Toolkit\" and \"OpenSSL Project\" must not be used to\n *    endorse or promote products derived from this software without\n *    prior written permission. For written permission, please contact\n *    licensing@OpenSSL.org.\n *\n * 5. Products derived from this software may not be called \"OpenSSL\"\n *    nor may \"OpenSSL\" appear in their names without prior written\n *    permission of the OpenSSL Project.\n *\n * 6. Redistributions of any form whatsoever must retain the following\n *    acknowledgment:\n *    \"This product includes software developed by the OpenSSL Project\n *    for use in the OpenSSL Toolkit (http://www.OpenSSL.org/)\"\n *\n * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY\n * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\n * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR\n * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,\n * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED\n * OF THE POSSIBILITY OF SUCH DAMAGE.\n * ====================================================================\n *\n * This product includes cryptographic software written by Eric Young\n * (eay@cryptsoft.com).  This product includes software written by Tim\n * Hudson (tjh@cryptsoft.com).\n *\n */\n#ifndef HEADER_X509V3_H\n# define HEADER_X509V3_H\n\n# include <openssl/bio.h>\n# include <openssl/x509.h>\n# include <openssl/conf.h>\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n/* Forward reference */\nstruct v3_ext_method;\nstruct v3_ext_ctx;\n\n/* Useful typedefs */\n\ntypedef void *(*X509V3_EXT_NEW)(void);\ntypedef void (*X509V3_EXT_FREE) (void *);\ntypedef void *(*X509V3_EXT_D2I)(void *, const unsigned char **, long);\ntypedef int (*X509V3_EXT_I2D) (void *, unsigned char **);\ntypedef STACK_OF(CONF_VALUE) *\n    (*X509V3_EXT_I2V) (const struct v3_ext_method *method, void *ext,\n                       STACK_OF(CONF_VALUE) *extlist);\ntypedef void *(*X509V3_EXT_V2I)(const struct v3_ext_method *method,\n                                struct v3_ext_ctx *ctx,\n                                STACK_OF(CONF_VALUE) *values);\ntypedef char *(*X509V3_EXT_I2S)(const struct v3_ext_method *method,\n                                void *ext);\ntypedef void *(*X509V3_EXT_S2I)(const struct v3_ext_method *method,\n                                struct v3_ext_ctx *ctx, const char *str);\ntypedef int (*X509V3_EXT_I2R) (const struct v3_ext_method *method, void *ext,\n                               BIO *out, int indent);\ntypedef void *(*X509V3_EXT_R2I)(const struct v3_ext_method *method,\n                                struct v3_ext_ctx *ctx, const char *str);\n\n/* V3 extension structure */\n\nstruct v3_ext_method {\n    int ext_nid;\n    int ext_flags;\n/* If this is set the following four fields are ignored */\n    ASN1_ITEM_EXP *it;\n/* Old style ASN1 calls */\n    X509V3_EXT_NEW ext_new;\n    X509V3_EXT_FREE ext_free;\n    X509V3_EXT_D2I d2i;\n    X509V3_EXT_I2D i2d;\n/* The following pair is used for string extensions */\n    X509V3_EXT_I2S i2s;\n    X509V3_EXT_S2I s2i;\n/* The following pair is used for multi-valued extensions */\n    X509V3_EXT_I2V i2v;\n    X509V3_EXT_V2I v2i;\n/* The following are used for raw extensions */\n    X509V3_EXT_I2R i2r;\n    X509V3_EXT_R2I r2i;\n    void *usr_data;             /* Any extension specific data */\n};\n\ntypedef struct X509V3_CONF_METHOD_st {\n    char *(*get_string) (void *db, char *section, char *value);\n    STACK_OF(CONF_VALUE) *(*get_section) (void *db, char *section);\n    void (*free_string) (void *db, char *string);\n    void (*free_section) (void *db, STACK_OF(CONF_VALUE) *section);\n} X509V3_CONF_METHOD;\n\n/* Context specific info */\nstruct v3_ext_ctx {\n# define CTX_TEST 0x1\n    int flags;\n    X509 *issuer_cert;\n    X509 *subject_cert;\n    X509_REQ *subject_req;\n    X509_CRL *crl;\n    X509V3_CONF_METHOD *db_meth;\n    void *db;\n/* Maybe more here */\n};\n\ntypedef struct v3_ext_method X509V3_EXT_METHOD;\n\nDECLARE_STACK_OF(X509V3_EXT_METHOD)\n\n/* ext_flags values */\n# define X509V3_EXT_DYNAMIC      0x1\n# define X509V3_EXT_CTX_DEP      0x2\n# define X509V3_EXT_MULTILINE    0x4\n\ntypedef BIT_STRING_BITNAME ENUMERATED_NAMES;\n\ntypedef struct BASIC_CONSTRAINTS_st {\n    int ca;\n    ASN1_INTEGER *pathlen;\n} BASIC_CONSTRAINTS;\n\ntypedef struct PKEY_USAGE_PERIOD_st {\n    ASN1_GENERALIZEDTIME *notBefore;\n    ASN1_GENERALIZEDTIME *notAfter;\n} PKEY_USAGE_PERIOD;\n\ntypedef struct otherName_st {\n    ASN1_OBJECT *type_id;\n    ASN1_TYPE *value;\n} OTHERNAME;\n\ntypedef struct EDIPartyName_st {\n    ASN1_STRING *nameAssigner;\n    ASN1_STRING *partyName;\n} EDIPARTYNAME;\n\ntypedef struct GENERAL_NAME_st {\n# define GEN_OTHERNAME   0\n# define GEN_EMAIL       1\n# define GEN_DNS         2\n# define GEN_X400        3\n# define GEN_DIRNAME     4\n# define GEN_EDIPARTY    5\n# define GEN_URI         6\n# define GEN_IPADD       7\n# define GEN_RID         8\n    int type;\n    union {\n        char *ptr;\n        OTHERNAME *otherName;   /* otherName */\n        ASN1_IA5STRING *rfc822Name;\n        ASN1_IA5STRING *dNSName;\n        ASN1_TYPE *x400Address;\n        X509_NAME *directoryName;\n        EDIPARTYNAME *ediPartyName;\n        ASN1_IA5STRING *uniformResourceIdentifier;\n        ASN1_OCTET_STRING *iPAddress;\n        ASN1_OBJECT *registeredID;\n        /* Old names */\n        ASN1_OCTET_STRING *ip;  /* iPAddress */\n        X509_NAME *dirn;        /* dirn */\n        ASN1_IA5STRING *ia5;    /* rfc822Name, dNSName,\n                                 * uniformResourceIdentifier */\n        ASN1_OBJECT *rid;       /* registeredID */\n        ASN1_TYPE *other;       /* x400Address */\n    } d;\n} GENERAL_NAME;\n\ntypedef STACK_OF(GENERAL_NAME) GENERAL_NAMES;\n\ntypedef struct ACCESS_DESCRIPTION_st {\n    ASN1_OBJECT *method;\n    GENERAL_NAME *location;\n} ACCESS_DESCRIPTION;\n\ntypedef STACK_OF(ACCESS_DESCRIPTION) AUTHORITY_INFO_ACCESS;\n\ntypedef STACK_OF(ASN1_OBJECT) EXTENDED_KEY_USAGE;\n\nDECLARE_STACK_OF(GENERAL_NAME)\nDECLARE_ASN1_SET_OF(GENERAL_NAME)\n\nDECLARE_STACK_OF(ACCESS_DESCRIPTION)\nDECLARE_ASN1_SET_OF(ACCESS_DESCRIPTION)\n\ntypedef struct DIST_POINT_NAME_st {\n    int type;\n    union {\n        GENERAL_NAMES *fullname;\n        STACK_OF(X509_NAME_ENTRY) *relativename;\n    } name;\n/* If relativename then this contains the full distribution point name */\n    X509_NAME *dpname;\n} DIST_POINT_NAME;\n/* All existing reasons */\n# define CRLDP_ALL_REASONS       0x807f\n\n# define CRL_REASON_NONE                         -1\n# define CRL_REASON_UNSPECIFIED                  0\n# define CRL_REASON_KEY_COMPROMISE               1\n# define CRL_REASON_CA_COMPROMISE                2\n# define CRL_REASON_AFFILIATION_CHANGED          3\n# define CRL_REASON_SUPERSEDED                   4\n# define CRL_REASON_CESSATION_OF_OPERATION       5\n# define CRL_REASON_CERTIFICATE_HOLD             6\n# define CRL_REASON_REMOVE_FROM_CRL              8\n# define CRL_REASON_PRIVILEGE_WITHDRAWN          9\n# define CRL_REASON_AA_COMPROMISE                10\n\nstruct DIST_POINT_st {\n    DIST_POINT_NAME *distpoint;\n    ASN1_BIT_STRING *reasons;\n    GENERAL_NAMES *CRLissuer;\n    int dp_reasons;\n};\n\ntypedef STACK_OF(DIST_POINT) CRL_DIST_POINTS;\n\nDECLARE_STACK_OF(DIST_POINT)\nDECLARE_ASN1_SET_OF(DIST_POINT)\n\nstruct AUTHORITY_KEYID_st {\n    ASN1_OCTET_STRING *keyid;\n    GENERAL_NAMES *issuer;\n    ASN1_INTEGER *serial;\n};\n\n/* Strong extranet structures */\n\ntypedef struct SXNET_ID_st {\n    ASN1_INTEGER *zone;\n    ASN1_OCTET_STRING *user;\n} SXNETID;\n\nDECLARE_STACK_OF(SXNETID)\nDECLARE_ASN1_SET_OF(SXNETID)\n\ntypedef struct SXNET_st {\n    ASN1_INTEGER *version;\n    STACK_OF(SXNETID) *ids;\n} SXNET;\n\ntypedef struct NOTICEREF_st {\n    ASN1_STRING *organization;\n    STACK_OF(ASN1_INTEGER) *noticenos;\n} NOTICEREF;\n\ntypedef struct USERNOTICE_st {\n    NOTICEREF *noticeref;\n    ASN1_STRING *exptext;\n} USERNOTICE;\n\ntypedef struct POLICYQUALINFO_st {\n    ASN1_OBJECT *pqualid;\n    union {\n        ASN1_IA5STRING *cpsuri;\n        USERNOTICE *usernotice;\n        ASN1_TYPE *other;\n    } d;\n} POLICYQUALINFO;\n\nDECLARE_STACK_OF(POLICYQUALINFO)\nDECLARE_ASN1_SET_OF(POLICYQUALINFO)\n\ntypedef struct POLICYINFO_st {\n    ASN1_OBJECT *policyid;\n    STACK_OF(POLICYQUALINFO) *qualifiers;\n} POLICYINFO;\n\ntypedef STACK_OF(POLICYINFO) CERTIFICATEPOLICIES;\n\nDECLARE_STACK_OF(POLICYINFO)\nDECLARE_ASN1_SET_OF(POLICYINFO)\n\ntypedef struct POLICY_MAPPING_st {\n    ASN1_OBJECT *issuerDomainPolicy;\n    ASN1_OBJECT *subjectDomainPolicy;\n} POLICY_MAPPING;\n\nDECLARE_STACK_OF(POLICY_MAPPING)\n\ntypedef STACK_OF(POLICY_MAPPING) POLICY_MAPPINGS;\n\ntypedef struct GENERAL_SUBTREE_st {\n    GENERAL_NAME *base;\n    ASN1_INTEGER *minimum;\n    ASN1_INTEGER *maximum;\n} GENERAL_SUBTREE;\n\nDECLARE_STACK_OF(GENERAL_SUBTREE)\n\nstruct NAME_CONSTRAINTS_st {\n    STACK_OF(GENERAL_SUBTREE) *permittedSubtrees;\n    STACK_OF(GENERAL_SUBTREE) *excludedSubtrees;\n};\n\ntypedef struct POLICY_CONSTRAINTS_st {\n    ASN1_INTEGER *requireExplicitPolicy;\n    ASN1_INTEGER *inhibitPolicyMapping;\n} POLICY_CONSTRAINTS;\n\n/* Proxy certificate structures, see RFC 3820 */\ntypedef struct PROXY_POLICY_st {\n    ASN1_OBJECT *policyLanguage;\n    ASN1_OCTET_STRING *policy;\n} PROXY_POLICY;\n\ntypedef struct PROXY_CERT_INFO_EXTENSION_st {\n    ASN1_INTEGER *pcPathLengthConstraint;\n    PROXY_POLICY *proxyPolicy;\n} PROXY_CERT_INFO_EXTENSION;\n\nDECLARE_ASN1_FUNCTIONS(PROXY_POLICY)\nDECLARE_ASN1_FUNCTIONS(PROXY_CERT_INFO_EXTENSION)\n\nstruct ISSUING_DIST_POINT_st {\n    DIST_POINT_NAME *distpoint;\n    int onlyuser;\n    int onlyCA;\n    ASN1_BIT_STRING *onlysomereasons;\n    int indirectCRL;\n    int onlyattr;\n};\n\n/* Values in idp_flags field */\n/* IDP present */\n# define IDP_PRESENT     0x1\n/* IDP values inconsistent */\n# define IDP_INVALID     0x2\n/* onlyuser true */\n# define IDP_ONLYUSER    0x4\n/* onlyCA true */\n# define IDP_ONLYCA      0x8\n/* onlyattr true */\n# define IDP_ONLYATTR    0x10\n/* indirectCRL true */\n# define IDP_INDIRECT    0x20\n/* onlysomereasons present */\n# define IDP_REASONS     0x40\n\n# define X509V3_conf_err(val) ERR_add_error_data(6, \"section:\", val->section, \\\n\",name:\", val->name, \",value:\", val->value);\n\n# define X509V3_set_ctx_test(ctx) \\\n                        X509V3_set_ctx(ctx, NULL, NULL, NULL, NULL, CTX_TEST)\n# define X509V3_set_ctx_nodb(ctx) (ctx)->db = NULL;\n\n# define EXT_BITSTRING(nid, table) { nid, 0, ASN1_ITEM_ref(ASN1_BIT_STRING), \\\n                        0,0,0,0, \\\n                        0,0, \\\n                        (X509V3_EXT_I2V)i2v_ASN1_BIT_STRING, \\\n                        (X509V3_EXT_V2I)v2i_ASN1_BIT_STRING, \\\n                        NULL, NULL, \\\n                        table}\n\n# define EXT_IA5STRING(nid) { nid, 0, ASN1_ITEM_ref(ASN1_IA5STRING), \\\n                        0,0,0,0, \\\n                        (X509V3_EXT_I2S)i2s_ASN1_IA5STRING, \\\n                        (X509V3_EXT_S2I)s2i_ASN1_IA5STRING, \\\n                        0,0,0,0, \\\n                        NULL}\n\n# define EXT_END { -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}\n\n/* X509_PURPOSE stuff */\n\n# define EXFLAG_BCONS            0x1\n# define EXFLAG_KUSAGE           0x2\n# define EXFLAG_XKUSAGE          0x4\n# define EXFLAG_NSCERT           0x8\n\n# define EXFLAG_CA               0x10\n/* Really self issued not necessarily self signed */\n# define EXFLAG_SI               0x20\n# define EXFLAG_SS               0x20\n# define EXFLAG_V1               0x40\n# define EXFLAG_INVALID          0x80\n# define EXFLAG_SET              0x100\n# define EXFLAG_CRITICAL         0x200\n# define EXFLAG_PROXY            0x400\n\n# define EXFLAG_INVALID_POLICY   0x800\n# define EXFLAG_FRESHEST         0x1000\n\n# define KU_DIGITAL_SIGNATURE    0x0080\n# define KU_NON_REPUDIATION      0x0040\n# define KU_KEY_ENCIPHERMENT     0x0020\n# define KU_DATA_ENCIPHERMENT    0x0010\n# define KU_KEY_AGREEMENT        0x0008\n# define KU_KEY_CERT_SIGN        0x0004\n# define KU_CRL_SIGN             0x0002\n# define KU_ENCIPHER_ONLY        0x0001\n# define KU_DECIPHER_ONLY        0x8000\n\n# define NS_SSL_CLIENT           0x80\n# define NS_SSL_SERVER           0x40\n# define NS_SMIME                0x20\n# define NS_OBJSIGN              0x10\n# define NS_SSL_CA               0x04\n# define NS_SMIME_CA             0x02\n# define NS_OBJSIGN_CA           0x01\n# define NS_ANY_CA               (NS_SSL_CA|NS_SMIME_CA|NS_OBJSIGN_CA)\n\n# define XKU_SSL_SERVER          0x1\n# define XKU_SSL_CLIENT          0x2\n# define XKU_SMIME               0x4\n# define XKU_CODE_SIGN           0x8\n# define XKU_SGC                 0x10\n# define XKU_OCSP_SIGN           0x20\n# define XKU_TIMESTAMP           0x40\n# define XKU_DVCS                0x80\n\n# define X509_PURPOSE_DYNAMIC    0x1\n# define X509_PURPOSE_DYNAMIC_NAME       0x2\n\ntypedef struct x509_purpose_st {\n    int purpose;\n    int trust;                  /* Default trust ID */\n    int flags;\n    int (*check_purpose) (const struct x509_purpose_st *, const X509 *, int);\n    char *name;\n    char *sname;\n    void *usr_data;\n} X509_PURPOSE;\n\n# define X509_PURPOSE_SSL_CLIENT         1\n# define X509_PURPOSE_SSL_SERVER         2\n# define X509_PURPOSE_NS_SSL_SERVER      3\n# define X509_PURPOSE_SMIME_SIGN         4\n# define X509_PURPOSE_SMIME_ENCRYPT      5\n# define X509_PURPOSE_CRL_SIGN           6\n# define X509_PURPOSE_ANY                7\n# define X509_PURPOSE_OCSP_HELPER        8\n# define X509_PURPOSE_TIMESTAMP_SIGN     9\n\n# define X509_PURPOSE_MIN                1\n# define X509_PURPOSE_MAX                9\n\n/* Flags for X509V3_EXT_print() */\n\n# define X509V3_EXT_UNKNOWN_MASK         (0xfL << 16)\n/* Return error for unknown extensions */\n# define X509V3_EXT_DEFAULT              0\n/* Print error for unknown extensions */\n# define X509V3_EXT_ERROR_UNKNOWN        (1L << 16)\n/* ASN1 parse unknown extensions */\n# define X509V3_EXT_PARSE_UNKNOWN        (2L << 16)\n/* BIO_dump unknown extensions */\n# define X509V3_EXT_DUMP_UNKNOWN         (3L << 16)\n\n/* Flags for X509V3_add1_i2d */\n\n# define X509V3_ADD_OP_MASK              0xfL\n# define X509V3_ADD_DEFAULT              0L\n# define X509V3_ADD_APPEND               1L\n# define X509V3_ADD_REPLACE              2L\n# define X509V3_ADD_REPLACE_EXISTING     3L\n# define X509V3_ADD_KEEP_EXISTING        4L\n# define X509V3_ADD_DELETE               5L\n# define X509V3_ADD_SILENT               0x10\n\nDECLARE_STACK_OF(X509_PURPOSE)\n\nDECLARE_ASN1_FUNCTIONS(BASIC_CONSTRAINTS)\n\nDECLARE_ASN1_FUNCTIONS(SXNET)\nDECLARE_ASN1_FUNCTIONS(SXNETID)\n\nint SXNET_add_id_asc(SXNET **psx, char *zone, char *user, int userlen);\nint SXNET_add_id_ulong(SXNET **psx, unsigned long lzone, char *user,\n                       int userlen);\nint SXNET_add_id_INTEGER(SXNET **psx, ASN1_INTEGER *izone, char *user,\n                         int userlen);\n\nASN1_OCTET_STRING *SXNET_get_id_asc(SXNET *sx, char *zone);\nASN1_OCTET_STRING *SXNET_get_id_ulong(SXNET *sx, unsigned long lzone);\nASN1_OCTET_STRING *SXNET_get_id_INTEGER(SXNET *sx, ASN1_INTEGER *zone);\n\nDECLARE_ASN1_FUNCTIONS(AUTHORITY_KEYID)\n\nDECLARE_ASN1_FUNCTIONS(PKEY_USAGE_PERIOD)\n\nDECLARE_ASN1_FUNCTIONS(GENERAL_NAME)\nGENERAL_NAME *GENERAL_NAME_dup(GENERAL_NAME *a);\nint GENERAL_NAME_cmp(GENERAL_NAME *a, GENERAL_NAME *b);\n\nASN1_BIT_STRING *v2i_ASN1_BIT_STRING(X509V3_EXT_METHOD *method,\n                                     X509V3_CTX *ctx,\n                                     STACK_OF(CONF_VALUE) *nval);\nSTACK_OF(CONF_VALUE) *i2v_ASN1_BIT_STRING(X509V3_EXT_METHOD *method,\n                                          ASN1_BIT_STRING *bits,\n                                          STACK_OF(CONF_VALUE) *extlist);\n\nSTACK_OF(CONF_VALUE) *i2v_GENERAL_NAME(X509V3_EXT_METHOD *method,\n                                       GENERAL_NAME *gen,\n                                       STACK_OF(CONF_VALUE) *ret);\nint GENERAL_NAME_print(BIO *out, GENERAL_NAME *gen);\n\nDECLARE_ASN1_FUNCTIONS(GENERAL_NAMES)\n\nSTACK_OF(CONF_VALUE) *i2v_GENERAL_NAMES(X509V3_EXT_METHOD *method,\n                                        GENERAL_NAMES *gen,\n                                        STACK_OF(CONF_VALUE) *extlist);\nGENERAL_NAMES *v2i_GENERAL_NAMES(const X509V3_EXT_METHOD *method,\n                                 X509V3_CTX *ctx, STACK_OF(CONF_VALUE) *nval);\n\nDECLARE_ASN1_FUNCTIONS(OTHERNAME)\nDECLARE_ASN1_FUNCTIONS(EDIPARTYNAME)\nint OTHERNAME_cmp(OTHERNAME *a, OTHERNAME *b);\nvoid GENERAL_NAME_set0_value(GENERAL_NAME *a, int type, void *value);\nvoid *GENERAL_NAME_get0_value(GENERAL_NAME *a, int *ptype);\nint GENERAL_NAME_set0_othername(GENERAL_NAME *gen,\n                                ASN1_OBJECT *oid, ASN1_TYPE *value);\nint GENERAL_NAME_get0_otherName(GENERAL_NAME *gen,\n                                ASN1_OBJECT **poid, ASN1_TYPE **pvalue);\n\nchar *i2s_ASN1_OCTET_STRING(X509V3_EXT_METHOD *method,\n                            ASN1_OCTET_STRING *ia5);\nASN1_OCTET_STRING *s2i_ASN1_OCTET_STRING(X509V3_EXT_METHOD *method,\n                                         X509V3_CTX *ctx, char *str);\n\nDECLARE_ASN1_FUNCTIONS(EXTENDED_KEY_USAGE)\nint i2a_ACCESS_DESCRIPTION(BIO *bp, ACCESS_DESCRIPTION *a);\n\nDECLARE_ASN1_FUNCTIONS(CERTIFICATEPOLICIES)\nDECLARE_ASN1_FUNCTIONS(POLICYINFO)\nDECLARE_ASN1_FUNCTIONS(POLICYQUALINFO)\nDECLARE_ASN1_FUNCTIONS(USERNOTICE)\nDECLARE_ASN1_FUNCTIONS(NOTICEREF)\n\nDECLARE_ASN1_FUNCTIONS(CRL_DIST_POINTS)\nDECLARE_ASN1_FUNCTIONS(DIST_POINT)\nDECLARE_ASN1_FUNCTIONS(DIST_POINT_NAME)\nDECLARE_ASN1_FUNCTIONS(ISSUING_DIST_POINT)\n\nint DIST_POINT_set_dpname(DIST_POINT_NAME *dpn, X509_NAME *iname);\n\nint NAME_CONSTRAINTS_check(X509 *x, NAME_CONSTRAINTS *nc);\n\nDECLARE_ASN1_FUNCTIONS(ACCESS_DESCRIPTION)\nDECLARE_ASN1_FUNCTIONS(AUTHORITY_INFO_ACCESS)\n\nDECLARE_ASN1_ITEM(POLICY_MAPPING)\nDECLARE_ASN1_ALLOC_FUNCTIONS(POLICY_MAPPING)\nDECLARE_ASN1_ITEM(POLICY_MAPPINGS)\n\nDECLARE_ASN1_ITEM(GENERAL_SUBTREE)\nDECLARE_ASN1_ALLOC_FUNCTIONS(GENERAL_SUBTREE)\n\nDECLARE_ASN1_ITEM(NAME_CONSTRAINTS)\nDECLARE_ASN1_ALLOC_FUNCTIONS(NAME_CONSTRAINTS)\n\nDECLARE_ASN1_ALLOC_FUNCTIONS(POLICY_CONSTRAINTS)\nDECLARE_ASN1_ITEM(POLICY_CONSTRAINTS)\n\nGENERAL_NAME *a2i_GENERAL_NAME(GENERAL_NAME *out,\n                               const X509V3_EXT_METHOD *method,\n                               X509V3_CTX *ctx, int gen_type, char *value,\n                               int is_nc);\n\n# ifdef HEADER_CONF_H\nGENERAL_NAME *v2i_GENERAL_NAME(const X509V3_EXT_METHOD *method,\n                               X509V3_CTX *ctx, CONF_VALUE *cnf);\nGENERAL_NAME *v2i_GENERAL_NAME_ex(GENERAL_NAME *out,\n                                  const X509V3_EXT_METHOD *method,\n                                  X509V3_CTX *ctx, CONF_VALUE *cnf,\n                                  int is_nc);\nvoid X509V3_conf_free(CONF_VALUE *val);\n\nX509_EXTENSION *X509V3_EXT_nconf_nid(CONF *conf, X509V3_CTX *ctx, int ext_nid,\n                                     char *value);\nX509_EXTENSION *X509V3_EXT_nconf(CONF *conf, X509V3_CTX *ctx, char *name,\n                                 char *value);\nint X509V3_EXT_add_nconf_sk(CONF *conf, X509V3_CTX *ctx, char *section,\n                            STACK_OF(X509_EXTENSION) **sk);\nint X509V3_EXT_add_nconf(CONF *conf, X509V3_CTX *ctx, char *section,\n                         X509 *cert);\nint X509V3_EXT_REQ_add_nconf(CONF *conf, X509V3_CTX *ctx, char *section,\n                             X509_REQ *req);\nint X509V3_EXT_CRL_add_nconf(CONF *conf, X509V3_CTX *ctx, char *section,\n                             X509_CRL *crl);\n\nX509_EXTENSION *X509V3_EXT_conf_nid(LHASH_OF(CONF_VALUE) *conf,\n                                    X509V3_CTX *ctx, int ext_nid,\n                                    char *value);\nX509_EXTENSION *X509V3_EXT_conf(LHASH_OF(CONF_VALUE) *conf, X509V3_CTX *ctx,\n                                char *name, char *value);\nint X509V3_EXT_add_conf(LHASH_OF(CONF_VALUE) *conf, X509V3_CTX *ctx,\n                        char *section, X509 *cert);\nint X509V3_EXT_REQ_add_conf(LHASH_OF(CONF_VALUE) *conf, X509V3_CTX *ctx,\n                            char *section, X509_REQ *req);\nint X509V3_EXT_CRL_add_conf(LHASH_OF(CONF_VALUE) *conf, X509V3_CTX *ctx,\n                            char *section, X509_CRL *crl);\n\nint X509V3_add_value_bool_nf(char *name, int asn1_bool,\n                             STACK_OF(CONF_VALUE) **extlist);\nint X509V3_get_value_bool(CONF_VALUE *value, int *asn1_bool);\nint X509V3_get_value_int(CONF_VALUE *value, ASN1_INTEGER **aint);\nvoid X509V3_set_nconf(X509V3_CTX *ctx, CONF *conf);\nvoid X509V3_set_conf_lhash(X509V3_CTX *ctx, LHASH_OF(CONF_VALUE) *lhash);\n# endif\n\nchar *X509V3_get_string(X509V3_CTX *ctx, char *name, char *section);\nSTACK_OF(CONF_VALUE) *X509V3_get_section(X509V3_CTX *ctx, char *section);\nvoid X509V3_string_free(X509V3_CTX *ctx, char *str);\nvoid X509V3_section_free(X509V3_CTX *ctx, STACK_OF(CONF_VALUE) *section);\nvoid X509V3_set_ctx(X509V3_CTX *ctx, X509 *issuer, X509 *subject,\n                    X509_REQ *req, X509_CRL *crl, int flags);\n\nint X509V3_add_value(const char *name, const char *value,\n                     STACK_OF(CONF_VALUE) **extlist);\nint X509V3_add_value_uchar(const char *name, const unsigned char *value,\n                           STACK_OF(CONF_VALUE) **extlist);\nint X509V3_add_value_bool(const char *name, int asn1_bool,\n                          STACK_OF(CONF_VALUE) **extlist);\nint X509V3_add_value_int(const char *name, ASN1_INTEGER *aint,\n                         STACK_OF(CONF_VALUE) **extlist);\nchar *i2s_ASN1_INTEGER(X509V3_EXT_METHOD *meth, ASN1_INTEGER *aint);\nASN1_INTEGER *s2i_ASN1_INTEGER(X509V3_EXT_METHOD *meth, char *value);\nchar *i2s_ASN1_ENUMERATED(X509V3_EXT_METHOD *meth, ASN1_ENUMERATED *aint);\nchar *i2s_ASN1_ENUMERATED_TABLE(X509V3_EXT_METHOD *meth,\n                                ASN1_ENUMERATED *aint);\nint X509V3_EXT_add(X509V3_EXT_METHOD *ext);\nint X509V3_EXT_add_list(X509V3_EXT_METHOD *extlist);\nint X509V3_EXT_add_alias(int nid_to, int nid_from);\nvoid X509V3_EXT_cleanup(void);\n\nconst X509V3_EXT_METHOD *X509V3_EXT_get(X509_EXTENSION *ext);\nconst X509V3_EXT_METHOD *X509V3_EXT_get_nid(int nid);\nint X509V3_add_standard_extensions(void);\nSTACK_OF(CONF_VALUE) *X509V3_parse_list(const char *line);\nvoid *X509V3_EXT_d2i(X509_EXTENSION *ext);\nvoid *X509V3_get_d2i(STACK_OF(X509_EXTENSION) *x, int nid, int *crit,\n                     int *idx);\n\nX509_EXTENSION *X509V3_EXT_i2d(int ext_nid, int crit, void *ext_struc);\nint X509V3_add1_i2d(STACK_OF(X509_EXTENSION) **x, int nid, void *value,\n                    int crit, unsigned long flags);\n\nchar *hex_to_string(const unsigned char *buffer, long len);\nunsigned char *string_to_hex(const char *str, long *len);\nint name_cmp(const char *name, const char *cmp);\n\nvoid X509V3_EXT_val_prn(BIO *out, STACK_OF(CONF_VALUE) *val, int indent,\n                        int ml);\nint X509V3_EXT_print(BIO *out, X509_EXTENSION *ext, unsigned long flag,\n                     int indent);\nint X509V3_EXT_print_fp(FILE *out, X509_EXTENSION *ext, int flag, int indent);\n\nint X509V3_extensions_print(BIO *out, char *title,\n                            STACK_OF(X509_EXTENSION) *exts,\n                            unsigned long flag, int indent);\n\nint X509_check_ca(X509 *x);\nint X509_check_purpose(X509 *x, int id, int ca);\nint X509_supported_extension(X509_EXTENSION *ex);\nint X509_PURPOSE_set(int *p, int purpose);\nint X509_check_issued(X509 *issuer, X509 *subject);\nint X509_check_akid(X509 *issuer, AUTHORITY_KEYID *akid);\nint X509_PURPOSE_get_count(void);\nX509_PURPOSE *X509_PURPOSE_get0(int idx);\nint X509_PURPOSE_get_by_sname(char *sname);\nint X509_PURPOSE_get_by_id(int id);\nint X509_PURPOSE_add(int id, int trust, int flags,\n                     int (*ck) (const X509_PURPOSE *, const X509 *, int),\n                     char *name, char *sname, void *arg);\nchar *X509_PURPOSE_get0_name(X509_PURPOSE *xp);\nchar *X509_PURPOSE_get0_sname(X509_PURPOSE *xp);\nint X509_PURPOSE_get_trust(X509_PURPOSE *xp);\nvoid X509_PURPOSE_cleanup(void);\nint X509_PURPOSE_get_id(X509_PURPOSE *);\n\nSTACK_OF(OPENSSL_STRING) *X509_get1_email(X509 *x);\nSTACK_OF(OPENSSL_STRING) *X509_REQ_get1_email(X509_REQ *x);\nvoid X509_email_free(STACK_OF(OPENSSL_STRING) *sk);\nSTACK_OF(OPENSSL_STRING) *X509_get1_ocsp(X509 *x);\n\nASN1_OCTET_STRING *a2i_IPADDRESS(const char *ipasc);\nASN1_OCTET_STRING *a2i_IPADDRESS_NC(const char *ipasc);\nint a2i_ipadd(unsigned char *ipout, const char *ipasc);\nint X509V3_NAME_from_section(X509_NAME *nm, STACK_OF(CONF_VALUE) *dn_sk,\n                             unsigned long chtype);\n\nvoid X509_POLICY_NODE_print(BIO *out, X509_POLICY_NODE *node, int indent);\nDECLARE_STACK_OF(X509_POLICY_NODE)\n\n# ifndef OPENSSL_NO_RFC3779\n\ntypedef struct ASRange_st {\n    ASN1_INTEGER *min, *max;\n} ASRange;\n\n#  define ASIdOrRange_id          0\n#  define ASIdOrRange_range       1\n\ntypedef struct ASIdOrRange_st {\n    int type;\n    union {\n        ASN1_INTEGER *id;\n        ASRange *range;\n    } u;\n} ASIdOrRange;\n\ntypedef STACK_OF(ASIdOrRange) ASIdOrRanges;\nDECLARE_STACK_OF(ASIdOrRange)\n\n#  define ASIdentifierChoice_inherit              0\n#  define ASIdentifierChoice_asIdsOrRanges        1\n\ntypedef struct ASIdentifierChoice_st {\n    int type;\n    union {\n        ASN1_NULL *inherit;\n        ASIdOrRanges *asIdsOrRanges;\n    } u;\n} ASIdentifierChoice;\n\ntypedef struct ASIdentifiers_st {\n    ASIdentifierChoice *asnum, *rdi;\n} ASIdentifiers;\n\nDECLARE_ASN1_FUNCTIONS(ASRange)\nDECLARE_ASN1_FUNCTIONS(ASIdOrRange)\nDECLARE_ASN1_FUNCTIONS(ASIdentifierChoice)\nDECLARE_ASN1_FUNCTIONS(ASIdentifiers)\n\ntypedef struct IPAddressRange_st {\n    ASN1_BIT_STRING *min, *max;\n} IPAddressRange;\n\n#  define IPAddressOrRange_addressPrefix  0\n#  define IPAddressOrRange_addressRange   1\n\ntypedef struct IPAddressOrRange_st {\n    int type;\n    union {\n        ASN1_BIT_STRING *addressPrefix;\n        IPAddressRange *addressRange;\n    } u;\n} IPAddressOrRange;\n\ntypedef STACK_OF(IPAddressOrRange) IPAddressOrRanges;\nDECLARE_STACK_OF(IPAddressOrRange)\n\n#  define IPAddressChoice_inherit                 0\n#  define IPAddressChoice_addressesOrRanges       1\n\ntypedef struct IPAddressChoice_st {\n    int type;\n    union {\n        ASN1_NULL *inherit;\n        IPAddressOrRanges *addressesOrRanges;\n    } u;\n} IPAddressChoice;\n\ntypedef struct IPAddressFamily_st {\n    ASN1_OCTET_STRING *addressFamily;\n    IPAddressChoice *ipAddressChoice;\n} IPAddressFamily;\n\ntypedef STACK_OF(IPAddressFamily) IPAddrBlocks;\nDECLARE_STACK_OF(IPAddressFamily)\n\nDECLARE_ASN1_FUNCTIONS(IPAddressRange)\nDECLARE_ASN1_FUNCTIONS(IPAddressOrRange)\nDECLARE_ASN1_FUNCTIONS(IPAddressChoice)\nDECLARE_ASN1_FUNCTIONS(IPAddressFamily)\n\n/*\n * API tag for elements of the ASIdentifer SEQUENCE.\n */\n#  define V3_ASID_ASNUM   0\n#  define V3_ASID_RDI     1\n\n/*\n * AFI values, assigned by IANA.  It'd be nice to make the AFI\n * handling code totally generic, but there are too many little things\n * that would need to be defined for other address families for it to\n * be worth the trouble.\n */\n#  define IANA_AFI_IPV4   1\n#  define IANA_AFI_IPV6   2\n\n/*\n * Utilities to construct and extract values from RFC3779 extensions,\n * since some of the encodings (particularly for IP address prefixes\n * and ranges) are a bit tedious to work with directly.\n */\nint v3_asid_add_inherit(ASIdentifiers *asid, int which);\nint v3_asid_add_id_or_range(ASIdentifiers *asid, int which,\n                            ASN1_INTEGER *min, ASN1_INTEGER *max);\nint v3_addr_add_inherit(IPAddrBlocks *addr,\n                        const unsigned afi, const unsigned *safi);\nint v3_addr_add_prefix(IPAddrBlocks *addr,\n                       const unsigned afi, const unsigned *safi,\n                       unsigned char *a, const int prefixlen);\nint v3_addr_add_range(IPAddrBlocks *addr,\n                      const unsigned afi, const unsigned *safi,\n                      unsigned char *min, unsigned char *max);\nunsigned v3_addr_get_afi(const IPAddressFamily *f);\nint v3_addr_get_range(IPAddressOrRange *aor, const unsigned afi,\n                      unsigned char *min, unsigned char *max,\n                      const int length);\n\n/*\n * Canonical forms.\n */\nint v3_asid_is_canonical(ASIdentifiers *asid);\nint v3_addr_is_canonical(IPAddrBlocks *addr);\nint v3_asid_canonize(ASIdentifiers *asid);\nint v3_addr_canonize(IPAddrBlocks *addr);\n\n/*\n * Tests for inheritance and containment.\n */\nint v3_asid_inherits(ASIdentifiers *asid);\nint v3_addr_inherits(IPAddrBlocks *addr);\nint v3_asid_subset(ASIdentifiers *a, ASIdentifiers *b);\nint v3_addr_subset(IPAddrBlocks *a, IPAddrBlocks *b);\n\n/*\n * Check whether RFC 3779 extensions nest properly in chains.\n */\nint v3_asid_validate_path(X509_STORE_CTX *);\nint v3_addr_validate_path(X509_STORE_CTX *);\nint v3_asid_validate_resource_set(STACK_OF(X509) *chain,\n                                  ASIdentifiers *ext, int allow_inheritance);\nint v3_addr_validate_resource_set(STACK_OF(X509) *chain,\n                                  IPAddrBlocks *ext, int allow_inheritance);\n\n# endif                         /* OPENSSL_NO_RFC3779 */\n\n/* BEGIN ERROR CODES */\n/*\n * The following lines are auto generated by the script mkerr.pl. Any changes\n * made after this point may be overwritten when the script is next run.\n */\nvoid ERR_load_X509V3_strings(void);\n\n/* Error codes for the X509V3 functions. */\n\n/* Function codes. */\n# define X509V3_F_A2I_GENERAL_NAME                        164\n# define X509V3_F_ASIDENTIFIERCHOICE_CANONIZE             161\n# define X509V3_F_ASIDENTIFIERCHOICE_IS_CANONICAL         162\n# define X509V3_F_COPY_EMAIL                              122\n# define X509V3_F_COPY_ISSUER                             123\n# define X509V3_F_DO_DIRNAME                              144\n# define X509V3_F_DO_EXT_CONF                             124\n# define X509V3_F_DO_EXT_I2D                              135\n# define X509V3_F_DO_EXT_NCONF                            151\n# define X509V3_F_DO_I2V_NAME_CONSTRAINTS                 148\n# define X509V3_F_GNAMES_FROM_SECTNAME                    156\n# define X509V3_F_HEX_TO_STRING                           111\n# define X509V3_F_I2S_ASN1_ENUMERATED                     121\n# define X509V3_F_I2S_ASN1_IA5STRING                      149\n# define X509V3_F_I2S_ASN1_INTEGER                        120\n# define X509V3_F_I2V_AUTHORITY_INFO_ACCESS               138\n# define X509V3_F_NOTICE_SECTION                          132\n# define X509V3_F_NREF_NOS                                133\n# define X509V3_F_POLICY_SECTION                          131\n# define X509V3_F_PROCESS_PCI_VALUE                       150\n# define X509V3_F_R2I_CERTPOL                             130\n# define X509V3_F_R2I_PCI                                 155\n# define X509V3_F_S2I_ASN1_IA5STRING                      100\n# define X509V3_F_S2I_ASN1_INTEGER                        108\n# define X509V3_F_S2I_ASN1_OCTET_STRING                   112\n# define X509V3_F_S2I_ASN1_SKEY_ID                        114\n# define X509V3_F_S2I_SKEY_ID                             115\n# define X509V3_F_SET_DIST_POINT_NAME                     158\n# define X509V3_F_STRING_TO_HEX                           113\n# define X509V3_F_SXNET_ADD_ID_ASC                        125\n# define X509V3_F_SXNET_ADD_ID_INTEGER                    126\n# define X509V3_F_SXNET_ADD_ID_ULONG                      127\n# define X509V3_F_SXNET_GET_ID_ASC                        128\n# define X509V3_F_SXNET_GET_ID_ULONG                      129\n# define X509V3_F_V2I_ASIDENTIFIERS                       163\n# define X509V3_F_V2I_ASN1_BIT_STRING                     101\n# define X509V3_F_V2I_AUTHORITY_INFO_ACCESS               139\n# define X509V3_F_V2I_AUTHORITY_KEYID                     119\n# define X509V3_F_V2I_BASIC_CONSTRAINTS                   102\n# define X509V3_F_V2I_CRLD                                134\n# define X509V3_F_V2I_EXTENDED_KEY_USAGE                  103\n# define X509V3_F_V2I_GENERAL_NAMES                       118\n# define X509V3_F_V2I_GENERAL_NAME_EX                     117\n# define X509V3_F_V2I_IDP                                 157\n# define X509V3_F_V2I_IPADDRBLOCKS                        159\n# define X509V3_F_V2I_ISSUER_ALT                          153\n# define X509V3_F_V2I_NAME_CONSTRAINTS                    147\n# define X509V3_F_V2I_POLICY_CONSTRAINTS                  146\n# define X509V3_F_V2I_POLICY_MAPPINGS                     145\n# define X509V3_F_V2I_SUBJECT_ALT                         154\n# define X509V3_F_V3_ADDR_VALIDATE_PATH_INTERNAL          160\n# define X509V3_F_V3_GENERIC_EXTENSION                    116\n# define X509V3_F_X509V3_ADD1_I2D                         140\n# define X509V3_F_X509V3_ADD_VALUE                        105\n# define X509V3_F_X509V3_EXT_ADD                          104\n# define X509V3_F_X509V3_EXT_ADD_ALIAS                    106\n# define X509V3_F_X509V3_EXT_CONF                         107\n# define X509V3_F_X509V3_EXT_I2D                          136\n# define X509V3_F_X509V3_EXT_NCONF                        152\n# define X509V3_F_X509V3_GET_SECTION                      142\n# define X509V3_F_X509V3_GET_STRING                       143\n# define X509V3_F_X509V3_GET_VALUE_BOOL                   110\n# define X509V3_F_X509V3_PARSE_LIST                       109\n# define X509V3_F_X509_PURPOSE_ADD                        137\n# define X509V3_F_X509_PURPOSE_SET                        141\n\n/* Reason codes. */\n# define X509V3_R_BAD_IP_ADDRESS                          118\n# define X509V3_R_BAD_OBJECT                              119\n# define X509V3_R_BN_DEC2BN_ERROR                         100\n# define X509V3_R_BN_TO_ASN1_INTEGER_ERROR                101\n# define X509V3_R_DIRNAME_ERROR                           149\n# define X509V3_R_DISTPOINT_ALREADY_SET                   160\n# define X509V3_R_DUPLICATE_ZONE_ID                       133\n# define X509V3_R_ERROR_CONVERTING_ZONE                   131\n# define X509V3_R_ERROR_CREATING_EXTENSION                144\n# define X509V3_R_ERROR_IN_EXTENSION                      128\n# define X509V3_R_EXPECTED_A_SECTION_NAME                 137\n# define X509V3_R_EXTENSION_EXISTS                        145\n# define X509V3_R_EXTENSION_NAME_ERROR                    115\n# define X509V3_R_EXTENSION_NOT_FOUND                     102\n# define X509V3_R_EXTENSION_SETTING_NOT_SUPPORTED         103\n# define X509V3_R_EXTENSION_VALUE_ERROR                   116\n# define X509V3_R_ILLEGAL_EMPTY_EXTENSION                 151\n# define X509V3_R_ILLEGAL_HEX_DIGIT                       113\n# define X509V3_R_INCORRECT_POLICY_SYNTAX_TAG             152\n# define X509V3_R_INVALID_MULTIPLE_RDNS                   161\n# define X509V3_R_INVALID_ASNUMBER                        162\n# define X509V3_R_INVALID_ASRANGE                         163\n# define X509V3_R_INVALID_BOOLEAN_STRING                  104\n# define X509V3_R_INVALID_EXTENSION_STRING                105\n# define X509V3_R_INVALID_INHERITANCE                     165\n# define X509V3_R_INVALID_IPADDRESS                       166\n# define X509V3_R_INVALID_NAME                            106\n# define X509V3_R_INVALID_NULL_ARGUMENT                   107\n# define X509V3_R_INVALID_NULL_NAME                       108\n# define X509V3_R_INVALID_NULL_VALUE                      109\n# define X509V3_R_INVALID_NUMBER                          140\n# define X509V3_R_INVALID_NUMBERS                         141\n# define X509V3_R_INVALID_OBJECT_IDENTIFIER               110\n# define X509V3_R_INVALID_OPTION                          138\n# define X509V3_R_INVALID_POLICY_IDENTIFIER               134\n# define X509V3_R_INVALID_PROXY_POLICY_SETTING            153\n# define X509V3_R_INVALID_PURPOSE                         146\n# define X509V3_R_INVALID_SAFI                            164\n# define X509V3_R_INVALID_SECTION                         135\n# define X509V3_R_INVALID_SYNTAX                          143\n# define X509V3_R_ISSUER_DECODE_ERROR                     126\n# define X509V3_R_MISSING_VALUE                           124\n# define X509V3_R_NEED_ORGANIZATION_AND_NUMBERS           142\n# define X509V3_R_NO_CONFIG_DATABASE                      136\n# define X509V3_R_NO_ISSUER_CERTIFICATE                   121\n# define X509V3_R_NO_ISSUER_DETAILS                       127\n# define X509V3_R_NO_POLICY_IDENTIFIER                    139\n# define X509V3_R_NO_PROXY_CERT_POLICY_LANGUAGE_DEFINED   154\n# define X509V3_R_NO_PUBLIC_KEY                           114\n# define X509V3_R_NO_SUBJECT_DETAILS                      125\n# define X509V3_R_ODD_NUMBER_OF_DIGITS                    112\n# define X509V3_R_OPERATION_NOT_DEFINED                   148\n# define X509V3_R_OTHERNAME_ERROR                         147\n# define X509V3_R_POLICY_LANGUAGE_ALREADY_DEFINED         155\n# define X509V3_R_POLICY_PATH_LENGTH                      156\n# define X509V3_R_POLICY_PATH_LENGTH_ALREADY_DEFINED      157\n# define X509V3_R_POLICY_SYNTAX_NOT_CURRENTLY_SUPPORTED   158\n# define X509V3_R_POLICY_WHEN_PROXY_LANGUAGE_REQUIRES_NO_POLICY 159\n# define X509V3_R_SECTION_NOT_FOUND                       150\n# define X509V3_R_UNABLE_TO_GET_ISSUER_DETAILS            122\n# define X509V3_R_UNABLE_TO_GET_ISSUER_KEYID              123\n# define X509V3_R_UNKNOWN_BIT_STRING_ARGUMENT             111\n# define X509V3_R_UNKNOWN_EXTENSION                       129\n# define X509V3_R_UNKNOWN_EXTENSION_NAME                  130\n# define X509V3_R_UNKNOWN_OPTION                          120\n# define X509V3_R_UNSUPPORTED_OPTION                      117\n# define X509V3_R_UNSUPPORTED_TYPE                        167\n# define X509V3_R_USER_TOO_LONG                           132\n\n#ifdef  __cplusplus\n}\n#endif\n#endif\n"
  },
  {
    "path": "Pods/Pods.xcodeproj/project.pbxproj",
    "content": "// !$*UTF8*$!\n{\n\tarchiveVersion = 1;\n\tclasses = {\n\t};\n\tobjectVersion = 46;\n\tobjects = {\n\n/* Begin PBXBuildFile section */\n\t\t008CC66DC9E7097ACAFBB44C0DC29141 /* BTCTransactionBuilder.m in Sources */ = {isa = PBXBuildFile; fileRef = AFE92316288527A68C5561E6B187C546 /* BTCTransactionBuilder.m */; settings = {COMPILER_FLAGS = \"-w -Xanalyzer -analyzer-disable-all-checks\"; }; };\n\t\t008EE1E47C7F48ADB999B3D4A9333227 /* BTCTransactionInput.h in Headers */ = {isa = PBXBuildFile; fileRef = D5110032C21E0A1E2FA9FD93886985F5 /* BTCTransactionInput.h */; settings = {ATTRIBUTES = (Public, ); }; };\n\t\t04DA3364298A8E00D70978CD17BB7B1A /* iCloud-Prefix.pch in Sources */ = {isa = PBXBuildFile; fileRef = 9E23DC3F96FAA164FA689122F745FC3E /* iCloud-Prefix.pch */; };\n\t\t057E6EAD536641ECF5DBCF6EF3AC0208 /* ECPercentDrivenInteractiveTransition.m in Sources */ = {isa = PBXBuildFile; fileRef = 727E08CD1798AAE87E25F55C0B89D769 /* ECPercentDrivenInteractiveTransition.m */; settings = {COMPILER_FLAGS = \"-w -Xanalyzer -analyzer-disable-all-checks\"; }; };\n\t\t06756A0BE2B833A04CAF19853A26C0CE /* BTCKeychain.m in Sources */ = {isa = PBXBuildFile; fileRef = 3A5449F7197D95336EEA0C7681EB3DF1 /* BTCKeychain.m */; settings = {COMPILER_FLAGS = \"-w -Xanalyzer -analyzer-disable-all-checks\"; }; };\n\t\t0921D584AB13CD8D93B967219F2E38D5 /* ISO8601DateFormatter.h in Headers */ = {isa = PBXBuildFile; fileRef = EF7AB7E36C757B0B72ABCD2E3CE14165 /* ISO8601DateFormatter.h */; settings = {ATTRIBUTES = (Public, ); }; };\n\t\t09AFC79EC7C17D72E6A51023FACACFA2 /* BTCTransactionBuilder.h in Headers */ = {isa = PBXBuildFile; fileRef = 283D94566D2E1147D94E5A2DEE54FB51 /* BTCTransactionBuilder.h */; settings = {ATTRIBUTES = (Public, ); }; };\n\t\t0C6CCB1C4C5591478F8C6AC36D54AC7D /* BTCHashID.m in Sources */ = {isa = PBXBuildFile; fileRef = 4601C8F6520F45BDCE5FC2A299621713 /* BTCHashID.m */; settings = {COMPILER_FLAGS = \"-w -Xanalyzer -analyzer-disable-all-checks\"; }; };\n\t\t0CB1C5E155158481C5B26A556652BAF7 /* BTCNumberFormatter.h in Headers */ = {isa = PBXBuildFile; fileRef = 21B793E2BB6FF737E9C4003D4DC97F49 /* BTCNumberFormatter.h */; settings = {ATTRIBUTES = (Public, ); }; };\n\t\t0CD9C43ED3C992B98073F95067B53B03 /* AFURLSessionManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 23335AC4D3FA28AA61F7E3BD65845217 /* AFURLSessionManager.m */; settings = {COMPILER_FLAGS = \"-w -Xanalyzer -analyzer-disable-all-checks\"; }; };\n\t\t0E3FA6FE82706A02E1B2906F68A4C745 /* RNCryptor-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 3FAAD67FBFA07F5A47C8D1C7E2A5DDA9 /* RNCryptor-dummy.m */; };\n\t\t1011AE994051463F2BD727FDAEB38BA2 /* RNOpenSSLEncryptor.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B2EE8CE559E9A19F1CBBCADED341B8E /* RNOpenSSLEncryptor.h */; settings = {ATTRIBUTES = (Public, ); }; };\n\t\t111DBE75D66AF620373456DA8FF411A3 /* BTCPaymentRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = 7DD7CF735F02F1F66EB97CD125CE3ED8 /* BTCPaymentRequest.h */; settings = {ATTRIBUTES = (Public, ); }; };\n\t\t116D875F05695C6E1F08619BE09A2804 /* UIButton+AFNetworking.h in Headers */ = {isa = PBXBuildFile; fileRef = 704A68A6D827D96806B271BE3113DDD2 /* UIButton+AFNetworking.h */; settings = {ATTRIBUTES = (Public, ); }; };\n\t\t11D9480CCC56D20DFFC4E060C77D73AB /* BTCAddress.h in Headers */ = {isa = PBXBuildFile; fileRef = 926B1BE83431EFA92C6889CF0F962EC5 /* BTCAddress.h */; settings = {ATTRIBUTES = (Public, ); }; };\n\t\t1450DB4E6385F2206E2A0B8CE4ECF841 /* AFURLResponseSerialization.h in Headers */ = {isa = PBXBuildFile; fileRef = AA8BCCFE7DE3B05DD0E7AD638575712D /* AFURLResponseSerialization.h */; settings = {ATTRIBUTES = (Public, ); }; };\n\t\t145E917FBEE1FF331F6F4DF61F0D3436 /* BTCBlockHeader.h in Headers */ = {isa = PBXBuildFile; fileRef = 78275AA10E03112AB7651930D2FEF07F /* BTCBlockHeader.h */; settings = {ATTRIBUTES = (Public, ); }; };\n\t\t14B22B1E13FFA930C8D4E81E59B0EFD6 /* BTCBlock.h in Headers */ = {isa = PBXBuildFile; fileRef = 5D2B0B6D9A30C1EB58543F2588C21FE8 /* BTCBlock.h */; settings = {ATTRIBUTES = (Public, ); }; };\n\t\t14FAB1DD5C7279E43725DC3EA0EBEC29 /* BTCBigNumber.h in Headers */ = {isa = PBXBuildFile; fileRef = 9E5575178601F6294E9902228F527172 /* BTCBigNumber.h */; settings = {ATTRIBUTES = (Public, ); }; };\n\t\t18BF12DB736B148118E4A6E695DD0514 /* BTCAssetID.m in Sources */ = {isa = PBXBuildFile; fileRef = 97F6BBA0155779DEEAE85D4FE7376407 /* BTCAssetID.m */; settings = {COMPILER_FLAGS = \"-w -Xanalyzer -analyzer-disable-all-checks\"; }; };\n\t\t1A2FB482A3E6213D3D4A3E7FD621B223 /* MBProgressHUD.m in Sources */ = {isa = PBXBuildFile; fileRef = 7760068D6E82C5B3178AAE2F4AE5077F /* MBProgressHUD.m */; settings = {COMPILER_FLAGS = \"-DOS_OBJECT_USE_OBJC=0 -w -Xanalyzer -analyzer-disable-all-checks\"; }; };\n\t\t1ABE644587EF45B66F4870C774952B76 /* UIViewController+ECSlidingViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 3E55085F0B0CDF9F2CCE91BBA6EE793A /* UIViewController+ECSlidingViewController.m */; settings = {COMPILER_FLAGS = \"-w -Xanalyzer -analyzer-disable-all-checks\"; }; };\n\t\t1AFA50D55684463D02F8E9054B7002A3 /* AFURLRequestSerialization.h in Headers */ = {isa = PBXBuildFile; fileRef = 2CD35F59E4CBE95CF21B610F51B616F1 /* AFURLRequestSerialization.h */; settings = {ATTRIBUTES = (Public, ); }; };\n\t\t1B3BFAE8312CD2521EF6A0130D4DB57C /* BTCPaymentRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = C9733F6129706FC99BD70DCCF1D8205C /* BTCPaymentRequest.m */; settings = {COMPILER_FLAGS = \"-w -Xanalyzer -analyzer-disable-all-checks\"; }; };\n\t\t1E528D890E3B32D53D963CE1417BA4D8 /* MBProgressHUD-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 7C2E122DAF7306C3060F8D2A9C22BB8C /* MBProgressHUD-dummy.m */; };\n\t\t1F0CC5B8BD15A6C105E4336740E2A479 /* BTCQRCode.h in Headers */ = {isa = PBXBuildFile; fileRef = 690412BA91917B13E770897731D06BB7 /* BTCQRCode.h */; settings = {ATTRIBUTES = (Public, ); }; };\n\t\t20B9F40C3125BDD7ADF3097D24D116EF /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 041F55AE36E26F3BDCC4B40490B54E30 /* CoreGraphics.framework */; };\n\t\t20D40C3F72AE8EE0AF8C966C16684E89 /* NSData+BTCData.m in Sources */ = {isa = PBXBuildFile; fileRef = 12CCE6386A939D9DA71166D908710B9C /* NSData+BTCData.m */; settings = {COMPILER_FLAGS = \"-w -Xanalyzer -analyzer-disable-all-checks\"; }; };\n\t\t24340BE581B94E9F3F445114BA0D1ADB /* BTCMnemonic.h in Headers */ = {isa = PBXBuildFile; fileRef = E31F05BCCA952C58089CE5F4B3100747 /* BTCMnemonic.h */; settings = {ATTRIBUTES = (Public, ); }; };\n\t\t245717C1FC57C1B1D16BA0772BEBD8F0 /* BTCProcessor.h in Headers */ = {isa = PBXBuildFile; fileRef = A9ADCD48D22F734471E0F198B383FD89 /* BTCProcessor.h */; settings = {ATTRIBUTES = (Public, ); }; };\n\t\t25702E5162C952C6B594FFE731547A91 /* NS+BTCBase58.m in Sources */ = {isa = PBXBuildFile; fileRef = 63F667F34F6BA7AC95672F51C7C43F68 /* NS+BTCBase58.m */; settings = {COMPILER_FLAGS = \"-w -Xanalyzer -analyzer-disable-all-checks\"; }; };\n\t\t2A76DB3CD21C569626495DE7D69D7B0C /* MBProgressHUD.h in Headers */ = {isa = PBXBuildFile; fileRef = 0CF3D23BB4C249819D14682EACF58A20 /* MBProgressHUD.h */; settings = {ATTRIBUTES = (Public, ); }; };\n\t\t2B0F9E99806BD738949E84B0321E7AFA /* AFSecurityPolicy.m in Sources */ = {isa = PBXBuildFile; fileRef = 8356BE9E396A722179392853567A37EA /* AFSecurityPolicy.m */; settings = {COMPILER_FLAGS = \"-w -Xanalyzer -analyzer-disable-all-checks\"; }; };\n\t\t2CF8B3FD52AC07391066E49873D9466A /* UIRefreshControl+AFNetworking.m in Sources */ = {isa = PBXBuildFile; fileRef = 53E5CD5AF49A1DF1C602CA0AF8F193E0 /* UIRefreshControl+AFNetworking.m */; settings = {COMPILER_FLAGS = \"-w -Xanalyzer -analyzer-disable-all-checks\"; }; };\n\t\t326ED1F0E0713623EC9F0CE423BDD8CB /* AFURLConnectionOperation.m in Sources */ = {isa = PBXBuildFile; fileRef = 29D29260D3A74CC78621C240CA01D174 /* AFURLConnectionOperation.m */; settings = {COMPILER_FLAGS = \"-w -Xanalyzer -analyzer-disable-all-checks\"; }; };\n\t\t32E35BA80B04016D6245A608A10F89F9 /* AFURLSessionManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 5F0609F4118E597A2B4F3227118BC524 /* AFURLSessionManager.h */; settings = {ATTRIBUTES = (Public, ); }; };\n\t\t33CA25770C0BF608FA2477B6D6DE9772 /* AFHTTPRequestOperationManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 9E45F943C96D8E3C50638CD8F5242611 /* AFHTTPRequestOperationManager.m */; settings = {COMPILER_FLAGS = \"-w -Xanalyzer -analyzer-disable-all-checks\"; }; };\n\t\t348C724C7F58FCE2528C2AC73F7B2715 /* BTCBlock.m in Sources */ = {isa = PBXBuildFile; fileRef = B97A9F36A6085E05CC3DE6A6255DE266 /* BTCBlock.m */; settings = {COMPILER_FLAGS = \"-w -Xanalyzer -analyzer-disable-all-checks\"; }; };\n\t\t3565BDC634DBEB5B38B97A6EBFBF34D0 /* BTCScript.m in Sources */ = {isa = PBXBuildFile; fileRef = 1838135C726D60B599B0187C2618E0CE /* BTCScript.m */; settings = {COMPILER_FLAGS = \"-w -Xanalyzer -analyzer-disable-all-checks\"; }; };\n\t\t35A862AB2657C5EABD5586FEF96B190A /* BTCEncryptedMessage.h in Headers */ = {isa = PBXBuildFile; fileRef = EFC6330CF2F7403A832A255B87514526 /* BTCEncryptedMessage.h */; settings = {ATTRIBUTES = (Public, ); }; };\n\t\t35B4833012DC1272AF1B6F8CA439271D /* BTCProtocolSerialization.m in Sources */ = {isa = PBXBuildFile; fileRef = 65CBDBDB59EBB0092751843AD8D8FD19 /* BTCProtocolSerialization.m */; settings = {COMPILER_FLAGS = \"-w -Xanalyzer -analyzer-disable-all-checks\"; }; };\n\t\t35C6693F0523DC6C08175448D5489C64 /* BTCKey.m in Sources */ = {isa = PBXBuildFile; fileRef = DD1BF95D5F3408C3AD502AF260E07064 /* BTCKey.m */; settings = {COMPILER_FLAGS = \"-w -Xanalyzer -analyzer-disable-all-checks\"; }; };\n\t\t3712FB4820FD8752713CECA308F710D1 /* RNCryptor.m in Sources */ = {isa = PBXBuildFile; fileRef = 77C390E32B57042D6EB432229D6185E3 /* RNCryptor.m */; settings = {COMPILER_FLAGS = \"-DOS_OBJECT_USE_OBJC=0 -w -Xanalyzer -analyzer-disable-all-checks\"; }; };\n\t\t3725E92E2057625A6E6E66A0CCF382D3 /* RNCryptorEngine.h in Headers */ = {isa = PBXBuildFile; fileRef = A20E7B3C0A2AEA92504DD510002C0866 /* RNCryptorEngine.h */; settings = {ATTRIBUTES = (Public, ); }; };\n\t\t383270E4748A7AADD88328C423AB7203 /* RNCryptorEngine.m in Sources */ = {isa = PBXBuildFile; fileRef = 352152BA99279300977B581B2EB00C09 /* RNCryptorEngine.m */; settings = {COMPILER_FLAGS = \"-DOS_OBJECT_USE_OBJC=0 -w -Xanalyzer -analyzer-disable-all-checks\"; }; };\n\t\t39748F32DA9EF296DEC7F4CF765EC3BD /* MobileCoreServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DF435BBF67523FB6D2633A16438FDB4B /* MobileCoreServices.framework */; };\n\t\t3A1C498D61C2BCFA0AFD99ACF0ADC90F /* CoreBitcoin-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 57871905EF3ECD09DB2CFC0AC6E65998 /* CoreBitcoin-dummy.m */; };\n\t\t3F251DCF6819DFEF3BBE362043E616BE /* BTCPaymentMethodRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = 4A377D007D598717227EAF729E278A45 /* BTCPaymentMethodRequest.h */; settings = {ATTRIBUTES = (Public, ); }; };\n\t\t420942CD3853400DA276BF1614D077B4 /* RNEncryptor.h in Headers */ = {isa = PBXBuildFile; fileRef = 2C957C4D14B6703A4BA7A0A993D265E7 /* RNEncryptor.h */; settings = {ATTRIBUTES = (Public, ); }; };\n\t\t4255364B6480D50C1631F6A4A907ECFA /* BTCAssetType.h in Headers */ = {isa = PBXBuildFile; fileRef = BB84569F42A4339B6E3B32BF28ED4312 /* BTCAssetType.h */; settings = {ATTRIBUTES = (Public, ); }; };\n\t\t42B04D19552FF4EB81A87264ECF323BE /* NS+BTCBase58.h in Headers */ = {isa = PBXBuildFile; fileRef = 2F3D49EDACFA409A3ED119E04C877751 /* NS+BTCBase58.h */; settings = {ATTRIBUTES = (Public, ); }; };\n\t\t42F336F50B984904FE0E1EE52C134183 /* SwiftTryCatch.m in Sources */ = {isa = PBXBuildFile; fileRef = 3D039782643D47B1684BBF43409C2722 /* SwiftTryCatch.m */; settings = {COMPILER_FLAGS = \"-w -Xanalyzer -analyzer-disable-all-checks\"; }; };\n\t\t430483B1C679E190BBC4D7772DDE2D22 /* BTCBlockchainInfo.h in Headers */ = {isa = PBXBuildFile; fileRef = 3F864BF78EBDBA2F6A036E48CFE9A3CD /* BTCBlockchainInfo.h */; settings = {ATTRIBUTES = (Public, ); }; };\n\t\t43BB300A2A1032D80182AB46397BF913 /* AFHTTPSessionManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F56888FEA4A38E48950754C72F65F5D /* AFHTTPSessionManager.h */; settings = {ATTRIBUTES = (Public, ); }; };\n\t\t445F5ECA13DCF76C689BE4C0AE17C04A /* UIProgressView+AFNetworking.h in Headers */ = {isa = PBXBuildFile; fileRef = 68244B055DAD14CE619D3F57E41769AA /* UIProgressView+AFNetworking.h */; settings = {ATTRIBUTES = (Public, ); }; };\n\t\t45F5DA8E9D166F3B195A5A7795E5C6B1 /* BTCPaymentMethodDetails.h in Headers */ = {isa = PBXBuildFile; fileRef = 4EF9CEB2D984F13521541123BAAE96E6 /* BTCPaymentMethodDetails.h */; settings = {ATTRIBUTES = (Public, ); }; };\n\t\t47923CE38B50ED7BE4A8B38FDB17CEF1 /* BTCFancyEncryptedMessage.m in Sources */ = {isa = PBXBuildFile; fileRef = AFF88FAFB575B9864DDB1D5EF0A57352 /* BTCFancyEncryptedMessage.m */; settings = {COMPILER_FLAGS = \"-w -Xanalyzer -analyzer-disable-all-checks\"; }; };\n\t\t4A01CD8DF0113DF24A0FB298349CC037 /* RNOpenSSLEncryptor.m in Sources */ = {isa = PBXBuildFile; fileRef = 6D2899267883132B3DD67CEAB450986D /* RNOpenSSLEncryptor.m */; settings = {COMPILER_FLAGS = \"-DOS_OBJECT_USE_OBJC=0 -w -Xanalyzer -analyzer-disable-all-checks\"; }; };\n\t\t4B689A8DD5ACF97D0073F8383CD30927 /* BTCAddress.m in Sources */ = {isa = PBXBuildFile; fileRef = C729A8AEA733B604A109D4069DA80A85 /* BTCAddress.m */; settings = {COMPILER_FLAGS = \"-w -Xanalyzer -analyzer-disable-all-checks\"; }; };\n\t\t509D8F10DC7BD0265790C450C94228E3 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 041F55AE36E26F3BDCC4B40490B54E30 /* CoreGraphics.framework */; };\n\t\t537B71A840C787F2BD29444155626796 /* SystemConfiguration.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A4A78E5A576CDDF089002FA7301D2AD8 /* SystemConfiguration.framework */; };\n\t\t53D6260BBBF96E677CBF41F6302610BF /* BTCEncryptedBackup.h in Headers */ = {isa = PBXBuildFile; fileRef = 1718A59435B8197A0B82184515F2B686 /* BTCEncryptedBackup.h */; settings = {ATTRIBUTES = (Public, ); }; };\n\t\t54A7671B984D5BB9919DCF16521B4D04 /* BTCAssetAddress.m in Sources */ = {isa = PBXBuildFile; fileRef = C911363C0708D8B364970A9CBE0705ED /* BTCAssetAddress.m */; settings = {COMPILER_FLAGS = \"-w -Xanalyzer -analyzer-disable-all-checks\"; }; };\n\t\t5821419F991E5468B5D78E80C02E58F7 /* BTCTransaction.m in Sources */ = {isa = PBXBuildFile; fileRef = B554C42813D25D9DD0844ED5EE902B51 /* BTCTransaction.m */; settings = {COMPILER_FLAGS = \"-w -Xanalyzer -analyzer-disable-all-checks\"; }; };\n\t\t586B1F7F2090FC7252D69208E47DAE89 /* BTCEncryptedMessage.m in Sources */ = {isa = PBXBuildFile; fileRef = 42D35BBBF2A12BBFDEE2F74DAB712E16 /* BTCEncryptedMessage.m */; settings = {COMPILER_FLAGS = \"-w -Xanalyzer -analyzer-disable-all-checks\"; }; };\n\t\t58E8964CBDF1723615E669E41A4CE48D /* UIAlertView+AFNetworking.h in Headers */ = {isa = PBXBuildFile; fileRef = 42F713ECA87249B899D3B63725BF7054 /* UIAlertView+AFNetworking.h */; settings = {ATTRIBUTES = (Public, ); }; };\n\t\t595986050FEB573B462F5CCE7FCF9CEB /* RNOpenSSLCryptor.h in Headers */ = {isa = PBXBuildFile; fileRef = FC0E563F8C4BE5035B5884917AE8DF84 /* RNOpenSSLCryptor.h */; settings = {ATTRIBUTES = (Public, ); }; };\n\t\t5D4286321A134D3793B9E1556B7C77A9 /* UIWebView+AFNetworking.h in Headers */ = {isa = PBXBuildFile; fileRef = BAEAC286EEA3BFF61C3BCA6C2EBC4DA6 /* UIWebView+AFNetworking.h */; settings = {ATTRIBUTES = (Public, ); }; };\n\t\t6226C424A3D3DCB25AE195D6A143C9D4 /* SwiftBridgingHeader.h in Headers */ = {isa = PBXBuildFile; fileRef = 96380AFFC297F299DA19C48AE5AEDD8D /* SwiftBridgingHeader.h */; settings = {ATTRIBUTES = (Public, ); }; };\n\t\t626F9F02E3DDA7522568A9EDF35F81FB /* BTCSecretSharing.m in Sources */ = {isa = PBXBuildFile; fileRef = 434E2AC4753FC3B4C4D380D2104814D0 /* BTCSecretSharing.m */; settings = {COMPILER_FLAGS = \"-w -Xanalyzer -analyzer-disable-all-checks\"; }; };\n\t\t647229EDD055253FA6757EC15107AC5E /* ECSlidingSegue.m in Sources */ = {isa = PBXBuildFile; fileRef = B833F142C71CA5B8878537DFA143861B /* ECSlidingSegue.m */; settings = {COMPILER_FLAGS = \"-w -Xanalyzer -analyzer-disable-all-checks\"; }; };\n\t\t6499371CA24BA199A06AB1312D7EE427 /* NSData+BTCData.h in Headers */ = {isa = PBXBuildFile; fileRef = 95A4613C6B9FBCC64EF6EF22C9F47FC7 /* NSData+BTCData.h */; settings = {ATTRIBUTES = (Public, ); }; };\n\t\t67170841C6B96D258AC0B2B8F80BFE60 /* BTCTransaction.h in Headers */ = {isa = PBXBuildFile; fileRef = D7A22D5C8F5FF142DC1DBDAEF43AAB32 /* BTCTransaction.h */; settings = {ATTRIBUTES = (Public, ); }; };\n\t\t6722E173965E73AC2C999A1D83D428B8 /* iCloudDocument.h in Headers */ = {isa = PBXBuildFile; fileRef = EE5C77C0D444EFD01AD74D258C5A689E /* iCloudDocument.h */; settings = {ATTRIBUTES = (Public, ); }; };\n\t\t6A1673BDF76642778EFCE362AEBE2E92 /* ECSlidingInteractiveTransition.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B1C1DD9382F2A712DE5C3390237661B /* ECSlidingInteractiveTransition.m */; settings = {COMPILER_FLAGS = \"-w -Xanalyzer -analyzer-disable-all-checks\"; }; };\n\t\t6BD5EDE28C3649FE8B3A69DA2F9BE790 /* BTCChainCom.h in Headers */ = {isa = PBXBuildFile; fileRef = D8C714C7BF1BC16C20D8395180EFA42A /* BTCChainCom.h */; settings = {ATTRIBUTES = (Public, ); }; };\n\t\t6C54D90BE572719CE99009478431D3D3 /* BTCBlindSignature.m in Sources */ = {isa = PBXBuildFile; fileRef = EA81C189B543F410375EB049FBB9A747 /* BTCBlindSignature.m */; settings = {COMPILER_FLAGS = \"-w -Xanalyzer -analyzer-disable-all-checks\"; }; };\n\t\t6D79301A3E7D2E549EB63FE5A28AE9E1 /* BTCPaymentProtocol.m in Sources */ = {isa = PBXBuildFile; fileRef = BBC5E3E7F121A144118750FD582CADD4 /* BTCPaymentProtocol.m */; settings = {COMPILER_FLAGS = \"-w -Xanalyzer -analyzer-disable-all-checks\"; }; };\n\t\t6EC4985682502C9227B1F3602B03E31F /* RNOpenSSLDecryptor.h in Headers */ = {isa = PBXBuildFile; fileRef = 086FA018788251BEDFD6BB13DEA47BF0 /* RNOpenSSLDecryptor.h */; settings = {ATTRIBUTES = (Public, ); }; };\n\t\t703E9B63C6F95FF4E540582694416AC4 /* AFHTTPRequestOperation.h in Headers */ = {isa = PBXBuildFile; fileRef = 9364642FCE9090B4B0743D6604BB999E /* AFHTTPRequestOperation.h */; settings = {ATTRIBUTES = (Public, ); }; };\n\t\t72EE2FC9D1155B9611B0AA35E1F9A14C /* BTCBlindSignature.h in Headers */ = {isa = PBXBuildFile; fileRef = 87BCE824E7678FE5EBEA0235D8330EA7 /* BTCBlindSignature.h */; settings = {ATTRIBUTES = (Public, ); }; };\n\t\t73F1FEDE22FC8035F3E6504F4F055ADA /* BTCProcessor.m in Sources */ = {isa = PBXBuildFile; fileRef = C42A24DCB8F6C6153F837656F7CE9BD4 /* BTCProcessor.m */; settings = {COMPILER_FLAGS = \"-w -Xanalyzer -analyzer-disable-all-checks\"; }; };\n\t\t752C6F3D0845068EC94FB9EC02E7573D /* RNDecryptor.h in Headers */ = {isa = PBXBuildFile; fileRef = 377F632CF03068C430939AB39A2E8535 /* RNDecryptor.h */; settings = {ATTRIBUTES = (Public, ); }; };\n\t\t7629C3F78CCDF54440958B03F34277D2 /* ECSlidingViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 5309C020F5D6D0CE0EDD9B861941DD5D /* ECSlidingViewController.m */; settings = {COMPILER_FLAGS = \"-w -Xanalyzer -analyzer-disable-all-checks\"; }; };\n\t\t76FD10A369B5BFEB4670DF0CFC9EAA4C /* RNDecryptor.m in Sources */ = {isa = PBXBuildFile; fileRef = E1532D7537E9DCCDFAE7FC7D9DE2CFB1 /* RNDecryptor.m */; settings = {COMPILER_FLAGS = \"-DOS_OBJECT_USE_OBJC=0 -w -Xanalyzer -analyzer-disable-all-checks\"; }; };\n\t\t7802D996835772AA41D9D0E80A64B4AE /* BTCKeychain.h in Headers */ = {isa = PBXBuildFile; fileRef = 089AAFE5C34DBDD9395BC21AE2D603F8 /* BTCKeychain.h */; settings = {ATTRIBUTES = (Public, ); }; };\n\t\t781CB81F1FB4E84F94BC28E4123082C5 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0339164673A5C75C5E4018F798CE5EEE /* Foundation.framework */; };\n\t\t78CB570A92A6F8E64A8A510D2451DFE8 /* BTCOutpoint.h in Headers */ = {isa = PBXBuildFile; fileRef = C7A32A3612B56542180436B0E2634C62 /* BTCOutpoint.h */; settings = {ATTRIBUTES = (Public, ); }; };\n\t\t79DE5AD50368A357D2F0FD2FCB10DD3C /* BTCBase58.h in Headers */ = {isa = PBXBuildFile; fileRef = 4C96C3A92DF5389D6DB9B885F78D5F53 /* BTCBase58.h */; settings = {ATTRIBUTES = (Public, ); }; };\n\t\t7AABB96652DE818BC92FC746E97D238E /* BTCPaymentMethodRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = C61EBFEC1B19F3CE875F69A353D28817 /* BTCPaymentMethodRequest.m */; settings = {COMPILER_FLAGS = \"-w -Xanalyzer -analyzer-disable-all-checks\"; }; };\n\t\t7AAD2D06138248CAC70257DEB8D6F21F /* BTCData.m in Sources */ = {isa = PBXBuildFile; fileRef = 3B93B7114FDC5DB79DBEAE265BAF57DD /* BTCData.m */; settings = {COMPILER_FLAGS = \"-w -Xanalyzer -analyzer-disable-all-checks\"; }; };\n\t\t7B2DC61D79AD788C13E3D890887BEDFD /* BTCNetwork.h in Headers */ = {isa = PBXBuildFile; fileRef = 9650B3DD2279978E8859946950D445F1 /* BTCNetwork.h */; settings = {ATTRIBUTES = (Public, ); }; };\n\t\t7C784C11A07442600BAB93AF8705CA4B /* AFHTTPRequestOperationManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 4568221EFCC65F30C8C6DC81E7CFD2A7 /* AFHTTPRequestOperationManager.h */; settings = {ATTRIBUTES = (Public, ); }; };\n\t\t7C8554137249E6F5ECBECB1CFB65BA84 /* AFHTTPSessionManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 121374C01FAF018E3BEC9EEB2D59943B /* AFHTTPSessionManager.m */; settings = {COMPILER_FLAGS = \"-w -Xanalyzer -analyzer-disable-all-checks\"; }; };\n\t\t7CC6AB94B012B7F698F3760ABE918EA1 /* AFURLRequestSerialization.m in Sources */ = {isa = PBXBuildFile; fileRef = CCE41272A0F704855A6FCC02D53B28F2 /* AFURLRequestSerialization.m */; settings = {COMPILER_FLAGS = \"-w -Xanalyzer -analyzer-disable-all-checks\"; }; };\n\t\t7D93D658FCD111BBA6058C4E7100F353 /* BTCKey.h in Headers */ = {isa = PBXBuildFile; fileRef = 27C37E67B87FD50378CB45AD53ECF8A1 /* BTCKey.h */; settings = {ATTRIBUTES = (Public, ); }; };\n\t\t7E50869E45505B9339CC43D70C7F3F82 /* Pods-ArcBit-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 3C7B8558FCB190A36E5966E079FD5ADB /* Pods-ArcBit-dummy.m */; };\n\t\t7F3A2CBC131FC82BB3B839763E458464 /* ECSlidingAnimationController.h in Headers */ = {isa = PBXBuildFile; fileRef = D55C21A4DA43C84D66126C4E8B2B849B /* ECSlidingAnimationController.h */; settings = {ATTRIBUTES = (Public, ); }; };\n\t\t80228E9C445E81624B904D4B4447FBCC /* UIImageView+AFNetworking.m in Sources */ = {isa = PBXBuildFile; fileRef = E16C4C13851021AA94113C6161612852 /* UIImageView+AFNetworking.m */; settings = {COMPILER_FLAGS = \"-w -Xanalyzer -analyzer-disable-all-checks\"; }; };\n\t\t802ABF94483D85AFF49D3E3BCCB1E9F6 /* RNOpenSSLCryptor.m in Sources */ = {isa = PBXBuildFile; fileRef = A168A2B4388152C35F1D86769E4EAA60 /* RNOpenSSLCryptor.m */; settings = {COMPILER_FLAGS = \"-DOS_OBJECT_USE_OBJC=0 -w -Xanalyzer -analyzer-disable-all-checks\"; }; };\n\t\t80F4D884020CDF50276683C502DC3DE7 /* BTCTransactionOutput.h in Headers */ = {isa = PBXBuildFile; fileRef = 3A5E43CCF0C5266E9B11AAFF956E987F /* BTCTransactionOutput.h */; settings = {ATTRIBUTES = (Public, ); }; };\n\t\t819044F465D89EAA92DD03EACCDEA4A5 /* iCloudDocument.m in Sources */ = {isa = PBXBuildFile; fileRef = EC881D364209F7FD4C1AF32EE58E34DF /* iCloudDocument.m */; settings = {COMPILER_FLAGS = \"-w -Xanalyzer -analyzer-disable-all-checks\"; }; };\n\t\t81C9B22D375CAAB1AE8C9808A1DE4F1F /* BTCSignatureHashType.h in Headers */ = {isa = PBXBuildFile; fileRef = EA43B77280DECD1A33C1AD5968C972BE /* BTCSignatureHashType.h */; settings = {ATTRIBUTES = (Public, ); }; };\n\t\t84679E9E865632FA405560CD4F449025 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0339164673A5C75C5E4018F798CE5EEE /* Foundation.framework */; };\n\t\t855C20D4EEA8F047E2CC38ED5235D982 /* AFNetworkReachabilityManager.h in Headers */ = {isa = PBXBuildFile; fileRef = C2A69643473E19463DBD4C2CBDD2D433 /* AFNetworkReachabilityManager.h */; settings = {ATTRIBUTES = (Public, ); }; };\n\t\t859DD51FBF9B75205E80E763CCCCE18F /* Security.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 66EB5B938802F986D305D37865A72F7F /* Security.framework */; };\n\t\t873C3967C51F24DCAA41D56BB98AF5C7 /* ECSlidingViewController.h in Headers */ = {isa = PBXBuildFile; fileRef = B45C1F6CA3469E2F0271992AD57BD4F9 /* ECSlidingViewController.h */; settings = {ATTRIBUTES = (Public, ); }; };\n\t\t878511E19773551A47CDD5B266CDF278 /* UIKit+AFNetworking.h in Headers */ = {isa = PBXBuildFile; fileRef = 1FBEFD9A7C204DC3986D80A4D60BE777 /* UIKit+AFNetworking.h */; settings = {ATTRIBUTES = (Public, ); }; };\n\t\t883953CC89E07E03511C4E64F909B072 /* ECSlidingAnimationController.m in Sources */ = {isa = PBXBuildFile; fileRef = 5404DFC2700BD9442349F21434850E2C /* ECSlidingAnimationController.m */; settings = {COMPILER_FLAGS = \"-w -Xanalyzer -analyzer-disable-all-checks\"; }; };\n\t\t889CE4538EEBA5CEA949577B81E8773D /* iCloud.h in Headers */ = {isa = PBXBuildFile; fileRef = 3ADD9C6C30CB84EF8945D954A71B001A /* iCloud.h */; settings = {ATTRIBUTES = (Public, ); }; };\n\t\t88E06EBB10A5B5ACC1B5953AFB03E63F /* RNOpenSSLDecryptor.m in Sources */ = {isa = PBXBuildFile; fileRef = 9F9301EC57627F0C1E2399EC0A76E243 /* RNOpenSSLDecryptor.m */; settings = {COMPILER_FLAGS = \"-DOS_OBJECT_USE_OBJC=0 -w -Xanalyzer -analyzer-disable-all-checks\"; }; };\n\t\t8A2274B380DC9B94C56DB06A6FC8E8A8 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0339164673A5C75C5E4018F798CE5EEE /* Foundation.framework */; };\n\t\t8BC6AF7DAF07A02563EE41585D1C612E /* AFNetworkActivityIndicatorManager.m in Sources */ = {isa = PBXBuildFile; fileRef = C2BEBCE7EC91C47D3FCD4304B58D772A /* AFNetworkActivityIndicatorManager.m */; settings = {COMPILER_FLAGS = \"-w -Xanalyzer -analyzer-disable-all-checks\"; }; };\n\t\t8C10C78FFECE1774AE050FF15C4FFFEC /* BTCScriptMachine.m in Sources */ = {isa = PBXBuildFile; fileRef = 89E02999252A83B1DD09D82D5BE212AD /* BTCScriptMachine.m */; settings = {COMPILER_FLAGS = \"-w -Xanalyzer -analyzer-disable-all-checks\"; }; };\n\t\t8D1EF92075C2DED260E889B1595C1945 /* BTCFancyEncryptedMessage.h in Headers */ = {isa = PBXBuildFile; fileRef = B2174704DBD9150D7DCAFDB9151E1F23 /* BTCFancyEncryptedMessage.h */; settings = {ATTRIBUTES = (Public, ); }; };\n\t\t8F3C4EE44BD958C90BA2442B5904740B /* Security.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 66EB5B938802F986D305D37865A72F7F /* Security.framework */; };\n\t\t8FAA9F24579BF47D1668F3613C1FF859 /* BTCAddressSubclass.h in Headers */ = {isa = PBXBuildFile; fileRef = 44DB0341C60431BB4374C3C55991A5CB /* BTCAddressSubclass.h */; settings = {ATTRIBUTES = (Public, ); }; };\n\t\t9456381ACE30273EA598C11062AC85D4 /* BTCAssetAddress.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B99F0CCD4DA870000CA786F89DC48F8 /* BTCAssetAddress.h */; settings = {ATTRIBUTES = (Public, ); }; };\n\t\t951E122F9EFF8F6DF2AAF2E80A10630A /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0339164673A5C75C5E4018F798CE5EEE /* Foundation.framework */; };\n\t\t954F7C0E10F8C2CE56E2C1055F9B0464 /* UIImageView+AFNetworking.h in Headers */ = {isa = PBXBuildFile; fileRef = D9D06FF1191C435709EF33B426C39B26 /* UIImageView+AFNetworking.h */; settings = {ATTRIBUTES = (Public, ); }; };\n\t\t967AA2BEC711342F186F76ECE4992959 /* BTCBitcoinURL.m in Sources */ = {isa = PBXBuildFile; fileRef = 30FCC9CDF587ADAAB7152D0F32CB89FE /* BTCBitcoinURL.m */; settings = {COMPILER_FLAGS = \"-w -Xanalyzer -analyzer-disable-all-checks\"; }; };\n\t\t975A2406C8E9F0C131D580E45564BB33 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0339164673A5C75C5E4018F798CE5EEE /* Foundation.framework */; };\n\t\t99B48542BDF0D62B93C109A173C06C1C /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0339164673A5C75C5E4018F798CE5EEE /* Foundation.framework */; };\n\t\t9AABB5CE7A658F06E33179EE830F6FFC /* ECSlidingViewController-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 74787E1420D6C9B560A302F280BF02A1 /* ECSlidingViewController-dummy.m */; };\n\t\t9AB53B08B9F78F6BCEB27E92CA9A4CBB /* ECSlidingConstants.h in Headers */ = {isa = PBXBuildFile; fileRef = 0924252A24518EEBBB6F07378B1D7E97 /* ECSlidingConstants.h */; settings = {ATTRIBUTES = (Public, ); }; };\n\t\t9F8C249A1483DE91049363FAA08268BE /* BTCOpcode.h in Headers */ = {isa = PBXBuildFile; fileRef = F6D20A67853FC64CB48D5804B796D2FB /* BTCOpcode.h */; settings = {ATTRIBUTES = (Public, ); }; };\n\t\t9F988EAC0AD6AC18C8829C4C29C2BDB2 /* AFHTTPRequestOperation.m in Sources */ = {isa = PBXBuildFile; fileRef = 96B5F1776737E149C6B9180F818F6142 /* AFHTTPRequestOperation.m */; settings = {COMPILER_FLAGS = \"-w -Xanalyzer -analyzer-disable-all-checks\"; }; };\n\t\tA046258C9F09492169B34E59059E09C7 /* iCloudDocumentSync-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 62CC634C5A1D2CA241DB09FC5983A4EB /* iCloudDocumentSync-dummy.m */; };\n\t\tA0D11665B6A3AE0AD9DE93EE7EE94B26 /* RNCryptor.h in Headers */ = {isa = PBXBuildFile; fileRef = 0476826279D9BA78EC77A0F08A6BB323 /* RNCryptor.h */; settings = {ATTRIBUTES = (Public, ); }; };\n\t\tA1F30ECE42B2A0E80F83E9F8B111F2B9 /* iCloud.m in Sources */ = {isa = PBXBuildFile; fileRef = 5D67C685F012E5FA93EB001BE1CAB1BC /* iCloud.m */; settings = {COMPILER_FLAGS = \"-w -Xanalyzer -analyzer-disable-all-checks\"; }; };\n\t\tA33158A2B9CA895847D04E04FE8821A3 /* BTCMerkleTree.m in Sources */ = {isa = PBXBuildFile; fileRef = 6047241D1ABED1CB4FC8B6D898F49CF6 /* BTCMerkleTree.m */; settings = {COMPILER_FLAGS = \"-w -Xanalyzer -analyzer-disable-all-checks\"; }; };\n\t\tA53D00487FBF8C6B90199E2121913C7E /* BTCPriceSource.h in Headers */ = {isa = PBXBuildFile; fileRef = A000205D1D6B3E430777942746A5B94A /* BTCPriceSource.h */; settings = {ATTRIBUTES = (Public, ); }; };\n\t\tA82F06B0ABADDD7974F4A2B0443CA55A /* SwiftTryCatch-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = FD9524F0561C442A329DE75E81B81703 /* SwiftTryCatch-dummy.m */; };\n\t\tA8A3B2C64198773A05404BC4110D48D2 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0339164673A5C75C5E4018F798CE5EEE /* Foundation.framework */; };\n\t\tA9123D7430F57667814B9ADD1C6C65DE /* BTCScriptMachine.h in Headers */ = {isa = PBXBuildFile; fileRef = C87CCBA3F0290D5EBEEB8DB82D82F51E /* BTCScriptMachine.h */; settings = {ATTRIBUTES = (Public, ); }; };\n\t\tA9FD4431D55C25D7BBD237BA852CC3FE /* AFNetworking-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 43EDF1C1707F51979A1302FA4E5276F0 /* AFNetworking-dummy.m */; };\n\t\tAB1BF45C84ABAEC60501F1E5A8EA2FA3 /* ISO8601DateFormatter-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 61342CD14721855E2FECE1958B04830C /* ISO8601DateFormatter-dummy.m */; };\n\t\tAB442D86946A509A1540E1FDED570E10 /* UIProgressView+AFNetworking.m in Sources */ = {isa = PBXBuildFile; fileRef = C8AF3F91C4917482FF1BA8914FDE387D /* UIProgressView+AFNetworking.m */; settings = {COMPILER_FLAGS = \"-w -Xanalyzer -analyzer-disable-all-checks\"; }; };\n\t\tADABDAE6782A26191C6DE6AFB7A5430B /* AFURLResponseSerialization.m in Sources */ = {isa = PBXBuildFile; fileRef = 0FB93F75E4E0071746ED64537EFC4997 /* AFURLResponseSerialization.m */; settings = {COMPILER_FLAGS = \"-w -Xanalyzer -analyzer-disable-all-checks\"; }; };\n\t\tB0BE66A653BA991C0849C6DB4118F6FA /* BTCOutpoint.m in Sources */ = {isa = PBXBuildFile; fileRef = 9626DC346A3B691120AB218DAF98FFA9 /* BTCOutpoint.m */; settings = {COMPILER_FLAGS = \"-w -Xanalyzer -analyzer-disable-all-checks\"; }; };\n\t\tB0DED169B439A00C5DD660BE0961A3CE /* BTCData.h in Headers */ = {isa = PBXBuildFile; fileRef = FB53040695B96B39AD19A7151B4883CE /* BTCData.h */; settings = {ATTRIBUTES = (Public, ); }; };\n\t\tB280D43B5E9C2BC556D25E73B7753AC1 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 51EEF5F6B8DF9CB28A3362570D60C5A5 /* UIKit.framework */; };\n\t\tB540E876246FD909EFFCEA961F82328C /* AFNetworking.h in Headers */ = {isa = PBXBuildFile; fileRef = 28278C788A134E52C4356F7B82ABBD94 /* AFNetworking.h */; settings = {ATTRIBUTES = (Public, ); }; };\n\t\tB5DBBD48AC09BCC2FC83748E985F9532 /* BTCCurrencyConverter.m in Sources */ = {isa = PBXBuildFile; fileRef = 017F79965309247B464A2E9077300F40 /* BTCCurrencyConverter.m */; settings = {COMPILER_FLAGS = \"-w -Xanalyzer -analyzer-disable-all-checks\"; }; };\n\t\tB7FD63B62F96D57A2187CDA0A5443EE2 /* BTCPaymentProtocol.h in Headers */ = {isa = PBXBuildFile; fileRef = B18465F66373770B44A93F9034E18367 /* BTCPaymentProtocol.h */; settings = {ATTRIBUTES = (Public, ); }; };\n\t\tB8C6586433AA5D733F2E19AC5D9F3734 /* UIWebView+AFNetworking.m in Sources */ = {isa = PBXBuildFile; fileRef = BB772DB5DEFC30852E5E37587F7E92B9 /* UIWebView+AFNetworking.m */; settings = {COMPILER_FLAGS = \"-w -Xanalyzer -analyzer-disable-all-checks\"; }; };\n\t\tB9CDE30C88938E380047B1DF3F26598E /* ECSlidingInteractiveTransition.h in Headers */ = {isa = PBXBuildFile; fileRef = 558C53E6690D240D8391051E6C6F2715 /* ECSlidingInteractiveTransition.h */; settings = {ATTRIBUTES = (Public, ); }; };\n\t\tBBC4CE4A8BC2CBC7856BE4DE2C335E64 /* BTCPaymentMethod.h in Headers */ = {isa = PBXBuildFile; fileRef = F8405D294AF2648DD4B391F32C841BEE /* BTCPaymentMethod.h */; settings = {ATTRIBUTES = (Public, ); }; };\n\t\tBE16FE811764F2596E895B8FB25E2CD7 /* SwiftTryCatch.h in Headers */ = {isa = PBXBuildFile; fileRef = 646CE467706A99D849BC06AD80712EEA /* SwiftTryCatch.h */; settings = {ATTRIBUTES = (Public, ); }; };\n\t\tBEDFEBEA24B3EEB7948CF0FB78750252 /* BTCBigNumber.m in Sources */ = {isa = PBXBuildFile; fileRef = 0BFFDEA2254275342E5FF37F820ADDD5 /* BTCBigNumber.m */; settings = {COMPILER_FLAGS = \"-w -Xanalyzer -analyzer-disable-all-checks\"; }; };\n\t\tC22B29392E1960E2C9C1DF9241F5BFA3 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0339164673A5C75C5E4018F798CE5EEE /* Foundation.framework */; };\n\t\tC5CC1F1711CD265143B3743D22D840FE /* BTCOpcode.m in Sources */ = {isa = PBXBuildFile; fileRef = 7F12F0EBD217A110BB685C0DBE6467D8 /* BTCOpcode.m */; settings = {COMPILER_FLAGS = \"-w -Xanalyzer -analyzer-disable-all-checks\"; }; };\n\t\tC89DBBDAF9A3D73B7A41B3D2B78B64E6 /* BTCSecretSharing.h in Headers */ = {isa = PBXBuildFile; fileRef = BB4D26C1A6EA1B06BA0DC6FC6868819E /* BTCSecretSharing.h */; settings = {ATTRIBUTES = (Public, ); }; };\n\t\tC9A5E72B88F6C598BEF99EF7309A862B /* AFSecurityPolicy.h in Headers */ = {isa = PBXBuildFile; fileRef = E2AD746BF57A2CB6FDED0CCC90C5C168 /* AFSecurityPolicy.h */; settings = {ATTRIBUTES = (Public, ); }; };\n\t\tCA62DEC350EAE00A5AB3D18E75945C9A /* BTCNetwork.m in Sources */ = {isa = PBXBuildFile; fileRef = B59ED59D5803800B0CA89062A2A1F7D0 /* BTCNetwork.m */; settings = {COMPILER_FLAGS = \"-w -Xanalyzer -analyzer-disable-all-checks\"; }; };\n\t\tCAB2B38F6729721638C81EC9B64DBD21 /* BTCProtocolSerialization.h in Headers */ = {isa = PBXBuildFile; fileRef = F568238E9326CC0D3B37BEF8378E4C82 /* BTCProtocolSerialization.h */; settings = {ATTRIBUTES = (Public, ); }; };\n\t\tCEED7472F8FC605AD235BF4FCA241966 /* BTCTransactionOutput.m in Sources */ = {isa = PBXBuildFile; fileRef = B6BD8C2B2FC7CB2FB94E4CBDC564F1FF /* BTCTransactionOutput.m */; settings = {COMPILER_FLAGS = \"-w -Xanalyzer -analyzer-disable-all-checks\"; }; };\n\t\tCF9555AA6F9EF0F2879F75A0965C72F6 /* AFNetworkActivityIndicatorManager.h in Headers */ = {isa = PBXBuildFile; fileRef = B1CE3678138E27EC67C9349F00D257D9 /* AFNetworkActivityIndicatorManager.h */; settings = {ATTRIBUTES = (Public, ); }; };\n\t\tD1EF67C72114BB63F52B4E4E11B80584 /* BTCAssetType.m in Sources */ = {isa = PBXBuildFile; fileRef = FF0C86D39502ED60A92229C781A07E0A /* BTCAssetType.m */; settings = {COMPILER_FLAGS = \"-w -Xanalyzer -analyzer-disable-all-checks\"; }; };\n\t\tD25A3B9F2BA3F46E4ABE55B955D1183A /* BTCAssetID.h in Headers */ = {isa = PBXBuildFile; fileRef = A6A1BC3EA56D44A5C7D47A4D4BE6D6C1 /* BTCAssetID.h */; settings = {ATTRIBUTES = (Public, ); }; };\n\t\tD25C21ACE546B34346D1737F1CFBDC7F /* BTCEncryptedBackup.m in Sources */ = {isa = PBXBuildFile; fileRef = 2646D482FE67F1BEE2AE9985DB65515A /* BTCEncryptedBackup.m */; settings = {COMPILER_FLAGS = \"-w -Xanalyzer -analyzer-disable-all-checks\"; }; };\n\t\tD2C799E29FDF5FAB930AFC9FC4F13721 /* BTCTransactionInput.m in Sources */ = {isa = PBXBuildFile; fileRef = D1FDC11EFD0999FB02A7A5DA414F0510 /* BTCTransactionInput.m */; settings = {COMPILER_FLAGS = \"-w -Xanalyzer -analyzer-disable-all-checks\"; }; };\n\t\tD33D2587D2E6EA01640AFF29B73C757A /* AFURLConnectionOperation.h in Headers */ = {isa = PBXBuildFile; fileRef = 9FFC430C65EB18FB1AEC5CF6E37B386C /* AFURLConnectionOperation.h */; settings = {ATTRIBUTES = (Public, ); }; };\n\t\tD384661A33EE8416A2667D92566B33AE /* BTCProtocolBuffers.m in Sources */ = {isa = PBXBuildFile; fileRef = 26C7B8D80607F689138B7DFCF624B44B /* BTCProtocolBuffers.m */; settings = {COMPILER_FLAGS = \"-w -Xanalyzer -analyzer-disable-all-checks\"; }; };\n\t\tD384707B744185C31112BBAE7F90B297 /* BTCBlockHeader.m in Sources */ = {isa = PBXBuildFile; fileRef = F16B27940C786A4316DB279ACDB3A787 /* BTCBlockHeader.m */; settings = {COMPILER_FLAGS = \"-w -Xanalyzer -analyzer-disable-all-checks\"; }; };\n\t\tD44E55A05A97D1E37FB71339B4AC7B4E /* BTCPriceSource.m in Sources */ = {isa = PBXBuildFile; fileRef = 1B1CDD72CE112D023028FE9320538937 /* BTCPriceSource.m */; settings = {COMPILER_FLAGS = \"-w -Xanalyzer -analyzer-disable-all-checks\"; }; };\n\t\tD7AFD7184C524FC055E3DB126BFC62D8 /* BTCNumberFormatter.m in Sources */ = {isa = PBXBuildFile; fileRef = 6A9A6A5FB261FE3C10784D378B8B002C /* BTCNumberFormatter.m */; settings = {COMPILER_FLAGS = \"-w -Xanalyzer -analyzer-disable-all-checks\"; }; };\n\t\tD9758C77FBD6C7FFBA25F1F374BED021 /* RNCryptor+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = 5192085BDE9AC6B1FA6A8EAF03B471CB /* RNCryptor+Private.h */; settings = {ATTRIBUTES = (Public, ); }; };\n\t\tDC40240C8B2BD0EC14ED12D998F25E40 /* BTCScript.h in Headers */ = {isa = PBXBuildFile; fileRef = 91230138A41D4BB01490A0AA930B1847 /* BTCScript.h */; settings = {ATTRIBUTES = (Public, ); }; };\n\t\tDCCF815B8E5017ECB8B4C96BB900BBAE /* ISO8601DateFormatter.m in Sources */ = {isa = PBXBuildFile; fileRef = B9E969F69B4903AF8C3874528CD70FAC /* ISO8601DateFormatter.m */; settings = {COMPILER_FLAGS = \"-fno-objc-arc -w -Xanalyzer -analyzer-disable-all-checks\"; }; };\n\t\tDE012E6BB5B7386D052CF3DAA83350C6 /* UIViewController+ECSlidingViewController.h in Headers */ = {isa = PBXBuildFile; fileRef = 1C8BA2567941B54A71EE197BA8A4079A /* UIViewController+ECSlidingViewController.h */; settings = {ATTRIBUTES = (Public, ); }; };\n\t\tDE43D6C2477683783C3FEEC44270B842 /* CoreBitcoin+Categories.h in Headers */ = {isa = PBXBuildFile; fileRef = B470DC06AA1DABE32AD454CA5ECDF951 /* CoreBitcoin+Categories.h */; settings = {ATTRIBUTES = (Public, ); }; };\n\t\tDE63F2C9384437A0214162A2F60C4806 /* ECSlidingSegue.h in Headers */ = {isa = PBXBuildFile; fileRef = 69A9C1ADE6FD1FE80CF9D2E4BDFBF206 /* ECSlidingSegue.h */; settings = {ATTRIBUTES = (Public, ); }; };\n\t\tDE65A6303963E2F1136A6DA5A00832D6 /* BTCBase58.m in Sources */ = {isa = PBXBuildFile; fileRef = 7C2EDB5624A05C547A02BC8C55F247A5 /* BTCBase58.m */; settings = {COMPILER_FLAGS = \"-w -Xanalyzer -analyzer-disable-all-checks\"; }; };\n\t\tE088DCD5DC607F8EF82B333F0F84C1D9 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0339164673A5C75C5E4018F798CE5EEE /* Foundation.framework */; };\n\t\tE092263BCFEA05A5FBBA32A6E418E4C8 /* BTCPaymentMethodDetails.m in Sources */ = {isa = PBXBuildFile; fileRef = 7DC1F65ABDA3897DA8A4BDA87AD43983 /* BTCPaymentMethodDetails.m */; settings = {COMPILER_FLAGS = \"-w -Xanalyzer -analyzer-disable-all-checks\"; }; };\n\t\tE190879397FF5CCFED353FDB69D4775D /* UIRefreshControl+AFNetworking.h in Headers */ = {isa = PBXBuildFile; fileRef = 8772768A16B56345E6A2800163C1FE10 /* UIRefreshControl+AFNetworking.h */; settings = {ATTRIBUTES = (Public, ); }; };\n\t\tE1E2F244CC9732834EECE8B7E912A9C9 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0339164673A5C75C5E4018F798CE5EEE /* Foundation.framework */; };\n\t\tE4243E10E866A1F3EBB3AFD2E74B12EF /* UIAlertView+AFNetworking.m in Sources */ = {isa = PBXBuildFile; fileRef = A178C0870C61FF73F641C3CB1815D30E /* UIAlertView+AFNetworking.m */; settings = {COMPILER_FLAGS = \"-w -Xanalyzer -analyzer-disable-all-checks\"; }; };\n\t\tE5718AB049F7D66E23189FDBA44DCDFF /* UIActivityIndicatorView+AFNetworking.m in Sources */ = {isa = PBXBuildFile; fileRef = 8391F9908A82B5F80CB1FD12E0FA8B57 /* UIActivityIndicatorView+AFNetworking.m */; settings = {COMPILER_FLAGS = \"-w -Xanalyzer -analyzer-disable-all-checks\"; }; };\n\t\tE57A1948664A11CA074AE6E0191B0E31 /* BTCMerkleTree.h in Headers */ = {isa = PBXBuildFile; fileRef = 1F2D66D912FC659A8835B1A1A425B343 /* BTCMerkleTree.h */; settings = {ATTRIBUTES = (Public, ); }; };\n\t\tE61F98BAE61B94EAA909B9DA9944D06C /* BTCCurrencyConverter.h in Headers */ = {isa = PBXBuildFile; fileRef = 4E1EC27FE9E74D31E3DD4E4E322CCC2E /* BTCCurrencyConverter.h */; settings = {ATTRIBUTES = (Public, ); }; };\n\t\tE76F1CFB7B7B72A680BF96CA21771AD5 /* AFNetworkReachabilityManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 79A8293A1A2EFC4F61BFA16C220483F5 /* AFNetworkReachabilityManager.m */; settings = {COMPILER_FLAGS = \"-w -Xanalyzer -analyzer-disable-all-checks\"; }; };\n\t\tE7BD540E4EBDF447FFD36628948F7223 /* BTC256.m in Sources */ = {isa = PBXBuildFile; fileRef = 69071EF28C446FEBFCE2C0CF435D3368 /* BTC256.m */; settings = {COMPILER_FLAGS = \"-w -Xanalyzer -analyzer-disable-all-checks\"; }; };\n\t\tE8A6A04892C16348FD47638B5A31FD14 /* BTCBlockchainInfo.m in Sources */ = {isa = PBXBuildFile; fileRef = 8196BF2515D56AC87BEF5AEE87C80E55 /* BTCBlockchainInfo.m */; settings = {COMPILER_FLAGS = \"-w -Xanalyzer -analyzer-disable-all-checks\"; }; };\n\t\tEA00E7CC8BF8CA943164835038A371F2 /* BTCQRCode.m in Sources */ = {isa = PBXBuildFile; fileRef = 968EFFBB3C5DC12A819A7C6737A00736 /* BTCQRCode.m */; settings = {COMPILER_FLAGS = \"-w -Xanalyzer -analyzer-disable-all-checks\"; }; };\n\t\tEC5F72000E1FD57E70A455530E8829DF /* BTCErrors.m in Sources */ = {isa = PBXBuildFile; fileRef = DCF6A717A51C3C0946DDEA0D7D8BEE81 /* BTCErrors.m */; settings = {COMPILER_FLAGS = \"-w -Xanalyzer -analyzer-disable-all-checks\"; }; };\n\t\tECFDFF0308DB9F3A389630DBB041D5EF /* BTCHashID.h in Headers */ = {isa = PBXBuildFile; fileRef = FD35C580497BEF40D1F81DDF8E1D31AA /* BTCHashID.h */; settings = {ATTRIBUTES = (Public, ); }; };\n\t\tEE37E7B155A3E1E4922C32283FFABC57 /* BTCMnemonic.m in Sources */ = {isa = PBXBuildFile; fileRef = 3406E2490301E48E8A2EC1D254072CEA /* BTCMnemonic.m */; settings = {COMPILER_FLAGS = \"-w -Xanalyzer -analyzer-disable-all-checks\"; }; };\n\t\tEEF753999C04ECFFE4A096E4DCE59AB4 /* BTC256.h in Headers */ = {isa = PBXBuildFile; fileRef = 2AD3ACEC341CE91CA7C6D7BD0338799E /* BTC256.h */; settings = {ATTRIBUTES = (Public, ); }; };\n\t\tEFF49AA820D604CC6F085F1E2EB0C1D8 /* ECPercentDrivenInteractiveTransition.h in Headers */ = {isa = PBXBuildFile; fileRef = 44A27D79184E550B8BF16D43686B8103 /* ECPercentDrivenInteractiveTransition.h */; settings = {ATTRIBUTES = (Public, ); }; };\n\t\tF079D3C7B35BC88DA3766E9F9AC35E05 /* BTCChainCom.m in Sources */ = {isa = PBXBuildFile; fileRef = DC64E521585461F733BA6C7573F04688 /* BTCChainCom.m */; settings = {COMPILER_FLAGS = \"-w -Xanalyzer -analyzer-disable-all-checks\"; }; };\n\t\tF6D7642095D512371C491D465EF322AA /* BTCProtocolBuffers.h in Headers */ = {isa = PBXBuildFile; fileRef = E7F2FEB9A355554BC2921B4EE554595C /* BTCProtocolBuffers.h */; settings = {ATTRIBUTES = (Public, ); }; };\n\t\tF90421708CDF41D1A389C1692A745BDA /* UIActivityIndicatorView+AFNetworking.h in Headers */ = {isa = PBXBuildFile; fileRef = 6851FCE26E0D26FC7F04E48221F849F3 /* UIActivityIndicatorView+AFNetworking.h */; settings = {ATTRIBUTES = (Public, ); }; };\n\t\tF96A4D6B92354C0AB1A24DE1B4768525 /* UIButton+AFNetworking.m in Sources */ = {isa = PBXBuildFile; fileRef = 5925F50312D0A8BEB719D583F0821D7B /* UIButton+AFNetworking.m */; settings = {COMPILER_FLAGS = \"-w -Xanalyzer -analyzer-disable-all-checks\"; }; };\n\t\tFB10C1C2137B39DB065E7A1652643D6B /* BTCUnitsAndLimits.h in Headers */ = {isa = PBXBuildFile; fileRef = 322C51259AC52C0C48070FD85C261611 /* BTCUnitsAndLimits.h */; settings = {ATTRIBUTES = (Public, ); }; };\n\t\tFBEB3BF44D1452F22F56F989223836D0 /* BTCBitcoinURL.h in Headers */ = {isa = PBXBuildFile; fileRef = 5C89DBB9475C49B2C4060DA2E950D5E7 /* BTCBitcoinURL.h */; settings = {ATTRIBUTES = (Public, ); }; };\n\t\tFC4972E1DBD1E67D32CEBEEAAB40097B /* Pods-ArcBitTests-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 7AA49E143F51A3A76A36CABB822D4FF0 /* Pods-ArcBitTests-dummy.m */; };\n\t\tFC6E03285B04C54F69730688CAAC0D9E /* CoreBitcoin.h in Headers */ = {isa = PBXBuildFile; fileRef = ABBE05FC6756637067D69B4F0FFA9ECA /* CoreBitcoin.h */; settings = {ATTRIBUTES = (Public, ); }; };\n\t\tFC71F8B5DB7BE6CE6B7764F7633874F6 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 51EEF5F6B8DF9CB28A3362570D60C5A5 /* UIKit.framework */; };\n\t\tFCBA068EA500BF863D8BEA750013C556 /* RNEncryptor.m in Sources */ = {isa = PBXBuildFile; fileRef = 29F7F962821125C98A8EF5A3391F621E /* RNEncryptor.m */; settings = {COMPILER_FLAGS = \"-DOS_OBJECT_USE_OBJC=0 -w -Xanalyzer -analyzer-disable-all-checks\"; }; };\n\t\tFE2E83CD66CF8756DE3FEB860AA95451 /* BTCCurvePoint.m in Sources */ = {isa = PBXBuildFile; fileRef = 6710354228A5BD574ADD2F8D380B870D /* BTCCurvePoint.m */; settings = {COMPILER_FLAGS = \"-w -Xanalyzer -analyzer-disable-all-checks\"; }; };\n\t\tFE83FD4E2DEBD021BB2015284222F5A5 /* BTCCurvePoint.h in Headers */ = {isa = PBXBuildFile; fileRef = DD0F8319781C1EA6BBB11ECBBB3770CB /* BTCCurvePoint.h */; settings = {ATTRIBUTES = (Public, ); }; };\n\t\tFEB67C86EEEF5CC9798F2CE50F95ED5D /* BTCErrors.h in Headers */ = {isa = PBXBuildFile; fileRef = 98A575A1E3AB80D19F4D6090B6293DE2 /* BTCErrors.h */; settings = {ATTRIBUTES = (Public, ); }; };\n\t\tFFF389C534ED2E415A9758DB60E683E9 /* BTCPaymentMethod.m in Sources */ = {isa = PBXBuildFile; fileRef = 622300290A134A91440F8B954658F57D /* BTCPaymentMethod.m */; settings = {COMPILER_FLAGS = \"-w -Xanalyzer -analyzer-disable-all-checks\"; }; };\n/* End PBXBuildFile section */\n\n/* Begin PBXContainerItemProxy section */\n\t\t02B4C3006549A5F5FBC0C2ECC039BAD3 /* PBXContainerItemProxy */ = {\n\t\t\tisa = PBXContainerItemProxy;\n\t\t\tcontainerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */;\n\t\t\tproxyType = 1;\n\t\t\tremoteGlobalIDString = BEB51D76802E141334901771706C647B;\n\t\t\tremoteInfo = ECSlidingViewController;\n\t\t};\n\t\t0756CE71FBE771F1A5EDE9158878BD81 /* PBXContainerItemProxy */ = {\n\t\t\tisa = PBXContainerItemProxy;\n\t\t\tcontainerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */;\n\t\t\tproxyType = 1;\n\t\t\tremoteGlobalIDString = 175B076ED45EB1A3E40F58BA14036467;\n\t\t\tremoteInfo = MBProgressHUD;\n\t\t};\n\t\t1B487A0635704E849C8AC5BEA185C5B6 /* PBXContainerItemProxy */ = {\n\t\t\tisa = PBXContainerItemProxy;\n\t\t\tcontainerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */;\n\t\t\tproxyType = 1;\n\t\t\tremoteGlobalIDString = BEB51D76802E141334901771706C647B;\n\t\t\tremoteInfo = ECSlidingViewController;\n\t\t};\n\t\t24BF18FC6F1FC071726CE1E571FBD6DA /* PBXContainerItemProxy */ = {\n\t\t\tisa = PBXContainerItemProxy;\n\t\t\tcontainerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */;\n\t\t\tproxyType = 1;\n\t\t\tremoteGlobalIDString = C95C45974D77E3E41FE9D2A80E093179;\n\t\t\tremoteInfo = AFNetworking;\n\t\t};\n\t\t2D71254E9FD8641F03AC6CE6CDD806CF /* PBXContainerItemProxy */ = {\n\t\t\tisa = PBXContainerItemProxy;\n\t\t\tcontainerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */;\n\t\t\tproxyType = 1;\n\t\t\tremoteGlobalIDString = 175B076ED45EB1A3E40F58BA14036467;\n\t\t\tremoteInfo = MBProgressHUD;\n\t\t};\n\t\t5C7D4058BFC8EA724EBDC31863972673 /* PBXContainerItemProxy */ = {\n\t\t\tisa = PBXContainerItemProxy;\n\t\t\tcontainerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */;\n\t\t\tproxyType = 1;\n\t\t\tremoteGlobalIDString = A304F12938B16D7A06DD6F400F2D6BB3;\n\t\t\tremoteInfo = ISO8601DateFormatter;\n\t\t};\n\t\t5CB5903F2504899CD3D5CAE83587C34D /* PBXContainerItemProxy */ = {\n\t\t\tisa = PBXContainerItemProxy;\n\t\t\tcontainerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */;\n\t\t\tproxyType = 1;\n\t\t\tremoteGlobalIDString = C95C45974D77E3E41FE9D2A80E093179;\n\t\t\tremoteInfo = AFNetworking;\n\t\t};\n\t\t6CCFF24865BC21042DC33A14625B0832 /* PBXContainerItemProxy */ = {\n\t\t\tisa = PBXContainerItemProxy;\n\t\t\tcontainerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */;\n\t\t\tproxyType = 1;\n\t\t\tremoteGlobalIDString = 40B1A5C3F290E95B1A39D3AF787E585B;\n\t\t\tremoteInfo = SwiftTryCatch;\n\t\t};\n\t\t8382A0950CCA9D4C3565836FF7EEBC37 /* PBXContainerItemProxy */ = {\n\t\t\tisa = PBXContainerItemProxy;\n\t\t\tcontainerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */;\n\t\t\tproxyType = 1;\n\t\t\tremoteGlobalIDString = 0D3093725F52C8DFE9122BC462A57151;\n\t\t\tremoteInfo = RNCryptor;\n\t\t};\n\t\t91E1B99AA491EFF4FBBCC4955B04D281 /* PBXContainerItemProxy */ = {\n\t\t\tisa = PBXContainerItemProxy;\n\t\t\tcontainerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */;\n\t\t\tproxyType = 1;\n\t\t\tremoteGlobalIDString = F22893DE3DF8BB3D4B08876F2BD089FB;\n\t\t\tremoteInfo = iCloudDocumentSync;\n\t\t};\n\t\t96804C20412BA2238B3E0E7479D84A26 /* PBXContainerItemProxy */ = {\n\t\t\tisa = PBXContainerItemProxy;\n\t\t\tcontainerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */;\n\t\t\tproxyType = 1;\n\t\t\tremoteGlobalIDString = 39C35849B6F0D7D6AFDE54696486045C;\n\t\t\tremoteInfo = CoreBitcoin;\n\t\t};\n\t\t9F3F7B3318D693C2C6EE1363940704BF /* PBXContainerItemProxy */ = {\n\t\t\tisa = PBXContainerItemProxy;\n\t\t\tcontainerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */;\n\t\t\tproxyType = 1;\n\t\t\tremoteGlobalIDString = A304F12938B16D7A06DD6F400F2D6BB3;\n\t\t\tremoteInfo = ISO8601DateFormatter;\n\t\t};\n\t\tB0CD0E3596CF1692EA6E158D1BE0E1BC /* PBXContainerItemProxy */ = {\n\t\t\tisa = PBXContainerItemProxy;\n\t\t\tcontainerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */;\n\t\t\tproxyType = 1;\n\t\t\tremoteGlobalIDString = 40B1A5C3F290E95B1A39D3AF787E585B;\n\t\t\tremoteInfo = SwiftTryCatch;\n\t\t};\n\t\tC8061DBCAC6429677FAD2110D861784F /* PBXContainerItemProxy */ = {\n\t\t\tisa = PBXContainerItemProxy;\n\t\t\tcontainerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */;\n\t\t\tproxyType = 1;\n\t\t\tremoteGlobalIDString = 39C35849B6F0D7D6AFDE54696486045C;\n\t\t\tremoteInfo = CoreBitcoin;\n\t\t};\n\t\tE7076D669FCD9C77F9173FA9F34D48BC /* PBXContainerItemProxy */ = {\n\t\t\tisa = PBXContainerItemProxy;\n\t\t\tcontainerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */;\n\t\t\tproxyType = 1;\n\t\t\tremoteGlobalIDString = F22893DE3DF8BB3D4B08876F2BD089FB;\n\t\t\tremoteInfo = iCloudDocumentSync;\n\t\t};\n\t\tEB20605EB2C6DCA7CC400059002EE70A /* PBXContainerItemProxy */ = {\n\t\t\tisa = PBXContainerItemProxy;\n\t\t\tcontainerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */;\n\t\t\tproxyType = 1;\n\t\t\tremoteGlobalIDString = A304F12938B16D7A06DD6F400F2D6BB3;\n\t\t\tremoteInfo = ISO8601DateFormatter;\n\t\t};\n\t\tF93551B8259E4EF0588E98C760B8EAA3 /* PBXContainerItemProxy */ = {\n\t\t\tisa = PBXContainerItemProxy;\n\t\t\tcontainerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */;\n\t\t\tproxyType = 1;\n\t\t\tremoteGlobalIDString = 0D3093725F52C8DFE9122BC462A57151;\n\t\t\tremoteInfo = RNCryptor;\n\t\t};\n/* End PBXContainerItemProxy section */\n\n/* Begin PBXFileReference section */\n\t\t000BDDC2887EEE808ED91C33C9776E40 /* lhash.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = lhash.h; path = \"include-ios/openssl/lhash.h\"; sourceTree = \"<group>\"; };\n\t\t00A9559B55632C1E546506597C9ABC6F /* krb5_asn.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = krb5_asn.h; path = \"include-ios/openssl/krb5_asn.h\"; sourceTree = \"<group>\"; };\n\t\t00AA359394CF66727650039AA54B2A3F /* cast.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = cast.h; path = \"include-ios/openssl/cast.h\"; sourceTree = \"<group>\"; };\n\t\t015D33DA0A24A1EAB57EE31E61547980 /* ISO8601DateFormatter-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = \"ISO8601DateFormatter-prefix.pch\"; sourceTree = \"<group>\"; };\n\t\t017F79965309247B464A2E9077300F40 /* BTCCurrencyConverter.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = BTCCurrencyConverter.m; path = CoreBitcoin/BTCCurrencyConverter.m; sourceTree = \"<group>\"; };\n\t\t0339164673A5C75C5E4018F798CE5EEE /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.3.sdk/System/Library/Frameworks/Foundation.framework; sourceTree = DEVELOPER_DIR; };\n\t\t03396FC46CC1A160AD8A1D387D870489 /* MBProgressHUD-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = \"MBProgressHUD-prefix.pch\"; sourceTree = \"<group>\"; };\n\t\t036EE094EFA5F18B03345F27C4D328B5 /* ripemd.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = ripemd.h; path = \"include-ios/openssl/ripemd.h\"; sourceTree = \"<group>\"; };\n\t\t041F55AE36E26F3BDCC4B40490B54E30 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.3.sdk/System/Library/Frameworks/CoreGraphics.framework; sourceTree = DEVELOPER_DIR; };\n\t\t0476826279D9BA78EC77A0F08A6BB323 /* RNCryptor.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = RNCryptor.h; path = RNCryptor/RNCryptor.h; sourceTree = \"<group>\"; };\n\t\t078A8262CC92D7CC54EEE28F4F6886B4 /* Pods-ArcBitTests-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = \"Pods-ArcBitTests-acknowledgements.markdown\"; sourceTree = \"<group>\"; };\n\t\t086FA018788251BEDFD6BB13DEA47BF0 /* RNOpenSSLDecryptor.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = RNOpenSSLDecryptor.h; path = RNCryptor/RNOpenSSLDecryptor.h; sourceTree = \"<group>\"; };\n\t\t089AAFE5C34DBDD9395BC21AE2D603F8 /* BTCKeychain.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = BTCKeychain.h; path = CoreBitcoin/BTCKeychain.h; sourceTree = \"<group>\"; };\n\t\t08B5BDDC0B3AFB71C534E71106C76640 /* RNCryptor.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = RNCryptor.xcconfig; sourceTree = \"<group>\"; };\n\t\t0924252A24518EEBBB6F07378B1D7E97 /* ECSlidingConstants.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = ECSlidingConstants.h; path = ECSlidingViewController/ECSlidingConstants.h; sourceTree = \"<group>\"; };\n\t\t09E6204C6D657974C73AA9968735D594 /* kssl.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = kssl.h; path = \"include-ios/openssl/kssl.h\"; sourceTree = \"<group>\"; };\n\t\t0AB7F42329EFBF191A021235FB9BA81C /* ecdsa.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = ecdsa.h; path = \"include-ios/openssl/ecdsa.h\"; sourceTree = \"<group>\"; };\n\t\t0ACFDE8A48224EBB52F1E4863FB6F58B /* dh.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = dh.h; path = \"include-ios/openssl/dh.h\"; sourceTree = \"<group>\"; };\n\t\t0B60760A3967D74BFF118250C393849C /* FABAttributes.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = FABAttributes.h; path = iOS/Fabric.framework/Headers/FABAttributes.h; sourceTree = \"<group>\"; };\n\t\t0BFFDEA2254275342E5FF37F820ADDD5 /* BTCBigNumber.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = BTCBigNumber.m; path = CoreBitcoin/BTCBigNumber.m; sourceTree = \"<group>\"; };\n\t\t0CEF0FF616FCB496E74E0C143F265873 /* CLSReport.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = CLSReport.h; path = iOS/Crashlytics.framework/Headers/CLSReport.h; sourceTree = \"<group>\"; };\n\t\t0CF3D23BB4C249819D14682EACF58A20 /* MBProgressHUD.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = MBProgressHUD.h; sourceTree = \"<group>\"; };\n\t\t0E51620D5F54C1A78950AE67E60B5328 /* conf_api.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = conf_api.h; path = \"include-ios/openssl/conf_api.h\"; sourceTree = \"<group>\"; };\n\t\t0F09ED7E543C407892E0A49D08583AAF /* x509_vfy.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = x509_vfy.h; path = \"include-ios/openssl/x509_vfy.h\"; sourceTree = \"<group>\"; };\n\t\t0F56888FEA4A38E48950754C72F65F5D /* AFHTTPSessionManager.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = AFHTTPSessionManager.h; path = AFNetworking/AFHTTPSessionManager.h; sourceTree = \"<group>\"; };\n\t\t0FA1AC957975C828AAB3F1ECB8B7BC42 /* iCloudDocumentSync.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = iCloudDocumentSync.xcconfig; sourceTree = \"<group>\"; };\n\t\t0FB93F75E4E0071746ED64537EFC4997 /* AFURLResponseSerialization.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = AFURLResponseSerialization.m; path = AFNetworking/AFURLResponseSerialization.m; sourceTree = \"<group>\"; };\n\t\t10E3619F3F837EECB0063047999F1E1C /* dsa.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = dsa.h; path = \"include-ios/openssl/dsa.h\"; sourceTree = \"<group>\"; };\n\t\t121374C01FAF018E3BEC9EEB2D59943B /* AFHTTPSessionManager.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = AFHTTPSessionManager.m; path = AFNetworking/AFHTTPSessionManager.m; sourceTree = \"<group>\"; };\n\t\t12CCE6386A939D9DA71166D908710B9C /* NSData+BTCData.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = \"NSData+BTCData.m\"; path = \"CoreBitcoin/NSData+BTCData.m\"; sourceTree = \"<group>\"; };\n\t\t13AA36E5FD9DA23360AC08544F74B2BB /* obj_mac.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = obj_mac.h; path = \"include-ios/openssl/obj_mac.h\"; sourceTree = \"<group>\"; };\n\t\t14CD046F3B6134C29B8D0497BBD538E8 /* bn.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = bn.h; path = \"include-ios/openssl/bn.h\"; sourceTree = \"<group>\"; };\n\t\t16915D02A8A00F9C7D158B8221B290B9 /* AFNetworking.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = AFNetworking.xcconfig; sourceTree = \"<group>\"; };\n\t\t1718A59435B8197A0B82184515F2B686 /* BTCEncryptedBackup.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = BTCEncryptedBackup.h; path = CoreBitcoin/BTCEncryptedBackup.h; sourceTree = \"<group>\"; };\n\t\t1838135C726D60B599B0187C2618E0CE /* BTCScript.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = BTCScript.m; path = CoreBitcoin/BTCScript.m; sourceTree = \"<group>\"; };\n\t\t1B1CDD72CE112D023028FE9320538937 /* BTCPriceSource.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = BTCPriceSource.m; path = CoreBitcoin/BTCPriceSource.m; sourceTree = \"<group>\"; };\n\t\t1B4648FDEBFF78FC0394521789DD6E6F /* tls1.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = tls1.h; path = \"include-ios/openssl/tls1.h\"; sourceTree = \"<group>\"; };\n\t\t1C8BA2567941B54A71EE197BA8A4079A /* UIViewController+ECSlidingViewController.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = \"UIViewController+ECSlidingViewController.h\"; path = \"ECSlidingViewController/UIViewController+ECSlidingViewController.h\"; sourceTree = \"<group>\"; };\n\t\t1D5AAECA7C4431CA629966C9CCDED85A /* Crashlytics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Crashlytics.framework; path = iOS/Crashlytics.framework; sourceTree = \"<group>\"; };\n\t\t1D8404557EC53259D973D11E9DAB5272 /* libCoreBitcoin.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; name = libCoreBitcoin.a; path = libCoreBitcoin.a; sourceTree = BUILT_PRODUCTS_DIR; };\n\t\t1F2D66D912FC659A8835B1A1A425B343 /* BTCMerkleTree.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = BTCMerkleTree.h; path = CoreBitcoin/BTCMerkleTree.h; sourceTree = \"<group>\"; };\n\t\t1FBEFD9A7C204DC3986D80A4D60BE777 /* UIKit+AFNetworking.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = \"UIKit+AFNetworking.h\"; path = \"UIKit+AFNetworking/UIKit+AFNetworking.h\"; sourceTree = \"<group>\"; };\n\t\t20B68F141A16E4EF4902FC2E1C7D2EA3 /* libPods-ArcBit.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; name = \"libPods-ArcBit.a\"; path = \"libPods-ArcBit.a\"; sourceTree = BUILT_PRODUCTS_DIR; };\n\t\t20FE96F7A9AE02FF6CAFB609FA1A4AB6 /* ui_compat.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = ui_compat.h; path = \"include-ios/openssl/ui_compat.h\"; sourceTree = \"<group>\"; };\n\t\t215FB89ABD80BF154457D2BCBEBEB61D /* comp.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = comp.h; path = \"include-ios/openssl/comp.h\"; sourceTree = \"<group>\"; };\n\t\t21B793E2BB6FF737E9C4003D4DC97F49 /* BTCNumberFormatter.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = BTCNumberFormatter.h; path = CoreBitcoin/BTCNumberFormatter.h; sourceTree = \"<group>\"; };\n\t\t2240125303F1A7796115A82807CC95F8 /* Answers.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = Answers.h; path = iOS/Crashlytics.framework/Headers/Answers.h; sourceTree = \"<group>\"; };\n\t\t2252F734E0D9E30F4205D0C25EA1A852 /* evp.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = evp.h; path = \"include-ios/openssl/evp.h\"; sourceTree = \"<group>\"; };\n\t\t23335AC4D3FA28AA61F7E3BD65845217 /* AFURLSessionManager.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = AFURLSessionManager.m; path = AFNetworking/AFURLSessionManager.m; sourceTree = \"<group>\"; };\n\t\t2646D482FE67F1BEE2AE9985DB65515A /* BTCEncryptedBackup.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = BTCEncryptedBackup.m; path = CoreBitcoin/BTCEncryptedBackup.m; sourceTree = \"<group>\"; };\n\t\t26C7B8D80607F689138B7DFCF624B44B /* BTCProtocolBuffers.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = BTCProtocolBuffers.m; path = CoreBitcoin/BTCProtocolBuffers.m; sourceTree = \"<group>\"; };\n\t\t27C37E67B87FD50378CB45AD53ECF8A1 /* BTCKey.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = BTCKey.h; path = CoreBitcoin/BTCKey.h; sourceTree = \"<group>\"; };\n\t\t28278C788A134E52C4356F7B82ABBD94 /* AFNetworking.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = AFNetworking.h; path = AFNetworking/AFNetworking.h; sourceTree = \"<group>\"; };\n\t\t283D94566D2E1147D94E5A2DEE54FB51 /* BTCTransactionBuilder.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = BTCTransactionBuilder.h; path = CoreBitcoin/BTCTransactionBuilder.h; sourceTree = \"<group>\"; };\n\t\t2974F3AB8EA4C9111383A32EF643CD75 /* srtp.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = srtp.h; path = \"include-ios/openssl/srtp.h\"; sourceTree = \"<group>\"; };\n\t\t29D29260D3A74CC78621C240CA01D174 /* AFURLConnectionOperation.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = AFURLConnectionOperation.m; path = AFNetworking/AFURLConnectionOperation.m; sourceTree = \"<group>\"; };\n\t\t29F7F962821125C98A8EF5A3391F621E /* RNEncryptor.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = RNEncryptor.m; path = RNCryptor/RNEncryptor.m; sourceTree = \"<group>\"; };\n\t\t2AB381AE428E36729E33FA1A3842DE61 /* CoreBitcoin-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = \"CoreBitcoin-prefix.pch\"; sourceTree = \"<group>\"; };\n\t\t2AD3ACEC341CE91CA7C6D7BD0338799E /* BTC256.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = BTC256.h; path = CoreBitcoin/BTC256.h; sourceTree = \"<group>\"; };\n\t\t2BAAFC230F5423868CD7029095DEA489 /* Fabric.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = Fabric.h; path = iOS/Fabric.framework/Headers/Fabric.h; sourceTree = \"<group>\"; };\n\t\t2C1B1775F28C9AAE4FF52102DC65FE32 /* conf.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = conf.h; path = \"include-ios/openssl/conf.h\"; sourceTree = \"<group>\"; };\n\t\t2C957C4D14B6703A4BA7A0A993D265E7 /* RNEncryptor.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = RNEncryptor.h; path = RNCryptor/RNEncryptor.h; sourceTree = \"<group>\"; };\n\t\t2CD35F59E4CBE95CF21B610F51B616F1 /* AFURLRequestSerialization.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = AFURLRequestSerialization.h; path = AFNetworking/AFURLRequestSerialization.h; sourceTree = \"<group>\"; };\n\t\t2F3D49EDACFA409A3ED119E04C877751 /* NS+BTCBase58.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = \"NS+BTCBase58.h\"; path = \"CoreBitcoin/NS+BTCBase58.h\"; sourceTree = \"<group>\"; };\n\t\t2F62C2C5C88BD012130E5970AA2588C4 /* ossl_typ.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = ossl_typ.h; path = \"include-ios/openssl/ossl_typ.h\"; sourceTree = \"<group>\"; };\n\t\t305398BB3744725353B9D90AC6D1F583 /* libMBProgressHUD.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; name = libMBProgressHUD.a; path = libMBProgressHUD.a; sourceTree = BUILT_PRODUCTS_DIR; };\n\t\t30891473DCA86FE4094F66E2597116D8 /* x509.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = x509.h; path = \"include-ios/openssl/x509.h\"; sourceTree = \"<group>\"; };\n\t\t30FCC9CDF587ADAAB7152D0F32CB89FE /* BTCBitcoinURL.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = BTCBitcoinURL.m; path = CoreBitcoin/BTCBitcoinURL.m; sourceTree = \"<group>\"; };\n\t\t322C51259AC52C0C48070FD85C261611 /* BTCUnitsAndLimits.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = BTCUnitsAndLimits.h; path = CoreBitcoin/BTCUnitsAndLimits.h; sourceTree = \"<group>\"; };\n\t\t3406E2490301E48E8A2EC1D254072CEA /* BTCMnemonic.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = BTCMnemonic.m; path = CoreBitcoin/BTCMnemonic.m; sourceTree = \"<group>\"; };\n\t\t352152BA99279300977B581B2EB00C09 /* RNCryptorEngine.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = RNCryptorEngine.m; path = RNCryptor/RNCryptorEngine.m; sourceTree = \"<group>\"; };\n\t\t377F632CF03068C430939AB39A2E8535 /* RNDecryptor.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = RNDecryptor.h; path = RNCryptor/RNDecryptor.h; sourceTree = \"<group>\"; };\n\t\t3A5449F7197D95336EEA0C7681EB3DF1 /* BTCKeychain.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = BTCKeychain.m; path = CoreBitcoin/BTCKeychain.m; sourceTree = \"<group>\"; };\n\t\t3A5E43CCF0C5266E9B11AAFF956E987F /* BTCTransactionOutput.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = BTCTransactionOutput.h; path = CoreBitcoin/BTCTransactionOutput.h; sourceTree = \"<group>\"; };\n\t\t3ADD9C6C30CB84EF8945D954A71B001A /* iCloud.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = iCloud.h; path = iCloud/iCloud.h; sourceTree = \"<group>\"; };\n\t\t3B93B7114FDC5DB79DBEAE265BAF57DD /* BTCData.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = BTCData.m; path = CoreBitcoin/BTCData.m; sourceTree = \"<group>\"; };\n\t\t3C7B8558FCB190A36E5966E079FD5ADB /* Pods-ArcBit-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = \"Pods-ArcBit-dummy.m\"; sourceTree = \"<group>\"; };\n\t\t3D039782643D47B1684BBF43409C2722 /* SwiftTryCatch.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = SwiftTryCatch.m; sourceTree = \"<group>\"; };\n\t\t3E27BC14DA3C0E76D0BC78F09D06EC23 /* Pods-ArcBitTests-resources.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = \"Pods-ArcBitTests-resources.sh\"; sourceTree = \"<group>\"; };\n\t\t3E55085F0B0CDF9F2CCE91BBA6EE793A /* UIViewController+ECSlidingViewController.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = \"UIViewController+ECSlidingViewController.m\"; path = \"ECSlidingViewController/UIViewController+ECSlidingViewController.m\"; sourceTree = \"<group>\"; };\n\t\t3F864BF78EBDBA2F6A036E48CFE9A3CD /* BTCBlockchainInfo.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = BTCBlockchainInfo.h; path = CoreBitcoin/BTCBlockchainInfo.h; sourceTree = \"<group>\"; };\n\t\t3FAAD67FBFA07F5A47C8D1C7E2A5DDA9 /* RNCryptor-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = \"RNCryptor-dummy.m\"; sourceTree = \"<group>\"; };\n\t\t3FD69758D716663314E37B8A49A012B9 /* ssl.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = ssl.h; path = \"include-ios/openssl/ssl.h\"; sourceTree = \"<group>\"; };\n\t\t4036EA42116308A137FF7CFFF51226AF /* seed.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = seed.h; path = \"include-ios/openssl/seed.h\"; sourceTree = \"<group>\"; };\n\t\t416659F11E80B403427CA728090FBBCA /* opensslv.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = opensslv.h; path = \"include-ios/openssl/opensslv.h\"; sourceTree = \"<group>\"; };\n\t\t42D35BBBF2A12BBFDEE2F74DAB712E16 /* BTCEncryptedMessage.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = BTCEncryptedMessage.m; path = CoreBitcoin/BTCEncryptedMessage.m; sourceTree = \"<group>\"; };\n\t\t42F713ECA87249B899D3B63725BF7054 /* UIAlertView+AFNetworking.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = \"UIAlertView+AFNetworking.h\"; path = \"UIKit+AFNetworking/UIAlertView+AFNetworking.h\"; sourceTree = \"<group>\"; };\n\t\t434E2AC4753FC3B4C4D380D2104814D0 /* BTCSecretSharing.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = BTCSecretSharing.m; path = CoreBitcoin/BTCSecretSharing.m; sourceTree = \"<group>\"; };\n\t\t43EDF1C1707F51979A1302FA4E5276F0 /* AFNetworking-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = \"AFNetworking-dummy.m\"; sourceTree = \"<group>\"; };\n\t\t44A27D79184E550B8BF16D43686B8103 /* ECPercentDrivenInteractiveTransition.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = ECPercentDrivenInteractiveTransition.h; path = ECSlidingViewController/ECPercentDrivenInteractiveTransition.h; sourceTree = \"<group>\"; };\n\t\t44DB0341C60431BB4374C3C55991A5CB /* BTCAddressSubclass.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = BTCAddressSubclass.h; path = CoreBitcoin/BTCAddressSubclass.h; sourceTree = \"<group>\"; };\n\t\t4568221EFCC65F30C8C6DC81E7CFD2A7 /* AFHTTPRequestOperationManager.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = AFHTTPRequestOperationManager.h; path = AFNetworking/AFHTTPRequestOperationManager.h; sourceTree = \"<group>\"; };\n\t\t4601C8F6520F45BDCE5FC2A299621713 /* BTCHashID.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = BTCHashID.m; path = CoreBitcoin/BTCHashID.m; sourceTree = \"<group>\"; };\n\t\t49A907C6DA8E0D3398F98202C6C16950 /* hmac.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = hmac.h; path = \"include-ios/openssl/hmac.h\"; sourceTree = \"<group>\"; };\n\t\t4A377D007D598717227EAF729E278A45 /* BTCPaymentMethodRequest.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = BTCPaymentMethodRequest.h; path = CoreBitcoin/BTCPaymentMethodRequest.h; sourceTree = \"<group>\"; };\n\t\t4B1C1DD9382F2A712DE5C3390237661B /* ECSlidingInteractiveTransition.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = ECSlidingInteractiveTransition.m; path = ECSlidingViewController/ECSlidingInteractiveTransition.m; sourceTree = \"<group>\"; };\n\t\t4B2EE8CE559E9A19F1CBBCADED341B8E /* RNOpenSSLEncryptor.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = RNOpenSSLEncryptor.h; path = RNCryptor/RNOpenSSLEncryptor.h; sourceTree = \"<group>\"; };\n\t\t4B99F0CCD4DA870000CA786F89DC48F8 /* BTCAssetAddress.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = BTCAssetAddress.h; path = CoreBitcoin/BTCAssetAddress.h; sourceTree = \"<group>\"; };\n\t\t4C96C3A92DF5389D6DB9B885F78D5F53 /* BTCBase58.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = BTCBase58.h; path = CoreBitcoin/BTCBase58.h; sourceTree = \"<group>\"; };\n\t\t4DB0A040BEF6D827EAAD132327946B0C /* ts.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = ts.h; path = \"include-ios/openssl/ts.h\"; sourceTree = \"<group>\"; };\n\t\t4E1EC27FE9E74D31E3DD4E4E322CCC2E /* BTCCurrencyConverter.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = BTCCurrencyConverter.h; path = CoreBitcoin/BTCCurrencyConverter.h; sourceTree = \"<group>\"; };\n\t\t4EF9CEB2D984F13521541123BAAE96E6 /* BTCPaymentMethodDetails.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = BTCPaymentMethodDetails.h; path = CoreBitcoin/BTCPaymentMethodDetails.h; sourceTree = \"<group>\"; };\n\t\t501B52CD79EA9954E4C80D0B664BF1EB /* RNCryptor-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = \"RNCryptor-prefix.pch\"; sourceTree = \"<group>\"; };\n\t\t5192085BDE9AC6B1FA6A8EAF03B471CB /* RNCryptor+Private.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = \"RNCryptor+Private.h\"; path = \"RNCryptor/RNCryptor+Private.h\"; sourceTree = \"<group>\"; };\n\t\t51EEF5F6B8DF9CB28A3362570D60C5A5 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.3.sdk/System/Library/Frameworks/UIKit.framework; sourceTree = DEVELOPER_DIR; };\n\t\t52BAF2C56ABBC282857C15635D8C9B64 /* libRNCryptor.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; name = libRNCryptor.a; path = libRNCryptor.a; sourceTree = BUILT_PRODUCTS_DIR; };\n\t\t5309C020F5D6D0CE0EDD9B861941DD5D /* ECSlidingViewController.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = ECSlidingViewController.m; path = ECSlidingViewController/ECSlidingViewController.m; sourceTree = \"<group>\"; };\n\t\t53E2F1D4C25E3C1475AAD9EF4D050B82 /* md4.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = md4.h; path = \"include-ios/openssl/md4.h\"; sourceTree = \"<group>\"; };\n\t\t53E5CD5AF49A1DF1C602CA0AF8F193E0 /* UIRefreshControl+AFNetworking.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = \"UIRefreshControl+AFNetworking.m\"; path = \"UIKit+AFNetworking/UIRefreshControl+AFNetworking.m\"; sourceTree = \"<group>\"; };\n\t\t5404DFC2700BD9442349F21434850E2C /* ECSlidingAnimationController.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = ECSlidingAnimationController.m; path = ECSlidingViewController/ECSlidingAnimationController.m; sourceTree = \"<group>\"; };\n\t\t558C53E6690D240D8391051E6C6F2715 /* ECSlidingInteractiveTransition.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = ECSlidingInteractiveTransition.h; path = ECSlidingViewController/ECSlidingInteractiveTransition.h; sourceTree = \"<group>\"; };\n\t\t56693BA0F9E535A362A61EB29B867F4B /* rand.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = rand.h; path = \"include-ios/openssl/rand.h\"; sourceTree = \"<group>\"; };\n\t\t57639FDACD732ABAB857087B8A5BAA6A /* idea.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = idea.h; path = \"include-ios/openssl/idea.h\"; sourceTree = \"<group>\"; };\n\t\t57871905EF3ECD09DB2CFC0AC6E65998 /* CoreBitcoin-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = \"CoreBitcoin-dummy.m\"; sourceTree = \"<group>\"; };\n\t\t58454370823CB30F3DD5DA8466ADE99E /* MBProgressHUD.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = MBProgressHUD.xcconfig; sourceTree = \"<group>\"; };\n\t\t5925F50312D0A8BEB719D583F0821D7B /* UIButton+AFNetworking.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = \"UIButton+AFNetworking.m\"; path = \"UIKit+AFNetworking/UIButton+AFNetworking.m\"; sourceTree = \"<group>\"; };\n\t\t5967C1608483BB1D9CD985812E466534 /* ECSlidingViewController-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = \"ECSlidingViewController-prefix.pch\"; sourceTree = \"<group>\"; };\n\t\t5AFC5BFB8A09CAD241DCC07B5CC64194 /* safestack.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = safestack.h; path = \"include-ios/openssl/safestack.h\"; sourceTree = \"<group>\"; };\n\t\t5B7DCF24ABD1CDF71A566E0FA98C99C4 /* rsa.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = rsa.h; path = \"include-ios/openssl/rsa.h\"; sourceTree = \"<group>\"; };\n\t\t5C889781B47A464116B2EC159698C667 /* Pods-ArcBit.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = \"Pods-ArcBit.debug.xcconfig\"; sourceTree = \"<group>\"; };\n\t\t5C89DBB9475C49B2C4060DA2E950D5E7 /* BTCBitcoinURL.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = BTCBitcoinURL.h; path = CoreBitcoin/BTCBitcoinURL.h; sourceTree = \"<group>\"; };\n\t\t5D2B0B6D9A30C1EB58543F2588C21FE8 /* BTCBlock.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = BTCBlock.h; path = CoreBitcoin/BTCBlock.h; sourceTree = \"<group>\"; };\n\t\t5D67C685F012E5FA93EB001BE1CAB1BC /* iCloud.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = iCloud.m; path = iCloud/iCloud.m; sourceTree = \"<group>\"; };\n\t\t5F0609F4118E597A2B4F3227118BC524 /* AFURLSessionManager.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = AFURLSessionManager.h; path = AFNetworking/AFURLSessionManager.h; sourceTree = \"<group>\"; };\n\t\t6047241D1ABED1CB4FC8B6D898F49CF6 /* BTCMerkleTree.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = BTCMerkleTree.m; path = CoreBitcoin/BTCMerkleTree.m; sourceTree = \"<group>\"; };\n\t\t61342CD14721855E2FECE1958B04830C /* ISO8601DateFormatter-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = \"ISO8601DateFormatter-dummy.m\"; sourceTree = \"<group>\"; };\n\t\t622300290A134A91440F8B954658F57D /* BTCPaymentMethod.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = BTCPaymentMethod.m; path = CoreBitcoin/BTCPaymentMethod.m; sourceTree = \"<group>\"; };\n\t\t62CC634C5A1D2CA241DB09FC5983A4EB /* iCloudDocumentSync-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = \"iCloudDocumentSync-dummy.m\"; sourceTree = \"<group>\"; };\n\t\t63F667F34F6BA7AC95672F51C7C43F68 /* NS+BTCBase58.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = \"NS+BTCBase58.m\"; path = \"CoreBitcoin/NS+BTCBase58.m\"; sourceTree = \"<group>\"; };\n\t\t646CE467706A99D849BC06AD80712EEA /* SwiftTryCatch.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = SwiftTryCatch.h; sourceTree = \"<group>\"; };\n\t\t64C078F6A5B26EF2155EC8A76DBF5EA9 /* Pods-ArcBit-resources.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = \"Pods-ArcBit-resources.sh\"; sourceTree = \"<group>\"; };\n\t\t65C351E0C8F9499ED05E0C60690B8B9E /* pkcs7.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = pkcs7.h; path = \"include-ios/openssl/pkcs7.h\"; sourceTree = \"<group>\"; };\n\t\t65CBDBDB59EBB0092751843AD8D8FD19 /* BTCProtocolSerialization.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = BTCProtocolSerialization.m; path = CoreBitcoin/BTCProtocolSerialization.m; sourceTree = \"<group>\"; };\n\t\t65E05090B622494D212CD1603420DBD1 /* camellia.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = camellia.h; path = \"include-ios/openssl/camellia.h\"; sourceTree = \"<group>\"; };\n\t\t66E850C3F2C557DCA8615EE41EA8B2CB /* ebcdic.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = ebcdic.h; path = \"include-ios/openssl/ebcdic.h\"; sourceTree = \"<group>\"; };\n\t\t66EB5B938802F986D305D37865A72F7F /* Security.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Security.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.3.sdk/System/Library/Frameworks/Security.framework; sourceTree = DEVELOPER_DIR; };\n\t\t6710354228A5BD574ADD2F8D380B870D /* BTCCurvePoint.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = BTCCurvePoint.m; path = CoreBitcoin/BTCCurvePoint.m; sourceTree = \"<group>\"; };\n\t\t673B899D2723B2CB9E2057F9A04EFE78 /* libISO8601DateFormatter.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; name = libISO8601DateFormatter.a; path = libISO8601DateFormatter.a; sourceTree = BUILT_PRODUCTS_DIR; };\n\t\t68244B055DAD14CE619D3F57E41769AA /* UIProgressView+AFNetworking.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = \"UIProgressView+AFNetworking.h\"; path = \"UIKit+AFNetworking/UIProgressView+AFNetworking.h\"; sourceTree = \"<group>\"; };\n\t\t6851FCE26E0D26FC7F04E48221F849F3 /* UIActivityIndicatorView+AFNetworking.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = \"UIActivityIndicatorView+AFNetworking.h\"; path = \"UIKit+AFNetworking/UIActivityIndicatorView+AFNetworking.h\"; sourceTree = \"<group>\"; };\n\t\t690412BA91917B13E770897731D06BB7 /* BTCQRCode.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = BTCQRCode.h; path = CoreBitcoin/BTCQRCode.h; sourceTree = \"<group>\"; };\n\t\t69071EF28C446FEBFCE2C0CF435D3368 /* BTC256.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = BTC256.m; path = CoreBitcoin/BTC256.m; sourceTree = \"<group>\"; };\n\t\t69A9C1ADE6FD1FE80CF9D2E4BDFBF206 /* ECSlidingSegue.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = ECSlidingSegue.h; path = ECSlidingViewController/ECSlidingSegue.h; sourceTree = \"<group>\"; };\n\t\t69CCE6796176BDC48179171447637DCD /* Pods-ArcBitTests-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = \"Pods-ArcBitTests-acknowledgements.plist\"; sourceTree = \"<group>\"; };\n\t\t6A00BD8D7285ABA9BC788430C8293668 /* libiCloudDocumentSync.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; name = libiCloudDocumentSync.a; path = libiCloudDocumentSync.a; sourceTree = BUILT_PRODUCTS_DIR; };\n\t\t6A83258FB66AF6AA450F494AE270BA71 /* objects.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = objects.h; path = \"include-ios/openssl/objects.h\"; sourceTree = \"<group>\"; };\n\t\t6A9A6A5FB261FE3C10784D378B8B002C /* BTCNumberFormatter.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = BTCNumberFormatter.m; path = CoreBitcoin/BTCNumberFormatter.m; sourceTree = \"<group>\"; };\n\t\t6C15FB69527AF481EE85B8A505FFCD2D /* ssl3.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = ssl3.h; path = \"include-ios/openssl/ssl3.h\"; sourceTree = \"<group>\"; };\n\t\t6D2899267883132B3DD67CEAB450986D /* RNOpenSSLEncryptor.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = RNOpenSSLEncryptor.m; path = RNCryptor/RNOpenSSLEncryptor.m; sourceTree = \"<group>\"; };\n\t\t704A68A6D827D96806B271BE3113DDD2 /* UIButton+AFNetworking.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = \"UIButton+AFNetworking.h\"; path = \"UIKit+AFNetworking/UIButton+AFNetworking.h\"; sourceTree = \"<group>\"; };\n\t\t7117956F8B52C2D7D6C70BF81E6702D5 /* asn1_mac.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = asn1_mac.h; path = \"include-ios/openssl/asn1_mac.h\"; sourceTree = \"<group>\"; };\n\t\t7190966A344D75D624FA4A03BE2B2E50 /* md5.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = md5.h; path = \"include-ios/openssl/md5.h\"; sourceTree = \"<group>\"; };\n\t\t7195ECDC25A6C0A20667A39FAD9A4347 /* dso.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = dso.h; path = \"include-ios/openssl/dso.h\"; sourceTree = \"<group>\"; };\n\t\t727E08CD1798AAE87E25F55C0B89D769 /* ECPercentDrivenInteractiveTransition.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = ECPercentDrivenInteractiveTransition.m; path = ECSlidingViewController/ECPercentDrivenInteractiveTransition.m; sourceTree = \"<group>\"; };\n\t\t74787E1420D6C9B560A302F280BF02A1 /* ECSlidingViewController-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = \"ECSlidingViewController-dummy.m\"; sourceTree = \"<group>\"; };\n\t\t7670A2D213D3E45C32D51688A27FD23A /* SwiftTryCatch.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = SwiftTryCatch.xcconfig; sourceTree = \"<group>\"; };\n\t\t7760068D6E82C5B3178AAE2F4AE5077F /* MBProgressHUD.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = MBProgressHUD.m; sourceTree = \"<group>\"; };\n\t\t77C390E32B57042D6EB432229D6185E3 /* RNCryptor.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = RNCryptor.m; path = RNCryptor/RNCryptor.m; sourceTree = \"<group>\"; };\n\t\t781ABA62CA489B9117ED96DB5E9A617C /* bio.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = bio.h; path = \"include-ios/openssl/bio.h\"; sourceTree = \"<group>\"; };\n\t\t78275AA10E03112AB7651930D2FEF07F /* BTCBlockHeader.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = BTCBlockHeader.h; path = CoreBitcoin/BTCBlockHeader.h; sourceTree = \"<group>\"; };\n\t\t79A8293A1A2EFC4F61BFA16C220483F5 /* AFNetworkReachabilityManager.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = AFNetworkReachabilityManager.m; path = AFNetworking/AFNetworkReachabilityManager.m; sourceTree = \"<group>\"; };\n\t\t79EA4FD7FD567744FCA13579DB5E070B /* cms.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = cms.h; path = \"include-ios/openssl/cms.h\"; sourceTree = \"<group>\"; };\n\t\t7AA49E143F51A3A76A36CABB822D4FF0 /* Pods-ArcBitTests-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = \"Pods-ArcBitTests-dummy.m\"; sourceTree = \"<group>\"; };\n\t\t7B557D038A9B95403FF7CDDEBD475062 /* asn1t.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = asn1t.h; path = \"include-ios/openssl/asn1t.h\"; sourceTree = \"<group>\"; };\n\t\t7C2E122DAF7306C3060F8D2A9C22BB8C /* MBProgressHUD-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = \"MBProgressHUD-dummy.m\"; sourceTree = \"<group>\"; };\n\t\t7C2EDB5624A05C547A02BC8C55F247A5 /* BTCBase58.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = BTCBase58.m; path = CoreBitcoin/BTCBase58.m; sourceTree = \"<group>\"; };\n\t\t7D9EAD18442D98ACCEBDB61AFEEDE3ED /* AFNetworking-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = \"AFNetworking-prefix.pch\"; sourceTree = \"<group>\"; };\n\t\t7DC1F65ABDA3897DA8A4BDA87AD43983 /* BTCPaymentMethodDetails.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = BTCPaymentMethodDetails.m; path = CoreBitcoin/BTCPaymentMethodDetails.m; sourceTree = \"<group>\"; };\n\t\t7DD7CF735F02F1F66EB97CD125CE3ED8 /* BTCPaymentRequest.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = BTCPaymentRequest.h; path = CoreBitcoin/BTCPaymentRequest.h; sourceTree = \"<group>\"; };\n\t\t7E696E50F7529267F317F186E3A492CC /* libssl.a */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = archive.ar; name = libssl.a; path = \"lib-ios/libssl.a\"; sourceTree = \"<group>\"; };\n\t\t7F12F0EBD217A110BB685C0DBE6467D8 /* BTCOpcode.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = BTCOpcode.m; path = CoreBitcoin/BTCOpcode.m; sourceTree = \"<group>\"; };\n\t\t8196BF2515D56AC87BEF5AEE87C80E55 /* BTCBlockchainInfo.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = BTCBlockchainInfo.m; path = CoreBitcoin/BTCBlockchainInfo.m; sourceTree = \"<group>\"; };\n\t\t8223797E7C32BD69D1A3F0FD4A2BA375 /* pqueue.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = pqueue.h; path = \"include-ios/openssl/pqueue.h\"; sourceTree = \"<group>\"; };\n\t\t8356BE9E396A722179392853567A37EA /* AFSecurityPolicy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = AFSecurityPolicy.m; path = AFNetworking/AFSecurityPolicy.m; sourceTree = \"<group>\"; };\n\t\t8391F9908A82B5F80CB1FD12E0FA8B57 /* UIActivityIndicatorView+AFNetworking.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = \"UIActivityIndicatorView+AFNetworking.m\"; path = \"UIKit+AFNetworking/UIActivityIndicatorView+AFNetworking.m\"; sourceTree = \"<group>\"; };\n\t\t856EC83D619085DFE8E22497DD52B405 /* cmac.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = cmac.h; path = \"include-ios/openssl/cmac.h\"; sourceTree = \"<group>\"; };\n\t\t85DCB1C473532CB20732F5D63458E58F /* Pods-ArcBitTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = \"Pods-ArcBitTests.debug.xcconfig\"; sourceTree = \"<group>\"; };\n\t\t8772768A16B56345E6A2800163C1FE10 /* UIRefreshControl+AFNetworking.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = \"UIRefreshControl+AFNetworking.h\"; path = \"UIKit+AFNetworking/UIRefreshControl+AFNetworking.h\"; sourceTree = \"<group>\"; };\n\t\t87B22FC39C3AF004478919883622A396 /* ocsp.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = ocsp.h; path = \"include-ios/openssl/ocsp.h\"; sourceTree = \"<group>\"; };\n\t\t87BCE824E7678FE5EBEA0235D8330EA7 /* BTCBlindSignature.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = BTCBlindSignature.h; path = CoreBitcoin/BTCBlindSignature.h; sourceTree = \"<group>\"; };\n\t\t887EDAD0BA5E2C0A42C113514A39A92E /* SwiftTryCatch-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = \"SwiftTryCatch-prefix.pch\"; sourceTree = \"<group>\"; };\n\t\t89E02999252A83B1DD09D82D5BE212AD /* BTCScriptMachine.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = BTCScriptMachine.m; path = CoreBitcoin/BTCScriptMachine.m; sourceTree = \"<group>\"; };\n\t\t8B13DE49B89A8CD2DA66CB9A5A1D75FD /* dtls1.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = dtls1.h; path = \"include-ios/openssl/dtls1.h\"; sourceTree = \"<group>\"; };\n\t\t8D45072F40D129A74F45785F40A7F1F6 /* ANSCompatibility.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = ANSCompatibility.h; path = iOS/Crashlytics.framework/Headers/ANSCompatibility.h; sourceTree = \"<group>\"; };\n\t\t91230138A41D4BB01490A0AA930B1847 /* BTCScript.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = BTCScript.h; path = CoreBitcoin/BTCScript.h; sourceTree = \"<group>\"; };\n\t\t926B1BE83431EFA92C6889CF0F962EC5 /* BTCAddress.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = BTCAddress.h; path = CoreBitcoin/BTCAddress.h; sourceTree = \"<group>\"; };\n\t\t92D8FABBD7406AC39E7CE5E7BD22B63D /* des_old.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = des_old.h; path = \"include-ios/openssl/des_old.h\"; sourceTree = \"<group>\"; };\n\t\t9364642FCE9090B4B0743D6604BB999E /* AFHTTPRequestOperation.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = AFHTTPRequestOperation.h; path = AFNetworking/AFHTTPRequestOperation.h; sourceTree = \"<group>\"; };\n\t\t93A4A3777CF96A4AAC1D13BA6DCCEA73 /* Podfile */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; includeInIndex = 1; lastKnownFileType = text; name = Podfile; path = ../Podfile; sourceTree = SOURCE_ROOT; xcLanguageSpecificationIdentifier = xcode.lang.ruby; };\n\t\t9443DCC7B3882D884A08AD4FBB192D94 /* Pods-ArcBitTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = \"Pods-ArcBitTests.release.xcconfig\"; sourceTree = \"<group>\"; };\n\t\t949C624099940C4EEA9781323CDC12F9 /* sha.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = sha.h; path = \"include-ios/openssl/sha.h\"; sourceTree = \"<group>\"; };\n\t\t95A4613C6B9FBCC64EF6EF22C9F47FC7 /* NSData+BTCData.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = \"NSData+BTCData.h\"; path = \"CoreBitcoin/NSData+BTCData.h\"; sourceTree = \"<group>\"; };\n\t\t95B661EF2DA6D14E93C5F89F574C8549 /* mdc2.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = mdc2.h; path = \"include-ios/openssl/mdc2.h\"; sourceTree = \"<group>\"; };\n\t\t9626DC346A3B691120AB218DAF98FFA9 /* BTCOutpoint.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = BTCOutpoint.m; path = CoreBitcoin/BTCOutpoint.m; sourceTree = \"<group>\"; };\n\t\t96380AFFC297F299DA19C48AE5AEDD8D /* SwiftBridgingHeader.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = SwiftBridgingHeader.h; path = CoreBitcoin/SwiftBridgingHeader.h; sourceTree = \"<group>\"; };\n\t\t9650B3DD2279978E8859946950D445F1 /* BTCNetwork.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = BTCNetwork.h; path = CoreBitcoin/BTCNetwork.h; sourceTree = \"<group>\"; };\n\t\t968EFFBB3C5DC12A819A7C6737A00736 /* BTCQRCode.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = BTCQRCode.m; path = CoreBitcoin/BTCQRCode.m; sourceTree = \"<group>\"; };\n\t\t96B5F1776737E149C6B9180F818F6142 /* AFHTTPRequestOperation.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = AFHTTPRequestOperation.m; path = AFNetworking/AFHTTPRequestOperation.m; sourceTree = \"<group>\"; };\n\t\t97F6BBA0155779DEEAE85D4FE7376407 /* BTCAssetID.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = BTCAssetID.m; path = CoreBitcoin/BTCAssetID.m; sourceTree = \"<group>\"; };\n\t\t98A575A1E3AB80D19F4D6090B6293DE2 /* BTCErrors.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = BTCErrors.h; path = CoreBitcoin/BTCErrors.h; sourceTree = \"<group>\"; };\n\t\t99330B15193AB732067124D96F8082E4 /* opensslconf.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = opensslconf.h; path = \"include-ios/openssl/opensslconf.h\"; sourceTree = \"<group>\"; };\n\t\t9B2C58CDC7B64DEA29C434BB1C297708 /* ISO8601DateFormatter.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = ISO8601DateFormatter.xcconfig; sourceTree = \"<group>\"; };\n\t\t9E23DC3F96FAA164FA689122F745FC3E /* iCloud-Prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = \"iCloud-Prefix.pch\"; path = \"iCloud/iCloud-Prefix.pch\"; sourceTree = \"<group>\"; };\n\t\t9E45F943C96D8E3C50638CD8F5242611 /* AFHTTPRequestOperationManager.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = AFHTTPRequestOperationManager.m; path = AFNetworking/AFHTTPRequestOperationManager.m; sourceTree = \"<group>\"; };\n\t\t9E5575178601F6294E9902228F527172 /* BTCBigNumber.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = BTCBigNumber.h; path = CoreBitcoin/BTCBigNumber.h; sourceTree = \"<group>\"; };\n\t\t9F7A08F9107585A5F542A464B816AC40 /* des.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = des.h; path = \"include-ios/openssl/des.h\"; sourceTree = \"<group>\"; };\n\t\t9F9301EC57627F0C1E2399EC0A76E243 /* RNOpenSSLDecryptor.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = RNOpenSSLDecryptor.m; path = RNCryptor/RNOpenSSLDecryptor.m; sourceTree = \"<group>\"; };\n\t\t9FFC430C65EB18FB1AEC5CF6E37B386C /* AFURLConnectionOperation.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = AFURLConnectionOperation.h; path = AFNetworking/AFURLConnectionOperation.h; sourceTree = \"<group>\"; };\n\t\tA000205D1D6B3E430777942746A5B94A /* BTCPriceSource.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = BTCPriceSource.h; path = CoreBitcoin/BTCPriceSource.h; sourceTree = \"<group>\"; };\n\t\tA168A2B4388152C35F1D86769E4EAA60 /* RNOpenSSLCryptor.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = RNOpenSSLCryptor.m; path = RNCryptor/RNOpenSSLCryptor.m; sourceTree = \"<group>\"; };\n\t\tA178C0870C61FF73F641C3CB1815D30E /* UIAlertView+AFNetworking.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = \"UIAlertView+AFNetworking.m\"; path = \"UIKit+AFNetworking/UIAlertView+AFNetworking.m\"; sourceTree = \"<group>\"; };\n\t\tA1F7837F0D7F8688A3E8F7DB893D6D21 /* CLSStackFrame.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = CLSStackFrame.h; path = iOS/Crashlytics.framework/Headers/CLSStackFrame.h; sourceTree = \"<group>\"; };\n\t\tA20E7B3C0A2AEA92504DD510002C0866 /* RNCryptorEngine.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = RNCryptorEngine.h; path = RNCryptor/RNCryptorEngine.h; sourceTree = \"<group>\"; };\n\t\tA3179C0D8BDFEB0614A408B889916ADF /* buffer.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = buffer.h; path = \"include-ios/openssl/buffer.h\"; sourceTree = \"<group>\"; };\n\t\tA4A78E5A576CDDF089002FA7301D2AD8 /* SystemConfiguration.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SystemConfiguration.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.3.sdk/System/Library/Frameworks/SystemConfiguration.framework; sourceTree = DEVELOPER_DIR; };\n\t\tA66EEC682DBBA3D4129286E25857B220 /* Crashlytics.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = Crashlytics.h; path = iOS/Crashlytics.framework/Headers/Crashlytics.h; sourceTree = \"<group>\"; };\n\t\tA6A1BC3EA56D44A5C7D47A4D4BE6D6C1 /* BTCAssetID.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = BTCAssetID.h; path = CoreBitcoin/BTCAssetID.h; sourceTree = \"<group>\"; };\n\t\tA7A8286BC37B5BED353CCB37AD658D98 /* Pods-ArcBit-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = \"Pods-ArcBit-acknowledgements.plist\"; sourceTree = \"<group>\"; };\n\t\tA7BF3D0BF140305FA5FE4908A6695EC4 /* CoreBitcoin.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = CoreBitcoin.xcconfig; sourceTree = \"<group>\"; };\n\t\tA8230040F65D1E47D3463A644108E95C /* pkcs12.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = pkcs12.h; path = \"include-ios/openssl/pkcs12.h\"; sourceTree = \"<group>\"; };\n\t\tA9ADCD48D22F734471E0F198B383FD89 /* BTCProcessor.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = BTCProcessor.h; path = CoreBitcoin/BTCProcessor.h; sourceTree = \"<group>\"; };\n\t\tA9F6E8443B4427FB40F2FFDAAF8B6C3D /* crypto.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = crypto.h; path = \"include-ios/openssl/crypto.h\"; sourceTree = \"<group>\"; };\n\t\tAA8BCCFE7DE3B05DD0E7AD638575712D /* AFURLResponseSerialization.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = AFURLResponseSerialization.h; path = AFNetworking/AFURLResponseSerialization.h; sourceTree = \"<group>\"; };\n\t\tABBE05FC6756637067D69B4F0FFA9ECA /* CoreBitcoin.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = CoreBitcoin.h; path = CoreBitcoin/CoreBitcoin.h; sourceTree = \"<group>\"; };\n\t\tAC1E9926AD33179946A911197F0A5AB9 /* ui.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = ui.h; path = \"include-ios/openssl/ui.h\"; sourceTree = \"<group>\"; };\n\t\tACAD38A8E111EB2F6BC3164811A69F2B /* modes.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = modes.h; path = \"include-ios/openssl/modes.h\"; sourceTree = \"<group>\"; };\n\t\tAEE4A3D3B6C014FBC6E9CF0D744B721C /* err.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = err.h; path = \"include-ios/openssl/err.h\"; sourceTree = \"<group>\"; };\n\t\tAFE92316288527A68C5561E6B187C546 /* BTCTransactionBuilder.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = BTCTransactionBuilder.m; path = CoreBitcoin/BTCTransactionBuilder.m; sourceTree = \"<group>\"; };\n\t\tAFF88FAFB575B9864DDB1D5EF0A57352 /* BTCFancyEncryptedMessage.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = BTCFancyEncryptedMessage.m; path = CoreBitcoin/BTCFancyEncryptedMessage.m; sourceTree = \"<group>\"; };\n\t\tB18465F66373770B44A93F9034E18367 /* BTCPaymentProtocol.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = BTCPaymentProtocol.h; path = CoreBitcoin/BTCPaymentProtocol.h; sourceTree = \"<group>\"; };\n\t\tB1CE3678138E27EC67C9349F00D257D9 /* AFNetworkActivityIndicatorManager.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = AFNetworkActivityIndicatorManager.h; path = \"UIKit+AFNetworking/AFNetworkActivityIndicatorManager.h\"; sourceTree = \"<group>\"; };\n\t\tB2174704DBD9150D7DCAFDB9151E1F23 /* BTCFancyEncryptedMessage.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = BTCFancyEncryptedMessage.h; path = CoreBitcoin/BTCFancyEncryptedMessage.h; sourceTree = \"<group>\"; };\n\t\tB45C1F6CA3469E2F0271992AD57BD4F9 /* ECSlidingViewController.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = ECSlidingViewController.h; path = ECSlidingViewController/ECSlidingViewController.h; sourceTree = \"<group>\"; };\n\t\tB470DC06AA1DABE32AD454CA5ECDF951 /* CoreBitcoin+Categories.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = \"CoreBitcoin+Categories.h\"; path = \"CoreBitcoin/CoreBitcoin+Categories.h\"; sourceTree = \"<group>\"; };\n\t\tB554C42813D25D9DD0844ED5EE902B51 /* BTCTransaction.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = BTCTransaction.m; path = CoreBitcoin/BTCTransaction.m; sourceTree = \"<group>\"; };\n\t\tB59ED59D5803800B0CA89062A2A1F7D0 /* BTCNetwork.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = BTCNetwork.m; path = CoreBitcoin/BTCNetwork.m; sourceTree = \"<group>\"; };\n\t\tB60EB6B12B1C505BCD68892ACF5517EB /* CLSAttributes.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = CLSAttributes.h; path = iOS/Crashlytics.framework/Headers/CLSAttributes.h; sourceTree = \"<group>\"; };\n\t\tB6296282034FB8421AF6C169E4218094 /* ssl23.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = ssl23.h; path = \"include-ios/openssl/ssl23.h\"; sourceTree = \"<group>\"; };\n\t\tB6BD8C2B2FC7CB2FB94E4CBDC564F1FF /* BTCTransactionOutput.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = BTCTransactionOutput.m; path = CoreBitcoin/BTCTransactionOutput.m; sourceTree = \"<group>\"; };\n\t\tB833F142C71CA5B8878537DFA143861B /* ECSlidingSegue.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = ECSlidingSegue.m; path = ECSlidingViewController/ECSlidingSegue.m; sourceTree = \"<group>\"; };\n\t\tB97A9F36A6085E05CC3DE6A6255DE266 /* BTCBlock.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = BTCBlock.m; path = CoreBitcoin/BTCBlock.m; sourceTree = \"<group>\"; };\n\t\tB9E969F69B4903AF8C3874528CD70FAC /* ISO8601DateFormatter.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = ISO8601DateFormatter.m; sourceTree = \"<group>\"; };\n\t\tBAEAC286EEA3BFF61C3BCA6C2EBC4DA6 /* UIWebView+AFNetworking.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = \"UIWebView+AFNetworking.h\"; path = \"UIKit+AFNetworking/UIWebView+AFNetworking.h\"; sourceTree = \"<group>\"; };\n\t\tBB4D26C1A6EA1B06BA0DC6FC6868819E /* BTCSecretSharing.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = BTCSecretSharing.h; path = CoreBitcoin/BTCSecretSharing.h; sourceTree = \"<group>\"; };\n\t\tBB772DB5DEFC30852E5E37587F7E92B9 /* UIWebView+AFNetworking.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = \"UIWebView+AFNetworking.m\"; path = \"UIKit+AFNetworking/UIWebView+AFNetworking.m\"; sourceTree = \"<group>\"; };\n\t\tBB84569F42A4339B6E3B32BF28ED4312 /* BTCAssetType.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = BTCAssetType.h; path = CoreBitcoin/BTCAssetType.h; sourceTree = \"<group>\"; };\n\t\tBBC5E3E7F121A144118750FD582CADD4 /* BTCPaymentProtocol.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = BTCPaymentProtocol.m; path = CoreBitcoin/BTCPaymentProtocol.m; sourceTree = \"<group>\"; };\n\t\tBC8E71FE3611EF19CE315EE69113F21A /* aes.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = aes.h; path = \"include-ios/openssl/aes.h\"; sourceTree = \"<group>\"; };\n\t\tC11E785CC2115B7172D2CF8207399E90 /* CLSLogging.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = CLSLogging.h; path = iOS/Crashlytics.framework/Headers/CLSLogging.h; sourceTree = \"<group>\"; };\n\t\tC14222545C1EAA80A4A5B955F3AFEE80 /* srp.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = srp.h; path = \"include-ios/openssl/srp.h\"; sourceTree = \"<group>\"; };\n\t\tC2A69643473E19463DBD4C2CBDD2D433 /* AFNetworkReachabilityManager.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = AFNetworkReachabilityManager.h; path = AFNetworking/AFNetworkReachabilityManager.h; sourceTree = \"<group>\"; };\n\t\tC2B1A54666455D7D23E1C96261304C3C /* asn1.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = asn1.h; path = \"include-ios/openssl/asn1.h\"; sourceTree = \"<group>\"; };\n\t\tC2BEBCE7EC91C47D3FCD4304B58D772A /* AFNetworkActivityIndicatorManager.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = AFNetworkActivityIndicatorManager.m; path = \"UIKit+AFNetworking/AFNetworkActivityIndicatorManager.m\"; sourceTree = \"<group>\"; };\n\t\tC30F739C17924B8CAD7268E6951DD7F9 /* libECSlidingViewController.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; name = libECSlidingViewController.a; path = libECSlidingViewController.a; sourceTree = BUILT_PRODUCTS_DIR; };\n\t\tC42A24DCB8F6C6153F837656F7CE9BD4 /* BTCProcessor.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = BTCProcessor.m; path = CoreBitcoin/BTCProcessor.m; sourceTree = \"<group>\"; };\n\t\tC49374F6F47E442F592F43CA5FA05118 /* rc2.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = rc2.h; path = \"include-ios/openssl/rc2.h\"; sourceTree = \"<group>\"; };\n\t\tC61EBFEC1B19F3CE875F69A353D28817 /* BTCPaymentMethodRequest.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = BTCPaymentMethodRequest.m; path = CoreBitcoin/BTCPaymentMethodRequest.m; sourceTree = \"<group>\"; };\n\t\tC6B67B4CBD0953AF07C7A7EA683BA3D1 /* rc4.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = rc4.h; path = \"include-ios/openssl/rc4.h\"; sourceTree = \"<group>\"; };\n\t\tC6BDB73696EB951D76D3698186EE9873 /* x509v3.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = x509v3.h; path = \"include-ios/openssl/x509v3.h\"; sourceTree = \"<group>\"; };\n\t\tC729A8AEA733B604A109D4069DA80A85 /* BTCAddress.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = BTCAddress.m; path = CoreBitcoin/BTCAddress.m; sourceTree = \"<group>\"; };\n\t\tC7A32A3612B56542180436B0E2634C62 /* BTCOutpoint.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = BTCOutpoint.h; path = CoreBitcoin/BTCOutpoint.h; sourceTree = \"<group>\"; };\n\t\tC87CCBA3F0290D5EBEEB8DB82D82F51E /* BTCScriptMachine.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = BTCScriptMachine.h; path = CoreBitcoin/BTCScriptMachine.h; sourceTree = \"<group>\"; };\n\t\tC8AF3F91C4917482FF1BA8914FDE387D /* UIProgressView+AFNetworking.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = \"UIProgressView+AFNetworking.m\"; path = \"UIKit+AFNetworking/UIProgressView+AFNetworking.m\"; sourceTree = \"<group>\"; };\n\t\tC911363C0708D8B364970A9CBE0705ED /* BTCAssetAddress.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = BTCAssetAddress.m; path = CoreBitcoin/BTCAssetAddress.m; sourceTree = \"<group>\"; };\n\t\tC9733F6129706FC99BD70DCCF1D8205C /* BTCPaymentRequest.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = BTCPaymentRequest.m; path = CoreBitcoin/BTCPaymentRequest.m; sourceTree = \"<group>\"; };\n\t\tCA98906476CA4958A7490DA34A8DD7FE /* stack.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = stack.h; path = \"include-ios/openssl/stack.h\"; sourceTree = \"<group>\"; };\n\t\tCCE41272A0F704855A6FCC02D53B28F2 /* AFURLRequestSerialization.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = AFURLRequestSerialization.m; path = AFNetworking/AFURLRequestSerialization.m; sourceTree = \"<group>\"; };\n\t\tCDFA89B2715F43080E20B63EB0CDC80F /* ecdh.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = ecdh.h; path = \"include-ios/openssl/ecdh.h\"; sourceTree = \"<group>\"; };\n\t\tCEBF3A8CF15759BD01ADD863759599D7 /* txt_db.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = txt_db.h; path = \"include-ios/openssl/txt_db.h\"; sourceTree = \"<group>\"; };\n\t\tCF48C5008E12735DA478B1604A12F757 /* pem2.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = pem2.h; path = \"include-ios/openssl/pem2.h\"; sourceTree = \"<group>\"; };\n\t\tD0B40B99E59C3A9B98C8F6B365C83EBB /* Fabric.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Fabric.framework; path = iOS/Fabric.framework; sourceTree = \"<group>\"; };\n\t\tD1FDC11EFD0999FB02A7A5DA414F0510 /* BTCTransactionInput.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = BTCTransactionInput.m; path = CoreBitcoin/BTCTransactionInput.m; sourceTree = \"<group>\"; };\n\t\tD3FB65C0D6962280B7F4420D66B43596 /* Pods-ArcBit-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = \"Pods-ArcBit-acknowledgements.markdown\"; sourceTree = \"<group>\"; };\n\t\tD5110032C21E0A1E2FA9FD93886985F5 /* BTCTransactionInput.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = BTCTransactionInput.h; path = CoreBitcoin/BTCTransactionInput.h; sourceTree = \"<group>\"; };\n\t\tD55C21A4DA43C84D66126C4E8B2B849B /* ECSlidingAnimationController.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = ECSlidingAnimationController.h; path = ECSlidingViewController/ECSlidingAnimationController.h; sourceTree = \"<group>\"; };\n\t\tD5705275A4DFC9C8BECA887F9B6888C1 /* libcrypto.a */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = archive.ar; name = libcrypto.a; path = \"lib-ios/libcrypto.a\"; sourceTree = \"<group>\"; };\n\t\tD7A22D5C8F5FF142DC1DBDAEF43AAB32 /* BTCTransaction.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = BTCTransaction.h; path = CoreBitcoin/BTCTransaction.h; sourceTree = \"<group>\"; };\n\t\tD7A782342B8F3FFB63746340B544FBA3 /* symhacks.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = symhacks.h; path = \"include-ios/openssl/symhacks.h\"; sourceTree = \"<group>\"; };\n\t\tD84CA1E104E50BFF98949E359ED07229 /* iCloudDocumentSync-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = \"iCloudDocumentSync-prefix.pch\"; sourceTree = \"<group>\"; };\n\t\tD8C714C7BF1BC16C20D8395180EFA42A /* BTCChainCom.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = BTCChainCom.h; path = CoreBitcoin/BTCChainCom.h; sourceTree = \"<group>\"; };\n\t\tD95A8623188FDBAC8832C51427B999C6 /* engine.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = engine.h; path = \"include-ios/openssl/engine.h\"; sourceTree = \"<group>\"; };\n\t\tD9D06FF1191C435709EF33B426C39B26 /* UIImageView+AFNetworking.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = \"UIImageView+AFNetworking.h\"; path = \"UIKit+AFNetworking/UIImageView+AFNetworking.h\"; sourceTree = \"<group>\"; };\n\t\tDC64E521585461F733BA6C7573F04688 /* BTCChainCom.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = BTCChainCom.m; path = CoreBitcoin/BTCChainCom.m; sourceTree = \"<group>\"; };\n\t\tDCF6A717A51C3C0946DDEA0D7D8BEE81 /* BTCErrors.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = BTCErrors.m; path = CoreBitcoin/BTCErrors.m; sourceTree = \"<group>\"; };\n\t\tDD0F8319781C1EA6BBB11ECBBB3770CB /* BTCCurvePoint.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = BTCCurvePoint.h; path = CoreBitcoin/BTCCurvePoint.h; sourceTree = \"<group>\"; };\n\t\tDD1BF95D5F3408C3AD502AF260E07064 /* BTCKey.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = BTCKey.m; path = CoreBitcoin/BTCKey.m; sourceTree = \"<group>\"; };\n\t\tDEC6EA65E8320AB615A4B6D0E33CB21F /* ec.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = ec.h; path = \"include-ios/openssl/ec.h\"; sourceTree = \"<group>\"; };\n\t\tDF435BBF67523FB6D2633A16438FDB4B /* MobileCoreServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MobileCoreServices.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.3.sdk/System/Library/Frameworks/MobileCoreServices.framework; sourceTree = DEVELOPER_DIR; };\n\t\tE1532D7537E9DCCDFAE7FC7D9DE2CFB1 /* RNDecryptor.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = RNDecryptor.m; path = RNCryptor/RNDecryptor.m; sourceTree = \"<group>\"; };\n\t\tE16C4C13851021AA94113C6161612852 /* UIImageView+AFNetworking.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = \"UIImageView+AFNetworking.m\"; path = \"UIKit+AFNetworking/UIImageView+AFNetworking.m\"; sourceTree = \"<group>\"; };\n\t\tE28A9F712C570022DFB4A3E5C234C227 /* ECSlidingViewController.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = ECSlidingViewController.xcconfig; sourceTree = \"<group>\"; };\n\t\tE29510675EAA48EE8BAFDAEA48B42DF9 /* libSwiftTryCatch.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; name = libSwiftTryCatch.a; path = libSwiftTryCatch.a; sourceTree = BUILT_PRODUCTS_DIR; };\n\t\tE2AD746BF57A2CB6FDED0CCC90C5C168 /* AFSecurityPolicy.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = AFSecurityPolicy.h; path = AFNetworking/AFSecurityPolicy.h; sourceTree = \"<group>\"; };\n\t\tE31F05BCCA952C58089CE5F4B3100747 /* BTCMnemonic.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = BTCMnemonic.h; path = CoreBitcoin/BTCMnemonic.h; sourceTree = \"<group>\"; };\n\t\tE3B3C59D4D7F861E3E38478E284B90DA /* e_os2.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = e_os2.h; path = \"include-ios/openssl/e_os2.h\"; sourceTree = \"<group>\"; };\n\t\tE7F2FEB9A355554BC2921B4EE554595C /* BTCProtocolBuffers.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = BTCProtocolBuffers.h; path = CoreBitcoin/BTCProtocolBuffers.h; sourceTree = \"<group>\"; };\n\t\tEA43B77280DECD1A33C1AD5968C972BE /* BTCSignatureHashType.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = BTCSignatureHashType.h; path = CoreBitcoin/BTCSignatureHashType.h; sourceTree = \"<group>\"; };\n\t\tEA81C189B543F410375EB049FBB9A747 /* BTCBlindSignature.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = BTCBlindSignature.m; path = CoreBitcoin/BTCBlindSignature.m; sourceTree = \"<group>\"; };\n\t\tEB74506660B7AF0E605F74DBE62C47EB /* libAFNetworking.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; name = libAFNetworking.a; path = libAFNetworking.a; sourceTree = BUILT_PRODUCTS_DIR; };\n\t\tEC6DEF7DE3693DBEC1230875E8D02098 /* ssl2.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = ssl2.h; path = \"include-ios/openssl/ssl2.h\"; sourceTree = \"<group>\"; };\n\t\tEC881D364209F7FD4C1AF32EE58E34DF /* iCloudDocument.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = iCloudDocument.m; path = iCloud/iCloudDocument.m; sourceTree = \"<group>\"; };\n\t\tEE5C77C0D444EFD01AD74D258C5A689E /* iCloudDocument.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = iCloudDocument.h; path = iCloud/iCloudDocument.h; sourceTree = \"<group>\"; };\n\t\tEE8C610AD2134201D9183AF909C5B676 /* Pods-ArcBit-frameworks.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = \"Pods-ArcBit-frameworks.sh\"; sourceTree = \"<group>\"; };\n\t\tEF2802A5BA198F6BA1D007A469D71FB6 /* blowfish.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = blowfish.h; path = \"include-ios/openssl/blowfish.h\"; sourceTree = \"<group>\"; };\n\t\tEF7AB7E36C757B0B72ABCD2E3CE14165 /* ISO8601DateFormatter.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = ISO8601DateFormatter.h; sourceTree = \"<group>\"; };\n\t\tEFC6330CF2F7403A832A255B87514526 /* BTCEncryptedMessage.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = BTCEncryptedMessage.h; path = CoreBitcoin/BTCEncryptedMessage.h; sourceTree = \"<group>\"; };\n\t\tF16B27940C786A4316DB279ACDB3A787 /* BTCBlockHeader.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = BTCBlockHeader.m; path = CoreBitcoin/BTCBlockHeader.m; sourceTree = \"<group>\"; };\n\t\tF568238E9326CC0D3B37BEF8378E4C82 /* BTCProtocolSerialization.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = BTCProtocolSerialization.h; path = CoreBitcoin/BTCProtocolSerialization.h; sourceTree = \"<group>\"; };\n\t\tF6D20A67853FC64CB48D5804B796D2FB /* BTCOpcode.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = BTCOpcode.h; path = CoreBitcoin/BTCOpcode.h; sourceTree = \"<group>\"; };\n\t\tF8405D294AF2648DD4B391F32C841BEE /* BTCPaymentMethod.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = BTCPaymentMethod.h; path = CoreBitcoin/BTCPaymentMethod.h; sourceTree = \"<group>\"; };\n\t\tF975D06D6CFDDF6089075DCE90D657E3 /* libPods-ArcBitTests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; name = \"libPods-ArcBitTests.a\"; path = \"libPods-ArcBitTests.a\"; sourceTree = BUILT_PRODUCTS_DIR; };\n\t\tFB53040695B96B39AD19A7151B4883CE /* BTCData.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = BTCData.h; path = CoreBitcoin/BTCData.h; sourceTree = \"<group>\"; };\n\t\tFC0E563F8C4BE5035B5884917AE8DF84 /* RNOpenSSLCryptor.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = RNOpenSSLCryptor.h; path = RNCryptor/RNOpenSSLCryptor.h; sourceTree = \"<group>\"; };\n\t\tFC6B63478681A9337C407470DBA5604C /* pem.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = pem.h; path = \"include-ios/openssl/pem.h\"; sourceTree = \"<group>\"; };\n\t\tFC99B895CD0F6A0FD3E937953ED08BF7 /* Pods-ArcBit.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = \"Pods-ArcBit.release.xcconfig\"; sourceTree = \"<group>\"; };\n\t\tFC9EA1D9CCA35B8ACB27228393896F0D /* Pods-ArcBitTests-frameworks.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = \"Pods-ArcBitTests-frameworks.sh\"; sourceTree = \"<group>\"; };\n\t\tFD35C580497BEF40D1F81DDF8E1D31AA /* BTCHashID.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = BTCHashID.h; path = CoreBitcoin/BTCHashID.h; sourceTree = \"<group>\"; };\n\t\tFD9524F0561C442A329DE75E81B81703 /* SwiftTryCatch-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = \"SwiftTryCatch-dummy.m\"; sourceTree = \"<group>\"; };\n\t\tFF04C2915EFC53338BADA525420D86CB /* whrlpool.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = whrlpool.h; path = \"include-ios/openssl/whrlpool.h\"; sourceTree = \"<group>\"; };\n\t\tFF0C86D39502ED60A92229C781A07E0A /* BTCAssetType.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = BTCAssetType.m; path = CoreBitcoin/BTCAssetType.m; sourceTree = \"<group>\"; };\n/* End PBXFileReference section */\n\n/* Begin PBXFrameworksBuildPhase section */\n\t\t02A10AAE8189F4F86E68AB670E000A08 /* Frameworks */ = {\n\t\t\tisa = PBXFrameworksBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t\t975A2406C8E9F0C131D580E45564BB33 /* Foundation.framework in Frameworks */,\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n\t\t05AA15DA5F0AB1CCDB1970262D77FABC /* Frameworks */ = {\n\t\t\tisa = PBXFrameworksBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t\t84679E9E865632FA405560CD4F449025 /* Foundation.framework in Frameworks */,\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n\t\t12070984FA8985EF77A932BEC1CF2A5D /* Frameworks */ = {\n\t\t\tisa = PBXFrameworksBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t\t509D8F10DC7BD0265790C450C94228E3 /* CoreGraphics.framework in Frameworks */,\n\t\t\t\t951E122F9EFF8F6DF2AAF2E80A10630A /* Foundation.framework in Frameworks */,\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n\t\t45CA6297C916C772013E3E058849799E /* Frameworks */ = {\n\t\t\tisa = PBXFrameworksBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t\tC22B29392E1960E2C9C1DF9241F5BFA3 /* Foundation.framework in Frameworks */,\n\t\t\t\t859DD51FBF9B75205E80E763CCCCE18F /* Security.framework in Frameworks */,\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n\t\t697712E522DE3F64B3F3F4815B3AFA0B /* Frameworks */ = {\n\t\t\tisa = PBXFrameworksBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t\tA8A3B2C64198773A05404BC4110D48D2 /* Foundation.framework in Frameworks */,\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n\t\t69A8A46833359CE1AC7247CF4E768BB0 /* Frameworks */ = {\n\t\t\tisa = PBXFrameworksBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t\tE088DCD5DC607F8EF82B333F0F84C1D9 /* Foundation.framework in Frameworks */,\n\t\t\t\tFC71F8B5DB7BE6CE6B7764F7633874F6 /* UIKit.framework in Frameworks */,\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n\t\t771FE8ECDC533192AC3D245226889F98 /* Frameworks */ = {\n\t\t\tisa = PBXFrameworksBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t\t99B48542BDF0D62B93C109A173C06C1C /* Foundation.framework in Frameworks */,\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n\t\t7C50334B7FA0E841EB75DDDC2CFE2401 /* Frameworks */ = {\n\t\t\tisa = PBXFrameworksBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t\t8A2274B380DC9B94C56DB06A6FC8E8A8 /* Foundation.framework in Frameworks */,\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n\t\tB418BACF90093A79E0C042E4C1F5E571 /* Frameworks */ = {\n\t\t\tisa = PBXFrameworksBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t\t781CB81F1FB4E84F94BC28E4123082C5 /* Foundation.framework in Frameworks */,\n\t\t\t\tB280D43B5E9C2BC556D25E73B7753AC1 /* UIKit.framework in Frameworks */,\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n\t\tDA5F50097FC6E9DB8C1A8DB5D17239D7 /* Frameworks */ = {\n\t\t\tisa = PBXFrameworksBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t\t20B9F40C3125BDD7ADF3097D24D116EF /* CoreGraphics.framework in Frameworks */,\n\t\t\t\tE1E2F244CC9732834EECE8B7E912A9C9 /* Foundation.framework in Frameworks */,\n\t\t\t\t39748F32DA9EF296DEC7F4CF765EC3BD /* MobileCoreServices.framework in Frameworks */,\n\t\t\t\t8F3C4EE44BD958C90BA2442B5904740B /* Security.framework in Frameworks */,\n\t\t\t\t537B71A840C787F2BD29444155626796 /* SystemConfiguration.framework in Frameworks */,\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n/* End PBXFrameworksBuildPhase section */\n\n/* Begin PBXGroup section */\n\t\t030184660478C2BB8B70F65D4C399639 /* NSURLConnection */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t9364642FCE9090B4B0743D6604BB999E /* AFHTTPRequestOperation.h */,\n\t\t\t\t96B5F1776737E149C6B9180F818F6142 /* AFHTTPRequestOperation.m */,\n\t\t\t\t4568221EFCC65F30C8C6DC81E7CFD2A7 /* AFHTTPRequestOperationManager.h */,\n\t\t\t\t9E45F943C96D8E3C50638CD8F5242611 /* AFHTTPRequestOperationManager.m */,\n\t\t\t\t9FFC430C65EB18FB1AEC5CF6E37B386C /* AFURLConnectionOperation.h */,\n\t\t\t\t29D29260D3A74CC78621C240CA01D174 /* AFURLConnectionOperation.m */,\n\t\t\t);\n\t\t\tname = NSURLConnection;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t07E381A52C9C8D79FF1B685CCC9155DD /* iCloudDocumentSync */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t3ADD9C6C30CB84EF8945D954A71B001A /* iCloud.h */,\n\t\t\t\t5D67C685F012E5FA93EB001BE1CAB1BC /* iCloud.m */,\n\t\t\t\t9E23DC3F96FAA164FA689122F745FC3E /* iCloud-Prefix.pch */,\n\t\t\t\tEE5C77C0D444EFD01AD74D258C5A689E /* iCloudDocument.h */,\n\t\t\t\tEC881D364209F7FD4C1AF32EE58E34DF /* iCloudDocument.m */,\n\t\t\t\t3E93F6D428046D9F846CB06299CAD39C /* Support Files */,\n\t\t\t);\n\t\t\tname = iCloudDocumentSync;\n\t\t\tpath = iCloudDocumentSync;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t0B0F781E45F9FA8B902B7B2BD325CD7B /* Fabric */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t0B60760A3967D74BFF118250C393849C /* FABAttributes.h */,\n\t\t\t\t2BAAFC230F5423868CD7029095DEA489 /* Fabric.h */,\n\t\t\t\t624319983EDDF931E10A6F0BB1609279 /* Frameworks */,\n\t\t\t);\n\t\t\tname = Fabric;\n\t\t\tpath = Fabric;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t0D0BD2C87F9BDA5E1FE86C812799B3F7 /* Pods */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\tDF92DB3E6496D56FD7D51586BA31E508 /* AFNetworking */,\n\t\t\t\t3E720EAD41B1025E903CA0C524271487 /* CoreBitcoin */,\n\t\t\t\tB8A12629D49F2BC78302F4CEDC2F2DC8 /* Crashlytics */,\n\t\t\t\t7C5424E985A897E26F597EEEC5CDE3C7 /* ECSlidingViewController */,\n\t\t\t\t0B0F781E45F9FA8B902B7B2BD325CD7B /* Fabric */,\n\t\t\t\t07E381A52C9C8D79FF1B685CCC9155DD /* iCloudDocumentSync */,\n\t\t\t\t9FF02D120EB7C26C875B2F43899EC459 /* ISO8601DateFormatter */,\n\t\t\t\t3F9463B73D9002D40BF91393B407FA65 /* MBProgressHUD */,\n\t\t\t\tA4330B47B5E764304177608FEE24C6E7 /* OpenSSL-Universal */,\n\t\t\t\tB2AC093C7635BDA2B6C0584054B827F2 /* RNCryptor */,\n\t\t\t\t913B808C490CD59ABACE8B3D70E269EC /* SwiftTryCatch */,\n\t\t\t);\n\t\t\tname = Pods;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t0F75DF6C7C5F002280EC53F48E80B587 /* Frameworks */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\tFBE2CE3B81E4A1287EFFD440F4CCD3AE /* iOS */,\n\t\t\t);\n\t\t\tname = Frameworks;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t14B8EC6AAB0DAEFEF3C4E69AD3A8596B /* Support Files */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\tA7BF3D0BF140305FA5FE4908A6695EC4 /* CoreBitcoin.xcconfig */,\n\t\t\t\t57871905EF3ECD09DB2CFC0AC6E65998 /* CoreBitcoin-dummy.m */,\n\t\t\t\t2AB381AE428E36729E33FA1A3842DE61 /* CoreBitcoin-prefix.pch */,\n\t\t\t);\n\t\t\tname = \"Support Files\";\n\t\t\tpath = \"../Target Support Files/CoreBitcoin\";\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t1765A89613A9CD72776A9B40EC540088 /* Products */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\tEB74506660B7AF0E605F74DBE62C47EB /* libAFNetworking.a */,\n\t\t\t\t1D8404557EC53259D973D11E9DAB5272 /* libCoreBitcoin.a */,\n\t\t\t\tC30F739C17924B8CAD7268E6951DD7F9 /* libECSlidingViewController.a */,\n\t\t\t\t6A00BD8D7285ABA9BC788430C8293668 /* libiCloudDocumentSync.a */,\n\t\t\t\t673B899D2723B2CB9E2057F9A04EFE78 /* libISO8601DateFormatter.a */,\n\t\t\t\t305398BB3744725353B9D90AC6D1F583 /* libMBProgressHUD.a */,\n\t\t\t\t20B68F141A16E4EF4902FC2E1C7D2EA3 /* libPods-ArcBit.a */,\n\t\t\t\tF975D06D6CFDDF6089075DCE90D657E3 /* libPods-ArcBitTests.a */,\n\t\t\t\t52BAF2C56ABBC282857C15635D8C9B64 /* libRNCryptor.a */,\n\t\t\t\tE29510675EAA48EE8BAFDAEA48B42DF9 /* libSwiftTryCatch.a */,\n\t\t\t);\n\t\t\tname = Products;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t3E720EAD41B1025E903CA0C524271487 /* CoreBitcoin */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t2AD3ACEC341CE91CA7C6D7BD0338799E /* BTC256.h */,\n\t\t\t\t69071EF28C446FEBFCE2C0CF435D3368 /* BTC256.m */,\n\t\t\t\t926B1BE83431EFA92C6889CF0F962EC5 /* BTCAddress.h */,\n\t\t\t\tC729A8AEA733B604A109D4069DA80A85 /* BTCAddress.m */,\n\t\t\t\t44DB0341C60431BB4374C3C55991A5CB /* BTCAddressSubclass.h */,\n\t\t\t\t4B99F0CCD4DA870000CA786F89DC48F8 /* BTCAssetAddress.h */,\n\t\t\t\tC911363C0708D8B364970A9CBE0705ED /* BTCAssetAddress.m */,\n\t\t\t\tA6A1BC3EA56D44A5C7D47A4D4BE6D6C1 /* BTCAssetID.h */,\n\t\t\t\t97F6BBA0155779DEEAE85D4FE7376407 /* BTCAssetID.m */,\n\t\t\t\tBB84569F42A4339B6E3B32BF28ED4312 /* BTCAssetType.h */,\n\t\t\t\tFF0C86D39502ED60A92229C781A07E0A /* BTCAssetType.m */,\n\t\t\t\t4C96C3A92DF5389D6DB9B885F78D5F53 /* BTCBase58.h */,\n\t\t\t\t7C2EDB5624A05C547A02BC8C55F247A5 /* BTCBase58.m */,\n\t\t\t\t9E5575178601F6294E9902228F527172 /* BTCBigNumber.h */,\n\t\t\t\t0BFFDEA2254275342E5FF37F820ADDD5 /* BTCBigNumber.m */,\n\t\t\t\t5C89DBB9475C49B2C4060DA2E950D5E7 /* BTCBitcoinURL.h */,\n\t\t\t\t30FCC9CDF587ADAAB7152D0F32CB89FE /* BTCBitcoinURL.m */,\n\t\t\t\t87BCE824E7678FE5EBEA0235D8330EA7 /* BTCBlindSignature.h */,\n\t\t\t\tEA81C189B543F410375EB049FBB9A747 /* BTCBlindSignature.m */,\n\t\t\t\t5D2B0B6D9A30C1EB58543F2588C21FE8 /* BTCBlock.h */,\n\t\t\t\tB97A9F36A6085E05CC3DE6A6255DE266 /* BTCBlock.m */,\n\t\t\t\t3F864BF78EBDBA2F6A036E48CFE9A3CD /* BTCBlockchainInfo.h */,\n\t\t\t\t8196BF2515D56AC87BEF5AEE87C80E55 /* BTCBlockchainInfo.m */,\n\t\t\t\t78275AA10E03112AB7651930D2FEF07F /* BTCBlockHeader.h */,\n\t\t\t\tF16B27940C786A4316DB279ACDB3A787 /* BTCBlockHeader.m */,\n\t\t\t\tD8C714C7BF1BC16C20D8395180EFA42A /* BTCChainCom.h */,\n\t\t\t\tDC64E521585461F733BA6C7573F04688 /* BTCChainCom.m */,\n\t\t\t\t4E1EC27FE9E74D31E3DD4E4E322CCC2E /* BTCCurrencyConverter.h */,\n\t\t\t\t017F79965309247B464A2E9077300F40 /* BTCCurrencyConverter.m */,\n\t\t\t\tDD0F8319781C1EA6BBB11ECBBB3770CB /* BTCCurvePoint.h */,\n\t\t\t\t6710354228A5BD574ADD2F8D380B870D /* BTCCurvePoint.m */,\n\t\t\t\tFB53040695B96B39AD19A7151B4883CE /* BTCData.h */,\n\t\t\t\t3B93B7114FDC5DB79DBEAE265BAF57DD /* BTCData.m */,\n\t\t\t\t1718A59435B8197A0B82184515F2B686 /* BTCEncryptedBackup.h */,\n\t\t\t\t2646D482FE67F1BEE2AE9985DB65515A /* BTCEncryptedBackup.m */,\n\t\t\t\tEFC6330CF2F7403A832A255B87514526 /* BTCEncryptedMessage.h */,\n\t\t\t\t42D35BBBF2A12BBFDEE2F74DAB712E16 /* BTCEncryptedMessage.m */,\n\t\t\t\t98A575A1E3AB80D19F4D6090B6293DE2 /* BTCErrors.h */,\n\t\t\t\tDCF6A717A51C3C0946DDEA0D7D8BEE81 /* BTCErrors.m */,\n\t\t\t\tB2174704DBD9150D7DCAFDB9151E1F23 /* BTCFancyEncryptedMessage.h */,\n\t\t\t\tAFF88FAFB575B9864DDB1D5EF0A57352 /* BTCFancyEncryptedMessage.m */,\n\t\t\t\tFD35C580497BEF40D1F81DDF8E1D31AA /* BTCHashID.h */,\n\t\t\t\t4601C8F6520F45BDCE5FC2A299621713 /* BTCHashID.m */,\n\t\t\t\t27C37E67B87FD50378CB45AD53ECF8A1 /* BTCKey.h */,\n\t\t\t\tDD1BF95D5F3408C3AD502AF260E07064 /* BTCKey.m */,\n\t\t\t\t089AAFE5C34DBDD9395BC21AE2D603F8 /* BTCKeychain.h */,\n\t\t\t\t3A5449F7197D95336EEA0C7681EB3DF1 /* BTCKeychain.m */,\n\t\t\t\t1F2D66D912FC659A8835B1A1A425B343 /* BTCMerkleTree.h */,\n\t\t\t\t6047241D1ABED1CB4FC8B6D898F49CF6 /* BTCMerkleTree.m */,\n\t\t\t\tE31F05BCCA952C58089CE5F4B3100747 /* BTCMnemonic.h */,\n\t\t\t\t3406E2490301E48E8A2EC1D254072CEA /* BTCMnemonic.m */,\n\t\t\t\t9650B3DD2279978E8859946950D445F1 /* BTCNetwork.h */,\n\t\t\t\tB59ED59D5803800B0CA89062A2A1F7D0 /* BTCNetwork.m */,\n\t\t\t\t21B793E2BB6FF737E9C4003D4DC97F49 /* BTCNumberFormatter.h */,\n\t\t\t\t6A9A6A5FB261FE3C10784D378B8B002C /* BTCNumberFormatter.m */,\n\t\t\t\tF6D20A67853FC64CB48D5804B796D2FB /* BTCOpcode.h */,\n\t\t\t\t7F12F0EBD217A110BB685C0DBE6467D8 /* BTCOpcode.m */,\n\t\t\t\tC7A32A3612B56542180436B0E2634C62 /* BTCOutpoint.h */,\n\t\t\t\t9626DC346A3B691120AB218DAF98FFA9 /* BTCOutpoint.m */,\n\t\t\t\tF8405D294AF2648DD4B391F32C841BEE /* BTCPaymentMethod.h */,\n\t\t\t\t622300290A134A91440F8B954658F57D /* BTCPaymentMethod.m */,\n\t\t\t\t4EF9CEB2D984F13521541123BAAE96E6 /* BTCPaymentMethodDetails.h */,\n\t\t\t\t7DC1F65ABDA3897DA8A4BDA87AD43983 /* BTCPaymentMethodDetails.m */,\n\t\t\t\t4A377D007D598717227EAF729E278A45 /* BTCPaymentMethodRequest.h */,\n\t\t\t\tC61EBFEC1B19F3CE875F69A353D28817 /* BTCPaymentMethodRequest.m */,\n\t\t\t\tB18465F66373770B44A93F9034E18367 /* BTCPaymentProtocol.h */,\n\t\t\t\tBBC5E3E7F121A144118750FD582CADD4 /* BTCPaymentProtocol.m */,\n\t\t\t\t7DD7CF735F02F1F66EB97CD125CE3ED8 /* BTCPaymentRequest.h */,\n\t\t\t\tC9733F6129706FC99BD70DCCF1D8205C /* BTCPaymentRequest.m */,\n\t\t\t\tA000205D1D6B3E430777942746A5B94A /* BTCPriceSource.h */,\n\t\t\t\t1B1CDD72CE112D023028FE9320538937 /* BTCPriceSource.m */,\n\t\t\t\tA9ADCD48D22F734471E0F198B383FD89 /* BTCProcessor.h */,\n\t\t\t\tC42A24DCB8F6C6153F837656F7CE9BD4 /* BTCProcessor.m */,\n\t\t\t\tE7F2FEB9A355554BC2921B4EE554595C /* BTCProtocolBuffers.h */,\n\t\t\t\t26C7B8D80607F689138B7DFCF624B44B /* BTCProtocolBuffers.m */,\n\t\t\t\tF568238E9326CC0D3B37BEF8378E4C82 /* BTCProtocolSerialization.h */,\n\t\t\t\t65CBDBDB59EBB0092751843AD8D8FD19 /* BTCProtocolSerialization.m */,\n\t\t\t\t690412BA91917B13E770897731D06BB7 /* BTCQRCode.h */,\n\t\t\t\t968EFFBB3C5DC12A819A7C6737A00736 /* BTCQRCode.m */,\n\t\t\t\t91230138A41D4BB01490A0AA930B1847 /* BTCScript.h */,\n\t\t\t\t1838135C726D60B599B0187C2618E0CE /* BTCScript.m */,\n\t\t\t\tC87CCBA3F0290D5EBEEB8DB82D82F51E /* BTCScriptMachine.h */,\n\t\t\t\t89E02999252A83B1DD09D82D5BE212AD /* BTCScriptMachine.m */,\n\t\t\t\tBB4D26C1A6EA1B06BA0DC6FC6868819E /* BTCSecretSharing.h */,\n\t\t\t\t434E2AC4753FC3B4C4D380D2104814D0 /* BTCSecretSharing.m */,\n\t\t\t\tEA43B77280DECD1A33C1AD5968C972BE /* BTCSignatureHashType.h */,\n\t\t\t\tD7A22D5C8F5FF142DC1DBDAEF43AAB32 /* BTCTransaction.h */,\n\t\t\t\tB554C42813D25D9DD0844ED5EE902B51 /* BTCTransaction.m */,\n\t\t\t\t283D94566D2E1147D94E5A2DEE54FB51 /* BTCTransactionBuilder.h */,\n\t\t\t\tAFE92316288527A68C5561E6B187C546 /* BTCTransactionBuilder.m */,\n\t\t\t\tD5110032C21E0A1E2FA9FD93886985F5 /* BTCTransactionInput.h */,\n\t\t\t\tD1FDC11EFD0999FB02A7A5DA414F0510 /* BTCTransactionInput.m */,\n\t\t\t\t3A5E43CCF0C5266E9B11AAFF956E987F /* BTCTransactionOutput.h */,\n\t\t\t\tB6BD8C2B2FC7CB2FB94E4CBDC564F1FF /* BTCTransactionOutput.m */,\n\t\t\t\t322C51259AC52C0C48070FD85C261611 /* BTCUnitsAndLimits.h */,\n\t\t\t\tABBE05FC6756637067D69B4F0FFA9ECA /* CoreBitcoin.h */,\n\t\t\t\tB470DC06AA1DABE32AD454CA5ECDF951 /* CoreBitcoin+Categories.h */,\n\t\t\t\t2F3D49EDACFA409A3ED119E04C877751 /* NS+BTCBase58.h */,\n\t\t\t\t63F667F34F6BA7AC95672F51C7C43F68 /* NS+BTCBase58.m */,\n\t\t\t\t95A4613C6B9FBCC64EF6EF22C9F47FC7 /* NSData+BTCData.h */,\n\t\t\t\t12CCE6386A939D9DA71166D908710B9C /* NSData+BTCData.m */,\n\t\t\t\t96380AFFC297F299DA19C48AE5AEDD8D /* SwiftBridgingHeader.h */,\n\t\t\t\t14B8EC6AAB0DAEFEF3C4E69AD3A8596B /* Support Files */,\n\t\t\t);\n\t\t\tname = CoreBitcoin;\n\t\t\tpath = CoreBitcoin;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t3E93F6D428046D9F846CB06299CAD39C /* Support Files */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t0FA1AC957975C828AAB3F1ECB8B7BC42 /* iCloudDocumentSync.xcconfig */,\n\t\t\t\t62CC634C5A1D2CA241DB09FC5983A4EB /* iCloudDocumentSync-dummy.m */,\n\t\t\t\tD84CA1E104E50BFF98949E359ED07229 /* iCloudDocumentSync-prefix.pch */,\n\t\t\t);\n\t\t\tname = \"Support Files\";\n\t\t\tpath = \"../Target Support Files/iCloudDocumentSync\";\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t3F9463B73D9002D40BF91393B407FA65 /* MBProgressHUD */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t0CF3D23BB4C249819D14682EACF58A20 /* MBProgressHUD.h */,\n\t\t\t\t7760068D6E82C5B3178AAE2F4AE5077F /* MBProgressHUD.m */,\n\t\t\t\tE253F21F5D1DA381775B9F645653A835 /* Support Files */,\n\t\t\t);\n\t\t\tname = MBProgressHUD;\n\t\t\tpath = MBProgressHUD;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t5D12F94A33A6ADFAC58C5D720BD0C6CD /* Support Files */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t7670A2D213D3E45C32D51688A27FD23A /* SwiftTryCatch.xcconfig */,\n\t\t\t\tFD9524F0561C442A329DE75E81B81703 /* SwiftTryCatch-dummy.m */,\n\t\t\t\t887EDAD0BA5E2C0A42C113514A39A92E /* SwiftTryCatch-prefix.pch */,\n\t\t\t);\n\t\t\tname = \"Support Files\";\n\t\t\tpath = \"../Target Support Files/SwiftTryCatch\";\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t60389CF04E081F619AFEC86D0089FF66 /* UIKit */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\tB1CE3678138E27EC67C9349F00D257D9 /* AFNetworkActivityIndicatorManager.h */,\n\t\t\t\tC2BEBCE7EC91C47D3FCD4304B58D772A /* AFNetworkActivityIndicatorManager.m */,\n\t\t\t\t6851FCE26E0D26FC7F04E48221F849F3 /* UIActivityIndicatorView+AFNetworking.h */,\n\t\t\t\t8391F9908A82B5F80CB1FD12E0FA8B57 /* UIActivityIndicatorView+AFNetworking.m */,\n\t\t\t\t42F713ECA87249B899D3B63725BF7054 /* UIAlertView+AFNetworking.h */,\n\t\t\t\tA178C0870C61FF73F641C3CB1815D30E /* UIAlertView+AFNetworking.m */,\n\t\t\t\t704A68A6D827D96806B271BE3113DDD2 /* UIButton+AFNetworking.h */,\n\t\t\t\t5925F50312D0A8BEB719D583F0821D7B /* UIButton+AFNetworking.m */,\n\t\t\t\tD9D06FF1191C435709EF33B426C39B26 /* UIImageView+AFNetworking.h */,\n\t\t\t\tE16C4C13851021AA94113C6161612852 /* UIImageView+AFNetworking.m */,\n\t\t\t\t1FBEFD9A7C204DC3986D80A4D60BE777 /* UIKit+AFNetworking.h */,\n\t\t\t\t68244B055DAD14CE619D3F57E41769AA /* UIProgressView+AFNetworking.h */,\n\t\t\t\tC8AF3F91C4917482FF1BA8914FDE387D /* UIProgressView+AFNetworking.m */,\n\t\t\t\t8772768A16B56345E6A2800163C1FE10 /* UIRefreshControl+AFNetworking.h */,\n\t\t\t\t53E5CD5AF49A1DF1C602CA0AF8F193E0 /* UIRefreshControl+AFNetworking.m */,\n\t\t\t\tBAEAC286EEA3BFF61C3BCA6C2EBC4DA6 /* UIWebView+AFNetworking.h */,\n\t\t\t\tBB772DB5DEFC30852E5E37587F7E92B9 /* UIWebView+AFNetworking.m */,\n\t\t\t);\n\t\t\tname = UIKit;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t624319983EDDF931E10A6F0BB1609279 /* Frameworks */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\tD0B40B99E59C3A9B98C8F6B365C83EBB /* Fabric.framework */,\n\t\t\t);\n\t\t\tname = Frameworks;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t71A455F373B0EAE1A483764B27481915 /* Support Files */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t16915D02A8A00F9C7D158B8221B290B9 /* AFNetworking.xcconfig */,\n\t\t\t\t43EDF1C1707F51979A1302FA4E5276F0 /* AFNetworking-dummy.m */,\n\t\t\t\t7D9EAD18442D98ACCEBDB61AFEEDE3ED /* AFNetworking-prefix.pch */,\n\t\t\t);\n\t\t\tname = \"Support Files\";\n\t\t\tpath = \"../Target Support Files/AFNetworking\";\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t7785E6E125B1B528F154FD8578772790 /* NSURLSession */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t0F56888FEA4A38E48950754C72F65F5D /* AFHTTPSessionManager.h */,\n\t\t\t\t121374C01FAF018E3BEC9EEB2D59943B /* AFHTTPSessionManager.m */,\n\t\t\t\t5F0609F4118E597A2B4F3227118BC524 /* AFURLSessionManager.h */,\n\t\t\t\t23335AC4D3FA28AA61F7E3BD65845217 /* AFURLSessionManager.m */,\n\t\t\t);\n\t\t\tname = NSURLSession;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t7C5424E985A897E26F597EEEC5CDE3C7 /* ECSlidingViewController */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t44A27D79184E550B8BF16D43686B8103 /* ECPercentDrivenInteractiveTransition.h */,\n\t\t\t\t727E08CD1798AAE87E25F55C0B89D769 /* ECPercentDrivenInteractiveTransition.m */,\n\t\t\t\tD55C21A4DA43C84D66126C4E8B2B849B /* ECSlidingAnimationController.h */,\n\t\t\t\t5404DFC2700BD9442349F21434850E2C /* ECSlidingAnimationController.m */,\n\t\t\t\t0924252A24518EEBBB6F07378B1D7E97 /* ECSlidingConstants.h */,\n\t\t\t\t558C53E6690D240D8391051E6C6F2715 /* ECSlidingInteractiveTransition.h */,\n\t\t\t\t4B1C1DD9382F2A712DE5C3390237661B /* ECSlidingInteractiveTransition.m */,\n\t\t\t\t69A9C1ADE6FD1FE80CF9D2E4BDFBF206 /* ECSlidingSegue.h */,\n\t\t\t\tB833F142C71CA5B8878537DFA143861B /* ECSlidingSegue.m */,\n\t\t\t\tB45C1F6CA3469E2F0271992AD57BD4F9 /* ECSlidingViewController.h */,\n\t\t\t\t5309C020F5D6D0CE0EDD9B861941DD5D /* ECSlidingViewController.m */,\n\t\t\t\t1C8BA2567941B54A71EE197BA8A4079A /* UIViewController+ECSlidingViewController.h */,\n\t\t\t\t3E55085F0B0CDF9F2CCE91BBA6EE793A /* UIViewController+ECSlidingViewController.m */,\n\t\t\t\tB2F66C302E323341B29ED44651FBDDA8 /* Support Files */,\n\t\t\t);\n\t\t\tname = ECSlidingViewController;\n\t\t\tpath = ECSlidingViewController;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t7DB346D0F39D3F0E887471402A8071AB = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t93A4A3777CF96A4AAC1D13BA6DCCEA73 /* Podfile */,\n\t\t\t\t0F75DF6C7C5F002280EC53F48E80B587 /* Frameworks */,\n\t\t\t\t0D0BD2C87F9BDA5E1FE86C812799B3F7 /* Pods */,\n\t\t\t\t1765A89613A9CD72776A9B40EC540088 /* Products */,\n\t\t\t\tF3C96374B9882C8C0A204253CFDCA5DA /* Targets Support Files */,\n\t\t\t);\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t8BE1B7BC6B531A45A5EB4EBAE8B00C02 /* Frameworks */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\tD5705275A4DFC9C8BECA887F9B6888C1 /* libcrypto.a */,\n\t\t\t\t7E696E50F7529267F317F186E3A492CC /* libssl.a */,\n\t\t\t);\n\t\t\tname = Frameworks;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t913B808C490CD59ABACE8B3D70E269EC /* SwiftTryCatch */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t646CE467706A99D849BC06AD80712EEA /* SwiftTryCatch.h */,\n\t\t\t\t3D039782643D47B1684BBF43409C2722 /* SwiftTryCatch.m */,\n\t\t\t\t5D12F94A33A6ADFAC58C5D720BD0C6CD /* Support Files */,\n\t\t\t);\n\t\t\tname = SwiftTryCatch;\n\t\t\tpath = SwiftTryCatch;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t9FF02D120EB7C26C875B2F43899EC459 /* ISO8601DateFormatter */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\tEF7AB7E36C757B0B72ABCD2E3CE14165 /* ISO8601DateFormatter.h */,\n\t\t\t\tB9E969F69B4903AF8C3874528CD70FAC /* ISO8601DateFormatter.m */,\n\t\t\t\tBDC96F20C16AD39C1ACE462B73E3A8CF /* Support Files */,\n\t\t\t);\n\t\t\tname = ISO8601DateFormatter;\n\t\t\tpath = ISO8601DateFormatter;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\tA301225F43AAD3F875C25939D007F6B2 /* Reachability */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\tC2A69643473E19463DBD4C2CBDD2D433 /* AFNetworkReachabilityManager.h */,\n\t\t\t\t79A8293A1A2EFC4F61BFA16C220483F5 /* AFNetworkReachabilityManager.m */,\n\t\t\t);\n\t\t\tname = Reachability;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\tA353C20636C9286156403BB76396A366 /* Pods-ArcBit */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\tD3FB65C0D6962280B7F4420D66B43596 /* Pods-ArcBit-acknowledgements.markdown */,\n\t\t\t\tA7A8286BC37B5BED353CCB37AD658D98 /* Pods-ArcBit-acknowledgements.plist */,\n\t\t\t\t3C7B8558FCB190A36E5966E079FD5ADB /* Pods-ArcBit-dummy.m */,\n\t\t\t\tEE8C610AD2134201D9183AF909C5B676 /* Pods-ArcBit-frameworks.sh */,\n\t\t\t\t64C078F6A5B26EF2155EC8A76DBF5EA9 /* Pods-ArcBit-resources.sh */,\n\t\t\t\t5C889781B47A464116B2EC159698C667 /* Pods-ArcBit.debug.xcconfig */,\n\t\t\t\tFC99B895CD0F6A0FD3E937953ED08BF7 /* Pods-ArcBit.release.xcconfig */,\n\t\t\t);\n\t\t\tname = \"Pods-ArcBit\";\n\t\t\tpath = \"Target Support Files/Pods-ArcBit\";\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\tA4330B47B5E764304177608FEE24C6E7 /* OpenSSL-Universal */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\tBC8E71FE3611EF19CE315EE69113F21A /* aes.h */,\n\t\t\t\tC2B1A54666455D7D23E1C96261304C3C /* asn1.h */,\n\t\t\t\t7117956F8B52C2D7D6C70BF81E6702D5 /* asn1_mac.h */,\n\t\t\t\t7B557D038A9B95403FF7CDDEBD475062 /* asn1t.h */,\n\t\t\t\t781ABA62CA489B9117ED96DB5E9A617C /* bio.h */,\n\t\t\t\tEF2802A5BA198F6BA1D007A469D71FB6 /* blowfish.h */,\n\t\t\t\t14CD046F3B6134C29B8D0497BBD538E8 /* bn.h */,\n\t\t\t\tA3179C0D8BDFEB0614A408B889916ADF /* buffer.h */,\n\t\t\t\t65E05090B622494D212CD1603420DBD1 /* camellia.h */,\n\t\t\t\t00AA359394CF66727650039AA54B2A3F /* cast.h */,\n\t\t\t\t856EC83D619085DFE8E22497DD52B405 /* cmac.h */,\n\t\t\t\t79EA4FD7FD567744FCA13579DB5E070B /* cms.h */,\n\t\t\t\t215FB89ABD80BF154457D2BCBEBEB61D /* comp.h */,\n\t\t\t\t2C1B1775F28C9AAE4FF52102DC65FE32 /* conf.h */,\n\t\t\t\t0E51620D5F54C1A78950AE67E60B5328 /* conf_api.h */,\n\t\t\t\tA9F6E8443B4427FB40F2FFDAAF8B6C3D /* crypto.h */,\n\t\t\t\t9F7A08F9107585A5F542A464B816AC40 /* des.h */,\n\t\t\t\t92D8FABBD7406AC39E7CE5E7BD22B63D /* des_old.h */,\n\t\t\t\t0ACFDE8A48224EBB52F1E4863FB6F58B /* dh.h */,\n\t\t\t\t10E3619F3F837EECB0063047999F1E1C /* dsa.h */,\n\t\t\t\t7195ECDC25A6C0A20667A39FAD9A4347 /* dso.h */,\n\t\t\t\t8B13DE49B89A8CD2DA66CB9A5A1D75FD /* dtls1.h */,\n\t\t\t\tE3B3C59D4D7F861E3E38478E284B90DA /* e_os2.h */,\n\t\t\t\t66E850C3F2C557DCA8615EE41EA8B2CB /* ebcdic.h */,\n\t\t\t\tDEC6EA65E8320AB615A4B6D0E33CB21F /* ec.h */,\n\t\t\t\tCDFA89B2715F43080E20B63EB0CDC80F /* ecdh.h */,\n\t\t\t\t0AB7F42329EFBF191A021235FB9BA81C /* ecdsa.h */,\n\t\t\t\tD95A8623188FDBAC8832C51427B999C6 /* engine.h */,\n\t\t\t\tAEE4A3D3B6C014FBC6E9CF0D744B721C /* err.h */,\n\t\t\t\t2252F734E0D9E30F4205D0C25EA1A852 /* evp.h */,\n\t\t\t\t49A907C6DA8E0D3398F98202C6C16950 /* hmac.h */,\n\t\t\t\t57639FDACD732ABAB857087B8A5BAA6A /* idea.h */,\n\t\t\t\t00A9559B55632C1E546506597C9ABC6F /* krb5_asn.h */,\n\t\t\t\t09E6204C6D657974C73AA9968735D594 /* kssl.h */,\n\t\t\t\t000BDDC2887EEE808ED91C33C9776E40 /* lhash.h */,\n\t\t\t\t53E2F1D4C25E3C1475AAD9EF4D050B82 /* md4.h */,\n\t\t\t\t7190966A344D75D624FA4A03BE2B2E50 /* md5.h */,\n\t\t\t\t95B661EF2DA6D14E93C5F89F574C8549 /* mdc2.h */,\n\t\t\t\tACAD38A8E111EB2F6BC3164811A69F2B /* modes.h */,\n\t\t\t\t13AA36E5FD9DA23360AC08544F74B2BB /* obj_mac.h */,\n\t\t\t\t6A83258FB66AF6AA450F494AE270BA71 /* objects.h */,\n\t\t\t\t87B22FC39C3AF004478919883622A396 /* ocsp.h */,\n\t\t\t\t99330B15193AB732067124D96F8082E4 /* opensslconf.h */,\n\t\t\t\t416659F11E80B403427CA728090FBBCA /* opensslv.h */,\n\t\t\t\t2F62C2C5C88BD012130E5970AA2588C4 /* ossl_typ.h */,\n\t\t\t\tFC6B63478681A9337C407470DBA5604C /* pem.h */,\n\t\t\t\tCF48C5008E12735DA478B1604A12F757 /* pem2.h */,\n\t\t\t\tA8230040F65D1E47D3463A644108E95C /* pkcs12.h */,\n\t\t\t\t65C351E0C8F9499ED05E0C60690B8B9E /* pkcs7.h */,\n\t\t\t\t8223797E7C32BD69D1A3F0FD4A2BA375 /* pqueue.h */,\n\t\t\t\t56693BA0F9E535A362A61EB29B867F4B /* rand.h */,\n\t\t\t\tC49374F6F47E442F592F43CA5FA05118 /* rc2.h */,\n\t\t\t\tC6B67B4CBD0953AF07C7A7EA683BA3D1 /* rc4.h */,\n\t\t\t\t036EE094EFA5F18B03345F27C4D328B5 /* ripemd.h */,\n\t\t\t\t5B7DCF24ABD1CDF71A566E0FA98C99C4 /* rsa.h */,\n\t\t\t\t5AFC5BFB8A09CAD241DCC07B5CC64194 /* safestack.h */,\n\t\t\t\t4036EA42116308A137FF7CFFF51226AF /* seed.h */,\n\t\t\t\t949C624099940C4EEA9781323CDC12F9 /* sha.h */,\n\t\t\t\tC14222545C1EAA80A4A5B955F3AFEE80 /* srp.h */,\n\t\t\t\t2974F3AB8EA4C9111383A32EF643CD75 /* srtp.h */,\n\t\t\t\t3FD69758D716663314E37B8A49A012B9 /* ssl.h */,\n\t\t\t\tEC6DEF7DE3693DBEC1230875E8D02098 /* ssl2.h */,\n\t\t\t\tB6296282034FB8421AF6C169E4218094 /* ssl23.h */,\n\t\t\t\t6C15FB69527AF481EE85B8A505FFCD2D /* ssl3.h */,\n\t\t\t\tCA98906476CA4958A7490DA34A8DD7FE /* stack.h */,\n\t\t\t\tD7A782342B8F3FFB63746340B544FBA3 /* symhacks.h */,\n\t\t\t\t1B4648FDEBFF78FC0394521789DD6E6F /* tls1.h */,\n\t\t\t\t4DB0A040BEF6D827EAAD132327946B0C /* ts.h */,\n\t\t\t\tCEBF3A8CF15759BD01ADD863759599D7 /* txt_db.h */,\n\t\t\t\tAC1E9926AD33179946A911197F0A5AB9 /* ui.h */,\n\t\t\t\t20FE96F7A9AE02FF6CAFB609FA1A4AB6 /* ui_compat.h */,\n\t\t\t\tFF04C2915EFC53338BADA525420D86CB /* whrlpool.h */,\n\t\t\t\t30891473DCA86FE4094F66E2597116D8 /* x509.h */,\n\t\t\t\t0F09ED7E543C407892E0A49D08583AAF /* x509_vfy.h */,\n\t\t\t\tC6BDB73696EB951D76D3698186EE9873 /* x509v3.h */,\n\t\t\t\t8BE1B7BC6B531A45A5EB4EBAE8B00C02 /* Frameworks */,\n\t\t\t);\n\t\t\tname = \"OpenSSL-Universal\";\n\t\t\tpath = \"OpenSSL-Universal\";\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\tAB67F81E727CB58B8B62718C4832BC72 /* Support Files */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t08B5BDDC0B3AFB71C534E71106C76640 /* RNCryptor.xcconfig */,\n\t\t\t\t3FAAD67FBFA07F5A47C8D1C7E2A5DDA9 /* RNCryptor-dummy.m */,\n\t\t\t\t501B52CD79EA9954E4C80D0B664BF1EB /* RNCryptor-prefix.pch */,\n\t\t\t);\n\t\t\tname = \"Support Files\";\n\t\t\tpath = \"../Target Support Files/RNCryptor\";\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\tB2AC093C7635BDA2B6C0584054B827F2 /* RNCryptor */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t0476826279D9BA78EC77A0F08A6BB323 /* RNCryptor.h */,\n\t\t\t\t77C390E32B57042D6EB432229D6185E3 /* RNCryptor.m */,\n\t\t\t\t5192085BDE9AC6B1FA6A8EAF03B471CB /* RNCryptor+Private.h */,\n\t\t\t\tA20E7B3C0A2AEA92504DD510002C0866 /* RNCryptorEngine.h */,\n\t\t\t\t352152BA99279300977B581B2EB00C09 /* RNCryptorEngine.m */,\n\t\t\t\t377F632CF03068C430939AB39A2E8535 /* RNDecryptor.h */,\n\t\t\t\tE1532D7537E9DCCDFAE7FC7D9DE2CFB1 /* RNDecryptor.m */,\n\t\t\t\t2C957C4D14B6703A4BA7A0A993D265E7 /* RNEncryptor.h */,\n\t\t\t\t29F7F962821125C98A8EF5A3391F621E /* RNEncryptor.m */,\n\t\t\t\tFC0E563F8C4BE5035B5884917AE8DF84 /* RNOpenSSLCryptor.h */,\n\t\t\t\tA168A2B4388152C35F1D86769E4EAA60 /* RNOpenSSLCryptor.m */,\n\t\t\t\t086FA018788251BEDFD6BB13DEA47BF0 /* RNOpenSSLDecryptor.h */,\n\t\t\t\t9F9301EC57627F0C1E2399EC0A76E243 /* RNOpenSSLDecryptor.m */,\n\t\t\t\t4B2EE8CE559E9A19F1CBBCADED341B8E /* RNOpenSSLEncryptor.h */,\n\t\t\t\t6D2899267883132B3DD67CEAB450986D /* RNOpenSSLEncryptor.m */,\n\t\t\t\tAB67F81E727CB58B8B62718C4832BC72 /* Support Files */,\n\t\t\t);\n\t\t\tname = RNCryptor;\n\t\t\tpath = RNCryptor;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\tB2F66C302E323341B29ED44651FBDDA8 /* Support Files */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\tE28A9F712C570022DFB4A3E5C234C227 /* ECSlidingViewController.xcconfig */,\n\t\t\t\t74787E1420D6C9B560A302F280BF02A1 /* ECSlidingViewController-dummy.m */,\n\t\t\t\t5967C1608483BB1D9CD985812E466534 /* ECSlidingViewController-prefix.pch */,\n\t\t\t);\n\t\t\tname = \"Support Files\";\n\t\t\tpath = \"../Target Support Files/ECSlidingViewController\";\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\tB8A12629D49F2BC78302F4CEDC2F2DC8 /* Crashlytics */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t8D45072F40D129A74F45785F40A7F1F6 /* ANSCompatibility.h */,\n\t\t\t\t2240125303F1A7796115A82807CC95F8 /* Answers.h */,\n\t\t\t\tB60EB6B12B1C505BCD68892ACF5517EB /* CLSAttributes.h */,\n\t\t\t\tC11E785CC2115B7172D2CF8207399E90 /* CLSLogging.h */,\n\t\t\t\t0CEF0FF616FCB496E74E0C143F265873 /* CLSReport.h */,\n\t\t\t\tA1F7837F0D7F8688A3E8F7DB893D6D21 /* CLSStackFrame.h */,\n\t\t\t\tA66EEC682DBBA3D4129286E25857B220 /* Crashlytics.h */,\n\t\t\t\tD7CC5248A2F9DBF51ECA0D7A1F539BB2 /* Frameworks */,\n\t\t\t);\n\t\t\tname = Crashlytics;\n\t\t\tpath = Crashlytics;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\tBDC96F20C16AD39C1ACE462B73E3A8CF /* Support Files */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t9B2C58CDC7B64DEA29C434BB1C297708 /* ISO8601DateFormatter.xcconfig */,\n\t\t\t\t61342CD14721855E2FECE1958B04830C /* ISO8601DateFormatter-dummy.m */,\n\t\t\t\t015D33DA0A24A1EAB57EE31E61547980 /* ISO8601DateFormatter-prefix.pch */,\n\t\t\t);\n\t\t\tname = \"Support Files\";\n\t\t\tpath = \"../Target Support Files/ISO8601DateFormatter\";\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\tD7CC5248A2F9DBF51ECA0D7A1F539BB2 /* Frameworks */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t1D5AAECA7C4431CA629966C9CCDED85A /* Crashlytics.framework */,\n\t\t\t);\n\t\t\tname = Frameworks;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\tDF92DB3E6496D56FD7D51586BA31E508 /* AFNetworking */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t28278C788A134E52C4356F7B82ABBD94 /* AFNetworking.h */,\n\t\t\t\t030184660478C2BB8B70F65D4C399639 /* NSURLConnection */,\n\t\t\t\t7785E6E125B1B528F154FD8578772790 /* NSURLSession */,\n\t\t\t\tA301225F43AAD3F875C25939D007F6B2 /* Reachability */,\n\t\t\t\tEA8754341799207EF408D8CCB81304BC /* Security */,\n\t\t\t\tE80D122EEF0C92401881560D5E06C08A /* Serialization */,\n\t\t\t\t71A455F373B0EAE1A483764B27481915 /* Support Files */,\n\t\t\t\t60389CF04E081F619AFEC86D0089FF66 /* UIKit */,\n\t\t\t);\n\t\t\tname = AFNetworking;\n\t\t\tpath = AFNetworking;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\tE253F21F5D1DA381775B9F645653A835 /* Support Files */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t58454370823CB30F3DD5DA8466ADE99E /* MBProgressHUD.xcconfig */,\n\t\t\t\t7C2E122DAF7306C3060F8D2A9C22BB8C /* MBProgressHUD-dummy.m */,\n\t\t\t\t03396FC46CC1A160AD8A1D387D870489 /* MBProgressHUD-prefix.pch */,\n\t\t\t);\n\t\t\tname = \"Support Files\";\n\t\t\tpath = \"../Target Support Files/MBProgressHUD\";\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\tE596B6ED6F26081542F8B86C2C3E9382 /* Pods-ArcBitTests */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t078A8262CC92D7CC54EEE28F4F6886B4 /* Pods-ArcBitTests-acknowledgements.markdown */,\n\t\t\t\t69CCE6796176BDC48179171447637DCD /* Pods-ArcBitTests-acknowledgements.plist */,\n\t\t\t\t7AA49E143F51A3A76A36CABB822D4FF0 /* Pods-ArcBitTests-dummy.m */,\n\t\t\t\tFC9EA1D9CCA35B8ACB27228393896F0D /* Pods-ArcBitTests-frameworks.sh */,\n\t\t\t\t3E27BC14DA3C0E76D0BC78F09D06EC23 /* Pods-ArcBitTests-resources.sh */,\n\t\t\t\t85DCB1C473532CB20732F5D63458E58F /* Pods-ArcBitTests.debug.xcconfig */,\n\t\t\t\t9443DCC7B3882D884A08AD4FBB192D94 /* Pods-ArcBitTests.release.xcconfig */,\n\t\t\t);\n\t\t\tname = \"Pods-ArcBitTests\";\n\t\t\tpath = \"Target Support Files/Pods-ArcBitTests\";\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\tE80D122EEF0C92401881560D5E06C08A /* Serialization */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t2CD35F59E4CBE95CF21B610F51B616F1 /* AFURLRequestSerialization.h */,\n\t\t\t\tCCE41272A0F704855A6FCC02D53B28F2 /* AFURLRequestSerialization.m */,\n\t\t\t\tAA8BCCFE7DE3B05DD0E7AD638575712D /* AFURLResponseSerialization.h */,\n\t\t\t\t0FB93F75E4E0071746ED64537EFC4997 /* AFURLResponseSerialization.m */,\n\t\t\t);\n\t\t\tname = Serialization;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\tEA8754341799207EF408D8CCB81304BC /* Security */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\tE2AD746BF57A2CB6FDED0CCC90C5C168 /* AFSecurityPolicy.h */,\n\t\t\t\t8356BE9E396A722179392853567A37EA /* AFSecurityPolicy.m */,\n\t\t\t);\n\t\t\tname = Security;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\tF3C96374B9882C8C0A204253CFDCA5DA /* Targets Support Files */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\tA353C20636C9286156403BB76396A366 /* Pods-ArcBit */,\n\t\t\t\tE596B6ED6F26081542F8B86C2C3E9382 /* Pods-ArcBitTests */,\n\t\t\t);\n\t\t\tname = \"Targets Support Files\";\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\tFBE2CE3B81E4A1287EFFD440F4CCD3AE /* iOS */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t041F55AE36E26F3BDCC4B40490B54E30 /* CoreGraphics.framework */,\n\t\t\t\t0339164673A5C75C5E4018F798CE5EEE /* Foundation.framework */,\n\t\t\t\tDF435BBF67523FB6D2633A16438FDB4B /* MobileCoreServices.framework */,\n\t\t\t\t66EB5B938802F986D305D37865A72F7F /* Security.framework */,\n\t\t\t\tA4A78E5A576CDDF089002FA7301D2AD8 /* SystemConfiguration.framework */,\n\t\t\t\t51EEF5F6B8DF9CB28A3362570D60C5A5 /* UIKit.framework */,\n\t\t\t);\n\t\t\tname = iOS;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n/* End PBXGroup section */\n\n/* Begin PBXHeadersBuildPhase section */\n\t\t14881EEC9E414E1B2613C4FBBAE52194 /* Headers */ = {\n\t\t\tisa = PBXHeadersBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t\tBE16FE811764F2596E895B8FB25E2CD7 /* SwiftTryCatch.h in Headers */,\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n\t\t256F549AC5810B8DEE7596C029A56770 /* Headers */ = {\n\t\t\tisa = PBXHeadersBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t\t889CE4538EEBA5CEA949577B81E8773D /* iCloud.h in Headers */,\n\t\t\t\t6722E173965E73AC2C999A1D83D428B8 /* iCloudDocument.h in Headers */,\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n\t\t4B3561AB44C16D4459EC8A2D2F46F15B /* Headers */ = {\n\t\t\tisa = PBXHeadersBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t\t0921D584AB13CD8D93B967219F2E38D5 /* ISO8601DateFormatter.h in Headers */,\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n\t\t8B8EA44BBD887140F1D1EBA92E65BFD9 /* Headers */ = {\n\t\t\tisa = PBXHeadersBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t\tEEF753999C04ECFFE4A096E4DCE59AB4 /* BTC256.h in Headers */,\n\t\t\t\t11D9480CCC56D20DFFC4E060C77D73AB /* BTCAddress.h in Headers */,\n\t\t\t\t8FAA9F24579BF47D1668F3613C1FF859 /* BTCAddressSubclass.h in Headers */,\n\t\t\t\t9456381ACE30273EA598C11062AC85D4 /* BTCAssetAddress.h in Headers */,\n\t\t\t\tD25A3B9F2BA3F46E4ABE55B955D1183A /* BTCAssetID.h in Headers */,\n\t\t\t\t4255364B6480D50C1631F6A4A907ECFA /* BTCAssetType.h in Headers */,\n\t\t\t\t79DE5AD50368A357D2F0FD2FCB10DD3C /* BTCBase58.h in Headers */,\n\t\t\t\t14FAB1DD5C7279E43725DC3EA0EBEC29 /* BTCBigNumber.h in Headers */,\n\t\t\t\tFBEB3BF44D1452F22F56F989223836D0 /* BTCBitcoinURL.h in Headers */,\n\t\t\t\t72EE2FC9D1155B9611B0AA35E1F9A14C /* BTCBlindSignature.h in Headers */,\n\t\t\t\t14B22B1E13FFA930C8D4E81E59B0EFD6 /* BTCBlock.h in Headers */,\n\t\t\t\t430483B1C679E190BBC4D7772DDE2D22 /* BTCBlockchainInfo.h in Headers */,\n\t\t\t\t145E917FBEE1FF331F6F4DF61F0D3436 /* BTCBlockHeader.h in Headers */,\n\t\t\t\t6BD5EDE28C3649FE8B3A69DA2F9BE790 /* BTCChainCom.h in Headers */,\n\t\t\t\tE61F98BAE61B94EAA909B9DA9944D06C /* BTCCurrencyConverter.h in Headers */,\n\t\t\t\tFE83FD4E2DEBD021BB2015284222F5A5 /* BTCCurvePoint.h in Headers */,\n\t\t\t\tB0DED169B439A00C5DD660BE0961A3CE /* BTCData.h in Headers */,\n\t\t\t\t53D6260BBBF96E677CBF41F6302610BF /* BTCEncryptedBackup.h in Headers */,\n\t\t\t\t35A862AB2657C5EABD5586FEF96B190A /* BTCEncryptedMessage.h in Headers */,\n\t\t\t\tFEB67C86EEEF5CC9798F2CE50F95ED5D /* BTCErrors.h in Headers */,\n\t\t\t\t8D1EF92075C2DED260E889B1595C1945 /* BTCFancyEncryptedMessage.h in Headers */,\n\t\t\t\tECFDFF0308DB9F3A389630DBB041D5EF /* BTCHashID.h in Headers */,\n\t\t\t\t7D93D658FCD111BBA6058C4E7100F353 /* BTCKey.h in Headers */,\n\t\t\t\t7802D996835772AA41D9D0E80A64B4AE /* BTCKeychain.h in Headers */,\n\t\t\t\tE57A1948664A11CA074AE6E0191B0E31 /* BTCMerkleTree.h in Headers */,\n\t\t\t\t24340BE581B94E9F3F445114BA0D1ADB /* BTCMnemonic.h in Headers */,\n\t\t\t\t7B2DC61D79AD788C13E3D890887BEDFD /* BTCNetwork.h in Headers */,\n\t\t\t\t0CB1C5E155158481C5B26A556652BAF7 /* BTCNumberFormatter.h in Headers */,\n\t\t\t\t9F8C249A1483DE91049363FAA08268BE /* BTCOpcode.h in Headers */,\n\t\t\t\t78CB570A92A6F8E64A8A510D2451DFE8 /* BTCOutpoint.h in Headers */,\n\t\t\t\tBBC4CE4A8BC2CBC7856BE4DE2C335E64 /* BTCPaymentMethod.h in Headers */,\n\t\t\t\t45F5DA8E9D166F3B195A5A7795E5C6B1 /* BTCPaymentMethodDetails.h in Headers */,\n\t\t\t\t3F251DCF6819DFEF3BBE362043E616BE /* BTCPaymentMethodRequest.h in Headers */,\n\t\t\t\tB7FD63B62F96D57A2187CDA0A5443EE2 /* BTCPaymentProtocol.h in Headers */,\n\t\t\t\t111DBE75D66AF620373456DA8FF411A3 /* BTCPaymentRequest.h in Headers */,\n\t\t\t\tA53D00487FBF8C6B90199E2121913C7E /* BTCPriceSource.h in Headers */,\n\t\t\t\t245717C1FC57C1B1D16BA0772BEBD8F0 /* BTCProcessor.h in Headers */,\n\t\t\t\tF6D7642095D512371C491D465EF322AA /* BTCProtocolBuffers.h in Headers */,\n\t\t\t\tCAB2B38F6729721638C81EC9B64DBD21 /* BTCProtocolSerialization.h in Headers */,\n\t\t\t\t1F0CC5B8BD15A6C105E4336740E2A479 /* BTCQRCode.h in Headers */,\n\t\t\t\tDC40240C8B2BD0EC14ED12D998F25E40 /* BTCScript.h in Headers */,\n\t\t\t\tA9123D7430F57667814B9ADD1C6C65DE /* BTCScriptMachine.h in Headers */,\n\t\t\t\tC89DBBDAF9A3D73B7A41B3D2B78B64E6 /* BTCSecretSharing.h in Headers */,\n\t\t\t\t81C9B22D375CAAB1AE8C9808A1DE4F1F /* BTCSignatureHashType.h in Headers */,\n\t\t\t\t67170841C6B96D258AC0B2B8F80BFE60 /* BTCTransaction.h in Headers */,\n\t\t\t\t09AFC79EC7C17D72E6A51023FACACFA2 /* BTCTransactionBuilder.h in Headers */,\n\t\t\t\t008EE1E47C7F48ADB999B3D4A9333227 /* BTCTransactionInput.h in Headers */,\n\t\t\t\t80F4D884020CDF50276683C502DC3DE7 /* BTCTransactionOutput.h in Headers */,\n\t\t\t\tFB10C1C2137B39DB065E7A1652643D6B /* BTCUnitsAndLimits.h in Headers */,\n\t\t\t\tDE43D6C2477683783C3FEEC44270B842 /* CoreBitcoin+Categories.h in Headers */,\n\t\t\t\tFC6E03285B04C54F69730688CAAC0D9E /* CoreBitcoin.h in Headers */,\n\t\t\t\t42B04D19552FF4EB81A87264ECF323BE /* NS+BTCBase58.h in Headers */,\n\t\t\t\t6499371CA24BA199A06AB1312D7EE427 /* NSData+BTCData.h in Headers */,\n\t\t\t\t6226C424A3D3DCB25AE195D6A143C9D4 /* SwiftBridgingHeader.h in Headers */,\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n\t\tABCAA89D943FC16CAEDA42E4D44E22BF /* Headers */ = {\n\t\t\tisa = PBXHeadersBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t\tD9758C77FBD6C7FFBA25F1F374BED021 /* RNCryptor+Private.h in Headers */,\n\t\t\t\tA0D11665B6A3AE0AD9DE93EE7EE94B26 /* RNCryptor.h in Headers */,\n\t\t\t\t3725E92E2057625A6E6E66A0CCF382D3 /* RNCryptorEngine.h in Headers */,\n\t\t\t\t752C6F3D0845068EC94FB9EC02E7573D /* RNDecryptor.h in Headers */,\n\t\t\t\t420942CD3853400DA276BF1614D077B4 /* RNEncryptor.h in Headers */,\n\t\t\t\t595986050FEB573B462F5CCE7FCF9CEB /* RNOpenSSLCryptor.h in Headers */,\n\t\t\t\t6EC4985682502C9227B1F3602B03E31F /* RNOpenSSLDecryptor.h in Headers */,\n\t\t\t\t1011AE994051463F2BD727FDAEB38BA2 /* RNOpenSSLEncryptor.h in Headers */,\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n\t\tC0C4CBFE172D547A7F1B13729C618711 /* Headers */ = {\n\t\t\tisa = PBXHeadersBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t\t703E9B63C6F95FF4E540582694416AC4 /* AFHTTPRequestOperation.h in Headers */,\n\t\t\t\t7C784C11A07442600BAB93AF8705CA4B /* AFHTTPRequestOperationManager.h in Headers */,\n\t\t\t\t43BB300A2A1032D80182AB46397BF913 /* AFHTTPSessionManager.h in Headers */,\n\t\t\t\tCF9555AA6F9EF0F2879F75A0965C72F6 /* AFNetworkActivityIndicatorManager.h in Headers */,\n\t\t\t\tB540E876246FD909EFFCEA961F82328C /* AFNetworking.h in Headers */,\n\t\t\t\t855C20D4EEA8F047E2CC38ED5235D982 /* AFNetworkReachabilityManager.h in Headers */,\n\t\t\t\tC9A5E72B88F6C598BEF99EF7309A862B /* AFSecurityPolicy.h in Headers */,\n\t\t\t\tD33D2587D2E6EA01640AFF29B73C757A /* AFURLConnectionOperation.h in Headers */,\n\t\t\t\t1AFA50D55684463D02F8E9054B7002A3 /* AFURLRequestSerialization.h in Headers */,\n\t\t\t\t1450DB4E6385F2206E2A0B8CE4ECF841 /* AFURLResponseSerialization.h in Headers */,\n\t\t\t\t32E35BA80B04016D6245A608A10F89F9 /* AFURLSessionManager.h in Headers */,\n\t\t\t\tF90421708CDF41D1A389C1692A745BDA /* UIActivityIndicatorView+AFNetworking.h in Headers */,\n\t\t\t\t58E8964CBDF1723615E669E41A4CE48D /* UIAlertView+AFNetworking.h in Headers */,\n\t\t\t\t116D875F05695C6E1F08619BE09A2804 /* UIButton+AFNetworking.h in Headers */,\n\t\t\t\t954F7C0E10F8C2CE56E2C1055F9B0464 /* UIImageView+AFNetworking.h in Headers */,\n\t\t\t\t878511E19773551A47CDD5B266CDF278 /* UIKit+AFNetworking.h in Headers */,\n\t\t\t\t445F5ECA13DCF76C689BE4C0AE17C04A /* UIProgressView+AFNetworking.h in Headers */,\n\t\t\t\tE190879397FF5CCFED353FDB69D4775D /* UIRefreshControl+AFNetworking.h in Headers */,\n\t\t\t\t5D4286321A134D3793B9E1556B7C77A9 /* UIWebView+AFNetworking.h in Headers */,\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n\t\tEFC33D369E9A80BFCC07EAB513251186 /* Headers */ = {\n\t\t\tisa = PBXHeadersBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t\t2A76DB3CD21C569626495DE7D69D7B0C /* MBProgressHUD.h in Headers */,\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n\t\tFE83567FB56C60EC09519F82C9E0A71B /* Headers */ = {\n\t\t\tisa = PBXHeadersBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t\tEFF49AA820D604CC6F085F1E2EB0C1D8 /* ECPercentDrivenInteractiveTransition.h in Headers */,\n\t\t\t\t7F3A2CBC131FC82BB3B839763E458464 /* ECSlidingAnimationController.h in Headers */,\n\t\t\t\t9AB53B08B9F78F6BCEB27E92CA9A4CBB /* ECSlidingConstants.h in Headers */,\n\t\t\t\tB9CDE30C88938E380047B1DF3F26598E /* ECSlidingInteractiveTransition.h in Headers */,\n\t\t\t\tDE63F2C9384437A0214162A2F60C4806 /* ECSlidingSegue.h in Headers */,\n\t\t\t\t873C3967C51F24DCAA41D56BB98AF5C7 /* ECSlidingViewController.h in Headers */,\n\t\t\t\tDE012E6BB5B7386D052CF3DAA83350C6 /* UIViewController+ECSlidingViewController.h in Headers */,\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n/* End PBXHeadersBuildPhase section */\n\n/* Begin PBXNativeTarget section */\n\t\t00F731801F3ECAEC7F387B9837CB254E /* Pods-ArcBitTests */ = {\n\t\t\tisa = PBXNativeTarget;\n\t\t\tbuildConfigurationList = 73561335CB8EF412F48ACEF2E45C02BF /* Build configuration list for PBXNativeTarget \"Pods-ArcBitTests\" */;\n\t\t\tbuildPhases = (\n\t\t\t\t45066BE95CAEA1B8FCD0223C1E4F7285 /* Sources */,\n\t\t\t\t02A10AAE8189F4F86E68AB670E000A08 /* Frameworks */,\n\t\t\t);\n\t\t\tbuildRules = (\n\t\t\t);\n\t\t\tdependencies = (\n\t\t\t\tB872110F732B8AAE3F5E7D104A8C6160 /* PBXTargetDependency */,\n\t\t\t\tE2C35D3FFBA27B5FA183149C521CF911 /* PBXTargetDependency */,\n\t\t\t\t8AE030B0BBC1826230A17302A1FBAD2C /* PBXTargetDependency */,\n\t\t\t\t3CF3D0BF29FBF836BD6ABE98A3A32FA2 /* PBXTargetDependency */,\n\t\t\t\t923E35D5D771485A1A3F6B0650FE0DEB /* PBXTargetDependency */,\n\t\t\t\t920C219911C76BB3B741462F28EC24DB /* PBXTargetDependency */,\n\t\t\t\t4C28A2F102E5F43DD64511017A4285AC /* PBXTargetDependency */,\n\t\t\t\t595C378E38018373B92AD2AA6AD3746E /* PBXTargetDependency */,\n\t\t\t);\n\t\t\tname = \"Pods-ArcBitTests\";\n\t\t\tproductName = \"Pods-ArcBitTests\";\n\t\t\tproductReference = F975D06D6CFDDF6089075DCE90D657E3 /* libPods-ArcBitTests.a */;\n\t\t\tproductType = \"com.apple.product-type.library.static\";\n\t\t};\n\t\t0D3093725F52C8DFE9122BC462A57151 /* RNCryptor */ = {\n\t\t\tisa = PBXNativeTarget;\n\t\t\tbuildConfigurationList = FB6CB9EEF2A28AB0A58EC7DEB23EBA13 /* Build configuration list for PBXNativeTarget \"RNCryptor\" */;\n\t\t\tbuildPhases = (\n\t\t\t\tDA7857CEA79D95F367264D60CF22A4EB /* Sources */,\n\t\t\t\t45CA6297C916C772013E3E058849799E /* Frameworks */,\n\t\t\t\tABCAA89D943FC16CAEDA42E4D44E22BF /* Headers */,\n\t\t\t);\n\t\t\tbuildRules = (\n\t\t\t);\n\t\t\tdependencies = (\n\t\t\t);\n\t\t\tname = RNCryptor;\n\t\t\tproductName = RNCryptor;\n\t\t\tproductReference = 52BAF2C56ABBC282857C15635D8C9B64 /* libRNCryptor.a */;\n\t\t\tproductType = \"com.apple.product-type.library.static\";\n\t\t};\n\t\t175B076ED45EB1A3E40F58BA14036467 /* MBProgressHUD */ = {\n\t\t\tisa = PBXNativeTarget;\n\t\t\tbuildConfigurationList = 7C66CB3E04875BC1C255326C7ADB2D78 /* Build configuration list for PBXNativeTarget \"MBProgressHUD\" */;\n\t\t\tbuildPhases = (\n\t\t\t\tFED59DE88F6C855E8E4E64782275A4C6 /* Sources */,\n\t\t\t\t12070984FA8985EF77A932BEC1CF2A5D /* Frameworks */,\n\t\t\t\tEFC33D369E9A80BFCC07EAB513251186 /* Headers */,\n\t\t\t);\n\t\t\tbuildRules = (\n\t\t\t);\n\t\t\tdependencies = (\n\t\t\t);\n\t\t\tname = MBProgressHUD;\n\t\t\tproductName = MBProgressHUD;\n\t\t\tproductReference = 305398BB3744725353B9D90AC6D1F583 /* libMBProgressHUD.a */;\n\t\t\tproductType = \"com.apple.product-type.library.static\";\n\t\t};\n\t\t39C35849B6F0D7D6AFDE54696486045C /* CoreBitcoin */ = {\n\t\t\tisa = PBXNativeTarget;\n\t\t\tbuildConfigurationList = 00167DD04DA4501437636D85D478EFDA /* Build configuration list for PBXNativeTarget \"CoreBitcoin\" */;\n\t\t\tbuildPhases = (\n\t\t\t\tA9266099AF84CA31D01C62BB13B7D8F5 /* Sources */,\n\t\t\t\t69A8A46833359CE1AC7247CF4E768BB0 /* Frameworks */,\n\t\t\t\t8B8EA44BBD887140F1D1EBA92E65BFD9 /* Headers */,\n\t\t\t);\n\t\t\tbuildRules = (\n\t\t\t);\n\t\t\tdependencies = (\n\t\t\t\t49EB0AE0352F7C72ED9C21DD7D4B0496 /* PBXTargetDependency */,\n\t\t\t);\n\t\t\tname = CoreBitcoin;\n\t\t\tproductName = CoreBitcoin;\n\t\t\tproductReference = 1D8404557EC53259D973D11E9DAB5272 /* libCoreBitcoin.a */;\n\t\t\tproductType = \"com.apple.product-type.library.static\";\n\t\t};\n\t\t40B1A5C3F290E95B1A39D3AF787E585B /* SwiftTryCatch */ = {\n\t\t\tisa = PBXNativeTarget;\n\t\t\tbuildConfigurationList = 1BAA56232E0DC10281030E5EB1ABD9B5 /* Build configuration list for PBXNativeTarget \"SwiftTryCatch\" */;\n\t\t\tbuildPhases = (\n\t\t\t\tDB19D3BACD12270C8DA29343ED10B545 /* Sources */,\n\t\t\t\t697712E522DE3F64B3F3F4815B3AFA0B /* Frameworks */,\n\t\t\t\t14881EEC9E414E1B2613C4FBBAE52194 /* Headers */,\n\t\t\t);\n\t\t\tbuildRules = (\n\t\t\t);\n\t\t\tdependencies = (\n\t\t\t);\n\t\t\tname = SwiftTryCatch;\n\t\t\tproductName = SwiftTryCatch;\n\t\t\tproductReference = E29510675EAA48EE8BAFDAEA48B42DF9 /* libSwiftTryCatch.a */;\n\t\t\tproductType = \"com.apple.product-type.library.static\";\n\t\t};\n\t\tA304F12938B16D7A06DD6F400F2D6BB3 /* ISO8601DateFormatter */ = {\n\t\t\tisa = PBXNativeTarget;\n\t\t\tbuildConfigurationList = 93FA305BE78ACA5455B4C3D25B2F6990 /* Build configuration list for PBXNativeTarget \"ISO8601DateFormatter\" */;\n\t\t\tbuildPhases = (\n\t\t\t\t01C5A5F504F733AB574254067C42F71D /* Sources */,\n\t\t\t\t7C50334B7FA0E841EB75DDDC2CFE2401 /* Frameworks */,\n\t\t\t\t4B3561AB44C16D4459EC8A2D2F46F15B /* Headers */,\n\t\t\t);\n\t\t\tbuildRules = (\n\t\t\t);\n\t\t\tdependencies = (\n\t\t\t);\n\t\t\tname = ISO8601DateFormatter;\n\t\t\tproductName = ISO8601DateFormatter;\n\t\t\tproductReference = 673B899D2723B2CB9E2057F9A04EFE78 /* libISO8601DateFormatter.a */;\n\t\t\tproductType = \"com.apple.product-type.library.static\";\n\t\t};\n\t\tBEB51D76802E141334901771706C647B /* ECSlidingViewController */ = {\n\t\t\tisa = PBXNativeTarget;\n\t\t\tbuildConfigurationList = 338FF900C277979298D208BB655D4C60 /* Build configuration list for PBXNativeTarget \"ECSlidingViewController\" */;\n\t\t\tbuildPhases = (\n\t\t\t\t4BD5368FDA0730D571315FAADEE01735 /* Sources */,\n\t\t\t\t771FE8ECDC533192AC3D245226889F98 /* Frameworks */,\n\t\t\t\tFE83567FB56C60EC09519F82C9E0A71B /* Headers */,\n\t\t\t);\n\t\t\tbuildRules = (\n\t\t\t);\n\t\t\tdependencies = (\n\t\t\t);\n\t\t\tname = ECSlidingViewController;\n\t\t\tproductName = ECSlidingViewController;\n\t\t\tproductReference = C30F739C17924B8CAD7268E6951DD7F9 /* libECSlidingViewController.a */;\n\t\t\tproductType = \"com.apple.product-type.library.static\";\n\t\t};\n\t\tC95C45974D77E3E41FE9D2A80E093179 /* AFNetworking */ = {\n\t\t\tisa = PBXNativeTarget;\n\t\t\tbuildConfigurationList = E7A89CA9D02AD96B862F83FF9A5290A9 /* Build configuration list for PBXNativeTarget \"AFNetworking\" */;\n\t\t\tbuildPhases = (\n\t\t\t\tB2D37E6060573A04DE36CB376DDB22E0 /* Sources */,\n\t\t\t\tDA5F50097FC6E9DB8C1A8DB5D17239D7 /* Frameworks */,\n\t\t\t\tC0C4CBFE172D547A7F1B13729C618711 /* Headers */,\n\t\t\t);\n\t\t\tbuildRules = (\n\t\t\t);\n\t\t\tdependencies = (\n\t\t\t);\n\t\t\tname = AFNetworking;\n\t\t\tproductName = AFNetworking;\n\t\t\tproductReference = EB74506660B7AF0E605F74DBE62C47EB /* libAFNetworking.a */;\n\t\t\tproductType = \"com.apple.product-type.library.static\";\n\t\t};\n\t\tF22893DE3DF8BB3D4B08876F2BD089FB /* iCloudDocumentSync */ = {\n\t\t\tisa = PBXNativeTarget;\n\t\t\tbuildConfigurationList = F69A87F2B20B1DF99EEB99D30B7B95FB /* Build configuration list for PBXNativeTarget \"iCloudDocumentSync\" */;\n\t\t\tbuildPhases = (\n\t\t\t\t1BD53DB8A256379299BFD5B959F57D49 /* Sources */,\n\t\t\t\tB418BACF90093A79E0C042E4C1F5E571 /* Frameworks */,\n\t\t\t\t256F549AC5810B8DEE7596C029A56770 /* Headers */,\n\t\t\t);\n\t\t\tbuildRules = (\n\t\t\t);\n\t\t\tdependencies = (\n\t\t\t);\n\t\t\tname = iCloudDocumentSync;\n\t\t\tproductName = iCloudDocumentSync;\n\t\t\tproductReference = 6A00BD8D7285ABA9BC788430C8293668 /* libiCloudDocumentSync.a */;\n\t\t\tproductType = \"com.apple.product-type.library.static\";\n\t\t};\n\t\tF996F1F1A67A8602856E033D8D73E80D /* Pods-ArcBit */ = {\n\t\t\tisa = PBXNativeTarget;\n\t\t\tbuildConfigurationList = 8634E992F0F34E398CF05A6763C6DBFC /* Build configuration list for PBXNativeTarget \"Pods-ArcBit\" */;\n\t\t\tbuildPhases = (\n\t\t\t\tFDC3D46173A4618D5709C63BC065B43C /* Sources */,\n\t\t\t\t05AA15DA5F0AB1CCDB1970262D77FABC /* Frameworks */,\n\t\t\t);\n\t\t\tbuildRules = (\n\t\t\t);\n\t\t\tdependencies = (\n\t\t\t\t82C1827BA397AA57C0E17DFDFFCB9136 /* PBXTargetDependency */,\n\t\t\t\t9C88BF3D7DB244CB54CB4576D5B2A8B8 /* PBXTargetDependency */,\n\t\t\t\t143F8A641E87AED8F8EDE838849A2405 /* PBXTargetDependency */,\n\t\t\t\t9531907A0B418503BFF7C5447DCACA51 /* PBXTargetDependency */,\n\t\t\t\tD67E83C61BE215105111C54632A592BD /* PBXTargetDependency */,\n\t\t\t\t0239647B086181EC2B5D49CA176ECC86 /* PBXTargetDependency */,\n\t\t\t\tEF2085B90ADC9E1AA2DE8F24C72A3958 /* PBXTargetDependency */,\n\t\t\t\tDD7A8669CF9B9987763CC56058E6BD42 /* PBXTargetDependency */,\n\t\t\t);\n\t\t\tname = \"Pods-ArcBit\";\n\t\t\tproductName = \"Pods-ArcBit\";\n\t\t\tproductReference = 20B68F141A16E4EF4902FC2E1C7D2EA3 /* libPods-ArcBit.a */;\n\t\t\tproductType = \"com.apple.product-type.library.static\";\n\t\t};\n/* End PBXNativeTarget section */\n\n/* Begin PBXProject section */\n\t\tD41D8CD98F00B204E9800998ECF8427E /* Project object */ = {\n\t\t\tisa = PBXProject;\n\t\t\tattributes = {\n\t\t\t\tLastSwiftUpdateCheck = 0830;\n\t\t\t\tLastUpgradeCheck = 0700;\n\t\t\t};\n\t\t\tbuildConfigurationList = 2D8E8EC45A3A1A1D94AE762CB5028504 /* Build configuration list for PBXProject \"Pods\" */;\n\t\t\tcompatibilityVersion = \"Xcode 3.2\";\n\t\t\tdevelopmentRegion = English;\n\t\t\thasScannedForEncodings = 0;\n\t\t\tknownRegions = (\n\t\t\t\ten,\n\t\t\t);\n\t\t\tmainGroup = 7DB346D0F39D3F0E887471402A8071AB;\n\t\t\tproductRefGroup = 1765A89613A9CD72776A9B40EC540088 /* Products */;\n\t\t\tprojectDirPath = \"\";\n\t\t\tprojectRoot = \"\";\n\t\t\ttargets = (\n\t\t\t\tC95C45974D77E3E41FE9D2A80E093179 /* AFNetworking */,\n\t\t\t\t39C35849B6F0D7D6AFDE54696486045C /* CoreBitcoin */,\n\t\t\t\tBEB51D76802E141334901771706C647B /* ECSlidingViewController */,\n\t\t\t\tF22893DE3DF8BB3D4B08876F2BD089FB /* iCloudDocumentSync */,\n\t\t\t\tA304F12938B16D7A06DD6F400F2D6BB3 /* ISO8601DateFormatter */,\n\t\t\t\t175B076ED45EB1A3E40F58BA14036467 /* MBProgressHUD */,\n\t\t\t\tF996F1F1A67A8602856E033D8D73E80D /* Pods-ArcBit */,\n\t\t\t\t00F731801F3ECAEC7F387B9837CB254E /* Pods-ArcBitTests */,\n\t\t\t\t0D3093725F52C8DFE9122BC462A57151 /* RNCryptor */,\n\t\t\t\t40B1A5C3F290E95B1A39D3AF787E585B /* SwiftTryCatch */,\n\t\t\t);\n\t\t};\n/* End PBXProject section */\n\n/* Begin PBXSourcesBuildPhase section */\n\t\t01C5A5F504F733AB574254067C42F71D /* Sources */ = {\n\t\t\tisa = PBXSourcesBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t\tAB1BF45C84ABAEC60501F1E5A8EA2FA3 /* ISO8601DateFormatter-dummy.m in Sources */,\n\t\t\t\tDCCF815B8E5017ECB8B4C96BB900BBAE /* ISO8601DateFormatter.m in Sources */,\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n\t\t1BD53DB8A256379299BFD5B959F57D49 /* Sources */ = {\n\t\t\tisa = PBXSourcesBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t\t04DA3364298A8E00D70978CD17BB7B1A /* iCloud-Prefix.pch in Sources */,\n\t\t\t\tA1F30ECE42B2A0E80F83E9F8B111F2B9 /* iCloud.m in Sources */,\n\t\t\t\t819044F465D89EAA92DD03EACCDEA4A5 /* iCloudDocument.m in Sources */,\n\t\t\t\tA046258C9F09492169B34E59059E09C7 /* iCloudDocumentSync-dummy.m in Sources */,\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n\t\t45066BE95CAEA1B8FCD0223C1E4F7285 /* Sources */ = {\n\t\t\tisa = PBXSourcesBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t\tFC4972E1DBD1E67D32CEBEEAAB40097B /* Pods-ArcBitTests-dummy.m in Sources */,\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n\t\t4BD5368FDA0730D571315FAADEE01735 /* Sources */ = {\n\t\t\tisa = PBXSourcesBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t\t057E6EAD536641ECF5DBCF6EF3AC0208 /* ECPercentDrivenInteractiveTransition.m in Sources */,\n\t\t\t\t883953CC89E07E03511C4E64F909B072 /* ECSlidingAnimationController.m in Sources */,\n\t\t\t\t6A1673BDF76642778EFCE362AEBE2E92 /* ECSlidingInteractiveTransition.m in Sources */,\n\t\t\t\t647229EDD055253FA6757EC15107AC5E /* ECSlidingSegue.m in Sources */,\n\t\t\t\t9AABB5CE7A658F06E33179EE830F6FFC /* ECSlidingViewController-dummy.m in Sources */,\n\t\t\t\t7629C3F78CCDF54440958B03F34277D2 /* ECSlidingViewController.m in Sources */,\n\t\t\t\t1ABE644587EF45B66F4870C774952B76 /* UIViewController+ECSlidingViewController.m in Sources */,\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n\t\tA9266099AF84CA31D01C62BB13B7D8F5 /* Sources */ = {\n\t\t\tisa = PBXSourcesBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t\tE7BD540E4EBDF447FFD36628948F7223 /* BTC256.m in Sources */,\n\t\t\t\t4B689A8DD5ACF97D0073F8383CD30927 /* BTCAddress.m in Sources */,\n\t\t\t\t54A7671B984D5BB9919DCF16521B4D04 /* BTCAssetAddress.m in Sources */,\n\t\t\t\t18BF12DB736B148118E4A6E695DD0514 /* BTCAssetID.m in Sources */,\n\t\t\t\tD1EF67C72114BB63F52B4E4E11B80584 /* BTCAssetType.m in Sources */,\n\t\t\t\tDE65A6303963E2F1136A6DA5A00832D6 /* BTCBase58.m in Sources */,\n\t\t\t\tBEDFEBEA24B3EEB7948CF0FB78750252 /* BTCBigNumber.m in Sources */,\n\t\t\t\t967AA2BEC711342F186F76ECE4992959 /* BTCBitcoinURL.m in Sources */,\n\t\t\t\t6C54D90BE572719CE99009478431D3D3 /* BTCBlindSignature.m in Sources */,\n\t\t\t\t348C724C7F58FCE2528C2AC73F7B2715 /* BTCBlock.m in Sources */,\n\t\t\t\tE8A6A04892C16348FD47638B5A31FD14 /* BTCBlockchainInfo.m in Sources */,\n\t\t\t\tD384707B744185C31112BBAE7F90B297 /* BTCBlockHeader.m in Sources */,\n\t\t\t\tF079D3C7B35BC88DA3766E9F9AC35E05 /* BTCChainCom.m in Sources */,\n\t\t\t\tB5DBBD48AC09BCC2FC83748E985F9532 /* BTCCurrencyConverter.m in Sources */,\n\t\t\t\tFE2E83CD66CF8756DE3FEB860AA95451 /* BTCCurvePoint.m in Sources */,\n\t\t\t\t7AAD2D06138248CAC70257DEB8D6F21F /* BTCData.m in Sources */,\n\t\t\t\tD25C21ACE546B34346D1737F1CFBDC7F /* BTCEncryptedBackup.m in Sources */,\n\t\t\t\t586B1F7F2090FC7252D69208E47DAE89 /* BTCEncryptedMessage.m in Sources */,\n\t\t\t\tEC5F72000E1FD57E70A455530E8829DF /* BTCErrors.m in Sources */,\n\t\t\t\t47923CE38B50ED7BE4A8B38FDB17CEF1 /* BTCFancyEncryptedMessage.m in Sources */,\n\t\t\t\t0C6CCB1C4C5591478F8C6AC36D54AC7D /* BTCHashID.m in Sources */,\n\t\t\t\t35C6693F0523DC6C08175448D5489C64 /* BTCKey.m in Sources */,\n\t\t\t\t06756A0BE2B833A04CAF19853A26C0CE /* BTCKeychain.m in Sources */,\n\t\t\t\tA33158A2B9CA895847D04E04FE8821A3 /* BTCMerkleTree.m in Sources */,\n\t\t\t\tEE37E7B155A3E1E4922C32283FFABC57 /* BTCMnemonic.m in Sources */,\n\t\t\t\tCA62DEC350EAE00A5AB3D18E75945C9A /* BTCNetwork.m in Sources */,\n\t\t\t\tD7AFD7184C524FC055E3DB126BFC62D8 /* BTCNumberFormatter.m in Sources */,\n\t\t\t\tC5CC1F1711CD265143B3743D22D840FE /* BTCOpcode.m in Sources */,\n\t\t\t\tB0BE66A653BA991C0849C6DB4118F6FA /* BTCOutpoint.m in Sources */,\n\t\t\t\tFFF389C534ED2E415A9758DB60E683E9 /* BTCPaymentMethod.m in Sources */,\n\t\t\t\tE092263BCFEA05A5FBBA32A6E418E4C8 /* BTCPaymentMethodDetails.m in Sources */,\n\t\t\t\t7AABB96652DE818BC92FC746E97D238E /* BTCPaymentMethodRequest.m in Sources */,\n\t\t\t\t6D79301A3E7D2E549EB63FE5A28AE9E1 /* BTCPaymentProtocol.m in Sources */,\n\t\t\t\t1B3BFAE8312CD2521EF6A0130D4DB57C /* BTCPaymentRequest.m in Sources */,\n\t\t\t\tD44E55A05A97D1E37FB71339B4AC7B4E /* BTCPriceSource.m in Sources */,\n\t\t\t\t73F1FEDE22FC8035F3E6504F4F055ADA /* BTCProcessor.m in Sources */,\n\t\t\t\tD384661A33EE8416A2667D92566B33AE /* BTCProtocolBuffers.m in Sources */,\n\t\t\t\t35B4833012DC1272AF1B6F8CA439271D /* BTCProtocolSerialization.m in Sources */,\n\t\t\t\tEA00E7CC8BF8CA943164835038A371F2 /* BTCQRCode.m in Sources */,\n\t\t\t\t3565BDC634DBEB5B38B97A6EBFBF34D0 /* BTCScript.m in Sources */,\n\t\t\t\t8C10C78FFECE1774AE050FF15C4FFFEC /* BTCScriptMachine.m in Sources */,\n\t\t\t\t626F9F02E3DDA7522568A9EDF35F81FB /* BTCSecretSharing.m in Sources */,\n\t\t\t\t5821419F991E5468B5D78E80C02E58F7 /* BTCTransaction.m in Sources */,\n\t\t\t\t008CC66DC9E7097ACAFBB44C0DC29141 /* BTCTransactionBuilder.m in Sources */,\n\t\t\t\tD2C799E29FDF5FAB930AFC9FC4F13721 /* BTCTransactionInput.m in Sources */,\n\t\t\t\tCEED7472F8FC605AD235BF4FCA241966 /* BTCTransactionOutput.m in Sources */,\n\t\t\t\t3A1C498D61C2BCFA0AFD99ACF0ADC90F /* CoreBitcoin-dummy.m in Sources */,\n\t\t\t\t25702E5162C952C6B594FFE731547A91 /* NS+BTCBase58.m in Sources */,\n\t\t\t\t20D40C3F72AE8EE0AF8C966C16684E89 /* NSData+BTCData.m in Sources */,\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n\t\tB2D37E6060573A04DE36CB376DDB22E0 /* Sources */ = {\n\t\t\tisa = PBXSourcesBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t\t9F988EAC0AD6AC18C8829C4C29C2BDB2 /* AFHTTPRequestOperation.m in Sources */,\n\t\t\t\t33CA25770C0BF608FA2477B6D6DE9772 /* AFHTTPRequestOperationManager.m in Sources */,\n\t\t\t\t7C8554137249E6F5ECBECB1CFB65BA84 /* AFHTTPSessionManager.m in Sources */,\n\t\t\t\t8BC6AF7DAF07A02563EE41585D1C612E /* AFNetworkActivityIndicatorManager.m in Sources */,\n\t\t\t\tA9FD4431D55C25D7BBD237BA852CC3FE /* AFNetworking-dummy.m in Sources */,\n\t\t\t\tE76F1CFB7B7B72A680BF96CA21771AD5 /* AFNetworkReachabilityManager.m in Sources */,\n\t\t\t\t2B0F9E99806BD738949E84B0321E7AFA /* AFSecurityPolicy.m in Sources */,\n\t\t\t\t326ED1F0E0713623EC9F0CE423BDD8CB /* AFURLConnectionOperation.m in Sources */,\n\t\t\t\t7CC6AB94B012B7F698F3760ABE918EA1 /* AFURLRequestSerialization.m in Sources */,\n\t\t\t\tADABDAE6782A26191C6DE6AFB7A5430B /* AFURLResponseSerialization.m in Sources */,\n\t\t\t\t0CD9C43ED3C992B98073F95067B53B03 /* AFURLSessionManager.m in Sources */,\n\t\t\t\tE5718AB049F7D66E23189FDBA44DCDFF /* UIActivityIndicatorView+AFNetworking.m in Sources */,\n\t\t\t\tE4243E10E866A1F3EBB3AFD2E74B12EF /* UIAlertView+AFNetworking.m in Sources */,\n\t\t\t\tF96A4D6B92354C0AB1A24DE1B4768525 /* UIButton+AFNetworking.m in Sources */,\n\t\t\t\t80228E9C445E81624B904D4B4447FBCC /* UIImageView+AFNetworking.m in Sources */,\n\t\t\t\tAB442D86946A509A1540E1FDED570E10 /* UIProgressView+AFNetworking.m in Sources */,\n\t\t\t\t2CF8B3FD52AC07391066E49873D9466A /* UIRefreshControl+AFNetworking.m in Sources */,\n\t\t\t\tB8C6586433AA5D733F2E19AC5D9F3734 /* UIWebView+AFNetworking.m in Sources */,\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n\t\tDA7857CEA79D95F367264D60CF22A4EB /* Sources */ = {\n\t\t\tisa = PBXSourcesBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t\t0E3FA6FE82706A02E1B2906F68A4C745 /* RNCryptor-dummy.m in Sources */,\n\t\t\t\t3712FB4820FD8752713CECA308F710D1 /* RNCryptor.m in Sources */,\n\t\t\t\t383270E4748A7AADD88328C423AB7203 /* RNCryptorEngine.m in Sources */,\n\t\t\t\t76FD10A369B5BFEB4670DF0CFC9EAA4C /* RNDecryptor.m in Sources */,\n\t\t\t\tFCBA068EA500BF863D8BEA750013C556 /* RNEncryptor.m in Sources */,\n\t\t\t\t802ABF94483D85AFF49D3E3BCCB1E9F6 /* RNOpenSSLCryptor.m in Sources */,\n\t\t\t\t88E06EBB10A5B5ACC1B5953AFB03E63F /* RNOpenSSLDecryptor.m in Sources */,\n\t\t\t\t4A01CD8DF0113DF24A0FB298349CC037 /* RNOpenSSLEncryptor.m in Sources */,\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n\t\tDB19D3BACD12270C8DA29343ED10B545 /* Sources */ = {\n\t\t\tisa = PBXSourcesBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t\tA82F06B0ABADDD7974F4A2B0443CA55A /* SwiftTryCatch-dummy.m in Sources */,\n\t\t\t\t42F336F50B984904FE0E1EE52C134183 /* SwiftTryCatch.m in Sources */,\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n\t\tFDC3D46173A4618D5709C63BC065B43C /* Sources */ = {\n\t\t\tisa = PBXSourcesBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t\t7E50869E45505B9339CC43D70C7F3F82 /* Pods-ArcBit-dummy.m in Sources */,\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n\t\tFED59DE88F6C855E8E4E64782275A4C6 /* Sources */ = {\n\t\t\tisa = PBXSourcesBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t\t1E528D890E3B32D53D963CE1417BA4D8 /* MBProgressHUD-dummy.m in Sources */,\n\t\t\t\t1A2FB482A3E6213D3D4A3E7FD621B223 /* MBProgressHUD.m in Sources */,\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n/* End PBXSourcesBuildPhase section */\n\n/* Begin PBXTargetDependency section */\n\t\t0239647B086181EC2B5D49CA176ECC86 /* PBXTargetDependency */ = {\n\t\t\tisa = PBXTargetDependency;\n\t\t\tname = RNCryptor;\n\t\t\ttarget = 0D3093725F52C8DFE9122BC462A57151 /* RNCryptor */;\n\t\t\ttargetProxy = 8382A0950CCA9D4C3565836FF7EEBC37 /* PBXContainerItemProxy */;\n\t\t};\n\t\t143F8A641E87AED8F8EDE838849A2405 /* PBXTargetDependency */ = {\n\t\t\tisa = PBXTargetDependency;\n\t\t\tname = ECSlidingViewController;\n\t\t\ttarget = BEB51D76802E141334901771706C647B /* ECSlidingViewController */;\n\t\t\ttargetProxy = 02B4C3006549A5F5FBC0C2ECC039BAD3 /* PBXContainerItemProxy */;\n\t\t};\n\t\t3CF3D0BF29FBF836BD6ABE98A3A32FA2 /* PBXTargetDependency */ = {\n\t\t\tisa = PBXTargetDependency;\n\t\t\tname = ISO8601DateFormatter;\n\t\t\ttarget = A304F12938B16D7A06DD6F400F2D6BB3 /* ISO8601DateFormatter */;\n\t\t\ttargetProxy = 9F3F7B3318D693C2C6EE1363940704BF /* PBXContainerItemProxy */;\n\t\t};\n\t\t49EB0AE0352F7C72ED9C21DD7D4B0496 /* PBXTargetDependency */ = {\n\t\t\tisa = PBXTargetDependency;\n\t\t\tname = ISO8601DateFormatter;\n\t\t\ttarget = A304F12938B16D7A06DD6F400F2D6BB3 /* ISO8601DateFormatter */;\n\t\t\ttargetProxy = 5C7D4058BFC8EA724EBDC31863972673 /* PBXContainerItemProxy */;\n\t\t};\n\t\t4C28A2F102E5F43DD64511017A4285AC /* PBXTargetDependency */ = {\n\t\t\tisa = PBXTargetDependency;\n\t\t\tname = SwiftTryCatch;\n\t\t\ttarget = 40B1A5C3F290E95B1A39D3AF787E585B /* SwiftTryCatch */;\n\t\t\ttargetProxy = B0CD0E3596CF1692EA6E158D1BE0E1BC /* PBXContainerItemProxy */;\n\t\t};\n\t\t595C378E38018373B92AD2AA6AD3746E /* PBXTargetDependency */ = {\n\t\t\tisa = PBXTargetDependency;\n\t\t\tname = iCloudDocumentSync;\n\t\t\ttarget = F22893DE3DF8BB3D4B08876F2BD089FB /* iCloudDocumentSync */;\n\t\t\ttargetProxy = 91E1B99AA491EFF4FBBCC4955B04D281 /* PBXContainerItemProxy */;\n\t\t};\n\t\t82C1827BA397AA57C0E17DFDFFCB9136 /* PBXTargetDependency */ = {\n\t\t\tisa = PBXTargetDependency;\n\t\t\tname = AFNetworking;\n\t\t\ttarget = C95C45974D77E3E41FE9D2A80E093179 /* AFNetworking */;\n\t\t\ttargetProxy = 5CB5903F2504899CD3D5CAE83587C34D /* PBXContainerItemProxy */;\n\t\t};\n\t\t8AE030B0BBC1826230A17302A1FBAD2C /* PBXTargetDependency */ = {\n\t\t\tisa = PBXTargetDependency;\n\t\t\tname = ECSlidingViewController;\n\t\t\ttarget = BEB51D76802E141334901771706C647B /* ECSlidingViewController */;\n\t\t\ttargetProxy = 1B487A0635704E849C8AC5BEA185C5B6 /* PBXContainerItemProxy */;\n\t\t};\n\t\t920C219911C76BB3B741462F28EC24DB /* PBXTargetDependency */ = {\n\t\t\tisa = PBXTargetDependency;\n\t\t\tname = RNCryptor;\n\t\t\ttarget = 0D3093725F52C8DFE9122BC462A57151 /* RNCryptor */;\n\t\t\ttargetProxy = F93551B8259E4EF0588E98C760B8EAA3 /* PBXContainerItemProxy */;\n\t\t};\n\t\t923E35D5D771485A1A3F6B0650FE0DEB /* PBXTargetDependency */ = {\n\t\t\tisa = PBXTargetDependency;\n\t\t\tname = MBProgressHUD;\n\t\t\ttarget = 175B076ED45EB1A3E40F58BA14036467 /* MBProgressHUD */;\n\t\t\ttargetProxy = 0756CE71FBE771F1A5EDE9158878BD81 /* PBXContainerItemProxy */;\n\t\t};\n\t\t9531907A0B418503BFF7C5447DCACA51 /* PBXTargetDependency */ = {\n\t\t\tisa = PBXTargetDependency;\n\t\t\tname = ISO8601DateFormatter;\n\t\t\ttarget = A304F12938B16D7A06DD6F400F2D6BB3 /* ISO8601DateFormatter */;\n\t\t\ttargetProxy = EB20605EB2C6DCA7CC400059002EE70A /* PBXContainerItemProxy */;\n\t\t};\n\t\t9C88BF3D7DB244CB54CB4576D5B2A8B8 /* PBXTargetDependency */ = {\n\t\t\tisa = PBXTargetDependency;\n\t\t\tname = CoreBitcoin;\n\t\t\ttarget = 39C35849B6F0D7D6AFDE54696486045C /* CoreBitcoin */;\n\t\t\ttargetProxy = 96804C20412BA2238B3E0E7479D84A26 /* PBXContainerItemProxy */;\n\t\t};\n\t\tB872110F732B8AAE3F5E7D104A8C6160 /* PBXTargetDependency */ = {\n\t\t\tisa = PBXTargetDependency;\n\t\t\tname = AFNetworking;\n\t\t\ttarget = C95C45974D77E3E41FE9D2A80E093179 /* AFNetworking */;\n\t\t\ttargetProxy = 24BF18FC6F1FC071726CE1E571FBD6DA /* PBXContainerItemProxy */;\n\t\t};\n\t\tD67E83C61BE215105111C54632A592BD /* PBXTargetDependency */ = {\n\t\t\tisa = PBXTargetDependency;\n\t\t\tname = MBProgressHUD;\n\t\t\ttarget = 175B076ED45EB1A3E40F58BA14036467 /* MBProgressHUD */;\n\t\t\ttargetProxy = 2D71254E9FD8641F03AC6CE6CDD806CF /* PBXContainerItemProxy */;\n\t\t};\n\t\tDD7A8669CF9B9987763CC56058E6BD42 /* PBXTargetDependency */ = {\n\t\t\tisa = PBXTargetDependency;\n\t\t\tname = iCloudDocumentSync;\n\t\t\ttarget = F22893DE3DF8BB3D4B08876F2BD089FB /* iCloudDocumentSync */;\n\t\t\ttargetProxy = E7076D669FCD9C77F9173FA9F34D48BC /* PBXContainerItemProxy */;\n\t\t};\n\t\tE2C35D3FFBA27B5FA183149C521CF911 /* PBXTargetDependency */ = {\n\t\t\tisa = PBXTargetDependency;\n\t\t\tname = CoreBitcoin;\n\t\t\ttarget = 39C35849B6F0D7D6AFDE54696486045C /* CoreBitcoin */;\n\t\t\ttargetProxy = C8061DBCAC6429677FAD2110D861784F /* PBXContainerItemProxy */;\n\t\t};\n\t\tEF2085B90ADC9E1AA2DE8F24C72A3958 /* PBXTargetDependency */ = {\n\t\t\tisa = PBXTargetDependency;\n\t\t\tname = SwiftTryCatch;\n\t\t\ttarget = 40B1A5C3F290E95B1A39D3AF787E585B /* SwiftTryCatch */;\n\t\t\ttargetProxy = 6CCFF24865BC21042DC33A14625B0832 /* PBXContainerItemProxy */;\n\t\t};\n/* End PBXTargetDependency section */\n\n/* Begin XCBuildConfiguration section */\n\t\t06DB9642358DD323AD3BC220C2B4E9A9 /* Release */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbaseConfigurationReference = 08B5BDDC0B3AFB71C534E71106C76640 /* RNCryptor.xcconfig */;\n\t\t\tbuildSettings = {\n\t\t\t\tCODE_SIGN_IDENTITY = \"iPhone Developer\";\n\t\t\t\t\"CODE_SIGN_IDENTITY[sdk=appletvos*]\" = \"\";\n\t\t\t\t\"CODE_SIGN_IDENTITY[sdk=iphoneos*]\" = \"\";\n\t\t\t\t\"CODE_SIGN_IDENTITY[sdk=watchos*]\" = \"\";\n\t\t\t\tGCC_PREFIX_HEADER = \"Target Support Files/RNCryptor/RNCryptor-prefix.pch\";\n\t\t\t\tIPHONEOS_DEPLOYMENT_TARGET = 5.0;\n\t\t\t\tOTHER_LDFLAGS = \"\";\n\t\t\t\tOTHER_LIBTOOLFLAGS = \"\";\n\t\t\t\tPRIVATE_HEADERS_FOLDER_PATH = \"\";\n\t\t\t\tPUBLIC_HEADERS_FOLDER_PATH = \"\";\n\t\t\t\tSDKROOT = iphoneos;\n\t\t\t\tSKIP_INSTALL = YES;\n\t\t\t\tSWIFT_ACTIVE_COMPILATION_CONDITIONS = \"$(inherited) \";\n\t\t\t\tSWIFT_VERSION = 3.0;\n\t\t\t\tTARGETED_DEVICE_FAMILY = \"1,2\";\n\t\t\t\tVALIDATE_PRODUCT = YES;\n\t\t\t};\n\t\t\tname = Release;\n\t\t};\n\t\t0727742A3AB494E1BBD97BD70B9D4C6A /* Release */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbaseConfigurationReference = 7670A2D213D3E45C32D51688A27FD23A /* SwiftTryCatch.xcconfig */;\n\t\t\tbuildSettings = {\n\t\t\t\tCODE_SIGN_IDENTITY = \"iPhone Developer\";\n\t\t\t\t\"CODE_SIGN_IDENTITY[sdk=appletvos*]\" = \"\";\n\t\t\t\t\"CODE_SIGN_IDENTITY[sdk=iphoneos*]\" = \"\";\n\t\t\t\t\"CODE_SIGN_IDENTITY[sdk=watchos*]\" = \"\";\n\t\t\t\tGCC_PREFIX_HEADER = \"Target Support Files/SwiftTryCatch/SwiftTryCatch-prefix.pch\";\n\t\t\t\tIPHONEOS_DEPLOYMENT_TARGET = 7.0;\n\t\t\t\tOTHER_LDFLAGS = \"\";\n\t\t\t\tOTHER_LIBTOOLFLAGS = \"\";\n\t\t\t\tPRIVATE_HEADERS_FOLDER_PATH = \"\";\n\t\t\t\tPUBLIC_HEADERS_FOLDER_PATH = \"\";\n\t\t\t\tSDKROOT = iphoneos;\n\t\t\t\tSKIP_INSTALL = YES;\n\t\t\t\tSWIFT_ACTIVE_COMPILATION_CONDITIONS = \"$(inherited) \";\n\t\t\t\tSWIFT_VERSION = 3.0;\n\t\t\t\tTARGETED_DEVICE_FAMILY = \"1,2\";\n\t\t\t\tVALIDATE_PRODUCT = YES;\n\t\t\t};\n\t\t\tname = Release;\n\t\t};\n\t\t0FBA15A7F6080A41777A12372FBFD6D3 /* Debug */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbuildSettings = {\n\t\t\t\tALWAYS_SEARCH_USER_PATHS = NO;\n\t\t\t\tCLANG_ANALYZER_NONNULL = YES;\n\t\t\t\tCLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;\n\t\t\t\tCLANG_CXX_LANGUAGE_STANDARD = \"gnu++14\";\n\t\t\t\tCLANG_CXX_LIBRARY = \"libc++\";\n\t\t\t\tCLANG_ENABLE_MODULES = YES;\n\t\t\t\tCLANG_ENABLE_OBJC_ARC = YES;\n\t\t\t\tCLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;\n\t\t\t\tCLANG_WARN_BOOL_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_COMMA = YES;\n\t\t\t\tCLANG_WARN_CONSTANT_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;\n\t\t\t\tCLANG_WARN_DOCUMENTATION_COMMENTS = YES;\n\t\t\t\tCLANG_WARN_EMPTY_BODY = YES;\n\t\t\t\tCLANG_WARN_ENUM_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_INFINITE_RECURSION = YES;\n\t\t\t\tCLANG_WARN_INT_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_OBJC_LITERAL_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;\n\t\t\t\tCLANG_WARN_RANGE_LOOP_ANALYSIS = YES;\n\t\t\t\tCLANG_WARN_STRICT_PROTOTYPES = YES;\n\t\t\t\tCLANG_WARN_SUSPICIOUS_MOVE = YES;\n\t\t\t\tCLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;\n\t\t\t\tCLANG_WARN_UNREACHABLE_CODE = YES;\n\t\t\t\tCLANG_WARN__DUPLICATE_METHOD_MATCH = YES;\n\t\t\t\tCODE_SIGNING_REQUIRED = NO;\n\t\t\t\tCOPY_PHASE_STRIP = NO;\n\t\t\t\tDEBUG_INFORMATION_FORMAT = dwarf;\n\t\t\t\tENABLE_STRICT_OBJC_MSGSEND = YES;\n\t\t\t\tENABLE_TESTABILITY = YES;\n\t\t\t\tGCC_C_LANGUAGE_STANDARD = gnu11;\n\t\t\t\tGCC_DYNAMIC_NO_PIC = NO;\n\t\t\t\tGCC_NO_COMMON_BLOCKS = YES;\n\t\t\t\tGCC_OPTIMIZATION_LEVEL = 0;\n\t\t\t\tGCC_PREPROCESSOR_DEFINITIONS = (\n\t\t\t\t\t\"POD_CONFIGURATION_DEBUG=1\",\n\t\t\t\t\t\"DEBUG=1\",\n\t\t\t\t\t\"$(inherited)\",\n\t\t\t\t);\n\t\t\t\tGCC_WARN_64_TO_32_BIT_CONVERSION = YES;\n\t\t\t\tGCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;\n\t\t\t\tGCC_WARN_UNDECLARED_SELECTOR = YES;\n\t\t\t\tGCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;\n\t\t\t\tGCC_WARN_UNUSED_FUNCTION = YES;\n\t\t\t\tGCC_WARN_UNUSED_VARIABLE = YES;\n\t\t\t\tIPHONEOS_DEPLOYMENT_TARGET = 8.2;\n\t\t\t\tMTL_ENABLE_DEBUG_INFO = YES;\n\t\t\t\tONLY_ACTIVE_ARCH = YES;\n\t\t\t\tPRODUCT_NAME = \"$(TARGET_NAME)\";\n\t\t\t\tPROVISIONING_PROFILE_SPECIFIER = NO_SIGNING/;\n\t\t\t\tSTRIP_INSTALLED_PRODUCT = NO;\n\t\t\t\tSWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;\n\t\t\t\tSYMROOT = \"${SRCROOT}/../build\";\n\t\t\t};\n\t\t\tname = Debug;\n\t\t};\n\t\t2AA683D1365E9A56462B6B7783A06215 /* Release */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbaseConfigurationReference = 0FA1AC957975C828AAB3F1ECB8B7BC42 /* iCloudDocumentSync.xcconfig */;\n\t\t\tbuildSettings = {\n\t\t\t\tCODE_SIGN_IDENTITY = \"iPhone Developer\";\n\t\t\t\t\"CODE_SIGN_IDENTITY[sdk=appletvos*]\" = \"\";\n\t\t\t\t\"CODE_SIGN_IDENTITY[sdk=iphoneos*]\" = \"\";\n\t\t\t\t\"CODE_SIGN_IDENTITY[sdk=watchos*]\" = \"\";\n\t\t\t\tGCC_PREFIX_HEADER = \"Target Support Files/iCloudDocumentSync/iCloudDocumentSync-prefix.pch\";\n\t\t\t\tIPHONEOS_DEPLOYMENT_TARGET = 6.0;\n\t\t\t\tOTHER_LDFLAGS = \"\";\n\t\t\t\tOTHER_LIBTOOLFLAGS = \"\";\n\t\t\t\tPRIVATE_HEADERS_FOLDER_PATH = \"\";\n\t\t\t\tPUBLIC_HEADERS_FOLDER_PATH = \"\";\n\t\t\t\tSDKROOT = iphoneos;\n\t\t\t\tSKIP_INSTALL = YES;\n\t\t\t\tSWIFT_ACTIVE_COMPILATION_CONDITIONS = \"$(inherited) \";\n\t\t\t\tSWIFT_VERSION = 3.0;\n\t\t\t\tTARGETED_DEVICE_FAMILY = \"1,2\";\n\t\t\t\tVALIDATE_PRODUCT = YES;\n\t\t\t};\n\t\t\tname = Release;\n\t\t};\n\t\t32B1F5809B9DE28D9FD788C98A5DB92F /* Release */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbaseConfigurationReference = A7BF3D0BF140305FA5FE4908A6695EC4 /* CoreBitcoin.xcconfig */;\n\t\t\tbuildSettings = {\n\t\t\t\tCODE_SIGN_IDENTITY = \"iPhone Developer\";\n\t\t\t\t\"CODE_SIGN_IDENTITY[sdk=appletvos*]\" = \"\";\n\t\t\t\t\"CODE_SIGN_IDENTITY[sdk=iphoneos*]\" = \"\";\n\t\t\t\t\"CODE_SIGN_IDENTITY[sdk=watchos*]\" = \"\";\n\t\t\t\tGCC_PREFIX_HEADER = \"Target Support Files/CoreBitcoin/CoreBitcoin-prefix.pch\";\n\t\t\t\tIPHONEOS_DEPLOYMENT_TARGET = 7.0;\n\t\t\t\tOTHER_LDFLAGS = \"\";\n\t\t\t\tOTHER_LIBTOOLFLAGS = \"\";\n\t\t\t\tPRIVATE_HEADERS_FOLDER_PATH = \"\";\n\t\t\t\tPUBLIC_HEADERS_FOLDER_PATH = \"\";\n\t\t\t\tSDKROOT = iphoneos;\n\t\t\t\tSKIP_INSTALL = YES;\n\t\t\t\tSWIFT_ACTIVE_COMPILATION_CONDITIONS = \"$(inherited) \";\n\t\t\t\tSWIFT_VERSION = 3.0;\n\t\t\t\tTARGETED_DEVICE_FAMILY = \"1,2\";\n\t\t\t\tVALIDATE_PRODUCT = YES;\n\t\t\t};\n\t\t\tname = Release;\n\t\t};\n\t\t3A0200DC22D14EC31465C4F05CD4CC7B /* Debug */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbaseConfigurationReference = 85DCB1C473532CB20732F5D63458E58F /* Pods-ArcBitTests.debug.xcconfig */;\n\t\t\tbuildSettings = {\n\t\t\t\tCODE_SIGN_IDENTITY = \"iPhone Developer\";\n\t\t\t\t\"CODE_SIGN_IDENTITY[sdk=appletvos*]\" = \"\";\n\t\t\t\t\"CODE_SIGN_IDENTITY[sdk=iphoneos*]\" = \"\";\n\t\t\t\t\"CODE_SIGN_IDENTITY[sdk=watchos*]\" = \"\";\n\t\t\t\tIPHONEOS_DEPLOYMENT_TARGET = 8.2;\n\t\t\t\tMACH_O_TYPE = staticlib;\n\t\t\t\tOTHER_LDFLAGS = \"\";\n\t\t\t\tOTHER_LIBTOOLFLAGS = \"\";\n\t\t\t\tPODS_ROOT = \"$(SRCROOT)\";\n\t\t\t\tPRODUCT_BUNDLE_IDENTIFIER = \"org.cocoapods.${PRODUCT_NAME:rfc1034identifier}\";\n\t\t\t\tSDKROOT = iphoneos;\n\t\t\t\tSKIP_INSTALL = YES;\n\t\t\t\tTARGETED_DEVICE_FAMILY = \"1,2\";\n\t\t\t};\n\t\t\tname = Debug;\n\t\t};\n\t\t3DA687C89C7AD847F342F897CD82CD09 /* Release */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbaseConfigurationReference = 58454370823CB30F3DD5DA8466ADE99E /* MBProgressHUD.xcconfig */;\n\t\t\tbuildSettings = {\n\t\t\t\tCODE_SIGN_IDENTITY = \"iPhone Developer\";\n\t\t\t\t\"CODE_SIGN_IDENTITY[sdk=appletvos*]\" = \"\";\n\t\t\t\t\"CODE_SIGN_IDENTITY[sdk=iphoneos*]\" = \"\";\n\t\t\t\t\"CODE_SIGN_IDENTITY[sdk=watchos*]\" = \"\";\n\t\t\t\tGCC_PREFIX_HEADER = \"Target Support Files/MBProgressHUD/MBProgressHUD-prefix.pch\";\n\t\t\t\tIPHONEOS_DEPLOYMENT_TARGET = 4.3;\n\t\t\t\tOTHER_LDFLAGS = \"\";\n\t\t\t\tOTHER_LIBTOOLFLAGS = \"\";\n\t\t\t\tPRIVATE_HEADERS_FOLDER_PATH = \"\";\n\t\t\t\tPUBLIC_HEADERS_FOLDER_PATH = \"\";\n\t\t\t\tSDKROOT = iphoneos;\n\t\t\t\tSKIP_INSTALL = YES;\n\t\t\t\tSWIFT_ACTIVE_COMPILATION_CONDITIONS = \"$(inherited) \";\n\t\t\t\tSWIFT_VERSION = 3.0;\n\t\t\t\tTARGETED_DEVICE_FAMILY = \"1,2\";\n\t\t\t\tVALIDATE_PRODUCT = YES;\n\t\t\t};\n\t\t\tname = Release;\n\t\t};\n\t\t519628D966BBA8A3AF2AC0131423325A /* Debug */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbaseConfigurationReference = 08B5BDDC0B3AFB71C534E71106C76640 /* RNCryptor.xcconfig */;\n\t\t\tbuildSettings = {\n\t\t\t\tCODE_SIGN_IDENTITY = \"iPhone Developer\";\n\t\t\t\t\"CODE_SIGN_IDENTITY[sdk=appletvos*]\" = \"\";\n\t\t\t\t\"CODE_SIGN_IDENTITY[sdk=iphoneos*]\" = \"\";\n\t\t\t\t\"CODE_SIGN_IDENTITY[sdk=watchos*]\" = \"\";\n\t\t\t\tGCC_PREFIX_HEADER = \"Target Support Files/RNCryptor/RNCryptor-prefix.pch\";\n\t\t\t\tIPHONEOS_DEPLOYMENT_TARGET = 5.0;\n\t\t\t\tOTHER_LDFLAGS = \"\";\n\t\t\t\tOTHER_LIBTOOLFLAGS = \"\";\n\t\t\t\tPRIVATE_HEADERS_FOLDER_PATH = \"\";\n\t\t\t\tPUBLIC_HEADERS_FOLDER_PATH = \"\";\n\t\t\t\tSDKROOT = iphoneos;\n\t\t\t\tSKIP_INSTALL = YES;\n\t\t\t\tSWIFT_ACTIVE_COMPILATION_CONDITIONS = \"$(inherited) \";\n\t\t\t\tSWIFT_VERSION = 3.0;\n\t\t\t\tTARGETED_DEVICE_FAMILY = \"1,2\";\n\t\t\t};\n\t\t\tname = Debug;\n\t\t};\n\t\t5250EF98F4091CA5307A3FA96F7CBCC5 /* Release */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbaseConfigurationReference = 9B2C58CDC7B64DEA29C434BB1C297708 /* ISO8601DateFormatter.xcconfig */;\n\t\t\tbuildSettings = {\n\t\t\t\tCODE_SIGN_IDENTITY = \"iPhone Developer\";\n\t\t\t\t\"CODE_SIGN_IDENTITY[sdk=appletvos*]\" = \"\";\n\t\t\t\t\"CODE_SIGN_IDENTITY[sdk=iphoneos*]\" = \"\";\n\t\t\t\t\"CODE_SIGN_IDENTITY[sdk=watchos*]\" = \"\";\n\t\t\t\tGCC_PREFIX_HEADER = \"Target Support Files/ISO8601DateFormatter/ISO8601DateFormatter-prefix.pch\";\n\t\t\t\tIPHONEOS_DEPLOYMENT_TARGET = 5.0;\n\t\t\t\tOTHER_LDFLAGS = \"\";\n\t\t\t\tOTHER_LIBTOOLFLAGS = \"\";\n\t\t\t\tPRIVATE_HEADERS_FOLDER_PATH = \"\";\n\t\t\t\tPUBLIC_HEADERS_FOLDER_PATH = \"\";\n\t\t\t\tSDKROOT = iphoneos;\n\t\t\t\tSKIP_INSTALL = YES;\n\t\t\t\tSWIFT_ACTIVE_COMPILATION_CONDITIONS = \"$(inherited) \";\n\t\t\t\tSWIFT_VERSION = 3.0;\n\t\t\t\tTARGETED_DEVICE_FAMILY = \"1,2\";\n\t\t\t\tVALIDATE_PRODUCT = YES;\n\t\t\t};\n\t\t\tname = Release;\n\t\t};\n\t\t5A4F5E1D9598ACBB74C9C4A658FA2965 /* Debug */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbaseConfigurationReference = 9B2C58CDC7B64DEA29C434BB1C297708 /* ISO8601DateFormatter.xcconfig */;\n\t\t\tbuildSettings = {\n\t\t\t\tCODE_SIGN_IDENTITY = \"iPhone Developer\";\n\t\t\t\t\"CODE_SIGN_IDENTITY[sdk=appletvos*]\" = \"\";\n\t\t\t\t\"CODE_SIGN_IDENTITY[sdk=iphoneos*]\" = \"\";\n\t\t\t\t\"CODE_SIGN_IDENTITY[sdk=watchos*]\" = \"\";\n\t\t\t\tGCC_PREFIX_HEADER = \"Target Support Files/ISO8601DateFormatter/ISO8601DateFormatter-prefix.pch\";\n\t\t\t\tIPHONEOS_DEPLOYMENT_TARGET = 5.0;\n\t\t\t\tOTHER_LDFLAGS = \"\";\n\t\t\t\tOTHER_LIBTOOLFLAGS = \"\";\n\t\t\t\tPRIVATE_HEADERS_FOLDER_PATH = \"\";\n\t\t\t\tPUBLIC_HEADERS_FOLDER_PATH = \"\";\n\t\t\t\tSDKROOT = iphoneos;\n\t\t\t\tSKIP_INSTALL = YES;\n\t\t\t\tSWIFT_ACTIVE_COMPILATION_CONDITIONS = \"$(inherited) \";\n\t\t\t\tSWIFT_VERSION = 3.0;\n\t\t\t\tTARGETED_DEVICE_FAMILY = \"1,2\";\n\t\t\t};\n\t\t\tname = Debug;\n\t\t};\n\t\t5CB3E8E837C92E26FCD99EB48D452E9B /* Debug */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbaseConfigurationReference = 5C889781B47A464116B2EC159698C667 /* Pods-ArcBit.debug.xcconfig */;\n\t\t\tbuildSettings = {\n\t\t\t\tCODE_SIGN_IDENTITY = \"iPhone Developer\";\n\t\t\t\t\"CODE_SIGN_IDENTITY[sdk=appletvos*]\" = \"\";\n\t\t\t\t\"CODE_SIGN_IDENTITY[sdk=iphoneos*]\" = \"\";\n\t\t\t\t\"CODE_SIGN_IDENTITY[sdk=watchos*]\" = \"\";\n\t\t\t\tIPHONEOS_DEPLOYMENT_TARGET = 8.2;\n\t\t\t\tMACH_O_TYPE = staticlib;\n\t\t\t\tOTHER_LDFLAGS = \"\";\n\t\t\t\tOTHER_LIBTOOLFLAGS = \"\";\n\t\t\t\tPODS_ROOT = \"$(SRCROOT)\";\n\t\t\t\tPRODUCT_BUNDLE_IDENTIFIER = \"org.cocoapods.${PRODUCT_NAME:rfc1034identifier}\";\n\t\t\t\tSDKROOT = iphoneos;\n\t\t\t\tSKIP_INSTALL = YES;\n\t\t\t\tTARGETED_DEVICE_FAMILY = \"1,2\";\n\t\t\t};\n\t\t\tname = Debug;\n\t\t};\n\t\t68A2E61F01B8E4B5C15A1A605F908179 /* Release */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbaseConfigurationReference = 16915D02A8A00F9C7D158B8221B290B9 /* AFNetworking.xcconfig */;\n\t\t\tbuildSettings = {\n\t\t\t\tCODE_SIGN_IDENTITY = \"iPhone Developer\";\n\t\t\t\t\"CODE_SIGN_IDENTITY[sdk=appletvos*]\" = \"\";\n\t\t\t\t\"CODE_SIGN_IDENTITY[sdk=iphoneos*]\" = \"\";\n\t\t\t\t\"CODE_SIGN_IDENTITY[sdk=watchos*]\" = \"\";\n\t\t\t\tGCC_PREFIX_HEADER = \"Target Support Files/AFNetworking/AFNetworking-prefix.pch\";\n\t\t\t\tIPHONEOS_DEPLOYMENT_TARGET = 6.0;\n\t\t\t\tOTHER_LDFLAGS = \"\";\n\t\t\t\tOTHER_LIBTOOLFLAGS = \"\";\n\t\t\t\tPRIVATE_HEADERS_FOLDER_PATH = \"\";\n\t\t\t\tPUBLIC_HEADERS_FOLDER_PATH = \"\";\n\t\t\t\tSDKROOT = iphoneos;\n\t\t\t\tSKIP_INSTALL = YES;\n\t\t\t\tSWIFT_ACTIVE_COMPILATION_CONDITIONS = \"$(inherited) \";\n\t\t\t\tSWIFT_VERSION = 3.0;\n\t\t\t\tTARGETED_DEVICE_FAMILY = \"1,2\";\n\t\t\t\tVALIDATE_PRODUCT = YES;\n\t\t\t};\n\t\t\tname = Release;\n\t\t};\n\t\t711750B421040573FBBFD9E94140A96E /* Release */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbuildSettings = {\n\t\t\t\tALWAYS_SEARCH_USER_PATHS = NO;\n\t\t\t\tCLANG_ANALYZER_NONNULL = YES;\n\t\t\t\tCLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;\n\t\t\t\tCLANG_CXX_LANGUAGE_STANDARD = \"gnu++14\";\n\t\t\t\tCLANG_CXX_LIBRARY = \"libc++\";\n\t\t\t\tCLANG_ENABLE_MODULES = YES;\n\t\t\t\tCLANG_ENABLE_OBJC_ARC = YES;\n\t\t\t\tCLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;\n\t\t\t\tCLANG_WARN_BOOL_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_COMMA = YES;\n\t\t\t\tCLANG_WARN_CONSTANT_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;\n\t\t\t\tCLANG_WARN_DOCUMENTATION_COMMENTS = YES;\n\t\t\t\tCLANG_WARN_EMPTY_BODY = YES;\n\t\t\t\tCLANG_WARN_ENUM_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_INFINITE_RECURSION = YES;\n\t\t\t\tCLANG_WARN_INT_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_OBJC_LITERAL_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;\n\t\t\t\tCLANG_WARN_RANGE_LOOP_ANALYSIS = YES;\n\t\t\t\tCLANG_WARN_STRICT_PROTOTYPES = YES;\n\t\t\t\tCLANG_WARN_SUSPICIOUS_MOVE = YES;\n\t\t\t\tCLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;\n\t\t\t\tCLANG_WARN_UNREACHABLE_CODE = YES;\n\t\t\t\tCLANG_WARN__DUPLICATE_METHOD_MATCH = YES;\n\t\t\t\tCODE_SIGNING_REQUIRED = NO;\n\t\t\t\tCOPY_PHASE_STRIP = NO;\n\t\t\t\tDEBUG_INFORMATION_FORMAT = \"dwarf-with-dsym\";\n\t\t\t\tENABLE_NS_ASSERTIONS = NO;\n\t\t\t\tENABLE_STRICT_OBJC_MSGSEND = YES;\n\t\t\t\tGCC_C_LANGUAGE_STANDARD = gnu11;\n\t\t\t\tGCC_NO_COMMON_BLOCKS = YES;\n\t\t\t\tGCC_PREPROCESSOR_DEFINITIONS = (\n\t\t\t\t\t\"POD_CONFIGURATION_RELEASE=1\",\n\t\t\t\t\t\"$(inherited)\",\n\t\t\t\t);\n\t\t\t\tGCC_WARN_64_TO_32_BIT_CONVERSION = YES;\n\t\t\t\tGCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;\n\t\t\t\tGCC_WARN_UNDECLARED_SELECTOR = YES;\n\t\t\t\tGCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;\n\t\t\t\tGCC_WARN_UNUSED_FUNCTION = YES;\n\t\t\t\tGCC_WARN_UNUSED_VARIABLE = YES;\n\t\t\t\tIPHONEOS_DEPLOYMENT_TARGET = 8.2;\n\t\t\t\tMTL_ENABLE_DEBUG_INFO = NO;\n\t\t\t\tPRODUCT_NAME = \"$(TARGET_NAME)\";\n\t\t\t\tPROVISIONING_PROFILE_SPECIFIER = NO_SIGNING/;\n\t\t\t\tSTRIP_INSTALLED_PRODUCT = NO;\n\t\t\t\tSYMROOT = \"${SRCROOT}/../build\";\n\t\t\t};\n\t\t\tname = Release;\n\t\t};\n\t\t9845B4ED5D36DD5F10FA1F66B1BAC472 /* Debug */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbaseConfigurationReference = A7BF3D0BF140305FA5FE4908A6695EC4 /* CoreBitcoin.xcconfig */;\n\t\t\tbuildSettings = {\n\t\t\t\tCODE_SIGN_IDENTITY = \"iPhone Developer\";\n\t\t\t\t\"CODE_SIGN_IDENTITY[sdk=appletvos*]\" = \"\";\n\t\t\t\t\"CODE_SIGN_IDENTITY[sdk=iphoneos*]\" = \"\";\n\t\t\t\t\"CODE_SIGN_IDENTITY[sdk=watchos*]\" = \"\";\n\t\t\t\tGCC_PREFIX_HEADER = \"Target Support Files/CoreBitcoin/CoreBitcoin-prefix.pch\";\n\t\t\t\tIPHONEOS_DEPLOYMENT_TARGET = 7.0;\n\t\t\t\tOTHER_LDFLAGS = \"\";\n\t\t\t\tOTHER_LIBTOOLFLAGS = \"\";\n\t\t\t\tPRIVATE_HEADERS_FOLDER_PATH = \"\";\n\t\t\t\tPUBLIC_HEADERS_FOLDER_PATH = \"\";\n\t\t\t\tSDKROOT = iphoneos;\n\t\t\t\tSKIP_INSTALL = YES;\n\t\t\t\tSWIFT_ACTIVE_COMPILATION_CONDITIONS = \"$(inherited) \";\n\t\t\t\tSWIFT_VERSION = 3.0;\n\t\t\t\tTARGETED_DEVICE_FAMILY = \"1,2\";\n\t\t\t};\n\t\t\tname = Debug;\n\t\t};\n\t\t9C97A3112F34DBB446336B74107D641F /* Release */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbaseConfigurationReference = FC99B895CD0F6A0FD3E937953ED08BF7 /* Pods-ArcBit.release.xcconfig */;\n\t\t\tbuildSettings = {\n\t\t\t\tCODE_SIGN_IDENTITY = \"iPhone Developer\";\n\t\t\t\t\"CODE_SIGN_IDENTITY[sdk=appletvos*]\" = \"\";\n\t\t\t\t\"CODE_SIGN_IDENTITY[sdk=iphoneos*]\" = \"\";\n\t\t\t\t\"CODE_SIGN_IDENTITY[sdk=watchos*]\" = \"\";\n\t\t\t\tIPHONEOS_DEPLOYMENT_TARGET = 8.2;\n\t\t\t\tMACH_O_TYPE = staticlib;\n\t\t\t\tOTHER_LDFLAGS = \"\";\n\t\t\t\tOTHER_LIBTOOLFLAGS = \"\";\n\t\t\t\tPODS_ROOT = \"$(SRCROOT)\";\n\t\t\t\tPRODUCT_BUNDLE_IDENTIFIER = \"org.cocoapods.${PRODUCT_NAME:rfc1034identifier}\";\n\t\t\t\tSDKROOT = iphoneos;\n\t\t\t\tSKIP_INSTALL = YES;\n\t\t\t\tTARGETED_DEVICE_FAMILY = \"1,2\";\n\t\t\t\tVALIDATE_PRODUCT = YES;\n\t\t\t};\n\t\t\tname = Release;\n\t\t};\n\t\t9F5531E45243B133B492B7623B5122AB /* Release */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbaseConfigurationReference = E28A9F712C570022DFB4A3E5C234C227 /* ECSlidingViewController.xcconfig */;\n\t\t\tbuildSettings = {\n\t\t\t\tCODE_SIGN_IDENTITY = \"iPhone Developer\";\n\t\t\t\t\"CODE_SIGN_IDENTITY[sdk=appletvos*]\" = \"\";\n\t\t\t\t\"CODE_SIGN_IDENTITY[sdk=iphoneos*]\" = \"\";\n\t\t\t\t\"CODE_SIGN_IDENTITY[sdk=watchos*]\" = \"\";\n\t\t\t\tGCC_PREFIX_HEADER = \"Target Support Files/ECSlidingViewController/ECSlidingViewController-prefix.pch\";\n\t\t\t\tIPHONEOS_DEPLOYMENT_TARGET = 7.0;\n\t\t\t\tOTHER_LDFLAGS = \"\";\n\t\t\t\tOTHER_LIBTOOLFLAGS = \"\";\n\t\t\t\tPRIVATE_HEADERS_FOLDER_PATH = \"\";\n\t\t\t\tPUBLIC_HEADERS_FOLDER_PATH = \"\";\n\t\t\t\tSDKROOT = iphoneos;\n\t\t\t\tSKIP_INSTALL = YES;\n\t\t\t\tSWIFT_ACTIVE_COMPILATION_CONDITIONS = \"$(inherited) \";\n\t\t\t\tSWIFT_VERSION = 3.0;\n\t\t\t\tTARGETED_DEVICE_FAMILY = \"1,2\";\n\t\t\t\tVALIDATE_PRODUCT = YES;\n\t\t\t};\n\t\t\tname = Release;\n\t\t};\n\t\tBE96D71242E4C6DE5FE1ADCF8179D000 /* Debug */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbaseConfigurationReference = E28A9F712C570022DFB4A3E5C234C227 /* ECSlidingViewController.xcconfig */;\n\t\t\tbuildSettings = {\n\t\t\t\tCODE_SIGN_IDENTITY = \"iPhone Developer\";\n\t\t\t\t\"CODE_SIGN_IDENTITY[sdk=appletvos*]\" = \"\";\n\t\t\t\t\"CODE_SIGN_IDENTITY[sdk=iphoneos*]\" = \"\";\n\t\t\t\t\"CODE_SIGN_IDENTITY[sdk=watchos*]\" = \"\";\n\t\t\t\tGCC_PREFIX_HEADER = \"Target Support Files/ECSlidingViewController/ECSlidingViewController-prefix.pch\";\n\t\t\t\tIPHONEOS_DEPLOYMENT_TARGET = 7.0;\n\t\t\t\tOTHER_LDFLAGS = \"\";\n\t\t\t\tOTHER_LIBTOOLFLAGS = \"\";\n\t\t\t\tPRIVATE_HEADERS_FOLDER_PATH = \"\";\n\t\t\t\tPUBLIC_HEADERS_FOLDER_PATH = \"\";\n\t\t\t\tSDKROOT = iphoneos;\n\t\t\t\tSKIP_INSTALL = YES;\n\t\t\t\tSWIFT_ACTIVE_COMPILATION_CONDITIONS = \"$(inherited) \";\n\t\t\t\tSWIFT_VERSION = 3.0;\n\t\t\t\tTARGETED_DEVICE_FAMILY = \"1,2\";\n\t\t\t};\n\t\t\tname = Debug;\n\t\t};\n\t\tBF0D38120F1C225A43E86599E22B5FB4 /* Debug */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbaseConfigurationReference = 58454370823CB30F3DD5DA8466ADE99E /* MBProgressHUD.xcconfig */;\n\t\t\tbuildSettings = {\n\t\t\t\tCODE_SIGN_IDENTITY = \"iPhone Developer\";\n\t\t\t\t\"CODE_SIGN_IDENTITY[sdk=appletvos*]\" = \"\";\n\t\t\t\t\"CODE_SIGN_IDENTITY[sdk=iphoneos*]\" = \"\";\n\t\t\t\t\"CODE_SIGN_IDENTITY[sdk=watchos*]\" = \"\";\n\t\t\t\tGCC_PREFIX_HEADER = \"Target Support Files/MBProgressHUD/MBProgressHUD-prefix.pch\";\n\t\t\t\tIPHONEOS_DEPLOYMENT_TARGET = 4.3;\n\t\t\t\tOTHER_LDFLAGS = \"\";\n\t\t\t\tOTHER_LIBTOOLFLAGS = \"\";\n\t\t\t\tPRIVATE_HEADERS_FOLDER_PATH = \"\";\n\t\t\t\tPUBLIC_HEADERS_FOLDER_PATH = \"\";\n\t\t\t\tSDKROOT = iphoneos;\n\t\t\t\tSKIP_INSTALL = YES;\n\t\t\t\tSWIFT_ACTIVE_COMPILATION_CONDITIONS = \"$(inherited) \";\n\t\t\t\tSWIFT_VERSION = 3.0;\n\t\t\t\tTARGETED_DEVICE_FAMILY = \"1,2\";\n\t\t\t};\n\t\t\tname = Debug;\n\t\t};\n\t\tCAB4F5BD0CD4C717BFD5E01A7B6C772C /* Debug */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbaseConfigurationReference = 16915D02A8A00F9C7D158B8221B290B9 /* AFNetworking.xcconfig */;\n\t\t\tbuildSettings = {\n\t\t\t\tCODE_SIGN_IDENTITY = \"iPhone Developer\";\n\t\t\t\t\"CODE_SIGN_IDENTITY[sdk=appletvos*]\" = \"\";\n\t\t\t\t\"CODE_SIGN_IDENTITY[sdk=iphoneos*]\" = \"\";\n\t\t\t\t\"CODE_SIGN_IDENTITY[sdk=watchos*]\" = \"\";\n\t\t\t\tGCC_PREFIX_HEADER = \"Target Support Files/AFNetworking/AFNetworking-prefix.pch\";\n\t\t\t\tIPHONEOS_DEPLOYMENT_TARGET = 6.0;\n\t\t\t\tOTHER_LDFLAGS = \"\";\n\t\t\t\tOTHER_LIBTOOLFLAGS = \"\";\n\t\t\t\tPRIVATE_HEADERS_FOLDER_PATH = \"\";\n\t\t\t\tPUBLIC_HEADERS_FOLDER_PATH = \"\";\n\t\t\t\tSDKROOT = iphoneos;\n\t\t\t\tSKIP_INSTALL = YES;\n\t\t\t\tSWIFT_ACTIVE_COMPILATION_CONDITIONS = \"$(inherited) \";\n\t\t\t\tSWIFT_VERSION = 3.0;\n\t\t\t\tTARGETED_DEVICE_FAMILY = \"1,2\";\n\t\t\t};\n\t\t\tname = Debug;\n\t\t};\n\t\tEAD6FC0AFFC2DDD4A8639E279367E88A /* Debug */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbaseConfigurationReference = 0FA1AC957975C828AAB3F1ECB8B7BC42 /* iCloudDocumentSync.xcconfig */;\n\t\t\tbuildSettings = {\n\t\t\t\tCODE_SIGN_IDENTITY = \"iPhone Developer\";\n\t\t\t\t\"CODE_SIGN_IDENTITY[sdk=appletvos*]\" = \"\";\n\t\t\t\t\"CODE_SIGN_IDENTITY[sdk=iphoneos*]\" = \"\";\n\t\t\t\t\"CODE_SIGN_IDENTITY[sdk=watchos*]\" = \"\";\n\t\t\t\tGCC_PREFIX_HEADER = \"Target Support Files/iCloudDocumentSync/iCloudDocumentSync-prefix.pch\";\n\t\t\t\tIPHONEOS_DEPLOYMENT_TARGET = 6.0;\n\t\t\t\tOTHER_LDFLAGS = \"\";\n\t\t\t\tOTHER_LIBTOOLFLAGS = \"\";\n\t\t\t\tPRIVATE_HEADERS_FOLDER_PATH = \"\";\n\t\t\t\tPUBLIC_HEADERS_FOLDER_PATH = \"\";\n\t\t\t\tSDKROOT = iphoneos;\n\t\t\t\tSKIP_INSTALL = YES;\n\t\t\t\tSWIFT_ACTIVE_COMPILATION_CONDITIONS = \"$(inherited) \";\n\t\t\t\tSWIFT_VERSION = 3.0;\n\t\t\t\tTARGETED_DEVICE_FAMILY = \"1,2\";\n\t\t\t};\n\t\t\tname = Debug;\n\t\t};\n\t\tEF5183577ED66FA55275FCB1B94B840A /* Debug */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbaseConfigurationReference = 7670A2D213D3E45C32D51688A27FD23A /* SwiftTryCatch.xcconfig */;\n\t\t\tbuildSettings = {\n\t\t\t\tCODE_SIGN_IDENTITY = \"iPhone Developer\";\n\t\t\t\t\"CODE_SIGN_IDENTITY[sdk=appletvos*]\" = \"\";\n\t\t\t\t\"CODE_SIGN_IDENTITY[sdk=iphoneos*]\" = \"\";\n\t\t\t\t\"CODE_SIGN_IDENTITY[sdk=watchos*]\" = \"\";\n\t\t\t\tGCC_PREFIX_HEADER = \"Target Support Files/SwiftTryCatch/SwiftTryCatch-prefix.pch\";\n\t\t\t\tIPHONEOS_DEPLOYMENT_TARGET = 7.0;\n\t\t\t\tOTHER_LDFLAGS = \"\";\n\t\t\t\tOTHER_LIBTOOLFLAGS = \"\";\n\t\t\t\tPRIVATE_HEADERS_FOLDER_PATH = \"\";\n\t\t\t\tPUBLIC_HEADERS_FOLDER_PATH = \"\";\n\t\t\t\tSDKROOT = iphoneos;\n\t\t\t\tSKIP_INSTALL = YES;\n\t\t\t\tSWIFT_ACTIVE_COMPILATION_CONDITIONS = \"$(inherited) \";\n\t\t\t\tSWIFT_VERSION = 3.0;\n\t\t\t\tTARGETED_DEVICE_FAMILY = \"1,2\";\n\t\t\t};\n\t\t\tname = Debug;\n\t\t};\n\t\tF1AE7C0E18986F21F13EF4E6B41405DD /* Release */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbaseConfigurationReference = 9443DCC7B3882D884A08AD4FBB192D94 /* Pods-ArcBitTests.release.xcconfig */;\n\t\t\tbuildSettings = {\n\t\t\t\tCODE_SIGN_IDENTITY = \"iPhone Developer\";\n\t\t\t\t\"CODE_SIGN_IDENTITY[sdk=appletvos*]\" = \"\";\n\t\t\t\t\"CODE_SIGN_IDENTITY[sdk=iphoneos*]\" = \"\";\n\t\t\t\t\"CODE_SIGN_IDENTITY[sdk=watchos*]\" = \"\";\n\t\t\t\tIPHONEOS_DEPLOYMENT_TARGET = 8.2;\n\t\t\t\tMACH_O_TYPE = staticlib;\n\t\t\t\tOTHER_LDFLAGS = \"\";\n\t\t\t\tOTHER_LIBTOOLFLAGS = \"\";\n\t\t\t\tPODS_ROOT = \"$(SRCROOT)\";\n\t\t\t\tPRODUCT_BUNDLE_IDENTIFIER = \"org.cocoapods.${PRODUCT_NAME:rfc1034identifier}\";\n\t\t\t\tSDKROOT = iphoneos;\n\t\t\t\tSKIP_INSTALL = YES;\n\t\t\t\tTARGETED_DEVICE_FAMILY = \"1,2\";\n\t\t\t\tVALIDATE_PRODUCT = YES;\n\t\t\t};\n\t\t\tname = Release;\n\t\t};\n/* End XCBuildConfiguration section */\n\n/* Begin XCConfigurationList section */\n\t\t00167DD04DA4501437636D85D478EFDA /* Build configuration list for PBXNativeTarget \"CoreBitcoin\" */ = {\n\t\t\tisa = XCConfigurationList;\n\t\t\tbuildConfigurations = (\n\t\t\t\t9845B4ED5D36DD5F10FA1F66B1BAC472 /* Debug */,\n\t\t\t\t32B1F5809B9DE28D9FD788C98A5DB92F /* Release */,\n\t\t\t);\n\t\t\tdefaultConfigurationIsVisible = 0;\n\t\t\tdefaultConfigurationName = Release;\n\t\t};\n\t\t1BAA56232E0DC10281030E5EB1ABD9B5 /* Build configuration list for PBXNativeTarget \"SwiftTryCatch\" */ = {\n\t\t\tisa = XCConfigurationList;\n\t\t\tbuildConfigurations = (\n\t\t\t\tEF5183577ED66FA55275FCB1B94B840A /* Debug */,\n\t\t\t\t0727742A3AB494E1BBD97BD70B9D4C6A /* Release */,\n\t\t\t);\n\t\t\tdefaultConfigurationIsVisible = 0;\n\t\t\tdefaultConfigurationName = Release;\n\t\t};\n\t\t2D8E8EC45A3A1A1D94AE762CB5028504 /* Build configuration list for PBXProject \"Pods\" */ = {\n\t\t\tisa = XCConfigurationList;\n\t\t\tbuildConfigurations = (\n\t\t\t\t0FBA15A7F6080A41777A12372FBFD6D3 /* Debug */,\n\t\t\t\t711750B421040573FBBFD9E94140A96E /* Release */,\n\t\t\t);\n\t\t\tdefaultConfigurationIsVisible = 0;\n\t\t\tdefaultConfigurationName = Release;\n\t\t};\n\t\t338FF900C277979298D208BB655D4C60 /* Build configuration list for PBXNativeTarget \"ECSlidingViewController\" */ = {\n\t\t\tisa = XCConfigurationList;\n\t\t\tbuildConfigurations = (\n\t\t\t\tBE96D71242E4C6DE5FE1ADCF8179D000 /* Debug */,\n\t\t\t\t9F5531E45243B133B492B7623B5122AB /* Release */,\n\t\t\t);\n\t\t\tdefaultConfigurationIsVisible = 0;\n\t\t\tdefaultConfigurationName = Release;\n\t\t};\n\t\t73561335CB8EF412F48ACEF2E45C02BF /* Build configuration list for PBXNativeTarget \"Pods-ArcBitTests\" */ = {\n\t\t\tisa = XCConfigurationList;\n\t\t\tbuildConfigurations = (\n\t\t\t\t3A0200DC22D14EC31465C4F05CD4CC7B /* Debug */,\n\t\t\t\tF1AE7C0E18986F21F13EF4E6B41405DD /* Release */,\n\t\t\t);\n\t\t\tdefaultConfigurationIsVisible = 0;\n\t\t\tdefaultConfigurationName = Release;\n\t\t};\n\t\t7C66CB3E04875BC1C255326C7ADB2D78 /* Build configuration list for PBXNativeTarget \"MBProgressHUD\" */ = {\n\t\t\tisa = XCConfigurationList;\n\t\t\tbuildConfigurations = (\n\t\t\t\tBF0D38120F1C225A43E86599E22B5FB4 /* Debug */,\n\t\t\t\t3DA687C89C7AD847F342F897CD82CD09 /* Release */,\n\t\t\t);\n\t\t\tdefaultConfigurationIsVisible = 0;\n\t\t\tdefaultConfigurationName = Release;\n\t\t};\n\t\t8634E992F0F34E398CF05A6763C6DBFC /* Build configuration list for PBXNativeTarget \"Pods-ArcBit\" */ = {\n\t\t\tisa = XCConfigurationList;\n\t\t\tbuildConfigurations = (\n\t\t\t\t5CB3E8E837C92E26FCD99EB48D452E9B /* Debug */,\n\t\t\t\t9C97A3112F34DBB446336B74107D641F /* Release */,\n\t\t\t);\n\t\t\tdefaultConfigurationIsVisible = 0;\n\t\t\tdefaultConfigurationName = Release;\n\t\t};\n\t\t93FA305BE78ACA5455B4C3D25B2F6990 /* Build configuration list for PBXNativeTarget \"ISO8601DateFormatter\" */ = {\n\t\t\tisa = XCConfigurationList;\n\t\t\tbuildConfigurations = (\n\t\t\t\t5A4F5E1D9598ACBB74C9C4A658FA2965 /* Debug */,\n\t\t\t\t5250EF98F4091CA5307A3FA96F7CBCC5 /* Release */,\n\t\t\t);\n\t\t\tdefaultConfigurationIsVisible = 0;\n\t\t\tdefaultConfigurationName = Release;\n\t\t};\n\t\tE7A89CA9D02AD96B862F83FF9A5290A9 /* Build configuration list for PBXNativeTarget \"AFNetworking\" */ = {\n\t\t\tisa = XCConfigurationList;\n\t\t\tbuildConfigurations = (\n\t\t\t\tCAB4F5BD0CD4C717BFD5E01A7B6C772C /* Debug */,\n\t\t\t\t68A2E61F01B8E4B5C15A1A605F908179 /* Release */,\n\t\t\t);\n\t\t\tdefaultConfigurationIsVisible = 0;\n\t\t\tdefaultConfigurationName = Release;\n\t\t};\n\t\tF69A87F2B20B1DF99EEB99D30B7B95FB /* Build configuration list for PBXNativeTarget \"iCloudDocumentSync\" */ = {\n\t\t\tisa = XCConfigurationList;\n\t\t\tbuildConfigurations = (\n\t\t\t\tEAD6FC0AFFC2DDD4A8639E279367E88A /* Debug */,\n\t\t\t\t2AA683D1365E9A56462B6B7783A06215 /* Release */,\n\t\t\t);\n\t\t\tdefaultConfigurationIsVisible = 0;\n\t\t\tdefaultConfigurationName = Release;\n\t\t};\n\t\tFB6CB9EEF2A28AB0A58EC7DEB23EBA13 /* Build configuration list for PBXNativeTarget \"RNCryptor\" */ = {\n\t\t\tisa = XCConfigurationList;\n\t\t\tbuildConfigurations = (\n\t\t\t\t519628D966BBA8A3AF2AC0131423325A /* Debug */,\n\t\t\t\t06DB9642358DD323AD3BC220C2B4E9A9 /* Release */,\n\t\t\t);\n\t\t\tdefaultConfigurationIsVisible = 0;\n\t\t\tdefaultConfigurationName = Release;\n\t\t};\n/* End XCConfigurationList section */\n\t};\n\trootObject = D41D8CD98F00B204E9800998ECF8427E /* Project object */;\n}\n"
  },
  {
    "path": "Pods/RNCryptor/README.md",
    "content": "# RNCryptor\n\nCross-language AES Encryptor/Decryptor [data\nformat](https://github.com/rnapier/RNCryptor/wiki/Data-Format).\n \nThe primary target is Objective-C, but implementations are available in\n[C](https://github.com/megabri/MGCryptor),\n[Java](http://code.google.com/p/jncryptor/),\n[PHP](https://github.com/rnapier/RNCryptor/tree/master/php),\n[Python](https://github.com/rnapier/RNCryptor/blob/master/python/RNCryptor.py),\nand [Ruby](https://github.com/rnapier/RNCryptor/tree/master/ruby).\n\nThe data format includes all the metadata required to securely implement AES\nencryption, as described in [\"Properly encrypting with AES with\nCommonCrypto,\"](http://robnapier.net/blog/aes-commoncrypto) and [*iOS 6\nProgramming Pushing the Limits*](http://iosptl.com), Chapter 15. Specifically,\nit includes:\n\n* AES-256 encryption\n* CBC mode\n* Password stretching with PBKDF2\n* Password salting\n* Random IV\n* Encrypt-then-hash HMAC\n\n## Basic Objective-C Usage\n\nThe most common in-memory use case is as follows:\n\n``` objc\nNSData *data = [@\"Data\" dataUsingEncoding:NSUTF8StringEncoding];\nNSError *error;\nNSData *encryptedData = [RNEncryptor encryptData:data\n                                   \twithSettings:kRNCryptorAES256Settings\n                                          password:aPassword\n                                             error:&error];\n```\n\nThis generates an `NSData` including a header, encryption salt, HMAC salt, IV,\nciphertext, and HMAC. To decrypt this bundle:\n\n``` objc\nNSData *decryptedData = [RNDecryptor decryptData:encryptedData\n                                    withPassword:aPassword\n                                           error:&error];\n```\n\nNote that `RNDecryptor` does not require settings. These are read from the\nheader.\n\n## Asynchronous use\n\n`RNCryptor suports asynchronous use, specifically designed to work with\n`NSURLConnection. This is also useful for cases where the encrypted or decrypted\n`data will not comfortably fit in memory. If the data will comfortably fit in\n`memory, asynchronous operation is best acheived using dispatch_async().\n\nTo operate in asynchronous mode, you create an `RNEncryptor` or `RNDecryptor`,\nproviding it a handler. This handler will be called as data is encrypted or\ndecrypted. As data becomes available, call `addData:`. When you reach the end of\nthe data call `finish`.\n\n``` objc\n- (void)connection:(NSURLConnection *)connection didReceiveData:(NSData *)data {\n  [self.encryptedData addData:[self.cryptor addData:data]];\n}\n\n- (void)connectionDidFinishLoading:(NSURLConnection *)connection {\n  [self.cryptor finish];\n}\n\n// Other connection delegates\n\n- (void)decryptionDidFinish {\n  if (self.cryptor.error) {\n    // An error occurred. You cannot trust encryptedData at this point\n  }\n  else {\n    // self.encryptedData is complete. Use it as you like\n  }\n  self.encryptedData = nil;\n  self.cryptor = nil;\n  self.connection = nil;\n}\n\n- (void)decryptRequest:(NSURLRequest *)request {\n  self.encryptedData = [NSMutableData data];\n  self.connection = [[NSURLConnection alloc] initWithRequest:request delegate:self];\n  self.cryptor = [[RNDecryptor alloc] initWithPassword:self.password\n                                               handler:^(RNCryptor *cryptor, NSData *data) {\n                                                   [self.decryptedData appendData:data];\n                                                   if (cryptor.isFinished) {\n                                                     [self decryptionDidFinish];\n                                                   }\n                                                 }];\n}\n```\n\n## Async and Streams\n\nWhen performing async operations on streams, the data can come very quickly\n(particularly if you're reading from a local file). If you use RNCryptor in a\nnaïve way, you'll queue a work blocks faster than the engine can process them\nand your memory usage will spike. This is particularly true if there's only one\ncore, such as on an iPad 1. The solution is to only dispatch new work blocks as\nthe previous work blocks complete. When performing async operations on streams,\nthe data can come very quickly (particularly if you're reading from a local\nfile). If you use RNCryptor in a naïve way, you'll queue a work blocks faster\nthan the engine can process them and your memory usage will spike. This is\nparticularly true if there's only one core, such as on an iPad 1. The solution\nis to only dispatch new work blocks as the previous work blocks complete. When\nperforming async operations on streams, the data can come very quickly\n(particularly if you're reading from a local file). If you use RNCryptor in a\nnaïve way, you'll queue a work blocks faster than the engine can process them\nand your memory usage will spike. This is particularly true if there's only one\ncore, such as on an iPad 1. The solution is to only dispatch new work blocks as\nthe previous work blocks complete.\n\n``` objc\n// Make sure that this number is larger than the header + 1 block.\n// 33+16 bytes = 49 bytes. So it shouldn't be a problem.\nint blockSize = 32 * 1024;\n\nNSInputStream *cryptedStream = [NSInputStream inputStreamWithFileAtPath:@\"C++ Spec.pdf\"];\nNSOutputStream *decryptedStream = [NSOutputStream outputStreamToFileAtPath:@\"/tmp/C++.crypt\" append:NO];\n\n[cryptedStream open];\n[decryptedStream open];\n\n// We don't need to keep making new NSData objects. We can just use one repeatedly.\n__block NSMutableData *data = [NSMutableData dataWithLength:blockSize];\n__block RNEncryptor *decryptor = nil;\n\ndispatch_block_t readStreamBlock = ^{\n  [data setLength:blockSize];\n  NSInteger bytesRead = [cryptedStream read:[data mutableBytes] maxLength:blockSize];\n  if (bytesRead < 0) {\n    // Throw an error\n  }\n  else if (bytesRead == 0) {\n    [decryptor finish];\n  }\n  else {\n    [data setLength:bytesRead];\n    [decryptor addData:data];\n    NSLog(@\"Sent %ld bytes to decryptor\", (unsigned long)bytesRead);\n  }\n};\n\ndecryptor = [[RNEncryptor alloc] initWithSettings:kRNCryptorAES256Settings\n                                         password:@\"blah\"\n                                          handler:^(RNCryptor *cryptor, NSData *data) {\n                                            NSLog(@\"Decryptor recevied %ld bytes\", (unsigned long)data.length);\n                                            [decryptedStream write:data.bytes maxLength:data.length];\n                                            if (cryptor.isFinished) {\n                                              [decryptedStream close];\n                                              // call my delegate that I'm finished with decrypting\n                                            }\n                                            else {\n                                              // Might want to put this in a dispatch_async(), but I don't think you need it.\n                                              readStreamBlock();\n                                            }\n                                          }];\n\n// Read the first block to kick things off    \nreadStreamBlock();\n```\n\nI'll eventually get this into the API to simplify things. See [Cyrille's SO\nquestion](http://stackoverflow.com/a/14586231/97337) for more discussion. Pull\nrequests welcome.\n\n## Building\n\nComes packaged as a static library, but the source files can be dropped into any\nproject. The OpenSSL files are not required.\n\nRequires `Security.framework`.\n\nSupports 10.6+ and iOS 4+.\n\nThe current file format is v3. To read v1 files (see Issue #44), you need to set the compile-time macro `RNCRYPTOR_ALLOW_V1_BAD_HMAC`. It is not possible to write v1 files anymore.\n\n## Design considerations\n\n`RNCryptor` has several design goals, in order of importance:\n\n### Easy to use correctly for most common use cases\n\nThe most critical concern is that it be easy for non-experts to use `RNCryptor` correctly. A framework that is more secure, but requires a steep learning curve on the developer will either be not used, or used incorrectly. Whenever possible, a single line of code should \"do the right thing\" for the most common cases.\n\nThis also requires that it fail correctly and provide good errors.\n\n### Reliance on CommonCryptor functionality\n\n`RNCryptor` has very little \"security\" code. It relies as much as possible on the OS-provided CommonCryptor. If a feature does not exist in CommonCryptor, then it generally will not be provided in `RNCryptor`.\n\n### Best practice security\n\nWherever possible within the above constraints, the best available algorithms\nare applied. This means AES-256, HMAC+SHA1, and PBKDF2:\n\n* AES-256. While Bruce Schneier has made some interesting recommendations\nregarding moving to AES-128 due to certain attacks on AES-256, my current\nthinking is in line with [Colin\nPercival](http://www.daemonology.net/blog/2009-07-31-thoughts-on-AES.html).\nPBKDF2 output is effectively random, which should negate related-keys attacks\nagainst the kinds of use cases we're interested in.\n\n* AES-CBC mode. This was a somewhat complex decision, but the ubiquity of CBC\noutweighs other considerations here. There are no major problems with CBC mode,\nand nonce-based modes like CTR have other trade-offs. See [\"Mode changes for\nRNCryptor\"](http://robnapier.net/blog/mode-rncryptor) for more details on this\ndecision.\n\n* Encrypt-then-MAC. If there were a good authenticated AES mode on iOS (GCM for\ninstance), I would probably use that for its simplicity. Colin Percival makes\n[good arguments for hand-coding an encrypt-than-\nMAC](http://www.daemonology.net/blog/2009-06-24-encrypt-then-mac.html) rather\nthan using an authenticated AES mode, but in RNCryptor mananging the HMAC\nactually adds quite a bit of complexity. I'd rather the complexity at a more\nbroadly peer-reviewed layer like CommonCryptor than at the RNCryptor layer. But\nthis isn't an option, so I fall back to my own Encrypt-than-MAC.\n\n* HMAC+SHA256. No surprises here.\n\n* PBKDF2. While bcrypt and scrypt may be more secure than PBKDF2, CommonCryptor\nonly supports PBKDF2. [NIST also continues to recommend\nPBKDF2](http://security.stackexchange.com/questions/4781/do-any-security-\nexperts-recommend-bcrypt-for-password-storage). We use 10k rounds of PBKDF2\nwhich represents about 80ms on an iPhone 4.\n\n### Code simplicity\n\n`RNCryptor endeavors to be implemented as simply as possible, avoiding tricky\n`code. It is designed to be easy to read and code review.\n\n### Performance\n\nPerformance is a goal, but not the most important goal. The code must be secure\nand easy to use. Within that, it is as fast and memory-efficient as possible.\n\n### Portability\n\nWithout sacrificing other goals, it is preferable to read the output format of\n`RNCryptor` on other platforms.\n\n## Version History\n\n* v2.2 Switches to file format v3 to deal with Issue #77.\n* v2.1 Switches to file format v2 to deal with Issue #44.\n* v2.0 adds asynchronous modes.\n* v2.1 backports `RNCryptor` to older versions of Mac OS X (and possibly iOS).\n\n\n## LICENSE\n\nExcept where otherwise indicated in the source code, this code is licensed under\nthe MIT License:\n\n```\nPermission is hereby granted, free of charge, to any person obtaining a \ncopy of this software and associated documentation files (the \"Software\"),\nto deal in the Software without restriction, including without limitation\nthe rights to use, copy, modify, merge, publish, distribute, sublicense,\nand/or sell copies of the Software, and to permit persons to whom the\nSoftware is furnished to do so, subject to the following conditions:\n \nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\nFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\nDEALINGS IN THE SOFTWARE.\n```\n\nPortions of this code, indicated in the source, are licensed under the following\nlicense:\n\n```\n/*-\n * Copyright (c) 2008 Damien Bergamini <damien.bergamini@free.fr>\n *\n * Permission to use, copy, modify, and distribute this software for any\n * purpose with or without fee is hereby granted, provided that the above\n * copyright notice and this permission notice appear in all copies.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES\n * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF\n * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR\n * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES\n * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN\n * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF\n * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.\n */\n```\n\nPortions of ths code, indicated in the source, are licensed under the APSL\nlicense:\n\n```\n/*\n * Copyright (c) 2006-2010 Apple Inc. All Rights Reserved.\n *\n * @APPLE_LICENSE_HEADER_START@\n *\n * This file contains Original Code and/or Modifications of Original Code\n * as defined in and that are subject to the Apple Public Source License\n * Version 2.0 (the 'License'). You may not use this file except in\n * compliance with the License. Please obtain a copy of the License at\n * http://www.opensource.apple.com/apsl/ and read it before using this\n * file.\n *\n * The Original Code and all software distributed under the License are\n * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER\n * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\n * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.\n * Please see the License for the specific language governing rights and\n * limitations under the License.\n *\n * @APPLE_LICENSE_HEADER_END@\n */\n```\n"
  },
  {
    "path": "Pods/RNCryptor/RNCryptor/RNCryptor+Private.h",
    "content": "//\n//  RNCryptor(Private)\n//\n//  Copyright (c) 2012 Rob Napier\n//\n//  This code is licensed under the MIT License:\n//\n//  Permission is hereby granted, free of charge, to any person obtaining a \n//  copy of this software and associated documentation files (the \"Software\"),\n//  to deal in the Software without restriction, including without limitation\n//  the rights to use, copy, modify, merge, publish, distribute, sublicense,\n//  and/or sell copies of the Software, and to permit persons to whom the\n//  Software is furnished to do so, subject to the following conditions:\n//  \n//  The above copyright notice and this permission notice shall be included in\n//  all copies or substantial portions of the Software.\n//\n//  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n//  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n//  FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE\n//  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n//  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n//  FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\n//  DEALINGS IN THE SOFTWARE.\n//\n\n#import <Foundation/Foundation.h>\n#import \"RNCryptor.h\"\n\n@class RNCryptorEngine;\n\n@interface RNCryptor ()\n@property (nonatomic, readwrite, strong) RNCryptorEngine *engine;\n#if OS_OBJECT_USE_OBJC\n@property (nonatomic, readwrite, strong) dispatch_queue_t queue;\n#else\n@property (nonatomic, readwrite, assign) dispatch_queue_t queue;\n#endif\n@property (nonatomic, readonly) NSMutableData *outData;\n@property (nonatomic, readwrite, copy) RNCryptorHandler handler;\n@property (nonatomic, readwrite, assign) NSUInteger HMACLength;\n@property (nonatomic, readwrite, strong) NSError *error;\n@property (nonatomic, readwrite, assign, getter=isFinished) BOOL finished;\n@property (nonatomic, readwrite, assign) RNCryptorOptions options;\n\n- (id)initWithHandler:(RNCryptorHandler)handler;\n+ (NSData *)synchronousResultForCryptor:(RNCryptor *)cryptor data:(NSData *)inData error:(NSError **)anError;\n- (void)cleanupAndNotifyWithError:(NSError *)error;\n- (BOOL)hasHMAC;\n@end\n\n@interface NSMutableData (RNCryptor)\n- (NSData *)_RNConsumeToIndex:(NSUInteger)index;\n@end\n"
  },
  {
    "path": "Pods/RNCryptor/RNCryptor/RNCryptor.h",
    "content": "//\n//  RNCryptor.h\n//\n//  Copyright (c) 2012 Rob Napier\n//\n//  This code is licensed under the MIT License:\n//\n//  Permission is hereby granted, free of charge, to any person obtaining a \n//  copy of this software and associated documentation files (the \"Software\"),\n//  to deal in the Software without restriction, including without limitation\n//  the rights to use, copy, modify, merge, publish, distribute, sublicense,\n//  and/or sell copies of the Software, and to permit persons to whom the\n//  Software is furnished to do so, subject to the following conditions:\n//  \n//  The above copyright notice and this permission notice shall be included in\n//  all copies or substantial portions of the Software.\n//\n//  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n//  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n//  FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE\n//  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n//  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n//  FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\n//  DEALINGS IN THE SOFTWARE.\n//\n\n#import <Foundation/Foundation.h>\n#import <CommonCrypto/CommonCryptor.h>\n#import <CommonCrypto/CommonKeyDerivation.h>\n#import <Security/Security.h>\n\nextern NSString *const kRNCryptorErrorDomain;\nextern const uint8_t kRNCryptorFileVersion;\n\ntypedef struct _RNCryptorKeyDerivationSettings\n{\n  size_t keySize;\n  size_t saltSize;\n  CCPBKDFAlgorithm PBKDFAlgorithm;\n  CCPseudoRandomAlgorithm PRF;\n  uint rounds;\n  BOOL hasV2Password; // See Issue #77. V2 incorrectly handled multi-byte characters.\n} RNCryptorKeyDerivationSettings;\n\ntypedef struct _RNCryptorSettings\n{\n  CCAlgorithm algorithm;\n  size_t blockSize;\n  size_t IVSize;\n  CCOptions options;\n  CCHmacAlgorithm HMACAlgorithm;\n  size_t HMACLength;\n  RNCryptorKeyDerivationSettings keySettings;\n  RNCryptorKeyDerivationSettings HMACKeySettings;\n} RNCryptorSettings;\n\nstatic const RNCryptorSettings kRNCryptorAES256Settings = {\n    .algorithm = kCCAlgorithmAES128,\n    .blockSize = kCCBlockSizeAES128,\n    .IVSize = kCCBlockSizeAES128,\n    .options = kCCOptionPKCS7Padding,\n    .HMACAlgorithm = kCCHmacAlgSHA256,\n    .HMACLength = CC_SHA256_DIGEST_LENGTH,\n\n    .keySettings = {\n        .keySize = kCCKeySizeAES256,\n        .saltSize = 8,\n        .PBKDFAlgorithm = kCCPBKDF2,\n        .PRF = kCCPRFHmacAlgSHA1,\n        .rounds = 10000\n    },\n\n    .HMACKeySettings = {\n        .keySize = kCCKeySizeAES256,\n        .saltSize = 8,\n        .PBKDFAlgorithm = kCCPBKDF2,\n        .PRF = kCCPRFHmacAlgSHA1,\n        .rounds = 10000\n    }\n};\n\nenum _RNCryptorOptions\n{\n  kRNCryptorOptionHasPassword = 1 << 0,\n};\ntypedef uint8_t RNCryptorOptions;\n\nenum\n{\n  kRNCryptorHMACMismatch = 1,\n  kRNCryptorUnknownHeader = 2,\n};\n\n@class RNCryptor;\n\ntypedef void (^RNCryptorHandler)(RNCryptor *cryptor, NSData *data);\n\n///** Encryptor/Decryptor for iOS\n//\n//  Provides an easy-to-use, Objective-C interface to the AES functionality of CommonCrypto. Simplifies correct handling of\n//  password stretching (PBKDF2), salting, and IV. For more information on these terms, see \"Properly encrypting with AES\n//  with CommonCrypto,\" and iOS 5 Programming Pushing the Limits, Chapter 11. Also includes automatic HMAC handling to integrity-check messages.\n//\n//  RNCryptor is abstract. Use RNEncryptor to encrypt or RNDecryptor to decrypt\n// */\n//\n\n@interface RNCryptor : NSObject\n@property (nonatomic, readonly, strong) NSError *error;\n@property (nonatomic, readonly, getter=isFinished) BOOL finished;\n@property (nonatomic, readonly, copy) RNCryptorHandler handler;\n@property (nonatomic, readwrite) dispatch_queue_t responseQueue;\n\n- (void)addData:(NSData *)data;\n- (void)finish;\n\n/** Generate key given a password and salt using a PBKDF\n*\n* @param password Password to use for PBKDF\n* @param salt Salt for password\n* @param keySettings Settings for the derivation (RNCryptorKeyDerivationSettings)\n* @returns Key\n* @throws if settings are illegal\n*/\n+ (NSData *)keyForPassword:(NSString *)password salt:(NSData *)salt settings:(RNCryptorKeyDerivationSettings)keySettings;\n\n/** Generate random data\n*\n* @param length Length of data to generate\n* @returns random data\n*/\n+ (NSData *)randomDataOfLength:(size_t)length;\n\n@end\n"
  },
  {
    "path": "Pods/RNCryptor/RNCryptor/RNCryptor.m",
    "content": "//\n//  RNCryptor.m\n//\n//  Copyright (c) 2012 Rob Napier\n//\n//  This code is licensed under the MIT License:\n//\n//  Permission is hereby granted, free of charge, to any person obtaining a\n//  copy of this software and associated documentation files (the \"Software\"),\n//  to deal in the Software without restriction, including without limitation\n//  the rights to use, copy, modify, merge, publish, distribute, sublicense,\n//  and/or sell copies of the Software, and to permit persons to whom the\n//  Software is furnished to do so, subject to the following conditions:\n//\n//  The above copyright notice and this permission notice shall be included in\n//  all copies or substantial portions of the Software.\n//\n//  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n//  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n//  FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE\n//  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n//  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n//  FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\n//  DEALINGS IN THE SOFTWARE.\n//\n//\n#import \"RNCryptor.h\"\n#import \"RNCryptor+Private.h\"\n#import <Security/SecRandom.h>\n\n//extern int SecRandomCopyBytes(SecRandomRef rnd, size_t count, uint8_t *bytes) __attribute__((weak_import));\nextern int\nCCKeyDerivationPBKDF( CCPBKDFAlgorithm algorithm, const char *password, size_t passwordLen,\n                     const uint8_t *salt, size_t saltLen,\n                     CCPseudoRandomAlgorithm prf, uint rounds,\n                     uint8_t *derivedKey, size_t derivedKeyLen) __attribute__((weak_import));\n\n\nNSString *const kRNCryptorErrorDomain = @\"net.robnapier.RNCryptManager\";\nconst uint8_t kRNCryptorFileVersion = 3;\n\n// TODO: This is a slightly expensive solution, but it's convenient. May want to create a \"walkable\" data object\n@implementation NSMutableData (RNCryptor)\n- (NSData *)_RNConsumeToIndex:(NSUInteger)index\n{\n  NSData *removed = [self subdataWithRange:NSMakeRange(0, index)];\n  [self replaceBytesInRange:NSMakeRange(0, self.length - index) withBytes:([self mutableBytes] + index)];\n  [self setLength:self.length - index];\n  return removed;\n}\n@end\n\n\n@implementation RNCryptor\n@synthesize responseQueue = _responseQueue;\n@synthesize engine = _engine;\n@synthesize outData = __outData;\n@synthesize queue = _queue;\n@synthesize HMACLength = __HMACLength;\n@synthesize error = _error;\n@synthesize finished = _finished;\n@synthesize options = _options;\n@synthesize handler = _handler;\n\n+ (NSData *)synchronousResultForCryptor:(RNCryptor *)cryptor data:(NSData *)inData error:(NSError **)anError\n{\n  dispatch_semaphore_t sem = dispatch_semaphore_create(0);\n\n  NSMutableData *data = [NSMutableData data];\n  __block NSError *returnedError = nil;\n\n  RNCryptorHandler handler = ^(RNCryptor *c, NSData *d) {\n    [data appendData:d];\n    if (c.isFinished) {\n      returnedError = c.error;\n      dispatch_semaphore_signal(sem);\n    }\n  };\n\n  cryptor.handler = handler;\n\n  dispatch_queue_t queue = dispatch_queue_create(\"net.robnapier.RNEncryptor.response\", DISPATCH_QUEUE_SERIAL);\n  cryptor.responseQueue = queue;\n  [cryptor addData:inData];\n  [cryptor finish];\n\n\n  dispatch_semaphore_wait(sem, DISPATCH_TIME_FOREVER);\n\n#if !OS_OBJECT_USE_OBJC\n  dispatch_release(sem);\n  if (queue) {\n    dispatch_release(queue);\n  }\n#endif\n\n  if (returnedError) {\n    if (anError) {\n      *anError = returnedError;\n    }\n    return nil;\n  }\n  else {\n    return data;\n  }\n}\n\n// For use with OS X 10.6\n// Based on http://opensource.apple.com/source/CommonCrypto/CommonCrypto-55010/Source/API/CommonKeyDerivation.c\n/*-\n * Copyright (c) 2008 Damien Bergamini <damien.bergamini@free.fr>\n *\n * Permission to use, copy, modify, and distribute this software for any\n * purpose with or without fee is hereby granted, provided that the above\n * copyright notice and this permission notice appear in all copies.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES\n * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF\n * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR\n * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES\n * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN\n * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF\n * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.\n */\n#define CC_MAX_PRF_WORKSPACE 128+4\n#define kCCPRFHmacAlgSHA1hlen\tCC_SHA1_DIGEST_LENGTH\n#define kCCPRFHmacAlgSHA224hlen CC_SHA224_DIGEST_LENGTH\n#define kCCPRFHmacAlgSHA256hlen CC_SHA256_DIGEST_LENGTH\n#define kCCPRFHmacAlgSHA384hlen CC_SHA384_DIGEST_LENGTH\n#define kCCPRFHmacAlgSHA512hlen CC_SHA512_DIGEST_LENGTH\n\nstatic size_t\ngetPRFhlen(CCPseudoRandomAlgorithm prf)\n{\n\tswitch(prf) {\n\t\tcase kCCPRFHmacAlgSHA1:\t\treturn kCCPRFHmacAlgSHA1hlen;\n\t\tcase kCCPRFHmacAlgSHA224:\treturn kCCPRFHmacAlgSHA224hlen;\n\t\tcase kCCPRFHmacAlgSHA256:\treturn kCCPRFHmacAlgSHA256hlen;\n\t\tcase kCCPRFHmacAlgSHA384:\treturn kCCPRFHmacAlgSHA384hlen;\n\t\tcase kCCPRFHmacAlgSHA512:\treturn kCCPRFHmacAlgSHA512hlen;\n\t\tdefault:\n      NSCAssert(NO, @\"Unknown prf: %d\", prf);\n      return 1;\n\t}\n}\n\nstatic void\nPRF(CCPseudoRandomAlgorithm prf, const char *password, size_t passwordLen, u_int8_t *salt, size_t saltLen, u_int8_t *output)\n{\n\tswitch(prf) {\n\t\tcase kCCPRFHmacAlgSHA1:\n\t\t\tCCHmac(kCCHmacAlgSHA1, password, passwordLen, salt, saltLen, output);\n\t\t\tbreak;\n\t\tcase kCCPRFHmacAlgSHA224:\n\t\t\tCCHmac(kCCHmacAlgSHA224, password, passwordLen, salt, saltLen, output);\n\t\t\tbreak;\n\t\tcase kCCPRFHmacAlgSHA256:\n\t\t\tCCHmac(kCCHmacAlgSHA256, password, passwordLen, salt, saltLen, output);\n\t\t\tbreak;\n\t\tcase kCCPRFHmacAlgSHA384:\n\t\t\tCCHmac(kCCHmacAlgSHA384, password, passwordLen, salt, saltLen, output);\n\t\t\tbreak;\n\t\tcase kCCPRFHmacAlgSHA512:\n\t\t\tCCHmac(kCCHmacAlgSHA512, password, passwordLen, salt, saltLen, output);\n\t\t\tbreak;\n\t}\n}\n\nstatic int\nRN_CCKeyDerivationPBKDF( CCPBKDFAlgorithm algorithm, const char *password, size_t passwordLen,\n                     const uint8_t *salt, size_t saltLen,\n                     CCPseudoRandomAlgorithm prf, uint rounds,\n                     uint8_t *derivedKey, size_t derivedKeyLen)\n{\n\tu_int8_t oldbuffer[CC_MAX_PRF_WORKSPACE], newbuffer[CC_MAX_PRF_WORKSPACE],\n  saltCopy[CC_MAX_PRF_WORKSPACE+4], collector[CC_MAX_PRF_WORKSPACE];\n\tint rawblock, i, j;\n  size_t r, nblocks;\n\tsize_t\thlen, offset;\n\n\tif(algorithm != kCCPBKDF2) return -1;\n\n\t/*\n\t * Check initial parameters\n\t */\n\n\tif (rounds < 1 || derivedKeyLen == 0)\n\t\treturn -1; // bad parameters\n\tif (saltLen == 0 || saltLen > CC_MAX_PRF_WORKSPACE)\n\t\treturn -1; // out of bounds parameters\n\n\thlen = getPRFhlen(prf);\n\n\t/*\n\t * FromSpec: Let l be the number of hLen-octet blocks in the derived key, rounding up,\n\t * and let r be the number of octets in the last block:\n\t */\n\n\tnblocks = (derivedKeyLen+hlen-1)/hlen; // in the spec nblocks is referred to as l\n\tr = derivedKeyLen % hlen;\n  r = (r) ? r: hlen;\n\n\t/*\n\t * Make a copy of the salt buffer so we can concatenate the\n\t * block counter for each series of rounds.\n\t */\n\n\tmemcpy(saltCopy, salt, saltLen);\n\tbzero(derivedKey, derivedKeyLen);\n\n\t/*\n\t * FromSpec:\n\t *\n\t * For each block of the derived key apply the function F defined below to the password P,\n\t * the salt S, the iteration count c, and the block index to compute the block:\n\t *\n\t *           F(P,S,c,i)=U1 \\xorU2 \\xor⋅⋅⋅\\xorUc\n\t *\n\t * where\n\t *\t\t\t\tU1 =PRF(P,S||INT (i)),\n\t *\t\t\t\tU2 =PRF(P,U1),\n\t *\t\t\t\t...\n\t *\t\t\t\tUc = PRF (P, Uc-1) .\n\t */\n\n\tfor(rawblock = 0; rawblock < nblocks; rawblock++) {\n\t\tint block = rawblock+1;\n\t\tsize_t copyLen;\n\n\t\toffset = rawblock * hlen;\n\t\tcopyLen = (block != nblocks) ? hlen: r;\n\n\t\t/*\n\t\t * FromSpec: Here, INT (i) is a four-octet encoding of the integer i, most significant octet first.\n\t\t */\n\n\t\tfor(i=0; i<4; i++) saltCopy[saltLen+i] = (block >> 8*(3-i)) & 0xff;\n\n\t\tPRF(prf, password, passwordLen, saltCopy, saltLen+4, oldbuffer);\t\t\t\t\t// Initial PRF with the modified salt\n\n\t\tmemcpy(collector, oldbuffer, hlen);\t\t\t\t\t\t\t\t\t\t\t\t// Initial value for this block of the derived key.\n\n\t\tfor(i = 1; i < rounds; i++) {\n\t\t\tPRF(prf, password, passwordLen, oldbuffer, hlen, newbuffer);\t\t\t\t\t\t// Subsequent PRF with the previous result as the salt\n\t\t\tmemcpy(oldbuffer, newbuffer, hlen);\n\t\t\tfor(j = 0; j < hlen; j++) collector[j] ^= newbuffer[j];\t\t\t\t\t// Xoring the round into the collector\n\t\t}\n\t\tmemcpy(derivedKey+offset, collector, copyLen);\n\t}\n\n\t/*\n\t * Clear temp buffers.\n\t */\n\n\tbzero(oldbuffer, CC_MAX_PRF_WORKSPACE);\n\tbzero(newbuffer, CC_MAX_PRF_WORKSPACE);\n\tbzero(collector, CC_MAX_PRF_WORKSPACE);\n\tbzero(saltCopy, CC_MAX_PRF_WORKSPACE+4);\n\t\n\treturn 0;\n}\n\n/* End code derived from CommonKeyDerivation.c */\n\n\n+ (NSData *)keyForPassword:(NSString *)password salt:(NSData *)salt settings:(RNCryptorKeyDerivationSettings)keySettings\n{\n  NSMutableData *derivedKey = [NSMutableData dataWithLength:keySettings.keySize];\n\n  // See Issue #77. V2 incorrectly calculated key for multi-byte characters.\n  NSData *passwordData;\n  if (keySettings.hasV2Password) {\n    passwordData = [NSData dataWithBytes:[password UTF8String] length:[password length]];\n  }\n  else {\n    passwordData = [password dataUsingEncoding:NSUTF8StringEncoding];\n  }\n\n  // Use the built-in PBKDF2 if it's available. Otherwise, we have our own. Hello crazy function pointer.\n  int result;\n  int (*PBKDF)(CCPBKDFAlgorithm algorithm, const char *password, size_t passwordLen,\n               const uint8_t *salt, size_t saltLen,\n               CCPseudoRandomAlgorithm prf, uint rounds,\n               uint8_t *derivedKey, size_t derivedKeyLen);\n\n  PBKDF = CCKeyDerivationPBKDF ?: RN_CCKeyDerivationPBKDF;\n\n  result = PBKDF(keySettings.PBKDFAlgorithm,         // algorithm\n                 passwordData.bytes,                 // password\n                 passwordData.length,                // passwordLength\n                 salt.bytes,                         // salt\n                 salt.length,                        // saltLen\n                 keySettings.PRF,                    // PRF\n                 keySettings.rounds,                 // rounds\n                 derivedKey.mutableBytes,            // derivedKey\n                 derivedKey.length);                 // derivedKeyLen\n\n  // Do not log password here\n  NSAssert(result == kCCSuccess, @\"Unable to create AES key for password: %d\", result);\n\n  return derivedKey;\n}\n\n// For use on OS X 10.6\n// Based on http://www.opensource.apple.com/source/Security/Security-55179.1/sec/Security/SecFramework.c\n// Modified by Rob Napier April, 2013.\n/*\n * Copyright (c) 2006-2010 Apple Inc. All Rights Reserved.\n *\n * @APPLE_LICENSE_HEADER_START@\n *\n * This file contains Original Code and/or Modifications of Original Code\n * as defined in and that are subject to the Apple Public Source License\n * Version 2.0 (the 'License'). You may not use this file except in\n * compliance with the License. Please obtain a copy of the License at\n * http://www.opensource.apple.com/apsl/ and read it before using this\n * file.\n *\n * The Original Code and all software distributed under the License are\n * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER\n * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\n * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.\n * Please see the License for the specific language governing rights and\n * limitations under the License.\n *\n * @APPLE_LICENSE_HEADER_END@\n */\nstatic int RN_SecRandomCopyBytes(void *rnd, size_t count, uint8_t *bytes) {\n  static int kSecRandomFD;\n  static dispatch_once_t onceToken;\n  dispatch_once(&onceToken, ^{\n    kSecRandomFD = open(\"/dev/random\", O_RDONLY);\n  });\n\n  if (kSecRandomFD < 0)\n    return -1;\n  while (count) {\n    ssize_t bytes_read = read(kSecRandomFD, bytes, count);\n    if (bytes_read == -1) {\n      if (errno == EINTR)\n        continue;\n      return -1;\n    }\n    if (bytes_read == 0) {\n      return -1;\n    }\n    bytes += bytes_read;\n    count -= bytes_read;\n  }\n\n\treturn 0;\n}\n/* End code dervied from SecFramework.c */\n\n+ (NSData *)randomDataOfLength:(size_t)length\n{\n  NSMutableData *data = [NSMutableData dataWithLength:length];\n\n  int result;\n  if (SecRandomCopyBytes != NULL) {\n    result = SecRandomCopyBytes(NULL, length, data.mutableBytes);\n  }\n  else {\n    result = RN_SecRandomCopyBytes(NULL, length, data.mutableBytes);\n  }\n  NSAssert(result == 0, @\"Unable to generate random bytes: %d\", errno);\n\n  return data;\n}\n\n- (id)initWithHandler:(RNCryptorHandler)handler\n{\n  NSParameterAssert(handler);\n  self = [super init];\n  if (self) {\n    NSString *responseQueueName = [@\"net.robnapier.response.\" stringByAppendingString:NSStringFromClass([self class])];\n    _responseQueue = dispatch_queue_create([responseQueueName UTF8String], NULL);\n\n    NSString *queueName = [@\"net.robnapier.\" stringByAppendingString:NSStringFromClass([self class])];\n    _queue = dispatch_queue_create([queueName UTF8String], DISPATCH_QUEUE_SERIAL);\n    __outData = [NSMutableData data];\n\n    _handler = [handler copy];\n  }\n  return self;\n}\n\n- (void)dealloc\n{\n  if (_responseQueue) {\n#if !OS_OBJECT_USE_OBJC\n    dispatch_release(_responseQueue);\n#endif\n    _responseQueue = NULL;\n  }\n\n  if (_queue) {\n#if !OS_OBJECT_USE_OBJC\n    dispatch_release(_queue);\n#endif\n    _queue = NULL;\n  }\n}\n\n- (void)setResponseQueue:(dispatch_queue_t)aResponseQueue\n{\n  if (aResponseQueue) {\n#if !OS_OBJECT_USE_OBJC\n    dispatch_retain(aResponseQueue);\n#endif\n  }\n\n  if (_responseQueue) {\n#if !OS_OBJECT_USE_OBJC\n    dispatch_release(_responseQueue);\n#endif\n  }\n\n  _responseQueue = aResponseQueue;\n}\n\n- (void)addData:(NSData *)data\n{\n\n}\n\n- (void)finish\n{\n\n}\n\n- (void)cleanupAndNotifyWithError:(NSError *)error\n{\n  self.error = error;\n  self.finished = YES;\n  if (self.handler) {\n    dispatch_sync(self.responseQueue, ^{\n      self.handler(self, self.outData);\n    });\n    self.handler = nil;\n  }\n}\n\n- (BOOL)hasHMAC\n{\n  return self.HMACLength > 0;\n}\n\n\n@end\n"
  },
  {
    "path": "Pods/RNCryptor/RNCryptor/RNCryptorEngine.h",
    "content": "//\n//  RNCryptorEngine\n//\n//  Copyright (c) 2012 Rob Napier\n//\n//  This code is licensed under the MIT License:\n//\n//  Permission is hereby granted, free of charge, to any person obtaining a \n//  copy of this software and associated documentation files (the \"Software\"),\n//  to deal in the Software without restriction, including without limitation\n//  the rights to use, copy, modify, merge, publish, distribute, sublicense,\n//  and/or sell copies of the Software, and to permit persons to whom the\n//  Software is furnished to do so, subject to the following conditions:\n//  \n//  The above copyright notice and this permission notice shall be included in\n//  all copies or substantial portions of the Software.\n//\n//  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n//  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n//  FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE\n//  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n//  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n//  FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\n//  DEALINGS IN THE SOFTWARE.\n//\n\n#import <Foundation/Foundation.h>\n#import <CommonCrypto/CommonCryptor.h>\n#import \"RNCryptor.h\"\n\n@interface RNCryptorEngine : NSObject\n- (RNCryptorEngine *)initWithOperation:(CCOperation)operation settings:(RNCryptorSettings)settings key:(NSData *)key IV:(NSData *)IV error:(NSError **)error;\n- (NSData *)addData:(NSData *)data error:(NSError **)error;\n- (NSData *)finishWithError:(NSError **)error;\n@end\n"
  },
  {
    "path": "Pods/RNCryptor/RNCryptor/RNCryptorEngine.m",
    "content": "//\n//  RNCryptorEngine\n//\n//  Copyright (c) 2012 Rob Napier\n//\n//  This code is licensed under the MIT License:\n//\n//  Permission is hereby granted, free of charge, to any person obtaining a \n//  copy of this software and associated documentation files (the \"Software\"),\n//  to deal in the Software without restriction, including without limitation\n//  the rights to use, copy, modify, merge, publish, distribute, sublicense,\n//  and/or sell copies of the Software, and to permit persons to whom the\n//  Software is furnished to do so, subject to the following conditions:\n//  \n//  The above copyright notice and this permission notice shall be included in\n//  all copies or substantial portions of the Software.\n//\n//  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n//  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n//  FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE\n//  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n//  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n//  FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\n//  DEALINGS IN THE SOFTWARE.\n//\n\n\n#import \"RNCryptorEngine.h\"\n\n@interface RNCryptorEngine ()\n@property (nonatomic, readonly) CCCryptorRef cryptor;\n@property (nonatomic, readonly) NSMutableData *buffer;\n@end\n\n@implementation RNCryptorEngine\n@synthesize cryptor = __cryptor;\n@synthesize buffer = __buffer;\n\n\n- (RNCryptorEngine *)initWithOperation:(CCOperation)operation settings:(RNCryptorSettings)settings key:(NSData *)key IV:(NSData *)IV error:(NSError **)error\n{\n  self = [super init];\n  if (self) {\n    CCCryptorStatus\n        cryptorStatus = CCCryptorCreate(operation,\n                                        settings.algorithm,\n                                        settings.options,\n                                        key.bytes,\n                                        key.length,\n                                        IV.bytes,\n                                        &__cryptor);\n    if (cryptorStatus != kCCSuccess || __cryptor == NULL) {\n      if (error) {\n        *error = [NSError errorWithDomain:kRNCryptorErrorDomain code:cryptorStatus userInfo:nil];\n      }\n      self = nil;\n      return nil;\n    }\n\n    __buffer = [NSMutableData data];\n  }\n  return self;\n}\n\n- (void)dealloc\n{\n  if (__cryptor) {\n    CCCryptorRelease(__cryptor);\n  }\n}\n\n- (NSData *)addData:(NSData *)data error:(NSError **)error\n{\n  NSMutableData *buffer = self.buffer;\n  [buffer setLength:CCCryptorGetOutputLength(self.cryptor, [data length], true)]; // We'll reuse the buffer in -finish\n\n  size_t dataOutMoved;\n  CCCryptorStatus\n      cryptorStatus = CCCryptorUpdate(self.cryptor,       // cryptor\n                                      data.bytes,      // dataIn\n                                      data.length,     // dataInLength (verified > 0 above)\n                                      buffer.mutableBytes,      // dataOut\n                                      buffer.length, // dataOutAvailable\n                                      &dataOutMoved);   // dataOutMoved\n\n  if (cryptorStatus != kCCSuccess) {\n    if (error) {\n      *error = [NSError errorWithDomain:kRNCryptorErrorDomain code:cryptorStatus userInfo:nil];\n    }\n    return nil;\n  }\n\n  return [buffer subdataWithRange:NSMakeRange(0, dataOutMoved)];\n}\n\n- (NSData *)finishWithError:(NSError **)error\n{\n  NSMutableData *buffer = self.buffer;\n  size_t dataOutMoved;\n  CCCryptorStatus\n      cryptorStatus = CCCryptorFinal(self.cryptor,        // cryptor\n                                     buffer.mutableBytes,       // dataOut\n                                     buffer.length,  // dataOutAvailable\n                                     &dataOutMoved);    // dataOutMoved\n  if (cryptorStatus != kCCSuccess) {\n    if (error) {\n      *error = [NSError errorWithDomain:kRNCryptorErrorDomain code:cryptorStatus userInfo:nil];\n    }\n    return nil;\n  }\n\n  return [buffer subdataWithRange:NSMakeRange(0, dataOutMoved)];\n}\n\n@end\n"
  },
  {
    "path": "Pods/RNCryptor/RNCryptor/RNDecryptor.h",
    "content": "//\n//  RNDecryptor\n//\n//  Copyright (c) 2012 Rob Napier\n//\n//  This code is licensed under the MIT License:\n//\n//  Permission is hereby granted, free of charge, to any person obtaining a \n//  copy of this software and associated documentation files (the \"Software\"),\n//  to deal in the Software without restriction, including without limitation\n//  the rights to use, copy, modify, merge, publish, distribute, sublicense,\n//  and/or sell copies of the Software, and to permit persons to whom the\n//  Software is furnished to do so, subject to the following conditions:\n//  \n//  The above copyright notice and this permission notice shall be included in\n//  all copies or substantial portions of the Software.\n//\n//  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n//  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n//  FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE\n//  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n//  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n//  FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\n//  DEALINGS IN THE SOFTWARE.\n//\n\n#import <Foundation/Foundation.h>\n#import \"RNCryptor.h\"\n\n\n@interface RNDecryptor : RNCryptor\n\n- (RNDecryptor *)initWithEncryptionKey:(NSData *)encryptionKey\n                               HMACKey:(NSData *)HMACKey\n                               handler:(RNCryptorHandler)handler;\n\n- (RNDecryptor *)initWithPassword:(NSString *)password\n                          handler:(RNCryptorHandler)handler;\n\n+ (NSData *)decryptData:(NSData *)theCipherText withSettings:(RNCryptorSettings)settings password:(NSString *)aPassword error:(NSError **)anError;\n+ (NSData *)decryptData:(NSData *)theCipherText withSettings:(RNCryptorSettings)settings encryptionKey:(NSData *)encryptionKey HMACKey:(NSData *)HMACKey error:(NSError **)anError;\n\n+ (NSData *)decryptData:(NSData *)data withPassword:(NSString *)password error:(NSError **)error;\n+ (NSData *)decryptData:(NSData *)data withEncryptionKey:(NSData *)encryptionKey HMACKey:(NSData *)HMACKey error:(NSError **)error;\n\n@end\n"
  },
  {
    "path": "Pods/RNCryptor/RNCryptor/RNDecryptor.m",
    "content": "//\n//  RNDecryptor\n//\n//  Copyright (c) 2012 Rob Napier\n//\n//  This code is licensed under the MIT License:\n//\n//  Permission is hereby granted, free of charge, to any person obtaining a \n//  copy of this software and associated documentation files (the \"Software\"),\n//  to deal in the Software without restriction, including without limitation\n//  the rights to use, copy, modify, merge, publish, distribute, sublicense,\n//  and/or sell copies of the Software, and to permit persons to whom the\n//  Software is furnished to do so, subject to the following conditions:\n//  \n//  The above copyright notice and this permission notice shall be included in\n//  all copies or substantial portions of the Software.\n//\n//  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n//  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n//  FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE\n//  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n//  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n//  FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\n//  DEALINGS IN THE SOFTWARE.\n//\n\n\n#import \"RNCryptor+Private.h\"\n#import \"RNDecryptor.h\"\n#import \"RNCryptorEngine.h\"\n\nstatic const NSUInteger kPreambleSize = 2;\n\n@interface NSData (RNCryptor_ConsistentCompare)\n\n/** Compare two NSData in time proportional to the compared data (otherData)\n *\n * isEqual:-based comparisons stop comparing at the first difference. This can be used by attackers, in some situations,\n * to determine a secret value by considering the time required to compare the values.\n *\n * It is slightly better to call this as [secret rnc_isEqualInConsistentTime:attackersData] rather than the reverse,\n * but it is not a major issue either way. In the first case, the time required is proportional to the attacker's data,\n * which provides the attacker no information about the length of secret. In the second case, the time is proportional\n * to the length of secret, which leaks a small amount of informaiont, but in a way that does not varry in proportion to\n * the attacker's data.\n *\n * @param otherData data to compare\n * @returns YES if values are equal\n */\n- (BOOL)rnc_isEqualInConsistentTime:(NSData *)otherData;\n\n@end\n\n@implementation NSData (RNCryptor_ConstantCompare)\n\n- (BOOL)rnc_isEqualInConsistentTime:(NSData *)otherData {\n  // The point of this routine is XOR the bytes of each data and accumulate the results with OR.\n  // If any bytes are different, then the OR will accumulate some non-0 value.\n\n  uint8_t result = otherData.length - self.length;  // Start with 0 (equal) only if our lengths are equal\n\n  const uint8_t *myBytes = [self bytes];\n  const NSUInteger myLength = [self length];\n  const uint8_t *otherBytes = [otherData bytes];\n  const NSUInteger otherLength = [otherData length];\n\n  for (NSUInteger i = 0; i < otherLength; ++i) {\n    // Use mod to wrap around ourselves if they are longer than we are.\n    // Remember, we already broke equality if our lengths are different.\n    result |= myBytes[i % myLength] ^ otherBytes[i];\n  }\n\n  return result == 0;\n}\n\n@end\n\n\n@interface RNDecryptor ()\n@property (nonatomic, readonly, strong) NSMutableData *inData;\n@property (nonatomic, readwrite, copy) NSData *encryptionKey;\n@property (nonatomic, readwrite, copy) NSData *HMACKey;\n@property (nonatomic, readwrite, copy) NSString *password;\n@property (nonatomic, readwrite, assign) BOOL hasV1HMAC;\n\n@property (nonatomic, readwrite, assign) RNCryptorSettings settings;\n\n@end\n\n@implementation RNDecryptor\n{\n  CCHmacContext _HMACContext;\n  NSMutableData *__inData;\n}\n@synthesize encryptionKey = _encryptionKey;\n@synthesize HMACKey = _HMACKey;\n@synthesize password = _password;\n@synthesize settings = _settings;\n\n+ (NSData *)decryptData:(NSData *)theCipherText withSettings:(RNCryptorSettings)settings password:(NSString *)aPassword error:(NSError **)anError\n{\n  RNDecryptor *cryptor = [[self alloc] initWithPassword:aPassword\n                                                handler:^(RNCryptor *c, NSData *d) {}];\n  cryptor.settings = settings;\n  return [self synchronousResultForCryptor:cryptor data:theCipherText error:anError];\n}\n\n+ (NSData *)decryptData:(NSData *)theCipherText withSettings:(RNCryptorSettings)settings encryptionKey:(NSData *)encryptionKey HMACKey:(NSData *)HMACKey error:(NSError **)anError\n{\n  RNDecryptor *cryptor = [[self alloc] initWithEncryptionKey:encryptionKey\n                                                     HMACKey:HMACKey\n                                                     handler:^(RNCryptor *c, NSData *d) {}];\n  cryptor.settings = settings;\n  return [self synchronousResultForCryptor:cryptor data:theCipherText error:anError];\n}\n\n+ (NSData *)decryptData:(NSData *)theCipherText withPassword:(NSString *)aPassword error:(NSError **)anError\n{\n  RNDecryptor *cryptor = [[self alloc] initWithPassword:aPassword\n                                                handler:^(RNCryptor *c, NSData *d) {}];\n  return [self synchronousResultForCryptor:cryptor data:theCipherText error:anError];\n}\n\n+ (NSData *)decryptData:(NSData *)theCipherText withEncryptionKey:(NSData *)encryptionKey HMACKey:(NSData *)HMACKey error:(NSError **)anError;\n{\n  RNDecryptor *cryptor = [[self alloc] initWithEncryptionKey:encryptionKey\n                                                     HMACKey:HMACKey\n                                                     handler:^(RNCryptor *c, NSData *d) {}];\n  return [self synchronousResultForCryptor:cryptor data:theCipherText error:anError];\n}\n\n- (RNDecryptor *)initWithEncryptionKey:(NSData *)anEncryptionKey HMACKey:(NSData *)anHMACKey handler:(RNCryptorHandler)aHandler\n{\n  self = [super initWithHandler:aHandler];\n  if (self) {\n    _encryptionKey = [anEncryptionKey copy];\n    _HMACKey = [anHMACKey copy];\n    _settings = kRNCryptorAES256Settings;\n  }\n\n  return self;\n}\n\n- (RNDecryptor *)initWithPassword:(NSString *)aPassword handler:(RNCryptorHandler)aHandler\n{\n  NSParameterAssert(aPassword != nil);\n\n  self = [self initWithEncryptionKey:nil HMACKey:nil handler:aHandler];\n  if (self) {\n    _password = [aPassword copy];\n    _settings = kRNCryptorAES256Settings;\n  }\n  return self;\n}\n\n- (NSMutableData *)inData\n{\n  if (!__inData) {\n    __inData = [NSMutableData data];\n  }\n  return __inData;\n}\n\n- (void)decryptData:(NSData *)data\n{\n  dispatch_async(self.queue, ^{\n    if (self.hasHMAC) {\n      CCHmacUpdate(&_HMACContext, data.bytes, data.length);\n    }\n\n    NSError *error = nil;\n    NSData *decryptedData = [self.engine addData:data error:&error];\n\n    if (!decryptedData) {\n      [self cleanupAndNotifyWithError:error];\n      return;\n    }\n\n    [self.outData appendData:decryptedData];\n\n    dispatch_sync(self.responseQueue, ^{\n      self.handler(self, self.outData);\n    });\n    [self.outData setLength:0];\n  });\n}\n\n- (void)addData:(NSData *)theData\n{\n  if (self.isFinished) {\n    return;\n  }\n\n  [self.inData appendData:theData];\n  if (!self.engine) {\n    [self consumeHeaderFromData:self.inData];\n  }\n  if (self.engine) {\n    NSUInteger HMACLength = self.HMACLength;\n    if (self.inData.length > HMACLength) {\n      NSData *data = [self.inData _RNConsumeToIndex:self.inData.length - HMACLength];\n      [self decryptData:data];\n    }\n  }\n}\n\n- (BOOL)updateOptionsForPreamble:(NSData *)preamble\n{\n  const uint8_t *bytes = [preamble bytes];\n\n  // See http://robnapier.net/blog/rncryptor-hmac-vulnerability-827 for information on the v1 bad HMAC\n#ifdef RNCRYPTOR_ALLOW_V1_BAD_HMAC\n  if (bytes[0] == 1) {\n    self.options = bytes[1];\n    self.hasV1HMAC = YES;\n    return YES;\n  }\n#endif\n\n  if (bytes[0] == 2) {\n    self.options = bytes[1];\n\n    RNCryptorSettings settings = self.settings;\n    settings.keySettings.hasV2Password = YES;\n    settings.HMACKeySettings.hasV2Password = YES;\n    self.settings = settings;\n    return YES;\n  }\n\n  if (bytes[0] == kRNCryptorFileVersion) {\n    self.options = bytes[1];\n    return YES;\n  }\n\n  return NO;\n}\n\n- (void)consumeHeaderFromData:(NSMutableData *)data\n{\n  if (data.length < kPreambleSize) {\n    return;\n  }\n\n  if (![self updateOptionsForPreamble:[data subdataWithRange:NSMakeRange(0, kPreambleSize)]]) {\n    [self cleanupAndNotifyWithError:[NSError errorWithDomain:kRNCryptorErrorDomain\n                                                        code:kRNCryptorUnknownHeader\n                                                    userInfo:[NSDictionary dictionaryWithObject:@\"Unknown header\" /* DNL */\n                                                                                         forKey:NSLocalizedDescriptionKey]]];\n    return;\n  }\n\n  NSUInteger headerSize = kPreambleSize + self.settings.IVSize;\n  if (self.options & kRNCryptorOptionHasPassword) {\n    headerSize += self.settings.keySettings.saltSize + self.settings.HMACKeySettings.saltSize;\n  }\n\n  if (data.length < headerSize) {\n    return;\n  }\n\n  NSData *header = [data subdataWithRange:NSMakeRange(0, headerSize)];  // We'll need this for the HMAC later\n\n  [[data _RNConsumeToIndex:kPreambleSize] mutableCopy]; // Throw away the preamble\n\n  NSError *error = nil;\n  if (self.options & kRNCryptorOptionHasPassword) {\n    NSAssert(!self.encryptionKey && !self.HMACKey, @\"Both password and the key (%d) or HMACKey (%d) are set.\", self.encryptionKey != nil, self.HMACKey != nil);\n\n    NSData *encryptionKeySalt = [data _RNConsumeToIndex:self.settings.keySettings.saltSize];\n    NSData *HMACKeySalt = [data _RNConsumeToIndex:self.settings.HMACKeySettings.saltSize];\n    self.encryptionKey = [[self class] keyForPassword:self.password salt:encryptionKeySalt settings:self.settings.keySettings];\n    self.HMACKey = [[self class] keyForPassword:self.password salt:HMACKeySalt settings:self.settings.HMACKeySettings];\n\n    self.password = nil;  // Don't need this anymore.\n  }\n\n  NSData *IV = [data _RNConsumeToIndex:self.settings.IVSize];\n\n  self.engine = [[RNCryptorEngine alloc] initWithOperation:kCCDecrypt settings:self.settings key:self.encryptionKey IV:IV error:&error];\n  self.encryptionKey = nil; // Don't need this anymore\n  if (!self.engine) {\n    [self cleanupAndNotifyWithError:error];\n    return;\n  }\n\n  if (self.HMACKey) {\n    CCHmacInit(&_HMACContext, self.settings.HMACAlgorithm, self.HMACKey.bytes, self.HMACKey.length);\n    self.HMACLength = self.settings.HMACLength;\n    self.HMACKey = nil; // Don't need this anymore\n\n    if (! self.hasV1HMAC) {\n      CCHmacUpdate(&_HMACContext, [header bytes], [header length]);\n    }\n  }\n}\n\n- (void)finish\n{\n  if (self.isFinished) {\n    return;\n  }\n\n  dispatch_async(self.queue, ^{\n    NSError *error = nil;\n    NSData *decryptedData = [self.engine finishWithError:&error];\n\n    if (!decryptedData) {\n      [self cleanupAndNotifyWithError:error];\n      return;\n    }\n    [self.outData appendData:decryptedData];\n\n    if (self.hasHMAC) {\n      NSMutableData *HMACData = [NSMutableData dataWithLength:self.HMACLength];\n      CCHmacFinal(&_HMACContext, [HMACData mutableBytes]);\n\n      if (![HMACData rnc_isEqualInConsistentTime:self.inData]) {\n        [self cleanupAndNotifyWithError:[NSError errorWithDomain:kRNCryptorErrorDomain\n                                                            code:kRNCryptorHMACMismatch\n                                                        userInfo:[NSDictionary dictionaryWithObject:@\"HMAC Mismatch\" /* DNL */\n                                                                                             forKey:NSLocalizedDescriptionKey]]];\n        return;\n      }\n    }\n\n    [self cleanupAndNotifyWithError:nil];\n  });\n}\n\n@end\n"
  },
  {
    "path": "Pods/RNCryptor/RNCryptor/RNEncryptor.h",
    "content": "//\n//  RNEncryptor\n//\n//  Copyright (c) 2012 Rob Napier\n//\n//  This code is licensed under the MIT License:\n//\n//  Permission is hereby granted, free of charge, to any person obtaining a \n//  copy of this software and associated documentation files (the \"Software\"),\n//  to deal in the Software without restriction, including without limitation\n//  the rights to use, copy, modify, merge, publish, distribute, sublicense,\n//  and/or sell copies of the Software, and to permit persons to whom the\n//  Software is furnished to do so, subject to the following conditions:\n//  \n//  The above copyright notice and this permission notice shall be included in\n//  all copies or substantial portions of the Software.\n//\n//  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n//  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n//  FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE\n//  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n//  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n//  FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\n//  DEALINGS IN THE SOFTWARE.\n//\n\n#import <Foundation/Foundation.h>\n#import \"RNCryptor.h\"\n\n@interface RNEncryptor : RNCryptor\n- (RNEncryptor *)initWithSettings:(RNCryptorSettings)settings\n                    encryptionKey:(NSData *)encryptionKey\n                          HMACKey:(NSData *)HMACKey\n                          handler:(RNCryptorHandler)handler;\n\n\n- (RNEncryptor *)initWithSettings:(RNCryptorSettings)settings\n                         password:(NSString *)password\n                          handler:(RNCryptorHandler)handler;\n\n// This form with manual IV is generally only used for testing\n- (RNEncryptor *)initWithSettings:(RNCryptorSettings)theSettings\n                    encryptionKey:(NSData *)anEncryptionKey\n                          HMACKey:(NSData *)anHMACKey\n                               IV:(NSData *)anIV\n                          handler:(RNCryptorHandler)aHandler;\n\n// This form with manual IV and salts is generally only used for testing\n- (RNEncryptor *)initWithSettings:(RNCryptorSettings)settings\n                         password:(NSString *)password\n                               IV:(NSData *)anIV\n                   encryptionSalt:(NSData *)anEncryptionSalt\n                         HMACSalt:(NSData *)anHMACSalt\n                          handler:(RNCryptorHandler)handler;\n\n\n+ (NSData *)encryptData:(NSData *)data withSettings:(RNCryptorSettings)settings password:(NSString *)password error:(NSError **)error;\n+ (NSData *)encryptData:(NSData *)data withSettings:(RNCryptorSettings)settings encryptionKey:(NSData *)encryptionKey HMACKey:(NSData *)HMACKey error:(NSError **)error;\n\n// This form with manual IV is generally only used for testing\n+ (NSData *)encryptData:(NSData *)thePlaintext\n           withSettings:(RNCryptorSettings)theSettings\n          encryptionKey:(NSData *)anEncryptionKey\n                HMACKey:(NSData *)anHMACKey\n                     IV:(NSData *)anIV\n                  error:(NSError **)anError;\n\n// This form with manual IV and salts is generally only used for testing\n+ (NSData *)encryptData:(NSData *)data\n           withSettings:(RNCryptorSettings)settings\n               password:(NSString *)password\n                     IV:(NSData *)anIV\n         encryptionSalt:(NSData *)anEncryptionSalt\n               HMACSalt:(NSData *)anHMACSalt\n                  error:(NSError **)error;\n\n@end\n"
  },
  {
    "path": "Pods/RNCryptor/RNCryptor/RNEncryptor.m",
    "content": "//\n//  RNEncryptor\n//\n//  Copyright (c) 2012 Rob Napier\n//\n//  This code is licensed under the MIT License:\n//\n//  Permission is hereby granted, free of charge, to any person obtaining a \n//  copy of this software and associated documentation files (the \"Software\"),\n//  to deal in the Software without restriction, including without limitation\n//  the rights to use, copy, modify, merge, publish, distribute, sublicense,\n//  and/or sell copies of the Software, and to permit persons to whom the\n//  Software is furnished to do so, subject to the following conditions:\n//  \n//  The above copyright notice and this permission notice shall be included in\n//  all copies or substantial portions of the Software.\n//\n//  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n//  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n//  FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE\n//  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n//  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n//  FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\n//  DEALINGS IN THE SOFTWARE.\n//\n\n\n#import \"RNCryptor+Private.h\"\n#import \"RNEncryptor.h\"\n#import \"RNCryptorEngine.h\"\n\n@interface RNEncryptor ()\n@property (nonatomic, readwrite, strong) NSData *encryptionSalt;\n@property (nonatomic, readwrite, strong) NSData *HMACSalt;\n@property (nonatomic, readwrite, strong) NSData *IV;\n@property (nonatomic, readwrite, assign) BOOL haveWrittenHeader;\n@end\n\n@implementation RNEncryptor\n{\n  CCHmacContext _HMACContext;\n}\n@synthesize encryptionSalt = _encryptionSalt;\n@synthesize HMACSalt = _HMACSalt;\n@synthesize IV = _IV;\n@synthesize haveWrittenHeader = _haveWrittenHeader;\n\n\n+ (NSData *)encryptData:(NSData *)thePlaintext withSettings:(RNCryptorSettings)theSettings password:(NSString *)aPassword error:(NSError **)anError\n{\n  RNEncryptor *cryptor = [[self alloc] initWithSettings:theSettings\n                                               password:aPassword\n                                                handler:^(RNCryptor *c, NSData *d) {}];\n  return [self synchronousResultForCryptor:cryptor data:thePlaintext error:anError];\n}\n\n+ (NSData *)encryptData:(NSData *)thePlaintext\n           withSettings:(RNCryptorSettings)theSettings\n               password:(NSString *)aPassword\n                     IV:(NSData *)anIV\n         encryptionSalt:(NSData *)anEncryptionSalt\n               HMACSalt:(NSData *)anHMACSalt\n                  error:(NSError **)anError\n{\n  RNEncryptor *cryptor = [[self alloc] initWithSettings:theSettings\n                                               password:aPassword\n                                                     IV:anIV\n                                         encryptionSalt:anEncryptionSalt\n                                               HMACSalt:anHMACSalt\n                                                handler:^(RNCryptor *c, NSData *d) {}];\n  return [self synchronousResultForCryptor:cryptor data:thePlaintext error:anError];\n}\n\n+ (NSData *)encryptData:(NSData *)thePlaintext withSettings:(RNCryptorSettings)theSettings encryptionKey:(NSData *)anEncryptionKey HMACKey:(NSData *)anHMACKey error:(NSError **)anError {\n  RNEncryptor *cryptor = [[self alloc] initWithSettings:theSettings\n                                          encryptionKey:anEncryptionKey\n                                                HMACKey:anHMACKey\n                                                handler:^(RNCryptor *c, NSData *d) {}];\n  return [self synchronousResultForCryptor:cryptor data:thePlaintext error:anError];\n}\n\n\n+ (NSData *)encryptData:(NSData *)thePlaintext\n           withSettings:(RNCryptorSettings)theSettings\n          encryptionKey:(NSData *)anEncryptionKey\n                HMACKey:(NSData *)anHMACKey\n                     IV:(NSData *)anIV\n                  error:(NSError **)anError\n{\n  RNEncryptor *cryptor = [[self alloc] initWithSettings:theSettings\n                                          encryptionKey:anEncryptionKey\n                                                HMACKey:anHMACKey\n                                                     IV:anIV\n                                                handler:^(RNCryptor *c, NSData *d) {}];\n  return [self synchronousResultForCryptor:cryptor data:thePlaintext error:anError];\n}\n\n- (RNEncryptor *)initWithSettings:(RNCryptorSettings)theSettings\n                    encryptionKey:(NSData *)anEncryptionKey\n                          HMACKey:(NSData *)anHMACKey\n                          handler:(RNCryptorHandler)aHandler {\n  return [self initWithSettings:kRNCryptorAES256Settings\n                  encryptionKey:anEncryptionKey\n                        HMACKey:anHMACKey\n                             IV:[[self class] randomDataOfLength:theSettings.IVSize]\n                        handler:aHandler];\n}\n\n- (RNEncryptor *)initWithSettings:(RNCryptorSettings)theSettings\n                    encryptionKey:(NSData *)anEncryptionKey\n                          HMACKey:(NSData *)anHMACKey\n                               IV:(NSData *)anIV\n                          handler:(RNCryptorHandler)aHandler\n{\n  self = [super initWithHandler:aHandler];\n  if (self) {\n    self.IV = anIV;\n\n    if (anHMACKey) {\n      CCHmacInit(&_HMACContext, theSettings.HMACAlgorithm, anHMACKey.bytes, anHMACKey.length);\n      self.HMACLength = theSettings.HMACLength;\n    }\n\n    NSError *error = nil;\n    self.engine = [[RNCryptorEngine alloc] initWithOperation:kCCEncrypt\n                                                    settings:theSettings\n                                                         key:anEncryptionKey\n                                                          IV:self.IV\n                                                       error:&error];\n    if (!self.engine) {\n      [self cleanupAndNotifyWithError:error];\n      self = nil;\n      return nil;\n    }\n  }\n\n  return self;\n}\n\n- (RNEncryptor *)initWithSettings:(RNCryptorSettings)theSettings password:(NSString *)aPassword handler:(RNCryptorHandler)aHandler {\n    return [self initWithSettings:theSettings\n                password:aPassword\n                      IV:[[self class] randomDataOfLength:theSettings.IVSize]\n          encryptionSalt:[[self class] randomDataOfLength:theSettings.keySettings.saltSize]\n                HMACSalt:[[self class] randomDataOfLength:theSettings.HMACKeySettings.saltSize]\n                 handler:aHandler];\n}\n\n\n- (RNEncryptor *)initWithSettings:(RNCryptorSettings)theSettings\n                         password:(NSString *)aPassword\n                               IV:(NSData *)anIV\n                   encryptionSalt:(NSData *)anEncryptionSalt\n                         HMACSalt:(NSData *)anHMACSalt\n                          handler:(RNCryptorHandler)aHandler;\n{\n  NSParameterAssert(aPassword);\n  NSParameterAssert(anIV);\n  NSParameterAssert(anEncryptionSalt);\n  NSParameterAssert(anHMACSalt);\n\n  NSData *encryptionKey = [[self class] keyForPassword:aPassword salt:anEncryptionSalt settings:theSettings.keySettings];\n  NSData *HMACKey = [[self class] keyForPassword:aPassword salt:anHMACSalt settings:theSettings.HMACKeySettings];\n\n  self = [self initWithSettings:theSettings\n                  encryptionKey:encryptionKey\n                        HMACKey:HMACKey\n                             IV:anIV\n                        handler:aHandler];\n  if (self) {\n    self.options |= kRNCryptorOptionHasPassword;\n    self.encryptionSalt = anEncryptionSalt;\n    self.HMACSalt = anHMACSalt;\n  }\n  return self;\n}\n\n- (NSData *)header\n{\n  uint8_t header[2] = {kRNCryptorFileVersion, self.options};\n  NSMutableData *headerData = [NSMutableData dataWithBytes:header length:sizeof(header)];\n  if (self.options & kRNCryptorOptionHasPassword) {\n    [headerData appendData:self.encryptionSalt];\n    [headerData appendData:self.HMACSalt];\n  }\n  [headerData appendData:self.IV];\n  return headerData;\n}\n\n- (void)addData:(NSData *)data\n{\n  if (self.isFinished) {\n    return;\n  }\n\n  dispatch_async(self.queue, ^{\n    if (!self.haveWrittenHeader) {\n      NSData *header = [self header];\n      [self.outData setData:header];\n      if (self.hasHMAC) {\n        CCHmacUpdate(&_HMACContext, [header bytes], [header length]);\n      }\n      self.haveWrittenHeader = YES;\n    }\n\n    NSError *error = nil;\n    NSData *encryptedData = [self.engine addData:data error:&error];\n    if (!encryptedData) {\n      [self cleanupAndNotifyWithError:error];\n    }\n    if (self.hasHMAC) {\n      CCHmacUpdate(&_HMACContext, encryptedData.bytes, encryptedData.length);\n    }\n\n    [self.outData appendData:encryptedData];\n\n    dispatch_sync(self.responseQueue, ^{\n      self.handler(self, self.outData);\n    });\n    [self.outData setLength:0];\n  });\n}\n\n- (void)finish\n{\n  if (self.isFinished) {\n    return;\n  }\n\n  dispatch_async(self.queue, ^{\n    NSError *error = nil;\n    NSData *encryptedData = [self.engine finishWithError:&error];\n    [self.outData appendData:encryptedData];\n    if (self.hasHMAC) {\n      CCHmacUpdate(&_HMACContext, encryptedData.bytes, encryptedData.length);\n      NSMutableData *HMACData = [NSMutableData dataWithLength:self.HMACLength];\n      CCHmacFinal(&_HMACContext, [HMACData mutableBytes]);\n      [self.outData appendData:HMACData];\n    }\n    [self cleanupAndNotifyWithError:error];\n  });\n}\n\n@end\n"
  },
  {
    "path": "Pods/RNCryptor/RNCryptor/RNOpenSSLCryptor.h",
    "content": "//\n//  RNOpenSSLCryptor\n//\n//  Copyright (c) 2012 Rob Napier\n//\n//  This code is licensed under the MIT License:\n//\n//  Permission is hereby granted, free of charge, to any person obtaining a\n//  copy of this software and associated documentation files (the \"Software\"),\n//  to deal in the Software without restriction, including without limitation\n//  the rights to use, copy, modify, merge, publish, distribute, sublicense,\n//  and/or sell copies of the Software, and to permit persons to whom the\n//  Software is furnished to do so, subject to the following conditions:\n//\n//  The above copyright notice and this permission notice shall be included in\n//  all copies or substantial portions of the Software.\n//\n//  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n//  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n//  FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE\n//  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n//  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n//  FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\n//  DEALINGS IN THE SOFTWARE.\n//\n\n#import \"RNOpenSSLDecryptor.h\"\n#import \"RNOpenSSLEncryptor.h\"\n\n\nextern NSString *const kRNCryptorOpenSSLSaltedString;\n\nNSData *RNOpenSSLCryptorGetKey(NSString *password, NSData *salt, RNCryptorKeyDerivationSettings keySettings);\nNSData *RNOpenSSLCryptorGetIV(NSData *key, NSString *password, NSData *salt, RNCryptorKeyDerivationSettings keySettings);\n\n\n//\n//#import \"RNCryptor.h\"\n//\n//\n//@interface RNOpenSSLCryptor : NSObject\n//+ (RNOpenSSLCryptor *)openSSLCryptor;\n//\n//- (BOOL)encryptFromStream:(NSInputStream *)fromStream\n//                 toStream:(NSOutputStream *)toStream\n//                 password:(NSString *)password\n//                    error:(NSError **)error;\n//\n//- (BOOL)decryptFromStream:(NSInputStream *)fromStream\n//                 toStream:(NSOutputStream *)toStream\n//                 password:(NSString *)password\n//                    error:(NSError **)error;\n//\n//@end\n//\n//static const RNCryptorSettings kRNCryptorOpenSSLSettings = {\n//    .algorithm = kCCAlgorithmAES128,\n//    .mode = kCCModeCBC,\n//    .blockSize = kCCBlockSizeAES128,\n//    .IVSize = kCCBlockSizeAES128,\n//    .padding = ccPKCS7Padding,\n//\n//    .keySettings = {\n//        .keySize = kCCKeySizeAES256,\n//        .saltSize = 8,\n//        .rounds = 1,\n//        .PRF = kCCPRFHmacAlgSHA1\n//    },\n//};\n"
  },
  {
    "path": "Pods/RNCryptor/RNCryptor/RNOpenSSLCryptor.m",
    "content": "////\n////  RNOpenSSLCryptor\n////\n////  Copyright (c) 2012 Rob Napier\n////\n////  This code is licensed under the MIT License:\n////\n////  Permission is hereby granted, free of charge, to any person obtaining a\n////  copy of this software and associated documentation files (the \"Software\"),\n////  to deal in the Software without restriction, including without limitation\n////  the rights to use, copy, modify, merge, publish, distribute, sublicense,\n////  and/or sell copies of the Software, and to permit persons to whom the\n////  Software is furnished to do so, subject to the following conditions:\n////\n////  The above copyright notice and this permission notice shall be included in\n////  all copies or substantial portions of the Software.\n////\n////  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n////  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n////  FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE\n////  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n////  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n////  FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\n////  DEALINGS IN THE SOFTWARE.\n////\n\n\n// For aes-128:\n//\n// key = MD5(password + salt)\n// IV = MD5(Key + password + salt)\n\n//\n// For aes-256:\n//\n// Hash0 = ''\n// Hash1 = MD5(Hash0 + Password + Salt)\n// Hash2 = MD5(Hash1 + Password + Salt)\n// Hash3 = MD5(Hash2 + Password + Salt)\n// Hash4 = MD5(Hash3 + Password + Salt)\n//\n// Key = Hash1 + Hash2\n// IV = Hash3 + Hash4\n//\n\n// File Format:\n//\n// |Salted___|<salt>|<ciphertext>|\n//\n\n#import \"RNOpenSSLCryptor.h\"\n\nNSString *const kRNCryptorOpenSSLSaltedString = @\"Salted__\";\n\nstatic NSData *GetHashForHash(NSData *hash, NSData *passwordSalt) {\n  unsigned char md[CC_MD5_DIGEST_LENGTH];\n\n  NSMutableData *hashMaterial = [NSMutableData dataWithData:hash];\n  [hashMaterial appendData:passwordSalt];\n  CC_MD5([hashMaterial bytes], (CC_LONG)[hashMaterial length], md);\n\n  return [NSData dataWithBytes:md length:sizeof(md)];\n}\n\n\nNSData *RNOpenSSLCryptorGetKey(NSString *password, NSData *salt, RNCryptorKeyDerivationSettings keySettings) {\n  // FIXME: This is all very inefficient; we repeat ourselves in IVForKey:...\n\n  NSMutableData *key;\n  NSMutableData *passwordSalt = [[password dataUsingEncoding:NSUTF8StringEncoding] mutableCopy];\n  [passwordSalt appendData:salt];\n\n  if (keySettings.keySize != kCCKeySizeAES256) {\n    // For aes-128:\n    //\n    // key = MD5(password + salt)\n    // IV = MD5(Key + password + salt)\n    unsigned char md[CC_MD5_DIGEST_LENGTH];\n    CC_MD5([passwordSalt bytes], (CC_LONG)[passwordSalt length], md);\n    key = [NSData dataWithBytes:md length:sizeof(md)];\n\n  } else {\n    // Hash0 = ''\n    // Hash1 = MD5(Hash0 + Password + Salt)\n    // Hash2 = MD5(Hash1 + Password + Salt)\n    // Hash3 = MD5(Hash2 + Password + Salt)\n    // Hash4 = MD5(Hash3 + Password + Salt)\n    //\n    // Key = Hash1 + Hash2\n    // IV = Hash3 + Hash4\n\n    NSData *hash1 = GetHashForHash(nil, passwordSalt);\n    NSData *hash2 = GetHashForHash(hash1, passwordSalt);\n\n    key = [hash1 mutableCopy];\n    [key appendData:hash2];\n  }\n  return key;\n}\n\nNSData *RNOpenSSLCryptorGetIV(NSData *key, NSString *password, NSData *salt, RNCryptorKeyDerivationSettings keySettings) {\n\n  NSMutableData *IV;\n  NSMutableData *passwordSalt = [[password dataUsingEncoding:NSUTF8StringEncoding] mutableCopy];\n  [passwordSalt appendData:salt];\n\n  if (keySettings.keySize != kCCKeySizeAES256) {\n    // For aes-128:\n    //\n    // key = MD5(password + salt)\n    // IV = MD5(Key + password + salt)\n    IV = [GetHashForHash(key, passwordSalt) mutableCopy];\n\n  } else {\n\n    //\n    // For aes-256:\n    //\n    // Hash0 = ''\n    // Hash1 = MD5(Hash0 + Password + Salt)\n    // Hash2 = MD5(Hash1 + Password + Salt)\n    // Hash3 = MD5(Hash2 + Password + Salt)\n    // Hash4 = MD5(Hash3 + Password + Salt)\n    //\n    // Key = Hash1 + Hash2\n    // IV = Hash3 + Hash4\n    NSData *hash1 = GetHashForHash(nil, passwordSalt);\n    NSData *hash2 = GetHashForHash(hash1, passwordSalt);\n    NSData *hash3 = GetHashForHash(hash2, passwordSalt);\n    NSData *hash4 = GetHashForHash(hash3, passwordSalt);\n\n    IV = [hash3 mutableCopy];\n    [IV appendData:hash4];\n  }\n  return IV;\n}\n\n\n\n//\n//const NSUInteger kSaltSize = 8;\n//NSString *const kSaltedString = @\"Salted__\";\n//\n//@interface NSInputStream (RNCryptor)\n//- (BOOL)_RNGetData:(NSData **)data maxLength:(NSUInteger)maxLength error:(NSError **)error;\n//@end\n//\n//@implementation NSInputStream (RNCryptor)\n//- (BOOL)_RNGetData:(NSData **)data maxLength:(NSUInteger)maxLength error:(NSError **)error\n//{\n//  NSMutableData *buffer = [NSMutableData dataWithLength:maxLength];\n//  if ([self read:buffer.mutableBytes maxLength:maxLength] < 0) {\n//    if (error) {\n//      *error = [self streamError];\n//      return NO;\n//    }\n//  }\n//\n//  *data = buffer;\n//  return YES;\n//}\n//@end\n//\n//@interface NSOutputStream (RNCryptor)\n//- (BOOL)_RNWriteData:(NSData *)data error:(NSError **)error;\n//@end\n//\n//@implementation NSOutputStream (RNCryptor)\n//- (BOOL)_RNWriteData:(NSData *)data error:(NSError **)error\n//{\n//  // Writing 0 bytes will close the output stream.\n//  // This is an undocumented side-effect. radar://9930518\n//  if (data.length > 0) {\n//    NSInteger bytesWritten = [self write:data.bytes\n//                               maxLength:data.length];\n//    if (bytesWritten != data.length) {\n//      if (error) {\n//        *error = [self streamError];\n//      }\n//      return NO;\n//    }\n//  }\n//  return YES;\n//}\n//@end\n//\n//@interface RNOpenSSLCryptor ()\n//@end\n//\n//@implementation RNOpenSSLCryptor\n//+ (RNOpenSSLCryptor *)openSSLCryptor\n//{\n//  static dispatch_once_t once;\n//  static id openSSLCryptor = nil;\n//\n//  dispatch_once(&once, ^{openSSLCryptor = [[self alloc] init];});\n//  return openSSLCryptor;\n//}\n//\n//- (NSData *)hashForHash:(NSData *)hash passwordSalt:(NSData *)passwordSalt\n//{\n//  unsigned char md[CC_MD5_DIGEST_LENGTH];\n//\n//  NSMutableData *hashMaterial = [NSMutableData dataWithData:hash];\n//  [hashMaterial appendData:passwordSalt];\n//  CC_MD5([hashMaterial bytes], [hashMaterial length], md);\n//\n//  return [NSData dataWithBytes:md length:sizeof(md)];\n//}\n//\n//- (NSData *)keyForPassword:(NSString *)password salt:(NSData *)salt\n//{\n//  // FIXME: This is all very inefficient; we repeat ourselves in IVForKey:...\n//\n//  // Hash0 = ''\n//  // Hash1 = MD5(Hash0 + Password + Salt)\n//  // Hash2 = MD5(Hash1 + Password + Salt)\n//  // Hash3 = MD5(Hash2 + Password + Salt)\n//  // Hash4 = MD5(Hash3 + Password + Salt)\n//  //\n//  // Key = Hash1 + Hash2\n//  // IV = Hash3 + Hash4\n//\n//  NSMutableData *passwordSalt = [[password dataUsingEncoding:NSUTF8StringEncoding] mutableCopy];\n//  [passwordSalt appendData:salt];\n//\n//  NSData *hash1 = [self hashForHash:nil passwordSalt:passwordSalt];\n//  NSData *hash2 = [self hashForHash:hash1 passwordSalt:passwordSalt];\n//\n//  NSMutableData *key = [hash1 mutableCopy];\n//  [key appendData:hash2];\n//\n//  return key;\n//\n////  // key = MD5(password + salt)\n////  unsigned char md[CC_MD5_DIGEST_LENGTH];\n////  NSMutableData *keyMaterial = [NSMutableData dataWithData:[password dataUsingEncoding:NSUTF8StringEncoding]];\n////  [keyMaterial appendData:salt];\n////  CC_MD5([keyMaterial bytes], [keyMaterial length], md);\n////  NSData *key = [NSData dataWithBytes:md length:sizeof(md)];\n////  return key;\n//}\n//\n//- (NSData *)IVForKey:(NSData *)key password:(NSString *)password salt:(NSData *)salt\n//{\n//  NSMutableData *passwordSalt = [[password dataUsingEncoding:NSUTF8StringEncoding] mutableCopy];\n//  [passwordSalt appendData:salt];\n//\n//  NSData *hash1 = [self hashForHash:nil passwordSalt:passwordSalt];\n//  NSData *hash2 = [self hashForHash:hash1 passwordSalt:passwordSalt];\n//  NSData *hash3 = [self hashForHash:hash2 passwordSalt:passwordSalt];\n//  NSData *hash4 = [self hashForHash:hash3 passwordSalt:passwordSalt];\n//\n//  NSMutableData *IV = [hash3 mutableCopy];\n//  [IV appendData:hash4];\n//\n//  return IV;\n//\n//\n////  // IV = MD5(Key + password + salt)\n////  unsigned char md[CC_MD5_DIGEST_LENGTH];\n////  NSMutableData *IVMaterial = [NSMutableData dataWithData:key];\n////  [IVMaterial appendData:[password dataUsingEncoding:NSUTF8StringEncoding]];\n////  [IVMaterial appendData:salt];\n////  CC_MD5([IVMaterial bytes], [IVMaterial length], md);\n////  NSData *IV = [NSData dataWithBytes:md length:sizeof(md)];\n////  return IV;\n//}\n//\n//- (BOOL)decryptFromStream:(NSInputStream *)fromStream toStream:(NSOutputStream *)toStream password:(NSString *)password error:(NSError **)error\n//{\n//  NSData *salted;\n//  NSData *encryptionKeySalt;\n//\n//  [fromStream open];\n//\n//  if (![fromStream _RNGetData:&salted maxLength:[kSaltedString length] error:error] ||\n//      ![fromStream _RNGetData:&encryptionKeySalt maxLength:kSaltSize error:error]) {\n//    return NO;\n//  }\n//\n//  if (![[[NSString alloc] initWithData:salted encoding:NSUTF8StringEncoding] isEqualToString:kSaltedString]) {\n//    if (error) {\n//      *error = [NSError errorWithDomain:kRNCryptorErrorDomain code:kRNCryptorUnknownHeader\n//                               userInfo:[NSDictionary dictionaryWithObject:NSLocalizedString(@\"Could not find salt\", @\"Could not find salt\") forKey:NSLocalizedDescriptionKey]];\n//    }\n//    return NO;\n//  }\n//\n//  NSData *encryptionKey = [self keyForPassword:password salt:encryptionKeySalt];\n//  NSData *IV = [self IVForKey:encryptionKey password:password salt:encryptionKeySalt];\n//\n//  RNCryptor *cryptor = [[RNCryptor alloc] initWithSettings:kRNCryptorOpenSSLSettings];\n//\n//  return [cryptor performOperation:kCCDecrypt fromStream:fromStream readCallback:nil toStream:toStream writeCallback:nil encryptionKey:encryptionKey IV:IV footerSize:0 footer:nil error:error];\n//}\n//\n//\n//- (BOOL)encryptFromStream:(NSInputStream *)fromStream toStream:(NSOutputStream *)toStream password:(NSString *)password error:(NSError **)error\n//{\n//  NSData *encryptionKeySalt = [RNCryptor randomDataOfLength:kSaltSize];\n//  NSData *encryptionKey = [self keyForPassword:password salt:encryptionKeySalt];\n//  NSData *IV = [self IVForKey:encryptionKey password:password salt:encryptionKeySalt];\n//\n//  [toStream open];\n//  NSData *headerData = [kSaltedString dataUsingEncoding:NSUTF8StringEncoding];\n//  if (![toStream _RNWriteData:headerData error:error] ||\n//      ![toStream _RNWriteData:encryptionKeySalt error:error]\n//      ) {\n//    return NO;\n//  }\n//\n//  RNCryptor *cryptor = [[RNCryptor alloc] initWithSettings:kRNCryptorOpenSSLSettings];\n//  return [cryptor performOperation:kCCEncrypt fromStream:fromStream readCallback:nil toStream:toStream writeCallback:nil encryptionKey:encryptionKey IV:IV footerSize:0 footer:nil error:error];\n//}\n//@end\n"
  },
  {
    "path": "Pods/RNCryptor/RNCryptor/RNOpenSSLDecryptor.h",
    "content": "//\n//  RNOpenSSLDecryptor\n//\n//  Copyright (c) 2012 Rob Napier\n//\n//  This code is licensed under the MIT License:\n//\n//  Permission is hereby granted, free of charge, to any person obtaining a \n//  copy of this software and associated documentation files (the \"Software\"),\n//  to deal in the Software without restriction, including without limitation\n//  the rights to use, copy, modify, merge, publish, distribute, sublicense,\n//  and/or sell copies of the Software, and to permit persons to whom the\n//  Software is furnished to do so, subject to the following conditions:\n//  \n//  The above copyright notice and this permission notice shall be included in\n//  all copies or substantial portions of the Software.\n//\n//  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n//  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n//  FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE\n//  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n//  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n//  FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\n//  DEALINGS IN THE SOFTWARE.\n//\n\n#import <Foundation/Foundation.h>\n#import \"RNDecryptor.h\"\n\n@interface RNOpenSSLDecryptor : RNDecryptor\n- (RNDecryptor *)initWithSettings:(RNCryptorSettings)settings\n                         password:(NSString *)password\n                          handler:(RNCryptorHandler)handler;\n\n- (RNDecryptor *)initWithSettings:(RNCryptorSettings)theSettings\n                    encryptionKey:(NSData *)anEncryptionKey\n                               IV:(NSData *)anIV\n                          handler:(RNCryptorHandler)aHandler;\n\n+ (NSData *)decryptData:(NSData *)data withSettings:(RNCryptorSettings)settings password:(NSString *)password error:(NSError **)error;\n+ (NSData *)decryptData:(NSData *)data withSettings:(RNCryptorSettings)settings encryptionKey:(NSData *)encryptionKey IV:(NSData *)IV error:(NSError **)error;\n\n@end"
  },
  {
    "path": "Pods/RNCryptor/RNCryptor/RNOpenSSLDecryptor.m",
    "content": "//\n//  RNOpenSSLDecryptor\n//\n//  Copyright (c) 2012 Rob Napier\n//\n//  This code is licensed under the MIT License:\n//\n//  Permission is hereby granted, free of charge, to any person obtaining a \n//  copy of this software and associated documentation files (the \"Software\"),\n//  to deal in the Software without restriction, including without limitation\n//  the rights to use, copy, modify, merge, publish, distribute, sublicense,\n//  and/or sell copies of the Software, and to permit persons to whom the\n//  Software is furnished to do so, subject to the following conditions:\n//  \n//  The above copyright notice and this permission notice shall be included in\n//  all copies or substantial portions of the Software.\n//\n//  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n//  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n//  FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE\n//  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n//  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n//  FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\n//  DEALINGS IN THE SOFTWARE.\n//\n\n\n#import \"RNOpenSSLDecryptor.h\"\n#import \"RNCryptor+Private.h\"\n#import \"RNCryptorEngine.h\"\n#import \"RNOpenSSLCryptor.h\"\n\n@interface RNDecryptor (Private)\n@property (nonatomic, readwrite, strong) NSMutableData *inData;\n@property (nonatomic, readwrite, copy) NSData *encryptionKey;\n@property (nonatomic, readwrite, copy) NSData *HMACKey;\n@property (nonatomic, readwrite, copy) NSString *password;\n@end\n\n@interface RNOpenSSLDecryptor ()\n@property (nonatomic, readwrite, assign) RNCryptorSettings settings;\n@property (nonatomic, readwrite, copy) NSString *password;\n@end\n\n@implementation RNOpenSSLDecryptor\n@synthesize password = _password;\n@synthesize settings = _settings;\n\n+ (NSData *)decryptData:(NSData *)data withSettings:(RNCryptorSettings)settings password:(NSString *)password error:(NSError **)error\n{\n  RNDecryptor *cryptor = [[self alloc] initWithSettings:settings password:password handler:^(RNCryptor *c, NSData *d) {}];\n  return [self synchronousResultForCryptor:cryptor data:data error:error];\n}\n\n+ (NSData *)decryptData:(NSData *)data withSettings:(RNCryptorSettings)settings encryptionKey:(NSData *)encryptionKey IV:(NSData *)IV error:(NSError **)error\n{\n  RNDecryptor *cryptor = [[self alloc] initWithSettings:settings encryptionKey:encryptionKey IV:IV handler:^(RNCryptor *c, NSData *d) {}];\n  return [self synchronousResultForCryptor:cryptor data:data error:error];\n}\n\n- (RNDecryptor *)initWithSettings:(RNCryptorSettings)theSettings encryptionKey:(NSData *)anEncryptionKey IV:(NSData *)anIV handler:(RNCryptorHandler)aHandler\n{\n  NSParameterAssert(anEncryptionKey != nil);\n\n  self = [super initWithHandler:aHandler];\n  if (self) {\n    NSError *error = nil;\n    self.engine = [[RNCryptorEngine alloc] initWithOperation:kCCDecrypt\n                                                    settings:theSettings\n                                                         key:anEncryptionKey\n                                                          IV:anIV\n                                                       error:&error];\n    if (!self.engine) {\n      [self cleanupAndNotifyWithError:error];\n      self = nil;\n      return nil;\n    }\n    self.HMACLength = 0;\n    self.settings = theSettings;\n  }\n\n  return self;\n}\n\n- (RNDecryptor *)initWithSettings:(RNCryptorSettings)theSettings password:(NSString *)aPassword handler:(RNCryptorHandler)aHandler\n{\n  NSParameterAssert(aPassword != nil);\n\n  self = [super initWithHandler:aHandler];\n  if (self) {\n    self.HMACLength = 0;\n    self.password = aPassword;\n    self.settings = theSettings;\n  }\n\n  return self;\n}\n\n- (RNDecryptor *)initWithEncryptionKey:(NSData *)encryptionKey\n                               HMACKey:(NSData *)HMACKey\n                               handler:(RNCryptorHandler)handler\n{\n  NSAssert(NO, @\"%s -- Cannot be used in OpenSSL mode. An IV or password is required\", __func__);\n  return nil;\n}\n\n- (RNDecryptor *)initWithPassword:(NSString *)password\n                          handler:(RNCryptorHandler)handler\n{\n  NSAssert(NO, @\"%s -- Cannot be used in OpenSSL mode. Settings are required\", __func__);\n  return nil;\n}\n\n+ (NSData *)decryptData:(NSData *)data withPassword:(NSString *)password error:(NSError **)error\n{\n  NSAssert(NO, @\"%s -- Cannot be used in OpenSSL mode. Settings are required\", __func__);\n  return nil;\n\n}\n\n+ (NSData *)decryptData:(NSData *)data withEncryptionKey:(NSData *)encryptionKey HMACKey:(NSData *)HMACKey error:(NSError **)error\n{\n  NSAssert(NO, @\"%s -- Cannot be used in OpenSSL mode. Settings are required\", __func__);\n  return nil;\n}\n\n- (void)consumeHeaderFromData:(NSMutableData *)data\n{\n  RNCryptorSettings settings = self.settings;\n  if (data.length < [kRNCryptorOpenSSLSaltedString length] + settings.keySettings.saltSize) {\n    return;\n  }\n\n  NSString *saltedPrefix = [[NSString alloc] initWithData:[data _RNConsumeToIndex:[kRNCryptorOpenSSLSaltedString length]] encoding:NSUTF8StringEncoding];\n  if (![kRNCryptorOpenSSLSaltedString isEqualToString:saltedPrefix]) {\n    [self cleanupAndNotifyWithError:[NSError errorWithDomain:kRNCryptorErrorDomain\n                                                        code:kRNCryptorUnknownHeader\n                                                    userInfo:[NSDictionary dictionaryWithObject:@\"Unknown header\" /* DNL */\n                                                                                         forKey:NSLocalizedDescriptionKey]]];\n  }\n\n  NSData *salt = [data _RNConsumeToIndex:settings.keySettings.saltSize];\n  NSData *key = RNOpenSSLCryptorGetKey(self.password, salt, settings.keySettings);\n  NSData *IV = RNOpenSSLCryptorGetIV(key, self.password, salt, settings.keySettings);\n  NSError *error = nil;\n\n  self.engine = [[RNCryptorEngine alloc] initWithOperation:kCCDecrypt\n                                                  settings:settings\n                                                       key:key\n                                                        IV:IV\n                                                     error:&error];\n  if (!self.engine) {\n    [self cleanupAndNotifyWithError:error];\n    return;\n  }\n}\n\n@end"
  },
  {
    "path": "Pods/RNCryptor/RNCryptor/RNOpenSSLEncryptor.h",
    "content": "//\n//  RNOpenSSLEncryptor\n//\n//  Copyright (c) 2012 Rob Napier\n//\n//  This code is licensed under the MIT License:\n//\n//  Permission is hereby granted, free of charge, to any person obtaining a \n//  copy of this software and associated documentation files (the \"Software\"),\n//  to deal in the Software without restriction, including without limitation\n//  the rights to use, copy, modify, merge, publish, distribute, sublicense,\n//  and/or sell copies of the Software, and to permit persons to whom the\n//  Software is furnished to do so, subject to the following conditions:\n//  \n//  The above copyright notice and this permission notice shall be included in\n//  all copies or substantial portions of the Software.\n//\n//  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n//  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n//  FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE\n//  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n//  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n//  FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\n//  DEALINGS IN THE SOFTWARE.\n//\n\n#import <Foundation/Foundation.h>\n#import \"RNEncryptor.h\"\n\n@interface RNOpenSSLEncryptor : RNEncryptor\n+ (NSData *)encryptData:(NSData *)data withSettings:(RNCryptorSettings)settings encryptionKey:(NSData *)encryptionKey IV:(NSData *)IV error:(NSError **)error;\n- (RNEncryptor *)initWithSettings:(RNCryptorSettings)theSettings encryptionKey:(NSData *)anEncryptionKey IV:(NSData *)anIV handler:(RNCryptorHandler)aHandler;\n@end"
  },
  {
    "path": "Pods/RNCryptor/RNCryptor/RNOpenSSLEncryptor.m",
    "content": "//\n//  RNOpenSSLEncryptor\n//\n//  Copyright (c) 2012 Rob Napier\n//\n//  This code is licensed under the MIT License:\n//\n//  Permission is hereby granted, free of charge, to any person obtaining a \n//  copy of this software and associated documentation files (the \"Software\"),\n//  to deal in the Software without restriction, including without limitation\n//  the rights to use, copy, modify, merge, publish, distribute, sublicense,\n//  and/or sell copies of the Software, and to permit persons to whom the\n//  Software is furnished to do so, subject to the following conditions:\n//  \n//  The above copyright notice and this permission notice shall be included in\n//  all copies or substantial portions of the Software.\n//\n//  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR \n//  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n//  FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE\n//  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n//  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n//  FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\n//  DEALINGS IN THE SOFTWARE.\n//\n\n// For aes-128:\n//\n// key = MD5(password + salt)\n// IV = MD5(Key + password + salt)\n\n//\n// For aes-256:\n//\n// Hash0 = ''\n// Hash1 = MD5(Hash0 + Password + Salt)\n// Hash2 = MD5(Hash1 + Password + Salt)\n// Hash3 = MD5(Hash2 + Password + Salt)\n// Hash4 = MD5(Hash3 + Password + Salt)\n//\n// Key = Hash1 + Hash2\n// IV = Hash3 + Hash4\n//\n\n// File Format:\n//\n// |Salted___|<salt>|<ciphertext>|\n\n#import \"RNOpenSSLEncryptor.h\"\n#import \"RNCryptor+Private.h\"\n#import \"RNCryptorEngine.h\"\n#import \"RNOpenSSLCryptor.h\"\n\n@interface RNOpenSSLEncryptor ()\n@property (nonatomic, readwrite, strong) NSData *encryptionSalt;\n@end\n\n@implementation RNOpenSSLEncryptor\n@synthesize encryptionSalt = _encryptionSalt;\n\n+ (NSData *)encryptData:(NSData *)data withSettings:(RNCryptorSettings)settings encryptionKey:(NSData *)encryptionKey IV:(NSData *)IV error:(NSError **)error\n{\n    RNEncryptor *cryptor = [[self alloc] initWithSettings:settings encryptionKey:encryptionKey IV:IV handler:^(RNCryptor *c, NSData *d) {}];\n    return [self synchronousResultForCryptor:cryptor data:data error:error];\n}\n\n- (RNEncryptor *)initWithSettings:(RNCryptorSettings)settings encryptionKey:(NSData *)encryptionKey HMACKey:(NSData *)HMACKey handler:(RNCryptorHandler)handler\n{\n  NSAssert(NO, @\"%s -- Cannot be used in OpenSSL mode. An IV or password is required\", __func__);\n  return nil;\n}\n\n- (RNEncryptor *)initWithSettings:(RNCryptorSettings)theSettings encryptionKey:(NSData *)anEncryptionKey IV:(NSData *)anIV handler:(RNCryptorHandler)aHandler\n{\n  self = [super initWithHandler:aHandler];\n  if (self) {\n    NSError *error = nil;\n    self.engine = [[RNCryptorEngine alloc] initWithOperation:kCCEncrypt\n                                                    settings:theSettings\n                                                         key:anEncryptionKey\n                                                          IV:anIV\n                                                       error:&error];\n    if (!self.engine) {\n      [self cleanupAndNotifyWithError:error];\n      self = nil;\n      return nil;\n    }\n    self.HMACLength = 0;\n  }\n\n  return self;\n}\n\n- (RNEncryptor *)initWithSettings:(RNCryptorSettings)theSettings password:(NSString *)aPassword handler:(RNCryptorHandler)aHandler\n{\n  NSParameterAssert(aPassword != nil);\n\n  NSData *encryptionSalt = [[self class] randomDataOfLength:theSettings.keySettings.saltSize];\n  NSData *encryptionKey = RNOpenSSLCryptorGetKey(aPassword, encryptionSalt, theSettings.keySettings);\n  NSData *IV = RNOpenSSLCryptorGetIV(encryptionKey, aPassword, encryptionSalt, theSettings.keySettings);\n  self = [self initWithSettings:theSettings\n                  encryptionKey:encryptionKey\n                             IV:IV\n                        handler:aHandler];\n  if (self) {\n    self.options |= kRNCryptorOptionHasPassword;\n    self.encryptionSalt = encryptionSalt;\n  }\n  return self;\n}\n\n- (NSData *)header\n{\n    NSMutableData *headerData = [NSMutableData data];\n    if (kRNCryptorOptionHasPassword == (self.options & kRNCryptorOptionHasPassword)) {\n        [headerData appendData:[kRNCryptorOpenSSLSaltedString dataUsingEncoding:NSUTF8StringEncoding]];\n        [headerData appendData:self.encryptionSalt];\n    }\n  return headerData;\n}\n\n@end"
  },
  {
    "path": "Pods/SwiftTryCatch/LICENSE",
    "content": "The MIT License (MIT)\n\nCopyright (c) 2014 William Falcon\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n\n"
  },
  {
    "path": "Pods/SwiftTryCatch/README.md",
    "content": "SwiftTryCatch\n=============\n\nAdds try/catch support for Swift\n\nSimple wrapper built around Objective-C to achieve the same result.\n\n##Usage\n\n###1. Create bridging header.\n- When prompted with \"Would you like to configure an Objective-C bridging header?\" press Yes.\n- Go to bridging header and add:\n````#import \"SwiftTryCatch.h\"````\n\n###2. Use\n````\nSwiftTryCatch.try({ () -> Void in\n        //try something\n     }, catch: { (error) -> Void in\n        //handle error\n     }, finally: { () -> Void in\n        //close resources\n})\n````\n"
  },
  {
    "path": "Pods/SwiftTryCatch/SwiftTryCatch.h",
    "content": "//\n//  SwiftTryCatch.h\n//\n//  Created by William Falcon on 10/10/14.\n//  Copyright (c) 2014 William Falcon. All rights reserved.\n//\n/*\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n \n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n \n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n */\n\n#import <Foundation/Foundation.h>\n@import UIKit;\n\n@interface SwiftTryCatch : NSObject\n\n/**\n Provides try catch functionality for swift by wrapping around Objective-C\n */\n+ (void)try:(void(^)())try catch:(void(^)(NSException*exception))catch finally:(void(^)())finally;\n+ (void)throwString:(NSString*)s;\n+ (void)throwException:(NSException*)e;\n@end\n"
  },
  {
    "path": "Pods/SwiftTryCatch/SwiftTryCatch.m",
    "content": "//\n//  SwiftTryCatch.h\n//\n//  Created by William Falcon on 10/10/14.\n//  Copyright (c) 2014 William Falcon. All rights reserved.\n//\n/*\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n \n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n \n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n */\n\n\n#import \"SwiftTryCatch.h\"\n\n@implementation SwiftTryCatch\n\n/**\n Provides try catch functionality for swift by wrapping around Objective-C\n */\n+(void)try:(void (^)())try catch:(void (^)(NSException *))catch finally:(void (^)())finally{\n    @try {\n        try ? try() : nil;\n    }\n    \n    @catch (NSException *exception) {\n        catch ? catch(exception) : nil;\n    }\n    @finally {\n        finally ? finally() : nil;\n    }\n}\n\n+ (void)throwString:(NSString*)s\n{\n\t@throw [NSException exceptionWithName:s reason:s userInfo:nil];\n}\n\n+ (void)throwException:(NSException*)e\n{\n\t@throw e;\n}\n\n@end\n"
  },
  {
    "path": "Pods/Target Support Files/AFNetworking/AFNetworking-dummy.m",
    "content": "#import <Foundation/Foundation.h>\n@interface PodsDummy_AFNetworking : NSObject\n@end\n@implementation PodsDummy_AFNetworking\n@end\n"
  },
  {
    "path": "Pods/Target Support Files/AFNetworking/AFNetworking-prefix.pch",
    "content": "#ifdef __OBJC__\n#import <UIKit/UIKit.h>\n#else\n#ifndef FOUNDATION_EXPORT\n#if defined(__cplusplus)\n#define FOUNDATION_EXPORT extern \"C\"\n#else\n#define FOUNDATION_EXPORT extern\n#endif\n#endif\n#endif\n\n"
  },
  {
    "path": "Pods/Target Support Files/AFNetworking/AFNetworking.xcconfig",
    "content": "CONFIGURATION_BUILD_DIR = $PODS_CONFIGURATION_BUILD_DIR/AFNetworking\nGCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1\nHEADER_SEARCH_PATHS = \"${PODS_ROOT}/Headers/Private\" \"${PODS_ROOT}/Headers/Private/AFNetworking\" \"${PODS_ROOT}/Headers/Public\" \"${PODS_ROOT}/Headers/Public/AFNetworking\" \"${PODS_ROOT}/Headers/Public/CoreBitcoin\" \"${PODS_ROOT}/Headers/Public/Crashlytics\" \"${PODS_ROOT}/Headers/Public/ECSlidingViewController\" \"${PODS_ROOT}/Headers/Public/Fabric\" \"${PODS_ROOT}/Headers/Public/ISO8601DateFormatter\" \"${PODS_ROOT}/Headers/Public/MBProgressHUD\" \"${PODS_ROOT}/Headers/Public/OpenSSL-Universal\" \"${PODS_ROOT}/Headers/Public/RNCryptor\" \"${PODS_ROOT}/Headers/Public/SwiftTryCatch\" \"${PODS_ROOT}/Headers/Public/iCloudDocumentSync\"\nOTHER_LDFLAGS = -framework \"CoreGraphics\" -framework \"MobileCoreServices\" -framework \"Security\" -framework \"SystemConfiguration\"\nPODS_BUILD_DIR = $BUILD_DIR\nPODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)\nPODS_ROOT = ${SRCROOT}\nPODS_TARGET_SRCROOT = ${PODS_ROOT}/AFNetworking\nPRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier}\nSKIP_INSTALL = YES\n"
  },
  {
    "path": "Pods/Target Support Files/CoreBitcoin/CoreBitcoin-dummy.m",
    "content": "#import <Foundation/Foundation.h>\n@interface PodsDummy_CoreBitcoin : NSObject\n@end\n@implementation PodsDummy_CoreBitcoin\n@end\n"
  },
  {
    "path": "Pods/Target Support Files/CoreBitcoin/CoreBitcoin-prefix.pch",
    "content": "#ifdef __OBJC__\n#import <UIKit/UIKit.h>\n#else\n#ifndef FOUNDATION_EXPORT\n#if defined(__cplusplus)\n#define FOUNDATION_EXPORT extern \"C\"\n#else\n#define FOUNDATION_EXPORT extern\n#endif\n#endif\n#endif\n\n"
  },
  {
    "path": "Pods/Target Support Files/CoreBitcoin/CoreBitcoin.xcconfig",
    "content": "CONFIGURATION_BUILD_DIR = $PODS_CONFIGURATION_BUILD_DIR/CoreBitcoin\nGCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1\nHEADER_SEARCH_PATHS = \"${PODS_ROOT}/Headers/Private\" \"${PODS_ROOT}/Headers/Private/CoreBitcoin\" \"${PODS_ROOT}/Headers/Public\" \"${PODS_ROOT}/Headers/Public/AFNetworking\" \"${PODS_ROOT}/Headers/Public/CoreBitcoin\" \"${PODS_ROOT}/Headers/Public/Crashlytics\" \"${PODS_ROOT}/Headers/Public/ECSlidingViewController\" \"${PODS_ROOT}/Headers/Public/Fabric\" \"${PODS_ROOT}/Headers/Public/ISO8601DateFormatter\" \"${PODS_ROOT}/Headers/Public/MBProgressHUD\" \"${PODS_ROOT}/Headers/Public/OpenSSL-Universal\" \"${PODS_ROOT}/Headers/Public/RNCryptor\" \"${PODS_ROOT}/Headers/Public/SwiftTryCatch\" \"${PODS_ROOT}/Headers/Public/iCloudDocumentSync\"\nLIBRARY_SEARCH_PATHS = $(inherited) \"$PODS_CONFIGURATION_BUILD_DIR/ISO8601DateFormatter\"\nOTHER_LDFLAGS = -framework \"Foundation\" -framework \"UIKit\"\nPODS_BUILD_DIR = $BUILD_DIR\nPODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)\nPODS_ROOT = ${SRCROOT}\nPODS_TARGET_SRCROOT = ${PODS_ROOT}/CoreBitcoin\nPRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier}\nSKIP_INSTALL = YES\n"
  },
  {
    "path": "Pods/Target Support Files/ECSlidingViewController/ECSlidingViewController-dummy.m",
    "content": "#import <Foundation/Foundation.h>\n@interface PodsDummy_ECSlidingViewController : NSObject\n@end\n@implementation PodsDummy_ECSlidingViewController\n@end\n"
  },
  {
    "path": "Pods/Target Support Files/ECSlidingViewController/ECSlidingViewController-prefix.pch",
    "content": "#ifdef __OBJC__\n#import <UIKit/UIKit.h>\n#else\n#ifndef FOUNDATION_EXPORT\n#if defined(__cplusplus)\n#define FOUNDATION_EXPORT extern \"C\"\n#else\n#define FOUNDATION_EXPORT extern\n#endif\n#endif\n#endif\n\n"
  },
  {
    "path": "Pods/Target Support Files/ECSlidingViewController/ECSlidingViewController.xcconfig",
    "content": "CONFIGURATION_BUILD_DIR = $PODS_CONFIGURATION_BUILD_DIR/ECSlidingViewController\nGCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1\nHEADER_SEARCH_PATHS = \"${PODS_ROOT}/Headers/Private\" \"${PODS_ROOT}/Headers/Private/ECSlidingViewController\" \"${PODS_ROOT}/Headers/Public\" \"${PODS_ROOT}/Headers/Public/AFNetworking\" \"${PODS_ROOT}/Headers/Public/CoreBitcoin\" \"${PODS_ROOT}/Headers/Public/Crashlytics\" \"${PODS_ROOT}/Headers/Public/ECSlidingViewController\" \"${PODS_ROOT}/Headers/Public/Fabric\" \"${PODS_ROOT}/Headers/Public/ISO8601DateFormatter\" \"${PODS_ROOT}/Headers/Public/MBProgressHUD\" \"${PODS_ROOT}/Headers/Public/OpenSSL-Universal\" \"${PODS_ROOT}/Headers/Public/RNCryptor\" \"${PODS_ROOT}/Headers/Public/SwiftTryCatch\" \"${PODS_ROOT}/Headers/Public/iCloudDocumentSync\"\nPODS_BUILD_DIR = $BUILD_DIR\nPODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)\nPODS_ROOT = ${SRCROOT}\nPODS_TARGET_SRCROOT = ${PODS_ROOT}/ECSlidingViewController\nPRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier}\nSKIP_INSTALL = YES\n"
  },
  {
    "path": "Pods/Target Support Files/ISO8601DateFormatter/ISO8601DateFormatter-dummy.m",
    "content": "#import <Foundation/Foundation.h>\n@interface PodsDummy_ISO8601DateFormatter : NSObject\n@end\n@implementation PodsDummy_ISO8601DateFormatter\n@end\n"
  },
  {
    "path": "Pods/Target Support Files/ISO8601DateFormatter/ISO8601DateFormatter-prefix.pch",
    "content": "#ifdef __OBJC__\n#import <UIKit/UIKit.h>\n#else\n#ifndef FOUNDATION_EXPORT\n#if defined(__cplusplus)\n#define FOUNDATION_EXPORT extern \"C\"\n#else\n#define FOUNDATION_EXPORT extern\n#endif\n#endif\n#endif\n\n"
  },
  {
    "path": "Pods/Target Support Files/ISO8601DateFormatter/ISO8601DateFormatter.xcconfig",
    "content": "CONFIGURATION_BUILD_DIR = $PODS_CONFIGURATION_BUILD_DIR/ISO8601DateFormatter\nGCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1\nHEADER_SEARCH_PATHS = \"${PODS_ROOT}/Headers/Private\" \"${PODS_ROOT}/Headers/Private/ISO8601DateFormatter\" \"${PODS_ROOT}/Headers/Public\" \"${PODS_ROOT}/Headers/Public/AFNetworking\" \"${PODS_ROOT}/Headers/Public/CoreBitcoin\" \"${PODS_ROOT}/Headers/Public/Crashlytics\" \"${PODS_ROOT}/Headers/Public/ECSlidingViewController\" \"${PODS_ROOT}/Headers/Public/Fabric\" \"${PODS_ROOT}/Headers/Public/ISO8601DateFormatter\" \"${PODS_ROOT}/Headers/Public/MBProgressHUD\" \"${PODS_ROOT}/Headers/Public/OpenSSL-Universal\" \"${PODS_ROOT}/Headers/Public/RNCryptor\" \"${PODS_ROOT}/Headers/Public/SwiftTryCatch\" \"${PODS_ROOT}/Headers/Public/iCloudDocumentSync\"\nPODS_BUILD_DIR = $BUILD_DIR\nPODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)\nPODS_ROOT = ${SRCROOT}\nPODS_TARGET_SRCROOT = ${PODS_ROOT}/ISO8601DateFormatter\nPRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier}\nSKIP_INSTALL = YES\n"
  },
  {
    "path": "Pods/Target Support Files/MBProgressHUD/MBProgressHUD-dummy.m",
    "content": "#import <Foundation/Foundation.h>\n@interface PodsDummy_MBProgressHUD : NSObject\n@end\n@implementation PodsDummy_MBProgressHUD\n@end\n"
  },
  {
    "path": "Pods/Target Support Files/MBProgressHUD/MBProgressHUD-prefix.pch",
    "content": "#ifdef __OBJC__\n#import <UIKit/UIKit.h>\n#else\n#ifndef FOUNDATION_EXPORT\n#if defined(__cplusplus)\n#define FOUNDATION_EXPORT extern \"C\"\n#else\n#define FOUNDATION_EXPORT extern\n#endif\n#endif\n#endif\n\n"
  },
  {
    "path": "Pods/Target Support Files/MBProgressHUD/MBProgressHUD.xcconfig",
    "content": "CONFIGURATION_BUILD_DIR = $PODS_CONFIGURATION_BUILD_DIR/MBProgressHUD\nGCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1\nHEADER_SEARCH_PATHS = \"${PODS_ROOT}/Headers/Private\" \"${PODS_ROOT}/Headers/Private/MBProgressHUD\" \"${PODS_ROOT}/Headers/Public\" \"${PODS_ROOT}/Headers/Public/AFNetworking\" \"${PODS_ROOT}/Headers/Public/CoreBitcoin\" \"${PODS_ROOT}/Headers/Public/Crashlytics\" \"${PODS_ROOT}/Headers/Public/ECSlidingViewController\" \"${PODS_ROOT}/Headers/Public/Fabric\" \"${PODS_ROOT}/Headers/Public/ISO8601DateFormatter\" \"${PODS_ROOT}/Headers/Public/MBProgressHUD\" \"${PODS_ROOT}/Headers/Public/OpenSSL-Universal\" \"${PODS_ROOT}/Headers/Public/RNCryptor\" \"${PODS_ROOT}/Headers/Public/SwiftTryCatch\" \"${PODS_ROOT}/Headers/Public/iCloudDocumentSync\"\nOTHER_LDFLAGS = -framework \"CoreGraphics\"\nPODS_BUILD_DIR = $BUILD_DIR\nPODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)\nPODS_ROOT = ${SRCROOT}\nPODS_TARGET_SRCROOT = ${PODS_ROOT}/MBProgressHUD\nPRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier}\nSKIP_INSTALL = YES\n"
  },
  {
    "path": "Pods/Target Support Files/Pods-ArcBit/Pods-ArcBit-acknowledgements.markdown",
    "content": "# Acknowledgements\nThis application makes use of the following third party libraries:\n\n## AFNetworking\n\nCopyright (c) 2013-2015 AFNetworking (http://afnetworking.com/)\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n\n\n## CoreBitcoin\n\n           DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE\n                   Version 2, December 2004\n\nCopyright (C) 2014 Oleg Andreev <oleganza@gmail.com>\n\nEveryone is permitted to copy and distribute verbatim or modified\ncopies of this license document, and changing it is allowed as long\nas the name is changed.\n\n           DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE\n  TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION\n\n 0. You just DO WHAT THE FUCK YOU WANT TO.\n\n\n## Crashlytics\n\nFabric: Copyright 2016 Twitter, Inc. All Rights Reserved. Use of this software is subject to the terms and conditions of the Fabric Software and Services Agreement located at https://fabric.io/terms. Crashlytics Kit: Copyright 2016 Crashlytics, Inc. All Rights Reserved. Use of this software is subject to the terms and conditions of the Crashlytics Terms of Service located at http://try.crashlytics.com/terms/terms-of-service.pdf and the Crashlytics Privacy Policy located at http://try.crashlytics.com/terms/privacy-policy.pdf. OSS: http://get.fabric.io/terms/opensource.txt\n\n## ECSlidingViewController\n\nCopyright (c) 2013 Mike Enriquez <mike@enriquez.me>\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n\n\n## Fabric\n\nFabric: Copyright 2016 Twitter, Inc. All Rights Reserved. Use of this software is subject to the terms and conditions of the Fabric Software and Services Agreement located at https://fabric.io/terms. OSS: http://get.fabric.io/terms/opensource.txt\n\n## ISO8601DateFormatter\n\nCopyright © 2006–2013 Peter Hosey\n All rights reserved.\n\nRedistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:\nRedistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.\nRedistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.\nNeither the name of Peter Hosey nor the names of his contributors may be used to endorse or promote products derived from this software without specific prior written permission.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\n\n## MBProgressHUD\n\nCopyright (c) 2009-2015 Matej Bukovinski\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n\n## OpenSSL-Universal\n\n\n  LICENSE ISSUES\n  ==============\n\n  The OpenSSL toolkit stays under a dual license, i.e. both the conditions of\n  the OpenSSL License and the original SSLeay license apply to the toolkit.\n  See below for the actual license texts. Actually both licenses are BSD-style\n  Open Source licenses. In case of any license issues related to OpenSSL\n  please contact openssl-core@openssl.org.\n\n  OpenSSL License\n  ---------------\n\n/* ====================================================================\n * Copyright (c) 1998-2008 The OpenSSL Project.  All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n *\n * 1. Redistributions of source code must retain the above copyright\n *    notice, this list of conditions and the following disclaimer. \n *\n * 2. Redistributions in binary form must reproduce the above copyright\n *    notice, this list of conditions and the following disclaimer in\n *    the documentation and/or other materials provided with the\n *    distribution.\n *\n * 3. All advertising materials mentioning features or use of this\n *    software must display the following acknowledgment:\n *    \"This product includes software developed by the OpenSSL Project\n *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)\"\n *\n * 4. The names \"OpenSSL Toolkit\" and \"OpenSSL Project\" must not be used to\n *    endorse or promote products derived from this software without\n *    prior written permission. For written permission, please contact\n *    openssl-core@openssl.org.\n *\n * 5. Products derived from this software may not be called \"OpenSSL\"\n *    nor may \"OpenSSL\" appear in their names without prior written\n *    permission of the OpenSSL Project.\n *\n * 6. Redistributions of any form whatsoever must retain the following\n *    acknowledgment:\n *    \"This product includes software developed by the OpenSSL Project\n *    for use in the OpenSSL Toolkit (http://www.openssl.org/)\"\n *\n * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY\n * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\n * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR\n * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,\n * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED\n * OF THE POSSIBILITY OF SUCH DAMAGE.\n * ====================================================================\n *\n * This product includes cryptographic software written by Eric Young\n * (eay@cryptsoft.com).  This product includes software written by Tim\n * Hudson (tjh@cryptsoft.com).\n *\n */\n\n Original SSLeay License\n -----------------------\n\n/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)\n * All rights reserved.\n *\n * This package is an SSL implementation written\n * by Eric Young (eay@cryptsoft.com).\n * The implementation was written so as to conform with Netscapes SSL.\n * \n * This library is free for commercial and non-commercial use as long as\n * the following conditions are aheared to.  The following conditions\n * apply to all code found in this distribution, be it the RC4, RSA,\n * lhash, DES, etc., code; not just the SSL code.  The SSL documentation\n * included with this distribution is covered by the same copyright terms\n * except that the holder is Tim Hudson (tjh@cryptsoft.com).\n * \n * Copyright remains Eric Young's, and as such any Copyright notices in\n * the code are not to be removed.\n * If this package is used in a product, Eric Young should be given attribution\n * as the author of the parts of the library used.\n * This can be in the form of a textual message at program startup or\n * in documentation (online or textual) provided with the package.\n * \n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n * 1. Redistributions of source code must retain the copyright\n *    notice, this list of conditions and the following disclaimer.\n * 2. Redistributions in binary form must reproduce the above copyright\n *    notice, this list of conditions and the following disclaimer in the\n *    documentation and/or other materials provided with the distribution.\n * 3. All advertising materials mentioning features or use of this software\n *    must display the following acknowledgement:\n *    \"This product includes cryptographic software written by\n *     Eric Young (eay@cryptsoft.com)\"\n *    The word 'cryptographic' can be left out if the rouines from the library\n *    being used are not cryptographic related :-).\n * 4. If you include any Windows specific code (or a derivative thereof) from \n *    the apps directory (application code) you must include an acknowledgement:\n *    \"This product includes software written by Tim Hudson (tjh@cryptsoft.com)\"\n * \n * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND\n * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE\n * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n * SUCH DAMAGE.\n * \n * The licence and distribution terms for any publically available version or\n * derivative of this code cannot be changed.  i.e. this code cannot simply be\n * copied and put under another distribution licence\n * [including the GNU Public Licence.]\n */\n\n\n\n## RNCryptor\n\nThis code is licensed under the MIT License:\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n\n## SwiftTryCatch\n\nThe MIT License (MIT)\n\nCopyright (c) 2014 William Falcon\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n\n\n\n## iCloudDocumentSync\n\n## License\r\nIt is also appreciated if you let the original developers know if you're using this in a commercial project. Please tweet @iRareMedia, or send us an email (contact[at]iraremedia.com).\r\n\r\nThe MIT License (MIT)\r\n\r\nCopyright (c) 2015 iRare Media\r\n\r\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\r\n\r\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\r\nSOFTWARE.\nGenerated by CocoaPods - https://cocoapods.org\n"
  },
  {
    "path": "Pods/Target Support Files/Pods-ArcBit/Pods-ArcBit-acknowledgements.plist",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\n<plist version=\"1.0\">\n<dict>\n\t<key>PreferenceSpecifiers</key>\n\t<array>\n\t\t<dict>\n\t\t\t<key>FooterText</key>\n\t\t\t<string>This application makes use of the following third party libraries:</string>\n\t\t\t<key>Title</key>\n\t\t\t<string>Acknowledgements</string>\n\t\t\t<key>Type</key>\n\t\t\t<string>PSGroupSpecifier</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>FooterText</key>\n\t\t\t<string>Copyright (c) 2013-2015 AFNetworking (http://afnetworking.com/)\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n</string>\n\t\t\t<key>License</key>\n\t\t\t<string>MIT</string>\n\t\t\t<key>Title</key>\n\t\t\t<string>AFNetworking</string>\n\t\t\t<key>Type</key>\n\t\t\t<string>PSGroupSpecifier</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>FooterText</key>\n\t\t\t<string>           DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE\n                   Version 2, December 2004\n\nCopyright (C) 2014 Oleg Andreev &lt;oleganza@gmail.com&gt;\n\nEveryone is permitted to copy and distribute verbatim or modified\ncopies of this license document, and changing it is allowed as long\nas the name is changed.\n\n           DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE\n  TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION\n\n 0. You just DO WHAT THE FUCK YOU WANT TO.\n</string>\n\t\t\t<key>License</key>\n\t\t\t<string>WTFPL</string>\n\t\t\t<key>Title</key>\n\t\t\t<string>CoreBitcoin</string>\n\t\t\t<key>Type</key>\n\t\t\t<string>PSGroupSpecifier</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>FooterText</key>\n\t\t\t<string>Fabric: Copyright 2016 Twitter, Inc. All Rights Reserved. Use of this software is subject to the terms and conditions of the Fabric Software and Services Agreement located at https://fabric.io/terms. Crashlytics Kit: Copyright 2016 Crashlytics, Inc. All Rights Reserved. Use of this software is subject to the terms and conditions of the Crashlytics Terms of Service located at http://try.crashlytics.com/terms/terms-of-service.pdf and the Crashlytics Privacy Policy located at http://try.crashlytics.com/terms/privacy-policy.pdf. OSS: http://get.fabric.io/terms/opensource.txt</string>\n\t\t\t<key>License</key>\n\t\t\t<string>Commercial</string>\n\t\t\t<key>Title</key>\n\t\t\t<string>Crashlytics</string>\n\t\t\t<key>Type</key>\n\t\t\t<string>PSGroupSpecifier</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>FooterText</key>\n\t\t\t<string>Copyright (c) 2013 Mike Enriquez &lt;mike@enriquez.me&gt;\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n</string>\n\t\t\t<key>License</key>\n\t\t\t<string>MIT</string>\n\t\t\t<key>Title</key>\n\t\t\t<string>ECSlidingViewController</string>\n\t\t\t<key>Type</key>\n\t\t\t<string>PSGroupSpecifier</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>FooterText</key>\n\t\t\t<string>Fabric: Copyright 2016 Twitter, Inc. All Rights Reserved. Use of this software is subject to the terms and conditions of the Fabric Software and Services Agreement located at https://fabric.io/terms. OSS: http://get.fabric.io/terms/opensource.txt</string>\n\t\t\t<key>License</key>\n\t\t\t<string>Commercial</string>\n\t\t\t<key>Title</key>\n\t\t\t<string>Fabric</string>\n\t\t\t<key>Type</key>\n\t\t\t<string>PSGroupSpecifier</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>FooterText</key>\n\t\t\t<string>Copyright © 2006–2013 Peter Hosey\n All rights reserved.\n\nRedistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:\nRedistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.\nRedistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.\nNeither the name of Peter Hosey nor the names of his contributors may be used to endorse or promote products derived from this software without specific prior written permission.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n</string>\n\t\t\t<key>License</key>\n\t\t\t<string>BSD</string>\n\t\t\t<key>Title</key>\n\t\t\t<string>ISO8601DateFormatter</string>\n\t\t\t<key>Type</key>\n\t\t\t<string>PSGroupSpecifier</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>FooterText</key>\n\t\t\t<string>Copyright (c) 2009-2015 Matej Bukovinski\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.</string>\n\t\t\t<key>License</key>\n\t\t\t<string>MIT</string>\n\t\t\t<key>Title</key>\n\t\t\t<string>MBProgressHUD</string>\n\t\t\t<key>Type</key>\n\t\t\t<string>PSGroupSpecifier</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>FooterText</key>\n\t\t\t<string>\n  LICENSE ISSUES\n  ==============\n\n  The OpenSSL toolkit stays under a dual license, i.e. both the conditions of\n  the OpenSSL License and the original SSLeay license apply to the toolkit.\n  See below for the actual license texts. Actually both licenses are BSD-style\n  Open Source licenses. In case of any license issues related to OpenSSL\n  please contact openssl-core@openssl.org.\n\n  OpenSSL License\n  ---------------\n\n/* ====================================================================\n * Copyright (c) 1998-2008 The OpenSSL Project.  All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n *\n * 1. Redistributions of source code must retain the above copyright\n *    notice, this list of conditions and the following disclaimer. \n *\n * 2. Redistributions in binary form must reproduce the above copyright\n *    notice, this list of conditions and the following disclaimer in\n *    the documentation and/or other materials provided with the\n *    distribution.\n *\n * 3. All advertising materials mentioning features or use of this\n *    software must display the following acknowledgment:\n *    \"This product includes software developed by the OpenSSL Project\n *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)\"\n *\n * 4. The names \"OpenSSL Toolkit\" and \"OpenSSL Project\" must not be used to\n *    endorse or promote products derived from this software without\n *    prior written permission. For written permission, please contact\n *    openssl-core@openssl.org.\n *\n * 5. Products derived from this software may not be called \"OpenSSL\"\n *    nor may \"OpenSSL\" appear in their names without prior written\n *    permission of the OpenSSL Project.\n *\n * 6. Redistributions of any form whatsoever must retain the following\n *    acknowledgment:\n *    \"This product includes software developed by the OpenSSL Project\n *    for use in the OpenSSL Toolkit (http://www.openssl.org/)\"\n *\n * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY\n * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\n * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR\n * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,\n * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED\n * OF THE POSSIBILITY OF SUCH DAMAGE.\n * ====================================================================\n *\n * This product includes cryptographic software written by Eric Young\n * (eay@cryptsoft.com).  This product includes software written by Tim\n * Hudson (tjh@cryptsoft.com).\n *\n */\n\n Original SSLeay License\n -----------------------\n\n/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)\n * All rights reserved.\n *\n * This package is an SSL implementation written\n * by Eric Young (eay@cryptsoft.com).\n * The implementation was written so as to conform with Netscapes SSL.\n * \n * This library is free for commercial and non-commercial use as long as\n * the following conditions are aheared to.  The following conditions\n * apply to all code found in this distribution, be it the RC4, RSA,\n * lhash, DES, etc., code; not just the SSL code.  The SSL documentation\n * included with this distribution is covered by the same copyright terms\n * except that the holder is Tim Hudson (tjh@cryptsoft.com).\n * \n * Copyright remains Eric Young's, and as such any Copyright notices in\n * the code are not to be removed.\n * If this package is used in a product, Eric Young should be given attribution\n * as the author of the parts of the library used.\n * This can be in the form of a textual message at program startup or\n * in documentation (online or textual) provided with the package.\n * \n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n * 1. Redistributions of source code must retain the copyright\n *    notice, this list of conditions and the following disclaimer.\n * 2. Redistributions in binary form must reproduce the above copyright\n *    notice, this list of conditions and the following disclaimer in the\n *    documentation and/or other materials provided with the distribution.\n * 3. All advertising materials mentioning features or use of this software\n *    must display the following acknowledgement:\n *    \"This product includes cryptographic software written by\n *     Eric Young (eay@cryptsoft.com)\"\n *    The word 'cryptographic' can be left out if the rouines from the library\n *    being used are not cryptographic related :-).\n * 4. If you include any Windows specific code (or a derivative thereof) from \n *    the apps directory (application code) you must include an acknowledgement:\n *    \"This product includes software written by Tim Hudson (tjh@cryptsoft.com)\"\n * \n * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND\n * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE\n * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n * SUCH DAMAGE.\n * \n * The licence and distribution terms for any publically available version or\n * derivative of this code cannot be changed.  i.e. this code cannot simply be\n * copied and put under another distribution licence\n * [including the GNU Public Licence.]\n */\n\n</string>\n\t\t\t<key>License</key>\n\t\t\t<string>OpenSSL (OpenSSL/SSLeay)</string>\n\t\t\t<key>Title</key>\n\t\t\t<string>OpenSSL-Universal</string>\n\t\t\t<key>Type</key>\n\t\t\t<string>PSGroupSpecifier</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>FooterText</key>\n\t\t\t<string>This code is licensed under the MIT License:\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n</string>\n\t\t\t<key>License</key>\n\t\t\t<string>MIT</string>\n\t\t\t<key>Title</key>\n\t\t\t<string>RNCryptor</string>\n\t\t\t<key>Type</key>\n\t\t\t<string>PSGroupSpecifier</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>FooterText</key>\n\t\t\t<string>The MIT License (MIT)\n\nCopyright (c) 2014 William Falcon\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n\n</string>\n\t\t\t<key>License</key>\n\t\t\t<string>MIT</string>\n\t\t\t<key>Title</key>\n\t\t\t<string>SwiftTryCatch</string>\n\t\t\t<key>Type</key>\n\t\t\t<string>PSGroupSpecifier</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>FooterText</key>\n\t\t\t<string>## License\r\nIt is also appreciated if you let the original developers know if you're using this in a commercial project. Please tweet @iRareMedia, or send us an email (contact[at]iraremedia.com).\r\n\r\nThe MIT License (MIT)\r\n\r\nCopyright (c) 2015 iRare Media\r\n\r\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\r\n\r\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\r\nSOFTWARE.</string>\n\t\t\t<key>License</key>\n\t\t\t<string>MIT</string>\n\t\t\t<key>Title</key>\n\t\t\t<string>iCloudDocumentSync</string>\n\t\t\t<key>Type</key>\n\t\t\t<string>PSGroupSpecifier</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>FooterText</key>\n\t\t\t<string>Generated by CocoaPods - https://cocoapods.org</string>\n\t\t\t<key>Title</key>\n\t\t\t<string></string>\n\t\t\t<key>Type</key>\n\t\t\t<string>PSGroupSpecifier</string>\n\t\t</dict>\n\t</array>\n\t<key>StringsTable</key>\n\t<string>Acknowledgements</string>\n\t<key>Title</key>\n\t<string>Acknowledgements</string>\n</dict>\n</plist>\n"
  },
  {
    "path": "Pods/Target Support Files/Pods-ArcBit/Pods-ArcBit-dummy.m",
    "content": "#import <Foundation/Foundation.h>\n@interface PodsDummy_Pods_ArcBit : NSObject\n@end\n@implementation PodsDummy_Pods_ArcBit\n@end\n"
  },
  {
    "path": "Pods/Target Support Files/Pods-ArcBit/Pods-ArcBit-frameworks.sh",
    "content": "#!/bin/sh\nset -e\n\necho \"mkdir -p ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}\"\nmkdir -p \"${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}\"\n\nSWIFT_STDLIB_PATH=\"${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}\"\n\n# This protects against multiple targets copying the same framework dependency at the same time. The solution\n# was originally proposed here: https://lists.samba.org/archive/rsync/2008-February/020158.html\nRSYNC_PROTECT_TMP_FILES=(--filter \"P .*.??????\")\n\ninstall_framework()\n{\n  if [ -r \"${BUILT_PRODUCTS_DIR}/$1\" ]; then\n    local source=\"${BUILT_PRODUCTS_DIR}/$1\"\n  elif [ -r \"${BUILT_PRODUCTS_DIR}/$(basename \"$1\")\" ]; then\n    local source=\"${BUILT_PRODUCTS_DIR}/$(basename \"$1\")\"\n  elif [ -r \"$1\" ]; then\n    local source=\"$1\"\n  fi\n\n  local destination=\"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}\"\n\n  if [ -L \"${source}\" ]; then\n      echo \"Symlinked...\"\n      source=\"$(readlink \"${source}\")\"\n  fi\n\n  # Use filter instead of exclude so missing patterns don't throw errors.\n  echo \"rsync --delete -av \"${RSYNC_PROTECT_TMP_FILES[@]}\" --filter \\\"- CVS/\\\" --filter \\\"- .svn/\\\" --filter \\\"- .git/\\\" --filter \\\"- .hg/\\\" --filter \\\"- Headers\\\" --filter \\\"- PrivateHeaders\\\" --filter \\\"- Modules\\\" \\\"${source}\\\" \\\"${destination}\\\"\"\n  rsync --delete -av \"${RSYNC_PROTECT_TMP_FILES[@]}\" --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${destination}\"\n\n  local basename\n  basename=\"$(basename -s .framework \"$1\")\"\n  binary=\"${destination}/${basename}.framework/${basename}\"\n  if ! [ -r \"$binary\" ]; then\n    binary=\"${destination}/${basename}\"\n  fi\n\n  # Strip invalid architectures so \"fat\" simulator / device frameworks work on device\n  if [[ \"$(file \"$binary\")\" == *\"dynamically linked shared library\"* ]]; then\n    strip_invalid_archs \"$binary\"\n  fi\n\n  # Resign the code if required by the build settings to avoid unstable apps\n  code_sign_if_enabled \"${destination}/$(basename \"$1\")\"\n\n  # Embed linked Swift runtime libraries. No longer necessary as of Xcode 7.\n  if [ \"${XCODE_VERSION_MAJOR}\" -lt 7 ]; then\n    local swift_runtime_libs\n    swift_runtime_libs=$(xcrun otool -LX \"$binary\" | grep --color=never @rpath/libswift | sed -E s/@rpath\\\\/\\(.+dylib\\).*/\\\\1/g | uniq -u  && exit ${PIPESTATUS[0]})\n    for lib in $swift_runtime_libs; do\n      echo \"rsync -auv \\\"${SWIFT_STDLIB_PATH}/${lib}\\\" \\\"${destination}\\\"\"\n      rsync -auv \"${SWIFT_STDLIB_PATH}/${lib}\" \"${destination}\"\n      code_sign_if_enabled \"${destination}/${lib}\"\n    done\n  fi\n}\n\n# Copies the dSYM of a vendored framework\ninstall_dsym() {\n  local source=\"$1\"\n  if [ -r \"$source\" ]; then\n    echo \"rsync --delete -av \"${RSYNC_PROTECT_TMP_FILES[@]}\" --filter \\\"- CVS/\\\" --filter \\\"- .svn/\\\" --filter \\\"- .git/\\\" --filter \\\"- .hg/\\\" --filter \\\"- Headers\\\" --filter \\\"- PrivateHeaders\\\" --filter \\\"- Modules\\\" \\\"${source}\\\" \\\"${DWARF_DSYM_FOLDER_PATH}\\\"\"\n    rsync --delete -av \"${RSYNC_PROTECT_TMP_FILES[@]}\" --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${DWARF_DSYM_FOLDER_PATH}\"\n  fi\n}\n\n# Signs a framework with the provided identity\ncode_sign_if_enabled() {\n  if [ -n \"${EXPANDED_CODE_SIGN_IDENTITY}\" -a \"${CODE_SIGNING_REQUIRED}\" != \"NO\" -a \"${CODE_SIGNING_ALLOWED}\" != \"NO\" ]; then\n    # Use the current code_sign_identitiy\n    echo \"Code Signing $1 with Identity ${EXPANDED_CODE_SIGN_IDENTITY_NAME}\"\n    local code_sign_cmd=\"/usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} ${OTHER_CODE_SIGN_FLAGS} --preserve-metadata=identifier,entitlements '$1'\"\n\n    if [ \"${COCOAPODS_PARALLEL_CODE_SIGN}\" == \"true\" ]; then\n      code_sign_cmd=\"$code_sign_cmd &\"\n    fi\n    echo \"$code_sign_cmd\"\n    eval \"$code_sign_cmd\"\n  fi\n}\n\n# Strip invalid architectures\nstrip_invalid_archs() {\n  binary=\"$1\"\n  # Get architectures for current file\n  archs=\"$(lipo -info \"$binary\" | rev | cut -d ':' -f1 | rev)\"\n  stripped=\"\"\n  for arch in $archs; do\n    if ! [[ \"${ARCHS}\" == *\"$arch\"* ]]; then\n      # Strip non-valid architectures in-place\n      lipo -remove \"$arch\" -output \"$binary\" \"$binary\" || exit 1\n      stripped=\"$stripped $arch\"\n    fi\n  done\n  if [[ \"$stripped\" ]]; then\n    echo \"Stripped $binary of architectures:$stripped\"\n  fi\n}\n\nif [ \"${COCOAPODS_PARALLEL_CODE_SIGN}\" == \"true\" ]; then\n  wait\nfi\n"
  },
  {
    "path": "Pods/Target Support Files/Pods-ArcBit/Pods-ArcBit-resources.sh",
    "content": "#!/bin/sh\nset -e\n\nmkdir -p \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}\"\n\nRESOURCES_TO_COPY=${PODS_ROOT}/resources-to-copy-${TARGETNAME}.txt\n> \"$RESOURCES_TO_COPY\"\n\nXCASSET_FILES=()\n\n# This protects against multiple targets copying the same framework dependency at the same time. The solution\n# was originally proposed here: https://lists.samba.org/archive/rsync/2008-February/020158.html\nRSYNC_PROTECT_TMP_FILES=(--filter \"P .*.??????\")\n\ncase \"${TARGETED_DEVICE_FAMILY}\" in\n  1,2)\n    TARGET_DEVICE_ARGS=\"--target-device ipad --target-device iphone\"\n    ;;\n  1)\n    TARGET_DEVICE_ARGS=\"--target-device iphone\"\n    ;;\n  2)\n    TARGET_DEVICE_ARGS=\"--target-device ipad\"\n    ;;\n  3)\n    TARGET_DEVICE_ARGS=\"--target-device tv\"\n    ;;\n  4)\n    TARGET_DEVICE_ARGS=\"--target-device watch\"\n    ;;\n  *)\n    TARGET_DEVICE_ARGS=\"--target-device mac\"\n    ;;\nesac\n\ninstall_resource()\n{\n  if [[ \"$1\" = /* ]] ; then\n    RESOURCE_PATH=\"$1\"\n  else\n    RESOURCE_PATH=\"${PODS_ROOT}/$1\"\n  fi\n  if [[ ! -e \"$RESOURCE_PATH\" ]] ; then\n    cat << EOM\nerror: Resource \"$RESOURCE_PATH\" not found. Run 'pod install' to update the copy resources script.\nEOM\n    exit 1\n  fi\n  case $RESOURCE_PATH in\n    *.storyboard)\n      echo \"ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \\\"$RESOURCE_PATH\\\" .storyboard`.storyboardc $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}\" || true\n      ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \\\"$RESOURCE_PATH\\\" .storyboard`.storyboardc\" \"$RESOURCE_PATH\" --sdk \"${SDKROOT}\" ${TARGET_DEVICE_ARGS}\n      ;;\n    *.xib)\n      echo \"ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \\\"$RESOURCE_PATH\\\" .xib`.nib $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}\" || true\n      ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \\\"$RESOURCE_PATH\\\" .xib`.nib\" \"$RESOURCE_PATH\" --sdk \"${SDKROOT}\" ${TARGET_DEVICE_ARGS}\n      ;;\n    *.framework)\n      echo \"mkdir -p ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}\" || true\n      mkdir -p \"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}\"\n      echo \"rsync --delete -av \"${RSYNC_PROTECT_TMP_FILES[@]}\" $RESOURCE_PATH ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}\" || true\n      rsync --delete -av \"${RSYNC_PROTECT_TMP_FILES[@]}\" \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}\"\n      ;;\n    *.xcdatamodel)\n      echo \"xcrun momc \\\"$RESOURCE_PATH\\\" \\\"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\"`.mom\\\"\" || true\n      xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xcdatamodel`.mom\"\n      ;;\n    *.xcdatamodeld)\n      echo \"xcrun momc \\\"$RESOURCE_PATH\\\" \\\"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xcdatamodeld`.momd\\\"\" || true\n      xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xcdatamodeld`.momd\"\n      ;;\n    *.xcmappingmodel)\n      echo \"xcrun mapc \\\"$RESOURCE_PATH\\\" \\\"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xcmappingmodel`.cdm\\\"\" || true\n      xcrun mapc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xcmappingmodel`.cdm\"\n      ;;\n    *.xcassets)\n      ABSOLUTE_XCASSET_FILE=\"$RESOURCE_PATH\"\n      XCASSET_FILES+=(\"$ABSOLUTE_XCASSET_FILE\")\n      ;;\n    *)\n      echo \"$RESOURCE_PATH\" || true\n      echo \"$RESOURCE_PATH\" >> \"$RESOURCES_TO_COPY\"\n      ;;\n  esac\n}\n\nmkdir -p \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}\"\nrsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from=\"$RESOURCES_TO_COPY\" / \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}\"\nif [[ \"${ACTION}\" == \"install\" ]] && [[ \"${SKIP_INSTALL}\" == \"NO\" ]]; then\n  mkdir -p \"${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}\"\n  rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from=\"$RESOURCES_TO_COPY\" / \"${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}\"\nfi\nrm -f \"$RESOURCES_TO_COPY\"\n\nif [[ -n \"${WRAPPER_EXTENSION}\" ]] && [ \"`xcrun --find actool`\" ] && [ -n \"$XCASSET_FILES\" ]\nthen\n  # Find all other xcassets (this unfortunately includes those of path pods and other targets).\n  OTHER_XCASSETS=$(find \"$PWD\" -iname \"*.xcassets\" -type d)\n  while read line; do\n    if [[ $line != \"${PODS_ROOT}*\" ]]; then\n      XCASSET_FILES+=(\"$line\")\n    fi\n  done <<<\"$OTHER_XCASSETS\"\n\n  printf \"%s\\0\" \"${XCASSET_FILES[@]}\" | xargs -0 xcrun actool --output-format human-readable-text --notices --warnings --platform \"${PLATFORM_NAME}\" --minimum-deployment-target \"${!DEPLOYMENT_TARGET_SETTING_NAME}\" ${TARGET_DEVICE_ARGS} --compress-pngs --compile \"${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}\"\nfi\n"
  },
  {
    "path": "Pods/Target Support Files/Pods-ArcBit/Pods-ArcBit.debug.xcconfig",
    "content": "FRAMEWORK_SEARCH_PATHS = $(inherited) \"${PODS_ROOT}/Crashlytics/iOS\" \"${PODS_ROOT}/Fabric/iOS\"\nGCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1\nHEADER_SEARCH_PATHS = $(inherited) \"${PODS_ROOT}/Headers/Public\" \"${PODS_ROOT}/Headers/Public/AFNetworking\" \"${PODS_ROOT}/Headers/Public/CoreBitcoin\" \"${PODS_ROOT}/Headers/Public/Crashlytics\" \"${PODS_ROOT}/Headers/Public/ECSlidingViewController\" \"${PODS_ROOT}/Headers/Public/Fabric\" \"${PODS_ROOT}/Headers/Public/ISO8601DateFormatter\" \"${PODS_ROOT}/Headers/Public/MBProgressHUD\" \"${PODS_ROOT}/Headers/Public/OpenSSL-Universal\" \"${PODS_ROOT}/Headers/Public/RNCryptor\" \"${PODS_ROOT}/Headers/Public/SwiftTryCatch\" \"${PODS_ROOT}/Headers/Public/iCloudDocumentSync\"\nLIBRARY_SEARCH_PATHS = $(inherited) \"$PODS_CONFIGURATION_BUILD_DIR/AFNetworking\" \"$PODS_CONFIGURATION_BUILD_DIR/CoreBitcoin\" \"$PODS_CONFIGURATION_BUILD_DIR/ECSlidingViewController\" \"$PODS_CONFIGURATION_BUILD_DIR/ISO8601DateFormatter\" \"$PODS_CONFIGURATION_BUILD_DIR/MBProgressHUD\" \"$PODS_CONFIGURATION_BUILD_DIR/RNCryptor\" \"$PODS_CONFIGURATION_BUILD_DIR/SwiftTryCatch\" \"$PODS_CONFIGURATION_BUILD_DIR/iCloudDocumentSync\" \"${PODS_ROOT}/OpenSSL-Universal/lib-ios\"\nOTHER_CFLAGS = $(inherited) -isystem \"${PODS_ROOT}/Headers/Public\" -isystem \"${PODS_ROOT}/Headers/Public/AFNetworking\" -isystem \"${PODS_ROOT}/Headers/Public/CoreBitcoin\" -isystem \"${PODS_ROOT}/Headers/Public/Crashlytics\" -isystem \"${PODS_ROOT}/Headers/Public/ECSlidingViewController\" -isystem \"${PODS_ROOT}/Headers/Public/Fabric\" -isystem \"${PODS_ROOT}/Headers/Public/ISO8601DateFormatter\" -isystem \"${PODS_ROOT}/Headers/Public/MBProgressHUD\" -isystem \"${PODS_ROOT}/Headers/Public/OpenSSL-Universal\" -isystem \"${PODS_ROOT}/Headers/Public/RNCryptor\" -isystem \"${PODS_ROOT}/Headers/Public/SwiftTryCatch\" -isystem \"${PODS_ROOT}/Headers/Public/iCloudDocumentSync\"\nOTHER_LDFLAGS = $(inherited) -ObjC -l\"AFNetworking\" -l\"CoreBitcoin\" -l\"ECSlidingViewController\" -l\"ISO8601DateFormatter\" -l\"MBProgressHUD\" -l\"RNCryptor\" -l\"SwiftTryCatch\" -l\"c++\" -l\"crypto\" -l\"iCloudDocumentSync\" -l\"ssl\" -l\"z\" -framework \"CoreGraphics\" -framework \"Crashlytics\" -framework \"Fabric\" -framework \"Foundation\" -framework \"MobileCoreServices\" -framework \"Security\" -framework \"SystemConfiguration\" -framework \"UIKit\"\nPODS_BUILD_DIR = $BUILD_DIR\nPODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)\nPODS_PODFILE_DIR_PATH = ${SRCROOT}/.\nPODS_ROOT = ${SRCROOT}/Pods\n"
  },
  {
    "path": "Pods/Target Support Files/Pods-ArcBit/Pods-ArcBit.release.xcconfig",
    "content": "FRAMEWORK_SEARCH_PATHS = $(inherited) \"${PODS_ROOT}/Crashlytics/iOS\" \"${PODS_ROOT}/Fabric/iOS\"\nGCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1\nHEADER_SEARCH_PATHS = $(inherited) \"${PODS_ROOT}/Headers/Public\" \"${PODS_ROOT}/Headers/Public/AFNetworking\" \"${PODS_ROOT}/Headers/Public/CoreBitcoin\" \"${PODS_ROOT}/Headers/Public/Crashlytics\" \"${PODS_ROOT}/Headers/Public/ECSlidingViewController\" \"${PODS_ROOT}/Headers/Public/Fabric\" \"${PODS_ROOT}/Headers/Public/ISO8601DateFormatter\" \"${PODS_ROOT}/Headers/Public/MBProgressHUD\" \"${PODS_ROOT}/Headers/Public/OpenSSL-Universal\" \"${PODS_ROOT}/Headers/Public/RNCryptor\" \"${PODS_ROOT}/Headers/Public/SwiftTryCatch\" \"${PODS_ROOT}/Headers/Public/iCloudDocumentSync\"\nLIBRARY_SEARCH_PATHS = $(inherited) \"$PODS_CONFIGURATION_BUILD_DIR/AFNetworking\" \"$PODS_CONFIGURATION_BUILD_DIR/CoreBitcoin\" \"$PODS_CONFIGURATION_BUILD_DIR/ECSlidingViewController\" \"$PODS_CONFIGURATION_BUILD_DIR/ISO8601DateFormatter\" \"$PODS_CONFIGURATION_BUILD_DIR/MBProgressHUD\" \"$PODS_CONFIGURATION_BUILD_DIR/RNCryptor\" \"$PODS_CONFIGURATION_BUILD_DIR/SwiftTryCatch\" \"$PODS_CONFIGURATION_BUILD_DIR/iCloudDocumentSync\" \"${PODS_ROOT}/OpenSSL-Universal/lib-ios\"\nOTHER_CFLAGS = $(inherited) -isystem \"${PODS_ROOT}/Headers/Public\" -isystem \"${PODS_ROOT}/Headers/Public/AFNetworking\" -isystem \"${PODS_ROOT}/Headers/Public/CoreBitcoin\" -isystem \"${PODS_ROOT}/Headers/Public/Crashlytics\" -isystem \"${PODS_ROOT}/Headers/Public/ECSlidingViewController\" -isystem \"${PODS_ROOT}/Headers/Public/Fabric\" -isystem \"${PODS_ROOT}/Headers/Public/ISO8601DateFormatter\" -isystem \"${PODS_ROOT}/Headers/Public/MBProgressHUD\" -isystem \"${PODS_ROOT}/Headers/Public/OpenSSL-Universal\" -isystem \"${PODS_ROOT}/Headers/Public/RNCryptor\" -isystem \"${PODS_ROOT}/Headers/Public/SwiftTryCatch\" -isystem \"${PODS_ROOT}/Headers/Public/iCloudDocumentSync\"\nOTHER_LDFLAGS = $(inherited) -ObjC -l\"AFNetworking\" -l\"CoreBitcoin\" -l\"ECSlidingViewController\" -l\"ISO8601DateFormatter\" -l\"MBProgressHUD\" -l\"RNCryptor\" -l\"SwiftTryCatch\" -l\"c++\" -l\"crypto\" -l\"iCloudDocumentSync\" -l\"ssl\" -l\"z\" -framework \"CoreGraphics\" -framework \"Crashlytics\" -framework \"Fabric\" -framework \"Foundation\" -framework \"MobileCoreServices\" -framework \"Security\" -framework \"SystemConfiguration\" -framework \"UIKit\"\nPODS_BUILD_DIR = $BUILD_DIR\nPODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)\nPODS_PODFILE_DIR_PATH = ${SRCROOT}/.\nPODS_ROOT = ${SRCROOT}/Pods\n"
  },
  {
    "path": "Pods/Target Support Files/Pods-ArcBitTests/Pods-ArcBitTests-acknowledgements.markdown",
    "content": "# Acknowledgements\nThis application makes use of the following third party libraries:\n\n## AFNetworking\n\nCopyright (c) 2013-2015 AFNetworking (http://afnetworking.com/)\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n\n\n## CoreBitcoin\n\n           DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE\n                   Version 2, December 2004\n\nCopyright (C) 2014 Oleg Andreev <oleganza@gmail.com>\n\nEveryone is permitted to copy and distribute verbatim or modified\ncopies of this license document, and changing it is allowed as long\nas the name is changed.\n\n           DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE\n  TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION\n\n 0. You just DO WHAT THE FUCK YOU WANT TO.\n\n\n## Crashlytics\n\nFabric: Copyright 2016 Twitter, Inc. All Rights Reserved. Use of this software is subject to the terms and conditions of the Fabric Software and Services Agreement located at https://fabric.io/terms. Crashlytics Kit: Copyright 2016 Crashlytics, Inc. All Rights Reserved. Use of this software is subject to the terms and conditions of the Crashlytics Terms of Service located at http://try.crashlytics.com/terms/terms-of-service.pdf and the Crashlytics Privacy Policy located at http://try.crashlytics.com/terms/privacy-policy.pdf. OSS: http://get.fabric.io/terms/opensource.txt\n\n## ECSlidingViewController\n\nCopyright (c) 2013 Mike Enriquez <mike@enriquez.me>\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n\n\n## Fabric\n\nFabric: Copyright 2016 Twitter, Inc. All Rights Reserved. Use of this software is subject to the terms and conditions of the Fabric Software and Services Agreement located at https://fabric.io/terms. OSS: http://get.fabric.io/terms/opensource.txt\n\n## ISO8601DateFormatter\n\nCopyright © 2006–2013 Peter Hosey\n All rights reserved.\n\nRedistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:\nRedistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.\nRedistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.\nNeither the name of Peter Hosey nor the names of his contributors may be used to endorse or promote products derived from this software without specific prior written permission.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\n\n## MBProgressHUD\n\nCopyright (c) 2009-2015 Matej Bukovinski\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n\n## OpenSSL-Universal\n\n\n  LICENSE ISSUES\n  ==============\n\n  The OpenSSL toolkit stays under a dual license, i.e. both the conditions of\n  the OpenSSL License and the original SSLeay license apply to the toolkit.\n  See below for the actual license texts. Actually both licenses are BSD-style\n  Open Source licenses. In case of any license issues related to OpenSSL\n  please contact openssl-core@openssl.org.\n\n  OpenSSL License\n  ---------------\n\n/* ====================================================================\n * Copyright (c) 1998-2008 The OpenSSL Project.  All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n *\n * 1. Redistributions of source code must retain the above copyright\n *    notice, this list of conditions and the following disclaimer. \n *\n * 2. Redistributions in binary form must reproduce the above copyright\n *    notice, this list of conditions and the following disclaimer in\n *    the documentation and/or other materials provided with the\n *    distribution.\n *\n * 3. All advertising materials mentioning features or use of this\n *    software must display the following acknowledgment:\n *    \"This product includes software developed by the OpenSSL Project\n *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)\"\n *\n * 4. The names \"OpenSSL Toolkit\" and \"OpenSSL Project\" must not be used to\n *    endorse or promote products derived from this software without\n *    prior written permission. For written permission, please contact\n *    openssl-core@openssl.org.\n *\n * 5. Products derived from this software may not be called \"OpenSSL\"\n *    nor may \"OpenSSL\" appear in their names without prior written\n *    permission of the OpenSSL Project.\n *\n * 6. Redistributions of any form whatsoever must retain the following\n *    acknowledgment:\n *    \"This product includes software developed by the OpenSSL Project\n *    for use in the OpenSSL Toolkit (http://www.openssl.org/)\"\n *\n * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY\n * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\n * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR\n * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,\n * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED\n * OF THE POSSIBILITY OF SUCH DAMAGE.\n * ====================================================================\n *\n * This product includes cryptographic software written by Eric Young\n * (eay@cryptsoft.com).  This product includes software written by Tim\n * Hudson (tjh@cryptsoft.com).\n *\n */\n\n Original SSLeay License\n -----------------------\n\n/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)\n * All rights reserved.\n *\n * This package is an SSL implementation written\n * by Eric Young (eay@cryptsoft.com).\n * The implementation was written so as to conform with Netscapes SSL.\n * \n * This library is free for commercial and non-commercial use as long as\n * the following conditions are aheared to.  The following conditions\n * apply to all code found in this distribution, be it the RC4, RSA,\n * lhash, DES, etc., code; not just the SSL code.  The SSL documentation\n * included with this distribution is covered by the same copyright terms\n * except that the holder is Tim Hudson (tjh@cryptsoft.com).\n * \n * Copyright remains Eric Young's, and as such any Copyright notices in\n * the code are not to be removed.\n * If this package is used in a product, Eric Young should be given attribution\n * as the author of the parts of the library used.\n * This can be in the form of a textual message at program startup or\n * in documentation (online or textual) provided with the package.\n * \n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n * 1. Redistributions of source code must retain the copyright\n *    notice, this list of conditions and the following disclaimer.\n * 2. Redistributions in binary form must reproduce the above copyright\n *    notice, this list of conditions and the following disclaimer in the\n *    documentation and/or other materials provided with the distribution.\n * 3. All advertising materials mentioning features or use of this software\n *    must display the following acknowledgement:\n *    \"This product includes cryptographic software written by\n *     Eric Young (eay@cryptsoft.com)\"\n *    The word 'cryptographic' can be left out if the rouines from the library\n *    being used are not cryptographic related :-).\n * 4. If you include any Windows specific code (or a derivative thereof) from \n *    the apps directory (application code) you must include an acknowledgement:\n *    \"This product includes software written by Tim Hudson (tjh@cryptsoft.com)\"\n * \n * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND\n * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE\n * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n * SUCH DAMAGE.\n * \n * The licence and distribution terms for any publically available version or\n * derivative of this code cannot be changed.  i.e. this code cannot simply be\n * copied and put under another distribution licence\n * [including the GNU Public Licence.]\n */\n\n\n\n## RNCryptor\n\nThis code is licensed under the MIT License:\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n\n## SwiftTryCatch\n\nThe MIT License (MIT)\n\nCopyright (c) 2014 William Falcon\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n\n\n\n## iCloudDocumentSync\n\n## License\r\nIt is also appreciated if you let the original developers know if you're using this in a commercial project. Please tweet @iRareMedia, or send us an email (contact[at]iraremedia.com).\r\n\r\nThe MIT License (MIT)\r\n\r\nCopyright (c) 2015 iRare Media\r\n\r\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\r\n\r\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\r\nSOFTWARE.\nGenerated by CocoaPods - https://cocoapods.org\n"
  },
  {
    "path": "Pods/Target Support Files/Pods-ArcBitTests/Pods-ArcBitTests-acknowledgements.plist",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\n<plist version=\"1.0\">\n<dict>\n\t<key>PreferenceSpecifiers</key>\n\t<array>\n\t\t<dict>\n\t\t\t<key>FooterText</key>\n\t\t\t<string>This application makes use of the following third party libraries:</string>\n\t\t\t<key>Title</key>\n\t\t\t<string>Acknowledgements</string>\n\t\t\t<key>Type</key>\n\t\t\t<string>PSGroupSpecifier</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>FooterText</key>\n\t\t\t<string>Copyright (c) 2013-2015 AFNetworking (http://afnetworking.com/)\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n</string>\n\t\t\t<key>License</key>\n\t\t\t<string>MIT</string>\n\t\t\t<key>Title</key>\n\t\t\t<string>AFNetworking</string>\n\t\t\t<key>Type</key>\n\t\t\t<string>PSGroupSpecifier</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>FooterText</key>\n\t\t\t<string>           DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE\n                   Version 2, December 2004\n\nCopyright (C) 2014 Oleg Andreev &lt;oleganza@gmail.com&gt;\n\nEveryone is permitted to copy and distribute verbatim or modified\ncopies of this license document, and changing it is allowed as long\nas the name is changed.\n\n           DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE\n  TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION\n\n 0. You just DO WHAT THE FUCK YOU WANT TO.\n</string>\n\t\t\t<key>License</key>\n\t\t\t<string>WTFPL</string>\n\t\t\t<key>Title</key>\n\t\t\t<string>CoreBitcoin</string>\n\t\t\t<key>Type</key>\n\t\t\t<string>PSGroupSpecifier</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>FooterText</key>\n\t\t\t<string>Fabric: Copyright 2016 Twitter, Inc. All Rights Reserved. Use of this software is subject to the terms and conditions of the Fabric Software and Services Agreement located at https://fabric.io/terms. Crashlytics Kit: Copyright 2016 Crashlytics, Inc. All Rights Reserved. Use of this software is subject to the terms and conditions of the Crashlytics Terms of Service located at http://try.crashlytics.com/terms/terms-of-service.pdf and the Crashlytics Privacy Policy located at http://try.crashlytics.com/terms/privacy-policy.pdf. OSS: http://get.fabric.io/terms/opensource.txt</string>\n\t\t\t<key>License</key>\n\t\t\t<string>Commercial</string>\n\t\t\t<key>Title</key>\n\t\t\t<string>Crashlytics</string>\n\t\t\t<key>Type</key>\n\t\t\t<string>PSGroupSpecifier</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>FooterText</key>\n\t\t\t<string>Copyright (c) 2013 Mike Enriquez &lt;mike@enriquez.me&gt;\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n</string>\n\t\t\t<key>License</key>\n\t\t\t<string>MIT</string>\n\t\t\t<key>Title</key>\n\t\t\t<string>ECSlidingViewController</string>\n\t\t\t<key>Type</key>\n\t\t\t<string>PSGroupSpecifier</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>FooterText</key>\n\t\t\t<string>Fabric: Copyright 2016 Twitter, Inc. All Rights Reserved. Use of this software is subject to the terms and conditions of the Fabric Software and Services Agreement located at https://fabric.io/terms. OSS: http://get.fabric.io/terms/opensource.txt</string>\n\t\t\t<key>License</key>\n\t\t\t<string>Commercial</string>\n\t\t\t<key>Title</key>\n\t\t\t<string>Fabric</string>\n\t\t\t<key>Type</key>\n\t\t\t<string>PSGroupSpecifier</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>FooterText</key>\n\t\t\t<string>Copyright © 2006–2013 Peter Hosey\n All rights reserved.\n\nRedistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:\nRedistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.\nRedistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.\nNeither the name of Peter Hosey nor the names of his contributors may be used to endorse or promote products derived from this software without specific prior written permission.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n</string>\n\t\t\t<key>License</key>\n\t\t\t<string>BSD</string>\n\t\t\t<key>Title</key>\n\t\t\t<string>ISO8601DateFormatter</string>\n\t\t\t<key>Type</key>\n\t\t\t<string>PSGroupSpecifier</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>FooterText</key>\n\t\t\t<string>Copyright (c) 2009-2015 Matej Bukovinski\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.</string>\n\t\t\t<key>License</key>\n\t\t\t<string>MIT</string>\n\t\t\t<key>Title</key>\n\t\t\t<string>MBProgressHUD</string>\n\t\t\t<key>Type</key>\n\t\t\t<string>PSGroupSpecifier</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>FooterText</key>\n\t\t\t<string>\n  LICENSE ISSUES\n  ==============\n\n  The OpenSSL toolkit stays under a dual license, i.e. both the conditions of\n  the OpenSSL License and the original SSLeay license apply to the toolkit.\n  See below for the actual license texts. Actually both licenses are BSD-style\n  Open Source licenses. In case of any license issues related to OpenSSL\n  please contact openssl-core@openssl.org.\n\n  OpenSSL License\n  ---------------\n\n/* ====================================================================\n * Copyright (c) 1998-2008 The OpenSSL Project.  All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n *\n * 1. Redistributions of source code must retain the above copyright\n *    notice, this list of conditions and the following disclaimer. \n *\n * 2. Redistributions in binary form must reproduce the above copyright\n *    notice, this list of conditions and the following disclaimer in\n *    the documentation and/or other materials provided with the\n *    distribution.\n *\n * 3. All advertising materials mentioning features or use of this\n *    software must display the following acknowledgment:\n *    \"This product includes software developed by the OpenSSL Project\n *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)\"\n *\n * 4. The names \"OpenSSL Toolkit\" and \"OpenSSL Project\" must not be used to\n *    endorse or promote products derived from this software without\n *    prior written permission. For written permission, please contact\n *    openssl-core@openssl.org.\n *\n * 5. Products derived from this software may not be called \"OpenSSL\"\n *    nor may \"OpenSSL\" appear in their names without prior written\n *    permission of the OpenSSL Project.\n *\n * 6. Redistributions of any form whatsoever must retain the following\n *    acknowledgment:\n *    \"This product includes software developed by the OpenSSL Project\n *    for use in the OpenSSL Toolkit (http://www.openssl.org/)\"\n *\n * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY\n * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\n * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR\n * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,\n * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED\n * OF THE POSSIBILITY OF SUCH DAMAGE.\n * ====================================================================\n *\n * This product includes cryptographic software written by Eric Young\n * (eay@cryptsoft.com).  This product includes software written by Tim\n * Hudson (tjh@cryptsoft.com).\n *\n */\n\n Original SSLeay License\n -----------------------\n\n/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)\n * All rights reserved.\n *\n * This package is an SSL implementation written\n * by Eric Young (eay@cryptsoft.com).\n * The implementation was written so as to conform with Netscapes SSL.\n * \n * This library is free for commercial and non-commercial use as long as\n * the following conditions are aheared to.  The following conditions\n * apply to all code found in this distribution, be it the RC4, RSA,\n * lhash, DES, etc., code; not just the SSL code.  The SSL documentation\n * included with this distribution is covered by the same copyright terms\n * except that the holder is Tim Hudson (tjh@cryptsoft.com).\n * \n * Copyright remains Eric Young's, and as such any Copyright notices in\n * the code are not to be removed.\n * If this package is used in a product, Eric Young should be given attribution\n * as the author of the parts of the library used.\n * This can be in the form of a textual message at program startup or\n * in documentation (online or textual) provided with the package.\n * \n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n * 1. Redistributions of source code must retain the copyright\n *    notice, this list of conditions and the following disclaimer.\n * 2. Redistributions in binary form must reproduce the above copyright\n *    notice, this list of conditions and the following disclaimer in the\n *    documentation and/or other materials provided with the distribution.\n * 3. All advertising materials mentioning features or use of this software\n *    must display the following acknowledgement:\n *    \"This product includes cryptographic software written by\n *     Eric Young (eay@cryptsoft.com)\"\n *    The word 'cryptographic' can be left out if the rouines from the library\n *    being used are not cryptographic related :-).\n * 4. If you include any Windows specific code (or a derivative thereof) from \n *    the apps directory (application code) you must include an acknowledgement:\n *    \"This product includes software written by Tim Hudson (tjh@cryptsoft.com)\"\n * \n * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND\n * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE\n * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n * SUCH DAMAGE.\n * \n * The licence and distribution terms for any publically available version or\n * derivative of this code cannot be changed.  i.e. this code cannot simply be\n * copied and put under another distribution licence\n * [including the GNU Public Licence.]\n */\n\n</string>\n\t\t\t<key>License</key>\n\t\t\t<string>OpenSSL (OpenSSL/SSLeay)</string>\n\t\t\t<key>Title</key>\n\t\t\t<string>OpenSSL-Universal</string>\n\t\t\t<key>Type</key>\n\t\t\t<string>PSGroupSpecifier</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>FooterText</key>\n\t\t\t<string>This code is licensed under the MIT License:\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n</string>\n\t\t\t<key>License</key>\n\t\t\t<string>MIT</string>\n\t\t\t<key>Title</key>\n\t\t\t<string>RNCryptor</string>\n\t\t\t<key>Type</key>\n\t\t\t<string>PSGroupSpecifier</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>FooterText</key>\n\t\t\t<string>The MIT License (MIT)\n\nCopyright (c) 2014 William Falcon\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n\n</string>\n\t\t\t<key>License</key>\n\t\t\t<string>MIT</string>\n\t\t\t<key>Title</key>\n\t\t\t<string>SwiftTryCatch</string>\n\t\t\t<key>Type</key>\n\t\t\t<string>PSGroupSpecifier</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>FooterText</key>\n\t\t\t<string>## License\r\nIt is also appreciated if you let the original developers know if you're using this in a commercial project. Please tweet @iRareMedia, or send us an email (contact[at]iraremedia.com).\r\n\r\nThe MIT License (MIT)\r\n\r\nCopyright (c) 2015 iRare Media\r\n\r\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\r\n\r\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\r\nSOFTWARE.</string>\n\t\t\t<key>License</key>\n\t\t\t<string>MIT</string>\n\t\t\t<key>Title</key>\n\t\t\t<string>iCloudDocumentSync</string>\n\t\t\t<key>Type</key>\n\t\t\t<string>PSGroupSpecifier</string>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>FooterText</key>\n\t\t\t<string>Generated by CocoaPods - https://cocoapods.org</string>\n\t\t\t<key>Title</key>\n\t\t\t<string></string>\n\t\t\t<key>Type</key>\n\t\t\t<string>PSGroupSpecifier</string>\n\t\t</dict>\n\t</array>\n\t<key>StringsTable</key>\n\t<string>Acknowledgements</string>\n\t<key>Title</key>\n\t<string>Acknowledgements</string>\n</dict>\n</plist>\n"
  },
  {
    "path": "Pods/Target Support Files/Pods-ArcBitTests/Pods-ArcBitTests-dummy.m",
    "content": "#import <Foundation/Foundation.h>\n@interface PodsDummy_Pods_ArcBitTests : NSObject\n@end\n@implementation PodsDummy_Pods_ArcBitTests\n@end\n"
  },
  {
    "path": "Pods/Target Support Files/Pods-ArcBitTests/Pods-ArcBitTests-frameworks.sh",
    "content": "#!/bin/sh\nset -e\n\necho \"mkdir -p ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}\"\nmkdir -p \"${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}\"\n\nSWIFT_STDLIB_PATH=\"${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}\"\n\n# This protects against multiple targets copying the same framework dependency at the same time. The solution\n# was originally proposed here: https://lists.samba.org/archive/rsync/2008-February/020158.html\nRSYNC_PROTECT_TMP_FILES=(--filter \"P .*.??????\")\n\ninstall_framework()\n{\n  if [ -r \"${BUILT_PRODUCTS_DIR}/$1\" ]; then\n    local source=\"${BUILT_PRODUCTS_DIR}/$1\"\n  elif [ -r \"${BUILT_PRODUCTS_DIR}/$(basename \"$1\")\" ]; then\n    local source=\"${BUILT_PRODUCTS_DIR}/$(basename \"$1\")\"\n  elif [ -r \"$1\" ]; then\n    local source=\"$1\"\n  fi\n\n  local destination=\"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}\"\n\n  if [ -L \"${source}\" ]; then\n      echo \"Symlinked...\"\n      source=\"$(readlink \"${source}\")\"\n  fi\n\n  # Use filter instead of exclude so missing patterns don't throw errors.\n  echo \"rsync --delete -av \"${RSYNC_PROTECT_TMP_FILES[@]}\" --filter \\\"- CVS/\\\" --filter \\\"- .svn/\\\" --filter \\\"- .git/\\\" --filter \\\"- .hg/\\\" --filter \\\"- Headers\\\" --filter \\\"- PrivateHeaders\\\" --filter \\\"- Modules\\\" \\\"${source}\\\" \\\"${destination}\\\"\"\n  rsync --delete -av \"${RSYNC_PROTECT_TMP_FILES[@]}\" --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${destination}\"\n\n  local basename\n  basename=\"$(basename -s .framework \"$1\")\"\n  binary=\"${destination}/${basename}.framework/${basename}\"\n  if ! [ -r \"$binary\" ]; then\n    binary=\"${destination}/${basename}\"\n  fi\n\n  # Strip invalid architectures so \"fat\" simulator / device frameworks work on device\n  if [[ \"$(file \"$binary\")\" == *\"dynamically linked shared library\"* ]]; then\n    strip_invalid_archs \"$binary\"\n  fi\n\n  # Resign the code if required by the build settings to avoid unstable apps\n  code_sign_if_enabled \"${destination}/$(basename \"$1\")\"\n\n  # Embed linked Swift runtime libraries. No longer necessary as of Xcode 7.\n  if [ \"${XCODE_VERSION_MAJOR}\" -lt 7 ]; then\n    local swift_runtime_libs\n    swift_runtime_libs=$(xcrun otool -LX \"$binary\" | grep --color=never @rpath/libswift | sed -E s/@rpath\\\\/\\(.+dylib\\).*/\\\\1/g | uniq -u  && exit ${PIPESTATUS[0]})\n    for lib in $swift_runtime_libs; do\n      echo \"rsync -auv \\\"${SWIFT_STDLIB_PATH}/${lib}\\\" \\\"${destination}\\\"\"\n      rsync -auv \"${SWIFT_STDLIB_PATH}/${lib}\" \"${destination}\"\n      code_sign_if_enabled \"${destination}/${lib}\"\n    done\n  fi\n}\n\n# Copies the dSYM of a vendored framework\ninstall_dsym() {\n  local source=\"$1\"\n  if [ -r \"$source\" ]; then\n    echo \"rsync --delete -av \"${RSYNC_PROTECT_TMP_FILES[@]}\" --filter \\\"- CVS/\\\" --filter \\\"- .svn/\\\" --filter \\\"- .git/\\\" --filter \\\"- .hg/\\\" --filter \\\"- Headers\\\" --filter \\\"- PrivateHeaders\\\" --filter \\\"- Modules\\\" \\\"${source}\\\" \\\"${DWARF_DSYM_FOLDER_PATH}\\\"\"\n    rsync --delete -av \"${RSYNC_PROTECT_TMP_FILES[@]}\" --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${DWARF_DSYM_FOLDER_PATH}\"\n  fi\n}\n\n# Signs a framework with the provided identity\ncode_sign_if_enabled() {\n  if [ -n \"${EXPANDED_CODE_SIGN_IDENTITY}\" -a \"${CODE_SIGNING_REQUIRED}\" != \"NO\" -a \"${CODE_SIGNING_ALLOWED}\" != \"NO\" ]; then\n    # Use the current code_sign_identitiy\n    echo \"Code Signing $1 with Identity ${EXPANDED_CODE_SIGN_IDENTITY_NAME}\"\n    local code_sign_cmd=\"/usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} ${OTHER_CODE_SIGN_FLAGS} --preserve-metadata=identifier,entitlements '$1'\"\n\n    if [ \"${COCOAPODS_PARALLEL_CODE_SIGN}\" == \"true\" ]; then\n      code_sign_cmd=\"$code_sign_cmd &\"\n    fi\n    echo \"$code_sign_cmd\"\n    eval \"$code_sign_cmd\"\n  fi\n}\n\n# Strip invalid architectures\nstrip_invalid_archs() {\n  binary=\"$1\"\n  # Get architectures for current file\n  archs=\"$(lipo -info \"$binary\" | rev | cut -d ':' -f1 | rev)\"\n  stripped=\"\"\n  for arch in $archs; do\n    if ! [[ \"${ARCHS}\" == *\"$arch\"* ]]; then\n      # Strip non-valid architectures in-place\n      lipo -remove \"$arch\" -output \"$binary\" \"$binary\" || exit 1\n      stripped=\"$stripped $arch\"\n    fi\n  done\n  if [[ \"$stripped\" ]]; then\n    echo \"Stripped $binary of architectures:$stripped\"\n  fi\n}\n\nif [ \"${COCOAPODS_PARALLEL_CODE_SIGN}\" == \"true\" ]; then\n  wait\nfi\n"
  },
  {
    "path": "Pods/Target Support Files/Pods-ArcBitTests/Pods-ArcBitTests-resources.sh",
    "content": "#!/bin/sh\nset -e\n\nmkdir -p \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}\"\n\nRESOURCES_TO_COPY=${PODS_ROOT}/resources-to-copy-${TARGETNAME}.txt\n> \"$RESOURCES_TO_COPY\"\n\nXCASSET_FILES=()\n\n# This protects against multiple targets copying the same framework dependency at the same time. The solution\n# was originally proposed here: https://lists.samba.org/archive/rsync/2008-February/020158.html\nRSYNC_PROTECT_TMP_FILES=(--filter \"P .*.??????\")\n\ncase \"${TARGETED_DEVICE_FAMILY}\" in\n  1,2)\n    TARGET_DEVICE_ARGS=\"--target-device ipad --target-device iphone\"\n    ;;\n  1)\n    TARGET_DEVICE_ARGS=\"--target-device iphone\"\n    ;;\n  2)\n    TARGET_DEVICE_ARGS=\"--target-device ipad\"\n    ;;\n  3)\n    TARGET_DEVICE_ARGS=\"--target-device tv\"\n    ;;\n  4)\n    TARGET_DEVICE_ARGS=\"--target-device watch\"\n    ;;\n  *)\n    TARGET_DEVICE_ARGS=\"--target-device mac\"\n    ;;\nesac\n\ninstall_resource()\n{\n  if [[ \"$1\" = /* ]] ; then\n    RESOURCE_PATH=\"$1\"\n  else\n    RESOURCE_PATH=\"${PODS_ROOT}/$1\"\n  fi\n  if [[ ! -e \"$RESOURCE_PATH\" ]] ; then\n    cat << EOM\nerror: Resource \"$RESOURCE_PATH\" not found. Run 'pod install' to update the copy resources script.\nEOM\n    exit 1\n  fi\n  case $RESOURCE_PATH in\n    *.storyboard)\n      echo \"ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \\\"$RESOURCE_PATH\\\" .storyboard`.storyboardc $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}\" || true\n      ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \\\"$RESOURCE_PATH\\\" .storyboard`.storyboardc\" \"$RESOURCE_PATH\" --sdk \"${SDKROOT}\" ${TARGET_DEVICE_ARGS}\n      ;;\n    *.xib)\n      echo \"ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \\\"$RESOURCE_PATH\\\" .xib`.nib $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}\" || true\n      ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \\\"$RESOURCE_PATH\\\" .xib`.nib\" \"$RESOURCE_PATH\" --sdk \"${SDKROOT}\" ${TARGET_DEVICE_ARGS}\n      ;;\n    *.framework)\n      echo \"mkdir -p ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}\" || true\n      mkdir -p \"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}\"\n      echo \"rsync --delete -av \"${RSYNC_PROTECT_TMP_FILES[@]}\" $RESOURCE_PATH ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}\" || true\n      rsync --delete -av \"${RSYNC_PROTECT_TMP_FILES[@]}\" \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}\"\n      ;;\n    *.xcdatamodel)\n      echo \"xcrun momc \\\"$RESOURCE_PATH\\\" \\\"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\"`.mom\\\"\" || true\n      xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xcdatamodel`.mom\"\n      ;;\n    *.xcdatamodeld)\n      echo \"xcrun momc \\\"$RESOURCE_PATH\\\" \\\"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xcdatamodeld`.momd\\\"\" || true\n      xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xcdatamodeld`.momd\"\n      ;;\n    *.xcmappingmodel)\n      echo \"xcrun mapc \\\"$RESOURCE_PATH\\\" \\\"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xcmappingmodel`.cdm\\\"\" || true\n      xcrun mapc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xcmappingmodel`.cdm\"\n      ;;\n    *.xcassets)\n      ABSOLUTE_XCASSET_FILE=\"$RESOURCE_PATH\"\n      XCASSET_FILES+=(\"$ABSOLUTE_XCASSET_FILE\")\n      ;;\n    *)\n      echo \"$RESOURCE_PATH\" || true\n      echo \"$RESOURCE_PATH\" >> \"$RESOURCES_TO_COPY\"\n      ;;\n  esac\n}\n\nmkdir -p \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}\"\nrsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from=\"$RESOURCES_TO_COPY\" / \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}\"\nif [[ \"${ACTION}\" == \"install\" ]] && [[ \"${SKIP_INSTALL}\" == \"NO\" ]]; then\n  mkdir -p \"${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}\"\n  rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from=\"$RESOURCES_TO_COPY\" / \"${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}\"\nfi\nrm -f \"$RESOURCES_TO_COPY\"\n\nif [[ -n \"${WRAPPER_EXTENSION}\" ]] && [ \"`xcrun --find actool`\" ] && [ -n \"$XCASSET_FILES\" ]\nthen\n  # Find all other xcassets (this unfortunately includes those of path pods and other targets).\n  OTHER_XCASSETS=$(find \"$PWD\" -iname \"*.xcassets\" -type d)\n  while read line; do\n    if [[ $line != \"${PODS_ROOT}*\" ]]; then\n      XCASSET_FILES+=(\"$line\")\n    fi\n  done <<<\"$OTHER_XCASSETS\"\n\n  printf \"%s\\0\" \"${XCASSET_FILES[@]}\" | xargs -0 xcrun actool --output-format human-readable-text --notices --warnings --platform \"${PLATFORM_NAME}\" --minimum-deployment-target \"${!DEPLOYMENT_TARGET_SETTING_NAME}\" ${TARGET_DEVICE_ARGS} --compress-pngs --compile \"${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}\"\nfi\n"
  },
  {
    "path": "Pods/Target Support Files/Pods-ArcBitTests/Pods-ArcBitTests.debug.xcconfig",
    "content": "FRAMEWORK_SEARCH_PATHS = $(inherited) \"${PODS_ROOT}/Crashlytics/iOS\" \"${PODS_ROOT}/Fabric/iOS\"\nGCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1\nHEADER_SEARCH_PATHS = $(inherited) \"${PODS_ROOT}/Headers/Public\" \"${PODS_ROOT}/Headers/Public/AFNetworking\" \"${PODS_ROOT}/Headers/Public/CoreBitcoin\" \"${PODS_ROOT}/Headers/Public/Crashlytics\" \"${PODS_ROOT}/Headers/Public/ECSlidingViewController\" \"${PODS_ROOT}/Headers/Public/Fabric\" \"${PODS_ROOT}/Headers/Public/ISO8601DateFormatter\" \"${PODS_ROOT}/Headers/Public/MBProgressHUD\" \"${PODS_ROOT}/Headers/Public/OpenSSL-Universal\" \"${PODS_ROOT}/Headers/Public/RNCryptor\" \"${PODS_ROOT}/Headers/Public/SwiftTryCatch\" \"${PODS_ROOT}/Headers/Public/iCloudDocumentSync\"\nLIBRARY_SEARCH_PATHS = $(inherited) \"$PODS_CONFIGURATION_BUILD_DIR/AFNetworking\" \"$PODS_CONFIGURATION_BUILD_DIR/CoreBitcoin\" \"$PODS_CONFIGURATION_BUILD_DIR/ECSlidingViewController\" \"$PODS_CONFIGURATION_BUILD_DIR/ISO8601DateFormatter\" \"$PODS_CONFIGURATION_BUILD_DIR/MBProgressHUD\" \"$PODS_CONFIGURATION_BUILD_DIR/RNCryptor\" \"$PODS_CONFIGURATION_BUILD_DIR/SwiftTryCatch\" \"$PODS_CONFIGURATION_BUILD_DIR/iCloudDocumentSync\" \"${PODS_ROOT}/OpenSSL-Universal/lib-ios\"\nOTHER_CFLAGS = $(inherited) -isystem \"${PODS_ROOT}/Headers/Public\" -isystem \"${PODS_ROOT}/Headers/Public/AFNetworking\" -isystem \"${PODS_ROOT}/Headers/Public/CoreBitcoin\" -isystem \"${PODS_ROOT}/Headers/Public/Crashlytics\" -isystem \"${PODS_ROOT}/Headers/Public/ECSlidingViewController\" -isystem \"${PODS_ROOT}/Headers/Public/Fabric\" -isystem \"${PODS_ROOT}/Headers/Public/ISO8601DateFormatter\" -isystem \"${PODS_ROOT}/Headers/Public/MBProgressHUD\" -isystem \"${PODS_ROOT}/Headers/Public/OpenSSL-Universal\" -isystem \"${PODS_ROOT}/Headers/Public/RNCryptor\" -isystem \"${PODS_ROOT}/Headers/Public/SwiftTryCatch\" -isystem \"${PODS_ROOT}/Headers/Public/iCloudDocumentSync\"\nOTHER_LDFLAGS = $(inherited) -ObjC -l\"AFNetworking\" -l\"CoreBitcoin\" -l\"ECSlidingViewController\" -l\"ISO8601DateFormatter\" -l\"MBProgressHUD\" -l\"RNCryptor\" -l\"SwiftTryCatch\" -l\"c++\" -l\"crypto\" -l\"iCloudDocumentSync\" -l\"ssl\" -l\"z\" -framework \"CoreGraphics\" -framework \"Crashlytics\" -framework \"Fabric\" -framework \"Foundation\" -framework \"MobileCoreServices\" -framework \"Security\" -framework \"SystemConfiguration\" -framework \"UIKit\"\nPODS_BUILD_DIR = $BUILD_DIR\nPODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)\nPODS_PODFILE_DIR_PATH = ${SRCROOT}/.\nPODS_ROOT = ${SRCROOT}/Pods\n"
  },
  {
    "path": "Pods/Target Support Files/Pods-ArcBitTests/Pods-ArcBitTests.release.xcconfig",
    "content": "FRAMEWORK_SEARCH_PATHS = $(inherited) \"${PODS_ROOT}/Crashlytics/iOS\" \"${PODS_ROOT}/Fabric/iOS\"\nGCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1\nHEADER_SEARCH_PATHS = $(inherited) \"${PODS_ROOT}/Headers/Public\" \"${PODS_ROOT}/Headers/Public/AFNetworking\" \"${PODS_ROOT}/Headers/Public/CoreBitcoin\" \"${PODS_ROOT}/Headers/Public/Crashlytics\" \"${PODS_ROOT}/Headers/Public/ECSlidingViewController\" \"${PODS_ROOT}/Headers/Public/Fabric\" \"${PODS_ROOT}/Headers/Public/ISO8601DateFormatter\" \"${PODS_ROOT}/Headers/Public/MBProgressHUD\" \"${PODS_ROOT}/Headers/Public/OpenSSL-Universal\" \"${PODS_ROOT}/Headers/Public/RNCryptor\" \"${PODS_ROOT}/Headers/Public/SwiftTryCatch\" \"${PODS_ROOT}/Headers/Public/iCloudDocumentSync\"\nLIBRARY_SEARCH_PATHS = $(inherited) \"$PODS_CONFIGURATION_BUILD_DIR/AFNetworking\" \"$PODS_CONFIGURATION_BUILD_DIR/CoreBitcoin\" \"$PODS_CONFIGURATION_BUILD_DIR/ECSlidingViewController\" \"$PODS_CONFIGURATION_BUILD_DIR/ISO8601DateFormatter\" \"$PODS_CONFIGURATION_BUILD_DIR/MBProgressHUD\" \"$PODS_CONFIGURATION_BUILD_DIR/RNCryptor\" \"$PODS_CONFIGURATION_BUILD_DIR/SwiftTryCatch\" \"$PODS_CONFIGURATION_BUILD_DIR/iCloudDocumentSync\" \"${PODS_ROOT}/OpenSSL-Universal/lib-ios\"\nOTHER_CFLAGS = $(inherited) -isystem \"${PODS_ROOT}/Headers/Public\" -isystem \"${PODS_ROOT}/Headers/Public/AFNetworking\" -isystem \"${PODS_ROOT}/Headers/Public/CoreBitcoin\" -isystem \"${PODS_ROOT}/Headers/Public/Crashlytics\" -isystem \"${PODS_ROOT}/Headers/Public/ECSlidingViewController\" -isystem \"${PODS_ROOT}/Headers/Public/Fabric\" -isystem \"${PODS_ROOT}/Headers/Public/ISO8601DateFormatter\" -isystem \"${PODS_ROOT}/Headers/Public/MBProgressHUD\" -isystem \"${PODS_ROOT}/Headers/Public/OpenSSL-Universal\" -isystem \"${PODS_ROOT}/Headers/Public/RNCryptor\" -isystem \"${PODS_ROOT}/Headers/Public/SwiftTryCatch\" -isystem \"${PODS_ROOT}/Headers/Public/iCloudDocumentSync\"\nOTHER_LDFLAGS = $(inherited) -ObjC -l\"AFNetworking\" -l\"CoreBitcoin\" -l\"ECSlidingViewController\" -l\"ISO8601DateFormatter\" -l\"MBProgressHUD\" -l\"RNCryptor\" -l\"SwiftTryCatch\" -l\"c++\" -l\"crypto\" -l\"iCloudDocumentSync\" -l\"ssl\" -l\"z\" -framework \"CoreGraphics\" -framework \"Crashlytics\" -framework \"Fabric\" -framework \"Foundation\" -framework \"MobileCoreServices\" -framework \"Security\" -framework \"SystemConfiguration\" -framework \"UIKit\"\nPODS_BUILD_DIR = $BUILD_DIR\nPODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)\nPODS_PODFILE_DIR_PATH = ${SRCROOT}/.\nPODS_ROOT = ${SRCROOT}/Pods\n"
  },
  {
    "path": "Pods/Target Support Files/RNCryptor/RNCryptor-dummy.m",
    "content": "#import <Foundation/Foundation.h>\n@interface PodsDummy_RNCryptor : NSObject\n@end\n@implementation PodsDummy_RNCryptor\n@end\n"
  },
  {
    "path": "Pods/Target Support Files/RNCryptor/RNCryptor-prefix.pch",
    "content": "#ifdef __OBJC__\n#import <UIKit/UIKit.h>\n#else\n#ifndef FOUNDATION_EXPORT\n#if defined(__cplusplus)\n#define FOUNDATION_EXPORT extern \"C\"\n#else\n#define FOUNDATION_EXPORT extern\n#endif\n#endif\n#endif\n\n"
  },
  {
    "path": "Pods/Target Support Files/RNCryptor/RNCryptor.xcconfig",
    "content": "CONFIGURATION_BUILD_DIR = $PODS_CONFIGURATION_BUILD_DIR/RNCryptor\nGCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1\nHEADER_SEARCH_PATHS = \"${PODS_ROOT}/Headers/Private\" \"${PODS_ROOT}/Headers/Private/RNCryptor\" \"${PODS_ROOT}/Headers/Public\" \"${PODS_ROOT}/Headers/Public/AFNetworking\" \"${PODS_ROOT}/Headers/Public/CoreBitcoin\" \"${PODS_ROOT}/Headers/Public/Crashlytics\" \"${PODS_ROOT}/Headers/Public/ECSlidingViewController\" \"${PODS_ROOT}/Headers/Public/Fabric\" \"${PODS_ROOT}/Headers/Public/ISO8601DateFormatter\" \"${PODS_ROOT}/Headers/Public/MBProgressHUD\" \"${PODS_ROOT}/Headers/Public/OpenSSL-Universal\" \"${PODS_ROOT}/Headers/Public/RNCryptor\" \"${PODS_ROOT}/Headers/Public/SwiftTryCatch\" \"${PODS_ROOT}/Headers/Public/iCloudDocumentSync\"\nOTHER_LDFLAGS = -framework \"Security\"\nPODS_BUILD_DIR = $BUILD_DIR\nPODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)\nPODS_ROOT = ${SRCROOT}\nPODS_TARGET_SRCROOT = ${PODS_ROOT}/RNCryptor\nPRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier}\nSKIP_INSTALL = YES\n"
  },
  {
    "path": "Pods/Target Support Files/SwiftTryCatch/SwiftTryCatch-dummy.m",
    "content": "#import <Foundation/Foundation.h>\n@interface PodsDummy_SwiftTryCatch : NSObject\n@end\n@implementation PodsDummy_SwiftTryCatch\n@end\n"
  },
  {
    "path": "Pods/Target Support Files/SwiftTryCatch/SwiftTryCatch-prefix.pch",
    "content": "#ifdef __OBJC__\n#import <UIKit/UIKit.h>\n#else\n#ifndef FOUNDATION_EXPORT\n#if defined(__cplusplus)\n#define FOUNDATION_EXPORT extern \"C\"\n#else\n#define FOUNDATION_EXPORT extern\n#endif\n#endif\n#endif\n\n"
  },
  {
    "path": "Pods/Target Support Files/SwiftTryCatch/SwiftTryCatch.xcconfig",
    "content": "CONFIGURATION_BUILD_DIR = $PODS_CONFIGURATION_BUILD_DIR/SwiftTryCatch\nGCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1\nHEADER_SEARCH_PATHS = \"${PODS_ROOT}/Headers/Private\" \"${PODS_ROOT}/Headers/Private/SwiftTryCatch\" \"${PODS_ROOT}/Headers/Public\" \"${PODS_ROOT}/Headers/Public/AFNetworking\" \"${PODS_ROOT}/Headers/Public/CoreBitcoin\" \"${PODS_ROOT}/Headers/Public/Crashlytics\" \"${PODS_ROOT}/Headers/Public/ECSlidingViewController\" \"${PODS_ROOT}/Headers/Public/Fabric\" \"${PODS_ROOT}/Headers/Public/ISO8601DateFormatter\" \"${PODS_ROOT}/Headers/Public/MBProgressHUD\" \"${PODS_ROOT}/Headers/Public/OpenSSL-Universal\" \"${PODS_ROOT}/Headers/Public/RNCryptor\" \"${PODS_ROOT}/Headers/Public/SwiftTryCatch\" \"${PODS_ROOT}/Headers/Public/iCloudDocumentSync\"\nPODS_BUILD_DIR = $BUILD_DIR\nPODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)\nPODS_ROOT = ${SRCROOT}\nPODS_TARGET_SRCROOT = ${PODS_ROOT}/SwiftTryCatch\nPRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier}\nSKIP_INSTALL = YES\n"
  },
  {
    "path": "Pods/Target Support Files/iCloudDocumentSync/iCloudDocumentSync-dummy.m",
    "content": "#import <Foundation/Foundation.h>\n@interface PodsDummy_iCloudDocumentSync : NSObject\n@end\n@implementation PodsDummy_iCloudDocumentSync\n@end\n"
  },
  {
    "path": "Pods/Target Support Files/iCloudDocumentSync/iCloudDocumentSync-prefix.pch",
    "content": "#ifdef __OBJC__\n#import <UIKit/UIKit.h>\n#else\n#ifndef FOUNDATION_EXPORT\n#if defined(__cplusplus)\n#define FOUNDATION_EXPORT extern \"C\"\n#else\n#define FOUNDATION_EXPORT extern\n#endif\n#endif\n#endif\n\n"
  },
  {
    "path": "Pods/Target Support Files/iCloudDocumentSync/iCloudDocumentSync.xcconfig",
    "content": "CONFIGURATION_BUILD_DIR = $PODS_CONFIGURATION_BUILD_DIR/iCloudDocumentSync\nGCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1\nHEADER_SEARCH_PATHS = \"${PODS_ROOT}/Headers/Private\" \"${PODS_ROOT}/Headers/Private/iCloudDocumentSync\" \"${PODS_ROOT}/Headers/Public\" \"${PODS_ROOT}/Headers/Public/AFNetworking\" \"${PODS_ROOT}/Headers/Public/CoreBitcoin\" \"${PODS_ROOT}/Headers/Public/Crashlytics\" \"${PODS_ROOT}/Headers/Public/ECSlidingViewController\" \"${PODS_ROOT}/Headers/Public/Fabric\" \"${PODS_ROOT}/Headers/Public/ISO8601DateFormatter\" \"${PODS_ROOT}/Headers/Public/MBProgressHUD\" \"${PODS_ROOT}/Headers/Public/OpenSSL-Universal\" \"${PODS_ROOT}/Headers/Public/RNCryptor\" \"${PODS_ROOT}/Headers/Public/SwiftTryCatch\" \"${PODS_ROOT}/Headers/Public/iCloudDocumentSync\"\nOTHER_LDFLAGS = -framework \"Foundation\" -framework \"UIKit\"\nPODS_BUILD_DIR = $BUILD_DIR\nPODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)\nPODS_ROOT = ${SRCROOT}\nPODS_TARGET_SRCROOT = ${PODS_ROOT}/iCloudDocumentSync\nPRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier}\nSKIP_INSTALL = YES\n"
  },
  {
    "path": "Pods/iCloudDocumentSync/LICENSE.md",
    "content": "## License\r\nIt is also appreciated if you let the original developers know if you're using this in a commercial project. Please tweet @iRareMedia, or send us an email (contact[at]iraremedia.com).\r\n\r\nThe MIT License (MIT)\r\n\r\nCopyright (c) 2015 iRare Media\r\n\r\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\r\n\r\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\r\nSOFTWARE."
  },
  {
    "path": "Pods/iCloudDocumentSync/README.md",
    "content": "<img width=725 src=\"https://raw.githubusercontent.com/iRareMedia/iCloudDocumentSync/master/iCloud%20App%20-%20iOS/CloudBanner.png\"/>\r\n\r\niCloud Document Sync makes it easy for developers to integrate the iCloud document storage APIs into iOS applications. This is how iCloud document-storage and management should've been out of the box from Apple. Integrate iCloud into iOS (OS X coming soon) Objective-C document projects with one-line code methods. Sync, upload, manage, and remove documents to and from iCloud with only  a few lines of code (compared to the hundreds of lines and hours that it usually takes). Get iCloud up and running in your iOS app in only a few minutes.\r\n\r\nIf you like the project, please [star it](https://github.com/iRareMedia/iCloudDocumentSync) on GitHub! Watch the project on GitHub for updates. If you use iCloud Document Sync in your app, send an email to contact[at]iraremedia.com or let us know on Twitter @iRareMedia.\r\n\r\n# Project Features\r\niCloud Document Sync is a great way to use iCloud document storage in your iOS app. Below are a few key project features and highlights.\r\n* Sync, Upload, Read, Write, Share, Save, Remove, and Edit any iCloud document in only one line of code.  \r\n* Just drag and drop the iCloud Framework (`iCloud.framework`) into your project and you can begin using iCloud - no complicated setup  \r\n* Access in-depth documentation with docsets, code comments, and verbose logging  \r\n* Useful delegate methods and properties let you access and manage advanced iCloud features\r\n* Manage any kind of file with iCloud through use of NSData  \r\n* iOS Sample-app to illustrate how easy it is to use iCloud Document Sync\r\n* Frequent updates to the project based on user issues and requests  \r\n* Easily contribute to the project\r\n\r\n## Table of Contents\r\n\r\n* [**Project Information**](#project-information)\r\n  * [Requirements](#requirements)\r\n  * [License](#license)\r\n  * [Contributions](#contributions)\r\n  * [Sample App](#sample-app)\r\n* [**Installation**](#installation)\r\n  * [Cocoapods](#cocoapods-setup)\r\n  * [Framework](#frameworks-setup)\r\n  * [Traditional](#traditional-setup)\r\n  * [Swift Projects](#swift-projects-setup)\r\n* [**Setup**](#setup)\r\n* [**Documentation**](#documentation)\r\n  * [Methods](#methods)\r\n  * [Delegate](#delegate)\r\n\r\n# Project Information\r\nLearn more about the project requirements, licensing, and contributions.\r\n\r\n## Requirements\r\nRequires Xcode 5.0.1+ for use in any iOS Project. Requires a minimum of iOS 6.0 as the deployment target. \r\n\r\n| Current Build Target \t| Earliest Supported Build Target \t| Earliest Compatible Build Target \t|\r\n|:--------------------:\t|:-------------------------------:\t|:--------------------------------:\t|\r\n|       iOS 8.1        \t|            iOS 7.0              \t|             iOS 6.0              \t|\r\n|     Xcode 6.1.1      \t|          Xcode 5.1.1            \t|           Xcode 5.0.1            \t|\r\n|      LLVM 6.0        \t|             LLVM 5.0            \t|             LLVM 5.0             \t|\r\n\r\n> REQUIREMENTS NOTE  \r\n*Supported* means that the library has been tested with this version. *Compatible* means that the library should work on this OS version (i.e. it doesn't rely on any unavailable SDK features) but is no longer being tested for compatibility and may require tweaking or bug fixes to run correctly.\r\n\r\n## License \r\nThis project is licensed under the MIT License. See the [full iCloud Document Sync license here](https://github.com/iRareMedia/iCloudDocumentSync/blob/master/LICENSE.md).\r\n\r\nAttribution is not required, but it appreciated. We have spent a lot of time, energy, and resources working on this project - so a little *Thanks!* (or something to that affect) would be much appreciated. If you use iCloud Document Sync in your app, send an email to contact@iraremedia.com or let us know on Twitter @iRareMedia.\r\n\r\n## Contributions\r\nAny contribution is more than welcome! You can contribute through pull requests and issues on GitHub. Learn more [about contributing to the project here](https://github.com/iRareMedia/iCloudDocumentSync/blob/master/CONTRIBUTING.md).\r\n\r\n## Sample App\r\nThe iOS Sample App included with this project demonstrates how to use many of the features in iCloud Document Sync. You can refer to the sample app for an understanding of how to use and setup iCloud Document Sync. The app should work with iCloud as-is (you may need to provide your own Bundle ID though).\r\n\r\n<img width=700 src=\"https://raw.github.com/iRareMedia/iCloudDocumentSync/master/iCloud%20App%20-%20iOS/AppBanner.png\"/>\r\n\r\n# Installation\r\nAdding iCloud Document Sync to your project is easy. There are multiple ways to add iCloud Document Sync to your project. Choose the process below which best suits your needs. Follow the steps to get everything up and running in only a few minutes.\r\n\r\n### Cocoapods Setup\r\nThe easiest way to install iCloud Document Sync is to use CocoaPods. To do so, simply add the following line to your Podfile:\r\n\r\n    pod iCloudDocumentSync\r\n\r\n### Framework Setup\r\nThe iCloud.framework can be retrieved in two different ways:  \r\n 1. Clone the project to your computer and build the *Framework* target. The `iCloud.framework` file will be copied to the project directory. Drag and drop the `.framework` file into your project.  \r\n 2. Download your preferred iCloud Document Sync Framework release from the [Project Releases](https://github.com/iRareMedia/iCloudDocumentSync/releases) section. Frameworks are available as far back as version 7.0. Unzip then drag and drop the `.framework` file into your project.   \r\n\r\n### Traditional Setup\r\nDrag and drop the *iCloud* folder into your Xcode project. When you do so, check the \"Copy items into destination group's folder\" box. Delete the `iCloud-Prefix.pch` file. \r\n\r\n### Swift Project Setup\r\nTo use iCloud Document Sync in a Swift project, you must create a [bridging header](https://developer.apple.com/library/prerelease/ios/documentation/Swift/Conceptual/BuildingCocoaApps/MixandMatch.html). \r\n\r\nIf you already have a bridging header, simply import `iCloud.h` (use the `#import <iCloud/iCloud.h>` syntax when importing the framework, otherwise use `#import \"iCloud.h\"`). \r\n\r\nIf you do not already have a bridging header, install iCloud Document Sync into your project using any of the above processes. When adding the files to Xcode, you will be prompted to create a bridging header - create one. Then, import iCloud Document Sync (see paragraph above).\r\n\r\n# Setup\r\nAfter installing iCloud Document Sync, it only takes a few lines of code to get it up an running.  \r\n  1. Import iCloud (see relevant install instructions above) to your header file(s).  \r\n  2. Subscribe to the `<iCloudDelegate>` delegate.  \r\n  3. Set the delegate and optionally enable verbose logging:  \r\n   \r\n        [[iCloud sharedCloud] setDelegate:self]; // Set this if you plan to use the delegate\r\n        [[iCloud sharedCloud] setVerboseLogging:YES]; // We want detailed feedback about what's going on with iCloud, this is OFF by default\r\n  4. Setup iCloud when your app starts. It is crucial that you call this method before doing any document handling operations. You can either pass a specific Ubiquity Container ID (see your entitlements file) or `nil` to use the first Ubiquity Container ID in your entitlements.  \r\n\r\n        [[iCloud sharedCloud] setupiCloudDocumentSyncWithUbiquityContainer:nil];   \r\n  5. It is recommended that the first call to `iCloud` is `setDelegate`, this way all subsequent operations and method calls can interact with the delegate and provide appropriate information.\r\n\r\n# Documentation\r\nKey methods, properties, types, and delegate methods available on the iCloud class are documented below. If you're using [Xcode 5](https://developer.apple.com/technologies/tools/whats-new.html) with iCloud Document Sync, documentation is available directly within Xcode (just Option-Click any method for Quick Help). For more advanced documentation please install the docset included with this project. This will allow you to view iCloud Document Sync documentation inside of Xcode's Organizer Window. Additional documentation can also be found on the Wiki page (including how to register your app for iCloud, iCloud fundamentals, etc.).   \r\n\r\n## Methods\r\nThere are many methods available on iCloud Document Sync. The most important / highlight methods are documented below. All other methods are documented in the docset and with in-code comments.\r\n\r\n### Checking for iCloud Availability\r\niCloud Document Sync checks for iCloud availability before performing any iCloud-related operations. Any iCloud Document Sync methods may return prematurely and without warning if iCloud is unavailable. Therefore, you should always check if iCloud is available before performing any iCloud operations.\r\n\r\n    BOOL cloudIsAvailable = [[iCloud sharedCloud] checkCloudAvailability];\r\n    if (cloudIsAvailable) {\r\n        //YES\r\n    }\r\n\r\nThis checks if iCloud is available by looking for the application's ubiquity token. It returns a boolean value; YES if iCloud is available, and NO if it is not. Check the log / documentation for details on why it may not be available. You can also check for the availability of the iCloud ubiquity *container* by calling the following method:\r\n\r\n    BOOL cloudContainerIsAvailable = [[iCloud sharedCloud] checkCloudUbiquityContainer];\r\n\r\nThe `checkCloudAvailability` method will call the `iCloudAvailabilityDidChangeToState: withUbiquityToken: withUbiquityContainer:` delegate method. \r\n\r\n### Syncing Documents\r\nTo get iCloud Document Sync to initialize for the first time, and continue to update when there are changes you'll need to initialize iCloud. By initializing iCloud, it will start syncing with iCloud for the first time and in the future.  \r\n\r\n    [[iCloud sharedCloud] init];\r\n\r\nYou can manually fetch changes from iCloud too:\r\n\r\n    [[iCloud sharedCloud] updateFiles];\r\n\r\niCloud Document Sync will automatically detect changes in iCloud documents. When something changes the delegate method below is fired and will pass an NSMutableArray of all the files (NSMetadata Items) and their names (NSStrings) stored in iCloud.\r\n\r\n    - (void)iCloudFilesDidChange:(NSMutableArray *)files withNewFileNames:(NSMutableArray *)fileNames\r\n\r\n### Uploading Documents\r\niCloud Document Sync uses UIDocument and NSData to store and manage files. All of the heavy lifting with NSData and UIDocument is handled for you. There's no need to actually create or manage any files, just give iCloud Document Sync your data, and the rest is done for you.\r\n\r\nTo create a new document or save and close an existing one, use the method below.\r\n\r\n    [[iCloud sharedCloud] saveAndCloseDocumentWithName:@\"Name.ext\" withContent:[NSData data] completion:^(UIDocument *cloudDocument, NSData *documentData, NSError *error) {\r\n        if (error == nil) {\r\n            // Code here to use the UIDocument or NSData objects which have been passed with the completion handler\r\n        }\r\n    }];\r\n\r\nThe completion handler will be called when a document is saved or created. The completion handler has a UIDocument and NSData parameter that contain the document and it's contents. The third parameter is an NSError that will contain an error if one occurs, otherwise it will be `nil`.\r\n\r\nYou can also upload any documents created while offline, or locally.  Files in the local documents directory that do not already exist in iCloud will be **moved** into iCloud one by one. This process involves lots of file manipulation and as a result it may take a long time. This process will be performed on the background thread to avoid any lag or memory problems. When the upload processes end, the completion block is called on the main thread.\r\n\r\n    [[iCloud sharedCloud] uploadLocalOfflineDocumentsWithRepeatingHandler:^(NSString *fileName, NSError *error) {\r\n        if (error == nil) {\r\n            // This code block is called repeatedly until all files have been uploaded (or an upload has at least been attempted). Code here to use the NSString (the name of the uploaded file) which have been passed with the repeating handler\r\n        }\r\n    } completion:^{\r\n        // Completion handler could be used to tell the user that the upload has completed\r\n    }];\r\n\r\nNote the `repeatingHandler` block. This block is called every-time a local file is uploaded, therefore it may be called multiple times in a short period. The NSError object contains any error information if an error occurred, otherwise it will be nil.\r\n\r\n### Removing Documents\r\nYou can delete documents from iCloud by using the method below. The completion block is called when the file is successfully deleted.\r\n\r\n    [[iCloud sharedCloud] deleteDocumentWithName:@\"docName.ext\" completion:^(NSError *error) {\r\n        // Completion handler could be used to update your UI and tell the user that the document was deleted\r\n    }];\r\n\r\n### Retrieving Documents and Data\r\nYou can open and retrieve a document stored in your iCloud documents directory with the method below. This method will attempt to open the specified document. If the file does not exist, a blank one will be created. The completion handler is called when the file is opened or created (either successfully or not). The completion handler contains a UIDocument, NSData, and NSError all of which contain information about the opened document.\r\n\r\n    [[iCloud sharedCloud] retrieveCloudDocumentWithName:@\"docName.ext\" completion:^(UIDocument *cloudDocument, NSData *documentData, NSError *error) {\r\n    \tif (!error) {\r\n    \t\tNSString *fileName = [cloudDocument.fileURL lastPathComponent];\r\n    \t\tNSData *fileData = documentData;\r\n    \t}\r\n    }];\r\n\r\nFirst check if there was an error retrieving or creating the file, if there wasn't you can proceed to get the file's contents and metadata.\r\n\r\nYou can also check whether or not a file actually exists in iCloud or not by using the method below.\r\n\r\n    BOOL fileExists = [[iCloud sharedCloud] doesFileExistInCloud:@\"docName.ext\"];\r\n    if (fileExists == YES) {\r\n    \t// File Exists in iCloud\r\n    }\r\n\r\n### Sharing Documents\r\nYou can upload an iCloud document to a public URL by using the method below. The completion block is called when the public URL is created.\r\n\r\n    NSURL *publicURL = [[iCloud sharedCloud] shareDocumentWithName:@\"docName.ext\" completion:^(NSURL *sharedURL, NSDate *expirationDate, NSError *error) {\r\n        // Completion handler that passes the public URL created, the expiration date of the URL, and any errors. Could be used to update your UI and tell the user that the document was uploaded\r\n    }];\r\n\r\n### Renaming and Duplicating Documents\r\nRename a document stored in iCloud\r\n\r\n    [[iCloud sharedCloud] renameOriginalDocument:@\"oldName.ext\" withNewName:@\"newName.ext\" completion:^(NSError *error) {\r\n        // Called when renaming is complete\r\n    }];\r\n\r\nDuplicating a document stored in iCloud\r\n\r\n    [[iCloud sharedCloud] duplicateOriginalDocument:@\"docName.ext\" withNewName:@\"docName copy.ext\" completion:^(NSError *error) {\r\n        // Called when duplication is complete\r\n    }];\r\n\r\n### Monitoring Document State\r\niCloud tracks the state of a document when stored in iCloud. Document states include: Normal / Open, Closed, In Conflict, Saving Error, and Editing Disabled (learn more about [UIDocumentState](https://developer.apple.com/library/ios/documentation/uikit/reference/UIDocument_Class/UIDocument/UIDocument.html#//apple_ref/doc/c_ref/UIDocumentState)). Get the current document state of a file stored in iCloud with this method:\r\n\r\n    [[iCloud sharedCloud] documentStateForFile:@\"oldName.ext\" completion:^(UIDocumentState *documentState, NSString *userReadableDocumentState, NSError *error) {\r\n        // Completion handler that passes two parameters, an NSError and a UIDocumentState. The documentState parameter represents the document state that the specified file is currently in (may be nil if the file does not exist). The NSError parameter will contain a 404 error if the file does not exist.\r\n    }];\r\n\r\nMonitor changes in a document's state by subscribing a specific target / selector / method.\r\n\r\n    BOOL success = [[iCloud sharedCloud] monitorDocumentStateForFile:@\"docName.ext\" onTarget:self withSelector:@selector(methodName:)];\r\n\r\nStop monitoring changes in a document's state by removing notifications for a specific target.\r\n\r\n    BOOL success = [[iCloud sharedCloud] stopMonitoringDocumentStateChangesForFile:@\"docName.ext\" onTarget:self];\r\n    \r\n### File Conflict Handling\r\nWhen a document's state changes to *in conflict*, your application should take the appropriate action by resolving the conflict or letting the user resolve the conflict. You can monitor for document state changes with the `monitorDocumentStateForFile:onTarget:withSelector:` method. iCloud Document Sync provides two methods that help handle a conflict with a document stored in iCloud. The first method lets you find all conflicting versions of a file:\r\n\r\n    NSArray *documentVersions = [[iCloud sharedCloud] findUnresolvedConflictingVersionsOfFile:documentName];\r\n\r\nThe array returned contains a list of NSFileVersion objects for the specified file. You can then use this list of file versions to either automatically merge changes or have the user select the correct version. Use the following method to resolve the conflict by submitting the \"correct\" version of the file.\r\n\r\n    [[iCloud sharedCloud] resolveConflictForFile:@\"docName.ext\" withSelectedFileVersion:[NSFileVersion object]];\r\n\r\n\r\n## Delegate\r\niCloud Document Sync delegate methods notify you of the status of iCloud and your documents stored in iCloud. To use the iCloud delegate, subscribe to the `iCloudDelegate` protocol and then set the `delegate` property. To use the iCloudDocument delegate, subscribe to the `iCloudDocumentDelegate` protocol and then set the `delegate` property.\r\n\r\n### iCloud Availability Changed\r\nCalled (automatically by iOS) when the availability of iCloud changes.  The first parameter, `cloudIsAvailable`, is a boolean value that is YES if iCloud is available and NO if iCloud is not available. The second parameter, `ubiquityToken`, is an iCloud ubiquity token that represents the current iCloud identity. Can be used to determine if iCloud is available and if the iCloud account has been changed (ex. if the user logged out and then logged in with a different iCloud account). This object may be nil if iCloud is not available for any reason. The third parameter, `ubiquityContainer`, is the root URL path to the current application's ubiquity container. This URL may be nil until the ubiquity container is initialized.\r\n\r\n    - (void)iCloudAvailabilityDidChangeToState:(BOOL)cloudIsAvailable withUbiquityToken:(id)ubiquityToken withUbiquityContainer:(NSURL *)ubiquityContainer\r\n\r\n### iCloud Files Changed\r\nWhen the files stored in your app's iCloud Document's directory change, this delegate method is called.  The first parameter, `files`, contains an array of NSMetadataItems which can be used to gather information about a file (ex. URL, Name, Dates, etc). The second parameter, `fileNames`, contains an array of the name of each file as NSStrings.\r\n\r\n    - (void)iCloudFilesDidChange:(NSMutableArray *)files withNewFileNames:(NSMutableArray *)fileNames\r\n\r\n### iCloud File Conflict\r\nWhen uploading multiple files to iCloud there is a possibility that files may exist both locally and in iCloud - causing a conflict. iCloud Document Sync can handle most conflict cases and will report the action taken in the log. When iCloud Document Sync can't figure out how to resolve the file conflict (this happens when both the modified date and contents are the same), it will pass the files and relevant information to you using this delegate method.  The delegate method contains two NSDictionaries, one which contains information about the iCloud file, and the other about the local file. Both dictionaries contain the same keys with the same types of objects stored at each key:  \r\n* `fileContent` contains the NSData of the file.\r\n* `fileURL` contains the NSURL pointing to the file. This could possibly be used to gather more information about the file.\r\n* `modifiedDate` contains the NSDate representing the last modified date of the file.\r\n\r\nBelow is the delegate method to be used\r\n\r\n    - (void)iCloudFileConflictBetweenCloudFile:(NSDictionary *)cloudFile andLocalFile:(NSDictionary *)localFile;\r\n\r\n### iCloud Query Parameter\r\nCalled before creating an iCloud Query filter. Specify the type of file to be queried. If this delegate method is not implemented or returns nil, all files stored in the documents directory will be queried. Should return a single file extension formatted (as an NSString) like this: `@\"txt\"`\r\n\r\n    - (NSString *)iCloudQueryLimitedToFileExtension\r\n\r\n### iCloud Document Error\r\nDelegate method fired when an error occurs during an attempt to read, save, or revert a document. This delegate method is only available on the `iCloudDocumentDelegate` with the `iCloudDocument` class. If you implement the iCloudDocument delegate, then you *must* implement this method - it is required.\r\n\r\n    - (void)iCloudDocumentErrorOccured:(NSError *)error\r\n"
  },
  {
    "path": "Pods/iCloudDocumentSync/iCloud/iCloud-Prefix.pch",
    "content": "//\n// Prefix header for all source files of the 'iCloud' target in the 'iCloud' project\n//\n\n#ifdef __OBJC__\n    #import <Foundation/Foundation.h>\n#endif\n"
  },
  {
    "path": "Pods/iCloudDocumentSync/iCloud/iCloud.h",
    "content": "//\n//  iCloud.h\n//  iCloud Document Sync\n//\n//  Created by iRare Media. Last updated January 2015.\n//  Available on GitHub. Licensed under MIT with Attribution.\n//\n\n// Check for Objective-C Modules\n#if __has_feature(objc_modules)\n    // We recommend enabling Objective-C Modules in your project Build Settings for numerous benefits over regular #imports. Read more from the Modules documentation: http://clang.llvm.org/docs/Modules.html\n    @import Foundation;\n    @import UIKit;\n#else\n    #import <Foundation/Foundation.h>\n    #import <UIKit/UIKit.h>\n#endif\n\n// Import iCloudDocument\n#import \"iCloudDocument.h\"\n\n// Ensure that the build is for iOS 6.0 or higher\n#ifndef __IPHONE_6_0\n    #error iCloudDocumentSync is built with features only available is iOS SDK 6.0 and later.\n#endif\n\n// Create a constant for accessing the documents directory\n#define DOCUMENT_DIRECTORY @\"Documents\"\n\n\n/** iCloud Document Sync makes it easy for developers to integrate the iCloud document storage APIs into iOS applications. This is how iCloud document-storage and management should've been out of the box from Apple. Integrate iCloud into iOS (OS X coming soon) Objective-C document projects with one-line code methods. Sync, upload, manage, and remove documents to and from iCloud with only a few lines of code (compared to the hundreds of lines and hours that it usually takes). Get iCloud up and running in your iOS app in only a few minutes. Updates and more details on this project can be found on [GitHub](http://www.github.com/iRareMedia/iCloudDocumentSync). If you like the project, please star it on GitHub!\n \n The `iCloud` class provides methods to integrate iCloud into document projects.\n \n Adding iCloud Document Sync to your project is easy. Follow these steps below to get everything up and running.\n \n 1. Drag the iCloud Framework into your project\n 2. Add `#import <iCloud/iCloud.h>` to your header file(s) iCloud Document Sync\n 3. Subscribe to the `<iCloudDelegate>` delegate.\n 4. Call the following methods to setup iCloud when your app starts:\n \n    [[iCloud sharedCloud] setDelegate:self]; // Set this if you plan to use the delegate\n    [[iCloud sharedCloud] setVerboseLogging:YES]; // We want detailed feedback about what's going on with iCloud, this is OFF by default\n    [[iCloud sharedCloud] updateFiles]; // Force iCloud Update: This is done automatically when changes are made, but we want to make sure the view is always updated when presented\n \n \n @warning Only available on iOS 6.0 and later on apps with valid code signing and entitlements. Requires Xcode 5.0.1 and later. Check the online documentation for more information on setting up iCloud in your app. */\n@class iCloud;\n@protocol iCloudDelegate;\nNS_CLASS_AVAILABLE_IOS(6_0) @interface iCloud : NSObject\n\n\n\n/** @name Singleton */\n\n/** iCloud shared instance object\n @return The shared instance of iCloud */\n+ (instancetype)sharedCloud;\n\n/** Setup iCloud Document Sync and begin the initial document syncing process.\n \n @discussion You \\b must call this method before using iCloud Document Sync to avoid potential issues with syncing. This setup process ensures that all variables are initialized. A preliminary file sync will be performed when this method is called.\n \n @param containerID The fully-qualified container identifier for an iCloud container directory. The string you specify must not contain wildcards and must be of the form <TEAMID>.<CONTAINER>, where <TEAMID> is your development team ID and <CONTAINER> is the bundle identifier of the container you want to access.\n The container identifiers for your app must be declared in the com.apple.developer.ubiquity-container-identifiers array of the .entitlements property list file in your Xcode project.\n If you specify nil for this parameter, this method uses the first container listed in the com.apple.developer.ubiquity-container-identifiers entitlement array. */\n- (void)setupiCloudDocumentSyncWithUbiquityContainer:(NSString *)containerID;\n\n\n\n/** @name Delegate */\n\n/** iCloud Delegate helps call methods when document processes begin or end */\n@property (weak, nonatomic) id <iCloudDelegate> delegate;\n\n\n\n/** @name Properties */\n\n/** The current NSMetadataQuery object */\n@property (strong) NSMetadataQuery *query;\n\n/** A list of iCloud files from the current query */\n@property (strong) NSMutableArray *fileList;\n\n/** A list of iCloud files from the previous query */\n@property (strong) NSMutableArray *previousQueryResults;\n\n/** Enable verbose logging for detailed feedback in the log. Turning this off only prints crucial log notes such as errors. */\n@property BOOL verboseLogging;\n\n/** Enable verbose availability logging for repeated feedback about iCloud availability in the log. Turning this off will prevent availability-related messages from being printed in the log. This property does not relate to the verboseLogging property. */\n@property BOOL verboseAvailabilityLogging;\n\n\n\n/** @name Checking for iCloud */\n\n/** Check whether or not iCloud is available and that it can be accessed. Returns a boolean value.  \n \n @discussion You should always check if iCloud is available before performing any iCloud operations (every method checks to make sure iCloud is available before continuing). Additionally, you may want to check if your users want to opt-in to iCloud on a per-app basis (according to Apple's documentation, you should only ask the user once to opt-in to iCloud). The Return value could be **NO** (iCloud Unavailable) for one or more of the following reasons:\n \n   - iCloud is turned off by the user\n   - The entitlements profile, code signing identity, and/or provisioning profile is invalid\n \n This method uses the ubiquityIdentityToken to check if iCloud is available. The delegate method iCloudAvailabilityDidChangeToState:withUbiquityToken:withUbiquityContainer: can be used to automatically detect changes in the availability of iCloud. A ubiquity token is passed in that method which lets you know if the iCloud account has changed.\n \n @return YES if iCloud is available. NO if iCloud is not available. */\n- (BOOL)checkCloudAvailability;\n\n/** Check that the current application's iCloud Ubiquity Container is available. Returns a boolean value.\n \n @discussion This method may not return immediately, depending on a number of factors. It is not necessary to call this method directly, although it may become useful in certain situations.\n \n @return YES if the iCloud ubiquity container is available. NO if the ubiquity container is not available. */\n- (BOOL)checkCloudUbiquityContainer;\n\n/** Retrieve the current application's ubiquitous root URL\n\n @return An NSURL with the root iCloud Ubiquitous URL for the current app. May return nil if iCloud is not properly setup or available. */\n- (NSURL *)ubiquitousContainerURL;\n\n/** Retrieve the current application's ubiquitous documents directory URL\n \n @warning If iCloud is not properly setup, this method will return the local (non-ubiquitous) documents directory. This may cause other document handling methods to return nil values. Ensure that iCloud is properly setup \\b before calling any document handling methods.\n \n @return An NSURL with the iCloud ubiquitous documents directory URL for the current app. Returns the local documents directory if iCloud is not properly setup or available. */\n- (NSURL *)ubiquitousDocumentsDirectoryURL;\n\n\n\n/** @name Syncing with iCloud */\n\n/** Check for and update the list of files stored in your app's iCloud Documents Folder. This method is automatically called by iOS when there are changes to files in the iCloud Directory. The iCloudFilesDidChange:withNewFileNames: delegate method is triggered by this method. */\n- (void)updateFiles;\n\n\n/** @name Uploading to iCloud */\n\n/** Create, save, and close a document in iCloud.\n \n @discussion First, iCloud Document Sync checks if the specified document exists. If the document exists it is saved and closed. If the document does not exist, it is created then closed.\n \n iCloud Document Sync uses UIDocument and NSData to store and manage files. All of the heavy lifting with NSData and UIDocument is handled for you. There's no need to actually create or manage any files, just give iCloud Document Sync your data, and the rest is done for you.\n \n To create a new document or save an existing one (close the document), use this method. Below is a code example of how to use it.\n \n    [[iCloud sharedCloud] saveAndCloseDocumentWithName:@\"Name.ext\" withContent:[NSData data] completion:^(UIDocument *cloudDocument, NSData *documentData, NSError *error) {\n        if (error == nil) {\n            // Code here to use the UIDocument or NSData objects which have been passed with the completion handler\n        }\n    }];\n \n Documents can be created even if the user is not connected to the internet. The only case in which a document will not be created is when the user has disabled iCloud or if the current application is not setup for iCloud.\n \n @param documentName The name of the document being written to iCloud. This value must not be nil.\n @param content The data to write to the document\n @param handler Code block called when the document is successfully saved. The completion block passes UIDocument and NSData objects containing the saved document and it's contents in the form of NSData. The NSError object contains any error information if an error occurred, otherwise it will be nil. */\n- (void)saveAndCloseDocumentWithName:(NSString *)documentName withContent:(NSData *)content completion:(void (^)(UIDocument *cloudDocument, NSData *documentData, NSError *error))handler __attribute__((nonnull));\n\n/** Upload any local files that weren't created with iCloud\n \n @discussion Files in the local documents directory that do not already exist in iCloud will be **moved** into iCloud one by one. This process involves lots of file manipulation and as a result it may take a long time. This process will be performed on the background thread to avoid any lag or memory problems. When the upload processes end, the completion block is called on the main thread.\n \n    [[iCloud sharedCloud] uploadLocalOfflineDocumentsWithRepeatingHandler:^(NSString *documentName, NSError *error) {\n        if (error == nil) {\n            // This code block is called repeatedly until all files have been uploaded (or an upload has at least been attempted). \n            // Code here to use the NSString (the name of the uploaded file) which have been passed with the repeating handler\n        }\n     } completion:^{\n         // Completion handler could be used to tell the user that the upload has completed\n     }];\n \n This method may call the iCloudFileConflictBetweenCloudFile:andLocalFile: iCloud Delegate method if there is a file conflict.\n \n @param repeatingHandler Code block called after each file is uploaded to iCloud. This block is called every-time a local file is uploaded, therefore it may be called multiple times. The NSError object contains any error information if an error occurred, otherwise it will be nil.\n @param completion Code block called after all files have been uploaded to iCloud. This block is only called once at the end of the method, regardless of any successes or failures that may have occurred during the upload(s). */\n- (void)uploadLocalOfflineDocumentsWithRepeatingHandler:(void (^)(NSString *documentName, NSError *error))repeatingHandler completion:(void (^)(void))completion __attribute__((nonnull (1)));\n\n/** Upload a local file to iCloud\n \n @param documentName The name of the local file stored in the application's documents directory. This value must not be nil.\n @param handler Code block called after the file has been uploaded to iCloud */\n- (void)uploadLocalDocumentToCloudWithName:(NSString *)documentName completion:(void (^)(NSError *error))handler __attribute__((nonnull));\n\n\n\n/** @name Sharing iCloud Content */\n\n/** Share an iCloud document by uploading it to a public URL.\n \n @discussion Upload a document stored in iCloud to a public location on the internet for a limited amount of time.\n \n @param documentName The name of the iCloud file being uploaded to a public URL. This value must not be nil.\n @param handler Code block called when the document is successfully uploaded. The completion block passes NSURL, NSDate, and NSError objects. The NSURL object is the public URL where the file is available at, could be nil. The NSDate object is the date that the URL expires on, could be nil. The NSError object contains any error information if an error occurred, otherwise it will be nil.\n \n @return The public URL where the file is available */\n- (NSURL *)shareDocumentWithName:(NSString *)documentName completion:(void (^)(NSURL *sharedURL, NSDate *expirationDate, NSError *error))handler __attribute__((nonnull));\n\n\n\n/** @name Deleting iCloud Content */\n\n/** Delete a document from iCloud.\n \n @discussion Permanently delete a document stored in iCloud. This will only affect copies of the specified file stored in iCloud, if there is a copy stored locally it will not be affected.\n \n @param documentName The name of the document to delete from iCloud. This value must not be nil.\n @param handler Code block called when a file is successfully deleted from iCloud. The NSError object contains any error information if an error occurred, otherwise it will be nil. */\n- (void)deleteDocumentWithName:(NSString *)documentName completion:(void (^)(NSError *error))handler __attribute__((nonnull (1)));\n\n/** Evict a document from iCloud, move it from iCloud to the current application's local documents directory.\n \n @discussion Remove a document from iCloud storage and move it into the local document's directory. This method may call the iCloudFileConflictBetweenCloudFile:andLocalFile: iCloud Delegate method if there is a file conflict.\n \n @param documentName The name of the iCloud document being downloaded from iCloud to the local documents directory. This value must not be nil.\n @param handler Code block called after the file has been uploaded to iCloud. This value must not be nil. */\n- (void)evictCloudDocumentWithName:(NSString *)documentName completion:(void (^)(NSError *error))handler __attribute__((nonnull));\n\n\n\n/** @name Retrieving iCloud Content and Info */\n\n/** Open a UIDocument stored in iCloud. If the document does not exist, a new blank document will be created using the documentName provided. You can use the doesFileExistInCloud: method to check if a file exists before calling this method.\n \n @discussion This method will attempt to open the specified document. If the file does not exist, a blank one will be created. The completion handler is called when the file is opened or created (either successfully or not). The completion handler contains a UIDocument, NSData, and NSError all of which contain information about the opened document.\n \n    [[iCloud sharedCloud] retrieveCloudDocumentWithName:@\"docName.ext\" completion:^(UIDocument *cloudDocument, NSData *documentData, NSError *error) {\n        if (error == nil) {\n            NSString *documentName = [cloudDocument.fileURL lastPathComponent];\n            NSData *fileData = documentData;\n        }\n     }];\n \n @param documentName The name of the document in iCloud. This value must not be nil.\n @param handler Code block called when the document is successfully retrieved (opened or downloaded). The completion block passes UIDocument and NSData objects containing the opened document and it's contents in the form of NSData. If there is an error, the NSError object will have an error message (may be nil if there is no error). This value must not be nil. */\n- (void)retrieveCloudDocumentWithName:(NSString *)documentName completion:(void (^)(UIDocument *cloudDocument, NSData *documentData, NSError *error))handler __attribute__((nonnull));\n\n/** Get the relevant iCloudDocument object for the specified file\n \n @discussion This method serves a very different purpose from the retrieveCloudDocumentWithName:completion: method. Understand the differences between both methods and ensure that you are using the correct one. This method does not open, create, or save any UIDocuments - it simply returns the iCloudDocument object which you can then use for various purposes.\n \n @param documentName The name of the UIDocument stored in iCloud. This value must not be nil.\n @return An iCloudDocument (UIDocument subclass) object. May return nil if iCloud is unavailable or if an error occurred */\n- (iCloudDocument *)retrieveCloudDocumentObjectWithName:(NSString *)documentName __attribute__((nonnull));\n\n/** Check if a file exists in iCloud\n \n @param documentName The name of the UIDocument in iCloud. This value must not be nil.\n @return BOOL value, YES if the file does exist in iCloud, NO if it does not. May return NO if iCloud is unavailable. */\n- (BOOL)doesFileExistInCloud:(NSString *)documentName __attribute__((nonnull));\n\n/** Get the size of a file stored in iCloud\n \n @param documentName The name of the file in iCloud. This value must not be nil.\n @return The number of bytes in an unsigned long long. Returns nil if the file does not exist. May return a nil value if iCloud is unavailable. */\n- (NSNumber *)fileSize:(NSString *)documentName __attribute__((nonnull));\n\n/** Get the last modified date of a file stored in iCloud\n \n @param documentName The name of the file in iCloud. This value must not be nil.\n @return The date that the file was last modified. Returns nil if the file does not exist. May return a nil value if iCloud is unavailable. */\n- (NSDate *)fileModifiedDate:(NSString *)documentName __attribute__((nonnull));\n\n/** Get the creation date of a file stored in iCloud\n \n @param documentName The name of the file in iCloud. This value must not be nil.\n @return The date that the file was created. Returns nil if the file does not exist. May return a nil value if iCloud is unavailable. */\n- (NSDate *)fileCreatedDate:(NSString *)documentName __attribute__((nonnull));\n\n/** Get a list of files stored in iCloud\n \n @return NSArray with a list of all the files currently stored in your app's iCloud Documents directory. May return a nil value if iCloud is unavailable. */\n- (NSArray *)listCloudFiles;\n\n\n\n/** @name Managing iCloud Content */\n\n/** Rename a document in iCloud\n \n @param documentName The name of the document being renamed in iCloud. The file specified should exist, otherwise an error will occur. This value must not be nil.\n @param newName The new name which the document should be renamed with. The file specified should not exist, otherwise an error will occur. This value must not be nil.\n @param handler Code block called when the document renaming has completed. The completion block passes and NSError object which contains any error information if an error occurred, otherwise it will be nil. */\n- (void)renameOriginalDocument:(NSString *)documentName withNewName:(NSString *)newName completion:(void (^)(NSError *error))handler __attribute__((nonnull));\n\n/** Duplicate a document in iCloud\n \n @param documentName The name of the document being duplicated in iCloud. The file specified should exist, otherwise an error will occur. This value must not be nil.\n @param newName The new name which the document should be duplicated to (usually the same name with the word \"copy\" appended to the end). The file specified should not exist, otherwise an error will occur. This value must not be nil.\n @param handler Code block called when the document duplication has completed. The completion block passes and NSError object which contains any error information if an error occurred, otherwise it will be nil. */\n- (void)duplicateOriginalDocument:(NSString *)documentName withNewName:(NSString *)newName completion:(void (^)(NSError *error))handler __attribute__((nonnull));\n\n\n\n/** @name iCloud Document State */\n\n/** Get the current document state of a file stored in iCloud\n \n @param documentName The name of the file in iCloud. This value must not be nil.\n @param handler Completion handler that passes three parameters, an NSError, NSString and a UIDocumentState. The documentState parameter represents the document state that the specified file is currently in (may be nil if the file does not exist). The userReadableDocumentState parameter is an NSString which succinctly describes the current document state; if the file does not exist, a non-scary error will be displayed. The NSError parameter will contain a 404 error if the file does not exist. */\n- (void)documentStateForFile:(NSString *)documentName completion:(void (^)(UIDocumentState *documentState, NSString *userReadableDocumentState, NSError *error))handler __attribute__((nonnull));\n\n/** Monitor changes in the state of a document stored in iCloud\n \n @param documentName The name of the file in iCloud. This value must not be nil.\n @param sender Object registering as an observer. This value must not be nil.\n @param selector Selector to be called when the document state changes. Must only have one argument, an instance of NSNotifcation whose object is an iCloudDocument (UIDocument subclass). This value must not be nil. \n @return YES if the monitoring was successfully setup, NO if there was an issue setting up the monitoring. */\n- (BOOL)monitorDocumentStateForFile:(NSString *)documentName onTarget:(id)sender withSelector:(SEL)selector __attribute__((nonnull));\n\n/** Stop monitoring changes to the state of a document stored in iCloud\n \n @param documentName The name of the file in iCloud. This value must not be nil.\n @param sender Object registered as an observer that will no longer receive document state updates. This value must not be nil.\n @return YES if the monitoring was successfully setup, NO if there was an issue setting up the monitoring. */\n- (BOOL)stopMonitoringDocumentStateChangesForFile:(NSString *)documentName onTarget:(id)sender __attribute__((nonnull));\n\n\n\n/** @name Resolving iCloud Conflicts */\n\n/** Find all the conflicting versions of a specified document\n \n @param documentName The name of the file in iCloud. This value must not be nil.\n @return An array of NSFileVersion objects, or nil if no such version object exists. */\n- (NSArray *)findUnresolvedConflictingVersionsOfFile:(NSString *)documentName __attribute__((nonnull));\n\n/** Resolve a document conflict for a file stored in iCloud\n \n @abstract Your application can follow one of three strategies for resolving document-version conflicts:\n \n * Merge the changes from the conflicting versions.\n * Choose one of the document versions based on some pertinent factor, such as the version with the latest modification date.\n * Enable the user to view conflicting versions of a document and select the one to use.\n \n @param documentName The name of the file in iCloud. This value must not be nil.\n @param documentVersion The version of the document which should be kept and saved. All other conflicting versions will be removed. */\n- (void)resolveConflictForFile:(NSString *)documentName withSelectedFileVersion:(NSFileVersion *)documentVersion __attribute__((nonnull));\n\n\n\n/** @name Deprecated Methods */\n\n/** DEPRECATED. Use listCloudFiles instead. Get a list of files stored in iCloud\n \n @deprecated Deprecated in version 7.3. Use listCloudFiles instead.\n @return NSArray with a list of all the files currently stored in your app's iCloud Documents directory. May return a nil value if iCloud is unavailable. */\n- (NSArray *)getListOfCloudFiles __attribute((deprecated(\" use listCloudFiles instead.\")));\n\n/** DEPRECATED. Use saveAndCloseDocumentWithName:withContent:completion: instead. Record changes made to a document in iCloud. Changes are saved when the document is closed.\n \n @deprecated Deprecated beginning in version 7.1. Use saveAndCloseDocumentWithName:withContent:completion: instead. This method may become unavailable in a future version.\n \n @param documentName The name of the document being written to iCloud. This value must not be nil.\n @param content The data to write to the document\n @param handler Code block called when the document changes are recorded. The completion block passes UIDocument and NSData objects containing the saved document and it's contents in the form of NSData. The NSError object contains any error information if an error occurred, otherwise it will be nil. */\n- (void)saveChangesToDocumentWithName:(NSString *)documentName withContent:(NSData *)content completion:(void (^)(UIDocument *cloudDocument, NSData *documentData, NSError *error))handler __attribute__((nonnull)) __deprecated;\n\n/** DEPRECATED. Use uploadLocalOfflineDocuments instead, like so: [[iCloud sharedCloud] uploadLocalOfflineDocuments];\n \n @deprecated Deprecated in version 7.0. Use uploadLocalOfflineDocuments instead.\n @param delegate The iCloudDelegate object to be used for delegate notifications */\n+ (void)uploadLocalOfflineDocumentsWithDelegate:(id<iCloudDelegate>)delegate __deprecated;\n\n/** DEPRECATED. Use updateFiles instead, like so: [[iCloud sharedCloud] updateFiles];\n \n @deprecated Deprecated in version 7.0. Use updateFiles instead.\n @param delegate The iCloudDelegate object to be used for delegate notifications */\n+ (void)updateFilesWithDelegate:(id<iCloudDelegate>)delegate __deprecated;\n\n@end\n\n\n@class iCloud;\n/** The iCloudDelegate protocol defines the methods used to receive event notifications and allow for deeper control of the iCloud Class. */\n@protocol iCloudDelegate <NSObject>\n\n\n/** @name Optional Delegate Methods */\n\n@optional\n\n/** Called when the availability of iCloud changes\n \n @param cloudIsAvailable Boolean value that is YES if iCloud is available and NO if iCloud is not available \n @param ubiquityToken An iCloud ubiquity token that represents the current iCloud identity. Can be used to determine if iCloud is available and if the iCloud account has been changed (ex. if the user logged out and then logged in with a different iCloud account). This object may be nil if iCloud is not available for any reason.\n @param ubiquityContainer The root URL path to the current application's ubiquity container. This URL may be nil until the ubiquity container is initialized. */\n- (void)iCloudAvailabilityDidChangeToState:(BOOL)cloudIsAvailable withUbiquityToken:(id)ubiquityToken withUbiquityContainer:(NSURL *)ubiquityContainer;\n\n\n/** Called when the iCloud initiaization process is finished and the iCloud is available\n \n @param cloudToken An iCloud ubiquity token that represents the current iCloud identity. Can be used to determine if iCloud is available and if the iCloud account has been changed (ex. if the user logged out and then logged in with a different iCloud account). This object may be nil if iCloud is not available for any reason.\n @param ubiquityContainer The root URL path to the current application's ubiquity container. This URL may be nil until the ubiquity container is initialized. */\n- (void)iCloudDidFinishInitializingWitUbiquityToken:(id)cloudToken withUbiquityContainer:(NSURL *)ubiquityContainer;\n\n\n\n/** Called before creating an iCloud Query filter. Specify the type of file to be queried. \n \n @discussion If this delegate is not implemented or returns nil, all files stored in the documents directory will be queried.\n \n @return An NSString with one file extension formatted like this: @\"txt\" */\n- (NSString *)iCloudQueryLimitedToFileExtension;\n\n\n/** Called before an iCloud Query begins.\n @discussion This may be useful to display interface updates. */\n- (void)iCloudFileUpdateDidBegin;\n\n\n/** Called when an iCloud Query ends.\n @discussion This may be useful to display interface updates. */\n- (void)iCloudFileUpdateDidEnd;\n\n\n/** Tells the delegate that the files in iCloud have been modified\n \n @param files A list of the files now in the app's iCloud documents directory - each NSMetadataItem in the array contains information such as file version, url, localized name, date, etc.\n @param fileNames A list of the file names (NSString) now in the app's iCloud documents directory */\n- (void)iCloudFilesDidChange:(NSMutableArray *)files withNewFileNames:(NSMutableArray *)fileNames;\n\n\n/** Sent to the delegate where there is a conflict between a local file and an iCloud file during an upload or download\n \n @discussion When both files have the same modification date and file content, iCloud Document Sync will not be able to automatically determine how to handle the conflict. As a result, this delegate method is called to pass the file information to the delegate which should be able to appropriately handle and resolve the conflict. The delegate should, if needed, present the user with a conflict resolution interface. iCloud Document Sync does not need to know the result of the attempted resolution, it will continue to upload all files which are not conflicting. \n \n It is important to note that **this method may be called more than once in a very short period of time** - be prepared to handle the data appropriately.\n \n The delegate is only notified about conflicts during upload and download procedures with iCloud. This method does not monitor for document conflicts between documents which already exist in iCloud. There are other methods provided to you to detect document state and state changes / conflicts.\n \n @param cloudFile An NSDictionary with the cloud file and various other information. This parameter contains the fileContent as NSData, fileURL as NSURL, and modifiedDate as NSDate.\n @param localFile An NSDictionary with the local file and various other information. This parameter contains the fileContent as NSData, fileURL as NSURL, and modifiedDate as NSDate. */\n- (void)iCloudFileConflictBetweenCloudFile:(NSDictionary *)cloudFile andLocalFile:(NSDictionary *)localFile;\n\n\n\n\n/** @name Deprecated Delegate Methods */\n\n\n/** DEPRECATED. Sent to the delegate where there is a conflict between a local file and an iCloud file during an upload\n \n @deprecated Deprecated in version 7.0. Use iCloudFileConflictBetweenCloudFile:andLocalFile: instead.\n \n @param cloudFile An NSDictionary with the cloud file and various other information. This parameter contains the fileContent as NSData, fileURL as NSURL, and modifiedDate as NSDate.\n @param localFile An NSDictionary with the local file and various other information. This parameter contains the fileContent as NSData, fileURL as NSURL, and modifiedDate as NSDate. */\n- (void)iCloudFileUploadConflictWithCloudFile:(NSDictionary *)cloudFile andLocalFile:(NSDictionary *)localFile __deprecated;\n\n\n/** DEPRECATED. Called when there is an error while performing an iCloud process\n \n @deprecated Deprecated in version 6.1. Use the NSError parameter available in corresponding methods' completion handlers.\n @param error An NSError with a message, error code, and information */\n- (void)iCloudError:(NSError *)error __deprecated __unavailable;\n\n/** DEPRECATED. Tells the delegate that there was an error while performing a process\n \n @deprecated Deprecated in version 6.0. Use the NSError parameter available in corresponding methods' completion handlers.\n @param error Returns the NSError that occurred */\n- (void)cloudError:(NSError *)error __deprecated __unavailable;\n\n/** DEPRECATED. Tells the delegate that the files in iCloud have been modified\n \n @deprecated Deprecated in version 6.0. Use iCloudFilesDidChange:withNewFileNames: instead.\n \n @param files Returns a list of the files now in the app's iCloud documents directory - each file in the array contains information such as file version, url, localized name, date, etc.\n @param fileNames Returns a list of the file names now in the app's iCloud documents directory */\n- (void)fileListChangedWithFiles:(NSMutableArray *)files andFileNames:(NSMutableArray *)fileNames __deprecated __unavailable;\n\n/** DEPRECATED. Tells the delegate that a document was successfully deleted.\n @deprecated Deprecated in version 6.0. To be removed in version 8.0. Use the completion handlers in deleteDocumentWithName:completion: instead. */\n- (void)documentWasDeleted __deprecated __unavailable;\n\n/** DEPRECATED. Tells the delegate that a document was successfully saved\n @deprecated Deprecated in version 6.0. To be removed in version 8.0. Use the completion handlers in saveDocumentWithName:withContent:completion: instead. */\n- (void)documentWasSaved __deprecated __unavailable;\n\n/** DEPRECATED. Tells the delegate that a document finished uploading\n @deprecated Deprecated in version 6.0. To be removed in version 8.0. Use the completion handlers in uploadLocalOfflineDocumentsWithDelegate:repeatingHandler:completion: instead. */\n- (void)documentsFinishedUploading __deprecated __unavailable;\n\n/** DEPRECATED. Tells the delegate that a document started uploading\n @deprecated Deprecated in version 6.0. To be removed in version 8.0. Delegate methods are no longer used to report method-specfic conditions and so this method is never called. Completion blocks are now used.  */\n- (void)documentsStartedUploading __deprecated __unavailable;\n\n/** DEPRECATED. Tells the delegate that a document started downloading\n @deprecated Deprecated in version 6.0. To be removed in version 8.0. Delegate methods are no longer used to report method-specfic conditions and so this method is never called. Completion blocks are now used.  */\n- (void)documentsStartedDownloading __deprecated __unavailable;\n\n/** DEPRECATED. Tells the delegate that a document finished downloading\n @deprecated Deprecated in version 6.0. To be removed in version 8.0. Delegate methods are no longer used to report method-specfic conditions and so this method is never called. Completion blocks are now used. */\n- (void)documentsFinishedDownloading __deprecated __unavailable;\n\n\n\n@end\n"
  },
  {
    "path": "Pods/iCloudDocumentSync/iCloud/iCloud.m",
    "content": "//\n//  iCloud.m\n//  iCloud Document Sync\n//\n//  Created by iRare Media. Last updated January 2015.\n//  Available on GitHub. Licensed under MIT with Attribution.\n//\n\n#import \"iCloud.h\"\n\n// Check for ARC\n#if !__has_feature(objc_arc)\n    // Add the -fobjc-arc flag to enable ARC for only these files, as described in the ARC documentation: http://clang.llvm.org/docs/AutomaticReferenceCounting.html\n    #error iCloudDocumentSync is built with Objective-C ARC. You must enable ARC for iCloudDocumentSync.\n#endif\n\n@interface iCloud ()\n\n@property (nonatomic, assign) UIBackgroundTaskIdentifier backgroundProcess;\n@property (nonatomic, strong) NSFileManager *fileManager;\n@property (nonatomic, strong) NSNotificationCenter *notificationCenter;\n@property (nonatomic, copy) NSString *fileExtension;\n@property (nonatomic, strong) NSURL *ubiquityContainer;\n\n/// Setup and start the metadata query and related notifications\n- (void)enumerateCloudDocuments;\n\n/// Called by the NSMetadataQuery notifications to updateFiles\n- (void)startUpdate:(NSMetadataQuery *)notification;\n\n/// Perform a quick a straightforward iCloud check without logging - for internal use\n- (BOOL)quickCloudCheck;\n\n@end\n\n@implementation iCloud\n\n//---------------------------------------------------------------------------------------------------------------------------------------------//\n//------------ Setup --------------------------------------------------------------------------------------------------------------------------//\n//---------------------------------------------------------------------------------------------------------------------------------------------//\n#pragma mark - Setup\n\n+ (instancetype)sharedCloud {\n    static iCloud *sharedManager = nil;\n    static dispatch_once_t onceToken;\n    dispatch_once(&onceToken, ^{\n        sharedManager = [[self alloc] init];\n    });\n    return sharedManager;\n}\n\n- (instancetype)init {\n    self = [super init];\n    return self;\n}\n\n- (void)dealloc {\n    [self.notificationCenter removeObserver:self];\n}\n\n- (void)setupiCloudDocumentSyncWithUbiquityContainer:(NSString *)containerID {\n    // Setup the File Manager\n    if (_fileManager == nil) _fileManager = [NSFileManager defaultManager];\n    \n    // Setup the Notification Center\n    if (_notificationCenter == nil) _notificationCenter = [NSNotificationCenter defaultCenter];\n    \n    // Initialize file lists, results, and queries\n    if (_fileList == nil) _fileList = [NSMutableArray array];\n    if (_previousQueryResults == nil) _previousQueryResults = [NSMutableArray array];\n    if (_query == nil) _query = [[NSMetadataQuery alloc] init];\n    \n    // Check the iCloud Ubiquity Container\n    dispatch_async(dispatch_get_global_queue (DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^(void) {\n        NSLog(@\"[iCloud] Initializing Ubiquity Container\");\n        \n        _ubiquityContainer = [[NSFileManager defaultManager] URLForUbiquityContainerIdentifier:containerID];\n        if (_ubiquityContainer) {\n            // We can write to the ubiquity container\n            \n            dispatch_async(dispatch_get_main_queue (), ^(void) {\n                // On the main thread, update UI and state as appropriate\n                NSLog(@\"[iCloud] Initializing Document Enumeration\");\n                \n                // Check iCloud Availability\n                id cloudToken = [_fileManager ubiquityIdentityToken];\n                \n                // Sync and Update Documents List\n                [self enumerateCloudDocuments];\n                \n                // Subscribe to changes in iCloud availability (should run on main thread)\n                [_notificationCenter addObserver:self selector:@selector(checkCloudAvailability) name:NSUbiquityIdentityDidChangeNotification object:nil];\n                \n                if ([_delegate respondsToSelector:@selector(iCloudDidFinishInitializingWitUbiquityToken: withUbiquityContainer:)])\n                    [_delegate iCloudDidFinishInitializingWitUbiquityToken:cloudToken withUbiquityContainer:_ubiquityContainer];\n            });\n            \n            // Log the setup\n            NSLog(@\"[iCloud] Ubiquity Container Created and Ready\");\n        } else {\n            NSString *appName = [[NSBundle mainBundle] objectForInfoDictionaryKey:@\"CFBundleDisplayName\"];\n            NSLog(@\"[iCloud] The systemt could not retrieve a valid iCloud container URL. iCloud is not available. iCloud may be unavailable for a number of reasons:\\n• The device has not yet been configured with an iCloud account, or the Documents & Data option is disabled\\n• Your app, %@, does not have properly configured entitlements\\n• Your app, %@, has a provisioning profile which does not support iCloud.\\nGo to http://bit.ly/18HkxPp for more information on setting up iCloud\", appName, appName);\n            \n            if ([self.delegate respondsToSelector:@selector(iCloudAvailabilityDidChangeToState:withUbiquityToken:withUbiquityContainer:)])\n                [self.delegate iCloudAvailabilityDidChangeToState:NO withUbiquityToken:nil withUbiquityContainer:self.ubiquityContainer];\n        }\n    });\n    \n    // Log the setup\n    NSLog(@\"[iCloud] Initialized\");\n}\n\n//---------------------------------------------------------------------------------------------------------------------------------------------//\n//------------ Basic --------------------------------------------------------------------------------------------------------------------------//\n//---------------------------------------------------------------------------------------------------------------------------------------------//\n#pragma mark - Basic\n\n- (BOOL)checkCloudAvailability {\n    id cloudToken = [self.fileManager ubiquityIdentityToken];\n    if (cloudToken) {\n        if (self.verboseAvailabilityLogging == YES) NSLog(@\"[iCloud] iCloud is available. Ubiquity URL: %@\\nUbiquity Token: %@\", self.ubiquityContainer, cloudToken);\n        \n        if ([self.delegate respondsToSelector:@selector(iCloudAvailabilityDidChangeToState:withUbiquityToken:withUbiquityContainer:)])\n            [self.delegate iCloudAvailabilityDidChangeToState:YES withUbiquityToken:cloudToken withUbiquityContainer:self.ubiquityContainer];\n        \n        return YES;\n    } else {\n        if (self.verboseAvailabilityLogging == YES)\n            NSLog(@\"[iCloud] iCloud is not available. iCloud may be unavailable for a number of reasons:\\n• The device has not yet been configured with an iCloud account, or the Documents & Data option is disabled\\n• Your app, %@, does not have properly configured entitlements\\nGo to http://bit.ly/18HkxPp for more information on setting up iCloud\", [[NSBundle mainBundle] infoDictionary][@\"CFBundleName\"]);\n        else\n            NSLog(@\"[iCloud] iCloud unavailable\");\n        \n        if ([self.delegate respondsToSelector:@selector(iCloudAvailabilityDidChangeToState:withUbiquityToken:withUbiquityContainer:)])\n            [self.delegate iCloudAvailabilityDidChangeToState:NO withUbiquityToken:nil withUbiquityContainer:self.ubiquityContainer];\n        \n        return NO;\n    }\n}\n\n- (BOOL)checkCloudUbiquityContainer {\n\tif (self.ubiquityContainer) return YES;\n\telse return NO;\n}\n\n- (BOOL)quickCloudCheck {\n    if ([self.fileManager ubiquityIdentityToken]) return YES;\n    else return NO;\n}\n\n- (NSURL *)ubiquitousContainerURL {\n    return self.ubiquityContainer;\n}\n\n- (NSURL *)ubiquitousDocumentsDirectoryURL {\n    // Use the instance variable here - no need to start the retrieval process again\n    if (self.ubiquityContainer == nil) self.ubiquityContainer = [[NSFileManager defaultManager] URLForUbiquityContainerIdentifier:nil];\n    NSURL *documentsDirectory = [self.ubiquityContainer URLByAppendingPathComponent:DOCUMENT_DIRECTORY];\n    NSError *error;\n    \n    // Ensure that the documents directory is not nil, if it is return the local path\n    if (documentsDirectory == nil) {\n        NSURL *nonUbiquitousDocumentsDirectory = [[NSFileManager defaultManager] URLsForDirectory:NSDocumentDirectory inDomains:NSUserDomainMask].firstObject;\n        \n        NSLog(@\"[iCloud] iCloud is not available. iCloud may be unavailable for a number of reasons:\\n• The device has not yet been configured with an iCloud account, or the Documents & Data option is disabled\\n• Your app, %@, does not have properly configured entitlements\\nGo to http://bit.ly/18HkxPp for more information on setting up iCloud\", [[NSBundle mainBundle] infoDictionary][@\"CFBundleName\"]);\n        \n        NSLog(@\"[iCloud] WARNING: Using local documents directory until iCloud is available.\");\n        \n        if ([self.delegate respondsToSelector:@selector(iCloudAvailabilityDidChangeToState:withUbiquityToken:withUbiquityContainer:)])\n            [self.delegate iCloudAvailabilityDidChangeToState:NO withUbiquityToken:nil withUbiquityContainer:self.ubiquityContainer];\n        \n        return nonUbiquitousDocumentsDirectory;\n    }\n    \n    BOOL isDirectory = NO;\n    BOOL isFile = [self.fileManager fileExistsAtPath:[documentsDirectory path] isDirectory:&isDirectory];\n    \n    if (isFile) {\n        // It exists, check if it's a directory\n        if (isDirectory == YES) return documentsDirectory;\n        else {\n            [self.fileManager removeItemAtPath:[documentsDirectory path] error:&error];\n            [self.fileManager createDirectoryAtURL:documentsDirectory withIntermediateDirectories:YES attributes:nil error:&error];\n            return documentsDirectory;\n        }\n    } else {\n        [self.fileManager createDirectoryAtURL:documentsDirectory withIntermediateDirectories:YES attributes:nil error:&error];\n        return documentsDirectory;\n    }\n}\n\n//---------------------------------------------------------------------------------------------------------------------------------------------//\n//------------ Sync ---------------------------------------------------------------------------------------------------------------------------//\n//---------------------------------------------------------------------------------------------------------------------------------------------//\n#pragma mark - Sync\n\n- (void)enumerateCloudDocuments {\n    // Log document enumeration\n    if (self.verboseLogging == YES) NSLog(@\"[iCloud] Creating metadata query and notifications\");\n    \n    // Request information from the delegate\n    if ([self.delegate respondsToSelector:@selector(iCloudQueryLimitedToFileExtension)]) {\n        NSString *fileExt = [self.delegate iCloudQueryLimitedToFileExtension];\n        if (fileExt != nil && ![fileExt isEqualToString:@\"\"]) self.fileExtension = fileExt;\n        else self.fileExtension = @\"*\";\n        \n        // Log file extension\n        NSLog(@\"[iCloud] Document query filter has been set to %@\", self.fileExtension);\n    } else self.fileExtension = @\"*\";\n    \n    // Setup iCloud Metadata Query\n\t[self.query setSearchScopes:@[NSMetadataQueryUbiquitousDocumentsScope]];\n\t[self.query setPredicate:[NSPredicate predicateWithFormat:[NSString stringWithFormat:@\"%%K.pathExtension LIKE '%@'\", self.fileExtension], NSMetadataItemFSNameKey]];\n    \n    // Notify the responder that an update has begun\n\t[self.notificationCenter addObserver:self selector:@selector(startUpdate:) name:NSMetadataQueryDidStartGatheringNotification object:self.query];\n    \n    // Notify the responder that an update has been pushed\n\t[self.notificationCenter addObserver:self selector:@selector(recievedUpdate:) name:NSMetadataQueryDidUpdateNotification object:self.query];\n    \n    // Notify the responder that the update has completed\n\t[self.notificationCenter addObserver:self selector:@selector(endUpdate:) name:NSMetadataQueryDidFinishGatheringNotification object:self.query];\n    \n    // Start the query on the main thread\n    dispatch_async(dispatch_get_main_queue(), ^{\n        BOOL startedQuery = [self.query startQuery];\n        if (!startedQuery) {\n            NSLog(@\"[iCloud] Failed to start query.\");\n            return;\n        } else {\n            if (self.verboseLogging == YES) NSLog(@\"[iCloud] Query initialized successfully\"); // Log file query success\n        }\n    });\n}\n\n- (void)startUpdate:(NSNotification *)notification {\n    // Log file update\n    if (self.verboseLogging == YES) NSLog(@\"[iCloud] Beginning file update with NSMetadataQuery\");\n    \n    // Notify the delegate of the results on the main thread\n    dispatch_async(dispatch_get_main_queue(), ^{\n        if ([self.delegate respondsToSelector:@selector(iCloudFileUpdateDidBegin)])\n            [self.delegate iCloudFileUpdateDidBegin];\n    });\n}\n\n- (void)recievedUpdate:(NSNotification *)notification {\n    // Log file update\n    if (self.verboseLogging == YES) NSLog(@\"[iCloud] An update has been pushed from iCloud with NSMetadataQuery\");\n    \n    // Get the updated files\n    [self updateFiles];\n}\n\n- (void)endUpdate:(NSNotification *)notification {\n    // Get the updated files\n    [self updateFiles];\n    \n    // Notify the delegate of the results on the main thread\n    dispatch_async(dispatch_get_main_queue(), ^{\n        if ([self.delegate respondsToSelector:@selector(iCloudFileUpdateDidEnd)])\n            [self.delegate iCloudFileUpdateDidEnd];\n    });\n    \n    // Log query completion\n    if (self.verboseLogging == YES) NSLog(@\"[iCloud] Finished file update with NSMetadataQuery\");\n}\n\n- (void)updateFiles {\n    // Log file update\n    if (self.verboseLogging == YES) NSLog(@\"[iCloud] Beginning file update with NSMetadataQuery\");\n    \n    // Check for iCloud\n    if ([self quickCloudCheck] == NO) return;\n    \n    // Initialize the discovered files and file names array\n    NSMutableArray *discoveredFiles = [NSMutableArray array];\n    NSMutableArray *names = [NSMutableArray array];\n    \n#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 70000\n    // Code for iOS 7.0 and later\n    \n    // Enumerate through the results\n    [self.query enumerateResultsUsingBlock:^(id result, NSUInteger idx, BOOL *stop) {\n        // Grab the file URL\n        NSURL *fileURL = [result valueForAttribute:NSMetadataItemURLKey];\n        NSString *fileStatus;\n        [fileURL getResourceValue:&fileStatus forKey:NSURLUbiquitousItemDownloadingStatusKey error:nil];\n        \n        if ([fileStatus isEqualToString:NSURLUbiquitousItemDownloadingStatusDownloaded]) {\n            // File will be updated soon\n        }\n        \n        if ([fileStatus isEqualToString:NSURLUbiquitousItemDownloadingStatusCurrent]) {\n            // Add the file metadata and file names to arrays\n            [discoveredFiles addObject:result];\n            [names addObject:[result valueForAttribute:NSMetadataItemFSNameKey]];\n            \n            if (self.query.resultCount-1 >= idx) {\n                // Notify the delegate of the results on the main thread\n                dispatch_async(dispatch_get_main_queue(), ^{\n                    if ([self.delegate respondsToSelector:@selector(iCloudFilesDidChange:withNewFileNames:)])\n                        [self.delegate iCloudFilesDidChange:discoveredFiles withNewFileNames:names];\n                });\n            }\n        } else if ([fileStatus isEqualToString:NSURLUbiquitousItemDownloadingStatusNotDownloaded]) {\n            NSError *error;\n            BOOL downloading = [[NSFileManager defaultManager] startDownloadingUbiquitousItemAtURL:fileURL error:&error];\n            if (self.verboseLogging == YES) NSLog(@\"[iCloud] %@ started downloading locally, successful? %@\", [fileURL lastPathComponent], downloading ? @\"YES\" : @\"NO\");\n            if (error) {\n                if (self.verboseLogging == YES) NSLog(@\"[iCloud] Ubiquitous item failed to start downloading with error: %@\", error);\n            }\n        }\n    }];\n#else\n    // Code for iOS 6.1 and earlier\n    \n    // Disable updates to iCloud while we update to avoid errors\n    [self.query disableUpdates];\n    \n    // The query reports all files found, every time\n    NSArray *queryResults = self.query.results;\n    \n    // Log the query results\n    if (self.verboseLogging == YES) NSLog(@\"Query Results: %@\", self.query.results);\n    \n    // Gather the query results\n    for (NSMetadataItem *result in queryResults) {\n        NSURL *fileURL = [result valueForAttribute:NSMetadataItemURLKey];\n        [discoveredFiles addObject:result];\n    }\n    \n    // Get file names in from the query\n    NSMutableArray *names = [NSMutableArray array];\n    for (NSMetadataItem *item in self.query.results) {\n        [names addObject:[item valueForAttribute:NSMetadataItemFSNameKey]];\n    }\n    \n    // Log query completion\n    if (self.verboseLogging == YES) NSLog(@\"[iCloud] Finished file update with NSMetadataQuery\");\n    \n    // Notify the delegate of the results on the main thread\n    dispatch_async(dispatch_get_main_queue(), ^{\n        if ([self.delegate respondsToSelector:@selector(iCloudFilesDidChange:withNewFileNames:)])\n            [self.delegate iCloudFilesDidChange:discoveredFiles withNewFileNames:names];\n    });\n    \n    // Reenable Updates\n    [self.query enableUpdates];\n#endif\n}\n\n\n//---------------------------------------------------------------------------------------------------------------------------------------------//\n//------------ Write --------------------------------------------------------------------------------------------------------------------------//\n//---------------------------------------------------------------------------------------------------------------------------------------------//\n#pragma mark - Write\n\n- (void)saveAndCloseDocumentWithName:(NSString *)documentName withContent:(NSData *)content completion:(void (^)(UIDocument *cloudDocument, NSData *documentData, NSError *error))handler {\n    // Log save\n    if (self.verboseLogging == YES) NSLog(@\"[iCloud] Beginning document save\");\n    \n    // Check for iCloud\n    if ([self quickCloudCheck] == NO) return;\n    \n    // Check for nil / null document name\n    if (documentName == nil || [documentName isEqualToString:@\"\"]) {\n        // Log error\n        if (self.verboseLogging == YES) NSLog(@\"[iCloud] Specified document name must not be empty\");\n        NSError *error = [NSError errorWithDomain:@\"The specified document name was empty / blank and could not be saved. Specify a document name next time.\" code:001 userInfo:nil];\n        \n        handler(nil, nil, error);\n        \n        return;\n    }\n    \n    // Get the URL to save the new file to\n    NSURL *fileURL = [[self ubiquitousDocumentsDirectoryURL] URLByAppendingPathComponent:documentName];\n    \n    // Initialize a document with that path\n    iCloudDocument *document = [[iCloudDocument alloc] initWithFileURL:fileURL];\n    document.contents = content;\n    [document updateChangeCount:UIDocumentChangeDone];\n    \n    if ([self.fileManager fileExistsAtPath:[fileURL path]]) {\n\t\t// The document did not exist and is being saved for the first time.\n\t\t\n        if (self.verboseLogging == YES) NSLog(@\"[iCloud] Document exists; overwriting, saving and closing\");\n        // Save and create the new document, then close it\n        [document saveToURL:document.fileURL forSaveOperation:UIDocumentSaveForOverwriting completionHandler:^(BOOL success) {\n            if (success) {\n\t\t\t\t// Save and close the document\n\t\t\t\t[document closeWithCompletionHandler:^(BOOL closeSuccess) {\n\t\t\t\t\tif (closeSuccess) {\n\t\t\t\t\t\t// Log\n\t\t\t\t\t\tif (self.verboseLogging == YES) NSLog(@\"[iCloud] Written, saved and closed document\");\n\t\t\t\t\t\t\n\t\t\t\t\t\thandler(document, document.contents, nil);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tNSLog(@\"[iCloud] Error while saving document: %s\", __PRETTY_FUNCTION__);\n\t\t\t\t\t\tNSError *error = [NSError errorWithDomain:[NSString stringWithFormat:@\"%s error while saving the document, %@, to iCloud\", __PRETTY_FUNCTION__, document.fileURL] code:110 userInfo:@{@\"FileURL\": fileURL}];\n\t\t\t\t\t\t\n\t\t\t\t\t\thandler(document, document.contents, error);\n\t\t\t\t\t}\n\t\t\t\t}];\n\t\t\t\t\n\t\t\t} else {\n                NSLog(@\"[iCloud] Error while writing to the document: %s\", __PRETTY_FUNCTION__);\n                NSError *error = [NSError errorWithDomain:[NSString stringWithFormat:@\"%s error while writing to the document, %@, in iCloud\", __PRETTY_FUNCTION__, document.fileURL] code:100 userInfo:@{@\"FileURL\": fileURL}];\n                \n                handler(document, document.contents, error);\n            }\n\t\t}];\n    } else {\n        if (self.verboseLogging == YES) NSLog(@\"[iCloud] Document is new; creating, saving and then closing\");\n        \n        // The document is being saved by overwriting the current version, then closed.\n        [document saveToURL:document.fileURL forSaveOperation:UIDocumentSaveForCreating completionHandler:^(BOOL success) {\n            if (success) {\n                // Saving implicitly opens the file\n                [document closeWithCompletionHandler:^(BOOL closeSuccess) {\n                    if (closeSuccess) {\n                        // Log the save and close\n                        if (self.verboseLogging == YES) NSLog(@\"[iCloud] New document created, saved and closed successfully\");\n                        \n                        handler(document, document.contents, nil);\n                    } else {\n                        NSLog(@\"[iCloud] Error while saving and closing document: %s\", __PRETTY_FUNCTION__);\n                        NSError *error = [NSError errorWithDomain:[NSString stringWithFormat:@\"%s error while saving the document, %@, to iCloud\", __PRETTY_FUNCTION__, document.fileURL] code:110 userInfo:@{@\"FileURL\": fileURL}];\n                        \n                        handler(document, document.contents, error);\n                    }\n                }];\n                \n                \n            } else {\n                NSLog(@\"[iCloud] Error while creating the document: %s\", __PRETTY_FUNCTION__);\n                NSError *error = [NSError errorWithDomain:[NSString stringWithFormat:@\"%s error while creating the document, %@, in iCloud\", __PRETTY_FUNCTION__, document.fileURL] code:100 userInfo:@{@\"FileURL\": fileURL}];\n                \n                handler(document, document.contents, error);\n            }\n        }];\n    }\n}\n\n- (void)uploadLocalOfflineDocumentsWithRepeatingHandler:(void (^)(NSString *documentName, NSError *error))repeatingHandler completion:(void (^)(void))completion {\n    // Log upload\n    if (self.verboseLogging == YES) NSLog(@\"[iCloud] Beginning local file upload to iCloud. This process may take a long time.\");\n    \n    // Check for iCloud\n    if ([self quickCloudCheck] == NO) return;\n    \n    // Perform tasks on background thread to avoid problems on the main / UI thread\n    dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0ul), ^{\n        // Get the array of files in the documents directory\n        NSString *documentsDirectory = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES)[0];\n        NSArray *localDocuments = [self.fileManager contentsOfDirectoryAtPath:documentsDirectory error:nil];\n        \n        // Log local files\n        if (self.verboseLogging == YES) NSLog(@\"[iCloud] Files stored locally available for uploading: %@\", localDocuments);\n        \n        // Compare the arrays then upload documents not already existent in iCloud\n        for (NSUInteger item = 0; item < [localDocuments count]; item++) {\n            \n            // Check to make sure the documents aren't hidden\n            if (![localDocuments[item] hasPrefix:@\".\"]) {\n                \n                // If the file does not exist in iCloud, upload it\n                if (![self.previousQueryResults containsObject:localDocuments[item]]) {\n                    // Log\n                    if (self.verboseLogging == YES) NSLog(@\"[iCloud] Uploading %@ to iCloud (%lu out of %lu)\", localDocuments[item], (unsigned long)item, (unsigned long)[localDocuments count]);\n                    \n                    // Move the file to iCloud\n                    NSURL *cloudURL = [[self ubiquitousDocumentsDirectoryURL] URLByAppendingPathComponent:localDocuments[item]];\n                    NSURL *localURL = [NSURL fileURLWithPath:[documentsDirectory stringByAppendingPathComponent:localDocuments[item]]];\n                    NSError *error;\n                    \n                    BOOL success = [self.fileManager setUbiquitous:YES itemAtURL:localURL destinationURL:cloudURL error:&error];\n                    if (success == NO) {\n                        NSLog(@\"[iCloud] Error while uploading document from local directory: %@\",error);\n                        dispatch_async(dispatch_get_main_queue(), ^{\n                            repeatingHandler(localDocuments[item], error);\n                        });\n                    } else {\n                        dispatch_async(dispatch_get_main_queue(), ^{\n                            repeatingHandler(localDocuments[item], nil);\n                        });\n                    }\n                    \n                } else {\n                    // Check if the local document is newer than the cloud document\n                    \n                    // Log conflict\n                    if (self.verboseLogging == YES) NSLog(@\"[iCloud] Conflict between local file and remote file, attempting to automatically resolve\");\n                    \n                    // Get the file URL for the iCloud document\n                    NSURL *cloudFileURL = [[self ubiquitousDocumentsDirectoryURL] URLByAppendingPathComponent:localDocuments[item]];\n                    NSURL *localFileURL = [NSURL fileURLWithPath:[documentsDirectory stringByAppendingPathComponent:localDocuments[item]]];\n                    \n                    // Create the UIDocument object from the URL\n                    iCloudDocument *document = [[iCloudDocument alloc] initWithFileURL:cloudFileURL];\n                    NSDate *cloudModDate = document.fileModificationDate;\n                    \n                    NSDictionary *fileAttributes = [self.fileManager attributesOfItemAtPath:[localFileURL absoluteString] error:nil];\n                    NSDate *localModDate = [fileAttributes fileModificationDate];\n                    NSData *localFileData = [self.fileManager contentsAtPath:[localFileURL absoluteString]];\n                    \n                    if ([cloudModDate compare:localModDate] == NSOrderedDescending) {\n                        NSLog(@\"[iCloud] The iCloud file was modified more recently than the local file. The local file will be deleted and the iCloud file will be preserved.\");\n                        NSError *error;\n                        \n                        if (![self.fileManager removeItemAtPath:[localFileURL absoluteString] error:&error]) {\n                            NSLog(@\"[iCloud] Error deleting %@.\\n\\n%@\", [localFileURL absoluteString], error);\n                        }\n                    } else if ([cloudModDate compare:localModDate] == NSOrderedAscending) {\n                        NSLog(@\"[iCloud] The local file was modified more recently than the iCloud file. The iCloud file will be overwritten with the contents of the local file.\");\n                        // Set the document's new content\n                        document.contents = localFileData;\n                        \n                        dispatch_async(dispatch_get_main_queue(), ^{\n                            // Save and close the document in iCloud\n                            [document saveToURL:document.fileURL forSaveOperation:UIDocumentSaveForOverwriting completionHandler:^(BOOL success) {\n                                if (success) {\n                                    // Close the document\n                                    [document closeWithCompletionHandler:^(BOOL closeSuccess) {\n                                        repeatingHandler(localDocuments[item], nil);\n                                    }];\n                                } else {\n                                    NSLog(@\"[iCloud] Error while overwriting old iCloud file: %s\", __PRETTY_FUNCTION__);\n                                    NSError *error = [NSError errorWithDomain:[NSString stringWithFormat:@\"%s error while saving the document, %@, to iCloud\", __PRETTY_FUNCTION__, document.fileURL] code:110 userInfo:@{@\"FileName\": localDocuments[item]}];\n                                    \n                                    repeatingHandler(localDocuments[item], error);\n                                }\n                            }];\n                        });\n                    } else {\n                        NSLog(@\"[iCloud] The local file and iCloud file have the same modification date. Before overwriting or deleting, iCloud Document Sync will check if both files have the same content.\");\n                        if ([self.fileManager contentsEqualAtPath:[cloudFileURL absoluteString] andPath:[localFileURL absoluteString]] == YES) {\n                            NSLog (@\"[iCloud] The contents of the local file and the contents of the iCloud file match. The local file will be deleted.\");\n                            NSError *error;\n                            \n                            if (![self.fileManager removeItemAtPath:[localFileURL absoluteString] error:&error]) {\n                                NSLog(@\"[iCloud] Error deleting %@.\\n\\n%@\", [localFileURL absoluteString], error);\n                            }\n                        } else {\n                            NSLog(@\"[iCloud] Both the iCloud file and the local file were last modified at the same time, however their contents do not match. You'll need to handle the conflict using the iCloudFileConflictBetweenCloudFile:andLocalFile: delegate method.\");\n                            NSDictionary *cloudFile = @{@\"fileContents\": document.contents, @\"fileURL\": cloudFileURL, @\"modifiedDate\": cloudModDate};\n                            NSDictionary *localFile = @{@\"fileContents\": localFileData, @\"fileURL\": localFileURL, @\"modifiedDate\": localModDate};;\n                            \n                            if ([self.delegate respondsToSelector:@selector(iCloudFileUploadConflictWithCloudFile:andLocalFile:)]) {\n                                [self.delegate iCloudFileConflictBetweenCloudFile:cloudFile andLocalFile:localFile];\n                            } else if ([self.delegate respondsToSelector:@selector(iCloudFileUploadConflictWithCloudFile:andLocalFile:)]) {\n                                NSLog(@\"[iCloud] WARNING: iCloudFileUploadConflictWithCloudFile:andLocalFile is deprecated and will become unavailable in a future version. Use iCloudFileConflictBetweenCloudFile:andLocalFile instead.\");\n#pragma clang diagnostic push\n#pragma clang diagnostic ignored \"-Wdeprecated-declarations\"\n                                [self.delegate iCloudFileUploadConflictWithCloudFile:cloudFile andLocalFile:localFile];\n#pragma clang diagnostic pop\n                            }\n                        }\n                    }\n                }\n            } else {\n                // The file is hidden, do not proceed\n                dispatch_async(dispatch_get_main_queue(), ^{\n                    NSError *error = [[NSError alloc] initWithDomain:@\"File in directory is hidden and will not be uploaded to iCloud.\" code:520 userInfo:@{@\"FileName\": localDocuments[item]}];\n                    repeatingHandler(localDocuments[item], error);\n                });\n            }\n        }\n        \n        // Log completion\n        if (self.verboseLogging == YES) NSLog(@\"[iCloud] Finished uploading all local files to iCloud\");\n        \n        dispatch_async(dispatch_get_main_queue(), ^{\n            if (completion)\n                completion();\n        });\n    });\n}\n\n- (void)uploadLocalDocumentToCloudWithName:(NSString *)documentName completion:(void (^)(NSError *error))handler {\n    // Log download\n    if (self.verboseLogging == YES) NSLog(@\"[iCloud] Attempting to upload document, %@\", documentName);\n    \n    // Check for iCloud\n    if ([self quickCloudCheck] == NO) return;\n    \n    // Check for nil / null document name\n    if (documentName == nil || [documentName isEqualToString:@\"\"]) {\n        // Log error\n        if (self.verboseLogging == YES) NSLog(@\"[iCloud] Specified document name must not be empty\");\n        NSError *error = [NSError errorWithDomain:@\"The specified document name was empty / blank and could not be saved. Specify a document name next time.\" code:001 userInfo:nil];\n        \n        handler(error);\n        \n        return;\n    }\n    \n    // Perform tasks on background thread to avoid problems on the main / UI thread\n    dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0ul), ^{\n        // Get the array of files in the documents directory\n        NSString *documentsDirectory = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES)[0];\n        NSString *localDocument = [documentsDirectory stringByAppendingPathComponent:documentName];\n        \n        // If the file does not exist in iCloud, upload it\n        if (![self.previousQueryResults containsObject:localDocument]) {\n            // Log\n            if (self.verboseLogging == YES) NSLog(@\"[iCloud] Uploading %@ to iCloud\", localDocument);\n            \n            // Move the file to iCloud\n            NSURL *cloudURL = [[self ubiquitousDocumentsDirectoryURL] URLByAppendingPathComponent:documentName];\n            NSURL *localURL = [NSURL fileURLWithPath:localDocument];\n            NSError *error;\n            \n            BOOL success = [self.fileManager setUbiquitous:YES itemAtURL:localURL destinationURL:cloudURL error:&error];\n            if (!success) {\n                NSLog(@\"[iCloud] Error while uploading document from local directory: %@\", error);\n                dispatch_async(dispatch_get_main_queue(), ^{\n                    handler(error);\n                    return;\n                });\n            } else {\n                dispatch_async(dispatch_get_main_queue(), ^{\n                    handler(nil);\n                    return;\n                });\n            }\n            \n        } else {\n            // Check if the local document is newer than the cloud document\n            \n            // Log conflict\n            if (self.verboseLogging == YES) NSLog(@\"[iCloud] Conflict between local file and remote file, attempting to automatically resolve\");\n            \n            // Get the file URL for the documents\n            NSURL *cloudURL = [[self ubiquitousDocumentsDirectoryURL] URLByAppendingPathComponent:documentName];\n            NSURL *localURL = [NSURL fileURLWithPath:[documentsDirectory stringByAppendingPathComponent:localDocument]];\n            \n            // Create the UIDocument object from the URL\n            iCloudDocument *document = [[iCloudDocument alloc] initWithFileURL:cloudURL];\n            NSDate *cloudModDate = document.fileModificationDate;\n            \n            NSDictionary *fileAttributes = [self.fileManager attributesOfItemAtPath:[localURL absoluteString] error:nil];\n            NSDate *localModDate = [fileAttributes fileModificationDate];\n            NSData *localFileData = [self.fileManager contentsAtPath:[localURL absoluteString]];\n            \n            if ([cloudModDate compare:localModDate] == NSOrderedDescending) {\n                NSLog(@\"[iCloud] The iCloud file was modified more recently than the local file. The local file will be deleted and the iCloud file will be preserved.\");\n                NSError *error;\n                \n                if (![self.fileManager removeItemAtPath:[localURL absoluteString] error:&error]) {\n                    NSLog(@\"[iCloud] Error deleting %@.\\n\\n%@\", [localURL absoluteString], error);\n                    return;\n                }\n            } else if ([cloudModDate compare:localModDate] == NSOrderedAscending) {\n                NSLog(@\"[iCloud] The local file was modified more recently than the iCloud file. The iCloud file will be overwritten with the contents of the local file.\");\n                // Set the document's new content\n                document.contents = localFileData;\n                \n                dispatch_async(dispatch_get_main_queue(), ^{\n                    // Save and close the document in iCloud\n                    [document saveToURL:document.fileURL forSaveOperation:UIDocumentSaveForOverwriting completionHandler:^(BOOL success) {\n                        if (success) {\n                            // Close the document\n                            [document closeWithCompletionHandler:^(BOOL closeSuccess) {\n                                handler(nil);\n                                return;\n                            }];\n                        } else {\n                            NSLog(@\"[iCloud] Error while overwriting old iCloud file: %s\", __PRETTY_FUNCTION__);\n                            NSError *error = [NSError errorWithDomain:[NSString stringWithFormat:@\"%s error while saving the document, %@, to iCloud\", __PRETTY_FUNCTION__, document.fileURL] code:110 userInfo:@{@\"FileName\": localDocument}];\n                            \n                            handler(error);\n                            return;\n                        }\n                    }];\n                });\n            } else {\n                NSLog(@\"[iCloud] The local file and iCloud file have the same modification date. Before overwriting or deleting, iCloud Document Sync will check if both files have the same content.\");\n                if ([self.fileManager contentsEqualAtPath:[cloudURL absoluteString] andPath:[localURL absoluteString]] == YES) {\n                    NSLog (@\"[iCloud] The contents of the local file and the contents of the iCloud file match. The local file will be deleted.\");\n                    NSError *error;\n                    \n                    if (![self.fileManager removeItemAtPath:[localURL absoluteString] error:&error]) {\n                        NSLog(@\"[iCloud] Error deleting %@.\\n\\n%@\", [localURL absoluteString], error);\n                        return;\n                    }\n                } else {\n                    NSLog(@\"[iCloud] Both the iCloud file and the local file were last modified at the same time, however their contents do not match. You'll need to handle the conflict using the iCloudFileConflictBetweenCloudFile:andLocalFile: delegate method.\");\n                    NSDictionary *cloudFile = @{@\"fileContents\": document.contents, @\"fileURL\": cloudURL, @\"modifiedDate\": cloudModDate};\n                    NSDictionary *localFile = @{@\"fileContents\": localFileData, @\"fileURL\": localURL, @\"modifiedDate\": localModDate};;\n                    \n                    if ([self.delegate respondsToSelector:@selector(iCloudFileUploadConflictWithCloudFile:andLocalFile:)]) {\n                        [self.delegate iCloudFileConflictBetweenCloudFile:cloudFile andLocalFile:localFile];\n                    } else if ([self.delegate respondsToSelector:@selector(iCloudFileUploadConflictWithCloudFile:andLocalFile:)]) {\n                        NSLog(@\"[iCloud] WARNING: iCloudFileUploadConflictWithCloudFile:andLocalFile is deprecated and will become unavailable in a future version. Use iCloudFileConflictBetweenCloudFile:andLocalFile instead.\");\n#pragma clang diagnostic push\n#pragma clang diagnostic ignored \"-Wdeprecated-declarations\"\n                        [self.delegate iCloudFileUploadConflictWithCloudFile:cloudFile andLocalFile:localFile];\n#pragma clang diagnostic pop\n                    }\n                    \n                    return;\n                }\n            }\n        }\n        \n        // Log completion\n        if (self.verboseLogging == YES) NSLog(@\"[iCloud] Finished uploading local file to iCloud\");\n        \n        dispatch_async(dispatch_get_main_queue(), ^{\n            handler(nil);\n            return;\n        });\n    });\n}\n\n//---------------------------------------------------------------------------------------------------------------------------------------------//\n//------------ Read ---------------------------------------------------------------------------------------------------------------------------//\n//---------------------------------------------------------------------------------------------------------------------------------------------//\n#pragma mark - Read\n\n- (void)retrieveCloudDocumentWithName:(NSString *)documentName completion:(void (^)(UIDocument *cloudDocument, NSData *documentData, NSError *error))handler {\n    // Log Retrieval\n    if (self.verboseLogging == YES) NSLog(@\"[iCloud] Retrieving iCloud document, %@\", documentName);\n    \n    // Check for iCloud availability\n    if ([self quickCloudCheck] == NO) return;\n    \n    // Check for nil / null document name\n    if (documentName == nil || [documentName isEqualToString:@\"\"]) {\n        // Log error\n        if (self.verboseLogging == YES) NSLog(@\"[iCloud] Specified document name must not be empty\");\n        NSError *error = [NSError errorWithDomain:@\"The specified document name was empty / blank and could not be saved. Specify a document name next time.\" code:001 userInfo:nil];\n        \n        handler(nil, nil, error);\n        \n        return;\n    }\n    \n    @try {\n        // Get the URL to get the file from\n        NSURL *fileURL = [[self ubiquitousDocumentsDirectoryURL] URLByAppendingPathComponent:documentName];\n        \n        // If the file exists open it; otherwise, create it\n        if ([self.fileManager fileExistsAtPath:[fileURL path]]) {\n            // Log opening\n            if (self.verboseLogging == YES) NSLog(@\"[iCloud] The document, %@, already exists and will be opened\", documentName);\n            \n            // Create the UIDocument object from the URL\n            iCloudDocument *document = [[iCloudDocument alloc] initWithFileURL:fileURL];\n            \n            if (document.documentState & UIDocumentStateClosed) {\n                if (self.verboseLogging == YES) NSLog(@\"[iCloud] Document is closed and will be opened\");\n                \n                [document openWithCompletionHandler:^(BOOL success){\n                    if (success) {\n                        // Log open\n                        if (self.verboseLogging == YES) NSLog(@\"[iCloud] Opened document\");\n                        \n                        // Pass data on to the completion handler on the main thread\n                        dispatch_async(dispatch_get_main_queue(), ^{\n                            handler(document, document.contents, nil);\n                        });\n                        \n                        return;\n                    } else {\n                        NSLog(@\"[iCloud] Error while retrieving document: %s\", __PRETTY_FUNCTION__);\n                        NSError *error = [NSError errorWithDomain:[NSString stringWithFormat:@\"%s error while retrieving document, %@, from iCloud\", __PRETTY_FUNCTION__, document.fileURL] code:200 userInfo:@{@\"FileURL\": fileURL}];\n                        \n                        // Pass data on to the completion handler on the main thread\n                        dispatch_async(dispatch_get_main_queue(), ^{\n                            handler(document, document.contents, error);\n                        });\n                        \n                        return;\n                    }\n                }];\n            } else if (document.documentState & UIDocumentStateNormal) {\n                // Log open\n                if (self.verboseLogging == YES) NSLog(@\"[iCloud] Document already opened, retrieving content\");\n                \n                // Pass data on to the completion handler on the main thread\n                dispatch_async(dispatch_get_main_queue(), ^{\n                    handler(document, document.contents, nil);\n                });\n                \n                return;\n            } else if (document.documentState & UIDocumentStateInConflict) {\n                // Log open\n                if (self.verboseLogging == YES) NSLog(@\"[iCloud] Document in conflict. The document may not contain correct data. An error will be returned along with the other parameters in the completion handler.\");\n                \n                // Create Error\n                NSLog(@\"[iCloud] Error while retrieving document, %@, because the document is in conflict\", documentName);\n                NSError *error = [NSError errorWithDomain:[NSString stringWithFormat:@\"The iCloud document, %@, is in conflict. Please resolve this conflict before editing the document.\", documentName] code:200 userInfo:@{@\"FileURL\": fileURL}];\n                \n                // Pass data on to the completion handler on the main thread\n                dispatch_async(dispatch_get_main_queue(), ^{\n                    handler(document, document.contents, error);\n                });\n                \n                return;\n            } else if (document.documentState & UIDocumentStateEditingDisabled) {\n                // Log open\n                if (self.verboseLogging == YES) NSLog(@\"[iCloud] Document editing disabled. The document is not currently editable, use the documentStateForFile: method to determine when the document is available again. The document and its contents will still be passed as parameters in the completion handler.\");\n                \n                // Pass data on to the completion handler on the main thread\n                dispatch_async(dispatch_get_main_queue(), ^{\n                    handler(document, document.contents, nil);\n                });\n                \n                return;\n            }\n            \n        } else {\n            // Log creation\n            if (self.verboseLogging == YES) NSLog(@\"[iCloud] The document, %@, does not exist and will be created as an empty document\", documentName);\n            \n            // Create the UIDocument\n            iCloudDocument *document = [[iCloudDocument alloc] initWithFileURL:fileURL];\n            document.contents = [[NSData alloc] init];\n            \n            // Save the new document to disk\n            [document saveToURL:fileURL forSaveOperation:UIDocumentSaveForCreating completionHandler:^(BOOL success) {\n                // Log save\n                if (self.verboseLogging == YES) NSLog(@\"[iCloud] Saved and opened the document\");\n                \n                dispatch_async(dispatch_get_main_queue(), ^{\n                    handler(document, document.contents, nil);\n                });\n            }];\n        }\n    } @catch (NSException *exception) {\n        NSLog(@\"[iCloud] Caught exception while retrieving document: %@\\n\\n%s\", exception, __PRETTY_FUNCTION__);\n    }\n}\n\n- (iCloudDocument *)retrieveCloudDocumentObjectWithName:(NSString *)documentName {\n    // Log Retrieval\n    if (self.verboseLogging == YES) NSLog(@\"[iCloud] Retrieving iCloudDocument object with name: %@\", documentName);\n    \n    // Check for iCloud availability\n    if ([self quickCloudCheck] == NO) return nil;\n    \n    // Check for nil / null document name\n    if (documentName == nil || [documentName isEqualToString:@\"\"]) {\n        // Log error\n        if (self.verboseLogging == YES) NSLog(@\"[iCloud] Specified document name must not be empty\");\n        return nil;\n    }\n    \n    @try {\n        // Get the URL to get the file from\n        NSURL *fileURL = [[self ubiquitousDocumentsDirectoryURL] URLByAppendingPathComponent:documentName];\n        \n        // Create the iCloudDocument\n        iCloudDocument *document = [[iCloudDocument alloc] initWithFileURL:fileURL];\n        \n        if ([self.fileManager fileExistsAtPath:[fileURL path]]) {\n            if (self.verboseLogging == YES) NSLog(@\"[iCloud] The document, %@, exists and will be returned as an iCloudDocument object\", documentName);\n        } else {\n            if (self.verboseLogging == YES) NSLog(@\"[iCloud] The document, %@, does not exist but will be returned as an empty iCloudDocument object\", documentName);\n        }\n        \n        // Return the iCloudDocument object\n        return document;\n        \n    } @catch (NSException *exception) {\n        NSLog(@\"[iCloud] Caught exception while retrieving document: %@\\n\\n%s\", exception, __PRETTY_FUNCTION__);\n        return nil;\n    }\n}\n\n- (NSNumber *)fileSize:(NSString *)documentName {\n    // Check for iCloud\n    if ([self quickCloudCheck] == NO) return nil;\n    \n    // Get the URL to get the file from\n\tNSURL *fileURL = [[self ubiquitousDocumentsDirectoryURL] URLByAppendingPathComponent:documentName];\n    \n    // Check if the file exists, and return\n    if ([self.fileManager fileExistsAtPath:[fileURL path]]) {\n        unsigned long long fileSize = [[self.fileManager attributesOfItemAtPath:[fileURL path] error:nil] fileSize];\n        NSNumber *bytes = @(fileSize);\n        return bytes;\n    } else {\n        // The document could not be found\n        NSLog(@\"[iCloud] File not found: %@\", documentName);\n        \n        return nil;\n    }\n}\n\n- (NSDate *)fileModifiedDate:(NSString *)documentName {\n    // Check for iCloud\n    if ([self quickCloudCheck] == NO) return nil;\n    \n    // Get the URL to get the file from\n\tNSURL *fileURL = [[self ubiquitousDocumentsDirectoryURL] URLByAppendingPathComponent:documentName];\n    \n    \n    // Check if the file exists, and return\n    if ([self.fileManager fileExistsAtPath:[fileURL path]]) {\n        NSDate *fileModified = [[self.fileManager attributesOfItemAtPath:[fileURL path] error:nil] fileModificationDate];\n        return fileModified;\n    } else {\n        // The document could not be found\n        NSLog(@\"[iCloud] File not found: %@\", documentName);\n        \n        return nil;\n    }\n}\n\n- (NSDate *)fileCreatedDate:(NSString *)documentName {\n    // Check for iCloud\n    if ([self quickCloudCheck] == NO) return nil;\n    \n    // Get the URL to get the file from\n\tNSURL *fileURL = [[self ubiquitousDocumentsDirectoryURL] URLByAppendingPathComponent:documentName];\n    \n    \n    // Check if the file exists, and return\n    if ([self.fileManager fileExistsAtPath:[fileURL path]]) {\n        NSDate *fileModified = [[self.fileManager attributesOfItemAtPath:[fileURL path] error:nil] fileCreationDate];\n        return fileModified;\n    } else {\n        return nil;\n    }\n}\n\n- (BOOL)doesFileExistInCloud:(NSString *)documentName {\n    // Check for iCloud\n    if ([self quickCloudCheck] == NO) return NO;\n    \n    // Get the URL to get the file from\n\tNSURL *fileURL = [[self ubiquitousDocumentsDirectoryURL] URLByAppendingPathComponent:documentName];\n    \n    // Check if the file exists, and return\n    if ([self.fileManager fileExistsAtPath:[fileURL path]]) return YES;\n    else return NO;\n}\n\n- (NSArray *)listCloudFiles {\n    // Log retrieval\n    if (self.verboseLogging == YES) NSLog(@\"[iCloud] Getting list of iCloud documents\");\n    \n    // Check for iCloud\n    if ([self quickCloudCheck] == NO) return nil;\n    \n    // Get the directory contents\n    NSArray *directoryContent = [self.fileManager contentsOfDirectoryAtURL:[self ubiquitousDocumentsDirectoryURL] includingPropertiesForKeys:nil options:0 error:nil];\n    \n    // Log retrieval\n    if (self.verboseLogging == YES) NSLog(@\"[iCloud] Retrieved list of iCloud documents\");\n    \n    // Return the list of files\n    return directoryContent;\n}\n\n//---------------------------------------------------------------------------------------------------------------------------------------------//\n//------------ State --------------------------------------------------------------------------------------------------------------------------//\n//---------------------------------------------------------------------------------------------------------------------------------------------//\n#pragma mark - State\n\n- (void)documentStateForFile:(NSString *)documentName completion:(void (^)(UIDocumentState *documentState, NSString *userReadableDocumentState, NSError *error))handler {\n    // Check for iCloud\n    if ([self quickCloudCheck] == NO) return;\n    \n    // Check for nil / null document name\n    if (documentName == nil || [documentName isEqualToString:@\"\"]) {\n        // Log error\n        if (self.verboseLogging == YES) NSLog(@\"[iCloud] Specified document name must not be empty\");\n        NSError *error = [NSError errorWithDomain:@\"The specified document name was empty / blank and could not be saved. Specify a document name next time.\" code:001 userInfo:nil];\n        \n        handler(nil, nil, error);\n        \n        return;\n    }\n    \n    // Get the URL to get the file from\n\tNSURL *fileURL = [[self ubiquitousDocumentsDirectoryURL] URLByAppendingPathComponent:documentName];\n    \n    // Check if the file exists, and return\n    if ([self.fileManager fileExistsAtPath:[fileURL path]]) {\n        // Create the UIDocument\n        iCloudDocument *document = [[iCloudDocument alloc] initWithFileURL:fileURL];\n        UIDocumentState state = document.documentState;\n        NSString *userStateDescription = document.stateDescription;\n        handler(&state, userStateDescription, nil);\n    } else {\n        // The document could not be found\n        NSLog(@\"[iCloud] File not found: %@\", documentName);\n        NSError *error = [NSError errorWithDomain:[NSString stringWithFormat:@\"The document, %@, does not exist at path: %@\", documentName, fileURL] code:404 userInfo:@{@\"FileURL\": fileURL}];\n        handler(nil, @\"No document available\", error);\n        return;\n    }\n}\n\n- (BOOL)monitorDocumentStateForFile:(NSString *)documentName onTarget:(id)sender withSelector:(SEL)selector {\n    // Log monitoring\n    if (self.verboseLogging == YES) NSLog(@\"[iCloud] Preparing to monitor for changes to %@\", documentName);\n    \n    // Check for iCloud\n    if ([self quickCloudCheck] == NO) return NO;\n    \n    // Check for nil / null document name\n    if (documentName == nil || [documentName isEqualToString:@\"\"]) {\n        // Log error\n        if (self.verboseLogging == YES) NSLog(@\"[iCloud] Specified document name must not be empty\");\n        return NO;\n    }\n    \n    // Log monitoring\n    if (self.verboseLogging == YES) NSLog(@\"[iCloud] Checking for existance of %@\", documentName);\n    \n    @try {\n        // Get the URL to get the file from\n        NSURL *fileURL = [[self ubiquitousDocumentsDirectoryURL] URLByAppendingPathComponent:documentName];\n        \n        \n        // Check if the file exists, and return\n        if ([self.fileManager fileExistsAtPath:[fileURL path]]) {\n            // Create the UIDocument\n            iCloudDocument *document = [[iCloudDocument alloc] initWithFileURL:fileURL];\n            [self.notificationCenter addObserver:sender selector:selector name:UIDocumentStateChangedNotification object:document];\n            \n            // Log monitoring\n            if (self.verboseLogging == YES) NSLog(@\"[iCloud] Now successfully monitoring for changes to %@ on %@\", documentName, sender);\n            \n            return YES;\n        } else {\n            // The document could not be found\n            NSLog(@\"[iCloud] File not found: %@\", documentName);\n            \n            return NO;\n        }\n    } @catch (NSException *exception) {\n        // Log exception\n        NSLog(@\"[iCloud] Exception while attempting to stop monitoring document state changes to %@\", exception);\n        \n        return NO;\n    }\n}\n\n- (BOOL)stopMonitoringDocumentStateChangesForFile:(NSString *)documentName onTarget:(id)sender {\n    // Log monitoring\n    if (self.verboseLogging == YES) NSLog(@\"[iCloud] Preparing to stop monitoring document changes to %@\", documentName);\n    \n    // Check for iCloud\n    if ([self quickCloudCheck] == NO) return NO;\n    \n    // Check for nil / null document name\n    if (documentName == nil || [documentName isEqualToString:@\"\"]) {\n        // Log error\n        if (self.verboseLogging == YES) NSLog(@\"[iCloud] Specified document name must not be empty\");\n        return NO;\n    }\n    \n    // Log monitoring\n    if (self.verboseLogging == YES) NSLog(@\"[iCloud] Checking for existance of %@\", documentName);\n    \n    @try {\n        // Get the URL to get the file from\n        NSURL *fileURL = [[self ubiquitousDocumentsDirectoryURL] URLByAppendingPathComponent:documentName];\n        \n        \n        // Check if the file exists, and return\n        if ([self.fileManager fileExistsAtPath:[fileURL path]]) {\n            // Create the UIDocument\n            iCloudDocument *document = [[iCloudDocument alloc] initWithFileURL:fileURL];\n            \n            [self.notificationCenter removeObserver:sender name:UIDocumentStateChangedNotification object:document];\n            \n            // Log monitoring\n            if (self.verboseLogging == YES) NSLog(@\"[iCloud] Stopped monitoring document state changes to %@\", documentName);\n            \n            return YES;\n        } else {\n            // The document could not be found\n            NSLog(@\"[iCloud] File not found: %@\", documentName);\n            \n            return NO;\n        }\n    } @catch (NSException *exception) {\n        // Log exception\n        NSLog(@\"[iCloud] Exception while attempting to stop monitoring document state changes to %@\", exception);\n        \n        return NO;\n    }\n}\n\n//---------------------------------------------------------------------------------------------------------------------------------------------//\n//------------ Conflict -----------------------------------------------------------------------------------------------------------------------//\n//---------------------------------------------------------------------------------------------------------------------------------------------//\n#pragma mark - Conflict\n\n- (NSArray *)findUnresolvedConflictingVersionsOfFile:(NSString *)documentName {\n    // Log conflict search\n    if (self.verboseLogging == YES) NSLog(@\"[iCloud] Preparing to find all version conflicts for %@\", documentName);\n    \n    // Check for iCloud\n    if ([self quickCloudCheck] == NO) return nil;\n    \n    // Check for nil / null document name\n    if (documentName == nil || [documentName isEqualToString:@\"\"]) {\n        // Log error\n        if (self.verboseLogging == YES) NSLog(@\"[iCloud] Specified document name must not be empty\");\n        return nil;\n    }\n    \n    // Log conflict search\n    if (self.verboseLogging == YES) NSLog(@\"[iCloud] Checking for existance of %@\", documentName);\n    \n    @try {\n        // Get the URL to get the file from\n        NSURL *fileURL = [[self ubiquitousDocumentsDirectoryURL] URLByAppendingPathComponent:documentName];\n        \n        \n        // Check if the file exists, and return\n        if ([self.fileManager fileExistsAtPath:[fileURL path]]) {\n            // Log conflict search\n            if (self.verboseLogging == YES) NSLog(@\"[iCloud] %@ exists at the correct path, proceeding to find the conflicts\", documentName);\n        \n            NSMutableArray *fileVersions = [NSMutableArray array];\n            \n            NSFileVersion *currentVersion = [NSFileVersion currentVersionOfItemAtURL:fileURL];\n            [fileVersions addObject:currentVersion];\n            \n            NSArray *otherVersions = [NSFileVersion otherVersionsOfItemAtURL:fileURL];\n            [fileVersions addObjectsFromArray:otherVersions];\n            \n            return fileVersions;\n        } else {\n            // The document could not be found\n            NSLog(@\"[iCloud] File not found: %@\", documentName);\n            \n            return nil;\n        }\n    } @catch (NSException *exception) {\n        // Log exception\n        NSLog(@\"[iCloud] Exception while attempting to stop monitoring document state changes to %@\", exception);\n        \n        return nil;\n    }\n}\n\n- (void)resolveConflictForFile:(NSString *)documentName withSelectedFileVersion:(NSFileVersion *)documentVersion {\n    // Log resolution\n    if (self.verboseLogging == YES) NSLog(@\"[iCloud] Preparing to resolve version conflict for %@\", documentName);\n    \n    // Check for iCloud\n    if ([self quickCloudCheck] == NO) return;\n    \n    // Check for nil / null document name\n    if (documentName == nil || [documentName isEqualToString:@\"\"]) {\n        // Log error\n        if (self.verboseLogging == YES) NSLog(@\"[iCloud] Specified document name must not be empty\");\n        return;\n    }\n    \n    // Log resolution\n    if (self.verboseLogging == YES) NSLog(@\"[iCloud] Checking for existance of %@\", documentName);\n    \n    @try {\n        // Get the URL to get the file from\n        NSURL *fileURL = [[self ubiquitousDocumentsDirectoryURL] URLByAppendingPathComponent:documentName];\n        \n        \n        // Check if the file exists, and return\n        if ([self.fileManager fileExistsAtPath:[fileURL path]]) {\n            // Log resolution\n            if (self.verboseLogging == YES) NSLog(@\"[iCloud] %@ exists at the correct path, proceeding to resolve the conflict\", documentName);\n            \n            // Make the current version \"win\" the conflict if it is selected\n            if (![documentVersion isEqual:[NSFileVersion currentVersionOfItemAtURL:fileURL]]) {\n                // Log resolution\n                if (self.verboseLogging == YES) NSLog(@\"[iCloud] The current version (%@) of %@ matches the selected version. Resolving conflict...\", documentVersion, documentName);\n                \n                [documentVersion replaceItemAtURL:fileURL options:0 error:nil];\n            }\n            \n            // Remove other versions of the document\n            [NSFileVersion removeOtherVersionsOfItemAtURL:fileURL error:nil];\n            \n            // Log resolution\n            if (self.verboseLogging == YES) NSLog(@\"[iCloud] Removing all unresolved other versions of %@\", documentName);\n            \n            NSArray *conflictVersions = [NSFileVersion unresolvedConflictVersionsOfItemAtURL:fileURL];\n            for (NSFileVersion *fileVersion in conflictVersions) {\n                fileVersion.resolved = YES;\n            }\n            \n            // Log resolution\n            if (self.verboseLogging == YES) NSLog(@\"[iCloud] Finished resolving conflicts for %@\", documentName);\n        } else {\n            // The document could not be found\n            NSLog(@\"[iCloud] File not found: %@\", documentName);\n            \n            return;\n        }\n    } @catch (NSException *exception) {\n        // Log exception\n        NSLog(@\"[iCloud] Exception while attempting to stop monitoring document state changes to %@\", exception);\n        \n        return;\n    }\n}\n\n//---------------------------------------------------------------------------------------------------------------------------------------------//\n//------------ Share --------------------------------------------------------------------------------------------------------------------------//\n//---------------------------------------------------------------------------------------------------------------------------------------------//\n#pragma mark - Share\n\n- (NSURL *)shareDocumentWithName:(NSString *)documentName completion:(void (^)(NSURL *sharedURL, NSDate *expirationDate, NSError *error))handler {\n    // Log share\n    if (self.verboseLogging == YES) NSLog(@\"[iCloud] Attempting to share document\");\n    \n    // Check for iCloud\n    if ([self quickCloudCheck] == NO) return nil;\n    \n    // Check for nil / null document name\n    if (documentName == nil || [documentName isEqualToString:@\"\"]) {\n        // Log error\n        if (self.verboseLogging == YES) NSLog(@\"[iCloud] Specified document name must not be empty\");\n        return nil;\n    }\n    \n    @try {\n        // Get the URL to get the file from\n        NSURL *fileURL = [[self ubiquitousDocumentsDirectoryURL] URLByAppendingPathComponent:documentName];\n        \n        // Check that the file exists\n        if ([self.fileManager fileExistsAtPath:[fileURL path]]) {\n            // Log share\n            if (self.verboseLogging == YES) NSLog(@\"[iCloud] File exists, preparing to share it\");\n            \n            // Create the URL to be returned outside of the block\n            __block NSURL *url;\n            \n            // Move to the background thread for safety\n            dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^(void) {\n                // Create the Error Object and the Date Object\n                NSError *error;\n                NSDate *date;\n                \n                // Create the URL\n                url = [self.fileManager URLForPublishingUbiquitousItemAtURL:fileURL expirationDate:&date error:&error];\n                \n                // Log share\n                if (self.verboseLogging == YES) NSLog(@\"[iCloud] Shared iCloud document\");\n                \n                dispatch_async(dispatch_get_main_queue(), ^{\n                    // Pass the data to the handler\n                    handler(url, date, error);\n                });\n            });\n            \n            // Return the URL\n            return url;\n        } else {\n            // The document could not be found\n            NSLog(@\"[iCloud] File not found: %@\", documentName);\n            NSError *error = [NSError errorWithDomain:[NSString stringWithFormat:@\"The document, %@, does not exist at path: %@\", documentName, fileURL] code:404 userInfo:@{@\"FileURL\": fileURL}];\n            dispatch_async(dispatch_get_main_queue(), ^{\n                handler(nil, nil, error);\n                return;\n            });\n        }\n    } @catch (NSException *exception) {\n        NSLog(@\"[iCloud] Caught exception while sharing file: %@\\n\\n%s\", exception, __PRETTY_FUNCTION__);\n    }\n    return nil;\n}\n\n//---------------------------------------------------------------------------------------------------------------------------------------------//\n//------------ Delete -------------------------------------------------------------------------------------------------------------------------//\n//---------------------------------------------------------------------------------------------------------------------------------------------//\n#pragma mark - Delete\n\n- (void)deleteDocumentWithName:(NSString *)documentName completion:(void (^)(NSError *error))handler {\n    // Log delete\n    if (self.verboseLogging == YES) NSLog(@\"[iCloud] Attempting to delete document\");\n    \n    // Check for iCloud\n    if ([self quickCloudCheck] == NO) return;\n    \n    // Check for nil / null document name\n    if (documentName == nil || [documentName isEqualToString:@\"\"]) {\n        // Log error\n        if (self.verboseLogging == YES) NSLog(@\"[iCloud] Specified document name must not be empty\");\n        return;\n    }\n    \n    @try {\n        // Create the URL for the file that is being removed\n        NSURL *fileURL = [[self ubiquitousDocumentsDirectoryURL] URLByAppendingPathComponent:documentName];\n        \n        // Check that the file exists\n        if ([self.fileManager fileExistsAtPath:[fileURL path]]) {\n            // Log share\n            if (self.verboseLogging == YES) NSLog(@\"[iCloud] File exists, attempting to delete it\");\n            \n            // Move to the background thread for safety\n            dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^(void) {\n                \n                // Use a file coordinator to safely delete the file\n                NSFileCoordinator *fileCoordinator = [[NSFileCoordinator alloc] initWithFilePresenter:nil];\n                [fileCoordinator coordinateWritingItemAtURL:fileURL options:NSFileCoordinatorWritingForDeleting error:nil byAccessor:^(NSURL *writingURL) {\n                    // Create the error handler\n                    NSError *error;\n                    \n                    [self.fileManager removeItemAtURL:writingURL error:&error];\n                    if (error) {\n                        // Log failure\n                        NSLog(@\"[iCloud] An error occurred while deleting the document: %@\", error);\n                        \n                        dispatch_async(dispatch_get_main_queue(), ^{\n                            if (handler) handler(error);\n                        });\n                        \n                        return;\n                    } else {\n                        // Log success\n                        if (self.verboseLogging == YES) NSLog(@\"[iCloud] The document has been deleted\");\n                        \n                        dispatch_async(dispatch_get_main_queue(), ^{\n                            [self updateFiles];\n                            if (handler) handler(nil);\n                        });\n                        \n                        return;\n                    }\n                }];\n            });\n        } else {\n            // The document could not be found\n            NSLog(@\"[iCloud] File not found: %@\", documentName);\n            NSError *error = [NSError errorWithDomain:[NSString stringWithFormat:@\"The document, %@, does not exist at path: %@\", documentName, fileURL] code:404 userInfo:@{@\"FileURL\": fileURL}];\n            dispatch_async(dispatch_get_main_queue(), ^{\n                if (handler) handler(error);\n                return;\n            });\n        }\n    } @catch (NSException *exception) {\n        NSLog(@\"[iCloud] Caught exception while deleting file: %@\\n\\n%s\", exception, __PRETTY_FUNCTION__);\n    }\n}\n\n- (void)evictCloudDocumentWithName:(NSString *)documentName completion:(void (^)(NSError *error))handler {\n    // Log download\n    if (self.verboseLogging == YES) NSLog(@\"[iCloud] Attempting to evict iCloud document, %@\", documentName);\n    \n    // Check for iCloud\n    if ([self quickCloudCheck] == NO) return;\n    \n    // Check for nil / null document name\n    if (documentName == nil || [documentName isEqualToString:@\"\"]) {\n        // Log error\n        if (self.verboseLogging == YES) NSLog(@\"[iCloud] Specified document name must not be empty\");\n        return;\n    }\n    \n    // Perform tasks on background thread to avoid problems on the main / UI thread\n    dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0ul), ^{\n        // Get the array of files in the documents directory\n        NSString *documentsDirectory = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES)[0];\n        NSString *localDocument = [documentsDirectory stringByAppendingPathComponent:documentName];\n        \n        // If the file does not exist in iCloud, upload it\n        if (![self.previousQueryResults containsObject:localDocument]) {\n            // Log\n            if (self.verboseLogging == YES) NSLog(@\"[iCloud] Evicting %@ from iCloud\", localDocument);\n            \n            // Move the file to iCloud\n            NSURL *cloudURL = [[self ubiquitousDocumentsDirectoryURL] URLByAppendingPathComponent:documentName];\n            NSURL *localURL = [NSURL fileURLWithPath:localDocument];\n            NSError *error;\n            \n            BOOL success = [self.fileManager setUbiquitous:NO itemAtURL:cloudURL destinationURL:localURL error:&error];\n            if (!success) {\n                NSLog(@\"[iCloud] Error while evicting document from local directory: %@\", error);\n                dispatch_async(dispatch_get_main_queue(), ^{\n                    handler(error);\n                    return;\n                });\n            } else {\n                dispatch_async(dispatch_get_main_queue(), ^{\n                    handler(nil);\n                    return;\n                });\n            }\n            \n        } else {\n            // Check if the cloud document is newer than the local document\n            \n            // Log conflict\n            if (self.verboseLogging == YES) NSLog(@\"[iCloud] Conflict between local file and remote file, attempting to automatically resolve\");\n            \n            // Get the file URL for the documents\n            NSURL *cloudURL = [[self ubiquitousDocumentsDirectoryURL] URLByAppendingPathComponent:documentName];\n            NSURL *localURL = [NSURL fileURLWithPath:[documentsDirectory stringByAppendingPathComponent:localDocument]];\n            \n            // Create the UIDocument object from the URL\n            iCloudDocument *document = [[iCloudDocument alloc] initWithFileURL:cloudURL];\n            NSDate *cloudModDate = document.fileModificationDate;\n            \n            NSDictionary *fileAttributes = [self.fileManager attributesOfItemAtPath:[localURL absoluteString] error:nil];\n            NSDate *localModDate = [fileAttributes fileModificationDate];\n            NSData *localFileData = [self.fileManager contentsAtPath:[localURL absoluteString]];\n            \n            if ([localModDate compare:cloudModDate] == NSOrderedDescending) {\n                NSLog(@\"[iCloud] The local file was modified more recently than the iCloud file. The iCloud file will be deleted and the local file will be preserved.\");\n                \n                [self deleteDocumentWithName:documentName completion:^(NSError *error) {\n                    if (error) {\n                        NSLog(@\"[iCloud] Error deleting %@.\\n\\n%@\", [localURL absoluteString], error);\n                        dispatch_async(dispatch_get_main_queue(), ^{\n                            handler(error);\n                            return;\n                        });\n                    } else {\n                        dispatch_async(dispatch_get_main_queue(), ^{\n                            handler(nil);\n                            return;\n                        });\n                    }\n                }];\n                \n            } else if ([localModDate compare:cloudModDate] == NSOrderedAscending) {\n                NSLog(@\"[iCloud] The iCloud file was modified more recently than the local file. The local file will be overwritten with the contents of the iCloud file.\");\n                \n                BOOL success = [document.contents writeToURL:localURL atomically:YES];\n                if (success) {\n                    dispatch_async(dispatch_get_main_queue(), ^{\n                        handler(nil);\n                        return;\n                    });\n                } else {\n                    NSLog(@\"[iCloud] Failed to overwrite file at URL: %@\", localURL);\n                    NSError *error = [[NSError alloc] initWithDomain:@\"Unknown error occured while writing file to URL.\" code:100 userInfo:@{@\"FileURL\": localURL}];\n                    dispatch_async(dispatch_get_main_queue(), ^{\n                        handler(error);\n                        return;\n                    });\n                }\n            } else {\n                NSLog(@\"[iCloud] The iCloud file and local file have the same modification date. Before overwriting or deleting, iCloud Document Sync will check if both files have the same content.\");\n                if ([self.fileManager contentsEqualAtPath:[localURL absoluteString] andPath:[cloudURL absoluteString]] == YES) {\n                    NSLog (@\"[iCloud] The contents of the iCloud file and the contents of the local file match. The iCloud file will be deleted.\");\n                    \n                    [self deleteDocumentWithName:documentName completion:^(NSError *error) {\n                        if (error) {\n                            NSLog(@\"[iCloud] Error deleting %@.\\n\\n%@\", [localURL absoluteString], error);\n                            dispatch_async(dispatch_get_main_queue(), ^{\n                                handler(error);\n                                return;\n                            });\n                        } else {\n                            dispatch_async(dispatch_get_main_queue(), ^{\n                                handler(nil);\n                                return;\n                            });\n                        }\n                    }];\n                } else {\n                    NSLog(@\"[iCloud] Both the local file and the iCloud file were last modified at the same time, however their contents do not match. You'll need to handle the conflict using the iCloudFileConflictBetweenCloudFile:andLocalFile: delegate method.\");\n                    NSDictionary *cloudFile = @{@\"fileContents\": document.contents, @\"fileURL\": cloudURL, @\"modifiedDate\": cloudModDate};\n                    NSDictionary *localFile = @{@\"fileContents\": localFileData, @\"fileURL\": localURL, @\"modifiedDate\": localModDate};;\n                    \n                    if ([self.delegate respondsToSelector:@selector(iCloudFileUploadConflictWithCloudFile:andLocalFile:)]) {\n                        [self.delegate iCloudFileConflictBetweenCloudFile:cloudFile andLocalFile:localFile];\n                    } else if ([self.delegate respondsToSelector:@selector(iCloudFileUploadConflictWithCloudFile:andLocalFile:)]) {\n                        NSLog(@\"[iCloud] WARNING: iCloudFileUploadConflictWithCloudFile:andLocalFile is deprecated and will become unavailable in a future version. Use iCloudFileConflictBetweenCloudFile:andLocalFile instead.\");\n#pragma clang diagnostic push\n#pragma clang diagnostic ignored \"-Wdeprecated-declarations\"\n                        [self.delegate iCloudFileUploadConflictWithCloudFile:cloudFile andLocalFile:localFile];\n#pragma clang diagnostic pop\n                    }\n                    \n                    return;\n                }\n            }\n        }\n        \n        // Log completion\n        if (self.verboseLogging == YES) NSLog(@\"[iCloud] Finished evicting iCloud document. Successfully moved to local storage.\");\n        \n        dispatch_async(dispatch_get_main_queue(), ^{\n            handler(nil);\n            return;\n        });\n    });\n}\n\n//---------------------------------------------------------------------------------------------------------------------------------------------//\n//------------ Manage -------------------------------------------------------------------------------------------------------------------------//\n//---------------------------------------------------------------------------------------------------------------------------------------------//\n#pragma mark - Manage\n\n- (void)renameOriginalDocument:(NSString *)documentName withNewName:(NSString *)newName completion:(void (^)(NSError *error))handler {\n    // Log rename\n    if (self.verboseLogging == YES) NSLog(@\"[iCloud] Attempting to rename document, %@, to the new name: %@\", documentName, newName);\n    \n    // Check for iCloud\n    if ([self quickCloudCheck] == NO) return;\n    \n    // Check for nil / null document name\n    if (documentName == nil || [documentName isEqualToString:@\"\"] || newName == nil || [newName isEqualToString:@\"\"]) {\n        // Log error\n        if (self.verboseLogging == YES) NSLog(@\"[iCloud] Specified document name must not be empty\");\n        return;\n    }\n    \n    // Create the URLs for the files that are being renamed\n    NSURL *sourceFileURL = [[self ubiquitousDocumentsDirectoryURL] URLByAppendingPathComponent:documentName];\n    NSURL *newFileURL = [[self ubiquitousDocumentsDirectoryURL] URLByAppendingPathComponent:newName];\n    \n    // Check if file exists at source URL\n    if (![self.fileManager fileExistsAtPath:[sourceFileURL path]]) {\n        NSLog(@\"[iCloud] File does not exist at path: %@\", sourceFileURL);\n        NSError *error = [NSError errorWithDomain:[NSString stringWithFormat:@\"The document, %@, does not exist at path: %@\", documentName, sourceFileURL] code:404 userInfo:@{@\"FileURL\": sourceFileURL}];\n        \n        dispatch_async(dispatch_get_main_queue(), ^{\n            if (handler)\n                handler(error);\n        });\n        \n        return;\n    }\n    \n    // Check if file does not exist at new URL\n    if ([self.fileManager fileExistsAtPath:[newFileURL path]]) {\n        NSLog(@\"[iCloud] File already exists at path: %@\", newFileURL);\n        NSError *error = [NSError errorWithDomain:[NSString stringWithFormat:@\"The document, %@, already exists at path: %@\", newName, newFileURL] code:512 userInfo:@{@\"FileURL\": newFileURL}];\n        \n        dispatch_async(dispatch_get_main_queue(), ^{\n            if (handler)\n                handler(error);\n        });\n        \n        return;\n    }\n    \n    // Log success of existence\n    if (self.verboseLogging == YES) NSLog(@\"[iCloud] Files passed existence check, preparing to rename\");\n    \n    // Move to the background thread for safety\n    dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^(void) {\n        // Coordinate renaming safely with a file coordinator\n        NSError *coordinatorError = nil;\n        NSFileCoordinator *coordinator = [[NSFileCoordinator alloc] initWithFilePresenter:nil];\n        [coordinator coordinateWritingItemAtURL:sourceFileURL options:NSFileCoordinatorWritingForMoving writingItemAtURL:newFileURL options:NSFileCoordinatorWritingForReplacing error:&coordinatorError byAccessor:^(NSURL *newURL1, NSURL *newURL2) {\n            NSError *moveError;\n            BOOL moveSuccess;\n            \n            // Log rename\n            if (self.verboseLogging == YES) NSLog(@\"[iCloud] Renaming Files\");\n            \n            // Do the actual renaming\n            moveSuccess = [self.fileManager moveItemAtURL:sourceFileURL toURL:newFileURL error:&moveError];\n            \n            if (moveSuccess) {\n                // Log success\n                if (self.verboseLogging == YES) NSLog(@\"[iCloud] Renamed Files\");\n                \n                dispatch_async(dispatch_get_main_queue(), ^{\n                    if (handler)\n                        handler(nil);\n                });\n                return;\n            }\n            \n            if (moveError) {\n                // Log failure\n                NSLog(@\"[iCloud] Failed to rename file, %@, to new name: %@. Error: %@\", documentName, newName , moveError);\n                \n                dispatch_async(dispatch_get_main_queue(), ^{\n                    if (handler)\n                        handler(moveError);\n                });\n                \n                return;\n            }\n            \n            if (coordinatorError) {\n                // Log failure\n                NSLog(@\"[iCloud] Failed to rename file, %@, to new name: %@. Error: %@\", documentName, newName , coordinatorError);\n                \n                dispatch_async(dispatch_get_main_queue(), ^{\n                    if (handler)\n                        handler(coordinatorError);\n                });\n                \n                return;\n            }\n        }];\n    });\n}\n\n- (void)duplicateOriginalDocument:(NSString *)documentName withNewName:(NSString *)newName completion:(void (^)(NSError *error))handler {\n    // Log duplication\n    if (self.verboseLogging == YES) NSLog(@\"[iCloud] Attempting to duplicate document, %@\", documentName);\n    \n    // Check for iCloud\n    if ([self quickCloudCheck] == NO) return;\n    \n    // Check for nil / null document name\n    if (documentName == nil || [documentName isEqualToString:@\"\"] || newName == nil || [newName isEqualToString:@\"\"]) {\n        // Log error\n        if (self.verboseLogging == YES) NSLog(@\"[iCloud] Specified document name must not be empty\");\n        return;\n    }\n    \n    // Create the URLs for the files that are being renamed\n    NSURL *sourceFileURL = [[self ubiquitousDocumentsDirectoryURL] URLByAppendingPathComponent:documentName];\n    NSURL *newFileURL = [[self ubiquitousDocumentsDirectoryURL] URLByAppendingPathComponent:newName];\n    \n    // Check if file exists at source URL\n    if (![self.fileManager fileExistsAtPath:[sourceFileURL path]]) {\n        NSLog(@\"[iCloud] File does not exist at path: %@\", sourceFileURL);\n        NSError *error = [NSError errorWithDomain:[NSString stringWithFormat:@\"The document, %@, does not exist at path: %@\", documentName, sourceFileURL] code:404 userInfo:@{@\"FileURL\": sourceFileURL}];\n        \n        dispatch_async(dispatch_get_main_queue(), ^{\n            if (handler)\n                handler(error);\n        });\n        \n        return;\n    }\n    \n    // Check if file does not exist at new URL\n    if ([self.fileManager fileExistsAtPath:[newFileURL path]]) {\n        NSLog(@\"[iCloud] File already exists at path: %@\", newFileURL);\n        NSError *error = [NSError errorWithDomain:[NSString stringWithFormat:@\"The document, %@, already exists at path: %@\", newName, newFileURL] code:512 userInfo:@{@\"FileURL\": newFileURL}];\n        \n        dispatch_async(dispatch_get_main_queue(), ^{\n            if (handler)\n                handler(error);\n        });\n        \n        return;\n    }\n    \n    // Log success of existence\n    if (self.verboseLogging == YES) NSLog(@\"[iCloud] Files passed existence check, preparing to duplicate\");\n    \n    // Move to the background thread for safety\n    dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^(void) {\n        NSError *moveError;\n        BOOL moveSuccess;\n        \n        // Log duplication\n        if (self.verboseLogging == YES) NSLog(@\"[iCloud] Duplicating Files\");\n        \n        // Do the actual duplicating\n        moveSuccess = [self.fileManager copyItemAtURL:sourceFileURL toURL:newFileURL error:&moveError];\n        \n        if (moveSuccess) {\n            // Log success\n            if (self.verboseLogging == YES) NSLog(@\"[iCloud] Duplicated Files\");\n            \n            dispatch_async(dispatch_get_main_queue(), ^{\n                if (handler)\n                    handler(nil);\n            });\n            return;\n        }\n        \n        if (moveError) {\n            // Log failure\n            NSLog(@\"[iCloud] Failed to duplicate file, %@, with new name: %@. Error: %@\", documentName, newName , moveError);\n            \n            dispatch_async(dispatch_get_main_queue(), ^{\n                if (handler)\n                    handler(moveError);\n            });\n            \n            return;\n        }\n    });\n}\n\n//---------------------------------------------------------------------------------------------------------------------------------------------//\n//------------ Deprecated Methods -------------------------------------------------------------------------------------------------------------//\n//---------------------------------------------------------------------------------------------------------------------------------------------//\n#pragma mark - Deprecated Methods\n\n+ (void)uploadLocalOfflineDocumentsWithDelegate:(id<iCloudDelegate>)delegate {\n    for (int i = 0; i <= 5; i++) NSLog(@\"[iCloud] WARNING: uploadLocalOfflineDocumentsWithDelegate: is deprecated and will become unavailable in version 8.0. Use [- uploadLocalOfflineDocuments] instead.\");\n}\n\n+ (void)updateFilesWithDelegate:(id<iCloudDelegate>)delegate {\n    for (int i = 0; i <= 5; i++) NSLog(@\"[iCloud] WARNING: updateFilesWithDelegate: is deprecated and will become unavailable in version 8.0. Use [- updateFiles] instead.\");\n}\n\n- (NSArray *)getListOfCloudFiles {\n    for (int i = 0; i <= 5; i++) NSLog(@\"[iCloud] WARNING: getListOfCloudFiles is deprecated and will become unavailable in a future version. Use [- listCloudFiles] instead. This method will return nil.\");\n    return nil;\n}\n\n- (void)saveChangesToDocumentWithName:(NSString *)documentName withContent:(NSData *)content completion:(void (^)(UIDocument *cloudDocument, NSData *documentData, NSError *error))handler {\n    // This method is deprecated: Due to the fact, that the document is recreated in closed state on every call, it is just a copy of the saveAndCloseDocumentWithName-method above\n    for (int i = 0; i <= 5; i++) NSLog(@\"[iCloud] WARNING: saveChangesToDocumentWithName:withContent:completion: is deprecated and will become unavailable in version 8.0. Use [- saveAndCloseDocumentWithName:withContent:completion:] instead.\");\n    \n\t[self saveAndCloseDocumentWithName:documentName withContent:content completion:handler];\n    \n\t/*\n     \n     // Log save\n     if (verboseLogging == YES) NSLog(@\"[iCloud] Beginning document change save\");\n     \n     // Check for iCloud\n     if ([self quickCloudCheck] == NO) return;\n     \n     // Check for nil / null document name\n     if (documentName == nil || [documentName isEqualToString:@\"\"]) {\n     // Log error\n     if (verboseLogging == YES) NSLog(@\"[iCloud] Specified document name must not be empty\");\n     NSError *error = [NSError errorWithDomain:@\"The specified document name was empty / blank and could not be saved. Specify a document name next time.\" code:001 userInfo:nil];\n     \n     handler(nil, nil, error);\n     \n     return;\n     }\n     \n     // Get the URL to save the changes to\n     NSURL *fileURL = [[self ubiquitousDocumentsDirectoryURL] URLByAppendingPathComponent:documentName];\n     \n     // Initialize a document with that path\n     iCloudDocument *document = [[iCloudDocument alloc] initWithFileURL:fileURL];\n     document.contents = content;\n     \n     // If the file exists, close it; otherwise, create it.\n     if ([fileManager fileExistsAtPath:[fileURL path]]) {\n     // Log recording\n     if (verboseLogging == YES) NSLog(@\"[iCloud] Document exists, saving changes\");\n     \n     // Record Changes\n     [document updateChangeCount:UIDocumentChangeDone];\n     \n     handler(document, document.contents, nil);\n     } else {\n     // Log saving\n     if (verboseLogging == YES) NSLog(@\"[iCloud] Document is new, saving\");\n     \n     // Save and create the new document\n     [document saveToURL:document.fileURL forSaveOperation:UIDocumentSaveForCreating completionHandler:^(BOOL success) {\n     if (success) {\n     // Log the save\n     if (verboseLogging == YES) NSLog(@\"[iCloud] New document created successfully, recorded changes\");\n     \n     // Run the completion block and pass the document\n     handler(document, document.contents, nil);;\n     } else {\n     NSLog(@\"[iCloud] Error while creating the document: %s\", __PRETTY_FUNCTION__);\n     NSError *error = [NSError errorWithDomain:[NSString stringWithFormat:@\"%s error while creating the document, %@, in iCloud\", __PRETTY_FUNCTION__, document.fileURL] code:100 userInfo:[NSDictionary dictionaryWithObject:fileURL forKey:@\"FileURL\"]];\n     \n     handler(document, document.contents, error);\n     }\n     }];\n     }\n\t */\n}\n\n@end\n"
  },
  {
    "path": "Pods/iCloudDocumentSync/iCloud/iCloudDocument.h",
    "content": "//\n//  iCloudDocument.h\n//  iCloud Document Sync\n//\n//  Created by iRare Media. Last updated January 2014.\n//  Available on GitHub. Licensed under MIT with Attribution.\n//\n\n// Check for Objective-C Modules\n#if __has_feature(objc_modules)\n    // We recommend enabling Objective-C Modules in your project Build Settings for numerous benefits over regular #imports. Read more from the Modules documentation: http://clang.llvm.org/docs/Modules.html\n    @import Foundation;\n    @import UIKit;\n#else\n    #import <Foundation/Foundation.h>\n    #import <UIKit/UIKit.h>\n#endif\n\n/** Use the iCloudDocument class (a subclass of UIDocument) to read and write documents managed by the iCloud class. You should rarely interact directly with iCloudDocument. The iCloud class manages all interactions with iCloudDocument. You can however retieve an iCloudDocument object by specifying its URL in the iCloud class.\n \n iCloudDocument can read and write any files with the following exceptions:\n \n - Bundles\n - Packages\n - Aliases\n \n If you'd like support for the above faux files then please consider [filing an Issue on GitHub](https://github.com/iRareMedia/iCloudDocumentSync/issues/new) or [submitting a Pull Request](https://github.com/iRareMedia/iCloudDocumentSync/pulls) if you've figured out how. This can be done using an NSFileWrapper. \n \n You may want to consider subclassing iCloudDocument for custom implementations of many features. */\n@class iCloudDocument;\n@protocol iCloudDocumentDelegate;\n@interface iCloudDocument : UIDocument\n\n\n\n/** @name Methods */\n\n/** Initialize a new UIDocument with the specified file path\n \n @param url\tThe path to the UIDocument file\n @return UIDocument object at the specified URL */\n- (instancetype)initWithFileURL:(NSURL *)url __attribute__((objc_designated_initializer));\n\n\n\n\n/** @name Delegate */\n\n/** iCloud Delegate helps call methods when document processes begin or end */\n@property (weak, nonatomic) id <iCloudDocumentDelegate> delegate;\n\n\n\n\n/** @name Properties */\n\n/** The file version of the UIDocument object, used for handling file conflicts */\nNSFileVersion *laterVersion(NSFileVersion *first, NSFileVersion *second);\n\n/** The data to read or write to a UIDocument */\n@property (copy) NSData *contents;\n\n/** Retrieve the localized name of the current document\n \n @return Name of document including file extension, as an NSString */\n- (NSString *)localizedName;\n\n/** Retrieve a user-readable form of the document state\n \n @return Current state of the document as a user-readable NSString */\n- (NSString *)stateDescription;\n\n@end\n\n\n@class iCloudDocument;\n/** The iCloudDocumentDelegate protocol defines the methods used to receive error notifications and allow for deeper control of document handling and management. */\n@protocol iCloudDocumentDelegate <NSObject>\n\n\n/** @name Required Delegate Methods */\n\n@required\n\n/** Delegate method fired when an error occurs during an attempt to read, save, or revert a document.\n \n @param error The error that occured during an attempt to read, save, or revert a document. */\n- (void)iCloudDocumentErrorOccured:(NSError *)error;\n\n@end\n"
  },
  {
    "path": "Pods/iCloudDocumentSync/iCloud/iCloudDocument.m",
    "content": "//\n//  iCloudDocument.m\n//  iCloud Document Sync\n//\n//  Created by iRare Media. Last updated January 2014.\n//  Available on GitHub. Licensed under MIT with Attribution.\n//\n\n#import \"iCloudDocument.h\"\n\nNSFileVersion *laterVersion (NSFileVersion *first, NSFileVersion *second) {\n    NSDate *firstDate = first.modificationDate;\n    NSDate *secondDate = second.modificationDate;\n    return ([firstDate compare:secondDate] != NSOrderedDescending) ? second : first;\n}\n\n@implementation iCloudDocument\n\n//----------------------------------------------------------------------------------------------------------------//\n//------------  Document Life Cycle ------------------------------------------------------------------------------//\n//----------------------------------------------------------------------------------------------------------------//\n#pragma mark - Document Life Cycle\n\n- (instancetype)initWithFileURL:(NSURL *)url {\n\tself = [super initWithFileURL:url];\n\tif (self) {\n\t\t_contents = [[NSData alloc] init];\n\t}\n\treturn self;\n}\n\n- (NSString *)localizedName {\n\treturn [self.fileURL lastPathComponent];\n}\n\n- (NSString *)stateDescription {\n    if (!self.documentState) return @\"Document state is normal\";\n    \n    NSMutableString *string = [NSMutableString string];\n    if ((self.documentState & UIDocumentStateNormal) != 0) [string appendString:@\"Document state is normal\"];\n    if ((self.documentState & UIDocumentStateClosed) != 0) [string appendString:@\"Document is closed\"];\n    if ((self.documentState & UIDocumentStateInConflict) != 0) [string appendString:@\"Document is in conflict\"];\n    if ((self.documentState & UIDocumentStateSavingError) != 0) [string appendString:@\"Document is experiencing saving error\"];\n    if ((self.documentState & UIDocumentStateEditingDisabled) != 0) [string appendString:@\"Document editing is disbled\"];\n    \n    return string;\n}\n\n//----------------------------------------------------------------------------------------------------------------//\n//------------  Loading and Saving -------------------------------------------------------------------------------//\n//----------------------------------------------------------------------------------------------------------------//\n#pragma mark - Loading and Saving\n\n- (id)contentsForType:(NSString *)typeName error:(NSError **)outError {\n    if (!self.contents) {\n        self.contents = [[NSData alloc] init];\n    }\n    \n\treturn self.contents;\n}\n\n- (BOOL)loadFromContents:(id)fileContents ofType:(NSString *)typeName error:(NSError **)outError {\n    if ([fileContents length] > 0) {\n        self.contents = [[NSData alloc] initWithData:fileContents];\n    } else {\n        self.contents = [[NSData alloc] init];\n    }\n    \n    return YES;\n}\n\n- (void)setDocumentData:(NSData *)newData {\n    NSData *oldData = self.contents;\n    self.contents = [newData copy];\n        \n    // Register the undo operation\n    [self.undoManager setActionName:@\"Data Change\"];\n    [self.undoManager registerUndoWithTarget:self selector:@selector(setDocumentData:) object:oldData];\n}\n\n//----------------------------------------------------------------------------------------------------------------//\n//------------  Error Handling ----------------------------------------------------------------------------------//\n//----------------------------------------------------------------------------------------------------------------//\n#pragma mark - Loading and Saving\n\n- (void)handleError:(NSError *)error userInteractionPermitted:(BOOL)userInteractionPermitted {\n    [super handleError:error userInteractionPermitted:userInteractionPermitted];\n\tNSLog(@\"[iCloudDocument] %@\", error);\n    \n    if ([self.delegate respondsToSelector:@selector(iCloudDocumentErrorOccured:)]) [self.delegate iCloudDocumentErrorOccured:error];\n}\n\n@end\n\n"
  },
  {
    "path": "README.md",
    "content": "ArcBit\n===\nBitcoin wallet for iOS. First mobile wallet to support reusable/stealth addresses. Also offers cold wallet storage and offline spending. Visit http://www.arcbit.io/ for more information.\n\n##### App store Link:\nhttps://itunes.apple.com/app/arcbit-bitcoin-wallet/id999487888\n\n##### Features:\n- No signup required\n- Cold wallet storage and offline  spending\n- Encrypted iCloud backup support\n- Single recovery passphrase that works forever\n- Private keys never leave your device\n- Faster loading time compared to other wallets\n- Send and receive bitcoin payments\n- View transactions and wallet balance\n- PIN protection\n- Email support built into app\n- HD wallet support\n- Forward/reusable/stealth address support\n- Over 150 local currencies support \n- Bitcoin, millibits and bits denomination support\n- Dedicated help section for any question about how to use the app\n- Automatic cycling of addresses to prevent address reuse\n- Open source\n- Your wallet is encrypted with AES-256 and 10k rounds of PBKDF2 password stretching\n- xpub keys stored client side unlike many other wallets, which offers better privacy\n- Can access private keys without an internet connection\n- Advance mode for Bitcoin experts\n- First bitcoin wallet written in Swift\n\n##### Advance features:\n\n- Pick Your Preferred block explorer API, currently we support Bitpay’s Insight and blockchain.info. You can also point ArcBit to your own Insight Server.\n- Import private keys support\n- Import BIP38 encrypted private keys support\n- Import watch only addresses support\n- Import HD wallet account keys support\n- Import HD wallet watch only account keys support\n\nBuild\n===\nTo build ArcBit simply open the project from XCode and click run.\n\n\nMade Possible By\n===\nArcBit is made possible by, but not limited to these projects.\n\n- https://github.com/oleganza/CoreBitcoin\n\n- https://github.com/bitpay/insight\n\n- https://github.com/bitpay/insight-api\n\n- https://github.com/voisine/breadwallet\n\n- https://github.com/AFNetworking/AFNetworking\n\n- https://github.com/RNCryptor/RNCryptor\n\n- https://github.com/iRareMedia/iCloudDocumentSync\n"
  }
]