| Commit type | Emoji |
|---|---|
| Initial commit | 🎉 :tada: |
| Version tag | 🔖 :bookmark: |
| Ship/Relesse | :shipit: |
| New feature | ✨ :sparkles: |
| Bugfix | 🐛 :bug: |
| Metadata | 📇 :card_index: |
| Documentation | 📚 :books: |
| Documenting source code | 💡 :bulb: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import Foundation | |
| import CryptoKit | |
| import Network | |
| public final class NetworkSecurityManager { | |
| public static let shared = NetworkSecurityManager() | |
| private let monitor = NWPathMonitor() | |
| private let queue = DispatchQueue(label: "NetworkMonitor") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import Foundation | |
| import CryptoKit | |
| import LocalAuthentication | |
| public final class SecureStorageManager { | |
| public static let shared = SecureStorageManager() | |
| private let keychainService = "com.flightbooking.secure" | |
| private let encryptionKey = SymmetricKey(size: .bits256) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import Foundation | |
| import CryptoKit | |
| import CommonCrypto | |
| public final class CertificatePinner: NSObject { | |
| public static let shared = CertificatePinner() | |
| private var pinnedCertificates: [String: [Data]] = [:] | |
| private var pinnedPublicKeys: [String: [String]] = [:] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import Foundation | |
| import CryptoKit | |
| import UIKit | |
| import os.log | |
| import Darwin | |
| public final class RASPManager { | |
| public static let shared = RASPManager() | |
| private let logger = Logger(subsystem: "com.app.security", category: "RASP") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import Foundation | |
| import UIKit | |
| import CryptoKit | |
| import CoreTelephony | |
| import AdSupport | |
| import AppTrackingTransparency | |
| import Network | |
| public final class DeviceFingerprinter { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import Foundation | |
| import UIKit | |
| import Darwin | |
| public final class JailbreakDetector { | |
| public static let shared = JailbreakDetector() | |
| private init() {} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| extension Collection { | |
| /// Returns the element at the specified index if it exists, otherwise nil. | |
| subscript (safe index: Index) -> Element? { | |
| return indices.contains(index) ? self[index] : nil | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| extension URLSession { | |
| func decodeJson <T:Decodable> (_ type: T.Type , urlString: String , | |
| completion: @escaping (Result<T, Error>)->Void, | |
| dateDecodingStrategy: JSONDecoder.DateDecodingStrategy = .deferredToDate, | |
| keyDecodingStrategy: JSONDecoder.KeyDecodingStrategy = .useDefaultKeys) { | |
| guard let url = URL(string: urlString) else { return } | |
| let task = self.dataTask(with: url, completionHandler: { data, response, error in | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| extension Bundle { | |
| func decodeJson <T:Decodable> (_ type: T.Type , fileName: String, | |
| dateDecodingStrategy: JSONDecoder.DateDecodingStrategy = .deferredToDate, | |
| keyDecodingStrategy: JSONDecoder.KeyDecodingStrategy = .useDefaultKeys) -> T { | |
| guard let url = self.url(forResource: fileName, withExtension: nil) else { | |
| fatalError("Failed to load file ") // Handle for production code. | |
| } | |
| do { |
NewerOlder