- PKI is based upon two keys (public and private)
- Data can be securely encrypted using either the public or private keys
- Data can only be decrypted when using the opposite key to that which encrypted the data
- Use a Key Generator (e.g.
ssh-keygen
) to create your public/private keys - These keys are typically stored in
~/.ssh/
id_rsa
(private key; do not share! typically used to decrypt data)id_rsa.pub
(public key; typically used to encrypt data)
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
// Created by Evgeny Konkin on 17.06.2019. | |
class ViewController: UIViewController { | |
var collectionView: UICollectionView! | |
// MARK: - Views Life Cycles | |
override func viewDidLoad() { | |
super.viewDidLoad() |
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
#!/bin/bash | |
set -e | |
set -u | |
altool="$(dirname "$(xcode-select -p)")/Applications/Application Loader.app/Contents/Frameworks/ITunesSoftwareService.framework/Support/altool" | |
ipa="path/to/foo.ipa" | |
echo "Validating app..." | |
time "$altool" --validate-app --type ios --file "$ipa" --username "$ITC_USER" --password "$ITC_PASSWORD" |
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 | |
extension URLRequest { | |
/** | |
Returns a cURL command representation of this URL request. | |
*/ | |
public var curlString: String { | |
guard let url = url else { return "" } | |
var baseCommand = #"curl "\#(url.absoluteString)""# |
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
//Protocal that copyable class should conform | |
protocol Copying { | |
init(original: Self) | |
} | |
//Concrete class extension | |
extension Copying { | |
func copy() -> Self { | |
return Self.init(original: self) | |
} |
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
- (UIViewController *)topViewController{ | |
return [self topViewController:[UIApplication sharedApplication].keyWindow.rootViewController]; | |
} | |
- (UIViewController *)topViewController:(UIViewController *)rootViewController | |
{ | |
if (rootViewController.presentedViewController == nil) { | |
return rootViewController; | |
} | |