2017-01-22 01:42:36 +08:00
|
|
|
//
|
|
|
|
|
// Globals.swift
|
|
|
|
|
// pass
|
|
|
|
|
//
|
|
|
|
|
// Created by Mingshen Sun on 21/1/2017.
|
|
|
|
|
// Copyright © 2017 Bob Sun. All rights reserved.
|
|
|
|
|
//
|
|
|
|
|
|
|
|
|
|
import Foundation
|
2017-02-24 21:35:49 +08:00
|
|
|
import UIKit
|
2017-01-22 01:42:36 +08:00
|
|
|
|
|
|
|
|
class Globals {
|
2017-02-08 10:15:38 +08:00
|
|
|
static let documentPath = NSSearchPathForDirectoriesInDomains(.documentDirectory, .userDomainMask, true)[0];
|
2017-02-24 20:16:11 +03:00
|
|
|
static let libraryPath = NSSearchPathForDirectoriesInDomains(.libraryDirectory, .userDomainMask, true)[0];
|
2017-02-10 22:15:01 +08:00
|
|
|
static let pgpPublicKeyPath = "\(documentPath)/gpg_key.pub"
|
|
|
|
|
static let pgpPrivateKeyPath = "\(documentPath)/gpg_key"
|
|
|
|
|
|
2017-02-08 19:31:42 +08:00
|
|
|
static let sshPublicKeyURL = URL(fileURLWithPath: "\(documentPath)/ssh_key.pub")
|
|
|
|
|
static let sshPrivateKeyURL = URL(fileURLWithPath: "\(documentPath)/ssh_key")
|
2017-02-10 22:15:01 +08:00
|
|
|
|
2017-02-24 20:16:11 +03:00
|
|
|
static let repositoryPath = "\(libraryPath)/password-store"
|
2017-02-08 10:15:38 +08:00
|
|
|
static var passcodeConfiguration = PasscodeLockConfiguration()
|
2017-02-24 21:35:49 +08:00
|
|
|
|
2017-02-24 23:54:17 +08:00
|
|
|
static let red = UIColor(red:1.00, green:0.23, blue:0.19, alpha:1.0)
|
|
|
|
|
static let blue = UIColor(red:0.00, green:0.48, blue:1.00, alpha:1.0)
|
2017-02-24 21:35:49 +08:00
|
|
|
|
2017-03-08 20:39:08 -08:00
|
|
|
static let passwordMinimumLength = 6
|
|
|
|
|
static let passwordMaximumLength = 24
|
|
|
|
|
static let passwordDefaultLength = 16
|
2017-03-09 02:19:47 +08:00
|
|
|
|
2017-01-22 01:42:36 +08:00
|
|
|
private init() { }
|
|
|
|
|
}
|
2017-03-02 15:15:28 +08:00
|
|
|
|
|
|
|
|
extension Bundle {
|
|
|
|
|
var releaseVersionNumber: String? {
|
|
|
|
|
return infoDictionary?["CFBundleShortVersionString"] as? String
|
|
|
|
|
}
|
|
|
|
|
var buildVersionNumber: String? {
|
|
|
|
|
return infoDictionary?["CFBundleVersion"] as? String
|
|
|
|
|
}
|
|
|
|
|
}
|